diff --git a/gulp.d/tasks/build.js b/gulp.d/tasks/build.js index 7861f33..96050f2 100644 --- a/gulp.d/tasks/build.js +++ b/gulp.d/tasks/build.js @@ -55,6 +55,8 @@ module.exports = (src, dest, preview) => () => { ] return merge( + vfs + .src('js/gcx.js', { ...opts, sourcemaps }), vfs .src('js/+([0-9])-*.js', { ...opts, sourcemaps }) .pipe(terser()) @@ -94,6 +96,8 @@ module.exports = (src, dest, preview) => () => { .pipe(terser()), // NOTE use this statement to bundle a JavaScript library that cannot be browserified, like jQuery //vfs.src(require.resolve(''), opts).pipe(concat('js/vendor/.js')), + vfs + .src('css/gcx.css', { ...opts, sourcemaps }), vfs .src('css/site.css', { ...opts, sourcemaps }) .pipe(postcss((file) => ({ plugins: postcssPlugins, options: { file } }))), diff --git a/gulpfile.js b/gulpfile.js index 25ce769..ded33f3 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -12,7 +12,7 @@ const previewDestDir = 'public' const srcDir = 'src' const destDir = `${previewDestDir}/_` const { reload: livereload } = process.env.LIVERELOAD === 'true' ? require('gulp-connect') : {} -const serverConfig = { host: '0.0.0.0', port: 5252, livereload } +const serverConfig = { host: '0.0.0.0', port: 3000, livereload } const task = require('./gulp.d/tasks') const glob = { diff --git a/preview-src/gcx-nav.adoc b/preview-src/gcx-nav.adoc new file mode 100644 index 0000000..9c01d75 --- /dev/null +++ b/preview-src/gcx-nav.adoc @@ -0,0 +1,6 @@ += GCX Navigation +Author Name + +++++ +
+++++ \ No newline at end of file diff --git a/preview-src/gcx.adoc b/preview-src/gcx.adoc new file mode 100644 index 0000000..111bd6e --- /dev/null +++ b/preview-src/gcx.adoc @@ -0,0 +1,12 @@ += Landing +Author Name +:page-layout: gcx + +GCX Viewer +++++ +
+++++ + +++++ +
+++++ \ No newline at end of file diff --git a/preview-src/landing-icon-1.svg b/preview-src/landing-icon-1.svg new file mode 100644 index 0000000..5de860c --- /dev/null +++ b/preview-src/landing-icon-1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/preview-src/landing-icon-2.svg b/preview-src/landing-icon-2.svg new file mode 100644 index 0000000..2325862 --- /dev/null +++ b/preview-src/landing-icon-2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/preview-src/landing-icon-3.svg b/preview-src/landing-icon-3.svg new file mode 100644 index 0000000..2015219 --- /dev/null +++ b/preview-src/landing-icon-3.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/preview-src/landing-icon-4.svg b/preview-src/landing-icon-4.svg new file mode 100644 index 0000000..2a48cfe --- /dev/null +++ b/preview-src/landing-icon-4.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/preview-src/landing-icon-5.svg b/preview-src/landing-icon-5.svg new file mode 100644 index 0000000..0d83ef6 --- /dev/null +++ b/preview-src/landing-icon-5.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/preview-src/landing-icon-7.svg b/preview-src/landing-icon-7.svg new file mode 100644 index 0000000..4a7b8f0 --- /dev/null +++ b/preview-src/landing-icon-7.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/preview-src/landing.adoc b/preview-src/landing.adoc new file mode 100644 index 0000000..f195849 --- /dev/null +++ b/preview-src/landing.adoc @@ -0,0 +1,56 @@ += Landing +Author Name +:page-layout: landing + +++++ +
+++++ + +[sidebar.landing-card] +.Getting Started +**** + +-- +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris finibus dictum nisi ut efficitur. Integer finibus ligula at augue faucibus, ac accumsan magna feugiat. +Vivamus a erat faucibus, sollicitudin turpis eu, volutpat felis. Aliquam ex orci, tincidunt sed tellus finibus, gravida vestibulum dui. + +[.landing-card-body-icon] +image:landing-icon-1.svg[Card Icon,100] +-- +**** + +++++ +
+++++ + +++++ +
+++++ + +[sidebar.landing-card] +.Getting Started +**** + +-- +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris finibus dictum nisi ut efficitur. Integer finibus ligula at augue faucibus, ac accumsan magna feugiat. + +[.landing-card-body-icon] +image:landing-icon-2.svg[Card Icon,100] +-- +**** + +[sidebar.landing-card] +.Getting Started +**** + +-- +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris finibus dictum nisi ut efficitur. Integer finibus ligula at augue faucibus, ac accumsan magna feugiat. + +[.landing-card-body-icon] +image:landing-icon-3.svg[Card Icon,100] +-- +**** + +++++ +
+++++ \ No newline at end of file diff --git a/preview-src/ui-model.yml b/preview-src/ui-model.yml index c3cf3b0..ec1ccf9 100644 --- a/preview-src/ui-model.yml +++ b/preview-src/ui-model.yml @@ -1,6 +1,6 @@ antoraVersion: '1.0.0' site: - url: http://localhost:5252 + url: http://localhost:3000 title: Brand Docs homeUrl: &home_url /xyz/5.2/index.html components: @@ -111,6 +111,15 @@ page: - content: English + 中文 url: '/xyz/5.2/index.html#english+中文' urlType: internal + - content: GCX Navigation + url: '/xyz/5.2/gcx-nav.html' + urlType: internal + - content: GCX + url: '/xyz/5.2/gcx.html' + urlType: internal + - content: Landing Page + url: '/xyz/5.2/landing.html' + urlType: internal - content: Liber Recusabo url: '#liber-recusabo' urlType: fragment diff --git a/src/css/doc.css b/src/css/doc.css index 5c34802..0702c05 100644 --- a/src/css/doc.css +++ b/src/css/doc.css @@ -8,6 +8,13 @@ padding: 0 1rem 4rem; } +.doc.gcx { + width: 100%; + max-width: 100%; + margin-right: 0; + padding-right: 0; +} + @media screen and (min-width: 1024px) { .doc { flex: auto; diff --git a/src/css/feedback.css b/src/css/feedback.css new file mode 100644 index 0000000..9e3af79 --- /dev/null +++ b/src/css/feedback.css @@ -0,0 +1,116 @@ +.feedback-wrapper { + margin: 15px 0; + background-color: #222b49; + color: white; + text-align: center; + padding: 15px; + border-radius: 5px; + font-size: 17px; +} + +.feedback-wrapper h2 { + border-bottom: 1px solid #c9cef6; + color: white !important; + margin: 0 !important; + padding: 0 !important; + margin-bottom: 10px !important; +} + +.stars { + margin-top: 15px; + cursor: pointer; + display: flex; + justify-content: center; + margin-bottom: 15px; +} + +.star polygon { + fill: #d8d8d8; +} + +.stars:hover .star polygon { + fill: #ffd055 !important; +} + +.star:hover ~ .star polygon { + fill: #d8d8d8 !important; +} + +.stars[data-stars] .star polygon { + fill: #ffd055; +} + +.stars[data-stars="1"] .star:nth-child(1) ~ .star polygon { + fill: #d8d8d8; +} + +.stars[data-stars="2"] .star:nth-child(2) ~ .star polygon { + fill: #d8d8d8; +} + +.stars[data-stars="3"] .star:nth-child(3) ~ .star polygon { + fill: #d8d8d8; +} + +.stars[data-stars="4"] .star:nth-child(4) ~ .star polygon { + fill: #d8d8d8; +} + +.stars[data-stars="5"] .star:nth-child(5) ~ .star polygon { + fill: #d8d8d8; +} + +#feedback-form { + width: 100%; + display: none; +} + +#feedback-form form { + width: 100%; + display: flex; + flex-direction: column; +} + +#feedback-form form label { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 15px; + font-size: 1rem; +} + +#feedback-form form label input, +#feedback-form form label textarea { + display: flex; + flex: 0 80%; + padding: 15px; + border-radius: 5px; + border: 1px solid white; + background-color: transparent; + color: white; + font-size: 17px; + font-family: sans-serif; +} + +#feedback-form form label input::placeholder, +#feedback-form form label textarea::placeholder { + color: white; +} + +#feedback-form form button { + display: flex; + color: #555dc0; + font-weight: bold; + background-color: transparent; + border: none; + padding: 15px; + text-align: right; + border-radius: 5px; + background-color: rgba(225,225,225,0.9); + justify-content: center; +} + +#feedback-thankyou { + text-align: center; + display: none; +} \ No newline at end of file diff --git a/src/css/gcx.css b/src/css/gcx.css new file mode 100644 index 0000000..2964c03 --- /dev/null +++ b/src/css/gcx.css @@ -0,0 +1,2 @@ +body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;margin:0}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.App{text-align:center}.App-logo{height:40vmin;pointer-events:none}@media (prefers-reduced-motion:no-preference){.App-logo{-webkit-animation:App-logo-spin 20s linear infinite;animation:App-logo-spin 20s linear infinite}}.App-header{align-items:center;background-color:#282c34;color:#fff;display:flex;flex-direction:column;font-size:calc(10px + 2vmin);justify-content:center;min-height:100vh}.App-link{color:#61dafb}@-webkit-keyframes App-logo-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes App-logo-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.nav-list .nav-item{cursor:pointer}.example-container{padding:0}.example-content{color:#000;display:flex;flex:0 0 30%;flex-direction:column;font-size:.9375rem;line-height:1.5em;margin-right:12px;max-height:100vh;overflow:auto;position:-webkit-sticky;position:sticky;text-align:left;top:0}.example-section{padding:21px 0 29px 16px}.example-section h2{border:none!important;margin:0}.example-section.highlighted-section{background:#ced4df;border-top:1px solid #808da4;position:relative}.highlighted-separator{background:#3c4961;height:100%;position:absolute;right:-12px;top:0;width:12px}.highlighted-separator:before{border-color:#fff #fff transparent transparent;top:0}.highlighted-separator:after,.highlighted-separator:before{border-style:solid;border-width:6px;content:"";display:block;left:0;position:absolute}.highlighted-separator:after{border-color:#3c4961 #3c4961 transparent transparent;bottom:-12px}.highlighted-separator:last-of-type .highlighted-separator:after{content:none}.form-control,.form-group .col-form-label{color:var(--palette-night-700)}.form-control{background-color:var(--palette-white-100);background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibTAgMCA1IDUgNS01SDBaIiBmaWxsPSIjNEQ1ODY5Ii8+PC9zdmc+);background-position:95%;background-repeat:no-repeat;border:1px solid var(--palette-night-900);box-shadow:none}.example-docs-wrapper{background:var(--palette-night-900);color:var(--palette-night-400);display:flex;flex-direction:column;width:100%}@media screen and (min-width:992px){.example-docs-wrapper-content{max-height:calc(100vh - 88px);overflow:auto;position:-webkit-sticky;position:sticky;top:0}}.CodeMirror{height:100%;margin:0;width:100%}.example-docs-files{display:flex;flex-wrap:wrap;padding:16px 32px}.file{background:var(--palette-night-800);border-radius:10px;color:#fff;font-family:Roboto Mono;font-size:12px;line-height:16px;margin:0 8px 8px 0;padding:4px 24px;text-align:center;transition:all .2s ease}.file.active,.file:hover{background:var(--palette-night-400);border-color:var(--palette-night-300);cursor:pointer}.extensions-row{display:flex;padding:15px}.extensions-row label{align-items:center;display:flex}.extensions-row label select{display:flex;margin-left:15px;padding:5px}.code-viewer-tags{display:flex;flex-wrap:nowrap;padding:8px 16px}.code-viewer-tags .tag{background:#2e394e;border-radius:10px;color:#fff;font-family:Roboto Mono,monospace;font-size:12px;line-height:16px;margin:0 8px 8px 0;padding:4px 24px;text-align:center;transition:all .2s ease}.code-viewer-tags .tag.active,.code-viewer-tags .tag:hover{background:#808da4;border-color:#a6b1c2;cursor:pointer}.code-viewer-wrapper-content{background:#20293a;color:#fff;display:flex;flex:1 1;flex-direction:column;font-family:Roboto Mono,monospace;max-width:100%;overflow:auto;padding:16px 0}.code-viewer{border-radius:5px;display:flex;flex-direction:column;list-style:none;margin:0 10px;padding:0;scroll-margin:50px;width:100%}.code-line{color:#fff;display:flex;font-family:monospace!important;font-size:1rem;grid-template-columns:40px auto;line-height:1.5em;text-align:left}.code-line.active{background:#3c4961;color:#fff}.code-line-number{max-width:40px!important;min-width:40px!important;padding:5px;pointer-events:none;text-align:right!important;width:40px!important}.code-line-content{background:transparent!important;box-shadow:none!important;font-family:Roboto Mono,monospace;line-height:1!important;margin:0;overflow:visible!important;padding:5px!important}.row{display:flex;flex-direction:row} +/*# sourceMappingURL=main.e73c4a08.css.map*/ \ No newline at end of file diff --git a/src/css/landing.css b/src/css/landing.css new file mode 100644 index 0000000..831c072 --- /dev/null +++ b/src/css/landing.css @@ -0,0 +1,69 @@ +.landing-row { + display: flex; +} + +.landing-card { + background: white !important; + border-radius: 5px !important; + padding: 15px !important; + box-shadow: 2px 2px 5px 0 gray; + + display: flex; + flex: 1; + margin-top: 0 !important; + margin-right: 15px !important; + margin-bottom: 15px !important; + flex-direction: column !important; + align-items: stretch !important; +} + +.landing-card:last-child { + margin-right: 0 !important; +} + +.landing-card > .content { + display: flex; + flex-direction: column; +} + +.landing-card .title { + display: flex; + flex: 0 100%; + font-size: 1.4rem; + margin-bottom: 10px; +} + +.landing-card .paragraph { + display: flex; + font-size: 1rem; + margin-bottom: 10px; + flex: 1; +} + +.landing-card .openblock .content { + display: flex; + flex-direction: row; +} + +.landing-card-body { + display: flex; + flex-direction: row; + font-size: 1rem; + margin-bottom: 10px; +} + +.landing-card-body-wrapper { + display: block; +} + +.landing-card-body-content { + display: block; +} + +.landing-card-body-icon { + display: block; + float: right; + margin-left: 15px; + margin-bottom: 15px; + flex: unset !important; +} \ No newline at end of file diff --git a/src/css/site.css b/src/css/site.css index 36b6f20..feb960f 100644 --- a/src/css/site.css +++ b/src/css/site.css @@ -18,3 +18,5 @@ @import "typeface-nunito.css"; @import "tabs.css"; @import "search.css"; +@import "landing.css"; +@import "feedback.css"; diff --git a/src/js/gcx.js b/src/js/gcx.js new file mode 100644 index 0000000..a572efc --- /dev/null +++ b/src/js/gcx.js @@ -0,0 +1,3 @@ +/*! For license information please see main.18d97cfc.js.LICENSE.txt */ +!function(){var e={7228:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){l=!0,a=e},f:function(){try{u||null==n.return||n.return()}finally{if(l)throw a}}}},e.exports.__esModule=!0,e.exports.default=e.exports},3884:function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(l){u=!0,o=l}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}},e.exports.__esModule=!0,e.exports.default=e.exports},521:function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},3038:function(e,t,n){var r=n(2858),o=n(3884),i=n(379),a=n(521);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},379:function(e,t,n){var r=n(7228);e.exports=function(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},7757:function(e,t,n){e.exports=n(9727)},1772:function(e,t,n){var r=n(8910)({projectId:"dh7vb62q",dataset:"production",apiVersion:"2021-03-25",token:"sk8VdVIJfWJqd0v2tGE2Gf1qoT6mtBQe3cGlUwAwk58jpwiDR108Njaubv6YiqxAPJQdWae0nWOkhojk6Kc2Qtc4Tyt4VfN3DtFNYCaRRcVHII04KFWiYgiuWwBIVLS1Suua3P8s11EQH9SwB0XNo8opdYGSi2xkgm0Dlvq3Ly8QDxNJDsQ6",useCdn:!1});e.exports=r},1015:function(e,t,n){e.exports=n(329)},5872:function(e,t,n){"use strict";var r=n(1725),o=n(7809),i=n(1157),a=n(5998),u=n(6546),l=["projectId","dataset","imageOptions"],s={imageOptions:{}};function c(e){return"block"===e._type&&e.listItem}e.exports=function(e,t,n,f){var d=r({},s,t),p=Array.isArray(d.blocks)?d.blocks:[d.blocks],h=a(p),v=i(h,d.listNestMode),y=u(n,d.serializers||{}),m=l.reduce((function(e,t){var n=d[t];return"undefined"!==typeof n&&(e[t]=n),e}),{});function g(t,n,r,i){return"list"===(a=t)._type&&a.listItem?function(t){var n=t.listItem,r=t.level,o=t._key,i=t.children.map(g);return e(y.list,{key:o,level:r,type:n,options:m},i)}(t):c(t)?function(t,n){var r=t._key,i=o(t).map(g);return e(y.listItem,{node:t,serializers:y,index:n,key:r,options:m},i)}(t,function(e,t){for(var n=0,r=0;r1){var k=d.className?{className:d.className}:{};return e(y.container,k,w)}return w[0]?w[0]:"function"===typeof y.empty?e(y.empty):y.empty}},7809:function(e){"use strict";var t=["strong","em","code","underline","strike-through"];function n(e,t,n){if(!e.marks||0===e.marks.length)return e.marks||[];var o=e.marks.reduce((function(e,r){e[r]=e[r]?e[r]+1:1;for(var o=t+1;or?1:0}e.exports=function(e){var t=e.children,r=e.markDefs;if(!t||!t.length)return[];var o=t.map(n),i={_type:"span",children:[]},a=[i];return t.forEach((function(e,t){var n=o[t];if(n){var i=1;if(a.length>1)for(;i=0;t--){var n=e[t];if("span"===n._type&&n.children)return n}return}(a=a.slice(0,i));if(n.forEach((function(t){var n={_type:"span",_key:e._key,children:[],mark:r.find((function(e){return e._key===t}))||t,markKey:t};c.children.push(n),a.push(n),c=n})),"span"!==(s=e)._type||"string"!==typeof s.text||!Array.isArray(s.marks)&&"undefined"!==typeof s.marks)c.children=c.children.concat(e);else{for(var f=e.text.split("\n"),d=f.length;d-- >1;)f.splice(d,0,"\n");c.children=c.children.concat(f)}}else{a[a.length-1].children.push(e)}})),i.children}},5998:function(e,t,n){"use strict";var r=n(1725);function o(e){var t=0,n=e.length;if(0===n)return t;for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"html",s=[],c=0;ct.level){var d=a(f);if("html"===n){var p=u(t),h=r({},p,{children:p.children.concat(d)});t.children[t.children.length-1]=h}else t.children.push(d);t=d}else if(f.levele.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:{};c.validateAssetType(e);var r=n.extract||void 0;r&&!r.length&&(r=["none"]);var o=c.hasDataset(this.client.clientConfig),i="image"===e?"images":"files",a=d(n,t),s=a.tag,f=a.label,p=a.title,h=a.description,v=a.creditLine,y=a.filename,m=a.source,g={label:f,title:p,description:h,filename:y,meta:r,creditLine:v};m&&(g.sourceId=m.id,g.sourceName=m.name,g.sourceUrl=m.url);var b=this.client._requestObservable({tag:s,method:"POST",timeout:a.timeout||0,uri:"/assets/".concat(i,"/").concat(o),headers:a.contentType?{"Content-Type":a.contentType}:{},query:g,body:t});return this.client.isPromiseAPI()?b.pipe(l((function(e){return"response"===e.type})),u((function(e){return e.body.document}))).toPromise():b},delete:function(e,t){console.warn("client.assets.delete() is deprecated, please use client.delete()");var n=t||"";return/^(image|file)-/.test(n)?e._id&&(n=e._id):n="".concat(e,"-").concat(n),c.hasDataset(this.client.clientConfig),this.client.delete(n)},getImageUrl:function(e,t){var n=e._ref||e;if("string"!==typeof n)throw new Error("getImageUrl() needs either an object with a _ref, or a string with an asset document ID");if(!/^image-[A-Za-z0-9_]+-\d+x\d+-[a-z]{1,5}$/.test(n))throw new Error('Unsupported asset ID "'.concat(n,'". URL generation only works for auto-generated IDs.'));var o=r(n.split("-"),4),i=o[1],a=o[2],u=o[3];c.hasDataset(this.client.clientConfig);var l=this.client.clientConfig,f=l.projectId,d=l.dataset,p=t?s(t):"";return"https://cdn.sanity.io/images/".concat(f,"/").concat(d,"/").concat(i,"-").concat(a,".").concat(u).concat(p)}}),e.exports=f},4284:function(e,t,n){"use strict";function r(e){this.client=e}n(1725)(r.prototype,{getLoginProviders:function(){return this.client.request({uri:"/auth/providers"})},logout:function(){return this.client.request({uri:"/auth/logout",method:"POST"})}}),e.exports=r},1897:function(e,t,n){"use strict";var r=n(162).generateHelpUrl,o=n(1725),i=n(5152),a=n(8277),u={apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0,isPromiseAPI:!0},l=["localhost","127.0.0.1","0.0.0.0"];t.defaultConfig=u,t.initConfig=function(e,n){var s=o({},n,e);s.apiVersion||a.printNoApiVersionSpecifiedWarning();var c=o({},u,s),f=c.useProjectHostname;if("undefined"===typeof Promise){var d=r("js-client-promise-polyfill");throw new Error("No native Promise-implementation found, polyfill needed - see ".concat(d))}if(f&&!c.projectId)throw new Error("Configuration must contain `projectId`");var p="undefined"!==typeof window&&window.location&&window.location.hostname,h=p&&function(e){return-1!==l.indexOf(e)}(window.location.hostname);p&&h&&c.token&&!0!==c.ignoreBrowserTokenWarning?a.printBrowserTokenWarning():"undefined"===typeof c.useCdn&&a.printCdnWarning(),f&&i.projectId(c.projectId),c.dataset&&i.dataset(c.dataset),"requestTagPrefix"in c&&(c.requestTagPrefix=c.requestTagPrefix?i.requestTag(c.requestTagPrefix).replace(/\.+$/,""):void 0),c.apiVersion="".concat(c.apiVersion).replace(/^v/,""),c.isDefaultApi=c.apiHost===u.apiHost,c.useCdn=Boolean(c.useCdn)&&!c.withCredentials,t.validateApiVersion(c.apiVersion);var v=c.apiHost.split("://",2),y=v[0],m=v[1],g=c.isDefaultApi?"apicdn.sanity.io":m;return c.useProjectHostname?(c.url="".concat(y,"://").concat(c.projectId,".").concat(m,"/v").concat(c.apiVersion),c.cdnUrl="".concat(y,"://").concat(c.projectId,".").concat(g,"/v").concat(c.apiVersion)):(c.url="".concat(c.apiHost,"/v").concat(c.apiVersion),c.cdnUrl=c.url),c},t.validateApiVersion=function(e){if("1"!==e&&"X"!==e){var t=new Date(e);if(!(/^\d{4}-\d{2}-\d{2}$/.test(e)&&t instanceof Date&&t.getTime()>0))throw new Error("Invalid API version string, expected `1` or date in format `YYYY-MM-DD`")}}},693:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(1725),i=n(3899),a=i.map,u=i.filter,l=n(5152),s=n(4779),c=n(1186),f=n(9439),d=n(7285),p=n(5279),h=function(e,t){return!1===e?void 0:"undefined"===typeof e?t:e},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{dryRun:e.dryRun,returnIds:!0,returnDocuments:h(e.returnDocuments,!0),visibility:e.visibility||"sync",autoGenerateArrayKeys:e.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:e.skipCrossDatasetReferenceValidation}},y=function(e){return"response"===e.type},m=function(e){return e.body},g=function(e,t){return e.reduce((function(e,n){return e[t(n)]=n,e}),Object.create(null))},b=function(e){return e.toPromise()};e.exports={listen:p,getDataUrl:function(e,t){var n=this.clientConfig,r=l.hasDataset(n),o="/".concat(e,"/").concat(r),i=t?"".concat(o,"/").concat(t):o;return"/data".concat(i).replace(/\/($|\?)/,"$1")},fetch:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1===n.filterResponse?function(e){return e}:function(e){return e.result},o=this._dataRequest("query",{query:e,params:t},n).pipe(a(r));return this.isPromiseAPI()?b(o):o},getDocument:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={uri:this.getDataUrl("doc",e),json:!0,tag:t.tag},r=this._requestObservable(n).pipe(u(y),a((function(e){return e.body.documents&&e.body.documents[0]})));return this.isPromiseAPI()?b(r):r},getDocuments:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={uri:this.getDataUrl("doc",e.join(",")),json:!0,tag:t.tag},r=this._requestObservable(n).pipe(u(y),a((function(t){var n=g(t.body.documents||[],(function(e){return e._id}));return e.map((function(e){return n[e]||null}))})));return this.isPromiseAPI()?b(r):r},create:function(e,t){return this._create(e,"create",t)},createIfNotExists:function(e,t){return l.requireDocumentId("createIfNotExists",e),this._create(e,"createIfNotExists",t)},createOrReplace:function(e,t){return l.requireDocumentId("createOrReplace",e),this._create(e,"createOrReplace",t)},patch:function(e,t){return new d(e,t,this)},delete:function(e,t){return this.dataRequest("mutate",{mutations:[{delete:s(e)}]},t)},mutate:function(e,t){var n=e instanceof d||e instanceof f?e.serialize():e,r=Array.isArray(n)?n:[n],o=t&&t.transactionId;return this.dataRequest("mutate",{mutations:r,transactionId:o},t)},transaction:function(e){return new f(e,this)},dataRequest:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this._dataRequest(e,t,n);return this.isPromiseAPI()?b(r):r},_dataRequest:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o="mutate"===e,i="query"===e,l=!o&&c(t),s=!o&&l.length<11264,f=s?l:"",d=n.returnFirst,p=n.timeout,h=n.token,g=n.tag,b=n.headers,w=this.getDataUrl(e,f),k={method:s?"GET":"POST",uri:w,json:!0,body:s?void 0:t,query:o&&v(n),timeout:p,headers:b,token:h,tag:g,canUseCdn:i};return this._requestObservable(k).pipe(u(y),a(m),a((function(e){if(!o)return e;var t=e.results||[];if(n.returnDocuments)return d?t[0]&&t[0].document:t.map((function(e){return e.document}));var i=d?"documentId":"documentIds",a=d?t[0]&&t[0].id:t.map((function(e){return e.id}));return r({transactionId:e.transactionId,results:t},i,a)})))},_create:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r({},t,e),a=o({returnFirst:!0,returnDocuments:!0},n);return this.dataRequest("mutate",{mutations:[i]},a)}}},1186:function(e){"use strict";var t=["tag"];function n(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var r=encodeURIComponent;e.exports=function(e){var o=e.query,i=e.params,a=void 0===i?{}:i,u=e.options,l=void 0===u?{}:u,s=l.tag,c=n(l,t),f="query=".concat(r(o)),d=s?"?tag=".concat(r(s),"&").concat(f):"?".concat(f),p=Object.keys(a).reduce((function(e,t){return"".concat(e,"&").concat(r("$".concat(t)),"=").concat(r(JSON.stringify(a[t])))}),d);return Object.keys(c).reduce((function(e,t){return l[t]?"".concat(e,"&").concat(r(t),"=").concat(r(l[t])):e}),p)}},5279:function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{},r=this.clientConfig,i=r.url,a=r.token,l=r.withCredentials,m=r.requestTagPrefix,g=n.tag&&m?[m,n.tag].join("."):n.tag,b=o(o({},c(n,h)),{},{tag:g}),w=s(b,p),k=f({query:e,params:t,options:w,tag:g}),E="".concat(i).concat(this.getDataUrl("listen",k));if(E.length>14800)return new u((function(e){return e.error(new Error("Query too large for listener"))}));var x=b.events?b.events:["mutation"],_=-1!==x.indexOf("reconnect"),S={};return(a||l)&&(S.withCredentials=!0),a&&(S.headers={Authorization:"Bearer ".concat(a)}),new u((function(e){var t,n=s(),r=!1;function o(){r||(_&&e.next({type:"reconnect"}),r||n.readyState===d.CLOSED&&(l(),clearTimeout(t),t=setTimeout(c,100)))}function i(t){e.error(y(t))}function a(t){var n=v(t);return n instanceof Error?e.error(n):e.next(n)}function u(t){r=!0,l(),e.complete()}function l(){n.removeEventListener("error",o,!1),n.removeEventListener("channelError",i,!1),n.removeEventListener("disconnect",u,!1),x.forEach((function(e){return n.removeEventListener(e,a,!1)})),n.close()}function s(){var e=new d(E,S);return e.addEventListener("error",o,!1),e.addEventListener("channelError",i,!1),e.addEventListener("disconnect",u,!1),x.forEach((function(t){return e.addEventListener(t,a,!1)})),e}function c(){n=s()}return function(){r=!0,l()}}))}},7285:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(1725),i=n(4779),a=n(5152),u=a.validateObject,l=a.validateInsert;function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.selection=e,this.operations=o({},t),this.client=n}o(s.prototype,{clone:function(){return new s(this.selection,o({},this.operations),this.client)},set:function(e){return this._assign("set",e)},diffMatchPatch:function(e){return u("diffMatchPatch",e),this._assign("diffMatchPatch",e)},unset:function(e){if(!Array.isArray(e))throw new Error("unset(attrs) takes an array of attributes to unset, non-array given");return this.operations=o({},this.operations,{unset:e}),this},setIfMissing:function(e){return this._assign("setIfMissing",e)},replace:function(e){return u("replace",e),this._set("set",{$:e})},inc:function(e){return this._assign("inc",e)},dec:function(e){return this._assign("dec",e)},insert:function(e,t,n){var o;return l(e,t,n),this._assign("insert",(r(o={},e,t),r(o,"items",n),o))},append:function(e,t){return this.insert("after","".concat(e,"[-1]"),t)},prepend:function(e,t){return this.insert("before","".concat(e,"[0]"),t)},splice:function(e,t,n,r){var o=t<0?t-1:t,i="undefined"===typeof n||-1===n?-1:Math.max(0,t+n),a=o<0&&i>=0?"":i,u="".concat(e,"[").concat(o,":").concat(a,"]");return this.insert("replace",u,r||[])},ifRevisionId:function(e){return this.operations.ifRevisionID=e,this},serialize:function(){return o(i(this.selection),this.operations)},toJSON:function(){return this.serialize()},commit:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.client)throw new Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");var t="string"===typeof this.selection,n=o({returnFirst:t,returnDocuments:!0},e);return this.client.mutate({patch:this.serialize()},n)},reset:function(){return this.operations={},this},_set:function(e,t){return this._assign(e,t,!1)},_assign:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return u(e,t),this.operations=o({},this.operations,r({},e,o({},n&&this.operations[e]||{},t))),this}}),e.exports=s},9439:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(1725),i=n(5152),a=n(7285),u={returnDocuments:!1};function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;this.trxId=n,this.operations=e,this.client=t}o(l.prototype,{clone:function(){return new l(this.operations.slice(0),this.client,this.trxId)},create:function(e){return i.validateObject("create",e),this._add({create:e})},createIfNotExists:function(e){var t="createIfNotExists";return i.validateObject(t,e),i.requireDocumentId(t,e),this._add(r({},t,e))},createOrReplace:function(e){var t="createOrReplace";return i.validateObject(t,e),i.requireDocumentId(t,e),this._add(r({},t,e))},delete:function(e){return i.validateDocumentId("delete",e),this._add({delete:{id:e}})},patch:function(e,t){var n="function"===typeof t;if(e instanceof a)return this._add({patch:e.serialize()});if(n){var r=t(new a(e,{},this.client));if(!(r instanceof a))throw new Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:o({id:e},t)})},transactionId:function(e){return e?(this.trxId=e,this):this.trxId},serialize:function(){return this.operations.slice()},toJSON:function(){return this.serialize()},commit:function(e){if(!this.client)throw new Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.client.mutate(this.serialize(),o({transactionId:this.trxId},u,e||{}))},reset:function(){return this.operations=[],this},_add:function(e){return this.operations.push(e),this}}),e.exports=l},9806:function(e,t,n){"use strict";var r=n(1725),o=n(5152);function i(e){this.request=e.request.bind(e)}r(i.prototype,{create:function(e,t){return this._modify("PUT",e,t)},edit:function(e,t){return this._modify("PATCH",e,t)},delete:function(e){return this._modify("DELETE",e)},list:function(){return this.request({uri:"/datasets"})},_modify:function(e,t,n){return o.dataset(t),this.request({method:e,uri:"/datasets/".concat(t),body:n})}}),e.exports=i},9402:function(e){"use strict";e.exports=[]},2093:function(e,t,n){"use strict";var r=n(1064),o=n(1725);function i(e){var t=u(e);i.super.call(this,t.message),o(this,t)}function a(e){var t=u(e);a.super.call(this,t.message),o(this,t)}function u(e){var t=e.body,n={response:e,statusCode:e.statusCode,responseBody:l(t,e)};return t.error&&t.message?(n.message="".concat(t.error," - ").concat(t.message),n):t.error&&t.error.description?(n.message=t.error.description,n.details=t.error,n):(n.message=t.error||t.message||function(e){var t=e.statusMessage?" ".concat(e.statusMessage):"";return"".concat(e.method,"-request to ").concat(e.url," resulted in HTTP ").concat(e.statusCode).concat(t)}(e),n)}function l(e,t){return-1!==(t.headers["content-type"]||"").toLowerCase().indexOf("application/json")?JSON.stringify(e,null,2):e}r(i),r(a),t.ClientError=i,t.ServerError=a},307:function(e){"use strict";e.exports=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push("".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(e[n])));return t.length>0?"?".concat(t.join("&")):""}},2197:function(e,t,n){"use strict";var r=n(9434),o=n(1725),i=n(1947),a=n(337),u=n(9034),l=n(7173),s=n(3899).Observable,c=n(2093),f=c.ClientError,d=c.ServerError,p={onResponse:function(e){if(e.statusCode>=500)throw new d(e);if(e.statusCode>=400)throw new f(e);return e}},h={onResponse:function(e){var t=e.headers["x-sanity-warning"];return(Array.isArray(t)?t:[t]).filter(Boolean).forEach((function(e){return console.warn(e)})),e}},v=r(n(9402).concat([h,a(),u(),l(),p,i({implementation:s})]));function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v;return t(o({maxRedirects:0},e))}y.defaultRequester=v,y.ClientError=f,y.ServerError=d,e.exports=y},7865:function(e,t,n){"use strict";var r=n(1725),o="X-Sanity-Project-ID";e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},i=t.token||e.token;i&&(n.Authorization="Bearer ".concat(i)),t.useGlobalApi||e.useProjectHostname||!e.projectId||(n[o]=e.projectId);var a=Boolean("undefined"===typeof t.withCredentials?e.token||e.withCredentials:t.withCredentials),u="undefined"===typeof t.timeout?e.timeout:t.timeout;return r({},t,{headers:r({},n,t.headers||{}),timeout:"undefined"===typeof u?3e5:u,proxy:t.proxy||e.proxy,json:!0,withCredentials:a})}},4709:function(e,t,n){"use strict";function r(e){this.client=e}n(1725)(r.prototype,{list:function(){return this.client.request({uri:"/projects"})},getById:function(e){return this.client.request({uri:"/projects/".concat(e)})}}),e.exports=r},8910:function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=n(1725),a=n(3899),u=a.Observable,l=a.map,s=a.filter,c=n(7285),f=n(9439),d=n(693),p=n(9806),h=n(4709),v=n(7143),y=n(631),m=n(4284),g=n(2197),b=n(7865),w=n(1897),k=w.defaultConfig,E=w.initConfig,x=n(5152);function _(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k;if(!(this instanceof _))return new _(e);if(this.config(e),this.assets=new v(this),this.datasets=new p(this),this.projects=new h(this),this.users=new y(this),this.auth=new m(this),this.clientConfig.isPromiseAPI){var t=i({},this.clientConfig,{isPromiseAPI:!1});this.observable=new _(t)}}i(_.prototype,d),i(_.prototype,{clone:function(){return new _(this.config())},config:function(e){if("undefined"===typeof e)return i({},this.clientConfig);if(this.observable){var t=i({},e,{isPromiseAPI:!1});this.observable.config(t)}return this.clientConfig=E(e,this.clientConfig||{}),this},withConfig:function(e){return this.clone().config(e)},getUrl:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t?this.clientConfig.cdnUrl:this.clientConfig.url;return"".concat(n,"/").concat(e.replace(/^\//,""))},isPromiseAPI:function(){return this.clientConfig.isPromiseAPI},_requestObservable:function(e){var t=this,n=e.url||e.uri,a="undefined"===typeof e.canUseCdn?["GET","HEAD"].indexOf(e.method||"GET")>=0&&0===n.indexOf("/data/"):e.canUseCdn,l=this.clientConfig.useCdn&&a,s=e.tag&&this.clientConfig.requestTagPrefix?[this.clientConfig.requestTagPrefix,e.tag].join("."):e.tag||this.clientConfig.requestTagPrefix;s&&(e.query=function(e){for(var t=1;t)","* Array of document IDs","* Object containing `query`"].join("\n");throw new Error("Unknown selection - must be one of:\n\n".concat(t))}},3899:function(e,t,n){"use strict";var r=n(5726).Observable,o=n(6736).filter,i=n(2601).map;e.exports={Observable:r,filter:o,map:i}},9541:function(e){"use strict";e.exports=function(e){var t,n=!1;return function(){return n||(t=e.apply(void 0,arguments),n=!0),t}}},581:function(e){"use strict";e.exports=function(e,t){return t.reduce((function(t,n){return"undefined"===typeof e[n]||(t[n]=e[n]),t}),{})}},5152:function(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var r=["image","file"],o=["before","after","replace"];t.dataset=function(e){if(!/^(~[a-z0-9]{1}[-\w]{0,63}|[a-z0-9]{1}[-\w]{0,63})$/.test(e))throw new Error("Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters")},t.projectId=function(e){if(!/^[-a-z0-9]+$/i.test(e))throw new Error("`projectId` can only contain only a-z, 0-9 and dashes")},t.validateAssetType=function(e){if(-1===r.indexOf(e))throw new Error("Invalid asset type: ".concat(e,". Must be one of ").concat(r.join(", ")))},t.validateObject=function(e,t){if(null===t||"object"!==n(t)||Array.isArray(t))throw new Error("".concat(e,"() takes an object of properties"))},t.requireDocumentId=function(e,n){if(!n._id)throw new Error("".concat(e,'() requires that the document contains an ID ("_id" property)'));t.validateDocumentId(e,n._id)},t.validateDocumentId=function(e,t){if("string"!==typeof t||!/^[a-z0-9_.-]+$/i.test(t))throw new Error("".concat(e,'(): "').concat(t,'" is not a valid document ID'))},t.validateInsert=function(e,t,n){var r="insert(at, selector, items)";if(-1===o.indexOf(e)){var i=o.map((function(e){return'"'.concat(e,'"')})).join(", ");throw new Error("".concat(r,' takes an "at"-argument which is one of: ').concat(i))}if("string"!==typeof t)throw new Error("".concat(r,' takes a "selector"-argument which must be a string'));if(!Array.isArray(n))throw new Error("".concat(r,' takes an "items"-argument which must be an array'))},t.hasDataset=function(e){if(!e.dataset)throw new Error("`dataset` must be provided to perform queries");return e.dataset||""},t.requestTag=function(e){if("string"!==typeof e||!/^[a-z0-9._-]{1,75}$/i.test(e))throw new Error("Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.");return e}},8277:function(e,t,n){"use strict";var r=n(162).generateHelpUrl,o=n(9541),i=function(e){return o((function(){for(var t,n=arguments.length,r=new Array(n),o=0;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[n++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var o="image-Tb9Ew8CXIwaY6R1kjMvI0uRR-2000x3000-jpg";function i(e){var t=e.split("-"),n=t[1],r=t[2],i=t[3];if(!n||!r||!i)throw new Error("Malformed asset _ref '"+e+"'. Expected an id like \""+o+'".');var a=r.split("x"),u=+a[0],l=+a[1];if(!isFinite(u)||!isFinite(l))throw new Error("Malformed asset _ref '"+e+"'. Expected an id like \""+o+'".');return{id:n,width:u,height:l,format:i}}var a=function(e){return!!e&&"string"===typeof e._ref},u=function(e){return!!e&&"string"===typeof e._id},l=function(e){var t=e;return!(!t||!t.asset)&&"string"===typeof t.asset.url};function s(e){if(!e)return null;var t;if("string"===typeof e&&c(e))t={asset:{_ref:f(e)}};else if("string"===typeof e)t={asset:{_ref:e}};else if(a(e))t={asset:e};else if(u(e))t={asset:{_ref:e._id||""}};else if(l(e))t={asset:{_ref:f(e.asset.url)}};else{if("object"!==typeof e.asset)return null;t=e}var n=e;return n.crop&&(t.crop=n.crop),n.hotspot&&(t.hotspot=n.hotspot),d(t)}function c(e){return/^https?:\/\//.test(""+e)}function f(e){return("image-"+e.split("/").slice(-1)[0]).replace(/\.([a-z]+)$/,"-$1")}function d(t){if(t.crop&&t.hotspot)return t;var n=e({},t);return n.crop||(n.crop={left:0,top:0,bottom:0,right:0}),n.hotspot||(n.hotspot={x:.5,y:.5,height:1,width:1}),n}var p=[["width","w"],["height","h"],["format","fm"],["download","dl"],["blur","blur"],["sharpen","sharp"],["invert","invert"],["orientation","or"],["minHeight","min-h"],["maxHeight","max-h"],["minWidth","min-w"],["maxWidth","max-w"],["quality","q"],["fit","fit"],["crop","crop"],["saturation","sat"],["auto","auto"],["dpr","dpr"],["pad","pad"]];function h(t){var n=e({},t||{}),r=n.source;delete n.source;var o=s(r);if(!o)return null;var a=i(o.asset._ref||o.asset._id||""),u=Math.round(o.crop.left*a.width),l=Math.round(o.crop.top*a.height),c={left:u,top:l,width:Math.round(a.width-o.crop.right*a.width-u),height:Math.round(a.height-o.crop.bottom*a.height-l)},f=o.hotspot.height*a.height/2,d=o.hotspot.width*a.width/2,p=o.hotspot.x*a.width,h=o.hotspot.y*a.height,m={left:p-d,top:h-f,right:p+d,bottom:h+f};return n.rect||n.focalPoint||n.ignoreImageParams||n.crop||(n=e(e({},n),y({crop:c,hotspot:m},n))),v(e(e({},n),{},{asset:a}))}function v(e){var t=e.baseUrl||"https://cdn.sanity.io",n=e.asset.id+"-"+e.asset.width+"x"+e.asset.height+"."+e.asset.format,r=t+"/images/"+e.projectId+"/"+e.dataset+"/"+n,o=[];if(e.rect){var i=e.rect,a=i.left,u=i.top,l=i.width,s=i.height;(0!==a||0!==u||s!==e.asset.height||l!==e.asset.width)&&o.push("rect="+a+","+u+","+l+","+s)}e.bg&&o.push("bg="+e.bg),e.focalPoint&&(o.push("fp-x="+e.focalPoint.x),o.push("fp-y="+e.focalPoint.y));var c=[e.flipHorizontal&&"h",e.flipVertical&&"v"].filter(Boolean).join("");return c&&o.push("flip="+c),p.forEach((function(t){var n=t[0],r=t[1];"undefined"!==typeof e[n]?o.push(r+"="+encodeURIComponent(e[n])):"undefined"!==typeof e[r]&&o.push(r+"="+encodeURIComponent(e[r]))})),0===o.length?r:r+"?"+o.join("&")}function y(e,t){var n,r=t.width,o=t.height;if(!r||!o)return{width:r,height:o,rect:e.crop};var i=e.crop,a=e.hotspot,u=r/o;if(i.width/i.height>u){var l=i.height,s=l*u,c=i.top,f=(a.right-a.left)/2+a.left-s/2;fi.left+i.width&&(f=i.left+i.width-s),n={left:Math.round(f),top:Math.round(c),width:Math.round(s),height:Math.round(l)}}else{var d=i.width,p=d/u,h=i.left,v=(a.bottom-a.top)/2+a.top-p/2;vi.top+i.height&&(v=i.top+i.height-p),n={left:Math.max(0,Math.floor(h)),top:Math.max(0,Math.floor(v)),width:Math.round(d),height:Math.round(p)}}return{width:r,height:o,rect:n}}var m=["clip","crop","fill","fillmax","max","scale","min"],g=["top","bottom","left","right","center","focalpoint","entropy"],b=["format"];function w(e){return!!e&&"object"===typeof e.clientConfig}function k(e){for(var t,n=r(p);!(t=n()).done;){var o=t.value,i=o[0],a=o[1];if(e===i||e===a)return i}return e}function E(e){var t=e;if(w(t)){var n=t.clientConfig,r=n.apiHost,o=n.projectId,i=n.dataset;return new x(null,{baseUrl:(r||"https://api.sanity.io").replace(/^https:\/\/api\./,"https://cdn."),projectId:o,dataset:i})}return new x(null,e)}var x=function(){function t(t,n){this.options=e(t?e({},t.options||{}):{},n||{})}var n=t.prototype;return n.withOptions=function(n){var r=n.baseUrl||this.options.baseUrl,o={baseUrl:r};for(var i in n)n.hasOwnProperty(i)&&(o[k(i)]=n[i]);return new t(this,e({baseUrl:r},o))},n.image=function(e){return this.withOptions({source:e})},n.dataset=function(e){return this.withOptions({dataset:e})},n.projectId=function(e){return this.withOptions({projectId:e})},n.bg=function(e){return this.withOptions({bg:e})},n.dpr=function(e){return this.withOptions({dpr:e})},n.width=function(e){return this.withOptions({width:e})},n.height=function(e){return this.withOptions({height:e})},n.focalPoint=function(e,t){return this.withOptions({focalPoint:{x:e,y:t}})},n.maxWidth=function(e){return this.withOptions({maxWidth:e})},n.minWidth=function(e){return this.withOptions({minWidth:e})},n.maxHeight=function(e){return this.withOptions({maxHeight:e})},n.minHeight=function(e){return this.withOptions({minHeight:e})},n.size=function(e,t){return this.withOptions({width:e,height:t})},n.blur=function(e){return this.withOptions({blur:e})},n.sharpen=function(e){return this.withOptions({sharpen:e})},n.rect=function(e,t,n,r){return this.withOptions({rect:{left:e,top:t,width:n,height:r}})},n.format=function(e){return this.withOptions({format:e})},n.invert=function(e){return this.withOptions({invert:e})},n.orientation=function(e){return this.withOptions({orientation:e})},n.quality=function(e){return this.withOptions({quality:e})},n.forceDownload=function(e){return this.withOptions({download:e})},n.flipHorizontal=function(){return this.withOptions({flipHorizontal:!0})},n.flipVertical=function(){return this.withOptions({flipVertical:!0})},n.ignoreImageParams=function(){return this.withOptions({ignoreImageParams:!0})},n.fit=function(e){if(-1===m.indexOf(e))throw new Error('Invalid fit mode "'+e+'"');return this.withOptions({fit:e})},n.crop=function(e){if(-1===g.indexOf(e))throw new Error('Invalid crop mode "'+e+'"');return this.withOptions({crop:e})},n.saturation=function(e){return this.withOptions({saturation:e})},n.auto=function(e){if(-1===b.indexOf(e))throw new Error('Invalid auto mode "'+e+'"');return this.withOptions({auto:e})},n.pad=function(e){return this.withOptions({pad:e})},n.url=function(){return h(this.options)},n.toString=function(){return this.url()},t}();return E}()},4048:function(e,t){var n,r,o;!function(i){"use strict";var a=i.setTimeout,u=i.clearTimeout,l=i.XMLHttpRequest,s=i.XDomainRequest,c=i.ActiveXObject,f=i.EventSource,d=i.document,p=i.Promise,h=i.fetch,v=i.Response,y=i.TextDecoder,m=i.TextEncoder,g=i.AbortController;if("undefined"===typeof window||"undefined"===typeof d||"readyState"in d||null!=d.body||(d.readyState="loading",window.addEventListener("load",(function(e){d.readyState="complete"}),!1)),null==l&&null!=c&&(l=function(){return new c("Microsoft.XMLHTTP")}),void 0==Object.create&&(Object.create=function(e){function t(){}return t.prototype=e,new t}),Date.now||(Date.now=function(){return(new Date).getTime()}),void 0==g){var b=h;h=function(e,t){var n=t.signal;return b(e,{headers:t.headers,credentials:t.credentials,cache:t.cache}).then((function(e){var t=e.body.getReader();return n._reader=t,n._aborted&&n._reader.cancel(),{status:e.status,statusText:e.statusText,headers:e.headers,body:{getReader:function(){return t}}}}))},g=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){null!=this.signal._reader&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function w(){this.bitsNeeded=0,this.codePoint=0}w.prototype.decode=function(e){function t(e,t,n){if(1===n)return e>=128>>t&&e<=2048>>t&&e<=57344>>t&&e<=65536>>t&&e<>6>15?3:t>31?2:1;if(12===e)return t>15?3:2;if(18===e)return 3;throw new Error}for(var r=65533,o="",i=this.bitsNeeded,a=this.codePoint,u=0;u191||!t(a<<6|63&l,i-6,n(i,a)))&&(i=0,a=r,o+=String.fromCharCode(a)),0===i?(l>=0&&l<=127?(i=0,a=l):l>=192&&l<=223?(i=6,a=31&l):l>=224&&l<=239?(i=12,a=15&l):l>=240&&l<=247?(i=18,a=7&l):(i=0,a=r),0===i||t(a,i,n(i,a))||(i=0,a=r)):(i-=6,a=a<<6|63&l),0===i&&(a<=65535?o+=String.fromCharCode(a):(o+=String.fromCharCode(55296+(a-65535-1>>10)),o+=String.fromCharCode(56320+(a-65535-1&1023))))}return this.bitsNeeded=i,this.codePoint=a,o};void 0!=y&&void 0!=m&&function(){try{return"test"===(new y).decode((new m).encode("test"),{stream:!0})}catch(e){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+e)}return!1}()||(y=w);var k=function(){};function E(e){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=k,this.onload=k,this.onerror=k,this.onreadystatechange=k,this._contentType="",this._xhr=e,this._sendTimeout=0,this._abort=k}function x(e){return e.replace(/[A-Z]/g,(function(e){return String.fromCharCode(e.charCodeAt(0)+32)}))}function _(e){for(var t=Object.create(null),n=e.split("\r\n"),r=0;r0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u,c=[],f=s.reduce((function(e,t){return e[t]=e[t]||[],e}),{processOptions:[i],validateOptions:[a]});function d(e){var t=l.reduce((function(e,t){return e[t]=r(),e}),{}),i=o(f),a=i("processOptions",e);i("validateOptions",a);var u={options:a,channels:t,applyMiddleware:i},s=null,c=t.request.subscribe((function(e){s=n(e,(function(n,r){return function(e,r,o){var a=e,u=r;if(!a)try{u=i("onResponse",r,o)}catch(n){u=null,a=n}(a=a&&i("onError",a,o))?t.error.publish(a):u&&t.response.publish(u)}(n,r,e)}))}));t.abort.subscribe((function(){c(),s&&s.abort()}));var d=i("onReturn",t,u);return d===t&&t.request.publish(u),d}return d.use=function(e){if(!e)throw new Error("Tried to add middleware that resolved to falsey value");if("function"===typeof e)throw new Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");if(e.onReturn&&f.onReturn.length>0)throw new Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");return s.forEach((function(t){e[t]&&f[t].push(e[t])})),c.push(e),d},d.clone=function(){return e(c)},t.forEach(d.use),d}},8089:function(e,t,n){"use strict";var r=n(1725),o=n(5915),i="undefined"!==typeof navigator&&"ReactNative"===navigator.product,a=Object.prototype.hasOwnProperty,u={timeout:i?6e4:12e4};function l(e){var t=[];for(var n in e)a.call(e,n)&&r(n,e[n]);return t.length?t.join("&"):"";function r(e,n){Array.isArray(n)?n.forEach((function(t){return r(e,t)})):t.push([e,n].map(encodeURIComponent).join("="))}}function s(e){if(!1===e||0===e)return!1;if(e.connect||e.socket)return e;var t=Number(e);return isNaN(t)?s(u.timeout):{connect:t,socket:t}}e.exports=function(e){var t="string"===typeof e?r({url:e},u):r({},u,e),n=o(t.url,{},!0);return t.timeout=s(t.timeout),t.query&&(n.query=r({},n.query,function(e){var t={};for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}(t.query))),t.method=t.body&&!t.method?"POST":(t.method||"GET").toUpperCase(),t.url=n.toString(l),t}},6255:function(e){"use strict";var t=/^https?:\/\//i;e.exports=function(e){if(!t.test(e.url))throw new Error('"'.concat(e.url,'" is not a valid URL'))}},337:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var o=n(1725),i=n(4807),a=["boolean","string","number"];e.exports=function(){return{processOptions:function(e){var t,n=e.body;return n&&!("function"===typeof n.pipe)&&!((t=n).constructor&&"function"===typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))&&(-1!==a.indexOf(r(n))||Array.isArray(n)||i(n))?o({},e,{body:JSON.stringify(e.body),headers:o({},e.headers,{"Content-Type":"application/json"})}):e}}}},9034:function(e,t,n){"use strict";var r=n(1725);function o(e){try{return JSON.parse(e)}catch(t){throw t.message="Failed to parsed response body as JSON: ".concat(t.message),t}}e.exports=function(e){return{onResponse:function(t){var n=t.headers["content-type"]||"",i=e&&e.force||-1!==n.indexOf("application/json");return t.body&&n&&i?r({},t,{body:o(t.body)}):t},processOptions:function(e){return r({},e,{headers:r({Accept:"application/json"},e.headers)})}}}},1947:function(e,t,n){"use strict";var r=n(7193),o=n(1725);e.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.implementation||r.Observable;if(!t)throw new Error("`Observable` is not available in global scope, and no implementation was passed");return{onReturn:function(e,n){return new t((function(t){return e.error.subscribe((function(e){return t.error(e)})),e.progress.subscribe((function(e){return t.next(o({type:"progress"},e))})),e.response.subscribe((function(e){t.next(o({type:"response"},e)),t.complete()})),e.request.publish(n),function(){return e.abort.publish()}}))}}}},7791:function(e){"use strict";e.exports=function(){return{onRequest:function(e){if("xhr"===e.adapter){var t=e.request,n=e.context;"upload"in t&&"onprogress"in t.upload&&(t.upload.onprogress=r("upload")),"onprogress"in t&&(t.onprogress=r("download"))}function r(e){return function(t){var r=t.lengthComputable?t.loaded/t.total*100:-1;n.channels.progress.publish({stage:e,percent:r,total:t.total,loaded:t.loaded,lengthComputable:t.lengthComputable})}}}}}},7173:function(e,t,n){"use strict";e.exports=n(7791)},4757:function(e,t,n){"use strict";var r=n(6784),o=n(9913),i=n(7390),a="undefined"===typeof window?void 0:window,u=a?"xhr":"fetch",l="function"===typeof XMLHttpRequest?XMLHttpRequest:function(){},s="withCredentials"in new l,c="undefined"===typeof XDomainRequest?void 0:XDomainRequest,f=s?l:c;a||(l=i,f=i),e.exports=function(e,t){var n=e.options,i=e.applyMiddleware("finalizeOptions",n),s={},c=a&&a.location&&!r(a.location.href,i.url),d=e.applyMiddleware("interceptRequest",void 0,{adapter:u,context:e});if(d){var p=setTimeout(t,0,null,d);return{abort:function(){return clearTimeout(p)}}}var h=c?new f:new l,v=a&&a.XDomainRequest&&h instanceof a.XDomainRequest,y=i.headers,m=i.timeout,g=!1,b=!1,w=!1;if(h.onerror=_,h.ontimeout=_,h.onabort=function(){x(!0),g=!0},h.onprogress=function(){},h[v?"onload":"onreadystatechange"]=function(){!function(){if(!m)return;x(),s.socket=setTimeout((function(){return E("ESOCKETTIMEDOUT")}),m.socket)}(),g||4!==h.readyState&&!v||0!==h.status&&function(){if(g||b||w)return;if(0===h.status)return void _(new Error("Unknown XHR error"));x(),b=!0,t(null,function(){var e=h.status,t=h.statusText;if(v&&void 0===e)e=200;else{if(e>12e3&&e<12156)return _();e=1223===h.status?204:h.status,t=1223===h.status?"No Content":t}return{body:h.response||h.responseText,url:i.url,method:i.method,headers:v?{}:o(h.getAllResponseHeaders()),statusCode:e,statusMessage:t}}())}()},h.open(i.method,i.url,!0),h.withCredentials=!!i.withCredentials,y&&h.setRequestHeader)for(var k in y)y.hasOwnProperty(k)&&h.setRequestHeader(k,y[k]);else if(y&&v)throw new Error("Headers cannot be set on an XDomainRequest object");return i.rawBody&&(h.responseType="arraybuffer"),e.applyMiddleware("onRequest",{options:i,adapter:u,request:h,context:e}),h.send(i.body||null),m&&(s.connect=setTimeout((function(){return E("ETIMEDOUT")}),m.connect)),{abort:function(){g=!0,h&&h.abort()}};function E(t){w=!0,h.abort();var n=new Error("ESOCKETTIMEDOUT"===t?"Socket timed out on request to ".concat(i.url):"Connection timed out on request to ".concat(i.url));n.code=t,e.channels.error.publish(n)}function x(e){(e||g||h.readyState>=2&&s.connect)&&clearTimeout(s.connect),s.socket&&clearTimeout(s.socket)}function _(e){if(!b){x(!0),b=!0,h=null;var n=e||new Error("Network error while attempting to reach ".concat(i.url));n.isNetworkError=!0,n.request=i,t(n)}}}},7390:function(e){"use strict";function t(){this.readyState=0}t.prototype.open=function(e,t){this._method=e,this._url=t,this._resHeaders="",this.readyState=1,this.onreadystatechange()},t.prototype.abort=function(){this._controller&&this._controller.abort()},t.prototype.getAllResponseHeaders=function(){return this._resHeaders},t.prototype.setRequestHeader=function(e,t){this._headers=this._headers||{},this._headers[e]=t},t.prototype.send=function(e){var t=this,n=this._controller="function"===typeof AbortController&&new AbortController,r="arraybuffer"!==this.responseType,o={method:this._method,headers:this._headers,signal:n&&n.signal,body:e};"undefined"!==typeof window&&(o.credentials=this.withCredentials?"include":"omit"),fetch(this._url,o).then((function(e){return e.headers.forEach((function(e,n){t._resHeaders+="".concat(n,": ").concat(e,"\r\n")})),t.status=e.status,t.statusText=e.statusText,t.readyState=3,r?e.text():e.arrayBuffer()})).then((function(e){r?t.responseText=e:t.response=e,t.readyState=4,t.onreadystatechange()})).catch((function(e){"AbortError"!==e.name?t.onerror(e):t.onabort()}))},e.exports=t},5910:function(e,t,n){"use strict";e.exports=n(4757)},7193:function(e,t,n){"use strict";"undefined"!==typeof globalThis?e.exports=globalThis:"undefined"!==typeof window?e.exports=window:"undefined"!==typeof n.g?e.exports=n.g:"undefined"!==typeof self?e.exports=self:e.exports={}},1258:function(e){"use strict";e.exports=function(e){return function(t,n){for(var r="onError"===t,o=n,i=arguments.length,a=new Array(i>2?i-2:0),u=2;u-1&&e.splice(n,1)}},publish:function(){for(var t=0;t