PageSourceSearch

https://www.walk15.app/_next/static/chunks/1494.e807e5fab636ca2d.js

js walk15.app collected 2026-10-04 00:23:03 UTC 405,516 bytes, 362 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d0840c2b-5cbd-469b-8973-a06a47082316",e._sentryDebugIdIdentifier="sentry-dbid-d0840c2b-5cbd-469b-8973-a06a47082316")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1494],{66151:function(e,t,n){"use strict";n.d(t,{do:function(){return G}});var r,i,o,a=[],s="ResizeObserver loop completed with undelivered notifications.",l=function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:s}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=s),window.dispatchEvent(e)};(r=i||(i={})).BORDER_BOX="border-box",r.CONTENT_BOX="content-box",r.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box";var u=function(e){return Object.freeze(e)},c=function(e,t){this.inlineSize=e,this.blockSize=t,u(this)},d=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,u(this)}return e.prototype.toJSON=function(){return{x:this.x,y:this.y,top:this.top,right:this.right,bottom:this.bottom,left:this.left,width:this.width,height:this.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),h=function(e){return e instanceof SVGElement&&"getBBox"in e},f=function(e){if(h(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e.offsetWidth,o=e.offsetHeight;return!(i||o||e.getClientRects().length)},p=function(e){if(e instanceof Element)return!0;var t,n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},m=function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},g="undefined"!=typeof window?window:{},y=new WeakMap,v=/auto|scroll/,b=/^tb|vertical/,x=/msie|trident/i.test(g.navigator&&g.navigator.userAgent),w=function(e){return parseFloat(e||"0")},S=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new c((n?t:e)||0,(n?e:t)||0)},k=u({devicePixelContentBoxSize:S(),borderBoxSize:S(),contentBoxSize:S(),contentRect:new d(0,0,0,0)}),E=function(e,t){if(void 0===t&&(t=!1),y.has(e)&&!t)return y.get(e);if(f(e))return y.set(e,k),k;var n=getComputedStyle(e),r=h(e)&&e.ownerSVGElement&&e.getBBox(),i=!x&&"border-box"===n.boxSizing,o=b.test(n.writingMode||""),a=!r&&v.test(n.overflowY||""),s=!r&&v.test(n.overflowX||""),l=r?0:w(n.paddingTop),c=r?0:w(n.paddingRight),p=r?0:w(n.paddingBottom),m=r?0:w(n.paddingLeft),g=r?0:w(n.borderTopWidth),E=r?0:w(n.borderRightWidth),j=r?0:w(n.borderBottomWidth),C=r?0:w(n.borderLeftWidth),_=m+c,T=l+p,A=C+E,M=g+j,P=s?e.offsetHeight-M-e.clientHeight:0,R=a?e.offsetWidth-A-e.clientWidth:0,I=r?r.width:w(n.width)-(i?_+A:0)-R,O=r?r.height:w(n.height)-(i?T+M:0)-P,$=I+_+R+A,D=O+T+P+M,L=u({devicePixelContentBoxSize:S(Math.round(I*devicePixelRatio),Math.round(O*devicePixelRatio),o),borderBoxSize:S($,D,o),contentBoxSize:S(I,O,o),contentRect:new d(m,l,I,O)});return y.set(e,L),L},j=function(e,t,n){var r=E(e,n),o=r.borderBoxSize,a=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(t){case i.DEVICE_PIXEL_CONTENT_BOX:return s;case i.BORDER_BOX:return o;default:return a}},C=function(e){var t=E(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=u([t.borderBoxSize]),this.contentBoxSize=u([t.contentBoxSize]),this.devicePixelContentBoxSize=u([t.devicePixelContentBoxSize])},_=function(e){if(f(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},T=function(){var e=1/0,t=[];a.forEach(function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach(function(t){var n=new C(t.target),i=_(t.target);r.push(n),t.lastReportedSize=j(t.target,t.observedBox),i<e&&(e=i)}),t.push(function(){n.callback.call(n.observer,r,n.observer)}),n.activeTargets.splice(0,n.activeTargets.length)}});for(var n=0;n<t.length;n++)(0,t[n])();return e},A=function(e){a.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEac
1h(function(n){n.isActive()&&(_(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},M=function(){var e=0;for(A(0);a.some(function(e){return e.activeTargets.length>0});)A(e=T());return a.some(function(e){return e.skippedTargets.length>0})&&l(),e>0},P=[],R=function(e){if(!o){var t=0,n=document.createTextNode("");new MutationObserver(function(){return P.splice(0).forEach(function(e){return e()})}).observe(n,{characterData:!0}),o=function(){n.textContent="".concat(t?t--:t++)}}P.push(e),o()},I=function(e){R(function(){requestAnimationFrame(e)})},O=0,$={attributes:!0,characterData:!0,childList:!0,subtree:!0},D=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],L=function(e){return void 0===e&&(e=0),Date.now()+e},z=!1,V=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!z){z=!0;var n=L(e);I(function(){var r=!1;try{r=M()}finally{if(z=!1,e=n-L(),!O)return;r?t.run(1e3):e>0?t.run(e):t.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,$)};document.body?t():g.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),D.forEach(function(t){return g.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),D.forEach(function(t){return g.removeEventListener(t,e.listener,!0)}),this.stopped=!0)},e}()),N=function(e){!O&&e>0&&V.start(),(O+=e)||V.stop()},F=function(){function e(e,t){this.target=e,this.observedBox=t||i.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=j(this.target,this.observedBox,!0);return h(e=this.target)||m(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),B=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},U=new WeakMap,H=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return -1},W=function(){function e(){}return e.connect=function(e,t){var n=new B(e,t);U.set(e,n)},e.observe=function(e,t,n){var r=U.get(e),i=0===r.observationTargets.length;0>H(r.observationTargets,t)&&(i&&a.push(r),r.observationTargets.push(new F(t,n&&n.box)),N(1),V.schedule())},e.unobserve=function(e,t){var n=U.get(e),r=H(n.observationTargets,t),i=1===n.observationTargets.length;r>=0&&(i&&a.splice(a.indexOf(n),1),n.observationTargets.splice(r,1),N(-1))},e.disconnect=function(e){var t=this,n=U.get(e);n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),G=function(){function e(e){if(0==arguments.length)throw TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");W.connect(this,e)}return e.prototype.observe=function(e,t){if(0==arguments.length)throw TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!p(e))throw TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");W.observe(this,e,t)},e.prototype.unobserve=function(e){if(0==arguments.length)throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!p(e))throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");W.unobserve(this,e)},e.prototype.disconnect=function(){W.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}()},81127:function(e,t,n){var r=n(43117).Symbol;e.exports=r},15953:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},72700:function(e){e.exports=function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}},27081:function(e){e.exports=function(e){return e.split("")}},71126:function(e){var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},46825:function(e,t,n){var r=n(81127),i=n(94067),o=n(43599),a=r?r.toStringTag:void 0;
1e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},893:function(e){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},23834:function(e){e.exports=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}},86455:function(e,t,n){var r=n(81127),i=n(15953),o=n(7797),a=n(51046),s=1/0,l=r?r.prototype:void 0,u=l?l.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-s?"-0":n}},3692:function(e,t,n){var r=n(23834);e.exports=function(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:r(e,t,n)}},83600:function(e,t,n){var r=n(3692),i=n(57475),o=n(7026),a=n(67032);e.exports=function(e){return function(t){var n=i(t=a(t))?o(t):void 0,s=n?n[0]:t.charAt(0),l=n?r(n,1).join(""):t.slice(1);return s[e]()+l}}},35432:function(e,t,n){var r=n(72700),i=n(5206),o=n(96635),a=RegExp("['’]","g");e.exports=function(e){return function(t){return r(o(i(t).replace(a,"")),e,"")}}},5783:function(e,t,n){var r=n(893)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});e.exports=r},13364:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},94067:function(e,t,n){var r=n(81127),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},57475:function(e){var t=RegExp("[\\u200d\ud800-\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},27116:function(e){var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},43599:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},43117:function(e,t,n){var r=n(13364),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},7026:function(e,t,n){var r=n(27081),i=n(57475),o=n(96634);e.exports=function(e){return i(e)?o(e):r(e)}},96634:function(e){var t="\ud800-\udfff",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\ud83c[\udffb-\udfff]",i="[^"+t+"]",o="(?:\ud83c[\udde6-\uddff]){2}",a="[\ud800-\udbff][\udc00-\udfff]",s="(?:"+n+"|"+r+")?",l="[\\ufe0e\\ufe0f]?",u="(?:\\u200d(?:"+[i,o,a].join("|")+")"+l+s+")*",c=RegExp(r+"(?="+r+")|(?:"+[i+n+"?",n,o,a,"["+t+"]"].join("|")+")"+(l+s+u),"g");e.exports=function(e){return e.match(c)||[]}},17292:function(e){var t="\ud800-\udfff",n="\\u2700-\\u27bf",r="a-z\\xdf-\\xf6\\xf8-\\xff",i="A-Z\\xc0-\\xd6\\xd8-\\xde",o="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="['’]",s="["+o+"]",l="["+r+"]",u="[^"+t+o+"\\d+"+n+r+i+"]",c="(?:\ud83c[\udde6-\uddff]){2}",d="[\ud800-\udbff][\udc00-\udfff]",h="["+i+"]",f="(?:"+l+"|"+u+")",p="(?:"+a+"(?:d|ll|m|re|s|t|ve))?",m="(?:"+a+"(?:D|LL|M|RE|S|T|VE))?",g="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\ud83c[\udffb-\udfff])?",y="[\\ufe0e\\ufe0f]?",v="(?:\\u200d(?:"+["[^"+t+"]",c,d].join("|")+")"+y+g+")*",b="(?:"+["["+n+"]",c,d].join("|")+")"+(y+g+v),x=RegExp([h+"?"+l+"+"+p+"(?="+[s,h,"$"].join("|")+")","(?:"+h+"|"+u+")+"+m+"(?="+[s,h+f,"$"].join("|")+")",h+"?"+f+"+"+p,h+"+"+m,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",b].join("|"),"g");e.exports=function(e){return e.match(x)||[]}},5206:function(e,t,n){var r=n(5783),i=n(67032),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
17f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=i(e))&&e.replace(o,r).replace(a,"")}},7797:function(e){var t=Array.isArray;e.exports=t},55574:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},51046:function(e,t,n){var r=n(46825),i=n(55574);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},74727:function(e,t,n){var r=n(35432),i=n(59650),o=r(function(e,t,n){return e+(n?" ":"")+i(t)});e.exports=o},67032:function(e,t,n){var r=n(86455);e.exports=function(e){return null==e?"":r(e)}},59650:function(e,t,n){var r=n(83600)("toUpperCase");e.exports=r},96635:function(e,t,n){var r=n(71126),i=n(27116),o=n(67032),a=n(17292);e.exports=function(e,t,n){return(e=o(e),void 0===(t=n?void 0:t))?i(e)?a(e):r(e):e.match(t)||[]}},42115:function(e,t,n){"use strict";let r,i,o;var a,s,l=Object.create,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,h=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty,p=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of d(t))f.call(e,i)||i===n||u(e,i,{get:()=>t[i],enumerable:!(r=c(t,i))||r.enumerable});return e},m={};((e,t)=>{for(var n in t)u(e,n,{get:t[n],enumerable:!0})})(m,{$dispatcherGuard:()=>_,$makeReadOnly:()=>A,$reset:()=>T,$structuralCheck:()=>O,c:()=>S,clearRenderCounterRegistry:()=>P,renderCounterRegistry:()=>M,useRenderCounter:()=>R}),e.exports=p(u({},"__esModule",{value:!0}),m);var g=(o=null!=(r=n(89987))?l(h(r)):{},p(!i&&r&&r.__esModule?o:u(o,"default",{value:r,enumerable:!0}),r)),{useRef:y,useEffect:v,isValidElement:b}=g,x=null!=(a=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?a:g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.memo_cache_sentinel"),S="function"==typeof(null==(s=g.__COMPILER_RUNTIME)?void 0:s.c)?g.__COMPILER_RUNTIME.c:function(e){return g.useMemo(()=>{let t=Array(e);for(let n=0;n<e;n++)t[n]=w;return t[w]=!0,t},[])},k={};["readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","getCacheSignal","getCacheForType","useCacheRefresh"].forEach(e=>{k[e]=()=>{throw Error(`[React] Unexpected React hook call (${e}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `)}});var E=null;function j(e){return x.ReactCurrentDispatcher.current=e,x.ReactCurrentDispatcher.current}k.useMemoCache=e=>{if(null!=E)return E.useMemoCache(e);throw Error("React Compiler internal invariant violation: unexpected null dispatcher")};var C=[];function _(e){let t=x.ReactCurrentDispatcher.current;if(0===e){if(C.push(t),1===C.length&&(E=t),t===k)throw Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");j(k)}else if(1===e){let e=C.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");0===C.length&&(E=null),j(e)}else if(2===e)C.push(t),j(E);else if(3===e){let e=C.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");j(e)}else throw Error("React Compiler internal error: unreachable block"+e)}function T(e){for(let t=0;t<e.length;t++)e[t]=w}function A(){throw Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var M=new Map;function P(){for(let e of M.values())e.forEach(e=>{e.count=0})}function R(e){let t=y(null);null!=t.current&&(t.current.count+=1),v(()=>{if(null==t.current){let n;let r={count:0};null==(n=M.get(e))&&(n=new Set,M.set(e,n)),n.add(r),t.current=r}return()=>{null!==t.current&&function(e,t){let n=M.get(e);null!=n&&n.delete(t)}(e,t.current)}})}var I=new Set;function O(e,t,n,r,i,o){function a(e,t,a,s){let l=`${r}:${o} [${i}] ${n}${a} changed from ${e} to ${t} at depth ${s}`;I.has(l)||(I.add(l),console.error(l))}!function e(t,n,r,i){if(!(i>2)&&t!==n){if(typeof t!=typeof n)a(`type ${typeof t}`,`type ${typeof n}`,r,i);else if("object"==typeof t){let o=Array.isArray(t),s=Array.isArray(n);if(null===t&&null!==n)a("null",`type ${typeof n}`,r,i);else if(null===n)a(`type ${typeof t}`,"null",r,i);else if(t instanceof Map){if(n instanceof Map){if(t.size!==n.size)a(`Map instance with size ${t.size}`,`Map instance with size ${n.size}
1`,r,i);else for(let[o,s]of t)n.has(o)?e(s,n.get(o),`${r}.get(${o})`,i+1):a(`Map instance with key ${o}`,`Map instance without key ${o}`,r,i)}else a("Map instance","other value",r,i)}else if(n instanceof Map)a("other value","Map instance",r,i);else if(t instanceof Set){if(n instanceof Set){if(t.size!==n.size)a(`Set instance with size ${t.size}`,`Set instance with size ${n.size}`,r,i);else for(let e of n)t.has(e)||a(`Set instance without element ${e}`,`Set instance with element ${e}`,r,i)}else a("Set instance","other value",r,i)}else if(n instanceof Set)a("other value","Set instance",r,i);else if(o||s){if(o!==s)a(`type ${o?"array":"object"}`,`type ${s?"array":"object"}`,r,i);else if(t.length!==n.length)a(`array with length ${t.length}`,`array with length ${n.length}`,r,i);else for(let o=0;o<t.length;o++)e(t[o],n[o],`${r}[${o}]`,i+1)}else if(b(t)||b(n))b(t)!==b(n)?a(`type ${b(t)?"React element":"object"}`,`type ${b(n)?"React element":"object"}`,r,i):t.type!==n.type?a(`React element of type ${t.type}`,`React element of type ${n.type}`,r,i):e(t.props,n.props,`[props of ${r}]`,i+1);else{for(let e in n)e in t||a(`object without key ${e}`,`object with key ${e}`,r,i);for(let o in t)o in n?e(t[o],n[o],`${r}.${o}`,i+1):a(`object with key ${o}`,`object without key ${o}`,r,i)}}else{if("function"==typeof t)return;isNaN(t)||isNaN(n)?isNaN(t)!==isNaN(n)&&a(`${isNaN(t)?"NaN":"non-NaN value"}`,`${isNaN(n)?"NaN":"non-NaN value"}`,r,i):t!==n&&a(t,n,r,i)}}}(e,t,"",0)}},99072:function(e,t,n){"use strict";let r,i,o;var a,s,l=Object.create,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,h=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty,p=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of d(t))f.call(e,i)||i===n||u(e,i,{get:()=>t[i],enumerable:!(r=c(t,i))||r.enumerable});return e},m={};((e,t)=>{for(var n in t)u(e,n,{get:t[n],enumerable:!0})})(m,{$dispatcherGuard:()=>_,$makeReadOnly:()=>A,$reset:()=>T,$structuralCheck:()=>O,c:()=>S,clearRenderCounterRegistry:()=>P,renderCounterRegistry:()=>M,useRenderCounter:()=>R}),e.exports=p(u({},"__esModule",{value:!0}),m);var g=(o=null!=(r=n(89987))?l(h(r)):{},p(!i&&r&&r.__esModule?o:u(o,"default",{value:r,enumerable:!0}),r)),{useRef:y,useEffect:v,isValidElement:b}=g,x=null!=(a=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?a:g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.memo_cache_sentinel"),S="function"==typeof(null==(s=g.__COMPILER_RUNTIME)?void 0:s.c)?g.__COMPILER_RUNTIME.c:function(e){return g.useMemo(()=>{let t=Array(e);for(let n=0;n<e;n++)t[n]=w;return t[w]=!0,t},[])},k={};["readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","getCacheSignal","getCacheForType","useCacheRefresh"].forEach(e=>{k[e]=()=>{throw Error(`[React] Unexpected React hook call (${e}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `)}});var E=null;function j(e){return x.ReactCurrentDispatcher.current=e,x.ReactCurrentDispatcher.current}k.useMemoCache=e=>{if(null!=E)return E.useMemoCache(e);throw Error("React Compiler internal invariant violation: unexpected null dispatcher")};var C=[];function _(e){let t=x.ReactCurrentDispatcher.current;if(0===e){if(C.push(t),1===C.length&&(E=t),t===k)throw Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");j(k)}else if(1===e){let e=C.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");0===C.length&&(E=null),j(e)}else if(2===e)C.push(t),j(E);else if(3===e){let e=C.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");j(e)}else throw Error("React Compiler internal error: unreachable block"+e)}function T(e){for(let t=0;t<e.length;t++)e[t]=w}function A(){throw Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var M=new Map;
1function P(){for(let e of M.values())e.forEach(e=>{e.count=0})}function R(e){let t=y(null);null!=t.current&&(t.current.count+=1),v(()=>{if(null==t.current){let n;let r={count:0};null==(n=M.get(e))&&(n=new Set,M.set(e,n)),n.add(r),t.current=r}return()=>{null!==t.current&&function(e,t){let n=M.get(e);null!=n&&n.delete(t)}(e,t.current)}})}var I=new Set;function O(e,t,n,r,i,o){function a(e,t,a,s){let l=`${r}:${o} [${i}] ${n}${a} changed from ${e} to ${t} at depth ${s}`;I.has(l)||(I.add(l),console.error(l))}!function e(t,n,r,i){if(!(i>2)&&t!==n){if(typeof t!=typeof n)a(`type ${typeof t}`,`type ${typeof n}`,r,i);else if("object"==typeof t){let o=Array.isArray(t),s=Array.isArray(n);if(null===t&&null!==n)a("null",`type ${typeof n}`,r,i);else if(null===n)a(`type ${typeof t}`,"null",r,i);else if(t instanceof Map){if(n instanceof Map){if(t.size!==n.size)a(`Map instance with size ${t.size}`,`Map instance with size ${n.size}`,r,i);else for(let[o,s]of t)n.has(o)?e(s,n.get(o),`${r}.get(${o})`,i+1):a(`Map instance with key ${o}`,`Map instance without key ${o}`,r,i)}else a("Map instance","other value",r,i)}else if(n instanceof Map)a("other value","Map instance",r,i);else if(t instanceof Set){if(n instanceof Set){if(t.size!==n.size)a(`Set instance with size ${t.size}`,`Set instance with size ${n.size}`,r,i);else for(let e of n)t.has(e)||a(`Set instance without element ${e}`,`Set instance with element ${e}`,r,i)}else a("Set instance","other value",r,i)}else if(n instanceof Set)a("other value","Set instance",r,i);else if(o||s){if(o!==s)a(`type ${o?"array":"object"}`,`type ${s?"array":"object"}`,r,i);else if(t.length!==n.length)a(`array with length ${t.length}`,`array with length ${n.length}`,r,i);else for(let o=0;o<t.length;o++)e(t[o],n[o],`${r}[${o}]`,i+1)}else if(b(t)||b(n))b(t)!==b(n)?a(`type ${b(t)?"React element":"object"}`,`type ${b(n)?"React element":"object"}`,r,i):t.type!==n.type?a(`React element of type ${t.type}`,`React element of type ${n.type}`,r,i):e(t.props,n.props,`[props of ${r}]`,i+1);else{for(let e in n)e in t||a(`object without key ${e}`,`object with key ${e}`,r,i);for(let o in t)o in n?e(t[o],n[o],`${r}.${o}`,i+1):a(`object with key ${o}`,`object without key ${o}`,r,i)}}else{if("function"==typeof t)return;isNaN(t)||isNaN(n)?isNaN(t)!==isNaN(n)&&a(`${isNaN(t)?"NaN":"non-NaN value"}`,`${isNaN(n)?"NaN":"non-NaN value"}`,r,i):t!==n&&a(t,n,r,i)}}}(e,t,"",0)}},91347:function(e,t){"use strict";var n,r=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function y(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case o:case s:case a:case h:case f:return e;default:switch(e=e&&e.$$typeof){case c:case u:case d:case m:case p:case l:return e;default:return t}}case i:return t}}}n=Symbol.for("react.module.reference"),t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=d,t.Fragment=o,t.Lazy=m,t.Memo=p,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=h,t.SuspenseList=f,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return y(e)===u},t.isContextProvider=function(e){return y(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return y(e)===d},t.isFragment=function(e){return y(e)===o},t.isLazy=function(e){return y(e)===m},t.isMemo=function(e){return y(e)===p},t.isPortal=function(e){return y(e)===i},t.isProfiler=function(e){return y(e)===s},t.isStrictMode=function(e){return y(e)===a},t.isSuspense=function(e){return y(e)===h},t.isSuspenseList=function(e){return y(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===a||e===h||e===f||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===p||e.$$typeof===l||e.$$typeof===u||e.$$typeof===d||e.$$typeof===n||void 0!==e.getModuleId)},t.typeOf=y},29864:function(e,t,n){"use strict";e.exports=n(91347)},84365:function(e){e.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;
1if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<o.length;l++){var u=o[l];if(!s(u))return!1;var c=e[u],d=t[u];if(!1===(i=n?n.call(r,c,d,u):void 0)||void 0===i&&c!==d)return!1}return!0}},7741:function(e,t,n){"use strict";n.d(t,{f6:function(){return ta},iv:function(){return td},F4:function(){return tp},zo:function(){return tf},Fg:function(){return to}});var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function i(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var o=n(89987),a=n(84365),s=n.n(a),l="-ms-",u="-moz-",c="-webkit-",d="comm",h="rule",f="decl",p="@keyframes",m=Math.abs,g=String.fromCharCode,y=Object.assign;function v(e,t){return(e=t.exec(e))?e[0]:e}function b(e,t,n){return e.replace(t,n)}function x(e,t,n){return e.indexOf(t,n)}function w(e,t){return 0|e.charCodeAt(t)}function S(e,t,n){return e.slice(t,n)}function k(e){return e.length}function E(e,t){return t.push(e),e}function j(e,t){return e.filter(function(e){return!v(e,t)})}var C=1,_=1,T=0,A=0,M=0,P="";function R(e,t,n,r,i,o,a,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:C,column:_,length:a,return:"",siblings:s}}function I(e,t){return y(R("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function O(e){for(;e.root;)e=I(e.root,{children:[e]});E(e,e.siblings)}function $(){return M=A<T?w(P,A++):0,_++,10===M&&(_=1,C++),M}
vendor: 13,271 bytes, line 1
1function D(){return w(P,A)}function L(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function z(e){var t,n;return(t=A-1,n=function e(t){for(;$();)switch(M){case t:return A;case 34:case 39:34!==t&&39!==t&&e(M);break;case 40:41===t&&e(t);break;case 92:$()}return A}(91===e?e+2:40===e?e+1:e),S(P,t,n)).trim()}function V(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function N(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case f:return e.return=e.return||e.value;case d:return"";case p:return e.return=e.value+"{"+V(e.children,r)+"}";case h:if(!k(e.value=e.props.join(",")))return""}return k(n=V(e.children,r))?e.return=e.value+"{"+n+"}":""}function F(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case f:e.return=function e(t,n,r){var i;switch(i=n,45^w(t,0)?(((i<<2^w(t,0))<<2^w(t,1))<<2^w(t,2))<<2^w(t,3):0){case 5103:return c+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return c+t+t;case 4789:return u+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return c+t+u+t+l+t+t;case 5936:switch(w(t,n+11)){case 114:return c+t+l+b(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return c+t+l+b(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return c+t+l+b(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return c+t+l+t+t;case 6165:return c+t+l+"flex-"+t+t;case 5187:return c+t+b(t,/(\w+).+(:[^]+)/,c+"box-$1$2"+l+"flex-$1$2")+t;case 5443:return c+t+l+"flex-item-"+b(t,/flex-|-self/g,"")+(v(t,/flex-|baseline/)?"":l+"grid-row-"+b(t,/flex-|-self/g,""))+t;case 4675:return c+t+l+"flex-line-pack"+b(t,/align-content|flex-|-self/g,"")+t;case 5548:return c+t+l+b(t,"shrink","negative")+t;case 5292:return c+t+l+b(t,"basis","preferred-size")+t;case 6060:return c+"box-"+b(t,"-grow","")+c+t+l+b(t,"grow","positive")+t;case 4554:return c+b(t,/([^-])(transform)/g,"$1"+c+"$2")+t;case 6187:return b(b(b(t,/(zoom-|grab)/,c+"$1"),/(image-set)/,c+"$1"),t,"")+t;case 5495:case 3959:return b(t,/(image-set\([^]*)/,c+"$1$`$1");case 4968:return b(b(t,/(.+:)(flex-)?(.*)/,c+"box-pack:$3"+l+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+c+t+t;case 4200:if(!v(t,/flex-|baseline/))return l+"grid-column-align"+S(t,n)+t;break;case 2592:case 3360:return l+b(t,"template-","")+t;case 4384:case 3616:if(r&&r.some(function(e,t){return n=t,v(e.props,/grid-\w+-end/)}))return~x(t+(r=r[n].value),"span",0)?t:l+b(t,"-start","")+t+l+"grid-row-span:"+(~x(r,"span",0)?v(r,/\d+/):+v(r,/\d+/)-+v(t,/\d+/))+";";return l+b(t,"-start","")+t;case 4896:case 4128:return r&&r.some(function(e){return v(e.props,/grid-\w+-start/)})?t:l+b(b(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return b(t,/(.+)-inline(.+)/,c+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(k(t)-1-n>6)switch(w(t,n+1)){case 109:if(45!==w(t,n+4))break;case 102:return b(t,/(.+:)(.+)-([^]+)/,"$1"+c+"$2-$3$1"+u+(108==w(t,n+3)?"$3":"$2-$3"))+t;case 115:return~x(t,"stretch",0)?e(b(t,"stretch","fill-available"),n,r)+t:t}break;case 5152:case 5920:return b(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(e,n,r,i,o,a,s){return l+n+":"+r+s+(i?l+n+"-span:"+(o?a:+a-+r)+s:"")+t});case 4949:if(121===w(t,n+6))return b(t,":",":"+c)+t;break;case 6444:switch(w(t,45===w(t,14)?18:11)){case 120:return b(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+c+(45===w(t,14)?"inline-":"")+"box$3$1"+c+"$2$3$1"+l+"$2box$3")+t;case 100:return b(t,":",":"+l)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return b(t,"scroll-","scroll-snap-")+t}return t}(e.value,e.length,n);return;case p:return V([I(e,{value:b(e.value,"@","@"+c)})],r);case h:if(e.length){var i,o;return i=n=e.props,o=function(t){switch(v(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":O(I(e,{props:[b(t,/:(read-\w+)/,":"+u+"$1")]})),O(I(e,{props:[t]})),y(e,{props:j(n,r)});break;case"::placeholder":O(I(e,{props:[b(t,/:(plac\w+)/,":"+c+"input-$1")]})),O(I(e,{props:[b(t,/:(plac\w+)/,":"+u+"$1")]})),O(I(e,{props:[b(t,/:(plac\w+)/,l+"input-$1")]})),O(I(e,{props:[t]})),y(e,{props:j(n,r)})}return""},i.map(o).join("")}}}function B(e,t,n,r,i,o,a,s,l,u,c,d){for(var f=i-1,p=0===i?o:[""],g=p.length,y=0,v=0,x=0;y<r;++y)for(var w=0,k=S(e,f+1,f=m(v=a[y])),E=e;w<g;++w)(E=(v>0?p[w]+" "+k:b(k,/&\f/g,p[w])).trim())&&(l[x++]=E);return R(e,t,n,0===i?h:s,l,u,c,d)}function U(e,t,n,r,i){return R(e,t,n,f,S(e,0,r),S(e,r+1,-1),r,i)}var H={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},W=n(28070),G=void 0!==W&&void 0!==W.env&&(W.env.REACT_APP_SC_ATTR||W.env.SC_ATTR)||"data-styled",Y="active",q="data-styled-version",Z="6.1.19",K="/*!sc*/\n",X="undefined"!=typeof window&&"undefined"!=typeof document,Q=!!("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:void 0!==W&&void 0!==W.env&&void 0!==W.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==W.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==W.env.REACT_APP_SC_DISABLE_SPEEDY&&W.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==W&&void 0!==W.env&&void 0!==W.env.SC_DISABLE_SPEEDY&&""!==W.env.SC_DISABLE_SPEEDY&&"false"!==W.env.SC_DISABLE_SPEEDY&&W.env.SC_DISABLE_SPEEDY),J=Object.freeze([]),ee=Object.freeze({}),et=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),en=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,er=/(^-|-$)/g;function ei(e){return e.replace(en,"-").replace(er,"")}var eo=/(a)(d)/gi,ea=function(e){return String.fromCharCode(e+(e>25?39:97))};function es(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=ea(t%52)+n;return(ea(t%52)+n).replace(eo,"$1-$2")}var el,eu=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},ec=function(e){return eu(5381,e)};function ed(e){return"string"==typeof e}var eh="function"==typeof Symbol&&Symbol.for,ef=eh?Symbol.for("react.memo"):60115,ep=eh?Symbol.for("react.forward_ref"):60112,em={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},eg={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ey={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ev=((el={})[ep]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},el[ef]=ey,el);function eb(e){return("type"in e&&e.type.$$typeof)===ef?ey:"$$typeof"in e?ev[e.$$typeof]:em}var ex=Object.defineProperty,ew=Object.getOwnPropertyNames,eS=Object.getOwnPropertySymbols,ek=Object.getOwnPropertyDescriptor,eE=Object.getPrototypeOf,ej=Object.prototype;function eC(e){return"function"==typeof e}function e_(e){return"object"==typeof e&&"styledComponentId"in e}function eT(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function eA(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function eM(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function eP(e,t){Object.defineProperty(e,"toString",{value:t})}function eR(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var eI=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)if((i<<=1)<0)throw eR(16,"".concat(e));this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var o=r;o<i;o++)this.groupSizes[o]=0}for(var a=this.indexOfGroup(e+1),s=(o=0,t.length);o<s;o++)this.tag.insertRule(a,t[o])&&(this.groupSizes[e]++,a++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var i=n;i<r;i++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,o=r;o<i;o++)t+="".concat(this.tag.getRule(o)).concat(K);return t},e}(),eO=new Map,e$=new Map,eD=1,eL=function(e){if(eO.has(e))return eO.get(e);for(;e$.has(eD);)eD++;var t=eD++;return eO.set(e,t),e$.set(t,e),t},ez=function(e,t){eD=t+1,eO.set(e,t),e$.set(t,e)},eV="style[".concat(G,"][").concat(q,'="').concat(Z,'"]'),eN=new RegExp("^".concat(G,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),eF=function(e,t,n){for(var r,i=n.split(","),o=0,a=i.length;o<a;o++)(r=i[o])&&e.registerName(t,r)},eB=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(K),i=[],o=0,a=r.length;o<a;o++){var s=r[o].trim();if(s){var l=s.match(eN);if(l){var u=0|parseInt(l[1],10),c=l[2];0!==u&&(ez(c,u),eF(e,c,l[3]),e.getTag().insertRules(u,i)),i.length=0}else i.push(s)}}},eU=function(e){for(var t=document.querySelectorAll(eV),n=0,r=t.length;n<r;n++){var i=t[n];i&&i.getAttribute(G)!==Y&&(eB(e,i),i.parentNode&&i.parentNode.removeChild(i))}},eH=function(e){var t,r=document.head,i=e||r,o=document.createElement("style"),a=(t=Array.from(i.querySelectorAll("style[".concat(G,"]"))))[t.length-1],s=void 0!==a?a.nextSibling:null;o.setAttribute(G,Y),o.setAttribute(q,Z);var l=n.nc;return l&&o.setAttribute("nonce",l),i.insertBefore(o,s),o},eW=function(){function e(e){this.element=eH(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var i=t[n];if(i.ownerNode===e)return i}throw eR(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),eG=function(){function e(e){this.element=eH(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),eY=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),eq=X,eZ={isServer:!X,useCSSOMInjection:!Q},eK=function(){function e(e,t,n){void 0===e&&(e=ee),void 0===t&&(t={});var i=this;this.options=r(r({},eZ),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&X&&eq&&(eq=!1,eU(this)),eP(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",i=0;i<n;i++)(function(n){var i=e$.get(n);if(void 0!==i){var o=e.names.get(i),a=t.getGroup(n);if(void 0!==o&&o.size&&0!==a.length){var s="".concat(G,".g").concat(n,'[id="').concat(i,'"]'),l="";void 0!==o&&o.forEach(function(e){e.length>0&&(l+="".concat(e,","))}
1),r+="".concat(a).concat(s,'{content:"').concat(l,'"}').concat(K)}}})(i);return r}(i)})}return e.registerId=function(e){return eL(e)},e.prototype.rehydrate=function(){!this.server&&X&&eU(this)},e.prototype.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(r(r({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){var e,t,n;return this.tag||(this.tag=(t=(e=this.options).useCSSOMInjection,n=e.target,new eI(e.isServer?new eY(n):t?new eW(n):new eG(n))))},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(eL(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(eL(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(eL(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),eX=/&/g,eQ=/^\s*\/\/.*$/gm;function eJ(e){var t,n,r,i=void 0===e?ee:e,o=i.options,a=void 0===o?ee:o,s=i.plugins,l=void 0===s?J:s,u=function(e,r,i){return i.startsWith(n)&&i.endsWith(n)&&i.replaceAll(n,"").length>0?".".concat(t):e},c=l.slice();c.push(function(e){e.type===h&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(eX,n).replace(r,u))}),a.prefix&&c.push(F),c.push(N);var f=function(e,i,o,s){void 0===i&&(i=""),void 0===o&&(o=""),void 0===s&&(s="&"),t=s,n=i,r=RegExp("\\".concat(n,"\\b"),"g");var l,u,h,f,p,y,v=e.replace(eQ,""),j=(p=function e(t,n,r,i,o,a,s,l,u){for(var c,h=0,f=0,p=s,y=0,v=0,j=0,T=1,I=1,O=1,V=0,N="",F=o,H=a,W=i,G=N;I;)switch(j=V,V=$()){case 40:if(108!=j&&58==w(G,p-1)){-1!=x(G+=b(z(V),"&","&\f"),"&\f",m(h?l[h-1]:0))&&(O=-1);break}case 34:case 39:case 91:G+=z(V);break;case 9:case 10:case 13:case 32:G+=function(e){for(;M=D();)if(M<33)$();else break;return L(e)>2||L(M)>3?"":" "}(j);break;case 92:G+=function(e,t){for(var n;--t&&$()&&!(M<48)&&!(M>102)&&(!(M>57)||!(M<65))&&(!(M>70)||!(M<97)););return n=A+(t<6&&32==D()&&32==$()),S(P,e,n)}(A-1,7);continue;case 47:switch(D()){case 42:case 47:E(R(c=function(e,t){for(;$();)if(e+M===57)break;else if(e+M===84&&47===D())break;return"/*"+S(P,t,A-1)+"*"+g(47===e?e:$())}($(),A),n,r,d,g(M),S(c,2,-2),0,u),u);break;default:G+="/"}break;case 123*T:l[h++]=k(G)*O;case 125*T:case 59:case 0:switch(V){case 0:case 125:I=0;case 59+f:-1==O&&(G=b(G,/\f/g,"")),v>0&&k(G)-p&&E(v>32?U(G+";",i,r,p-1,u):U(b(G," ","")+";",i,r,p-2,u),u);break;case 59:G+=";";default:if(E(W=B(G,n,r,h,f,o,l,N,F=[],H=[],p,a),a),123===V){if(0===f)e(G,n,W,W,F,a,p,l,H);else switch(99===y&&110===w(G,3)?100:y){case 100:case 108:case 109:case 115:e(t,W,W,i&&E(B(t,W,W,0,0,o,l,N,o,F=[],p,H),H),o,H,p,l,i?F:H);break;default:e(G,W,W,W,[""],H,0,l,H)}}}h=f=v=0,T=O=1,N=G="",p=s;break;case 58:p=1+k(G),v=j;default:if(T<1){if(123==V)--T;else if(125==V&&0==T++&&125==(M=A>0?w(P,--A):0,_--,10===M&&(_=1,C--),M))continue}switch(G+=g(V),V*T){case 38:O=f>0?1:(G+="\f",-1);break;case 44:l[h++]=(k(G)-1)*O,O=1;break;case 64:45===D()&&(G+=z($())),y=D(),f=p=k(N=G+=function(e){for(;!L(D());)$();return S(P,e,A)}(A)),V++;break;case 45:45===j&&2==k(G)&&(T=0)}}return a}("",null,null,null,[""],(f=h=o||i?"".concat(o," ").concat(i," { ").concat(v," }"):v,C=_=1,T=k(P=f),A=0,h=[]),0,[0],h),P="",p);a.namespace&&(j=function e(t,n){return t.map(function(t){return"rule"===t.type&&(t.value="".concat(n," ").concat(t.value),t.value=t.value.replaceAll(",",",".concat(n," ")),t.props=t.props.map(function(e){return"".concat(n," ").concat(e)})),Array.isArray(t.children)&&"@keyframes"!==t.type&&(t.children=e(t.children,n)),t})}(j,a.namespace));var I=[];return V(j,(u=(l=c.concat((y=function(e){return I.push(e)},function(e){!e.root&&(e=e.return)&&y(e)}))).length,function(e,t,n,r){for(var i="",o=0;o<u;o++)i+=l[o](e,t,n,r)||"";return i})),I};return f.hash=l.length?l.reduce(function(e,t){return t.name||eR(15),eu(e,t.name)},5381).toString():"",f}var e0=new eK,e1=eJ(),e2=o.createContext({shouldForwardProp:void 0,styleSheet:e0,stylis:e1}),e5=(e2.Consumer,o.createContext(void 0));function e3(){return(0,o.useContext)(e2)}function e4(e){var t=(0,o.useState)(e.stylisPlugins),n=t[0],r=t[1],i=e3().styleSheet,a=(0,o.useMemo)(function(){var t=i;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,i]),l=(0,o.useMemo)(function(){return eJ({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:n})},[e.enableVendorPrefixes,e.namespace,n]);(0,o.useEffect)(function(){s()(n,e.stylisPlugins)||r(e.stylisPlugins)},[e.stylisPlugins]);var u=(0,o.useMemo)(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:a,stylis:l}},[e.shouldForwardProp,a,l]);return o.createElement(e2.Provider,{value:u},o.createElement(e5.Provider,{value:l},e.children))}var e6=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=e1);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,eP(this,function(){throw eR(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=e1),this.name+e.hash},e}();function e9(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;r>="A"&&r<="Z"?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var e8=function(e){return null==e||!1===e||""===e},e7=function(e){var t=[];for(var n in e){var r=e[n];e.hasOwnProperty(n)&&!e8(r)&&(Array.isArray(r)&&r.isCss||eC(r)?t.push("".concat(e9(n),":"),r,";"):eM(r)?t.push.apply(t,i(i(["".concat(n," {")],e7(r),!1),["}"],!1)):t.push("".concat(e9(n),": ").concat(null==r||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||n in H||n.startsWith("--")?String(r).trim():"".concat(r,"px"),";")))}return t};function te(e,t,n,r){return e8(e)?[]:e_(e)?[".".concat(e.styledComponentId)]:eC(e)?!eC(e)||e.prototype&&e.prototype.isReactComponent||!t?[e]:te(e(t),t,n,r):e instanceof e6?n?(e.inject(n,r),[e.getName(r)]):[e]:eM(e)?e7(e):Array.isArray(e)?Array.prototype.concat.apply(J,e.map(function(e){return te(e,t,n,r)})):[e.toString()]}function tt(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(eC(n)&&!e_(n))return!1}return!0}var tn=ec(Z),tr=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&tt(e),this.componentId=t,this.baseHash=eu(tn,t),this.baseStyle=n,eK.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n
1):"";if(this.isStatic&&!n.hash){if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=eT(r,this.staticRulesId);else{var i=eA(te(this.rules,e,t,n)),o=es(eu(this.baseHash,i)>>>0);if(!t.hasNameForId(this.componentId,o)){var a=n(i,".".concat(o),void 0,this.componentId);t.insertRules(this.componentId,o,a)}r=eT(r,o),this.staticRulesId=o}}else{for(var s=eu(this.baseHash,n.hash),l="",u=0;u<this.rules.length;u++){var c=this.rules[u];if("string"==typeof c)l+=c;else if(c){var d=eA(te(c,e,t,n));s=eu(s,d+u),l+=d}}if(l){var h=es(s>>>0);t.hasNameForId(this.componentId,h)||t.insertRules(this.componentId,h,n(l,".".concat(h),void 0,this.componentId)),r=eT(r,h)}}return r},e}(),ti=o.createContext(void 0);function to(){var e=(0,o.useContext)(ti);if(!e)throw eR(18);return e}function ta(e){var t=o.useContext(ti),n=(0,o.useMemo)(function(){return function(e,t){if(!e)throw eR(14);if(eC(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw eR(8);return t?r(r({},t),e):e}(e.theme,t)},[e.theme,t]);return e.children?o.createElement(ti.Provider,{value:n},e.children):null}ti.Consumer;var ts={};function tl(e,t,n){var i,a,s,l,u=e_(e),c=!ed(e),d=t.attrs,h=void 0===d?J:d,f=t.componentId,p=void 0===f?(i=t.displayName,a=t.parentComponentId,ts[s="string"!=typeof i?"sc":ei(i)]=(ts[s]||0)+1,l="".concat(s,"-").concat(es(ec(Z+s+ts[s])>>>0)),a?"".concat(a,"-").concat(l):l):f,m=t.displayName,g=void 0===m?ed(e)?"styled.".concat(e):"Styled(".concat(e.displayName||e.name||"Component",")"):m,y=t.displayName&&t.componentId?"".concat(ei(t.displayName),"-").concat(t.componentId):t.componentId||p,v=u&&e.attrs?e.attrs.concat(h).filter(Boolean):h,b=t.shouldForwardProp;if(u&&e.shouldForwardProp){var x=e.shouldForwardProp;if(t.shouldForwardProp){var w=t.shouldForwardProp;b=function(e,t){return x(e,t)&&w(e,t)}}else b=x}var S=new tr(n,y,u?e.componentStyle:void 0);function k(e,t){return function(e,t,n){var i,a,s=e.attrs,l=e.componentStyle,u=e.defaultProps,c=e.foldedComponentIds,d=e.styledComponentId,h=e.target,f=o.useContext(ti),p=e3(),m=e.shouldForwardProp||p.shouldForwardProp,g=(void 0===(i=u)&&(i=ee),t.theme!==i.theme&&t.theme||f||i.theme||ee),y=function(e,t,n){for(var i,o=r(r({},t),{className:void 0,theme:n}),a=0;a<e.length;a+=1){var s=eC(i=e[a])?i(o):i;for(var l in s)o[l]="className"===l?eT(o[l],s[l]):"style"===l?r(r({},o[l]),s[l]):s[l]}return t.className&&(o.className=eT(o.className,t.className)),o}(s,t,g),v=y.as||h,b={};for(var x in y)void 0===y[x]||"$"===x[0]||"as"===x||"theme"===x&&y.theme===g||("forwardedAs"===x?b.as=y.forwardedAs:m&&!m(x,v)||(b[x]=y[x]));var w=(a=e3(),l.generateAndInjectStyles(y,a.styleSheet,a.stylis)),S=eT(c,d);return w&&(S+=" "+w),y.className&&(S+=" "+y.className),b[ed(v)&&!et.has(v)?"class":"className"]=S,n&&(b.ref=n),(0,o.createElement)(v,b)}(E,e,t)}k.displayName=g;var E=o.forwardRef(k);return E.attrs=v,E.componentStyle=S,E.displayName=g,E.shouldForwardProp=b,E.foldedComponentIds=u?eT(e.foldedComponentIds,e.styledComponentId):"",E.styledComponentId=y,E.target=u?e.target:e,Object.defineProperty(E,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=u?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++)(function e(t,n,r){if(void 0===r&&(r=!1),!r&&!eM(t)&&!Array.isArray(t))return n;if(Array.isArray(n))for(var i=0;i<n.length;i++)t[i]=e(t[i],n[i]);else if(eM(n))for(var i in n)t[i]=e(t[i],n[i]);return t})(e,t[r],!0);return e}({},e.defaultProps,t):t}}),eP(E,function(){return".".concat(E.styledComponentId)}),c&&function e(t,n,r){if("string"!=typeof n){if(ej){var i=eE(n);i&&i!==ej&&e(t,i,r)}var o=ew(n);eS&&(o=o.concat(eS(n)));for(var a=eb(t),s=eb(n),l=0;l<o.length;++l){var u=o[l];if(!(u in eg||r&&r[u]||s&&u in s||a&&u in a)){var c=ek(n,u);try{ex(t,u,c)}catch(e){}}}}return t}(E,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),E}function tu(e,t){for(var n=[e[0]],r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n}var tc=function(e){return Object.assign(e,{isCss:!0})};function td(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return eC(e)||eM(e)?tc(te(tu(J,i([e],t,!0)))):0===t.length&&1===e.length&&"string"==typeof e[0]?te(e):tc(te(tu(e,t)))}var th=function(e){return function e(t,n,o){if(void 0===o&&(o=ee),!n)throw eR(1,n);var a=function(e){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];return t(n,o,td.apply(void 0,i([e],r,!1)))};return a.attrs=function(i){return e(t,n,r(r({}
1,o),{attrs:Array.prototype.concat(o.attrs,i).filter(Boolean)}))},a.withConfig=function(i){return e(t,n,r(r({},o),i))},a}(tl,e)},tf=th;function tp(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=eA(td.apply(void 0,i([e],t,!1)));return new e6(es(ec(r)>>>0),r)}et.forEach(function(e){tf[e]=th(e)}),function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=tt(e),eK.registerId(this.componentId+1)}e.prototype.createStyles=function(e,t,n,r){var i=r(eA(te(this.rules,t,n,r)),""),o=this.componentId+e;n.insertRules(o,o,i)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&eK.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)}}(),function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var r=n.nc,i=eA([r&&'nonce="'.concat(r,'"'),"".concat(G,'="true"'),"".concat(q,'="').concat(Z,'"')].filter(Boolean)," ");return"<style ".concat(i,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw eR(2);return e._emitSheetCSS()}
1,this.getStyleElement=function(){if(e.sealed)throw eR(2);var t,i=e.instance.toString();if(!i)return[];var a=((t={})[G]="",t[q]=Z,t.dangerouslySetInnerHTML={__html:i},t),s=n.nc;return s&&(a.nonce=s),[o.createElement("style",r({},a,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new eK({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw eR(2);return o.createElement(e4,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw eR(3)}}()},19761:function(e,t,n){"use strict";n.d(t,{fi:function(){return ec},BA:function(){return eh},aQ:function(){return m}});let r=["gray","blue","purple","magenta","red","orange","yellow","green","cyan"],i=["50","100","200","300","400","500","600","700","800","900","950"],o={black:{title:"Black",hex:"#0d0e12"},white:{title:"White",hex:"#ffffff"},gray:{50:{title:"Gray 50",hex:"#f6f6f8"},100:{title:"Gray 100",hex:"#eeeef1"},200:{title:"Gray 200",hex:"#e3e4e8"},300:{title:"Gray 300",hex:"#bbbdc9"},400:{title:"Gray 400",hex:"#9499ad"},500:{title:"Gray 500",hex:"#727892"},600:{title:"Gray 600",hex:"#515870"},700:{title:"Gray 700",hex:"#383d51"},800:{title:"Gray 800",hex:"#252837"},900:{title:"Gray 900",hex:"#1b1d27"},950:{title:"Gray 950",hex:"#13141b"}},blue:{50:{title:"Blue 50",hex:"#f5f8ff"},100:{title:"Blue 100",hex:"#e5edff"},200:{title:"Blue 200",hex:"#dbe5ff"},300:{title:"Blue 300",hex:"#a8bfff"},400:{title:"Blue 400",hex:"#7595ff"},500:{title:"Blue 500",hex:"#556bfc"},600:{title:"Blue 600",hex:"#4043e7"},700:{title:"Blue 700",hex:"#2927aa"},800:{title:"Blue 800",hex:"#192457"},900:{title:"Blue 900",hex:"#161a41"},950:{title:"Blue 950",hex:"#101228"}},purple:{50:{title:"Purple 50",hex:"#f8f5ff"},100:{title:"Purple 100",hex:"#f1ebff"},200:{title:"Purple 200",hex:"#ece1fe"},300:{title:"Purple 300",hex:"#ccb1fc"},400:{title:"Purple 400",hex:"#b087f7"},500:{title:"Purple 500",hex:"#8f57ef"},600:{title:"Purple 600",hex:"#721fe5"},700:{title:"Purple 700",hex:"#4c1a9e"},800:{title:"Purple 800",hex:"#2f1862"},900:{title:"Purple 900",hex:"#23173f"},950:{title:"Purple 950",hex:"#181128"}},magenta:{50:{title:"Magenta 50",hex:"#fef6f9"},100:{title:"Magenta 100",hex:"#fde8ef"},200:{title:"Magenta 200",hex:"#fcdee9"},300:{title:"Magenta 300",hex:"#f7abc5"},400:{title:"Magenta 400",hex:"#f0709b"},500:{title:"Magenta 500",hex:"#e72767"},600:{title:"Magenta 600",hex:"#b11651"},700:{title:"Magenta 700",hex:"#7c1342"},800:{title:"Magenta 800",hex:"#4b1130"},900:{title:"Magenta 900",hex:"#341325"},950:{title:"Magenta 950",hex:"#1f0f14"}},red:{50:{title:"Red 50",hex:"#fff6f5"},100:{title:"Red 100",hex:"#ffe7e5"},200:{title:"Red 200",hex:"#ffdedc"},300:{title:"Red 300",hex:"#fdada5"},400:{title:"Red 400",hex:"#f77769"},500:{title:"Red 500",hex:"#ef4434"},600:{title:"Red 600",hex:"#cc2819"},700:{title:"Red 700",hex:"#8b2018"},800:{title:"Red 800",hex:"#4d1714"},900:{title:"Red 900",hex:"#321615"},950:{title:"Red 950",hex:"#1e1011"}},orange:{50:{title:"Orange 50",hex:"#fff7f0"},100:{title:"Orange 100",hex:"#ffeadb"},200:{title:"Orange 200",hex:"#ffddc7"},300:{title:"Orange 300",hex:"#ffb685"},400:{title:"Orange 400",hex:"#ff8e42"},500:{title:"Orange 500",hex:"#fa6400"},600:{title:"Orange 600",hex:"#b14802"},700:{title:"Orange 700",hex:"#7c3404"},800:{title:"Orange 800",hex:"#461e07"},900:{title:"Orange 900",hex:"#32160b"},950:{title:"Orange 950",hex:"#21120d"}},yellow:{50:{title:"Yellow 50",hex:"#fefae1"},100:{title:"Yellow 100",hex:"#fcf3bb"},200:{title:"Yellow 200",hex:"#f9e994"},300:{title:"Yellow 300",hex:"#f7d455"},400:{title:"Yellow 400",hex:"#f9bc15"},500:{title:"Yellow 500",hex:"#d28a04"},600:{title:"Yellow 600",hex:"#965908"},700:{title:"Yellow 700",hex:"#653a0b"},800:{title:"Yellow 800",hex:"#3b220c"},900:{title:"Yellow 900",hex:"#271a11"},950:{title:"Yellow 950",hex:"#181410"}},green:{50:{title:"Green 50",hex:"#e7fef5"},100:{title:"Green 100",hex:"#c5fce8"},200:{title:"Green 200",hex:"#a9f9dc"},300:{title:"Green 300",hex:"#59f3ba"},400:{title:"Green 400",hex:"#0ff0a1"},500:{title:"Green 500",hex:"#04b97a"},600:{title:"Green 600",hex:"#01794f"},700:{title:"Green 700",hex:"#015133"},800:{title:"Green 800",hex:"#023120"},900:{title:"Green 900",hex:"#06231a"},950:{title:"Green 950",hex:"#071715"}},cyan:{50:{title:"Cyan 50",hex:"#e7fefe"},100:{title:"Cyan 100",hex:"#c5fcfc"},200:{title:"Cyan 200",hex:"#96f8f8"},300:{title:"Cyan 300",hex:"#62efef"},400:{title:"Cyan 400",hex:"#18e2e2"},500:{title:"Cyan 500",hex:"#04b8be"},600:{title:"Cyan 600",hex:"#037782"},700:{title:"Cyan 700",hex:"#024950"},800:{title:"Cyan 800",hex:"#042f34"},900:{title:"Cyan 900",hex:"#072227"},950:{title:"Cyan 950",hex:"#0d181c"}}},a={avatar:{sizes:[{distance:-4,size:19},{distance:-4,size:25},{distance:-8,size:33},{distance:-12,size:49}],focusRing:{offset:1,width:1}},button:{textWeight:"medium",border:{width:1},focusRing:{offset:-1,width:1}},card:{border:{width:1},focusRing:{offset:-1,width:1},shadow:{outline:.5}},container:[320,640,960,1280,1600,1920],media:[360,600,900,1200,1800,2400],layer:{dialog:{zOffset:600},popover:{zOffset:400},tooltip:{zOffset:200}},radius:[0,1,3,6,9,12,21],shadow:[null,{umbra:[0,0,0,0],penumbra:[0,0,0,0],ambient:[0,0,0,0]},{umbra:[0,3,5,-2],penumbra:[0,6,10,0],ambient:[0,1,18,1]},{umbra:[0,7,8,-4],penumbra:[0,12,17,2],ambient:[0,5,22,4]},{umbra:[0,9,11,-5],penumbra:[0,18,28,2],ambient:[0,7,34,6]},{umbra:[0,11,15,-7],penumbra:[0,24,38,3],ambient:[0,9,46,8]}],space:[0,4,8,12,20,32,52,84,136,220],input:{border:{width:1},checkbox:{size:17,focusRing:{offset:-1,width:1}}
1,radio:{size:17,markSize:9,focusRing:{offset:-1,width:1}},switch:{width:25,height:17,padding:5,transitionDurationMs:150,transitionTimingFunction:"ease-out",focusRing:{offset:1,width:1}},select:{focusRing:{offset:-1,width:1}},text:{focusRing:{offset:-1,width:1}}},style:{button:{root:{transition:"background-color 100ms,border-color 100ms,color 100ms"}}}},s={code:{family:"ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace",weights:{regular:400,medium:500,semibold:600,bold:700},sizes:[{ascenderHeight:4,descenderHeight:4,fontSize:10,iconSize:17,lineHeight:15,letterSpacing:0},{ascenderHeight:5,descenderHeight:5,fontSize:13,iconSize:21,lineHeight:19,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:16,iconSize:25,lineHeight:23,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:19,iconSize:29,lineHeight:27,letterSpacing:0},{ascenderHeight:8,descenderHeight:8,fontSize:22,iconSize:33,lineHeight:31,letterSpacing:0}]},heading:{family:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", Helvetica, Arial, system-ui, sans-serif',weights:{regular:700,medium:800,semibold:900,bold:900},sizes:[{ascenderHeight:5,descenderHeight:5,fontSize:13,iconSize:17,lineHeight:19,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:16,iconSize:25,lineHeight:23,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:21,iconSize:33,lineHeight:29,letterSpacing:0},{ascenderHeight:8,descenderHeight:8,fontSize:27,iconSize:41,lineHeight:35,letterSpacing:0},{ascenderHeight:9.5,descenderHeight:8.5,fontSize:33,iconSize:49,lineHeight:41,letterSpacing:0},{ascenderHeight:10.5,descenderHeight:9.5,fontSize:38,iconSize:53,lineHeight:47,letterSpacing:0}]},label:{family:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", system-ui, sans-serif',weights:{regular:600,medium:700,semibold:800,bold:900},sizes:[{ascenderHeight:2,descenderHeight:2,fontSize:8.1,iconSize:13,lineHeight:10,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:9.5,iconSize:15,lineHeight:11,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:10.8,iconSize:17,lineHeight:12,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:12.25,iconSize:19,lineHeight:13,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:13.6,iconSize:21,lineHeight:14,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:15,iconSize:23,lineHeight:15,letterSpacing:.5}]},text:{family:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", Helvetica, Arial, system-ui, sans-serif',weights:{regular:400,medium:500,semibold:600,bold:700},sizes:[{ascenderHeight:4,descenderHeight:4,fontSize:10,iconSize:17,lineHeight:15,letterSpacing:0},{ascenderHeight:5,descenderHeight:5,fontSize:13,iconSize:21,lineHeight:19,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:15,iconSize:25,lineHeight:23,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:18,iconSize:29,lineHeight:27,letterSpacing:0},{ascenderHeight:8,descenderHeight:8,fontSize:21,iconSize:33,lineHeight:31,letterSpacing:0}]}},l=new WeakMap;function u(e){let t=l.get(e);if(t)return t;let n=d(e,e.card.enabled),r={_blend:e._blend||(e.dark?"screen":"multiply"),_dark:e.dark,accent:n.accent,avatar:n.avatar,backdrop:e.base.shadow.ambient,badge:n.badge,bg:e.base.bg,border:e.base.border,button:{default:c(e,e.button.default),ghost:c(e,e.button.ghost),bleed:c(e,e.button.bleed)},code:n.code,fg:e.base.fg,focusRing:e.base.focusRing,icon:n.muted.fg,input:{default:h(e.input.default),invalid:h(e.input.invalid)},kbd:n.kbd,link:n.link,muted:{...n.muted,bg:e.selectable?.default.enabled.bg2||e.base.bg},selectable:c(e,e.selectable||e.muted),shadow:e.base.shadow,skeleton:{from:e.skeleton?.from||e.base.border,to:e.skeleton?.to||e.base.border},syntax:e.syntax};return l.set(e,r),r}function c(e,t){return{default:{enabled:d(e,t.default.enabled),hovered:d(e,t.default.hovered),pressed:d(e,t.default.pressed),selected:d(e,t.default.selected),disabled:d(e,t.default.disabled)},neutral:{enabled:d(e,t.default.enabled),hovered:d(e,t.default.hovered),pressed:d(e,t.default.pressed),selected:d(e,t.default.selected),disabled:d(e,t.default.disabled)},primary:{enabled:d(e,t.primary.enabled),hovered:d(e,t.primary.hovered),pressed:d(e,t.primary.pressed),selected:d(e,t.primary.selected),disabled:d(e,t.primary.disabled)},suggest:{enabled:d(e,t.primary.enabled),hovered:d(e,t.primary.hovered),pressed:d(e,t.primary.pressed),selected:d(e,t.primary.selected),disabled:d(e,t.primary.disabled)},positive:{enabled:d(e,t.positive.enabled),hovered:d(e,t.positive.hovered),pressed:d(e,t.positive.pressed),selected:d(e,t.positive.selected),disabled:d(e,t.positive.disabled)},caution:{enabled:d(e,t.caution.enabled),hovered:d(e,t.caution.hovered),pressed:d(e,t.caution.pressed),selected:d(e,t.caution.selected),disabled:d(e,t.caution.disabled)},critical:{enabled:d(e,t.critical.enabled),hovered:d(e,t.critical.hovered),pressed:d(e,t.critical.pressed),selected:d(e,t.critical.selected),disabled:d(e,t.critical.disabled)}}}function d(e,t){return{...t,avatar:{gray:{bg:e.spot.gray,fg:e.base.bg},blue:{bg:e.spot.blue,fg:e.base.bg},purple:{bg:e.spot.purple,fg:e.base.bg},magenta:{bg:e.spot.magenta,fg:e.base.bg},red:{bg:e.spot.red,fg:e.base.bg},orange:{bg:e.spot.orange,fg:e.base.bg},yellow:{bg:e.spot.yellow,fg:e.base.bg},green:{bg:e.spot.green,fg:e.base.bg}
1,cyan:{bg:e.spot.cyan,fg:e.base.bg}},badge:{default:{bg:e.muted.default.enabled.bg,fg:e.muted.default.enabled.fg,dot:e.muted.default.enabled.muted.fg,icon:e.muted.default.enabled.muted.fg},neutral:{bg:e.muted.transparent.enabled.bg,fg:e.muted.transparent.enabled.fg,dot:e.muted.transparent.enabled.muted.fg,icon:e.muted.transparent.enabled.muted.fg},primary:{bg:e.muted.primary.enabled.bg,fg:e.muted.primary.enabled.fg,dot:e.muted.primary.enabled.muted.fg,icon:e.muted.primary.enabled.muted.fg},suggest:{bg:e.muted.primary.enabled.bg,fg:e.muted.primary.enabled.fg,dot:e.muted.primary.enabled.muted.fg,icon:e.muted.primary.enabled.muted.fg},positive:{bg:e.muted.positive.enabled.bg,fg:e.muted.positive.enabled.fg,dot:e.muted.positive.enabled.muted.fg,icon:e.muted.positive.enabled.muted.fg},caution:{bg:e.muted.caution.enabled.bg,fg:e.muted.caution.enabled.fg,dot:e.muted.caution.enabled.muted.fg,icon:e.muted.caution.enabled.muted.fg},critical:{bg:e.muted.critical.enabled.bg,fg:e.muted.critical.enabled.fg,dot:e.muted.critical.enabled.muted.fg,icon:e.muted.critical.enabled.muted.fg}},kbd:{bg:e.muted.default.enabled.bg,fg:e.muted.default.enabled.fg,border:e.muted.default.enabled.border},muted:{...e.muted.default.enabled.muted,bg:t.bg2||t.bg},skeleton:{from:t.skeleton?.from||t.border,to:t.skeleton?.to||t.border}}}function h(e){return{enabled:f(e.enabled),disabled:f(e.disabled),readOnly:f(e.readOnly),hovered:f(e.hovered)}}function f(e){return{bg:e.bg,border:e.border,fg:e.fg,muted:{bg:e.bg2},placeholder:e.placeholder}}let p=new WeakMap;function m(e){if(e.sanity.v2?._resolved)return e.sanity.v2;let t=p.get(e);if(t)return t;let n={_version:2,_resolved:!0,avatar:{...a.avatar,...e.sanity.avatar},button:{...a.button,...e.sanity.button},card:a.card,color:u(e.sanity.color),container:e.sanity.container,font:e.sanity.fonts,input:{...a.input,...e.sanity.input,checkbox:{...a.input.checkbox,...e.sanity.input.checkbox},radio:{...a.input.radio,...e.sanity.input.radio},switch:{...a.input.switch,...e.sanity.input.switch}},layer:e.sanity.layer??a.layer,media:e.sanity.media,radius:e.sanity.radius,shadow:e.sanity.shadows,space:e.sanity.space,style:e.sanity.styles};return p.set(e,n),n}function g(e){return 2===e._version}let y=new WeakMap,v=new WeakMap;function b(e){let t=v.get(e);if(t)return t;let{avatar:n,button:r,color:i,container:o,font:a,input:s,media:l,radius:u,shadow:c,space:d,style:h}=e;return{_version:0,avatar:n,button:r,container:o,color:{light:{transparent:x(i.light.transparent),default:x(i.light.default),primary:x(i.light.primary),positive:x(i.light.positive),caution:x(i.light.caution),critical:x(i.light.critical)},dark:{transparent:x(i.dark.transparent),default:x(i.dark.default),primary:x(i.dark.primary),positive:x(i.dark.positive),caution:x(i.dark.caution),critical:x(i.dark.critical)}},focusRing:s.text.focusRing,fonts:a,input:s,media:l,radius:u,shadows:c,space:d,styles:h,v2:e}}function x(e){return{base:{bg:e.bg,fg:e.fg,border:e.border,focusRing:e.focu
1sRing,shadow:e.shadow},button:e.button,card:e.selectable.default,dark:e._dark,input:{default:w(e.input.default),invalid:w(e.input.invalid)},muted:{...e.button.ghost,transparent:e.button.ghost.default},solid:{...e.button.default,transparent:e.button.default.default},selectable:e.selectable,spot:{gray:e.avatar.gray.bg,blue:e.avatar.blue.bg,purple:e.avatar.purple.bg,magenta:e.avatar.magenta.bg,red:e.avatar.red.bg,orange:e.avatar.orange.bg,yellow:e.avatar.yellow.bg,green:e.avatar.green.bg,cyan:e.avatar.cyan.bg},syntax:e.syntax}}function w(e){return{enabled:S(e.enabled),disabled:S(e.disabled),readOnly:S(e.readOnly),hovered:S(e.hovered)}}function S(e){return{bg:e.bg,bg2:e.muted.bg,border:e.border,fg:e.fg,placeholder:e.placeholder}}let k=["multiply","screen"],E=["transparent","default","neutral","primary","suggest","positive","caution","critical"],j=["default","neutral","primary","suggest","positive","caution","critical"],C=["enabled","hovered","pressed","selected","disabled"],_=["default","ghost","bleed"],T=["default","invalid"],A=["enabled","hovered","readOnly","disabled"];function M(e){return i.includes(e)}function P(e){return/^\d+%$/.test(e)}function R(e){let t=e.split("/"),n=t.shift()||"",[i,o]=n.split(" ");if(M(i)){let e=t.shift()||"";return P(o)?{type:"color",tint:i,mix:Number(o.slice(0,-1))/100}:I(e)?{type:"color",tint:i,opacity:Number(e)}:{type:"color",tint:i}}if("black"===i||"white"===i){let e=t.shift()||"";return P(o)?{type:"color",key:i,mix:Number(o.slice(0,-1))/100}:I(e)?{type:"color",key:i,opacity:Number(e)}:{type:"color",key:i}}if(r.includes(i)){let[e,r]=(n=t.shift()||"").split(" ");if(M(e)){let n=t.shift()||"";return P(r)?{type:"color",hue:i,tint:e,mix:Number(r.slice(0,-1))/100}:I(n)?{type:"color",hue:i,tint:e,opacity:Number(n)}:{type:"color",hue:i,tint:e}}return{type:"hue",value:i}}if(k.includes(i))return{type:"blendMode",value:i}}function I(e){return"0"===e||/^0\.[0-9]+$/.test(e)||"1"===e}[...r],[...E],[...j],[...C],[...T],[...A];let O=["500","500"];function $(e,t=O){var n;let r;let{hue:i,scheme:o}=e,a=R(t["light"===o?0:1]);if(!a||"color"!==a.type)throw Error(`Invalid color token: ${t[0]}`);return n={...a,hue:a.hue||i},r="",r="black"===n.key||"white"===n.key?n.key:`${n.hue}/${n.tint}`,void 0!==n.mix?`${r} ${100*n.mix}%`:(void 0!==n.opacity&&(r+=`/${n.opacity}`),r)}let D={base:{"*":{_blend:["multiply","screen"],accent:{fg:["purple/600","purple/400"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},backdrop:["gray/200/0.5","black/0.5"],badge:{"*":{bg:["100","900"],fg:["600","400"],icon:["500","500"],dot:["500","500"]},positive:{bg:["200 50%","900"],fg:["600","500"]},caution:{bg:["200 50%","900"],fg:["600","500"]}},bg:["50","950"],border:["200","800"],code:{bg:["50","950"],fg:["600","400"]},fg:["800","200"],focusRing:["blue/500","blue/500"],icon:["600","400"],kbd:{bg:["white","black"],fg:["600","400"],border:["200","800"]},link:{fg:["blue/600","blue/300"]},muted:{bg:["50","950"],fg:["700 75%","300 75%"]},shadow:{outline:["500/0.3","500/0.4"],umbra:["gray/500/0.1","black/0.2"],penumbra:["gray/500/0.07","black/0.14"],ambient:["gray/500/0.06","black/0.12"]},skeleton:{from:["100","900"],to:["100 50%","900 50%"]}},transparent:{bg:["50","black"]},default:{bg:["white","950"],fg:["800","200"],muted:{fg:["600","400"]}},primary:{_hue:"blue"},suggest:{_hue:"purple"},positive:{_hue:"green",shadow:{outline:["500/0.4","500/0.4"]}},caution:{_hue:"yellow",shadow:{outline:["600/0.3","500/0.4"]}},critical:{_hue:"red"}},button:{default:{"*":{"*":{_blend:["screen","multiply"],accent:{fg:["purple/300","purple/700"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},badge:{"*":{bg:["900","100"],fg:["400","600"],dot:["500","500"],icon:["500","500"]}},bg:["500","400"],border:["500/0","400/0"],code:{bg:["500 20%","400 20%"],fg:["200","600"]},fg:["white","black"],icon:["100 70%","900 70%"],kbd:{bg:["black","white"],fg:["200","600"],border:["800","200"]},link:{fg:["blue/200","blue/600"]},muted:{bg:["950","50"],fg:["100 70%","900 70%"]},skeleton:{from:["900","100"],to:["900 50%","100 50%"]}},hovered:{bg:["600","300"],border:["700/0","300/0"]},pressed:{bg:["700","300"]},selected:{bg:["700","300"]},disabled:{_hue:"gray",accent:{fg:["100 70%","900 70%"]},avatar:{"*":{_blend:["screen","multiply"],bg:["gray/500","gray/400"],fg:["white","black"]}},badge:{"*":{bg:["gray/700","gray/300"],fg:["white","black"],dot:["white","black"],icon:["white","black"]}},bg:["300","600"],code:{bg:["950","50"],fg:["300","600"]},fg:["300","600"],muted:{bg:["950","50"],fg:["300","600"]},kbd:{bg:["black","white"],fg:["white","black"],border:["700","300"]},link:{fg:["100 70%","900 70%"]}}},default:{"*":{avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},bg:["800","200"],muted:{bg:["950","50"],fg:["400","600"]}},hovered:{bg:["900","100"]},pressed:{bg:["black","white"]},selected:{bg:["black","white"]}}},ghost:{"*":{"*":{_blend:["multiply","screen"],accent:{fg:["purple/700 60%","purple/300 70%"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},badge:{"*":{bg:["100","900"],fg:["600","400"],dot:["500","500"],icon:["500","500"]}},bg:["50","950"],border:["100","900"],code:{bg:["500 10%","400 10%"],fg:["700 60%","400 60%"]},fg:["600","400"],icon:["700 60%","300 60%"],kbd:{bg:["white","black"],fg:["600","400"],border:["200","800"]},link:{fg:["blue/700 60%","blue/300 60%"]},muted:{bg:["100","950"],fg:["700 60%","300 60%"]},skeleton:{from:["100","900"],to:["100 50%","900 50%"]}},hovered:{bg:["100","900"],fg:["700","300"]},pressed:{bg:["200","800"],fg:["800","200"]},selected:{bg:["200","800"],fg:["800","200"]},disabled:{_hue:"gray",accent:{fg:["200","800"]},avatar:{"*":{_blend:["screen","multiply"],bg:["gray/100","gray/900"],fg:["white","black"]}}
1,badge:{"*":{_hue:"gray",bg:["50","950"],fg:["gray/200","gray/800"],dot:["gray/200","gray/800"],icon:["gray/200","gray/800"]}},border:["100","900"],code:{bg:["50","950"],fg:["200","800"]},fg:["400","600"],icon:["300","700"],muted:{fg:["300","700"]},kbd:{bg:["white","black"],fg:["200","800"],border:["100","900"]},link:{fg:["200","800"]}}},positive:{"*":{border:["600 20%","800"]}},caution:{"*":{border:["600 20%","800"]}}},bleed:{"*":{"*":{_blend:["multiply","screen"],accent:{fg:["purple/700 70%","purple/300 70%"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},badge:{"*":{bg:["100","900"],fg:["600","400"],dot:["500","500"],icon:["500","500"]}},bg:["white","black"],border:["white/0","black/0"],code:{bg:["50","950"],fg:["700 75%","300 75%"]},fg:["700","300"],icon:["700 75%","300 75%"],kbd:{bg:["white","black"],fg:["700","300"],border:["200","800"]},link:{fg:["blue/700 70%","blue/300 70%"]},muted:{bg:["100","950"],fg:["700 75%","300 75%"]},skeleton:{from:["100","900"],to:["100 50%","900 50%"]}},hovered:{bg:["50","900"],fg:["800","200"],icon:["800 70%","300 70%"]},pressed:{bg:["100","800"],fg:["800","200"],icon:["800 70%","200 70%"]},selected:{bg:["100","900"],fg:["800","200"],icon:["800 60%","200 60%"]},disabled:{_hue:"gray",accent:{fg:["200","800"]},avatar:{"*":{_blend:["screen","multiply"],bg:["gray/100","gray/900"],fg:["white","black"]}},badge:{"*":{_hue:"gray",bg:["50","950"],fg:["gray/200","gray/800"],dot:["gray/200","gray/800"],icon:["gray/200","gray/800"]}},code:{bg:["50","950"],fg:["200","800"]},fg:["400","600"],icon:["300","700"],muted:{fg:["400","600"]},kbd:{bg:["white","black"],fg:["200","800"],border:["100","900"]},link:{fg:["200","800"]}}}}},input:{"*":{"*":{_blend:["multiply","screen"],bg:["white","black"],border:["200","700"],fg:["black","200"],muted:{bg:["50","950"]},placeholder:["400","600"]},hovered:{border:["300","700"]},readOnly:{bg:["50","950"],border:["200","800"],fg:["800","200"]},disabled:{bg:["50","950"],fg:["400","600"],border:["100","900"],placeholder:["200","800 50%"]}},invalid:{"*":{_hue:"red",bg:["100","950"]}}},selectable:{"*":{"*":{_blend:["multiply","screen"],accent:{fg:["purple/700 70%","purple/300 70%"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},badge:{"*":{bg:["100","900"],fg:["600","400"],dot:["500","500"],icon:["500","500"]}},bg:["white","black"],border:["200","800"],code:{bg:["50","950"],fg:["600","400"]},fg:["700","300"],icon:["700 75%","300 75%"],kbd:{bg:["white","black"],fg:["600","400"],border:["200","800"]},link:{fg:["blue/700 70%","blue/300 70%"]},muted:{bg:["50","950"],fg:["700 75%","300 75%"]},skeleton:{from:["100","900"],to:["100 50%","900 50%"]}},hovered:{bg:["50","950"]},pressed:{bg:["100","900"]},selected:{_blend:["screen","multiply"],accent:{fg:["purple/300","purple/700"]},avatar:{"*":{_blend:["multiply","screen"],bg:["white","black"],fg:["black","white"]}},badge:{"*":{bg:["900","100"],fg:["400","600"],dot:["500","500"],icon:["500","500"]}},bg:["500","400"],border:["500 20%","400 20%"],code:{bg:["500 20%","400 20%"],fg:["200","600"]},fg:["white","black"],icon:["100 70%","900 70%"],kbd:{bg:["black","white"],fg:["200","600"],border:["800","200"]},link:{fg:["blue/200","blue/600"]},muted:{bg:["500 10%","400 10%"],fg:["100 70%","900 70%"]},skeleton:{from:["900","100"],to:["900 50%","100 50%"]}},disabled:{_hue:"gray",accent:{fg:["200","800"]},avatar:{"*":{_blend:["screen","multiply"],bg:["gray/100","gray/900"],fg:["white","black"]}},badge:{"*":{_hue:"gray",bg:["50","950"],fg:["gray/200","gray/800"],dot:["gray/200","gray/800"],icon:["gray/200","gray/800"]}},border:["100","900"],code:{bg:["50","950"],fg:["200","800"]},fg:["200","800"],icon:["200","800"],kbd:{bg:["white","black"],fg:["200","800"],border:["100","900"]},link:{fg:["200","800"]},muted:{bg:["50 50%","950 50%"],fg:["200","800"]}}},default:{selected:{_hue:"blue"}},critical:{disabled:{bg:["50 50%","950 50%"]}}},syntax:{atrule:["purple/600","purple/400"],attrName:["green/600","green/400"],attrValue:["yellow/600","yellow/400"],attribute:["yellow/600","yellow/400"],boolean:["purple/600","purple/400"],builtin:["purple/600","purple/400"],c
1data:["yellow/600","yellow/400"],char:["yellow/600","yellow/400"],class:["orange/600","orange/400"],className:["cyan/600","cyan/400"],comment:["gray/400","gray/600"],constant:["purple/600","purple/400"],deleted:["red/600","red/400"],entity:["red/600","red/400"],function:["green/600","green/400"],hexcode:["blue/600","blue/400"],id:["purple/600","purple/400"],important:["purple/600","purple/400"],inserted:["yellow/600","yellow/400"],keyword:["magenta/600","magenta/400"],number:["purple/600","purple/400"],operator:["magenta/600","magenta/400"],property:["blue/600","blue/400"],pseudoClass:["yellow/600","yellow/400"],pseudoElement:["yellow/600","yellow/400"],punctuation:["gray/600","gray/400"],regex:["blue/600","blue/400"],selector:["red/600","red/400"],string:["yellow/600","yellow/400"],symbol:["purple/600","purple/400"],tag:["red/600","red/400"],unit:["orange/600","orange/400"],url:["red/600","red/400"],variable:["red/600","red/400"]}};function L(e){return!!(e&&"object"==typeof e&&!Array.isArray(e))}function z(...e){let t=e.filter(Boolean);return 0===t.length?{}:t.reduce(V,{})}function V(e,t){for(let n of Object.keys(t)){let r=e[n],i=t[n];L(r)&&L(i)?e[n]=z(r,i):e[n]=i}return e}function N(e,t){let{scheme:n}=e,r={};for(let e of E)r[e]=function(e,t){let{scheme:n,tone:r}=e,i=t?.color?.base?.[r],o={hue:i?._hue||"gray",scheme:n};return{_blend:(i?._blend||["multiply","screen"])["light"===n?0:1],_dark:"dark"===n,accent:{fg:$(o,i?.accent?.fg)},avatar:F({scheme:n},i),backdrop:$(o,i?.backdrop),badge:U(i?.badge,{scheme:n},t),bg:$(o,i?.bg),border:$(o,i?.border),button:function(e,t){let{scheme:n,tone:r}=e,i={};for(let e of _)i[e]=function(e,t){let{cardTone:n,mode:r,scheme:i}=e,o={};for(let e of j)o[e]=function(e,t){let{cardTone:n,mode:r,scheme:i,tone:o}=e,a={};for(let e of C)a[e]=function(e,t){let{cardTone:n,mode:r,tone:i,scheme:o,state:a}=e,s=t?.color?.base?.[n],l=t?.color?.button?.[r]?.[i]?.[a],u=l?._hue||s?._hue||"gray",c=l?._blend||["screen","multiply"],d={hue:u,scheme:o};return{_blend:c["light"===o?0:1],accent:{fg:$(d,l?.accent?.fg)},avatar:F({scheme:o},l),badge:U(l?.badge,{scheme:o},t),bg:$(d,l?.bg),border:$(d,l?.border),code:{bg:$(d,l?.code?.bg),fg:$(d,l?.code?.fg)},fg:$(d,l?.fg),icon:$(d,l?.icon),muted:{bg:$(d,l?.muted?.bg),fg:$(d,l?.muted?.fg)},kbd:{bg:$(d,l?.kbd?.bg),fg:$(d,l?.kbd?.fg),border:$(d,l?.kbd?.border)},link:{fg:$(d,l?.link?.fg)},skeleton:{from:$(d,l?.skeleton?.from),to:$(d,l?.skeleton?.to)}}}({cardTone:n,mode:r,tone:o,scheme:i,state:e},t);return a}({cardTone:n,mode:r,scheme:i,tone:e},t);return o}({cardTone:r,scheme:n,mode:e},t);return i}({scheme:n,tone:r},t),code:{bg:$(o,i?.code?.bg),fg:$(o,i?.code?.fg)},fg:$(o,i?.fg),focusRing:$(o,i?.focusRing),icon:$(o,i?.icon),input:function(e,t){let{scheme:n,tone:r}=e;return{default:H({mode:"default",scheme:n,tone:r},t),invalid:H({mode:"invalid",scheme:n,tone:r},t)}}({scheme:n,tone:r},t),kbd:{bg:$(o,i?.kbd?.bg),fg:$(o,i?.kbd?.fg),border:$(o,i?.kbd?.border)},link:{fg:$(o,i?.link?.fg)},muted:{bg:$(o,i?.muted?.bg),fg:$(o,i?.muted?.fg)},selectable:function(e,t){let{scheme:n,tone:r}=e,i={};for(let e of j)i[e]=function(e,t){let{cardTone:n,scheme:r,tone:i}=e,o={};for(let e of C)o[e]=function(e,t){let{cardTone:n,scheme:r,state:i,tone:o}=e,a=t?.color?.base?.[n],s=t?.color?.selectable?.[o]?.[i],l=s?._hue||a?._hue||"gray",u=s?._blend||["screen","multiply"],c={hue:l,scheme:r};return{_blend:u["light"===r?0:1],accent:{fg:$(c,s?.accent?.fg)},avatar:F({scheme:r},s),badge:U(s?.badge,{scheme:r},t),bg:$(c,s?.bg),border:$(c,s?.border),code:{bg:$(c,s?.code?.bg),fg:$(c,s?.code?.fg)},fg:$(c,s?.fg),icon:$(c,s?.icon),muted:{bg:$(c,s?.muted?.bg),fg:$(c,s?.muted?.fg)},kbd:{bg:$(c,s?.kbd?.bg),fg:$(c,s?.kbd?.fg),border:$(c,s?.kbd?.border)},link:{fg:$(c,s?.link?.fg)},skeleton:{from:$(c,s?.skeleton?.from),to:$(c,s?.skeleton?.to)}}}({cardTone:n,tone:i,scheme:r,state:e},t);return o}({cardTone:r,scheme:n,tone:e},t);return i}({scheme:n,tone:r},t),shadow:function(e,t){let{scheme:n,tone:r}=e,i=t?.color?.base?.[r],o={hue:i?._hue||"gray",scheme:n};return{outline:$(o,i?.shadow?.outline),umbra:$(o,i?.shadow?.umbra),penumbra:$(o,i?.shadow?.penumbra),ambient:$(o,i?.shadow?.ambient)}}
1({scheme:n,tone:r},t),skeleton:{from:$(o,i?.skeleton?.from),to:$(o,i?.skeleton?.to)},syntax:function(e,t){let{scheme:n}=e,r=t?.color?.syntax,i={hue:"gray",scheme:n};return{atrule:$(i,r?.atrule),attrName:$(i,r?.attrName),attrValue:$(i,r?.attrValue),attribute:$(i,r?.attribute),boolean:$(i,r?.boolean),builtin:$(i,r?.builtin),cdata:$(i,r?.cdata),char:$(i,r?.char),class:$(i,r?.class),className:$(i,r?.className),comment:$(i,r?.comment),constant:$(i,r?.constant),deleted:$(i,r?.deleted),doctype:$(i,r?.doctype),entity:$(i,r?.entity),function:$(i,r?.function),hexcode:$(i,r?.hexcode),id:$(i,r?.id),important:$(i,r?.important),inserted:$(i,r?.inserted),keyword:$(i,r?.keyword),number:$(i,r?.number),operator:$(i,r?.operator),prolog:$(i,r?.prolog),property:$(i,r?.property),pseudoClass:$(i,r?.pseudoClass),pseudoElement:$(i,r?.pseudoElement),punctuation:$(i,r?.punctuation),regex:$(i,r?.regex),selector:$(i,r?.selector),string:$(i,r?.string),symbol:$(i,r?.symbol),tag:$(i,r?.tag),unit:$(i,r?.unit),url:$(i,r?.url),variable:$(i,r?.variable)}}({scheme:n},t)}}({scheme:n,tone:e},t);return r}function F(e,t){let{scheme:n}=e;return{gray:B({color:"gray",scheme:n},t),blue:B({color:"blue",scheme:n},t),purple:B({color:"purple",scheme:n},t),magenta:B({color:"magenta",scheme:n},t),red:B({color:"red",scheme:n},t),orange:B({color:"orange",scheme:n},t),yellow:B({color:"yellow",scheme:n},t),green:B({color:"green",scheme:n},t),cyan:B({color:"cyan",scheme:n},t)}}function B(e,t){let{color:n,scheme:r}=e,i=t?.avatar?.[n],o={hue:i?._hue||"gray",scheme:r};return{_blend:(i?._blend||["screen","multiply"])["light"===r?0:1],bg:$(o,i?.bg),fg:$(o,i?.fg)}}function U(e,t,n){let{scheme:r}=t,i={};for(let t of j)i[t]=function(e,t,n){let{scheme:r,tone:i}=t,o=e?.[i],a={hue:o?._hue||n?.color?.base?.[i]?._hue||"gray",scheme:r};return{bg:$(a,o?.bg),fg:$(a,o?.fg),dot:$(a,o?.dot),icon:$(a,o?.icon)}}(e,{scheme:r,tone:t},n);return i}function H(e,t){let{mode:n,scheme:r,tone:i}=e;return{enabled:W({mode:n,scheme:r,state:"enabled",cardTone:i},t),hovered:W({mode:n,scheme:r,state:"hovered",cardTone:i},t),readOnly:W({mode:n,scheme:r,state:"readOnly",cardTone:i},t),disabled:W({mode:n,scheme:r,state:"disabled",cardTone:i},t)}}function W(e,t){let{cardTone:n,mode:r,scheme:i,state:o}=e,a=t?.color?.base?.[n],s=t?.color?.input?.[r]?.[o],l=s?._hue||a?._hue||"gray",u=s?._blend||["screen","multiply"],c={hue:l,scheme:i};return{_blend:u["light"===i?0:1],bg:$(c,s?.bg),border:$(c,s?.border),fg:$(c,s?.fg),muted:{bg:$(c,s?.muted?.bg)},placeholder:$(c,s?.placeholder)}}function G(e,t=0,n=1){return Math.min(n,Math.max(t,e))}function Y(e,t,n,r,i){var o;return n*(1-(o=G((i-e)/(t-e))))+r*o}function q(e){return Math.round(e)}function Z(e){if(4===e.length){let t=e.slice(1,2),n=e.slice(2,3),r=e.slice(3,4);return{r:parseInt(t+t,16),g:parseInt(n+n,16),b:parseInt(r+r,16)}}return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16)}}function K(e){let t=q(G(Math.round(e.r),0,255)),n=q(G(Math.round(e.g),0,255)),r=q(G(Math.round(e.b),0,255));return"a"in e?`rgba(${t},${n},${r},${e.a})`:"#"+(16777216+(t<<16)+(n<<8)+r).toString(16).slice(1)}let X=/hsl\(\s*(\d+)\s*,\s*((\d+(?:\.\d+)?)%)\s*,\s*((\d+(?:\.\d+)?)%)\s*\)/i;function Q(e){if(!e)return{r:0,g:0,b:0};if("string"!=typeof e)throw Error("parseColor: expected a string");if("#"===e[0]&&(4===e.length||7===e.length)&&function(e){for(let t of e)if(-1==="0123456789ABCDEFabcdef".indexOf(t))return!1;return!0}(e.slice(1)))return Z(e);if(e.startsWith("hsl("))return function(e){let t=e.s/100,n=e.l/100,r=(1-Math.abs(2*n-1))*t,i=r*(1-Math.abs(e.h/60%2-1)),o=n-r/2,a=0,s=0,l=0;return 0<=e.h&&e.h<60?(a=r,s=i,l=0):60<=e.h&&e.h<120?(a=i,s=r,l=0):120<=e.h&&e.h<180?(a=0,s=r,l=i):180<=e.h&&e.h<240?(a=0,s=i,l=r):240<=e.h&&e.h<300?(a=i,s=0,l=r):300<=e.h&&e.h<360&&(a=r,s=0,l=i),{r:Math.round((a+o)*255),g:Math.round((s+o)*255),b:Math.round((l+o)*255)}}(function(e){let t=X.exec(e);if(!t)throw Error(`parseHsl: string is not a HSL color: "${e}"`);return{h:parseInt(t[1]),s:parseFloat(t[3]),l:parseFloat(t[5])}}(e));if(e.startsWith("rgba("))return function(e){let t=e.replace(/rgba\(|\)/g,"").split(",");return{r:parseInt(t[0]),g:parseInt(t[1]),b:parseInt(t[2]),a:parseFloat(t[3])}}(e);throw Error(`parseColor: unexpected color format: "${e}"`)}let J=[0,255];function ee(e,t){let{bg:n,blendMode:r,colorPalette:i}=t;if("white"===n)throw Error("Cannot blend with white background");let o=R(e);if(!o||"color"!==o.type)throw Error(`Invalid color token value: ${e}`);let a="";if("black"===o.key&&(a=et(i.black)),"white"===o.key&&(a=et(i.white)),o.hue&&o.tint&&(a=et(i[o.hue][o.tint])),!a)throw Error(`Invalid color token value: ${e}`);let s=a,l={blendMode:r,bg:n,black:et(i.black),white:et(i.white)};try{if(a=function(e,t){var n,r,i,o,a,s,l,u,c;let{blendMode:d}=t,h=Q(e),f=Q(t.black),p=Q(t.white),m=t.bg?Q(t.bg):"multiply"===d?p:f,g={r:[f.r,p.r],g:[f.g,p.g],b:[f.b,p.b]},y={r:G(Y(...g.r,...J,m.r),...J),g:G(Y(...g.g,...J,m.g),...J),b:G(Y(...g.b,...J,m.b),...J)},v={r:G(Y(...g.r,...J,h.r),...J),g:G(Y(...g.g,...J,h.g),...J),b:G(Y(...g.b,...J,h.b),...J)},b="multiply"===d?{r:255*(n=y.r/255,v.r/255*n),g:255*(r=y.g/255,v.g/255*r),b:255*(i=y.b/255,v.b/255*i)}:{r:255*((o=y.r/255)+(a=v.r/255)-o*a),g:255*((s=y.g/255)+(l=v.g/255)-s*l),b:255*((u=y.b/255)+(c=v.b/255)-u*c)};return K({r:G(Y(...J,...g.r,b.r),...g.r),g:G(Y(...J,...g.g,b.g),...g.g),b:G(Y(...J,...g.b,b.b),...g.b)})}(a,l),n&&void 0!==o.mix){var u,c,d,h,f,p,m;let e=Z(n),t=Z(a);a=K((u=o.mix,{r:(c=e.r,d=t.r,c+(d-c)*u),g:(h=e.g,f=t.g,h+(f-h)*u),b:(p=e.b,m=t.b,p+(m-p)*u)}))}}catch(e){throw console.warn("could not blend",a,l),e}
1return"#aN"===a&&(console.warn(`invalid color token value: ${e}`),a=s),void 0!==o.opacity&&(a=function(e,t){let n=Q(e);return`rgba(${n.r},${n.g},${n.b},${t})`}(a,o.opacity)),a}function et(e){return"string"==typeof e?e:e.hex}function en(e,t){let n=Object.entries(t),[,r]=n.find(([e])=>"transparent"===e),[,i]=n.find(([e])=>"default"===e),o=er(r,{colorPalette:e}),a=er(i,{colorPalette:e}),s=a.bg;if("white"===s)throw Error("Cannot blend with white background");return Object.fromEntries([["transparent",o],["default",a],...n.filter(([e])=>"default"!==e&&"transparent"!==e).map(([t,n])=>[t,er(n,{bg:s,colorPalette:e})])])}function er(e,t){var n,r,i,o;let{colorPalette:a,bg:s}=t,l=e._blend||"multiply",u=ee(e.bg,{colorPalette:a,bg:s,blendMode:l}),c={colorPalette:a,bg:u,blendMode:l},d=(n=e.button,r={baseBg:u,blendMode:l,colorPalette:a},{default:ea(n.default,r),ghost:ea(n.ghost,r),bleed:ea(n.bleed,r)}),h=function(e,t){let n={};for(let i of j){var r;n[i]={enabled:es((r=e[i]).enabled,t),hovered:es(r.hovered,t),pressed:es(r.pressed,t),selected:es(r.selected,t),disabled:es(r.disabled,t)}}return n}(e.selectable,{colorPalette:a,baseBg:u,blendMode:l}),f={outline:ee(e.shadow.outline,c),umbra:ee(e.shadow.umbra,{...c,bg:void 0,colorPalette:{...a,black:"#000000"}}),penumbra:ee(e.shadow.penumbra,{...c,bg:void 0,colorPalette:{...a,black:"#000000"}}),ambient:ee(e.shadow.ambient,{...c,bg:void 0,colorPalette:{...a,black:"#000000"}})};return{_blend:l,_dark:e._dark,accent:{fg:ee(e.accent.fg,c)},avatar:ei(e.avatar,{baseBg:u,colorPalette:a,blendMode:l}),backdrop:ee(e.backdrop,c),badge:eo(e.badge,{baseBg:u,colorPalette:a,blendMode:l}),bg:u,border:ee(e.border,c),button:d,code:{bg:ee(e.code.bg,c),fg:ee(e.code.fg,c)},fg:ee(e.fg,c),focusRing:ee(e.focusRing,c),icon:ee(e.icon,c),input:(i=e.input,o={baseBg:u,colorPalette:a,blendMode:l},{default:el(i.default,o),invalid:el(i.invalid,o)}),kbd:function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=ee(e.bg,{bg:n,blendMode:r,colorPalette:i}),a={bg:o,blendMode:r,colorPalette:i};return{bg:o,fg:ee(e.fg,a),border:ee(e.border,a)}}(e.kbd,{baseBg:u,colorPalette:a,blendMode:l}),link:{fg:ee(e.link.fg,c)},muted:{bg:ee(e.muted.bg,c),fg:ee(e.muted.fg,c)},shadow:f,skeleton:{from:ee(e.skeleton.from,c),to:ee(e.skeleton.to,c)},syntax:function(e,t){let{colorPalette:n,baseBg:r,blendMode:i}=t,o={colorPalette:n,bg:r,blendMode:i};return{atrule:ee(e.atrule,o),attrName:ee(e.attrName,o),attrValue:ee(e.attrValue,o),attribute:ee(e.attribute,o),boolean:ee(e.boolean,o),builtin:ee(e.builtin,o),cdata:ee(e.cdata,o),char:ee(e.char,o),class:ee(e.class,o),className:ee(e.className,o),comment:ee(e.comment,o),constant:ee(e.constant,o),deleted:ee(e.deleted,o),doctype:ee(e.doctype,o),entity:ee(e.entity,o),function:ee(e.function,o),hexcode:ee(e.hexcode,o),id:ee(e.id,o),important:ee(e.important,o),inserted:ee(e.inserted,o),keyword:ee(e.keyword,o),number:ee(e.number,o),operator:ee(e.operator,o),prolog:ee(e.prolog,o),property:ee(e.property,o),pseudoClass:ee(e.pseudoClass,o),pseudoElement:ee(e.pseudoElement,o),punctuation:ee(e.punctuation,o),regex:ee(e.regex,o),selector:ee(e.selector,o),string:ee(e.string,o),symbol:ee(e.symbol,o),tag:ee(e.tag,o),unit:ee(e.unit,o),url:ee(e.url,o),variable:ee(e.variable,o)}}(e.syntax,{baseBg:u,colorPalette:a,blendMode:l}),selectable:h}}function ei(e,t){let n={};for(let i of r)n[i]=function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=e._blend||"multiply",a=ee(e.bg,{bg:n,blendMode:r,colorPalette:i});return{_blend:o,bg:a,fg:ee(e.fg,{bg:a,blendMode:o,colorPalette:i})}}(e[i],t);return n}function eo(e,t){let n={};for(let r of j)n[r]=function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=ee(e.bg,{bg:n,blendMode:r,colorPalette:i}),a={bg:o,blendMode:r,colorPalette:i};return{bg:o,dot:ee(e.dot,a),fg:ee(e.fg,a),icon:ee(e.icon,a)}}(e[r],t);return n}function ea(e,t){let n={};for(let i of j){var r;n[i]={enabled:es((r=e[i]).enabled,t),hovered:es(r.hovered,t),pressed:es(r.pressed,t),selected:es(r.selected,t),disabled:es(r.disabled,t)}}return n}function es(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=e._blend||"multiply",a=ee(e.bg,{bg:n,blendMode:r,colorPalette:i}),s={bg:a,blendMode:o,colorPalette:i};
1return{_blend:o,accent:{fg:ee(e.accent.fg,s)},avatar:ei(e.avatar,{baseBg:a,colorPalette:i,blendMode:o}),badge:eo(e.badge,{baseBg:a,colorPalette:i,blendMode:o}),bg:a,border:ee(e.border,s),code:{bg:ee(e.code.bg,s),fg:ee(e.code.fg,s)},fg:ee(e.fg,s),icon:ee(e.icon,s),link:{fg:ee(e.link.fg,s)},muted:{bg:ee(e.muted.bg,s),fg:ee(e.muted.fg,s)},kbd:{bg:ee(e.kbd.bg,s),fg:ee(e.kbd.fg,s),border:ee(e.kbd.border,s)},skeleton:{from:ee(e.skeleton?.from,s),to:ee(e.skeleton?.to,s)}}}function el(e,t){return{enabled:eu(e.enabled,t),hovered:eu(e.hovered,t),readOnly:eu(e.readOnly,t),disabled:eu(e.disabled,t)}}function eu(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=e._blend||"multiply",a=ee(e.bg,{colorPalette:i,bg:n,blendMode:r}),s={colorPalette:i,bg:a,blendMode:o};return{_blend:o,bg:a,border:ee(e.border,s),fg:ee(e.fg,s),muted:{bg:ee(e.muted.bg,s)},placeholder:ee(e.placeholder,s)}}function ec(e){let t=function(e){let t={color:function(e){let t=z(D,e);return{base:function(e){let t={};for(let n of E)t[n]=function(e,t){let n=z(e?.base?.["*"],e?.base?.[t]),i=n._hue||e?.base?.[t]?._hue||"gray";return{...n,_hue:i,avatar:r.reduce((e,t)=>({...e,[t]:z({_hue:t},n.avatar?.["*"],n.avatar?.[t])}),{}),badge:j.reduce((t,r)=>({...t,[r]:{_hue:e?.base?.[r]?._hue||i,...n.badge?.["*"],...n.badge?.[r]}}),{})}}(e,n);return t}(t),button:function(e){let t={};for(let n of _)t[n]=function(e,t){let n={};for(let i of j)n[i]=function(e,t,n){let i={};for(let o of C)i[o]=function(e,t,n,i){let o=z(e?.button?.[n]?.["*"]?.["*"],e?.button?.[n]?.[t]?.["*"],e?.button?.[n]?.["*"]?.[i],e?.button?.[n]?.[t]?.[i]),a=o._hue||e?.base?.[t]?._hue;return{...o,_hue:a,avatar:r.reduce((e,t)=>({...e,[t]:z({_hue:t},o.avatar?.["*"],o.avatar?.[t])}),{}),badge:j.reduce((t,n)=>({...t,[n]:{_hue:e?.base?.[n]?._hue||a,...o.badge?.["*"],...o.badge?.[n]}}),{})}}(e,n,t,o);return i}(e,t,i);return n}(e,n);return t}(t),input:function(e){let t={};for(let n of T)t[n]=function(e,t){let n={};for(let r of A)n[r]=function(e,t,n){let r=z(e?.input?.["*"]?.["*"],e?.
1input?.[t]?.["*"],e?.input?.["*"]?.[n],e?.input?.[t]?.[n]),i=r._hue||e?.input?.[t]?._hue;return{...r,_hue:i}}(e,t,r);return n}(e,n);return t}(t),selectable:function(e){let t={};for(let n of j)t[n]=function(e,t){let n={_hue:e?.selectable?.[t]?._hue||e?.base?.[t]?._hue};for(let i of C)n[i]=function(e,t,n){let i=z(e?.selectable?.["*"]?.["*"],e?.selectable?.[t]?.["*"],e?.selectable?.["*"]?.[n],e?.selectable?.[t]?.[n]),o=i._hue||e?.base?.[t]?._hue;return{...i,_hue:o,avatar:r.reduce((e,t)=>({...e,[t]:z({_hue:t},i.avatar?.["*"],i.avatar?.[t])}),{}),badge:j.reduce((t,n)=>({...t,[n]:{_hue:e?.base?.[n]?._hue||o,...i.badge?.["*"],...i.badge?.[n]}}),{})}}(e,t,i);return n}(e,n);return t}(t),syntax:t.syntax}}(e?.color)};return{light:N({scheme:"light"},t),dark:N({scheme:"dark"},t)}}(e);return b({_version:2,avatar:e?.avatar??a.avatar,button:e?.button??a.button,card:e?.card??a.card,color:function(e,t){let n=t?.palette??o;return{light:en(n,e.light),dark:en(n,e.dark)}}(t,e),container:e?.container??a.container,font:e?.font??s,input:e?.input??a.input,layer:e?.layer??a.layer,media:e?.media??a.media,radius:e?.radius??a.radius,shadow:e?.shadow??a.shadow,space:e?.space??a.space,style:e?.style??a.style})}let ed=new Map;function eh(e,t,n){var r;let i=function(e,t,n){let r=ed.get(t);if(!r)return;let i=r.get(n);if(i)return i.get(e)}(e,t,n);if(i)return i;let o=g(e)?b(e):e,s=g(e)?e:function(e){if(e.v2)return e.v2;let t=y.get(e);if(t)return t;let{avatar:n,button:r,color:i,container:o,fonts:s,input:l,layer:c,media:d,radius:h,shadows:f,space:p,styles:m}=e,g={_version:2,avatar:{...a.avatar,...n},button:{...a.button,...r},card:a.card,color:{light:{transparent:u(i.light.transparent),default:u(i.light.default),neutral:u(i.light.transparent),primary:u(i.light.primary),suggest:u(i.light.primary),positive:u(i.light.positive),caution:u(i.light.caution),critical:u(i.light.critical)},dark:{transparent:u(i.dark.transparent),default:u(i.dark.default),neutral:u(i.dark.transparent),primary:u(i.dark.primary),suggest:u(i.dark.primary),positive:u(i.dark.positive),caution:u(i.dark.caution),critical:u(i.dark.critical)}},container:o,font:s,input:{...a.input,...l,checkbox:{...a.input.checkbox,...l.checkbox},radio:{...a.input.radio,...l.radio},switch:{...a.input.switch,...l.switch}},layer:c??a.layer,media:d,radius:h,shadow:f,space:p,style:m};return y.set(e,g),g}(e),l=o.color[t]||o.color.light,c=l[n]||l.default,d=o.layer||a.layer,h=s.color[t]||s.color.light,f="neutral"in(r=h[n]||h.default).badge?r:{...r,badge:{...r.badge,neutral:r.badge.default,suggest:r.badge.primary},button:{bleed:{...r.button.bleed,neutral:r.button.bleed.default,suggest:r.button.bleed.primary},default:{...r.button.default,neutral:r.button.default.default,suggest:r.button.default.primary},ghost:{...r.button.ghost,neutral:r.button.ghost.default,suggest:r.button.ghost.primary}},selectable:{...r.selectable,neutral:r.selectable.default,suggest:r.selectable.primary}},p=s.layer||a.layer,m={sanity:{...o,color:c,layer:d,v2:{...s,_resolved:!0,color:f,layer:p}}};return function(e,t,n,r){ed.has(t)||ed.set(t,new Map);let i=ed.get(t);i.has(n)||i.set(n,new WeakMap),i.get(n).set(e,r)}(e,t,n,m),m}},75660:function(e,t,n){"use strict";n.d(t,{M:function(){return b}});var r=n(52660),i=n(89987),o=n(63375),a=n(7528),s=n(53368),l=n(81836),u=n(5464),c=n(57935);function d(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}class h extends i.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=t.offsetParent,n=(0,u.R)(e)&&e.offsetWidth||0,r=this.props.sizeRef.current;r.height=t.offsetHeight||0,r.width=t.offsetWidth||0,r.top=t.offsetTop,r.left=t.offsetLeft,r.right=n-r.width-r.left}return null}componentDidUpdate(){}render(){return this.props.children}}function f(e){let{children:t,isPresent:n,anchorX:o,root:a}=e,s=(0,i.useId)(),l=(0,i.useRef)(null),u=(0,i.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:f}=(0,i.useContext)(c._),p=function(...e){return i.useCallback(function(...e){return t=>{let n=!1,r=e.map(e=>{let r=d(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():d(e[t],null)}}}}(...e),e)}(l,null==t?void 0:t.ref);return(0,i.useInsertionEffect)(()=>{let{width:e,height:t,top:r,left:i,right:c}=u.current;if(n||!l.current||!e||!t)return;l.current.dataset.motionPopId=s;let d=document.createElement("style");f&&(d.nonce=f);let h=null!=a?a:document.head;return h.appendChild(d),d.sheet&&d.sheet.insertRule('\n          [data-motion-pop-id="'.concat(s,'"] {\n            position: absolute !important;\n            width: ').concat(e,"px !important;\n            height: ").concat(t,"px !important;\n            ").concat("left"===o?"left: ".concat(i):"right: ".concat(c),"px !important;\n            top: ").concat(r,"px !important;\n          }\n        ")),()=>{h.contains(d)&&h.removeChild(d)}},[n]),(0,r.jsx)(h,{isPresent:n,childRef:l,sizeRef:u,children:i.cloneElement(t,{ref:p})})}let p=e=>{let{children:t,initial:n,isPresent:o,onExitComplete:s,custom:u,presenceAffectsLayout:c,mode:d,anchorX:h,root:p}=e,g=(0,a.h)(m),y=(0,i.useId)(),v=!0,b=(0,i.useMemo)(()=>
1(v=!1,{id:y,initial:n,isPresent:o,custom:u,onExitComplete:e=>{for(let t of(g.set(e,!0),g.values()))if(!t)return;s&&s()},register:e=>(g.set(e,!1),()=>g.delete(e))}),[o,g,s]);return c&&v&&(b={...b}),(0,i.useMemo)(()=>{g.forEach((e,t)=>g.set(t,!1))},[o]),i.useEffect(()=>{o||g.size||!s||s()},[o]),"popLayout"===d&&(t=(0,r.jsx)(f,{isPresent:o,anchorX:h,root:p,children:t})),(0,r.jsx)(l.O.Provider,{value:b,children:t})};function m(){return new Map}var g=n(45684);let y=e=>e.key||"";function v(e){let t=[];return i.Children.forEach(e,e=>{(0,i.isValidElement)(e)&&t.push(e)}),t}let b=e=>{let{children:t,custom:n,initial:l=!0,onExitComplete:u,presenceAffectsLayout:c=!0,mode:d="sync",propagate:h=!1,anchorX:f="left",root:m}=e,[b,x]=(0,g.oO)(h),w=(0,i.useMemo)(()=>v(t),[t]),S=h&&!b?[]:w.map(y),k=(0,i.useRef)(!0),E=(0,i.useRef)(w),j=(0,a.h)(()=>new Map),[C,_]=(0,i.useState)(w),[T,A]=(0,i.useState)(w);(0,s.L)(()=>{k.current=!1,E.current=w;for(let e=0;e<T.length;e++){let t=y(T[e]);S.includes(t)?j.delete(t):!0!==j.get(t)&&j.set(t,!1)}},[T,S.length,S.join("-")]);let M=[];if(w!==C){let e=[...w];for(let t=0;t<T.length;t++){let n=T[t],r=y(n);S.includes(r)||(e.splice(t,0,n),M.push(n))}return"wait"===d&&M.length&&(e=M),A(v(e)),_(w),null}let{forceRender:P}=(0,i.useContext)(o.p);return(0,r.jsx)(r.Fragment,{children:T.map(e=>{let t=y(e),i=(!h||!!b)&&(w===T||S.includes(t));return(0,r.jsx)(p,{isPresent:i,initial:(!k.current||!!l)&&void 0,custom:n,presenceAffectsLayout:c,mode:d,root:m,onExitComplete:i?void 0:()=>{if(!j.has(t))return;j.set(t,!0);let e=!0;j.forEach(t=>{t||(e=!1)}),e&&(null==P||P(),A(E.current),h&&(null==x||x()),u&&u())},anchorX:f,children:e},t)})})}},45684:function(e,t,n){"use strict";n.d(t,{oO:function(){return o}});var r=n(89987),i=n(81836);function o(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=(0,r.useContext)(i.O);if(null===t)return[!0,null];let{isPresent:n,onExitComplete:o,register:a}=t,s=(0,r.useId)();(0,r.useEffect)(()=>{if(e)return a(s)},[e]);let l=(0,r.useCallback)(()=>e&&o&&o(s),[s,o,e]);return!n&&o?[!1,l]:[!0]}},63375:function(e,t,n){"use strict";n.d(t,{p:function(){return r}});let r=(0,n(89987).createContext)({})},57935:function(e,t,n){"use strict";n.d(t,{_:function(){return r}});let r=(0,n(89987).createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"})},81836:function(e,t,n){"use strict";n.d(t,{O:function(){return r}});let r=(0,n(89987).createContext)(null)},16031:function(e,t,n){"use strict";let r;n.d(t,{E:function(){return oA}});var i,o=n(89987);let a=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],s=new Set(a),l=e=>180*e/Math.PI,u=e=>d(l(Math.atan2(e[1],e[0]))),c={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:u,rotateZ:u,skewX:e=>l(Math.atan(e[1])),skewY:e=>l(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},d=e=>((e%=360)<0&&(e+=360),e),h=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),f=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),p={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:h,scaleY:f,scale:e=>(h(e)+f(e))/2,rotateX:e=>d(l(Math.atan2(e[6],e[5]))),rotateY:e=>d(l(Math.atan2(-e[2],e[0]))),rotateZ:u,rotate:u,skewX:e=>l(Math.atan(e[4])),skewY:e=>l(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function m(e){return e.includes("scale")?1:0}function g(e,t){let n,r;if(!e||"none"===e)return m(t);let i=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(i)n=p,r=i;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=c,r=t}if(!r)return m(t);let o=n[t],a=r[1].split(",").map(v);return"function"==typeof o?o(a):a[o]}let y=(e,t)=>{let{transform:n="none"}=getComputedStyle(e);return g(n,t)};function v(e){return parseFloat(e.trim())}let b=e=>t=>"string"==typeof t&&t.startsWith(e),x=b("--"),w=b("var(--"),S=e=>!!w(e)&&k.test(e.split("/*")[0].trim()),k=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function E({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}let j=(e,t,n)=>e+(t-e)*n;function C(e){return void 0===e||1===e}function _({scale:e,scaleX:t,scaleY:n}){return!C(e)||!C(t)||!C(n)}function T(e){return _(e)||A(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function A(e){var t,n;
1return(t=e.x)&&"0%"!==t||(n=e.y)&&"0%"!==n}function M(e,t,n,r,i){return void 0!==i&&(e=r+i*(e-r)),r+n*(e-r)+t}function P(e,t=0,n=1,r,i){e.min=M(e.min,t,n,r,i),e.max=M(e.max,t,n,r,i)}function R(e,{x:t,y:n}){P(e.x,t.translate,t.scale,t.originPoint),P(e.y,n.translate,n.scale,n.originPoint)}function I(e,t){e.min=e.min+t,e.max=e.max+t}function O(e,t,n,r,i=.5){let o=j(e.min,e.max,i);P(e,t,n,o,r)}function $(e,t){O(e.x,t.x,t.scaleX,t.scale,t.originX),O(e.y,t.y,t.scaleY,t.scale,t.originY)}function D(e,t){return E(function(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}let L=new Set(["width","height","top","left","right","bottom",...a]),z=(e,t,n)=>n>t?t:n<e?e:n,V={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},N={...V,transform:e=>z(0,1,e)},F={...V,default:1},B=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),U=B("deg"),H=B("%"),W=B("px"),G=B("vh"),Y=B("vw"),q={...H,parse:e=>H.parse(e)/100,transform:e=>H.transform(100*e)},Z=e=>t=>t.test(e),K=[V,W,H,U,Y,G,{test:e=>"auto"===e,parse:e=>e}],X=e=>K.find(Z(e)),Q=()=>{},J=()=>{},ee=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),et=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,en=e=>e===V||e===W,er=new Set(["x","y","z"]),ei=a.filter(e=>!er.has(e)),eo={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>g(t,"x"),y:(e,{transform:t})=>g(t,"y")};eo.translateX=eo.x,eo.translateY=eo.y;let ea=e=>e,es={},el=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],eu={value:null,addProjectionMetrics:null};function ec(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=el.reduce((e,n)=>(e[n]=function(e,t){let n=new Set,r=new Set,i=!1,o=!1,a=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},l=0;function u(t){a.has(t)&&(c.schedule(t),e()),l++,t(s)}let c={schedule:(e,t=!1,o=!1)=>{let s=o&&i?n:r;return t&&a.add(e),s.has(e)||s.add(e),e},cancel:e=>{r.delete(e),a.delete(e)},process:e=>{if(s=e,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(u),t&&eu.value&&eu.value.frameloop[t].push(l),l=0,n.clear(),i=!1,o&&(o=!1,c.process(e))}};return c}(o,t?n:void 0),e),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:f,postRender:p}=a,m=()=>{let o=es.useManualTiming?i.timestamp:performance.now();n=!1,es.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,40),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),l.process(i),u.process(i),c.process(i),d.process(i),h.process(i),f.process(i),p.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))},g=()=>{n=!0,r=!0,i.isProcessing||e(m)};return{schedule:el.reduce((e,t)=>{let r=a[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<el.length;t++)a[el[t]].cancel(e)},state:i,steps:a}}let{schedule:ed,cancel:eh,state:ef,steps:ep}=ec("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:ea,!0),em=new Set,eg=!1,ey=!1,ev=!1;function eb(){if(ey){let e=Array.from(em).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=function(e){let t=[];return ei.forEach(n=>{let r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}ey=!1,eg=!1,em.forEach(e=>e.complete(ev)),em.clear()}function ex(){em.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ey=!0)})}class ew{constructor(e,t,n,r,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(em.add(this),eg||(eg=!0,ed.read(ex),ed.resolveKeyframes(eb))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){let i=r?.get(),o=e[e.length-1];if(void 0!==i)e[0]=i;else if(n&&t){let r=n.readValue(t,o);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=o),r&&void 0===i&&r.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),em.delete(this)}cancel(){"scheduled"===this.state&&(em.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}let eS=e=>/^0[^.\s]+$/u.test(e),ek=e=>Math.round(1e5*e)/1e5,eE=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,ej=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,eC=(e,t)=>n=>!!("string"==typeof n&&ej.test(n)&&n.startsWith(e)||t&&null!=n&&Object.prototype.hasOwnProperty.call(n,t)),e_=(e,t,n
1)=>r=>{if("string"!=typeof r)return r;let[i,o,a,s]=r.match(eE);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},eT=e=>z(0,255,e),eA={...V,transform:e=>Math.round(eT(e))},eM={test:eC("rgb","red"),parse:e_("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+eA.transform(e)+", "+eA.transform(t)+", "+eA.transform(n)+", "+ek(N.transform(r))+")"},eP={test:eC("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:eM.transform},eR={test:eC("hsl","hue"),parse:e_("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+H.transform(ek(t))+", "+H.transform(ek(n))+", "+ek(N.transform(r))+")"},eI={test:e=>eM.test(e)||eP.test(e)||eR.test(e),parse:e=>eM.test(e)?eM.parse(e):eR.test(e)?eR.parse(e):eP.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?eM.transform(e):eR.transform(e),getAnimatableNone:e=>{let t=eI.parse(e);return t.alpha=0,eI.transform(t)}},eO=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,e$="number",eD="color",eL=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ez(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],o=0,a=t.replace(eL,e=>(eI.test(e)?(r.color.push(o),i.push(eD),n.push(eI.parse(e))):e.startsWith("var(")?(r.var.push(o),i.push("var"),n.push(e)):(r.number.push(o),i.push(e$),n.push(parseFloat(e))),++o,"${}")).split("${}");return{values:n,split:a,indexes:r,types:i}}function eV(e){return ez(e).values}function eN(e){let{split:t,types:n}=ez(e),r=t.length;return e=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],void 0!==e[o]){let t=n[o];t===e$?i+=ek(e[o]):t===eD?i+=eI.transform(e[o]):i+=e[o]}return i}}let eF=e=>"number"==typeof e?0:eI.test(e)?eI.getAnimatableNone(e):e,eB={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(eE)?.length||0)+(e.match(eO)?.length||0)>0},parse:eV,createTransformer:eN,getAnimatableNone:function(e){let t=eV(e);return eN(e)(t.map(eF))}},eU=new Set(["brightness","contrast","saturate","opacity"]);function eH(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[r]=n.match(eE)||[];if(!r)return e;let i=n.replace(r,""),o=eU.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}let eW=/\b([a-z-]*)\(.*?\)/gu,eG={...eB,getAnimatableNone:e=>{let t=e.match(eW);return t?t.map(eH).join(" "):e}},eY={...V,transform:Math.round},eq={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,radius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,top:W,right:W,bottom:W,left:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,backgroundPositionX:W,backgroundPositionY:W,rotate:U,rotateX:U,rotateY:U,rotateZ:U,scale:F,scaleX:F,scaleY:F,scaleZ:F,skew:U,skewX:U,skewY:U,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:N,originX:q,originY:q,originZ:W,zIndex:eY,fillOpacity:N,strokeOpacity:N,numOctaves:eY},eZ={...eq,color:eI,backgroundColor:eI,outlineColor:eI,fill:eI,stroke:eI,borderColor:eI,borderTopColor:eI,borderRightColor:eI,borderBottomColor:eI,borderLeftColor:eI,filter:eG,WebkitFilter:eG},eK=e=>eZ[e];function eX(e,t){let n=eK(e);return n!==eG&&(n=eB),n.getAnimatableNone?n.getAnimatableNone(t):void 0}let eQ=new Set(["auto","none","0"]);class eJ extends ew{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if("string"==typeof r&&S(r=r.trim())){let i=function e(t,n,r=1){J(r<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[i,o]=function(e){let t=et.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}(t);if(!i)return;let a=window.getComputedStyle(n).getPropertyValue(i);if(a){let e=a.trim();return ee(e)?parseFloat(e):e}return S(o)?e(o,n,r+1):o}(r,t.current);void 0!==i&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!L.has(n)||2!==e.length)return;let[r,i]=e,o=X(r),a=X(i);
1if(o!==a){if(en(o)&&en(a))for(let t=0;t<e.length;t++){let n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else eo[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++){var r;(null===e[t]||("number"==typeof(r=e[t])?0===r:null===r||"none"===r||"0"===r||eS(r)))&&n.push(t)}n.length&&function(e,t,n){let r,i=0;for(;i<e.length&&!r;){let t=e[i];"string"==typeof t&&!eQ.has(t)&&ez(t).values.length&&(r=e[i]),i++}if(r&&n)for(let i of t)e[i]=eX(n,r)}(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=eo[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,o=n[i];n[i]=eo[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEac
1h(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}let e0=e=>!!(e&&e.getVelocity);function e1(){r=void 0}let e2={now:()=>(void 0===r&&e2.set(ef.isProcessing||es.useManualTiming?ef.timestamp:performance.now()),r),set:e=>{r=e,queueMicrotask(e1)}};function e5(e,t){-1===e.indexOf(t)&&e.push(t)}function e3(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}class e4{constructor(){this.subscriptions=[]}add(e){return e5(this.subscriptions,e),()=>e3(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}let e6=e=>!isNaN(parseFloat(e)),e9={current:void 0};class e8{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=e2.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=e2.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=e6(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new e4);let n=this.events[e].add(t);return"change"===e?()=>{n(),ed.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return e9.current&&e9.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var e;let t=e2.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let n=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e=parseFloat(this.current)-parseFloat(this.prevFrameValue),n?1e3/n*e:0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function e7(e,t){return new e8(e,t)}let te=[...K,eI,eB],tt=e=>te.find(Z(e)),{schedule:tn,cancel:tr}=ec(queueMicrotask,!1),ti={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},to={};for(let e in ti)to[e]={isEnabled:t=>ti[e].some(e=>!!t[e])};let ta=()=>({translate:0,scale:1,origin:0,originPoint:0}),ts=()=>({x:ta(),y:ta()}),tl=()=>({min:0,max:0}),tu=()=>({x:tl(),y:tl()});var tc=n(11359);let td={current:null},th={current:!1},tf=new WeakMap;function tp(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function tm(e){return"string"==typeof e||Array.isArray(e)}let tg=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ty=["initial",...tg];function tv(e){return tp(e.animate)||ty.some(t=>tm(e[t]))}function tb(e){return!!(tv(e)||e.variants)}function tx(e){let t=[{},{}];
1return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function tw(e,t,n,r){if("function"==typeof t){let[i,o]=tx(r);t=t(void 0!==n?n:e.custom,i,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[i,o]=tx(r);t=t(void 0!==n?n:e.custom,i,o)}return t}let tS=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class tk{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ew,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=e2.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,ed.render(this.render,!1,!0))};let{latestValues:s,renderState:l}=o;this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=tv(t),this.isVariantNode=tb(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...c}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in c){let t=c[e];void 0!==s[e]&&e0(t)&&t.set(s[e])}}mount(e){this.current=e,tf.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),th.current||function(){if(th.current=!0,tc.j){if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>td.current=e.matches;e.addEventListener("change",t),t()}else td.current=!1}}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||td.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in this.projection&&this.projection.unmount(),eh(this.notifyUpdate),eh(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){let n;this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let r=s.has(e);r&&this.onBindTransform&&this.onBindTransform();let i=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&ed.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});window.MotionCheckAppearSync&&(n=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),n&&n(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in to){let t=to[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):tu()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<tS.length;t++){let n=tS[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(let r in t){let i=t[r],o=n[r];if(e0(i))e.addValue(r,i);
1else if(e0(o))e.addValue(r,e7(i,{owner:e}));else if(o!==i){if(e.hasValue(r)){let t=e.getValue(r);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,e7(void 0!==t?t:i,{owner:e}))}}}for(let r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=e7(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=n&&("string"==typeof n&&(ee(n)||eS(n))?n=parseFloat(n):!tt(n)&&eB.test(t)&&(n=eX(e,t)),this.setBaseTarget(e,e0(n)?n.get():n)),e0(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let t;let{initial:n}=this.props;if("string"==typeof n||"object"==typeof n){let r=tw(this.props,n,this.presenceContext?.custom);r&&(t=r[e])}if(n&&void 0!==t)return t;let r=this.getBaseTargetFromProps(this.props,e);return void 0===r||e0(r)?void 0!==this.initialValues[e]&&void 0===t?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new e4),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){tn.render(this.render)}}class tE extends tk{constructor(){super(...arguments),this.KeyframeResolver=eJ}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;e0(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}let tj=(e,t)=>t&&"number"==typeof e?t.transform(e):e,tC={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},t_=a.length;function tT(e,t,n){let{style:r,vars:i,transformOrigin:o}=e,l=!1,u=!1;for(let e in t){let n=t[e];if(s.has(e)){l=!0;continue}if(x(e)){i[e]=n;continue}{let t=tj(n,eq[e]);e.startsWith("origin")?(u=!0,o[e]=t):r[e]=t}}if(!t.transform&&(l||n?r.transform=function(e,t,n){let r="",i=!0;for(let o=0;o<t_;o++){let s=a[o],l=e[s];if(void 0===l)continue;let u=!0;if(!(u="number"==typeof l?l===(s.startsWith("scale")?1:0):0===parseFloat(l))||n){let e=tj(l,eq[s]);if(!u){i=!1;let t=tC[s]||s;r+=`${t}(${e}) `}n&&(t[s]=e)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),u){let{originX:e="50%",originY:t="50%",originZ:n=0}=o;r.transformOrigin=`${e} ${t} ${n}`}}function tA(e,{style:t,vars:n},r,i){let o;let a=e.style;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}let tM={};function tP(e,{layout:t,layoutId:n}){return s.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!tM[e]||"opacity"===e)}function tR(e,t,n){let{style:r}=e,i={};for(let o in r)(e0(r[o])||t.style&&e0(t.style[o])||tP(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=r[o]);return i}class tI extends tE{constructor(){super(...arguments),this.type="html",this.renderInstance=tA}readValueFromInstance(e,t){if(s.has(t))return this.projection?.isProjecting?m(t):y(e,t);{let n=window.getComputedStyle(e),r=(x(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof r?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return D(e,t)}build(e,t,n){tT(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return tR(e,t,n)}}let tO=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),t$={offset:"stroke-dashoffset",array:"stroke-dasharray"},tD={offset:"strokeDashoffset",array:"strokeDasharray"};function tL(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...s}
1,l,u,c){if(tT(e,s,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:h}=e;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=c?.transformBox??"fill-box",delete d.transformBox),void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==i&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;let o=i?t$:tD;e[o.offset]=W.transform(-r);let a=W.transform(t),s=W.transform(n);e[o.array]=`${a} ${s}`}(d,i,o,a,!1)}let tz=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),tV=e=>"string"==typeof e&&"svg"===e.toLowerCase();function tN(e,t,n){let r=tR(e,t,n);for(let n in e)(e0(e[n])||e0(t[n]))&&(r[-1!==a.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}class tF extends tE{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=tu}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(s.has(t)){let e=eK(t);return e&&e.default||0}return t=tz.has(t)?t:tO(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return tN(e,t,n)}
1build(e,t,n){tL(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){for(let n in tA(e,t,void 0,r),t.attrs)e.setAttribute(tz.has(n)?n:tO(n),t.attrs[n])}(e,t,0,r)}mount(e){this.isSVGTag=tV(e.tagName),super.mount(e)}}let tB=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function tU(e){if("string"!=typeof e||e.includes("-"));else if(tB.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}var tH=n(52660),tW=n(63375);let tG=(0,o.createContext)({strict:!1});var tY=n(57935);let tq=(0,o.createContext)({});function tZ(e){return Array.isArray(e)?e.join(" "):e}let tK=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function tX(e,t,n){for(let r in t)e0(t[r])||tP(r,n)||(e[r]=t[r])}let tQ=()=>({...tK(),attrs:{}}),tJ=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function t0(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||tJ.has(e)}let t1=e=>!t0(e);try{i=require("@emotion/is-prop-valid").default,"function"==typeof i&&(t1=e=>e.startsWith("on")?!t0(e):i(e))}catch{}var t2=n(81836),t5=n(7528);function t3(e){return e0(e)?e.get():e}let t4=e=>(t,n)=>{let r=(0,o.useContext)(tq),i=(0,o.useContext)(t2.O),a=()=>(function(e,t,n,r){let{scrapeMotionValuesFromProps:i,createRenderState:o}=e;return{latestValues:function(e,t,n,r){let i={},o=r(e,{});for(let e in o)i[e]=t3(o[e]);let{initial:a,animate:s}=e,l=tv(e),u=tb(e);t&&u&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let c=!!n&&!1===n.initial,d=(c=c||!1===a)?s:a;if(d&&"boolean"!=typeof d&&!tp(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=tw(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=c?t.length-1:0;t=t[e]}null!==t&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}(t,n,r,i),renderState:o()}})(e,t,r,i);return n?a():(0,t5.h)(a)},t6=t4({scrapeMotionValuesFromProps:tR,createRenderState:tK}),t9=t4({scrapeMotionValuesFromProps:tN,createRenderState:tQ}),t8=Symbol.for("motionComponentSymbol");function t7(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}let ne="data-"+tO("framerAppearId"),nt=(0,o.createContext)({});var nn=n(53368);function nr(e){var t,n;let{forwardMotionProps:r=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;i&&function(e){for(let t in e)to[t]={...to[t],...e[t]}}(i);let s=tU(e)?t9:t6;function l(t,n){var i;let l;let u={...(0,o.useContext)(tY._),...t,layoutId:function(e){let{layoutId:t}=e,n=(0,o.useContext)(tW.p).id;return n&&void 0!==t?n+"-"+t:t}(t)},{isStatic:c}=u,d=function(e){let{initial:t,animate:n}=function(e,t){if(tv(e)){let{initial:t,animate:n}=e;return{initial:!1===t||tm(t)?t:void 0,animate:tm(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,o.useContext)(tq));return(0,o.useMemo)(()=>({initial:t,animate:n}),[tZ(t),tZ(n)])}(t),h=s(t,c);if(!c&&tc.j){(0,o.useContext)(tG).strict;let t=function(e){let{drag:t,layout:n}=to;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(u);l=t.MeasureLayout,d.visualElement=function(e,t,n,r,i){var a,s,l,u;let{visualElement:c}=(0,o.useContext)(tq),d=(0,o.useContext)(tG),h=(0,o.useContext)(t2.O),f=(0,o.useContext)(tY._).reducedMotion,p=(0,o.useRef)(null);r=r||d.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:c,props:n,presenceContext:h,blockInitialAnimation:!!h&&!1===h.initial,reducedMotionConfig:f}));let m=p.current,g=(0,o.useContext)(nt);m&&!m.projection&&i&&("html"===m.type||"svg"===m.type)&&function(e,t,n,r){let{layoutId:i,layout:o,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||s&&t7(s),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}(p.current,n,i,g);let y=(0,o.useRef)(!1);(0,o.useInsertionEffect)(()=>{m&&y.current&&m.update(n,h)});let v=n[ne],b=(0,o.useRef)(!!v&&!(null===(a=(s=window).MotionHandoffIsComplete)||void 0===a?void 0:a.call(s,v))&&(null===(l=(u=window).MotionHasOptimisedAnimation)||void 0===l?void 0:l.call(u,v)));return(0,nn.L)(()=>{m&&(y.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),b.current&&m.animationState&&m.animationState.animateChanges())}),(0,o.useEffect)(()=>{m&&(!b.current&&m.animationState&&m.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var e,t;null===(e=(t=window).MotionHandoffMarkAsComplete)||void 0===e||e.call(t,v)}),b.current=!1),m.enteringChildren=void 0)}),m}(e,h,u,a,t.ProjectionNode)}return(0,tH.jsxs)(tq.Provider,{value:d,children:[l&&d.visualElement?(0,tH.jsx)(l,{visualElement:d.visualElement,...u}):null,function(e,t,n,r,i){let{latestValues:a}=r,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5],l=(tU(e)?function(e,t,n,r){let i=(0,o.useMemo)(()=>{let n=tQ();return tL(n,t,tV(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};tX(t,e.style,e),i.style={...t,...i.style}}return i}:function(e,t){let n={},r=function(e,t){let n=e.style||{},r={};return tX(r,n,e),Object.assign(r,function(e,t){let{transformTemplate:n}=e;return(0,o.useMemo)(()=>{let e=tK();return tT(e,t,n),Object.assign({},e.vars,e.style)},[t])}(e,t)),r}(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-".concat("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTa
1p||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n})(t,a,i,e),u=function(e,t,n){let r={};for(let i in e)("values"!==i||"object"!=typeof e.values)&&(t1(i)||!0===n&&t0(i)||!t&&!t0(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(t,"string"==typeof e,s),c=e!==o.Fragment?{...u,...l,ref:n}:{},{children:d}=t,h=(0,o.useMemo)(()=>e0(d)?d.get():d,[d]);return(0,o.createElement)(e,{...c,children:h})}(e,t,(i=d.visualElement,(0,o.useCallback)(e=>{e&&h.onMount&&h.onMount(e),i&&(e?i.mount(e):i.unmount()),n&&("function"==typeof n?n(e):t7(n)&&(n.current=e))},[i])),h,c,r)]})}l.displayName="motion.".concat("string"==typeof e?e:"create(".concat(null!==(n=null!==(t=e.displayName)&&void 0!==t?t:e.name)&&void 0!==n?n:"",")"));let u=(0,o.forwardRef)(l);return u[t8]=e,u}function ni(e,t,n){let r=e.getProps();return tw(r,t,void 0!==n?n:r.custom,e)}function no(e,t){return e?.[t]??e?.default??e}let na=e=>Array.isArray(e);function ns(e,t){let n=e.getValue("willChange");if(e0(n)&&n.add)return n.add(t);if(!n&&es.WillChange){let n=new es.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function nl(e){e.duration=0,e.type="keyframes"}let nu=(e,t)=>n=>t(e(n)),nc=(...e)=>e.reduce(nu),nd=e=>1e3*e,nh=e=>e/1e3,nf={layout:0,mainThread:0,waapi:0};
1function np(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function nm(e,t){return n=>n>0?t:e}let ng=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},ny=[eP,eM,eR],nv=e=>ny.find(t=>t.test(e));function nb(e){let t=nv(e);if(Q(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===eR&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,a=0;if(t/=100){let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=np(s,r,e+1/3),o=np(s,r,e),a=np(s,r,e-1/3)}else i=o=a=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*a),alpha:r}}(n)),n}let nx=(e,t)=>{let n=nb(e),r=nb(t);if(!n||!r)return nm(e,t);let i={...n};return e=>(i.red=ng(n.red,r.red,e),i.green=ng(n.green,r.green,e),i.blue=ng(n.blue,r.blue,e),i.alpha=j(n.alpha,r.alpha,e),eM.transform(i))},nw=new Set(["none","hidden"]);function nS(e,t){return n=>j(e,t,n)}function nk(e){return"number"==typeof e?nS:"string"==typeof e?S(e)?nm:eI.test(e)?nx:nC:Array.isArray(e)?nE:"object"==typeof e?eI.test(e)?nx:nj:nm}function nE(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>nk(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function nj(e,t){let n={...e,...t},r={};for(let i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=nk(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}let nC=(e,t)=>{let n=eB.createTransformer(t),r=ez(e),i=ez(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?nw.has(e)&&!i.values.length||nw.has(t)&&!r.values.length?nw.has(e)?n=>n<=0?e:t:n=>n>=1?t:e:nc(nE(function(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let o=t.types[i],a=e.indexes[o][r[o]],s=e.values[a]??0;n[i]=s,r[o]++}return n}(r,i),i.values),n):(Q(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),nm(e,t))};function n_(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?j(e,t,n):nk(e)(e,t)}let nT=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>ed.update(t,e),stop:()=>eh(t),now:()=>ef.isProcessing?ef.timestamp:e2.now()}},nA=(e,t,n=10)=>{let r="",i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(1e4*e(t/(i-1)))/1e4+", ";return`linear(${r.substring(0,r.length-2)})`};function nM(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function nP(e,t,n){var r,i;let o=Math.max(t-5,0);return r=n-e(o),(i=t-o)?1e3/i*r:0}let nR={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function nI(e,t){return e*Math.sqrt(1-t*t)}let nO=["duration","bounce"],n$=["stiffness","damping","mass"];function nD(e,t){return t.some(t=>void 0!==e[t])}function nL(e=nR.visualDuration,t=nR.bounce){let n;let r="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:i,restDelta:o}=r,a=r.keyframes[0],s=r.keyframes[r.keyframes.length-1],l={done:!1,value:a},{stiffness:u,damping:c,mass:d,duration:h,velocity:f,isResolvedFromDuration:p}=function(e){let t={velocity:nR.velocity,stiffness:nR.stiffness,damping:nR.damping,mass:nR.mass,isResolvedFromDuration:!1,...e};if(!nD(e,n$)&&nD(e,nO)){if(e.visualDuration){let n=2*Math.PI/(1.2*e.visualDuration),r=n*n,i=2*z(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:nR.mass,stiffness:r,damping:i}}else{let n=function({duration:e=nR.duration,bounce:t=nR.bounce,velocity:n=nR.velocity,mass:r=nR.mass}){let i,o;Q(e<=nd(nR.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=z(nR.minDamping,nR.maxDamping,a),e=z(nR.minDuration,nR.maxDuration,nh(e)),a<1?(i=t=>{let r=t*a,i=r*e;return .001-(r-n)/nI(t,a)*Math.exp(-i)},o=t=>{let r=t*a*e,o=Math.pow(a,2)*Math.pow(t,2)*e,s=nI(Math.pow(t,2),a);return(r*n+n-o)*Math.exp(-r)*(-i(t)+.001>0?-1:1)/s}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),o=t=>e*e*(n-t)*Math.exp(-t*e));let s=function(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}(i,o,5/e);if(e=nd(e),isNaN(s))return{stiffness:nR.stiffness,damping:nR.damping,duration:e};{let t=Math.pow(s,2)*r;
1return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}(e);(t={...t,...n,mass:nR.mass}).isResolvedFromDuration=!0}}return t}({...r,velocity:-nh(r.velocity||0)}),m=f||0,g=c/(2*Math.sqrt(u*d)),y=s-a,v=nh(Math.sqrt(u/d)),b=5>Math.abs(y);if(i||(i=b?nR.restSpeed.granular:nR.restSpeed.default),o||(o=b?nR.restDelta.granular:nR.restDelta.default),g<1){let e=nI(v,g);n=t=>s-Math.exp(-g*v*t)*((m+g*v*y)/e*Math.sin(e*t)+y*Math.cos(e*t))}else if(1===g)n=e=>s-Math.exp(-v*e)*(y+(m+v*y)*e);else{let e=v*Math.sqrt(g*g-1);n=t=>{let n=Math.exp(-g*v*t),r=Math.min(e*t,300);return s-n*((m+g*v*y)*Math.sinh(r)+e*y*Math.cosh(r))/e}}let x={calculatedDuration:p&&h||null,next:e=>{let t=n(e);if(p)l.done=e>=h;else{let r=0===e?m:0;g<1&&(r=0===e?nd(m):nP(n,e,t));let a=Math.abs(r)<=i,u=Math.abs(s-t)<=o;l.done=a&&u}return l.value=l.done?s:t,l},toString:()=>{let e=Math.min(nM(x),2e4),t=nA(t=>x.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return x}function nz({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:l,restDelta:u=.5,restSpeed:c}){let d,h;let f=e[0],p={done:!1,value:f},m=e=>void 0!==s&&e<s||void 0!==l&&e>l,g=e=>void 0===s?l:void 0===l?s:Math.abs(s-e)<Math.abs(l-e)?s:l,y=n*t,v=f+y,b=void 0===a?v:a(v);b!==v&&(y=b-f);let x=e=>-y*Math.exp(-e/r),w=e=>b+x(e),S=e=>{let t=x(e),n=w(e);p.done=Math.abs(t)<=u,p.value=p.done?b:n},k=e=>{m(p.value)&&(d=e,h=nL({keyframes:[p.value,g(p.value)],velocity:nP(w,e,p.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return(h||void 0!==d||(t=!0,S(e),k(e)),void 0!==d&&e>=d)?h.next(e-d):(t||S(e),p)}}}nL.applyToOptions=e=>{let t=function(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(nM(r),2e4);return{type:"keyframes",ease:e=>r.next(i*e).value/t,duration:nh(i)}}(e,100,nL);return e.ease=t.ease,e.duration=nd(t.duration),e.type="keyframes",e};let nV=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function nN(e,t,n,r){if(e===t&&n===r)return ea;let i=t=>(function(e,t,n,r,i){let o,a;let s=0;do(o=nV(a=t+(n-t)/2,r,i)-e)>0?n=a:t=a;while(Math.abs(o)>1e-7&&++s<12);return a})(t,0,1,e,n);return e=>0===e||1===e?e:nV(i(e),t,r)}let nF=nN(.42,0,1,1),nB=nN(0,0,.58,1),nU=nN(.42,0,.58,1),nH=e=>Array.isArray(e)&&"number"!=typeof e[0],nW=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,nG=e=>t=>1-e(1-t),nY=nN(.33,1.53,.69,.99),nq=nG(nY),nZ=nW(nq),nK=e=>(e*=2)<1?.5*nq(e):.5*(2-Math.pow(2,-10*(e-1))),nX=e=>1-Math.sin(Math.acos(e)),nQ=nG(nX),nJ=nW(nX),n0=e=>Array.isArray(e)&&"number"==typeof e[0],n1={linear:ea,easeIn:nF,easeInOut:nU,easeOut:nB,circIn:nX,circInOut:nJ,circOut:nQ,backIn:nq,backInOut:nZ,backOut:nY,anticipate:nK},n2=e=>"string"==typeof e,n5=e=>{if(n0(e)){J(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,n,r,i]=e;return nN(t,n,r,i)}return n2(e)?(J(void 0!==n1[e],`Invalid easing type '${e}'`,"invalid-easing-type"),n1[e]):e},n3=(e,t,n)=>{let r=t-e;return 0===r?1:(n-e)/r};function n4({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){let i=nH(r)?r.map(n5):n5(r),o={done:!1,value:t[0]},a=function(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let o=e.length;if(J(o===t.length,"Both input and output ranges must be the same length","range-length"),1===o)return()=>t[0];if(2===o&&t[0]===t[1])return()=>t[1];let a=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=function(e,t,n){let r=[],i=n||es.mix||n_,o=e.length-1;for(let n=0;n<o;n++){let o=i(e[n],e[n+1]);t&&(o=nc(Array.isArray(t)?t[n]||ea:t,o)),r.push(o)}return r}(t,r,i),l=s.length,u=n=>{if(a&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=n3(e[r],e[r+1],n);return s[r](i)};return n?t=>u(z(e[0],e[o-1],t)):u}((n&&n.length===t.length?n:function(e){let t=[0];return function(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=n3(0,t,r);e.push(j(n,1,i))}}(t,e.length-1),t}(t)).map(t=>t*e),t,{ease:Array.isArray(i)?i:t.map(()=>i||nU).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(o.value=a(t),o.done=t>=e,o)}}let n6=e=>null!==e;function n9(e,{repeat:t,repeatType:n="loop"},r,i=1){let o=e.filter(n6),a=i<0||t&&"loop"!==n&&t%2==1?0:o.length-1;return a&&void 0!==r?r:o[a]}let n8={decay:nz,inertia:nz,tween:n4,keyframes:n4,spring:nL};function n7(e){"string"==typeof e.type&&(e.type=n8[e.type])}class re{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}let rt=e=>e/100;class rn extends re{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==e2.now()&&this.tick(e2.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},nf.mainThread++,this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){let{options:e}=this;n7(e);let{type:t=n4,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=e,{keyframes:a}=e,s=t||n4;s!==n4&&"number"!=typeof a[0]&&(this.mixKeyframes=nc(rt,n_(a[0],a[1])),a=[0,100]);let l=s({...e,keyframes:a});"mirror"===i&&(this.mirroredGenerator=s({...e,keyframes:[...a].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=nM(l));let{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);let{delay:l=0,keyframes:u,repeat:c,repeatType:d,repeatDelay:h,type:f,onUpdate:p,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let v=this.currentTime,b=n;if(c){let e=Math.min(this.currentTime,r)/a,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,(t=Math.min(t,c+1))%2&&("reverse"===d?(n=1-n,h&&(n-=h
1/a)):"mirror"===d&&(b=o)),v=z(0,1,n)*a}let x=y?{done:!1,value:u[0]}:b.next(v);i&&(x.value=i(x.value));let{done:w}=x;y||null===s||(w=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return S&&f!==nz&&(x.value=n9(u,this.options,m,this.speed)),p&&p(x.value),S&&this.finish(),x}then(e,t){return this.finished.then(e,t)}get duration(){return nh(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+nh(e)}get time(){return nh(this.currentTime)}set time(e){e=nd(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(e2.now());let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=nh(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=nT,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();let n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(e2.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,nf.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}let rr=e=>e.startsWith("--");function ri(e){let t;return()=>(void 0===t&&(t=e()),t)}let ro=ri(()=>void 0!==window.ScrollTimeline),ra={},rs=function(e,t){let n=ri(e);return()=>ra[t]??n()}(()=>{try{document.createElement("div").animate({opacity:0}
1,{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),rl=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ru={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:rl([0,.65,.55,1]),circOut:rl([.55,0,1,.45]),backIn:rl([.31,.01,.66,-.59]),backOut:rl([.33,1.53,.69,.99])};function rc(e){return"function"==typeof e&&"applyToOptions"in e}class rd extends re{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=e,J("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");let l=function({type:e,...t}){return rc(e)&&rs()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=function(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:s="easeOut",times:l}={},u){let c={[t]:n};l&&(c.offset=l);let d=function e(t,n){if(t)return"function"==typeof t?rs()?nA(t,n):"ease-out":n0(t)?rl(t):Array.isArray(t)?t.map(t=>e(t,n)||ru.easeOut):ru[t]}(s,i);Array.isArray(d)&&(c.easing=d),eu.value&&nf.waapi++;let h={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===a?"alternate":"normal"};u&&(h.pseudoElement=u);let f=e.animate(c,h);return eu.value&&f.finished.finally(()=>{nf.waapi--}),f}(t,n,r,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=n9(r,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(e):rr(n)?t.style.setProperty(n,e):t.style[n]=e,this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){return nh(Number(this.animation.effect?.getComputedTiming?.().duration||0))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+nh(e)}get time(){return nh(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=nd(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&ro())?(this.animation.timeline=e,ea):t(this)}}let rh={anticipate:nK,backInOut:nZ,circInOut:nJ};class rf extends rd{constructor(e){"string"==typeof e.ease&&e.ease in rh&&(e.ease=rh[e.ease]),n7(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...o}=this.options;if(!t)return;if(void 0!==e){t.set(e);return}let a=new rn({...o,autoplay:!1}),s=nd(this.finishedTime??this.time);t.setWithVelocity(a.sample(s-10).value,a.sample(s).value,10),a.stop()}}let rp=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(eB.test(e)||"0"===e)&&!e.startsWith("url(")),rm=new Set(["opacity","clipPath","filter","transform"]),rg=ri(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class ry extends re{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:s,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=e2.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:
1o,name:s,motionValue:l,element:u,...c},h=u?.KeyframeResolver||ew;this.keyframeResolver=new h(a,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:o,velocity:a,delay:s,isHandoff:l,onUpdate:u}=n;this.resolvedAt=e2.now(),!function(e,t,n,r){let i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;let o=e[e.length-1],a=rp(i,t),s=rp(o,t);return Q(a===s,`You are trying to animate ${t} from "${i}" to "${o}". "${a?o:i}" is not an animatable value.`,"value-not-animatable"),!!a&&!!s&&(function(e){let t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||rc(n))&&r)}(e,i,o,a)&&((es.instantAnimations||!s)&&u?.(n9(e,n,t)),e[0]=e[e.length-1],nl(n),n.repeat=0);let c={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},d=!l&&function(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:s,transformTemplate:l}=t.owner.getProps();return rg()&&n&&rm.has(n)&&("transform"!==n||!l)&&!s&&!r&&"mirror"!==i&&0!==o&&"inertia"!==a}(c)?new rf({...c,element:c.motionValue.owner.current}):new rn(c);d.finished.then(()=>this.notifyFinished()).catch(ea),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),ev=!0,ex(),eb(),ev=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}let rv=e=>null!==e,rb={type:"spring",stiffness:500,damping:25,restSpeed:10},rx=e=>({type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}),rw={type:"keyframes",duration:.8},rS={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rk=(e,{keyframes:t})=>t.length>2?rw:s.has(e)?e.startsWith("scale")?rx(t[1]):rb:rS,rE=(e,t,n,r={},i,o)=>a=>{let s=no(r,e)||{},l=s.delay||r.delay||0,{elapsed:u=0}=r;u-=nd(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:i};!function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,elapsed:u,...c}){return!!Object.keys(c).length}(s)&&Object.assign(c,rk(e,c)),c.duration&&(c.duration=nd(c.duration)),c.repeatDelay&&(c.repeatDelay=nd(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if(!1!==c.type&&(0!==c.duration||c.repeatDelay)||(nl(c),0!==c.delay||(d=!0)),(es.instantAnimations||es.skipAnimations)&&(d=!0,nl(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!o&&void 0!==t.get()){let e=function(e,{repeat:t,repeatType:n="loop"},r){let i=e.filter(rv),o=t&&"loop"!==n&&t%2==1?0:i.length-1;return i[o]}(c.keyframes,s);if(void 0!==e){ed.update(()=>{c.onUpdate(e),c.onComplete()});return}}return s.isSync?new rn(c):new ry(c)};function rj(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:a,...s}=t;r&&(o=r);let l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(void 0===i||u&&function({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}(u,t))continue;let a={delay:n,...no(o||{},t)},c=r.get();if(void 0!==c&&!r.isAnimating&&!Array.isArray(i)&&i===c&&!a.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){let n=e.props[ne];if(n){let e=window.MotionHandoffAnimation(n,t,ed);null!==e&&(a.startTime=e,d=!0)}}ns(e,t),r.start(rE(t,r,i,e.shouldReduceMotion&&L.has(t)?{type:!1}:a,e,d));let h=r.animation;h&&l.push(h)}return a&&Promise.all(l).then(()=>{ed.update(()=>{a&&function(e,t){let{transitionEnd:n={},transition:r={},...i}=ni(e,t)||{};for(let t in i={...i,...n}){var o;let n=na(o=i[t])?o[o.length-1]||0:o;e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,e7(n))}}(e,a)})}),l}function rC(e,t,n,r=0,i=1){let o=Array.from(e).sort((e,t)=>
1e.sortNodePosition(t)).indexOf(t),a=e.size,s=(a-1)*r;return"function"==typeof n?n(o,a):1===i?o*r:s-o*r}function r_(e,t,n={}){let r=ni(e,t,"exit"===n.type?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let o=r?()=>Promise.all(rj(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:o=0,staggerChildren:a,staggerDirection:s}=i;return function(e,t,n=0,r=0,i=0,o=1,a){let s=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),s.push(r_(l,t,{...a,delay:n+("function"==typeof r?0:r)+rC(e.variantChildren,l,r,i,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}(e,t,r,o,a,s,n)}:()=>Promise.resolve(),{when:s}=i;if(!s)return Promise.all([o(),a(n.delay)]);{let[e,t]="beforeChildren"===s?[o,a]:[a,o];return e().then(()=>t())}}function rT(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}let rA=ty.length,rM=[...tg].reverse(),rP=tg.length;function rR(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rI(){return{animate:rR(!0),whileInView:rR(),whileHover:rR(),whileTap:rR(),whileDrag:rR(),whileFocus:rR(),exit:rR()}}class rO{constructor(e){this.isMounted=!1,this.node=e}update(){}}class r$ extends rO{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>(function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t))r=Promise.all(t.map(t=>r_(e,t,n)));else if("string"==typeof t)r=r_(e,t,n);else{let i="function"==typeof t?ni(e,t,n.custom):t;r=Promise.all(rj(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})})(e,t,n))),n=rI(),r=!0,i=t=>(n,r)=>{let i=ni(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(o){let{props:a}=e,s=function e(t){if(!t)return;if(!t.isControllingVariants){let n=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(n.initial=t.props.initial),n}let n={};for(let e=0;e<rA;e++){let r=ty[e],i=t.props[r];(tm(i)||!1===i)&&(n[r]=i)}return n}(e.parent)||{},l=[],u=new Set,c={},d=1/0;for(let t=0;t<rP;t++){var h;let f=rM[t],p=n[f],m=void 0!==a[f]?a[f]:s[f],g=tm(m),y=f===o?p.isActive:null;!1===y&&(d=t);let v=m===s[f]&&m!==a[f]&&g;if(v&&r&&e.manuallyAnimateOnMount&&(v=!1),p.protectedKeys={...c},!p.isActive&&null===y||!m&&!p.prevProp||tp(m)||"boolean"==typeof m)continue;let b=(h=p.prevProp,"string"==typeof m?m!==h:!!Array.isArray(m)&&!rT(m,h)),x=b||f===o&&p.isActive&&!v&&g||t>d&&g,w=!1,S=Array.isArray(m)?m:[m],k=S.reduce(i(f),{});!1===y&&(k={});let{prevResolvedValues:E={}}=p,j={...E,...k},C=t=>{x=!0,u.has(t)&&(w=!0,u.delete(t)),p.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in j){let t=k[e],n=E[e];if(!c.hasOwnProperty(e))(na(t)&&na(n)?rT(t,n):t===n)?void 0!==t&&u.has(e)?C(e):p.protectedKeys[e]=!0:null!=t?C(e):u.add(e)}p.prevProp=m,p.prevResolvedValues=k,p.isActive&&(c={...c,...k}),r&&e.blockInitialAnimation&&(x=!1);let _=v&&b,T=!_||w;x&&T&&l.push(...S.map(t=>{let n={type:f};if("string"==typeof t&&r&&!_&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=ni(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=rC(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if("boolean"!=typeof a.initial){let n=ni(e,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let f=!!l.length;return r&&(!1===a.initial||a.initial===a.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,f?t(l):Promise.resolve()}return{animateChanges:o,setActive:function(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=o(t);for(let e in n)n[e].protectedKeys={};return i},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=rI()}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();tp(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let rD=0;class rL extends rO{constructor(){super(...arguments),this.id=rD++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>
1{t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}let rz={x:!1,y:!1};function rV(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}let rN=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function rF(e){return{point:{x:e.pageX,y:e.pageY}}}let rB=e=>t=>rN(t)&&e(t,rF(t));function rU(e,t,n,r){return rV(e,t,rB(n),r)}function rH(e){return e.max-e.min}function rW(e,t,n,r=.5){e.origin=r,e.originPoint=j(t.min,t.max,e.origin),e.scale=rH(n)/rH(t),e.translate=j(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function rG(e,t,n,r){rW(e.x,t.x,n.x,r?r.originX:void 0),rW(e.y,t.y,n.y,r?r.originY:void 0)}function rY(e,t,n){e.min=n.min+t.min,e.max=e.min+rH(t)}function rq(e,t,n){e.min=t.min-n.min,e.max=e.min+rH(t)}function rZ(e,t,n){rq(e.x,t.x,n.x),rq(e.y,t.y,n.y)}function rK(e){return[e("x"),e("y")]}let rX=({current:e})=>e?e.ownerDocument.defaultView:null,rQ=(e,t)=>Math.abs(e-t);class rJ{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{var e,t;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let n=r2(this.lastMoveEventInfo,this.history),r=null!==this.startEvent,i=(e=n.offset,t={x:0,y:0},Math.sqrt(rQ(e.x,t.x)**2+rQ(e.y,t.y)**2)>=this.distanceThreshold);if(!r&&!i)return;let{point:o}=n,{timestamp:a}=ef;this.history.push({...o,timestamp:a});let{onStart:s,onMove:l}=this.handlers;r||(s&&s(this.lastMoveEvent,n),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,n)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=r0(t,this.transformPagePoint),ed.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let o=r2("pointercancel"===e.type?this.lastMoveEventInfo:r0(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!rN(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=r||window;let a=r0(rF(e),this.transformPagePoint),{point:s}=a,{timestamp:l}=ef;this.history=[{...s,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,r2(a,this.history)),this.removeListeners=nc(rU(this.contextWindow,"pointermove",this.handlePointerMove),rU(this.contextWindow,"pointerup",this.handlePointerUp),rU(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),eh(this.updatePoint)}}function r0(e,t){return t?{point:t(e.point)}:e}function r1(e,t){return{x:e.x-t.x,y:e.y-t.y}}function r2({point:e},t){return{point:e,delta:r1(e,r5(t)),offset:r1(e,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=r5(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>nd(.1)));)n--;if(!r)return{x:0,y:0};let o=nh(i.timestamp-r.timestamp);if(0===o)return{x:0,y:0};let a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}(t,0)}}function r5(e){return e[e.length-1]}function r3(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function r4(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function r6(e,t,n){return{min:r9(e,t),max:r9(e,n)}}function r9(e,t){return"number"==typeof e?e:e[t]||0}let r8=new WeakMap;class r7{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=tu(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;let{dragSnapToOrigin:i}=this.getProps();this.panSession=new rJ(e,{onSessionStart:e=>{let{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(rF(e).point)},onStart:(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===n||"y"===n?rz[n]?null:(rz[n]=!0,()=>{rz[n]=!1}):rz.x||rz.y?null:(rz.x=rz.y=!0,()=>{rz.x=rz.y=!1}),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rK(e=>{let t=this.getAxisMotionValue(e).get()||0;if(H.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];if(r){let e=rH(r);t=parseFloat(t)/100*e}}}this.originPoint[e]=t}),i&&ed.postRender(()=>i(e,t)),ns(this.visualElement,"transform");let{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(e,t)=>
1{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:a}=t;if(r&&null===this.currentDirection){this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(a),null!==this.currentDirection&&i&&i(this.currentDirection);return}this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),o&&o(e,t)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>rK(e=>"paused"===this.getAnimationState(e)&&this.getAxisMotionValue(e).animation?.play())},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,distanceThreshold:n,contextWindow:rX(this.visualElement)})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:o}=r;this.startAnimation(o);let{onDragEnd:a}=this.getProps();a&&ed.postRender(()=>a(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!ie(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?j(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?j(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&t7(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=function(e,{top:t,left:n,bottom:r,right:i}){return{x:r3(e.x,n,i),y:r3(e.y,t,r)}}(n.layoutBox,e):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:r6(e,"left","right"),y:r6(e,"top","bottom")}}(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&rK(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){let n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!t7(t))return!1;let r=t.current;J(null!==r,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:i}=this.visualElement;if(!i||!i.layout)return!1;let o=function(e,t,n){let r=D(e,n),{scroll:i}=t;return i&&(I(r.x,i.offset.x),I(r.y,i.offset.y)),r}(r,i.root,this.visualElement.getTransformPagePoint()),a={x:r4((e=i.layout.layoutBox).x,o.x),y:r4(e.y,o.y)};if(n){let e=n(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=E(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{};return Promise.all(rK(a=>{if(!ie(a,t,this.currentDirection))return;let l=s&&s[a]||{};o&&(l={min:0,max:0});let u={type:"inertia",velocity:n?e[a]:0,bounceStiffness:r?200:1e6,bounceDamping:r?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(a,u)})).then(a)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return ns(this.visualElement,e),n.start(rE(e,n,0,t,this.visualElement,!1))}stopAnimation(){rK(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){rK(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){rK(t=>{let{drag:n}=this.getProps();if(!ie(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:o}=r.layout.layoutBox[t];i.set(e[t]-j(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!t7(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};rK(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){let n=t.get();r[e]=function(e,t){let n=.5,r=rH(e),i=rH(t);return i>r?n=n3(t.min,t.max-r,e.min):r>i&&(n=n3(e.min,e.max-i,t.min)),z(0,1,n)}({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),rK(t=>{if(!ie(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];n.set(j(i,o,r[t]))})}addListeners(){if(!this.visualElement.current)return;r8.set(this.visualElement,this);let e=rU(this.visualElement.current,"pointerdown",e=>{let{drag:t,dragListener:n=!0}
1=this.getProps();t&&n&&this.start(e)}),t=()=>{let{dragConstraints:e}=this.getProps();t7(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),ed.read(t);let i=rV(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(rK(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{i(),e(),r(),o&&o()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=.35,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function ie(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}class it extends rO{constructor(e){super(e),this.removeGroupControls=ea,this.removeListeners=ea,this.controls=new r7(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ea}unmount(){this.removeGroupControls(),this.removeListeners()}}let ir=e=>(t,n)=>{e&&ed.postRender(()=>e(t,n))};class ii extends rO{constructor(){super(...arguments),this.removePointerDownListener=ea}onPointerDown(e){this.session=new rJ(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:rX(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:ir(e),onStart:ir(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&ed.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=rU(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}var io=n(45684);let ia={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function is(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let il={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!W.test(e))return e;e=parseFloat(e)}let n=is(e,t.target.x),r=is(e,t.target.y);return`${n}% ${r}%`}},iu=!1;class ic extends o.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;(function(e){for(let t in e)tM[t]=e[t],x(t)&&(tM[t].isCSSVariable=!0)})(ih),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),iu&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ia.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:o}=n;return o&&(o.isPresent=i,iu=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==i?o.willUpdate():this.safeToRemove(),e.isPresent===i||(i?o.promote():o.relegate()||ed.postRender(()=>{let e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),tn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;iu=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}}function id(e){let[t,n]=(0,io.oO)(),r=(0,o.useContext)(tW.p);return(0,tH.jsx)(ic,{...e,layoutGroup:r,switchLayoutGroup:(0,o.useContext)(nt),isPresent:t,safeToRemove:n})}let ih={borderRadius:{...il,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:il,borderTopRightRadius:il,borderBottomLeftRadius:il,borderBottomRightRadius:il,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=eB.parse(e);if(r.length>5)return e;let i=eB.createTransformer(e),o="number"!=typeof r[0]?1:0,a=n.x.scale*t.x,s=n.y.scale*t.y;r[0+o]/=a,r[1+o]/=s;let l=j(a,s,.5);return"number"==typeof r[2+o]&&(r[2+o]/=l),"number"==typeof r[3+o]&&(r[3+o]/=l),i(r)}}};var ip=n(69199);function im(e){return(0,ip.K)(e)&&"ownerSVGElement"in e}let ig=(e,t)=>
1e.depth-t.depth;class iy{constructor(){this.children=[],this.isDirty=!1}add(e){e5(this.children,e),this.isDirty=!0}remove(e){e3(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ig),this.isDirty=!1,this.children.forEach(e)}}let iv=["TopLeft","TopRight","BottomLeft","BottomRight"],ib=iv.length,ix=e=>"string"==typeof e?parseFloat(e):e,iw=e=>"number"==typeof e||W.test(e);function iS(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let ik=ij(0,.5,nQ),iE=ij(.5,.95,ea);function ij(e,t,n){return r=>r<e?0:r>t?1:n(n3(e,t,r))}function iC(e,t){e.min=t.min,e.max=t.max}function i_(e,t){iC(e.x,t.x),iC(e.y,t.y)}function iT(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function iA(e,t,n,r,i){return e-=t,e=r+1/n*(e-r),void 0!==i&&(e=r+1/i*(e-r)),e}function iM(e,t,[n,r,i],o,a){!function(e,t=0,n=1,r=.5,i,o=e,a=e){if(H.test(t)&&(t=parseFloat(t),t=j(a.min,a.max,t/100)-a.min),"number"!=typeof t)return;let s=j(o.min,o.max,r);e===o&&(s-=t),e.min=iA(e.min,t,n,s,i),e.max=iA(e.max,t,n,s,i)}(e,t[n],t[r],t[i],t.scale,o,a)}let iP=["x","scaleX","originX"],iR=["y","scaleY","originY"];function iI(e,t,n,r){iM(e.x,t,iP,n?n.x:void 0,r?r.x:void 0),iM(e.y,t,iR,n?n.y:void 0,r?r.y:void 0)}function iO(e){return 0===e.translate&&1===e.scale}function i$(e){return iO(e.x)&&iO(e.y)}function iD(e,t){return e.min===t.min&&e.max===t.max}function iL(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function iz(e,t){return iL(e.x,t.x)&&iL(e.y,t.y)}function iV(e){return rH(e.x)/rH(e.y)}function iN(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class iF{constructor(){this.members=[]}add(e){e5(this.members,e),e.scheduleRender()}remove(e){if(e3(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t;let n=this.members.findIndex(t=>e===t);if(0===n)return!1;for(let e=n;e>=0;e--){let n=this.members[e];if(!1!==n.isPresent){t=n;break}}return!!t&&(this.promote(t),!0)}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}let iB={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},iU=["","X","Y","Z"],iH=0;function iW(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function iG({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=iH++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,eu.value&&(iB.nodes=iB.calculatedTargetDeltas=iB.calculatedProjections=0),this.nodes.forEach(iZ),this.nodes.forEach(i2),this.nodes.forEach(i5),this.nodes.forEach(iK),eu.addProjectionMetrics&&eu.addProjectionMetrics(iB)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new iy)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new e4),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=im(t)&&!(im(t)&&"svg"===t.tagName),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n;let r=0,i=()=>this.root.updateBlockedByResize=!1;ed.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){let n=e2.now(),r=({timestamp:t})=>{let i=t-n;i>=250&&(eh(r),e(i-250))};return ed.setup(r,!0),()=>eh(r)}(i,0),ia.hasAnimatedSinceResize&&(ia.hasAnimatedSinceResize=!1,this.nodes.forEac
1h(i1)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&i&&(n||r)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let o=this.options.transition||i.getDefaultTransition()||i7,{onLayoutAnimationStart:a,onLayoutAnimationComplete:s}=i.getProps(),l=!this.targetLayout||!iz(this.targetLayout,r),u=!t&&n;if(this.options.layoutRoot||this.resumeFrom||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...no(o,"layout"),onPlay:a,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,u)}else t||i1(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),eh(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes&&this.nodes.forEach(i3),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function e(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:n}=t.options;if(!n)return;let r=n.props[ne];if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:e,layoutId:n}=t.options;window.MotionCancelOptimisedAnimation(r,"transform",ed,!(e||n))}let{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&e(i)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(iQ);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(iJ);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(i0),this.nodes.forEach(iY),this.nodes.forEach(iq)):this.nodes.forEach(iJ),this.clearAllSnapshots();let e=e2.now();ef.delta=z(0,1e3/60,e-ef.timestamp),ef.timestamp=e,ef.isProcessing=!0,ep.update.process(ef),ep.preRender.process(ef),ep.render.process(ef),ef.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,tn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(iX),this.sharedNodes.forEach(i4)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ed.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ed.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),!this.snapshot||rH(this.snapshot.measuredBox.x)||rH(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=tu(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!i$(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||T(this.latestValues)||o)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){var t;let n=this.measurePageBox(),r=this.removeElementScroll(n);return e&&(r=this.removeTransform(r)),on((t=r).x),on(t.y),{animationId:this.root.animationId,measuredBox:n,layoutBox:r,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return tu();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(oi))){let{scroll:e}=this.root;e&&(I(t.x,e.offset.x),I(t.y,e.offset.y))}return t}removeElementScroll(e){let t=tu();if(i_(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:o}=r;r!==this.root&&i&&o.layoutScroll&&(i.wasRoot&&i_(t,e),I(t.x,i.offset.x),I(t.y,i.offset.y))}return t}applyTransform(e,t=!1){let n=tu();i_(n,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&$(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),T(r.latestValues)&&$(n,r.latestValues)}return T(this.latestValues)&&$(n,this.latestValues),n}removeTransform(e){let t=tu();i_(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!T(n.latestValues))continue;_(n.latestValues)&&n.updateSnapshot();let r=tu();i_(r,n.measurePageBox()),iI(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return T(this.latestValues)&&iI(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ef.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.
1isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=ef.timestamp;let o=this.getClosestProjectingParent();if(o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta){if(this.target||(this.target=tu(),this.targetWithTransforms=tu()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){var a,s,l;this.forceRelativeParentToResolveTarget(),a=this.target,s=this.relativeTarget,l=this.relativeParent.target,rY(a.x,s.x,l.x),rY(a.y,s.y,l.y)}else this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):i_(this.target,this.layout.layoutBox),R(this.target,this.targetDelta)):i_(this.target,this.layout.layoutBox);this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,o&&!!o.resumingFrom==!!this.resumingFrom&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0),eu.value&&iB.calculatedTargetDeltas++}}getClosestProjectingParent(){return!this.parent||_(this.parent.latestValues)||A(this.parent.latestValues)?void 0:this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=tu(),this.relativeTargetOrigin=tu(),rZ(this.relativeTargetOrigin,t,n),i_(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===ef.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;i_(this.layoutCorrected,this.layout.layoutBox);let o=this.treeScale.x,a=this.treeScale.y;(function(e,t,n,r=!1){let i,o;let a=n.length;if(a){t.x=t.y=1;for(let s=0;s<a;s++){o=(i=n[s]).projectionDelta;let{visualElement:a}=i.options;(!a||!a.props.style||"contents"!==a.props.style.display)&&(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&$(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,R(e,o)),r&&T(i.latestValues)&&$(e,i.latestValues))}t.x<1.0000000000001&&t.x>.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}})(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=tu());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(iT(this.prevProjectionDelta.x,this.projectionDelta.x),iT(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),rG(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===o&&this.treeScale.y===a&&iN(this.projectionDelta.x,this.prevProjectionDelta.x)&&iN(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s)),eu.value&&iB.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ts(),this.projectionDelta=ts(),this.projectionDeltaWithTransform=ts()}setAnimationOrigin(e,t=!1){let n;let r=this.snapshot,i=r?r.latestValues:{},o={...this.latestValues},a=ts();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=tu(),l=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),u=this.getStack(),c=!u||u.members.length<=1,d=!!(l&&!c&&!0===this.options.crossfade&&!this.path.some(i8));this.animationProgress=0,this.mixTargetDelta=t=>{let r=t/1e3;if(i6(a.x,e.x,r),i6(a.y,e.y,r),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var u,h,f,p;rZ(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),f=this.relativeTarget,p=this.relativeTargetOrigin,i9(f.x,p.x,s.x,r),i9(f.y,p.y,s.y,r),n&&(u=this.relativeTarget,h=n,iD(u.x,h.x)&&iD(u.y,h.y))&&(this.isProjectionDirty=!1),n||(n=tu()),i_(n,this.relativeTarget)}l&&(this.animationValues=o,function(e,t,n,r,i,o){i?(e.opacity=j(0,n.opacity??1,ik(r)),e.opacityExit=j(t.opacity??1,0,iE(r))):o&&(e.opacity=j(t.opacity??1,n.opacity??1,r));for(let i=0;i<ib;i++){let o=`border${iv[i]}Radius`,a=iS(t,o),s=iS(n,o);(void 0!==a||void 0!==s)&&(a||(a=0),s||(s=0),0===a||0===s||iw(a)===iw(s)?(e[o]=Math.max(j(ix(a),ix(s),r),0),(H.test(s)||H.test(a))&&(e[o]+="%")):e[o]=s)}(t.rotate||n.rotate)&&(e.rotate=j(t.rotate||0,n.rotate||0,r))}(o,i,this.latestValues,r,d,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=r},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(eh(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ed.update(()=>{ia.hasAnimatedSinceResize=!0,nf.layout++,this.motionValue||(this.motionValue=e7(0)),this.currentAnimation=function(e,t,n){let r=e0(e)?e:e7(e);return r.start(rE("",r,t,n)),r.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{nf.layout--},onComplete:()=>{nf.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&or(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||tu();let t=rH(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=rH(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}i_(t,n),$(t,i),rG(this.projectionDeltaWithTransform,this.layoutCorrected,t,i
1)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new iF),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&iW("z",e,r,this.animationValues);for(let t=0;t<iU.length;t++)iW(`rotate${iU[t]}`,e,r,this.animationValues),iW(`skew${iU[t]}`,e,r,this.animationValues);for(let t in e.render(),r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility="hidden";return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=t3(t?.pointerEvents)||"",e.transform=n?n(this.latestValues,""):"none";return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=t3(t?.pointerEvents)||""),this.hasProjected&&!T(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1);return}e.visibility="";let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();
1let o=function(e,t,n){let r="",i=e.x.translate/t.x,o=e.y.translate/t.y,a=n?.z||0;if((i||o||a)&&(r=`translate3d(${i}px, ${o}px, ${a}px) `),(1!==t.x||1!==t.y)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:o,skewX:a,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),o&&(r+=`rotateY(${o}deg) `),a&&(r+=`skewX(${a}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,l=e.y.scale*t.y;return(1!==s||1!==l)&&(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,i);n&&(o=n(i,o)),e.transform=o;let{x:a,y:s}=this.projectionDelta;for(let t in e.transformOrigin=`${100*a.origin}% ${100*s.origin}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?void 0!==i.opacity?i.opacity:"":void 0!==i.opacityExit?i.opacityExit:0,tM){if(void 0===i[t])continue;let{correct:n,applyTo:a,isCSSVariable:s}=tM[t],l="none"===o?i[t]:n(i[t],r);if(a){let t=a.length;for(let n=0;n<t;n++)e[a[n]]=l}else s?this.options.visualElement.renderState.vars[t]=l:e[t]=l}this.options.layoutId&&(e.pointerEvents=r===this?t3(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(iQ),this.root.sharedNodes.clear()}}}function iY(e){e.updateLayout()}function iq(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;
1"size"===i?rK(e=>{let r=o?t.measuredBox[e]:t.layoutBox[e],i=rH(r);r.min=n[e].min,r.max=r.min+i}):or(i,t.layoutBox,n)&&rK(r=>{let i=o?t.measuredBox[r]:t.layoutBox[r],a=rH(n[r]);i.max=i.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)});let a=ts();rG(a,n,t.layoutBox);let s=ts();o?rG(s,e.applyTransform(r,!0),t.measuredBox):rG(s,n,t.layoutBox);let l=!i$(a),u=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:o}=r;if(i&&o){let a=tu();rZ(a,t.layoutBox,i.layoutBox);let s=tu();rZ(s,n,o.layoutBox),iz(a,s)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=a,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function iZ(e){eu.value&&iB.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function iK(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function iX(e){e.clearSnapshot()}function iQ(e){e.clearMeasurements()}function iJ(e){e.isLayoutDirty=!1}function i0(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function i1(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function i2(e){e.resolveTargetDelta()}function i5(e){e.calcProjection()}function i3(e){e.resetSkewAndRotation()}function i4(e){e.removeLeadSnapshot()}function i6(e,t,n){e.translate=j(t.translate,0,n),e.scale=j(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function i9(e,t,n,r){e.min=j(t.min,n.min,r),e.max=j(t.max,n.max,r)}function i8(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let i7={duration:.45,ease:[.4,0,.1,1]},oe=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ot=oe("applewebkit/")&&!oe("chrome/")?Math.round:ea;function on(e){e.min=ot(e.min),e.max=ot(e.max)}function or(e,t,n){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(iV(t)-iV(n)))}function oi(e){return e!==e.root&&e.scroll?.wasRoot}let oo=iG({attachResizeListener:(e,t)=>rV(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),oa={current:void 0},os=iG({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!oa.current){let e=new oo({});e.mount(window),e.setOptions({layoutScroll:!0}),oa.current=e}return oa.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function ol(e,t){let n=function(e,t,n){if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document,n=(void 0)??t.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function ou(e){return!("touch"===e.pointerType||rz.x||rz.y)}function oc(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);let i=r["onHover"+n];i&&ed.postRender(()=>i(t,rF(t)))}class od extends rO{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){let[r,i,o]=ol(e,n),a=e=>{if(!ou(e))return;let{target:n}=e,r=t(n,e);if("function"!=typeof r||!n)return;let o=e=>{ou(e)&&(r(e),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,i)};return r.forEach(e=>{e.addEventListener("pointerenter",a,i)}),o}(e,(e,t)=>(oc(this.node,t,"Start"),e=>oc(this.node,e,"End"))))}unmount(){}}class oh extends rO{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=nc(rV(this.node.current,"focus",()=>this.onFocus()),rV(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}var of=n(5464);let op=(e,t)=>!!t&&(e===t||op(e,t.parentElement)),om=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),og=new WeakSet;function oy(e){return t=>{"Enter"===t.key&&e(t)}}function ov(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}let ob=(e,t)=>
1{let n=e.currentTarget;if(!n)return;let r=oy(()=>{if(og.has(n))return;ov(n,"down");let e=oy(()=>{ov(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>ov(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function ox(e){return rN(e)&&!(rz.x||rz.y)}function ow(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);let i=r["onTap"+("End"===n?"":n)];i&&ed.postRender(()=>i(t,rF(t)))}class oS extends rO{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){let[r,i,o]=ol(e,n),a=e=>{let r=e.currentTarget;if(!ox(e))return;og.add(r);let o=t(r,e),a=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),og.has(r)&&og.delete(r),ox(e)&&"function"==typeof o&&o(e,{success:t})},s=e=>{a(e,r===window||r===document||n.useGlobalTarget||op(r,e.target))},l=e=>{a(e,!1)};window.addEventListener("pointerup",s,i),window.addEventListener("pointercancel",l,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener("pointerdown",a,i),(0,of.R)(e)&&(e.addEventListener("focus",e=>ob(e,i)),om.has(e.tagName)||-1!==e.tabIndex||e.hasAttribute("tabindex")||(e.tabIndex=0))}),o}(e,(e,t)=>(ow(this.node,t,"Start"),(e,{success:t})=>ow(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}let ok=new WeakMap,oE=new WeakMap,oj=e=>{let t=ok.get(e.target);t&&t(e)},oC=e=>{e.forEach(oj)},o_={some:0,all:1};class oT extends rO{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:o_[r]};return function(e,t,n){let r=function({root:e,...t}){let n=e||document;oE.has(n)||oE.set(n,{});let r=oE.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(oC,{root:e,...t})),r[i]}(t);return ok.set(e,n),r.observe(e),()=>{ok.delete(e),r.unobserve(e)}}(this.node.current,o,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}let oA=function(e,t){if("undefined"==typeof Proxy)return nr;let n=new Map,r=(n,r)=>nr(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,o)=>"create"===o?r:(n.has(o)||n.set(o,nr(o,void 0,e,t)),n.get(o))})}({animation:{Feature:r$},exit:{Feature:rL},inView:{Feature:oT},tap:{Feature:oS},focus:{Feature:oh},hover:{Feature:od},pan:{Feature:ii},drag:{Feature:it,ProjectionNode:os,MeasureLayout:id},layout:{ProjectionNode:os,MeasureLayout:id}},(e,t)=>tU(e)?new tF(t):new tI(t,{allowProjection:e!==o.Fragment}))},11359:function(e,t,n){"use strict";n.d(t,{j:function(){return r}});let r="undefined"!=typeof window},7528:function(e,t,n){"use strict";n.d(t,{h:function(){return i}});var r=n(89987);function i(e){let t=(0,r.useRef)(null);return null===t.current&&(t.current=e()),t.current}},53368:function(e,t,n){"use strict";n.d(t,{L:function(){return i}});var r=n(89987);let i=n(11359).j?r.useLayoutEffect:r.useEffect},5464:function(e,t,n){"use strict";n.d(t,{R:function(){return i}});var r=n(69199);function i(e){return(0,r.K)(e)&&"offsetHeight"in e}},69199:function(e,t,n){"use strict";function r(e){return"object"==typeof e&&null!==e}n.d(t,{K:function(){return r}})},71259:function(e,t,n){"use strict";let r,i;n.r(t),n.d(t,{default:function(){return sK}});var o,a,s,l,u,c,d,h,f,p=n(52660),m=n(99072),g=n(14096),y=n(89987),v=n(72642),b=n(82453),x=n(98946),w=n(7741);
1function S(e){return e.split(/[[.\]]/g).filter(Boolean).map(e=>e.includes("==")?function(e){let[t,n]=e.split("==");if("_key"!==t)throw Error(`Currently only "_key" is supported as path segment. Found ${t}`);if(typeof n>"u")throw Error('Invalid path segment, expected `key=="value"`');return{_key:n.replace(/^['"]/,"").replace(/['"]$/,"")}}(e):k.test(e)?Number(e):e)}let k=/^-?\d+$/,E=/^[a-z_$]+/;function j(e){return e.map((e,t)=>{var n;return n=0===t,Array.isArray(e)?`[${e[0]}:${e[1]||""}]`:"number"==typeof e?`[${e}]`:"object"==typeof e&&"_key"in e&&"string"==typeof e._key?`[_key==${JSON.stringify(e._key)}]`:"string"==typeof e&&E.test(e)?n?e:`.${e}`:`['${e}']`}).join("")}function C(e){if("createIfNotExists"in e)return{type:"createIfNotExists",document:e.createIfNotExists};if("createOrReplace"in e)return{type:"createOrReplace",document:e.createOrReplace};if("create"in e)return{type:"create",document:e.create};if("delete"in e)return{id:e.delete.id,type:"delete"};if("patch"in e){var t,n;return{type:"patch",id:e.patch.id,patches:[..."set"in(n=t=e.patch)?Object.keys(n.set).map(e=>({path:S(e),op:{type:"set",value:n.set[e]}})):[],..."setIfMissing"in t?Object.keys(t.setIfMissing).map(e=>({path:S(e),op:{type:"setIfMissing",value:t.setIfMissing[e]}})):[],..."unset"in t?t.unset.map(e=>({path:S(e),op:{type:"unset"}})):[],..."inc"in t?Object.keys(t.inc).map(e=>({path:S(e),op:{type:"inc",amount:t.inc[e]}})):[],..."inc"in t?Object.keys(t.dec).map(e=>({path:S(e),op:{type:"dec",amount:t.dec[e]}})):[],...function(e){if(!("insert"in e))return[];let t=function(e){let t=_.filter(t=>t in e);if(t.length>1)throw Error(`Insert patch is ambiguous. Should only contain one of: ${_.join(", ")}, instead found ${t.join(", ")}`);return t[0]}(e.insert);if(!t)throw Error("Insert patch missing position");let n=S(e.insert[t]),r=n.pop();return[{path:n,op:{type:"insert",position:t,referenceItem:r,items:e.insert.items}}]}(t)]}}throw Error(`Unknown mutation: ${JSON.stringify(e)}`)}let _=["before","replace","after"];function T(e){return M(e)}function A(e){return e.flatMap(T)}function M(e){if("create"===e.type||"createIfNotExists"===e.type||"createOrReplace"===e.type)return{[e.type]:e.document};if("delete"===e.type)return{delete:{id:e.id}};let t=e.options?.ifRevision;return e.patches.map(n=>({patch:{id:e.id,...t&&{ifRevisionID:t},...function(e){let{path:t,op:n}=e;if("unset"===n.type)return{unset:[j(t)]};if("insert"===n.type)return{insert:{[n.position]:j([...t,n.referenceItem]),items:n.items}};if("diffMatchPatch"===n.type)return{diffMatchPatch:{[j(t)]:n.value}};if("inc"===n.type)return{inc:{[j(t)]:n.amount}};if("dec"===n.type)return{dec:{[j(t)]:n.amount}};if("set"===n.type||"setIfMissing"===n.type)return{[n.type]:{[j(t)]:n.value}};if("truncate"===n.type){let e=[n.startIndex,"number"==typeof n.endIndex?n.endIndex:""].join(":");return{unset:[`${j(t)}[${e}]`]}}if("upsert"===n.type)return{unset:n.items.map(e=>j([...t,{_key:e._key}])),insert:{[n.position]:j([...t,n.referenceItem]),items:n.items}};if("assign"===n.type)return{set:Object.fromEntries(Object.keys(n.value).map(e=>[j(t.concat(e)),n.value[e]]))};if("unassign"===n.type)return{unset:n.keys.map(e=>j(t.concat(e)))};if("replace"===n.type)return{insert:{replace:j(t.concat(n.referenceItem)),items:n.items}};if("remove"===n.type)return{unset:[j(t.concat(n.referenceItem))]};throw Error(`Unknown operation type ${n.type}`)}(n)}}))}function P(e){return Array.isArray(e)?e:[e]}var R=Object.freeze({__proto__:null,decode:function(e){return C(e)},decodeAll:function(e){return e.map(C)},encode:T,encodeAll:A,encodeMutation:M,encodeTransaction:function(e){return{transactionId:e.id,mutations:A(e.mutations)}}});function I(e,t,n){return{type:"insert",referenceItem:n,position:t,items:P(e)}}function O(e,t){return{type:"truncate",startIndex:e,endIndex:t}}function $(e){return{type:"remove",referenceItem:e}}function D(e,t){return{path:"string"==typeof e?S(e):e,op:t}}var L=n(73096);let z=(0,L.ah)(),V=z,N=new Set,F=/_key\s*==\s*['"](.*)['"]/,B=/^\d*:\d*$/;function U(e){return"number"==typeof e||"string"==typeof e&&/^\[\d+\]$/.test(e)}function H(e){return"string"==typeof e?F.test(e.trim()):"object"==typeof e&&"_key"in e}let W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,G=/_key\s*==\s*['"](.*)['"]/;function Y(e,t,n){let r="string"==typeof t?function(e){if("string"!=typeof e)throw Error("Path is not a string");let t=e.match(W);if(!t)throw Error("Invalid path string");return t.map(q)}(t):t;if(!Array.isArray(r))throw Error("Path must be an array or a string");let i=e;for(let e=0;e<r.length;e++){let t=r[e];if(U(t)){if(!Array.isArray(i))return n;i=i[t]}if(H(t)){if(!Array.isArray(i))return n;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 n}return i}function q(e){return U(e)?Number(e.replace(/[^\d]/g,"")):H(e)?{_key:e.match(G)[1]}:!function(e){if("string"==typeof e&&B.test(e))return!0;
1if(!Array.isArray(e)||2!==e.length)return!1;let[t,n]=e;return("number"==typeof t||""===t)&&("number"==typeof n||""===n)}(e)?e:function(e){let[t,n]=e.split(":").map(e=>""===e?e:Number(e));return[t,n]}(e)}function Z(){return(0,y.useSyncExternalStore)(Q,X,K)}function K(){return z}function X(){return V}function Q(e){return N.add(e),()=>N.delete(e)}function J(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(e,r)},t)}}function ee(e,t){let n=(0,g.el)(),r=(0,g.Ax)();if(t===z||!n&&!r)throw Error("The `useDocuments` hook cannot be used in this context");let i=(0,b.qy)(e),o=(0,b.vs)(e),a=t.getSnapshot().context?.documents,s=a?.[i],l=a?.[o],u=s||l;if(!u)throw Error(`Document "${e}" not found`);let c=s.getSnapshot().context?.local||l.getSnapshot().context?.local,d=new Promise(e=>{if(c)e(c);else{let t=u.on("ready",n=>{let{snapshot:r}=n;e(r||null),t.unsubscribe()})}});return{draftDoc:s,draftId:i,getSnapshot:()=>d,publishedDoc:l,publishedId:o,get snapshot(){if(!c)throw Error(`Snapshot for document "${e}" not found`);return c}}}function et(){let e,t,n;let r=(0,m.c)(7),i=Z();r[0]!==i?(e=e=>({id:e,commit:()=>{let{draftDoc:t}=ee(e,i);t.send({type:"submit"})},get:t=>{let{snapshot:n}=ee(e,i);return t?Y(n,t):n},getSnapshot:function(e,t){let{getSnapshot:n}=ee(e,t);return n}(e,i),patch:async(t,n)=>{let r=ee(e,i),{draftDoc:o,draftId:a,getSnapshot:s,publishedId:l}=r,{commit:u=!0}=n||{},c=await ("function"==typeof t?t({draftId:a,publishedId:l,get snapshot(){return r.snapshot},getSnapshot:s}):t),d=await s();if(!d)throw Error(`Snapshot for document "${e}" not found`);o.send({type:"mutate",mutations:[{type:"createIfNotExists",document:{...d,_id:a}},{type:"patch",id:a,patches:P(c)}]}),u&&("object"==typeof u&&"debounce"in u?J(()=>o.send({type:"submit"}),u.debounce)():o.send({type:"submit"}))}}),r[0]=i,r[1]=e):e=r[1];let o=e;r[2]!==i?(t=(e,t,n)=>{let{draftDoc:r}=ee(e,i),{commit:o}=n||{},a=void 0===o||o;r.send({type:"mutate",mutations:t}),a&&("object"==typeof a&&"debounce"in a?J(()=>r.send({type:"submit"}),a.debounce)():r.send({type:"submit"}))},r[2]=i,r[3]=t):t=r[3];let a=t;return r[4]!==o||r[5]!==a?(n={getDocument:o,mutateDocument:a},r[4]=o,r[5]=a,r[6]=n):n=r[6],n}let en=()=>{if(i)return i;i=[];for(let e=0;e<256;++e)i[e]=(e+256).toString(16).slice(1);return i};function er(e){let t=en();return(function(e=16){let t=new Uint8Array(e);return function(e){let t="undefined"!=typeof window&&"crypto"in window?window.crypto:globalThis.crypto;if(!t||!t.getRandomValues)throw Error("WebCrypto not available in this environment");t.getRandomValues(e)}(t),t})(e).reduce((e,n)=>e+t[n],"").slice(0,e)}function ei(e){let t,n;let r="string"==typeof e?e:e.path,i=r.lastIndexOf("."),o=r.substring(i+1,r.length);if(!o.indexOf("["))throw Error("Invalid path: not an array");let a=r.lastIndexOf("["),s=r.substring(0,a);if(o.includes("_key")){let e=o.indexOf('"')+1,r=o.indexOf('"',e);t=o.substring(e,r),n=!0}else{let e=o.indexOf("[")+1,r=o.indexOf("]",e);t=o.substring(e,r),n=!1}if(!s||!t)throw Error("Invalid path");return{path:s,key:t,hasExplicitKey:n}}async function eo(e,t,n){if(!e.type)throw Error("Node type is missing");let{path:r,key:i}=ei(e),o=await t.getSnapshot(),a=Y(o,r),s=Y(o,e.path),l=a.findIndex(e=>e._key===i),u=-1,c="before";if("first"===n){if(0===l)return[];u=0,c="before"}else if("last"===n){if(l===a.length-1)return[];u=-1,c="after"}else if("next"===n){if(l===a.length-1)return[];u=l,c="after"}else if("previous"===n){if(0===l)return[];u=l-1,c="before"}return[D(r,O(l,l+1)),D(r,I(s,c,u))]}var ea=n(52908);let es=(0,ea.zGw)((0,ea.Z_8)(),(0,ea.EiV)(1)),el=(0,ea.jtO)(es),eu=(0,ea.Ryn)({baseUrl:es,dataset:el,id:es,path:es,projectId:el,tool:el,type:el,workspace:el,perspective:(0,ea.tvc)((0,ea.Z_8)(),"drafts")}),ec=/^([\w-]+):(0|[1-9][0-9]*)$/,ed=/^([\w-]+):([0-9]+),([0-9]+)$/,eh=/^([\w-]+):([\w-]+)$/,ef=(0,ea.zGw)((0,ea.Z_8)(),(0,ea.EiV)(1)),ep=(0,ea.Ryn)({origin:ef,href:ef,data:(0,ea.jtO)((0,ea.IMB)((0,ea.Z_8)(),(0,ea._4T)()))});function em(e){let t=(0,ea.AsG)(eu,e);if(t.success)return t.output;let n=(0,ea.AsG)(ep,e);if(n.success)try{let e=new URL(n.output.href,typeof document>"u"?"https://example.com":location.origin);return e.searchParams.size>
10?(0,ea.Qc3)(eu,Object.fromEntries(e.searchParams.entries())):n.output}catch(e){return console.error("Failed to parse sanity node",e),n.output}}var eg={0:8203,1:8204,2:8205,3:8290,4:8291,5:8288,6:65279,7:8289,8:119155,9:119156,a:119157,b:119158,c:119159,d:119160,e:119161,f:119162},ey={0:8203,1:8204,2:8205,3:65279},ev=[,,,,].fill(String.fromCodePoint(ey[0])).join(""),eb=Object.fromEntries(Object.entries(ey).map(e=>e.reverse())),ex=Object.fromEntries(Object.entries(eg).map(e=>e.reverse())),ew=`${Object.values(eg).map(e=>`\\u{${e.toString(16)}}`).join("")}`,eS=RegExp(`[${ew}]{4,}`,"gu");let ek=[];for(let e=0;e<256;++e)ek.push((e+256).toString(16).slice(1));let eE=new Uint8Array(16);var ej={randomUUID:"u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function eC(e,t,n){if(ej.randomUUID&&!e)return ej.randomUUID();let i=(e=e||{}).random??e.rng?.()??function(){if(!r){if(typeof crypto>"u"||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");r=crypto.getRandomValues.bind(crypto)}return r(eE)}();if(i.length<16)throw Error("Random bytes length must be >= 16");return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(e,t=0){return(ek[e[t+0]]+ek[e[t+1]]+ek[e[t+2]]+ek[e[t+3]]+"-"+ek[e[t+4]]+ek[e[t+5]]+"-"+ek[e[t+6]]+ek[e[t+7]]+"-"+ek[e[t+8]]+ek[e[t+9]]+"-"+ek[e[t+10]]+ek[e[t+11]]+ek[e[t+12]]+ek[e[t+13]]+ek[e[t+14]]+ek[e[t+15]]).toLowerCase()}(i)}function e_(e){let t=e.getBoundingClientRect();return{x:t.x+scrollX,y:t.y+scrollY,w:t.width,h:t.height}}function eT(e,t,n){return"x"===n?{x:e.x+t,y:e.y,w:e.w-2*t,h:e.h}:{x:e.x,y:e.y+t,w:e.w,h:e.h-2*t}}function eA(e,t){return e.x===t.x&&e.y===t.y&&e.w===t.w&&e.h===t.h}function eM(e,t){let n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}function eP(e,t,n){let r,i;let o={x:e.x1,y:e.y1};if(t.some(e=>(function(e,t){let n=e.x>=t.x&&e.x<=t.x+t.w,r=e.y>=t.y&&e.y<=t.y+t.h;return n&&r})(o,eT(e,Math.min(e.w,e.h)/10,"horizontal"===n?"x":"y"))))return null;for(let a of t){let t=function(e,t){let n=[{x1:t.x,y1:t.y,x2:t.x+t.w,y2:t.y},{x1:t.x+t.w,y1:t.y,x2:t.x+t.w,y2:t.y+t.h},{x1:t.x+t.w,y1:t.y+t.h,x2:t.x,y2:t.y+t.h},{x1:t.x,y1:t.y+t.h,x2:t.x,y2:t.y}],r=[];for(let t=0;t<n.length;t++){let i=function(e,t){let{x1:n,y1:r,x2:i,y2:o}=e,{x1:a,y1:s,x2:l,y2:u}=t;if(n===i&&r===o||a===l&&s===u)return!1;let c=(u-s)*(i-n)-(l-a)*(o-r);if(0===c)return!1;let d=((l-a)*(r-s)-(u-s)*(n-a))/c,h=((i-n)*(r-s)-(o-r)*(n-a))/c;return!(d<0)&&!(d>1)&&!(h<0)&&!(h>1)&&{x:n+d*(i-n),y:r+d*(o-r)}}(e,n[t]);if(i){let e=!1;for(let t=0;t<r.length;t++)r[t].x===i.x&&r[t].y===i.y&&(e=!0);e||r.push(i)}}return 0!==r.length&&r.sort((t,n)=>eM(t,{x:e.x1,y:e.y1})-eM(n,{x:e.x1,y:e.y1}))}(e,eT(a,Math.min(a.w,a.h)/10,"horizontal"===n?"x":"y"));if(t){let e=t[0];r?eM(o,e)<eM(o,r)&&(r=e,i=a):(r=e,i=a)}}return i||null}function eR(e,t,n){let{x:r,y:i,w:o,h:a}=e,{x:s,y:l}=n;return{x:s+(r-s)*t,y:l+(i-l)*t,w:o*t,h:a*t}}function eI(e){let t=Math.max(0,Math.min(...e.map(e=>e.y))),n=Math.min(document.body.scrollHeight,Math.max(...e.map(e=>e.y+e.h)));return{min:t,max:n,height:n-t}}function eO(e,t){return t.find(t=>eA(e_(t.elements.element),e))?.sanity}function e$(e,t,n){return Object.values(t).every(e=>null===e)?null:"horizontal"===n?{left:t.left?{rect:t.left,sanity:eO(t.left,e)}:null,right:t.right?{rect:t.right,sanity:eO(t.right,e)}:null}:{top:t.top?{rect:t.top,sanity:eO(t.top,e)}:null,bottom:t.bottom?{rect:t.bottom,sanity:eO(t.bottom,e)}:null}}function eD(e){let t=document.body.getBoundingClientRect();return{x:Math.max(t.x,Math.min(e.clientX,t.x+t.width)),y:e.clientY+window.scrollY}}
1function eL(e,t,n){let r=e_(t),i=[...t.querySelectorAll(":where(h1, h2, h3, h4, p, a, img, span, button):not(:has(*))")];e.x<=r.x&&(e.x=r.x),e.x>=r.x+r.w&&(e.x=r.x+r.w),e.y>=r.y+r.h&&(e.y=r.y+r.h),e.y<=r.y&&(e.y=r.y);let o=i.map(e=>{let t=eR(e_(e),n,{x:r.x,y:r.y});return{x:t.x-r.x,y:t.y-r.y,w:t.w,h:t.h,tagName:e.tagName}});return{offsetX:(r.x-e.x)*n,offsetY:(r.y-e.y)*n,w:r.w*n,h:r.h*n,maxWidth:r.w*n*.75,childRects:o}}async function ez(e,t,n,r,i){return new Promise(o=>{e.addEventListener("transitionend",()=>{setTimeout(()=>{r({type:"overlay/dragEndMinimapTransition"})},2*i),o()},{once:!0}),r({type:"overlay/dragStartMinimapTransition"}),r({type:"overlay/dragToggleMinimap",display:!0}),document.body.style.overflow="hidden",document.body.style.height="100%",document.documentElement.style.overflow="initial",document.documentElement.style.height="100%",setTimeout(()=>{e.style.transformOrigin="50% 0px",e.style.transition="transform 150ms ease",e.style.transform=`translate3d(0px, ${-n+scrollY}px, 0px) scale(${t})`},25)})}function eV(e){let t=function(e){let t=Math.max(0,Math.min(...e.map(e=>e.x))),n=Math.min(document.body.offsetWidth,Math.max(...e.map(e=>e.x+e.w)));return{min:t,max:n,width:n-t}}(e),n=eI(e),r=t.min>8&&t.min+t.width<=window.innerWidth-8,i=n.min>8&&n.min+n.height<=document.body.scrollHeight-8,o=r&&i;return{x:o?t.min-8:t.min,y:o?n.min-8:n.min,w:o?t.width+16:t.width,h:o?n.height+16:n.height}}async function eN(e,t,n,r,i,o){return new Promise(a=>{if(1===new DOMMatrix(window.getComputedStyle(t).transform).a)return;let s=n-window.innerHeight,l=scrollY;(e-=window.innerHeight/2)<0&&(e=0),t.addEventListener("transitionend",()=>{t.style.transition="none",t.style.transform="none",scrollTo({top:e,behavior:"instant"}),setTimeout(()=>{r({type:"overlay/dragEndMinimapTransition"}),r({type:"overlay/dragToggleMinimap",display:!1})},2*i),a()},{once:!0}),r({type:"overlay/dragStartMinimapTransition"}),t.style.transform=`translateY(${Math.max(l-e,-s+l)}px) scale(1)`,o&&(document.body.style.overflow=o.body.overflow,document.body.style.height=o.body.height,document.documentElement.style.overflow=o.documentElement.overflow,document.documentElement.style.height=o.documentElement.height)})}let eF=!1,eB={y:0},eU={x:0,y:0},eH=typeof document>"u"?0:document.documentElement.scrollHeight,eW=null,eG=e=>e instanceof HTMLElement||e instanceof SVGElement,eY=e=>e&&eG(e)?e.dataset?.sanityOverlayElement?e:eY(e.parentElement):null;function eq(e){return eS.lastIndex=0,eS.test(e)}function eZ(e,t=!1){return eq(e)?function(e,t=!1){try{let n=function(e){let t=e.match(eS);if(t)return function(e,t=!1){let n=Array.from(e);if(n.length%2==0){if(n.length%4||!e.startsWith(ev))return function(e,t){var n;let r=[];for(let t=.5*e.length;t--;){let n=`${ex[e[2*t].codePointAt(0)]}${ex[e[2*t+1].codePointAt(0)]}`;r.unshift(String.fromCharCode(parseInt(n,16)))}let i=[],o=[r.join("")],a=10;for(;o.length;){let e=o.shift();try{if(i.push(JSON.parse(e)),t)break}catch(r){if(!a--)throw r;let t=+(null==(n=r.message.match(/\sposition\s(\d+)$/))?void 0:n[1]);if(!t)throw r;o.unshift(e.substring(0,t),e.substring(t))}}return i}(n,t)}else throw Error("Encoded data has invalid length");let r=[];for(let e=.25*n.length;e--;){let t=n.slice(4*e,4*e+4).map(e=>eb[e.codePointAt(0)]).join("");r.unshift(String.fromCharCode(parseInt(t,4)))}if(t){r.shift();let e=r.indexOf("\0");return -1===e&&(e=r.length),[JSON.parse(r.slice(0,e).join(""))]}return r.join("").split("\0").filter(Boolean).map(e=>JSON.parse(e))}(t[0],!0)[0]}(e);return n&&"sanity.io"===n.origin?(t&&(n.href=n.href?.replace(".alt","")),n):null}catch(t){return console.error("Failed to decode stega for string: ",e,"with the original error: ",t),null}}(e,t):null}let eK=e=>e.nodeType===Node.ELEMENT_NODE,eX=e=>"IMG"===e.tagName,eQ=e=>"TIME"===e.tagName,eJ=e=>"SVG"===e.tagName.toUpperCase();function e0(e){return"path"in e}function e1(e){if(!e.length||!e.map(e=>e0(e)).every((e,t,n)=>e===n[0]))return;if(!e0(e[0]))return e[0];let t=e.filter(e0),n=e[0],r=["projectId","dataset","id","baseUrl","workspace","tool"];for(let e=1;e<t.length;e++){let i=t[e];if(r.some(e=>i[e]!==n?.[e])){n=void 0;break}n={...n,path:function(e,t){let n=e.split("."),r=t.split("."),i=Math.min(n.length,r.length);return n=n.slice(0,i).reverse(),r=r.slice(0,i).reverse(),n.reduce((e,t,n
1)=>t===r[n]?[...e,t]:[],[]).reverse().join(".")}(n.path,i.path)}}return n}function e2(e){let t=e.lastIndexOf(".");return e.substring(t,e.length).includes("[")}function e5(e){if(!e2(e))return null;let t=e.split(".");return t[t.length-1]=t[t.length-1].replace(/\[.*?\]/g,"[]"),t.join(".")}function e3(e,t){return!!(e2(e.path)&&e2(t.path))&&e5(e.path)===e5(t.path)}function e4(e,t,n,r){if(!e.getAttribute("data-sanity")||e.getAttribute("data-sanity-drag-disable")||!t||!e0(t)||!e2(t.path))return null;let i=e.getAttribute("data-sanity-drag-group"),o=[...n].reduce((e,n)=>{let o=r.get(n),a=n.getAttribute("data-sanity-drag-disable"),s=n.getAttribute("data-sanity-drag-group"),l=null!==n.getAttribute("data-sanity");return o?.sanity&&!a&&e0(o.sanity)&&e3(t,o.sanity)&&(null===i||i===s)&&l&&e.push(o),e},[]);return o.length<=1?null:o}let e6=(0,y.createContext)(null);var e9=n(76873),e8=n(74727),e7=n(29864);function te(e){let t=function e(t){return!!t&&("object"==typeof t||"function"==typeof t)&&("reference"===t.name||e(t.type))}(e)&&1===(e.to??[]).length?e.to[0].icon:void 0;return e.icon??e.type?.icon??t}function tt(e,t){return{query:"change query"===t.type?t.query:e.query,groups:"select group"===t.type?e.groups.map(e=>({...e,selected:t.name===e.name})):e.groups,views:"toggle view"===t.type?e.views.map(e=>({...e,selected:t.name===e.name})):e.views}}let tn="all-items",tr={gridTemplateColumns:"repeat(auto-fill, minmax(118px, 1fr))"};function ti(e){let t,n,r,i,o,a,s,l,u,c,d,h,f,g,v,b;let w=(0,m.c)(54),S=void 0===e.showIcons||e.showIcons,k=void 0===e.filter||"auto"===e.filter?e.schemaTypes.length>5:e.filter;w[0]!==e.groups||w[1]!==e.labels?(t=e.groups?[{name:tn,title:e.labels["insert-menu.filter.all-items"],selected:!0},...e.groups.map(ts)]:[],w[0]=e.groups,w[1]=e.labels,w[2]=t):t=w[2],w[3]!==e.views?(n=e.views??[{name:"list"}],w[3]=e.views,w[4]=n):n=w[4],w[5]!==n?(r=n.map(ta),w[5]=n,w[6]=r):r=w[6],w[7]!==t||w[8]!==r?(i={query:"",groups:t,views:r},w[7]=t,w[8]=r,w[9]=i):i=w[9];let[E,j]=(0,y.useReducer)(tt,i);if(w[10]!==e||w[11]!==k||w[12]!==S||w[13]!==E.groups||w[14]!==E.query||w[15]!==E.views){var C,_,T;let t,n,r;let i=(C=e.schemaTypes,_=E.query,T=E.groups,C.filter(e=>(function(e,t){let n=t.find(e=>e.selected);return!n||n.name===tn||n.of?.includes(e.name)})(e,T)&&function(e,t){let n=t.trim().toLowerCase();return e.title?e.title?.toLowerCase().includes(n):e.name.includes(n)}(e,_))),m=E.views.find(to),g=k||E.views.length>1,y=E.groups&&E.groups.length>0,v=g||y;s=x.v2,f=0,a=x.kC,c="column",d="fill",w[25]!==v?(t=v?{style:{borderBottom:"1px solid var(--card-border-color)"},paddingBottom:1}:{},w[25]=v,w[26]=t):t=w[26],w[27]!==e.labels||w[28]!==k||w[29]!==g||w[30]!==E.query||w[31]!==E.views?(n=g?(0,p.jsxs)(x.kC,{flex:"none",align:"center",paddingTop:1,paddingX:1,gap:1,children:[k?(0,p.jsx)(x.xu,{flex:1,children:(0,p.jsx)(x.oi,{autoFocus:!0,border:!1,fontSize:1,icon:e9.W1M,onChange:e=>{j({type:"change query",query:e.target.value})},placeholder:e.labels["insert-menu.search.placeholder"],value:E.query})}):null,E.views.length>1?(0,p.jsx)(x.xu,{flex:"none",children:(0,p.jsx)(tc,{views:E.views,onToggle:e=>{j({type:"toggle view",name:e})},labels:e.labels})}):null]}):null,w[27]=e.labels,w[28]=k,w[29]=g,w[30]=E.query,w[31]=E.views,w[32]=n):n=w[32],w[33]!==y||w[34]!==E.groups?(r=y?(0,p.jsx)(x.xu,{paddingTop:1,paddingX:1,children:(0,p.jsx)(x.td,{space:1,children:E.groups.map(e=>(0,p.jsx)(x.OK,{id:`${e.name}-tab`,"aria-controls":`${e.name}-panel`,label:e.title??e8(e.name),selected:e.selected,onClick:()=>{j({type:"select group",name:e.name})}},e.name))})}):null,w[33]=y,w[34]=E.groups,w[35]=r):r=w[35],w[36]!==t||w[37]!==n||w[38]!==r?(h=(0,p.jsxs)(x.xu,{...t,children:[n,r]}),w[36]=t,w[37]=n,w[38]=r,w[39]=h):h=w[39],o=x.xu,l=1,u=0===i.length?(0,p.jsx)(x.xu,{padding:2,children:(0,p.jsx)(x.xv,{muted:!0,size:1,children:e.labels["insert-menu.search.no-results"]})}):m?"grid"===m.name?(0,p.jsx)(x.rj,{autoRows:"auto",flex:1,gap:1,style:tr,children:i.map(t=>(0,p.jsx)(th,{icon:S?te(t):void 0,onClick:()=>{e.onSelect(t)},previewImageUrl:m.previewImageUrl?.(t.name),schemaType:t}
1,t.name))}):(0,p.jsx)(x.Kq,{flex:1,space:1,children:i.map(t=>(0,p.jsx)(x.sN,{icon:S?te(t):void 0,onClick:()=>{e.onSelect(t)},text:t.title??e8(t.name)},t.name))}):null,w[10]=e,w[11]=k,w[12]=S,w[13]=E.groups,w[14]=E.query,w[15]=E.views,w[16]=o,w[17]=a,w[18]=s,w[19]=l,w[20]=u,w[21]=c,w[22]=d,w[23]=h,w[24]=f}else o=w[16],a=w[17],s=w[18],l=w[19],u=w[20],c=w[21],d=w[22],h=w[23],f=w[24];return w[40]!==o||w[41]!==l||w[42]!==u?(g=(0,p.jsx)(o,{padding:l,children:u}),w[40]=o,w[41]=l,w[42]=u,w[43]=g):g=w[43],w[44]!==a||w[45]!==g||w[46]!==c||w[47]!==d||w[48]!==h?(v=(0,p.jsxs)(a,{direction:c,height:d,children:[h,g]}),w[44]=a,w[45]=g,w[46]=c,w[47]=d,w[48]=h,w[49]=v):v=w[49],w[50]!==s||w[51]!==v||w[52]!==f?(b=(0,p.jsx)(s,{padding:f,children:v}),w[50]=s,w[51]=v,w[52]=f,w[53]=b):b=w[53],b}function to(e){return e.selected}function ta(e,t){return{...e,selected:0===t}}function ts(e){return{...e,selected:!1}}let tl={grid:e9.dd_,list:e9.AEM},tu={grid:"insert-menu.toggle-grid-view.tooltip",list:"insert-menu.toggle-list-view.tooltip"};function tc(e){let t,n,r,i;let o=(0,m.c)(11),a=e.views.findIndex(td),s=e.views[a+1]??e.views[0],l=e.labels[tu[s.name]];o[0]!==l?(t=(0,p.jsx)(x.xv,{size:1,children:l}),o[0]=l,o[1]=t):t=o[1];let u=tl[s.name];return o[2]!==s.name||o[3]!==e?(n=()=>{e.onToggle(s.name)},o[2]=s.name,o[3]=e,o[4]=n):n=o[4],o[5]!==u||o[6]!==n?(r=(0,p.jsx)(x.zx,{mode:"bleed",icon:u,onClick:n}),o[5]=u,o[6]=n,o[7]=r):r=o[7],o[8]!==t||o[9]!==r?(i=(0,p.jsx)(x.u,{content:t,placement:"top",portal:!0,children:r}),o[8]=t,o[9]=r,o[10]=i):i=o[10],i}function td(e){return e.selected}function th(e){let t,n,r,i,o,a,s,l,u;let c=(0,m.c)(19),[d,h]=(0,y.useState)(!1),f=e.icon;c[0]===Symbol.for("react.memo_cache_sentinel")?(t={overflow:"hidden"},c[0]=t):t=c[0],c[1]===Symbol.for("react.memo_cache_sentinel")?(n={backgroundColor:"var(--card-muted-bg-color)",paddingBottom:"66.6%",position:"relative"},c[1]=n):n=c[1],c[2]!==f?(r=(0,e7.isValidElementType)(f)?(0,p.jsx)(x.kC,{align:"center",justify:"center",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,p.jsx)(x.xv,{size:1,children:(0,p.jsx)(f,{})})}):null,c[2]=f,c[3]=r):r=c[3],c[4]!==d||c[5]!==e.previewImageUrl?(i=!e.previewImageUrl||d?null:(0,p.jsx)("img",{src:e.previewImageUrl,style:{objectFit:"contain",width:"100%",height:"100%",position:"absolute",inset:0},onError:()=>{h(!0)}}),c[4]=d,c[5]=e.previewImageUrl,c[6]=i):i=c[6],c[7]===Symbol.for("react.memo_cache_sentinel")?(o=(0,p.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",boxShadow:"inset 0 0 0 0.5px var(--card-fg-color)",opacity:.1}}),c[7]=o):o=c[7],c[8]!==r||c[9]!==i?(a=(0,p.jsxs)(x.xu,{flex:"none",style:n,children:[r,i,o]}),c[8]=r,c[9]=i,c[10]=a):a=c[10];let g=e.schemaType.title??e.schemaType.name;return c[11]!==g?(s=(0,p.jsx)(x.xu,{flex:1,padding:2,children:(0,p.jsx)(x.xv,{size:1,weight:"medium",children:g})}),c[11]=g,c[12]=s):s=c[12],c[13]!==a||c[14]!==s?(l=(0,p.jsxs)(x.kC,{direction:"column",gap:1,padding:1,children:[a,s]}),c[13]=a,c[14]=s,c[15]=l):l=c[15],c[16]!==e.onClick||c[17]!==l?(u=(0,p.jsx)(x.sN,{padding:0,radius:2,onClick:e.onClick,style:t,children:l}),c[16]=e.onClick,c[17]=l,c[18]=u):u=c[18],u}function tf(e){if(!e)return(0,p.jsx)(e9.FMB,{});if("string"===e.type)return(0,p.jsx)(e9.Rhe,{});if("number"===e.type)return(0,p.jsx)(e9.yEv,{});let{value:t}=e;if("icon"in e&&e.icon)return(0,p.jsx)("div",{dangerouslySetInnerHTML:{__html:e.icon}});let{type:n}=t;if("string"===n)return(0,p.jsx)(e9.Rhe,{});if("boolean"===n)return(0,p.jsx)(e9.nSX,{});if("number"===n)return(0,p.jsx)(e9.yEv,{});if("array"===n||"union"===n)return(Array.isArray(t.of)?t.of:[t.of]).some(e=>"name"in e&&"block"===e.name)?(0,p.jsx)(e9.aI,{}):(0,p.jsx)(e9.DZP,{});if("object"===n){if("image"===e.name)return(0,p.jsx)(e9.XBm,{});if("block"===e.name)return(0,p.jsx)(e9.Rhe,{})}return(0,p.jsx)(e9.FMB,{})}let tp=(0,w.iv)`
2  overflow-y: scroll;
3  overscroll-behavior: contain;
4  -ms-overflow-style: none;
5  scrollbar-width: none;
6
7  &:before {
8    content: '';
9    display: block;
10    height: calc(100% + 1px);
11    position: absolute;
12    top: 0;
13    width: 100%;
14    z-index: -1;
15  }
16`,tm=w.zo.div`
17  height: 100%;
18  inset: 0;
19  pointer-events: all;
20  position: fixed;
21  width: 100%;
22  display: flex;
23  justify-content: center;
24  align-items: center;
25
26  ${e=>e.$blockScroll&&tp}
27`,tg=w.zo.div`
28  background: transparent;
29  height: 100%;
30  inset: 0;
31  position: absolute;
32  width: 100%;
33`,ty=e=>{let t;let n=(0,m.c)(2);return n[0]!==e?(t=(0,p.jsx)(x.h_,{children:(0,p.jsx)(tv,{...e})}),n[0]=e,n[1]=t):t=n[1],t},tv=e=>{let t,n;let r=(0,m.c)(7),{children:i,onDismiss:o,setBoundaryElement:a,blockScroll:s}=e,l=void 0===s||s;return r[0]!==o?(t=(0,p.jsx)(tg,{onMouseDownCapture:()=>{o?.()}}),r[0]=o,r[1]=t):t=r[1],r[2]!==l||r[3]!==i||r[4]!==a||r[5]!==t?(n=(0,p.jsxs)(tm,{"data-sanity-overlay-element":!0,ref:a,onClick:tb,$blockScroll:l,children:[t,i]}),r[2]=l,r[3]=i,r[4]=a,r[5]=t,r[6]=n):n=r[6],n};function tb(e){e.stopPropagation()}function tx(e){return{type:"log",name:e.name,version:e.version,description:e.description,maxSampleRate:e.maxSampleRate,schema:void 0}}let tw={"Visual Editing Drag Sequence Completed":tx({name:"Visual Editing Drag Sequence Completed",description:"An array is successfully reordered using drag and drop.",version:1}),"Visual Editing Drag Minimap Enabled":tx({name:"Visual Editing Drag Minimap Enabled",description:"The zoomed-out minimap view is enabled during a drag sequence.",version:1}),"Visual Editing Context Menu Item Removed":tx({name:"Visual Editing Context Menu Item Removed",description:"An item is removed using the Context Menu.",version:1}),"Visual Editing Context Menu Item Duplicated":tx({name:"Visual Editing Context Menu Item Duplicated",description:"An item is duplicated using the Context Menu.",version:1}),"Visual Editing Context Menu Item Moved":tx({name:"Visual Editing Context Menu Item Moved",description:"An item is moved using the Context Menu.",version:1}),"Visual Editing Context Menu Item Inserted":tx({name:"Visual Editing Context Menu Item Inserted",description:"An item is inserted using the Context Menu.",version:1}),"Visual Editing Insert Menu Item Inserted":tx({name:"Visual Editing Insert Menu Item Inserted",description:"An item is inserted using the Insert Menu.",version:1}),"Visual Editing Overlay Clicked":tx({name:"Visual Editing Overlay Clicked",description:"An Overlay is clicked.",version:1})},tS=(0,y.createContext)(void 0);function tk(){let e=(0,y.useContext)(tS);if(!e)throw Error("Telemetry context is missing");return e}let tE={"insert-menu.filter.all-items":"All","insert-menu.search.no-results":"No results","insert-menu.search.placeholder":"Filter types…","insert-menu.toggle-grid-view.tooltip":"Toggle grid view","insert-menu.toggle-list-view.tooltip":"Toggle list view"},tj=e=>{let t,n,r,i;let o=(0,m.c)(11),{node:a,onSelect:s}=e;o[0]!==a.options?.insertMenu?(t=a.options?.insertMenu||{},o[0]=a.options?.insertMenu,o[1]=t):t=o[1];let l=t;o[2]!==l.views?(n=l.views?.map(tC),o[2]=l.views,o[3]=n):n=o[3];let u=n;return o[4]!==a.of?(r=a.of.map(t_),o[4]=a.of,o[5]=r):r=o[5],o[6]!==l||o[7]!==s||o[8]!==r||o[9]!==u?(i=(0,p.jsx)(ti,{...l,labels:tE,schemaTypes:r,onSelect:s,views:u}),o[6]=l,o[7]=s,o[8]=r,o[9]=u,o[10]=i):i=o[10],i};function tC(e){return"grid"===e.name?{...e,previewImageUrl:t=>e.previewImageUrls?.[t]}:e}function t_(e){return{...e,icon:tf(e)}}let tT=e=>{let t,n,r,i,o;let a=(0,m.c)(10);return a[0]!==e?({children:t,style:r,...n}=e,a[0]=e,a[1]=t,a[2]=n,a[3]=r):(t=a[1],n=a[2],r=a[3]),a[4]!==r?(i={...r,pointerEvents:"all"},a[4]=r,a[5]=i):i=a[5],a[6]!==t||a[7]!==n||a[8]!==i?(o=(0,p.jsx)("div",{style:i,"data-sanity-overlay-element":!0,...n,children:t}),a[6]=t,a[7]=n,a[8]=i,a[9]=o):o=a[9],o};var tA=n(42115),tM=n(19761),tP=n(16031);function tR(e){if(!(e.tabIndex>0||0===e.tabIndex&&null!==e.getAttribute("tabIndex")||((0,x.bg)(e)?!!e.href&&"ignore"!==e.rel:(0,x.LL)(e)?"hidden"
33!==e.type&&"file"!==e.type&&!e.disabled:!!((0,x.fe)(e)||(0,x.RV)(e)||(0,x.ZH)(e))&&!e.disabled)))return!1;try{e.focus()}catch{}return document.activeElement===e}function tI(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes[t];if((0,x.Re)(n)&&(tR(n)||tI(n)))return!0}return!1}n(75660);let tO=w.zo.div.withConfig({displayName:"StyledAutocomplete",componentId:"sc-1igauft-0"})`line-height:0;`,t$=(0,w.zo)(x.xu).withConfig({displayName:"ListBox",componentId:"sc-1igauft-1"})`& > ul{list-style:none;padding:0;margin:0;}`,tD=(0,w.F4)`
34  from {
35    transform: rotate(0deg);
36  }
37
38  to {
39    transform: rotate(360deg);
40  }
41`,tL=(0,w.zo)(e9.L4p).withConfig({displayName:"AnimatedSpinnerIcon",componentId:"sc-1igauft-2"})`animation:${tD} 500ms linear infinite;`;function tz(e){let t,n,r;let i=(0,tA.c)(11),{children:o,id:a,onSelect:s,selected:l,value:u}=e;i[0]!==s||i[1]!==u?(t=()=>{setTimeout(()=>{s(u)},0)},i[0]=s,i[1]=u,i[2]=t):t=i[2];let c=t;i[3]!==c?(n=e=>{"Enter"!==e.key||(0,x.Rm)(e.currentTarget)||c()},i[3]=c,i[4]=n):n=i[4];let d=n;return i[5]!==o||i[6]!==c||i[7]!==d||i[8]!==a||i[9]!==l?(r=(0,p.jsx)("li",{"aria-selected":l,"data-ui":"AutocompleteOption",id:a,role:"option",onClick:c,onKeyDown:d,children:o}),i[5]=o,i[6]=c,i[7]=d,i[8]=a,i[9]=l,i[10]=r):r=i[10],r}function tV(e,t){return"input/change"===t.type?{...e,activeValue:null,focused:!0,query:t.query}:"input/focus"===t.type?{...e,focused:!0}:"root/blur"===t.type?{...e,focused:!1,query:null}:"root/clear"===t.type?{...e,activeValue:null,query:null,value:null}:"root/escape"===t.type?{...e,focused:!1,query:null}:"root/open"===t.type?{...e,query:e.query||t.query}:"root/setActiveValue"===t.type?{...e,activeValue:t.value,listFocused:t.listFocused||e.listFocused}:"root/setListFocused"===t.type?{...e,listFocused:t.listFocused}:"value/change"===t.type?{...e,activeValue:t.value,query:null,value:t.value}:e}let tN=["Control","Shift","Alt","Enter","Home","End","PageUp","PageDown","Meta","Tab","CapsLock"],tF=["bottom-start","top-start"],tB=(e,t)=>t?t.value:e,tU=(e,t)=>t.value.toLowerCase().indexOf(e.toLowerCase())>-1;(0,y.forwardRef)(function(e,t){let{border:n=!0,customValidity:r,disabled:i,filterOption:o,fontSize:a=2,icon:s,id:l,listBox:u=x.bT,loading:c,onBlur:d,onChange:h,onFocus:f,onQueryChange:m,onSelect:g,openButton:v,openOnFocus:b,options:w,padding:S=3,popover:k=x.bT,prefix:E,radius:j=2,readOnly:C,relatedElements:_,renderOption:T,renderPopover:A,renderValue:M=tB,suffix:P,value:R,...I}=e,[O,$]=(0,y.useReducer)(tV,{activeValue:R||null,focused:!1,listFocused:!1,query:null,value:R||null}),{activeValue:D,focused:L,listFocused:z,query:V,value:N}=O,F=(0,y.useCallback)(({value:e})=>(0,p.jsx)(x.Zb,{"data-as":"button",padding:S,radius:2,tone:"inherit",children:(0,p.jsx)(x.xv,{size:a,textOverflow:"ellipsis",children:e})}),[a,S]),B="function"==typeof T?T:F,U="function"==typeof o?o:tU,H=(0,y.useRef)(null),W=(0,y.useRef)(null),G=(0,y.useRef)(null),Y=(0,y.useRef)(null),q=(0,y.useRef)(!1),Z=(0,y.useRef)(N),K=(0,y.useRef)(R),X=(0,y.useRef)(!1);(0,y.useImperativeHandle)(t,()=>G.current);let Q=`${l}-listbox`,J=Array.isArray(w)?w:x.LZ,ee=(0,x.Q5)(S),et=(0,y.useMemo)(()=>null!==N?J.find(e=>e.value===N):void 0,[J,N]),en=(0,y.useMemo)(()=>J.filter(e=>!V||U(V,e)),[U,J,V]),er=en.length,ei=D?`${l}-option-${D}`:void 0,eo=null!==V&&c||L&&null!==V,ea=(0,y.useCallback)(e=>{setTimeout(()=>{if(X.current)return;let t=(_||[]).concat(H.current?[H.current]:[],W.current?[W.current]:[]),n=!1;if(document.activeElement){for(let e of t)if(e===document.activeElement||e.contains(document.activeElement)){n=!0;break}}!1===n&&($({type:"root/blur"}),X.current=!1,m&&m(null),d&&d(e))},0)},[d,m,_]),es=(0,y.useCallback)(e=>{let t=Y.current,n=e.target instanceof HTMLElement?e.target:null,r=t?.contains(n)||!1;r!==q.current&&(q.current=r,$({type:"root/setListFocused",listFocused:r}))},[]),el=(0,y.useCallback)(e=>{$({type:"value/change",value:e}),X.current=!1,g&&g(e),Z.current=e,h&&h(e),m&&m(null),G.current?.focus()},[h,g,m]),eu=(0,y.useCallback)(e=>{if("ArrowDown"===e.key){if(e.preventDefault(),!er)return;let t=en.find(e=>e.value===D),n=t?en.indexOf(t):-1,r=en[(n+1)%er];r&&$({type:"root/setActiveValue",value:r.value,listFocused:!0});return}if("ArrowUp"===e.key){if(e.preventDefault(),!er)return;let t=en.find(e=>e.value===D),n=t?en.indexOf(t):-1,r=en[-1===n?er-1:(er+n-1)%er];r&&$({type:"root/setActiveValue",value:r.value,listFocused:!0});return}if("Escape"===e.key){$({type:"root/escape"}),X.current=!1,m&&m(null),G.current?.focus();return}let t=e.target,n=Y.current;
41if((n===t||n?.contains(t))&&!tN.includes(e.key)){G.current?.focus();return}},[D,en,er,m]),ec=(0,y.useCallback)(e=>{let t=e.currentTarget.value;$({type:"input/change",query:t}),m&&m(t)},[m]),ed=(0,y.useCallback)(()=>{$({type:"root/open",query:N?M(N,et):""})},[et,M,N]),eh=(0,y.useCallback)(e=>{L||($({type:"input/focus"}),f&&f(e),b&&ed())},[L,f,b,ed]),ef=(0,y.useCallback)(()=>{X.current=!0},[]),ep=(0,y.useCallback)(()=>{X.current=!1},[]),em=(0,y.useCallback)(()=>{$({type:"root/clear"}),Z.current="",h&&h(""),m&&m(null),G.current?.focus()},[h,m]),eg=(0,y.useCallback)(()=>{$({type:"input/focus"})},[]);(0,y.useEffect)(()=>{if(R!==K.current){K.current=R,void 0!==R&&($({type:"value/change",value:R}),Z.current=R);return}R!==Z.current&&(Z.current=R||null,$({type:"value/change",value:R||null}))},[R]),(0,y.useEffect)(()=>{!L&&Z.current&&$({type:"root/setActiveValue",value:Z.current})},[L]),(0,y.useEffect)(()=>{let e=Y.current;if(!e)return;let t=en.find(e=>e.value===D);if(t){let n=en.indexOf(t),r=e.childNodes[n];if(r){if(document.activeElement&&r.contains(document.activeElement))return;tI(r)}}},[D,en]);let ey=(0,y.useMemo)(()=>{if(!c&&!i&&N)return{"aria-label":"Clear",onFocus:eg}},[i,eg,c,N]),ev=(0,y.useMemo)(()=>ee.map(e=>0===e?0:1===e||2===e?1:e-2),[ee]),eb=(0,y.useMemo)(()=>ee.map(e=>Math.max(e-1,0)),[ee]),ex=(0,y.useMemo)(()=>"object"==typeof v?v:x.bT,[v]),ew=(0,y.useCallback)(e=>{ed(),ex.onClick&&ex.onClick(e),requestAnimationFrame(()=>G.current?.focus())},[ex,ed]),eS=(0,y.useMemo)(()=>i||C||!v?void 0:(0,p.jsx)(x.xu,{"aria-hidden":eo,padding:ev,children:(0,p.jsx)(x.zx,{"aria-label":"Open",disabled:eo,fontSize:a,icon:e9.v4q,mode:"bleed",padding:eb,...ex,onClick:ew})}),[i,eo,a,ew,v,ev,eb,ex,C]),ek=(0,y.useMemo)(()=>null===V?null!==N?M(N,et):"":V,[et,V,M,N]),eE=(0,p.jsx)(x.oi,{...I,"aria-activedescendant":ei,"aria-autocomplete":"list","aria-expanded":eo,"aria-owns":Q,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",border:n,clearButton:ey,customValidity:r,disabled:i,fontSize:a,icon:s,iconRight:c&&tL,id:l,inputMode:"search",onChange:ec,onClear:em,onFocus:eh,padding:ee,prefix:E,radius:j,readOnly:C,ref:G,role:"combobox",spellCheck:!1,suffix:P||eS,value:ek}),ej=(0,y.useCallback)(e=>{"Tab"===e.key&&z&&G.current?.focus()},[z]),eC=(0,y.useMemo)(()=>0===en.length?null:(0,p.jsx)(t$,{"data-ui":"AutoComplete__results",onKeyDown:ej,padding:1,...u,tabIndex:-1,children:(0,p.jsx)(x.Kq,{as:"ul","aria-multiselectable":!1,"data-ui":"AutoComplete__resultsList",id:Q,ref:Y,role:"listbox",space:1,children:en.map(e=>{let t=null!==D?e.value===D:et===e;return(0,p.jsx)(tz,{id:`${l}-option-${e.value}`,onSelect:el,selected:t,value:e.value,children:(0,y.cloneElement)(B(e),{disabled:c,selected:t,tabIndex:z&&t?0:-1})},e.value)})})}),[D,et,en,el,ej,l,u,Q,z,c,B]),e_=(0,y.useMemo)(()=>A?A({content:eC,hidden:!eo,inputElement:G.current,onMouseEnter:ef,onMouseLeave:ep},W):0===er?null:(0,p.jsx)(x.J2,{arrow:!1,constrainSize:!0,content:eC,fallbackPlacements:tF,matchReferenceWidth:!0,onMouseEnter:ef,onMouseLeave:ep,open:eo,overflow:"auto",placement:"bottom-start",portal:!0,radius:j,ref:W,referenceElement:G.current,...k}),[eC,eo,er,ef,ep,k,j,A]);return(0,p.jsxs)(tO,{"data-ui":"Autocomplete",onBlur:ea,onFocus:es,onKeyDown:eu,ref:H,children:[eE,e_]})}).displayName="ForwardRef(Autocomplete)";let tH=w.zo.ol.withConfig({displayName:"StyledBreadcrumbs",componentId:"sc-1es8h8q-0"})`margin:0;padding:0;display:flex;list-style:none;align-items:center;white-space:nowrap;line-height:0;`,tW=(0,w.zo)(x.zx).withConfig({displayName:"ExpandButton",componentId:"sc-1es8h8q-1"})`appearance:none;margin:-4px;`;(0,y.forwardRef)(function(e,t){let n,r,i,o,a,s,l,u,c,d,h,f;let m=(0,tA.c)(44);m[0]!==e?({children:n,maxLength:r,separator:o,space:a,...i}=e,m[0]=e,m[1]=n,m[2]=r,m[3]=i,m[4]=o,m[5]=a):(n=m[1],r=m[2],i=m[3],o=m[4],a=m[5]);let g=(0,x.Q5)(void 0===a?2:a),[v,b]=(0,y.useState)(!1),w=(0,y.useRef)(null),S=(0,y.useRef)(null);m[6]===Symbol.for("react.memo_cache_sentinel")?(s=()=>b(!1),m[6]=s):s=m[6];let k=s;m[7]===Symbol.for("react.memo_cache_sentinel")?(l=()=>b(!0),m[7]=l):l=m[7];let E=l;m[8]===Symbol.for("react.memo_cache_sentinel")?(u=()=>[w.current,S.current],m[8]=u):u=m[8],(0,x.Of)(k,u),m[9]!==n?(c=y.Children.toArray(n).filter(y.isValidElement),m[9]=n,m[10]=c):c=m[10];let j=c;e:{let e=j.length;if(r&&e>r){let t;let n=Math.ceil(r/2),i=Math.floor(r/2);if(m[11]!==i||m[12]!==n||m[13]!==e||m[14]!==v||m[15]!==j||m[16]!==g){let r,o,a,s;let l=j.slice(0,n-1);m[18]!==i||m[19]!==n||m[20]!==e||m[21]!==j?(r=j.slice(n-1,e-i),m[18]=i,m[19]=n,m[20]=e,m[21]=j,m[22]=r):r=m[22],m[23]!==g||m[24]!==r?(o=(0,p.jsx)(x.Kq,{as:"ol",overflow:"auto",padding:g,space:g,children:r}),m[23]=g,m[24]=r,m[25]=o):o=m[25];let u=v?k:E;m[26]!==v||m[27]!==u?(a=(0,p.jsx)(tW,{fontSize:1,mode:"bleed",onClick:u,padding:1,ref:w,selected:v,text:"…"}),m[26]=v,m[27]=u,m[28]=a):a=m[28],m[29]!==v||m[30]!==a||m[31]!==o?(s=(0,p.jsx)(x.J2,{constrainSize:!0,content:o,open:v,placement:"top",portal:!0,ref:S,children:a},"button"),m[29]=v,m[30]=a,m[31]=o,m[32]=s):s=m[32],t=[...l,s,...j.slice(e-i)],m[11]=i,m[12]=n,m[13]=e,m[14]=v,m[15]=j,m[16]=g,m[17]=t}else t=m[17];d=t;break e}d=j}let C=d;if(m[33]!==C||m[34]!==o||m[35]!==g){let e;m[37]!==o||m[38]!==g?(e=(e,t)=>(0,p.jsxs)(y.Fragment,{children:[t>0&&(0,p.jsx)(x.xu,{"aria-hidden":!0,as:"li",paddingX:g,children:o||(0,p.jsx)(x.xv,{muted:!0,children:"/"})}),(0,p.jsx)(x.xu,{as:"li",children:e})]},t),m[37]=o,m[38]=g,m[39]=e):e=m[39],h=C.map(e),m[33]=C,m[34]=o,m[35]=g,m[36]=h}
41else h=m[36];return m[40]!==t||m[41]!==i||m[42]!==h?(f=(0,p.jsx)(tH,{"data-ui":"Breadcrumbs",...i,ref:t,children:h}),m[40]=t,m[41]=i,m[42]=h,m[43]=f):f=m[43],f}).displayName="ForwardRef(Breadcrumbs)";let tG=(0,x.tx)("@sanity/ui/context/dialog",{version:0});function tY(e,t,n){return!e||!t||(0,x.dG)(e,n)||(0,x.dG)(t,n)}let tq=(0,w.zo)(x.mh).withConfig({displayName:"StyledDialog",componentId:"sc-4n4xb3-0"})(x.ZE,function({theme:e}){let{color:t}=(0,tM.aQ)(e);return{"&:not([hidden])":{display:"flex"},top:0,left:0,right:0,bottom:0,alignItems:"center",justifyContent:"center",outline:"none",background:t.backdrop}},function(e){let{media:t}=(0,tM.aQ)(e.theme);return(0,x.Lt)(t,e.$position,e=>({"&&":{position:e}}))},function(e){return e.$animate?(0,w.iv)`
42    @keyframes zoomIn {
43      from {
44        opacity: 0;
45        transform: scale(0.95);
46      }
47      to {
48        opacity: 1;
49        transform: scale(1);
50      }
51    }
52    @keyframes fadeIn {
53      from {
54        opacity: 0;
55      }
56      to {
57        opacity: 1;
58      }
59    }
60
61    animation: fadeIn 200ms ease-out;
62    // Animates the dialog card.
63    & > [data-ui='DialogCard'] {
64      animation: zoomIn 200ms ease-out;
65    }
66  `:(0,w.iv)``}),tZ=(0,w.zo)(x.W2).withConfig({displayName:"DialogContainer",componentId:"sc-4n4xb3-1"})`&:not([hidden]){display:flex;}width:100%;height:100%;flex-direction:column;align-items:center;justify-content:center;`,tK=(0,w.zo)(x.Zb).withConfig({displayName:"DialogCardRoot",componentId:"sc-4n4xb3-2"})`&:not([hidden]){display:flex;}width:100%;min-height:0;max-height:100%;overflow:hidden;overflow:clip;`,tX=(0,w.zo)(x.kC).withConfig({displayName:"DialogLayout",componentId:"sc-4n4xb3-3"})`flex:1;min-height:0;width:100%;`,tQ=(0,w.zo)(x.xu).withConfig({displayName:"DialogHeader",componentId:"sc-4n4xb3-4"})`position:relative;z-index:2;`,tJ=(0,w.zo)(x.xu).withConfig({displayName:"DialogContent",componentId:"sc-4n4xb3-5"})`position:relative;z-index:1;overflow:auto;outline:none;`,t0=(0,w.zo)(x.xu).withConfig({displayName:"DialogFooter",componentId:"sc-4n4xb3-6"})`position:relative;z-index:3;`,t1=(0,y.forwardRef)(function(e,t){let n,r,i,o,a,s,l,u,c,d,h,f,m;let g=(0,tA.c)(38),{__unstable_autoFocus:v,__unstable_hideCloseButton:b,children:w,contentRef:S,footer:k,header:E,id:j,onClickOutside:C,onClose:_,portal:T,radius:A,scheme:M,shadow:P,width:R}=e,I=(0,x.vI)(),O=T?I.elements?.[T]||null:I.element,$=(0,x.sz)().element,D=(0,x.Q5)(A),L=(0,x.Q5)(P),z=(0,x.Q5)(R),V=(0,y.useRef)(null),N=(0,y.useRef)(null),{isTopLayer:F}=(0,x.sJ)(),B=`${j}_label`,U=!!_&&!1===b,H=!!E||U;return g[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>V.current,g[0]=n):n=g[0],(0,y.useImperativeHandle)(t,n),g[1]===Symbol.for("react.memo_cache_sentinel")?(r=()=>N.current,g[1]=r):r=g[1],(0,y.useImperativeHandle)(S,r),g[2]!==v?(i=()=>{v&&V.current&&tI(V.current)},o=[v,V],g[2]=v,g[3]=i,g[4]=o):(i=g[3],o=g[4]),(0,y.useEffect)(i,o),g[5]!==$||g[6]!==F||g[7]!==_||g[8]!==O?(a=e=>{if(!F||!_)return;let t=document.activeElement;t&&!tY($,O,t)||"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),_())},g[5]=$,g[6]=F,g[7]=_,g[8]=O,g[9]=a):a=g[9],(0,x.qh)(a),g[10]!==$||g[11]!==F||g[12]!==C||g[13]!==O?(s=F&&C&&(e=>{let t=e.target;t&&!tY($,O,t)||C()}),g[10]=$,g[11]=F,g[12]=C,g[13]=O,g[14]=s):s=g[14],g[15]===Symbol.for("react.memo_cache_sentinel")?(l=()=>[V.current],g[15]=l):l=g[15],(0,x.Of)(s,l),g[16]!==E||g[17]!==B||g[18]!==_||g[19]!==U||g[20]!==H?(u=H&&(0,p.jsx)(tQ,{children:(0,p.jsxs)(x.kC,{align:"flex-start",padding:3,children:[(0,p.jsx)(x.xu,{flex:1,padding:2,children:E&&(0,p.jsx)(x.xv,{id:B,size:1,weight:"semibold",children:E})}),U&&(0,p.jsx)(x.xu,{flex:"none",children:(0,p.jsx)(x.zx,{"aria-label":"Close dialog",disabled:!_,icon:e9.Two,mode:"bleed",onClick:_,padding:2})})]})}),g[16]=E,g[17]=B,g[18]=_,g[19]=U,g[20]=H,g[21]=u):u=g[21],g[22]!==w?(c=(0,p.jsx)(tJ,{flex:1,ref:N,tabIndex:-1,children:w}),g[22]=w,g[23]=c):c=g[23],g[24]!==k?(d=k&&(0,p.jsx)(t0,{children:k}),g[24]=k,g[25]=d):d=g[25],g[26]!==u||g[27]!==c||g[28]!==d?(h=(0,p.jsxs)(tX,{direction:"column",children:[u,c,d]}),g[26]=u,g[27]=c,g[28]=d,g[29]=h):h=g[29],g[30]!==D||g[31]!==M||g[32]!==L||g[33]!==h?(f=(0,p.jsx)(tK,{radius:D,ref:V,scheme:M,shadow:L,children:h}),g[30]=D,g[31]=M,g[32]=L,g[33]=h,g[34]=f):f=g[34],g[35]!==f||g[36]!==z?(m=(0,p.jsx)(tZ,{"data-ui":"DialogCard",width:z,children:f}),g[35]=f,g[36]=z,g[37]=m):m=g[37],m});t1.displayName="ForwardRef(DialogCard)",(0,y.forwardRef)(function(e,t){let n,r,i,o,a,s,l,u,c,d,h,f,m,g,v,b,w,S,k,E,j,C,_,T,A,M,P,R;let I=(0,tA.c)(60),O=(0,y.useContext)(tG),{layer:$}=(0,x.g9)();I[0]!==e?({__unstable_autoFocus:v,__unstable_hideCloseButton:b,cardRadius:w,cardShadow:S,children:i,contentRef:o,footer:a,header:s,id:l,onActivate:u,onClickOutside:c,onClose:d,onFocus:h,padding:k,portal:f,position:n,scheme:g,width:E,zOffset:r,animate:j,...m}=e,I[0]=e,I[1]=n,I[2]=r,I[3]=i,I[4]=o,I[5]=a,I[6]=s,I[7]=l,I[8]=u,I[9]=c,I[10]=d,I[11]=h,I[12]=f,I[13]=m,I[14]=g,I[15]=v,I[16]=b,I[17]=w,I[18]=S,I[19]=k,I[20]=E,I[21]=j):(n=I[1],r=I[2],i=I[3],o=I[4],a=I[5],s=I[6],l=I[7],u=I[8],c=I[9],d=I[10],h=I[11],f=I[12],m=I[13],g=I[14],v=I[15],b=I[16],w=I[17],S=I[18],k=I[19],E=I[20],j=I[21]);let D=void 0===v||v,L=void 0!==b&&b,z=void 0===w?4:w,V=void 0===S?3:S,N=void 0===k?3:k,F=void 0===E?0:E,B=void 0!==j&&j,U=n??(O.position||"fixed"),H=r??(O.zOffset||$.dialog.zOffset),W=!(0,x.Tb)()&&B,G=(0,x.vI)(),Y=f?G.elements?.[f]||null:G.element,q=(0,x.sz)().element,Z=(0,x.Q5)(z),K=(0,x.Q5)(N),X=(0,x.Q5)(U),Q=(0,x.Q5)(F),J=(0,x.Q5)(H),ee=(0,y.useRef)(null),et=(0,y.useRef)(null),en=(0,y.useRef)(null),er=(0,y.useRef)(null);I[22]!==h?(C=e=>{h?.(e);let t=e.target,n=en.current;if(n&&t===ee.current){(function e(t){for(let n=t.childNodes.length-1;n>=0;n--){let r=t.childNodes[n];if((0,x.Re)(r)&&(tR(r)||e(r)))return!0}return!1})(n);return}if(n&&t===et.current){tI(n);return}(0,x.Re)(e.target)&&(er.current=e.target)},I[22]=h,I[23]=C):C=I[23];let ei=C,eo=`${l}_label`,ea=(0,y.useRef)(void 0);I[24]!==q||I[25]!==Y?(_=()=>{ea.current&&clearTimeout(ea.current),ea.current=setTimeout(()=>{let e=document.activeElement;if(e&&!tY(q,Y,e)){let e=er.current;if(!e||!document.body.contains(e)){let e=en.current;e&&tI(e);return}
66e.focus()}},0)},I[24]=q,I[25]=Y,I[26]=_):_=I[26];let es=_;return I[27]===Symbol.for("react.memo_cache_sentinel")?(T=(0,p.jsx)("div",{ref:ee,tabIndex:0}),I[27]=T):T=I[27],I[28]!==D||I[29]!==Z||I[30]!==V||I[31]!==i||I[32]!==o||I[33]!==a||I[34]!==s||I[35]!==L||I[36]!==l||I[37]!==c||I[38]!==d||I[39]!==f||I[40]!==g||I[41]!==Q?(A=(0,p.jsx)(t1,{__unstable_autoFocus:D,__unstable_hideCloseButton:L,contentRef:o,footer:a,header:s,id:l,onClickOutside:c,onClose:d,portal:f,radius:Z,ref:en,scheme:g,shadow:V,width:Q,children:i}),I[28]=D,I[29]=Z,I[30]=V,I[31]=i,I[32]=o,I[33]=a,I[34]=s,I[35]=L,I[36]=l,I[37]=c,I[38]=d,I[39]=f,I[40]=g,I[41]=Q,I[42]=A):A=I[42],I[43]===Symbol.for("react.memo_cache_sentinel")?(M=(0,p.jsx)("div",{ref:et,tabIndex:0}),I[43]=M):M=I[43],I[44]!==W||I[45]!==ei||I[46]!==es||I[47]!==l||I[48]!==eo||I[49]!==u||I[50]!==K||I[51]!==X||I[52]!==t||I[53]!==m||I[54]!==A||I[55]!==J?(P=(0,p.jsxs)(tq,{...m,$animate:W,$padding:K,$position:X,"aria-labelledby":eo,"aria-modal":!0,"data-ui":"Dialog",id:l,onActivate:u,onClick:es,onFocus:ei,ref:t,role:"dialog",zOffset:J,children:[T,A,M]}),I[44]=W,I[45]=ei,I[46]=es,I[47]=l,I[48]=eo,I[49]=u,I[50]=K,I[51]=X,I[52]=t,I[53]=m,I[54]=A,I[55]=J,I[56]=P):P=I[56],I[57]!==f||I[58]!==P?(R=(0,p.jsx)(x.h_,{__unstable_name:f,children:P}),I[57]=f,I[58]=P,I[59]=R):R=I[59],R}).displayName="ForwardRef(Dialog)";let t2=(0,y.forwardRef)(function(e,t){let n,r,i,o,a,s,l,u,c,d,h,f,m,g,v,b,w,S,k,E,j,C,_;let T=(0,tA.c)(62),{__unstable_disableRestoreFocusOnClose:A,boundaryElement:M,button:P,id:R,menu:I,onClose:O,onOpen:$,placement:D,popoverScheme:L,portal:z,popover:V,popoverRadius:N,preventOverflow:F}=e,B=void 0!==A&&A,U=void 0===z||z,[H,W]=(0,y.useState)(!1),[G,Y]=(0,y.useState)(null),[q,Z]=(0,y.useState)(null);T[0]===Symbol.for("react.memo_cache_sentinel")?(n=[],T[0]=n):n=T[0];let[K,X]=(0,y.useState)(n),Q=(0,y.useRef)(H);T[1]!==$||T[2]!==H?(r=()=>{$&&H&&!Q.current&&$()},i=[$,H],T[1]=$,T[2]=H,T[3]=r,T[4]=i):(r=T[3],i=T[4]),(0,y.useEffect)(r,i),T[5]!==O||T[6]!==H?(o=()=>{O&&!H&&Q.current&&O()},a=[O,H],T[5]=O,T[6]=H,T[7]=o,T[8]=a):(o=T[7],a=T[8]),(0,y.useEffect)(o,a),T[9]!==H?(s=()=>{Q.current=H},l=[H],T[9]=H,T[10]=s,T[11]=l):(s=T[10],l=T[11]),(0,y.useEffect)(s,l),T[12]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{W(t5),Y(null)},T[12]=u):u=T[12];let J=u;T[13]!==H?(c=e=>{H&&e.preventDefault()},T[13]=H,T[14]=c):c=T[14];let ee=c;T[15]===Symbol.for("react.memo_cache_sentinel")?(d=e=>{if("ArrowDown"===e.key||"Enter"===e.key||" "===e.key){e.preventDefault(),W(!0),Y("first");return}if("ArrowUp"===e.key){e.preventDefault(),W(!0),Y("last");return}},T[15]=d):d=T[15];let et=d;T[16]!==q||T[17]!==K?(h=e=>{let t=e.target;if(t instanceof Node&&!(q&&(t===q||q.contains(t)))){for(let e of K)if(t===e||e.contains(t))return;W(!1)}},T[16]=q,T[17]=K,T[18]=h):h=T[18];let en=h;T[19]!==q||T[20]!==B?(f=()=>{W(!1),!B&&q&&q.focus()},T[19]=q,T[20]=B,T[21]=f):f=T[21];let er=f;T[22]!==K?(m=e=>{let t=e.relatedTarget;if(t instanceof Node){for(let e of K)if(e===t||e.contains(t))return;W(!1)}},T[22]=K,T[23]=m):m=T[23];let ei=m;T[24]!==q||T[25]!==B?(g=()=>{W(!1),!B&&q&&q.focus()},T[24]=q,T[25]=B,T[26]=g):g=T[26];let eo=g;T[27]===Symbol.for("react.memo_cache_sentinel")?(v=e=>(X(t=>t.concat([e])),()=>X(t=>t.filter(t=>t!==e))),T[27]=v):v=T[27];let ea=v;T[28]!==q||T[29]!==ei||T[30]!==eo||T[31]!==en||T[32]!==er||T[33]!==R||T[34]!==I||T[35]!==G?(b=I&&(0,y.cloneElement)(I,{"aria-labelledby":R,onBlurCapture:ei,onClickOutside:en,onEscape:er,onItemClick:eo,originElement:q,registerElement:ea,shouldFocus:G}),T[28]=q,T[29]=ei,T[30]=eo,T[31]=en,T[32]=er,T[33]=R,T[34]=I,T[35]=G,T[36]=b):b=T[36];let es=b;T[37]!==P||T[38]!==ee||T[39]!==R||T[40]!==H?(w=P&&(0,y.cloneElement)(P,{"data-ui":"MenuButton",id:R,onClick:J,onKeyDown:et,onMouseDown:ee,"aria-haspopup":!0,"aria-expanded":H,ref:Z,selected:P.props.selected??H}),T[37]=P,T[38]=ee,T[39]=R,T[40]=H,T[41]=w):w=T[41];let el=w;T[42]!==q?(S=()=>q,k=[q],T[42]=q,T[43]=S,T[44]=k):(S=T[43],k=T[44]),(0,y.useImperativeHandle)(t,S,k),T[45]!==V?(E=V||{},T[45]=V,T[46]=E):E=T[46],T[47]!==M||T[48]!==D||T[49]!==N||T[50]!==L||T[51]!==U||T[52]!==F||T[53]!==E?(j={boundaryElement:M,overflow:"auto",placement:D,portal:U,preventOverflow:F,radius:N,scheme:L,...E},T[47]=M,T[48]=D,T[49]=N,T[50]=L,T[51]=U,T[52]=F,T[53]=E,T[54]=j):j=T[54];let eu=j;return T[55]!==el?(C=el||(0,p.jsx)(p.Fragment,{}),T[55]=el,T[56]=C):C=T[56],T[57]!==es||T[58]!==H||T[59]!==eu||T[60]!==C?(_=(0,p.jsx)(x.J2,{"data-ui":"MenuButton__popover",...eu,content:es,open:H,children:C}
66),T[57]=es,T[58]=H,T[59]=eu,T[60]=C,T[61]=_):_=T[61],_});function t5(e){return!e}t2.displayName="ForwardRef(MenuButton)";let t3=(0,w.F4)`
67  0% {
68    background-position: 100%;
69  }
70  100% {
71    background-position: -100%;
72  }
73`,t4=(0,w.iv)`
74  background-image: linear-gradient(
75    to right,
76    var(--card-skeleton-color-from),
77    var(--card-skeleton-color-to),
78    var(--card-skeleton-color-from),
79    var(--card-skeleton-color-from),
80    var(--card-skeleton-color-from)
81  );
82  background-position: 100%;
83  background-size: 200% 100%;
84  background-attachment: fixed;
85  animation-name: ${t3};
86  animation-timing-function: ease-in-out;
87  animation-iteration-count: infinite;
88  animation-duration: 2000ms;
89`,t6=(0,w.iv)`
90  opacity: ${({$visible:e})=>e?1:0};
91  transition: opacity 200ms ease-in;
92
93  @media screen and (prefers-reduced-motion: no-preference) {
94    ${({$animated:e})=>e?t4:(0,w.iv)`
95            background-color: var(--card-skeleton-color-from);
96          `}
97  }
98
99  @media screen and (prefers-reduced-motion: reduce) {
100    background-color: var(--card-skeleton-color-from);
101  }
102`,t9=(0,w.zo)(x.xu).withConfig({displayName:"StyledSkeleton",componentId:"sc-ebtpni-0"})(x.E5,t6),t8=(0,y.forwardRef)(function(e,t){let n,r,i,o,a,s,l;let u=(0,tA.c)(14);u[0]!==e?({animated:o,delay:n,radius:r,...i}=e,u[0]=e,u[1]=n,u[2]=r,u[3]=i,u[4]=o):(n=u[1],r=u[2],i=u[3],o=u[4]);let c=void 0!==o&&o,[d,h]=(0,y.useState)(!n);u[5]!==n?(a=()=>{if(!n)return h(!0);let e=setTimeout(()=>{h(!0)},n);return()=>{clearTimeout(e)}},s=[n],u[5]=n,u[6]=a,u[7]=s):(a=u[6],s=u[7]),(0,y.useEffect)(a,s);let f=(0,x.Q5)(r);return u[8]!==c||u[9]!==t||u[10]!==i||u[11]!==f||u[12]!==d?(l=(0,p.jsx)(t9,{...i,$animated:c,$radius:f,$visible:d,ref:t}),u[8]=c,u[9]=t,u[10]=i,u[11]=f,u[12]=d,u[13]=l):l=u[13],l});t8.displayName="ForwardRef(Skeleton)";let t7=(0,w.zo)(t8).withConfig({displayName:"StyledSkeleton",componentId:"sc-2p7a1v-0"})(e=>{let{$size:t,$style:n}=e,{font:r,media:i}=(0,tM.aQ)(e.theme),o=r[n];return(0,x.Lt)(i,t,e=>{let t=o.sizes[e];return{height:t.lineHeight-t.ascenderHeight-t.descenderHeight}})});(0,y.forwardRef)(function(e,t){let n,r,i;let o=(0,tA.c)(7);o[0]!==e?({size:r,...n}=e,o[0]=e,o[1]=n,o[2]=r):(n=o[1],r=o[2]);let a=(0,x.Q5)(void 0===r?2:r);return o[3]!==a||o[4]!==t||o[5]!==n?(i=(0,p.jsx)(t7,{...n,$size:a,ref:t,$style:"text"}),o[3]=a,o[4]=t,o[5]=n,o[6]=i):i=o[6],i}).displayName="ForwardRef(TextSkeleton)",(0,y.forwardRef)(function(e,t){let n,r,i;let o=(0,tA.c)(7);o[0]!==e?({size:r,...n}=e,o[0]=e,o[1]=n,o[2]=r):(n=o[1],r=o[2]);let a=(0,x.Q5)(void 0===r?2:r);return o[3]!==a||o[4]!==t||o[5]!==n?(i=(0,p.jsx)(t7,{...n,$size:a,ref:t,$style:"label"}),o[3]=a,o[4]=t,o[5]=n,o[6]=i):i=o[6],i}).displayName="ForwardRef(LabelSkeleton)",(0,y.forwardRef)(function(e,t){let n,r,i;let o=(0,tA.c)(7);o[0]!==e?({size:r,...n}=e,o[0]=e,o[1]=n,o[2]=r):(n=o[1],r=o[2]);let a=(0,x.Q5)(void 0===r?2:r);return o[3]!==a||o[4]!==t||o[5]!==n?(i=(0,p.jsx)(t7,{...n,$size:a,ref:t,$style:"heading"}),o[3]=a,o[4]=t,o[5]=n,o[6]=i):i=o[6],i}).displayName="ForwardRef(HeadingSkeleton)",(0,y.forwardRef)(function(e,t){let n,r,i;let o=(0,tA.c)(7);o[0]!==e?({size:r,...n}=e,o[0]=e,o[1]=n,o[2]=r):(n=o[1],r=o[2]);let a=(0,x.Q5)(void 0===r?2:r);return o[3]!==a||o[4]!==t||o[5]!==n?(i=(0,p.jsx)(t7,{...n,$size:a,ref:t,$style:"code"}),o[3]=a,o[4]=t,o[5]=n,o[6]=i):i=o[6],i}).displayName="ForwardRef(CodeSkeleton)",(0,y.forwardRef)(function(e,t){let n,r,i;let o=(0,tA.c)(9);o[0]!==e?({flex:n,...r}=e,o[0]=e,o[1]=n,o[2]=r):(n=o[1],r=o[2]);let a=void 0===e.tabIndex?0:e.tabIndex;return o[3]!==n||o[4]!==e.children||o[5]!==t||o[6]!==r||o[7]!==a?(i=(0,p.jsx)(x.xu,{"data-ui":"TabPanel",...r,flex:n,ref:t,role:"tabpanel",tabIndex:a,children:e.children}),o[3]=n,o[4]=e.children,o[5]=t,o[6]=r,o[7]=a,o[8]=i):i=o[8],i}).displayName="ForwardRef(TabPanel)";let ne={error:"critical",warning:"caution",success:"positive",info:"neutral"},nt={error:"critical",warning:"caution",success:"positive",info:"neutral"},nn=(0,w.zo)(x.kC).withConfig({displayName:"TextBox",componentId:"sc-1rr7rxo-0"})`overflow-x:auto;`,nr=(0,w.zo)(x.Zb).withConfig({displayName:"StyledToast",componentId:"sc-1rr7rxo-1"})`pointer-events:all;width:100%;position:relative;overflow:hidden;overflow:clip;&[data-has-duration]{padding-bottom:calc(${2}px / 2);}`,ni=w.zo.div.withConfig({displayName:"LoadingBar",componentId:"sc-1rr7rxo-2"})`display:flex;position:absolute;bottom:0px;top:0px;left:0px;right:0px;pointer-events:none;z-index:-1;overflow:hidden;overflow:clip;background:transparent;align-items:flex-end;will-change:opacity;`,no=(0,w.zo)(x.Zb).withConfig({displayName:"LoadingBarMask",componentId:"sc-1rr7rxo-3"})`position:absolute;top:0;left:-${2}px;right:-${2}px;bottom:${2}px;z-index:1;`,na=(0,w.zo)(x.Zb).withConfig({displayName:"LoadingBarProgress",componentId:"sc-1rr7rxo-4"})`display:block;height:100%;width:100%;transform-origin:0% 50%;background-color:${e=>{let{color:t}=(0,tM.aQ)(e.theme);return t.button.default[e.tone].enabled.bg}};`,ns={error:"alert",warning:"alert",success:"alert",info:"alert"},nl={initial:{y:32,scale:.5,zIndex:1},hidden:{opacity:0}
102,visible:e=>e?{opacity:1,transition:{when:"beforeChildren",staggerChildren:e/3,duration:e/3}}:{opacity:1},slideIn:{y:0,scale:1},slideOut:{zIndex:0,scale:.75}},nu={initial:{willChange:"transform"},hidden:{opacity:0},visible:{opacity:1}},nc=tP.E.create(nr),nd=tP.E.create(x.kC),nh=tP.E.create(x.xv),nf=tP.E.create(ni),np=tP.E.create(na);function nm(e){if("treeitem"===e.getAttribute("role")&&e.focus(),"none"===e.getAttribute("role")){let t=e.firstChild;t&&t instanceof HTMLElement&&t.focus()}}(0,x.tx)("@sanity/ui/context/toast",null),(0,w.zo)(x.rj).withConfig({displayName:"StyledLayer",componentId:"sc-1tbwn58-0"})`box-sizing:border-box;position:fixed;right:0;bottom:0;list-style:none;pointer-events:none;max-width:420px;width:100%;`;let ng=(0,x.tx)("@sanity/ui/context/tree",null);function ny(){let e=(0,y.useContext)(ng);if(!e)throw Error("Tree: missing context value");return e}(0,y.memo)((0,y.forwardRef)(function(e,t){let n,r,i,o,a,s,l,u,c,d,h,f,m,g,v,b,w,S,k,E,j;let C=(0,tA.c)(37);C[0]!==e?({children:n,space:o,onFocus:r,...i}=e,C[0]=e,C[1]=n,C[2]=r,C[3]=i,C[4]=o):(n=C[1],r=C[2],i=C[3],o=C[4]);let _=void 0===o?1:o,T=(0,y.useRef)(null),[A,M]=(0,y.useState)(null),P=(0,y.useRef)(A);C[5]===Symbol.for("react.memo_cache_sentinel")?(a=[],C[5]=a):a=C[5];let R=a;C[6]===Symbol.for("react.memo_cache_sentinel")?(s=[],C[6]=s):s=C[6];let[I,O]=(0,y.useState)(s);C[7]===Symbol.for("react.memo_cache_sentinel")?(l={},C[7]=l):l=C[7];let[$,D]=(0,y.useState)(l),L=(0,y.useRef)($);C[8]===Symbol.for("react.memo_cache_sentinel")?(u=()=>T.current,C[8]=u):u=C[8],(0,y.useImperativeHandle)(t,u),C[9]!==A?(c=()=>{P.current=A},d=[A],C[9]=A,C[10]=c,C[11]=d):(c=C[10],d=C[11]),(0,y.useEffect)(c,d),C[12]!==$?(h=()=>{L.current=$},f=[$],C[12]=$,C[13]=h,C[14]=f):(h=C[13],f=C[14]),(0,y.useEffect)(h,f),C[15]===Symbol.for("react.memo_cache_sentinel")?(m=(e,t,n,r)=>(D(r=>({...r,[t]:{element:e,expanded:n}})),r&&M(e),()=>{D(e=>{let n={...e};return delete n[t],n})}),C[15]=m):m=C[15];let z=m;C[16]===Symbol.for("react.memo_cache_sentinel")?(g=(e,t)=>{D(n=>{let r=n[e];return r?{...n,[e]:{...r,expanded:t}}:n})},C[16]=g):g=C[16];let V=g,N=A||I[0]||null;C[17]!==_||C[18]!==$||C[19]!==N?(v={version:0,focusedElement:N,level:0,path:R,registerItem:z,setExpanded:V,setFocusedElement:M,space:_,state:$},C[17]=_,C[18]=$,C[19]=N,C[20]=v):v=C[20];let F=v;C[21]!==I?(b=e=>{if(P.current){if("ArrowDown"===e.key){e.preventDefault();let t=function(e,t,n){let r=t.indexOf(n),i=t.slice(r),o=t.length;for(let t=1;t<o;t+=1){if(!i[t])continue;let n=i[t].getAttribute("data-tree-key");if(!n)continue;let r=n.split("/");r.pop();let o=[],a=!0;for(let t=0;t<r.length;t+=1){o.push(r[t]);let n=o.join("/");if(!e[n]?.expanded){a=!1;break}}if(a)return i[t]}return null}(L.current,I,P.current);t&&(nm(t),M(t));return}if("ArrowUp"===e.key){e.preventDefault();let t=function(e,t,n){let r=t.indexOf(n),i=t.slice(0,r),o=i.length;for(let t=o-1;t>=0;t-=1){let n=i[t].getAttribute("data-tree-key");if(!n)continue;let r=n.split("/");r.pop();let o=[],a=!0;for(let t=0;t<r.length;t+=1){o.push(r[t]);let n=o.join("/");if(!e[n]?.expanded){a=!1;break}}if(a)return i[t]}return null}(L.current,I,P.current);t&&(nm(t),M(t));return}if("ArrowLeft"===e.key){e.preventDefault();let t=P.current.getAttribute("data-tree-key");if(!t)return;let n=L.current[t];if(!n)return;if(n.expanded)D(e=>{let n=e[t];return n?{...e,[t]:{...n,expanded:!1}}:e});else{let e=t.split("/");e.pop();let n=e.join("/"),r=n&&L.current[n];r&&(r.element.focus(),M(r.element))}return}if("ArrowRight"===e.key){e.preventDefault();let t=P.current.getAttribute("data-tree-key");if(!t)return;L.current[t]?.expanded||D(e=>{let n=e[t];return n?{...e,[t]:{...n,expanded:!0}}:e});return}}},C[21]=I,C[22]=b):b=C[22];let B=b;C[23]!==r?(w=e=>{M(e.target),r?.(e)},C[23]=r,C[24]=w):w=C[24];let U=w;return C[25]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{T.current&&O(Array.from(T.current.querySelectorAll('[data-ui="TreeItem"]')))},C[25]=S):S=C[25],C[26]!==n?(k=[n],C[26]=n,C[27]=k):k=C[27],(0,y.useEffect)(S,k),C[28]!==n||C[29]!==U||C[30]!==B||C[31]!==i||C[32]!==_?(E=(0,p.jsx)(x.Kq,{as:"ul","data-ui":"Tree",...i,onFocus:U,onKeyDown:B,ref:T,role:"tree",space:_,children:n}),C[28]=n,C[29]=U,C[30]=B,C[31]=i,C[32]=_,C[33]=E):E=C[33],C[34]!==F||C[35]!==E?(j=(0,p.jsx)(ng.Provider,{value:F,children:E}),C[34]=F,C[35]=E,C[36]=j):j=C[36],j})).displayName="Memo(ForwardRef(Tree))";let nv=(0,y.memo)(function(e){let t,n,r,i;let o=(0,tA.c)(9);o[0]!==e?({children:t,expanded:r,...n}=e,o[0]=e,o[1]=t,o[2]=n,o[3]=r):(t=o[1],n=o[2],r=o[3]);let a=void 0!==r&&r,s=ny(),l=!a;
102return o[4]!==t||o[5]!==n||o[6]!==l||o[7]!==s.space?(i=(0,p.jsx)(x.Kq,{as:"ul","data-ui":"TreeGroup",...n,hidden:l,marginTop:s.space,role:"group",space:s.space,children:t}),o[4]=t,o[5]=n,o[6]=l,o[7]=s.space,o[8]=i):i=o[8],i}),nb=(0,y.memo)(w.zo.li.withConfig({displayName:"StyledTreeItem",componentId:"sc-iiskig-0"})(function(){return(0,w.iv)`
103    &[role='none'] > [role='treeitem'] {
104      outline: none;
105      cursor: default;
106      border-radius: 3px;
107
108      background-color: var(--card-bg-color);
109      color: var(--treeitem-fg-color);
110
111      &:focus {
112        position: relative;
113      }
114    }
115
116    &[role='treeitem'] {
117      outline: none;
118
119      & > div {
120        cursor: default;
121        border-radius: 3px;
122
123        background-color: var(--card-bg-color);
124        color: var(--treeitem-fg-color);
125      }
126
127      &:focus > div {
128        position: relative;
129      }
130    }
131  `},function(e){let{color:t}=(0,tM.aQ)(e.theme),n=t.selectable.default;return(0,w.iv)`
132    &[role='none'] {
133      & > [role='treeitem'] {
134        ${(0,x.gG)(t,n.enabled)}
135      }
136
137      &[data-selected] > [role='treeitem'] {
138        ${(0,x.gG)(t,n.pressed)}
139      }
140
141      @media (hover: hover) {
142        &:not([data-selected]) > [role='treeitem']:not(:focus):hover {
143          ${(0,x.gG)(t,n.hovered)}
144        }
145
146        & > [role='treeitem']:focus {
147          ${(0,x.gG)(t,n.selected)}
148        }
149      }
150    }
151
152    &[role='treeitem'] {
153      & > [data-ui='TreeItem__box'] {
154        ${(0,x.gG)(t,n.enabled)}
155      }
156
157      &[data-selected] > [data-ui='TreeItem__box'] {
158        ${(0,x.gG)(t,n.pressed)}
159      }
160
161      @media (hover: hover) {
162        &:not([data-selected]):not(:focus) > [data-ui='TreeItem__box']:hover {
163          ${(0,x.gG)(t,n.hovered)}
164        }
165
166        &:focus > [data-ui='TreeItem__box'] {
167          ${(0,x.gG)(t,n.selected)}
168        }
169      }
170    }
171  `})),nx=(0,w.zo)(x.xu).attrs({forwardedAs:"a"}).withConfig({displayName:"TreeItemBox",componentId:"sc-iiskig-1"})(function(e){let{$level:t}=e,{space:n}=(0,tM.aQ)(e.theme);return(0,w.iv)`
172    padding-left: ${(0,x.hO)(n[2]*t)};
173
174    &[data-as='a'] {
175      text-decoration: none;
176    }
177  `}),nw=(0,w.zo)(x.xv).withConfig({displayName:"ToggleArrowText",componentId:"sc-iiskig-2"})`& > svg{transition:transform 100ms;}`;(0,y.memo)(function(e){let{children:t,expanded:n=!1,fontSize:r=1,href:i,icon:o,id:a,linkAs:s,muted:l,onClick:u,padding:c=2,selected:d=!1,space:h=2,text:f,weight:m,...g}=e,v=(0,y.useRef)(null),b=(0,y.useRef)(null),w=ny(),{path:S,registerItem:k,setExpanded:E,setFocusedElement:j}=w,C=(0,y.useId)(),_=a||C,T=(0,y.useMemo)(()=>S.concat([_||""]),[_,S]),A=T.join("/"),M=w.state[A],P=w.focusedElement===v.current,R=M?.expanded===void 0?n:M?.expanded||!1,I=w.focusedElement&&w.focusedElement===v.current?0:-1,O=(0,y.useMemo)(()=>({...w,level:w.level+1,path:T}),[T,w]),$=(0,y.useCallback)(e=>{u&&u(e);let t=e.target;t instanceof HTMLElement&&("TreeItem"===t.getAttribute("data-ui")||t.closest('[data-ui="TreeItem__box"]'))&&(e.stopPropagation(),E(A,!R),j(v.current))},[R,A,u,E,j]),D=(0,y.useCallback)(e=>{P&&"Enter"===e.key&&(b.current||v.current)?.click()},[P]);(0,y.useEffect)(()=>{if(v.current)return k(v.current,T.join("/"),R,d)},[R,T,k,d]);let L=(0,p.jsxs)(x.kC,{padding:c,children:[(0,p.jsxs)(x.xu,{marginRight:h,style:{visibility:o||t?"visible":"hidden",pointerEvents:"none"},children:[o&&(0,p.jsx)(x.xv,{muted:l,size:r,weight:m,children:(0,p.jsx)(o,{})}),!o&&(0,p.jsx)(nw,{muted:l,size:r,weight:m,children:(0,p.jsx)(e9.tgp,{style:{transform:R?"rotate(90deg)":void 0}})})]}),(0,p.jsx)(x.xu,{flex:1,children:(0,p.jsx)(x.xv,{muted:l,size:r,textOverflow:"ellipsis",weight:m,children:f})})]});return i?(0,p.jsxs)(nb,{"data-selected":d?"":void 0,"data-tree-id":_,"data-tree-key":A,"data-ui":"TreeItem",...g,onClick:$,ref:v,role:"none",children:[(0,p.jsx)(nx,{$level:w.level,"aria-expanded":R,as:s,"data-ui":"TreeItem__box",href:i,ref:b,role:"treeitem",tabIndex:I,children:L}),(0,p.jsx)(ng.Provider,{value:O,children:t&&(0,p.jsx)(nv,{hidden:!R,children:t})})]}):(0,p.jsxs)(nb,{"data-selected":d?"":void 0,"data-ui":"TreeItem","data-tree-id":_,"data-tree-key":A,...g,"aria-expanded":R,onClick:$,onKeyDown:D,ref:v,role:"treeitem",tabIndex:I,children:[(0,p.jsx)(nx,{$level:w.level,as:"div","data-ui":"TreeItem__box",children:L}),(0,p.jsx)(ng.Provider,{value:O,children:t&&(0,p.jsx)(nv,{expanded:R,children:t})})]})}).displayName="Memo(TreeItem)";let nS=e=>"object"==typeof e&&null!=e&&1===e.nodeType,nk=(e,t)=>
177(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,nE=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return nk(n.overflowY,t)||nk(n.overflowX,t)||(e=>{let t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},nj=(e,t,n,r,i,o,a,s)=>o<e&&a>t||o>e&&a<t?0:o<=e&&s<=n||a>=t&&s>=n?o-e-r:a>t&&s<n||o<e&&s>n?a-t+i:0,nC=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t},n_=(e,t)=>{var n,r,i,o;if("undefined"==typeof document)return[];let{scrollMode:a,block:s,inline:l,boundary:u,skipOverflowHiddenElements:c}=t,d="function"==typeof u?u:e=>e!==u;if(!nS(e))throw TypeError("Invalid target");let h=document.scrollingElement||document.documentElement,f=[],p=e;for(;nS(p)&&d(p);){if((p=nC(p))===h){f.push(p);break}null!=p&&p===document.body&&nE(p)&&!nE(document.documentElement)||null!=p&&nE(p,c)&&f.push(p)}let m=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,g=null!=(o=null==(i=window.visualViewport)?void 0:i.height)?o:innerHeight,{scrollX:y,scrollY:v}=window,{height:b,width:x,top:w,right:S,bottom:k,left:E}=e.getBoundingClientRect(),{top:j,right:C,bottom:_,left:T}=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e),A="start"===s||"nearest"===s?w-j:"end"===s?k+_:w+b/2-j+_,M="center"===l?E+x/2-T+C:"end"===l?S+C:E-T,P=[];for(let e=0;e<f.length;e++){let t=f[e],{height:n,width:r,top:i,right:o,bottom:u,left:c}=t.getBoundingClientRect();if("if-needed"===a&&w>=0&&E>=0&&k<=g&&S<=m&&(t===h&&!nE(t)||w>=i&&k<=u&&E>=c&&S<=o))break;let d=getComputedStyle(t),p=parseInt(d.borderLeftWidth,10),j=parseInt(d.borderTopWidth,10),C=parseInt(d.borderRightWidth,10),_=parseInt(d.borderBottomWidth,10),T=0,R=0,I="offsetWidth"in t?t.offsetWidth-t.clientWidth-p-C:0,O="offsetHeight"in t?t.offsetHeight-t.clientHeight-j-_:0,$="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,D="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(h===t)T="start"===s?A:"end"===s?A-g:"nearest"===s?nj(v,v+g,g,j,_,v+A,v+A+b,b):A-g/2,R="start"===l?M:"center"===l?M-m/2:"end"===l?M-m:nj(y,y+m,m,p,C,y+M,y+M+x,x),T=Math.max(0,T+v),R=Math.max(0,R+y);else{T="start"===s?A-i-j:"end"===s?A-u+_+O:"nearest"===s?nj(i,u,n,j,_+O,A,A+b,b):A-(i+n/2)+O/2,R="start"===l?M-c-p:"center"===l?M-(c+r/2)+I/2:"end"===l?M-o+C+I:nj(c,o,r,p,C+I,M,M+x,x);let{scrollLeft:e,scrollTop:a}=t;T=0===D?0:Math.max(0,Math.min(a+T/D,t.scrollHeight-n/D+O)),R=0===$?0:Math.max(0,Math.min(e+R/$,t.scrollWidth-r/$+I)),A+=a-T,M+=e-R}P.push({el:t,top:T,left:R})}return P},nT=e=>!1===e?{block:"end",inline:"nearest"}:e===Object(e)&&0!==Object.keys(e).length?e:{block:"start",inline:"nearest"};var nA=n(47647),nM=n(36813),nP=n(76024),nR=n(66177),nI=n(78847);function nO(e){let[t,n]=e;return[t,n]}function n$(e,t){let n=e,r=t,i=n.length,o=r.length;if(0===i||0===o)return 0;i>o?n=n.substring(i-o):i<o&&(r=r.substring(0,i));let a=Math.min(i,o);if(n===r)return a;let s=0,l=1;for(let e=0;-1!==e;){let t=n.substring(a-l);if(-1===(e=r.indexOf(t)))break;l+=e,(0===e||n.substring(a-l)===r.substring(0,l))&&(s=l,l++)}return s}function nD(e,t){if(!e||!t||e[0]!==t[0])return 0;let n=0,r=Math.min(e.length,t.length),i=r,o=0;for(;n<i;)e.substring(o,i)===t.substring(o,i)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function nL(e,t){if(!e||!t||e[e.length-1]!==t[t.length-1])return 0;let n=0,r=Math.min(e.length,t.length),i=r,o=0;for(;n<i;)e.substring(e.length-i,e.length-o)===t.substring(t.length-i,t.length-o)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function nz(e){let t=e.charCodeAt(0);return t>=56320&&t<=57343}function nV(e,t,n,r,i){let o=e.substring(0,n),a=t.substring(0,r),s=e.substring(n),l=t.substring(r),u=nq(o,a,{checkLines:!1,deadline:i}),c=nq(s,l,{checkLines:!1,deadline:i});return u.concat(c)}function nN(e,t,n){let r=e.slice(n,n+Math.floor(e.length/4)),i=-1,o="",a,s,l,u;for(;-1!==(i=t.indexOf(r,i+1));){let r=nD(e.slice(n),t.slice(i)),c=nL(e.slice(0,n),t.slice(0,i));o.length<c+r&&(o=t.slice(i-c,i)+t.slice(i,i+r),a=e.slice(0,n-c),s=e.slice(n+r),l=t.slice(0,i-c),u=t.slice(i+r))}return 2*o.length>=e.length?[a||"",s||"",l||"",u||"",o||""]:null}var nF=Object.defineProperty,nB=Object.getOwnPropertySymbols,nU=Object.prototype.hasOwnProperty,nH=Object.prototype.propertyIsEnumerable,nW=(e,t,n
177)=>t in e?nF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nG=(e,t)=>{for(var n in t||(t={}))nU.call(t,n)&&nW(e,n,t[n]);if(nB)for(var n of nB(t))nH.call(t,n)&&nW(e,n,t[n]);return e};function nY(e,t,n){var r,i;let o;if(null===e||null===t)throw Error("Null input. (diff)");let a=nq(e,t,nG({checkLines:!0,deadline:(i=(r=n||{}).timeout||1,o=1,"u">typeof i&&(o=i<=0?Number.MAX_VALUE:i),Date.now()+1e3*o)},r));return function(e){for(let t=0;t<e.length;t++){let[n,r]=e[t];if(0===r.length)continue;let i=r[0];(function(e){let t=e.charCodeAt(0);return t>=55296&&t<=56319})(r[r.length-1])&&0===n&&nX(e,t,1),nz(i)&&0===n&&nX(e,t,-1)}for(let t=0;t<e.length;t++)0===e[t][1].length&&e.splice(t,1)}(a),a}function nq(e,t,n){let r=e,i=t;if(r===i)return r?[[0,r]]:[];let o=nD(r,i),a=r.substring(0,o);o=nL(r=r.substring(o),i=i.substring(o));let s=r.substring(r.length-o),l=function(e,t,n){let r;if(!e)return[[1,t]];if(!t)return[[-1,e]];let i=e.length>t.length?e:t,o=e.length>t.length?t:e,a=i.indexOf(o);if(-1!==a)return r=[[1,i.substring(0,a)],[0,o],[1,i.substring(a+o.length)]],e.length>t.length&&(r[0][0]=-1,r[2][0]=-1),r;if(1===o.length)return[[-1,e],[1,t]];let s=function(e,t,n=1){let r,i,o,a,s;if(n<=0)return null;let l=e.length>t.length?e:t,u=e.length>t.length?t:e;if(l.length<4||2*u.length<l.length)return null;let c=nN(l,u,Math.ceil(l.length/4)),d=nN(l,u,Math.ceil(l.length/2));if(c&&d)r=c[4].length>d[4].length?c:d;else{if(!c&&!d)return null;d?c||(r=d):r=c}if(!r)throw Error("Unable to find a half match.");return e.length>t.length?(i=r[0],o=r[1],a=r[2],s=r[3]):(a=r[0],s=r[1],i=r[2],o=r[3]),[i,o,a,s,r[4]]}(e,t);if(s){let e=s[0],t=s[1],r=s[2],i=s[3],o=s[4],a=nq(e,r,n),l=nq(t,i,n);return a.concat([[0,o]],l)}return n.checkLines&&e.length>100&&t.length>100?function(e,t,n){let r=e,i=t,o=function(e,t){let n=[],r={};function i(e){let t="",i=0,a=-1,s=n.length;for(;a<e.length-1;){-1===(a=e.indexOf(`
178`,i))&&(a=e.length-1);let l=e.slice(i,a+1);(r.hasOwnProperty?r.hasOwnProperty(l):void 0!==r[l])?t+=String.fromCharCode(r[l]):(s===o&&(l=e.slice(i),a=e.length),t+=String.fromCharCode(s),r[l]=s,n[s++]=l),i=a+1}return t}n[0]="";let o=4e4,a=i(e);return o=65535,{chars1:a,chars2:i(t),lineArray:n}}(r,i);r=o.chars1,i=o.chars2;let a=o.lineArray,s=nq(r,i,{checkLines:!1,deadline:n.deadline});(function(e,t){for(let n=0;n<e.length;n++){let r=e[n][1],i=[];for(let e=0;e<r.length;e++)i[e]=t[r.charCodeAt(e)];e[n][1]=i.join("")}})(s,a),(s=nQ(s)).push([0,""]);let l=0,u=0,c=0,d="",h="";for(;l<s.length;){switch(s[l][0]){case 1:c++,h+=s[l][1];break;case -1:u++,d+=s[l][1];break;case 0:if(u>=1&&c>=1){s.splice(l-u-c,u+c),l=l-u-c;let e=nq(d,h,{checkLines:!1,deadline:n.deadline});for(let t=e.length-1;t>=0;t--)s.splice(l,0,e[t]);l+=e.length}c=0,u=0,d="",h="";break;default:throw Error("Unknown diff operation.")}l++}return s.pop(),s}(e,t,n):function(e,t,n){let r=e.length,i=t.length,o=Math.ceil((r+i)/2),a=2*o,s=Array(a),l=Array(a);for(let e=0;e<a;e++)s[e]=-1,l[e]=-1;s[o+1]=0,l[o+1]=0;let u=r-i,c=u%2!=0,d=0,h=0,f=0,p=0;for(let m=0;m<o&&!(Date.now()>n);m++){for(let f=-m+d;f<=m-h;f+=2){let p;let g=o+f,y=(p=f===-m||f!==m&&s[g-1]<s[g+1]?s[g+1]:s[g-1]+1)-f;for(;p<r&&y<i&&e.charAt(p)===t.charAt(y);)p++,y++;if(s[g]=p,p>r)h+=2;else if(y>i)d+=2;else if(c){let i=o+u-f;if(i>=0&&i<a&&-1!==l[i]&&p>=r-l[i])return nV(e,t,p,y,n)}}for(let d=-m+f;d<=m-p;d+=2){let h;let g=o+d,y=(h=d===-m||d!==m&&l[g-1]<l[g+1]?l[g+1]:l[g-1]+1)-d;for(;h<r&&y<i&&e.charAt(r-h-1)===t.charAt(i-y-1);)h++,y++;if(l[g]=h,h>r)p+=2;else if(y>i)f+=2;else if(!c){let i=o+u-d;if(i>=0&&i<a&&-1!==s[i]){let a=s[i],l=o+a-i;if(a>=(h=r-h))return nV(e,t,a,l,n)}}}}return[[-1,e],[1,t]]}(e,t,n.deadline)}(r=r.substring(0,r.length-o),i=i.substring(0,i.length-o),n);return a&&l.unshift([0,a]),s&&l.push([0,s]),l=n4(l)}function nZ(e,t,n){return 1===n?e+t:t+e}function nK(e,t){return 1===t?[e.substring(0,e.length-1),e[e.length-1]]:[e.substring(1),e[0]]}function nX(e,t,n){var r,i;let o=1===n?-1:1,a=null,s=null,l=t+n;for(;l>=0&&l<e.length&&(null===a||null===s);l+=n){let[r,i]=e[l];if(0!==i.length){if(1===r){null===a&&(a=l);continue}if(-1===r){null===s&&(s=l);continue}if(0===r){if(null===a&&null===s){let[r,i]=nK(e[t][1],n);e[t][1]=r,e[l][1]=nZ(e[l][1],i,o);return}break}}}if(null!==a&&null!==s&&(r=a,i=s,1===n?e[r][1][e[r][1].length-1]===e[i][1][e[i][1].length-1]:e[r][1][0]===e[i][1][0])){let[r,i]=nK(e[a][1],o),[l]=nK(e[s][1],o);e[a][1]=r,e[s][1]=l,e[t][1]=nZ(e[t][1],i,n);return}let[u,c]=nK(e[t][1],n);e[t][1]=u,null===a?(e.splice(l,0,[1,c]),null!==s&&s>=l&&s++):e[a][1]=nZ(e[a][1],c,o),null===s?e.splice(l,0,[-1,c]):e[s][1]=nZ(e[s][1],c,o)}function nQ(e){let t=e.map(e=>nO(e)),n=!1,r=[],i=0,o=null,a=0,s=0,l=0,u=0,c=0;for(;a<t.length;)0===t[a][0]?(r[i++]=a,s=u,l=c,u=0,c=0,o=t[a][1]):(1===t[a][0]?u+=t[a][1].length:c+=t[a][1].length,o&&o.length<=Math.max(s,l)&&o.length<=Math.max(u,c)&&(t.splice(r[i-1],0,[-1,o]),t[r[i-1]+1][0]=1,i--,a=--i>0?r[i-1]:-1,s=0,l=0,u=0,c=0,o=null,n=!0)),a++;for(n&&(t=n4(t)),t=n3(t),a=1;a<t.length;
178){if(-1===t[a-1][0]&&1===t[a][0]){let e=t[a-1][1],n=t[a][1],r=n$(e,n),i=n$(n,e);r>=i?(r>=e.length/2||r>=n.length/2)&&(t.splice(a,0,[0,n.substring(0,r)]),t[a-1][1]=e.substring(0,e.length-r),t[a+1][1]=n.substring(r),a++):(i>=e.length/2||i>=n.length/2)&&(t.splice(a,0,[0,e.substring(0,i)]),t[a-1][0]=1,t[a-1][1]=n.substring(0,n.length-i),t[a+1][0]=-1,t[a+1][1]=e.substring(i),a++),a++}a++}return t}let nJ=/[^a-zA-Z0-9]/,n0=/\s/,n1=/[\r\n]/,n2=/\n\r?\n$/,n5=/^\r?\n\r?\n/;function n3(e){let t=e.map(e=>nO(e));function n(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),i=n.match(nJ),o=r.match(nJ),a=i&&n.match(n0),s=o&&r.match(n0),l=a&&n.match(n1),u=s&&r.match(n1),c=l&&e.match(n2),d=u&&t.match(n5);return c||d?5:l||u?4:i&&!a&&s?3:a||s?2:i||o?1:0}let r=1;for(;r<t.length-1;){if(0===t[r-1][0]&&0===t[r+1][0]){let e=t[r-1][1],i=t[r][1],o=t[r+1][1],a=nL(e,i);if(a){let t=i.substring(i.length-a);e=e.substring(0,e.length-a),i=t+i.substring(0,i.length-a),o=t+o}let s=e,l=i,u=o,c=n(e,i)+n(i,o);for(;i.charAt(0)===o.charAt(0);){e+=i.charAt(0),i=i.substring(1)+o.charAt(0),o=o.substring(1);let t=n(e,i)+n(i,o);t>=c&&(c=t,s=e,l=i,u=o)}t[r-1][1]!==s&&(s?t[r-1][1]=s:(t.splice(r-1,1),r--),t[r][1]=l,u?t[r+1][1]=u:(t.splice(r+1,1),r--))}r++}return t}function n4(e){let t=e.map(e=>nO(e));t.push([0,""]);let n=0,r=0,i=0,o="",a="",s;for(;n<t.length;)switch(t[n][0]){case 1:i++,a+=t[n][1],n++;break;case -1:r++,o+=t[n][1],n++;break;case 0:r+i>1?(0!==r&&0!==i&&(0!==(s=nD(a,o))&&(n-r-i>0&&0===t[n-r-i-1][0]?t[n-r-i-1][1]+=a.substring(0,s):(t.splice(0,0,[0,a.substring(0,s)]),n++),a=a.substring(s),o=o.substring(s)),0!==(s=nL(a,o))&&(t[n][1]=a.substring(a.length-s)+t[n][1],a=a.substring(0,a.length-s),o=o.substring(0,o.length-s))),n-=r+i,t.splice(n,r+i),o.length&&(t.splice(n,0,[-1,o]),n++),a.length&&(t.splice(n,0,[1,a]),n++),n++):0!==n&&0===t[n-1][0]?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,i=0,r=0,o="",a="";break;default:throw Error("Unknown diff operation")}""===t[t.length-1][1]&&t.pop();let l=!1;for(n=1;n<t.length-1;)0===t[n-1][0]&&0===t[n+1][0]&&(t[n][1].substring(t[n][1].length-t[n-1][1].length)===t[n-1][1]?(t[n][1]=t[n-1][1]+t[n][1].substring(0,t[n][1].length-t[n-1][1].length),t[n+1][1]=t[n-1][1]+t[n+1][1],t.splice(n-1,1),l=!0):t[n][1].substring(0,t[n+1][1].length)===t[n+1][1]&&(t[n-1][1]+=t[n+1][1],t[n][1]=t[n][1].substring(t[n+1][1].length)+t[n+1][1],t.splice(n+1,1),l=!0)),n++;return l&&(t=n4(t)),t}var n6=Object.defineProperty,n9=Object.getOwnPropertySymbols,n8=Object.prototype.hasOwnProperty,n7=Object.prototype.propertyIsEnumerable,re=(e,t,n)=>t in e?n6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rt=(e,t)=>{for(var n in t||(t={}))n8.call(t,n)&&re(e,n,t[n]);if(n9)for(var n of n9(t))n7.call(t,n)&&re(e,n,t[n]);return e};let rn={threshold:.5,distance:1e3};function rr(e,t,n,r={}){if(null===e||null===t||null===n)throw Error("Null input. (match())");let i=Math.max(0,Math.min(n,e.length));return e===t?0:e.length?e.substring(i,i+t.length)===t?i:function(e,t,n,r={}){if(t.length>32)throw Error("Pattern too long for this browser.");let i=rt(rt({},rn),r),o=function(e){let t={};for(let n=0;n<e.length;n++)t[e.charAt(n)]=0;for(let n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t}(t);function a(e,r){let o=e/t.length,a=Math.abs(n-r);return i.distance?o+a/i.distance:a?1:o}let s=i.threshold,l=e.indexOf(t,n);-1!==l&&(s=Math.min(a(0,l),s),-1!==(l=e.lastIndexOf(t,n+t.length))&&(s=Math.min(a(0,l),s)));let u=1<<t.length-1;l=-1;let c,d,h=t.length+e.length,f=[];for(let r=0;r<t.length;r++){for(c=0,d=h;c<d;)a(r,n+d)<=s?c=d:h=d,d=Math.floor((h-c)/2+c);h=d;let i=Math.max(1,n-d+1),p=Math.min(n+d,e.length)+t.length,m=Array(p+2);m[p+1]=(1<<r)-1;for(let t=p;t>=i;t--){let c=o[e.charAt(t-1)];if(0===r?m[t]=(m[t+1]<<1|1)&c:m[t]=(m[t+1]<<1|1)&c|((f[t+1]|f[t])<<1|1)|f[t+1],m[t]&u){let e=a(r,t-1);if(e<=s){if(s=e,(l=t-1)>n)i=Math.max(1,2*n-l);else break}}}if(a(r+1,n)>s)break;f=m}return l}(e,t,i,r):-1}function ri(e){let t=[];for(let n=0;n<e.length;n++)1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")}function ro(e){let t=[];for(let n=0;n<e.length;n++)-1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")}function ra(e,t){let n=0,r=0,i=0,o=0,a;for(a=0;a<e.length&&(1!==e[a][0]&&(n+=e[a][1].length),-1!==e[a][0]&&(r+=e[a][1].length),!(n>t));a++)i=n,o=r;return e.length!==a&&-1===e[a][0]?o:o+(t-i)}function rs(e){let t=0;for(let n=0;n<e.length;n++){let r=e.codePointAt(n);if(typeof r>"u")throw Error("Failed to get codepoint");t+=rl(r)}return t}function rl(e){return e<=127?1:e<=2047?2:e<=65535?3:4}function ru(e,t){return{diffs:[],start1:e,start2:t,utf8Start1:e,utf8Start2:t,length1:0,length2:0,utf8Length1:0,utf8Length2:0}}var rc=Object.defineProperty,rd=Object.getOwnPropertySymbols,rh=Object.prototype.hasOwnProperty,rf=Object.prototype.propertyIsEnumerable,rp=(e,t,n)=>t in e?rc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rm=(e,t)=>
178{for(var n in t||(t={}))rh.call(t,n)&&rp(e,n,t[n]);if(rd)for(var n of rd(t))rf.call(t,n)&&rp(e,n,t[n]);return e};let rg={margin:4};function ry(e={}){return rm(rm({},rg),e)}function rv(e,t,n){if(0===t.length)return[];let r=[],i=ru(0,0),o=0,a=0,s=0,l=0,u=0,c=e,d=e;for(let e=0;e<t.length;e++){let h=t[e],[f,p]=h,m=p.length,g=rs(p);switch(o||0===f||(i.start1=a,i.start2=s,i.utf8Start1=l,i.utf8Start2=u),f){case 1:i.diffs[o++]=h,i.length2+=m,i.utf8Length2+=g,d=d.substring(0,s)+p+d.substring(s);break;case -1:i.length1+=m,i.utf8Length1+=g,i.diffs[o++]=h,d=d.substring(0,s)+d.substring(s+m);break;case 0:m<=2*n.margin&&o&&t.length!==e+1?(i.diffs[o++]=h,i.length1+=m,i.length2+=m,i.utf8Length1+=g,i.utf8Length2+=g):m>=2*n.margin&&o&&(rb(i,c,n),r.push(i),i=ru(-1,-1),o=0,c=d,a=s,l=u);break;default:throw Error("Unknown diff type")}1!==f&&(a+=m,l+=g),-1!==f&&(s+=m,u+=g)}return o&&(rb(i,c,n),r.push(i)),r}function rb(e,t,n){if(0===t.length)return;let r=t.substring(e.start2,e.start2+e.length1),i=0;for(;t.indexOf(r)!==t.lastIndexOf(r)&&r.length<32-n.margin-n.margin;)i+=n.margin,r=t.substring(e.start2-i,e.start2+e.length1+i);i+=n.margin;let o=e.start2-i;o>=1&&nz(t[o])&&o--;let a=t.substring(o,e.start2);a&&e.diffs.unshift([0,a]);let s=a.length,l=rs(a),u=e.start2+e.length1+i;u<t.length&&nz(t[u])&&u++;let c=t.substring(e.start2+e.length1,u);c&&e.diffs.push([0,c]);let d=c.length,h=rs(c);e.start1-=s,e.start2-=s,e.utf8Start1-=l,e.utf8Start2-=l,e.length1+=s+d,e.length2+=s+d,e.utf8Length1+=l+h,e.utf8Length2+=l+h}let rx=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;function rw(e){return parseInt(e,10)}function rS(e){let t,n,r;let{utf8Length1:i,utf8Length2:o,utf8Start1:a,utf8Start2:s,diffs:l}=e;t=0===i?`${a},0`:1===i?`${a+1}`:`${a+1},${i}`,n=0===o?`${s},0`:1===o?`${s+1}`:`${s+1},${o}`;let u=[`@@ -${t} +${n} @@
179`];for(let e=0;e<l.length;e++){switch(l[e][0]){case 1:r="+";break;case -1:r="-";break;case 0:r=" ";break;default:throw Error("Unknown patch operation.")}u[e+1]=`${r+encodeURI(l[e][1])}
180`}return u.join("").replace(/%20/g," ")}var rk="object"==typeof global&&global&&global.Object===Object&&global,rE="object"==typeof self&&self&&self.Object===Object&&self,rj=rk||rE||Function("return this")(),rC=rj.Symbol,r_=Object.prototype,rT=r_.hasOwnProperty,rA=r_.toString,rM=rC?rC.toStringTag:void 0,rP=function(e){var t=rT.call(e,rM),n=e[rM];try{e[rM]=void 0;var r=!0}catch(e){}var i=rA.call(e);return r&&(t?e[rM]=n:delete e[rM]),i},rR=Object.prototype.toString,rI=rC?rC.toStringTag:void 0,rO=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":rI&&rI in Object(e)?rP(e):rR.call(e)},r$=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},rD=function(e){if(!r$(e))return!1;var t=rO(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},rL=rj["__core-js_shared__"],rz=(o=/[^.]+$/.exec(rL&&rL.keys&&rL.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"",rV=Function.prototype.toString,rN=function(e){if(null!=e){try{return rV.call(e)}catch(e){}try{return e+""}catch(e){}}return""},rF=/^\[object .+?Constructor\]$/,rB=Object.prototype,rU=Function.prototype.toString,rH=rB.hasOwnProperty,rW=RegExp("^"+rU.call(rH).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),rG=function(e,t){var n,r=null==e?void 0:e[t];return r$(n=r)&&(!rz||!(rz in n))&&(rD(n)?rW:rF).test(rN(n))?r:void 0},rY=function(){try{var e=rG(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),rq=function(e,t,n){"__proto__"==t&&rY?rY(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},rZ=function(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r},rK=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var s=o[++r];if(!1===t(i[s],s,i))break}return e},rX=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},rQ=function(e){return null!=e&&"object"==typeof e},rJ=function(e){return rQ(e)&&"[object Arguments]"==rO(e)},r0=Object.prototype,r1=r0.hasOwnProperty,r2=r0.propertyIsEnumerable,r5=rJ(function(){return arguments}())?rJ:function(e){return rQ(e)&&r1.call(e,"callee")&&!r2.call(e,"callee")},r3=Array.isArray,r4="object"==typeof exports&&exports&&!exports.nodeType&&exports,r6=r4&&"object"==typeof module&&module&&!module.nodeType&&module,r9=r6&&r6.exports===r4?rj.Buffer:void 0,r8=(r9?r9.isBuffer:void 0)||function(){return!1},r7=/^(?:0|[1-9]\d*)$/,ie=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&r7.test(e))&&e>-1&&e%1==0&&e<t},it=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},ir={};
180ir["[object Float32Array]"]=ir["[object Float64Array]"]=ir["[object Int8Array]"]=ir["[object Int16Array]"]=ir["[object Int32Array]"]=ir["[object Uint8Array]"]=ir["[object Uint8ClampedArray]"]=ir["[object Uint16Array]"]=ir["[object Uint32Array]"]=!0,ir["[object Arguments]"]=ir["[object Array]"]=ir["[object ArrayBuffer]"]=ir["[object Boolean]"]=ir["[object DataView]"]=ir["[object Date]"]=ir["[object Error]"]=ir["[object Function]"]=ir["[object Map]"]=ir["[object Number]"]=ir["[object Object]"]=ir["[object RegExp]"]=ir["[object Set]"]=ir["[object String]"]=ir["[object WeakMap]"]=!1;var ii="object"==typeof exports&&exports&&!exports.nodeType&&exports,io=ii&&"object"==typeof module&&module&&!module.nodeType&&module,ia=io&&io.exports===ii&&rk.process,is=function(){try{var e=io&&io.require&&io.require("util").types;if(e)return e;return ia&&ia.binding&&ia.binding("util")}catch(e){}}(),il=is&&is.isTypedArray,iu=il?function(e){return il(e)}:function(e){return rQ(e)&&it(e.length)&&!!ir[rO(e)]},ic=Object.prototype.hasOwnProperty,id=function(e,t){var n=r3(e),r=!n&&r5(e),i=!n&&!r&&r8(e),o=!n&&!r&&!i&&iu(e),a=n||r||i||o,s=a?rX(e.length,String):[],l=s.length;for(var u in e)(t||ic.call(e,u))&&!(a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ie(u,l)))&&s.push(u);return s},ih=Object.prototype,ip=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ih)},im=(a=Object.keys,s=Object,function(e){return a(s(e))}),ig=Object.prototype.hasOwnProperty,iy=function(e){if(!ip(e))return im(e);var t=[];for(var n in Object(e))ig.call(e,n)&&"constructor"!=n&&t.push(n);return t},iv=function(e){return null!=e&&it(e.length)&&!rD(e)},ib=function(e){return iv(e)?id(e):iy(e)},ix=(l=function(e,t){return e&&rK(e,t,ib)},function(e,t){if(null==e)return e;if(!iv(e))return l(e,t);for(var n=e.length,r=-1,i=Object(e);(u?r--:++r<n)&&!1!==t(i[r],r,i););return e}),iw=function(e,t){return e===t||e!=e&&t!=t},iS=function(e,t){for(var n=e.length;n--;)if(iw(e[n][0],t))return n;return -1},ik=Array.prototype.splice;function iE(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}iE.prototype.clear=function(){this.__data__=[],this.size=0},iE.prototype.delete=function(e){var t=this.__data__,n=iS(t,e);return!(n<0)&&(n==t.length-1?t.pop():ik.call(t,n,1),--this.size,!0)},iE.prototype.get=function(e){var t=this.__data__,n=iS(t,e);return n<0?void 0:t[n][1]},iE.prototype.has=function(e){return iS(this.__data__,e)>-1},iE.prototype.set=function(e,t){var n=this.__data__,r=iS(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var ij=rG(rj,"Map"),iC=rG(Object,"create"),i_=Object.prototype.hasOwnProperty,iT=Object.prototype.hasOwnProperty;function iA(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}iA.prototype.clear=function(){this.__data__=iC?iC(null):{},this.size=0},iA.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},iA.prototype.get=function(e){var t=this.__data__;if(iC){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i_.call(t,e)?t[e]:void 0},iA.prototype.has=function(e){var t=this.__data__;return iC?void 0!==t[e]:iT.call(t,e)},iA.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=iC&&void 0===t?"__lodash_hash_undefined__":t,this};var iM=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},iP=function(e,t){var n=e.__data__;return iM(t)?n["string"==typeof t?"string":"hash"]:n.map};function iR(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function iI(e){var t=this.__data__=new iE(e);this.size=t.size}function iO(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new iR;++t<n;)this.add(e[t])}iR.prototype.clear=function(){this.size=0,this.__data__={hash:new iA,map:new(ij||iE),string:new iA}},iR.prototype.delete=function(e){var t=iP(this,e).delete(e);return this.size-=t?1:0,t},iR.prototype.get=function(e){return iP(this,e).get(e)},iR.prototype.has=function(e){return iP(this,e).has(e)},iR.prototype.set=function(e,t){var n=iP(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},iI.prototype.clear=function(){this.__data__=new iE,this.size=0},iI.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},iI.prototype.get=function(e){return this.__data__.get(e)},iI.prototype.has=function(e){return this.__data__.has(e)},iI.prototype.set=function(e,t){var n=this.__data__;if(n instanceof iE){var r=n.__data__;if(!ij||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new iR(r)}return n.set(e,t),this.size=n.size,this},iO.prototype.add=iO.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},iO.prototype.has=function(e){return this.__data__.has(e)};var i$=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}
180,iD=function(e,t,n,r,i,o){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var d=-1,h=!0,f=2&n?new iO:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var p=e[d],m=t[d];if(r)var g=a?r(m,p,d,t,e,o):r(p,m,d,e,t,o);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!i$(t,function(e,t){if(!f.has(t)&&(p===e||i(p,e,n,r,o)))return f.push(t)})){h=!1;break}}else if(!(p===m||i(p,m,n,r,o))){h=!1;break}}return o.delete(e),o.delete(t),h},iL=rj.Uint8Array,iz=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n},iV=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n},iN=rC?rC.prototype:void 0,iF=iN?iN.valueOf:void 0,iB=function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!o(new iL(e),new iL(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return iw(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=iz;case"[object Set]":var l=1&r;if(s||(s=iV),e.size!=t.size&&!l)break;var u=a.get(e);if(u)return u==t;r|=2,a.set(e,t);var c=iD(s(e),s(t),r,i,o,a);return a.delete(e),c;case"[object Symbol]":if(iF)return iF.call(e)==iF.call(t)}return!1},iU=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},iH=function(e,t,n){var r=t(e);return r3(e)?r:iU(r,n(e))},iW=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o},iG=Object.prototype.propertyIsEnumerable,iY=Object.getOwnPropertySymbols,iq=iY?function(e){return null==e?[]:iW(iY(e=Object(e)),function(t){return iG.call(e,t)})}:function(){return[]},iZ=function(e){return iH(e,ib,iq)},iK=Object.prototype.hasOwnProperty,iX=function(e,t,n,r,i,o){var a=1&n,s=iZ(e),l=s.length;if(l!=iZ(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:iK.call(t,c)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var f=!0;o.set(e,t),o.set(t,e);for(var p=a;++u<l;){var m=e[c=s[u]],g=t[c];if(r)var y=a?r(g,m,c,t,e,o):r(m,g,c,e,t,o);if(!(void 0===y?m===g||i(m,g,n,r,o):y)){f=!1;break}p||(p="constructor"==c)}if(f&&!p){var v=e.constructor,b=t.constructor;v!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b)&&(f=!1)}return o.delete(e),o.delete(t),f},iQ=rG(rj,"DataView"),iJ=rG(rj,"Promise"),i0=rG(rj,"Set"),i1=rG(rj,"WeakMap"),i2="[object Map]",i5="[object Promise]",i3="[object Set]",i4="[object WeakMap]",i6="[object DataView]",i9=rN(iQ),i8=rN(ij),i7=rN(iJ),oe=rN(i0),ot=rN(i1),on=rO;(iQ&&on(new iQ(new ArrayBuffer(1)))!=i6||ij&&on(new ij)!=i2||iJ&&on(iJ.resolve())!=i5||i0&&on(new i0)!=i3||i1&&on(new i1)!=i4)&&(on=function(e){var t=rO(e),n="[object Object]"==t?e.constructor:void 0,r=n?rN(n):"";if(r)switch(r){case i9:return i6;case i8:return i2;case i7:return i5;case oe:return i3;case ot:return i4}return t});var or=on,oi="[object Arguments]",oo="[object Array]",oa="[object Object]",os=Object.prototype.hasOwnProperty,ol=function(e,t,n,r,i,o){var a=r3(e),s=r3(t),l=a?oo:or(e),u=s?oo:or(t);l=l==oi?oa:l,u=u==oi?oa:u;var c=l==oa,d=u==oa,h=l==u;if(h&&r8(e)){if(!r8(t))return!1;a=!0,c=!1}if(h&&!c)return o||(o=new iI),a||iu(e)?iD(e,t,n,r,i,o):iB(e,t,l,n,r,i,o);if(!(1&n)){var f=c&&os.call(e,"__wrapped__"),p=d&&os.call(t,"__wrapped__");
180if(f||p){var m=f?e.value():e,g=p?t.value():t;return o||(o=new iI),i(m,g,n,r,o)}}return!!h&&(o||(o=new iI),iX(e,t,n,r,i,o))},ou=function e(t,n,r,i,o){return t===n||(null!=t&&null!=n&&(rQ(t)||rQ(n))?ol(t,n,r,i,e,o):t!=t&&n!=n)},oc=function(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Object(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var l=(s=n[i])[0],u=e[l],c=s[1];if(a&&s[2]){if(void 0===u&&!(l in e))return!1}else{var d=new iI;if(r)var h=r(u,c,l,e,t,d);if(!(void 0===h?ou(c,u,3,r,d):h))return!1}}return!0},od=function(e){return e==e&&!r$(e)},oh=function(e){for(var t=ib(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,od(i)]}return t},of=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},op=function(e){var t=oh(e);return 1==t.length&&t[0][2]?of(t[0][0],t[0][1]):function(n){return n===e||oc(n,e,t)}},om=function(e){return"symbol"==typeof e||rQ(e)&&"[object Symbol]"==rO(e)},og=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,oy=/^\w*$/,ov=function(e,t){if(r3(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||om(e))||oy.test(e)||!og.test(e)||null!=t&&e in Object(t)};function ob(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ob.Cache||iR),n}ob.Cache=iR;var ox=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ow=/\\(\\)?/g,oS=(d=(c=ob(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ox,function(e,n,r,i){t.push(r?i.replace(ow,"$1"):n||e)}),t},function(e){return 500===d.size&&d.clear(),e})).cache,c),ok=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i},oE=1/0,oj=rC?rC.prototype:void 0,oC=oj?oj.toString:void 0,o_=function e(t){if("string"==typeof t)return t;if(r3(t))return ok(t,e)+"";if(om(t))return oC?oC.call(t):"";var n=t+"";return"0"==n&&1/t==-oE?"-0":n},oT=function(e,t){return r3(e)?e:ov(e,t)?[e]:oS(null==e?"":o_(e))},oA=1/0,oM=function(e){if("string"==typeof e||om(e))return e;var t=e+"";return"0"==t&&1/e==-oA?"-0":t},oP=function(e,t){t=oT(t,e);for(var n=0,r=t.length;null!=e&&n<r;)e=e[oM(t[n++])];return n&&n==r?e:void 0},oR=function(e,t,n){var r=null==e?void 0:oP(e,t);return void 0===r?n:r},oI=function(e,t){return null!=e&&t in Object(e)},oO=function(e,t,n){t=oT(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var a=oM(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&it(i)&&ie(a,i)&&(r3(e)||r5(e))},o$=function(e){return e},oD=function(e){var t;return ov(e)?(t=oM(e),function(e){return null==e?void 0:e[t]}):function(t){return oP(t,e)}},oL=function(e){if("function"==typeof e)return e;if(null==e)return o$;if("object"==typeof e){var t,n;return r3(e)?(t=e[0],n=e[1],ov(t)&&od(n)?of(oM(t),n):function(e){var r=oR(e,t);return void 0===r&&r===n?null!=e&&oO(e,t,oI):ou(n,r,3)}):op(e)}return oD(e)},oz=Object.prototype.hasOwnProperty,oV=(h=function(e,t,n){oz.call(e,n)?e[n].push(t):rq(e,n,[t])},function(e,t){return(r3(e)?rZ:function(e,t,n,r){return ix(e,function(e,i,o){t(r,e,n(e),o)}),r})(e,h,oL(t,2),{})});let oN=["Value","Copy","Blank","ReturnIntoArray","ReturnIntoObject","ReturnIntoObjectSameKey","PushField","PushElement","PushParent","Pop","PushFieldCopy","PushFieldBlank","PushElementCopy","PushElementBlank","ReturnIntoObjectPop","ReturnIntoObjectSameKeyPop","ReturnIntoArrayPop","ObjectSetFieldValue","ObjectCopyField","ObjectDeleteField","ArrayAppendValue","ArrayAppendSlice","StringAppendString","StringAppendSlice"];class oF{model;root;patch;i;inputStack;outputStack;constructor(e,t,n){this.model=e,this.root=t,this.patch=n,this.i=0,this.inputStack=[],this.outputStack=[]}read(){return this.patch[this.i++]}process(){for(this.inputStack.push({value:this.root}),this.outputStack.push({value:this.root});this.i<this.patch.length;){let e=this.read(),t=oN[e];if(!t)throw Error(`Unknown opcode: ${e}`);this[`process${t}`].apply(this)}let e=this.outputStack.pop();return this.finalizeOutput(e)}inputEntry(){return this.inputStack[this.inputStack.length-1]}inputKey(e,t){return e.keys||(e.keys=this.model.objectGetKeys(e.value).sort()),e.keys[t]}outputEntry(){return this.outputStack[this.outputStack.length-1]}outputArray(){let e=this.outputEntry();return e.writeValue||(e.writeValue=this.model.copyArray(e.value)),e.writeValue}outputObject(){let e=this.outputEntry();return e.writeValue||(e.writeValue=this.model.copyObject(e.value)),e.writeValue}outputString(){let e=this.outputEntry();return e.writeValue||(e.writeValue=this.model.copyString(e.value)),e.writeValue}finalizeOutput(e){return e.writeValue?this.model.finalize(e.writeValue):e.value}processValue(){let e=this.model.wrap(this.read());this.outputStack.push({value:e})}processCopy(){let e=this.inputEntry();this.outputStack.push({value:e.value})}processBlank(){this.outputStack.push({value:null})}processReturnIntoArray(){let e=this.outputStack.pop(),t=this.finalizeOutput(e),n=this.outputArray();this.model.arrayAppendValue(n,t)}processReturnIntoObject(){let e=this.read(),t=this.outputStack.pop(),n=this.finalizeOutput(t);n=this.model.markChanged(n);let r=this.outputObject();this.model.objectSetField(r,e,n)}processReturnIntoObjectSameKey(){let e=this.inputEntry(),t=this.outputStack.pop(),n=this.finalizeOutput(t),r=this.outputObject();this.model.objectSetField(r,e.key,n)}processPushField(){let e=this.read(),t=this.inputEntry(),n=this.inputKey(t,e),r=this.model.objectGetField(t.value,n);this.inputStack.push({value:r,key:n})}processPushElement(){let e=this.read(),t=this.inputEntry(),n=this.model.arrayGetElement(t.value,e);this.inputStack.push({value:n})}processPop(){this.inputStack.pop()}processPushFieldCopy(){this.processPushField(),this.processCopy()}processPushFieldBlank(){this.processPushField(),this.processBlank()}processPushElementCopy(){this.processPushElement(),this.processCopy()}processPushElementBlank(){this.processPushElement(),this.processBlank()}processReturnIntoObjectPop(){this.processReturnIntoObject(),this.processPop()}processReturnIntoObjectSameKeyPop(){this.processReturnIntoObjectSameKey(),this.processPop()}processReturnIntoArrayPop(){this.processReturnIntoArray(),this.processPop()}processObjectSetFieldValue(){this.processValue(),this.processReturnIntoObject()}processObjectCopyField(){this.processPushField(),this.processCopy(),this.processReturnIntoObjectSameKey(),this.processPop()}processObjectDeleteField(){let e=this.read(),t=this.inputEntry(),n=this.inputKey(t,e),r=this.outputObject();this.model.objectDeleteField(r,n)}processArrayAppendValue(){let e=this.model.wrap(this.read()),t=this.outputArray();this.model.arrayAppendValue(t,e)}processArrayAppendSlice(){let e=this.read(),t=this.read(),n=this.outputArray(),r=this.inputEntry().value;this.model.arrayAppendSlice(n,r,e,t)}processStringAppendString(){let e=this.model.wrap(this.read()),t=this.outputString();this.model.stringAppendValue(t,e)}processStringAppendSlice(){let e=this.read(),t=this.read(),n=this.outputString(),r=this.inputEntry().value;this.model.stringAppendSlice(n,r,e,t)}}function oB(e,t,n=0){let r=n,i=0;for(i=n;r<t;i++){var o;let t=(o=e.codePointAt(i))>>
18016?4:o>>11?3:o>>7?2:1;4===t&&i++,r+=t}return i}class oU{wrap(e){return e}finalize(e){return Array.isArray(e)?e:e.data}markChanged(e){return e}objectGetKeys(e){return Object.keys(e)}objectGetField(e,t){return e[t]}arrayGetElement(e,t){return e[t]}copyObject(e){let t={type:"object",data:{}};if(null!==e)for(let[n,r]of Object.entries(e))t.data[n]=r;return t}copyArray(e){return null===e?[]:e.slice()}copyString(e){return{type:"string",data:null===e?"":e}}objectSetField(e,t,n){e.data[t]=n}objectDeleteField(e,t){delete e.data[t]}arrayAppendValue(e,t){e.push(t)}arrayAppendSlice(e,t,n,r){e.push(...t.slice(n,r))}stringAppendSlice(e,t,n,r){let i=oB(t,n),o=oB(t,r,i);e.data+=t.slice(i,o)}stringAppendValue(e,t){e.data+=t}}var oH=n(31717),oW=n(82668),oG=n(23326),oY=n(49256),oq=n(82217),oZ=n(81578),oK=n(80486),oX=1,oQ={};function oJ(e){return e in oQ&&(delete oQ[e],!0)}var o0=function(e){var t=oX++;return oQ[t]=!0,f||(f=Promise.resolve()),f.then(function(){return oJ(t)&&e()}),t},o1=function(e){oJ(e)},o2={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=o2.delegate;return((null==n?void 0:n.setImmediate)||o0).apply(void 0,(0,oZ.ev)([],(0,oZ.CR)(e)))},clearImmediate:function(e){var t=o2.delegate;return((null==t?void 0:t.clearImmediate)||o1)(e)},delegate:void 0},o5=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return(0,oZ.ZT)(t,e),t.prototype.requestAsyncId=function(t,n,r){return(void 0===r&&(r=0),null!==r&&r>0)?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=o2.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,n,r){if(void 0===r&&(r=0),null!=r?r>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var i,o=t.actions;null!=n&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==n&&(o2.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))},t}(oK.o),o3=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,oZ.ZT)(t,e),t.prototype.flush=function(e){this._active=!0;var t,n=this._scheduled;this._scheduled=void 0;var r=this.actions;e=e||r.shift();do if(t=e.execute(e.state,e.delay))break;while((e=r[0])&&e.id===n&&r.shift());if(this._active=!1,t){for(;(e=r[0])&&e.id===n&&r.shift();)e.unsubscribe();throw t}},t}(n(42354).v))(o5),o4=n(16764),o6=n(6403),o9=n(59923);function o8(e){if("patch"===e.type)return e.id;if("create"===e.type)return e.document._id;if("delete"===e.type)return e.id;if("createIfNotExists"===e.type||"createOrReplace"===e.type)return e.document._id;throw Error("Invalid mutation type")}let o7=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};function ae(e){return"string"==typeof e?._key}function at(e){return"object"==typeof e&&"_key"in e&&"string"==typeof e._key}function an(e){return"number"==typeof e||at(e)}function ar(e,t){if(0===e.length)return t;let n=t;for(let t of e){if(an(t)){if(!Array.isArray(n))return;if(at(t)){n=n.find(e=>e._key===t._key);continue}n=n[t];continue}n=n[t]}return n}let ai=/^[a-z_$]+/;function ao(e){return e.map((e,t)=>{var n;return n=0===t,Array.isArray(e)?`[${e[0]}:${e[1]||""}]`:"number"==typeof e?`[${e}]`:at(e)?`[_key==${JSON.stringify(e._key)}]`:"string"==typeof e&&ai.test(e)?n?e:`.${e}`:`['${e}']`}).join("")}function aa(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function as(e,t){if("number"==typeof t)return function(e,t){if(0===e&&(-1===t||0===t))return 0;let n=t<0?e+t:t;return n>=e||n<0?null:n}(e.length,t);if(at(t)){let n=e.findIndex(e=>(null!==e&&"object"==typeof e&&"string"==typeof e._key&&e._key||null)===t._key);return -1===n?null:n}throw Error(`Expected path segment to be addressing a single array item either by numeric index or by '_key'. Instead saw ${JSON.stringify(t)}`)}function al(e,t,n,r){let i=e.slice();return i.splice(t,n,...r||[]),i}function au(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "insert()" on non-array value');let n=as(t,e.referenceItem);if(null===n)throw Error(`Found no matching array element to insert ${e.position}`);return 0===t.length?e.items:al(t,"before"===e.position?n:n+1,0,e.items)}let ac=Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty);var ad=Object.freeze({__proto__:null,assign:function(e,t){if(!aa(t))throw TypeError('Cannot apply "assign()" on non-object value');return!function(e){for(let t in e)if(ac(e,t))return!1;return!0}(e.value)?{...t,...e.value}:t},dec:function(e,t){if("number"!=typeof t)throw TypeError('Cannot apply "dec()" on non-numeric value');return t-e.amount},diffMatchPatch:function(e,t){if("string"!=typeof t)throw TypeError('Cannot apply "diffMatchPatch()" on non-string value');return function(e,t,n={}){if("string"==typeof e)throw Error("Patches must be an array - pass the patch to `parsePatch()` first");let r=t;if(0===e.length)return[r,[]];let i=function(e,t,n={}){let r=0,i=0;function o(e){for(;r<e;){let e=t.codePointAt(i);if(typeof e>"u")return i;r+=rl(e),e>65535?i+=2:i+=1}if(!n.allowExceedingIndices&&r!==e)throw Error("Failed to determine byte offset");return i}let a=[];for(let t of e)a.push({diffs:t.diffs.map(e=>nO(e)),start1:o(t.start1),start2:o(t.start2),utf8Start1:t.utf8Start1,utf8Start2:t.utf8Start2,length1:t.length1,length2:t.length2,utf8Length1:t.utf8Length1,utf8Length2:t.utf8Length2});return a}(e,r,{allowExceedingIndices:n.allowExceedingIndices}),o=n.margin||4,a=n.deleteThreshold||.4,s=function(e,t=4){let n="";for(let e=1;e<=t;e++)n+=String.fromCharCode(e);for(let n of e)n.start1+=t,n.start2+=t,n.utf8Start1+=t,n.utf8Start2+=t;let r=e[0],i=r.diffs;if(0===i.length||0!==i[0][0])i.unshift([0,n]),r.start1-=t,r.start2-=t,r.utf8Start1-=t,r.utf8Start2-=t,r.length1+=t,r.length2+=t,r.utf8Length1+=t,r.utf8Length2+=t;else if(t>i[0][1].length){let e=i[0][1].length,o=t-e;i[0][1]=n.substring(e)+i[0][1],r.start1-=o,r.start2-=o,r.utf8Start1-=o,r.utf8Start2-=o,r.length1+=o,r.length2+=o,r.utf8Length1+=o,r.utf8Length2+=o}if(0===(i=(r=e[e.length-1]).diffs).length||0!==i[i.length-1][0])i.push([0,n]),r.length1+=t,r.length2+=t,r.utf8Length1+=t,r.utf8Length2+=t;else if(t>i[i.length-1][1].length){let e=t-i[i.length-1][1].length;i[i.length-1][1]+=n.substring(0,e),r.length1+=e,r.length2+=e,r.utf8Length1+=e,r.utf8Length2+=e}return n}(i,o);r=s+r+s,function(e,t=4){for(let n=0;n<e.length;n++){if(e[n].length1<=32)continue;let r=e[n];e.splice(n--,1);let i=r.start1,o=r.start2,a="";for(;0!==r.diffs.length;){let s=ru(i-a.length,o-a.length),l=!0;if(""!==a){let e=rs(a);s.length1=a.length,s.utf8Length1=e,s.length2=a.length,s.utf8Length2=e,s.diffs.push([0,a])}for(;0!==r.diffs.length&&s.length1<32-t;){let e=r.diffs[0][0],n=r.diffs[0][1],a=rs(n);if(1===e){s.length2+=n.length,s.utf8Length2+=a,o+=n.length;let e=r.diffs.shift();e&&s.diffs.push(e),l=!1}else -1===e&&1===s.diffs.length&&0===s.diffs[0][0]&&n.length>64?(s.length1+=n.length,s.utf8Length1+=a,i+=n.length,l=!1,s.diffs.push([e,n]),r.diffs.shift()):(a=rs(n=n.substring(0,32-s.length1-t)),s.length1+=n.length,s.utf8Length1+=a,i+=n.length,0===e?(s.length2+=n.length,s.utf8Length2+=a,o+=n.length):l=!1,s.diffs.push([e,n]),n===r.diffs[0][1]?r.diffs.shift():r.diffs[0][1]=r.diffs[0][1].substring(n.length))}a=(a=ro(s.diffs)).substring(a.length-t);let u=ri(r.diffs).substring(0,t),c=rs(u);""!==u&&(s.length1+=u.length,s.length2+=u.length,s.utf8Length1+=c,s.utf8Length2+=c,0!==s.diffs.length&&0===s.diffs[s.diffs.length-1][0]?s.diffs[s.diffs.length-1][1]+=u:s.diffs.push([0,u])),l||e.splice(++n,0,s)}}}(i,o);let l=0,u=[];for(let e=0;e<i.length;e++){let t=i[e].start2+l,n=ri(i[e].diffs),o,s=-1;if(n.length>32?-1!==(o=rr(r,n.substring(0,32),t))&&(-1===(s=rr(r,n.substring(n.length-32),t+n.length-32))||o>=s)&&(o=-1):o=rr(r,n,t),-1===o)u[e]=!1,l-=i[e].length2-i[e].length1;else{let c;if(u[e]=!0,l=o-t,c=-1===s?r.substring(o,o+n.length):r.substring(o,s+32),n===c)r=r.substring(0,o)+ro(i[e].diffs)+r.substring(o+n.length);else{let t=nY(n,c,{checkLines:!1});if(n.length>32&&function(e){let t=0,n=0,r=0;for(let i=0;i<e.length;i++){let o=e[i][0],a=e[i][1];switch(o){case 1:n+=a.length;break;case -1:r+=a.length;break;case 0:t+=Math.max(n,r),n=0,r=0;break;default:throw Error("Unknown diff operation.")}}return t+Math.max(n,r)}(t)/n.length>a)u[e]=!1;else{t=n3(t);let n=0,a=0;for(let s=0;s<i[e].diffs.length;s++){let l=i[e].diffs[s];0!==l[0]&&(a=ra(t,n)),1===l[0]?r=r.substring(0,o+a)+l[1]+r.substring(o+a):-1===l[0]&&(r=r.substring(0,o+a)+r.substring(o+ra(t,n+l[1].length))),-1!==l[0]&&(n+=l[1].length)}}}}}return[r=r.substring(s.length,r.length-s.length),u]}(function(e){if(!e)return[];let t=[],n=e.split(`
181`),r=0;for(;r<n.length;){let e=n[r].match(rx);if(!e)throw Error(`Invalid patch string: ${n[r]}`);let i=ru(rw(e[1]),rw(e[3]));for(t.push(i),""===e[2]?(i.start1--,i.utf8Start1--,i.length1=1,i.utf8Length1=1):"0"===e[2]?(i.length1=0,i.utf8Length1=0):(i.start1--,i.utf8Start1--,i.utf8Length1=rw(e[2]),i.length1=i.utf8Length1),""===e[4]?(i.start2--,i.utf8Start2--,i.length2=1,i.utf8Length2=1):"0"===e[4]?(i.length2=0,i.utf8Length2=0):(i.start2--,i.utf8Start2--,i.utf8Length2=rw(e[4]),i.length2=i.utf8Length2),r++;r<n.length;){let e;let t=n[r],o=t.charAt(0);if("@"===o)break;if(""===o){r++;continue}try{e=decodeURI(t.slice(1))}catch(e){throw Error(`Illegal escape in parse: ${t}`)}let a=rs(e)-e.length;if("-"===o)i.diffs.push([-1,e]),i.length1-=a;else if("+"===o)i.diffs.push([1,e]),i.length2-=a;else if(" "===o)i.diffs.push([0,e]),i.length1-=a,i.length2-=a;else throw Error(`Invalid patch mode "${o}" in: ${e}`);r++}}return t}(e.value),t)[0]},inc:function(e,t){if("number"!=typeof t)throw TypeError('Cannot apply "inc()" on non-numeric value');return t+e.amount},insert:au,remove:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "remove()" on non-array value');let n=as(t,e.referenceItem);if(null===n)throw Error("Found no matching array element to replace");return al(t,n,1,[])},replace:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "replace()" on non-array value');let n=as(t,e.referenceItem);if(null===n)throw Error("Found no matching array element to replace");return al(t,n,e.items.length,e.items)},set:function(e,t){return e.value},setIfMissing:function(e,t){return t??e.value},truncate:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "truncate()" on non-array value');return"number"==typeof e.endIndex?t.slice(0,e.startIndex).concat(t.slice(e.endIndex)):t.slice(0,e.startIndex)},unassign:function(e,t){if(!aa(t))throw TypeError('Cannot apply "unassign()" on non-object value');return 0===e.keys.length?t:function(e,t){let n={...e};for(let e of t)delete n[e];return n}(t,e.keys)},unset:function(e){},upsert:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "upsert()" on non-array value');
181if(0===e.items.length)return t;let n=[],r=[];if(e.items.forEach((e,i)=>{let o=t.findIndex(t=>t?._key===e._key);o>=0?n[o]=i:r.push(e)}),0===n.length&&0==r.length)return t;let i=[...t];for(let t of n)i[t]=e.items[n[t]];return au({type:"insert",items:r,referenceItem:e.referenceItem,position:e.position},i)}});function ah(e,t){return e.reduce((e,t)=>af(t,e),t)}function af(e,t){return function e(t,n,r){if(!(t.length>0))return function(e,t){if(!(e.type in ad))throw Error(`Invalid operation type: "${e.type}"`);return ad[e.type](e,t)}(n,r);let[i,...o]=t;if(an(i)&&Array.isArray(r))return function(t,n,r,i){let o=as(i,t);if(null===o||-1===o)return i;let a=i[o],s=e(n,r,a);return s===a?i:al(i,o,1,[s])}(i,o,n,r);if("string"==typeof i&&aa(r))return function(t,n,r,i){let o=i[t];if(void 0===o&&n.length>0)return i;let a=e(n,r,o);return a===o?i:{...i,[t]:a}}(i,o,n,r);throw Error(`Cannot apply operation of type "${n.type}" to path ${ao(t)} on ${typeof r} value`)}(e.path,e.op,t)}function ap(e){return"_id"in e}function am(e,t){return t.reduce((e,t)=>{let n=ag(e,t);if("error"===n.status)throw Error(n.message);return"noop"===n.status?e:n.after},e)}function ag(e,t){if("create"===t.type)return function(e,t){var n;if(e)return{status:"error",message:"Document already exist"};let r=ap(n=t.document)?n:{...n,_id:o7()};return{status:"created",id:r._id,after:r}}(e,t);if("createIfNotExists"===t.type)return ap(t.document)?e?{status:"noop"}:{status:"created",id:t.document._id,after:t.document}:{status:"error",message:"Cannot createIfNotExists on document without _id"};if("delete"===t.type)return e?t.id!==e._id?{status:"error",message:"Delete mutation targeted wrong document"}:{status:"deleted",id:t.id,before:e,after:void 0}:{status:"noop"};if("createOrReplace"===t.type)return ap(t.document)?e?{status:"updated",id:t.document._id,before:e,after:t.document}:{status:"created",id:t.document._id,after:t.document}:{status:"error",message:"Cannot createIfNotExists on document without _id"};if("patch"===t.type)return function(e,t){if(!e)return{status:"error",message:"Cannot apply patch on nonexistent document"};let n=function(e,t){if(e.options?.ifRevision&&t._rev!==e.options.ifRevision)throw Error("Revision mismatch");if(e.id!==t._id)throw Error(`Document id mismatch. Refusing to apply mutation for document with id="${e.id}" on the given document with id="${t._id}"`);return ah(e.patches,t)}(t,e);return e===n?{status:"noop"}:{status:"updated",id:t.id,before:e,after:n}}(e,t);throw Error(`Invalid mutation type: ${t.type}`)}function ay(e,t,n){let r=[];for(let n of e.slice().reverse()){if(t(n))return r;r.push(n)}return r.reverse()}function av(e,t){return ao(e)===ao(t)}function ab(e,t){let n=e;return t.reduce((e,t)=>{let r=n;if(n=af(t,n),"set"===t.op.type&&"string"==typeof t.op.value){let n=ar(t.path,r);if("string"==typeof n){let r={...t,op:{type:"diffMatchPatch",value:(function(e,t,n){if("string"==typeof e&&"string"==typeof t){let n=nY(e,t,{checkLines:!0});return n.length>2&&(n=function(e,t=4){let n=e.map(e=>nO(e)),r=!1,i=[],o=0,a=null,s=0,l=!1,u=!1,c=!1,d=!1;for(;s<n.length;)0===n[s][0]?(n[s][1].length<t&&(c||d)?(i[o++]=s,l=c,u=d,a=n[s][1]):(o=0,a=null),c=!1,d=!1):(-1===n[s][0]?d=!0:c=!0,a&&(l&&u&&c&&d||a.length<t/2&&3===function(...e){return e.reduce((e,t)=>e+(t?1:0),0)}(l,u,c,d))&&(n.splice(i[o-1],0,[-1,a]),n[i[o-1]+1][0]=1,o--,a=null,l&&u?(c=!0,d=!0,o=0):(s=--o>0?i[o-1]:-1,c=!1,d=!1),r=!0)),s++;return r&&(n=n4(n)),n}(n=nQ(n))),rv(e,n,ry(void 0))}if(e&&Array.isArray(e)&&typeof t>"u")return rv(ri(e),e,ry(void 0));if("string"==typeof e&&t&&Array.isArray(t))return rv(e,t,ry(void 0));throw Error("Unknown call format to make()")})(n,t.op.value).map(rS).join("")}};return e.flatMap(e=>av(e.path,t.path)&&"diffMatchPatch"===e.op.type?[]:e).concat(r)}}return e.push(t),e},[])}function ax(e,t,n,r){let i=t,o=r.map(t=>{let n=t.mutations.flatMap(t=>{if(o8(t)!==e)return[];let n=i;return i=am(i,[t]),n&&"patch"===t.type?{type:"dmpified",mutation:{...t,dmpPatches:ab(n,t.patches),original:t.patches}}:t});return{...t,mutations:n}}),a=n;return o.map(t=>{let n=[];return t.mutations.forEach(t=>{if("dmpified"===t.type)try{a=ah(t.mutation.dmpPatches,a),n.push(t)}catch{console.warn("Failed to apply dmp patch, falling back to original");try{a=ah(t.mutation.original,a),n.push(t)}catch(t){throw Error(`Failed to apply patch for document "${e}": ${t.message}`)}}else a=am(a,[t])})}),[r.map(t=>({...t,mutations:t.mutations.map(t=>"patch"!==t.type||o8(t)!==e?t:{...t,patches:t.patches.map(e=>"set"!==e.op.type?e:{...e,op:{...e.op,value:ar(e.path,a)}})})})),a]}function aw(e){return function(e){if("create"===e.type||"createIfNotExists"===e.type||"createOrReplace"===e.type)return{[e.type]:e.document};if("delete"===e.type)return{delete:{id:e.id}};let t=e.options?.ifRevision;return e.patches.map(n=>({patch:{id:e.id,...t&&{ifRevisionID:t},...function(e){let{path:t,op:n}=e;if("unset"===n.type)return{unset:[ao(t)]};if("insert"===n.type)return{insert:{[n.position]:ao([...t,n.referenceItem]),items:n.items}};if("diffMatchPatch"===n.type)return{diffMatchPatch:{[ao(t)]:n.value}};if("inc"===n.type)return{inc:{[ao(t)]:n.amount}};if("dec"===n.type)return{dec:{[ao(t)]:n.amount}};if("set"===n.type||"setIfMissing"===n.type)return{[n.type]:{[ao(t)]:n.value}};if("truncate"===n.type){let e=[n.startIndex,"number"==typeof n.endIndex?n.endIndex:""].join(":");return{unset:[`${ao(t)}[${e}]`]}}if("upsert"===n.type)return{unset:n.items.map(e=>
181ao([...t,{_key:e._key}])),insert:{[n.position]:ao([...t,n.referenceItem]),items:n.items}};if("assign"===n.type)return{set:Object.fromEntries(Object.keys(n.value).map(e=>[ao(t.concat(e)),n.value[e]]))};if("unassign"===n.type)return{unset:n.keys.map(e=>ao(t.concat(e)))};if("replace"===n.type)return{insert:{replace:ao(t.concat(n.referenceItem)),items:n.items}};if("remove"===n.type)return{unset:[ao(t.concat(n.referenceItem))]};throw Error(`Unknown operation type ${n.type}`)}(n)}}))}(e)}function aS(e){let t=e.listen('*[!(_id in path("_.**"))]',{},{events:["welcome","mutation","reconnect"],includeResult:!1,includePreviousRevision:!1,visibility:"transaction",effectFormat:"mendoza",includeMutations:!1}).pipe((0,oH.B)({resetOnRefCountZero:!0})),n=t.pipe((0,oW.h)(e=>"reconnect"===e.type)),r=t.pipe((0,oW.h)(e=>"welcome"===e.type)),i=t.pipe((0,oW.h)(e=>"mutation"===e.type)),o=(0,nI.T)(r,n).pipe((0,oG.d)({bufferSize:1,refCount:!0})).pipe((0,oW.h)(e=>"welcome"===e.type));return(0,nI.T)(o,i,n)}let ak=(0,o4.cY)({types:{},actions:{"assign error to context":(0,o6.a)({error:({event:e})=>e}),"clear error from context":(0,o6.a)({error:void 0}),"connect to server-sent events":(0,nM.r)({type:"connect"}),"listen to server-sent events":(0,nM.b)("server-sent events",{id:"listener",input:({context:e})=>({listener:e.sharedListener||aS(e.client),id:e.id})}),"stop listening to server-sent events":(0,nM.s)("listener"),"buffer remote mutation events":(0,o6.a)({mutationEvents:({event:e,context:t})=>((0,o4.ZD)(e,"mutation"),[...t.mutationEvents,e])}),"restore stashed changes":(0,o6.a)({stagedChanges:({event:e,context:t})=>((0,o4.ZD)(e,"xstate.done.actor.submitTransactions"),t.stashedChanges),stashedChanges:[]}),"rebase fetched remote snapshot":(0,o9.e)(({enqueue:e})=>{e.assign(({event:e,context:t})=>{(0,o4.ZD)(e,"xstate.done.actor.getDocument");let n=t.remote,r=e.output,i=!1;for(let e of t.mutationEvents)e.effects?.apply&&(e.previousRev||"appear"===e.transition)&&(i||e.previousRev!==r?._rev||(i=!0),i&&(r=aE(r,e.effects.apply,e.resultRev)));t.cache&&(!t.cache.has(t.id)||t.cache.get(t.id)._rev!==r?._rev)&&t.cache.set(t.id,r);let[o,a]=ax(t.id,null===n?void 0:n,null===r?void 0:r,t.stagedChanges);return{remote:r,local:a,stagedChanges:o,mutationEvents:[]}}),e.sendParent(({context:e})=>({type:"rebased.remote",id:e.id,document:e.remote}))}),"apply mendoza patch":(0,o6.a)(({event:e,context:t})=>{(0,o4.ZD)(e,"mutation");let n=t.remote;if(e.transactionId===n?._rev)return{};let r=aE(n,e.effects.apply,e.resultRev);t.cache&&(!t.cache.has(t.id)||t.cache.get(t.id)._rev!==r?._rev)&&t.cache.set(t.id,r);let[i,o]=ax(t.id,null===n?void 0:n,null===r?void 0:r,t.stagedChanges);return{remote:r,local:o,stagedChanges:i}}),"increment fetch attempts":(0,o6.a)({fetchRemoteSnapshotAttempts:({context:e})=>e.fetchRemoteSnapshotAttempts+1}),"reset fetch attempts":(0,o6.a)({fetchRemoteSnapshotAttempts:0}),"increment submit attempts":(0,o6.a)({submitTransactionsAttempts:({context:e})=>e.submitTransactionsAttempts+1}),"reset submit attempts":(0,o6.a)({submitTransactionsAttempts:0}),"stage mutation":(0,o6.a)({stagedChanges:({event:e,context:t})=>((0,o4.ZD)(e,"mutate"),[...t.stagedChanges,{transaction:!1,mutations:e.mutations}])}),"stash mutation":(0,o6.a)({stashedChanges:({event:e,context:t})=>((0,o4.ZD)(e,"mutate"),[...t.stashedChanges,{transaction:!1,mutations:e.mutations}])}),"rebase local snapshot":(0,o9.e)(({enqueue:e})=>{e.assign({local:({event:e,context:t})=>{(0,o4.ZD)(e,"mutate");let n=new Map;return t.local&&n.set(t.id,t.local),function(e,t){e.forEach(e=>{("created"===e.status||"updated"===e.status)&&t.set(e.id,e.after),"deleted"===e.status&&t.delete(e.id)})}(function(e,t){let n=Object.create(null);for(let r of e){let e=o8(r);if(!e)throw Error("Unable to get document id from mutation");let i=n[e]?.after||t.get(e),o=ag(i,r);if("error"===o.status)throw Error(o.message);"noop"!==o.status&&("updated"===o.status||"created"===o.status||"deleted"===o.status)&&(e in n||(n[e]={before:i,after:void 0,muts:[]}),n[e].after=o.after)}return Object.entries(n).map(([e,{before:t,after:n,muts:r}])=>({id:e,status:n?t?"updated":"created":"deleted",mutations:r,before:t,after:n}))}(e.mutations,n),n),n.get(t.id)}}),e.sendParent(({context:e})=>({type:"rebased.local",id:e.id,document:e.local}))}),"send pristine event to parent":(0,o9.b)(({context:e})=>({type:"pristine",id:e.id})),"send sync event to parent":(0,o9.b)(({context:e})=>({type:"sync",id:e.id,document:e.remote})),"send mutation event to parent":(0,o9.b)(({context:e,event:t})=>((0,o4.ZD)(t,"mutation"),{type:"mutation",id:e.id,previousRev:t.previousRev,resultRev:t.resultRev,effects:t.effects}))},actors:{"server-sent events":(0,L.Y$)(({input:e})=>{let{listener:t,id:n}=e;return(0,oY.P)(()=>t).pipe((0,oW.h)(e=>"welcome"===e.type||"reconnect"===e.type||"mutation"===e.type&&e.documentId===n),(0,oq.Q)(o3))}),"fetch remote snapshot":(0,L.p4)(async({input:e,signal:t})=>{let{client:n,id:r}=e;return await n.getDocument(r,{signal:t}).catch(e=>{if(!(e instanceof Error&&"AbortError"===e.name))throw e})}),"submit mutations as transactions":(0,L.p4)(async({input:e,signal:t})=>{let{client:n,transactions:r}=e;for(let e of r){if(t.aborted)return;await n.dataRequest("mutate",{transactionId:e.id,mutations:e.mutations.flatMap(aw)},{visibility:"async",returnDocuments:!1,signal:t}).catch(e=>{if(!(e instanceof Error&&"AbortError"===e.name))throw e})}})},delays:{fetchRemoteSnapshotTimeout:({context:e})=>1e3*Math.pow(2,e.fetchRemoteSnapshotAttempts),submitTransactionsTimeout:({context:e})=>1e3*Math.pow(2,e.submitTransactionsAttempts)}}).createMachine({id:"document-mutator",context:({input:e})=>({client:e.client.withConfig({allowReconfigure:!1}),sharedListener:e.sharedListener,id:e.id,remote:void 0,local:void 0,mutationEvents:[],stagedChanges:[],stashedChanges:[],error:void 0,fetchRemoteSnapshotAttempts:0,submitTransactionsAttempts:0,cache:e.cache}),entry:["connect to server-sent events"],on:{mutate:{actions:["rebase local snapshot","stage mutation"]}},initial:"disconnected",states:{disconnected:{on:{connect:{target:"connecting",actions:["listen to server-sent events"]}}},connecting:{on:{welcome:"connected",reconnect:"reconnecting",error:"connectFailure"},tags:["busy"]},connectFailure:{on:{connect:{target:"connecting",actions:["listen to server-sent events"]}},entry:["stop listening to server-sent events","assign error to context"],exit:["clear error from context"],tags:["error"]},reconnecting:{on:{welcome:{target:"connected"},error:{target:"connectFailure"}},tags:["busy","error"]},connected:{on:{mutation:{actions:["buffer remote mutation events"]},reconnect:"reconnecting"},entry:["clear error from context"],initial:"loading",states:{loading:{invoke:{src:"fetch remote snapshot",id:"getDocument",input:({context:e})=>({client:e.client,id:e.id}),onError:{target:"loadFailure"},onDone:{target:"loaded",actions:["rebase fetched remote snapshot","reset fetch attempts"]}},tags:["busy"]},loaded:{entry:["send sync event to parent"],on:{mutation:{actions:["apply mendoza patch","send mutation event to parent"]}},initial:"pristine",states:{pristine:{on:{mutate:{actions:["rebase local snapshot","stage mutation"],target:"dirty"}},tags:["ready"]},dirty:{on:{submit:"submitting"},tags:["ready"]},submitting:{on:{mutate:{actions:["rebase local snapshot","stash mutation"]}},invoke:{src:"submit mutations as transactions",id:"submitTransactions",input:({context:e})=>{let t=new Map;return t.set(e.id,e.remote),{client:e.client,transactions:(function(e,t){let n=[],r=[];
181return e.forEach(e=>{t(e)?r.push(e):(r.length>0&&n.push(r),r=[],n.push([e]))}),r.length>0&&n.push(r),n})(e.stagedChanges,e=>!e.transaction).flatMap(e=>({...e[0],mutations:e.flatMap(e=>e.mutations)})).map(e=>({...e,mutations:Object.values(oV(e.mutations,o8)).flatMap(e=>{var t;return(0===(t=0===e.length?e:e.reduce((e,t)=>"delete"===t.type?[t]:(e.push(t),e),[])).length?t:t.reduce((e,t)=>("createIfNotExists"!==t.type?e.push(t):ay(e,e=>"delete"===e.type).find(e=>"createIfNotExists"===e.type)||e.push(t),e),[])).flat().reduce((e,t)=>{let n=e[e.length-1];return n&&"patch"!==n.type||"patch"!==t.type?e.concat(t):e.slice(0,-1).concat({...t,patches:(n?.patches||[]).concat(t.patches)})},[])})})).map(e=>({...e,mutations:e.mutations.map(e=>"patch"!==e.type?e:{...e,patches:e.patches.reduce((e,t)=>{if("unset"!==t.op.type)return e.push(t),e;let n=e.filter(e=>{var n,r;return n=t.path,r=e.path,!(n.length<=r.length&&n.every((e,t)=>{var n;return n=function(e,t){if(t<0||t>=e.length)throw Error("Index out of bounds");return e[t]}(r,t),ae(e)&&ae(n)?e._key===n._key:"number"==typeof e?Number(e)===Number(n):e===n}))});return n.push(t),n},[]).reduceRight((e,t)=>(e.find(e=>{var n,r;return n=e.op,("set"===(r=t.op).type||"unset"===r.type)&&("set"===n.type||"unset"===n.type)&&av(e.path,t.path)})||e.unshift(t),e),[]).reduce((e,t)=>("setIfMissing"!==t.op.type?e.push(t):ay(e,e=>"unset"===e.op.type).find(e=>"setIfMissing"===e.op.type&&av(e.path,t.path))||e.push(t),e),[])})})).map(e=>({...e,mutations:e.mutations.map((e,n)=>{var r;return"patch"===e.type&&(r=t.get(e.id))?{...e,patches:ab(r,e.patches)}:e})})).map(e=>e.transaction&&void 0!==e.id?{id:e.id,mutations:e.mutations}:{mutations:e.mutations})}},onError:{target:"submitFailure"},onDone:{target:"pristine",actions:["restore stashed changes","reset submit attempts","send pristine event to parent"]}},tags:["busy","ready"]},submitFailure:{exit:["clear error from context"],after:{submitTransactionsTimeout:{actions:["increment submit attempts"],target:"submitting"}},on:{retry:"submitting"},tags:["error","ready"]}}},loadFailure:{exit:["clear error from context"],after:{fetchRemoteSnapshotTimeout:{actions:["increment fetch attempts"],target:"loading"}},on:{retry:"loading"},tags:["error"]}}}}});function aE(e,t,n){var r;let i=(r=function(e){if(!e)return null;let{_rev:t,...n}=e;return n}(e),new oF(new oU,r,t).process());return i?Object.assign(i,{_rev:n}):null}let aj=e=>{let t=(0,L.p4)(async({input:t,signal:n})=>{let{id:r}=t,{snapshot:i}=await e.fetch("visual-editing/fetch-snapshot",{documentId:r},{signal:n});return i}),n=(0,L.p4)(async({input:t})=>{let{transactions:n}=t;for(let t of n){let n=R.encodeTransaction(t);return e.post("visual-editing/mutate",n)}});return ak.provide({actions:{"send sync event to parent":(0,o9.e)(({enqueue:e})=>{e.sendParent(({context:e})=>({type:"sync",id:e.id,document:e.remote})),e.emit(({context:e})=>({type:"ready",snapshot:e.local}))})},actors:{"fetch remote snapshot":t,"submit mutations as transactions":n}})},aC=(0,o4.cY)({types:{},actions:{"emit sync event":(0,o9.a)(({event:e})=>((0,o4.ZD)(e,"sync"),e)),"emit mutation event":(0,o9.a)(({event:e})=>((0,o4.ZD)(e,"mutation"),e)),"emit rebased event":(0,o9.a)(({event:e})=>((0,o4.ZD)(e,["rebased.local","rebased.remote"]),e)),"emit pristine event":(0,o9.a)(({event:e})=>((0,o4.ZD)(e,["pristine"]),e)),"add document actor":(0,o6.a)({documents:({context:e,event:t,spawn:n})=>{(0,o4.ZD)(t,"observe");let r=t.documentId;return e.documents[r]?e.documents:{...e.documents,[r]:n("documentMutatorMachine",{input
181:{id:r,client:e.client,sharedListener:e.sharedListener||aS(e.client)},id:r})}}}),"stop remote snapshot":(0,nM.s)(({context:e,event:t})=>((0,o4.ZD)(t,"unobserve"),e.documents[t.documentId])),"remove remote snapshot from context":(0,o6.a)({documents:({context:e,event:t})=>{if((0,o4.ZD)(t,"unobserve"),!e.documents[t.documentId])return e.documents;let{[t.documentId]:n,...r}=e.documents;return r}})},actors:{documentMutatorMachine:ak}}).createMachine({id:"dataset-mutator",context:({input:e})=>({documents:{},client:e.client,sharedListener:e.sharedListener}),on:{sync:{actions:["emit sync event"]},mutation:{actions:["emit mutation event"]},"rebased.*":{actions:["emit rebased event"]},pristine:{actions:["emit pristine event"]},observe:{actions:["add document actor"]},unobserve:{actions:["stop remote snapshot","remove remote snapshot from context"]}},initial:"pristine",states:{pristine:{}}}),a_=e=>aC.provide({actors:{documentMutatorMachine:aj(e)}}),aT=e=>{let t,n,r,i;let o=(0,m.c)(8),{comlink:a,history:s}=e;return o[0]!==a||o[1]!==s?(t=()=>a?.on("presentation/navigate",e=>{s?.update(e)}),n=[a,s],o[0]=a,o[1]=s,o[2]=t,o[3]=n):(t=o[2],n=o[3]),(0,y.useEffect)(t,n),o[4]!==a||o[5]!==s?(r=()=>{if(s)return s.subscribe(e=>{e.title=e.title||document.title,a?.post("visual-editing/navigate",e)})},i=[a,s],o[4]=a,o[5]=s,o[6]=r,o[7]=i):(r=o[6],i=o[7]),(0,y.useEffect)(r,i),null},aA=e=>{let t,n;let r=(0,m.c)(3),{comlink:i}=e;return r[0]!==i?(t=()=>{let e=()=>{i.post("visual-editing/meta",{title:document.title})},t=new MutationObserver(t=>{let[n]=t;"TITLE"===n.target.nodeName&&e()});return t.observe(document.head,{subtree:!0,characterData:!0,childList:!0}),e(),()=>t.disconnect()},n=[i],r[0]=i,r[1]=t,r[2]=n):(t=r[1],n=r[2]),(0,y.useEffect)(t,n),null};function aM(e){let t=new CustomEvent("sanity/dragEnd",{detail:e,cancelable:!0});window.dispatchEvent(t)}let aP=(0,y.createContext)(null);function aR(){let e=(0,y.useContext)(aP);if(!e)throw Error("Schema context is missing");return e}function aI(e,t,n,r){if(!e.type)throw Error("Node type is missing");return()=>t.patch(()=>(function(e,t,n){let{path:r,key:i}=ei(e);return[D(r,I([{_type:t,_key:er()}],n,{_key:i}))]})(e,n,r))}function aO(e){let{node:t,doc:n}=e;return n?[{type:"action",label:"Duplicate",icon:e9.TIy,action:function(e,t){if(!e.type)throw Error("Node type is missing");return()=>t.patch(async({getSnapshot:t})=>(function(e,t,n="after"){let{path:r,key:i}=ei(e);return[D(r,I({...Y(t,e.path),_key:er()},n,{_key:i}))]})(e,await t()))}(t,n),telemetryEvent:"Visual Editing Context Menu Item Duplicated"}]:[]}function a$(e){let{node:t,doc:n}=e;return n?[{type:"action",label:"Remove",icon:e9.HFL,action:function(e,t){if(!e.type)throw Error("Node type is missing");return()=>t.patch(async({getSnapshot:t})=>(function(e,t){let{path:n,key:r}=ei(e),i=Y(t,n).findIndex(e=>e._key===r);return[D(n,O(i,i+1))]})(e,await t()))}(t,n),telemetryEvent:"Visual Editing Context Menu Item Removed"}]:[]}async function aD(e,t=!0){let{node:n,doc:r}=e;if(!r)return[];let i=[],o=[],[a,s,l,u]=await Promise.all([eo(n,r,"previous"),eo(n,r,"next"),eo(n,r,"first"),eo(n,r,"last")]);return l.length&&o.push({type:"action",label:"To top",icon:e9.EI4,action:()=>r.patch(l),telemetryEvent:"Visual Editing Context Menu Item Moved"}),a.length&&o.push({type:"action",label:"Up",icon:e9.Hf3,action:()=>r.patch(a),telemetryEvent:"Visual Editing Context Menu Item Moved"}),s.length&&o.push({type:"action",label:"Down",icon:e9.veu,action:()=>r.patch(s),telemetryEvent:"Visual Editing Context Menu Item Moved"}),u.length&&o.push({type:"action",label:"To bottom",icon:e9.xEY,action:()=>r.patch(u),telemetryEvent:"Visual Editing Context Menu Item Moved"}),o.length&&(i.push({type:"group",label:"Move",icon:e9.fzI,items:o}),t&&i.push({type:"divider"})),i}async function aL(e){let{node:t,field:n,doc:r}=e,i=[];return i.push(...aO(e)),i.push(...a$(e)),i.push(...await aD(e)),i.push({type:"action",label:"Insert before",icon:e9.ySV,action:aI(t,r,n.name,"before"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}),i.push({type:"action",label:"Insert after",icon:e9.oty,action:aI(t,r,n.name,"after"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}),i}let az=e=>{let t,n,r,i,o;let a=(0,m.c)(12),{label:s,parent:l,width:u,onSelect:c,boundaryElement:d}=e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=["left-start","right","left","right-end","left-end","bottom","top"],a[0]=t):t=a[0],a[1]===Symbol.for("react.memo_cache_sentinel")?(n=[4,4,4,4],a[1]=n):n=a[1],a[2]!==d||a[3]!==u?(r={arrow:!1,constrainSize:!0,floatingBoundary:d,padding:0,placement:"right-start",fallbackPlacements:t,preventOverflow:!0,width:u,__unstable_margins:n},a[2]=d,a[3]=u,a[4]=r):r=a[4],a[5]!==c||a[6]!==l?(i=(0,p.jsx)(tj,{node:l,onSelect:c}
181),a[5]=c,a[6]=l,a[7]=i):i=a[7],a[8]!==s||a[9]!==r||a[10]!==i?(o=(0,p.jsx)(x.kS,{fontSize:1,icon:e9.oty,padding:2,popover:r,space:2,text:s,children:i}),a[8]=s,a[9]=r,a[10]=i,a[11]=o):o=a[11],o};async function aV(e){let{doc:t,node:n,parent:r}=e,i=[];if(i.push(...aO(e)),i.push(...a$(e)),i.push(...await aD(e)),r.options?.insertMenu){let e=(r.options.insertMenu||{}).views?.some(e=>"grid"===e.name)?0:void 0;i.push({type:"custom",component:({boundaryElement:i,sendTelemetry:o})=>(0,p.jsx)(az,{label:"Insert before",onSelect:e=>{aI(n,t,e.name,"before")(),o("Visual Editing Context Menu Item Inserted",null)},parent:r,width:e,boundaryElement:i})}),i.push({type:"custom",component:({boundaryElement:i,sendTelemetry:o})=>(0,p.jsx)(az,{label:"Insert after",onSelect:e=>{aI(n,t,e.name,"after")(),o("Visual Editing Context Menu Item Inserted",null)},parent:r,width:e,boundaryElement:i})})}else i.push({type:"group",label:"Insert before",icon:e9.ySV,items:r.of.filter(e=>"unionOption"===e.type).map(e=>({type:"action",icon:tf(e),label:"block"===e.name?"Paragraph":e.title||e.name,action:aI(n,t,e.name,"before"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}))}),i.push({type:"group",label:"Insert after",icon:e9.oty,items:r.of.filter(e=>"unionOption"===e.type).map(e=>({type:"action",label:"block"===e.name?"Paragraph":e.title||e.name,icon:tf(e),action:aI(n,t,e.name,"after"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}))});return i}let aN=[-4,4,-4,4];function aF(e){let t;let n=(0,m.c)(27),{node:r,onDismiss:i,boundaryElement:o}=e,a=tk();n[0]!==r||n[1]!==i||n[2]!==a?(t=()=>{"action"===r.type&&(r.action?.(),i?.(),r.telemetryEvent&&a(r.telemetryEvent,null))},n[0]=r,n[1]=i,n[2]=a,n[3]=t):t=n[3];let s=t;if("divider"===r.type){let e;return n[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,p.jsx)(x.R,{}),n[4]=e):e=n[4],e}if("action"===r.type){let e;let t=!r.action;return n[5]!==r.hotkeys||n[6]!==r.icon||n[7]!==r.label||n[8]!==s||n[9]!==t?(e=(0,p.jsx)(x.sN,{fontSize:1,hotkeys:r.hotkeys,icon:r.icon,padding:2,space:2,text:r.label,disabled:t,onClick:s}),n[5]=r.hotkeys,n[6]=r.icon,n[7]=r.label,n[8]=s,n[9]=t,n[10]=e):e=n[10],e}if("group"===r.type){let e,t,a;let s=r.icon;n[11]===Symbol.for("react.memo_cache_sentinel")?(e={arrow:!1,constrainSize:!0,placement:"right-start",fallbackPlacements:["left-start","right","left","right-end","left-end","bottom","top"],preventOverflow:!0,__unstable_margins:aN},n[11]=e):e=n[11];let l=r.label;if(n[12]!==o||n[13]!==r.items||n[14]!==i){let e;n[16]!==o||n[17]!==i?(e=(e,t)=>(0,p.jsx)(aF,{node:e,onDismiss:i,boundaryElement:o},t),n[16]=o,n[17]=i,n[18]=e):e=n[18],t=r.items.map(e),n[12]=o,n[13]=r.items,n[14]=i,n[15]=t}else t=n[15];return n[19]!==r.icon||n[20]!==r.label||n[21]!==t?(a=(0,p.jsx)(x.kS,{fontSize:1,icon:s,padding:2,popover:e,space:2,text:l,children:t}),n[19]=r.icon,n[20]=r.label,n[21]=t,n[22]=a):a=n[22],a}if("custom"===r.type){let e;let{component:t}=r;return n[23]!==t||n[24]!==o||n[25]!==a?(e=(0,p.jsx)(t,{boundaryElement:o,sendTelemetry:a}),n[23]=t,n[24]=o,n[25]=a,n[26]=e):e=n[26],e}return null}let aB=e=>{let t,n,r,i,o,a,s,l,u,c,d,h,f,g,v,b,w,S;let k=(0,m.c)(43),{node:E,onDismiss:j,position:C}=e,{x:_,y:T}=C,[A,M]=(0,y.useState)(null),{getField:P}=aR(),{getDocument:R}=et();k[0]!==P||k[1]!==E?(t=P(E),k[0]=P,k[1]=E,k[2]=t):t=k[2];let{field:I,parent:O}=t;n=I?.title||I?.name||"Unknown type";let[$,D]=(0,y.useState)(void 0);k[3]!==I||k[4]!==R||k[5]!==E||k[6]!==O?(r=()=>{(async()=>{let e=R(E.id);e&&D(await function(e){let{node:t,field:n,parent:r,doc:i}=e;return n?.type==="arrayItem"?aL({node:t,field:n,doc:i}):r?.type==="union"?aV({node:t,parent:r,doc:i}):Promise.resolve([])}({node:E,field:I,parent:O,doc:e}))})()},i=[I,E,O,R],k[3]=I,k[4]=R,k[5]=E,k[6]=O,k[7]=r,k[8]=i):(r=k[7],i=k[8]),(0,y.useEffect)(r,i),k[9]!==_||k[10]!==T?(a={getBoundingClientRect:()=>({bottom:T,left:_,right:_,top:T,width:0,height:0})},k[9]=_,k[10]=T,k[11]=a):a=k[11],o=a,k[12]!==I?(l=tf(I),k[12]=I,k[13]=l):l=k[13],s=l,k[14]===Symbol.for("react.memo_cache_sentinel")?(u={minWidth:120,maxWidth:160},k[14]=u):u=k[14],k[15]!==s||k[16]!==$?(c=(0,p.jsx)(x.xu,{flex:"none",children:$?(0,p.jsx)(x.xv,{size:1,children:s}):(0,p.jsx)(x.$j,{size:1})}),k[15]=s,k[16]=$,k[17]=c):c=k[17];let L=$?n:"Loading...";k[18]!==L?(d=(0,p.jsx)(x.Kq,{flex:1,space:2,children:(0,p.jsx)(x.xv,{size:1,weight:"semibold",children:L})}),k[18]=L,k[19]=d):d=k[19],k[20]!==c||k[21]!==d?(h=(0,p.jsxs)(x.kC,{gap:2,padding:2,children:[c,d]}),k[20]=c,k[21]=d,k[22]=h):h=k[22],k[23]!==A||k[24]!==$||k[25]!==j?(f=$&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(x.R,{}),$.map((e,t)=>(0,p.jsx)(aF,{node:e,onDismiss:j,boundaryElement:A},t))]}),k[23]=A,k[24]=$,k[25]=j,k[26]=f):f=k[26],k[27]!==h||k[28]!==f?(g=(0,p.jsxs)(x.v2,{style:u,children:[h,f]}),k[27]=h,k[28]=f,k[29]=g):g=k[29];let z=`${_}-${T}`;return k[30]!==_||k[31]!==T?(v={position:"absolute",left:_,top:T},k[30]=_,k[31]=T,k[32]=v):v=k[32],k[33]!==z||k[34]!==v?(b=(0,p.jsx)("div",{style:v},z),k[33]=z,k[34]=v,k[35]=b):b=k[35],k[36]!==o||k[37]!==g||k[38]!==b?(w=(0,p.jsx)(x.J2,{__unstable_margins:aN,arrow:!1,open:!0,placement:"right-start",referenceElement:o,content:g,children:b}),k[36]=o,k[37]=g,k[38]=b,k[39]=w):w=k[39],k[40]!==j||k[41]!==w?(S=(0,p.jsx)(ty,{setBoundaryElement:M,onDismiss:j,children:w}),k[40]=j,k[41]=w,k[42]=S):S=k[42],S},aU=(0,y.createContext)(null),aH=e=>(0,y.isValidElement)(e),aW=(0,w.zo)(x.Zb)`
182  background-color: var(--overlay-bg);
183  border-radius: 3px;
184  pointer-events: none;
185  position: absolute;
186  will-change: transform;
187  box-shadow: var(--overlay-box-shadow);
188  transition: none;
189
190  --overlay-bg: transparent;
191  --overlay-box-shadow: inset 0 0 0 1px transparent;
192
193  [data-overlays] & {
194    --overlay-bg: color-mix(in srgb, transparent 95%, var(--card-focus-ring-color));
195    --overlay-box-shadow: inset 0 0 0 2px
196      color-mix(in srgb, transparent 50%, var(--card-focus-ring-color));
197  }
198
199  [data-fading-out] & {
200    transition:
201      box-shadow 1550ms,
202      background-color 1550ms;
203
204    --overlay-bg: rgba(0, 0, 255, 0);
205    --overlay-box-shadow: inset 0 0 0 1px transparent;
206  }
207
208  &[data-focused] {
209    --overlay-box-shadow: inset 0 0 0 1px var(--card-focus-ring-color);
210  }
211
212  &[data-hovered]:not([data-focused]) {
213    transition: none;
214    --overlay-box-shadow: inset 0 0 0 2px var(--card-focus-ring-color);
215  }
216
217  /* [data-unmounted] & {
218    --overlay-box-shadow: inset 0 0 0 1px var(--card-focus-ring-color);
219  } */
220
221  :link {
222    text-decoration: none;
223  }
224`,aG=(0,w.zo)(x.kC)`
225  bottom: 100%;
226  cursor: pointer;
227  pointer-events: none;
228  position: absolute;
229  right: 0;
230
231  [data-hovered]:not([data-menu-open]) & {
232    pointer-events: all;
233  }
234
235  [data-flipped] & {
236    bottom: auto;
237    top: 100%;
238  }
239`,aY=(0,w.zo)(x.kC)`
240  top: 100%;
241  cursor: pointer;
242  pointer-events: none;
243  position: absolute;
244  left: 0;
245
246  gap: 4px;
247  padding: 4px 0;
248  flex-wrap: wrap;
249
250  [data-hovered]:not([data-menu-open]) & {
251    pointer-events: all;
252  }
253
254  [data-flipped] & {
255    top: calc(100% + 2rem);
256  }
257`,aq=(0,w.zo)(x.kC)`
258  margin: -0.5rem;
259
260  [data-hovered]:not([data-menu-open]) & {
261    pointer-events: all;
262  }
263`,aZ=(0,w.zo)(x.kC)`
264  bottom: 100%;
265  cursor: pointer;
266  pointer-events: none;
267  position: absolute;
268  left: 0;
269
270  [data-hovered]:not([data-menu-open]) & {
271    pointer-events: all;
272  }
273
274  [data-flipped] & {
275    bottom: auto;
276    top: 100%;
277  }
278`,aK=(0,w.zo)(x.Zb)`
279  cursor: pointer;
280  background-color: var(--card-focus-ring-color);
281  right: 0;
282  border-radius: 3px;
283
284  & [data-ui='Text'] {
285    color: #fff;
286    white-space: nowrap;
287  }
288`,aX=(0,w.zo)(x.kC)`
289  display: flex;
290  align-items: center;
291  background-color: var(--card-focus-ring-color);
292  right: 0;
293  border-radius: 3px;
294  & [data-ui='Text'],
295  & [data-sanity-icon] {
296    color: #fff;
297    white-space: nowrap;
298  }
299`,aQ=w.zo.div`
300  position: absolute;
301  inset: 0;
302  pointer-events: all;
303`,aJ=e=>{let t,n,r,i,o,a,s,l,u,c,d,h,f,g,v,w,S,k;let E=(0,m.c)(59),{id:j,element:C,focused:_,componentResolver:T,node:A,showActions:M,draggable:P,targets:R,elementType:I,comlink:O,onActivateExclusivePlugin:$,onMenuOpenChange:D}=e,{getField:L,getType:z}=aR();E[0]!==z||E[1]!==A?(t=z(A),E[0]=z,E[1]=A,E[2]=t):t=E[2];let V=t;E[3]!==A?(n="path"in A?function(e){let{id:t,type:n,path:r,baseUrl:i,tool:o,workspace:a}=e;return(0,b.tZ)({baseUrl:i,workspace:a,tool:o,type:n,id:t,path:r?function(e){let t="";for(let n of e){if("string"==typeof n){t&&(t+="."),t+=n;continue}if("number"==typeof n){t&&(t+=":"),t+=`${n}`;continue}if(null!==n&&Array.isArray(n)){t&&(t+=":"),t+=`${n.join(",")}}`;continue}if(n._key){t&&(t+=":"),t+=`${n._key}`;continue}}return t}(b.eT.fromString(r)):[]})}(A):A.href,E[3]=A,E[4]=n):n=E[4];let N=n,F=function(){let e=(0,y.useContext)(aU);if(!e)throw Error("Preview Snapshots context is missing");return e}();e:{let e;if(!("path"in A)){r=void 0;break e}E[5]!==A||E[6]!==F?(e=F.find(e=>e._id===A.id)?.title,E[5]=A,E[6]=F,E[7]=e):e=E[7],r=e}let B=r;E[8]!==C||E[9]!==_||E[10]!==L||E[11]!==z?(o=function(e,t){let n=z(e),{field:r,parent:i}=L(e);if(!("id"in e)||!r||!n)return;let o=r.value.type;return{document:n,element:C,targetElement:t||C,field:r,focused:!!_,node:e,parent:i,type:o}},E[8]=C,E[9]=_,E[10]=L,E[11]=z,E[12]=o):o=E[12];let U=o;if(E[13]!==I||E[14]!==U||E[15]!==A?(a="element"===I?U(A):void 0,E[13]=I,E[14]=U,E[15]=A,E[16]=a):a=E[16],E[17]!==U||E[18]!==R){let e;E[20]!==U?(e=e=>U(e.sanity,e.element),E[20]=U,E[21]=e):e=E[21],s=R.map(e).filter(a5),E[17]=U,E[18]=R,E[19]=s}else s=E[19];E[22]!==a||E[23]!==s?(l={legacyComponentContext:a,pluginContexts:s},E[22]=a,E[23]=s,E[24]=l):l=E[24];let H=function(e,t){let n;let r=(0,m.c)(4);e:{let i;if(!e){n=void 0;break e}if(r[0]!==e||r[1]!==t){let o=t?.(e);if(!o){n=void 0;break e}if(aH(o)){n=o;break e}i=(Array.isArray(o)?o:[o]).map(a1),r[0]=e,r[1]=t,r[2]=i,r[3]=n}else i=r[2],n=r[3];n=i}return n}((i=l).legacyComponentContext,T),W=function(e,t){let n;let r=(0,m.c)(5);if(r[0]!==e||r[1]!==t){let i;r[3]!==t?(i=e=>{let n={id:eC(),context:e,hud:[],exclusive:[]};return t?.forEach(t=>{t.guard?.(e)&&("hud"===t.type&&n.hud.push(t),"exclusive"===t.type&&n.exclusive.push(t))}),n},r[3]=t,r[4]=i):i=r[4],n=e.map(i),r[0]=e,r[1]=t,r[2]=n}else n=r[2];return n}(i.pluginContexts,e.plugins);E[25]!==V?(u=V?.icon?(0,p.jsx)("div",{dangerouslySetInnerHTML:{__html:V.icon}}):(0,p.jsx)(e9.$lS,{}),E[25]=V,E[26]=u):u=E[26];let G=u,Y=(0,y.useId)();E[27]!==W?(c=W?.some(a3),E[27]=W,E[28]=c):c=E[28];let q=c||W?.length>1;E[29]!==j?(d=()=>{window.dispatchEvent(new CustomEvent("sanity-overlay/label-click",{detail:{id:j}}))},E[29]=j,E[30]=d):d=E[30];let Z=d;return E[31]!==N||E[32]!==M?(h=M?(0,p.jsx)(aG,{gap:1,paddingY:1,children:(0,p.jsx)(a2,{href:N})}):null,E[31]=N,E[32]=M,E[33]=h):h=E[33],E[34]!==O||E[35]!==P||E[36]!==Z||E[37]!==G||E[38]!==Y||E[39]!==W||E[40]!==$||E[41]!==D||E[42]!==q||E[43]!==B?(f=(B||q)&&(0,p.jsx)(aZ,{gap:1,paddingY:1,onClick:Z,children:(0,p.jsxs)(aX,{gap:2,padding:2,children:[P&&(0,p.jsx)(x.xu,{marginRight:1,children:(0,p.jsx)(x.xv,{className:"drag-handle",size:0,children:(0,p.jsx)(e9.VVU,{})})}),(0,p.jsx)(x.xv,{size:0,children:G}),B&&(0,p.jsx)(x.xv,{size:1,weight:"medium",children:B}),q&&(0,p.jsx)(x.xu,{paddingLeft:2,onClick:a4,children:(0,p.jsx)(aq,{children:(0,p.jsx)(t2,{id:Y,popover:{animate:!0,placement:"bottom-start",constrainSize:!0,tone:"default"},onOpen:()=>{D?.(!0)},onClose:()=>{D?.(!1)}
303,button:(0,p.jsx)(x.zx,{icon:e9.zGg,tone:"primary",padding:2}),menu:(0,p.jsx)(x.v2,{paddingY:0,children:(0,p.jsx)(tT,{children:W?.map((e,t)=>p.jsxs(y.Fragment,{children:[p.jsxs(x.Kq,{role:"group",paddingY:1,space:0,children:[p.jsx(x.sN,{paddingY:2,text:p.jsx(x.xu,{paddingY:2,children:p.jsx(x.xv,{muted:!0,size:1,style:{textTransform:"capitalize"},children:`${e.context.document.name}: ${e.context.field?.name}`})}),onClick:()=>{e.context.node&&O?.post("visual-editing/focus",e.context.node)}}),e.exclusive.map(t=>t.component?p.jsx(x.sN,{paddingY:2,icon:t.icon||p.jsx(e9.BWR,{}),text:p.jsx(x.xu,{paddingY:2,children:p.jsx(x.xv,{size:1,children:t.title||t.name})}),onClick:()=>$?.(t,e.context)},t.name):null)]}),t<W.length-1&&p.jsx(x.R,{})]},e.id))})})})})})]})}),E[34]=O,E[35]=P,E[36]=Z,E[37]=G,E[38]=Y,E[39]=W,E[40]=$,E[41]=D,E[42]=q,E[43]=B,E[44]=f):f=E[44],E[45]!==W?(g=W?.map(a6),E[45]=W,E[46]=g):g=E[46],E[47]!==g?(v=(0,p.jsx)(aY,{children:g}),E[47]=g,E[48]=v):v=E[48],E[49]!==h||E[50]!==f||E[51]!==v?(w=(0,p.jsxs)(tT,{children:[h,f,v]}),E[49]=h,E[50]=f,E[51]=v,E[52]=w):w=E[52],E[53]!==H||E[54]!==i.legacyComponentContext?(S=Array.isArray(H)?H.map((e,t)=>{let{component:n,props:r}=e;return(0,p.jsx)(n,{PointerEvents:tT,...i.legacyComponentContext,...r},t)}):H,E[53]=H,E[54]=i.legacyComponentContext,E[55]=S):S=E[55],E[56]!==w||E[57]!==S?(k=(0,p.jsxs)(p.Fragment,{children:[w,S]}),E[56]=w,E[57]=S,E[58]=k):k=E[58],k},a0=(0,y.memo)(function(e){let t,n,r,i,o,a,s,l,u,c,d,h,f,g;let v=(0,m.c)(38),{draggable:b,focused:x,hovered:w,rect:S,wasMaybeCollapsed:k,enableScrollIntoView:E}=e,j=(0,y.useRef)(null),C=(0,y.useRef)(!1),_=`${S.w}px`,T=`${S.h}px`,A=`translate(${S.x}px, ${S.y}px)`;v[0]!==_||v[1]!==T||v[2]!==A?(n={width:_,height:T,transform:A},v[0]=_,v[1]=T,v[2]=A,v[3]=n):n=v[3],t=n,v[4]!==E||v[5]!==x||v[6]!==k?(r=()=>{if(!C.current&&!k&&!0===x&&j.current&&E){let e=j.current;(function(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;let n=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if("object"==typeof t&&"function"==typeof t.behavior)return t.behavior(n_(e,t));let r="boolean"==typeof t||null==t?void 0:t.behavior;for(let{el:i,top:o,left:a}of n_(e,nT(t))){let e=o-n.top+n.bottom,t=a-n.left+n.right;i.scroll({top:e,left:t,behavior:r})}})(j.current,{behavior:t=>{0!==t.length&&e.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},scrollMode:"if-needed",block:"center",inline:"nearest"})}C.current=!0===x},i=[x,k,E],v[4]=E,v[5]=x,v[6]=k,v[7]=r,v[8]=i):(r=v[7],i=v[8]),(0,y.useEffect)(r,i);let[M,P]=(0,y.useState)(!1);v[9]!==w?(o=()=>{if(!j.current||!w)return;let e=new IntersectionObserver(e=>{let[t]=e;P(t.boundingClientRect.top<0)},{threshold:1});return e.observe(j.current),()=>e.disconnect()},v[9]=w,v[10]=o):o=v[10],v[11]!==w||v[12]!==M?(a=[w,M],v[11]=w,v[12]=M,v[13]=a):a=v[13],(0,y.useEffect)(o,a);let[R,I]=(0,y.useState)(null);v[14]===Symbol.for("react.memo_cache_sentinel")?(s=()=>{I(null),window.dispatchEvent(new CustomEvent("sanity-overlay/exclusive-plugin-closed"))},v[14]=s):s=v[14];let O=s;v[15]===Symbol.for("react.memo_cache_sentinel")?(l=(e,t)=>{I({plugin:e,context:t})},v[15]=l):l=v[15];let $=l,D=R?.plugin.component,[L,z]=(0,y.useState)(!1);v[16]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{z(!1)},v[16]=u):u=v[16],v[17]!==w?(c=[w],v[17]=w,v[18]=c):c=v[18],(0,y.useEffect)(u,c),v[19]!==D||v[20]!==L?(d=L||D?(0,p.jsx)(tv,{onDismiss:O,blockScroll:L}):null,v[19]=D,v[20]=L,v[21]=d):d=v[21];let V=x?"":void 0,N=w?"":void 0,F=M?"":void 0,B=b?"":void 0,U=L?"":void 0;return v[22]!==D||v[23]!==R||v[24]!==w||v[25]!==e?(h=D?(0,p.jsx)(aQ,{"data-sanity-overlay-element":!0,onClick:a9,children:(0,p.jsx)(D,{...R.context,closeExclusiveView:O})}):w?(0,p.jsx)(aJ,{...e,onActivateExclusivePlugin:$,onMenuOpenChange:z}):null,v[22]=D,v[23]=R,v[24]=w,v[25]=e,v[26]=h):h=v[26],v[27]!==t||v[28]!==V||v[29]!==N||v[30]!==F||v[3
3031]!==B||v[32]!==U||v[33]!==h?(f=(0,p.jsx)(aW,{"data-focused":V,"data-hovered":N,"data-flipped":F,"data-draggable":B,"data-menu-open":U,ref:j,style:t,children:h}),v[27]=t,v[28]=V,v[29]=N,v[30]=F,v[31]=B,v[32]=U,v[33]=h,v[34]=f):f=v[34],v[35]!==d||v[36]!==f?(g=(0,p.jsxs)(p.Fragment,{children:[d,f]}),v[35]=d,v[36]=f,v[37]=g):g=v[37],g});function a1(e){return"object"==typeof e&&"component"in e?e:{component:e,props:{}}}let a2=(0,y.memo)(function(e){let t,n,r,i;let o=(0,m.c)(6),a=(0,y.useSyncExternalStore)(a8,a7);return o[0]!==e.href||o[1]!==a?(n=function e(t,n){try{let r=new URL(t,typeof location>"u"?void 0:location.origin);if(r.hash){let t=new URL(e(r.hash.slice(1),n));return`${r.origin}${r.pathname}${r.search}#${t.pathname}${t.search}`}return r.searchParams.set("preview",n),r.toString()}catch{return t}}(e.href,a),o[0]=e.href,o[1]=a,o[2]=n):n=o[2],t=n,o[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,p.jsx)(aK,{padding:2,children:(0,p.jsx)(x.xv,{size:1,weight:"medium",children:"Open in Studio"})}),o[3]=r):r=o[3],o[4]!==t?(i=(0,p.jsx)(x.xu,{as:"a",href:t,target:"_blank",rel:"noopener noreferrer",children:r}),o[4]=t,o[5]=i):i=o[5],i});function a5(e){return void 0!==e}function a3(e){return e.exclusive.length>0}function a4(e){e.stopPropagation()}function a6(e){return(0,p.jsx)(y.Fragment,{children:e.hud.map(t=>{let n=t.component;return n?(0,p.jsx)(n,{...e.context},t.name):null})},e.id)}function a9(e){e.stopPropagation()}function a8(e){let t=()=>e();return window.addEventListener("popstate",t),()=>window.removeEventListener("popstate",t)}function a7(){return window.location.href}let se=e=>{let t;let n=(0,m.c)(5),{dragGroupRect:r}=e,i=`${r.y}px`,o=`${r.x}px`,a=`${r.w-1}px`,s=`${r.h-1}px`;return n[0]!==i||n[1]!==o||n[2]!==a||n[3]!==s?(t=(0,p.jsx)("div",{style:{position:"absolute",top:i,left:o,width:a,height:s,border:"1px dashed #f0709b",pointerEvents:"none"}}),n[0]=i,n[1]=o,n[2]=a,n[3]=s,n[4]=t):t=n[4],t},st=e=>{let t;let n=(0,m.c)(4),{dragInsertPosition:r}=e;if(null===r)return;let i=r?.left||r?.right?"horizontal":"vertical",o=0,a=0,s=0,l=0;if("horizontal"===i){let{left:e,right:t}=r;if(s=6,t&&e){let n=e.rect.x+e.rect.w,r=t.rect.x,i=.0125*Math.min(t.rect.h,e.rect.h);o=.5*n+.5*r-3,a=e.rect.y+i,l=Math.min(t.rect.h,e.rect.h)-2*i}else if(t&&!e){let e=.0125*t.rect.h;o=t.rect.x-3,a=t.rect.y+e,l=t.rect.h-2*e}else if(e&&!t){let t=.0125*e.rect.h;o=e.rect.x+e.rect.w-3,a=e.rect.y+t,l=e.rect.h-2*t}}else{let{bottom:e,top:t}=r;if(e&&t){let n=Math.min(t.rect.x,e.rect.x),r=t.rect.y+t.rect.h,i=e.rect.y,u=.0125*Math.min(e.rect.w,t.rect.w);l=6,o=n+u,a=.5*r+.5*i-3,s=Math.max(e.rect.w,t.rect.w)-2*u}else if(e&&!t){let t=.0125*e.rect.w;o=e.rect.x+t,a=e.rect.y-3,s=e.rect.w-2*t,l=6}else if(t&&!e){let e=.0125*t.rect.w;o=t.rect.x+e,a=t.rect.y+t.rect.h-3,s=t.rect.w-2*e,l=6}}let u=`${s}px`,c=`${l}px`,d=`translate(${o}px, ${a}px)`;return n[0]!==u||n[1]!==c||n[2]!==d?(t=(0,p.jsx)("div",{style:{position:"absolute",width:u,height:c,transform:d,background:"#556bfc",border:"2px solid white",borderRadius:"999px",zIndex:"999999"}}),n[0]=u,n[1]=c,n[2]=d,n[3]=t):t=n[3],t},sn=w.zo.div`
304  --drag-preview-opacity: 0.98;
305  --drag-preview-skeleton-stroke: #ffffff;
306
307  @media (prefers-color-scheme: dark) {
308    --drag-preview-skeleton-stroke: #383d51;
309  }
310
311  position: fixed;
312  display: grid;
313  transform: ${({$scaleFactor:e,$width:t,$height:n})=>`translate(calc(var(--drag-preview-x) - ${t/2}px), calc(var(--drag-preview-y) - ${n/2}px)) scale(${e})`};
314  width: ${({$width:e})=>`${e}px`};
315  height: ${({$height:e})=>`${e}px`};
316  z-index: 9999999;
317  opacity: var(--drag-preview-opacity);
318  cursor: move;
319
320  .drag-preview-content-wrapper {
321    position: relative;
322    width: 100%;
323    height: 100%;
324    container-type: inline-size;
325  }
326
327  [data-ui='card'] {
328    position: relative;
329    width: 100%;
330    height: 100%;
331  }
332
333  .drag-preview-skeleton {
334    position: absolute;
335    inset: 0;
336
337    rect {
338      stroke: var(--drag-preview-skeleton-stroke);
339    }
340  }
341
342  .drag-preview-handle {
343    position: absolute;
344    top: 4cqmin;
345    left: 4cqmin;
346    width: 6cqmin;
347    fill: var(--drag-preview-handle-fill);
348  }
349`,sr=e=>{var t,n;let r,i,o,a,s,l,u,c,d,h,f,g,y,v,b,w,S,k,E,j,C;let _=(0,m.c)(50),{skeleton:T}=e,A=Math.min(T.maxWidth,window.innerWidth/2),M=T.w>A?A/T.w:1,P=T.offsetX*M,R=T.offsetY*M,I=(0,x.Bj)(),O=(0,x.g9)(),$=O.radius[~~((n=(T.w-0)*((t=O.radius.length-2)-1)/1920+1)<1?1:n>t?t:n)];if(_[0]!==P||_[1]!==R||_[2]!==I||_[3]!==$||_[4]!==M||_[5]!==T.childRects||_[6]!==T.h||_[7]!==T.w){let e=T.childRects.filter(si),t=T.childRects.filter(so);i=sn,a=T.w,s=T.h,l=P,u=R,c=M,r=x.Zb,g=$,y=4,v="hidden",b="transparent",w=I?"dark":"light",f="drag-preview-content-wrapper",d="drag-preview-skeleton",h=`0 0 ${T.w} ${T.h}`,o=[...e,...t],_[0]=P,_[1]=R,_[2]=I,_[3]=$,_[4]=M,_[5]=T.childRects,_[6]=T.h,_[7]=T.w,_[8]=r,_[9]=i,_[10]=o,_[11]=a,_[12]=s,_[13]=l,_[14]=u,_[15]=c,_[16]=d,_[17]=h,_[18]=f,_[19]=g,_[20]=y,_[21]=v,_[22]=b,_[23]=w}else r=_[8],i=_[9],o=_[10],a=_[11],s=_[12],l=_[13],u=_[14],c=_[15],d=_[16],h=_[17],f=_[18],g=_[19],y=_[20],v=_[21],b=_[22],w=_[23];return _[24]!==o||_[25]!==O.color?(S=o.map((e,t)=>(0,p.jsx)("rect",{x:e.x,y:e.y,width:e.w,height:e.h,fill:O.color.skeleton.from},t)),_[24]=o,_[25]=O.color,_[26]=S):S=_[26],_[27]!==S||_[28]!==d||_[29]!==h?(k=(0,p.jsx)("svg",{className:d,viewBox:h,children:S}),_[27]=S,_[28]=d,_[29]=h,_[30]=k):k=_[30],_[31]!==k||_[32]!==f?(E=(0,p.jsx)("div",{className:f,children:k}),_[31]=k,_[32]=f,_[33]=E):E=_[33],_[34]!==r||_[35]!==E||_[36]!==g||_[37]!==y||_[38]!==v||_[39]!==b||_[40]!==w?(j=(0,p.jsx)(r,{radius:g,shadow:y,overflow:v,tone
349:b,scheme:w,children:E}),_[34]=r,_[35]=E,_[36]=g,_[37]=y,_[38]=v,_[39]=b,_[40]=w,_[41]=j):j=_[41],_[42]!==i||_[43]!==a||_[44]!==s||_[45]!==l||_[46]!==u||_[47]!==c||_[48]!==j?(C=(0,p.jsx)(i,{$width:a,$height:s,$offsetX:l,$offsetY:u,$scaleFactor:c,children:j}),_[42]=i,_[43]=a,_[44]=s,_[45]=l,_[46]=u,_[47]=c,_[48]=j,_[49]=C):C=_[49],C};function si(e){return"IMG"===e.tagName}function so(e){return"IMG"!==e.tagName}let sa=(0,w.zo)(x.Zb)`
350  position: fixed;
351  bottom: 2rem;
352  left: 2rem;
353`,ss=()=>{let e,t;let n=(0,m.c)(2);return n[0]===Symbol.for("react.memo_cache_sentinel")?(e={zIndex:"999999"},n[0]=e):e=n[0],n[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,p.jsx)(sa,{padding:2,shadow:2,radius:2,style:e,children:(0,p.jsxs)(x.kC,{align:"center",gap:2,children:[(0,p.jsx)(x.SV,{keys:["Shift"]}),(0,p.jsx)(x.xv,{size:1,children:"Zoom Out"}),(0,p.jsx)(e9.Qq,{})]})}),n[1]=t):t=n[1],t},sl=(e,t)=>{let{type:n}=t;switch(n){case"element/register":return e.find(e=>e.id===t.id)?e:[...e,{id:t.id,activated:!1,element:t.element,focused:!1,hovered:!1,rect:t.rect,sanity:t.sanity,dragDisabled:t.dragDisabled,targets:t.targets,elementType:t.elementType}];case"element/activate":return e.map(e=>e.id===t.id?{...e,activated:!0}:e);case"element/update":return e.map(e=>e.id===t.id?{...e,sanity:t.sanity,rect:t.rect,targets:t.targets,elementType:t.elementType}:e);case"element/unregister":return e.filter(e=>e.id!==t.id);case"element/deactivate":return e.map(e=>e.id===t.id?{...e,activated:!1,hovered:!1}:e);case"element/mouseenter":return e.map(e=>e.id===t.id?{...e,rect:t.rect,hovered:!0}:{...e,hovered:!1});case"element/mouseleave":return e.map(e=>e.id===t.id?{...e,hovered:!1}:e);case"element/updateRect":return e.map(e=>e.id===t.id?{...e,rect:t.rect}:e);case"element/click":return e.map(e=>({...e,focused:e.id===t.id&&"clicked"}));case"overlay/reset-mouse-state":return e.map(e=>({...e,focused:!1,hovered:!1}));case"overlay/blur":return e.map(e=>({...e,focused:!1}));case"presentation/blur":return e.map(e=>({...e,focused:!1}));case"presentation/focus":{let n=e.find(e=>"clicked"===e.focused);return e.map(e=>{let r="path"in e.sanity&&e.sanity.id===t.data.id&&e.sanity.path===t.data.path;return n&&e===n&&r?e:{...e,focused:r&&n?"duplicate":r}})}default:return e}};function su(e,t){let{type:n}=t,{contextMenu:r,focusPath:i,perspective:o,isDragging:a,dragInsertPosition:s,dragShowMinimap:l,dragShowMinimapPrompt:u,dragSkeleton:c,dragMinimapTransition:d,dragGroupRect:h}=e,f=!1;if("presentation/focus"===n){let n=e.focusPath;n!==(i=t.data.path)&&(f=n.slice(i.length).startsWith("["))}return"presentation/perspective"===n&&(o=t.data.perspective),"element/contextmenu"===n&&(r="sanity"in t?{node:t.sanity,position:t.position}:null),("element/click"===n||"element/mouseleave"===n||"overlay/blur"===n||"presentation/blur"===n||"presentation/focus"===n)&&(r=null),"overlay/dragUpdateInsertPosition"===n&&(s=t.insertPosition),"overlay/dragStart"===n&&(a=!0),"overlay/dragUpdateSkeleton"===t.type&&(c=t.skeleton),"overlay/dragEnd"===n&&(a=!1),"overlay/dragToggleMinimapPrompt"===t.type&&(u=t.display),"overlay/dragStartMinimapTransition"===n&&(d=!0),"overlay/dragEndMinimapTransition"===n&&(d=!1),"overlay/dragUpdateGroupRect"===n&&(h=t.groupRect),"overlay/dragToggleMinimap"===n&&(l=t.display),{...e,contextMenu:r,elements:sl(e.elements,t),dragInsertPosition:s,dragSkeleton:c,dragGroupRect:h,isDragging:a,focusPath:i,perspective:o,wasMaybeCollapsed:f,dragShowMinimap:l,dragShowMinimapPrompt:u,dragMinimapTransition:d}}let sc=function(e){let t,n,r,i,o,a,s;let l=(0,m.c)(13),{comlink:u,children:c}=e;l[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],l[0]=t):t=l[0];let[d,h]=(0,y.useState)(t);l[1]!==u?(n=async e=>{if(u)try{let t=await u.fetch("visual-editing/preview-snapshots",void 0,{signal:e,suppressWarnings:!0});h(t.snapshots)}catch{}},l[1]=u,l[2]=n):n=l[2];let f=n;return l[3]!==u||l[4]!==f?(r=()=>{if(!u)return;let e=new AbortController,t=u.onStatus(()=>{f(e.signal)},"connected");return()=>{e.abort(),t()}},i=[u,f],l[3]=u,l[4]=f,l[5]=r,l[6]=i):(r=l[5],i=l[6]),(0,y.useEffect)(r,i),l[7]!==u?(o=()=>u?.on("presentation/preview-snapshots",e=>{h(e.snapshots)}),a=[u],l[7]=u,l[8]=o,l[9]=a):(o=l[8],a=l[9]),(0,y.useEffect)(o,a),l[10]!==c||l[11]!==d?(s=(0,p.jsx)(aU.Provider,{value:d,children:c}),l[10]=c,l[11]=d,l[12]=s):s=l[12],s};function sd(e){return"document"===e.type}function sh(e){return"type"===e.type}let sf=function(e){let t,n,r,i,o,a,s,l,u,c,d,h;let f=(0,m.c)(22),{comlink:g,children:v,elements:b}=e;f[0]===Symbol.for("react.memo_cache_sentinel")?(t=new Map,f[0]=t):t=f[0];let[x,w]=(0,y.useState)(t),[S,k]=(0,y.useState)(null);f[1]!==g?(n=()=>
353{if(!g)return;let e=async function(e){if(g)try{let t=await g.fetch("visual-editing/schema",void 0,{signal:e,suppressWarnings:!0});k(t.schema)}catch{}},t=new AbortController,n=g.onStatus(()=>{e(t.signal)},"connected");return()=>{t.abort(),n()}},r=[g],f[1]=g,f[2]=n,f[3]=r):(n=f[2],r=f[3]),(0,y.useEffect)(n,r),f[4]===Symbol.for("react.memo_cache_sentinel")?(i=[],f[4]=i):i=f[4];let E=(0,y.useRef)(i),j=(0,y.useDeferredValue)(b);f[5]!==j?(o=j.reduce((e,t)=>{let{sanity:n}=t;if(!("id"in n)||!n.path.includes("[_key=="))return e;let r=n.path.split(".").toReversed().reduce((e,t)=>e.length?[t,...e]:t.includes("[_key==")?[t]:[],[]).join(".");return e.find(e=>e.id===n.id&&e.path===r)||e.push({id:n.id,path:r}),e},[]),f[5]=j,f[6]=o):o=f[6];let C=o,_=(0,y.useRef)(null);f[7]!==g||f[8]!==C?(a=()=>{if(!C.length||!g)return;let e=async(e,t)=>{let n=E.current;try{E.current=e;let n=await g.fetch("visual-editing/schema-union-types",{paths:e},{signal:t,suppressWarnings:!0});if(t.aborted)return;w(n.types),_.current=null}catch{}t.aborted&&(E.current=n)};C.some(e=>!E.current.find(t=>{let{id:n,path:r}=t;return n===e.id&&r===e.path}))&&(_.current?.abort(),_.current=new AbortController,e(C,_.current.signal))},s=[g,C],f[7]=g,f[8]=C,f[9]=a,f[10]=s):(a=f[9],s=f[10]),(0,y.useEffect)(a,s),f[11]!==S?(l=(e,t)=>{if(!S||"string"!=typeof e&&(!("path"in e)||!Array.isArray(S)))return;let n="string"==typeof e?e:e.type;return S.filter("document"===(t||"document")?sd:sh).find(e=>e.name===n)},f[11]=S,f[12]=l):l=f[12];let T=l;f[13]!==T||f[14]!==x?(u=e=>{if(!("path"in e))return{field:void 0,parent:void 0};let t=T(e);if(!t)return{field:void 0,parent:void 0};let n=e.path.split(".").flatMap(sp);try{return function t(n,r,i,o){let a=void 0===o?[]:o;if(!n)return{field:void 0,parent:void 0};let[s,...l]=r;if("fields"in n){let e=n.fields[s];if(!e&&"rest"in n)return t(n.rest,r,n,a);if(!l.length)return{field:e,parent:i};if(!e)throw Error(`[@sanity/visual-editing] No field could be resolved at path: "${[...a,...r].join(".")}"`);return t(e.value,l,n,[...a,s])}if("array"===n.type)return t(n.of,r,n,a);if("arrayItem"===n.type)return l.length?t(n.value,l,n,[...a,s]):{field:n,parent:i};if("union"===n.type){let r=s.startsWith("[_key==")?x?.get(e.id)?.get([a.join("."),s].filter(Boolean).join("")):s;return t(n.of.find(e=>"unionOption"===e.type?e.name===r:e),l,n,[...a,s])}if("unionOption"===n.type)return s?t(n.value,r,n,a):{field:n,parent:i};if("inline"===n.type)return t(T(n.name,"type").value,r,n,a);throw Error(`[@sanity/visual-editing] No field could be resolved at path: "${[...a,...r].join(".")}"`)}(t,n,void 0)}catch(e){return e instanceof Error&&console.warn(e.message),{field:void 0,parent:void 0}}},f[13]=T,f[14]=x,f[15]=u):u=f[15];let A=u;return f[16]!==A||f[17]!==T?(d={getField:A,getType:T},f[16]=A,f[17]=T,f[18]=d):d=f[18],c=d,f[19]!==v||f[20]!==c?(h=(0,p.jsx)(aP.Provider,{value:c,children:v}),f[19]=v,f[20]=c,f[21]=h):h=f[21],h};function sp(e){return e.includes("[")?e.split(/(\[.+\])/,2):[e]}let sm=(e=>{let t=e,n=new Set;return{getState:()=>t,setState:e=>{t=e(t),n.forEach(e=>e())},subscribe:e=>(n.add(e),()=>n.delete(e))}})({}),sg=e=>{let t,n,r,i,o,a,s;let l=(0,m.c)(11),{comlink:u,children:c}=e;return l[0]!==u?(t=()=>u?.on("presentation/shared-state",sy),n=[u],l[0]=u,l[1]=t,l[2]=n):(t=l[1],n=l[2]),(0,y.useEffect)(t,n),l[3]!==u?(r=()=>{(async function(){let e=await u?.fetch("visual-editing/shared-state",void 0,{suppressWarnings:!0});e&&sm.setState(()=>e.state)})().catch(sv)},i=[u],l[3]=u,l[4]=r,l[5]=i):(r=l[4],i=l[5]),(0,y.useEffect)(r,i),l[6]!==u?(a={comlink:u,store:sm},l[6]=u,l[7]=a):a=l[7],o=a,l[8]!==c||l[9]!==o?(s=(0,p.jsx)(e6.Provider,{value:o,children:c}),l[8]=c,l[9]=o,l[10]=s):s=l[10],s};function sy(e){"value"in e?sm.setState(t=>({...t,[e.key]:e.value})):sm.setState(t=>Object.fromEntries(Object.entries(t).filter(t=>{let[n]=t;return n!==e.key})))}function sv(e){console.debug(e),console.warn("[@sanity/visual-editing]: Failed to fetch shared state. Check your version of `sanity` is up-to-date")}let sb=e=>{let t,n;let r=(0,m.c)(5),{children:i,comlink:o}=e;r[0]!==o?(t=(e,t)=>{if(!o)return;let n=tw[e];if(n)o.post("visual-editing/telemetry-log",{event:n,data:t});else throw Error(`Telemetry event: ${e} does not exist`)},r[0]=o,r[1]=t):t=r[1];let a=t;return r[2]!==i||r[3]!==a?(n=(0,p.jsx)(tS.Provider,{value:a,children:i}),r[2]=i,r[3]=a,r[4]=n):n=r[4],n};function sx(){}function sw(e){return e.id}function sS(e){return!!e}function sk(e){let{sanity:t}=e;return t&&"id"in t?t:null}let sE=w.zo.div`
354  background-color: transparent;
355  direction: ltr;
356  inset: 0;
357  pointer-events: none;
358  position: absolute;
359  width: 100%;
360  height: 100%;
361  z-index: ${({$zIndex:e})=>e??"9999999"};
362`;function sj(e){let t,n;return t=requestAnimationFrame(()=>{n=requestAnimationFrame(e)}),()=>{void 0!==t&&cancelAnimationFrame(t),void 0!==n&&cancelAnimationFrame(n)}}
362let sC=e=>{let t,n,r,i,o;let a=(0,m.c)(8),{documentIds:s}=e;a[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],a[0]=t):t=a[0];let[l,u]=(0,y.useState)(t);a[1]!==s?(n=()=>{u(e=>{let t=Array.from(new Set(s));return e.length===t.length&&e.reduce(sP,t)?.length===0?e:t})},r=[s],a[1]=s,a[2]=n,a[3]=r):(n=a[2],r=a[3]),(0,y.useEffect)(n,r);let c=Z();return a[4]!==c||a[5]!==l?(i=()=>{for(let e of l)c.send({type:"observe",documentId:(0,b.qy)(e)}),c.send({type:"observe",documentId:(0,b.vs)(e)});return()=>{for(let e of l)c.send({type:"unobserve",documentId:(0,b.qy)(e)}),c.send({type:"unobserve",documentId:(0,b.vs)(e)})}},o=[c,l],a[4]=c,a[5]=l,a[6]=i,a[7]=o):(i=a[6],o=a[7]),(0,y.useEffect)(i,o),null},s_=e=>{let t,n,r;let i=(0,m.c)(12),{comlink:o,dispatch:a,inFrame:s,inPopUp:l,onDrag:u,overlayEnabled:c,rootElement:d}=e,{dispatchDragEndEvent:h}=function(){let e,t,n;let r=(0,m.c)(4),{getDocument:i}=et();return r[0]!==i?(e=()=>{let e=e=>{let{insertPosition:t,target:n,preventInsertDefault:r}=e.detail;if(r)return;let o=function(e){if(e){let{top:t,right:n,bottom:r,left:i}=e;if(i||t)return{node:(i??t).sanity,position:"after"};if(n||r)return{node:(n??r).sanity,position:"before"}}}(t);if(o){let e=i(n.id),{node:t,position:r}=o,{key:a,hasExplicitKey:s}=ei(n),{path:l,key:u}=ei(t);l&&u&&u!==a&&e.patch(async e=>{let{getSnapshot:t}=e,i=Y(await t(),n.path);return s?[D(l,$({_key:a})),D(l,I(i,r,{_key:u}))]:[D(l,$(~~a)),D(l,I(i,r,u>a?~~u-1:~~u))]})}};return window.addEventListener("sanity/dragEnd",e),()=>{window.removeEventListener("sanity/dragEnd",e)}},t=[i],r[0]=i,r[1]=e,r[2]=t):(e=r[1],t=r[2]),(0,y.useEffect)(e,t),r[3]===Symbol.for("react.memo_cache_sentinel")?(n={dispatchDragEndEvent:aM},r[3]=n):n=r[3],n}(),f=tk();i[0]!==o||i[1]!==a||i[2]!==h||i[3]!==u||i[4]!==f?(t=e=>{if("element/click"===e.type){let{sanity:t}=e;o?.post("visual-editing/focus",t),f("Visual Editing Overlay Clicked",null)}else if("overlay/activate"===e.type)o?.post("visual-editing/toggle",{enabled:!0});else if("overlay/deactivate"===e.type)o?.post("visual-editing/toggle",{enabled:!1});else if("overlay/dragEnd"===e.type){let{insertPosition:t,target:n,dragGroup:r,flow:i,preventInsertDefault:o}=e;h({insertPosition:t,target:n,dragGroup:r,flow:i,preventInsertDefault:o}),t&&f("Visual Editing Drag Sequence Completed",null)}else if("overlay/dragUpdateCursorPosition"===e.type){u(e.x,e.y);return}else if("overlay/dragToggleMinimap"===e.type&&!0===e.display)f("Visual Editing Drag Minimap Enabled",null);else if("overlay/setCursor"===e.type){let{element:t,cursor:n}=e;n?t.style.cursor=n:t.style.removeProperty("cursor")}a(e)},i[0]=o,i[1]=a,i[2]=h,i[3]=u,i[4]=f,i[5]=t):t=i[5];let p=function(e,t,n,r){let i,o;let a=(0,m.c)(7),s=(0,y.useRef)(void 0),l=Z()!==z;return a[0]!==e||a[1]!==t||a[2]!==n||a[3]!==r||a[4]!==l?(i=()=>{if(e)return s.current=function({handler:e,overlayElement:t,inFrame:n,inPopUp:r,optimisticActorReady:i}){let o=!1,a=new Map,s=new WeakMap,l=new Set,u=new WeakMap,c=new WeakMap,d,h,f,p=!1,m=[],g=()=>m[m.length-1];function y(e,t){e.removeEventListener("click",t.click,{capture:!0}),e.removeEventListener("contextmenu",t.contextmenu,{capture:!0}),e.removeEventListener("mousemove",t.mousemove,{capture:!0}),e.removeEventListener("mousedown",t.mousedown,{capture:!0}),e.removeEventListener("mouseenter",t.mouseenter),e.removeEventListener("mouseleave",t.mouseleave)}function v({id:t,elements:n,handlers:r}){let{element:i,measureElement:o}=n;i.addEventListener("click",r.click,{capture:!0}),i.addEventListener("contextmenu",r.contextmenu,{capture:!0}),i.addEventListener("mousemove",r.mousemove,{once:!0,capture:!0}),i.addEventListener("mousedown",r.mousedown,{capture:!0}),d.observe(o),e({type:"element/activate",id:t})}function x({id:t,elements:n,handlers:r}){let{element:i,measureElement:o}=n;y(i,r),d.unobserve(o),m=m.filter(e=>e!==i),e({type:"element/deactivate",id:t})}function w(t){if(!(!n&&!r||!i))for(let n of m){if(t===n){let n=s.get(t)?.sanity;if(!n||!e0(n))return;if(e4(t,n,l,s)){let n=t.style.cursor;n&&c.set(t,n),e({type:"overlay/setCursor",element:t,cursor:"move"});continue}}S(n)}}function S(t){let n=c.get(t);e({type:"overlay/setCursor",element:t,cursor:n})}function k(c){for(let d of function e(t){let n=[];function r(e,t,n,r){let i=function(e){if("object"==typeof e&&null!==e)return em(e);try{let t=JSON.parse(e);return em(t)}catch{return function(e){let t=e.split(";").reduce((e,t)=>
362{let[n,r]=t.split("=");if(!n||t.includes("=")&&!r)return e;switch(n){case"id":e.id=r;break;case"type":e.type=r;break;case"path":e.path=b.eT.toString(function(e){let t=[];for(let n of e.split(".")){let e=ec.exec(n);if(e){t.push(e[1],Number(e[2]));continue}let r=ed.exec(n);if(r){t.push(r[1],[Number(r[2]),Number(r[3])]);continue}let i=eh.exec(n);if(i){t.push(i[1],{_key:i[2]});continue}t.push(n)}return t}(r));break;case"base":e.baseUrl=decodeURIComponent(r);break;case"perspective":e.perspective=r;break;case"tool":e.tool=r;break;case"workspace":e.workspace=r;break;case"projectId":e.projectId=r;break;case"dataset":e.dataset=r}return e},{});if((0,ea.is)(eu,t))return t}(e)}}(t);if(!i)return;let o=function e(t){let{display:n}=window.getComputedStyle(t);if("inline"!==n)return t;let r=t.parentElement;return r?e(r):null}(e);if(o)return{elements:{element:e,measureElement:o},sanity:i,reason:n,preventGrouping:r}}if(t)for(let i of t.childNodes)!function t(i,o){let a=function(t){let{nodeType:n,parentElement:i,textContent:o}=t;if(eK(t)&&t.dataset?.sanityEditTarget!==void 0){let n=e1(e(t).map(e=>"element"===e.type?e.commonSanity:void 0).filter(e=>void 0!==e));if(n)return{reason:"edit-target",elements:{element:t,measureElement:t},sanity:n}}else if(n===Node.TEXT_NODE&&i&&o){let e=eZ(o);return e?r(i,e,"stega-text",!0):void 0}else if(eK(t)){if("SCRIPT"===t.tagName||"SANITY-VISUAL-EDITING"===t.tagName)return;if(t.dataset?.sanity)return r(t,t.dataset.sanity,"data-attribute",!!(t.textContent&&eq(t.textContent)));if(t.dataset?.sanityEditInfo)return r(t,t.dataset.sanityEditInfo,"data-attribute",!!(t.textContent&&eq(t.textContent)));if(eX(t)){let e=eZ(t.alt,!0);return e?r(t,e,"stega-attribute"):void 0}if(eQ(t)){let e=eZ(t.dateTime,!0);return e?r(t,e,"stega-attribute"):void 0}if(eJ(t)){if(!t.ariaLabel)return;let e=eZ(t.ariaLabel,!0);return e?r(t,e,"stega-attribute"):void 0}}}(i),s=o;if(eK(i)&&i.dataset?.sanityEditGroup!==void 0&&(s={type:"group",elements:{element:i,measureElement:i},targets:[]},n.push(s)),a){let e={elements:a.elements,sanity:a.sanity,reason:a.reason};s&&!a.preventGrouping?s.targets.push(e):n.push({elements:a.elements,type:"element",targets:[e]})}if(eK(i)&&!eX(i)&&!("SCRIPT"===i.tagName||"SANITY-VISUAL-EDITING"===i.tagName))for(let e of i.childNodes)t(e,s)}(i,void 0);return n.map(e=>{if(0===e.targets.length&&"group"===e.type)return{...e,commonSanity:void 0};let t=1===e.targets.length?e.targets[0].sanity:e1(e.targets.map(({sanity:e})=>e).filter(e=>void 0!==e))||e.targets[0].sanity;return t?{...e,commonSanity:t}:null}).filter(e=>null!==e)}(c)){if("group"===d.type){for(let e of d.targets){let t=s.get(e.elements.element);t&&"element"===t.type&&E(e.elements.element)}0===d.targets.length&&E(d.elements.element)}if(!d.commonSanity)continue;let{element:c}=d.elements;s.has(c)?function(t){let{element:n}=t.elements,r=s.get(n);r&&(s.set(n,{...r,sanity:t.commonSanity}),e({type:"element/update",elementType:r.type,id:r.id,rect:e_(n),sanity:t.commonSanity,targets:t.targets.map(e=>({sanity:e.sanity,element:e.elements.element}))}))}(d):function({type:c,elements:d,commonSanity:f,targets:y}){let{element:b,measureElement:x}=d,k={click(t){let r=t.target;if(b===g()&&b.contains(r)){n&&(t.preventDefault(),t.stopPropagation());let r=s.get(b)?.sanity;r&&!p&&e({type:"element/click",id:E,sanity:r})}},contextmenu(t){if(!("path"in f)||!n&&!r||!i||!f.path.split(".").pop()?.includes("[_key=="))return;let o=t.target;b===g()&&b.contains(o)&&((n||r)&&(t.preventDefault(),t.stopPropagation()),e({type:"element/contextmenu",id:E,position:{x:t.clientX,y:t.clientY},sanity:f}))},mousedown(t){if(t.preventDefault(),t.currentTarget!==m.at(-1)||b.getAttribute("data-sanity-drag-disable")||!n&&!r||!i)return;let o=s.get(b)?.sanity;if(!o||!e0(o)||!e2(o.path))return;let a=e4(b,f,l,s);a&&function(e){var t;let{mouseEvent:n,element:r,overlayGroup:i,handler:o,target:a,onSequenceStart:s,onSequenceEnd:l}=e;if(0!==n.button)return;window.focus();let u=i.map(e=>e_(e.elements.element)),c=r.getAttribute("data-sanity-drag-flow")||((t=u).some(e=>t.filter(t=>!eA(e,t)).some(t=>e.y===t.y))?"horizontal":"vertical"),d=r.getAttribute("data-sanity-drag-group"),h=!!r.getAttribute("data-sanity-drag-minima
362p-disable"),f=!!r.getAttribute("data-sanity-drag-prevent-default"),p=r.getAttribute("data-unstable_sanity-drag-document-height"),m=r.getAttribute("data-unstable_sanity-drag-group-height"),g=null,y=eD(n),v=document.body,{minYScaled:b,scaleFactor:x}=function(e,t){let n=t||eI(e).height,r=(n+=200)>window.innerHeight?window.innerHeight/n:1,{min:i}=eI(e.map(e=>eR(e,r,{x:window.innerWidth/2,y:0})));return{scaleFactor:r,minYScaled:i-100*r}}(u,m?~~m:null),w=!1,S=!1,k=!0;eF||(eW={body:{overflow:window.getComputedStyle(document.body).overflow,height:window.getComputedStyle(document.body).height},documentElement:{overflow:window.getComputedStyle(document.documentElement).overflow,height:window.getComputedStyle(document.documentElement).height}},eH=p?~~p:document.documentElement.scrollHeight);let E=setInterval(()=>{u=i.map(e=>e_(e.elements.element))},150),j=()=>{x>=1||(o({type:"overlay/dragUpdateSkeleton",skeleton:eL(eU,r,x)}),o({type:"overlay/dragToggleMinimapPrompt",display:!1}),ez(v,x,b,o,150).then(()=>{setTimeout(()=>{o({type:"overlay/dragUpdateGroupRect",groupRect:eV(u)})},300)}))},C=e=>{Math.abs(e.deltaY)>=10&&x<1&&!eF&&!S&&!h&&k&&(o({type:"overlay/dragToggleMinimapPrompt",display:!0}),S=!0),!e.shiftKey||eF||h||(window.dispatchEvent(new CustomEvent("unstable_sanity/dragApplyMinimap")),eF=!0,setTimeout(()=>{j()},50))},_=e=>{if(e.preventDefault(),eB=function(e){let t=document.body,n=window.getComputedStyle(t).transform;if("none"===n)return{x:e.x,y:e.y};let r=new DOMMatrix(n).inverse(),i=new DOMPoint(e.x,e.y).matrixTransform(r);return{x:i.x,y:i.y}}(eU=eD(e)),4>Math.abs(eM(eU,y)))return;if(!w){let e=eV(u),t=eL(eU,r,1);o({type:"overlay/dragStart",flow:c}),o({type:"overlay/dragUpdateSkeleton",skeleton:t}),o({type:"overlay/dragUpdateGroupRect",groupRect:e}),w=!0,s()}o({type:"overlay/dragUpdateCursorPosition",x:eU.x,y:eU.y}),!e.shiftKey||eF||h||(window.dispatchEvent(new CustomEvent("unstable_sanity/dragApplyMinimap")),eF=!0,setTimeout(()=>{j()},50));let t=function(e,t,n){if("horizontal"===n){let r={x1:e.x,y1:e.y,x2:e.x-1e8,y2:e.y},i={x1:e.x,y1:e.y,x2:e.x+1e8,y2:e.y};return{left:eP(r,t,n),right:eP(i,t,n)}}{let r={x1:e.x,y1:e.y,x2:e.x,y2:e.y-1e8},i={x1:e.x,y1:e.y,x2:e.x,y2:e.y+1e8};return{top:eP(r,t,n),bottom:eP(i,t,n)}}}(eU,u,c);JSON.stringify(g)!==JSON.stringify(t)&&o({type:"overlay/dragUpdateInsertPosition",insertPosition:e$(i,g=t,c)})},T=()=>{k=!1,o({type:"overlay/dragEnd",target:a,insertPosition:g?e$(i,g,c):null,dragGroup:d,flow:c,preventInsertDefault:f}),S&&o({type:"overlay/dragToggleMinimapPrompt",display:!1}),eF||(clearInterval(E),l(),I(),R()),P()},A=e=>{"Shift"===e.key&&eF&&(eF=!1,o({type:"overlay/dragUpdateSkeleton",skeleton:eL(eU,r,1/x)}),window.dispatchEvent(new CustomEvent("unstable_sanity/dragResetMinimap")),setTimeout(()=>{eN(eB.y,v,eH,o,150,eW)},50),o({type:"overlay/dragUpdateGroupRect",groupRect:null}),k||(clearInterval(E),P(),I(),R(),l()))},M=()=>{o({type:"overlay/dragUpdateGroupRect",groupRect:null}),window.dispatchEvent(new CustomEvent("unstable_sanity/dragResetMinimap")),setTimeout(()=>{eN(eB.y,v,eH,o,150,eW).then(()=>{eF=!1})},50),clearInterval(E),P(),I(),R(),l()},P=()=>{window.removeEventListener("mousemove",_),window.removeEventListener("wheel",C),window.removeEventListener("mouseup",T)},R=()=>{window.removeEventListener("keyup",A)},I=()=>{window.removeEventListener("blur",M)};window.addEventListener("blur",M),window.addEventListener("keyup",A),window.addEventListener("wheel",C),window.addEventListener("mousemove",_),window.addEventListener("mouseup",T)}({element:b,handler:e,mouseEvent:t,overlayGroup:a,target:o,onSequenceStart:()=>{p=!0},onSequenceEnd:()=>{setTimeout(()=>{p=!1},250)}})},mousemove(e){k.mouseenter(e);let t=e.currentTarget;t&&(t.addEventListener("mouseenter",k.mouseenter),t.addEventListener("mouseleave",k.mouseleave))},mouseenter(){document.querySelector("vercel-live-feedback")&&b.closest("[data-vercel-edit-info]")||b.closest("[data-vercel-edit-target]")||(m.push(b),e({type:"element/mouseenter",id:E,rect:e_(b)}),w(b))},mouseleave(n){function r(){m.pop();let t=g();if(e({type:"element/mouseleave",id:E}),t){w(t);let n=s.get(t);n&&e({type:"element/mouseenter",id:n.id,rect:e_(t)})}S(b)}let{relatedTarget:i}=n,o=eY(i),a=t.contains(o);if(eG(o)&&a)return function e(t){let n=i=>{let{relatedTarget:o}=i;eY(o)?o&&eG(o)&&(t.removeEventListener("mouseleave",n),e(o)):(t.removeEventListener("mouseleave",n),r())};t.addEventListener("mouseleave",n)}(o);r()}},E=eC(),j={type:c,id:E,elements:d,sanity:f,handlers:k};l.add(b),u.set(x,b),a.set(E,b),s.set(b,j),h?.observe(b),e({type:"element/register",elementType:c,id:E,element:b,rect:e_(b),sanity:f,dragDisabled:!!b.getAttribute("data-sanity-drag-disable"),targets:y.map(e=>({sanity:e.sanity,element:e.elements.element}))}),o&&v(j)}(d)}}function E(t){let n=s.get(t);if(n){let{id:r,handlers:i}=n;y(t,i),d.unobserve(t),s.delete(t),l.delete(t),a.delete(r),e({type:"element/unregister",id:r})}}function j(t){let n=s.get(t);n&&e({type:"element/updateRect",id:n.id,rect:e_(t)})}function C(e){if(o)for(let t of e){let{target:e}=t,n=eG(e)&&s.get(e);n&&(t.isIntersecting?v(n):x(n))}}function _(t){let n=eY(t.target);if(n){"capture"===n.dataset.sanityOverlayElement&&(t.preventDefault(),t.stopPropagation());return}m=[],e({type:"overlay/blur"})}function T(){m=[],e({type:"overlay/reset-mouse-state"})}function A(){for(let e of l)j(e)}function M(t){"Escape"===t.key&&(m=[],e({type:"overlay/blur"}))}function P(e){let{target:t}=e;if(!(t===window.document||!eG(t)))for(let e of l)t.contains(e)&&j(e)}function R(){o||(h=new IntersectionObserver(C,{threshold:.3}
362),l.forEach(e=>h.observe(e)),e({type:"overlay/activate"}),o=!0)}function I(){o&&(h?.disconnect(),l.forEach(e=>{let t=s.get(e);t&&x(t)}),e({type:"overlay/deactivate"}),o=!1)}function O(t){let{id:n}=t.detail,r=a.get(n);if(!r)return;let i=s.get(r)?.sanity;i&&e({type:"element/click",id:n,sanity:i})}return window.document.fonts.ready.then(()=>{for(let e of l)j(e)}),window.addEventListener("click",_),window.addEventListener("contextmenu",_),window.addEventListener("sanity-overlay/exclusive-plugin-closed",T),window.addEventListener("sanity-overlay/label-click",O),window.addEventListener("keydown",M),window.addEventListener("resize",A),window.addEventListener("scroll",P,{capture:!0,passive:!0}),d=new ResizeObserver(function(e){for(let t of e){let e=t.target;if(eG(e)){let t=u.get(e);if(!t)return;j(t)}}}),(f=new MutationObserver(function(e){let n=!1;for(let r of e){let{target:e,type:i}=r,o="characterData"===i?e.parentElement:e;if(!(o===t||t.contains(o))&&(n=!0,eG(o))){let e=o.parentElement?.closest("[data-sanity-edit-group]")||null;k({childNodes:[eG(e)?e:o]})}}if(n)for(let e of l)e.isConnected||E(e),s.get(e)?.type!=="group"||e.hasAttribute("data-sanity-edit-group")||E(e)})).observe(document.body,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),k(document.body),R(),{activate:R,deactivate:I,destroy:function(){window.removeEventListener("click",_),window.removeEventListener("contextmenu",_),window.removeEventListener("sanity-overlay/exclusive-plugin-closed",T),window.removeEventListener("sanity-overlay/label-click",O),window.removeEventListener("keydown",M),window.removeEventListener("resize",A),window.removeEventListener("scroll",P),f.disconnect(),d.disconnect(),l.forEach(e=>{E(e)}),a.clear(),l.clear(),m=[],I()}}}({handler:t,overlayElement:e,inFrame:n,inPopUp:r,optimisticActorReady:l}),()=>{s.current?.destroy(),s.current=void 0}},o=[e,t,n,r,l],a[0]=e,a[1]=t,a[2]=n,a[3]=r,a[4]=l,a[5]=i,a[6]=o):(i=a[5],o=a[6]),(0,y.useEffect)(i,o),s}(d,t,s,l);return i[6]!==p.current||i[7]!==c?(n=()=>{c?p.current?.activate():p.current?.deactivate()},i[6]=p.current,i[7]=c,i[8]=n):n=i[8],i[9]!==p||i[10]!==c?(r=[p,c],i[9]=p,i[10]=c,i[11]=r):r=i[11],(0,y.useEffect)(n,r),null},sT=e=>{let t,n,r,i,o,a,s,l,u,c,d,h,f,g,v,b,w,S,k,E,j,C,_,T,A;let M=(0,m.c)(76),{comlink:P,comlinkStatus:R,componentResolver:I,inFrame:O,inPopUp:$,zIndex:D}=e,L=(0,x.Bj)();M[0]===Symbol.for("react.memo_cache_sentinel")?(t={contextMenu:null,dragInsertPosition:null,dragShowMinimap:!1,dragShowMinimapPrompt:!1,dragSkeleton:null,elements:[],focusPath:"",isDragging:!1,perspective:"published",wasMaybeCollapsed:!1,dragMinimapTransition:!1,dragGroupRect:null},M[0]=t):t=M[0];let[V,N]=(0,y.useReducer)(su,t),{contextMenu:F,dragInsertPosition:B,dragShowMinimap:U,dragShowMinimapPrompt:H,dragSkeleton:W,elements:G,isDragging:Y,perspective:q,wasMaybeCollapsed:K,dragMinimapTransition:X,dragGroupRect:Q}=V,[J,ee]=(0,y.useState)(null),[et,en]=(0,y.useState)(!0);M[1]!==P?(n=()=>{let e=[P?.on("presentation/focus",e=>{N({type:"presentation/focus",data:e})}),P?.on("presentation/blur",e=>{N({type:"presentation/blur",data:e})}),P?.on("presentation/toggle-overlay",()=>{en(sR)})].filter(Boolean);return()=>e.forEach(sI)},r=[P],M[1]=P,M[2]=n,M[3]=r):(n=M[2],r=M[3]),(0,y.useEffect)(n,r),function(e,t){let n,r;let i=(0,m.c)(4);i[0]!==e||i[1]!==t?(n=()=>{let n=new AbortController;e?.fetch("visual-editing/fetch-perspective",void 0,{signal:n.signal,suppressWarnings:!0}).then(e=>{t({type:"presentation/perspective",data:e})}).catch(sx);let r=e?.on("presentation/perspective",e=>{t({type:"presentation/perspective",data:e})});return()=>{r?.(),n.abort()}},r=[e,t],i[0]=e,i[1]=t,i[2]=n,i[3]=r):(n=i[2],r=i[3]),(0,y.useEffect)(n,r)}(P,N),function(e,t,n){let r,i,o;let a=(0,m.c)(7),s=(0,y.useRef)(void 0);a[0]!==e?(r=(t,n)=>{e?.post("visual-editing/documents",{documents:t,perspective:n})},a[0]=e,a[1]=r):r=a[1];let l=r;a[2]!==t||a[3]!==n||a[4]!==l?(i=()=>{let e=t.map(sk).filter(sS),r=new Set(e.map(sw));if(!s.current||!function(e,t){if(e===t)return!0;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}(r,s.current.nodeIds)||n!==s.current.perspective){let t=Array.from(r).map(t=>{let{type:n,projectId:r,dataset:i}=e.find(e=>e.id===t);return r&&i?{_id:t,_type:n,_projectId:r,_dataset:i}:{_id:t,_type:n}});s.current={nodeIds:r,perspective:n},l(t,n)}},o=[t,n,l],a[2]=t,a[3]=n,a[4]=l,a[5]=i,a[6]=o):(i=a[5],o=a[6]),(0,y.useEffect)(i,o)}(P,G,q),M[4]!==J?(i=(e,t)=>{J&&(J.style.setProperty("--drag-preview-x",`${e}px`),J.style.setProperty("--drag-preview-y",`${t-window.scrollY}px`))},M[4]=J,M[5]=i):i=M[5];let er=i;M[6]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{let e=e=>{sM(e)&&en(s$)},t=e=>{sM(e)&&en(sD),["mod","\\"].every(t=>sA[t]?e[sA[t]]:e.key===t.toUpperCase())&&en(sL)};
362return window.addEventListener("click",sO),window.addEventListener("keydown",t),window.addEventListener("keyup",e),()=>{window.removeEventListener("click",sO),window.removeEventListener("keydown",t),window.removeEventListener("keyup",e)}},a=[en],M[6]=o,M[7]=a):(o=M[6],a=M[7]),(0,y.useEffect)(o,a);let[ei,eo]=(0,y.useState)(!1),[ea,es]=(0,y.useState)(!1),el=(0,y.useRef)(void 0);M[8]!==et?(s=()=>{if(et)return sj(()=>{eo(!0),sj(()=>{es(!0),el.current=setTimeout(()=>{es(!1),eo(!1)},1500)})});el.current&&(clearTimeout(el.current),eo(!1),es(!1))},l=[et],M[8]=et,M[9]=s,M[10]=l):(s=M[9],l=M[10]),(0,y.useEffect)(s,l),M[11]!==G?(c=G.flatMap(sz),M[11]=G,M[12]=c):c=M[12],u=c,M[13]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{N({type:"overlay/blur"})},M[13]=d):d=M[13];let eu=d,ec=Z()!==z;h=ec?I:void 0;e:{let t;if((O||$)&&"connected"!==R||Y){let e;M[14]===Symbol.for("react.memo_cache_sentinel")?(e=[],M[14]=e):e=M[14],f=e;break e}M[15]!==P||M[16]!==h||M[17]!==X||M[18]!==U||M[19]!==G||M[20]!==O||M[21]!==Y||M[22]!==ec||M[23]!==e.plugins||M[24]!==K?(t=G.filter(sV).map(t=>{let{id:n,element:r,focused:i,hovered:o,rect:a,sanity:s,dragDisabled:l,targets:u,elementType:c}=t,d=!l&&!!r.getAttribute("data-sanity")&&ec&&G.some(e=>"id"in e.sanity&&"id"in s&&e3(e.sanity,s)&&e.sanity.path!==s.path);return(0,p.jsx)(a0,{comlink:P,componentResolver:h,plugins:e.plugins,element:r,enableScrollIntoView:!Y&&!X&&!U,id:n,focused:i,hovered:o,node:s,rect:a,showActions:!O,draggable:d,isDragging:Y||X,wasMaybeCollapsed:i&&K,targets:u,elementType:c},n)}),M[15]=P,M[16]=h,M[17]=X,M[18]=U,M[19]=G,M[20]=O,M[21]=Y,M[22]=ec,M[23]=e.plugins,M[24]=K,M[25]=t):t=M[25],f=t}let ed=f,eh=L?"dark":"light",ef=ea?"":void 0,ep=ei?"":void 0;return M[26]!==u||M[27]!==q?(g=(0,p.jsx)(sC,{documentIds:u,perspective:q}),M[26]=u,M[27]=q,M[28]=g):g=M[28],M[29]!==P||M[30]!==O||M[31]!==$||M[32]!==et||M[33]!==J||M[34]!==er?(v=(0,p.jsx)(s_,{comlink:P,dispatch:N,inFrame:O,inPopUp:$,onDrag:er,overlayEnabled:et,rootElement:J}),M[29]=P,M[30]=O,M[31]=$,M[32]=et,M[33]=J,M[34]=er,M[35]=v):v=M[35],M[36]!==F?(b=F&&(0,p.jsx)(aB,{...F,onDismiss:eu}),M[36]=F,M[37]=b):b=M[37],M[38]!==Q||M[39]!==B||M[40]!==X||M[41]!==H||M[42]!==Y?(w=Y&&!X&&(0,p.jsxs)(p.Fragment,{children:[B&&(0,p.jsx)(st,{dragInsertPosition:B}),H&&(0,p.jsx)(ss,{}),Q&&(0,p.jsx)(se,{dragGroupRect:Q})]}),M[38]=Q,M[39]=B,M[40]=X,M[41]=H,M[42]=Y,M[43]=w):w=M[43],M[44]!==W||M[45]!==Y?(S=Y&&W&&(0,p.jsx)(sr,{skeleton:W}),M[44]=W,M[45]=Y,M[46]=S):S=M[46],M[47]!==ed||M[48]!==ef||M[49]!==ep||M[50]!==g||M[51]!==v||M[52]!==b||M[53]!==w||M[54]!==S||M[55]!==D?(k=(0,p.jsxs)(sE,{"data-fading-out":ef,"data-overlays":ep,ref:ee,$zIndex:D,children:[g,v,b,ed,w,S]}),M[47]=ed,M[48]=ef,M[49]=ep,M[50]=g,M[51]=v,M[52]=b,M[53]=w,M[54]=S,M[55]=D,M[56]=k):k=M[56],M[57]!==P||M[58]!==k?(E=(0,p.jsx)(sg,{comlink:P,children:k}),M[57]=P,M[58]=k,M[59]=E):E=M[59],M[60]!==P||M[61]!==E?(j=(0,p.jsx)(sc,{comlink:P,children:E}),M[60]=P,M[61]=E,M[62]=j):j=M[62],M[63]!==P||M[64]!==G||M[65]!==j?(C=(0,p.jsx)(sf,{comlink:P,elements:G,children:j}),M[63]=P,M[64]=G,M[65]=j,M[66]=C):C=M[66],M[67]!==J||M[68]!==C?(_=(0,p.jsx)(x.li,{children:(0,p.jsx)(x.Xp,{element:J,children:C})}),M[67]=J,M[68]=C,M[69]=_):_=M[69],M[70]!==eh||M[71]!==_?(T=(0,p.jsx)(x.f6,{scheme:eh,theme:x.Lg,tone:"transparent",children:_}),M[70]=eh,M[71]=_,M[72]=T):T=M[72],M[73]!==P||M[74]!==T?(A=(0,p.jsx)(sb,{comlink:P,children:T}),M[73]=P,M[74]=T,M[75]=A):A=M[75],A},sA={alt:"altKey",ctrl:"ctrlKey",mod:"u">typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform)?"metaKey":"ctrlKey",shift:"shiftKey"};function sM(e){return"Alt"===e.key}function sP(e,t){return e.filter(e=>e!==t)}function sR(e){return!e}function sI(e){return e()}function sO(e){let t=e.target;if(((0,x.bg)(t)||(0,x.Re)(t)&&t.closest("a"))&&e.altKey){e.preventDefault(),e.stopPropagation();let t=new MouseEvent(e.type,{...e,altKey:!1,bubbles:!0,cancelable:!0});e.target?.dispatchEvent(t)}}function s$(e){return!e}function sD(e){return!e}function sL(e){return!e}function sz(e){return"id"in e.sanity?[e.sanity.id]:[]}function sV(e){return e.activated||e.focused}let sN=e=>{let t,n;let r=(0,m.c)(4),{comlink:i,refresh:o}=e,a=(0,y.useRef)(0),s=(0,y.useRef)(0);return r[0]!==i||r[1]!==o?(t=()=>i.on("presentation/refresh",e=>{if("manual"===e.source){clearTimeout(a.current);
362let t=o(e);if(!1===t)return;i.post("visual-editing/refreshing",e);let n=!1;a.current=window.setTimeout(()=>{i.post("visual-editing/refreshed",e),n=!0},3e3),t?.finally?.(()=>{n||(clearTimeout(a.current),i.post("visual-editing/refreshed",e))})}else if("mutation"===e.source){clearTimeout(s.current);let t=o(e);if(!1===t)return;i.post("visual-editing/refreshing",e),s.current=window.setTimeout(()=>{let t=o(e);!1!==t&&(i.post("visual-editing/refreshing",e),t?.finally?.(()=>{i.post("visual-editing/refreshed",e)})||i.post("visual-editing/refreshed",e))},1e3),t?.finally?.(()=>{i.post("visual-editing/refreshed",e)})||i.post("visual-editing/refreshed",e)}}),n=[i,o],r[0]=i,r[1]=o,r[2]=t,r[3]=n):(t=r[2],n=r[3]),(0,y.useEffect)(t,n),null};function sF(e){let{data:t,origin:n}=e;t&&"object"==typeof t&&"domain"in t&&"sanity/channels"===t.domain&&"from"in t&&"presentation"===t.from&&"type"in t&&"presentation/status"===t.type&&window.parent.postMessage({domain:"sanity/channels",type:"visual-editing/status",data:{origin:location.origin}},n)}function sB(){console.warn("[@sanity/visual-editing] Package version mismatch detected: Please update your Sanity studio to prevent potential compatibility issues.")}function sU(){}let sH=e=>{let t,n,r,i,o,a,s,l;let u=(0,m.c)(23),{components:c,plugins:d,history:h,portal:f,refresh:b,zIndex:x}=e,w=void 0===f||f,[S,k]=(0,y.useState)(null),[E,j]=(0,y.useState)(null);u[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{k((0,g.el)()),j((0,g.Ax)())},n=[],u[0]=t,u[1]=n):(t=u[0],n=u[1]),(0,y.useEffect)(t,n);let[C,_]=(0,y.useState)(null);u[2]!==w?(r=()=>{if(!1===w)return;let e=document.createElement("sanity-visual-editing");return document.documentElement.appendChild(e),_(e),()=>{_(null),document.documentElement.contains(e)&&document.documentElement.removeChild(e)}},i=[w],u[2]=w,u[3]=r,u[4]=i):(r=u[3],i=u[4]),(0,y.useEffect)(r,i);let[T,A]=function(e){let t,n,r,i,o;let a=(0,m.c)(9),s=void 0===e||e,[l,u]=(0,y.useState)(),[c,d]=(0,y.useState)("idle");return a[0]!==s?(t=()=>{if(!s)return;let e=(0,nA.dS)({name:"visual-editing",connectTo:"presentation"},(0,nA.zB)().provide({actors:(0,g.XP)()})),t=e.onStatus(()=>d("connected"),"connected");u(e);let n=e.start();return()=>{t(),n(),u(void 0)}},n=[s],a[0]=s,a[1]=t,a[2]=n):(t=a[1],n=a[2]),(0,y.useEffect)(t,n),a[3]!==c?(r=()=>{if("connected"===c)return;let e=new AbortController;return window.addEventListener("message",sF,{signal:e.signal}),()=>{e.abort()}},i=[c],a[3]=c,a[4]=r,a[5]=i):(r=a[4],i=a[5]),(0,y.useEffect)(r,i),a[6]!==l||a[7]!==c?(o=[l,c],a[6]=l,a[7]=c,a[8]=o):o=a[8],o}(!0===S||!0===E);(function(e){let t,n;let r=(0,m.c)(3);r[0]!==e?(t=()=>{if(!e)return;let t=function(e){let t=new nP.t(1),n=new nR.x;return e.fetch("visual-editing/snapshot-welcome",void 0,{suppressWarnings:!0}).then(e=>{t.next(e.event)}).catch(()=>{}
362),e.on("presentation/snapshot-event",e=>{"reconnect"===e.event.type&&t.next(e.event),"mutation"===e.event.type&&n.next(e.event)}),(0,nI.T)(t,n)}(e),n=a_(e),r=(0,nM.c)(n,{input:{client:{withConfig:sU},sharedListener:t}});r.start();let i=new AbortController;return e.fetch("visual-editing/features",void 0,{signal:i.signal,suppressWarnings:!0}).then(e=>{e.features.optimistic&&function(e){for(let t of(V=e,N))t()}(r)}).catch(sB),()=>{r.stop(),i.abort()}},n=[e],r[0]=e,r[1]=t,r[2]=n):(t=r[1],n=r[2]),(0,y.useEffect)(t,n)})("connected"===A?T:void 0),u[5]!==T||u[6]!==A||u[7]!==c||u[8]!==S||u[9]!==E||u[10]!==d||u[11]!==x?(o=null!==S&&null!==E&&(0,p.jsx)(sT,{comlink:T,comlinkStatus:A,componentResolver:c,plugins:d,inFrame:S,inPopUp:E,zIndex:x}),u[5]=T,u[6]=A,u[7]=c,u[8]=S,u[9]=E,u[10]=d,u[11]=x,u[12]=o):o=u[12],u[13]!==T||u[14]!==h||u[15]!==b?(a=T&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(aT,{comlink:T,history:h}),(0,p.jsx)(aA,{comlink:T}),b&&(0,p.jsx)(sN,{comlink:T,refresh:b})]}),u[13]=T,u[14]=h,u[15]=b,u[16]=a):a=u[16],u[17]!==o||u[18]!==a?(s=(0,p.jsxs)(p.Fragment,{children:[o,a]}),u[17]=o,u[18]=a,u[19]=s):s=u[19];let M=s;return!1!==w&&C?(u[20]!==M||u[21]!==C?(l=(0,v.createPortal)(M,C),u[20]=M,u[21]=C,u[22]=l):l=u[22],l):M};sH.displayName="VisualEditing";var sW=n(47863);n(6578);var sG=(0,n(55880).$)("12a2c07918574ac8e517dbc2e3f98999640d93a3");function sY(e){let t=e.indexOf("#"),n=e.indexOf("?"),r=n>-1&&(t<0||n<t);return r||t>-1?{pathname:e.substring(0,r?n:t),query:r?e.substring(n,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}function sq(e,t){if(!function(e,t){if("string"!=typeof e)return!1;let{pathname:n}=sY(e);return n===t||n.startsWith(`${t}/`)}(e,t))return e;let n=e.slice(t.length);return n.startsWith("/")?n:`/${n}`}let sZ=(e,t)=>{let{pathname:n,query:r,hash:i}=sY(e);return t?n.endsWith("/")?`${n}${r}${i}`:`${n}/${r}${i}`:`${n.replace(/\/$/,"")||"/"}${r}${i}`};function sK(e){let{basePath:t="",plugins:n,components:r,refresh:i,trailingSlash:o=!1,zIndex:a}=e,s=(0,sW.useRouter)(),l=(0,y.useRef)(s),[u,c]=(0,y.useState)();(0,y.useEffect)(()=>{l.current=s},[s]);let d=(0,y.useMemo)(()=>({subscribe:e=>(c(()=>e),()=>c(void 0)),update:e=>{switch(e.type){case"push":return l.current.push(sq(e.url,t));case"pop":return l.current.back();case"replace":return l.current.replace(sq(e.url,t));default:throw Error(`Unknown update type: ${e.type}`)}}}),[t]),h=(0,sW.usePathname)(),f=(0,sW.useSearchParams)();(0,y.useEffect)(()=>{u&&u({type:"push",url:sZ(function(e,t){if(!e.startsWith("/")||!t)return e;if("/"===e&&t)return t;let{pathname:n,query:r,hash:i}=sY(e);return`${t}${n}${r}${i}`}(`${h}${f?.size?`?${f}`:""}`,t),o)})},[t,u,h,f,o]);let m=(0,y.useCallback)(e=>{if(i)return i(e);switch(e.source){case"manual":return e.livePreviewEnabled?(console.debug("Live preview is setup, calling router.refresh() to refresh the server components without refetching cached data"),l.current.refresh(),Promise.resolve()):(console.debug("No loaders in live mode detected, or preview kit setup, revalidating root layout"),sG());case"mutation":return e.livePreviewEnabled?(console.debug("Live preview is setup, mutation is skipped assuming its handled by the live preview"),!1):(console.debug("No loaders in live mode detected, or preview kit setup, revalidating root layout"),sG());default:throw Error("Unknown refresh source",{cause:e})}},[i]);return(0,p.jsx)(sH,{plugins:n,components:r,history:d,portal:!0,refresh:m,zIndex:a})}}}]);

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.