7245-2d3546b7bccd218a.js 52 KB

12
  1. (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7245],{53262:function(t){t.exports=function(){function t(){return t=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},t.apply(this,arguments)}function e(t,e){if(t){if("string"===typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function n(t,r){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=e(t))||r&&t&&"number"===typeof t.length){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}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 o="image-Tb9Ew8CXIwaY6R1kjMvI0uRR-2000x3000-jpg";function i(t){var e=t.split("-"),r=e[1],n=e[2],i=e[3];if(!r||!n||!i)throw new Error("Malformed asset _ref '"+t+"'. Expected an id like \""+o+'".');var s=n.split("x"),a=+s[0],c=+s[1];if(!isFinite(a)||!isFinite(c))throw new Error("Malformed asset _ref '"+t+"'. Expected an id like \""+o+'".');return{id:r,width:a,height:c,format:i}}var s=function(t){return!!t&&"string"===typeof t._ref},a=function(t){return!!t&&"string"===typeof t._id},c=function(t){var e=t;return!(!e||!e.asset)&&"string"===typeof e.asset.url};function u(e){if(!e)return null;var r;if("string"===typeof e&&h(e))r={asset:{_ref:l(e)}};else if("string"===typeof e)r={asset:{_ref:e}};else if(s(e))r={asset:e};else if(a(e))r={asset:{_ref:e._id||""}};else if(c(e))r={asset:{_ref:l(e.asset.url)}};else{if("object"!==typeof e.asset)return null;r=t({},e)}var n=e;return n.crop&&(r.crop=n.crop),n.hotspot&&(r.hotspot=n.hotspot),p(r)}function h(t){return/^https?:\/\//.test(""+t)}function l(t){return("image-"+t.split("/").slice(-1)[0]).replace(/\.([a-z]+)$/,"-$1")}function p(e){if(e.crop&&e.hotspot)return e;var r=t({},e);return r.crop||(r.crop={left:0,top:0,bottom:0,right:0}),r.hotspot||(r.hotspot={x:.5,y:.5,height:1,width:1}),r}var d=[["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 f(e){var r=t({},e||{}),n=r.source;delete r.source;var o=u(n);if(!o)throw new Error("Unable to resolve image URL from source ("+JSON.stringify(n)+")");var s=i(o.asset._ref||o.asset._id||""),a=Math.round(o.crop.left*s.width),c=Math.round(o.crop.top*s.height),h={left:a,top:c,width:Math.round(s.width-o.crop.right*s.width-a),height:Math.round(s.height-o.crop.bottom*s.height-c)},l=o.hotspot.height*s.height/2,p=o.hotspot.width*s.width/2,d=o.hotspot.x*s.width,f=o.hotspot.y*s.height,w={left:d-p,top:f-l,right:d+p,bottom:f+l};return r.rect||r.focalPoint||r.ignoreImageParams||r.crop||(r=t({},r,y({crop:h,hotspot:w},r))),m(t({},r,{asset:s}))}function m(t){var e=(t.baseUrl||"https://cdn.sanity.io").replace(/\/+$/,""),r=t.asset.id+"-"+t.asset.width+"x"+t.asset.height+"."+t.asset.format,n=e+"/images/"+t.projectId+"/"+t.dataset+"/"+r,o=[];if(t.rect){var i=t.rect,s=i.left,a=i.top,c=i.width,u=i.height;(0!==s||0!==a||u!==t.asset.height||c!==t.asset.width)&&o.push("rect="+s+","+a+","+c+","+u)}t.bg&&o.push("bg="+t.bg),t.focalPoint&&(o.push("fp-x="+t.focalPoint.x),o.push("fp-y="+t.focalPoint.y));var h=[t.flipHorizontal&&"h",t.flipVertical&&"v"].filter(Boolean).join("");return h&&o.push("flip="+h),d.forEach((function(e){var r=e[0],n=e[1];"undefined"!==typeof t[r]?o.push(n+"="+encodeURIComponent(t[r])):"undefined"!==typeof t[n]&&o.push(n+"="+encodeURIComponent(t[n]))})),0===o.length?n:n+"?"+o.join("&")}function y(t,e){var r,n=e.width,o=e.height;if(!n||!o)return{width:n,height:o,rect:t.crop};var i=t.crop,s=t.hotspot,a=n/o;if(i.width/i.height>a){var c=Math.round(i.height),u=Math.round(c*a),h=Math.max(0,Math.round(i.top)),l=Math.round((s.right-s.left)/2+s.left),p=Math.max(0,Math.round(l-u/2));p<i.left?p=i.left:p+u>i.left+i.width&&(p=i.left+i.width-u),r={left:p,top:h,width:u,height:c}}else{var d=i.width,f=Math.round(d/a),m=Math.max(0,Math.round(i.left)),y=Math.round((s.bottom-s.top)/2+s.top),w=Math.max(0,Math.round(y-f/2));w<i.top?w=i.top:w+f>i.top+i.height&&(w=i.top+i.height-f),r={left:m,top:w,width:d,height:f}}return{width:n,height:o,rect:r}}var w=["clip","crop","fill","fillmax","max","scale","min"],g=["top","bottom","left","right","center","focalpoint","entropy"],v=["format"];function b(t){return!(!t||!("config"in t))&&"function"===typeof t.config}function E(t){return!(!t||!("clientConfig"in t))&&"object"===typeof t.clientConfig}function O(t){for(var e,r=n(d);!(e=r()).done;){var o=e.value,i=o[0],s=o[1];if(t===i||t===s)return i}return t}function x(t){if(b(t)){var e=t.config(),r=e.apiHost,n=e.projectId,o=e.dataset;return new _(null,{baseUrl:(r||"https://api.sanity.io").replace(/^https:\/\/api\./,"https://cdn."),projectId:n,dataset:o})}var i=t;if(E(i)){var s=i.clientConfig,a=s.apiHost,c=s.projectId,u=s.dataset;return new _(null,{baseUrl:(a||"https://api.sanity.io").replace(/^https:\/\/api\./,"https://cdn."),projectId:c,dataset:u})}return new _(null,t)}var _=function(){function e(e,r){this.options=void 0,this.options=e?t({},e.options||{},r||{}):t({},r||{})}var r=e.prototype;return r.withOptions=function(r){var n=r.baseUrl||this.options.baseUrl,o={baseUrl:n};for(var i in r)r.hasOwnProperty(i)&&(o[O(i)]=r[i]);return new e(this,t({baseUrl:n},o))},r.image=function(t){return this.withOptions({source:t})},r.dataset=function(t){return this.withOptions({dataset:t})},r.projectId=function(t){return this.withOptions({projectId:t})},r.bg=function(t){return this.withOptions({bg:t})},r.dpr=function(t){return this.withOptions(t&&1!==t?{dpr:t}:{})},r.width=function(t){return this.withOptions({width:t})},r.height=function(t){return this.withOptions({height:t})},r.focalPoint=function(t,e){return this.withOptions({focalPoint:{x:t,y:e}})},r.maxWidth=function(t){return this.withOptions({maxWidth:t})},r.minWidth=function(t){return this.withOptions({minWidth:t})},r.maxHeight=function(t){return this.withOptions({maxHeight:t})},r.minHeight=function(t){return this.withOptions({minHeight:t})},r.size=function(t,e){return this.withOptions({width:t,height:e})},r.blur=function(t){return this.withOptions({blur:t})},r.sharpen=function(t){return this.withOptions({sharpen:t})},r.rect=function(t,e,r,n){return this.withOptions({rect:{left:t,top:e,width:r,height:n}})},r.format=function(t){return this.withOptions({format:t})},r.invert=function(t){return this.withOptions({invert:t})},r.orientation=function(t){return this.withOptions({orientation:t})},r.quality=function(t){return this.withOptions({quality:t})},r.forceDownload=function(t){return this.withOptions({download:t})},r.flipHorizontal=function(){return this.withOptions({flipHorizontal:!0})},r.flipVertical=function(){return this.withOptions({flipVertical:!0})},r.ignoreImageParams=function(){return this.withOptions({ignoreImageParams:!0})},r.fit=function(t){if(-1===w.indexOf(t))throw new Error('Invalid fit mode "'+t+'"');return this.withOptions({fit:t})},r.crop=function(t){if(-1===g.indexOf(t))throw new Error('Invalid crop mode "'+t+'"');return this.withOptions({crop:t})},r.saturation=function(t){return this.withOptions({saturation:t})},r.auto=function(t){if(-1===v.indexOf(t))throw new Error('Invalid auto mode "'+t+'"');return this.withOptions({auto:t})},r.pad=function(t){return this.withOptions({pad:t})},r.url=function(){return f(this.options)},r.toString=function(){return this.url()},e}();return x}()},33390:function(t,e,r){"use strict";function n(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];const o=t.length-1;return t.slice(0,o).reduce(((t,e,n)=>t+e+r[n]),"")+t[o]}r.d(e,{Z:function(){return n}})},60751:function(t){var e=function(t){return t.replace(/^\s+|\s+$/g,"")};t.exports=function(t){if(!t)return{};for(var r,n={},o=e(t).split("\n"),i=0;i<o.length;i++){var s=o[i],a=s.indexOf(":"),c=e(s.slice(0,a)).toLowerCase(),u=e(s.slice(a+1));"undefined"===typeof n[c]?n[c]=u:(r=n[c],"[object Array]"===Object.prototype.toString.call(r)?n[c].push(u):n[c]=[n[c],u])}return n}},30198:function(t,e,r){"use strict";r.d(e,{eI:function(){return Jr}});const n={timeout:!(typeof navigator>"u")&&"ReactNative"===navigator.product?6e4:12e4},o=function(t){const e={...n,..."string"==typeof t?{url:t}:t},{searchParams:r}=new URL(e.url,"http://localhost");if(e.timeout=i(e.timeout),e.query)for(const[n,i]of Object.entries(e.query))if(void 0!==i)if(Array.isArray(i))for(const t of i)r.append(n,t);else r.append(n,i);const[o]=e.url.split("?"),s=r.toString();return s&&(e.url=`${o}?${s}`),e.method=e.body&&!e.method?"POST":(e.method||"GET").toUpperCase(),e};function i(t){if(!1===t||0===t)return!1;if(t.connect||t.socket)return t;const e=Number(t);return isNaN(e)?i(n.timeout):{connect:e,socket:e}}const s=/^https?:\/\//i,a=function(t){if(!s.test(t.url))throw new Error(`"${t.url}" is not a valid URL`)};var c=r(60751);const u=["request","response","progress","error","abort"],h=["processOptions","validateOptions","interceptRequest","finalizeOptions","onRequest","onResponse","onError","onReturn","onHeaders"];function l(t,e){const r=[],n=h.reduce(((t,e)=>(t[e]=t[e]||[],t)),{processOptions:[o],validateOptions:[a]});function i(t){const r=u.reduce(((t,e)=>(t[e]=function(){const t=Object.create(null);let e=0;return{publish:function(e){for(const r in t)t[r](e)},subscribe:function(r){const n=e++;return t[n]=r,function(){delete t[n]}}}}(),t)),{}),o=(t=>function(e,r,...n){const o="onError"===e;let i=r;for(let s=0;s<t[e].length&&(i=(0,t[e][s])(i,...n),!o||i);s++);return i})(n),i=o("processOptions",t);o("validateOptions",i);const s={options:i,channels:r,applyMiddleware:o};let a;const c=r.request.subscribe((t=>{a=e(t,((e,n)=>((t,n,i)=>{let s=t,a=n;if(!s)try{a=o("onResponse",n,i)}catch(e){a=null,s=e}s=s&&o("onError",s,i),s?r.error.publish(s):a&&r.response.publish(a)})(e,n,t)))}));r.abort.subscribe((()=>{c(),a&&a.abort()}));const h=o("onReturn",r,s);return h===r&&r.request.publish(s),h}return i.use=function(t){if(!t)throw new Error("Tried to add middleware that resolved to falsey value");if("function"==typeof t)throw new Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");if(t.onReturn&&n.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 h.forEach((e=>{t[e]&&n[e].push(t[e])})),r.push(t),i},i.clone=()=>l(r,e),t.forEach(i.use),i}var p,d,f,m,y,w,g,v=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},b=(t,e,r)=>(v(t,e,"read from private field"),r?r.call(t):e.get(t)),E=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},O=(t,e,r,n)=>(v(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);class x{constructor(){this.readyState=0,this.responseType="",E(this,p,void 0),E(this,d,void 0),E(this,f,void 0),E(this,m,{}),E(this,y,void 0),E(this,w,{}),E(this,g,void 0)}open(t,e,r){O(this,p,t),O(this,d,e),O(this,f,""),this.readyState=1,this.onreadystatechange(),O(this,y,void 0)}abort(){b(this,y)&&b(this,y).abort()}getAllResponseHeaders(){return b(this,f)}setRequestHeader(t,e){b(this,m)[t]=e}setInit(t,e=!0){O(this,w,t),O(this,g,e)}send(t){const e="arraybuffer"!==this.responseType,r={...b(this,w),method:b(this,p),headers:b(this,m),body:t};"function"==typeof AbortController&&b(this,g)&&(O(this,y,new AbortController),typeof EventTarget<"u"&&b(this,y).signal instanceof EventTarget&&(r.signal=b(this,y).signal)),typeof document<"u"&&(r.credentials=this.withCredentials?"include":"omit"),fetch(b(this,d),r).then((t=>(t.headers.forEach(((t,e)=>{O(this,f,b(this,f)+`${e}: ${t}\r\n`)})),this.status=t.status,this.statusText=t.statusText,this.readyState=3,e?t.text():t.arrayBuffer()))).then((t=>{"string"==typeof t?this.responseText=t:this.response=t,this.readyState=4,this.onreadystatechange()})).catch((t=>{var e;"AbortError"!==t.name?null==(e=this.onerror)||e.call(this,t):this.onabort()}))}}p=new WeakMap,d=new WeakMap,f=new WeakMap,m=new WeakMap,y=new WeakMap,w=new WeakMap,g=new WeakMap;const _="function"==typeof XMLHttpRequest?"xhr":"fetch",T="xhr"===_?XMLHttpRequest:x,j=(t,e)=>{var r;const n=t.options,o=t.applyMiddleware("finalizeOptions",n),i={},s=t.applyMiddleware("interceptRequest",void 0,{adapter:_,context:t});if(s){const t=setTimeout(e,0,null,s);return{abort:()=>clearTimeout(t)}}let a=new T;a instanceof x&&"object"==typeof o.fetch&&a.setInit(o.fetch,null==(r=o.useAbortSignal)||r);const u=o.headers,h=o.timeout;let l=!1,p=!1,d=!1;if(a.onerror=t=>{y(new Error(`Request error while attempting to reach ${o.url}${t.lengthComputable?`(${t.loaded} of ${t.total} bytes transferred)`:""}`))},a.ontimeout=t=>{y(new Error(`Request timeout while attempting to reach ${o.url}${t.lengthComputable?`(${t.loaded} of ${t.total} bytes transferred)`:""}`))},a.onabort=()=>{m(!0),l=!0},a.onreadystatechange=()=>{h&&(m(),i.socket=setTimeout((()=>f("ESOCKETTIMEDOUT")),h.socket)),!l&&4===a.readyState&&0!==a.status&&function(){if(!(l||p||d)){if(0===a.status)return void y(new Error("Unknown XHR error"));m(),p=!0,e(null,{body:a.response||(""===a.responseType||"text"===a.responseType?a.responseText:""),url:o.url,method:o.method,headers:c(a.getAllResponseHeaders()),statusCode:a.status,statusMessage:a.statusText})}}()},a.open(o.method,o.url,!0),a.withCredentials=!!o.withCredentials,u&&a.setRequestHeader)for(const c in u)u.hasOwnProperty(c)&&a.setRequestHeader(c,u[c]);return o.rawBody&&(a.responseType="arraybuffer"),t.applyMiddleware("onRequest",{options:o,adapter:_,request:a,context:t}),a.send(o.body||null),h&&(i.connect=setTimeout((()=>f("ETIMEDOUT")),h.connect)),{abort:function(){l=!0,a&&a.abort()}};function f(e){d=!0,a.abort();const r=new Error("ESOCKETTIMEDOUT"===e?`Socket timed out on request to ${o.url}`:`Connection timed out on request to ${o.url}`);r.code=e,t.channels.error.publish(r)}function m(t){(t||l||a.readyState>=2&&i.connect)&&clearTimeout(i.connect),i.socket&&clearTimeout(i.socket)}function y(t){if(p)return;m(!0),p=!0,a=null;const r=t||new Error(`Network error while attempting to reach ${o.url}`);r.isNetworkError=!0,r.request=o,e(r)}};r(90676);function C(t){return"[object Object]"===Object.prototype.toString.call(t)}var k=r(46785).lW;Object.prototype.hasOwnProperty;Error;const M=typeof k>"u"?()=>!1:t=>k.isBuffer(t),I=["boolean","string","number"];function S(){return{processOptions:t=>{const e=t.body;return!e||"function"==typeof e.pipe||M(e)||-1===I.indexOf(typeof e)&&!Array.isArray(e)&&!function(t){var e,r;return!1!==C(t)&&(void 0===(e=t.constructor)||!1!==C(r=e.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))}(e)?t:Object.assign({},t,{body:JSON.stringify(t.body),headers:Object.assign({},t.headers,{"Content-Type":"application/json"})})}}}function R(t){return{onResponse:r=>{const n=r.headers["content-type"]||"",o=t&&t.force||-1!==n.indexOf("application/json");return r.body&&n&&o?Object.assign({},r,{body:e(r.body)}):r},processOptions:t=>Object.assign({},t,{headers:Object.assign({Accept:"application/json"},t.headers)})};function e(t){try{return JSON.parse(t)}catch(e){throw e.message=`Failed to parsed response body as JSON: ${e.message}`,e}}}let q={};typeof globalThis<"u"?q=globalThis:typeof window<"u"?q=window:typeof global<"u"?q=global:typeof self<"u"&&(q=self);var A=q;function P(t={}){const e=t.implementation||A.Observable;if(!e)throw new Error("`Observable` is not available in global scope, and no implementation was passed");return{onReturn:(t,r)=>new e((e=>(t.error.subscribe((t=>e.error(t))),t.progress.subscribe((t=>e.next(Object.assign({type:"progress"},t)))),t.response.subscribe((t=>{e.next(Object.assign({type:"response"},t)),e.complete()})),t.request.publish(r),()=>t.abort.publish())))}}const D=(t={})=>{const e=t.implementation||Promise;if(!e)throw new Error("`Promise` is not available in global scope, and no implementation was passed");return{onReturn:(r,n)=>new e(((e,o)=>{const i=n.options.cancelToken;i&&i.promise.then((t=>{r.abort.publish(t),o(t)})),r.error.subscribe(o),r.response.subscribe((r=>{e(t.onlyBody?r.body:r)})),setTimeout((()=>{try{r.request.publish(n)}catch(t){o(t)}}),0)}))}};class W{constructor(t){this.__CANCEL__=!0,this.message=t}toString(){return"Cancel"+(this.message?`: ${this.message}`:"")}}const U=class{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e=null;this.promise=new Promise((t=>{e=t})),t((t=>{this.reason||(this.reason=new W(t),e(this.reason))}))}};U.source=()=>{let t;return{token:new U((e=>{t=e})),cancel:t}};let N=U;D.Cancel=W,D.CancelToken=N,D.isCancel=t=>!(!t||null==t||!t.__CANCEL__);var z=(t,e,r)=>("GET"===r.method||"HEAD"===r.method)&&(t.isNetworkError||!1);function H(t){return 100*Math.pow(2,t)+100*Math.random()}((t={})=>(t=>{const e=t.maxRetries||5,r=t.retryDelay||H,n=t.shouldRetry;return{onError:(t,o)=>{const i=o.options,s=i.maxRetries||e,a=i.shouldRetry||n,c=i.attemptNumber||0;if(null!==(u=i.body)&&"object"==typeof u&&"function"==typeof u.pipe||!a(t,c,i)||c>=s)return t;var u;const h=Object.assign({},o,{options:Object.assign({},i,{attemptNumber:c+1})});return setTimeout((()=>o.channels.request.publish(h)),r(c)),null}}})({shouldRetry:z,...t})).shouldRetry=z;$=function(t){return{}};var $,L=r(51726);function B(t){return"function"===typeof t}function F(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var V=F((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function J(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var Y=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var t,e,r,n,o;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var s=(0,L.__values)(i),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(d){t={error:d}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else i.remove(this);var c=this.initialTeardown;if(B(c))try{c()}catch(f){o=f instanceof V?f.errors:[f]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var h=(0,L.__values)(u),l=h.next();!l.done;l=h.next()){var p=l.value;try{X(p)}catch(m){o=null!==o&&void 0!==o?o:[],m instanceof V?o=(0,L.__spreadArray)((0,L.__spreadArray)([],(0,L.__read)(o)),(0,L.__read)(m.errors)):o.push(m)}}}catch(y){r={error:y}}finally{try{l&&!l.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}}if(o)throw new V(o)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)X(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&J(e,t)},t.prototype.remove=function(e){var r=this._finalizers;r&&J(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}();Y.EMPTY;function G(t){return t instanceof Y||t&&"closed"in t&&B(t.remove)&&B(t.add)&&B(t.unsubscribe)}function X(t){B(t)?t():t.unsubscribe()}var K={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Z={setTimeout:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=Z.delegate;return(null===o||void 0===o?void 0:o.setTimeout)?o.setTimeout.apply(o,(0,L.__spreadArray)([t,e],(0,L.__read)(r))):setTimeout.apply(void 0,(0,L.__spreadArray)([t,e],(0,L.__read)(r)))},clearTimeout:function(t){var e=Z.delegate;return((null===e||void 0===e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Q(){}var tt=et("C",void 0,void 0);function et(t,e,r){return{kind:t,value:e,error:r}}var rt=null;var nt=function(t){function e(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,G(e)&&e.add(r)):r.destination=ht,r}return(0,L.__extends)(e,t),e.create=function(t,e,r){return new at(t,e,r)},e.prototype.next=function(t){this.isStopped?ut(function(t){return et("N",t,void 0)}(t),this):this._next(t)},e.prototype.error=function(t){this.isStopped?ut(et("E",void 0,t),this):(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped?ut(tt,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Y),ot=Function.prototype.bind;function it(t,e){return ot.call(t,e)}var st=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(r){ct(r)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(r){ct(r)}else ct(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){ct(e)}},t}(),at=function(t){function e(e,r,n){var o,i,s=t.call(this)||this;B(e)||!e?o={next:null!==e&&void 0!==e?e:void 0,error:null!==r&&void 0!==r?r:void 0,complete:null!==n&&void 0!==n?n:void 0}:s&&K.useDeprecatedNextContext?((i=Object.create(e)).unsubscribe=function(){return s.unsubscribe()},o={next:e.next&&it(e.next,i),error:e.error&&it(e.error,i),complete:e.complete&&it(e.complete,i)}):o=e;return s.destination=new st(o),s}return(0,L.__extends)(e,t),e}(nt);function ct(t){var e;K.useDeprecatedSynchronousErrorHandling?(e=t,K.useDeprecatedSynchronousErrorHandling&&rt&&(rt.errorThrown=!0,rt.error=e)):function(t){Z.setTimeout((function(){var e=K.onUnhandledError;if(!e)throw t;e(t)}))}(t)}function ut(t,e){var r=K.onStoppedNotification;r&&Z.setTimeout((function(){return r(t,e)}))}var ht={closed:!0,next:Q,error:function(t){throw t},complete:Q},lt="function"===typeof Symbol&&Symbol.observable||"@@observable";function pt(t){return t}function dt(t){return 0===t.length?pt:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var ft=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n,o=this,i=(n=t)&&n instanceof nt||function(t){return t&&B(t.next)&&B(t.error)&&B(t.complete)}(n)&&G(n)?t:new at(t,e,r);return function(t){if(K.useDeprecatedSynchronousErrorHandling){var e=!rt;if(e&&(rt={errorThrown:!1,error:null}),t(),e){var r=rt,n=r.errorThrown,o=r.error;if(rt=null,n)throw o}}else t()}((function(){var t=o,e=t.operator,r=t.source;i.add(e?e.call(i,r):r?o._subscribe(i):o._trySubscribe(i))})),i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=mt(e))((function(e,n){var o=new at({next:function(e){try{t(e)}catch(r){n(r),o.unsubscribe()}},error:n,complete:e});r.subscribe(o)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[lt]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return dt(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=mt(t))((function(t,r){var n;e.subscribe((function(t){return n=t}),(function(t){return r(t)}),(function(){return t(n)}))}))},t.create=function(e){return new t(e)},t}();function mt(t){var e;return null!==(e=null!==t&&void 0!==t?t:K.Promise)&&void 0!==e?e:Promise}var yt=F((function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}}));function wt(t,e){var r="object"===typeof e;return new Promise((function(n,o){var i,s=!1;t.subscribe({next:function(t){i=t,s=!0},error:o,complete:function(){s?n(i):r?n(e.defaultValue):o(new yt)}})}))}function gt(t){return function(e){if(function(t){return B(null===t||void 0===t?void 0:t.lift)}(e))return e.lift((function(e){try{return t(e,this)}catch(r){this.error(r)}}));throw new TypeError("Unable to lift unknown Observable type")}}function vt(t,e,r,n,o){return new bt(t,e,r,n,o)}var bt=function(t){function e(e,r,n,o,i,s){var a=t.call(this,e)||this;return a.onFinalize=i,a.shouldUnsubscribe=s,a._next=r?function(t){try{r(t)}catch(n){e.error(n)}}:t.prototype._next,a._error=o?function(t){try{o(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,a._complete=n?function(){try{n()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,a}return(0,L.__extends)(e,t),e.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}},e}(nt);function Et(t,e){return gt((function(r,n){var o=0;r.subscribe(vt(n,(function(r){n.next(t.call(e,r,o++))})))}))}function Ot(t,e){return gt((function(r,n){var o=0;r.subscribe(vt(n,(function(r){return t.call(e,r,o++)&&n.next(r)})))}))}class xt extends Error{constructor(t){const e=Tt(t);super(e.message),this.statusCode=400,Object.assign(this,e)}}class _t extends Error{constructor(t){const e=Tt(t);super(e.message),this.statusCode=500,Object.assign(this,e)}}function Tt(t){const e=t.body,r={response:t,statusCode:t.statusCode,responseBody:Ct(e,t),message:"",details:void 0};if(e.error&&e.message)return r.message="".concat(e.error," - ").concat(e.message),r;if(function(t){return jt(t)&&jt(t.error)&&"mutationError"===t.error.type&&"string"===typeof t.error.description}(e)){const t=e.error.items||[],n=t.slice(0,5).map((t=>{var e;return null==(e=t.error)?void 0:e.description})).filter(Boolean);let o=n.length?":\n- ".concat(n.join("\n- ")):"";return t.length>5&&(o+="\n...and ".concat(t.length-5," more")),r.message="".concat(e.error.description).concat(o),r.details=e.error,r}return e.error&&e.error.description?(r.message=e.error.description,r.details=e.error,r):(r.message=e.error||e.message||function(t){const e=t.statusMessage?" ".concat(t.statusMessage):"";return"".concat(t.method,"-request to ").concat(t.url," resulted in HTTP ").concat(t.statusCode).concat(e)}(t),r)}function jt(t){return"object"===typeof t&&null!==t&&!Array.isArray(t)}function Ct(t,e){return-1!==(e.headers["content-type"]||"").toLowerCase().indexOf("application/json")?JSON.stringify(t,null,2):t}const kt={onResponse:t=>{if(t.statusCode>=500)throw new _t(t);if(t.statusCode>=400)throw new xt(t);return t}},Mt={onResponse:t=>{const e=t.headers["x-sanity-warning"];return(Array.isArray(e)?e:[e]).filter(Boolean).forEach((t=>console.warn(t))),t}};const It="X-Sanity-Project-ID";function St(t){if("string"===typeof t||Array.isArray(t))return{id:t};if("object"===typeof t&&null!==t&&"query"in t&&"string"===typeof t.query)return"params"in t&&"object"===typeof t.params&&null!==t.params?{query:t.query,params:t.params}:{query:t.query};const e=["* Document ID (<docId>)","* Array of document IDs","* Object containing `query`"].join("\n");throw new Error("Unknown selection - must be one of:\n\n".concat(e))}const Rt=["image","file"],qt=["before","after","replace"],At=t=>{if(!/^(~[a-z0-9]{1}[-\w]{0,63}|[a-z0-9]{1}[-\w]{0,63})$/.test(t))throw new Error("Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters")},Pt=t=>{if(-1===Rt.indexOf(t))throw new Error("Invalid asset type: ".concat(t,". Must be one of ").concat(Rt.join(", ")))},Dt=(t,e)=>{if(null===e||"object"!==typeof e||Array.isArray(e))throw new Error("".concat(t,"() takes an object of properties"))},Wt=(t,e)=>{if("string"!==typeof e||!/^[a-z0-9_][a-z0-9_.-]{0,127}$/i.test(e)||e.includes(".."))throw new Error("".concat(t,'(): "').concat(e,'" is not a valid document ID'))},Ut=(t,e)=>{if(!e._id)throw new Error("".concat(t,'() requires that the document contains an ID ("_id" property)'));Wt(t,e._id)},Nt=t=>{if(!t.dataset)throw new Error("`dataset` must be provided to perform queries");return t.dataset||""},zt=t=>{if("string"!==typeof t||!/^[a-z0-9._-]{1,75}$/i.test(t))throw new Error("Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.");return t},Ht=t=>{let{query:e,params:r={},options:n={}}=t;const o=new URLSearchParams,{tag:i,...s}=n;i&&o.set("tag",i),o.set("query",e);for(const[a,c]of Object.entries(r))o.set("$".concat(a),JSON.stringify(c));for(const[a,c]of Object.entries(s))c&&o.set(a,"".concat(c));return"?".concat(o)};var $t,Lt,Bt=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},Ft=(t,e,r)=>(Bt(t,e,"read from private field"),r?r.call(t):e.get(t)),Vt=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Jt=(t,e,r,n)=>(Bt(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);class Yt{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.selection=t,this.operations=e}set(t){return this._assign("set",t)}setIfMissing(t){return this._assign("setIfMissing",t)}diffMatchPatch(t){return Dt("diffMatchPatch",t),this._assign("diffMatchPatch",t)}unset(t){if(!Array.isArray(t))throw new Error("unset(attrs) takes an array of attributes to unset, non-array given");return this.operations=Object.assign({},this.operations,{unset:t}),this}inc(t){return this._assign("inc",t)}dec(t){return this._assign("dec",t)}insert(t,e,r){return((t,e,r)=>{const n="insert(at, selector, items)";if(-1===qt.indexOf(t)){const t=qt.map((t=>'"'.concat(t,'"'))).join(", ");throw new Error("".concat(n,' takes an "at"-argument which is one of: ').concat(t))}if("string"!==typeof e)throw new Error("".concat(n,' takes a "selector"-argument which must be a string'));if(!Array.isArray(r))throw new Error("".concat(n,' takes an "items"-argument which must be an array'))})(t,e,r),this._assign("insert",{[t]:e,items:r})}append(t,e){return this.insert("after","".concat(t,"[-1]"),e)}prepend(t,e){return this.insert("before","".concat(t,"[0]"),e)}splice(t,e,r,n){const o=e<0?e-1:e,i="undefined"===typeof r||-1===r?-1:Math.max(0,e+r),s=o<0&&i>=0?"":i,a="".concat(t,"[").concat(o,":").concat(s,"]");return this.insert("replace",a,n||[])}ifRevisionId(t){return this.operations.ifRevisionID=t,this}serialize(){return{...St(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(t,e){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return Dt(t,e),this.operations=Object.assign({},this.operations,{[t]:Object.assign({},r&&this.operations[t]||{},e)}),this}_set(t,e){return this._assign(t,e,!1)}}const Gt=class extends Yt{constructor(t,e,r){super(t,e),Vt(this,$t,void 0),Jt(this,$t,r)}clone(){return new Gt(this.selection,{...this.operations},Ft(this,$t))}commit(t){if(!Ft(this,$t))throw new Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");const e="string"===typeof this.selection,r=Object.assign({returnFirst:e,returnDocuments:!0},t);return Ft(this,$t).mutate({patch:this.serialize()},r)}};let Xt=Gt;$t=new WeakMap;const Kt=class extends Yt{constructor(t,e,r){super(t,e),Vt(this,Lt,void 0),Jt(this,Lt,r)}clone(){return new Kt(this.selection,{...this.operations},Ft(this,Lt))}commit(t){if(!Ft(this,Lt))throw new Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");const e="string"===typeof this.selection,r=Object.assign({returnFirst:e,returnDocuments:!0},t);return Ft(this,Lt).mutate({patch:this.serialize()},r)}};let Zt=Kt;Lt=new WeakMap;var Qt,te,ee=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},re=(t,e,r)=>(ee(t,e,"read from private field"),r?r.call(t):e.get(t)),ne=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},oe=(t,e,r,n)=>(ee(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);const ie={returnDocuments:!1};class se{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;this.operations=t,this.trxId=e}create(t){return Dt("create",t),this._add({create:t})}createIfNotExists(t){const e="createIfNotExists";return Dt(e,t),Ut(e,t),this._add({[e]:t})}createOrReplace(t){const e="createOrReplace";return Dt(e,t),Ut(e,t),this._add({[e]:t})}delete(t){return Wt("delete",t),this._add({delete:{id:t}})}transactionId(t){return t?(this.trxId=t,this):this.trxId}serialize(){return[...this.operations]}toJSON(){return this.serialize()}reset(){return this.operations=[],this}_add(t){return this.operations.push(t),this}}const ae=class extends se{constructor(t,e,r){super(t,r),ne(this,Qt,void 0),oe(this,Qt,e)}clone(){return new ae([...this.operations],re(this,Qt),this.trxId)}commit(t){if(!re(this,Qt))throw new Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return re(this,Qt).mutate(this.serialize(),Object.assign({transactionId:this.trxId},ie,t||{}))}patch(t,e){const r="function"===typeof e;if("string"!==typeof t&&t instanceof Zt)return this._add({patch:t.serialize()});if(r){const r=e(new Zt(t,{},re(this,Qt)));if(!(r instanceof Zt))throw new Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:t,...e}})}};let ce=ae;Qt=new WeakMap;const ue=class extends se{constructor(t,e,r){super(t,r),ne(this,te,void 0),oe(this,te,e)}clone(){return new ue([...this.operations],re(this,te),this.trxId)}commit(t){if(!re(this,te))throw new Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return re(this,te).mutate(this.serialize(),Object.assign({transactionId:this.trxId},ie,t||{}))}patch(t,e){const r="function"===typeof e;if("string"!==typeof t&&t instanceof Xt)return this._add({patch:t.serialize()});if(r){const r=e(new Xt(t,{},re(this,te)));if(!(r instanceof Xt))throw new Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:t,...e}})}};let he=ue;te=new WeakMap;const le=(t,e)=>!1===t?void 0:"undefined"===typeof t?e:t,pe=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{dryRun:t.dryRun,returnIds:!0,returnDocuments:le(t.returnDocuments,!0),visibility:t.visibility||"sync",autoGenerateArrayKeys:t.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:t.skipCrossDatasetReferenceValidation}},de=t=>"response"===t.type,fe=t=>t.body,me=(t,e)=>t.reduce(((t,r)=>(t[e(r)]=r,t)),Object.create(null));function ye(t,e,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const i=!1===o.filterResponse?t=>t:t=>t.result;return xe(t,e,"query",{query:r,params:n},o).pipe(Et(i))}function we(t,e,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o={uri:Ce(t,"doc",r),json:!0,tag:n.tag};return Te(t,e,o).pipe(Ot(de),Et((t=>t.body.documents&&t.body.documents[0])))}function ge(t,e,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o={uri:Ce(t,"doc",r.join(",")),json:!0,tag:n.tag};return Te(t,e,o).pipe(Ot(de),Et((t=>{const e=me(t.body.documents||[],(t=>t._id));return r.map((t=>e[t]||null))})))}function ve(t,e,r,n){return Ut("createIfNotExists",r),_e(t,e,r,"createIfNotExists",n)}function be(t,e,r,n){return Ut("createOrReplace",r),_e(t,e,r,"createOrReplace",n)}function Ee(t,e,r,n){return xe(t,e,"mutate",{mutations:[{delete:St(r)}]},n)}function Oe(t,e,r,n){let o;o=r instanceof Zt||r instanceof Xt?{patch:r.serialize()}:r instanceof ce||r instanceof he?r.serialize():r;return xe(t,e,"mutate",{mutations:Array.isArray(o)?o:[o],transactionId:n&&n.transactionId||void 0},n)}function xe(t,e,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const i="mutate"===r,s="query"===r,a=i?"":Ht(n),c=!i&&a.length<11264,u=c?a:"",h=o.returnFirst,{timeout:l,token:p,tag:d,headers:f}=o,m=Ce(t,r,u),y={method:c?"GET":"POST",uri:m,json:!0,body:c?void 0:n,query:i&&pe(o),timeout:l,headers:f,token:p,tag:d,canUseCdn:s,signal:o.signal};return Te(t,e,y).pipe(Ot(de),Et(fe),Et((t=>{if(!i)return t;const e=t.results||[];if(o.returnDocuments)return h?e[0]&&e[0].document:e.map((t=>t.document));const r=h?"documentId":"documentIds",n=h?e[0]&&e[0].id:e.map((t=>t.id));return{transactionId:t.transactionId,results:e,[r]:n}})))}function _e(t,e,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const i={[n]:r},s=Object.assign({returnFirst:!0,returnDocuments:!0},o);return xe(t,e,"mutate",{mutations:[i]},s)}function Te(t,e,r){const n=r.url||r.uri,o=t.config(),i="undefined"===typeof r.canUseCdn?["GET","HEAD"].indexOf(r.method||"GET")>=0&&0===n.indexOf("/data/"):r.canUseCdn,s=o.useCdn&&i,a=r.tag&&o.requestTagPrefix?[o.requestTagPrefix,r.tag].join("."):r.tag||o.requestTagPrefix;a&&(r.query={tag:zt(a),...r.query});const c=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={},n=e.token||t.token;n&&(r.Authorization="Bearer ".concat(n)),e.useGlobalApi||t.useProjectHostname||!t.projectId||(r[It]=t.projectId);const o=Boolean("undefined"===typeof e.withCredentials?t.token||t.withCredentials:e.withCredentials),i="undefined"===typeof e.timeout?t.timeout:e.timeout;return Object.assign({},e,{headers:Object.assign({},r,e.headers||{}),timeout:"undefined"===typeof i?3e5:i,proxy:e.proxy||t.proxy,json:!0,withCredentials:o})}(o,Object.assign({},r,{url:ke(t,n,s)})),u=new ft((t=>e(c,o.requester).subscribe(t)));return r.signal?u.pipe((h=r.signal,t=>new ft((e=>{const r=()=>e.error(function(t){var e,r;if(Me)return new DOMException(null!=(e=null==t?void 0:t.reason)?e:"The operation was aborted.","AbortError");const n=new Error(null!=(r=null==t?void 0:t.reason)?r:"The operation was aborted.");return n.name="AbortError",n}(h));if(h&&h.aborted)return void r();const n=t.subscribe(e);return h.addEventListener("abort",r),()=>{h.removeEventListener("abort",r),n.unsubscribe()}})))):u;var h}function je(t,e,r){return Te(t,e,r).pipe(Ot((t=>"response"===t.type)),Et((t=>t.body)))}function Ce(t,e,r){const n=t.config(),o=Nt(n),i="/".concat(e,"/").concat(o),s=r?"".concat(i,"/").concat(r):i;return"/data".concat(s).replace(/\/($|\?)/,"$1")}function ke(t,e){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{url:n,cdnUrl:o}=t.config(),i=r?o:n;return"".concat(i,"/").concat(e.replace(/^\//,""))}const Me=Boolean(globalThis.DOMException);var Ie,Se,Re,qe,Ae=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},Pe=(t,e,r)=>(Ae(t,e,"read from private field"),r?r.call(t):e.get(t)),De=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},We=(t,e,r,n)=>(Ae(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);class Ue{constructor(t,e){De(this,Ie,void 0),De(this,Se,void 0),We(this,Ie,t),We(this,Se,e)}upload(t,e,r){return ze(Pe(this,Ie),Pe(this,Se),t,e,r)}}Ie=new WeakMap,Se=new WeakMap;class Ne{constructor(t,e){De(this,Re,void 0),De(this,qe,void 0),We(this,Re,t),We(this,qe,e)}upload(t,e,r){return wt(ze(Pe(this,Re),Pe(this,qe),t,e,r).pipe(Ot((t=>"response"===t.type)),Et((t=>t.body.document))))}}function ze(t,e,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};Pt(r);let i=o.extract||void 0;i&&!i.length&&(i=["none"]);const s=Nt(t.config()),a="image"===r?"images":"files",c=He(o,n),{tag:u,label:h,title:l,description:p,creditLine:d,filename:f,source:m}=c,y={label:h,title:l,description:p,filename:f,meta:i,creditLine:d};return m&&(y.sourceId=m.id,y.sourceName=m.name,y.sourceUrl=m.url),Te(t,e,{tag:u,method:"POST",timeout:c.timeout||0,uri:"/assets/".concat(a,"/").concat(s),headers:c.contentType?{"Content-Type":c.contentType}:{},query:y,body:n})}function He(t,e){return"undefined"!==typeof File&&e instanceof File?Object.assign({filename:!1===t.preserveFilename?void 0:e.name,contentType:e.type},t):t}Re=new WeakMap,qe=new WeakMap;function $e(t){return"https://www.sanity.io/help/"+t}const Le=t=>function(t){let e,r=!1;return function(){return r||(e=t(...arguments),r=!0),e}}((function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return console.warn(t.join(" "),...r)})),Be=Le(["You are not using the Sanity CDN. That means your data is always fresh, but the CDN is faster and","cheaper. Think about it! For more info, see ".concat($e("js-client-cdn-configuration")," "),"To hide this warning, please set the `useCdn` option to either `true` or `false` when creating","the client."]),Fe=Le(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.","See ".concat($e("js-client-browser-token")," for more information and how to hide this warning.")]),Ve=Le(["Using the Sanity client without specifying an API version is deprecated.","See ".concat($e("js-client-api-version"))]),Je=(Le(["The default export of @sanity/client has been deprecated. Use the named export `createClient` instead"]),{apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0}),Ye=["localhost","127.0.0.1","0.0.0.0"],Ge=(t,e)=>{const r=Object.assign({},e,t);r.apiVersion||Ve();const n=Object.assign({},Je,r),o=n.useProjectHostname;if("undefined"===typeof Promise){const t=$e("js-client-promise-polyfill");throw new Error("No native Promise-implementation found, polyfill needed - see ".concat(t))}if(o&&!n.projectId)throw new Error("Configuration must contain `projectId`");const i="undefined"!==typeof window&&window.location&&window.location.hostname,s=i&&(t=>-1!==Ye.indexOf(t))(window.location.hostname);i&&s&&n.token&&!0!==n.ignoreBrowserTokenWarning?Fe():"undefined"===typeof n.useCdn&&Be(),o&&(t=>{if(!/^[-a-z0-9]+$/i.test(t))throw new Error("`projectId` can only contain only a-z, 0-9 and dashes")})(n.projectId),n.dataset&&At(n.dataset),"requestTagPrefix"in n&&(n.requestTagPrefix=n.requestTagPrefix?zt(n.requestTagPrefix).replace(/\.+$/,""):void 0),n.apiVersion="".concat(n.apiVersion).replace(/^v/,""),n.isDefaultApi=n.apiHost===Je.apiHost,n.useCdn=Boolean(n.useCdn)&&!n.withCredentials,function(t){if("1"===t||"X"===t)return;const e=new Date(t);if(!(/^\d{4}-\d{2}-\d{2}$/.test(t)&&e instanceof Date&&e.getTime()>0))throw new Error("Invalid API version string, expected `1` or date in format `YYYY-MM-DD`")}(n.apiVersion);const a=n.apiHost.split("://",2),c=a[0],u=a[1],h=n.isDefaultApi?"apicdn.sanity.io":u;return n.useProjectHostname?(n.url="".concat(c,"://").concat(n.projectId,".").concat(u,"/v").concat(n.apiVersion),n.cdnUrl="".concat(c,"://").concat(n.projectId,".").concat(h,"/v").concat(n.apiVersion)):(n.url="".concat(n.apiHost,"/v").concat(n.apiVersion),n.cdnUrl=n.url),n};var Xe=(t,e)=>Object.keys(e).concat(Object.keys(t)).reduce(((r,n)=>(r[n]="undefined"===typeof t[n]?e[n]:t[n],r)),{});const Ke=(t,e)=>e.reduce(((e,r)=>("undefined"===typeof t[r]||(e[r]=t[r]),e)),{}),Ze=["includePreviousRevision","includeResult","visibility","effectFormat","tag"],Qe={includeResult:!0};function tr(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{url:o,token:i,withCredentials:s,requestTagPrefix:a}=this.config(),c=n.tag&&a?[a,n.tag].join("."):n.tag,u={...Xe(n,Qe),tag:c},h=Ke(u,Ze),l=Ht({query:t,params:e,options:{tag:c,...h}}),p="".concat(o).concat(Ce(this,"listen",l));if(p.length>14800)return new ft((t=>t.error(new Error("Query too large for listener"))));const d=u.events?u.events:["mutation"],f=-1!==d.indexOf("reconnect"),m={};return(i||s)&&(m.withCredentials=!0),i&&(m.headers={Authorization:"Bearer ".concat(i)}),new ft((t=>{let e,n;h().then((t=>{e=t})).catch((e=>{t.error(e),y()}));let o=!1;function i(){o||(f&&t.next({type:"reconnect"}),o||e.readyState===e.CLOSED&&(u(),clearTimeout(n),n=setTimeout(l,100)))}function s(e){t.error(rr(e))}function a(e){const r=er(e);return r instanceof Error?t.error(r):t.next(r)}function c(){o=!0,u(),t.complete()}function u(){e&&(e.removeEventListener("error",i),e.removeEventListener("channelError",s),e.removeEventListener("disconnect",c),d.forEach((t=>e.removeEventListener(t,a))),e.close())}async function h(){const{default:t}=await r.e(39710).then(r.t.bind(r,39710,19)),e=new t(p,m);return e.addEventListener("error",i),e.addEventListener("channelError",s),e.addEventListener("disconnect",c),d.forEach((t=>e.addEventListener(t,a))),e}function l(){h().then((t=>{e=t})).catch((e=>{t.error(e),y()}))}function y(){o=!0,u()}return y}))}function er(t){try{const e=t.data&&JSON.parse(t.data)||{};return Object.assign({type:t.type},e)}catch(e){return e}}function rr(t){if(t instanceof Error)return t;const e=er(t);return e instanceof Error?e:new Error(function(t){if(!t.error)return t.message||"Unknown listener error";if(t.error.description)return t.error.description;return"string"===typeof t.error?t.error:JSON.stringify(t.error,null,2)}(e))}var nr,or,ir,sr,ar=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},cr=(t,e,r)=>(ar(t,e,"read from private field"),r?r.call(t):e.get(t)),ur=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},hr=(t,e,r,n)=>(ar(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);class lr{constructor(t,e){ur(this,nr,void 0),ur(this,or,void 0),hr(this,nr,t),hr(this,or,e)}create(t,e){return dr(cr(this,nr),cr(this,or),"PUT",t,e)}edit(t,e){return dr(cr(this,nr),cr(this,or),"PATCH",t,e)}delete(t){return dr(cr(this,nr),cr(this,or),"DELETE",t)}list(){return je(cr(this,nr),cr(this,or),{uri:"/datasets"})}}nr=new WeakMap,or=new WeakMap;class pr{constructor(t,e){ur(this,ir,void 0),ur(this,sr,void 0),hr(this,ir,t),hr(this,sr,e)}create(t,e){return wt(dr(cr(this,ir),cr(this,sr),"PUT",t,e))}edit(t,e){return wt(dr(cr(this,ir),cr(this,sr),"PATCH",t,e))}delete(t){return wt(dr(cr(this,ir),cr(this,sr),"DELETE",t))}list(){return wt(je(cr(this,ir),cr(this,sr),{uri:"/datasets"}))}}function dr(t,e,r,n,o){return At(n),je(t,e,{method:r,uri:"/datasets/".concat(n),body:o})}ir=new WeakMap,sr=new WeakMap;var fr,mr,yr,wr,gr=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},vr=(t,e,r)=>(gr(t,e,"read from private field"),r?r.call(t):e.get(t)),br=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Er=(t,e,r,n)=>(gr(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);class Or{constructor(t,e){br(this,fr,void 0),br(this,mr,void 0),Er(this,fr,t),Er(this,mr,e)}list(){return je(vr(this,fr),vr(this,mr),{uri:"/projects"})}getById(t){return je(vr(this,fr),vr(this,mr),{uri:"/projects/".concat(t)})}}fr=new WeakMap,mr=new WeakMap;class xr{constructor(t,e){br(this,yr,void 0),br(this,wr,void 0),Er(this,yr,t),Er(this,wr,e)}list(){return wt(je(vr(this,yr),vr(this,wr),{uri:"/projects"}))}getById(t){return wt(je(vr(this,yr),vr(this,wr),{uri:"/projects/".concat(t)}))}}yr=new WeakMap,wr=new WeakMap;var _r,Tr,jr,Cr,kr=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},Mr=(t,e,r)=>(kr(t,e,"read from private field"),r?r.call(t):e.get(t)),Ir=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Sr=(t,e,r,n)=>(kr(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);class Rr{constructor(t,e){Ir(this,_r,void 0),Ir(this,Tr,void 0),Sr(this,_r,t),Sr(this,Tr,e)}getById(t){return je(Mr(this,_r),Mr(this,Tr),{uri:"/users/".concat(t)})}}_r=new WeakMap,Tr=new WeakMap;class qr{constructor(t,e){Ir(this,jr,void 0),Ir(this,Cr,void 0),Sr(this,jr,t),Sr(this,Cr,e)}getById(t){return wt(je(Mr(this,jr),Mr(this,Cr),{uri:"/users/".concat(t)}))}}jr=new WeakMap,Cr=new WeakMap;var Ar,Pr,Dr,Wr,Ur=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},Nr=(t,e,r)=>(Ur(t,e,"read from private field"),r?r.call(t):e.get(t)),zr=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Hr=(t,e,r,n)=>(Ur(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);const $r=class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Je;zr(this,Ar,void 0),zr(this,Pr,void 0),this.listen=tr,this.config(e),Hr(this,Pr,t),this.assets=new Ue(this,Nr(this,Pr)),this.datasets=new lr(this,Nr(this,Pr)),this.projects=new Or(this,Nr(this,Pr)),this.users=new Rr(this,Nr(this,Pr))}clone(){return new $r(Nr(this,Pr),this.config())}config(t){if(void 0===t)return{...Nr(this,Ar)};if(Nr(this,Ar)&&!1===Nr(this,Ar).allowReconfigure)throw new Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return Hr(this,Ar,Ge(t,Nr(this,Ar)||{})),this}withConfig(t){return new $r(Nr(this,Pr),{...this.config(),...t})}fetch(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ye(this,Nr(this,Pr),t,e,r)}getDocument(t,e){return we(this,Nr(this,Pr),t,e)}getDocuments(t,e){return ge(this,Nr(this,Pr),t,e)}create(t,e){return _e(this,Nr(this,Pr),t,"create",e)}createIfNotExists(t,e){return ve(this,Nr(this,Pr),t,e)}createOrReplace(t,e){return be(this,Nr(this,Pr),t,e)}delete(t,e){return Ee(this,Nr(this,Pr),t,e)}mutate(t,e){return Oe(this,Nr(this,Pr),t,e)}patch(t,e){return new Xt(t,e,this)}transaction(t){return new he(t,this)}request(t){return je(this,Nr(this,Pr),t)}getUrl(t,e){return ke(this,t,e)}getDataUrl(t,e){return Ce(this,t,e)}};let Lr=$r;Ar=new WeakMap,Pr=new WeakMap;const Br=class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Je;zr(this,Dr,void 0),zr(this,Wr,void 0),this.listen=tr,this.config(e),Hr(this,Wr,t),this.assets=new Ne(this,Nr(this,Wr)),this.datasets=new pr(this,Nr(this,Wr)),this.projects=new xr(this,Nr(this,Wr)),this.users=new qr(this,Nr(this,Wr)),this.observable=new Lr(t,e)}clone(){return new Br(Nr(this,Wr),this.config())}config(t){if(void 0===t)return{...Nr(this,Dr)};if(Nr(this,Dr)&&!1===Nr(this,Dr).allowReconfigure)throw new Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.observable&&this.observable.config(t),Hr(this,Dr,Ge(t,Nr(this,Dr)||{})),this}withConfig(t){return new Br(Nr(this,Wr),{...this.config(),...t})}fetch(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return wt(ye(this,Nr(this,Wr),t,e,r))}getDocument(t,e){return wt(we(this,Nr(this,Wr),t,e))}getDocuments(t,e){return wt(ge(this,Nr(this,Wr),t,e))}create(t,e){return wt(_e(this,Nr(this,Wr),t,"create",e))}createIfNotExists(t,e){return wt(ve(this,Nr(this,Wr),t,e))}createOrReplace(t,e){return wt(be(this,Nr(this,Wr),t,e))}delete(t,e){return wt(Ee(this,Nr(this,Wr),t,e))}mutate(t,e){return wt(Oe(this,Nr(this,Wr),t,e))}patch(t,e){return new Zt(t,e,this)}transaction(t){return new ce(t,this)}request(t){return wt(je(this,Nr(this,Wr),t))}dataRequest(t,e,r){return wt(xe(this,Nr(this,Wr),t,e,r))}getUrl(t,e){return ke(this,t,e)}getDataUrl(t,e){return Ce(this,t,e)}};let Fr=Br;Dr=new WeakMap,Wr=new WeakMap;const Vr=function(t){const e=((t=[],e=j)=>l(t,e))([...t,Mt,S(),R(),{onRequest:t=>{if("xhr"!==t.adapter)return;const e=t.request,r=t.context;function n(t){return e=>{const n=e.lengthComputable?e.loaded/e.total*100:-1;r.channels.progress.publish({stage:t,percent:n,total:e.total,loaded:e.loaded,lengthComputable:e.lengthComputable})}}"upload"in e&&"onprogress"in e.upload&&(e.upload.onprogress=n("upload")),"onprogress"in e&&(e.onprogress=n("download"))}},kt,P({implementation:ft})]);function r(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return r({maxRedirects:0,...t})}return r.defaultRequester=e,r}([]),Jr=(Vr.defaultRequester,t=>new Fr(Vr,t))},52918:function(t,e,r){"use strict";function n(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}r.d(e,{Z:function(){return n}})}}]);
  2. //# sourceMappingURL=7245-2d3546b7bccd218a.js.map