1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,271011,708228,e=>{"use strict";let t=!(typeof navigator>"u")&&"ReactNative"===navigator.product,r={timeout:t?6e4:12e4},n=function(e){let n={...r,..."string"==typeof e?{url:e}:e};if(n.timeout=function e(t){if(!1===t||0===t)return!1;if(t.connect||t.socket)return t;let n=Number(t);return isNaN(n)?e(r.timeout):{connect:n,socket:n}}(n.timeout),n.query){let{url:e,searchParams:r}=function(e){let r=e.indexOf("?");if(-1===r)return{url:e,searchParams:new URLSearchParams};let n=e.slice(0,r),s=e.slice(r+1);if(!t)return{url:n,searchParams:new URLSearchParams(s)};if("function"!=typeof decodeURIComponent)throw Error("Broken `URLSearchParams` implementation, and `decodeURIComponent` is not defined");let o=new URLSearchParams;for(let e of s.split("&")){let[t,r]=e.split("=");t&&o.append(i(t),i(r||""))}return{url:n,searchParams:o}}(n.url);for(let[t,i]of Object.entries(n.query)){if(void 0!==i)if(Array.isArray(i))for(let e of i)r.append(t,e);else r.append(t,i);let s=r.toString();s&&(n.url=`${e}?${s}`)}}return n.method=n.body&&!n.method?"POST":(n.method||"GET").toUpperCase(),n};function i(e){return decodeURIComponent(e.replace(/\+/g," "))}let s=/^https?:\/\//i,o=function(e){if(!s.test(e.url))throw Error(`"${e.url}" is not a valid URL`)},a=["request","response","progress","error","abort"],u=["processOptions","validateOptions","interceptRequest","finalizeOptions","onRequest","onResponse","onError","onReturn","onHeaders"];var c,l,h,d=(c=function(){if(h)return l;h=1;var e=function(e){return e.replace(/^\s+|\s+$/g,"")};return l=function(t){if(!t)return{};for(var r=Object.create(null),n=e(t).split("\n"),i=0;i<n.length;i++){var s,o=n[i],a=o.indexOf(":"),u=e(o.slice(0,a)).toLowerCase(),c=e(o.slice(a+1));typeof r[u]>"u"?r[u]=c:(s=r[u],"[object Array]"===Object.prototype.toString.call(s))?r[u].push(c):r[u]=[r[u],c]}return r}}())&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c;class p{onabort;onerror;onreadystatechange;ontimeout;readyState=0;response;responseText="";responseType="";status;statusText;withCredentials;#e;#t;#r;#n={};#i;#s={};#o;open(e,t,r){this.#e=e,this.#t=t,this.#r="",this.readyState=1,this.onreadystatechange?.(),this.#i=void 0}abort(){this.#i&&this.#i.abort()}getAllResponseHeaders(){return this.#r}setRequestHeader(e,t){this.#n[e]=t}setInit(e,t=!0){this.#s=e,this.#o=t}send(e){let t="arraybuffer"!==this.responseType,r={...this.#s,method:this.#e,headers:this.#n,body:e};"function"==typeof AbortController&&this.#o&&(this.#i=new AbortController,"u">typeof EventTarget&&this.#i.signal instanceof EventTarget&&(r.signal=this.#i.signal)),"u">typeof document&&(r.credentials=this.withCredentials?"include":"omit"),fetch(this.#t,r).then(e=>(e.headers.forEach((e,t)=>{this.#r+=`${t}: ${e}\r 2`}),this.status=e.status,this.statusText=e.statusText,this.readyState=3,this.onreadystatechange?.(),t?e.text():e.arrayBuffer())).then(e=>{"string"==typeof e?this.responseText=e:this.response=e,this.readyState=4,this.onreadystatechange?.()}).catch(e=>{"AbortError"!==e.name?this.onerror?.(e):this.onabort?.()})}}let f="function"==typeof XMLHttpRequest?"xhr":"fetch",y="xhr"===f?XMLHttpRequest:p,m=(e,t)=>{let r=e.options,n=e.applyMiddleware("finalizeOptions",r),i={},s=e.applyMiddleware("interceptRequest",void 0,{adapter:f,context:e});if(s){let e=setTimeout(t,0,null,s);return{abort:()=>clearTimeout(e)}}let o=new y;o instanceof p&&"object"==typeof n.fetch&&o.setInit(n.fetch,n.useAbortSignal??!0);let a=n.headers,u=n.timeout,c=!1,l=!1,h=!1;if(o.onerror=e=>{b(o instanceof p?e instanceof Error?e:Error(`Request error while attempting to reach is ${n.url}`,{cause:e}):Error(`Request error while attempting to reach is ${n.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:""}`))},o.ontimeout=e=>{b(Error(`Request timeout while attempting to reach ${n.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:""}`))},o.onabort=()=>{g(!0),c=!0},o.onreadystatechange=function(){u&&(g(),i.socket=setTimeout(()=>m("ESOCKETTIMEDOUT"),u.socket)),!c&&o&&4===o.readyState&&0!==o.status&&function(){if(!(c||l||h)){if(0===o.status)return b(Error("Unknown XHR error"));g(),l=!0,t(null,{body:o.response||(""===o.responseType||"text"===o.responseType?o.responseText:""),url:n.url,method:n.method,headers:d(o.getAllResponseHeaders()),statusCode:o.status,statusMessage:o.statusText})}}()},o.open(n.method,n.url,!0),o.withCredentials=!!n.withCredentials,a&&o.setRequestHeader)for(let e in a)a.hasOwnProperty(e)&&o.setRequestHeader(e,a[e]);return n.rawBody&&(o.responseType="arraybuffer"),e.applyMiddleware("onRequest",{options:n,adapter:f,request:o,context:e}),o.send(n.body||null),u&&(i.connect=setTimeout(()=>m("ETIMEDOUT"),u.connect)),{abort:function(){c=!0,o&&o.abort()}};function m(t){h=!0,o.abort();let r=Error("ESOCKETTIMEDOUT"===t?`Socket timed out on request to ${n.url}`:`Connection timed out on request to ${n.url}`);r.code=t,e.channels.error.publish(r)}function g(e){(e||c||o&&o.readyState>=2&&i.connect)&&clearTimeout(i.connect),i.socket&&clearTimeout(i.socket)}function b(e){if(l)return;g(!0),l=!0,o=null;let r=e||Error(`Network error while attempting to reach ${n.url}`);r.isNetworkError=!0,r.request=n,t(r)}},g=(e=[],t=m)=>(function e(t,r){let i=[],s=u.reduce((e,t)=>
2(e[t]=e[t]||[],e),{processOptions:[n],validateOptions:[o]});function c(e){let t,n=a.reduce((e,t)=>{let r,n;return e[t]=(r=Object.create(null),n=0,{publish:function(e){for(let t in r)r[t](e)},subscribe:function(e){let t=n++;return r[t]=e,function(){delete r[t]}}}),e},{}),i=function(e,t,...r){let n="onError"===e,i=t;for(let t=0;t<s[e].length&&(i=(0,s[e][t])(i,...r),!n||i);t++);return i},o=i("processOptions",e);i("validateOptions",o);let u={options:o,channels:n,applyMiddleware:i},c=n.request.subscribe(e=>{t=r(e,(t,r)=>((e,t,r)=>{let s=e,o=t;if(!s)try{o=i("onResponse",t,r)}catch(e){o=null,s=e}(s=s&&i("onError",s,r))?n.error.publish(s):o&&n.response.publish(o)})(t,r,e))});n.abort.subscribe(()=>{c(),t&&t.abort()});let l=i("onReturn",n,u);return l===n&&n.request.publish(u),l}return c.use=function(e){if(!e)throw Error("Tried to add middleware that resolved to falsey value");if("function"==typeof e)throw Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");if(e.onReturn&&s.onReturn.length>0)throw Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");return u.forEach(t=>{e[t]&&s[t].push(e[t])}),i.push(e),c},c.clone=()=>e(i,r),t.forEach(c.use),c})(e,t);e.s(["adapter",()=>f,"environment",()=>"browser","getIt",()=>g],271011);var b,v,w,C,R,E=e.i(247167),q=e.i(467034),I={exports:{}};R||(R=1,function(e,t){let r;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;let r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))}),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch{}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch{}return!e&&"u">typeof E.default&&"env"in E.default&&(e=E.default.env.DEBUG),e},t.useColors=function(){let e;return"u">typeof window&&!!window.process&&("renderer"===window.process.type||!!window.process.__nwjs)||!("u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("u">typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"u">typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"u">typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch{}}(),r=!1,t.destroy=()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))},t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=(C?w:(C=1,w=function(e){function t(e){let n,i,s,o=null;function a(...e){if(!a.enabled)return;let r=Number(new Date);a.diff=r-(n||r),a.prev=n,a.curr=r,n=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,n)=>{if("%%"===r)return"%";i++;let s=t.formatters[n];if("function"==typeof s){let t=e[i];r=s.call(a,t),e.splice(i,1),i--}return r}),t.formatArgs.call(a,e),(a.log||t.log).apply(a,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,s=t.enabled(e)),s),set
2:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,r){let n=t(this.namespace+(typeof r>"u"?":":r)+e);return n.log=this.log,n}function n(e,t){let r=0,n=0,i=-1,s=0;for(;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(i=n,s=r):r++,n++;else{if(-1===i)return!1;n=i+1,r=++s}for(;n<t.length&&"*"===t[n];)n++;return n===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){let e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){for(let r of(t.save(e),t.namespaces=e,t.names=[],t.skips=[],("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean)))"-"===r[0]?t.skips.push(r.slice(1)):t.names.push(r)},t.enabled=function(e){for(let r of t.skips)if(n(e,r))return!1;for(let r of t.names)if(n(e,r))return!0;return!1},t.humanize=function(){if(v)return b;v=1;function e(e,t,r,n){return Math.round(e/r)+" "+n+(t>=1.5*r?"s":"")}return b=function(t,r){r=r||{};var n,i,s=typeof t;if("string"===s&&t.length>0){var o=t;if(!((o=String(o)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(o);if(a){var u=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*u;case"weeks":case"week":case"w":return 6048e5*u;case"days":case"day":case"d":return 864e5*u;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*u;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*u;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u}}}return}if("number"===s&&isFinite(t))return r.long?(i=Math.abs(t))>=864e5?e(t,i,864e5,"day"):i>=36e5?e(t,i,36e5,"hour"):i>=6e4?e(t,i,6e4,"minute"):i>=1e3?e(t,i,1e3,"second"):t+" ms":(n=Math.abs(t))>=864e5?Math.round(t/864e5)+"d":n>=36e5?Math.round(t/36e5)+"h":n>=6e4?Math.round(t/6e4)+"m":n>=1e3?Math.round(t/1e3)+"s":t+"ms";throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}}(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(r=>{t[r]=e[r]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t)|0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}))(t);let{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(I,I.exports)),I.exports,Object.prototype.hasOwnProperty;let $=typeof q.Buffer>"u"?()=>!1:e=>q.Buffer.isBuffer(e);function _(e){return"[object Object]"===Object.prototype.toString.call(e)}let O=["boolean","string","number"];function x(){return{processOptions:e=>{let t=e.body;return!t||"function"==typeof t.pipe||$(t)||-1===O.indexOf(typeof t)&&!Array.isArray(t)&&!function(e){if(!1===_(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!1!==_(r)&&!1!==r.hasOwnProperty("isPrototypeOf")}(t)?e:Object.assign({},e,{body:JSON.stringify(e.body),headers:Object.assign({},e.headers,{"Content-Type":"application/json"})})}}}function A(e){return{onResponse:t=>{let r=t.headers["content-type"]||"",n=e&&e.force||-1!==r.indexOf("application/json");return t.body&&r&&n?Object.assign({},t,{body:function(e){try{return JSON.parse(e)}catch(e){throw e.message=`Failed to parsed response body as JSON: ${e.message}`,e}}(t.body)}):t},processOptions:e=>Object.assign({},e,{headers:Object.assign({Accept:"application/json"},e.headers)})}}var S="u">typeof globalThis?globalThis:"u">typeof window?window:e.g;function j(e={}){let t=e.implementation||S.Observable;if(!t)throw Error("`Observable` is not available in global scope, and no implementation was passed");return{onReturn:(e,r)=>new t(t=>(e.error.subscribe(e=>t.error(e)),e.progress.subscribe(e=>t.next(Object.assign({type:"progress"},e))),e.response.subscribe(e=>{t.next(Object.assign({type:"response"},e)),t.complete()}),e.request.publish(r),()=>e.abort.publish()))}}function F(){return{onRequest:e=>{if("xhr"!==e.adapter)return;let t=e.request,r=e.context;function n(e){return t=>{let n=t.lengthComputable?t.loaded/t.total*100:-1;r.channels.progress.publish({stage:e,percent:n,total:t.total,loaded:t.loaded,lengthComputable:t.lengthComputable})}}"upload"in t&&"onprogress"in t.upload&&(t.upload.onprogress=n("upload")),"onprogress"in t&&(t.onprogress=n("download"))}}}let T=(e={})=>{let t=e.implementation||Promise;if(!t)throw Error("`Promise` is not available in global scope, and n
2o implementation was passed");return{onReturn:(r,n)=>new t((t,i)=>{let s=n.options.cancelToken;s&&s.promise.then(e=>{r.abort.publish(e),i(e)}),r.error.subscribe(i),r.response.subscribe(r=>{t(e.onlyBody?r.body:r)}),setTimeout(()=>{try{r.request.publish(n)}catch(e){i(e)}},0)})}};class P{__CANCEL__=!0;message;constructor(e){this.message=e}toString(){return"Cancel"+(this.message?`: ${this.message}`:"")}}class V{promise;reason;constructor(e){if("function"!=typeof e)throw TypeError("executor must be a function.");let t=null;this.promise=new Promise(e=>{t=e}),e(e=>{this.reason||(this.reason=new P(e),t(this.reason))})}static source=()=>{let e;return{token:new V(t=>{e=t}),cancel:e}}}T.Cancel=P,T.CancelToken=V,T.isCancel=e=>!(!e||!e?.__CANCEL__);var k=(e,t,r)=>("GET"===r.method||"HEAD"===r.method)&&(e.isNetworkError||!1);function D(e){return 100*Math.pow(2,e)+100*Math.random()}let M=(e={})=>{var t;let r,n,i;return r=(t={shouldRetry:k,...e}).maxRetries||5,n=t.retryDelay||D,i=t.shouldRetry,{onError:(e,t)=>{var s;let o=t.options,a=o.maxRetries||r,u=o.retryDelay||n,c=o.shouldRetry||i,l=o.attemptNumber||0;if(null!==(s=o.body)&&"object"==typeof s&&"function"==typeof s.pipe||!c(e,l,o)||l>=a)return e;let h=Object.assign({},t,{options:Object.assign({},o,{attemptNumber:l+1})});return setTimeout(()=>t.channels.request.publish(h),u(l)),null}}};M.shouldRetry=k,e.s(["jsonRequest",()=>x,"jsonResponse",()=>A,"observable",()=>j,"progress",()=>F,"retry",()=>M],708228)},673649,871041,e=>{"use strict";var t=e.i(603752);function r(e){return e&&(0,t.isFunction)(e.schedule)}function n(e){return e[e.length-1]}function i(e){return(0,t.isFunction)(n(e))?e.pop():void 0}function s(e){return r(n(e))?e.pop():void 0}function o(e,t){return"number"==typeof n(e)?e.pop():t}e.s(["isScheduler",()=>r],871041),e.s(["popNumber",()=>o,"popResultSelector",()=>i,"popScheduler",()=>s],673649)},330823,2223,e=>{"use strict";var t=e.i(220324),r=e.i(175436),n=e.i(902965),i=e.i(627608);function s(e,t){return void 0===t&&(t=0),(0,n.operate)(function(n,s){n.subscribe((0,i.createOperatorSubscriber)(s,function(n){return(0,r.executeSchedule)(s,e,function(){return s.next(n)},t)},function(){return(0,r.executeSchedule)(s,e,function(){return s.complete()},t)},function(n){return(0,r.executeSchedule)(s,e,function(){return s.error(n)},t)}))})}function o(e,t){return void 0===t&&(t=0),(0,n.operate)(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}var a=e.i(394426),u=e.i(177650),c=e.i(603752);function l(e,t){if(!e)throw Error("Iterable cannot be null");return new a.Observable(function(n){(0,r.executeSchedule)(n,t,function(){var i=e[Symbol.asyncIterator]();(0,r.executeSchedule)(n,t,function(){i.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}var h=e.i(717718),d=e.i(349449),p=e.i(987675),f=e.i(23515),y=e.i(238331),m=e.i(254824),g=e.i(311902);function b(e,n){if(null!=e){if((0,h.isInteropObservable)(e))return(0,t.innerFrom)(e).pipe(o(n),s(n));if((0,p.isArrayLike)(e))return new a.Observable(function(t){var r=0;return n.schedule(function(){r===e.length?t.complete():(t.next(e[r++]),t.closed||this.schedule())})});if((0,d.isPromise)(e))return(0,t.innerFrom)(e).pipe(o(n),s(n));if((0,y.isAsyncIterable)(e))return l(e,n);if((0,f.isIterable)(e))return new a.Observable(function(t){var i;return(0,r.executeSchedule)(t,n,function(){i=e[u.iterator](),(0,r.executeSchedule)(t,n,function(){var e,r,n;try{r=(e=i.next()).value,n=e.done}catch(e){t.error(e);return}n?t.complete():t.next(r)},0,!0)}),function(){return(0,c.isFunction)(null==i?void 0:i.return)&&i.return()}});if((0,g.isReadableStreamLike)(e))return l((0,g.readableStreamLikeToAsyncGenerator)(e),n)}throw(0,m.createInvalidObservableTypeError)(e)}function v(e,r){return r?b(e,r):(0,t.innerFrom)(e)}e.s(["scheduled",()=>b],2223),e.s(["from",()=>v],330823)},245281,e=>{"use strict";var t=e.i(673649),r=e.i(330823);function n(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=(0,t.popScheduler)(e);return(0,r.from)(e,i)}e.s(["of",()=>n])},245912,e=>{"use strict";var t=e.i(394426),r=e.i(603752);function n(e){return!!e&&(e instanceof t.Observable||(0,r.isFunction)(e.lift)&&(0,r.isFunction)(e.subscribe))}e.s(["isObservable",()=>n])},234915,e=>{"use strict";var t=(0,e.i(842093).createErrorClass)(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});e.s(["EmptyError",()=>t])},305753,e=>{"use strict";var t=e.i(234915);function r(e,r){var n="object"==typeof r;return new Promise(function(i,s){var o,a=!1;e.subscribe({next:function(e){o=e,a=!0},error:s,complete:function(){a?i(o):n?i(r.defaultValue):s(new t.EmptyError)}})})}e.s(["lastValueFrom",()=>r])},408659,e=>{"use strict";var t=e.i(290571),r=e.i(394426),n=e.i(909116),i=(0,e.i(842093).createErrorClass)(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),s=e.i(586903),o=e.i(140260),a=function(e){function a(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return(0,t.__extends)(a,e),a.prototype.lift=function(e){var t=new u(this,this);return t.operator=e,t},a.prototype._throwIfClosed=function(){if(this.closed)throw new i},a.prototype.next=function(e){var r=this;(0,o.errorContext)(function(){var n,i;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var s=(0,t.__values)(r.currentObservers),o=s.next();!o.done;o=s.next())o.value.next(e)}catch(e){n={error:e}}finally{try{o&&!o.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}}})},a.prototype.error=function(e){var t=this;(0,o.errorContext)(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}})},a.prototype.complete=function(){var e=this;(0,o.errorContext)(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},a.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(a.prototype,"observed",{get:function(){var e;return(null==(e=this.observers)?void 0:e.length)>0}
2,enumerable:!1,configurable:!0}),a.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},a.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},a.prototype._innerSubscribe=function(e){var t=this,r=this.hasError,i=this.isStopped,o=this.observers;return r||i?n.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new n.Subscription(function(){t.currentObservers=null,(0,s.arrRemove)(o,e)}))},a.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this.thrownError,n=this.isStopped;t?e.error(r):n&&e.complete()},a.prototype.asObservable=function(){var e=new r.Observable;return e.source=this,e},a.create=function(e,t){return new u(e,t)},a}(r.Observable),u=function(e){function r(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return(0,t.__extends)(r,e),r.prototype.next=function(e){var t,r;null==(r=null==(t=this.destination)?void 0:t.next)||r.call(t,e)},r.prototype.error=function(e){var t,r;null==(r=null==(t=this.destination)?void 0:t.error)||r.call(t,e)},r.prototype.complete=function(){var e,t;null==(t=null==(e=this.destination)?void 0:e.complete)||t.call(e)},r.prototype._subscribe=function(e){var t,r;return null!=(r=null==(t=this.source)?void 0:t.subscribe(e))?r:n.EMPTY_SUBSCRIPTION},r}(a);e.s(["Subject",()=>a],408659)},3670,e=>{"use strict";var t={now:function(){return(t.delegate||Date).now()},delegate:void 0};e.s(["dateTimestampProvider",()=>t])},740144,e=>{"use strict";var t=e.i(290571),r=e.i(408659),n=e.i(3670),i=function(e){function r(t,r,i){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===i&&(i=n.dateTimestampProvider);var s=e.call(this)||this;return s._bufferSize=t,s._windowTime=r,s._timestampProvider=i,s._buffer=[],s._infiniteTimeWindow=!0,s._infiniteTimeWindow=r===1/0,s._bufferSize=Math.max(1,t),s._windowTime=Math.max(1,r),s}return(0,t.__extends)(r,e),r.prototype.next=function(t){var r=this.isStopped,n=this._buffer,i=this._infiniteTimeWindow,s=this._timestampProvider,o=this._windowTime;!r&&(n.push(t),i||n.push(s.now()+o)),this._trimBuffer(),e.prototype.next.call(this,t)},r.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!e.closed;i+=r?1:2)e.next(n[i]);return this._checkFinalizedStatuses(e),t},r.prototype._trimBuffer=function(){var e=this._bufferSize,t=this._timestampProvider,r=this._buffer,n=this._infiniteTimeWindow,i=(n?1:2)*e;if(e<1/0&&i<r.length&&r.splice(0,r.length-i),!n){for(var s=t.now(),o=0,a=1;a<r.length&&r[a]<=s;a+=2)o=a;o&&r.splice(0,o+1)}},r}(r.Subject);e.s(["ReplaySubject",()=>i])},277497,e=>{"use strict";var t=e.i(290571),r=e.i(220324),n=e.i(408659),i=e.i(240126),s=e.i(902965);function o(e){void 0===e&&(e={});var t=e.connector,o=void 0===t?function(){return new n.Subject}:t,u=e.resetOnError,c=void 0===u||u,l=e.resetOnComplete,h=void 0===l||l,d=e.resetOnRefCountZero,p=void 0===d||d;return function(e){var t,n,u,l=0,d=!1,f=!1,y=function(){null==n||n.unsubscribe(),n=void 0},m=function(){y(),t=u=void 0,d=f=!1},g=function(){var e=t;m(),null==e||e.unsubscribe()};return(0,s.operate)(function(e,s){l++,f||d||y();var b=u=null!=u?u:o();s.add(function(){0!=--l||f||d||(n=a(g,p))}),b.subscribe(s),!t&&l>0&&(t=new i.SafeSubscriber({next:function(e){return b.next(e)},error:function(e){f=!0,y(),n=a(m,c,e),b.error(e)},complete:function(){d=!0,y(),n=a(m,h),b.complete()}}),(0,r.innerFrom)(e).subscribe(t))})(e)}}function a(e,n){for(var s=[],o=2;o<arguments.length;o++)s[o-2]=arguments[o];if(!0===n)return void e();if(!1!==n){var a=new i.SafeSubscriber({next:function(){a.unsubscribe(),e()}});return(0,r.innerFrom)(n.apply(void 0,(0,t.__spreadArray)([],(0,t.__read)(s)))).subscribe(a)}}e.s(["share",()=>o])},827341,e=>{"use strict";var t=e.i(740144),r=e.i(277497);function n(e,n,i){var s,o,a,u,c=!1;return e&&"object"==typeof e?(u=void 0===(s=e.bufferSize)?1/0:s,n=void 0===(o=e.windowTime)?1/0:o,c=void 0!==(a=e.refCount)&&a,i=e.scheduler):u=null!=e?e:1/0,(0,r.share)({connector:function(){return new t.ReplaySubject(u,n,i)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:c})}e.s(["shareReplay",()=>n])},992481,e=>{"use strict";var t=e.i(220324),r=e.i(627608),n=e.i(902965);e.s(["catchError",()=>function e(i){return(0,n.operate)(function(n,s){var o,a=null,u=!1;a=n.subscribe((0,r.createOperatorSubscriber)(s,void 0,void 0,function(r){o=(0,t.innerFrom)(i(r,e(i)(n))),a?(a.unsubscribe(),a=null,o.subscribe(s)):u=!0})),u&&(a.unsubscribe(),a=null,o.subscribe(s))})}])},844032,e=>{"use strict";var t=e.i(484973),r=e.i(979165);function n(e){return void 0===e&&(e=1/0),(0,t.mergeMap)(r.identity,e)}e.s(["mergeAll",()=>n])},602400,761101,e=>{"use strict";var t=e.i(844032);function r(){return(0,t.mergeAll)(1)}e.s(["concatAll",()=>r],761101);var n=e.i(673649),i=e.i(330823);function s(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r()((0,i.from)(e,(0,n.popScheduler)(e)))}e.s(["concat",()=>s],602400)},254201,e=>{"use strict";var t=e.i(394426),r=e.i(603752);function n(e,n){var i=(0,r.isFunction)(e)?e:function(){return e},s=function(e){return e.error(i())};return new t.Observable(n?function(e){return n.schedule(s,0,e)}:s)}e.s(["throwError",()=>n])},329418,e=>{"use strict";var t=e.i(290571),r=function(e){function r(t,r){return e.call(this)||this}return(0,t.__extends)(r,e),r.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},r}(e.i(909116).Subscription),n={setInterval:function(e,r){for(var i=[],s=2;s<arguments.length;s++)i[s-2]=arguments[s];var o=n.delegate;return(null==o?void 0:o.setInterval)?o.setInterval.apply(o,(0,t.__spreadArray)([e,r],(0,t.__read)(i))):setInterval.apply(void 0,(0,t.__spreadArray)([e,r],(0,t.__read)(i)))},clearInterval:function(e){var t=n.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},i=e.i(586903),s=function(e){function r(t,r){var n=e.call(this,t,r)||this;
2return n.scheduler=t,n.work=r,n.pending=!1,n}return(0,t.__extends)(r,e),r.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r,n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=null!=(r=this.id)?r:this.requestAsyncId(i,this.id,t),this},r.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),n.setInterval(e.flush.bind(e,this),r)},r.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&n.clearInterval(t)},r.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},r.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},r.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,(0,i.arrRemove)(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},r}(r);e.s(["AsyncAction",()=>s],329418)},629437,796989,e=>{"use strict";var t=e.i(329418),r=e.i(290571),n=e.i(3670),i=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=n.dateTimestampProvider.now,e}(),s=function(e){function t(t,r){void 0===r&&(r=i.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n}return(0,r.__extends)(t,e),t.prototype.flush=function(e){var t,r=this.actions;if(this._active)return void r.push(e);this._active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=r.shift())if(this._active=!1,t){for(;e=r.shift();)e.unsubscribe();throw t}},t}(i);e.s(["AsyncScheduler",()=>s],796989);var o=new s(t.AsyncAction);e.s(["async",()=>o,"asyncScheduler",()=>o],629437)},817312,161538,e=>{"use strict";var t=e.i(394426),r=e.i(629437),n=e.i(871041);function i(e){return e instanceof Date&&!isNaN(e)}function s(e,s,o){void 0===e&&(e=0),void 0===o&&(o=r.async);var a=-1;return null!=s&&((0,n.isScheduler)(s)?o=s:a=s),new t.Observable(function(t){var r=i(e)?e-o.now():e;r<0&&(r=0);var n=0;return o.schedule(function(){t.closed||(t.next(n++),0<=a?this.schedule(void 0,a):t.complete())},r)})}e.s(["isValidDate",()=>i],161538),e.s(["timer",()=>s],817312)},218692,128068,e=>{"use strict";var t=e.i(603752),r=e.i(902965),n=e.i(627608),i=e.i(979165);function s(e,s,o){var a=(0,t.isFunction)(e)||s||o?{next:e,error:s,complete:o}:e;return a?(0,r.operate)(function(e,t){null==(r=a.subscribe)||r.call(a);var r,i=!0;e.subscribe((0,n.createOperatorSubscriber)(t,function(e){var r;null==(r=a.next)||r.call(a,e),t.next(e)},function(){var e;i=!1,null==(e=a.complete)||e.call(a),t.complete()},function(e){var r;i=!1,null==(r=a.error)||r.call(a,e),t.error(e)},function(){var e,t;i&&(null==(e=a.unsubscribe)||e.call(a)),null==(t=a.finalize)||t.call(a)}))}):i.identity}function o(e){return(0,r.operate)(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}e.s(["tap",()=>s],218692),e.s(["finalize",()=>o],128068)},993817,e=>{"use strict";var t=e.i(844032),r=e.i(220324),n=e.i(96623),i=e.i(673649),s=e.i(330823);function o(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var a=(0,i.popScheduler)(e),u=(0,i.popNumber)(e,1/0);return e.length?1===e.length?(0,r.innerFrom)(e[0]):(0,t.mergeAll)(u)((0,s.from)(e,a)):n.EMPTY}e.s(["merge",()=>o])},839338,e=>{"use strict";var t=e.i(234915),r=e.i(240126);function n(e,n){var i="object"==typeof n;return new Promise(function(s,o){var a=new r.SafeSubscriber({next:function(e){s(e),a.unsubscribe()},error:o,complete:function(){i?s(n.defaultValue):o(new t.EmptyError)}});e.subscribe(a)})}e.s(["firstValueFrom",()=>n])},502448,e=>{"use strict";var t=Array.isArray,r=Object.getPrototypeOf,n=Object.prototype,i=Object.keys;function s(e){if(1===e.length){var s,o=e[0];if(t(o))return{args:o,keys:null};if((s=o)&&"object"==typeof s&&r(s)===n){var a=i(o);return{args:a.map(function(e){return o[e]}),keys:a}}}return{args:e,keys:null}}e.s(["argsArgArrayOrObject",()=>s])},630330,718244,e=>{"use strict";var t=e.i(394426),r=e.i(502448),n=e.i(330823),i=e.i(979165),s=e.i(272383),o=e.i(673649);function a(e,t){return e.reduce(function(e,r,n){return e[r]=t[n],e},{})}e.s(["createObject",()=>
2a],718244);var u=e.i(627608),c=e.i(175436);function l(){for(var e=[],u=0;u<arguments.length;u++)e[u]=arguments[u];var c=(0,o.popScheduler)(e),l=(0,o.popResultSelector)(e),d=(0,r.argsArgArrayOrObject)(e),p=d.args,f=d.keys;if(0===p.length)return(0,n.from)([],c);var y=new t.Observable(h(p,c,f?function(e){return a(f,e)}:i.identity));return l?y.pipe((0,s.mapOneOrManyArgs)(l)):y}function h(e,t,r){return void 0===r&&(r=i.identity),function(i){d(t,function(){for(var s=e.length,o=Array(s),a=s,c=s,l=function(s){d(t,function(){var l=(0,n.from)(e[s],t),h=!1;l.subscribe((0,u.createOperatorSubscriber)(i,function(e){o[s]=e,!h&&(h=!0,c--),c||i.next(r(o.slice()))},function(){--a||i.complete()}))},i)},h=0;h<s;h++)l(h)},i)}}function d(e,t,r){e?(0,c.executeSchedule)(r,e,t):t()}e.s(["combineLatest",()=>l,"combineLatestInit",()=>h],630330)},524888,545146,e=>{"use strict";var t=e.i(290571),r=e.i(630330),n=e.i(902965),i=Array.isArray;function s(e){return 1===e.length&&i(e[0])?e[0]:e}e.s(["argsOrArgArray",()=>s],545146);var o=e.i(272383),a=e.i(282541),u=e.i(673649);function c(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var l=(0,u.popResultSelector)(e);return l?(0,a.pipe)(c.apply(void 0,(0,t.__spreadArray)([],(0,t.__read)(e))),(0,o.mapOneOrManyArgs)(l)):(0,n.operate)(function(n,i){(0,r.combineLatestInit)((0,t.__spreadArray)([n],(0,t.__read)(s(e))))(i)})}function l(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return c.apply(void 0,(0,t.__spreadArray)([],(0,t.__read)(e)))}e.s(["combineLatestWith",()=>l],524888)},216024,e=>{"use strict";function t(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/_key\s*==\s*['"](.*)['"]/,i=/^\d*:\d*$/;function s(e){return"number"==typeof e||"string"==typeof e&&/^\[\d+\]$/.test(e)}function o(e){return"string"==typeof e?n.test(e.trim()):"object"==typeof e&&"_key"in e}function a(e){if("string"==typeof e&&i.test(e))return!0;if(!Array.isArray(e)||2!==e.length)return!1;let[t,r]=e;return("number"==typeof t||""===t)&&("number"==typeof r||""===r)}function u(e,t,r){let n="string"==typeof t?l(t):t;if(!Array.isArray(n))throw Error("Path must be an array or a string");let i=e;for(let e=0;e<n.length;e++){let t=n[e];if(s(t)){if(!Array.isArray(i))return r;i=i[t]}if(o(t)){if(!Array.isArray(i))return r;i=i.find(e=>e._key===t._key)}if("string"==typeof t&&(i="object"==typeof i&&null!==i?i[t]:void 0),typeof i>"u")return r}return i}function c(e){if(!Array.isArray(e))throw Error("Path is not an array");return e.reduce((e,t,r)=>{let n=typeof t;if("number"===n)return`${e}[${t}]`;if("string"===n)return`${e}${0===r?"":"."}${t}`;if(o(t)&&t._key)return`${e}[_key=="${t._key}"]`;if(Array.isArray(t)){let[r,n]=t;return`${e}[${r}:${n}]`}throw Error(`Unsupported path segment \`${JSON.stringify(t)}\``)},"")}function l(e){if("string"!=typeof e)throw Error("Path is not a string");let t=e.match(r);if(!t)throw Error("Invalid path string");return t.map(h)}function h(e){return s(e)?Number(e.replace(/[^\d]/g,"")):o(e)?{_key:e.match(n)[1]}:a(e)?function(e){let[t,r]=e.split(":").map(e=>""===e?e:Number(e));return[t,r]}(e):e}var d=Object.freeze({__proto__:null,fromString:l,get:u,isIndexSegment:s,isIndexTuple:a,isKeySegment:o,reKeySegment:n,toString:c});let p="drafts",f="versions",y=`${p}.`,m=`${f}.`;function g(e){return e.startsWith(y)}function b(e){return e.startsWith(m)}function v(e){return!g(e)&&!b(e)}function w(e){return b(e)?y+E(e):g(e)?e:y+e}function C(e,t){if("drafts"===t||"published"===t)throw Error('Version can not be "published" or "drafts"');return`${m}${t}.${E(e)}`}function R(e){if(!b(e))return;let[t,r,...n]=e.split(".");return r}function E(e){return b(e)?e.split(".").slice(2).join("."):g(e)?e.slice(y.length):e}let q={"\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","'":"\\'","\\":"\\\\"},I={"\\f":"\f","\\n":` 3`,"\\r":"\r","\\t":" ","\\'":"'","\\\\":"\\"};function $(e){return`$${e.map(e=>"string"==typeof e?`['${e.replace(/[\f\n\r\t'\\]/g,e=>q[e])}']`:"number"==typeof e?`[${e}]`:""!==e._key?`[?(@._key=='${e._key.replace(/['\\]/g,e=>q[e])}')]`:`[${e._index}]`).join("")}`}function _(e){let t,r=[],n=/\['(.*?)'\]|\[(\d+)\]|\[\?\(@\._key=='(.*?)'\)\]/g;for(;null!==(t=n.exec(e));){if(void 0!==t[1]){let e=t[1].replace(/\\(\\|f|n|r|t|')/g,e=>I[e]);r.push(e);continue}if(void 0!==t[2]){r.push(parseInt(t[2],10));continue}if(void 0!==t[3]){let e=t[3].replace(/\\(\\')/g,e=>I[e]);r.push({_key:e,_index:-1});continue}}return r}function O(e){return e.map(e=>{if("string"==typeof e||"number"==typeof e)return e;if(""!==e._key)return{_key:e._key};if(-1!==e._index)return e._index;throw Error(`invalid segment:${JSON.stringify(e)}`)})}function x(e){return("string"==typeof e?l(e):e).map(e=>{var t;if("string"==typeof e||"number"==typeof e)return e;if(Array.isArray(e))throw Error(`IndexTuple segments aren't supported:${JSON.stringify(e)}`);
3if("object"==typeof(t=e)&&"_key"in t&&"_index"in t)return e;if(e._key)return{_key:e._key,_index:-1};throw Error(`invalid segment:${JSON.stringify(e)}`)})}function A(e){return e.map(e=>{if("string"==typeof e||"number"==typeof e)return e;if(-1!==e._index)return e._index;throw Error(`invalid segment:${JSON.stringify(e)}`)})}function S(e,t){if(!t?.mappings)return;let r=$(A(e));if(void 0!==t.mappings[r])return{mapping:t.mappings[r],matchedPath:r,pathSuffix:""};let n=A(e).map(e=>"string"==typeof e?`['${e.replace(/[\f\n\r\t'\\]/g,e=>q[e])}']`:"number"==typeof e?`[${e}]`:""!==e._key?`[?(@._key=='${e._key.replace(/['\\]/g,e=>q[e])}')]`:`[${e._index}]`);for(let e=n.length-1;e>=0;e--){let i=`$${n.slice(0,e).join("")}`,s=t.mappings[i];if(s){let e=r.substring(i.length);return{mapping:s,matchedPath:i,pathSuffix:e}}}}function j(e){let{baseUrl:t,workspace:r="default",tool:n="default",id:i,type:s,path:o,projectId:a,dataset:u}=e;if(!t)throw Error("baseUrl is required");if(!o)throw Error("path is required");if(!i)throw Error("id is required");if("/"!==t&&t.endsWith("/"))throw Error("baseUrl must not end with a slash");let l="default"===r?void 0:r,h="default"===n?void 0:n,d=E(i),p=Array.isArray(o)?c(O(o)):o,f=new URLSearchParams({baseUrl:t,id:d,type:s,path:p});if(l&&f.set("workspace",l),h&&f.set("tool",h),a&&f.set("projectId",a),u&&f.set("dataset",u),v(i))f.set("perspective","published");else if(b(i)){let e=R(i);f.set("perspective",e)}let y=["/"===t?"":t];l&&y.push(l);let m=["mode=presentation",`id=${d}`,`type=${s}`,`path=${encodeURIComponent(p)}`];return h&&m.push(`tool=${h}`),y.push("intent","edit",`${m.join(";")}?${f}`),y.join("/")}function F(e){let{resultSourceMap:t,resultPath:r}=e,{mapping:n,pathSuffix:i}=S(r,t)||{};if(!n||"literal"===n.source.type||"unknown"===n.source.type)return;let s=t.documents[n.source.document],o=t.paths[n.source.path];if(s&&o){var a;let t,{baseUrl:r,workspace:n,tool:u}=("/"!==(t="string"==typeof(a="function"==typeof e.studioUrl?e.studioUrl(s):e.studioUrl)?a:a.baseUrl)&&(t=t.replace(/\/$/,"")),"string"==typeof a?{baseUrl:t}:{...a,baseUrl:t});if(!r)return;let{_id:c,_type:l,_projectId:h,_dataset:d}=s;return{baseUrl:r,workspace:n,tool:u,id:c,type:l,path:_(o+i),projectId:h,dataset:d}}}e.s(["DRAFTS_FOLDER",()=>p,"VERSION_FOLDER",()=>f,"createEditUrl",()=>j,"get",()=>u,"getDraftId",()=>w,"getPublishedId",()=>E,"getVersionFromId",()=>R,"getVersionId",()=>C,"isDraftId",()=>g,"isPublishedId",()=>v,"isVersionId",()=>b,"jsonPath",()=>$,"jsonPathToStudioPath",()=>O,"parseJsonPath",()=>_,"resolveEditInfo",()=>F,"resolveMapping",()=>S,"studioPath",()=>d,"studioPathToJsonPath",()=>x,"toString",()=>c,"walkMap",()=>function e(r,n,i=[]){if(null!==r&&Array.isArray(r))return r.map((r,s)=>{if(t(r)){let t=r._key;if("string"==typeof t)return e(r,n,i.concat({_key:t,_index:s}))}return e(r,n,i.concat(s))});if(t(r)){if("block"===r._type||"span"===r._type){let t={...r};return"block"===r._type?t.children=e(r.children,n,i.concat("children")):"span"===r._type&&(t.text=e(r.text,n,i.concat("text"))),t}return Object.fromEntries(Object.entries(r).map(([t,r])=>[t,e(r,n,i.concat(t))]))}return n(r,i)}],216024)},945736,148077,e=>{"use strict";var t,r=e.i(271011),n=e.i(708228),i=e.i(394426),s=e.i(172441),o=e.i(245281),a=e.i(245912),u=e.i(484973),c=e.i(330823),l=e.i(305753),h=e.i(827341),d=e.i(992481),p=e.i(602400),f=e.i(254201),y=e.i(817312),m=e.i(218692),g=e.i(128068),b=e.i(277497),v=e.i(993817),w=e.i(94059),C=e.i(839338),R=e.i(247984),E=e.i(524888),q=e.i(722249),I=e.i(216024);let $=e=>crypto.getRandomValues(new Uint8Array(e)),_=(e,t=21)=>{var r;let n,i;return r=t,i=-~(1.6*(n=(2<<Math.log(e.length-1)/Math.LN2)-1)*r/e.length),(t=r)=>{let s="";for(;;){let r=$(i),o=0|i;for(;o--;)if((s+=e[r[o]&n]||"").length===t)return s}}},O=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((e,t)=>((t&=63)<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+="-":e+="_",e),"");e.s(["customAlphabet",()=>_,"nanoid",()=>O],148077);let x=/\r\n|[\n\r\u2028\u2029]/;function A(e,t){let r=0;for(let n=0;n<t.length;n++){let i=t[n].length+1;if(r+i>e)return{line:n+1,column:e-r};r+=i}return{line:t.length,column:t[t.length-1]?.length??0}}
3class S extends Error{response;statusCode=400;responseBody;details;constructor(e,t){const r=F(e,t);super(r.message),Object.assign(this,r)}}class j extends Error{response;statusCode=500;responseBody;details;constructor(e){const t=F(e);super(t.message),Object.assign(this,t)}}function F(e,t){var r,n,i;let s=e.body,o={response:e,statusCode:e.statusCode,responseBody:(r=s,-1!==(e.headers["content-type"]||"").toLowerCase().indexOf("application/json")?JSON.stringify(r,null,2):r),message:"",details:void 0};if(!(0,R.isRecord)(s))return o.message=V(e,s),o;let a=s.error;if("string"==typeof a&&"string"==typeof s.message)return o.message=`${a} - ${s.message}`,o;if("object"!=typeof a||null===a)return"string"==typeof a?o.message=a:"string"==typeof s.message?o.message=s.message:o.message=V(e,s),o;if("type"in(n=a)&&"mutationError"===n.type&&"description"in n&&"string"==typeof n.description||"type"in(i=a)&&"actionError"===i.type&&"description"in i&&"string"==typeof i.description){let e=a.items||[],t=e.slice(0,5).map(e=>e.error?.description).filter(Boolean),r=t.length?`: 4- ${t.join(` 5- `)}`:"";return e.length>5&&(r+=` 6...and ${e.length-5} more`),o.message=`${a.description}${r}`,o.details=s.error,o}return T(a)?(o.message=P(a,t?.options?.query?.tag),o.details=s.error):"description"in a&&"string"==typeof a.description?(o.message=a.description,o.details=a):o.message=V(e,s),o}function T(e){return(0,R.isRecord)(e)&&"queryParseError"===e.type&&"string"==typeof e.query&&"number"==typeof e.start&&"number"==typeof e.end}function P(e,t){let{query:r,start:n,end:i,description:s}=e;if(!r||typeof n>"u")return`GROQ query parse error: ${s}`;let o=t?` 7 8Tag: ${t}`:"";return`GROQ query parse error: 9${function(e,t,r){let n=e.split(x),{start:i,end:s,markerLines:o}=function(e,t){let r={...e.start},n={...r,...e.end},i=r.line??-1,s=r.column??0,o=n.line,a=n.column,u=Math.max(i-3,0),c=Math.min(t.length,o+3);-1===i&&(u=0),-1===o&&(c=t.length);let l=o-i,h={};if(l)for(let e=0;e<=l;e++){let r=e+i;if(s)if(0===e){let e=t[r-1].length;h[r]=[s,e-s+1]}else if(e===l)h[r]=[0,a];else{let n=t[r-e].length;h[r]=[0,n]}else h[r]=!0}else s===a?s?h[i]=[s,0]:h[i]=!0:h[i]=[s,a-s];return{start:u,end:c,markerLines:h}}({start:A(t.start,n),end:t.end?A(t.end,n):void 0},n),a=`${s}`.length;return e.split(x,s).slice(i,s).map((e,t)=>{let n=i+1+t,s=` ${` ${n}`.slice(-a)} |`,u=o[n],c=!o[n+1];if(!u)return` ${s}${e.length>0?` ${e}`:""}`;let l="";if(Array.isArray(u)){let t=e.slice(0,Math.max(u[0]-1,0)).replace(/[^\t]/g," "),n=u[1]||1;l=` 10 `+s.replace(/\d/g," ")+" "+t+"^".repeat(n),c&&r&&(l+=" "+r)}return">"+s+(e.length>0?` ${e}`:"")+l}).join(` 11`)}(r,{start:n,end:i},s)}${o}`}function V(e,t){var r;let n="string"==typeof t?` (${(r=t).length>100?`${r.slice(0,100)}\u2026`:r})`:"",i=e.statusMessage?` ${e.statusMessage}`:"";return`${e.method}-request to ${e.url} resulted in HTTP ${e.statusCode}${i}${n}`}class k extends Error{projectId;addOriginUrl;constructor({projectId:e}){super("CorsOriginError"),this.name="CorsOriginError",this.projectId=e;const t=new URL(`https://sanity.io/manage/project/${e}/api`);if("u">typeof location){const{origin:e}=location;t.searchParams.set("cors","add"),t.searchParams.set("origin",e),this.addOriginUrl=t,this.message=`The current origin is not allowed to connect to the Live Content API. Add it here: ${t}`}else this.message=`The current origin is not allowed to connect to the Live Content API. Change your configuration here: ${t}`}}let D={onResponse:(e,t)=>{if(e.statusCode>=500)throw new j(e);if(e.statusCode>=400)throw new S(e,t);return e}};function M(e,t={}){return(0,r.getIt)([(0,n.retry)({shouldRetry:U}),...e,function(e={}){let t={},r=t=>void 0!==e.ignoreWarnings&&(Array.isArray(e.ignoreWarnings)?e.ignoreWarnings:[e.ignoreWarnings]).some(e=>"string"==typeof e?t.includes(e):e instanceof RegExp&&e.test(t));return{onResponse:e=>{let n=e.headers["x-sanity-warning"];for(let e of Array.isArray(n)?n:[n])!e||t[e]||r(e)||(t[e]=!0,console.warn(e));return e}}}(t),(0,n.jsonRequest)(),(0,n.jsonResponse)(),(0,n.progress)(),D,(0,n.observable)({implementation:i.Observable})])}function U(e,t,r){if(0===r.maxRetries)return!1;let i="GET"===r.method||"HEAD"===r.method,s=(r.uri||r.url).startsWith("/data/query"),o=e.response&&(429===e.response.statusCode||502===e.response.statusCode||503===e.response.statusCode);return(!!i||!!s)&&!!o||n.retry.shouldRetry(e,t,r)}function L(e){return"https://www.sanity.io/help/"+e}let N=["image","file"],z=["before","after","replace"],B=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")},H=(e,t)=>{if(null===t||"object"!=typeof t||Array.isArray(t))throw Error(`${e}() takes an object of properties`)},W=(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`)},G=(e,t)=>{if(!t._id)throw Error(`${e}() requires that the document contains an ID ("_id" property)`);W(e,t._id)},J=(e,t)=>
11{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`)},Y=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")},Q=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},K=e=>{let t=e.resource;if(!t)throw Error("`resource` must be provided to perform resource queries");let{type:r,id:n}=t;switch(r){case"dataset":if(2!==n.split(".").length)throw Error('Dataset resource ID must be in the format "project.dataset"');return;case"dashboard":case"media-library":case"canvas":return;default:throw Error(`Unsupported resource type: ${r.toString()}`)}},X=(e,t)=>{if(t.resource)throw Error(`\`${e}\` does not support resource-based operations`)},Z=e=>{var t;let r,n;return t=(...t)=>console.warn(e.join(" "),...t),r=!1,(...e)=>(r||(n=t(...e),r=!0),n)},ee=Z(["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"]),et=Z(["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."]),er=Z(["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."]),en=Z(["The `previewDrafts` perspective has been renamed to `drafts` and will be removed in a future API version"]),ei=Z(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.",`See ${L("js-client-browser-token")} for more information and how to hide this warning.`]),es=Z(["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`."]),eo=Z(["Using the Sanity client without specifying an API version is deprecated.",`See ${L("js-client-api-version")}`]),ea=(Z(["The default export of @sanity/client has been deprecated. Use the named export `createClient` instead."]),Z(["You have called `createVersion()` with a defined `document`. The recommended approach is to provide a `baseId` and `releaseId` instead."])),eu=Z(["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."]),ec={apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0,stega:{enabled:!1}},el=["localhost","127.0.0.1","0.0.0.0"];function eh(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 ed=(e,t)=>{let r,n={...t,...e,stega:{..."boolean"==typeof t.stega?{enabled:t.stega}:t.stega||ec.stega,..."boolean"==typeof e.stega?{enabled:e.stega}:e.stega||{}}};n.apiVersion||eo();let i={...ec,...n};i["~experimental_resource"]&&!i.resource&&(eu(),i.resource=i["~experimental_resource"]);let s=i.resource,o=i.useProjectHostname&&!s;if(typeof Promise>"u"){let e=L("js-client-promise-polyfill");throw Error(`No native Promise-implementation found, polyfill needed - see ${e}`)}if(o&&!i.projectId)throw Error("Configuration must contain `projectId`");if(s&&K(i),"u">typeof i.perspective&&eh(i.perspective),"encodeSourceMap"in i)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 i)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'?");
11if("boolean"!=typeof i.stega.enabled)throw Error(`stega.enabled must be a boolean, received ${i.stega.enabled}`);if(i.stega.enabled&&void 0===i.stega.studioUrl)throw Error("stega.studioUrl must be defined when stega.enabled is true");if(i.stega.enabled&&"string"!=typeof i.stega.studioUrl&&"function"!=typeof i.stega.studioUrl)throw Error(`stega.studioUrl must be a string or a function, received ${i.stega.studioUrl}`);let a="u">typeof window&&window.location&&window.location.hostname,u=a&&(r=window.location.hostname,-1!==el.indexOf(r)),c=!!i.token;i.withCredentials&&c&&(es(),i.withCredentials=!1),a&&u&&c&&!0!==i.ignoreBrowserTokenWarning?ei():typeof i.useCdn>"u"&&et(),o&&(e=>{if(!/^[-a-z0-9]+$/i.test(e))throw Error("`projectId` can only contain only a-z, 0-9 and dashes")})(i.projectId),i.dataset&&B(i.dataset),"requestTagPrefix"in i&&(i.requestTagPrefix=i.requestTagPrefix?Q(i.requestTagPrefix).replace(/\.+$/,""):void 0),i.apiVersion=`${i.apiVersion}`.replace(/^v/,""),i.isDefaultApi=i.apiHost===ec.apiHost,!0===i.useCdn&&i.withCredentials&&ee(),i.useCdn=!1!==i.useCdn&&!i.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`")}(i.apiVersion);let l=i.apiHost.split("://",2),h=l[0],d=l[1],p=i.isDefaultApi?"apicdn.sanity.io":d;return o?(i.url=`${h}://${i.projectId}.${d}/v${i.apiVersion}`,i.cdnUrl=`${h}://${i.projectId}.${p}/v${i.apiVersion}
11`):(i.url=`${i.apiHost}/v${i.apiVersion}`,i.cdnUrl=i.url),i};class ep extends Error{name="ConnectionFailedError"}class ef extends Error{name="DisconnectError";reason;constructor(e,t,r={}){super(e,r),this.reason=t}}class ey extends Error{name="ChannelError";data;constructor(e,t){super(e),this.data=t}}class em extends Error{name="MessageError";data;constructor(e,t,r={}){super(e,r),this.data=t}}class eg extends Error{name="MessageParseError"}let eb=["channelError","disconnect"];function ev(e,t){return(0,s.defer)(()=>{let t=e();return(0,a.isObservable)(t)?t:(0,o.of)(t)}).pipe((0,u.mergeMap)(e=>{var r,n;return r=e,n=t,new i.Observable(e=>{let t=n.includes("open"),i=n.includes("reconnect");function s(t){if("data"in t){let[r,n]=ew(t);e.error(r?new eg("Unable to parse EventSource error message",{cause:n}):new em((n?.data).message,n));return}r.readyState===r.CLOSED?e.error(new ep("EventSource connection failed")):i&&e.next({type:"reconnect"})}function o(){e.next({type:"open"})}function a(t){let[n,i]=ew(t);if(n)return void e.error(new eg("Unable to parse EventSource message",{cause:n}));if("channelError"===t.type){var s,o;let t,n=new URL(r.url).searchParams.get("tag");e.error(new ey((s=i?.data,o=n,(t=s.error)?T(t)?P(t,o):t.description?t.description:"string"==typeof t?t:JSON.stringify(t,null,2):s.message||"Unknown listener error"),i.data));return}"disconnect"===t.type?e.error(new ef(`Server disconnected client: ${i.data?.reason||"unknown error"}`)):e.next({type:t.type,id:t.lastEventId,...i.data?{data:i.data}:{}})}r.addEventListener("error",s),t&&r.addEventListener("open",o);let u=[...new Set([...eb,...n])].filter(e=>"error"!==e&&"open"!==e&&"reconnect"!==e);return u.forEach(e=>r.addEventListener(e,a)),()=>{r.removeEventListener("error",s),t&&r.removeEventListener("open",o),u.forEach(e=>r.removeEventListener(e,a)),r.close()}})}))}function ew(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 eC(e){if("string"==typeof e)return{id:e};if(Array.isArray(e))return{query:"*[_id in $ids]",params:{ids:e}};if("object"==typeof e&&null!==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};let t=["* Document ID (<docId>)","* Array of document IDs","* Object containing `query`"].join(` 12`);throw Error(`Unknown selection - must be one of: 13 14${t}`)}class eR{selection;operations;constructor(e,t={}){this.selection=e,this.operations=t}set(e){return this._assign("set",e)}setIfMissing(e){return this._assign("setIfMissing",e)}diffMatchPatch(e){return H("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 n="insert(at, selector, items)";if(-1===z.indexOf(e)){let e=z.map(e=>`"${e}"`).join(", ");throw Error(`${n} takes an "at"-argument which is one of: ${e}`)}if("string"!=typeof t)throw Error(`${n} takes a "selector"-argument which must be a string`);if(!Array.isArray(r))throw Error(`${n} 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,n){let i=t<0?t-1:t,s=typeof r>"u"||-1===r?-1:Math.max(0,t+r),o=`${e}[${i}:${i<0&&s>=0?"":s}]`;return this.insert("replace",o,n||[])}ifRevisionId(e){return this.operations.ifRevisionID=e,this}serialize(){return{...eC(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(e,t,r=!0){return H(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)}}class eE extends eR{#a;constructor(e,t,r){super(e,t),this.#a=r}clone(){return new eE(this.selection,{...this.operations},this.#a)}commit(e){if(!this.#a)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 this.#a.mutate({patch:this.serialize()},t)}}class eq extends eR{#a;constructor(e,t,r){super(e,t),this.#a=r}clone(){return new eq(this.selection,{...this.operations},this.#a)}commit(e){if(!this.#a)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 this.#a.mutate({patch:this.serialize()},t)}}let eI={returnDocuments:!1};class e${operations;trxId;constructor(e=[],t){this.operations=e,this.trxId=t}create(e){return H("create",e),this._add({create:e})}createIfNotExists(e){let t="createIfNotExists";return H(t,e),G(t,e),this._add({[t]:e})}createOrReplace(e){let t="createOrReplace";return H(t,e),G(t,e),this._add({[t]:e})}delete(e){return W("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}}class e_ extends e${#a;constructor(e,t,r){super(e,r),this.#a=t}clone(){return new e_([...this.operations],this.#a,this.trxId)}commit(e){if(!this.#a)throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.#a.mutate(this.serialize(),Object.assign({transactionId:this.trxId},eI,e||{}))}patch(e,t){let r="function"==typeof t,n="string"!=typeof e&&e instanceof eq,i="object"==typeof e&&("query"in e||"id"in e);if(n)return this._add({patch:e.serialize()});if(r){let r=t(new eq(e,{},this.#a));if(!(r instanceof eq))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}if(i){let r=new eq(e,t||{},this.#a);return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}class eO extends e${#a;constructor(e,t,r){super(e,r),this.#a=t}clone(){return new eO([...this.operations],this.#a,this.trxId)}commit(e){if(!this.#a)throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.#a.mutate(this.serialize(),Object.assign({transactionId:this.trxId},eI,e||{}))}patch(e,t){let r="function"==typeof t;if("string"!=typeof e&&e instanceof eE)return this._add({patch:e.serialize()});if(r){let r=t(new eE(e,{},this.#a));if(!(r instanceof eE))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}let ex=({query:e,params:t={},options:r={}})=>{let n=new URLSearchParams,{tag:i,includeMutations:s,returnQuery:o,...a}=r;for(let[r,s]of(i&&n.append("tag",i),n.append("query",e),Object.entries(t)))void 0!==s&&n.append(`$${r}`,JSON.stringify(s));for(let[e,t]of Object.entries(a))t&&n.append(e,`${t}`);return!1===o&&n.append("returnQuery","false"),!1===s&&n.append("includeMutations","fal
14se"),`?${n}`},eA=e=>"response"===e.type,eS=e=>e.body;function ej(t,r,n,i,s={},o={}){let a="stega"in o?{...n||{},..."boolean"==typeof o.stega?{enabled:o.stega}:o.stega||{}}:n,u=a.enabled?(0,R.stegaClean)(s):s,l=!1===o.filterResponse?e=>e:e=>e.result,{cache:h,next:d,...p}={useAbortSignal:"u">typeof o.signal,resultSourceMap:a.enabled?"withKeyArraySelector":o.resultSourceMap,...o,returnQuery:!1===o.filterResponse&&!1!==o.returnQuery},f=eW(t,r,"query",{query:i,params:u},"u">typeof h||"u">typeof d?{...p,fetch:{cache:h,next:d}}:p);return a.enabled?f.pipe((0,E.combineLatestWith)((0,c.from)(e.A(684927).then(function(e){return e.stegaEncodeSourceMap$1}).then(({stegaEncodeSourceMap:e})=>e))),(0,w.map)(([e,t])=>{let r=t(e.result,e.resultSourceMap,a);return l({...e,result:r})})):f.pipe((0,w.map)(l))}function eF(e,t,r,n={}){let i={uri:eX(e,"doc",(()=>{if(!n.releaseId)return r;let e=(0,I.getVersionFromId)(r);if(!e){if((0,I.isDraftId)(r))throw Error(`The document ID (\`${r}\`) is a draft, but \`options.releaseId\` is set as \`${n.releaseId}\``);return(0,I.getVersionId)(r,n.releaseId)}if(e!==n.releaseId)throw Error(`The document ID (\`${r}\`) is already a version of \`${e}\` release, but this does not match the provided \`options.releaseId\` (\`${n.releaseId}\`)`);return r})()),json:!0,tag:n.tag,signal:n.signal,query:void 0!==n.includeAllVersions?{includeAllVersions:n.includeAllVersions}:void 0};return eQ(e,t,i).pipe((0,q.filter)(eA),(0,w.map)(e=>{let t=e.body.documents;return t?n.includeAllVersions?t:t[0]:n.includeAllVersions?[]:void 0}))}function eT(e,t,r,n={}){let i={uri:eX(e,"doc",r.join(",")),json:!0,tag:n.tag,signal:n.signal};return eQ(e,t,i).pipe((0,q.filter)(eA),(0,w.map)(e=>{let t,n,i=(t=e.body.documents||[],n=e=>e._id,t.reduce((e,t)=>(e[n(t)]=t,e),Object.create(null)));return r.map(e=>i[e]||null)}))}function eP(e,t,r,n={}){return eW(e,t,"query",{query:"*[sanity::partOfRelease($releaseId)]",params:{releaseId:r}},n)}function eV(e,t,r,n){return G("createIfNotExists",r),eG(e,t,r,"createIfNotExists",n)}function ek(e,t,r,n){return G("createOrReplace",r),eG(e,t,r,"createOrReplace",n)}function eD(e,t,r,n,i){return G("createVersion",r),J("createVersion",r),ea(),eH(e,t,{actionType:"sanity.action.document.version.create",publishedId:n,document:r},i)}function eM(e,t,r,n,i,s,o){if(!n)throw Error("`createVersion()` requires `baseId` when no `document` is provided");if(!r)throw Error("`createVersion()` requires `publishedId` when `baseId` is provided");return W("createVersion",n),W("createVersion",r),eH(e,t,{actionType:"sanity.action.document.version.create",publishedId:r,baseId:n,versionId:i?(0,I.getVersionId)(r,i):(0,I.getDraftId)(r),ifBaseRevisionId:s},o)}function eU(e,t,r,n){return eW(e,t,"mutate",{mutations:[{delete:eC(r)}]},n)}function eL(e,t,r,n=!1,i){return eH(e,t,{actionType:"sanity.action.document.version.discard",versionId:r,purge:n},i)}function eN(e,t,r,n){return G("replaceVersion",r),J("replaceVersion",r),eH(e,t,{actionType:"sanity.action.document.version.replace",document:r},n)}function ez(e,t,r,n,i){return eH(e,t,{actionType:"sanity.action.document.version.unpublish",versionId:r,publishedId:n},i)}function eB(e,t,r,n){let i;return eW(e,t,"mutate",{mutations:Array.isArray(i=r instanceof eq||r instanceof eE?{patch:r.serialize()}:r instanceof e_||r instanceof eO?r.serialize():r)?i:[i],transactionId:n&&n.transactionId||void 0},n)}function eH(e,t,r,n){let i=Array.isArray(r)?r:[r],s=n&&n.transactionId||void 0;return eW(e,t,"actions",{actions:i,transactionId:s,skipCrossDatasetReferenceValidation:n&&n.skipCrossDatasetReferenceValidation||void 0,dryRun:n&&n.dryRun||void 0},n)}function eW(e,t,r,n,i={}){let s="mutate"===r,o="actions"===r,a=s||o?"":ex(n),u=!s&&!o&&a.length<11264,c=u?a:"",l=i.returnFirst,{timeout:h,token:d,tag:p,headers:f,returnQuery:y,lastLiveEventId:m,cacheMode:g}=i,b={method:u?"GET":"POST",uri:eX(e,r,c),json:!0,body:u?void 0:n,query:s&&((e={})=>{let t;return{dryRun:e.dryRun,returnIds:!0,returnDocuments:(t=e.returnDocuments,!1===t?void 0:!!(typeof t>"u")||t),visibility:e.visibility||"sync",autoGenerateArrayKeys:e.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:e.skipCrossDatasetReferenceValidation}})(i),timeout:h,headers:f,token:d,tag:p,returnQuery:y,perspective:i.perspective,resultSourceMap:i.resultSourceMap,lastLiveEventId:Array.isArray(m)?m[0]:m,cacheMode:g,canUseCdn:"query"===r,signal:i.signal,fetch:i.fetch,useAbortSignal:i.useAbortSignal,useCdn:i.useCdn};return eQ(e,t,b).pipe((0,q.filter)(eA),(0,w.map)(eS),(0,w.map)(e=>{if(!s)return e;let t=e.results||[];if(i.returnDocuments)return l?t[0]&&t[0].document:t.map(e=>e.document);let r=l?t[0]&&t[0].id:t.map(e=>e.id);return{transactionId:e.transactionId,results:t,[l?"documentId":"documentIds"]:r}}))}function eG(e,t,r,n,i={}){return eW(e,t,"mutate",{mutations:[{[n]:r}]},Object.assign({returnFirst:!0,returnDocuments:!0},i))}let eJ=e=>{let t=e.config();return void 0!==t.dataset&&void 0!==t.projectId||void 0!==t.resource},eY=(e,t)=>
14eJ(e)&&t.startsWith(eX(e,"query"));function eQ(e,t,r){var n;let s=r.url||r.uri,o=e.config(),a=typeof r.canUseCdn>"u"?["GET","HEAD"].indexOf(r.method||"GET")>=0&&(s.startsWith("/data/")||eY(e,s)||eJ(e)&&s.startsWith(eX(e,"mutate"))||eJ(e)&&s.startsWith(eX(e,"doc",""))||eJ(e)&&s.startsWith(eX(e,"listen"))||eJ(e)&&s.startsWith(eX(e,"history",""))):r.canUseCdn,u=(r.useCdn??o.useCdn)&&a,c=r.tag&&o.requestTagPrefix?[o.requestTagPrefix,r.tag].join("."):r.tag||o.requestTagPrefix;if(c&&null!==r.tag&&(r.query={tag:Q(c),...r.query}),["GET","HEAD","POST"].indexOf(r.method||"GET")>=0&&eY(e,s)){let e=r.resultSourceMap??o.resultSourceMap;void 0!==e&&!1!==e&&(r.query={resultSourceMap:e,...r.query});let t=r.perspective||o.perspective;"u">typeof t&&("previewDrafts"===t&&en(),eh(t),r.query={perspective:Array.isArray(t)?t.join(","):t,...r.query},(Array.isArray(t)&&t.length>0||"previewDrafts"===t||"drafts"===t)&&u&&(u=!1,er())),r.lastLiveEventId&&(r.query={...r.query,lastLiveEventId:r.lastLiveEventId}),!1===r.returnQuery&&(r.query={returnQuery:"false",...r.query}),u&&"noStale"==r.cacheMode&&(r.query={cacheMode:"noStale",...r.query})}let l=function(e,t={}){let r={};e.headers&&Object.assign(r,e.headers);let n=t.token||e.token;n&&(r.Authorization=`Bearer ${n}`),t.useGlobalApi||e.useProjectHostname||!e.projectId||(r["X-Sanity-Project-ID"]=e.projectId);let i=!!(typeof t.withCredentials>"u"?e.withCredentials:t.withCredentials),s=typeof t.timeout>"u"?e.timeout:t.timeout;return Object.assign({},t,{headers:Object.assign({},r,t.headers||{}),timeout:typeof s>"u"?3e5:s,proxy:t.proxy||e.proxy,json:!0,withCredentials:i,fetch:"object"==typeof t.fetch&&"object"==typeof e.fetch?{...e.fetch,...t.fetch}:t.fetch||e.fetch})}(o,Object.assign({},r,{url:eZ(e,s,u)})),h=new i.Observable(e=>t(l,o.requester).subscribe(e));return r.signal?h.pipe((n=r.signal,e=>new i.Observable(t=>{let r=()=>t.error(function(e){if(e0)return new DOMException(e?.reason??"The operation was aborted.","AbortError");let t=Error(e?.reason??"The operation was aborted.");return t.name="AbortError",t}(n));if(n&&n.aborted)return void r();let i=e.subscribe(t);return n.addEventListener("abort",r),()=>{n.removeEventListener("abort",r),i.unsubscribe()}}))):h}function eK(e,t,r){return eQ(e,t,r).pipe((0,q.filter)(e=>"response"===e.type),(0,w.map)(e=>e.body))}function eX(e,t,r){let n=e.config();if(n.resource){K(n);let e=e1(n),i=void 0!==r?`${t}/${r}`:t;return`${e}/${i}`.replace(/\/($|\?)/,"$1")}let i=Y(n),s=`/${t}/${i}`;return`/data${void 0!==r?`${s}/${r}`:s}`.replace(/\/($|\?)/,"$1")}function eZ(e,t,r=!1){let{url:n,cdnUrl:i}=e.config();return`${r?i:n}/${t.replace(/^\//,"")}`}let e0=!!globalThis.DOMException,e1=e=>{let t=e.resource;if(!t)throw Error("`resource` must be provided to perform resource queries");let{type:r,id:n}=t;switch(r){case"dataset":{let e=n.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/${n}`;case"media-library":return`/media-libraries/${n}`;case"dashboard":return`/dashboards/${n}`;default:throw Error(`Unsupported resource type: ${r.toString()}`)}};function e3(e,t,r){let n=Y(e.config());return eK(e,t,{method:"POST",uri:`/agent/action/generate/${n}`,body:r})}function e2(e,t,r){let n=Y(e.config());return eK(e,t,{method:"POST",uri:`/agent/action/transform/${n}`,body:r})}function e6(e,t,r){let n=Y(e.config());return eK(e,t,{method:"POST",uri:`/agent/action/translate/${n}`,body:r})}class e9{#a;#u;constructor(e,t){this.#a=e,this.#u=t}generate(e){return e3(this.#a,this.#u,e)}transform(e){return e2(this.#a,this.#u,e)}translate(e){return e6(this.#a,this.#u,e)}}class e4{#a;#u;constructor(e,t){this.#a=e,this.#u=t}generate(e){return(0,l.lastValueFrom)(e3(this.#a,this.#u,e))}transform(e){return(0,l.lastValueFrom)(e2(this.#a,this.#u,e))}translate(e){return(0,l.lastValueFrom)(e6(this.#a,this.#u,e))}prompt(e){var t,r;let n;return(0,l.lastValueFrom)((t=this.#a,r=this.#u,n=Y(t.config()),eK(t,r,{method:"POST",uri:`/agent/action/prompt/${n}`,body:e})))}patch(e){var t,r;let n;return(0,l.lastValueFrom)((t=this.#a,r=this.#u,n=Y(t.config()),eK(t,r,{method:"POST",uri:`/agent/action/patch/${n}`,body:e})))}}class e8{#a;#u;constructor(e,t){this.#a=e,this.#u=t}upload(e,t,r){return e5(this.#a,this.#u,e,t,r)}}class e7{#a;#u;
14constructor(e,t){this.#a=e,this.#u=t}upload(e,t,r){let n=e5(this.#a,this.#u,e,t,r);return(0,l.lastValueFrom)(n.pipe((0,q.filter)(e=>"response"===e.type),(0,w.map)(e=>e.body.document)))}}function e5(e,t,r,n,i={}){var s,o;if(-1===N.indexOf(r))throw Error(`Invalid asset type: ${r}. Must be one of ${N.join(", ")}`);let a=i.extract||void 0;a&&!a.length&&(a=["none"]);let u=e.config(),c=(s=i,o=n,!(typeof File>"u")&&o instanceof File?Object.assign({filename:!1===s.preserveFilename?void 0:o.name,contentType:o.type},s):s),{tag:l,label:h,title:d,description:p,creditLine:f,filename:y,source:m}=c,g=u.resource?.type==="media-library",b=g?{title:d,filename:y}:{label:h,title:d,description:p,filename:y,meta:a,creditLine:f};return m&&!g&&(b.sourceId=m.id,b.sourceName=m.name,b.sourceUrl=m.url),eQ(e,t,{tag:l,method:"POST",timeout:c.timeout||0,uri:function(e,t){let r="image"===t?"images":"files",n=e.resource;if(n){let{type:e,id:t}=n;switch(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"media-library":return`/media-libraries/${t}/upload`;case"dashboard":return`/dashboards/${t}/assets/${r}`;default:throw Error(`Unsupported resource type: ${e.toString()}`)}}let i=Y(e);return`assets/${r}/${i}`}(u,r),headers:c.contentType?{"Content-Type":c.contentType}:{},query:b,body:n})}let te=(0,s.defer)(()=>e.A(627649)).pipe((0,w.map)(({default:e})=>e),(0,h.shareReplay)(1));function tt(){return function(e){return e.pipe((0,d.catchError)((e,t)=>e instanceof ep?(0,p.concat)((0,o.of)({type:"reconnect"}),(0,y.timer)(1e3).pipe((0,u.mergeMap)(()=>t))):(0,f.throwError)(()=>e)))}}let tr=["includePreviousRevision","includeResult","includeMutations","includeAllVersions","visibility","effectFormat","enableResume","tag"],tn={includeResult:!0};function ti(e,t,r={}){let{url:n,token:i,withCredentials:s,requestTagPrefix:a,headers:u}=this.config(),c=r.tag&&a?[a,r.tag].join("."):r.tag,l={...Object.keys(tn).concat(Object.keys(r)).reduce((e,t)=>(e[t]=typeof r[t]>"u"?tn[t]:r[t],e),{}),tag:c},h=ex({query:e,params:t,options:{tag:c,...tr.reduce((e,t)=>(typeof l[t]>"u"||(e[t]=l[t]),e),{})}}),d=`${n}${eX(this,"listen",h)}`;if(d.length>14800)return(0,f.throwError)(()=>Error("Query too large for listener"));let p=l.events?l.events:["mutation"],y={};return s&&(y.withCredentials=!0),(i||u)&&(y.headers={},i&&(y.headers.Authorization=`Bearer ${i}`),u&&Object.assign(y.headers,u)),ev(()=>(typeof EventSource>"u"||y.headers?te:(0,o.of)(EventSource)).pipe((0,w.map)(e=>new e(d,y))),p).pipe(tt(),(0,q.filter)(e=>p.includes(e.type)),(0,w.map)(e=>({type:e.type,..."data"in e?e.data:{}})))}let ts="2021-03-25";class to{#a;constructor(e){this.#a=e}events({includeDrafts:e=!1,tag:t}={}){var r,n,s,a;let{projectId:c,apiVersion:l,token:h,withCredentials:p,requestTagPrefix:f,headers:y}=this.#a.config(),C=l.replace(/^v/,"");if("X"!==C&&C<ts)throw Error(`The live events API requires API version ${ts} or later. The current API version is ${C}. Please update your API version to use this feature.`);if(e&&!h&&!p)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 R=eX(this.#a,"live/events"),E=new URL(this.#a.getUrl(R,!1)),q=t&&f?[f,t].join("."):t;q&&E.searchParams.set("tag",q),e&&E.searchParams.set("includeDrafts","true");let I={};e&&p&&(I.withCredentials=!0),(e&&h||y)&&(I.headers={},e&&h&&(I.headers.Authorization=`Bearer ${h}`),y&&Object.assign(I.headers,y));let $=`${E.href}::${JSON.stringify(I)}`,_=ta.get($);if(_)return _;let O=ev(()=>(typeof EventSource>"u"||I.headers?te:(0,o.of)(EventSource)).pipe((0,w.map)(e=>new e(E.href,I))),["message","restart","welcome","reconnect","goaway"]),x=(n=E,s={method:"OPTIONS",mode:"cors",credentials:I.withCredentials?"include":"omit",headers:I.headers},new i.Observable(e=>{let t=new AbortController,r=t.signal;return fetch(n,{...s,signal:t.signal}).then(t=>{e.next(t),e.complete()},t=>{r.aborted||e.error(t)}),()=>t.abort()})).pipe((0,d.catchError)(()=>{throw new k({projectId:c})})),A=O.pipe(tt(),(0,u.mergeMap)(e=>"reconnect"===e.type?x.pipe((0,u.mergeMap)(()=>(0,o.of)(e))):(0,o.of)(e)),(0,d.catchError)(e=>x.pipe((0,u.mergeMap)(()=>{throw e}))),(0,w.map)(e=>{if("message"===e.type){let{data:t,...r}=e;return{...r,tags:t.tags}}return e})).pipe((0,g.finalize)(()=>ta.delete($)),(a="function"==typeof(r={predicate:e=>"welcome"===e.type})?{predicate:r,...void 0}:r,e=>{let t,r=!1,{predicate:n,...s}=a,o=e.pipe((0,m.tap)(e=>{a.predicate(e)&&(r=!0,t=e)}),(0,g.finalize)(()=>{r=!1,t=void 0}),(0,b.share)(s)),u=new i.Observable(e=>{r&&e.next(t),e.complete()});return(0,v.merge)(o,u)}));return ta.set($,A),A}}let ta=new Map;class tu{#a;#u;constructor(e,t){this.#a=e,this.#u=t}create(e,t){return tl(this.#a,this.#u,"PUT",e,t)}edit(e,t){return tl(this.#a,this.#u,"PATCH",e,t)}delete(e){return tl(this.#a,this.#u,"DELETE",e)}list(){X("dataset",this.#a.config());let e=this.#a.config(),t=e.projectId,r="/datasets";return!1===e.useProjectHostname&&(r=`/projects/${t}/datasets`),eK(this.#a,this.#u,{uri:r,tag:null})}}class tc{#a;#u;
14constructor(e,t){this.#a=e,this.#u=t}create(e,t){return X("dataset",this.#a.config()),(0,l.lastValueFrom)(tl(this.#a,this.#u,"PUT",e,t))}edit(e,t){return X("dataset",this.#a.config()),(0,l.lastValueFrom)(tl(this.#a,this.#u,"PATCH",e,t))}delete(e){return X("dataset",this.#a.config()),(0,l.lastValueFrom)(tl(this.#a,this.#u,"DELETE",e))}list(){X("dataset",this.#a.config());let e=this.#a.config(),t=e.projectId,r="/datasets";return!1===e.useProjectHostname&&(r=`/projects/${t}/datasets`),(0,l.lastValueFrom)(eK(this.#a,this.#u,{uri:r,tag:null}))}}function tl(e,t,r,n,i){return X("dataset",e.config()),B(n),eK(e,t,{method:r,uri:`/datasets/${n}`,body:i,tag:null})}class th{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getPlaybackInfo(e,t={}){var r,n;let i=this.#a.config(),s=(i.resource||i["~experimental_resource"])?.id,{instanceId:o,libraryId:a}=function(e){let t="object"==typeof e&&"_ref"in e?e._ref:e,r=tp.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`)}(e),u=a||s;if(!u)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 c=(r=o,n=u,`/media-libraries/${n}/video/${r}/playback-info`),l=function(e){let t={};if(e.transformations){let{thumbnail:r,animated:n,storyboard:i}=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)),n&&(n.width&&(t.animatedWidth=n.width),n.height&&(t.animatedHeight=n.height),void 0!==n.start&&(t.animatedStart=n.start),void 0!==n.end&&(t.animatedEnd=n.end),n.fps&&(t.animatedFps=n.fps),n.format&&(t.animatedFormat=n.format)),i&&i.format&&(t.storyboardFormat=i.format)}return e.expiration&&(t.expiration=e.expiration),t}(t);return eK(this.#a,this.#u,{method:"GET",uri:c,query:l})}}class td{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getPlaybackInfo(e,t={}){return(0,l.lastValueFrom)(new th(this.#a.observable,this.#u).getPlaybackInfo(e,t))}}let tp=/^media-library:(ml[^:]+):([^:]+)$/;class tf{#a;#u;constructor(e,t){this.#a=e,this.#u=t}list(e){let t={};return e?.includeMembers===!1&&(t.includeMembers="false"),e?.organizationId&&(t.organizationId=e.organizationId),eK(this.#a,this.#u,{uri:"/projects",query:t})}getById(e){return eK(this.#a,this.#u,{uri:`/projects/${e}`})}}class ty{#a;#u;constructor(e,t){this.#a=e,this.#u=t}list(e){let t={};return e?.includeMembers===!1&&(t.includeMembers="false"),e?.organizationId&&(t.organizationId=e.organizationId),(0,l.lastValueFrom)(eK(this.#a,this.#u,{uri:"/projects",query:t}))}getById(e){return(0,l.lastValueFrom)(eK(this.#a,this.#u,{uri:`/projects/${e}`}))}}let tm=_("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",8),tg=(e,t)=>t?(0,I.getVersionId)(e,t):(0,I.getDraftId)(e);function tb(e,{releaseId:t,publishedId:r,document:n}){if(r&&n._id){let e=tg(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,n),e}if(n._id){let r=(0,I.isDraftId)(n._id),i=(0,I.isVersionId)(n._id);if(!r&&!i)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 (\`${n._id}\`) that is a draft ID, but a release ID (\`${t}\`) was also provided.`);let i=(0,I.getVersionFromId)(n._id);if(i!==t)throw Error(`\`${e}()\` was called with a document ID (\`${n._id}\`) that is a version ID, but the release ID (\`${t}\`) does not match the document's version ID (\`${i}\`).`)}return n._id}if(r)return tg(r,t);throw Error(`\`${e}()\` requires either a publishedId or a document with an \`_id\``)}let tv=(e,t)=>{let[r,n,i]=((e,t)=>{if("object"==typeof e&&null!==e&&("releaseId"in e||"metadata"in e)){let{releaseId:r=tm(),metadata:n={}}=e;return[r,n,t]}return[tm(),{},e]})(e,t);return{action:{actionType:"sanity.action.release.create",releaseId:r,metadata:{...n,releaseType:n.releaseType||"undecided"}},options:i}};class tw{#a;#u;
14constructor(e,t){this.#a=e,this.#u=t}get({releaseId:e},t){return eF(this.#a,this.#u,`_.releases.${e}`,t)}create(e,t){let{action:r,options:n}=tv(e,t),{releaseId:i,metadata:s}=r;return eH(this.#a,this.#u,r,n).pipe((0,w.map)(e=>({...e,releaseId:i,metadata:s})))}edit({releaseId:e,patch:t},r){return eH(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r)}publish({releaseId:e},t){return eH(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:e},t)}archive({releaseId:e},t){return eH(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:e},t)}unarchive({releaseId:e},t){return eH(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:e},t)}schedule({releaseId:e,publishAt:t},r){return eH(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r)}unschedule({releaseId:e},t){return eH(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:e},t)}delete({releaseId:e},t){return eH(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:e},t)}fetchDocuments({releaseId:e},t){return eP(this.#a,this.#u,e,t)}}class tC{#a;#u;constructor(e,t){this.#a=e,this.#u=t}get({releaseId:e},t){return(0,l.lastValueFrom)(eF(this.#a,this.#u,`_.releases.${e}`,t))}async create(e,t){let{action:r,options:n}=tv(e,t),{releaseId:i,metadata:s}=r;return{...await (0,l.lastValueFrom)(eH(this.#a,this.#u,r,n)),releaseId:i,metadata:s}}edit({releaseId:e,patch:t},r){return(0,l.lastValueFrom)(eH(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r))}publish({releaseId:e},t){return(0,l.lastValueFrom)(eH(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:e},t))}archive({releaseId:e},t){return(0,l.lastValueFrom)(eH(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:e},t))}unarchive({releaseId:e},t){return(0,l.lastValueFrom)(eH(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:e},t))}schedule({releaseId:e,publishAt:t},r){return(0,l.lastValueFrom)(eH(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r))}unschedule({releaseId:e},t){return(0,l.lastValueFrom)(eH(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:e},t))}delete({releaseId:e},t){return(0,l.lastValueFrom)(eH(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:e},t))}fetchDocuments({releaseId:e},t){return(0,l.lastValueFrom)(eP(this.#a,this.#u,e,t))}}class tR{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getById(e){return eK(this.#a,this.#u,{uri:`/users/${e}`})}}class tE{#a;#u;
14constructor(e,t){this.#a=e,this.#u=t}getById(e){return(0,l.lastValueFrom)(eK(this.#a,this.#u,{uri:`/users/${e}`}))}}class tq{assets;datasets;live;mediaLibrary;projects;users;agent;releases;#c;#u;listen=ti;constructor(e,t=ec){this.config(t),this.#u=e,this.assets=new e8(this,this.#u),this.datasets=new tu(this,this.#u),this.live=new to(this),this.mediaLibrary={video:new th(this,this.#u)},this.projects=new tf(this,this.#u),this.users=new tR(this,this.#u),this.agent={action:new e9(this,this.#u)},this.releases=new tw(this,this.#u)}clone(){return new tq(this.#u,this.config())}config(e){if(void 0===e)return{...this.#c};if(this.#c&&!1===this.#c.allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.#c=ed(e,this.#c||{}),this}withConfig(e){let t=this.config();return new tq(this.#u,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return ej(this,this.#u,this.#c.stega,e,t,r)}getDocument(e,t){if(t?.includeAllVersions===!0)return eF(this,this.#u,e,{...t,includeAllVersions:!0});let r={signal:t?.signal,tag:t?.tag,releaseId:t?.releaseId,...t&&"includeAllVersions"in t?{includeAllVersions:!1}:{}};return eF(this,this.#u,e,r)}getDocuments(e,t){return eT(this,this.#u,e,t)}create(e,t){return eG(this,this.#u,e,"create",t)}createIfNotExists(e,t){return eV(this,this.#u,e,t)}createOrReplace(e,t){return ek(this,this.#u,e,t)}createVersion({document:e,publishedId:t,releaseId:r,baseId:n,ifBaseRevisionId:i},s){if(!e)return eM(this,this.#u,t,n,r,i,s);let o=tb("createVersion",{document:e,publishedId:t,releaseId:r}),a={...e,_id:o},u=t||(0,I.getPublishedId)(e._id);return eD(this,this.#u,a,u,s)}delete(e,t){return eU(this,this.#u,e,t)}discardVersion({releaseId:e,publishedId:t},r,n){let i=tg(t,e);return eL(this,this.#u,i,r,n)}replaceVersion({document:e,publishedId:t,releaseId:r},n){let i=tb("replaceVersion",{document:e,publishedId:t,releaseId:r}),s={...e,_id:i};return eN(this,this.#u,s,n)}unpublishVersion({releaseId:e,publishedId:t},r){let n=(0,I.getVersionId)(t,e);return ez(this,this.#u,n,t,r)}mutate(e,t){return eB(this,this.#u,e,t)}patch(e,t){return new eE(e,t,this)}transaction(e){return new eO(e,this)}action(e,t){return eH(this,this.#u,e,t)}request(e){return eK(this,this.#u,e)}getUrl(e,t){return eZ(this,e,t)}getDataUrl(e,t){return eX(this,e,t)}}class tI{assets;datasets;live;mediaLibrary;projects;users;agent;releases;observable;#c;#u;listen=ti;constructor(e,t=ec){this.config(t),this.#u=e,this.assets=new e7(this,this.#u),this.datasets=new tc(this,this.#u),this.live=new to(this),this.mediaLibrary={video:new td(this,this.#u)},this.projects=new ty(this,this.#u),this.users=new tE(this,this.#u),this.agent={action:new e4(this,this.#u)},this.releases=new tC(this,this.#u),this.observable=new tq(e,t)}clone(){return new tI(this.#u,this.config())}config(e){if(void 0===e)return{...this.#c};if(this.#c&&!1===this.#c.allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.observable&&this.observable.config(e),this.#c=ed(e,this.#c||{}),this}withConfig(e){let t=this.config();return new tI(this.#u,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return(0,l.lastValueFrom)(ej(this,this.#u,this.#c.stega,e,t,r))}getDocument(e,t){if(t?.includeAllVersions===!0)return(0,l.lastValueFrom)(eF(this,this.#u,e,{...t,includeAllVersions:!0}));let r={signal:t?.signal,tag:t?.tag,releaseId:t?.releaseId,...t&&"includeAllVersions"in t?{includeAllVersions:!1}:{}};return(0,l.lastValueFrom)(eF(this,this.#u,e,r))}getDocuments(e,t){return(0,l.lastValueFrom)(eT(this,this.#u,e,t))}create(e,t){return(0,l.lastValueFrom)(eG(this,this.#u,e,"create",t))}createIfNotExists(e,t){return(0,l.lastValueFrom)(eV(this,this.#u,e,t))}createOrReplace(e,t){return(0,l.lastValueFrom)(ek(this,this.#u,e,t))}createVersion({document:e,publishedId:t,releaseId:r,baseId:n,ifBaseRevisionId:i},s){if(!e)return(0,C.firstValueFrom)(eM(this,this.#u,t,n,r,i,s));let o=tb("createVersion",{document:e,publishedId:t,releaseId:r}),a={...e,_id:o},u=t||(0,I.getPublishedId)(e._id);return(0,C.firstValueFrom)(eD(this,this.#u,a,u,s))}delete(e,t){return(0,l.lastValueFrom)(eU(this,this.#u,e,t))}discardVersion({releaseId:e,publishedId:t},r,n){let i=tg(t,e);return(0,l.lastValueFrom)(eL(this,this.#u,i,r,n))}replaceVersion({document:e,publishedId:t,releaseId:r},n){let i=tb("replaceVersion",{document:e,publishedId:t,releaseId:r}),s={...e,_id:i};return(0,C.firstValueFrom)(eN(this,this.#u,s,n))}unpublishVersion({releaseId:e,publishedId:t},r){let n=(0,I.getVersionId)(t,e);return(0,l.lastValueFrom)(ez(this,this.#u,n,t,r))}mutate(e,t){return(0,l.lastValueFrom)(eB(this,this.#u,e,t))}patch(e,t){return new eq(e,t,this)}transaction(e){return new e_(e,this)}action(e,t){return(0,l.lastValueFrom)(eH(this,this.#u,e,t))}request(e){return(0,l.lastValueFrom)(eK(this,this.#u,e))}dataRequest(e,t,r){return(0,l.lastValueFrom)(eW(this,this.#u,e,t,r))}getUrl(e,t){return eZ(this,e,t)}getDataUrl(e,t){return eX(this,e,t)}}
14let t$={requester:M(t=[]),createClient:e=>{let r=M(t,{ignoreWarnings:e.ignoreWarnings});return new tI((t,n)=>(n||r)({maxRedirects:0,maxRetries:e.maxRetries,retryDelay:e.retryDelay,lineage:e.lineage,...t}),e)}},t_=(t$.requester,t$.createClient);e.s(["ChannelError",()=>ey,"ClientError",()=>S,"CorsOriginError",()=>k,"ServerError",()=>j,"createClient",()=>t_,"validateApiPerspective",()=>eh],945736)}]);
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.