1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="a4136886-91e3-e23f-c540-c185268e36d5")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,434222,e=>{"use strict";var t=e.i(328497),r=e.i(297865),i=e.i(226761),n=e.i(97552);e.s(["CompanyBrand",0,({company:e,className:s,priority:o,size:a="md",variant:u,logoType:l="auto",forceColor:c})=>{let h,d=e?.name,f=function(){let[e,t]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e=()=>{t(document.documentElement.classList.contains("dark"))};e();let r=new MutationObserver(e);return r.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>r.disconnect()},[]),e}(),p=u||(f?"onDark":"onLight"),g="onLight"===p?e?.logotypeOnLight:e?.logotypeOnDark,m="onLight"===p?e?.logotypeOnDark:e?.logotypeOnLight,v="onLight"===p?e?.iconOnLight:e?.iconOnDark,y="onLight"===p?e?.iconOnDark:e?.iconOnLight,b=e?.logo,w=!1;if(!(h="logotype"===l?g:"icon"===l?v:g||v)&&("logotype"===l?m&&(h=m,w=!0):"icon"===l?y&&(h=y,w=!0):m?(h=m,w=!0):y&&(h=y,w=!0)),h||(h=b),c&&(w=!0),!h)return null;let E={sm:{width:80,height:24},md:{width:120,height:32},lg:{width:149,height:40}},I=a?E[a].width:"auto",$=a?E[a].height:"auto";return(0,t.jsx)("div",{className:"flex items-center justify-center",children:(0,t.jsx)(i.default,{src:(0,n.urlForImage)(h).width(I).height($).fit("max").auto("format").url(),alt:h.alt||`${d} logo`,width:I,height:$,priority:o,className:s,style:{filter:w?"bright"===c?"brightness(0) saturate(100%) invert(43%) sepia(48%) saturate(1092%) hue-rotate(221deg) brightness(98%) contrast(84%)":"pink"===c?"brightness(0) saturate(100%) invert(94%) sepia(68%) saturate(830%) hue-rotate(196deg) brightness(103%) contrast(89%)":"brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(100%) contrast(100%)":"none"}})})}])},97552,284022,e=>{"use strict";e.i(133326);var t,r=e.i(679079),i=e.i(48937);function n(e){return"https://www.sanity.io/help/"+e}let s=["image","file"],o=["before","after","replace"],a=e=>{if(!/^(~[a-z0-9]{1}[-\w]{0,63}|[a-z0-9]{1}[-\w]{0,63})$/.test(e))throw Error("Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters")},u=(e,t)=>{if("object"!=typeof t||!t||Array.isArray(t))throw Error(`${e}() takes an object of properties`)},l=(e,t)=>{if("string"!=typeof t||!/^[a-z0-9_][a-z0-9_.-]{0,127}$/i.test(t)||t.includes(".."))throw Error(`${e}(): "${t}" is not a valid document ID`)},c=(e,t)=>{if(!t._id)throw Error(`${e}() requires that the document contains an ID ("_id" property)`);l(e,t._id)},h=(e,t)=>{if(!t._type)throw Error(`\`${e}()\` requires that the document contains a type (\`_type\` property)`);var r=t._type;if("string"!=typeof r)throw Error(`\`${e}()\`: \`${r}\` is not a valid document type`)},d=e=>{if(e.dataset)return e.dataset;let t=e.resource;if(t&&"dataset"===t.type){let e=t.id.split(".");if(2!==e.length)throw Error('Dataset resource ID must be in the format "project.dataset"');return e[1]}throw Error("`dataset` must be provided to perform queries")},f=e=>{if("string"!=typeof e||!/^[a-z0-9._-]{1,75}$/i.test(e))throw Error("Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.");return e},p=e=>{let t=e.resource;if(!t)throw Error("`resource` must be provided to perform resource queries");let{type:r,id:i}=t;switch(r){case"dataset":if(2!==i.split(".").length)throw Error('Dataset resource ID must be in the format "project.dataset"');return;case"dashboard":case"knowledge-base":case"media-library":case"canvas":return;default:throw Error(`Unsupported resource type: ${r.toString()}`)}},g=(e,t)=>{if(t.resource)throw Error(`\`${e}\` does not support resource-based operations`)},m=e=>{var t;let r,i;return t=(...t)=>console.warn(e.join(" "),...t),r=!1,(...e)=>(r||(i=t(...e),r=!0),i)},v=m(["Because you set `withCredentials` to true, we will override your `useCdn`","setting to be false since (cookie-based) credentials are never set on the CDN"]),y=m(["Since you haven't set a value for `useCdn`, we will deliver content using our","global, edge-cached API-CDN. If you wish to have content delivered faster, set","`useCdn: false` to use the Live API. Note: You may incur higher costs using the live API."]),b=m(["The Sanity client is configured with the `perspective` set to `drafts` or `previewDrafts`, which doesn't support the API-CDN.","The Live API will be used instead. Set `useCdn: false` in your configuration to hide this warning."]),w=m(["The `previewDrafts` perspective has been renamed to `drafts` and will be removed in a future API version"]),E=m(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.",`See ${n("js-client-browser-token")} for more information and how to hide this warning.`]),I=m(["You have configured Sanity client to use a token, but also provided `withCredentials: true`.","This is no longer supported - only token will be used - remove `withCredentials: true`."]),$=m(["Using the Sanity client without specifying an API version is deprecated.",`See ${n("js-client-api-version")}`]),O=(m(["The default export of @sanity/client has been deprecated. Use the named export `createClient` instead."]),m(["You have called `createVersion()` with a defined `document`.","If you are creating a version of a document that already exists, prefer providing `baseId` and `releaseId` instead."])),x=m(["The `uri` request option has been renamed to `url`.","Please update your co
2de to use `url` instead. Support for `uri` will be removed in a future version."]),C=m(["The `~experimental_resource` configuration property has been renamed to `resource`.","Please update your client configuration to use `resource` instead. Support for `~experimental_resource` will be removed in a future version."]),S={apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0,stega:{enabled:!1}},A=["localhost","127.0.0.1","0.0.0.0"];function j(e){if(Array.isArray(e)&&e.length>1&&e.includes("raw"))throw TypeError('Invalid API perspective value: "raw". The raw-perspective can not be combined with other perspectives')}let P=(e,t)=>{let r,i={...t,...e,stega:{..."boolean"==typeof t.stega?{enabled:t.stega}:t.stega||S.stega,..."boolean"==typeof e.stega?{enabled:e.stega}:e.stega||{}}};i.apiVersion||$();let s={...S,...i,apiHost:i.apiHost??S.apiHost};s["~experimental_resource"]&&!s.resource&&(C(),s.resource=s["~experimental_resource"]);let o=s.resource,u=s.useProjectHostname&&!o;if(typeof Promise>"u"){let e=n("js-client-promise-polyfill");throw Error(`No native Promise-implementation found, polyfill needed - see ${e}`)}if(u&&!s.projectId)throw Error("Configuration must contain `projectId`");if(o&&p(s),void 0!==s.perspective&&j(s.perspective),"encodeSourceMap"in s)throw Error("It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMap' is not supported in '@sanity/client'. Did you mean 'stega.enabled'?");if("encodeSourceMapAtPath"in s)throw Error("It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMapAtPath' is not supported in '@sanity/client'. Did you mean 'stega.filter'?");if("boolean"!=typeof s.stega.enabled)throw Error(`stega.enabled must be a boolean, received ${s.stega.enabled}`);if(s.stega.enabled&&void 0===s.stega.studioUrl)throw Error("stega.studioUrl must be defined when stega.enabled is true");if(s.stega.enabled&&"string"!=typeof s.stega.studioUrl&&"function"!=typeof s.stega.studioUrl)throw Error(`stega.studioUrl must be a string or a function, received ${s.stega.studioUrl}`);let l="u">typeof window&&window.location&&window.location.hostname,c=l&&(r=window.location.hostname,-1!==A.indexOf(r)),h=!!s.token;s.withCredentials&&h&&(I(),s.withCredentials=!1),l&&c&&h&&!0!==s.ignoreBrowserTokenWarning?E():void 0===s.useCdn&&y(),u&&(e=>{if(!/^[-a-z0-9]+$/i.test(e))throw Error("`projectId` can only contain only a-z, 0-9 and dashes")})(s.projectId),s.dataset&&a(s.dataset),"requestTagPrefix"in s&&(s.requestTagPrefix=s.requestTagPrefix?f(s.requestTagPrefix).replace(/\.+$/,""):void 0),s.apiVersion=`${s.apiVersion}`.replace(/^v/,""),s.isDefaultApi=s.apiHost===S.apiHost,!0===s.useCdn&&s.withCredentials&&v(),s.useCdn=!1!==s.useCdn&&!s.withCredentials,function(e){if("1"===e||"X"===e)return;let t=new Date(e);if(!(/^\d{4}-\d{2}-\d{2}$/.test(e)&&t instanceof Date&&t.getTime()>0))throw Error("Invalid API version string, expected `1` or date in format `YYYY-MM-DD`")}(s.apiVersion);let d=s.apiHost.split("://",2),g=d[0],m=d[1],b=s.isDefaultApi?"apicdn.sanity.io":m;return u?(s.url=`${g}://${s.projectId}.${m}/v${s.apiVersion}`,s.cdnUrl=`${g}://${s.projectId}.${b}/v${s.apiVersion}`):(s.url=`${s.apiHost}/v${s.apiVersion}`,s.cdnUrl=s.url),s};var T=e.i(870766),_=(e.i(96845),e.i(415843)),k=e.i(516165),M=e.i(633482),R=e.i(7560),D=e.i(866312);function U(e){return(0,D.operate)(function(t,r){var i,n=null,s=!1;n=t.subscribe((0,R.createOperatorSubscriber)(r,void 0,void 0,function(o){i=(0,M.innerFrom)(e(o,U(e)(t))),n?(n.unsubscribe(),n=null,i.subscribe(r)):s=!0})),s&&(n.unsubscribe(),n=null,i.subscribe(r))})}var q=e.i(544287),z=e.i(282519),L=e.i(187636),W=e.i(159862);function N(e){return(0,D.operate)(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}var F=e.i(827540),V=(0,e.i(949918).createErrorClass)(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function H(e,t){var r="object"==typeof t;return new Promise(function(i,n){var s,o=!1;e.subscribe({next:function(e){s=e,o=!0},error:n,complete:function(){o?i(s):r?i(t.defaultValue):n(new V)}})})}var B=e.i(913186),G=e.i(178480),X=e.i(806298);function Q(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(0,z.popScheduler)(e);return(0,L.from)(e,r)}var Y=e.i(134671),J=e.i(448971);function K(e,t){var r=(0,F.isFunction)(e)?e:function(){return e}
2,i=function(e){return e.error(r())};return new k.Observable(t?function(e){return t.schedule(i,0,e)}:i)}var Z=e.i(79357),ee=new(e.i(745491)).AsyncScheduler(Z.AsyncAction),et=(e.i(597961),e.i(73372)),er=e.i(974240),ei=e.i(469663),ei=ei,en=ei,es=ei,eo=ei,ea=e.i(80205);class eu extends Error{constructor(e,t){super(e),this.name="ParseError",this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}}function el(e,t,r){return 100===r&&97===e.charCodeAt(t+1)&&116===e.charCodeAt(t+2)&&97===e.charCodeAt(t+3)&&58===e.charCodeAt(t+4)}function ec(e,t,r){return 101===r&&118===e.charCodeAt(t+1)&&101===e.charCodeAt(t+2)&&110===e.charCodeAt(t+3)&&116===e.charCodeAt(t+4)&&58===e.charCodeAt(t+5)}function eh(e,t){let r=1;for(;r<e.length&&r<t.length;){if(e.charCodeAt(r)!==t.charCodeAt(r))return!1;r++}return e.length<=t.length||58===e.charCodeAt(t.length)}class ed extends Event{code;message;constructor(e,t){super(e),this.code=t?.code??void 0,this.message=t?.message??void 0}[Symbol.for("nodejs.util.inspect.custom")](e,t,r){return r(ef(this),t)}[Symbol.for("Deno.customInspect")](e,t){return e(ef(this),t)}}function ef(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}class ep extends EventTarget{static CONNECTING=0;static OPEN=1;static CLOSED=2;CONNECTING=0;OPEN=1;CLOSED=2;get readyState(){return this.#e}get url(){return this.#t.href}get withCredentials(){return this.#r}get onerror(){return this.#i}set onerror(e){this.#i&&this.removeEventListener("error",this.#i),this.#i=e,e&&this.addEventListener("error",e)}get onmessage(){return this.#n}set onmessage(e){this.#n&&this.removeEventListener("message",this.#n),this.#n=e,e&&this.addEventListener("message",e)}get onopen(){return this.#s}set onopen(e){this.#s&&this.removeEventListener("open",this.#s),this.#s=e,e&&this.addEventListener("open",e)}addEventListener(e,t,r){super.addEventListener(e,t,r)}removeEventListener(e,t,r){super.removeEventListener(e,t,r)}constructor(e,t){super();try{if(e instanceof URL)this.#t=e;else if("string"==typeof e)this.#t=new URL(e,function(){let e="document"in globalThis?globalThis.document:void 0;return e&&"object"==typeof e&&"baseURI"in e&&"string"==typeof e.baseURI?e.baseURI:void 0}());else throw Error("Invalid URL")}catch{throw function(e){let t=globalThis.DOMException;return"function"==typeof t?new t(e,"SyntaxError"):SyntaxError(e)}("An invalid or illegal string was specified")}this.#o=function(e){let t,r;if("function"==typeof e)throw TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");let{maxBufferSize:i,onComment:n,onError:s,onEvent:o,onId:a,onRetry:u}=e,l=[],c=0,h="",d="",f=0,p=!1,g=!1,m=!1;function v(e){if(e){if(13===e.charCodeAt(e.length-1)){E(e,0,e.length-1),m=!0;return}if(y(e)){l.push(e),c=e.length;return}g=!0}}function y(e){let t=e.charCodeAt(0);return 58===t&&!!n||100===t&&eh(e,"data")||101===t&&eh(e,"event")||105===t&&eh(e,"id")||114===t&&eh(e,"retry")}function b(){void 0===i||c+d.length<=i||(p=!0,l.length=0,c=0,t=void 0,d="",f=0,r=void 0,g=!1,m=!1,null==s||s(new eu(`Buffered data exceeded max buffer size of ${i} characters`,{type:"max-buffer-size-exceeded"})))}function w(e){let i=0;if(-1===e.indexOf("\r")){let n=e.indexOf("\n",i);for(;-1!==n;){if(i===n){void 0!==t&&(null==a||a(t)),f>0&&(null==o||o({id:t,event:r,data:d})),t=void 0,d="",f=0,r=void 0,i=n+1,n=e.indexOf("\n",i);continue}let s=e.charCodeAt(i);if(el(e,i,s)){let s=32===e.charCodeAt(i+5)?i+6:i+5,u=e.slice(s,n);if(0===f&&10===e.charCodeAt(n+1)){void 0!==t&&(null==a||a(t)),null==o||o({id:t,event:r,data:u}),t=void 0,d="",r=void 0,i=n+2,n=e.indexOf("\n",i);continue}d=0===f?u:`${d} 3${u}`,f++}else ec(e,i,s)?r=e.slice(32===e.charCodeAt(i+6)?i+7:i+6,n)||void 0:E(e,i,n);i=n+1,n=e.indexOf("\n",i)}return e.slice(i)}for(;i<e.length;){let t=e.indexOf("\r",i),r=e.indexOf("\n",i),n=-1;if(-1!==t&&-1!==r?n=t<r?t:r:-1!==t?n=t===e.length-1?-1:t:-1!==r&&(n=r),-1===n)break;E(e,i,n),i=n+1,13===e.charCodeAt(i-1)&&10===e.charCodeAt(i)&&i++}return e.slice(i)}function E(e,i,s){if(i===s)return void(void 0!==t&&(null==a||a(t)),f>0&&(null==o||o({id:t,event:r,data:d})),t=void 0,d="",f=0,r=void 0);let u=e.charCodeAt(i);if(el(e,i,u)){let t=32===e.charCodeAt(i+5)?i+6:i+5,r=e.slice(t,s);d=0===f?r:`${d} 4${r}`,f++;return}if(ec(e,i,u)){r=e.slice(32===e.charCodeAt(i+6)?i+7:i+6,s)||void 0;return}if(105===u&&100===e.charCodeAt(i+1)&&58===e.charCodeAt(i+2)){let r=e.slice(32===e.charCodeAt(i+3)?i+4:i+3,s);r.includes("\0")||(t=r);return}if(58===u){n&&n(e.slice(i,s).slice(32===e.charCodeAt(i+1)?2:1));return}let l=e.slice(i,s),c=l.indexOf(":");if(-1===c)return void I(l,"",l);let h=l.slice(0,c),p=32===l.charCodeAt(c+1)?2:1;I(h,l.slice(c+p),l)}function I(e,i,n){switch(e){case"event":r=i||void 0;break;case"data":d=0===f?i:`${d} 5${i}`,f++;break;case"id":i.includes("\0")||(t=i);break;case"retry":/^\d+$/.test(i)?null==u||u(parseInt(i,10)):null==s||s(new eu(`Invalid \`retry\` value: "${i}"`,{type:"invalid-retry",value:i,line:n}));break;default:null==s||s(new eu(`Unknown field "${e.length>20?`${e.slice(0,20)}â¦`:e}"`,{type:"unknown-field",field:e,value:i,line:n}))}}return{feed:function(e){if(p)throw Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");if(void 0!==h){if(""===(e=h+e)||"ï"===e||"ï»"===e){h=e;return}h=void 0,e=e.replace(/^(?:\uFEFF|\xEF\xBB\xBF)/,"")}if((g||m)&&!(e=function(e){if(0===e.length)return e;if(m)return m=!1,10===e.charCodeAt(0)?e.slice(1):e;let t=e.indexOf("\r"),r=e.indexOf("\n"),i=-1===t?r:-1===r||t<r?t:r;return -1===i?"":i===e.length-1&&13===e.charCodeAt(i)?(g=!1,m=!0,""):(g=!1,e.slice(i+(13===e.charCodeAt(i)&&10===e.charCodeAt(i+1)?2:1)))}(e)))return;if(!l.length){let t=w(e);""!==t&&v(t),b();return}if(-1===e.indexOf("\n")&&-1===e.indexOf("\r")){if(c<6&&!y(l.join("")+e.slice(0,6-c))){l.length=0,c=0,g=!0;return}l.push(e),c+=e.length,b();return}l.push(e);let t=l.join("");l.length=0,c=0,v(w(t)),b()},reset:function(e={}){if(e.consume&&l.length>0){let e=l.join("");E(e,0,e.length)}h="",t=void 0,d="",f=0,r=void 0,l.length=0,c=0,p=!1,g=!1,m=!1}}}({maxBufferSize:t?.maxBufferSize??0x6400000,onEvent:this.#a,onError:this.#u,onId:this.#l,onRetry:this.#c}),this.#e=this.CONNECTING,this.#h=3e3,this.#d=t?.fetch??globalThis.fetch,this.#r=t?.withCredentials??!1,this.#f()}close(){this.#p&&clearTimeout(this.#p),this.#e!==this.CLOSED&&(this.#g&&this.#g.abort(),this.#e=this.CLOSED,this.#g=void 0)}#e;#t;#m;#r;#d;#h;#p;#v=null;#g;#o;#i=null;#n=null;#s=null;#f(){this.#e=this.CONNECTING,this.#g=new AbortController,(0,this.#d)(this.#t,this.#y()).then(this.#b).catch(this.#w)}#b=async e=>{this.#o.reset();let{body:t,redirected:r,status:i,headers:n}=e;
5if(204===i){this.#E("Server sent HTTP 204, not reconnecting",204),this.close();return}if(r?this.#m=new URL(e.url):this.#m=void 0,200!==i)return void this.#E(`Non-200 status code (${i})`,i);if(!(n.get("content-type")||"").startsWith("text/event-stream"))return void this.#E('Invalid content type, expected "text/event-stream"',i);if(this.#e===this.CLOSED)return;this.#e=this.OPEN;let s=new Event("open");if(this.dispatchEvent(s),"object"!=typeof t||!t||!("getReader"in t)){this.#E("Invalid response body, expected a web ReadableStream",i),this.close();return}let o=new TextDecoder,a=t.getReader(),u=!0;do{let{done:e,value:t}=await a.read();if(this.#e===this.CLOSED){u=!1;break}if(t&&this.#o.feed(o.decode(t,{stream:!e})),!e)continue;u=!1,this.#o.reset(),this.#I()}while(u)};#w=e=>{this.#g=void 0,"AbortError"!==e.name&&"aborted"!==e.type&&this.#I(function e(t){return t instanceof Error?"errors"in t&&Array.isArray(t.errors)?t.errors.map(e).join(", "):"cause"in t&&t.cause instanceof Error?`${t}: ${e(t.cause)}`:t.message:`${t}`}(e))};#y(){let e={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...this.#v?{"Last-Event-ID":this.#v}:void 0},cache:"no-store",signal:this.#g?.signal};return"window"in globalThis&&(e.credentials=this.withCredentials?"include":"same-origin"),e}#l=e=>{this.#v=e};#a=e=>{let t=this.#m?this.#m.origin:this.#t.origin,r=this.#v??"",i=new MessageEvent(e.event||"message",{data:e.data,origin:t,lastEventId:r});i.origin!==t&&eg(i,"origin",t),i.lastEventId!==r&&eg(i,"lastEventId",r),this.dispatchEvent(i)};#c=e=>{this.#h=e};#u=e=>{"max-buffer-size-exceeded"===e.type&&(this.close(),this.#E(e.message))};#E(e,t){this.#e!==this.CLOSED&&(this.#e=this.CLOSED);let r=new ed("error",{code:t,message:e});this.dispatchEvent(r)}#I(e,t){if(this.#e===this.CLOSED)return;this.#e=this.CONNECTING;let r=new ed("error",{code:t,message:e});this.dispatchEvent(r);let i=setTimeout(this.#$,this.#h);"object"==typeof i&&null!==i&&"unref"in i&&i.unref(),this.#p=i}#$=()=>{this.#p=void 0,this.#e===this.CONNECTING&&this.#f()}}function eg(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0})}Object.defineProperty(ep,"name",{value:"EventSource"}),Object.defineProperty(ep,Symbol.for("eventsource.supports-fetch-override"),{value:!0,writable:!1,configurable:!1,enumerable:!1});var em=class extends Error{constructor(e,t={}){let{status:i,...n}=t;super(e,n),(0,r.u)(this,"name","ConnectionFailedError"),(0,r.u)(this,"status",void 0),this.status=i}},ev=class extends Error{constructor(e,t,i={}){super(e,i),(0,r.u)(this,"name","DisconnectError"),(0,r.u)(this,"reason",void 0),this.reason=t}},ey=class extends Error{constructor(e,t){super(e),(0,r.u)(this,"name","ChannelError"),(0,r.u)(this,"data",void 0),this.data=t}},eb=class extends Error{constructor(e,t,i={}){super(e,i),(0,r.u)(this,"name","MessageError"),(0,r.u)(this,"data",void 0),this.data=t}},ew=class extends Error{constructor(...e){super(...e),(0,r.u)(this,"name","MessageParseError")}};let eE=["channelError","disconnect"];function eI(e,t){return(0,W.defer)(()=>{let t=e();return t&&(t instanceof k.Observable||(0,F.isFunction)(t.lift)&&(0,F.isFunction)(t.subscribe))?t:Q(t)}).pipe((0,X.mergeMap)(e=>{var n,s;return n=e,s=t,new k.Observable(e=>{let t=new Set(s),o=t.has("open");function a(r){if("data"in r){let[t,n]=e$(r);e.error(t||!n?new ew("Unable to parse EventSource error message",{cause:t}):new eb((0,i.t)(n.data)&&"string"==typeof n.data.message?n.data.message:"",n));return}if(void 0!==r.code)return void e.error(new em("EventSource connection failed",{status:r.code}));if(n.readyState===n.CLOSED)e.error(new em("EventSource connection failed"));else{let r="reconnect";t.has(r)&&e.next({type:r})}}function u(){let r="open";t.has(r)&&e.next({type:r})}function l(s){let o,[a,u]=e$(s);if(a||!u)return void e.error(new ew("Unable to parse EventSource message",{cause:a}));if("channelError"===s.type){let t=new URL(n.url).searchParams.get("tag");e.error(new ey(function(e,t){let n=(0,i.t)(e)?e.error:void 0;if(!n){let t=(0,i.t)(e)?e.message:void 0;return"string"==typeof t&&t||"Unknown listener error"}if((0,i.t)(n)){if((0,r.l)(n))return(0,r.o)(n,t);if("string"==typeof n.description)return n.description}return"string"==typeof n?n:JSON.stringify(n,null,2)}(u?.data,t),u.data));return}"disconnect"===s.type?e.error(new ev(`Server disconnected client: ${(0,i.t)(u.data)&&"string"==typeof u.data.reason&&u.data.reason||"unknown error"}`)):(o=s.type,t.has(o)&&e.next({type:s.type,id:s.lastEventId,...u.data?{data:u.data}:{}}))}n.addEventListener("error",a),o&&n.addEventListener("open",u);let c=[...new Set([...eE,...s])].filter(e=>"error"!==e&&"open"!==e&&"reconnect"!==e);
5return c.forEach(e=>n.addEventListener(e,l)),()=>{n.removeEventListener("error",a),o&&n.removeEventListener("open",u),c.forEach(e=>n.removeEventListener(e,l)),n.close()}})}))}function e$(e){try{let t="string"==typeof e.data&&JSON.parse(e.data);return[null,{type:e.type,id:e.lastEventId,...!function(e){for(let t in e)return!1;return!0}(t)?{data:t}:{}}]}catch(e){return[e,null]}}function eO(e){if("string"==typeof e)return{id:e};if(Array.isArray(e))return{query:"*[_id in $ids]",params:{ids:e}};if("object"==typeof e&&e&&"query"in e&&"string"==typeof e.query)return"params"in e&&"object"==typeof e.params&&null!==e.params?{query:e.query,params:e.params}:{query:e.query};throw Error(`Unknown selection - must be one of: 6 7* Document ID (<docId>) 8* Array of document IDs 9* Object containing \`query\``)}function ex(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function eC(e,t,r){ex(e,t),t.set(e,r)}function eS(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw TypeError("Private element is not present on this object")}function eA(e,t,r){return e.set(eS(e,t),r),r}function ej(e,t){return e.get(eS(e,t))}var eP=class{constructor(e,t={}){(0,r.u)(this,"selection",void 0),(0,r.u)(this,"operations",void 0),this.selection=e,this.operations=t}set(e){return this._assign("set",e)}setIfMissing(e){return this._assign("setIfMissing",e)}diffMatchPatch(e){return u("diffMatchPatch",e),this._assign("diffMatchPatch",e)}unset(e){if(!Array.isArray(e))throw Error("unset(attrs) takes an array of attributes to unset, non-array given");return this.operations=Object.assign({},this.operations,{unset:e}),this}inc(e){return this._assign("inc",e)}dec(e){return this._assign("dec",e)}insert(e,t,r){return((e,t,r)=>{let i="insert(at, selector, items)";if(-1===o.indexOf(e)){let e=o.map(e=>`"${e}"`).join(", ");throw Error(`${i} takes an "at"-argument which is one of: ${e}`)}if("string"!=typeof t)throw Error(`${i} takes a "selector"-argument which must be a string`);if(!Array.isArray(r))throw Error(`${i} takes an "items"-argument which must be an array`)})(e,t,r),this._assign("insert",{[e]:t,items:r})}append(e,t){return this.insert("after",`${e}[-1]`,t)}prepend(e,t){return this.insert("before",`${e}[0]`,t)}splice(e,t,r,i){let n=t<0?t-1:t,s=void 0===r||-1===r?-1:Math.max(0,t+r),o=`${e}[${n}:${n<0&&s>=0?"":s}]`;return this.insert("replace",o,i||[])}ifRevisionId(e){return this.operations.ifRevisionID=e,this}serialize(){return{...eO(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(e,t,r=!0){return u(e,t),this.operations=Object.assign({},this.operations,{[e]:Object.assign({},r&&this.operations[e]||{},t)}),this}_set(e,t){return this._assign(e,t,!1)}},eT=new WeakMap,e_=class e extends eP{constructor(e,t,r){super(e,t),eC(this,eT,void 0),eA(eT,this,r)}clone(){return new e(this.selection,{...this.operations},ej(eT,this))}commit(e){if(!ej(eT,this))throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let t=Object.assign({returnFirst:"string"==typeof this.selection,returnDocuments:!0},e);return ej(eT,this).mutate({patch:this.serialize()},t)}},ek=new WeakMap,eM=class e extends eP{constructor(e,t,r){super(e,t),eC(this,ek,void 0),eA(ek,this,r)}clone(){return new e(this.selection,{...this.operations},ej(ek,this))}commit(e){if(!ej(ek,this))throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let t=Object.assign({returnFirst:"string"==typeof this.selection,returnDocuments:!0},e);return ej(ek,this).mutate({patch:this.serialize()},t)}};let eR={returnDocuments:!1};var eD=class{constructor(e=[],t){(0,r.u)(this,"operations",void 0),(0,r.u)(this,"trxId",void 0),this.operations=e,this.trxId=t}create(e){return u("create",e),this._add({create:e})}createIfNotExists(e){let t="createIfNotExists";return u(t,e),c(t,e),this._add({[t]:e})}createOrReplace(e){let t="createOrReplace";return u(t,e),c(t,e),this._add({[t]:e})}delete(e){return l("delete",e),this._add({delete:{id:e}})}transactionId(e){return e?(this.trxId=e,this):this.trxId}serialize(){return[...this.operations]}toJSON(){return this.serialize()}reset(){return this.operations=[],this}_add(e){return this.operations.push(e),this}},eU=new WeakMap,eq=class e extends eD{constructor(e,t,r){super(e,r),eC(this,eU,void 0),eA(eU,this,t)}clone(){return new e([...this.operations],ej(eU,this),this.trxId)}commit(e){if(!ej(eU,this))throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return ej(eU,this).mutate(this.serialize(),Object.assign({transactionId:this.trxId},eR,e||{}))}patch(e,t){let r="function"==typeof t,i="string"!=typeof e&&e instanceof eM,n="object"==typeof e&&("query"in e||"id"in e);if(i)return this._add({patch:e.serialize()});if(r){let r=t(new eM(e,{},ej(eU,this)));if(!(r instanceof eM))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}if(n){let r=new eM(e,t||{},ej(eU,this));return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}},ez=new WeakMap,eL=class e extends eD{constructor(e,t,r){super(e,r),eC(this,ez,void 0),eA(ez,this,t)}clone(){return new e([...this.operations],ej(ez,this),this.trxId)}commit(e){if(!ej(ez,this))throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return ej(ez,this).mutate(this.serialize(),Object.assign({transactionId:this.trxId},eR,e||{}))}patch(e,t){let r="function"==typeof t;if("string"!=typeof e&&e instanceof e_)return this._add({patch:e.serialize()});if(r){let r=t(new e_(e,{},ej(ez,this)));if(!(r instanceof e_))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}};
9let eW=["headers","signal","tag","timeout","token"],eN=({query:e,params:t={},options:r={}})=>{let i=new URLSearchParams,{tag:n,includeMutations:s,returnQuery:o,...a}=r;for(let[r,s]of(n&&i.append("tag",n),i.append("query",e),Object.entries(t)))void 0!==s&&i.append(`$${r}`,JSON.stringify(s));for(let[e,t]of Object.entries(a))t&&i.append(e,`${t}`);return!1===o&&i.append("returnQuery","false"),!1===s&&i.append("includeMutations","false"),`?${i}`};function eF(t,r,i,n,s={},o={}){let{stega:a,params:u,mapResponse:l,reqOpts:c}=function(e,t,r){let i="stega"in r?{...e,..."boolean"==typeof r.stega?{enabled:r.stega}:r.stega||{}}:e,n=i.enabled?(0,T.t)(t):t,s=!1===r.filterResponse?e=>e:e=>e.result,{cache:o,next:a,...u}={useAbortSignal:void 0!==r.signal,resultSourceMap:i.enabled?"withKeyArraySelector":r.resultSourceMap,...r,returnQuery:!1===r.filterResponse&&!1!==r.returnQuery};return{stega:i,params:n,mapResponse:s,reqOpts:void 0!==o||void 0!==a?{...u,fetch:{cache:o,next:a}}:u}}(i,s,o),h=eK(t,r,"query",{query:n,params:u},c);return a.enabled?Promise.all([h,e.A(289635).then(e=>e.n)]).then(([e,{stegaEncodeSourceMap:t}])=>{let r=t(e.result,e.resultSourceMap,a);return l({...e,result:r})}):h.then(l)}function eV(e,t,r,i={}){return ti(i.signal,n=>tn(e,t,eB(e,r,{...i,signal:n})).then(e=>eG(e,i.includeAllVersions)))}function eH(e,t,r,i={}){return tn(e,t,eB(e,r,i)).then(e=>eG(e,i.includeAllVersions))}function eB(e,t,r){let i=t;if(r.releaseId){let e=(0,ei.m)(t);if(e){if(e!==r.releaseId)throw Error(`The document ID (\`${t}\`) is already a version of \`${e}\` release, but this does not match the provided \`options.releaseId\` (\`${r.releaseId}\`)`)}else{if((0,es.g)(t))throw Error(`The document ID (\`${t}\`) is a draft, but \`options.releaseId\` is set as \`${r.releaseId}\``);i=(0,en.h)(t,r.releaseId)}}return{url:to(e,"doc",i),tag:r.tag,signal:r.signal,query:void 0===r.includeAllVersions?void 0:{includeAllVersions:r.includeAllVersions}}}function eG(e,t){let r=e.documents;return r?t?r:r[0]:t?[]:void 0}function eX(e,t,r,i={}){var n,s,o;return tn(e,t,(n=e,s=r,o=i,{url:to(n,"doc",s.join(",")),tag:o.tag,signal:o.signal})).then(e=>{var t,i;let n,s,o;return t=e,i=r,o=(n=t.documents||[],s=e=>e._id,n.reduce((e,t)=>(e[s(t)]=t,e),Object.create(null))),i.map(e=>o[e]||null)})}async function eQ(e,t,r,i={}){let n=new Set;if(0===r.length)return n;for(let s=0;s<r.length;s+=100){let o=r.slice(s,s+100),a=await tn(e,t,{url:to(e,"doc",o.map(encodeURIComponent).join(",")),tag:i.tag,signal:i.signal,query:{excludeContent:!0}}),u=new Set;for(let e of a.omitted||[])"existence"===e.reason&&u.add(e.id);for(let e of o)u.has(e)||n.add(e)}return n}function eY(e,t,r,i={}){return eK(e,t,"query",{query:"*[sanity::partOfRelease($releaseId)]",params:{releaseId:r}},i)}function eJ(e,t,r,i){return ti(i?.signal,n=>e0(e,t,r,{...i,signal:n}))}function eK(e,t,r,i,n={}){let{reqOptions:s,isMutation:o,returnFirst:a}=function(e,t,r,i={}){let n="mutate"===t,s="actions"===t,o="query"===t,a=n||s?"":eN(r),u=!n&&!s&&a.length<11264,l=u?a:"",c=i.returnFirst,{timeout:h,token:d,tag:f,headers:p,returnQuery:g,lastLiveEventId:m,cacheMode:v}=i;return{reqOptions:{method:u?"GET":"POST",url:to(e,t,l),body:u?void 0:r,query:n&&((e={})=>{let t;return{dryRun:e.dryRun,returnIds:!0,returnDocuments:(t=e.returnDocuments,!1===t?void 0:void 0===t||t),visibility:e.visibility||"sync",autoGenerateArrayKeys:e.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:e.skipCrossDatasetReferenceValidation}})(i),timeout:h,headers:p,token:d,tag:f,returnQuery:g,perspective:i.perspective,variant:i.variant,resultSourceMap:i.resultSourceMap,lastLiveEventId:Array.isArray(m)?m[0]:m,cacheMode:v,canUseCdn:o,signal:i.signal,fetch:i.fetch,useAbortSignal:i.useAbortSignal,useCdn:i.useCdn},isMutation:n,returnFirst:c}}(e,r,i,n);return tn(e,t,s).then(e=>(function(e,t,r,i){if(!t)return e;let n=e.results||[];if(i)return r?n[0]&&n[0].document:n.map(e=>e.document);let s=r?n[0]&&n[0].id:n.map(e=>e.id);return{transactionId:e.transactionId,results:n,[r?"documentId":"documentIds"]:s}})(e,o,a,n.returnDocuments))}function eZ(e,t,r,i,n={}){return eK(e,t,"mutate",{mutations:[{[i]:r}]},Object.assign({returnFirst:!0,returnDocuments:!0},n))}function e0(e,t,r,i){return eK(e,t,"actions",{actions:Array.isArray(r)?r:[r],transactionId:i&&i.transactionId||void 0,skipCrossDatasetReferenceValidation:i&&i.skipCrossDatasetReferenceValidation||void 0,dryRun:i&&i.dryRun||void 0},i)}function e1(e,t,r,i){let n;return eK(e,t,"mutate",{mutations:Array.isArray(n=r instanceof eM||r instanceof e_?{patch:r.serialize()}:r instanceof eq||r instanceof eL?r.serialize():r)?n:[n],transactionId:i&&i.transactionId||void 0},i)}
9function e2(e,t,r,i){return eK(e,t,"mutate",{mutations:[{delete:eO(r)}]},i)}function e8(e,t,r,i){return c("createIfNotExists",r),eZ(e,t,r,"createIfNotExists",i)}function e3(e,t,r,i){return c("createOrReplace",r),eZ(e,t,r,"createOrReplace",i)}function e4(e,t,r,i,n){return c("createVersion",r),h("createVersion",r),O(),e0(e,t,{actionType:"sanity.action.document.version.create",publishedId:i,document:r},n)}function e6(e,t,r,i,n,s,o){if(!i)throw Error("`createVersion()` requires `baseId` when no `document` is provided");if(!r)throw Error("`createVersion()` requires `publishedId` when `baseId` is provided");return l("createVersion",i),l("createVersion",r),e0(e,t,{actionType:"sanity.action.document.version.create",publishedId:r,baseId:i,versionId:n?(0,en.h)(r,n):(0,et.getDraftId)(r),ifBaseRevisionId:s},o)}function e5(e,t,r,i=!1,n){return e0(e,t,{actionType:"sanity.action.document.version.discard",versionId:r,purge:i},n)}function e9(e,t,r,i){return c("replaceVersion",r),h("replaceVersion",r),e0(e,t,{actionType:"sanity.action.document.version.replace",document:r},i)}function e7(e,t,r,i,n){return e0(e,t,{actionType:"sanity.action.document.version.unpublish",versionId:r,publishedId:i},n)}let te=e=>{let t=e.config();return void 0!==t.dataset&&void 0!==t.projectId||void 0!==t.resource},tt=(e,t)=>te(e)&&t.startsWith(to(e,"query"));function tr(e,t){void 0!==t.uri&&x();let r=t.uri||t.url;if("string"!=typeof r)throw TypeError("Request options must include a `url`");let i=e.config(),n=void 0===t.canUseCdn?["GET","HEAD"].indexOf(t.method||"GET")>=0&&(r.startsWith("/data/")||tt(e,r)||te(e)&&r.startsWith(to(e,"mutate"))||te(e)&&r.startsWith(to(e,"doc",""))||te(e)&&r.startsWith(to(e,"listen"))||te(e)&&r.startsWith(to(e,"history",""))):t.canUseCdn,s=(t.useCdn??i.useCdn)&&n,o=t.tag&&i.requestTagPrefix?[i.requestTagPrefix,t.tag].join("."):t.tag||i.requestTagPrefix;if(o&&null!==t.tag&&(t.query={tag:f(o),...t.query}),["GET","HEAD","POST"].indexOf(t.method||"GET")>=0&&tt(e,r)){let e=t.resultSourceMap??i.resultSourceMap;void 0!==e&&!1!==e&&(t.query={resultSourceMap:e,...t.query});let r=t.perspective||i.perspective;void 0!==r&&("previewDrafts"===r&&w(),j(r),t.query={perspective:Array.isArray(r)?r.join(","):r,...t.query},(Array.isArray(r)&&r.length>0||"previewDrafts"===r||"drafts"===r)&&s&&(s=!1,b()));let n=t.variant||i.variant;"string"==typeof n&&(t.query={variant:n,...t.query}),"object"==typeof n&&(t.query={variantCondition:Object.entries(n).map(([e,t])=>`${e}:${t}`).toSorted(),...t.query}),t.lastLiveEventId&&(t.query={...t.query,lastLiveEventId:t.lastLiveEventId}),!1===t.returnQuery&&(t.query={returnQuery:"false",...t.query}),s&&"noStale"==t.cacheMode&&(t.query={cacheMode:"noStale",...t.query})}return function(e,t={}){let r={};e.headers&&Object.assign(r,e.headers);let i=t.token||e.token;i&&(r.Authorization=`Bearer ${i}`),t.useGlobalApi||e.useProjectHostname||!e.projectId||(r["X-Sanity-Project-ID"]=e.projectId);let n={url:t.url,headers:Object.assign(r,t.headers||{})};t.method&&(n.method=t.method),void 0!==t.body&&(n.body=t.body),t.query&&(n.query=function(e){if(e instanceof URLSearchParams||!e||"object"!=typeof e||!Object.values(e).some(Array.isArray))return e;let t=new URLSearchParams;for(let[r,i]of Object.entries(e))if(null!=i)if(Array.isArray(i))for(let e of i)null!=e&&t.append(r,`${e}`);else t.append(r,`${i}`);return t}(t.query)),t.signal&&(n.signal=t.signal),(void 0===t.withCredentials?e.withCredentials:t.withCredentials)&&(n.credentials="include"),"number"==typeof t.maxRedirects&&(n.redirect=0===t.maxRedirects?"manual":"follow");let s=void 0===t.timeout?e.timeout:t.timeout;n.timeout=void 0===s?3e5:0!==s&&s,!1!==t.useAbortSignal||n.signal||(n.timeout="number"==typeof n.timeout&&n.timeout>0&&{total:n.timeout,signal:!1});let o="object"==typeof t.fetch&&"object"==typeof e.fetch?{...e.fetch,...t.fetch}:t.fetch||e.fetch;return"function"==typeof o?n.fetch=o:"object"==typeof o&&o&&(n.meta={...n.meta,fetchInit:o}),!n.fetch&&e.resolveFetch&&(n.fetch=e.resolveFetch("string"==typeof e.proxy?e.proxy:void 0)),"number"==typeof t.maxRetries&&(n.maxRetries=t.maxRetries),"string"==typeof e.lineage&&e.lineage&&(n.meta={...n.meta,lineage:e.lineage}),n}(i,Object.assign({},t,{url:ta(e,r,s)}))}function ti(e,t){return new k.Observable(r=>{let i=new AbortController;return t(e?(0,_.anySignal)([e,i.signal]):i.signal).then(e=>{r.next(e),r.complete()},e=>r.error(e)),()=>i.abort()})}function tn(e,t,r){return t(tr(e,r),e.config().requestHandler).then(e=>e)}function ts(e,t,r){return ti(r.signal,i=>tn(e,t,{...r,signal:i}))}function to(e,t,r){let i=e.config();if(i.resource)return p(i),`${tu(i)}/${void 0===r?t:`${t}/${r}`}`.replace(/\/($|\?)/,"$1");let n=`/${t}/${d(i)}`;return`/data${void 0===r?n:`${n}/${r}`}`.replace(/\/($|\?)/,"$1")}function ta(e,t,r=!1){let{url:i,cdnUrl:n}=e.config();return`${r?n:i}/${t.replace(/^\//,"")}`}let tu=e=>{let t=e.resource;if(!t)throw Error("`resource` must be provided to perform resource queries");let{type:r,id:i}=t;switch(r){case"dataset":{let e=i.split(".");if(2!==e.length)throw Error('Dataset ID must be in the format "project.dataset"');return`/projects/${e[0]}/datasets/${e[1]}`}case"canvas":return`/canvases/${i}`;case"knowledge-base":return`/knowledge-bases/${i}`;case"media-library":return`/media-libraries/${i}`;case"dashboard":return`/dashboards/${i}`;default:throw Error(`Unsupported resource type: ${r.toString()}`)}};var tl=new WeakMap,tc=new WeakMap,th=class{constructor(e,t){eC(this,tl,void 0),eC(this,tc,void 0),eA(tl,this,e),eA(tc,this,t)}generate(e){var t,r;return t=ej(tl,this),r=ej(tc,this),ts(t,r,{method:"POST",url:`/agent/action/generate/${d(t.config())}`,body:e})}transform(e){var t,r;return t=ej(tl,this),r=ej(tc,this),ts(t,r,{method:"POST",url:`/agent/action/transform/${d(t.config())}`,body:e})}translate(e){var t,r;return t=ej(tl,this),r=ej(tc,this),ts(t,r,{method:"POST",url:`/agent/action/translate/${d(t.config())}`,body:e})}},td=new WeakMap,tf=new WeakMap,tp=class{constructor(e,t){eC(this,td,void 0),eC(this,tf,void 0),eA(td,this,e),eA(tf,this,t)}generate(e){var t,r;return t=ej(td,this),r=ej(tf,this),tn(t,r,{method:"POST",url:`/agent/action/generate/${d(t.config())}`,body:e})}transform(e){var t,r;return t=ej(td,this),r=ej(tf,this),tn(t,r,{method:"POST",url:`/agent/action/transform/${d(t.config())}`,body:e})}translate(e){var t,r;return t=ej(td,this),r=ej(tf,this),tn(t,r,{method:"POST",url:`/agent/action/translate/${d(t.config())}`,body:e})}prompt(e){var t,r;return t=ej(td,this),r=ej(tf,this),tn(t,r,{method:"POST",url:`/agent/action/prompt/${d(t.config())}`,body:e})}patch(e){var t,r;return t=ej(td,this),r=ej(tf,this),tn(t,r,{method:"POST",url:`/agent/action/patch/${d(t.config())}`,body:e})}},tg=new WeakMap,tm=new WeakMap,tv=class{constructor(e,t){eC(this,tg,void 0),eC(this,tm,void 0),eA(tg,this,e),eA(tm,this,t)}upload(e,t,r){return tE(ej(tg,this),ej(tm,this),e,t,r)}},ty=new WeakMap,tb=new WeakMap,tw=class{constructor(e,t){eC(this,ty,void 0),eC(this,tb,void 0),eA(ty,this,e),eA(tb,this,t)}upload(e,t,r){return H(tE(ej(ty,this),ej(tb,this),e,t,r).pipe((0,ea.filter)(e=>"response"===e.type),(0,B.map)(e=>{var t;return"asset"in(t=e.body)?t.asset:t.document})))}};function tE(t,r,i,n,o={}){var a,u,l;let c,h,f;if(-1===s.indexOf(i))throw Error(`Invalid asset type: ${i}. Must be one of ${s.join(", ")}`);let p=o.extract||void 0;p&&!p.length&&(p=["none"]);let g=t.config(),m=(a=o,u=n,!(typeof File>"u")&&u instanceof File?Object.assign({filename:!1===a.preserveFilename?void 0:u.name,contentType:u.type},a):a),{tag:v,label:y,title:b,description:w,creditLine:E,filename:I,source:$}=m,O=g.resource?.type==="media-library",x=O?{title:b,filename:I}:{label:y,title:b,description:w,filename:I,meta:p,creditLine:E};$&&!O&&(x.sourceId=$.id,x.sourceName=$.name,x.sourceUrl=$.url);let C=m.contentType?{"Content-Type":m.contentType}:{},S={tag:v,method:"POST",timeout:m.timeout||0,url:function(e,t){let r="image"===t?"images":"files",i=e.resource;if(i){let{type:e,id:t}=i;
9switch(e){case"dataset":throw Error("Assets are not supported for dataset resources, yet. Configure the client with `{projectId: <projectId>, dataset: <datasetId>}` instead.");case"canvas":return`/canvases/${t}/assets/${r}`;case"knowledge-base":throw Error("Assets are not supported for knowledge-base resources. Use `client.context.imports` to add content instead.");case"media-library":return`/media-libraries/${t}/upload`;case"dashboard":return`/dashboards/${t}/assets/${r}`;default:throw Error(`Unsupported resource type: ${e.toString()}`)}}return`assets/${r}/${d(e)}`}(g,i),headers:C,query:x,body:n};return"u">typeof XMLHttpRequest?(0,W.defer)(async()=>{let{uploadWithProgress:r}=await e.A(996218),i=tr(t,{...S});return r({url:function(e,t){if(!t)return e;let r=(t instanceof URLSearchParams?t:new URLSearchParams(Object.entries(t).flatMap(([e,t])=>null==t?[]:[[e,`${t}`]]))).toString();return r?e+(e.includes("?")?"&":"?")+r:e}(i.url,i.query),method:i.method??"POST",headers:i.headers,body:n,withCredentials:"include"===i.credentials,timeout:"object"==typeof i.timeout?i.timeout.total:i.timeout,signal:i.signal})}).pipe((0,q.mergeAll)()):(c=tr(t,S),h=t.config().requester,f=new k.Observable(e=>h(c).subscribe(e)).pipe((0,ea.filter)(e=>e?.type==="progress"||e?.type==="response"),(0,B.map)(e=>"progress"===e.type?{type:"progress",stage:e.stage,percent:e.percent,total:e.total,loaded:e.loaded,lengthComputable:e.lengthComputable}:{type:"response",body:e.body})),S.signal?f.pipe((l=S.signal,e=>new k.Observable(t=>{let r=()=>{var e;return t.error((e=l,new DOMException(e?.reason??"The operation was aborted.","AbortError")))};if(l&&l.aborted)return void r();let i=e.subscribe(t);return l.addEventListener("abort",r),()=>{l.removeEventListener("abort",r),i.unsubscribe()}}))):f)}var tI=(e,t)=>Object.keys(t).concat(Object.keys(e)).reduce((r,i)=>(r[i]=void 0===e[i]?t[i]:e[i],r),{});let t$=(e,t)=>t.reduce((t,r)=>(void 0===e[r]||(t[r]=e[r]),t),{}),tO=new Set([408,429]);function tx(){return function(e){return e.pipe(U((e,t)=>{var r;return e instanceof em&&("number"!=typeof e.status||e.status<400||e.status>=500||tO.has(e.status))?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,q.mergeAll)(1)((0,L.from)(e,(0,z.popScheduler)(e)))}(Q({type:"reconnect"}),(void 0===r&&(r=ee),new k.Observable(function(e){var t=1e3;t<0&&(t=0);var i=0;return r.schedule(function(){e.closed||(e.next(i++),e.complete())},t)})).pipe((0,X.mergeMap)(()=>t))):K(()=>e)}))}}function tC(e,t={}){let r=t.headers,i=t.withCredentials?"include":void 0;return function(t,n){let s=tS(e),o={...n};if(r){let e=new Headers(n?.headers);for(let[t,i]of Object.entries(r))e.set(t,i);o.headers=e}return void 0!==i&&(o.credentials=i),s("string"==typeof t?t:t.href,o)}}function tS(e){return e.resolveFetch?e.resolveFetch("string"==typeof e.proxy?e.proxy:void 0):globalThis.fetch.bind(globalThis)}let tA=["includePreviousRevision","includeResult","includeMutations","includeAllVersions","visibility","effectFormat","enableResume","tag"],tj={includeResult:!0};function tP(e,t,r={}){let{url:i,requestTagPrefix:n}=this.config(),s=r.tag&&n?[n,r.tag].join("."):r.tag,o={...tI(r,tj),tag:s},a=eN({query:e,params:t,options:{tag:s,...t$(o,tA)}}),u=`${i}${to(this,"listen",a)}`;return u.length>14800?K(()=>Error("Query too large for listener")):tT(this,u,o.events?o.events:["mutation"])}function tT(e,t,r){let i=e.config(),{token:n,withCredentials:s,headers:o}=i,a={};return n&&(a.Authorization=`Bearer ${n}`),o&&Object.assign(a,o),eI(()=>new ep(t,{fetch:tC(i,{headers:Object.keys(a).length?a:void 0,withCredentials:s})}),r).pipe(tx(),(0,ea.filter)(e=>r.includes(e.type)),(0,B.map)(e=>({type:e.type,..."data"in e?e.data:{}})))}let t_=["headers","signal","tag","timeout","token"];function tk(e){if(!e)throw Error("Comment ID must be provided");return`/collaboration/comments/${encodeURIComponent(e)}`}function tM(e){let{resource:t,projectId:r,dataset:i}=e.config();if(t)return t;if(r&&i)return{type:"dataset",id:`${r}.${i}`};throw Error("`resource` or `projectId` and `dataset` must be configured to use collaboration comments")}
9function tR(e){let{collaboration:t}=e.config(),r=t?.organizationId;if(!r)throw Error("`collaboration.organizationId` must be configured to use collaboration comments");let i=tM(e);return{organizationId:r,resourceId:i.id,resourceType:i.type}}function tD(e,t){if(!t)throw Error("Document ID must be provided");let r=tM(e);return`${r.type}:${r.id}:${(0,er.getPublishedId)(t)}`}function tU(e,t,r,i,n,s={}){return ts(e,t,{method:r,url:i,body:n,query:{...tR(e),...s.transactionId?{transactionId:s.transactionId}:{}},...t$(s,t_)})}function tq(e,...t){return tU(...t).pipe((0,B.map)(({results:t})=>{let r=e?t.find(({id:t})=>t===e):t[0];if(!r?.document)throw Error("Comment write did not return a comment document");return r.document}))}function tz(e,t,r,i){return tq(r._id,e,t,"POST","/collaboration/comments",r,i)}function tL(e,t,r,i,n){return tq(r,e,t,"PATCH",tk(r),i,n)}function tW(e,t,r,i){return function(...e){return tU(...e).pipe((0,B.map)(({transactionId:e,results:t})=>({transactionId:e,documentIds:t.map(e=>e.id),results:t})))}(e,t,"DELETE",tk(r),void 0,i)}function tN(e,t,r,i,n){return tq(r,e,t,"POST",`${tk(r)}/reactions`,{shortName:i},n)}function tF(e,t,r,i,n){return tq(r,e,t,"DELETE",`${tk(r)}/reactions/${encodeURIComponent(i)}`,void 0,n)}function tV(e,t,r,i,n){let s=tR(e);return ts(e,t,{...eN({query:r,params:i}).length<11264?{method:"GET",url:`/collaboration/comments/query${eN({query:r,params:i,options:s})}`}:{method:"POST",url:"/collaboration/comments/query",query:s,body:{query:r,params:i??{}}},...t$(n||{},t_)}).pipe((0,B.map)(e=>e.result))}function tH(e,t,r,i){let n=i??{},{requestTagPrefix:s}=e.config(),o=n.tag&&s?[s,n.tag].join("."):n.tag,a=eN({query:t,params:r,options:{...t$({...tI(n,tj),tag:o},tA),...tR(e)}}),u=`${e.getUrl("/collaboration/comments/listen")}${a}`;return u.length>14800?K(()=>Error("Query too large for listener")):tT(e,u,n.events?n.events:["mutation"])}var tB=new WeakMap,tG=new WeakMap,tX=class{constructor(e,t){eC(this,tB,void 0),eC(this,tG,void 0),eA(tB,this,e),eA(tG,this,t)}create(e,t){return tz(ej(tB,this),ej(tG,this),e,t)}update(e,t,r){return tL(ej(tB,this),ej(tG,this),e,t,r)}delete(e,t){return tW(ej(tB,this),ej(tG,this),e,t)}addReaction(e,t,r){return tN(ej(tB,this),ej(tG,this),e,t,r)}removeReaction(e,t,r){return tF(ej(tB,this),ej(tG,this),e,t,r)}getTargetDocumentRef(e){return tD(ej(tB,this),e)}fetch(e,t,r){return tV(ej(tB,this),ej(tG,this),e,t,r)}listen(e,t,r){return tH(ej(tB,this),e,t,r)}},tQ=new WeakMap,tY=new WeakMap,tJ=class{constructor(e,t){eC(this,tQ,void 0),eC(this,tY,void 0),eA(tQ,this,e),eA(tY,this,t)}create(e,t){return H(tz(ej(tQ,this),ej(tY,this),e,t))}update(e,t,r){return H(tL(ej(tQ,this),ej(tY,this),e,t,r))}delete(e,t){return H(tW(ej(tQ,this),ej(tY,this),e,t))}addReaction(e,t,r){return H(tN(ej(tQ,this),ej(tY,this),e,t,r))}removeReaction(e,t,r){return H(tF(ej(tQ,this),ej(tY,this),e,t,r))}getTargetDocumentRef(e){return tD(ej(tQ,this),e)}fetch(e,t,r){return H(tV(ej(tQ,this),ej(tY,this),e,t,r))}listen(e,t,r){return tH(ej(tQ,this),e,t,r)}};function tK(e){let t=e.config().context?.organizationId;if(!t)throw Error("`context.organizationId` must be configured to query Context documents");return t}function tZ(e,t){return`/context/organizations/${encodeURIComponent(tK(e))}/${t}`}function t0(e,t,r,i,n){let s=tZ(e,"query");return ts(e,t,{...eN({query:r,params:i}).length<11264?{method:"GET",url:`${s}${eN({query:r,params:i})}`}:{method:"POST",url:s,body:{query:r,params:i??{}}},...t$(n||{},eW)}).pipe((0,B.map)(e=>e.result))}function t1(e,t,r,i){let n=i??{},{requestTagPrefix:s}=e.config(),o=n.tag&&s?[s,n.tag].join("."):n.tag,a=eN({query:t,params:r,options:t$({...tI(n,tj),tag:o},tA)}),u=`${e.getUrl(tZ(e,"listen"))}${a}`;return u.length>14800?K(()=>Error("Query too large for listener")):tT(e,u,n.events?n.events:["mutation"])}let t2="sanity.context.entry",t8="sanity.context.issue",t3="sanity.context.mcp";async function t4(e,t,r,i,n){let s=[],o;for(;;){let a=`*[${o?`${r} && (_createdAt > $c || (_createdAt == $c && _id > $i))`:r}] | order(_createdAt asc, _id asc) [0...200]`,u=await H(t0(e,t,a,o?{...i,...o}:i,n));if(s.push(...u),u.length<200)return s;let l=u[u.length-1];o={c:l._createdAt,i:l._id}}}function t6(e,t,r,i,n){return H(t0(e,t,`*[_type == "${t2}" && knowledgeBaseId == $kb && path == $path][0]`,{kb:r,path:i},n))}async function t5(e,t,r,i){let n=[],s="";for(;;){let o=await H(t0(e,t,`*[_type == "${t2}" && knowledgeBaseId == $kb && path > $after] | order(path asc) [0...200] {_id, path, title, tldr, status}`,{kb:r,after:s},i));if(n.push(...o),o.length<200)return n;s=o[o.length-1].path}}function t9(e,t,r,i,n){return t4(e,t,`_type == "${t8}" && knowledgeBaseId == $kb${void 0===i?"":" && status == $status"}`,void 0===i?{kb:r}:{kb:r,status:i},n)}function t7(e,t,r,i,n){return H(t0(e,t,`*[_type == "${t8}" && knowledgeBaseId == $kb && _id == $id][0]`,{kb:r,id:i},n))}
9function re(e,t,r,i){return t4(e,t,'_type == "sanity.context.instruction" && knowledgeBaseId == $kb && schemaVersion == 1',{kb:r},i)}function rt(e,t,r){return H(t0(e,t,`*[_type == "${t3}" && organizationId == $org] | order(_createdAt asc, _id asc) [0...500]`,{org:tK(e)},r))}function rr(e,t,r,i){var n,s;return n=`*[_type == "${t3}" && organizationId == $org && name == $name][0]`,s={org:tK(e),name:r},H(t0(e,t,n,s,i))}function ri(e,t,r,i){var n;return n={org:tK(e),threadId:r},H(t0(e,t,'*[_type == "sanity.context.conversation" && organizationId == $org && threadId == $threadId][0]',n,i))}let rn="/context/knowledge-bases";function rs(e){let t=e.config().resource;if(t?.type!=="knowledge-base")throw Error("`resource` of type `knowledge-base` must be configured to use knowledge-base methods");return t.id}function ro(e,t=""){return`${rn}/${encodeURIComponent(e)}${t}`}function ra(e,t){let r=e.config().context?.organizationId;if(!r)throw Error("`context.organizationId` must be configured to record conversations");if(!t)throw Error("`threadId` must be provided");return`/context/organizations/${encodeURIComponent(r)}/conversations/${encodeURIComponent(t)}`}function ru(e){return Object.fromEntries(Object.entries(e).flatMap(([e,t])=>void 0===t?[]:[[e,`${t}`]]))}var rl=new WeakMap,rc=new WeakMap,rh=new WeakSet,rd=class{constructor(e,t){(function(e,t){ex(e,t),t.add(e)})(this,rh),eC(this,rl,void 0),eC(this,rc,void 0),(0,r.u)(this,"knowledgeBases",{create:(e,t)=>tn(ej(rl,this),ej(rc,this),{url:rn,method:"POST",body:e,...t}),list:e=>tn(ej(rl,this),ej(rc,this),{url:rn,query:ru({organizationId:e.organizationId,cursor:e.cursor,limit:e.limit}),signal:e.signal,tag:e.tag}),get:(e,t)=>tn(ej(rl,this),ej(rc,this),{url:ro(e),...t}),edit:(e,t,r)=>tn(ej(rl,this),ej(rc,this),{url:ro(e),method:"PATCH",body:t,...r}),delete:async(e,t)=>{await tn(ej(rl,this),ej(rc,this),{url:ro(e),method:"DELETE",...t})}}),(0,r.u)(this,"conversations",{save:(e,t)=>{let{threadId:r,...i}=e;return tn(ej(rl,this),ej(rc,this),{url:ra(ej(rl,this),r),method:"PUT",body:i,...t})},classify:(e,t)=>{let{threadId:r,...i}=e;return tn(ej(rl,this),ej(rc,this),{url:ra(ej(rl,this),r),method:"PATCH",body:i,...t})},get:(e,t)=>ri(ej(rl,this),ej(rc,this),e.threadId,t)}),(0,r.u)(this,"imports",{create:(e,t)=>"file"===e.type?eS(rh,this,rg).call(this,e,t):eS(rh,this,rf).call(this,"/imports",{method:"POST",body:e,...t}),list:e=>eS(rh,this,rp).call(this,"/imports",e),get:(e,t)=>eS(rh,this,rf).call(this,`/imports/${encodeURIComponent(e.importId)}`,t),download:(e,t)=>eS(rh,this,rf).call(this,`/imports/${encodeURIComponent(e.importId)}/download`,t),delete:async(e,t)=>{await eS(rh,this,rf).call(this,`/imports/${encodeURIComponent(e.importId)}`,{method:"DELETE",...t})}}),(0,r.u)(this,"jobs",{get:(e,t)=>eS(rh,this,rf).call(this,`/jobs/${encodeURIComponent(e.jobId)}`,t)}),(0,r.u)(this,"issues",{list:(e,t)=>t9(ej(rl,this),ej(rc,this),rs(ej(rl,this)),e?.status,t),get:(e,t)=>t7(ej(rl,this),ej(rc,this),rs(ej(rl,this)),e.issueId,t),resolve:(e,t)=>{let{issueId:r,...i}=e;return eS(rh,this,rf).call(this,`/issues/${encodeURIComponent(r)}/resolve`,{method:"POST",body:i,...t})},dismiss:(e,t)=>eS(rh,this,rf).call(this,`/issues/${encodeURIComponent(e.issueId)}/dismiss`,{method:"POST",...t}),reopen:(e,t)=>eS(rh,this,rf).call(this,`/issues/${encodeURIComponent(e.issueId)}/reopen`,{method:"POST",...t}),apply:(e,t)=>eS(rh,this,rf).call(this,"/issues/apply",{method:"POST",body:e,...t})}),(0,r.u)(this,"instructions",{create:(e,t)=>eS(rh,this,rf).call(this,"/instructions",{method:"POST",body:e,...t}),list:e=>re(ej(rl,this),ej(rc,this),rs(ej(rl,this)),e),edit:(e,t)=>{let{instructionId:r,...i}=e;return eS(rh,this,rf).call(this,`/instructions/${encodeURIComponent(r)}`,{method:"PATCH",body:i,...t})},delete:async(e,t)=>{await eS(rh,this,rf).call(this,`/instructions/${encodeURIComponent(e.instructionId)}`,{method:"DELETE",...t})}}),(0,r.u)(this,"entries",{list:e=>t5(ej(rl,this),ej(rc,this),rs(ej(rl,this)),e),get:(e,t)=>t6(ej(rl,this),ej(rc,this),rs(ej(rl,this)),e.path,t),rebuild:(e,t)=>eS(rh,this,rf).call(this,`/entries/${encodeURIComponent(e.path)}/rebuild`,{method:"POST",...t})}),(0,r.u)(this,"mcpEndpoints",{list:e=>rt(ej(rl,this),ej(rc,this),e),get:(e,t)=>rr(ej(rl,this),ej(rc,this),e.name,t)}),(0,r.u)(this,"sources",{list:e=>
9eS(rh,this,rp).call(this,"/sources",e,{status:e?.status,importId:e?.importId,ids:e?.ids?.join(",")}),get:(e,t)=>eS(rh,this,rf).call(this,`/sources/${encodeURIComponent(e.sourceId)}`,t),content:(e,t)=>eS(rh,this,rf).call(this,`/sources/${encodeURIComponent(e.sourceId)}/content`,{query:ru({startLine:e.startLine,endLine:e.endLine}),...t}),delete:async(e,t)=>{await eS(rh,this,rf).call(this,`/sources/${encodeURIComponent(e.sourceId)}`,{method:"DELETE",...t})}}),eA(rl,this,e),eA(rc,this,t)}fetch(e,t,r){return H(t0(ej(rl,this),ej(rc,this),e,t,r))}listen(e,t,r){return t1(ej(rl,this),e,t,r)}build(e){return eS(rh,this,rf).call(this,"/build",{method:"POST",...e})}cancelBuild(e){return eS(rh,this,rf).call(this,"/build/cancel",{method:"POST",...e})}refresh(e){return eS(rh,this,rf).call(this,"/refresh",{method:"POST",...e})}};function rf(e,t={}){return tn(ej(rl,this),ej(rc,this),{url:ro(rs(ej(rl,this)),e),...t})}function rp(e,t,r){return eS(rh,this,rf).call(this,e,{query:ru({cursor:t?.cursor,limit:t?.limit,...r}),signal:t?.signal,tag:t?.tag})}async function rg(e,t){var r;let i=await eS(rh,this,rf).call(this,"/imports/uploads",{method:"POST",body:{filename:e.filename,...e.contentType&&{contentType:e.contentType}},...t}),n=ej(rl,this).config(),s=await (n.resolveFetch?.(n.proxy)??globalThis.fetch)(i.uploadUrl,{method:"PUT",body:ArrayBuffer.isView(r=e.file)?r.buffer instanceof ArrayBuffer?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):Uint8Array.from(r):r,...e.contentType&&{headers:{"content-type":e.contentType}},signal:t?.signal});if(!s.ok)throw Error(`File upload failed: ${s.status} ${s.statusText}`);return eS(rh,this,rf).call(this,`/imports/uploads/${encodeURIComponent(i.importId)}/complete`,{method:"POST",body:{},...t})}var rm=new WeakMap,rv=new WeakMap,ry=class{constructor(e,t){eC(this,rm,void 0),eC(this,rv,void 0),(0,r.u)(this,"knowledgeBases",{create:(e,t)=>ti(t?.signal,r=>tn(ej(rm,this),ej(rv,this),{url:rn,method:"POST",body:e,tag:t?.tag,signal:r})),list:e=>ti(e.signal,t=>tn(ej(rm,this),ej(rv,this),{url:rn,query:ru({organizationId:e.organizationId,cursor:e.cursor,limit:e.limit}),tag:e.tag,signal:t})),get:(e,t)=>ti(t?.signal,r=>tn(ej(rm,this),ej(rv,this),{url:ro(e),tag:t?.tag,signal:r})),edit:(e,t,r)=>ti(r?.signal,i=>tn(ej(rm,this),ej(rv,this),{url:ro(e),method:"PATCH",body:t,tag:r?.tag,signal:i})),delete:(e,t)=>ti(t?.signal,r=>tn(ej(rm,this),ej(rv,this),{url:ro(e),method:"DELETE",tag:t?.tag,signal:r}))}),(0,r.u)(this,"conversations",{save:(e,t)=>{let{threadId:r,...i}=e;return ti(t?.signal,e=>tn(ej(rm,this),ej(rv,this),{url:ra(ej(rm,this),r),method:"PUT",body:i,tag:t?.tag,signal:e}))},classify:(e,t)=>{let{threadId:r,...i}=e;return ti(t?.signal,e=>tn(ej(rm,this),ej(rv,this),{url:ra(ej(rm,this),r),method:"PATCH",body:i,tag:t?.tag,signal:e}))},get:(e,t)=>ti(t?.signal,r=>ri(ej(rm,this),ej(rv,this),e.threadId,{...t,signal:r}))}),(0,r.u)(this,"entries",{list:e=>ti(e?.signal,t=>t5(ej(rm,this),ej(rv,this),rs(ej(rm,this)),{...e,signal:t})),get:(e,t)=>ti(t?.signal,r=>t6(ej(rm,this),ej(rv,this),rs(ej(rm,this)),e.path,{...t,signal:r})),rebuild:(e,t)=>ti(t?.signal,r=>tn(ej(rm,this),ej(rv,this),{url:ro(rs(ej(rm,this)),`/entries/${encodeURIComponent(e.path)}/rebuild`),method:"POST",tag:t?.tag,signal:r}))}),(0,r.u)(this,"issues",{list:(e,t)=>ti(t?.signal,r=>t9(ej(rm,this),ej(rv,this),rs(ej(rm,this)),e?.status,{...t,signal:r})),get:(e,t)=>ti(t?.signal,r=>t7(ej(rm,this),ej(rv,this),rs(ej(rm,this)),e.issueId,{...t,signal:r}))}),(0,r.u)(this,"instructions",{list:e=>ti(e?.signal,t=>re(ej(rm,this),ej(rv,this),rs(ej(rm,this)),{...e,signal:t}))}),(0,r.u)(this,"mcpEndpoints",{list:e=>ti(e?.signal,t=>rt(ej(rm,this),ej(rv,this),{...e,signal:t})),get:(e,t)=>ti(t?.signal,r=>rr(ej(rm,this),ej(rv,this),e.name,{...t,signal:r}))}),eA(rm,this,e),eA(rv,this,t)}fetch(e,t,r){return t0(ej(rm,this),ej(rv,this),e,t,r)}listen(e,t,r){return t1(ej(rm,this),e,t,r)}};let rb="2021-03-25";var rw=new WeakMap,rE=class{constructor(e){eC(this,rw,void 0),eA(rw,this,e)}events({includeDrafts:e=!1,tag:t,waitFor:n}={}){var s,o,a,u,l,c;let h=ej(rw,this).config(),{projectId:d,apiVersion:f,token:p,withCredentials:g,requestTagPrefix:m,headers:v}=h,y=f.replace(/^v/,"");if("X"!==y&&y<rb)throw Error(`The live events API requires API version ${rb} or later. The current API version is ${y}. Please update your API version to use this feature.`);
9if(e&&!p&&!g)throw Error("The live events API requires a token or withCredentials when 'includeDrafts: true'. Please update your client configuration. The token should have the lowest possible access role.");let b=to(ej(rw,this),"live/events"),w=new URL(ej(rw,this).getUrl(b,!1)),E=t&&m?[m,t].join("."):t;E&&w.searchParams.set("tag",E),e&&w.searchParams.set("includeDrafts","true"),n&&w.searchParams.set("waitFor",n);let I={};e&&p&&(I.Authorization=`Bearer ${p}`),v&&Object.assign(I,v);let $=!!(e&&g),O=rI.get(h.resolveFetch);O||(O=new Map,rI.set(h.resolveFetch,O));let x=JSON.stringify([w.href,"string"==typeof h.proxy?h.proxy:null,I,$]),C=O.get(x);if(C)return C;let S=eI(()=>new ep(w.href,{fetch:tC(h,{headers:Object.keys(I).length?I:void 0,withCredentials:$})}),["message","restart","welcome","reconnect","goaway"]),A=(o=new URL(ej(rw,this).getUrl("/check/cors",!1)),a=d,u=$,l=tS(h),new k.Observable(e=>{let t=new AbortController,{signal:n}=t;return l(o.href,{method:"GET",credentials:"omit",signal:n}).then(e=>{if(!(n.aborted||!e.ok))return e.text()}).then(t=>{if(n.aborted)return;let s=void 0===t?void 0:JSON.parse(t),o=(0,i.t)(s)?s.result:void 0;u&&(0,i.t)(o)&&!1===o.withCredentials?e.error(new r.i({projectId:a,credentials:!0})):(0,i.t)(o)&&!1===o.allowed?e.error(new r.i({projectId:a,credentials:u})):(e.next(),e.complete())}).catch(()=>{n.aborted||e.closed||(e.next(),e.complete())}),()=>t.abort()})),j=S.pipe(tx(),(0,X.mergeMap)(e=>"reconnect"===e.type?A.pipe((0,X.mergeMap)(()=>Q(e))):Q(e)),U(e=>e instanceof r.i?K(()=>e):A.pipe((0,X.mergeMap)(()=>{throw e}))),(0,B.map)(e=>{if("message"===e.type){let{data:t,...r}=e;return{...r,tags:t.tags}}return e})).pipe(N(()=>{O.delete(x),0===O.size&&rI.delete(h.resolveFetch)}),(c="function"==typeof(s={predicate:e=>"welcome"===e.type})?{predicate:s,...void 0}:s,e=>{var t,r;let i,n=!1,{predicate:s,...o}=c,a=e.pipe((t=e=>{c.predicate(e)&&(n=!0,i=e)},(r=(0,F.isFunction)(t)?{next:t,error:void 0,complete:void 0}:t)?(0,D.operate)(function(e,t){null==(i=r.subscribe)||i.call(r);var i,n=!0;e.subscribe((0,R.createOperatorSubscriber)(t,function(e){var i;null==(i=r.next)||i.call(r,e),t.next(e)},function(){var e;n=!1,null==(e=r.complete)||e.call(r),t.complete()},function(e){var i;n=!1,null==(i=r.error)||i.call(r,e),t.error(e)},function(){var e,t;n&&(null==(e=r.unsubscribe)||e.call(r)),null==(t=r.finalize)||t.call(r)}))}):J.identity),N(()=>{n=!1,i=void 0}),(0,Y.share)(o)),u=new k.Observable(e=>{n&&e.next(i),e.complete()});return(0,G.merge)(a,u)}));return O.set(x,j),j}};let rI=new Map;var r$=new WeakMap,rO=new WeakMap,rx=class{constructor(e,t){eC(this,r$,void 0),eC(this,rO,void 0),eA(r$,this,e),eA(rO,this,t)}create(e,t){return rP(ej(r$,this),ej(rO,this),"PUT",e,t)}edit(e,t){return rP(ej(r$,this),ej(rO,this),"PATCH",e,t)}delete(e){return rP(ej(r$,this),ej(rO,this),"DELETE",e)}list(){g("dataset",ej(r$,this).config());let e=ej(r$,this).config(),t=e.projectId,r="/datasets";return!1===e.useProjectHostname&&(r=`/projects/${t}/datasets`),ts(ej(r$,this),ej(rO,this),{url:r,tag:null})}getEmbeddingsSettings(e){return g("dataset",ej(r$,this).config()),a(e),ts(ej(r$,this),ej(rO,this),{url:rj(ej(r$,this),e),tag:null})}editEmbeddingsSettings(e,t){return g("dataset",ej(r$,this).config()),a(e),ts(ej(r$,this),ej(rO,this),{method:"PUT",url:rj(ej(r$,this),e),body:t,tag:null})}},rC=new WeakMap,rS=new WeakMap,rA=class{constructor(e,t){eC(this,rC,void 0),eC(this,rS,void 0),eA(rC,this,e),eA(rS,this,t)}create(e,t){return g("dataset",ej(rC,this).config()),rT(ej(rC,this),ej(rS,this),"PUT",e,t)}edit(e,t){return g("dataset",ej(rC,this).config()),rT(ej(rC,this),ej(rS,this),"PATCH",e,t)}delete(e){return g("dataset",ej(rC,this).config()),rT(ej(rC,this),ej(rS,this),"DELETE",e)}list(){g("dataset",ej(rC,this).config());let e=ej(rC,this).config(),t=e.projectId,r="/datasets";return!1===e.useProjectHostname&&(r=`/projects/${t}/datasets`),tn(ej(rC,this),ej(rS,this),{url:r,tag:null})}getEmbeddingsSettings(e){return g("dataset",ej(rC,this).config()),a(e),tn(ej(rC,this),ej(rS,this),{url:rj(ej(rC,this),e),tag:null})}editEmbeddingsSettings(e,t){return g("dataset",ej(rC,this).config()),a(e),tn(ej(rC,this),ej(rS,this),{method:"PUT",url:rj(ej(rC,this),e),body:t,tag:null})}};function rj(e,t){let r=e.config();return!1===r.useProjectHostname?`/projects/${r.projectId}/datasets/${t}/settings/embeddings`:`/datasets/${t}/settings/embeddings`}function rP(e,t,r,i,n){return g("dataset",e.config()),a(i),ts(e,t,{method:r,url:`/datasets/${i}`,body:n,tag:null})}function rT(e,t,r,i,n){return g("dataset",e.config()),a(i),tn(e,t,{method:r,url:`/datasets/${i}`,body:n,tag:null})}let r_=["sanity.function.pubsub"],rk=["sanity.function.durable","sanity.function.pubsub","sanity.function.queue"],rM=[...new Set([...r_,...rk])];function rR(e,t,r,i,n){return(0,W.defer)(()=>{let s=e.config(),o=((e,t)=>{let r=t?.organizationId||e.organizationId;if(r)return{"X-Sanity-Scope-Type":"organization","X-Sanity-Scope-Id":r};let{projectId:i}=e;if(!i)throw Error("`functions.invoke()` requires a `projectId` to be set in the client config, or an `organizationId` for a stack deployed at organization scope");return{"X-Sanity-Scope-Type":"project","X-Sanity-Scope-Id":i}})(s,i),a=((e,t)=>{let r=t?.stackId||e.stackId;if(!r)throw Error("`functions.invoke()` requires a `stackId`, either in the client config or on the request. Function names are only unique within a stack.");return r})(s,i),u=n?.sync??!1;return ts(e,t,{method:"GET",url:`/blueprints/stacks/${a}`,headers:o,signal:i?.signal}).pipe((0,B.map)(e=>{let t=(e?.resources||[]).find(e=>e.type?.startsWith("sanity.function.")&&e.name===r);if(!t)throw Error(`Function "${r}" not found in stack "${a}"`);if(!t.externalId)throw Error(`Function "${r}" is declared in stack "${a}" but is not deployed`);if(!rM.includes(t.type))throw Error(`Function invocation is not supported for ${t.type}`);if(u&&!r_.includes(t.type))throw Error(`Synchronous function invocation is not supported for ${t.type}`);if(!u&&!rk.includes(t.type))throw Error(`Asynchronous function invocation is not supported for ${t.type}`);return t.externalId})).pipe((0,X.mergeMap)(r=>ts(e,t,{method:"POST",url:`/functions/${r}/invoke${u?"?sync=true":""}`,headers:o,body:{event:{data:i?.event?.data??{}}},timeout:i?.timeout,signal:i?.signal})))})}var rD=new WeakMap,rU=new WeakMap,rq=class{constructor(e,t){eC(this,rD,void 0),eC(this,rU,void 0),eA(rD,this,e),eA(rU,this,t)}invoke(e,t,r){return rR(ej(rD,this),ej(rU,this),e,t,r)}},rz=new WeakMap,rL=new WeakMap,rW=class{constructor(e,t){eC(this,rz,void 0),eC(this,rL,void 0),eA(rz,this,e),eA(rL,this,t)}invoke(e,t,r){return H(rR(ej(rz,this),ej(rL,this),e,t,r))}},rN=new WeakMap,rF=new WeakMap,rV=class{constructor(e,t){eC(this,rN,void 0),eC(this,rF,void 0),eA(rN,this,e),eA(rF,this,t)}getPlaybackInfo(e,t={}){let r=ej(rN,this).config(),i=(r.resource||r["~experimental_resource"])?.id,{instanceId:n,library
9Id:s}=rQ(e),o=s||i;if(!o)throw Error("Could not determine Media Library ID - you need to provide a valid Media Library ID in the client config or a Media Library GDR");let a=rY(n,o),u=rJ(t);return ts(ej(rN,this),ej(rF,this),{method:"GET",url:a,query:u})}},rH=new WeakMap,rB=new WeakMap,rG=class{constructor(e,t){eC(this,rH,void 0),eC(this,rB,void 0),eA(rH,this,e),eA(rB,this,t)}getPlaybackInfo(e,t={}){let r=ej(rH,this).config(),i=(r.resource||r["~experimental_resource"])?.id,{instanceId:n,libraryId:s}=rQ(e),o=s||i;if(!o)throw Error("Could not determine Media Library ID - you need to provide a valid Media Library ID in the client config or a Media Library GDR");let a=rY(n,o),u=rJ(t);return tn(ej(rH,this),ej(rB,this),{method:"GET",url:a,query:u})}};let rX=/^media-library:(ml[^:]+):([^:]+)$/;function rQ(e){let t="object"==typeof e&&"_ref"in e?e._ref:e,r=rX.exec(t);if(r){let[,e,t]=r;return{libraryId:e,instanceId:t}}if("string"==typeof e&&e.startsWith("video-"))return{instanceId:e};throw Error(`Invalid video asset instance identifier "${t}": must be a valid video instance id or a Global Dataset Reference (GDR) to the video asset in the Media Library`)}function rY(e,t){return`/media-libraries/${t}/video/${e}/playback-info`}function rJ(e){let t={};if(e.transformations){let{thumbnail:r,animated:i,storyboard:n}=e.transformations;r&&(r.width&&(t.thumbnailWidth=r.width),r.height&&(t.thumbnailHeight=r.height),void 0!==r.time&&(t.thumbnailTime=r.time),r.fit&&(t.thumbnailFit=r.fit),r.format&&(t.thumbnailFormat=r.format)),i&&(i.width&&(t.animatedWidth=i.width),i.height&&(t.animatedHeight=i.height),void 0!==i.start&&(t.animatedStart=i.start),void 0!==i.end&&(t.animatedEnd=i.end),i.fps&&(t.animatedFps=i.fps),i.format&&(t.animatedFormat=i.format)),n&&n.format&&(t.storyboardFormat=n.format)}return e.expiration&&(t.expiration=e.expiration),t}var rK=new WeakMap,rZ=new WeakMap,r0=class{constructor(e,t){eC(this,rK,void 0),eC(this,rZ,void 0),eA(rK,this,e),eA(rZ,this,t)}list(e){let t={};return e?.includeMembers===!1&&(t.includeMembers="false"),e?.includeFeatures===!1&&(t.includeFeatures="false"),e?.organizationId&&(t.organizationId=e.organizationId),e?.onlyExplicitMembership&&(t.onlyExplicitMembership="true"),ts(ej(rK,this),ej(rZ,this),{url:"/projects",query:t})}getById(e){return ts(ej(rK,this),ej(rZ,this),{url:`/projects/${e}`})}},r1=new WeakMap,r2=new WeakMap,r8=class{constructor(e,t){eC(this,r1,void 0),eC(this,r2,void 0),eA(r1,this,e),eA(r2,this,t)}list(e){let t={};return e?.includeMembers===!1&&(t.includeMembers="false"),e?.includeFeatures===!1&&(t.includeFeatures="false"),e?.organizationId&&(t.organizationId=e.organizationId),e?.onlyExplicitMembership&&(t.onlyExplicitMembership="true"),tn(ej(r1,this),ej(r2,this),{url:"/projects",query:t})}getById(e){return tn(ej(r1,this),ej(r2,this),{url:`/projects/${e}`})}};function r3(){let e="";for(;e.length<8;)for(let t of crypto.getRandomValues(new Uint8Array(8-e.length))){let r=63&t;r<62&&(e+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"[r])}return e}let r4=(e,t)=>t?(0,en.h)(e,t):(0,et.getDraftId)(e);function r6(e,{releaseId:t,publishedId:r,document:i}){if(r&&i._id){let e=r4(r,t);return((e,t)=>{if(t._id&&t._id!==e)throw Error(`The provided document ID (\`${t._id}\`) does not match the generated version ID (\`${e}\`)`)})(e,i),e}if(i._id){let r=(0,es.g)(i._id),n=(0,eo.v)(i._id);if(!r&&!n)throw Error(`\`${e}()\` requires a document with an \`_id\` that is a version or draft ID`);if(t){if(r)throw Error(`\`${e}()\` was called with a document ID (\`${i._id}\`) that is a draft ID, but a release ID (\`${t}\`) was also provided.`);let n=(0,ei.m)(i._id);if(n!==t)throw Error(`\`${e}()\` was called with a document ID (\`${i._id}\`) that is a version ID, but the release ID (\`${t}\`) does not match the document's version ID (\`${n}\`).`)}return i._id}if(r)return r4(r,t);throw Error(`\`${e}()\` requires either a publishedId or a document with an \`_id\``)}let r5=(e,t)=>{let[r,i,n]=((e,t)=>{if("object"==typeof e&&e&&("releaseId"in e||"metadata"in e)){let{releaseId:r=r3(),metadata:i={}}=e;return[r,i,t]}return[r3(),{},e]})(e,t);return{action:{actionType:"sanity.action.release.create",releaseId:r,metadata:{...i,releaseType:i.releaseType||"undecided"}},options:n}};var r9=new WeakMap,r7=new WeakMap,ie=class{constructor(e,t){eC(this,r9,void 0),eC(this,r7,void 0),eA(r9,this,e),eA(r7,this,t)}get({releaseId:e},t){return eV(ej(r9,this),ej(r7,this),`_.releases.${e}`,t)}create(e,t){let{action:r,options:i}=r5(e,t),{releaseId:n,metadata:s}=r;return eJ(ej(r9,this),ej(r7,this),r,i).pipe((0,B.map)(e=>({...e,releaseId:n,metadata:s})))}edit({releaseId:e,patch:t},r){return eJ(ej(r9,this),ej(r7,this),{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r)}publish({releaseId:e},t){return eJ(ej(r9,this),ej(r7,this),{actionType:"sanity.action.release.publish",releaseId:e},t)}archive({releaseId:e},t){return eJ(ej(r9,this),ej(r7,this),{actionType:"sanity.action.release.archive",releaseId:e},t)}unarchive({releaseId:e},t){return eJ(ej(r9,this),ej(r7,this),{actionType:"sanity.action.release.unarchive",releaseId:e},t)}schedule({releaseId:e,publishAt:t},r){return eJ(ej(r9,this),ej(r7,this),{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r)}unschedule({releaseId:e},t){return eJ(ej(r9,this),ej(r7,this),{actionType:"sanity.action.release.unschedule",releaseId:e},t)}delete({releaseId:e},t){return eJ(ej(r9,this),ej(r7,this),{actionType:"sanity.action.release.delete",releaseId:e},t)}fetchDocuments({releaseId:e},t){return function(e,t,r,i={}){return ti(i.signal,n=>eY(e,t,r,{...i,signal:n}))}(ej(r9,this),ej(r7,this),e,t)}},it=new WeakMap,ir=new WeakMap,ii=class{constructor(e,t){eC(this,it,void 0),eC(this,ir,void 0),eA(it,this,e),eA(ir,this,t)}get({releaseId:e},t){return eH(ej(it,this),ej(ir,this),`_.releases.${e}`,t)}async create(e,t){let{action:r,options:i}=r5(e,t),{releaseId:n,metadata:s}=r;return{...await e0(ej(it,this),ej(ir,this),r,i),releaseId:n,metadata:s}}edit({releaseId:e,patch:t},r){return e0(ej(it,this),ej(ir,this),{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r)}publish({releaseId:e},t){return e0(ej(it,this),ej(ir,this),{actionType:"sanity.action.release.publish",releaseId:e},t)}archive({releaseId:e},t){return e0(ej(it,this),ej(ir,this),{actionType:"sanity.action.release.archive",releaseId:e},t)}unarchive({releaseId:e},t){return e0(ej(it,this),ej(ir,this),{actionType:"sanity.action.release.unarchive",releaseId:e},t)}schedule({releaseId:e,publishAt:t},r){return e0(ej(it,this),ej(ir,this),{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r)}unschedule({releaseId:e},t){return e0(ej(it,this),ej(ir,this),{actionType:"sanity.action.release.unschedule",releaseId:e},t)}delete({releaseId:e},t){return e0(ej(it,this),ej(ir,this),{actionType:"sanity.action.release.delete",releaseId:e},t)}fetchDocuments({releaseId:e},t){return eY(ej(it,this),ej(ir,this),e,t)}},is=new WeakMap,io=new WeakMap,ia=class{constructor(e,t){eC(this,is,void 0),eC(this,io,void 0),eA(is,this,e),eA(io,this,t)}getById(e){return ts(ej(is,this),ej(io,this),{url:`/users/${e}`})}},iu=new WeakMap,il=new WeakMap,ic=class{constructor(e,t){eC(this,iu,void 0),eC(this,il,void 0),eA(iu,this,e),eA(il,this,t)}getById(e){return tn(ej(iu,this),ej(il,this),{url:`/users/${e}`})}},ih=new WeakMap,id=new WeakMap,ip=class e{constructor(e,t=S){(0,r.u)(this,"assets",void 0),(0,r.u)(this,"datasets",void 0),(0,r.u)(this,"live",void 0),(0,r.u)(this,"mediaLibrary",void 0),(0,r.u)(this,"projects",void 0),(0,r.u)(this,"users",void 0),(0,r.u)(this,"agent",void 0),(0,r.u)(this,"collaboration",void 0),(0,r.u)(this,"functions",void 0),(0,r.u)(this,"releases",void 0),(0,r.u)(this,"context",void 0),eC(this,ih,void 0),eC(this,id,void 0),(0,r.u)(this,"listen",tP),this.config(t),eA(id,this,e),this.assets=new tv(this,ej(id,this)),this.datasets=new rx(this,ej(id,this)),this.live=new rE(this),this.mediaLibrary={video:new rV(this,ej(id,this))},this.projects=new r0(this,ej(id,this)),this.users=new ia(this,ej(id,this)),this.agent={action:new th(this,ej(id,this))},this.collaboration={comments:new tX(this,ej(id,this))},this.functions=new rq(this,ej(id,this)),this.releases=new ie(this,ej(id,this)),this.context=new ry(this,ej(id,this))}clone(){return new e(ej(id,this),this.config())}config(e){if(void 0===e)return{...ej(ih,this)};if(ej(ih,this)&&!1===ej(ih,this).allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return eA(ih,this,P(e,ej(ih,this)||{})),this}withConfig(t){let r=this.config();return new e(ej(id,this),{...r,...t,stega:{...r.stega,..."boolean"==typeof t?.stega?{enabled:t.stega}:t?.stega||{}}})}fetch(e,t,r){return function(e,t,r,i,n={},s={}){return ti(s.signal,o=>eF(e,t,r,i,n,{...s,signal:o}))}(this,ej(id,this),ej(ih,this).stega,e,t,r)}getDocument(e,t){if(t?.includeAllVersions===!0)return eV(this,ej(id,this),e,{...t,includeAllVersions:!0});let r={signal:t?.signal,tag:t?.tag,releaseId:t?.releaseId,...t&&"includeAllVersions"in t?{includeAllVersions:!1}:{}};return eV(this,ej(id,this),e,r)}getDocuments(e,t){return function(e,t,r,i={}){return ti(i.signal,n=>eX(e,t,r,{...i,signal:n}))}(this,ej(id,this),e,t)}documentsExists(e,t){return function(e,t,r,i={}){return ti(i.signal,n=>eQ(e,t,r,{...i,signal:n}))}(this,ej(id,this),e,t)}create(e,t){return function(e,t,r,i,n={}){return ti(n.signal,s=>eZ(e,t,r,i,{...n,signal:s}))}(this,ej(id,this),e,"create",t)}createIfNotExists(e,t){var r,i;return r=this,i=ej(id,this),ti(t?.signal,n=>e8(r,i,e,{...t,signal:n}))}createOrReplace(e,t){var r,i;return r=this,i=ej(id,this),ti(t?.signal,n=>e3(r,i,e,{...t,signal:n}))}createVersion({document:e,publishedId:t,releaseId:r,baseId:i,ifBaseRevisionId:n},s){var o,a,u,l;if(!e)return o=this,a=ej(id,this),ti(s?.signal,e=>e6(o,a,t,i,r,n,{...s,signal:e}));let c=r6("createVersion",{document:e,publishedId:t,releaseId:r}),h={...e,_id:c},d=t||(0,er.getPublishedId)(e._id);return u=this,l=ej(id,this),ti(s?.signal,e=>e4(u,l,h,d,{...s,signal:e}))}delete(e,t){var r,i;return r=this,i=ej(id,this),ti(t?.signal,n=>e2(r,i,e,{...t,signal:n}))}discardVersion({releaseId:e,publishedId:t},r,i){let n=r4(t,e);return function(e,t,r,i=!1,n){return ti(n?.signal,s=>e5(e,t,r,i,{...n,signal:s}))}(this,ej(id,this),n,r,i)}replaceVersion({document:e,publishedId:t,releaseId:r},i){var n,s;let o=r6("replaceVersion",{document:e,publishedId:t,releaseId:r}),a={...e,_id:o};return n=this,s=ej(id,this),ti(i?.signal,e=>e9(n,s,a,{...i,signal:e}))}unpublishVersion({releaseId:e,publishedId:t},r){var i,n;let s=(0,en.h)(t,e);return i=this,n=ej(id,this),ti(r?.signal,e=>e7(i,n,s,t,{...r,signal:e}))}mutate(e,t){var r,i;return r=this,i=ej(id,this),ti(t?.signal,n=>e1(r,i,e,{...t,signal:n}))}patch(e,t){return new e_(e,t,this)}transaction(e){return new eL(e,this)}action(e,t){return eJ(this,ej(id,this),e,t)}request(e){return ts(this,ej(id,this),e)}getUrl(e,t){return ta(this,e,t)}getDataUrl(e,t){return to(this,e,t)}},ig=new WeakMap,im=new WeakMap,iv=class e{constructor(e,t=S){(0,r.u)(this,"assets",void 0),(0,r.u)(this,"datasets",void 0),(0,r.u)(this,"live",void 0),(0,r.u)(this,"mediaLibrary",void 0),(0,r.u)(this,"projects",void 0),(0,r.u)(this,"users",void 0),(0,r.u)(this,"agent",void 0),(0,r.u)(this,"collaboration",void 0),(0,r.u)(this,"functions",void 0),(0,r.u)(this,"releases",void 0),(0,r.u)(this,"context",void 0),(0,r.u)(this,"observable",void 0),eC(this,ig,void 0),eC(this,im,void 0),(0,r.u)(this,"listen",tP),this.config(t),eA(im,this,e),this.assets=new tw(this,ej(im,this)),this.datasets=new rA(this,ej(im,this)),this.live=new rE(this),this.mediaLibrary={video:new rG(this,ej(im,this))},this.projects=new r8(this,ej(im,this)),this.users=new ic(this,ej(im,this)),this.agent={action:new tp(this,ej(im,this))},this.collaboration={comments:new tJ(this,ej(im,this))},this.functions=new rW(this,ej(im,this)),this.releases=new ii(this,ej(im,this)),this.context=new rd(this,ej(im,this)),this.observable=new ip(e,t)}clone(){return new e(ej(im,this),this.config())}config(e){if(void 0===e)return{...ej(ig,this)};if(ej(ig,this)&&!1===ej(ig,this).allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.observable&&this.observable.config(e),eA(ig,this,P(e,ej(ig,this)||{})),this}withConfig(t){let r=this.config();return new e(ej(im,this),{...r,...t,stega:{...r.stega,..."boolean"==typeof t?.stega?{enabled:t.stega}:t?.stega||{}}})}fetch(e,t,r){return eF(this,ej(im,this),ej(ig,this).stega,e,t,r)}getDocument(e,t){if(t?.includeAllVersions===!0)return eH(this,ej(im,this),e,{...t,includeAllVersions:!0});let r={signal:t?.signal,tag:t?.tag,releaseId:t?.releaseId,...t&&"includeAllVersions"in t?{includeAllVersions:!1}:{}};return eH(this,ej(im,this),e,r)}getDocuments(e,t){return eX(this,ej(im,this),e,t)}documentsExists(e,t){return eQ(this,ej(im,this),e,t)}create(e,t){return eZ(this,ej(im,this),e,"create",t)}createIfNotExists(e,t){return e8(this,ej(im,this),e,t)}createOrReplace(e,t){return e3(this,ej(im,this),e,t)}createVersion({document:e,publishedId:t,releaseId:r,baseId:i,ifBaseRevisionId:n},s){if(!e)return e6(this,ej(im,this),t,i,r,n,s);let o=r6("createVersion",{document:e,publishedId:t,releaseId:r}),a={...e,_id:o},u=t||(0,er.getPublishedId)(e._id);return e4(this,ej(im,this),a,u,s)}delete(e,t){return e2(this,ej(im,this),e,t)}discardVersion({releaseId:e,publishedId:t},r,i){let n=r4(t,e);return e5(this,ej(im,this),n,r,i)}replaceVersion({document:e,publishedId:t,releaseId:r},i){let n=r6("replaceVersion",{document:e,publishedId:t,releaseId:r}),s={...e,_id:n};return e9(this,ej(im,this),s,i)}unpublishVersion({releaseId:e,publishedId:t},r){let i=(0,en.h)(t,e);return e7(this,ej(im,this),i,t,r)}mutate(e,t){return e1(this,ej(im,this),e,t)}patch(e,t){return new eM(e,t,this)}transaction(e){return new eq(e,this)}action(e,t){return e0(this,ej(im,this),e,t)}request(e){return tn(this,ej(im,this),e)}dataRequest(e,t,r){return eK(this,ej(im,this),e,t,r)}getUrl(e,t){return ta(this,e,t)}getDataUrl(e,t){return to(this,e,t)}};let iy=(t={middleware:[]},{requester:(0,r.t)(t).observable,createClient:e=>{let{observable:i,promise:n}=(0,r.t)(t,{ignoreWarnings:e.ignoreWarnings,maxRetries:e.maxRetries,retryDelay:e.retryDelay}),s=async e=>(await n({redirect:"manual",...e})).body;return new iv((e,t)=>
9t?t(e,s):s(e),{...e,requester:i,resolveFetch:e.resolveFetch??t.resolveFetch})}}),ib=(iy.requester,iy.createClient);var iw=e.i(477846),iE=T;e.s(["stegaClean",()=>iE.t],284022);var iE=T;let iI="ww20clc6",i$="production",iO=ib({projectId:iI,dataset:i$,apiVersion:"2025-02-06",useCdn:!1,perspective:"published",stega:{studioUrl:"gong-next-sanity-studio.vercel.app"}}),ix=(0,iw.default)({projectId:iI,dataset:i$});async function iC(e,t,r){return function e(t){if(null==t)return t;let r=typeof t;if("string"===r)return(0,iE.t)(t);if(Array.isArray(t))return t.map(e);if("object"===r){let r={};for(let i in t)r[i]=e(t[i]);return r}return t}(await iO.fetch(e,t,r))}e.s(["client",0,iO,"sanityFetch",0,iC,"urlForImage",0,function(e){return ix.image(e)}],97552)},477846,(e,t,r)=>{e.e,t.exports=function(){function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function t(){return(t=Object.assign.bind()).apply(null,arguments)}var r="image-Tb9Ew8CXIwaY6R1kjMvI0uRR-2000x3000-jpg";function i(e){return("image-"+e.split("/").slice(-1)[0]).replace(/\.([a-z]+)$/,"-$1")}var n=[["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"],["frame","frame"]],s=["clip","crop","fill","fillmax","max","scale","min"],o=["top","bottom","left","right","center","focalpoint","entropy"],a=["format"],u=function(){function u(e,r){this.options=void 0,this.options=e?t({},e.options||{},r||{}):t({},r||{})}var l=u.prototype;return l.withOptions=function(r){var i=r.baseUrl||this.options.baseUrl,s={baseUrl:i};for(var o in r)r.hasOwnProperty(o)&&(s[function(t){for(var r,i=function(t){var r="u">typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t){if(t){if("string"==typeof t)return e(t,void 0);var r=({}).toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,void 0):void 0}}(t))){r&&(t=r);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n);!(r=i()).done;){var s=r.value,o=s[0],a=s[1];if(t===o||t===a)return o}return t}(o)]=r[o]);return new u(this,t({baseUrl:i},s))},l.image=function(e){return this.withOptions({source:e})},l.dataset=function(e){return this.withOptions({dataset:e})},l.projectId=function(e){return this.withOptions({projectId:e})},l.bg=function(e){return this.withOptions({bg:e})},l.dpr=function(e){return this.withOptions(e&&1!==e?{dpr:e}:{})},l.width=function(e){return this.withOptions({width:e})},l.height=function(e){return this.withOptions({height:e})},l.focalPoint=function(e,t){return this.withOptions({focalPoint:{x:e,y:t}})},l.maxWidth=function(e){return this.withOptions({maxWidth:e})},l.minWidth=function(e){return this.withOptions({minWidth:e})},l.maxHeight=function(e){return this.withOptions({maxHeight:e})},l.minHeight=function(e){return this.withOptions({minHeight:e})},l.size=function(e,t){return this.withOptions({width:e,height:t})},l.blur=function(e){return this.withOptions({blur:e})},l.sharpen=function(e){return this.withOptions({sharpen:e})},l.rect=function(e,t,r,i){return this.withOptions({rect:{left:e,top:t,width:r,height:i}})},l.format=function(e){return this.withOptions({format:e})},l.invert=function(e){return this.withOptions({invert:e})},l.orientation=function(e){return this.withOptions({orientation:e})},l.quality=function(e){return this.withOptions({quality:e})},l.forceDownload=function(e){return this.withOptions({download:e})},l.flipHorizontal=function(){return this.withOptions({flipHorizontal:!0})},l.flipVertical=function(){return this.withOptions({flipVertical:!0})},l.ignoreImageParams=function(){return this.withOptions({ignoreImageParams:!0})},l.fit=function(e){if(-1===s.indexOf(e))throw Error('Invalid fit mode "'+e+'"');return this.withOptions({fit:e})},l.crop=function(e){if(-1===o.indexOf(e))throw Error('Invalid crop mode "'+e+'"');return this.withOptions({crop:e})},l.saturation=function(e){return this.withOptions({saturation:e})},l.auto=function(e){if(-1===a.indexOf(e))throw Error('Invalid auto mode "'+e+'"');return this.withOptions({auto:e})},l.pad=function(e){return this.withOptions({pad:e})},l.vanityName=function(e){return this.withOptions({vanityName:e})},l.frame=function(e){if(1!==e)throw Error('Invalid frame value "'+e+'"');return this.withOptions({frame:e})},l.url=function(){return function(e){var s=t({},e||{}),o=s.source;delete s.source;var a=function(e){var r,n;if(!e)return null;if("string"==typeof e&&(n=e,/^https?:\/\//.test(""+n)))r={asset:{_ref:i(e)}};else if("string"==typeof e)r={asset:{_ref:e}};else if(e&&"string"==typeof e._ref)r={asset:e};else if(e&&"string"==typeof e._id)r={asset:{_ref:e._id||""}};else if(e&&e.asset&&"string"==typeof e.asset.url)r={asset:{_ref:i(e.asset.url)}};else{if("object"!=typeof e.asset)return null;r=t({},e)}return e.crop&&(r.crop=e.crop),e.hotspot&&(r.hotspot=e.hotspot),function(e){if(e.crop&&e.hotspot)return e;var r=t({},e);
9return 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}(r)}(o);if(!a){if(o&&"object"==typeof o&&null!==o&&o._upload&&(!o.asset||!o.asset._ref))return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8HwQACfsD/QNViZkAAAAASUVORK5CYII=";throw Error("Unable to resolve image URL from source ("+JSON.stringify(o)+")")}var u=function(e){var t=e.split("-"),i=t[1],n=t[2],s=t[3];if(!i||!n||!s)throw Error("Malformed asset _ref '"+e+"'. Expected an id like \""+r+'".');var o=n.split("x"),a=o[0],u=o[1],l=+a,c=+u;if(!(isFinite(l)&&isFinite(c)))throw Error("Malformed asset _ref '"+e+"'. Expected an id like \""+r+'".');return{id:i,width:l,height:c,format:s}}(a.asset._ref||a.asset._id||""),l=Math.round(a.crop.left*u.width),c=Math.round(a.crop.top*u.height),h={left:l,top:c,width:Math.round(u.width-a.crop.right*u.width-l),height:Math.round(u.height-a.crop.bottom*u.height-c)},d=a.hotspot.height*u.height/2,f=a.hotspot.width*u.width/2,p=a.hotspot.x*u.width,g=a.hotspot.y*u.height;return s.rect||s.focalPoint||s.ignoreImageParams||s.crop||(s=t({},s,function(e,t){var r,i=t.width,n=t.height;if(!(i&&n))return{width:i,height:n,rect:e.crop};var s=e.crop,o=e.hotspot,a=i/n;if(s.width/s.height>a){var u=Math.round(s.height),l=Math.round(u*a),c=Math.max(0,Math.round(s.top)),h=Math.max(0,Math.round(Math.round((o.right-o.left)/2+o.left)-l/2));h<s.left?h=s.left:h+l>s.left+s.width&&(h=s.left+s.width-l),r={left:h,top:c,width:l,height:u}}else{var d=s.width,f=Math.round(d/a),p=Math.max(0,Math.round(s.left)),g=Math.max(0,Math.round(Math.round((o.bottom-o.top)/2+o.top)-f/2));g<s.top?g=s.top:g+f>s.top+s.height&&(g=s.top+s.height-f),r={left:p,top:g,width:d,height:f}}return{width:i,height:n,rect:r}}({crop:h,hotspot:{left:p-f,top:g-d,right:p+f,bottom:g+d}},s))),function(e){var t=(e.baseUrl||"https://cdn.sanity.io").replace(/\/+$/,""),r=e.vanityName?"/"+e.vanityName:"",i=e.asset.id+"-"+e.asset.width+"x"+e.asset.height+"."+e.asset.format+r,s=t+"/images/"+e.projectId+"/"+e.dataset+"/"+i,o=[];if(e.rect){var a=e.rect,u=a.left,l=a.top,c=a.width,h=a.height;(0!==u||0!==l||h!==e.asset.height||c!==e.asset.width)&&o.push("rect="+u+","+l+","+c+","+h)}e.bg&&o.push("bg="+e.bg),e.focalPoint&&(o.push("fp-x="+e.focalPoint.x),o.push("fp-y="+e.focalPoint.y));var d=[e.flipHorizontal&&"h",e.flipVertical&&"v"].filter(Boolean).join("");return(d&&o.push("flip="+d),n.forEach(function(t){var r=t[0],i=t[1];void 0!==e[r]?o.push(i+"="+encodeURIComponent(e[r])):void 0!==e[i]&&o.push(i+"="+encodeURIComponent(e[i]))}),0===o.length)?s:s+"?"+o.join("&")}(t({},s,{asset:u}))}(this.options)},l.toString=function(){return this.url()},u}();return function(e){if(e&&"config"in e&&"function"==typeof e.config){var t=e.config(),r=t.apiHost,i=t.projectId,n=t.dataset;return new u(null,{baseUrl:(r||"https://api.sanity.io").replace(/^https:\/\/api\./,"https://cdn."),projectId:i,dataset:n})}if(e&&"clientConfig"in e&&"object"==typeof e.clientConfig){var s=e.clientConfig,o=s.apiHost,a=s.projectId,l=s.dataset;return new u(null,{baseUrl:(o||"https://api.sanity.io").replace(/^https:\/\/api\./,"https://cdn."),projectId:a,dataset:l})}return new u(null,e||{})}}()},885584,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"Image",{enumerable:!0,get:function(){return E}});let i=e.r(836437),n=e.r(56421),s=e.r(328497),o=n._(e.r(297865)),a=i._(e.r(573348)),u=i._(e.r(269615)),l=e.r(34329),c=e.r(561900),h=e.r(48140),d=e.r(104068),f=i._(e.r(185904)),p=e.r(663531),g={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function m(e,t,r,i,n,s,o){let a=e?.src;e&&e["data-loaded-src"]!==a&&(e["data-loaded-src"]=a,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&n(!0),r?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let i=!1,n=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>i,isPropagationStopped:()=>n,persist:()=>{},preventDefault:()=>{i=!0,t.preventDefault()},stopPropagation:()=>{n=!0,t.stopPropagation()}})}i?.current&&i.current(e)}}))}function v(e){return o.use?{fetchPriority:e}:{fetchpriority:e}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let y="u"<typeof window?o.useEffect:o.useLayoutEffect,b=(0,o.forwardRef)(({src:e,srcSet:t,sizes:r,height:i,width:n,decoding:a,className:u,style:l,fetchPriority:c,placeholder:h,loading:d,unoptimized:f,fill:g,onLoadRef:b,onLoadingCompleteRef:w,setBlurComplete:E,setShowAltText:I,sizesInput:$,onLoad:O,onError:x,...C},S)=>{let A=(0,o.useRef)(!1),j=(0,o.useRef)(null);y(()=>{let{current:e}=A,{current:t}=j;e||null===t||(x&&(t.src=t.src),t.complete&&m(t,h,b,w,E,f,$),A.current=!0)},[e,h,b,w,x,f,$]);let P=(0,p.useMergedRef)(S,j);return(0,s.jsx)("img",{...C,...v(c),loading:d,width:n,height:i,decoding:a,"data-nimg":g?"fill":"1",className:u,style:l,sizes:r,srcSet:t,src:e,ref:P,onLoad:e=>{m(e.currentTarget,h,b,w,E,f,$)},onError:e=>{I(!0),"empty"!==h&&E(!0),x&&x(e)}})});function w({isAppRouter:e,imgAttributes:t}){let r={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...v(t.fetchPriority)};return e&&a.default.preload?(a.default.preload(t.src,r),null):(0,s.jsx)(u.default,{children:(0,s.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...r},"__nimg-"+t.src+t.srcSet+t.sizes)})}let E=(0,o.forwardRef)((e,t)=>{let r=(0,o.useContext)(d.RouterContext),i=(0,o.useContext)(h.ImageConfigContext),n=(0,o.useMemo)(()=>{let e=g||i||c.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>
9e-t),r=e.deviceSizes.sort((e,t)=>e-t),n=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:r,qualities:n,localPatterns:"u"<typeof window?i?.localPatterns:e.localPatterns}},[i]),{onLoad:a,onLoadingComplete:u}=e,p=(0,o.useRef)(a);(0,o.useEffect)(()=>{p.current=a},[a]);let m=(0,o.useRef)(u);(0,o.useEffect)(()=>{m.current=u},[u]);let[v,y]=(0,o.useState)(!1),[E,I]=(0,o.useState)(!1),{props:$,meta:O}=(0,l.getImgProps)(e,{defaultLoader:f.default,imgConf:n,blurComplete:v,showAltText:E});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(b,{...$,unoptimized:O.unoptimized,placeholder:O.placeholder,fill:O.fill,onLoadRef:p,onLoadingCompleteRef:m,setBlurComplete:y,setShowAltText:I,sizesInput:e.sizes,ref:t}),O.preload?(0,s.jsx)(w,{isAppRouter:!r,imgAttributes:$}):null]})});("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},663531,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return n}});let i=e.r(297865);function n(e,t){let r=(0,i.useRef)(null),n=(0,i.useRef)(null);return(0,i.useCallback)(i=>{if(null===i){let e=r.current;e&&(r.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(r.current=s(e,i)),t&&(n.current=s(t,i))},[e,t])}function s(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},216896,(e,t,r)=>{"use strict";function i(e,t){let r=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-r)<Math.abs(e-r)?t:e,t.qualities[0]):r}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"findClosestQuality",{enumerable:!0,get:function(){return i}})},185904,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let i=e.r(216896),n=e.r(41969);function s({config:e,src:t,width:r,quality:o}){let a=(0,n.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//"))if(t.includes("/_next/static/immutable")&&!(0,n.getAssetToken)())a=void 0;else{let e=t.indexOf("?");if(-1!==e){let r=new URLSearchParams(t.slice(e+1)),i=r.get("dpl");if(i){a=i,r.delete("dpl");let n=r.toString();t=t.slice(0,e)+(n?"?"+n:"")}}}if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns. 10Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let u=(0,i.findClosestQuality)(o,e);return`${e.path}?url=${encodeURIComponent(t)}&w=${r}&q=${u}${t.startsWith("/")&&a?`&dpl=${a}`:""}`}s.__next_img_default=!0;let o=s},10660,(e,t,r)=>{"use strict";function i({widthInt:e,heightInt:t,blurWidth:r,blurHeight:n,blurDataURL:s,objectFit:o}){let a=r?40*r:e,u=n?40*n:t,l=a&&u?`viewBox='0 0 ${a} ${u}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${l}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${l?"none":"contain"===o?"xMidYMid":"cover"===o?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${s}'/%3E%3C/svg%3E`}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImageBlurSvg",{enumerable:!0,get:function(){return i}})},561900,(e,t,r)=>{"use strict";
10Object.defineProperty(r,"__esModule",{value:!0});var i={VALID_LOADERS:function(){return s},imageConfigDefault:function(){return o}};for(var n in i)Object.defineProperty(r,n,{enumerable:!0,get:i[n]});let s=["default","imgix","cloudinary","akamai","custom"],o={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1,customCacheHandler:!1}},34329,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImgProps",{enumerable:!0,get:function(){return l}});let i=e.r(41969),n=e.r(10660),s=e.r(561900),o=["-moz-initial","fill","none","scale-down",void 0];function a(e){return void 0!==e.default}function u(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function l({src:e,sizes:t,unoptimized:r=!1,priority:c=!1,preload:h=!1,loading:d,className:f,quality:p,width:g,height:m,fill:v=!1,style:y,overrideSrc:b,onLoad:w,onLoadingComplete:E,placeholder:I="empty",blurDataURL:$,fetchPriority:O,decoding:x="async",layout:C,objectFit:S,objectPosition:A,lazyBoundary:j,lazyRoot:P,...T},_){var k;let M,R,D,{imgConf:U,showAltText:q,blurComplete:z,defaultLoader:L}=_,W=U||s.imageConfigDefault;if("allSizes"in W)M=W;else{let e=[...W.deviceSizes,...W.imageSizes].sort((e,t)=>e-t),t=W.deviceSizes.sort((e,t)=>e-t),r=W.qualities?.sort((e,t)=>e-t);M={...W,allSizes:e,deviceSizes:t,qualities:r}}if(void 0===L)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let N=T.loader||L;delete T.loader,delete T.srcSet;let F="__next_img_default"in N;if(F){if("custom"===M.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop. 11Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=N;N=t=>{let{config:r,...i}=t;return e(i)}}if(C){"fill"===C&&(v=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[C];e&&(y={...y,...e});let r={responsive:"100vw",fill:"100vw"}[C];r&&!t&&(t=r)}let V="",H=u(g),B=u(m);if((k=e)&&"object"==typeof k&&(a(k)||void 0!==k.src)){let t=a(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(R=t.blurWidth,D=t.blurHeight,$=$||t.blurDataURL,V=t.src,!v)if(H||B){if(H&&!B){let e=H/t.width;B=Math.round(t.height*e)}else if(!H&&B){let e=B/t.height;H=Math.round(t.width*e)}}else H=t.width,B=t.height}let G=!c&&!h&&("lazy"===d||void 0===d);(!(e="string"==typeof e?e:V)||e.startsWith("data:")||e.startsWith("blob:"))&&(r=!0,G=!1),M.unoptimized&&(r=!0),F&&!M.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(r=!0);let X=u(p),Q=Object.assign(v?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:S,objectPosition:A}:{},q?{}:{color:"transparent"},y),Y=z||"empty"===I?null:"blur"===I?`url("data:image/svg+xml;charset=utf-8,${(0,n.getImageBlurSvg)({widthInt:H,heightInt:B,blurWidth:R,blurHeight:D,blurDataURL:$||"",objectFit:Q.objectFit})}")`:`url("${I}")`,J=o.includes(Q.objectFit)?"fill"===Q.objectFit?"100% 100%":"cover":Q.objectFit,K=Y?{backgroundSize:J,backgroundPosition:Q.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:Y}:{},Z=function({config:e,src:t,unoptimized:r,width:n,quality:s,sizes:o,loader:a}){if(r){if(t.startsWith("/")&&!t.startsWith("//")){let e=(0,i.getDeploymentId)();if(t.includes("/_next/static/immutable")&&!(0,i.getAssetToken)())e=void 0;else if(e){let r=t.indexOf("?");if(-1!==r){let i=new URLSearchParams(t.slice(r+1));i.get("dpl")||(i.append("dpl",e),t=t.slice(0,r)+"?"+i.toString())}else t+=`?dpl=${e}`}}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:u,kind:l}=function({deviceSizes:e,allSizes:t},r,i){if(i){let r=/(^|\s)(1?\d?\d)vw/g,n=[];for(let e;e=r.exec(i);)n.push(parseInt(e[2]));if(n.length){let r=.01*Math.min(...n);return{widths:t.filter(t=>t>=e[0]*r),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof r?{widths:e,kind:"w"}:{widths:[...new Set([r,2*r].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,n,o),c=u.length-1;return{sizes:o||"w"!==l?o:"100vw",srcSet:u.map((r,i)=>`${a({config:e,src:t,quality:s,width:r})} ${"w"===l?r:i+1}${l}`).join(", "),src:a({config:e,src:t,quality:s,width:u[c]})}}({config:M,src:e,unoptimized:r,width:H,quality:X,sizes:t,loader:N}),ee=G?"lazy":d;return{props:{...T,loading:ee,fetchPriority:O,width:H,height:B,decoding:x,className:f,style:{...Q,...K},sizes:Z.sizes,srcSet:Z.srcSet,src:b||Z.src},meta:{unoptimized:r,preload:h||c,placeholder:I,fill:v}}}},48140,(e,t,r)=>{"use strict";
11Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ImageConfigContext",{enumerable:!0,get:function(){return s}});let i=e.r(836437)._(e.r(297865)),n=e.r(561900),s=i.default.createContext(n.imageConfigDefault)},576358,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={default:function(){return c},getImageProps:function(){return l}};for(var n in i)Object.defineProperty(r,n,{enumerable:!0,get:i[n]});let s=e.r(836437),o=e.r(34329),a=e.r(885584),u=s._(e.r(185904));function l(e){let{props:t}=(0,o.getImgProps)(e,{defaultLoader:u.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let c=a.Image},226761,(e,t,r)=>{t.exports=e.r(576358)}]); 12 13//# debugId=a4136886-91e3-e23f-c540-c185268e36d5
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.