beesoft-components 0.12.4 → 0.12.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +10835 -10767
- package/dist/index.es.js.gz +0 -0
- package/dist/index.umd.js +78 -78
- package/dist/index.umd.js.gz +0 -0
- package/package.json +6 -5
- package/types/index.d.ts +24 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(ne,X){typeof exports=="object"&&typeof module<"u"?X(exports,require("react/jsx-runtime"),require("react"),require("@beesoft/locale"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","@beesoft/locale","react-dom"],X):(ne=typeof globalThis<"u"?globalThis:ne||self,X(ne.BeeSoftComponents={},ne.React,ne.React,ne["beesoft-locale"],ne.ReactDOM))})(this,(function(ne,X,w,vT,ST){"use strict";function bT(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const i in n)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}return t.default=n,Object.freeze(t)}const wa=bT(w),ET=Math.PI/180;function TT(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const oc=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},Mt={_global:oc,version:"10.0.12",isBrowser:TT(),isUnminified:/param/.test((function(n){}).toString()),dblClickWindow:400,getAngle(n){return Mt.angleDeg?n*ET:n},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,_renderBackend:"web",legacyTextRendering:!1,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return Mt.DD.isDragging},isTransforming(){var n,t;return(t=(n=Mt.Transformer)===null||n===void 0?void 0:n.isTransforming())!==null&&t!==void 0?t:!1},isDragReady(){return!!Mt.DD.node},releaseCanvasOnDestroy:!0,document:oc.document,_injectGlobal(n){typeof oc.Konva<"u"&&console.error("Several Konva instances detected. It is not recommended to use multiple Konva instances in the same environment."),oc.Konva=n}},Cn=n=>{Mt[n.prototype.getClassName()]=n};Mt._injectGlobal(Mt);const CT=`Konva.js unsupported environment.
|
|
2
2
|
|
|
3
3
|
Looks like you are trying to use Konva.js in Node.js environment. because "document" object is undefined.
|
|
4
4
|
|
|
@@ -11,66 +11,66 @@ or
|
|
|
11
11
|
|
|
12
12
|
bash: npm install skia-canvas
|
|
13
13
|
js: import "konva/skia-backend";
|
|
14
|
-
`,c5=()=>{if(typeof document>"u")throw new Error(TT)};class Qi{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new Qi(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){const i=this.m;return{x:i[0]*t.x+i[2]*t.y+i[4],y:i[1]*t.x+i[3]*t.y+i[5]}}translate(t,i){return this.m[4]+=this.m[0]*t+this.m[2]*i,this.m[5]+=this.m[1]*t+this.m[3]*i,this}scale(t,i){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=i,this.m[3]*=i,this}rotate(t){const i=Math.cos(t),s=Math.sin(t),u=this.m[0]*i+this.m[2]*s,c=this.m[1]*i+this.m[3]*s,f=this.m[0]*-s+this.m[2]*i,p=this.m[1]*-s+this.m[3]*i;return this.m[0]=u,this.m[1]=c,this.m[2]=f,this.m[3]=p,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,i){const s=this.m[0]+this.m[2]*i,u=this.m[1]+this.m[3]*i,c=this.m[2]+this.m[0]*t,f=this.m[3]+this.m[1]*t;return this.m[0]=s,this.m[1]=u,this.m[2]=c,this.m[3]=f,this}multiply(t){const i=this.m[0]*t.m[0]+this.m[2]*t.m[1],s=this.m[1]*t.m[0]+this.m[3]*t.m[1],u=this.m[0]*t.m[2]+this.m[2]*t.m[3],c=this.m[1]*t.m[2]+this.m[3]*t.m[3],f=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],p=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=i,this.m[1]=s,this.m[2]=u,this.m[3]=c,this.m[4]=f,this.m[5]=p,this}invert(){const t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),i=this.m[3]*t,s=-this.m[1]*t,u=-this.m[2]*t,c=this.m[0]*t,f=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),p=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=i,this.m[1]=s,this.m[2]=u,this.m[3]=c,this.m[4]=f,this.m[5]=p,this}getMatrix(){return this.m}decompose(){const t=this.m[0],i=this.m[1],s=this.m[2],u=this.m[3],c=this.m[4],f=this.m[5],p=t*u-i*s,m={x:c,y:f,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||i!=0){const S=Math.sqrt(t*t+i*i);m.rotation=i>0?Math.acos(t/S):-Math.acos(t/S),m.scaleX=S,m.scaleY=p/S,m.skewX=(t*s+i*u)/p,m.skewY=0}else if(s!=0||u!=0){const S=Math.sqrt(s*s+u*u);m.rotation=Math.PI/2-(u>0?Math.acos(-s/S):-Math.acos(s/S)),m.scaleX=p/S,m.scaleY=S,m.skewX=0,m.skewY=(t*s+i*u)/p}return m.rotation=k._getRotation(m.rotation),m}}const CT="[object Array]",_T="[object Number]",xT="[object String]",DT="[object Boolean]",AT=Math.PI/180,MT=180/Math.PI,Hp="#",NT="",OT="0",RT="Konva warning: ",f5="Konva error: ",zT="rgb(",S2={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},HT=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/;let E1=[],wp=null;const wT=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(n){setTimeout(n,60)},k={_isElement(n){return!!(n&&n.nodeType==1)},_isFunction(n){return!!(n&&n.constructor&&n.call&&n.apply)},_isPlainObject(n){return!!n&&n.constructor===Object},_isArray(n){return Object.prototype.toString.call(n)===CT},_isNumber(n){return Object.prototype.toString.call(n)===_T&&!isNaN(n)&&isFinite(n)},_isString(n){return Object.prototype.toString.call(n)===xT},_isBoolean(n){return Object.prototype.toString.call(n)===DT},isObject(n){return n instanceof Object},isValidSelector(n){if(typeof n!="string")return!1;const t=n[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(n){return n===0||n>0?1:-1},requestAnimFrame(n){E1.push(n),E1.length===1&&wT(function(){const t=E1;E1=[],t.forEach(function(i){i()})})},createCanvasElement(){c5();const n=document.createElement("canvas");try{n.style=n.style||{}}catch{}return n},createImageElement(){return c5(),document.createElement("img")},_isInDocument(n){for(;n=n.parentNode;)if(n==document)return!0;return!1},_urlToImage(n,t){const i=k.createImageElement();i.onload=function(){t(i)},i.src=n},_rgbToHex(n,t,i){return((1<<24)+(n<<16)+(t<<8)+i).toString(16).slice(1)},_hexToRgb(n){n=n.replace(Hp,NT);const t=parseInt(n,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){let n=(Math.random()*16777215<<0).toString(16);for(;n.length<6;)n=OT+n;return Hp+n},isCanvasFarblingActive(){if(wp!==null)return wp;if(typeof document>"u")return wp=!1,!1;const n=this.createCanvasElement();n.width=10,n.height=10;const t=n.getContext("2d",{willReadFrequently:!0});t.clearRect(0,0,10,10),t.fillStyle="#282828",t.fillRect(0,0,10,10);const i=t.getImageData(0,0,10,10).data;let s=!1;for(let u=0;u<100;u++)if(i[u*4]!==40||i[u*4+1]!==40||i[u*4+2]!==40||i[u*4+3]!==255){s=!0;break}return wp=s,this.releaseCanvas(n),wp},getHitColor(){const n=this.getRandomColor();return this.isCanvasFarblingActive()?this.getSnappedHexColor(n):n},getHitColorKey(n,t,i){return this.isCanvasFarblingActive()&&(n=Math.round(n/5)*5,t=Math.round(t/5)*5,i=Math.round(i/5)*5),Hp+this._rgbToHex(n,t,i)},getSnappedHexColor(n){const t=this._hexToRgb(n);return Hp+this._rgbToHex(Math.round(t.r/5)*5,Math.round(t.g/5)*5,Math.round(t.b/5)*5)},getRGB(n){let t;return n in S2?(t=S2[n],{r:t[0],g:t[1],b:t[2]}):n[0]===Hp?this._hexToRgb(n.substring(1)):n.substr(0,4)===zT?(t=HT.exec(n.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(n){return n=n||"black",k._namedColorToRBA(n)||k._hex3ColorToRGBA(n)||k._hex4ColorToRGBA(n)||k._hex6ColorToRGBA(n)||k._hex8ColorToRGBA(n)||k._rgbColorToRGBA(n)||k._rgbaColorToRGBA(n)||k._hslColorToRGBA(n)},_namedColorToRBA(n){const t=S2[n.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(n){if(n.indexOf("rgb(")===0){n=n.match(/rgb\(([^)]+)\)/)[1];const t=n.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(n){if(n.indexOf("rgba(")===0){n=n.match(/rgba\(([^)]+)\)/)[1];const t=n.split(/ *, */).map((i,s)=>i.slice(-1)==="%"?s===3?parseInt(i)/100:parseInt(i)/100*255:Number(i));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex8ColorToRGBA(n){if(n[0]==="#"&&n.length===9)return{r:parseInt(n.slice(1,3),16),g:parseInt(n.slice(3,5),16),b:parseInt(n.slice(5,7),16),a:parseInt(n.slice(7,9),16)/255}},_hex6ColorToRGBA(n){if(n[0]==="#"&&n.length===7)return{r:parseInt(n.slice(1,3),16),g:parseInt(n.slice(3,5),16),b:parseInt(n.slice(5,7),16),a:1}},_hex4ColorToRGBA(n){if(n[0]==="#"&&n.length===5)return{r:parseInt(n[1]+n[1],16),g:parseInt(n[2]+n[2],16),b:parseInt(n[3]+n[3],16),a:parseInt(n[4]+n[4],16)/255}},_hex3ColorToRGBA(n){if(n[0]==="#"&&n.length===4)return{r:parseInt(n[1]+n[1],16),g:parseInt(n[2]+n[2],16),b:parseInt(n[3]+n[3],16),a:1}},_hslColorToRGBA(n){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(n)){const[t,...i]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(n),s=Number(i[0])/360,u=Number(i[1])/100,c=Number(i[2])/100;let f,p,m;if(u===0)return m=c*255,{r:Math.round(m),g:Math.round(m),b:Math.round(m),a:1};c<.5?f=c*(1+u):f=c+u-c*u;const S=2*c-f,b=[0,0,0];for(let _=0;_<3;_++)p=s+1/3*-(_-1),p<0&&p++,p>1&&p--,6*p<1?m=S+(f-S)*6*p:2*p<1?m=f:3*p<2?m=S+(f-S)*(2/3-p)*6:m=S,b[_]=m*255;return{r:Math.round(b[0]),g:Math.round(b[1]),b:Math.round(b[2]),a:1}}},haveIntersection(n,t){return!(t.x>n.x+n.width||t.x+t.width<n.x||t.y>n.y+n.height||t.y+t.height<n.y)},cloneObject(n){const t={};for(const i in n)this._isPlainObject(n[i])?t[i]=this.cloneObject(n[i]):this._isArray(n[i])?t[i]=this.cloneArray(n[i]):t[i]=n[i];return t},cloneArray(n){return n.slice(0)},degToRad(n){return n*AT},radToDeg(n){return n*MT},_degToRad(n){return k.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),k.degToRad(n)},_radToDeg(n){return k.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),k.radToDeg(n)},_getRotation(n){return Ot.angleDeg?k.radToDeg(n):n},_capitalize(n){return n.charAt(0).toUpperCase()+n.slice(1)},throw(n){throw new Error(f5+n)},error(n){console.error(f5+n)},warn(n){Ot.showWarnings&&console.warn(RT+n)},each(n,t){for(const i in n)t(i,n[i])},_inRange(n,t,i){return t<=n&&n<i},_getProjectionToSegment(n,t,i,s,u,c){let f,p,m;const S=(n-i)*(n-i)+(t-s)*(t-s);if(S==0)f=n,p=t,m=(u-i)*(u-i)+(c-s)*(c-s);else{const b=((u-n)*(i-n)+(c-t)*(s-t))/S;b<0?(f=n,p=t,m=(n-u)*(n-u)+(t-c)*(t-c)):b>1?(f=i,p=s,m=(i-u)*(i-u)+(s-c)*(s-c)):(f=n+b*(i-n),p=t+b*(s-t),m=(f-u)*(f-u)+(p-c)*(p-c))}return[f,p,m]},_getProjectionToLine(n,t,i){const s=k.cloneObject(n);let u=Number.MAX_VALUE;return t.forEach(function(c,f){if(!i&&f===t.length-1)return;const p=t[(f+1)%t.length],m=k._getProjectionToSegment(c.x,c.y,p.x,p.y,n.x,n.y),S=m[0],b=m[1],_=m[2];_<u&&(s.x=S,s.y=b,u=_)}),s},_prepareArrayForTween(n,t,i){const s=[],u=[];if(n.length>t.length){const f=t;t=n,n=f}for(let f=0;f<n.length;f+=2)s.push({x:n[f],y:n[f+1]});for(let f=0;f<t.length;f+=2)u.push({x:t[f],y:t[f+1]});const c=[];return u.forEach(function(f){const p=k._getProjectionToLine(f,s,i);c.push(p.x),c.push(p.y)}),c},_prepareToStringify(n){let t;n.visitedByCircularReferenceRemoval=!0;for(const i in n)if(n.hasOwnProperty(i)&&n[i]&&typeof n[i]=="object"){if(t=Object.getOwnPropertyDescriptor(n,i),n[i].visitedByCircularReferenceRemoval||k._isElement(n[i]))if(t.configurable)delete n[i];else return null;else if(k._prepareToStringify(n[i])===null)if(t.configurable)delete n[i];else return null}return delete n.visitedByCircularReferenceRemoval,n},_assign(n,t){for(const i in t)n[i]=t[i];return n},_getFirstPointerId(n){return n.touches?n.changedTouches[0].identifier:n.pointerId||999},releaseCanvas(...n){Ot.releaseCanvasOnDestroy&&n.forEach(t=>{t.width=0,t.height=0})},drawRoundedRectPath(n,t,i,s){let u=t<0?t:0,c=i<0?i:0;t=Math.abs(t),i=Math.abs(i);let f=0,p=0,m=0,S=0;typeof s=="number"?f=p=m=S=Math.min(s,t/2,i/2):(f=Math.min(s[0]||0,t/2,i/2),p=Math.min(s[1]||0,t/2,i/2),S=Math.min(s[2]||0,t/2,i/2),m=Math.min(s[3]||0,t/2,i/2)),n.moveTo(u+f,c),n.lineTo(u+t-p,c),n.arc(u+t-p,c+p,p,Math.PI*3/2,0,!1),n.lineTo(u+t,c+i-S),n.arc(u+t-S,c+i-S,S,0,Math.PI/2,!1),n.lineTo(u+m,c+i),n.arc(u+m,c+i-m,m,Math.PI/2,Math.PI,!1),n.lineTo(u,c+f),n.arc(u+f,c+f,f,Math.PI,Math.PI*3/2,!1)},drawRoundedPolygonPath(n,t,i,s,u){s=Math.abs(s);for(let c=0;c<i;c++){const f=t[(c-1+i)%i],p=t[c],m=t[(c+1)%i],S={x:p.x-f.x,y:p.y-f.y},b={x:m.x-p.x,y:m.y-p.y},_=Math.hypot(S.x,S.y),x=Math.hypot(b.x,b.y);let D;typeof u=="number"?D=u:D=c<u.length?u[c]:0,D=s*Math.cos(Math.PI/i)*Math.min(1,D/s*2);const N={x:S.x/_,y:S.y/_},R={x:b.x/x,y:b.y/x},O={x:p.x-N.x*D,y:p.y-N.y*D},U={x:p.x+R.x*D,y:p.y+R.y*D};c===0?n.moveTo(O.x,O.y):n.lineTo(O.x,O.y),n.arcTo(p.x,p.y,U.x,U.y,D)}}};function UT(n){const t=[],i=n.length,s=k;for(let u=0;u<i;u++){let c=n[u];s._isNumber(c)?c=Math.round(c*1e3)/1e3:s._isString(c)||(c=c+""),t.push(c)}return t}const h5=",",BT="(",VT=")",GT="([",jT="])",LT=";",PT="()",YT="=",d5=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],qT=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled","filter"],XT=100;let T1=null;function p5(){if(T1!==null)return T1;try{const t=k.createCanvasElement().getContext("2d");return t?!!t&&"filter"in t:(T1=!1,!1)}catch{return T1=!1,!1}}class C1{constructor(t){this.canvas=t,Ot.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,i){let s=this.traceArr,u=s.length,c="",f,p,m,S;for(f=0;f<u;f++)p=s[f],m=p.method,m?(S=p.args,c+=m,t?c+=PT:k._isArray(S[0])?c+=GT+S.join(h5)+jT:(i&&(S=S.map(b=>typeof b=="number"?Math.floor(b):b)),c+=BT+S.join(h5)+VT)):(c+=p.property,t||(c+=YT+p.val)),c+=LT;return c}clearTrace(){this.traceArr=[]}_trace(t){let i=this.traceArr,s;i.push(t),s=i.length,s>=XT&&i.shift()}reset(){const t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){const i=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,i.getWidth()/i.pixelRatio,i.getHeight()/i.pixelRatio)}_applyLineCap(t){const i=t.attrs.lineCap;i&&this.setAttr("lineCap",i)}_applyOpacity(t){const i=t.getAbsoluteOpacity();i!==1&&this.setAttr("globalAlpha",i)}_applyLineJoin(t){const i=t.attrs.lineJoin;i&&this.setAttr("lineJoin",i)}_applyMiterLimit(t){const i=t.attrs.miterLimit;i!=null&&this.setAttr("miterLimit",i)}setAttr(t,i){this._context[t]=i}arc(t,i,s,u,c,f){this._context.arc(t,i,s,u,c,f)}arcTo(t,i,s,u,c){this._context.arcTo(t,i,s,u,c)}beginPath(){this._context.beginPath()}bezierCurveTo(t,i,s,u,c,f){this._context.bezierCurveTo(t,i,s,u,c,f)}clearRect(t,i,s,u){this._context.clearRect(t,i,s,u)}clip(...t){this._context.clip.apply(this._context,t)}closePath(){this._context.closePath()}createImageData(t,i){const s=arguments;if(s.length===2)return this._context.createImageData(t,i);if(s.length===1)return this._context.createImageData(t)}createLinearGradient(t,i,s,u){return this._context.createLinearGradient(t,i,s,u)}createPattern(t,i){return this._context.createPattern(t,i)}createRadialGradient(t,i,s,u,c,f){return this._context.createRadialGradient(t,i,s,u,c,f)}drawImage(t,i,s,u,c,f,p,m,S){const b=arguments,_=this._context;b.length===3?_.drawImage(t,i,s):b.length===5?_.drawImage(t,i,s,u,c):b.length===9&&_.drawImage(t,i,s,u,c,f,p,m,S)}ellipse(t,i,s,u,c,f,p,m){this._context.ellipse(t,i,s,u,c,f,p,m)}isPointInPath(t,i,s,u){return s?this._context.isPointInPath(s,t,i,u):this._context.isPointInPath(t,i,u)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,i,s,u){this._context.fillRect(t,i,s,u)}strokeRect(t,i,s,u){this._context.strokeRect(t,i,s,u)}fillText(t,i,s,u){u?this._context.fillText(t,i,s,u):this._context.fillText(t,i,s)}measureText(t){return this._context.measureText(t)}getImageData(t,i,s,u){return this._context.getImageData(t,i,s,u)}lineTo(t,i){this._context.lineTo(t,i)}moveTo(t,i){this._context.moveTo(t,i)}rect(t,i,s,u){this._context.rect(t,i,s,u)}roundRect(t,i,s,u,c){this._context.roundRect(t,i,s,u,c)}putImageData(t,i,s){this._context.putImageData(t,i,s)}quadraticCurveTo(t,i,s,u){this._context.quadraticCurveTo(t,i,s,u)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,i){this._context.scale(t,i)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,i,s,u,c,f){this._context.setTransform(t,i,s,u,c,f)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,i,s,u){this._context.strokeText(t,i,s,u)}transform(t,i,s,u,c,f){this._context.transform(t,i,s,u,c,f)}translate(t,i){this._context.translate(t,i)}_enableTrace(){let t=this,i=d5.length,s=this.setAttr,u,c;const f=function(p){let m=t[p],S;t[p]=function(){return c=UT(Array.prototype.slice.call(arguments,0)),S=m.apply(t,arguments),t._trace({method:p,args:c}),S}};for(u=0;u<i;u++)f(d5[u]);t.setAttr=function(){s.apply(t,arguments);const p=arguments[0];let m=arguments[1];(p==="shadowOffsetX"||p==="shadowOffsetY"||p==="shadowBlur")&&(m=m/this.canvas.getPixelRatio()),t._trace({property:p,val:m})}}_applyGlobalCompositeOperation(t){const i=t.attrs.globalCompositeOperation;!i||i==="source-over"||this.setAttr("globalCompositeOperation",i)}}qT.forEach(function(n){Object.defineProperty(C1.prototype,n,{get(){return this._context[n]},set(t){this._context[n]=t}})});class KT extends C1{constructor(t,{willReadFrequently:i=!1}={}){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:i})}_fillColor(t){const i=t.fill();this.setAttr("fillStyle",i),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){const i=t._getLinearGradient();i&&(this.setAttr("fillStyle",i),t._fillFunc(this))}_fillRadialGradient(t){const i=t._getRadialGradient();i&&(this.setAttr("fillStyle",i),t._fillFunc(this))}_fill(t){const i=t.fill(),s=t.getFillPriority();if(i&&s==="color"){this._fillColor(t);return}const u=t.getFillPatternImage();if(u&&s==="pattern"){this._fillPattern(t);return}const c=t.getFillLinearGradientColorStops();if(c&&s==="linear-gradient"){this._fillLinearGradient(t);return}const f=t.getFillRadialGradientColorStops();if(f&&s==="radial-gradient"){this._fillRadialGradient(t);return}i?this._fillColor(t):u?this._fillPattern(t):c?this._fillLinearGradient(t):f&&this._fillRadialGradient(t)}_strokeLinearGradient(t){const i=t.getStrokeLinearGradientStartPoint(),s=t.getStrokeLinearGradientEndPoint(),u=t.getStrokeLinearGradientColorStops(),c=this.createLinearGradient(i.x,i.y,s.x,s.y);if(u){for(let f=0;f<u.length;f+=2)c.addColorStop(u[f],u[f+1]);this.setAttr("strokeStyle",c)}}_stroke(t){const i=t.dash(),s=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!s){this.save();const c=this.getCanvas().getPixelRatio();this.setTransform(c,0,0,c,0,0)}this._applyLineCap(t),i&&t.dashEnabled()&&(this.setLineDash(i),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),t.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),s||this.restore()}}_applyShadow(t){var i,s,u;const c=(i=t.getShadowRGBA())!==null&&i!==void 0?i:"black",f=(s=t.getShadowBlur())!==null&&s!==void 0?s:5,p=(u=t.getShadowOffset())!==null&&u!==void 0?u:{x:0,y:0},m=t.getAbsoluteScale(),S=this.canvas.getPixelRatio(),b=m.x*S,_=m.y*S;this.setAttr("shadowColor",c),this.setAttr("shadowBlur",f*Math.min(Math.abs(b),Math.abs(_))),this.setAttr("shadowOffsetX",p.x*b),this.setAttr("shadowOffsetY",p.y*_)}}class QT extends C1{constructor(t){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:!0})}_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){if(t.hasHitStroke()){const i=t.getStrokeScaleEnabled();if(!i){this.save();const c=this.getCanvas().getPixelRatio();this.setTransform(c,0,0,c,0,0)}this._applyLineCap(t);const s=t.hitStrokeWidth(),u=s==="auto"?t.strokeWidth():s;this.setAttr("lineWidth",u),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),i||this.restore()}}}let _1;function ZT(){if(_1)return _1;const n=k.createCanvasElement(),t=n.getContext("2d");return _1=(function(){const i=Ot._global.devicePixelRatio||1,s=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return i/s})(),k.releaseCanvas(n),_1}class b2{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;const s=(t||{}).pixelRatio||Ot.pixelRatio||ZT();this.pixelRatio=s,this._canvas=k.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(t){const i=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/i,this.getHeight()/i)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";const i=this.pixelRatio;this.getContext()._context.scale(i,i)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";const i=this.pixelRatio;this.getContext()._context.scale(i,i)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,i){this.setWidth(t||0),this.setHeight(i||0)}toDataURL(t,i){try{return this._canvas.toDataURL(t,i)}catch{try{return this._canvas.toDataURL()}catch(u){return k.error("Unable to get data URL. "+u.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}class Vo extends b2{constructor(t={width:0,height:0,willReadFrequently:!1}){super(t),this.context=new KT(this,{willReadFrequently:t.willReadFrequently}),this.setSize(t.width,t.height)}}class E2 extends b2{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new QT(this),this.setSize(t.width,t.height)}}const Ne={get isDragging(){let n=!1;return Ne._dragElements.forEach(t=>{t.dragStatus==="dragging"&&(n=!0)}),n},justDragged:!1,get node(){let n;return Ne._dragElements.forEach(t=>{n=t.node}),n},_dragElements:new Map,_drag(n){const t=[];Ne._dragElements.forEach((i,s)=>{const{node:u}=i,c=u.getStage();c.setPointersPositions(n),i.pointerId===void 0&&(i.pointerId=k._getFirstPointerId(n));const f=c._changedPointerPositions.find(p=>p.id===i.pointerId);if(f){if(i.dragStatus!=="dragging"){const p=u.dragDistance();if(Math.max(Math.abs(f.x-i.startPointerPos.x),Math.abs(f.y-i.startPointerPos.y))<p||(u.startDrag({evt:n}),!u.isDragging()))return}u._setDragPosition(n,i),t.push(u)}}),t.forEach(i=>{i.fire("dragmove",{type:"dragmove",target:i,evt:n},!0)})},_endDragBefore(n){const t=[];Ne._dragElements.forEach(i=>{const{node:s}=i,u=s.getStage();if(n&&u.setPointersPositions(n),!u._changedPointerPositions.find(p=>p.id===i.pointerId))return;(i.dragStatus==="dragging"||i.dragStatus==="stopped")&&(Ne.justDragged=!0,Ot._mouseListenClick=!1,Ot._touchListenClick=!1,Ot._pointerListenClick=!1,i.dragStatus="stopped");const f=i.node.getLayer()||i.node instanceof Ot.Stage&&i.node;f&&t.indexOf(f)===-1&&t.push(f)}),t.forEach(i=>{i.draw()})},_endDragAfter(n){Ne._dragElements.forEach((t,i)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:n},!0),t.dragStatus!=="dragging"&&Ne._dragElements.delete(i)})}};Ot.isBrowser&&(window.addEventListener("mouseup",Ne._endDragBefore,!0),window.addEventListener("touchend",Ne._endDragBefore,!0),window.addEventListener("touchcancel",Ne._endDragBefore,!0),window.addEventListener("mousemove",Ne._drag),window.addEventListener("touchmove",Ne._drag),window.addEventListener("mouseup",Ne._endDragAfter,!1),window.addEventListener("touchend",Ne._endDragAfter,!1),window.addEventListener("touchcancel",Ne._endDragAfter,!1));function Go(n){return k._isString(n)?'"'+n+'"':Object.prototype.toString.call(n)==="[object Number]"||k._isBoolean(n)?n:Object.prototype.toString.call(n)}function m5(n){return n>255?255:n<0?0:Math.round(n)}function Dt(){if(Ot.isUnminified)return function(n,t){return k._isNumber(n)||k.warn(Go(n)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),n}}function x1(n){if(Ot.isUnminified)return function(t,i){let s=k._isNumber(t),u=k._isArray(t)&&t.length==n;return!s&&!u&&k.warn(Go(t)+' is a not valid value for "'+i+'" attribute. The value should be a number or Array<number>('+n+")"),t}}function T2(){if(Ot.isUnminified)return function(n,t){return k._isNumber(n)||n==="auto"||k.warn(Go(n)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),n}}function oc(){if(Ot.isUnminified)return function(n,t){return k._isString(n)||k.warn(Go(n)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),n}}function g5(){if(Ot.isUnminified)return function(n,t){const i=k._isString(n),s=Object.prototype.toString.call(n)==="[object CanvasGradient]"||n&&n.addColorStop;return i||s||k.warn(Go(n)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),n}}function JT(){if(Ot.isUnminified)return function(n,t){const i=Int8Array?Object.getPrototypeOf(Int8Array):null;return i&&n instanceof i||(k._isArray(n)?n.forEach(function(s){k._isNumber(s)||k.warn('"'+t+'" attribute has non numeric element '+s+". Make sure that all elements are numbers.")}):k.warn(Go(n)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),n}}function sl(){if(Ot.isUnminified)return function(n,t){return n===!0||n===!1||k.warn(Go(n)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),n}}function FT(n){if(Ot.isUnminified)return function(t,i){return t==null||k.isObject(t)||k.warn(Go(t)+' is a not valid value for "'+i+'" attribute. The value should be an object with properties '+n),t}}const Up="get",Bp="set",G={addGetterSetter(n,t,i,s,u){G.addGetter(n,t,i),G.addSetter(n,t,s,u),G.addOverloadedGetterSetter(n,t)},addGetter(n,t,i){const s=Up+k._capitalize(t);n.prototype[s]=n.prototype[s]||function(){const u=this.attrs[t];return u===void 0?i:u}},addSetter(n,t,i,s){const u=Bp+k._capitalize(t);n.prototype[u]||G.overWriteSetter(n,t,i,s)},overWriteSetter(n,t,i,s){const u=Bp+k._capitalize(t);n.prototype[u]=function(c){return i&&c!==void 0&&c!==null&&(c=i.call(this,c,t)),this._setAttr(t,c),s&&s.call(this),this}},addComponentsGetterSetter(n,t,i,s,u){const c=i.length,f=k._capitalize,p=Up+f(t),m=Bp+f(t);n.prototype[p]=function(){const b={};for(let _=0;_<c;_++){const x=i[_];b[x]=this.getAttr(t+f(x))}return b};const S=FT(i);n.prototype[m]=function(b){const _=this.attrs[t];s&&(b=s.call(this,b,t)),S&&S.call(this,b,t);for(const x in b)b.hasOwnProperty(x)&&this._setAttr(t+f(x),b[x]);return b||i.forEach(x=>{this._setAttr(t+f(x),void 0)}),this._fireChangeEvent(t,_,b),u&&u.call(this),this},G.addOverloadedGetterSetter(n,t)},addOverloadedGetterSetter(n,t){const i=k._capitalize(t),s=Bp+i,u=Up+i;n.prototype[t]=function(){return arguments.length?(this[s](arguments[0]),this):this[u]()}},addDeprecatedGetterSetter(n,t,i,s){k.error("Adding deprecated "+t);const u=Up+k._capitalize(t),c=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";n.prototype[u]=function(){k.error(c);const f=this.attrs[t];return f===void 0?i:f},G.addSetter(n,t,s,function(){k.error(c)}),G.addOverloadedGetterSetter(n,t)},backCompat(n,t){k.each(t,function(i,s){const u=n.prototype[s],c=Up+k._capitalize(i),f=Bp+k._capitalize(i);function p(){u.apply(this,arguments),k.error('"'+i+'" method is deprecated and will be removed soon. Use ""'+s+'" instead.')}n.prototype[i]=p,n.prototype[c]=p,n.prototype[f]=p})},afterSetFilter(){this._filterUpToDate=!1}};function kT(n){const t=/(\w+)\(([^)]+)\)/g;let i;for(;(i=t.exec(n))!==null;){const[,s,u]=i;switch(s){case"blur":{const c=parseFloat(u.replace("px",""));return function(f){this.blurRadius(c*.5);const p=Ot.Filters;p&&p.Blur&&p.Blur.call(this,f)}}case"brightness":{const c=u.includes("%")?parseFloat(u)/100:parseFloat(u);return function(f){this.brightness(c);const p=Ot.Filters;p&&p.Brightness&&p.Brightness.call(this,f)}}case"contrast":{const c=parseFloat(u);return function(f){const p=100*(Math.sqrt(c)-1);this.contrast(p);const m=Ot.Filters;m&&m.Contrast&&m.Contrast.call(this,f)}}case"grayscale":return function(c){const f=Ot.Filters;f&&f.Grayscale&&f.Grayscale.call(this,c)};case"sepia":return function(c){const f=Ot.Filters;f&&f.Sepia&&f.Sepia.call(this,c)};case"invert":return function(c){const f=Ot.Filters;f&&f.Invert&&f.Invert.call(this,c)};default:k.warn(`CSS filter "${s}" is not supported in fallback mode. Consider using function filters for better compatibility.`);break}}return()=>{}}const D1="absoluteOpacity",A1="allEventListeners",Mr="absoluteTransform",y5="absoluteScale",uc="canvas",IT="Change",WT="children",$T="konva",C2="listening",tC="mouseenter",eC="mouseleave",nC="pointerenter",aC="pointerleave",iC="touchenter",sC="touchleave",v5="set",S5="Shape",M1=" ",b5="stage",jo="transform",lC="Stage",_2="visible",rC=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(M1);let oC=1,Nt=class u5{constructor(t){this._id=oC++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===jo||t===Mr)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,i){let s=this._cache.get(t);return(s===void 0||(t===jo||t===Mr)&&s.dirty===!0)&&(s=i.call(this),this._cache.set(t,s)),s}_calculate(t,i,s){if(!this._attachedDepsListeners.get(t)){const u=i.map(c=>c+"Change.konva").join(M1);this.on(u,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,s)}_getCanvasCache(){return this._cache.get(uc)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===Mr&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(uc)){const{scene:t,filter:i,hit:s,buffer:u}=this._cache.get(uc);k.releaseCanvas(t,i,s,u),this._cache.delete(uc)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){const i=t||{};let s={};(i.x===void 0||i.y===void 0||i.width===void 0||i.height===void 0)&&(s=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let u=Math.ceil(i.width||s.width),c=Math.ceil(i.height||s.height),f=i.pixelRatio,p=i.x===void 0?Math.floor(s.x):i.x,m=i.y===void 0?Math.floor(s.y):i.y,S=i.offset||0,b=i.drawBorder||!1,_=i.hitCanvasPixelRatio||1;if(!u||!c){k.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const x=Math.abs(Math.round(s.x)-p)>.5?1:0,D=Math.abs(Math.round(s.y)-m)>.5?1:0;u+=S*2+x,c+=S*2+D,p-=S,m-=S;const A=new Vo({pixelRatio:f,width:u,height:c}),N=new Vo({pixelRatio:f,width:0,height:0,willReadFrequently:!0}),R=new E2({pixelRatio:_,width:u,height:c}),O=A.getContext(),U=R.getContext(),j=new Vo({width:A.width/A.pixelRatio+Math.abs(p),height:A.height/A.pixelRatio+Math.abs(m),pixelRatio:A.pixelRatio}),V=j.getContext();return R.isCache=!0,A.isCache=!0,this._cache.delete(uc),this._filterUpToDate=!1,i.imageSmoothingEnabled===!1&&(A.getContext()._context.imageSmoothingEnabled=!1,N.getContext()._context.imageSmoothingEnabled=!1),O.save(),U.save(),V.save(),O.translate(-p,-m),U.translate(-p,-m),V.translate(-p,-m),j.x=p,j.y=m,this._isUnderCache=!0,this._clearSelfAndDescendantCache(D1),this._clearSelfAndDescendantCache(y5),this.drawScene(A,this,j),this.drawHit(R,this),this._isUnderCache=!1,O.restore(),U.restore(),b&&(O.save(),O.beginPath(),O.rect(0,0,u,c),O.closePath(),O.setAttr("strokeStyle","red"),O.setAttr("lineWidth",5),O.stroke(),O.restore()),this._cache.set(uc,{scene:A,filter:N,hit:R,buffer:j,x:p,y:m}),this._requestDraw(),this}isCached(){return this._cache.has(uc)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,i){const s=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}];let u=1/0,c=1/0,f=-1/0,p=-1/0;const m=this.getAbsoluteTransform(i);return s.forEach(function(S){const b=m.point(S);u===void 0&&(u=f=b.x,c=p=b.y),u=Math.min(u,b.x),c=Math.min(c,b.y),f=Math.max(f,b.x),p=Math.max(p,b.y)}),{x:u,y:c,width:f-u,height:p-c}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const i=this._getCanvasCache();t.translate(i.x,i.y);const s=this._getCachedSceneCanvas(),u=s.pixelRatio;t.drawImage(s._canvas,0,0,s.width/u,s.height/u),t.restore()}_drawCachedHitCanvas(t){const i=this._getCanvasCache(),s=i.hit;t.save(),t.translate(i.x,i.y),t.drawImage(s._canvas,0,0,s.width/s.pixelRatio,s.height/s.pixelRatio),t.restore()}_getCachedSceneCanvas(){let t=this.filters(),i=this._getCanvasCache(),s=i.scene,u=i.filter,c=u.getContext(),f,p,m,S;if(!t||t.length===0)return s;if(this._filterUpToDate)return u;let b=!0;for(let x=0;x<t.length;x++)if(typeof t[x]=="string"&&p5(),typeof t[x]!="string"||!p5()){b=!1;break}const _=s.pixelRatio;if(u.setSize(s.width/s.pixelRatio,s.height/s.pixelRatio),b){const x=t.join(" ");return c.save(),c.setAttr("filter",x),c.drawImage(s._canvas,0,0,s.getWidth()/_,s.getHeight()/_),c.restore(),this._filterUpToDate=!0,u}try{for(f=t.length,c.clear(),c.drawImage(s._canvas,0,0,s.getWidth()/_,s.getHeight()/_),p=c.getImageData(0,0,u.getWidth(),u.getHeight()),m=0;m<f;m++)S=t[m],typeof S=="string"&&(S=kT(S)),S.call(this,p),c.putImageData(p,0,0)}catch(x){k.error("Unable to apply filter. "+x.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}return this._filterUpToDate=!0,u}on(t,i){if(this._cache&&this._cache.delete(A1),arguments.length===3)return this._delegate.apply(this,arguments);const s=t.split(M1);for(let u=0;u<s.length;u++){const f=s[u].split("."),p=f[0],m=f[1]||"";this.eventListeners[p]||(this.eventListeners[p]=[]),this.eventListeners[p].push({name:m,handler:i})}return this}off(t,i){let s=(t||"").split(M1),u=s.length,c,f,p,m,S,b;if(this._cache&&this._cache.delete(A1),!t)for(f in this.eventListeners)this._off(f);for(c=0;c<u;c++)if(p=s[c],m=p.split("."),S=m[0],b=m[1],S)this.eventListeners[S]&&this._off(S,b,i);else for(f in this.eventListeners)this._off(f,b,i);return this}dispatchEvent(t){const i={target:this,type:t.type,evt:t};return this.fire(t.type,i),this}addEventListener(t,i){return this.on(t,function(s){i.call(this,s.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,i,s){const u=this;this.on(t,function(c){const f=c.target.findAncestors(i,!0,u);for(let p=0;p<f.length;p++)c=k.cloneObject(c),c.currentTarget=f[p],s.call(f[p],c)})}remove(){return this.isDragging()&&this.stopDrag(),Ne._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(Mr),this._clearSelfAndDescendantCache(D1),this._clearSelfAndDescendantCache(y5),this._clearSelfAndDescendantCache(b5),this._clearSelfAndDescendantCache(_2),this._clearSelfAndDescendantCache(C2)}_remove(){this._clearCaches();const t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(t){const i="get"+k._capitalize(t);return k._isFunction(this[i])?this[i]():this.attrs[t]}getAncestors(){let t=this.getParent(),i=[];for(;t;)i.push(t),t=t.getParent();return i}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{let i,s;if(!t)return this;for(i in t)i!==WT&&(s=v5+k._capitalize(i),k._isFunction(this[s])?this[s](t[i]):this._setAttr(i,t[i]))}),this}isListening(){return this._getCache(C2,this._isListening)}_isListening(t){if(!this.listening())return!1;const s=this.getParent();return s&&s!==t&&this!==t?s._isListening(t):!0}isVisible(){return this._getCache(_2,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const s=this.getParent();return s&&s!==t&&this!==t?s._isVisible(t):!0}shouldDrawHit(t,i=!1){if(t)return this._isVisible(t)&&this._isListening(t);const s=this.getLayer();let u=!1;Ne._dragElements.forEach(f=>{f.dragStatus==="dragging"&&(f.node.nodeType==="Stage"||f.node.getLayer()===s)&&(u=!0)});const c=!i&&!Ot.hitOnDragEnabled&&(u||Ot.isTransforming());return this.isListening()&&this.isVisible()&&!c}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let t=this.getDepth(),i=this,s=0,u,c,f,p;function m(b){for(u=[],c=b.length,f=0;f<c;f++)p=b[f],s++,p.nodeType!==S5&&(u=u.concat(p.getChildren().slice())),p._id===i._id&&(f=c);u.length>0&&u[0].getDepth()<=t&&m(u)}const S=this.getStage();return i.nodeType!==lC&&S&&m(S.getChildren()),s}getDepth(){let t=0,i=this.parent;for(;i;)t++,i=i.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(jo),this._clearSelfAndDescendantCache(Mr)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const t=this.getStage();if(!t)return null;const i=t.getPointerPosition();if(!i)return null;const s=this.getAbsoluteTransform().copy();return s.invert(),s.point(i)}getAbsolutePosition(t){let i=!1,s=this.parent;for(;s;){if(s.isCached()){i=!0;break}s=s.parent}i&&!t&&(t=!0);const u=this.getAbsoluteTransform(t).getMatrix(),c=new Qi,f=this.offset();return c.m=u.slice(),c.translate(f.x,f.y),c.getTranslation()}setAbsolutePosition(t){const{x:i,y:s,...u}=this._clearTransform();this.attrs.x=i,this.attrs.y=s,this._clearCache(jo);const c=this._getAbsoluteTransform().copy();return c.invert(),c.translate(t.x,t.y),t={x:this.attrs.x+c.getTranslation().x,y:this.attrs.y+c.getTranslation().y},this._setTransform(u),this.setPosition({x:t.x,y:t.y}),this._clearCache(jo),this._clearSelfAndDescendantCache(Mr),this}_setTransform(t){let i;for(i in t)this.attrs[i]=t[i]}_clearTransform(){const t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){let i=t.x,s=t.y,u=this.x(),c=this.y();return i!==void 0&&(u+=i),s!==void 0&&(c+=s),this.setPosition({x:u,y:c}),this}_eachAncestorReverse(t,i){let s=[],u=this.getParent(),c,f;if(!(i&&i._id===this._id)){for(s.unshift(this);u&&(!i||u._id!==i._id);)s.unshift(u),u=u.parent;for(c=s.length,f=0;f<c;f++)t(s[f])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return k.warn("Node has no parent. moveToTop function is ignored."),!1;const t=this.index,i=this.parent.getChildren().length;return t<i-1?(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return k.warn("Node has no parent. moveUp function is ignored."),!1;const t=this.index,i=this.parent.getChildren().length;return t<i-1?(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return k.warn("Node has no parent. moveDown function is ignored."),!1;const t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return k.warn("Node has no parent. moveToBottom function is ignored."),!1;const t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return k.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&k.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");const i=this.index;return this.parent.children.splice(i,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(D1,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let t=this.opacity();const i=this.getParent();return i&&!i._isUnderCache&&(t*=i.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){let t=this.getAttrs(),i,s,u,c,f;const p={attrs:{},className:this.getClassName()};for(i in t)s=t[i],f=k.isObject(s)&&!k._isPlainObject(s)&&!k._isArray(s),!f&&(u=typeof this[i]=="function"&&this[i],delete t[i],c=u?u.call(this):null,t[i]=s,c!==s&&(p.attrs[i]=s));return k._prepareToStringify(p)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,i,s){const u=[];i&&this._isMatch(t)&&u.push(this);let c=this.parent;for(;c;){if(c===s)return u;c._isMatch(t)&&u.push(c),c=c.parent}return u}isAncestorOf(t){return!1}findAncestor(t,i,s){return this.findAncestors(t,i,s)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);let i=t.replace(/ /g,"").split(","),s=i.length,u,c;for(u=0;u<s;u++)if(c=i[u],k.isValidSelector(c)||(k.warn('Selector "'+c+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),k.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),k.warn("Konva is awesome, right?")),c.charAt(0)==="#"){if(this.id()===c.slice(1))return!0}else if(c.charAt(0)==="."){if(this.hasName(c.slice(1)))return!0}else if(this.className===c||this.nodeType===c)return!0;return!1}getLayer(){const t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(b5,this._getStage)}_getStage(){const t=this.getParent();return t?t.getStage():null}fire(t,i={},s){return i.target=i.target||this,s?this._fireAndBubble(t,i):this._fire(t,i),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(Mr,this._getAbsoluteTransform)}_getAbsoluteTransform(t){let i;if(t)return i=new Qi,this._eachAncestorReverse(function(s){const u=s.transformsEnabled();u==="all"?i.multiply(s.getTransform()):u==="position"&&i.translate(s.x()-s.offsetX(),s.y()-s.offsetY())},t),i;{i=this._cache.get(Mr)||new Qi,this.parent?this.parent.getAbsoluteTransform().copyInto(i):i.reset();const s=this.transformsEnabled();if(s==="all")i.multiply(this.getTransform());else if(s==="position"){const u=this.attrs.x||0,c=this.attrs.y||0,f=this.attrs.offsetX||0,p=this.attrs.offsetY||0;i.translate(u-f,c-p)}return i.dirty=!1,i}}getAbsoluteScale(t){let i=this;for(;i;)i._isUnderCache&&(t=i),i=i.getParent();const u=this.getAbsoluteTransform(t).decompose();return{x:u.scaleX,y:u.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(jo,this._getTransform)}_getTransform(){var t,i;const s=this._cache.get(jo)||new Qi;s.reset();const u=this.x(),c=this.y(),f=Ot.getAngle(this.rotation()),p=(t=this.attrs.scaleX)!==null&&t!==void 0?t:1,m=(i=this.attrs.scaleY)!==null&&i!==void 0?i:1,S=this.attrs.skewX||0,b=this.attrs.skewY||0,_=this.attrs.offsetX||0,x=this.attrs.offsetY||0;return(u!==0||c!==0)&&s.translate(u,c),f!==0&&s.rotate(f),(S!==0||b!==0)&&s.skew(S,b),(p!==1||m!==1)&&s.scale(p,m),(_!==0||x!==0)&&s.translate(-1*_,-1*x),s.dirty=!1,s}clone(t){let i=k.cloneObject(this.attrs),s,u,c,f,p;for(s in t)i[s]=t[s];const m=new this.constructor(i);for(s in this.eventListeners)for(u=this.eventListeners[s],c=u.length,f=0;f<c;f++)p=u[f],p.name.indexOf($T)<0&&(m.eventListeners[s]||(m.eventListeners[s]=[]),m.eventListeners[s].push(p));return m}_toKonvaCanvas(t){t=t||{};const i=this.getClientRect(),s=this.getStage(),u=t.x!==void 0?t.x:Math.floor(i.x),c=t.y!==void 0?t.y:Math.floor(i.y),f=t.pixelRatio||1,p=new Vo({width:t.width||Math.ceil(i.width)||(s?s.width():0),height:t.height||Math.ceil(i.height)||(s?s.height():0),pixelRatio:f}),m=p.getContext(),S=new Vo({width:p.width/p.pixelRatio+Math.abs(u),height:p.height/p.pixelRatio+Math.abs(c),pixelRatio:p.pixelRatio});return t.imageSmoothingEnabled===!1&&(m._context.imageSmoothingEnabled=!1),m.save(),(u||c)&&m.translate(-1*u,-1*c),this.drawScene(p,void 0,S),m.restore(),p}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};const i=t.mimeType||null,s=t.quality||null,u=this._toKonvaCanvas(t).toDataURL(i,s);return t.callback&&t.callback(u),u}toImage(t){return new Promise((i,s)=>{try{const u=t?.callback;u&&delete t.callback,k._urlToImage(this.toDataURL(t),function(c){i(c),u?.(c)})}catch(u){s(u)}})}toBlob(t){return new Promise((i,s)=>{try{const u=t?.callback;u&&delete t.callback,this.toCanvas(t).toBlob(c=>{i(c),u?.(c)},t?.mimeType,t?.quality)}catch(u){s(u)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():Ot.dragDistance}_off(t,i,s){let u=this.eventListeners[t],c,f,p;for(c=0;c<u.length;c++)if(f=u[c].name,p=u[c].handler,(f!=="konva"||i==="konva")&&(!i||f===i)&&(!s||s===p)){if(u.splice(c,1),u.length===0){delete this.eventListeners[t];break}c--}}_fireChangeEvent(t,i,s){this._fire(t+IT,{oldVal:i,newVal:s})}addName(t){if(!this.hasName(t)){const i=this.name(),s=i?i+" "+t:t;this.name(s)}return this}hasName(t){if(!t)return!1;const i=this.name();return i?(i||"").split(/\s/g).indexOf(t)!==-1:!1}removeName(t){const i=(this.name()||"").split(/\s/g),s=i.indexOf(t);return s!==-1&&(i.splice(s,1),this.name(i.join(" "))),this}setAttr(t,i){const s=this[v5+k._capitalize(t)];return k._isFunction(s)?s.call(this,i):this._setAttr(t,i),this}_requestDraw(){if(Ot.autoDrawEnabled){const t=this.getLayer()||this.getStage();t?.batchDraw()}}_setAttr(t,i){const s=this.attrs[t];s===i&&!k.isObject(i)||(i==null?delete this.attrs[t]:this.attrs[t]=i,this._shouldFireChangeEvents&&this._fireChangeEvent(t,s,i),this._requestDraw())}_setComponentAttr(t,i,s){let u;s!==void 0&&(u=this.attrs[t],u||(this.attrs[t]=this.getAttr(t)),this.attrs[t][i]=s,this._fireChangeEvent(t,u,s))}_fireAndBubble(t,i,s){i&&this.nodeType===S5&&(i.target=this);const u=[tC,eC,nC,aC,iC,sC];if(!(u.indexOf(t)!==-1&&(s&&(this===s||this.isAncestorOf&&this.isAncestorOf(s))||this.nodeType==="Stage"&&!s))){this._fire(t,i);const f=u.indexOf(t)!==-1&&s&&s.isAncestorOf&&s.isAncestorOf(this)&&!s.isAncestorOf(this.parent);(i&&!i.cancelBubble||!i)&&this.parent&&this.parent.isListening()&&!f&&(s&&s.parent?this._fireAndBubble.call(this.parent,t,i,s):this._fireAndBubble.call(this.parent,t,i))}}_getProtoListeners(t){var i,s,u;const c=(i=this._cache.get(A1))!==null&&i!==void 0?i:{};let f=c?.[t];if(f===void 0){f=[];let p=Object.getPrototypeOf(this);for(;p;){const m=(u=(s=p.eventListeners)===null||s===void 0?void 0:s[t])!==null&&u!==void 0?u:[];f.push(...m),p=Object.getPrototypeOf(p)}c[t]=f,this._cache.set(A1,c)}return f}_fire(t,i){i=i||{},i.currentTarget=this,i.type=t;const s=this._getProtoListeners(t);if(s)for(let c=0;c<s.length;c++)s[c].handler.call(this,i);const u=this.eventListeners[t];if(u)for(let c=0;c<u.length;c++)u[c].handler.call(this,i)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){const i=t?t.pointerId:void 0,s=this.getStage(),u=this.getAbsolutePosition();if(!s)return;const c=s._getPointerById(i)||s._changedPointerPositions[0]||u;Ne._dragElements.set(this._id,{node:this,startPointerPos:c,offset:{x:c.x-u.x,y:c.y-u.y},dragStatus:"ready",pointerId:i})}startDrag(t,i=!0){Ne._dragElements.has(this._id)||this._createDragElement(t);const s=Ne._dragElements.get(this._id);s.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},i)}_setDragPosition(t,i){const s=this.getStage()._getPointerById(i.pointerId);if(!s)return;let u={x:s.x-i.offset.x,y:s.y-i.offset.y};const c=this.dragBoundFunc();if(c!==void 0){const f=c.call(this,u,t);f?u=f:k.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==u.x||this._lastPos.y!==u.y)&&(this.setAbsolutePosition(u),this._requestDraw()),this._lastPos=u}stopDrag(t){const i=Ne._dragElements.get(this._id);i&&(i.dragStatus="stopped"),Ne._endDragBefore(t),Ne._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=Ne._dragElements.get(this._id);return t?t.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){if(!(!(t.evt.button!==void 0)||Ot.dragButtons.indexOf(t.evt.button)>=0)||this.isDragging())return;let u=!1;Ne._dragElements.forEach(c=>{this.isAncestorOf(c.node)&&(u=!0)}),u||this._createDragElement(t)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const i=Ne._dragElements.get(this._id),s=i&&i.dragStatus==="dragging",u=i&&i.dragStatus==="ready";s?this.stopDrag():u&&Ne._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const i=this.getStage();if(!i)return!1;const s={x:-t.x,y:-t.y,width:i.width()+2*t.x,height:i.height()+2*t.y};return k.haveIntersection(s,this.getClientRect())}static create(t,i){return k._isString(t)&&(t=JSON.parse(t)),this._createNode(t,i)}static _createNode(t,i){let s=u5.prototype.getClassName.call(t),u=t.children,c,f,p;i&&(t.attrs.container=i),Ot[s]||(k.warn('Can not find a node with class name "'+s+'". Fallback to "Shape".'),s="Shape");const m=Ot[s];if(c=new m(t.attrs),u)for(f=u.length,p=0;p<f;p++)c.add(u5._createNode(u[p]));return c}};Nt.prototype.nodeType="Node",Nt.prototype._attrsAffectingSize=[],Nt.prototype.eventListeners={},Nt.prototype.on.call(Nt.prototype,rC,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(jo),this._clearSelfAndDescendantCache(Mr)}),Nt.prototype.on.call(Nt.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(_2)}),Nt.prototype.on.call(Nt.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(C2)}),Nt.prototype.on.call(Nt.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(D1)});const Ke=G.addGetterSetter;Ke(Nt,"zIndex"),Ke(Nt,"absolutePosition"),Ke(Nt,"position"),Ke(Nt,"x",0,Dt()),Ke(Nt,"y",0,Dt()),Ke(Nt,"globalCompositeOperation","source-over",oc()),Ke(Nt,"opacity",1,Dt()),Ke(Nt,"name","",oc()),Ke(Nt,"id","",oc()),Ke(Nt,"rotation",0,Dt()),G.addComponentsGetterSetter(Nt,"scale",["x","y"]),Ke(Nt,"scaleX",1,Dt()),Ke(Nt,"scaleY",1,Dt()),G.addComponentsGetterSetter(Nt,"skew",["x","y"]),Ke(Nt,"skewX",0,Dt()),Ke(Nt,"skewY",0,Dt()),G.addComponentsGetterSetter(Nt,"offset",["x","y"]),Ke(Nt,"offsetX",0,Dt()),Ke(Nt,"offsetY",0,Dt()),Ke(Nt,"dragDistance",void 0,Dt()),Ke(Nt,"width",0,Dt()),Ke(Nt,"height",0,Dt()),Ke(Nt,"listening",!0,sl()),Ke(Nt,"preventDefault",!0,sl()),Ke(Nt,"filters",void 0,function(n){return this._filterUpToDate=!1,n}),Ke(Nt,"visible",!0,sl()),Ke(Nt,"transformsEnabled","all",oc()),Ke(Nt,"size"),Ke(Nt,"dragBoundFunc"),Ke(Nt,"draggable",!1,sl()),G.backCompat(Nt,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});class Zi extends Nt{constructor(){super(...arguments),this.children=[]}getChildren(t){const i=this.children||[];return t?i.filter(t):i}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(t.length===0)return this;if(t.length>1){for(let s=0;s<t.length;s++)this.add(t[s]);return this}const i=t[0];return i.getParent()?(i.moveTo(this),this):(this._validateAdd(i),i.index=this.getChildren().length,i.parent=this,i._clearCaches(),this.getChildren().push(i),this._fire("add",{child:i}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){const i=this._generalFind(t,!0);return i.length>0?i[0]:void 0}_generalFind(t,i){const s=[];return this._descendants(u=>{const c=u._isMatch(t);return c&&s.push(u),!!(c&&i)}),s}_descendants(t){let i=!1;const s=this.getChildren();for(const u of s){if(i=t(u),i)return!0;if(u.hasChildren()&&(i=u._descendants(t),i))return!0}return!1}toObject(){const t=Nt.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(i=>{t.children.push(i.toObject())}),t}isAncestorOf(t){let i=t.getParent();for(;i;){if(i._id===this._id)return!0;i=i.getParent()}return!1}clone(t){const i=Nt.prototype.clone.call(this,t);return this.getChildren().forEach(function(s){i.add(s.clone())}),i}getAllIntersections(t){const i=[];return this.find("Shape").forEach(s=>{s.isVisible()&&s.intersects(t)&&i.push(s)}),i}_clearSelfAndDescendantCache(t){var i;super._clearSelfAndDescendantCache(t),!this.isCached()&&((i=this.children)===null||i===void 0||i.forEach(function(s){s._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(i,s){i.index=s}),this._requestDraw()}drawScene(t,i,s){const u=this.getLayer(),c=t||u&&u.getCanvas(),f=c&&c.getContext(),p=this._getCanvasCache(),m=p&&p.scene,S=c&&c.isCache;if(!this.isVisible()&&!S)return this;if(m){f.save();const b=this.getAbsoluteTransform(i).getMatrix();f.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(f),f.restore()}else this._drawChildren("drawScene",c,i,s);return this}drawHit(t,i){if(!this.shouldDrawHit(i))return this;const s=this.getLayer(),u=t||s&&s.hitCanvas,c=u&&u.getContext(),f=this._getCanvasCache();if(f&&f.hit){c.save();const m=this.getAbsoluteTransform(i).getMatrix();c.transform(m[0],m[1],m[2],m[3],m[4],m[5]),this._drawCachedHitCanvas(c),c.restore()}else this._drawChildren("drawHit",u,i);return this}_drawChildren(t,i,s,u){var c;const f=i&&i.getContext(),p=this.clipWidth(),m=this.clipHeight(),S=this.clipFunc(),b=typeof p=="number"&&typeof m=="number"||S,_=s===this;if(b){f.save();const D=this.getAbsoluteTransform(s);let A=D.getMatrix();f.transform(A[0],A[1],A[2],A[3],A[4],A[5]),f.beginPath();let N;if(S)N=S.call(this,f,this);else{const R=this.clipX(),O=this.clipY();f.rect(R||0,O||0,p,m)}f.clip.apply(f,N),A=D.copy().invert().getMatrix(),f.transform(A[0],A[1],A[2],A[3],A[4],A[5])}const x=!_&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";x&&(f.save(),f._applyGlobalCompositeOperation(this)),(c=this.children)===null||c===void 0||c.forEach(function(D){D[t](i,s,u)}),x&&f.restore(),b&&f.restore()}getClientRect(t={}){var i;const s=t.skipTransform,u=t.relativeTo;let c,f,p,m,S={x:1/0,y:1/0,width:0,height:0};const b=this;(i=this.children)===null||i===void 0||i.forEach(function(D){if(!D.visible())return;const A=D.getClientRect({relativeTo:b,skipShadow:t.skipShadow,skipStroke:t.skipStroke});A.width===0&&A.height===0||(c===void 0?(c=A.x,f=A.y,p=A.x+A.width,m=A.y+A.height):(c=Math.min(c,A.x),f=Math.min(f,A.y),p=Math.max(p,A.x+A.width),m=Math.max(m,A.y+A.height)))});const _=this.find("Shape");let x=!1;for(let D=0;D<_.length;D++)if(_[D]._isVisible(this)){x=!0;break}return x&&c!==void 0?S={x:c,y:f,width:p-c,height:m-f}:S={x:0,y:0,width:0,height:0},s?S:this._transformedRect(S,u)}}G.addComponentsGetterSetter(Zi,"clip",["x","y","width","height"]),G.addGetterSetter(Zi,"clipX",void 0,Dt()),G.addGetterSetter(Zi,"clipY",void 0,Dt()),G.addGetterSetter(Zi,"clipWidth",void 0,Dt()),G.addGetterSetter(Zi,"clipHeight",void 0,Dt()),G.addGetterSetter(Zi,"clipFunc");const Vp=new Map,E5=Ot._global.PointerEvent!==void 0;function x2(n){return Vp.get(n)}function D2(n){return{evt:n,pointerId:n.pointerId}}function T5(n,t){return Vp.get(n)===t}function C5(n,t){Gp(n),t.getStage()&&(Vp.set(n,t),E5&&t._fire("gotpointercapture",D2(new PointerEvent("gotpointercapture"))))}function Gp(n,t){const i=Vp.get(n);if(!i)return;const s=i.getStage();s&&s.content,Vp.delete(n),E5&&i._fire("lostpointercapture",D2(new PointerEvent("lostpointercapture")))}const uC="Stage",cC="string",_5="px",fC="mouseout",x5="mouseleave",D5="mouseover",A5="mouseenter",M5="mousemove",N5="mousedown",O5="mouseup",jp="pointermove",Lp="pointerdown",kf="pointerup",Pp="pointercancel",hC="lostpointercapture",N1="pointerout",Yp="pointerleave",O1="pointerover",R1="pointerenter",A2="contextmenu",R5="touchstart",z5="touchend",H5="touchmove",w5="touchcancel",M2="wheel",dC=5,pC=[[A5,"_pointerenter"],[N5,"_pointerdown"],[M5,"_pointermove"],[O5,"_pointerup"],[x5,"_pointerleave"],[R5,"_pointerdown"],[H5,"_pointermove"],[z5,"_pointerup"],[w5,"_pointercancel"],[D5,"_pointerover"],[M2,"_wheel"],[A2,"_contextmenu"],[Lp,"_pointerdown"],[jp,"_pointermove"],[kf,"_pointerup"],[Pp,"_pointercancel"],[Yp,"_pointerleave"],[hC,"_lostpointercapture"]],N2={mouse:{[N1]:fC,[Yp]:x5,[O1]:D5,[R1]:A5,[jp]:M5,[Lp]:N5,[kf]:O5,[Pp]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[N1]:"touchout",[Yp]:"touchleave",[O1]:"touchover",[R1]:"touchenter",[jp]:H5,[Lp]:R5,[kf]:z5,[Pp]:w5,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[N1]:N1,[Yp]:Yp,[O1]:O1,[R1]:R1,[jp]:jp,[Lp]:Lp,[kf]:kf,[Pp]:Pp,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},qp=n=>n.indexOf("pointer")>=0?"pointer":n.indexOf("touch")>=0?"touch":"mouse",If=n=>{const t=qp(n);if(t==="pointer")return Ot.pointerEventsEnabled&&N2.pointer;if(t==="touch")return N2.touch;if(t==="mouse")return N2.mouse};function U5(n={}){return(n.clipFunc||n.clipWidth||n.clipHeight)&&k.warn("Stage does not support clipping. Please use clip for Layers or Groups."),n}const mC="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",Xp=[];let z1=class extends Zi{constructor(t){super(U5(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),Xp.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{U5(this.attrs)}),this._checkVisibility()}_validateAdd(t){const i=t.getType()==="Layer",s=t.getType()==="FastLayer";i||s||k.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===cC){let i;if(t.charAt(0)==="."){const s=t.slice(1);t=document.getElementsByClassName(s)[0]}else t.charAt(0)!=="#"?i=t:i=t.slice(1),t=document.getElementById(i);if(!t)throw"Can not find container in document with id "+i}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){const t=this.children,i=t.length;for(let s=0;s<i;s++)t[s].clear();return this}clone(t){return t||(t={}),t.container=typeof document<"u"&&document.createElement("div"),Zi.prototype.clone.call(this,t)}destroy(){super.destroy();const t=this.content;t&&k._isInDocument(t)&&this.container().removeChild(t);const i=Xp.indexOf(this);return i>-1&&Xp.splice(i,1),k.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(k.warn(mC),null)}_getPointerById(t){return this._pointerPositions.find(i=>i.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t={...t},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();const i=new Vo({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),s=i.getContext()._context,u=this.children;return(t.x||t.y)&&s.translate(-1*t.x,-1*t.y),u.forEach(function(c){if(!c.isVisible())return;const f=c._toKonvaCanvas(t);s.drawImage(f._canvas,t.x,t.y,f.getWidth()/f.getPixelRatio(),f.getHeight()/f.getPixelRatio())}),i}getIntersection(t){if(!t)return null;const i=this.children,s=i.length,u=s-1;for(let c=u;c>=0;c--){const f=i[c].getIntersection(t);if(f)return f}return null}_resizeDOM(){const t=this.width(),i=this.height();this.content&&(this.content.style.width=t+_5,this.content.style.height=i+_5),this.bufferCanvas.setSize(t,i),this.bufferHitCanvas.setSize(t,i),this.children.forEach(s=>{s.setSize({width:t,height:i}),s.draw()})}add(t,...i){if(arguments.length>1){for(let u=0;u<arguments.length;u++)this.add(arguments[u]);return this}super.add(t);const s=this.children.length;return s>dC&&k.warn("The stage has "+s+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),Ot.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return T5(t,this)}setPointerCapture(t){C5(t,this)}releaseCapture(t){Gp(t)}getLayers(){return this.children}_bindContentEvents(){Ot.isBrowser&&pC.forEach(([t,i])=>{this.content.addEventListener(t,s=>{this[i](s)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const i=If(t.type);i&&this._fire(i.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const i=If(t.type);i&&this._fire(i.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let i=this[t+"targetShape"];return i&&!i.getStage()&&(i=null),i}_pointerleave(t){const i=If(t.type),s=qp(t.type);if(!i)return;this.setPointersPositions(t);const u=this._getTargetShape(s),c=!(Ot.isDragging()||Ot.isTransforming())||Ot.hitOnDragEnabled;u&&c?(u._fireAndBubble(i.pointerout,{evt:t}),u._fireAndBubble(i.pointerleave,{evt:t}),this._fire(i.pointerleave,{evt:t,target:this,currentTarget:this}),this[s+"targetShape"]=null):c&&(this._fire(i.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(i.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(t){const i=If(t.type),s=qp(t.type);if(!i)return;this.setPointersPositions(t);let u=!1;this._changedPointerPositions.forEach(c=>{const f=this.getIntersection(c);if(Ne.justDragged=!1,Ot["_"+s+"ListenClick"]=!0,!f||!f.isListening()){this[s+"ClickStartShape"]=void 0;return}Ot.capturePointerEventsEnabled&&f.setPointerCapture(c.id),this[s+"ClickStartShape"]=f,f._fireAndBubble(i.pointerdown,{evt:t,pointerId:c.id}),u=!0;const p=t.type.indexOf("touch")>=0;f.preventDefault()&&t.cancelable&&p&&t.preventDefault()}),u||this._fire(i.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(t){const i=If(t.type),s=qp(t.type);if(!i)return;const u=t.type.indexOf("touch")>=0||t.pointerType==="touch";if(Ot.isDragging()&&Ne.node.preventDefault()&&t.cancelable&&u&&t.preventDefault(),this.setPointersPositions(t),!(!(Ot.isDragging()||Ot.isTransforming())||Ot.hitOnDragEnabled))return;const f={};let p=!1;const m=this._getTargetShape(s);this._changedPointerPositions.forEach(S=>{const b=x2(S.id)||this.getIntersection(S),_=S.id,x={evt:t,pointerId:_},D=m!==b;if(D&&m&&(m._fireAndBubble(i.pointerout,{...x},b),m._fireAndBubble(i.pointerleave,{...x},b)),b){if(f[b._id])return;f[b._id]=!0}b&&b.isListening()?(p=!0,D&&(b._fireAndBubble(i.pointerover,{...x},m),b._fireAndBubble(i.pointerenter,{...x},m),this[s+"targetShape"]=b),b._fireAndBubble(i.pointermove,{...x})):m&&(this._fire(i.pointerover,{evt:t,target:this,currentTarget:this,pointerId:_}),this[s+"targetShape"]=null)}),p||this._fire(i.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const i=If(t.type),s=qp(t.type);if(!i)return;this.setPointersPositions(t);const u=this[s+"ClickStartShape"],c=this[s+"ClickEndShape"],f={};let p=!1;this._changedPointerPositions.forEach(m=>{const S=x2(m.id)||this.getIntersection(m);if(S){if(S.releaseCapture(m.id),f[S._id])return;f[S._id]=!0}const b=m.id,_={evt:t,pointerId:b};let x=!1;Ot["_"+s+"InDblClickWindow"]?(x=!0,clearTimeout(this[s+"DblTimeout"])):Ne.justDragged||(Ot["_"+s+"InDblClickWindow"]=!0,clearTimeout(this[s+"DblTimeout"])),this[s+"DblTimeout"]=setTimeout(function(){Ot["_"+s+"InDblClickWindow"]=!1},Ot.dblClickWindow),S&&S.isListening()?(p=!0,this[s+"ClickEndShape"]=S,S._fireAndBubble(i.pointerup,{..._}),Ot["_"+s+"ListenClick"]&&u&&u===S&&(S._fireAndBubble(i.pointerclick,{..._}),x&&c&&c===S&&S._fireAndBubble(i.pointerdblclick,{..._}))):(this[s+"ClickEndShape"]=null,p||(this._fire(i.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),p=!0),Ot["_"+s+"ListenClick"]&&this._fire(i.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:b}),x&&this._fire(i.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:b}))}),p||this._fire(i.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),Ot["_"+s+"ListenClick"]=!1,t.cancelable&&s!=="touch"&&s!=="pointer"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);const i=this.getIntersection(this.getPointerPosition());i&&i.isListening()?i._fireAndBubble(A2,{evt:t}):this._fire(A2,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);const i=this.getIntersection(this.getPointerPosition());i&&i.isListening()?i._fireAndBubble(M2,{evt:t}):this._fire(M2,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const i=x2(t.pointerId)||this.getIntersection(this.getPointerPosition());i&&i._fireAndBubble(kf,D2(t)),Gp(t.pointerId)}_lostpointercapture(t){Gp(t.pointerId)}setPointersPositions(t){const i=this._getContentPosition();let s=null,u=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,c=>{this._pointerPositions.push({id:c.identifier,x:(c.clientX-i.left)/i.scaleX,y:(c.clientY-i.top)/i.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,c=>{this._changedPointerPositions.push({id:c.identifier,x:(c.clientX-i.left)/i.scaleX,y:(c.clientY-i.top)/i.scaleY})})):(s=(t.clientX-i.left)/i.scaleX,u=(t.clientY-i.top)/i.scaleY,this.pointerPos={x:s,y:u},this._pointerPositions=[{x:s,y:u,id:k._getFirstPointerId(t)}],this._changedPointerPositions=[{x:s,y:u,id:k._getFirstPointerId(t)}])}_setPointerPosition(t){k.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};const t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new Vo({width:this.width(),height:this.height()}),this.bufferHitCanvas=new E2({pixelRatio:1,width:this.width(),height:this.height()}),!Ot.isBrowser)return;const t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}cache(){return k.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}};z1.prototype.nodeType=uC,En(z1),G.addGetterSetter(z1,"container"),Ot.isBrowser&&document.addEventListener("visibilitychange",()=>{Xp.forEach(n=>{n.batchDraw()})});const B5="hasShadow",V5="shadowRGBA",G5="patternImage",j5="linearGradient",L5="radialGradient";let H1;function O2(){return H1||(H1=k.createCanvasElement().getContext("2d"),H1)}const Kp={};function gC(n){const t=this.attrs.fillRule;t?n.fill(t):n.fill()}function yC(n){n.stroke()}function vC(n){const t=this.attrs.fillRule;t?n.fill(t):n.fill()}function SC(n){n.stroke()}function bC(){this._clearCache(B5)}function EC(){this._clearCache(V5)}function TC(){this._clearCache(G5)}function CC(){this._clearCache(j5)}function _C(){this._clearCache(L5)}class Ct extends Nt{constructor(t){super(t);let i,s=0;for(;i=k.getHitColor(),!(i&&!(i in Kp));)if(s++,s>=1e4){k.warn("Failed to find a unique color key for a shape. Konva may work incorrectly. Most likely your browser is using canvas farbling. Consider disabling it."),i=k.getRandomColor();break}this.colorKey=i,Kp[i]=this}getContext(){return k.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return k.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(B5,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(G5,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const i=O2().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(i&&i.setTransform){const s=new Qi;s.translate(this.fillPatternX(),this.fillPatternY()),s.rotate(Ot.getAngle(this.fillPatternRotation())),s.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),s.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const u=s.getMatrix(),c=typeof DOMMatrix>"u"?{a:u[0],b:u[1],c:u[2],d:u[3],e:u[4],f:u[5]}:new DOMMatrix(u);i.setTransform(c)}return i}}_getLinearGradient(){return this._getCache(j5,this.__getLinearGradient)}__getLinearGradient(){const t=this.fillLinearGradientColorStops();if(t){const i=O2(),s=this.fillLinearGradientStartPoint(),u=this.fillLinearGradientEndPoint(),c=i.createLinearGradient(s.x,s.y,u.x,u.y);for(let f=0;f<t.length;f+=2)c.addColorStop(t[f],t[f+1]);return c}}_getRadialGradient(){return this._getCache(L5,this.__getRadialGradient)}__getRadialGradient(){const t=this.fillRadialGradientColorStops();if(t){const i=O2(),s=this.fillRadialGradientStartPoint(),u=this.fillRadialGradientEndPoint(),c=i.createRadialGradient(s.x,s.y,this.fillRadialGradientStartRadius(),u.x,u.y,this.fillRadialGradientEndRadius());for(let f=0;f<t.length;f+=2)c.addColorStop(t[f],t[f+1]);return c}}getShadowRGBA(){return this._getCache(V5,this._getShadowRGBA)}_getShadowRGBA(){if(!this.hasShadow())return;const t=k.colorToRGBA(this.shadowColor());if(t)return"rgba("+t.r+","+t.g+","+t.b+","+t.a*(this.shadowOpacity()||1)+")"}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){const i=this.getStage();if(!i)return!1;const s=i.bufferHitCanvas;return s.getContext().clear(),this.drawHit(s,void 0,!0),s.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data[3]>0}destroy(){return Nt.prototype.destroy.call(this),delete Kp[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var i;if(!((i=this.attrs.perfectDrawEnabled)!==null&&i!==void 0?i:!0))return!1;const u=t||this.hasFill(),c=this.hasStroke(),f=this.getAbsoluteOpacity()!==1;if(u&&c&&f)return!0;const p=this.hasShadow(),m=this.shadowForStrokeEnabled();return!!(u&&c&&p&&m)}setStrokeHitEnabled(t){k.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){const t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){let i=!1,s=this.getParent();for(;s;){if(s.isCached()){i=!0;break}s=s.getParent()}const u=t.skipTransform,c=t.relativeTo||i&&this.getStage()||void 0,f=this.getSelfRect(),m=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,S=f.width+m,b=f.height+m,_=!t.skipShadow&&this.hasShadow(),x=_?this.shadowOffsetX():0,D=_?this.shadowOffsetY():0,A=S+Math.abs(x),N=b+Math.abs(D),R=_&&this.shadowBlur()||0,O=A+R*2,U=N+R*2,j={width:O,height:U,x:-(m/2+R)+Math.min(x,0)+f.x,y:-(m/2+R)+Math.min(D,0)+f.y};return u?j:this._transformedRect(j,c)}drawScene(t,i,s){const u=this.getLayer(),c=t||u.getCanvas(),f=c.getContext(),p=this._getCanvasCache(),m=this.getSceneFunc(),S=this.hasShadow();let b;const _=i===this;if(!this.isVisible()&&!_)return this;if(p){f.save();const x=this.getAbsoluteTransform(i).getMatrix();return f.transform(x[0],x[1],x[2],x[3],x[4],x[5]),this._drawCachedSceneCanvas(f),f.restore(),this}if(!m)return this;if(f.save(),this._useBufferCanvas()){b=this.getStage();const x=s||b.bufferCanvas,D=x.getContext();D.clear(),D.save(),D._applyLineJoin(this),D._applyMiterLimit(this);const A=this.getAbsoluteTransform(i).getMatrix();D.transform(A[0],A[1],A[2],A[3],A[4],A[5]),m.call(this,D,this),D.restore();const N=x.pixelRatio;S&&f._applyShadow(this),_||(f._applyOpacity(this),f._applyGlobalCompositeOperation(this)),f.drawImage(x._canvas,x.x||0,x.y||0,x.width/N,x.height/N)}else{if(f._applyLineJoin(this),f._applyMiterLimit(this),!_){const x=this.getAbsoluteTransform(i).getMatrix();f.transform(x[0],x[1],x[2],x[3],x[4],x[5]),f._applyOpacity(this),f._applyGlobalCompositeOperation(this)}S&&f._applyShadow(this),m.call(this,f,this)}return f.restore(),this}drawHit(t,i,s=!1){if(!this.shouldDrawHit(i,s))return this;const u=this.getLayer(),c=t||u.hitCanvas,f=c&&c.getContext(),p=this.hitFunc()||this.sceneFunc(),m=this._getCanvasCache(),S=m&&m.hit;if(this.colorKey||k.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),S){f.save();const _=this.getAbsoluteTransform(i).getMatrix();return f.transform(_[0],_[1],_[2],_[3],_[4],_[5]),this._drawCachedHitCanvas(f),f.restore(),this}if(!p)return this;if(f.save(),f._applyLineJoin(this),f._applyMiterLimit(this),!(this===i)){const _=this.getAbsoluteTransform(i).getMatrix();f.transform(_[0],_[1],_[2],_[3],_[4],_[5])}return p.call(this,f,this),f.restore(),this}drawHitFromCache(t=0){const i=this._getCanvasCache(),s=this._getCachedSceneCanvas(),u=i.hit,c=u.getContext(),f=u.getWidth(),p=u.getHeight();c.clear(),c.drawImage(s._canvas,0,0,f,p);try{const m=c.getImageData(0,0,f,p),S=m.data,b=S.length,_=k._hexToRgb(this.colorKey);for(let x=0;x<b;x+=4)S[x+3]>t?(S[x]=_.r,S[x+1]=_.g,S[x+2]=_.b,S[x+3]=255):S[x+3]=0;c.putImageData(m,0,0)}catch(m){k.error("Unable to draw hit graph from cached scene canvas. "+m.message)}return this}hasPointerCapture(t){return T5(t,this)}setPointerCapture(t){C5(t,this)}releaseCapture(t){Gp(t)}}Ct.prototype._fillFunc=gC,Ct.prototype._strokeFunc=yC,Ct.prototype._fillFuncHit=vC,Ct.prototype._strokeFuncHit=SC,Ct.prototype._centroid=!1,Ct.prototype.nodeType="Shape",En(Ct),Ct.prototype.eventListeners={},Ct.prototype.on.call(Ct.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",bC),Ct.prototype.on.call(Ct.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",EC),Ct.prototype.on.call(Ct.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",TC),Ct.prototype.on.call(Ct.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",CC),Ct.prototype.on.call(Ct.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",_C),G.addGetterSetter(Ct,"stroke",void 0,g5()),G.addGetterSetter(Ct,"strokeWidth",2,Dt()),G.addGetterSetter(Ct,"fillAfterStrokeEnabled",!1),G.addGetterSetter(Ct,"hitStrokeWidth","auto",T2()),G.addGetterSetter(Ct,"strokeHitEnabled",!0,sl()),G.addGetterSetter(Ct,"perfectDrawEnabled",!0,sl()),G.addGetterSetter(Ct,"shadowForStrokeEnabled",!0,sl()),G.addGetterSetter(Ct,"lineJoin"),G.addGetterSetter(Ct,"lineCap"),G.addGetterSetter(Ct,"miterLimit"),G.addGetterSetter(Ct,"sceneFunc"),G.addGetterSetter(Ct,"hitFunc"),G.addGetterSetter(Ct,"dash"),G.addGetterSetter(Ct,"dashOffset",0,Dt()),G.addGetterSetter(Ct,"shadowColor",void 0,oc()),G.addGetterSetter(Ct,"shadowBlur",0,Dt()),G.addGetterSetter(Ct,"shadowOpacity",1,Dt()),G.addComponentsGetterSetter(Ct,"shadowOffset",["x","y"]),G.addGetterSetter(Ct,"shadowOffsetX",0,Dt()),G.addGetterSetter(Ct,"shadowOffsetY",0,Dt()),G.addGetterSetter(Ct,"fillPatternImage"),G.addGetterSetter(Ct,"fill",void 0,g5()),G.addGetterSetter(Ct,"fillPatternX",0,Dt()),G.addGetterSetter(Ct,"fillPatternY",0,Dt()),G.addGetterSetter(Ct,"fillLinearGradientColorStops"),G.addGetterSetter(Ct,"strokeLinearGradientColorStops"),G.addGetterSetter(Ct,"fillRadialGradientStartRadius",0),G.addGetterSetter(Ct,"fillRadialGradientEndRadius",0),G.addGetterSetter(Ct,"fillRadialGradientColorStops"),G.addGetterSetter(Ct,"fillPatternRepeat","repeat"),G.addGetterSetter(Ct,"fillEnabled",!0),G.addGetterSetter(Ct,"strokeEnabled",!0),G.addGetterSetter(Ct,"shadowEnabled",!0),G.addGetterSetter(Ct,"dashEnabled",!0),G.addGetterSetter(Ct,"strokeScaleEnabled",!0),G.addGetterSetter(Ct,"fillPriority","color"),G.addComponentsGetterSetter(Ct,"fillPatternOffset",["x","y"]),G.addGetterSetter(Ct,"fillPatternOffsetX",0,Dt()),G.addGetterSetter(Ct,"fillPatternOffsetY",0,Dt()),G.addComponentsGetterSetter(Ct,"fillPatternScale",["x","y"]),G.addGetterSetter(Ct,"fillPatternScaleX",1,Dt()),G.addGetterSetter(Ct,"fillPatternScaleY",1,Dt()),G.addComponentsGetterSetter(Ct,"fillLinearGradientStartPoint",["x","y"]),G.addComponentsGetterSetter(Ct,"strokeLinearGradientStartPoint",["x","y"]),G.addGetterSetter(Ct,"fillLinearGradientStartPointX",0),G.addGetterSetter(Ct,"strokeLinearGradientStartPointX",0),G.addGetterSetter(Ct,"fillLinearGradientStartPointY",0),G.addGetterSetter(Ct,"strokeLinearGradientStartPointY",0),G.addComponentsGetterSetter(Ct,"fillLinearGradientEndPoint",["x","y"]),G.addComponentsGetterSetter(Ct,"strokeLinearGradientEndPoint",["x","y"]),G.addGetterSetter(Ct,"fillLinearGradientEndPointX",0),G.addGetterSetter(Ct,"strokeLinearGradientEndPointX",0),G.addGetterSetter(Ct,"fillLinearGradientEndPointY",0),G.addGetterSetter(Ct,"strokeLinearGradientEndPointY",0),G.addComponentsGetterSetter(Ct,"fillRadialGradientStartPoint",["x","y"]),G.addGetterSetter(Ct,"fillRadialGradientStartPointX",0),G.addGetterSetter(Ct,"fillRadialGradientStartPointY",0),G.addComponentsGetterSetter(Ct,"fillRadialGradientEndPoint",["x","y"]),G.addGetterSetter(Ct,"fillRadialGradientEndPointX",0),G.addGetterSetter(Ct,"fillRadialGradientEndPointY",0),G.addGetterSetter(Ct,"fillPatternRotation",0),G.addGetterSetter(Ct,"fillRule",void 0,oc()),G.backCompat(Ct,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});const xC="beforeDraw",DC="draw",P5=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],AC=P5.length;let cc=class extends Zi{constructor(t){super(t),this.canvas=new Vo,this.hitCanvas=new E2({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);const i=this.getStage();return i&&i.content&&(i.content.removeChild(this.getNativeCanvasElement()),t<i.children.length-1?i.content.insertBefore(this.getNativeCanvasElement(),i.children[t+1].getCanvas()._canvas):i.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){Nt.prototype.moveToTop.call(this);const t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!Nt.prototype.moveUp.call(this))return!1;const i=this.getStage();return!i||!i.content?!1:(i.content.removeChild(this.getNativeCanvasElement()),this.index<i.children.length-1?i.content.insertBefore(this.getNativeCanvasElement(),i.children[this.index+1].getCanvas()._canvas):i.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(Nt.prototype.moveDown.call(this)){const t=this.getStage();if(t){const i=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),i[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(Nt.prototype.moveToBottom.call(this)){const t=this.getStage();if(t){const i=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),i[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){const t=this.getNativeCanvasElement();return Nt.prototype.remove.call(this),t&&t.parentNode&&k._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:i}){return this.canvas.setSize(t,i),this.hitCanvas.setSize(t,i),this._setSmoothEnabled(),this}_validateAdd(t){const i=t.getType();i!=="Group"&&i!=="Shape"&&k.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return t={...t},t.width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=t.x!==void 0?t.x:this.x(),t.y=t.y!==void 0?t.y:this.y(),Nt.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){k.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){k.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,k.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;let i=1,s=!1;for(;;){for(let u=0;u<AC;u++){const c=P5[u],f=this._getIntersection({x:t.x+c.x*i,y:t.y+c.y*i}),p=f.shape;if(p)return p;if(s=!!f.antialiased,!f.antialiased)break}if(s)i+=1;else return null}}_getIntersection(t){const i=this.hitCanvas.pixelRatio,s=this.hitCanvas.context.getImageData(Math.round(t.x*i),Math.round(t.y*i),1,1).data,u=s[3];if(u===255){const c=k.getHitColorKey(s[0],s[1],s[2]),f=Kp[c];return f?{shape:f}:{antialiased:!0}}else if(u>0)return{antialiased:!0};return{}}drawScene(t,i,s){const u=this.getLayer(),c=t||u&&u.getCanvas();return this._fire(xC,{node:this}),this.clearBeforeDraw()&&c.getContext().clear(),Zi.prototype.drawScene.call(this,c,i,s),this._fire(DC,{node:this}),this}drawHit(t,i){const s=this.getLayer(),u=t||s&&s.hitCanvas;return s&&s.clearBeforeDraw()&&s.getHitCanvas().getContext().clear(),Zi.prototype.drawHit.call(this,u,i),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){k.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return k.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;const t=this.parent;!!this.hitCanvas._canvas.parentNode?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}destroy(){return k.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}};cc.prototype.nodeType="Layer",En(cc),G.addGetterSetter(cc,"imageSmoothingEnabled",!0),G.addGetterSetter(cc,"clearBeforeDraw",!0),G.addGetterSetter(cc,"hitGraphEnabled",!0,sl());class R2 extends cc{constructor(t){super(t),this.listening(!1),k.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}R2.prototype.nodeType="FastLayer",En(R2);let Wf=class extends Zi{_validateAdd(t){const i=t.getType();i!=="Group"&&i!=="Shape"&&k.throw("You may only add groups and shapes to groups.")}};Wf.prototype.nodeType="Group",En(Wf);const z2=(function(){return rc.performance&&rc.performance.now?function(){return rc.performance.now()}:function(){return new Date().getTime()}})();class Ss{constructor(t,i){this.id=Ss.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:z2(),frameRate:0},this.func=t,this.setLayers(i)}setLayers(t){let i=[];return t&&(i=Array.isArray(t)?t:[t]),this.layers=i,this}getLayers(){return this.layers}addLayer(t){const i=this.layers,s=i.length;for(let u=0;u<s;u++)if(i[u]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){const i=Ss.animations,s=i.length;for(let u=0;u<s;u++)if(i[u].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=z2(),Ss._addAnimation(this),this}stop(){return Ss._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.push(t),this._handleAnimation()}static _removeAnimation(t){const i=t.id,s=this.animations,u=s.length;for(let c=0;c<u;c++)if(s[c].id===i){this.animations.splice(c,1);break}}static _runFrames(){const t={},i=this.animations;for(let s=0;s<i.length;s++){const u=i[s],c=u.layers,f=u.func;u._updateFrameObject(z2());const p=c.length;let m;if(f?m=f.call(u,u.frame)!==!1:m=!0,!!m)for(let S=0;S<p;S++){const b=c[S];b._id!==void 0&&(t[b._id]=b)}}for(const s in t)t.hasOwnProperty(s)&&t[s].batchDraw()}static _animationLoop(){const t=Ss;t.animations.length?(t._runFrames(),k.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,k.requestAnimFrame(this._animationLoop))}}Ss.animations=[],Ss.animIdCounter=0,Ss.animRunning=!1;const MC={node:1,duration:1,easing:1,onFinish:1,yoyo:1},NC=1,Y5=2,q5=3,X5=["fill","stroke","shadowColor"];let OC=0;class RC{constructor(t,i,s,u,c,f,p){this.prop=t,this.propFunc=i,this.begin=u,this._pos=u,this.duration=f,this._change=0,this.prevPos=0,this.yoyo=p,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=s,this._change=c-this.begin,this.pause()}fire(t){const i=this[t];i&&i()}setTime(t){t>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=Y5,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=q5,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){const t=this.getTimer()-this._startTime;this.state===Y5?this.setTime(t):this.state===q5&&this.setTime(this.duration-t)}pause(){this.state=NC,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Ze{constructor(t){const i=this,s=t.node,u=s._id,c=t.easing||Qp.Linear,f=!!t.yoyo;let p,m;typeof t.duration>"u"?p=.3:t.duration===0?p=.001:p=t.duration,this.node=s,this._id=OC++;const S=s.getLayer()||(s instanceof Ot.Stage?s.getLayers():null);S||k.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ss(function(){i.tween.onEnterFrame()},S),this.tween=new RC(m,function(b){i._tweenFunc(b)},c,0,1,p*1e3,f),this._addListeners(),Ze.attrs[u]||(Ze.attrs[u]={}),Ze.attrs[u][this._id]||(Ze.attrs[u][this._id]={}),Ze.tweens[u]||(Ze.tweens[u]={});for(m in t)MC[m]===void 0&&this._addAttr(m,t[m]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,i){const s=this.node,u=s._id;let c,f,p,m,S;const b=Ze.tweens[u][t];b&&delete Ze.attrs[u][b][t];let _=s.getAttr(t);if(k._isArray(i))if(c=[],f=Math.max(i.length,_.length),t==="points"&&i.length!==_.length&&(i.length>_.length?(m=_,_=k._prepareArrayForTween(_,i,s.closed())):(p=i,i=k._prepareArrayForTween(i,_,s.closed()))),t.indexOf("fill")===0)for(let x=0;x<f;x++)if(x%2===0)c.push(i[x]-_[x]);else{const D=k.colorToRGBA(_[x]);S=k.colorToRGBA(i[x]),_[x]=D,c.push({r:S.r-D.r,g:S.g-D.g,b:S.b-D.b,a:S.a-D.a})}else for(let x=0;x<f;x++)c.push(i[x]-_[x]);else X5.indexOf(t)!==-1?(_=k.colorToRGBA(_),S=k.colorToRGBA(i),c={r:S.r-_.r,g:S.g-_.g,b:S.b-_.b,a:S.a-_.a}):c=i-_;Ze.attrs[u][this._id][t]={start:_,diff:c,end:i,trueEnd:p,trueStart:m},Ze.tweens[u][t]=this._id}_tweenFunc(t){const i=this.node,s=Ze.attrs[i._id][this._id];let u,c,f,p,m,S,b,_;for(u in s){if(c=s[u],f=c.start,p=c.diff,_=c.end,k._isArray(f))if(m=[],b=Math.max(f.length,_.length),u.indexOf("fill")===0)for(S=0;S<b;S++)S%2===0?m.push((f[S]||0)+p[S]*t):m.push("rgba("+Math.round(f[S].r+p[S].r*t)+","+Math.round(f[S].g+p[S].g*t)+","+Math.round(f[S].b+p[S].b*t)+","+(f[S].a+p[S].a*t)+")");else for(S=0;S<b;S++)m.push((f[S]||0)+p[S]*t);else X5.indexOf(u)!==-1?m="rgba("+Math.round(f.r+p.r*t)+","+Math.round(f.g+p.g*t)+","+Math.round(f.b+p.b*t)+","+(f.a+p.a*t)+")":m=f+p*t;i.setAttr(u,m)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{const t=this.node,i=Ze.attrs[t._id][this._id];i.points&&i.points.trueEnd&&t.setAttr("points",i.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{const t=this.node,i=Ze.attrs[t._id][this._id];i.points&&i.points.trueStart&&t.points(i.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){const t=this.node._id,i=this._id,s=Ze.tweens[t];this.pause(),this.anim&&this.anim.stop();for(const u in s)delete Ze.tweens[t][u];delete Ze.attrs[t][i],Ze.tweens[t]&&(Object.keys(Ze.tweens[t]).length===0&&delete Ze.tweens[t],Object.keys(Ze.attrs[t]).length===0&&delete Ze.attrs[t])}}Ze.attrs={},Ze.tweens={},Nt.prototype.to=function(n){const t=n.onFinish;n.node=this,n.onFinish=function(){this.destroy(),t&&t()},new Ze(n).play()};const Qp={BackEaseIn(n,t,i,s){return i*(n/=s)*n*((1.70158+1)*n-1.70158)+t},BackEaseOut(n,t,i,s){return i*((n=n/s-1)*n*((1.70158+1)*n+1.70158)+1)+t},BackEaseInOut(n,t,i,s){let u=1.70158;return(n/=s/2)<1?i/2*(n*n*(((u*=1.525)+1)*n-u))+t:i/2*((n-=2)*n*(((u*=1.525)+1)*n+u)+2)+t},ElasticEaseIn(n,t,i,s,u,c){let f=0;return n===0?t:(n/=s)===1?t+i:(c||(c=s*.3),!u||u<Math.abs(i)?(u=i,f=c/4):f=c/(2*Math.PI)*Math.asin(i/u),-(u*Math.pow(2,10*(n-=1))*Math.sin((n*s-f)*(2*Math.PI)/c))+t)},ElasticEaseOut(n,t,i,s,u,c){let f=0;return n===0?t:(n/=s)===1?t+i:(c||(c=s*.3),!u||u<Math.abs(i)?(u=i,f=c/4):f=c/(2*Math.PI)*Math.asin(i/u),u*Math.pow(2,-10*n)*Math.sin((n*s-f)*(2*Math.PI)/c)+i+t)},ElasticEaseInOut(n,t,i,s,u,c){let f=0;return n===0?t:(n/=s/2)===2?t+i:(c||(c=s*(.3*1.5)),!u||u<Math.abs(i)?(u=i,f=c/4):f=c/(2*Math.PI)*Math.asin(i/u),n<1?-.5*(u*Math.pow(2,10*(n-=1))*Math.sin((n*s-f)*(2*Math.PI)/c))+t:u*Math.pow(2,-10*(n-=1))*Math.sin((n*s-f)*(2*Math.PI)/c)*.5+i+t)},BounceEaseOut(n,t,i,s){return(n/=s)<1/2.75?i*(7.5625*n*n)+t:n<2/2.75?i*(7.5625*(n-=1.5/2.75)*n+.75)+t:n<2.5/2.75?i*(7.5625*(n-=2.25/2.75)*n+.9375)+t:i*(7.5625*(n-=2.625/2.75)*n+.984375)+t},BounceEaseIn(n,t,i,s){return i-Qp.BounceEaseOut(s-n,0,i,s)+t},BounceEaseInOut(n,t,i,s){return n<s/2?Qp.BounceEaseIn(n*2,0,i,s)*.5+t:Qp.BounceEaseOut(n*2-s,0,i,s)*.5+i*.5+t},EaseIn(n,t,i,s){return i*(n/=s)*n+t},EaseOut(n,t,i,s){return-i*(n/=s)*(n-2)+t},EaseInOut(n,t,i,s){return(n/=s/2)<1?i/2*n*n+t:-i/2*(--n*(n-2)-1)+t},StrongEaseIn(n,t,i,s){return i*(n/=s)*n*n*n*n+t},StrongEaseOut(n,t,i,s){return i*((n=n/s-1)*n*n*n*n+1)+t},StrongEaseInOut(n,t,i,s){return(n/=s/2)<1?i/2*n*n*n*n*n+t:i/2*((n-=2)*n*n*n*n+2)+t},Linear(n,t,i,s){return i*n/s+t}},$f=k._assign(Ot,{Util:k,Transform:Qi,Node:Nt,Container:Zi,Stage:z1,stages:Xp,Layer:cc,FastLayer:R2,Group:Wf,DD:Ne,Shape:Ct,shapes:Kp,Animation:Ss,Tween:Ze,Easings:Qp,Context:C1,Canvas:b2});class Nr extends Ct{_sceneFunc(t){const i=Ot.getAngle(this.angle()),s=this.clockwise();t.beginPath(),t.arc(0,0,this.outerRadius(),0,i,s),t.arc(0,0,this.innerRadius(),i,0,!s),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}getSelfRect(){const t=this.innerRadius(),i=this.outerRadius(),s=this.clockwise(),u=Ot.getAngle(s?360-this.angle():this.angle()),c=Math.cos(Math.min(u,Math.PI)),f=1,p=Math.sin(Math.min(Math.max(Math.PI,u),3*Math.PI/2)),m=Math.sin(Math.min(u,Math.PI/2)),S=c*(c>0?t:i),b=f*i,_=p*(p>0?t:i),x=m*(m>0?i:t);return{x:S,y:s?-1*x:_,width:b-S,height:x-_}}}Nr.prototype._centroid=!0,Nr.prototype.className="Arc",Nr.prototype._attrsAffectingSize=["innerRadius","outerRadius","angle","clockwise"],En(Nr),G.addGetterSetter(Nr,"innerRadius",0,Dt()),G.addGetterSetter(Nr,"outerRadius",0,Dt()),G.addGetterSetter(Nr,"angle",0,Dt()),G.addGetterSetter(Nr,"clockwise",!1,sl());function H2(n,t,i,s,u,c,f){const p=Math.sqrt(Math.pow(i-n,2)+Math.pow(s-t,2)),m=Math.sqrt(Math.pow(u-i,2)+Math.pow(c-s,2)),S=f*p/(p+m),b=f*m/(p+m),_=i-S*(u-n),x=s-S*(c-t),D=i+b*(u-n),A=s+b*(c-t);return[_,x,D,A]}function K5(n,t){const i=n.length,s=[];for(let u=2;u<i-2;u+=2){const c=H2(n[u-2],n[u-1],n[u],n[u+1],n[u+2],n[u+3],t);isNaN(c[0])||(s.push(c[0]),s.push(c[1]),s.push(n[u]),s.push(n[u+1]),s.push(c[2]),s.push(c[3]))}return s}let Or=class extends Ct{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){const i=this.points(),s=i.length,u=this.tension(),c=this.closed(),f=this.bezier();if(!s)return;let p=0;if(t.beginPath(),t.moveTo(i[0],i[1]),u!==0&&s>4){const m=this.getTensionPoints(),S=m.length;for(p=c?0:4,c||t.quadraticCurveTo(m[0],m[1],m[2],m[3]);p<S-2;)t.bezierCurveTo(m[p++],m[p++],m[p++],m[p++],m[p++],m[p++]);c||t.quadraticCurveTo(m[S-2],m[S-1],i[s-2],i[s-1])}else if(f)for(p=2;p<s;)t.bezierCurveTo(i[p++],i[p++],i[p++],i[p++],i[p++],i[p++]);else for(p=2;p<s;p+=2)t.lineTo(i[p],i[p+1]);c?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():K5(this.points(),this.tension())}_getTensionPointsClosed(){const t=this.points(),i=t.length,s=this.tension(),u=H2(t[i-2],t[i-1],t[0],t[1],t[2],t[3],s),c=H2(t[i-4],t[i-3],t[i-2],t[i-1],t[0],t[1],s),f=K5(t,s);return[u[2],u[3]].concat(f).concat([c[0],c[1],t[i-2],t[i-1],c[2],c[3],u[0],u[1],t[0],t[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let t=this.points();if(t.length<4)return{x:t[0]||0,y:t[1]||0,width:0,height:0};this.tension()!==0?t=[t[0],t[1],...this._getTensionPoints(),t[t.length-2],t[t.length-1]]:t=this.points();let i=t[0],s=t[0],u=t[1],c=t[1],f,p;for(let m=0;m<t.length/2;m++)f=t[m*2],p=t[m*2+1],i=Math.min(i,f),s=Math.max(s,f),u=Math.min(u,p),c=Math.max(c,p);return{x:i,y:u,width:s-i,height:c-u}}};Or.prototype.className="Line",Or.prototype._attrsAffectingSize=["points","bezier","tension"],En(Or),G.addGetterSetter(Or,"closed",!1),G.addGetterSetter(Or,"bezier",!1),G.addGetterSetter(Or,"tension",0,Dt()),G.addGetterSetter(Or,"points",[],JT());const zC=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],HC=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],wC=[[1],[1,1],[1,2,1],[1,3,3,1]],Q5=(n,t,i)=>{let s,u;const f=i/2;s=0;for(let p=0;p<20;p++)u=f*zC[20][p]+f,s+=HC[20][p]*UC(n,t,u);return f*s},Z5=(n,t,i)=>{i===void 0&&(i=1);const s=n[0]-2*n[1]+n[2],u=t[0]-2*t[1]+t[2],c=2*n[1]-2*n[0],f=2*t[1]-2*t[0],p=4*(s*s+u*u),m=4*(s*c+u*f),S=c*c+f*f;if(p===0)return i*Math.sqrt(Math.pow(n[2]-n[0],2)+Math.pow(t[2]-t[0],2));const b=m/(2*p),_=S/p,x=i+b,D=_-b*b,A=x*x+D>0?Math.sqrt(x*x+D):0,N=b*b+D>0?Math.sqrt(b*b+D):0,R=b+Math.sqrt(b*b+D)!==0?D*Math.log(Math.abs((x+A)/(b+N))):0;return Math.sqrt(p)/2*(x*A-b*N+R)};function UC(n,t,i){const s=w2(1,i,n),u=w2(1,i,t),c=s*s+u*u;return Math.sqrt(c)}const w2=(n,t,i)=>{const s=i.length-1;let u,c;if(s===0)return 0;if(n===0){c=0;for(let f=0;f<=s;f++)c+=wC[s][f]*Math.pow(1-t,s-f)*Math.pow(t,f)*i[f];return c}else{u=new Array(s);for(let f=0;f<s;f++)u[f]=s*(i[f+1]-i[f]);return w2(n-1,t,u)}},J5=(n,t,i)=>{let s=1,u=n/t,c=(n-i(u))/t,f=0;for(;s>.001;){const p=i(u+c),m=Math.abs(n-p)/t;if(m<s)s=m,u+=c;else{const S=i(u-c),b=Math.abs(n-S)/t;b<s?(s=b,u-=c):c/=2}if(f++,f>500)break}return u};let bs=class Ki extends Ct{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=Ki.parsePathData(this.data()),this.pathLength=Ki.getPathLength(this.dataArray)}_sceneFunc(t){const i=this.dataArray;t.beginPath();let s=!1;for(let u=0;u<i.length;u++){const c=i[u].command,f=i[u].points;switch(c){case"L":t.lineTo(f[0],f[1]);break;case"M":t.moveTo(f[0],f[1]);break;case"C":t.bezierCurveTo(f[0],f[1],f[2],f[3],f[4],f[5]);break;case"Q":t.quadraticCurveTo(f[0],f[1],f[2],f[3]);break;case"A":const p=f[0],m=f[1],S=f[2],b=f[3],_=f[4],x=f[5],D=f[6],A=f[7],N=S>b?S:b,R=S>b?1:S/b,O=S>b?b/S:1;t.translate(p,m),t.rotate(D),t.scale(R,O),t.arc(0,0,N,_,_+x,1-A),t.scale(1/R,1/O),t.rotate(-D),t.translate(-p,-m);break;case"z":s=!0,t.closePath();break}}!s&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){let t=[];this.dataArray.forEach(function(m){if(m.command==="A"){const S=m.points[4],b=m.points[5],_=m.points[4]+b;let x=Math.PI/180;if(Math.abs(S-_)<x&&(x=Math.abs(S-_)),b<0)for(let D=S-x;D>_;D-=x){const A=Ki.getPointOnEllipticalArc(m.points[0],m.points[1],m.points[2],m.points[3],D,0);t.push(A.x,A.y)}else for(let D=S+x;D<_;D+=x){const A=Ki.getPointOnEllipticalArc(m.points[0],m.points[1],m.points[2],m.points[3],D,0);t.push(A.x,A.y)}}else if(m.command==="C")for(let S=0;S<=1;S+=.01){const b=Ki.getPointOnCubicBezier(S,m.start.x,m.start.y,m.points[0],m.points[1],m.points[2],m.points[3],m.points[4],m.points[5]);t.push(b.x,b.y)}else t=t.concat(m.points)});let i=t[0],s=t[0],u=t[1],c=t[1],f,p;for(let m=0;m<t.length/2;m++)f=t[m*2],p=t[m*2+1],isNaN(f)||(i=Math.min(i,f),s=Math.max(s,f)),isNaN(p)||(u=Math.min(u,p),c=Math.max(c,p));return{x:i,y:u,width:s-i,height:c-u}}getLength(){return this.pathLength}getPointAtLength(t){return Ki.getPointAtLengthOfDataArray(t,this.dataArray)}static getLineLength(t,i,s,u){return Math.sqrt((s-t)*(s-t)+(u-i)*(u-i))}static getPathLength(t){let i=0;for(let s=0;s<t.length;++s)i+=t[s].pathLength;return i}static getPointAtLengthOfDataArray(t,i){let s,u=0,c=i.length;if(!c)return null;for(;u<c&&t>i[u].pathLength;)t-=i[u].pathLength,++u;if(u===c)return s=i[u-1].points.slice(-2),{x:s[0],y:s[1]};if(t<.01)return i[u].command==="M"?(s=i[u].points.slice(0,2),{x:s[0],y:s[1]}):{x:i[u].start.x,y:i[u].start.y};const f=i[u],p=f.points;switch(f.command){case"L":return Ki.getPointOnLine(t,f.start.x,f.start.y,p[0],p[1]);case"C":return Ki.getPointOnCubicBezier(J5(t,Ki.getPathLength(i),N=>Q5([f.start.x,p[0],p[2],p[4]],[f.start.y,p[1],p[3],p[5]],N)),f.start.x,f.start.y,p[0],p[1],p[2],p[3],p[4],p[5]);case"Q":return Ki.getPointOnQuadraticBezier(J5(t,Ki.getPathLength(i),N=>Z5([f.start.x,p[0],p[2]],[f.start.y,p[1],p[3]],N)),f.start.x,f.start.y,p[0],p[1],p[2],p[3]);case"A":const m=p[0],S=p[1],b=p[2],_=p[3],x=p[5],D=p[6];let A=p[4];return A+=x*t/f.pathLength,Ki.getPointOnEllipticalArc(m,S,b,_,A,D)}return null}static getPointOnLine(t,i,s,u,c,f,p){f=f??i,p=p??s;const m=this.getLineLength(i,s,u,c);if(m<1e-10)return{x:i,y:s};if(u===i)return{x:f,y:p+(c>s?t:-t)};const S=(c-s)/(u-i),b=Math.sqrt(t*t/(1+S*S))*(u<i?-1:1),_=S*b;if(Math.abs(p-s-S*(f-i))<1e-10)return{x:f+b,y:p+_};const x=((f-i)*(u-i)+(p-s)*(c-s))/(m*m),D=i+x*(u-i),A=s+x*(c-s),N=this.getLineLength(f,p,D,A),R=Math.sqrt(t*t-N*N),O=Math.sqrt(R*R/(1+S*S))*(u<i?-1:1),U=S*O;return{x:D+O,y:A+U}}static getPointOnCubicBezier(t,i,s,u,c,f,p,m,S){function b(R){return R*R*R}function _(R){return 3*R*R*(1-R)}function x(R){return 3*R*(1-R)*(1-R)}function D(R){return(1-R)*(1-R)*(1-R)}const A=m*b(t)+f*_(t)+u*x(t)+i*D(t),N=S*b(t)+p*_(t)+c*x(t)+s*D(t);return{x:A,y:N}}static getPointOnQuadraticBezier(t,i,s,u,c,f,p){function m(D){return D*D}function S(D){return 2*D*(1-D)}function b(D){return(1-D)*(1-D)}const _=f*m(t)+u*S(t)+i*b(t),x=p*m(t)+c*S(t)+s*b(t);return{x:_,y:x}}static getPointOnEllipticalArc(t,i,s,u,c,f){const p=Math.cos(f),m=Math.sin(f),S={x:s*Math.cos(c),y:u*Math.sin(c)};return{x:t+(S.x*p-S.y*m),y:i+(S.x*m+S.y*p)}}static parsePathData(t){if(!t)return[];let i=t;const s=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];i=i.replace(new RegExp(" ","g"),",");for(let _=0;_<s.length;_++)i=i.replace(new RegExp(s[_],"g"),"|"+s[_]);const u=i.split("|"),c=[],f=[];let p=0,m=0;const S=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;let b;for(let _=1;_<u.length;_++){let x=u[_],D=x.charAt(0);for(x=x.slice(1),f.length=0;b=S.exec(x);)f.push(b[0]);let A=[],N=D==="A"||D==="a"?0:-1;for(let R=0,O=f.length;R<O;R++){const U=f[R];if(U==="00"){A.push(0,0),N>=0&&(N+=2,N>=7&&(N-=7));continue}if(N>=0){if(N===3){if(/^[01]{2}\d+(?:\.\d+)?$/.test(U)){A.push(parseInt(U[0],10)),A.push(parseInt(U[1],10)),A.push(parseFloat(U.slice(2))),N+=3,N>=7&&(N-=7);continue}if(U==="11"||U==="10"||U==="01"){A.push(parseInt(U[0],10)),A.push(parseInt(U[1],10)),N+=2,N>=7&&(N-=7);continue}if(U==="0"||U==="1"){A.push(parseInt(U,10)),N+=1,N>=7&&(N-=7);continue}}else if(N===4){if(/^[01]\d+(?:\.\d+)?$/.test(U)){A.push(parseInt(U[0],10)),A.push(parseFloat(U.slice(1))),N+=2,N>=7&&(N-=7);continue}if(U==="0"||U==="1"){A.push(parseInt(U,10)),N+=1,N>=7&&(N-=7);continue}}const j=parseFloat(U);isNaN(j)?A.push(0):A.push(j),N+=1,N>=7&&(N-=7)}else{const j=parseFloat(U);isNaN(j)?A.push(0):A.push(j)}}for(;A.length>0&&!isNaN(A[0]);){let R="",O=[];const U=p,j=m;let V,F,$,st,I,et,nt,bt,lt,dt;switch(D){case"l":p+=A.shift(),m+=A.shift(),R="L",O.push(p,m);break;case"L":p=A.shift(),m=A.shift(),O.push(p,m);break;case"m":const pt=A.shift(),tt=A.shift();if(p+=pt,m+=tt,R="M",c.length>2&&c[c.length-1].command==="z"){for(let w=c.length-2;w>=0;w--)if(c[w].command==="M"){p=c[w].points[0]+pt,m=c[w].points[1]+tt;break}}O.push(p,m),D="l";break;case"M":p=A.shift(),m=A.shift(),R="M",O.push(p,m),D="L";break;case"h":p+=A.shift(),R="L",O.push(p,m);break;case"H":p=A.shift(),R="L",O.push(p,m);break;case"v":m+=A.shift(),R="L",O.push(p,m);break;case"V":m=A.shift(),R="L",O.push(p,m);break;case"C":O.push(A.shift(),A.shift(),A.shift(),A.shift()),p=A.shift(),m=A.shift(),O.push(p,m);break;case"c":O.push(p+A.shift(),m+A.shift(),p+A.shift(),m+A.shift()),p+=A.shift(),m+=A.shift(),R="C",O.push(p,m);break;case"S":F=p,$=m,V=c[c.length-1],V.command==="C"&&(F=p+(p-V.points[2]),$=m+(m-V.points[3])),O.push(F,$,A.shift(),A.shift()),p=A.shift(),m=A.shift(),R="C",O.push(p,m);break;case"s":F=p,$=m,V=c[c.length-1],V.command==="C"&&(F=p+(p-V.points[2]),$=m+(m-V.points[3])),O.push(F,$,p+A.shift(),m+A.shift()),p+=A.shift(),m+=A.shift(),R="C",O.push(p,m);break;case"Q":O.push(A.shift(),A.shift()),p=A.shift(),m=A.shift(),O.push(p,m);break;case"q":O.push(p+A.shift(),m+A.shift()),p+=A.shift(),m+=A.shift(),R="Q",O.push(p,m);break;case"T":F=p,$=m,V=c[c.length-1],V.command==="Q"&&(F=p+(p-V.points[0]),$=m+(m-V.points[1])),p=A.shift(),m=A.shift(),R="Q",O.push(F,$,p,m);break;case"t":F=p,$=m,V=c[c.length-1],V.command==="Q"&&(F=p+(p-V.points[0]),$=m+(m-V.points[1])),p+=A.shift(),m+=A.shift(),R="Q",O.push(F,$,p,m);break;case"A":st=A.shift(),I=A.shift(),et=A.shift(),nt=A.shift(),bt=A.shift(),lt=p,dt=m,p=A.shift(),m=A.shift(),R="A",O=this.convertEndpointToCenterParameterization(lt,dt,p,m,nt,bt,st,I,et);break;case"a":st=A.shift(),I=A.shift(),et=A.shift(),nt=A.shift(),bt=A.shift(),lt=p,dt=m,p+=A.shift(),m+=A.shift(),R="A",O=this.convertEndpointToCenterParameterization(lt,dt,p,m,nt,bt,st,I,et);break}c.push({command:R||D,points:O,start:{x:U,y:j},pathLength:this.calcLength(U,j,R||D,O)})}(D==="z"||D==="Z")&&c.push({command:"z",points:[],start:void 0,pathLength:0})}return c}static calcLength(t,i,s,u){let c,f,p,m;const S=Ki;switch(s){case"L":return S.getLineLength(t,i,u[0],u[1]);case"C":return Q5([t,u[0],u[2],u[4]],[i,u[1],u[3],u[5]],1);case"Q":return Z5([t,u[0],u[2]],[i,u[1],u[3]],1);case"A":c=0;const b=u[4],_=u[5],x=u[4]+_;let D=Math.PI/180;if(Math.abs(b-x)<D&&(D=Math.abs(b-x)),f=S.getPointOnEllipticalArc(u[0],u[1],u[2],u[3],b,0),_<0)for(m=b-D;m>x;m-=D)p=S.getPointOnEllipticalArc(u[0],u[1],u[2],u[3],m,0),c+=S.getLineLength(f.x,f.y,p.x,p.y),f=p;else for(m=b+D;m<x;m+=D)p=S.getPointOnEllipticalArc(u[0],u[1],u[2],u[3],m,0),c+=S.getLineLength(f.x,f.y,p.x,p.y),f=p;return p=S.getPointOnEllipticalArc(u[0],u[1],u[2],u[3],x,0),c+=S.getLineLength(f.x,f.y,p.x,p.y),c}return 0}static convertEndpointToCenterParameterization(t,i,s,u,c,f,p,m,S){const b=S*(Math.PI/180),_=Math.cos(b)*(t-s)/2+Math.sin(b)*(i-u)/2,x=-1*Math.sin(b)*(t-s)/2+Math.cos(b)*(i-u)/2,D=_*_/(p*p)+x*x/(m*m);D>1&&(p*=Math.sqrt(D),m*=Math.sqrt(D));let A=Math.sqrt((p*p*(m*m)-p*p*(x*x)-m*m*(_*_))/(p*p*(x*x)+m*m*(_*_)));c===f&&(A*=-1),isNaN(A)&&(A=0);const N=A*p*x/m,R=A*-m*_/p,O=(t+s)/2+Math.cos(b)*N-Math.sin(b)*R,U=(i+u)/2+Math.sin(b)*N+Math.cos(b)*R,j=function(nt){return Math.sqrt(nt[0]*nt[0]+nt[1]*nt[1])},V=function(nt,bt){return(nt[0]*bt[0]+nt[1]*bt[1])/(j(nt)*j(bt))},F=function(nt,bt){return(nt[0]*bt[1]<nt[1]*bt[0]?-1:1)*Math.acos(V(nt,bt))},$=F([1,0],[(_-N)/p,(x-R)/m]),st=[(_-N)/p,(x-R)/m],I=[(-1*_-N)/p,(-1*x-R)/m];let et=F(st,I);return V(st,I)<=-1&&(et=Math.PI),V(st,I)>=1&&(et=0),f===0&&et>0&&(et=et-2*Math.PI),f===1&&et<0&&(et=et+2*Math.PI),[O,U,p,m,$,et,b,f]}};bs.prototype.className="Path",bs.prototype._attrsAffectingSize=["data"],En(bs),G.addGetterSetter(bs,"data");class fc extends Or{_sceneFunc(t){super._sceneFunc(t);const i=Math.PI*2,s=this.points();let u=s;const c=this.tension()!==0&&s.length>4;c&&(u=this.getTensionPoints());const f=this.pointerLength(),p=s.length;let m,S;if(c){const x=[u[u.length-4],u[u.length-3],u[u.length-2],u[u.length-1],s[p-2],s[p-1]],D=bs.calcLength(u[u.length-4],u[u.length-3],"C",x),A=bs.getPointOnQuadraticBezier(Math.min(1,1-f/D),x[0],x[1],x[2],x[3],x[4],x[5]);m=s[p-2]-A.x,S=s[p-1]-A.y}else m=s[p-2]-s[p-4],S=s[p-1]-s[p-3];const b=(Math.atan2(S,m)+i)%i,_=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(s[p-2],s[p-1]),t.rotate(b),t.moveTo(0,0),t.lineTo(-f,_/2),t.lineTo(-f,-_/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(s[0],s[1]),c?(m=(u[0]+u[2])/2-s[0],S=(u[1]+u[3])/2-s[1]):(m=s[2]-s[0],S=s[3]-s[1]),t.rotate((Math.atan2(-S,-m)+i)%i),t.moveTo(0,0),t.lineTo(-f,_/2),t.lineTo(-f,-_/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){const i=this.dashEnabled();i&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),i&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),i=this.pointerWidth()/2;return{x:t.x,y:t.y-i,width:t.width,height:t.height+i*2}}}fc.prototype.className="Arrow",En(fc),G.addGetterSetter(fc,"pointerLength",10,Dt()),G.addGetterSetter(fc,"pointerWidth",10,Dt()),G.addGetterSetter(fc,"pointerAtBeginning",!1),G.addGetterSetter(fc,"pointerAtEnding",!0);let th=class extends Ct{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}};th.prototype._centroid=!0,th.prototype.className="Circle",th.prototype._attrsAffectingSize=["radius"],En(th),G.addGetterSetter(th,"radius",0,Dt());class Lo extends Ct{_sceneFunc(t){const i=this.radiusX(),s=this.radiusY();t.beginPath(),t.save(),i!==s&&t.scale(1,s/i),t.arc(0,0,i,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Lo.prototype.className="Ellipse",Lo.prototype._centroid=!0,Lo.prototype._attrsAffectingSize=["radiusX","radiusY"],En(Lo),G.addComponentsGetterSetter(Lo,"radius",["x","y"]),G.addGetterSetter(Lo,"radiusX",0,Dt()),G.addGetterSetter(Lo,"radiusY",0,Dt());let ll=class gT extends Ct{constructor(t){super(t),this._loadListener=()=>{this._requestDraw()},this.on("imageChange.konva",i=>{this._removeImageLoad(i.oldVal),this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",this._loadListener)}_removeImageLoad(t){t&&t.removeEventListener&&t.removeEventListener("load",this._loadListener)}destroy(){return this._removeImageLoad(this.image()),super.destroy(),this}_useBufferCanvas(){const t=!!this.cornerRadius(),i=this.hasShadow();return t&&i?!0:super._useBufferCanvas(!0)}_sceneFunc(t){const i=this.getWidth(),s=this.getHeight(),u=this.cornerRadius(),c=this.attrs.image;let f;if(c){const p=this.attrs.cropWidth,m=this.attrs.cropHeight;p&&m?f=[c,this.cropX(),this.cropY(),p,m,0,0,i,s]:f=[c,0,0,i,s]}(this.hasFill()||this.hasStroke()||u)&&(t.beginPath(),u?k.drawRoundedRectPath(t,i,s,u):t.rect(0,0,i,s),t.closePath(),t.fillStrokeShape(this)),c&&(u&&t.clip(),t.drawImage.apply(t,f))}_hitFunc(t){const i=this.width(),s=this.height(),u=this.cornerRadius();t.beginPath(),u?k.drawRoundedRectPath(t,i,s,u):t.rect(0,0,i,s),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,i,s;return(s=(t=this.attrs.width)!==null&&t!==void 0?t:(i=this.image())===null||i===void 0?void 0:i.width)!==null&&s!==void 0?s:0}getHeight(){var t,i,s;return(s=(t=this.attrs.height)!==null&&t!==void 0?t:(i=this.image())===null||i===void 0?void 0:i.height)!==null&&s!==void 0?s:0}static fromURL(t,i,s=null){const u=k.createImageElement();u.onload=function(){const c=new gT({image:u});i(c)},u.onerror=s,u.crossOrigin="Anonymous",u.src=t}};ll.prototype.className="Image",ll.prototype._attrsAffectingSize=["image"],En(ll),G.addGetterSetter(ll,"cornerRadius",0,x1(4)),G.addGetterSetter(ll,"image"),G.addComponentsGetterSetter(ll,"crop",["x","y","width","height"]),G.addGetterSetter(ll,"cropX",0,Dt()),G.addGetterSetter(ll,"cropY",0,Dt()),G.addGetterSetter(ll,"cropWidth",0,Dt()),G.addGetterSetter(ll,"cropHeight",0,Dt());const F5=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],BC="Change.konva",VC="none",U2="up",B2="right",V2="down",G2="left",GC=F5.length;let j2=class extends Wf{constructor(t){super(t),this.on("add.konva",function(i){this._addListeners(i.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){let i=this,s;const u=function(){i._sync()};for(s=0;s<GC;s++)t.on(F5[s]+BC,u)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let t=this.getText(),i=this.getTag(),s,u,c,f,p,m,S;if(t&&i){switch(s=t.width(),u=t.height(),c=i.pointerDirection(),f=i.pointerWidth(),S=i.pointerHeight(),p=0,m=0,c){case U2:p=s/2,m=-1*S;break;case B2:p=s+f,m=u/2;break;case V2:p=s/2,m=u+S;break;case G2:p=-1*f,m=u/2;break}i.setAttrs({x:-1*p,y:-1*m,width:s,height:u}),t.setAttrs({x:-1*p,y:-1*m})}}};j2.prototype.className="Label",En(j2);class hc extends Ct{_sceneFunc(t){const i=this.width(),s=this.height(),u=this.pointerDirection(),c=this.pointerWidth(),f=this.pointerHeight(),p=this.cornerRadius();let m=0,S=0,b=0,_=0;typeof p=="number"?m=S=b=_=Math.min(p,i/2,s/2):(m=Math.min(p[0]||0,i/2,s/2),S=Math.min(p[1]||0,i/2,s/2),_=Math.min(p[2]||0,i/2,s/2),b=Math.min(p[3]||0,i/2,s/2)),t.beginPath(),t.moveTo(m,0),u===U2&&(t.lineTo((i-c)/2,0),t.lineTo(i/2,-1*f),t.lineTo((i+c)/2,0)),t.lineTo(i-S,0),t.arc(i-S,S,S,Math.PI*3/2,0,!1),u===B2&&(t.lineTo(i,(s-f)/2),t.lineTo(i+c,s/2),t.lineTo(i,(s+f)/2)),t.lineTo(i,s-_),t.arc(i-_,s-_,_,0,Math.PI/2,!1),u===V2&&(t.lineTo((i+c)/2,s),t.lineTo(i/2,s+f),t.lineTo((i-c)/2,s)),t.lineTo(b,s),t.arc(b,s-b,b,Math.PI/2,Math.PI,!1),u===G2&&(t.lineTo(0,(s+f)/2),t.lineTo(-1*c,s/2),t.lineTo(0,(s-f)/2)),t.lineTo(0,m),t.arc(m,m,m,Math.PI,Math.PI*3/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){let t=0,i=0,s=this.pointerWidth(),u=this.pointerHeight(),c=this.pointerDirection(),f=this.width(),p=this.height();return c===U2?(i-=u,p+=u):c===V2?p+=u:c===G2?(t-=s*1.5,f+=s):c===B2&&(f+=s*1.5),{x:t,y:i,width:f,height:p}}}hc.prototype.className="Tag",En(hc),G.addGetterSetter(hc,"pointerDirection",VC),G.addGetterSetter(hc,"pointerWidth",0,Dt()),G.addGetterSetter(hc,"pointerHeight",0,Dt()),G.addGetterSetter(hc,"cornerRadius",0,x1(4));let Zp=class extends Ct{_sceneFunc(t){const i=this.cornerRadius(),s=this.width(),u=this.height();t.beginPath(),i?k.drawRoundedRectPath(t,s,u,i):t.rect(0,0,s,u),t.closePath(),t.fillStrokeShape(this)}};Zp.prototype.className="Rect",En(Zp),G.addGetterSetter(Zp,"cornerRadius",0,x1(4));class Po extends Ct{_sceneFunc(t){const i=this._getPoints(),s=this.radius(),u=this.sides(),c=this.cornerRadius();if(t.beginPath(),c)k.drawRoundedPolygonPath(t,i,u,s,c);else{t.moveTo(i[0].x,i[0].y);for(let f=1;f<i.length;f++)t.lineTo(i[f].x,i[f].y)}t.closePath(),t.fillStrokeShape(this)}_getPoints(){const t=this.attrs.sides,i=this.attrs.radius||0,s=[];for(let u=0;u<t;u++)s.push({x:i*Math.sin(u*2*Math.PI/t),y:-1*i*Math.cos(u*2*Math.PI/t)});return s}getSelfRect(){const t=this._getPoints();let i=t[0].x,s=t[0].x,u=t[0].y,c=t[0].y;return t.forEach(f=>{i=Math.min(i,f.x),s=Math.max(s,f.x),u=Math.min(u,f.y),c=Math.max(c,f.y)}),{x:i,y:u,width:s-i,height:c-u}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Po.prototype.className="RegularPolygon",Po.prototype._centroid=!0,Po.prototype._attrsAffectingSize=["radius"],En(Po),G.addGetterSetter(Po,"radius",0,Dt()),G.addGetterSetter(Po,"sides",0,Dt()),G.addGetterSetter(Po,"cornerRadius",0,x1(4));const k5=Math.PI*2;class dc extends Ct{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,k5,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),k5,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}dc.prototype.className="Ring",dc.prototype._centroid=!0,dc.prototype._attrsAffectingSize=["innerRadius","outerRadius"],En(dc),G.addGetterSetter(dc,"innerRadius",0,Dt()),G.addGetterSetter(dc,"outerRadius",0,Dt());class Kl extends Ct{constructor(t){super(t),this._updated=!0,this.anim=new Ss(()=>{const i=this._updated;return this._updated=!1,i}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){const i=this.animation(),s=this.frameIndex(),u=s*4,c=this.animations()[i],f=this.frameOffsets(),p=c[u+0],m=c[u+1],S=c[u+2],b=c[u+3],_=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,S,b),t.closePath(),t.fillStrokeShape(this)),_)if(f){const x=f[i],D=s*2;t.drawImage(_,p,m,S,b,x[D+0],x[D+1],S,b)}else t.drawImage(_,p,m,S,b,0,0,S,b)}_hitFunc(t){const i=this.animation(),s=this.frameIndex(),u=s*4,c=this.animations()[i],f=this.frameOffsets(),p=c[u+2],m=c[u+3];if(t.beginPath(),f){const S=f[i],b=s*2;t.rect(S[b+0],S[b+1],p,m)}else t.rect(0,0,p,m);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){const t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;const t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){const t=this.frameIndex(),i=this.animation(),s=this.animations(),u=s[i],c=u.length/4;t<c-1?this.frameIndex(t+1):this.frameIndex(0)}}Kl.prototype.className="Sprite",En(Kl),G.addGetterSetter(Kl,"animation"),G.addGetterSetter(Kl,"animations"),G.addGetterSetter(Kl,"frameOffsets"),G.addGetterSetter(Kl,"image"),G.addGetterSetter(Kl,"frameIndex",0,Dt()),G.addGetterSetter(Kl,"frameRate",17,Dt()),G.backCompat(Kl,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});class Yo extends Ct{_sceneFunc(t){const i=this.innerRadius(),s=this.outerRadius(),u=this.numPoints();t.beginPath(),t.moveTo(0,0-s);for(let c=1;c<u*2;c++){const f=c%2===0?s:i,p=f*Math.sin(c*Math.PI/u),m=-1*f*Math.cos(c*Math.PI/u);t.lineTo(p,m)}t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Yo.prototype.className="Star",Yo.prototype._centroid=!0,Yo.prototype._attrsAffectingSize=["innerRadius","outerRadius"],En(Yo),G.addGetterSetter(Yo,"numPoints",5,Dt()),G.addGetterSetter(Yo,"innerRadius",0,Dt()),G.addGetterSetter(Yo,"outerRadius",0,Dt());function qo(n){return[...n].reduce((t,i,s,u)=>{if(new RegExp("\\p{Emoji}","u").test(i)){const c=u[s+1];c&&new RegExp("\\p{Emoji_Modifier}|\\u200D","u").test(c)?(t.push(i+c),u[s+1]=""):t.push(i)}else new RegExp("\\p{Regional_Indicator}{2}","u").test(i+(u[s+1]||""))?t.push(i+u[s+1]):s>0&&new RegExp("\\p{Mn}|\\p{Me}|\\p{Mc}","u").test(i)?t[t.length-1]+=i:i&&t.push(i);return t},[])}const eh="auto",jC="center",I5="inherit",Jp="justify",LC="Change.konva",PC="2d",W5="-",$5="left",YC="text",qC="Text",XC="top",KC="bottom",t4="middle",e4="normal",QC="px ",w1=" ",ZC="right",n4="rtl",JC="word",FC="char",a4="none",L2="…",i4=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],kC=i4.length;function IC(n){return n.split(",").map(t=>{t=t.trim();const i=t.indexOf(" ")>=0,s=t.indexOf('"')>=0||t.indexOf("'")>=0;return i&&!s&&(t=`"${t}"`),t}).join(", ")}let U1;function P2(){return U1||(U1=k.createCanvasElement().getContext(PC),U1)}function WC(n){n.fillText(this._partialText,this._partialTextX,this._partialTextY)}function $C(n){n.setAttr("miterLimit",2),n.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function t_(n){return n=n||{},!n.fillLinearGradientColorStops&&!n.fillRadialGradientColorStops&&!n.fillPatternImage&&(n.fill=n.fill||"black"),n}class an extends Ct{constructor(t){super(t_(t)),this._partialTextX=0,this._partialTextY=0;for(let i=0;i<kC;i++)this.on(i4[i]+LC,this._setTextData);this._setTextData()}_sceneFunc(t){var i,s;const u=this.textArr,c=u.length;if(!this.text())return;let f=this.padding(),p=this.fontSize(),m=this.lineHeight()*p,S=this.verticalAlign(),b=this.direction(),_=0,x=this.align(),D=this.getWidth(),A=this.letterSpacing(),N=this.charRenderFunc(),R=this.fill(),O=this.textDecoration(),U=O.indexOf("underline")!==-1,j=O.indexOf("line-through")!==-1,V;b=b===I5?t.direction:b;let F=m/2,$=t4;if(!Ot.legacyTextRendering){const st=this.measureSize("M");$="alphabetic";const I=(i=st.fontBoundingBoxAscent)!==null&&i!==void 0?i:st.actualBoundingBoxAscent,et=(s=st.fontBoundingBoxDescent)!==null&&s!==void 0?s:st.actualBoundingBoxDescent;F=(I-et)/2+m/2}for(b===n4&&t.setAttr("direction",b),t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",$),t.setAttr("textAlign",$5),S===t4?_=(this.getHeight()-c*m-f*2)/2:S===KC&&(_=this.getHeight()-c*m-f*2),t.translate(f,_+f),V=0;V<c;V++){let st=0,I=0;const et=u[V],nt=et.text,bt=et.width,lt=et.lastInParagraph;if(t.save(),x===ZC?st+=D-bt-f*2:x===jC&&(st+=(D-bt-f*2)/2),U){t.save(),t.beginPath();const pt=Ot.legacyTextRendering?Math.round(p/2):Math.round(p/4),tt=st,w=F+I+pt;t.moveTo(tt,w);const Z=x===Jp&&!lt?D-f*2:bt;t.lineTo(tt+Math.round(Z),w),t.lineWidth=p/15;const K=this._getLinearGradient();t.strokeStyle=K||R,t.stroke(),t.restore()}const dt=st;if(b!==n4&&(A!==0||x===Jp||N)){const pt=nt.split(" ").length-1,tt=qo(nt);for(let w=0;w<tt.length;w++){const Z=tt[w];if(Z===" "&&!lt&&x===Jp&&(st+=(D-f*2-bt)/pt),this._partialTextX=st,this._partialTextY=F+I,this._partialText=Z,N){t.save();const at=u.slice(0,V).reduce((W,gt)=>W+qo(gt.text).length,0),St=w+at;N({char:Z,index:St,x:st,y:F+I,lineIndex:V,column:w,isLastInLine:lt,width:this.measureSize(Z).width,context:t})}t.fillStrokeShape(this),N&&t.restore(),st+=this.measureSize(Z).width+A}}else A!==0&&t.setAttr("letterSpacing",`${A}px`),this._partialTextX=st,this._partialTextY=F+I,this._partialText=nt,t.fillStrokeShape(this);if(j){t.save(),t.beginPath();const pt=Ot.legacyTextRendering?0:-Math.round(p/4),tt=dt;t.moveTo(tt,F+I+pt);const w=x===Jp&&!lt?D-f*2:bt;t.lineTo(tt+Math.round(w),F+I+pt),t.lineWidth=p/15;const Z=this._getLinearGradient();t.strokeStyle=Z||R,t.stroke(),t.restore()}t.restore(),c>1&&(F+=m)}}_hitFunc(t){const i=this.getWidth(),s=this.getHeight();t.beginPath(),t.rect(0,0,i,s),t.closePath(),t.fillStrokeShape(this)}setText(t){const i=k._isString(t)?t:t==null?"":t+"";return this._setAttr(YC,i),this}getWidth(){return this.attrs.width===eh||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===eh||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return k.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var i,s,u,c,f,p,m,S,b,_,x;let D=P2(),A=this.fontSize(),N;D.save(),D.font=this._getContextFont(),N=D.measureText(t),D.restore();const R=A/100;return{actualBoundingBoxAscent:(i=N.actualBoundingBoxAscent)!==null&&i!==void 0?i:71.58203125*R,actualBoundingBoxDescent:(s=N.actualBoundingBoxDescent)!==null&&s!==void 0?s:0,actualBoundingBoxLeft:(u=N.actualBoundingBoxLeft)!==null&&u!==void 0?u:-7.421875*R,actualBoundingBoxRight:(c=N.actualBoundingBoxRight)!==null&&c!==void 0?c:75.732421875*R,alphabeticBaseline:(f=N.alphabeticBaseline)!==null&&f!==void 0?f:0,emHeightAscent:(p=N.emHeightAscent)!==null&&p!==void 0?p:100*R,emHeightDescent:(m=N.emHeightDescent)!==null&&m!==void 0?m:-20*R,fontBoundingBoxAscent:(S=N.fontBoundingBoxAscent)!==null&&S!==void 0?S:91*R,fontBoundingBoxDescent:(b=N.fontBoundingBoxDescent)!==null&&b!==void 0?b:21*R,hangingBaseline:(_=N.hangingBaseline)!==null&&_!==void 0?_:72.80000305175781*R,ideographicBaseline:(x=N.ideographicBaseline)!==null&&x!==void 0?x:-21*R,width:N.width,height:A}}_getContextFont(){return this.fontStyle()+w1+this.fontVariant()+w1+(this.fontSize()+QC)+IC(this.fontFamily())}_addTextLine(t){this.align()===Jp&&(t=t.trim());const s=this._getTextWidth(t);return this.textArr.push({text:t,width:s,lastInParagraph:!1})}_getTextWidth(t){const i=this.letterSpacing(),s=t.length;return P2().measureText(t).width+i*s}_setTextData(){let t=this.text().split(`
|
|
15
|
-
`),i=+this.fontSize(),s=0,u=this.lineHeight()*i,c=this.attrs.width,f=this.attrs.height,p=c!==eh&&c!==void 0,m=f!==eh&&f!==void 0,S=this.padding(),b=c-S*2,_=f-S*2,x=0,D=this.wrap(),A=D!==a4,N=D!==FC&&A,R=this.ellipsis();this.textArr=[],P2().font=this._getContextFont();const O=R?this._getTextWidth(L2):0;for(let U=0,j=t.length;U<j;++U){let V=t[U],F=this._getTextWidth(V);if(p&&F>b)for(;V.length>0;){let $=0,st=qo(V).length,I="",et=0;for(;$<st;){const nt=$+st>>>1,bt=qo(V),lt=bt.slice(0,nt+1).join(""),dt=this._getTextWidth(lt);(R&&m&&x+u>_?dt+O:dt)<=b?($=nt+1,I=lt,et=dt):st=nt}if(I){if(N){const lt=qo(V),dt=qo(I),pt=lt[dt.length],tt=pt===w1||pt===W5;let w;if(tt&&et<=b)w=dt.length;else{const Z=dt.lastIndexOf(w1),K=dt.lastIndexOf(W5);w=Math.max(Z,K)+1}w>0&&($=w,I=lt.slice(0,$).join(""),et=this._getTextWidth(I))}if(I=I.trimRight(),this._addTextLine(I),s=Math.max(s,et),x+=u,this._shouldHandleEllipsis(x)){this._tryToAddEllipsisToLastLine();break}if(V=qo(V).slice($).join("").trimLeft(),V.length>0&&(F=this._getTextWidth(V),F<=b)){this._addTextLine(V),x+=u,s=Math.max(s,F);break}}else break}else this._addTextLine(V),x+=u,s=Math.max(s,F),this._shouldHandleEllipsis(x)&&U<j-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),m&&x+u>_)break}this.textHeight=i,this.textWidth=s}_shouldHandleEllipsis(t){const i=+this.fontSize(),s=this.lineHeight()*i,u=this.attrs.height,c=u!==eh&&u!==void 0,f=this.padding(),p=u-f*2;return!(this.wrap()!==a4)||c&&t+s>p}_tryToAddEllipsisToLastLine(){const t=this.attrs.width,i=t!==eh&&t!==void 0,s=this.padding(),u=t-s*2,c=this.ellipsis(),f=this.textArr[this.textArr.length-1];!f||!c||(i&&(this._getTextWidth(f.text+L2)<u||(f.text=f.text.slice(0,f.text.length-3))),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(f.text+L2))}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const t=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,i=this.hasShadow();return t&&i?!0:super._useBufferCanvas()}}an.prototype._fillFunc=WC,an.prototype._strokeFunc=$C,an.prototype.className=qC,an.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],En(an),G.overWriteSetter(an,"width",T2()),G.overWriteSetter(an,"height",T2()),G.addGetterSetter(an,"direction",I5),G.addGetterSetter(an,"fontFamily","Arial"),G.addGetterSetter(an,"fontSize",12,Dt()),G.addGetterSetter(an,"fontStyle",e4),G.addGetterSetter(an,"fontVariant",e4),G.addGetterSetter(an,"padding",0,Dt()),G.addGetterSetter(an,"align",$5),G.addGetterSetter(an,"verticalAlign",XC),G.addGetterSetter(an,"lineHeight",1,Dt()),G.addGetterSetter(an,"wrap",JC),G.addGetterSetter(an,"ellipsis",!1,sl()),G.addGetterSetter(an,"letterSpacing",0,Dt()),G.addGetterSetter(an,"text","",oc()),G.addGetterSetter(an,"textDecoration",""),G.addGetterSetter(an,"charRenderFunc",void 0);const e_="",s4="normal";function l4(n){n.fillText(this.partialText,0,0)}function r4(n){n.strokeText(this.partialText,0,0)}class ca extends Ct{constructor(t){super(t),this.dummyCanvas=k.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return bs.getPathLength(this.dataArray)}_getPointAtLength(t){if(!this.attrs.data)return null;const i=this.pathLength;return t>i?null:bs.getPointAtLengthOfDataArray(t,this.dataArray)}_readDataAttribute(){this.dataArray=bs.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();const i=this.textDecoration(),s=this.fill(),u=this.fontSize(),c=this.glyphInfo,f=i.indexOf("underline")!==-1,p=i.indexOf("line-through")!==-1;f&&t.beginPath();for(let m=0;m<c.length;m++){t.save();const S=c[m].p0;t.translate(S.x,S.y),t.rotate(c[m].rotation),this.partialText=c[m].text,t.fillStrokeShape(this),f&&(m===0&&t.moveTo(0,u/2+1),t.lineTo(c[m].width,u/2+1)),t.restore()}if(f&&(t.strokeStyle=s,t.lineWidth=u/20,t.stroke()),p){t.beginPath();for(let m=0;m<c.length;m++){t.save();const S=c[m].p0;t.translate(S.x,S.y),t.rotate(c[m].rotation),m===0&&t.moveTo(0,0),t.lineTo(c[m].width,0),t.restore()}t.strokeStyle=s,t.lineWidth=u/20,t.stroke()}t.restore()}_hitFunc(t){t.beginPath();const i=this.glyphInfo;if(i.length>=1){const s=i[0].p0;t.moveTo(s.x,s.y)}for(let s=0;s<i.length;s++){const u=i[s].p1;t.lineTo(u.x,u.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return k.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return an.prototype.setText.call(this,t)}_getContextFont(){return an.prototype._getContextFont.call(this)}_getTextSize(t){const s=this.dummyCanvas.getContext("2d");s.save(),s.font=this._getContextFont();const u=s.measureText(t);return s.restore(),{width:u.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const t=qo(this.text()),i=[];let s=0;for(let _=0;_<t.length;_++)i.push({char:t[_],width:this._getTextSize(t[_]).width}),s+=i[_].width;const{height:u}=this._getTextSize(this.attrs.text);if(this.textWidth=s,this.textHeight=u,this.glyphInfo=[],!this.attrs.data)return null;const c=this.letterSpacing(),f=this.align(),p=this.kerningFunc(),m=Math.max(this.textWidth+((this.attrs.text||"").length-1)*c,0);let S=0;f==="center"&&(S=Math.max(0,this.pathLength/2-m/2)),f==="right"&&(S=Math.max(0,this.pathLength-m));let b=S;for(let _=0;_<i.length;_++){const x=this._getPointAtLength(b);if(!x)return;const D=i[_].char;let A=i[_].width+c;if(D===" "&&f==="justify"){const V=this.text().split(" ").length-1;A+=(this.pathLength-m)/V}const N=this._getPointAtLength(b+A);if(!N)return;const R=bs.getLineLength(x.x,x.y,N.x,N.y);let O=0;if(p)try{O=p(i[_-1].char,D)*this.fontSize()}catch{O=0}x.x+=O,N.x+=O,this.textWidth+=O;const U=bs.getPointOnLine(O+R/2,x.x,x.y,N.x,N.y),j=Math.atan2(N.y-x.y,N.x-x.x);this.glyphInfo.push({transposeX:U.x,transposeY:U.y,text:t[_],rotation:j,p0:x,p1:N,width:R}),b+=A}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};const t=[];this.glyphInfo.forEach(function(S){t.push(S.p0.x),t.push(S.p0.y),t.push(S.p1.x),t.push(S.p1.y)});let i=t[0]||0,s=t[0]||0,u=t[1]||0,c=t[1]||0,f,p;for(let S=0;S<t.length/2;S++)f=t[S*2],p=t[S*2+1],i=Math.min(i,f),s=Math.max(s,f),u=Math.min(u,p),c=Math.max(c,p);const m=this.fontSize();return{x:i-m/2,y:u-m/2,width:s-i+m,height:c-u+m}}destroy(){return k.releaseCanvas(this.dummyCanvas),super.destroy()}}ca.prototype._fillFunc=l4,ca.prototype._strokeFunc=r4,ca.prototype._fillFuncHit=l4,ca.prototype._strokeFuncHit=r4,ca.prototype.className="TextPath",ca.prototype._attrsAffectingSize=["text","fontSize","data"],En(ca),G.addGetterSetter(ca,"data"),G.addGetterSetter(ca,"fontFamily","Arial"),G.addGetterSetter(ca,"fontSize",12,Dt()),G.addGetterSetter(ca,"fontStyle",s4),G.addGetterSetter(ca,"align","left"),G.addGetterSetter(ca,"letterSpacing",0,Dt()),G.addGetterSetter(ca,"textBaseline","middle"),G.addGetterSetter(ca,"fontVariant",s4),G.addGetterSetter(ca,"text",e_),G.addGetterSetter(ca,"textDecoration",""),G.addGetterSetter(ca,"kerningFunc",void 0);const o4="tr-konva",n_=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(n=>n+`.${o4}`).join(" "),u4="nodesRect",a_=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange","draggableChange"],i_={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},s_="ontouchstart"in Ot._global;function l_(n,t,i){if(n==="rotater")return i;t+=k.degToRad(i_[n]||0);const s=(k.radToDeg(t)%360+360)%360;return k._inRange(s,315+22.5,360)||k._inRange(s,0,22.5)?"ns-resize":k._inRange(s,45-22.5,45+22.5)?"nesw-resize":k._inRange(s,90-22.5,90+22.5)?"ew-resize":k._inRange(s,135-22.5,135+22.5)?"nwse-resize":k._inRange(s,180-22.5,180+22.5)?"ns-resize":k._inRange(s,225-22.5,225+22.5)?"nesw-resize":k._inRange(s,270-22.5,270+22.5)?"ew-resize":k._inRange(s,315-22.5,315+22.5)?"nwse-resize":(k.error("Transformer has unknown angle for cursor detection: "+s),"pointer")}const B1=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function r_(n){return{x:n.x+n.width/2*Math.cos(n.rotation)+n.height/2*Math.sin(-n.rotation),y:n.y+n.height/2*Math.cos(n.rotation)+n.width/2*Math.sin(n.rotation)}}function c4(n,t,i){const s=i.x+(n.x-i.x)*Math.cos(t)-(n.y-i.y)*Math.sin(t),u=i.y+(n.x-i.x)*Math.sin(t)+(n.y-i.y)*Math.cos(t);return{...n,rotation:n.rotation+t,x:s,y:u}}function o_(n,t){const i=r_(n);return c4(n,t,i)}function u_(n,t,i){let s=t;for(let u=0;u<n.length;u++){const c=Ot.getAngle(n[u]),f=Math.abs(c-t)%(Math.PI*2);Math.min(f,Math.PI*2-f)<i&&(s=c)}return s}let Y2=0;class ve extends Wf{constructor(t){super(t),this._movingAnchorName=null,this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(n_,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return k.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([t])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return o4+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach();const i=t.filter(u=>u.isAncestorOf(this)?(k.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);return this._nodes=t=i,t.length===1&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(u=>{const c=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()};if(u._attrsAffectingSize.length){const f=u._attrsAffectingSize.map(p=>p+"Change."+this._getEventNamespace()).join(" ");u.on(f,c)}u.on(a_.map(f=>f+`.${this._getEventNamespace()}`).join(" "),c),u.on(`absoluteTransformChange.${this._getEventNamespace()}`,c),this._proxyDrag(u)}),this._resetTransformCache(),this.findOne(".top-left")&&this.update(),this}_proxyDrag(t){let i;t.on(`dragstart.${this._getEventNamespace()}`,s=>{i=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(s,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,s=>{if(!i)return;const u=t.getAbsolutePosition(),c=u.x-i.x,f=u.y-i.y;this.nodes().forEach(p=>{if(p===t||p.isDragging())return;const m=p.getAbsolutePosition();p.setAbsolutePosition({x:m.x+c,y:m.y+f}),p.startDrag(s)}),i=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(u4),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(u4,this.__getNodeRect)}__getNodeShape(t,i=this.rotation(),s){const u=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),c=t.getAbsoluteScale(s),f=t.getAbsolutePosition(s),p=u.x*c.x-t.offsetX()*c.x,m=u.y*c.y-t.offsetY()*c.y,S=(Ot.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),b={x:f.x+p*Math.cos(S)+m*Math.sin(-S),y:f.y+m*Math.cos(S)+p*Math.sin(S),width:u.width*c.x,height:u.height*c.y,rotation:S};return c4(b,-Ot.getAngle(i),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};const i=[];this.nodes().map(S=>{const b=S.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),_=[{x:b.x,y:b.y},{x:b.x+b.width,y:b.y},{x:b.x+b.width,y:b.y+b.height},{x:b.x,y:b.y+b.height}],x=S.getAbsoluteTransform();_.forEach(function(D){const A=x.point(D);i.push(A)})});const s=new Qi;s.rotate(-Ot.getAngle(this.rotation()));let u=1/0,c=1/0,f=-1/0,p=-1/0;i.forEach(function(S){const b=s.point(S);u===void 0&&(u=f=b.x,c=p=b.y),u=Math.min(u,b.x),c=Math.min(c,b.y),f=Math.max(f,b.x),p=Math.max(p,b.y)}),s.invert();const m=s.point({x:u,y:c});return{x:m.x,y:m.y,width:f-u,height:p-c,rotation:Ot.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),B1.forEach(t=>{this._createAnchor(t)}),this._createAnchor("rotater")}_createAnchor(t){const i=new Zp({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:s_?10:"auto"}),s=this;i.on("mousedown touchstart",function(u){s._handleMouseDown(u)}),i.on("dragstart",u=>{i.stopDrag(),u.cancelBubble=!0}),i.on("dragend",u=>{u.cancelBubble=!0}),i.on("mouseenter",()=>{const u=Ot.getAngle(this.rotation()),c=this.rotateAnchorCursor(),f=l_(t,u,c);i.getStage().content&&(i.getStage().content.style.cursor=f),this._cursorChange=!0}),i.on("mouseout",()=>{i.getStage().content&&(i.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(i)}_createBack(){const t=new Ct({name:"back",width:0,height:0,sceneFunc(i,s){const u=s.getParent(),c=u.padding();i.beginPath(),i.rect(-c,-c,s.width()+c*2,s.height()+c*2),i.moveTo(s.width()/2,-c),u.rotateEnabled()&&u.rotateLineVisible()&&i.lineTo(s.width()/2,-u.rotateAnchorOffset()*k._sign(s.height())-c),i.fillStrokeShape(s)},hitFunc:(i,s)=>{if(!this.shouldOverdrawWholeArea())return;const u=this.padding();i.beginPath(),i.rect(-u,-u,s.width()+u*2,s.height()+u*2),i.fillStrokeShape(s)}});this.add(t),this._proxyDrag(t),t.on("dragstart",i=>{i.cancelBubble=!0}),t.on("dragmove",i=>{i.cancelBubble=!0}),t.on("dragend",i=>{i.cancelBubble=!0}),this.on("dragmove",i=>{this.update()})}_handleMouseDown(t){if(this._transforming)return;this._movingAnchorName=t.target.name().split(" ")[0];const i=this._getNodeRect(),s=i.width,u=i.height,c=Math.sqrt(Math.pow(s,2)+Math.pow(u,2));this.sin=Math.abs(u/c),this.cos=Math.abs(s/c),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;const f=t.target.getAbsolutePosition(),p=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:p.x-f.x,y:p.y-f.y},Y2++,this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(m=>{m._fire("transformstart",{evt:t.evt,target:m})})}_handleMouseMove(t){let i,s,u;const c=this.findOne("."+this._movingAnchorName),f=c.getStage();f.setPointersPositions(t);const p=f.getPointerPosition();let m={x:p.x-this._anchorDragOffset.x,y:p.y-this._anchorDragOffset.y};const S=c.getAbsolutePosition();this.anchorDragBoundFunc()&&(m=this.anchorDragBoundFunc()(S,m,t)),c.setAbsolutePosition(m);const b=c.getAbsolutePosition();if(S.x===b.x&&S.y===b.y)return;if(this._movingAnchorName==="rotater"){const U=this._getNodeRect();i=c.x()-U.width/2,s=-c.y()+U.height/2;let j=Math.atan2(-s,i)+Math.PI/2;U.height<0&&(j-=Math.PI);const F=Ot.getAngle(this.rotation())+j,$=Ot.getAngle(this.rotationSnapTolerance()),I=u_(this.rotationSnaps(),F,$)-U.rotation,et=o_(U,I);this._fitNodesInto(et,t);return}const _=this.shiftBehavior();let x;_==="inverted"?x=this.keepRatio()&&!t.shiftKey:_==="none"?x=this.keepRatio():x=this.keepRatio()||t.shiftKey;let D=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(x){const U=D?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};u=Math.sqrt(Math.pow(U.x-c.x(),2)+Math.pow(U.y-c.y(),2));const j=this.findOne(".top-left").x()>U.x?-1:1,V=this.findOne(".top-left").y()>U.y?-1:1;i=u*this.cos*j,s=u*this.sin*V,this.findOne(".top-left").x(U.x-i),this.findOne(".top-left").y(U.y-s)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(c.y());else if(this._movingAnchorName==="top-right"){if(x){const U=D?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};u=Math.sqrt(Math.pow(c.x()-U.x,2)+Math.pow(U.y-c.y(),2));const j=this.findOne(".top-right").x()<U.x?-1:1,V=this.findOne(".top-right").y()>U.y?-1:1;i=u*this.cos*j,s=u*this.sin*V,this.findOne(".top-right").x(U.x+i),this.findOne(".top-right").y(U.y-s)}var A=c.position();this.findOne(".top-left").y(A.y),this.findOne(".bottom-right").x(A.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(c.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(c.x());else if(this._movingAnchorName==="bottom-left"){if(x){const U=D?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};u=Math.sqrt(Math.pow(U.x-c.x(),2)+Math.pow(c.y()-U.y,2));const j=U.x<c.x()?-1:1,V=c.y()<U.y?-1:1;i=u*this.cos*j,s=u*this.sin*V,c.x(U.x-i),c.y(U.y+s)}A=c.position(),this.findOne(".top-left").x(A.x),this.findOne(".bottom-right").y(A.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(c.y());else if(this._movingAnchorName==="bottom-right"){if(x){const U=D?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};u=Math.sqrt(Math.pow(c.x()-U.x,2)+Math.pow(c.y()-U.y,2));const j=this.findOne(".bottom-right").x()<U.x?-1:1,V=this.findOne(".bottom-right").y()<U.y?-1:1;i=u*this.cos*j,s=u*this.sin*V,this.findOne(".bottom-right").x(U.x+i),this.findOne(".bottom-right").y(U.y+s)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));if(D=this.centeredScaling()||t.altKey,D){const U=this.findOne(".top-left"),j=this.findOne(".bottom-right"),V=U.x(),F=U.y(),$=this.getWidth()-j.x(),st=this.getHeight()-j.y();j.move({x:-V,y:-F}),U.move({x:$,y:st})}const N=this.findOne(".top-left").getAbsolutePosition();i=N.x,s=N.y;const R=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),O=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:i,y:s,width:R,height:O,rotation:Ot.getAngle(this.rotation())},t)}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){var i;if(this._transforming){this._transforming=!1,typeof window<"u"&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));const s=this.getNode();Y2--,this._fire("transformend",{evt:t,target:s}),(i=this.getLayer())===null||i===void 0||i.batchDraw(),s&&this._nodes.forEach(u=>{var c;u._fire("transformend",{evt:t,target:u}),(c=u.getLayer())===null||c===void 0||c.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(t,i){const s=this._getNodeRect(),u=1;if(k._inRange(t.width,-this.padding()*2-u,u)){this.update();return}if(k._inRange(t.height,-this.padding()*2-u,u)){this.update();return}const c=new Qi;if(c.rotate(Ot.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const x=c.point({x:-this.padding()*2,y:0});t.x+=x.x,t.y+=x.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const x=c.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y,t.width+=this.padding()*2}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const x=c.point({x:0,y:-this.padding()*2});t.x+=x.x,t.y+=x.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y,t.height+=this.padding()*2}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const x=c.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y,t.height+=this.padding()*2}if(this.boundBoxFunc()){const x=this.boundBoxFunc()(s,t);x?t=x:k.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const f=1e7,p=new Qi;p.translate(s.x,s.y),p.rotate(s.rotation),p.scale(s.width/f,s.height/f);const m=new Qi,S=t.width/f,b=t.height/f;this.flipEnabled()===!1?(m.translate(t.x,t.y),m.rotate(t.rotation),m.translate(t.width<0?t.width:0,t.height<0?t.height:0),m.scale(Math.abs(S),Math.abs(b))):(m.translate(t.x,t.y),m.rotate(t.rotation),m.scale(S,b));const _=m.multiply(p.invert());this._nodes.forEach(x=>{var D;if(!x.getStage())return;const A=x.getParent().getAbsoluteTransform(),N=x.getTransform().copy();N.translate(x.offsetX(),x.offsetY());const R=new Qi;R.multiply(A.copy().invert()).multiply(_).multiply(A).multiply(N);const O=R.decompose();x.setAttrs(O),(D=x.getLayer())===null||D===void 0||D.batchDraw()}),this.rotation(k._getRotation(t.rotation)),this._nodes.forEach(x=>{this._fire("transform",{evt:i,target:x}),x._fire("transform",{evt:i,target:x})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,i){this.findOne(t).setAttrs(i)}update(){var t;const i=this._getNodeRect();this.rotation(k._getRotation(i.rotation));const s=i.width,u=i.height,c=this.enabledAnchors(),f=this.resizeEnabled(),p=this.padding(),m=this.anchorSize(),S=this.find("._anchor");S.forEach(_=>{_.setAttrs({width:m,height:m,offsetX:m/2,offsetY:m/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:m/2+p,offsetY:m/2+p,visible:f&&c.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:s/2,y:0,offsetY:m/2+p,visible:f&&c.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:s,y:0,offsetX:m/2-p,offsetY:m/2+p,visible:f&&c.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:u/2,offsetX:m/2+p,visible:f&&c.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:s,y:u/2,offsetX:m/2-p,visible:f&&c.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:u,offsetX:m/2+p,offsetY:m/2-p,visible:f&&c.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:s/2,y:u,offsetY:m/2-p,visible:f&&c.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:s,y:u,offsetX:m/2-p,offsetY:m/2-p,visible:f&&c.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:s/2,y:-this.rotateAnchorOffset()*k._sign(u)-p,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:s,height:u,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),draggable:this.nodes().some(_=>_.draggable()),x:0,y:0});const b=this.anchorStyleFunc();b&&S.forEach(_=>{b(_)}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();const t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),Wf.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Nt.prototype.toObject.call(this)}clone(t){return Nt.prototype.clone.call(this,t)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}ve.isTransforming=()=>Y2>0;function c_(n){return n instanceof Array||k.warn("enabledAnchors value should be an array"),n instanceof Array&&n.forEach(function(t){B1.indexOf(t)===-1&&k.warn("Unknown anchor name: "+t+". Available names are: "+B1.join(", "))}),n||[]}ve.prototype.className="Transformer",En(ve),G.addGetterSetter(ve,"enabledAnchors",B1,c_),G.addGetterSetter(ve,"flipEnabled",!0,sl()),G.addGetterSetter(ve,"resizeEnabled",!0),G.addGetterSetter(ve,"anchorSize",10,Dt()),G.addGetterSetter(ve,"rotateEnabled",!0),G.addGetterSetter(ve,"rotateLineVisible",!0),G.addGetterSetter(ve,"rotationSnaps",[]),G.addGetterSetter(ve,"rotateAnchorOffset",50,Dt()),G.addGetterSetter(ve,"rotateAnchorCursor","crosshair"),G.addGetterSetter(ve,"rotationSnapTolerance",5,Dt()),G.addGetterSetter(ve,"borderEnabled",!0),G.addGetterSetter(ve,"anchorStroke","rgb(0, 161, 255)"),G.addGetterSetter(ve,"anchorStrokeWidth",1,Dt()),G.addGetterSetter(ve,"anchorFill","white"),G.addGetterSetter(ve,"anchorCornerRadius",0,Dt()),G.addGetterSetter(ve,"borderStroke","rgb(0, 161, 255)"),G.addGetterSetter(ve,"borderStrokeWidth",1,Dt()),G.addGetterSetter(ve,"borderDash"),G.addGetterSetter(ve,"keepRatio",!0),G.addGetterSetter(ve,"shiftBehavior","default"),G.addGetterSetter(ve,"centeredScaling",!1),G.addGetterSetter(ve,"ignoreStroke",!1),G.addGetterSetter(ve,"padding",0,Dt()),G.addGetterSetter(ve,"nodes"),G.addGetterSetter(ve,"node"),G.addGetterSetter(ve,"boundBoxFunc"),G.addGetterSetter(ve,"anchorDragBoundFunc"),G.addGetterSetter(ve,"anchorStyleFunc"),G.addGetterSetter(ve,"shouldOverdrawWholeArea",!1),G.addGetterSetter(ve,"useSingleNodeRotation",!0),G.backCompat(ve,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Rr extends Ct{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,Ot.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Rr.prototype.className="Wedge",Rr.prototype._centroid=!0,Rr.prototype._attrsAffectingSize=["radius"],En(Rr),G.addGetterSetter(Rr,"radius",0,Dt()),G.addGetterSetter(Rr,"angle",0,Dt()),G.addGetterSetter(Rr,"clockwise",!1),G.backCompat(Rr,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function f4(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}const f_=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],h_=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function d_(n,t){const i=n.data,s=n.width,u=n.height;let c,f,p,m,S,b,_,x,D,A,N,R,O,U,j,V,F,$,st,I;const et=t+t+1,nt=s-1,bt=u-1,lt=t+1,dt=lt*(lt+1)/2,pt=new f4,tt=f_[t],w=h_[t];let Z=null,K=pt,at=null,St=null;for(let W=1;W<et;W++)K=K.next=new f4,W===lt&&(Z=K);K.next=pt,p=f=0;for(let W=0;W<u;W++){R=O=U=j=m=S=b=_=0,x=lt*(V=i[f]),D=lt*(F=i[f+1]),A=lt*($=i[f+2]),N=lt*(st=i[f+3]),m+=dt*V,S+=dt*F,b+=dt*$,_+=dt*st,K=pt;for(let gt=0;gt<lt;gt++)K.r=V,K.g=F,K.b=$,K.a=st,K=K.next;for(let gt=1;gt<lt;gt++)c=f+((nt<gt?nt:gt)<<2),m+=(K.r=V=i[c])*(I=lt-gt),S+=(K.g=F=i[c+1])*I,b+=(K.b=$=i[c+2])*I,_+=(K.a=st=i[c+3])*I,R+=V,O+=F,U+=$,j+=st,K=K.next;at=pt,St=Z;for(let gt=0;gt<s;gt++)i[f+3]=st=_*tt>>w,st!==0?(st=255/st,i[f]=(m*tt>>w)*st,i[f+1]=(S*tt>>w)*st,i[f+2]=(b*tt>>w)*st):i[f]=i[f+1]=i[f+2]=0,m-=x,S-=D,b-=A,_-=N,x-=at.r,D-=at.g,A-=at.b,N-=at.a,c=p+((c=gt+t+1)<nt?c:nt)<<2,R+=at.r=i[c],O+=at.g=i[c+1],U+=at.b=i[c+2],j+=at.a=i[c+3],m+=R,S+=O,b+=U,_+=j,at=at.next,x+=V=St.r,D+=F=St.g,A+=$=St.b,N+=st=St.a,R-=V,O-=F,U-=$,j-=st,St=St.next,f+=4;p+=s}for(let W=0;W<s;W++){O=U=j=R=S=b=_=m=0,f=W<<2,x=lt*(V=i[f]),D=lt*(F=i[f+1]),A=lt*($=i[f+2]),N=lt*(st=i[f+3]),m+=dt*V,S+=dt*F,b+=dt*$,_+=dt*st,K=pt;for(let Tt=0;Tt<lt;Tt++)K.r=V,K.g=F,K.b=$,K.a=st,K=K.next;let gt=s;for(let Tt=1;Tt<=t;Tt++)f=gt+W<<2,m+=(K.r=V=i[f])*(I=lt-Tt),S+=(K.g=F=i[f+1])*I,b+=(K.b=$=i[f+2])*I,_+=(K.a=st=i[f+3])*I,R+=V,O+=F,U+=$,j+=st,K=K.next,Tt<bt&&(gt+=s);f=W,at=pt,St=Z;for(let Tt=0;Tt<u;Tt++)c=f<<2,i[c+3]=st=_*tt>>w,st>0?(st=255/st,i[c]=(m*tt>>w)*st,i[c+1]=(S*tt>>w)*st,i[c+2]=(b*tt>>w)*st):i[c]=i[c+1]=i[c+2]=0,m-=x,S-=D,b-=A,_-=N,x-=at.r,D-=at.g,A-=at.b,N-=at.a,c=W+((c=Tt+lt)<bt?c:bt)*s<<2,m+=R+=at.r=i[c],S+=O+=at.g=i[c+1],b+=U+=at.b=i[c+2],_+=j+=at.a=i[c+3],at=at.next,x+=V=St.r,D+=F=St.g,A+=$=St.b,N+=st=St.a,R-=V,O-=F,U-=$,j-=st,St=St.next,f+=s}}const p_=function(t){const i=Math.round(this.blurRadius());i>0&&d_(t,i)};G.addGetterSetter(Nt,"blurRadius",0,Dt(),G.afterSetFilter);const m_=function(n){const t=this.brightness()*255,i=n.data,s=i.length;for(let u=0;u<s;u+=4)i[u]+=t,i[u+1]+=t,i[u+2]+=t};G.addGetterSetter(Nt,"brightness",0,Dt(),G.afterSetFilter);const g_=function(n){const t=this.brightness(),i=n.data,s=i.length;for(let u=0;u<s;u+=4)i[u]=Math.min(255,i[u]*t),i[u+1]=Math.min(255,i[u+1]*t),i[u+2]=Math.min(255,i[u+2]*t)},y_=function(n){const t=Math.pow((this.contrast()+100)/100,2),i=n.data,s=i.length;let u=150,c=150,f=150;for(let p=0;p<s;p+=4)u=i[p],c=i[p+1],f=i[p+2],u/=255,u-=.5,u*=t,u+=.5,u*=255,c/=255,c-=.5,c*=t,c+=.5,c*=255,f/=255,f-=.5,f*=t,f+=.5,f*=255,u=u<0?0:u>255?255:u,c=c<0?0:c>255?255:c,f=f<0?0:f>255?255:f,i[p]=u,i[p+1]=c,i[p+2]=f};G.addGetterSetter(Nt,"contrast",0,Dt(),G.afterSetFilter);const v_=function(n){var t,i,s,u,c,f,p,m,S;const b=n.data,_=n.width,x=n.height,D=Math.min(1,Math.max(0,(i=(t=this.embossStrength)===null||t===void 0?void 0:t.call(this))!==null&&i!==void 0?i:.5)),A=Math.min(1,Math.max(0,(u=(s=this.embossWhiteLevel)===null||s===void 0?void 0:s.call(this))!==null&&u!==void 0?u:.5)),R=(p={"top-left":315,top:270,"top-right":225,right:180,"bottom-right":135,bottom:90,"bottom-left":45,left:0}[(f=(c=this.embossDirection)===null||c===void 0?void 0:c.call(this))!==null&&f!==void 0?f:"top-left"])!==null&&p!==void 0?p:315,O=!!((S=(m=this.embossBlend)===null||m===void 0?void 0:m.call(this))!==null&&S!==void 0&&S),U=D*10,j=A*255,V=R*Math.PI/180,F=Math.cos(V),$=Math.sin(V),st=128/1020*U,I=new Uint8ClampedArray(b),et=new Float32Array(_*x);for(let pt=0,tt=0;tt<b.length;tt+=4,pt++)et[pt]=.2126*I[tt]+.7152*I[tt+1]+.0722*I[tt+2];const nt=[-1,0,1,-2,0,2,-1,0,1],bt=[-1,-2,-1,0,0,0,1,2,1],lt=[-_-1,-_,-_+1,-1,0,1,_-1,_,_+1],dt=pt=>pt<0?0:pt>255?255:pt;for(let pt=1;pt<x-1;pt++)for(let tt=1;tt<_-1;tt++){const w=pt*_+tt;let Z=0,K=0;Z+=et[w+lt[0]]*nt[0],K+=et[w+lt[0]]*bt[0],Z+=et[w+lt[1]]*nt[1],K+=et[w+lt[1]]*bt[1],Z+=et[w+lt[2]]*nt[2],K+=et[w+lt[2]]*bt[2],Z+=et[w+lt[3]]*nt[3],K+=et[w+lt[3]]*bt[3],Z+=et[w+lt[5]]*nt[5],K+=et[w+lt[5]]*bt[5],Z+=et[w+lt[6]]*nt[6],K+=et[w+lt[6]]*bt[6],Z+=et[w+lt[7]]*nt[7],K+=et[w+lt[7]]*bt[7],Z+=et[w+lt[8]]*nt[8],K+=et[w+lt[8]]*bt[8];const at=F*Z+$*K,St=dt(j+at*st),W=w*4;if(O){const gt=St-j;b[W]=dt(I[W]+gt),b[W+1]=dt(I[W+1]+gt),b[W+2]=dt(I[W+2]+gt),b[W+3]=I[W+3]}else b[W]=b[W+1]=b[W+2]=St,b[W+3]=I[W+3]}for(let pt=0;pt<_;pt++){let tt=pt*4,w=((x-1)*_+pt)*4;b[tt]=I[tt],b[tt+1]=I[tt+1],b[tt+2]=I[tt+2],b[tt+3]=I[tt+3],b[w]=I[w],b[w+1]=I[w+1],b[w+2]=I[w+2],b[w+3]=I[w+3]}for(let pt=1;pt<x-1;pt++){let tt=pt*_*4,w=(pt*_+(_-1))*4;b[tt]=I[tt],b[tt+1]=I[tt+1],b[tt+2]=I[tt+2],b[tt+3]=I[tt+3],b[w]=I[w],b[w+1]=I[w+1],b[w+2]=I[w+2],b[w+3]=I[w+3]}return n};G.addGetterSetter(Nt,"embossStrength",.5,Dt(),G.afterSetFilter),G.addGetterSetter(Nt,"embossWhiteLevel",.5,Dt(),G.afterSetFilter),G.addGetterSetter(Nt,"embossDirection","top-left",void 0,G.afterSetFilter),G.addGetterSetter(Nt,"embossBlend",!1,void 0,G.afterSetFilter);function q2(n,t,i,s,u){const c=i-t,f=u-s;if(c===0)return s+f/2;if(f===0)return s;let p=(n-t)/c;return p=f*p+s,p}const S_=function(n){const t=n.data,i=t.length;let s=t[0],u=s,c,f=t[1],p=f,m,S=t[2],b=S,_;const x=this.enhance();if(x===0)return;for(let j=0;j<i;j+=4)c=t[j+0],c<s?s=c:c>u&&(u=c),m=t[j+1],m<f?f=m:m>p&&(p=m),_=t[j+2],_<S?S=_:_>b&&(b=_);u===s&&(u=255,s=0),p===f&&(p=255,f=0),b===S&&(b=255,S=0);let D,A,N,R,O,U;if(x>0)D=u+x*(255-u),A=s-x*(s-0),N=p+x*(255-p),R=f-x*(f-0),O=b+x*(255-b),U=S-x*(S-0);else{const j=(u+s)*.5;D=u+x*(u-j),A=s+x*(s-j);const V=(p+f)*.5;N=p+x*(p-V),R=f+x*(f-V);const F=(b+S)*.5;O=b+x*(b-F),U=S+x*(S-F)}for(let j=0;j<i;j+=4)t[j+0]=q2(t[j+0],s,u,A,D),t[j+1]=q2(t[j+1],f,p,R,N),t[j+2]=q2(t[j+2],S,b,U,O)};G.addGetterSetter(Nt,"enhance",0,Dt(),G.afterSetFilter);const b_=function(n){const t=n.data,i=t.length;for(let s=0;s<i;s+=4){const u=.34*t[s]+.5*t[s+1]+.16*t[s+2];t[s]=u,t[s+1]=u,t[s+2]=u}};G.addGetterSetter(Nt,"hue",0,Dt(),G.afterSetFilter),G.addGetterSetter(Nt,"saturation",0,Dt(),G.afterSetFilter),G.addGetterSetter(Nt,"luminance",0,Dt(),G.afterSetFilter);const E_=function(n){const t=n.data,i=t.length,s=1,u=Math.pow(2,this.saturation()),c=Math.abs(this.hue()+360)%360,f=this.luminance()*127,p=s*u*Math.cos(c*Math.PI/180),m=s*u*Math.sin(c*Math.PI/180),S=.299*s+.701*p+.167*m,b=.587*s-.587*p+.33*m,_=.114*s-.114*p-.497*m,x=.299*s-.299*p-.328*m,D=.587*s+.413*p+.035*m,A=.114*s-.114*p+.293*m,N=.299*s-.3*p+1.25*m,R=.587*s-.586*p-1.05*m,O=.114*s+.886*p-.2*m;let U,j,V,F;for(let $=0;$<i;$+=4)U=t[$+0],j=t[$+1],V=t[$+2],F=t[$+3],t[$+0]=S*U+b*j+_*V+f,t[$+1]=x*U+D*j+A*V+f,t[$+2]=N*U+R*j+O*V+f,t[$+3]=F},T_=function(n){const t=n.data,i=t.length,s=Math.pow(2,this.value()),u=Math.pow(2,this.saturation()),c=Math.abs(this.hue()+360)%360,f=s*u*Math.cos(c*Math.PI/180),p=s*u*Math.sin(c*Math.PI/180),m=.299*s+.701*f+.167*p,S=.587*s-.587*f+.33*p,b=.114*s-.114*f-.497*p,_=.299*s-.299*f-.328*p,x=.587*s+.413*f+.035*p,D=.114*s-.114*f+.293*p,A=.299*s-.3*f+1.25*p,N=.587*s-.586*f-1.05*p,R=.114*s+.886*f-.2*p;for(let O=0;O<i;O+=4){const U=t[O+0],j=t[O+1],V=t[O+2],F=t[O+3];t[O+0]=m*U+S*j+b*V,t[O+1]=_*U+x*j+D*V,t[O+2]=A*U+N*j+R*V,t[O+3]=F}};G.addGetterSetter(Nt,"hue",0,Dt(),G.afterSetFilter),G.addGetterSetter(Nt,"saturation",0,Dt(),G.afterSetFilter),G.addGetterSetter(Nt,"value",0,Dt(),G.afterSetFilter);const C_=function(n){const t=n.data,i=t.length;for(let s=0;s<i;s+=4)t[s]=255-t[s],t[s+1]=255-t[s+1],t[s+2]=255-t[s+2]},__=function(n,t,i){const s=n.data,u=t.data,c=n.width,f=n.height,p=i.polarCenterX||c/2,m=i.polarCenterY||f/2;let S=Math.sqrt(p*p+m*m),b=c-p,_=f-m;const x=Math.sqrt(b*b+_*_);S=x>S?x:S;const D=f,A=c,N=360/A*Math.PI/180;for(let R=0;R<A;R+=1){const O=Math.sin(R*N),U=Math.cos(R*N);for(let j=0;j<D;j+=1){b=Math.floor(p+S*j/D*U),_=Math.floor(m+S*j/D*O);let V=(_*c+b)*4;const F=s[V+0],$=s[V+1],st=s[V+2],I=s[V+3];V=(R+j*c)*4,u[V+0]=F,u[V+1]=$,u[V+2]=st,u[V+3]=I}}},x_=function(n,t,i){const s=n.data,u=t.data,c=n.width,f=n.height,p=i.polarCenterX||c/2,m=i.polarCenterY||f/2;let S=Math.sqrt(p*p+m*m),b=c-p,_=f-m;const x=Math.sqrt(b*b+_*_);S=x>S?x:S;const D=f,A=c,N=0;let R,O;for(b=0;b<c;b+=1)for(_=0;_<f;_+=1){const U=b-p,j=_-m,V=Math.sqrt(U*U+j*j)*D/S;let F=(Math.atan2(j,U)*180/Math.PI+360+N)%360;F=F*A/360,R=Math.floor(F),O=Math.floor(V);let $=(O*c+R)*4;const st=s[$+0],I=s[$+1],et=s[$+2],nt=s[$+3];$=(_*c+b)*4,u[$+0]=st,u[$+1]=I,u[$+2]=et,u[$+3]=nt}},D_=function(n){const t=n.width,i=n.height;let s,u,c,f,p,m,S,b,_,x,D=Math.round(this.kaleidoscopePower());const A=Math.round(this.kaleidoscopeAngle()),N=Math.floor(t*(A%360)/360);if(D<1)return;const R=k.createCanvasElement();R.width=t,R.height=i;const O=R.getContext("2d").getImageData(0,0,t,i);k.releaseCanvas(R),__(n,O,{polarCenterX:t/2,polarCenterY:i/2});let U=t/Math.pow(2,D);for(;U<=8;)U=U*2,D-=1;U=Math.ceil(U);let j=U,V=0,F=j,$=1;for(N+U>t&&(V=j,F=0,$=-1),u=0;u<i;u+=1)for(s=V;s!==F;s+=$)c=Math.round(s+N)%t,_=(t*u+c)*4,p=O.data[_+0],m=O.data[_+1],S=O.data[_+2],b=O.data[_+3],x=(t*u+s)*4,O.data[x+0]=p,O.data[x+1]=m,O.data[x+2]=S,O.data[x+3]=b;for(u=0;u<i;u+=1)for(j=Math.floor(U),f=0;f<D;f+=1){for(s=0;s<j+1;s+=1)_=(t*u+s)*4,p=O.data[_+0],m=O.data[_+1],S=O.data[_+2],b=O.data[_+3],x=(t*u+j*2-s-1)*4,O.data[x+0]=p,O.data[x+1]=m,O.data[x+2]=S,O.data[x+3]=b;j*=2}x_(O,n,{})};G.addGetterSetter(Nt,"kaleidoscopePower",2,Dt(),G.afterSetFilter),G.addGetterSetter(Nt,"kaleidoscopeAngle",0,Dt(),G.afterSetFilter);function V1(n,t,i){let s=(i*n.width+t)*4;const u=[];return u.push(n.data[s++],n.data[s++],n.data[s++],n.data[s++]),u}function Fp(n,t){return Math.sqrt(Math.pow(n[0]-t[0],2)+Math.pow(n[1]-t[1],2)+Math.pow(n[2]-t[2],2))}function A_(n){const t=[0,0,0];for(let i=0;i<n.length;i++)t[0]+=n[i][0],t[1]+=n[i][1],t[2]+=n[i][2];return t[0]/=n.length,t[1]/=n.length,t[2]/=n.length,t}function M_(n,t){const i=V1(n,0,0),s=V1(n,n.width-1,0),u=V1(n,0,n.height-1),c=V1(n,n.width-1,n.height-1),f=t||10;if(Fp(i,s)<f&&Fp(s,c)<f&&Fp(c,u)<f&&Fp(u,i)<f){const p=A_([s,i,c,u]),m=[];for(let S=0;S<n.width*n.height;S++){const b=Fp(p,[n.data[S*4],n.data[S*4+1],n.data[S*4+2]]);m[S]=b<f?0:255}return m}}function N_(n,t){for(let i=0;i<n.width*n.height;i++)n.data[4*i+3]=t[i]}function O_(n,t,i){const s=[1,1,1,1,0,1,1,1,1],u=Math.round(Math.sqrt(s.length)),c=Math.floor(u/2),f=[];for(let p=0;p<i;p++)for(let m=0;m<t;m++){const S=p*t+m;let b=0;for(let _=0;_<u;_++)for(let x=0;x<u;x++){const D=p+_-c,A=m+x-c;if(D>=0&&D<i&&A>=0&&A<t){const N=D*t+A,R=s[_*u+x];b+=n[N]*R}}f[S]=b===2040?255:0}return f}function R_(n,t,i){const s=[1,1,1,1,1,1,1,1,1],u=Math.round(Math.sqrt(s.length)),c=Math.floor(u/2),f=[];for(let p=0;p<i;p++)for(let m=0;m<t;m++){const S=p*t+m;let b=0;for(let _=0;_<u;_++)for(let x=0;x<u;x++){const D=p+_-c,A=m+x-c;if(D>=0&&D<i&&A>=0&&A<t){const N=D*t+A,R=s[_*u+x];b+=n[N]*R}}f[S]=b>=1020?255:0}return f}function z_(n,t,i){const s=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],u=Math.round(Math.sqrt(s.length)),c=Math.floor(u/2),f=[];for(let p=0;p<i;p++)for(let m=0;m<t;m++){const S=p*t+m;let b=0;for(let _=0;_<u;_++)for(let x=0;x<u;x++){const D=p+_-c,A=m+x-c;if(D>=0&&D<i&&A>=0&&A<t){const N=D*t+A,R=s[_*u+x];b+=n[N]*R}}f[S]=b}return f}const H_=function(n){const t=this.threshold();let i=M_(n,t);return i&&(i=O_(i,n.width,n.height),i=R_(i,n.width,n.height),i=z_(i,n.width,n.height),N_(n,i)),n};G.addGetterSetter(Nt,"threshold",0,Dt(),G.afterSetFilter);const w_=function(n){const t=this.noise()*255,i=n.data,s=i.length,u=t/2;for(let c=0;c<s;c+=4)i[c+0]+=u-2*u*Math.random(),i[c+1]+=u-2*u*Math.random(),i[c+2]+=u-2*u*Math.random()};G.addGetterSetter(Nt,"noise",.2,Dt(),G.afterSetFilter);const U_=function(n){let t=Math.ceil(this.pixelSize()),i=n.width,s=n.height,u=Math.ceil(i/t),c=Math.ceil(s/t),f=n.data;if(t<=0){k.error("pixelSize value can not be <= 0");return}for(let p=0;p<u;p+=1)for(let m=0;m<c;m+=1){let S=0,b=0,_=0,x=0;const D=p*t,A=D+t,N=m*t,R=N+t;let O=0;for(let U=D;U<A;U+=1)if(!(U>=i))for(let j=N;j<R;j+=1){if(j>=s)continue;const V=(i*j+U)*4;S+=f[V+0],b+=f[V+1],_+=f[V+2],x+=f[V+3],O+=1}S=S/O,b=b/O,_=_/O,x=x/O;for(let U=D;U<A;U+=1)if(!(U>=i))for(let j=N;j<R;j+=1){if(j>=s)continue;const V=(i*j+U)*4;f[V+0]=S,f[V+1]=b,f[V+2]=_,f[V+3]=x}}};G.addGetterSetter(Nt,"pixelSize",8,Dt(),G.afterSetFilter);const B_=function(n){const t=Math.round(this.levels()*254)+1,i=n.data,s=i.length,u=255/t;for(let c=0;c<s;c+=1)i[c]=Math.floor(i[c]/u)*u};G.addGetterSetter(Nt,"levels",.5,Dt(),G.afterSetFilter);const V_=function(n){const t=n.data,i=t.length,s=this.red(),u=this.green(),c=this.blue();for(let f=0;f<i;f+=4){const p=(.34*t[f]+.5*t[f+1]+.16*t[f+2])/255;t[f]=p*s,t[f+1]=p*u,t[f+2]=p*c,t[f+3]=t[f+3]}};G.addGetterSetter(Nt,"red",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),G.addGetterSetter(Nt,"green",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),G.addGetterSetter(Nt,"blue",0,m5,G.afterSetFilter);const G_=function(n){const t=n.data,i=t.length,s=this.red(),u=this.green(),c=this.blue(),f=this.alpha();for(let p=0;p<i;p+=4){const m=1-f;t[p]=s*f+t[p]*m,t[p+1]=u*f+t[p+1]*m,t[p+2]=c*f+t[p+2]*m}};G.addGetterSetter(Nt,"red",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),G.addGetterSetter(Nt,"green",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),G.addGetterSetter(Nt,"blue",0,m5,G.afterSetFilter),G.addGetterSetter(Nt,"alpha",1,function(n){return this._filterUpToDate=!1,n>1?1:n<0?0:n});const j_=function(n){const t=n.data,i=t.length;for(let s=0;s<i;s+=4){const u=t[s+0],c=t[s+1],f=t[s+2];t[s+0]=Math.min(255,u*.393+c*.769+f*.189),t[s+1]=Math.min(255,u*.349+c*.686+f*.168),t[s+2]=Math.min(255,u*.272+c*.534+f*.131)}},L_=function(n){const i=n.data;for(let s=0;s<i.length;s+=4){const u=i[s],c=i[s+1],f=i[s+2];.2126*u+.7152*c+.0722*f>=128&&(i[s]=255-u,i[s+1]=255-c,i[s+2]=255-f)}return n},P_=function(n){const t=this.threshold()*255,i=n.data,s=i.length;for(let u=0;u<s;u+=1)i[u]=i[u]<t?0:255};G.addGetterSetter(Nt,"threshold",.5,Dt(),G.afterSetFilter),$f.Util._assign($f,{Arc:Nr,Arrow:fc,Circle:th,Ellipse:Lo,Image:ll,Label:j2,Tag:hc,Line:Or,Path:bs,Rect:Zp,RegularPolygon:Po,Ring:dc,Sprite:Kl,Star:Yo,Text:an,TextPath:ca,Transformer:ve,Wedge:Rr,Filters:{Blur:p_,Brightness:g_,Brighten:m_,Contrast:y_,Emboss:v_,Enhance:S_,Grayscale:b_,HSL:E_,HSV:T_,Invert:C_,Kaleidoscope:D_,Mask:H_,Noise:w_,Pixelate:U_,Posterize:B_,RGB:V_,RGBA:G_,Sepia:j_,Solarize:L_,Threshold:P_}});function X2(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var G1={exports:{}},K2={exports:{}},j1={exports:{}},Q2={};var h4;function Y_(){return h4||(h4=1,(function(n){function t(w,Z){var K=w.length;w.push(Z);t:for(;0<K;){var at=K-1>>>1,St=w[at];if(0<u(St,Z))w[at]=Z,w[K]=St,K=at;else break t}}function i(w){return w.length===0?null:w[0]}function s(w){if(w.length===0)return null;var Z=w[0],K=w.pop();if(K!==Z){w[0]=K;t:for(var at=0,St=w.length,W=St>>>1;at<W;){var gt=2*(at+1)-1,Tt=w[gt],Pt=gt+1,le=w[Pt];if(0>u(Tt,K))Pt<St&&0>u(le,Tt)?(w[at]=le,w[Pt]=K,at=Pt):(w[at]=Tt,w[gt]=K,at=gt);else if(Pt<St&&0>u(le,K))w[at]=le,w[Pt]=K,at=Pt;else break t}}return Z}function u(w,Z){var K=w.sortIndex-Z.sortIndex;return K!==0?K:w.id-Z.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var f=Date,p=f.now();n.unstable_now=function(){return f.now()-p}}var m=[],S=[],b=1,_=null,x=3,D=!1,A=!1,N=!1,R=!1,O=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function V(w){for(var Z=i(S);Z!==null;){if(Z.callback===null)s(S);else if(Z.startTime<=w)s(S),Z.sortIndex=Z.expirationTime,t(m,Z);else break;Z=i(S)}}function F(w){if(N=!1,V(w),!A)if(i(m)!==null)A=!0,$||($=!0,lt());else{var Z=i(S);Z!==null&&tt(F,Z.startTime-w)}}var $=!1,st=-1,I=5,et=-1;function nt(){return R?!0:!(n.unstable_now()-et<I)}function bt(){if(R=!1,$){var w=n.unstable_now();et=w;var Z=!0;try{t:{A=!1,N&&(N=!1,U(st),st=-1),D=!0;var K=x;try{e:{for(V(w),_=i(m);_!==null&&!(_.expirationTime>w&&nt());){var at=_.callback;if(typeof at=="function"){_.callback=null,x=_.priorityLevel;var St=at(_.expirationTime<=w);if(w=n.unstable_now(),typeof St=="function"){_.callback=St,V(w),Z=!0;break e}_===i(m)&&s(m),V(w)}else s(m);_=i(m)}if(_!==null)Z=!0;else{var W=i(S);W!==null&&tt(F,W.startTime-w),Z=!1}}break t}finally{_=null,x=K,D=!1}Z=void 0}}finally{Z?lt():$=!1}}}var lt;if(typeof j=="function")lt=function(){j(bt)};else if(typeof MessageChannel<"u"){var dt=new MessageChannel,pt=dt.port2;dt.port1.onmessage=bt,lt=function(){pt.postMessage(null)}}else lt=function(){O(bt,0)};function tt(w,Z){st=O(function(){w(n.unstable_now())},Z)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(w){w.callback=null},n.unstable_forceFrameRate=function(w){0>w||125<w?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<w?Math.floor(1e3/w):5},n.unstable_getCurrentPriorityLevel=function(){return x},n.unstable_next=function(w){switch(x){case 1:case 2:case 3:var Z=3;break;default:Z=x}var K=x;x=Z;try{return w()}finally{x=K}},n.unstable_requestPaint=function(){R=!0},n.unstable_runWithPriority=function(w,Z){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var K=x;x=w;try{return Z()}finally{x=K}},n.unstable_scheduleCallback=function(w,Z,K){var at=n.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?at+K:at):K=at,w){case 1:var St=-1;break;case 2:St=250;break;case 5:St=1073741823;break;case 4:St=1e4;break;default:St=5e3}return St=K+St,w={id:b++,callback:Z,priorityLevel:w,startTime:K,expirationTime:St,sortIndex:-1},K>at?(w.sortIndex=K,t(S,w),i(m)===null&&w===i(S)&&(N?(U(st),st=-1):N=!0,tt(F,K-at))):(w.sortIndex=St,t(m,w),A||D||(A=!0,$||($=!0,lt()))),w},n.unstable_shouldYield=nt,n.unstable_wrapCallback=function(w){var Z=x;return function(){var K=x;x=Z;try{return w.apply(this,arguments)}finally{x=K}}}})(Q2)),Q2}var Z2={};var d4;function q_(){return d4||(d4=1,(function(n){process.env.NODE_ENV!=="production"&&(function(){function t(){if(F=!1,et){var w=n.unstable_now();lt=w;var Z=!0;try{t:{j=!1,V&&(V=!1,st(nt),nt=-1),U=!0;var K=O;try{e:{for(f(w),R=s(D);R!==null&&!(R.expirationTime>w&&m());){var at=R.callback;if(typeof at=="function"){R.callback=null,O=R.priorityLevel;var St=at(R.expirationTime<=w);if(w=n.unstable_now(),typeof St=="function"){R.callback=St,f(w),Z=!0;break e}R===s(D)&&u(D),f(w)}else u(D);R=s(D)}if(R!==null)Z=!0;else{var W=s(A);W!==null&&S(p,W.startTime-w),Z=!1}}break t}finally{R=null,O=K,U=!1}Z=void 0}}finally{Z?dt():et=!1}}}function i(w,Z){var K=w.length;w.push(Z);t:for(;0<K;){var at=K-1>>>1,St=w[at];if(0<c(St,Z))w[at]=Z,w[K]=St,K=at;else break t}}function s(w){return w.length===0?null:w[0]}function u(w){if(w.length===0)return null;var Z=w[0],K=w.pop();if(K!==Z){w[0]=K;t:for(var at=0,St=w.length,W=St>>>1;at<W;){var gt=2*(at+1)-1,Tt=w[gt],Pt=gt+1,le=w[Pt];if(0>c(Tt,K))Pt<St&&0>c(le,Tt)?(w[at]=le,w[Pt]=K,at=Pt):(w[at]=Tt,w[gt]=K,at=gt);else if(Pt<St&&0>c(le,K))w[at]=le,w[Pt]=K,at=Pt;else break t}}return Z}function c(w,Z){var K=w.sortIndex-Z.sortIndex;return K!==0?K:w.id-Z.id}function f(w){for(var Z=s(A);Z!==null;){if(Z.callback===null)u(A);else if(Z.startTime<=w)u(A),Z.sortIndex=Z.expirationTime,i(D,Z);else break;Z=s(A)}}function p(w){if(V=!1,f(w),!j)if(s(D)!==null)j=!0,et||(et=!0,dt());else{var Z=s(A);Z!==null&&S(p,Z.startTime-w)}}function m(){return F?!0:!(n.unstable_now()-lt<bt)}function S(w,Z){nt=$(function(){w(n.unstable_now())},Z)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var b=performance;n.unstable_now=function(){return b.now()}}else{var _=Date,x=_.now();n.unstable_now=function(){return _.now()-x}}var D=[],A=[],N=1,R=null,O=3,U=!1,j=!1,V=!1,F=!1,$=typeof setTimeout=="function"?setTimeout:null,st=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null,et=!1,nt=-1,bt=5,lt=-1;if(typeof I=="function")var dt=function(){I(t)};else if(typeof MessageChannel<"u"){var pt=new MessageChannel,tt=pt.port2;pt.port1.onmessage=t,dt=function(){tt.postMessage(null)}}else dt=function(){$(t,0)};n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(w){w.callback=null},n.unstable_forceFrameRate=function(w){0>w||125<w?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):bt=0<w?Math.floor(1e3/w):5},n.unstable_getCurrentPriorityLevel=function(){return O},n.unstable_next=function(w){switch(O){case 1:case 2:case 3:var Z=3;break;default:Z=O}var K=O;O=Z;try{return w()}finally{O=K}},n.unstable_requestPaint=function(){F=!0},n.unstable_runWithPriority=function(w,Z){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var K=O;O=w;try{return Z()}finally{O=K}},n.unstable_scheduleCallback=function(w,Z,K){var at=n.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?at+K:at):K=at,w){case 1:var St=-1;break;case 2:St=250;break;case 5:St=1073741823;break;case 4:St=1e4;break;default:St=5e3}return St=K+St,w={id:N++,callback:Z,priorityLevel:w,startTime:K,expirationTime:St,sortIndex:-1},K>at?(w.sortIndex=K,i(A,w),s(D)===null&&w===s(A)&&(V?(st(nt),nt=-1):V=!0,S(p,K-at))):(w.sortIndex=St,i(D,w),j||U||(j=!0,et||(et=!0,dt()))),w},n.unstable_shouldYield=m,n.unstable_wrapCallback=function(w){var Z=O;return function(){var K=O;O=Z;try{return w.apply(this,arguments)}finally{O=K}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})(Z2)),Z2}var p4;function J2(){return p4||(p4=1,process.env.NODE_ENV==="production"?j1.exports=Y_():j1.exports=q_()),j1.exports}var m4;function X_(){return m4||(m4=1,(function(n){n.exports=function(t){function i(l,r,h,g){return new md(l,r,h,g)}function s(){}function u(l){var r="https://react.dev/errors/"+l;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)r+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+l+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(l){var r=l,h=l;if(l.alternate)for(;r.return;)r=r.return;else{l=r;do r=l,(r.flags&4098)!==0&&(h=r.return),l=r.return;while(l)}return r.tag===3?h:null}function f(l){if(c(l)!==l)throw Error(u(188))}function p(l){var r=l.alternate;if(!r){if(r=c(l),r===null)throw Error(u(188));return r!==l?null:l}for(var h=l,g=r;;){var E=h.return;if(E===null)break;var T=E.alternate;if(T===null){if(g=E.return,g!==null){h=g;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===h)return f(E),l;if(T===g)return f(E),r;T=T.sibling}throw Error(u(188))}if(h.return!==g.return)h=E,g=T;else{for(var z=!1,L=E.child;L;){if(L===h){z=!0,h=E,g=T;break}if(L===g){z=!0,g=E,h=T;break}L=L.sibling}if(!z){for(L=T.child;L;){if(L===h){z=!0,h=T,g=E;break}if(L===g){z=!0,g=T,h=E;break}L=L.sibling}if(!z)throw Error(u(189))}}if(h.alternate!==g)throw Error(u(190))}if(h.tag!==3)throw Error(u(188));return h.stateNode.current===h?l:r}function m(l){var r=l.tag;if(r===5||r===26||r===27||r===6)return l;for(l=l.child;l!==null;){if(r=m(l),r!==null)return r;l=l.sibling}return null}function S(l){var r=l.tag;if(r===5||r===26||r===27||r===6)return l;for(l=l.child;l!==null;){if(l.tag!==4&&(r=S(l),r!==null))return r;l=l.sibling}return null}function b(l){return l===null||typeof l!="object"?null:(l=ym&&l[ym]||l["@@iterator"],typeof l=="function"?l:null)}function _(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===vm?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case io:return"Fragment";case ff:return"Profiler";case mm:return"StrictMode";case so:return"Suspense";case ze:return"SuspenseList";case Td:return"Activity"}if(typeof l=="object")switch(l.$$typeof){case or:return"Portal";case Al:return l.displayName||"Context";case Ed:return(l._context.displayName||"Context")+".Consumer";case Cu:var r=l.render;return l=l.displayName,l||(l=r.displayName||r.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case gm:return r=l.displayName||null,r!==null?r:_(l.type)||"Memo";case ur:r=l._payload,l=l._init;try{return _(l(r))}catch{}}return null}function x(l){return{current:l}}function D(l){0>Nu||(l.current=bf[Nu],bf[Nu]=null,Nu--)}function A(l,r){Nu++,bf[Nu]=l.current,l.current=r}function N(l){return l>>>=0,l===0?32:31-(My(l)/Ny|0)|0}function R(l){var r=l&42;if(r!==0)return r;switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function O(l,r,h){var g=l.pendingLanes;if(g===0)return 0;var E=0,T=l.suspendedLanes,z=l.pingedLanes;l=l.warmLanes;var L=g&134217727;return L!==0?(g=L&~T,g!==0?E=R(g):(z&=L,z!==0?E=R(z):h||(h=L&~l,h!==0&&(E=R(h))))):(L=g&~T,L!==0?E=R(L):z!==0?E=R(z):h||(h=g&~l,h!==0&&(E=R(h)))),E===0?0:r!==0&&r!==E&&(r&T)===0&&(T=E&-E,h=r&-r,T>=h||T===32&&(h&4194048)!==0)?r:E}function U(l,r){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&r)===0}function j(l,r){switch(l){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function V(){var l=Ou;return Ou<<=1,(Ou&62914560)===0&&(Ou=4194304),l}function F(l){for(var r=[],h=0;31>h;h++)r.push(l);return r}function $(l,r){l.pendingLanes|=r,r!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function st(l,r,h,g,E,T){var z=l.pendingLanes;l.pendingLanes=h,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=h,l.entangledLanes&=h,l.errorRecoveryDisabledLanes&=h,l.shellSuspendCounter=0;var L=l.entanglements,ft=l.expirationTimes,vt=l.hiddenUpdates;for(h=z&~h;0<h;){var Mt=31-ii(h),xt=1<<Mt;L[Mt]=0,ft[Mt]=-1;var Rt=vt[Mt];if(Rt!==null)for(vt[Mt]=null,Mt=0;Mt<Rt.length;Mt++){var Yt=Rt[Mt];Yt!==null&&(Yt.lane&=-536870913)}h&=~xt}g!==0&&I(l,g,0),T!==0&&E===0&&l.tag!==0&&(l.suspendedLanes|=T&~(z&~r))}function I(l,r,h){l.pendingLanes|=r,l.suspendedLanes&=~r;var g=31-ii(r);l.entangledLanes|=r,l.entanglements[g]=l.entanglements[g]|1073741824|h&261930}function et(l,r){var h=l.entangledLanes|=r;for(l=l.entanglements;h;){var g=31-ii(h),E=1<<g;E&r|l[g]&r&&(l[g]|=r),h&=~E}}function nt(l,r){var h=r&-r;return h=(h&42)!==0?1:bt(h),(h&(l.suspendedLanes|r))!==0?0:h}function bt(l){switch(l){case 2:l=1;break;case 8:l=4;break;case 32:l=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:l=128;break;case 268435456:l=134217728;break;default:l=0}return l}function lt(l){return l&=-l,2<l?8<l?(l&134217727)!==0?32:268435456:8:2}function dt(l){if(typeof Gd=="function"&&wm(l),Rn&&typeof Rn.setStrictMode=="function")try{Rn.setStrictMode(po,l)}catch{}}function pt(l,r){return l===r&&(l!==0||1/l===1/r)||l!==l&&r!==r}function tt(l){if(zu===void 0)try{throw Error()}catch(h){var r=h.stack.trim().match(/\n( *(at )?)/);zu=r&&r[1]||"",li=-1<h.stack.indexOf(`
|
|
14
|
+
`,c5=()=>{if(typeof document>"u")throw new Error(CT)};class Fi{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new Fi(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){const i=this.m;return{x:i[0]*t.x+i[2]*t.y+i[4],y:i[1]*t.x+i[3]*t.y+i[5]}}translate(t,i){return this.m[4]+=this.m[0]*t+this.m[2]*i,this.m[5]+=this.m[1]*t+this.m[3]*i,this}scale(t,i){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=i,this.m[3]*=i,this}rotate(t){const i=Math.cos(t),s=Math.sin(t),u=this.m[0]*i+this.m[2]*s,c=this.m[1]*i+this.m[3]*s,f=this.m[0]*-s+this.m[2]*i,p=this.m[1]*-s+this.m[3]*i;return this.m[0]=u,this.m[1]=c,this.m[2]=f,this.m[3]=p,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,i){const s=this.m[0]+this.m[2]*i,u=this.m[1]+this.m[3]*i,c=this.m[2]+this.m[0]*t,f=this.m[3]+this.m[1]*t;return this.m[0]=s,this.m[1]=u,this.m[2]=c,this.m[3]=f,this}multiply(t){const i=this.m[0]*t.m[0]+this.m[2]*t.m[1],s=this.m[1]*t.m[0]+this.m[3]*t.m[1],u=this.m[0]*t.m[2]+this.m[2]*t.m[3],c=this.m[1]*t.m[2]+this.m[3]*t.m[3],f=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],p=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=i,this.m[1]=s,this.m[2]=u,this.m[3]=c,this.m[4]=f,this.m[5]=p,this}invert(){const t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),i=this.m[3]*t,s=-this.m[1]*t,u=-this.m[2]*t,c=this.m[0]*t,f=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),p=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=i,this.m[1]=s,this.m[2]=u,this.m[3]=c,this.m[4]=f,this.m[5]=p,this}getMatrix(){return this.m}decompose(){const t=this.m[0],i=this.m[1],s=this.m[2],u=this.m[3],c=this.m[4],f=this.m[5],p=t*u-i*s,m={x:c,y:f,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||i!=0){const S=Math.sqrt(t*t+i*i);m.rotation=i>0?Math.acos(t/S):-Math.acos(t/S),m.scaleX=S,m.scaleY=p/S,m.skewX=(t*s+i*u)/p,m.skewY=0}else if(s!=0||u!=0){const S=Math.sqrt(s*s+u*u);m.rotation=Math.PI/2-(u>0?Math.acos(-s/S):-Math.acos(s/S)),m.scaleX=p/S,m.scaleY=S,m.skewX=0,m.skewY=(t*s+i*u)/p}return m.rotation=W._getRotation(m.rotation),m}}const _T="[object Array]",xT="[object Number]",DT="[object String]",AT="[object Boolean]",MT=Math.PI/180,NT=180/Math.PI,Bp="#",OT="",RT="0",zT="Konva warning: ",f5="Konva error: ",HT="rgb(",S2={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},wT=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/;let C1=[],Vp=null;const UT=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(n){setTimeout(n,60)},W={_isElement(n){return!!(n&&n.nodeType==1)},_isFunction(n){return!!(n&&n.constructor&&n.call&&n.apply)},_isPlainObject(n){return!!n&&n.constructor===Object},_isArray(n){return Object.prototype.toString.call(n)===_T},_isNumber(n){return Object.prototype.toString.call(n)===xT&&!isNaN(n)&&isFinite(n)},_isString(n){return Object.prototype.toString.call(n)===DT},_isBoolean(n){return Object.prototype.toString.call(n)===AT},isObject(n){return n instanceof Object},isValidSelector(n){if(typeof n!="string")return!1;const t=n[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(n){return n===0||n>0?1:-1},requestAnimFrame(n){C1.push(n),C1.length===1&&UT(function(){const t=C1;C1=[],t.forEach(function(i){i()})})},createCanvasElement(){c5();const n=document.createElement("canvas");try{n.style=n.style||{}}catch{}return n},createImageElement(){return c5(),document.createElement("img")},_isInDocument(n){for(;n=n.parentNode;)if(n==document)return!0;return!1},_urlToImage(n,t){const i=W.createImageElement();i.onload=function(){t(i)},i.src=n},_rgbToHex(n,t,i){return((1<<24)+(n<<16)+(t<<8)+i).toString(16).slice(1)},_hexToRgb(n){n=n.replace(Bp,OT);const t=parseInt(n,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){let n=(Math.random()*16777215<<0).toString(16);for(;n.length<6;)n=RT+n;return Bp+n},isCanvasFarblingActive(){if(Vp!==null)return Vp;if(typeof document>"u")return Vp=!1,!1;const n=this.createCanvasElement();n.width=10,n.height=10;const t=n.getContext("2d",{willReadFrequently:!0});t.clearRect(0,0,10,10),t.fillStyle="#282828",t.fillRect(0,0,10,10);const i=t.getImageData(0,0,10,10).data;let s=!1;for(let u=0;u<100;u++)if(i[u*4]!==40||i[u*4+1]!==40||i[u*4+2]!==40||i[u*4+3]!==255){s=!0;break}return Vp=s,this.releaseCanvas(n),Vp},getHitColor(){const n=this.getRandomColor();return this.isCanvasFarblingActive()?this.getSnappedHexColor(n):n},getHitColorKey(n,t,i){return this.isCanvasFarblingActive()&&(n=Math.round(n/5)*5,t=Math.round(t/5)*5,i=Math.round(i/5)*5),Bp+this._rgbToHex(n,t,i)},getSnappedHexColor(n){const t=this._hexToRgb(n);return Bp+this._rgbToHex(Math.round(t.r/5)*5,Math.round(t.g/5)*5,Math.round(t.b/5)*5)},getRGB(n){let t;return n in S2?(t=S2[n],{r:t[0],g:t[1],b:t[2]}):n[0]===Bp?this._hexToRgb(n.substring(1)):n.substr(0,4)===HT?(t=wT.exec(n.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(n){return n=n||"black",W._namedColorToRBA(n)||W._hex3ColorToRGBA(n)||W._hex4ColorToRGBA(n)||W._hex6ColorToRGBA(n)||W._hex8ColorToRGBA(n)||W._rgbColorToRGBA(n)||W._rgbaColorToRGBA(n)||W._hslColorToRGBA(n)},_namedColorToRBA(n){const t=S2[n.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(n){if(n.indexOf("rgb(")===0){n=n.match(/rgb\(([^)]+)\)/)[1];const t=n.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(n){if(n.indexOf("rgba(")===0){n=n.match(/rgba\(([^)]+)\)/)[1];const t=n.split(/ *, */).map((i,s)=>i.slice(-1)==="%"?s===3?parseInt(i)/100:parseInt(i)/100*255:Number(i));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex8ColorToRGBA(n){if(n[0]==="#"&&n.length===9)return{r:parseInt(n.slice(1,3),16),g:parseInt(n.slice(3,5),16),b:parseInt(n.slice(5,7),16),a:parseInt(n.slice(7,9),16)/255}},_hex6ColorToRGBA(n){if(n[0]==="#"&&n.length===7)return{r:parseInt(n.slice(1,3),16),g:parseInt(n.slice(3,5),16),b:parseInt(n.slice(5,7),16),a:1}},_hex4ColorToRGBA(n){if(n[0]==="#"&&n.length===5)return{r:parseInt(n[1]+n[1],16),g:parseInt(n[2]+n[2],16),b:parseInt(n[3]+n[3],16),a:parseInt(n[4]+n[4],16)/255}},_hex3ColorToRGBA(n){if(n[0]==="#"&&n.length===4)return{r:parseInt(n[1]+n[1],16),g:parseInt(n[2]+n[2],16),b:parseInt(n[3]+n[3],16),a:1}},_hslColorToRGBA(n){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(n)){const[t,...i]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(n),s=Number(i[0])/360,u=Number(i[1])/100,c=Number(i[2])/100;let f,p,m;if(u===0)return m=c*255,{r:Math.round(m),g:Math.round(m),b:Math.round(m),a:1};c<.5?f=c*(1+u):f=c+u-c*u;const S=2*c-f,b=[0,0,0];for(let _=0;_<3;_++)p=s+1/3*-(_-1),p<0&&p++,p>1&&p--,6*p<1?m=S+(f-S)*6*p:2*p<1?m=f:3*p<2?m=S+(f-S)*(2/3-p)*6:m=S,b[_]=m*255;return{r:Math.round(b[0]),g:Math.round(b[1]),b:Math.round(b[2]),a:1}}},haveIntersection(n,t){return!(t.x>n.x+n.width||t.x+t.width<n.x||t.y>n.y+n.height||t.y+t.height<n.y)},cloneObject(n){const t={};for(const i in n)this._isPlainObject(n[i])?t[i]=this.cloneObject(n[i]):this._isArray(n[i])?t[i]=this.cloneArray(n[i]):t[i]=n[i];return t},cloneArray(n){return n.slice(0)},degToRad(n){return n*MT},radToDeg(n){return n*NT},_degToRad(n){return W.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),W.degToRad(n)},_radToDeg(n){return W.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),W.radToDeg(n)},_getRotation(n){return Mt.angleDeg?W.radToDeg(n):n},_capitalize(n){return n.charAt(0).toUpperCase()+n.slice(1)},throw(n){throw new Error(f5+n)},error(n){console.error(f5+n)},warn(n){Mt.showWarnings&&console.warn(zT+n)},each(n,t){for(const i in n)t(i,n[i])},_inRange(n,t,i){return t<=n&&n<i},_getProjectionToSegment(n,t,i,s,u,c){let f,p,m;const S=(n-i)*(n-i)+(t-s)*(t-s);if(S==0)f=n,p=t,m=(u-i)*(u-i)+(c-s)*(c-s);else{const b=((u-n)*(i-n)+(c-t)*(s-t))/S;b<0?(f=n,p=t,m=(n-u)*(n-u)+(t-c)*(t-c)):b>1?(f=i,p=s,m=(i-u)*(i-u)+(s-c)*(s-c)):(f=n+b*(i-n),p=t+b*(s-t),m=(f-u)*(f-u)+(p-c)*(p-c))}return[f,p,m]},_getProjectionToLine(n,t,i){const s=W.cloneObject(n);let u=Number.MAX_VALUE;return t.forEach(function(c,f){if(!i&&f===t.length-1)return;const p=t[(f+1)%t.length],m=W._getProjectionToSegment(c.x,c.y,p.x,p.y,n.x,n.y),S=m[0],b=m[1],_=m[2];_<u&&(s.x=S,s.y=b,u=_)}),s},_prepareArrayForTween(n,t,i){const s=[],u=[];if(n.length>t.length){const f=t;t=n,n=f}for(let f=0;f<n.length;f+=2)s.push({x:n[f],y:n[f+1]});for(let f=0;f<t.length;f+=2)u.push({x:t[f],y:t[f+1]});const c=[];return u.forEach(function(f){const p=W._getProjectionToLine(f,s,i);c.push(p.x),c.push(p.y)}),c},_prepareToStringify(n){let t;n.visitedByCircularReferenceRemoval=!0;for(const i in n)if(n.hasOwnProperty(i)&&n[i]&&typeof n[i]=="object"){if(t=Object.getOwnPropertyDescriptor(n,i),n[i].visitedByCircularReferenceRemoval||W._isElement(n[i]))if(t.configurable)delete n[i];else return null;else if(W._prepareToStringify(n[i])===null)if(t.configurable)delete n[i];else return null}return delete n.visitedByCircularReferenceRemoval,n},_assign(n,t){for(const i in t)n[i]=t[i];return n},_getFirstPointerId(n){return n.touches?n.changedTouches[0].identifier:n.pointerId||999},releaseCanvas(...n){Mt.releaseCanvasOnDestroy&&n.forEach(t=>{t.width=0,t.height=0})},drawRoundedRectPath(n,t,i,s){let u=t<0?t:0,c=i<0?i:0;t=Math.abs(t),i=Math.abs(i);let f=0,p=0,m=0,S=0;typeof s=="number"?f=p=m=S=Math.min(s,t/2,i/2):(f=Math.min(s[0]||0,t/2,i/2),p=Math.min(s[1]||0,t/2,i/2),S=Math.min(s[2]||0,t/2,i/2),m=Math.min(s[3]||0,t/2,i/2)),n.moveTo(u+f,c),n.lineTo(u+t-p,c),n.arc(u+t-p,c+p,p,Math.PI*3/2,0,!1),n.lineTo(u+t,c+i-S),n.arc(u+t-S,c+i-S,S,0,Math.PI/2,!1),n.lineTo(u+m,c+i),n.arc(u+m,c+i-m,m,Math.PI/2,Math.PI,!1),n.lineTo(u,c+f),n.arc(u+f,c+f,f,Math.PI,Math.PI*3/2,!1)},drawRoundedPolygonPath(n,t,i,s,u){s=Math.abs(s);for(let c=0;c<i;c++){const f=t[(c-1+i)%i],p=t[c],m=t[(c+1)%i],S={x:p.x-f.x,y:p.y-f.y},b={x:m.x-p.x,y:m.y-p.y},_=Math.hypot(S.x,S.y),x=Math.hypot(b.x,b.y);let D;typeof u=="number"?D=u:D=c<u.length?u[c]:0,D=s*Math.cos(Math.PI/i)*Math.min(1,D/s*2);const N={x:S.x/_,y:S.y/_},O={x:b.x/x,y:b.y/x},R={x:p.x-N.x*D,y:p.y-N.y*D},U={x:p.x+O.x*D,y:p.y+O.y*D};c===0?n.moveTo(R.x,R.y):n.lineTo(R.x,R.y),n.arcTo(p.x,p.y,U.x,U.y,D)}}};function BT(n){const t=[],i=n.length,s=W;for(let u=0;u<i;u++){let c=n[u];s._isNumber(c)?c=Math.round(c*1e3)/1e3:s._isString(c)||(c=c+""),t.push(c)}return t}const h5=",",VT="(",GT=")",jT="([",LT="])",PT=";",YT="()",qT="=",d5=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],XT=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled","filter"],KT=100;let _1=null;function p5(){if(_1!==null)return _1;try{const t=W.createCanvasElement().getContext("2d");return t?!!t&&"filter"in t:(_1=!1,!1)}catch{return _1=!1,!1}}class x1{constructor(t){this.canvas=t,Mt.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,i){let s=this.traceArr,u=s.length,c="",f,p,m,S;for(f=0;f<u;f++)p=s[f],m=p.method,m?(S=p.args,c+=m,t?c+=YT:W._isArray(S[0])?c+=jT+S.join(h5)+LT:(i&&(S=S.map(b=>typeof b=="number"?Math.floor(b):b)),c+=VT+S.join(h5)+GT)):(c+=p.property,t||(c+=qT+p.val)),c+=PT;return c}clearTrace(){this.traceArr=[]}_trace(t){let i=this.traceArr,s;i.push(t),s=i.length,s>=KT&&i.shift()}reset(){const t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){const i=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,i.getWidth()/i.pixelRatio,i.getHeight()/i.pixelRatio)}_applyLineCap(t){const i=t.attrs.lineCap;i&&this.setAttr("lineCap",i)}_applyOpacity(t){const i=t.getAbsoluteOpacity();i!==1&&this.setAttr("globalAlpha",i)}_applyLineJoin(t){const i=t.attrs.lineJoin;i&&this.setAttr("lineJoin",i)}_applyMiterLimit(t){const i=t.attrs.miterLimit;i!=null&&this.setAttr("miterLimit",i)}setAttr(t,i){this._context[t]=i}arc(t,i,s,u,c,f){this._context.arc(t,i,s,u,c,f)}arcTo(t,i,s,u,c){this._context.arcTo(t,i,s,u,c)}beginPath(){this._context.beginPath()}bezierCurveTo(t,i,s,u,c,f){this._context.bezierCurveTo(t,i,s,u,c,f)}clearRect(t,i,s,u){this._context.clearRect(t,i,s,u)}clip(...t){this._context.clip.apply(this._context,t)}closePath(){this._context.closePath()}createImageData(t,i){const s=arguments;if(s.length===2)return this._context.createImageData(t,i);if(s.length===1)return this._context.createImageData(t)}createLinearGradient(t,i,s,u){return this._context.createLinearGradient(t,i,s,u)}createPattern(t,i){return this._context.createPattern(t,i)}createRadialGradient(t,i,s,u,c,f){return this._context.createRadialGradient(t,i,s,u,c,f)}drawImage(t,i,s,u,c,f,p,m,S){const b=arguments,_=this._context;b.length===3?_.drawImage(t,i,s):b.length===5?_.drawImage(t,i,s,u,c):b.length===9&&_.drawImage(t,i,s,u,c,f,p,m,S)}ellipse(t,i,s,u,c,f,p,m){this._context.ellipse(t,i,s,u,c,f,p,m)}isPointInPath(t,i,s,u){return s?this._context.isPointInPath(s,t,i,u):this._context.isPointInPath(t,i,u)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,i,s,u){this._context.fillRect(t,i,s,u)}strokeRect(t,i,s,u){this._context.strokeRect(t,i,s,u)}fillText(t,i,s,u){u?this._context.fillText(t,i,s,u):this._context.fillText(t,i,s)}measureText(t){return this._context.measureText(t)}getImageData(t,i,s,u){return this._context.getImageData(t,i,s,u)}lineTo(t,i){this._context.lineTo(t,i)}moveTo(t,i){this._context.moveTo(t,i)}rect(t,i,s,u){this._context.rect(t,i,s,u)}roundRect(t,i,s,u,c){this._context.roundRect(t,i,s,u,c)}putImageData(t,i,s){this._context.putImageData(t,i,s)}quadraticCurveTo(t,i,s,u){this._context.quadraticCurveTo(t,i,s,u)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,i){this._context.scale(t,i)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,i,s,u,c,f){this._context.setTransform(t,i,s,u,c,f)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,i,s,u){this._context.strokeText(t,i,s,u)}transform(t,i,s,u,c,f){this._context.transform(t,i,s,u,c,f)}translate(t,i){this._context.translate(t,i)}_enableTrace(){let t=this,i=d5.length,s=this.setAttr,u,c;const f=function(p){let m=t[p],S;t[p]=function(){return c=BT(Array.prototype.slice.call(arguments,0)),S=m.apply(t,arguments),t._trace({method:p,args:c}),S}};for(u=0;u<i;u++)f(d5[u]);t.setAttr=function(){s.apply(t,arguments);const p=arguments[0];let m=arguments[1];(p==="shadowOffsetX"||p==="shadowOffsetY"||p==="shadowBlur")&&(m=m/this.canvas.getPixelRatio()),t._trace({property:p,val:m})}}_applyGlobalCompositeOperation(t){const i=t.attrs.globalCompositeOperation;!i||i==="source-over"||this.setAttr("globalCompositeOperation",i)}}XT.forEach(function(n){Object.defineProperty(x1.prototype,n,{get(){return this._context[n]},set(t){this._context[n]=t}})});class QT extends x1{constructor(t,{willReadFrequently:i=!1}={}){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:i})}_fillColor(t){const i=t.fill();this.setAttr("fillStyle",i),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){const i=t._getLinearGradient();i&&(this.setAttr("fillStyle",i),t._fillFunc(this))}_fillRadialGradient(t){const i=t._getRadialGradient();i&&(this.setAttr("fillStyle",i),t._fillFunc(this))}_fill(t){const i=t.fill(),s=t.getFillPriority();if(i&&s==="color"){this._fillColor(t);return}const u=t.getFillPatternImage();if(u&&s==="pattern"){this._fillPattern(t);return}const c=t.getFillLinearGradientColorStops();if(c&&s==="linear-gradient"){this._fillLinearGradient(t);return}const f=t.getFillRadialGradientColorStops();if(f&&s==="radial-gradient"){this._fillRadialGradient(t);return}i?this._fillColor(t):u?this._fillPattern(t):c?this._fillLinearGradient(t):f&&this._fillRadialGradient(t)}_strokeLinearGradient(t){const i=t.getStrokeLinearGradientStartPoint(),s=t.getStrokeLinearGradientEndPoint(),u=t.getStrokeLinearGradientColorStops(),c=this.createLinearGradient(i.x,i.y,s.x,s.y);if(u){for(let f=0;f<u.length;f+=2)c.addColorStop(u[f],u[f+1]);this.setAttr("strokeStyle",c)}}_stroke(t){const i=t.dash(),s=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!s){this.save();const c=this.getCanvas().getPixelRatio();this.setTransform(c,0,0,c,0,0)}this._applyLineCap(t),i&&t.dashEnabled()&&(this.setLineDash(i),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),t.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),s||this.restore()}}_applyShadow(t){var i,s,u;const c=(i=t.getShadowRGBA())!==null&&i!==void 0?i:"black",f=(s=t.getShadowBlur())!==null&&s!==void 0?s:5,p=(u=t.getShadowOffset())!==null&&u!==void 0?u:{x:0,y:0},m=t.getAbsoluteScale(),S=this.canvas.getPixelRatio(),b=m.x*S,_=m.y*S;this.setAttr("shadowColor",c),this.setAttr("shadowBlur",f*Math.min(Math.abs(b),Math.abs(_))),this.setAttr("shadowOffsetX",p.x*b),this.setAttr("shadowOffsetY",p.y*_)}}class ZT extends x1{constructor(t){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:!0})}_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){if(t.hasHitStroke()){const i=t.getStrokeScaleEnabled();if(!i){this.save();const c=this.getCanvas().getPixelRatio();this.setTransform(c,0,0,c,0,0)}this._applyLineCap(t);const s=t.hitStrokeWidth(),u=s==="auto"?t.strokeWidth():s;this.setAttr("lineWidth",u),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),i||this.restore()}}}let D1;function JT(){if(D1)return D1;const n=W.createCanvasElement(),t=n.getContext("2d");return D1=(function(){const i=Mt._global.devicePixelRatio||1,s=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return i/s})(),W.releaseCanvas(n),D1}class b2{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;const s=(t||{}).pixelRatio||Mt.pixelRatio||JT();this.pixelRatio=s,this._canvas=W.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(t){const i=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/i,this.getHeight()/i)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";const i=this.pixelRatio;this.getContext()._context.scale(i,i)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";const i=this.pixelRatio;this.getContext()._context.scale(i,i)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,i){this.setWidth(t||0),this.setHeight(i||0)}toDataURL(t,i){try{return this._canvas.toDataURL(t,i)}catch{try{return this._canvas.toDataURL()}catch(u){return W.error("Unable to get data URL. "+u.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}class Po extends b2{constructor(t={width:0,height:0,willReadFrequently:!1}){super(t),this.context=new QT(this,{willReadFrequently:t.willReadFrequently}),this.setSize(t.width,t.height)}}class E2 extends b2{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new ZT(this),this.setSize(t.width,t.height)}}const ze={get isDragging(){let n=!1;return ze._dragElements.forEach(t=>{t.dragStatus==="dragging"&&(n=!0)}),n},justDragged:!1,get node(){let n;return ze._dragElements.forEach(t=>{n=t.node}),n},_dragElements:new Map,_drag(n){const t=[];ze._dragElements.forEach((i,s)=>{const{node:u}=i,c=u.getStage();c.setPointersPositions(n),i.pointerId===void 0&&(i.pointerId=W._getFirstPointerId(n));const f=c._changedPointerPositions.find(p=>p.id===i.pointerId);if(f){if(i.dragStatus!=="dragging"){const p=u.dragDistance();if(Math.max(Math.abs(f.x-i.startPointerPos.x),Math.abs(f.y-i.startPointerPos.y))<p||(u.startDrag({evt:n}),!u.isDragging()))return}u._setDragPosition(n,i),t.push(u)}}),t.forEach(i=>{i.fire("dragmove",{type:"dragmove",target:i,evt:n},!0)})},_endDragBefore(n){const t=[];ze._dragElements.forEach(i=>{const{node:s}=i,u=s.getStage();if(n&&u.setPointersPositions(n),!u._changedPointerPositions.find(p=>p.id===i.pointerId))return;(i.dragStatus==="dragging"||i.dragStatus==="stopped")&&(ze.justDragged=!0,Mt._mouseListenClick=!1,Mt._touchListenClick=!1,Mt._pointerListenClick=!1,i.dragStatus="stopped");const f=i.node.getLayer()||i.node instanceof Mt.Stage&&i.node;f&&t.indexOf(f)===-1&&t.push(f)}),t.forEach(i=>{i.draw()})},_endDragAfter(n){ze._dragElements.forEach((t,i)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:n},!0),t.dragStatus!=="dragging"&&ze._dragElements.delete(i)})}};Mt.isBrowser&&(window.addEventListener("mouseup",ze._endDragBefore,!0),window.addEventListener("touchend",ze._endDragBefore,!0),window.addEventListener("touchcancel",ze._endDragBefore,!0),window.addEventListener("mousemove",ze._drag),window.addEventListener("touchmove",ze._drag),window.addEventListener("mouseup",ze._endDragAfter,!1),window.addEventListener("touchend",ze._endDragAfter,!1),window.addEventListener("touchcancel",ze._endDragAfter,!1));function Yo(n){return W._isString(n)?'"'+n+'"':Object.prototype.toString.call(n)==="[object Number]"||W._isBoolean(n)?n:Object.prototype.toString.call(n)}function m5(n){return n>255?255:n<0?0:Math.round(n)}function xt(){if(Mt.isUnminified)return function(n,t){return W._isNumber(n)||W.warn(Yo(n)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),n}}function A1(n){if(Mt.isUnminified)return function(t,i){let s=W._isNumber(t),u=W._isArray(t)&&t.length==n;return!s&&!u&&W.warn(Yo(t)+' is a not valid value for "'+i+'" attribute. The value should be a number or Array<number>('+n+")"),t}}function T2(){if(Mt.isUnminified)return function(n,t){return W._isNumber(n)||n==="auto"||W.warn(Yo(n)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),n}}function uc(){if(Mt.isUnminified)return function(n,t){return W._isString(n)||W.warn(Yo(n)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),n}}function g5(){if(Mt.isUnminified)return function(n,t){const i=W._isString(n),s=Object.prototype.toString.call(n)==="[object CanvasGradient]"||n&&n.addColorStop;return i||s||W.warn(Yo(n)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),n}}function FT(){if(Mt.isUnminified)return function(n,t){const i=Int8Array?Object.getPrototypeOf(Int8Array):null;return i&&n instanceof i||(W._isArray(n)?n.forEach(function(s){W._isNumber(s)||W.warn('"'+t+'" attribute has non numeric element '+s+". Make sure that all elements are numbers.")}):W.warn(Yo(n)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),n}}function ul(){if(Mt.isUnminified)return function(n,t){return n===!0||n===!1||W.warn(Yo(n)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),n}}function kT(n){if(Mt.isUnminified)return function(t,i){return t==null||W.isObject(t)||W.warn(Yo(t)+' is a not valid value for "'+i+'" attribute. The value should be an object with properties '+n),t}}const Gp="get",jp="set",V={addGetterSetter(n,t,i,s,u){V.addGetter(n,t,i),V.addSetter(n,t,s,u),V.addOverloadedGetterSetter(n,t)},addGetter(n,t,i){const s=Gp+W._capitalize(t);n.prototype[s]=n.prototype[s]||function(){const u=this.attrs[t];return u===void 0?i:u}},addSetter(n,t,i,s){const u=jp+W._capitalize(t);n.prototype[u]||V.overWriteSetter(n,t,i,s)},overWriteSetter(n,t,i,s){const u=jp+W._capitalize(t);n.prototype[u]=function(c){return i&&c!==void 0&&c!==null&&(c=i.call(this,c,t)),this._setAttr(t,c),s&&s.call(this),this}},addComponentsGetterSetter(n,t,i,s,u){const c=i.length,f=W._capitalize,p=Gp+f(t),m=jp+f(t);n.prototype[p]=function(){const b={};for(let _=0;_<c;_++){const x=i[_];b[x]=this.getAttr(t+f(x))}return b};const S=kT(i);n.prototype[m]=function(b){const _=this.attrs[t];s&&(b=s.call(this,b,t)),S&&S.call(this,b,t);for(const x in b)b.hasOwnProperty(x)&&this._setAttr(t+f(x),b[x]);return b||i.forEach(x=>{this._setAttr(t+f(x),void 0)}),this._fireChangeEvent(t,_,b),u&&u.call(this),this},V.addOverloadedGetterSetter(n,t)},addOverloadedGetterSetter(n,t){const i=W._capitalize(t),s=jp+i,u=Gp+i;n.prototype[t]=function(){return arguments.length?(this[s](arguments[0]),this):this[u]()}},addDeprecatedGetterSetter(n,t,i,s){W.error("Adding deprecated "+t);const u=Gp+W._capitalize(t),c=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";n.prototype[u]=function(){W.error(c);const f=this.attrs[t];return f===void 0?i:f},V.addSetter(n,t,s,function(){W.error(c)}),V.addOverloadedGetterSetter(n,t)},backCompat(n,t){W.each(t,function(i,s){const u=n.prototype[s],c=Gp+W._capitalize(i),f=jp+W._capitalize(i);function p(){u.apply(this,arguments),W.error('"'+i+'" method is deprecated and will be removed soon. Use ""'+s+'" instead.')}n.prototype[i]=p,n.prototype[c]=p,n.prototype[f]=p})},afterSetFilter(){this._filterUpToDate=!1}};function IT(n){const t=/(\w+)\(([^)]+)\)/g;let i;for(;(i=t.exec(n))!==null;){const[,s,u]=i;switch(s){case"blur":{const c=parseFloat(u.replace("px",""));return function(f){this.blurRadius(c*.5);const p=Mt.Filters;p&&p.Blur&&p.Blur.call(this,f)}}case"brightness":{const c=u.includes("%")?parseFloat(u)/100:parseFloat(u);return function(f){this.brightness(c);const p=Mt.Filters;p&&p.Brightness&&p.Brightness.call(this,f)}}case"contrast":{const c=parseFloat(u);return function(f){const p=100*(Math.sqrt(c)-1);this.contrast(p);const m=Mt.Filters;m&&m.Contrast&&m.Contrast.call(this,f)}}case"grayscale":return function(c){const f=Mt.Filters;f&&f.Grayscale&&f.Grayscale.call(this,c)};case"sepia":return function(c){const f=Mt.Filters;f&&f.Sepia&&f.Sepia.call(this,c)};case"invert":return function(c){const f=Mt.Filters;f&&f.Invert&&f.Invert.call(this,c)};default:W.warn(`CSS filter "${s}" is not supported in fallback mode. Consider using function filters for better compatibility.`);break}}return()=>{}}const M1="absoluteOpacity",N1="allEventListeners",wr="absoluteTransform",y5="absoluteScale",cc="canvas",WT="Change",$T="children",tC="konva",C2="listening",eC="mouseenter",nC="mouseleave",aC="pointerenter",iC="pointerleave",sC="touchenter",lC="touchleave",v5="set",S5="Shape",O1=" ",b5="stage",qo="transform",rC="Stage",_2="visible",oC=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(O1);let uC=1,At=class u5{constructor(t){this._id=uC++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===qo||t===wr)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,i){let s=this._cache.get(t);return(s===void 0||(t===qo||t===wr)&&s.dirty===!0)&&(s=i.call(this),this._cache.set(t,s)),s}_calculate(t,i,s){if(!this._attachedDepsListeners.get(t)){const u=i.map(c=>c+"Change.konva").join(O1);this.on(u,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,s)}_getCanvasCache(){return this._cache.get(cc)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===wr&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(cc)){const{scene:t,filter:i,hit:s,buffer:u}=this._cache.get(cc);W.releaseCanvas(t,i,s,u),this._cache.delete(cc)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){const i=t||{};let s={};(i.x===void 0||i.y===void 0||i.width===void 0||i.height===void 0)&&(s=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let u=Math.ceil(i.width||s.width),c=Math.ceil(i.height||s.height),f=i.pixelRatio,p=i.x===void 0?Math.floor(s.x):i.x,m=i.y===void 0?Math.floor(s.y):i.y,S=i.offset||0,b=i.drawBorder||!1,_=i.hitCanvasPixelRatio||1;if(!u||!c){W.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const x=Math.abs(Math.round(s.x)-p)>.5?1:0,D=Math.abs(Math.round(s.y)-m)>.5?1:0;u+=S*2+x,c+=S*2+D,p-=S,m-=S;const A=new Po({pixelRatio:f,width:u,height:c}),N=new Po({pixelRatio:f,width:0,height:0,willReadFrequently:!0}),O=new E2({pixelRatio:_,width:u,height:c}),R=A.getContext(),U=O.getContext(),j=new Po({width:A.width/A.pixelRatio+Math.abs(p),height:A.height/A.pixelRatio+Math.abs(m),pixelRatio:A.pixelRatio}),G=j.getContext();return O.isCache=!0,A.isCache=!0,this._cache.delete(cc),this._filterUpToDate=!1,i.imageSmoothingEnabled===!1&&(A.getContext()._context.imageSmoothingEnabled=!1,N.getContext()._context.imageSmoothingEnabled=!1),R.save(),U.save(),G.save(),R.translate(-p,-m),U.translate(-p,-m),G.translate(-p,-m),j.x=p,j.y=m,this._isUnderCache=!0,this._clearSelfAndDescendantCache(M1),this._clearSelfAndDescendantCache(y5),this.drawScene(A,this,j),this.drawHit(O,this),this._isUnderCache=!1,R.restore(),U.restore(),b&&(R.save(),R.beginPath(),R.rect(0,0,u,c),R.closePath(),R.setAttr("strokeStyle","red"),R.setAttr("lineWidth",5),R.stroke(),R.restore()),this._cache.set(cc,{scene:A,filter:N,hit:O,buffer:j,x:p,y:m}),this._requestDraw(),this}isCached(){return this._cache.has(cc)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,i){const s=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}];let u=1/0,c=1/0,f=-1/0,p=-1/0;const m=this.getAbsoluteTransform(i);return s.forEach(function(S){const b=m.point(S);u===void 0&&(u=f=b.x,c=p=b.y),u=Math.min(u,b.x),c=Math.min(c,b.y),f=Math.max(f,b.x),p=Math.max(p,b.y)}),{x:u,y:c,width:f-u,height:p-c}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const i=this._getCanvasCache();t.translate(i.x,i.y);const s=this._getCachedSceneCanvas(),u=s.pixelRatio;t.drawImage(s._canvas,0,0,s.width/u,s.height/u),t.restore()}_drawCachedHitCanvas(t){const i=this._getCanvasCache(),s=i.hit;t.save(),t.translate(i.x,i.y),t.drawImage(s._canvas,0,0,s.width/s.pixelRatio,s.height/s.pixelRatio),t.restore()}_getCachedSceneCanvas(){let t=this.filters(),i=this._getCanvasCache(),s=i.scene,u=i.filter,c=u.getContext(),f,p,m,S;if(!t||t.length===0)return s;if(this._filterUpToDate)return u;let b=!0;for(let x=0;x<t.length;x++)if(typeof t[x]=="string"&&p5(),typeof t[x]!="string"||!p5()){b=!1;break}const _=s.pixelRatio;if(u.setSize(s.width/s.pixelRatio,s.height/s.pixelRatio),b){const x=t.join(" ");return c.save(),c.setAttr("filter",x),c.drawImage(s._canvas,0,0,s.getWidth()/_,s.getHeight()/_),c.restore(),this._filterUpToDate=!0,u}try{for(f=t.length,c.clear(),c.drawImage(s._canvas,0,0,s.getWidth()/_,s.getHeight()/_),p=c.getImageData(0,0,u.getWidth(),u.getHeight()),m=0;m<f;m++)S=t[m],typeof S=="string"&&(S=IT(S)),S.call(this,p),c.putImageData(p,0,0)}catch(x){W.error("Unable to apply filter. "+x.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}return this._filterUpToDate=!0,u}on(t,i){if(this._cache&&this._cache.delete(N1),arguments.length===3)return this._delegate.apply(this,arguments);const s=t.split(O1);for(let u=0;u<s.length;u++){const f=s[u].split("."),p=f[0],m=f[1]||"";this.eventListeners[p]||(this.eventListeners[p]=[]),this.eventListeners[p].push({name:m,handler:i})}return this}off(t,i){let s=(t||"").split(O1),u=s.length,c,f,p,m,S,b;if(this._cache&&this._cache.delete(N1),!t)for(f in this.eventListeners)this._off(f);for(c=0;c<u;c++)if(p=s[c],m=p.split("."),S=m[0],b=m[1],S)this.eventListeners[S]&&this._off(S,b,i);else for(f in this.eventListeners)this._off(f,b,i);return this}dispatchEvent(t){const i={target:this,type:t.type,evt:t};return this.fire(t.type,i),this}addEventListener(t,i){return this.on(t,function(s){i.call(this,s.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,i,s){const u=this;this.on(t,function(c){const f=c.target.findAncestors(i,!0,u);for(let p=0;p<f.length;p++)c=W.cloneObject(c),c.currentTarget=f[p],s.call(f[p],c)})}remove(){return this.isDragging()&&this.stopDrag(),ze._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(wr),this._clearSelfAndDescendantCache(M1),this._clearSelfAndDescendantCache(y5),this._clearSelfAndDescendantCache(b5),this._clearSelfAndDescendantCache(_2),this._clearSelfAndDescendantCache(C2)}_remove(){this._clearCaches();const t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(t){const i="get"+W._capitalize(t);return W._isFunction(this[i])?this[i]():this.attrs[t]}getAncestors(){let t=this.getParent(),i=[];for(;t;)i.push(t),t=t.getParent();return i}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{let i,s;if(!t)return this;for(i in t)i!==$T&&(s=v5+W._capitalize(i),W._isFunction(this[s])?this[s](t[i]):this._setAttr(i,t[i]))}),this}isListening(){return this._getCache(C2,this._isListening)}_isListening(t){if(!this.listening())return!1;const s=this.getParent();return s&&s!==t&&this!==t?s._isListening(t):!0}isVisible(){return this._getCache(_2,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const s=this.getParent();return s&&s!==t&&this!==t?s._isVisible(t):!0}shouldDrawHit(t,i=!1){if(t)return this._isVisible(t)&&this._isListening(t);const s=this.getLayer();let u=!1;ze._dragElements.forEach(f=>{f.dragStatus==="dragging"&&(f.node.nodeType==="Stage"||f.node.getLayer()===s)&&(u=!0)});const c=!i&&!Mt.hitOnDragEnabled&&(u||Mt.isTransforming());return this.isListening()&&this.isVisible()&&!c}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let t=this.getDepth(),i=this,s=0,u,c,f,p;function m(b){for(u=[],c=b.length,f=0;f<c;f++)p=b[f],s++,p.nodeType!==S5&&(u=u.concat(p.getChildren().slice())),p._id===i._id&&(f=c);u.length>0&&u[0].getDepth()<=t&&m(u)}const S=this.getStage();return i.nodeType!==rC&&S&&m(S.getChildren()),s}getDepth(){let t=0,i=this.parent;for(;i;)t++,i=i.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(qo),this._clearSelfAndDescendantCache(wr)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const t=this.getStage();if(!t)return null;const i=t.getPointerPosition();if(!i)return null;const s=this.getAbsoluteTransform().copy();return s.invert(),s.point(i)}getAbsolutePosition(t){let i=!1,s=this.parent;for(;s;){if(s.isCached()){i=!0;break}s=s.parent}i&&!t&&(t=!0);const u=this.getAbsoluteTransform(t).getMatrix(),c=new Fi,f=this.offset();return c.m=u.slice(),c.translate(f.x,f.y),c.getTranslation()}setAbsolutePosition(t){const{x:i,y:s,...u}=this._clearTransform();this.attrs.x=i,this.attrs.y=s,this._clearCache(qo);const c=this._getAbsoluteTransform().copy();return c.invert(),c.translate(t.x,t.y),t={x:this.attrs.x+c.getTranslation().x,y:this.attrs.y+c.getTranslation().y},this._setTransform(u),this.setPosition({x:t.x,y:t.y}),this._clearCache(qo),this._clearSelfAndDescendantCache(wr),this}_setTransform(t){let i;for(i in t)this.attrs[i]=t[i]}_clearTransform(){const t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){let i=t.x,s=t.y,u=this.x(),c=this.y();return i!==void 0&&(u+=i),s!==void 0&&(c+=s),this.setPosition({x:u,y:c}),this}_eachAncestorReverse(t,i){let s=[],u=this.getParent(),c,f;if(!(i&&i._id===this._id)){for(s.unshift(this);u&&(!i||u._id!==i._id);)s.unshift(u),u=u.parent;for(c=s.length,f=0;f<c;f++)t(s[f])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return W.warn("Node has no parent. moveToTop function is ignored."),!1;const t=this.index,i=this.parent.getChildren().length;return t<i-1?(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return W.warn("Node has no parent. moveUp function is ignored."),!1;const t=this.index,i=this.parent.getChildren().length;return t<i-1?(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return W.warn("Node has no parent. moveDown function is ignored."),!1;const t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return W.warn("Node has no parent. moveToBottom function is ignored."),!1;const t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return W.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&W.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");const i=this.index;return this.parent.children.splice(i,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(M1,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let t=this.opacity();const i=this.getParent();return i&&!i._isUnderCache&&(t*=i.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){let t=this.getAttrs(),i,s,u,c,f;const p={attrs:{},className:this.getClassName()};for(i in t)s=t[i],f=W.isObject(s)&&!W._isPlainObject(s)&&!W._isArray(s),!f&&(u=typeof this[i]=="function"&&this[i],delete t[i],c=u?u.call(this):null,t[i]=s,c!==s&&(p.attrs[i]=s));return W._prepareToStringify(p)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,i,s){const u=[];i&&this._isMatch(t)&&u.push(this);let c=this.parent;for(;c;){if(c===s)return u;c._isMatch(t)&&u.push(c),c=c.parent}return u}isAncestorOf(t){return!1}findAncestor(t,i,s){return this.findAncestors(t,i,s)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);let i=t.replace(/ /g,"").split(","),s=i.length,u,c;for(u=0;u<s;u++)if(c=i[u],W.isValidSelector(c)||(W.warn('Selector "'+c+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),W.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),W.warn("Konva is awesome, right?")),c.charAt(0)==="#"){if(this.id()===c.slice(1))return!0}else if(c.charAt(0)==="."){if(this.hasName(c.slice(1)))return!0}else if(this.className===c||this.nodeType===c)return!0;return!1}getLayer(){const t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(b5,this._getStage)}_getStage(){const t=this.getParent();return t?t.getStage():null}fire(t,i={},s){return i.target=i.target||this,s?this._fireAndBubble(t,i):this._fire(t,i),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(wr,this._getAbsoluteTransform)}_getAbsoluteTransform(t){let i;if(t)return i=new Fi,this._eachAncestorReverse(function(s){const u=s.transformsEnabled();u==="all"?i.multiply(s.getTransform()):u==="position"&&i.translate(s.x()-s.offsetX(),s.y()-s.offsetY())},t),i;{i=this._cache.get(wr)||new Fi,this.parent?this.parent.getAbsoluteTransform().copyInto(i):i.reset();const s=this.transformsEnabled();if(s==="all")i.multiply(this.getTransform());else if(s==="position"){const u=this.attrs.x||0,c=this.attrs.y||0,f=this.attrs.offsetX||0,p=this.attrs.offsetY||0;i.translate(u-f,c-p)}return i.dirty=!1,i}}getAbsoluteScale(t){let i=this;for(;i;)i._isUnderCache&&(t=i),i=i.getParent();const u=this.getAbsoluteTransform(t).decompose();return{x:u.scaleX,y:u.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(qo,this._getTransform)}_getTransform(){var t,i;const s=this._cache.get(qo)||new Fi;s.reset();const u=this.x(),c=this.y(),f=Mt.getAngle(this.rotation()),p=(t=this.attrs.scaleX)!==null&&t!==void 0?t:1,m=(i=this.attrs.scaleY)!==null&&i!==void 0?i:1,S=this.attrs.skewX||0,b=this.attrs.skewY||0,_=this.attrs.offsetX||0,x=this.attrs.offsetY||0;return(u!==0||c!==0)&&s.translate(u,c),f!==0&&s.rotate(f),(S!==0||b!==0)&&s.skew(S,b),(p!==1||m!==1)&&s.scale(p,m),(_!==0||x!==0)&&s.translate(-1*_,-1*x),s.dirty=!1,s}clone(t){let i=W.cloneObject(this.attrs),s,u,c,f,p;for(s in t)i[s]=t[s];const m=new this.constructor(i);for(s in this.eventListeners)for(u=this.eventListeners[s],c=u.length,f=0;f<c;f++)p=u[f],p.name.indexOf(tC)<0&&(m.eventListeners[s]||(m.eventListeners[s]=[]),m.eventListeners[s].push(p));return m}_toKonvaCanvas(t){t=t||{};const i=this.getClientRect(),s=this.getStage(),u=t.x!==void 0?t.x:Math.floor(i.x),c=t.y!==void 0?t.y:Math.floor(i.y),f=t.pixelRatio||1,p=new Po({width:t.width||Math.ceil(i.width)||(s?s.width():0),height:t.height||Math.ceil(i.height)||(s?s.height():0),pixelRatio:f}),m=p.getContext(),S=new Po({width:p.width/p.pixelRatio+Math.abs(u),height:p.height/p.pixelRatio+Math.abs(c),pixelRatio:p.pixelRatio});return t.imageSmoothingEnabled===!1&&(m._context.imageSmoothingEnabled=!1),m.save(),(u||c)&&m.translate(-1*u,-1*c),this.drawScene(p,void 0,S),m.restore(),p}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};const i=t.mimeType||null,s=t.quality||null,u=this._toKonvaCanvas(t).toDataURL(i,s);return t.callback&&t.callback(u),u}toImage(t){return new Promise((i,s)=>{try{const u=t?.callback;u&&delete t.callback,W._urlToImage(this.toDataURL(t),function(c){i(c),u?.(c)})}catch(u){s(u)}})}toBlob(t){return new Promise((i,s)=>{try{const u=t?.callback;u&&delete t.callback,this.toCanvas(t).toBlob(c=>{i(c),u?.(c)},t?.mimeType,t?.quality)}catch(u){s(u)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():Mt.dragDistance}_off(t,i,s){let u=this.eventListeners[t],c,f,p;for(c=0;c<u.length;c++)if(f=u[c].name,p=u[c].handler,(f!=="konva"||i==="konva")&&(!i||f===i)&&(!s||s===p)){if(u.splice(c,1),u.length===0){delete this.eventListeners[t];break}c--}}_fireChangeEvent(t,i,s){this._fire(t+WT,{oldVal:i,newVal:s})}addName(t){if(!this.hasName(t)){const i=this.name(),s=i?i+" "+t:t;this.name(s)}return this}hasName(t){if(!t)return!1;const i=this.name();return i?(i||"").split(/\s/g).indexOf(t)!==-1:!1}removeName(t){const i=(this.name()||"").split(/\s/g),s=i.indexOf(t);return s!==-1&&(i.splice(s,1),this.name(i.join(" "))),this}setAttr(t,i){const s=this[v5+W._capitalize(t)];return W._isFunction(s)?s.call(this,i):this._setAttr(t,i),this}_requestDraw(){if(Mt.autoDrawEnabled){const t=this.getLayer()||this.getStage();t?.batchDraw()}}_setAttr(t,i){const s=this.attrs[t];s===i&&!W.isObject(i)||(i==null?delete this.attrs[t]:this.attrs[t]=i,this._shouldFireChangeEvents&&this._fireChangeEvent(t,s,i),this._requestDraw())}_setComponentAttr(t,i,s){let u;s!==void 0&&(u=this.attrs[t],u||(this.attrs[t]=this.getAttr(t)),this.attrs[t][i]=s,this._fireChangeEvent(t,u,s))}_fireAndBubble(t,i,s){i&&this.nodeType===S5&&(i.target=this);const u=[eC,nC,aC,iC,sC,lC];if(!(u.indexOf(t)!==-1&&(s&&(this===s||this.isAncestorOf&&this.isAncestorOf(s))||this.nodeType==="Stage"&&!s))){this._fire(t,i);const f=u.indexOf(t)!==-1&&s&&s.isAncestorOf&&s.isAncestorOf(this)&&!s.isAncestorOf(this.parent);(i&&!i.cancelBubble||!i)&&this.parent&&this.parent.isListening()&&!f&&(s&&s.parent?this._fireAndBubble.call(this.parent,t,i,s):this._fireAndBubble.call(this.parent,t,i))}}_getProtoListeners(t){var i,s,u;const c=(i=this._cache.get(N1))!==null&&i!==void 0?i:{};let f=c?.[t];if(f===void 0){f=[];let p=Object.getPrototypeOf(this);for(;p;){const m=(u=(s=p.eventListeners)===null||s===void 0?void 0:s[t])!==null&&u!==void 0?u:[];f.push(...m),p=Object.getPrototypeOf(p)}c[t]=f,this._cache.set(N1,c)}return f}_fire(t,i){i=i||{},i.currentTarget=this,i.type=t;const s=this._getProtoListeners(t);if(s)for(let c=0;c<s.length;c++)s[c].handler.call(this,i);const u=this.eventListeners[t];if(u)for(let c=0;c<u.length;c++)u[c].handler.call(this,i)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){const i=t?t.pointerId:void 0,s=this.getStage(),u=this.getAbsolutePosition();if(!s)return;const c=s._getPointerById(i)||s._changedPointerPositions[0]||u;ze._dragElements.set(this._id,{node:this,startPointerPos:c,offset:{x:c.x-u.x,y:c.y-u.y},dragStatus:"ready",pointerId:i})}startDrag(t,i=!0){ze._dragElements.has(this._id)||this._createDragElement(t);const s=ze._dragElements.get(this._id);s.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},i)}_setDragPosition(t,i){const s=this.getStage()._getPointerById(i.pointerId);if(!s)return;let u={x:s.x-i.offset.x,y:s.y-i.offset.y};const c=this.dragBoundFunc();if(c!==void 0){const f=c.call(this,u,t);f?u=f:W.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==u.x||this._lastPos.y!==u.y)&&(this.setAbsolutePosition(u),this._requestDraw()),this._lastPos=u}stopDrag(t){const i=ze._dragElements.get(this._id);i&&(i.dragStatus="stopped"),ze._endDragBefore(t),ze._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=ze._dragElements.get(this._id);return t?t.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){if(!(!(t.evt.button!==void 0)||Mt.dragButtons.indexOf(t.evt.button)>=0)||this.isDragging())return;let u=!1;ze._dragElements.forEach(c=>{this.isAncestorOf(c.node)&&(u=!0)}),u||this._createDragElement(t)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const i=ze._dragElements.get(this._id),s=i&&i.dragStatus==="dragging",u=i&&i.dragStatus==="ready";s?this.stopDrag():u&&ze._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const i=this.getStage();if(!i)return!1;const s={x:-t.x,y:-t.y,width:i.width()+2*t.x,height:i.height()+2*t.y};return W.haveIntersection(s,this.getClientRect())}static create(t,i){return W._isString(t)&&(t=JSON.parse(t)),this._createNode(t,i)}static _createNode(t,i){let s=u5.prototype.getClassName.call(t),u=t.children,c,f,p;i&&(t.attrs.container=i),Mt[s]||(W.warn('Can not find a node with class name "'+s+'". Fallback to "Shape".'),s="Shape");const m=Mt[s];if(c=new m(t.attrs),u)for(f=u.length,p=0;p<f;p++)c.add(u5._createNode(u[p]));return c}};At.prototype.nodeType="Node",At.prototype._attrsAffectingSize=[],At.prototype.eventListeners={},At.prototype.on.call(At.prototype,oC,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(qo),this._clearSelfAndDescendantCache(wr)}),At.prototype.on.call(At.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(_2)}),At.prototype.on.call(At.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(C2)}),At.prototype.on.call(At.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(M1)});const Fe=V.addGetterSetter;Fe(At,"zIndex"),Fe(At,"absolutePosition"),Fe(At,"position"),Fe(At,"x",0,xt()),Fe(At,"y",0,xt()),Fe(At,"globalCompositeOperation","source-over",uc()),Fe(At,"opacity",1,xt()),Fe(At,"name","",uc()),Fe(At,"id","",uc()),Fe(At,"rotation",0,xt()),V.addComponentsGetterSetter(At,"scale",["x","y"]),Fe(At,"scaleX",1,xt()),Fe(At,"scaleY",1,xt()),V.addComponentsGetterSetter(At,"skew",["x","y"]),Fe(At,"skewX",0,xt()),Fe(At,"skewY",0,xt()),V.addComponentsGetterSetter(At,"offset",["x","y"]),Fe(At,"offsetX",0,xt()),Fe(At,"offsetY",0,xt()),Fe(At,"dragDistance",void 0,xt()),Fe(At,"width",0,xt()),Fe(At,"height",0,xt()),Fe(At,"listening",!0,ul()),Fe(At,"preventDefault",!0,ul()),Fe(At,"filters",void 0,function(n){return this._filterUpToDate=!1,n}),Fe(At,"visible",!0,ul()),Fe(At,"transformsEnabled","all",uc()),Fe(At,"size"),Fe(At,"dragBoundFunc"),Fe(At,"draggable",!1,ul()),V.backCompat(At,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});class ki extends At{constructor(){super(...arguments),this.children=[]}getChildren(t){const i=this.children||[];return t?i.filter(t):i}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(t.length===0)return this;if(t.length>1){for(let s=0;s<t.length;s++)this.add(t[s]);return this}const i=t[0];return i.getParent()?(i.moveTo(this),this):(this._validateAdd(i),i.index=this.getChildren().length,i.parent=this,i._clearCaches(),this.getChildren().push(i),this._fire("add",{child:i}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){const i=this._generalFind(t,!0);return i.length>0?i[0]:void 0}_generalFind(t,i){const s=[];return this._descendants(u=>{const c=u._isMatch(t);return c&&s.push(u),!!(c&&i)}),s}_descendants(t){let i=!1;const s=this.getChildren();for(const u of s){if(i=t(u),i)return!0;if(u.hasChildren()&&(i=u._descendants(t),i))return!0}return!1}toObject(){const t=At.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(i=>{t.children.push(i.toObject())}),t}isAncestorOf(t){let i=t.getParent();for(;i;){if(i._id===this._id)return!0;i=i.getParent()}return!1}clone(t){const i=At.prototype.clone.call(this,t);return this.getChildren().forEach(function(s){i.add(s.clone())}),i}getAllIntersections(t){const i=[];return this.find("Shape").forEach(s=>{s.isVisible()&&s.intersects(t)&&i.push(s)}),i}_clearSelfAndDescendantCache(t){var i;super._clearSelfAndDescendantCache(t),!this.isCached()&&((i=this.children)===null||i===void 0||i.forEach(function(s){s._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(i,s){i.index=s}),this._requestDraw()}drawScene(t,i,s){const u=this.getLayer(),c=t||u&&u.getCanvas(),f=c&&c.getContext(),p=this._getCanvasCache(),m=p&&p.scene,S=c&&c.isCache;if(!this.isVisible()&&!S)return this;if(m){f.save();const b=this.getAbsoluteTransform(i).getMatrix();f.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(f),f.restore()}else this._drawChildren("drawScene",c,i,s);return this}drawHit(t,i){if(!this.shouldDrawHit(i))return this;const s=this.getLayer(),u=t||s&&s.hitCanvas,c=u&&u.getContext(),f=this._getCanvasCache();if(f&&f.hit){c.save();const m=this.getAbsoluteTransform(i).getMatrix();c.transform(m[0],m[1],m[2],m[3],m[4],m[5]),this._drawCachedHitCanvas(c),c.restore()}else this._drawChildren("drawHit",u,i);return this}_drawChildren(t,i,s,u){var c;const f=i&&i.getContext(),p=this.clipWidth(),m=this.clipHeight(),S=this.clipFunc(),b=typeof p=="number"&&typeof m=="number"||S,_=s===this;if(b){f.save();const D=this.getAbsoluteTransform(s);let A=D.getMatrix();f.transform(A[0],A[1],A[2],A[3],A[4],A[5]),f.beginPath();let N;if(S)N=S.call(this,f,this);else{const O=this.clipX(),R=this.clipY();f.rect(O||0,R||0,p,m)}f.clip.apply(f,N),A=D.copy().invert().getMatrix(),f.transform(A[0],A[1],A[2],A[3],A[4],A[5])}const x=!_&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";x&&(f.save(),f._applyGlobalCompositeOperation(this)),(c=this.children)===null||c===void 0||c.forEach(function(D){D[t](i,s,u)}),x&&f.restore(),b&&f.restore()}getClientRect(t={}){var i;const s=t.skipTransform,u=t.relativeTo;let c,f,p,m,S={x:1/0,y:1/0,width:0,height:0};const b=this;(i=this.children)===null||i===void 0||i.forEach(function(D){if(!D.visible())return;const A=D.getClientRect({relativeTo:b,skipShadow:t.skipShadow,skipStroke:t.skipStroke});A.width===0&&A.height===0||(c===void 0?(c=A.x,f=A.y,p=A.x+A.width,m=A.y+A.height):(c=Math.min(c,A.x),f=Math.min(f,A.y),p=Math.max(p,A.x+A.width),m=Math.max(m,A.y+A.height)))});const _=this.find("Shape");let x=!1;for(let D=0;D<_.length;D++)if(_[D]._isVisible(this)){x=!0;break}return x&&c!==void 0?S={x:c,y:f,width:p-c,height:m-f}:S={x:0,y:0,width:0,height:0},s?S:this._transformedRect(S,u)}}V.addComponentsGetterSetter(ki,"clip",["x","y","width","height"]),V.addGetterSetter(ki,"clipX",void 0,xt()),V.addGetterSetter(ki,"clipY",void 0,xt()),V.addGetterSetter(ki,"clipWidth",void 0,xt()),V.addGetterSetter(ki,"clipHeight",void 0,xt()),V.addGetterSetter(ki,"clipFunc");const Lp=new Map,E5=Mt._global.PointerEvent!==void 0;function x2(n){return Lp.get(n)}function D2(n){return{evt:n,pointerId:n.pointerId}}function T5(n,t){return Lp.get(n)===t}function C5(n,t){Pp(n),t.getStage()&&(Lp.set(n,t),E5&&t._fire("gotpointercapture",D2(new PointerEvent("gotpointercapture"))))}function Pp(n,t){const i=Lp.get(n);if(!i)return;const s=i.getStage();s&&s.content,Lp.delete(n),E5&&i._fire("lostpointercapture",D2(new PointerEvent("lostpointercapture")))}const cC="Stage",fC="string",_5="px",hC="mouseout",x5="mouseleave",D5="mouseover",A5="mouseenter",M5="mousemove",N5="mousedown",O5="mouseup",Yp="pointermove",qp="pointerdown",th="pointerup",Xp="pointercancel",dC="lostpointercapture",R1="pointerout",Kp="pointerleave",z1="pointerover",H1="pointerenter",A2="contextmenu",R5="touchstart",z5="touchend",H5="touchmove",w5="touchcancel",M2="wheel",pC=5,mC=[[A5,"_pointerenter"],[N5,"_pointerdown"],[M5,"_pointermove"],[O5,"_pointerup"],[x5,"_pointerleave"],[R5,"_pointerdown"],[H5,"_pointermove"],[z5,"_pointerup"],[w5,"_pointercancel"],[D5,"_pointerover"],[M2,"_wheel"],[A2,"_contextmenu"],[qp,"_pointerdown"],[Yp,"_pointermove"],[th,"_pointerup"],[Xp,"_pointercancel"],[Kp,"_pointerleave"],[dC,"_lostpointercapture"]],N2={mouse:{[R1]:hC,[Kp]:x5,[z1]:D5,[H1]:A5,[Yp]:M5,[qp]:N5,[th]:O5,[Xp]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[R1]:"touchout",[Kp]:"touchleave",[z1]:"touchover",[H1]:"touchenter",[Yp]:H5,[qp]:R5,[th]:z5,[Xp]:w5,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[R1]:R1,[Kp]:Kp,[z1]:z1,[H1]:H1,[Yp]:Yp,[qp]:qp,[th]:th,[Xp]:Xp,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},Qp=n=>n.indexOf("pointer")>=0?"pointer":n.indexOf("touch")>=0?"touch":"mouse",eh=n=>{const t=Qp(n);if(t==="pointer")return Mt.pointerEventsEnabled&&N2.pointer;if(t==="touch")return N2.touch;if(t==="mouse")return N2.mouse};function U5(n={}){return(n.clipFunc||n.clipWidth||n.clipHeight)&&W.warn("Stage does not support clipping. Please use clip for Layers or Groups."),n}const gC="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",Zp=[];let w1=class extends ki{constructor(t){super(U5(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),Zp.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{U5(this.attrs)}),this._checkVisibility()}_validateAdd(t){const i=t.getType()==="Layer",s=t.getType()==="FastLayer";i||s||W.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===fC){let i;if(t.charAt(0)==="."){const s=t.slice(1);t=document.getElementsByClassName(s)[0]}else t.charAt(0)!=="#"?i=t:i=t.slice(1),t=document.getElementById(i);if(!t)throw"Can not find container in document with id "+i}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){const t=this.children,i=t.length;for(let s=0;s<i;s++)t[s].clear();return this}clone(t){return t||(t={}),t.container=typeof document<"u"&&document.createElement("div"),ki.prototype.clone.call(this,t)}destroy(){super.destroy();const t=this.content;t&&W._isInDocument(t)&&this.container().removeChild(t);const i=Zp.indexOf(this);return i>-1&&Zp.splice(i,1),W.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(W.warn(gC),null)}_getPointerById(t){return this._pointerPositions.find(i=>i.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t={...t},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();const i=new Po({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),s=i.getContext()._context,u=this.children;return(t.x||t.y)&&s.translate(-1*t.x,-1*t.y),u.forEach(function(c){if(!c.isVisible())return;const f=c._toKonvaCanvas(t);s.drawImage(f._canvas,t.x,t.y,f.getWidth()/f.getPixelRatio(),f.getHeight()/f.getPixelRatio())}),i}getIntersection(t){if(!t)return null;const i=this.children,s=i.length,u=s-1;for(let c=u;c>=0;c--){const f=i[c].getIntersection(t);if(f)return f}return null}_resizeDOM(){const t=this.width(),i=this.height();this.content&&(this.content.style.width=t+_5,this.content.style.height=i+_5),this.bufferCanvas.setSize(t,i),this.bufferHitCanvas.setSize(t,i),this.children.forEach(s=>{s.setSize({width:t,height:i}),s.draw()})}add(t,...i){if(arguments.length>1){for(let u=0;u<arguments.length;u++)this.add(arguments[u]);return this}super.add(t);const s=this.children.length;return s>pC&&W.warn("The stage has "+s+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),Mt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return T5(t,this)}setPointerCapture(t){C5(t,this)}releaseCapture(t){Pp(t)}getLayers(){return this.children}_bindContentEvents(){Mt.isBrowser&&mC.forEach(([t,i])=>{this.content.addEventListener(t,s=>{this[i](s)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const i=eh(t.type);i&&this._fire(i.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const i=eh(t.type);i&&this._fire(i.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let i=this[t+"targetShape"];return i&&!i.getStage()&&(i=null),i}_pointerleave(t){const i=eh(t.type),s=Qp(t.type);if(!i)return;this.setPointersPositions(t);const u=this._getTargetShape(s),c=!(Mt.isDragging()||Mt.isTransforming())||Mt.hitOnDragEnabled;u&&c?(u._fireAndBubble(i.pointerout,{evt:t}),u._fireAndBubble(i.pointerleave,{evt:t}),this._fire(i.pointerleave,{evt:t,target:this,currentTarget:this}),this[s+"targetShape"]=null):c&&(this._fire(i.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(i.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(t){const i=eh(t.type),s=Qp(t.type);if(!i)return;this.setPointersPositions(t);let u=!1;this._changedPointerPositions.forEach(c=>{const f=this.getIntersection(c);if(ze.justDragged=!1,Mt["_"+s+"ListenClick"]=!0,!f||!f.isListening()){this[s+"ClickStartShape"]=void 0;return}Mt.capturePointerEventsEnabled&&f.setPointerCapture(c.id),this[s+"ClickStartShape"]=f,f._fireAndBubble(i.pointerdown,{evt:t,pointerId:c.id}),u=!0;const p=t.type.indexOf("touch")>=0;f.preventDefault()&&t.cancelable&&p&&t.preventDefault()}),u||this._fire(i.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(t){const i=eh(t.type),s=Qp(t.type);if(!i)return;const u=t.type.indexOf("touch")>=0||t.pointerType==="touch";if(Mt.isDragging()&&ze.node.preventDefault()&&t.cancelable&&u&&t.preventDefault(),this.setPointersPositions(t),!(!(Mt.isDragging()||Mt.isTransforming())||Mt.hitOnDragEnabled))return;const f={};let p=!1;const m=this._getTargetShape(s);this._changedPointerPositions.forEach(S=>{const b=x2(S.id)||this.getIntersection(S),_=S.id,x={evt:t,pointerId:_},D=m!==b;if(D&&m&&(m._fireAndBubble(i.pointerout,{...x},b),m._fireAndBubble(i.pointerleave,{...x},b)),b){if(f[b._id])return;f[b._id]=!0}b&&b.isListening()?(p=!0,D&&(b._fireAndBubble(i.pointerover,{...x},m),b._fireAndBubble(i.pointerenter,{...x},m),this[s+"targetShape"]=b),b._fireAndBubble(i.pointermove,{...x})):m&&(this._fire(i.pointerover,{evt:t,target:this,currentTarget:this,pointerId:_}),this[s+"targetShape"]=null)}),p||this._fire(i.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const i=eh(t.type),s=Qp(t.type);if(!i)return;this.setPointersPositions(t);const u=this[s+"ClickStartShape"],c=this[s+"ClickEndShape"],f={};let p=!1;this._changedPointerPositions.forEach(m=>{const S=x2(m.id)||this.getIntersection(m);if(S){if(S.releaseCapture(m.id),f[S._id])return;f[S._id]=!0}const b=m.id,_={evt:t,pointerId:b};let x=!1;Mt["_"+s+"InDblClickWindow"]?(x=!0,clearTimeout(this[s+"DblTimeout"])):ze.justDragged||(Mt["_"+s+"InDblClickWindow"]=!0,clearTimeout(this[s+"DblTimeout"])),this[s+"DblTimeout"]=setTimeout(function(){Mt["_"+s+"InDblClickWindow"]=!1},Mt.dblClickWindow),S&&S.isListening()?(p=!0,this[s+"ClickEndShape"]=S,S._fireAndBubble(i.pointerup,{..._}),Mt["_"+s+"ListenClick"]&&u&&u===S&&(S._fireAndBubble(i.pointerclick,{..._}),x&&c&&c===S&&S._fireAndBubble(i.pointerdblclick,{..._}))):(this[s+"ClickEndShape"]=null,p||(this._fire(i.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),p=!0),Mt["_"+s+"ListenClick"]&&this._fire(i.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:b}),x&&this._fire(i.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:b}))}),p||this._fire(i.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),Mt["_"+s+"ListenClick"]=!1,t.cancelable&&s!=="touch"&&s!=="pointer"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);const i=this.getIntersection(this.getPointerPosition());i&&i.isListening()?i._fireAndBubble(A2,{evt:t}):this._fire(A2,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);const i=this.getIntersection(this.getPointerPosition());i&&i.isListening()?i._fireAndBubble(M2,{evt:t}):this._fire(M2,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const i=x2(t.pointerId)||this.getIntersection(this.getPointerPosition());i&&i._fireAndBubble(th,D2(t)),Pp(t.pointerId)}_lostpointercapture(t){Pp(t.pointerId)}setPointersPositions(t){const i=this._getContentPosition();let s=null,u=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,c=>{this._pointerPositions.push({id:c.identifier,x:(c.clientX-i.left)/i.scaleX,y:(c.clientY-i.top)/i.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,c=>{this._changedPointerPositions.push({id:c.identifier,x:(c.clientX-i.left)/i.scaleX,y:(c.clientY-i.top)/i.scaleY})})):(s=(t.clientX-i.left)/i.scaleX,u=(t.clientY-i.top)/i.scaleY,this.pointerPos={x:s,y:u},this._pointerPositions=[{x:s,y:u,id:W._getFirstPointerId(t)}],this._changedPointerPositions=[{x:s,y:u,id:W._getFirstPointerId(t)}])}_setPointerPosition(t){W.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};const t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new Po({width:this.width(),height:this.height()}),this.bufferHitCanvas=new E2({pixelRatio:1,width:this.width(),height:this.height()}),!Mt.isBrowser)return;const t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}cache(){return W.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}};w1.prototype.nodeType=cC,Cn(w1),V.addGetterSetter(w1,"container"),Mt.isBrowser&&document.addEventListener("visibilitychange",()=>{Zp.forEach(n=>{n.batchDraw()})});const B5="hasShadow",V5="shadowRGBA",G5="patternImage",j5="linearGradient",L5="radialGradient";let U1;function O2(){return U1||(U1=W.createCanvasElement().getContext("2d"),U1)}const Jp={};function yC(n){const t=this.attrs.fillRule;t?n.fill(t):n.fill()}function vC(n){n.stroke()}function SC(n){const t=this.attrs.fillRule;t?n.fill(t):n.fill()}function bC(n){n.stroke()}function EC(){this._clearCache(B5)}function TC(){this._clearCache(V5)}function CC(){this._clearCache(G5)}function _C(){this._clearCache(j5)}function xC(){this._clearCache(L5)}class Tt extends At{constructor(t){super(t);let i,s=0;for(;i=W.getHitColor(),!(i&&!(i in Jp));)if(s++,s>=1e4){W.warn("Failed to find a unique color key for a shape. Konva may work incorrectly. Most likely your browser is using canvas farbling. Consider disabling it."),i=W.getRandomColor();break}this.colorKey=i,Jp[i]=this}getContext(){return W.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return W.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(B5,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(G5,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const i=O2().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(i&&i.setTransform){const s=new Fi;s.translate(this.fillPatternX(),this.fillPatternY()),s.rotate(Mt.getAngle(this.fillPatternRotation())),s.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),s.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const u=s.getMatrix(),c=typeof DOMMatrix>"u"?{a:u[0],b:u[1],c:u[2],d:u[3],e:u[4],f:u[5]}:new DOMMatrix(u);i.setTransform(c)}return i}}_getLinearGradient(){return this._getCache(j5,this.__getLinearGradient)}__getLinearGradient(){const t=this.fillLinearGradientColorStops();if(t){const i=O2(),s=this.fillLinearGradientStartPoint(),u=this.fillLinearGradientEndPoint(),c=i.createLinearGradient(s.x,s.y,u.x,u.y);for(let f=0;f<t.length;f+=2)c.addColorStop(t[f],t[f+1]);return c}}_getRadialGradient(){return this._getCache(L5,this.__getRadialGradient)}__getRadialGradient(){const t=this.fillRadialGradientColorStops();if(t){const i=O2(),s=this.fillRadialGradientStartPoint(),u=this.fillRadialGradientEndPoint(),c=i.createRadialGradient(s.x,s.y,this.fillRadialGradientStartRadius(),u.x,u.y,this.fillRadialGradientEndRadius());for(let f=0;f<t.length;f+=2)c.addColorStop(t[f],t[f+1]);return c}}getShadowRGBA(){return this._getCache(V5,this._getShadowRGBA)}_getShadowRGBA(){if(!this.hasShadow())return;const t=W.colorToRGBA(this.shadowColor());if(t)return"rgba("+t.r+","+t.g+","+t.b+","+t.a*(this.shadowOpacity()||1)+")"}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){const i=this.getStage();if(!i)return!1;const s=i.bufferHitCanvas;return s.getContext().clear(),this.drawHit(s,void 0,!0),s.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data[3]>0}destroy(){return At.prototype.destroy.call(this),delete Jp[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var i;if(!((i=this.attrs.perfectDrawEnabled)!==null&&i!==void 0?i:!0))return!1;const u=t||this.hasFill(),c=this.hasStroke(),f=this.getAbsoluteOpacity()!==1;if(u&&c&&f)return!0;const p=this.hasShadow(),m=this.shadowForStrokeEnabled();return!!(u&&c&&p&&m)}setStrokeHitEnabled(t){W.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){const t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){let i=!1,s=this.getParent();for(;s;){if(s.isCached()){i=!0;break}s=s.getParent()}const u=t.skipTransform,c=t.relativeTo||i&&this.getStage()||void 0,f=this.getSelfRect(),m=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,S=f.width+m,b=f.height+m,_=!t.skipShadow&&this.hasShadow(),x=_?this.shadowOffsetX():0,D=_?this.shadowOffsetY():0,A=S+Math.abs(x),N=b+Math.abs(D),O=_&&this.shadowBlur()||0,R=A+O*2,U=N+O*2,j={width:R,height:U,x:-(m/2+O)+Math.min(x,0)+f.x,y:-(m/2+O)+Math.min(D,0)+f.y};return u?j:this._transformedRect(j,c)}drawScene(t,i,s){const u=this.getLayer(),c=t||u.getCanvas(),f=c.getContext(),p=this._getCanvasCache(),m=this.getSceneFunc(),S=this.hasShadow();let b;const _=i===this;if(!this.isVisible()&&!_)return this;if(p){f.save();const x=this.getAbsoluteTransform(i).getMatrix();return f.transform(x[0],x[1],x[2],x[3],x[4],x[5]),this._drawCachedSceneCanvas(f),f.restore(),this}if(!m)return this;if(f.save(),this._useBufferCanvas()){b=this.getStage();const x=s||b.bufferCanvas,D=x.getContext();D.clear(),D.save(),D._applyLineJoin(this),D._applyMiterLimit(this);const A=this.getAbsoluteTransform(i).getMatrix();D.transform(A[0],A[1],A[2],A[3],A[4],A[5]),m.call(this,D,this),D.restore();const N=x.pixelRatio;S&&f._applyShadow(this),_||(f._applyOpacity(this),f._applyGlobalCompositeOperation(this)),f.drawImage(x._canvas,x.x||0,x.y||0,x.width/N,x.height/N)}else{if(f._applyLineJoin(this),f._applyMiterLimit(this),!_){const x=this.getAbsoluteTransform(i).getMatrix();f.transform(x[0],x[1],x[2],x[3],x[4],x[5]),f._applyOpacity(this),f._applyGlobalCompositeOperation(this)}S&&f._applyShadow(this),m.call(this,f,this)}return f.restore(),this}drawHit(t,i,s=!1){if(!this.shouldDrawHit(i,s))return this;const u=this.getLayer(),c=t||u.hitCanvas,f=c&&c.getContext(),p=this.hitFunc()||this.sceneFunc(),m=this._getCanvasCache(),S=m&&m.hit;if(this.colorKey||W.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),S){f.save();const _=this.getAbsoluteTransform(i).getMatrix();return f.transform(_[0],_[1],_[2],_[3],_[4],_[5]),this._drawCachedHitCanvas(f),f.restore(),this}if(!p)return this;if(f.save(),f._applyLineJoin(this),f._applyMiterLimit(this),!(this===i)){const _=this.getAbsoluteTransform(i).getMatrix();f.transform(_[0],_[1],_[2],_[3],_[4],_[5])}return p.call(this,f,this),f.restore(),this}drawHitFromCache(t=0){const i=this._getCanvasCache(),s=this._getCachedSceneCanvas(),u=i.hit,c=u.getContext(),f=u.getWidth(),p=u.getHeight();c.clear(),c.drawImage(s._canvas,0,0,f,p);try{const m=c.getImageData(0,0,f,p),S=m.data,b=S.length,_=W._hexToRgb(this.colorKey);for(let x=0;x<b;x+=4)S[x+3]>t?(S[x]=_.r,S[x+1]=_.g,S[x+2]=_.b,S[x+3]=255):S[x+3]=0;c.putImageData(m,0,0)}catch(m){W.error("Unable to draw hit graph from cached scene canvas. "+m.message)}return this}hasPointerCapture(t){return T5(t,this)}setPointerCapture(t){C5(t,this)}releaseCapture(t){Pp(t)}}Tt.prototype._fillFunc=yC,Tt.prototype._strokeFunc=vC,Tt.prototype._fillFuncHit=SC,Tt.prototype._strokeFuncHit=bC,Tt.prototype._centroid=!1,Tt.prototype.nodeType="Shape",Cn(Tt),Tt.prototype.eventListeners={},Tt.prototype.on.call(Tt.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",EC),Tt.prototype.on.call(Tt.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",TC),Tt.prototype.on.call(Tt.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",CC),Tt.prototype.on.call(Tt.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",_C),Tt.prototype.on.call(Tt.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",xC),V.addGetterSetter(Tt,"stroke",void 0,g5()),V.addGetterSetter(Tt,"strokeWidth",2,xt()),V.addGetterSetter(Tt,"fillAfterStrokeEnabled",!1),V.addGetterSetter(Tt,"hitStrokeWidth","auto",T2()),V.addGetterSetter(Tt,"strokeHitEnabled",!0,ul()),V.addGetterSetter(Tt,"perfectDrawEnabled",!0,ul()),V.addGetterSetter(Tt,"shadowForStrokeEnabled",!0,ul()),V.addGetterSetter(Tt,"lineJoin"),V.addGetterSetter(Tt,"lineCap"),V.addGetterSetter(Tt,"miterLimit"),V.addGetterSetter(Tt,"sceneFunc"),V.addGetterSetter(Tt,"hitFunc"),V.addGetterSetter(Tt,"dash"),V.addGetterSetter(Tt,"dashOffset",0,xt()),V.addGetterSetter(Tt,"shadowColor",void 0,uc()),V.addGetterSetter(Tt,"shadowBlur",0,xt()),V.addGetterSetter(Tt,"shadowOpacity",1,xt()),V.addComponentsGetterSetter(Tt,"shadowOffset",["x","y"]),V.addGetterSetter(Tt,"shadowOffsetX",0,xt()),V.addGetterSetter(Tt,"shadowOffsetY",0,xt()),V.addGetterSetter(Tt,"fillPatternImage"),V.addGetterSetter(Tt,"fill",void 0,g5()),V.addGetterSetter(Tt,"fillPatternX",0,xt()),V.addGetterSetter(Tt,"fillPatternY",0,xt()),V.addGetterSetter(Tt,"fillLinearGradientColorStops"),V.addGetterSetter(Tt,"strokeLinearGradientColorStops"),V.addGetterSetter(Tt,"fillRadialGradientStartRadius",0),V.addGetterSetter(Tt,"fillRadialGradientEndRadius",0),V.addGetterSetter(Tt,"fillRadialGradientColorStops"),V.addGetterSetter(Tt,"fillPatternRepeat","repeat"),V.addGetterSetter(Tt,"fillEnabled",!0),V.addGetterSetter(Tt,"strokeEnabled",!0),V.addGetterSetter(Tt,"shadowEnabled",!0),V.addGetterSetter(Tt,"dashEnabled",!0),V.addGetterSetter(Tt,"strokeScaleEnabled",!0),V.addGetterSetter(Tt,"fillPriority","color"),V.addComponentsGetterSetter(Tt,"fillPatternOffset",["x","y"]),V.addGetterSetter(Tt,"fillPatternOffsetX",0,xt()),V.addGetterSetter(Tt,"fillPatternOffsetY",0,xt()),V.addComponentsGetterSetter(Tt,"fillPatternScale",["x","y"]),V.addGetterSetter(Tt,"fillPatternScaleX",1,xt()),V.addGetterSetter(Tt,"fillPatternScaleY",1,xt()),V.addComponentsGetterSetter(Tt,"fillLinearGradientStartPoint",["x","y"]),V.addComponentsGetterSetter(Tt,"strokeLinearGradientStartPoint",["x","y"]),V.addGetterSetter(Tt,"fillLinearGradientStartPointX",0),V.addGetterSetter(Tt,"strokeLinearGradientStartPointX",0),V.addGetterSetter(Tt,"fillLinearGradientStartPointY",0),V.addGetterSetter(Tt,"strokeLinearGradientStartPointY",0),V.addComponentsGetterSetter(Tt,"fillLinearGradientEndPoint",["x","y"]),V.addComponentsGetterSetter(Tt,"strokeLinearGradientEndPoint",["x","y"]),V.addGetterSetter(Tt,"fillLinearGradientEndPointX",0),V.addGetterSetter(Tt,"strokeLinearGradientEndPointX",0),V.addGetterSetter(Tt,"fillLinearGradientEndPointY",0),V.addGetterSetter(Tt,"strokeLinearGradientEndPointY",0),V.addComponentsGetterSetter(Tt,"fillRadialGradientStartPoint",["x","y"]),V.addGetterSetter(Tt,"fillRadialGradientStartPointX",0),V.addGetterSetter(Tt,"fillRadialGradientStartPointY",0),V.addComponentsGetterSetter(Tt,"fillRadialGradientEndPoint",["x","y"]),V.addGetterSetter(Tt,"fillRadialGradientEndPointX",0),V.addGetterSetter(Tt,"fillRadialGradientEndPointY",0),V.addGetterSetter(Tt,"fillPatternRotation",0),V.addGetterSetter(Tt,"fillRule",void 0,uc()),V.backCompat(Tt,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});const DC="beforeDraw",AC="draw",P5=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],MC=P5.length;let fc=class extends ki{constructor(t){super(t),this.canvas=new Po,this.hitCanvas=new E2({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);const i=this.getStage();return i&&i.content&&(i.content.removeChild(this.getNativeCanvasElement()),t<i.children.length-1?i.content.insertBefore(this.getNativeCanvasElement(),i.children[t+1].getCanvas()._canvas):i.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){At.prototype.moveToTop.call(this);const t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!At.prototype.moveUp.call(this))return!1;const i=this.getStage();return!i||!i.content?!1:(i.content.removeChild(this.getNativeCanvasElement()),this.index<i.children.length-1?i.content.insertBefore(this.getNativeCanvasElement(),i.children[this.index+1].getCanvas()._canvas):i.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(At.prototype.moveDown.call(this)){const t=this.getStage();if(t){const i=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),i[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(At.prototype.moveToBottom.call(this)){const t=this.getStage();if(t){const i=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),i[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){const t=this.getNativeCanvasElement();return At.prototype.remove.call(this),t&&t.parentNode&&W._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:i}){return this.canvas.setSize(t,i),this.hitCanvas.setSize(t,i),this._setSmoothEnabled(),this}_validateAdd(t){const i=t.getType();i!=="Group"&&i!=="Shape"&&W.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return t={...t},t.width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=t.x!==void 0?t.x:this.x(),t.y=t.y!==void 0?t.y:this.y(),At.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){W.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){W.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,W.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;let i=1,s=!1;for(;;){for(let u=0;u<MC;u++){const c=P5[u],f=this._getIntersection({x:t.x+c.x*i,y:t.y+c.y*i}),p=f.shape;if(p)return p;if(s=!!f.antialiased,!f.antialiased)break}if(s)i+=1;else return null}}_getIntersection(t){const i=this.hitCanvas.pixelRatio,s=this.hitCanvas.context.getImageData(Math.round(t.x*i),Math.round(t.y*i),1,1).data,u=s[3];if(u===255){const c=W.getHitColorKey(s[0],s[1],s[2]),f=Jp[c];return f?{shape:f}:{antialiased:!0}}else if(u>0)return{antialiased:!0};return{}}drawScene(t,i,s){const u=this.getLayer(),c=t||u&&u.getCanvas();return this._fire(DC,{node:this}),this.clearBeforeDraw()&&c.getContext().clear(),ki.prototype.drawScene.call(this,c,i,s),this._fire(AC,{node:this}),this}drawHit(t,i){const s=this.getLayer(),u=t||s&&s.hitCanvas;return s&&s.clearBeforeDraw()&&s.getHitCanvas().getContext().clear(),ki.prototype.drawHit.call(this,u,i),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){W.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return W.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;const t=this.parent;!!this.hitCanvas._canvas.parentNode?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}destroy(){return W.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}};fc.prototype.nodeType="Layer",Cn(fc),V.addGetterSetter(fc,"imageSmoothingEnabled",!0),V.addGetterSetter(fc,"clearBeforeDraw",!0),V.addGetterSetter(fc,"hitGraphEnabled",!0,ul());class R2 extends fc{constructor(t){super(t),this.listening(!1),W.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}R2.prototype.nodeType="FastLayer",Cn(R2);let nh=class extends ki{_validateAdd(t){const i=t.getType();i!=="Group"&&i!=="Shape"&&W.throw("You may only add groups and shapes to groups.")}};nh.prototype.nodeType="Group",Cn(nh);const z2=(function(){return oc.performance&&oc.performance.now?function(){return oc.performance.now()}:function(){return new Date().getTime()}})();class Es{constructor(t,i){this.id=Es.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:z2(),frameRate:0},this.func=t,this.setLayers(i)}setLayers(t){let i=[];return t&&(i=Array.isArray(t)?t:[t]),this.layers=i,this}getLayers(){return this.layers}addLayer(t){const i=this.layers,s=i.length;for(let u=0;u<s;u++)if(i[u]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){const i=Es.animations,s=i.length;for(let u=0;u<s;u++)if(i[u].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=z2(),Es._addAnimation(this),this}stop(){return Es._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.push(t),this._handleAnimation()}static _removeAnimation(t){const i=t.id,s=this.animations,u=s.length;for(let c=0;c<u;c++)if(s[c].id===i){this.animations.splice(c,1);break}}static _runFrames(){const t={},i=this.animations;for(let s=0;s<i.length;s++){const u=i[s],c=u.layers,f=u.func;u._updateFrameObject(z2());const p=c.length;let m;if(f?m=f.call(u,u.frame)!==!1:m=!0,!!m)for(let S=0;S<p;S++){const b=c[S];b._id!==void 0&&(t[b._id]=b)}}for(const s in t)t.hasOwnProperty(s)&&t[s].batchDraw()}static _animationLoop(){const t=Es;t.animations.length?(t._runFrames(),W.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,W.requestAnimFrame(this._animationLoop))}}Es.animations=[],Es.animIdCounter=0,Es.animRunning=!1;const NC={node:1,duration:1,easing:1,onFinish:1,yoyo:1},OC=1,Y5=2,q5=3,X5=["fill","stroke","shadowColor"];let RC=0;class zC{constructor(t,i,s,u,c,f,p){this.prop=t,this.propFunc=i,this.begin=u,this._pos=u,this.duration=f,this._change=0,this.prevPos=0,this.yoyo=p,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=s,this._change=c-this.begin,this.pause()}fire(t){const i=this[t];i&&i()}setTime(t){t>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=Y5,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=q5,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){const t=this.getTimer()-this._startTime;this.state===Y5?this.setTime(t):this.state===q5&&this.setTime(this.duration-t)}pause(){this.state=OC,this.fire("onPause")}getTimer(){return new Date().getTime()}}class ke{constructor(t){const i=this,s=t.node,u=s._id,c=t.easing||Fp.Linear,f=!!t.yoyo;let p,m;typeof t.duration>"u"?p=.3:t.duration===0?p=.001:p=t.duration,this.node=s,this._id=RC++;const S=s.getLayer()||(s instanceof Mt.Stage?s.getLayers():null);S||W.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Es(function(){i.tween.onEnterFrame()},S),this.tween=new zC(m,function(b){i._tweenFunc(b)},c,0,1,p*1e3,f),this._addListeners(),ke.attrs[u]||(ke.attrs[u]={}),ke.attrs[u][this._id]||(ke.attrs[u][this._id]={}),ke.tweens[u]||(ke.tweens[u]={});for(m in t)NC[m]===void 0&&this._addAttr(m,t[m]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,i){const s=this.node,u=s._id;let c,f,p,m,S;const b=ke.tweens[u][t];b&&delete ke.attrs[u][b][t];let _=s.getAttr(t);if(W._isArray(i))if(c=[],f=Math.max(i.length,_.length),t==="points"&&i.length!==_.length&&(i.length>_.length?(m=_,_=W._prepareArrayForTween(_,i,s.closed())):(p=i,i=W._prepareArrayForTween(i,_,s.closed()))),t.indexOf("fill")===0)for(let x=0;x<f;x++)if(x%2===0)c.push(i[x]-_[x]);else{const D=W.colorToRGBA(_[x]);S=W.colorToRGBA(i[x]),_[x]=D,c.push({r:S.r-D.r,g:S.g-D.g,b:S.b-D.b,a:S.a-D.a})}else for(let x=0;x<f;x++)c.push(i[x]-_[x]);else X5.indexOf(t)!==-1?(_=W.colorToRGBA(_),S=W.colorToRGBA(i),c={r:S.r-_.r,g:S.g-_.g,b:S.b-_.b,a:S.a-_.a}):c=i-_;ke.attrs[u][this._id][t]={start:_,diff:c,end:i,trueEnd:p,trueStart:m},ke.tweens[u][t]=this._id}_tweenFunc(t){const i=this.node,s=ke.attrs[i._id][this._id];let u,c,f,p,m,S,b,_;for(u in s){if(c=s[u],f=c.start,p=c.diff,_=c.end,W._isArray(f))if(m=[],b=Math.max(f.length,_.length),u.indexOf("fill")===0)for(S=0;S<b;S++)S%2===0?m.push((f[S]||0)+p[S]*t):m.push("rgba("+Math.round(f[S].r+p[S].r*t)+","+Math.round(f[S].g+p[S].g*t)+","+Math.round(f[S].b+p[S].b*t)+","+(f[S].a+p[S].a*t)+")");else for(S=0;S<b;S++)m.push((f[S]||0)+p[S]*t);else X5.indexOf(u)!==-1?m="rgba("+Math.round(f.r+p.r*t)+","+Math.round(f.g+p.g*t)+","+Math.round(f.b+p.b*t)+","+(f.a+p.a*t)+")":m=f+p*t;i.setAttr(u,m)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{const t=this.node,i=ke.attrs[t._id][this._id];i.points&&i.points.trueEnd&&t.setAttr("points",i.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{const t=this.node,i=ke.attrs[t._id][this._id];i.points&&i.points.trueStart&&t.points(i.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){const t=this.node._id,i=this._id,s=ke.tweens[t];this.pause(),this.anim&&this.anim.stop();for(const u in s)delete ke.tweens[t][u];delete ke.attrs[t][i],ke.tweens[t]&&(Object.keys(ke.tweens[t]).length===0&&delete ke.tweens[t],Object.keys(ke.attrs[t]).length===0&&delete ke.attrs[t])}}ke.attrs={},ke.tweens={},At.prototype.to=function(n){const t=n.onFinish;n.node=this,n.onFinish=function(){this.destroy(),t&&t()},new ke(n).play()};const Fp={BackEaseIn(n,t,i,s){return i*(n/=s)*n*((1.70158+1)*n-1.70158)+t},BackEaseOut(n,t,i,s){return i*((n=n/s-1)*n*((1.70158+1)*n+1.70158)+1)+t},BackEaseInOut(n,t,i,s){let u=1.70158;return(n/=s/2)<1?i/2*(n*n*(((u*=1.525)+1)*n-u))+t:i/2*((n-=2)*n*(((u*=1.525)+1)*n+u)+2)+t},ElasticEaseIn(n,t,i,s,u,c){let f=0;return n===0?t:(n/=s)===1?t+i:(c||(c=s*.3),!u||u<Math.abs(i)?(u=i,f=c/4):f=c/(2*Math.PI)*Math.asin(i/u),-(u*Math.pow(2,10*(n-=1))*Math.sin((n*s-f)*(2*Math.PI)/c))+t)},ElasticEaseOut(n,t,i,s,u,c){let f=0;return n===0?t:(n/=s)===1?t+i:(c||(c=s*.3),!u||u<Math.abs(i)?(u=i,f=c/4):f=c/(2*Math.PI)*Math.asin(i/u),u*Math.pow(2,-10*n)*Math.sin((n*s-f)*(2*Math.PI)/c)+i+t)},ElasticEaseInOut(n,t,i,s,u,c){let f=0;return n===0?t:(n/=s/2)===2?t+i:(c||(c=s*(.3*1.5)),!u||u<Math.abs(i)?(u=i,f=c/4):f=c/(2*Math.PI)*Math.asin(i/u),n<1?-.5*(u*Math.pow(2,10*(n-=1))*Math.sin((n*s-f)*(2*Math.PI)/c))+t:u*Math.pow(2,-10*(n-=1))*Math.sin((n*s-f)*(2*Math.PI)/c)*.5+i+t)},BounceEaseOut(n,t,i,s){return(n/=s)<1/2.75?i*(7.5625*n*n)+t:n<2/2.75?i*(7.5625*(n-=1.5/2.75)*n+.75)+t:n<2.5/2.75?i*(7.5625*(n-=2.25/2.75)*n+.9375)+t:i*(7.5625*(n-=2.625/2.75)*n+.984375)+t},BounceEaseIn(n,t,i,s){return i-Fp.BounceEaseOut(s-n,0,i,s)+t},BounceEaseInOut(n,t,i,s){return n<s/2?Fp.BounceEaseIn(n*2,0,i,s)*.5+t:Fp.BounceEaseOut(n*2-s,0,i,s)*.5+i*.5+t},EaseIn(n,t,i,s){return i*(n/=s)*n+t},EaseOut(n,t,i,s){return-i*(n/=s)*(n-2)+t},EaseInOut(n,t,i,s){return(n/=s/2)<1?i/2*n*n+t:-i/2*(--n*(n-2)-1)+t},StrongEaseIn(n,t,i,s){return i*(n/=s)*n*n*n*n+t},StrongEaseOut(n,t,i,s){return i*((n=n/s-1)*n*n*n*n+1)+t},StrongEaseInOut(n,t,i,s){return(n/=s/2)<1?i/2*n*n*n*n*n+t:i/2*((n-=2)*n*n*n*n+2)+t},Linear(n,t,i,s){return i*n/s+t}},ah=W._assign(Mt,{Util:W,Transform:Fi,Node:At,Container:ki,Stage:w1,stages:Zp,Layer:fc,FastLayer:R2,Group:nh,DD:ze,Shape:Tt,shapes:Jp,Animation:Es,Tween:ke,Easings:Fp,Context:x1,Canvas:b2});class Ur extends Tt{_sceneFunc(t){const i=Mt.getAngle(this.angle()),s=this.clockwise();t.beginPath(),t.arc(0,0,this.outerRadius(),0,i,s),t.arc(0,0,this.innerRadius(),i,0,!s),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}getSelfRect(){const t=this.innerRadius(),i=this.outerRadius(),s=this.clockwise(),u=Mt.getAngle(s?360-this.angle():this.angle()),c=Math.cos(Math.min(u,Math.PI)),f=1,p=Math.sin(Math.min(Math.max(Math.PI,u),3*Math.PI/2)),m=Math.sin(Math.min(u,Math.PI/2)),S=c*(c>0?t:i),b=f*i,_=p*(p>0?t:i),x=m*(m>0?i:t);return{x:S,y:s?-1*x:_,width:b-S,height:x-_}}}Ur.prototype._centroid=!0,Ur.prototype.className="Arc",Ur.prototype._attrsAffectingSize=["innerRadius","outerRadius","angle","clockwise"],Cn(Ur),V.addGetterSetter(Ur,"innerRadius",0,xt()),V.addGetterSetter(Ur,"outerRadius",0,xt()),V.addGetterSetter(Ur,"angle",0,xt()),V.addGetterSetter(Ur,"clockwise",!1,ul());function H2(n,t,i,s,u,c,f){const p=Math.sqrt(Math.pow(i-n,2)+Math.pow(s-t,2)),m=Math.sqrt(Math.pow(u-i,2)+Math.pow(c-s,2)),S=f*p/(p+m),b=f*m/(p+m),_=i-S*(u-n),x=s-S*(c-t),D=i+b*(u-n),A=s+b*(c-t);return[_,x,D,A]}function K5(n,t){const i=n.length,s=[];for(let u=2;u<i-2;u+=2){const c=H2(n[u-2],n[u-1],n[u],n[u+1],n[u+2],n[u+3],t);isNaN(c[0])||(s.push(c[0]),s.push(c[1]),s.push(n[u]),s.push(n[u+1]),s.push(c[2]),s.push(c[3]))}return s}let Br=class extends Tt{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){const i=this.points(),s=i.length,u=this.tension(),c=this.closed(),f=this.bezier();if(!s)return;let p=0;if(t.beginPath(),t.moveTo(i[0],i[1]),u!==0&&s>4){const m=this.getTensionPoints(),S=m.length;for(p=c?0:4,c||t.quadraticCurveTo(m[0],m[1],m[2],m[3]);p<S-2;)t.bezierCurveTo(m[p++],m[p++],m[p++],m[p++],m[p++],m[p++]);c||t.quadraticCurveTo(m[S-2],m[S-1],i[s-2],i[s-1])}else if(f)for(p=2;p<s;)t.bezierCurveTo(i[p++],i[p++],i[p++],i[p++],i[p++],i[p++]);else for(p=2;p<s;p+=2)t.lineTo(i[p],i[p+1]);c?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():K5(this.points(),this.tension())}_getTensionPointsClosed(){const t=this.points(),i=t.length,s=this.tension(),u=H2(t[i-2],t[i-1],t[0],t[1],t[2],t[3],s),c=H2(t[i-4],t[i-3],t[i-2],t[i-1],t[0],t[1],s),f=K5(t,s);return[u[2],u[3]].concat(f).concat([c[0],c[1],t[i-2],t[i-1],c[2],c[3],u[0],u[1],t[0],t[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let t=this.points();if(t.length<4)return{x:t[0]||0,y:t[1]||0,width:0,height:0};this.tension()!==0?t=[t[0],t[1],...this._getTensionPoints(),t[t.length-2],t[t.length-1]]:t=this.points();let i=t[0],s=t[0],u=t[1],c=t[1],f,p;for(let m=0;m<t.length/2;m++)f=t[m*2],p=t[m*2+1],i=Math.min(i,f),s=Math.max(s,f),u=Math.min(u,p),c=Math.max(c,p);return{x:i,y:u,width:s-i,height:c-u}}};Br.prototype.className="Line",Br.prototype._attrsAffectingSize=["points","bezier","tension"],Cn(Br),V.addGetterSetter(Br,"closed",!1),V.addGetterSetter(Br,"bezier",!1),V.addGetterSetter(Br,"tension",0,xt()),V.addGetterSetter(Br,"points",[],FT());const HC=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],wC=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],UC=[[1],[1,1],[1,2,1],[1,3,3,1]],Q5=(n,t,i)=>{let s,u;const f=i/2;s=0;for(let p=0;p<20;p++)u=f*HC[20][p]+f,s+=wC[20][p]*BC(n,t,u);return f*s},Z5=(n,t,i)=>{i===void 0&&(i=1);const s=n[0]-2*n[1]+n[2],u=t[0]-2*t[1]+t[2],c=2*n[1]-2*n[0],f=2*t[1]-2*t[0],p=4*(s*s+u*u),m=4*(s*c+u*f),S=c*c+f*f;if(p===0)return i*Math.sqrt(Math.pow(n[2]-n[0],2)+Math.pow(t[2]-t[0],2));const b=m/(2*p),_=S/p,x=i+b,D=_-b*b,A=x*x+D>0?Math.sqrt(x*x+D):0,N=b*b+D>0?Math.sqrt(b*b+D):0,O=b+Math.sqrt(b*b+D)!==0?D*Math.log(Math.abs((x+A)/(b+N))):0;return Math.sqrt(p)/2*(x*A-b*N+O)};function BC(n,t,i){const s=w2(1,i,n),u=w2(1,i,t),c=s*s+u*u;return Math.sqrt(c)}const w2=(n,t,i)=>{const s=i.length-1;let u,c;if(s===0)return 0;if(n===0){c=0;for(let f=0;f<=s;f++)c+=UC[s][f]*Math.pow(1-t,s-f)*Math.pow(t,f)*i[f];return c}else{u=new Array(s);for(let f=0;f<s;f++)u[f]=s*(i[f+1]-i[f]);return w2(n-1,t,u)}},J5=(n,t,i)=>{let s=1,u=n/t,c=(n-i(u))/t,f=0;for(;s>.001;){const p=i(u+c),m=Math.abs(n-p)/t;if(m<s)s=m,u+=c;else{const S=i(u-c),b=Math.abs(n-S)/t;b<s?(s=b,u-=c):c/=2}if(f++,f>500)break}return u};let Ts=class Ji extends Tt{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=Ji.parsePathData(this.data()),this.pathLength=Ji.getPathLength(this.dataArray)}_sceneFunc(t){const i=this.dataArray;t.beginPath();let s=!1;for(let u=0;u<i.length;u++){const c=i[u].command,f=i[u].points;switch(c){case"L":t.lineTo(f[0],f[1]);break;case"M":t.moveTo(f[0],f[1]);break;case"C":t.bezierCurveTo(f[0],f[1],f[2],f[3],f[4],f[5]);break;case"Q":t.quadraticCurveTo(f[0],f[1],f[2],f[3]);break;case"A":const p=f[0],m=f[1],S=f[2],b=f[3],_=f[4],x=f[5],D=f[6],A=f[7],N=S>b?S:b,O=S>b?1:S/b,R=S>b?b/S:1;t.translate(p,m),t.rotate(D),t.scale(O,R),t.arc(0,0,N,_,_+x,1-A),t.scale(1/O,1/R),t.rotate(-D),t.translate(-p,-m);break;case"z":s=!0,t.closePath();break}}!s&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){let t=[];this.dataArray.forEach(function(m){if(m.command==="A"){const S=m.points[4],b=m.points[5],_=m.points[4]+b;let x=Math.PI/180;if(Math.abs(S-_)<x&&(x=Math.abs(S-_)),b<0)for(let D=S-x;D>_;D-=x){const A=Ji.getPointOnEllipticalArc(m.points[0],m.points[1],m.points[2],m.points[3],D,0);t.push(A.x,A.y)}else for(let D=S+x;D<_;D+=x){const A=Ji.getPointOnEllipticalArc(m.points[0],m.points[1],m.points[2],m.points[3],D,0);t.push(A.x,A.y)}}else if(m.command==="C")for(let S=0;S<=1;S+=.01){const b=Ji.getPointOnCubicBezier(S,m.start.x,m.start.y,m.points[0],m.points[1],m.points[2],m.points[3],m.points[4],m.points[5]);t.push(b.x,b.y)}else t=t.concat(m.points)});let i=t[0],s=t[0],u=t[1],c=t[1],f,p;for(let m=0;m<t.length/2;m++)f=t[m*2],p=t[m*2+1],isNaN(f)||(i=Math.min(i,f),s=Math.max(s,f)),isNaN(p)||(u=Math.min(u,p),c=Math.max(c,p));return{x:i,y:u,width:s-i,height:c-u}}getLength(){return this.pathLength}getPointAtLength(t){return Ji.getPointAtLengthOfDataArray(t,this.dataArray)}static getLineLength(t,i,s,u){return Math.sqrt((s-t)*(s-t)+(u-i)*(u-i))}static getPathLength(t){let i=0;for(let s=0;s<t.length;++s)i+=t[s].pathLength;return i}static getPointAtLengthOfDataArray(t,i){let s,u=0,c=i.length;if(!c)return null;for(;u<c&&t>i[u].pathLength;)t-=i[u].pathLength,++u;if(u===c)return s=i[u-1].points.slice(-2),{x:s[0],y:s[1]};if(t<.01)return i[u].command==="M"?(s=i[u].points.slice(0,2),{x:s[0],y:s[1]}):{x:i[u].start.x,y:i[u].start.y};const f=i[u],p=f.points;switch(f.command){case"L":return Ji.getPointOnLine(t,f.start.x,f.start.y,p[0],p[1]);case"C":return Ji.getPointOnCubicBezier(J5(t,Ji.getPathLength(i),N=>Q5([f.start.x,p[0],p[2],p[4]],[f.start.y,p[1],p[3],p[5]],N)),f.start.x,f.start.y,p[0],p[1],p[2],p[3],p[4],p[5]);case"Q":return Ji.getPointOnQuadraticBezier(J5(t,Ji.getPathLength(i),N=>Z5([f.start.x,p[0],p[2]],[f.start.y,p[1],p[3]],N)),f.start.x,f.start.y,p[0],p[1],p[2],p[3]);case"A":const m=p[0],S=p[1],b=p[2],_=p[3],x=p[5],D=p[6];let A=p[4];return A+=x*t/f.pathLength,Ji.getPointOnEllipticalArc(m,S,b,_,A,D)}return null}static getPointOnLine(t,i,s,u,c,f,p){f=f??i,p=p??s;const m=this.getLineLength(i,s,u,c);if(m<1e-10)return{x:i,y:s};if(u===i)return{x:f,y:p+(c>s?t:-t)};const S=(c-s)/(u-i),b=Math.sqrt(t*t/(1+S*S))*(u<i?-1:1),_=S*b;if(Math.abs(p-s-S*(f-i))<1e-10)return{x:f+b,y:p+_};const x=((f-i)*(u-i)+(p-s)*(c-s))/(m*m),D=i+x*(u-i),A=s+x*(c-s),N=this.getLineLength(f,p,D,A),O=Math.sqrt(t*t-N*N),R=Math.sqrt(O*O/(1+S*S))*(u<i?-1:1),U=S*R;return{x:D+R,y:A+U}}static getPointOnCubicBezier(t,i,s,u,c,f,p,m,S){function b(O){return O*O*O}function _(O){return 3*O*O*(1-O)}function x(O){return 3*O*(1-O)*(1-O)}function D(O){return(1-O)*(1-O)*(1-O)}const A=m*b(t)+f*_(t)+u*x(t)+i*D(t),N=S*b(t)+p*_(t)+c*x(t)+s*D(t);return{x:A,y:N}}static getPointOnQuadraticBezier(t,i,s,u,c,f,p){function m(D){return D*D}function S(D){return 2*D*(1-D)}function b(D){return(1-D)*(1-D)}const _=f*m(t)+u*S(t)+i*b(t),x=p*m(t)+c*S(t)+s*b(t);return{x:_,y:x}}static getPointOnEllipticalArc(t,i,s,u,c,f){const p=Math.cos(f),m=Math.sin(f),S={x:s*Math.cos(c),y:u*Math.sin(c)};return{x:t+(S.x*p-S.y*m),y:i+(S.x*m+S.y*p)}}static parsePathData(t){if(!t)return[];let i=t;const s=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];i=i.replace(new RegExp(" ","g"),",");for(let _=0;_<s.length;_++)i=i.replace(new RegExp(s[_],"g"),"|"+s[_]);const u=i.split("|"),c=[],f=[];let p=0,m=0;const S=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;let b;for(let _=1;_<u.length;_++){let x=u[_],D=x.charAt(0);for(x=x.slice(1),f.length=0;b=S.exec(x);)f.push(b[0]);let A=[],N=D==="A"||D==="a"?0:-1;for(let O=0,R=f.length;O<R;O++){const U=f[O];if(U==="00"){A.push(0,0),N>=0&&(N+=2,N>=7&&(N-=7));continue}if(N>=0){if(N===3){if(/^[01]{2}\d+(?:\.\d+)?$/.test(U)){A.push(parseInt(U[0],10)),A.push(parseInt(U[1],10)),A.push(parseFloat(U.slice(2))),N+=3,N>=7&&(N-=7);continue}if(U==="11"||U==="10"||U==="01"){A.push(parseInt(U[0],10)),A.push(parseInt(U[1],10)),N+=2,N>=7&&(N-=7);continue}if(U==="0"||U==="1"){A.push(parseInt(U,10)),N+=1,N>=7&&(N-=7);continue}}else if(N===4){if(/^[01]\d+(?:\.\d+)?$/.test(U)){A.push(parseInt(U[0],10)),A.push(parseFloat(U.slice(1))),N+=2,N>=7&&(N-=7);continue}if(U==="0"||U==="1"){A.push(parseInt(U,10)),N+=1,N>=7&&(N-=7);continue}}const j=parseFloat(U);isNaN(j)?A.push(0):A.push(j),N+=1,N>=7&&(N-=7)}else{const j=parseFloat(U);isNaN(j)?A.push(0):A.push(j)}}for(;A.length>0&&!isNaN(A[0]);){let O="",R=[];const U=p,j=m;let G,k,et,ft,I,it,J,St,nt,ht;switch(D){case"l":p+=A.shift(),m+=A.shift(),O="L",R.push(p,m);break;case"L":p=A.shift(),m=A.shift(),R.push(p,m);break;case"m":const yt=A.shift(),tt=A.shift();if(p+=yt,m+=tt,O="M",c.length>2&&c[c.length-1].command==="z"){for(let H=c.length-2;H>=0;H--)if(c[H].command==="M"){p=c[H].points[0]+yt,m=c[H].points[1]+tt;break}}R.push(p,m),D="l";break;case"M":p=A.shift(),m=A.shift(),O="M",R.push(p,m),D="L";break;case"h":p+=A.shift(),O="L",R.push(p,m);break;case"H":p=A.shift(),O="L",R.push(p,m);break;case"v":m+=A.shift(),O="L",R.push(p,m);break;case"V":m=A.shift(),O="L",R.push(p,m);break;case"C":R.push(A.shift(),A.shift(),A.shift(),A.shift()),p=A.shift(),m=A.shift(),R.push(p,m);break;case"c":R.push(p+A.shift(),m+A.shift(),p+A.shift(),m+A.shift()),p+=A.shift(),m+=A.shift(),O="C",R.push(p,m);break;case"S":k=p,et=m,G=c[c.length-1],G.command==="C"&&(k=p+(p-G.points[2]),et=m+(m-G.points[3])),R.push(k,et,A.shift(),A.shift()),p=A.shift(),m=A.shift(),O="C",R.push(p,m);break;case"s":k=p,et=m,G=c[c.length-1],G.command==="C"&&(k=p+(p-G.points[2]),et=m+(m-G.points[3])),R.push(k,et,p+A.shift(),m+A.shift()),p+=A.shift(),m+=A.shift(),O="C",R.push(p,m);break;case"Q":R.push(A.shift(),A.shift()),p=A.shift(),m=A.shift(),R.push(p,m);break;case"q":R.push(p+A.shift(),m+A.shift()),p+=A.shift(),m+=A.shift(),O="Q",R.push(p,m);break;case"T":k=p,et=m,G=c[c.length-1],G.command==="Q"&&(k=p+(p-G.points[0]),et=m+(m-G.points[1])),p=A.shift(),m=A.shift(),O="Q",R.push(k,et,p,m);break;case"t":k=p,et=m,G=c[c.length-1],G.command==="Q"&&(k=p+(p-G.points[0]),et=m+(m-G.points[1])),p+=A.shift(),m+=A.shift(),O="Q",R.push(k,et,p,m);break;case"A":ft=A.shift(),I=A.shift(),it=A.shift(),J=A.shift(),St=A.shift(),nt=p,ht=m,p=A.shift(),m=A.shift(),O="A",R=this.convertEndpointToCenterParameterization(nt,ht,p,m,J,St,ft,I,it);break;case"a":ft=A.shift(),I=A.shift(),it=A.shift(),J=A.shift(),St=A.shift(),nt=p,ht=m,p+=A.shift(),m+=A.shift(),O="A",R=this.convertEndpointToCenterParameterization(nt,ht,p,m,J,St,ft,I,it);break}c.push({command:O||D,points:R,start:{x:U,y:j},pathLength:this.calcLength(U,j,O||D,R)})}(D==="z"||D==="Z")&&c.push({command:"z",points:[],start:void 0,pathLength:0})}return c}static calcLength(t,i,s,u){let c,f,p,m;const S=Ji;switch(s){case"L":return S.getLineLength(t,i,u[0],u[1]);case"C":return Q5([t,u[0],u[2],u[4]],[i,u[1],u[3],u[5]],1);case"Q":return Z5([t,u[0],u[2]],[i,u[1],u[3]],1);case"A":c=0;const b=u[4],_=u[5],x=u[4]+_;let D=Math.PI/180;if(Math.abs(b-x)<D&&(D=Math.abs(b-x)),f=S.getPointOnEllipticalArc(u[0],u[1],u[2],u[3],b,0),_<0)for(m=b-D;m>x;m-=D)p=S.getPointOnEllipticalArc(u[0],u[1],u[2],u[3],m,0),c+=S.getLineLength(f.x,f.y,p.x,p.y),f=p;else for(m=b+D;m<x;m+=D)p=S.getPointOnEllipticalArc(u[0],u[1],u[2],u[3],m,0),c+=S.getLineLength(f.x,f.y,p.x,p.y),f=p;return p=S.getPointOnEllipticalArc(u[0],u[1],u[2],u[3],x,0),c+=S.getLineLength(f.x,f.y,p.x,p.y),c}return 0}static convertEndpointToCenterParameterization(t,i,s,u,c,f,p,m,S){const b=S*(Math.PI/180),_=Math.cos(b)*(t-s)/2+Math.sin(b)*(i-u)/2,x=-1*Math.sin(b)*(t-s)/2+Math.cos(b)*(i-u)/2,D=_*_/(p*p)+x*x/(m*m);D>1&&(p*=Math.sqrt(D),m*=Math.sqrt(D));let A=Math.sqrt((p*p*(m*m)-p*p*(x*x)-m*m*(_*_))/(p*p*(x*x)+m*m*(_*_)));c===f&&(A*=-1),isNaN(A)&&(A=0);const N=A*p*x/m,O=A*-m*_/p,R=(t+s)/2+Math.cos(b)*N-Math.sin(b)*O,U=(i+u)/2+Math.sin(b)*N+Math.cos(b)*O,j=function(J){return Math.sqrt(J[0]*J[0]+J[1]*J[1])},G=function(J,St){return(J[0]*St[0]+J[1]*St[1])/(j(J)*j(St))},k=function(J,St){return(J[0]*St[1]<J[1]*St[0]?-1:1)*Math.acos(G(J,St))},et=k([1,0],[(_-N)/p,(x-O)/m]),ft=[(_-N)/p,(x-O)/m],I=[(-1*_-N)/p,(-1*x-O)/m];let it=k(ft,I);return G(ft,I)<=-1&&(it=Math.PI),G(ft,I)>=1&&(it=0),f===0&&it>0&&(it=it-2*Math.PI),f===1&&it<0&&(it=it+2*Math.PI),[R,U,p,m,et,it,b,f]}};Ts.prototype.className="Path",Ts.prototype._attrsAffectingSize=["data"],Cn(Ts),V.addGetterSetter(Ts,"data");class hc extends Br{_sceneFunc(t){super._sceneFunc(t);const i=Math.PI*2,s=this.points();let u=s;const c=this.tension()!==0&&s.length>4;c&&(u=this.getTensionPoints());const f=this.pointerLength(),p=s.length;let m,S;if(c){const x=[u[u.length-4],u[u.length-3],u[u.length-2],u[u.length-1],s[p-2],s[p-1]],D=Ts.calcLength(u[u.length-4],u[u.length-3],"C",x),A=Ts.getPointOnQuadraticBezier(Math.min(1,1-f/D),x[0],x[1],x[2],x[3],x[4],x[5]);m=s[p-2]-A.x,S=s[p-1]-A.y}else m=s[p-2]-s[p-4],S=s[p-1]-s[p-3];const b=(Math.atan2(S,m)+i)%i,_=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(s[p-2],s[p-1]),t.rotate(b),t.moveTo(0,0),t.lineTo(-f,_/2),t.lineTo(-f,-_/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(s[0],s[1]),c?(m=(u[0]+u[2])/2-s[0],S=(u[1]+u[3])/2-s[1]):(m=s[2]-s[0],S=s[3]-s[1]),t.rotate((Math.atan2(-S,-m)+i)%i),t.moveTo(0,0),t.lineTo(-f,_/2),t.lineTo(-f,-_/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){const i=this.dashEnabled();i&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),i&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),i=this.pointerWidth()/2;return{x:t.x,y:t.y-i,width:t.width,height:t.height+i*2}}}hc.prototype.className="Arrow",Cn(hc),V.addGetterSetter(hc,"pointerLength",10,xt()),V.addGetterSetter(hc,"pointerWidth",10,xt()),V.addGetterSetter(hc,"pointerAtBeginning",!1),V.addGetterSetter(hc,"pointerAtEnding",!0);let ih=class extends Tt{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}};ih.prototype._centroid=!0,ih.prototype.className="Circle",ih.prototype._attrsAffectingSize=["radius"],Cn(ih),V.addGetterSetter(ih,"radius",0,xt());class Xo extends Tt{_sceneFunc(t){const i=this.radiusX(),s=this.radiusY();t.beginPath(),t.save(),i!==s&&t.scale(1,s/i),t.arc(0,0,i,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Xo.prototype.className="Ellipse",Xo.prototype._centroid=!0,Xo.prototype._attrsAffectingSize=["radiusX","radiusY"],Cn(Xo),V.addComponentsGetterSetter(Xo,"radius",["x","y"]),V.addGetterSetter(Xo,"radiusX",0,xt()),V.addGetterSetter(Xo,"radiusY",0,xt());let cl=class yT extends Tt{constructor(t){super(t),this._loadListener=()=>{this._requestDraw()},this.on("imageChange.konva",i=>{this._removeImageLoad(i.oldVal),this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",this._loadListener)}_removeImageLoad(t){t&&t.removeEventListener&&t.removeEventListener("load",this._loadListener)}destroy(){return this._removeImageLoad(this.image()),super.destroy(),this}_useBufferCanvas(){const t=!!this.cornerRadius(),i=this.hasShadow();return t&&i?!0:super._useBufferCanvas(!0)}_sceneFunc(t){const i=this.getWidth(),s=this.getHeight(),u=this.cornerRadius(),c=this.attrs.image;let f;if(c){const p=this.attrs.cropWidth,m=this.attrs.cropHeight;p&&m?f=[c,this.cropX(),this.cropY(),p,m,0,0,i,s]:f=[c,0,0,i,s]}(this.hasFill()||this.hasStroke()||u)&&(t.beginPath(),u?W.drawRoundedRectPath(t,i,s,u):t.rect(0,0,i,s),t.closePath(),t.fillStrokeShape(this)),c&&(u&&t.clip(),t.drawImage.apply(t,f))}_hitFunc(t){const i=this.width(),s=this.height(),u=this.cornerRadius();t.beginPath(),u?W.drawRoundedRectPath(t,i,s,u):t.rect(0,0,i,s),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,i,s;return(s=(t=this.attrs.width)!==null&&t!==void 0?t:(i=this.image())===null||i===void 0?void 0:i.width)!==null&&s!==void 0?s:0}getHeight(){var t,i,s;return(s=(t=this.attrs.height)!==null&&t!==void 0?t:(i=this.image())===null||i===void 0?void 0:i.height)!==null&&s!==void 0?s:0}static fromURL(t,i,s=null){const u=W.createImageElement();u.onload=function(){const c=new yT({image:u});i(c)},u.onerror=s,u.crossOrigin="Anonymous",u.src=t}};cl.prototype.className="Image",cl.prototype._attrsAffectingSize=["image"],Cn(cl),V.addGetterSetter(cl,"cornerRadius",0,A1(4)),V.addGetterSetter(cl,"image"),V.addComponentsGetterSetter(cl,"crop",["x","y","width","height"]),V.addGetterSetter(cl,"cropX",0,xt()),V.addGetterSetter(cl,"cropY",0,xt()),V.addGetterSetter(cl,"cropWidth",0,xt()),V.addGetterSetter(cl,"cropHeight",0,xt());const F5=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],VC="Change.konva",GC="none",U2="up",B2="right",V2="down",G2="left",jC=F5.length;let j2=class extends nh{constructor(t){super(t),this.on("add.konva",function(i){this._addListeners(i.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){let i=this,s;const u=function(){i._sync()};for(s=0;s<jC;s++)t.on(F5[s]+VC,u)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let t=this.getText(),i=this.getTag(),s,u,c,f,p,m,S;if(t&&i){switch(s=t.width(),u=t.height(),c=i.pointerDirection(),f=i.pointerWidth(),S=i.pointerHeight(),p=0,m=0,c){case U2:p=s/2,m=-1*S;break;case B2:p=s+f,m=u/2;break;case V2:p=s/2,m=u+S;break;case G2:p=-1*f,m=u/2;break}i.setAttrs({x:-1*p,y:-1*m,width:s,height:u}),t.setAttrs({x:-1*p,y:-1*m})}}};j2.prototype.className="Label",Cn(j2);class dc extends Tt{_sceneFunc(t){const i=this.width(),s=this.height(),u=this.pointerDirection(),c=this.pointerWidth(),f=this.pointerHeight(),p=this.cornerRadius();let m=0,S=0,b=0,_=0;typeof p=="number"?m=S=b=_=Math.min(p,i/2,s/2):(m=Math.min(p[0]||0,i/2,s/2),S=Math.min(p[1]||0,i/2,s/2),_=Math.min(p[2]||0,i/2,s/2),b=Math.min(p[3]||0,i/2,s/2)),t.beginPath(),t.moveTo(m,0),u===U2&&(t.lineTo((i-c)/2,0),t.lineTo(i/2,-1*f),t.lineTo((i+c)/2,0)),t.lineTo(i-S,0),t.arc(i-S,S,S,Math.PI*3/2,0,!1),u===B2&&(t.lineTo(i,(s-f)/2),t.lineTo(i+c,s/2),t.lineTo(i,(s+f)/2)),t.lineTo(i,s-_),t.arc(i-_,s-_,_,0,Math.PI/2,!1),u===V2&&(t.lineTo((i+c)/2,s),t.lineTo(i/2,s+f),t.lineTo((i-c)/2,s)),t.lineTo(b,s),t.arc(b,s-b,b,Math.PI/2,Math.PI,!1),u===G2&&(t.lineTo(0,(s+f)/2),t.lineTo(-1*c,s/2),t.lineTo(0,(s-f)/2)),t.lineTo(0,m),t.arc(m,m,m,Math.PI,Math.PI*3/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){let t=0,i=0,s=this.pointerWidth(),u=this.pointerHeight(),c=this.pointerDirection(),f=this.width(),p=this.height();return c===U2?(i-=u,p+=u):c===V2?p+=u:c===G2?(t-=s*1.5,f+=s):c===B2&&(f+=s*1.5),{x:t,y:i,width:f,height:p}}}dc.prototype.className="Tag",Cn(dc),V.addGetterSetter(dc,"pointerDirection",GC),V.addGetterSetter(dc,"pointerWidth",0,xt()),V.addGetterSetter(dc,"pointerHeight",0,xt()),V.addGetterSetter(dc,"cornerRadius",0,A1(4));let kp=class extends Tt{_sceneFunc(t){const i=this.cornerRadius(),s=this.width(),u=this.height();t.beginPath(),i?W.drawRoundedRectPath(t,s,u,i):t.rect(0,0,s,u),t.closePath(),t.fillStrokeShape(this)}};kp.prototype.className="Rect",Cn(kp),V.addGetterSetter(kp,"cornerRadius",0,A1(4));class Ko extends Tt{_sceneFunc(t){const i=this._getPoints(),s=this.radius(),u=this.sides(),c=this.cornerRadius();if(t.beginPath(),c)W.drawRoundedPolygonPath(t,i,u,s,c);else{t.moveTo(i[0].x,i[0].y);for(let f=1;f<i.length;f++)t.lineTo(i[f].x,i[f].y)}t.closePath(),t.fillStrokeShape(this)}_getPoints(){const t=this.attrs.sides,i=this.attrs.radius||0,s=[];for(let u=0;u<t;u++)s.push({x:i*Math.sin(u*2*Math.PI/t),y:-1*i*Math.cos(u*2*Math.PI/t)});return s}getSelfRect(){const t=this._getPoints();let i=t[0].x,s=t[0].x,u=t[0].y,c=t[0].y;return t.forEach(f=>{i=Math.min(i,f.x),s=Math.max(s,f.x),u=Math.min(u,f.y),c=Math.max(c,f.y)}),{x:i,y:u,width:s-i,height:c-u}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Ko.prototype.className="RegularPolygon",Ko.prototype._centroid=!0,Ko.prototype._attrsAffectingSize=["radius"],Cn(Ko),V.addGetterSetter(Ko,"radius",0,xt()),V.addGetterSetter(Ko,"sides",0,xt()),V.addGetterSetter(Ko,"cornerRadius",0,A1(4));const k5=Math.PI*2;class pc extends Tt{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,k5,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),k5,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}pc.prototype.className="Ring",pc.prototype._centroid=!0,pc.prototype._attrsAffectingSize=["innerRadius","outerRadius"],Cn(pc),V.addGetterSetter(pc,"innerRadius",0,xt()),V.addGetterSetter(pc,"outerRadius",0,xt());class kl extends Tt{constructor(t){super(t),this._updated=!0,this.anim=new Es(()=>{const i=this._updated;return this._updated=!1,i}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){const i=this.animation(),s=this.frameIndex(),u=s*4,c=this.animations()[i],f=this.frameOffsets(),p=c[u+0],m=c[u+1],S=c[u+2],b=c[u+3],_=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,S,b),t.closePath(),t.fillStrokeShape(this)),_)if(f){const x=f[i],D=s*2;t.drawImage(_,p,m,S,b,x[D+0],x[D+1],S,b)}else t.drawImage(_,p,m,S,b,0,0,S,b)}_hitFunc(t){const i=this.animation(),s=this.frameIndex(),u=s*4,c=this.animations()[i],f=this.frameOffsets(),p=c[u+2],m=c[u+3];if(t.beginPath(),f){const S=f[i],b=s*2;t.rect(S[b+0],S[b+1],p,m)}else t.rect(0,0,p,m);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){const t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;const t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){const t=this.frameIndex(),i=this.animation(),s=this.animations(),u=s[i],c=u.length/4;t<c-1?this.frameIndex(t+1):this.frameIndex(0)}}kl.prototype.className="Sprite",Cn(kl),V.addGetterSetter(kl,"animation"),V.addGetterSetter(kl,"animations"),V.addGetterSetter(kl,"frameOffsets"),V.addGetterSetter(kl,"image"),V.addGetterSetter(kl,"frameIndex",0,xt()),V.addGetterSetter(kl,"frameRate",17,xt()),V.backCompat(kl,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});class Qo extends Tt{_sceneFunc(t){const i=this.innerRadius(),s=this.outerRadius(),u=this.numPoints();t.beginPath(),t.moveTo(0,0-s);for(let c=1;c<u*2;c++){const f=c%2===0?s:i,p=f*Math.sin(c*Math.PI/u),m=-1*f*Math.cos(c*Math.PI/u);t.lineTo(p,m)}t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Qo.prototype.className="Star",Qo.prototype._centroid=!0,Qo.prototype._attrsAffectingSize=["innerRadius","outerRadius"],Cn(Qo),V.addGetterSetter(Qo,"numPoints",5,xt()),V.addGetterSetter(Qo,"innerRadius",0,xt()),V.addGetterSetter(Qo,"outerRadius",0,xt());function Zo(n){return[...n].reduce((t,i,s,u)=>{if(new RegExp("\\p{Emoji}","u").test(i)){const c=u[s+1];c&&new RegExp("\\p{Emoji_Modifier}|\\u200D","u").test(c)?(t.push(i+c),u[s+1]=""):t.push(i)}else new RegExp("\\p{Regional_Indicator}{2}","u").test(i+(u[s+1]||""))?t.push(i+u[s+1]):s>0&&new RegExp("\\p{Mn}|\\p{Me}|\\p{Mc}","u").test(i)?t[t.length-1]+=i:i&&t.push(i);return t},[])}const sh="auto",LC="center",I5="inherit",Ip="justify",PC="Change.konva",YC="2d",W5="-",$5="left",qC="text",XC="Text",KC="top",QC="bottom",t4="middle",e4="normal",ZC="px ",B1=" ",JC="right",n4="rtl",FC="word",kC="char",a4="none",L2="…",i4=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],IC=i4.length;function WC(n){return n.split(",").map(t=>{t=t.trim();const i=t.indexOf(" ")>=0,s=t.indexOf('"')>=0||t.indexOf("'")>=0;return i&&!s&&(t=`"${t}"`),t}).join(", ")}let V1;function P2(){return V1||(V1=W.createCanvasElement().getContext(YC),V1)}function $C(n){n.fillText(this._partialText,this._partialTextX,this._partialTextY)}function t_(n){n.setAttr("miterLimit",2),n.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function e_(n){return n=n||{},!n.fillLinearGradientColorStops&&!n.fillRadialGradientColorStops&&!n.fillPatternImage&&(n.fill=n.fill||"black"),n}class on extends Tt{constructor(t){super(e_(t)),this._partialTextX=0,this._partialTextY=0;for(let i=0;i<IC;i++)this.on(i4[i]+PC,this._setTextData);this._setTextData()}_sceneFunc(t){var i,s;const u=this.textArr,c=u.length;if(!this.text())return;let f=this.padding(),p=this.fontSize(),m=this.lineHeight()*p,S=this.verticalAlign(),b=this.direction(),_=0,x=this.align(),D=this.getWidth(),A=this.letterSpacing(),N=this.charRenderFunc(),O=this.fill(),R=this.textDecoration(),U=R.indexOf("underline")!==-1,j=R.indexOf("line-through")!==-1,G;b=b===I5?t.direction:b;let k=m/2,et=t4;if(!Mt.legacyTextRendering){const ft=this.measureSize("M");et="alphabetic";const I=(i=ft.fontBoundingBoxAscent)!==null&&i!==void 0?i:ft.actualBoundingBoxAscent,it=(s=ft.fontBoundingBoxDescent)!==null&&s!==void 0?s:ft.actualBoundingBoxDescent;k=(I-it)/2+m/2}for(b===n4&&t.setAttr("direction",b),t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",et),t.setAttr("textAlign",$5),S===t4?_=(this.getHeight()-c*m-f*2)/2:S===QC&&(_=this.getHeight()-c*m-f*2),t.translate(f,_+f),G=0;G<c;G++){let ft=0,I=0;const it=u[G],J=it.text,St=it.width,nt=it.lastInParagraph;if(t.save(),x===JC?ft+=D-St-f*2:x===LC&&(ft+=(D-St-f*2)/2),U){t.save(),t.beginPath();const yt=Mt.legacyTextRendering?Math.round(p/2):Math.round(p/4),tt=ft,H=k+I+yt;t.moveTo(tt,H);const Q=x===Ip&&!nt?D-f*2:St;t.lineTo(tt+Math.round(Q),H),t.lineWidth=p/15;const K=this._getLinearGradient();t.strokeStyle=K||O,t.stroke(),t.restore()}const ht=ft;if(b!==n4&&(A!==0||x===Ip||N)){const yt=J.split(" ").length-1,tt=Zo(J);for(let H=0;H<tt.length;H++){const Q=tt[H];if(Q===" "&&!nt&&x===Ip&&(ft+=(D-f*2-St)/yt),this._partialTextX=ft,this._partialTextY=k+I,this._partialText=Q,N){t.save();const pt=u.slice(0,G).reduce(($,Et)=>$+Zo(Et.text).length,0),dt=H+pt;N({char:Q,index:dt,x:ft,y:k+I,lineIndex:G,column:H,isLastInLine:nt,width:this.measureSize(Q).width,context:t})}t.fillStrokeShape(this),N&&t.restore(),ft+=this.measureSize(Q).width+A}}else A!==0&&t.setAttr("letterSpacing",`${A}px`),this._partialTextX=ft,this._partialTextY=k+I,this._partialText=J,t.fillStrokeShape(this);if(j){t.save(),t.beginPath();const yt=Mt.legacyTextRendering?0:-Math.round(p/4),tt=ht;t.moveTo(tt,k+I+yt);const H=x===Ip&&!nt?D-f*2:St;t.lineTo(tt+Math.round(H),k+I+yt),t.lineWidth=p/15;const Q=this._getLinearGradient();t.strokeStyle=Q||O,t.stroke(),t.restore()}t.restore(),c>1&&(k+=m)}}_hitFunc(t){const i=this.getWidth(),s=this.getHeight();t.beginPath(),t.rect(0,0,i,s),t.closePath(),t.fillStrokeShape(this)}setText(t){const i=W._isString(t)?t:t==null?"":t+"";return this._setAttr(qC,i),this}getWidth(){return this.attrs.width===sh||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===sh||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return W.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var i,s,u,c,f,p,m,S,b,_,x;let D=P2(),A=this.fontSize(),N;D.save(),D.font=this._getContextFont(),N=D.measureText(t),D.restore();const O=A/100;return{actualBoundingBoxAscent:(i=N.actualBoundingBoxAscent)!==null&&i!==void 0?i:71.58203125*O,actualBoundingBoxDescent:(s=N.actualBoundingBoxDescent)!==null&&s!==void 0?s:0,actualBoundingBoxLeft:(u=N.actualBoundingBoxLeft)!==null&&u!==void 0?u:-7.421875*O,actualBoundingBoxRight:(c=N.actualBoundingBoxRight)!==null&&c!==void 0?c:75.732421875*O,alphabeticBaseline:(f=N.alphabeticBaseline)!==null&&f!==void 0?f:0,emHeightAscent:(p=N.emHeightAscent)!==null&&p!==void 0?p:100*O,emHeightDescent:(m=N.emHeightDescent)!==null&&m!==void 0?m:-20*O,fontBoundingBoxAscent:(S=N.fontBoundingBoxAscent)!==null&&S!==void 0?S:91*O,fontBoundingBoxDescent:(b=N.fontBoundingBoxDescent)!==null&&b!==void 0?b:21*O,hangingBaseline:(_=N.hangingBaseline)!==null&&_!==void 0?_:72.80000305175781*O,ideographicBaseline:(x=N.ideographicBaseline)!==null&&x!==void 0?x:-21*O,width:N.width,height:A}}_getContextFont(){return this.fontStyle()+B1+this.fontVariant()+B1+(this.fontSize()+ZC)+WC(this.fontFamily())}_addTextLine(t){this.align()===Ip&&(t=t.trim());const s=this._getTextWidth(t);return this.textArr.push({text:t,width:s,lastInParagraph:!1})}_getTextWidth(t){const i=this.letterSpacing(),s=t.length;return P2().measureText(t).width+i*s}_setTextData(){let t=this.text().split(`
|
|
15
|
+
`),i=+this.fontSize(),s=0,u=this.lineHeight()*i,c=this.attrs.width,f=this.attrs.height,p=c!==sh&&c!==void 0,m=f!==sh&&f!==void 0,S=this.padding(),b=c-S*2,_=f-S*2,x=0,D=this.wrap(),A=D!==a4,N=D!==kC&&A,O=this.ellipsis();this.textArr=[],P2().font=this._getContextFont();const R=O?this._getTextWidth(L2):0;for(let U=0,j=t.length;U<j;++U){let G=t[U],k=this._getTextWidth(G);if(p&&k>b)for(;G.length>0;){let et=0,ft=Zo(G).length,I="",it=0;for(;et<ft;){const J=et+ft>>>1,St=Zo(G),nt=St.slice(0,J+1).join(""),ht=this._getTextWidth(nt);(O&&m&&x+u>_?ht+R:ht)<=b?(et=J+1,I=nt,it=ht):ft=J}if(I){if(N){const nt=Zo(G),ht=Zo(I),yt=nt[ht.length],tt=yt===B1||yt===W5;let H;if(tt&&it<=b)H=ht.length;else{const Q=ht.lastIndexOf(B1),K=ht.lastIndexOf(W5);H=Math.max(Q,K)+1}H>0&&(et=H,I=nt.slice(0,et).join(""),it=this._getTextWidth(I))}if(I=I.trimRight(),this._addTextLine(I),s=Math.max(s,it),x+=u,this._shouldHandleEllipsis(x)){this._tryToAddEllipsisToLastLine();break}if(G=Zo(G).slice(et).join("").trimLeft(),G.length>0&&(k=this._getTextWidth(G),k<=b)){this._addTextLine(G),x+=u,s=Math.max(s,k);break}}else break}else this._addTextLine(G),x+=u,s=Math.max(s,k),this._shouldHandleEllipsis(x)&&U<j-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),m&&x+u>_)break}this.textHeight=i,this.textWidth=s}_shouldHandleEllipsis(t){const i=+this.fontSize(),s=this.lineHeight()*i,u=this.attrs.height,c=u!==sh&&u!==void 0,f=this.padding(),p=u-f*2;return!(this.wrap()!==a4)||c&&t+s>p}_tryToAddEllipsisToLastLine(){const t=this.attrs.width,i=t!==sh&&t!==void 0,s=this.padding(),u=t-s*2,c=this.ellipsis(),f=this.textArr[this.textArr.length-1];!f||!c||(i&&(this._getTextWidth(f.text+L2)<u||(f.text=f.text.slice(0,f.text.length-3))),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(f.text+L2))}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const t=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,i=this.hasShadow();return t&&i?!0:super._useBufferCanvas()}}on.prototype._fillFunc=$C,on.prototype._strokeFunc=t_,on.prototype.className=XC,on.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],Cn(on),V.overWriteSetter(on,"width",T2()),V.overWriteSetter(on,"height",T2()),V.addGetterSetter(on,"direction",I5),V.addGetterSetter(on,"fontFamily","Arial"),V.addGetterSetter(on,"fontSize",12,xt()),V.addGetterSetter(on,"fontStyle",e4),V.addGetterSetter(on,"fontVariant",e4),V.addGetterSetter(on,"padding",0,xt()),V.addGetterSetter(on,"align",$5),V.addGetterSetter(on,"verticalAlign",KC),V.addGetterSetter(on,"lineHeight",1,xt()),V.addGetterSetter(on,"wrap",FC),V.addGetterSetter(on,"ellipsis",!1,ul()),V.addGetterSetter(on,"letterSpacing",0,xt()),V.addGetterSetter(on,"text","",uc()),V.addGetterSetter(on,"textDecoration",""),V.addGetterSetter(on,"charRenderFunc",void 0);const n_="",s4="normal";function l4(n){n.fillText(this.partialText,0,0)}function r4(n){n.strokeText(this.partialText,0,0)}class fa extends Tt{constructor(t){super(t),this.dummyCanvas=W.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return Ts.getPathLength(this.dataArray)}_getPointAtLength(t){if(!this.attrs.data)return null;const i=this.pathLength;return t>i?null:Ts.getPointAtLengthOfDataArray(t,this.dataArray)}_readDataAttribute(){this.dataArray=Ts.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();const i=this.textDecoration(),s=this.fill(),u=this.fontSize(),c=this.glyphInfo,f=i.indexOf("underline")!==-1,p=i.indexOf("line-through")!==-1;f&&t.beginPath();for(let m=0;m<c.length;m++){t.save();const S=c[m].p0;t.translate(S.x,S.y),t.rotate(c[m].rotation),this.partialText=c[m].text,t.fillStrokeShape(this),f&&(m===0&&t.moveTo(0,u/2+1),t.lineTo(c[m].width,u/2+1)),t.restore()}if(f&&(t.strokeStyle=s,t.lineWidth=u/20,t.stroke()),p){t.beginPath();for(let m=0;m<c.length;m++){t.save();const S=c[m].p0;t.translate(S.x,S.y),t.rotate(c[m].rotation),m===0&&t.moveTo(0,0),t.lineTo(c[m].width,0),t.restore()}t.strokeStyle=s,t.lineWidth=u/20,t.stroke()}t.restore()}_hitFunc(t){t.beginPath();const i=this.glyphInfo;if(i.length>=1){const s=i[0].p0;t.moveTo(s.x,s.y)}for(let s=0;s<i.length;s++){const u=i[s].p1;t.lineTo(u.x,u.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return W.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return on.prototype.setText.call(this,t)}_getContextFont(){return on.prototype._getContextFont.call(this)}_getTextSize(t){const s=this.dummyCanvas.getContext("2d");s.save(),s.font=this._getContextFont();const u=s.measureText(t);return s.restore(),{width:u.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const t=Zo(this.text()),i=[];let s=0;for(let _=0;_<t.length;_++)i.push({char:t[_],width:this._getTextSize(t[_]).width}),s+=i[_].width;const{height:u}=this._getTextSize(this.attrs.text);if(this.textWidth=s,this.textHeight=u,this.glyphInfo=[],!this.attrs.data)return null;const c=this.letterSpacing(),f=this.align(),p=this.kerningFunc(),m=Math.max(this.textWidth+((this.attrs.text||"").length-1)*c,0);let S=0;f==="center"&&(S=Math.max(0,this.pathLength/2-m/2)),f==="right"&&(S=Math.max(0,this.pathLength-m));let b=S;for(let _=0;_<i.length;_++){const x=this._getPointAtLength(b);if(!x)return;const D=i[_].char;let A=i[_].width+c;if(D===" "&&f==="justify"){const G=this.text().split(" ").length-1;A+=(this.pathLength-m)/G}const N=this._getPointAtLength(b+A);if(!N)return;const O=Ts.getLineLength(x.x,x.y,N.x,N.y);let R=0;if(p)try{R=p(i[_-1].char,D)*this.fontSize()}catch{R=0}x.x+=R,N.x+=R,this.textWidth+=R;const U=Ts.getPointOnLine(R+O/2,x.x,x.y,N.x,N.y),j=Math.atan2(N.y-x.y,N.x-x.x);this.glyphInfo.push({transposeX:U.x,transposeY:U.y,text:t[_],rotation:j,p0:x,p1:N,width:O}),b+=A}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};const t=[];this.glyphInfo.forEach(function(S){t.push(S.p0.x),t.push(S.p0.y),t.push(S.p1.x),t.push(S.p1.y)});let i=t[0]||0,s=t[0]||0,u=t[1]||0,c=t[1]||0,f,p;for(let S=0;S<t.length/2;S++)f=t[S*2],p=t[S*2+1],i=Math.min(i,f),s=Math.max(s,f),u=Math.min(u,p),c=Math.max(c,p);const m=this.fontSize();return{x:i-m/2,y:u-m/2,width:s-i+m,height:c-u+m}}destroy(){return W.releaseCanvas(this.dummyCanvas),super.destroy()}}fa.prototype._fillFunc=l4,fa.prototype._strokeFunc=r4,fa.prototype._fillFuncHit=l4,fa.prototype._strokeFuncHit=r4,fa.prototype.className="TextPath",fa.prototype._attrsAffectingSize=["text","fontSize","data"],Cn(fa),V.addGetterSetter(fa,"data"),V.addGetterSetter(fa,"fontFamily","Arial"),V.addGetterSetter(fa,"fontSize",12,xt()),V.addGetterSetter(fa,"fontStyle",s4),V.addGetterSetter(fa,"align","left"),V.addGetterSetter(fa,"letterSpacing",0,xt()),V.addGetterSetter(fa,"textBaseline","middle"),V.addGetterSetter(fa,"fontVariant",s4),V.addGetterSetter(fa,"text",n_),V.addGetterSetter(fa,"textDecoration",""),V.addGetterSetter(fa,"kerningFunc",void 0);const o4="tr-konva",a_=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(n=>n+`.${o4}`).join(" "),u4="nodesRect",i_=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange","draggableChange"],s_={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},l_="ontouchstart"in Mt._global;function r_(n,t,i){if(n==="rotater")return i;t+=W.degToRad(s_[n]||0);const s=(W.radToDeg(t)%360+360)%360;return W._inRange(s,315+22.5,360)||W._inRange(s,0,22.5)?"ns-resize":W._inRange(s,45-22.5,45+22.5)?"nesw-resize":W._inRange(s,90-22.5,90+22.5)?"ew-resize":W._inRange(s,135-22.5,135+22.5)?"nwse-resize":W._inRange(s,180-22.5,180+22.5)?"ns-resize":W._inRange(s,225-22.5,225+22.5)?"nesw-resize":W._inRange(s,270-22.5,270+22.5)?"ew-resize":W._inRange(s,315-22.5,315+22.5)?"nwse-resize":(W.error("Transformer has unknown angle for cursor detection: "+s),"pointer")}const G1=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function o_(n){return{x:n.x+n.width/2*Math.cos(n.rotation)+n.height/2*Math.sin(-n.rotation),y:n.y+n.height/2*Math.cos(n.rotation)+n.width/2*Math.sin(n.rotation)}}function c4(n,t,i){const s=i.x+(n.x-i.x)*Math.cos(t)-(n.y-i.y)*Math.sin(t),u=i.y+(n.x-i.x)*Math.sin(t)+(n.y-i.y)*Math.cos(t);return{...n,rotation:n.rotation+t,x:s,y:u}}function u_(n,t){const i=o_(n);return c4(n,t,i)}function c_(n,t,i){let s=t;for(let u=0;u<n.length;u++){const c=Mt.getAngle(n[u]),f=Math.abs(c-t)%(Math.PI*2);Math.min(f,Math.PI*2-f)<i&&(s=c)}return s}let Y2=0;class be extends nh{constructor(t){super(t),this._movingAnchorName=null,this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(a_,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return W.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([t])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return o4+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach();const i=t.filter(u=>u.isAncestorOf(this)?(W.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);return this._nodes=t=i,t.length===1&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(u=>{const c=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()};if(u._attrsAffectingSize.length){const f=u._attrsAffectingSize.map(p=>p+"Change."+this._getEventNamespace()).join(" ");u.on(f,c)}u.on(i_.map(f=>f+`.${this._getEventNamespace()}`).join(" "),c),u.on(`absoluteTransformChange.${this._getEventNamespace()}`,c),this._proxyDrag(u)}),this._resetTransformCache(),this.findOne(".top-left")&&this.update(),this}_proxyDrag(t){let i;t.on(`dragstart.${this._getEventNamespace()}`,s=>{i=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(s,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,s=>{if(!i)return;const u=t.getAbsolutePosition(),c=u.x-i.x,f=u.y-i.y;this.nodes().forEach(p=>{if(p===t||p.isDragging())return;const m=p.getAbsolutePosition();p.setAbsolutePosition({x:m.x+c,y:m.y+f}),p.startDrag(s)}),i=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(u4),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(u4,this.__getNodeRect)}__getNodeShape(t,i=this.rotation(),s){const u=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),c=t.getAbsoluteScale(s),f=t.getAbsolutePosition(s),p=u.x*c.x-t.offsetX()*c.x,m=u.y*c.y-t.offsetY()*c.y,S=(Mt.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),b={x:f.x+p*Math.cos(S)+m*Math.sin(-S),y:f.y+m*Math.cos(S)+p*Math.sin(S),width:u.width*c.x,height:u.height*c.y,rotation:S};return c4(b,-Mt.getAngle(i),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};const i=[];this.nodes().map(S=>{const b=S.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),_=[{x:b.x,y:b.y},{x:b.x+b.width,y:b.y},{x:b.x+b.width,y:b.y+b.height},{x:b.x,y:b.y+b.height}],x=S.getAbsoluteTransform();_.forEach(function(D){const A=x.point(D);i.push(A)})});const s=new Fi;s.rotate(-Mt.getAngle(this.rotation()));let u=1/0,c=1/0,f=-1/0,p=-1/0;i.forEach(function(S){const b=s.point(S);u===void 0&&(u=f=b.x,c=p=b.y),u=Math.min(u,b.x),c=Math.min(c,b.y),f=Math.max(f,b.x),p=Math.max(p,b.y)}),s.invert();const m=s.point({x:u,y:c});return{x:m.x,y:m.y,width:f-u,height:p-c,rotation:Mt.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),G1.forEach(t=>{this._createAnchor(t)}),this._createAnchor("rotater")}_createAnchor(t){const i=new kp({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:l_?10:"auto"}),s=this;i.on("mousedown touchstart",function(u){s._handleMouseDown(u)}),i.on("dragstart",u=>{i.stopDrag(),u.cancelBubble=!0}),i.on("dragend",u=>{u.cancelBubble=!0}),i.on("mouseenter",()=>{const u=Mt.getAngle(this.rotation()),c=this.rotateAnchorCursor(),f=r_(t,u,c);i.getStage().content&&(i.getStage().content.style.cursor=f),this._cursorChange=!0}),i.on("mouseout",()=>{i.getStage().content&&(i.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(i)}_createBack(){const t=new Tt({name:"back",width:0,height:0,sceneFunc(i,s){const u=s.getParent(),c=u.padding();i.beginPath(),i.rect(-c,-c,s.width()+c*2,s.height()+c*2),i.moveTo(s.width()/2,-c),u.rotateEnabled()&&u.rotateLineVisible()&&i.lineTo(s.width()/2,-u.rotateAnchorOffset()*W._sign(s.height())-c),i.fillStrokeShape(s)},hitFunc:(i,s)=>{if(!this.shouldOverdrawWholeArea())return;const u=this.padding();i.beginPath(),i.rect(-u,-u,s.width()+u*2,s.height()+u*2),i.fillStrokeShape(s)}});this.add(t),this._proxyDrag(t),t.on("dragstart",i=>{i.cancelBubble=!0}),t.on("dragmove",i=>{i.cancelBubble=!0}),t.on("dragend",i=>{i.cancelBubble=!0}),this.on("dragmove",i=>{this.update()})}_handleMouseDown(t){if(this._transforming)return;this._movingAnchorName=t.target.name().split(" ")[0];const i=this._getNodeRect(),s=i.width,u=i.height,c=Math.sqrt(Math.pow(s,2)+Math.pow(u,2));this.sin=Math.abs(u/c),this.cos=Math.abs(s/c),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;const f=t.target.getAbsolutePosition(),p=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:p.x-f.x,y:p.y-f.y},Y2++,this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(m=>{m._fire("transformstart",{evt:t.evt,target:m})})}_handleMouseMove(t){let i,s,u;const c=this.findOne("."+this._movingAnchorName),f=c.getStage();f.setPointersPositions(t);const p=f.getPointerPosition();let m={x:p.x-this._anchorDragOffset.x,y:p.y-this._anchorDragOffset.y};const S=c.getAbsolutePosition();this.anchorDragBoundFunc()&&(m=this.anchorDragBoundFunc()(S,m,t)),c.setAbsolutePosition(m);const b=c.getAbsolutePosition();if(S.x===b.x&&S.y===b.y)return;if(this._movingAnchorName==="rotater"){const U=this._getNodeRect();i=c.x()-U.width/2,s=-c.y()+U.height/2;let j=Math.atan2(-s,i)+Math.PI/2;U.height<0&&(j-=Math.PI);const k=Mt.getAngle(this.rotation())+j,et=Mt.getAngle(this.rotationSnapTolerance()),I=c_(this.rotationSnaps(),k,et)-U.rotation,it=u_(U,I);this._fitNodesInto(it,t);return}const _=this.shiftBehavior();let x;_==="inverted"?x=this.keepRatio()&&!t.shiftKey:_==="none"?x=this.keepRatio():x=this.keepRatio()||t.shiftKey;let D=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(x){const U=D?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};u=Math.sqrt(Math.pow(U.x-c.x(),2)+Math.pow(U.y-c.y(),2));const j=this.findOne(".top-left").x()>U.x?-1:1,G=this.findOne(".top-left").y()>U.y?-1:1;i=u*this.cos*j,s=u*this.sin*G,this.findOne(".top-left").x(U.x-i),this.findOne(".top-left").y(U.y-s)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(c.y());else if(this._movingAnchorName==="top-right"){if(x){const U=D?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};u=Math.sqrt(Math.pow(c.x()-U.x,2)+Math.pow(U.y-c.y(),2));const j=this.findOne(".top-right").x()<U.x?-1:1,G=this.findOne(".top-right").y()>U.y?-1:1;i=u*this.cos*j,s=u*this.sin*G,this.findOne(".top-right").x(U.x+i),this.findOne(".top-right").y(U.y-s)}var A=c.position();this.findOne(".top-left").y(A.y),this.findOne(".bottom-right").x(A.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(c.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(c.x());else if(this._movingAnchorName==="bottom-left"){if(x){const U=D?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};u=Math.sqrt(Math.pow(U.x-c.x(),2)+Math.pow(c.y()-U.y,2));const j=U.x<c.x()?-1:1,G=c.y()<U.y?-1:1;i=u*this.cos*j,s=u*this.sin*G,c.x(U.x-i),c.y(U.y+s)}A=c.position(),this.findOne(".top-left").x(A.x),this.findOne(".bottom-right").y(A.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(c.y());else if(this._movingAnchorName==="bottom-right"){if(x){const U=D?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};u=Math.sqrt(Math.pow(c.x()-U.x,2)+Math.pow(c.y()-U.y,2));const j=this.findOne(".bottom-right").x()<U.x?-1:1,G=this.findOne(".bottom-right").y()<U.y?-1:1;i=u*this.cos*j,s=u*this.sin*G,this.findOne(".bottom-right").x(U.x+i),this.findOne(".bottom-right").y(U.y+s)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));if(D=this.centeredScaling()||t.altKey,D){const U=this.findOne(".top-left"),j=this.findOne(".bottom-right"),G=U.x(),k=U.y(),et=this.getWidth()-j.x(),ft=this.getHeight()-j.y();j.move({x:-G,y:-k}),U.move({x:et,y:ft})}const N=this.findOne(".top-left").getAbsolutePosition();i=N.x,s=N.y;const O=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),R=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:i,y:s,width:O,height:R,rotation:Mt.getAngle(this.rotation())},t)}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){var i;if(this._transforming){this._transforming=!1,typeof window<"u"&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));const s=this.getNode();Y2--,this._fire("transformend",{evt:t,target:s}),(i=this.getLayer())===null||i===void 0||i.batchDraw(),s&&this._nodes.forEach(u=>{var c;u._fire("transformend",{evt:t,target:u}),(c=u.getLayer())===null||c===void 0||c.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(t,i){const s=this._getNodeRect(),u=1;if(W._inRange(t.width,-this.padding()*2-u,u)){this.update();return}if(W._inRange(t.height,-this.padding()*2-u,u)){this.update();return}const c=new Fi;if(c.rotate(Mt.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const x=c.point({x:-this.padding()*2,y:0});t.x+=x.x,t.y+=x.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const x=c.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y,t.width+=this.padding()*2}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const x=c.point({x:0,y:-this.padding()*2});t.x+=x.x,t.y+=x.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y,t.height+=this.padding()*2}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const x=c.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y,t.height+=this.padding()*2}if(this.boundBoxFunc()){const x=this.boundBoxFunc()(s,t);x?t=x:W.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const f=1e7,p=new Fi;p.translate(s.x,s.y),p.rotate(s.rotation),p.scale(s.width/f,s.height/f);const m=new Fi,S=t.width/f,b=t.height/f;this.flipEnabled()===!1?(m.translate(t.x,t.y),m.rotate(t.rotation),m.translate(t.width<0?t.width:0,t.height<0?t.height:0),m.scale(Math.abs(S),Math.abs(b))):(m.translate(t.x,t.y),m.rotate(t.rotation),m.scale(S,b));const _=m.multiply(p.invert());this._nodes.forEach(x=>{var D;if(!x.getStage())return;const A=x.getParent().getAbsoluteTransform(),N=x.getTransform().copy();N.translate(x.offsetX(),x.offsetY());const O=new Fi;O.multiply(A.copy().invert()).multiply(_).multiply(A).multiply(N);const R=O.decompose();x.setAttrs(R),(D=x.getLayer())===null||D===void 0||D.batchDraw()}),this.rotation(W._getRotation(t.rotation)),this._nodes.forEach(x=>{this._fire("transform",{evt:i,target:x}),x._fire("transform",{evt:i,target:x})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,i){this.findOne(t).setAttrs(i)}update(){var t;const i=this._getNodeRect();this.rotation(W._getRotation(i.rotation));const s=i.width,u=i.height,c=this.enabledAnchors(),f=this.resizeEnabled(),p=this.padding(),m=this.anchorSize(),S=this.find("._anchor");S.forEach(_=>{_.setAttrs({width:m,height:m,offsetX:m/2,offsetY:m/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:m/2+p,offsetY:m/2+p,visible:f&&c.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:s/2,y:0,offsetY:m/2+p,visible:f&&c.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:s,y:0,offsetX:m/2-p,offsetY:m/2+p,visible:f&&c.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:u/2,offsetX:m/2+p,visible:f&&c.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:s,y:u/2,offsetX:m/2-p,visible:f&&c.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:u,offsetX:m/2+p,offsetY:m/2-p,visible:f&&c.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:s/2,y:u,offsetY:m/2-p,visible:f&&c.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:s,y:u,offsetX:m/2-p,offsetY:m/2-p,visible:f&&c.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:s/2,y:-this.rotateAnchorOffset()*W._sign(u)-p,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:s,height:u,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),draggable:this.nodes().some(_=>_.draggable()),x:0,y:0});const b=this.anchorStyleFunc();b&&S.forEach(_=>{b(_)}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();const t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),nh.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return At.prototype.toObject.call(this)}clone(t){return At.prototype.clone.call(this,t)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}be.isTransforming=()=>Y2>0;function f_(n){return n instanceof Array||W.warn("enabledAnchors value should be an array"),n instanceof Array&&n.forEach(function(t){G1.indexOf(t)===-1&&W.warn("Unknown anchor name: "+t+". Available names are: "+G1.join(", "))}),n||[]}be.prototype.className="Transformer",Cn(be),V.addGetterSetter(be,"enabledAnchors",G1,f_),V.addGetterSetter(be,"flipEnabled",!0,ul()),V.addGetterSetter(be,"resizeEnabled",!0),V.addGetterSetter(be,"anchorSize",10,xt()),V.addGetterSetter(be,"rotateEnabled",!0),V.addGetterSetter(be,"rotateLineVisible",!0),V.addGetterSetter(be,"rotationSnaps",[]),V.addGetterSetter(be,"rotateAnchorOffset",50,xt()),V.addGetterSetter(be,"rotateAnchorCursor","crosshair"),V.addGetterSetter(be,"rotationSnapTolerance",5,xt()),V.addGetterSetter(be,"borderEnabled",!0),V.addGetterSetter(be,"anchorStroke","rgb(0, 161, 255)"),V.addGetterSetter(be,"anchorStrokeWidth",1,xt()),V.addGetterSetter(be,"anchorFill","white"),V.addGetterSetter(be,"anchorCornerRadius",0,xt()),V.addGetterSetter(be,"borderStroke","rgb(0, 161, 255)"),V.addGetterSetter(be,"borderStrokeWidth",1,xt()),V.addGetterSetter(be,"borderDash"),V.addGetterSetter(be,"keepRatio",!0),V.addGetterSetter(be,"shiftBehavior","default"),V.addGetterSetter(be,"centeredScaling",!1),V.addGetterSetter(be,"ignoreStroke",!1),V.addGetterSetter(be,"padding",0,xt()),V.addGetterSetter(be,"nodes"),V.addGetterSetter(be,"node"),V.addGetterSetter(be,"boundBoxFunc"),V.addGetterSetter(be,"anchorDragBoundFunc"),V.addGetterSetter(be,"anchorStyleFunc"),V.addGetterSetter(be,"shouldOverdrawWholeArea",!1),V.addGetterSetter(be,"useSingleNodeRotation",!0),V.backCompat(be,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Vr extends Tt{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,Mt.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Vr.prototype.className="Wedge",Vr.prototype._centroid=!0,Vr.prototype._attrsAffectingSize=["radius"],Cn(Vr),V.addGetterSetter(Vr,"radius",0,xt()),V.addGetterSetter(Vr,"angle",0,xt()),V.addGetterSetter(Vr,"clockwise",!1),V.backCompat(Vr,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function f4(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}const h_=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],d_=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function p_(n,t){const i=n.data,s=n.width,u=n.height;let c,f,p,m,S,b,_,x,D,A,N,O,R,U,j,G,k,et,ft,I;const it=t+t+1,J=s-1,St=u-1,nt=t+1,ht=nt*(nt+1)/2,yt=new f4,tt=h_[t],H=d_[t];let Q=null,K=yt,pt=null,dt=null;for(let $=1;$<it;$++)K=K.next=new f4,$===nt&&(Q=K);K.next=yt,p=f=0;for(let $=0;$<u;$++){O=R=U=j=m=S=b=_=0,x=nt*(G=i[f]),D=nt*(k=i[f+1]),A=nt*(et=i[f+2]),N=nt*(ft=i[f+3]),m+=ht*G,S+=ht*k,b+=ht*et,_+=ht*ft,K=yt;for(let Et=0;Et<nt;Et++)K.r=G,K.g=k,K.b=et,K.a=ft,K=K.next;for(let Et=1;Et<nt;Et++)c=f+((J<Et?J:Et)<<2),m+=(K.r=G=i[c])*(I=nt-Et),S+=(K.g=k=i[c+1])*I,b+=(K.b=et=i[c+2])*I,_+=(K.a=ft=i[c+3])*I,O+=G,R+=k,U+=et,j+=ft,K=K.next;pt=yt,dt=Q;for(let Et=0;Et<s;Et++)i[f+3]=ft=_*tt>>H,ft!==0?(ft=255/ft,i[f]=(m*tt>>H)*ft,i[f+1]=(S*tt>>H)*ft,i[f+2]=(b*tt>>H)*ft):i[f]=i[f+1]=i[f+2]=0,m-=x,S-=D,b-=A,_-=N,x-=pt.r,D-=pt.g,A-=pt.b,N-=pt.a,c=p+((c=Et+t+1)<J?c:J)<<2,O+=pt.r=i[c],R+=pt.g=i[c+1],U+=pt.b=i[c+2],j+=pt.a=i[c+3],m+=O,S+=R,b+=U,_+=j,pt=pt.next,x+=G=dt.r,D+=k=dt.g,A+=et=dt.b,N+=ft=dt.a,O-=G,R-=k,U-=et,j-=ft,dt=dt.next,f+=4;p+=s}for(let $=0;$<s;$++){R=U=j=O=S=b=_=m=0,f=$<<2,x=nt*(G=i[f]),D=nt*(k=i[f+1]),A=nt*(et=i[f+2]),N=nt*(ft=i[f+3]),m+=ht*G,S+=ht*k,b+=ht*et,_+=ht*ft,K=yt;for(let Rt=0;Rt<nt;Rt++)K.r=G,K.g=k,K.b=et,K.a=ft,K=K.next;let Et=s;for(let Rt=1;Rt<=t;Rt++)f=Et+$<<2,m+=(K.r=G=i[f])*(I=nt-Rt),S+=(K.g=k=i[f+1])*I,b+=(K.b=et=i[f+2])*I,_+=(K.a=ft=i[f+3])*I,O+=G,R+=k,U+=et,j+=ft,K=K.next,Rt<St&&(Et+=s);f=$,pt=yt,dt=Q;for(let Rt=0;Rt<u;Rt++)c=f<<2,i[c+3]=ft=_*tt>>H,ft>0?(ft=255/ft,i[c]=(m*tt>>H)*ft,i[c+1]=(S*tt>>H)*ft,i[c+2]=(b*tt>>H)*ft):i[c]=i[c+1]=i[c+2]=0,m-=x,S-=D,b-=A,_-=N,x-=pt.r,D-=pt.g,A-=pt.b,N-=pt.a,c=$+((c=Rt+nt)<St?c:St)*s<<2,m+=O+=pt.r=i[c],S+=R+=pt.g=i[c+1],b+=U+=pt.b=i[c+2],_+=j+=pt.a=i[c+3],pt=pt.next,x+=G=dt.r,D+=k=dt.g,A+=et=dt.b,N+=ft=dt.a,O-=G,R-=k,U-=et,j-=ft,dt=dt.next,f+=s}}const m_=function(t){const i=Math.round(this.blurRadius());i>0&&p_(t,i)};V.addGetterSetter(At,"blurRadius",0,xt(),V.afterSetFilter);const g_=function(n){const t=this.brightness()*255,i=n.data,s=i.length;for(let u=0;u<s;u+=4)i[u]+=t,i[u+1]+=t,i[u+2]+=t};V.addGetterSetter(At,"brightness",0,xt(),V.afterSetFilter);const y_=function(n){const t=this.brightness(),i=n.data,s=i.length;for(let u=0;u<s;u+=4)i[u]=Math.min(255,i[u]*t),i[u+1]=Math.min(255,i[u+1]*t),i[u+2]=Math.min(255,i[u+2]*t)},v_=function(n){const t=Math.pow((this.contrast()+100)/100,2),i=n.data,s=i.length;let u=150,c=150,f=150;for(let p=0;p<s;p+=4)u=i[p],c=i[p+1],f=i[p+2],u/=255,u-=.5,u*=t,u+=.5,u*=255,c/=255,c-=.5,c*=t,c+=.5,c*=255,f/=255,f-=.5,f*=t,f+=.5,f*=255,u=u<0?0:u>255?255:u,c=c<0?0:c>255?255:c,f=f<0?0:f>255?255:f,i[p]=u,i[p+1]=c,i[p+2]=f};V.addGetterSetter(At,"contrast",0,xt(),V.afterSetFilter);const S_=function(n){var t,i,s,u,c,f,p,m,S;const b=n.data,_=n.width,x=n.height,D=Math.min(1,Math.max(0,(i=(t=this.embossStrength)===null||t===void 0?void 0:t.call(this))!==null&&i!==void 0?i:.5)),A=Math.min(1,Math.max(0,(u=(s=this.embossWhiteLevel)===null||s===void 0?void 0:s.call(this))!==null&&u!==void 0?u:.5)),O=(p={"top-left":315,top:270,"top-right":225,right:180,"bottom-right":135,bottom:90,"bottom-left":45,left:0}[(f=(c=this.embossDirection)===null||c===void 0?void 0:c.call(this))!==null&&f!==void 0?f:"top-left"])!==null&&p!==void 0?p:315,R=!!((S=(m=this.embossBlend)===null||m===void 0?void 0:m.call(this))!==null&&S!==void 0&&S),U=D*10,j=A*255,G=O*Math.PI/180,k=Math.cos(G),et=Math.sin(G),ft=128/1020*U,I=new Uint8ClampedArray(b),it=new Float32Array(_*x);for(let yt=0,tt=0;tt<b.length;tt+=4,yt++)it[yt]=.2126*I[tt]+.7152*I[tt+1]+.0722*I[tt+2];const J=[-1,0,1,-2,0,2,-1,0,1],St=[-1,-2,-1,0,0,0,1,2,1],nt=[-_-1,-_,-_+1,-1,0,1,_-1,_,_+1],ht=yt=>yt<0?0:yt>255?255:yt;for(let yt=1;yt<x-1;yt++)for(let tt=1;tt<_-1;tt++){const H=yt*_+tt;let Q=0,K=0;Q+=it[H+nt[0]]*J[0],K+=it[H+nt[0]]*St[0],Q+=it[H+nt[1]]*J[1],K+=it[H+nt[1]]*St[1],Q+=it[H+nt[2]]*J[2],K+=it[H+nt[2]]*St[2],Q+=it[H+nt[3]]*J[3],K+=it[H+nt[3]]*St[3],Q+=it[H+nt[5]]*J[5],K+=it[H+nt[5]]*St[5],Q+=it[H+nt[6]]*J[6],K+=it[H+nt[6]]*St[6],Q+=it[H+nt[7]]*J[7],K+=it[H+nt[7]]*St[7],Q+=it[H+nt[8]]*J[8],K+=it[H+nt[8]]*St[8];const pt=k*Q+et*K,dt=ht(j+pt*ft),$=H*4;if(R){const Et=dt-j;b[$]=ht(I[$]+Et),b[$+1]=ht(I[$+1]+Et),b[$+2]=ht(I[$+2]+Et),b[$+3]=I[$+3]}else b[$]=b[$+1]=b[$+2]=dt,b[$+3]=I[$+3]}for(let yt=0;yt<_;yt++){let tt=yt*4,H=((x-1)*_+yt)*4;b[tt]=I[tt],b[tt+1]=I[tt+1],b[tt+2]=I[tt+2],b[tt+3]=I[tt+3],b[H]=I[H],b[H+1]=I[H+1],b[H+2]=I[H+2],b[H+3]=I[H+3]}for(let yt=1;yt<x-1;yt++){let tt=yt*_*4,H=(yt*_+(_-1))*4;b[tt]=I[tt],b[tt+1]=I[tt+1],b[tt+2]=I[tt+2],b[tt+3]=I[tt+3],b[H]=I[H],b[H+1]=I[H+1],b[H+2]=I[H+2],b[H+3]=I[H+3]}return n};V.addGetterSetter(At,"embossStrength",.5,xt(),V.afterSetFilter),V.addGetterSetter(At,"embossWhiteLevel",.5,xt(),V.afterSetFilter),V.addGetterSetter(At,"embossDirection","top-left",void 0,V.afterSetFilter),V.addGetterSetter(At,"embossBlend",!1,void 0,V.afterSetFilter);function q2(n,t,i,s,u){const c=i-t,f=u-s;if(c===0)return s+f/2;if(f===0)return s;let p=(n-t)/c;return p=f*p+s,p}const b_=function(n){const t=n.data,i=t.length;let s=t[0],u=s,c,f=t[1],p=f,m,S=t[2],b=S,_;const x=this.enhance();if(x===0)return;for(let j=0;j<i;j+=4)c=t[j+0],c<s?s=c:c>u&&(u=c),m=t[j+1],m<f?f=m:m>p&&(p=m),_=t[j+2],_<S?S=_:_>b&&(b=_);u===s&&(u=255,s=0),p===f&&(p=255,f=0),b===S&&(b=255,S=0);let D,A,N,O,R,U;if(x>0)D=u+x*(255-u),A=s-x*(s-0),N=p+x*(255-p),O=f-x*(f-0),R=b+x*(255-b),U=S-x*(S-0);else{const j=(u+s)*.5;D=u+x*(u-j),A=s+x*(s-j);const G=(p+f)*.5;N=p+x*(p-G),O=f+x*(f-G);const k=(b+S)*.5;R=b+x*(b-k),U=S+x*(S-k)}for(let j=0;j<i;j+=4)t[j+0]=q2(t[j+0],s,u,A,D),t[j+1]=q2(t[j+1],f,p,O,N),t[j+2]=q2(t[j+2],S,b,U,R)};V.addGetterSetter(At,"enhance",0,xt(),V.afterSetFilter);const E_=function(n){const t=n.data,i=t.length;for(let s=0;s<i;s+=4){const u=.34*t[s]+.5*t[s+1]+.16*t[s+2];t[s]=u,t[s+1]=u,t[s+2]=u}};V.addGetterSetter(At,"hue",0,xt(),V.afterSetFilter),V.addGetterSetter(At,"saturation",0,xt(),V.afterSetFilter),V.addGetterSetter(At,"luminance",0,xt(),V.afterSetFilter);const T_=function(n){const t=n.data,i=t.length,s=1,u=Math.pow(2,this.saturation()),c=Math.abs(this.hue()+360)%360,f=this.luminance()*127,p=s*u*Math.cos(c*Math.PI/180),m=s*u*Math.sin(c*Math.PI/180),S=.299*s+.701*p+.167*m,b=.587*s-.587*p+.33*m,_=.114*s-.114*p-.497*m,x=.299*s-.299*p-.328*m,D=.587*s+.413*p+.035*m,A=.114*s-.114*p+.293*m,N=.299*s-.3*p+1.25*m,O=.587*s-.586*p-1.05*m,R=.114*s+.886*p-.2*m;let U,j,G,k;for(let et=0;et<i;et+=4)U=t[et+0],j=t[et+1],G=t[et+2],k=t[et+3],t[et+0]=S*U+b*j+_*G+f,t[et+1]=x*U+D*j+A*G+f,t[et+2]=N*U+O*j+R*G+f,t[et+3]=k},C_=function(n){const t=n.data,i=t.length,s=Math.pow(2,this.value()),u=Math.pow(2,this.saturation()),c=Math.abs(this.hue()+360)%360,f=s*u*Math.cos(c*Math.PI/180),p=s*u*Math.sin(c*Math.PI/180),m=.299*s+.701*f+.167*p,S=.587*s-.587*f+.33*p,b=.114*s-.114*f-.497*p,_=.299*s-.299*f-.328*p,x=.587*s+.413*f+.035*p,D=.114*s-.114*f+.293*p,A=.299*s-.3*f+1.25*p,N=.587*s-.586*f-1.05*p,O=.114*s+.886*f-.2*p;for(let R=0;R<i;R+=4){const U=t[R+0],j=t[R+1],G=t[R+2],k=t[R+3];t[R+0]=m*U+S*j+b*G,t[R+1]=_*U+x*j+D*G,t[R+2]=A*U+N*j+O*G,t[R+3]=k}};V.addGetterSetter(At,"hue",0,xt(),V.afterSetFilter),V.addGetterSetter(At,"saturation",0,xt(),V.afterSetFilter),V.addGetterSetter(At,"value",0,xt(),V.afterSetFilter);const __=function(n){const t=n.data,i=t.length;for(let s=0;s<i;s+=4)t[s]=255-t[s],t[s+1]=255-t[s+1],t[s+2]=255-t[s+2]},x_=function(n,t,i){const s=n.data,u=t.data,c=n.width,f=n.height,p=i.polarCenterX||c/2,m=i.polarCenterY||f/2;let S=Math.sqrt(p*p+m*m),b=c-p,_=f-m;const x=Math.sqrt(b*b+_*_);S=x>S?x:S;const D=f,A=c,N=360/A*Math.PI/180;for(let O=0;O<A;O+=1){const R=Math.sin(O*N),U=Math.cos(O*N);for(let j=0;j<D;j+=1){b=Math.floor(p+S*j/D*U),_=Math.floor(m+S*j/D*R);let G=(_*c+b)*4;const k=s[G+0],et=s[G+1],ft=s[G+2],I=s[G+3];G=(O+j*c)*4,u[G+0]=k,u[G+1]=et,u[G+2]=ft,u[G+3]=I}}},D_=function(n,t,i){const s=n.data,u=t.data,c=n.width,f=n.height,p=i.polarCenterX||c/2,m=i.polarCenterY||f/2;let S=Math.sqrt(p*p+m*m),b=c-p,_=f-m;const x=Math.sqrt(b*b+_*_);S=x>S?x:S;const D=f,A=c,N=0;let O,R;for(b=0;b<c;b+=1)for(_=0;_<f;_+=1){const U=b-p,j=_-m,G=Math.sqrt(U*U+j*j)*D/S;let k=(Math.atan2(j,U)*180/Math.PI+360+N)%360;k=k*A/360,O=Math.floor(k),R=Math.floor(G);let et=(R*c+O)*4;const ft=s[et+0],I=s[et+1],it=s[et+2],J=s[et+3];et=(_*c+b)*4,u[et+0]=ft,u[et+1]=I,u[et+2]=it,u[et+3]=J}},A_=function(n){const t=n.width,i=n.height;let s,u,c,f,p,m,S,b,_,x,D=Math.round(this.kaleidoscopePower());const A=Math.round(this.kaleidoscopeAngle()),N=Math.floor(t*(A%360)/360);if(D<1)return;const O=W.createCanvasElement();O.width=t,O.height=i;const R=O.getContext("2d").getImageData(0,0,t,i);W.releaseCanvas(O),x_(n,R,{polarCenterX:t/2,polarCenterY:i/2});let U=t/Math.pow(2,D);for(;U<=8;)U=U*2,D-=1;U=Math.ceil(U);let j=U,G=0,k=j,et=1;for(N+U>t&&(G=j,k=0,et=-1),u=0;u<i;u+=1)for(s=G;s!==k;s+=et)c=Math.round(s+N)%t,_=(t*u+c)*4,p=R.data[_+0],m=R.data[_+1],S=R.data[_+2],b=R.data[_+3],x=(t*u+s)*4,R.data[x+0]=p,R.data[x+1]=m,R.data[x+2]=S,R.data[x+3]=b;for(u=0;u<i;u+=1)for(j=Math.floor(U),f=0;f<D;f+=1){for(s=0;s<j+1;s+=1)_=(t*u+s)*4,p=R.data[_+0],m=R.data[_+1],S=R.data[_+2],b=R.data[_+3],x=(t*u+j*2-s-1)*4,R.data[x+0]=p,R.data[x+1]=m,R.data[x+2]=S,R.data[x+3]=b;j*=2}D_(R,n,{})};V.addGetterSetter(At,"kaleidoscopePower",2,xt(),V.afterSetFilter),V.addGetterSetter(At,"kaleidoscopeAngle",0,xt(),V.afterSetFilter);function j1(n,t,i){let s=(i*n.width+t)*4;const u=[];return u.push(n.data[s++],n.data[s++],n.data[s++],n.data[s++]),u}function Wp(n,t){return Math.sqrt(Math.pow(n[0]-t[0],2)+Math.pow(n[1]-t[1],2)+Math.pow(n[2]-t[2],2))}function M_(n){const t=[0,0,0];for(let i=0;i<n.length;i++)t[0]+=n[i][0],t[1]+=n[i][1],t[2]+=n[i][2];return t[0]/=n.length,t[1]/=n.length,t[2]/=n.length,t}function N_(n,t){const i=j1(n,0,0),s=j1(n,n.width-1,0),u=j1(n,0,n.height-1),c=j1(n,n.width-1,n.height-1),f=t||10;if(Wp(i,s)<f&&Wp(s,c)<f&&Wp(c,u)<f&&Wp(u,i)<f){const p=M_([s,i,c,u]),m=[];for(let S=0;S<n.width*n.height;S++){const b=Wp(p,[n.data[S*4],n.data[S*4+1],n.data[S*4+2]]);m[S]=b<f?0:255}return m}}function O_(n,t){for(let i=0;i<n.width*n.height;i++)n.data[4*i+3]=t[i]}function R_(n,t,i){const s=[1,1,1,1,0,1,1,1,1],u=Math.round(Math.sqrt(s.length)),c=Math.floor(u/2),f=[];for(let p=0;p<i;p++)for(let m=0;m<t;m++){const S=p*t+m;let b=0;for(let _=0;_<u;_++)for(let x=0;x<u;x++){const D=p+_-c,A=m+x-c;if(D>=0&&D<i&&A>=0&&A<t){const N=D*t+A,O=s[_*u+x];b+=n[N]*O}}f[S]=b===2040?255:0}return f}function z_(n,t,i){const s=[1,1,1,1,1,1,1,1,1],u=Math.round(Math.sqrt(s.length)),c=Math.floor(u/2),f=[];for(let p=0;p<i;p++)for(let m=0;m<t;m++){const S=p*t+m;let b=0;for(let _=0;_<u;_++)for(let x=0;x<u;x++){const D=p+_-c,A=m+x-c;if(D>=0&&D<i&&A>=0&&A<t){const N=D*t+A,O=s[_*u+x];b+=n[N]*O}}f[S]=b>=1020?255:0}return f}function H_(n,t,i){const s=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],u=Math.round(Math.sqrt(s.length)),c=Math.floor(u/2),f=[];for(let p=0;p<i;p++)for(let m=0;m<t;m++){const S=p*t+m;let b=0;for(let _=0;_<u;_++)for(let x=0;x<u;x++){const D=p+_-c,A=m+x-c;if(D>=0&&D<i&&A>=0&&A<t){const N=D*t+A,O=s[_*u+x];b+=n[N]*O}}f[S]=b}return f}const w_=function(n){const t=this.threshold();let i=N_(n,t);return i&&(i=R_(i,n.width,n.height),i=z_(i,n.width,n.height),i=H_(i,n.width,n.height),O_(n,i)),n};V.addGetterSetter(At,"threshold",0,xt(),V.afterSetFilter);const U_=function(n){const t=this.noise()*255,i=n.data,s=i.length,u=t/2;for(let c=0;c<s;c+=4)i[c+0]+=u-2*u*Math.random(),i[c+1]+=u-2*u*Math.random(),i[c+2]+=u-2*u*Math.random()};V.addGetterSetter(At,"noise",.2,xt(),V.afterSetFilter);const B_=function(n){let t=Math.ceil(this.pixelSize()),i=n.width,s=n.height,u=Math.ceil(i/t),c=Math.ceil(s/t),f=n.data;if(t<=0){W.error("pixelSize value can not be <= 0");return}for(let p=0;p<u;p+=1)for(let m=0;m<c;m+=1){let S=0,b=0,_=0,x=0;const D=p*t,A=D+t,N=m*t,O=N+t;let R=0;for(let U=D;U<A;U+=1)if(!(U>=i))for(let j=N;j<O;j+=1){if(j>=s)continue;const G=(i*j+U)*4;S+=f[G+0],b+=f[G+1],_+=f[G+2],x+=f[G+3],R+=1}S=S/R,b=b/R,_=_/R,x=x/R;for(let U=D;U<A;U+=1)if(!(U>=i))for(let j=N;j<O;j+=1){if(j>=s)continue;const G=(i*j+U)*4;f[G+0]=S,f[G+1]=b,f[G+2]=_,f[G+3]=x}}};V.addGetterSetter(At,"pixelSize",8,xt(),V.afterSetFilter);const V_=function(n){const t=Math.round(this.levels()*254)+1,i=n.data,s=i.length,u=255/t;for(let c=0;c<s;c+=1)i[c]=Math.floor(i[c]/u)*u};V.addGetterSetter(At,"levels",.5,xt(),V.afterSetFilter);const G_=function(n){const t=n.data,i=t.length,s=this.red(),u=this.green(),c=this.blue();for(let f=0;f<i;f+=4){const p=(.34*t[f]+.5*t[f+1]+.16*t[f+2])/255;t[f]=p*s,t[f+1]=p*u,t[f+2]=p*c,t[f+3]=t[f+3]}};V.addGetterSetter(At,"red",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),V.addGetterSetter(At,"green",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),V.addGetterSetter(At,"blue",0,m5,V.afterSetFilter);const j_=function(n){const t=n.data,i=t.length,s=this.red(),u=this.green(),c=this.blue(),f=this.alpha();for(let p=0;p<i;p+=4){const m=1-f;t[p]=s*f+t[p]*m,t[p+1]=u*f+t[p+1]*m,t[p+2]=c*f+t[p+2]*m}};V.addGetterSetter(At,"red",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),V.addGetterSetter(At,"green",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),V.addGetterSetter(At,"blue",0,m5,V.afterSetFilter),V.addGetterSetter(At,"alpha",1,function(n){return this._filterUpToDate=!1,n>1?1:n<0?0:n});const L_=function(n){const t=n.data,i=t.length;for(let s=0;s<i;s+=4){const u=t[s+0],c=t[s+1],f=t[s+2];t[s+0]=Math.min(255,u*.393+c*.769+f*.189),t[s+1]=Math.min(255,u*.349+c*.686+f*.168),t[s+2]=Math.min(255,u*.272+c*.534+f*.131)}},P_=function(n){const i=n.data;for(let s=0;s<i.length;s+=4){const u=i[s],c=i[s+1],f=i[s+2];.2126*u+.7152*c+.0722*f>=128&&(i[s]=255-u,i[s+1]=255-c,i[s+2]=255-f)}return n},Y_=function(n){const t=this.threshold()*255,i=n.data,s=i.length;for(let u=0;u<s;u+=1)i[u]=i[u]<t?0:255};V.addGetterSetter(At,"threshold",.5,xt(),V.afterSetFilter),ah.Util._assign(ah,{Arc:Ur,Arrow:hc,Circle:ih,Ellipse:Xo,Image:cl,Label:j2,Tag:dc,Line:Br,Path:Ts,Rect:kp,RegularPolygon:Ko,Ring:pc,Sprite:kl,Star:Qo,Text:on,TextPath:fa,Transformer:be,Wedge:Vr,Filters:{Blur:m_,Brightness:y_,Brighten:g_,Contrast:v_,Emboss:S_,Enhance:b_,Grayscale:E_,HSL:T_,HSV:C_,Invert:__,Kaleidoscope:A_,Mask:w_,Noise:U_,Pixelate:B_,Posterize:V_,RGB:G_,RGBA:j_,Sepia:L_,Solarize:P_,Threshold:Y_}});function X2(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var L1={exports:{}},K2={exports:{}},P1={exports:{}},Q2={};var h4;function q_(){return h4||(h4=1,(function(n){function t(H,Q){var K=H.length;H.push(Q);t:for(;0<K;){var pt=K-1>>>1,dt=H[pt];if(0<u(dt,Q))H[pt]=Q,H[K]=dt,K=pt;else break t}}function i(H){return H.length===0?null:H[0]}function s(H){if(H.length===0)return null;var Q=H[0],K=H.pop();if(K!==Q){H[0]=K;t:for(var pt=0,dt=H.length,$=dt>>>1;pt<$;){var Et=2*(pt+1)-1,Rt=H[Et],qt=Et+1,Bt=H[qt];if(0>u(Rt,K))qt<dt&&0>u(Bt,Rt)?(H[pt]=Bt,H[qt]=K,pt=qt):(H[pt]=Rt,H[Et]=K,pt=Et);else if(qt<dt&&0>u(Bt,K))H[pt]=Bt,H[qt]=K,pt=qt;else break t}}return Q}function u(H,Q){var K=H.sortIndex-Q.sortIndex;return K!==0?K:H.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var f=Date,p=f.now();n.unstable_now=function(){return f.now()-p}}var m=[],S=[],b=1,_=null,x=3,D=!1,A=!1,N=!1,O=!1,R=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function G(H){for(var Q=i(S);Q!==null;){if(Q.callback===null)s(S);else if(Q.startTime<=H)s(S),Q.sortIndex=Q.expirationTime,t(m,Q);else break;Q=i(S)}}function k(H){if(N=!1,G(H),!A)if(i(m)!==null)A=!0,et||(et=!0,nt());else{var Q=i(S);Q!==null&&tt(k,Q.startTime-H)}}var et=!1,ft=-1,I=5,it=-1;function J(){return O?!0:!(n.unstable_now()-it<I)}function St(){if(O=!1,et){var H=n.unstable_now();it=H;var Q=!0;try{t:{A=!1,N&&(N=!1,U(ft),ft=-1),D=!0;var K=x;try{e:{for(G(H),_=i(m);_!==null&&!(_.expirationTime>H&&J());){var pt=_.callback;if(typeof pt=="function"){_.callback=null,x=_.priorityLevel;var dt=pt(_.expirationTime<=H);if(H=n.unstable_now(),typeof dt=="function"){_.callback=dt,G(H),Q=!0;break e}_===i(m)&&s(m),G(H)}else s(m);_=i(m)}if(_!==null)Q=!0;else{var $=i(S);$!==null&&tt(k,$.startTime-H),Q=!1}}break t}finally{_=null,x=K,D=!1}Q=void 0}}finally{Q?nt():et=!1}}}var nt;if(typeof j=="function")nt=function(){j(St)};else if(typeof MessageChannel<"u"){var ht=new MessageChannel,yt=ht.port2;ht.port1.onmessage=St,nt=function(){yt.postMessage(null)}}else nt=function(){R(St,0)};function tt(H,Q){ft=R(function(){H(n.unstable_now())},Q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(H){H.callback=null},n.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<H?Math.floor(1e3/H):5},n.unstable_getCurrentPriorityLevel=function(){return x},n.unstable_next=function(H){switch(x){case 1:case 2:case 3:var Q=3;break;default:Q=x}var K=x;x=Q;try{return H()}finally{x=K}},n.unstable_requestPaint=function(){O=!0},n.unstable_runWithPriority=function(H,Q){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var K=x;x=H;try{return Q()}finally{x=K}},n.unstable_scheduleCallback=function(H,Q,K){var pt=n.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?pt+K:pt):K=pt,H){case 1:var dt=-1;break;case 2:dt=250;break;case 5:dt=1073741823;break;case 4:dt=1e4;break;default:dt=5e3}return dt=K+dt,H={id:b++,callback:Q,priorityLevel:H,startTime:K,expirationTime:dt,sortIndex:-1},K>pt?(H.sortIndex=K,t(S,H),i(m)===null&&H===i(S)&&(N?(U(ft),ft=-1):N=!0,tt(k,K-pt))):(H.sortIndex=dt,t(m,H),A||D||(A=!0,et||(et=!0,nt()))),H},n.unstable_shouldYield=J,n.unstable_wrapCallback=function(H){var Q=x;return function(){var K=x;x=Q;try{return H.apply(this,arguments)}finally{x=K}}}})(Q2)),Q2}var Z2={};var d4;function X_(){return d4||(d4=1,(function(n){process.env.NODE_ENV!=="production"&&(function(){function t(){if(k=!1,it){var H=n.unstable_now();nt=H;var Q=!0;try{t:{j=!1,G&&(G=!1,ft(J),J=-1),U=!0;var K=R;try{e:{for(f(H),O=s(D);O!==null&&!(O.expirationTime>H&&m());){var pt=O.callback;if(typeof pt=="function"){O.callback=null,R=O.priorityLevel;var dt=pt(O.expirationTime<=H);if(H=n.unstable_now(),typeof dt=="function"){O.callback=dt,f(H),Q=!0;break e}O===s(D)&&u(D),f(H)}else u(D);O=s(D)}if(O!==null)Q=!0;else{var $=s(A);$!==null&&S(p,$.startTime-H),Q=!1}}break t}finally{O=null,R=K,U=!1}Q=void 0}}finally{Q?ht():it=!1}}}function i(H,Q){var K=H.length;H.push(Q);t:for(;0<K;){var pt=K-1>>>1,dt=H[pt];if(0<c(dt,Q))H[pt]=Q,H[K]=dt,K=pt;else break t}}function s(H){return H.length===0?null:H[0]}function u(H){if(H.length===0)return null;var Q=H[0],K=H.pop();if(K!==Q){H[0]=K;t:for(var pt=0,dt=H.length,$=dt>>>1;pt<$;){var Et=2*(pt+1)-1,Rt=H[Et],qt=Et+1,Bt=H[qt];if(0>c(Rt,K))qt<dt&&0>c(Bt,Rt)?(H[pt]=Bt,H[qt]=K,pt=qt):(H[pt]=Rt,H[Et]=K,pt=Et);else if(qt<dt&&0>c(Bt,K))H[pt]=Bt,H[qt]=K,pt=qt;else break t}}return Q}function c(H,Q){var K=H.sortIndex-Q.sortIndex;return K!==0?K:H.id-Q.id}function f(H){for(var Q=s(A);Q!==null;){if(Q.callback===null)u(A);else if(Q.startTime<=H)u(A),Q.sortIndex=Q.expirationTime,i(D,Q);else break;Q=s(A)}}function p(H){if(G=!1,f(H),!j)if(s(D)!==null)j=!0,it||(it=!0,ht());else{var Q=s(A);Q!==null&&S(p,Q.startTime-H)}}function m(){return k?!0:!(n.unstable_now()-nt<St)}function S(H,Q){J=et(function(){H(n.unstable_now())},Q)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var b=performance;n.unstable_now=function(){return b.now()}}else{var _=Date,x=_.now();n.unstable_now=function(){return _.now()-x}}var D=[],A=[],N=1,O=null,R=3,U=!1,j=!1,G=!1,k=!1,et=typeof setTimeout=="function"?setTimeout:null,ft=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null,it=!1,J=-1,St=5,nt=-1;if(typeof I=="function")var ht=function(){I(t)};else if(typeof MessageChannel<"u"){var yt=new MessageChannel,tt=yt.port2;yt.port1.onmessage=t,ht=function(){tt.postMessage(null)}}else ht=function(){et(t,0)};n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(H){H.callback=null},n.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):St=0<H?Math.floor(1e3/H):5},n.unstable_getCurrentPriorityLevel=function(){return R},n.unstable_next=function(H){switch(R){case 1:case 2:case 3:var Q=3;break;default:Q=R}var K=R;R=Q;try{return H()}finally{R=K}},n.unstable_requestPaint=function(){k=!0},n.unstable_runWithPriority=function(H,Q){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var K=R;R=H;try{return Q()}finally{R=K}},n.unstable_scheduleCallback=function(H,Q,K){var pt=n.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?pt+K:pt):K=pt,H){case 1:var dt=-1;break;case 2:dt=250;break;case 5:dt=1073741823;break;case 4:dt=1e4;break;default:dt=5e3}return dt=K+dt,H={id:N++,callback:Q,priorityLevel:H,startTime:K,expirationTime:dt,sortIndex:-1},K>pt?(H.sortIndex=K,i(A,H),s(D)===null&&H===s(A)&&(G?(ft(J),J=-1):G=!0,S(p,K-pt))):(H.sortIndex=dt,i(D,H),j||U||(j=!0,it||(it=!0,ht()))),H},n.unstable_shouldYield=m,n.unstable_wrapCallback=function(H){var Q=R;return function(){var K=R;R=Q;try{return H.apply(this,arguments)}finally{R=K}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})(Z2)),Z2}var p4;function J2(){return p4||(p4=1,process.env.NODE_ENV==="production"?P1.exports=q_():P1.exports=X_()),P1.exports}var m4;function K_(){return m4||(m4=1,(function(n){n.exports=function(t){function i(l,r,h,g){return new vd(l,r,h,g)}function s(){}function u(l){var r="https://react.dev/errors/"+l;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)r+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+l+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(l){var r=l,h=l;if(l.alternate)for(;r.return;)r=r.return;else{l=r;do r=l,(r.flags&4098)!==0&&(h=r.return),l=r.return;while(l)}return r.tag===3?h:null}function f(l){if(c(l)!==l)throw Error(u(188))}function p(l){var r=l.alternate;if(!r){if(r=c(l),r===null)throw Error(u(188));return r!==l?null:l}for(var h=l,g=r;;){var E=h.return;if(E===null)break;var T=E.alternate;if(T===null){if(g=E.return,g!==null){h=g;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===h)return f(E),l;if(T===g)return f(E),r;T=T.sibling}throw Error(u(188))}if(h.return!==g.return)h=E,g=T;else{for(var z=!1,L=E.child;L;){if(L===h){z=!0,h=E,g=T;break}if(L===g){z=!0,g=E,h=T;break}L=L.sibling}if(!z){for(L=T.child;L;){if(L===h){z=!0,h=T,g=E;break}if(L===g){z=!0,g=T,h=E;break}L=L.sibling}if(!z)throw Error(u(189))}}if(h.alternate!==g)throw Error(u(190))}if(h.tag!==3)throw Error(u(188));return h.stateNode.current===h?l:r}function m(l){var r=l.tag;if(r===5||r===26||r===27||r===6)return l;for(l=l.child;l!==null;){if(r=m(l),r!==null)return r;l=l.sibling}return null}function S(l){var r=l.tag;if(r===5||r===26||r===27||r===6)return l;for(l=l.child;l!==null;){if(l.tag!==4&&(r=S(l),r!==null))return r;l=l.sibling}return null}function b(l){return l===null||typeof l!="object"?null:(l=Sm&&l[Sm]||l["@@iterator"],typeof l=="function"?l:null)}function _(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===bm?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case oo:return"Fragment";case mf:return"Profiler";case ym:return"StrictMode";case uo:return"Suspense";case Ue:return"SuspenseList";case xd:return"Activity"}if(typeof l=="object")switch(l.$$typeof){case pr:return"Portal";case zl:return l.displayName||"Context";case _d:return(l._context.displayName||"Context")+".Consumer";case _u:var r=l.render;return l=l.displayName,l||(l=r.displayName||r.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case vm:return r=l.displayName||null,r!==null?r:_(l.type)||"Memo";case mr:r=l._payload,l=l._init;try{return _(l(r))}catch{}}return null}function x(l){return{current:l}}function D(l){0>Ou||(l.current=_f[Ou],_f[Ou]=null,Ou--)}function A(l,r){Ou++,_f[Ou]=l.current,l.current=r}function N(l){return l>>>=0,l===0?32:31-(My(l)/Ny|0)|0}function O(l){var r=l&42;if(r!==0)return r;switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function R(l,r,h){var g=l.pendingLanes;if(g===0)return 0;var E=0,T=l.suspendedLanes,z=l.pingedLanes;l=l.warmLanes;var L=g&134217727;return L!==0?(g=L&~T,g!==0?E=O(g):(z&=L,z!==0?E=O(z):h||(h=L&~l,h!==0&&(E=O(h))))):(L=g&~T,L!==0?E=O(L):z!==0?E=O(z):h||(h=g&~l,h!==0&&(E=O(h)))),E===0?0:r!==0&&r!==E&&(r&T)===0&&(T=E&-E,h=r&-r,T>=h||T===32&&(h&4194048)!==0)?r:E}function U(l,r){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&r)===0}function j(l,r){switch(l){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function G(){var l=Ru;return Ru<<=1,(Ru&62914560)===0&&(Ru=4194304),l}function k(l){for(var r=[],h=0;31>h;h++)r.push(l);return r}function et(l,r){l.pendingLanes|=r,r!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function ft(l,r,h,g,E,T){var z=l.pendingLanes;l.pendingLanes=h,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=h,l.entangledLanes&=h,l.errorRecoveryDisabledLanes&=h,l.shellSuspendCounter=0;var L=l.entanglements,ut=l.expirationTimes,vt=l.hiddenUpdates;for(h=z&~h;0<h;){var Dt=31-ii(h),_t=1<<Dt;L[Dt]=0,ut[Dt]=-1;var Nt=vt[Dt];if(Nt!==null)for(vt[Dt]=null,Dt=0;Dt<Nt.length;Dt++){var Xt=Nt[Dt];Xt!==null&&(Xt.lane&=-536870913)}h&=~_t}g!==0&&I(l,g,0),T!==0&&E===0&&l.tag!==0&&(l.suspendedLanes|=T&~(z&~r))}function I(l,r,h){l.pendingLanes|=r,l.suspendedLanes&=~r;var g=31-ii(r);l.entangledLanes|=r,l.entanglements[g]=l.entanglements[g]|1073741824|h&261930}function it(l,r){var h=l.entangledLanes|=r;for(l=l.entanglements;h;){var g=31-ii(h),E=1<<g;E&r|l[g]&r&&(l[g]|=r),h&=~E}}function J(l,r){var h=r&-r;return h=(h&42)!==0?1:St(h),(h&(l.suspendedLanes|r))!==0?0:h}function St(l){switch(l){case 2:l=1;break;case 8:l=4;break;case 32:l=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:l=128;break;case 268435456:l=134217728;break;default:l=0}return l}function nt(l){return l&=-l,2<l?8<l?(l&134217727)!==0?32:268435456:8:2}function ht(l){if(typeof Pd=="function"&&Bm(l),zn&&typeof zn.setStrictMode=="function")try{zn.setStrictMode(vo,l)}catch{}}function yt(l,r){return l===r&&(l!==0||1/l===1/r)||l!==l&&r!==r}function tt(l){if(Hu===void 0)try{throw Error()}catch(h){var r=h.stack.trim().match(/\n( *(at )?)/);Hu=r&&r[1]||"",li=-1<h.stack.indexOf(`
|
|
16
16
|
at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
17
|
-
`+
|
|
17
|
+
`+Hu+l+li}function H(l,r){if(!l||Af)return"";Af=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var g={DetermineComponentFrameRoot:function(){try{if(r){var _t=function(){throw Error()};if(Object.defineProperty(_t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_t,[])}catch(Xt){var Nt=Xt}Reflect.construct(l,[],_t)}else{try{_t.call()}catch(Xt){Nt=Xt}l.call(_t.prototype)}}else{try{throw Error()}catch(Xt){Nt=Xt}(_t=l())&&typeof _t.catch=="function"&&_t.catch(function(){})}}catch(Xt){if(Xt&&Nt&&typeof Xt.stack=="string")return[Xt.stack,Nt.stack]}return[null,null]}};g.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var E=Object.getOwnPropertyDescriptor(g.DetermineComponentFrameRoot,"name");E&&E.configurable&&Object.defineProperty(g.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var T=g.DetermineComponentFrameRoot(),z=T[0],L=T[1];if(z&&L){var ut=z.split(`
|
|
18
18
|
`),vt=L.split(`
|
|
19
|
-
`);for(E=g=0;g<
|
|
20
|
-
`+
|
|
19
|
+
`);for(E=g=0;g<ut.length&&!ut[g].includes("DetermineComponentFrameRoot");)g++;for(;E<vt.length&&!vt[E].includes("DetermineComponentFrameRoot");)E++;if(g===ut.length||E===vt.length)for(g=ut.length-1,E=vt.length-1;1<=g&&0<=E&&ut[g]!==vt[E];)E--;for(;1<=g&&0<=E;g--,E--)if(ut[g]!==vt[E]){if(g!==1||E!==1)do if(g--,E--,0>E||ut[g]!==vt[E]){var Dt=`
|
|
20
|
+
`+ut[g].replace(" at new "," at ");return l.displayName&&Dt.includes("<anonymous>")&&(Dt=Dt.replace("<anonymous>",l.displayName)),Dt}while(1<=g&&0<=E);break}}}finally{Af=!1,Error.prepareStackTrace=h}return(h=l?l.displayName||l.name:"")?tt(h):""}function Q(l,r){switch(l.tag){case 26:case 27:case 5:return tt(l.type);case 16:return tt("Lazy");case 13:return l.child!==r&&r!==null?tt("Suspense Fallback"):tt("Suspense");case 19:return tt("SuspenseList");case 0:case 15:return H(l.type,!1);case 11:return H(l.type.render,!1);case 1:return H(l.type,!0);case 31:return tt("Activity");default:return""}}function K(l){try{var r="",h=null;do r+=Q(l,h),h=l,l=l.return;while(l);return r}catch(g){return`
|
|
21
21
|
Error generating stack: `+g.message+`
|
|
22
|
-
`+g.stack}}function at(l,r){if(typeof l=="object"&&l!==null){var h=Ry.get(l);return h!==void 0?h:(r={value:l,source:r,stack:K(r)},Ry.set(l,r),r)}return{value:l,source:r,stack:K(r)}}function St(l,r){mo[Hu++]=rt,mo[Hu++]=Pn,Pn=l,rt=r}function W(l,r,h){Ui[Bi++]=Xa,Ui[Bi++]=qs,Ui[Bi++]=Hl,Hl=l;var g=Xa;l=qs;var E=32-ii(g)-1;g&=~(1<<E),h+=1;var T=32-ii(r)+E;if(30<T){var z=E-E%5;T=(g&(1<<z)-1).toString(32),g>>=z,E-=z,Xa=1<<32-ii(r)+E|h<<E|g,qs=T+l}else Xa=1<<T|h<<E|g,qs=l}function gt(l){l.return!==null&&(St(l,1),W(l,1,0))}function Tt(l){for(;l===Pn;)Pn=mo[--Hu],mo[Hu]=null,rt=mo[--Hu],mo[Hu]=null;for(;l===Hl;)Hl=Ui[--Bi],Ui[Bi]=null,qs=Ui[--Bi],Ui[Bi]=null,Xa=Ui[--Bi],Ui[Bi]=null}function Pt(l,r){Ui[Bi++]=Xa,Ui[Bi++]=qs,Ui[Bi++]=Hl,Xa=r.id,qs=r.overflow,Hl=l}function le(l,r){A(dr,r),A(_f,l),A(ba,null),l=n3(r),D(ba),A(ba,l)}function xn(){D(ba),D(_f),D(dr)}function xe(l){l.memoizedState!==null&&A(Ld,l);var r=ba.current,h=Yg(r,l.type);r!==h&&(A(_f,l),A(ba,h))}function Dn(l){_f.current===l&&(D(ba),D(_f)),Ld.current===l&&(D(Ld),Hi?fr._currentValue=qa:fr._currentValue2=qa)}function ln(l){var r=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw An(at(r,l)),Bm}function Be(l,r){if(!ya)throw Error(u(175));Du(l.stateNode,l.type,l.memoizedProps,r,l)||ln(l,!0)}function At(l){for(Fn=l.return;Fn;)switch(Fn.tag){case 5:case 31:case 13:Vi=!1;return;case 27:case 3:Vi=!0;return;default:Fn=Fn.return}}function ue(l){if(!ya||l!==Fn)return!1;if(!se)return At(l),se=!0,!1;var r=l.tag;if(Ln?r!==3&&r!==27&&(r!==5||Cy(l.type)&&!pf(l.type,l.memoizedProps))&&We&&ln(l):r!==3&&(r!==5||Cy(l.type)&&!pf(l.type,l.memoizedProps))&&We&&ln(l),At(l),r===13){if(!ya)throw Error(u(316));if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(u(317));We=yy(l)}else if(r===31){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(u(317));We=gy(l)}else We=Ln&&r===27?fy(l.type,We):Fn?Am(l.stateNode):null;return!0}function ta(){ya&&(We=Fn=null,se=!1)}function ea(){var l=wl;return l!==null&&(ui===null?ui=l:ui.push.apply(ui,l),wl=null),l}function An(l){wl===null?wl=[l]:wl.push(l)}function Ba(l,r,h){Hi?(A(Xs,r._currentValue),r._currentValue=h):(A(Xs,r._currentValue2),r._currentValue2=h)}function rn(l){var r=Xs.current;Hi?l._currentValue=r:l._currentValue2=r,D(Xs)}function ha(l,r,h){for(;l!==null;){var g=l.alternate;if((l.childLanes&r)!==r?(l.childLanes|=r,g!==null&&(g.childLanes|=r)):g!==null&&(g.childLanes&r)!==r&&(g.childLanes|=r),l===h)break;l=l.return}}function Ji(l,r,h,g){var E=l.child;for(E!==null&&(E.return=l);E!==null;){var T=E.dependencies;if(T!==null){var z=E.child;T=T.firstContext;t:for(;T!==null;){var L=T;T=E;for(var ft=0;ft<r.length;ft++)if(L.context===r[ft]){T.lanes|=h,L=T.alternate,L!==null&&(L.lanes|=h),ha(T.return,h,l),g||(z=null);break t}T=L.next}}else if(E.tag===18){if(z=E.return,z===null)throw Error(u(341));z.lanes|=h,T=z.alternate,T!==null&&(T.lanes|=h),ha(z,h,l),z=null}else z=E.child;if(z!==null)z.return=E;else for(z=E;z!==null;){if(z===l){z=null;break}if(E=z.sibling,E!==null){E.return=z.return,z=E;break}z=z.return}E=z}}function di(l,r,h,g){l=null;for(var E=r,T=!1;E!==null;){if(!T){if((E.flags&524288)!==0)T=!0;else if((E.flags&262144)!==0)break}if(E.tag===10){var z=E.alternate;if(z===null)throw Error(u(387));if(z=z.memoizedProps,z!==null){var L=E.type;Sa(E.pendingProps.value,z.value)||(l!==null?l.push(L):l=[L])}}else if(E===Ld.current){if(z=E.alternate,z===null)throw Error(u(387));z.memoizedState.memoizedState!==E.memoizedState.memoizedState&&(l!==null?l.push(fr):l=[fr])}E=E.return}l!==null&&Ji(r,l,h,g),r.flags|=262144}function Fi(l){for(l=l.firstContext;l!==null;){var r=l.context;if(!Sa(Hi?r._currentValue:r._currentValue2,l.memoizedValue))return!0;l=l.next}return!1}function Mn(l){Ka=l,$e=null,l=l.dependencies,l!==null&&(l.firstContext=null)}function on(l){return Ut(Ka,l)}function Mi(l,r){return Ka===null&&Mn(l),Ut(l,r)}function Ut(l,r){var h=Hi?r._currentValue:r._currentValue2;if(r={context:r,memoizedValue:h,next:null},$e===null){if(l===null)throw Error(u(308));$e=r,l.dependencies={lanes:0,firstContext:r},l.flags|=524288}else $e=$e.next=r;return h}function Ae(){return{controller:new Ks,data:new Map,refCount:0}}function jn(l){l.refCount--,l.refCount===0&&Na(m3,function(){l.controller.abort()})}function Va(){}function ke(l){l!==ri&&l.next===null&&(ri===null?zn=ri=l:ri=ri.next=l),wu=!0,Vm||(Vm=!0,Cg())}function mn(l,r){if(!go&&wu){go=!0;do for(var h=!1,g=zn;g!==null;){if(l!==0){var E=g.pendingLanes;if(E===0)var T=0;else{var z=g.suspendedLanes,L=g.pingedLanes;T=(1<<31-ii(42|l)+1)-1,T&=E&~(z&~L),T=T&201326741?T&201326741|1:T?T|2:0}T!==0&&(h=!0,Pr(g,T))}else T=ce,T=O(g,g===Le?T:0,g.cancelPendingCommit!==null||g.timeoutHandle!==Ml),(T&3)===0||U(g,T)||(h=!0,Pr(g,T));g=g.next}while(h);go=!1}}function eu(){Lr()}function Lr(){wu=Vm=!1;var l=0;hs!==0&&Tm()&&(l=hs);for(var r=Me(),h=null,g=zn;g!==null;){var E=g.next,T=nu(g,r);T===0?(g.next=null,h===null?zn=E:h.next=E,E===null&&(ri=h)):(h=g,(l!==0||(T&3)!==0)&&(wu=!0)),g=E}we!==0&&we!==5||mn(l),hs!==0&&(hs=0)}function nu(l,r){for(var h=l.suspendedLanes,g=l.pingedLanes,E=l.expirationTimes,T=l.pendingLanes&-62914561;0<T;){var z=31-ii(T),L=1<<z,ft=E[z];ft===-1?((L&h)===0||(L&g)!==0)&&(E[z]=j(L,r)):ft<=r&&(l.expiredLanes|=L),T&=~L}if(r=Le,h=ce,h=O(l,l===r?h:0,l.cancelPendingCommit!==null||l.timeoutHandle!==Ml),g=l.callbackNode,h===0||l===r&&(He===2||He===9)||l.cancelPendingCommit!==null)return g!==null&&g!==null&&ae(g),l.callbackNode=null,l.callbackPriority=0;if((h&3)===0||U(l,h)){if(r=h&-h,r===l.callbackPriority)return r;switch(g!==null&&ae(g),lt(h)){case 2:case 8:h=Rl;break;case 32:h=zl;break;case 268435456:h=Ru;break;default:h=zl}return g=da.bind(null,l),h=Vd(h,g),l.callbackPriority=r,l.callbackNode=h,r}return g!==null&&g!==null&&ae(g),l.callbackPriority=2,l.callbackNode=null,2}function da(l,r){if(we!==0&&we!==5)return l.callbackNode=null,l.callbackPriority=0,null;var h=l.callbackNode;if(On()&&l.callbackNode!==h)return null;var g=ce;return g=O(l,l===Le?g:0,l.cancelPendingCommit!==null||l.timeoutHandle!==Ml),g===0?null:(am(l,g,r),nu(l,Me()),l.callbackNode!=null&&l.callbackNode===h?da.bind(null,l):null)}function Pr(l,r){if(On())return null;am(l,r,!0)}function Cg(){kg?Ps(function(){(re&6)!==0?Vd(Oy,eu):Lr()}):Vd(Oy,eu)}function Yr(){if(hs===0){var l=Uu;l===0&&(l=Ef,Ef<<=1,(Ef&261888)===0&&(Ef=256)),hs=l}return hs}function au(l,r){if(xf===null){var h=xf=[];Gm=0,Uu=Yr(),Bu={status:"pending",value:void 0,then:function(g){h.push(g)}}}return Gm++,r.then(Ht,Ht),r}function Ht(){if(--Gm===0&&xf!==null){Bu!==null&&(Bu.status="fulfilled");var l=xf;xf=null,Uu=0,Bu=null;for(var r=0;r<l.length;r++)(0,l[r])()}}function ge(l,r){var h=[],g={status:"pending",value:null,reason:null,then:function(E){h.push(E)}};return l.then(function(){g.status="fulfilled",g.value=r;for(var E=0;E<h.length;E++)(0,h[E])(r)},function(E){for(g.status="rejected",g.reason=E,E=0;E<h.length;E++)(0,h[E])(void 0)}),g}function qr(){var l=pr.current;return l!==null?l:Le.pooledCache}function Wl(l,r){r===null?A(pr,pr.current):A(pr,r.pool)}function Nh(){var l=qr();return l===null?null:{parent:Hi?cn._currentValue:cn._currentValue2,pool:l}}function _c(l,r){if(Sa(l,r))return!0;if(typeof l!="object"||l===null||typeof r!="object"||r===null)return!1;var h=Object.keys(l),g=Object.keys(r);if(h.length!==g.length)return!1;for(g=0;g<h.length;g++){var E=h[g];if(!Um.call(r,E)||!Sa(l[E],r[E]))return!1}return!0}function O0(l){return l=l.status,l==="fulfilled"||l==="rejected"}function fl(l,r,h){switch(h=l[h],h===void 0?l.push(r):h!==r&&(r.then(Va,Va),r=h),r.status){case"fulfilled":return r.value;case"rejected":throw l=r.reason,Xr(l),l;default:if(typeof r.status=="string")r.then(Va,Va);else{if(l=Le,l!==null&&100<l.shellSuspendCounter)throw Error(u(482));l=r,l.status="pending",l.then(function(g){if(r.status==="pending"){var E=r;E.status="fulfilled",E.value=g}},function(g){if(r.status==="pending"){var E=r;E.status="rejected",E.reason=g}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw l=r.reason,Xr(l),l}throw Gi=r,Vu}}function Wa(l){try{var r=l._init;return r(l._payload)}catch(h){throw h!==null&&typeof h=="object"&&typeof h.then=="function"?(Gi=h,Vu):h}}function xc(){if(Gi===null)throw Error(u(459));var l=Gi;return Gi=null,l}function Xr(l){if(l===Vu||l===qd)throw Error(u(483))}function pi(l){var r=Df;return Df+=1,ji===null&&(ji=[]),fl(ji,l,r)}function Kr(l,r){r=r.props.ref,l.ref=r!==void 0?r:null}function Qr(l,r){throw r.$$typeof===bd?Error(u(525)):(l=Object.prototype.toString.call(r),Error(u(31,l==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":l)))}function R0(l){function r(it,J){if(l){var ut=it.deletions;ut===null?(it.deletions=[J],it.flags|=16):ut.push(J)}}function h(it,J){if(!l)return null;for(;J!==null;)r(it,J),J=J.sibling;return null}function g(it){for(var J=new Map;it!==null;)it.key!==null?J.set(it.key,it):J.set(it.index,it),it=it.sibling;return J}function E(it,J){return it=Vs(it,J),it.index=0,it.sibling=null,it}function T(it,J,ut){return it.index=ut,l?(ut=it.alternate,ut!==null?(ut=ut.index,ut<J?(it.flags|=67108866,J):ut):(it.flags|=67108866,J)):(it.flags|=1048576,J)}function z(it){return l&&it.alternate===null&&(it.flags|=67108866),it}function L(it,J,ut,_t){return J===null||J.tag!==6?(J=of(ut,it.mode,_t),J.return=it,J):(J=E(J,ut),J.return=it,J)}function ft(it,J,ut,_t){var jt=ut.type;return jt===io?Mt(it,J,ut.props.children,_t,ut.key):J!==null&&(J.elementType===jt||typeof jt=="object"&&jt!==null&&jt.$$typeof===ur&&Wa(jt)===J.type)?(J=E(J,ut.props),Kr(J,ut),J.return=it,J):(J=rf(ut.type,ut.key,ut.props,null,it.mode,_t),Kr(J,ut),J.return=it,J)}function vt(it,J,ut,_t){return J===null||J.tag!==4||J.stateNode.containerInfo!==ut.containerInfo||J.stateNode.implementation!==ut.implementation?(J=yd(ut,it.mode,_t),J.return=it,J):(J=E(J,ut.children||[]),J.return=it,J)}function Mt(it,J,ut,_t,jt){return J===null||J.tag!==7?(J=Dl(ut,it.mode,_t,jt),J.return=it,J):(J=E(J,ut),J.return=it,J)}function xt(it,J,ut){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return J=of(""+J,it.mode,ut),J.return=it,J;if(typeof J=="object"&&J!==null){switch(J.$$typeof){case cf:return ut=rf(J.type,J.key,J.props,null,it.mode,ut),Kr(ut,J),ut.return=it,ut;case or:return J=yd(J,it.mode,ut),J.return=it,J;case ur:return J=Wa(J),xt(it,J,ut)}if(cr(J)||b(J))return J=Dl(J,it.mode,ut,null),J.return=it,J;if(typeof J.then=="function")return xt(it,pi(J),ut);if(J.$$typeof===Al)return xt(it,Mi(it,J),ut);Qr(it,J)}return null}function Rt(it,J,ut,_t){var jt=J!==null?J.key:null;if(typeof ut=="string"&&ut!==""||typeof ut=="number"||typeof ut=="bigint")return jt!==null?null:L(it,J,""+ut,_t);if(typeof ut=="object"&&ut!==null){switch(ut.$$typeof){case cf:return ut.key===jt?ft(it,J,ut,_t):null;case or:return ut.key===jt?vt(it,J,ut,_t):null;case ur:return ut=Wa(ut),Rt(it,J,ut,_t)}if(cr(ut)||b(ut))return jt!==null?null:Mt(it,J,ut,_t,null);if(typeof ut.then=="function")return Rt(it,J,pi(ut),_t);if(ut.$$typeof===Al)return Rt(it,J,Mi(it,ut),_t);Qr(it,ut)}return null}function Yt(it,J,ut,_t,jt){if(typeof _t=="string"&&_t!==""||typeof _t=="number"||typeof _t=="bigint")return it=it.get(ut)||null,L(J,it,""+_t,jt);if(typeof _t=="object"&&_t!==null){switch(_t.$$typeof){case cf:return it=it.get(_t.key===null?ut:_t.key)||null,ft(J,it,_t,jt);case or:return it=it.get(_t.key===null?ut:_t.key)||null,vt(J,it,_t,jt);case ur:return _t=Wa(_t),Yt(it,J,ut,_t,jt)}if(cr(_t)||b(_t))return it=it.get(ut)||null,Mt(J,it,_t,jt,null);if(typeof _t.then=="function")return Yt(it,J,ut,pi(_t),jt);if(_t.$$typeof===Al)return Yt(it,J,ut,Mi(J,_t),jt);Qr(J,_t)}return null}function tn(it,J,ut,_t){for(var jt=null,fn=null,Xt=J,_e=J=0,fe=null;Xt!==null&&_e<ut.length;_e++){Xt.index>_e?(fe=Xt,Xt=null):fe=Xt.sibling;var ye=Rt(it,Xt,ut[_e],_t);if(ye===null){Xt===null&&(Xt=fe);break}l&&Xt&&ye.alternate===null&&r(it,Xt),J=T(ye,J,_e),fn===null?jt=ye:fn.sibling=ye,fn=ye,Xt=fe}if(_e===ut.length)return h(it,Xt),se&&St(it,_e),jt;if(Xt===null){for(;_e<ut.length;_e++)Xt=xt(it,ut[_e],_t),Xt!==null&&(J=T(Xt,J,_e),fn===null?jt=Xt:fn.sibling=Xt,fn=Xt);return se&&St(it,_e),jt}for(Xt=g(Xt);_e<ut.length;_e++)fe=Yt(Xt,it,_e,ut[_e],_t),fe!==null&&(l&&fe.alternate!==null&&Xt.delete(fe.key===null?_e:fe.key),J=T(fe,J,_e),fn===null?jt=fe:fn.sibling=fe,fn=fe);return l&&Xt.forEach(function(Gl){return r(it,Gl)}),se&&St(it,_e),jt}function kn(it,J,ut,_t){if(ut==null)throw Error(u(151));for(var jt=null,fn=null,Xt=J,_e=J=0,fe=null,ye=ut.next();Xt!==null&&!ye.done;_e++,ye=ut.next()){Xt.index>_e?(fe=Xt,Xt=null):fe=Xt.sibling;var Gl=Rt(it,Xt,ye.value,_t);if(Gl===null){Xt===null&&(Xt=fe);break}l&&Xt&&Gl.alternate===null&&r(it,Xt),J=T(Gl,J,_e),fn===null?jt=Gl:fn.sibling=Gl,fn=Gl,Xt=fe}if(ye.done)return h(it,Xt),se&&St(it,_e),jt;if(Xt===null){for(;!ye.done;_e++,ye=ut.next())ye=xt(it,ye.value,_t),ye!==null&&(J=T(ye,J,_e),fn===null?jt=ye:fn.sibling=ye,fn=ye);return se&&St(it,_e),jt}for(Xt=g(Xt);!ye.done;_e++,ye=ut.next())ye=Yt(Xt,it,_e,ye.value,_t),ye!==null&&(l&&ye.alternate!==null&&Xt.delete(ye.key===null?_e:ye.key),J=T(ye,J,_e),fn===null?jt=ye:fn.sibling=ye,fn=ye);return l&&Xt.forEach(function(zf){return r(it,zf)}),se&&St(it,_e),jt}function Eo(it,J,ut,_t){if(typeof ut=="object"&&ut!==null&&ut.type===io&&ut.key===null&&(ut=ut.props.children),typeof ut=="object"&&ut!==null){switch(ut.$$typeof){case cf:t:{for(var jt=ut.key;J!==null;){if(J.key===jt){if(jt=ut.type,jt===io){if(J.tag===7){h(it,J.sibling),_t=E(J,ut.props.children),_t.return=it,it=_t;break t}}else if(J.elementType===jt||typeof jt=="object"&&jt!==null&&jt.$$typeof===ur&&Wa(jt)===J.type){h(it,J.sibling),_t=E(J,ut.props),Kr(_t,ut),_t.return=it,it=_t;break t}h(it,J);break}else r(it,J);J=J.sibling}ut.type===io?(_t=Dl(ut.props.children,it.mode,_t,ut.key),_t.return=it,it=_t):(_t=rf(ut.type,ut.key,ut.props,null,it.mode,_t),Kr(_t,ut),_t.return=it,it=_t)}return z(it);case or:t:{for(jt=ut.key;J!==null;){if(J.key===jt)if(J.tag===4&&J.stateNode.containerInfo===ut.containerInfo&&J.stateNode.implementation===ut.implementation){h(it,J.sibling),_t=E(J,ut.children||[]),_t.return=it,it=_t;break t}else{h(it,J);break}else r(it,J);J=J.sibling}_t=yd(ut,it.mode,_t),_t.return=it,it=_t}return z(it);case ur:return ut=Wa(ut),Eo(it,J,ut,_t)}if(cr(ut))return tn(it,J,ut,_t);if(b(ut)){if(jt=b(ut),typeof jt!="function")throw Error(u(150));return ut=jt.call(ut),kn(it,J,ut,_t)}if(typeof ut.then=="function")return Eo(it,J,pi(ut),_t);if(ut.$$typeof===Al)return Eo(it,J,Mi(it,ut),_t);Qr(it,ut)}return typeof ut=="string"&&ut!==""||typeof ut=="number"||typeof ut=="bigint"?(ut=""+ut,J!==null&&J.tag===6?(h(it,J.sibling),_t=E(J,ut),_t.return=it,it=_t):(h(it,J),_t=of(ut,it.mode,_t),_t.return=it,it=_t),z(it)):h(it,J)}return function(it,J,ut,_t){try{Df=0;var jt=Eo(it,J,ut,_t);return ji=null,jt}catch(Xt){if(Xt===Vu||Xt===qd)throw Xt;var fn=i(29,Xt,null,it.mode);return fn.lanes=_t,fn.return=it,fn}}}function Ca(){for(var l=ds,r=jm=ds=0;r<l;){var h=Li[r];Li[r++]=null;var g=Li[r];Li[r++]=null;var E=Li[r];Li[r++]=null;var T=Li[r];if(Li[r++]=null,g!==null&&E!==null){var z=g.pending;z===null?E.next=E:(E.next=z.next,z.next=E),g.pending=E}T!==0&&iu(h,E,T)}}function hl(l,r,h,g){Li[ds++]=l,Li[ds++]=r,Li[ds++]=h,Li[ds++]=g,jm|=g,l.lanes|=g,l=l.alternate,l!==null&&(l.lanes|=g)}function dl(l,r,h,g){return hl(l,r,h,g),Zr(l)}function $l(l,r){return hl(l,null,null,r),Zr(l)}function iu(l,r,h){l.lanes|=h;var g=l.alternate;g!==null&&(g.lanes|=h);for(var E=!1,T=l.return;T!==null;)T.childLanes|=h,g=T.alternate,g!==null&&(g.childLanes|=h),T.tag===22&&(l=T.stateNode,l===null||l._visibility&1||(E=!0)),l=T,T=T.return;return l.tag===3?(T=l.stateNode,E&&r!==null&&(E=31-ii(h),l=T.hiddenUpdates,g=l[E],g===null?l[E]=[r]:g.push(r),r.lane=h|536870912),T):null}function Zr(l){if(50<qu)throw qu=0,rp=null,Error(u(185));for(var r=l.return;r!==null;)l=r,r=l.return;return l.tag===3?l.stateNode:null}function Dc(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Jr(l,r){l=l.updateQueue,r.updateQueue===l&&(r.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function mi(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function Ds(l,r,h){var g=l.updateQueue;if(g===null)return null;if(g=g.shared,(re&2)!==0){var E=g.pending;return E===null?r.next=r:(r.next=E.next,E.next=r),g.pending=r,r=Zr(l),iu(l,null,h),r}return hl(l,g,r,h),Zr(l)}function Ac(l,r,h){if(r=r.updateQueue,r!==null&&(r=r.shared,(h&4194048)!==0)){var g=r.lanes;g&=l.pendingLanes,h|=g,r.lanes=h,et(l,h)}}function z0(l,r){var h=l.updateQueue,g=l.alternate;if(g!==null&&(g=g.updateQueue,h===g)){var E=null,T=null;if(h=h.firstBaseUpdate,h!==null){do{var z={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};T===null?E=T=z:T=T.next=z,h=h.next}while(h!==null);T===null?E=T=r:T=T.next=r}else E=T=r;h={baseState:g.baseState,firstBaseUpdate:E,lastBaseUpdate:T,shared:g.shared,callbacks:g.callbacks},l.updateQueue=h;return}l=h.lastBaseUpdate,l===null?h.firstBaseUpdate=r:l.next=r,h.lastBaseUpdate=r}function su(){if(Lm){var l=Bu;if(l!==null)throw l}}function Fr(l,r,h,g){Lm=!1;var E=l.updateQueue;mr=!1;var T=E.firstBaseUpdate,z=E.lastBaseUpdate,L=E.shared.pending;if(L!==null){E.shared.pending=null;var ft=L,vt=ft.next;ft.next=null,z===null?T=vt:z.next=vt,z=ft;var Mt=l.alternate;Mt!==null&&(Mt=Mt.updateQueue,L=Mt.lastBaseUpdate,L!==z&&(L===null?Mt.firstBaseUpdate=vt:L.next=vt,Mt.lastBaseUpdate=ft))}if(T!==null){var xt=E.baseState;z=0,Mt=vt=ft=null,L=T;do{var Rt=L.lane&-536870913,Yt=Rt!==L.lane;if(Yt?(ce&Rt)===Rt:(g&Rt)===Rt){Rt!==0&&Rt===Uu&&(Lm=!0),Mt!==null&&(Mt=Mt.next={lane:0,tag:L.tag,payload:L.payload,callback:null,next:null});t:{var tn=l,kn=L;Rt=r;var Eo=h;switch(kn.tag){case 1:if(tn=kn.payload,typeof tn=="function"){xt=tn.call(Eo,xt,Rt);break t}xt=tn;break t;case 3:tn.flags=tn.flags&-65537|128;case 0:if(tn=kn.payload,Rt=typeof tn=="function"?tn.call(Eo,xt,Rt):tn,Rt==null)break t;xt=yi({},xt,Rt);break t;case 2:mr=!0}}Rt=L.callback,Rt!==null&&(l.flags|=64,Yt&&(l.flags|=8192),Yt=E.callbacks,Yt===null?E.callbacks=[Rt]:Yt.push(Rt))}else Yt={lane:Rt,tag:L.tag,payload:L.payload,callback:L.callback,next:null},Mt===null?(vt=Mt=Yt,ft=xt):Mt=Mt.next=Yt,z|=Rt;if(L=L.next,L===null){if(L=E.shared.pending,L===null)break;Yt=L,L=Yt.next,Yt.next=null,E.lastBaseUpdate=Yt,E.shared.pending=null}}while(!0);Mt===null&&(ft=xt),E.baseState=ft,E.firstBaseUpdate=vt,E.lastBaseUpdate=Mt,T===null&&(E.shared.lanes=0),vr|=z,l.lanes=z,l.memoizedState=xt}}function H0(l,r){if(typeof l!="function")throw Error(u(191,l));l.call(r)}function _g(l,r){var h=l.callbacks;if(h!==null)for(l.callbacks=null,l=0;l<h.length;l++)H0(h[l],r)}function Bt(l,r){l=Bl,A(Kd,l),A(Qs,r),Bl=l|r.baseLanes}function Mc(){A(Kd,Bl),A(Qs,Qs.current)}function pl(){Bl=Kd.current,D(Qs),D(Kd)}function ml(l){var r=l.alternate;A(Hn,Hn.current&1),A(Si,l),Pi===null&&(r===null||Qs.current!==null||r.memoizedState!==null)&&(Pi=l)}function lu(l){A(Hn,Hn.current),A(Si,l),Pi===null&&(Pi=l)}function As(l){l.tag===22?(A(Hn,Hn.current),A(Si,l),Pi===null&&(Pi=l)):gl()}function gl(){A(Hn,Hn.current),A(Si,Si.current)}function $a(l){D(Si),Pi===l&&(Pi=null),D(Hn)}function yl(l){for(var r=l;r!==null;){if(r.tag===13){var h=r.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||vf(h)||Sf(h)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===l)break;for(;r.sibling===null;){if(r.return===null||r.return===l)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}function un(){throw Error(u(321))}function vl(l,r){if(r===null)return!1;for(var h=0;h<r.length&&h<l.length;h++)if(!Sa(l[h],r[h]))return!1;return!0}function Nc(l,r,h,g,E,T){return Ul=T,kt=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,Gt.H=l===null||l.memoizedState===null?Hy:Pm,vo=!1,T=h(g,E),vo=!1,Gu&&(T=Oh(r,h,g,E)),ru(l),T}function ru(l){Gt.H=Af;var r=Ge!==null&&Ge.next!==null;if(Ul=0,Yn=Ge=kt=null,Qd=!1,ju=0,Lu=null,r)throw Error(u(300));l===null||qn||(l=l.dependencies,l!==null&&Fi(l)&&(qn=!0))}function Oh(l,r,h,g){kt=l;var E=0;do{if(Gu&&(Lu=null),ju=0,Gu=!1,25<=E)throw Error(u(301));if(E+=1,Yn=Ge=null,l.updateQueue!=null){var T=l.updateQueue;T.lastEffect=null,T.events=null,T.stores=null,T.memoCache!=null&&(T.memoCache.index=0)}Gt.H=wy,T=r(h,g)}while(Gu);return T}function Rh(){var l=Gt.H,r=l.useState()[0];return r=typeof r.then=="function"?Ii(r):r,l=l.useState()[0],(Ge!==null?Ge.memoizedState:null)!==l&&(kt.flags|=1024),r}function Ms(){var l=Zd!==0;return Zd=0,l}function ki(l,r,h){r.updateQueue=l.updateQueue,r.flags&=-2053,l.lanes&=~h}function Oc(l){if(Qd){for(l=l.memoizedState;l!==null;){var r=l.queue;r!==null&&(r.pending=null),l=l.next}Qd=!1}Ul=0,Yn=Ge=kt=null,Gu=!1,ju=Zd=0,Lu=null}function pa(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Yn===null?kt.memoizedState=Yn=l:Yn=Yn.next=l,Yn}function Ye(){if(Ge===null){var l=kt.alternate;l=l!==null?l.memoizedState:null}else l=Ge.next;var r=Yn===null?kt.memoizedState:Yn.next;if(r!==null)Yn=r,Ge=l;else{if(l===null)throw kt.alternate===null?Error(u(467)):Error(u(310));Ge=l,l={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},Yn===null?kt.memoizedState=Yn=l:Yn=Yn.next=l}return Yn}function kr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ii(l){var r=ju;return ju+=1,Lu===null&&(Lu=[]),l=fl(Lu,l,r),r=kt,(Yn===null?r.memoizedState:Yn.next)===null&&(r=r.alternate,Gt.H=r===null||r.memoizedState===null?Hy:Pm),l}function Ve(l){if(l!==null&&typeof l=="object"){if(typeof l.then=="function")return Ii(l);if(l.$$typeof===Al)return on(l)}throw Error(u(438,String(l)))}function ou(l){var r=null,h=kt.updateQueue;if(h!==null&&(r=h.memoCache),r==null){var g=kt.alternate;g!==null&&(g=g.updateQueue,g!==null&&(g=g.memoCache,g!=null&&(r={data:g.data.map(function(E){return E.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),h===null&&(h=kr(),kt.updateQueue=h),h.memoCache=r,h=r.data[r.index],h===void 0)for(h=r.data[r.index]=Array(l),g=0;g<l;g++)h[g]=Gs;return r.index++,h}function Ns(l,r){return typeof r=="function"?r(l):r}function uu(l){var r=Ye();return Sl(r,Ge,l)}function Sl(l,r,h){var g=l.queue;if(g===null)throw Error(u(311));g.lastRenderedReducer=h;var E=l.baseQueue,T=g.pending;if(T!==null){if(E!==null){var z=E.next;E.next=T.next,T.next=z}r.baseQueue=E=T,g.pending=null}if(T=l.baseState,E===null)l.memoizedState=T;else{r=E.next;var L=z=null,ft=null,vt=r,Mt=!1;do{var xt=vt.lane&-536870913;if(xt!==vt.lane?(ce&xt)===xt:(Ul&xt)===xt){var Rt=vt.revertLane;if(Rt===0)ft!==null&&(ft=ft.next={lane:0,revertLane:0,gesture:null,action:vt.action,hasEagerState:vt.hasEagerState,eagerState:vt.eagerState,next:null}),xt===Uu&&(Mt=!0);else if((Ul&Rt)===Rt){vt=vt.next,Rt===Uu&&(Mt=!0);continue}else xt={lane:0,revertLane:vt.revertLane,gesture:null,action:vt.action,hasEagerState:vt.hasEagerState,eagerState:vt.eagerState,next:null},ft===null?(L=ft=xt,z=T):ft=ft.next=xt,kt.lanes|=Rt,vr|=Rt;xt=vt.action,vo&&h(T,xt),T=vt.hasEagerState?vt.eagerState:h(T,xt)}else Rt={lane:xt,revertLane:vt.revertLane,gesture:vt.gesture,action:vt.action,hasEagerState:vt.hasEagerState,eagerState:vt.eagerState,next:null},ft===null?(L=ft=Rt,z=T):ft=ft.next=Rt,kt.lanes|=xt,vr|=xt;vt=vt.next}while(vt!==null&&vt!==r);if(ft===null?z=T:ft.next=L,!Sa(T,l.memoizedState)&&(qn=!0,Mt&&(h=Bu,h!==null)))throw h;l.memoizedState=T,l.baseState=z,l.baseQueue=ft,g.lastRenderedState=T}return E===null&&(g.lanes=0),[l.memoizedState,g.dispatch]}function Ir(l){var r=Ye(),h=r.queue;if(h===null)throw Error(u(311));h.lastRenderedReducer=l;var g=h.dispatch,E=h.pending,T=r.memoizedState;if(E!==null){h.pending=null;var z=E=E.next;do T=l(T,z.action),z=z.next;while(z!==E);Sa(T,r.memoizedState)||(qn=!0),r.memoizedState=T,r.baseQueue===null&&(r.baseState=T),h.lastRenderedState=T}return[T,g]}function Wi(l,r,h){var g=kt,E=Ye(),T=se;if(T){if(h===void 0)throw Error(u(407));h=h()}else h=r();var z=!Sa((Ge||E).memoizedState,h);if(z&&(E.memoizedState=h,qn=!0),E=E.queue,Hh(Rc.bind(null,g,E,l),[l]),E.getSnapshot!==r||z||Yn!==null&&Yn.memoizedState.tag&1){if(g.flags|=2048,ja(9,{destroy:void 0},Os.bind(null,g,E,h,r),null),Le===null)throw Error(u(349));T||(Ul&127)!==0||xg(g,r,h)}return h}function xg(l,r,h){l.flags|=16384,l={getSnapshot:r,value:h},r=kt.updateQueue,r===null?(r=kr(),kt.updateQueue=r,r.stores=[l]):(h=r.stores,h===null?r.stores=[l]:h.push(l))}function Os(l,r,h,g){r.value=h,r.getSnapshot=g,cu(r)&&zc(l)}function Rc(l,r,h){return h(function(){cu(r)&&zc(l)})}function cu(l){var r=l.getSnapshot;l=l.value;try{var h=r();return!Sa(l,h)}catch{return!0}}function zc(l){var r=$l(l,2);r!==null&&Pa(r,l,2)}function Ga(l){var r=pa();if(typeof l=="function"){var h=l;if(l=h(),vo){dt(!0);try{h()}finally{dt(!1)}}}return r.memoizedState=r.baseState=l,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ns,lastRenderedState:l},r}function ti(l,r,h,g){return l.baseState=h,Sl(l,Ge,typeof g=="function"?g:Ns)}function Rs(l,r,h,g,E){if(er(l))throw Error(u(485));if(l=r.action,l!==null){var T={payload:E,action:l,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(z){T.listeners.push(z)}};Gt.T!==null?h(!0):T.isTransition=!1,g(T),h=r.pending,h===null?(T.next=r.pending=T,$i(r,T)):(T.next=h.next,r.pending=h.next=T)}}function $i(l,r){var h=r.action,g=r.payload,E=l.state;if(r.isTransition){var T=Gt.T,z={};Gt.T=z;try{var L=h(E,g),ft=Gt.S;ft!==null&&ft(z,L),ts(l,r,L)}catch(vt){Hc(l,r,vt)}finally{T!==null&&z.types!==null&&(T.types=z.types),Gt.T=T}}else try{T=h(E,g),ts(l,r,T)}catch(vt){Hc(l,r,vt)}}function ts(l,r,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(g){es(l,r,g)},function(g){return Hc(l,r,g)}):es(l,r,h)}function es(l,r,h){r.status="fulfilled",r.value=h,zh(r),l.state=h,r=l.pending,r!==null&&(h=r.next,h===r?l.pending=null:(h=h.next,r.next=h,$i(l,h)))}function Hc(l,r,h){var g=l.pending;if(l.pending=null,g!==null){g=g.next;do r.status="rejected",r.reason=h,zh(r),r=r.next;while(r!==g)}l.action=null}function zh(l){l=l.listeners;for(var r=0;r<l.length;r++)(0,l[r])()}function w0(l,r){return r}function ns(l,r){if(se){var h=Le.formState;if(h!==null){t:{var g=kt;if(se){if(We){var E=uy(We,Vi);if(E){We=Am(E),g=cy(E);break t}}ln(g)}g=!1}g&&(r=h[0])}}h=pa(),h.memoizedState=h.baseState=r,g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:w0,lastRenderedState:r},h.queue=g,h=jh.bind(null,kt,g),g.dispatch=h,g=Ga(!1);var T=hu.bind(null,kt,!1,g.queue);return g=pa(),E={state:r,dispatch:null,action:l,pending:null},g.queue=E,h=Rs.bind(null,kt,E,T,h),E.dispatch=h,g.memoizedState=l,[r,h,!1]}function U0(l){var r=Ye();return as(r,Ge,l)}function as(l,r,h){if(r=Sl(l,r,w0)[0],l=uu(Ns)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var g=Ii(r)}catch(z){throw z===Vu?qd:z}else g=r;r=Ye();var E=r.queue,T=E.dispatch;return h!==r.memoizedState&&(kt.flags|=2048,ja(9,{destroy:void 0},wc.bind(null,E,h),null)),[g,T,l]}function wc(l,r){l.action=r}function Uc(l){var r=Ye(),h=Ge;if(h!==null)return as(r,h,l);Ye(),r=r.memoizedState,h=Ye();var g=h.queue.dispatch;return h.memoizedState=l,[r,g,!1]}function ja(l,r,h,g){return l={tag:l,create:h,deps:g,inst:r,next:null},r=kt.updateQueue,r===null&&(r=kr(),kt.updateQueue=r),h=r.lastEffect,h===null?r.lastEffect=l.next=l:(g=h.next,h.next=l,l.next=g,r.lastEffect=l),l}function Wr(){return Ye().memoizedState}function Bc(l,r,h,g){var E=pa();kt.flags|=l,E.memoizedState=ja(1|r,{destroy:void 0},h,g===void 0?null:g)}function fu(l,r,h,g){var E=Ye();g=g===void 0?null:g;var T=E.memoizedState.inst;Ge!==null&&g!==null&&vl(g,Ge.memoizedState.deps)?E.memoizedState=ja(r,T,h,g):(kt.flags|=l,E.memoizedState=ja(1|r,T,h,g))}function B0(l,r){Bc(8390656,8,l,r)}function Hh(l,r){fu(2048,8,l,r)}function Dg(l){kt.flags|=4;var r=kt.updateQueue;if(r===null)r=kr(),kt.updateQueue=r,r.events=[l];else{var h=r.events;h===null?r.events=[l]:h.push(l)}}function wh(l){var r=Ye().memoizedState;return Dg({ref:r,nextImpl:l}),function(){if((re&2)!==0)throw Error(u(440));return r.impl.apply(void 0,arguments)}}function V0(l,r){return fu(4,2,l,r)}function Uh(l,r){return fu(4,4,l,r)}function Ag(l,r){if(typeof r=="function"){l=l();var h=r(l);return function(){typeof h=="function"?h():r(null)}}if(r!=null)return l=l(),r.current=l,function(){r.current=null}}function G0(l,r,h){h=h!=null?h.concat([l]):null,fu(4,4,Ag.bind(null,r,l),h)}function j0(){}function Bh(l,r){var h=Ye();r=r===void 0?null:r;var g=h.memoizedState;return r!==null&&vl(r,g[1])?g[0]:(h.memoizedState=[l,r],l)}function Vc(l,r){var h=Ye();r=r===void 0?null:r;var g=h.memoizedState;if(r!==null&&vl(r,g[1]))return g[0];if(g=l(),vo){dt(!0);try{l()}finally{dt(!1)}}return h.memoizedState=[g,r],g}function Vh(l,r,h){return h===void 0||(Ul&1073741824)!==0&&(ce&261930)===0?l.memoizedState=r:(l.memoizedState=h,l=ef(),kt.lanes|=l,vr|=l,h)}function Gc(l,r,h,g){return Sa(h,r)?h:Qs.current!==null?(l=Vh(l,h,g),Sa(l,r)||(qn=!0),l):(Ul&42)===0||(Ul&1073741824)!==0&&(ce&261930)===0?(qn=!0,l.memoizedState=h):(l=ef(),kt.lanes|=l,vr|=l,r)}function L0(l,r,h,g,E){var T=Ls();Jn(T!==0&&8>T?T:8);var z=Gt.T,L={};Gt.T=L,hu(l,!1,r,h);try{var ft=E(),vt=Gt.S;if(vt!==null&&vt(L,ft),ft!==null&&typeof ft=="object"&&typeof ft.then=="function"){var Mt=ge(ft,g);tr(l,r,Mt,ai(l))}else tr(l,r,g,ai(l))}catch(xt){tr(l,r,{then:function(){},status:"rejected",reason:xt},ai())}finally{Jn(T),z!==null&&L.types!==null&&(z.types=L.types),Gt.T=z}}function P0(l){var r=l.memoizedState;if(r!==null)return r;r={memoizedState:qa,baseState:qa,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ns,lastRenderedState:qa},next:null};var h={};return r.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ns,lastRenderedState:h},next:null},l.memoizedState=r,l=l.alternate,l!==null&&(l.memoizedState=r),r}function Gh(){return on(fr)}function bl(){return Ye().memoizedState}function Y0(){return Ye().memoizedState}function Mg(l){for(var r=l.return;r!==null;){switch(r.tag){case 24:case 3:var h=ai();l=mi(h);var g=Ds(r,l,h);g!==null&&(Pa(g,r,h),Ac(g,r,h)),r={cache:Ae()},l.payload=r;return}r=r.return}}function ma(l,r,h){var g=ai();h={lane:g,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},er(l)?q0(r,h):(h=dl(l,r,h,g),h!==null&&(Pa(h,l,g),jc(h,r,g)))}function jh(l,r,h){var g=ai();tr(l,r,h,g)}function tr(l,r,h,g){var E={lane:g,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null};if(er(l))q0(r,E);else{var T=l.alternate;if(l.lanes===0&&(T===null||T.lanes===0)&&(T=r.lastRenderedReducer,T!==null))try{var z=r.lastRenderedState,L=T(z,h);if(E.hasEagerState=!0,E.eagerState=L,Sa(L,z))return hl(l,r,E,0),Le===null&&Ca(),!1}catch{}if(h=dl(l,r,E,g),h!==null)return Pa(h,l,g),jc(h,r,g),!0}return!1}function hu(l,r,h,g){if(g={lane:2,revertLane:Yr(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},er(l)){if(r)throw Error(u(479))}else r=dl(l,h,g,2),r!==null&&Pa(r,l,2)}function er(l){var r=l.alternate;return l===kt||r!==null&&r===kt}function q0(l,r){Gu=Qd=!0;var h=l.pending;h===null?r.next=r:(r.next=h.next,h.next=r),l.pending=r}function jc(l,r,h){if((h&4194048)!==0){var g=r.lanes;g&=l.pendingLanes,h|=g,r.lanes=h,et(l,h)}}function Lh(l,r,h,g){r=l.memoizedState,h=h(g,r),h=h==null?r:yi({},r,h),l.memoizedState=h,l.lanes===0&&(l.updateQueue.baseState=h)}function Lc(l,r,h,g,E,T,z){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(g,T,z):r.prototype&&r.prototype.isPureReactComponent?!_c(h,g)||!_c(E,T):!0}function X0(l,r,h,g){l=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(h,g),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(h,g),r.state!==l&&Jd.enqueueReplaceState(r,r.state,null)}function zs(l,r){var h=r;if("ref"in r){h={};for(var g in r)g!=="ref"&&(h[g]=r[g])}if(l=l.defaultProps){h===r&&(h=yi({},h));for(var E in l)h[E]===void 0&&(h[E]=l[E])}return h}function Pc(l,r){try{var h=l.onUncaughtError;h(r.value,{componentStack:r.stack})}catch(g){setTimeout(function(){throw g})}}function K0(l,r,h){try{var g=l.onCaughtError;g(h.value,{componentStack:h.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(E){setTimeout(function(){throw E})}}function du(l,r,h){return h=mi(h),h.tag=3,h.payload={element:null},h.callback=function(){Pc(l,r)},h}function Yc(l){return l=mi(l),l.tag=3,l}function Ph(l,r,h,g){var E=h.type.getDerivedStateFromError;if(typeof E=="function"){var T=g.value;l.payload=function(){return E(T)},l.callback=function(){K0(r,h,g)}}var z=h.stateNode;z!==null&&typeof z.componentDidCatch=="function"&&(l.callback=function(){K0(r,h,g),typeof E!="function"&&(Sr===null?Sr=new Set([this]):Sr.add(this));var L=g.stack;this.componentDidCatch(g.value,{componentStack:L!==null?L:""})})}function _a(l,r,h,g,E){if(h.flags|=32768,g!==null&&typeof g=="object"&&typeof g.then=="function"){if(r=h.alternate,r!==null&&di(r,h,E,!0),h=Si.current,h!==null){switch(h.tag){case 31:case 13:return Pi===null?Eu():h.alternate===null&&yn===0&&(yn=3),h.flags&=-257,h.flags|=65536,h.lanes=E,g===Xd?h.flags|=16384:(r=h.updateQueue,r===null?h.updateQueue=new Set([g]):r.add(g),dd(l,g,E)),!1;case 22:return h.flags|=65536,g===Xd?h.flags|=16384:(r=h.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([g])},h.updateQueue=r):(h=r.retryQueue,h===null?r.retryQueue=new Set([g]):h.add(g)),dd(l,g,E)),!1}throw Error(u(435,h.tag))}return dd(l,g,E),Eu(),!1}if(se)return r=Si.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=E,g!==Bm&&(l=Error(u(422),{cause:g}),An(at(l,h)))):(g!==Bm&&(r=Error(u(423),{cause:g}),An(at(r,h))),l=l.current.alternate,l.flags|=65536,E&=-E,l.lanes|=E,g=at(g,h),E=du(l.stateNode,g,E),z0(l,E),yn!==4&&(yn=2)),!1;var T=Error(u(520),{cause:g});if(T=at(T,h),Of===null?Of=[T]:Of.push(T),yn!==4&&(yn=2),r===null)return!0;g=at(g,h),h=r;do{switch(h.tag){case 3:return h.flags|=65536,l=E&-E,h.lanes|=l,l=du(h.stateNode,g,l),z0(h,l),!1;case 1:if(r=h.type,T=h.stateNode,(h.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(Sr===null||!Sr.has(T))))return h.flags|=65536,E&=-E,h.lanes|=E,E=Yc(E),Ph(E,l,h,g),z0(h,E),!1}h=h.return}while(h!==null);return!1}function na(l,r,h,g){r.child=l===null?zy(r,null,h,g):yo(r,l.child,h,g)}function qc(l,r,h,g,E){h=h.render;var T=r.ref;if("ref"in g){var z={};for(var L in g)L!=="ref"&&(z[L]=g[L])}else z=g;return Mn(r),g=Nc(l,r,h,z,T,E),L=Ms(),l!==null&&!qn?(ki(l,r,E),ei(l,r,E)):(se&&L&>(r),r.flags|=1,na(l,r,g,E),r.child)}function Yh(l,r,h,g,E){if(l===null){var T=h.type;return typeof T=="function"&&!lf(T)&&T.defaultProps===void 0&&h.compare===null?(r.tag=15,r.type=T,qh(l,r,T,g,E)):(l=rf(h.type,null,g,r,r.mode,E),l.ref=r.ref,l.return=r,r.child=l)}if(T=l.child,!gu(l,E)){var z=T.memoizedProps;if(h=h.compare,h=h!==null?h:_c,h(z,g)&&l.ref===r.ref)return ei(l,r,E)}return r.flags|=1,l=Vs(T,g),l.ref=r.ref,l.return=r,r.child=l}function qh(l,r,h,g,E){if(l!==null){var T=l.memoizedProps;if(_c(T,g)&&l.ref===r.ref)if(qn=!1,r.pendingProps=g=T,gu(l,E))(l.flags&131072)!==0&&(qn=!0);else return r.lanes=l.lanes,ei(l,r,E)}return Q0(l,r,h,g,E)}function El(l,r,h,g){var E=g.children,T=l!==null?l.memoizedState:null;if(l===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),g.mode==="hidden"){if((r.flags&128)!==0){if(T=T!==null?T.baseLanes|h:h,l!==null){for(g=r.child=l.child,E=0;g!==null;)E=E|g.lanes|g.childLanes,g=g.sibling;g=E&~T}else g=0,r.child=null;return pu(l,r,T,h,g)}if((h&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},l!==null&&Wl(r,T!==null?T.cachePool:null),T!==null?Bt(r,T):Mc(),As(r);else return g=r.lanes=536870912,pu(l,r,T!==null?T.baseLanes|h:h,h,g)}else T!==null?(Wl(r,T.cachePool),Bt(r,T),gl(),r.memoizedState=null):(l!==null&&Wl(r,null),Mc(),gl());return na(l,r,E,h),r.child}function Ni(l,r){return l!==null&&l.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function pu(l,r,h,g,E){var T=qr();return T=T===null?null:{parent:Hi?cn._currentValue:cn._currentValue2,pool:T},r.memoizedState={baseLanes:h,cachePool:T},l!==null&&Wl(r,null),Mc(),As(r),l!==null&&di(l,r,g,!0),r.childLanes=E,null}function $r(l,r){return r=is({mode:r.mode,children:r.children},l.mode),r.ref=l.ref,l.child=r,r.return=l,r}function mu(l,r,h){return yo(r,l.child,null,h),l=$r(r,r.pendingProps),l.flags|=2,$a(r),r.memoizedState=null,l}function Xc(l,r,h){var g=r.pendingProps,E=(r.flags&128)!==0;if(r.flags&=-129,l===null){if(se){if(g.mode==="hidden")return l=$r(r,g),r.lanes=536870912,Ni(null,l);if(lu(r),(l=We)?(l=py(l,Vi),l!==null&&(r.memoizedState={dehydrated:l,treeContext:Hl!==null?{id:Xa,overflow:qs}:null,retryLane:536870912,hydrationErrors:null},h=gd(l),h.return=r,r.child=h,Fn=r,We=null)):l=null,l===null)throw ln(r);return r.lanes=536870912,null}return $r(r,g)}var T=l.memoizedState;if(T!==null){var z=T.dehydrated;if(lu(r),E)if(r.flags&256)r.flags&=-257,r=mu(l,r,h);else if(r.memoizedState!==null)r.child=l.child,r.flags|=128,r=null;else throw Error(u(558));else if(qn||di(l,r,h,!1),E=(h&l.childLanes)!==0,qn||E){if(g=Le,g!==null&&(z=nt(g,h),z!==0&&z!==T.retryLane))throw T.retryLane=z,$l(l,z),Pa(g,l,z),Fd;Eu(),r=mu(l,r,h)}else l=T.treeContext,ya&&(We=Mm(z),Fn=r,se=!0,wl=null,Vi=!1,l!==null&&Pt(r,l)),r=$r(r,g),r.flags|=4096;return r}return l=Vs(l.child,{mode:g.mode,children:g.children}),l.ref=r.ref,r.child=l,l.return=r,l}function Kc(l,r){var h=r.ref;if(h===null)l!==null&&l.ref!==null&&(r.flags|=4194816);else{if(typeof h!="function"&&typeof h!="object")throw Error(u(284));(l===null||l.ref!==h)&&(r.flags|=4194816)}}function Q0(l,r,h,g,E){return Mn(r),h=Nc(l,r,h,g,void 0,E),g=Ms(),l!==null&&!qn?(ki(l,r,E),ei(l,r,E)):(se&&g&>(r),r.flags|=1,na(l,r,h,E),r.child)}function Z0(l,r,h,g,E,T){return Mn(r),r.updateQueue=null,h=Oh(r,g,h,E),ru(l),g=Ms(),l!==null&&!qn?(ki(l,r,T),ei(l,r,T)):(se&&g&>(r),r.flags|=1,na(l,r,h,T),r.child)}function J0(l,r,h,g,E){if(Mn(r),r.stateNode===null){var T=ho,z=h.contextType;typeof z=="object"&&z!==null&&(T=on(z)),T=new h(g,T),r.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,T.updater=Jd,r.stateNode=T,T._reactInternals=r,T=r.stateNode,T.props=g,T.state=r.memoizedState,T.refs={},Dc(r),z=h.contextType,T.context=typeof z=="object"&&z!==null?on(z):ho,T.state=r.memoizedState,z=h.getDerivedStateFromProps,typeof z=="function"&&(Lh(r,h,z,g),T.state=r.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof T.getSnapshotBeforeUpdate=="function"||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(z=T.state,typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount(),z!==T.state&&Jd.enqueueReplaceState(T,T.state,null),Fr(r,g,T,E),su(),T.state=r.memoizedState),typeof T.componentDidMount=="function"&&(r.flags|=4194308),g=!0}else if(l===null){T=r.stateNode;var L=r.memoizedProps,ft=zs(h,L);T.props=ft;var vt=T.context,Mt=h.contextType;z=ho,typeof Mt=="object"&&Mt!==null&&(z=on(Mt));var xt=h.getDerivedStateFromProps;Mt=typeof xt=="function"||typeof T.getSnapshotBeforeUpdate=="function",L=r.pendingProps!==L,Mt||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(L||vt!==z)&&X0(r,T,g,z),mr=!1;var Rt=r.memoizedState;T.state=Rt,Fr(r,g,T,E),su(),vt=r.memoizedState,L||Rt!==vt||mr?(typeof xt=="function"&&(Lh(r,h,xt,g),vt=r.memoizedState),(ft=mr||Lc(r,h,ft,g,Rt,vt,z))?(Mt||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(r.flags|=4194308)):(typeof T.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=g,r.memoizedState=vt),T.props=g,T.state=vt,T.context=z,g=ft):(typeof T.componentDidMount=="function"&&(r.flags|=4194308),g=!1)}else{T=r.stateNode,Jr(l,r),z=r.memoizedProps,Mt=zs(h,z),T.props=Mt,xt=r.pendingProps,Rt=T.context,vt=h.contextType,ft=ho,typeof vt=="object"&&vt!==null&&(ft=on(vt)),L=h.getDerivedStateFromProps,(vt=typeof L=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(z!==xt||Rt!==ft)&&X0(r,T,g,ft),mr=!1,Rt=r.memoizedState,T.state=Rt,Fr(r,g,T,E),su();var Yt=r.memoizedState;z!==xt||Rt!==Yt||mr||l!==null&&l.dependencies!==null&&Fi(l.dependencies)?(typeof L=="function"&&(Lh(r,h,L,g),Yt=r.memoizedState),(Mt=mr||Lc(r,h,Mt,g,Rt,Yt,ft)||l!==null&&l.dependencies!==null&&Fi(l.dependencies))?(vt||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(g,Yt,ft),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(g,Yt,ft)),typeof T.componentDidUpdate=="function"&&(r.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof T.componentDidUpdate!="function"||z===l.memoizedProps&&Rt===l.memoizedState||(r.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||z===l.memoizedProps&&Rt===l.memoizedState||(r.flags|=1024),r.memoizedProps=g,r.memoizedState=Yt),T.props=g,T.state=Yt,T.context=ft,g=Mt):(typeof T.componentDidUpdate!="function"||z===l.memoizedProps&&Rt===l.memoizedState||(r.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||z===l.memoizedProps&&Rt===l.memoizedState||(r.flags|=1024),g=!1)}return T=g,Kc(l,r),g=(r.flags&128)!==0,T||g?(T=r.stateNode,h=g&&typeof h.getDerivedStateFromError!="function"?null:T.render(),r.flags|=1,l!==null&&g?(r.child=yo(r,l.child,null,E),r.child=yo(r,null,h,E)):na(l,r,h,E),r.memoizedState=T.state,l=r.child):l=ei(l,r,E),l}function Xh(l,r,h,g){return ta(),r.flags|=256,na(l,r,h,g),r.child}function Qc(l){return{baseLanes:l,cachePool:Nh()}}function Hs(l,r,h){return l=l!==null?l.childLanes&~h:0,r&&(l|=Ei),l}function Kh(l,r,h){var g=r.pendingProps,E=!1,T=(r.flags&128)!==0,z;if((z=T)||(z=l!==null&&l.memoizedState===null?!1:(Hn.current&2)!==0),z&&(E=!0,r.flags&=-129),z=(r.flags&32)!==0,r.flags&=-33,l===null){if(se){if(E?ml(r):gl(),(l=We)?(l=u3(l,Vi),l!==null&&(r.memoizedState={dehydrated:l,treeContext:Hl!==null?{id:Xa,overflow:qs}:null,retryLane:536870912,hydrationErrors:null},h=gd(l),h.return=r,r.child=h,Fn=r,We=null)):l=null,l===null)throw ln(r);return Sf(l)?r.lanes=32:r.lanes=536870912,null}var L=g.children;return g=g.fallback,E?(gl(),E=r.mode,L=is({mode:"hidden",children:L},E),g=Dl(g,E,h,null),L.return=r,g.return=r,L.sibling=g,r.child=L,g=r.child,g.memoizedState=Qc(h),g.childLanes=Hs(l,z,h),r.memoizedState=kd,Ni(null,g)):(ml(r),Qh(r,L))}var ft=l.memoizedState;if(ft!==null&&(L=ft.dehydrated,L!==null)){if(T)r.flags&256?(ml(r),r.flags&=-257,r=La(l,r,h)):r.memoizedState!==null?(gl(),r.child=l.child,r.flags|=128,r=null):(gl(),L=g.fallback,E=r.mode,g=is({mode:"visible",children:g.children},E),L=Dl(L,E,h,null),L.flags|=2,g.return=r,L.return=r,g.sibling=L,r.child=g,yo(r,l.child,null,h),g=r.child,g.memoizedState=Qc(h),g.childLanes=Hs(l,z,h),r.memoizedState=kd,r=Ni(null,g));else if(ml(r),Sf(L))z=uo(L).digest,g=Error(u(419)),g.stack="",g.digest=z,An({value:g,source:null,stack:null}),r=La(l,r,h);else if(qn||di(l,r,h,!1),z=(h&l.childLanes)!==0,qn||z){if(z=Le,z!==null&&(g=nt(z,h),g!==0&&g!==ft.retryLane))throw ft.retryLane=g,$l(l,g),Pa(z,l,g),Fd;vf(L)||Eu(),r=La(l,r,h)}else vf(L)?(r.flags|=192,r.child=l.child,r=null):(l=ft.treeContext,ya&&(We=hy(L),Fn=r,se=!0,wl=null,Vi=!1,l!==null&&Pt(r,l)),r=Qh(r,g.children),r.flags|=4096);return r}return E?(gl(),L=g.fallback,E=r.mode,ft=l.child,T=ft.sibling,g=Vs(ft,{mode:"hidden",children:g.children}),g.subtreeFlags=ft.subtreeFlags&65011712,T!==null?L=Vs(T,L):(L=Dl(L,E,h,null),L.flags|=2),L.return=r,g.return=r,g.sibling=L,r.child=g,Ni(null,g),g=r.child,L=l.child.memoizedState,L===null?L=Qc(h):(E=L.cachePool,E!==null?(ft=Hi?cn._currentValue:cn._currentValue2,E=E.parent!==ft?{parent:ft,pool:ft}:E):E=Nh(),L={baseLanes:L.baseLanes|h,cachePool:E}),g.memoizedState=L,g.childLanes=Hs(l,z,h),r.memoizedState=kd,Ni(l.child,g)):(ml(r),h=l.child,l=h.sibling,h=Vs(h,{mode:"visible",children:g.children}),h.return=r,h.sibling=null,l!==null&&(z=r.deletions,z===null?(r.deletions=[l],r.flags|=16):z.push(l)),r.child=h,r.memoizedState=null,h)}function Qh(l,r){return r=is({mode:"visible",children:r},l.mode),r.return=l,l.child=r}function is(l,r){return l=i(22,l,null,r),l.lanes=0,l}function La(l,r,h){return yo(r,l.child,null,h),l=Qh(r,r.pendingProps.children),l.flags|=2,r.memoizedState=null,l}function Zc(l,r,h){l.lanes|=r;var g=l.alternate;g!==null&&(g.lanes|=r),ha(l.return,r,h)}function Ft(l,r,h,g,E,T){var z=l.memoizedState;z===null?l.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:g,tail:h,tailMode:E,treeForkCount:T}:(z.isBackwards=r,z.rendering=null,z.renderingStartTime=0,z.last=g,z.tail=h,z.tailMode=E,z.treeForkCount=T)}function Et(l,r,h){var g=r.pendingProps,E=g.revealOrder,T=g.tail;g=g.children;var z=Hn.current,L=(z&2)!==0;if(L?(z=z&1|2,r.flags|=128):z&=1,A(Hn,z),na(l,r,g,h),g=se?rt:0,!L&&l!==null&&(l.flags&128)!==0)t:for(l=r.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&Zc(l,h,r);else if(l.tag===19)Zc(l,h,r);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===r)break t;for(;l.sibling===null;){if(l.return===null||l.return===r)break t;l=l.return}l.sibling.return=l.return,l=l.sibling}switch(E){case"forwards":for(h=r.child,E=null;h!==null;)l=h.alternate,l!==null&&yl(l)===null&&(E=h),h=h.sibling;h=E,h===null?(E=r.child,r.child=null):(E=h.sibling,h.sibling=null),Ft(r,!1,E,h,T,g);break;case"backwards":case"unstable_legacy-backwards":for(h=null,E=r.child,r.child=null;E!==null;){if(l=E.alternate,l!==null&&yl(l)===null){r.child=E;break}l=E.sibling,E.sibling=h,h=E,E=l}Ft(r,!0,h,null,T,g);break;case"together":Ft(r,!1,null,null,void 0,g);break;default:r.memoizedState=null}return r.child}function ei(l,r,h){if(l!==null&&(r.dependencies=l.dependencies),vr|=r.lanes,(h&r.childLanes)===0)if(l!==null){if(di(l,r,h,!1),(h&r.childLanes)===0)return null}else return null;if(l!==null&&r.child!==l.child)throw Error(u(153));if(r.child!==null){for(l=r.child,h=Vs(l,l.pendingProps),r.child=h,h.return=r;l.sibling!==null;)l=l.sibling,h=h.sibling=Vs(l,l.pendingProps),h.return=r;h.sibling=null}return r.child}function gu(l,r){return(l.lanes&r)!==0?!0:(l=l.dependencies,!!(l!==null&&Fi(l)))}function gn(l,r,h){switch(r.tag){case 3:le(r,r.stateNode.containerInfo),Ba(r,cn,l.memoizedState.cache),ta();break;case 27:case 5:xe(r);break;case 4:le(r,r.stateNode.containerInfo);break;case 10:Ba(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,lu(r),null;break;case 13:var g=r.memoizedState;if(g!==null)return g.dehydrated!==null?(ml(r),r.flags|=128,null):(h&r.child.childLanes)!==0?Kh(l,r,h):(ml(r),l=ei(l,r,h),l!==null?l.sibling:null);ml(r);break;case 19:var E=(l.flags&128)!==0;if(g=(h&r.childLanes)!==0,g||(di(l,r,h,!1),g=(h&r.childLanes)!==0),E){if(g)return Et(l,r,h);r.flags|=128}if(E=r.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),A(Hn,Hn.current),g)break;return null;case 22:return r.lanes=0,El(l,r,h,r.pendingProps);case 24:Ba(r,cn,l.memoizedState.cache)}return ei(l,r,h)}function Zh(l,r,h){if(l!==null)if(l.memoizedProps!==r.pendingProps)qn=!0;else{if(!gu(l,h)&&(r.flags&128)===0)return qn=!1,gn(l,r,h);qn=(l.flags&131072)!==0}else qn=!1,se&&(r.flags&1048576)!==0&&W(r,rt,r.index);switch(r.lanes=0,r.tag){case 16:t:{var g=r.pendingProps;if(l=Wa(r.elementType),r.type=l,typeof l=="function")lf(l)?(g=zs(l,g),r.tag=1,r=J0(null,r,l,g,h)):(r.tag=0,r=Q0(null,r,l,g,h));else{if(l!=null){var E=l.$$typeof;if(E===Cu){r.tag=11,r=qc(null,r,l,g,h);break t}else if(E===gm){r.tag=14,r=Yh(null,r,l,g,h);break t}}throw r=_(l)||l,Error(u(306,r,""))}}return r;case 0:return Q0(l,r,r.type,r.pendingProps,h);case 1:return g=r.type,E=zs(g,r.pendingProps),J0(l,r,g,E,h);case 3:t:{if(le(r,r.stateNode.containerInfo),l===null)throw Error(u(387));var T=r.pendingProps;E=r.memoizedState,g=E.element,Jr(l,r),Fr(r,T,null,h);var z=r.memoizedState;if(T=z.cache,Ba(r,cn,T),T!==E.cache&&Ji(r,[cn],h,!0),su(),T=z.element,ya&&E.isDehydrated)if(E={element:T,isDehydrated:!1,cache:z.cache},r.updateQueue.baseState=E,r.memoizedState=E,r.flags&256){r=Xh(l,r,T,h);break t}else if(T!==g){g=at(Error(u(424)),r),An(g),r=Xh(l,r,T,h);break t}else for(ya&&(We=Nd(r.stateNode.containerInfo),Fn=r,se=!0,wl=null,Vi=!0),h=zy(r,null,T,h),r.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(ta(),T===g){r=ei(l,r,h);break t}na(l,r,T,h)}r=r.child}return r;case 26:if(wi)return Kc(l,r),l===null?(h=Mu(r.type,null,r.pendingProps,null))?r.memoizedState=h:se||(r.stateNode=Dy(r.type,r.pendingProps,dr.current,r)):r.memoizedState=Mu(r.type,l.memoizedProps,r.pendingProps,l.memoizedState),null;case 27:if(Ln)return xe(r),l===null&&Ln&&se&&(g=r.stateNode=wd(r.type,r.pendingProps,dr.current,ba.current,!1),Fn=r,Vi=!0,We=r3(r.type,g,We)),na(l,r,r.pendingProps.children,h),Kc(l,r),l===null&&(r.flags|=4194304),r.child;case 5:return l===null&&se&&(h3(r.type,r.pendingProps,ba.current),(E=g=We)&&(g=o3(g,r.type,r.pendingProps,Vi),g!==null?(r.stateNode=g,Fn=r,We=Md(g),Vi=!1,E=!0):E=!1),E||ln(r)),xe(r),E=r.type,T=r.pendingProps,z=l!==null?l.memoizedProps:null,g=T.children,pf(E,T)?g=null:z!==null&&pf(E,z)&&(r.flags|=32),r.memoizedState!==null&&(E=Nc(l,r,Rh,null,null,h),Hi?fr._currentValue=E:fr._currentValue2=E),Kc(l,r),na(l,r,g,h),r.child;case 6:return l===null&&se&&(Rm(r.pendingProps,ba.current),(l=h=We)&&(h=dy(h,r.pendingProps,Vi),h!==null?(r.stateNode=h,Fn=r,We=null,l=!0):l=!1),l||ln(r)),null;case 13:return Kh(l,r,h);case 4:return le(r,r.stateNode.containerInfo),g=r.pendingProps,l===null?r.child=yo(r,null,g,h):na(l,r,g,h),r.child;case 11:return qc(l,r,r.type,r.pendingProps,h);case 7:return na(l,r,r.pendingProps,h),r.child;case 8:return na(l,r,r.pendingProps.children,h),r.child;case 12:return na(l,r,r.pendingProps.children,h),r.child;case 10:return g=r.pendingProps,Ba(r,r.type,g.value),na(l,r,g.children,h),r.child;case 9:return E=r.type._context,g=r.pendingProps.children,Mn(r),E=on(E),g=g(E),r.flags|=1,na(l,r,g,h),r.child;case 14:return Yh(l,r,r.type,r.pendingProps,h);case 15:return qh(l,r,r.type,r.pendingProps,h);case 19:return Et(l,r,h);case 31:return Xc(l,r,h);case 22:return El(l,r,h,r.pendingProps);case 24:return Mn(r),g=on(cn),l===null?(E=qr(),E===null&&(E=Le,T=Ae(),E.pooledCache=T,T.refCount++,T!==null&&(E.pooledCacheLanes|=h),E=T),r.memoizedState={parent:g,cache:E},Dc(r),Ba(r,cn,E)):((l.lanes&h)!==0&&(Jr(l,r),Fr(r,null,null,h),su()),E=l.memoizedState,T=r.memoizedState,E.parent!==g?(E={parent:g,cache:g},r.memoizedState=E,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=E),Ba(r,cn,g)):(g=T.cache,Ba(r,cn,g),g!==E.cache&&Ji(r,[cn],h,!0))),na(l,r,r.pendingProps.children,h),r.child;case 29:throw r.pendingProps}throw Error(u(156,r.tag))}function gi(l){l.flags|=4}function Jc(l){us&&(l.flags|=8)}function Jh(l,r){if(l!==null&&l.child===r.child)return!1;if((r.flags&16)!==0)return!0;for(l=r.child;l!==null;){if((l.flags&8218)!==0||(l.subtreeFlags&8218)!==0)return!0;l=l.sibling}return!1}function F0(l,r,h,g){if(Aa)for(h=r.child;h!==null;){if(h.tag===5||h.tag===6)Cd(l,h.stateNode);else if(!(h.tag===4||Ln&&h.tag===27)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===r)break;for(;h.sibling===null;){if(h.return===null||h.return===r)return;h=h.return}h.sibling.return=h.return,h=h.sibling}else if(us)for(var E=r.child;E!==null;){if(E.tag===5){var T=E.stateNode;h&&g&&(T=Nl(T,E.type,E.memoizedProps)),Cd(l,T)}else if(E.tag===6)T=E.stateNode,h&&g&&(T=yf(T,E.memoizedProps)),Cd(l,T);else if(E.tag!==4){if(E.tag===22&&E.memoizedState!==null)T=E.child,T!==null&&(T.return=E),F0(l,E,!0,!0);else if(E.child!==null){E.child.return=E,E=E.child;continue}}if(E===r)break;for(;E.sibling===null;){if(E.return===null||E.return===r)return;E=E.return}E.sibling.return=E.return,E=E.sibling}}function Fh(l,r,h,g){var E=!1;if(us)for(var T=r.child;T!==null;){if(T.tag===5){var z=T.stateNode;h&&g&&(z=Nl(z,T.type,T.memoizedProps)),Dm(l,z)}else if(T.tag===6)z=T.stateNode,h&&g&&(z=yf(z,T.memoizedProps)),Dm(l,z);else if(T.tag!==4){if(T.tag===22&&T.memoizedState!==null)E=T.child,E!==null&&(E.return=T),Fh(l,T,!0,!0),E=!0;else if(T.child!==null){T.child.return=T,T=T.child;continue}}if(T===r)break;for(;T.sibling===null;){if(T.return===null||T.return===r)return E;T=T.return}T.sibling.return=T.return,T=T.sibling}return E}function kh(l,r){if(us&&Jh(l,r)){l=r.stateNode;var h=l.containerInfo,g=Ie();Fh(g,r,!1,!1),l.pendingChildren=g,gi(r),ry(h,g)}}function Fc(l,r,h,g){if(Aa)l.memoizedProps!==g&&gi(r);else if(us){var E=l.stateNode,T=l.memoizedProps;if((l=Jh(l,r))||T!==g){var z=ba.current;T=ly(E,h,T,g,!l,null),T===E?r.stateNode=E:(Jc(r),qg(T,h,g,z)&&gi(r),r.stateNode=T,l&&F0(T,r,!1,!1))}else r.stateNode=E}}function ga(l,r,h,g,E){if((l.mode&32)!==0&&(h===null?Zg(r,g):s3(r,h,g))){if(l.flags|=16777216,(E&335544128)===E||_u(r,g))if(va(l.stateNode,r,g))l.flags|=8192;else if(Bg())l.flags|=8192;else throw Gi=Xd,Yd}else l.flags&=-16777217}function De(l,r){if(d3(r)){if(l.flags|=16777216,!Hd(r))if(Bg())l.flags|=8192;else throw Gi=Xd,Yd}else l.flags&=-16777217}function to(l,r){r!==null&&(l.flags|=4),l.flags&16384&&(r=l.tag!==22?V():536870912,l.lanes|=r,Pu|=r)}function Tl(l,r){if(!se)switch(l.tailMode){case"hidden":r=l.tail;for(var h=null;r!==null;)r.alternate!==null&&(h=r),r=r.sibling;h===null?l.tail=null:h.sibling=null;break;case"collapsed":h=l.tail;for(var g=null;h!==null;)h.alternate!==null&&(g=h),h=h.sibling;g===null?r||l.tail===null?l.tail=null:l.tail.sibling=null:g.sibling=null}}function Ce(l){var r=l.alternate!==null&&l.alternate.child===l.child,h=0,g=0;if(r)for(var E=l.child;E!==null;)h|=E.lanes|E.childLanes,g|=E.subtreeFlags&65011712,g|=E.flags&65011712,E.return=l,E=E.sibling;else for(E=l.child;E!==null;)h|=E.lanes|E.childLanes,g|=E.subtreeFlags,g|=E.flags,E.return=l,E=E.sibling;return l.subtreeFlags|=g,l.childLanes=h,r}function eo(l,r,h){var g=r.pendingProps;switch(Tt(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ce(r),null;case 1:return Ce(r),null;case 3:return h=r.stateNode,g=null,l!==null&&(g=l.memoizedState.cache),r.memoizedState.cache!==g&&(r.flags|=2048),rn(cn),xn(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(l===null||l.child===null)&&(ue(r)?gi(r):l===null||l.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,ea())),kh(l,r),Ce(r),null;case 26:if(wi){var E=r.type,T=r.memoizedState;return l===null?(gi(r),T!==null?(Ce(r),De(r,T)):(Ce(r),ga(r,E,null,g,h))):T?T!==l.memoizedState?(gi(r),Ce(r),De(r,T)):(Ce(r),r.flags&=-16777217):(T=l.memoizedProps,Aa?T!==g&&gi(r):Fc(l,r,E,g),Ce(r),ga(r,E,T,g,h)),null}case 27:if(Ln){if(Dn(r),h=dr.current,E=r.type,l!==null&&r.stateNode!=null)Aa?l.memoizedProps!==g&&gi(r):Fc(l,r,E,g);else{if(!g){if(r.stateNode===null)throw Error(u(166));return Ce(r),null}l=ba.current,ue(r)?Be(r,l):(l=wd(E,g,h,l,!0),r.stateNode=l,gi(r))}return Ce(r),null}case 5:if(Dn(r),E=r.type,l!==null&&r.stateNode!=null)Fc(l,r,E,g);else{if(!g){if(r.stateNode===null)throw Error(u(166));return Ce(r),null}if(T=ba.current,ue(r))Be(r,T),by(r.stateNode,E,g,T)&&(r.flags|=64);else{var z=js(E,g,dr.current,T,r);Jc(r),F0(z,r,!1,!1),r.stateNode=z,qg(z,E,g,T)&&gi(r)}}return Ce(r),ga(r,r.type,l===null?null:l.memoizedProps,r.pendingProps,h),null;case 6:if(l&&r.stateNode!=null)h=l.memoizedProps,Aa?h!==g&&gi(r):us&&(h!==g?(l=dr.current,h=ba.current,Jc(r),r.stateNode=_d(g,l,h,r)):r.stateNode=l.stateNode);else{if(typeof g!="string"&&r.stateNode===null)throw Error(u(166));if(l=dr.current,h=ba.current,ue(r)){if(!ya)throw Error(u(176));if(l=r.stateNode,h=r.memoizedProps,g=null,E=Fn,E!==null)switch(E.tag){case 27:case 5:g=E.memoizedProps}Od(l,h,r,g)||ln(r,!0)}else Jc(r),r.stateNode=_d(g,l,h,r)}return Ce(r),null;case 31:if(h=r.memoizedState,l===null||l.memoizedState!==null){if(g=ue(r),h!==null){if(l===null){if(!g)throw Error(u(318));if(!ya)throw Error(u(556));if(l=r.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(u(557));my(l,r)}else ta(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ce(r),l=!1}else h=ea(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=h),l=!0;if(!l)return r.flags&256?($a(r),r):($a(r),null);if((r.flags&128)!==0)throw Error(u(558))}return Ce(r),null;case 13:if(g=r.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(E=ue(r),g!==null&&g.dehydrated!==null){if(l===null){if(!E)throw Error(u(318));if(!ya)throw Error(u(344));if(E=r.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(u(317));Nm(E,r)}else ta(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ce(r),E=!1}else E=ea(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=E),E=!0;if(!E)return r.flags&256?($a(r),r):($a(r),null)}return $a(r),(r.flags&128)!==0?(r.lanes=h,r):(h=g!==null,l=l!==null&&l.memoizedState!==null,h&&(g=r.child,E=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(E=g.alternate.memoizedState.cachePool.pool),T=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(T=g.memoizedState.cachePool.pool),T!==E&&(g.flags|=2048)),h!==l&&h&&(r.child.flags|=8192),to(r,r.updateQueue),Ce(r),null);case 4:return xn(),kh(l,r),l===null&&i3(r.stateNode.containerInfo),Ce(r),null;case 10:return rn(r.type),Ce(r),null;case 19:if(D(Hn),g=r.memoizedState,g===null)return Ce(r),null;if(E=(r.flags&128)!==0,T=g.rendering,T===null)if(E)Tl(g,!1);else{if(yn!==0||l!==null&&(l.flags&128)!==0)for(l=r.child;l!==null;){if(T=yl(l),T!==null){for(r.flags|=128,Tl(g,!1),l=T.updateQueue,r.updateQueue=l,to(r,l),r.subtreeFlags=0,l=h,h=r.child;h!==null;)fm(h,l),h=h.sibling;return A(Hn,Hn.current&1|2),se&&St(r,g.treeForkCount),r.child}l=l.sibling}g.tail!==null&&Me()>Yu&&(r.flags|=128,E=!0,Tl(g,!1),r.lanes=4194304)}else{if(!E)if(l=yl(T),l!==null){if(r.flags|=128,E=!0,l=l.updateQueue,r.updateQueue=l,to(r,l),Tl(g,!0),g.tail===null&&g.tailMode==="hidden"&&!T.alternate&&!se)return Ce(r),null}else 2*Me()-g.renderingStartTime>Yu&&h!==536870912&&(r.flags|=128,E=!0,Tl(g,!1),r.lanes=4194304);g.isBackwards?(T.sibling=r.child,r.child=T):(l=g.last,l!==null?l.sibling=T:r.child=T,g.last=T)}return g.tail!==null?(l=g.tail,g.rendering=l,g.tail=l.sibling,g.renderingStartTime=Me(),l.sibling=null,h=Hn.current,A(Hn,E?h&1|2:h&1),se&&St(r,g.treeForkCount),l):(Ce(r),null);case 22:case 23:return $a(r),pl(),g=r.memoizedState!==null,l!==null?l.memoizedState!==null!==g&&(r.flags|=8192):g&&(r.flags|=8192),g?(h&536870912)!==0&&(r.flags&128)===0&&(Ce(r),r.subtreeFlags&6&&(r.flags|=8192)):Ce(r),h=r.updateQueue,h!==null&&to(r,h.retryQueue),h=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),g=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(g=r.memoizedState.cachePool.pool),g!==h&&(r.flags|=2048),l!==null&&D(pr),null;case 24:return h=null,l!==null&&(h=l.memoizedState.cache),r.memoizedState.cache!==h&&(r.flags|=2048),rn(cn),Ce(r),null;case 25:return null;case 30:return null}throw Error(u(156,r.tag))}function ss(l,r){switch(Tt(r),r.tag){case 1:return l=r.flags,l&65536?(r.flags=l&-65537|128,r):null;case 3:return rn(cn),xn(),l=r.flags,(l&65536)!==0&&(l&128)===0?(r.flags=l&-65537|128,r):null;case 26:case 27:case 5:return Dn(r),null;case 31:if(r.memoizedState!==null){if($a(r),r.alternate===null)throw Error(u(340));ta()}return l=r.flags,l&65536?(r.flags=l&-65537|128,r):null;case 13:if($a(r),l=r.memoizedState,l!==null&&l.dehydrated!==null){if(r.alternate===null)throw Error(u(340));ta()}return l=r.flags,l&65536?(r.flags=l&-65537|128,r):null;case 19:return D(Hn),null;case 4:return xn(),null;case 10:return rn(r.type),null;case 22:case 23:return $a(r),pl(),l!==null&&D(pr),l=r.flags,l&65536?(r.flags=l&-65537|128,r):null;case 24:return rn(cn),null;case 25:return null;default:return null}}function Ih(l,r){switch(Tt(r),r.tag){case 3:rn(cn),xn();break;case 26:case 27:case 5:Dn(r);break;case 4:xn();break;case 31:r.memoizedState!==null&&$a(r);break;case 13:$a(r);break;case 19:D(Hn);break;case 10:rn(r.type);break;case 22:case 23:$a(r),pl(),l!==null&&D(pr);break;case 24:rn(cn)}}function ws(l,r){try{var h=r.updateQueue,g=h!==null?h.lastEffect:null;if(g!==null){var E=g.next;h=E;do{if((h.tag&l)===l){g=void 0;var T=h.create,z=h.inst;g=T(),z.destroy=g}h=h.next}while(h!==E)}}catch(L){be(r,r.return,L)}}function Us(l,r,h){try{var g=r.updateQueue,E=g!==null?g.lastEffect:null;if(E!==null){var T=E.next;g=T;do{if((g.tag&l)===l){var z=g.inst,L=z.destroy;if(L!==void 0){z.destroy=void 0,E=r;var ft=h,vt=L;try{vt()}catch(Mt){be(E,ft,Mt)}}}g=g.next}while(g!==T)}}catch(Mt){be(r,r.return,Mt)}}function yu(l){var r=l.updateQueue;if(r!==null){var h=l.stateNode;try{_g(r,h)}catch(g){be(l,l.return,g)}}}function Wh(l,r,h){h.props=zs(l.type,l.memoizedProps),h.state=l.memoizedState;try{h.componentWillUnmount()}catch(g){be(l,r,g)}}function nr(l,r){try{var h=l.ref;if(h!==null){switch(l.tag){case 26:case 27:case 5:var g=hf(l.stateNode);break;case 30:g=l.stateNode;break;default:g=l.stateNode}typeof h=="function"?l.refCleanup=h(g):h.current=g}}catch(E){be(l,r,E)}}function ls(l,r){var h=l.ref,g=l.refCleanup;if(h!==null)if(typeof g=="function")try{g()}catch(E){be(l,r,E)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(E){be(l,r,E)}else h.current=null}function k0(l){var r=l.type,h=l.memoizedProps,g=l.stateNode;try{ey(g,r,h,l)}catch(E){be(l,l.return,E)}}function $h(l,r,h){try{xd(l.stateNode,l.type,h,r,l)}catch(g){be(l,l.return,g)}}function I0(l){return l.tag===5||l.tag===3||(wi?l.tag===26:!1)||(Ln?l.tag===27&&fo(l.type):!1)||l.tag===4}function td(l){t:for(;;){for(;l.sibling===null;){if(l.return===null||I0(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(Ln&&l.tag===27&&fo(l.type)||l.flags&2||l.child===null||l.tag===4)continue t;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function kc(l,r,h){var g=l.tag;if(g===5||g===6)l=l.stateNode,r?ay(h,l,r):ty(h,l);else if(g!==4&&(Ln&&g===27&&fo(l.type)&&(h=l.stateNode,r=null),l=l.child,l!==null))for(kc(l,r,h),l=l.sibling;l!==null;)kc(l,r,h),l=l.sibling}function vu(l,r,h){var g=l.tag;if(g===5||g===6)l=l.stateNode,r?ny(h,l,r):$g(h,l);else if(g!==4&&(Ln&&g===27&&fo(l.type)&&(h=l.stateNode),l=l.child,l!==null))for(vu(l,r,h),l=l.sibling;l!==null;)vu(l,r,h),l=l.sibling}function ed(l,r,h){l=l.containerInfo;try{oy(l,h)}catch(g){be(r,r.return,g)}}function W0(l){var r=l.stateNode,h=l.memoizedProps;try{Ud(l.type,h,r,l)}catch(g){be(l,l.return,g)}}function Ng(l,r){for(a3(l.containerInfo),aa=r;aa!==null;)if(l=aa,r=l.child,(l.subtreeFlags&1028)!==0&&r!==null)r.return=l,aa=r;else for(;aa!==null;){l=aa;var h=l.alternate;switch(r=l.flags,l.tag){case 0:if((r&4)!==0&&(r=l.updateQueue,r=r!==null?r.events:null,r!==null))for(var g=0;g<r.length;g++){var E=r[g];E.ref.impl=E.nextImpl}break;case 11:case 15:break;case 1:if((r&1024)!==0&&h!==null){r=void 0,g=l,E=h.memoizedProps,h=h.memoizedState;var T=g.stateNode;try{var z=zs(g.type,E);r=T.getSnapshotBeforeUpdate(z,h),T.__reactInternalSnapshotBeforeUpdate=r}catch(L){be(g,g.return,L)}}break;case 3:(r&1024)!==0&&Aa&&vi(l.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(u(163))}if(r=l.sibling,r!==null){r.return=l.return,aa=r;break}aa=l.return}}function $0(l,r,h){var g=h.flags;switch(h.tag){case 0:case 11:case 15:Ri(l,h),g&4&&ws(5,h);break;case 1:if(Ri(l,h),g&4)if(l=h.stateNode,r===null)try{l.componentDidMount()}catch(z){be(h,h.return,z)}else{var E=zs(h.type,r.memoizedProps);r=r.memoizedState;try{l.componentDidUpdate(E,r,l.__reactInternalSnapshotBeforeUpdate)}catch(z){be(h,h.return,z)}}g&64&&yu(h),g&512&&nr(h,h.return);break;case 3:if(Ri(l,h),g&64&&(g=h.updateQueue,g!==null)){if(l=null,h.child!==null)switch(h.child.tag){case 27:case 5:l=hf(h.child.stateNode);break;case 1:l=h.child.stateNode}try{_g(g,l)}catch(z){be(h,h.return,z)}}break;case 27:Ln&&r===null&&g&4&&W0(h);case 26:case 5:if(Ri(l,h),r===null){if(g&4)k0(h);else if(g&64){l=h.type,r=h.memoizedProps,E=h.stateNode;try{vy(E,l,r,h)}catch(z){be(h,h.return,z)}}}g&512&&nr(h,h.return);break;case 12:Ri(l,h);break;case 31:Ri(l,h),g&4&&tm(l,h);break;case 13:Ri(l,h),g&4&&ad(l,h),g&64&&(g=h.memoizedState,g!==null&&(g=g.dehydrated,g!==null&&(h=pd.bind(null,h),xu(g,h))));break;case 22:if(g=h.memoizedState!==null||Zs,!g){r=r!==null&&r.memoizedState!==null||wn,E=Zs;var T=wn;Zs=g,(wn=r)&&!T?rs(l,h,(h.subtreeFlags&8772)!==0):Ri(l,h),Zs=E,wn=T}break;case 30:break;default:Ri(l,h)}}function Og(l){var r=l.alternate;r!==null&&(l.alternate=null,Og(r)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(r=l.stateNode,r!==null&&Qg(r)),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function Oi(l,r,h){for(h=h.child;h!==null;)nd(l,r,h),h=h.sibling}function nd(l,r,h){if(Rn&&typeof Rn.onCommitFiberUnmount=="function")try{Rn.onCommitFiberUnmount(po,h)}catch{}switch(h.tag){case 26:if(wi){wn||ls(h,r),Oi(l,r,h),h.memoizedState?xy(h.memoizedState):h.stateNode&&Hm(h.stateNode);break}case 27:if(Ln){wn||ls(h,r);var g=Xn,E=oi;fo(h.type)&&(Xn=h.stateNode,oi=!1),Oi(l,r,h),hr(h.stateNode),Xn=g,oi=E;break}case 5:wn||ls(h,r);case 6:if(Aa){if(g=Xn,E=oi,Xn=null,Oi(l,r,h),Xn=g,oi=E,Xn!==null)if(oi)try{xm(Xn,h.stateNode)}catch(T){be(h,r,T)}else try{_m(Xn,h.stateNode)}catch(T){be(h,r,T)}}else Oi(l,r,h);break;case 18:Aa&&Xn!==null&&(oi?Om(Xn,h.stateNode):Ee(Xn,h.stateNode));break;case 4:Aa?(g=Xn,E=oi,Xn=h.stateNode.containerInfo,oi=!0,Oi(l,r,h),Xn=g,oi=E):(us&&ed(h.stateNode,h,Ie()),Oi(l,r,h));break;case 0:case 11:case 14:case 15:Us(2,h,r),wn||Us(4,h,r),Oi(l,r,h);break;case 1:wn||(ls(h,r),g=h.stateNode,typeof g.componentWillUnmount=="function"&&Wh(h,r,g)),Oi(l,r,h);break;case 21:Oi(l,r,h);break;case 22:wn=(g=wn)||h.memoizedState!==null,Oi(l,r,h),wn=g;break;default:Oi(l,r,h)}}function tm(l,r){if(ya&&r.memoizedState===null&&(l=r.alternate,l!==null&&(l=l.memoizedState,l!==null))){l=l.dehydrated;try{Sy(l)}catch(h){be(r,r.return,h)}}}function ad(l,r){if(ya&&r.memoizedState===null&&(l=r.alternate,l!==null&&(l=l.memoizedState,l!==null&&(l=l.dehydrated,l!==null))))try{Au(l)}catch(h){be(r,r.return,h)}}function Rg(l){switch(l.tag){case 31:case 13:case 19:var r=l.stateNode;return r===null&&(r=l.stateNode=new Id),r;case 22:return l=l.stateNode,r=l._retryCache,r===null&&(r=l._retryCache=new Id),r;default:throw Error(u(435,l.tag))}}function Ic(l,r){var h=Rg(l);r.forEach(function(g){if(!h.has(g)){h.add(g);var E=Lg.bind(null,l,g);g.then(E,E)}})}function Nn(l,r){var h=r.deletions;if(h!==null)for(var g=0;g<h.length;g++){var E=h[g],T=l,z=r;if(Aa){var L=z;t:for(;L!==null;){switch(L.tag){case 27:if(Ln){if(fo(L.type)){Xn=L.stateNode,oi=!1;break t}break}case 5:Xn=L.stateNode,oi=!1;break t;case 3:case 4:Xn=L.stateNode.containerInfo,oi=!0;break t}L=L.return}if(Xn===null)throw Error(u(160));nd(T,z,E),Xn=null,oi=!1}else nd(T,z,E);T=E.alternate,T!==null&&(T.return=null),E.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Wc(r,l),r=r.sibling}function Wc(l,r){var h=l.alternate,g=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:Nn(r,l),xa(l),g&4&&(Us(3,l,l.return),ws(3,l),Us(5,l,l.return));break;case 1:Nn(r,l),xa(l),g&512&&(wn||h===null||ls(h,h.return)),g&64&&Zs&&(l=l.updateQueue,l!==null&&(g=l.callbacks,g!==null&&(h=l.shared.hiddenCallbacks,l.shared.hiddenCallbacks=h===null?g:h.concat(g))));break;case 26:if(wi){var E=ps;if(Nn(r,l),xa(l),g&512&&(wn||h===null||ls(h,h.return)),g&4){g=h!==null?h.memoizedState:null;var T=l.memoizedState;h===null?T===null?l.stateNode===null?l.stateNode=co(E,l.type,l.memoizedProps,l):zd(E,l.type,l.stateNode):l.stateNode=_y(E,T,l.memoizedProps):g!==T?(g===null?h.stateNode!==null&&Hm(h.stateNode):xy(g),T===null?zd(E,l.type,l.stateNode):_y(E,T,l.memoizedProps)):T===null&&l.stateNode!==null&&$h(l,l.memoizedProps,h.memoizedProps)}break}case 27:if(Ln){Nn(r,l),xa(l),g&512&&(wn||h===null||ls(h,h.return)),h!==null&&g&4&&$h(l,l.memoizedProps,h.memoizedProps);break}case 5:if(Nn(r,l),xa(l),g&512&&(wn||h===null||ls(h,h.return)),Aa){if(l.flags&32){E=l.stateNode;try{Dd(E)}catch(xt){be(l,l.return,xt)}}g&4&&l.stateNode!=null&&(E=l.memoizedProps,$h(l,E,h!==null?h.memoizedProps:E)),g&1024&&(Mf=!0)}else us&&l.alternate!==null&&(l.alternate.stateNode=l.stateNode);break;case 6:if(Nn(r,l),xa(l),g&4&&Aa){if(l.stateNode===null)throw Error(u(162));g=l.memoizedProps,h=h!==null?h.memoizedProps:g,E=l.stateNode;try{gf(E,h,g)}catch(xt){be(l,l.return,xt)}}break;case 3:if(wi?(Ay(),E=ps,ps=Rd(r.containerInfo),Nn(r,l),ps=E):Nn(r,l),xa(l),g&4){if(Aa&&ya&&h!==null&&h.memoizedState.isDehydrated)try{c3(r.containerInfo)}catch(xt){be(l,l.return,xt)}if(us){g=r.containerInfo,h=r.pendingChildren;try{oy(g,h)}catch(xt){be(l,l.return,xt)}}}Mf&&(Mf=!1,zg(l));break;case 4:wi?(h=ps,ps=Rd(l.stateNode.containerInfo),Nn(r,l),xa(l),ps=h):(Nn(r,l),xa(l)),g&4&&us&&ed(l.stateNode,l,l.stateNode.pendingChildren);break;case 12:Nn(r,l),xa(l);break;case 31:Nn(r,l),xa(l),g&4&&(g=l.updateQueue,g!==null&&(l.updateQueue=null,Ic(l,g)));break;case 13:Nn(r,l),xa(l),l.child.flags&8192&&l.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(Rf=Me()),g&4&&(g=l.updateQueue,g!==null&&(l.updateQueue=null,Ic(l,g)));break;case 22:E=l.memoizedState!==null;var z=h!==null&&h.memoizedState!==null,L=Zs,ft=wn;if(Zs=L||E,wn=ft||z,Nn(r,l),wn=ft,Zs=L,xa(l),g&8192&&(r=l.stateNode,r._visibility=E?r._visibility&-2:r._visibility|1,E&&(h===null||z||Zs||wn||zi(l)),Aa)){t:if(h=null,Aa)for(r=l;;){if(r.tag===5||wi&&r.tag===26){if(h===null){z=h=r;try{T=z.stateNode,E?iy(T):l3(z.stateNode,z.memoizedProps)}catch(xt){be(z,z.return,xt)}}}else if(r.tag===6){if(h===null){z=r;try{var vt=z.stateNode;E?Ad(vt):sy(vt,z.memoizedProps)}catch(xt){be(z,z.return,xt)}}}else if(r.tag===18){if(h===null){z=r;try{var Mt=z.stateNode;E?f3(Mt):Ty(z.stateNode)}catch(xt){be(z,z.return,xt)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===l)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===l)break t;for(;r.sibling===null;){if(r.return===null||r.return===l)break t;h===r&&(h=null),r=r.return}h===r&&(h=null),r.sibling.return=r.return,r=r.sibling}}g&4&&(g=l.updateQueue,g!==null&&(h=g.retryQueue,h!==null&&(g.retryQueue=null,Ic(l,h))));break;case 19:Nn(r,l),xa(l),g&4&&(g=l.updateQueue,g!==null&&(l.updateQueue=null,Ic(l,g)));break;case 30:break;case 21:break;default:Nn(r,l),xa(l)}}function xa(l){var r=l.flags;if(r&2){try{for(var h,g=l.return;g!==null;){if(I0(g)){h=g;break}g=g.return}if(Aa){if(h==null)throw Error(u(160));switch(h.tag){case 27:if(Ln){var E=h.stateNode,T=td(l);vu(l,T,E);break}case 5:var z=h.stateNode;h.flags&32&&(Dd(z),h.flags&=-33);var L=td(l);vu(l,L,z);break;case 3:case 4:var ft=h.stateNode.containerInfo,vt=td(l);kc(l,vt,ft);break;default:throw Error(u(161))}}}catch(Mt){be(l,l.return,Mt)}l.flags&=-3}r&4096&&(l.flags&=-4097)}function zg(l){if(l.subtreeFlags&1024)for(l=l.child;l!==null;){var r=l;zg(r),r.tag===5&&r.flags&1024&&lo(r.stateNode),l=l.sibling}}function Ri(l,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)$0(l,r.alternate,r),r=r.sibling}function zi(l){for(l=l.child;l!==null;){var r=l;switch(r.tag){case 0:case 11:case 14:case 15:Us(4,r,r.return),zi(r);break;case 1:ls(r,r.return);var h=r.stateNode;typeof h.componentWillUnmount=="function"&&Wh(r,r.return,h),zi(r);break;case 27:Ln&&hr(r.stateNode);case 26:case 5:ls(r,r.return),zi(r);break;case 22:r.memoizedState===null&&zi(r);break;case 30:zi(r);break;default:zi(r)}l=l.sibling}}function rs(l,r,h){for(h=h&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var g=r.alternate,E=l,T=r,z=T.flags;switch(T.tag){case 0:case 11:case 15:rs(E,T,h),ws(4,T);break;case 1:if(rs(E,T,h),g=T,E=g.stateNode,typeof E.componentDidMount=="function")try{E.componentDidMount()}catch(vt){be(g,g.return,vt)}if(g=T,E=g.updateQueue,E!==null){var L=g.stateNode;try{var ft=E.shared.hiddenCallbacks;if(ft!==null)for(E.shared.hiddenCallbacks=null,E=0;E<ft.length;E++)H0(ft[E],L)}catch(vt){be(g,g.return,vt)}}h&&z&64&&yu(T),nr(T,T.return);break;case 27:Ln&&W0(T);case 26:case 5:rs(E,T,h),h&&g===null&&z&4&&k0(T),nr(T,T.return);break;case 12:rs(E,T,h);break;case 31:rs(E,T,h),h&&z&4&&tm(E,T);break;case 13:rs(E,T,h),h&&z&4&&ad(E,T);break;case 22:T.memoizedState===null&&rs(E,T,h),nr(T,T.return);break;case 30:break;default:rs(E,T,h)}r=r.sibling}}function Cl(l,r){var h=null;l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),l=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),l!==h&&(l!=null&&l.refCount++,h!=null&&jn(h))}function Da(l,r){l=null,r.alternate!==null&&(l=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==l&&(r.refCount++,l!=null&&jn(l))}function ni(l,r,h,g){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Hg(l,r,h,g),r=r.sibling}function Hg(l,r,h,g){var E=r.flags;switch(r.tag){case 0:case 11:case 15:ni(l,r,h,g),E&2048&&ws(9,r);break;case 1:ni(l,r,h,g);break;case 3:ni(l,r,h,g),E&2048&&(l=null,r.alternate!==null&&(l=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==l&&(r.refCount++,l!=null&&jn(l)));break;case 12:if(E&2048){ni(l,r,h,g),l=r.stateNode;try{var T=r.memoizedProps,z=T.id,L=T.onPostCommit;typeof L=="function"&&L(z,r.alternate===null?"mount":"update",l.passiveEffectDuration,-0)}catch(ft){be(r,r.return,ft)}}else ni(l,r,h,g);break;case 31:ni(l,r,h,g);break;case 13:ni(l,r,h,g);break;case 23:break;case 22:T=r.stateNode,z=r.alternate,r.memoizedState!==null?T._visibility&2?ni(l,r,h,g):ir(l,r):T._visibility&2?ni(l,r,h,g):(T._visibility|=2,ar(l,r,h,g,(r.subtreeFlags&10256)!==0||!1)),E&2048&&Cl(z,r);break;case 24:ni(l,r,h,g),E&2048&&Da(r.alternate,r);break;default:ni(l,r,h,g)}}function ar(l,r,h,g,E){for(E=E&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var T=l,z=r,L=h,ft=g,vt=z.flags;switch(z.tag){case 0:case 11:case 15:ar(T,z,L,ft,E),ws(8,z);break;case 23:break;case 22:var Mt=z.stateNode;z.memoizedState!==null?Mt._visibility&2?ar(T,z,L,ft,E):ir(T,z):(Mt._visibility|=2,ar(T,z,L,ft,E)),E&&vt&2048&&Cl(z.alternate,z);break;case 24:ar(T,z,L,ft,E),E&&vt&2048&&Da(z.alternate,z);break;default:ar(T,z,L,ft,E)}r=r.sibling}}function ir(l,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var h=l,g=r,E=g.flags;switch(g.tag){case 22:ir(h,g),E&2048&&Cl(g.alternate,g);break;case 24:ir(h,g),E&2048&&Da(g.alternate,g);break;default:ir(h,g)}r=r.sibling}}function _l(l,r,h){if(l.subtreeFlags&gr)for(l=l.child;l!==null;)em(l,r,h),l=l.sibling}function em(l,r,h){switch(l.tag){case 26:if(_l(l,r,h),l.flags&gr)if(l.memoizedState!==null)Ol(h,ps,l.memoizedState,l.memoizedProps);else{var g=l.stateNode,E=l.type;l=l.memoizedProps,((r&335544128)===r||_u(E,l))&&Ma(h,g,E,l)}break;case 5:_l(l,r,h),l.flags&gr&&(g=l.stateNode,E=l.type,l=l.memoizedProps,((r&335544128)===r||_u(E,l))&&Ma(h,g,E,l));break;case 3:case 4:wi?(g=ps,ps=Rd(l.stateNode.containerInfo),_l(l,r,h),ps=g):_l(l,r,h);break;case 22:l.memoizedState===null&&(g=l.alternate,g!==null&&g.memoizedState!==null?(g=gr,gr=16777216,_l(l,r,h),gr=g):_l(l,r,h));break;default:_l(l,r,h)}}function id(l){var r=l.alternate;if(r!==null&&(l=r.child,l!==null)){r.child=null;do r=l.sibling,l.sibling=null,l=r;while(l!==null)}}function sr(l){var r=l.deletions;if((l.flags&16)!==0){if(r!==null)for(var h=0;h<r.length;h++){var g=r[h];aa=g,ld(g,l)}id(l)}if(l.subtreeFlags&10256)for(l=l.child;l!==null;)sd(l),l=l.sibling}function sd(l){switch(l.tag){case 0:case 11:case 15:sr(l),l.flags&2048&&Us(9,l,l.return);break;case 3:sr(l);break;case 12:sr(l);break;case 22:var r=l.stateNode;l.memoizedState!==null&&r._visibility&2&&(l.return===null||l.return.tag!==13)?(r._visibility&=-3,no(l)):sr(l);break;default:sr(l)}}function no(l){var r=l.deletions;if((l.flags&16)!==0){if(r!==null)for(var h=0;h<r.length;h++){var g=r[h];aa=g,ld(g,l)}id(l)}for(l=l.child;l!==null;){switch(r=l,r.tag){case 0:case 11:case 15:Us(8,r,r.return),no(r);break;case 22:h=r.stateNode,h._visibility&2&&(h._visibility&=-3,no(r));break;default:no(r)}l=l.sibling}}function ld(l,r){for(;aa!==null;){var h=aa;switch(h.tag){case 0:case 11:case 15:Us(8,h,r);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var g=h.memoizedState.cachePool.pool;g!=null&&g.refCount++}break;case 24:jn(h.memoizedState.cache)}if(g=h.child,g!==null)g.return=h,aa=g;else t:for(h=l;aa!==null;){g=aa;var E=g.sibling,T=g.return;if(Og(g),g===h){aa=null;break t}if(E!==null){E.return=T,aa=E;break t}aa=T}}}function Su(l){var r=Kg(l);if(r!=null){if(typeof r.memoizedProps["data-testname"]!="string")throw Error(u(364));return r}if(l=Cm(l),l===null)throw Error(u(362));return l.stateNode.current}function $c(l,r){var h=l.tag;switch(r.$$typeof){case Wd:if(l.type===r.value)return!0;break;case $d:t:{for(r=r.value,l=[l,0],h=0;h<l.length;){var g=l[h++],E=g.tag,T=l[h++],z=r[T];if(E!==5&&E!==26&&E!==27||!Ys(g)){for(;z!=null&&$c(g,z);)T++,z=r[T];if(T===r.length){r=!0;break t}else for(g=g.child;g!==null;)l.push(g,T),g=g.sibling}}r=!1}return r;case tp:if((h===5||h===26||h===27)&&Wg(l.stateNode,r.value))return!0;break;case np:if((h===5||h===6||h===26||h===27)&&(l=Ig(l),l!==null&&0<=l.indexOf(r.value)))return!0;break;case ep:if((h===5||h===26||h===27)&&(l=l.memoizedProps["data-testname"],typeof l=="string"&&l.toLowerCase()===r.value.toLowerCase()))return!0;break;default:throw Error(u(365))}return!1}function rd(l){switch(l.$$typeof){case Wd:return"<"+(_(l.value)||"Unknown")+">";case $d:return":has("+(rd(l)||"")+")";case tp:return'[role="'+l.value+'"]';case np:return'"'+l.value+'"';case ep:return'[data-testname="'+l.value+'"]';default:throw Error(u(365))}}function nm(l,r){var h=[];l=[l,0];for(var g=0;g<l.length;){var E=l[g++],T=E.tag,z=l[g++],L=r[z];if(T!==5&&T!==26&&T!==27||!Ys(E)){for(;L!=null&&$c(E,L);)z++,L=r[z];if(z===r.length)h.push(E);else for(E=E.child;E!==null;)l.push(E,z),E=E.sibling}}return h}function tf(l,r){if(!ro)throw Error(u(363));l=Su(l),l=nm(l,r),r=[],l=Array.from(l);for(var h=0;h<l.length;){var g=l[h++],E=g.tag;if(E===5||E===26||E===27)Ys(g)||r.push(g.stateNode);else for(g=g.child;g!==null;)l.push(g),g=g.sibling}return r}function ai(){return(re&2)!==0&&ce!==0?ce&-ce:Gt.T!==null?Yr():cs()}function ef(){if(Ei===0)if((ce&536870912)===0||se){var l=Tf;Tf<<=1,(Tf&3932160)===0&&(Tf=262144),Ei=l}else Ei=536870912;return l=Si.current,l!==null&&(l.flags|=32),Ei}function Pa(l,r,h){(l===Le&&(He===2||He===9)||l.cancelPendingCommit!==null)&&(rr(l,0),xl(l,ce,Ei,!1)),$(l,h),((re&2)===0||l!==Le)&&(l===Le&&((re&2)===0&&(bo|=h),yn===4&&xl(l,ce,Ei,!1)),ke(l))}function am(l,r,h){if((re&6)!==0)throw Error(u(327));var g=!h&&(r&127)===0&&(r&l.expiredLanes)===0||U(l,r),E=g?Gg(l,r):Tu(l,r,!0),T=g;do{if(E===0){So&&!g&&xl(l,r,0,!1);break}else{if(h=l.current.alternate,T&&!wg(h)){E=Tu(l,r,!1),T=!1;continue}if(E===2){if(T=r,l.errorRecoveryDisabledLanes&T)var z=0;else z=l.pendingLanes&-536870913,z=z!==0?z:z&536870912?536870912:0;if(z!==0){r=z;t:{var L=l;E=Of;var ft=ya&&L.current.memoizedState.isDehydrated;if(ft&&(rr(L,z).flags|=256),z=Tu(L,z,!1),z!==2){if(Ym&&!ft){L.errorRecoveryDisabledLanes|=T,bo|=T,E=4;break t}T=ui,ui=E,T!==null&&(ui===null?ui=T:ui.push.apply(ui,T))}E=z}if(T=!1,E!==2)continue}}if(E===1){rr(l,0),xl(l,r,0,!0);break}t:{switch(g=l,T=E,T){case 0:case 1:throw Error(u(345));case 4:if((r&4194048)!==r)break;case 6:xl(g,r,Ei,!yr);break t;case 2:ui=null;break;case 3:case 5:break;default:throw Error(u(329))}if((r&62914560)===r&&(E=Rf+300-Me(),10<E)){if(xl(g,r,Ei,!yr),O(g,0,!0)!==0)break t;Js=r,g.timeoutHandle=Xg(od.bind(null,g,h,ui,ip,ap,r,Ei,bo,Pu,yr,T,"Throttled",-0,0),E);break t}od(g,h,ui,ip,ap,r,Ei,bo,Pu,yr,T,null,-0,0)}}break}while(!0);ke(l)}function od(l,r,h,g,E,T,z,L,ft,vt,Mt,xt,Rt,Yt){if(l.timeoutHandle=Ml,xt=r.subtreeFlags,xt&8192||(xt&16785408)===16785408){xt=Jg(),em(r,T,xt);var tn=(T&62914560)===T?Rf-Me():(T&4194048)===T?Xm-Me():0;if(tn=Fg(xt,tn),tn!==null){Js=T,l.cancelPendingCommit=tn(rm.bind(null,l,r,T,h,g,E,z,L,ft,Mt,xt,null,Rt,Yt)),xl(l,T,z,!vt);return}}rm(l,r,T,h,g,E,z,L,ft)}function wg(l){for(var r=l;;){var h=r.tag;if((h===0||h===11||h===15)&&r.flags&16384&&(h=r.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var g=0;g<h.length;g++){var E=h[g],T=E.getSnapshot;E=E.value;try{if(!Sa(T(),E))return!1}catch{return!1}}if(h=r.child,r.subtreeFlags&16384&&h!==null)h.return=r,r=h;else{if(r===l)break;for(;r.sibling===null;){if(r.return===null||r.return===l)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function xl(l,r,h,g){r&=~qm,r&=~bo,l.suspendedLanes|=r,l.pingedLanes&=~r,g&&(l.warmLanes|=r),g=l.expirationTimes;for(var E=r;0<E;){var T=31-ii(E),z=1<<T;g[T]=-1,E&=~z}h!==0&&I(l,h,r)}function lr(){return(re&6)===0?(mn(0),!1):!0}function nf(){if(oe!==null){if(He===0)var l=oe.return;else l=oe,$e=Ka=null,Oc(l),ji=null,Df=0,l=oe;for(;l!==null;)Ih(l.alternate,l),l=l.return;oe=null}}function rr(l,r){var h=l.timeoutHandle;h!==Ml&&(l.timeoutHandle=Ml,Em(h)),h=l.cancelPendingCommit,h!==null&&(l.cancelPendingCommit=null,h()),Js=0,nf(),Le=l,oe=h=Vs(l.current,null),ce=r,He=0,bi=null,yr=!1,So=U(l,r),Ym=!1,Pu=Ei=qm=bo=vr=yn=0,ui=Of=null,ap=!1,(r&8)!==0&&(r|=r&32);var g=l.entangledLanes;if(g!==0)for(l=l.entanglements,g&=r;0<g;){var E=31-ii(g),T=1<<E;r|=l[E],g&=~T}return Bl=r,Ca(),h}function Ug(l,r){kt=null,Gt.H=Af,r===Vu||r===qd?(r=xc(),He=3):r===Yd?(r=xc(),He=4):He=r===Fd?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,bi=r,oe===null&&(yn=1,Pc(l,at(r,l.current)))}function Bg(){var l=Si.current;return l===null?!0:(ce&4194048)===ce?Pi===null:(ce&62914560)===ce||(ce&536870912)!==0?l===Pi:!1}function im(){var l=Gt.H;return Gt.H=Af,l===null?Af:l}function bu(){var l=Gt.A;return Gt.A=y3,l}function Eu(){yn=4,yr||(ce&4194048)!==ce&&Si.current!==null||(So=!0),(vr&134217727)===0&&(bo&134217727)===0||Le===null||xl(Le,ce,Ei,!1)}function Tu(l,r,h){var g=re;re|=2;var E=im(),T=bu();(Le!==l||ce!==r)&&(ip=null,rr(l,r)),r=!1;var z=yn;t:do try{if(He!==0&&oe!==null){var L=oe,ft=bi;switch(He){case 8:nf(),z=6;break t;case 3:case 2:case 9:case 6:Si.current===null&&(r=!0);var vt=He;if(He=0,bi=null,ao(l,L,ft,vt),h&&So){z=0;break t}break;default:vt=He,He=0,bi=null,ao(l,L,ft,vt)}}Vg(),z=yn;break}catch(Mt){Ug(l,Mt)}while(!0);return r&&l.shellSuspendCounter++,$e=Ka=null,re=g,Gt.H=E,Gt.A=T,oe===null&&(Le=null,ce=0,Ca()),z}function Vg(){for(;oe!==null;)ud(oe)}function Gg(l,r){var h=re;re|=2;var g=im(),E=bu();Le!==l||ce!==r?(ip=null,Yu=Me()+500,rr(l,r)):So=U(l,r);t:do try{if(He!==0&&oe!==null){r=oe;var T=bi;e:switch(He){case 1:He=0,bi=null,ao(l,r,T,1);break;case 2:case 9:if(O0(T)){He=0,bi=null,lm(r);break}r=function(){He!==2&&He!==9||Le!==l||(He=7),ke(l)},T.then(r,r);break t;case 3:He=7;break t;case 4:He=5;break t;case 7:O0(T)?(He=0,bi=null,lm(r)):(He=0,bi=null,ao(l,r,T,7));break;case 5:var z=null;switch(oe.tag){case 26:z=oe.memoizedState;case 5:case 27:var L=oe,ft=L.type,vt=L.pendingProps;if(z?Hd(z):va(L.stateNode,ft,vt)){He=0,bi=null;var Mt=L.sibling;if(Mt!==null)oe=Mt;else{var xt=L.return;xt!==null?(oe=xt,Bs(xt)):oe=null}break e}}He=0,bi=null,ao(l,r,T,5);break;case 6:He=0,bi=null,ao(l,r,T,6);break;case 8:nf(),yn=6;break t;default:throw Error(u(462))}}sm();break}catch(Rt){Ug(l,Rt)}while(!0);return $e=Ka=null,Gt.H=g,Gt.A=E,re=h,oe!==null?0:(Le=null,ce=0,Ca(),yn)}function sm(){for(;oe!==null&&!p3();)ud(oe)}function ud(l){var r=Zh(l.alternate,l,Bl);l.memoizedProps=l.pendingProps,r===null?Bs(l):oe=r}function lm(l){var r=l,h=r.alternate;switch(r.tag){case 15:case 0:r=Z0(h,r,r.pendingProps,r.type,void 0,ce);break;case 11:r=Z0(h,r,r.pendingProps,r.type.render,r.ref,ce);break;case 5:Oc(r);default:Ih(h,r),r=oe=fm(r,Bl),r=Zh(h,r,Bl)}l.memoizedProps=l.pendingProps,r===null?Bs(l):oe=r}function ao(l,r,h,g){$e=Ka=null,Oc(r),ji=null,Df=0;var E=r.return;try{if(_a(l,E,r,h,ce)){yn=1,Pc(l,at(h,l.current)),oe=null;return}}catch(T){if(E!==null)throw oe=E,T;yn=1,Pc(l,at(h,l.current)),oe=null;return}r.flags&32768?(se||g===1?l=!0:So||(ce&536870912)!==0?l=!1:(yr=l=!0,(g===2||g===9||g===3||g===6)&&(g=Si.current,g!==null&&g.tag===13&&(g.flags|=16384))),af(r,l)):Bs(r)}function Bs(l){var r=l;do{if((r.flags&32768)!==0){af(r,yr);return}l=r.return;var h=eo(r.alternate,r,Bl);if(h!==null){oe=h;return}if(r=r.sibling,r!==null){oe=r;return}oe=r=l}while(r!==null);yn===0&&(yn=5)}function af(l,r){do{var h=ss(l.alternate,l);if(h!==null){h.flags&=32767,oe=h;return}if(h=l.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!r&&(l=l.sibling,l!==null)){oe=l;return}oe=l=h}while(l!==null);yn=6,oe=null}function rm(l,r,h,g,E,T,z,L,ft){l.cancelPendingCommit=null;do On();while(we!==0);if((re&6)!==0)throw Error(u(327));if(r!==null){if(r===l.current)throw Error(u(177));if(T=r.lanes|r.childLanes,T|=jm,st(l,h,T,z,L,ft),l===Le&&(oe=Le=null,ce=0),br=r,Vl=l,Js=h,sp=T,lp=E,Uy=g,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(l.callbackNode=null,l.callbackPriority=0,t3(zl,function(){return om(),null})):(l.callbackNode=null,l.callbackPriority=0),g=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||g){g=Gt.T,Gt.T=null,E=Ls(),Jn(2),z=re,re|=4;try{Ng(l,r,h)}finally{re=z,Jn(E),Gt.T=g}}we=1,cd(),fd(),hd()}}function cd(){if(we===1){we=0;var l=Vl,r=br,h=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||h){h=Gt.T,Gt.T=null;var g=Ls();Jn(2);var E=re;re|=4;try{Wc(r,l),df(l.containerInfo)}finally{re=E,Jn(g),Gt.T=h}}l.current=r,we=2}}function fd(){if(we===2){we=0;var l=Vl,r=br,h=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||h){h=Gt.T,Gt.T=null;var g=Ls();Jn(2);var E=re;re|=4;try{$0(l,r.alternate,r)}finally{re=E,Jn(g),Gt.T=h}}we=3}}function hd(){if(we===4||we===3){we=0,si();var l=Vl,r=br,h=Js,g=Uy;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?we=5:(we=0,br=Vl=null,jg(l,l.pendingLanes));var E=l.pendingLanes;if(E===0&&(Sr=null),lt(h),r=r.stateNode,Rn&&typeof Rn.onCommitFiberRoot=="function")try{Rn.onCommitFiberRoot(po,r,void 0,(r.current.flags&128)===128)}catch{}if(g!==null){r=Gt.T,E=Ls(),Jn(2),Gt.T=null;try{for(var T=l.onRecoverableError,z=0;z<g.length;z++){var L=g[z];T(L.value,{componentStack:L.stack})}}finally{Gt.T=r,Jn(E)}}(Js&3)!==0&&On(),ke(l),E=l.pendingLanes,(h&261930)!==0&&(E&42)!==0?l===rp?qu++:(qu=0,rp=l):qu=0,ya&&Ey(),mn(0)}}function jg(l,r){(l.pooledCacheLanes&=r)===0&&(r=l.pooledCache,r!=null&&(l.pooledCache=null,jn(r)))}function On(){return cd(),fd(),hd(),om()}function om(){if(we!==5)return!1;var l=Vl,r=sp;sp=0;var h=lt(Js),g=32>h?32:h;h=Gt.T;var E=Ls();try{Jn(g),Gt.T=null,g=lp,lp=null;var T=Vl,z=Js;if(we=0,br=Vl=null,Js=0,(re&6)!==0)throw Error(u(331));var L=re;if(re|=4,sd(T.current),Hg(T,T.current,z,g),re=L,mn(0,!1),Rn&&typeof Rn.onPostCommitFiberRoot=="function")try{Rn.onPostCommitFiberRoot(po,T)}catch{}return!0}finally{Jn(E),Gt.T=h,jg(l,r)}}function um(l,r,h){r=at(h,r),r=du(l.stateNode,r,2),l=Ds(l,r,2),l!==null&&($(l,2),ke(l))}function be(l,r,h){if(l.tag===3)um(l,l,h);else for(;r!==null;){if(r.tag===3){um(r,l,h);break}else if(r.tag===1){var g=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(Sr===null||!Sr.has(g))){l=at(h,l),h=Yc(2),g=Ds(r,h,2),g!==null&&(Ph(h,g,r,l),$(g,2),ke(g));break}}r=r.return}}function dd(l,r,h){var g=l.pingCache;if(g===null){g=l.pingCache=new v3;var E=new Set;g.set(r,E)}else E=g.get(r),E===void 0&&(E=new Set,g.set(r,E));E.has(h)||(Ym=!0,E.add(h),l=sf.bind(null,l,r,h),r.then(l,l))}function sf(l,r,h){var g=l.pingCache;g!==null&&g.delete(r),l.pingedLanes|=l.suspendedLanes&h,l.warmLanes&=~h,Le===l&&(ce&h)===h&&(yn===4||yn===3&&(ce&62914560)===ce&&300>Me()-Rf?(re&2)===0&&rr(l,0):qm|=h,Pu===ce&&(Pu=0)),ke(l)}function cm(l,r){r===0&&(r=V()),l=$l(l,r),l!==null&&($(l,r),ke(l))}function pd(l){var r=l.memoizedState,h=0;r!==null&&(h=r.retryLane),cm(l,h)}function Lg(l,r){var h=0;switch(l.tag){case 31:case 13:var g=l.stateNode,E=l.memoizedState;E!==null&&(h=E.retryLane);break;case 19:g=l.stateNode;break;case 22:g=l.stateNode._retryCache;break;default:throw Error(u(314))}g!==null&&g.delete(r),cm(l,h)}function t3(l,r){return Vd(l,r)}function md(l,r,h,g){this.tag=l,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function lf(l){return l=l.prototype,!(!l||!l.isReactComponent)}function Vs(l,r){var h=l.alternate;return h===null?(h=i(l.tag,r,l.key,l.mode),h.elementType=l.elementType,h.type=l.type,h.stateNode=l.stateNode,h.alternate=l,l.alternate=h):(h.pendingProps=r,h.type=l.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=l.flags&65011712,h.childLanes=l.childLanes,h.lanes=l.lanes,h.child=l.child,h.memoizedProps=l.memoizedProps,h.memoizedState=l.memoizedState,h.updateQueue=l.updateQueue,r=l.dependencies,h.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},h.sibling=l.sibling,h.index=l.index,h.ref=l.ref,h.refCleanup=l.refCleanup,h}function fm(l,r){l.flags&=65011714;var h=l.alternate;return h===null?(l.childLanes=0,l.lanes=r,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=h.childLanes,l.lanes=h.lanes,l.child=h.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=h.memoizedProps,l.memoizedState=h.memoizedState,l.updateQueue=h.updateQueue,l.type=h.type,r=h.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),l}function rf(l,r,h,g,E,T){var z=0;if(g=l,typeof l=="function")lf(l)&&(z=1);else if(typeof l=="string")z=wi&&Ln?zm(l,h,ba.current)?26:Bd(l)?27:5:wi?zm(l,h,ba.current)?26:5:Ln&&Bd(l)?27:5;else t:switch(l){case Td:return l=i(31,h,r,E),l.elementType=Td,l.lanes=T,l;case io:return Dl(h.children,E,T,r);case mm:z=8,E|=24;break;case ff:return l=i(12,h,r,E|2),l.elementType=ff,l.lanes=T,l;case so:return l=i(13,h,r,E),l.elementType=so,l.lanes=T,l;case ze:return l=i(19,h,r,E),l.elementType=ze,l.lanes=T,l;default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case Al:z=10;break t;case Ed:z=9;break t;case Cu:z=11;break t;case gm:z=14;break t;case ur:z=16,g=null;break t}z=29,h=Error(u(130,l===null?"null":typeof l,"")),g=null}return r=i(z,h,r,E),r.elementType=l,r.type=g,r.lanes=T,r}function Dl(l,r,h,g){return l=i(7,l,g,r),l.lanes=h,l}function of(l,r,h){return l=i(6,l,null,r),l.lanes=h,l}function gd(l){var r=i(18,null,null,0);return r.stateNode=l,r}function yd(l,r,h){return r=i(4,l.children!==null?l.children:[],l.key,r),r.lanes=h,r.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},r}function hm(l,r,h,g,E,T,z,L,ft){this.tag=1,this.containerInfo=l,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Ml,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=F(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=F(0),this.hiddenUpdates=F(null),this.identifierPrefix=g,this.onUncaughtError=E,this.onCaughtError=T,this.onRecoverableError=z,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ft,this.incompleteTransitions=new Map}function uf(l,r,h,g,E,T,z,L,ft,vt,Mt,xt){return l=new hm(l,r,h,z,ft,vt,Mt,xt,L),r=1,T===!0&&(r|=24),T=i(3,null,null,r),l.current=T,T.stateNode=l,r=Ae(),r.refCount++,l.pooledCache=r,r.refCount++,T.memoizedState={element:g,isDehydrated:h,cache:r},Dc(T),l}function vd(l){return l?(l=ho,l):ho}function dm(l){var r=l._reactInternals;if(r===void 0)throw typeof l.render=="function"?Error(u(188)):(l=Object.keys(l).join(","),Error(u(268,l)));return l=p(r),l=l!==null?m(l):null,l===null?null:hf(l.stateNode)}function Sd(l,r,h,g,E,T){E=vd(E),g.context===null?g.context=E:g.pendingContext=E,g=mi(r),g.payload={element:h},T=T===void 0?null:T,T!==null&&(g.callback=T),h=Ds(l,g,r),h!==null&&(Pa(h,l,r),Ac(h,l,r))}function pm(l,r){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var h=l.retryLane;l.retryLane=h!==0&&h<r?h:r}}function os(l,r){pm(l,r),(l=l.alternate)&&pm(l,r)}var ne={},e3=H,Ya=J2(),yi=Object.assign,bd=Symbol.for("react.element"),cf=Symbol.for("react.transitional.element"),or=Symbol.for("react.portal"),io=Symbol.for("react.fragment"),mm=Symbol.for("react.strict_mode"),ff=Symbol.for("react.profiler"),Ed=Symbol.for("react.consumer"),Al=Symbol.for("react.context"),Cu=Symbol.for("react.forward_ref"),so=Symbol.for("react.suspense"),ze=Symbol.for("react.suspense_list"),gm=Symbol.for("react.memo"),ur=Symbol.for("react.lazy"),Td=Symbol.for("react.activity"),Gs=Symbol.for("react.memo_cache_sentinel"),ym=Symbol.iterator,vm=Symbol.for("react.client.reference"),cr=Array.isArray,Gt=e3.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Pg=t.rendererVersion,Sm=t.rendererPackageName,bm=t.extraDevToolsConfig,hf=t.getPublicInstance,n3=t.getRootHostContext,Yg=t.getChildHostContext,a3=t.prepareForCommit,df=t.resetAfterCommit,js=t.createInstance;t.cloneMutableInstance;var Cd=t.appendInitialChild,qg=t.finalizeInitialChildren,pf=t.shouldSetTextContent,_d=t.createTextInstance;t.cloneMutableTextInstance;var Xg=t.scheduleTimeout,Em=t.cancelTimeout,Ml=t.noTimeout,Hi=t.isPrimaryRenderer;t.warnsIfNotActing;var Aa=t.supportsMutation,us=t.supportsPersistence,ya=t.supportsHydration,Kg=t.getInstanceFromNode;t.beforeActiveInstanceBlur;var i3=t.preparePortalMount;t.prepareScopeUpdate,t.getInstanceFromScope;var Jn=t.setCurrentUpdatePriority,Ls=t.getCurrentUpdatePriority,cs=t.resolveUpdatePriority;t.trackSchedulerEvent,t.resolveEventType,t.resolveEventTimeStamp;var Tm=t.shouldAttemptEagerTransition,Qg=t.detachDeletedInstance;t.requestPostPaintCallback;var Zg=t.maySuspendCommit,s3=t.maySuspendCommitOnUpdate,_u=t.maySuspendCommitInSyncRender,va=t.preloadInstance,Jg=t.startSuspendingCommit,Ma=t.suspendInstance;t.suspendOnActiveViewTransition;var Fg=t.waitForCommitToBeReady;t.getSuspendedCommitReason;var qa=t.NotPendingTransition,fr=t.HostTransitionContext,lo=t.resetFormInstance;t.bindToConsole;var kg=t.supportsMicrotasks,Ps=t.scheduleMicrotask,ro=t.supportsTestSelectors,Cm=t.findFiberRoot,fs=t.getBoundingRect,Ig=t.getTextContent,Ys=t.isHiddenSubtree,Wg=t.matchAccessibilityRole,mf=t.setFocusIfFocusable,oo=t.setupIntersectionObserver,$g=t.appendChild,ty=t.appendChildToContainer,gf=t.commitTextUpdate,ey=t.commitMount,xd=t.commitUpdate,ny=t.insertBefore,ay=t.insertInContainerBefore,_m=t.removeChild,xm=t.removeChildFromContainer,Dd=t.resetTextContent,iy=t.hideInstance,Ad=t.hideTextInstance,l3=t.unhideInstance,sy=t.unhideTextInstance;t.cancelViewTransitionName,t.cancelRootViewTransitionName,t.restoreRootViewTransitionName,t.cloneRootViewTransitionContainer,t.removeRootViewTransitionClone,t.measureClonedInstance,t.hasInstanceChanged,t.hasInstanceAffectedParent,t.startViewTransition,t.startGestureTransition,t.stopViewTransition,t.getCurrentGestureOffset,t.createViewTransitionInstance;var vi=t.clearContainer;t.createFragmentInstance,t.updateFragmentInstanceFiber,t.commitNewChildToFragmentInstance,t.deleteChildFromFragmentInstance;var ly=t.cloneInstance,Ie=t.createContainerChildSet,Dm=t.appendChildToContainerChildSet,ry=t.finalizeContainerChildren,oy=t.replaceContainerChildren,Nl=t.cloneHiddenInstance,yf=t.cloneHiddenTextInstance,vf=t.isSuspenseInstancePending,Sf=t.isSuspenseInstanceFallback,uo=t.getSuspenseInstanceFallbackErrorDetails,xu=t.registerSuspenseInstanceRetry,uy=t.canHydrateFormStateMarker,cy=t.isFormStateMarkerMatching,Am=t.getNextHydratableSibling,fy=t.getNextHydratableSiblingAfterSingleton,Md=t.getFirstHydratableChild,Nd=t.getFirstHydratableChildWithinContainer,Mm=t.getFirstHydratableChildWithinActivityInstance,hy=t.getFirstHydratableChildWithinSuspenseInstance,r3=t.getFirstHydratableChildWithinSingleton,o3=t.canHydrateInstance,dy=t.canHydrateTextInstance,py=t.canHydrateActivityInstance,u3=t.canHydrateSuspenseInstance,Du=t.hydrateInstance,Od=t.hydrateTextInstance,my=t.hydrateActivityInstance,Nm=t.hydrateSuspenseInstance,gy=t.getNextHydratableInstanceAfterActivityInstance,yy=t.getNextHydratableInstanceAfterSuspenseInstance,vy=t.commitHydratedInstance,c3=t.commitHydratedContainer,Sy=t.commitHydratedActivityInstance,Au=t.commitHydratedSuspenseInstance,by=t.finalizeHydratedChildren,Ey=t.flushHydrationEvents;t.clearActivityBoundary;var Ee=t.clearSuspenseBoundary;t.clearActivityBoundaryFromContainer;var Om=t.clearSuspenseBoundaryFromContainer,f3=t.hideDehydratedBoundary,Ty=t.unhideDehydratedBoundary,Cy=t.shouldDeleteUnhydratedTailInstances;t.diffHydratedPropsForDevWarnings,t.diffHydratedTextForDevWarnings,t.describeHydratableInstanceForDevWarnings;var h3=t.validateHydratableInstance,Rm=t.validateHydratableTextInstance,wi=t.supportsResources,zm=t.isHostHoistableType,Rd=t.getHoistableRoot,Mu=t.getResource,_y=t.acquireResource,xy=t.releaseResource,co=t.hydrateHoistable,zd=t.mountHoistable,Hm=t.unmountHoistable,Dy=t.createHoistableInstance,Ay=t.prepareToCommitHoistables,d3=t.mayResourceSuspendCommit,Hd=t.preloadResource,Ol=t.suspendResource,Ln=t.supportsSingletons,wd=t.resolveSingletonInstance,Ud=t.acquireSingletonInstance,hr=t.releaseSingletonInstance,Bd=t.isHostSingletonType,fo=t.isSingletonScope,bf=[],Nu=-1,ho={},ii=Math.clz32?Math.clz32:N,My=Math.log,Ny=Math.LN2,Ef=256,Tf=262144,Ou=4194304,Vd=Ya.unstable_scheduleCallback,ae=Ya.unstable_cancelCallback,p3=Ya.unstable_shouldYield,si=Ya.unstable_requestPaint,Me=Ya.unstable_now,Oy=Ya.unstable_ImmediatePriority,Rl=Ya.unstable_UserBlockingPriority,zl=Ya.unstable_NormalPriority,Ru=Ya.unstable_IdlePriority,Gd=Ya.log,wm=Ya.unstable_setDisableYieldValue,po=null,Rn=null,Sa=typeof Object.is=="function"?Object.is:pt,jd=typeof reportError=="function"?reportError:function(l){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof l=="object"&&l!==null&&typeof l.message=="string"?String(l.message):String(l),error:l});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",l);return}console.error(l)},Um=Object.prototype.hasOwnProperty,zu,li,Cf=!1,Ry=new WeakMap,mo=[],Hu=0,Pn=null,rt=0,Ui=[],Bi=0,Hl=null,Xa=1,qs="",ba=x(null),_f=x(null),dr=x(null),Ld=x(null),Fn=null,We=null,se=!1,wl=null,Vi=!1,Bm=Error(u(519)),Xs=x(null),Ka=null,$e=null,Ks=typeof AbortController<"u"?AbortController:function(){var l=[],r=this.signal={aborted:!1,addEventListener:function(h,g){l.push(g)}};this.abort=function(){r.aborted=!0,l.forEach(function(h){return h()})}},Na=Ya.unstable_scheduleCallback,m3=Ya.unstable_NormalPriority,cn={$$typeof:Al,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},zn=null,ri=null,Vm=!1,wu=!1,go=!1,hs=0,xf=null,Gm=0,Uu=0,Bu=null,Pd=Gt.S;Gt.S=function(l,r){Xm=Me(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&au(l,r),Pd!==null&&Pd(l,r)};var pr=x(null),Vu=Error(u(460)),Yd=Error(u(474)),qd=Error(u(542)),Xd={then:function(){}},Gi=null,ji=null,Df=0,yo=R0(!0),zy=R0(!1),Li=[],ds=0,jm=0,mr=!1,Lm=!1,Qs=x(null),Kd=x(0),Si=x(null),Pi=null,Hn=x(0),Ul=0,kt=null,Ge=null,Yn=null,Qd=!1,Gu=!1,vo=!1,Zd=0,ju=0,Lu=null,g3=0,Af={readContext:on,use:Ve,useCallback:un,useContext:un,useEffect:un,useImperativeHandle:un,useLayoutEffect:un,useInsertionEffect:un,useMemo:un,useReducer:un,useRef:un,useState:un,useDebugValue:un,useDeferredValue:un,useTransition:un,useSyncExternalStore:un,useId:un,useHostTransitionStatus:un,useFormState:un,useActionState:un,useOptimistic:un,useMemoCache:un,useCacheRefresh:un};Af.useEffectEvent=un;var Hy={readContext:on,use:Ve,useCallback:function(l,r){return pa().memoizedState=[l,r===void 0?null:r],l},useContext:on,useEffect:B0,useImperativeHandle:function(l,r,h){h=h!=null?h.concat([l]):null,Bc(4194308,4,Ag.bind(null,r,l),h)},useLayoutEffect:function(l,r){return Bc(4194308,4,l,r)},useInsertionEffect:function(l,r){Bc(4,2,l,r)},useMemo:function(l,r){var h=pa();r=r===void 0?null:r;var g=l();if(vo){dt(!0);try{l()}finally{dt(!1)}}return h.memoizedState=[g,r],g},useReducer:function(l,r,h){var g=pa();if(h!==void 0){var E=h(r);if(vo){dt(!0);try{h(r)}finally{dt(!1)}}}else E=r;return g.memoizedState=g.baseState=E,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:E},g.queue=l,l=l.dispatch=ma.bind(null,kt,l),[g.memoizedState,l]},useRef:function(l){var r=pa();return l={current:l},r.memoizedState=l},useState:function(l){l=Ga(l);var r=l.queue,h=jh.bind(null,kt,r);return r.dispatch=h,[l.memoizedState,h]},useDebugValue:j0,useDeferredValue:function(l,r){var h=pa();return Vh(h,l,r)},useTransition:function(){var l=Ga(!1);return l=L0.bind(null,kt,l.queue,!0,!1),pa().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,r,h){var g=kt,E=pa();if(se){if(h===void 0)throw Error(u(407));h=h()}else{if(h=r(),Le===null)throw Error(u(349));(ce&127)!==0||xg(g,r,h)}E.memoizedState=h;var T={value:h,getSnapshot:r};return E.queue=T,B0(Rc.bind(null,g,T,l),[l]),g.flags|=2048,ja(9,{destroy:void 0},Os.bind(null,g,T,h,r),null),h},useId:function(){var l=pa(),r=Le.identifierPrefix;if(se){var h=qs,g=Xa;h=(g&~(1<<32-ii(g)-1)).toString(32)+h,r="_"+r+"R_"+h,h=Zd++,0<h&&(r+="H"+h.toString(32)),r+="_"}else h=g3++,r="_"+r+"r_"+h.toString(32)+"_";return l.memoizedState=r},useHostTransitionStatus:Gh,useFormState:ns,useActionState:ns,useOptimistic:function(l){var r=pa();r.memoizedState=r.baseState=l;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=h,r=hu.bind(null,kt,!0,h),h.dispatch=r,[l,r]},useMemoCache:ou,useCacheRefresh:function(){return pa().memoizedState=Mg.bind(null,kt)},useEffectEvent:function(l){var r=pa(),h={impl:l};return r.memoizedState=h,function(){if((re&2)!==0)throw Error(u(440));return h.impl.apply(void 0,arguments)}}},Pm={readContext:on,use:Ve,useCallback:Bh,useContext:on,useEffect:Hh,useImperativeHandle:G0,useInsertionEffect:V0,useLayoutEffect:Uh,useMemo:Vc,useReducer:uu,useRef:Wr,useState:function(){return uu(Ns)},useDebugValue:j0,useDeferredValue:function(l,r){var h=Ye();return Gc(h,Ge.memoizedState,l,r)},useTransition:function(){var l=uu(Ns)[0],r=Ye().memoizedState;return[typeof l=="boolean"?l:Ii(l),r]},useSyncExternalStore:Wi,useId:bl,useHostTransitionStatus:Gh,useFormState:U0,useActionState:U0,useOptimistic:function(l,r){var h=Ye();return ti(h,Ge,l,r)},useMemoCache:ou,useCacheRefresh:Y0};Pm.useEffectEvent=wh;var wy={readContext:on,use:Ve,useCallback:Bh,useContext:on,useEffect:Hh,useImperativeHandle:G0,useInsertionEffect:V0,useLayoutEffect:Uh,useMemo:Vc,useReducer:Ir,useRef:Wr,useState:function(){return Ir(Ns)},useDebugValue:j0,useDeferredValue:function(l,r){var h=Ye();return Ge===null?Vh(h,l,r):Gc(h,Ge.memoizedState,l,r)},useTransition:function(){var l=Ir(Ns)[0],r=Ye().memoizedState;return[typeof l=="boolean"?l:Ii(l),r]},useSyncExternalStore:Wi,useId:bl,useHostTransitionStatus:Gh,useFormState:Uc,useActionState:Uc,useOptimistic:function(l,r){var h=Ye();return Ge!==null?ti(h,Ge,l,r):(h.baseState=l,[l,h.queue.dispatch])},useMemoCache:ou,useCacheRefresh:Y0};wy.useEffectEvent=wh;var Jd={enqueueSetState:function(l,r,h){l=l._reactInternals;var g=ai(),E=mi(g);E.payload=r,h!=null&&(E.callback=h),r=Ds(l,E,g),r!==null&&(Pa(r,l,g),Ac(r,l,g))},enqueueReplaceState:function(l,r,h){l=l._reactInternals;var g=ai(),E=mi(g);E.tag=1,E.payload=r,h!=null&&(E.callback=h),r=Ds(l,E,g),r!==null&&(Pa(r,l,g),Ac(r,l,g))},enqueueForceUpdate:function(l,r){l=l._reactInternals;var h=ai(),g=mi(h);g.tag=2,r!=null&&(g.callback=r),r=Ds(l,g,h),r!==null&&(Pa(r,l,h),Ac(r,l,h))}},Fd=Error(u(461)),qn=!1,kd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},Zs=!1,wn=!1,Mf=!1,Id=typeof WeakSet=="function"?WeakSet:Set,aa=null,Xn=null,oi=!1,ps=null,gr=8192,y3={getCacheForType:function(l){var r=on(cn),h=r.data.get(l);return h===void 0&&(h=l(),r.data.set(l,h)),h},cacheSignal:function(){return on(cn).controller.signal}},Wd=0,$d=1,tp=2,ep=3,np=4;if(typeof Symbol=="function"&&Symbol.for){var Nf=Symbol.for;Wd=Nf("selector.component"),$d=Nf("selector.has_pseudo_class"),tp=Nf("selector.role"),ep=Nf("selector.test_id"),np=Nf("selector.text")}var v3=typeof WeakMap=="function"?WeakMap:Map,re=0,Le=null,oe=null,ce=0,He=0,bi=null,yr=!1,So=!1,Ym=!1,Bl=0,yn=0,vr=0,bo=0,qm=0,Ei=0,Pu=0,Of=null,ui=null,ap=!1,Rf=0,Xm=0,Yu=1/0,ip=null,Sr=null,we=0,Vl=null,br=null,Js=0,sp=0,lp=null,Uy=null,qu=0,rp=null;return ne.attemptContinuousHydration=function(l){if(l.tag===13||l.tag===31){var r=$l(l,67108864);r!==null&&Pa(r,l,67108864),os(l,67108864)}},ne.attemptHydrationAtCurrentPriority=function(l){if(l.tag===13||l.tag===31){var r=ai();r=bt(r);var h=$l(l,r);h!==null&&Pa(h,l,r),os(l,r)}},ne.attemptSynchronousHydration=function(l){switch(l.tag){case 3:if(l=l.stateNode,l.current.memoizedState.isDehydrated){var r=R(l.pendingLanes);if(r!==0){for(l.pendingLanes|=2,l.entangledLanes|=2;r;){var h=1<<31-ii(r);l.entanglements[1]|=h,r&=~h}ke(l),(re&6)===0&&(Yu=Me()+500,mn(0))}}break;case 31:case 13:r=$l(l,2),r!==null&&Pa(r,l,2),lr(),os(l,2)}},ne.batchedUpdates=function(l,r){return l(r)},ne.createComponentSelector=function(l){return{$$typeof:Wd,value:l}},ne.createContainer=function(l,r,h,g,E,T,z,L,ft,vt){return uf(l,r,!1,null,h,g,T,null,z,L,ft,vt)},ne.createHasPseudoClassSelector=function(l){return{$$typeof:$d,value:l}},ne.createHydrationContainer=function(l,r,h,g,E,T,z,L,ft,vt,Mt,xt,Rt,Yt){return l=uf(h,g,!0,l,E,T,L,Yt,ft,vt,Mt,xt),l.context=vd(null),h=l.current,g=ai(),g=bt(g),E=mi(g),E.callback=r??null,Ds(h,E,g),r=g,l.current.lanes=r,$(l,r),ke(l),l},ne.createPortal=function(l,r,h){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:or,key:g==null?null:""+g,children:l,containerInfo:r,implementation:h}},ne.createRoleSelector=function(l){return{$$typeof:tp,value:l}},ne.createTestNameSelector=function(l){return{$$typeof:ep,value:l}},ne.createTextSelector=function(l){return{$$typeof:np,value:l}},ne.defaultOnCaughtError=function(l){console.error(l)},ne.defaultOnRecoverableError=function(l){jd(l)},ne.defaultOnUncaughtError=function(l){jd(l)},ne.deferredUpdates=function(l){var r=Gt.T,h=Ls();try{return Jn(32),Gt.T=null,l()}finally{Jn(h),Gt.T=r}},ne.discreteUpdates=function(l,r,h,g,E){var T=Gt.T,z=Ls();try{return Jn(2),Gt.T=null,l(r,h,g,E)}finally{Jn(z),Gt.T=T,re===0&&(Yu=Me()+500)}},ne.findAllNodes=tf,ne.findBoundingRects=function(l,r){if(!ro)throw Error(u(363));r=tf(l,r),l=[];for(var h=0;h<r.length;h++)l.push(fs(r[h]));for(r=l.length-1;0<r;r--){h=l[r];for(var g=h.x,E=g+h.width,T=h.y,z=T+h.height,L=r-1;0<=L;L--)if(r!==L){var ft=l[L],vt=ft.x,Mt=vt+ft.width,xt=ft.y,Rt=xt+ft.height;if(g>=vt&&T>=xt&&E<=Mt&&z<=Rt){l.splice(r,1);break}else if(g!==vt||h.width!==ft.width||Rt<T||xt>z){if(!(T!==xt||h.height!==ft.height||Mt<g||vt>E)){vt>g&&(ft.width+=vt-g,ft.x=g),Mt<E&&(ft.width=E-vt),l.splice(r,1);break}}else{xt>T&&(ft.height+=xt-T,ft.y=T),Rt<z&&(ft.height=z-xt),l.splice(r,1);break}}}return l},ne.findHostInstance=dm,ne.findHostInstanceWithNoPortals=function(l){return l=p(l),l=l!==null?S(l):null,l===null?null:hf(l.stateNode)},ne.findHostInstanceWithWarning=function(l){return dm(l)},ne.flushPassiveEffects=On,ne.flushSyncFromReconciler=function(l){var r=re;re|=1;var h=Gt.T,g=Ls();try{if(Jn(2),Gt.T=null,l)return l()}finally{Jn(g),Gt.T=h,re=r,(re&6)===0&&mn(0)}},ne.flushSyncWork=lr,ne.focusWithin=function(l,r){if(!ro)throw Error(u(363));for(l=Su(l),r=nm(l,r),r=Array.from(r),l=0;l<r.length;){var h=r[l++],g=h.tag;if(!Ys(h)){if((g===5||g===26||g===27)&&mf(h.stateNode))return!0;for(h=h.child;h!==null;)r.push(h),h=h.sibling}}return!1},ne.getFindAllNodesFailureDescription=function(l,r){if(!ro)throw Error(u(363));var h=0,g=[];l=[Su(l),0];for(var E=0;E<l.length;){var T=l[E++],z=T.tag,L=l[E++],ft=r[L];if((z!==5&&z!==26&&z!==27||!Ys(T))&&($c(T,ft)&&(g.push(rd(ft)),L++,L>h&&(h=L)),L<r.length))for(T=T.child;T!==null;)l.push(T,L),T=T.sibling}if(h<r.length){for(l=[];h<r.length;h++)l.push(rd(r[h]));return`findAllNodes was able to match part of the selector:
|
|
22
|
+
`+g.stack}}function pt(l,r){if(typeof l=="object"&&l!==null){var h=Ry.get(l);return h!==void 0?h:(r={value:l,source:r,stack:K(r)},Ry.set(l,r),r)}return{value:l,source:r,stack:K(r)}}function dt(l,r){So[wu++]=st,So[wu++]=Pn,Pn=l,st=r}function $(l,r,h){Gi[ji++]=Xa,Gi[ji++]=Zs,Gi[ji++]=Gl,Gl=l;var g=Xa;l=Zs;var E=32-ii(g)-1;g&=~(1<<E),h+=1;var T=32-ii(r)+E;if(30<T){var z=E-E%5;T=(g&(1<<z)-1).toString(32),g>>=z,E-=z,Xa=1<<32-ii(r)+E|h<<E|g,Zs=T+l}else Xa=1<<T|h<<E|g,Zs=l}function Et(l){l.return!==null&&(dt(l,1),$(l,1,0))}function Rt(l){for(;l===Pn;)Pn=So[--wu],So[wu]=null,st=So[--wu],So[wu]=null;for(;l===Gl;)Gl=Gi[--ji],Gi[ji]=null,Zs=Gi[--ji],Gi[ji]=null,Xa=Gi[--ji],Gi[ji]=null}function qt(l,r){Gi[ji++]=Xa,Gi[ji++]=Zs,Gi[ji++]=Gl,Xa=r.id,Zs=r.overflow,Gl=l}function Bt(l,r){A(Sr,r),A(Mf,l),A(ba,null),l=n3(r),D(ba),A(ba,l)}function Vt(){D(ba),D(Mf),D(Sr)}function se(l){l.memoizedState!==null&&A(qd,l);var r=ba.current,h=Yg(r,l.type);r!==h&&(A(Mf,l),A(ba,h))}function Ke(l){Mf.current===l&&(D(ba),D(Mf)),qd.current===l&&(D(qd),Bi?yr._currentValue=qa:yr._currentValue2=qa)}function yn(l){var r=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw $e(pt(r,l)),Gm}function Oe(l,r){if(!ya)throw Error(u(175));Au(l.stateNode,l.type,l.memoizedProps,r,l)||yn(l,!0)}function It(l){for(kn=l.return;kn;)switch(kn.tag){case 5:case 31:case 13:Li=!1;return;case 27:case 3:Li=!0;return;default:kn=kn.return}}function Jn(l){if(!ya||l!==kn)return!1;if(!ue)return It(l),ue=!0,!1;var r=l.tag;if(Ln?r!==3&&r!==27&&(r!==5||Cy(l.type)&&!vf(l.type,l.memoizedProps))&&nn&&yn(l):r!==3&&(r!==5||Cy(l.type)&&!vf(l.type,l.memoizedProps))&&nn&&yn(l),It(l),r===13){if(!ya)throw Error(u(316));if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(u(317));nn=yy(l)}else if(r===31){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(u(317));nn=gy(l)}else nn=Ln&&r===27?fy(l.type,nn):kn?Nm(l.stateNode):null;return!0}function Gt(){ya&&(nn=kn=null,ue=!1)}function xe(){var l=jl;return l!==null&&(ui===null?ui=l:ui.push.apply(ui,l),jl=null),l}function $e(l){jl===null?jl=[l]:jl.push(l)}function da(l,r,h){Bi?(A(Js,r._currentValue),r._currentValue=h):(A(Js,r._currentValue2),r._currentValue2=h)}function cn(l){var r=Js.current;Bi?l._currentValue=r:l._currentValue2=r,D(Js)}function ea(l,r,h){for(;l!==null;){var g=l.alternate;if((l.childLanes&r)!==r?(l.childLanes|=r,g!==null&&(g.childLanes|=r)):g!==null&&(g.childLanes&r)!==r&&(g.childLanes|=r),l===h)break;l=l.return}}function Ms(l,r,h,g){var E=l.child;for(E!==null&&(E.return=l);E!==null;){var T=E.dependencies;if(T!==null){var z=E.child;T=T.firstContext;t:for(;T!==null;){var L=T;T=E;for(var ut=0;ut<r.length;ut++)if(L.context===r[ut]){T.lanes|=h,L=T.alternate,L!==null&&(L.lanes|=h),ea(T.return,h,l),g||(z=null);break t}T=L.next}}else if(E.tag===18){if(z=E.return,z===null)throw Error(u(341));z.lanes|=h,T=z.alternate,T!==null&&(T.lanes|=h),ea(z,h,l),z=null}else z=E.child;if(z!==null)z.return=E;else for(z=E;z!==null;){if(z===l){z=null;break}if(E=z.sibling,E!==null){E.return=z.return,z=E;break}z=z.return}E=z}}function di(l,r,h,g){l=null;for(var E=r,T=!1;E!==null;){if(!T){if((E.flags&524288)!==0)T=!0;else if((E.flags&262144)!==0)break}if(E.tag===10){var z=E.alternate;if(z===null)throw Error(u(387));if(z=z.memoizedProps,z!==null){var L=E.type;Sa(E.pendingProps.value,z.value)||(l!==null?l.push(L):l=[L])}}else if(E===qd.current){if(z=E.alternate,z===null)throw Error(u(387));z.memoizedState.memoizedState!==E.memoizedState.memoizedState&&(l!==null?l.push(yr):l=[yr])}E=E.return}l!==null&&Ms(r,l,h,g),r.flags|=262144}function Ii(l){for(l=l.firstContext;l!==null;){var r=l.context;if(!Sa(Bi?r._currentValue:r._currentValue2,l.memoizedValue))return!0;l=l.next}return!1}function jn(l){Ka=l,an=null,l=l.dependencies,l!==null&&(l.firstContext=null)}function Mn(l){return Ht(Ka,l)}function Oi(l,r){return Ka===null&&jn(l),Ht(l,r)}function Ht(l,r){var h=Bi?r._currentValue:r._currentValue2;if(r={context:r,memoizedValue:h,next:null},an===null){if(l===null)throw Error(u(308));an=r,l.dependencies={lanes:0,firstContext:r},l.flags|=524288}else an=an.next=r;return h}function De(){return{controller:new Fs,data:new Map,refCount:0}}function na(l){l.refCount--,l.refCount===0&&Oa(m3,function(){l.controller.abort()})}function pi(){}function tn(l){l!==ri&&l.next===null&&(ri===null?Hn=ri=l:ri=ri.next=l),Uu=!0,jm||(jm=!0,z0())}function Nn(l,r){if(!bo&&Uu){bo=!0;do for(var h=!1,g=Hn;g!==null;){if(l!==0){var E=g.pendingLanes;if(E===0)var T=0;else{var z=g.suspendedLanes,L=g.pingedLanes;T=(1<<31-ii(42|l)+1)-1,T&=E&~(z&~L),T=T&201326741?T&201326741|1:T?T|2:0}T!==0&&(h=!0,Dc(g,T))}else T=de,T=R(g,g===qe?T:0,g.cancelPendingCommit!==null||g.timeoutHandle!==Hl),(T&3)===0||U(g,T)||(h=!0,Dc(g,T));g=g.next}while(h);bo=!1}}function ml(){nr()}function nr(){Uu=jm=!1;var l=0;ps!==0&&_m()&&(l=ps);for(var r=Re(),h=null,g=Hn;g!==null;){var E=g.next,T=Ns(g,r);T===0?(g.next=null,h===null?Hn=E:h.next=E,E===null&&(ri=h)):(h=g,(l!==0||(T&3)!==0)&&(Uu=!0)),g=E}Ve!==0&&Ve!==5||Nn(l),ps!==0&&(ps=0)}function Ns(l,r){for(var h=l.suspendedLanes,g=l.pingedLanes,E=l.expirationTimes,T=l.pendingLanes&-62914561;0<T;){var z=31-ii(T),L=1<<z,ut=E[z];ut===-1?((L&h)===0||(L&g)!==0)&&(E[z]=j(L,r)):ut<=r&&(l.expiredLanes|=L),T&=~L}if(r=qe,h=de,h=R(l,l===r?h:0,l.cancelPendingCommit!==null||l.timeoutHandle!==Hl),g=l.callbackNode,h===0||l===r&&(Be===2||Be===9)||l.cancelPendingCommit!==null)return g!==null&&g!==null&&re(g),l.callbackNode=null,l.callbackPriority=0;if((h&3)===0||U(l,h)){if(r=h&-h,r===l.callbackPriority)return r;switch(g!==null&&re(g),nt(h)){case 2:case 8:h=Bl;break;case 32:h=Vl;break;case 268435456:h=zu;break;default:h=Vl}return g=Ca.bind(null,l),h=Ld(h,g),l.callbackPriority=r,l.callbackNode=h,r}return g!==null&&g!==null&&re(g),l.callbackPriority=2,l.callbackNode=null,2}function Ca(l,r){if(Ve!==0&&Ve!==5)return l.callbackNode=null,l.callbackPriority=0,null;var h=l.callbackNode;if(Rn()&&l.callbackNode!==h)return null;var g=de;return g=R(l,l===qe?g:0,l.cancelPendingCommit!==null||l.timeoutHandle!==Hl),g===0?null:(sm(l,g,r),Ns(l,Re()),l.callbackNode!=null&&l.callbackNode===h?Ca.bind(null,l):null)}function Dc(l,r){if(Rn())return null;sm(l,r,!0)}function z0(){kg?Ks(function(){(fe&6)!==0?Ld(Oy,ml):nr()}):Ld(Oy,ml)}function Zr(){if(ps===0){var l=Bu;l===0&&(l=xf,xf<<=1,(xf&261888)===0&&(xf=256)),ps=l}return ps}function Ac(l,r){if(Nf===null){var h=Nf=[];Lm=0,Bu=Zr(),Vu={status:"pending",value:void 0,then:function(g){h.push(g)}}}return Lm++,r.then(Va,Va),r}function Va(){if(--Lm===0&&Nf!==null){Vu!==null&&(Vu.status="fulfilled");var l=Nf;Nf=null,Bu=0,Vu=null;for(var r=0;r<l.length;r++)(0,l[r])()}}function Ri(l,r){var h=[],g={status:"pending",value:null,reason:null,then:function(E){h.push(E)}};return l.then(function(){g.status="fulfilled",g.value=r;for(var E=0;E<h.length;E++)(0,h[E])(r)},function(E){for(g.status="rejected",g.reason=E,E=0;E<h.length;E++)(0,h[E])(void 0)}),g}function ar(){var l=br.current;return l!==null?l:qe.pooledCache}function Ut(l,r){r===null?A(br,br.current):A(br,r.pool)}function ce(){var l=ar();return l===null?null:{parent:Bi?hn._currentValue:hn._currentValue2,pool:l}}function ir(l,r){if(Sa(l,r))return!0;if(typeof l!="object"||l===null||typeof r!="object"||r===null)return!1;var h=Object.keys(l),g=Object.keys(r);if(h.length!==g.length)return!1;for(g=0;g<h.length;g++){var E=h[g];if(!Vm.call(r,E)||!Sa(l[E],r[E]))return!1}return!0}function Mc(l){return l=l.status,l==="fulfilled"||l==="rejected"}function gl(l,r,h){switch(h=l[h],h===void 0?l.push(r):h!==r&&(r.then(pi,pi),r=h),r.status){case"fulfilled":return r.value;case"rejected":throw l=r.reason,Jr(l),l;default:if(typeof r.status=="string")r.then(pi,pi);else{if(l=qe,l!==null&&100<l.shellSuspendCounter)throw Error(u(482));l=r,l.status="pending",l.then(function(g){if(r.status==="pending"){var E=r;E.status="fulfilled",E.value=g}},function(g){if(r.status==="pending"){var E=r;E.status="rejected",E.reason=g}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw l=r.reason,Jr(l),l}throw Pi=r,Gu}}function Wa(l){try{var r=l._init;return r(l._payload)}catch(h){throw h!==null&&typeof h=="object"&&typeof h.then=="function"?(Pi=h,Gu):h}}function Nc(){if(Pi===null)throw Error(u(459));var l=Pi;return Pi=null,l}function Jr(l){if(l===Gu||l===Qd)throw Error(u(483))}function mi(l){var r=Of;return Of+=1,Yi===null&&(Yi=[]),gl(Yi,l,r)}function Fr(l,r){r=r.props.ref,l.ref=r!==void 0?r:null}function kr(l,r){throw r.$$typeof===Cd?Error(u(525)):(l=Object.prototype.toString.call(r),Error(u(31,l==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":l)))}function H0(l){function r(at,F){if(l){var rt=at.deletions;rt===null?(at.deletions=[F],at.flags|=16):rt.push(F)}}function h(at,F){if(!l)return null;for(;F!==null;)r(at,F),F=F.sibling;return null}function g(at){for(var F=new Map;at!==null;)at.key!==null?F.set(at.key,at):F.set(at.index,at),at=at.sibling;return F}function E(at,F){return at=Ps(at,F),at.index=0,at.sibling=null,at}function T(at,F,rt){return at.index=rt,l?(rt=at.alternate,rt!==null?(rt=rt.index,rt<F?(at.flags|=67108866,F):rt):(at.flags|=67108866,F)):(at.flags|=1048576,F)}function z(at){return l&&at.alternate===null&&(at.flags|=67108866),at}function L(at,F,rt,Ct){return F===null||F.tag!==6?(F=hf(rt,at.mode,Ct),F.return=at,F):(F=E(F,rt),F.return=at,F)}function ut(at,F,rt,Ct){var Pt=rt.type;return Pt===oo?Dt(at,F,rt.props.children,Ct,rt.key):F!==null&&(F.elementType===Pt||typeof Pt=="object"&&Pt!==null&&Pt.$$typeof===mr&&Wa(Pt)===F.type)?(F=E(F,rt.props),Fr(F,rt),F.return=at,F):(F=ff(rt.type,rt.key,rt.props,null,at.mode,Ct),Fr(F,rt),F.return=at,F)}function vt(at,F,rt,Ct){return F===null||F.tag!==4||F.stateNode.containerInfo!==rt.containerInfo||F.stateNode.implementation!==rt.implementation?(F=bd(rt,at.mode,Ct),F.return=at,F):(F=E(F,rt.children||[]),F.return=at,F)}function Dt(at,F,rt,Ct,Pt){return F===null||F.tag!==7?(F=Rl(rt,at.mode,Ct,Pt),F.return=at,F):(F=E(F,rt),F.return=at,F)}function _t(at,F,rt){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return F=hf(""+F,at.mode,rt),F.return=at,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case pf:return rt=ff(F.type,F.key,F.props,null,at.mode,rt),Fr(rt,F),rt.return=at,rt;case pr:return F=bd(F,at.mode,rt),F.return=at,F;case mr:return F=Wa(F),_t(at,F,rt)}if(gr(F)||b(F))return F=Rl(F,at.mode,rt,null),F.return=at,F;if(typeof F.then=="function")return _t(at,mi(F),rt);if(F.$$typeof===zl)return _t(at,Oi(at,F),rt);kr(at,F)}return null}function Nt(at,F,rt,Ct){var Pt=F!==null?F.key:null;if(typeof rt=="string"&&rt!==""||typeof rt=="number"||typeof rt=="bigint")return Pt!==null?null:L(at,F,""+rt,Ct);if(typeof rt=="object"&&rt!==null){switch(rt.$$typeof){case pf:return rt.key===Pt?ut(at,F,rt,Ct):null;case pr:return rt.key===Pt?vt(at,F,rt,Ct):null;case mr:return rt=Wa(rt),Nt(at,F,rt,Ct)}if(gr(rt)||b(rt))return Pt!==null?null:Dt(at,F,rt,Ct,null);if(typeof rt.then=="function")return Nt(at,F,mi(rt),Ct);if(rt.$$typeof===zl)return Nt(at,F,Oi(at,rt),Ct);kr(at,rt)}return null}function Xt(at,F,rt,Ct,Pt){if(typeof Ct=="string"&&Ct!==""||typeof Ct=="number"||typeof Ct=="bigint")return at=at.get(rt)||null,L(F,at,""+Ct,Pt);if(typeof Ct=="object"&&Ct!==null){switch(Ct.$$typeof){case pf:return at=at.get(Ct.key===null?rt:Ct.key)||null,ut(F,at,Ct,Pt);case pr:return at=at.get(Ct.key===null?rt:Ct.key)||null,vt(F,at,Ct,Pt);case mr:return Ct=Wa(Ct),Xt(at,F,rt,Ct,Pt)}if(gr(Ct)||b(Ct))return at=at.get(rt)||null,Dt(F,at,Ct,Pt,null);if(typeof Ct.then=="function")return Xt(at,F,rt,mi(Ct),Pt);if(Ct.$$typeof===zl)return Xt(at,F,rt,Oi(F,Ct),Pt);kr(F,Ct)}return null}function sn(at,F,rt,Ct){for(var Pt=null,dn=null,Qt=F,Me=F=0,pe=null;Qt!==null&&Me<rt.length;Me++){Qt.index>Me?(pe=Qt,Qt=null):pe=Qt.sibling;var Se=Nt(at,Qt,rt[Me],Ct);if(Se===null){Qt===null&&(Qt=pe);break}l&&Qt&&Se.alternate===null&&r(at,Qt),F=T(Se,F,Me),dn===null?Pt=Se:dn.sibling=Se,dn=Se,Qt=pe}if(Me===rt.length)return h(at,Qt),ue&&dt(at,Me),Pt;if(Qt===null){for(;Me<rt.length;Me++)Qt=_t(at,rt[Me],Ct),Qt!==null&&(F=T(Qt,F,Me),dn===null?Pt=Qt:dn.sibling=Qt,dn=Qt);return ue&&dt(at,Me),Pt}for(Qt=g(Qt);Me<rt.length;Me++)pe=Xt(Qt,at,Me,rt[Me],Ct),pe!==null&&(l&&pe.alternate!==null&&Qt.delete(pe.key===null?Me:pe.key),F=T(pe,F,Me),dn===null?Pt=pe:dn.sibling=pe,dn=pe);return l&&Qt.forEach(function(ql){return r(at,ql)}),ue&&dt(at,Me),Pt}function In(at,F,rt,Ct){if(rt==null)throw Error(u(151));for(var Pt=null,dn=null,Qt=F,Me=F=0,pe=null,Se=rt.next();Qt!==null&&!Se.done;Me++,Se=rt.next()){Qt.index>Me?(pe=Qt,Qt=null):pe=Qt.sibling;var ql=Nt(at,Qt,Se.value,Ct);if(ql===null){Qt===null&&(Qt=pe);break}l&&Qt&&ql.alternate===null&&r(at,Qt),F=T(ql,F,Me),dn===null?Pt=ql:dn.sibling=ql,dn=ql,Qt=pe}if(Se.done)return h(at,Qt),ue&&dt(at,Me),Pt;if(Qt===null){for(;!Se.done;Me++,Se=rt.next())Se=_t(at,Se.value,Ct),Se!==null&&(F=T(Se,F,Me),dn===null?Pt=Se:dn.sibling=Se,dn=Se);return ue&&dt(at,Me),Pt}for(Qt=g(Qt);!Se.done;Me++,Se=rt.next())Se=Xt(Qt,at,Me,Se.value,Ct),Se!==null&&(l&&Se.alternate!==null&&Qt.delete(Se.key===null?Me:Se.key),F=T(Se,F,Me),dn===null?Pt=Se:dn.sibling=Se,dn=Se);return l&&Qt.forEach(function(Bf){return r(at,Bf)}),ue&&dt(at,Me),Pt}function xo(at,F,rt,Ct){if(typeof rt=="object"&&rt!==null&&rt.type===oo&&rt.key===null&&(rt=rt.props.children),typeof rt=="object"&&rt!==null){switch(rt.$$typeof){case pf:t:{for(var Pt=rt.key;F!==null;){if(F.key===Pt){if(Pt=rt.type,Pt===oo){if(F.tag===7){h(at,F.sibling),Ct=E(F,rt.props.children),Ct.return=at,at=Ct;break t}}else if(F.elementType===Pt||typeof Pt=="object"&&Pt!==null&&Pt.$$typeof===mr&&Wa(Pt)===F.type){h(at,F.sibling),Ct=E(F,rt.props),Fr(Ct,rt),Ct.return=at,at=Ct;break t}h(at,F);break}else r(at,F);F=F.sibling}rt.type===oo?(Ct=Rl(rt.props.children,at.mode,Ct,rt.key),Ct.return=at,at=Ct):(Ct=ff(rt.type,rt.key,rt.props,null,at.mode,Ct),Fr(Ct,rt),Ct.return=at,at=Ct)}return z(at);case pr:t:{for(Pt=rt.key;F!==null;){if(F.key===Pt)if(F.tag===4&&F.stateNode.containerInfo===rt.containerInfo&&F.stateNode.implementation===rt.implementation){h(at,F.sibling),Ct=E(F,rt.children||[]),Ct.return=at,at=Ct;break t}else{h(at,F);break}else r(at,F);F=F.sibling}Ct=bd(rt,at.mode,Ct),Ct.return=at,at=Ct}return z(at);case mr:return rt=Wa(rt),xo(at,F,rt,Ct)}if(gr(rt))return sn(at,F,rt,Ct);if(b(rt)){if(Pt=b(rt),typeof Pt!="function")throw Error(u(150));return rt=Pt.call(rt),In(at,F,rt,Ct)}if(typeof rt.then=="function")return xo(at,F,mi(rt),Ct);if(rt.$$typeof===zl)return xo(at,F,Oi(at,rt),Ct);kr(at,rt)}return typeof rt=="string"&&rt!==""||typeof rt=="number"||typeof rt=="bigint"?(rt=""+rt,F!==null&&F.tag===6?(h(at,F.sibling),Ct=E(F,rt),Ct.return=at,at=Ct):(h(at,F),Ct=hf(rt,at.mode,Ct),Ct.return=at,at=Ct),z(at)):h(at,F)}return function(at,F,rt,Ct){try{Of=0;var Pt=xo(at,F,rt,Ct);return Yi=null,Pt}catch(Qt){if(Qt===Gu||Qt===Qd)throw Qt;var dn=i(29,Qt,null,at.mode);return dn.lanes=Ct,dn.return=at,dn}}}function _a(){for(var l=ms,r=Pm=ms=0;r<l;){var h=qi[r];qi[r++]=null;var g=qi[r];qi[r++]=null;var E=qi[r];qi[r++]=null;var T=qi[r];if(qi[r++]=null,g!==null&&E!==null){var z=g.pending;z===null?E.next=E:(E.next=z.next,z.next=E),g.pending=E}T!==0&&su(h,E,T)}}function yl(l,r,h,g){qi[ms++]=l,qi[ms++]=r,qi[ms++]=h,qi[ms++]=g,Pm|=g,l.lanes|=g,l=l.alternate,l!==null&&(l.lanes|=g)}function vl(l,r,h,g){return yl(l,r,h,g),Ir(l)}function sr(l,r){return yl(l,null,null,r),Ir(l)}function su(l,r,h){l.lanes|=h;var g=l.alternate;g!==null&&(g.lanes|=h);for(var E=!1,T=l.return;T!==null;)T.childLanes|=h,g=T.alternate,g!==null&&(g.childLanes|=h),T.tag===22&&(l=T.stateNode,l===null||l._visibility&1||(E=!0)),l=T,T=T.return;return l.tag===3?(T=l.stateNode,E&&r!==null&&(E=31-ii(h),l=T.hiddenUpdates,g=l[E],g===null?l[E]=[r]:g.push(r),r.lane=h|536870912),T):null}function Ir(l){if(50<Xu)throw Xu=0,cp=null,Error(u(185));for(var r=l.return;r!==null;)l=r,r=l.return;return l.tag===3?l.stateNode:null}function Oc(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wr(l,r){l=l.updateQueue,r.updateQueue===l&&(r.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function gi(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function Os(l,r,h){var g=l.updateQueue;if(g===null)return null;if(g=g.shared,(fe&2)!==0){var E=g.pending;return E===null?r.next=r:(r.next=E.next,E.next=r),g.pending=r,r=Ir(l),su(l,null,h),r}return yl(l,g,r,h),Ir(l)}function Rc(l,r,h){if(r=r.updateQueue,r!==null&&(r=r.shared,(h&4194048)!==0)){var g=r.lanes;g&=l.pendingLanes,h|=g,r.lanes=h,it(l,h)}}function w0(l,r){var h=l.updateQueue,g=l.alternate;if(g!==null&&(g=g.updateQueue,h===g)){var E=null,T=null;if(h=h.firstBaseUpdate,h!==null){do{var z={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};T===null?E=T=z:T=T.next=z,h=h.next}while(h!==null);T===null?E=T=r:T=T.next=r}else E=T=r;h={baseState:g.baseState,firstBaseUpdate:E,lastBaseUpdate:T,shared:g.shared,callbacks:g.callbacks},l.updateQueue=h;return}l=h.lastBaseUpdate,l===null?h.firstBaseUpdate=r:l.next=r,h.lastBaseUpdate=r}function lu(){if(Ym){var l=Vu;if(l!==null)throw l}}function $r(l,r,h,g){Ym=!1;var E=l.updateQueue;Er=!1;var T=E.firstBaseUpdate,z=E.lastBaseUpdate,L=E.shared.pending;if(L!==null){E.shared.pending=null;var ut=L,vt=ut.next;ut.next=null,z===null?T=vt:z.next=vt,z=ut;var Dt=l.alternate;Dt!==null&&(Dt=Dt.updateQueue,L=Dt.lastBaseUpdate,L!==z&&(L===null?Dt.firstBaseUpdate=vt:L.next=vt,Dt.lastBaseUpdate=ut))}if(T!==null){var _t=E.baseState;z=0,Dt=vt=ut=null,L=T;do{var Nt=L.lane&-536870913,Xt=Nt!==L.lane;if(Xt?(de&Nt)===Nt:(g&Nt)===Nt){Nt!==0&&Nt===Bu&&(Ym=!0),Dt!==null&&(Dt=Dt.next={lane:0,tag:L.tag,payload:L.payload,callback:null,next:null});t:{var sn=l,In=L;Nt=r;var xo=h;switch(In.tag){case 1:if(sn=In.payload,typeof sn=="function"){_t=sn.call(xo,_t,Nt);break t}_t=sn;break t;case 3:sn.flags=sn.flags&-65537|128;case 0:if(sn=In.payload,Nt=typeof sn=="function"?sn.call(xo,_t,Nt):sn,Nt==null)break t;_t=vi({},_t,Nt);break t;case 2:Er=!0}}Nt=L.callback,Nt!==null&&(l.flags|=64,Xt&&(l.flags|=8192),Xt=E.callbacks,Xt===null?E.callbacks=[Nt]:Xt.push(Nt))}else Xt={lane:Nt,tag:L.tag,payload:L.payload,callback:L.callback,next:null},Dt===null?(vt=Dt=Xt,ut=_t):Dt=Dt.next=Xt,z|=Nt;if(L=L.next,L===null){if(L=E.shared.pending,L===null)break;Xt=L,L=Xt.next,Xt.next=null,E.lastBaseUpdate=Xt,E.shared.pending=null}}while(!0);Dt===null&&(ut=_t),E.baseState=ut,E.firstBaseUpdate=vt,E.lastBaseUpdate=Dt,T===null&&(E.shared.lanes=0),_r|=z,l.lanes=z,l.memoizedState=_t}}function U0(l,r){if(typeof l!="function")throw Error(u(191,l));l.call(r)}function _g(l,r){var h=l.callbacks;if(h!==null)for(l.callbacks=null,l=0;l<h.length;l++)U0(h[l],r)}function wt(l,r){l=Pl,A(Jd,l),A(ks,r),Pl=l|r.baseLanes}function zc(){A(Jd,Pl),A(ks,ks.current)}function Sl(){Pl=Jd.current,D(ks),D(Jd)}function bl(l){var r=l.alternate;A(wn,wn.current&1),A(bi,l),Xi===null&&(r===null||ks.current!==null||r.memoizedState!==null)&&(Xi=l)}function ru(l){A(wn,wn.current),A(bi,l),Xi===null&&(Xi=l)}function Rs(l){l.tag===22?(A(wn,wn.current),A(bi,l),Xi===null&&(Xi=l)):El()}function El(){A(wn,wn.current),A(bi,bi.current)}function $a(l){D(bi),Xi===l&&(Xi=null),D(wn)}function Tl(l){for(var r=l;r!==null;){if(r.tag===13){var h=r.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||Tf(h)||Cf(h)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===l)break;for(;r.sibling===null;){if(r.return===null||r.return===l)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}function fn(){throw Error(u(321))}function Cl(l,r){if(r===null)return!1;for(var h=0;h<r.length&&h<l.length;h++)if(!Sa(l[h],r[h]))return!1;return!0}function Hc(l,r,h,g,E,T){return Ll=T,$t=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,Lt.H=l===null||l.memoizedState===null?Hy:qm,To=!1,T=h(g,E),To=!1,ju&&(T=Hh(r,h,g,E)),ou(l),T}function ou(l){Lt.H=Rf;var r=Le!==null&&Le.next!==null;if(Ll=0,Yn=Le=$t=null,Fd=!1,Lu=0,Pu=null,r)throw Error(u(300));l===null||qn||(l=l.dependencies,l!==null&&Ii(l)&&(qn=!0))}function Hh(l,r,h,g){$t=l;var E=0;do{if(ju&&(Pu=null),Lu=0,ju=!1,25<=E)throw Error(u(301));if(E+=1,Yn=Le=null,l.updateQueue!=null){var T=l.updateQueue;T.lastEffect=null,T.events=null,T.stores=null,T.memoCache!=null&&(T.memoCache.index=0)}Lt.H=wy,T=r(h,g)}while(ju);return T}function wh(){var l=Lt.H,r=l.useState()[0];return r=typeof r.then=="function"?$i(r):r,l=l.useState()[0],(Le!==null?Le.memoizedState:null)!==l&&($t.flags|=1024),r}function zs(){var l=kd!==0;return kd=0,l}function Wi(l,r,h){r.updateQueue=l.updateQueue,r.flags&=-2053,l.lanes&=~h}function wc(l){if(Fd){for(l=l.memoizedState;l!==null;){var r=l.queue;r!==null&&(r.pending=null),l=l.next}Fd=!1}Ll=0,Yn=Le=$t=null,ju=!1,Lu=kd=0,Pu=null}function pa(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Yn===null?$t.memoizedState=Yn=l:Yn=Yn.next=l,Yn}function Qe(){if(Le===null){var l=$t.alternate;l=l!==null?l.memoizedState:null}else l=Le.next;var r=Yn===null?$t.memoizedState:Yn.next;if(r!==null)Yn=r,Le=l;else{if(l===null)throw $t.alternate===null?Error(u(467)):Error(u(310));Le=l,l={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},Yn===null?$t.memoizedState=Yn=l:Yn=Yn.next=l}return Yn}function to(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function $i(l){var r=Lu;return Lu+=1,Pu===null&&(Pu=[]),l=gl(Pu,l,r),r=$t,(Yn===null?r.memoizedState:Yn.next)===null&&(r=r.alternate,Lt.H=r===null||r.memoizedState===null?Hy:qm),l}function je(l){if(l!==null&&typeof l=="object"){if(typeof l.then=="function")return $i(l);if(l.$$typeof===zl)return Mn(l)}throw Error(u(438,String(l)))}function uu(l){var r=null,h=$t.updateQueue;if(h!==null&&(r=h.memoCache),r==null){var g=$t.alternate;g!==null&&(g=g.updateQueue,g!==null&&(g=g.memoCache,g!=null&&(r={data:g.data.map(function(E){return E.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),h===null&&(h=to(),$t.updateQueue=h),h.memoCache=r,h=r.data[r.index],h===void 0)for(h=r.data[r.index]=Array(l),g=0;g<l;g++)h[g]=Ys;return r.index++,h}function Hs(l,r){return typeof r=="function"?r(l):r}function cu(l){var r=Qe();return _l(r,Le,l)}function _l(l,r,h){var g=l.queue;if(g===null)throw Error(u(311));g.lastRenderedReducer=h;var E=l.baseQueue,T=g.pending;if(T!==null){if(E!==null){var z=E.next;E.next=T.next,T.next=z}r.baseQueue=E=T,g.pending=null}if(T=l.baseState,E===null)l.memoizedState=T;else{r=E.next;var L=z=null,ut=null,vt=r,Dt=!1;do{var _t=vt.lane&-536870913;if(_t!==vt.lane?(de&_t)===_t:(Ll&_t)===_t){var Nt=vt.revertLane;if(Nt===0)ut!==null&&(ut=ut.next={lane:0,revertLane:0,gesture:null,action:vt.action,hasEagerState:vt.hasEagerState,eagerState:vt.eagerState,next:null}),_t===Bu&&(Dt=!0);else if((Ll&Nt)===Nt){vt=vt.next,Nt===Bu&&(Dt=!0);continue}else _t={lane:0,revertLane:vt.revertLane,gesture:null,action:vt.action,hasEagerState:vt.hasEagerState,eagerState:vt.eagerState,next:null},ut===null?(L=ut=_t,z=T):ut=ut.next=_t,$t.lanes|=Nt,_r|=Nt;_t=vt.action,To&&h(T,_t),T=vt.hasEagerState?vt.eagerState:h(T,_t)}else Nt={lane:_t,revertLane:vt.revertLane,gesture:vt.gesture,action:vt.action,hasEagerState:vt.hasEagerState,eagerState:vt.eagerState,next:null},ut===null?(L=ut=Nt,z=T):ut=ut.next=Nt,$t.lanes|=_t,_r|=_t;vt=vt.next}while(vt!==null&&vt!==r);if(ut===null?z=T:ut.next=L,!Sa(T,l.memoizedState)&&(qn=!0,Dt&&(h=Vu,h!==null)))throw h;l.memoizedState=T,l.baseState=z,l.baseQueue=ut,g.lastRenderedState=T}return E===null&&(g.lanes=0),[l.memoizedState,g.dispatch]}function eo(l){var r=Qe(),h=r.queue;if(h===null)throw Error(u(311));h.lastRenderedReducer=l;var g=h.dispatch,E=h.pending,T=r.memoizedState;if(E!==null){h.pending=null;var z=E=E.next;do T=l(T,z.action),z=z.next;while(z!==E);Sa(T,r.memoizedState)||(qn=!0),r.memoizedState=T,r.baseQueue===null&&(r.baseState=T),h.lastRenderedState=T}return[T,g]}function ts(l,r,h){var g=$t,E=Qe(),T=ue;if(T){if(h===void 0)throw Error(u(407));h=h()}else h=r();var z=!Sa((Le||E).memoizedState,h);if(z&&(E.memoizedState=h,qn=!0),E=E.queue,Bh(Uc.bind(null,g,E,l),[l]),E.getSnapshot!==r||z||Yn!==null&&Yn.memoizedState.tag&1){if(g.flags|=2048,ja(9,{destroy:void 0},ws.bind(null,g,E,h,r),null),qe===null)throw Error(u(349));T||(Ll&127)!==0||xg(g,r,h)}return h}function xg(l,r,h){l.flags|=16384,l={getSnapshot:r,value:h},r=$t.updateQueue,r===null?(r=to(),$t.updateQueue=r,r.stores=[l]):(h=r.stores,h===null?r.stores=[l]:h.push(l))}function ws(l,r,h,g){r.value=h,r.getSnapshot=g,fu(r)&&Bc(l)}function Uc(l,r,h){return h(function(){fu(r)&&Bc(l)})}function fu(l){var r=l.getSnapshot;l=l.value;try{var h=r();return!Sa(l,h)}catch{return!0}}function Bc(l){var r=sr(l,2);r!==null&&Pa(r,l,2)}function Ga(l){var r=pa();if(typeof l=="function"){var h=l;if(l=h(),To){ht(!0);try{h()}finally{ht(!1)}}}return r.memoizedState=r.baseState=l,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hs,lastRenderedState:l},r}function ti(l,r,h,g){return l.baseState=h,_l(l,Le,typeof g=="function"?g:Hs)}function Us(l,r,h,g,E){if(rr(l))throw Error(u(485));if(l=r.action,l!==null){var T={payload:E,action:l,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(z){T.listeners.push(z)}};Lt.T!==null?h(!0):T.isTransition=!1,g(T),h=r.pending,h===null?(T.next=r.pending=T,es(r,T)):(T.next=h.next,r.pending=h.next=T)}}function es(l,r){var h=r.action,g=r.payload,E=l.state;if(r.isTransition){var T=Lt.T,z={};Lt.T=z;try{var L=h(E,g),ut=Lt.S;ut!==null&&ut(z,L),ns(l,r,L)}catch(vt){Vc(l,r,vt)}finally{T!==null&&z.types!==null&&(T.types=z.types),Lt.T=T}}else try{T=h(E,g),ns(l,r,T)}catch(vt){Vc(l,r,vt)}}function ns(l,r,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(g){as(l,r,g)},function(g){return Vc(l,r,g)}):as(l,r,h)}function as(l,r,h){r.status="fulfilled",r.value=h,Uh(r),l.state=h,r=l.pending,r!==null&&(h=r.next,h===r?l.pending=null:(h=h.next,r.next=h,es(l,h)))}function Vc(l,r,h){var g=l.pending;if(l.pending=null,g!==null){g=g.next;do r.status="rejected",r.reason=h,Uh(r),r=r.next;while(r!==g)}l.action=null}function Uh(l){l=l.listeners;for(var r=0;r<l.length;r++)(0,l[r])()}function B0(l,r){return r}function is(l,r){if(ue){var h=qe.formState;if(h!==null){t:{var g=$t;if(ue){if(nn){var E=uy(nn,Li);if(E){nn=Nm(E),g=cy(E);break t}}yn(g)}g=!1}g&&(r=h[0])}}h=pa(),h.memoizedState=h.baseState=r,g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:B0,lastRenderedState:r},h.queue=g,h=Yh.bind(null,$t,g),g.dispatch=h,g=Ga(!1);var T=du.bind(null,$t,!1,g.queue);return g=pa(),E={state:r,dispatch:null,action:l,pending:null},g.queue=E,h=Us.bind(null,$t,E,T,h),E.dispatch=h,g.memoizedState=l,[r,h,!1]}function V0(l){var r=Qe();return ss(r,Le,l)}function ss(l,r,h){if(r=_l(l,r,B0)[0],l=cu(Hs)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var g=$i(r)}catch(z){throw z===Gu?Qd:z}else g=r;r=Qe();var E=r.queue,T=E.dispatch;return h!==r.memoizedState&&($t.flags|=2048,ja(9,{destroy:void 0},Gc.bind(null,E,h),null)),[g,T,l]}function Gc(l,r){l.action=r}function jc(l){var r=Qe(),h=Le;if(h!==null)return ss(r,h,l);Qe(),r=r.memoizedState,h=Qe();var g=h.queue.dispatch;return h.memoizedState=l,[r,g,!1]}function ja(l,r,h,g){return l={tag:l,create:h,deps:g,inst:r,next:null},r=$t.updateQueue,r===null&&(r=to(),$t.updateQueue=r),h=r.lastEffect,h===null?r.lastEffect=l.next=l:(g=h.next,h.next=l,l.next=g,r.lastEffect=l),l}function no(){return Qe().memoizedState}function Lc(l,r,h,g){var E=pa();$t.flags|=l,E.memoizedState=ja(1|r,{destroy:void 0},h,g===void 0?null:g)}function hu(l,r,h,g){var E=Qe();g=g===void 0?null:g;var T=E.memoizedState.inst;Le!==null&&g!==null&&Cl(g,Le.memoizedState.deps)?E.memoizedState=ja(r,T,h,g):($t.flags|=l,E.memoizedState=ja(1|r,T,h,g))}function G0(l,r){Lc(8390656,8,l,r)}function Bh(l,r){hu(2048,8,l,r)}function Dg(l){$t.flags|=4;var r=$t.updateQueue;if(r===null)r=to(),$t.updateQueue=r,r.events=[l];else{var h=r.events;h===null?r.events=[l]:h.push(l)}}function Vh(l){var r=Qe().memoizedState;return Dg({ref:r,nextImpl:l}),function(){if((fe&2)!==0)throw Error(u(440));return r.impl.apply(void 0,arguments)}}function j0(l,r){return hu(4,2,l,r)}function Gh(l,r){return hu(4,4,l,r)}function Ag(l,r){if(typeof r=="function"){l=l();var h=r(l);return function(){typeof h=="function"?h():r(null)}}if(r!=null)return l=l(),r.current=l,function(){r.current=null}}function L0(l,r,h){h=h!=null?h.concat([l]):null,hu(4,4,Ag.bind(null,r,l),h)}function P0(){}function jh(l,r){var h=Qe();r=r===void 0?null:r;var g=h.memoizedState;return r!==null&&Cl(r,g[1])?g[0]:(h.memoizedState=[l,r],l)}function Pc(l,r){var h=Qe();r=r===void 0?null:r;var g=h.memoizedState;if(r!==null&&Cl(r,g[1]))return g[0];if(g=l(),To){ht(!0);try{l()}finally{ht(!1)}}return h.memoizedState=[g,r],g}function Lh(l,r,h){return h===void 0||(Ll&1073741824)!==0&&(de&261930)===0?l.memoizedState=r:(l.memoizedState=h,l=lf(),$t.lanes|=l,_r|=l,h)}function Yc(l,r,h,g){return Sa(h,r)?h:ks.current!==null?(l=Lh(l,h,g),Sa(l,r)||(qn=!0),l):(Ll&42)===0||(Ll&1073741824)!==0&&(de&261930)===0?(qn=!0,l.memoizedState=h):(l=lf(),$t.lanes|=l,_r|=l,r)}function Y0(l,r,h,g,E){var T=Xs();Fn(T!==0&&8>T?T:8);var z=Lt.T,L={};Lt.T=L,du(l,!1,r,h);try{var ut=E(),vt=Lt.S;if(vt!==null&&vt(L,ut),ut!==null&&typeof ut=="object"&&typeof ut.then=="function"){var Dt=Ri(ut,g);lr(l,r,Dt,ai(l))}else lr(l,r,g,ai(l))}catch(_t){lr(l,r,{then:function(){},status:"rejected",reason:_t},ai())}finally{Fn(T),z!==null&&L.types!==null&&(z.types=L.types),Lt.T=z}}function q0(l){var r=l.memoizedState;if(r!==null)return r;r={memoizedState:qa,baseState:qa,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hs,lastRenderedState:qa},next:null};var h={};return r.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hs,lastRenderedState:h},next:null},l.memoizedState=r,l=l.alternate,l!==null&&(l.memoizedState=r),r}function Ph(){return Mn(yr)}function xl(){return Qe().memoizedState}function X0(){return Qe().memoizedState}function Mg(l){for(var r=l.return;r!==null;){switch(r.tag){case 24:case 3:var h=ai();l=gi(h);var g=Os(r,l,h);g!==null&&(Pa(g,r,h),Rc(g,r,h)),r={cache:De()},l.payload=r;return}r=r.return}}function ma(l,r,h){var g=ai();h={lane:g,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},rr(l)?K0(r,h):(h=vl(l,r,h,g),h!==null&&(Pa(h,l,g),qc(h,r,g)))}function Yh(l,r,h){var g=ai();lr(l,r,h,g)}function lr(l,r,h,g){var E={lane:g,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null};if(rr(l))K0(r,E);else{var T=l.alternate;if(l.lanes===0&&(T===null||T.lanes===0)&&(T=r.lastRenderedReducer,T!==null))try{var z=r.lastRenderedState,L=T(z,h);if(E.hasEagerState=!0,E.eagerState=L,Sa(L,z))return yl(l,r,E,0),qe===null&&_a(),!1}catch{}if(h=vl(l,r,E,g),h!==null)return Pa(h,l,g),qc(h,r,g),!0}return!1}function du(l,r,h,g){if(g={lane:2,revertLane:Zr(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},rr(l)){if(r)throw Error(u(479))}else r=vl(l,h,g,2),r!==null&&Pa(r,l,2)}function rr(l){var r=l.alternate;return l===$t||r!==null&&r===$t}function K0(l,r){ju=Fd=!0;var h=l.pending;h===null?r.next=r:(r.next=h.next,h.next=r),l.pending=r}function qc(l,r,h){if((h&4194048)!==0){var g=r.lanes;g&=l.pendingLanes,h|=g,r.lanes=h,it(l,h)}}function qh(l,r,h,g){r=l.memoizedState,h=h(g,r),h=h==null?r:vi({},r,h),l.memoizedState=h,l.lanes===0&&(l.updateQueue.baseState=h)}function Xc(l,r,h,g,E,T,z){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(g,T,z):r.prototype&&r.prototype.isPureReactComponent?!ir(h,g)||!ir(E,T):!0}function Q0(l,r,h,g){l=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(h,g),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(h,g),r.state!==l&&Id.enqueueReplaceState(r,r.state,null)}function Bs(l,r){var h=r;if("ref"in r){h={};for(var g in r)g!=="ref"&&(h[g]=r[g])}if(l=l.defaultProps){h===r&&(h=vi({},h));for(var E in l)h[E]===void 0&&(h[E]=l[E])}return h}function Kc(l,r){try{var h=l.onUncaughtError;h(r.value,{componentStack:r.stack})}catch(g){setTimeout(function(){throw g})}}function Z0(l,r,h){try{var g=l.onCaughtError;g(h.value,{componentStack:h.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(E){setTimeout(function(){throw E})}}function pu(l,r,h){return h=gi(h),h.tag=3,h.payload={element:null},h.callback=function(){Kc(l,r)},h}function Qc(l){return l=gi(l),l.tag=3,l}function Xh(l,r,h,g){var E=h.type.getDerivedStateFromError;if(typeof E=="function"){var T=g.value;l.payload=function(){return E(T)},l.callback=function(){Z0(r,h,g)}}var z=h.stateNode;z!==null&&typeof z.componentDidCatch=="function"&&(l.callback=function(){Z0(r,h,g),typeof E!="function"&&(xr===null?xr=new Set([this]):xr.add(this));var L=g.stack;this.componentDidCatch(g.value,{componentStack:L!==null?L:""})})}function xa(l,r,h,g,E){if(h.flags|=32768,g!==null&&typeof g=="object"&&typeof g.then=="function"){if(r=h.alternate,r!==null&&di(r,h,E,!0),h=bi.current,h!==null){switch(h.tag){case 31:case 13:return Xi===null?Tu():h.alternate===null&&Sn===0&&(Sn=3),h.flags&=-257,h.flags|=65536,h.lanes=E,g===Zd?h.flags|=16384:(r=h.updateQueue,r===null?h.updateQueue=new Set([g]):r.add(g),gd(l,g,E)),!1;case 22:return h.flags|=65536,g===Zd?h.flags|=16384:(r=h.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([g])},h.updateQueue=r):(h=r.retryQueue,h===null?r.retryQueue=new Set([g]):h.add(g)),gd(l,g,E)),!1}throw Error(u(435,h.tag))}return gd(l,g,E),Tu(),!1}if(ue)return r=bi.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=E,g!==Gm&&(l=Error(u(422),{cause:g}),$e(pt(l,h)))):(g!==Gm&&(r=Error(u(423),{cause:g}),$e(pt(r,h))),l=l.current.alternate,l.flags|=65536,E&=-E,l.lanes|=E,g=pt(g,h),E=pu(l.stateNode,g,E),w0(l,E),Sn!==4&&(Sn=2)),!1;var T=Error(u(520),{cause:g});if(T=pt(T,h),wf===null?wf=[T]:wf.push(T),Sn!==4&&(Sn=2),r===null)return!0;g=pt(g,h),h=r;do{switch(h.tag){case 3:return h.flags|=65536,l=E&-E,h.lanes|=l,l=pu(h.stateNode,g,l),w0(h,l),!1;case 1:if(r=h.type,T=h.stateNode,(h.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(xr===null||!xr.has(T))))return h.flags|=65536,E&=-E,h.lanes|=E,E=Qc(E),Xh(E,l,h,g),w0(h,E),!1}h=h.return}while(h!==null);return!1}function aa(l,r,h,g){r.child=l===null?zy(r,null,h,g):Eo(r,l.child,h,g)}function Zc(l,r,h,g,E){h=h.render;var T=r.ref;if("ref"in g){var z={};for(var L in g)L!=="ref"&&(z[L]=g[L])}else z=g;return jn(r),g=Hc(l,r,h,z,T,E),L=zs(),l!==null&&!qn?(Wi(l,r,E),ei(l,r,E)):(ue&&L&&Et(r),r.flags|=1,aa(l,r,g,E),r.child)}function Kh(l,r,h,g,E){if(l===null){var T=h.type;return typeof T=="function"&&!cf(T)&&T.defaultProps===void 0&&h.compare===null?(r.tag=15,r.type=T,Qh(l,r,T,g,E)):(l=ff(h.type,null,g,r,r.mode,E),l.ref=r.ref,l.return=r,r.child=l)}if(T=l.child,!yu(l,E)){var z=T.memoizedProps;if(h=h.compare,h=h!==null?h:ir,h(z,g)&&l.ref===r.ref)return ei(l,r,E)}return r.flags|=1,l=Ps(T,g),l.ref=r.ref,l.return=r,r.child=l}function Qh(l,r,h,g,E){if(l!==null){var T=l.memoizedProps;if(ir(T,g)&&l.ref===r.ref)if(qn=!1,r.pendingProps=g=T,yu(l,E))(l.flags&131072)!==0&&(qn=!0);else return r.lanes=l.lanes,ei(l,r,E)}return J0(l,r,h,g,E)}function Dl(l,r,h,g){var E=g.children,T=l!==null?l.memoizedState:null;if(l===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),g.mode==="hidden"){if((r.flags&128)!==0){if(T=T!==null?T.baseLanes|h:h,l!==null){for(g=r.child=l.child,E=0;g!==null;)E=E|g.lanes|g.childLanes,g=g.sibling;g=E&~T}else g=0,r.child=null;return mu(l,r,T,h,g)}if((h&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},l!==null&&Ut(r,T!==null?T.cachePool:null),T!==null?wt(r,T):zc(),Rs(r);else return g=r.lanes=536870912,mu(l,r,T!==null?T.baseLanes|h:h,h,g)}else T!==null?(Ut(r,T.cachePool),wt(r,T),El(),r.memoizedState=null):(l!==null&&Ut(r,null),zc(),El());return aa(l,r,E,h),r.child}function zi(l,r){return l!==null&&l.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function mu(l,r,h,g,E){var T=ar();return T=T===null?null:{parent:Bi?hn._currentValue:hn._currentValue2,pool:T},r.memoizedState={baseLanes:h,cachePool:T},l!==null&&Ut(r,null),zc(),Rs(r),l!==null&&di(l,r,g,!0),r.childLanes=E,null}function ao(l,r){return r=ls({mode:r.mode,children:r.children},l.mode),r.ref=l.ref,l.child=r,r.return=l,r}function gu(l,r,h){return Eo(r,l.child,null,h),l=ao(r,r.pendingProps),l.flags|=2,$a(r),r.memoizedState=null,l}function Jc(l,r,h){var g=r.pendingProps,E=(r.flags&128)!==0;if(r.flags&=-129,l===null){if(ue){if(g.mode==="hidden")return l=ao(r,g),r.lanes=536870912,zi(null,l);if(ru(r),(l=nn)?(l=py(l,Li),l!==null&&(r.memoizedState={dehydrated:l,treeContext:Gl!==null?{id:Xa,overflow:Zs}:null,retryLane:536870912,hydrationErrors:null},h=Sd(l),h.return=r,r.child=h,kn=r,nn=null)):l=null,l===null)throw yn(r);return r.lanes=536870912,null}return ao(r,g)}var T=l.memoizedState;if(T!==null){var z=T.dehydrated;if(ru(r),E)if(r.flags&256)r.flags&=-257,r=gu(l,r,h);else if(r.memoizedState!==null)r.child=l.child,r.flags|=128,r=null;else throw Error(u(558));else if(qn||di(l,r,h,!1),E=(h&l.childLanes)!==0,qn||E){if(g=qe,g!==null&&(z=J(g,h),z!==0&&z!==T.retryLane))throw T.retryLane=z,sr(l,z),Pa(g,l,z),Wd;Tu(),r=gu(l,r,h)}else l=T.treeContext,ya&&(nn=Om(z),kn=r,ue=!0,jl=null,Li=!1,l!==null&&qt(r,l)),r=ao(r,g),r.flags|=4096;return r}return l=Ps(l.child,{mode:g.mode,children:g.children}),l.ref=r.ref,r.child=l,l.return=r,l}function Fc(l,r){var h=r.ref;if(h===null)l!==null&&l.ref!==null&&(r.flags|=4194816);else{if(typeof h!="function"&&typeof h!="object")throw Error(u(284));(l===null||l.ref!==h)&&(r.flags|=4194816)}}function J0(l,r,h,g,E){return jn(r),h=Hc(l,r,h,g,void 0,E),g=zs(),l!==null&&!qn?(Wi(l,r,E),ei(l,r,E)):(ue&&g&&Et(r),r.flags|=1,aa(l,r,h,E),r.child)}function F0(l,r,h,g,E,T){return jn(r),r.updateQueue=null,h=Hh(r,g,h,E),ou(l),g=zs(),l!==null&&!qn?(Wi(l,r,T),ei(l,r,T)):(ue&&g&&Et(r),r.flags|=1,aa(l,r,h,T),r.child)}function k0(l,r,h,g,E){if(jn(r),r.stateNode===null){var T=yo,z=h.contextType;typeof z=="object"&&z!==null&&(T=Mn(z)),T=new h(g,T),r.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,T.updater=Id,r.stateNode=T,T._reactInternals=r,T=r.stateNode,T.props=g,T.state=r.memoizedState,T.refs={},Oc(r),z=h.contextType,T.context=typeof z=="object"&&z!==null?Mn(z):yo,T.state=r.memoizedState,z=h.getDerivedStateFromProps,typeof z=="function"&&(qh(r,h,z,g),T.state=r.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof T.getSnapshotBeforeUpdate=="function"||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(z=T.state,typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount(),z!==T.state&&Id.enqueueReplaceState(T,T.state,null),$r(r,g,T,E),lu(),T.state=r.memoizedState),typeof T.componentDidMount=="function"&&(r.flags|=4194308),g=!0}else if(l===null){T=r.stateNode;var L=r.memoizedProps,ut=Bs(h,L);T.props=ut;var vt=T.context,Dt=h.contextType;z=yo,typeof Dt=="object"&&Dt!==null&&(z=Mn(Dt));var _t=h.getDerivedStateFromProps;Dt=typeof _t=="function"||typeof T.getSnapshotBeforeUpdate=="function",L=r.pendingProps!==L,Dt||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(L||vt!==z)&&Q0(r,T,g,z),Er=!1;var Nt=r.memoizedState;T.state=Nt,$r(r,g,T,E),lu(),vt=r.memoizedState,L||Nt!==vt||Er?(typeof _t=="function"&&(qh(r,h,_t,g),vt=r.memoizedState),(ut=Er||Xc(r,h,ut,g,Nt,vt,z))?(Dt||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(r.flags|=4194308)):(typeof T.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=g,r.memoizedState=vt),T.props=g,T.state=vt,T.context=z,g=ut):(typeof T.componentDidMount=="function"&&(r.flags|=4194308),g=!1)}else{T=r.stateNode,Wr(l,r),z=r.memoizedProps,Dt=Bs(h,z),T.props=Dt,_t=r.pendingProps,Nt=T.context,vt=h.contextType,ut=yo,typeof vt=="object"&&vt!==null&&(ut=Mn(vt)),L=h.getDerivedStateFromProps,(vt=typeof L=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(z!==_t||Nt!==ut)&&Q0(r,T,g,ut),Er=!1,Nt=r.memoizedState,T.state=Nt,$r(r,g,T,E),lu();var Xt=r.memoizedState;z!==_t||Nt!==Xt||Er||l!==null&&l.dependencies!==null&&Ii(l.dependencies)?(typeof L=="function"&&(qh(r,h,L,g),Xt=r.memoizedState),(Dt=Er||Xc(r,h,Dt,g,Nt,Xt,ut)||l!==null&&l.dependencies!==null&&Ii(l.dependencies))?(vt||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(g,Xt,ut),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(g,Xt,ut)),typeof T.componentDidUpdate=="function"&&(r.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof T.componentDidUpdate!="function"||z===l.memoizedProps&&Nt===l.memoizedState||(r.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||z===l.memoizedProps&&Nt===l.memoizedState||(r.flags|=1024),r.memoizedProps=g,r.memoizedState=Xt),T.props=g,T.state=Xt,T.context=ut,g=Dt):(typeof T.componentDidUpdate!="function"||z===l.memoizedProps&&Nt===l.memoizedState||(r.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||z===l.memoizedProps&&Nt===l.memoizedState||(r.flags|=1024),g=!1)}return T=g,Fc(l,r),g=(r.flags&128)!==0,T||g?(T=r.stateNode,h=g&&typeof h.getDerivedStateFromError!="function"?null:T.render(),r.flags|=1,l!==null&&g?(r.child=Eo(r,l.child,null,E),r.child=Eo(r,null,h,E)):aa(l,r,h,E),r.memoizedState=T.state,l=r.child):l=ei(l,r,E),l}function Zh(l,r,h,g){return Gt(),r.flags|=256,aa(l,r,h,g),r.child}function kc(l){return{baseLanes:l,cachePool:ce()}}function Vs(l,r,h){return l=l!==null?l.childLanes&~h:0,r&&(l|=Ti),l}function Jh(l,r,h){var g=r.pendingProps,E=!1,T=(r.flags&128)!==0,z;if((z=T)||(z=l!==null&&l.memoizedState===null?!1:(wn.current&2)!==0),z&&(E=!0,r.flags&=-129),z=(r.flags&32)!==0,r.flags&=-33,l===null){if(ue){if(E?bl(r):El(),(l=nn)?(l=u3(l,Li),l!==null&&(r.memoizedState={dehydrated:l,treeContext:Gl!==null?{id:Xa,overflow:Zs}:null,retryLane:536870912,hydrationErrors:null},h=Sd(l),h.return=r,r.child=h,kn=r,nn=null)):l=null,l===null)throw yn(r);return Cf(l)?r.lanes=32:r.lanes=536870912,null}var L=g.children;return g=g.fallback,E?(El(),E=r.mode,L=ls({mode:"hidden",children:L},E),g=Rl(g,E,h,null),L.return=r,g.return=r,L.sibling=g,r.child=L,g=r.child,g.memoizedState=kc(h),g.childLanes=Vs(l,z,h),r.memoizedState=$d,zi(null,g)):(bl(r),Fh(r,L))}var ut=l.memoizedState;if(ut!==null&&(L=ut.dehydrated,L!==null)){if(T)r.flags&256?(bl(r),r.flags&=-257,r=La(l,r,h)):r.memoizedState!==null?(El(),r.child=l.child,r.flags|=128,r=null):(El(),L=g.fallback,E=r.mode,g=ls({mode:"visible",children:g.children},E),L=Rl(L,E,h,null),L.flags|=2,g.return=r,L.return=r,g.sibling=L,r.child=g,Eo(r,l.child,null,h),g=r.child,g.memoizedState=kc(h),g.childLanes=Vs(l,z,h),r.memoizedState=$d,r=zi(null,g));else if(bl(r),Cf(L))z=po(L).digest,g=Error(u(419)),g.stack="",g.digest=z,$e({value:g,source:null,stack:null}),r=La(l,r,h);else if(qn||di(l,r,h,!1),z=(h&l.childLanes)!==0,qn||z){if(z=qe,z!==null&&(g=J(z,h),g!==0&&g!==ut.retryLane))throw ut.retryLane=g,sr(l,g),Pa(z,l,g),Wd;Tf(L)||Tu(),r=La(l,r,h)}else Tf(L)?(r.flags|=192,r.child=l.child,r=null):(l=ut.treeContext,ya&&(nn=hy(L),kn=r,ue=!0,jl=null,Li=!1,l!==null&&qt(r,l)),r=Fh(r,g.children),r.flags|=4096);return r}return E?(El(),L=g.fallback,E=r.mode,ut=l.child,T=ut.sibling,g=Ps(ut,{mode:"hidden",children:g.children}),g.subtreeFlags=ut.subtreeFlags&65011712,T!==null?L=Ps(T,L):(L=Rl(L,E,h,null),L.flags|=2),L.return=r,g.return=r,g.sibling=L,r.child=g,zi(null,g),g=r.child,L=l.child.memoizedState,L===null?L=kc(h):(E=L.cachePool,E!==null?(ut=Bi?hn._currentValue:hn._currentValue2,E=E.parent!==ut?{parent:ut,pool:ut}:E):E=ce(),L={baseLanes:L.baseLanes|h,cachePool:E}),g.memoizedState=L,g.childLanes=Vs(l,z,h),r.memoizedState=$d,zi(l.child,g)):(bl(r),h=l.child,l=h.sibling,h=Ps(h,{mode:"visible",children:g.children}),h.return=r,h.sibling=null,l!==null&&(z=r.deletions,z===null?(r.deletions=[l],r.flags|=16):z.push(l)),r.child=h,r.memoizedState=null,h)}function Fh(l,r){return r=ls({mode:"visible",children:r},l.mode),r.return=l,l.child=r}function ls(l,r){return l=i(22,l,null,r),l.lanes=0,l}function La(l,r,h){return Eo(r,l.child,null,h),l=Fh(r,r.pendingProps.children),l.flags|=2,r.memoizedState=null,l}function Ic(l,r,h){l.lanes|=r;var g=l.alternate;g!==null&&(g.lanes|=r),ea(l.return,r,h)}function Wt(l,r,h,g,E,T){var z=l.memoizedState;z===null?l.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:g,tail:h,tailMode:E,treeForkCount:T}:(z.isBackwards=r,z.rendering=null,z.renderingStartTime=0,z.last=g,z.tail=h,z.tailMode=E,z.treeForkCount=T)}function bt(l,r,h){var g=r.pendingProps,E=g.revealOrder,T=g.tail;g=g.children;var z=wn.current,L=(z&2)!==0;if(L?(z=z&1|2,r.flags|=128):z&=1,A(wn,z),aa(l,r,g,h),g=ue?st:0,!L&&l!==null&&(l.flags&128)!==0)t:for(l=r.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&Ic(l,h,r);else if(l.tag===19)Ic(l,h,r);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===r)break t;for(;l.sibling===null;){if(l.return===null||l.return===r)break t;l=l.return}l.sibling.return=l.return,l=l.sibling}switch(E){case"forwards":for(h=r.child,E=null;h!==null;)l=h.alternate,l!==null&&Tl(l)===null&&(E=h),h=h.sibling;h=E,h===null?(E=r.child,r.child=null):(E=h.sibling,h.sibling=null),Wt(r,!1,E,h,T,g);break;case"backwards":case"unstable_legacy-backwards":for(h=null,E=r.child,r.child=null;E!==null;){if(l=E.alternate,l!==null&&Tl(l)===null){r.child=E;break}l=E.sibling,E.sibling=h,h=E,E=l}Wt(r,!0,h,null,T,g);break;case"together":Wt(r,!1,null,null,void 0,g);break;default:r.memoizedState=null}return r.child}function ei(l,r,h){if(l!==null&&(r.dependencies=l.dependencies),_r|=r.lanes,(h&r.childLanes)===0)if(l!==null){if(di(l,r,h,!1),(h&r.childLanes)===0)return null}else return null;if(l!==null&&r.child!==l.child)throw Error(u(153));if(r.child!==null){for(l=r.child,h=Ps(l,l.pendingProps),r.child=h,h.return=r;l.sibling!==null;)l=l.sibling,h=h.sibling=Ps(l,l.pendingProps),h.return=r;h.sibling=null}return r.child}function yu(l,r){return(l.lanes&r)!==0?!0:(l=l.dependencies,!!(l!==null&&Ii(l)))}function vn(l,r,h){switch(r.tag){case 3:Bt(r,r.stateNode.containerInfo),da(r,hn,l.memoizedState.cache),Gt();break;case 27:case 5:se(r);break;case 4:Bt(r,r.stateNode.containerInfo);break;case 10:da(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,ru(r),null;break;case 13:var g=r.memoizedState;if(g!==null)return g.dehydrated!==null?(bl(r),r.flags|=128,null):(h&r.child.childLanes)!==0?Jh(l,r,h):(bl(r),l=ei(l,r,h),l!==null?l.sibling:null);bl(r);break;case 19:var E=(l.flags&128)!==0;if(g=(h&r.childLanes)!==0,g||(di(l,r,h,!1),g=(h&r.childLanes)!==0),E){if(g)return bt(l,r,h);r.flags|=128}if(E=r.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),A(wn,wn.current),g)break;return null;case 22:return r.lanes=0,Dl(l,r,h,r.pendingProps);case 24:da(r,hn,l.memoizedState.cache)}return ei(l,r,h)}function kh(l,r,h){if(l!==null)if(l.memoizedProps!==r.pendingProps)qn=!0;else{if(!yu(l,h)&&(r.flags&128)===0)return qn=!1,vn(l,r,h);qn=(l.flags&131072)!==0}else qn=!1,ue&&(r.flags&1048576)!==0&&$(r,st,r.index);switch(r.lanes=0,r.tag){case 16:t:{var g=r.pendingProps;if(l=Wa(r.elementType),r.type=l,typeof l=="function")cf(l)?(g=Bs(l,g),r.tag=1,r=k0(null,r,l,g,h)):(r.tag=0,r=J0(null,r,l,g,h));else{if(l!=null){var E=l.$$typeof;if(E===_u){r.tag=11,r=Zc(null,r,l,g,h);break t}else if(E===vm){r.tag=14,r=Kh(null,r,l,g,h);break t}}throw r=_(l)||l,Error(u(306,r,""))}}return r;case 0:return J0(l,r,r.type,r.pendingProps,h);case 1:return g=r.type,E=Bs(g,r.pendingProps),k0(l,r,g,E,h);case 3:t:{if(Bt(r,r.stateNode.containerInfo),l===null)throw Error(u(387));var T=r.pendingProps;E=r.memoizedState,g=E.element,Wr(l,r),$r(r,T,null,h);var z=r.memoizedState;if(T=z.cache,da(r,hn,T),T!==E.cache&&Ms(r,[hn],h,!0),lu(),T=z.element,ya&&E.isDehydrated)if(E={element:T,isDehydrated:!1,cache:z.cache},r.updateQueue.baseState=E,r.memoizedState=E,r.flags&256){r=Zh(l,r,T,h);break t}else if(T!==g){g=pt(Error(u(424)),r),$e(g),r=Zh(l,r,T,h);break t}else for(ya&&(nn=zd(r.stateNode.containerInfo),kn=r,ue=!0,jl=null,Li=!0),h=zy(r,null,T,h),r.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(Gt(),T===g){r=ei(l,r,h);break t}aa(l,r,T,h)}r=r.child}return r;case 26:if(Vi)return Fc(l,r),l===null?(h=Nu(r.type,null,r.pendingProps,null))?r.memoizedState=h:ue||(r.stateNode=Dy(r.type,r.pendingProps,Sr.current,r)):r.memoizedState=Nu(r.type,l.memoizedProps,r.pendingProps,l.memoizedState),null;case 27:if(Ln)return se(r),l===null&&Ln&&ue&&(g=r.stateNode=Vd(r.type,r.pendingProps,Sr.current,ba.current,!1),kn=r,Li=!0,nn=r3(r.type,g,nn)),aa(l,r,r.pendingProps.children,h),Fc(l,r),l===null&&(r.flags|=4194304),r.child;case 5:return l===null&&ue&&(h3(r.type,r.pendingProps,ba.current),(E=g=nn)&&(g=o3(g,r.type,r.pendingProps,Li),g!==null?(r.stateNode=g,kn=r,nn=Rd(g),Li=!1,E=!0):E=!1),E||yn(r)),se(r),E=r.type,T=r.pendingProps,z=l!==null?l.memoizedProps:null,g=T.children,vf(E,T)?g=null:z!==null&&vf(E,z)&&(r.flags|=32),r.memoizedState!==null&&(E=Hc(l,r,wh,null,null,h),Bi?yr._currentValue=E:yr._currentValue2=E),Fc(l,r),aa(l,r,g,h),r.child;case 6:return l===null&&ue&&(Hm(r.pendingProps,ba.current),(l=h=nn)&&(h=dy(h,r.pendingProps,Li),h!==null?(r.stateNode=h,kn=r,nn=null,l=!0):l=!1),l||yn(r)),null;case 13:return Jh(l,r,h);case 4:return Bt(r,r.stateNode.containerInfo),g=r.pendingProps,l===null?r.child=Eo(r,null,g,h):aa(l,r,g,h),r.child;case 11:return Zc(l,r,r.type,r.pendingProps,h);case 7:return aa(l,r,r.pendingProps,h),r.child;case 8:return aa(l,r,r.pendingProps.children,h),r.child;case 12:return aa(l,r,r.pendingProps.children,h),r.child;case 10:return g=r.pendingProps,da(r,r.type,g.value),aa(l,r,g.children,h),r.child;case 9:return E=r.type._context,g=r.pendingProps.children,jn(r),E=Mn(E),g=g(E),r.flags|=1,aa(l,r,g,h),r.child;case 14:return Kh(l,r,r.type,r.pendingProps,h);case 15:return Qh(l,r,r.type,r.pendingProps,h);case 19:return bt(l,r,h);case 31:return Jc(l,r,h);case 22:return Dl(l,r,h,r.pendingProps);case 24:return jn(r),g=Mn(hn),l===null?(E=ar(),E===null&&(E=qe,T=De(),E.pooledCache=T,T.refCount++,T!==null&&(E.pooledCacheLanes|=h),E=T),r.memoizedState={parent:g,cache:E},Oc(r),da(r,hn,E)):((l.lanes&h)!==0&&(Wr(l,r),$r(r,null,null,h),lu()),E=l.memoizedState,T=r.memoizedState,E.parent!==g?(E={parent:g,cache:g},r.memoizedState=E,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=E),da(r,hn,g)):(g=T.cache,da(r,hn,g),g!==E.cache&&Ms(r,[hn],h,!0))),aa(l,r,r.pendingProps.children,h),r.child;case 29:throw r.pendingProps}throw Error(u(156,r.tag))}function yi(l){l.flags|=4}function Wc(l){fs&&(l.flags|=8)}function Ih(l,r){if(l!==null&&l.child===r.child)return!1;if((r.flags&16)!==0)return!0;for(l=r.child;l!==null;){if((l.flags&8218)!==0||(l.subtreeFlags&8218)!==0)return!0;l=l.sibling}return!1}function I0(l,r,h,g){if(Ma)for(h=r.child;h!==null;){if(h.tag===5||h.tag===6)Dd(l,h.stateNode);else if(!(h.tag===4||Ln&&h.tag===27)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===r)break;for(;h.sibling===null;){if(h.return===null||h.return===r)return;h=h.return}h.sibling.return=h.return,h=h.sibling}else if(fs)for(var E=r.child;E!==null;){if(E.tag===5){var T=E.stateNode;h&&g&&(T=wl(T,E.type,E.memoizedProps)),Dd(l,T)}else if(E.tag===6)T=E.stateNode,h&&g&&(T=Ef(T,E.memoizedProps)),Dd(l,T);else if(E.tag!==4){if(E.tag===22&&E.memoizedState!==null)T=E.child,T!==null&&(T.return=E),I0(l,E,!0,!0);else if(E.child!==null){E.child.return=E,E=E.child;continue}}if(E===r)break;for(;E.sibling===null;){if(E.return===null||E.return===r)return;E=E.return}E.sibling.return=E.return,E=E.sibling}}function Wh(l,r,h,g){var E=!1;if(fs)for(var T=r.child;T!==null;){if(T.tag===5){var z=T.stateNode;h&&g&&(z=wl(z,T.type,T.memoizedProps)),Mm(l,z)}else if(T.tag===6)z=T.stateNode,h&&g&&(z=Ef(z,T.memoizedProps)),Mm(l,z);else if(T.tag!==4){if(T.tag===22&&T.memoizedState!==null)E=T.child,E!==null&&(E.return=T),Wh(l,T,!0,!0),E=!0;else if(T.child!==null){T.child.return=T,T=T.child;continue}}if(T===r)break;for(;T.sibling===null;){if(T.return===null||T.return===r)return E;T=T.return}T.sibling.return=T.return,T=T.sibling}return E}function $h(l,r){if(fs&&Ih(l,r)){l=r.stateNode;var h=l.containerInfo,g=en();Wh(g,r,!1,!1),l.pendingChildren=g,yi(r),ry(h,g)}}function $c(l,r,h,g){if(Ma)l.memoizedProps!==g&&yi(r);else if(fs){var E=l.stateNode,T=l.memoizedProps;if((l=Ih(l,r))||T!==g){var z=ba.current;T=ly(E,h,T,g,!l,null),T===E?r.stateNode=E:(Wc(r),qg(T,h,g,z)&&yi(r),r.stateNode=T,l&&I0(T,r,!1,!1))}else r.stateNode=E}}function ga(l,r,h,g,E){if((l.mode&32)!==0&&(h===null?Zg(r,g):s3(r,h,g))){if(l.flags|=16777216,(E&335544128)===E||xu(r,g))if(va(l.stateNode,r,g))l.flags|=8192;else if(Bg())l.flags|=8192;else throw Pi=Zd,Kd}else l.flags&=-16777217}function Ne(l,r){if(d3(r)){if(l.flags|=16777216,!Bd(r))if(Bg())l.flags|=8192;else throw Pi=Zd,Kd}else l.flags&=-16777217}function io(l,r){r!==null&&(l.flags|=4),l.flags&16384&&(r=l.tag!==22?G():536870912,l.lanes|=r,Yu|=r)}function Al(l,r){if(!ue)switch(l.tailMode){case"hidden":r=l.tail;for(var h=null;r!==null;)r.alternate!==null&&(h=r),r=r.sibling;h===null?l.tail=null:h.sibling=null;break;case"collapsed":h=l.tail;for(var g=null;h!==null;)h.alternate!==null&&(g=h),h=h.sibling;g===null?r||l.tail===null?l.tail=null:l.tail.sibling=null:g.sibling=null}}function Ae(l){var r=l.alternate!==null&&l.alternate.child===l.child,h=0,g=0;if(r)for(var E=l.child;E!==null;)h|=E.lanes|E.childLanes,g|=E.subtreeFlags&65011712,g|=E.flags&65011712,E.return=l,E=E.sibling;else for(E=l.child;E!==null;)h|=E.lanes|E.childLanes,g|=E.subtreeFlags,g|=E.flags,E.return=l,E=E.sibling;return l.subtreeFlags|=g,l.childLanes=h,r}function so(l,r,h){var g=r.pendingProps;switch(Rt(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ae(r),null;case 1:return Ae(r),null;case 3:return h=r.stateNode,g=null,l!==null&&(g=l.memoizedState.cache),r.memoizedState.cache!==g&&(r.flags|=2048),cn(hn),Vt(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(l===null||l.child===null)&&(Jn(r)?yi(r):l===null||l.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,xe())),$h(l,r),Ae(r),null;case 26:if(Vi){var E=r.type,T=r.memoizedState;return l===null?(yi(r),T!==null?(Ae(r),Ne(r,T)):(Ae(r),ga(r,E,null,g,h))):T?T!==l.memoizedState?(yi(r),Ae(r),Ne(r,T)):(Ae(r),r.flags&=-16777217):(T=l.memoizedProps,Ma?T!==g&&yi(r):$c(l,r,E,g),Ae(r),ga(r,E,T,g,h)),null}case 27:if(Ln){if(Ke(r),h=Sr.current,E=r.type,l!==null&&r.stateNode!=null)Ma?l.memoizedProps!==g&&yi(r):$c(l,r,E,g);else{if(!g){if(r.stateNode===null)throw Error(u(166));return Ae(r),null}l=ba.current,Jn(r)?Oe(r,l):(l=Vd(E,g,h,l,!0),r.stateNode=l,yi(r))}return Ae(r),null}case 5:if(Ke(r),E=r.type,l!==null&&r.stateNode!=null)$c(l,r,E,g);else{if(!g){if(r.stateNode===null)throw Error(u(166));return Ae(r),null}if(T=ba.current,Jn(r))Oe(r,T),by(r.stateNode,E,g,T)&&(r.flags|=64);else{var z=qs(E,g,Sr.current,T,r);Wc(r),I0(z,r,!1,!1),r.stateNode=z,qg(z,E,g,T)&&yi(r)}}return Ae(r),ga(r,r.type,l===null?null:l.memoizedProps,r.pendingProps,h),null;case 6:if(l&&r.stateNode!=null)h=l.memoizedProps,Ma?h!==g&&yi(r):fs&&(h!==g?(l=Sr.current,h=ba.current,Wc(r),r.stateNode=Ad(g,l,h,r)):r.stateNode=l.stateNode);else{if(typeof g!="string"&&r.stateNode===null)throw Error(u(166));if(l=Sr.current,h=ba.current,Jn(r)){if(!ya)throw Error(u(176));if(l=r.stateNode,h=r.memoizedProps,g=null,E=kn,E!==null)switch(E.tag){case 27:case 5:g=E.memoizedProps}Hd(l,h,r,g)||yn(r,!0)}else Wc(r),r.stateNode=Ad(g,l,h,r)}return Ae(r),null;case 31:if(h=r.memoizedState,l===null||l.memoizedState!==null){if(g=Jn(r),h!==null){if(l===null){if(!g)throw Error(u(318));if(!ya)throw Error(u(556));if(l=r.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(u(557));my(l,r)}else Gt(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ae(r),l=!1}else h=xe(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=h),l=!0;if(!l)return r.flags&256?($a(r),r):($a(r),null);if((r.flags&128)!==0)throw Error(u(558))}return Ae(r),null;case 13:if(g=r.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(E=Jn(r),g!==null&&g.dehydrated!==null){if(l===null){if(!E)throw Error(u(318));if(!ya)throw Error(u(344));if(E=r.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(u(317));Rm(E,r)}else Gt(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ae(r),E=!1}else E=xe(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=E),E=!0;if(!E)return r.flags&256?($a(r),r):($a(r),null)}return $a(r),(r.flags&128)!==0?(r.lanes=h,r):(h=g!==null,l=l!==null&&l.memoizedState!==null,h&&(g=r.child,E=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(E=g.alternate.memoizedState.cachePool.pool),T=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(T=g.memoizedState.cachePool.pool),T!==E&&(g.flags|=2048)),h!==l&&h&&(r.child.flags|=8192),io(r,r.updateQueue),Ae(r),null);case 4:return Vt(),$h(l,r),l===null&&i3(r.stateNode.containerInfo),Ae(r),null;case 10:return cn(r.type),Ae(r),null;case 19:if(D(wn),g=r.memoizedState,g===null)return Ae(r),null;if(E=(r.flags&128)!==0,T=g.rendering,T===null)if(E)Al(g,!1);else{if(Sn!==0||l!==null&&(l.flags&128)!==0)for(l=r.child;l!==null;){if(T=Tl(l),T!==null){for(r.flags|=128,Al(g,!1),l=T.updateQueue,r.updateQueue=l,io(r,l),r.subtreeFlags=0,l=h,h=r.child;h!==null;)dm(h,l),h=h.sibling;return A(wn,wn.current&1|2),ue&&dt(r,g.treeForkCount),r.child}l=l.sibling}g.tail!==null&&Re()>qu&&(r.flags|=128,E=!0,Al(g,!1),r.lanes=4194304)}else{if(!E)if(l=Tl(T),l!==null){if(r.flags|=128,E=!0,l=l.updateQueue,r.updateQueue=l,io(r,l),Al(g,!0),g.tail===null&&g.tailMode==="hidden"&&!T.alternate&&!ue)return Ae(r),null}else 2*Re()-g.renderingStartTime>qu&&h!==536870912&&(r.flags|=128,E=!0,Al(g,!1),r.lanes=4194304);g.isBackwards?(T.sibling=r.child,r.child=T):(l=g.last,l!==null?l.sibling=T:r.child=T,g.last=T)}return g.tail!==null?(l=g.tail,g.rendering=l,g.tail=l.sibling,g.renderingStartTime=Re(),l.sibling=null,h=wn.current,A(wn,E?h&1|2:h&1),ue&&dt(r,g.treeForkCount),l):(Ae(r),null);case 22:case 23:return $a(r),Sl(),g=r.memoizedState!==null,l!==null?l.memoizedState!==null!==g&&(r.flags|=8192):g&&(r.flags|=8192),g?(h&536870912)!==0&&(r.flags&128)===0&&(Ae(r),r.subtreeFlags&6&&(r.flags|=8192)):Ae(r),h=r.updateQueue,h!==null&&io(r,h.retryQueue),h=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),g=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(g=r.memoizedState.cachePool.pool),g!==h&&(r.flags|=2048),l!==null&&D(br),null;case 24:return h=null,l!==null&&(h=l.memoizedState.cache),r.memoizedState.cache!==h&&(r.flags|=2048),cn(hn),Ae(r),null;case 25:return null;case 30:return null}throw Error(u(156,r.tag))}function rs(l,r){switch(Rt(r),r.tag){case 1:return l=r.flags,l&65536?(r.flags=l&-65537|128,r):null;case 3:return cn(hn),Vt(),l=r.flags,(l&65536)!==0&&(l&128)===0?(r.flags=l&-65537|128,r):null;case 26:case 27:case 5:return Ke(r),null;case 31:if(r.memoizedState!==null){if($a(r),r.alternate===null)throw Error(u(340));Gt()}return l=r.flags,l&65536?(r.flags=l&-65537|128,r):null;case 13:if($a(r),l=r.memoizedState,l!==null&&l.dehydrated!==null){if(r.alternate===null)throw Error(u(340));Gt()}return l=r.flags,l&65536?(r.flags=l&-65537|128,r):null;case 19:return D(wn),null;case 4:return Vt(),null;case 10:return cn(r.type),null;case 22:case 23:return $a(r),Sl(),l!==null&&D(br),l=r.flags,l&65536?(r.flags=l&-65537|128,r):null;case 24:return cn(hn),null;case 25:return null;default:return null}}function td(l,r){switch(Rt(r),r.tag){case 3:cn(hn),Vt();break;case 26:case 27:case 5:Ke(r);break;case 4:Vt();break;case 31:r.memoizedState!==null&&$a(r);break;case 13:$a(r);break;case 19:D(wn);break;case 10:cn(r.type);break;case 22:case 23:$a(r),Sl(),l!==null&&D(br);break;case 24:cn(hn)}}function Gs(l,r){try{var h=r.updateQueue,g=h!==null?h.lastEffect:null;if(g!==null){var E=g.next;h=E;do{if((h.tag&l)===l){g=void 0;var T=h.create,z=h.inst;g=T(),z.destroy=g}h=h.next}while(h!==E)}}catch(L){Te(r,r.return,L)}}function js(l,r,h){try{var g=r.updateQueue,E=g!==null?g.lastEffect:null;if(E!==null){var T=E.next;g=T;do{if((g.tag&l)===l){var z=g.inst,L=z.destroy;if(L!==void 0){z.destroy=void 0,E=r;var ut=h,vt=L;try{vt()}catch(Dt){Te(E,ut,Dt)}}}g=g.next}while(g!==T)}}catch(Dt){Te(r,r.return,Dt)}}function vu(l){var r=l.updateQueue;if(r!==null){var h=l.stateNode;try{_g(r,h)}catch(g){Te(l,l.return,g)}}}function ed(l,r,h){h.props=Bs(l.type,l.memoizedProps),h.state=l.memoizedState;try{h.componentWillUnmount()}catch(g){Te(l,r,g)}}function or(l,r){try{var h=l.ref;if(h!==null){switch(l.tag){case 26:case 27:case 5:var g=gf(l.stateNode);break;case 30:g=l.stateNode;break;default:g=l.stateNode}typeof h=="function"?l.refCleanup=h(g):h.current=g}}catch(E){Te(l,r,E)}}function os(l,r){var h=l.ref,g=l.refCleanup;if(h!==null)if(typeof g=="function")try{g()}catch(E){Te(l,r,E)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(E){Te(l,r,E)}else h.current=null}function W0(l){var r=l.type,h=l.memoizedProps,g=l.stateNode;try{ey(g,r,h,l)}catch(E){Te(l,l.return,E)}}function nd(l,r,h){try{Md(l.stateNode,l.type,h,r,l)}catch(g){Te(l,l.return,g)}}function $0(l){return l.tag===5||l.tag===3||(Vi?l.tag===26:!1)||(Ln?l.tag===27&&go(l.type):!1)||l.tag===4}function ad(l){t:for(;;){for(;l.sibling===null;){if(l.return===null||$0(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(Ln&&l.tag===27&&go(l.type)||l.flags&2||l.child===null||l.tag===4)continue t;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function tf(l,r,h){var g=l.tag;if(g===5||g===6)l=l.stateNode,r?ay(h,l,r):ty(h,l);else if(g!==4&&(Ln&&g===27&&go(l.type)&&(h=l.stateNode,r=null),l=l.child,l!==null))for(tf(l,r,h),l=l.sibling;l!==null;)tf(l,r,h),l=l.sibling}function Su(l,r,h){var g=l.tag;if(g===5||g===6)l=l.stateNode,r?ny(h,l,r):$g(h,l);else if(g!==4&&(Ln&&g===27&&go(l.type)&&(h=l.stateNode),l=l.child,l!==null))for(Su(l,r,h),l=l.sibling;l!==null;)Su(l,r,h),l=l.sibling}function id(l,r,h){l=l.containerInfo;try{oy(l,h)}catch(g){Te(r,r.return,g)}}function tm(l){var r=l.stateNode,h=l.memoizedProps;try{Gd(l.type,h,r,l)}catch(g){Te(l,l.return,g)}}function Ng(l,r){for(a3(l.containerInfo),ia=r;ia!==null;)if(l=ia,r=l.child,(l.subtreeFlags&1028)!==0&&r!==null)r.return=l,ia=r;else for(;ia!==null;){l=ia;var h=l.alternate;switch(r=l.flags,l.tag){case 0:if((r&4)!==0&&(r=l.updateQueue,r=r!==null?r.events:null,r!==null))for(var g=0;g<r.length;g++){var E=r[g];E.ref.impl=E.nextImpl}break;case 11:case 15:break;case 1:if((r&1024)!==0&&h!==null){r=void 0,g=l,E=h.memoizedProps,h=h.memoizedState;var T=g.stateNode;try{var z=Bs(g.type,E);r=T.getSnapshotBeforeUpdate(z,h),T.__reactInternalSnapshotBeforeUpdate=r}catch(L){Te(g,g.return,L)}}break;case 3:(r&1024)!==0&&Ma&&Si(l.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(u(163))}if(r=l.sibling,r!==null){r.return=l.return,ia=r;break}ia=l.return}}function em(l,r,h){var g=h.flags;switch(h.tag){case 0:case 11:case 15:wi(l,h),g&4&&Gs(5,h);break;case 1:if(wi(l,h),g&4)if(l=h.stateNode,r===null)try{l.componentDidMount()}catch(z){Te(h,h.return,z)}else{var E=Bs(h.type,r.memoizedProps);r=r.memoizedState;try{l.componentDidUpdate(E,r,l.__reactInternalSnapshotBeforeUpdate)}catch(z){Te(h,h.return,z)}}g&64&&vu(h),g&512&&or(h,h.return);break;case 3:if(wi(l,h),g&64&&(g=h.updateQueue,g!==null)){if(l=null,h.child!==null)switch(h.child.tag){case 27:case 5:l=gf(h.child.stateNode);break;case 1:l=h.child.stateNode}try{_g(g,l)}catch(z){Te(h,h.return,z)}}break;case 27:Ln&&r===null&&g&4&&tm(h);case 26:case 5:if(wi(l,h),r===null){if(g&4)W0(h);else if(g&64){l=h.type,r=h.memoizedProps,E=h.stateNode;try{vy(E,l,r,h)}catch(z){Te(h,h.return,z)}}}g&512&&or(h,h.return);break;case 12:wi(l,h);break;case 31:wi(l,h),g&4&&nm(l,h);break;case 13:wi(l,h),g&4&&ld(l,h),g&64&&(g=h.memoizedState,g!==null&&(g=g.dehydrated,g!==null&&(h=yd.bind(null,h),Du(g,h))));break;case 22:if(g=h.memoizedState!==null||Is,!g){r=r!==null&&r.memoizedState!==null||Un,E=Is;var T=Un;Is=g,(Un=r)&&!T?us(l,h,(h.subtreeFlags&8772)!==0):wi(l,h),Is=E,Un=T}break;case 30:break;default:wi(l,h)}}function Og(l){var r=l.alternate;r!==null&&(l.alternate=null,Og(r)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(r=l.stateNode,r!==null&&Qg(r)),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function Hi(l,r,h){for(h=h.child;h!==null;)sd(l,r,h),h=h.sibling}function sd(l,r,h){if(zn&&typeof zn.onCommitFiberUnmount=="function")try{zn.onCommitFiberUnmount(vo,h)}catch{}switch(h.tag){case 26:if(Vi){Un||os(h,r),Hi(l,r,h),h.memoizedState?xy(h.memoizedState):h.stateNode&&Um(h.stateNode);break}case 27:if(Ln){Un||os(h,r);var g=Xn,E=oi;go(h.type)&&(Xn=h.stateNode,oi=!1),Hi(l,r,h),vr(h.stateNode),Xn=g,oi=E;break}case 5:Un||os(h,r);case 6:if(Ma){if(g=Xn,E=oi,Xn=null,Hi(l,r,h),Xn=g,oi=E,Xn!==null)if(oi)try{Am(Xn,h.stateNode)}catch(T){Te(h,r,T)}else try{Dm(Xn,h.stateNode)}catch(T){Te(h,r,T)}}else Hi(l,r,h);break;case 18:Ma&&Xn!==null&&(oi?zm(Xn,h.stateNode):Ce(Xn,h.stateNode));break;case 4:Ma?(g=Xn,E=oi,Xn=h.stateNode.containerInfo,oi=!0,Hi(l,r,h),Xn=g,oi=E):(fs&&id(h.stateNode,h,en()),Hi(l,r,h));break;case 0:case 11:case 14:case 15:js(2,h,r),Un||js(4,h,r),Hi(l,r,h);break;case 1:Un||(os(h,r),g=h.stateNode,typeof g.componentWillUnmount=="function"&&ed(h,r,g)),Hi(l,r,h);break;case 21:Hi(l,r,h);break;case 22:Un=(g=Un)||h.memoizedState!==null,Hi(l,r,h),Un=g;break;default:Hi(l,r,h)}}function nm(l,r){if(ya&&r.memoizedState===null&&(l=r.alternate,l!==null&&(l=l.memoizedState,l!==null))){l=l.dehydrated;try{Sy(l)}catch(h){Te(r,r.return,h)}}}function ld(l,r){if(ya&&r.memoizedState===null&&(l=r.alternate,l!==null&&(l=l.memoizedState,l!==null&&(l=l.dehydrated,l!==null))))try{Mu(l)}catch(h){Te(r,r.return,h)}}function Rg(l){switch(l.tag){case 31:case 13:case 19:var r=l.stateNode;return r===null&&(r=l.stateNode=new tp),r;case 22:return l=l.stateNode,r=l._retryCache,r===null&&(r=l._retryCache=new tp),r;default:throw Error(u(435,l.tag))}}function ef(l,r){var h=Rg(l);r.forEach(function(g){if(!h.has(g)){h.add(g);var E=Lg.bind(null,l,g);g.then(E,E)}})}function On(l,r){var h=r.deletions;if(h!==null)for(var g=0;g<h.length;g++){var E=h[g],T=l,z=r;if(Ma){var L=z;t:for(;L!==null;){switch(L.tag){case 27:if(Ln){if(go(L.type)){Xn=L.stateNode,oi=!1;break t}break}case 5:Xn=L.stateNode,oi=!1;break t;case 3:case 4:Xn=L.stateNode.containerInfo,oi=!0;break t}L=L.return}if(Xn===null)throw Error(u(160));sd(T,z,E),Xn=null,oi=!1}else sd(T,z,E);T=E.alternate,T!==null&&(T.return=null),E.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)nf(r,l),r=r.sibling}function nf(l,r){var h=l.alternate,g=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:On(r,l),Da(l),g&4&&(js(3,l,l.return),Gs(3,l),js(5,l,l.return));break;case 1:On(r,l),Da(l),g&512&&(Un||h===null||os(h,h.return)),g&64&&Is&&(l=l.updateQueue,l!==null&&(g=l.callbacks,g!==null&&(h=l.shared.hiddenCallbacks,l.shared.hiddenCallbacks=h===null?g:h.concat(g))));break;case 26:if(Vi){var E=gs;if(On(r,l),Da(l),g&512&&(Un||h===null||os(h,h.return)),g&4){g=h!==null?h.memoizedState:null;var T=l.memoizedState;h===null?T===null?l.stateNode===null?l.stateNode=mo(E,l.type,l.memoizedProps,l):Ud(E,l.type,l.stateNode):l.stateNode=_y(E,T,l.memoizedProps):g!==T?(g===null?h.stateNode!==null&&Um(h.stateNode):xy(g),T===null?Ud(E,l.type,l.stateNode):_y(E,T,l.memoizedProps)):T===null&&l.stateNode!==null&&nd(l,l.memoizedProps,h.memoizedProps)}break}case 27:if(Ln){On(r,l),Da(l),g&512&&(Un||h===null||os(h,h.return)),h!==null&&g&4&&nd(l,l.memoizedProps,h.memoizedProps);break}case 5:if(On(r,l),Da(l),g&512&&(Un||h===null||os(h,h.return)),Ma){if(l.flags&32){E=l.stateNode;try{Nd(E)}catch(_t){Te(l,l.return,_t)}}g&4&&l.stateNode!=null&&(E=l.memoizedProps,nd(l,E,h!==null?h.memoizedProps:E)),g&1024&&(zf=!0)}else fs&&l.alternate!==null&&(l.alternate.stateNode=l.stateNode);break;case 6:if(On(r,l),Da(l),g&4&&Ma){if(l.stateNode===null)throw Error(u(162));g=l.memoizedProps,h=h!==null?h.memoizedProps:g,E=l.stateNode;try{bf(E,h,g)}catch(_t){Te(l,l.return,_t)}}break;case 3:if(Vi?(Ay(),E=gs,gs=wd(r.containerInfo),On(r,l),gs=E):On(r,l),Da(l),g&4){if(Ma&&ya&&h!==null&&h.memoizedState.isDehydrated)try{c3(r.containerInfo)}catch(_t){Te(l,l.return,_t)}if(fs){g=r.containerInfo,h=r.pendingChildren;try{oy(g,h)}catch(_t){Te(l,l.return,_t)}}}zf&&(zf=!1,zg(l));break;case 4:Vi?(h=gs,gs=wd(l.stateNode.containerInfo),On(r,l),Da(l),gs=h):(On(r,l),Da(l)),g&4&&fs&&id(l.stateNode,l,l.stateNode.pendingChildren);break;case 12:On(r,l),Da(l);break;case 31:On(r,l),Da(l),g&4&&(g=l.updateQueue,g!==null&&(l.updateQueue=null,ef(l,g)));break;case 13:On(r,l),Da(l),l.child.flags&8192&&l.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(Uf=Re()),g&4&&(g=l.updateQueue,g!==null&&(l.updateQueue=null,ef(l,g)));break;case 22:E=l.memoizedState!==null;var z=h!==null&&h.memoizedState!==null,L=Is,ut=Un;if(Is=L||E,Un=ut||z,On(r,l),Un=ut,Is=L,Da(l),g&8192&&(r=l.stateNode,r._visibility=E?r._visibility&-2:r._visibility|1,E&&(h===null||z||Is||Un||Ui(l)),Ma)){t:if(h=null,Ma)for(r=l;;){if(r.tag===5||Vi&&r.tag===26){if(h===null){z=h=r;try{T=z.stateNode,E?iy(T):l3(z.stateNode,z.memoizedProps)}catch(_t){Te(z,z.return,_t)}}}else if(r.tag===6){if(h===null){z=r;try{var vt=z.stateNode;E?Od(vt):sy(vt,z.memoizedProps)}catch(_t){Te(z,z.return,_t)}}}else if(r.tag===18){if(h===null){z=r;try{var Dt=z.stateNode;E?f3(Dt):Ty(z.stateNode)}catch(_t){Te(z,z.return,_t)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===l)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===l)break t;for(;r.sibling===null;){if(r.return===null||r.return===l)break t;h===r&&(h=null),r=r.return}h===r&&(h=null),r.sibling.return=r.return,r=r.sibling}}g&4&&(g=l.updateQueue,g!==null&&(h=g.retryQueue,h!==null&&(g.retryQueue=null,ef(l,h))));break;case 19:On(r,l),Da(l),g&4&&(g=l.updateQueue,g!==null&&(l.updateQueue=null,ef(l,g)));break;case 30:break;case 21:break;default:On(r,l),Da(l)}}function Da(l){var r=l.flags;if(r&2){try{for(var h,g=l.return;g!==null;){if($0(g)){h=g;break}g=g.return}if(Ma){if(h==null)throw Error(u(160));switch(h.tag){case 27:if(Ln){var E=h.stateNode,T=ad(l);Su(l,T,E);break}case 5:var z=h.stateNode;h.flags&32&&(Nd(z),h.flags&=-33);var L=ad(l);Su(l,L,z);break;case 3:case 4:var ut=h.stateNode.containerInfo,vt=ad(l);tf(l,vt,ut);break;default:throw Error(u(161))}}}catch(Dt){Te(l,l.return,Dt)}l.flags&=-3}r&4096&&(l.flags&=-4097)}function zg(l){if(l.subtreeFlags&1024)for(l=l.child;l!==null;){var r=l;zg(r),r.tag===5&&r.flags&1024&&co(r.stateNode),l=l.sibling}}function wi(l,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)em(l,r.alternate,r),r=r.sibling}function Ui(l){for(l=l.child;l!==null;){var r=l;switch(r.tag){case 0:case 11:case 14:case 15:js(4,r,r.return),Ui(r);break;case 1:os(r,r.return);var h=r.stateNode;typeof h.componentWillUnmount=="function"&&ed(r,r.return,h),Ui(r);break;case 27:Ln&&vr(r.stateNode);case 26:case 5:os(r,r.return),Ui(r);break;case 22:r.memoizedState===null&&Ui(r);break;case 30:Ui(r);break;default:Ui(r)}l=l.sibling}}function us(l,r,h){for(h=h&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var g=r.alternate,E=l,T=r,z=T.flags;switch(T.tag){case 0:case 11:case 15:us(E,T,h),Gs(4,T);break;case 1:if(us(E,T,h),g=T,E=g.stateNode,typeof E.componentDidMount=="function")try{E.componentDidMount()}catch(vt){Te(g,g.return,vt)}if(g=T,E=g.updateQueue,E!==null){var L=g.stateNode;try{var ut=E.shared.hiddenCallbacks;if(ut!==null)for(E.shared.hiddenCallbacks=null,E=0;E<ut.length;E++)U0(ut[E],L)}catch(vt){Te(g,g.return,vt)}}h&&z&64&&vu(T),or(T,T.return);break;case 27:Ln&&tm(T);case 26:case 5:us(E,T,h),h&&g===null&&z&4&&W0(T),or(T,T.return);break;case 12:us(E,T,h);break;case 31:us(E,T,h),h&&z&4&&nm(E,T);break;case 13:us(E,T,h),h&&z&4&&ld(E,T);break;case 22:T.memoizedState===null&&us(E,T,h),or(T,T.return);break;case 30:break;default:us(E,T,h)}r=r.sibling}}function Ml(l,r){var h=null;l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),l=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),l!==h&&(l!=null&&l.refCount++,h!=null&&na(h))}function Aa(l,r){l=null,r.alternate!==null&&(l=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==l&&(r.refCount++,l!=null&&na(l))}function ni(l,r,h,g){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Hg(l,r,h,g),r=r.sibling}function Hg(l,r,h,g){var E=r.flags;switch(r.tag){case 0:case 11:case 15:ni(l,r,h,g),E&2048&&Gs(9,r);break;case 1:ni(l,r,h,g);break;case 3:ni(l,r,h,g),E&2048&&(l=null,r.alternate!==null&&(l=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==l&&(r.refCount++,l!=null&&na(l)));break;case 12:if(E&2048){ni(l,r,h,g),l=r.stateNode;try{var T=r.memoizedProps,z=T.id,L=T.onPostCommit;typeof L=="function"&&L(z,r.alternate===null?"mount":"update",l.passiveEffectDuration,-0)}catch(ut){Te(r,r.return,ut)}}else ni(l,r,h,g);break;case 31:ni(l,r,h,g);break;case 13:ni(l,r,h,g);break;case 23:break;case 22:T=r.stateNode,z=r.alternate,r.memoizedState!==null?T._visibility&2?ni(l,r,h,g):cr(l,r):T._visibility&2?ni(l,r,h,g):(T._visibility|=2,ur(l,r,h,g,(r.subtreeFlags&10256)!==0||!1)),E&2048&&Ml(z,r);break;case 24:ni(l,r,h,g),E&2048&&Aa(r.alternate,r);break;default:ni(l,r,h,g)}}function ur(l,r,h,g,E){for(E=E&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var T=l,z=r,L=h,ut=g,vt=z.flags;switch(z.tag){case 0:case 11:case 15:ur(T,z,L,ut,E),Gs(8,z);break;case 23:break;case 22:var Dt=z.stateNode;z.memoizedState!==null?Dt._visibility&2?ur(T,z,L,ut,E):cr(T,z):(Dt._visibility|=2,ur(T,z,L,ut,E)),E&&vt&2048&&Ml(z.alternate,z);break;case 24:ur(T,z,L,ut,E),E&&vt&2048&&Aa(z.alternate,z);break;default:ur(T,z,L,ut,E)}r=r.sibling}}function cr(l,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var h=l,g=r,E=g.flags;switch(g.tag){case 22:cr(h,g),E&2048&&Ml(g.alternate,g);break;case 24:cr(h,g),E&2048&&Aa(g.alternate,g);break;default:cr(h,g)}r=r.sibling}}function Nl(l,r,h){if(l.subtreeFlags&Tr)for(l=l.child;l!==null;)am(l,r,h),l=l.sibling}function am(l,r,h){switch(l.tag){case 26:if(Nl(l,r,h),l.flags&Tr)if(l.memoizedState!==null)Ul(h,gs,l.memoizedState,l.memoizedProps);else{var g=l.stateNode,E=l.type;l=l.memoizedProps,((r&335544128)===r||xu(E,l))&&Na(h,g,E,l)}break;case 5:Nl(l,r,h),l.flags&Tr&&(g=l.stateNode,E=l.type,l=l.memoizedProps,((r&335544128)===r||xu(E,l))&&Na(h,g,E,l));break;case 3:case 4:Vi?(g=gs,gs=wd(l.stateNode.containerInfo),Nl(l,r,h),gs=g):Nl(l,r,h);break;case 22:l.memoizedState===null&&(g=l.alternate,g!==null&&g.memoizedState!==null?(g=Tr,Tr=16777216,Nl(l,r,h),Tr=g):Nl(l,r,h));break;default:Nl(l,r,h)}}function rd(l){var r=l.alternate;if(r!==null&&(l=r.child,l!==null)){r.child=null;do r=l.sibling,l.sibling=null,l=r;while(l!==null)}}function fr(l){var r=l.deletions;if((l.flags&16)!==0){if(r!==null)for(var h=0;h<r.length;h++){var g=r[h];ia=g,ud(g,l)}rd(l)}if(l.subtreeFlags&10256)for(l=l.child;l!==null;)od(l),l=l.sibling}function od(l){switch(l.tag){case 0:case 11:case 15:fr(l),l.flags&2048&&js(9,l,l.return);break;case 3:fr(l);break;case 12:fr(l);break;case 22:var r=l.stateNode;l.memoizedState!==null&&r._visibility&2&&(l.return===null||l.return.tag!==13)?(r._visibility&=-3,lo(l)):fr(l);break;default:fr(l)}}function lo(l){var r=l.deletions;if((l.flags&16)!==0){if(r!==null)for(var h=0;h<r.length;h++){var g=r[h];ia=g,ud(g,l)}rd(l)}for(l=l.child;l!==null;){switch(r=l,r.tag){case 0:case 11:case 15:js(8,r,r.return),lo(r);break;case 22:h=r.stateNode,h._visibility&2&&(h._visibility&=-3,lo(r));break;default:lo(r)}l=l.sibling}}function ud(l,r){for(;ia!==null;){var h=ia;switch(h.tag){case 0:case 11:case 15:js(8,h,r);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var g=h.memoizedState.cachePool.pool;g!=null&&g.refCount++}break;case 24:na(h.memoizedState.cache)}if(g=h.child,g!==null)g.return=h,ia=g;else t:for(h=l;ia!==null;){g=ia;var E=g.sibling,T=g.return;if(Og(g),g===h){ia=null;break t}if(E!==null){E.return=T,ia=E;break t}ia=T}}}function bu(l){var r=Kg(l);if(r!=null){if(typeof r.memoizedProps["data-testname"]!="string")throw Error(u(364));return r}if(l=xm(l),l===null)throw Error(u(362));return l.stateNode.current}function af(l,r){var h=l.tag;switch(r.$$typeof){case ep:if(l.type===r.value)return!0;break;case np:t:{for(r=r.value,l=[l,0],h=0;h<l.length;){var g=l[h++],E=g.tag,T=l[h++],z=r[T];if(E!==5&&E!==26&&E!==27||!Qs(g)){for(;z!=null&&af(g,z);)T++,z=r[T];if(T===r.length){r=!0;break t}else for(g=g.child;g!==null;)l.push(g,T),g=g.sibling}}r=!1}return r;case ap:if((h===5||h===26||h===27)&&Wg(l.stateNode,r.value))return!0;break;case sp:if((h===5||h===6||h===26||h===27)&&(l=Ig(l),l!==null&&0<=l.indexOf(r.value)))return!0;break;case ip:if((h===5||h===26||h===27)&&(l=l.memoizedProps["data-testname"],typeof l=="string"&&l.toLowerCase()===r.value.toLowerCase()))return!0;break;default:throw Error(u(365))}return!1}function cd(l){switch(l.$$typeof){case ep:return"<"+(_(l.value)||"Unknown")+">";case np:return":has("+(cd(l)||"")+")";case ap:return'[role="'+l.value+'"]';case sp:return'"'+l.value+'"';case ip:return'[data-testname="'+l.value+'"]';default:throw Error(u(365))}}function im(l,r){var h=[];l=[l,0];for(var g=0;g<l.length;){var E=l[g++],T=E.tag,z=l[g++],L=r[z];if(T!==5&&T!==26&&T!==27||!Qs(E)){for(;L!=null&&af(E,L);)z++,L=r[z];if(z===r.length)h.push(E);else for(E=E.child;E!==null;)l.push(E,z),E=E.sibling}}return h}function sf(l,r){if(!fo)throw Error(u(363));l=bu(l),l=im(l,r),r=[],l=Array.from(l);for(var h=0;h<l.length;){var g=l[h++],E=g.tag;if(E===5||E===26||E===27)Qs(g)||r.push(g.stateNode);else for(g=g.child;g!==null;)l.push(g),g=g.sibling}return r}function ai(){return(fe&2)!==0&&de!==0?de&-de:Lt.T!==null?Zr():hs()}function lf(){if(Ti===0)if((de&536870912)===0||ue){var l=Df;Df<<=1,(Df&3932160)===0&&(Df=262144),Ti=l}else Ti=536870912;return l=bi.current,l!==null&&(l.flags|=32),Ti}function Pa(l,r,h){(l===qe&&(Be===2||Be===9)||l.cancelPendingCommit!==null)&&(dr(l,0),Ol(l,de,Ti,!1)),et(l,h),((fe&2)===0||l!==qe)&&(l===qe&&((fe&2)===0&&(_o|=h),Sn===4&&Ol(l,de,Ti,!1)),tn(l))}function sm(l,r,h){if((fe&6)!==0)throw Error(u(327));var g=!h&&(r&127)===0&&(r&l.expiredLanes)===0||U(l,r),E=g?Gg(l,r):Cu(l,r,!0),T=g;do{if(E===0){Co&&!g&&Ol(l,r,0,!1);break}else{if(h=l.current.alternate,T&&!wg(h)){E=Cu(l,r,!1),T=!1;continue}if(E===2){if(T=r,l.errorRecoveryDisabledLanes&T)var z=0;else z=l.pendingLanes&-536870913,z=z!==0?z:z&536870912?536870912:0;if(z!==0){r=z;t:{var L=l;E=wf;var ut=ya&&L.current.memoizedState.isDehydrated;if(ut&&(dr(L,z).flags|=256),z=Cu(L,z,!1),z!==2){if(Xm&&!ut){L.errorRecoveryDisabledLanes|=T,_o|=T,E=4;break t}T=ui,ui=E,T!==null&&(ui===null?ui=T:ui.push.apply(ui,T))}E=z}if(T=!1,E!==2)continue}}if(E===1){dr(l,0),Ol(l,r,0,!0);break}t:{switch(g=l,T=E,T){case 0:case 1:throw Error(u(345));case 4:if((r&4194048)!==r)break;case 6:Ol(g,r,Ti,!Cr);break t;case 2:ui=null;break;case 3:case 5:break;default:throw Error(u(329))}if((r&62914560)===r&&(E=Uf+300-Re(),10<E)){if(Ol(g,r,Ti,!Cr),R(g,0,!0)!==0)break t;Ws=r,g.timeoutHandle=Xg(fd.bind(null,g,h,ui,rp,lp,r,Ti,_o,Yu,Cr,T,"Throttled",-0,0),E);break t}fd(g,h,ui,rp,lp,r,Ti,_o,Yu,Cr,T,null,-0,0)}}break}while(!0);tn(l)}function fd(l,r,h,g,E,T,z,L,ut,vt,Dt,_t,Nt,Xt){if(l.timeoutHandle=Hl,_t=r.subtreeFlags,_t&8192||(_t&16785408)===16785408){_t=Jg(),am(r,T,_t);var sn=(T&62914560)===T?Uf-Re():(T&4194048)===T?Qm-Re():0;if(sn=Fg(_t,sn),sn!==null){Ws=T,l.cancelPendingCommit=sn(um.bind(null,l,r,T,h,g,E,z,L,ut,Dt,_t,null,Nt,Xt)),Ol(l,T,z,!vt);return}}um(l,r,T,h,g,E,z,L,ut)}function wg(l){for(var r=l;;){var h=r.tag;if((h===0||h===11||h===15)&&r.flags&16384&&(h=r.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var g=0;g<h.length;g++){var E=h[g],T=E.getSnapshot;E=E.value;try{if(!Sa(T(),E))return!1}catch{return!1}}if(h=r.child,r.subtreeFlags&16384&&h!==null)h.return=r,r=h;else{if(r===l)break;for(;r.sibling===null;){if(r.return===null||r.return===l)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Ol(l,r,h,g){r&=~Km,r&=~_o,l.suspendedLanes|=r,l.pingedLanes&=~r,g&&(l.warmLanes|=r),g=l.expirationTimes;for(var E=r;0<E;){var T=31-ii(E),z=1<<T;g[T]=-1,E&=~z}h!==0&&I(l,h,r)}function hr(){return(fe&6)===0?(Nn(0),!1):!0}function rf(){if(he!==null){if(Be===0)var l=he.return;else l=he,an=Ka=null,wc(l),Yi=null,Of=0,l=he;for(;l!==null;)td(l.alternate,l),l=l.return;he=null}}function dr(l,r){var h=l.timeoutHandle;h!==Hl&&(l.timeoutHandle=Hl,Cm(h)),h=l.cancelPendingCommit,h!==null&&(l.cancelPendingCommit=null,h()),Ws=0,rf(),qe=l,he=h=Ps(l.current,null),de=r,Be=0,Ei=null,Cr=!1,Co=U(l,r),Xm=!1,Yu=Ti=Km=_o=_r=Sn=0,ui=wf=null,lp=!1,(r&8)!==0&&(r|=r&32);var g=l.entangledLanes;if(g!==0)for(l=l.entanglements,g&=r;0<g;){var E=31-ii(g),T=1<<E;r|=l[E],g&=~T}return Pl=r,_a(),h}function Ug(l,r){$t=null,Lt.H=Rf,r===Gu||r===Qd?(r=Nc(),Be=3):r===Kd?(r=Nc(),Be=4):Be=r===Wd?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Ei=r,he===null&&(Sn=1,Kc(l,pt(r,l.current)))}function Bg(){var l=bi.current;return l===null?!0:(de&4194048)===de?Xi===null:(de&62914560)===de||(de&536870912)!==0?l===Xi:!1}function lm(){var l=Lt.H;return Lt.H=Rf,l===null?Rf:l}function Eu(){var l=Lt.A;return Lt.A=y3,l}function Tu(){Sn=4,Cr||(de&4194048)!==de&&bi.current!==null||(Co=!0),(_r&134217727)===0&&(_o&134217727)===0||qe===null||Ol(qe,de,Ti,!1)}function Cu(l,r,h){var g=fe;fe|=2;var E=lm(),T=Eu();(qe!==l||de!==r)&&(rp=null,dr(l,r)),r=!1;var z=Sn;t:do try{if(Be!==0&&he!==null){var L=he,ut=Ei;switch(Be){case 8:rf(),z=6;break t;case 3:case 2:case 9:case 6:bi.current===null&&(r=!0);var vt=Be;if(Be=0,Ei=null,ro(l,L,ut,vt),h&&Co){z=0;break t}break;default:vt=Be,Be=0,Ei=null,ro(l,L,ut,vt)}}Vg(),z=Sn;break}catch(Dt){Ug(l,Dt)}while(!0);return r&&l.shellSuspendCounter++,an=Ka=null,fe=g,Lt.H=E,Lt.A=T,he===null&&(qe=null,de=0,_a()),z}function Vg(){for(;he!==null;)hd(he)}function Gg(l,r){var h=fe;fe|=2;var g=lm(),E=Eu();qe!==l||de!==r?(rp=null,qu=Re()+500,dr(l,r)):Co=U(l,r);t:do try{if(Be!==0&&he!==null){r=he;var T=Ei;e:switch(Be){case 1:Be=0,Ei=null,ro(l,r,T,1);break;case 2:case 9:if(Mc(T)){Be=0,Ei=null,om(r);break}r=function(){Be!==2&&Be!==9||qe!==l||(Be=7),tn(l)},T.then(r,r);break t;case 3:Be=7;break t;case 4:Be=5;break t;case 7:Mc(T)?(Be=0,Ei=null,om(r)):(Be=0,Ei=null,ro(l,r,T,7));break;case 5:var z=null;switch(he.tag){case 26:z=he.memoizedState;case 5:case 27:var L=he,ut=L.type,vt=L.pendingProps;if(z?Bd(z):va(L.stateNode,ut,vt)){Be=0,Ei=null;var Dt=L.sibling;if(Dt!==null)he=Dt;else{var _t=L.return;_t!==null?(he=_t,Ls(_t)):he=null}break e}}Be=0,Ei=null,ro(l,r,T,5);break;case 6:Be=0,Ei=null,ro(l,r,T,6);break;case 8:rf(),Sn=6;break t;default:throw Error(u(462))}}rm();break}catch(Nt){Ug(l,Nt)}while(!0);return an=Ka=null,Lt.H=g,Lt.A=E,fe=h,he!==null?0:(qe=null,de=0,_a(),Sn)}function rm(){for(;he!==null&&!p3();)hd(he)}function hd(l){var r=kh(l.alternate,l,Pl);l.memoizedProps=l.pendingProps,r===null?Ls(l):he=r}function om(l){var r=l,h=r.alternate;switch(r.tag){case 15:case 0:r=F0(h,r,r.pendingProps,r.type,void 0,de);break;case 11:r=F0(h,r,r.pendingProps,r.type.render,r.ref,de);break;case 5:wc(r);default:td(h,r),r=he=dm(r,Pl),r=kh(h,r,Pl)}l.memoizedProps=l.pendingProps,r===null?Ls(l):he=r}function ro(l,r,h,g){an=Ka=null,wc(r),Yi=null,Of=0;var E=r.return;try{if(xa(l,E,r,h,de)){Sn=1,Kc(l,pt(h,l.current)),he=null;return}}catch(T){if(E!==null)throw he=E,T;Sn=1,Kc(l,pt(h,l.current)),he=null;return}r.flags&32768?(ue||g===1?l=!0:Co||(de&536870912)!==0?l=!1:(Cr=l=!0,(g===2||g===9||g===3||g===6)&&(g=bi.current,g!==null&&g.tag===13&&(g.flags|=16384))),of(r,l)):Ls(r)}function Ls(l){var r=l;do{if((r.flags&32768)!==0){of(r,Cr);return}l=r.return;var h=so(r.alternate,r,Pl);if(h!==null){he=h;return}if(r=r.sibling,r!==null){he=r;return}he=r=l}while(r!==null);Sn===0&&(Sn=5)}function of(l,r){do{var h=rs(l.alternate,l);if(h!==null){h.flags&=32767,he=h;return}if(h=l.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!r&&(l=l.sibling,l!==null)){he=l;return}he=l=h}while(l!==null);Sn=6,he=null}function um(l,r,h,g,E,T,z,L,ut){l.cancelPendingCommit=null;do Rn();while(Ve!==0);if((fe&6)!==0)throw Error(u(327));if(r!==null){if(r===l.current)throw Error(u(177));if(T=r.lanes|r.childLanes,T|=Pm,ft(l,h,T,z,L,ut),l===qe&&(he=qe=null,de=0),Dr=r,Yl=l,Ws=h,op=T,up=E,Uy=g,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(l.callbackNode=null,l.callbackPriority=0,t3(Vl,function(){return cm(),null})):(l.callbackNode=null,l.callbackPriority=0),g=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||g){g=Lt.T,Lt.T=null,E=Xs(),Fn(2),z=fe,fe|=4;try{Ng(l,r,h)}finally{fe=z,Fn(E),Lt.T=g}}Ve=1,dd(),pd(),md()}}function dd(){if(Ve===1){Ve=0;var l=Yl,r=Dr,h=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||h){h=Lt.T,Lt.T=null;var g=Xs();Fn(2);var E=fe;fe|=4;try{nf(r,l),yf(l.containerInfo)}finally{fe=E,Fn(g),Lt.T=h}}l.current=r,Ve=2}}function pd(){if(Ve===2){Ve=0;var l=Yl,r=Dr,h=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||h){h=Lt.T,Lt.T=null;var g=Xs();Fn(2);var E=fe;fe|=4;try{em(l,r.alternate,r)}finally{fe=E,Fn(g),Lt.T=h}}Ve=3}}function md(){if(Ve===4||Ve===3){Ve=0,si();var l=Yl,r=Dr,h=Ws,g=Uy;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?Ve=5:(Ve=0,Dr=Yl=null,jg(l,l.pendingLanes));var E=l.pendingLanes;if(E===0&&(xr=null),nt(h),r=r.stateNode,zn&&typeof zn.onCommitFiberRoot=="function")try{zn.onCommitFiberRoot(vo,r,void 0,(r.current.flags&128)===128)}catch{}if(g!==null){r=Lt.T,E=Xs(),Fn(2),Lt.T=null;try{for(var T=l.onRecoverableError,z=0;z<g.length;z++){var L=g[z];T(L.value,{componentStack:L.stack})}}finally{Lt.T=r,Fn(E)}}(Ws&3)!==0&&Rn(),tn(l),E=l.pendingLanes,(h&261930)!==0&&(E&42)!==0?l===cp?Xu++:(Xu=0,cp=l):Xu=0,ya&&Ey(),Nn(0)}}function jg(l,r){(l.pooledCacheLanes&=r)===0&&(r=l.pooledCache,r!=null&&(l.pooledCache=null,na(r)))}function Rn(){return dd(),pd(),md(),cm()}function cm(){if(Ve!==5)return!1;var l=Yl,r=op;op=0;var h=nt(Ws),g=32>h?32:h;h=Lt.T;var E=Xs();try{Fn(g),Lt.T=null,g=up,up=null;var T=Yl,z=Ws;if(Ve=0,Dr=Yl=null,Ws=0,(fe&6)!==0)throw Error(u(331));var L=fe;if(fe|=4,od(T.current),Hg(T,T.current,z,g),fe=L,Nn(0,!1),zn&&typeof zn.onPostCommitFiberRoot=="function")try{zn.onPostCommitFiberRoot(vo,T)}catch{}return!0}finally{Fn(E),Lt.T=h,jg(l,r)}}function fm(l,r,h){r=pt(h,r),r=pu(l.stateNode,r,2),l=Os(l,r,2),l!==null&&(et(l,2),tn(l))}function Te(l,r,h){if(l.tag===3)fm(l,l,h);else for(;r!==null;){if(r.tag===3){fm(r,l,h);break}else if(r.tag===1){var g=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(xr===null||!xr.has(g))){l=pt(h,l),h=Qc(2),g=Os(r,h,2),g!==null&&(Xh(h,g,r,l),et(g,2),tn(g));break}}r=r.return}}function gd(l,r,h){var g=l.pingCache;if(g===null){g=l.pingCache=new v3;var E=new Set;g.set(r,E)}else E=g.get(r),E===void 0&&(E=new Set,g.set(r,E));E.has(h)||(Xm=!0,E.add(h),l=uf.bind(null,l,r,h),r.then(l,l))}function uf(l,r,h){var g=l.pingCache;g!==null&&g.delete(r),l.pingedLanes|=l.suspendedLanes&h,l.warmLanes&=~h,qe===l&&(de&h)===h&&(Sn===4||Sn===3&&(de&62914560)===de&&300>Re()-Uf?(fe&2)===0&&dr(l,0):Km|=h,Yu===de&&(Yu=0)),tn(l)}function hm(l,r){r===0&&(r=G()),l=sr(l,r),l!==null&&(et(l,r),tn(l))}function yd(l){var r=l.memoizedState,h=0;r!==null&&(h=r.retryLane),hm(l,h)}function Lg(l,r){var h=0;switch(l.tag){case 31:case 13:var g=l.stateNode,E=l.memoizedState;E!==null&&(h=E.retryLane);break;case 19:g=l.stateNode;break;case 22:g=l.stateNode._retryCache;break;default:throw Error(u(314))}g!==null&&g.delete(r),hm(l,h)}function t3(l,r){return Ld(l,r)}function vd(l,r,h,g){this.tag=l,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function cf(l){return l=l.prototype,!(!l||!l.isReactComponent)}function Ps(l,r){var h=l.alternate;return h===null?(h=i(l.tag,r,l.key,l.mode),h.elementType=l.elementType,h.type=l.type,h.stateNode=l.stateNode,h.alternate=l,l.alternate=h):(h.pendingProps=r,h.type=l.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=l.flags&65011712,h.childLanes=l.childLanes,h.lanes=l.lanes,h.child=l.child,h.memoizedProps=l.memoizedProps,h.memoizedState=l.memoizedState,h.updateQueue=l.updateQueue,r=l.dependencies,h.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},h.sibling=l.sibling,h.index=l.index,h.ref=l.ref,h.refCleanup=l.refCleanup,h}function dm(l,r){l.flags&=65011714;var h=l.alternate;return h===null?(l.childLanes=0,l.lanes=r,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=h.childLanes,l.lanes=h.lanes,l.child=h.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=h.memoizedProps,l.memoizedState=h.memoizedState,l.updateQueue=h.updateQueue,l.type=h.type,r=h.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),l}function ff(l,r,h,g,E,T){var z=0;if(g=l,typeof l=="function")cf(l)&&(z=1);else if(typeof l=="string")z=Vi&&Ln?wm(l,h,ba.current)?26:jd(l)?27:5:Vi?wm(l,h,ba.current)?26:5:Ln&&jd(l)?27:5;else t:switch(l){case xd:return l=i(31,h,r,E),l.elementType=xd,l.lanes=T,l;case oo:return Rl(h.children,E,T,r);case ym:z=8,E|=24;break;case mf:return l=i(12,h,r,E|2),l.elementType=mf,l.lanes=T,l;case uo:return l=i(13,h,r,E),l.elementType=uo,l.lanes=T,l;case Ue:return l=i(19,h,r,E),l.elementType=Ue,l.lanes=T,l;default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case zl:z=10;break t;case _d:z=9;break t;case _u:z=11;break t;case vm:z=14;break t;case mr:z=16,g=null;break t}z=29,h=Error(u(130,l===null?"null":typeof l,"")),g=null}return r=i(z,h,r,E),r.elementType=l,r.type=g,r.lanes=T,r}function Rl(l,r,h,g){return l=i(7,l,g,r),l.lanes=h,l}function hf(l,r,h){return l=i(6,l,null,r),l.lanes=h,l}function Sd(l){var r=i(18,null,null,0);return r.stateNode=l,r}function bd(l,r,h){return r=i(4,l.children!==null?l.children:[],l.key,r),r.lanes=h,r.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},r}function pm(l,r,h,g,E,T,z,L,ut){this.tag=1,this.containerInfo=l,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Hl,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=k(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=k(0),this.hiddenUpdates=k(null),this.identifierPrefix=g,this.onUncaughtError=E,this.onCaughtError=T,this.onRecoverableError=z,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ut,this.incompleteTransitions=new Map}function df(l,r,h,g,E,T,z,L,ut,vt,Dt,_t){return l=new pm(l,r,h,z,ut,vt,Dt,_t,L),r=1,T===!0&&(r|=24),T=i(3,null,null,r),l.current=T,T.stateNode=l,r=De(),r.refCount++,l.pooledCache=r,r.refCount++,T.memoizedState={element:g,isDehydrated:h,cache:r},Oc(T),l}function Ed(l){return l?(l=yo,l):yo}function mm(l){var r=l._reactInternals;if(r===void 0)throw typeof l.render=="function"?Error(u(188)):(l=Object.keys(l).join(","),Error(u(268,l)));return l=p(r),l=l!==null?m(l):null,l===null?null:gf(l.stateNode)}function Td(l,r,h,g,E,T){E=Ed(E),g.context===null?g.context=E:g.pendingContext=E,g=gi(r),g.payload={element:h},T=T===void 0?null:T,T!==null&&(g.callback=T),h=Os(l,g,r),h!==null&&(Pa(h,l,r),Rc(h,l,r))}function gm(l,r){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var h=l.retryLane;l.retryLane=h!==0&&h<r?h:r}}function cs(l,r){gm(l,r),(l=l.alternate)&&gm(l,r)}var le={},e3=w,Ya=J2(),vi=Object.assign,Cd=Symbol.for("react.element"),pf=Symbol.for("react.transitional.element"),pr=Symbol.for("react.portal"),oo=Symbol.for("react.fragment"),ym=Symbol.for("react.strict_mode"),mf=Symbol.for("react.profiler"),_d=Symbol.for("react.consumer"),zl=Symbol.for("react.context"),_u=Symbol.for("react.forward_ref"),uo=Symbol.for("react.suspense"),Ue=Symbol.for("react.suspense_list"),vm=Symbol.for("react.memo"),mr=Symbol.for("react.lazy"),xd=Symbol.for("react.activity"),Ys=Symbol.for("react.memo_cache_sentinel"),Sm=Symbol.iterator,bm=Symbol.for("react.client.reference"),gr=Array.isArray,Lt=e3.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Pg=t.rendererVersion,Em=t.rendererPackageName,Tm=t.extraDevToolsConfig,gf=t.getPublicInstance,n3=t.getRootHostContext,Yg=t.getChildHostContext,a3=t.prepareForCommit,yf=t.resetAfterCommit,qs=t.createInstance;t.cloneMutableInstance;var Dd=t.appendInitialChild,qg=t.finalizeInitialChildren,vf=t.shouldSetTextContent,Ad=t.createTextInstance;t.cloneMutableTextInstance;var Xg=t.scheduleTimeout,Cm=t.cancelTimeout,Hl=t.noTimeout,Bi=t.isPrimaryRenderer;t.warnsIfNotActing;var Ma=t.supportsMutation,fs=t.supportsPersistence,ya=t.supportsHydration,Kg=t.getInstanceFromNode;t.beforeActiveInstanceBlur;var i3=t.preparePortalMount;t.prepareScopeUpdate,t.getInstanceFromScope;var Fn=t.setCurrentUpdatePriority,Xs=t.getCurrentUpdatePriority,hs=t.resolveUpdatePriority;t.trackSchedulerEvent,t.resolveEventType,t.resolveEventTimeStamp;var _m=t.shouldAttemptEagerTransition,Qg=t.detachDeletedInstance;t.requestPostPaintCallback;var Zg=t.maySuspendCommit,s3=t.maySuspendCommitOnUpdate,xu=t.maySuspendCommitInSyncRender,va=t.preloadInstance,Jg=t.startSuspendingCommit,Na=t.suspendInstance;t.suspendOnActiveViewTransition;var Fg=t.waitForCommitToBeReady;t.getSuspendedCommitReason;var qa=t.NotPendingTransition,yr=t.HostTransitionContext,co=t.resetFormInstance;t.bindToConsole;var kg=t.supportsMicrotasks,Ks=t.scheduleMicrotask,fo=t.supportsTestSelectors,xm=t.findFiberRoot,ds=t.getBoundingRect,Ig=t.getTextContent,Qs=t.isHiddenSubtree,Wg=t.matchAccessibilityRole,Sf=t.setFocusIfFocusable,ho=t.setupIntersectionObserver,$g=t.appendChild,ty=t.appendChildToContainer,bf=t.commitTextUpdate,ey=t.commitMount,Md=t.commitUpdate,ny=t.insertBefore,ay=t.insertInContainerBefore,Dm=t.removeChild,Am=t.removeChildFromContainer,Nd=t.resetTextContent,iy=t.hideInstance,Od=t.hideTextInstance,l3=t.unhideInstance,sy=t.unhideTextInstance;t.cancelViewTransitionName,t.cancelRootViewTransitionName,t.restoreRootViewTransitionName,t.cloneRootViewTransitionContainer,t.removeRootViewTransitionClone,t.measureClonedInstance,t.hasInstanceChanged,t.hasInstanceAffectedParent,t.startViewTransition,t.startGestureTransition,t.stopViewTransition,t.getCurrentGestureOffset,t.createViewTransitionInstance;var Si=t.clearContainer;t.createFragmentInstance,t.updateFragmentInstanceFiber,t.commitNewChildToFragmentInstance,t.deleteChildFromFragmentInstance;var ly=t.cloneInstance,en=t.createContainerChildSet,Mm=t.appendChildToContainerChildSet,ry=t.finalizeContainerChildren,oy=t.replaceContainerChildren,wl=t.cloneHiddenInstance,Ef=t.cloneHiddenTextInstance,Tf=t.isSuspenseInstancePending,Cf=t.isSuspenseInstanceFallback,po=t.getSuspenseInstanceFallbackErrorDetails,Du=t.registerSuspenseInstanceRetry,uy=t.canHydrateFormStateMarker,cy=t.isFormStateMarkerMatching,Nm=t.getNextHydratableSibling,fy=t.getNextHydratableSiblingAfterSingleton,Rd=t.getFirstHydratableChild,zd=t.getFirstHydratableChildWithinContainer,Om=t.getFirstHydratableChildWithinActivityInstance,hy=t.getFirstHydratableChildWithinSuspenseInstance,r3=t.getFirstHydratableChildWithinSingleton,o3=t.canHydrateInstance,dy=t.canHydrateTextInstance,py=t.canHydrateActivityInstance,u3=t.canHydrateSuspenseInstance,Au=t.hydrateInstance,Hd=t.hydrateTextInstance,my=t.hydrateActivityInstance,Rm=t.hydrateSuspenseInstance,gy=t.getNextHydratableInstanceAfterActivityInstance,yy=t.getNextHydratableInstanceAfterSuspenseInstance,vy=t.commitHydratedInstance,c3=t.commitHydratedContainer,Sy=t.commitHydratedActivityInstance,Mu=t.commitHydratedSuspenseInstance,by=t.finalizeHydratedChildren,Ey=t.flushHydrationEvents;t.clearActivityBoundary;var Ce=t.clearSuspenseBoundary;t.clearActivityBoundaryFromContainer;var zm=t.clearSuspenseBoundaryFromContainer,f3=t.hideDehydratedBoundary,Ty=t.unhideDehydratedBoundary,Cy=t.shouldDeleteUnhydratedTailInstances;t.diffHydratedPropsForDevWarnings,t.diffHydratedTextForDevWarnings,t.describeHydratableInstanceForDevWarnings;var h3=t.validateHydratableInstance,Hm=t.validateHydratableTextInstance,Vi=t.supportsResources,wm=t.isHostHoistableType,wd=t.getHoistableRoot,Nu=t.getResource,_y=t.acquireResource,xy=t.releaseResource,mo=t.hydrateHoistable,Ud=t.mountHoistable,Um=t.unmountHoistable,Dy=t.createHoistableInstance,Ay=t.prepareToCommitHoistables,d3=t.mayResourceSuspendCommit,Bd=t.preloadResource,Ul=t.suspendResource,Ln=t.supportsSingletons,Vd=t.resolveSingletonInstance,Gd=t.acquireSingletonInstance,vr=t.releaseSingletonInstance,jd=t.isHostSingletonType,go=t.isSingletonScope,_f=[],Ou=-1,yo={},ii=Math.clz32?Math.clz32:N,My=Math.log,Ny=Math.LN2,xf=256,Df=262144,Ru=4194304,Ld=Ya.unstable_scheduleCallback,re=Ya.unstable_cancelCallback,p3=Ya.unstable_shouldYield,si=Ya.unstable_requestPaint,Re=Ya.unstable_now,Oy=Ya.unstable_ImmediatePriority,Bl=Ya.unstable_UserBlockingPriority,Vl=Ya.unstable_NormalPriority,zu=Ya.unstable_IdlePriority,Pd=Ya.log,Bm=Ya.unstable_setDisableYieldValue,vo=null,zn=null,Sa=typeof Object.is=="function"?Object.is:yt,Yd=typeof reportError=="function"?reportError:function(l){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof l=="object"&&l!==null&&typeof l.message=="string"?String(l.message):String(l),error:l});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",l);return}console.error(l)},Vm=Object.prototype.hasOwnProperty,Hu,li,Af=!1,Ry=new WeakMap,So=[],wu=0,Pn=null,st=0,Gi=[],ji=0,Gl=null,Xa=1,Zs="",ba=x(null),Mf=x(null),Sr=x(null),qd=x(null),kn=null,nn=null,ue=!1,jl=null,Li=!1,Gm=Error(u(519)),Js=x(null),Ka=null,an=null,Fs=typeof AbortController<"u"?AbortController:function(){var l=[],r=this.signal={aborted:!1,addEventListener:function(h,g){l.push(g)}};this.abort=function(){r.aborted=!0,l.forEach(function(h){return h()})}},Oa=Ya.unstable_scheduleCallback,m3=Ya.unstable_NormalPriority,hn={$$typeof:zl,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},Hn=null,ri=null,jm=!1,Uu=!1,bo=!1,ps=0,Nf=null,Lm=0,Bu=0,Vu=null,Xd=Lt.S;Lt.S=function(l,r){Qm=Re(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&Ac(l,r),Xd!==null&&Xd(l,r)};var br=x(null),Gu=Error(u(460)),Kd=Error(u(474)),Qd=Error(u(542)),Zd={then:function(){}},Pi=null,Yi=null,Of=0,Eo=H0(!0),zy=H0(!1),qi=[],ms=0,Pm=0,Er=!1,Ym=!1,ks=x(null),Jd=x(0),bi=x(null),Xi=null,wn=x(0),Ll=0,$t=null,Le=null,Yn=null,Fd=!1,ju=!1,To=!1,kd=0,Lu=0,Pu=null,g3=0,Rf={readContext:Mn,use:je,useCallback:fn,useContext:fn,useEffect:fn,useImperativeHandle:fn,useLayoutEffect:fn,useInsertionEffect:fn,useMemo:fn,useReducer:fn,useRef:fn,useState:fn,useDebugValue:fn,useDeferredValue:fn,useTransition:fn,useSyncExternalStore:fn,useId:fn,useHostTransitionStatus:fn,useFormState:fn,useActionState:fn,useOptimistic:fn,useMemoCache:fn,useCacheRefresh:fn};Rf.useEffectEvent=fn;var Hy={readContext:Mn,use:je,useCallback:function(l,r){return pa().memoizedState=[l,r===void 0?null:r],l},useContext:Mn,useEffect:G0,useImperativeHandle:function(l,r,h){h=h!=null?h.concat([l]):null,Lc(4194308,4,Ag.bind(null,r,l),h)},useLayoutEffect:function(l,r){return Lc(4194308,4,l,r)},useInsertionEffect:function(l,r){Lc(4,2,l,r)},useMemo:function(l,r){var h=pa();r=r===void 0?null:r;var g=l();if(To){ht(!0);try{l()}finally{ht(!1)}}return h.memoizedState=[g,r],g},useReducer:function(l,r,h){var g=pa();if(h!==void 0){var E=h(r);if(To){ht(!0);try{h(r)}finally{ht(!1)}}}else E=r;return g.memoizedState=g.baseState=E,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:E},g.queue=l,l=l.dispatch=ma.bind(null,$t,l),[g.memoizedState,l]},useRef:function(l){var r=pa();return l={current:l},r.memoizedState=l},useState:function(l){l=Ga(l);var r=l.queue,h=Yh.bind(null,$t,r);return r.dispatch=h,[l.memoizedState,h]},useDebugValue:P0,useDeferredValue:function(l,r){var h=pa();return Lh(h,l,r)},useTransition:function(){var l=Ga(!1);return l=Y0.bind(null,$t,l.queue,!0,!1),pa().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,r,h){var g=$t,E=pa();if(ue){if(h===void 0)throw Error(u(407));h=h()}else{if(h=r(),qe===null)throw Error(u(349));(de&127)!==0||xg(g,r,h)}E.memoizedState=h;var T={value:h,getSnapshot:r};return E.queue=T,G0(Uc.bind(null,g,T,l),[l]),g.flags|=2048,ja(9,{destroy:void 0},ws.bind(null,g,T,h,r),null),h},useId:function(){var l=pa(),r=qe.identifierPrefix;if(ue){var h=Zs,g=Xa;h=(g&~(1<<32-ii(g)-1)).toString(32)+h,r="_"+r+"R_"+h,h=kd++,0<h&&(r+="H"+h.toString(32)),r+="_"}else h=g3++,r="_"+r+"r_"+h.toString(32)+"_";return l.memoizedState=r},useHostTransitionStatus:Ph,useFormState:is,useActionState:is,useOptimistic:function(l){var r=pa();r.memoizedState=r.baseState=l;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=h,r=du.bind(null,$t,!0,h),h.dispatch=r,[l,r]},useMemoCache:uu,useCacheRefresh:function(){return pa().memoizedState=Mg.bind(null,$t)},useEffectEvent:function(l){var r=pa(),h={impl:l};return r.memoizedState=h,function(){if((fe&2)!==0)throw Error(u(440));return h.impl.apply(void 0,arguments)}}},qm={readContext:Mn,use:je,useCallback:jh,useContext:Mn,useEffect:Bh,useImperativeHandle:L0,useInsertionEffect:j0,useLayoutEffect:Gh,useMemo:Pc,useReducer:cu,useRef:no,useState:function(){return cu(Hs)},useDebugValue:P0,useDeferredValue:function(l,r){var h=Qe();return Yc(h,Le.memoizedState,l,r)},useTransition:function(){var l=cu(Hs)[0],r=Qe().memoizedState;return[typeof l=="boolean"?l:$i(l),r]},useSyncExternalStore:ts,useId:xl,useHostTransitionStatus:Ph,useFormState:V0,useActionState:V0,useOptimistic:function(l,r){var h=Qe();return ti(h,Le,l,r)},useMemoCache:uu,useCacheRefresh:X0};qm.useEffectEvent=Vh;var wy={readContext:Mn,use:je,useCallback:jh,useContext:Mn,useEffect:Bh,useImperativeHandle:L0,useInsertionEffect:j0,useLayoutEffect:Gh,useMemo:Pc,useReducer:eo,useRef:no,useState:function(){return eo(Hs)},useDebugValue:P0,useDeferredValue:function(l,r){var h=Qe();return Le===null?Lh(h,l,r):Yc(h,Le.memoizedState,l,r)},useTransition:function(){var l=eo(Hs)[0],r=Qe().memoizedState;return[typeof l=="boolean"?l:$i(l),r]},useSyncExternalStore:ts,useId:xl,useHostTransitionStatus:Ph,useFormState:jc,useActionState:jc,useOptimistic:function(l,r){var h=Qe();return Le!==null?ti(h,Le,l,r):(h.baseState=l,[l,h.queue.dispatch])},useMemoCache:uu,useCacheRefresh:X0};wy.useEffectEvent=Vh;var Id={enqueueSetState:function(l,r,h){l=l._reactInternals;var g=ai(),E=gi(g);E.payload=r,h!=null&&(E.callback=h),r=Os(l,E,g),r!==null&&(Pa(r,l,g),Rc(r,l,g))},enqueueReplaceState:function(l,r,h){l=l._reactInternals;var g=ai(),E=gi(g);E.tag=1,E.payload=r,h!=null&&(E.callback=h),r=Os(l,E,g),r!==null&&(Pa(r,l,g),Rc(r,l,g))},enqueueForceUpdate:function(l,r){l=l._reactInternals;var h=ai(),g=gi(h);g.tag=2,r!=null&&(g.callback=r),r=Os(l,g,h),r!==null&&(Pa(r,l,h),Rc(r,l,h))}},Wd=Error(u(461)),qn=!1,$d={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},Is=!1,Un=!1,zf=!1,tp=typeof WeakSet=="function"?WeakSet:Set,ia=null,Xn=null,oi=!1,gs=null,Tr=8192,y3={getCacheForType:function(l){var r=Mn(hn),h=r.data.get(l);return h===void 0&&(h=l(),r.data.set(l,h)),h},cacheSignal:function(){return Mn(hn).controller.signal}},ep=0,np=1,ap=2,ip=3,sp=4;if(typeof Symbol=="function"&&Symbol.for){var Hf=Symbol.for;ep=Hf("selector.component"),np=Hf("selector.has_pseudo_class"),ap=Hf("selector.role"),ip=Hf("selector.test_id"),sp=Hf("selector.text")}var v3=typeof WeakMap=="function"?WeakMap:Map,fe=0,qe=null,he=null,de=0,Be=0,Ei=null,Cr=!1,Co=!1,Xm=!1,Pl=0,Sn=0,_r=0,_o=0,Km=0,Ti=0,Yu=0,wf=null,ui=null,lp=!1,Uf=0,Qm=0,qu=1/0,rp=null,xr=null,Ve=0,Yl=null,Dr=null,Ws=0,op=0,up=null,Uy=null,Xu=0,cp=null;return le.attemptContinuousHydration=function(l){if(l.tag===13||l.tag===31){var r=sr(l,67108864);r!==null&&Pa(r,l,67108864),cs(l,67108864)}},le.attemptHydrationAtCurrentPriority=function(l){if(l.tag===13||l.tag===31){var r=ai();r=St(r);var h=sr(l,r);h!==null&&Pa(h,l,r),cs(l,r)}},le.attemptSynchronousHydration=function(l){switch(l.tag){case 3:if(l=l.stateNode,l.current.memoizedState.isDehydrated){var r=O(l.pendingLanes);if(r!==0){for(l.pendingLanes|=2,l.entangledLanes|=2;r;){var h=1<<31-ii(r);l.entanglements[1]|=h,r&=~h}tn(l),(fe&6)===0&&(qu=Re()+500,Nn(0))}}break;case 31:case 13:r=sr(l,2),r!==null&&Pa(r,l,2),hr(),cs(l,2)}},le.batchedUpdates=function(l,r){return l(r)},le.createComponentSelector=function(l){return{$$typeof:ep,value:l}},le.createContainer=function(l,r,h,g,E,T,z,L,ut,vt){return df(l,r,!1,null,h,g,T,null,z,L,ut,vt)},le.createHasPseudoClassSelector=function(l){return{$$typeof:np,value:l}},le.createHydrationContainer=function(l,r,h,g,E,T,z,L,ut,vt,Dt,_t,Nt,Xt){return l=df(h,g,!0,l,E,T,L,Xt,ut,vt,Dt,_t),l.context=Ed(null),h=l.current,g=ai(),g=St(g),E=gi(g),E.callback=r??null,Os(h,E,g),r=g,l.current.lanes=r,et(l,r),tn(l),l},le.createPortal=function(l,r,h){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:pr,key:g==null?null:""+g,children:l,containerInfo:r,implementation:h}},le.createRoleSelector=function(l){return{$$typeof:ap,value:l}},le.createTestNameSelector=function(l){return{$$typeof:ip,value:l}},le.createTextSelector=function(l){return{$$typeof:sp,value:l}},le.defaultOnCaughtError=function(l){console.error(l)},le.defaultOnRecoverableError=function(l){Yd(l)},le.defaultOnUncaughtError=function(l){Yd(l)},le.deferredUpdates=function(l){var r=Lt.T,h=Xs();try{return Fn(32),Lt.T=null,l()}finally{Fn(h),Lt.T=r}},le.discreteUpdates=function(l,r,h,g,E){var T=Lt.T,z=Xs();try{return Fn(2),Lt.T=null,l(r,h,g,E)}finally{Fn(z),Lt.T=T,fe===0&&(qu=Re()+500)}},le.findAllNodes=sf,le.findBoundingRects=function(l,r){if(!fo)throw Error(u(363));r=sf(l,r),l=[];for(var h=0;h<r.length;h++)l.push(ds(r[h]));for(r=l.length-1;0<r;r--){h=l[r];for(var g=h.x,E=g+h.width,T=h.y,z=T+h.height,L=r-1;0<=L;L--)if(r!==L){var ut=l[L],vt=ut.x,Dt=vt+ut.width,_t=ut.y,Nt=_t+ut.height;if(g>=vt&&T>=_t&&E<=Dt&&z<=Nt){l.splice(r,1);break}else if(g!==vt||h.width!==ut.width||Nt<T||_t>z){if(!(T!==_t||h.height!==ut.height||Dt<g||vt>E)){vt>g&&(ut.width+=vt-g,ut.x=g),Dt<E&&(ut.width=E-vt),l.splice(r,1);break}}else{_t>T&&(ut.height+=_t-T,ut.y=T),Nt<z&&(ut.height=z-_t),l.splice(r,1);break}}}return l},le.findHostInstance=mm,le.findHostInstanceWithNoPortals=function(l){return l=p(l),l=l!==null?S(l):null,l===null?null:gf(l.stateNode)},le.findHostInstanceWithWarning=function(l){return mm(l)},le.flushPassiveEffects=Rn,le.flushSyncFromReconciler=function(l){var r=fe;fe|=1;var h=Lt.T,g=Xs();try{if(Fn(2),Lt.T=null,l)return l()}finally{Fn(g),Lt.T=h,fe=r,(fe&6)===0&&Nn(0)}},le.flushSyncWork=hr,le.focusWithin=function(l,r){if(!fo)throw Error(u(363));for(l=bu(l),r=im(l,r),r=Array.from(r),l=0;l<r.length;){var h=r[l++],g=h.tag;if(!Qs(h)){if((g===5||g===26||g===27)&&Sf(h.stateNode))return!0;for(h=h.child;h!==null;)r.push(h),h=h.sibling}}return!1},le.getFindAllNodesFailureDescription=function(l,r){if(!fo)throw Error(u(363));var h=0,g=[];l=[bu(l),0];for(var E=0;E<l.length;){var T=l[E++],z=T.tag,L=l[E++],ut=r[L];if((z!==5&&z!==26&&z!==27||!Qs(T))&&(af(T,ut)&&(g.push(cd(ut)),L++,L>h&&(h=L)),L<r.length))for(T=T.child;T!==null;)l.push(T,L),T=T.sibling}if(h<r.length){for(l=[];h<r.length;h++)l.push(cd(r[h]));return`findAllNodes was able to match part of the selector:
|
|
23
23
|
`+(g.join(" > ")+`
|
|
24
24
|
|
|
25
25
|
No matching component was found for:
|
|
26
|
-
`)+l.join(" > ")}return null},ne.getPublicRootInstance=function(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 27:case 5:return hf(l.child.stateNode);default:return l.child.stateNode}},ne.injectIntoDevTools=function(){var l={bundleType:0,version:Pg,rendererPackageName:Sm,currentDispatcherRef:Gt,reconcilerVersion:"19.2.0"};if(bm!==null&&(l.rendererConfig=bm),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")l=!1;else{var r=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(r.isDisabled||!r.supportsFiber)l=!0;else{try{po=r.inject(l),Rn=r}catch{}l=!!r.checkDCE}}return l},ne.isAlreadyRendering=function(){return(re&6)!==0},ne.observeVisibleRects=function(l,r,h,g){if(!ro)throw Error(u(363));l=tf(l,r);var E=oo(l,h,g).disconnect;return{disconnect:function(){E()}}},ne.shouldError=function(){return null},ne.shouldSuspend=function(){return!1},ne.startHostTransition=function(l,r,h,g){if(l.tag!==5)throw Error(u(476));var E=P0(l).queue;L0(l,E,r,qa,h===null?s:function(){var T=P0(l);return T.next===null&&(T=l.alternate.memoizedState),tr(l,T.next.queue,{},ai()),h(g)})},ne.updateContainer=function(l,r,h,g){var E=r.current,T=ai();return Sd(E,T,l,r,h,g),T},ne.updateContainerSync=function(l,r,h,g){return Sd(r.current,2,l,r,h,g),2},ne},n.exports.default=n.exports,Object.defineProperty(n.exports,"__esModule",{value:!0})})(K2)),K2.exports}var F2={exports:{}};var g4;function K_(){return g4||(g4=1,(function(n){process.env.NODE_ENV!=="production"&&(n.exports=function(t){function i(e,a){for(e=e.memoizedState;e!==null&&0<a;)e=e.next,a--;return e}function s(e,a,o,d){if(o>=a.length)return d;var y=a[o],v=Pn(e)?e.slice():Me({},e);return v[y]=s(e[y],a,o+1,d),v}function u(e,a,o){if(a.length!==o.length)console.warn("copyWithRename() expects paths of the same length");else{for(var d=0;d<o.length-1;d++)if(a[d]!==o[d]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return c(e,a,o,0)}}function c(e,a,o,d){var y=a[d],v=Pn(e)?e.slice():Me({},e);return d+1===a.length?(v[o[d]]=v[y],Pn(v)?v.splice(y,1):delete v[y]):v[y]=c(e[y],a,o,d+1),v}function f(e,a,o){var d=a[o],y=Pn(e)?e.slice():Me({},e);return o+1===a.length?(Pn(y)?y.splice(d,1):delete y[d],y):(y[d]=f(e[d],a,o+1),y)}function p(){return!1}function m(){return null}function S(e,a,o,d){return new d3(e,a,o,d)}function b(e,a){e.context===tn&&(Ny(a,e,null,null),yf())}function _(e,a){if(il!==null){var o=a.staleFamilies;a=a.updatedFamilies,Au(),Ay(e.current,a,o),yf()}}function x(e){il=e}function D(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function A(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function N(){}function R(){}function O(e){var a=[];return e.forEach(function(o){a.push(o)}),a.sort().join(", ")}function U(e){var a=e,o=e;if(e.alternate)for(;a.return;)a=a.return;else{e=a;do a=e,(a.flags&4098)!==0&&(o=a.return),e=a.return;while(e)}return a.tag===3?o:null}function j(e){if(U(e)!==e)throw Error("Unable to find node on an unmounted component.")}function V(e){var a=e.alternate;if(!a){if(a=U(e),a===null)throw Error("Unable to find node on an unmounted component.");return a!==e?null:e}for(var o=e,d=a;;){var y=o.return;if(y===null)break;var v=y.alternate;if(v===null){if(d=y.return,d!==null){o=d;continue}break}if(y.child===v.child){for(v=y.child;v;){if(v===o)return j(y),e;if(v===d)return j(y),a;v=v.sibling}throw Error("Unable to find node on an unmounted component.")}if(o.return!==d.return)o=y,d=v;else{for(var C=!1,M=y.child;M;){if(M===o){C=!0,o=y,d=v;break}if(M===d){C=!0,d=y,o=v;break}M=M.sibling}if(!C){for(M=v.child;M;){if(M===o){C=!0,o=v,d=y;break}if(M===d){C=!0,d=v,o=y;break}M=M.sibling}if(!C)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(o.alternate!==d)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(o.tag!==3)throw Error("Unable to find node on an unmounted component.");return o.stateNode.current===o?e:a}function F(e){return e=V(e),e!==null?$(e):null}function $(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e;for(e=e.child;e!==null;){if(a=$(e),a!==null)return a;e=e.sibling}return null}function st(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e;for(e=e.child;e!==null;){if(e.tag!==4&&(a=st(e),a!==null))return a;e=e.sibling}return null}function I(e){return e===null||typeof e!="object"?null:(e=mo&&e[mo]||e["@@iterator"],typeof e=="function"?e:null)}function et(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Hu?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ru:return"Fragment";case wm:return"Profiler";case Gd:return"StrictMode";case jd:return"Suspense";case Um:return"SuspenseList";case Cf:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case zl:return"Portal";case Rn:return e.displayName||"Context";case po:return(e._context.displayName||"Context")+".Consumer";case Sa:var a=e.render;return e=e.displayName,e||(e=a.displayName||a.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case zu:return a=e.displayName||null,a!==null?a:et(e.type)||"Memo";case li:a=e._payload,e=e._init;try{return et(e(a))}catch{}}return null}function nt(e){var a=e.type;switch(e.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(a._context.displayName||"Context")+".Consumer";case 10:return a.displayName||"Context";case 18:return"DehydratedFragment";case 11:return e=a.render,e=e.displayName||e.name||"",a.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return a;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return et(a);case 8:return a===Gd?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;break;case 29:if(a=e._debugInfo,a!=null){for(var o=a.length-1;0<=o;o--)if(typeof a[o].name=="string")return a[o].name}if(e.return!==null)return nt(e.return)}return null}function bt(e){return{current:e}}function lt(e,a){0>Yt?console.error("Unexpected pop."):(a!==Rt[Yt]&&console.error("Unexpected Fiber popped."),e.current=xt[Yt],xt[Yt]=null,Rt[Yt]=null,Yt--)}function dt(e,a,o){Yt++,xt[Yt]=e.current,Rt[Yt]=o,e.current=a}function pt(e){return e>>>=0,e===0?32:31-(Eo(e)/it|0)|0}function tt(e){var a=e&42;if(a!==0)return a;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),e}}function w(e,a,o){var d=e.pendingLanes;if(d===0)return 0;var y=0,v=e.suspendedLanes,C=e.pingedLanes;e=e.warmLanes;var M=d&134217727;return M!==0?(d=M&~v,d!==0?y=tt(d):(C&=M,C!==0?y=tt(C):o||(o=M&~e,o!==0&&(y=tt(o))))):(M=d&~v,M!==0?y=tt(M):C!==0?y=tt(C):o||(o=d&~e,o!==0&&(y=tt(o)))),y===0?0:a!==0&&a!==y&&(a&v)===0&&(v=y&-y,o=a&-a,v>=o||v===32&&(o&4194048)!==0)?a:y}function Z(e,a){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&a)===0}function K(e,a){switch(e){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return console.error("Should have found matching lanes. This is a bug in React."),-1}}function at(){var e=_t;return _t<<=1,(_t&62914560)===0&&(_t=4194304),e}function St(e){for(var a=[],o=0;31>o;o++)a.push(e);return a}function W(e,a){e.pendingLanes|=a,a!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function gt(e,a,o,d,y,v){var C=e.pendingLanes;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=o,e.entangledLanes&=o,e.errorRecoveryDisabledLanes&=o,e.shellSuspendCounter=0;var M=e.entanglements,B=e.expirationTimes,q=e.hiddenUpdates;for(o=C&~o;0<o;){var ct=31-kn(o),ht=1<<ct;M[ct]=0,B[ct]=-1;var yt=q[ct];if(yt!==null)for(q[ct]=null,ct=0;ct<yt.length;ct++){var Vt=yt[ct];Vt!==null&&(Vt.lane&=-536870913)}o&=~ht}d!==0&&Tt(e,d,0),v!==0&&y===0&&e.tag!==0&&(e.suspendedLanes|=v&~(C&~a))}function Tt(e,a,o){e.pendingLanes|=a,e.suspendedLanes&=~a;var d=31-kn(a);e.entangledLanes|=a,e.entanglements[d]=e.entanglements[d]|1073741824|o&261930}function Pt(e,a){var o=e.entangledLanes|=a;for(e=e.entanglements;o;){var d=31-kn(o),y=1<<d;y&a|e[d]&a&&(e[d]|=a),o&=~y}}function le(e,a){var o=a&-a;return o=(o&42)!==0?1:xn(o),(o&(e.suspendedLanes|a))!==0?0:o}function xn(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function xe(e,a,o){if(Tr)for(e=e.pendingUpdatersLaneMap;0<o;){var d=31-kn(o),y=1<<d;e[d].add(a),o&=~y}}function Dn(e,a){if(Tr)for(var o=e.pendingUpdatersLaneMap,d=e.memoizedUpdaters;0<a;){var y=31-kn(a);e=1<<y,y=o[y],0<y.size&&(y.forEach(function(v){var C=v.alternate;C!==null&&d.has(C)||d.add(v)}),y.clear()),a&=~e}}function ln(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Be(e){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var a=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(a.isDisabled)return!0;if(!a.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{op=a.inject(e),ci=a}catch(o){console.error("React instrumentation encountered an error: %o.",o)}return!!a.checkDCE}function At(e){if(typeof WG=="function"&&$G(e),ci&&typeof ci.setStrictMode=="function")try{ci.setStrictMode(op,e)}catch(a){Er||(Er=!0,console.error("React instrumentation encountered an error: %o",a))}}function ue(e,a){return e===a&&(e!==0||1/e===1/a)||e!==e&&a!==a}function ta(e){for(var a=0,o=0;o<e.length;o++){var d=e[o];if(typeof d=="object"&&d!==null)if(Pn(d)&&d.length===2&&typeof d[0]=="string"){if(a!==0&&a!==3)return 1;a=3}else return 1;else{if(typeof d=="function"||typeof d=="string"&&50<d.length||a!==0&&a!==2)return 1;a=2}}return a}function ea(e,a,o,d){for(var y in e)S3.call(e,y)&&y[0]!=="_"&&An(y,e[y],a,o,d)}function An(e,a,o,d,y){switch(typeof a){case"object":if(a===null){a="null";break}else{if(a.$$typeof===Rl){var v=et(a.type)||"…",C=a.key;a=a.props;var M=Object.keys(a),B=M.length;if(C==null&&B===0){a="<"+v+" />";break}if(3>d||B===1&&M[0]==="children"&&C==null){a="<"+v+" … />";break}o.push([y+" ".repeat(d)+e,"<"+v]),C!==null&&An("key",C,o,d+1,y),e=!1;for(var q in a)q==="children"?a.children!=null&&(!Pn(a.children)||0<a.children.length)&&(e=!0):S3.call(a,q)&&q[0]!=="_"&&An(q,a[q],o,d+1,y);o.push(["",e?">…</"+v+">":"/>"]);return}if(v=Object.prototype.toString.call(a),v=v.slice(8,v.length-1),v==="Array"){if(q=ta(a),q===2||q===0){a=JSON.stringify(a);break}else if(q===3){for(o.push([y+" ".repeat(d)+e,""]),e=0;e<a.length;e++)v=a[e],An(v[0],v[1],o,d+1,y);return}}if(v==="Promise"){if(a.status==="fulfilled"){if(v=o.length,An(e,a.value,o,d,y),o.length>v){o=o[v],o[1]="Promise<"+(o[1]||"Object")+">";return}}else if(a.status==="rejected"&&(v=o.length,An(e,a.reason,o,d,y),o.length>v)){o=o[v],o[1]="Rejected Promise<"+o[1]+">";return}o.push([" ".repeat(d)+e,"Promise"]);return}v==="Object"&&(q=Object.getPrototypeOf(a))&&typeof q.constructor=="function"&&(v=q.constructor.name),o.push([y+" ".repeat(d)+e,v==="Object"?3>d?"":"…":v]),3>d&&ea(a,o,d+1,y);return}case"function":a=a.name===""?"() => {}":a.name+"() {}";break;case"string":a=a==="This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects."?"…":JSON.stringify(a);break;case"undefined":a="undefined";break;case"boolean":a=a?"true":"false";break;default:a=String(a)}o.push([y+" ".repeat(d)+e,a])}function Ba(e,a,o,d){var y=!0;for(C in e)C in a||(o.push(["– "+" ".repeat(d)+C,"…"]),y=!1);for(var v in a)if(v in e){var C=e[v],M=a[v];if(C!==M){if(d===0&&v==="children")y=" ".repeat(d)+v,o.push(["– "+y,"…"],["+ "+y,"…"]);else{if(!(3<=d)){if(typeof C=="object"&&typeof M=="object"&&C!==null&&M!==null&&C.$$typeof===M.$$typeof)if(M.$$typeof===Rl){if(C.type===M.type&&C.key===M.key){C=et(M.type)||"…",y=" ".repeat(d)+v,C="<"+C+" … />",o.push(["– "+y,C],["+ "+y,C]),y=!1;continue}}else{var B=Object.prototype.toString.call(C),q=Object.prototype.toString.call(M);if(B===q&&(q==="[object Object]"||q==="[object Array]")){B=[" "+" ".repeat(d)+v,q==="[object Array]"?"Array":""],o.push(B),q=o.length,Ba(C,M,o,d+1)?q===o.length&&(B[1]="Referentially unequal but deeply equal objects. Consider memoization."):y=!1;continue}}else if(typeof C=="function"&&typeof M=="function"&&C.name===M.name&&C.length===M.length&&(B=Function.prototype.toString.call(C),q=Function.prototype.toString.call(M),B===q)){C=M.name===""?"() => {}":M.name+"() {}",o.push([" "+" ".repeat(d)+v,C+" Referentially unequal function closure. Consider memoization."]);continue}}An(v,C,o,d,"– "),An(v,M,o,d,"+ ")}y=!1}}else o.push(["+ "+" ".repeat(d)+v,"…"]),y=!1;return y}function rn(e){me=e&63?"Blocking":e&64?"Gesture":e&4194176?"Transition":e&62914560?"Suspense":e&2080374784?"Idle":"Other"}function ha(e,a,o,d){en&&(Ku.start=a,Ku.end=o,To.color="warning",To.tooltipText=d,To.properties=null,(e=e._debugTask)?e.run(performance.measure.bind(performance,d,Ku)):performance.measure(d,Ku))}function Ji(e,a,o){ha(e,a,o,"Reconnect")}function di(e,a,o,d,y){var v=nt(e);if(v!==null&&en){var C=e.alternate,M=e.actualDuration;if(C===null||C.child!==e.child)for(var B=e.child;B!==null;B=B.sibling)M-=B.actualDuration;d=.5>M?d?"tertiary-light":"primary-light":10>M?d?"tertiary":"primary":100>M?d?"tertiary-dark":"primary-dark":"error";var q=e.memoizedProps;M=e._debugTask,q!==null&&C!==null&&C.memoizedProps!==q?(B=[nj],q=Ba(C.memoizedProps,q,B,0),1<B.length&&(q&&!Xu&&(C.lanes&y)===0&&100<e.actualDuration?(Xu=!0,B[0]=aj,To.color="warning",To.tooltipText="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner."):(To.color=d,To.tooltipText=v),To.properties=B,Ku.start=a,Ku.end=o,M!=null?M.run(performance.measure.bind(performance,""+v,Ku)):performance.measure(""+v,Ku))):M!=null?M.run(console.timeStamp.bind(console,v,a,o,"Components ⚛",void 0,d)):console.timeStamp(v,a,o,"Components ⚛",void 0,d)}}function Fi(e,a,o,d){if(en){var y=nt(e);if(y!==null){for(var v=null,C=[],M=0;M<d.length;M++){var B=d[M];v==null&&B.source!==null&&(v=B.source._debugTask),B=B.value,C.push(["Error",typeof B=="object"&&B!==null&&typeof B.message=="string"?String(B.message):String(B)])}e.key!==null&&An("key",e.key,C,0,""),e.memoizedProps!==null&&ea(e.memoizedProps,C,0,""),v==null&&(v=e._debugTask),e={start:a,end:o,detail:{devtools:{color:"error",track:"Components ⚛",tooltipText:e.tag===13?"Hydration failed":"Error boundary caught an error",properties:C}}},v?v.run(performance.measure.bind(performance,""+y,e)):performance.measure(""+y,e)}}}function Mn(e,a,o,d,y){if(y!==null){if(en){var v=nt(e);if(v!==null){d=[];for(var C=0;C<y.length;C++){var M=y[C].value;d.push(["Error",typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M)])}e.key!==null&&An("key",e.key,d,0,""),e.memoizedProps!==null&&ea(e.memoizedProps,d,0,""),a={start:a,end:o,detail:{devtools:{color:"error",track:"Components ⚛",tooltipText:"A lifecycle or effect errored",properties:d}}},(e=e._debugTask)?e.run(performance.measure.bind(performance,""+v,a)):performance.measure(""+v,a)}}}else v=nt(e),v!==null&&en&&(y=1>d?"secondary-light":100>d?"secondary":500>d?"secondary-dark":"error",(e=e._debugTask)?e.run(console.timeStamp.bind(console,v,a,o,"Components ⚛",void 0,y)):console.timeStamp(v,a,o,"Components ⚛",void 0,y))}function on(e,a,o,d){if(en&&!(a<=e)){var y=(o&738197653)===o?"tertiary-dark":"primary-dark";o=(o&536870912)===o?"Prepared":(o&201326741)===o?"Hydrated":"Render",d?d.run(console.timeStamp.bind(console,o,e,a,me,"Scheduler ⚛",y)):console.timeStamp(o,e,a,me,"Scheduler ⚛",y)}}function Mi(e,a,o,d){!en||a<=e||(o=(o&738197653)===o?"tertiary-dark":"primary-dark",d?d.run(console.timeStamp.bind(console,"Prewarm",e,a,me,"Scheduler ⚛",o)):console.timeStamp("Prewarm",e,a,me,"Scheduler ⚛",o))}function Ut(e,a,o,d){!en||a<=e||(o=(o&738197653)===o?"tertiary-dark":"primary-dark",d?d.run(console.timeStamp.bind(console,"Suspended",e,a,me,"Scheduler ⚛",o)):console.timeStamp("Suspended",e,a,me,"Scheduler ⚛",o))}function Ae(e,a,o,d,y,v){if(en&&!(a<=e)){o=[];for(var C=0;C<d.length;C++){var M=d[C].value;o.push(["Recoverable Error",typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M)])}e={start:e,end:a,detail:{devtools:{color:"primary-dark",track:me,trackGroup:"Scheduler ⚛",tooltipText:y?"Hydration Failed":"Recovered after Error",properties:o}}},v?v.run(performance.measure.bind(performance,"Recovered",e)):performance.measure("Recovered",e)}}function jn(e,a,o,d){!en||a<=e||(d?d.run(console.timeStamp.bind(console,"Errored",e,a,me,"Scheduler ⚛","error")):console.timeStamp("Errored",e,a,me,"Scheduler ⚛","error"))}function Va(e,a,o,d){!en||a<=e||(d?d.run(console.timeStamp.bind(console,o,e,a,me,"Scheduler ⚛","secondary-light")):console.timeStamp(o,e,a,me,"Scheduler ⚛","secondary-light"))}function ke(e,a,o,d,y){if(en&&!(a<=e)){for(var v=[],C=0;C<o.length;C++){var M=o[C].value;v.push(["Error",typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M)])}e={start:e,end:a,detail:{devtools:{color:"error",track:me,trackGroup:"Scheduler ⚛",tooltipText:d?"Remaining Effects Errored":"Commit Errored",properties:v}}},y?y.run(performance.measure.bind(performance,"Errored",e)):performance.measure("Errored",e)}}function mn(){}function eu(){if(Km===0){B9=console.log,V9=console.info,G9=console.warn,j9=console.error,L9=console.group,P9=console.groupCollapsed,Y9=console.groupEnd;var e={configurable:!0,enumerable:!0,value:mn,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Km++}function Lr(){if(Km--,Km===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Me({},e,{value:B9}),info:Me({},e,{value:V9}),warn:Me({},e,{value:G9}),error:Me({},e,{value:j9}),group:Me({},e,{value:L9}),groupCollapsed:Me({},e,{value:P9}),groupEnd:Me({},e,{value:Y9})})}0>Km&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function nu(e){var a=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,e=e.stack,Error.prepareStackTrace=a,e.startsWith(`Error: react-stack-top-frame
|
|
26
|
+
`)+l.join(" > ")}return null},le.getPublicRootInstance=function(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 27:case 5:return gf(l.child.stateNode);default:return l.child.stateNode}},le.injectIntoDevTools=function(){var l={bundleType:0,version:Pg,rendererPackageName:Em,currentDispatcherRef:Lt,reconcilerVersion:"19.2.0"};if(Tm!==null&&(l.rendererConfig=Tm),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")l=!1;else{var r=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(r.isDisabled||!r.supportsFiber)l=!0;else{try{vo=r.inject(l),zn=r}catch{}l=!!r.checkDCE}}return l},le.isAlreadyRendering=function(){return(fe&6)!==0},le.observeVisibleRects=function(l,r,h,g){if(!fo)throw Error(u(363));l=sf(l,r);var E=ho(l,h,g).disconnect;return{disconnect:function(){E()}}},le.shouldError=function(){return null},le.shouldSuspend=function(){return!1},le.startHostTransition=function(l,r,h,g){if(l.tag!==5)throw Error(u(476));var E=q0(l).queue;Y0(l,E,r,qa,h===null?s:function(){var T=q0(l);return T.next===null&&(T=l.alternate.memoizedState),lr(l,T.next.queue,{},ai()),h(g)})},le.updateContainer=function(l,r,h,g){var E=r.current,T=ai();return Td(E,T,l,r,h,g),T},le.updateContainerSync=function(l,r,h,g){return Td(r.current,2,l,r,h,g),2},le},n.exports.default=n.exports,Object.defineProperty(n.exports,"__esModule",{value:!0})})(K2)),K2.exports}var F2={exports:{}};var g4;function Q_(){return g4||(g4=1,(function(n){process.env.NODE_ENV!=="production"&&(n.exports=function(t){function i(e,a){for(e=e.memoizedState;e!==null&&0<a;)e=e.next,a--;return e}function s(e,a,o,d){if(o>=a.length)return d;var y=a[o],v=Pn(e)?e.slice():Re({},e);return v[y]=s(e[y],a,o+1,d),v}function u(e,a,o){if(a.length!==o.length)console.warn("copyWithRename() expects paths of the same length");else{for(var d=0;d<o.length-1;d++)if(a[d]!==o[d]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return c(e,a,o,0)}}function c(e,a,o,d){var y=a[d],v=Pn(e)?e.slice():Re({},e);return d+1===a.length?(v[o[d]]=v[y],Pn(v)?v.splice(y,1):delete v[y]):v[y]=c(e[y],a,o,d+1),v}function f(e,a,o){var d=a[o],y=Pn(e)?e.slice():Re({},e);return o+1===a.length?(Pn(y)?y.splice(d,1):delete y[d],y):(y[d]=f(e[d],a,o+1),y)}function p(){return!1}function m(){return null}function S(e,a,o,d){return new d3(e,a,o,d)}function b(e,a){e.context===sn&&(Ny(a,e,null,null),Ef())}function _(e,a){if(ol!==null){var o=a.staleFamilies;a=a.updatedFamilies,Mu(),Ay(e.current,a,o),Ef()}}function x(e){ol=e}function D(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function A(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function N(){}function O(){}function R(e){var a=[];return e.forEach(function(o){a.push(o)}),a.sort().join(", ")}function U(e){var a=e,o=e;if(e.alternate)for(;a.return;)a=a.return;else{e=a;do a=e,(a.flags&4098)!==0&&(o=a.return),e=a.return;while(e)}return a.tag===3?o:null}function j(e){if(U(e)!==e)throw Error("Unable to find node on an unmounted component.")}function G(e){var a=e.alternate;if(!a){if(a=U(e),a===null)throw Error("Unable to find node on an unmounted component.");return a!==e?null:e}for(var o=e,d=a;;){var y=o.return;if(y===null)break;var v=y.alternate;if(v===null){if(d=y.return,d!==null){o=d;continue}break}if(y.child===v.child){for(v=y.child;v;){if(v===o)return j(y),e;if(v===d)return j(y),a;v=v.sibling}throw Error("Unable to find node on an unmounted component.")}if(o.return!==d.return)o=y,d=v;else{for(var C=!1,M=y.child;M;){if(M===o){C=!0,o=y,d=v;break}if(M===d){C=!0,d=y,o=v;break}M=M.sibling}if(!C){for(M=v.child;M;){if(M===o){C=!0,o=v,d=y;break}if(M===d){C=!0,d=v,o=y;break}M=M.sibling}if(!C)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(o.alternate!==d)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(o.tag!==3)throw Error("Unable to find node on an unmounted component.");return o.stateNode.current===o?e:a}function k(e){return e=G(e),e!==null?et(e):null}function et(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e;for(e=e.child;e!==null;){if(a=et(e),a!==null)return a;e=e.sibling}return null}function ft(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e;for(e=e.child;e!==null;){if(e.tag!==4&&(a=ft(e),a!==null))return a;e=e.sibling}return null}function I(e){return e===null||typeof e!="object"?null:(e=So&&e[So]||e["@@iterator"],typeof e=="function"?e:null)}function it(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===wu?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case zu:return"Fragment";case Bm:return"Profiler";case Pd:return"StrictMode";case Yd:return"Suspense";case Vm:return"SuspenseList";case Af:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case Vl:return"Portal";case zn:return e.displayName||"Context";case vo:return(e._context.displayName||"Context")+".Consumer";case Sa:var a=e.render;return e=e.displayName,e||(e=a.displayName||a.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Hu:return a=e.displayName||null,a!==null?a:it(e.type)||"Memo";case li:a=e._payload,e=e._init;try{return it(e(a))}catch{}}return null}function J(e){var a=e.type;switch(e.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(a._context.displayName||"Context")+".Consumer";case 10:return a.displayName||"Context";case 18:return"DehydratedFragment";case 11:return e=a.render,e=e.displayName||e.name||"",a.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return a;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return it(a);case 8:return a===Pd?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;break;case 29:if(a=e._debugInfo,a!=null){for(var o=a.length-1;0<=o;o--)if(typeof a[o].name=="string")return a[o].name}if(e.return!==null)return J(e.return)}return null}function St(e){return{current:e}}function nt(e,a){0>Xt?console.error("Unexpected pop."):(a!==Nt[Xt]&&console.error("Unexpected Fiber popped."),e.current=_t[Xt],_t[Xt]=null,Nt[Xt]=null,Xt--)}function ht(e,a,o){Xt++,_t[Xt]=e.current,Nt[Xt]=o,e.current=a}function yt(e){return e>>>=0,e===0?32:31-(xo(e)/at|0)|0}function tt(e){var a=e&42;if(a!==0)return a;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),e}}function H(e,a,o){var d=e.pendingLanes;if(d===0)return 0;var y=0,v=e.suspendedLanes,C=e.pingedLanes;e=e.warmLanes;var M=d&134217727;return M!==0?(d=M&~v,d!==0?y=tt(d):(C&=M,C!==0?y=tt(C):o||(o=M&~e,o!==0&&(y=tt(o))))):(M=d&~v,M!==0?y=tt(M):C!==0?y=tt(C):o||(o=d&~e,o!==0&&(y=tt(o)))),y===0?0:a!==0&&a!==y&&(a&v)===0&&(v=y&-y,o=a&-a,v>=o||v===32&&(o&4194048)!==0)?a:y}function Q(e,a){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&a)===0}function K(e,a){switch(e){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return console.error("Should have found matching lanes. This is a bug in React."),-1}}function pt(){var e=Ct;return Ct<<=1,(Ct&62914560)===0&&(Ct=4194304),e}function dt(e){for(var a=[],o=0;31>o;o++)a.push(e);return a}function $(e,a){e.pendingLanes|=a,a!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Et(e,a,o,d,y,v){var C=e.pendingLanes;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=o,e.entangledLanes&=o,e.errorRecoveryDisabledLanes&=o,e.shellSuspendCounter=0;var M=e.entanglements,B=e.expirationTimes,q=e.hiddenUpdates;for(o=C&~o;0<o;){var ot=31-In(o),ct=1<<ot;M[ot]=0,B[ot]=-1;var gt=q[ot];if(gt!==null)for(q[ot]=null,ot=0;ot<gt.length;ot++){var jt=gt[ot];jt!==null&&(jt.lane&=-536870913)}o&=~ct}d!==0&&Rt(e,d,0),v!==0&&y===0&&e.tag!==0&&(e.suspendedLanes|=v&~(C&~a))}function Rt(e,a,o){e.pendingLanes|=a,e.suspendedLanes&=~a;var d=31-In(a);e.entangledLanes|=a,e.entanglements[d]=e.entanglements[d]|1073741824|o&261930}function qt(e,a){var o=e.entangledLanes|=a;for(e=e.entanglements;o;){var d=31-In(o),y=1<<d;y&a|e[d]&a&&(e[d]|=a),o&=~y}}function Bt(e,a){var o=a&-a;return o=(o&42)!==0?1:Vt(o),(o&(e.suspendedLanes|a))!==0?0:o}function Vt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function se(e,a,o){if(Mr)for(e=e.pendingUpdatersLaneMap;0<o;){var d=31-In(o),y=1<<d;e[d].add(a),o&=~y}}function Ke(e,a){if(Mr)for(var o=e.pendingUpdatersLaneMap,d=e.memoizedUpdaters;0<a;){var y=31-In(a);e=1<<y,y=o[y],0<y.size&&(y.forEach(function(v){var C=v.alternate;C!==null&&d.has(C)||d.add(v)}),y.clear()),a&=~e}}function yn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Oe(e){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var a=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(a.isDisabled)return!0;if(!a.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{fp=a.inject(e),ci=a}catch(o){console.error("React instrumentation encountered an error: %o.",o)}return!!a.checkDCE}function It(e){if(typeof tj=="function"&&ej(e),ci&&typeof ci.setStrictMode=="function")try{ci.setStrictMode(fp,e)}catch(a){Ar||(Ar=!0,console.error("React instrumentation encountered an error: %o",a))}}function Jn(e,a){return e===a&&(e!==0||1/e===1/a)||e!==e&&a!==a}function Gt(e){for(var a=0,o=0;o<e.length;o++){var d=e[o];if(typeof d=="object"&&d!==null)if(Pn(d)&&d.length===2&&typeof d[0]=="string"){if(a!==0&&a!==3)return 1;a=3}else return 1;else{if(typeof d=="function"||typeof d=="string"&&50<d.length||a!==0&&a!==2)return 1;a=2}}return a}function xe(e,a,o,d){for(var y in e)S3.call(e,y)&&y[0]!=="_"&&$e(y,e[y],a,o,d)}function $e(e,a,o,d,y){switch(typeof a){case"object":if(a===null){a="null";break}else{if(a.$$typeof===Bl){var v=it(a.type)||"…",C=a.key;a=a.props;var M=Object.keys(a),B=M.length;if(C==null&&B===0){a="<"+v+" />";break}if(3>d||B===1&&M[0]==="children"&&C==null){a="<"+v+" … />";break}o.push([y+" ".repeat(d)+e,"<"+v]),C!==null&&$e("key",C,o,d+1,y),e=!1;for(var q in a)q==="children"?a.children!=null&&(!Pn(a.children)||0<a.children.length)&&(e=!0):S3.call(a,q)&&q[0]!=="_"&&$e(q,a[q],o,d+1,y);o.push(["",e?">…</"+v+">":"/>"]);return}if(v=Object.prototype.toString.call(a),v=v.slice(8,v.length-1),v==="Array"){if(q=Gt(a),q===2||q===0){a=JSON.stringify(a);break}else if(q===3){for(o.push([y+" ".repeat(d)+e,""]),e=0;e<a.length;e++)v=a[e],$e(v[0],v[1],o,d+1,y);return}}if(v==="Promise"){if(a.status==="fulfilled"){if(v=o.length,$e(e,a.value,o,d,y),o.length>v){o=o[v],o[1]="Promise<"+(o[1]||"Object")+">";return}}else if(a.status==="rejected"&&(v=o.length,$e(e,a.reason,o,d,y),o.length>v)){o=o[v],o[1]="Rejected Promise<"+o[1]+">";return}o.push([" ".repeat(d)+e,"Promise"]);return}v==="Object"&&(q=Object.getPrototypeOf(a))&&typeof q.constructor=="function"&&(v=q.constructor.name),o.push([y+" ".repeat(d)+e,v==="Object"?3>d?"":"…":v]),3>d&&xe(a,o,d+1,y);return}case"function":a=a.name===""?"() => {}":a.name+"() {}";break;case"string":a=a==="This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects."?"…":JSON.stringify(a);break;case"undefined":a="undefined";break;case"boolean":a=a?"true":"false";break;default:a=String(a)}o.push([y+" ".repeat(d)+e,a])}function da(e,a,o,d){var y=!0;for(C in e)C in a||(o.push(["– "+" ".repeat(d)+C,"…"]),y=!1);for(var v in a)if(v in e){var C=e[v],M=a[v];if(C!==M){if(d===0&&v==="children")y=" ".repeat(d)+v,o.push(["– "+y,"…"],["+ "+y,"…"]);else{if(!(3<=d)){if(typeof C=="object"&&typeof M=="object"&&C!==null&&M!==null&&C.$$typeof===M.$$typeof)if(M.$$typeof===Bl){if(C.type===M.type&&C.key===M.key){C=it(M.type)||"…",y=" ".repeat(d)+v,C="<"+C+" … />",o.push(["– "+y,C],["+ "+y,C]),y=!1;continue}}else{var B=Object.prototype.toString.call(C),q=Object.prototype.toString.call(M);if(B===q&&(q==="[object Object]"||q==="[object Array]")){B=[" "+" ".repeat(d)+v,q==="[object Array]"?"Array":""],o.push(B),q=o.length,da(C,M,o,d+1)?q===o.length&&(B[1]="Referentially unequal but deeply equal objects. Consider memoization."):y=!1;continue}}else if(typeof C=="function"&&typeof M=="function"&&C.name===M.name&&C.length===M.length&&(B=Function.prototype.toString.call(C),q=Function.prototype.toString.call(M),B===q)){C=M.name===""?"() => {}":M.name+"() {}",o.push([" "+" ".repeat(d)+v,C+" Referentially unequal function closure. Consider memoization."]);continue}}$e(v,C,o,d,"– "),$e(v,M,o,d,"+ ")}y=!1}}else o.push(["+ "+" ".repeat(d)+v,"…"]),y=!1;return y}function cn(e){ve=e&63?"Blocking":e&64?"Gesture":e&4194176?"Transition":e&62914560?"Suspense":e&2080374784?"Idle":"Other"}function ea(e,a,o,d){ln&&(Qu.start=a,Qu.end=o,Do.color="warning",Do.tooltipText=d,Do.properties=null,(e=e._debugTask)?e.run(performance.measure.bind(performance,d,Qu)):performance.measure(d,Qu))}function Ms(e,a,o){ea(e,a,o,"Reconnect")}function di(e,a,o,d,y){var v=J(e);if(v!==null&&ln){var C=e.alternate,M=e.actualDuration;if(C===null||C.child!==e.child)for(var B=e.child;B!==null;B=B.sibling)M-=B.actualDuration;d=.5>M?d?"tertiary-light":"primary-light":10>M?d?"tertiary":"primary":100>M?d?"tertiary-dark":"primary-dark":"error";var q=e.memoizedProps;M=e._debugTask,q!==null&&C!==null&&C.memoizedProps!==q?(B=[ij],q=da(C.memoizedProps,q,B,0),1<B.length&&(q&&!Ku&&(C.lanes&y)===0&&100<e.actualDuration?(Ku=!0,B[0]=sj,Do.color="warning",Do.tooltipText="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner."):(Do.color=d,Do.tooltipText=v),Do.properties=B,Qu.start=a,Qu.end=o,M!=null?M.run(performance.measure.bind(performance,""+v,Qu)):performance.measure(""+v,Qu))):M!=null?M.run(console.timeStamp.bind(console,v,a,o,"Components ⚛",void 0,d)):console.timeStamp(v,a,o,"Components ⚛",void 0,d)}}function Ii(e,a,o,d){if(ln){var y=J(e);if(y!==null){for(var v=null,C=[],M=0;M<d.length;M++){var B=d[M];v==null&&B.source!==null&&(v=B.source._debugTask),B=B.value,C.push(["Error",typeof B=="object"&&B!==null&&typeof B.message=="string"?String(B.message):String(B)])}e.key!==null&&$e("key",e.key,C,0,""),e.memoizedProps!==null&&xe(e.memoizedProps,C,0,""),v==null&&(v=e._debugTask),e={start:a,end:o,detail:{devtools:{color:"error",track:"Components ⚛",tooltipText:e.tag===13?"Hydration failed":"Error boundary caught an error",properties:C}}},v?v.run(performance.measure.bind(performance,""+y,e)):performance.measure(""+y,e)}}}function jn(e,a,o,d,y){if(y!==null){if(ln){var v=J(e);if(v!==null){d=[];for(var C=0;C<y.length;C++){var M=y[C].value;d.push(["Error",typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M)])}e.key!==null&&$e("key",e.key,d,0,""),e.memoizedProps!==null&&xe(e.memoizedProps,d,0,""),a={start:a,end:o,detail:{devtools:{color:"error",track:"Components ⚛",tooltipText:"A lifecycle or effect errored",properties:d}}},(e=e._debugTask)?e.run(performance.measure.bind(performance,""+v,a)):performance.measure(""+v,a)}}}else v=J(e),v!==null&&ln&&(y=1>d?"secondary-light":100>d?"secondary":500>d?"secondary-dark":"error",(e=e._debugTask)?e.run(console.timeStamp.bind(console,v,a,o,"Components ⚛",void 0,y)):console.timeStamp(v,a,o,"Components ⚛",void 0,y))}function Mn(e,a,o,d){if(ln&&!(a<=e)){var y=(o&738197653)===o?"tertiary-dark":"primary-dark";o=(o&536870912)===o?"Prepared":(o&201326741)===o?"Hydrated":"Render",d?d.run(console.timeStamp.bind(console,o,e,a,ve,"Scheduler ⚛",y)):console.timeStamp(o,e,a,ve,"Scheduler ⚛",y)}}function Oi(e,a,o,d){!ln||a<=e||(o=(o&738197653)===o?"tertiary-dark":"primary-dark",d?d.run(console.timeStamp.bind(console,"Prewarm",e,a,ve,"Scheduler ⚛",o)):console.timeStamp("Prewarm",e,a,ve,"Scheduler ⚛",o))}function Ht(e,a,o,d){!ln||a<=e||(o=(o&738197653)===o?"tertiary-dark":"primary-dark",d?d.run(console.timeStamp.bind(console,"Suspended",e,a,ve,"Scheduler ⚛",o)):console.timeStamp("Suspended",e,a,ve,"Scheduler ⚛",o))}function De(e,a,o,d,y,v){if(ln&&!(a<=e)){o=[];for(var C=0;C<d.length;C++){var M=d[C].value;o.push(["Recoverable Error",typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M)])}e={start:e,end:a,detail:{devtools:{color:"primary-dark",track:ve,trackGroup:"Scheduler ⚛",tooltipText:y?"Hydration Failed":"Recovered after Error",properties:o}}},v?v.run(performance.measure.bind(performance,"Recovered",e)):performance.measure("Recovered",e)}}function na(e,a,o,d){!ln||a<=e||(d?d.run(console.timeStamp.bind(console,"Errored",e,a,ve,"Scheduler ⚛","error")):console.timeStamp("Errored",e,a,ve,"Scheduler ⚛","error"))}function pi(e,a,o,d){!ln||a<=e||(d?d.run(console.timeStamp.bind(console,o,e,a,ve,"Scheduler ⚛","secondary-light")):console.timeStamp(o,e,a,ve,"Scheduler ⚛","secondary-light"))}function tn(e,a,o,d,y){if(ln&&!(a<=e)){for(var v=[],C=0;C<o.length;C++){var M=o[C].value;v.push(["Error",typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M)])}e={start:e,end:a,detail:{devtools:{color:"error",track:ve,trackGroup:"Scheduler ⚛",tooltipText:d?"Remaining Effects Errored":"Commit Errored",properties:v}}},y?y.run(performance.measure.bind(performance,"Errored",e)):performance.measure("Errored",e)}}function Nn(){}function ml(){if(Zm===0){V9=console.log,G9=console.info,j9=console.warn,L9=console.error,P9=console.group,Y9=console.groupCollapsed,q9=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Nn,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Zm++}function nr(){if(Zm--,Zm===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Re({},e,{value:V9}),info:Re({},e,{value:G9}),warn:Re({},e,{value:j9}),error:Re({},e,{value:L9}),group:Re({},e,{value:P9}),groupCollapsed:Re({},e,{value:Y9}),groupEnd:Re({},e,{value:q9})})}0>Zm&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function Ns(e){var a=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,e=e.stack,Error.prepareStackTrace=a,e.startsWith(`Error: react-stack-top-frame
|
|
27
27
|
`)&&(e=e.slice(29)),a=e.indexOf(`
|
|
28
28
|
`),a!==-1&&(e=e.slice(a+1)),a=e.indexOf("react_stack_bottom_frame"),a!==-1&&(a=e.lastIndexOf(`
|
|
29
|
-
`,a)),a!==-1)e=e.slice(0,a);else return"";return e}function
|
|
29
|
+
`,a)),a!==-1)e=e.slice(0,a);else return"";return e}function Ca(e){if(b3===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);b3=a&&a[1]||"",X9=-1<o.stack.indexOf(`
|
|
30
30
|
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
31
|
-
`+b3+e+
|
|
32
|
-
`),
|
|
33
|
-
`);for(C=v=0;v<q.length&&!q[v].includes("DetermineComponentFrameRoot");)v++;for(;C<
|
|
34
|
-
`+q[v].replace(" at new "," at ");return e.displayName&&
|
|
35
|
-
`),
|
|
36
|
-
`+
|
|
37
|
-
Error generating stack: `+
|
|
38
|
-
`+
|
|
39
|
-
`;if(typeof a=="string"){for(var y=0;y<a.length&&y<e.length&&a.charCodeAt(y)===e.charCodeAt(y);y++);return y>d-8&&10<y&&(e="..."+e.slice(y-8),a="..."+a.slice(y-8)),
|
|
40
|
-
`+
|
|
41
|
-
`}return
|
|
42
|
-
`}function
|
|
31
|
+
`+b3+e+X9}function Dc(e,a){if(!e||E3)return"";var o=T3.get(e);if(o!==void 0)return o;E3=!0,o=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var d=null;d=st.H,st.H=null,ml();try{var y={DetermineComponentFrameRoot:function(){try{if(a){var gt=function(){throw Error()};if(Object.defineProperty(gt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(gt,[])}catch(kt){var jt=kt}Reflect.construct(e,[],gt)}else{try{gt.call()}catch(kt){jt=kt}e.call(gt.prototype)}}else{try{throw Error()}catch(kt){jt=kt}(gt=e())&&typeof gt.catch=="function"&>.catch(function(){})}}catch(kt){if(kt&&jt&&typeof kt.stack=="string")return[kt.stack,jt.stack]}return[null,null]}};y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(y.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(y.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var C=y.DetermineComponentFrameRoot(),M=C[0],B=C[1];if(M&&B){var q=M.split(`
|
|
32
|
+
`),ot=B.split(`
|
|
33
|
+
`);for(C=v=0;v<q.length&&!q[v].includes("DetermineComponentFrameRoot");)v++;for(;C<ot.length&&!ot[C].includes("DetermineComponentFrameRoot");)C++;if(v===q.length||C===ot.length)for(v=q.length-1,C=ot.length-1;1<=v&&0<=C&&q[v]!==ot[C];)C--;for(;1<=v&&0<=C;v--,C--)if(q[v]!==ot[C]){if(v!==1||C!==1)do if(v--,C--,0>C||q[v]!==ot[C]){var ct=`
|
|
34
|
+
`+q[v].replace(" at new "," at ");return e.displayName&&ct.includes("<anonymous>")&&(ct=ct.replace("<anonymous>",e.displayName)),typeof e=="function"&&T3.set(e,ct),ct}while(1<=v&&0<=C);break}}}finally{E3=!1,st.H=d,nr(),Error.prepareStackTrace=o}return q=(q=e?e.displayName||e.name:"")?Ca(q):"",typeof e=="function"&&T3.set(e,q),q}function z0(e,a){switch(e.tag){case 26:case 27:case 5:return Ca(e.type);case 16:return Ca("Lazy");case 13:return e.child!==a&&a!==null?Ca("Suspense Fallback"):Ca("Suspense");case 19:return Ca("SuspenseList");case 0:case 15:return Dc(e.type,!1);case 11:return Dc(e.type.render,!1);case 1:return Dc(e.type,!0);case 31:return Ca("Activity");default:return""}}function Zr(e){try{var a="",o=null;do{a+=z0(e,o);var d=e._debugInfo;if(d)for(var y=d.length-1;0<=y;y--){var v=d[y];if(typeof v.name=="string"){var C=a;t:{var M=v.name,B=v.env,q=v.debugLocation;if(q!=null){var ot=Ns(q),ct=ot.lastIndexOf(`
|
|
35
|
+
`),gt=ct===-1?ot:ot.slice(ct+1);if(gt.indexOf(M)!==-1){var jt=`
|
|
36
|
+
`+gt;break t}}jt=Ca(M+(B?" ["+B+"]":""))}a=C+jt}}o=e,e=e.return}while(e);return a}catch(kt){return`
|
|
37
|
+
Error generating stack: `+kt.message+`
|
|
38
|
+
`+kt.stack}}function Ac(e){return(e=e?e.displayName||e.name:"")?Ca(e):""}function Va(e,a){if(typeof e=="object"&&e!==null){var o=C3.get(e);return o!==void 0?o:(a={value:e,source:a,stack:Zr(a)},C3.set(e,a),a)}return{value:e,source:a,stack:Zr(a)}}function Ri(e,a){gl(),hp[dp++]=Jm,hp[dp++]=By,By=e,Jm=a}function ar(e,a,o){gl(),$s[tl++]=Ao,$s[tl++]=Mo,$s[tl++]=Vf,Vf=e;var d=Ao;e=Mo;var y=32-In(d)-1;d&=~(1<<y),o+=1;var v=32-In(a)+y;if(30<v){var C=y-y%5;v=(d&(1<<C)-1).toString(32),d>>=C,y-=C,Ao=1<<32-In(a)+y|o<<y|d,Mo=v+e}else Ao=1<<v|o<<y|d,Mo=e}function Ut(e){gl(),e.return!==null&&(Ri(e,1),ar(e,1,0))}function ce(e){for(;e===By;)By=hp[--dp],hp[dp]=null,Jm=hp[--dp],hp[dp]=null;for(;e===Vf;)Vf=$s[--tl],$s[tl]=null,Mo=$s[--tl],$s[tl]=null,Ao=$s[--tl],$s[tl]=null}function ir(){return gl(),Vf!==null?{id:Ao,overflow:Mo}:null}function Mc(e,a){gl(),$s[tl++]=Ao,$s[tl++]=Mo,$s[tl++]=Vf,Ao=a.id,Mo=a.overflow,Vf=e}function gl(){me||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function Wa(e){return e===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),e}function Nc(e,a){ht(Ju,a,e),ht(Fm,e,e),ht(Zu,null,e),a=Zs(a),nt(Zu,e),ht(Zu,a,e)}function Jr(e){nt(Zu,e),nt(Fm,e),nt(Ju,e)}function mi(){return Wa(Zu.current)}function Fr(e){e.memoizedState!==null&&ht(Vy,e,e);var a=Wa(Zu.current),o=ba(a,e.type);a!==o&&(ht(Fm,e,e),ht(Zu,o,e))}function kr(e){Fm.current===e&&(nt(Zu,e),nt(Fm,e)),Vy.current===e&&(nt(Vy,e),Ka?Yi._currentValue=Pi:Yi._currentValue2=Pi)}function H0(e,a){return e.serverProps===void 0&&e.serverTail.length===0&&e.children.length===1&&3<e.distanceFromLeaf&&e.distanceFromLeaf>15-a?H0(e.children[0],a):e}function _a(e){return" "+" ".repeat(e)}function yl(e){return"+ "+" ".repeat(e)}function vl(e){return"- "+" ".repeat(e)}function sr(e){switch(e.tag){case 26:case 27:case 5:return e.type;case 16:return"Lazy";case 31:return"Activity";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return e=e.type,e.displayName||e.name||null;case 11:return e=e.type.render,e.displayName||e.name||null;case 1:return e=e.type,e.displayName||e.name||null;default:return null}}function su(e,a){return K9.test(e)?(e=JSON.stringify(e),e.length>a-2?8>a?'{"..."}':"{"+e.slice(0,a-7)+'..."}':"{"+e+"}"):e.length>a?5>a?'{"..."}':e.slice(0,a-3)+"...":e}function Ir(e,a,o){var d=120-2*o;if(a===null)return yl(o)+su(e,d)+`
|
|
39
|
+
`;if(typeof a=="string"){for(var y=0;y<a.length&&y<e.length&&a.charCodeAt(y)===e.charCodeAt(y);y++);return y>d-8&&10<y&&(e="..."+e.slice(y-8),a="..."+a.slice(y-8)),yl(o)+su(e,d)+`
|
|
40
|
+
`+vl(o)+su(a,d)+`
|
|
41
|
+
`}return _a(o)+su(e,d)+`
|
|
42
|
+
`}function Oc(e){return Object.prototype.toString.call(e).replace(/^\[object (.*)\]$/,function(a,o){return o})}function Wr(e,a){switch(typeof e){case"string":return e=JSON.stringify(e),e.length>a?5>a?'"..."':e.slice(0,a-4)+'..."':e;case"object":if(e===null)return"null";if(Pn(e))return"[...]";if(e.$$typeof===Bl)return(a=it(e.type))?"<"+a+">":"<...>";var o=Oc(e);if(o==="Object"){o="",a-=2;for(var d in e)if(e.hasOwnProperty(d)){var y=JSON.stringify(d);if(y!=='"'+d+'"'&&(d=y),a-=d.length-2,y=Wr(e[d],15>a?a:15),a-=y.length,0>a){o+=o===""?"...":", ...";break}o+=(o===""?"":",")+d+":"+y}return"{"+o+"}"}return o;case"function":return(a=e.displayName||e.name)?"function "+a:"function";default:return String(e)}}function gi(e,a){return typeof e!="string"||K9.test(e)?"{"+Wr(e,a-2)+"}":e.length>a-2?5>a?'"..."':'"'+e.slice(0,a-5)+'..."':'"'+e+'"'}function Os(e,a,o){var d=120-o.length-e.length,y=[],v;for(v in a)if(a.hasOwnProperty(v)&&v!=="children"){var C=gi(a[v],120-o.length-v.length-1);d-=v.length+C.length+2,y.push(v+"="+C)}return y.length===0?o+"<"+e+`>
|
|
43
43
|
`:0<d?o+"<"+e+" "+y.join(" ")+`>
|
|
44
44
|
`:o+"<"+e+`
|
|
45
45
|
`+o+" "+y.join(`
|
|
46
46
|
`+o+" ")+`
|
|
47
47
|
`+o+`>
|
|
48
|
-
`}function
|
|
49
|
-
`,d+=
|
|
50
|
-
`):d+=
|
|
51
|
-
`}for(var B in y)y.hasOwnProperty(B)&&(e=
|
|
52
|
-
`);return d}function
|
|
53
|
-
`+
|
|
54
|
-
`:(y+=
|
|
55
|
-
`,y+=
|
|
56
|
-
`)}else y+=
|
|
57
|
-
`}v.forEach(function(
|
|
58
|
-
`}}),y=y===""?
|
|
59
|
-
`:
|
|
60
|
-
`+y+
|
|
61
|
-
`}return e=o.children,a=a.children,typeof e=="string"||typeof e=="number"||typeof e=="bigint"?(v="",(typeof a=="string"||typeof a=="number"||typeof a=="bigint")&&(v=""+a),y+=
|
|
62
|
-
`}function
|
|
63
|
-
|
|
64
|
-
`,a++)}if(d="",y=e.fiber.pendingProps,e.fiber.tag===6)d=
|
|
65
|
-
`,a++}else e.serverProps===null?(d=
|
|
66
|
-
`),y=e.serverTail,e.serverProps===null&&a--,e=0;e<y.length;e++)v=y[e],q=typeof v=="string"?q+(
|
|
67
|
-
`):q+
|
|
68
|
-
|
|
69
|
-
|
|
48
|
+
`}function Rc(e,a,o){var d="",y=Re({},a),v;for(v in e)if(e.hasOwnProperty(v)){delete y[v];var C=120-2*o-v.length-2,M=Wr(e[v],C);a.hasOwnProperty(v)?(C=Wr(a[v],C),d+=yl(o)+v+": "+M+`
|
|
49
|
+
`,d+=vl(o)+v+": "+C+`
|
|
50
|
+
`):d+=yl(o)+v+": "+M+`
|
|
51
|
+
`}for(var B in y)y.hasOwnProperty(B)&&(e=Wr(y[B],120-2*o-B.length-2),d+=vl(o)+B+": "+e+`
|
|
52
|
+
`);return d}function w0(e,a,o,d){var y="",v=new Map;for(q in o)o.hasOwnProperty(q)&&v.set(q.toLowerCase(),q);if(v.size===1&&v.has("children"))y+=Os(e,a,_a(d));else{for(var C in a)if(a.hasOwnProperty(C)&&C!=="children"){var M=120-2*(d+1)-C.length-1,B=v.get(C.toLowerCase());if(B!==void 0){v.delete(C.toLowerCase());var q=a[C];B=o[B];var ot=gi(q,M);M=gi(B,M),typeof q=="object"&&q!==null&&typeof B=="object"&&B!==null&&Oc(q)==="Object"&&Oc(B)==="Object"&&(2<Object.keys(q).length||2<Object.keys(B).length||-1<ot.indexOf("...")||-1<M.indexOf("..."))?y+=_a(d+1)+C+`={{
|
|
53
|
+
`+Rc(q,B,d+2)+_a(d+1)+`}}
|
|
54
|
+
`:(y+=yl(d+1)+C+"="+ot+`
|
|
55
|
+
`,y+=vl(d+1)+C+"="+M+`
|
|
56
|
+
`)}else y+=_a(d+1)+C+"="+gi(a[C],M)+`
|
|
57
|
+
`}v.forEach(function(ct){if(ct!=="children"){var gt=120-2*(d+1)-ct.length-1;y+=vl(d+1)+ct+"="+gi(o[ct],gt)+`
|
|
58
|
+
`}}),y=y===""?_a(d)+"<"+e+`>
|
|
59
|
+
`:_a(d)+"<"+e+`
|
|
60
|
+
`+y+_a(d)+`>
|
|
61
|
+
`}return e=o.children,a=a.children,typeof e=="string"||typeof e=="number"||typeof e=="bigint"?(v="",(typeof a=="string"||typeof a=="number"||typeof a=="bigint")&&(v=""+a),y+=Ir(v,""+e,d+1)):(typeof a=="string"||typeof a=="number"||typeof a=="bigint")&&(y=e==null?y+Ir(""+a,null,d+1):y+Ir(""+a,void 0,d+1)),y}function lu(e,a){var o=sr(e);if(o===null){for(o="",e=e.child;e;)o+=lu(e,a),e=e.sibling;return o}return _a(a)+"<"+o+`>
|
|
62
|
+
`}function $r(e,a){var o=H0(e,a);if(o!==e&&(e.children.length!==1||e.children[0]!==o))return _a(a)+`...
|
|
63
|
+
`+$r(o,a+1);o="";var d=e.fiber._debugInfo;if(d)for(var y=0;y<d.length;y++){var v=d[y].name;typeof v=="string"&&(o+=_a(a)+"<"+v+`>
|
|
64
|
+
`,a++)}if(d="",y=e.fiber.pendingProps,e.fiber.tag===6)d=Ir(y,e.serverProps,a),a++;else if(v=sr(e.fiber),v!==null)if(e.serverProps===void 0){d=a;var C=120-2*d-v.length-2,M="";for(q in y)if(y.hasOwnProperty(q)&&q!=="children"){var B=gi(y[q],15);if(C-=q.length+B.length+2,0>C){M+=" ...";break}M+=" "+q+"="+B}d=_a(d)+"<"+v+M+`>
|
|
65
|
+
`,a++}else e.serverProps===null?(d=Os(v,y,yl(a)),a++):typeof e.serverProps=="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):(d=w0(v,y,e.serverProps,a),a++);var q="";for(y=e.fiber.child,v=0;y&&v<e.children.length;)C=e.children[v],C.fiber===y?(q+=$r(C,a),v++):q+=lu(y,a),y=y.sibling;for(y&&0<e.children.length&&(q+=_a(a)+`...
|
|
66
|
+
`),y=e.serverTail,e.serverProps===null&&a--,e=0;e<y.length;e++)v=y[e],q=typeof v=="string"?q+(vl(a)+su(v,120-2*a)+`
|
|
67
|
+
`):q+Os(v.type,v.props,vl(a));return o+d+q}function U0(e){try{return`
|
|
68
|
+
|
|
69
|
+
`+$r(e,0)}catch{return""}}function _g(){if(No===null)return"";var e=No;try{var a="";switch(e.tag===6&&(e=e.return),e.tag){case 26:case 27:case 5:a+=Ca(e.type);break;case 13:a+=Ca("Suspense");break;case 19:a+=Ca("SuspenseList");break;case 31:a+=Ca("Activity");break;case 30:case 0:case 15:case 1:e._debugOwner||a!==""||(a+=Ac(e.type));break;case 11:e._debugOwner||a!==""||(a+=Ac(e.type.render))}for(;e;)if(typeof e.tag=="number"){var o=e;e=o._debugOwner;var d=o._debugStack;if(e&&d){var y=Ns(d);y!==""&&(a+=`
|
|
70
70
|
`+y)}}else if(e.debugStack!=null){var v=e.debugStack;(e=e.owner)&&v&&(a+=`
|
|
71
|
-
`+
|
|
71
|
+
`+Ns(v))}else break;var C=a}catch(M){C=`
|
|
72
72
|
Error generating stack: `+M.message+`
|
|
73
|
-
`+M.stack}return C}function
|
|
73
|
+
`+M.stack}return C}function wt(e,a,o,d,y,v,C){var M=No;zc(e);try{return e!==null&&e._debugTask?e._debugTask.run(a.bind(null,o,d,y,v,C)):a(o,d,y,v,C)}finally{zc(M)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function zc(e){st.getCurrentStack=e===null?null:_g,Nr=!1,No=e}function Sl(e,a){if(e.return===null){if(ys===null)ys={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:a};else{if(ys.fiber!==e)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");ys.distanceFromLeaf>a&&(ys.distanceFromLeaf=a)}return ys}var o=Sl(e.return,a+1).children;return 0<o.length&&o[o.length-1].fiber===e?(o=o[o.length-1],o.distanceFromLeaf>a&&(o.distanceFromLeaf=a),o):(a={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:a},o.push(a),a)}function bl(){me&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug.")}function ru(e,a){Or||(e=Sl(e,0),e.serverProps=null,a!==null&&(a=qu(a),e.serverTail.push(a)))}function Rs(e){var a=1<arguments.length&&arguments[1]!==void 0?arguments[1]:!1,o="",d=ys;throw d!==null&&(ys=null,o=U0(d)),ou(Va(Error("Hydration failed because the server rendered "+(a?"text":"HTML")+` didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:
|
|
74
74
|
|
|
75
75
|
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
|
76
76
|
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
|
@@ -80,7 +80,7 @@ Error generating stack: `+M.message+`
|
|
|
80
80
|
|
|
81
81
|
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
|
82
82
|
|
|
83
|
-
https://react.dev/link/hydration-mismatch`+o),e)),_3}function
|
|
83
|
+
https://react.dev/link/hydration-mismatch`+o),e)),_3}function El(e,a){if(!Oa)throw Error("Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");he(e.stateNode,e.type,e.memoizedProps,a,e)||Rs(e,!0)}function $a(e){for(Qa=e.return;Qa;)switch(Qa.tag){case 5:case 31:case 13:el=!1;return;case 27:case 3:el=!0;return;default:Qa=Qa.return}}function Tl(e){if(!Oa||e!==Qa)return!1;if(!me)return $a(e),me=!0,!1;var a=e.tag;if(T?a!==3&&a!==27&&(a!==5||lp(e.type)&&!ue(e.type,e.memoizedProps))&&bn&&(fn(e),Rs(e)):a!==3&&(a!==5||lp(e.type)&&!ue(e.type,e.memoizedProps))&&bn&&(fn(e),Rs(e)),$a(e),a===13){if(!Oa)throw Error("Expected skipPastDehydratedSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");bn=Co(e)}else if(a===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");bn=Cr(e)}else bn=T&&a===27?y3(e.type,bn):Qa?Tr(e.stateNode):null;return!0}function fn(e){for(var a=bn;a;){var o=Sl(e,0),d=qu(a);o.serverTail.push(d),a=d.type==="Suspense"?Co(a):Tr(a)}}function Cl(){Oa&&(bn=Qa=null,Or=me=!1)}function Hc(){var e=Fu;return e!==null&&(Ai===null?Ai=e:Ai.push.apply(Ai,e),Fu=null),e}function ou(e){Fu===null?Fu=[e]:Fu.push(e)}function Hh(){var e=ys;if(e!==null){ys=null;for(var a=U0(e);0<e.children.length;)e=e.children[0];wt(e.fiber,function(){console.error(`A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:
|
|
84
84
|
|
|
85
85
|
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
|
86
86
|
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
|
@@ -90,31 +90,31 @@ https://react.dev/link/hydration-mismatch`+o),e)),_3}function gl(e,a){if(!Na)thr
|
|
|
90
90
|
|
|
91
91
|
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
|
92
92
|
|
|
93
|
-
%s%s`,"https://react.dev/link/hydration-mismatch",a)})}}function Rh(){fp=Ly=null,hp=!1}function Ms(e,a,o){Ka?(dt(Gy,a._currentValue,e),a._currentValue=o,dt(x3,a._currentRenderer,e),a._currentRenderer!==void 0&&a._currentRenderer!==null&&a._currentRenderer!==jy&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),a._currentRenderer=jy):(dt(Gy,a._currentValue2,e),a._currentValue2=o,dt(D3,a._currentRenderer2,e),a._currentRenderer2!==void 0&&a._currentRenderer2!==null&&a._currentRenderer2!==jy&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),a._currentRenderer2=jy)}function ki(e,a){var o=Gy.current;Ka?(e._currentValue=o,o=x3.current,lt(x3,a),e._currentRenderer=o):(e._currentValue2=o,o=D3.current,lt(D3,a),e._currentRenderer2=o),lt(Gy,a)}function Oc(e,a,o){for(;e!==null;){var d=e.alternate;if((e.childLanes&a)!==a?(e.childLanes|=a,d!==null&&(d.childLanes|=a)):d!==null&&(d.childLanes&a)!==a&&(d.childLanes|=a),e===o)break;e=e.return}e!==o&&console.error("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function pa(e,a,o,d){var y=e.child;for(y!==null&&(y.return=e);y!==null;){var v=y.dependencies;if(v!==null){var C=y.child;v=v.firstContext;t:for(;v!==null;){var M=v;v=y;for(var B=0;B<a.length;B++)if(M.context===a[B]){v.lanes|=o,M=v.alternate,M!==null&&(M.lanes|=o),Oc(v.return,o,e),d||(C=null);break t}v=M.next}}else if(y.tag===18){if(C=y.return,C===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");C.lanes|=o,v=C.alternate,v!==null&&(v.lanes|=o),Oc(C,o,e),C=null}else C=y.child;if(C!==null)C.return=y;else for(C=y;C!==null;){if(C===e){C=null;break}if(y=C.sibling,y!==null){y.return=C.return,C=y;break}C=C.return}y=C}}function Ye(e,a,o,d){e=null;for(var y=a,v=!1;y!==null;){if(!v){if((y.flags&524288)!==0)v=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var C=y.alternate;if(C===null)throw Error("Should have a current fiber. This is a bug in React.");if(C=C.memoizedProps,C!==null){var M=y.type;Ti(y.pendingProps.value,C.value)||(e!==null?e.push(M):e=[M])}}else if(y===Vy.current){if(C=y.alternate,C===null)throw Error("Should have a current fiber. This is a bug in React.");C.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(e!==null?e.push(ji):e=[ji])}y=y.return}e!==null&&pa(a,e,o,d),a.flags|=262144}function kr(e){for(e=e.firstContext;e!==null;){var a=e.context;if(!Ti(Ka?a._currentValue:a._currentValue2,e.memoizedValue))return!0;e=e.next}return!1}function Ii(e){Ly=e,fp=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ve(e){return hp&&console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),Ns(Ly,e)}function ou(e,a){return Ly===null&&Ii(e),Ns(e,a)}function Ns(e,a){var o=Ka?a._currentValue:a._currentValue2;if(a={context:a,memoizedValue:o,next:null},fp===null){if(e===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");fp=a,e.dependencies={lanes:0,firstContext:a,_debugThenableState:null},e.flags|=524288}else fp=fp.next=a;return o}function uu(){return{controller:new ij,data:new Map,refCount:0}}function Sl(e){e.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),e.refCount++}function Ir(e){e.refCount--,0>e.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),e.refCount===0&&sj(lj,function(){e.controller.abort()})}function Wi(e,a,o){(e&127)!==0?0>xr&&(xr=ia(),Jm=Py(a),A3=a,o!=null&&(M3=nt(o)),vf()&&(Bn=!0,ku=1),e=hs(),a=go(),e!==dp||a!==Fm?dp=-1.1:a!==null&&(ku=1),Bf=e,Fm=a):(e&4194048)!==0&&0>Ws&&(Ws=ia(),km=Py(a),K9=a,o!=null&&(Q9=nt(o)),0>No)&&(e=hs(),a=go(),(e!==Wu||a!==Vf)&&(Wu=-1.1),Iu=e,Vf=a)}function xg(e){if(0>xr){xr=ia(),Jm=e._debugTask!=null?e._debugTask:null,vf()&&(ku=1);var a=hs(),o=go();a!==dp||o!==Fm?dp=-1.1:o!==null&&(ku=1),Bf=a,Fm=o}0>Ws&&(Ws=ia(),km=e._debugTask!=null?e._debugTask:null,0>No)&&(e=hs(),a=go(),(e!==Wu||a!==Vf)&&(Wu=-1.1),Iu=e,Vf=a)}function Os(){var e=wf;return wf=0,e}function Rc(e){var a=wf;return wf=e,a}function cu(e){var a=wf;return wf+=e,a}function zc(){qt=Lt=-1.1}function Ga(){var e=Lt;return Lt=-1.1,e}function ti(e){0<=e&&(Lt=e)}function Rs(){var e=Sn;return Sn=-0,e}function $i(e){0<=e&&(Sn=e)}function ts(){var e=hn;return hn=null,e}function es(){var e=Bn;return Bn=!1,e}function Hc(e){Ci=ia(),0>e.actualStartTime&&(e.actualStartTime=Ci)}function zh(e){if(0<=Ci){var a=ia()-Ci;e.actualDuration+=a,e.selfBaseDuration=a,Ci=-1}}function w0(e){if(0<=Ci){var a=ia()-Ci;e.actualDuration+=a,Ci=-1}}function ns(){if(0<=Ci){var e=ia(),a=e-Ci;Ci=-1,wf+=a,Sn+=a,qt=e}}function U0(e){hn===null&&(hn=[]),hn.push(e),Ao===null&&(Ao=[]),Ao.push(e)}function as(){Ci=ia(),0>Lt&&(Lt=Ci)}function wc(e){for(var a=e.child;a;)e.actualDuration+=a.actualDuration,a=a.sibling}function Uc(){}function ja(e){e!==pp&&e.next===null&&(pp===null?Qy=pp=e:pp=pp.next=e),Zy=!0,rt.actQueue!==null?R3||(R3=!0,V0()):O3||(O3=!0,V0())}function Wr(e,a){if(!z3&&Zy){z3=!0;do for(var o=!1,d=Qy;d!==null;){if(e!==0){var y=d.pendingLanes;if(y===0)var v=0;else{var C=d.suspendedLanes,M=d.pingedLanes;v=(1<<31-kn(42|e)+1)-1,v&=y&~(C&~M),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(o=!0,Dg(d,v))}else v=ee,v=w(d,d===Xe?v:0,d.cancelPendingCommit!==null||d.timeoutHandle!==Xs),(v&3)===0||Z(d,v)||(o=!0,Dg(d,v));d=d.next}while(o);z3=!1}}function Bc(){wu(),fu()}function fu(){Zy=R3=O3=!1;var e=0;Gf!==0&&xf()&&(e=Gf);for(var a=fe(),o=null,d=Qy;d!==null;){var y=d.next,v=B0(d,a);v===0?(d.next=null,o===null?Qy=y:o.next=y,y===null&&(pp=o)):(o=d,(e!==0||(v&3)!==0)&&(Zy=!0)),d=y}ua!==sc&&ua!==g2||Wr(e),Gf!==0&&(Gf=0)}function B0(e,a){for(var o=e.suspendedLanes,d=e.pingedLanes,y=e.expirationTimes,v=e.pendingLanes&-62914561;0<v;){var C=31-kn(v),M=1<<C,B=y[C];B===-1?((M&o)===0||(M&d)!==0)&&(y[C]=K(M,a)):B<=a&&(e.expiredLanes|=M),v&=~M}if(a=Xe,o=ee,o=w(e,e===a?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Xs),d=e.callbackNode,o===0||e===a&&(je===Qf||je===Zf)||e.cancelPendingCommit!==null)return d!==null&&wh(d),e.callbackNode=null,e.callbackPriority=0;if((o&3)===0||Z(e,o)){if(a=o&-o,a!==e.callbackPriority||rt.actQueue!==null&&d!==H3)wh(d);else return a;switch(ln(o)){case 2:case 8:o=Gl;break;case 32:o=zf;break;case 268435456:o=z9;break;default:o=zf}return d=Hh.bind(null,e),rt.actQueue!==null?(rt.actQueue.push(d),o=H3):o=jt(o,d),e.callbackPriority=a,e.callbackNode=o,a}return d!==null&&wh(d),e.callbackPriority=2,e.callbackNode=null,2}function Hh(e,a){if(Ky=Xy=!1,wu(),ua!==sc&&ua!==g2)return e.callbackNode=null,e.callbackPriority=0,null;var o=e.callbackNode;if(ql===m2&&(ql=a5),Au()&&e.callbackNode!==o)return null;var d=ee;return d=w(e,e===Xe?d:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Xs),d===0?null:(Dm(e,d,a),B0(e,fe()),e.callbackNode!=null&&e.callbackNode===o?Hh.bind(null,e):null)}function Dg(e,a){if(Au())return null;Xy=Ky,Ky=!1,Dm(e,a,!0)}function wh(e){e!==H3&&e!==null&&fn(e)}function V0(){rt.actQueue!==null&&rt.actQueue.push(function(){return fu(),null}),zy?Li(function(){(de&(za|al))!==Ra?jt(ye,Bc):fu()}):jt(ye,Bc)}function Uh(){if(Gf===0){var e=jf;e===0&&(e=J,J<<=1,(J&261888)===0&&(J=256)),Gf=e}return Gf}function Ag(e,a){if(Wm===null){var o=Wm=[];w3=0,jf=Uh(),mp={status:"pending",value:void 0,then:function(d){o.push(d)}}}return w3++,a.then(G0,G0),a}function G0(){if(--w3===0&&(-1<Ws||(No=-1.1),Wm!==null)){mp!==null&&(mp.status="fulfilled");var e=Wm;Wm=null,jf=0,mp=null;for(var a=0;a<e.length;a++)(0,e[a])()}}function j0(e,a){var o=[],d={status:"pending",value:null,reason:null,then:function(y){o.push(y)}};return e.then(function(){d.status="fulfilled",d.value=a;for(var y=0;y<o.length;y++)(0,o[y])(a)},function(y){for(d.status="rejected",d.reason=y,y=0;y<o.length;y++)(0,o[y])(void 0)}),d}function Bh(){var e=Lf.current;return e!==null?e:Xe.pooledCache}function Vc(e,a){a===null?dt(Lf,Lf.current,e):dt(Lf,a.pool,e)}function Vh(){var e=Bh();return e===null?null:{parent:Ka?Un._currentValue:Un._currentValue2,pool:e}}function Gc(e,a){if(Ti(e,a))return!0;if(typeof e!="object"||e===null||typeof a!="object"||a===null)return!1;var o=Object.keys(e),d=Object.keys(a);if(o.length!==d.length)return!1;for(d=0;d<o.length;d++){var y=o[d];if(!S3.call(a,y)||!Ti(e[y],a[y]))return!1}return!0}function L0(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function P0(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Gh(e,a,o){rt.actQueue!==null&&(rt.didUsePromise=!0);var d=e.thenables;if(o=d[o],o===void 0?d.push(a):o!==a&&(e.didWarnAboutUncachedPromise||(e.didWarnAboutUncachedPromise=!0,console.error("A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.")),a.then(Uc,Uc),a=o),a._debugInfo===void 0){e=performance.now(),d=a.displayName;var y={name:typeof d=="string"?d:"Promise",start:e,end:e,value:a};a._debugInfo=[{awaited:y}],a.status!=="fulfilled"&&a.status!=="rejected"&&(e=function(){y.end=performance.now()},a.then(e,e))}switch(a.status){case"fulfilled":return a.value;case"rejected":throw e=a.reason,Mg(e),e;default:if(typeof a.status=="string")a.then(Uc,Uc);else{if(e=Xe,e!==null&&100<e.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");e=a,e.status="pending",e.then(function(v){if(a.status==="pending"){var C=a;C.status="fulfilled",C.value=v}},function(v){if(a.status==="pending"){var C=a;C.status="rejected",C.reason=v}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw e=a.reason,Mg(e),e}throw Yf=a,s1=!0,gp}}function bl(e){try{return cj(e)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Yf=a,s1=!0,gp):a}}function Y0(){if(Yf===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var e=Yf;return Yf=null,s1=!1,e}function Mg(e){if(e===gp||e===Fy)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function ma(e){var a=te;return e!=null&&(te=a===null?e:a.concat(e)),a}function jh(){var e=te;if(e!=null){for(var a=e.length-1;0<=a;a--)if(e[a].name!=null){var o=e[a].debugTask;if(o!=null)return o}}return null}function tr(e,a,o){for(var d=Object.keys(e.props),y=0;y<d.length;y++){var v=d[y];if(v!=="children"&&v!=="key"){a===null&&(a=Ud(e,o.mode,0),a._debugInfo=te,a.return=o),Bt(a,function(C){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",C)},v);break}}}function hu(e){var a=l1;return l1+=1,yp===null&&(yp=L0()),Gh(yp,e,a)}function er(e,a){a=a.props.ref,e.ref=a!==void 0?a:null}function q0(e,a){throw a.$$typeof===Oy?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
|
|
93
|
+
%s%s`,"https://react.dev/link/hydration-mismatch",a)})}}function wh(){pp=Ly=null,mp=!1}function zs(e,a,o){Ka?(ht(Gy,a._currentValue,e),a._currentValue=o,ht(x3,a._currentRenderer,e),a._currentRenderer!==void 0&&a._currentRenderer!==null&&a._currentRenderer!==jy&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),a._currentRenderer=jy):(ht(Gy,a._currentValue2,e),a._currentValue2=o,ht(D3,a._currentRenderer2,e),a._currentRenderer2!==void 0&&a._currentRenderer2!==null&&a._currentRenderer2!==jy&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),a._currentRenderer2=jy)}function Wi(e,a){var o=Gy.current;Ka?(e._currentValue=o,o=x3.current,nt(x3,a),e._currentRenderer=o):(e._currentValue2=o,o=D3.current,nt(D3,a),e._currentRenderer2=o),nt(Gy,a)}function wc(e,a,o){for(;e!==null;){var d=e.alternate;if((e.childLanes&a)!==a?(e.childLanes|=a,d!==null&&(d.childLanes|=a)):d!==null&&(d.childLanes&a)!==a&&(d.childLanes|=a),e===o)break;e=e.return}e!==o&&console.error("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function pa(e,a,o,d){var y=e.child;for(y!==null&&(y.return=e);y!==null;){var v=y.dependencies;if(v!==null){var C=y.child;v=v.firstContext;t:for(;v!==null;){var M=v;v=y;for(var B=0;B<a.length;B++)if(M.context===a[B]){v.lanes|=o,M=v.alternate,M!==null&&(M.lanes|=o),wc(v.return,o,e),d||(C=null);break t}v=M.next}}else if(y.tag===18){if(C=y.return,C===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");C.lanes|=o,v=C.alternate,v!==null&&(v.lanes|=o),wc(C,o,e),C=null}else C=y.child;if(C!==null)C.return=y;else for(C=y;C!==null;){if(C===e){C=null;break}if(y=C.sibling,y!==null){y.return=C.return,C=y;break}C=C.return}y=C}}function Qe(e,a,o,d){e=null;for(var y=a,v=!1;y!==null;){if(!v){if((y.flags&524288)!==0)v=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var C=y.alternate;if(C===null)throw Error("Should have a current fiber. This is a bug in React.");if(C=C.memoizedProps,C!==null){var M=y.type;Ci(y.pendingProps.value,C.value)||(e!==null?e.push(M):e=[M])}}else if(y===Vy.current){if(C=y.alternate,C===null)throw Error("Should have a current fiber. This is a bug in React.");C.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(e!==null?e.push(Yi):e=[Yi])}y=y.return}e!==null&&pa(a,e,o,d),a.flags|=262144}function to(e){for(e=e.firstContext;e!==null;){var a=e.context;if(!Ci(Ka?a._currentValue:a._currentValue2,e.memoizedValue))return!0;e=e.next}return!1}function $i(e){Ly=e,pp=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function je(e){return mp&&console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),Hs(Ly,e)}function uu(e,a){return Ly===null&&$i(e),Hs(e,a)}function Hs(e,a){var o=Ka?a._currentValue:a._currentValue2;if(a={context:a,memoizedValue:o,next:null},pp===null){if(e===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");pp=a,e.dependencies={lanes:0,firstContext:a,_debugThenableState:null},e.flags|=524288}else pp=pp.next=a;return o}function cu(){return{controller:new lj,data:new Map,refCount:0}}function _l(e){e.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),e.refCount++}function eo(e){e.refCount--,0>e.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),e.refCount===0&&rj(oj,function(){e.controller.abort()})}function ts(e,a,o){(e&127)!==0?0>Rr&&(Rr=sa(),km=Py(a),A3=a,o!=null&&(M3=J(o)),Tf()&&(Vn=!0,Iu=1),e=ps(),a=bo(),e!==gp||a!==Im?gp=-1.1:a!==null&&(Iu=1),Lf=e,Im=a):(e&4194048)!==0&&0>nl&&(nl=sa(),Wm=Py(a),Q9=a,o!=null&&(Z9=J(o)),0>Ho)&&(e=ps(),a=bo(),(e!==$u||a!==Pf)&&($u=-1.1),Wu=e,Pf=a)}function xg(e){if(0>Rr){Rr=sa(),km=e._debugTask!=null?e._debugTask:null,Tf()&&(Iu=1);var a=ps(),o=bo();a!==gp||o!==Im?gp=-1.1:o!==null&&(Iu=1),Lf=a,Im=o}0>nl&&(nl=sa(),Wm=e._debugTask!=null?e._debugTask:null,0>Ho)&&(e=ps(),a=bo(),(e!==$u||a!==Pf)&&($u=-1.1),Wu=e,Pf=a)}function ws(){var e=Gf;return Gf=0,e}function Uc(e){var a=Gf;return Gf=e,a}function fu(e){var a=Gf;return Gf+=e,a}function Bc(){Kt=Yt=-1.1}function Ga(){var e=Yt;return Yt=-1.1,e}function ti(e){0<=e&&(Yt=e)}function Us(){var e=En;return En=-0,e}function es(e){0<=e&&(En=e)}function ns(){var e=pn;return pn=null,e}function as(){var e=Vn;return Vn=!1,e}function Vc(e){_i=sa(),0>e.actualStartTime&&(e.actualStartTime=_i)}function Uh(e){if(0<=_i){var a=sa()-_i;e.actualDuration+=a,e.selfBaseDuration=a,_i=-1}}function B0(e){if(0<=_i){var a=sa()-_i;e.actualDuration+=a,_i=-1}}function is(){if(0<=_i){var e=sa(),a=e-_i;_i=-1,Gf+=a,En+=a,Kt=e}}function V0(e){pn===null&&(pn=[]),pn.push(e),Ro===null&&(Ro=[]),Ro.push(e)}function ss(){_i=sa(),0>Yt&&(Yt=_i)}function Gc(e){for(var a=e.child;a;)e.actualDuration+=a.actualDuration,a=a.sibling}function jc(){}function ja(e){e!==yp&&e.next===null&&(yp===null?Qy=yp=e:yp=yp.next=e),Zy=!0,st.actQueue!==null?R3||(R3=!0,j0()):O3||(O3=!0,j0())}function no(e,a){if(!z3&&Zy){z3=!0;do for(var o=!1,d=Qy;d!==null;){if(e!==0){var y=d.pendingLanes;if(y===0)var v=0;else{var C=d.suspendedLanes,M=d.pingedLanes;v=(1<<31-In(42|e)+1)-1,v&=y&~(C&~M),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(o=!0,Dg(d,v))}else v=ie,v=H(d,d===Je?v:0,d.cancelPendingCommit!==null||d.timeoutHandle!==Js),(v&3)===0||Q(d,v)||(o=!0,Dg(d,v));d=d.next}while(o);z3=!1}}function Lc(){Uu(),hu()}function hu(){Zy=R3=O3=!1;var e=0;Yf!==0&&Nf()&&(e=Yf);for(var a=pe(),o=null,d=Qy;d!==null;){var y=d.next,v=G0(d,a);v===0?(d.next=null,o===null?Qy=y:o.next=y,y===null&&(yp=o)):(o=d,(e!==0||(v&3)!==0)&&(Zy=!0)),d=y}ca!==lc&&ca!==g2||no(e),Yf!==0&&(Yf=0)}function G0(e,a){for(var o=e.suspendedLanes,d=e.pingedLanes,y=e.expirationTimes,v=e.pendingLanes&-62914561;0<v;){var C=31-In(v),M=1<<C,B=y[C];B===-1?((M&o)===0||(M&d)!==0)&&(y[C]=K(M,a)):B<=a&&(e.expiredLanes|=M),v&=~M}if(a=Je,o=ie,o=H(e,e===a?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Js),d=e.callbackNode,o===0||e===a&&(Pe===kf||Pe===If)||e.cancelPendingCommit!==null)return d!==null&&Vh(d),e.callbackNode=null,e.callbackPriority=0;if((o&3)===0||Q(e,o)){if(a=o&-o,a!==e.callbackPriority||st.actQueue!==null&&d!==H3)Vh(d);else return a;switch(yn(o)){case 2:case 8:o=ql;break;case 32:o=Bf;break;case 268435456:o=H9;break;default:o=Bf}return d=Bh.bind(null,e),st.actQueue!==null?(st.actQueue.push(d),o=H3):o=Pt(o,d),e.callbackPriority=a,e.callbackNode=o,a}return d!==null&&Vh(d),e.callbackPriority=2,e.callbackNode=null,2}function Bh(e,a){if(Ky=Xy=!1,Uu(),ca!==lc&&ca!==g2)return e.callbackNode=null,e.callbackPriority=0,null;var o=e.callbackNode;if(Jl===m2&&(Jl=a5),Mu()&&e.callbackNode!==o)return null;var d=ie;return d=H(e,e===Je?d:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Js),d===0?null:(Mm(e,d,a),G0(e,pe()),e.callbackNode!=null&&e.callbackNode===o?Bh.bind(null,e):null)}function Dg(e,a){if(Mu())return null;Xy=Ky,Ky=!1,Mm(e,a,!0)}function Vh(e){e!==H3&&e!==null&&dn(e)}function j0(){st.actQueue!==null&&st.actQueue.push(function(){return hu(),null}),zy?qi(function(){(ge&(Ha|rl))!==za?Pt(Se,Lc):hu()}):Pt(Se,Lc)}function Gh(){if(Yf===0){var e=qf;e===0&&(e=F,F<<=1,(F&261888)===0&&(F=256)),Yf=e}return Yf}function Ag(e,a){if(t1===null){var o=t1=[];w3=0,qf=Gh(),vp={status:"pending",value:void 0,then:function(d){o.push(d)}}}return w3++,a.then(L0,L0),a}function L0(){if(--w3===0&&(-1<nl||(Ho=-1.1),t1!==null)){vp!==null&&(vp.status="fulfilled");var e=t1;t1=null,qf=0,vp=null;for(var a=0;a<e.length;a++)(0,e[a])()}}function P0(e,a){var o=[],d={status:"pending",value:null,reason:null,then:function(y){o.push(y)}};return e.then(function(){d.status="fulfilled",d.value=a;for(var y=0;y<o.length;y++)(0,o[y])(a)},function(y){for(d.status="rejected",d.reason=y,y=0;y<o.length;y++)(0,o[y])(void 0)}),d}function jh(){var e=Xf.current;return e!==null?e:Je.pooledCache}function Pc(e,a){a===null?ht(Xf,Xf.current,e):ht(Xf,a.pool,e)}function Lh(){var e=jh();return e===null?null:{parent:Ka?Bn._currentValue:Bn._currentValue2,pool:e}}function Yc(e,a){if(Ci(e,a))return!0;if(typeof e!="object"||e===null||typeof a!="object"||a===null)return!1;var o=Object.keys(e),d=Object.keys(a);if(o.length!==d.length)return!1;for(d=0;d<o.length;d++){var y=o[d];if(!S3.call(a,y)||!Ci(e[y],a[y]))return!1}return!0}function Y0(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function q0(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ph(e,a,o){st.actQueue!==null&&(st.didUsePromise=!0);var d=e.thenables;if(o=d[o],o===void 0?d.push(a):o!==a&&(e.didWarnAboutUncachedPromise||(e.didWarnAboutUncachedPromise=!0,console.error("A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.")),a.then(jc,jc),a=o),a._debugInfo===void 0){e=performance.now(),d=a.displayName;var y={name:typeof d=="string"?d:"Promise",start:e,end:e,value:a};a._debugInfo=[{awaited:y}],a.status!=="fulfilled"&&a.status!=="rejected"&&(e=function(){y.end=performance.now()},a.then(e,e))}switch(a.status){case"fulfilled":return a.value;case"rejected":throw e=a.reason,Mg(e),e;default:if(typeof a.status=="string")a.then(jc,jc);else{if(e=Je,e!==null&&100<e.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");e=a,e.status="pending",e.then(function(v){if(a.status==="pending"){var C=a;C.status="fulfilled",C.value=v}},function(v){if(a.status==="pending"){var C=a;C.status="rejected",C.reason=v}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw e=a.reason,Mg(e),e}throw Qf=a,r1=!0,Sp}}function xl(e){try{return hj(e)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Qf=a,r1=!0,Sp):a}}function X0(){if(Qf===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var e=Qf;return Qf=null,r1=!1,e}function Mg(e){if(e===Sp||e===Fy)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function ma(e){var a=ae;return e!=null&&(ae=a===null?e:a.concat(e)),a}function Yh(){var e=ae;if(e!=null){for(var a=e.length-1;0<=a;a--)if(e[a].name!=null){var o=e[a].debugTask;if(o!=null)return o}}return null}function lr(e,a,o){for(var d=Object.keys(e.props),y=0;y<d.length;y++){var v=d[y];if(v!=="children"&&v!=="key"){a===null&&(a=Gd(e,o.mode,0),a._debugInfo=ae,a.return=o),wt(a,function(C){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",C)},v);break}}}function du(e){var a=o1;return o1+=1,bp===null&&(bp=Y0()),Ph(bp,e,a)}function rr(e,a){a=a.props.ref,e.ref=a!==void 0?a:null}function K0(e,a){throw a.$$typeof===Oy?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
|
|
94
94
|
- Multiple copies of the "react" package is used.
|
|
95
95
|
- A library pre-bundled an old copy of "react" or "react/jsx-runtime".
|
|
96
|
-
- A compiler tries to "inline" JSX instead of using the runtime.`):(e=Object.prototype.toString.call(a),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead."))}function
|
|
96
|
+
- A compiler tries to "inline" JSX instead of using the runtime.`):(e=Object.prototype.toString.call(a),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead."))}function qc(e,a){var o=Yh();o!==null?o.run(K0.bind(null,e,a)):K0(e,a)}function qh(e,a){var o=J(e)||"Component";hE[o]||(hE[o]=!0,a=a.displayName||a.name||"Component",e.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
|
97
97
|
root.render(%s)`,a,a,a):console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
|
98
|
-
<%s>{%s}</%s>`,a,a,o,a,o))}function
|
|
98
|
+
<%s>{%s}</%s>`,a,a,o,a,o))}function Xc(e,a){var o=Yh();o!==null?o.run(qh.bind(null,e,a)):qh(e,a)}function Q0(e,a){var o=J(e)||"Component";dE[o]||(dE[o]=!0,a=String(a),e.tag===3?console.error(`Symbols are not valid as a React child.
|
|
99
99
|
root.render(%s)`,a):console.error(`Symbols are not valid as a React child.
|
|
100
|
-
<%s>%s</%s>`,o,a,o))}function zs(e,a){var o=jh();o!==null?o.run(X0.bind(null,e,a)):X0(e,a)}function Pc(e){function a(P,Y){if(e){var Q=P.deletions;Q===null?(P.deletions=[Y],P.flags|=16):Q.push(Y)}}function o(P,Y){if(!e)return null;for(;Y!==null;)a(P,Y),Y=Y.sibling;return null}function d(P){for(var Y=new Map;P!==null;)P.key!==null?Y.set(P.key,P):Y.set(P.index,P),P=P.sibling;return Y}function y(P,Y){return P=Ol(P,Y),P.index=0,P.sibling=null,P}function v(P,Y,Q){return P.index=Q,e?(Q=P.alternate,Q!==null?(Q=Q.index,Q<Y?(P.flags|=67108866,Y):Q):(P.flags|=67108866,Y)):(P.flags|=1048576,Y)}function C(P){return e&&P.alternate===null&&(P.flags|=67108866),P}function M(P,Y,Q,mt){return Y===null||Y.tag!==6?(Y=Bd(Q,P.mode,mt),Y.return=P,Y._debugOwner=P,Y._debugTask=P._debugTask,Y._debugInfo=te,Y):(Y=y(Y,Q),Y.return=P,Y._debugInfo=te,Y)}function B(P,Y,Q,mt){var zt=Q.type;return zt===Ru?(Y=ct(P,Y,Q.props.children,mt,Q.key),tr(Q,Y,P),Y):Y!==null&&(Y.elementType===zt||Hm(Y,Q)||typeof zt=="object"&&zt!==null&&zt.$$typeof===li&&bl(zt)===Y.type)?(Y=y(Y,Q.props),er(Y,Q),Y.return=P,Y._debugOwner=Q._owner,Y._debugInfo=te,Y):(Y=Ud(Q,P.mode,mt),er(Y,Q),Y.return=P,Y._debugInfo=te,Y)}function q(P,Y,Q,mt){return Y===null||Y.tag!==4||Y.stateNode.containerInfo!==Q.containerInfo||Y.stateNode.implementation!==Q.implementation?(Y=bf(Q,P.mode,mt),Y.return=P,Y._debugInfo=te,Y):(Y=y(Y,Q.children||[]),Y.return=P,Y._debugInfo=te,Y)}function ct(P,Y,Q,mt,zt){return Y===null||Y.tag!==7?(Y=hr(Q,P.mode,mt,zt),Y.return=P,Y._debugOwner=P,Y._debugTask=P._debugTask,Y._debugInfo=te,Y):(Y=y(Y,Q),Y.return=P,Y._debugInfo=te,Y)}function ht(P,Y,Q){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return Y=Bd(""+Y,P.mode,Q),Y.return=P,Y._debugOwner=P,Y._debugTask=P._debugTask,Y._debugInfo=te,Y;if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case Rl:return Q=Ud(Y,P.mode,Q),er(Q,Y),Q.return=P,P=ma(Y._debugInfo),Q._debugInfo=te,te=P,Q;case zl:return Y=bf(Y,P.mode,Q),Y.return=P,Y._debugInfo=te,Y;case li:var mt=ma(Y._debugInfo);return Y=bl(Y),P=ht(P,Y,Q),te=mt,P}if(Pn(Y)||I(Y))return Q=hr(Y,P.mode,Q,null),Q.return=P,Q._debugOwner=P,Q._debugTask=P._debugTask,P=ma(Y._debugInfo),Q._debugInfo=te,te=P,Q;if(typeof Y.then=="function")return mt=ma(Y._debugInfo),P=ht(P,hu(Y),Q),te=mt,P;if(Y.$$typeof===Rn)return ht(P,ou(P,Y),Q);jc(P,Y)}return typeof Y=="function"&&Lc(P,Y),typeof Y=="symbol"&&zs(P,Y),null}function yt(P,Y,Q,mt){var zt=Y!==null?Y.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return zt!==null?null:M(P,Y,""+Q,mt);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Rl:return Q.key===zt?(zt=ma(Q._debugInfo),P=B(P,Y,Q,mt),te=zt,P):null;case zl:return Q.key===zt?q(P,Y,Q,mt):null;case li:return zt=ma(Q._debugInfo),Q=bl(Q),P=yt(P,Y,Q,mt),te=zt,P}if(Pn(Q)||I(Q))return zt!==null?null:(zt=ma(Q._debugInfo),P=ct(P,Y,Q,mt,null),te=zt,P);if(typeof Q.then=="function")return zt=ma(Q._debugInfo),P=yt(P,Y,hu(Q),mt),te=zt,P;if(Q.$$typeof===Rn)return yt(P,Y,ou(P,Q),mt);jc(P,Q)}return typeof Q=="function"&&Lc(P,Q),typeof Q=="symbol"&&zs(P,Q),null}function Vt(P,Y,Q,mt,zt){if(typeof mt=="string"&&mt!==""||typeof mt=="number"||typeof mt=="bigint")return P=P.get(Q)||null,M(Y,P,""+mt,zt);if(typeof mt=="object"&&mt!==null){switch(mt.$$typeof){case Rl:return Q=P.get(mt.key===null?Q:mt.key)||null,P=ma(mt._debugInfo),Y=B(Y,Q,mt,zt),te=P,Y;case zl:return P=P.get(mt.key===null?Q:mt.key)||null,q(Y,P,mt,zt);case li:var Te=ma(mt._debugInfo);return mt=bl(mt),Y=Vt(P,Y,Q,mt,zt),te=Te,Y}if(Pn(mt)||I(mt))return Q=P.get(Q)||null,P=ma(mt._debugInfo),Y=ct(Y,Q,mt,zt,null),te=P,Y;if(typeof mt.then=="function")return Te=ma(mt._debugInfo),Y=Vt(P,Y,Q,hu(mt),zt),te=Te,Y;if(mt.$$typeof===Rn)return Vt(P,Y,Q,ou(Y,mt),zt);jc(Y,mt)}return typeof mt=="function"&&Lc(Y,mt),typeof mt=="symbol"&&zs(Y,mt),null}function Jt(P,Y,Q,mt){if(typeof Q!="object"||Q===null)return mt;switch(Q.$$typeof){case Rl:case zl:R(P,Y,Q);var zt=Q.key;if(typeof zt!="string")break;if(mt===null){mt=new Set,mt.add(zt);break}if(!mt.has(zt)){mt.add(zt);break}Bt(Y,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",zt)});break;case li:Q=bl(Q),Jt(P,Y,Q,mt)}return mt}function Pe(P,Y,Q,mt){for(var zt=null,Te=null,Zt=null,It=Y,Wt=Y=0,nn=null;It!==null&&Wt<Q.length;Wt++){It.index>Wt?(nn=It,It=null):nn=It.sibling;var Wn=yt(P,It,Q[Wt],mt);if(Wn===null){It===null&&(It=nn);break}zt=Jt(P,Wn,Q[Wt],zt),e&&It&&Wn.alternate===null&&a(P,It),Y=v(Wn,Y,Wt),Zt===null?Te=Wn:Zt.sibling=Wn,Zt=Wn,It=nn}if(Wt===Q.length)return o(P,It),he&&ge(P,Wt),Te;if(It===null){for(;Wt<Q.length;Wt++)It=ht(P,Q[Wt],mt),It!==null&&(zt=Jt(P,It,Q[Wt],zt),Y=v(It,Y,Wt),Zt===null?Te=It:Zt.sibling=It,Zt=It);return he&&ge(P,Wt),Te}for(It=d(It);Wt<Q.length;Wt++)nn=Vt(It,P,Wt,Q[Wt],mt),nn!==null&&(zt=Jt(P,nn,Q[Wt],zt),e&&nn.alternate!==null&&It.delete(nn.key===null?Wt:nn.key),Y=v(nn,Y,Wt),Zt===null?Te=nn:Zt.sibling=nn,Zt=nn);return e&&It.forEach(function(Bo){return a(P,Bo)}),he&&ge(P,Wt),Te}function zp(P,Y,Q,mt){if(Q==null)throw Error("An iterable object provided no iterator.");for(var zt=null,Te=null,Zt=Y,It=Y=0,Wt=null,nn=null,Wn=Q.next();Zt!==null&&!Wn.done;It++,Wn=Q.next()){Zt.index>It?(Wt=Zt,Zt=null):Wt=Zt.sibling;var Bo=yt(P,Zt,Wn.value,mt);if(Bo===null){Zt===null&&(Zt=Wt);break}nn=Jt(P,Bo,Wn.value,nn),e&&Zt&&Bo.alternate===null&&a(P,Zt),Y=v(Bo,Y,It),Te===null?zt=Bo:Te.sibling=Bo,Te=Bo,Zt=Wt}if(Wn.done)return o(P,Zt),he&&ge(P,It),zt;if(Zt===null){for(;!Wn.done;It++,Wn=Q.next())Zt=ht(P,Wn.value,mt),Zt!==null&&(nn=Jt(P,Zt,Wn.value,nn),Y=v(Zt,Y,It),Te===null?zt=Zt:Te.sibling=Zt,Te=Zt);return he&&ge(P,It),zt}for(Zt=d(Zt);!Wn.done;It++,Wn=Q.next())Wt=Vt(Zt,P,It,Wn.value,mt),Wt!==null&&(nn=Jt(P,Wt,Wn.value,nn),e&&Wt.alternate!==null&&Zt.delete(Wt.key===null?It:Wt.key),Y=v(Wt,Y,It),Te===null?zt=Wt:Te.sibling=Wt,Te=Wt);return e&&Zt.forEach(function(vj){return a(P,vj)}),he&&ge(P,It),zt}function Xl(P,Y,Q,mt){if(typeof Q=="object"&&Q!==null&&Q.type===Ru&&Q.key===null&&(tr(Q,null,P),Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Rl:var zt=ma(Q._debugInfo);t:{for(var Te=Q.key;Y!==null;){if(Y.key===Te){if(Te=Q.type,Te===Ru){if(Y.tag===7){o(P,Y.sibling),mt=y(Y,Q.props.children),mt.return=P,mt._debugOwner=Q._owner,mt._debugInfo=te,tr(Q,mt,P),P=mt;break t}}else if(Y.elementType===Te||Hm(Y,Q)||typeof Te=="object"&&Te!==null&&Te.$$typeof===li&&bl(Te)===Y.type){o(P,Y.sibling),mt=y(Y,Q.props),er(mt,Q),mt.return=P,mt._debugOwner=Q._owner,mt._debugInfo=te,P=mt;break t}o(P,Y);break}else a(P,Y);Y=Y.sibling}Q.type===Ru?(mt=hr(Q.props.children,P.mode,mt,Q.key),mt.return=P,mt._debugOwner=P,mt._debugTask=P._debugTask,mt._debugInfo=te,tr(Q,mt,P),P=mt):(mt=Ud(Q,P.mode,mt),er(mt,Q),mt.return=P,mt._debugInfo=te,P=mt)}return P=C(P),te=zt,P;case zl:t:{for(zt=Q,Q=zt.key;Y!==null;){if(Y.key===Q)if(Y.tag===4&&Y.stateNode.containerInfo===zt.containerInfo&&Y.stateNode.implementation===zt.implementation){o(P,Y.sibling),mt=y(Y,zt.children||[]),mt.return=P,P=mt;break t}else{o(P,Y);break}else a(P,Y);Y=Y.sibling}mt=bf(zt,P.mode,mt),mt.return=P,P=mt}return C(P);case li:return zt=ma(Q._debugInfo),Q=bl(Q),P=Xl(P,Y,Q,mt),te=zt,P}if(Pn(Q))return zt=ma(Q._debugInfo),P=Pe(P,Y,Q,mt),te=zt,P;if(I(Q)){if(zt=ma(Q._debugInfo),Te=I(Q),typeof Te!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Zt=Te.call(Q);return Zt===Q?(P.tag!==0||Object.prototype.toString.call(P.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Zt)!=="[object Generator]")&&(uE||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),uE=!0):Q.entries!==Te||G3||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),G3=!0),P=zp(P,Y,Zt,mt),te=zt,P}if(typeof Q.then=="function")return zt=ma(Q._debugInfo),P=Xl(P,Y,hu(Q),mt),te=zt,P;if(Q.$$typeof===Rn)return Xl(P,Y,ou(P,Q),mt);jc(P,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(zt=""+Q,Y!==null&&Y.tag===6?(o(P,Y.sibling),mt=y(Y,zt),mt.return=P,P=mt):(o(P,Y),mt=Bd(zt,P.mode,mt),mt.return=P,mt._debugOwner=P,mt._debugTask=P._debugTask,mt._debugInfo=te,P=mt),C(P)):(typeof Q=="function"&&Lc(P,Q),typeof Q=="symbol"&&zs(P,Q),o(P,Y))}return function(P,Y,Q,mt){var zt=te;te=null;try{l1=0;var Te=Xl(P,Y,Q,mt);return yp=null,Te}catch(nn){if(nn===gp||nn===Fy)throw nn;var Zt=S(29,nn,null,P.mode);Zt.lanes=mt,Zt.return=P;var It=Zt._debugInfo=te;if(Zt._debugOwner=P._debugOwner,Zt._debugTask=P._debugTask,It!=null){for(var Wt=It.length-1;0<=Wt;Wt--)if(typeof It[Wt].stack=="string"){Zt._debugOwner=It[Wt],Zt._debugTask=It[Wt].debugTask;break}}return Zt}finally{te=zt}}}function K0(e,a){var o=Pn(e);return e=!o&&typeof I(e)=="function",o||e?(o=o?"array":"iterable",console.error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",o,a,o),!1):!0}function du(){for(var e=vp,a=j3=vp=0;a<e;){var o=$s[a];$s[a++]=null;var d=$s[a];$s[a++]=null;var y=$s[a];$s[a++]=null;var v=$s[a];if($s[a++]=null,d!==null&&y!==null){var C=d.pending;C===null?y.next=y:(y.next=C.next,C.next=y),d.pending=y}v!==0&&na(o,y,v)}}function Yc(e,a,o,d){$s[vp++]=e,$s[vp++]=a,$s[vp++]=o,$s[vp++]=d,j3|=d,e.lanes|=d,e=e.alternate,e!==null&&(e.lanes|=d)}function Ph(e,a,o,d){return Yc(e,a,o,d),qc(e)}function _a(e,a){return Yc(e,null,null,a),qc(e)}function na(e,a,o){e.lanes|=o;var d=e.alternate;d!==null&&(d.lanes|=o);for(var y=!1,v=e.return;v!==null;)v.childLanes|=o,d=v.alternate,d!==null&&(d.childLanes|=o),v.tag===22&&(e=v.stateNode,e===null||e._visibility&r1||(y=!0)),e=v,v=v.return;return e.tag===3?(v=e.stateNode,y&&a!==null&&(y=31-kn(o),e=v.hiddenUpdates,d=e[y],d===null?e[y]=[a]:d.push(a),a.lane=o|536870912),v):null}function qc(e){if(S1>mj)throw Ff=S1=0,b1=r5=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");Ff>gj&&(Ff=0,b1=null,console.error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")),e.alternate===null&&(e.flags&4098)!==0&&Rd(e);for(var a=e,o=a.return;o!==null;)a.alternate===null&&(a.flags&4098)!==0&&Rd(e),a=o,o=a.return;return a.tag===3?a.stateNode:null}function Yh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qh(e,a){e=e.updateQueue,a.updateQueue===e&&(a.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function El(e){return{lane:e,tag:pE,payload:null,callback:null,next:null}}function Ni(e,a,o){var d=e.updateQueue;if(d===null)return null;if(d=d.shared,P3===d&&!yE){var y=nt(e);console.error(`An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.
|
|
100
|
+
<%s>%s</%s>`,o,a,o))}function Bs(e,a){var o=Yh();o!==null?o.run(Q0.bind(null,e,a)):Q0(e,a)}function Kc(e){function a(P,Y){if(e){var Z=P.deletions;Z===null?(P.deletions=[Y],P.flags|=16):Z.push(Y)}}function o(P,Y){if(!e)return null;for(;Y!==null;)a(P,Y),Y=Y.sibling;return null}function d(P){for(var Y=new Map;P!==null;)P.key!==null?Y.set(P.key,P):Y.set(P.index,P),P=P.sibling;return Y}function y(P,Y){return P=Ul(P,Y),P.index=0,P.sibling=null,P}function v(P,Y,Z){return P.index=Z,e?(Z=P.alternate,Z!==null?(Z=Z.index,Z<Y?(P.flags|=67108866,Y):Z):(P.flags|=67108866,Y)):(P.flags|=1048576,Y)}function C(P){return e&&P.alternate===null&&(P.flags|=67108866),P}function M(P,Y,Z,mt){return Y===null||Y.tag!==6?(Y=jd(Z,P.mode,mt),Y.return=P,Y._debugOwner=P,Y._debugTask=P._debugTask,Y._debugInfo=ae,Y):(Y=y(Y,Z),Y.return=P,Y._debugInfo=ae,Y)}function B(P,Y,Z,mt){var Ot=Z.type;return Ot===zu?(Y=ot(P,Y,Z.props.children,mt,Z.key),lr(Z,Y,P),Y):Y!==null&&(Y.elementType===Ot||Um(Y,Z)||typeof Ot=="object"&&Ot!==null&&Ot.$$typeof===li&&xl(Ot)===Y.type)?(Y=y(Y,Z.props),rr(Y,Z),Y.return=P,Y._debugOwner=Z._owner,Y._debugInfo=ae,Y):(Y=Gd(Z,P.mode,mt),rr(Y,Z),Y.return=P,Y._debugInfo=ae,Y)}function q(P,Y,Z,mt){return Y===null||Y.tag!==4||Y.stateNode.containerInfo!==Z.containerInfo||Y.stateNode.implementation!==Z.implementation?(Y=_f(Z,P.mode,mt),Y.return=P,Y._debugInfo=ae,Y):(Y=y(Y,Z.children||[]),Y.return=P,Y._debugInfo=ae,Y)}function ot(P,Y,Z,mt,Ot){return Y===null||Y.tag!==7?(Y=vr(Z,P.mode,mt,Ot),Y.return=P,Y._debugOwner=P,Y._debugTask=P._debugTask,Y._debugInfo=ae,Y):(Y=y(Y,Z),Y.return=P,Y._debugInfo=ae,Y)}function ct(P,Y,Z){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return Y=jd(""+Y,P.mode,Z),Y.return=P,Y._debugOwner=P,Y._debugTask=P._debugTask,Y._debugInfo=ae,Y;if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case Bl:return Z=Gd(Y,P.mode,Z),rr(Z,Y),Z.return=P,P=ma(Y._debugInfo),Z._debugInfo=ae,ae=P,Z;case Vl:return Y=_f(Y,P.mode,Z),Y.return=P,Y._debugInfo=ae,Y;case li:var mt=ma(Y._debugInfo);return Y=xl(Y),P=ct(P,Y,Z),ae=mt,P}if(Pn(Y)||I(Y))return Z=vr(Y,P.mode,Z,null),Z.return=P,Z._debugOwner=P,Z._debugTask=P._debugTask,P=ma(Y._debugInfo),Z._debugInfo=ae,ae=P,Z;if(typeof Y.then=="function")return mt=ma(Y._debugInfo),P=ct(P,du(Y),Z),ae=mt,P;if(Y.$$typeof===zn)return ct(P,uu(P,Y),Z);qc(P,Y)}return typeof Y=="function"&&Xc(P,Y),typeof Y=="symbol"&&Bs(P,Y),null}function gt(P,Y,Z,mt){var Ot=Y!==null?Y.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Ot!==null?null:M(P,Y,""+Z,mt);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case Bl:return Z.key===Ot?(Ot=ma(Z._debugInfo),P=B(P,Y,Z,mt),ae=Ot,P):null;case Vl:return Z.key===Ot?q(P,Y,Z,mt):null;case li:return Ot=ma(Z._debugInfo),Z=xl(Z),P=gt(P,Y,Z,mt),ae=Ot,P}if(Pn(Z)||I(Z))return Ot!==null?null:(Ot=ma(Z._debugInfo),P=ot(P,Y,Z,mt,null),ae=Ot,P);if(typeof Z.then=="function")return Ot=ma(Z._debugInfo),P=gt(P,Y,du(Z),mt),ae=Ot,P;if(Z.$$typeof===zn)return gt(P,Y,uu(P,Z),mt);qc(P,Z)}return typeof Z=="function"&&Xc(P,Z),typeof Z=="symbol"&&Bs(P,Z),null}function jt(P,Y,Z,mt,Ot){if(typeof mt=="string"&&mt!==""||typeof mt=="number"||typeof mt=="bigint")return P=P.get(Z)||null,M(Y,P,""+mt,Ot);if(typeof mt=="object"&&mt!==null){switch(mt.$$typeof){case Bl:return Z=P.get(mt.key===null?Z:mt.key)||null,P=ma(mt._debugInfo),Y=B(Y,Z,mt,Ot),ae=P,Y;case Vl:return P=P.get(mt.key===null?Z:mt.key)||null,q(Y,P,mt,Ot);case li:var _e=ma(mt._debugInfo);return mt=xl(mt),Y=jt(P,Y,Z,mt,Ot),ae=_e,Y}if(Pn(mt)||I(mt))return Z=P.get(Z)||null,P=ma(mt._debugInfo),Y=ot(Y,Z,mt,Ot,null),ae=P,Y;if(typeof mt.then=="function")return _e=ma(mt._debugInfo),Y=jt(P,Y,Z,du(mt),Ot),ae=_e,Y;if(mt.$$typeof===zn)return jt(P,Y,Z,uu(Y,mt),Ot);qc(Y,mt)}return typeof mt=="function"&&Xc(Y,mt),typeof mt=="symbol"&&Bs(Y,mt),null}function kt(P,Y,Z,mt){if(typeof Z!="object"||Z===null)return mt;switch(Z.$$typeof){case Bl:case Vl:O(P,Y,Z);var Ot=Z.key;if(typeof Ot!="string")break;if(mt===null){mt=new Set,mt.add(Ot);break}if(!mt.has(Ot)){mt.add(Ot);break}wt(Y,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",Ot)});break;case li:Z=xl(Z),kt(P,Y,Z,mt)}return mt}function Xe(P,Y,Z,mt){for(var Ot=null,_e=null,Ft=null,te=Y,ee=Y=0,rn=null;te!==null&&ee<Z.length;ee++){te.index>ee?(rn=te,te=null):rn=te.sibling;var $n=gt(P,te,Z[ee],mt);if($n===null){te===null&&(te=rn);break}Ot=kt(P,$n,Z[ee],Ot),e&&te&&$n.alternate===null&&a(P,te),Y=v($n,Y,ee),Ft===null?_e=$n:Ft.sibling=$n,Ft=$n,te=rn}if(ee===Z.length)return o(P,te),me&&Ri(P,ee),_e;if(te===null){for(;ee<Z.length;ee++)te=ct(P,Z[ee],mt),te!==null&&(Ot=kt(P,te,Z[ee],Ot),Y=v(te,Y,ee),Ft===null?_e=te:Ft.sibling=te,Ft=te);return me&&Ri(P,ee),_e}for(te=d(te);ee<Z.length;ee++)rn=jt(te,P,ee,Z[ee],mt),rn!==null&&(Ot=kt(P,rn,Z[ee],Ot),e&&rn.alternate!==null&&te.delete(rn.key===null?ee:rn.key),Y=v(rn,Y,ee),Ft===null?_e=rn:Ft.sibling=rn,Ft=rn);return e&&te.forEach(function(Lo){return a(P,Lo)}),me&&Ri(P,ee),_e}function Up(P,Y,Z,mt){if(Z==null)throw Error("An iterable object provided no iterator.");for(var Ot=null,_e=null,Ft=Y,te=Y=0,ee=null,rn=null,$n=Z.next();Ft!==null&&!$n.done;te++,$n=Z.next()){Ft.index>te?(ee=Ft,Ft=null):ee=Ft.sibling;var Lo=gt(P,Ft,$n.value,mt);if(Lo===null){Ft===null&&(Ft=ee);break}rn=kt(P,Lo,$n.value,rn),e&&Ft&&Lo.alternate===null&&a(P,Ft),Y=v(Lo,Y,te),_e===null?Ot=Lo:_e.sibling=Lo,_e=Lo,Ft=ee}if($n.done)return o(P,Ft),me&&Ri(P,te),Ot;if(Ft===null){for(;!$n.done;te++,$n=Z.next())Ft=ct(P,$n.value,mt),Ft!==null&&(rn=kt(P,Ft,$n.value,rn),Y=v(Ft,Y,te),_e===null?Ot=Ft:_e.sibling=Ft,_e=Ft);return me&&Ri(P,te),Ot}for(Ft=d(Ft);!$n.done;te++,$n=Z.next())ee=jt(Ft,P,te,$n.value,mt),ee!==null&&(rn=kt(P,ee,$n.value,rn),e&&ee.alternate!==null&&Ft.delete(ee.key===null?te:ee.key),Y=v(ee,Y,te),_e===null?Ot=ee:_e.sibling=ee,_e=ee);return e&&Ft.forEach(function(bj){return a(P,bj)}),me&&Ri(P,te),Ot}function Fl(P,Y,Z,mt){if(typeof Z=="object"&&Z!==null&&Z.type===zu&&Z.key===null&&(lr(Z,null,P),Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case Bl:var Ot=ma(Z._debugInfo);t:{for(var _e=Z.key;Y!==null;){if(Y.key===_e){if(_e=Z.type,_e===zu){if(Y.tag===7){o(P,Y.sibling),mt=y(Y,Z.props.children),mt.return=P,mt._debugOwner=Z._owner,mt._debugInfo=ae,lr(Z,mt,P),P=mt;break t}}else if(Y.elementType===_e||Um(Y,Z)||typeof _e=="object"&&_e!==null&&_e.$$typeof===li&&xl(_e)===Y.type){o(P,Y.sibling),mt=y(Y,Z.props),rr(mt,Z),mt.return=P,mt._debugOwner=Z._owner,mt._debugInfo=ae,P=mt;break t}o(P,Y);break}else a(P,Y);Y=Y.sibling}Z.type===zu?(mt=vr(Z.props.children,P.mode,mt,Z.key),mt.return=P,mt._debugOwner=P,mt._debugTask=P._debugTask,mt._debugInfo=ae,lr(Z,mt,P),P=mt):(mt=Gd(Z,P.mode,mt),rr(mt,Z),mt.return=P,mt._debugInfo=ae,P=mt)}return P=C(P),ae=Ot,P;case Vl:t:{for(Ot=Z,Z=Ot.key;Y!==null;){if(Y.key===Z)if(Y.tag===4&&Y.stateNode.containerInfo===Ot.containerInfo&&Y.stateNode.implementation===Ot.implementation){o(P,Y.sibling),mt=y(Y,Ot.children||[]),mt.return=P,P=mt;break t}else{o(P,Y);break}else a(P,Y);Y=Y.sibling}mt=_f(Ot,P.mode,mt),mt.return=P,P=mt}return C(P);case li:return Ot=ma(Z._debugInfo),Z=xl(Z),P=Fl(P,Y,Z,mt),ae=Ot,P}if(Pn(Z))return Ot=ma(Z._debugInfo),P=Xe(P,Y,Z,mt),ae=Ot,P;if(I(Z)){if(Ot=ma(Z._debugInfo),_e=I(Z),typeof _e!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Ft=_e.call(Z);return Ft===Z?(P.tag!==0||Object.prototype.toString.call(P.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Ft)!=="[object Generator]")&&(cE||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),cE=!0):Z.entries!==_e||G3||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),G3=!0),P=Up(P,Y,Ft,mt),ae=Ot,P}if(typeof Z.then=="function")return Ot=ma(Z._debugInfo),P=Fl(P,Y,du(Z),mt),ae=Ot,P;if(Z.$$typeof===zn)return Fl(P,Y,uu(P,Z),mt);qc(P,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Ot=""+Z,Y!==null&&Y.tag===6?(o(P,Y.sibling),mt=y(Y,Ot),mt.return=P,P=mt):(o(P,Y),mt=jd(Ot,P.mode,mt),mt.return=P,mt._debugOwner=P,mt._debugTask=P._debugTask,mt._debugInfo=ae,P=mt),C(P)):(typeof Z=="function"&&Xc(P,Z),typeof Z=="symbol"&&Bs(P,Z),o(P,Y))}return function(P,Y,Z,mt){var Ot=ae;ae=null;try{o1=0;var _e=Fl(P,Y,Z,mt);return bp=null,_e}catch(rn){if(rn===Sp||rn===Fy)throw rn;var Ft=S(29,rn,null,P.mode);Ft.lanes=mt,Ft.return=P;var te=Ft._debugInfo=ae;if(Ft._debugOwner=P._debugOwner,Ft._debugTask=P._debugTask,te!=null){for(var ee=te.length-1;0<=ee;ee--)if(typeof te[ee].stack=="string"){Ft._debugOwner=te[ee],Ft._debugTask=te[ee].debugTask;break}}return Ft}finally{ae=Ot}}}function Z0(e,a){var o=Pn(e);return e=!o&&typeof I(e)=="function",o||e?(o=o?"array":"iterable",console.error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",o,a,o),!1):!0}function pu(){for(var e=Ep,a=j3=Ep=0;a<e;){var o=al[a];al[a++]=null;var d=al[a];al[a++]=null;var y=al[a];al[a++]=null;var v=al[a];if(al[a++]=null,d!==null&&y!==null){var C=d.pending;C===null?y.next=y:(y.next=C.next,C.next=y),d.pending=y}v!==0&&aa(o,y,v)}}function Qc(e,a,o,d){al[Ep++]=e,al[Ep++]=a,al[Ep++]=o,al[Ep++]=d,j3|=d,e.lanes|=d,e=e.alternate,e!==null&&(e.lanes|=d)}function Xh(e,a,o,d){return Qc(e,a,o,d),Zc(e)}function xa(e,a){return Qc(e,null,null,a),Zc(e)}function aa(e,a,o){e.lanes|=o;var d=e.alternate;d!==null&&(d.lanes|=o);for(var y=!1,v=e.return;v!==null;)v.childLanes|=o,d=v.alternate,d!==null&&(d.childLanes|=o),v.tag===22&&(e=v.stateNode,e===null||e._visibility&u1||(y=!0)),e=v,v=v.return;return e.tag===3?(v=e.stateNode,y&&a!==null&&(y=31-In(o),e=v.hiddenUpdates,d=e[y],d===null?e[y]=[a]:d.push(a),a.lane=o|536870912),v):null}function Zc(e){if(E1>yj)throw $f=E1=0,T1=r5=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");$f>vj&&($f=0,T1=null,console.error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")),e.alternate===null&&(e.flags&4098)!==0&&wd(e);for(var a=e,o=a.return;o!==null;)a.alternate===null&&(a.flags&4098)!==0&&wd(e),a=o,o=a.return;return a.tag===3?a.stateNode:null}function Kh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qh(e,a){e=e.updateQueue,a.updateQueue===e&&(a.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Dl(e){return{lane:e,tag:mE,payload:null,callback:null,next:null}}function zi(e,a,o){var d=e.updateQueue;if(d===null)return null;if(d=d.shared,P3===d&&!vE){var y=J(e);console.error(`An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.
|
|
101
101
|
|
|
102
|
-
Please update the following component: %s`,y),
|
|
102
|
+
Please update the following component: %s`,y),vE=!0}return(ge&Ha)!==za?(y=d.pending,y===null?a.next=a:(a.next=y.next,y.next=a),d.pending=a,a=Zc(e),aa(e,null,o),a):(Qc(e,d,a,o),Zc(e))}function mu(e,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194048)!==0)){var d=a.lanes;d&=e.pendingLanes,o|=d,a.lanes=o,qt(e,o)}}function ao(e,a){var o=e.updateQueue,d=e.alternate;if(d!==null&&(d=d.updateQueue,o===d)){var y=null,v=null;if(o=o.firstBaseUpdate,o!==null){do{var C={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};v===null?y=v=C:v=v.next=C,o=o.next}while(o!==null);v===null?y=v=a:v=v.next=a}else y=v=a;o={baseState:d.baseState,firstBaseUpdate:y,lastBaseUpdate:v,shared:d.shared,callbacks:d.callbacks},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=a:e.next=a,o.lastBaseUpdate=a}function gu(){if(Y3){var e=vp;if(e!==null)throw e}}function Jc(e,a,o,d){Y3=!1;var y=e.updateQueue;tc=!1,P3=y.shared;var v=y.firstBaseUpdate,C=y.lastBaseUpdate,M=y.shared.pending;if(M!==null){y.shared.pending=null;var B=M,q=B.next;B.next=null,C===null?v=q:C.next=q,C=B;var ot=e.alternate;ot!==null&&(ot=ot.updateQueue,M=ot.lastBaseUpdate,M!==C&&(M===null?ot.firstBaseUpdate=q:M.next=q,ot.lastBaseUpdate=B))}if(v!==null){var ct=y.baseState;C=0,ot=q=B=null,M=v;do{var gt=M.lane&-536870913,jt=gt!==M.lane;if(jt?(ie>)===gt:(d>)===gt){gt!==0&>===qf&&(Y3=!0),ot!==null&&(ot=ot.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});t:{gt=e;var kt=M,Xe=a,Up=o;switch(kt.tag){case gE:if(kt=kt.payload,typeof kt=="function"){mp=!0;var Fl=kt.call(Up,ct,Xe);if(gt.mode&8){It(!0);try{kt.call(Up,ct,Xe)}finally{It(!1)}}mp=!1,ct=Fl;break t}ct=kt;break t;case L3:gt.flags=gt.flags&-65537|128;case mE:if(Fl=kt.payload,typeof Fl=="function"){if(mp=!0,kt=Fl.call(Up,ct,Xe),gt.mode&8){It(!0);try{Fl.call(Up,ct,Xe)}finally{It(!1)}}mp=!1}else kt=Fl;if(kt==null)break t;ct=Re({},ct,kt);break t;case yE:tc=!0}}gt=M.callback,gt!==null&&(e.flags|=64,jt&&(e.flags|=8192),jt=y.callbacks,jt===null?y.callbacks=[gt]:jt.push(gt))}else jt={lane:gt,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ot===null?(q=ot=jt,B=ct):ot=ot.next=jt,C|=gt;if(M=M.next,M===null){if(M=y.shared.pending,M===null)break;jt=M,M=jt.next,jt.next=null,y.lastBaseUpdate=jt,y.shared.pending=null}}while(!0);ot===null&&(B=ct),y.baseState=B,y.firstBaseUpdate=q,y.lastBaseUpdate=ot,v===null&&(y.shared.lanes=0),ac|=C,e.lanes=C,e.memoizedState=ct}P3=null}function Fc(e,a){if(typeof e!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+e);e.call(a)}function J0(e,a){var o=e.shared.hiddenCallbacks;if(o!==null)for(e.shared.hiddenCallbacks=null,e=0;e<o.length;e++)Fc(o[e],a)}function F0(e,a){var o=e.callbacks;if(o!==null)for(e.callbacks=null,e=0;e<o.length;e++)Fc(o[e],a)}function k0(e,a){var o=Hr;ht(Iy,o,e),ht(Tp,a,e),Hr=o|a.baseLanes}function Zh(e){ht(Iy,Hr,e),ht(Tp,Tp.current,e)}function kc(e){Hr=Iy.current,nt(Tp,e),nt(Iy,e)}function Vs(e){var a=e.alternate;ht(Wn,Wn.current&Cp,e),ht(vs,e,e),il===null&&(a===null||Tp.current!==null||a.memoizedState!==null)&&(il=e)}function Jh(e){ht(Wn,Wn.current,e),ht(vs,e,e),il===null&&(il=e)}function Fh(e){e.tag===22?(ht(Wn,Wn.current,e),ht(vs,e,e),il===null&&(il=e)):ls(e)}function ls(e){ht(Wn,Wn.current,e),ht(vs,vs.current,e)}function La(e){nt(vs,e),il===e&&(il=null),nt(Wn,e)}function Ic(e){for(var a=e;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||zf(o)||tp(o)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break;for(;a.sibling===null;){if(a.return===null||a.return===e)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}function Wt(){var e=lt;ll===null?ll=[e]:ll.push(e)}function bt(){var e=lt;if(ll!==null&&(Vo++,ll[Vo]!==e)){var a=J(Jt);if(!SE.has(a)&&(SE.add(a),ll!==null)){for(var o="",d=0;d<=Vo;d++){var y=ll[d],v=d===Vo?e:y;for(y=d+1+". "+y;30>y.length;)y+=" ";y+=v+`
|
|
103
103
|
`,o+=y}console.error(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks
|
|
104
104
|
|
|
105
105
|
Previous render Next render
|
|
106
106
|
------------------------------------------------------
|
|
107
107
|
%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
108
|
-
`,a,o)}}}function ei(e){e==null||Pn(e)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",
|
|
108
|
+
`,a,o)}}}function ei(e){e==null||Pn(e)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",lt,typeof e)}function yu(){var e=J(Jt);EE.has(e)||(EE.add(e),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",e))}function vn(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
109
109
|
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
110
110
|
2. You might be breaking the Rules of Hooks
|
|
111
111
|
3. You might have more than one copy of React in the same app
|
|
112
|
-
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function
|
|
112
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function kh(e,a){if(h1)return!1;if(a===null)return console.error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",lt),!1;e.length!==a.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
|
|
113
113
|
|
|
114
114
|
Previous: %s
|
|
115
|
-
Incoming: %s`,ot,"["+a.join(", ")+"]","["+e.join(", ")+"]");for(var o=0;o<a.length&&o<e.length;o++)if(!Ti(e[o],a[o]))return!1;return!0}function gi(e,a,o,d,y,v){Ro=v,Qt=a,nl=e!==null?e._debugHookTypes:null,Ho=-1,c1=e!==null&&e.type!==a.type,(Object.prototype.toString.call(o)==="[object AsyncFunction]"||Object.prototype.toString.call(o)==="[object AsyncGeneratorFunction]")&&(v=nt(Qt),q3.has(v)||(q3.add(v),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",v===null?"An unknown Component":"<"+v+">"))),a.memoizedState=null,a.updateQueue=null,a.lanes=0,rt.H=e!==null&&e.memoizedState!==null?K3:nl!==null?EE:X3,Xf=v=(a.mode&8)!==Kt;var C=U3(o,d,y);if(Xf=!1,Tp&&(C=Jh(a,o,d,y)),v){At(!0);try{C=Jh(a,o,d,y)}finally{At(!1)}}return Jc(e,a),C}function Jc(e,a){a._debugHookTypes=nl,a.dependencies===null?zo!==null&&(a.dependencies={lanes:0,firstContext:null,_debugThenableState:zo}):a.dependencies._debugThenableState=zo,rt.H=f1;var o=qe!==null&&qe.next!==null;if(Ro=0,nl=ot=sa=qe=Qt=null,Ho=-1,e!==null&&(e.flags&65011712)!==(a.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),$y=!1,u1=0,zo=null,o)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");e===null||la||(e=e.dependencies,e!==null&&kr(e)&&(la=!0)),s1?(s1=!1,e=!0):e=!1,e&&(a=nt(a)||"Unknown",SE.has(a)||q3.has(a)||(SE.add(a),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function Jh(e,a,o,d){Qt=e;var y=0;do{if(Tp&&(zo=null),u1=0,Tp=!1,y>=hj)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(y+=1,c1=!1,sa=qe=null,e.updateQueue!=null){var v=e.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}Ho=-1,rt.H=TE,v=U3(a,o,d)}while(Tp);return v}function F0(){var e=rt.H,a=e.useState()[0];return a=typeof a.then=="function"?Tl(a):a,e=e.useState()[0],(qe!==null?qe.memoizedState:null)!==e&&(Qt.flags|=1024),a}function Fh(){var e=t2!==0;return t2=0,e}function kh(e,a,o){a.updateQueue=e.updateQueue,a.flags=(a.mode&16)!==Kt?a.flags&-402655237:a.flags&-2053,e.lanes&=~o}function Fc(e){if($y){for(e=e.memoizedState;e!==null;){var a=e.queue;a!==null&&(a.pending=null),e=e.next}$y=!1}Ro=0,nl=sa=qe=Qt=null,Ho=-1,ot=null,Tp=!1,u1=t2=0,zo=null}function ga(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return sa===null?Qt.memoizedState=sa=e:sa=sa.next=e,sa}function De(){if(qe===null){var e=Qt.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var a=sa===null?Qt.memoizedState:sa.next;if(a!==null)sa=a,qe=e;else{if(e===null)throw Qt.alternate===null?Error("Update hook called on initial render. This is likely a bug in React. Please file an issue."):Error("Rendered more hooks than during the previous render.");qe=e,e={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},sa===null?Qt.memoizedState=sa=e:sa=sa.next=e}return sa}function to(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Tl(e){var a=u1;return u1+=1,zo===null&&(zo=L0()),e=Gh(zo,e,a),a=Qt,(sa===null?a.memoizedState:sa.next)===null&&(a=a.alternate,rt.H=a!==null&&a.memoizedState!==null?K3:X3),e}function Ce(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Tl(e);if(e.$$typeof===Rn)return Ve(e)}throw Error("An unsupported type was passed to use(): "+String(e))}function eo(e){var a=null,o=Qt.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var d=Qt.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(a={data:d.data.map(function(y){return y.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),o===null&&(o=to(),Qt.updateQueue=o),o.memoCache=a,o=a.data[a.index],o===void 0||c1)for(o=a.data[a.index]=Array(e),d=0;d<e;d++)o[d]=Ry;else o.length!==e&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",o.length,e);return a.index++,o}function ss(e,a){return typeof a=="function"?a(e):a}function Ih(e,a,o){var d=ga();if(o!==void 0){var y=o(a);if(Xf){At(!0);try{o(a)}finally{At(!1)}}}else y=a;return d.memoizedState=d.baseState=y,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:y},d.queue=e,e=e.dispatch=Bg.bind(null,Qt,e),[d.memoizedState,e]}function ws(e){var a=De();return Us(a,qe,e)}function Us(e,a,o){var d=e.queue;if(d===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");d.lastRenderedReducer=o;var y=e.baseQueue,v=d.pending;if(v!==null){if(y!==null){var C=y.next;y.next=v.next,v.next=C}a.baseQueue!==y&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),a.baseQueue=y=v,d.pending=null}if(v=e.baseState,y===null)e.memoizedState=v;else{a=y.next;var M=C=null,B=null,q=a,ct=!1;do{var ht=q.lane&-536870913;if(ht!==q.lane?(ee&ht)===ht:(Ro&ht)===ht){var yt=q.revertLane;if(yt===0)B!==null&&(B=B.next={lane:0,revertLane:0,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),ht===jf&&(ct=!0);else if((Ro&yt)===yt){q=q.next,yt===jf&&(ct=!0);continue}else ht={lane:0,revertLane:q.revertLane,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},B===null?(M=B=ht,C=v):B=B.next=ht,Qt.lanes|=yt,nc|=yt;ht=q.action,Xf&&o(v,ht),v=q.hasEagerState?q.eagerState:o(v,ht)}else yt={lane:ht,revertLane:q.revertLane,gesture:q.gesture,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},B===null?(M=B=yt,C=v):B=B.next=yt,Qt.lanes|=ht,nc|=ht;q=q.next}while(q!==null&&q!==a);if(B===null?C=v:B.next=M,!Ti(v,e.memoizedState)&&(la=!0,ct&&(o=mp,o!==null)))throw o;e.memoizedState=v,e.baseState=C,e.baseQueue=B,d.lastRenderedState=v}return y===null&&(d.lanes=0),[e.memoizedState,d.dispatch]}function yu(e){var a=De(),o=a.queue;if(o===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");o.lastRenderedReducer=e;var d=o.dispatch,y=o.pending,v=a.memoizedState;if(y!==null){o.pending=null;var C=y=y.next;do v=e(v,C.action),C=C.next;while(C!==y);Ti(v,a.memoizedState)||(la=!0),a.memoizedState=v,a.baseQueue===null&&(a.baseState=v),o.lastRenderedState=v}return[v,d]}function Wh(e,a,o){var d=Qt,y=ga();if(he){if(o===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var v=o();Ep||v===o()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),Ep=!0)}else{if(v=a(),Ep||(o=a(),Ti(v,o)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Ep=!0)),Xe===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(ee&127)!==0||ls(d,a,v)}return y.memoizedState=v,o={value:v,getSnapshot:a},y.queue=o,ni($h.bind(null,d,o,e),[e]),d.flags|=2048,zi(el|xi,{destroy:void 0},k0.bind(null,d,o,v,a),null),v}function nr(e,a,o){var d=Qt,y=De(),v=he;if(v){if(o===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");o=o()}else if(o=a(),!Ep){var C=a();Ti(o,C)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Ep=!0)}(C=!Ti((qe||y).memoizedState,o))&&(y.memoizedState=o,la=!0),y=y.queue;var M=$h.bind(null,d,y,e);if(Da(2048,xi,M,[e]),y.getSnapshot!==a||C||sa!==null&&sa.memoizedState.tag&el){if(d.flags|=2048,zi(el|xi,{destroy:void 0},k0.bind(null,d,y,o,a),null),Xe===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");v||(Ro&127)!==0||ls(d,a,o)}return o}function ls(e,a,o){e.flags|=16384,e={getSnapshot:a,value:o},a=Qt.updateQueue,a===null?(a=to(),Qt.updateQueue=a,a.stores=[e]):(o=a.stores,o===null?a.stores=[e]:o.push(e))}function k0(e,a,o,d){a.value=o,a.getSnapshot=d,I0(a)&&td(e)}function $h(e,a,o){return o(function(){I0(a)&&(Wi(2,"updateSyncExternalStore()",e),td(e))})}function I0(e){var a=e.getSnapshot;e=e.value;try{var o=a();return!Ti(e,o)}catch{return!0}}function td(e){var a=_a(e,2);a!==null&&Ie(a,e,2)}function kc(e){var a=ga();if(typeof e=="function"){var o=e;if(e=o(),Xf){At(!0);try{o()}finally{At(!1)}}}return a.memoizedState=a.baseState=e,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:e},a}function vu(e){e=kc(e);var a=e.queue,o=im.bind(null,Qt,a);return a.dispatch=o,[e.memoizedState,o]}function ed(e){var a=ga();a.memoizedState=a.baseState=e;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=o,a=Eu.bind(null,Qt,!0,o),o.dispatch=a,[e,a]}function W0(e,a){var o=De();return Ng(o,qe,e,a)}function Ng(e,a,o,d){return e.baseState=o,Us(e,qe,typeof d=="function"?d:ss)}function $0(e,a){var o=De();return qe!==null?Ng(o,qe,e,a):(o.baseState=e,[e,o.queue.dispatch])}function Og(e,a,o,d,y){if(Tu(e))throw Error("Cannot update form state while rendering.");if(e=a.action,e!==null){var v={payload:y,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){v.listeners.push(C)}};rt.T!==null?o(!0):v.isTransition=!1,d(v),o=a.pending,o===null?(v.next=a.pending=v,Oi(a,v)):(v.next=o.next,a.pending=o.next=v)}}function Oi(e,a){var o=a.action,d=a.payload,y=e.state;if(a.isTransition){var v=rt.T,C={};C._updatedFibers=new Set,rt.T=C;try{var M=o(y,d),B=rt.S;B!==null&&B(C,M),nd(e,a,M)}catch(q){ad(e,a,q)}finally{v!==null&&C.types!==null&&(v.types!==null&&v.types!==C.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),v.types=C.types),rt.T=v,v===null&&C._updatedFibers&&(e=C._updatedFibers.size,C._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{C=o(y,d),nd(e,a,C)}catch(q){ad(e,a,q)}}function nd(e,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?(rt.asyncTransitions++,o.then(ef,ef),o.then(function(d){tm(e,a,d)},function(d){return ad(e,a,d)}),a.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):tm(e,a,o)}function tm(e,a,o){a.status="fulfilled",a.value=o,Rg(a),e.state=o,a=e.pending,a!==null&&(o=a.next,o===a?e.pending=null:(o=o.next,a.next=o,Oi(e,o)))}function ad(e,a,o){var d=e.pending;if(e.pending=null,d!==null){d=d.next;do a.status="rejected",a.reason=o,Rg(a),a=a.next;while(a!==d)}e.action=null}function Rg(e){e=e.listeners;for(var a=0;a<e.length;a++)(0,e[a])()}function Ic(e,a){return a}function Nn(e,a){if(he){var o=Xe.formState;if(o!==null){t:{var d=Qt;if(he){if(vn){var y=oi(vn,Is);if(y){vn=gr(y),d=ps(y);break t}}As(d)}d=!1}d&&(a=o[0])}}o=ga(),o.memoizedState=o.baseState=a,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ic,lastRenderedState:a},o.queue=d,o=im.bind(null,Qt,d),d.dispatch=o,d=kc(!1);var v=Eu.bind(null,Qt,!1,d.queue);return d=ga(),y={state:a,dispatch:null,action:e,pending:null},d.queue=y,o=Og.bind(null,Qt,y,v,o),y.dispatch=o,d.memoizedState=e,[a,o,!1]}function Wc(e){var a=De();return xa(a,qe,e)}function xa(e,a,o){if(a=Us(e,a,Ic)[0],e=ws(ss)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var d=Tl(a)}catch(C){throw C===gp?Fy:C}else d=a;a=De();var y=a.queue,v=y.dispatch;return o!==a.memoizedState&&(Qt.flags|=2048,zi(el|xi,{destroy:void 0},zg.bind(null,y,o),null)),[d,v,e]}function zg(e,a){e.action=a}function Ri(e){var a=De(),o=qe;if(o!==null)return xa(a,o,e);De(),a=a.memoizedState,o=De();var d=o.queue.dispatch;return o.memoizedState=e,[a,d,!1]}function zi(e,a,o,d){return e={tag:e,create:o,deps:d,inst:a,next:null},a=Qt.updateQueue,a===null&&(a=to(),Qt.updateQueue=a),o=a.lastEffect,o===null?a.lastEffect=e.next=e:(d=o.next,o.next=e,e.next=d,a.lastEffect=e),e}function rs(e){var a=ga();return e={current:e},a.memoizedState=e}function Cl(e,a,o,d){var y=ga();Qt.flags|=e,y.memoizedState=zi(el|a,{destroy:void 0},o,d===void 0?null:d)}function Da(e,a,o,d){var y=De();d=d===void 0?null:d;var v=y.memoizedState.inst;qe!==null&&d!==null&&Zh(d,qe.memoizedState.deps)?y.memoizedState=zi(a,v,o,d):(Qt.flags|=e,y.memoizedState=zi(el|a,v,o,d))}function ni(e,a){(Qt.mode&16)!==Kt?Cl(276826112,xi,e,a):Cl(8390656,xi,e,a)}function Hg(e){Qt.flags|=4;var a=Qt.updateQueue;if(a===null)a=to(),Qt.updateQueue=a,a.events=[e];else{var o=a.events;o===null?a.events=[e]:o.push(e)}}function ar(e){var a=ga(),o={impl:e};return a.memoizedState=o,function(){if((de&za)!==Ra)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return o.impl.apply(void 0,arguments)}}function ir(e){var a=De().memoizedState;return Hg({ref:a,nextImpl:e}),function(){if((de&za)!==Ra)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return a.impl.apply(void 0,arguments)}}function _l(e,a){var o=4194308;return(Qt.mode&16)!==Kt&&(o|=134217728),Cl(o,ys,e,a)}function em(e,a){if(typeof a=="function"){e=e();var o=a(e);return function(){typeof o=="function"?o():a(null)}}if(a!=null)return a.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(a).join(", ")+"}"),e=e(),a.current=e,function(){a.current=null}}function id(e,a,o){typeof a!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",a!==null?typeof a:"null"),o=o!=null?o.concat([e]):null;var d=4194308;(Qt.mode&16)!==Kt&&(d|=134217728),Cl(d,ys,em.bind(null,a,e),o)}function sr(e,a,o){typeof a!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",a!==null?typeof a:"null"),o=o!=null?o.concat([e]):null,Da(4,ys,em.bind(null,a,e),o)}function sd(e,a){return ga().memoizedState=[e,a===void 0?null:a],e}function no(e,a){var o=De();a=a===void 0?null:a;var d=o.memoizedState;return a!==null&&Zh(a,d[1])?d[0]:(o.memoizedState=[e,a],e)}function ld(e,a){var o=ga();a=a===void 0?null:a;var d=e();if(Xf){At(!0);try{e()}finally{At(!1)}}return o.memoizedState=[d,a],d}function Su(e,a){var o=De();a=a===void 0?null:a;var d=o.memoizedState;if(a!==null&&Zh(a,d[1]))return d[0];if(d=e(),Xf){At(!0);try{e()}finally{At(!1)}}return o.memoizedState=[d,a],d}function $c(e,a){var o=ga();return tf(o,e,a)}function rd(e,a){var o=De();return ai(o,qe.memoizedState,e,a)}function nm(e,a){var o=De();return qe===null?tf(o,e,a):ai(o,qe.memoizedState,e,a)}function tf(e,a,o){return o===void 0||(Ro&1073741824)!==0&&(ee&261930)===0?e.memoizedState=a:(e.memoizedState=o,e=ly(),Qt.lanes|=e,nc|=e,o)}function ai(e,a,o,d){return Ti(o,a)?o:Sp.current!==null?(e=tf(e,o,d),Ti(e,a)||(la=!0),e):(Ro&42)===0||(Ro&1073741824)!==0&&(ee&261930)===0?(la=!0,e.memoizedState=o):(e=ly(),Qt.lanes|=e,nc|=e,a)}function ef(){rt.asyncTransitions--}function Pa(e,a,o,d,y){var v=ri();zn(v!==0&&8>v?v:8);var C=rt.T,M={};M._updatedFibers=new Set,rt.T=M,Eu(e,!1,a,o);try{var B=y(),q=rt.S;if(q!==null&&q(M,B),B!==null&&typeof B=="object"&&typeof B.then=="function"){rt.asyncTransitions++,B.then(ef,ef);var ct=j0(B,d);bu(e,a,ct,vi(e))}else bu(e,a,d,vi(e))}catch(ht){bu(e,a,{then:function(){},status:"rejected",reason:ht},vi(e))}finally{zn(v),C!==null&&M.types!==null&&(C.types!==null&&C.types!==M.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),C.types=M.types),rt.T=C,C===null&&M._updatedFibers&&(e=M._updatedFibers.size,M._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function am(e){var a=e.memoizedState;if(a!==null)return a;a={memoizedState:Gi,baseState:Gi,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:Gi},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:o},next:null},e.memoizedState=a,e=e.alternate,e!==null&&(e.memoizedState=a),a}function od(){var e=kc(!1);return e=Pa.bind(null,Qt,e.queue,!0,!1),ga().memoizedState=e,[!1,e]}function wg(){var e=ws(ss)[0],a=De().memoizedState;return[typeof e=="boolean"?e:Tl(e),a]}function xl(){var e=yu(ss)[0],a=De().memoizedState;return[typeof e=="boolean"?e:Tl(e),a]}function lr(){return Ve(ji)}function nf(){var e=ga(),a=Xe.identifierPrefix;if(he){var o=_o,d=Co;o=(d&~(1<<32-kn(d)-1)).toString(32)+o,a="_"+a+"R_"+o,o=t2++,0<o&&(a+="H"+o.toString(32)),a+="_"}else o=fj++,a="_"+a+"r_"+o.toString(32)+"_";return e.memoizedState=a}function rr(){return ga().memoizedState=Ug.bind(null,Qt)}function Ug(e,a){for(var o=e.return;o!==null;){switch(o.tag){case 24:case 3:var d=vi(o),y=El(d),v=Ni(o,y,d);v!==null&&(Wi(d,"refresh()",e),Ie(v,o,d),pu(v,o,d)),e=uu(),a!=null&&v!==null&&console.error("The seed argument is not enabled outside experimental channels."),y.payload={cache:e};return}o=o.return}}function Bg(e,a,o){var d=arguments;typeof d[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),d=vi(e);var y={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};Tu(e)?Vg(a,y):(y=Ph(e,a,y,d),y!==null&&(Wi(d,"dispatch()",e),Ie(y,e,d),Gg(y,a,d)))}function im(e,a,o){var d=arguments;typeof d[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),d=vi(e),bu(e,a,o,d)&&Wi(d,"setState()",e)}function bu(e,a,o,d){var y={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(Tu(e))Vg(a,y);else{var v=e.alternate;if(e.lanes===0&&(v===null||v.lanes===0)&&(v=a.lastRenderedReducer,v!==null)){var C=rt.H;rt.H=Ll;try{var M=a.lastRenderedState,B=v(M,o);if(y.hasEagerState=!0,y.eagerState=B,Ti(B,M))return Yc(e,a,y,0),Xe===null&&du(),!1}catch{}finally{rt.H=C}}if(o=Ph(e,a,y,d),o!==null)return Ie(o,e,d),Gg(o,a,d),!0}return!1}function Eu(e,a,o,d){if(rt.T===null&&jf===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),d={lane:2,revertLane:Uh(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Tu(e)){if(a)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else a=Ph(e,o,d,2),a!==null&&(Wi(2,"setOptimistic()",e),Ie(a,e,2))}function Tu(e){var a=e.alternate;return e===Qt||a!==null&&a===Qt}function Vg(e,a){Tp=$y=!0;var o=e.pending;o===null?a.next=a:(a.next=o.next,o.next=a),e.pending=a}function Gg(e,a,o){if((o&4194048)!==0){var d=a.lanes;d&=e.pendingLanes,o|=d,a.lanes=o,Pt(e,o)}}function sm(e){if(e!==null&&typeof e!="function"){var a=String(e);HE.has(a)||(HE.add(a),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",e))}}function ud(e,a,o,d){var y=e.memoizedState,v=o(d,y);if(e.mode&8){At(!0);try{v=o(d,y)}finally{At(!1)}}v===void 0&&(a=et(a)||"Component",NE.has(a)||(NE.add(a),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",a))),y=v==null?y:Me({},y,v),e.memoizedState=y,e.lanes===0&&(e.updateQueue.baseState=y)}function lm(e,a,o,d,y,v,C){var M=e.stateNode;if(typeof M.shouldComponentUpdate=="function"){if(o=M.shouldComponentUpdate(d,v,C),e.mode&8){At(!0);try{o=M.shouldComponentUpdate(d,v,C)}finally{At(!1)}}return o===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",et(a)||"Component"),o}return a.prototype&&a.prototype.isPureReactComponent?!Gc(o,d)||!Gc(y,v):!0}function ao(e,a,o,d){var y=a.state;typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(o,d),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(o,d),a.state!==y&&(e=nt(e)||"Component",_E.has(e)||(_E.add(e),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",e)),Q3.enqueueReplaceState(a,a.state,null))}function Bs(e,a){var o=a;if("ref"in a){o={};for(var d in a)d!=="ref"&&(o[d]=a[d])}if(e=e.defaultProps){o===a&&(o=Me({},o));for(var y in e)o[y]===void 0&&(o[y]=e[y])}return o}function af(e,a){try{Cp=a.source?nt(a.source):null,Z3=null;var o=a.value;if(rt.actQueue!==null)rt.thrownErrors.push(o);else{var d=e.onUncaughtError;d(o,{componentStack:a.stack})}}catch(y){setTimeout(function(){throw y})}}function rm(e,a,o){try{Cp=o.source?nt(o.source):null,Z3=nt(a);var d=e.onCaughtError;d(o.value,{componentStack:o.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function cd(e,a,o){return o=El(o),o.tag=L3,o.payload={element:null},o.callback=function(){Bt(a.source,af,e,a)},o}function fd(e){return e=El(e),e.tag=L3,e}function hd(e,a,o,d){var y=o.type.getDerivedStateFromError;if(typeof y=="function"){var v=d.value;e.payload=function(){return y(v)},e.callback=function(){Dy(o),Bt(d.source,rm,a,o,d)}}var C=o.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(e.callback=function(){Dy(o),Bt(d.source,rm,a,o,d),typeof y!="function"&&(ic===null?ic=new Set([this]):ic.add(this)),rj(this,d),typeof y=="function"||(o.lanes&2)===0&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",nt(o)||"Unknown")})}function jg(e,a,o,d,y){if(o.flags|=32768,Tr&&Mu(e,y),d!==null&&typeof d=="object"&&typeof d.then=="function"){if(a=o.alternate,a!==null&&Ye(a,o,y,!0),he&&(_r=!0),o=gs.current,o!==null){switch(o.tag){case 31:case 13:return tl===null?Nd():o.alternate===null&&bn===Uo&&(bn=u2),o.flags&=-257,o.flags|=65536,o.lanes=y,d===ky?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([d]):a.add(d),Om(e,d,y)),!1;case 22:return o.flags|=65536,d===ky?o.flags|=16384:(a=o.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([d])},o.updateQueue=a):(o=a.retryQueue,o===null?a.retryQueue=new Set([d]):o.add(d)),Om(e,d,y)),!1}throw Error("Unexpected Suspense handler tag ("+o.tag+"). This is a bug in React.")}return Om(e,d,y),Nd(),!1}if(he)return _r=!0,a=gs.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=y,d!==_3&&ru(Ht(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:d}),o))):(d!==_3&&ru(Ht(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:d}),o)),e=e.current.alternate,e.flags|=65536,y&=-y,e.lanes|=y,d=Ht(d,o),y=cd(e.stateNode,d,y),$r(e,y),bn!==tc&&(bn=Kf)),!1;var v=Ht(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:d}),o);if(g1===null?g1=[v]:g1.push(v),bn!==tc&&(bn=Kf),a===null)return!0;d=Ht(d,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,e=y&-y,o.lanes|=e,e=cd(o.stateNode,d,e),$r(o,e),!1;case 1:if(a=o.type,v=o.stateNode,(o.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(ic===null||!ic.has(v))))return o.flags|=65536,y&=-y,o.lanes|=y,y=fd(y),hd(y,e,o,d),$r(o,y),!1}o=o.return}while(o!==null);return!1}function On(e,a,o,d){a.child=e===null?dE(a,null,o,d):qf(a,e.child,o,d)}function om(e,a,o,d,y){o=o.render;var v=a.ref;if("ref"in d){var C={};for(var M in d)M!=="ref"&&(C[M]=d[M])}else C=d;return Ii(a),d=gi(e,a,o,C,v,y),M=Fh(),e!==null&&!la?(kh(e,a,y),os(e,a,y)):(he&&M&&Wl(a),a.flags|=1,On(e,a,d,y),a.child)}function um(e,a,o,d,y){if(e===null){var v=o.type;return typeof v=="function"&&!Hd(v)&&v.defaultProps===void 0&&o.compare===null?(o=co(v),a.tag=15,a.type=o,Dl(a,v),be(e,a,o,d,y)):(e=wd(o.type,null,d,a,a.mode,y),e.ref=a.ref,e.return=a,a.child=e)}if(v=e.child,!ne(e,y)){var C=v.memoizedProps;if(o=o.compare,o=o!==null?o:Gc,o(C,d)&&e.ref===a.ref)return os(e,a,y)}return a.flags|=1,e=Ol(v,d),e.ref=a.ref,e.return=a,a.child=e}function be(e,a,o,d,y){if(e!==null){var v=e.memoizedProps;if(Gc(v,d)&&e.ref===a.ref&&a.type===e.type)if(la=!1,a.pendingProps=d=v,ne(e,y))(e.flags&131072)!==0&&(la=!0);else return a.lanes=e.lanes,os(e,a,y)}return lf(e,a,o,d,y)}function dd(e,a,o,d){var y=d.children,v=e!==null?e.memoizedState:null;if(e===null&&a.stateNode===null&&(a.stateNode={_visibility:r1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((a.flags&128)!==0){if(v=v!==null?v.baseLanes|o:o,e!==null){for(d=a.child=e.child,y=0;d!==null;)y=y|d.lanes|d.childLanes,d=d.sibling;d=y&~v}else d=0,a.child=null;return cm(e,a,v,o,d)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},e!==null&&Vc(a,v!==null?v.cachePool:null),v!==null?J0(a,v):Xh(a),Qh(a);else return d=a.lanes=536870912,cm(e,a,v!==null?v.baseLanes|o:o,o,d)}else v!==null?(Vc(a,v.cachePool),J0(a,v),is(a),a.memoizedState=null):(e!==null&&Vc(a,null),Xh(a),is(a));return On(e,a,y,o),a.child}function sf(e,a){return e!==null&&e.tag===22||a.stateNode!==null||(a.stateNode={_visibility:r1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function cm(e,a,o,d,y){var v=Bh();return v=v===null?null:{parent:Ka?Un._currentValue:Un._currentValue2,pool:v},a.memoizedState={baseLanes:o,cachePool:v},e!==null&&Vc(a,null),Xh(a),Qh(a),e!==null&&Ye(e,a,d,!0),a.childLanes=y,null}function pd(e,a){var o=a.hidden;return o!==void 0&&console.error(`<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
|
|
115
|
+
Incoming: %s`,lt,"["+a.join(", ")+"]","["+e.join(", ")+"]");for(var o=0;o<a.length&&o<e.length;o++)if(!Ci(e[o],a[o]))return!1;return!0}function yi(e,a,o,d,y,v){Uo=v,Jt=a,ll=e!==null?e._debugHookTypes:null,Vo=-1,h1=e!==null&&e.type!==a.type,(Object.prototype.toString.call(o)==="[object AsyncFunction]"||Object.prototype.toString.call(o)==="[object AsyncGeneratorFunction]")&&(v=J(Jt),q3.has(v)||(q3.add(v),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",v===null?"An unknown Component":"<"+v+">"))),a.memoizedState=null,a.updateQueue=null,a.lanes=0,st.H=e!==null&&e.memoizedState!==null?K3:ll!==null?TE:X3,Jf=v=(a.mode&8)!==Zt;var C=U3(o,d,y);if(Jf=!1,xp&&(C=Ih(a,o,d,y)),v){It(!0);try{C=Ih(a,o,d,y)}finally{It(!1)}}return Wc(e,a),C}function Wc(e,a){a._debugHookTypes=ll,a.dependencies===null?Bo!==null&&(a.dependencies={lanes:0,firstContext:null,_debugThenableState:Bo}):a.dependencies._debugThenableState=Bo,st.H=d1;var o=Ze!==null&&Ze.next!==null;if(Uo=0,ll=lt=la=Ze=Jt=null,Vo=-1,e!==null&&(e.flags&65011712)!==(a.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),$y=!1,f1=0,Bo=null,o)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");e===null||ra||(e=e.dependencies,e!==null&&to(e)&&(ra=!0)),r1?(r1=!1,e=!0):e=!1,e&&(a=J(a)||"Unknown",bE.has(a)||q3.has(a)||(bE.add(a),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function Ih(e,a,o,d){Jt=e;var y=0;do{if(xp&&(Bo=null),f1=0,xp=!1,y>=pj)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(y+=1,h1=!1,la=Ze=null,e.updateQueue!=null){var v=e.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}Vo=-1,st.H=CE,v=U3(a,o,d)}while(xp);return v}function I0(){var e=st.H,a=e.useState()[0];return a=typeof a.then=="function"?Al(a):a,e=e.useState()[0],(Ze!==null?Ze.memoizedState:null)!==e&&(Jt.flags|=1024),a}function Wh(){var e=t2!==0;return t2=0,e}function $h(e,a,o){a.updateQueue=e.updateQueue,a.flags=(a.mode&16)!==Zt?a.flags&-402655237:a.flags&-2053,e.lanes&=~o}function $c(e){if($y){for(e=e.memoizedState;e!==null;){var a=e.queue;a!==null&&(a.pending=null),e=e.next}$y=!1}Uo=0,ll=la=Ze=Jt=null,Vo=-1,lt=null,xp=!1,f1=t2=0,Bo=null}function ga(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return la===null?Jt.memoizedState=la=e:la=la.next=e,la}function Ne(){if(Ze===null){var e=Jt.alternate;e=e!==null?e.memoizedState:null}else e=Ze.next;var a=la===null?Jt.memoizedState:la.next;if(a!==null)la=a,Ze=e;else{if(e===null)throw Jt.alternate===null?Error("Update hook called on initial render. This is likely a bug in React. Please file an issue."):Error("Rendered more hooks than during the previous render.");Ze=e,e={memoizedState:Ze.memoizedState,baseState:Ze.baseState,baseQueue:Ze.baseQueue,queue:Ze.queue,next:null},la===null?Jt.memoizedState=la=e:la=la.next=e}return la}function io(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Al(e){var a=f1;return f1+=1,Bo===null&&(Bo=Y0()),e=Ph(Bo,e,a),a=Jt,(la===null?a.memoizedState:la.next)===null&&(a=a.alternate,st.H=a!==null&&a.memoizedState!==null?K3:X3),e}function Ae(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Al(e);if(e.$$typeof===zn)return je(e)}throw Error("An unsupported type was passed to use(): "+String(e))}function so(e){var a=null,o=Jt.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var d=Jt.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(a={data:d.data.map(function(y){return y.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),o===null&&(o=io(),Jt.updateQueue=o),o.memoCache=a,o=a.data[a.index],o===void 0||h1)for(o=a.data[a.index]=Array(e),d=0;d<e;d++)o[d]=Ry;else o.length!==e&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",o.length,e);return a.index++,o}function rs(e,a){return typeof a=="function"?a(e):a}function td(e,a,o){var d=ga();if(o!==void 0){var y=o(a);if(Jf){It(!0);try{o(a)}finally{It(!1)}}}else y=a;return d.memoizedState=d.baseState=y,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:y},d.queue=e,e=e.dispatch=Bg.bind(null,Jt,e),[d.memoizedState,e]}function Gs(e){var a=Ne();return js(a,Ze,e)}function js(e,a,o){var d=e.queue;if(d===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");d.lastRenderedReducer=o;var y=e.baseQueue,v=d.pending;if(v!==null){if(y!==null){var C=y.next;y.next=v.next,v.next=C}a.baseQueue!==y&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),a.baseQueue=y=v,d.pending=null}if(v=e.baseState,y===null)e.memoizedState=v;else{a=y.next;var M=C=null,B=null,q=a,ot=!1;do{var ct=q.lane&-536870913;if(ct!==q.lane?(ie&ct)===ct:(Uo&ct)===ct){var gt=q.revertLane;if(gt===0)B!==null&&(B=B.next={lane:0,revertLane:0,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),ct===qf&&(ot=!0);else if((Uo>)===gt){q=q.next,gt===qf&&(ot=!0);continue}else ct={lane:0,revertLane:q.revertLane,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},B===null?(M=B=ct,C=v):B=B.next=ct,Jt.lanes|=gt,ac|=gt;ct=q.action,Jf&&o(v,ct),v=q.hasEagerState?q.eagerState:o(v,ct)}else gt={lane:ct,revertLane:q.revertLane,gesture:q.gesture,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},B===null?(M=B=gt,C=v):B=B.next=gt,Jt.lanes|=ct,ac|=ct;q=q.next}while(q!==null&&q!==a);if(B===null?C=v:B.next=M,!Ci(v,e.memoizedState)&&(ra=!0,ot&&(o=vp,o!==null)))throw o;e.memoizedState=v,e.baseState=C,e.baseQueue=B,d.lastRenderedState=v}return y===null&&(d.lanes=0),[e.memoizedState,d.dispatch]}function vu(e){var a=Ne(),o=a.queue;if(o===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");o.lastRenderedReducer=e;var d=o.dispatch,y=o.pending,v=a.memoizedState;if(y!==null){o.pending=null;var C=y=y.next;do v=e(v,C.action),C=C.next;while(C!==y);Ci(v,a.memoizedState)||(ra=!0),a.memoizedState=v,a.baseQueue===null&&(a.baseState=v),o.lastRenderedState=v}return[v,d]}function ed(e,a,o){var d=Jt,y=ga();if(me){if(o===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var v=o();_p||v===o()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),_p=!0)}else{if(v=a(),_p||(o=a(),Ci(v,o)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),_p=!0)),Je===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(ie&127)!==0||os(d,a,v)}return y.memoizedState=v,o={value:v,getSnapshot:a},y.queue=o,ni(nd.bind(null,d,o,e),[e]),d.flags|=2048,Ui(sl|Di,{destroy:void 0},W0.bind(null,d,o,v,a),null),v}function or(e,a,o){var d=Jt,y=Ne(),v=me;if(v){if(o===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");o=o()}else if(o=a(),!_p){var C=a();Ci(o,C)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),_p=!0)}(C=!Ci((Ze||y).memoizedState,o))&&(y.memoizedState=o,ra=!0),y=y.queue;var M=nd.bind(null,d,y,e);if(Aa(2048,Di,M,[e]),y.getSnapshot!==a||C||la!==null&&la.memoizedState.tag&sl){if(d.flags|=2048,Ui(sl|Di,{destroy:void 0},W0.bind(null,d,y,o,a),null),Je===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");v||(Uo&127)!==0||os(d,a,o)}return o}function os(e,a,o){e.flags|=16384,e={getSnapshot:a,value:o},a=Jt.updateQueue,a===null?(a=io(),Jt.updateQueue=a,a.stores=[e]):(o=a.stores,o===null?a.stores=[e]:o.push(e))}function W0(e,a,o,d){a.value=o,a.getSnapshot=d,$0(a)&&ad(e)}function nd(e,a,o){return o(function(){$0(a)&&(ts(2,"updateSyncExternalStore()",e),ad(e))})}function $0(e){var a=e.getSnapshot;e=e.value;try{var o=a();return!Ci(e,o)}catch{return!0}}function ad(e){var a=xa(e,2);a!==null&&en(a,e,2)}function tf(e){var a=ga();if(typeof e=="function"){var o=e;if(e=o(),Jf){It(!0);try{o()}finally{It(!1)}}}return a.memoizedState=a.baseState=e,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:e},a}function Su(e){e=tf(e);var a=e.queue,o=lm.bind(null,Jt,a);return a.dispatch=o,[e.memoizedState,o]}function id(e){var a=ga();a.memoizedState=a.baseState=e;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=o,a=Tu.bind(null,Jt,!0,o),o.dispatch=a,[e,a]}function tm(e,a){var o=Ne();return Ng(o,Ze,e,a)}function Ng(e,a,o,d){return e.baseState=o,js(e,Ze,typeof d=="function"?d:rs)}function em(e,a){var o=Ne();return Ze!==null?Ng(o,Ze,e,a):(o.baseState=e,[e,o.queue.dispatch])}function Og(e,a,o,d,y){if(Cu(e))throw Error("Cannot update form state while rendering.");if(e=a.action,e!==null){var v={payload:y,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){v.listeners.push(C)}};st.T!==null?o(!0):v.isTransition=!1,d(v),o=a.pending,o===null?(v.next=a.pending=v,Hi(a,v)):(v.next=o.next,a.pending=o.next=v)}}function Hi(e,a){var o=a.action,d=a.payload,y=e.state;if(a.isTransition){var v=st.T,C={};C._updatedFibers=new Set,st.T=C;try{var M=o(y,d),B=st.S;B!==null&&B(C,M),sd(e,a,M)}catch(q){ld(e,a,q)}finally{v!==null&&C.types!==null&&(v.types!==null&&v.types!==C.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),v.types=C.types),st.T=v,v===null&&C._updatedFibers&&(e=C._updatedFibers.size,C._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{C=o(y,d),sd(e,a,C)}catch(q){ld(e,a,q)}}function sd(e,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?(st.asyncTransitions++,o.then(lf,lf),o.then(function(d){nm(e,a,d)},function(d){return ld(e,a,d)}),a.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):nm(e,a,o)}function nm(e,a,o){a.status="fulfilled",a.value=o,Rg(a),e.state=o,a=e.pending,a!==null&&(o=a.next,o===a?e.pending=null:(o=o.next,a.next=o,Hi(e,o)))}function ld(e,a,o){var d=e.pending;if(e.pending=null,d!==null){d=d.next;do a.status="rejected",a.reason=o,Rg(a),a=a.next;while(a!==d)}e.action=null}function Rg(e){e=e.listeners;for(var a=0;a<e.length;a++)(0,e[a])()}function ef(e,a){return a}function On(e,a){if(me){var o=Je.formState;if(o!==null){t:{var d=Jt;if(me){if(bn){var y=oi(bn,el);if(y){bn=Tr(y),d=gs(y);break t}}Rs(d)}d=!1}d&&(a=o[0])}}o=ga(),o.memoizedState=o.baseState=a,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ef,lastRenderedState:a},o.queue=d,o=lm.bind(null,Jt,d),d.dispatch=o,d=tf(!1);var v=Tu.bind(null,Jt,!1,d.queue);return d=ga(),y={state:a,dispatch:null,action:e,pending:null},d.queue=y,o=Og.bind(null,Jt,y,v,o),y.dispatch=o,d.memoizedState=e,[a,o,!1]}function nf(e){var a=Ne();return Da(a,Ze,e)}function Da(e,a,o){if(a=js(e,a,ef)[0],e=Gs(rs)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var d=Al(a)}catch(C){throw C===Sp?Fy:C}else d=a;a=Ne();var y=a.queue,v=y.dispatch;return o!==a.memoizedState&&(Jt.flags|=2048,Ui(sl|Di,{destroy:void 0},zg.bind(null,y,o),null)),[d,v,e]}function zg(e,a){e.action=a}function wi(e){var a=Ne(),o=Ze;if(o!==null)return Da(a,o,e);Ne(),a=a.memoizedState,o=Ne();var d=o.queue.dispatch;return o.memoizedState=e,[a,d,!1]}function Ui(e,a,o,d){return e={tag:e,create:o,deps:d,inst:a,next:null},a=Jt.updateQueue,a===null&&(a=io(),Jt.updateQueue=a),o=a.lastEffect,o===null?a.lastEffect=e.next=e:(d=o.next,o.next=e,e.next=d,a.lastEffect=e),e}function us(e){var a=ga();return e={current:e},a.memoizedState=e}function Ml(e,a,o,d){var y=ga();Jt.flags|=e,y.memoizedState=Ui(sl|a,{destroy:void 0},o,d===void 0?null:d)}function Aa(e,a,o,d){var y=Ne();d=d===void 0?null:d;var v=y.memoizedState.inst;Ze!==null&&d!==null&&kh(d,Ze.memoizedState.deps)?y.memoizedState=Ui(a,v,o,d):(Jt.flags|=e,y.memoizedState=Ui(sl|a,v,o,d))}function ni(e,a){(Jt.mode&16)!==Zt?Ml(276826112,Di,e,a):Ml(8390656,Di,e,a)}function Hg(e){Jt.flags|=4;var a=Jt.updateQueue;if(a===null)a=io(),Jt.updateQueue=a,a.events=[e];else{var o=a.events;o===null?a.events=[e]:o.push(e)}}function ur(e){var a=ga(),o={impl:e};return a.memoizedState=o,function(){if((ge&Ha)!==za)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return o.impl.apply(void 0,arguments)}}function cr(e){var a=Ne().memoizedState;return Hg({ref:a,nextImpl:e}),function(){if((ge&Ha)!==za)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return a.impl.apply(void 0,arguments)}}function Nl(e,a){var o=4194308;return(Jt.mode&16)!==Zt&&(o|=134217728),Ml(o,Ss,e,a)}function am(e,a){if(typeof a=="function"){e=e();var o=a(e);return function(){typeof o=="function"?o():a(null)}}if(a!=null)return a.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(a).join(", ")+"}"),e=e(),a.current=e,function(){a.current=null}}function rd(e,a,o){typeof a!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",a!==null?typeof a:"null"),o=o!=null?o.concat([e]):null;var d=4194308;(Jt.mode&16)!==Zt&&(d|=134217728),Ml(d,Ss,am.bind(null,a,e),o)}function fr(e,a,o){typeof a!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",a!==null?typeof a:"null"),o=o!=null?o.concat([e]):null,Aa(4,Ss,am.bind(null,a,e),o)}function od(e,a){return ga().memoizedState=[e,a===void 0?null:a],e}function lo(e,a){var o=Ne();a=a===void 0?null:a;var d=o.memoizedState;return a!==null&&kh(a,d[1])?d[0]:(o.memoizedState=[e,a],e)}function ud(e,a){var o=ga();a=a===void 0?null:a;var d=e();if(Jf){It(!0);try{e()}finally{It(!1)}}return o.memoizedState=[d,a],d}function bu(e,a){var o=Ne();a=a===void 0?null:a;var d=o.memoizedState;if(a!==null&&kh(a,d[1]))return d[0];if(d=e(),Jf){It(!0);try{e()}finally{It(!1)}}return o.memoizedState=[d,a],d}function af(e,a){var o=ga();return sf(o,e,a)}function cd(e,a){var o=Ne();return ai(o,Ze.memoizedState,e,a)}function im(e,a){var o=Ne();return Ze===null?sf(o,e,a):ai(o,Ze.memoizedState,e,a)}function sf(e,a,o){return o===void 0||(Uo&1073741824)!==0&&(ie&261930)===0?e.memoizedState=a:(e.memoizedState=o,e=ly(),Jt.lanes|=e,ac|=e,o)}function ai(e,a,o,d){return Ci(o,a)?o:Tp.current!==null?(e=sf(e,o,d),Ci(e,a)||(ra=!0),e):(Uo&42)===0||(Uo&1073741824)!==0&&(ie&261930)===0?(ra=!0,e.memoizedState=o):(e=ly(),Jt.lanes|=e,ac|=e,a)}function lf(){st.asyncTransitions--}function Pa(e,a,o,d,y){var v=ri();Hn(v!==0&&8>v?v:8);var C=st.T,M={};M._updatedFibers=new Set,st.T=M,Tu(e,!1,a,o);try{var B=y(),q=st.S;if(q!==null&&q(M,B),B!==null&&typeof B=="object"&&typeof B.then=="function"){st.asyncTransitions++,B.then(lf,lf);var ot=P0(B,d);Eu(e,a,ot,Si(e))}else Eu(e,a,d,Si(e))}catch(ct){Eu(e,a,{then:function(){},status:"rejected",reason:ct},Si(e))}finally{Hn(v),C!==null&&M.types!==null&&(C.types!==null&&C.types!==M.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),C.types=M.types),st.T=C,C===null&&M._updatedFibers&&(e=M._updatedFibers.size,M._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function sm(e){var a=e.memoizedState;if(a!==null)return a;a={memoizedState:Pi,baseState:Pi,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:Pi},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:o},next:null},e.memoizedState=a,e=e.alternate,e!==null&&(e.memoizedState=a),a}function fd(){var e=tf(!1);return e=Pa.bind(null,Jt,e.queue,!0,!1),ga().memoizedState=e,[!1,e]}function wg(){var e=Gs(rs)[0],a=Ne().memoizedState;return[typeof e=="boolean"?e:Al(e),a]}function Ol(){var e=vu(rs)[0],a=Ne().memoizedState;return[typeof e=="boolean"?e:Al(e),a]}function hr(){return je(Yi)}function rf(){var e=ga(),a=Je.identifierPrefix;if(me){var o=Mo,d=Ao;o=(d&~(1<<32-In(d)-1)).toString(32)+o,a="_"+a+"R_"+o,o=t2++,0<o&&(a+="H"+o.toString(32)),a+="_"}else o=dj++,a="_"+a+"r_"+o.toString(32)+"_";return e.memoizedState=a}function dr(){return ga().memoizedState=Ug.bind(null,Jt)}function Ug(e,a){for(var o=e.return;o!==null;){switch(o.tag){case 24:case 3:var d=Si(o),y=Dl(d),v=zi(o,y,d);v!==null&&(ts(d,"refresh()",e),en(v,o,d),mu(v,o,d)),e=cu(),a!=null&&v!==null&&console.error("The seed argument is not enabled outside experimental channels."),y.payload={cache:e};return}o=o.return}}function Bg(e,a,o){var d=arguments;typeof d[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),d=Si(e);var y={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};Cu(e)?Vg(a,y):(y=Xh(e,a,y,d),y!==null&&(ts(d,"dispatch()",e),en(y,e,d),Gg(y,a,d)))}function lm(e,a,o){var d=arguments;typeof d[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),d=Si(e),Eu(e,a,o,d)&&ts(d,"setState()",e)}function Eu(e,a,o,d){var y={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(Cu(e))Vg(a,y);else{var v=e.alternate;if(e.lanes===0&&(v===null||v.lanes===0)&&(v=a.lastRenderedReducer,v!==null)){var C=st.H;st.H=Kl;try{var M=a.lastRenderedState,B=v(M,o);if(y.hasEagerState=!0,y.eagerState=B,Ci(B,M))return Qc(e,a,y,0),Je===null&&pu(),!1}catch{}finally{st.H=C}}if(o=Xh(e,a,y,d),o!==null)return en(o,e,d),Gg(o,a,d),!0}return!1}function Tu(e,a,o,d){if(st.T===null&&qf===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),d={lane:2,revertLane:Gh(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Cu(e)){if(a)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else a=Xh(e,o,d,2),a!==null&&(ts(2,"setOptimistic()",e),en(a,e,2))}function Cu(e){var a=e.alternate;return e===Jt||a!==null&&a===Jt}function Vg(e,a){xp=$y=!0;var o=e.pending;o===null?a.next=a:(a.next=o.next,o.next=a),e.pending=a}function Gg(e,a,o){if((o&4194048)!==0){var d=a.lanes;d&=e.pendingLanes,o|=d,a.lanes=o,qt(e,o)}}function rm(e){if(e!==null&&typeof e!="function"){var a=String(e);wE.has(a)||(wE.add(a),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",e))}}function hd(e,a,o,d){var y=e.memoizedState,v=o(d,y);if(e.mode&8){It(!0);try{v=o(d,y)}finally{It(!1)}}v===void 0&&(a=it(a)||"Component",OE.has(a)||(OE.add(a),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",a))),y=v==null?y:Re({},y,v),e.memoizedState=y,e.lanes===0&&(e.updateQueue.baseState=y)}function om(e,a,o,d,y,v,C){var M=e.stateNode;if(typeof M.shouldComponentUpdate=="function"){if(o=M.shouldComponentUpdate(d,v,C),e.mode&8){It(!0);try{o=M.shouldComponentUpdate(d,v,C)}finally{It(!1)}}return o===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",it(a)||"Component"),o}return a.prototype&&a.prototype.isPureReactComponent?!Yc(o,d)||!Yc(y,v):!0}function ro(e,a,o,d){var y=a.state;typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(o,d),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(o,d),a.state!==y&&(e=J(e)||"Component",xE.has(e)||(xE.add(e),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",e)),Q3.enqueueReplaceState(a,a.state,null))}function Ls(e,a){var o=a;if("ref"in a){o={};for(var d in a)d!=="ref"&&(o[d]=a[d])}if(e=e.defaultProps){o===a&&(o=Re({},o));for(var y in e)o[y]===void 0&&(o[y]=e[y])}return o}function of(e,a){try{Dp=a.source?J(a.source):null,Z3=null;var o=a.value;if(st.actQueue!==null)st.thrownErrors.push(o);else{var d=e.onUncaughtError;d(o,{componentStack:a.stack})}}catch(y){setTimeout(function(){throw y})}}function um(e,a,o){try{Dp=o.source?J(o.source):null,Z3=J(a);var d=e.onCaughtError;d(o.value,{componentStack:o.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function dd(e,a,o){return o=Dl(o),o.tag=L3,o.payload={element:null},o.callback=function(){wt(a.source,of,e,a)},o}function pd(e){return e=Dl(e),e.tag=L3,e}function md(e,a,o,d){var y=o.type.getDerivedStateFromError;if(typeof y=="function"){var v=d.value;e.payload=function(){return y(v)},e.callback=function(){Dy(o),wt(d.source,um,a,o,d)}}var C=o.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(e.callback=function(){Dy(o),wt(d.source,um,a,o,d),typeof y!="function"&&(sc===null?sc=new Set([this]):sc.add(this)),uj(this,d),typeof y=="function"||(o.lanes&2)===0&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",J(o)||"Unknown")})}function jg(e,a,o,d,y){if(o.flags|=32768,Mr&&Nu(e,y),d!==null&&typeof d=="object"&&typeof d.then=="function"){if(a=o.alternate,a!==null&&Qe(a,o,y,!0),me&&(Or=!0),o=vs.current,o!==null){switch(o.tag){case 31:case 13:return il===null?zd():o.alternate===null&&Tn===jo&&(Tn=u2),o.flags&=-257,o.flags|=65536,o.lanes=y,d===ky?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([d]):a.add(d),zm(e,d,y)),!1;case 22:return o.flags|=65536,d===ky?o.flags|=16384:(a=o.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([d])},o.updateQueue=a):(o=a.retryQueue,o===null?a.retryQueue=new Set([d]):o.add(d)),zm(e,d,y)),!1}throw Error("Unexpected Suspense handler tag ("+o.tag+"). This is a bug in React.")}return zm(e,d,y),zd(),!1}if(me)return Or=!0,a=vs.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=y,d!==_3&&ou(Va(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:d}),o))):(d!==_3&&ou(Va(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:d}),o)),e=e.current.alternate,e.flags|=65536,y&=-y,e.lanes|=y,d=Va(d,o),y=dd(e.stateNode,d,y),ao(e,y),Tn!==ec&&(Tn=Ff)),!1;var v=Va(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:d}),o);if(v1===null?v1=[v]:v1.push(v),Tn!==ec&&(Tn=Ff),a===null)return!0;d=Va(d,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,e=y&-y,o.lanes|=e,e=dd(o.stateNode,d,e),ao(o,e),!1;case 1:if(a=o.type,v=o.stateNode,(o.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(sc===null||!sc.has(v))))return o.flags|=65536,y&=-y,o.lanes|=y,y=pd(y),md(y,e,o,d),ao(o,y),!1}o=o.return}while(o!==null);return!1}function Rn(e,a,o,d){a.child=e===null?pE(a,null,o,d):Zf(a,e.child,o,d)}function cm(e,a,o,d,y){o=o.render;var v=a.ref;if("ref"in d){var C={};for(var M in d)M!=="ref"&&(C[M]=d[M])}else C=d;return $i(a),d=yi(e,a,o,C,v,y),M=Wh(),e!==null&&!ra?($h(e,a,y),cs(e,a,y)):(me&&M&&Ut(a),a.flags|=1,Rn(e,a,d,y),a.child)}function fm(e,a,o,d,y){if(e===null){var v=o.type;return typeof v=="function"&&!Bd(v)&&v.defaultProps===void 0&&o.compare===null?(o=mo(v),a.tag=15,a.type=o,Rl(a,v),Te(e,a,o,d,y)):(e=Vd(o.type,null,d,a,a.mode,y),e.ref=a.ref,e.return=a,a.child=e)}if(v=e.child,!le(e,y)){var C=v.memoizedProps;if(o=o.compare,o=o!==null?o:Yc,o(C,d)&&e.ref===a.ref)return cs(e,a,y)}return a.flags|=1,e=Ul(v,d),e.ref=a.ref,e.return=a,a.child=e}function Te(e,a,o,d,y){if(e!==null){var v=e.memoizedProps;if(Yc(v,d)&&e.ref===a.ref&&a.type===e.type)if(ra=!1,a.pendingProps=d=v,le(e,y))(e.flags&131072)!==0&&(ra=!0);else return a.lanes=e.lanes,cs(e,a,y)}return cf(e,a,o,d,y)}function gd(e,a,o,d){var y=d.children,v=e!==null?e.memoizedState:null;if(e===null&&a.stateNode===null&&(a.stateNode={_visibility:u1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((a.flags&128)!==0){if(v=v!==null?v.baseLanes|o:o,e!==null){for(d=a.child=e.child,y=0;d!==null;)y=y|d.lanes|d.childLanes,d=d.sibling;d=y&~v}else d=0,a.child=null;return hm(e,a,v,o,d)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},e!==null&&Pc(a,v!==null?v.cachePool:null),v!==null?k0(a,v):Zh(a),Fh(a);else return d=a.lanes=536870912,hm(e,a,v!==null?v.baseLanes|o:o,o,d)}else v!==null?(Pc(a,v.cachePool),k0(a,v),ls(a),a.memoizedState=null):(e!==null&&Pc(a,null),Zh(a),ls(a));return Rn(e,a,y,o),a.child}function uf(e,a){return e!==null&&e.tag===22||a.stateNode!==null||(a.stateNode={_visibility:u1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function hm(e,a,o,d,y){var v=jh();return v=v===null?null:{parent:Ka?Bn._currentValue:Bn._currentValue2,pool:v},a.memoizedState={baseLanes:o,cachePool:v},e!==null&&Pc(a,null),Zh(a),Fh(a),e!==null&&Qe(e,a,d,!0),a.childLanes=y,null}function yd(e,a){var o=a.hidden;return o!==void 0&&console.error(`<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
|
|
116
116
|
- <Activity %s>
|
|
117
|
-
+ <Activity %s>`,o===!0?"hidden":o===!1?"hidden={false}":"hidden={...}",o?'mode="hidden"':'mode="visible"'),a=
|
|
117
|
+
+ <Activity %s>`,o===!0?"hidden":o===!1?"hidden={false}":"hidden={...}",o?'mode="hidden"':'mode="visible"'),a=df({mode:a.mode,children:a.children},e.mode),a.ref=e.ref,e.child=a,a.return=e,a}function Lg(e,a,o){return Zf(a,e.child,null,o),e=yd(a,a.pendingProps),e.flags|=2,La(a),a.memoizedState=null,e}function t3(e,a,o){var d=a.pendingProps,y=(a.flags&128)!==0;if(a.flags&=-129,e===null){if(me){if(d.mode==="hidden")return e=yd(a,d),a.lanes=536870912,uf(null,e);if(Jh(a),(e=bn)?(o=fe(e,el),o!==null&&(d={dehydrated:o,treeContext:ir(),retryLane:536870912,hydrationErrors:null},a.memoizedState=d,d=go(o),d.return=a,a.child=d,Qa=a,bn=null)):o=null,o===null)throw ru(a,e),Rs(a);return a.lanes=536870912,null}return yd(a,d)}var v=e.memoizedState;if(v!==null){var C=v.dehydrated;if(Jh(a),y)if(a.flags&256)a.flags&=-257,a=Lg(e,a,o);else if(a.memoizedState!==null)a.child=e.child,a.flags|=128,a=null;else throw Error("Client rendering an Activity suspended it again. This is a bug in React.");else if(bl(),(o&536870912)!==0&&Rd(a),ra||Qe(e,a,o,!1),y=(o&e.childLanes)!==0,ra||y){if(d=Je,d!==null&&(C=Bt(d,o),C!==0&&C!==v.retryLane))throw v.retryLane=C,xa(e,C),en(d,e,C),J3;zd(),a=Lg(e,a,o)}else e=v.treeContext,Oa&&(bn=ap(C),Qa=a,me=!0,Fu=null,Or=!1,ys=null,el=!1,e!==null&&Mc(a,e)),a=yd(a,d),a.flags|=4096;return a}return v=e.child,d={mode:d.mode,children:d.children},(o&536870912)!==0&&(o&e.lanes)!==0&&Rd(a),e=Ul(v,d),e.ref=a.ref,a.child=e,e.return=a,e}function vd(e,a){var o=a.ref;if(o===null)e!==null&&e.ref!==null&&(a.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");(e===null||e.ref!==o)&&(a.flags|=4194816)}}function cf(e,a,o,d,y){if(o.prototype&&typeof o.prototype.render=="function"){var v=it(o)||"Unknown";UE[v]||(console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",v,v),UE[v]=!0)}return a.mode&8&&Xl.recordLegacyContextWarning(a,null),e===null&&(Rl(a,a.type),o.contextTypes&&(v=it(o)||"Unknown",VE[v]||(VE[v]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",v)))),$i(a),o=yi(e,a,o,d,void 0,y),d=Wh(),e!==null&&!ra?($h(e,a,y),cs(e,a,y)):(me&&d&&Ut(a),a.flags|=1,Rn(e,a,o,y),a.child)}function Ps(e,a,o,d,y,v){return $i(a),Vo=-1,h1=e!==null&&e.type!==a.type,a.updateQueue=null,o=Ih(a,d,o,y),Wc(e,a),d=Wh(),e!==null&&!ra?($h(e,a,v),cs(e,a,v)):(me&&d&&Ut(a),a.flags|=1,Rn(e,a,o,v),a.child)}function dm(e,a,o,d,y){switch(m(a)){case!1:var v=a.stateNode,C=new a.type(a.memoizedProps,v.context).state;v.updater.enqueueSetState(v,C,null);break;case!0:a.flags|=128,a.flags|=65536,v=Error("Simulated error coming from DevTools");var M=y&-y;if(a.lanes|=M,C=Je,C===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");M=pd(M),md(M,C,a,Va(v,a)),ao(a,M)}if($i(a),a.stateNode===null){if(C=sn,v=o.contextType,"contextType"in o&&v!==null&&(v===void 0||v.$$typeof!==zn)&&!HE.has(o)&&(HE.add(o),M=v===void 0?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof v!="object"?" However, it is set to a "+typeof v+".":v.$$typeof===vo?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(v).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",it(o)||"Component",M)),typeof v=="object"&&v!==null&&(C=je(v)),v=new o(d,C),a.mode&8){It(!0);try{v=new o(d,C)}finally{It(!1)}}if(C=a.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=Q3,a.stateNode=v,v._reactInternals=a,v._reactInternalInstance=_E,typeof o.getDerivedStateFromProps=="function"&&C===null&&(C=it(o)||"Component",DE.has(C)||(DE.add(C),console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",C,v.state===null?"null":"undefined",C))),typeof o.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"){var B=M=C=null;if(typeof v.componentWillMount=="function"&&v.componentWillMount.__suppressDeprecationWarning!==!0?C="componentWillMount":typeof v.UNSAFE_componentWillMount=="function"&&(C="UNSAFE_componentWillMount"),typeof v.componentWillReceiveProps=="function"&&v.componentWillReceiveProps.__suppressDeprecationWarning!==!0?M="componentWillReceiveProps":typeof v.UNSAFE_componentWillReceiveProps=="function"&&(M="UNSAFE_componentWillReceiveProps"),typeof v.componentWillUpdate=="function"&&v.componentWillUpdate.__suppressDeprecationWarning!==!0?B="componentWillUpdate":typeof v.UNSAFE_componentWillUpdate=="function"&&(B="UNSAFE_componentWillUpdate"),C!==null||M!==null||B!==null){v=it(o)||"Component";var q=typeof o.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";ME.has(v)||(ME.add(v),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
118
118
|
|
|
119
119
|
%s uses %s but also contains the following legacy lifecycles:%s%s%s
|
|
120
120
|
|
|
@@ -122,8 +122,8 @@ The above lifecycles should be removed. Learn more about this warning here:
|
|
|
122
122
|
https://react.dev/link/unsafe-component-lifecycles`,v,q,C!==null?`
|
|
123
123
|
`+C:"",M!==null?`
|
|
124
124
|
`+M:"",B!==null?`
|
|
125
|
-
`+B:""))}}v=a.stateNode,C=
|
|
126
|
-
%s.childContextTypes = ...`,a.displayName||a.name||"Component"),typeof a.getDerivedStateFromProps=="function"&&(e=et(a)||"Unknown",VE[e]||(console.error("%s: Function components do not support getDerivedStateFromProps.",e),VE[e]=!0)),typeof a.contextType=="object"&&a.contextType!==null&&(a=et(a)||"Unknown",UE[a]||(console.error("%s: Function components do not support contextType.",a),UE[a]=!0))}function of(e){return{baseLanes:e,cachePool:Vh()}}function gd(e,a,o){return e=e!==null?e.childLanes&~o:0,a&&(e|=Xi),e}function yd(e,a,o){var d=a.pendingProps;p(a)&&(a.flags|=128);var y=!1,v=(a.flags&128)!==0,C;if((C=v)||(C=e!==null&&e.memoizedState===null?!1:(In.current&o1)!==0),C&&(y=!0,a.flags&=-129),C=(a.flags&32)!==0,a.flags&=-33,e===null){if(he){if(y?Hs(a):is(a),(e=vn)?(o=Le(e,Is),o!==null&&(C={dehydrated:o,treeContext:_c(),retryLane:536870912,hydrationErrors:null},a.memoizedState=C,C=fo(o),C.return=a,a.child=C,Qa=a,vn=null)):o=null,o===null)throw lu(a,e),As(a);return Id(o)?a.lanes=32:a.lanes=536870912,null}var M=d.children;return d=d.fallback,y?(is(a),y=a.mode,M=uf({mode:"hidden",children:M},y),d=hr(d,y,o,null),M.return=a,d.return=a,M.sibling=d,a.child=M,d=a.child,d.memoizedState=of(o),d.childLanes=gd(e,C,o),a.memoizedState=F3,sf(null,d)):(Hs(a),hm(a,M))}var B=e.memoizedState;if(B!==null&&(M=B.dehydrated,M!==null)){if(v)a.flags&256?(Hs(a),a.flags&=-257,a=vd(e,a,o)):a.memoizedState!==null?(is(a),a.child=e.child,a.flags|=128,a=null):(is(a),M=d.fallback,y=a.mode,d=uf({mode:"visible",children:d.children},y),M=hr(M,y,o,null),M.flags|=2,d.return=a,M.return=a,d.sibling=M,a.child=d,qf(a,e.child,null,o),d=a.child,d.memoizedState=of(o),d.childLanes=gd(e,C,o),a.memoizedState=F3,a=sf(null,d));else if(Hs(a),ml(),(o&536870912)!==0&&Md(a),Id(M))y=aa(M),C=y.digest,M=y.message,d=y.stack,y=y.componentStack,M=Error(M||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),M.stack=d||"",M.digest=C,C=y===void 0?null:y,d={value:M,source:null,stack:C},typeof C=="string"&&C3.set(M,d),ru(d),a=vd(e,a,o);else if(la||Ye(e,a,o,!1),C=(o&e.childLanes)!==0,la||C){if(C=Xe,C!==null&&(d=le(C,o),d!==0&&d!==B.retryLane))throw B.retryLane=d,_a(e,d),Ie(C,e,d),J3;Mf(M)||Nd(),a=vd(e,a,o)}else Mf(M)?(a.flags|=192,a.child=e.child,a=null):(e=B.treeContext,Na&&(vn=ep(M),Qa=a,he=!0,Ju=null,_r=!1,ms=null,Is=!1,e!==null&&O0(a,e)),a=hm(a,d.children),a.flags|=4096);return a}return y?(is(a),M=d.fallback,y=a.mode,B=e.child,v=B.sibling,d=Ol(B,{mode:"hidden",children:d.children}),d.subtreeFlags=B.subtreeFlags&65011712,v!==null?M=Ol(v,M):(M=hr(M,y,o,null),M.flags|=2),M.return=a,d.return=a,d.sibling=M,a.child=d,sf(null,d),d=a.child,M=e.child.memoizedState,M===null?M=of(o):(y=M.cachePool,y!==null?(B=Ka?Un._currentValue:Un._currentValue2,y=y.parent!==B?{parent:B,pool:B}:y):y=Vh(),M={baseLanes:M.baseLanes|o,cachePool:y}),d.memoizedState=M,d.childLanes=gd(e,C,o),a.memoizedState=F3,sf(e.child,d)):(B!==null&&(o&62914560)===o&&(o&e.lanes)!==0&&Md(a),Hs(a),o=e.child,e=o.sibling,o=Ol(o,{mode:"visible",children:d.children}),o.return=a,o.sibling=null,e!==null&&(C=a.deletions,C===null?(a.deletions=[e],a.flags|=16):C.push(e)),a.child=o,a.memoizedState=null,o)}function hm(e,a){return a=uf({mode:"visible",children:a},e.mode),a.return=e,e.child=a}function uf(e,a){return e=S(22,e,null,a),e.lanes=0,e}function vd(e,a,o){return qf(a,e.child,null,o),e=hm(a,a.pendingProps.children),e.flags|=2,a.memoizedState=null,e}function dm(e,a,o){e.lanes|=a;var d=e.alternate;d!==null&&(d.lanes|=a),Oc(e.return,a,o)}function Sd(e,a,o,d,y,v){var C=e.memoizedState;C===null?e.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:d,tail:o,tailMode:y,treeForkCount:v}:(C.isBackwards=a,C.rendering=null,C.renderingStartTime=0,C.last=d,C.tail=o,C.tailMode=y,C.treeForkCount=v)}function pm(e,a,o){var d=a.pendingProps,y=d.revealOrder,v=d.tail,C=d.children,M=In.current;if((d=(M&o1)!==0)?(M=M&bp|o1,a.flags|=128):M&=bp,dt(In,M,a),M=y??"null",y!=="forwards"&&y!=="unstable_legacy-backwards"&&y!=="together"&&y!=="independent"&&!GE[M])if(GE[M]=!0,y==null)console.error('The default for the <SuspenseList revealOrder="..."> prop is changing. To be future compatible you must explictly specify either "independent" (the current default), "together", "forwards" or "legacy_unstable-backwards".');else if(y==="backwards")console.error('The rendering order of <SuspenseList revealOrder="backwards"> is changing. To be future compatible you must specify revealOrder="legacy_unstable-backwards" instead.');else if(typeof y=="string")switch(y.toLowerCase()){case"together":case"forwards":case"backwards":case"independent":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',y,y.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',y,y.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',y)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',y);M=v??"null",n2[M]||(v==null?(y==="forwards"||y==="backwards"||y==="unstable_legacy-backwards")&&(n2[M]=!0,console.error('The default for the <SuspenseList tail="..."> prop is changing. To be future compatible you must explictly specify either "visible" (the current default), "collapsed" or "hidden".')):v!=="visible"&&v!=="collapsed"&&v!=="hidden"?(n2[M]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',v)):y!=="forwards"&&y!=="backwards"&&y!=="unstable_legacy-backwards"&&(n2[M]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',v)));t:if((y==="forwards"||y==="backwards"||y==="unstable_legacy-backwards")&&C!==void 0&&C!==null&&C!==!1)if(Pn(C)){for(M=0;M<C.length;M++)if(!K0(C[M],M))break t}else if(M=I(C),typeof M=="function"){if(M=M.call(C))for(var B=M.next(),q=0;!B.done;B=M.next()){if(!K0(B.value,q))break t;q++}}else console.error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',y);if(On(e,a,C,o),he?(fl(),C=Qm):C=0,!d&&e!==null&&(e.flags&128)!==0)t:for(e=a.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&dm(e,o,a);else if(e.tag===19)dm(e,o,a);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===a)break t;for(;e.sibling===null;){if(e.return===null||e.return===a)break t;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(y){case"forwards":for(o=a.child,y=null;o!==null;)e=o.alternate,e!==null&&Zc(e)===null&&(y=o),o=o.sibling;o=y,o===null?(y=a.child,a.child=null):(y=o.sibling,o.sibling=null),Sd(a,!1,y,o,v,C);break;case"backwards":case"unstable_legacy-backwards":for(o=null,y=a.child,a.child=null;y!==null;){if(e=y.alternate,e!==null&&Zc(e)===null){a.child=y;break}e=y.sibling,y.sibling=o,o=y,y=e}Sd(a,!0,o,null,v,C);break;case"together":Sd(a,!1,null,null,void 0,C);break;default:a.memoizedState=null}return a.child}function os(e,a,o){if(e!==null&&(a.dependencies=e.dependencies),Ci=-1,nc|=a.lanes,(o&a.childLanes)===0)if(e!==null){if(Ye(e,a,o,!1),(o&a.childLanes)===0)return null}else return null;if(e!==null&&a.child!==e.child)throw Error("Resuming work not yet implemented.");if(a.child!==null){for(e=a.child,o=Ol(e,e.pendingProps),a.child=o,o.return=a;e.sibling!==null;)e=e.sibling,o=o.sibling=Ol(e,e.pendingProps),o.return=a;o.sibling=null}return a.child}function ne(e,a){return(e.lanes&a)!==0?!0:(e=e.dependencies,!!(e!==null&&kr(e)))}function e3(e,a,o){switch(a.tag){case 3:xc(a,a.stateNode.containerInfo),Ms(a,Un,e.memoizedState.cache),vl();break;case 27:case 5:Kr(a);break;case 4:xc(a,a.stateNode.containerInfo);break;case 10:Ms(a,a.type,a.memoizedProps.value);break;case 12:(o&a.childLanes)!==0&&(a.flags|=4),a.flags|=2048;var d=a.stateNode;d.effectDuration=-0,d.passiveEffectDuration=-0;break;case 31:if(a.memoizedState!==null)return a.flags|=128,Kh(a),null;break;case 13:if(d=a.memoizedState,d!==null)return d.dehydrated!==null?(Hs(a),a.flags|=128,null):(o&a.child.childLanes)!==0?yd(e,a,o):(Hs(a),e=os(e,a,o),e!==null?e.sibling:null);Hs(a);break;case 19:var y=(e.flags&128)!==0;if(d=(o&a.childLanes)!==0,d||(Ye(e,a,o,!1),d=(o&a.childLanes)!==0),y){if(d)return pm(e,a,o);a.flags|=128}if(y=a.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),dt(In,In.current,a),d)break;return null;case 22:return a.lanes=0,dd(e,a,o,a.pendingProps);case 24:Ms(a,Un,e.memoizedState.cache)}return os(e,a,o)}function Ya(e,a,o){if(a._debugNeedsRemount&&e!==null){o=wd(a.type,a.key,a.pendingProps,a._debugOwner||null,a.mode,a.lanes),o._debugStack=a._debugStack,o._debugTask=a._debugTask;var d=a.return;if(d===null)throw Error("Cannot swap the root fiber.");if(e.alternate=null,a.alternate=null,o.index=a.index,o.sibling=a.sibling,o.return=a.return,o.ref=a.ref,o._debugInfo=a._debugInfo,a===d.child)d.child=o;else{var y=d.child;if(y===null)throw Error("Expected parent to have a child.");for(;y.sibling!==a;)if(y=y.sibling,y===null)throw Error("Expected to find the previous sibling.");y.sibling=o}return a=d.deletions,a===null?(d.deletions=[e],d.flags|=16):a.push(e),o.flags|=2,o}if(e!==null)if(e.memoizedProps!==a.pendingProps||a.type!==e.type)la=!0;else{if(!ne(e,o)&&(a.flags&128)===0)return la=!1,e3(e,a,o);la=(e.flags&131072)!==0}else la=!1,(d=he)&&(fl(),d=(a.flags&1048576)!==0),d&&(d=a.index,fl(),qr(a,Qm,d));switch(a.lanes=0,a.tag){case 16:t:if(d=a.pendingProps,e=bl(a.elementType),a.type=e,typeof e=="function")Hd(e)?(d=Bs(e,d),a.tag=1,a.type=e=co(e),a=fm(null,a,e,d,o)):(a.tag=0,Dl(a,e),a.type=e=co(e),a=lf(null,a,e,d,o));else{if(e!=null){if(y=e.$$typeof,y===Sa){a.tag=11,a.type=e=zd(e),a=om(null,a,e,d,o);break t}else if(y===zu){a.tag=14,a=um(null,a,e,d,o);break t}}throw a="",e!==null&&typeof e=="object"&&e.$$typeof===li&&(a=" Did you wrap a component in React.lazy() more than once?"),e=et(e)||e,Error("Element type is invalid. Received a promise that resolves to: "+e+". Lazy element type must resolve to a class or function."+a)}return a;case 0:return lf(e,a,a.type,a.pendingProps,o);case 1:return d=a.type,y=Bs(d,a.pendingProps),fm(e,a,d,y,o);case 3:t:{if(xc(a,a.stateNode.containerInfo),e===null)throw Error("Should have a current fiber. This is a bug in React.");var v=a.pendingProps;y=a.memoizedState,d=y.element,qh(e,a),Xc(a,v,null,o);var C=a.memoizedState;if(v=C.cache,Ms(a,Un,v),v!==y.cache&&pa(a,[Un],o,!0),mu(),v=C.element,Na&&y.isDehydrated)if(y={element:v,isDehydrated:!1,cache:C.cache},a.updateQueue.baseState=y,a.memoizedState=y,a.flags&256){a=rf(e,a,v,o);break t}else if(v!==d){d=Ht(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),a),ru(d),a=rf(e,a,v,o);break t}else for(Na&&(vn=$d(a.stateNode.containerInfo),Qa=a,he=!0,Ju=null,_r=!1,ms=null,Is=!0),e=dE(a,null,v,o),a.child=e;e;)e.flags=e.flags&-3|4096,e=e.sibling;else{if(vl(),v===d){a=os(e,a,o);break t}On(e,a,v,o)}a=a.child}return a;case 26:if(we)return md(e,a),e===null?(e=Js(a.type,null,a.pendingProps,null))?a.memoizedState=e:he||(a.stateNode=l(a.type,a.pendingProps,Wa(Zu.current),a)):a.memoizedState=Js(a.type,e.memoizedProps,a.pendingProps,e.memoizedState),null;case 27:if(T)return Kr(a),e===null&&T&&he&&(y=Wa(Zu.current),d=pi(),y=a.stateNode=z(a.type,a.pendingProps,y,d,!1),_r||(d=Rf(y,a.type,a.pendingProps,d),d!==null&&(pl(a,0).serverProps=d)),Qa=a,Is=!0,vn=np(a.type,y,vn)),On(e,a,a.pendingProps.children,o),md(e,a),e===null&&(a.flags|=4194304),a.child;case 5:return e===null&&he&&(v=pi(),d=ip(a.type,a.pendingProps,v),y=vn,(C=!y)||(C=Nf(y,a.type,a.pendingProps,Is),C!==null?(a.stateNode=C,_r||(v=Rf(C,a.type,a.pendingProps,v),v!==null&&(pl(a,0).serverProps=v)),Qa=a,vn=Wd(C),Is=!1,v=!0):v=!1,C=!v),C&&(d&&lu(a,y),As(a))),Kr(a),y=a.type,v=a.pendingProps,C=e!==null?e.memoizedProps:null,d=v.children,se(y,v)?d=null:C!==null&&se(y,C)&&(a.flags|=32),a.memoizedState!==null&&(y=gi(e,a,F0,null,null,o),Ka?ji._currentValue=y:ji._currentValue2=y),md(e,a),On(e,a,d,o),a.child;case 6:return e===null&&he&&(e=a.pendingProps,o=pi(),e=Sr(e,o),o=vn,(d=!o)||(d=v3(o,a.pendingProps,Is),d!==null?(a.stateNode=d,Qa=a,vn=null,d=!0):d=!1,d=!d),d&&(e&&lu(a,o),As(a))),null;case 13:return yd(e,a,o);case 4:return xc(a,a.stateNode.containerInfo),d=a.pendingProps,e===null?a.child=qf(a,null,d,o):On(e,a,d,o),a.child;case 11:return om(e,a,a.type,a.pendingProps,o);case 7:return On(e,a,a.pendingProps,o),a.child;case 8:return On(e,a,a.pendingProps.children,o),a.child;case 12:return a.flags|=4,a.flags|=2048,d=a.stateNode,d.effectDuration=-0,d.passiveEffectDuration=-0,On(e,a,a.pendingProps.children,o),a.child;case 10:return d=a.type,y=a.pendingProps,v=y.value,"value"in y||jE||(jE=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),Ms(a,d,v),On(e,a,y.children,o),a.child;case 9:return y=a.type._context,d=a.pendingProps.children,typeof d!="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),Ii(a),y=Ve(y),d=U3(d,y,void 0),a.flags|=1,On(e,a,d,o),a.child;case 14:return um(e,a,a.type,a.pendingProps,o);case 15:return be(e,a,a.type,a.pendingProps,o);case 19:return pm(e,a,o);case 31:return t3(e,a,o);case 22:return dd(e,a,o,a.pendingProps);case 24:return Ii(a),d=Ve(Un),e===null?(y=Bh(),y===null&&(y=Xe,v=uu(),y.pooledCache=v,Sl(v),v!==null&&(y.pooledCacheLanes|=o),y=v),a.memoizedState={parent:d,cache:y},Yh(a),Ms(a,Un,y)):((e.lanes&o)!==0&&(qh(e,a),Xc(a,null,null,o),mu()),y=e.memoizedState,v=a.memoizedState,y.parent!==d?(y={parent:d,cache:d},a.memoizedState=y,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=y),Ms(a,Un,d)):(d=v.cache,Ms(a,Un,d),d!==y.cache&&pa(a,[Un],o,!0))),On(e,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error("Unknown unit of work tag ("+a.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function yi(e){e.flags|=4}function bd(e){Ks&&(e.flags|=8)}function cf(e,a){if(e!==null&&e.child===a.child)return!1;if((a.flags&16)!==0)return!0;for(e=a.child;e!==null;){if((e.flags&8218)!==0||(e.subtreeFlags&8218)!==0)return!0;e=e.sibling}return!1}function or(e,a,o,d){if($e)for(o=a.child;o!==null;){if(o.tag===5||o.tag===6)Fn(e,o.stateNode);else if(!(o.tag===4||T&&o.tag===27)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===a)break;for(;o.sibling===null;){if(o.return===null||o.return===a)return;o=o.return}o.sibling.return=o.return,o=o.sibling}else if(Ks)for(var y=a.child;y!==null;){if(y.tag===5){var v=y.stateNode;o&&d&&(v=Zs(v,y.type,y.memoizedProps)),Fn(e,v)}else if(y.tag===6)v=y.stateNode,o&&d&&(v=wn(v,y.memoizedProps)),Fn(e,v);else if(y.tag!==4){if(y.tag===22&&y.memoizedState!==null)v=y.child,v!==null&&(v.return=y),or(e,y,!0,!0);else if(y.child!==null){y.child.return=y,y=y.child;continue}}if(y===a)break;for(;y.sibling===null;){if(y.return===null||y.return===a)return;y=y.return}y.sibling.return=y.return,y=y.sibling}}function io(e,a,o,d){var y=!1;if(Ks)for(var v=a.child;v!==null;){if(v.tag===5){var C=v.stateNode;o&&d&&(C=Zs(C,v.type,v.memoizedProps)),Fd(e,C)}else if(v.tag===6)C=v.stateNode,o&&d&&(C=wn(C,v.memoizedProps)),Fd(e,C);else if(v.tag!==4){if(v.tag===22&&v.memoizedState!==null)y=v.child,y!==null&&(y.return=v),io(e,v,!0,!0),y=!0;else if(v.child!==null){v.child.return=v,v=v.child;continue}}if(v===a)break;for(;v.sibling===null;){if(v.return===null||v.return===a)return y;v=v.return}v.sibling.return=v.return,v=v.sibling}return y}function mm(e,a){if(Ks&&cf(e,a)){e=a.stateNode;var o=e.containerInfo,d=Jd();io(d,a,!1,!1),e.pendingChildren=d,yi(a),qn(o,d)}}function ff(e,a,o,d){if($e)e.memoizedProps!==d&&yi(a);else if(Ks){var y=e.stateNode,v=e.memoizedProps;if((e=cf(e,a))||v!==d){var C=pi();v=wy(y,o,v,d,!e,null),v===y?a.stateNode=y:(bd(a),We(v,o,d,C)&&yi(a),a.stateNode=v,e&&or(v,a,!1,!1))}else a.stateNode=y}}function Ed(e,a,o,d,y){if((e.mode&32)!==Kt&&(o===null?Uu(a,d):Bu(a,o,d))){if(e.flags|=16777216,(y&335544128)===y||Pd(a,d))if(pr(e.stateNode,a,d))e.flags|=8192;else if(cy())e.flags|=8192;else throw Yf=ky,V3}else e.flags&=-16777217}function Al(e,a){if(h(a)){if(e.flags|=16777216,!g(a))if(cy())e.flags|=8192;else throw Yf=ky,V3}else e.flags&=-16777217}function Cu(e,a){a!==null&&(e.flags|=4),e.flags&16384&&(a=e.tag!==22?at():536870912,e.lanes|=a,Jf|=a)}function so(e,a){if(!he)switch(e.tailMode){case"hidden":a=e.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var d=null;o!==null;)o.alternate!==null&&(d=o),o=o.sibling;d===null?a||e.tail===null?e.tail=null:e.tail.sibling=null:d.sibling=null}}function ze(e){var a=e.alternate!==null&&e.alternate.child===e.child,o=0,d=0;if(a)if((e.mode&2)!==Kt){for(var y=e.selfBaseDuration,v=e.child;v!==null;)o|=v.lanes|v.childLanes,d|=v.subtreeFlags&65011712,d|=v.flags&65011712,y+=v.treeBaseDuration,v=v.sibling;e.treeBaseDuration=y}else for(y=e.child;y!==null;)o|=y.lanes|y.childLanes,d|=y.subtreeFlags&65011712,d|=y.flags&65011712,y.return=e,y=y.sibling;else if((e.mode&2)!==Kt){y=e.actualDuration,v=e.selfBaseDuration;for(var C=e.child;C!==null;)o|=C.lanes|C.childLanes,d|=C.subtreeFlags,d|=C.flags,y+=C.actualDuration,v+=C.treeBaseDuration,C=C.sibling;e.actualDuration=y,e.treeBaseDuration=v}else for(y=e.child;y!==null;)o|=y.lanes|y.childLanes,d|=y.subtreeFlags,d|=y.flags,y.return=e,y=y.sibling;return e.subtreeFlags|=d,e.childLanes=o,a}function gm(e,a,o){var d=a.pendingProps;switch(Nh(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ze(a),null;case 1:return ze(a),null;case 3:return o=a.stateNode,d=null,e!==null&&(d=e.memoizedState.cache),a.memoizedState.cache!==d&&(a.flags|=2048),ki(Un,a),Xr(a),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(yl(a)?(Oh(),yi(a)):e===null||e.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Nc())),mm(e,a),ze(a),null;case 26:if(we){var y=a.type,v=a.memoizedState;return e===null?(yi(a),v!==null?(ze(a),Al(a,v)):(ze(a),Ed(a,y,null,d,o))):v?v!==e.memoizedState?(yi(a),ze(a),Al(a,v)):(ze(a),a.flags&=-16777217):(v=e.memoizedProps,$e?v!==d&&yi(a):ff(e,a,y,d),ze(a),Ed(a,y,v,d,o)),null}case 27:if(T){if(Qr(a),o=Wa(Zu.current),y=a.type,e!==null&&a.stateNode!=null)$e?e.memoizedProps!==d&&yi(a):ff(e,a,y,d);else{if(!d){if(a.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return ze(a),null}e=pi(),yl(a)?gl(a,e):(e=z(y,d,o,e,!0),a.stateNode=e,yi(a))}return ze(a),null}case 5:if(Qr(a),y=a.type,e!==null&&a.stateNode!=null)ff(e,a,y,d);else{if(!d){if(a.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return ze(a),null}if(v=pi(),yl(a))gl(a,v),bo(a.stateNode,y,d,v)&&(a.flags|=64);else{var C=Wa(Zu.current);C=Ld(y,d,C,v,a),bd(a),or(C,a,!1,!1),a.stateNode=C,We(C,y,d,v)&&yi(a)}}return ze(a),Ed(a,a.type,e===null?null:e.memoizedProps,a.pendingProps,o),null;case 6:if(e&&a.stateNode!=null)o=e.memoizedProps,$e?o!==d&&yi(a):Ks&&(o!==d?(e=Wa(Zu.current),o=pi(),bd(a),a.stateNode=wl(d,e,o,a)):a.stateNode=e.stateNode);else{if(typeof d!="string"&&a.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(e=Wa(Zu.current),o=pi(),yl(a)){if(!Na)throw Error("Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");if(e=a.stateNode,o=a.memoizedProps,y=!_r,d=null,v=Qa,v!==null)switch(v.tag){case 3:y&&(y=Xm(e,o,d),y!==null&&(pl(a,0).serverProps=y));break;case 27:case 5:d=v.memoizedProps,y&&(y=Xm(e,o,d),y!==null&&(pl(a,0).serverProps=y))}ce(e,o,a,d)||As(a,!0)}else bd(a),a.stateNode=wl(d,e,o,a)}return ze(a),null;case 31:if(o=a.memoizedState,e===null||e.memoizedState!==null){if(d=yl(a),o!==null){if(e===null){if(!d)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(!Na)throw Error("Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");if(e=a.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue.");He(e,a),ze(a),(a.mode&2)!==Kt&&o!==null&&(e=a.child,e!==null&&(a.treeBaseDuration-=e.treeBaseDuration))}else Oh(),vl(),(a.flags&128)===0&&(o=a.memoizedState=null),a.flags|=4,ze(a),(a.mode&2)!==Kt&&o!==null&&(e=a.child,e!==null&&(a.treeBaseDuration-=e.treeBaseDuration));e=!1}else o=Nc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),e=!0;if(!e)return a.flags&256?(La(a),a):(La(a),null);if((a.flags&128)!==0)throw Error("Client rendering an Activity suspended it again. This is a bug in React.")}return ze(a),null;case 13:if(d=a.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(y=d,v=yl(a),y!==null&&y.dehydrated!==null){if(e===null){if(!v)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(!Na)throw Error("Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");if(v=a.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");bi(v,a),ze(a),(a.mode&2)!==Kt&&y!==null&&(y=a.child,y!==null&&(a.treeBaseDuration-=y.treeBaseDuration))}else Oh(),vl(),(a.flags&128)===0&&(y=a.memoizedState=null),a.flags|=4,ze(a),(a.mode&2)!==Kt&&y!==null&&(y=a.child,y!==null&&(a.treeBaseDuration-=y.treeBaseDuration));y=!1}else y=Nc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=y),y=!0;if(!y)return a.flags&256?(La(a),a):(La(a),null)}return La(a),(a.flags&128)!==0?(a.lanes=o,(a.mode&2)!==Kt&&wc(a),a):(o=d!==null,e=e!==null&&e.memoizedState!==null,o&&(d=a.child,y=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(y=d.alternate.memoizedState.cachePool.pool),v=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(v=d.memoizedState.cachePool.pool),v!==y&&(d.flags|=2048)),o!==e&&o&&(a.child.flags|=8192),Cu(a,a.updateQueue),ze(a),(a.mode&2)!==Kt&&o&&(e=a.child,e!==null&&(a.treeBaseDuration-=e.treeBaseDuration)),null);case 4:return Xr(a),mm(e,a),e===null&&cn(a.stateNode.containerInfo),ze(a),null;case 10:return ki(a.type,a),ze(a),null;case 19:if(lt(In,a),d=a.memoizedState,d===null)return ze(a),null;if(y=(a.flags&128)!==0,v=d.rendering,v===null)if(y)so(d,!1);else{if(bn!==Uo||e!==null&&(e.flags&128)!==0)for(e=a.child;e!==null;){if(v=Zc(e),v!==null){for(a.flags|=128,so(d,!1),e=v.updateQueue,a.updateQueue=e,Cu(a,e),a.subtreeFlags=0,e=o,o=a.child;o!==null;)Ln(o,e),o=o.sibling;return dt(In,In.current&bp|o1,a),he&&ge(a,d.treeForkCount),a.child}e=e.sibling}d.tail!==null&&fe()>y1&&(a.flags|=128,y=!0,so(d,!1),a.lanes=4194304)}else{if(!y)if(e=Zc(v),e!==null){if(a.flags|=128,y=!0,e=e.updateQueue,a.updateQueue=e,Cu(a,e),so(d,!0),d.tail===null&&d.tailMode==="hidden"&&!v.alternate&&!he)return ze(a),null}else 2*fe()-d.renderingStartTime>y1&&o!==536870912&&(a.flags|=128,y=!0,so(d,!1),a.lanes=4194304);d.isBackwards?(v.sibling=a.child,a.child=v):(e=d.last,e!==null?e.sibling=v:a.child=v,d.last=v)}return d.tail!==null?(e=d.tail,d.rendering=e,d.tail=e.sibling,d.renderingStartTime=fe(),e.sibling=null,o=In.current,o=y?o&bp|o1:o&bp,dt(In,o,a),he&&ge(a,d.treeForkCount),e):(ze(a),null);case 22:case 23:return La(a),Qc(a),d=a.memoizedState!==null,e!==null?e.memoizedState!==null!==d&&(a.flags|=8192):d&&(a.flags|=8192),d?(o&536870912)!==0&&(a.flags&128)===0&&(ze(a),a.subtreeFlags&6&&(a.flags|=8192)):ze(a),o=a.updateQueue,o!==null&&Cu(a,o.retryQueue),o=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(o=e.memoizedState.cachePool.pool),d=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(d=a.memoizedState.cachePool.pool),d!==o&&(a.flags|=2048),e!==null&<(Lf,a),null;case 24:return o=null,e!==null&&(o=e.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),ki(Un,a),ze(a),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+a.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function ur(e,a){switch(Nh(a),a.tag){case 1:return e=a.flags,e&65536?(a.flags=e&-65537|128,(a.mode&2)!==Kt&&wc(a),a):null;case 3:return ki(Un,a),Xr(a),e=a.flags,(e&65536)!==0&&(e&128)===0?(a.flags=e&-65537|128,a):null;case 26:case 27:case 5:return Qr(a),null;case 31:if(a.memoizedState!==null){if(La(a),a.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");vl()}return e=a.flags,e&65536?(a.flags=e&-65537|128,(a.mode&2)!==Kt&&wc(a),a):null;case 13:if(La(a),e=a.memoizedState,e!==null&&e.dehydrated!==null){if(a.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");vl()}return e=a.flags,e&65536?(a.flags=e&-65537|128,(a.mode&2)!==Kt&&wc(a),a):null;case 19:return lt(In,a),null;case 4:return Xr(a),null;case 10:return ki(a.type,a),null;case 22:case 23:return La(a),Qc(a),e!==null&<(Lf,a),e=a.flags,e&65536?(a.flags=e&-65537|128,(a.mode&2)!==Kt&&wc(a),a):null;case 24:return ki(Un,a),null;case 25:return null;default:return null}}function Td(e,a){switch(Nh(a),a.tag){case 3:ki(Un,a),Xr(a);break;case 26:case 27:case 5:Qr(a);break;case 4:Xr(a);break;case 31:a.memoizedState!==null&&La(a);break;case 13:La(a);break;case 19:lt(In,a);break;case 10:ki(a.type,a);break;case 22:case 23:La(a),Qc(a),e!==null&<(Lf,a);break;case 24:ki(Un,a)}}function Gs(e){return(e.mode&2)!==Kt}function ym(e,a){Gs(e)?(as(),cr(a,e),ns()):cr(a,e)}function vm(e,a,o){Gs(e)?(as(),Gt(o,e,a),ns()):Gt(o,e,a)}function cr(e,a){try{var o=a.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var y=d.next;o=y;do{if((o.tag&e)===e&&(d=void 0,(e&_i)!==Wy&&(Op=!0),d=Bt(a,oj,o),(e&_i)!==Wy&&(Op=!1),d!==void 0&&typeof d!="function")){var v=void 0;v=(o.tag&ys)!==0?"useLayoutEffect":(o.tag&_i)!==0?"useInsertionEffect":"useEffect";var C=void 0;C=d===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof d.then=="function"?`
|
|
125
|
+
`+B:""))}}v=a.stateNode,C=it(o)||"Component",v.render||(o.prototype&&typeof o.prototype.render=="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",C):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",C)),!v.getInitialState||v.getInitialState.isReactClassApproved||v.state||console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",C),v.getDefaultProps&&!v.getDefaultProps.isReactClassApproved&&console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",C),v.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",C),o.childContextTypes&&!zE.has(o)&&(zE.add(o),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",C)),o.contextTypes&&!RE.has(o)&&(RE.add(o),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",C)),typeof v.componentShouldUpdate=="function"&&console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",C),o.prototype&&o.prototype.isPureReactComponent&&typeof v.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",it(o)||"A pure component"),typeof v.componentDidUnmount=="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",C),typeof v.componentDidReceiveProps=="function"&&console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",C),typeof v.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",C),typeof v.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",C),M=v.props!==d,v.props!==void 0&&M&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",C),v.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",C,C),typeof v.getSnapshotBeforeUpdate!="function"||typeof v.componentDidUpdate=="function"||AE.has(o)||(AE.add(o),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",it(o))),typeof v.getDerivedStateFromProps=="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",C),typeof v.getDerivedStateFromError=="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",C),typeof o.getSnapshotBeforeUpdate=="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",C),(M=v.state)&&(typeof M!="object"||Pn(M))&&console.error("%s.state: must be set to an object or null",C),typeof v.getChildContext=="function"&&typeof o.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",C),v=a.stateNode,v.props=d,v.state=a.memoizedState,v.refs={},Kh(a),C=o.contextType,v.context=typeof C=="object"&&C!==null?je(C):sn,v.state===d&&(C=it(o)||"Component",NE.has(C)||(NE.add(C),console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",C))),a.mode&8&&Xl.recordLegacyContextWarning(a,v),Xl.recordUnsafeLifecycleWarnings(a,v),v.state=a.memoizedState,C=o.getDerivedStateFromProps,typeof C=="function"&&(hd(a,o,C,d),v.state=a.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(C=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),C!==v.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",J(a)||"Component"),Q3.enqueueReplaceState(v,v.state,null)),Jc(a,d,v,y),gu(),v.state=a.memoizedState),typeof v.componentDidMount=="function"&&(a.flags|=4194308),(a.mode&16)!==Zt&&(a.flags|=134217728),v=!0}else if(e===null){v=a.stateNode;var ot=a.memoizedProps;M=Ls(o,ot),v.props=M;var ct=v.context;B=o.contextType,C=sn,typeof B=="object"&&B!==null&&(C=je(B)),q=o.getDerivedStateFromProps,B=typeof q=="function"||typeof v.getSnapshotBeforeUpdate=="function",ot=a.pendingProps!==ot,B||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(ot||ct!==C)&&ro(a,v,d,C),tc=!1;var gt=a.memoizedState;v.state=gt,Jc(a,d,v,y),gu(),ct=a.memoizedState,ot||gt!==ct||tc?(typeof q=="function"&&(hd(a,o,q,d),ct=a.memoizedState),(M=tc||om(a,o,M,d,gt,ct,C))?(B||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(a.flags|=4194308),(a.mode&16)!==Zt&&(a.flags|=134217728)):(typeof v.componentDidMount=="function"&&(a.flags|=4194308),(a.mode&16)!==Zt&&(a.flags|=134217728),a.memoizedProps=d,a.memoizedState=ct),v.props=d,v.state=ct,v.context=C,v=M):(typeof v.componentDidMount=="function"&&(a.flags|=4194308),(a.mode&16)!==Zt&&(a.flags|=134217728),v=!1)}else{v=a.stateNode,Qh(e,a),C=a.memoizedProps,B=Ls(o,C),v.props=B,q=a.pendingProps,gt=v.context,ct=o.contextType,M=sn,typeof ct=="object"&&ct!==null&&(M=je(ct)),ot=o.getDerivedStateFromProps,(ct=typeof ot=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(C!==q||gt!==M)&&ro(a,v,d,M),tc=!1,gt=a.memoizedState,v.state=gt,Jc(a,d,v,y),gu();var jt=a.memoizedState;C!==q||gt!==jt||tc||e!==null&&e.dependencies!==null&&to(e.dependencies)?(typeof ot=="function"&&(hd(a,o,ot,d),jt=a.memoizedState),(B=tc||om(a,o,B,d,gt,jt,M)||e!==null&&e.dependencies!==null&&to(e.dependencies))?(ct||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(d,jt,M),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(d,jt,M)),typeof v.componentDidUpdate=="function"&&(a.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof v.componentDidUpdate!="function"||C===e.memoizedProps&>===e.memoizedState||(a.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&>===e.memoizedState||(a.flags|=1024),a.memoizedProps=d,a.memoizedState=jt),v.props=d,v.state=jt,v.context=M,v=B):(typeof v.componentDidUpdate!="function"||C===e.memoizedProps&>===e.memoizedState||(a.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&>===e.memoizedState||(a.flags|=1024),v=!1)}if(M=v,vd(e,a),C=(a.flags&128)!==0,M||C){if(M=a.stateNode,zc(a),C&&typeof o.getDerivedStateFromError!="function")o=null,_i=-1;else if(o=tE(M),a.mode&8){It(!0);try{tE(M)}finally{It(!1)}}a.flags|=1,e!==null&&C?(a.child=Zf(a,e.child,null,y),a.child=Zf(a,null,o,y)):Rn(e,a,o,y),a.memoizedState=M.state,e=a.child}else e=cs(e,a,y);return y=a.stateNode,v&&y.props!==d&&(Ap||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",J(a)||"a component"),Ap=!0),e}function ff(e,a,o,d){return Cl(),a.flags|=256,Rn(e,a,o,d),a.child}function Rl(e,a){a&&a.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
|
|
126
|
+
%s.childContextTypes = ...`,a.displayName||a.name||"Component"),typeof a.getDerivedStateFromProps=="function"&&(e=it(a)||"Unknown",GE[e]||(console.error("%s: Function components do not support getDerivedStateFromProps.",e),GE[e]=!0)),typeof a.contextType=="object"&&a.contextType!==null&&(a=it(a)||"Unknown",BE[a]||(console.error("%s: Function components do not support contextType.",a),BE[a]=!0))}function hf(e){return{baseLanes:e,cachePool:Lh()}}function Sd(e,a,o){return e=e!==null?e.childLanes&~o:0,a&&(e|=Zi),e}function bd(e,a,o){var d=a.pendingProps;p(a)&&(a.flags|=128);var y=!1,v=(a.flags&128)!==0,C;if((C=v)||(C=e!==null&&e.memoizedState===null?!1:(Wn.current&c1)!==0),C&&(y=!0,a.flags&=-129),C=(a.flags&32)!==0,a.flags&=-33,e===null){if(me){if(y?Vs(a):ls(a),(e=bn)?(o=qe(e,el),o!==null&&(C={dehydrated:o,treeContext:ir(),retryLane:536870912,hydrationErrors:null},a.memoizedState=C,C=go(o),C.return=a,a.child=C,Qa=a,bn=null)):o=null,o===null)throw ru(a,e),Rs(a);return tp(o)?a.lanes=32:a.lanes=536870912,null}var M=d.children;return d=d.fallback,y?(ls(a),y=a.mode,M=df({mode:"hidden",children:M},y),d=vr(d,y,o,null),M.return=a,d.return=a,M.sibling=d,a.child=M,d=a.child,d.memoizedState=hf(o),d.childLanes=Sd(e,C,o),a.memoizedState=F3,uf(null,d)):(Vs(a),pm(a,M))}var B=e.memoizedState;if(B!==null&&(M=B.dehydrated,M!==null)){if(v)a.flags&256?(Vs(a),a.flags&=-257,a=Ed(e,a,o)):a.memoizedState!==null?(ls(a),a.child=e.child,a.flags|=128,a=null):(ls(a),M=d.fallback,y=a.mode,d=df({mode:"visible",children:d.children},y),M=vr(M,y,o,null),M.flags|=2,d.return=a,M.return=a,d.sibling=M,a.child=d,Zf(a,e.child,null,o),d=a.child,d.memoizedState=hf(o),d.childLanes=Sd(e,C,o),a.memoizedState=F3,a=uf(null,d));else if(Vs(a),bl(),(o&536870912)!==0&&Rd(a),tp(M))y=ia(M),C=y.digest,M=y.message,d=y.stack,y=y.componentStack,M=Error(M||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),M.stack=d||"",M.digest=C,C=y===void 0?null:y,d={value:M,source:null,stack:C},typeof C=="string"&&C3.set(M,d),ou(d),a=Ed(e,a,o);else if(ra||Qe(e,a,o,!1),C=(o&e.childLanes)!==0,ra||C){if(C=Je,C!==null&&(d=Bt(C,o),d!==0&&d!==B.retryLane))throw B.retryLane=d,xa(e,d),en(C,e,d),J3;zf(M)||zd(),a=Ed(e,a,o)}else zf(M)?(a.flags|=192,a.child=e.child,a=null):(e=B.treeContext,Oa&&(bn=ip(M),Qa=a,me=!0,Fu=null,Or=!1,ys=null,el=!1,e!==null&&Mc(a,e)),a=pm(a,d.children),a.flags|=4096);return a}return y?(ls(a),M=d.fallback,y=a.mode,B=e.child,v=B.sibling,d=Ul(B,{mode:"hidden",children:d.children}),d.subtreeFlags=B.subtreeFlags&65011712,v!==null?M=Ul(v,M):(M=vr(M,y,o,null),M.flags|=2),M.return=a,d.return=a,d.sibling=M,a.child=d,uf(null,d),d=a.child,M=e.child.memoizedState,M===null?M=hf(o):(y=M.cachePool,y!==null?(B=Ka?Bn._currentValue:Bn._currentValue2,y=y.parent!==B?{parent:B,pool:B}:y):y=Lh(),M={baseLanes:M.baseLanes|o,cachePool:y}),d.memoizedState=M,d.childLanes=Sd(e,C,o),a.memoizedState=F3,uf(e.child,d)):(B!==null&&(o&62914560)===o&&(o&e.lanes)!==0&&Rd(a),Vs(a),o=e.child,e=o.sibling,o=Ul(o,{mode:"visible",children:d.children}),o.return=a,o.sibling=null,e!==null&&(C=a.deletions,C===null?(a.deletions=[e],a.flags|=16):C.push(e)),a.child=o,a.memoizedState=null,o)}function pm(e,a){return a=df({mode:"visible",children:a},e.mode),a.return=e,e.child=a}function df(e,a){return e=S(22,e,null,a),e.lanes=0,e}function Ed(e,a,o){return Zf(a,e.child,null,o),e=pm(a,a.pendingProps.children),e.flags|=2,a.memoizedState=null,e}function mm(e,a,o){e.lanes|=a;var d=e.alternate;d!==null&&(d.lanes|=a),wc(e.return,a,o)}function Td(e,a,o,d,y,v){var C=e.memoizedState;C===null?e.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:d,tail:o,tailMode:y,treeForkCount:v}:(C.isBackwards=a,C.rendering=null,C.renderingStartTime=0,C.last=d,C.tail=o,C.tailMode=y,C.treeForkCount=v)}function gm(e,a,o){var d=a.pendingProps,y=d.revealOrder,v=d.tail,C=d.children,M=Wn.current;if((d=(M&c1)!==0)?(M=M&Cp|c1,a.flags|=128):M&=Cp,ht(Wn,M,a),M=y??"null",y!=="forwards"&&y!=="unstable_legacy-backwards"&&y!=="together"&&y!=="independent"&&!jE[M])if(jE[M]=!0,y==null)console.error('The default for the <SuspenseList revealOrder="..."> prop is changing. To be future compatible you must explictly specify either "independent" (the current default), "together", "forwards" or "legacy_unstable-backwards".');else if(y==="backwards")console.error('The rendering order of <SuspenseList revealOrder="backwards"> is changing. To be future compatible you must specify revealOrder="legacy_unstable-backwards" instead.');else if(typeof y=="string")switch(y.toLowerCase()){case"together":case"forwards":case"backwards":case"independent":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',y,y.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',y,y.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',y)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',y);M=v??"null",n2[M]||(v==null?(y==="forwards"||y==="backwards"||y==="unstable_legacy-backwards")&&(n2[M]=!0,console.error('The default for the <SuspenseList tail="..."> prop is changing. To be future compatible you must explictly specify either "visible" (the current default), "collapsed" or "hidden".')):v!=="visible"&&v!=="collapsed"&&v!=="hidden"?(n2[M]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',v)):y!=="forwards"&&y!=="backwards"&&y!=="unstable_legacy-backwards"&&(n2[M]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',v)));t:if((y==="forwards"||y==="backwards"||y==="unstable_legacy-backwards")&&C!==void 0&&C!==null&&C!==!1)if(Pn(C)){for(M=0;M<C.length;M++)if(!Z0(C[M],M))break t}else if(M=I(C),typeof M=="function"){if(M=M.call(C))for(var B=M.next(),q=0;!B.done;B=M.next()){if(!Z0(B.value,q))break t;q++}}else console.error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',y);if(Rn(e,a,C,o),me?(gl(),C=Jm):C=0,!d&&e!==null&&(e.flags&128)!==0)t:for(e=a.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&mm(e,o,a);else if(e.tag===19)mm(e,o,a);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===a)break t;for(;e.sibling===null;){if(e.return===null||e.return===a)break t;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(y){case"forwards":for(o=a.child,y=null;o!==null;)e=o.alternate,e!==null&&Ic(e)===null&&(y=o),o=o.sibling;o=y,o===null?(y=a.child,a.child=null):(y=o.sibling,o.sibling=null),Td(a,!1,y,o,v,C);break;case"backwards":case"unstable_legacy-backwards":for(o=null,y=a.child,a.child=null;y!==null;){if(e=y.alternate,e!==null&&Ic(e)===null){a.child=y;break}e=y.sibling,y.sibling=o,o=y,y=e}Td(a,!0,o,null,v,C);break;case"together":Td(a,!1,null,null,void 0,C);break;default:a.memoizedState=null}return a.child}function cs(e,a,o){if(e!==null&&(a.dependencies=e.dependencies),_i=-1,ac|=a.lanes,(o&a.childLanes)===0)if(e!==null){if(Qe(e,a,o,!1),(o&a.childLanes)===0)return null}else return null;if(e!==null&&a.child!==e.child)throw Error("Resuming work not yet implemented.");if(a.child!==null){for(e=a.child,o=Ul(e,e.pendingProps),a.child=o,o.return=a;e.sibling!==null;)e=e.sibling,o=o.sibling=Ul(e,e.pendingProps),o.return=a;o.sibling=null}return a.child}function le(e,a){return(e.lanes&a)!==0?!0:(e=e.dependencies,!!(e!==null&&to(e)))}function e3(e,a,o){switch(a.tag){case 3:Nc(a,a.stateNode.containerInfo),zs(a,Bn,e.memoizedState.cache),Cl();break;case 27:case 5:Fr(a);break;case 4:Nc(a,a.stateNode.containerInfo);break;case 10:zs(a,a.type,a.memoizedProps.value);break;case 12:(o&a.childLanes)!==0&&(a.flags|=4),a.flags|=2048;var d=a.stateNode;d.effectDuration=-0,d.passiveEffectDuration=-0;break;case 31:if(a.memoizedState!==null)return a.flags|=128,Jh(a),null;break;case 13:if(d=a.memoizedState,d!==null)return d.dehydrated!==null?(Vs(a),a.flags|=128,null):(o&a.child.childLanes)!==0?bd(e,a,o):(Vs(a),e=cs(e,a,o),e!==null?e.sibling:null);Vs(a);break;case 19:var y=(e.flags&128)!==0;if(d=(o&a.childLanes)!==0,d||(Qe(e,a,o,!1),d=(o&a.childLanes)!==0),y){if(d)return gm(e,a,o);a.flags|=128}if(y=a.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),ht(Wn,Wn.current,a),d)break;return null;case 22:return a.lanes=0,gd(e,a,o,a.pendingProps);case 24:zs(a,Bn,e.memoizedState.cache)}return cs(e,a,o)}function Ya(e,a,o){if(a._debugNeedsRemount&&e!==null){o=Vd(a.type,a.key,a.pendingProps,a._debugOwner||null,a.mode,a.lanes),o._debugStack=a._debugStack,o._debugTask=a._debugTask;var d=a.return;if(d===null)throw Error("Cannot swap the root fiber.");if(e.alternate=null,a.alternate=null,o.index=a.index,o.sibling=a.sibling,o.return=a.return,o.ref=a.ref,o._debugInfo=a._debugInfo,a===d.child)d.child=o;else{var y=d.child;if(y===null)throw Error("Expected parent to have a child.");for(;y.sibling!==a;)if(y=y.sibling,y===null)throw Error("Expected to find the previous sibling.");y.sibling=o}return a=d.deletions,a===null?(d.deletions=[e],d.flags|=16):a.push(e),o.flags|=2,o}if(e!==null)if(e.memoizedProps!==a.pendingProps||a.type!==e.type)ra=!0;else{if(!le(e,o)&&(a.flags&128)===0)return ra=!1,e3(e,a,o);ra=(e.flags&131072)!==0}else ra=!1,(d=me)&&(gl(),d=(a.flags&1048576)!==0),d&&(d=a.index,gl(),ar(a,Jm,d));switch(a.lanes=0,a.tag){case 16:t:if(d=a.pendingProps,e=xl(a.elementType),a.type=e,typeof e=="function")Bd(e)?(d=Ls(e,d),a.tag=1,a.type=e=mo(e),a=dm(null,a,e,d,o)):(a.tag=0,Rl(a,e),a.type=e=mo(e),a=cf(null,a,e,d,o));else{if(e!=null){if(y=e.$$typeof,y===Sa){a.tag=11,a.type=e=Ud(e),a=cm(null,a,e,d,o);break t}else if(y===Hu){a.tag=14,a=fm(null,a,e,d,o);break t}}throw a="",e!==null&&typeof e=="object"&&e.$$typeof===li&&(a=" Did you wrap a component in React.lazy() more than once?"),e=it(e)||e,Error("Element type is invalid. Received a promise that resolves to: "+e+". Lazy element type must resolve to a class or function."+a)}return a;case 0:return cf(e,a,a.type,a.pendingProps,o);case 1:return d=a.type,y=Ls(d,a.pendingProps),dm(e,a,d,y,o);case 3:t:{if(Nc(a,a.stateNode.containerInfo),e===null)throw Error("Should have a current fiber. This is a bug in React.");var v=a.pendingProps;y=a.memoizedState,d=y.element,Qh(e,a),Jc(a,v,null,o);var C=a.memoizedState;if(v=C.cache,zs(a,Bn,v),v!==y.cache&&pa(a,[Bn],o,!0),gu(),v=C.element,Oa&&y.isDehydrated)if(y={element:v,isDehydrated:!1,cache:C.cache},a.updateQueue.baseState=y,a.memoizedState=y,a.flags&256){a=ff(e,a,v,o);break t}else if(v!==d){d=Va(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),a),ou(d),a=ff(e,a,v,o);break t}else for(Oa&&(bn=np(a.stateNode.containerInfo),Qa=a,me=!0,Fu=null,Or=!1,ys=null,el=!0),e=pE(a,null,v,o),a.child=e;e;)e.flags=e.flags&-3|4096,e=e.sibling;else{if(Cl(),v===d){a=cs(e,a,o);break t}Rn(e,a,v,o)}a=a.child}return a;case 26:if(Ve)return vd(e,a),e===null?(e=Ws(a.type,null,a.pendingProps,null))?a.memoizedState=e:me||(a.stateNode=l(a.type,a.pendingProps,Wa(Ju.current),a)):a.memoizedState=Ws(a.type,e.memoizedProps,a.pendingProps,e.memoizedState),null;case 27:if(T)return Fr(a),e===null&&T&&me&&(y=Wa(Ju.current),d=mi(),y=a.stateNode=z(a.type,a.pendingProps,y,d,!1),Or||(d=Uf(y,a.type,a.pendingProps,d),d!==null&&(Sl(a,0).serverProps=d)),Qa=a,el=!0,bn=sp(a.type,y,bn)),Rn(e,a,a.pendingProps.children,o),vd(e,a),e===null&&(a.flags|=4194304),a.child;case 5:return e===null&&me&&(v=mi(),d=rp(a.type,a.pendingProps,v),y=bn,(C=!y)||(C=Hf(y,a.type,a.pendingProps,el),C!==null?(a.stateNode=C,Or||(v=Uf(C,a.type,a.pendingProps,v),v!==null&&(Sl(a,0).serverProps=v)),Qa=a,bn=ep(C),el=!1,v=!0):v=!1,C=!v),C&&(d&&ru(a,y),Rs(a))),Fr(a),y=a.type,v=a.pendingProps,C=e!==null?e.memoizedProps:null,d=v.children,ue(y,v)?d=null:C!==null&&ue(y,C)&&(a.flags|=32),a.memoizedState!==null&&(y=yi(e,a,I0,null,null,o),Ka?Yi._currentValue=y:Yi._currentValue2=y),vd(e,a),Rn(e,a,d,o),a.child;case 6:return e===null&&me&&(e=a.pendingProps,o=mi(),e=xr(e,o),o=bn,(d=!o)||(d=v3(o,a.pendingProps,el),d!==null?(a.stateNode=d,Qa=a,bn=null,d=!0):d=!1,d=!d),d&&(e&&ru(a,o),Rs(a))),null;case 13:return bd(e,a,o);case 4:return Nc(a,a.stateNode.containerInfo),d=a.pendingProps,e===null?a.child=Zf(a,null,d,o):Rn(e,a,d,o),a.child;case 11:return cm(e,a,a.type,a.pendingProps,o);case 7:return Rn(e,a,a.pendingProps,o),a.child;case 8:return Rn(e,a,a.pendingProps.children,o),a.child;case 12:return a.flags|=4,a.flags|=2048,d=a.stateNode,d.effectDuration=-0,d.passiveEffectDuration=-0,Rn(e,a,a.pendingProps.children,o),a.child;case 10:return d=a.type,y=a.pendingProps,v=y.value,"value"in y||LE||(LE=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),zs(a,d,v),Rn(e,a,y.children,o),a.child;case 9:return y=a.type._context,d=a.pendingProps.children,typeof d!="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),$i(a),y=je(y),d=U3(d,y,void 0),a.flags|=1,Rn(e,a,d,o),a.child;case 14:return fm(e,a,a.type,a.pendingProps,o);case 15:return Te(e,a,a.type,a.pendingProps,o);case 19:return gm(e,a,o);case 31:return t3(e,a,o);case 22:return gd(e,a,o,a.pendingProps);case 24:return $i(a),d=je(Bn),e===null?(y=jh(),y===null&&(y=Je,v=cu(),y.pooledCache=v,_l(v),v!==null&&(y.pooledCacheLanes|=o),y=v),a.memoizedState={parent:d,cache:y},Kh(a),zs(a,Bn,y)):((e.lanes&o)!==0&&(Qh(e,a),Jc(a,null,null,o),gu()),y=e.memoizedState,v=a.memoizedState,y.parent!==d?(y={parent:d,cache:d},a.memoizedState=y,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=y),zs(a,Bn,d)):(d=v.cache,zs(a,Bn,d),d!==y.cache&&pa(a,[Bn],o,!0))),Rn(e,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error("Unknown unit of work tag ("+a.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function vi(e){e.flags|=4}function Cd(e){Fs&&(e.flags|=8)}function pf(e,a){if(e!==null&&e.child===a.child)return!1;if((a.flags&16)!==0)return!0;for(e=a.child;e!==null;){if((e.flags&8218)!==0||(e.subtreeFlags&8218)!==0)return!0;e=e.sibling}return!1}function pr(e,a,o,d){if(an)for(o=a.child;o!==null;){if(o.tag===5||o.tag===6)kn(e,o.stateNode);else if(!(o.tag===4||T&&o.tag===27)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===a)break;for(;o.sibling===null;){if(o.return===null||o.return===a)return;o=o.return}o.sibling.return=o.return,o=o.sibling}else if(Fs)for(var y=a.child;y!==null;){if(y.tag===5){var v=y.stateNode;o&&d&&(v=Is(v,y.type,y.memoizedProps)),kn(e,v)}else if(y.tag===6)v=y.stateNode,o&&d&&(v=Un(v,y.memoizedProps)),kn(e,v);else if(y.tag!==4){if(y.tag===22&&y.memoizedState!==null)v=y.child,v!==null&&(v.return=y),pr(e,y,!0,!0);else if(y.child!==null){y.child.return=y,y=y.child;continue}}if(y===a)break;for(;y.sibling===null;){if(y.return===null||y.return===a)return;y=y.return}y.sibling.return=y.return,y=y.sibling}}function oo(e,a,o,d){var y=!1;if(Fs)for(var v=a.child;v!==null;){if(v.tag===5){var C=v.stateNode;o&&d&&(C=Is(C,v.type,v.memoizedProps)),Wd(e,C)}else if(v.tag===6)C=v.stateNode,o&&d&&(C=Un(C,v.memoizedProps)),Wd(e,C);else if(v.tag!==4){if(v.tag===22&&v.memoizedState!==null)y=v.child,y!==null&&(y.return=v),oo(e,v,!0,!0),y=!0;else if(v.child!==null){v.child.return=v,v=v.child;continue}}if(v===a)break;for(;v.sibling===null;){if(v.return===null||v.return===a)return y;v=v.return}v.sibling.return=v.return,v=v.sibling}return y}function ym(e,a){if(Fs&&pf(e,a)){e=a.stateNode;var o=e.containerInfo,d=Id();oo(d,a,!1,!1),e.pendingChildren=d,vi(a),qn(o,d)}}function mf(e,a,o,d){if(an)e.memoizedProps!==d&&vi(a);else if(Fs){var y=e.stateNode,v=e.memoizedProps;if((e=pf(e,a))||v!==d){var C=mi();v=wy(y,o,v,d,!e,null),v===y?a.stateNode=y:(Cd(a),nn(v,o,d,C)&&vi(a),a.stateNode=v,e&&pr(v,a,!1,!1))}else a.stateNode=y}}function _d(e,a,o,d,y){if((e.mode&32)!==Zt&&(o===null?Bu(a,d):Vu(a,o,d))){if(e.flags|=16777216,(y&335544128)===y||Xd(a,d))if(br(e.stateNode,a,d))e.flags|=8192;else if(cy())e.flags|=8192;else throw Qf=ky,V3}else e.flags&=-16777217}function zl(e,a){if(h(a)){if(e.flags|=16777216,!g(a))if(cy())e.flags|=8192;else throw Qf=ky,V3}else e.flags&=-16777217}function _u(e,a){a!==null&&(e.flags|=4),e.flags&16384&&(a=e.tag!==22?pt():536870912,e.lanes|=a,Wf|=a)}function uo(e,a){if(!me)switch(e.tailMode){case"hidden":a=e.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var d=null;o!==null;)o.alternate!==null&&(d=o),o=o.sibling;d===null?a||e.tail===null?e.tail=null:e.tail.sibling=null:d.sibling=null}}function Ue(e){var a=e.alternate!==null&&e.alternate.child===e.child,o=0,d=0;if(a)if((e.mode&2)!==Zt){for(var y=e.selfBaseDuration,v=e.child;v!==null;)o|=v.lanes|v.childLanes,d|=v.subtreeFlags&65011712,d|=v.flags&65011712,y+=v.treeBaseDuration,v=v.sibling;e.treeBaseDuration=y}else for(y=e.child;y!==null;)o|=y.lanes|y.childLanes,d|=y.subtreeFlags&65011712,d|=y.flags&65011712,y.return=e,y=y.sibling;else if((e.mode&2)!==Zt){y=e.actualDuration,v=e.selfBaseDuration;for(var C=e.child;C!==null;)o|=C.lanes|C.childLanes,d|=C.subtreeFlags,d|=C.flags,y+=C.actualDuration,v+=C.treeBaseDuration,C=C.sibling;e.actualDuration=y,e.treeBaseDuration=v}else for(y=e.child;y!==null;)o|=y.lanes|y.childLanes,d|=y.subtreeFlags,d|=y.flags,y.return=e,y=y.sibling;return e.subtreeFlags|=d,e.childLanes=o,a}function vm(e,a,o){var d=a.pendingProps;switch(ce(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(a),null;case 1:return Ue(a),null;case 3:return o=a.stateNode,d=null,e!==null&&(d=e.memoizedState.cache),a.memoizedState.cache!==d&&(a.flags|=2048),Wi(Bn,a),Jr(a),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(Tl(a)?(Hh(),vi(a)):e===null||e.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Hc())),ym(e,a),Ue(a),null;case 26:if(Ve){var y=a.type,v=a.memoizedState;return e===null?(vi(a),v!==null?(Ue(a),zl(a,v)):(Ue(a),_d(a,y,null,d,o))):v?v!==e.memoizedState?(vi(a),Ue(a),zl(a,v)):(Ue(a),a.flags&=-16777217):(v=e.memoizedProps,an?v!==d&&vi(a):mf(e,a,y,d),Ue(a),_d(a,y,v,d,o)),null}case 27:if(T){if(kr(a),o=Wa(Ju.current),y=a.type,e!==null&&a.stateNode!=null)an?e.memoizedProps!==d&&vi(a):mf(e,a,y,d);else{if(!d){if(a.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return Ue(a),null}e=mi(),Tl(a)?El(a,e):(e=z(y,d,o,e,!0),a.stateNode=e,vi(a))}return Ue(a),null}case 5:if(kr(a),y=a.type,e!==null&&a.stateNode!=null)mf(e,a,y,d);else{if(!d){if(a.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return Ue(a),null}if(v=mi(),Tl(a))El(a,v),_o(a.stateNode,y,d,v)&&(a.flags|=64);else{var C=Wa(Ju.current);C=qd(y,d,C,v,a),Cd(a),pr(C,a,!1,!1),a.stateNode=C,nn(C,y,d,v)&&vi(a)}}return Ue(a),_d(a,a.type,e===null?null:e.memoizedProps,a.pendingProps,o),null;case 6:if(e&&a.stateNode!=null)o=e.memoizedProps,an?o!==d&&vi(a):Fs&&(o!==d?(e=Wa(Ju.current),o=mi(),Cd(a),a.stateNode=jl(d,e,o,a)):a.stateNode=e.stateNode);else{if(typeof d!="string"&&a.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(e=Wa(Ju.current),o=mi(),Tl(a)){if(!Oa)throw Error("Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");if(e=a.stateNode,o=a.memoizedProps,y=!Or,d=null,v=Qa,v!==null)switch(v.tag){case 3:y&&(y=Qm(e,o,d),y!==null&&(Sl(a,0).serverProps=y));break;case 27:case 5:d=v.memoizedProps,y&&(y=Qm(e,o,d),y!==null&&(Sl(a,0).serverProps=y))}de(e,o,a,d)||Rs(a,!0)}else Cd(a),a.stateNode=jl(d,e,o,a)}return Ue(a),null;case 31:if(o=a.memoizedState,e===null||e.memoizedState!==null){if(d=Tl(a),o!==null){if(e===null){if(!d)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(!Oa)throw Error("Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");if(e=a.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue.");Be(e,a),Ue(a),(a.mode&2)!==Zt&&o!==null&&(e=a.child,e!==null&&(a.treeBaseDuration-=e.treeBaseDuration))}else Hh(),Cl(),(a.flags&128)===0&&(o=a.memoizedState=null),a.flags|=4,Ue(a),(a.mode&2)!==Zt&&o!==null&&(e=a.child,e!==null&&(a.treeBaseDuration-=e.treeBaseDuration));e=!1}else o=Hc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),e=!0;if(!e)return a.flags&256?(La(a),a):(La(a),null);if((a.flags&128)!==0)throw Error("Client rendering an Activity suspended it again. This is a bug in React.")}return Ue(a),null;case 13:if(d=a.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(y=d,v=Tl(a),y!==null&&y.dehydrated!==null){if(e===null){if(!v)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(!Oa)throw Error("Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");if(v=a.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");Ei(v,a),Ue(a),(a.mode&2)!==Zt&&y!==null&&(y=a.child,y!==null&&(a.treeBaseDuration-=y.treeBaseDuration))}else Hh(),Cl(),(a.flags&128)===0&&(y=a.memoizedState=null),a.flags|=4,Ue(a),(a.mode&2)!==Zt&&y!==null&&(y=a.child,y!==null&&(a.treeBaseDuration-=y.treeBaseDuration));y=!1}else y=Hc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=y),y=!0;if(!y)return a.flags&256?(La(a),a):(La(a),null)}return La(a),(a.flags&128)!==0?(a.lanes=o,(a.mode&2)!==Zt&&Gc(a),a):(o=d!==null,e=e!==null&&e.memoizedState!==null,o&&(d=a.child,y=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(y=d.alternate.memoizedState.cachePool.pool),v=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(v=d.memoizedState.cachePool.pool),v!==y&&(d.flags|=2048)),o!==e&&o&&(a.child.flags|=8192),_u(a,a.updateQueue),Ue(a),(a.mode&2)!==Zt&&o&&(e=a.child,e!==null&&(a.treeBaseDuration-=e.treeBaseDuration)),null);case 4:return Jr(a),ym(e,a),e===null&&hn(a.stateNode.containerInfo),Ue(a),null;case 10:return Wi(a.type,a),Ue(a),null;case 19:if(nt(Wn,a),d=a.memoizedState,d===null)return Ue(a),null;if(y=(a.flags&128)!==0,v=d.rendering,v===null)if(y)uo(d,!1);else{if(Tn!==jo||e!==null&&(e.flags&128)!==0)for(e=a.child;e!==null;){if(v=Ic(e),v!==null){for(a.flags|=128,uo(d,!1),e=v.updateQueue,a.updateQueue=e,_u(a,e),a.subtreeFlags=0,e=o,o=a.child;o!==null;)Ln(o,e),o=o.sibling;return ht(Wn,Wn.current&Cp|c1,a),me&&Ri(a,d.treeForkCount),a.child}e=e.sibling}d.tail!==null&&pe()>S1&&(a.flags|=128,y=!0,uo(d,!1),a.lanes=4194304)}else{if(!y)if(e=Ic(v),e!==null){if(a.flags|=128,y=!0,e=e.updateQueue,a.updateQueue=e,_u(a,e),uo(d,!0),d.tail===null&&d.tailMode==="hidden"&&!v.alternate&&!me)return Ue(a),null}else 2*pe()-d.renderingStartTime>S1&&o!==536870912&&(a.flags|=128,y=!0,uo(d,!1),a.lanes=4194304);d.isBackwards?(v.sibling=a.child,a.child=v):(e=d.last,e!==null?e.sibling=v:a.child=v,d.last=v)}return d.tail!==null?(e=d.tail,d.rendering=e,d.tail=e.sibling,d.renderingStartTime=pe(),e.sibling=null,o=Wn.current,o=y?o&Cp|c1:o&Cp,ht(Wn,o,a),me&&Ri(a,d.treeForkCount),e):(Ue(a),null);case 22:case 23:return La(a),kc(a),d=a.memoizedState!==null,e!==null?e.memoizedState!==null!==d&&(a.flags|=8192):d&&(a.flags|=8192),d?(o&536870912)!==0&&(a.flags&128)===0&&(Ue(a),a.subtreeFlags&6&&(a.flags|=8192)):Ue(a),o=a.updateQueue,o!==null&&_u(a,o.retryQueue),o=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(o=e.memoizedState.cachePool.pool),d=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(d=a.memoizedState.cachePool.pool),d!==o&&(a.flags|=2048),e!==null&&nt(Xf,a),null;case 24:return o=null,e!==null&&(o=e.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),Wi(Bn,a),Ue(a),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+a.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function mr(e,a){switch(ce(a),a.tag){case 1:return e=a.flags,e&65536?(a.flags=e&-65537|128,(a.mode&2)!==Zt&&Gc(a),a):null;case 3:return Wi(Bn,a),Jr(a),e=a.flags,(e&65536)!==0&&(e&128)===0?(a.flags=e&-65537|128,a):null;case 26:case 27:case 5:return kr(a),null;case 31:if(a.memoizedState!==null){if(La(a),a.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");Cl()}return e=a.flags,e&65536?(a.flags=e&-65537|128,(a.mode&2)!==Zt&&Gc(a),a):null;case 13:if(La(a),e=a.memoizedState,e!==null&&e.dehydrated!==null){if(a.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");Cl()}return e=a.flags,e&65536?(a.flags=e&-65537|128,(a.mode&2)!==Zt&&Gc(a),a):null;case 19:return nt(Wn,a),null;case 4:return Jr(a),null;case 10:return Wi(a.type,a),null;case 22:case 23:return La(a),kc(a),e!==null&&nt(Xf,a),e=a.flags,e&65536?(a.flags=e&-65537|128,(a.mode&2)!==Zt&&Gc(a),a):null;case 24:return Wi(Bn,a),null;case 25:return null;default:return null}}function xd(e,a){switch(ce(a),a.tag){case 3:Wi(Bn,a),Jr(a);break;case 26:case 27:case 5:kr(a);break;case 4:Jr(a);break;case 31:a.memoizedState!==null&&La(a);break;case 13:La(a);break;case 19:nt(Wn,a);break;case 10:Wi(a.type,a);break;case 22:case 23:La(a),kc(a),e!==null&&nt(Xf,a);break;case 24:Wi(Bn,a)}}function Ys(e){return(e.mode&2)!==Zt}function Sm(e,a){Ys(e)?(ss(),gr(a,e),is()):gr(a,e)}function bm(e,a,o){Ys(e)?(ss(),Lt(o,e,a),is()):Lt(o,e,a)}function gr(e,a){try{var o=a.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var y=d.next;o=y;do{if((o.tag&e)===e&&(d=void 0,(e&xi)!==Wy&&(Hp=!0),d=wt(a,cj,o),(e&xi)!==Wy&&(Hp=!1),d!==void 0&&typeof d!="function")){var v=void 0;v=(o.tag&Ss)!==0?"useLayoutEffect":(o.tag&xi)!==0?"useInsertionEffect":"useEffect";var C=void 0;C=d===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof d.then=="function"?`
|
|
127
127
|
|
|
128
128
|
It looks like you wrote `+v+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
|
129
129
|
|
|
@@ -136,11 +136,11 @@ It looks like you wrote `+v+`(async () => ...) or returned a Promise. Instead, w
|
|
|
136
136
|
fetchData();
|
|
137
137
|
}, [someId]); // Or [] if effect doesn't need props or state
|
|
138
138
|
|
|
139
|
-
Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+d,Bt(a,function(M,B){console.error("%s must not return anything besides a function, which is used for clean-up.%s",M,B)},v,C)}o=o.next}while(o!==y)}}catch(M){Ee(a,a.return,M)}}function Gt(e,a,o){try{var d=a.updateQueue,y=d!==null?d.lastEffect:null;if(y!==null){var v=y.next;d=v;do{if((d.tag&e)===e){var C=d.inst,M=C.destroy;M!==void 0&&(C.destroy=void 0,(e&_i)!==Wy&&(Op=!0),y=a,Bt(y,uj,y,o,M),(e&_i)!==Wy&&(Op=!1))}d=d.next}while(d!==v)}}catch(B){Ee(a,a.return,B)}}function Pg(e,a){Gs(e)?(as(),cr(a,e),ns()):cr(a,e)}function Sm(e,a,o){Gs(e)?(as(),Gt(o,e,a),ns()):Gt(o,e,a)}function bm(e){var a=e.updateQueue;if(a!==null){var o=e.stateNode;e.type.defaultProps||"ref"in e.memoizedProps||_p||(o.props!==e.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",nt(e)||"instance"),o.state!==e.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",nt(e)||"instance"));try{Bt(e,Z0,a,o)}catch(d){Ee(e,e.return,d)}}}function hf(e,a,o){return e.getSnapshotBeforeUpdate(a,o)}function n3(e,a){var o=a.memoizedProps,d=a.memoizedState;a=e.stateNode,e.type.defaultProps||"ref"in e.memoizedProps||_p||(a.props!==e.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",nt(e)||"instance"),a.state!==e.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",nt(e)||"instance"));try{var y=Bs(e.type,o),v=Bt(e,hf,a,y,d);o=LE,v!==void 0||o.has(e.type)||(o.add(e.type),Bt(e,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",nt(e))})),a.__reactInternalSnapshotBeforeUpdate=v}catch(C){Ee(e,e.return,C)}}function Yg(e,a,o){o.props=Bs(e.type,e.memoizedProps),o.state=e.memoizedState,Gs(e)?(as(),Bt(e,sE,e,a,o),ns()):Bt(e,sE,e,a,o)}function a3(e){var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var o=Xa(e.stateNode);break;case 30:o=e.stateNode;break;default:o=e.stateNode}if(typeof a=="function")if(Gs(e))try{as(),e.refCleanup=a(o)}finally{ns()}else e.refCleanup=a(o);else typeof a=="string"?console.error("String refs are no longer supported."):a.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",nt(e)),a.current=o}}function df(e,a){try{Bt(e,a3,e)}catch(o){Ee(e,a,o)}}function js(e,a){var o=e.ref,d=e.refCleanup;if(o!==null)if(typeof d=="function")try{if(Gs(e))try{as(),Bt(e,d)}finally{ns(e)}else Bt(e,d)}catch(y){Ee(e,a,y)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof o=="function")try{if(Gs(e))try{as(),Bt(e,o,null)}finally{ns(e)}else Bt(e,o,null)}catch(y){Ee(e,a,y)}else o.current=null}function Cd(e,a,o,d){var y=e.memoizedProps,v=y.id,C=y.onCommit;y=y.onRender,a=a===null?"mount":"update",Xy&&(a="nested-update"),typeof y=="function"&&y(v,a,e.actualDuration,e.treeBaseDuration,e.actualStartTime,o),typeof C=="function"&&C(v,a,d,o)}function qg(e,a,o,d){var y=e.memoizedProps;e=y.id,y=y.onPostCommit,a=a===null?"mount":"update",Xy&&(a="nested-update"),typeof y=="function"&&y(e,a,d,o)}function pf(e){var a=e.type,o=e.memoizedProps,d=e.stateNode;try{Bt(e,Ge,d,a,o,e)}catch(y){Ee(e,e.return,y)}}function _d(e,a,o){try{Bt(e,Yn,e.stateNode,e.type,o,a,e)}catch(d){Ee(e,e.return,d)}}function Xg(e){return e.tag===5||e.tag===3||(we?e.tag===26:!1)||(T?e.tag===27&&Mt(e.type):!1)||e.tag===4}function Em(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||Xg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(T&&e.tag===27&&Mt(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ml(e,a,o){var d=e.tag;if(d===5||d===6)e=e.stateNode,a?Gu(o,e,a):Ul(o,e);else if(d!==4&&(T&&d===27&&Mt(e.type)&&(o=e.stateNode,a=null),e=e.child,e!==null))for(Ml(e,a,o),e=e.sibling;e!==null;)Ml(e,a,o),e=e.sibling}function Hi(e,a,o){var d=e.tag;if(d===5||d===6)e=e.stateNode,a?Qd(o,e,a):Hn(o,e);else if(d!==4&&(T&&d===27&&Mt(e.type)&&(o=e.stateNode),e=e.child,e!==null))for(Hi(e,a,o),e=e.sibling;e!==null;)Hi(e,a,o),e=e.sibling}function Aa(e){for(var a,o=e.return;o!==null;){if(Xg(o)){a=o;break}o=o.return}if($e){if(a==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(a.tag){case 27:if(T){a=a.stateNode,o=Em(e),Hi(e,o,a);break}case 5:o=a.stateNode,a.flags&32&&(ju(o),a.flags&=-33),a=Em(e),Hi(e,a,o);break;case 3:case 4:a=a.stateNode.containerInfo,o=Em(e),Ml(e,o,a);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}}function us(e,a,o){e=e.containerInfo;try{Bt(a,kd,e,o)}catch(d){Ee(a,a.return,d)}}function ya(e){var a=e.stateNode,o=e.memoizedProps;try{Bt(e,L,e.type,o,a,e)}catch(d){Ee(e,e.return,d)}}function Kg(e,a){return a.tag===31?(a=a.memoizedState,e.memoizedState!==null&&a===null):a.tag===13?(e=e.memoizedState,a=a.memoizedState,e!==null&&e.dehydrated!==null&&(a===null||a.dehydrated===null)):a.tag===3?e.memoizedState.isDehydrated&&(a.flags&256)===0:!1}function i3(e,a){for(_f(e.containerInfo),Oa=a;Oa!==null;)if(e=Oa,a=e.child,(e.subtreeFlags&1028)!==0&&a!==null)a.return=e,Oa=a;else for(;Oa!==null;){a=e=Oa;var o=a.alternate,d=a.flags;switch(a.tag){case 0:if((d&4)!==0&&(a=a.updateQueue,a=a!==null?a.events:null,a!==null))for(o=0;o<a.length;o++)d=a[o],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:(d&1024)!==0&&o!==null&&n3(a,o);break;case 3:(d&1024)!==0&&$e&&Pm(a.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((d&1024)!==0)throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(a=e.sibling,a!==null){a.return=e.return,Oa=a;break}Oa=e.return}}function Jn(e,a,o){var d=Ga(),y=Rs(),v=ts(),C=es(),M=o.flags;switch(o.tag){case 0:case 11:case 15:qa(e,o),M&4&&ym(o,ys|el);break;case 1:if(qa(e,o),M&4)if(e=o.stateNode,a===null)o.type.defaultProps||"ref"in o.memoizedProps||_p||(e.props!==o.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",nt(o)||"instance"),e.state!==o.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",nt(o)||"instance")),Gs(o)?(as(),Bt(o,B3,o,e),ns()):Bt(o,B3,o,e);else{var B=Bs(o.type,a.memoizedProps);a=a.memoizedState,o.type.defaultProps||"ref"in o.memoizedProps||_p||(e.props!==o.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",nt(o)||"instance"),e.state!==o.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",nt(o)||"instance")),Gs(o)?(as(),Bt(o,nE,o,e,B,a,e.__reactInternalSnapshotBeforeUpdate),ns()):Bt(o,nE,o,e,B,a,e.__reactInternalSnapshotBeforeUpdate)}M&64&&bm(o),M&512&&df(o,o.return);break;case 3:if(a=Os(),qa(e,o),M&64&&(M=o.updateQueue,M!==null)){if(B=null,o.child!==null)switch(o.child.tag){case 27:case 5:B=Xa(o.child.stateNode);break;case 1:B=o.child.stateNode}try{Bt(o,Z0,M,B)}catch(ct){Ee(o,o.return,ct)}}e.effectDuration+=Rc(a);break;case 27:T&&a===null&&M&4&&ya(o);case 26:case 5:if(qa(e,o),a===null){if(M&4)pf(o);else if(M&64){e=o.type,a=o.memoizedProps,B=o.stateNode;try{Bt(o,Ym,B,e,a,o)}catch(ct){Ee(o,o.return,ct)}}}M&512&&df(o,o.return);break;case 12:if(M&4){M=Os(),qa(e,o),e=o.stateNode,e.effectDuration+=cu(M);try{Bt(o,Cd,o,a,Fu,e.effectDuration)}catch(ct){Ee(o,o.return,ct)}}else qa(e,o);break;case 31:qa(e,o),M&4&&Qg(e,o);break;case 13:qa(e,o),M&4&&Zg(e,o),M&64&&(e=o.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(M=Cy.bind(null,o),Xn(e,M))));break;case 22:if(M=o.memoizedState!==null||wo,!M){a=a!==null&&a.memoizedState!==null||ra,B=wo;var q=ra;wo=M,(ra=a)&&!q?(Ps(e,o,(o.subtreeFlags&8772)!==0),(o.mode&2)!==Kt&&0<=Lt&&0<=qt&&.05<qt-Lt&&Ji(o,Lt,qt)):qa(e,o),wo=B,ra=q}break;case 30:break;default:qa(e,o)}(o.mode&2)!==Kt&&0<=Lt&&0<=qt&&((Bn||.05<Sn)&&Mn(o,Lt,qt,Sn,hn),o.alternate===null&&o.return!==null&&o.return.alternate!==null&&.05<qt-Lt&&(Kg(o.return.alternate,o.return)||ha(o,Lt,qt,"Mount"))),ti(d),$i(y),hn=v,Bn=C}function Ls(e){var a=e.alternate;a!==null&&(e.alternate=null,Ls(a)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(a=e.stateNode,a!==null&&Gm(a)),e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function cs(e,a,o){for(o=o.child;o!==null;)Tm(e,a,o),o=o.sibling}function Tm(e,a,o){if(ci&&typeof ci.onCommitFiberUnmount=="function")try{ci.onCommitFiberUnmount(op,o)}catch(q){Er||(Er=!0,console.error("React instrumentation encountered an error: %o",q))}var d=Ga(),y=Rs(),v=ts(),C=es();switch(o.tag){case 26:if(we){ra||js(o,a),cs(e,a,o),o.memoizedState?lp(o.memoizedState):o.stateNode&&rp(o.stateNode);break}case 27:if(T){ra||js(o,a);var M=oa,B=Yi;Mt(o.type)&&(oa=o.stateNode,Yi=!1),cs(e,a,o),Bt(o,ft,o.stateNode),oa=M,Yi=B;break}case 5:ra||js(o,a);case 6:if($e){if(M=oa,B=Yi,oa=null,cs(e,a,o),oa=M,Yi=B,oa!==null)if(Yi)try{Bt(o,Zd,oa,o.stateNode)}catch(q){Ee(o,a,q)}else try{Bt(o,vo,oa,o.stateNode)}catch(q){Ee(o,a,q)}}else cs(e,a,o);break;case 18:$e&&oa!==null&&(Yi?Pu(oa,o.stateNode):Ei(oa,o.stateNode));break;case 4:$e?(M=oa,B=Yi,oa=o.stateNode.containerInfo,Yi=!0,cs(e,a,o),oa=M,Yi=B):(Ks&&us(o.stateNode,o,Jd()),cs(e,a,o));break;case 0:case 11:case 14:case 15:Gt(_i,o,a),ra||vm(o,a,ys),cs(e,a,o);break;case 1:ra||(js(o,a),M=o.stateNode,typeof M.componentWillUnmount=="function"&&Yg(o,a,M)),cs(e,a,o);break;case 21:cs(e,a,o);break;case 22:ra=(M=ra)||o.memoizedState!==null,cs(e,a,o),ra=M;break;default:cs(e,a,o)}(o.mode&2)!==Kt&&0<=Lt&&0<=qt&&(Bn||.05<Sn)&&Mn(o,Lt,qt,Sn,hn),ti(d),$i(y),hn=v,Bn=C}function Qg(e,a){if(Na&&a.memoizedState===null&&(e=a.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Bt(a,yn,e)}catch(o){Ee(a,a.return,o)}}}function Zg(e,a){if(Na&&a.memoizedState===null&&(e=a.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Bt(a,vr,e)}catch(o){Ee(a,a.return,o)}}function s3(e){switch(e.tag){case 31:case 13:case 19:var a=e.stateNode;return a===null&&(a=e.stateNode=new PE),a;case 22:return e=e.stateNode,a=e._retryCache,a===null&&(a=e._retryCache=new PE),a;default:throw Error("Unexpected Suspense handler tag ("+e.tag+"). This is a bug in React.")}}function _u(e,a){var o=s3(e);a.forEach(function(d){if(!o.has(d)){if(o.add(d),Tr)if(xp!==null&&Dp!==null)Mu(Dp,xp);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var y=h3.bind(null,e,d);d.then(y,y)}})}function va(e,a){var o=a.deletions;if(o!==null)for(var d=0;d<o.length;d++){var y=e,v=a,C=o[d],M=Ga();if($e){var B=v;t:for(;B!==null;){switch(B.tag){case 27:if(T){if(Mt(B.type)){oa=B.stateNode,Yi=!1;break t}break}case 5:oa=B.stateNode,Yi=!1;break t;case 3:case 4:oa=B.stateNode.containerInfo,Yi=!0;break t}B=B.return}if(oa===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");Tm(y,v,C),oa=null,Yi=!1}else Tm(y,v,C);(C.mode&2)!==Kt&&0<=Lt&&0<=qt&&.05<qt-Lt&&ha(C,Lt,qt,"Unmount"),ti(M),y=C,v=y.alternate,v!==null&&(v.return=null),y.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)Jg(a,e),a=a.sibling}function Jg(e,a){var o=Ga(),d=Rs(),y=ts(),v=es(),C=e.alternate,M=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:va(a,e),Ma(e),M&4&&(Gt(_i|el,e,e.return),cr(_i|el,e),vm(e,e.return,ys|el));break;case 1:va(a,e),Ma(e),M&512&&(ra||C===null||js(C,C.return)),M&64&&wo&&(M=e.updateQueue,M!==null&&(C=M.callbacks,C!==null&&(a=M.shared.hiddenCallbacks,M.shared.hiddenCallbacks=a===null?C:a.concat(C))));break;case 26:if(we){var B=Pl;va(a,e),Ma(e),M&512&&(ra||C===null||js(C,C.return)),M&4&&(M=C!==null?C.memoizedState:null,a=e.memoizedState,C===null?a===null?e.stateNode===null?e.stateNode=Uy(B,e.type,e.memoizedProps,e):qu(B,e.type,e.stateNode):e.stateNode=sp(B,a,e.memoizedProps):M!==a?(M===null?C.stateNode!==null&&rp(C.stateNode):lp(M),a===null?qu(B,e.type,e.stateNode):sp(B,a,e.memoizedProps)):a===null&&e.stateNode!==null&&_d(e,e.memoizedProps,C.memoizedProps));break}case 27:if(T){va(a,e),Ma(e),M&512&&(ra||C===null||js(C,C.return)),C!==null&&M&4&&_d(e,e.memoizedProps,C.memoizedProps);break}case 5:if(va(a,e),Ma(e),M&512&&(ra||C===null||js(C,C.return)),$e){if(e.flags&32){a=e.stateNode;try{Bt(e,ju,a)}catch(Pe){Ee(e,e.return,Pe)}}M&4&&e.stateNode!=null&&(a=e.memoizedProps,_d(e,a,C!==null?C.memoizedProps:a)),M&1024&&(k3=!0,e.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."))}else Ks&&e.alternate!==null&&(e.alternate.stateNode=e.stateNode);break;case 6:if(va(a,e),Ma(e),M&4&&$e){if(e.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");M=e.memoizedProps,C=C!==null?C.memoizedProps:M,a=e.stateNode;try{Bt(e,kt,a,C,M)}catch(Pe){Ee(e,e.return,Pe)}}break;case 3:if(B=Os(),we){r();var q=Pl;Pl=br(a.containerInfo),va(a,e),Pl=q}else va(a,e);if(Ma(e),M&4){if($e&&Na&&C!==null&&C.memoizedState.isDehydrated)try{Bt(e,Bl,a.containerInfo)}catch(Pe){Ee(e,e.return,Pe)}if(Ks){M=a.containerInfo,C=a.pendingChildren;try{Bt(e,kd,M,C)}catch(Pe){Ee(e,e.return,Pe)}}}k3&&(k3=!1,Fg(e)),a.effectDuration+=Rc(B);break;case 4:we?(C=Pl,Pl=br(e.stateNode.containerInfo),va(a,e),Ma(e),Pl=C):(va(a,e),Ma(e)),M&4&&Ks&&us(e.stateNode,e,e.stateNode.pendingChildren);break;case 12:M=Os(),va(a,e),Ma(e),e.stateNode.effectDuration+=cu(M);break;case 31:va(a,e),Ma(e),M&4&&(M=e.updateQueue,M!==null&&(e.updateQueue=null,_u(e,M)));break;case 13:va(a,e),Ma(e),e.child.flags&8192&&e.memoizedState!==null!=(C!==null&&C.memoizedState!==null)&&(p2=fe()),M&4&&(M=e.updateQueue,M!==null&&(e.updateQueue=null,_u(e,M)));break;case 22:B=e.memoizedState!==null;var ct=C!==null&&C.memoizedState!==null,ht=wo,yt=ra;if(wo=ht||B,ra=yt||ct,va(a,e),ra=yt,wo=ht,ct&&!B&&!ht&&!yt&&(e.mode&2)!==Kt&&0<=Lt&&0<=qt&&.05<qt-Lt&&Ji(e,Lt,qt),Ma(e),M&8192&&(a=e.stateNode,a._visibility=B?a._visibility&~r1:a._visibility|r1,!B||C===null||ct||wo||ra||(lo(e),(e.mode&2)!==Kt&&0<=Lt&&0<=qt&&.05<qt-Lt&&ha(e,Lt,qt,"Disconnect")),$e)){t:if(C=null,$e)for(a=e;;){if(a.tag===5||we&&a.tag===26){if(C===null){ct=C=a;try{q=ct.stateNode,B?Bt(ct,Lu,q):Bt(ct,Af,ct.stateNode,ct.memoizedProps)}catch(Pe){Ee(ct,ct.return,Pe)}}}else if(a.tag===6){if(C===null){ct=a;try{var Vt=ct.stateNode;B?Bt(ct,g3,Vt):Bt(ct,Hy,Vt,ct.memoizedProps)}catch(Pe){Ee(ct,ct.return,Pe)}}}else if(a.tag===18){if(C===null){ct=a;try{var Jt=ct.stateNode;B?Bt(ct,Of,Jt):Bt(ct,ui,ct.stateNode)}catch(Pe){Ee(ct,ct.return,Pe)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===e)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break t;for(;a.sibling===null;){if(a.return===null||a.return===e)break t;C===a&&(C=null),a=a.return}C===a&&(C=null),a.sibling.return=a.return,a=a.sibling}}M&4&&(M=e.updateQueue,M!==null&&(C=M.retryQueue,C!==null&&(M.retryQueue=null,_u(e,C))));break;case 19:va(a,e),Ma(e),M&4&&(M=e.updateQueue,M!==null&&(e.updateQueue=null,_u(e,M)));break;case 30:break;case 21:break;default:va(a,e),Ma(e)}(e.mode&2)!==Kt&&0<=Lt&&0<=qt&&((Bn||.05<Sn)&&Mn(e,Lt,qt,Sn,hn),e.alternate===null&&e.return!==null&&e.return.alternate!==null&&.05<qt-Lt&&(Kg(e.return.alternate,e.return)||ha(e,Lt,qt,"Mount"))),ti(o),$i(d),hn=y,Bn=v}function Ma(e){var a=e.flags;if(a&2){try{Bt(e,Aa,e)}catch(o){Ee(e,e.return,o)}e.flags&=-3}a&4096&&(e.flags&=-4097)}function Fg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var a=e;Fg(a),a.tag===5&&a.flags&1024&&Df(a.stateNode),e=e.sibling}}function qa(e,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Jn(e,a.alternate,a),a=a.sibling}function fr(e){var a=Ga(),o=Rs(),d=ts(),y=es();switch(e.tag){case 0:case 11:case 14:case 15:vm(e,e.return,ys),lo(e);break;case 1:js(e,e.return);var v=e.stateNode;typeof v.componentWillUnmount=="function"&&Yg(e,e.return,v),lo(e);break;case 27:T&&Bt(e,ft,e.stateNode);case 26:case 5:js(e,e.return),lo(e);break;case 22:e.memoizedState===null&&lo(e);break;case 30:lo(e);break;default:lo(e)}(e.mode&2)!==Kt&&0<=Lt&&0<=qt&&(Bn||.05<Sn)&&Mn(e,Lt,qt,Sn,hn),ti(a),$i(o),hn=d,Bn=y}function lo(e){for(e=e.child;e!==null;)fr(e),e=e.sibling}function kg(e,a,o,d){var y=Ga(),v=Rs(),C=ts(),M=es(),B=o.flags;switch(o.tag){case 0:case 11:case 15:Ps(e,o,d),ym(o,ys);break;case 1:if(Ps(e,o,d),a=o.stateNode,typeof a.componentDidMount=="function"&&Bt(o,B3,o,a),a=o.updateQueue,a!==null){e=o.stateNode;try{Bt(o,Q0,a,e)}catch(q){Ee(o,o.return,q)}}d&&B&64&&bm(o),df(o,o.return);break;case 27:T&&ya(o);case 26:case 5:Ps(e,o,d),d&&a===null&&B&4&&pf(o),df(o,o.return);break;case 12:if(d&&B&4){B=Os(),Ps(e,o,d),d=o.stateNode,d.effectDuration+=cu(B);try{Bt(o,Cd,o,a,Fu,d.effectDuration)}catch(q){Ee(o,o.return,q)}}else Ps(e,o,d);break;case 31:Ps(e,o,d),d&&B&4&&Qg(e,o);break;case 13:Ps(e,o,d),d&&B&4&&Zg(e,o);break;case 22:o.memoizedState===null&&Ps(e,o,d),df(o,o.return);break;case 30:break;default:Ps(e,o,d)}(o.mode&2)!==Kt&&0<=Lt&&0<=qt&&(Bn||.05<Sn)&&Mn(o,Lt,qt,Sn,hn),ti(y),$i(v),hn=C,Bn=M}function Ps(e,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;)kg(e,a.alternate,a,o),a=a.sibling}function ro(e,a){var o=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(o=e.memoizedState.cachePool.pool),e=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(e=a.memoizedState.cachePool.pool),e!==o&&(e!=null&&Sl(e),o!=null&&Ir(o))}function Cm(e,a){e=null,a.alternate!==null&&(e=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==e&&(Sl(a),e!=null&&Ir(e))}function fs(e,a,o,d,y){if(a.subtreeFlags&10256||a.actualDuration!==0&&(a.alternate===null||a.alternate.child!==a.child))for(a=a.child;a!==null;){var v=a.sibling;Ig(e,a,o,d,v!==null?v.actualStartTime:y),a=v}}function Ig(e,a,o,d,y){var v=Ga(),C=Rs(),M=ts(),B=es(),q=Xu,ct=a.flags;switch(a.tag){case 0:case 11:case 15:(a.mode&2)!==Kt&&0<a.actualStartTime&&(a.flags&1)!==0&&di(a,a.actualStartTime,y,Ea,o),fs(e,a,o,d,y),ct&2048&&Pg(a,xi|el);break;case 1:(a.mode&2)!==Kt&&0<a.actualStartTime&&((a.flags&128)!==0?Fi(a,a.actualStartTime,y,[]):(a.flags&1)!==0&&di(a,a.actualStartTime,y,Ea,o)),fs(e,a,o,d,y);break;case 3:var ht=Os(),yt=Ea;Ea=a.alternate!==null&&a.alternate.memoizedState.isDehydrated&&(a.flags&256)===0,fs(e,a,o,d,y),Ea=yt,ct&2048&&(o=null,a.alternate!==null&&(o=a.alternate.memoizedState.cache),d=a.memoizedState.cache,d!==o&&(Sl(d),o!=null&&Ir(o))),e.passiveEffectDuration+=Rc(ht);break;case 12:if(ct&2048){ct=Os(),fs(e,a,o,d,y),e=a.stateNode,e.passiveEffectDuration+=cu(ct);try{Bt(a,qg,a,a.alternate,Fu,e.passiveEffectDuration)}catch(Vt){Ee(a,a.return,Vt)}}else fs(e,a,o,d,y);break;case 31:ct=Ea,ht=a.alternate!==null?a.alternate.memoizedState:null,yt=a.memoizedState,ht!==null&&yt===null?(yt=a.deletions,yt!==null&&0<yt.length&&yt[0].tag===18?(Ea=!1,ht=ht.hydrationErrors,ht!==null&&Fi(a,a.actualStartTime,y,ht)):Ea=!0):Ea=!1,fs(e,a,o,d,y),Ea=ct;break;case 13:ct=Ea,ht=a.alternate!==null?a.alternate.memoizedState:null,yt=a.memoizedState,ht===null||ht.dehydrated===null||yt!==null&&yt.dehydrated!==null?Ea=!1:(yt=a.deletions,yt!==null&&0<yt.length&&yt[0].tag===18?(Ea=!1,ht=ht.hydrationErrors,ht!==null&&Fi(a,a.actualStartTime,y,ht)):Ea=!0),fs(e,a,o,d,y),Ea=ct;break;case 23:break;case 22:yt=a.stateNode,ht=a.alternate,a.memoizedState!==null?yt._visibility&Oo?fs(e,a,o,d,y):mf(e,a,o,d,y):yt._visibility&Oo?fs(e,a,o,d,y):(yt._visibility|=Oo,Ys(e,a,o,d,(a.subtreeFlags&10256)!==0||a.actualDuration!==0&&(a.alternate===null||a.alternate.child!==a.child),y),(a.mode&2)===Kt||Ea||(e=a.actualStartTime,0<=e&&.05<y-e&&Ji(a,e,y),0<=Lt&&0<=qt&&.05<qt-Lt&&Ji(a,Lt,qt))),ct&2048&&ro(ht,a);break;case 24:fs(e,a,o,d,y),ct&2048&&Cm(a.alternate,a);break;default:fs(e,a,o,d,y)}(a.mode&2)!==Kt&&((e=!Ea&&a.alternate===null&&a.return!==null&&a.return.alternate!==null)&&(o=a.actualStartTime,0<=o&&.05<y-o&&ha(a,o,y,"Mount")),0<=Lt&&0<=qt&&((Bn||.05<Sn)&&Mn(a,Lt,qt,Sn,hn),e&&.05<qt-Lt&&ha(a,Lt,qt,"Mount"))),ti(v),$i(C),hn=M,Bn=B,Xu=q}function Ys(e,a,o,d,y,v){for(y=y&&((a.subtreeFlags&10256)!==0||a.actualDuration!==0&&(a.alternate===null||a.alternate.child!==a.child)),a=a.child;a!==null;){var C=a.sibling;Wg(e,a,o,d,y,C!==null?C.actualStartTime:v),a=C}}function Wg(e,a,o,d,y,v){var C=Ga(),M=Rs(),B=ts(),q=es(),ct=Xu;y&&(a.mode&2)!==Kt&&0<a.actualStartTime&&(a.flags&1)!==0&&di(a,a.actualStartTime,v,Ea,o);var ht=a.flags;switch(a.tag){case 0:case 11:case 15:Ys(e,a,o,d,y,v),Pg(a,xi);break;case 23:break;case 22:var yt=a.stateNode;a.memoizedState!==null?yt._visibility&Oo?Ys(e,a,o,d,y,v):mf(e,a,o,d,v):(yt._visibility|=Oo,Ys(e,a,o,d,y,v)),y&&ht&2048&&ro(a.alternate,a);break;case 24:Ys(e,a,o,d,y,v),y&&ht&2048&&Cm(a.alternate,a);break;default:Ys(e,a,o,d,y,v)}(a.mode&2)!==Kt&&0<=Lt&&0<=qt&&(Bn||.05<Sn)&&Mn(a,Lt,qt,Sn,hn),ti(C),$i(M),hn=B,Bn=q,Xu=ct}function mf(e,a,o,d,y){if(a.subtreeFlags&10256||a.actualDuration!==0&&(a.alternate===null||a.alternate.child!==a.child))for(var v=a.child;v!==null;){a=v.sibling;var C=e,M=o,B=d,q=a!==null?a.actualStartTime:y,ct=Xu;(v.mode&2)!==Kt&&0<v.actualStartTime&&(v.flags&1)!==0&&di(v,v.actualStartTime,q,Ea,M);var ht=v.flags;switch(v.tag){case 22:mf(C,v,M,B,q),ht&2048&&ro(v.alternate,v);break;case 24:mf(C,v,M,B,q),ht&2048&&Cm(v.alternate,v);break;default:mf(C,v,M,B,q)}Xu=ct,v=a}}function oo(e,a,o){if(e.subtreeFlags&Ap)for(e=e.child;e!==null;)$g(e,a,o),e=e.sibling}function $g(e,a,o){switch(e.tag){case 26:if(oo(e,a,o),e.flags&Ap)if(e.memoizedState!==null)E(o,Pl,e.memoizedState,e.memoizedProps);else{var d=e.stateNode,y=e.type;e=e.memoizedProps,((a&335544128)===a||Pd(y,e))&&Yd(o,d,y,e)}break;case 5:oo(e,a,o),e.flags&Ap&&(d=e.stateNode,y=e.type,e=e.memoizedProps,((a&335544128)===a||Pd(y,e))&&Yd(o,d,y,e));break;case 3:case 4:we?(d=Pl,Pl=br(e.stateNode.containerInfo),oo(e,a,o),Pl=d):oo(e,a,o);break;case 22:e.memoizedState===null&&(d=e.alternate,d!==null&&d.memoizedState!==null?(d=Ap,Ap=16777216,oo(e,a,o),Ap=d):oo(e,a,o));break;default:oo(e,a,o)}}function ty(e){var a=e.alternate;if(a!==null&&(e=a.child,e!==null)){a.child=null;do a=e.sibling,e.sibling=null,e=a;while(e!==null)}}function gf(e){var a=e.deletions;if((e.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var d=a[o],y=Ga();Oa=d,ay(d,e),(d.mode&2)!==Kt&&0<=Lt&&0<=qt&&.05<qt-Lt&&ha(d,Lt,qt,"Unmount"),ti(y)}ty(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ey(e),e=e.sibling}function ey(e){var a=Ga(),o=Rs(),d=ts(),y=es();switch(e.tag){case 0:case 11:case 15:gf(e),e.flags&2048&&Sm(e,e.return,xi|el);break;case 3:var v=Os();gf(e),e.stateNode.passiveEffectDuration+=Rc(v);break;case 12:v=Os(),gf(e),e.stateNode.passiveEffectDuration+=cu(v);break;case 22:v=e.stateNode,e.memoizedState!==null&&v._visibility&Oo&&(e.return===null||e.return.tag!==13)?(v._visibility&=~Oo,xd(e),(e.mode&2)!==Kt&&0<=Lt&&0<=qt&&.05<qt-Lt&&ha(e,Lt,qt,"Disconnect")):gf(e);break;default:gf(e)}(e.mode&2)!==Kt&&0<=Lt&&0<=qt&&(Bn||.05<Sn)&&Mn(e,Lt,qt,Sn,hn),ti(a),$i(o),Bn=y,hn=d}function xd(e){var a=e.deletions;if((e.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var d=a[o],y=Ga();Oa=d,ay(d,e),(d.mode&2)!==Kt&&0<=Lt&&0<=qt&&.05<qt-Lt&&ha(d,Lt,qt,"Unmount"),ti(y)}ty(e)}for(e=e.child;e!==null;)ny(e),e=e.sibling}function ny(e){var a=Ga(),o=Rs(),d=ts(),y=es();switch(e.tag){case 0:case 11:case 15:Sm(e,e.return,xi),xd(e);break;case 22:var v=e.stateNode;v._visibility&Oo&&(v._visibility&=~Oo,xd(e));break;default:xd(e)}(e.mode&2)!==Kt&&0<=Lt&&0<=qt&&(Bn||.05<Sn)&&Mn(e,Lt,qt,Sn,hn),ti(a),$i(o),Bn=y,hn=d}function ay(e,a){for(;Oa!==null;){var o=Oa,d=o,y=a,v=Ga(),C=Rs(),M=ts(),B=es();switch(d.tag){case 0:case 11:case 15:Sm(d,y,xi);break;case 23:case 22:d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(y=d.memoizedState.cachePool.pool,y!=null&&Sl(y));break;case 24:Ir(d.memoizedState.cache)}if((d.mode&2)!==Kt&&0<=Lt&&0<=qt&&(Bn||.05<Sn)&&Mn(d,Lt,qt,Sn,hn),ti(v),$i(C),Bn=B,hn=M,d=o.child,d!==null)d.return=o,Oa=d;else t:for(o=e;Oa!==null;){if(d=Oa,v=d.sibling,C=d.return,Ls(d),d===o){Oa=null;break t}if(v!==null){v.return=C,Oa=v;break t}Oa=C}}}function _m(e){var a=m3(e);if(a!=null){if(typeof a.memoizedProps["data-testname"]!="string")throw Error("Invalid host root specified. Should be either a React container or a node with a testname attribute.");return a}if(e=jm(e),e===null)throw Error("Could not find React container within specified host subtree.");return e.stateNode.current}function xm(e,a){var o=e.tag;switch(a.$$typeof){case a2:if(e.type===a.value)return!0;break;case i2:t:{for(a=a.value,e=[e,0],o=0;o<e.length;){var d=e[o++],y=d.tag,v=e[o++],C=a[v];if(y!==5&&y!==26&&y!==27||!Qs(d)){for(;C!=null&&xm(d,C);)v++,C=a[v];if(v===a.length){a=!0;break t}else for(d=d.child;d!==null;)e.push(d,v),d=d.sibling}}a=!1}return a;case s2:if((o===5||o===26||o===27)&&Kd(e.stateNode,a.value))return!0;break;case r2:if((o===5||o===6||o===26||o===27)&&(e=Lm(e),e!==null&&0<=e.indexOf(a.value)))return!0;break;case l2:if((o===5||o===26||o===27)&&(e=e.memoizedProps["data-testname"],typeof e=="string"&&e.toLowerCase()===a.value.toLowerCase()))return!0;break;default:throw Error("Invalid selector type specified.")}return!1}function Dd(e){switch(e.$$typeof){case a2:return"<"+(et(e.value)||"Unknown")+">";case i2:return":has("+(Dd(e)||"")+")";case s2:return'[role="'+e.value+'"]';case r2:return'"'+e.value+'"';case l2:return'[data-testname="'+e.value+'"]';default:throw Error("Invalid selector type specified.")}}function iy(e,a){var o=[];e=[e,0];for(var d=0;d<e.length;){var y=e[d++],v=y.tag,C=e[d++],M=a[C];if(v!==5&&v!==26&&v!==27||!Qs(y)){for(;M!=null&&xm(y,M);)C++,M=a[C];if(C===a.length)o.push(y);else for(y=y.child;y!==null;)e.push(y,C),y=y.sibling}}return o}function Ad(e,a){if(!ds)throw Error("Test selector API is not supported by this renderer.");e=_m(e),e=iy(e,a),a=[],e=Array.from(e);for(var o=0;o<e.length;){var d=e[o++],y=d.tag;if(y===5||y===26||y===27)Qs(d)||a.push(d.stateNode);else for(d=d.child;d!==null;)e.push(d),d=d.sibling}return a}function l3(){ds&&o2.forEach(function(e){return e()})}function sy(){var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return e||rt.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),e}function vi(e){if((de&za)!==Ra&&ee!==0)return ee&-ee;var a=rt.T;return a!==null?(a._updatedFibers||(a._updatedFibers=new Set),a._updatedFibers.add(e),Uh()):Vm()}function ly(){if(Xi===0)if((ee&536870912)===0||he){var e=ut;ut<<=1,(ut&3932160)===0&&(ut=262144),Xi=e}else Xi=536870912;return e=gs.current,e!==null&&(e.flags|=32),Xi}function Ie(e,a,o){if(Op&&console.error("useInsertionEffect must not schedule updates."),o5&&(y2=!0),(e===Xe&&(je===Qf||je===Zf)||e.cancelPendingCommit!==null)&&(xu(e,0),Nl(e,ee,Xi,!1)),W(e,o),(de&za)!==Ra&&e===Xe){if(Cr)switch(a.tag){case 0:case 11:case 15:e=ie&&nt(ie)||"Unknown",eT.has(e)||(eT.add(e),a=nt(a)||"Unknown",console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",a,e,e));break;case 1:tT||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),tT=!0)}}else Tr&&xe(e,a,o),xy(a),e===Xe&&((de&za)===Ra&&(ac|=o),bn===tc&&Nl(e,ee,Xi,!1)),ja(e)}function Dm(e,a,o){if((de&(za|al))!==Ra)throw Error("Should not already be working.");if(ee!==0&&ie!==null){var d=ie,y=fe();switch(J9){case p1:case Qf:var v=Im;en&&((d=d._debugTask)?d.run(console.timeStamp.bind(console,"Suspended",v,y,"Components ⚛",void 0,"primary-light")):console.timeStamp("Suspended",v,y,"Components ⚛",void 0,"primary-light"));break;case Zf:v=Im,en&&((d=d._debugTask)?d.run(console.timeStamp.bind(console,"Action",v,y,"Components ⚛",void 0,"primary-light")):console.timeStamp("Action",v,y,"Components ⚛",void 0,"primary-light"));break;default:en&&(d=y-Im,3>d||console.timeStamp("Blocked",Im,y,"Components ⚛",void 0,5>d?"primary-light":10>d?"primary":100>d?"primary-dark":"error"))}}v=(o=!o&&(a&127)===0&&(a&e.expiredLanes)===0||Z(e,a))?r3(e,a):Mm(e,a,!0);var C=o;do{if(v===Uo){Mp&&!o&&Nl(e,a,0,!1),a=je,Im=ia(),J9=a;break}else{if(d=fe(),y=e.current.alternate,C&&!oy(y)){rn(a),y=fi,v=d,!en||v<=y||(Kn?Kn.run(console.timeStamp.bind(console,"Teared Render",y,v,me,"Scheduler ⚛","error")):console.timeStamp("Teared Render",y,v,me,"Scheduler ⚛","error")),uo(a,d),v=Mm(e,a,!1),C=!1;continue}if(v===Kf){if(C=a,e.errorRecoveryDisabledLanes&C)var M=0;else M=e.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){rn(a),jn(fi,d,a,Kn),uo(a,d),a=M;t:{d=e,v=C,C=g1;var B=Na&&d.current.memoizedState.isDehydrated;if(B&&(xu(d,M).flags|=256),M=Mm(d,M,!1),M!==Kf){if($3&&!B){d.errorRecoveryDisabledLanes|=v,ac|=v,v=tc;break t}d=Di,Di=C,d!==null&&(Di===null?Di=d:Di.push.apply(Di,d))}v=M}if(C=!1,v!==Kf)continue;d=fe()}}if(v===d1){rn(a),jn(fi,d,a,Kn),uo(a,d),xu(e,0),Nl(e,a,0,!0);break}t:{switch(o=e,v){case Uo:case d1:throw Error("Root did not complete. This is a bug in React.");case tc:if((a&4194048)!==a)break;case c2:rn(a),Mi(fi,d,a,Kn),uo(a,d),y=a,(y&127)!==0?Yy=d:(y&4194048)!==0&&(qy=d),Nl(o,a,Xi,!ec);break t;case Kf:Di=null;break;case u2:case YE:break;default:throw Error("Unknown root exit status.")}if(rt.actQueue!==null)Nm(o,y,a,Di,v1,d2,Xi,ac,Jf,v,null,null,fi,d);else{if((a&62914560)===a&&(C=p2+KE-fe(),10<C)){if(Nl(o,a,Xi,!ec),w(o,0,!0)!==0)break t;Yl=a,o.timeoutHandle=Vi(ry.bind(null,o,y,Di,v1,d2,a,Xi,ac,Jf,ec,v,"Throttled",fi,d),C);break t}ry(o,y,Di,v1,d2,a,Xi,ac,Jf,ec,v,null,fi,d)}}}break}while(!0);ja(e)}function ry(e,a,o,d,y,v,C,M,B,q,ct,ht,yt,Vt){e.timeoutHandle=Xs;var Jt=a.subtreeFlags,Pe=null;if((Jt&8192||(Jt&16785408)===16785408)&&(Pe=Vu(),$g(a,v,Pe),Jt=(v&62914560)===v?p2-fe():(v&4194048)===v?XE-fe():0,Jt=qd(Pe,Jt),Jt!==null)){Yl=v,e.cancelPendingCommit=Jt(Nm.bind(null,e,a,v,o,d,y,C,M,B,ct,Pe,Xd(Pe,e.containerInfo),yt,Vt)),Nl(e,v,C,!q);return}Nm(e,a,v,o,d,y,C,M,B,ct,Pe,ht,yt,Vt)}function oy(e){for(var a=e;;){var o=a.tag;if((o===0||o===11||o===15)&&a.flags&16384&&(o=a.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var d=0;d<o.length;d++){var y=o[d],v=y.getSnapshot;y=y.value;try{if(!Ti(v(),y))return!1}catch{return!1}}if(o=a.child,a.subtreeFlags&16384&&o!==null)o.return=a,a=o;else{if(a===e)break;for(;a.sibling===null;){if(a.return===null||a.return===e)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Nl(e,a,o,d){a&=~t5,a&=~ac,e.suspendedLanes|=a,e.pingedLanes&=~a,d&&(e.warmLanes|=a),d=e.expirationTimes;for(var y=a;0<y;){var v=31-kn(y),C=1<<v;d[v]=-1,y&=~C}o!==0&&Tt(e,o,a)}function yf(){return(de&(za|al))===Ra?(Wr(0),!1):!0}function vf(){return(de&(za|al))!==Ra}function Sf(){if(ie!==null){if(je===qi)var e=ie.return;else e=ie,Rh(),Fc(e),yp=null,l1=0,e=ie;for(;e!==null;)Td(e.alternate,e),e=e.return;ie=null}}function uo(e,a){(e&127)!==0&&(Uf=a),(e&4194048)!==0&&(Mo=a)}function xu(e,a){en&&(console.timeStamp("Blocking Track",.003,.003,"Blocking","Scheduler ⚛","primary-light"),console.timeStamp("Transition Track",.003,.003,"Transition","Scheduler ⚛","primary-light"),console.timeStamp("Suspense Track",.003,.003,"Suspense","Scheduler ⚛","primary-light"),console.timeStamp("Idle Track",.003,.003,"Idle","Scheduler ⚛","primary-light"));var o=fi;if(fi=ia(),ee!==0&&0<o){if(rn(ee),bn===u2||bn===tc)Mi(o,fi,a,Kn);else{var d=fi,y=Kn;if(en&&!(d<=o)){var v=(a&738197653)===a?"tertiary-dark":"primary-dark",C=(a&536870912)===a?"Prewarm":(a&201326741)===a?"Interrupted Hydration":"Interrupted Render";y?y.run(console.timeStamp.bind(console,C,o,d,me,"Scheduler ⚛",v)):console.timeStamp(C,o,d,me,"Scheduler ⚛",v)}}uo(ee,fi)}if(o=Kn,Kn=null,(a&127)!==0){Kn=Jm,y=0<=xr&&xr<Uf?Uf:xr,d=0<=Bf&&Bf<Uf?Uf:Bf,v=0<=d?d:0<=y?y:fi,0<=Yy&&(rn(2),Ut(Yy,v,a,o)),o=y;var M=d,B=Fm,q=0<dp,ct=ku===1,ht=ku===2;if(y=fi,d=Jm,v=A3,C=M3,en){if(me="Blocking",0<o?o>y&&(o=y):o=y,0<M?M>o&&(M=o):M=o,B!==null&&o>M){var yt=q?"secondary-light":"warning";d?d.run(console.timeStamp.bind(console,q?"Consecutive":"Event: "+B,M,o,me,"Scheduler ⚛",yt)):console.timeStamp(q?"Consecutive":"Event: "+B,M,o,me,"Scheduler ⚛",yt)}y>o&&(M=ct?"error":(a&738197653)===a?"tertiary-light":"primary-light",ct=ht?"Promise Resolved":ct?"Cascading Update":5<y-o?"Update Blocked":"Update",ht=[],C!=null&&ht.push(["Component name",C]),v!=null&&ht.push(["Method name",v]),o={start:o,end:y,detail:{devtools:{properties:ht,track:me,trackGroup:"Scheduler ⚛",color:M}}},d?d.run(performance.measure.bind(performance,ct,o)):performance.measure(ct,o))}xr=-1.1,ku=0,M3=A3=null,Yy=-1.1,dp=Bf,Bf=-1.1,Uf=ia()}if((a&4194048)!==0&&(Kn=km,y=0<=No&&No<Mo?Mo:No,o=0<=Ws&&Ws<Mo?Mo:Ws,d=0<=Iu&&Iu<Mo?Mo:Iu,v=0<=d?d:0<=o?o:fi,0<=qy&&(rn(256),Ut(qy,v,a,Kn)),ht=d,M=Vf,B=0<Wu,q=N3===2,v=fi,d=km,C=K9,ct=Q9,en&&(me="Transition",0<o?o>v&&(o=v):o=v,0<y?y>o&&(y=o):y=o,0<ht?ht>y&&(ht=y):ht=y,y>ht&&M!==null&&(yt=B?"secondary-light":"warning",d?d.run(console.timeStamp.bind(console,B?"Consecutive":"Event: "+M,ht,y,me,"Scheduler ⚛",yt)):console.timeStamp(B?"Consecutive":"Event: "+M,ht,y,me,"Scheduler ⚛",yt)),o>y&&(d?d.run(console.timeStamp.bind(console,"Action",y,o,me,"Scheduler ⚛","primary-dark")):console.timeStamp("Action",y,o,me,"Scheduler ⚛","primary-dark")),v>o&&(y=q?"Promise Resolved":5<v-o?"Update Blocked":"Update",ht=[],ct!=null&&ht.push(["Component name",ct]),C!=null&&ht.push(["Method name",C]),o={start:o,end:v,detail:{devtools:{properties:ht,track:me,trackGroup:"Scheduler ⚛",color:"primary-light"}}},d?d.run(performance.measure.bind(performance,y,o)):performance.measure(y,o))),Ws=No=-1.1,N3=0,qy=-1.1,Wu=Iu,Iu=-1.1,Mo=ia()),o=e.timeoutHandle,o!==Xs&&(e.timeoutHandle=Xs,Bm(o)),o=e.cancelPendingCommit,o!==null&&(e.cancelPendingCommit=null,o()),Yl=0,Sf(),Xe=e,ie=o=Ol(e.current,null),ee=a,je=qi,vs=null,ec=!1,Mp=Z(e,a),$3=!1,bn=Uo,Jf=Xi=t5=ac=nc=0,Di=g1=null,d2=!1,(a&8)!==0&&(a|=a&32),d=e.entangledLanes,d!==0)for(e=e.entanglements,d&=a;0<d;)y=31-kn(d),v=1<<y,a|=e[y],d&=~v;return Ar=a,du(),e=w9(),1e3<e-H9&&(rt.recentlyCreatedOwnerStacks=0,H9=e),jl.discardPendingWarnings(),o}function uy(e,a){Qt=null,rt.H=f1,rt.getCurrentStack=null,Cr=!1,xo=null,a===gp||a===Fy?(a=Y0(),je=p1):a===V3?(a=Y0(),je=qE):je=a===J3?W3:a!==null&&typeof a=="object"&&typeof a.then=="function"?m1:f2,vs=a;var o=ie;o===null?(bn=d1,af(e,Ht(a,e.current))):o.mode&2&&zh(o)}function cy(){var e=gs.current;return e===null?!0:(ee&4194048)===ee?tl===null:(ee&62914560)===ee||(ee&536870912)!==0?e===tl:!1}function Am(){var e=rt.H;return rt.H=f1,e===null?f1:e}function fy(){var e=rt.A;return rt.A=dj,e}function Md(e){Kn===null&&(Kn=e._debugTask==null?null:e._debugTask)}function Nd(){bn=tc,ec||(ee&4194048)!==ee&&gs.current!==null||(Mp=!0),(nc&134217727)===0&&(ac&134217727)===0||Xe===null||Nl(Xe,ee,Xi,!1)}function Mm(e,a,o){var d=de;de|=za;var y=Am(),v=fy();if(Xe!==e||ee!==a){if(Tr){var C=e.memoizedUpdaters;0<C.size&&(Mu(e,ee),C.clear()),Dn(e,a)}v1=null,xu(e,a)}a=!1,C=bn;t:do try{if(je!==qi&&ie!==null){var M=ie,B=vs;switch(je){case W3:Sf(),C=c2;break t;case p1:case Qf:case Zf:case m1:gs.current===null&&(a=!0);var q=je;if(je=qi,vs=null,Du(e,M,B,q),o&&Mp){C=Uo;break t}break;default:q=je,je=qi,vs=null,Du(e,M,B,q)}}hy(),C=bn;break}catch(ct){uy(e,ct)}while(!0);return a&&e.shellSuspendCounter++,Rh(),de=d,rt.H=y,rt.A=v,ie===null&&(Xe=null,ee=0,du()),C}function hy(){for(;ie!==null;)dy(ie)}function r3(e,a){var o=de;de|=za;var d=Am(),y=fy();if(Xe!==e||ee!==a){if(Tr){var v=e.memoizedUpdaters;0<v.size&&(Mu(e,ee),v.clear()),Dn(e,a)}v1=null,y1=fe()+e5,xu(e,a)}else Mp=Z(e,a);t:do try{if(je!==qi&&ie!==null)e:switch(a=ie,v=vs,je){case f2:je=qi,vs=null,Du(e,a,v,f2);break;case Qf:case Zf:if(P0(v)){je=qi,vs=null,py(a);break}a=function(){je!==Qf&&je!==Zf||Xe!==e||(je=h2),ja(e)},v.then(a,a);break t;case p1:je=h2;break t;case qE:je=I3;break t;case h2:P0(v)?(je=qi,vs=null,py(a)):(je=qi,vs=null,Du(e,a,v,h2));break;case I3:var C=null;switch(ie.tag){case 26:C=ie.memoizedState;case 5:case 27:var M=ie,B=M.type,q=M.pendingProps;if(C?g(C):pr(M.stateNode,B,q)){je=qi,vs=null;var ct=M.sibling;if(ct!==null)ie=ct;else{var ht=M.return;ht!==null?(ie=ht,Od(ht)):ie=null}break e}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}je=qi,vs=null,Du(e,a,v,I3);break;case m1:je=qi,vs=null,Du(e,a,v,m1);break;case W3:Sf(),bn=c2;break t;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}rt.actQueue!==null?hy():o3();break}catch(yt){uy(e,yt)}while(!0);return Rh(),rt.H=d,rt.A=y,de=o,ie!==null?Uo:(Xe=null,ee=0,du(),bn)}function o3(){for(;ie!==null&&!Xt();)dy(ie)}function dy(e){var a=e.alternate;(e.mode&2)!==Kt?(Hc(e),a=Bt(e,Ya,a,e,Ar),zh(e)):a=Bt(e,Ya,a,e,Ar),e.memoizedProps=e.pendingProps,a===null?Od(e):ie=a}function py(e){var a=Bt(e,u3,e);e.memoizedProps=e.pendingProps,a===null?Od(e):ie=a}function u3(e){var a=e.alternate,o=(e.mode&2)!==Kt;switch(o&&Hc(e),e.tag){case 15:case 0:a=Vs(a,e,e.pendingProps,e.type,void 0,ee);break;case 11:a=Vs(a,e,e.pendingProps,e.type.render,e.ref,ee);break;case 5:Fc(e);default:Td(a,e),e=ie=Ln(e,Ar),a=Ya(a,e,Ar)}return o&&zh(e),a}function Du(e,a,o,d){Rh(),Fc(a),yp=null,l1=0;var y=a.return;try{if(jg(e,y,a,o,ee)){bn=d1,af(e,Ht(o,e.current)),ie=null;return}}catch(v){if(y!==null)throw ie=y,v;bn=d1,af(e,Ht(o,e.current)),ie=null;return}a.flags&32768?(he||d===f2?e=!0:Mp||(ee&536870912)!==0?e=!1:(ec=e=!0,(d===Qf||d===Zf||d===p1||d===m1)&&(d=gs.current,d!==null&&d.tag===13&&(d.flags|=16384))),my(a,e)):Od(a)}function Od(e){var a=e;do{if((a.flags&32768)!==0){my(a,ec);return}var o=a.alternate;if(e=a.return,Hc(a),o=Bt(a,gm,o,a,Ar),(a.mode&2)!==Kt&&w0(a),o!==null){ie=o;return}if(a=a.sibling,a!==null){ie=a;return}ie=a=e}while(a!==null);bn===Uo&&(bn=YE)}function my(e,a){do{var o=ur(e.alternate,e);if(o!==null){o.flags&=32767,ie=o;return}if((e.mode&2)!==Kt){w0(e),o=e.actualDuration;for(var d=e.child;d!==null;)o+=d.actualDuration,d=d.sibling;e.actualDuration=o}if(o=e.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(e=e.sibling,e!==null)){ie=e;return}ie=e=o}while(e!==null);bn=c2,ie=null}function Nm(e,a,o,d,y,v,C,M,B,q,ct,ht,yt,Vt){e.cancelPendingCommit=null;do Au();while(ua!==sc);if(jl.flushLegacyContextWarning(),jl.flushPendingUnsafeLifecycleWarnings(),(de&(za|al))!==Ra)throw Error("Should not already be working.");if(rn(o),q===Kf?jn(yt,Vt,o,Kn):d!==null?Ae(yt,Vt,o,d,a!==null&&a.alternate!==null&&a.alternate.memoizedState.isDehydrated&&(a.flags&256)!==0,Kn):on(yt,Vt,o,Kn),a!==null){if(o===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),a===e.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(v=a.lanes|a.childLanes,v|=j3,gt(e,o,v,C,M,B),e===Xe&&(ie=Xe=null,ee=0),Np=a,lc=e,Yl=o,i5=v,l5=y,IE=d,s5=Vt,WE=ht,ql=m2,$E=null,a.actualDuration!==0||(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,_y(zf,function(){return wu(),ql===m2&&(ql=a5),by(),null})):(e.callbackNode=null,e.callbackPriority=0),Ao=null,Fu=ia(),ht!==null&&Va(Vt,Fu,ht,Kn),d=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||d){d=rt.T,rt.T=null,y=ri(),zn(2),C=de,de|=al;try{i3(e,a,o)}finally{de=C,zn(y),rt.T=d}}ua=ZE,gy(),yy(),vy()}}function gy(){if(ua===ZE){ua=sc;var e=lc,a=Np,o=Yl,d=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||d){d=rt.T,rt.T=null;var y=ri();zn(2);var v=de;de|=al;try{xp=o,Dp=e,zc(),Jg(a,e),Dp=xp=null,dr(e.containerInfo)}finally{de=v,zn(y),rt.T=d}}e.current=a,ua=JE}}function yy(){if(ua===JE){ua=sc;var e=$E;if(e!==null){Fu=ia();var a=Do,o=Fu;!en||o<=a||console.timeStamp(e,a,o,me,"Scheduler ⚛","secondary-light")}e=lc,a=Np,o=Yl;var d=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||d){d=rt.T,rt.T=null;var y=ri();zn(2);var v=de;de|=al;try{xp=o,Dp=e,zc(),Jn(e,a.alternate,a),Dp=xp=null}finally{de=v,zn(y),rt.T=d}}e=s5,a=WE,Do=ia(),e=a===null?e:Fu,a=Do,o=ql===n5,d=Kn,Ao!==null?ke(e,a,Ao,!1,d):!en||a<=e||(d?d.run(console.timeStamp.bind(console,o?"Commit Interrupted View Transition":"Commit",e,a,me,"Scheduler ⚛",o?"error":"secondary-dark")):console.timeStamp(o?"Commit Interrupted View Transition":"Commit",e,a,me,"Scheduler ⚛",o?"error":"secondary-dark")),ua=FE}}function vy(){if(ua===kE||ua===FE){if(ua===kE){var e=Do;Do=ia();var a=Do,o=ql===n5;!en||a<=e||console.timeStamp(o?"Interrupted View Transition":"Starting Animation",e,a,me,"Scheduler ⚛",o?" error":"secondary-light"),ql!==n5&&(ql=QE)}ua=sc,_e(),e=lc;var d=Np;a=Yl,o=IE;var y=d.actualDuration!==0||(d.subtreeFlags&10256)!==0||(d.flags&10256)!==0;y?ua=g2:(ua=sc,Np=lc=null,Sy(e,e.pendingLanes),Ff=0,b1=null);var v=e.pendingLanes;if(v===0&&(ic=null),y||zm(e),v=ln(a),d=d.stateNode,ci&&typeof ci.onCommitFiberRoot=="function")try{var C=(d.current.flags&128)===128;switch(v){case 2:var M=ye;break;case 8:M=Gl;break;case 32:M=zf;break;case 268435456:M=z9;break;default:M=zf}ci.onCommitFiberRoot(op,d,M,C)}catch(ht){Er||(Er=!0,console.error("React instrumentation encountered an error: %o",ht))}if(Tr&&e.memoizedUpdaters.clear(),l3(),o!==null){C=rt.T,M=ri(),zn(2),rt.T=null;try{var B=e.onRecoverableError;for(d=0;d<o.length;d++){var q=o[d],ct=c3(q.stack);Bt(q.source,B,q.value,ct)}}finally{rt.T=C,zn(M)}}(Yl&3)!==0&&Au(),ja(e),v=e.pendingLanes,(a&261930)!==0&&(v&42)!==0?(Ky=!0,e===r5?S1++:(S1=0,r5=e)):S1=0,y||uo(a,Do),Na&&qm(),Wr(0)}}function c3(e){return e={componentStack:e},Object.defineProperty(e,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),e}function Sy(e,a){(e.pooledCacheLanes&=a)===0&&(a=e.pooledCache,a!=null&&(e.pooledCache=null,Ir(a)))}function Au(){return gy(),yy(),vy(),by()}function by(){if(ua!==g2)return!1;var e=lc,a=i5;i5=0;var o=ln(Yl),d=32>o?32:o;o=rt.T;var y=ri();try{zn(d),rt.T=null;var v=l5;l5=null,d=lc;var C=Yl;if(ua=sc,Np=lc=null,Yl=0,(de&(za|al))!==Ra)throw Error("Cannot flush passive effects while already rendering.");rn(C),o5=!0,y2=!1;var M=0;if(Ao=null,M=fe(),ql===QE){var B=Do,q=M;!en||q<=B||(Z9?Z9.run(console.timeStamp.bind(console,"Animating",B,q,me,"Scheduler ⚛","secondary-dark")):console.timeStamp("Animating",B,q,me,"Scheduler ⚛","secondary-dark"))}else{B=Do,q=M;var ct=ql===a5;!en||q<=B||(Kn?Kn.run(console.timeStamp.bind(console,ct?"Waiting for Paint":"Waiting",B,q,me,"Scheduler ⚛","secondary-light")):console.timeStamp(ct?"Waiting for Paint":"Waiting",B,q,me,"Scheduler ⚛","secondary-light"))}B=de,de|=al;var ht=d.current;zc(),ey(ht);var yt=d.current;ht=s5,zc(),Ig(d,yt,C,v,ht),zm(d),de=B;var Vt=fe();if(yt=M,ht=Kn,Ao!==null?ke(yt,Vt,Ao,!0,ht):!en||Vt<=yt||(ht?ht.run(console.timeStamp.bind(console,"Remaining Effects",yt,Vt,me,"Scheduler ⚛","secondary-dark")):console.timeStamp("Remaining Effects",yt,Vt,me,"Scheduler ⚛","secondary-dark")),uo(C,Vt),Wr(0,!1),y2?d===b1?Ff++:(Ff=0,b1=d):Ff=0,y2=o5=!1,ci&&typeof ci.onPostCommitFiberRoot=="function")try{ci.onPostCommitFiberRoot(op,d)}catch(Pe){Er||(Er=!0,console.error("React instrumentation encountered an error: %o",Pe))}var Jt=d.current.stateNode;return Jt.effectDuration=0,Jt.passiveEffectDuration=0,!0}finally{zn(y),rt.T=o,Sy(e,a)}}function Ey(e,a,o){a=Ht(o,a),U0(a),a=cd(e.stateNode,a,2),e=Ni(e,a,2),e!==null&&(W(e,2),ja(e))}function Ee(e,a,o){if(Op=!1,e.tag===3)Ey(e,e,o);else{for(;a!==null;){if(a.tag===3){Ey(a,e,o);return}if(a.tag===1){var d=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(ic===null||!ic.has(d))){e=Ht(o,e),U0(e),o=fd(2),d=Ni(a,o,2),d!==null&&(hd(o,d,a,e),W(d,2),ja(d));return}}a=a.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
|
|
139
|
+
Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+d,wt(a,function(M,B){console.error("%s must not return anything besides a function, which is used for clean-up.%s",M,B)},v,C)}o=o.next}while(o!==y)}}catch(M){Ce(a,a.return,M)}}function Lt(e,a,o){try{var d=a.updateQueue,y=d!==null?d.lastEffect:null;if(y!==null){var v=y.next;d=v;do{if((d.tag&e)===e){var C=d.inst,M=C.destroy;M!==void 0&&(C.destroy=void 0,(e&xi)!==Wy&&(Hp=!0),y=a,wt(y,fj,y,o,M),(e&xi)!==Wy&&(Hp=!1))}d=d.next}while(d!==v)}}catch(B){Ce(a,a.return,B)}}function Pg(e,a){Ys(e)?(ss(),gr(a,e),is()):gr(a,e)}function Em(e,a,o){Ys(e)?(ss(),Lt(o,e,a),is()):Lt(o,e,a)}function Tm(e){var a=e.updateQueue;if(a!==null){var o=e.stateNode;e.type.defaultProps||"ref"in e.memoizedProps||Ap||(o.props!==e.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",J(e)||"instance"),o.state!==e.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",J(e)||"instance"));try{wt(e,F0,a,o)}catch(d){Ce(e,e.return,d)}}}function gf(e,a,o){return e.getSnapshotBeforeUpdate(a,o)}function n3(e,a){var o=a.memoizedProps,d=a.memoizedState;a=e.stateNode,e.type.defaultProps||"ref"in e.memoizedProps||Ap||(a.props!==e.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",J(e)||"instance"),a.state!==e.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",J(e)||"instance"));try{var y=Ls(e.type,o),v=wt(e,gf,a,y,d);o=PE,v!==void 0||o.has(e.type)||(o.add(e.type),wt(e,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",J(e))})),a.__reactInternalSnapshotBeforeUpdate=v}catch(C){Ce(e,e.return,C)}}function Yg(e,a,o){o.props=Ls(e.type,e.memoizedProps),o.state=e.memoizedState,Ys(e)?(ss(),wt(e,lE,e,a,o),is()):wt(e,lE,e,a,o)}function a3(e){var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var o=Xa(e.stateNode);break;case 30:o=e.stateNode;break;default:o=e.stateNode}if(typeof a=="function")if(Ys(e))try{ss(),e.refCleanup=a(o)}finally{is()}else e.refCleanup=a(o);else typeof a=="string"?console.error("String refs are no longer supported."):a.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",J(e)),a.current=o}}function yf(e,a){try{wt(e,a3,e)}catch(o){Ce(e,a,o)}}function qs(e,a){var o=e.ref,d=e.refCleanup;if(o!==null)if(typeof d=="function")try{if(Ys(e))try{ss(),wt(e,d)}finally{is(e)}else wt(e,d)}catch(y){Ce(e,a,y)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof o=="function")try{if(Ys(e))try{ss(),wt(e,o,null)}finally{is(e)}else wt(e,o,null)}catch(y){Ce(e,a,y)}else o.current=null}function Dd(e,a,o,d){var y=e.memoizedProps,v=y.id,C=y.onCommit;y=y.onRender,a=a===null?"mount":"update",Xy&&(a="nested-update"),typeof y=="function"&&y(v,a,e.actualDuration,e.treeBaseDuration,e.actualStartTime,o),typeof C=="function"&&C(v,a,d,o)}function qg(e,a,o,d){var y=e.memoizedProps;e=y.id,y=y.onPostCommit,a=a===null?"mount":"update",Xy&&(a="nested-update"),typeof y=="function"&&y(e,a,d,o)}function vf(e){var a=e.type,o=e.memoizedProps,d=e.stateNode;try{wt(e,Le,d,a,o,e)}catch(y){Ce(e,e.return,y)}}function Ad(e,a,o){try{wt(e,Yn,e.stateNode,e.type,o,a,e)}catch(d){Ce(e,e.return,d)}}function Xg(e){return e.tag===5||e.tag===3||(Ve?e.tag===26:!1)||(T?e.tag===27&&Dt(e.type):!1)||e.tag===4}function Cm(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||Xg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(T&&e.tag===27&&Dt(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Hl(e,a,o){var d=e.tag;if(d===5||d===6)e=e.stateNode,a?ju(o,e,a):Ll(o,e);else if(d!==4&&(T&&d===27&&Dt(e.type)&&(o=e.stateNode,a=null),e=e.child,e!==null))for(Hl(e,a,o),e=e.sibling;e!==null;)Hl(e,a,o),e=e.sibling}function Bi(e,a,o){var d=e.tag;if(d===5||d===6)e=e.stateNode,a?Fd(o,e,a):wn(o,e);else if(d!==4&&(T&&d===27&&Dt(e.type)&&(o=e.stateNode),e=e.child,e!==null))for(Bi(e,a,o),e=e.sibling;e!==null;)Bi(e,a,o),e=e.sibling}function Ma(e){for(var a,o=e.return;o!==null;){if(Xg(o)){a=o;break}o=o.return}if(an){if(a==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(a.tag){case 27:if(T){a=a.stateNode,o=Cm(e),Bi(e,o,a);break}case 5:o=a.stateNode,a.flags&32&&(Lu(o),a.flags&=-33),a=Cm(e),Bi(e,a,o);break;case 3:case 4:a=a.stateNode.containerInfo,o=Cm(e),Hl(e,o,a);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}}function fs(e,a,o){e=e.containerInfo;try{wt(a,$d,e,o)}catch(d){Ce(a,a.return,d)}}function ya(e){var a=e.stateNode,o=e.memoizedProps;try{wt(e,L,e.type,o,a,e)}catch(d){Ce(e,e.return,d)}}function Kg(e,a){return a.tag===31?(a=a.memoizedState,e.memoizedState!==null&&a===null):a.tag===13?(e=e.memoizedState,a=a.memoizedState,e!==null&&e.dehydrated!==null&&(a===null||a.dehydrated===null)):a.tag===3?e.memoizedState.isDehydrated&&(a.flags&256)===0:!1}function i3(e,a){for(Mf(e.containerInfo),Ra=a;Ra!==null;)if(e=Ra,a=e.child,(e.subtreeFlags&1028)!==0&&a!==null)a.return=e,Ra=a;else for(;Ra!==null;){a=e=Ra;var o=a.alternate,d=a.flags;switch(a.tag){case 0:if((d&4)!==0&&(a=a.updateQueue,a=a!==null?a.events:null,a!==null))for(o=0;o<a.length;o++)d=a[o],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:(d&1024)!==0&&o!==null&&n3(a,o);break;case 3:(d&1024)!==0&&an&&qm(a.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((d&1024)!==0)throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(a=e.sibling,a!==null){a.return=e.return,Ra=a;break}Ra=e.return}}function Fn(e,a,o){var d=Ga(),y=Us(),v=ns(),C=as(),M=o.flags;switch(o.tag){case 0:case 11:case 15:qa(e,o),M&4&&Sm(o,Ss|sl);break;case 1:if(qa(e,o),M&4)if(e=o.stateNode,a===null)o.type.defaultProps||"ref"in o.memoizedProps||Ap||(e.props!==o.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",J(o)||"instance"),e.state!==o.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",J(o)||"instance")),Ys(o)?(ss(),wt(o,B3,o,e),is()):wt(o,B3,o,e);else{var B=Ls(o.type,a.memoizedProps);a=a.memoizedState,o.type.defaultProps||"ref"in o.memoizedProps||Ap||(e.props!==o.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",J(o)||"instance"),e.state!==o.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",J(o)||"instance")),Ys(o)?(ss(),wt(o,aE,o,e,B,a,e.__reactInternalSnapshotBeforeUpdate),is()):wt(o,aE,o,e,B,a,e.__reactInternalSnapshotBeforeUpdate)}M&64&&Tm(o),M&512&&yf(o,o.return);break;case 3:if(a=ws(),qa(e,o),M&64&&(M=o.updateQueue,M!==null)){if(B=null,o.child!==null)switch(o.child.tag){case 27:case 5:B=Xa(o.child.stateNode);break;case 1:B=o.child.stateNode}try{wt(o,F0,M,B)}catch(ot){Ce(o,o.return,ot)}}e.effectDuration+=Uc(a);break;case 27:T&&a===null&&M&4&&ya(o);case 26:case 5:if(qa(e,o),a===null){if(M&4)vf(o);else if(M&64){e=o.type,a=o.memoizedProps,B=o.stateNode;try{wt(o,Xm,B,e,a,o)}catch(ot){Ce(o,o.return,ot)}}}M&512&&yf(o,o.return);break;case 12:if(M&4){M=ws(),qa(e,o),e=o.stateNode,e.effectDuration+=fu(M);try{wt(o,Dd,o,a,ku,e.effectDuration)}catch(ot){Ce(o,o.return,ot)}}else qa(e,o);break;case 31:qa(e,o),M&4&&Qg(e,o);break;case 13:qa(e,o),M&4&&Zg(e,o),M&64&&(e=o.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(M=Cy.bind(null,o),Xn(e,M))));break;case 22:if(M=o.memoizedState!==null||Go,!M){a=a!==null&&a.memoizedState!==null||oa,B=Go;var q=oa;Go=M,(oa=a)&&!q?(Ks(e,o,(o.subtreeFlags&8772)!==0),(o.mode&2)!==Zt&&0<=Yt&&0<=Kt&&.05<Kt-Yt&&Ms(o,Yt,Kt)):qa(e,o),Go=B,oa=q}break;case 30:break;default:qa(e,o)}(o.mode&2)!==Zt&&0<=Yt&&0<=Kt&&((Vn||.05<En)&&jn(o,Yt,Kt,En,pn),o.alternate===null&&o.return!==null&&o.return.alternate!==null&&.05<Kt-Yt&&(Kg(o.return.alternate,o.return)||ea(o,Yt,Kt,"Mount"))),ti(d),es(y),pn=v,Vn=C}function Xs(e){var a=e.alternate;a!==null&&(e.alternate=null,Xs(a)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(a=e.stateNode,a!==null&&Lm(a)),e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function hs(e,a,o){for(o=o.child;o!==null;)_m(e,a,o),o=o.sibling}function _m(e,a,o){if(ci&&typeof ci.onCommitFiberUnmount=="function")try{ci.onCommitFiberUnmount(fp,o)}catch(q){Ar||(Ar=!0,console.error("React instrumentation encountered an error: %o",q))}var d=Ga(),y=Us(),v=ns(),C=as();switch(o.tag){case 26:if(Ve){oa||qs(o,a),hs(e,a,o),o.memoizedState?up(o.memoizedState):o.stateNode&&cp(o.stateNode);break}case 27:if(T){oa||qs(o,a);var M=ua,B=Ki;Dt(o.type)&&(ua=o.stateNode,Ki=!1),hs(e,a,o),wt(o,ut,o.stateNode),ua=M,Ki=B;break}case 5:oa||qs(o,a);case 6:if(an){if(M=ua,B=Ki,ua=null,hs(e,a,o),ua=M,Ki=B,ua!==null)if(Ki)try{wt(o,kd,ua,o.stateNode)}catch(q){Ce(o,a,q)}else try{wt(o,To,ua,o.stateNode)}catch(q){Ce(o,a,q)}}else hs(e,a,o);break;case 18:an&&ua!==null&&(Ki?Yu(ua,o.stateNode):Ti(ua,o.stateNode));break;case 4:an?(M=ua,B=Ki,ua=o.stateNode.containerInfo,Ki=!0,hs(e,a,o),ua=M,Ki=B):(Fs&&fs(o.stateNode,o,Id()),hs(e,a,o));break;case 0:case 11:case 14:case 15:Lt(xi,o,a),oa||bm(o,a,Ss),hs(e,a,o);break;case 1:oa||(qs(o,a),M=o.stateNode,typeof M.componentWillUnmount=="function"&&Yg(o,a,M)),hs(e,a,o);break;case 21:hs(e,a,o);break;case 22:oa=(M=oa)||o.memoizedState!==null,hs(e,a,o),oa=M;break;default:hs(e,a,o)}(o.mode&2)!==Zt&&0<=Yt&&0<=Kt&&(Vn||.05<En)&&jn(o,Yt,Kt,En,pn),ti(d),es(y),pn=v,Vn=C}function Qg(e,a){if(Oa&&a.memoizedState===null&&(e=a.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{wt(a,Sn,e)}catch(o){Ce(a,a.return,o)}}}function Zg(e,a){if(Oa&&a.memoizedState===null&&(e=a.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{wt(a,_r,e)}catch(o){Ce(a,a.return,o)}}function s3(e){switch(e.tag){case 31:case 13:case 19:var a=e.stateNode;return a===null&&(a=e.stateNode=new YE),a;case 22:return e=e.stateNode,a=e._retryCache,a===null&&(a=e._retryCache=new YE),a;default:throw Error("Unexpected Suspense handler tag ("+e.tag+"). This is a bug in React.")}}function xu(e,a){var o=s3(e);a.forEach(function(d){if(!o.has(d)){if(o.add(d),Mr)if(Mp!==null&&Np!==null)Nu(Np,Mp);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var y=h3.bind(null,e,d);d.then(y,y)}})}function va(e,a){var o=a.deletions;if(o!==null)for(var d=0;d<o.length;d++){var y=e,v=a,C=o[d],M=Ga();if(an){var B=v;t:for(;B!==null;){switch(B.tag){case 27:if(T){if(Dt(B.type)){ua=B.stateNode,Ki=!1;break t}break}case 5:ua=B.stateNode,Ki=!1;break t;case 3:case 4:ua=B.stateNode.containerInfo,Ki=!0;break t}B=B.return}if(ua===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");_m(y,v,C),ua=null,Ki=!1}else _m(y,v,C);(C.mode&2)!==Zt&&0<=Yt&&0<=Kt&&.05<Kt-Yt&&ea(C,Yt,Kt,"Unmount"),ti(M),y=C,v=y.alternate,v!==null&&(v.return=null),y.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)Jg(a,e),a=a.sibling}function Jg(e,a){var o=Ga(),d=Us(),y=ns(),v=as(),C=e.alternate,M=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:va(a,e),Na(e),M&4&&(Lt(xi|sl,e,e.return),gr(xi|sl,e),bm(e,e.return,Ss|sl));break;case 1:va(a,e),Na(e),M&512&&(oa||C===null||qs(C,C.return)),M&64&&Go&&(M=e.updateQueue,M!==null&&(C=M.callbacks,C!==null&&(a=M.shared.hiddenCallbacks,M.shared.hiddenCallbacks=a===null?C:a.concat(C))));break;case 26:if(Ve){var B=Ql;va(a,e),Na(e),M&512&&(oa||C===null||qs(C,C.return)),M&4&&(M=C!==null?C.memoizedState:null,a=e.memoizedState,C===null?a===null?e.stateNode===null?e.stateNode=Uy(B,e.type,e.memoizedProps,e):Xu(B,e.type,e.stateNode):e.stateNode=op(B,a,e.memoizedProps):M!==a?(M===null?C.stateNode!==null&&cp(C.stateNode):up(M),a===null?Xu(B,e.type,e.stateNode):op(B,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Ad(e,e.memoizedProps,C.memoizedProps));break}case 27:if(T){va(a,e),Na(e),M&512&&(oa||C===null||qs(C,C.return)),C!==null&&M&4&&Ad(e,e.memoizedProps,C.memoizedProps);break}case 5:if(va(a,e),Na(e),M&512&&(oa||C===null||qs(C,C.return)),an){if(e.flags&32){a=e.stateNode;try{wt(e,Lu,a)}catch(Xe){Ce(e,e.return,Xe)}}M&4&&e.stateNode!=null&&(a=e.memoizedProps,Ad(e,a,C!==null?C.memoizedProps:a)),M&1024&&(k3=!0,e.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."))}else Fs&&e.alternate!==null&&(e.alternate.stateNode=e.stateNode);break;case 6:if(va(a,e),Na(e),M&4&&an){if(e.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");M=e.memoizedProps,C=C!==null?C.memoizedProps:M,a=e.stateNode;try{wt(e,$t,a,C,M)}catch(Xe){Ce(e,e.return,Xe)}}break;case 3:if(B=ws(),Ve){r();var q=Ql;Ql=Dr(a.containerInfo),va(a,e),Ql=q}else va(a,e);if(Na(e),M&4){if(an&&Oa&&C!==null&&C.memoizedState.isDehydrated)try{wt(e,Pl,a.containerInfo)}catch(Xe){Ce(e,e.return,Xe)}if(Fs){M=a.containerInfo,C=a.pendingChildren;try{wt(e,$d,M,C)}catch(Xe){Ce(e,e.return,Xe)}}}k3&&(k3=!1,Fg(e)),a.effectDuration+=Uc(B);break;case 4:Ve?(C=Ql,Ql=Dr(e.stateNode.containerInfo),va(a,e),Na(e),Ql=C):(va(a,e),Na(e)),M&4&&Fs&&fs(e.stateNode,e,e.stateNode.pendingChildren);break;case 12:M=ws(),va(a,e),Na(e),e.stateNode.effectDuration+=fu(M);break;case 31:va(a,e),Na(e),M&4&&(M=e.updateQueue,M!==null&&(e.updateQueue=null,xu(e,M)));break;case 13:va(a,e),Na(e),e.child.flags&8192&&e.memoizedState!==null!=(C!==null&&C.memoizedState!==null)&&(p2=pe()),M&4&&(M=e.updateQueue,M!==null&&(e.updateQueue=null,xu(e,M)));break;case 22:B=e.memoizedState!==null;var ot=C!==null&&C.memoizedState!==null,ct=Go,gt=oa;if(Go=ct||B,oa=gt||ot,va(a,e),oa=gt,Go=ct,ot&&!B&&!ct&&!gt&&(e.mode&2)!==Zt&&0<=Yt&&0<=Kt&&.05<Kt-Yt&&Ms(e,Yt,Kt),Na(e),M&8192&&(a=e.stateNode,a._visibility=B?a._visibility&~u1:a._visibility|u1,!B||C===null||ot||Go||oa||(co(e),(e.mode&2)!==Zt&&0<=Yt&&0<=Kt&&.05<Kt-Yt&&ea(e,Yt,Kt,"Disconnect")),an)){t:if(C=null,an)for(a=e;;){if(a.tag===5||Ve&&a.tag===26){if(C===null){ot=C=a;try{q=ot.stateNode,B?wt(ot,Pu,q):wt(ot,Rf,ot.stateNode,ot.memoizedProps)}catch(Xe){Ce(ot,ot.return,Xe)}}}else if(a.tag===6){if(C===null){ot=a;try{var jt=ot.stateNode;B?wt(ot,g3,jt):wt(ot,Hy,jt,ot.memoizedProps)}catch(Xe){Ce(ot,ot.return,Xe)}}}else if(a.tag===18){if(C===null){ot=a;try{var kt=ot.stateNode;B?wt(ot,wf,kt):wt(ot,ui,ot.stateNode)}catch(Xe){Ce(ot,ot.return,Xe)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===e)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break t;for(;a.sibling===null;){if(a.return===null||a.return===e)break t;C===a&&(C=null),a=a.return}C===a&&(C=null),a.sibling.return=a.return,a=a.sibling}}M&4&&(M=e.updateQueue,M!==null&&(C=M.retryQueue,C!==null&&(M.retryQueue=null,xu(e,C))));break;case 19:va(a,e),Na(e),M&4&&(M=e.updateQueue,M!==null&&(e.updateQueue=null,xu(e,M)));break;case 30:break;case 21:break;default:va(a,e),Na(e)}(e.mode&2)!==Zt&&0<=Yt&&0<=Kt&&((Vn||.05<En)&&jn(e,Yt,Kt,En,pn),e.alternate===null&&e.return!==null&&e.return.alternate!==null&&.05<Kt-Yt&&(Kg(e.return.alternate,e.return)||ea(e,Yt,Kt,"Mount"))),ti(o),es(d),pn=y,Vn=v}function Na(e){var a=e.flags;if(a&2){try{wt(e,Ma,e)}catch(o){Ce(e,e.return,o)}e.flags&=-3}a&4096&&(e.flags&=-4097)}function Fg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var a=e;Fg(a),a.tag===5&&a.flags&1024&&Of(a.stateNode),e=e.sibling}}function qa(e,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Fn(e,a.alternate,a),a=a.sibling}function yr(e){var a=Ga(),o=Us(),d=ns(),y=as();switch(e.tag){case 0:case 11:case 14:case 15:bm(e,e.return,Ss),co(e);break;case 1:qs(e,e.return);var v=e.stateNode;typeof v.componentWillUnmount=="function"&&Yg(e,e.return,v),co(e);break;case 27:T&&wt(e,ut,e.stateNode);case 26:case 5:qs(e,e.return),co(e);break;case 22:e.memoizedState===null&&co(e);break;case 30:co(e);break;default:co(e)}(e.mode&2)!==Zt&&0<=Yt&&0<=Kt&&(Vn||.05<En)&&jn(e,Yt,Kt,En,pn),ti(a),es(o),pn=d,Vn=y}function co(e){for(e=e.child;e!==null;)yr(e),e=e.sibling}function kg(e,a,o,d){var y=Ga(),v=Us(),C=ns(),M=as(),B=o.flags;switch(o.tag){case 0:case 11:case 15:Ks(e,o,d),Sm(o,Ss);break;case 1:if(Ks(e,o,d),a=o.stateNode,typeof a.componentDidMount=="function"&&wt(o,B3,o,a),a=o.updateQueue,a!==null){e=o.stateNode;try{wt(o,J0,a,e)}catch(q){Ce(o,o.return,q)}}d&&B&64&&Tm(o),yf(o,o.return);break;case 27:T&&ya(o);case 26:case 5:Ks(e,o,d),d&&a===null&&B&4&&vf(o),yf(o,o.return);break;case 12:if(d&&B&4){B=ws(),Ks(e,o,d),d=o.stateNode,d.effectDuration+=fu(B);try{wt(o,Dd,o,a,ku,d.effectDuration)}catch(q){Ce(o,o.return,q)}}else Ks(e,o,d);break;case 31:Ks(e,o,d),d&&B&4&&Qg(e,o);break;case 13:Ks(e,o,d),d&&B&4&&Zg(e,o);break;case 22:o.memoizedState===null&&Ks(e,o,d),yf(o,o.return);break;case 30:break;default:Ks(e,o,d)}(o.mode&2)!==Zt&&0<=Yt&&0<=Kt&&(Vn||.05<En)&&jn(o,Yt,Kt,En,pn),ti(y),es(v),pn=C,Vn=M}function Ks(e,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;)kg(e,a.alternate,a,o),a=a.sibling}function fo(e,a){var o=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(o=e.memoizedState.cachePool.pool),e=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(e=a.memoizedState.cachePool.pool),e!==o&&(e!=null&&_l(e),o!=null&&eo(o))}function xm(e,a){e=null,a.alternate!==null&&(e=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==e&&(_l(a),e!=null&&eo(e))}function ds(e,a,o,d,y){if(a.subtreeFlags&10256||a.actualDuration!==0&&(a.alternate===null||a.alternate.child!==a.child))for(a=a.child;a!==null;){var v=a.sibling;Ig(e,a,o,d,v!==null?v.actualStartTime:y),a=v}}function Ig(e,a,o,d,y){var v=Ga(),C=Us(),M=ns(),B=as(),q=Ku,ot=a.flags;switch(a.tag){case 0:case 11:case 15:(a.mode&2)!==Zt&&0<a.actualStartTime&&(a.flags&1)!==0&&di(a,a.actualStartTime,y,Ea,o),ds(e,a,o,d,y),ot&2048&&Pg(a,Di|sl);break;case 1:(a.mode&2)!==Zt&&0<a.actualStartTime&&((a.flags&128)!==0?Ii(a,a.actualStartTime,y,[]):(a.flags&1)!==0&&di(a,a.actualStartTime,y,Ea,o)),ds(e,a,o,d,y);break;case 3:var ct=ws(),gt=Ea;Ea=a.alternate!==null&&a.alternate.memoizedState.isDehydrated&&(a.flags&256)===0,ds(e,a,o,d,y),Ea=gt,ot&2048&&(o=null,a.alternate!==null&&(o=a.alternate.memoizedState.cache),d=a.memoizedState.cache,d!==o&&(_l(d),o!=null&&eo(o))),e.passiveEffectDuration+=Uc(ct);break;case 12:if(ot&2048){ot=ws(),ds(e,a,o,d,y),e=a.stateNode,e.passiveEffectDuration+=fu(ot);try{wt(a,qg,a,a.alternate,ku,e.passiveEffectDuration)}catch(jt){Ce(a,a.return,jt)}}else ds(e,a,o,d,y);break;case 31:ot=Ea,ct=a.alternate!==null?a.alternate.memoizedState:null,gt=a.memoizedState,ct!==null&>===null?(gt=a.deletions,gt!==null&&0<gt.length&>[0].tag===18?(Ea=!1,ct=ct.hydrationErrors,ct!==null&&Ii(a,a.actualStartTime,y,ct)):Ea=!0):Ea=!1,ds(e,a,o,d,y),Ea=ot;break;case 13:ot=Ea,ct=a.alternate!==null?a.alternate.memoizedState:null,gt=a.memoizedState,ct===null||ct.dehydrated===null||gt!==null&>.dehydrated!==null?Ea=!1:(gt=a.deletions,gt!==null&&0<gt.length&>[0].tag===18?(Ea=!1,ct=ct.hydrationErrors,ct!==null&&Ii(a,a.actualStartTime,y,ct)):Ea=!0),ds(e,a,o,d,y),Ea=ot;break;case 23:break;case 22:gt=a.stateNode,ct=a.alternate,a.memoizedState!==null?gt._visibility&wo?ds(e,a,o,d,y):Sf(e,a,o,d,y):gt._visibility&wo?ds(e,a,o,d,y):(gt._visibility|=wo,Qs(e,a,o,d,(a.subtreeFlags&10256)!==0||a.actualDuration!==0&&(a.alternate===null||a.alternate.child!==a.child),y),(a.mode&2)===Zt||Ea||(e=a.actualStartTime,0<=e&&.05<y-e&&Ms(a,e,y),0<=Yt&&0<=Kt&&.05<Kt-Yt&&Ms(a,Yt,Kt))),ot&2048&&fo(ct,a);break;case 24:ds(e,a,o,d,y),ot&2048&&xm(a.alternate,a);break;default:ds(e,a,o,d,y)}(a.mode&2)!==Zt&&((e=!Ea&&a.alternate===null&&a.return!==null&&a.return.alternate!==null)&&(o=a.actualStartTime,0<=o&&.05<y-o&&ea(a,o,y,"Mount")),0<=Yt&&0<=Kt&&((Vn||.05<En)&&jn(a,Yt,Kt,En,pn),e&&.05<Kt-Yt&&ea(a,Yt,Kt,"Mount"))),ti(v),es(C),pn=M,Vn=B,Ku=q}function Qs(e,a,o,d,y,v){for(y=y&&((a.subtreeFlags&10256)!==0||a.actualDuration!==0&&(a.alternate===null||a.alternate.child!==a.child)),a=a.child;a!==null;){var C=a.sibling;Wg(e,a,o,d,y,C!==null?C.actualStartTime:v),a=C}}function Wg(e,a,o,d,y,v){var C=Ga(),M=Us(),B=ns(),q=as(),ot=Ku;y&&(a.mode&2)!==Zt&&0<a.actualStartTime&&(a.flags&1)!==0&&di(a,a.actualStartTime,v,Ea,o);var ct=a.flags;switch(a.tag){case 0:case 11:case 15:Qs(e,a,o,d,y,v),Pg(a,Di);break;case 23:break;case 22:var gt=a.stateNode;a.memoizedState!==null?gt._visibility&wo?Qs(e,a,o,d,y,v):Sf(e,a,o,d,v):(gt._visibility|=wo,Qs(e,a,o,d,y,v)),y&&ct&2048&&fo(a.alternate,a);break;case 24:Qs(e,a,o,d,y,v),y&&ct&2048&&xm(a.alternate,a);break;default:Qs(e,a,o,d,y,v)}(a.mode&2)!==Zt&&0<=Yt&&0<=Kt&&(Vn||.05<En)&&jn(a,Yt,Kt,En,pn),ti(C),es(M),pn=B,Vn=q,Ku=ot}function Sf(e,a,o,d,y){if(a.subtreeFlags&10256||a.actualDuration!==0&&(a.alternate===null||a.alternate.child!==a.child))for(var v=a.child;v!==null;){a=v.sibling;var C=e,M=o,B=d,q=a!==null?a.actualStartTime:y,ot=Ku;(v.mode&2)!==Zt&&0<v.actualStartTime&&(v.flags&1)!==0&&di(v,v.actualStartTime,q,Ea,M);var ct=v.flags;switch(v.tag){case 22:Sf(C,v,M,B,q),ct&2048&&fo(v.alternate,v);break;case 24:Sf(C,v,M,B,q),ct&2048&&xm(v.alternate,v);break;default:Sf(C,v,M,B,q)}Ku=ot,v=a}}function ho(e,a,o){if(e.subtreeFlags&Op)for(e=e.child;e!==null;)$g(e,a,o),e=e.sibling}function $g(e,a,o){switch(e.tag){case 26:if(ho(e,a,o),e.flags&Op)if(e.memoizedState!==null)E(o,Ql,e.memoizedState,e.memoizedProps);else{var d=e.stateNode,y=e.type;e=e.memoizedProps,((a&335544128)===a||Xd(y,e))&&Kd(o,d,y,e)}break;case 5:ho(e,a,o),e.flags&Op&&(d=e.stateNode,y=e.type,e=e.memoizedProps,((a&335544128)===a||Xd(y,e))&&Kd(o,d,y,e));break;case 3:case 4:Ve?(d=Ql,Ql=Dr(e.stateNode.containerInfo),ho(e,a,o),Ql=d):ho(e,a,o);break;case 22:e.memoizedState===null&&(d=e.alternate,d!==null&&d.memoizedState!==null?(d=Op,Op=16777216,ho(e,a,o),Op=d):ho(e,a,o));break;default:ho(e,a,o)}}function ty(e){var a=e.alternate;if(a!==null&&(e=a.child,e!==null)){a.child=null;do a=e.sibling,e.sibling=null,e=a;while(e!==null)}}function bf(e){var a=e.deletions;if((e.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var d=a[o],y=Ga();Ra=d,ay(d,e),(d.mode&2)!==Zt&&0<=Yt&&0<=Kt&&.05<Kt-Yt&&ea(d,Yt,Kt,"Unmount"),ti(y)}ty(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ey(e),e=e.sibling}function ey(e){var a=Ga(),o=Us(),d=ns(),y=as();switch(e.tag){case 0:case 11:case 15:bf(e),e.flags&2048&&Em(e,e.return,Di|sl);break;case 3:var v=ws();bf(e),e.stateNode.passiveEffectDuration+=Uc(v);break;case 12:v=ws(),bf(e),e.stateNode.passiveEffectDuration+=fu(v);break;case 22:v=e.stateNode,e.memoizedState!==null&&v._visibility&wo&&(e.return===null||e.return.tag!==13)?(v._visibility&=~wo,Md(e),(e.mode&2)!==Zt&&0<=Yt&&0<=Kt&&.05<Kt-Yt&&ea(e,Yt,Kt,"Disconnect")):bf(e);break;default:bf(e)}(e.mode&2)!==Zt&&0<=Yt&&0<=Kt&&(Vn||.05<En)&&jn(e,Yt,Kt,En,pn),ti(a),es(o),Vn=y,pn=d}function Md(e){var a=e.deletions;if((e.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var d=a[o],y=Ga();Ra=d,ay(d,e),(d.mode&2)!==Zt&&0<=Yt&&0<=Kt&&.05<Kt-Yt&&ea(d,Yt,Kt,"Unmount"),ti(y)}ty(e)}for(e=e.child;e!==null;)ny(e),e=e.sibling}function ny(e){var a=Ga(),o=Us(),d=ns(),y=as();switch(e.tag){case 0:case 11:case 15:Em(e,e.return,Di),Md(e);break;case 22:var v=e.stateNode;v._visibility&wo&&(v._visibility&=~wo,Md(e));break;default:Md(e)}(e.mode&2)!==Zt&&0<=Yt&&0<=Kt&&(Vn||.05<En)&&jn(e,Yt,Kt,En,pn),ti(a),es(o),Vn=y,pn=d}function ay(e,a){for(;Ra!==null;){var o=Ra,d=o,y=a,v=Ga(),C=Us(),M=ns(),B=as();switch(d.tag){case 0:case 11:case 15:Em(d,y,Di);break;case 23:case 22:d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(y=d.memoizedState.cachePool.pool,y!=null&&_l(y));break;case 24:eo(d.memoizedState.cache)}if((d.mode&2)!==Zt&&0<=Yt&&0<=Kt&&(Vn||.05<En)&&jn(d,Yt,Kt,En,pn),ti(v),es(C),Vn=B,pn=M,d=o.child,d!==null)d.return=o,Ra=d;else t:for(o=e;Ra!==null;){if(d=Ra,v=d.sibling,C=d.return,Xs(d),d===o){Ra=null;break t}if(v!==null){v.return=C,Ra=v;break t}Ra=C}}}function Dm(e){var a=m3(e);if(a!=null){if(typeof a.memoizedProps["data-testname"]!="string")throw Error("Invalid host root specified. Should be either a React container or a node with a testname attribute.");return a}if(e=Pm(e),e===null)throw Error("Could not find React container within specified host subtree.");return e.stateNode.current}function Am(e,a){var o=e.tag;switch(a.$$typeof){case a2:if(e.type===a.value)return!0;break;case i2:t:{for(a=a.value,e=[e,0],o=0;o<e.length;){var d=e[o++],y=d.tag,v=e[o++],C=a[v];if(y!==5&&y!==26&&y!==27||!ks(d)){for(;C!=null&&Am(d,C);)v++,C=a[v];if(v===a.length){a=!0;break t}else for(d=d.child;d!==null;)e.push(d,v),d=d.sibling}}a=!1}return a;case s2:if((o===5||o===26||o===27)&&Jd(e.stateNode,a.value))return!0;break;case r2:if((o===5||o===6||o===26||o===27)&&(e=Ym(e),e!==null&&0<=e.indexOf(a.value)))return!0;break;case l2:if((o===5||o===26||o===27)&&(e=e.memoizedProps["data-testname"],typeof e=="string"&&e.toLowerCase()===a.value.toLowerCase()))return!0;break;default:throw Error("Invalid selector type specified.")}return!1}function Nd(e){switch(e.$$typeof){case a2:return"<"+(it(e.value)||"Unknown")+">";case i2:return":has("+(Nd(e)||"")+")";case s2:return'[role="'+e.value+'"]';case r2:return'"'+e.value+'"';case l2:return'[data-testname="'+e.value+'"]';default:throw Error("Invalid selector type specified.")}}function iy(e,a){var o=[];e=[e,0];for(var d=0;d<e.length;){var y=e[d++],v=y.tag,C=e[d++],M=a[C];if(v!==5&&v!==26&&v!==27||!ks(y)){for(;M!=null&&Am(y,M);)C++,M=a[C];if(C===a.length)o.push(y);else for(y=y.child;y!==null;)e.push(y,C),y=y.sibling}}return o}function Od(e,a){if(!ms)throw Error("Test selector API is not supported by this renderer.");e=Dm(e),e=iy(e,a),a=[],e=Array.from(e);for(var o=0;o<e.length;){var d=e[o++],y=d.tag;if(y===5||y===26||y===27)ks(d)||a.push(d.stateNode);else for(d=d.child;d!==null;)e.push(d),d=d.sibling}return a}function l3(){ms&&o2.forEach(function(e){return e()})}function sy(){var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return e||st.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),e}function Si(e){if((ge&Ha)!==za&&ie!==0)return ie&-ie;var a=st.T;return a!==null?(a._updatedFibers||(a._updatedFibers=new Set),a._updatedFibers.add(e),Gh()):jm()}function ly(){if(Zi===0)if((ie&536870912)===0||me){var e=rt;rt<<=1,(rt&3932160)===0&&(rt=262144),Zi=e}else Zi=536870912;return e=vs.current,e!==null&&(e.flags|=32),Zi}function en(e,a,o){if(Hp&&console.error("useInsertionEffect must not schedule updates."),o5&&(y2=!0),(e===Je&&(Pe===kf||Pe===If)||e.cancelPendingCommit!==null)&&(Du(e,0),wl(e,ie,Zi,!1)),$(e,o),(ge&Ha)!==za&&e===Je){if(Nr)switch(a.tag){case 0:case 11:case 15:e=oe&&J(oe)||"Unknown",nT.has(e)||(nT.add(e),a=J(a)||"Unknown",console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",a,e,e));break;case 1:eT||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),eT=!0)}}else Mr&&se(e,a,o),xy(a),e===Je&&((ge&Ha)===za&&(ic|=o),Tn===ec&&wl(e,ie,Zi,!1)),ja(e)}function Mm(e,a,o){if((ge&(Ha|rl))!==za)throw Error("Should not already be working.");if(ie!==0&&oe!==null){var d=oe,y=pe();switch(F9){case g1:case kf:var v=$m;ln&&((d=d._debugTask)?d.run(console.timeStamp.bind(console,"Suspended",v,y,"Components ⚛",void 0,"primary-light")):console.timeStamp("Suspended",v,y,"Components ⚛",void 0,"primary-light"));break;case If:v=$m,ln&&((d=d._debugTask)?d.run(console.timeStamp.bind(console,"Action",v,y,"Components ⚛",void 0,"primary-light")):console.timeStamp("Action",v,y,"Components ⚛",void 0,"primary-light"));break;default:ln&&(d=y-$m,3>d||console.timeStamp("Blocked",$m,y,"Components ⚛",void 0,5>d?"primary-light":10>d?"primary":100>d?"primary-dark":"error"))}}v=(o=!o&&(a&127)===0&&(a&e.expiredLanes)===0||Q(e,a))?r3(e,a):Om(e,a,!0);var C=o;do{if(v===jo){Rp&&!o&&wl(e,a,0,!1),a=Pe,$m=sa(),F9=a;break}else{if(d=pe(),y=e.current.alternate,C&&!oy(y)){cn(a),y=fi,v=d,!ln||v<=y||(Kn?Kn.run(console.timeStamp.bind(console,"Teared Render",y,v,ve,"Scheduler ⚛","error")):console.timeStamp("Teared Render",y,v,ve,"Scheduler ⚛","error")),po(a,d),v=Om(e,a,!1),C=!1;continue}if(v===Ff){if(C=a,e.errorRecoveryDisabledLanes&C)var M=0;else M=e.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){cn(a),na(fi,d,a,Kn),po(a,d),a=M;t:{d=e,v=C,C=v1;var B=Oa&&d.current.memoizedState.isDehydrated;if(B&&(Du(d,M).flags|=256),M=Om(d,M,!1),M!==Ff){if($3&&!B){d.errorRecoveryDisabledLanes|=v,ic|=v,v=ec;break t}d=Ai,Ai=C,d!==null&&(Ai===null?Ai=d:Ai.push.apply(Ai,d))}v=M}if(C=!1,v!==Ff)continue;d=pe()}}if(v===m1){cn(a),na(fi,d,a,Kn),po(a,d),Du(e,0),wl(e,a,0,!0);break}t:{switch(o=e,v){case jo:case m1:throw Error("Root did not complete. This is a bug in React.");case ec:if((a&4194048)!==a)break;case c2:cn(a),Oi(fi,d,a,Kn),po(a,d),y=a,(y&127)!==0?Yy=d:(y&4194048)!==0&&(qy=d),wl(o,a,Zi,!nc);break t;case Ff:Ai=null;break;case u2:case qE:break;default:throw Error("Unknown root exit status.")}if(st.actQueue!==null)Rm(o,y,a,Ai,b1,d2,Zi,ic,Wf,v,null,null,fi,d);else{if((a&62914560)===a&&(C=p2+QE-pe(),10<C)){if(wl(o,a,Zi,!nc),H(o,0,!0)!==0)break t;Zl=a,o.timeoutHandle=Li(ry.bind(null,o,y,Ai,b1,d2,a,Zi,ic,Wf,nc,v,"Throttled",fi,d),C);break t}ry(o,y,Ai,b1,d2,a,Zi,ic,Wf,nc,v,null,fi,d)}}}break}while(!0);ja(e)}function ry(e,a,o,d,y,v,C,M,B,q,ot,ct,gt,jt){e.timeoutHandle=Js;var kt=a.subtreeFlags,Xe=null;if((kt&8192||(kt&16785408)===16785408)&&(Xe=Gu(),$g(a,v,Xe),kt=(v&62914560)===v?p2-pe():(v&4194048)===v?KE-pe():0,kt=Qd(Xe,kt),kt!==null)){Zl=v,e.cancelPendingCommit=kt(Rm.bind(null,e,a,v,o,d,y,C,M,B,ot,Xe,Zd(Xe,e.containerInfo),gt,jt)),wl(e,v,C,!q);return}Rm(e,a,v,o,d,y,C,M,B,ot,Xe,ct,gt,jt)}function oy(e){for(var a=e;;){var o=a.tag;if((o===0||o===11||o===15)&&a.flags&16384&&(o=a.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var d=0;d<o.length;d++){var y=o[d],v=y.getSnapshot;y=y.value;try{if(!Ci(v(),y))return!1}catch{return!1}}if(o=a.child,a.subtreeFlags&16384&&o!==null)o.return=a,a=o;else{if(a===e)break;for(;a.sibling===null;){if(a.return===null||a.return===e)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function wl(e,a,o,d){a&=~t5,a&=~ic,e.suspendedLanes|=a,e.pingedLanes&=~a,d&&(e.warmLanes|=a),d=e.expirationTimes;for(var y=a;0<y;){var v=31-In(y),C=1<<v;d[v]=-1,y&=~C}o!==0&&Rt(e,o,a)}function Ef(){return(ge&(Ha|rl))===za?(no(0),!1):!0}function Tf(){return(ge&(Ha|rl))!==za}function Cf(){if(oe!==null){if(Pe===Qi)var e=oe.return;else e=oe,wh(),$c(e),bp=null,o1=0,e=oe;for(;e!==null;)xd(e.alternate,e),e=e.return;oe=null}}function po(e,a){(e&127)!==0&&(jf=a),(e&4194048)!==0&&(zo=a)}function Du(e,a){ln&&(console.timeStamp("Blocking Track",.003,.003,"Blocking","Scheduler ⚛","primary-light"),console.timeStamp("Transition Track",.003,.003,"Transition","Scheduler ⚛","primary-light"),console.timeStamp("Suspense Track",.003,.003,"Suspense","Scheduler ⚛","primary-light"),console.timeStamp("Idle Track",.003,.003,"Idle","Scheduler ⚛","primary-light"));var o=fi;if(fi=sa(),ie!==0&&0<o){if(cn(ie),Tn===u2||Tn===ec)Oi(o,fi,a,Kn);else{var d=fi,y=Kn;if(ln&&!(d<=o)){var v=(a&738197653)===a?"tertiary-dark":"primary-dark",C=(a&536870912)===a?"Prewarm":(a&201326741)===a?"Interrupted Hydration":"Interrupted Render";y?y.run(console.timeStamp.bind(console,C,o,d,ve,"Scheduler ⚛",v)):console.timeStamp(C,o,d,ve,"Scheduler ⚛",v)}}po(ie,fi)}if(o=Kn,Kn=null,(a&127)!==0){Kn=km,y=0<=Rr&&Rr<jf?jf:Rr,d=0<=Lf&&Lf<jf?jf:Lf,v=0<=d?d:0<=y?y:fi,0<=Yy&&(cn(2),Ht(Yy,v,a,o)),o=y;var M=d,B=Im,q=0<gp,ot=Iu===1,ct=Iu===2;if(y=fi,d=km,v=A3,C=M3,ln){if(ve="Blocking",0<o?o>y&&(o=y):o=y,0<M?M>o&&(M=o):M=o,B!==null&&o>M){var gt=q?"secondary-light":"warning";d?d.run(console.timeStamp.bind(console,q?"Consecutive":"Event: "+B,M,o,ve,"Scheduler ⚛",gt)):console.timeStamp(q?"Consecutive":"Event: "+B,M,o,ve,"Scheduler ⚛",gt)}y>o&&(M=ot?"error":(a&738197653)===a?"tertiary-light":"primary-light",ot=ct?"Promise Resolved":ot?"Cascading Update":5<y-o?"Update Blocked":"Update",ct=[],C!=null&&ct.push(["Component name",C]),v!=null&&ct.push(["Method name",v]),o={start:o,end:y,detail:{devtools:{properties:ct,track:ve,trackGroup:"Scheduler ⚛",color:M}}},d?d.run(performance.measure.bind(performance,ot,o)):performance.measure(ot,o))}Rr=-1.1,Iu=0,M3=A3=null,Yy=-1.1,gp=Lf,Lf=-1.1,jf=sa()}if((a&4194048)!==0&&(Kn=Wm,y=0<=Ho&&Ho<zo?zo:Ho,o=0<=nl&&nl<zo?zo:nl,d=0<=Wu&&Wu<zo?zo:Wu,v=0<=d?d:0<=o?o:fi,0<=qy&&(cn(256),Ht(qy,v,a,Kn)),ct=d,M=Pf,B=0<$u,q=N3===2,v=fi,d=Wm,C=Q9,ot=Z9,ln&&(ve="Transition",0<o?o>v&&(o=v):o=v,0<y?y>o&&(y=o):y=o,0<ct?ct>y&&(ct=y):ct=y,y>ct&&M!==null&&(gt=B?"secondary-light":"warning",d?d.run(console.timeStamp.bind(console,B?"Consecutive":"Event: "+M,ct,y,ve,"Scheduler ⚛",gt)):console.timeStamp(B?"Consecutive":"Event: "+M,ct,y,ve,"Scheduler ⚛",gt)),o>y&&(d?d.run(console.timeStamp.bind(console,"Action",y,o,ve,"Scheduler ⚛","primary-dark")):console.timeStamp("Action",y,o,ve,"Scheduler ⚛","primary-dark")),v>o&&(y=q?"Promise Resolved":5<v-o?"Update Blocked":"Update",ct=[],ot!=null&&ct.push(["Component name",ot]),C!=null&&ct.push(["Method name",C]),o={start:o,end:v,detail:{devtools:{properties:ct,track:ve,trackGroup:"Scheduler ⚛",color:"primary-light"}}},d?d.run(performance.measure.bind(performance,y,o)):performance.measure(y,o))),nl=Ho=-1.1,N3=0,qy=-1.1,$u=Wu,Wu=-1.1,zo=sa()),o=e.timeoutHandle,o!==Js&&(e.timeoutHandle=Js,Gm(o)),o=e.cancelPendingCommit,o!==null&&(e.cancelPendingCommit=null,o()),Zl=0,Cf(),Je=e,oe=o=Ul(e.current,null),ie=a,Pe=Qi,bs=null,nc=!1,Rp=Q(e,a),$3=!1,Tn=jo,Wf=Zi=t5=ic=ac=0,Ai=v1=null,d2=!1,(a&8)!==0&&(a|=a&32),d=e.entangledLanes,d!==0)for(e=e.entanglements,d&=a;0<d;)y=31-In(d),v=1<<y,a|=e[y],d&=~v;return Hr=a,pu(),e=U9(),1e3<e-w9&&(st.recentlyCreatedOwnerStacks=0,w9=e),Xl.discardPendingWarnings(),o}function uy(e,a){Jt=null,st.H=d1,st.getCurrentStack=null,Nr=!1,No=null,a===Sp||a===Fy?(a=X0(),Pe=g1):a===V3?(a=X0(),Pe=XE):Pe=a===J3?W3:a!==null&&typeof a=="object"&&typeof a.then=="function"?y1:f2,bs=a;var o=oe;o===null?(Tn=m1,of(e,Va(a,e.current))):o.mode&2&&Uh(o)}function cy(){var e=vs.current;return e===null?!0:(ie&4194048)===ie?il===null:(ie&62914560)===ie||(ie&536870912)!==0?e===il:!1}function Nm(){var e=st.H;return st.H=d1,e===null?d1:e}function fy(){var e=st.A;return st.A=mj,e}function Rd(e){Kn===null&&(Kn=e._debugTask==null?null:e._debugTask)}function zd(){Tn=ec,nc||(ie&4194048)!==ie&&vs.current!==null||(Rp=!0),(ac&134217727)===0&&(ic&134217727)===0||Je===null||wl(Je,ie,Zi,!1)}function Om(e,a,o){var d=ge;ge|=Ha;var y=Nm(),v=fy();if(Je!==e||ie!==a){if(Mr){var C=e.memoizedUpdaters;0<C.size&&(Nu(e,ie),C.clear()),Ke(e,a)}b1=null,Du(e,a)}a=!1,C=Tn;t:do try{if(Pe!==Qi&&oe!==null){var M=oe,B=bs;switch(Pe){case W3:Cf(),C=c2;break t;case g1:case kf:case If:case y1:vs.current===null&&(a=!0);var q=Pe;if(Pe=Qi,bs=null,Au(e,M,B,q),o&&Rp){C=jo;break t}break;default:q=Pe,Pe=Qi,bs=null,Au(e,M,B,q)}}hy(),C=Tn;break}catch(ot){uy(e,ot)}while(!0);return a&&e.shellSuspendCounter++,wh(),ge=d,st.H=y,st.A=v,oe===null&&(Je=null,ie=0,pu()),C}function hy(){for(;oe!==null;)dy(oe)}function r3(e,a){var o=ge;ge|=Ha;var d=Nm(),y=fy();if(Je!==e||ie!==a){if(Mr){var v=e.memoizedUpdaters;0<v.size&&(Nu(e,ie),v.clear()),Ke(e,a)}b1=null,S1=pe()+e5,Du(e,a)}else Rp=Q(e,a);t:do try{if(Pe!==Qi&&oe!==null)e:switch(a=oe,v=bs,Pe){case f2:Pe=Qi,bs=null,Au(e,a,v,f2);break;case kf:case If:if(q0(v)){Pe=Qi,bs=null,py(a);break}a=function(){Pe!==kf&&Pe!==If||Je!==e||(Pe=h2),ja(e)},v.then(a,a);break t;case g1:Pe=h2;break t;case XE:Pe=I3;break t;case h2:q0(v)?(Pe=Qi,bs=null,py(a)):(Pe=Qi,bs=null,Au(e,a,v,h2));break;case I3:var C=null;switch(oe.tag){case 26:C=oe.memoizedState;case 5:case 27:var M=oe,B=M.type,q=M.pendingProps;if(C?g(C):br(M.stateNode,B,q)){Pe=Qi,bs=null;var ot=M.sibling;if(ot!==null)oe=ot;else{var ct=M.return;ct!==null?(oe=ct,Hd(ct)):oe=null}break e}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}Pe=Qi,bs=null,Au(e,a,v,I3);break;case y1:Pe=Qi,bs=null,Au(e,a,v,y1);break;case W3:Cf(),Tn=c2;break t;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}st.actQueue!==null?hy():o3();break}catch(gt){uy(e,gt)}while(!0);return wh(),st.H=d,st.A=y,ge=o,oe!==null?jo:(Je=null,ie=0,pu(),Tn)}function o3(){for(;oe!==null&&!Qt();)dy(oe)}function dy(e){var a=e.alternate;(e.mode&2)!==Zt?(Vc(e),a=wt(e,Ya,a,e,Hr),Uh(e)):a=wt(e,Ya,a,e,Hr),e.memoizedProps=e.pendingProps,a===null?Hd(e):oe=a}function py(e){var a=wt(e,u3,e);e.memoizedProps=e.pendingProps,a===null?Hd(e):oe=a}function u3(e){var a=e.alternate,o=(e.mode&2)!==Zt;switch(o&&Vc(e),e.tag){case 15:case 0:a=Ps(a,e,e.pendingProps,e.type,void 0,ie);break;case 11:a=Ps(a,e,e.pendingProps,e.type.render,e.ref,ie);break;case 5:$c(e);default:xd(a,e),e=oe=Ln(e,Hr),a=Ya(a,e,Hr)}return o&&Uh(e),a}function Au(e,a,o,d){wh(),$c(a),bp=null,o1=0;var y=a.return;try{if(jg(e,y,a,o,ie)){Tn=m1,of(e,Va(o,e.current)),oe=null;return}}catch(v){if(y!==null)throw oe=y,v;Tn=m1,of(e,Va(o,e.current)),oe=null;return}a.flags&32768?(me||d===f2?e=!0:Rp||(ie&536870912)!==0?e=!1:(nc=e=!0,(d===kf||d===If||d===g1||d===y1)&&(d=vs.current,d!==null&&d.tag===13&&(d.flags|=16384))),my(a,e)):Hd(a)}function Hd(e){var a=e;do{if((a.flags&32768)!==0){my(a,nc);return}var o=a.alternate;if(e=a.return,Vc(a),o=wt(a,vm,o,a,Hr),(a.mode&2)!==Zt&&B0(a),o!==null){oe=o;return}if(a=a.sibling,a!==null){oe=a;return}oe=a=e}while(a!==null);Tn===jo&&(Tn=qE)}function my(e,a){do{var o=mr(e.alternate,e);if(o!==null){o.flags&=32767,oe=o;return}if((e.mode&2)!==Zt){B0(e),o=e.actualDuration;for(var d=e.child;d!==null;)o+=d.actualDuration,d=d.sibling;e.actualDuration=o}if(o=e.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(e=e.sibling,e!==null)){oe=e;return}oe=e=o}while(e!==null);Tn=c2,oe=null}function Rm(e,a,o,d,y,v,C,M,B,q,ot,ct,gt,jt){e.cancelPendingCommit=null;do Mu();while(ca!==lc);if(Xl.flushLegacyContextWarning(),Xl.flushPendingUnsafeLifecycleWarnings(),(ge&(Ha|rl))!==za)throw Error("Should not already be working.");if(cn(o),q===Ff?na(gt,jt,o,Kn):d!==null?De(gt,jt,o,d,a!==null&&a.alternate!==null&&a.alternate.memoizedState.isDehydrated&&(a.flags&256)!==0,Kn):Mn(gt,jt,o,Kn),a!==null){if(o===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),a===e.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(v=a.lanes|a.childLanes,v|=j3,Et(e,o,v,C,M,B),e===Je&&(oe=Je=null,ie=0),zp=a,rc=e,Zl=o,i5=v,l5=y,WE=d,s5=jt,$E=ct,Jl=m2,tT=null,a.actualDuration!==0||(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,_y(Bf,function(){return Uu(),Jl===m2&&(Jl=a5),by(),null})):(e.callbackNode=null,e.callbackPriority=0),Ro=null,ku=sa(),ct!==null&&pi(jt,ku,ct,Kn),d=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||d){d=st.T,st.T=null,y=ri(),Hn(2),C=ge,ge|=rl;try{i3(e,a,o)}finally{ge=C,Hn(y),st.T=d}}ca=JE,gy(),yy(),vy()}}function gy(){if(ca===JE){ca=lc;var e=rc,a=zp,o=Zl,d=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||d){d=st.T,st.T=null;var y=ri();Hn(2);var v=ge;ge|=rl;try{Mp=o,Np=e,Bc(),Jg(a,e),Np=Mp=null,Sr(e.containerInfo)}finally{ge=v,Hn(y),st.T=d}}e.current=a,ca=FE}}function yy(){if(ca===FE){ca=lc;var e=tT;if(e!==null){ku=sa();var a=Oo,o=ku;!ln||o<=a||console.timeStamp(e,a,o,ve,"Scheduler ⚛","secondary-light")}e=rc,a=zp,o=Zl;var d=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||d){d=st.T,st.T=null;var y=ri();Hn(2);var v=ge;ge|=rl;try{Mp=o,Np=e,Bc(),Fn(e,a.alternate,a),Np=Mp=null}finally{ge=v,Hn(y),st.T=d}}e=s5,a=$E,Oo=sa(),e=a===null?e:ku,a=Oo,o=Jl===n5,d=Kn,Ro!==null?tn(e,a,Ro,!1,d):!ln||a<=e||(d?d.run(console.timeStamp.bind(console,o?"Commit Interrupted View Transition":"Commit",e,a,ve,"Scheduler ⚛",o?"error":"secondary-dark")):console.timeStamp(o?"Commit Interrupted View Transition":"Commit",e,a,ve,"Scheduler ⚛",o?"error":"secondary-dark")),ca=kE}}function vy(){if(ca===IE||ca===kE){if(ca===IE){var e=Oo;Oo=sa();var a=Oo,o=Jl===n5;!ln||a<=e||console.timeStamp(o?"Interrupted View Transition":"Starting Animation",e,a,ve,"Scheduler ⚛",o?" error":"secondary-light"),Jl!==n5&&(Jl=ZE)}ca=lc,Me(),e=rc;var d=zp;a=Zl,o=WE;var y=d.actualDuration!==0||(d.subtreeFlags&10256)!==0||(d.flags&10256)!==0;y?ca=g2:(ca=lc,zp=rc=null,Sy(e,e.pendingLanes),$f=0,T1=null);var v=e.pendingLanes;if(v===0&&(sc=null),y||wm(e),v=yn(a),d=d.stateNode,ci&&typeof ci.onCommitFiberRoot=="function")try{var C=(d.current.flags&128)===128;switch(v){case 2:var M=Se;break;case 8:M=ql;break;case 32:M=Bf;break;case 268435456:M=H9;break;default:M=Bf}ci.onCommitFiberRoot(fp,d,M,C)}catch(ct){Ar||(Ar=!0,console.error("React instrumentation encountered an error: %o",ct))}if(Mr&&e.memoizedUpdaters.clear(),l3(),o!==null){C=st.T,M=ri(),Hn(2),st.T=null;try{var B=e.onRecoverableError;for(d=0;d<o.length;d++){var q=o[d],ot=c3(q.stack);wt(q.source,B,q.value,ot)}}finally{st.T=C,Hn(M)}}(Zl&3)!==0&&Mu(),ja(e),v=e.pendingLanes,(a&261930)!==0&&(v&42)!==0?(Ky=!0,e===r5?E1++:(E1=0,r5=e)):E1=0,y||po(a,Oo),Oa&&Km(),no(0)}}function c3(e){return e={componentStack:e},Object.defineProperty(e,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),e}function Sy(e,a){(e.pooledCacheLanes&=a)===0&&(a=e.pooledCache,a!=null&&(e.pooledCache=null,eo(a)))}function Mu(){return gy(),yy(),vy(),by()}function by(){if(ca!==g2)return!1;var e=rc,a=i5;i5=0;var o=yn(Zl),d=32>o?32:o;o=st.T;var y=ri();try{Hn(d),st.T=null;var v=l5;l5=null,d=rc;var C=Zl;if(ca=lc,zp=rc=null,Zl=0,(ge&(Ha|rl))!==za)throw Error("Cannot flush passive effects while already rendering.");cn(C),o5=!0,y2=!1;var M=0;if(Ro=null,M=pe(),Jl===ZE){var B=Oo,q=M;!ln||q<=B||(J9?J9.run(console.timeStamp.bind(console,"Animating",B,q,ve,"Scheduler ⚛","secondary-dark")):console.timeStamp("Animating",B,q,ve,"Scheduler ⚛","secondary-dark"))}else{B=Oo,q=M;var ot=Jl===a5;!ln||q<=B||(Kn?Kn.run(console.timeStamp.bind(console,ot?"Waiting for Paint":"Waiting",B,q,ve,"Scheduler ⚛","secondary-light")):console.timeStamp(ot?"Waiting for Paint":"Waiting",B,q,ve,"Scheduler ⚛","secondary-light"))}B=ge,ge|=rl;var ct=d.current;Bc(),ey(ct);var gt=d.current;ct=s5,Bc(),Ig(d,gt,C,v,ct),wm(d),ge=B;var jt=pe();if(gt=M,ct=Kn,Ro!==null?tn(gt,jt,Ro,!0,ct):!ln||jt<=gt||(ct?ct.run(console.timeStamp.bind(console,"Remaining Effects",gt,jt,ve,"Scheduler ⚛","secondary-dark")):console.timeStamp("Remaining Effects",gt,jt,ve,"Scheduler ⚛","secondary-dark")),po(C,jt),no(0,!1),y2?d===T1?$f++:($f=0,T1=d):$f=0,y2=o5=!1,ci&&typeof ci.onPostCommitFiberRoot=="function")try{ci.onPostCommitFiberRoot(fp,d)}catch(Xe){Ar||(Ar=!0,console.error("React instrumentation encountered an error: %o",Xe))}var kt=d.current.stateNode;return kt.effectDuration=0,kt.passiveEffectDuration=0,!0}finally{Hn(y),st.T=o,Sy(e,a)}}function Ey(e,a,o){a=Va(o,a),V0(a),a=dd(e.stateNode,a,2),e=zi(e,a,2),e!==null&&($(e,2),ja(e))}function Ce(e,a,o){if(Hp=!1,e.tag===3)Ey(e,e,o);else{for(;a!==null;){if(a.tag===3){Ey(a,e,o);return}if(a.tag===1){var d=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(sc===null||!sc.has(d))){e=Va(o,e),V0(e),o=pd(2),d=zi(a,o,2),d!==null&&(md(o,d,a,e),$(d,2),ja(d));return}}a=a.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
|
|
140
140
|
|
|
141
141
|
Error message:
|
|
142
142
|
|
|
143
|
-
%s`,o)}}function
|
|
143
|
+
%s`,o)}}function zm(e,a,o){var d=e.pingCache;if(d===null){d=e.pingCache=new gj;var y=new Set;d.set(a,y)}else y=d.get(a),y===void 0&&(y=new Set,d.set(a,y));y.has(o)||($3=!0,y.add(o),d=f3.bind(null,e,a,o),Mr&&Nu(e,o),a.then(d,d))}function f3(e,a,o){var d=e.pingCache;d!==null&&d.delete(a),e.pingedLanes|=e.suspendedLanes&o,e.warmLanes&=~o,(o&127)!==0?0>Rr&&(jf=Rr=sa(),km=Py("Promise Resolved"),Iu=2):(o&4194048)!==0&&0>nl&&(zo=nl=sa(),Wm=Py("Promise Resolved"),N3=2),sy()&&st.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
|
|
144
144
|
|
|
145
145
|
When testing, code that resolves suspended data should be wrapped into act(...):
|
|
146
146
|
|
|
@@ -149,7 +149,7 @@ act(() => {
|
|
|
149
149
|
});
|
|
150
150
|
/* assert on the output */
|
|
151
151
|
|
|
152
|
-
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),
|
|
152
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),Je===e&&(ie&o)===o&&(Tn===ec||Tn===u2&&(ie&62914560)===ie&&pe()-p2<QE?(ge&Ha)===za&&Du(e,0):t5|=o,Wf===ie&&(Wf=0)),ja(e)}function Ty(e,a){a===0&&(a=pt()),e=xa(e,a),e!==null&&($(e,a),ja(e))}function Cy(e){var a=e.memoizedState,o=0;a!==null&&(o=a.retryLane),Ty(e,o)}function h3(e,a){var o=0;switch(e.tag){case 31:case 13:var d=e.stateNode,y=e.memoizedState;y!==null&&(o=y.retryLane);break;case 19:d=e.stateNode;break;case 22:d=e.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}d!==null&&d.delete(a),Ty(e,o)}function Hm(e,a,o){if((a.subtreeFlags&67117056)!==0)for(a=a.child;a!==null;){var d=e,y=a,v=y.type===Pd;v=o||v,y.tag!==22?y.flags&67108864?v&&wt(y,Vi,d,y):Hm(d,y,v):y.memoizedState===null&&(v&&y.flags&8192?wt(y,Vi,d,y):y.subtreeFlags&67108864&&wt(y,Hm,d,y,v)),a=a.sibling}}function Vi(e,a){It(!0);try{yr(a),ny(a),kg(e,a.alternate,a,!1),Wg(e,a,0,null,!1,0)}finally{It(!1)}}function wm(e){var a=!0;e.current.mode&24||(a=!1),Hm(e,e.current,a)}function wd(e){if((ge&Ha)===za){var a=e.tag;if(a===3||a===1||a===0||a===11||a===14||a===15){if(a=J(e)||"ReactComponent",v2!==null){if(v2.has(a))return;v2.add(a)}else v2=new Set([a]);wt(e,function(){console.error("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously tries to update the component. Move this work to useEffect instead.")})}}}function Nu(e,a){Mr&&e.memoizedUpdaters.forEach(function(o){se(e,o,a)})}function _y(e,a){var o=st.actQueue;return o!==null?(o.push(a),Sj):Pt(e,a)}function xy(e){sy()&&st.actQueue===null&&wt(e,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
|
|
153
153
|
|
|
154
154
|
When testing, code that causes React state updates should be wrapped into act(...):
|
|
155
155
|
|
|
@@ -158,50 +158,50 @@ act(() => {
|
|
|
158
158
|
});
|
|
159
159
|
/* assert on the output */
|
|
160
160
|
|
|
161
|
-
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,
|
|
161
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,J(e))})}function mo(e){if(ol===null)return e;var a=ol(e);return a===void 0?e:a.current}function Ud(e){if(ol===null)return e;var a=ol(e);return a===void 0?e!=null&&typeof e.render=="function"&&(a=mo(e.render),e.render!==a)?(a={$$typeof:Sa,render:a},e.displayName!==void 0&&(a.displayName=e.displayName),a):e:a.current}function Um(e,a){if(ol===null)return!1;var o=e.elementType;a=a.type;var d=!1,y=typeof a=="object"&&a!==null?a.$$typeof:null;switch(e.tag){case 1:typeof a=="function"&&(d=!0);break;case 0:(typeof a=="function"||y===li)&&(d=!0);break;case 11:(y===Sa||y===li)&&(d=!0);break;case 14:case 15:(y===Hu||y===li)&&(d=!0);break;default:return!1}return!!(d&&(e=ol(o),e!==void 0&&e===ol(a)))}function Dy(e){ol!==null&&typeof WeakSet=="function"&&(wp===null&&(wp=new WeakSet),wp.add(e))}function Ay(e,a,o){do{var d=e,y=d.alternate,v=d.child,C=d.sibling,M=d.tag;d=d.type;var B=null;switch(M){case 0:case 15:case 1:B=d;break;case 11:B=d.render}if(ol===null)throw Error("Expected resolveFamily to be set during hot reload.");var q=!1;if(d=!1,B!==null&&(B=ol(B),B!==void 0&&(o.has(B)?d=!0:a.has(B)&&(M===1?d=!0:q=!0))),wp!==null&&(wp.has(e)||y!==null&&wp.has(y))&&(d=!0),d&&(e._debugNeedsRemount=!0),(d||q)&&(y=xa(e,2),y!==null&&en(y,e,2)),v===null||d||Ay(v,a,o),C===null)break;e=C}while(!0)}function d3(e,a,o,d){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,aT||typeof Object.preventExtensions!="function"||Object.preventExtensions(this)}function Bd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ul(e,a){var o=e.alternate;switch(o===null?(o=S(e.tag,a,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o._debugOwner=e._debugOwner,o._debugStack=e._debugStack,o._debugTask=e._debugTask,o._debugHookTypes=e._debugHookTypes,o.alternate=e,e.alternate=o):(o.pendingProps=a,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null,o.actualDuration=-0,o.actualStartTime=-1.1),o.flags=e.flags&65011712,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,a=e.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext,_debugThenableState:a._debugThenableState},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o.refCleanup=e.refCleanup,o.selfBaseDuration=e.selfBaseDuration,o.treeBaseDuration=e.treeBaseDuration,o._debugInfo=e._debugInfo,o._debugNeedsRemount=e._debugNeedsRemount,o.tag){case 0:case 15:o.type=mo(e.type);break;case 1:o.type=mo(e.type);break;case 11:o.type=Ud(e.type)}return o}function Ln(e,a){e.flags&=65011714;var o=e.alternate;return o===null?(e.childLanes=0,e.lanes=a,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0):(e.childLanes=o.childLanes,e.lanes=o.lanes,e.child=o.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=o.memoizedProps,e.memoizedState=o.memoizedState,e.updateQueue=o.updateQueue,e.type=o.type,a=o.dependencies,e.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext,_debugThenableState:a._debugThenableState},e.selfBaseDuration=o.selfBaseDuration,e.treeBaseDuration=o.treeBaseDuration),e}function Vd(e,a,o,d,y,v){var C=0,M=e;if(typeof e=="function")Bd(e)&&(C=1),M=mo(M);else if(typeof e=="string")Ve&&T?(C=mi(),C=Yl(e,o,C)?26:vt(e)?27:5):Ve?(C=mi(),C=Yl(e,o,C)?26:5):C=T&&vt(e)?27:5;else t:switch(e){case Af:return a=S(31,o,a,y),a.elementType=Af,a.lanes=v,a;case zu:return vr(o.children,y,v,a);case Pd:C=8,y|=24;break;case Bm:return e=o,d=y,typeof e.id!="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id),a=S(12,e,a,d|2),a.elementType=Bm,a.lanes=v,a.stateNode={effectDuration:0,passiveEffectDuration:0},a;case Yd:return a=S(13,o,a,y),a.elementType=Yd,a.lanes=v,a;case Vm:return a=S(19,o,a,y),a.elementType=Vm,a.lanes=v,a;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case zn:C=10;break t;case vo:C=9;break t;case Sa:C=11,M=Ud(M);break t;case Hu:C=14;break t;case li:C=16,M=null;break t}M="",(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(M+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),e===null?o="null":Pn(e)?o="array":e!==void 0&&e.$$typeof===Bl?(o="<"+(it(e.type)||"Unknown")+" />",M=" Did you accidentally export a JSX literal instead of a component?"):o=typeof e,C=d?typeof d.tag=="number"?J(d):typeof d.name=="string"?d.name:null:null,C&&(M+=`
|
|
162
162
|
|
|
163
|
-
Check the render method of \``+C+"`."),C=29,o=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(o+"."+M)),M=null}return a=S(C,o,a,y),a.elementType=e,a.type=M,a.lanes=v,a._debugOwner=d,a}function
|
|
163
|
+
Check the render method of \``+C+"`."),C=29,o=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(o+"."+M)),M=null}return a=S(C,o,a,y),a.elementType=e,a.type=M,a.lanes=v,a._debugOwner=d,a}function Gd(e,a,o){return a=Vd(e.type,e.key,e.props,e._owner,a,o),a._debugOwner=e._owner,a._debugStack=e._debugStack,a._debugTask=e._debugTask,a}function vr(e,a,o,d){return e=S(7,e,d,a),e.lanes=o,e}function jd(e,a,o){return e=S(6,e,null,a),e.lanes=o,e}function go(e){var a=S(18,null,null,Zt);return a.stateNode=e,a}function _f(e,a,o){return a=S(4,e.children!==null?e.children:[],e.key,a),a.lanes=o,a.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},a}function Ou(e,a,o,d,y,v,C,M,B){for(this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Js,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=dt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dt(0),this.hiddenUpdates=dt(null),this.identifierPrefix=d,this.onUncaughtError=y,this.onCaughtError=v,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=B,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,e=this.pendingUpdatersLaneMap=[],a=0;31>a;a++)e.push(new Set);this._debugRootType=o?"hydrateRoot()":"createRoot()"}function yo(e,a,o,d,y,v,C,M,B,q,ot,ct){return e=new Ou(e,a,o,C,B,q,ot,ct,M),a=1,v===!0&&(a|=24),v=S(3,null,null,a|2),e.current=v,v.stateNode=e,a=cu(),_l(a),e.pooledCache=a,_l(a),v.memoizedState={element:d,isDehydrated:o,cache:a},Kh(v),e}function ii(e){return""+e}function My(e){return e?(e=sn,e):sn}function Ny(e,a,o,d){return xf(a.current,2,e,a,o,d),2}function xf(e,a,o,d,y,v){if(ci&&typeof ci.onScheduleFiberRoot=="function")try{ci.onScheduleFiberRoot(fp,d,o)}catch(C){Ar||(Ar=!0,console.error("React instrumentation encountered an error: %o",C))}y=My(y),d.context===null?d.context=y:d.pendingContext=y,Nr&&No!==null&&!sT&&(sT=!0,console.error(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
|
|
164
164
|
|
|
165
|
-
Check the render method of %s.`,nt(xo)||"Unknown")),d=El(a),d.payload={element:o},v=v===void 0?null:v,v!==null&&(typeof v!="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",v),d.callback=v),o=Ni(e,d,a),o!==null&&(Wi(a,"root.render()",null),Ie(o,e,a),pu(o,e,a))}function Tf(e,a){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<a?o:a}}function Ou(e,a){Tf(e,a),(e=e.alternate)&&Tf(e,a)}function Vd(){return xo}var ae={},p3=H,si=J2(),Me=Object.assign,Oy=Symbol.for("react.element"),Rl=Symbol.for("react.transitional.element"),zl=Symbol.for("react.portal"),Ru=Symbol.for("react.fragment"),Gd=Symbol.for("react.strict_mode"),wm=Symbol.for("react.profiler"),po=Symbol.for("react.consumer"),Rn=Symbol.for("react.context"),Sa=Symbol.for("react.forward_ref"),jd=Symbol.for("react.suspense"),Um=Symbol.for("react.suspense_list"),zu=Symbol.for("react.memo"),li=Symbol.for("react.lazy"),Cf=Symbol.for("react.activity"),Ry=Symbol.for("react.memo_cache_sentinel"),mo=Symbol.iterator,Hu=Symbol.for("react.client.reference"),Pn=Array.isArray,rt=p3.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ui=t.rendererVersion,Bi=t.rendererPackageName,Hl=t.extraDevToolsConfig,Xa=t.getPublicInstance,qs=t.getRootHostContext,ba=t.getChildHostContext,_f=t.prepareForCommit,dr=t.resetAfterCommit,Ld=t.createInstance;t.cloneMutableInstance;var Fn=t.appendInitialChild,We=t.finalizeInitialChildren,se=t.shouldSetTextContent,wl=t.createTextInstance;t.cloneMutableTextInstance;var Vi=t.scheduleTimeout,Bm=t.cancelTimeout,Xs=t.noTimeout,Ka=t.isPrimaryRenderer;t.warnsIfNotActing;var $e=t.supportsMutation,Ks=t.supportsPersistence,Na=t.supportsHydration,m3=t.getInstanceFromNode;t.beforeActiveInstanceBlur;var cn=t.preparePortalMount;t.prepareScopeUpdate,t.getInstanceFromScope;var zn=t.setCurrentUpdatePriority,ri=t.getCurrentUpdatePriority,Vm=t.resolveUpdatePriority,wu=t.trackSchedulerEvent,go=t.resolveEventType,hs=t.resolveEventTimeStamp,xf=t.shouldAttemptEagerTransition,Gm=t.detachDeletedInstance;t.requestPostPaintCallback;var Uu=t.maySuspendCommit,Bu=t.maySuspendCommitOnUpdate,Pd=t.maySuspendCommitInSyncRender,pr=t.preloadInstance,Vu=t.startSuspendingCommit,Yd=t.suspendInstance;t.suspendOnActiveViewTransition;var qd=t.waitForCommitToBeReady,Xd=t.getSuspendedCommitReason,Gi=t.NotPendingTransition,ji=t.HostTransitionContext,Df=t.resetFormInstance,yo=t.bindToConsole,zy=t.supportsMicrotasks,Li=t.scheduleMicrotask,ds=t.supportsTestSelectors,jm=t.findFiberRoot,mr=t.getBoundingRect,Lm=t.getTextContent,Qs=t.isHiddenSubtree,Kd=t.matchAccessibilityRole,Si=t.setFocusIfFocusable,Pi=t.setupIntersectionObserver,Hn=t.appendChild,Ul=t.appendChildToContainer,kt=t.commitTextUpdate,Ge=t.commitMount,Yn=t.commitUpdate,Qd=t.insertBefore,Gu=t.insertInContainerBefore,vo=t.removeChild,Zd=t.removeChildFromContainer,ju=t.resetTextContent,Lu=t.hideInstance,g3=t.hideTextInstance,Af=t.unhideInstance,Hy=t.unhideTextInstance;t.cancelViewTransitionName,t.cancelRootViewTransitionName,t.restoreRootViewTransitionName,t.cloneRootViewTransitionContainer,t.removeRootViewTransitionClone,t.measureClonedInstance,t.hasInstanceChanged,t.hasInstanceAffectedParent,t.startViewTransition,t.startGestureTransition,t.stopViewTransition,t.getCurrentGestureOffset,t.createViewTransitionInstance;var Pm=t.clearContainer;t.createFragmentInstance,t.updateFragmentInstanceFiber,t.commitNewChildToFragmentInstance,t.deleteChildFromFragmentInstance;var wy=t.cloneInstance,Jd=t.createContainerChildSet,Fd=t.appendChildToContainerChildSet,qn=t.finalizeContainerChildren,kd=t.replaceContainerChildren,Zs=t.cloneHiddenInstance,wn=t.cloneHiddenTextInstance,Mf=t.isSuspenseInstancePending,Id=t.isSuspenseInstanceFallback,aa=t.getSuspenseInstanceFallbackErrorDetails,Xn=t.registerSuspenseInstanceRetry,oi=t.canHydrateFormStateMarker,ps=t.isFormStateMarkerMatching,gr=t.getNextHydratableSibling,y3=t.getNextHydratableSiblingAfterSingleton,Wd=t.getFirstHydratableChild,$d=t.getFirstHydratableChildWithinContainer,tp=t.getFirstHydratableChildWithinActivityInstance,ep=t.getFirstHydratableChildWithinSuspenseInstance,np=t.getFirstHydratableChildWithinSingleton,Nf=t.canHydrateInstance,v3=t.canHydrateTextInstance,re=t.canHydrateActivityInstance,Le=t.canHydrateSuspenseInstance,oe=t.hydrateInstance,ce=t.hydrateTextInstance,He=t.hydrateActivityInstance,bi=t.hydrateSuspenseInstance,yr=t.getNextHydratableInstanceAfterActivityInstance,So=t.getNextHydratableInstanceAfterSuspenseInstance,Ym=t.commitHydratedInstance,Bl=t.commitHydratedContainer,yn=t.commitHydratedActivityInstance,vr=t.commitHydratedSuspenseInstance,bo=t.finalizeHydratedChildren,qm=t.flushHydrationEvents;t.clearActivityBoundary;var Ei=t.clearSuspenseBoundary;t.clearActivityBoundaryFromContainer;var Pu=t.clearSuspenseBoundaryFromContainer,Of=t.hideDehydratedBoundary,ui=t.unhideDehydratedBoundary,ap=t.shouldDeleteUnhydratedTailInstances,Rf=t.diffHydratedPropsForDevWarnings,Xm=t.diffHydratedTextForDevWarnings,Yu=t.describeHydratableInstanceForDevWarnings,ip=t.validateHydratableInstance,Sr=t.validateHydratableTextInstance,we=t.supportsResources,Vl=t.isHostHoistableType,br=t.getHoistableRoot,Js=t.getResource,sp=t.acquireResource,lp=t.releaseResource,Uy=t.hydrateHoistable,qu=t.mountHoistable,rp=t.unmountHoistable,l=t.createHoistableInstance,r=t.prepareToCommitHoistables,h=t.mayResourceSuspendCommit,g=t.preloadResource,E=t.suspendResource,T=t.supportsSingletons,z=t.resolveSingletonInstance,L=t.acquireSingletonInstance,ft=t.releaseSingletonInstance,vt=t.isHostSingletonType,Mt=t.isSingletonScope,xt=[],Rt=[],Yt=-1,tn={};Object.freeze(tn);var kn=Math.clz32?Math.clz32:pt,Eo=Math.log,it=Math.LN2,J=256,ut=262144,_t=4194304,jt=si.unstable_scheduleCallback,fn=si.unstable_cancelCallback,Xt=si.unstable_shouldYield,_e=si.unstable_requestPaint,fe=si.unstable_now,ye=si.unstable_ImmediatePriority,Gl=si.unstable_UserBlockingPriority,zf=si.unstable_NormalPriority,z9=si.unstable_IdlePriority,WG=si.log,$G=si.unstable_setDisableYieldValue,op=null,ci=null,Er=!1,Tr=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",H9=0;if(typeof performance=="object"&&typeof performance.now=="function")var tj=performance,w9=function(){return tj.now()};else{var ej=Date;w9=function(){return ej.now()}}var Ti=typeof Object.is=="function"?Object.is:ue,U9=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},S3=Object.prototype.hasOwnProperty,en=typeof console<"u"&&typeof console.timeStamp=="function"&&typeof performance<"u"&&typeof performance.measure=="function",me="Blocking",Xu=!1,To={color:"primary",properties:null,tooltipText:"",track:"Components ⚛"},Ku={start:-0,end:-0,detail:{devtools:To}},nj=["Changed Props",""],aj=["Changed Props","This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner."],Km=0,B9,V9,G9,j9,L9,P9,Y9;mn.__reactDisabledLog=!0;var b3,q9,E3=!1,T3=new(typeof WeakMap=="function"?WeakMap:Map),C3=new WeakMap,up=[],cp=0,By=null,Qm=0,Fs=[],ks=0,Hf=null,Co=1,_o="",Qu=bt(null),Zm=bt(null),Zu=bt(null),Vy=bt(null),X9=/["'&<>\n\t]|^\s|\s$/,xo=null,Cr=!1,Qa=null,vn=null,he=!1,_r=!1,ms=null,Ju=null,Is=!1,_3=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),Kt=0,Gy=bt(null),x3=bt(null),D3=bt(null),jy={},Ly=null,fp=null,hp=!1,ij=typeof AbortController<"u"?AbortController:function(){var e=[],a=this.signal={aborted:!1,addEventListener:function(o,d){e.push(d)}};this.abort=function(){a.aborted=!0,e.forEach(function(o){return o()})}},sj=si.unstable_scheduleCallback,lj=si.unstable_NormalPriority,Un={$$typeof:Rn,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},ia=si.unstable_now,Py=console.createTask?console.createTask:function(){return null},fi=-0,Fu=-0,Do=-0,Ao=null,Ci=-1.1,wf=-0,Sn=-0,Lt=-1.1,qt=-1.1,hn=null,Bn=!1,Uf=-0,xr=-1.1,Jm=null,ku=0,A3=null,M3=null,Bf=-1.1,Fm=null,dp=-1.1,Yy=-1.1,Mo=-0,No=-1.1,Ws=-1.1,N3=0,km=null,K9=null,Q9=null,Iu=-1.1,Vf=null,Wu=-1.1,qy=-1.1,Z9=null,J9=0,Im=-1.1,Xy=!1,Ky=!1,Qy=null,pp=null,O3=!1,R3=!1,Zy=!1,z3=!1,Gf=0,H3={},Wm=null,w3=0,jf=0,mp=null,F9=rt.S;rt.S=function(e,a){if(XE=fe(),typeof a=="object"&&a!==null&&typeof a.then=="function"){if(0>No&&0>Ws){No=ia();var o=hs(),d=go();(o!==Wu||d!==Vf)&&(Wu=-1.1),Iu=o,Vf=d}Ag(e,a)}F9!==null&&F9(e,a)};var Lf=bt(null),jl={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},$m=[],t1=[],e1=[],n1=[],a1=[],i1=[],Pf=new Set;jl.recordUnsafeLifecycleWarnings=function(e,a){Pf.has(e.type)||(typeof a.componentWillMount=="function"&&a.componentWillMount.__suppressDeprecationWarning!==!0&&$m.push(e),e.mode&8&&typeof a.UNSAFE_componentWillMount=="function"&&t1.push(e),typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&e1.push(e),e.mode&8&&typeof a.UNSAFE_componentWillReceiveProps=="function"&&n1.push(e),typeof a.componentWillUpdate=="function"&&a.componentWillUpdate.__suppressDeprecationWarning!==!0&&a1.push(e),e.mode&8&&typeof a.UNSAFE_componentWillUpdate=="function"&&i1.push(e))},jl.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;0<$m.length&&($m.forEach(function(M){e.add(nt(M)||"Component"),Pf.add(M.type)}),$m=[]);var a=new Set;0<t1.length&&(t1.forEach(function(M){a.add(nt(M)||"Component"),Pf.add(M.type)}),t1=[]);var o=new Set;0<e1.length&&(e1.forEach(function(M){o.add(nt(M)||"Component"),Pf.add(M.type)}),e1=[]);var d=new Set;0<n1.length&&(n1.forEach(function(M){d.add(nt(M)||"Component"),Pf.add(M.type)}),n1=[]);var y=new Set;0<a1.length&&(a1.forEach(function(M){y.add(nt(M)||"Component"),Pf.add(M.type)}),a1=[]);var v=new Set;if(0<i1.length&&(i1.forEach(function(M){v.add(nt(M)||"Component"),Pf.add(M.type)}),i1=[]),0<a.size){var C=O(a);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
165
|
+
Check the render method of %s.`,J(No)||"Unknown")),d=Dl(a),d.payload={element:o},v=v===void 0?null:v,v!==null&&(typeof v!="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",v),d.callback=v),o=zi(e,d,a),o!==null&&(ts(a,"root.render()",null),en(o,e,a),mu(o,e,a))}function Df(e,a){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<a?o:a}}function Ru(e,a){Df(e,a),(e=e.alternate)&&Df(e,a)}function Ld(){return No}var re={},p3=w,si=J2(),Re=Object.assign,Oy=Symbol.for("react.element"),Bl=Symbol.for("react.transitional.element"),Vl=Symbol.for("react.portal"),zu=Symbol.for("react.fragment"),Pd=Symbol.for("react.strict_mode"),Bm=Symbol.for("react.profiler"),vo=Symbol.for("react.consumer"),zn=Symbol.for("react.context"),Sa=Symbol.for("react.forward_ref"),Yd=Symbol.for("react.suspense"),Vm=Symbol.for("react.suspense_list"),Hu=Symbol.for("react.memo"),li=Symbol.for("react.lazy"),Af=Symbol.for("react.activity"),Ry=Symbol.for("react.memo_cache_sentinel"),So=Symbol.iterator,wu=Symbol.for("react.client.reference"),Pn=Array.isArray,st=p3.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Gi=t.rendererVersion,ji=t.rendererPackageName,Gl=t.extraDevToolsConfig,Xa=t.getPublicInstance,Zs=t.getRootHostContext,ba=t.getChildHostContext,Mf=t.prepareForCommit,Sr=t.resetAfterCommit,qd=t.createInstance;t.cloneMutableInstance;var kn=t.appendInitialChild,nn=t.finalizeInitialChildren,ue=t.shouldSetTextContent,jl=t.createTextInstance;t.cloneMutableTextInstance;var Li=t.scheduleTimeout,Gm=t.cancelTimeout,Js=t.noTimeout,Ka=t.isPrimaryRenderer;t.warnsIfNotActing;var an=t.supportsMutation,Fs=t.supportsPersistence,Oa=t.supportsHydration,m3=t.getInstanceFromNode;t.beforeActiveInstanceBlur;var hn=t.preparePortalMount;t.prepareScopeUpdate,t.getInstanceFromScope;var Hn=t.setCurrentUpdatePriority,ri=t.getCurrentUpdatePriority,jm=t.resolveUpdatePriority,Uu=t.trackSchedulerEvent,bo=t.resolveEventType,ps=t.resolveEventTimeStamp,Nf=t.shouldAttemptEagerTransition,Lm=t.detachDeletedInstance;t.requestPostPaintCallback;var Bu=t.maySuspendCommit,Vu=t.maySuspendCommitOnUpdate,Xd=t.maySuspendCommitInSyncRender,br=t.preloadInstance,Gu=t.startSuspendingCommit,Kd=t.suspendInstance;t.suspendOnActiveViewTransition;var Qd=t.waitForCommitToBeReady,Zd=t.getSuspendedCommitReason,Pi=t.NotPendingTransition,Yi=t.HostTransitionContext,Of=t.resetFormInstance,Eo=t.bindToConsole,zy=t.supportsMicrotasks,qi=t.scheduleMicrotask,ms=t.supportsTestSelectors,Pm=t.findFiberRoot,Er=t.getBoundingRect,Ym=t.getTextContent,ks=t.isHiddenSubtree,Jd=t.matchAccessibilityRole,bi=t.setFocusIfFocusable,Xi=t.setupIntersectionObserver,wn=t.appendChild,Ll=t.appendChildToContainer,$t=t.commitTextUpdate,Le=t.commitMount,Yn=t.commitUpdate,Fd=t.insertBefore,ju=t.insertInContainerBefore,To=t.removeChild,kd=t.removeChildFromContainer,Lu=t.resetTextContent,Pu=t.hideInstance,g3=t.hideTextInstance,Rf=t.unhideInstance,Hy=t.unhideTextInstance;t.cancelViewTransitionName,t.cancelRootViewTransitionName,t.restoreRootViewTransitionName,t.cloneRootViewTransitionContainer,t.removeRootViewTransitionClone,t.measureClonedInstance,t.hasInstanceChanged,t.hasInstanceAffectedParent,t.startViewTransition,t.startGestureTransition,t.stopViewTransition,t.getCurrentGestureOffset,t.createViewTransitionInstance;var qm=t.clearContainer;t.createFragmentInstance,t.updateFragmentInstanceFiber,t.commitNewChildToFragmentInstance,t.deleteChildFromFragmentInstance;var wy=t.cloneInstance,Id=t.createContainerChildSet,Wd=t.appendChildToContainerChildSet,qn=t.finalizeContainerChildren,$d=t.replaceContainerChildren,Is=t.cloneHiddenInstance,Un=t.cloneHiddenTextInstance,zf=t.isSuspenseInstancePending,tp=t.isSuspenseInstanceFallback,ia=t.getSuspenseInstanceFallbackErrorDetails,Xn=t.registerSuspenseInstanceRetry,oi=t.canHydrateFormStateMarker,gs=t.isFormStateMarkerMatching,Tr=t.getNextHydratableSibling,y3=t.getNextHydratableSiblingAfterSingleton,ep=t.getFirstHydratableChild,np=t.getFirstHydratableChildWithinContainer,ap=t.getFirstHydratableChildWithinActivityInstance,ip=t.getFirstHydratableChildWithinSuspenseInstance,sp=t.getFirstHydratableChildWithinSingleton,Hf=t.canHydrateInstance,v3=t.canHydrateTextInstance,fe=t.canHydrateActivityInstance,qe=t.canHydrateSuspenseInstance,he=t.hydrateInstance,de=t.hydrateTextInstance,Be=t.hydrateActivityInstance,Ei=t.hydrateSuspenseInstance,Cr=t.getNextHydratableInstanceAfterActivityInstance,Co=t.getNextHydratableInstanceAfterSuspenseInstance,Xm=t.commitHydratedInstance,Pl=t.commitHydratedContainer,Sn=t.commitHydratedActivityInstance,_r=t.commitHydratedSuspenseInstance,_o=t.finalizeHydratedChildren,Km=t.flushHydrationEvents;t.clearActivityBoundary;var Ti=t.clearSuspenseBoundary;t.clearActivityBoundaryFromContainer;var Yu=t.clearSuspenseBoundaryFromContainer,wf=t.hideDehydratedBoundary,ui=t.unhideDehydratedBoundary,lp=t.shouldDeleteUnhydratedTailInstances,Uf=t.diffHydratedPropsForDevWarnings,Qm=t.diffHydratedTextForDevWarnings,qu=t.describeHydratableInstanceForDevWarnings,rp=t.validateHydratableInstance,xr=t.validateHydratableTextInstance,Ve=t.supportsResources,Yl=t.isHostHoistableType,Dr=t.getHoistableRoot,Ws=t.getResource,op=t.acquireResource,up=t.releaseResource,Uy=t.hydrateHoistable,Xu=t.mountHoistable,cp=t.unmountHoistable,l=t.createHoistableInstance,r=t.prepareToCommitHoistables,h=t.mayResourceSuspendCommit,g=t.preloadResource,E=t.suspendResource,T=t.supportsSingletons,z=t.resolveSingletonInstance,L=t.acquireSingletonInstance,ut=t.releaseSingletonInstance,vt=t.isHostSingletonType,Dt=t.isSingletonScope,_t=[],Nt=[],Xt=-1,sn={};Object.freeze(sn);var In=Math.clz32?Math.clz32:yt,xo=Math.log,at=Math.LN2,F=256,rt=262144,Ct=4194304,Pt=si.unstable_scheduleCallback,dn=si.unstable_cancelCallback,Qt=si.unstable_shouldYield,Me=si.unstable_requestPaint,pe=si.unstable_now,Se=si.unstable_ImmediatePriority,ql=si.unstable_UserBlockingPriority,Bf=si.unstable_NormalPriority,H9=si.unstable_IdlePriority,tj=si.log,ej=si.unstable_setDisableYieldValue,fp=null,ci=null,Ar=!1,Mr=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",w9=0;if(typeof performance=="object"&&typeof performance.now=="function")var nj=performance,U9=function(){return nj.now()};else{var aj=Date;U9=function(){return aj.now()}}var Ci=typeof Object.is=="function"?Object.is:Jn,B9=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},S3=Object.prototype.hasOwnProperty,ln=typeof console<"u"&&typeof console.timeStamp=="function"&&typeof performance<"u"&&typeof performance.measure=="function",ve="Blocking",Ku=!1,Do={color:"primary",properties:null,tooltipText:"",track:"Components ⚛"},Qu={start:-0,end:-0,detail:{devtools:Do}},ij=["Changed Props",""],sj=["Changed Props","This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner."],Zm=0,V9,G9,j9,L9,P9,Y9,q9;Nn.__reactDisabledLog=!0;var b3,X9,E3=!1,T3=new(typeof WeakMap=="function"?WeakMap:Map),C3=new WeakMap,hp=[],dp=0,By=null,Jm=0,$s=[],tl=0,Vf=null,Ao=1,Mo="",Zu=St(null),Fm=St(null),Ju=St(null),Vy=St(null),K9=/["'&<>\n\t]|^\s|\s$/,No=null,Nr=!1,Qa=null,bn=null,me=!1,Or=!1,ys=null,Fu=null,el=!1,_3=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),Zt=0,Gy=St(null),x3=St(null),D3=St(null),jy={},Ly=null,pp=null,mp=!1,lj=typeof AbortController<"u"?AbortController:function(){var e=[],a=this.signal={aborted:!1,addEventListener:function(o,d){e.push(d)}};this.abort=function(){a.aborted=!0,e.forEach(function(o){return o()})}},rj=si.unstable_scheduleCallback,oj=si.unstable_NormalPriority,Bn={$$typeof:zn,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},sa=si.unstable_now,Py=console.createTask?console.createTask:function(){return null},fi=-0,ku=-0,Oo=-0,Ro=null,_i=-1.1,Gf=-0,En=-0,Yt=-1.1,Kt=-1.1,pn=null,Vn=!1,jf=-0,Rr=-1.1,km=null,Iu=0,A3=null,M3=null,Lf=-1.1,Im=null,gp=-1.1,Yy=-1.1,zo=-0,Ho=-1.1,nl=-1.1,N3=0,Wm=null,Q9=null,Z9=null,Wu=-1.1,Pf=null,$u=-1.1,qy=-1.1,J9=null,F9=0,$m=-1.1,Xy=!1,Ky=!1,Qy=null,yp=null,O3=!1,R3=!1,Zy=!1,z3=!1,Yf=0,H3={},t1=null,w3=0,qf=0,vp=null,k9=st.S;st.S=function(e,a){if(KE=pe(),typeof a=="object"&&a!==null&&typeof a.then=="function"){if(0>Ho&&0>nl){Ho=sa();var o=ps(),d=bo();(o!==$u||d!==Pf)&&($u=-1.1),Wu=o,Pf=d}Ag(e,a)}k9!==null&&k9(e,a)};var Xf=St(null),Xl={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},e1=[],n1=[],a1=[],i1=[],s1=[],l1=[],Kf=new Set;Xl.recordUnsafeLifecycleWarnings=function(e,a){Kf.has(e.type)||(typeof a.componentWillMount=="function"&&a.componentWillMount.__suppressDeprecationWarning!==!0&&e1.push(e),e.mode&8&&typeof a.UNSAFE_componentWillMount=="function"&&n1.push(e),typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&a1.push(e),e.mode&8&&typeof a.UNSAFE_componentWillReceiveProps=="function"&&i1.push(e),typeof a.componentWillUpdate=="function"&&a.componentWillUpdate.__suppressDeprecationWarning!==!0&&s1.push(e),e.mode&8&&typeof a.UNSAFE_componentWillUpdate=="function"&&l1.push(e))},Xl.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;0<e1.length&&(e1.forEach(function(M){e.add(J(M)||"Component"),Kf.add(M.type)}),e1=[]);var a=new Set;0<n1.length&&(n1.forEach(function(M){a.add(J(M)||"Component"),Kf.add(M.type)}),n1=[]);var o=new Set;0<a1.length&&(a1.forEach(function(M){o.add(J(M)||"Component"),Kf.add(M.type)}),a1=[]);var d=new Set;0<i1.length&&(i1.forEach(function(M){d.add(J(M)||"Component"),Kf.add(M.type)}),i1=[]);var y=new Set;0<s1.length&&(s1.forEach(function(M){y.add(J(M)||"Component"),Kf.add(M.type)}),s1=[]);var v=new Set;if(0<l1.length&&(l1.forEach(function(M){v.add(J(M)||"Component"),Kf.add(M.type)}),l1=[]),0<a.size){var C=R(a);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
166
166
|
|
|
167
167
|
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
168
168
|
|
|
169
|
-
Please update the following components: %s`,C)}0<d.size&&(C=
|
|
169
|
+
Please update the following components: %s`,C)}0<d.size&&(C=R(d),console.error(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
170
170
|
|
|
171
171
|
* Move data fetching code or side effects to componentDidUpdate.
|
|
172
172
|
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
|
|
173
173
|
|
|
174
|
-
Please update the following components: %s`,C)),0<v.size&&(C=
|
|
174
|
+
Please update the following components: %s`,C)),0<v.size&&(C=R(v),console.error(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
175
175
|
|
|
176
176
|
* Move data fetching code or side effects to componentDidUpdate.
|
|
177
177
|
|
|
178
|
-
Please update the following components: %s`,C)),0<e.size&&(C=
|
|
178
|
+
Please update the following components: %s`,C)),0<e.size&&(C=R(e),console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
179
179
|
|
|
180
180
|
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
181
181
|
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
182
182
|
|
|
183
|
-
Please update the following components: %s`,C)),0<o.size&&(C=
|
|
183
|
+
Please update the following components: %s`,C)),0<o.size&&(C=R(o),console.warn(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
184
184
|
|
|
185
185
|
* Move data fetching code or side effects to componentDidUpdate.
|
|
186
186
|
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
|
|
187
187
|
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
188
188
|
|
|
189
|
-
Please update the following components: %s`,C)),0<y.size&&(C=
|
|
189
|
+
Please update the following components: %s`,C)),0<y.size&&(C=R(y),console.warn(`componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
190
190
|
|
|
191
191
|
* Move data fetching code or side effects to componentDidUpdate.
|
|
192
192
|
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
193
193
|
|
|
194
|
-
Please update the following components: %s`,C))};var Jy=new Map,
|
|
194
|
+
Please update the following components: %s`,C))};var Jy=new Map,I9=new Set;Xl.recordLegacyContextWarning=function(e,a){for(var o=null,d=e;d!==null;)d.mode&8&&(o=d),d=d.return;o===null?console.error("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue."):!I9.has(e.type)&&(d=Jy.get(o),e.type.contextTypes!=null||e.type.childContextTypes!=null||a!==null&&typeof a.getChildContext=="function")&&(d===void 0&&(d=[],Jy.set(o,d)),d.push(e))},Xl.flushLegacyContextWarning=function(){Jy.forEach(function(e){if(e.length!==0){var a=e[0],o=new Set;e.forEach(function(y){o.add(J(y)||"Component"),I9.add(y.type)});var d=R(o);wt(a,function(){console.error(`Legacy context API has been detected within a strict-mode tree.
|
|
195
195
|
|
|
196
196
|
The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
|
|
197
197
|
|
|
198
198
|
Please update the following components: %s
|
|
199
199
|
|
|
200
|
-
Learn more about this warning here: https://react.dev/link/legacy-context`,d)})}})},
|
|
200
|
+
Learn more about this warning here: https://react.dev/link/legacy-context`,d)})}})},Xl.discardPendingWarnings=function(){e1=[],n1=[],a1=[],i1=[],s1=[],l1=[],Jy=new Map};var W9={react_stack_bottom_frame:function(e,a,o){var d=Nr;Nr=!0;try{return e(a,o)}finally{Nr=d}}},U3=W9.react_stack_bottom_frame.bind(W9),$9={react_stack_bottom_frame:function(e){var a=Nr;Nr=!0;try{return e.render()}finally{Nr=a}}},tE=$9.react_stack_bottom_frame.bind($9),eE={react_stack_bottom_frame:function(e,a){try{a.componentDidMount()}catch(o){Ce(e,e.return,o)}}},B3=eE.react_stack_bottom_frame.bind(eE),nE={react_stack_bottom_frame:function(e,a,o,d,y){try{a.componentDidUpdate(o,d,y)}catch(v){Ce(e,e.return,v)}}},aE=nE.react_stack_bottom_frame.bind(nE),iE={react_stack_bottom_frame:function(e,a){var o=a.stack;e.componentDidCatch(a.value,{componentStack:o!==null?o:""})}},uj=iE.react_stack_bottom_frame.bind(iE),sE={react_stack_bottom_frame:function(e,a,o){try{o.componentWillUnmount()}catch(d){Ce(e,a,d)}}},lE=sE.react_stack_bottom_frame.bind(sE),rE={react_stack_bottom_frame:function(e){var a=e.create;return e=e.inst,a=a(),e.destroy=a}},cj=rE.react_stack_bottom_frame.bind(rE),oE={react_stack_bottom_frame:function(e,a,o){try{o()}catch(d){Ce(e,a,d)}}},fj=oE.react_stack_bottom_frame.bind(oE),uE={react_stack_bottom_frame:function(e){var a=e._init;return a(e._payload)}},hj=uE.react_stack_bottom_frame.bind(uE),Sp=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),V3=Error("Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),Fy=Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),ky={then:function(){console.error('Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.')}},Qf=null,r1=!1,bp=null,o1=0,ae=null,G3,cE=G3=!1,fE={},hE={},dE={};O=function(e,a,o){if(o!==null&&typeof o=="object"&&o._store&&(!o._store.validated&&o.key==null||o._store.validated===2)){if(typeof o._store!="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");o._store.validated=1;var d=J(e),y=d||"null";if(!fE[y]){fE[y]=!0,o=o._owner,e=e._debugOwner;var v="";e&&typeof e.tag=="number"&&(y=J(e))&&(v=`
|
|
201
201
|
|
|
202
202
|
Check the render method of \``+y+"`."),v||d&&(v=`
|
|
203
203
|
|
|
204
|
-
Check the top-level render call using <`+d+">.");var C="";o!=null&&e!==o&&(d=null,typeof o.tag=="number"?d=nt(o):typeof o.name=="string"&&(d=o.name),d&&(C=" It was passed a child from "+d+".")),Bt(a,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',v,C)})}}};var qf=Pc(!0),dE=Pc(!1),r1=1,Oo=2,$s=[],vp=0,j3=0,pE=0,mE=1,gE=2,L3=3,$u=!1,yE=!1,P3=null,Y3=!1,Sp=bt(null),Iy=bt(0),gs=bt(null),tl=null,bp=1,o1=2,In=bt(0),Wy=0,el=1,_i=2,ys=4,xi=8,Ep,vE=new Set,SE=new Set,q3=new Set,bE=new Set,Ro=0,Qt=null,qe=null,sa=null,$y=!1,Tp=!1,Xf=!1,t2=0,u1=0,zo=null,fj=0,hj=25,ot=null,nl=null,Ho=-1,c1=!1,f1={readContext:Ve,use:Ce,useCallback:gn,useContext:gn,useEffect:gn,useImperativeHandle:gn,useLayoutEffect:gn,useInsertionEffect:gn,useMemo:gn,useReducer:gn,useRef:gn,useState:gn,useDebugValue:gn,useDeferredValue:gn,useTransition:gn,useSyncExternalStore:gn,useId:gn,useHostTransitionStatus:gn,useFormState:gn,useActionState:gn,useOptimistic:gn,useMemoCache:gn,useCacheRefresh:gn};f1.useEffectEvent=gn;var X3=null,EE=null,K3=null,TE=null,Dr=null,Ll=null,e2=null;X3={readContext:function(e){return Ve(e)},use:Ce,useCallback:function(e,a){return ot="useCallback",Ft(),ei(a),sd(e,a)},useContext:function(e){return ot="useContext",Ft(),Ve(e)},useEffect:function(e,a){return ot="useEffect",Ft(),ei(a),ni(e,a)},useImperativeHandle:function(e,a,o){return ot="useImperativeHandle",Ft(),ei(o),id(e,a,o)},useInsertionEffect:function(e,a){ot="useInsertionEffect",Ft(),ei(a),Cl(4,_i,e,a)},useLayoutEffect:function(e,a){return ot="useLayoutEffect",Ft(),ei(a),_l(e,a)},useMemo:function(e,a){ot="useMemo",Ft(),ei(a);var o=rt.H;rt.H=Dr;try{return ld(e,a)}finally{rt.H=o}},useReducer:function(e,a,o){ot="useReducer",Ft();var d=rt.H;rt.H=Dr;try{return Ih(e,a,o)}finally{rt.H=d}},useRef:function(e){return ot="useRef",Ft(),rs(e)},useState:function(e){ot="useState",Ft();var a=rt.H;rt.H=Dr;try{return vu(e)}finally{rt.H=a}},useDebugValue:function(){ot="useDebugValue",Ft()},useDeferredValue:function(e,a){return ot="useDeferredValue",Ft(),$c(e,a)},useTransition:function(){return ot="useTransition",Ft(),od()},useSyncExternalStore:function(e,a,o){return ot="useSyncExternalStore",Ft(),Wh(e,a,o)},useId:function(){return ot="useId",Ft(),nf()},useFormState:function(e,a){return ot="useFormState",Ft(),gu(),Nn(e,a)},useActionState:function(e,a){return ot="useActionState",Ft(),Nn(e,a)},useOptimistic:function(e){return ot="useOptimistic",Ft(),ed(e)},useHostTransitionStatus:lr,useMemoCache:eo,useCacheRefresh:function(){return ot="useCacheRefresh",Ft(),rr()},useEffectEvent:function(e){return ot="useEffectEvent",Ft(),ar(e)}},EE={readContext:function(e){return Ve(e)},use:Ce,useCallback:function(e,a){return ot="useCallback",Et(),sd(e,a)},useContext:function(e){return ot="useContext",Et(),Ve(e)},useEffect:function(e,a){return ot="useEffect",Et(),ni(e,a)},useImperativeHandle:function(e,a,o){return ot="useImperativeHandle",Et(),id(e,a,o)},useInsertionEffect:function(e,a){ot="useInsertionEffect",Et(),Cl(4,_i,e,a)},useLayoutEffect:function(e,a){return ot="useLayoutEffect",Et(),_l(e,a)},useMemo:function(e,a){ot="useMemo",Et();var o=rt.H;rt.H=Dr;try{return ld(e,a)}finally{rt.H=o}},useReducer:function(e,a,o){ot="useReducer",Et();var d=rt.H;rt.H=Dr;try{return Ih(e,a,o)}finally{rt.H=d}},useRef:function(e){return ot="useRef",Et(),rs(e)},useState:function(e){ot="useState",Et();var a=rt.H;rt.H=Dr;try{return vu(e)}finally{rt.H=a}},useDebugValue:function(){ot="useDebugValue",Et()},useDeferredValue:function(e,a){return ot="useDeferredValue",Et(),$c(e,a)},useTransition:function(){return ot="useTransition",Et(),od()},useSyncExternalStore:function(e,a,o){return ot="useSyncExternalStore",Et(),Wh(e,a,o)},useId:function(){return ot="useId",Et(),nf()},useActionState:function(e,a){return ot="useActionState",Et(),Nn(e,a)},useFormState:function(e,a){return ot="useFormState",Et(),gu(),Nn(e,a)},useOptimistic:function(e){return ot="useOptimistic",Et(),ed(e)},useHostTransitionStatus:lr,useMemoCache:eo,useCacheRefresh:function(){return ot="useCacheRefresh",Et(),rr()},useEffectEvent:function(e){return ot="useEffectEvent",Et(),ar(e)}},K3={readContext:function(e){return Ve(e)},use:Ce,useCallback:function(e,a){return ot="useCallback",Et(),no(e,a)},useContext:function(e){return ot="useContext",Et(),Ve(e)},useEffect:function(e,a){ot="useEffect",Et(),Da(2048,xi,e,a)},useImperativeHandle:function(e,a,o){return ot="useImperativeHandle",Et(),sr(e,a,o)},useInsertionEffect:function(e,a){return ot="useInsertionEffect",Et(),Da(4,_i,e,a)},useLayoutEffect:function(e,a){return ot="useLayoutEffect",Et(),Da(4,ys,e,a)},useMemo:function(e,a){ot="useMemo",Et();var o=rt.H;rt.H=Ll;try{return Su(e,a)}finally{rt.H=o}},useReducer:function(e,a,o){ot="useReducer",Et();var d=rt.H;rt.H=Ll;try{return ws(e,a,o)}finally{rt.H=d}},useRef:function(){return ot="useRef",Et(),De().memoizedState},useState:function(){ot="useState",Et();var e=rt.H;rt.H=Ll;try{return ws(ss)}finally{rt.H=e}},useDebugValue:function(){ot="useDebugValue",Et()},useDeferredValue:function(e,a){return ot="useDeferredValue",Et(),rd(e,a)},useTransition:function(){return ot="useTransition",Et(),wg()},useSyncExternalStore:function(e,a,o){return ot="useSyncExternalStore",Et(),nr(e,a,o)},useId:function(){return ot="useId",Et(),De().memoizedState},useFormState:function(e){return ot="useFormState",Et(),gu(),Wc(e)},useActionState:function(e){return ot="useActionState",Et(),Wc(e)},useOptimistic:function(e,a){return ot="useOptimistic",Et(),W0(e,a)},useHostTransitionStatus:lr,useMemoCache:eo,useCacheRefresh:function(){return ot="useCacheRefresh",Et(),De().memoizedState},useEffectEvent:function(e){return ot="useEffectEvent",Et(),ir(e)}},TE={readContext:function(e){return Ve(e)},use:Ce,useCallback:function(e,a){return ot="useCallback",Et(),no(e,a)},useContext:function(e){return ot="useContext",Et(),Ve(e)},useEffect:function(e,a){ot="useEffect",Et(),Da(2048,xi,e,a)},useImperativeHandle:function(e,a,o){return ot="useImperativeHandle",Et(),sr(e,a,o)},useInsertionEffect:function(e,a){return ot="useInsertionEffect",Et(),Da(4,_i,e,a)},useLayoutEffect:function(e,a){return ot="useLayoutEffect",Et(),Da(4,ys,e,a)},useMemo:function(e,a){ot="useMemo",Et();var o=rt.H;rt.H=e2;try{return Su(e,a)}finally{rt.H=o}},useReducer:function(e,a,o){ot="useReducer",Et();var d=rt.H;rt.H=e2;try{return yu(e,a,o)}finally{rt.H=d}},useRef:function(){return ot="useRef",Et(),De().memoizedState},useState:function(){ot="useState",Et();var e=rt.H;rt.H=e2;try{return yu(ss)}finally{rt.H=e}},useDebugValue:function(){ot="useDebugValue",Et()},useDeferredValue:function(e,a){return ot="useDeferredValue",Et(),nm(e,a)},useTransition:function(){return ot="useTransition",Et(),xl()},useSyncExternalStore:function(e,a,o){return ot="useSyncExternalStore",Et(),nr(e,a,o)},useId:function(){return ot="useId",Et(),De().memoizedState},useFormState:function(e){return ot="useFormState",Et(),gu(),Ri(e)},useActionState:function(e){return ot="useActionState",Et(),Ri(e)},useOptimistic:function(e,a){return ot="useOptimistic",Et(),$0(e,a)},useHostTransitionStatus:lr,useMemoCache:eo,useCacheRefresh:function(){return ot="useCacheRefresh",Et(),De().memoizedState},useEffectEvent:function(e){return ot="useEffectEvent",Et(),ir(e)}},Dr={readContext:function(e){return A(),Ve(e)},use:function(e){return D(),Ce(e)},useCallback:function(e,a){return ot="useCallback",D(),Ft(),sd(e,a)},useContext:function(e){return ot="useContext",D(),Ft(),Ve(e)},useEffect:function(e,a){return ot="useEffect",D(),Ft(),ni(e,a)},useImperativeHandle:function(e,a,o){return ot="useImperativeHandle",D(),Ft(),id(e,a,o)},useInsertionEffect:function(e,a){ot="useInsertionEffect",D(),Ft(),Cl(4,_i,e,a)},useLayoutEffect:function(e,a){return ot="useLayoutEffect",D(),Ft(),_l(e,a)},useMemo:function(e,a){ot="useMemo",D(),Ft();var o=rt.H;rt.H=Dr;try{return ld(e,a)}finally{rt.H=o}},useReducer:function(e,a,o){ot="useReducer",D(),Ft();var d=rt.H;rt.H=Dr;try{return Ih(e,a,o)}finally{rt.H=d}},useRef:function(e){return ot="useRef",D(),Ft(),rs(e)},useState:function(e){ot="useState",D(),Ft();var a=rt.H;rt.H=Dr;try{return vu(e)}finally{rt.H=a}},useDebugValue:function(){ot="useDebugValue",D(),Ft()},useDeferredValue:function(e,a){return ot="useDeferredValue",D(),Ft(),$c(e,a)},useTransition:function(){return ot="useTransition",D(),Ft(),od()},useSyncExternalStore:function(e,a,o){return ot="useSyncExternalStore",D(),Ft(),Wh(e,a,o)},useId:function(){return ot="useId",D(),Ft(),nf()},useFormState:function(e,a){return ot="useFormState",D(),Ft(),Nn(e,a)},useActionState:function(e,a){return ot="useActionState",D(),Ft(),Nn(e,a)},useOptimistic:function(e){return ot="useOptimistic",D(),Ft(),ed(e)},useMemoCache:function(e){return D(),eo(e)},useHostTransitionStatus:lr,useCacheRefresh:function(){return ot="useCacheRefresh",Ft(),rr()},useEffectEvent:function(e){return ot="useEffectEvent",D(),Ft(),ar(e)}},Ll={readContext:function(e){return A(),Ve(e)},use:function(e){return D(),Ce(e)},useCallback:function(e,a){return ot="useCallback",D(),Et(),no(e,a)},useContext:function(e){return ot="useContext",D(),Et(),Ve(e)},useEffect:function(e,a){ot="useEffect",D(),Et(),Da(2048,xi,e,a)},useImperativeHandle:function(e,a,o){return ot="useImperativeHandle",D(),Et(),sr(e,a,o)},useInsertionEffect:function(e,a){return ot="useInsertionEffect",D(),Et(),Da(4,_i,e,a)},useLayoutEffect:function(e,a){return ot="useLayoutEffect",D(),Et(),Da(4,ys,e,a)},useMemo:function(e,a){ot="useMemo",D(),Et();var o=rt.H;rt.H=Ll;try{return Su(e,a)}finally{rt.H=o}},useReducer:function(e,a,o){ot="useReducer",D(),Et();var d=rt.H;rt.H=Ll;try{return ws(e,a,o)}finally{rt.H=d}},useRef:function(){return ot="useRef",D(),Et(),De().memoizedState},useState:function(){ot="useState",D(),Et();var e=rt.H;rt.H=Ll;try{return ws(ss)}finally{rt.H=e}},useDebugValue:function(){ot="useDebugValue",D(),Et()},useDeferredValue:function(e,a){return ot="useDeferredValue",D(),Et(),rd(e,a)},useTransition:function(){return ot="useTransition",D(),Et(),wg()},useSyncExternalStore:function(e,a,o){return ot="useSyncExternalStore",D(),Et(),nr(e,a,o)},useId:function(){return ot="useId",D(),Et(),De().memoizedState},useFormState:function(e){return ot="useFormState",D(),Et(),Wc(e)},useActionState:function(e){return ot="useActionState",D(),Et(),Wc(e)},useOptimistic:function(e,a){return ot="useOptimistic",D(),Et(),W0(e,a)},useMemoCache:function(e){return D(),eo(e)},useHostTransitionStatus:lr,useCacheRefresh:function(){return ot="useCacheRefresh",Et(),De().memoizedState},useEffectEvent:function(e){return ot="useEffectEvent",D(),Et(),ir(e)}},e2={readContext:function(e){return A(),Ve(e)},use:function(e){return D(),Ce(e)},useCallback:function(e,a){return ot="useCallback",D(),Et(),no(e,a)},useContext:function(e){return ot="useContext",D(),Et(),Ve(e)},useEffect:function(e,a){ot="useEffect",D(),Et(),Da(2048,xi,e,a)},useImperativeHandle:function(e,a,o){return ot="useImperativeHandle",D(),Et(),sr(e,a,o)},useInsertionEffect:function(e,a){return ot="useInsertionEffect",D(),Et(),Da(4,_i,e,a)},useLayoutEffect:function(e,a){return ot="useLayoutEffect",D(),Et(),Da(4,ys,e,a)},useMemo:function(e,a){ot="useMemo",D(),Et();var o=rt.H;rt.H=Ll;try{return Su(e,a)}finally{rt.H=o}},useReducer:function(e,a,o){ot="useReducer",D(),Et();var d=rt.H;rt.H=Ll;try{return yu(e,a,o)}finally{rt.H=d}},useRef:function(){return ot="useRef",D(),Et(),De().memoizedState},useState:function(){ot="useState",D(),Et();var e=rt.H;rt.H=Ll;try{return yu(ss)}finally{rt.H=e}},useDebugValue:function(){ot="useDebugValue",D(),Et()},useDeferredValue:function(e,a){return ot="useDeferredValue",D(),Et(),nm(e,a)},useTransition:function(){return ot="useTransition",D(),Et(),xl()},useSyncExternalStore:function(e,a,o){return ot="useSyncExternalStore",D(),Et(),nr(e,a,o)},useId:function(){return ot="useId",D(),Et(),De().memoizedState},useFormState:function(e){return ot="useFormState",D(),Et(),Ri(e)},useActionState:function(e){return ot="useActionState",D(),Et(),Ri(e)},useOptimistic:function(e,a){return ot="useOptimistic",D(),Et(),$0(e,a)},useMemoCache:function(e){return D(),eo(e)},useHostTransitionStatus:lr,useCacheRefresh:function(){return ot="useCacheRefresh",Et(),De().memoizedState},useEffectEvent:function(e){return ot="useEffectEvent",D(),Et(),ir(e)}};var CE={},_E=new Set,xE=new Set,DE=new Set,AE=new Set,ME=new Set,NE=new Set,OE=new Set,RE=new Set,zE=new Set,HE=new Set;Object.freeze(CE);var Q3={enqueueSetState:function(e,a,o){e=e._reactInternals;var d=vi(e),y=El(d);y.payload=a,o!=null&&(sm(o),y.callback=o),a=Ni(e,y,d),a!==null&&(Wi(d,"this.setState()",e),Ie(a,e,d),pu(a,e,d))},enqueueReplaceState:function(e,a,o){e=e._reactInternals;var d=vi(e),y=El(d);y.tag=mE,y.payload=a,o!=null&&(sm(o),y.callback=o),a=Ni(e,y,d),a!==null&&(Wi(d,"this.replaceState()",e),Ie(a,e,d),pu(a,e,d))},enqueueForceUpdate:function(e,a){e=e._reactInternals;var o=vi(e),d=El(o);d.tag=gE,a!=null&&(sm(a),d.callback=a),a=Ni(e,d,o),a!==null&&(Wi(o,"this.forceUpdate()",e),Ie(a,e,o),pu(a,e,o))}},Cp=null,Z3=null,J3=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),la=!1,wE={},UE={},BE={},VE={},_p=!1,GE={},n2={},F3={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},jE=!1,LE=null;LE=new Set;var wo=!1,ra=!1,k3=!1,PE=typeof WeakSet=="function"?WeakSet:Set,Oa=null,xp=null,Dp=null,oa=null,Yi=!1,Pl=null,Ea=!1,Ap=8192,dj={getCacheForType:function(e){var a=Ve(Un),o=a.data.get(e);return o===void 0&&(o=e(),a.data.set(e,o)),o},cacheSignal:function(){return Ve(Un).controller.signal},getOwner:function(){return xo}},a2=0,i2=1,s2=2,l2=3,r2=4;if(typeof Symbol=="function"&&Symbol.for){var h1=Symbol.for;a2=h1("selector.component"),i2=h1("selector.has_pseudo_class"),s2=h1("selector.role"),l2=h1("selector.test_id"),r2=h1("selector.text")}var o2=[],pj=typeof WeakMap=="function"?WeakMap:Map,Ra=0,za=2,al=4,Uo=0,d1=1,Kf=2,u2=3,tc=4,c2=6,YE=5,de=Ra,Xe=null,ie=null,ee=0,qi=0,f2=1,Qf=2,p1=3,qE=4,I3=5,m1=6,h2=7,W3=8,Zf=9,je=qi,vs=null,ec=!1,Mp=!1,$3=!1,Ar=0,bn=Uo,nc=0,ac=0,t5=0,Xi=0,Jf=0,g1=null,Di=null,d2=!1,p2=0,XE=0,KE=300,y1=1/0,e5=500,v1=null,Kn=null,ic=null,m2=0,n5=1,a5=2,QE=3,sc=0,ZE=1,JE=2,FE=3,kE=4,g2=5,ua=0,lc=null,Np=null,Yl=0,i5=0,s5=-0,l5=null,IE=null,WE=null,ql=m2,$E=null,mj=50,S1=0,r5=null,o5=!1,y2=!1,gj=50,Ff=0,b1=null,Op=!1,v2=null,tT=!1,eT=new Set,yj={},il=null,Rp=null,nT=!1;try{var aT=Object.preventExtensions({})}catch{nT=!0}var iT=!1,sT={},lT=null,rT=null,oT=null,uT=null,cT=null,fT=null,hT=null,dT=null,pT=null,mT=null;return lT=function(e,a,o,d){a=i(e,a),a!==null&&(o=s(a.memoizedState,o,0,d),a.memoizedState=o,a.baseState=o,e.memoizedProps=Me({},e.memoizedProps),o=_a(e,2),o!==null&&Ie(o,e,2))},rT=function(e,a,o){a=i(e,a),a!==null&&(o=f(a.memoizedState,o,0),a.memoizedState=o,a.baseState=o,e.memoizedProps=Me({},e.memoizedProps),o=_a(e,2),o!==null&&Ie(o,e,2))},oT=function(e,a,o,d){a=i(e,a),a!==null&&(o=u(a.memoizedState,o,d),a.memoizedState=o,a.baseState=o,e.memoizedProps=Me({},e.memoizedProps),o=_a(e,2),o!==null&&Ie(o,e,2))},uT=function(e,a,o){e.pendingProps=s(e.memoizedProps,a,0,o),e.alternate&&(e.alternate.pendingProps=e.pendingProps),a=_a(e,2),a!==null&&Ie(a,e,2)},cT=function(e,a){e.pendingProps=f(e.memoizedProps,a,0),e.alternate&&(e.alternate.pendingProps=e.pendingProps),a=_a(e,2),a!==null&&Ie(a,e,2)},fT=function(e,a,o){e.pendingProps=u(e.memoizedProps,a,o),e.alternate&&(e.alternate.pendingProps=e.pendingProps),a=_a(e,2),a!==null&&Ie(a,e,2)},hT=function(e){var a=_a(e,2);a!==null&&Ie(a,e,2)},dT=function(e){var a=at(),o=_a(e,a);o!==null&&Ie(o,e,a)},pT=function(e){m=e},mT=function(e){p=e},ae.attemptContinuousHydration=function(e){if(e.tag===13||e.tag===31){var a=_a(e,67108864);a!==null&&Ie(a,e,67108864),Ou(e,67108864)}},ae.attemptHydrationAtCurrentPriority=function(e){if(e.tag===13||e.tag===31){var a=vi(e);a=xn(a);var o=_a(e,a);o!==null&&Ie(o,e,a),Ou(e,a)}},ae.attemptSynchronousHydration=function(e){switch(e.tag){case 3:if(e=e.stateNode,e.current.memoizedState.isDehydrated){var a=tt(e.pendingLanes);if(a!==0){for(e.pendingLanes|=2,e.entangledLanes|=2;a;){var o=1<<31-kn(a);e.entanglements[1]|=o,a&=~o}ja(e),(de&(za|al))===Ra&&(y1=fe()+e5,Wr(0))}}break;case 31:case 13:a=_a(e,2),a!==null&&Ie(a,e,2),yf(),Ou(e,2)}},ae.batchedUpdates=function(e,a){return e(a)},ae.createComponentSelector=function(e){return{$$typeof:a2,value:e}},ae.createContainer=function(e,a,o,d,y,v,C,M,B,q){return ho(e,a,!1,null,o,d,v,null,C,M,B,q)},ae.createHasPseudoClassSelector=function(e){return{$$typeof:i2,value:e}},ae.createHydrationContainer=function(e,a,o,d,y,v,C,M,B,q,ct,ht,yt,Vt){return e=ho(o,d,!0,e,y,v,M,Vt,B,q,ct,ht),e.context=My(null),o=e.current,d=vi(o),d=xn(d),y=El(d),y.callback=a??null,Ni(o,y,d),Wi(d,"hydrateRoot()",null),a=d,e.current.lanes=a,W(e,a),ja(e),e},ae.createPortal=function(e,a,o){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{ii(d);var y=!1}catch{y=!0}return y&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&d[Symbol.toStringTag]||d.constructor.name||"Object"),ii(d)),{$$typeof:zl,key:d==null?null:""+d,children:e,containerInfo:a,implementation:o}},ae.createRoleSelector=function(e){return{$$typeof:s2,value:e}},ae.createTestNameSelector=function(e){return{$$typeof:l2,value:e}},ae.createTextSelector=function(e){return{$$typeof:r2,value:e}},ae.defaultOnCaughtError=function(e){var a=Cp?"The above error occurred in the <"+Cp+"> component.":"The above error occurred in one of your React components.",o="React will try to recreate this component tree from scratch using the error boundary you provided, "+((Z3||"Anonymous")+".");typeof e=="object"&&e!==null&&typeof e.environmentName=="string"?yo("error",[`%o
|
|
204
|
+
Check the top-level render call using <`+d+">.");var C="";o!=null&&e!==o&&(d=null,typeof o.tag=="number"?d=J(o):typeof o.name=="string"&&(d=o.name),d&&(C=" It was passed a child from "+d+".")),wt(a,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',v,C)})}}};var Zf=Kc(!0),pE=Kc(!1),u1=1,wo=2,al=[],Ep=0,j3=0,mE=0,gE=1,yE=2,L3=3,tc=!1,vE=!1,P3=null,Y3=!1,Tp=St(null),Iy=St(0),vs=St(null),il=null,Cp=1,c1=2,Wn=St(0),Wy=0,sl=1,xi=2,Ss=4,Di=8,_p,SE=new Set,bE=new Set,q3=new Set,EE=new Set,Uo=0,Jt=null,Ze=null,la=null,$y=!1,xp=!1,Jf=!1,t2=0,f1=0,Bo=null,dj=0,pj=25,lt=null,ll=null,Vo=-1,h1=!1,d1={readContext:je,use:Ae,useCallback:vn,useContext:vn,useEffect:vn,useImperativeHandle:vn,useLayoutEffect:vn,useInsertionEffect:vn,useMemo:vn,useReducer:vn,useRef:vn,useState:vn,useDebugValue:vn,useDeferredValue:vn,useTransition:vn,useSyncExternalStore:vn,useId:vn,useHostTransitionStatus:vn,useFormState:vn,useActionState:vn,useOptimistic:vn,useMemoCache:vn,useCacheRefresh:vn};d1.useEffectEvent=vn;var X3=null,TE=null,K3=null,CE=null,zr=null,Kl=null,e2=null;X3={readContext:function(e){return je(e)},use:Ae,useCallback:function(e,a){return lt="useCallback",Wt(),ei(a),od(e,a)},useContext:function(e){return lt="useContext",Wt(),je(e)},useEffect:function(e,a){return lt="useEffect",Wt(),ei(a),ni(e,a)},useImperativeHandle:function(e,a,o){return lt="useImperativeHandle",Wt(),ei(o),rd(e,a,o)},useInsertionEffect:function(e,a){lt="useInsertionEffect",Wt(),ei(a),Ml(4,xi,e,a)},useLayoutEffect:function(e,a){return lt="useLayoutEffect",Wt(),ei(a),Nl(e,a)},useMemo:function(e,a){lt="useMemo",Wt(),ei(a);var o=st.H;st.H=zr;try{return ud(e,a)}finally{st.H=o}},useReducer:function(e,a,o){lt="useReducer",Wt();var d=st.H;st.H=zr;try{return td(e,a,o)}finally{st.H=d}},useRef:function(e){return lt="useRef",Wt(),us(e)},useState:function(e){lt="useState",Wt();var a=st.H;st.H=zr;try{return Su(e)}finally{st.H=a}},useDebugValue:function(){lt="useDebugValue",Wt()},useDeferredValue:function(e,a){return lt="useDeferredValue",Wt(),af(e,a)},useTransition:function(){return lt="useTransition",Wt(),fd()},useSyncExternalStore:function(e,a,o){return lt="useSyncExternalStore",Wt(),ed(e,a,o)},useId:function(){return lt="useId",Wt(),rf()},useFormState:function(e,a){return lt="useFormState",Wt(),yu(),On(e,a)},useActionState:function(e,a){return lt="useActionState",Wt(),On(e,a)},useOptimistic:function(e){return lt="useOptimistic",Wt(),id(e)},useHostTransitionStatus:hr,useMemoCache:so,useCacheRefresh:function(){return lt="useCacheRefresh",Wt(),dr()},useEffectEvent:function(e){return lt="useEffectEvent",Wt(),ur(e)}},TE={readContext:function(e){return je(e)},use:Ae,useCallback:function(e,a){return lt="useCallback",bt(),od(e,a)},useContext:function(e){return lt="useContext",bt(),je(e)},useEffect:function(e,a){return lt="useEffect",bt(),ni(e,a)},useImperativeHandle:function(e,a,o){return lt="useImperativeHandle",bt(),rd(e,a,o)},useInsertionEffect:function(e,a){lt="useInsertionEffect",bt(),Ml(4,xi,e,a)},useLayoutEffect:function(e,a){return lt="useLayoutEffect",bt(),Nl(e,a)},useMemo:function(e,a){lt="useMemo",bt();var o=st.H;st.H=zr;try{return ud(e,a)}finally{st.H=o}},useReducer:function(e,a,o){lt="useReducer",bt();var d=st.H;st.H=zr;try{return td(e,a,o)}finally{st.H=d}},useRef:function(e){return lt="useRef",bt(),us(e)},useState:function(e){lt="useState",bt();var a=st.H;st.H=zr;try{return Su(e)}finally{st.H=a}},useDebugValue:function(){lt="useDebugValue",bt()},useDeferredValue:function(e,a){return lt="useDeferredValue",bt(),af(e,a)},useTransition:function(){return lt="useTransition",bt(),fd()},useSyncExternalStore:function(e,a,o){return lt="useSyncExternalStore",bt(),ed(e,a,o)},useId:function(){return lt="useId",bt(),rf()},useActionState:function(e,a){return lt="useActionState",bt(),On(e,a)},useFormState:function(e,a){return lt="useFormState",bt(),yu(),On(e,a)},useOptimistic:function(e){return lt="useOptimistic",bt(),id(e)},useHostTransitionStatus:hr,useMemoCache:so,useCacheRefresh:function(){return lt="useCacheRefresh",bt(),dr()},useEffectEvent:function(e){return lt="useEffectEvent",bt(),ur(e)}},K3={readContext:function(e){return je(e)},use:Ae,useCallback:function(e,a){return lt="useCallback",bt(),lo(e,a)},useContext:function(e){return lt="useContext",bt(),je(e)},useEffect:function(e,a){lt="useEffect",bt(),Aa(2048,Di,e,a)},useImperativeHandle:function(e,a,o){return lt="useImperativeHandle",bt(),fr(e,a,o)},useInsertionEffect:function(e,a){return lt="useInsertionEffect",bt(),Aa(4,xi,e,a)},useLayoutEffect:function(e,a){return lt="useLayoutEffect",bt(),Aa(4,Ss,e,a)},useMemo:function(e,a){lt="useMemo",bt();var o=st.H;st.H=Kl;try{return bu(e,a)}finally{st.H=o}},useReducer:function(e,a,o){lt="useReducer",bt();var d=st.H;st.H=Kl;try{return Gs(e,a,o)}finally{st.H=d}},useRef:function(){return lt="useRef",bt(),Ne().memoizedState},useState:function(){lt="useState",bt();var e=st.H;st.H=Kl;try{return Gs(rs)}finally{st.H=e}},useDebugValue:function(){lt="useDebugValue",bt()},useDeferredValue:function(e,a){return lt="useDeferredValue",bt(),cd(e,a)},useTransition:function(){return lt="useTransition",bt(),wg()},useSyncExternalStore:function(e,a,o){return lt="useSyncExternalStore",bt(),or(e,a,o)},useId:function(){return lt="useId",bt(),Ne().memoizedState},useFormState:function(e){return lt="useFormState",bt(),yu(),nf(e)},useActionState:function(e){return lt="useActionState",bt(),nf(e)},useOptimistic:function(e,a){return lt="useOptimistic",bt(),tm(e,a)},useHostTransitionStatus:hr,useMemoCache:so,useCacheRefresh:function(){return lt="useCacheRefresh",bt(),Ne().memoizedState},useEffectEvent:function(e){return lt="useEffectEvent",bt(),cr(e)}},CE={readContext:function(e){return je(e)},use:Ae,useCallback:function(e,a){return lt="useCallback",bt(),lo(e,a)},useContext:function(e){return lt="useContext",bt(),je(e)},useEffect:function(e,a){lt="useEffect",bt(),Aa(2048,Di,e,a)},useImperativeHandle:function(e,a,o){return lt="useImperativeHandle",bt(),fr(e,a,o)},useInsertionEffect:function(e,a){return lt="useInsertionEffect",bt(),Aa(4,xi,e,a)},useLayoutEffect:function(e,a){return lt="useLayoutEffect",bt(),Aa(4,Ss,e,a)},useMemo:function(e,a){lt="useMemo",bt();var o=st.H;st.H=e2;try{return bu(e,a)}finally{st.H=o}},useReducer:function(e,a,o){lt="useReducer",bt();var d=st.H;st.H=e2;try{return vu(e,a,o)}finally{st.H=d}},useRef:function(){return lt="useRef",bt(),Ne().memoizedState},useState:function(){lt="useState",bt();var e=st.H;st.H=e2;try{return vu(rs)}finally{st.H=e}},useDebugValue:function(){lt="useDebugValue",bt()},useDeferredValue:function(e,a){return lt="useDeferredValue",bt(),im(e,a)},useTransition:function(){return lt="useTransition",bt(),Ol()},useSyncExternalStore:function(e,a,o){return lt="useSyncExternalStore",bt(),or(e,a,o)},useId:function(){return lt="useId",bt(),Ne().memoizedState},useFormState:function(e){return lt="useFormState",bt(),yu(),wi(e)},useActionState:function(e){return lt="useActionState",bt(),wi(e)},useOptimistic:function(e,a){return lt="useOptimistic",bt(),em(e,a)},useHostTransitionStatus:hr,useMemoCache:so,useCacheRefresh:function(){return lt="useCacheRefresh",bt(),Ne().memoizedState},useEffectEvent:function(e){return lt="useEffectEvent",bt(),cr(e)}},zr={readContext:function(e){return A(),je(e)},use:function(e){return D(),Ae(e)},useCallback:function(e,a){return lt="useCallback",D(),Wt(),od(e,a)},useContext:function(e){return lt="useContext",D(),Wt(),je(e)},useEffect:function(e,a){return lt="useEffect",D(),Wt(),ni(e,a)},useImperativeHandle:function(e,a,o){return lt="useImperativeHandle",D(),Wt(),rd(e,a,o)},useInsertionEffect:function(e,a){lt="useInsertionEffect",D(),Wt(),Ml(4,xi,e,a)},useLayoutEffect:function(e,a){return lt="useLayoutEffect",D(),Wt(),Nl(e,a)},useMemo:function(e,a){lt="useMemo",D(),Wt();var o=st.H;st.H=zr;try{return ud(e,a)}finally{st.H=o}},useReducer:function(e,a,o){lt="useReducer",D(),Wt();var d=st.H;st.H=zr;try{return td(e,a,o)}finally{st.H=d}},useRef:function(e){return lt="useRef",D(),Wt(),us(e)},useState:function(e){lt="useState",D(),Wt();var a=st.H;st.H=zr;try{return Su(e)}finally{st.H=a}},useDebugValue:function(){lt="useDebugValue",D(),Wt()},useDeferredValue:function(e,a){return lt="useDeferredValue",D(),Wt(),af(e,a)},useTransition:function(){return lt="useTransition",D(),Wt(),fd()},useSyncExternalStore:function(e,a,o){return lt="useSyncExternalStore",D(),Wt(),ed(e,a,o)},useId:function(){return lt="useId",D(),Wt(),rf()},useFormState:function(e,a){return lt="useFormState",D(),Wt(),On(e,a)},useActionState:function(e,a){return lt="useActionState",D(),Wt(),On(e,a)},useOptimistic:function(e){return lt="useOptimistic",D(),Wt(),id(e)},useMemoCache:function(e){return D(),so(e)},useHostTransitionStatus:hr,useCacheRefresh:function(){return lt="useCacheRefresh",Wt(),dr()},useEffectEvent:function(e){return lt="useEffectEvent",D(),Wt(),ur(e)}},Kl={readContext:function(e){return A(),je(e)},use:function(e){return D(),Ae(e)},useCallback:function(e,a){return lt="useCallback",D(),bt(),lo(e,a)},useContext:function(e){return lt="useContext",D(),bt(),je(e)},useEffect:function(e,a){lt="useEffect",D(),bt(),Aa(2048,Di,e,a)},useImperativeHandle:function(e,a,o){return lt="useImperativeHandle",D(),bt(),fr(e,a,o)},useInsertionEffect:function(e,a){return lt="useInsertionEffect",D(),bt(),Aa(4,xi,e,a)},useLayoutEffect:function(e,a){return lt="useLayoutEffect",D(),bt(),Aa(4,Ss,e,a)},useMemo:function(e,a){lt="useMemo",D(),bt();var o=st.H;st.H=Kl;try{return bu(e,a)}finally{st.H=o}},useReducer:function(e,a,o){lt="useReducer",D(),bt();var d=st.H;st.H=Kl;try{return Gs(e,a,o)}finally{st.H=d}},useRef:function(){return lt="useRef",D(),bt(),Ne().memoizedState},useState:function(){lt="useState",D(),bt();var e=st.H;st.H=Kl;try{return Gs(rs)}finally{st.H=e}},useDebugValue:function(){lt="useDebugValue",D(),bt()},useDeferredValue:function(e,a){return lt="useDeferredValue",D(),bt(),cd(e,a)},useTransition:function(){return lt="useTransition",D(),bt(),wg()},useSyncExternalStore:function(e,a,o){return lt="useSyncExternalStore",D(),bt(),or(e,a,o)},useId:function(){return lt="useId",D(),bt(),Ne().memoizedState},useFormState:function(e){return lt="useFormState",D(),bt(),nf(e)},useActionState:function(e){return lt="useActionState",D(),bt(),nf(e)},useOptimistic:function(e,a){return lt="useOptimistic",D(),bt(),tm(e,a)},useMemoCache:function(e){return D(),so(e)},useHostTransitionStatus:hr,useCacheRefresh:function(){return lt="useCacheRefresh",bt(),Ne().memoizedState},useEffectEvent:function(e){return lt="useEffectEvent",D(),bt(),cr(e)}},e2={readContext:function(e){return A(),je(e)},use:function(e){return D(),Ae(e)},useCallback:function(e,a){return lt="useCallback",D(),bt(),lo(e,a)},useContext:function(e){return lt="useContext",D(),bt(),je(e)},useEffect:function(e,a){lt="useEffect",D(),bt(),Aa(2048,Di,e,a)},useImperativeHandle:function(e,a,o){return lt="useImperativeHandle",D(),bt(),fr(e,a,o)},useInsertionEffect:function(e,a){return lt="useInsertionEffect",D(),bt(),Aa(4,xi,e,a)},useLayoutEffect:function(e,a){return lt="useLayoutEffect",D(),bt(),Aa(4,Ss,e,a)},useMemo:function(e,a){lt="useMemo",D(),bt();var o=st.H;st.H=Kl;try{return bu(e,a)}finally{st.H=o}},useReducer:function(e,a,o){lt="useReducer",D(),bt();var d=st.H;st.H=Kl;try{return vu(e,a,o)}finally{st.H=d}},useRef:function(){return lt="useRef",D(),bt(),Ne().memoizedState},useState:function(){lt="useState",D(),bt();var e=st.H;st.H=Kl;try{return vu(rs)}finally{st.H=e}},useDebugValue:function(){lt="useDebugValue",D(),bt()},useDeferredValue:function(e,a){return lt="useDeferredValue",D(),bt(),im(e,a)},useTransition:function(){return lt="useTransition",D(),bt(),Ol()},useSyncExternalStore:function(e,a,o){return lt="useSyncExternalStore",D(),bt(),or(e,a,o)},useId:function(){return lt="useId",D(),bt(),Ne().memoizedState},useFormState:function(e){return lt="useFormState",D(),bt(),wi(e)},useActionState:function(e){return lt="useActionState",D(),bt(),wi(e)},useOptimistic:function(e,a){return lt="useOptimistic",D(),bt(),em(e,a)},useMemoCache:function(e){return D(),so(e)},useHostTransitionStatus:hr,useCacheRefresh:function(){return lt="useCacheRefresh",bt(),Ne().memoizedState},useEffectEvent:function(e){return lt="useEffectEvent",D(),bt(),cr(e)}};var _E={},xE=new Set,DE=new Set,AE=new Set,ME=new Set,NE=new Set,OE=new Set,RE=new Set,zE=new Set,HE=new Set,wE=new Set;Object.freeze(_E);var Q3={enqueueSetState:function(e,a,o){e=e._reactInternals;var d=Si(e),y=Dl(d);y.payload=a,o!=null&&(rm(o),y.callback=o),a=zi(e,y,d),a!==null&&(ts(d,"this.setState()",e),en(a,e,d),mu(a,e,d))},enqueueReplaceState:function(e,a,o){e=e._reactInternals;var d=Si(e),y=Dl(d);y.tag=gE,y.payload=a,o!=null&&(rm(o),y.callback=o),a=zi(e,y,d),a!==null&&(ts(d,"this.replaceState()",e),en(a,e,d),mu(a,e,d))},enqueueForceUpdate:function(e,a){e=e._reactInternals;var o=Si(e),d=Dl(o);d.tag=yE,a!=null&&(rm(a),d.callback=a),a=zi(e,d,o),a!==null&&(ts(o,"this.forceUpdate()",e),en(a,e,o),mu(a,e,o))}},Dp=null,Z3=null,J3=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),ra=!1,UE={},BE={},VE={},GE={},Ap=!1,jE={},n2={},F3={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},LE=!1,PE=null;PE=new Set;var Go=!1,oa=!1,k3=!1,YE=typeof WeakSet=="function"?WeakSet:Set,Ra=null,Mp=null,Np=null,ua=null,Ki=!1,Ql=null,Ea=!1,Op=8192,mj={getCacheForType:function(e){var a=je(Bn),o=a.data.get(e);return o===void 0&&(o=e(),a.data.set(e,o)),o},cacheSignal:function(){return je(Bn).controller.signal},getOwner:function(){return No}},a2=0,i2=1,s2=2,l2=3,r2=4;if(typeof Symbol=="function"&&Symbol.for){var p1=Symbol.for;a2=p1("selector.component"),i2=p1("selector.has_pseudo_class"),s2=p1("selector.role"),l2=p1("selector.test_id"),r2=p1("selector.text")}var o2=[],gj=typeof WeakMap=="function"?WeakMap:Map,za=0,Ha=2,rl=4,jo=0,m1=1,Ff=2,u2=3,ec=4,c2=6,qE=5,ge=za,Je=null,oe=null,ie=0,Qi=0,f2=1,kf=2,g1=3,XE=4,I3=5,y1=6,h2=7,W3=8,If=9,Pe=Qi,bs=null,nc=!1,Rp=!1,$3=!1,Hr=0,Tn=jo,ac=0,ic=0,t5=0,Zi=0,Wf=0,v1=null,Ai=null,d2=!1,p2=0,KE=0,QE=300,S1=1/0,e5=500,b1=null,Kn=null,sc=null,m2=0,n5=1,a5=2,ZE=3,lc=0,JE=1,FE=2,kE=3,IE=4,g2=5,ca=0,rc=null,zp=null,Zl=0,i5=0,s5=-0,l5=null,WE=null,$E=null,Jl=m2,tT=null,yj=50,E1=0,r5=null,o5=!1,y2=!1,vj=50,$f=0,T1=null,Hp=!1,v2=null,eT=!1,nT=new Set,Sj={},ol=null,wp=null,aT=!1;try{var iT=Object.preventExtensions({})}catch{aT=!0}var sT=!1,lT={},rT=null,oT=null,uT=null,cT=null,fT=null,hT=null,dT=null,pT=null,mT=null,gT=null;return rT=function(e,a,o,d){a=i(e,a),a!==null&&(o=s(a.memoizedState,o,0,d),a.memoizedState=o,a.baseState=o,e.memoizedProps=Re({},e.memoizedProps),o=xa(e,2),o!==null&&en(o,e,2))},oT=function(e,a,o){a=i(e,a),a!==null&&(o=f(a.memoizedState,o,0),a.memoizedState=o,a.baseState=o,e.memoizedProps=Re({},e.memoizedProps),o=xa(e,2),o!==null&&en(o,e,2))},uT=function(e,a,o,d){a=i(e,a),a!==null&&(o=u(a.memoizedState,o,d),a.memoizedState=o,a.baseState=o,e.memoizedProps=Re({},e.memoizedProps),o=xa(e,2),o!==null&&en(o,e,2))},cT=function(e,a,o){e.pendingProps=s(e.memoizedProps,a,0,o),e.alternate&&(e.alternate.pendingProps=e.pendingProps),a=xa(e,2),a!==null&&en(a,e,2)},fT=function(e,a){e.pendingProps=f(e.memoizedProps,a,0),e.alternate&&(e.alternate.pendingProps=e.pendingProps),a=xa(e,2),a!==null&&en(a,e,2)},hT=function(e,a,o){e.pendingProps=u(e.memoizedProps,a,o),e.alternate&&(e.alternate.pendingProps=e.pendingProps),a=xa(e,2),a!==null&&en(a,e,2)},dT=function(e){var a=xa(e,2);a!==null&&en(a,e,2)},pT=function(e){var a=pt(),o=xa(e,a);o!==null&&en(o,e,a)},mT=function(e){m=e},gT=function(e){p=e},re.attemptContinuousHydration=function(e){if(e.tag===13||e.tag===31){var a=xa(e,67108864);a!==null&&en(a,e,67108864),Ru(e,67108864)}},re.attemptHydrationAtCurrentPriority=function(e){if(e.tag===13||e.tag===31){var a=Si(e);a=Vt(a);var o=xa(e,a);o!==null&&en(o,e,a),Ru(e,a)}},re.attemptSynchronousHydration=function(e){switch(e.tag){case 3:if(e=e.stateNode,e.current.memoizedState.isDehydrated){var a=tt(e.pendingLanes);if(a!==0){for(e.pendingLanes|=2,e.entangledLanes|=2;a;){var o=1<<31-In(a);e.entanglements[1]|=o,a&=~o}ja(e),(ge&(Ha|rl))===za&&(S1=pe()+e5,no(0))}}break;case 31:case 13:a=xa(e,2),a!==null&&en(a,e,2),Ef(),Ru(e,2)}},re.batchedUpdates=function(e,a){return e(a)},re.createComponentSelector=function(e){return{$$typeof:a2,value:e}},re.createContainer=function(e,a,o,d,y,v,C,M,B,q){return yo(e,a,!1,null,o,d,v,null,C,M,B,q)},re.createHasPseudoClassSelector=function(e){return{$$typeof:i2,value:e}},re.createHydrationContainer=function(e,a,o,d,y,v,C,M,B,q,ot,ct,gt,jt){return e=yo(o,d,!0,e,y,v,M,jt,B,q,ot,ct),e.context=My(null),o=e.current,d=Si(o),d=Vt(d),y=Dl(d),y.callback=a??null,zi(o,y,d),ts(d,"hydrateRoot()",null),a=d,e.current.lanes=a,$(e,a),ja(e),e},re.createPortal=function(e,a,o){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{ii(d);var y=!1}catch{y=!0}return y&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&d[Symbol.toStringTag]||d.constructor.name||"Object"),ii(d)),{$$typeof:Vl,key:d==null?null:""+d,children:e,containerInfo:a,implementation:o}},re.createRoleSelector=function(e){return{$$typeof:s2,value:e}},re.createTestNameSelector=function(e){return{$$typeof:l2,value:e}},re.createTextSelector=function(e){return{$$typeof:r2,value:e}},re.defaultOnCaughtError=function(e){var a=Dp?"The above error occurred in the <"+Dp+"> component.":"The above error occurred in one of your React components.",o="React will try to recreate this component tree from scratch using the error boundary you provided, "+((Z3||"Anonymous")+".");typeof e=="object"&&e!==null&&typeof e.environmentName=="string"?Eo("error",[`%o
|
|
205
205
|
|
|
206
206
|
%s
|
|
207
207
|
|
|
@@ -211,24 +211,24 @@ Check the top-level render call using <`+d+">.");var C="";o!=null&&e!==o&&(d=nul
|
|
|
211
211
|
%s
|
|
212
212
|
|
|
213
213
|
%s
|
|
214
|
-
`,e,a,o)},
|
|
214
|
+
`,e,a,o)},re.defaultOnRecoverableError=function(e){B9(e)},re.defaultOnUncaughtError=function(e){B9(e),console.warn(`%s
|
|
215
215
|
|
|
216
216
|
%s
|
|
217
|
-
`,
|
|
218
|
-
Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)},
|
|
217
|
+
`,Dp?"An error occurred in the <"+Dp+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
|
|
218
|
+
Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)},re.deferredUpdates=function(e){var a=st.T,o=ri();try{return Hn(32),st.T=null,e()}finally{Hn(o),st.T=a}},re.discreteUpdates=function(e,a,o,d,y){var v=st.T,C=ri();try{return Hn(2),st.T=null,e(a,o,d,y)}finally{Hn(C),st.T=v,ge===za&&(S1=pe()+e5)}},re.findAllNodes=Od,re.findBoundingRects=function(e,a){if(!ms)throw Error("Test selector API is not supported by this renderer.");a=Od(e,a),e=[];for(var o=0;o<a.length;o++)e.push(Er(a[o]));for(a=e.length-1;0<a;a--){o=e[a];for(var d=o.x,y=d+o.width,v=o.y,C=v+o.height,M=a-1;0<=M;M--)if(a!==M){var B=e[M],q=B.x,ot=q+B.width,ct=B.y,gt=ct+B.height;if(d>=q&&v>=ct&&y<=ot&&C<=gt){e.splice(a,1);break}else if(d!==q||o.width!==B.width||gt<v||ct>C){if(!(v!==ct||o.height!==B.height||ot<d||q>y)){q>d&&(B.width+=q-d,B.x=d),ot<y&&(B.width=y-q),e.splice(a,1);break}}else{ct>v&&(B.height+=ct-v,B.y=v),gt<C&&(B.height=C-ct),e.splice(a,1);break}}}return e},re.findHostInstance=function(e){var a=e._reactInternals;if(a===void 0)throw typeof e.render=="function"?Error("Unable to find node on an unmounted component."):(e=Object.keys(e).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+e));return e=k(a),e===null?null:Xa(e.stateNode)},re.findHostInstanceWithNoPortals=function(e){return e=G(e),e=e!==null?ft(e):null,e===null?null:Xa(e.stateNode)},re.findHostInstanceWithWarning=function(e,a){var o=e._reactInternals;if(o===void 0)throw typeof e.render=="function"?Error("Unable to find node on an unmounted component."):(e=Object.keys(e).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+e));if(e=k(o),e===null)return null;if(e.mode&8){var d=J(o)||"Component";lT[d]||(lT[d]=!0,wt(e,function(){o.mode&8?console.error("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://react.dev/link/strict-mode-find-node",a,a,d):console.error("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://react.dev/link/strict-mode-find-node",a,a,d)}))}return Xa(e.stateNode)},re.flushPassiveEffects=Mu,re.flushSyncFromReconciler=function(e){var a=ge;ge|=1;var o=st.T,d=ri();try{if(Hn(2),st.T=null,e)return e()}finally{Hn(d),st.T=o,ge=a,(ge&(Ha|rl))===za&&no(0)}},re.flushSyncWork=Ef,re.focusWithin=function(e,a){if(!ms)throw Error("Test selector API is not supported by this renderer.");for(e=Dm(e),a=iy(e,a),a=Array.from(a),e=0;e<a.length;){var o=a[e++],d=o.tag;if(!ks(o)){if((d===5||d===26||d===27)&&bi(o.stateNode))return!0;for(o=o.child;o!==null;)a.push(o),o=o.sibling}}return!1},re.getFindAllNodesFailureDescription=function(e,a){if(!ms)throw Error("Test selector API is not supported by this renderer.");var o=0,d=[];e=[Dm(e),0];for(var y=0;y<e.length;){var v=e[y++],C=v.tag,M=e[y++],B=a[M];if((C!==5&&C!==26&&C!==27||!ks(v))&&(Am(v,B)&&(d.push(Nd(B)),M++,M>o&&(o=M)),M<a.length))for(v=v.child;v!==null;)e.push(v,M),v=v.sibling}if(o<a.length){for(e=[];o<a.length;o++)e.push(Nd(a[o]));return`findAllNodes was able to match part of the selector:
|
|
219
219
|
`+(d.join(" > ")+`
|
|
220
220
|
|
|
221
221
|
No matching component was found for:
|
|
222
|
-
`)+e.join(" > ")}return null},
|
|
222
|
+
`)+e.join(" > ")}return null},re.getPublicRootInstance=function(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 27:case 5:return Xa(e.child.stateNode);default:return e.child.stateNode}},re.injectIntoDevTools=function(){var e={bundleType:1,version:Gi,rendererPackageName:ji,currentDispatcherRef:st,reconcilerVersion:"19.2.0"};return Gl!==null&&(e.rendererConfig=Gl),e.overrideHookState=rT,e.overrideHookStateDeletePath=oT,e.overrideHookStateRenamePath=uT,e.overrideProps=cT,e.overridePropsDeletePath=fT,e.overridePropsRenamePath=hT,e.scheduleUpdate=dT,e.scheduleRetry=pT,e.setErrorHandler=mT,e.setSuspenseHandler=gT,e.scheduleRefresh=_,e.scheduleRoot=b,e.setRefreshHandler=x,e.getCurrentFiber=Ld,Oe(e)},re.isAlreadyRendering=Tf,re.observeVisibleRects=function(e,a,o,d){function y(){var q=Od(e,a);v.forEach(function(ot){0>q.indexOf(ot)&&B(ot)}),q.forEach(function(ot){0>v.indexOf(ot)&&M(ot)})}if(!ms)throw Error("Test selector API is not supported by this renderer.");var v=Od(e,a);o=Xi(v,o,d);var C=o.disconnect,M=o.observe,B=o.unobserve;return o2.push(y),{disconnect:function(){var q=o2.indexOf(y);0<=q&&o2.splice(q,1),C()}}},re.shouldError=function(e){return m(e)},re.shouldSuspend=function(e){return p(e)},re.startHostTransition=function(e,a,o,d){if(e.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var y=sm(e).queue;xg(e),Pa(e,y,a,Pi,o===null?N:function(){st.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var v=sm(e);return v.next===null&&(v=e.alternate.memoizedState),Eu(e,v.next.queue,{},Si(e)),o(d)})},re.updateContainer=function(e,a,o,d){var y=a.current,v=Si(y);return xf(y,v,e,a,o,d),v},re.updateContainerSync=Ny,re},n.exports.default=n.exports,Object.defineProperty(n.exports,"__esModule",{value:!0}))})(F2)),F2.exports}var y4;function Z_(){return y4||(y4=1,process.env.NODE_ENV==="production"?L1.exports=K_():L1.exports=Q_()),L1.exports}var J_=Z_();const F_=X2(J_);var Y1={exports:{}},Gr={};var v4;function k_(){return v4||(v4=1,Gr.ConcurrentRoot=1,Gr.ContinuousEventPriority=8,Gr.DefaultEventPriority=32,Gr.DiscreteEventPriority=2,Gr.IdleEventPriority=268435456,Gr.LegacyRoot=0,Gr.NoEventPriority=0),Gr}var jr={};var S4;function I_(){return S4||(S4=1,process.env.NODE_ENV!=="production"&&(jr.ConcurrentRoot=1,jr.ContinuousEventPriority=8,jr.DefaultEventPriority=32,jr.DiscreteEventPriority=2,jr.IdleEventPriority=268435456,jr.LegacyRoot=0,jr.NoEventPriority=0)),jr}var b4;function W_(){return b4||(b4=1,process.env.NODE_ENV==="production"?Y1.exports=k_():Y1.exports=I_()),Y1.exports}var q1=W_();const E4={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let T4=!1,C4=!1;const X1=".react-konva-event",$_=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.
|
|
223
223
|
Position of a node will be changed during drag&drop, so you should update state of the react app as well.
|
|
224
224
|
Consider to add onDragMove or onDragEnd events.
|
|
225
225
|
For more info see: https://github.com/konvajs/react-konva/issues/256
|
|
226
|
-
|
|
226
|
+
`,tx=`ReactKonva: You are using "zIndex" attribute for a Konva node.
|
|
227
227
|
react-konva may get confused with ordering. Just define correct order of elements in your render function of a component.
|
|
228
228
|
For more info see: https://github.com/konvajs/react-konva/issues/194
|
|
229
|
-
`,tx={};function q1(n,t,i=tx){if(!T4&&"zIndex"in t&&(console.warn($_),T4=!0),!C4&&t.draggable){var s=t.x!==void 0||t.y!==void 0,u=t.onDragEnd||t.onDragMove;s&&!u&&(console.warn(W_),C4=!0)}for(var c in i)if(!E4[c]){var f=c.slice(0,2)==="on",p=i[c]!==t[c];if(f&&p){var m=c.substr(2).toLowerCase();m.substr(0,7)==="content"&&(m="content"+m.substr(7,1).toUpperCase()+m.substr(8)),n.off(m,i[c])}var S=!t.hasOwnProperty(c);S&&n.setAttr(c,void 0)}var b=t._useStrictMode,_={},x=!1;const D={};for(var c in t)if(!E4[c]){var f=c.slice(0,2)==="on",A=i[c]!==t[c];if(f&&A){var m=c.substr(2).toLowerCase();m.substr(0,7)==="content"&&(m="content"+m.substr(7,1).toUpperCase()+m.substr(8)),t[c]&&(D[m]=t[c])}!f&&(t[c]!==i[c]||b&&t[c]!==n.getAttr(c))&&(x=!0,_[c]=t[c])}x&&(n.setAttrs(_),Xo(n));for(var m in D)n.off(m+Y1),n.on(m+Y1,D[m])}function Xo(n){if(!Ot.autoDrawEnabled){var t=n.getLayer()||n.getStage();t&&t.batchDraw()}}var k2=J2();const _4={},ex={};$f.Node.prototype._applyProps=q1;let x4=P1.DefaultEventPriority;function nx(n,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}n.add(t),Xo(n)}function ax(n,t,i){let s=$f[n];s||(console.error(`Konva has no node with the type ${n}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${n}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),s=$f.Group);const u={},c={};for(var f in t)if(f!=="ref"){var p=f.slice(0,2)==="on";p?c[f]=t[f]:u[f]=t[f]}const m=new s(u);return q1(m,c),m}function ix(n,t,i){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${n}"`)}function sx(n,t,i){return!1}function lx(n){return n}function rx(){return null}function ox(){return null}function ux(n,t,i,s){return ex}function cx(){}function fx(n){}function hx(n,t){return!1}function dx(){return _4}function px(){return _4}const mx=setTimeout,gx=clearTimeout,yx=!0,vx=n=>{n()},Sx=-1;function bx(n,t){return!1}const Ex=!1,Tx=!1,Cx=!0,_x=!1,xx=!1;function Dx(n,t){t.parent===n?t.moveToTop():n.add(t),Xo(n)}function Ax(n,t){t.parent===n?t.moveToTop():n.add(t),Xo(n)}function D4(n,t,i){t._remove(),n.add(t),t.setZIndex(i.getZIndex()),Xo(n)}function Mx(n,t,i){D4(n,t,i)}function Nx(n,t){t.destroy(),t.off(Y1),Xo(n)}function Ox(n,t){t.destroy(),t.off(Y1),Xo(n)}function Rx(n,t,i){console.error(`Text components are not yet supported in ReactKonva. You text is: "${i}"`)}function zx(n,t,i){}function Hx(n,t,i,s){q1(n,s,i)}function wx(n){n.hide(),Xo(n)}function Ux(n){}function Bx(n,t){(t.visible==null||t.visible)&&n.show()}function Vx(n,t){}function Gx(n){}function jx(){}function Lx(){return null}function Px(){}function Yx(){}function qx(){return P1.DefaultEventPriority}function Xx(){}function Kx(){return null}function Qx(n){x4=n}function Zx(){return x4}function Jx(){return P1.DiscreteEventPriority}function Fx(){return!1}function kx(){}function Ix(){return null}function Wx(){return-1.1}function $x(){}function tD(){return!1}function eD(){return!0}function nD(){}function aD(){}function iD(){return null}const sD=null,lD=H.createContext(null);function rD(){}const oD=Object.freeze(Object.defineProperty({__proto__:null,HostTransitionContext:lD,NotPendingTransition:sD,afterActiveInstanceBlur:Yx,appendChild:Dx,appendChildToContainer:Ax,appendInitialChild:nx,beforeActiveInstanceBlur:Px,cancelTimeout:gx,clearContainer:Gx,commitMount:zx,commitTextUpdate:Rx,commitUpdate:Hx,createInstance:ax,createTextInstance:ix,detachDeletedInstance:jx,finalizeInitialChildren:sx,getChildHostContext:px,getCurrentEventPriority:qx,getCurrentUpdatePriority:Zx,getInstanceFromNode:Lx,getInstanceFromScope:Kx,getPublicInstance:lx,getRootHostContext:dx,hideInstance:wx,hideTextInstance:Ux,idlePriority:k2.unstable_IdlePriority,insertBefore:D4,insertInContainerBefore:Mx,isPrimaryRenderer:Ex,maySuspendCommit:tD,noTimeout:Sx,now:k2.unstable_now,preloadInstance:eD,prepareForCommit:rx,preparePortalMount:ox,prepareScopeUpdate:Xx,prepareUpdate:ux,removeChild:Nx,removeChildFromContainer:Ox,requestPostPaintCallback:$x,resetAfterCommit:cx,resetFormInstance:rD,resetTextContent:fx,resolveEventTimeStamp:Wx,resolveEventType:Ix,resolveUpdatePriority:Jx,run:k2.unstable_runWithPriority,scheduleMicrotask:vx,scheduleTimeout:mx,setCurrentUpdatePriority:Qx,shouldAttemptEagerTransition:Fx,shouldDeprioritizeSubtree:hx,shouldSetTextContent:bx,startSuspendingCommit:nD,supportsHydration:xx,supportsMicrotasks:yx,supportsMutation:Cx,supportsPersistence:_x,suspendInstance:aD,trackSchedulerEvent:kx,unhideInstance:Bx,unhideTextInstance:Vx,waitForCommitToBeReady:iD,warnsIfNotActing:Tx},Symbol.toStringTag,{value:"Module"}));function A4(n,t,i){if(!n)return;if(i(n)===!0)return n;let s=n.child;for(;s;){const u=A4(s,t,i);if(u)return u;s=s.sibling}}function M4(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}const I2=M4(Ha.createContext(null));class N4 extends Ha.Component{render(){return Ha.createElement(I2.Provider,{value:this._reactInternals},this.props.children)}}function uD(){const n=Ha.useContext(I2);if(n===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=Ha.useId();return Ha.useMemo(()=>{for(const i of[n,n?.alternate]){if(!i)continue;const s=A4(i,!1,u=>{let c=u.memoizedState;for(;c;){if(c.memoizedState===t)return!0;c=c.next}});if(s)return s}},[n,t])}const cD=Symbol.for("react.context"),fD=n=>n!==null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===cD;function hD(){const n=uD(),[t]=Ha.useState(()=>new Map);t.clear();let i=n;for(;i;){const s=i.type;fD(s)&&s!==I2&&!t.has(s)&&t.set(s,Ha.use(M4(s))),i=i.return}return t}function dD(){const n=hD();return Ha.useMemo(()=>Array.from(n.keys()).reduce((t,i)=>s=>Ha.createElement(t,null,Ha.createElement(i.Provider,{...s,value:n.get(i)})),t=>Ha.createElement(N4,{...t})),[n])}if(H.version.indexOf("19")===-1)throw new Error("react-konva version 19 is only compatible with React 19. Make sure to have the last version of react-konva and react or downgrade react-konva to version 18.");function pD(n){const t=H.useRef({});return H.useLayoutEffect(()=>{t.current=n}),H.useLayoutEffect(()=>()=>{t.current={}},[]),t.current}const mD=()=>{const n=H.useRef(0);return H.useMemo(()=>{n.current++},[]),n.current>1},gD=n=>{const t=H.useRef(null),i=H.useRef(null),s=H.useRef(null),u=pD(n),c=dD(),f=H.useRef(null),p=b=>{const{forwardedRef:_}=n;_&&(typeof _=="function"?_(b):_.current=b)},m=mD(),S=()=>{p(null),X1.updateContainer(null,s.current,null),i.current?.destroy(),i.current=null};return H.useLayoutEffect(()=>(f.current&&(clearTimeout(f.current),f.current=null),i.current?p(i.current):(i.current=new $f.Stage({width:n.width,height:n.height,container:t.current}),p(i.current),s.current=X1.createContainer(i.current,P1.ConcurrentRoot,null,!1,null,"",console.error,console.error,console.error,null),X1.updateContainer(H.createElement(c,{},n.children),s.current,null,()=>{})),()=>{m?f.current=setTimeout(S,0):S()}),[]),H.useLayoutEffect(()=>{p(i.current),q1(i.current,n,u),X1.updateContainer(H.createElement(c,{},n.children),s.current,null)}),H.createElement("div",{ref:t,id:n.id,accessKey:n.accessKey,className:n.className,role:n.role,style:n.style,tabIndex:n.tabIndex,title:n.title})},yD="Layer",vD="Group",O4="Rect",R4="Circle",z4="Line",SD="Image",bD="Path",X1=J_(oD),ED=H.forwardRef((n,t)=>H.createElement(N4,{},H.createElement(gD,{...n,forwardedRef:t}))),K1=n=>n==null?!1:typeof n=="object",H4=n=>n instanceof Date,w4=n=>typeof n=="function",U4=n=>{const t=typeof n;return t==="string"||t==="number"||t==="boolean"||t==="bigint"},W2=n=>{if(!K1(n))return n;const t={},i=Object.keys(n);for(let s=0,u=i.length;s<u;s++){const c=i[s],f=n[c];U4(f)||w4(f)?t[c]=f:H4(f)?t[c]=new Date(f.getTime()):Array.isArray(f)?t[c]=$2(f):K1(f)&&(t[c]=W2(f))}return t},$2=n=>{let t=n.length;const i=new Array(t);for(;t--!==0;){const s=n[t];U4(s)||w4(s)?i[t]=s:H4(s)?i[t]=new Date(s.getTime()):K1(s)&&!Array.isArray(s)?i[t]=W2(s):Array.isArray(s)?i[t]=$2(s):i[t]=s}return i},TD=n=>K1(n)?Array.isArray(n)?$2(n):W2(n):n;function CD(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var B4,V4;function _D(){return V4||(V4=1,B4=function n(t,i){if(t===i)return!0;if(t&&i&&typeof t=="object"&&typeof i=="object"){if(t.constructor!==i.constructor)return!1;var s,u,c;if(Array.isArray(t)){if(s=t.length,s!=i.length)return!1;for(u=s;u--!==0;)if(!n(t[u],i[u]))return!1;return!0}if(t.constructor===RegExp)return t.source===i.source&&t.flags===i.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===i.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===i.toString();if(c=Object.keys(t),s=c.length,s!==Object.keys(i).length)return!1;for(u=s;u--!==0;)if(!Object.prototype.hasOwnProperty.call(i,c[u]))return!1;for(u=s;u--!==0;){var f=c[u];if(!n(t[f],i[f]))return!1}return!0}return t!==t&&i!==i}),B4}var xD=_D();const DD=CD(xD),AD=n=>new Promise((t,i)=>{const s=new FileReader;s.onload=()=>{const u=s.result?.toString()||void 0;t(u)},s.onerror=()=>{s.abort(),i(new Error("Error reading file."))},s.readAsDataURL(n)});function MD(n,t){for(let i=n.length;i--!==0;)if(!DD(n[i],t[i]))return!0;return!1}const tv=(n,t)=>{const i=H.useRef([]),s=i.current.length>0&&i.current[0]&&MD(i.current[0],t);return(i.current.length===0||s)&&(i.current=[TD(t),n()]),i.current[1]},ND=()=>{throw new Error("useEvent should not be called before the component is mounted")},Q1=n=>{const t=H.useRef(ND);H.useInsertionEffect(()=>{t.current=n},[n]);const i=H.useRef(null);return i.current||(i.current=function(){return t.current?.apply(this,arguments)}),i.current},OD=n=>{const[t,i]=H.useState(n),s=H.useRef(n);return s.current!==t&&(s.current=t),[t,i,s]},RD=n=>setTimeout(n,1),zD=({width:n,height:t,label:i="Click to Choose a File",source:s,showPreviewOnFileLoad:u=!0,cropRadius:c=30,cropColor:f="white",closeColor:p="white",shadingColor:m="grey",shadingOpacity:S=.4,onEdit:b,onRemove:_})=>{const[x,D]=H.useState(n||t||0),[A,N]=H.useState(t||n||0),[R,O]=H.useState(0),[U,j]=H.useState(1),[V,F]=H.useState(c),[$,st]=H.useState(!0),[I,et]=H.useState(),nt=H.useRef(void 0),bt=H.useRef(0),lt=H.useRef(0),dt=H.useRef(0),pt=H.useRef(void 0),tt=H.useRef(null),w=H.useRef(null),Z=H.useRef(null),K=H.useRef(null),at=H.useRef(null),St=H.useId();H.useEffect(()=>{if(!n&&!t)throw new Error("Either width or height must be set to a value greater than zero.");if(n&&t)throw new Error("Both width and height cannot be set together, set one or the other.");O(t||n)},[n,t]),H.useEffect(()=>{s&&s!==nt.current&&W(s)},[s]);const W=Ut=>{const Ae=new Image;Ae.crossOrigin="Anonymous",Ae.onload=()=>{Pt(Ae)},Ae.src=Ut,nt.current=Ut},gt=async Ut=>{if(Ut.target.files){const Ae=await AD(Ut.target.files[0]);Ae&&W(Ae)}},Tt=()=>{et(void 0),st(!0),F(c),j(1),_?.(),b?.()},Pt=Ut=>{const Ae=Ut.width,jn=Ut.height,Va=jn/Ae;let ke,mn;t&&!n?(ke=t||jn,mn=ke/Va):n?(mn=n,ke=mn*Va||jn):(ke=jn,mn=ke/Va),Ut.width=mn,Ut.height=ke;const eu=Math.max(c,Math.min(mn,ke)/3),Lr=ke/jn;lt.current=mn/2,dt.current=ke/2,pt.current={x:lt.current/Lr,y:lt.current/Lr},w.current&&Z.current&&(rn(lt.current,dt.current),w.current.x(lt.current),Z.current.x(lt.current),w.current.y(dt.current),Z.current.y(dt.current)),st(!1),F(eu),j(Lr),D(mn),N(ke),et(Ut),u&&RD(()=>b?.(Mi()))},le=(Ut=0)=>w.current?w.current.radius()-Ut:V-Ut,xn=Ut=>w.current?w.current.x()-le(Ut)<0:!1,xe=Ut=>w.current?w.current.y()-le(Ut)<0:!1,Dn=Ut=>w.current&&tt.current?w.current.x()+le(Ut)>tt.current.width():!1,ln=Ut=>w.current&&tt.current?w.current.y()+le(Ut)>tt.current.height():!1,Be=Ut=>!xn(Ut)&&!Dn(Ut)&&!ln(Ut)&&!xe(Ut),At=Ut=>w.current?le(Ut)>=c?Ut:w.current.radius()-c:le(Ut)>=c?Ut:V-c,ue=()=>w.current?w.current.radius()+1:V+1,ta=()=>w.current&&tt.current?tt.current.width()-w.current.radius()-1:x-V-1,ea=()=>w.current&&tt.current?tt.current.height()-w.current.radius()-1:A-V-1,An=Ut=>w.current?Ut+w.current.radius()*.86:Ut+V*.86,Ba=Ut=>w.current?Ut-w.current.radius()*.5:Ut-V*.5,rn=(Ut,Ae)=>{K.current&&at.current&&(K.current.x(An(Ut)-8),K.current.y(Ba(Ae)-8),at.current.x(An(Ut)-8),at.current.y(Ba(Ae)-10))},ha=()=>{if(w.current&&Z.current){const Ut=xn()?ue():Dn()?ta():w.current.x(),Ae=xe()?ue():ln()?ea():w.current.y();rn(Ut,Ae),pt.current={x:Ut/U,y:Ae/U},w.current.fillPatternOffset(pt.current),w.current.x(Ut),Z.current.x(Ut),w.current.y(Ae),Z.current.y(Ae)}},Ji=Ut=>{if(Z.current&&w.current&&K.current){const Ae=Ut>0||Be(Ut)?Ut:0;Z.current.radius(Z.current.radius()-At(Ae)),w.current.radius(w.current.radius()-At(Ae)),ha()}},di=Ut=>{tt.current&&(tt.current.container().style.cursor="nesw-resize"),bt.current=Ut.evt.y},Fi=Ut=>{const Ae=Ut.evt.y,jn=Ae?Ae-bt.current:void 0,Va=Ut.evt.movementY||jn||0;bt.current=Ae,Ji(Va),w.current&&rn(w.current.x(),w.current.y())},Mn=()=>{tt.current&&(tt.current.container().style.cursor="default"),b?.(Mi())},on=()=>{b?.(Mi())},Mi=()=>{if(w.current){const Ut=w.current.radius()*2;return w.current.toDataURL({x:w.current.x()-w.current.radius(),y:w.current.y()-w.current.radius(),width:Ut,height:Ut,mimeType:"image/png",quality:1})}};return X.jsx("div",{children:$?X.jsx("div",{style:{width:R,height:R},className:"bsc:relative bsc:border-solid bsc:border-2",children:X.jsxs("div",{className:"bsc:absolute bsc:max-w-[80%] bsc:w-full bsc:top-1/2 bsc:left-1/2 bsc:-translate-1/2 bsc:text-center",children:[X.jsx("input",{type:"file",name:St,id:St,onChange:gt,className:"bsc:invisible bsc:absolute bsc:pointer-events-none"}),X.jsx("label",{htmlFor:St,className:"bsc:cursor-pointer",children:i})]})}):X.jsx(ED,{ref:tt,width:x,height:A,children:X.jsxs(yD,{children:[X.jsx(SD,{image:I}),X.jsx(O4,{x:0,y:0,width:x,height:A,fill:m,opacity:S}),X.jsxs(vD,{x:3,y:3,onClick:Tt,onMouseEnter:()=>{tt.current&&(tt.current.container().style.cursor="pointer")},onMouseLeave:()=>{tt.current&&(tt.current.container().style.cursor="default")},children:[X.jsx(z4,{points:[5,5,20,20],stroke:p,strokeWidth:4}),X.jsx(z4,{points:[5,20,20,5],stroke:p,strokeWidth:4})]}),X.jsx(R4,{ref:Z,x:lt.current,y:dt.current,radius:V,stroke:f,strokeWidth:4,strokeScaleEnabled:!0,dashEnabled:!0,dash:[10,5]}),X.jsx(R4,{ref:w,x:lt.current,y:dt.current,radius:V,draggable:!0,fillPatternImage:I,fillPatternScale:{x:U,y:U},fillPatternOffset:pt.current,onDragMove:ha,onMouseEnter:()=>{tt.current&&(tt.current.container().style.cursor="move")},onMouseLeave:()=>{tt.current&&(tt.current.container().style.cursor="default")},onDragEnd:on}),X.jsx(O4,{ref:K,x:lt.current+V*.86-8,y:dt.current+V*-.5-8,width:16,height:16,draggable:!0,onMouseEnter:()=>{tt.current&&(tt.current.container().style.cursor="nesw-resize")},onMouseLeave:()=>{tt.current&&(tt.current.container().style.cursor="default")},onDragStart:di,onDragMove:Fi,onDragEnd:Mn}),X.jsx(bD,{ref:at,x:lt.current+V*.86-8,y:dt.current+V*-.5-10,data:"M47.624,0.124l12.021,9.73L44.5,24.5l10,10l14.661-15.161l9.963,12.285v-31.5H47.624z M24.5,44.5 L9.847,59.653L0,47.5V79h31.5l-12.153-9.847L34.5,54.5L24.5,44.5z",fill:f,scale:{x:.2,y:.2}})]})})})},G4=H.createContext(void 0),j4=()=>H.useContext(G4),HD=({overlayKeepOnScreen:n=!0,useAnimations:t=!0,mobileMediaQuery:i,tabletMediaQuery:s,desktopMediaQuery:u,isValidScrollableElement:c,children:f})=>{const p={overlayKeepOnScreen:n,useAnimations:t,mobileMediaQuery:i,tabletMediaQuery:s,desktopMediaQuery:u,isValidScrollableElement:c};return X.jsx(G4.Provider,{value:p,children:f})};var Za=(n=>(n[n.Vertical=0]="Vertical",n[n.Horizontal=1]="Horizontal",n))(Za||{}),Es=(n=>(n[n.Right=0]="Right",n[n.Left=1]="Left",n))(Es||{}),ev={exports:{}};var L4;function wD(){return L4||(L4=1,(function(n){(function(){var t={}.hasOwnProperty;function i(){for(var c="",f=0;f<arguments.length;f++){var p=arguments[f];p&&(c=u(c,s(p)))}return c}function s(c){if(typeof c=="string"||typeof c=="number")return c;if(typeof c!="object")return"";if(Array.isArray(c))return i.apply(null,c);if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]"))return c.toString();var f="";for(var p in c)t.call(c,p)&&c[p]&&(f=u(f,p));return f}function u(c,f){return f?c?c+" "+f:c+f:c}n.exports?(i.default=i,n.exports=i):window.classNames=i})()})(ev)),ev.exports}var UD=wD();const Se=X2(UD);var nh=(n=>(n[n.Focus=0]="Focus",n[n.FocusWithin=1]="FocusWithin",n))(nh||{});const kp=(n=1)=>H.useMemo(()=>Se("bsc:dark:ring-mono-light-2 bsc:dark:ring-offset-mono-dark-1",{"bsc:focus-within:ring-3 bsc:focus-within:ring-primary-2 bsc:focus-within:ring-offset-2 focus-within:bsc-ring-opacity-50":n===1,"bsc:focus:ring-3 bsc:focus:ring-primary-2 bsc:focus:ring-offset-2 focus:bsc-ring-opacity-50":n===0}),[n]),BD=(n,t)=>{const i=H.useRef(null),{buttonType:s,buttonStyle:u="curved",type:c="button",disabled:f=!1,form:p,fullWidth:m=!1,onClick:S,className:b,children:_}=n,x=()=>{i.current?.click()};H.useImperativeHandle(t,()=>({click:x}));const D=kp(nh.Focus),A=Se("bc-button bsc:max-sm:p-4 bsc:md:p-2 bsc:dark:bg-mono-light-1 bsc:dark:hover:bg-mono-light-2 bsc:dark:text-mono-dark-1",D,{"bsc:w-full":m,"bc-disabled bsc:bg-gray-3 bsc:text-gray-2 bsc:pointer-events-none":f,"bsc:bg-primary-1 bsc:text-white bsc:hover:bg-primary-2 bsc:focus:ring-primary-1":s==="primary","bsc:bg-primary-2 bsc:text-white bsc:hover:bg-primary-3 bsc:focus:ring-primary-2":s==="secondary","bsc:bg-info bsc:text-white bsc:focus:ring-info":s==="info","bsc:bg-success bsc:text-white bsc:focus:ring-success":s==="success","bsc:bg-warning bsc:text-white bsc:focus:ring-warning":s==="warning","bsc:bg-error bsc:text-white bsc:focus:ring-error":s==="error","bsc:rounded-md":u==="curved","bsc:rounded-full bsc:px-4!":u==="round"},b);return X.jsx("button",{ref:i,type:c,onClick:S,disabled:f,form:p,className:A,children:_})},Ql=H.forwardRef(BD);var nv={exports:{}},Ip={},P4;function VD(){if(P4)return Ip;P4=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(s,u,c){var f=null;if(c!==void 0&&(f=""+c),u.key!==void 0&&(f=""+u.key),"key"in u){c={};for(var p in u)p!=="key"&&(c[p]=u[p])}else c=u;return u=c.ref,{$$typeof:n,type:s,key:f,ref:u!==void 0?u:null,props:c}}return Ip.Fragment=t,Ip.jsx=i,Ip.jsxs=i,Ip}var Z1={},Y4;function GD(){return Y4||(Y4=1,process.env.NODE_ENV!=="production"&&(function(){function n(W){if(W==null)return null;if(typeof W=="function")return W.$$typeof===bt?null:W.displayName||W.name||null;if(typeof W=="string")return W;switch(W){case R:return"Fragment";case U:return"Profiler";case O:return"StrictMode";case $:return"Suspense";case st:return"SuspenseList";case nt:return"Activity"}if(typeof W=="object")switch(typeof W.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),W.$$typeof){case N:return"Portal";case V:return W.displayName||"Context";case j:return(W._context.displayName||"Context")+".Consumer";case F:var gt=W.render;return W=W.displayName,W||(W=gt.displayName||gt.name||"",W=W!==""?"ForwardRef("+W+")":"ForwardRef"),W;case I:return gt=W.displayName||null,gt!==null?gt:n(W.type)||"Memo";case et:gt=W._payload,W=W._init;try{return n(W(gt))}catch{}}return null}function t(W){return""+W}function i(W){try{t(W);var gt=!1}catch{gt=!0}if(gt){gt=console;var Tt=gt.error,Pt=typeof Symbol=="function"&&Symbol.toStringTag&&W[Symbol.toStringTag]||W.constructor.name||"Object";return Tt.call(gt,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Pt),t(W)}}function s(W){if(W===R)return"<>";if(typeof W=="object"&&W!==null&&W.$$typeof===et)return"<...>";try{var gt=n(W);return gt?"<"+gt+">":"<...>"}catch{return"<...>"}}function u(){var W=lt.A;return W===null?null:W.getOwner()}function c(){return Error("react-stack-top-frame")}function f(W){if(dt.call(W,"key")){var gt=Object.getOwnPropertyDescriptor(W,"key").get;if(gt&>.isReactWarning)return!1}return W.key!==void 0}function p(W,gt){function Tt(){w||(w=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",gt))}Tt.isReactWarning=!0,Object.defineProperty(W,"key",{get:Tt,configurable:!0})}function m(){var W=n(this.type);return Z[W]||(Z[W]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),W=this.props.ref,W!==void 0?W:null}function S(W,gt,Tt,Pt,le,xn){var xe=Tt.ref;return W={$$typeof:A,type:W,key:gt,props:Tt,_owner:Pt},(xe!==void 0?xe:null)!==null?Object.defineProperty(W,"ref",{enumerable:!1,get:m}):Object.defineProperty(W,"ref",{enumerable:!1,value:null}),W._store={},Object.defineProperty(W._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(W,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(W,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:le}),Object.defineProperty(W,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:xn}),Object.freeze&&(Object.freeze(W.props),Object.freeze(W)),W}function b(W,gt,Tt,Pt,le,xn){var xe=gt.children;if(xe!==void 0)if(Pt)if(pt(xe)){for(Pt=0;Pt<xe.length;Pt++)_(xe[Pt]);Object.freeze&&Object.freeze(xe)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else _(xe);if(dt.call(gt,"key")){xe=n(W);var Dn=Object.keys(gt).filter(function(Be){return Be!=="key"});Pt=0<Dn.length?"{key: someKey, "+Dn.join(": ..., ")+": ...}":"{key: someKey}",St[xe+Pt]||(Dn=0<Dn.length?"{"+Dn.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
229
|
+
`,ex={};function K1(n,t,i=ex){if(!T4&&"zIndex"in t&&(console.warn(tx),T4=!0),!C4&&t.draggable){var s=t.x!==void 0||t.y!==void 0,u=t.onDragEnd||t.onDragMove;s&&!u&&(console.warn($_),C4=!0)}for(var c in i)if(!E4[c]){var f=c.slice(0,2)==="on",p=i[c]!==t[c];if(f&&p){var m=c.substr(2).toLowerCase();m.substr(0,7)==="content"&&(m="content"+m.substr(7,1).toUpperCase()+m.substr(8)),n.off(m,i[c])}var S=!t.hasOwnProperty(c);S&&n.setAttr(c,void 0)}var b=t._useStrictMode,_={},x=!1;const D={};for(var c in t)if(!E4[c]){var f=c.slice(0,2)==="on",A=i[c]!==t[c];if(f&&A){var m=c.substr(2).toLowerCase();m.substr(0,7)==="content"&&(m="content"+m.substr(7,1).toUpperCase()+m.substr(8)),t[c]&&(D[m]=t[c])}!f&&(t[c]!==i[c]||b&&t[c]!==n.getAttr(c))&&(x=!0,_[c]=t[c])}x&&(n.setAttrs(_),Jo(n));for(var m in D)n.off(m+X1),n.on(m+X1,D[m])}function Jo(n){if(!Mt.autoDrawEnabled){var t=n.getLayer()||n.getStage();t&&t.batchDraw()}}var k2=J2();const _4={},nx={};ah.Node.prototype._applyProps=K1;let x4=q1.DefaultEventPriority;function ax(n,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}n.add(t),Jo(n)}function ix(n,t,i){let s=ah[n];s||(console.error(`Konva has no node with the type ${n}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${n}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),s=ah.Group);const u={},c={};for(var f in t)if(f!=="ref"){var p=f.slice(0,2)==="on";p?c[f]=t[f]:u[f]=t[f]}const m=new s(u);return K1(m,c),m}function sx(n,t,i){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${n}"`)}function lx(n,t,i){return!1}function rx(n){return n}function ox(){return null}function ux(){return null}function cx(n,t,i,s){return nx}function fx(){}function hx(n){}function dx(n,t){return!1}function px(){return _4}function mx(){return _4}const gx=setTimeout,yx=clearTimeout,vx=!0,Sx=n=>{n()},bx=-1;function Ex(n,t){return!1}const Tx=!1,Cx=!1,_x=!0,xx=!1,Dx=!1;function Ax(n,t){t.parent===n?t.moveToTop():n.add(t),Jo(n)}function Mx(n,t){t.parent===n?t.moveToTop():n.add(t),Jo(n)}function D4(n,t,i){t._remove(),n.add(t),t.setZIndex(i.getZIndex()),Jo(n)}function Nx(n,t,i){D4(n,t,i)}function Ox(n,t){t.destroy(),t.off(X1),Jo(n)}function Rx(n,t){t.destroy(),t.off(X1),Jo(n)}function zx(n,t,i){console.error(`Text components are not yet supported in ReactKonva. You text is: "${i}"`)}function Hx(n,t,i){}function wx(n,t,i,s){K1(n,s,i)}function Ux(n){n.hide(),Jo(n)}function Bx(n){}function Vx(n,t){(t.visible==null||t.visible)&&n.show()}function Gx(n,t){}function jx(n){}function Lx(){}function Px(){return null}function Yx(){}function qx(){}function Xx(){return q1.DefaultEventPriority}function Kx(){}function Qx(){return null}function Zx(n){x4=n}function Jx(){return x4}function Fx(){return q1.DiscreteEventPriority}function kx(){return!1}function Ix(){}function Wx(){return null}function $x(){return-1.1}function tD(){}function eD(){return!1}function nD(){return!0}function aD(){}function iD(){}function sD(){return null}const lD=null,rD=w.createContext(null);function oD(){}const uD=Object.freeze(Object.defineProperty({__proto__:null,HostTransitionContext:rD,NotPendingTransition:lD,afterActiveInstanceBlur:qx,appendChild:Ax,appendChildToContainer:Mx,appendInitialChild:ax,beforeActiveInstanceBlur:Yx,cancelTimeout:yx,clearContainer:jx,commitMount:Hx,commitTextUpdate:zx,commitUpdate:wx,createInstance:ix,createTextInstance:sx,detachDeletedInstance:Lx,finalizeInitialChildren:lx,getChildHostContext:mx,getCurrentEventPriority:Xx,getCurrentUpdatePriority:Jx,getInstanceFromNode:Px,getInstanceFromScope:Qx,getPublicInstance:rx,getRootHostContext:px,hideInstance:Ux,hideTextInstance:Bx,idlePriority:k2.unstable_IdlePriority,insertBefore:D4,insertInContainerBefore:Nx,isPrimaryRenderer:Tx,maySuspendCommit:eD,noTimeout:bx,now:k2.unstable_now,preloadInstance:nD,prepareForCommit:ox,preparePortalMount:ux,prepareScopeUpdate:Kx,prepareUpdate:cx,removeChild:Ox,removeChildFromContainer:Rx,requestPostPaintCallback:tD,resetAfterCommit:fx,resetFormInstance:oD,resetTextContent:hx,resolveEventTimeStamp:$x,resolveEventType:Wx,resolveUpdatePriority:Fx,run:k2.unstable_runWithPriority,scheduleMicrotask:Sx,scheduleTimeout:gx,setCurrentUpdatePriority:Zx,shouldAttemptEagerTransition:kx,shouldDeprioritizeSubtree:dx,shouldSetTextContent:Ex,startSuspendingCommit:aD,supportsHydration:Dx,supportsMicrotasks:vx,supportsMutation:_x,supportsPersistence:xx,suspendInstance:iD,trackSchedulerEvent:Ix,unhideInstance:Vx,unhideTextInstance:Gx,waitForCommitToBeReady:sD,warnsIfNotActing:Cx},Symbol.toStringTag,{value:"Module"}));function A4(n,t,i){if(!n)return;if(i(n)===!0)return n;let s=n.child;for(;s;){const u=A4(s,t,i);if(u)return u;s=s.sibling}}function M4(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}const I2=M4(wa.createContext(null));class N4 extends wa.Component{render(){return wa.createElement(I2.Provider,{value:this._reactInternals},this.props.children)}}function cD(){const n=wa.useContext(I2);if(n===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=wa.useId();return wa.useMemo(()=>{for(const i of[n,n?.alternate]){if(!i)continue;const s=A4(i,!1,u=>{let c=u.memoizedState;for(;c;){if(c.memoizedState===t)return!0;c=c.next}});if(s)return s}},[n,t])}const fD=Symbol.for("react.context"),hD=n=>n!==null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===fD;function dD(){const n=cD(),[t]=wa.useState(()=>new Map);t.clear();let i=n;for(;i;){const s=i.type;hD(s)&&s!==I2&&!t.has(s)&&t.set(s,wa.use(M4(s))),i=i.return}return t}function pD(){const n=dD();return wa.useMemo(()=>Array.from(n.keys()).reduce((t,i)=>s=>wa.createElement(t,null,wa.createElement(i.Provider,{...s,value:n.get(i)})),t=>wa.createElement(N4,{...t})),[n])}if(w.version.indexOf("19")===-1)throw new Error("react-konva version 19 is only compatible with React 19. Make sure to have the last version of react-konva and react or downgrade react-konva to version 18.");function mD(n){const t=w.useRef({});return w.useLayoutEffect(()=>{t.current=n}),w.useLayoutEffect(()=>()=>{t.current={}},[]),t.current}const gD=()=>{const n=w.useRef(0);return w.useMemo(()=>{n.current++},[]),n.current>1},yD=n=>{const t=w.useRef(null),i=w.useRef(null),s=w.useRef(null),u=mD(n),c=pD(),f=w.useRef(null),p=b=>{const{forwardedRef:_}=n;_&&(typeof _=="function"?_(b):_.current=b)},m=gD(),S=()=>{p(null),Q1.updateContainer(null,s.current,null),i.current?.destroy(),i.current=null};return w.useLayoutEffect(()=>(f.current&&(clearTimeout(f.current),f.current=null),i.current?p(i.current):(i.current=new ah.Stage({width:n.width,height:n.height,container:t.current}),p(i.current),s.current=Q1.createContainer(i.current,q1.ConcurrentRoot,null,!1,null,"",console.error,console.error,console.error,null),Q1.updateContainer(w.createElement(c,{},n.children),s.current,null,()=>{})),()=>{m?f.current=setTimeout(S,0):S()}),[]),w.useLayoutEffect(()=>{p(i.current),K1(i.current,n,u),Q1.updateContainer(w.createElement(c,{},n.children),s.current,null)}),w.createElement("div",{ref:t,id:n.id,accessKey:n.accessKey,className:n.className,role:n.role,style:n.style,tabIndex:n.tabIndex,title:n.title})},vD="Layer",SD="Group",O4="Rect",R4="Circle",z4="Line",bD="Image",ED="Path",Q1=F_(uD),TD=w.forwardRef((n,t)=>w.createElement(N4,{},w.createElement(yD,{...n,forwardedRef:t}))),Z1=n=>n==null?!1:typeof n=="object",H4=n=>n instanceof Date,w4=n=>typeof n=="function",U4=n=>{const t=typeof n;return t==="string"||t==="number"||t==="boolean"||t==="bigint"},W2=n=>{if(!Z1(n))return n;const t={},i=Object.keys(n);for(let s=0,u=i.length;s<u;s++){const c=i[s],f=n[c];U4(f)||w4(f)?t[c]=f:H4(f)?t[c]=new Date(f.getTime()):Array.isArray(f)?t[c]=$2(f):Z1(f)&&(t[c]=W2(f))}return t},$2=n=>{let t=n.length;const i=new Array(t);for(;t--!==0;){const s=n[t];U4(s)||w4(s)?i[t]=s:H4(s)?i[t]=new Date(s.getTime()):Z1(s)&&!Array.isArray(s)?i[t]=W2(s):Array.isArray(s)?i[t]=$2(s):i[t]=s}return i},CD=n=>Z1(n)?Array.isArray(n)?$2(n):W2(n):n;function _D(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var B4,V4;function xD(){return V4||(V4=1,B4=function n(t,i){if(t===i)return!0;if(t&&i&&typeof t=="object"&&typeof i=="object"){if(t.constructor!==i.constructor)return!1;var s,u,c;if(Array.isArray(t)){if(s=t.length,s!=i.length)return!1;for(u=s;u--!==0;)if(!n(t[u],i[u]))return!1;return!0}if(t.constructor===RegExp)return t.source===i.source&&t.flags===i.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===i.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===i.toString();if(c=Object.keys(t),s=c.length,s!==Object.keys(i).length)return!1;for(u=s;u--!==0;)if(!Object.prototype.hasOwnProperty.call(i,c[u]))return!1;for(u=s;u--!==0;){var f=c[u];if(!n(t[f],i[f]))return!1}return!0}return t!==t&&i!==i}),B4}var DD=xD();const AD=_D(DD),MD=n=>new Promise((t,i)=>{const s=new FileReader;s.onload=()=>{const u=s.result?.toString()||void 0;t(u)},s.onerror=()=>{s.abort(),i(new Error("Error reading file."))},s.readAsDataURL(n)});function ND(n,t){for(let i=n.length;i--!==0;)if(!AD(n[i],t[i]))return!0;return!1}const tv=(n,t)=>{const i=w.useRef([]),s=i.current.length>0&&i.current[0]&&ND(i.current[0],t);return(i.current.length===0||s)&&(i.current=[CD(t),n()]),i.current[1]},OD=()=>{throw new Error("useEvent should not be called before the component is mounted")},Lr=n=>{const t=w.useRef(OD);w.useInsertionEffect(()=>{t.current=n},[n]);const i=w.useRef(null);return i.current||(i.current=function(){return t.current?.apply(this,arguments)}),i.current},RD=n=>{const[t,i]=w.useState(n),s=w.useRef(n);return s.current!==t&&(s.current=t),[t,i,s]},zD=n=>setTimeout(n,1),HD=({width:n,height:t,label:i="Click to Choose a File",source:s,showPreviewOnFileLoad:u=!0,cropRadius:c=30,cropColor:f="white",closeColor:p="white",shadingColor:m="grey",shadingOpacity:S=.4,onEdit:b,onRemove:_})=>{const[x,D]=w.useState(n||t||0),[A,N]=w.useState(t||n||0),[O,R]=w.useState(0),[U,j]=w.useState(1),[G,k]=w.useState(c),[et,ft]=w.useState(!0),[I,it]=w.useState(),J=w.useRef(void 0),St=w.useRef(0),nt=w.useRef(0),ht=w.useRef(0),yt=w.useRef(void 0),tt=w.useRef(null),H=w.useRef(null),Q=w.useRef(null),K=w.useRef(null),pt=w.useRef(null),dt=w.useId();w.useEffect(()=>{if(!n&&!t)throw new Error("Either width or height must be set to a value greater than zero.");if(n&&t)throw new Error("Both width and height cannot be set together, set one or the other.");R(t||n)},[n,t]),w.useEffect(()=>{s&&s!==J.current&&$(s)},[s]);const $=Ht=>{const De=new Image;De.crossOrigin="Anonymous",De.onload=()=>{qt(De)},De.src=Ht,J.current=Ht},Et=async Ht=>{if(Ht.target.files){const De=await MD(Ht.target.files[0]);De&&$(De)}},Rt=()=>{it(void 0),ft(!0),k(c),j(1),_?.(),b?.()},qt=Ht=>{const De=Ht.width,na=Ht.height,pi=na/De;let tn,Nn;t&&!n?(tn=t||na,Nn=tn/pi):n?(Nn=n,tn=Nn*pi||na):(tn=na,Nn=tn/pi),Ht.width=Nn,Ht.height=tn;const ml=Math.max(c,Math.min(Nn,tn)/3),nr=tn/na;nt.current=Nn/2,ht.current=tn/2,yt.current={x:nt.current/nr,y:nt.current/nr},H.current&&Q.current&&(cn(nt.current,ht.current),H.current.x(nt.current),Q.current.x(nt.current),H.current.y(ht.current),Q.current.y(ht.current)),ft(!1),k(ml),j(nr),D(Nn),N(tn),it(Ht),u&&zD(()=>b?.(Oi()))},Bt=(Ht=0)=>H.current?H.current.radius()-Ht:G-Ht,Vt=Ht=>H.current?H.current.x()-Bt(Ht)<0:!1,se=Ht=>H.current?H.current.y()-Bt(Ht)<0:!1,Ke=Ht=>H.current&&tt.current?H.current.x()+Bt(Ht)>tt.current.width():!1,yn=Ht=>H.current&&tt.current?H.current.y()+Bt(Ht)>tt.current.height():!1,Oe=Ht=>!Vt(Ht)&&!Ke(Ht)&&!yn(Ht)&&!se(Ht),It=Ht=>H.current?Bt(Ht)>=c?Ht:H.current.radius()-c:Bt(Ht)>=c?Ht:G-c,Jn=()=>H.current?H.current.radius()+1:G+1,Gt=()=>H.current&&tt.current?tt.current.width()-H.current.radius()-1:x-G-1,xe=()=>H.current&&tt.current?tt.current.height()-H.current.radius()-1:A-G-1,$e=Ht=>H.current?Ht+H.current.radius()*.86:Ht+G*.86,da=Ht=>H.current?Ht-H.current.radius()*.5:Ht-G*.5,cn=(Ht,De)=>{K.current&&pt.current&&(K.current.x($e(Ht)-8),K.current.y(da(De)-8),pt.current.x($e(Ht)-8),pt.current.y(da(De)-10))},ea=()=>{if(H.current&&Q.current){const Ht=Vt()?Jn():Ke()?Gt():H.current.x(),De=se()?Jn():yn()?xe():H.current.y();cn(Ht,De),yt.current={x:Ht/U,y:De/U},H.current.fillPatternOffset(yt.current),H.current.x(Ht),Q.current.x(Ht),H.current.y(De),Q.current.y(De)}},Ms=Ht=>{if(Q.current&&H.current&&K.current){const De=Ht>0||Oe(Ht)?Ht:0;Q.current.radius(Q.current.radius()-It(De)),H.current.radius(H.current.radius()-It(De)),ea()}},di=Ht=>{tt.current&&(tt.current.container().style.cursor="nesw-resize"),St.current=Ht.evt.y},Ii=Ht=>{const De=Ht.evt.y,na=De?De-St.current:void 0,pi=Ht.evt.movementY||na||0;St.current=De,Ms(pi),H.current&&cn(H.current.x(),H.current.y())},jn=()=>{tt.current&&(tt.current.container().style.cursor="default"),b?.(Oi())},Mn=()=>{b?.(Oi())},Oi=()=>{if(H.current){const Ht=H.current.radius()*2;return H.current.toDataURL({x:H.current.x()-H.current.radius(),y:H.current.y()-H.current.radius(),width:Ht,height:Ht,mimeType:"image/png",quality:1})}};return X.jsx("div",{children:et?X.jsx("div",{style:{width:O,height:O},className:"bsc:relative bsc:border-solid bsc:border-2",children:X.jsxs("div",{className:"bsc:absolute bsc:max-w-[80%] bsc:w-full bsc:top-1/2 bsc:left-1/2 bsc:-translate-1/2 bsc:text-center",children:[X.jsx("input",{type:"file",name:dt,id:dt,onChange:Et,className:"bsc:invisible bsc:absolute bsc:pointer-events-none"}),X.jsx("label",{htmlFor:dt,className:"bsc:cursor-pointer",children:i})]})}):X.jsx(TD,{ref:tt,width:x,height:A,children:X.jsxs(vD,{children:[X.jsx(bD,{image:I}),X.jsx(O4,{x:0,y:0,width:x,height:A,fill:m,opacity:S}),X.jsxs(SD,{x:3,y:3,onClick:Rt,onMouseEnter:()=>{tt.current&&(tt.current.container().style.cursor="pointer")},onMouseLeave:()=>{tt.current&&(tt.current.container().style.cursor="default")},children:[X.jsx(z4,{points:[5,5,20,20],stroke:p,strokeWidth:4}),X.jsx(z4,{points:[5,20,20,5],stroke:p,strokeWidth:4})]}),X.jsx(R4,{ref:Q,x:nt.current,y:ht.current,radius:G,stroke:f,strokeWidth:4,strokeScaleEnabled:!0,dashEnabled:!0,dash:[10,5]}),X.jsx(R4,{ref:H,x:nt.current,y:ht.current,radius:G,draggable:!0,fillPatternImage:I,fillPatternScale:{x:U,y:U},fillPatternOffset:yt.current,onDragMove:ea,onMouseEnter:()=>{tt.current&&(tt.current.container().style.cursor="move")},onMouseLeave:()=>{tt.current&&(tt.current.container().style.cursor="default")},onDragEnd:Mn}),X.jsx(O4,{ref:K,x:nt.current+G*.86-8,y:ht.current+G*-.5-8,width:16,height:16,draggable:!0,onMouseEnter:()=>{tt.current&&(tt.current.container().style.cursor="nesw-resize")},onMouseLeave:()=>{tt.current&&(tt.current.container().style.cursor="default")},onDragStart:di,onDragMove:Ii,onDragEnd:jn}),X.jsx(ED,{ref:pt,x:nt.current+G*.86-8,y:ht.current+G*-.5-10,data:"M47.624,0.124l12.021,9.73L44.5,24.5l10,10l14.661-15.161l9.963,12.285v-31.5H47.624z M24.5,44.5 L9.847,59.653L0,47.5V79h31.5l-12.153-9.847L34.5,54.5L24.5,44.5z",fill:f,scale:{x:.2,y:.2}})]})})})},G4=w.createContext(void 0),j4=()=>w.useContext(G4),wD=({overlayKeepOnScreen:n=!0,useAnimations:t=!0,mobileMediaQuery:i,tabletMediaQuery:s,desktopMediaQuery:u,isValidScrollableElement:c,children:f})=>{const p={overlayKeepOnScreen:n,useAnimations:t,mobileMediaQuery:i,tabletMediaQuery:s,desktopMediaQuery:u,isValidScrollableElement:c};return X.jsx(G4.Provider,{value:p,children:f})};var Za=(n=>(n[n.Vertical=0]="Vertical",n[n.Horizontal=1]="Horizontal",n))(Za||{}),Cs=(n=>(n[n.Right=0]="Right",n[n.Left=1]="Left",n))(Cs||{}),ev={exports:{}};var L4;function UD(){return L4||(L4=1,(function(n){(function(){var t={}.hasOwnProperty;function i(){for(var c="",f=0;f<arguments.length;f++){var p=arguments[f];p&&(c=u(c,s(p)))}return c}function s(c){if(typeof c=="string"||typeof c=="number")return c;if(typeof c!="object")return"";if(Array.isArray(c))return i.apply(null,c);if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]"))return c.toString();var f="";for(var p in c)t.call(c,p)&&c[p]&&(f=u(f,p));return f}function u(c,f){return f?c?c+" "+f:c+f:c}n.exports?(i.default=i,n.exports=i):window.classNames=i})()})(ev)),ev.exports}var BD=UD();const Ee=X2(BD);var lh=(n=>(n[n.Focus=0]="Focus",n[n.FocusWithin=1]="FocusWithin",n))(lh||{});const $p=(n=1)=>w.useMemo(()=>Ee("bsc:dark:ring-mono-light-2 bsc:dark:ring-offset-mono-dark-1",{"bsc:focus-within:ring-3 bsc:focus-within:ring-primary-2 bsc:focus-within:ring-offset-2 focus-within:bsc-ring-opacity-50":n===1,"bsc:focus:ring-3 bsc:focus:ring-primary-2 bsc:focus:ring-offset-2 focus:bsc-ring-opacity-50":n===0}),[n]),VD=(n,t)=>{const i=w.useRef(null),{buttonType:s,buttonStyle:u="curved",type:c="button",disabled:f=!1,form:p,fullWidth:m=!1,onClick:S,className:b,children:_}=n,x=()=>{i.current?.click()};w.useImperativeHandle(t,()=>({click:x}));const D=$p(lh.Focus),A=Ee("bc-button bsc:max-sm:p-4 bsc:md:p-2 bsc:dark:bg-mono-light-1 bsc:dark:hover:bg-mono-light-2 bsc:dark:text-mono-dark-1",D,{"bsc:w-full":m,"bc-disabled bsc:bg-gray-3 bsc:text-gray-2 bsc:pointer-events-none":f,"bsc:bg-primary-1 bsc:text-white bsc:hover:bg-primary-2 bsc:focus:ring-primary-1":s==="primary","bsc:bg-primary-2 bsc:text-white bsc:hover:bg-primary-3 bsc:focus:ring-primary-2":s==="secondary","bsc:bg-info bsc:text-white bsc:focus:ring-info":s==="info","bsc:bg-success bsc:text-white bsc:focus:ring-success":s==="success","bsc:bg-warning bsc:text-white bsc:focus:ring-warning":s==="warning","bsc:bg-error bsc:text-white bsc:focus:ring-error":s==="error","bsc:rounded-md":u==="curved","bsc:rounded-full bsc:px-4!":u==="round"},b);return X.jsx("button",{ref:i,type:c,onClick:S,disabled:f,form:p,className:A,children:_})},Il=w.forwardRef(VD);var nv={exports:{}},t0={},P4;function GD(){if(P4)return t0;P4=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(s,u,c){var f=null;if(c!==void 0&&(f=""+c),u.key!==void 0&&(f=""+u.key),"key"in u){c={};for(var p in u)p!=="key"&&(c[p]=u[p])}else c=u;return u=c.ref,{$$typeof:n,type:s,key:f,ref:u!==void 0?u:null,props:c}}return t0.Fragment=t,t0.jsx=i,t0.jsxs=i,t0}var J1={},Y4;function jD(){return Y4||(Y4=1,process.env.NODE_ENV!=="production"&&(function(){function n($){if($==null)return null;if(typeof $=="function")return $.$$typeof===St?null:$.displayName||$.name||null;if(typeof $=="string")return $;switch($){case O:return"Fragment";case U:return"Profiler";case R:return"StrictMode";case et:return"Suspense";case ft:return"SuspenseList";case J:return"Activity"}if(typeof $=="object")switch(typeof $.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),$.$$typeof){case N:return"Portal";case G:return $.displayName||"Context";case j:return($._context.displayName||"Context")+".Consumer";case k:var Et=$.render;return $=$.displayName,$||($=Et.displayName||Et.name||"",$=$!==""?"ForwardRef("+$+")":"ForwardRef"),$;case I:return Et=$.displayName||null,Et!==null?Et:n($.type)||"Memo";case it:Et=$._payload,$=$._init;try{return n($(Et))}catch{}}return null}function t($){return""+$}function i($){try{t($);var Et=!1}catch{Et=!0}if(Et){Et=console;var Rt=Et.error,qt=typeof Symbol=="function"&&Symbol.toStringTag&&$[Symbol.toStringTag]||$.constructor.name||"Object";return Rt.call(Et,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",qt),t($)}}function s($){if($===O)return"<>";if(typeof $=="object"&&$!==null&&$.$$typeof===it)return"<...>";try{var Et=n($);return Et?"<"+Et+">":"<...>"}catch{return"<...>"}}function u(){var $=nt.A;return $===null?null:$.getOwner()}function c(){return Error("react-stack-top-frame")}function f($){if(ht.call($,"key")){var Et=Object.getOwnPropertyDescriptor($,"key").get;if(Et&&Et.isReactWarning)return!1}return $.key!==void 0}function p($,Et){function Rt(){H||(H=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Et))}Rt.isReactWarning=!0,Object.defineProperty($,"key",{get:Rt,configurable:!0})}function m(){var $=n(this.type);return Q[$]||(Q[$]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),$=this.props.ref,$!==void 0?$:null}function S($,Et,Rt,qt,Bt,Vt){var se=Rt.ref;return $={$$typeof:A,type:$,key:Et,props:Rt,_owner:qt},(se!==void 0?se:null)!==null?Object.defineProperty($,"ref",{enumerable:!1,get:m}):Object.defineProperty($,"ref",{enumerable:!1,value:null}),$._store={},Object.defineProperty($._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty($,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty($,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Bt}),Object.defineProperty($,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Vt}),Object.freeze&&(Object.freeze($.props),Object.freeze($)),$}function b($,Et,Rt,qt,Bt,Vt){var se=Et.children;if(se!==void 0)if(qt)if(yt(se)){for(qt=0;qt<se.length;qt++)_(se[qt]);Object.freeze&&Object.freeze(se)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else _(se);if(ht.call(Et,"key")){se=n($);var Ke=Object.keys(Et).filter(function(Oe){return Oe!=="key"});qt=0<Ke.length?"{key: someKey, "+Ke.join(": ..., ")+": ...}":"{key: someKey}",dt[se+qt]||(Ke=0<Ke.length?"{"+Ke.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
230
230
|
let props = %s;
|
|
231
231
|
<%s {...props} />
|
|
232
232
|
React keys must be passed directly to JSX without using spread:
|
|
233
233
|
let props = %s;
|
|
234
|
-
<%s key={someKey} {...props} />`,Pt,xe,Dn,xe),St[xe+Pt]=!0)}if(xe=null,Tt!==void 0&&(i(Tt),xe=""+Tt),f(gt)&&(i(gt.key),xe=""+gt.key),"key"in gt){Tt={};for(var ln in gt)ln!=="key"&&(Tt[ln]=gt[ln])}else Tt=gt;return xe&&p(Tt,typeof W=="function"?W.displayName||W.name||"Unknown":W),S(W,xe,Tt,u(),le,xn)}function _(W){x(W)?W._store&&(W._store.validated=1):typeof W=="object"&&W!==null&&W.$$typeof===et&&(W._payload.status==="fulfilled"?x(W._payload.value)&&W._payload.value._store&&(W._payload.value._store.validated=1):W._store&&(W._store.validated=1))}function x(W){return typeof W=="object"&&W!==null&&W.$$typeof===A}var D=H,A=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),V=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),st=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),et=Symbol.for("react.lazy"),nt=Symbol.for("react.activity"),bt=Symbol.for("react.client.reference"),lt=D.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,dt=Object.prototype.hasOwnProperty,pt=Array.isArray,tt=console.createTask?console.createTask:function(){return null};D={react_stack_bottom_frame:function(W){return W()}};var w,Z={},K=D.react_stack_bottom_frame.bind(D,c)(),at=tt(s(c)),St={};Z1.Fragment=R,Z1.jsx=function(W,gt,Tt){var Pt=1e4>lt.recentlyCreatedOwnerStacks++;return b(W,gt,Tt,!1,Pt?Error("react-stack-top-frame"):K,Pt?tt(s(W)):at)},Z1.jsxs=function(W,gt,Tt){var Pt=1e4>lt.recentlyCreatedOwnerStacks++;return b(W,gt,Tt,!0,Pt?Error("react-stack-top-frame"):K,Pt?tt(s(W)):at)}})()),Z1}var q4;function jD(){return q4||(q4=1,process.env.NODE_ENV==="production"?nv.exports=VD():nv.exports=GD()),nv.exports}var Ja=jD();function LD(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var X4,K4;function PD(){return K4||(K4=1,X4=function n(t,i){if(t===i)return!0;if(t&&i&&typeof t=="object"&&typeof i=="object"){if(t.constructor!==i.constructor)return!1;var s,u,c;if(Array.isArray(t)){if(s=t.length,s!=i.length)return!1;for(u=s;u--!==0;)if(!n(t[u],i[u]))return!1;return!0}if(t.constructor===RegExp)return t.source===i.source&&t.flags===i.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===i.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===i.toString();if(c=Object.keys(t),s=c.length,s!==Object.keys(i).length)return!1;for(u=s;u--!==0;)if(!Object.prototype.hasOwnProperty.call(i,c[u]))return!1;for(u=s;u--!==0;){var f=c[u];if(!n(t[f],i[f]))return!1}return!0}return t!==t&&i!==i}),X4}var YD=PD();const qD=LD(YD),XD=()=>{throw new Error("useEvent should not be called before the component is mounted")},Wp=n=>{const t=H.useRef(XD);H.useInsertionEffect(()=>{t.current=n},[n]);const i=H.useRef(null);return i.current||(i.current=function(){return t.current?.apply(this,arguments)}),i.current},Q4=n=>{const t=H.useRef(void 0);let i=!1;t.current!==void 0&&(i=!qD(t.current,n));const s={changed:i,previousValue:t.current};return t.current=n,s},KD=n=>typeof n=="function",QD=n=>{const[t,i]=H.useState({value:n,initial:!0}),s=H.useRef(n);return[t,u=>{if(!KD(u))i({value:u,initial:!1});else{const c=u(s.current);s.current=c,i({value:c,initial:!1})}}]},ZD=n=>{const[t,i]=QD(n),s=H.useRef({value:n,initial:!0});return s.current!==t&&(s.current=t),[t,i,s]},Z4=H.createContext(void 0),J1=()=>H.useContext(Z4),av=({id:n,name:t,value:i,type:s,checked:u,readOnly:c,onChange:f})=>Ja.jsx("input",{id:n,name:t,value:i,type:s,checked:u,onChange:f,readOnly:c,disabled:c,className:"bsh:appearance-none! bsh:absolute! bsh:left-[-1000px]!"});function JD(n){const t=Object.keys(n),i={};for(let s=0,u=t.length;s<u;s++){const c=t[s];if(c){const f=n[c],p=c.replace(/([A-Z])/g,m=>`-${m.toLowerCase()}`);typeof f=="boolean"?f&&(i[`data-${p}`]=!0):i[`data-${p}`]=n[c]}}return i}const $p=({wrapperElement:n,renderProps:t,elementProps:i,innerWrapperElement:s,className:u,children:c})=>{if(typeof c=="function")return s?Ja.jsxs(Ja.Fragment,{children:[s,c(t)]}):c(t);{const f=s?Ja.jsxs(Ja.Fragment,{children:[s,c]}):c;return H.createElement(n,Object.assign({},t?JD(t):{},i,{className:u}),f)}};var FD=Symbol.for("preact-signals");function iv(){if(ah>1)ah--;else{for(var n,t=!1;t0!==void 0;){var i=t0;for(t0=void 0,sv++;i!==void 0;){var s=i.o;if(i.o=void 0,i.f&=-3,!(8&i.f)&&k4(i))try{i.c()}catch(u){t||(n=u,t=!0)}i=s}}if(sv=0,ah--,t)throw n}}var Ue=void 0;function J4(n){var t=Ue;Ue=void 0;try{return n()}finally{Ue=t}}var t0=void 0,ah=0,sv=0,F1=0;function F4(n){if(Ue!==void 0){var t=n.n;if(t===void 0||t.t!==Ue)return t={i:0,S:n,p:Ue.s,n:void 0,t:Ue,e:void 0,x:void 0,r:t},Ue.s!==void 0&&(Ue.s.n=t),Ue.s=t,n.n=t,32&Ue.f&&n.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Ue.s,t.n=void 0,Ue.s.n=t,Ue.s=t),t}}function Fa(n,t){this.v=n,this.i=0,this.n=void 0,this.t=void 0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}Fa.prototype.brand=FD,Fa.prototype.h=function(){return!0},Fa.prototype.S=function(n){var t=this,i=this.t;i!==n&&n.e===void 0&&(n.x=i,this.t=n,i!==void 0?i.e=n:J4(function(){var s;(s=t.W)==null||s.call(t)}))},Fa.prototype.U=function(n){var t=this;if(this.t!==void 0){var i=n.e,s=n.x;i!==void 0&&(i.x=s,n.e=void 0),s!==void 0&&(s.e=i,n.x=void 0),n===this.t&&(this.t=s,s===void 0&&J4(function(){var u;(u=t.Z)==null||u.call(t)}))}},Fa.prototype.subscribe=function(n){var t=this;return rv(function(){var i=t.value,s=Ue;Ue=void 0;try{n(i)}finally{Ue=s}},{name:"sub"})},Fa.prototype.valueOf=function(){return this.value},Fa.prototype.toString=function(){return this.value+""},Fa.prototype.toJSON=function(){return this.value},Fa.prototype.peek=function(){var n=Ue;Ue=void 0;try{return this.value}finally{Ue=n}},Object.defineProperty(Fa.prototype,"value",{get:function(){var n=F4(this);return n!==void 0&&(n.i=this.i),this.v},set:function(n){if(n!==this.v){if(sv>100)throw new Error("Cycle detected");this.v=n,this.i++,F1++,ah++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{iv()}}}});function kD(n,t){return new Fa(n,t)}function k4(n){for(var t=n.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function I4(n){for(var t=n.s;t!==void 0;t=t.n){var i=t.S.n;if(i!==void 0&&(t.r=i),t.S.n=t,t.i=-1,t.n===void 0){n.s=t;break}}}function W4(n){for(var t=n.s,i=void 0;t!==void 0;){var s=t.p;t.i===-1?(t.S.U(t),s!==void 0&&(s.n=t.n),t.n!==void 0&&(t.n.p=s)):i=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=s}n.s=i}function ih(n,t){Fa.call(this,void 0),this.x=n,this.s=void 0,this.g=F1-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}ih.prototype=new Fa,ih.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===F1))return!0;if(this.g=F1,this.f|=1,this.i>0&&!k4(this))return this.f&=-2,!0;var n=Ue;try{I4(this),Ue=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(i){this.v=i,this.f|=16,this.i++}return Ue=n,W4(this),this.f&=-2,!0},ih.prototype.S=function(n){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}Fa.prototype.S.call(this,n)},ih.prototype.U=function(n){if(this.t!==void 0&&(Fa.prototype.U.call(this,n),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},ih.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var n=this.t;n!==void 0;n=n.x)n.t.N()}},Object.defineProperty(ih.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var n=F4(this);if(this.h(),n!==void 0&&(n.i=this.i),16&this.f)throw this.v;return this.v}});function $4(n){var t=n.u;if(n.u=void 0,typeof t=="function"){ah++;var i=Ue;Ue=void 0;try{t()}catch(s){throw n.f&=-2,n.f|=8,lv(n),s}finally{Ue=i,iv()}}}function lv(n){for(var t=n.s;t!==void 0;t=t.n)t.S.U(t);n.x=void 0,n.s=void 0,$4(n)}function ID(n){if(Ue!==this)throw new Error("Out-of-order effect");W4(this),Ue=n,this.f&=-2,8&this.f&&lv(this),iv()}function sh(n,t){this.x=n,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=t?.name}sh.prototype.c=function(){var n=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{n()}},sh.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,$4(this),I4(this),ah++;var n=Ue;return Ue=this,ID.bind(this,n)},sh.prototype.N=function(){2&this.f||(this.f|=2,this.o=t0,t0=this)},sh.prototype.d=function(){this.f|=8,1&this.f||lv(this)},sh.prototype.dispose=function(){this.d()};function rv(n,t){var i=new sh(n,t);try{i.c()}catch(u){throw i.d(),u}var s=i.d.bind(i);return s[Symbol.dispose]=s,s}var ov={exports:{}},uv={},t6;function WD(){if(t6)return uv;t6=1;var n=H;function t(_,x){return _===x&&(_!==0||1/_===1/x)||_!==_&&x!==x}var i=typeof Object.is=="function"?Object.is:t,s=n.useState,u=n.useEffect,c=n.useLayoutEffect,f=n.useDebugValue;function p(_,x){var D=x(),A=s({inst:{value:D,getSnapshot:x}}),N=A[0].inst,R=A[1];return c(function(){N.value=D,N.getSnapshot=x,m(N)&&R({inst:N})},[_,D,x]),u(function(){return m(N)&&R({inst:N}),_(function(){m(N)&&R({inst:N})})},[_]),f(D),D}function m(_){var x=_.getSnapshot;_=_.value;try{var D=x();return!i(_,D)}catch{return!0}}function S(_,x){return x()}var b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?S:p;return uv.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:b,uv}var e6={},n6;function $D(){return n6||(n6=1,process.env.NODE_ENV!=="production"&&(function(){function n(D,A){return D===A&&(D!==0||1/D===1/A)||D!==D&&A!==A}function t(D,A){b||u.startTransition===void 0||(b=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var N=A();if(!_){var R=A();c(N,R)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),_=!0)}R=f({inst:{value:N,getSnapshot:A}});var O=R[0].inst,U=R[1];return m(function(){O.value=N,O.getSnapshot=A,i(O)&&U({inst:O})},[D,N,A]),p(function(){return i(O)&&U({inst:O}),D(function(){i(O)&&U({inst:O})})},[D]),S(N),N}function i(D){var A=D.getSnapshot;D=D.value;try{var N=A();return!c(D,N)}catch{return!0}}function s(D,A){return A()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var u=H,c=typeof Object.is=="function"?Object.is:n,f=u.useState,p=u.useEffect,m=u.useLayoutEffect,S=u.useDebugValue,b=!1,_=!1,x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?s:t;e6.useSyncExternalStore=u.useSyncExternalStore!==void 0?u.useSyncExternalStore:x,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),e6}var a6;function tA(){return a6||(a6=1,process.env.NODE_ENV==="production"?ov.exports=WD():ov.exports=$D()),ov.exports}var eA=tA(),nA=H.version.split(".").map(Number)[0],i6=[],aA=Symbol.for(nA>=19?"react.transitional.element":"react.element"),pc,s6=Symbol.dispose||Symbol.for("Symbol.dispose");function cv(n,t){var i=t.effect.S();return pc=t,iA.bind(t,n,i)}function iA(n,t){t(),pc=n}var l6,fv,r6=function(){},sA=((l6={o:0,effect:{s:void 0,c:function(){},S:function(){return r6},d:function(){}},subscribe:function(){return r6},getSnapshot:function(){return 0},S:function(){},f:function(){}})[s6]=function(){},l6),lA=Promise.prototype.then.bind(Promise.resolve());function rA(){fv||(fv=lA(oA))}function oA(){var n;fv=void 0,(n=pc)==null||n.f()}function uA(n){rA();var t=H.useRef();t.current==null&&(typeof window>"u"?t.current=sA:t.current=(function(s){var u,c,f,p,m=0,S=rv(function(){c=this});return c.c=function(){m=m+1|0,p&&p()},(u={o:s,effect:c,subscribe:function(b){return p=b,function(){m=m+1|0,p=void 0,S()}},getSnapshot:function(){return m},S:function(){if(pc!=null){var b=pc.o,_=this.o;b==0&&_==0||b==0&&_==1?(pc.f(),f=cv(void 0,this)):b==1&&_==0||b==2&&_==0||(f=cv(pc,this))}else f=cv(void 0,this)},f:function(){var b=f;f=void 0,b?.()}})[s6]=function(){this.f()},u})(n));var i=t.current;return eA.useSyncExternalStore(i.subscribe,i.getSnapshot,i.getSnapshot),i.S(),i}Object.defineProperties(Fa.prototype,{$$typeof:{configurable:!0,value:aA},type:{configurable:!0,value:function(n){var t=n.data,i=uA(1);try{return t.value}finally{i.f()}}},props:{configurable:!0,get:function(){return{data:this}}},ref:{configurable:!0,value:null}});function Ko(n,t){return H.useMemo(function(){return kD(n,t)},i6)}function lh(n,t){var i=H.useRef(n);i.current=n,H.useEffect(function(){return rv(function(){return i.current()},t)},i6)}const o6=H.createContext(void 0),u6=()=>H.useContext(o6),cA=(n,t)=>{const{name:i,value:s,checked:u=!1,partial:c=!1,readOnly:f=!1,onChange:p,children:m,className:S}=n,[b,_]=H.useState(i),[x,D]=H.useState(f),A=H.useRef(void 0),N=H.useRef(void 0),R=H.useRef(void 0),O=H.useRef(void 0),U=H.useRef(void 0),j=H.useRef(void 0),V=u6(),F=J1(),$=H.useId(),st=H.useMemo(()=>F?.sharedId||n.id||$,[F?.sharedId,n.id,$]),[I,et,nt]=ZD({checked:!1,partial:!1}),bt=Q4(u),lt=Q4(c);H.useEffect(()=>{if(I.initial)et({checked:c?!1:u,partial:c});else{const Z=bt.changed?u:I.value.checked,K=lt.changed?c:I.value.partial;et({checked:K?!1:Z,partial:K})}},[u,c]),H.useEffect(()=>{D(f)},[f]),H.useEffect(()=>{V&&(A.current=V.nameSignal,N.current=V.valueSignal,R.current=V.readOnlySignal,O.current=V.useComparator,U.current=V.compare,j.current=V.onCheckboxChange)},[V]),lh(()=>{if(N.current)if(O.current?.value&&U.current){const Z=U.current,K=N.current.value?.some(at=>Z(s,at))??!1;et(at=>({...at,checked:K}))}else{const Z=N.current.value?.some(K=>s===K)??!1;et(K=>({...K,checked:Z}))}}),lh(()=>{A.current&&_(A.current.value)}),lh(()=>{R.current&&D(R.current.value??!1)});const dt=Wp(Z=>{const K=nt.current?.value.partial===!0?!0:Z.target.checked;et({checked:K,partial:!1}),j.current?j.current({originalEvent:Z,name:b,value:s,checked:K}):p?.({originalEvent:Z,name:b,value:s,checked:K})}),pt=Z=>{const K={checked:Z?!1:nt.current?.value.checked??!1,partial:Z};et(K)},tt=Z=>{et({checked:Z,partial:!1})};H.useImperativeHandle(t,()=>({setPartiallyChecked:pt,setChecked:tt}));const w=b&&Ja.jsx(av,{id:st,name:b,type:"checkbox",checked:I.value.checked,readOnly:x,onChange:dt});return $p({wrapperElement:"label",renderProps:{...I.value,readOnly:x},elementProps:{htmlFor:st},className:S,innerWrapperElement:w,children:m})},c6=H.memo(H.forwardRef(cA)),fA=(n,t)=>n&&t&&typeof n=="object"&&typeof t=="object"&&"value"in n&&"value"in t?n.value===t.value:n===t,f6=(n=fA)=>Wp((t,i)=>{if(typeof n=="string"){const s=n;return t?.[s]===i?.[s]}return n(t,i)}),h6=({props:n,children:t})=>Ja.jsx(o6.Provider,{value:n,children:t}),hA=({name:n,value:t,comparator:i,readOnly:s=!1,onChange:u,className:c,children:f})=>{const p=Ko(),m=Ko(),S=Ko(),b=Ko(),_=f6(i),x=Wp(A=>{if(A){const{checked:N}=A,R=A.value;if(m.value)if(i)if(N)m.value.findIndex(O=>_(R,O))===-1&&m.value.push(R);else{const O=m.value.filter(U=>!_(R,U));m.value=[...O]}else if(N)m.value.indexOf(R)===-1&&m.value.push(R);else{const O=m.value.filter(U=>U!==R);m.value=[...O]}else N&&(m.value=[R])}u?.({originalEvent:A?.originalEvent,name:n,value:m.value})}),D=H.useMemo(()=>({nameSignal:p,valueSignal:m,readOnlySignal:S,useComparator:b,compare:_,onCheckboxChange:x}),[]);return H.useEffect(()=>{p.value=n},[n]),H.useEffect(()=>{m.value=t},[t]),H.useEffect(()=>{S.value=s},[s]),H.useEffect(()=>{b.value=i!==void 0},[i]),Ja.jsx("div",{className:c,children:Ja.jsx(h6,{props:D,children:f})})},d6=H.memo(hA),rh=({className:n,children:t})=>{const i=H.useId(),s=H.useMemo(()=>({sharedId:i}),[i]),u=Ja.jsx(Z4.Provider,{value:s,children:t});return $p({wrapperElement:"div",className:n,children:u})},dA=({htmlFor:n,className:t,children:i})=>{const s=J1(),u=H.useMemo(()=>s?.sharedId||n,[s?.sharedId,n]);return $p({wrapperElement:"label",elementProps:{htmlFor:u},className:t,children:i})};var p6={exports:{}},m6;function pA(){return m6||(m6=1,(function(n){(function(){var t={}.hasOwnProperty;function i(){for(var c="",f=0;f<arguments.length;f++){var p=arguments[f];p&&(c=u(c,s(p)))}return c}function s(c){if(typeof c=="string"||typeof c=="number")return c;if(typeof c!="object")return"";if(Array.isArray(c))return i.apply(null,c);if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]"))return c.toString();var f="";for(var p in c)t.call(c,p)&&c[p]&&(f=u(f,p));return f}function u(c,f){return f?c?c+" "+f:c+f:c}n.exports?(i.default=i,n.exports=i):window.classNames=i})()})(p6)),p6.exports}pA();const mA=({intersectionObserver:n,resizeObserver:t,page:i,height:s,children:u})=>{const c=H.useRef(void 0);H.useEffect(()=>()=>{c.current&&(n?.unobserve(c.current),t?.unobserve(c.current))},[]),H.useEffect(()=>(c.current&&n?.observe(c.current),()=>{c.current&&n&&n.unobserve(c.current)}),[n]);const f=m=>{c.current&&(n?.unobserve(c.current),t?.unobserve(c.current)),n?.observe(m),t?.observe(m),c.current=m},p=s?{height:`${s}px`}:{};return Ja.jsx("div",{"data-page":i,"data-name":"page",style:p,ref:m=>{m&&f(m)},children:u})};H.memo(mA);const gA=({intersectionObserver:n,page:t})=>{const i=H.useRef(void 0);H.useEffect(()=>()=>{i.current&&n?.unobserve(i.current)},[]);const s=u=>{i.current&&n?.unobserve(i.current),n?.observe(u),i.current=u};return Ja.jsx("div",{"data-page":t,"data-name":"marker",ref:u=>{u&&s(u)}})};H.memo(gA);const yA=({name:n,value:t,comparator:i,readOnly:s=!1,onChange:u,className:c,children:f})=>{const p=Ko(),m=Ko(),S=Ko(),b=Ko(),_=f6(i),x=H.useMemo(()=>({nameSignal:p,valueSignal:m,readOnlySignal:S,useComparator:b,compare:_}),[]);H.useEffect(()=>{p.value=n},[n]),H.useEffect(()=>{m.value=t},[t]),H.useEffect(()=>{S.value=s},[s]),H.useEffect(()=>{b.value=i!==void 0},[i]);const D=Wp(A=>{u?.({originalEvent:A,name:n,value:m.value})});return Ja.jsx("div",{className:c,onChange:D,children:Ja.jsx(h6,{props:x,children:f})})},g6=H.memo(yA),vA=({value:n,className:t,children:i})=>{const[s,u]=H.useState(),[c,f]=H.useState(!1),[p,m]=H.useState(!1),S=H.useRef(void 0),b=H.useRef(void 0),_=H.useRef(void 0),x=H.useRef(void 0),D=H.useRef(void 0),A=u6(),N=J1(),R=H.useId(),O=H.useMemo(()=>N?.sharedId||R,[N?.sharedId,R]);H.useEffect(()=>{A&&(S.current=A.nameSignal,b.current=A.valueSignal,_.current=A.readOnlySignal,x.current=A.useComparator,D.current=A.compare)},[A]),lh(()=>{x&&b.current&&D.current?f(D.current(n,b.current.value)):f(n===b.current?.value)}),lh(()=>{u(S.current?.value)}),lh(()=>{m(_.current?.value??!1)});const U=Wp(j=>{j.target.checked&&b.current&&(b.current.value=n)});return $p({wrapperElement:"label",renderProps:{checked:c,readOnly:p},elementProps:{htmlFor:O},className:t,innerWrapperElement:s?Ja.jsx(av,{id:O,name:s,type:"radio",value:n,checked:c,readOnly:p,onChange:U}):null,children:i})},y6=H.memo(vA),SA=(n,t)=>{const{id:i,name:s,value:u,toggled:c=!1,readOnly:f,onChange:p,children:m,className:S}=n,[b,_]=H.useState(c),x=J1(),D=H.useId(),A=H.useMemo(()=>x?.sharedId||i||D,[x?.sharedId,i,D]);H.useEffect(()=>{_(c)},[c]);const N=O=>{_(O.target.checked),p?.({originalEvent:O,name:s,value:u,checked:O.target.checked})},R=O=>{_(O)};return H.useImperativeHandle(t,()=>({setToggled:R})),$p({wrapperElement:"label",renderProps:{toggled:b,readOnly:f},elementProps:{htmlFor:A},className:S,innerWrapperElement:Ja.jsx(av,{id:A,name:s,type:"checkbox",checked:b,readOnly:f,onChange:N}),children:m})},bA=H.memo(H.forwardRef(SA)),hv=n=>{const[t,i]=H.useState(!0),s=j4();return H.useEffect(()=>{s&&s.useAnimations!==void 0?i(s.useAnimations):n!==void 0&&i(n)},[s,n]),t},wr=({label:n,htmlFor:t,readOnly:i=!1,className:s})=>{const u=Se("bc-label",{"bsc:text-black bsc:dark:text-mono-light-1":!i,"bc-read-only bsc:text-gray-4 bsc:dark:text-mono-light-3 bsc:pointer-events-none":i},s);return X.jsx(dA,{htmlFor:t,className:u,children:n})},EA=(n,t)=>{const{name:i,label:s,value:u,readOnly:c=!1,checked:f=!1,partial:p=!1,labelLocation:m=Es.Right,className:S,useAnimation:b,onChange:_}=n,x=hv(b),D=Se("bc-checkbox-wrapper bsc:flex bsc:items-center bsc:group/wrapper bsc:*:cursor-pointer bsc:has-data-read-only:text-gray-4 bsc:dark:has-data-read-only:text-mono-light-3 bsc:has-data-read-only:pointer-events-none",S),A=Se("bc-checkbox-label bsc:peer-data-read-only:text-gray-4 bsc:dark:peer-data-read-only:text-mono-light-3",{"bsc:ml-2":m===Es.Right,"bsc:mr-2":m===Es.Left}),N=kp(nh.FocusWithin),R=Se("bc-checkbox-outer bsc:group/checkbox bsc:peer bsc:rounded bsc:*:block bsc:*:size-[21px]","bsc:inset-shadow-[0_0_0_1px] bsc:inset-shadow-gray-2 bsc:dark:inset-shadow-[0_0_0_1px] bsc:dark:inset-shadow-mono-light-2","bsc:group-hover/wrapper:not-data-checked:inset-shadow-[0_0_0_2px] bsc:group-hover/wrapper:not-data-checked:inset-shadow-gray-4","bsc:dark:group-hover/wrapper:not-data-checked:inset-shadow-[0_0_0_2px] bsc:[transition:box-shadow_0.3s]",N),O=Se("bc-checkbox-svg bsc:rounded bsc:stroke-mono-light-1 bsc:stroke-2 bsc:[stroke-linecap:round]","bsc:[stroke-linejoin:round] bsc:dark:stroke-mono-dark-3 bsc:[transform:scale(0)]","bsc:group-data-checked/checkbox:group-data-read-only/checkbox:bg-primary-4 bsc:group-data-checked/checkbox:group-data-read-only/checkbox:fill-primary-4 bsc:group-data-partial/checkbox:group-data-read-only/checkbox:bg-primary-4 bsc:group-data-partial/checkbox:group-data-read-only/checkbox:fill-primary-4 bsc:dark:group-data-checked/checkbox:group-data-read-only/checkbox:bg-mono-light-3 bsc:dark:group-data-checked/checkbox:group-data-read-only/checkbox:fill-mono-light-3 bsc:dark:group-data-partial/checkbox:group-data-read-only/checkbox:bg-mono-light-3 bsc:dark:group-data-partial/checkbox:group-data-read-only/checkbox:fill-mono-light-3","bsc:group-data-checked/checkbox:group-not-data-read-only/checkbox:bg-primary-1 bsc:group-data-checked/checkbox:group-not-data-read-only/checkbox:fill-primary-1 bsc:group-data-partial/checkbox:bg-primary-1 bsc:group-data-partial/checkbox:fill-primary-1 bsc:dark:group-data-checked/checkbox:bg-mono-light-1 bsc:dark:group-data-checked/checkbox:fill-mono-light-1 bsc:dark:group-data-partial/checkbox:bg-mono-light-1 bsc:dark:group-data-partial/checkbox:fill-mono-light-1",{"bsc:group-data-checked/checkbox:group-not-data-read-only/checkbox:animate-bounce bsc:group-data-partial/checkbox:group-not-data-read-only/checkbox:animate-bounce bsc:group-data-checked/checkbox:group-data-read-only/checkbox:[transform:scale(1)] bsc:group-data-partial/checkbox:group-data-read-only/checkbox:[transform:scale(1)]":x,"bsc:group-data-checked/checkbox:[transform:scale(1)] bsc:group-data-partial/checkbox:[transform:scale(1)]":!x});return X.jsxs(rh,{className:D,children:[s&&m===Es.Left&&X.jsx(wr,{label:s,readOnly:c,className:A}),X.jsx(c6,{ref:t,name:i,value:u,checked:f,partial:p,readOnly:c,className:R,onChange:_,children:X.jsxs("svg",{viewBox:"0 0 21 21",className:O,children:[X.jsx("polyline",{className:"bsc:[visibility:hidden] bsc:group-data-checked/checkbox:visible",points:"5 10.75 8.5 14.25 16 6"}),X.jsx("polyline",{className:"bsc:[visibility:hidden] bsc:group-data-partial/checkbox:visible",points:"6 10.5 16 10.5"})]})}),s&&m===Es.Right&&X.jsx(wr,{label:s,readOnly:c,className:A})]})},v6=H.memo(H.forwardRef(EA)),TA=({name:n,label:t,value:i,data:s,textField:u,valueField:c,readOnly:f=!1,orientation:p=Za.Vertical,className:m,onChange:S})=>{const[b,_]=H.useState([]),x=tv(()=>s,[s]);H.useEffect(()=>{_(i??[])},[i]);const D=U=>{if(U){const{value:j}=U;_(j??[]),S?.({name:n,value:j})}},A=(U,j)=>X.jsx(v6,{label:U[u],value:U[c],className:"bsc:mr-3"},`${n}_checkbox_${j}`),N=Se("bsc:flex bsc:flex-col bsc:gap-1",m),R=Se("bsc:flex bsc:gap-1",{"bsc:flex-col":p===Za.Vertical}),O=U=>X.jsx(d6,{name:n,value:b,readOnly:f,onChange:D,className:R,children:U.map(A)});return X.jsxs("div",{className:N,children:[t&&X.jsx(wr,{label:t,readOnly:f}),x&&O(x)]})},CA=H.memo(TA);var S6=typeof global=="object"&&global&&global.Object===Object&&global,_A=typeof self=="object"&&self&&self.Object===Object&&self,rl=S6||_A||Function("return this")(),oh=rl.Symbol,b6=Object.prototype,xA=b6.hasOwnProperty,DA=b6.toString,e0=oh?oh.toStringTag:void 0;function AA(n){var t=xA.call(n,e0),i=n[e0];try{n[e0]=void 0;var s=!0}catch{}var u=DA.call(n);return s&&(t?n[e0]=i:delete n[e0]),u}var MA=Object.prototype,NA=MA.toString;function OA(n){return NA.call(n)}var RA="[object Null]",zA="[object Undefined]",E6=oh?oh.toStringTag:void 0;function uh(n){return n==null?n===void 0?zA:RA:E6&&E6 in Object(n)?AA(n):OA(n)}function ch(n){return n!=null&&typeof n=="object"}var HA="[object Symbol]";function wA(n){return typeof n=="symbol"||ch(n)&&uh(n)==HA}var dv=Array.isArray,UA=/\s/;function BA(n){for(var t=n.length;t--&&UA.test(n.charAt(t)););return t}var VA=/^\s+/;function GA(n){return n&&n.slice(0,BA(n)+1).replace(VA,"")}function Qo(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}var T6=NaN,jA=/^[-+]0x[0-9a-f]+$/i,LA=/^0b[01]+$/i,PA=/^0o[0-7]+$/i,YA=parseInt;function C6(n){if(typeof n=="number")return n;if(wA(n))return T6;if(Qo(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=Qo(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=GA(n);var i=LA.test(n);return i||PA.test(n)?YA(n.slice(2),i?2:8):jA.test(n)?T6:+n}var qA="[object AsyncFunction]",XA="[object Function]",KA="[object GeneratorFunction]",QA="[object Proxy]";function _6(n){if(!Qo(n))return!1;var t=uh(n);return t==XA||t==KA||t==qA||t==QA}var pv=rl["__core-js_shared__"],x6=(function(){var n=/[^.]+$/.exec(pv&&pv.keys&&pv.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function ZA(n){return!!x6&&x6 in n}var JA=Function.prototype,FA=JA.toString;function mc(n){if(n!=null){try{return FA.call(n)}catch{}try{return n+""}catch{}}return""}var kA=/[\\^$.*+?()[\]{}|]/g,IA=/^\[object .+?Constructor\]$/,WA=Function.prototype,$A=Object.prototype,tM=WA.toString,eM=$A.hasOwnProperty,nM=RegExp("^"+tM.call(eM).replace(kA,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function aM(n){if(!Qo(n)||ZA(n))return!1;var t=_6(n)?nM:IA;return t.test(mc(n))}function iM(n,t){return n?.[t]}function gc(n,t){var i=iM(n,t);return aM(i)?i:void 0}var mv=gc(rl,"WeakMap"),D6=Object.create,sM=(function(){function n(){}return function(t){if(!Qo(t))return{};if(D6)return D6(t);n.prototype=t;var i=new n;return n.prototype=void 0,i}})(),A6=(function(){try{var n=gc(Object,"defineProperty");return n({},"",{}),n}catch{}})();function lM(n,t){for(var i=-1,s=n==null?0:n.length;++i<s&&t(n[i],i,n)!==!1;);return n}var rM=9007199254740991,oM=/^(?:0|[1-9]\d*)$/;function uM(n,t){var i=typeof n;return t=t??rM,!!t&&(i=="number"||i!="symbol"&&oM.test(n))&&n>-1&&n%1==0&&n<t}function cM(n,t,i){t=="__proto__"&&A6?A6(n,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[t]=i}function M6(n,t){return n===t||n!==n&&t!==t}var fM=Object.prototype,hM=fM.hasOwnProperty;function dM(n,t,i){var s=n[t];(!(hM.call(n,t)&&M6(s,i))||i===void 0&&!(t in n))&&cM(n,t,i)}var pM=9007199254740991;function N6(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=pM}function mM(n){return n!=null&&N6(n.length)&&!_6(n)}var gM=Object.prototype;function O6(n){var t=n&&n.constructor,i=typeof t=="function"&&t.prototype||gM;return n===i}function yM(n,t){for(var i=-1,s=Array(n);++i<n;)s[i]=t(i);return s}var vM="[object Arguments]";function R6(n){return ch(n)&&uh(n)==vM}var z6=Object.prototype,SM=z6.hasOwnProperty,bM=z6.propertyIsEnumerable,EM=R6((function(){return arguments})())?R6:function(n){return ch(n)&&SM.call(n,"callee")&&!bM.call(n,"callee")};function TM(){return!1}var H6=typeof $t=="object"&&$t&&!$t.nodeType&&$t,w6=H6&&typeof module=="object"&&module&&!module.nodeType&&module,CM=w6&&w6.exports===H6,U6=CM?rl.Buffer:void 0,_M=U6?U6.isBuffer:void 0,B6=_M||TM,xM="[object Arguments]",DM="[object Array]",AM="[object Boolean]",MM="[object Date]",NM="[object Error]",OM="[object Function]",RM="[object Map]",zM="[object Number]",HM="[object Object]",wM="[object RegExp]",UM="[object Set]",BM="[object String]",VM="[object WeakMap]",GM="[object ArrayBuffer]",jM="[object DataView]",LM="[object Float32Array]",PM="[object Float64Array]",YM="[object Int8Array]",qM="[object Int16Array]",XM="[object Int32Array]",KM="[object Uint8Array]",QM="[object Uint8ClampedArray]",ZM="[object Uint16Array]",JM="[object Uint32Array]",sn={};sn[LM]=sn[PM]=sn[YM]=sn[qM]=sn[XM]=sn[KM]=sn[QM]=sn[ZM]=sn[JM]=!0,sn[xM]=sn[DM]=sn[GM]=sn[AM]=sn[jM]=sn[MM]=sn[NM]=sn[OM]=sn[RM]=sn[zM]=sn[HM]=sn[wM]=sn[UM]=sn[BM]=sn[VM]=!1;function FM(n){return ch(n)&&N6(n.length)&&!!sn[uh(n)]}function gv(n){return function(t){return n(t)}}var V6=typeof $t=="object"&&$t&&!$t.nodeType&&$t,n0=V6&&typeof module=="object"&&module&&!module.nodeType&&module,kM=n0&&n0.exports===V6,yv=kM&&S6.process,fh=(function(){try{var n=n0&&n0.require&&n0.require("util").types;return n||yv&&yv.binding&&yv.binding("util")}catch{}})(),G6=fh&&fh.isTypedArray,IM=G6?gv(G6):FM,WM=Object.prototype,$M=WM.hasOwnProperty;function tN(n,t){var i=dv(n),s=!i&&EM(n),u=!i&&!s&&B6(n),c=!i&&!s&&!u&&IM(n),f=i||s||u||c,p=f?yM(n.length,String):[],m=p.length;for(var S in n)$M.call(n,S)&&!(f&&(S=="length"||u&&(S=="offset"||S=="parent")||c&&(S=="buffer"||S=="byteLength"||S=="byteOffset")||uM(S,m)))&&p.push(S);return p}function j6(n,t){return function(i){return n(t(i))}}var eN=j6(Object.keys,Object),nN=Object.prototype,aN=nN.hasOwnProperty;function iN(n){if(!O6(n))return eN(n);var t=[];for(var i in Object(n))aN.call(n,i)&&i!="constructor"&&t.push(i);return t}function sN(n){return mM(n)?tN(n):iN(n)}var a0=gc(Object,"create");function lN(){this.__data__=a0?a0(null):{},this.size=0}function rN(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}var oN="__lodash_hash_undefined__",uN=Object.prototype,cN=uN.hasOwnProperty;function fN(n){var t=this.__data__;if(a0){var i=t[n];return i===oN?void 0:i}return cN.call(t,n)?t[n]:void 0}var hN=Object.prototype,dN=hN.hasOwnProperty;function pN(n){var t=this.__data__;return a0?t[n]!==void 0:dN.call(t,n)}var mN="__lodash_hash_undefined__";function gN(n,t){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=a0&&t===void 0?mN:t,this}function yc(n){var t=-1,i=n==null?0:n.length;for(this.clear();++t<i;){var s=n[t];this.set(s[0],s[1])}}yc.prototype.clear=lN,yc.prototype.delete=rN,yc.prototype.get=fN,yc.prototype.has=pN,yc.prototype.set=gN;function yN(){this.__data__=[],this.size=0}function k1(n,t){for(var i=n.length;i--;)if(M6(n[i][0],t))return i;return-1}var vN=Array.prototype,SN=vN.splice;function bN(n){var t=this.__data__,i=k1(t,n);if(i<0)return!1;var s=t.length-1;return i==s?t.pop():SN.call(t,i,1),--this.size,!0}function EN(n){var t=this.__data__,i=k1(t,n);return i<0?void 0:t[i][1]}function TN(n){return k1(this.__data__,n)>-1}function CN(n,t){var i=this.__data__,s=k1(i,n);return s<0?(++this.size,i.push([n,t])):i[s][1]=t,this}function Ur(n){var t=-1,i=n==null?0:n.length;for(this.clear();++t<i;){var s=n[t];this.set(s[0],s[1])}}Ur.prototype.clear=yN,Ur.prototype.delete=bN,Ur.prototype.get=EN,Ur.prototype.has=TN,Ur.prototype.set=CN;var i0=gc(rl,"Map");function _N(){this.size=0,this.__data__={hash:new yc,map:new(i0||Ur),string:new yc}}function xN(n){var t=typeof n;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?n!=="__proto__":n===null}function I1(n,t){var i=n.__data__;return xN(t)?i[typeof t=="string"?"string":"hash"]:i.map}function DN(n){var t=I1(this,n).delete(n);return this.size-=t?1:0,t}function AN(n){return I1(this,n).get(n)}function MN(n){return I1(this,n).has(n)}function NN(n,t){var i=I1(this,n),s=i.size;return i.set(n,t),this.size+=i.size==s?0:1,this}function hh(n){var t=-1,i=n==null?0:n.length;for(this.clear();++t<i;){var s=n[t];this.set(s[0],s[1])}}hh.prototype.clear=_N,hh.prototype.delete=DN,hh.prototype.get=AN,hh.prototype.has=MN,hh.prototype.set=NN;function ON(n,t){for(var i=-1,s=t.length,u=n.length;++i<s;)n[u+i]=t[i];return n}var RN=j6(Object.getPrototypeOf,Object);function zN(){this.__data__=new Ur,this.size=0}function HN(n){var t=this.__data__,i=t.delete(n);return this.size=t.size,i}function wN(n){return this.__data__.get(n)}function UN(n){return this.__data__.has(n)}var BN=200;function VN(n,t){var i=this.__data__;if(i instanceof Ur){var s=i.__data__;if(!i0||s.length<BN-1)return s.push([n,t]),this.size=++i.size,this;i=this.__data__=new hh(s)}return i.set(n,t),this.size=i.size,this}function dh(n){var t=this.__data__=new Ur(n);this.size=t.size}dh.prototype.clear=zN,dh.prototype.delete=HN,dh.prototype.get=wN,dh.prototype.has=UN,dh.prototype.set=VN;var L6=typeof $t=="object"&&$t&&!$t.nodeType&&$t,P6=L6&&typeof module=="object"&&module&&!module.nodeType&&module,GN=P6&&P6.exports===L6,Y6=GN?rl.Buffer:void 0;Y6&&Y6.allocUnsafe;function jN(n,t){return n.slice()}function LN(n,t){for(var i=-1,s=n==null?0:n.length,u=0,c=[];++i<s;){var f=n[i];t(f,i,n)&&(c[u++]=f)}return c}function PN(){return[]}var YN=Object.prototype,qN=YN.propertyIsEnumerable,q6=Object.getOwnPropertySymbols,XN=q6?function(n){return n==null?[]:(n=Object(n),LN(q6(n),function(t){return qN.call(n,t)}))}:PN;function KN(n,t,i){var s=t(n);return dv(n)?s:ON(s,i(n))}function QN(n){return KN(n,sN,XN)}var vv=gc(rl,"DataView"),Sv=gc(rl,"Promise"),bv=gc(rl,"Set"),X6="[object Map]",ZN="[object Object]",K6="[object Promise]",Q6="[object Set]",Z6="[object WeakMap]",J6="[object DataView]",JN=mc(vv),FN=mc(i0),kN=mc(Sv),IN=mc(bv),WN=mc(mv),Br=uh;(vv&&Br(new vv(new ArrayBuffer(1)))!=J6||i0&&Br(new i0)!=X6||Sv&&Br(Sv.resolve())!=K6||bv&&Br(new bv)!=Q6||mv&&Br(new mv)!=Z6)&&(Br=function(n){var t=uh(n),i=t==ZN?n.constructor:void 0,s=i?mc(i):"";if(s)switch(s){case JN:return J6;case FN:return X6;case kN:return K6;case IN:return Q6;case WN:return Z6}return t});var $N=Object.prototype,tO=$N.hasOwnProperty;function eO(n){var t=n.length,i=new n.constructor(t);return t&&typeof n[0]=="string"&&tO.call(n,"index")&&(i.index=n.index,i.input=n.input),i}var F6=rl.Uint8Array;function Ev(n){var t=new n.constructor(n.byteLength);return new F6(t).set(new F6(n)),t}function nO(n,t){var i=Ev(n.buffer);return new n.constructor(i,n.byteOffset,n.byteLength)}var aO=/\w*$/;function iO(n){var t=new n.constructor(n.source,aO.exec(n));return t.lastIndex=n.lastIndex,t}var k6=oh?oh.prototype:void 0,I6=k6?k6.valueOf:void 0;function sO(n){return I6?Object(I6.call(n)):{}}function lO(n,t){var i=Ev(n.buffer);return new n.constructor(i,n.byteOffset,n.length)}var rO="[object Boolean]",oO="[object Date]",uO="[object Map]",cO="[object Number]",fO="[object RegExp]",hO="[object Set]",dO="[object String]",pO="[object Symbol]",mO="[object ArrayBuffer]",gO="[object DataView]",yO="[object Float32Array]",vO="[object Float64Array]",SO="[object Int8Array]",bO="[object Int16Array]",EO="[object Int32Array]",TO="[object Uint8Array]",CO="[object Uint8ClampedArray]",_O="[object Uint16Array]",xO="[object Uint32Array]";function DO(n,t,i){var s=n.constructor;switch(t){case mO:return Ev(n);case rO:case oO:return new s(+n);case gO:return nO(n);case yO:case vO:case SO:case bO:case EO:case TO:case CO:case _O:case xO:return lO(n);case uO:return new s;case cO:case dO:return new s(n);case fO:return iO(n);case hO:return new s;case pO:return sO(n)}}function AO(n){return typeof n.constructor=="function"&&!O6(n)?sM(RN(n)):{}}var MO="[object Map]";function NO(n){return ch(n)&&Br(n)==MO}var W6=fh&&fh.isMap,OO=W6?gv(W6):NO,RO="[object Set]";function zO(n){return ch(n)&&Br(n)==RO}var $6=fh&&fh.isSet,HO=$6?gv($6):zO,tb="[object Arguments]",wO="[object Array]",UO="[object Boolean]",BO="[object Date]",VO="[object Error]",eb="[object Function]",GO="[object GeneratorFunction]",jO="[object Map]",LO="[object Number]",nb="[object Object]",PO="[object RegExp]",YO="[object Set]",qO="[object String]",XO="[object Symbol]",KO="[object WeakMap]",QO="[object ArrayBuffer]",ZO="[object DataView]",JO="[object Float32Array]",FO="[object Float64Array]",kO="[object Int8Array]",IO="[object Int16Array]",WO="[object Int32Array]",$O="[object Uint8Array]",tR="[object Uint8ClampedArray]",eR="[object Uint16Array]",nR="[object Uint32Array]",Je={};Je[tb]=Je[wO]=Je[QO]=Je[ZO]=Je[UO]=Je[BO]=Je[JO]=Je[FO]=Je[kO]=Je[IO]=Je[WO]=Je[jO]=Je[LO]=Je[nb]=Je[PO]=Je[YO]=Je[qO]=Je[XO]=Je[$O]=Je[tR]=Je[eR]=Je[nR]=!0,Je[VO]=Je[eb]=Je[KO]=!1;function W1(n,t,i,s,u,c){var f;if(f!==void 0)return f;if(!Qo(n))return n;var p=dv(n);if(p)f=eO(n);else{var m=Br(n),S=m==eb||m==GO;if(B6(n))return jN(n);if(m==nb||m==tb||S&&!u)f=S?{}:AO(n);else{if(!Je[m])return u?n:{};f=DO(n,m)}}c||(c=new dh);var b=c.get(n);if(b)return b;c.set(n,f),HO(n)?n.forEach(function(D){f.add(W1(D,t,i,D,n,c))}):OO(n)&&n.forEach(function(D,A){f.set(A,W1(D,t,i,A,n,c))});var _=QN,x=p?void 0:_(n);return lM(x||n,function(D,A){x&&(A=D,D=n[A]),dM(f,A,W1(D,t,i,A,n,c))}),f}var aR=1,iR=4;function sR(n){return W1(n,aR|iR)}var Tv=function(){return rl.Date.now()},lR="Expected a function",rR=Math.max,oR=Math.min;function s0(n,t,i){var s,u,c,f,p,m,S=0,b=!1,_=!1,x=!0;if(typeof n!="function")throw new TypeError(lR);t=C6(t)||0,Qo(i)&&(b=!!i.leading,_="maxWait"in i,c=_?rR(C6(i.maxWait)||0,t):c,x="trailing"in i?!!i.trailing:x);function D($){var st=s,I=u;return s=u=void 0,S=$,f=n.apply(I,st),f}function A($){return S=$,p=setTimeout(O,t),b?D($):f}function N($){var st=$-m,I=$-S,et=t-st;return _?oR(et,c-I):et}function R($){var st=$-m,I=$-S;return m===void 0||st>=t||st<0||_&&I>=c}function O(){var $=Tv();if(R($))return U($);p=setTimeout(O,N($))}function U($){return p=void 0,x&&s?D($):(s=u=void 0,f)}function j(){p!==void 0&&clearTimeout(p),S=0,s=m=u=p=void 0}function V(){return p===void 0?f:U(Tv())}function F(){var $=Tv(),st=R($);if(s=arguments,u=this,m=$,st){if(p===void 0)return A(m);if(_)return clearTimeout(p),p=setTimeout(O,t),D(m)}return p===void 0&&(p=setTimeout(O,t)),f}return F.cancel=j,F.flush=V,F}var uR="Expected a function";function cR(n,t,i){var s=!0,u=!0;if(typeof n!="function")throw new TypeError(uR);return Qo(i)&&(s="leading"in i?!0:s,u="trailing"in i?!!i.trailing:u),s0(n,t,{leading:s,maxWait:t,trailing:u})}const fR=(n,t)=>{const{value:i,readOnly:s=!1,debounceTime:u=800,fillContainer:c=!0,leftElement:f,rightElement:p,className:m,leftElementClassName:S,rightElementClassName:b,isSingleLine:_=!0,allowSingleLineScroll:x=!1,inputMode:D,placeholder:A,onFocus:N,onBlur:R,onInput:O,onInnerTextChange:U,onInnerHTMLChange:j,onElementCreate:V,onLeftElementClick:F,onRightElementClick:$}=n,st=H.useRef("bsc:grow bsc:focus:outline-hidden"),I=H.useRef("bsc:text-gray-4"),et=H.useRef(void 0),nt=H.useCallback(Tt=>{const Pt=Tt.target,le=Pt.innerHTML;Pt.className=`${st.current}`,A&&le===A&&(Pt.innerHTML=""),N?.(Tt)},[A,N]),bt=H.useCallback(Tt=>{const Pt=Tt.target.innerHTML;if(A&&Pt===""){const le=Tt.target;le.innerHTML=A,le.className=`${st.current} ${I.current}`}R?.(Tt)},[A,R]),lt=H.useCallback(Tt=>{et.current?.removeEventListener("focus",nt),et.current?.removeEventListener("blur",bt),A&&Tt&&Tt!==document.activeElement&&Tt.innerHTML===""&&(Tt.innerHTML=A,Tt.className=`${st.current} ${I.current}`),Tt.addEventListener("focus",nt),Tt.addEventListener("blur",bt),et.current=Tt},[A]),dt=H.useCallback(Tt=>{V?.(Tt)},[V]),pt=Tt=>{F?.(Tt)},tt=Tt=>{$?.(Tt)},w=s0(Tt=>{O?.(Tt),U?.(Tt.target.innerText),j?.(Tt.target.innerHTML)},u),Z=H.useCallback(Tt=>{et.current&&(et.current.innerText=Tt)},[]),K=H.useCallback(Tt=>{et.current&&(et.current.innerHTML=Tt)},[]),at=H.useCallback(()=>{et.current?.focus()},[]);H.useImperativeHandle(t,()=>({inputElement:et.current,setInnerText:Z,setInnerHTML:K,focus:at}));const St=Se({"bsc:w-full ":c},"bsc:flex bsc:flex-row bsc:items-center bsc:shadow-sm bsc:border bsc:border-solid bsc:border-gray-3 bsc:dark:border-white bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1 bsc:rounded-md bsc:p-2",{"bsc:overflow-x-auto bsc:overflow-y-hidden bsc:whitespace-pre":_&&x,"bsc:overflow-hidden bsc:whitespace-pre":_&&!x},m),W=Se("bsc:shrink",{"bsc:mr-2":f},S),gt=Se("bsc:shrink",{"bsc:ml-2":p},b);return X.jsxs("div",{className:St,ref:Tt=>{Tt&&dt(Tt)},children:[f&&X.jsx("div",{className:W,onClick:pt,children:f}),X.jsx("div",{ref:Tt=>{Tt&<(Tt)},className:st.current,contentEditable:!s,suppressContentEditableWarning:!0,inputMode:D,onInput:w,children:i}),p&&X.jsx("div",{className:gt,onClick:tt,children:p})]})},$1=H.forwardRef(fR);function Oe(n){const t=Object.prototype.toString.call(n);return n instanceof Date||typeof n=="object"&&t==="[object Date]"?new n.constructor(+n):typeof n=="number"||t==="[object Number]"||typeof n=="string"||t==="[object String]"?new Date(n):new Date(NaN)}function Fe(n,t){return n instanceof Date?new n.constructor(t):new Date(t)}function ph(n,t){const i=Oe(n);return isNaN(t)?Fe(n,NaN):(t&&i.setDate(i.getDate()+t),i)}function Zo(n,t){const i=Oe(n);if(isNaN(t))return Fe(n,NaN);if(!t)return i;const s=i.getDate(),u=Fe(n,i.getTime());u.setMonth(i.getMonth()+t+1,0);const c=u.getDate();return s>=c?u:(i.setFullYear(u.getFullYear(),u.getMonth(),s),i)}const ab=6048e5,Cv=6e4,_v=36e5,hR=1e3;let dR={};function l0(){return dR}function Jo(n,t){const i=l0(),s=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,u=Oe(n),c=u.getDay(),f=(c<s?7:0)+c-s;return u.setDate(u.getDate()-f),u.setHours(0,0,0,0),u}function mh(n){return Jo(n,{weekStartsOn:1})}function pR(n){const t=Oe(n),i=t.getFullYear(),s=Fe(n,0);s.setFullYear(i+1,0,4),s.setHours(0,0,0,0);const u=mh(s),c=Fe(n,0);c.setFullYear(i,0,4),c.setHours(0,0,0,0);const f=mh(c);return t.getTime()>=u.getTime()?i+1:t.getTime()>=f.getTime()?i:i-1}function ib(n){const t=Oe(n);return t.setHours(0,0,0,0),t}function sb(n){const t=Oe(n),i=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return i.setUTCFullYear(t.getFullYear()),+n-+i}function mR(n){const t=pR(n),i=Fe(n,0);return i.setFullYear(t,0,4),i.setHours(0,0,0,0),mh(i)}function r0(n,t){return Zo(n,t*12)}function lb(n,t){const i=ib(n),s=ib(t);return+i==+s}function gR(n){const t=Oe(n),i=t.getMonth();return t.setFullYear(t.getFullYear(),i+1,0),t.setHours(23,59,59,999),t}function yR(n,t){const i=Oe(n.start),s=Oe(n.end);let u=+i>+s;const c=u?+i:+s,f=u?s:i;f.setHours(0,0,0,0);let p=1;const m=[];for(;+f<=c;)m.push(Oe(f)),f.setDate(f.getDate()+p),f.setHours(0,0,0,0);return u?m.reverse():m}function rb(n){const t=Oe(n);return t.setDate(1),t.setHours(0,0,0,0),t}function vR(n,t){const i=Oe(n.start),s=Oe(n.end);let u=+i>+s;const c=u?+i:+s,f=u?s:i;f.setHours(0,0,0,0),f.setMonth(0,1);let p=1;const m=[];for(;+f<=c;)m.push(Oe(f)),f.setFullYear(f.getFullYear()+p);return u?m.reverse():m}const SR={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},bR=(n,t,i)=>{let s;const u=SR[n];return typeof u=="string"?s=u:t===1?s=u.one:s=u.other.replace("{{count}}",t.toString()),i?.addSuffix?i.comparison&&i.comparison>0?"in "+s:s+" ago":s};function xv(n){return(t={})=>{const i=t.width?String(t.width):n.defaultWidth;return n.formats[i]||n.formats[n.defaultWidth]}}const ER={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},TR={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},CR={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},_R={date:xv({formats:ER,defaultWidth:"full"}),time:xv({formats:TR,defaultWidth:"full"}),dateTime:xv({formats:CR,defaultWidth:"full"})},xR={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},DR=(n,t,i,s)=>xR[n];function o0(n){return(t,i)=>{const s=i?.context?String(i.context):"standalone";let u;if(s==="formatting"&&n.formattingValues){const f=n.defaultFormattingWidth||n.defaultWidth,p=i?.width?String(i.width):f;u=n.formattingValues[p]||n.formattingValues[f]}else{const f=n.defaultWidth,p=i?.width?String(i.width):n.defaultWidth;u=n.values[p]||n.values[f]}const c=n.argumentCallback?n.argumentCallback(t):t;return u[c]}}const AR={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},MR={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},NR={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},OR={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},RR={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},zR={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},HR={ordinalNumber:(n,t)=>{const i=Number(n),s=i%100;if(s>20||s<10)switch(s%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:o0({values:AR,defaultWidth:"wide"}),quarter:o0({values:MR,defaultWidth:"wide",argumentCallback:n=>n-1}),month:o0({values:NR,defaultWidth:"wide"}),day:o0({values:OR,defaultWidth:"wide"}),dayPeriod:o0({values:RR,defaultWidth:"wide",formattingValues:zR,defaultFormattingWidth:"wide"})};function u0(n){return(t,i={})=>{const s=i.width,u=s&&n.matchPatterns[s]||n.matchPatterns[n.defaultMatchWidth],c=t.match(u);if(!c)return null;const f=c[0],p=s&&n.parsePatterns[s]||n.parsePatterns[n.defaultParseWidth],m=Array.isArray(p)?UR(p,_=>_.test(f)):wR(p,_=>_.test(f));let S;S=n.valueCallback?n.valueCallback(m):m,S=i.valueCallback?i.valueCallback(S):S;const b=t.slice(f.length);return{value:S,rest:b}}}function wR(n,t){for(const i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&t(n[i]))return i}function UR(n,t){for(let i=0;i<n.length;i++)if(t(n[i]))return i}function BR(n){return(t,i={})=>{const s=t.match(n.matchPattern);if(!s)return null;const u=s[0],c=t.match(n.parsePattern);if(!c)return null;let f=n.valueCallback?n.valueCallback(c[0]):c[0];f=i.valueCallback?i.valueCallback(f):f;const p=t.slice(u.length);return{value:f,rest:p}}}const VR=/^(\d+)(th|st|nd|rd)?/i,GR=/\d+/i,jR={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},LR={any:[/^b/i,/^(a|c)/i]},PR={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},YR={any:[/1/i,/2/i,/3/i,/4/i]},qR={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},XR={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},KR={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},QR={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ZR={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},JR={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},FR={ordinalNumber:BR({matchPattern:VR,parsePattern:GR,valueCallback:n=>parseInt(n,10)}),era:u0({matchPatterns:jR,defaultMatchWidth:"wide",parsePatterns:LR,defaultParseWidth:"any"}),quarter:u0({matchPatterns:PR,defaultMatchWidth:"wide",parsePatterns:YR,defaultParseWidth:"any",valueCallback:n=>n+1}),month:u0({matchPatterns:qR,defaultMatchWidth:"wide",parsePatterns:XR,defaultParseWidth:"any"}),day:u0({matchPatterns:KR,defaultMatchWidth:"wide",parsePatterns:QR,defaultParseWidth:"any"}),dayPeriod:u0({matchPatterns:ZR,defaultMatchWidth:"any",parsePatterns:JR,defaultParseWidth:"any"})},kR={code:"en-US",formatDistance:bR,formatLong:_R,formatRelative:DR,localize:HR,match:FR,options:{weekStartsOn:0,firstWeekContainsDate:1}};function IR(n){const t=Oe(n),i=+mh(t)-+mR(t);return Math.round(i/ab)+1}function ob(n,t){const i=Oe(n),s=i.getFullYear(),u=l0(),c=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??u.firstWeekContainsDate??u.locale?.options?.firstWeekContainsDate??1,f=Fe(n,0);f.setFullYear(s+1,0,c),f.setHours(0,0,0,0);const p=Jo(f,t),m=Fe(n,0);m.setFullYear(s,0,c),m.setHours(0,0,0,0);const S=Jo(m,t);return i.getTime()>=p.getTime()?s+1:i.getTime()>=S.getTime()?s:s-1}function WR(n,t){const i=l0(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,u=ob(n,t),c=Fe(n,0);return c.setFullYear(u,0,s),c.setHours(0,0,0,0),Jo(c,t)}function $R(n,t){const i=Oe(n),s=+Jo(i,t)-+WR(i,t);return Math.round(s/ab)+1}const ub=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},cb=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},fb={p:cb,P:(n,t)=>{const i=n.match(/(P+)(p+)?/)||[],s=i[1],u=i[2];if(!u)return ub(n,t);let c;switch(s){case"P":c=t.dateTime({width:"short"});break;case"PP":c=t.dateTime({width:"medium"});break;case"PPP":c=t.dateTime({width:"long"});break;default:c=t.dateTime({width:"full"});break}return c.replace("{{date}}",ub(s,t)).replace("{{time}}",cb(u,t))}},tz=/^D+$/,ez=/^Y+$/,nz=["D","DD","YY","YYYY"];function az(n){return tz.test(n)}function iz(n){return ez.test(n)}function hb(n,t,i){const s=sz(n,t,i);if(console.warn(s),nz.includes(n))throw new RangeError(s)}function sz(n,t,i){const s=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${s} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function Dv(n){return Oe(n).getDay()}function db(n){const t=Oe(n),i=t.getFullYear(),s=t.getMonth(),u=Fe(n,0);return u.setFullYear(i,s+1,0),u.setHours(0,0,0,0),u.getDate()}function lz(){return Object.assign({},l0())}function rz(n){let i=Oe(n).getDay();return i===0&&(i=7),i}function oz(n){const t=Oe(n),i=t.getMonth();return t.setFullYear(t.getFullYear(),i+1,0),t.setHours(0,0,0,0),t}function uz(n,t){const i=Oe(n),s=Oe(t);return+i<+s}function cz(n,t){const i=t instanceof Date?Fe(t,0):new t(0);return i.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),i.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),i}const fz=10;class pb{subPriority=0;validate(t,i){return!0}}class hz extends pb{constructor(t,i,s,u,c){super(),this.value=t,this.validateValue=i,this.setValue=s,this.priority=u,c&&(this.subPriority=c)}validate(t,i){return this.validateValue(t,this.value,i)}set(t,i,s){return this.setValue(t,i,this.value,s)}}class dz extends pb{priority=fz;subPriority=-1;set(t,i){return i.timestampIsSet?t:Fe(t,cz(t,Date))}}class Re{run(t,i,s,u){const c=this.parse(t,i,s,u);return c?{setter:new hz(c.value,this.validate,this.set,this.priority,this.subPriority),rest:c.rest}:null}validate(t,i,s){return!0}}class pz extends Re{priority=140;parse(t,i,s){switch(i){case"G":case"GG":case"GGG":return s.era(t,{width:"abbreviated"})||s.era(t,{width:"narrow"});case"GGGGG":return s.era(t,{width:"narrow"});default:return s.era(t,{width:"wide"})||s.era(t,{width:"abbreviated"})||s.era(t,{width:"narrow"})}}set(t,i,s){return i.era=s,t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const Qn={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Zl={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Zn(n,t){return n&&{value:t(n.value),rest:n.rest}}function Tn(n,t){const i=t.match(n);return i?{value:parseInt(i[0],10),rest:t.slice(i[0].length)}:null}function Jl(n,t){const i=t.match(n);if(!i)return null;if(i[0]==="Z")return{value:0,rest:t.slice(1)};const s=i[1]==="+"?1:-1,u=i[2]?parseInt(i[2],10):0,c=i[3]?parseInt(i[3],10):0,f=i[5]?parseInt(i[5],10):0;return{value:s*(u*_v+c*Cv+f*hR),rest:t.slice(i[0].length)}}function mb(n){return Tn(Qn.anyDigitsSigned,n)}function Vn(n,t){switch(n){case 1:return Tn(Qn.singleDigit,t);case 2:return Tn(Qn.twoDigits,t);case 3:return Tn(Qn.threeDigits,t);case 4:return Tn(Qn.fourDigits,t);default:return Tn(new RegExp("^\\d{1,"+n+"}"),t)}}function tg(n,t){switch(n){case 1:return Tn(Qn.singleDigitSigned,t);case 2:return Tn(Qn.twoDigitsSigned,t);case 3:return Tn(Qn.threeDigitsSigned,t);case 4:return Tn(Qn.fourDigitsSigned,t);default:return Tn(new RegExp("^-?\\d{1,"+n+"}"),t)}}function Av(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function gb(n,t){const i=t>0,s=i?t:1-t;let u;if(s<=50)u=n||100;else{const c=s+50,f=Math.trunc(c/100)*100,p=n>=c%100;u=n+f-(p?100:0)}return i?u:1-u}function yb(n){return n%400===0||n%4===0&&n%100!==0}class mz extends Re{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,i,s){const u=c=>({year:c,isTwoDigitYear:i==="yy"});switch(i){case"y":return Zn(Vn(4,t),u);case"yo":return Zn(s.ordinalNumber(t,{unit:"year"}),u);default:return Zn(Vn(i.length,t),u)}}validate(t,i){return i.isTwoDigitYear||i.year>0}set(t,i,s){const u=t.getFullYear();if(s.isTwoDigitYear){const f=gb(s.year,u);return t.setFullYear(f,0,1),t.setHours(0,0,0,0),t}const c=!("era"in i)||i.era===1?s.year:1-s.year;return t.setFullYear(c,0,1),t.setHours(0,0,0,0),t}}class gz extends Re{priority=130;parse(t,i,s){const u=c=>({year:c,isTwoDigitYear:i==="YY"});switch(i){case"Y":return Zn(Vn(4,t),u);case"Yo":return Zn(s.ordinalNumber(t,{unit:"year"}),u);default:return Zn(Vn(i.length,t),u)}}validate(t,i){return i.isTwoDigitYear||i.year>0}set(t,i,s,u){const c=ob(t,u);if(s.isTwoDigitYear){const p=gb(s.year,c);return t.setFullYear(p,0,u.firstWeekContainsDate),t.setHours(0,0,0,0),Jo(t,u)}const f=!("era"in i)||i.era===1?s.year:1-s.year;return t.setFullYear(f,0,u.firstWeekContainsDate),t.setHours(0,0,0,0),Jo(t,u)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class yz extends Re{priority=130;parse(t,i){return tg(i==="R"?4:i.length,t)}set(t,i,s){const u=Fe(t,0);return u.setFullYear(s,0,4),u.setHours(0,0,0,0),mh(u)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class vz extends Re{priority=130;parse(t,i){return tg(i==="u"?4:i.length,t)}set(t,i,s){return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class Sz extends Re{priority=120;parse(t,i,s){switch(i){case"Q":case"QQ":return Vn(i.length,t);case"Qo":return s.ordinalNumber(t,{unit:"quarter"});case"QQQ":return s.quarter(t,{width:"abbreviated",context:"formatting"})||s.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(t,{width:"narrow",context:"formatting"});default:return s.quarter(t,{width:"wide",context:"formatting"})||s.quarter(t,{width:"abbreviated",context:"formatting"})||s.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,i){return i>=1&&i<=4}set(t,i,s){return t.setMonth((s-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class bz extends Re{priority=120;parse(t,i,s){switch(i){case"q":case"qq":return Vn(i.length,t);case"qo":return s.ordinalNumber(t,{unit:"quarter"});case"qqq":return s.quarter(t,{width:"abbreviated",context:"standalone"})||s.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(t,{width:"narrow",context:"standalone"});default:return s.quarter(t,{width:"wide",context:"standalone"})||s.quarter(t,{width:"abbreviated",context:"standalone"})||s.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,i){return i>=1&&i<=4}set(t,i,s){return t.setMonth((s-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class Ez extends Re{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,i,s){const u=c=>c-1;switch(i){case"M":return Zn(Tn(Qn.month,t),u);case"MM":return Zn(Vn(2,t),u);case"Mo":return Zn(s.ordinalNumber(t,{unit:"month"}),u);case"MMM":return s.month(t,{width:"abbreviated",context:"formatting"})||s.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(t,{width:"narrow",context:"formatting"});default:return s.month(t,{width:"wide",context:"formatting"})||s.month(t,{width:"abbreviated",context:"formatting"})||s.month(t,{width:"narrow",context:"formatting"})}}validate(t,i){return i>=0&&i<=11}set(t,i,s){return t.setMonth(s,1),t.setHours(0,0,0,0),t}}class Tz extends Re{priority=110;parse(t,i,s){const u=c=>c-1;switch(i){case"L":return Zn(Tn(Qn.month,t),u);case"LL":return Zn(Vn(2,t),u);case"Lo":return Zn(s.ordinalNumber(t,{unit:"month"}),u);case"LLL":return s.month(t,{width:"abbreviated",context:"standalone"})||s.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(t,{width:"narrow",context:"standalone"});default:return s.month(t,{width:"wide",context:"standalone"})||s.month(t,{width:"abbreviated",context:"standalone"})||s.month(t,{width:"narrow",context:"standalone"})}}validate(t,i){return i>=0&&i<=11}set(t,i,s){return t.setMonth(s,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function Cz(n,t,i){const s=Oe(n),u=$R(s,i)-t;return s.setDate(s.getDate()-u*7),s}class _z extends Re{priority=100;parse(t,i,s){switch(i){case"w":return Tn(Qn.week,t);case"wo":return s.ordinalNumber(t,{unit:"week"});default:return Vn(i.length,t)}}validate(t,i){return i>=1&&i<=53}set(t,i,s,u){return Jo(Cz(t,s,u),u)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function xz(n,t){const i=Oe(n),s=IR(i)-t;return i.setDate(i.getDate()-s*7),i}class Dz extends Re{priority=100;parse(t,i,s){switch(i){case"I":return Tn(Qn.week,t);case"Io":return s.ordinalNumber(t,{unit:"week"});default:return Vn(i.length,t)}}validate(t,i){return i>=1&&i<=53}set(t,i,s){return mh(xz(t,s))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const Az=[31,28,31,30,31,30,31,31,30,31,30,31],Mz=[31,29,31,30,31,30,31,31,30,31,30,31];class Nz extends Re{priority=90;subPriority=1;parse(t,i,s){switch(i){case"d":return Tn(Qn.date,t);case"do":return s.ordinalNumber(t,{unit:"date"});default:return Vn(i.length,t)}}validate(t,i){const s=t.getFullYear(),u=yb(s),c=t.getMonth();return u?i>=1&&i<=Mz[c]:i>=1&&i<=Az[c]}set(t,i,s){return t.setDate(s),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class Oz extends Re{priority=90;subpriority=1;parse(t,i,s){switch(i){case"D":case"DD":return Tn(Qn.dayOfYear,t);case"Do":return s.ordinalNumber(t,{unit:"date"});default:return Vn(i.length,t)}}validate(t,i){const s=t.getFullYear();return yb(s)?i>=1&&i<=366:i>=1&&i<=365}set(t,i,s){return t.setMonth(0,s),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function Mv(n,t,i){const s=l0(),u=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,c=Oe(n),f=c.getDay(),m=(t%7+7)%7,S=7-u,b=t<0||t>6?t-(f+S)%7:(m+S)%7-(f+S)%7;return ph(c,b)}class Rz extends Re{priority=90;parse(t,i,s){switch(i){case"E":case"EE":case"EEE":return s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});default:return s.day(t,{width:"wide",context:"formatting"})||s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"})}}validate(t,i){return i>=0&&i<=6}set(t,i,s,u){return t=Mv(t,s,u),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class zz extends Re{priority=90;parse(t,i,s,u){const c=f=>{const p=Math.floor((f-1)/7)*7;return(f+u.weekStartsOn+6)%7+p};switch(i){case"e":case"ee":return Zn(Vn(i.length,t),c);case"eo":return Zn(s.ordinalNumber(t,{unit:"day"}),c);case"eee":return s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});case"eeeee":return s.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});default:return s.day(t,{width:"wide",context:"formatting"})||s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"})}}validate(t,i){return i>=0&&i<=6}set(t,i,s,u){return t=Mv(t,s,u),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class Hz extends Re{priority=90;parse(t,i,s,u){const c=f=>{const p=Math.floor((f-1)/7)*7;return(f+u.weekStartsOn+6)%7+p};switch(i){case"c":case"cc":return Zn(Vn(i.length,t),c);case"co":return Zn(s.ordinalNumber(t,{unit:"day"}),c);case"ccc":return s.day(t,{width:"abbreviated",context:"standalone"})||s.day(t,{width:"short",context:"standalone"})||s.day(t,{width:"narrow",context:"standalone"});case"ccccc":return s.day(t,{width:"narrow",context:"standalone"});case"cccccc":return s.day(t,{width:"short",context:"standalone"})||s.day(t,{width:"narrow",context:"standalone"});default:return s.day(t,{width:"wide",context:"standalone"})||s.day(t,{width:"abbreviated",context:"standalone"})||s.day(t,{width:"short",context:"standalone"})||s.day(t,{width:"narrow",context:"standalone"})}}validate(t,i){return i>=0&&i<=6}set(t,i,s,u){return t=Mv(t,s,u),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function wz(n,t){const i=Oe(n),s=rz(i),u=t-s;return ph(i,u)}class Uz extends Re{priority=90;parse(t,i,s){const u=c=>c===0?7:c;switch(i){case"i":case"ii":return Vn(i.length,t);case"io":return s.ordinalNumber(t,{unit:"day"});case"iii":return Zn(s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"}),u);case"iiiii":return Zn(s.day(t,{width:"narrow",context:"formatting"}),u);case"iiiiii":return Zn(s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"}),u);default:return Zn(s.day(t,{width:"wide",context:"formatting"})||s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"}),u)}}validate(t,i){return i>=1&&i<=7}set(t,i,s){return t=wz(t,s),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class Bz extends Re{priority=80;parse(t,i,s){switch(i){case"a":case"aa":case"aaa":return s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(t,{width:"narrow",context:"formatting"});default:return s.dayPeriod(t,{width:"wide",context:"formatting"})||s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,i,s){return t.setHours(Av(s),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class Vz extends Re{priority=80;parse(t,i,s){switch(i){case"b":case"bb":case"bbb":return s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(t,{width:"narrow",context:"formatting"});default:return s.dayPeriod(t,{width:"wide",context:"formatting"})||s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,i,s){return t.setHours(Av(s),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class Gz extends Re{priority=80;parse(t,i,s){switch(i){case"B":case"BB":case"BBB":return s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(t,{width:"narrow",context:"formatting"});default:return s.dayPeriod(t,{width:"wide",context:"formatting"})||s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,i,s){return t.setHours(Av(s),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class jz extends Re{priority=70;parse(t,i,s){switch(i){case"h":return Tn(Qn.hour12h,t);case"ho":return s.ordinalNumber(t,{unit:"hour"});default:return Vn(i.length,t)}}validate(t,i){return i>=1&&i<=12}set(t,i,s){const u=t.getHours()>=12;return u&&s<12?t.setHours(s+12,0,0,0):!u&&s===12?t.setHours(0,0,0,0):t.setHours(s,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class Lz extends Re{priority=70;parse(t,i,s){switch(i){case"H":return Tn(Qn.hour23h,t);case"Ho":return s.ordinalNumber(t,{unit:"hour"});default:return Vn(i.length,t)}}validate(t,i){return i>=0&&i<=23}set(t,i,s){return t.setHours(s,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class Pz extends Re{priority=70;parse(t,i,s){switch(i){case"K":return Tn(Qn.hour11h,t);case"Ko":return s.ordinalNumber(t,{unit:"hour"});default:return Vn(i.length,t)}}validate(t,i){return i>=0&&i<=11}set(t,i,s){return t.getHours()>=12&&s<12?t.setHours(s+12,0,0,0):t.setHours(s,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class Yz extends Re{priority=70;parse(t,i,s){switch(i){case"k":return Tn(Qn.hour24h,t);case"ko":return s.ordinalNumber(t,{unit:"hour"});default:return Vn(i.length,t)}}validate(t,i){return i>=1&&i<=24}set(t,i,s){const u=s<=24?s%24:s;return t.setHours(u,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class qz extends Re{priority=60;parse(t,i,s){switch(i){case"m":return Tn(Qn.minute,t);case"mo":return s.ordinalNumber(t,{unit:"minute"});default:return Vn(i.length,t)}}validate(t,i){return i>=0&&i<=59}set(t,i,s){return t.setMinutes(s,0,0),t}incompatibleTokens=["t","T"]}class Xz extends Re{priority=50;parse(t,i,s){switch(i){case"s":return Tn(Qn.second,t);case"so":return s.ordinalNumber(t,{unit:"second"});default:return Vn(i.length,t)}}validate(t,i){return i>=0&&i<=59}set(t,i,s){return t.setSeconds(s,0),t}incompatibleTokens=["t","T"]}class Kz extends Re{priority=30;parse(t,i){const s=u=>Math.trunc(u*Math.pow(10,-i.length+3));return Zn(Vn(i.length,t),s)}set(t,i,s){return t.setMilliseconds(s),t}incompatibleTokens=["t","T"]}class Qz extends Re{priority=10;parse(t,i){switch(i){case"X":return Jl(Zl.basicOptionalMinutes,t);case"XX":return Jl(Zl.basic,t);case"XXXX":return Jl(Zl.basicOptionalSeconds,t);case"XXXXX":return Jl(Zl.extendedOptionalSeconds,t);default:return Jl(Zl.extended,t)}}set(t,i,s){return i.timestampIsSet?t:Fe(t,t.getTime()-sb(t)-s)}incompatibleTokens=["t","T","x"]}class Zz extends Re{priority=10;parse(t,i){switch(i){case"x":return Jl(Zl.basicOptionalMinutes,t);case"xx":return Jl(Zl.basic,t);case"xxxx":return Jl(Zl.basicOptionalSeconds,t);case"xxxxx":return Jl(Zl.extendedOptionalSeconds,t);default:return Jl(Zl.extended,t)}}set(t,i,s){return i.timestampIsSet?t:Fe(t,t.getTime()-sb(t)-s)}incompatibleTokens=["t","T","X"]}class Jz extends Re{priority=40;parse(t){return mb(t)}set(t,i,s){return[Fe(t,s*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class Fz extends Re{priority=20;parse(t){return mb(t)}set(t,i,s){return[Fe(t,s),{timestampIsSet:!0}]}incompatibleTokens="*"}const kz={G:new pz,y:new mz,Y:new gz,R:new yz,u:new vz,Q:new Sz,q:new bz,M:new Ez,L:new Tz,w:new _z,I:new Dz,d:new Nz,D:new Oz,E:new Rz,e:new zz,c:new Hz,i:new Uz,a:new Bz,b:new Vz,B:new Gz,h:new jz,H:new Lz,K:new Pz,k:new Yz,m:new qz,s:new Xz,S:new Kz,X:new Qz,x:new Zz,t:new Jz,T:new Fz},Iz=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Wz=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$z=/^'([^]*?)'?$/,tH=/''/g,eH=/\S/,nH=/[a-zA-Z]/;function Fl(n,t,i,s){const u=lz(),c=s?.locale??u.locale??kR,f=s?.firstWeekContainsDate??s?.locale?.options?.firstWeekContainsDate??u.firstWeekContainsDate??u.locale?.options?.firstWeekContainsDate??1,p=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??u.weekStartsOn??u.locale?.options?.weekStartsOn??0;if(t==="")return n===""?Oe(i):Fe(i,NaN);const m={firstWeekContainsDate:f,weekStartsOn:p,locale:c},S=[new dz],b=t.match(Wz).map(N=>{const R=N[0];if(R in fb){const O=fb[R];return O(N,c.formatLong)}return N}).join("").match(Iz),_=[];for(let N of b){!s?.useAdditionalWeekYearTokens&&iz(N)&&hb(N,t,n),!s?.useAdditionalDayOfYearTokens&&az(N)&&hb(N,t,n);const R=N[0],O=kz[R];if(O){const{incompatibleTokens:U}=O;if(Array.isArray(U)){const V=_.find(F=>U.includes(F.token)||F.token===R);if(V)throw new RangeError(`The format string mustn't contain \`${V.fullToken}\` and \`${N}\` at the same time`)}else if(O.incompatibleTokens==="*"&&_.length>0)throw new RangeError(`The format string mustn't contain \`${N}\` and any other token at the same time`);_.push({token:R,fullToken:N});const j=O.run(n,N,c.match,m);if(!j)return Fe(i,NaN);S.push(j.setter),n=j.rest}else{if(R.match(nH))throw new RangeError("Format string contains an unescaped latin alphabet character `"+R+"`");if(N==="''"?N="'":R==="'"&&(N=aH(N)),n.indexOf(N)===0)n=n.slice(N.length);else return Fe(i,NaN)}}if(n.length>0&&eH.test(n))return Fe(i,NaN);const x=S.map(N=>N.priority).sort((N,R)=>R-N).filter((N,R,O)=>O.indexOf(N)===R).map(N=>S.filter(R=>R.priority===N).sort((R,O)=>O.subPriority-R.subPriority)).map(N=>N[0]);let D=Oe(i);if(isNaN(D.getTime()))return Fe(i,NaN);const A={};for(const N of x){if(!N.validate(D,m))return Fe(i,NaN);const R=N.set(D,A,m);Array.isArray(R)?(D=R[0],Object.assign(A,R[1])):D=R}return Fe(i,D)}function aH(n){return n.match($z)[1].replace(tH,"'")}function iH(n){return lb(n,Date.now())}function sH(n,t){return ph(n,-t)}function lH(n,t){let i=t-Dv(n);return i<=0&&(i+=7),ph(n,i)}function rH(n,t){const s=fH(n);let u;if(s.date){const m=hH(s.date,2);u=dH(m.restDateString,m.year)}if(!u||isNaN(u.getTime()))return new Date(NaN);const c=u.getTime();let f=0,p;if(s.time&&(f=pH(s.time),isNaN(f)))return new Date(NaN);if(s.timezone){if(p=mH(s.timezone),isNaN(p))return new Date(NaN)}else{const m=new Date(c+f),S=new Date(0);return S.setFullYear(m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate()),S.setHours(m.getUTCHours(),m.getUTCMinutes(),m.getUTCSeconds(),m.getUTCMilliseconds()),S}return new Date(c+f+p)}const eg={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},oH=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,uH=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,cH=/^([+-])(\d{2})(?::?(\d{2}))?$/;function fH(n){const t={},i=n.split(eg.dateTimeDelimiter);let s;if(i.length>2)return t;if(/:/.test(i[0])?s=i[0]:(t.date=i[0],s=i[1],eg.timeZoneDelimiter.test(t.date)&&(t.date=n.split(eg.timeZoneDelimiter)[0],s=n.substr(t.date.length,n.length))),s){const u=eg.timezone.exec(s);u?(t.time=s.replace(u[1],""),t.timezone=u[1]):t.time=s}return t}function hH(n,t){const i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),s=n.match(i);if(!s)return{year:NaN,restDateString:""};const u=s[1]?parseInt(s[1]):null,c=s[2]?parseInt(s[2]):null;return{year:c===null?u:c*100,restDateString:n.slice((s[1]||s[2]).length)}}function dH(n,t){if(t===null)return new Date(NaN);const i=n.match(oH);if(!i)return new Date(NaN);const s=!!i[4],u=c0(i[1]),c=c0(i[2])-1,f=c0(i[3]),p=c0(i[4]),m=c0(i[5])-1;if(s)return bH(t,p,m)?gH(t,p,m):new Date(NaN);{const S=new Date(0);return!vH(t,c,f)||!SH(t,u)?new Date(NaN):(S.setUTCFullYear(t,c,Math.max(u,f)),S)}}function c0(n){return n?parseInt(n):1}function pH(n){const t=n.match(uH);if(!t)return NaN;const i=Nv(t[1]),s=Nv(t[2]),u=Nv(t[3]);return EH(i,s,u)?i*_v+s*Cv+u*1e3:NaN}function Nv(n){return n&&parseFloat(n.replace(",","."))||0}function mH(n){if(n==="Z")return 0;const t=n.match(cH);if(!t)return 0;const i=t[1]==="+"?-1:1,s=parseInt(t[2]),u=t[3]&&parseInt(t[3])||0;return TH(s,u)?i*(s*_v+u*Cv):NaN}function gH(n,t,i){const s=new Date(0);s.setUTCFullYear(n,0,4);const u=s.getUTCDay()||7,c=(t-1)*7+i+1-u;return s.setUTCDate(s.getUTCDate()+c),s}const yH=[31,null,31,30,31,30,31,31,30,31,30,31];function vb(n){return n%400===0||n%4===0&&n%100!==0}function vH(n,t,i){return t>=0&&t<=11&&i>=1&&i<=(yH[t]||(vb(n)?29:28))}function SH(n,t){return t>=1&&t<=(vb(n)?366:365)}function bH(n,t,i){return t>=1&&t<=53&&i>=0&&i<=6}function EH(n,t,i){return n===24?t===0&&i===0:i>=0&&i<60&&t>=0&&t<60&&n>=0&&n<25}function TH(n,t){return t>=0&&t<=59}function CH(n,t){const i=Oe(n),s=i.getFullYear(),u=i.getDate(),c=Fe(n,0);c.setFullYear(s,t,15),c.setHours(0,0,0,0);const f=db(c);return i.setMonth(t,Math.min(u,f)),i}function _H(n,t){const i=Oe(n);return isNaN(+i)?Fe(n,NaN):(i.setFullYear(t),i)}function Ov(n,t){return Zo(n,-t)}function Rv(n,t){return r0(n,-t)}function xH(){return window.navigator.languages?window.navigator.languages[0]:window.navigator.language}function DH(n,t,i){const s=[];for(let u=n;u<=t;u++)s.push(i?i(u):u);return s}function AH(n,t){const i=n.target;return i?!t.isSameNode(i)&&!t.contains(i):!1}function MH(n,t){return n.isSameNode(t)||n.contains(t)}function NH(n,t){const i=Object.entries(t),s=getComputedStyle(n);for(let u=0,c=i.length;u<c;u++){const[f,p]=i[u];if(typeof p=="string"&&p.indexOf(",")>-1){if(!p.split(",").map(S=>S.trim()).includes(s[f]))return!1}else if(s[f]!==p)return!1}return!0}function OH(n,t){const i=Object.entries(t),s=getComputedStyle(n);for(let u=0,c=i.length;u<c;u++){const[f,p]=i[u];if(typeof p=="string"&&p.indexOf(",")>-1){if(p.split(",").map(S=>S.trim()).includes(s[f]))return!0}else if(s[f]===p)return!0}return!1}function Sb(n,t,i=!1,s){if(i&&NH(n,t)){if(!s||s?.(n)===!0)return n}else if(!i&&OH(n,t)&&(!s||s?.(n)===!0))return n;return n.parentElement?Sb(n.parentElement,t,i,s):n}function bb(n,t){const i=Array.from(document.querySelectorAll("body *")),s=[];for(let u=0,c=i.length;u<c;u++){const f=getComputedStyle(i[u]);f[n]&&t(f[n])&&s.push(f[n])}return s}function Ej(n){return n}function RH(n){const t=document.documentElement;Object.keys(n).forEach(i=>{t.style.setProperty(i,n[i])})}function zH(n){return{"--theme-bsc-primary-1":n.primary1,"--theme-bsc-primary-2":n.primary2,"--theme-bsc-primary-3":n.primary3,"--theme-bsc-primary-4":n.primary4,"--theme-bsc-primary-5":n.primary5,"--theme-bsc-gray-1":n.gray1||"#303030","--theme-bsc-gray-2":n.gray2||"#5f5f5f","--theme-bsc-gray-3":n.gray3||"#8f8f8f","--theme-bsc-gray-4":n.gray4||"#bebebe","--theme-bsc-gray-5":n.gray5||"#eee","--theme-bsc-black":n.black||"#000","--theme-bsc-white":n.white||"#fff","--theme-bsc-mono-dark-1":n.monoDark1||"#222","--theme-bsc-mono-dark-2":n.monoDark2||"#3c3c3c","--theme-bsc-mono-dark-3":n.monoDark3||"#4e4e4e","--theme-bsc-mono-light-1":n.monoLight1||"#fefefe","--theme-bsc-mono-light-2":n.monoLight2||"#eee","--theme-bsc-mono-light-3":n.monoLight3||"#ccc","--theme-bsc-info":n.info||"#2e7ff8","--theme-bsc-success":n.success||"#53ae0c","--theme-bsc-warning":n.warning||"#ff6914","--theme-bsc-error":n.error||"#f01616"}}var ka=(n=>(n[n.Regular=24]="Regular",n[n.Small=20]="Small",n))(ka||{});const Eb=({className:n})=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:n,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008ZM12 15h.008v.008H12V15Zm0 2.25h.008v.008H12v-.008ZM9.75 15h.008v.008H9.75V15Zm0 2.25h.008v.008H9.75v-.008ZM7.5 15h.008v.008H7.5V15Zm0 2.25h.008v.008H7.5v-.008Zm6.75-4.5h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V15Zm0 2.25h.008v.008h-.008v-.008Zm2.25-4.5h.008v.008H16.5v-.008Zm0 2.25h.008v.008H16.5V15Z"})}),HH=({className:n})=>{const t=Se("bsc:h-6 bsc:w-6",n);return X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})})},wH=({className:n})=>{const t=Se("bsc:h-6 bsc:w-6",n);return X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5 8.25 12l7.5-7.5"})})},UH=({className:n})=>{const t=Se("bsc:h-6 bsc:w-6",n);return X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})})},BH=({className:n})=>{const t=Se("bsc:h-6 bsc:w-6",n);return X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"})})},VH=({className:n})=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:n,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})}),Ts=({icon:n,size:t=ka.Regular,onClick:i,className:s})=>{const u=H.useRef({calendar:Eb,chevronDown:HH,chevronLeft:wH,chevronRight:UH,chevronUp:BH,close:VH}),c=H.useMemo(()=>u.current[n]||Eb,[n]),f=Se({"bsc:h-[24px] bsc:w-[24px]":t===ka.Regular,"bsc:h-[20px] bsc:w-[20px]":t===ka.Small},s);return X.jsx("div",{onClick:i,children:X.jsx(c,{className:f})})},vc=({template:n,props:t,children:i})=>n(t,i);function GH(n,t){if(t===n)return!1;const i=Object.values(t),s=Object.values(n);if(i.length!==s.length||i.some((c,f)=>c!==s[f]))return!0;const u=Object.keys(n);return Object.keys(t).some((c,f)=>c!==u[f])}function jH(n,t){return n.matches[t]=!1,n.mediaQueries[t]={},n}function Tb(n){const t=Object.keys(n);return typeof window>"u"?t.reduce(jH,{mediaQueries:{},matches:{}}):t.reduce((i,s)=>{const u=window.matchMedia(n[s]);return i.mediaQueries[s]=u,i.matches[s]=u.matches,i},{mediaQueries:{},matches:{}})}function LH(n,t){function i(s,u){return s[u]=n.mediaQueries[u].matches,s}switch(t.type){case"updateMatches":return{matches:Object.keys(n.mediaQueries).reduce(i,{}),mediaQueries:n.mediaQueries};case"setQueries":return Tb(t.queries)}}function PH(n){const t=Ha.useRef(n),[i,s]=Ha.useReducer(LH,n,Tb);Ha.useEffect(()=>{GH(n,t.current)&&(s({type:"setQueries",queries:n}),t.current=n)},[n]);function u(){return s({type:"updateMatches"})}function c(m){const S=u;return typeof m.addListener<"u"?m.addListener(S):m.addEventListener("change",S),S}Ha.useEffect(()=>{const m=Object.values(i.mediaQueries),S=m.map(c);function b(_,x){typeof _.addListener<"u"?_.removeListener(S[x]):_.removeEventListener("change",S[x])}return()=>{m.forEach(b)}},[i.mediaQueries]);const{matches:f}=i,p=Ha.useMemo(()=>Object.values(f),[f]);return{matches:f,matchesAny:p.some(Boolean),matchesAll:p.length>0&&p.every(Boolean)}}function ng(n){return PH(YH(n)).matchesAll}const zv={};function YH(n){return zv[n]===void 0&&(zv[n]={default:n}),zv[n]}const Hv=({mobileQuery:n="screen and (max-device-width: 40rem)",tabletQuery:t="screen and (min-device-width: 40.01rem) and (max-device-width: 63.9375rem)",desktopQuery:i="screen and (min-device-width: 64rem)",mobileMarkup:s,aboveMobileMarkup:u,tabletMarkup:c,desktopMarkup:f})=>{const p=ng(n),m=ng(t),S=ng(i);return p&&s?s:!p&&u?u:m&&c?c:S&&f?f:(console.error("Invalid media settings"),null)};function Cb(n,t,i){const s=c=>{const f=c.target,p=n.style.display!=="hidden";n&&p&&!MH(n,f)&&!u(i,f)?t(!1):t(!0)},u=(c,f)=>{if(!c)return!1;for(let p=0,m=c.length;p<m;p++)if(c[p].isSameNode(f)||c[p].contains(f))return!0;return!1};return document.addEventListener("mousedown",s),s}function _b(n){document.removeEventListener("mousedown",n)}function xb(n){return n.target?n.target:n}const Db=H.createContext({});function qH(n){const t=H.useRef(null);return t.current===null&&(t.current=n()),t.current}const wv=typeof window<"u",XH=wv?H.useLayoutEffect:H.useEffect,Uv=H.createContext(null);function Bv(n,t){n.indexOf(t)===-1&&n.push(t)}function Vv(n,t){const i=n.indexOf(t);i>-1&&n.splice(i,1)}const Vr=(n,t,i)=>i>t?t:i<n?n:i;function Gv(n,t){return t?`${n}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:n}let gh=()=>{},Gr=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(gh=(n,t,i)=>{!n&&typeof console<"u"&&console.warn(Gv(t,i))},Gr=(n,t,i)=>{if(!n)throw new Error(Gv(t,i))});const jr={},Ab=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n);function Mb(n){return typeof n=="object"&&n!==null}const Nb=n=>/^0[^.\s]+$/u.test(n);function jv(n){let t;return()=>(t===void 0&&(t=n()),t)}const Cs=n=>n,KH=(n,t)=>i=>t(n(i)),f0=(...n)=>n.reduce(KH),h0=(n,t,i)=>{const s=t-n;return s===0?1:(i-n)/s};class Lv{constructor(){this.subscriptions=[]}add(t){return Bv(this.subscriptions,t),()=>Vv(this.subscriptions,t)}notify(t,i,s){const u=this.subscriptions.length;if(u)if(u===1)this.subscriptions[0](t,i,s);else for(let c=0;c<u;c++){const f=this.subscriptions[c];f&&f(t,i,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ol=n=>n*1e3,_s=n=>n/1e3;function Ob(n,t){return t?n*(1e3/t):0}const Rb=new Set;function Pv(n,t,i){n||Rb.has(t)||(console.warn(Gv(t,i)),Rb.add(t))}const zb=(n,t,i)=>(((1-3*i+3*t)*n+(3*i-6*t))*n+3*t)*n,QH=1e-7,ZH=12;function JH(n,t,i,s,u){let c,f,p=0;do f=t+(i-t)/2,c=zb(f,s,u)-n,c>0?i=f:t=f;while(Math.abs(c)>QH&&++p<ZH);return f}function d0(n,t,i,s){if(n===t&&i===s)return Cs;const u=c=>JH(c,0,1,n,i);return c=>c===0||c===1?c:zb(u(c),t,s)}const Hb=n=>t=>t<=.5?n(2*t)/2:(2-n(2*(1-t)))/2,wb=n=>t=>1-n(1-t),Ub=d0(.33,1.53,.69,.99),Yv=wb(Ub),Bb=Hb(Yv),Vb=n=>(n*=2)<1?.5*Yv(n):.5*(2-Math.pow(2,-10*(n-1))),qv=n=>1-Math.sin(Math.acos(n)),Gb=wb(qv),jb=Hb(qv),FH=d0(.42,0,1,1),kH=d0(0,0,.58,1),Lb=d0(.42,0,.58,1),IH=n=>Array.isArray(n)&&typeof n[0]!="number",Pb=n=>Array.isArray(n)&&typeof n[0]=="number",Yb={linear:Cs,easeIn:FH,easeInOut:Lb,easeOut:kH,circIn:qv,circInOut:jb,circOut:Gb,backIn:Yv,backInOut:Bb,backOut:Ub,anticipate:Vb},WH=n=>typeof n=="string",qb=n=>{if(Pb(n)){Gr(n.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,i,s,u]=n;return d0(t,i,s,u)}else if(WH(n))return Gr(Yb[n]!==void 0,`Invalid easing type '${n}'`,"invalid-easing-type"),Yb[n];return n},ag=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function $H(n,t){let i=new Set,s=new Set,u=!1,c=!1;const f=new WeakSet;let p={delta:0,timestamp:0,isProcessing:!1};function m(b){f.has(b)&&(S.schedule(b),n()),b(p)}const S={schedule:(b,_=!1,x=!1)=>{const A=x&&u?i:s;return _&&f.add(b),A.has(b)||A.add(b),b},cancel:b=>{s.delete(b),f.delete(b)},process:b=>{if(p=b,u){c=!0;return}u=!0,[i,s]=[s,i],i.forEach(m),i.clear(),u=!1,c&&(c=!1,S.process(b))}};return S}const tw=40;function Xb(n,t){let i=!1,s=!0;const u={delta:0,timestamp:0,isProcessing:!1},c=()=>i=!0,f=ag.reduce((j,V)=>(j[V]=$H(c),j),{}),{setup:p,read:m,resolveKeyframes:S,preUpdate:b,update:_,preRender:x,render:D,postRender:A}=f,N=()=>{const j=jr.useManualTiming?u.timestamp:performance.now();i=!1,jr.useManualTiming||(u.delta=s?1e3/60:Math.max(Math.min(j-u.timestamp,tw),1)),u.timestamp=j,u.isProcessing=!0,p.process(u),m.process(u),S.process(u),b.process(u),_.process(u),x.process(u),D.process(u),A.process(u),u.isProcessing=!1,i&&t&&(s=!1,n(N))},R=()=>{i=!0,s=!0,u.isProcessing||n(N)};return{schedule:ag.reduce((j,V)=>{const F=f[V];return j[V]=($,st=!1,I=!1)=>(i||R(),F.schedule($,st,I)),j},{}),cancel:j=>{for(let V=0;V<ag.length;V++)f[ag[V]].cancel(j)},state:u,steps:f}}const{schedule:dn,cancel:Fo,state:wa,steps:Xv}=Xb(typeof requestAnimationFrame<"u"?requestAnimationFrame:Cs,!0);let ig;function ew(){ig=void 0}const Ai={now:()=>(ig===void 0&&Ai.set(wa.isProcessing||jr.useManualTiming?wa.timestamp:performance.now()),ig),set:n=>{ig=n,queueMicrotask(ew)}},Kb=n=>t=>typeof t=="string"&&t.startsWith(n),Qb=Kb("--"),nw=Kb("var(--"),Kv=n=>nw(n)?aw.test(n.split("/*")[0].trim()):!1,aw=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Zb(n){return typeof n!="string"?!1:n.split("/*")[0].includes("var(--")}const yh={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},p0={...yh,transform:n=>Vr(0,1,n)},sg={...yh,default:1},m0=n=>Math.round(n*1e5)/1e5,Qv=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function iw(n){return n==null}const sw=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Zv=(n,t)=>i=>!!(typeof i=="string"&&sw.test(i)&&i.startsWith(n)||t&&!iw(i)&&Object.prototype.hasOwnProperty.call(i,t)),Jb=(n,t,i)=>s=>{if(typeof s!="string")return s;const[u,c,f,p]=s.match(Qv);return{[n]:parseFloat(u),[t]:parseFloat(c),[i]:parseFloat(f),alpha:p!==void 0?parseFloat(p):1}},lw=n=>Vr(0,255,n),Jv={...yh,transform:n=>Math.round(lw(n))},Sc={test:Zv("rgb","red"),parse:Jb("red","green","blue"),transform:({red:n,green:t,blue:i,alpha:s=1})=>"rgba("+Jv.transform(n)+", "+Jv.transform(t)+", "+Jv.transform(i)+", "+m0(p0.transform(s))+")"};function rw(n){let t="",i="",s="",u="";return n.length>5?(t=n.substring(1,3),i=n.substring(3,5),s=n.substring(5,7),u=n.substring(7,9)):(t=n.substring(1,2),i=n.substring(2,3),s=n.substring(3,4),u=n.substring(4,5),t+=t,i+=i,s+=s,u+=u),{red:parseInt(t,16),green:parseInt(i,16),blue:parseInt(s,16),alpha:u?parseInt(u,16)/255:1}}const Fv={test:Zv("#"),parse:rw,transform:Sc.transform},g0=n=>({test:t=>typeof t=="string"&&t.endsWith(n)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${n}`}),ko=g0("deg"),kl=g0("%"),wt=g0("px"),ow=g0("vh"),uw=g0("vw"),Fb={...kl,parse:n=>kl.parse(n)/100,transform:n=>kl.transform(n*100)},vh={test:Zv("hsl","hue"),parse:Jb("hue","saturation","lightness"),transform:({hue:n,saturation:t,lightness:i,alpha:s=1})=>"hsla("+Math.round(n)+", "+kl.transform(m0(t))+", "+kl.transform(m0(i))+", "+m0(p0.transform(s))+")"},$n={test:n=>Sc.test(n)||Fv.test(n)||vh.test(n),parse:n=>Sc.test(n)?Sc.parse(n):vh.test(n)?vh.parse(n):Fv.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Sc.transform(n):vh.transform(n),getAnimatableNone:n=>{const t=$n.parse(n);return t.alpha=0,$n.transform(t)}},cw=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function fw(n){return isNaN(n)&&typeof n=="string"&&(n.match(Qv)?.length||0)+(n.match(cw)?.length||0)>0}const kb="number",Ib="color",hw="var",dw="var(",Wb="${}",pw=/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 y0(n){const t=n.toString(),i=[],s={color:[],number:[],var:[]},u=[];let c=0;const p=t.replace(pw,m=>($n.test(m)?(s.color.push(c),u.push(Ib),i.push($n.parse(m))):m.startsWith(dw)?(s.var.push(c),u.push(hw),i.push(m)):(s.number.push(c),u.push(kb),i.push(parseFloat(m))),++c,Wb)).split(Wb);return{values:i,split:p,indexes:s,types:u}}function $b(n){return y0(n).values}function t8(n){const{split:t,types:i}=y0(n),s=t.length;return u=>{let c="";for(let f=0;f<s;f++)if(c+=t[f],u[f]!==void 0){const p=i[f];p===kb?c+=m0(u[f]):p===Ib?c+=$n.transform(u[f]):c+=u[f]}return c}}const mw=n=>typeof n=="number"?0:$n.test(n)?$n.getAnimatableNone(n):n;function gw(n){const t=$b(n);return t8(n)(t.map(mw))}const Io={test:fw,parse:$b,createTransformer:t8,getAnimatableNone:gw};function kv(n,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?n+(t-n)*6*i:i<1/2?t:i<2/3?n+(t-n)*(2/3-i)*6:n}function yw({hue:n,saturation:t,lightness:i,alpha:s}){n/=360,t/=100,i/=100;let u=0,c=0,f=0;if(!t)u=c=f=i;else{const p=i<.5?i*(1+t):i+t-i*t,m=2*i-p;u=kv(m,p,n+1/3),c=kv(m,p,n),f=kv(m,p,n-1/3)}return{red:Math.round(u*255),green:Math.round(c*255),blue:Math.round(f*255),alpha:s}}function lg(n,t){return i=>i>0?t:n}const Cn=(n,t,i)=>n+(t-n)*i,Iv=(n,t,i)=>{const s=n*n,u=i*(t*t-s)+s;return u<0?0:Math.sqrt(u)},vw=[Fv,Sc,vh],Sw=n=>vw.find(t=>t.test(n));function e8(n){const t=Sw(n);if(gh(!!t,`'${n}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let i=t.parse(n);return t===vh&&(i=yw(i)),i}const n8=(n,t)=>{const i=e8(n),s=e8(t);if(!i||!s)return lg(n,t);const u={...i};return c=>(u.red=Iv(i.red,s.red,c),u.green=Iv(i.green,s.green,c),u.blue=Iv(i.blue,s.blue,c),u.alpha=Cn(i.alpha,s.alpha,c),Sc.transform(u))},Wv=new Set(["none","hidden"]);function bw(n,t){return Wv.has(n)?i=>i<=0?n:t:i=>i>=1?t:n}function Ew(n,t){return i=>Cn(n,t,i)}function $v(n){return typeof n=="number"?Ew:typeof n=="string"?Kv(n)?lg:$n.test(n)?n8:_w:Array.isArray(n)?a8:typeof n=="object"?$n.test(n)?n8:Tw:lg}function a8(n,t){const i=[...n],s=i.length,u=n.map((c,f)=>$v(c)(c,t[f]));return c=>{for(let f=0;f<s;f++)i[f]=u[f](c);return i}}function Tw(n,t){const i={...n,...t},s={};for(const u in i)n[u]!==void 0&&t[u]!==void 0&&(s[u]=$v(n[u])(n[u],t[u]));return u=>{for(const c in s)i[c]=s[c](u);return i}}function Cw(n,t){const i=[],s={color:0,var:0,number:0};for(let u=0;u<t.values.length;u++){const c=t.types[u],f=n.indexes[c][s[c]],p=n.values[f]??0;i[u]=p,s[c]++}return i}const _w=(n,t)=>{const i=Io.createTransformer(t),s=y0(n),u=y0(t);return s.indexes.var.length===u.indexes.var.length&&s.indexes.color.length===u.indexes.color.length&&s.indexes.number.length>=u.indexes.number.length?Wv.has(n)&&!u.values.length||Wv.has(t)&&!s.values.length?bw(n,t):f0(a8(Cw(s,u),u.values),i):(gh(!0,`Complex values '${n}' 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"),lg(n,t))};function i8(n,t,i){return typeof n=="number"&&typeof t=="number"&&typeof i=="number"?Cn(n,t,i):$v(n)(n,t)}const xw=n=>{const t=({timestamp:i})=>n(i);return{start:(i=!0)=>dn.update(t,i),stop:()=>Fo(t),now:()=>wa.isProcessing?wa.timestamp:Ai.now()}},s8=(n,t,i=10)=>{let s="";const u=Math.max(Math.round(t/i),2);for(let c=0;c<u;c++)s+=Math.round(n(c/(u-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},rg=2e4;function tS(n){let t=0;const i=50;let s=n.next(t);for(;!s.done&&t<rg;)t+=i,s=n.next(t);return t>=rg?1/0:t}function Dw(n,t=100,i){const s=i({...n,keyframes:[0,t]}),u=Math.min(tS(s),rg);return{type:"keyframes",ease:c=>s.next(u*c).value/t,duration:_s(u)}}const Aw=5;function l8(n,t,i){const s=Math.max(t-Aw,0);return Ob(i-n(s),t-s)}const _n={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},eS=.001;function Mw({duration:n=_n.duration,bounce:t=_n.bounce,velocity:i=_n.velocity,mass:s=_n.mass}){let u,c;gh(n<=ol(_n.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let f=1-t;f=Vr(_n.minDamping,_n.maxDamping,f),n=Vr(_n.minDuration,_n.maxDuration,_s(n)),f<1?(u=S=>{const b=S*f,_=b*n,x=b-i,D=nS(S,f),A=Math.exp(-_);return eS-x/D*A},c=S=>{const _=S*f*n,x=_*i+i,D=Math.pow(f,2)*Math.pow(S,2)*n,A=Math.exp(-_),N=nS(Math.pow(S,2),f);return(-u(S)+eS>0?-1:1)*((x-D)*A)/N}):(u=S=>{const b=Math.exp(-S*n),_=(S-i)*n+1;return-eS+b*_},c=S=>{const b=Math.exp(-S*n),_=(i-S)*(n*n);return b*_});const p=5/n,m=Ow(u,c,p);if(n=ol(n),isNaN(m))return{stiffness:_n.stiffness,damping:_n.damping,duration:n};{const S=Math.pow(m,2)*s;return{stiffness:S,damping:f*2*Math.sqrt(s*S),duration:n}}}const Nw=12;function Ow(n,t,i){let s=i;for(let u=1;u<Nw;u++)s=s-n(s)/t(s);return s}function nS(n,t){return n*Math.sqrt(1-t*t)}const Rw=["duration","bounce"],zw=["stiffness","damping","mass"];function r8(n,t){return t.some(i=>n[i]!==void 0)}function Hw(n){let t={velocity:_n.velocity,stiffness:_n.stiffness,damping:_n.damping,mass:_n.mass,isResolvedFromDuration:!1,...n};if(!r8(n,zw)&&r8(n,Rw))if(n.visualDuration){const i=n.visualDuration,s=2*Math.PI/(i*1.2),u=s*s,c=2*Vr(.05,1,1-(n.bounce||0))*Math.sqrt(u);t={...t,mass:_n.mass,stiffness:u,damping:c}}else{const i=Mw(n);t={...t,...i,mass:_n.mass},t.isResolvedFromDuration=!0}return t}function og(n=_n.visualDuration,t=_n.bounce){const i=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:t}:n;let{restSpeed:s,restDelta:u}=i;const c=i.keyframes[0],f=i.keyframes[i.keyframes.length-1],p={done:!1,value:c},{stiffness:m,damping:S,mass:b,duration:_,velocity:x,isResolvedFromDuration:D}=Hw({...i,velocity:-_s(i.velocity||0)}),A=x||0,N=S/(2*Math.sqrt(m*b)),R=f-c,O=_s(Math.sqrt(m/b)),U=Math.abs(R)<5;s||(s=U?_n.restSpeed.granular:_n.restSpeed.default),u||(u=U?_n.restDelta.granular:_n.restDelta.default);let j;if(N<1){const F=nS(O,N);j=$=>{const st=Math.exp(-N*O*$);return f-st*((A+N*O*R)/F*Math.sin(F*$)+R*Math.cos(F*$))}}else if(N===1)j=F=>f-Math.exp(-O*F)*(R+(A+O*R)*F);else{const F=O*Math.sqrt(N*N-1);j=$=>{const st=Math.exp(-N*O*$),I=Math.min(F*$,300);return f-st*((A+N*O*R)*Math.sinh(I)+F*R*Math.cosh(I))/F}}const V={calculatedDuration:D&&_||null,next:F=>{const $=j(F);if(D)p.done=F>=_;else{let st=F===0?A:0;N<1&&(st=F===0?ol(A):l8(j,F,$));const I=Math.abs(st)<=s,et=Math.abs(f-$)<=u;p.done=I&&et}return p.value=p.done?f:$,p},toString:()=>{const F=Math.min(tS(V),rg),$=s8(st=>V.next(F*st).value,F,30);return F+"ms "+$},toTransition:()=>{}};return V}og.applyToOptions=n=>{const t=Dw(n,100,og);return n.ease=t.ease,n.duration=ol(t.duration),n.type="keyframes",n};function aS({keyframes:n,velocity:t=0,power:i=.8,timeConstant:s=325,bounceDamping:u=10,bounceStiffness:c=500,modifyTarget:f,min:p,max:m,restDelta:S=.5,restSpeed:b}){const _=n[0],x={done:!1,value:_},D=I=>p!==void 0&&I<p||m!==void 0&&I>m,A=I=>p===void 0?m:m===void 0||Math.abs(p-I)<Math.abs(m-I)?p:m;let N=i*t;const R=_+N,O=f===void 0?R:f(R);O!==R&&(N=O-_);const U=I=>-N*Math.exp(-I/s),j=I=>O+U(I),V=I=>{const et=U(I),nt=j(I);x.done=Math.abs(et)<=S,x.value=x.done?O:nt};let F,$;const st=I=>{D(x.value)&&(F=I,$=og({keyframes:[x.value,A(x.value)],velocity:l8(j,I,x.value),damping:u,stiffness:c,restDelta:S,restSpeed:b}))};return st(0),{calculatedDuration:null,next:I=>{let et=!1;return!$&&F===void 0&&(et=!0,V(I),st(I)),F!==void 0&&I>=F?$.next(I-F):(!et&&V(I),x)}}}function ww(n,t,i){const s=[],u=i||jr.mix||i8,c=n.length-1;for(let f=0;f<c;f++){let p=u(n[f],n[f+1]);if(t){const m=Array.isArray(t)?t[f]||Cs:t;p=f0(m,p)}s.push(p)}return s}function Uw(n,t,{clamp:i=!0,ease:s,mixer:u}={}){const c=n.length;if(Gr(c===t.length,"Both input and output ranges must be the same length","range-length"),c===1)return()=>t[0];if(c===2&&t[0]===t[1])return()=>t[1];const f=n[0]===n[1];n[0]>n[c-1]&&(n=[...n].reverse(),t=[...t].reverse());const p=ww(t,s,u),m=p.length,S=b=>{if(f&&b<n[0])return t[0];let _=0;if(m>1)for(;_<n.length-2&&!(b<n[_+1]);_++);const x=h0(n[_],n[_+1],b);return p[_](x)};return i?b=>S(Vr(n[0],n[c-1],b)):S}function Bw(n,t){const i=n[n.length-1];for(let s=1;s<=t;s++){const u=h0(0,t,s);n.push(Cn(i,1,u))}}function Vw(n){const t=[0];return Bw(t,n.length-1),t}function Gw(n,t){return n.map(i=>i*t)}function jw(n,t){return n.map(()=>t||Lb).splice(0,n.length-1)}function Sh({duration:n=300,keyframes:t,times:i,ease:s="easeInOut"}){const u=IH(s)?s.map(qb):qb(s),c={done:!1,value:t[0]},f=Gw(i&&i.length===t.length?i:Vw(t),n),p=Uw(f,t,{ease:Array.isArray(u)?u:jw(t,u)});return{calculatedDuration:n,next:m=>(c.value=p(m),c.done=m>=n,c)}}const Lw=n=>n!==null;function iS(n,{repeat:t,repeatType:i="loop"},s,u=1){const c=n.filter(Lw),p=u<0||t&&i!=="loop"&&t%2===1?0:c.length-1;return!p||s===void 0?c[p]:s}const Pw={decay:aS,inertia:aS,tween:Sh,keyframes:Sh,spring:og};function o8(n){typeof n.type=="string"&&(n.type=Pw[n.type])}class sS{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,i){return this.finished.then(t,i)}}const Yw=n=>n/100;class lS extends sS{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:i}=this.options;i&&i.updatedAt!==Ai.now()&&this.tick(Ai.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;o8(t);const{type:i=Sh,repeat:s=0,repeatDelay:u=0,repeatType:c,velocity:f=0}=t;let{keyframes:p}=t;const m=i||Sh;process.env.NODE_ENV!=="production"&&m!==Sh&&Gr(p.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${p}`,"spring-two-frames"),m!==Sh&&typeof p[0]!="number"&&(this.mixKeyframes=f0(Yw,i8(p[0],p[1])),p=[0,100]);const S=m({...t,keyframes:p});c==="mirror"&&(this.mirroredGenerator=m({...t,keyframes:[...p].reverse(),velocity:-f})),S.calculatedDuration===null&&(S.calculatedDuration=tS(S));const{calculatedDuration:b}=S;this.calculatedDuration=b,this.resolvedDuration=b+u,this.totalDuration=this.resolvedDuration*(s+1)-u,this.generator=S}updateTime(t){const i=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=i}tick(t,i=!1){const{generator:s,totalDuration:u,mixKeyframes:c,mirroredGenerator:f,resolvedDuration:p,calculatedDuration:m}=this;if(this.startTime===null)return s.next(0);const{delay:S=0,keyframes:b,repeat:_,repeatType:x,repeatDelay:D,type:A,onUpdate:N,finalKeyframe:R}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),i?this.currentTime=t:this.updateTime(t);const O=this.currentTime-S*(this.playbackSpeed>=0?1:-1),U=this.playbackSpeed>=0?O<0:O>u;this.currentTime=Math.max(O,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let j=this.currentTime,V=s;if(_){const I=Math.min(this.currentTime,u)/p;let et=Math.floor(I),nt=I%1;!nt&&I>=1&&(nt=1),nt===1&&et--,et=Math.min(et,_+1),et%2&&(x==="reverse"?(nt=1-nt,D&&(nt-=D/p)):x==="mirror"&&(V=f)),j=Vr(0,1,nt)*p}const F=U?{done:!1,value:b[0]}:V.next(j);c&&(F.value=c(F.value));let{done:$}=F;!U&&m!==null&&($=this.playbackSpeed>=0?this.currentTime>=u:this.currentTime<=0);const st=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&$);return st&&A!==aS&&(F.value=iS(b,this.options,R,this.speed)),N&&N(F.value),st&&this.finish(),F}then(t,i){return this.finished.then(t,i)}get duration(){return _s(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+_s(t)}get time(){return _s(this.currentTime)}set time(t){t=ol(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ai.now());const i=this.playbackSpeed!==t;this.playbackSpeed=t,i&&(this.time=_s(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=xw,startTime:i}=this.options;this.driver||(this.driver=t(u=>this.tick(u))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=i??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ai.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&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}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function qw(n){for(let t=1;t<n.length;t++)n[t]??(n[t]=n[t-1])}const bc=n=>n*180/Math.PI,rS=n=>{const t=bc(Math.atan2(n[1],n[0]));return oS(t)},Xw={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:rS,rotateZ:rS,skewX:n=>bc(Math.atan(n[1])),skewY:n=>bc(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},oS=n=>(n=n%360,n<0&&(n+=360),n),u8=rS,c8=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),f8=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),Kw={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:c8,scaleY:f8,scale:n=>(c8(n)+f8(n))/2,rotateX:n=>oS(bc(Math.atan2(n[6],n[5]))),rotateY:n=>oS(bc(Math.atan2(-n[2],n[0]))),rotateZ:u8,rotate:u8,skewX:n=>bc(Math.atan(n[4])),skewY:n=>bc(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function uS(n){return n.includes("scale")?1:0}function cS(n,t){if(!n||n==="none")return uS(t);const i=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,u;if(i)s=Kw,u=i;else{const p=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Xw,u=p}if(!u)return uS(t);const c=s[t],f=u[1].split(",").map(Zw);return typeof c=="function"?c(f):f[c]}const Qw=(n,t)=>{const{transform:i="none"}=getComputedStyle(n);return cS(i,t)};function Zw(n){return parseFloat(n.trim())}const bh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Eh=new Set(bh),h8=n=>n===yh||n===wt,Jw=new Set(["x","y","z"]),Fw=bh.filter(n=>!Jw.has(n));function kw(n){const t=[];return Fw.forEach(i=>{const s=n.getValue(i);s!==void 0&&(t.push([i,s.get()]),s.set(i.startsWith("scale")?1:0))}),t}const Wo={width:({x:n},{paddingLeft:t="0",paddingRight:i="0"})=>n.max-n.min-parseFloat(t)-parseFloat(i),height:({y:n},{paddingTop:t="0",paddingBottom:i="0"})=>n.max-n.min-parseFloat(t)-parseFloat(i),top:(n,{top:t})=>parseFloat(t),left:(n,{left:t})=>parseFloat(t),bottom:({y:n},{top:t})=>parseFloat(t)+(n.max-n.min),right:({x:n},{left:t})=>parseFloat(t)+(n.max-n.min),x:(n,{transform:t})=>cS(t,"x"),y:(n,{transform:t})=>cS(t,"y")};Wo.translateX=Wo.x,Wo.translateY=Wo.y;const Ec=new Set;let fS=!1,hS=!1,dS=!1;function d8(){if(hS){const n=Array.from(Ec).filter(s=>s.needsMeasurement),t=new Set(n.map(s=>s.element)),i=new Map;t.forEach(s=>{const u=kw(s);u.length&&(i.set(s,u),s.render())}),n.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const u=i.get(s);u&&u.forEach(([c,f])=>{s.getValue(c)?.set(f)})}),n.forEach(s=>s.measureEndState()),n.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}hS=!1,fS=!1,Ec.forEach(n=>n.complete(dS)),Ec.clear()}function p8(){Ec.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(hS=!0)})}function Iw(){dS=!0,p8(),d8(),dS=!1}class pS{constructor(t,i,s,u,c,f=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=i,this.name=s,this.motionValue=u,this.element=c,this.isAsync=f}scheduleResolve(){this.state="scheduled",this.isAsync?(Ec.add(this),fS||(fS=!0,dn.read(p8),dn.resolveKeyframes(d8))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:i,element:s,motionValue:u}=this;if(t[0]===null){const c=u?.get(),f=t[t.length-1];if(c!==void 0)t[0]=c;else if(s&&i){const p=s.readValue(i,f);p!=null&&(t[0]=p)}t[0]===void 0&&(t[0]=f),u&&c===void 0&&u.set(t[0])}qw(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ec.delete(this)}cancel(){this.state==="scheduled"&&(Ec.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ww=n=>n.startsWith("--");function $w(n,t,i){Ww(t)?n.style.setProperty(t,i):n.style[t]=i}const tU=jv(()=>window.ScrollTimeline!==void 0),eU={};function nU(n,t){const i=jv(n);return()=>eU[t]??i()}const m8=nU(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),v0=([n,t,i,s])=>`cubic-bezier(${n}, ${t}, ${i}, ${s})`,g8={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:v0([0,.65,.55,1]),circOut:v0([.55,0,1,.45]),backIn:v0([.31,.01,.66,-.59]),backOut:v0([.33,1.53,.69,.99])};function y8(n,t){if(n)return typeof n=="function"?m8()?s8(n,t):"ease-out":Pb(n)?v0(n):Array.isArray(n)?n.map(i=>y8(i,t)||g8.easeOut):g8[n]}function aU(n,t,i,{delay:s=0,duration:u=300,repeat:c=0,repeatType:f="loop",ease:p="easeOut",times:m}={},S=void 0){const b={[t]:i};m&&(b.offset=m);const _=y8(p,u);Array.isArray(_)&&(b.easing=_);const x={delay:s,duration:u,easing:Array.isArray(_)?"linear":_,fill:"both",iterations:c+1,direction:f==="reverse"?"alternate":"normal"};return S&&(x.pseudoElement=S),n.animate(b,x)}function v8(n){return typeof n=="function"&&"applyToOptions"in n}function iU({type:n,...t}){return v8(n)&&m8()?n.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class sU extends sS{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:i,name:s,keyframes:u,pseudoElement:c,allowFlatten:f=!1,finalKeyframe:p,onComplete:m}=t;this.isPseudoElement=!!c,this.allowFlatten=f,this.options=t,Gr(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const S=iU(t);this.animation=aU(i,s,u,S,c),S.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!c){const b=iS(u,this.options,p,this.speed);this.updateMotionValue?this.updateMotionValue(b):$w(i,s,b),this.animation.cancel()}m?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return _s(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+_s(t)}get time(){return _s(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=ol(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&tU()?(this.animation.timeline=t,Cs):i(this)}}const S8={anticipate:Vb,backInOut:Bb,circInOut:jb};function lU(n){return n in S8}function rU(n){typeof n.ease=="string"&&lU(n.ease)&&(n.ease=S8[n.ease])}const b8=10;class oU extends sU{constructor(t){rU(t),o8(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:i,onUpdate:s,onComplete:u,element:c,...f}=this.options;if(!i)return;if(t!==void 0){i.set(t);return}const p=new lS({...f,autoplay:!1}),m=ol(this.finishedTime??this.time);i.setWithVelocity(p.sample(m-b8).value,p.sample(m).value,b8),p.stop()}}const E8=(n,t)=>t==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(Io.test(n)||n==="0")&&!n.startsWith("url("));function uU(n){const t=n[0];if(n.length===1)return!0;for(let i=0;i<n.length;i++)if(n[i]!==t)return!0}function cU(n,t,i,s){const u=n[0];if(u===null)return!1;if(t==="display"||t==="visibility")return!0;const c=n[n.length-1],f=E8(u,t),p=E8(c,t);return gh(f===p,`You are trying to animate ${t} from "${u}" to "${c}". "${f?c:u}" is not an animatable value.`,"value-not-animatable"),!f||!p?!1:uU(n)||(i==="spring"||v8(i))&&s}function mS(n){n.duration=0,n.type="keyframes"}const fU=new Set(["opacity","clipPath","filter","transform"]),hU=jv(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function dU(n){const{motionValue:t,name:i,repeatDelay:s,repeatType:u,damping:c,type:f}=n;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:m,transformTemplate:S}=t.owner.getProps();return hU()&&i&&fU.has(i)&&(i!=="transform"||!S)&&!m&&!s&&u!=="mirror"&&c!==0&&f!=="inertia"}const pU=40;class mU extends sS{constructor({autoplay:t=!0,delay:i=0,type:s="keyframes",repeat:u=0,repeatDelay:c=0,repeatType:f="loop",keyframes:p,name:m,motionValue:S,element:b,..._}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ai.now();const x={autoplay:t,delay:i,type:s,repeat:u,repeatDelay:c,repeatType:f,name:m,motionValue:S,element:b,..._},D=b?.KeyframeResolver||pS;this.keyframeResolver=new D(p,(A,N,R)=>this.onKeyframesResolved(A,N,x,!R),m,S,b),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,i,s,u){this.keyframeResolver=void 0;const{name:c,type:f,velocity:p,delay:m,isHandoff:S,onUpdate:b}=s;this.resolvedAt=Ai.now(),cU(t,c,f,p)||((jr.instantAnimations||!m)&&b?.(iS(t,s,i)),t[0]=t[t.length-1],mS(s),s.repeat=0);const x={startTime:u?this.resolvedAt?this.resolvedAt-this.createdAt>pU?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:i,...s,keyframes:t},D=!S&&dU(x)?new oU({...x,element:x.motionValue.owner.current}):new lS(x);D.finished.then(()=>this.notifyFinished()).catch(Cs),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(t,i){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Iw()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const gU=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function yU(n){const t=gU.exec(n);if(!t)return[,];const[,i,s,u]=t;return[`--${i??s}`,u]}const vU=4;function T8(n,t,i=1){Gr(i<=vU,`Max CSS variable fallback depth detected in property "${n}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,u]=yU(n);if(!s)return;const c=window.getComputedStyle(t).getPropertyValue(s);if(c){const f=c.trim();return Ab(f)?parseFloat(f):f}return Kv(u)?T8(u,t,i+1):u}function gS(n,t){return n?.[t]??n?.default??n}const C8=new Set(["width","height","top","left","right","bottom",...bh]),SU={test:n=>n==="auto",parse:n=>n},_8=n=>t=>t.test(n),x8=[yh,wt,kl,ko,uw,ow,SU],D8=n=>x8.find(_8(n));function bU(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||Nb(n):!0}const EU=new Set(["brightness","contrast","saturate","opacity"]);function TU(n){const[t,i]=n.slice(0,-1).split("(");if(t==="drop-shadow")return n;const[s]=i.match(Qv)||[];if(!s)return n;const u=i.replace(s,"");let c=EU.has(t)?1:0;return s!==i&&(c*=100),t+"("+c+u+")"}const CU=/\b([a-z-]*)\(.*?\)/gu,yS={...Io,getAnimatableNone:n=>{const t=n.match(CU);return t?t.map(TU).join(" "):n}},A8={...yh,transform:Math.round},vS={borderWidth:wt,borderTopWidth:wt,borderRightWidth:wt,borderBottomWidth:wt,borderLeftWidth:wt,borderRadius:wt,radius:wt,borderTopLeftRadius:wt,borderTopRightRadius:wt,borderBottomRightRadius:wt,borderBottomLeftRadius:wt,width:wt,maxWidth:wt,height:wt,maxHeight:wt,top:wt,right:wt,bottom:wt,left:wt,inset:wt,insetBlock:wt,insetBlockStart:wt,insetBlockEnd:wt,insetInline:wt,insetInlineStart:wt,insetInlineEnd:wt,padding:wt,paddingTop:wt,paddingRight:wt,paddingBottom:wt,paddingLeft:wt,paddingBlock:wt,paddingBlockStart:wt,paddingBlockEnd:wt,paddingInline:wt,paddingInlineStart:wt,paddingInlineEnd:wt,margin:wt,marginTop:wt,marginRight:wt,marginBottom:wt,marginLeft:wt,marginBlock:wt,marginBlockStart:wt,marginBlockEnd:wt,marginInline:wt,marginInlineStart:wt,marginInlineEnd:wt,backgroundPositionX:wt,backgroundPositionY:wt,...{rotate:ko,rotateX:ko,rotateY:ko,rotateZ:ko,scale:sg,scaleX:sg,scaleY:sg,scaleZ:sg,skew:ko,skewX:ko,skewY:ko,distance:wt,translateX:wt,translateY:wt,translateZ:wt,x:wt,y:wt,z:wt,perspective:wt,transformPerspective:wt,opacity:p0,originX:Fb,originY:Fb,originZ:wt},zIndex:A8,fillOpacity:p0,strokeOpacity:p0,numOctaves:A8},_U={...vS,color:$n,backgroundColor:$n,outlineColor:$n,fill:$n,stroke:$n,borderColor:$n,borderTopColor:$n,borderRightColor:$n,borderBottomColor:$n,borderLeftColor:$n,filter:yS,WebkitFilter:yS},M8=n=>_U[n];function N8(n,t){let i=M8(n);return i!==yS&&(i=Io),i.getAnimatableNone?i.getAnimatableNone(t):void 0}const xU=new Set(["auto","none","0"]);function DU(n,t,i){let s=0,u;for(;s<n.length&&!u;){const c=n[s];typeof c=="string"&&!xU.has(c)&&y0(c).values.length&&(u=n[s]),s++}if(u&&i)for(const c of t)n[c]=N8(i,u)}class AU extends pS{constructor(t,i,s,u,c){super(t,i,s,u,c,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:i,name:s}=this;if(!i||!i.current)return;super.readKeyframes();for(let b=0;b<t.length;b++){let _=t[b];if(typeof _=="string"&&(_=_.trim(),Kv(_))){const x=T8(_,i.current);x!==void 0&&(t[b]=x),b===t.length-1&&(this.finalKeyframe=_)}}if(this.resolveNoneKeyframes(),!C8.has(s)||t.length!==2)return;const[u,c]=t,f=D8(u),p=D8(c),m=Zb(u),S=Zb(c);if(m!==S&&Wo[s]){this.needsMeasurement=!0;return}if(f!==p)if(h8(f)&&h8(p))for(let b=0;b<t.length;b++){const _=t[b];typeof _=="string"&&(t[b]=parseFloat(_))}else Wo[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:i}=this,s=[];for(let u=0;u<t.length;u++)(t[u]===null||bU(t[u]))&&s.push(u);s.length&&DU(t,s,i)}measureInitialState(){const{element:t,unresolvedKeyframes:i,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Wo[s](t.measureViewportBox(),window.getComputedStyle(t.current)),i[0]=this.measuredOrigin;const u=i[i.length-1];u!==void 0&&t.getValue(s,u).jump(u,!1)}measureEndState(){const{element:t,name:i,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const u=t.getValue(i);u&&u.jump(this.measuredOrigin,!1);const c=s.length-1,f=s[c];s[c]=Wo[i](t.measureViewportBox(),window.getComputedStyle(t.current)),f!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=f),this.removedTransforms?.length&&this.removedTransforms.forEach(([p,m])=>{t.getValue(p).set(m)}),this.resolveNoneKeyframes()}}function MU(n,t,i){if(n instanceof EventTarget)return[n];if(typeof n=="string"){let s=document;const u=i?.[n]??s.querySelectorAll(n);return u?Array.from(u):[]}return Array.from(n)}const O8=(n,t)=>t&&typeof n=="number"?t.transform(n):n;function NU(n){return Mb(n)&&"offsetHeight"in n}const R8=30,OU=n=>!isNaN(parseFloat(n));class RU{constructor(t,i={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const u=Ai.now();if(this.updatedAt!==u&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=i.owner}setCurrent(t){this.current=t,this.updatedAt=Ai.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=OU(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Pv(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,i){this.events[t]||(this.events[t]=new Lv);const s=this.events[t].add(i);return t==="change"?()=>{s(),dn.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,i){this.passiveEffect=t,this.stopPassiveEffect=i}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,i,s){this.set(i),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,i=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,i&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ai.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>R8)return 0;const i=Math.min(this.updatedAt-this.prevUpdatedAt,R8);return Ob(parseFloat(this.current)-parseFloat(this.prevFrameValue),i)}start(t){return this.stop(),new Promise(i=>{this.hasAnimated=!0,this.animation=t(i),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 Th(n,t){return new RU(n,t)}const{schedule:SS}=Xb(queueMicrotask,!1),ul={x:!1,y:!1};function z8(){return ul.x||ul.y}function zU(n){return n==="x"||n==="y"?ul[n]?null:(ul[n]=!0,()=>{ul[n]=!1}):ul.x||ul.y?null:(ul.x=ul.y=!0,()=>{ul.x=ul.y=!1})}function H8(n,t){const i=MU(n),s=new AbortController,u={passive:!0,...t,signal:s.signal};return[i,u,()=>s.abort()]}function w8(n){return!(n.pointerType==="touch"||z8())}function HU(n,t,i={}){const[s,u,c]=H8(n,i),f=p=>{if(!w8(p))return;const{target:m}=p,S=t(m,p);if(typeof S!="function"||!m)return;const b=_=>{w8(_)&&(S(_),m.removeEventListener("pointerleave",b))};m.addEventListener("pointerleave",b,u)};return s.forEach(p=>{p.addEventListener("pointerenter",f,u)}),c}const U8=(n,t)=>t?n===t?!0:U8(n,t.parentElement):!1,bS=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1,wU=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function B8(n){return wU.has(n.tagName)||n.isContentEditable===!0}const ug=new WeakSet;function V8(n){return t=>{t.key==="Enter"&&n(t)}}function ES(n,t){n.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const UU=(n,t)=>{const i=n.currentTarget;if(!i)return;const s=V8(()=>{if(ug.has(i))return;ES(i,"down");const u=V8(()=>{ES(i,"up")}),c=()=>ES(i,"cancel");i.addEventListener("keyup",u,t),i.addEventListener("blur",c,t)});i.addEventListener("keydown",s,t),i.addEventListener("blur",()=>i.removeEventListener("keydown",s),t)};function G8(n){return bS(n)&&!z8()}function BU(n,t,i={}){const[s,u,c]=H8(n,i),f=p=>{const m=p.currentTarget;if(!G8(p))return;ug.add(m);const S=t(m,p),b=(D,A)=>{window.removeEventListener("pointerup",_),window.removeEventListener("pointercancel",x),ug.has(m)&&ug.delete(m),G8(D)&&typeof S=="function"&&S(D,{success:A})},_=D=>{b(D,m===window||m===document||i.useGlobalTarget||U8(m,D.target))},x=D=>{b(D,!1)};window.addEventListener("pointerup",_,u),window.addEventListener("pointercancel",x,u)};return s.forEach(p=>{(i.useGlobalTarget?window:p).addEventListener("pointerdown",f,u),NU(p)&&(p.addEventListener("focus",S=>UU(S,u)),!B8(p)&&!p.hasAttribute("tabindex")&&(p.tabIndex=0))}),c}function j8(n){return Mb(n)&&"ownerSVGElement"in n}function VU(n){return j8(n)&&n.tagName==="svg"}const Ia=n=>!!(n&&n.getVelocity),GU=[...x8,$n,Io],jU=n=>GU.find(_8(n)),L8=H.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});function LU(n=!0){const t=H.useContext(Uv);if(t===null)return[!0,null];const{isPresent:i,onExitComplete:s,register:u}=t,c=H.useId();H.useEffect(()=>{if(n)return u(c)},[n]);const f=H.useCallback(()=>n&&s&&s(c),[c,s,n]);return!i&&s?[!1,f]:[!0]}const P8=H.createContext({strict:!1}),Y8={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"]},Ch={};for(const n in Y8)Ch[n]={isEnabled:t=>Y8[n].some(i=>!!t[i])};function PU(n){for(const t in n)Ch[t]={...Ch[t],...n[t]}}const YU=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 cg(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||YU.has(n)}let q8=n=>!cg(n);function qU(n){typeof n=="function"&&(q8=t=>t.startsWith("on")?!cg(t):n(t))}try{qU(require("@emotion/is-prop-valid").default)}catch{}function XU(n,t,i){const s={};for(const u in n)u==="values"&&typeof n.values=="object"||(q8(u)||i===!0&&cg(u)||!t&&!cg(u)||n.draggable&&u.startsWith("onDrag"))&&(s[u]=n[u]);return s}const fg=H.createContext({});function hg(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function S0(n){return typeof n=="string"||Array.isArray(n)}const TS=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],CS=["initial",...TS];function dg(n){return hg(n.animate)||CS.some(t=>S0(n[t]))}function X8(n){return!!(dg(n)||n.variants)}function KU(n,t){if(dg(n)){const{initial:i,animate:s}=n;return{initial:i===!1||S0(i)?i:void 0,animate:S0(s)?s:void 0}}return n.inherit!==!1?t:{}}function QU(n){const{initial:t,animate:i}=KU(n,H.useContext(fg));return H.useMemo(()=>({initial:t,animate:i}),[K8(t),K8(i)])}function K8(n){return Array.isArray(n)?n.join(" "):n}function Q8(n,t){return t.max===t.min?0:n/(t.max-t.min)*100}const b0={correct:(n,t)=>{if(!t.target)return n;if(typeof n=="string")if(wt.test(n))n=parseFloat(n);else return n;const i=Q8(n,t.target.x),s=Q8(n,t.target.y);return`${i}% ${s}%`}},ZU={correct:(n,{treeScale:t,projectionDelta:i})=>{const s=n,u=Io.parse(n);if(u.length>5)return s;const c=Io.createTransformer(n),f=typeof u[0]!="number"?1:0,p=i.x.scale*t.x,m=i.y.scale*t.y;u[0+f]/=p,u[1+f]/=m;const S=Cn(p,m,.5);return typeof u[2+f]=="number"&&(u[2+f]/=S),typeof u[3+f]=="number"&&(u[3+f]/=S),c(u)}},_S={borderRadius:{...b0,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:b0,borderTopRightRadius:b0,borderBottomLeftRadius:b0,borderBottomRightRadius:b0,boxShadow:ZU};function Z8(n,{layout:t,layoutId:i}){return Eh.has(n)||n.startsWith("origin")||(t||i!==void 0)&&(!!_S[n]||n==="opacity")}const JU={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},FU=bh.length;function kU(n,t,i){let s="",u=!0;for(let c=0;c<FU;c++){const f=bh[c],p=n[f];if(p===void 0)continue;let m=!0;if(typeof p=="number"?m=p===(f.startsWith("scale")?1:0):m=parseFloat(p)===0,!m||i){const S=O8(p,vS[f]);if(!m){u=!1;const b=JU[f]||f;s+=`${b}(${S}) `}i&&(t[f]=S)}}return s=s.trim(),i?s=i(t,u?"":s):u&&(s="none"),s}function xS(n,t,i){const{style:s,vars:u,transformOrigin:c}=n;let f=!1,p=!1;for(const m in t){const S=t[m];if(Eh.has(m)){f=!0;continue}else if(Qb(m)){u[m]=S;continue}else{const b=O8(S,vS[m]);m.startsWith("origin")?(p=!0,c[m]=b):s[m]=b}}if(t.transform||(f||i?s.transform=kU(t,n.transform,i):s.transform&&(s.transform="none")),p){const{originX:m="50%",originY:S="50%",originZ:b=0}=c;s.transformOrigin=`${m} ${S} ${b}`}}const DS=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function J8(n,t,i){for(const s in t)!Ia(t[s])&&!Z8(s,i)&&(n[s]=t[s])}function IU({transformTemplate:n},t){return H.useMemo(()=>{const i=DS();return xS(i,t,n),Object.assign({},i.vars,i.style)},[t])}function WU(n,t){const i=n.style||{},s={};return J8(s,i,n),Object.assign(s,IU(n,t)),s}function $U(n,t){const i={},s=WU(n,t);return n.drag&&n.dragListener!==!1&&(i.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(i.tabIndex=0),i.style=s,i}const tB={offset:"stroke-dashoffset",array:"stroke-dasharray"},eB={offset:"strokeDashoffset",array:"strokeDasharray"};function nB(n,t,i=1,s=0,u=!0){n.pathLength=1;const c=u?tB:eB;n[c.offset]=wt.transform(-s);const f=wt.transform(t),p=wt.transform(i);n[c.array]=`${f} ${p}`}const aB=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function F8(n,{attrX:t,attrY:i,attrScale:s,pathLength:u,pathSpacing:c=1,pathOffset:f=0,...p},m,S,b){if(xS(n,p,S),m){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:_,style:x}=n;_.transform&&(x.transform=_.transform,delete _.transform),(x.transform||_.transformOrigin)&&(x.transformOrigin=_.transformOrigin??"50% 50%",delete _.transformOrigin),x.transform&&(x.transformBox=b?.transformBox??"fill-box",delete _.transformBox);for(const D of aB)_[D]!==void 0&&(x[D]=_[D],delete _[D]);t!==void 0&&(_.x=t),i!==void 0&&(_.y=i),s!==void 0&&(_.scale=s),u!==void 0&&nB(_,u,c,f,!1)}const k8=()=>({...DS(),attrs:{}}),I8=n=>typeof n=="string"&&n.toLowerCase()==="svg";function iB(n,t,i,s){const u=H.useMemo(()=>{const c=k8();return F8(c,t,I8(s),n.transformTemplate,n.style),{...c.attrs,style:{...c.style}}},[t]);if(n.style){const c={};J8(c,n.style,n),u.style={...c,...u.style}}return u}const sB=["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 AS(n){return typeof n!="string"||n.includes("-")?!1:!!(sB.indexOf(n)>-1||/[A-Z]/u.test(n))}function lB(n,t,i,{latestValues:s},u,c=!1,f){const m=(f??AS(n)?iB:$U)(t,s,u,n),S=XU(t,typeof n=="string",c),b=n!==H.Fragment?{...S,...m,ref:i}:{},{children:_}=t,x=H.useMemo(()=>Ia(_)?_.get():_,[_]);return H.createElement(n,{...b,children:x})}function W8(n){const t=[{},{}];return n?.values.forEach((i,s)=>{t[0][s]=i.get(),t[1][s]=i.getVelocity()}),t}function MS(n,t,i,s){if(typeof t=="function"){const[u,c]=W8(s);t=t(i!==void 0?i:n.custom,u,c)}if(typeof t=="string"&&(t=n.variants&&n.variants[t]),typeof t=="function"){const[u,c]=W8(s);t=t(i!==void 0?i:n.custom,u,c)}return t}function pg(n){return Ia(n)?n.get():n}function rB({scrapeMotionValuesFromProps:n,createRenderState:t},i,s,u){return{latestValues:oB(i,s,u,n),renderState:t()}}function oB(n,t,i,s){const u={},c=s(n,{});for(const x in c)u[x]=pg(c[x]);let{initial:f,animate:p}=n;const m=dg(n),S=X8(n);t&&S&&!m&&n.inherit!==!1&&(f===void 0&&(f=t.initial),p===void 0&&(p=t.animate));let b=i?i.initial===!1:!1;b=b||f===!1;const _=b?p:f;if(_&&typeof _!="boolean"&&!hg(_)){const x=Array.isArray(_)?_:[_];for(let D=0;D<x.length;D++){const A=MS(n,x[D]);if(A){const{transitionEnd:N,transition:R,...O}=A;for(const U in O){let j=O[U];if(Array.isArray(j)){const V=b?j.length-1:0;j=j[V]}j!==null&&(u[U]=j)}for(const U in N)u[U]=N[U]}}}return u}const $8=n=>(t,i)=>{const s=H.useContext(fg),u=H.useContext(Uv),c=()=>rB(n,t,s,u);return i?c():qH(c)};function NS(n,t,i){const{style:s}=n,u={};for(const c in s)(Ia(s[c])||t.style&&Ia(t.style[c])||Z8(c,n)||i?.getValue(c)?.liveStyle!==void 0)&&(u[c]=s[c]);return u}const uB=$8({scrapeMotionValuesFromProps:NS,createRenderState:DS});function t7(n,t,i){const s=NS(n,t,i);for(const u in n)if(Ia(n[u])||Ia(t[u])){const c=bh.indexOf(u)!==-1?"attr"+u.charAt(0).toUpperCase()+u.substring(1):u;s[c]=n[u]}return s}const cB=$8({scrapeMotionValuesFromProps:t7,createRenderState:k8}),fB=Symbol.for("motionComponentSymbol");function hB(n,t,i){const s=H.useRef(i);H.useInsertionEffect(()=>{s.current=i});const u=H.useRef(null);return H.useCallback(c=>{c&&n.onMount?.(c),t&&(c?t.mount(c):t.unmount());const f=s.current;if(typeof f=="function")if(c){const p=f(c);typeof p=="function"&&(u.current=p)}else u.current?(u.current(),u.current=null):f(c);else f&&(f.current=c)},[t])}const OS=n=>n.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),e7="data-"+OS("framerAppearId"),n7=H.createContext({});function E0(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function dB(n,t,i,s,u,c){const{visualElement:f}=H.useContext(fg),p=H.useContext(P8),m=H.useContext(Uv),S=H.useContext(L8).reducedMotion,b=H.useRef(null);s=s||p.renderer,!b.current&&s&&(b.current=s(n,{visualState:t,parent:f,props:i,presenceContext:m,blockInitialAnimation:m?m.initial===!1:!1,reducedMotionConfig:S,isSVG:c}));const _=b.current,x=H.useContext(n7);_&&!_.projection&&u&&(_.type==="html"||_.type==="svg")&&pB(b.current,i,u,x);const D=H.useRef(!1);H.useInsertionEffect(()=>{_&&D.current&&_.update(i,m)});const A=i[e7],N=H.useRef(!!A&&!window.MotionHandoffIsComplete?.(A)&&window.MotionHasOptimisedAnimation?.(A));return XH(()=>{_&&(D.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),_.scheduleRenderMicrotask(),N.current&&_.animationState&&_.animationState.animateChanges())}),H.useEffect(()=>{_&&(!N.current&&_.animationState&&_.animationState.animateChanges(),N.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(A)}),N.current=!1),_.enteringChildren=void 0)}),_}function pB(n,t,i,s){const{layoutId:u,layout:c,drag:f,dragConstraints:p,layoutScroll:m,layoutRoot:S,layoutCrossfade:b}=t;n.projection=new i(n.latestValues,t["data-framer-portal-id"]?void 0:a7(n.parent)),n.projection.setOptions({layoutId:u,layout:c,alwaysMeasureLayout:!!f||p&&E0(p),visualElement:n,animationType:typeof c=="string"?c:"both",initialPromotionConfig:s,crossfade:b,layoutScroll:m,layoutRoot:S})}function a7(n){if(n)return n.options.allowProjection!==!1?n.projection:a7(n.parent)}function RS(n,{forwardMotionProps:t=!1,type:i}={},s,u){s&&PU(s);const c=i?i==="svg":AS(n),f=c?cB:uB;function p(S,b){let _;const x={...H.useContext(L8),...S,layoutId:mB(S)},{isStatic:D}=x,A=QU(S),N=f(S,D);if(!D&&wv){gB(x,s);const R=yB(x);_=R.MeasureLayout,A.visualElement=dB(n,N,x,u,R.ProjectionNode,c)}return X.jsxs(fg.Provider,{value:A,children:[_&&A.visualElement?X.jsx(_,{visualElement:A.visualElement,...x}):null,lB(n,S,hB(N,A.visualElement,b),N,D,t,c)]})}p.displayName=`motion.${typeof n=="string"?n:`create(${n.displayName??n.name??""})`}`;const m=H.forwardRef(p);return m[fB]=n,m}function mB({layoutId:n}){const t=H.useContext(Db).id;return t&&n!==void 0?t+"-"+n:n}function gB(n,t){const i=H.useContext(P8).strict;if(process.env.NODE_ENV!=="production"&&t&&i){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?gh(!1,s,"lazy-strict-mode"):Gr(!1,s,"lazy-strict-mode")}}function yB(n){const{drag:t,layout:i}=Ch;if(!t&&!i)return{};const s={...t,...i};return{MeasureLayout:t?.isEnabled(n)||i?.isEnabled(n)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function vB(n,t){if(typeof Proxy>"u")return RS;const i=new Map,s=(c,f)=>RS(c,f,n,t),u=(c,f)=>(process.env.NODE_ENV!=="production"&&Pv(!1,"motion() is deprecated. Use motion.create() instead."),s(c,f));return new Proxy(u,{get:(c,f)=>f==="create"?s:(i.has(f)||i.set(f,RS(f,void 0,n,t)),i.get(f))})}function i7({top:n,left:t,right:i,bottom:s}){return{x:{min:t,max:i},y:{min:n,max:s}}}function SB({x:n,y:t}){return{top:t.min,right:n.max,bottom:t.max,left:n.min}}function bB(n,t){if(!t)return n;const i=t({x:n.left,y:n.top}),s=t({x:n.right,y:n.bottom});return{top:i.y,left:i.x,bottom:s.y,right:s.x}}function zS(n){return n===void 0||n===1}function HS({scale:n,scaleX:t,scaleY:i}){return!zS(n)||!zS(t)||!zS(i)}function Tc(n){return HS(n)||s7(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function s7(n){return l7(n.x)||l7(n.y)}function l7(n){return n&&n!=="0%"}function mg(n,t,i){const s=n-i,u=t*s;return i+u}function r7(n,t,i,s,u){return u!==void 0&&(n=mg(n,u,s)),mg(n,i,s)+t}function wS(n,t=0,i=1,s,u){n.min=r7(n.min,t,i,s,u),n.max=r7(n.max,t,i,s,u)}function o7(n,{x:t,y:i}){wS(n.x,t.translate,t.scale,t.originPoint),wS(n.y,i.translate,i.scale,i.originPoint)}const u7=.999999999999,c7=1.0000000000001;function EB(n,t,i,s=!1){const u=i.length;if(!u)return;t.x=t.y=1;let c,f;for(let p=0;p<u;p++){c=i[p],f=c.projectionDelta;const{visualElement:m}=c.options;m&&m.props.style&&m.props.style.display==="contents"||(s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&xh(n,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),f&&(t.x*=f.x.scale,t.y*=f.y.scale,o7(n,f)),s&&Tc(c.latestValues)&&xh(n,c.latestValues))}t.x<c7&&t.x>u7&&(t.x=1),t.y<c7&&t.y>u7&&(t.y=1)}function _h(n,t){n.min=n.min+t,n.max=n.max+t}function f7(n,t,i,s,u=.5){const c=Cn(n.min,n.max,u);wS(n,t,i,c,s)}function xh(n,t){f7(n.x,t.x,t.scaleX,t.scale,t.originX),f7(n.y,t.y,t.scaleY,t.scale,t.originY)}function h7(n,t){return i7(bB(n.getBoundingClientRect(),t))}function TB(n,t,i){const s=h7(n,i),{scroll:u}=t;return u&&(_h(s.x,u.offset.x),_h(s.y,u.offset.y)),s}const d7=()=>({translate:0,scale:1,origin:0,originPoint:0}),Dh=()=>({x:d7(),y:d7()}),p7=()=>({min:0,max:0}),fa=()=>({x:p7(),y:p7()}),US={current:null},m7={current:!1};function CB(){if(m7.current=!0,!!wv)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),t=()=>US.current=n.matches;n.addEventListener("change",t),t()}else US.current=!1}const _B=new WeakMap;function xB(n,t,i){for(const s in t){const u=t[s],c=i[s];if(Ia(u))n.addValue(s,u);else if(Ia(c))n.addValue(s,Th(u,{owner:n}));else if(c!==u)if(n.hasValue(s)){const f=n.getValue(s);f.liveStyle===!0?f.jump(u):f.hasAnimated||f.set(u)}else{const f=n.getStaticValue(s);n.addValue(s,Th(f!==void 0?f:u,{owner:n}))}}for(const s in i)t[s]===void 0&&n.removeValue(s);return t}const g7=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class DB{scrapeMotionValuesFromProps(t,i,s){return{}}constructor({parent:t,props:i,presenceContext:s,reducedMotionConfig:u,blockInitialAnimation:c,visualState:f},p={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=pS,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=()=>{const x=Ai.now();this.renderScheduledAt<x&&(this.renderScheduledAt=x,dn.render(this.render,!1,!0))};const{latestValues:m,renderState:S}=f;this.latestValues=m,this.baseTarget={...m},this.initialValues=i.initial?{...m}:{},this.renderState=S,this.parent=t,this.props=i,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=u,this.options=p,this.blockInitialAnimation=!!c,this.isControllingVariants=dg(i),this.isVariantNode=X8(i),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:b,..._}=this.scrapeMotionValuesFromProps(i,{},this);for(const x in _){const D=_[x];m[x]!==void 0&&Ia(D)&&D.set(m[x])}}mount(t){this.current=t,_B.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,s)=>this.bindToMotionValue(s,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(m7.current||CB(),this.shouldReduceMotion=US.current),process.env.NODE_ENV!=="production"&&Pv(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Fo(this.notifyUpdate),Fo(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const i=this.features[t];i&&(i.unmount(),i.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,i){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=Eh.has(t);s&&this.onBindTransform&&this.onBindTransform();const u=i.on("change",f=>{this.latestValues[t]=f,this.props.onUpdate&&dn.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let c;window.MotionCheckAppearSync&&(c=window.MotionCheckAppearSync(this,t,i)),this.valueSubscriptions.set(t,()=>{u(),c&&c(),i.owner&&i.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ch){const i=Ch[t];if(!i)continue;const{isEnabled:s,Feature:u}=i;if(!this.features[t]&&u&&s(this.props)&&(this.features[t]=new u(this)),this.features[t]){const c=this.features[t];c.isMounted?c.update():(c.mount(),c.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):fa()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,i){this.latestValues[t]=i}update(t,i){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=i;for(let s=0;s<g7.length;s++){const u=g7[s];this.propEventSubscriptions[u]&&(this.propEventSubscriptions[u](),delete this.propEventSubscriptions[u]);const c="on"+u,f=t[c];f&&(this.propEventSubscriptions[u]=this.on(u,f))}this.prevMotionValues=xB(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const i=this.getClosestVariantNode();if(i)return i.variantChildren&&i.variantChildren.add(t),()=>i.variantChildren.delete(t)}addValue(t,i){const s=this.values.get(t);i!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,i),this.values.set(t,i),this.latestValues[t]=i.get())}removeValue(t){this.values.delete(t);const i=this.valueSubscriptions.get(t);i&&(i(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,i){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&i!==void 0&&(s=Th(i===null?void 0:i,{owner:this}),this.addValue(t,s)),s}readValue(t,i){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(Ab(s)||Nb(s))?s=parseFloat(s):!jU(s)&&Io.test(i)&&(s=N8(t,i)),this.setBaseTarget(t,Ia(s)?s.get():s)),Ia(s)?s.get():s}setBaseTarget(t,i){this.baseTarget[t]=i}getBaseTarget(t){const{initial:i}=this.props;let s;if(typeof i=="string"||typeof i=="object"){const c=MS(this.props,i,this.presenceContext?.custom);c&&(s=c[t])}if(i&&s!==void 0)return s;const u=this.getBaseTargetFromProps(this.props,t);return u!==void 0&&!Ia(u)?u:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,i){return this.events[t]||(this.events[t]=new Lv),this.events[t].add(i)}notify(t,...i){this.events[t]&&this.events[t].notify(...i)}scheduleRenderMicrotask(){SS.render(this.render)}}class y7 extends DB{constructor(){super(...arguments),this.KeyframeResolver=AU}sortInstanceNodePosition(t,i){return t.compareDocumentPosition(i)&2?1:-1}getBaseTargetFromProps(t,i){return t.style?t.style[i]:void 0}removeValueFromRenderState(t,{vars:i,style:s}){delete i[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ia(t)&&(this.childSubscription=t.on("change",i=>{this.current&&(this.current.textContent=`${i}`)}))}}function v7(n,{style:t,vars:i},s,u){const c=n.style;let f;for(f in t)c[f]=t[f];u?.applyProjectionStyles(c,s);for(f in i)c.setProperty(f,i[f])}function AB(n){return window.getComputedStyle(n)}class MB extends y7{constructor(){super(...arguments),this.type="html",this.renderInstance=v7}readValueFromInstance(t,i){if(Eh.has(i))return this.projection?.isProjecting?uS(i):Qw(t,i);{const s=AB(t),u=(Qb(i)?s.getPropertyValue(i):s[i])||0;return typeof u=="string"?u.trim():u}}measureInstanceViewportBox(t,{transformPagePoint:i}){return h7(t,i)}build(t,i,s){xS(t,i,s.transformTemplate)}scrapeMotionValuesFromProps(t,i,s){return NS(t,i,s)}}const S7=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"]);function NB(n,t,i,s){v7(n,t,void 0,s);for(const u in t.attrs)n.setAttribute(S7.has(u)?u:OS(u),t.attrs[u])}class OB extends y7{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=fa}getBaseTargetFromProps(t,i){return t[i]}readValueFromInstance(t,i){if(Eh.has(i)){const s=M8(i);return s&&s.default||0}return i=S7.has(i)?i:OS(i),t.getAttribute(i)}scrapeMotionValuesFromProps(t,i,s){return t7(t,i,s)}build(t,i,s){F8(t,i,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,i,s,u){NB(t,i,s,u)}mount(t){this.isSVGTag=I8(t.tagName),super.mount(t)}}const RB=(n,t)=>t.isSVG??AS(n)?new OB(t):new MB(t,{allowProjection:n!==H.Fragment});function Ah(n,t,i){const s=n.getProps();return MS(s,t,i!==void 0?i:s.custom,n)}const BS=n=>Array.isArray(n);function zB(n,t,i){n.hasValue(t)?n.getValue(t).set(i):n.addValue(t,Th(i))}function HB(n){return BS(n)?n[n.length-1]||0:n}function wB(n,t){const i=Ah(n,t);let{transitionEnd:s={},transition:u={},...c}=i||{};c={...c,...s};for(const f in c){const p=HB(c[f]);zB(n,f,p)}}function UB(n){return!!(Ia(n)&&n.add)}function VS(n,t){const i=n.getValue("willChange");if(UB(i))return i.add(t);if(!i&&jr.WillChange){const s=new jr.WillChange("auto");n.addValue("willChange",s),s.add(t)}}function b7(n){return n.props[e7]}const BB=n=>n!==null;function VB(n,{repeat:t,repeatType:i="loop"},s){const u=n.filter(BB),c=t&&i!=="loop"&&t%2===1?0:u.length-1;return u[c]}const GB={type:"spring",stiffness:500,damping:25,restSpeed:10},jB=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),LB={type:"keyframes",duration:.8},PB={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},YB=(n,{keyframes:t})=>t.length>2?LB:Eh.has(n)?n.startsWith("scale")?jB(t[1]):GB:PB;function qB({when:n,delay:t,delayChildren:i,staggerChildren:s,staggerDirection:u,repeat:c,repeatType:f,repeatDelay:p,from:m,elapsed:S,...b}){return!!Object.keys(b).length}const GS=(n,t,i,s={},u,c)=>f=>{const p=gS(s,n)||{},m=p.delay||s.delay||0;let{elapsed:S=0}=s;S=S-ol(m);const b={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:t.getVelocity(),...p,delay:-S,onUpdate:x=>{t.set(x),p.onUpdate&&p.onUpdate(x)},onComplete:()=>{f(),p.onComplete&&p.onComplete()},name:n,motionValue:t,element:c?void 0:u};qB(p)||Object.assign(b,YB(n,b)),b.duration&&(b.duration=ol(b.duration)),b.repeatDelay&&(b.repeatDelay=ol(b.repeatDelay)),b.from!==void 0&&(b.keyframes[0]=b.from);let _=!1;if((b.type===!1||b.duration===0&&!b.repeatDelay)&&(mS(b),b.delay===0&&(_=!0)),(jr.instantAnimations||jr.skipAnimations)&&(_=!0,mS(b),b.delay=0),b.allowFlatten=!p.type&&!p.ease,_&&!c&&t.get()!==void 0){const x=VB(b.keyframes,p);if(x!==void 0){dn.update(()=>{b.onUpdate(x),b.onComplete()});return}}return p.isSync?new lS(b):new mU(b)};function XB({protectedKeys:n,needsAnimating:t},i){const s=n.hasOwnProperty(i)&&t[i]!==!0;return t[i]=!1,s}function E7(n,t,{delay:i=0,transitionOverride:s,type:u}={}){let{transition:c=n.getDefaultTransition(),transitionEnd:f,...p}=t;s&&(c=s);const m=[],S=u&&n.animationState&&n.animationState.getState()[u];for(const b in p){const _=n.getValue(b,n.latestValues[b]??null),x=p[b];if(x===void 0||S&&XB(S,b))continue;const D={delay:i,...gS(c||{},b)},A=_.get();if(A!==void 0&&!_.isAnimating&&!Array.isArray(x)&&x===A&&!D.velocity)continue;let N=!1;if(window.MotionHandoffAnimation){const O=b7(n);if(O){const U=window.MotionHandoffAnimation(O,b,dn);U!==null&&(D.startTime=U,N=!0)}}VS(n,b),_.start(GS(b,_,x,n.shouldReduceMotion&&C8.has(b)?{type:!1}:D,n,N));const R=_.animation;R&&m.push(R)}return f&&Promise.all(m).then(()=>{dn.update(()=>{f&&wB(n,f)})}),m}function T7(n,t,i,s=0,u=1){const c=Array.from(n).sort((S,b)=>S.sortNodePosition(b)).indexOf(t),f=n.size,p=(f-1)*s;return typeof i=="function"?i(c,f):u===1?c*s:p-c*s}function jS(n,t,i={}){const s=Ah(n,t,i.type==="exit"?n.presenceContext?.custom:void 0);let{transition:u=n.getDefaultTransition()||{}}=s||{};i.transitionOverride&&(u=i.transitionOverride);const c=s?()=>Promise.all(E7(n,s,i)):()=>Promise.resolve(),f=n.variantChildren&&n.variantChildren.size?(m=0)=>{const{delayChildren:S=0,staggerChildren:b,staggerDirection:_}=u;return KB(n,t,m,S,b,_,i)}:()=>Promise.resolve(),{when:p}=u;if(p){const[m,S]=p==="beforeChildren"?[c,f]:[f,c];return m().then(()=>S())}else return Promise.all([c(),f(i.delay)])}function KB(n,t,i=0,s=0,u=0,c=1,f){const p=[];for(const m of n.variantChildren)m.notify("AnimationStart",t),p.push(jS(m,t,{...f,delay:i+(typeof s=="function"?0:s)+T7(n.variantChildren,m,s,u,c)}).then(()=>m.notify("AnimationComplete",t)));return Promise.all(p)}function QB(n,t,i={}){n.notify("AnimationStart",t);let s;if(Array.isArray(t)){const u=t.map(c=>jS(n,c,i));s=Promise.all(u)}else if(typeof t=="string")s=jS(n,t,i);else{const u=typeof t=="function"?Ah(n,t,i.custom):t;s=Promise.all(E7(n,u,i))}return s.then(()=>{n.notify("AnimationComplete",t)})}function C7(n,t){if(!Array.isArray(t))return!1;const i=t.length;if(i!==n.length)return!1;for(let s=0;s<i;s++)if(t[s]!==n[s])return!1;return!0}const ZB=CS.length;function _7(n){if(!n)return;if(!n.isControllingVariants){const i=n.parent?_7(n.parent)||{}:{};return n.props.initial!==void 0&&(i.initial=n.props.initial),i}const t={};for(let i=0;i<ZB;i++){const s=CS[i],u=n.props[s];(S0(u)||u===!1)&&(t[s]=u)}return t}const JB=[...TS].reverse(),FB=TS.length;function kB(n){return t=>Promise.all(t.map(({animation:i,options:s})=>QB(n,i,s)))}function IB(n){let t=kB(n),i=x7(),s=!0;const u=m=>(S,b)=>{const _=Ah(n,b,m==="exit"?n.presenceContext?.custom:void 0);if(_){const{transition:x,transitionEnd:D,...A}=_;S={...S,...A,...D}}return S};function c(m){t=m(n)}function f(m){const{props:S}=n,b=_7(n.parent)||{},_=[],x=new Set;let D={},A=1/0;for(let R=0;R<FB;R++){const O=JB[R],U=i[O],j=S[O]!==void 0?S[O]:b[O],V=S0(j),F=O===m?U.isActive:null;F===!1&&(A=R);let $=j===b[O]&&j!==S[O]&&V;if($&&s&&n.manuallyAnimateOnMount&&($=!1),U.protectedKeys={...D},!U.isActive&&F===null||!j&&!U.prevProp||hg(j)||typeof j=="boolean")continue;const st=WB(U.prevProp,j);let I=st||O===m&&U.isActive&&!$&&V||R>A&&V,et=!1;const nt=Array.isArray(j)?j:[j];let bt=nt.reduce(u(O),{});F===!1&&(bt={});const{prevResolvedValues:lt={}}=U,dt={...lt,...bt},pt=Z=>{I=!0,x.has(Z)&&(et=!0,x.delete(Z)),U.needsAnimating[Z]=!0;const K=n.getValue(Z);K&&(K.liveStyle=!1)};for(const Z in dt){const K=bt[Z],at=lt[Z];if(D.hasOwnProperty(Z))continue;let St=!1;BS(K)&&BS(at)?St=!C7(K,at):St=K!==at,St?K!=null?pt(Z):x.add(Z):K!==void 0&&x.has(Z)?pt(Z):U.protectedKeys[Z]=!0}U.prevProp=j,U.prevResolvedValues=bt,U.isActive&&(D={...D,...bt}),s&&n.blockInitialAnimation&&(I=!1);const tt=$&&st;I&&(!tt||et)&&_.push(...nt.map(Z=>{const K={type:O};if(typeof Z=="string"&&s&&!tt&&n.manuallyAnimateOnMount&&n.parent){const{parent:at}=n,St=Ah(at,Z);if(at.enteringChildren&&St){const{delayChildren:W}=St.transition||{};K.delay=T7(at.enteringChildren,n,W)}}return{animation:Z,options:K}}))}if(x.size){const R={};if(typeof S.initial!="boolean"){const O=Ah(n,Array.isArray(S.initial)?S.initial[0]:S.initial);O&&O.transition&&(R.transition=O.transition)}x.forEach(O=>{const U=n.getBaseTarget(O),j=n.getValue(O);j&&(j.liveStyle=!0),R[O]=U??null}),_.push({animation:R})}let N=!!_.length;return s&&(S.initial===!1||S.initial===S.animate)&&!n.manuallyAnimateOnMount&&(N=!1),s=!1,N?t(_):Promise.resolve()}function p(m,S){if(i[m].isActive===S)return Promise.resolve();n.variantChildren?.forEach(_=>_.animationState?.setActive(m,S)),i[m].isActive=S;const b=f(m);for(const _ in i)i[_].protectedKeys={};return b}return{animateChanges:f,setActive:p,setAnimateFunction:c,getState:()=>i,reset:()=>{i=x7()}}}function WB(n,t){return typeof t=="string"?t!==n:Array.isArray(t)?!C7(t,n):!1}function Cc(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function x7(){return{animate:Cc(!0),whileInView:Cc(),whileHover:Cc(),whileTap:Cc(),whileDrag:Cc(),whileFocus:Cc(),exit:Cc()}}class $o{constructor(t){this.isMounted=!1,this.node=t}update(){}}class $B extends $o{constructor(t){super(t),t.animationState||(t.animationState=IB(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();hg(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:i}=this.node.prevProps||{};t!==i&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let tV=0;class eV extends $o{constructor(){super(...arguments),this.id=tV++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:i}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const u=this.node.animationState.setActive("exit",!t);i&&!t&&u.then(()=>{i(this.id)})}mount(){const{register:t,onExitComplete:i}=this.node.presenceContext||{};i&&i(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const nV={animation:{Feature:$B},exit:{Feature:eV}};function T0(n,t,i,s={passive:!0}){return n.addEventListener(t,i,s),()=>n.removeEventListener(t,i)}function C0(n){return{point:{x:n.pageX,y:n.pageY}}}const aV=n=>t=>bS(t)&&n(t,C0(t));function _0(n,t,i,s){return T0(n,t,aV(i),s)}const D7=1e-4,iV=1-D7,sV=1+D7,A7=.01,lV=0-A7,rV=0+A7;function hi(n){return n.max-n.min}function oV(n,t,i){return Math.abs(n-t)<=i}function M7(n,t,i,s=.5){n.origin=s,n.originPoint=Cn(t.min,t.max,n.origin),n.scale=hi(i)/hi(t),n.translate=Cn(i.min,i.max,n.origin)-n.originPoint,(n.scale>=iV&&n.scale<=sV||isNaN(n.scale))&&(n.scale=1),(n.translate>=lV&&n.translate<=rV||isNaN(n.translate))&&(n.translate=0)}function x0(n,t,i,s){M7(n.x,t.x,i.x,s?s.originX:void 0),M7(n.y,t.y,i.y,s?s.originY:void 0)}function N7(n,t,i){n.min=i.min+t.min,n.max=n.min+hi(t)}function uV(n,t,i){N7(n.x,t.x,i.x),N7(n.y,t.y,i.y)}function O7(n,t,i){n.min=t.min-i.min,n.max=n.min+hi(t)}function gg(n,t,i){O7(n.x,t.x,i.x),O7(n.y,t.y,i.y)}function xs(n){return[n("x"),n("y")]}const R7=({current:n})=>n?n.ownerDocument.defaultView:null,z7=(n,t)=>Math.abs(n-t);function cV(n,t){const i=z7(n.x,t.x),s=z7(n.y,t.y);return Math.sqrt(i**2+s**2)}class H7{constructor(t,i,{transformPagePoint:s,contextWindow:u=window,dragSnapToOrigin:c=!1,distanceThreshold:f=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=PS(this.lastMoveEventInfo,this.history),D=this.startEvent!==null,A=cV(x.offset,{x:0,y:0})>=this.distanceThreshold;if(!D&&!A)return;const{point:N}=x,{timestamp:R}=wa;this.history.push({...N,timestamp:R});const{onStart:O,onMove:U}=this.handlers;D||(O&&O(this.lastMoveEvent,x),this.startEvent=this.lastMoveEvent),U&&U(this.lastMoveEvent,x)},this.handlePointerMove=(x,D)=>{this.lastMoveEvent=x,this.lastMoveEventInfo=LS(D,this.transformPagePoint),dn.update(this.updatePoint,!0)},this.handlePointerUp=(x,D)=>{this.end();const{onEnd:A,onSessionEnd:N,resumeAnimation:R}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&R&&R(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const O=PS(x.type==="pointercancel"?this.lastMoveEventInfo:LS(D,this.transformPagePoint),this.history);this.startEvent&&A&&A(x,O),N&&N(x,O)},!bS(t))return;this.dragSnapToOrigin=c,this.handlers=i,this.transformPagePoint=s,this.distanceThreshold=f,this.contextWindow=u||window;const p=C0(t),m=LS(p,this.transformPagePoint),{point:S}=m,{timestamp:b}=wa;this.history=[{...S,timestamp:b}];const{onSessionStart:_}=i;_&&_(t,PS(m,this.history)),this.removeListeners=f0(_0(this.contextWindow,"pointermove",this.handlePointerMove),_0(this.contextWindow,"pointerup",this.handlePointerUp),_0(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Fo(this.updatePoint)}}function LS(n,t){return t?{point:t(n.point)}:n}function w7(n,t){return{x:n.x-t.x,y:n.y-t.y}}function PS({point:n},t){return{point:n,delta:w7(n,U7(t)),offset:w7(n,fV(t)),velocity:hV(t,.1)}}function fV(n){return n[0]}function U7(n){return n[n.length-1]}function hV(n,t){if(n.length<2)return{x:0,y:0};let i=n.length-1,s=null;const u=U7(n);for(;i>=0&&(s=n[i],!(u.timestamp-s.timestamp>ol(t)));)i--;if(!s)return{x:0,y:0};const c=_s(u.timestamp-s.timestamp);if(c===0)return{x:0,y:0};const f={x:(u.x-s.x)/c,y:(u.y-s.y)/c};return f.x===1/0&&(f.x=0),f.y===1/0&&(f.y=0),f}function dV(n,{min:t,max:i},s){return t!==void 0&&n<t?n=s?Cn(t,n,s.min):Math.max(n,t):i!==void 0&&n>i&&(n=s?Cn(i,n,s.max):Math.min(n,i)),n}function B7(n,t,i){return{min:t!==void 0?n.min+t:void 0,max:i!==void 0?n.max+i-(n.max-n.min):void 0}}function pV(n,{top:t,left:i,bottom:s,right:u}){return{x:B7(n.x,i,u),y:B7(n.y,t,s)}}function V7(n,t){let i=t.min-n.min,s=t.max-n.max;return t.max-t.min<n.max-n.min&&([i,s]=[s,i]),{min:i,max:s}}function mV(n,t){return{x:V7(n.x,t.x),y:V7(n.y,t.y)}}function gV(n,t){let i=.5;const s=hi(n),u=hi(t);return u>s?i=h0(t.min,t.max-s,n.min):s>u&&(i=h0(n.min,n.max-u,t.min)),Vr(0,1,i)}function yV(n,t){const i={};return t.min!==void 0&&(i.min=t.min-n.min),t.max!==void 0&&(i.max=t.max-n.min),i}const YS=.35;function vV(n=YS){return n===!1?n=0:n===!0&&(n=YS),{x:G7(n,"left","right"),y:G7(n,"top","bottom")}}function G7(n,t,i){return{min:j7(n,t),max:j7(n,i)}}function j7(n,t){return typeof n=="number"?n:n[t]||0}const SV=new WeakMap;class bV{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=fa(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:i=!1,distanceThreshold:s}={}){const{presenceContext:u}=this.visualElement;if(u&&u.isPresent===!1)return;const c=_=>{i?(this.stopAnimation(),this.snapToCursor(C0(_).point)):this.pauseAnimation()},f=(_,x)=>{this.stopAnimation();const{drag:D,dragPropagation:A,onDragStart:N}=this.getProps();if(D&&!A&&(this.openDragLock&&this.openDragLock(),this.openDragLock=zU(D),!this.openDragLock))return;this.latestPointerEvent=_,this.latestPanInfo=x,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),xs(O=>{let U=this.getAxisMotionValue(O).get()||0;if(kl.test(U)){const{projection:j}=this.visualElement;if(j&&j.layout){const V=j.layout.layoutBox[O];V&&(U=hi(V)*(parseFloat(U)/100))}}this.originPoint[O]=U}),N&&dn.postRender(()=>N(_,x)),VS(this.visualElement,"transform");const{animationState:R}=this.visualElement;R&&R.setActive("whileDrag",!0)},p=(_,x)=>{this.latestPointerEvent=_,this.latestPanInfo=x;const{dragPropagation:D,dragDirectionLock:A,onDirectionLock:N,onDrag:R}=this.getProps();if(!D&&!this.openDragLock)return;const{offset:O}=x;if(A&&this.currentDirection===null){this.currentDirection=EV(O),this.currentDirection!==null&&N&&N(this.currentDirection);return}this.updateAxis("x",x.point,O),this.updateAxis("y",x.point,O),this.visualElement.render(),R&&R(_,x)},m=(_,x)=>{this.latestPointerEvent=_,this.latestPanInfo=x,this.stop(_,x),this.latestPointerEvent=null,this.latestPanInfo=null},S=()=>xs(_=>this.getAnimationState(_)==="paused"&&this.getAxisMotionValue(_).animation?.play()),{dragSnapToOrigin:b}=this.getProps();this.panSession=new H7(t,{onSessionStart:c,onStart:f,onMove:p,onSessionEnd:m,resumeAnimation:S},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:b,distanceThreshold:s,contextWindow:R7(this.visualElement)})}stop(t,i){const s=t||this.latestPointerEvent,u=i||this.latestPanInfo,c=this.isDragging;if(this.cancel(),!c||!u||!s)return;const{velocity:f}=u;this.startAnimation(f);const{onDragEnd:p}=this.getProps();p&&dn.postRender(()=>p(s,u))}cancel(){this.isDragging=!1;const{projection:t,animationState:i}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),i&&i.setActive("whileDrag",!1)}updateAxis(t,i,s){const{drag:u}=this.getProps();if(!s||!yg(t,u,this.currentDirection))return;const c=this.getAxisMotionValue(t);let f=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(f=dV(f,this.constraints[t],this.elastic[t])),c.set(f)}resolveConstraints(){const{dragConstraints:t,dragElastic:i}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,u=this.constraints;t&&E0(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=pV(s.layoutBox,t):this.constraints=!1,this.elastic=vV(i),u!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&xs(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=yV(s.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:i}=this.getProps();if(!t||!E0(t))return!1;const s=t.current;Gr(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:u}=this.visualElement;if(!u||!u.layout)return!1;const c=TB(s,u.root,this.visualElement.getTransformPagePoint());let f=mV(u.layout.layoutBox,c);if(i){const p=i(SB(f));this.hasMutatedConstraints=!!p,p&&(f=i7(p))}return f}startAnimation(t){const{drag:i,dragMomentum:s,dragElastic:u,dragTransition:c,dragSnapToOrigin:f,onDragTransitionEnd:p}=this.getProps(),m=this.constraints||{},S=xs(b=>{if(!yg(b,i,this.currentDirection))return;let _=m&&m[b]||{};f&&(_={min:0,max:0});const x=u?200:1e6,D=u?40:1e7,A={type:"inertia",velocity:s?t[b]:0,bounceStiffness:x,bounceDamping:D,timeConstant:750,restDelta:1,restSpeed:10,...c,..._};return this.startAxisValueAnimation(b,A)});return Promise.all(S).then(p)}startAxisValueAnimation(t,i){const s=this.getAxisMotionValue(t);return VS(this.visualElement,t),s.start(GS(t,s,0,i,this.visualElement,!1))}stopAnimation(){xs(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){xs(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const i=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),u=s[i];return u||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){xs(i=>{const{drag:s}=this.getProps();if(!yg(i,s,this.currentDirection))return;const{projection:u}=this.visualElement,c=this.getAxisMotionValue(i);if(u&&u.layout){const{min:f,max:p}=u.layout.layoutBox[i],m=c.get()||0;c.set(t[i]-Cn(f,p,.5)+m)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:i}=this.getProps(),{projection:s}=this.visualElement;if(!E0(i)||!s||!this.constraints)return;this.stopAnimation();const u={x:0,y:0};xs(f=>{const p=this.getAxisMotionValue(f);if(p&&this.constraints!==!1){const m=p.get();u[f]=gV({min:m,max:m},this.constraints[f])}});const{transformTemplate:c}=this.visualElement.getProps();this.visualElement.current.style.transform=c?c({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),xs(f=>{if(!yg(f,t,null))return;const p=this.getAxisMotionValue(f),{min:m,max:S}=this.constraints[f];p.set(Cn(m,S,u[f]))})}addListeners(){if(!this.visualElement.current)return;SV.set(this.visualElement,this);const t=this.visualElement.current,i=_0(t,"pointerdown",m=>{const{drag:S,dragListener:b=!0}=this.getProps();S&&b&&!B8(m.target)&&this.start(m)}),s=()=>{const{dragConstraints:m}=this.getProps();E0(m)&&m.current&&(this.constraints=this.resolveRefConstraints())},{projection:u}=this.visualElement,c=u.addEventListener("measure",s);u&&!u.layout&&(u.root&&u.root.updateScroll(),u.updateLayout()),dn.read(s);const f=T0(window,"resize",()=>this.scalePositionWithinConstraints()),p=u.addEventListener("didUpdate",(({delta:m,hasLayoutChanged:S})=>{this.isDragging&&S&&(xs(b=>{const _=this.getAxisMotionValue(b);_&&(this.originPoint[b]+=m[b].translate,_.set(_.get()+m[b].translate))}),this.visualElement.render())}));return()=>{f(),i(),c(),p&&p()}}getProps(){const t=this.visualElement.getProps(),{drag:i=!1,dragDirectionLock:s=!1,dragPropagation:u=!1,dragConstraints:c=!1,dragElastic:f=YS,dragMomentum:p=!0}=t;return{...t,drag:i,dragDirectionLock:s,dragPropagation:u,dragConstraints:c,dragElastic:f,dragMomentum:p}}}function yg(n,t,i){return(t===!0||t===n)&&(i===null||i===n)}function EV(n,t=10){let i=null;return Math.abs(n.y)>t?i="y":Math.abs(n.x)>t&&(i="x"),i}class TV extends $o{constructor(t){super(t),this.removeGroupControls=Cs,this.removeListeners=Cs,this.controls=new bV(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Cs}update(){const{dragControls:t}=this.node.getProps(),{dragControls:i}=this.node.prevProps||{};t!==i&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const L7=n=>(t,i)=>{n&&dn.postRender(()=>n(t,i))};class CV extends $o{constructor(){super(...arguments),this.removePointerDownListener=Cs}onPointerDown(t){this.session=new H7(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:R7(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:i,onPan:s,onPanEnd:u}=this.node.getProps();return{onSessionStart:L7(t),onStart:L7(i),onMove:s,onEnd:(c,f)=>{delete this.session,u&&dn.postRender(()=>u(c,f))}}}mount(){this.removePointerDownListener=_0(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const vg={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let qS=!1;class _V extends H.Component{componentDidMount(){const{visualElement:t,layoutGroup:i,switchLayoutGroup:s,layoutId:u}=this.props,{projection:c}=t;c&&(i.group&&i.group.add(c),s&&s.register&&u&&s.register(c),qS&&c.root.didUpdate(),c.addEventListener("animationComplete",()=>{this.safeToRemove()}),c.setOptions({...c.options,onExitComplete:()=>this.safeToRemove()})),vg.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:i,visualElement:s,drag:u,isPresent:c}=this.props,{projection:f}=s;return f&&(f.isPresent=c,qS=!0,u||t.layoutDependency!==i||i===void 0||t.isPresent!==c?f.willUpdate():this.safeToRemove(),t.isPresent!==c&&(c?f.promote():f.relegate()||dn.postRender(()=>{const p=f.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),SS.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:i,switchLayoutGroup:s}=this.props,{projection:u}=t;qS=!0,u&&(u.scheduleCheckAfterUnmount(),i&&i.group&&i.group.remove(u),s&&s.deregister&&s.deregister(u))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function P7(n){const[t,i]=LU(),s=H.useContext(Db);return X.jsx(_V,{...n,layoutGroup:s,switchLayoutGroup:H.useContext(n7),isPresent:t,safeToRemove:i})}function xV(n,t,i){const s=Ia(n)?n:Th(n);return s.start(GS("",s,t,i)),s.animation}const DV=(n,t)=>n.depth-t.depth;class AV{constructor(){this.children=[],this.isDirty=!1}add(t){Bv(this.children,t),this.isDirty=!0}remove(t){Vv(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(DV),this.isDirty=!1,this.children.forEach(t)}}function MV(n,t){const i=Ai.now(),s=({timestamp:u})=>{const c=u-i;c>=t&&(Fo(s),n(c-t))};return dn.setup(s,!0),()=>Fo(s)}const Y7=["TopLeft","TopRight","BottomLeft","BottomRight"],NV=Y7.length,q7=n=>typeof n=="string"?parseFloat(n):n,X7=n=>typeof n=="number"||wt.test(n);function OV(n,t,i,s,u,c){u?(n.opacity=Cn(0,i.opacity??1,RV(s)),n.opacityExit=Cn(t.opacity??1,0,zV(s))):c&&(n.opacity=Cn(t.opacity??1,i.opacity??1,s));for(let f=0;f<NV;f++){const p=`border${Y7[f]}Radius`;let m=K7(t,p),S=K7(i,p);if(m===void 0&&S===void 0)continue;m||(m=0),S||(S=0),m===0||S===0||X7(m)===X7(S)?(n[p]=Math.max(Cn(q7(m),q7(S),s),0),(kl.test(S)||kl.test(m))&&(n[p]+="%")):n[p]=S}(t.rotate||i.rotate)&&(n.rotate=Cn(t.rotate||0,i.rotate||0,s))}function K7(n,t){return n[t]!==void 0?n[t]:n.borderRadius}const RV=Q7(0,.5,Gb),zV=Q7(.5,.95,Cs);function Q7(n,t,i){return s=>s<n?0:s>t?1:i(h0(n,t,s))}function Z7(n,t){n.min=t.min,n.max=t.max}function cl(n,t){Z7(n.x,t.x),Z7(n.y,t.y)}function J7(n,t){n.translate=t.translate,n.scale=t.scale,n.originPoint=t.originPoint,n.origin=t.origin}function F7(n,t,i,s,u){return n-=t,n=mg(n,1/i,s),u!==void 0&&(n=mg(n,1/u,s)),n}function HV(n,t=0,i=1,s=.5,u,c=n,f=n){if(kl.test(t)&&(t=parseFloat(t),t=Cn(f.min,f.max,t/100)-f.min),typeof t!="number")return;let p=Cn(c.min,c.max,s);n===c&&(p-=t),n.min=F7(n.min,t,i,p,u),n.max=F7(n.max,t,i,p,u)}function k7(n,t,[i,s,u],c,f){HV(n,t[i],t[s],t[u],t.scale,c,f)}const wV=["x","scaleX","originX"],UV=["y","scaleY","originY"];function I7(n,t,i,s){k7(n.x,t,wV,i?i.x:void 0,s?s.x:void 0),k7(n.y,t,UV,i?i.y:void 0,s?s.y:void 0)}function W7(n){return n.translate===0&&n.scale===1}function $7(n){return W7(n.x)&&W7(n.y)}function t9(n,t){return n.min===t.min&&n.max===t.max}function BV(n,t){return t9(n.x,t.x)&&t9(n.y,t.y)}function e9(n,t){return Math.round(n.min)===Math.round(t.min)&&Math.round(n.max)===Math.round(t.max)}function n9(n,t){return e9(n.x,t.x)&&e9(n.y,t.y)}function a9(n){return hi(n.x)/hi(n.y)}function i9(n,t){return n.translate===t.translate&&n.scale===t.scale&&n.originPoint===t.originPoint}class VV{constructor(){this.members=[]}add(t){Bv(this.members,t),t.scheduleRender()}remove(t){if(Vv(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const i=this.members[this.members.length-1];i&&this.promote(i)}}relegate(t){const i=this.members.findIndex(u=>t===u);if(i===0)return!1;let s;for(let u=i;u>=0;u--){const c=this.members[u];if(c.isPresent!==!1){s=c;break}}return s?(this.promote(s),!0):!1}promote(t,i){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,i&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:u}=t.options;u===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:i,resumingFrom:s}=t;i.onExitComplete&&i.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function GV(n,t,i){let s="";const u=n.x.translate/t.x,c=n.y.translate/t.y,f=i?.z||0;if((u||c||f)&&(s=`translate3d(${u}px, ${c}px, ${f}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),i){const{transformPerspective:S,rotate:b,rotateX:_,rotateY:x,skewX:D,skewY:A}=i;S&&(s=`perspective(${S}px) ${s}`),b&&(s+=`rotate(${b}deg) `),_&&(s+=`rotateX(${_}deg) `),x&&(s+=`rotateY(${x}deg) `),D&&(s+=`skewX(${D}deg) `),A&&(s+=`skewY(${A}deg) `)}const p=n.x.scale*t.x,m=n.y.scale*t.y;return(p!==1||m!==1)&&(s+=`scale(${p}, ${m})`),s||"none"}const XS=["","X","Y","Z"],jV=1e3;let LV=0;function KS(n,t,i,s){const{latestValues:u}=t;u[n]&&(i[n]=u[n],t.setStaticValue(n,0),s&&(s[n]=0))}function s9(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:t}=n.options;if(!t)return;const i=b7(t);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:u,layoutId:c}=n.options;window.MotionCancelOptimisedAnimation(i,"transform",dn,!(u||c))}const{parent:s}=n;s&&!s.hasCheckedOptimisedAppear&&s9(s)}function l9({attachResizeListener:n,defaultParent:t,measureScroll:i,checkIsScrollRoot:s,resetTransform:u}){return class{constructor(f={},p=t?.()){this.id=LV++,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,this.nodes.forEach(qV),this.nodes.forEach(ZV),this.nodes.forEach(JV),this.nodes.forEach(XV)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=f,this.root=p?p.root||p:this,this.path=p?[...p.path,p]:[],this.parent=p,this.depth=p?p.depth+1:0;for(let m=0;m<this.path.length;m++)this.path[m].shouldResetTransform=!0;this.root===this&&(this.nodes=new AV)}addEventListener(f,p){return this.eventHandlers.has(f)||this.eventHandlers.set(f,new Lv),this.eventHandlers.get(f).add(p)}notifyListeners(f,...p){const m=this.eventHandlers.get(f);m&&m.notify(...p)}hasListeners(f){return this.eventHandlers.has(f)}mount(f){if(this.instance)return;this.isSVG=j8(f)&&!VU(f),this.instance=f;const{layoutId:p,layout:m,visualElement:S}=this.options;if(S&&!S.current&&S.mount(f),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(m||p)&&(this.isLayoutDirty=!0),n){let b,_=0;const x=()=>this.root.updateBlockedByResize=!1;dn.read(()=>{_=window.innerWidth}),n(f,()=>{const D=window.innerWidth;D!==_&&(_=D,this.root.updateBlockedByResize=!0,b&&b(),b=MV(x,250),vg.hasAnimatedSinceResize&&(vg.hasAnimatedSinceResize=!1,this.nodes.forEach(u9)))})}p&&this.root.registerSharedNode(p,this),this.options.animate!==!1&&S&&(p||m)&&this.addEventListener("didUpdate",({delta:b,hasLayoutChanged:_,hasRelativeLayoutChanged:x,layout:D})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const A=this.options.transition||S.getDefaultTransition()||$V,{onLayoutAnimationStart:N,onLayoutAnimationComplete:R}=S.getProps(),O=!this.targetLayout||!n9(this.targetLayout,D),U=!_&&x;if(this.options.layoutRoot||this.resumeFrom||U||_&&(O||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const j={...gS(A,"layout"),onPlay:N,onComplete:R};(S.shouldReduceMotion||this.options.layoutRoot)&&(j.delay=0,j.type=!1),this.startAnimation(j),this.setAnimationOrigin(b,U)}else _||u9(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=D})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const f=this.getStack();f&&f.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Fo(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(FV),this.animationId++)}getTransformTemplate(){const{visualElement:f}=this.options;return f&&f.getProps().transformTemplate}willUpdate(f=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&s9(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let b=0;b<this.path.length;b++){const _=this.path[b];_.shouldResetTransform=!0,_.updateScroll("snapshot"),_.options.layoutRoot&&_.willUpdate(!1)}const{layoutId:p,layout:m}=this.options;if(p===void 0&&!m)return;const S=this.getTransformTemplate();this.prevTransformTemplateValue=S?S(this.latestValues,""):void 0,this.updateSnapshot(),f&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(r9);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(o9);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(QV),this.nodes.forEach(PV),this.nodes.forEach(YV)):this.nodes.forEach(o9),this.clearAllSnapshots();const p=Ai.now();wa.delta=Vr(0,1e3/60,p-wa.timestamp),wa.timestamp=p,wa.isProcessing=!0,Xv.update.process(wa),Xv.preRender.process(wa),Xv.render.process(wa),wa.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,SS.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(KV),this.sharedNodes.forEach(kV)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,dn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){dn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!hi(this.snapshot.measuredBox.x)&&!hi(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 m=0;m<this.path.length;m++)this.path[m].updateScroll();const f=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=fa(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:p}=this.options;p&&p.notify("LayoutMeasure",this.layout.layoutBox,f?f.layoutBox:void 0)}updateScroll(f="measure"){let p=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===f&&(p=!1),p&&this.instance){const m=s(this.instance);this.scroll={animationId:this.root.animationId,phase:f,isRoot:m,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:m}}}resetTransform(){if(!u)return;const f=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,p=this.projectionDelta&&!$7(this.projectionDelta),m=this.getTransformTemplate(),S=m?m(this.latestValues,""):void 0,b=S!==this.prevTransformTemplateValue;f&&this.instance&&(p||Tc(this.latestValues)||b)&&(u(this.instance,S),this.shouldResetTransform=!1,this.scheduleRender())}measure(f=!0){const p=this.measurePageBox();let m=this.removeElementScroll(p);return f&&(m=this.removeTransform(m)),tG(m),{animationId:this.root.animationId,measuredBox:p,layoutBox:m,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:f}=this.options;if(!f)return fa();const p=f.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(eG))){const{scroll:S}=this.root;S&&(_h(p.x,S.offset.x),_h(p.y,S.offset.y))}return p}removeElementScroll(f){const p=fa();if(cl(p,f),this.scroll?.wasRoot)return p;for(let m=0;m<this.path.length;m++){const S=this.path[m],{scroll:b,options:_}=S;S!==this.root&&b&&_.layoutScroll&&(b.wasRoot&&cl(p,f),_h(p.x,b.offset.x),_h(p.y,b.offset.y))}return p}applyTransform(f,p=!1){const m=fa();cl(m,f);for(let S=0;S<this.path.length;S++){const b=this.path[S];!p&&b.options.layoutScroll&&b.scroll&&b!==b.root&&xh(m,{x:-b.scroll.offset.x,y:-b.scroll.offset.y}),Tc(b.latestValues)&&xh(m,b.latestValues)}return Tc(this.latestValues)&&xh(m,this.latestValues),m}removeTransform(f){const p=fa();cl(p,f);for(let m=0;m<this.path.length;m++){const S=this.path[m];if(!S.instance||!Tc(S.latestValues))continue;HS(S.latestValues)&&S.updateSnapshot();const b=fa(),_=S.measurePageBox();cl(b,_),I7(p,S.latestValues,S.snapshot?S.snapshot.layoutBox:void 0,b)}return Tc(this.latestValues)&&I7(p,this.latestValues),p}setTargetDelta(f){this.targetDelta=f,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(f){this.options={...this.options,...f,crossfade:f.crossfade!==void 0?f.crossfade:!0}}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!==wa.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(f=!1){const p=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=p.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=p.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=p.isSharedProjectionDirty);const m=!!this.resumingFrom||this!==p;if(!(f||m&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:b,layoutId:_}=this.options;if(!this.layout||!(b||_))return;this.resolvedRelativeTargetAt=wa.timestamp;const x=this.getClosestProjectingParent();x&&this.linkedParentVersion!==x.layoutVersion&&!x.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(x&&x.layout?this.createRelativeTarget(x,this.layout.layoutBox,x.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=fa(),this.targetWithTransforms=fa()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),uV(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):cl(this.target,this.layout.layoutBox),o7(this.target,this.targetDelta)):cl(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,x&&!!x.resumingFrom==!!this.resumingFrom&&!x.options.layoutScroll&&x.target&&this.animationProgress!==1?this.createRelativeTarget(x,this.target,x.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||HS(this.parent.latestValues)||s7(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(f,p,m){this.relativeParent=f,this.linkedParentVersion=f.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=fa(),this.relativeTargetOrigin=fa(),gg(this.relativeTargetOrigin,p,m),cl(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const f=this.getLead(),p=!!this.resumingFrom||this!==f;let m=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(m=!1),p&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(m=!1),this.resolvedRelativeTargetAt===wa.timestamp&&(m=!1),m)return;const{layout:S,layoutId:b}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(S||b))return;cl(this.layoutCorrected,this.layout.layoutBox);const _=this.treeScale.x,x=this.treeScale.y;EB(this.layoutCorrected,this.treeScale,this.path,p),f.layout&&!f.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(f.target=f.layout.layoutBox,f.targetWithTransforms=fa());const{target:D}=f;if(!D){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(J7(this.prevProjectionDelta.x,this.projectionDelta.x),J7(this.prevProjectionDelta.y,this.projectionDelta.y)),x0(this.projectionDelta,this.layoutCorrected,D,this.latestValues),(this.treeScale.x!==_||this.treeScale.y!==x||!i9(this.projectionDelta.x,this.prevProjectionDelta.x)||!i9(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",D))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(f=!0){if(this.options.visualElement?.scheduleRender(),f){const p=this.getStack();p&&p.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Dh(),this.projectionDelta=Dh(),this.projectionDeltaWithTransform=Dh()}setAnimationOrigin(f,p=!1){const m=this.snapshot,S=m?m.latestValues:{},b={...this.latestValues},_=Dh();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!p;const x=fa(),D=m?m.source:void 0,A=this.layout?this.layout.source:void 0,N=D!==A,R=this.getStack(),O=!R||R.members.length<=1,U=!!(N&&!O&&this.options.crossfade===!0&&!this.path.some(WV));this.animationProgress=0;let j;this.mixTargetDelta=V=>{const F=V/1e3;c9(_.x,f.x,F),c9(_.y,f.y,F),this.setTargetDelta(_),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(gg(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox),IV(this.relativeTarget,this.relativeTargetOrigin,x,F),j&&BV(this.relativeTarget,j)&&(this.isProjectionDirty=!1),j||(j=fa()),cl(j,this.relativeTarget)),N&&(this.animationValues=b,OV(b,S,this.latestValues,F,U,O)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=F},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(f){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Fo(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=dn.update(()=>{vg.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Th(0)),this.currentAnimation=xV(this.motionValue,[0,1e3],{...f,velocity:0,isSync:!0,onUpdate:p=>{this.mixTargetDelta(p),f.onUpdate&&f.onUpdate(p)},onStop:()=>{},onComplete:()=>{f.onComplete&&f.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);const f=this.getStack();f&&f.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(jV),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const f=this.getLead();let{targetWithTransforms:p,target:m,layout:S,latestValues:b}=f;if(!(!p||!m||!S)){if(this!==f&&this.layout&&S&&m9(this.options.animationType,this.layout.layoutBox,S.layoutBox)){m=this.target||fa();const _=hi(this.layout.layoutBox.x);m.x.min=f.target.x.min,m.x.max=m.x.min+_;const x=hi(this.layout.layoutBox.y);m.y.min=f.target.y.min,m.y.max=m.y.min+x}cl(p,m),xh(p,b),x0(this.projectionDeltaWithTransform,this.layoutCorrected,p,b)}}registerSharedNode(f,p){this.sharedNodes.has(f)||this.sharedNodes.set(f,new VV),this.sharedNodes.get(f).add(p);const S=p.options.initialPromotionConfig;p.promote({transition:S?S.transition:void 0,preserveFollowOpacity:S&&S.shouldPreserveFollowOpacity?S.shouldPreserveFollowOpacity(p):void 0})}isLead(){const f=this.getStack();return f?f.lead===this:!0}getLead(){const{layoutId:f}=this.options;return f?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:f}=this.options;return f?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:f}=this.options;if(f)return this.root.sharedNodes.get(f)}promote({needsReset:f,transition:p,preserveFollowOpacity:m}={}){const S=this.getStack();S&&S.promote(this,m),f&&(this.projectionDelta=void 0,this.needsReset=!0),p&&this.setOptions({transition:p})}relegate(){const f=this.getStack();return f?f.relegate(this):!1}resetSkewAndRotation(){const{visualElement:f}=this.options;if(!f)return;let p=!1;const{latestValues:m}=f;if((m.z||m.rotate||m.rotateX||m.rotateY||m.rotateZ||m.skewX||m.skewY)&&(p=!0),!p)return;const S={};m.z&&KS("z",f,S,this.animationValues);for(let b=0;b<XS.length;b++)KS(`rotate${XS[b]}`,f,S,this.animationValues),KS(`skew${XS[b]}`,f,S,this.animationValues);f.render();for(const b in S)f.setStaticValue(b,S[b]),this.animationValues&&(this.animationValues[b]=S[b]);f.scheduleRender()}applyProjectionStyles(f,p){if(!this.instance||this.isSVG)return;if(!this.isVisible){f.visibility="hidden";return}const m=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,f.visibility="",f.opacity="",f.pointerEvents=pg(p?.pointerEvents)||"",f.transform=m?m(this.latestValues,""):"none";return}const S=this.getLead();if(!this.projectionDelta||!this.layout||!S.target){this.options.layoutId&&(f.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,f.pointerEvents=pg(p?.pointerEvents)||""),this.hasProjected&&!Tc(this.latestValues)&&(f.transform=m?m({},""):"none",this.hasProjected=!1);return}f.visibility="";const b=S.animationValues||S.latestValues;this.applyTransformsToTarget();let _=GV(this.projectionDeltaWithTransform,this.treeScale,b);m&&(_=m(b,_)),f.transform=_;const{x,y:D}=this.projectionDelta;f.transformOrigin=`${x.origin*100}% ${D.origin*100}% 0`,S.animationValues?f.opacity=S===this?b.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:b.opacityExit:f.opacity=S===this?b.opacity!==void 0?b.opacity:"":b.opacityExit!==void 0?b.opacityExit:0;for(const A in _S){if(b[A]===void 0)continue;const{correct:N,applyTo:R,isCSSVariable:O}=_S[A],U=_==="none"?b[A]:N(b[A],S);if(R){const j=R.length;for(let V=0;V<j;V++)f[R[V]]=U}else O?this.options.visualElement.renderState.vars[A]=U:f[A]=U}this.options.layoutId&&(f.pointerEvents=S===this?pg(p?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(f=>f.currentAnimation?.stop()),this.root.nodes.forEach(r9),this.root.sharedNodes.clear()}}}function PV(n){n.updateLayout()}function YV(n){const t=n.resumeFrom?.snapshot||n.snapshot;if(n.isLead()&&n.layout&&t&&n.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:s}=n.layout,{animationType:u}=n.options,c=t.source!==n.layout.source;u==="size"?xs(b=>{const _=c?t.measuredBox[b]:t.layoutBox[b],x=hi(_);_.min=i[b].min,_.max=_.min+x}):m9(u,t.layoutBox,i)&&xs(b=>{const _=c?t.measuredBox[b]:t.layoutBox[b],x=hi(i[b]);_.max=_.min+x,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[b].max=n.relativeTarget[b].min+x)});const f=Dh();x0(f,i,t.layoutBox);const p=Dh();c?x0(p,n.applyTransform(s,!0),t.measuredBox):x0(p,i,t.layoutBox);const m=!$7(f);let S=!1;if(!n.resumeFrom){const b=n.getClosestProjectingParent();if(b&&!b.resumeFrom){const{snapshot:_,layout:x}=b;if(_&&x){const D=fa();gg(D,t.layoutBox,_.layoutBox);const A=fa();gg(A,i,x.layoutBox),n9(D,A)||(S=!0),b.options.layoutRoot&&(n.relativeTarget=A,n.relativeTargetOrigin=D,n.relativeParent=b)}}}n.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:p,layoutDelta:f,hasLayoutChanged:m,hasRelativeLayoutChanged:S})}else if(n.isLead()){const{onExitComplete:i}=n.options;i&&i()}n.options.transition=void 0}function qV(n){n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function XV(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function KV(n){n.clearSnapshot()}function r9(n){n.clearMeasurements()}function o9(n){n.isLayoutDirty=!1}function QV(n){const{visualElement:t}=n.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),n.resetTransform()}function u9(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function ZV(n){n.resolveTargetDelta()}function JV(n){n.calcProjection()}function FV(n){n.resetSkewAndRotation()}function kV(n){n.removeLeadSnapshot()}function c9(n,t,i){n.translate=Cn(t.translate,0,i),n.scale=Cn(t.scale,1,i),n.origin=t.origin,n.originPoint=t.originPoint}function f9(n,t,i,s){n.min=Cn(t.min,i.min,s),n.max=Cn(t.max,i.max,s)}function IV(n,t,i,s){f9(n.x,t.x,i.x,s),f9(n.y,t.y,i.y,s)}function WV(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const $V={duration:.45,ease:[.4,0,.1,1]},h9=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),d9=h9("applewebkit/")&&!h9("chrome/")?Math.round:Cs;function p9(n){n.min=d9(n.min),n.max=d9(n.max)}function tG(n){p9(n.x),p9(n.y)}function m9(n,t,i){return n==="position"||n==="preserve-aspect"&&!oV(a9(t),a9(i),.2)}function eG(n){return n!==n.root&&n.scroll?.wasRoot}const nG=l9({attachResizeListener:(n,t)=>T0(n,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),QS={current:void 0},g9=l9({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!QS.current){const n=new nG({});n.mount(window),n.setOptions({layoutScroll:!0}),QS.current=n}return QS.current},resetTransform:(n,t)=>{n.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),aG={pan:{Feature:CV},drag:{Feature:TV,ProjectionNode:g9,MeasureLayout:P7}};function y9(n,t,i){const{props:s}=n;n.animationState&&s.whileHover&&n.animationState.setActive("whileHover",i==="Start");const u="onHover"+i,c=s[u];c&&dn.postRender(()=>c(t,C0(t)))}class iG extends $o{mount(){const{current:t}=this.node;t&&(this.unmount=HU(t,(i,s)=>(y9(this.node,s,"Start"),u=>y9(this.node,u,"End"))))}unmount(){}}class sG extends $o{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!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=f0(T0(this.node.current,"focus",()=>this.onFocus()),T0(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function v9(n,t,i){const{props:s}=n;if(n.current instanceof HTMLButtonElement&&n.current.disabled)return;n.animationState&&s.whileTap&&n.animationState.setActive("whileTap",i==="Start");const u="onTap"+(i==="End"?"":i),c=s[u];c&&dn.postRender(()=>c(t,C0(t)))}class lG extends $o{mount(){const{current:t}=this.node;t&&(this.unmount=BU(t,(i,s)=>(v9(this.node,s,"Start"),(u,{success:c})=>v9(this.node,u,c?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ZS=new WeakMap,JS=new WeakMap,rG=n=>{const t=ZS.get(n.target);t&&t(n)},oG=n=>{n.forEach(rG)};function uG({root:n,...t}){const i=n||document;JS.has(i)||JS.set(i,{});const s=JS.get(i),u=JSON.stringify(t);return s[u]||(s[u]=new IntersectionObserver(oG,{root:n,...t})),s[u]}function cG(n,t,i){const s=uG(t);return ZS.set(n,i),s.observe(n),()=>{ZS.delete(n),s.unobserve(n)}}const fG={some:0,all:1};class hG extends $o{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:i,margin:s,amount:u="some",once:c}=t,f={root:i?i.current:void 0,rootMargin:s,threshold:typeof u=="number"?u:fG[u]},p=m=>{const{isIntersecting:S}=m;if(this.isInView===S||(this.isInView=S,c&&!S&&this.hasEnteredView))return;S&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",S);const{onViewportEnter:b,onViewportLeave:_}=this.node.getProps(),x=S?b:_;x&&x(m)};return cG(this.node.current,f,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:i}=this.node;["amount","margin","root"].some(dG(t,i))&&this.startObserver()}unmount(){}}function dG({viewport:n={}},{viewport:t={}}={}){return i=>n[i]!==t[i]}const pG={...nV,...{inView:{Feature:hG},tap:{Feature:lG},focus:{Feature:sG},hover:{Feature:iG}},...aG,...{layout:{ProjectionNode:g9,MeasureLayout:P7}}},S9=vB(pG,RB),b9=({visible:n,target:t,appendTo:i=document.body,unmountWhenHidden:s=!1,transitionDuration:u=400,showTransitionOptions:c="easeInOut",hideTransitionOptions:f="linear",approveText:p="DONE",shown:m,hidden:S,isClickedWithin:b,children:_})=>{const[x,D]=H.useState(-1),[A,N]=H.useState(-1),[R,O]=H.useState(n),[U,j]=H.useState(!0),V=H.useRef(100),F=H.useRef(101),$=H.useRef(void 0),st=H.useRef(void 0),I=H.useRef(void 0),et=H.useRef(!1),nt=u/1e3;H.useEffect(()=>{t&&($.current=xb(t));const gt=bb("zIndex",Tt=>Tt==="auto"||Tt==="-1"?!1:parseInt(Tt)>100).map(Tt=>parseInt(Tt,10));gt.length>0&&(V.current=Math.max(...gt)+1,F.current=Math.max(...gt)+2),j(!1),O(n)},[n,t]);const bt=gt=>{st.current=gt},lt=()=>{N(V.current),D(F.current),et.current=!0},dt=()=>{if(!st.current)return;m?.();let gt;$.current&&(gt=[$.current]);const Tt=Pt=>{Pt?b?.():(j(!1),O(!1))};I.current=Cb(st.current,Tt,gt)},pt=()=>{I.current&&_b(I.current)},tt=()=>{N(-1),D(-1),S?.()},w=Q1(()=>{R?lt():pt()}),Z=Q1(()=>{R?dt():tt(),j(!0)}),K={opacity:.5},at={opacity:0},St={opacity:1,pointerEvents:"auto"},W={opacity:0,pointerEvents:"none"};return et.current&&!R&&s===!0&&U?null:vT.createPortal(X.jsxs("div",{children:[X.jsx(S9.div,{className:"bsc:fixed bsc:left-0 bsc:top-0 bsc:h-full bsc:w-full bsc:bg-mono-dark-1",style:{zIndex:A},initial:!1,animate:R?K:at}),X.jsxs(S9.div,{ref:gt=>{gt&&bt(gt)},className:"dark:bsc-border-mono-light-1 bsc:fixed bsc:bottom-0 bsc:left-0 bsc:w-full bsc:bg-white bsc:dark:border-t bsc:dark:border-solid bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1",style:{zIndex:x},initial:!1,animate:R?St:W,transition:{duration:nt,ease:R?c:f},onAnimationStart:w,onAnimationComplete:Z,children:[X.jsx("div",{className:"bsc:w-full",children:_}),X.jsx(X.Fragment,{children:X.jsx(Ql,{buttonType:"primary",fullWidth:!0,onClick:()=>O(!1),className:"bsc:text-xs bsc:font-bold",children:p})})]})]}),i)};var E9=(n=>(n[n.TopLeft=0]="TopLeft",n[n.TopRight=1]="TopRight",n[n.BottomLeft=2]="BottomLeft",n[n.BottomRight=3]="BottomRight",n))(E9||{}),T9=(n=>(n[n.TopLeft=0]="TopLeft",n[n.TopRight=1]="TopRight",n[n.BottomLeft=2]="BottomLeft",n[n.BottomRight=3]="BottomRight",n))(T9||{});class pn{static positionToTarget(t,i=2){const s=t.getBoundingClientRect();let u=0,c=0;const f=window.scrollY;switch(i){case 2:u=s.top+s.height+f,c=s.left;break;case 0:u=s.top+f,c=s.left;break;case 3:u=s.top+s.height+f,c=s.left+s.width;break;case 1:u=s.top+f,c=s.left+s.width}return{top:u,left:c}}static positionElementToTarget(t,i,s=0,u=2){let{left:c,top:f}=pn.positionToTarget(i,u);const p=t.getBoundingClientRect();switch(s){case 0:break;case 1:c=c-p.width;break;case 2:f=f-p.height;break;case 3:f=f-p.height,c=c-p.width;break}return{top:f,left:c}}static canPositionElementOnScreenWithTarget(t,i){const s=pn.getScreenDimensions(),u=t.getBoundingClientRect(),c=pn.positionElementToTarget(t,i,0,2);if(c.left+u.width<s.width&&c.top+u.height<s.height||pn.positionElementToTarget(t,i,1,3).left>=0&&c.top+u.height<s.height)return!0;const p=pn.positionElementToTarget(t,i,2,0);if(p.left+u.width<s.width&&p.top>=0)return!0;const m=pn.positionElementToTarget(t,i,3,1);return m.left>=0&&m.top>=0}static canPositionElementOnScreen(t){const i=pn.getScreenDimensions(),s=t.getBoundingClientRect();return s.width<=i.width&&s.height<=i.height}static positionElementToTargetOnScreen(t,i,s=0,u=2){const{left:c,top:f}=pn.positionElementToTarget(t,i,s,u),p=t.getBoundingClientRect(),m=pn.determineOffScreenLocation(p);if(m){if(s===0&&u===2){if(m.right&&!m.bottom)return pn.positionElementToTarget(t,i,1,3);if(m.bottom&&!m.right)return pn.positionElementToTarget(t,i,2,0);if(m.right&&m.bottom)return pn.positionElementToTarget(t,i,3,1)}else if(s===1&&u===3){if(m.left&&!m.bottom)return pn.positionElementToTarget(t,i,0,2);if(m.bottom&&!m.left)return pn.positionElementToTarget(t,i,3,1);if(m.left&&m.bottom)return pn.positionElementToTarget(t,i,2,0)}}return{top:f,left:c}}static determineOffScreenLocation(t){const i=pn.getScreenDimensions(),s={left:t.left<0,top:t.top<0,right:t.left+t.width>i.width,bottom:t.top+t.height>i.height};return s.left||s.top||s.right||s.bottom?s:void 0}static getScreenDimensions(){return{width:window.innerWidth,height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}}}const C9=({visible:n,target:t,targetPosition:i=E9.BottomLeft,elementAlignment:s=T9.TopLeft,shouldTargetCloseOverlay:u=!0,shouldMatchTargetWidth:c=!1,shouldScrollCloseOverlay:f=!1,shouldCheckZIndex:p=!1,shouldRemainOnScreen:m=!1,unmountWhenHidden:S=!1,transitionDuration:b=400,showTransitionOptions:_="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:x="linear",shown:D,hidden:A,isClickedWithin:N,markupCreated:R,children:O})=>{const[U,j]=H.useState(-1),[V,F]=H.useState(n),[$,st]=H.useState(!1),I=H.useRef(!1),et=H.useRef(100),nt=H.useRef({left:0,top:0,width:0}),bt=H.useRef(void 0),lt=H.useRef(void 0),dt=H.useRef(void 0),pt=H.useRef(void 0),tt=H.useRef(void 0),w=H.useRef(void 0),Z=H.useRef(!1),K=j4();H.useEffect(()=>(m===!0&&(w.current=new ResizeObserver(at)),()=>{m===!0&&(lt.current&&w.current?.unobserve(lt.current),w.current?.disconnect())}),[]),H.useEffect(()=>{if(t&&(bt.current=xb(t),f)){const Be=K?.isValidScrollableElement;dt.current=Sb(bt.current,{overflow:"scroll, auto",overflowX:"scroll, auto",overflowY:"scroll, auto"},!1,Be),dt.current.tagName.toLowerCase()==="html"&&(dt.current=document)}if(p){const Be=bb("zIndex",At=>parseInt(At)>=100).map(At=>parseInt(At));Be.length>0&&(et.current=Math.max(...Be)+1)}n!==void 0&&F(n)},[t,n,f,p]);const at=Be=>{if(lt.current){const At=pn.getScreenDimensions(),ue=Be[Be.length-1].target,ta=ue.getBoundingClientRect(),ea=pn.determineOffScreenLocation(ta);if(ea){if(bt.current&&pn.canPositionElementOnScreenWithTarget(ue,bt.current)){const An=pn.positionElementToTargetOnScreen(lt.current,bt.current,s,i);nt.current={...nt.current,...An}}else ea.right?nt.current.left=At.width-ta.width:ea.left&&(nt.current.left=0),ea.bottom?nt.current.top=At.height-ta.height:ea.top&&(nt.current.top=0);St()}}},St=s0(()=>{I.current=!I.current,st(I.current)},20),W=()=>{j(et.current)},gt=()=>{if(!lt.current)return;D?.();let Be;!u&&bt.current&&(Be=[bt.current]);const At=ue=>{ue?N?.():F(!1)};pt.current=Cb(lt.current,At,Be),f&&(tt.current=cR(ue=>lt.current&&AH(ue,lt.current)&&F(!1),100,{leading:!0}),dt.current&&dt.current.addEventListener("scroll",tt.current)),Z.current=!0},Tt=()=>{dt.current&&tt.current&&(dt.current.removeEventListener("scroll",tt.current),tt.current=void 0),pt.current&&_b(pt.current)},Pt=()=>{j(-1),A?.()},le=Be=>{if(m===!0&<.current&&w.current?.unobserve(lt.current),lt.current=Be,R?.(Be),bt.current){const At=pn.positionElementToTarget(lt.current,bt.current,s,i);nt.current={...At,width:bt.current.offsetWidth},m===!0&&(pn.canPositionElementOnScreenWithTarget(lt.current,bt.current)||pn.canPositionElementOnScreen(lt.current))&&w.current?.observe(lt.current)}},xn=Q1(()=>{V?W():Tt()}),xe=Q1(()=>{V?gt():Pt()}),Dn=H.useMemo(()=>V?{transition:`opacity ${b}ms ${_}`,pointerEvents:"auto",opacity:1}:{transition:`opacity ${b}ms ${x}`,pointerEvents:"none",opacity:0},[V]),ln=H.useMemo(()=>{const Be={top:`${nt.current.top}px`,left:`${nt.current.left}px`,zIndex:U};return c&&(Be.width=`${nt.current.width}px`),Be},[$,U,c]);return Z.current&&!V&&S===!0?null:X.jsx("div",{onTransitionStart:xn,onTransitionEnd:xe,children:X.jsx("div",{className:"bsc:fixed bsc:border! bsc:border-solid! bsc:border-black bsc:bg-white bsc:shadow bsc:dark:border-mono-light-1 bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1",style:{...ln,...Dn},ref:Be=>{Be&&le(Be)},children:O})})};let Sg;const mG=new Uint8Array(16);function gG(){if(!Sg&&(Sg=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Sg))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Sg(mG)}const Ua=[];for(let n=0;n<256;++n)Ua.push((n+256).toString(16).slice(1));function yG(n,t=0){return Ua[n[t+0]]+Ua[n[t+1]]+Ua[n[t+2]]+Ua[n[t+3]]+"-"+Ua[n[t+4]]+Ua[n[t+5]]+"-"+Ua[n[t+6]]+Ua[n[t+7]]+"-"+Ua[n[t+8]]+Ua[n[t+9]]+"-"+Ua[n[t+10]]+Ua[n[t+11]]+Ua[n[t+12]]+Ua[n[t+13]]+Ua[n[t+14]]+Ua[n[t+15]]}const _9={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function vG(n,t,i){if(_9.randomUUID&&!n)return _9.randomUUID();n=n||{};const s=n.random||(n.rng||gG)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,yG(s)}class D0{static create(t){const i=[];let s=0;for(let u=0,c=t.formatParts.length;u<c;u++){const f=t.formatParts[u],p=s,m=p+f.characterCount;i.push({startPosition:p,endPosition:m,...f}),s=m}return i}}class SG{instanceCollection;formatPartList;inputSlotCollection;currentPartIndex=0;currentPartIndices=[];currentCursorPosition=0;highlightCursorPosition=0;currentCursorStartPosition=-1;currentCursorEndPosition=-1;inputElement;inputSelection=null;inputRange;textNode;constructor(t,i){this.instanceCollection=A0.getInstance(),this.formatPartList=D0.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(i,t)}get isSelection(){return this.inputRange!==void 0&&this.inputRange.startOffset!==this.inputRange.endOffset}get isAllSelected(){const t=this.inputSlotCollection.getLastSlot();return this.isSelection&&this.inputRange?.startOffset===0&&this.inputRange.endOffset===t.endPosition}getCursorPosition(){return this.currentCursorPosition}getCursorStartPosition(){return this.currentCursorStartPosition}getCursorEndPosition(){return this.currentCursorEndPosition}getCurrentPartIndex(){return this.currentPartIndex}getCurrentPartIndices(){return this.currentPartIndices}setInputElement(t){this.inputElement=t}setCursorToCurrentPosition(){this.setCursorSelection(this.currentCursorPosition>-1?this.currentCursorPosition:this.highlightCursorPosition)}setCursorPosition(t){this.setCursorSelection(t)}setCursorSelection(t,i){if(this.createInputRangeSelection(),this.inputRange&&this.textNode){let s,u,c=!0;i===void 0?(s=t,u=t):t<i?(s=t,u=i):(c=!1,s=i,u=t),this.inputRange.setStart(this.textNode,s),this.inputRange.setEnd(this.textNode,u),this.currentPartIndices=[],s===u?(this.currentCursorPosition=u,this.highlightCursorPosition=u,this.currentCursorStartPosition=-1,this.currentCursorEndPosition=-1,this.setPartIndexByCursorPosition()):(c?this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1?this.highlightCursorPosition=u:this.currentCursorStartPosition!==s?this.highlightCursorPosition=s:this.currentCursorEndPosition!==u&&(this.highlightCursorPosition=u):this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1?this.highlightCursorPosition=s:this.currentCursorStartPosition!==u?this.highlightCursorPosition=u:this.currentCursorEndPosition!==s&&(this.highlightCursorPosition=s),this.currentCursorStartPosition=s,this.currentCursorEndPosition=u,this.currentCursorPosition=-1,this.setPartIndexByHighlightPosition(),this.setPartIndicesByCursorPositions())}}findCursorPosition(){const t=window.getSelection(),i=t?.getRangeAt(0);if(this.inputElement&&t&&i){const s=document.createTreeWalker(this.inputElement,NodeFilter.SHOW_TEXT,p=>{const m=document.createRange();return m.selectNodeContents(p),m.compareBoundaryPoints(Range.END_TO_END,i)<1?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});let u=0;for(;s.nextNode();)u+=s.currentNode.textContent?.length||0;i.startContainer.nodeType===Node.TEXT_NODE&&(u+=i.startOffset);const c=this.inputSlotCollection.getLastSlotWithData(),f=c.startPosition+c.partText.length;t.anchorOffset===t.focusOffset?this.setCursorSelection(u>f?f:u):this.setCursorSelection(t.anchorOffset,t.focusOffset)}}isAtLastPart(){return this.currentPartIndex===this.formatPartList.length-1}moveHome(){const t=this.inputSlotCollection.getFirstSlot();this.setCursorSelection(t.startPosition)}moveEnd(){const t=this.inputSlotCollection.getLastSlotWithData(),i=t.startPosition+t.partText.length;this.setCursorSelection(i)}moveCursorLeft(){if(this.updateCursorPosition(),this.currentCursorPosition>0&&!this.isSelection){const t=this.currentCursorPosition-1;let i=this.formatPartList[this.currentPartIndex];if(t>=i.startPosition&&t<=i.endPosition)this.setCursorSelection(t);else for(let s=this.currentPartIndex-1;s>=0;s--)if(i=this.formatPartList[s],t>=i.startPosition&&t<=i.endPosition){i.isSeparator?this.setCursorSelection(this.formatPartList[s-1].endPosition):this.setCursorSelection(t);break}}else this.isSelection?this.setCursorSelection(this.currentCursorPosition):this.moveHome()}moveCursorRight(){this.updateCursorPosition(!1);const t=this.inputSlotCollection.getLastSlotWithData(),i=t.startPosition+t.partText.length;if(this.currentCursorPosition<i&&!this.isSelection){const s=this.currentCursorPosition+1;let u=this.formatPartList[this.currentPartIndex];if(s>=u.startPosition&&s<=u.endPosition)this.setCursorSelection(s);else for(let c=this.currentPartIndex+1,f=this.formatPartList.length;c<f;c++)if(u=this.formatPartList[c],s>=u.startPosition&&s<=u.endPosition){u.isSeparator?this.setCursorSelection(this.formatPartList[c+1].startPosition):this.setCursorSelection(s);break}}else this.setCursorSelection(this.currentCursorPosition)}moveToNextInputPart(){if(this.currentPartIndex<this.formatPartList.length-1){const t=this.findNextEditablePart();t&&(this.currentPartIndex=t.partIndex,this.setCursorSelection(t.startPosition))}}moveToPreviousInputPart(){if(this.currentPartIndex>0){const t=this.findPreviousEditablePart();t&&(this.currentPartIndex=t.partIndex,this.setCursorSelection(t.endPosition))}}highlightAll(){const t=this.formatPartList[this.formatPartList.length-1].endPosition;this.setCursorSelection(0,t)}moveHighlightLeft(){this.updateHighlightPositions();const t=this.highlightCursorPosition>this.currentCursorStartPosition;if(this.currentCursorStartPosition>0||t){let i=t?this.currentCursorStartPosition:this.currentCursorStartPosition-1,s=t?this.highlightCursorPosition-1:this.currentCursorEndPosition,u=this.formatPartList[this.currentPartIndex];if(i>=u.startPosition&&i<=u.endPosition||t&&s>=u.startPosition&&s<=u.endPosition)this.setCursorSelection(i,s);else for(let c=this.currentPartIndex-1;c>=0;c--)if(u=this.formatPartList[c],i>=u.startPosition&&i<=u.endPosition||t&&s>=u.startPosition&&s<=u.endPosition){u.isSeparator?(t?s=this.formatPartList[c-1].endPosition:i=this.formatPartList[c-1].endPosition,this.setCursorSelection(i,s)):this.setCursorSelection(i,s);break}}}moveHighlightRight(){this.updateHighlightPositions();const t=this.inputSlotCollection.getLastSlotWithData(),i=t.startPosition+t.partText.length,s=this.highlightCursorPosition<this.currentCursorEndPosition;if(this.currentCursorEndPosition<i||s){let u=s?this.highlightCursorPosition+1:this.currentCursorStartPosition,c=s?this.currentCursorEndPosition:this.currentCursorEndPosition+1,f=this.formatPartList[this.currentPartIndex];if(c>=f.startPosition&&c<=f.endPosition||s&&u>=f.startPosition&&u<=f.endPosition)this.setCursorSelection(u,c);else for(let p=this.currentPartIndex+1,m=this.formatPartList.length;p<m;p++)if(f=this.formatPartList[p],c>=f.startPosition&&c<=f.endPosition||s&&u>=f.startPosition&&u<=f.endPosition){f.isSeparator?(s?u=this.formatPartList[p+1].startPosition:c=this.formatPartList[p+1].startPosition,this.setCursorSelection(u,c)):this.setCursorSelection(u,c);break}}}updateHighlightPositions(){this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1&&this.currentCursorPosition>-1&&(this.currentCursorStartPosition=this.currentCursorPosition,this.currentCursorEndPosition=this.currentCursorPosition,this.highlightCursorPosition=this.currentCursorPosition)}updateCursorPosition(t=!0){this.currentCursorPosition===-1&&this.currentCursorStartPosition>-1&&this.currentCursorEndPosition>-1&&(t?this.currentCursorPosition=this.currentCursorStartPosition:this.currentCursorPosition=this.currentCursorEndPosition)}findNextEditablePart(){return this.inputSlotCollection.getNextSlot(this.currentPartIndex)}findPreviousEditablePart(){return this.inputSlotCollection.getPreviousSlot(this.currentPartIndex)}setPartIndexByCursorPosition(){for(let t=0;t<this.formatPartList.length;t++){const i=this.formatPartList[t];if(this.currentCursorPosition>=i.startPosition&&this.currentCursorPosition<=i.endPosition){if(i.isSeparator){this.currentCursorPosition=this.formatPartList[t+1].startPosition,this.currentPartIndex=t+1;break}this.currentPartIndex=t;break}}}setPartIndexByHighlightPosition(){for(let t=0;t<this.formatPartList.length;t++){const i=this.formatPartList[t];if(this.highlightCursorPosition>=i.startPosition&&this.highlightCursorPosition<=i.endPosition){if(i.isSeparator){this.highlightCursorPosition=this.formatPartList[t+1].startPosition,this.currentPartIndex=t+1;break}this.currentPartIndex=t;break}}}setPartIndicesByCursorPositions(){for(let t=0,i=this.formatPartList.length;t<i;t++){const s=this.formatPartList[t];s.isSeparator||(s.startPosition>=this.currentCursorStartPosition&&s.startPosition<=this.currentCursorEndPosition||s.endPosition>=this.currentCursorStartPosition&&s.endPosition<=this.currentCursorEndPosition||s.startPosition<this.currentCursorStartPosition&&s.endPosition>this.currentCursorEndPosition)&&this.currentPartIndices.push(t)}}createInputRangeSelection(){this.inputElement&&(this.inputSelection=window.getSelection(),this.inputRange=document.createRange(),this.inputSelection?.removeAllRanges(),this.inputRange.selectNodeContents(this.inputElement),this.inputRange.collapse(!0),this.inputSelection?.addRange(this.inputRange),this.inputElement.firstChild&&(this.textNode=this.inputElement.firstChild))}}class bG{static create(t){const i=[];for(let s=0,u=t.length;s<u;s++){const c=t[s];c.isSeparator||i.push({partIndex:s,partText:"",isComplete:!1,...c})}return i}}class EG{inputSlots;constructor(t){this.inputSlots=bG.create(D0.create(t))}clearAllSlots(){for(let t=0,i=this.inputSlots.length;t<i;t++)this.inputSlots[t].partText=""}getSlot(t){return this.inputSlots.find(i=>i.partIndex===t)}getSlots(t){return this.inputSlots.filter(i=>t.includes(i.partIndex))}getSlotsFromCursorPosition(t){let i=-1;for(let s=0,u=this.inputSlots.length;s<u;s++){const c=this.inputSlots[s];if(t>=c.startPosition&&t<=c.endPosition){i=c.partIndex;break}}return i>-1?this.inputSlots.filter(s=>s.partIndex>=i):void 0}getFirstSlot(){return this.inputSlots[0]}getLastSlot(){return this.inputSlots[this.inputSlots.length-1]}getNextSlot(t){const i=this.inputSlots.findIndex(s=>s.partIndex===t);if(i>-1&&i+1<this.inputSlots.length)return this.inputSlots[i+1]}getPreviousSlot(t){const i=this.inputSlots.findIndex(s=>s.partIndex===t);if(i>-1&&i-1>=0)return this.inputSlots[i-1]}getLastSlotWithData(){const t=this.inputSlots.findIndex(s=>!s.isComplete);let i=t;for(let s=t+1,u=this.inputSlots.length;s<u;s++)this.inputSlots[s].partText.length>0&&(i=s);return this.inputSlots[i>-1?i:0]}allSlotsCompleted(){return this.inputSlots.every(t=>t.isComplete)}allSlotsEmpty(){return this.inputSlots.every(t=>t.partText.length===0)}}class A0{static instance;static getInstance(){return this.instance||(this.instance=new TG),this.instance}}class TG{navigatorInstances;inputSlotInstances;constructor(){this.navigatorInstances={},this.inputSlotInstances={}}getNavigatorInstance(t,i){return this.navigatorInstances[t]||(this.navigatorInstances[t]=new SG(i,t)),this.navigatorInstances[t]}getInputSlotInstance(t,i){return this.inputSlotInstances[t]||(this.inputSlotInstances[t]=new EG(i)),this.inputSlotInstances[t]}removeInstances(t){this.navigatorInstances[t]&&delete this.navigatorInstances[t],this.inputSlotInstances[t]&&delete this.inputSlotInstances[t]}}class FS{instanceCollection;formatPartList;inputSlotCollection;inputElement;constructor(t,i){this.instanceCollection=A0.getInstance(),this.formatPartList=D0.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(i,t)}setInputElement(t){this.inputElement=t}render(){let t="";for(let i=0,s=this.formatPartList.length;i<s;i++){const u=this.formatPartList[i];if(u.isSeparator)t+=u.inputText;else{const c=this.inputSlotCollection.getSlot(i);c&&(t+=c.partText+c.inputText?.repeat(c.characterCount-c.partText.length))}}this.inputElement&&(this.inputElement.innerHTML=t)}}var Il=(n=>(n[n.Text=0]="Text",n[n.Numeric=1]="Numeric",n))(Il||{});class x9{numberKeys=["0","1","2","3","4","5","6","7","8","9"];movementKeys=["ArrowLeft","ArrowRight","Home","End","a"];editingKeys=["Backspace","Delete"];ignoreKeys=["Shift","Alt","Control","Fn","Meta"];isNumberKey(t){return this.numberKeys.includes(t)}isMovementKey(t){return this.movementKeys.includes(t.key)}isEditingKey(t){return this.editingKeys.includes(t.key)}isIgnoreKey(t){return this.ignoreKeys.includes(t.key)}}class CG{_currentIndex=0;index=0;formatParts;get currentIndex(){return this._currentIndex}constructor(t){this.formatParts=D0.create(t)}hasNext(){return this.index<this.formatParts.length}next(){if(this.index<this.formatParts.length)return this._currentIndex=this.index++,this.formatParts[this._currentIndex]}peek(){if(this.index<this.formatParts.length)return this.formatParts[this.index]}reset(){this.index=0}}class _G{formatParts;constructor(t){this.formatParts=D0.create(t)}getUniqueSeparators(){const t=[],i=this.formatParts.filter(s=>s.isSeparator);for(let s=0,u=i.length;s<u;s++){const c=i[s];c.inputText&&!t.includes(c.inputText)&&t.push(c.inputText)}return t}}class D9{constructor(t,i){this.format=t,this.instanceCollection=A0.getInstance(),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(i,t),this.formatNavigator=this.instanceCollection.getNavigatorInstance(i,t),this.keyTypeChecker=new x9,this.formatRenderer=new FS(t,i),this.formatPartList=new CG(t),this.partEntryList=new _G(t)}instanceCollection;inputSlotCollection;formatNavigator;keyTypeChecker;formatRenderer;formatPartList;partEntryList;setInputElement(t){this.formatRenderer.setInputElement(t)}processKeyPress(t){if(this.keyTypeChecker.isEditingKey(t)){this.processEditRules(t);return}this.formatNavigator.isSelection?(this.processSelectionEditRules(),setTimeout(()=>this.processInputRules(t))):this.processInputRules(t)}processInputValue(t){this.inputSlotCollection.clearAllSlots(),this.formatPartList.reset();let i=0;for(;this.formatPartList.hasNext();){const s=this.formatPartList.next();if(s&&!s.isSeparator)if(this.formatPartList.peek()?.isSeparator===!0){const u=this.formatPartList.currentIndex,c=this.formatPartList.next();if(c&&c.inputText){const f=t.indexOf(c.inputText,i),p=this.inputSlotCollection.getSlot(u);if(p&&f>-1){const m=f-i>p.characterCount?i+p.characterCount:f;p.partText=t.substring(i,m),this.processSlotRules(p),i=f+c.characterCount}}}else{const u=this.inputSlotCollection.getSlot(this.formatPartList.currentIndex);u&&(u.partText=t.substring(i,i+u.characterCount),this.processSlotRules(u))}}}processPastedValue(t,i=!1){i&&this.processSelectionEditRules();const s=this.formatNavigator.getCursorPosition(),u=this.inputSlotCollection.getSlotsFromCursorPosition(s);if(u){const c=s-u[0].startPosition,f=u[0].partText.substring(0,c);let p=u[0].partText.substring(c);u[0].partText="";for(let _=1,x=u.length;_<x;_++)p+=u[_].partText,u[_].partText="";const m=this.removeSeparatorsFromValue(t),S=f+m+p;let b=0;for(let _=0,x=u.length;_<x;_++){const D=u[_];D.partText=S.substring(b,D.characterCount+b),b+=D.characterCount,this.processSlotRules(D)}}}removeSeparatorsFromValue(t){let i=t;const s=this.partEntryList.getUniqueSeparators();for(let u=0,c=s.length;u<c;u++){const f=s[u];i=i.replaceAll(f,"")}return i}processEditRules(t){this.formatNavigator.isSelection?this.processSelectionEditRules():this.processNonSelectionEditRules(t)}processNonSelectionEditRules(t){const i=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!i)return;const s=this.formatNavigator.getCursorPosition(),u=s-i.startPosition,c=this.format.deleteShiftsFormatPart||!1;switch(t.key){case"Backspace":{if(!(i.startPosition===s))i.partText=i.partText.substring(0,u-1)+i.partText.substring(u),c&&this.shiftFormatParts(i),this.formatRenderer.render(),this.formatNavigator.moveCursorLeft(),this.processSlotRules(i,!0);else{this.processSlotRules(i,!0);const p=this.inputSlotCollection.getPreviousSlot(i.partIndex);p&&(p.partText=p.partText.substring(0,p.partText.length-1),c&&this.shiftFormatParts(p),this.formatRenderer.render(),this.formatNavigator.setCursorPosition(p.startPosition+p.partText.length),this.processSlotRules(p,!0))}break}case"Delete":i.partText=i.partText.substring(0,u)+i.partText.substring(u+1),c&&this.shiftFormatParts(i),this.formatRenderer.render(),this.formatNavigator.setCursorToCurrentPosition(),this.processSlotRules(i,!0);break}}processSelectionEditRules(){const t=this.inputSlotCollection.getSlots(this.formatNavigator.getCurrentPartIndices());if(t.length<=0)return;const i=this.formatNavigator.getCursorStartPosition(),s=this.formatNavigator.getCursorEndPosition();for(let u=0,c=t.length;u<c;u++){const f=t[u];f.startPosition>=i&&f.endPosition<=s?f.partText="":f.startPosition>=i&&f.endPosition>s?f.partText=f.partText.substring(s-f.startPosition):f.startPosition<i&&f.endPosition<=s?f.partText=f.partText.substring(0,i-f.startPosition):f.startPosition<i&&f.endPosition>s&&(f.partText=f.partText.substring(0,i-f.startPosition)+f.partText.substring(s-f.startPosition))}this.formatRenderer.render(),this.formatNavigator.setCursorPosition(i);for(let u=0,c=t.length;u<c;u++)this.processSlotRules(t[u])}shiftFormatParts(t){let i=t,s;for(;(s=this.inputSlotCollection.getNextSlot(i.partIndex))!==void 0;){const u=s.partText.substring(0,1);s.partText=s.partText.substring(1),i.partText=i.partText+u,i=s}}processInputRules(t){const i=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!i)return;const{key:s}=t,u=i.characterCount,c=i.partText;if(i.valueType===Il.Numeric){if(!this.keyTypeChecker.isNumberKey(s))return;const f=i.maximumValue,p=i.exceedingMaximumValueCausesTab||!1,m=i.padWithZeros||!1,S=parseInt(this.createNewValue(i,s));if(f&&S>f)if(p){m&&(i.partText=i.partText.padStart(u,"0")),i.isComplete=!0;const b=this.inputSlotCollection.getNextSlot(i.partIndex);b&&!b.isComplete&&(b.partText=s),this.formatRenderer.render(),b&&this.formatNavigator.setCursorPosition(b.isComplete?b.startPosition:b.startPosition+1)}else return;else c.length+1===u?(this.addToInputSlot(s),i.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):c.length+1<u&&(this.addToInputSlot(s),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}else c.length+1===u?(this.addToInputSlot(s),i.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):(this.addToInputSlot(s),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}addToInputSlot(t){const i=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());i&&(i.partText=this.createNewValue(i,t))}createNewValue(t,i){const s=t.partText,u=this.formatNavigator.getCursorPosition();if(u>=t.startPosition+t.partText.length)return s+i;{const c=u-t.startPosition;return s.substring(0,c)+i+s.substring(c)}}processSlotRules(t,i=!1){const s=t.characterCount,u=t.allCharactersRequired||!1;if(t.valueType===Il.Numeric){const c=t.minimumValue,f=t.maximumValue;if(u)t.isComplete=t.partText.length===s;else if(c!==void 0&&f!==void 0){const p=t.padWithZeros||!1,m=parseInt(t.partText);t.isComplete=m>=c&&m<=f,t.isComplete&&p&&!i&&(t.partText=t.partText.padStart(s,"0"))}else t.isComplete=t.partText.length>0}else u?t.isComplete=t.partText.length===s:t.isComplete=t.partText.length>0}}class xG{constructor(t,i){this.format=t,this.instanceCollection=A0.getInstance(),this.formatNavigator=this.instanceCollection.getNavigatorInstance(i,t),this.ruleProcessor=new D9(t,i),this.keyTypeChecker=new x9,this.formatRenderer=new FS(t,i)}instanceCollection;formatNavigator;ruleProcessor;keyTypeChecker;formatRenderer;setInputElement(t){this.ruleProcessor.setInputElement(t),this.formatRenderer.setInputElement(t)}processMovementKey(t){const{key:i,metaKey:s,ctrlKey:u,shiftKey:c}=t;switch(i){case"ArrowLeft":c?this.formatNavigator.moveHighlightLeft():s?this.formatNavigator.moveHome():this.formatNavigator.moveCursorLeft();break;case"ArrowRight":c?this.formatNavigator.moveHighlightRight():s?this.formatNavigator.moveEnd():this.formatNavigator.moveCursorRight();break;case"Home":this.formatNavigator.moveHome();break;case"End":this.formatNavigator.moveEnd();break;case"a":(s||u)&&this.formatNavigator.highlightAll();break}}processKeyPress(t){return this.keyTypeChecker.isIgnoreKey(t)?!1:this.keyTypeChecker.isMovementKey(t)?(this.processMovementKey(t),!1):(this.ruleProcessor.processKeyPress(t),!0)}}class DG{constructor(t,i=""){this.inputValue=i,this.instanceId=vG(),this.instanceCollection=A0.getInstance(),this.keyProcessor=new xG(t,this.instanceId),this.formatNavigator=this.instanceCollection.getNavigatorInstance(this.instanceId,t),this.formatRenderer=new FS(t,this.instanceId),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(this.instanceId,t),this.inputRuleProcessor=new D9(t,this.instanceId)}instanceId;instanceCollection;keyProcessor;formatNavigator;formatRenderer;inputSlotCollection;inputRuleProcessor;previousOutputValue="";inputElementSet=!1;isInputFocused=!1;inputElement;onFormatChange;inputElementCreated(t){this.keyProcessor.setInputElement(t),this.formatNavigator.setInputElement(t),this.formatRenderer.setInputElement(t),this.inputElement=t,this.inputElementSet=!0,this.inputElementSet&&this.inputValue.length>0&&this.inputValuePassed(this.inputValue)}inputFocused(){this.isInputFocused=!0,this.formatRenderer.render(),setTimeout(()=>this.formatNavigator.findCursorPosition())}inputBlurred(){this.isInputFocused=!1}inputValuePassed(t){this.inputValue=t,this.inputElementSet&&(this.inputValue.length>0?this.inputRuleProcessor.processInputValue(t):(this.inputSlotCollection.clearAllSlots(),this.previousOutputValue=void 0),this.renderFormat())}pastedValue(t){t.length>0&&(this.formatNavigator.isSelection?this.formatNavigator.isAllSelected?this.inputValuePassed(t):this.inputRuleProcessor.processPastedValue(t,!0):this.inputValue.length===0?this.inputValuePassed(t):this.inputRuleProcessor.processPastedValue(t),this.renderFormat(!0))}registerFormatChangeEvent(t){this.onFormatChange=t}mouseUpHandler(){this.formatNavigator.findCursorPosition()}keyDownHandler(t){if(t.key!=="Tab"){if(!(t.key==="c"&&(t.ctrlKey||t.metaKey))&&!(t.key==="x"&&(t.ctrlKey||t.metaKey))&&!(t.key==="v"&&(t.ctrlKey||t.metaKey)))t.preventDefault(),t.stopPropagation();else return;this.keyProcessor.processKeyPress(t)&&this.inputElement&&this.onFormatChange&&(this.inputSlotCollection.allSlotsCompleted()&&this.previousOutputValue!==this.inputElement.innerHTML?(this.previousOutputValue=this.inputElement.innerHTML,this.onFormatChange(this.inputElement.innerHTML)):this.inputSlotCollection.allSlotsEmpty()&&this.previousOutputValue!==void 0&&(this.previousOutputValue=void 0,this.onFormatChange()))}}dispose(){this.instanceCollection.removeInstances(this.instanceId)}renderFormat(t=!1){setTimeout(()=>{this.formatRenderer.render(),this.isInputFocused&&this.formatNavigator.setCursorToCurrentPosition(),this.inputValue.length>0&&(this.previousOutputValue=this.inputElement?.innerHTML),t&&this.inputElement?.innerHTML&&this.onFormatChange&&this.onFormatChange(this.inputElement.innerHTML)})}}const AG=(n,t)=>{const{value:i="",format:s,readOnly:u=!1,debounceTime:c=800,fillContainer:f=!0,leftElement:p,rightElement:m,className:S,leftElementClassName:b,rightElementClassName:_,isSingleLine:x=!1,allowSingleLineScroll:D=!1,isInputValid:A,onChange:N,onFocus:R,onBlur:O,onElementCreate:U,onLeftElementClick:j,onRightElementClick:V}=n,[F,$]=H.useState(!0),st=H.useRef(void 0),I=H.useRef(void 0),et=H.useRef(void 0),nt=H.useRef(!1);H.useEffect(()=>(document.addEventListener("mouseup",w),()=>{et.current?.dispose(),document.removeEventListener("mouseup",w)}),[]),H.useEffect(()=>{et.current?.inputValuePassed(i)},[i]),H.useEffect(()=>{et.current?.dispose(),s&&(et.current=new DG(s,i),I.current&&et.current?.inputElementCreated(I.current),et.current?.registerFormatChangeEvent(bt))},[s]);const bt=H.useCallback(gt=>{A?A(gt)?($(!0),N?.(gt)):$(!1):N?.(gt)},[N]),lt=H.useCallback(gt=>{et.current?.inputFocused(),R?.(gt)},[R]),dt=H.useCallback(gt=>{et.current?.inputBlurred(),O?.(gt)},[O]),pt=H.useCallback(()=>{nt.current=!0},[]),tt=H.useCallback(()=>{if(nt.current)nt.current=!1,et.current?.mouseUpHandler();else{const gt=new MouseEvent("mouseup");document.dispatchEvent(gt)}},[]),w=H.useCallback(()=>{nt.current&&(nt.current=!1,et.current?.mouseUpHandler())},[]),Z=H.useCallback(gt=>{et.current?.keyDownHandler(gt)},[]),K=H.useCallback(gt=>{gt.preventDefault(),gt.stopPropagation();const Tt=gt.clipboardData?.getData("text/plain");Tt&&et.current?.pastedValue(Tt)},[]),at=H.useCallback(gt=>{st.current?.inputElement?.removeEventListener("keydown",Z),st.current?.inputElement?.removeEventListener("mousedown",pt),st.current?.inputElement?.removeEventListener("mouseup",tt),st.current?.inputElement?.removeEventListener("paste",K),st.current=gt,st.current?.inputElement?.addEventListener("keydown",Z),st.current?.inputElement?.addEventListener("mousedown",pt),st.current?.inputElement?.addEventListener("mouseup",tt),st.current?.inputElement?.addEventListener("paste",K),I.current=st.current?.inputElement},[]),St=H.useCallback(()=>{st.current?.focus()},[]);H.useImperativeHandle(t,()=>({focus:St}));const W=Se(S,{"bsc:border-error!":!F});return X.jsx($1,{ref:gt=>{gt&&at(gt)},readOnly:u,debounceTime:c,fillContainer:f,leftElement:p,rightElement:m,className:W,leftElementClassName:b,rightElementClassName:_,isSingleLine:x,allowSingleLineScroll:D,onFocus:lt,onBlur:dt,onElementCreate:U,onLeftElementClick:j,onRightElementClick:V})},A9=H.forwardRef(AG),kS=H.createContext(void 0);function M9(n,t,i=!0){const s=db(n),u=rb(n),c=oz(n);let f=Dv(u)-(t.options?.weekStartsOn||0);f=f===-1?6:f;const p=Dv(c)-(t.options?.weekStartsOn||0),m=yR({start:u,end:c}),S=s+f>35?6:5,b=N9(S,7,{dayValue:null,isCurrent:!0});let _=1;for(let x=0,D=S;x<D;x++){for(let A=x>0?0:f;A<7;A++){const N=m[_-1];if(N.setHours(n.getHours(),n.getMinutes(),n.getSeconds()),b[x][A].dayValue=N,++_>s)break}if(_>s)break}if(f>0&&i)for(let x=0;x<f;x++)b[0][x].dayValue=sH(u,f-x),b[0][x].isCurrent=!1;if(p>-1&&i)for(let x=6;x>p;x--)b[S-1][x].dayValue=ph(c,x-p),b[S-1][x].isCurrent=!1;return b}function N9(n,t,i){const s=[];for(let u=0,c=n;u<c;u++){const f=[];for(let p=0,m=t;p<m;p++){const S=MG(i)?i:{...i};f.push(S)}s.push(f)}return s}function MG(n){const t=typeof n;return t==="string"||t==="number"||t==="boolean"||n instanceof Date}function NG(n){const t=lH(new Date,n.options?.weekStartsOn||0),i=[];for(let s=0;s<7;s++)i.push(ph(t,s).toLocaleDateString(n.code,{weekday:"short"}));return i}function OG(n){const t=new Date(Date.UTC(2020,0,1)),i=[[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}],[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}],[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}]];let s=0;for(let u=0;u<3;u++)for(let c=0;c<4;c++)i[u][c]={monthNumber:s,monthName:Zo(t,s++).toLocaleDateString(n.code,{month:"short"})};return i}function RG(n,t){const i=new Date(n.getTime()),s=Math.floor(i.getFullYear()/10)*10;i.setFullYear(s);const u=vR({start:i,end:r0(i,9)}),c=N9(3,4,"");let f=0;for(let p=0;p<3;p++)for(let m=0;m<4&&(c[p][m]=u[f++].toLocaleDateString(t.code,{year:"numeric"}),f!==u.length);m++);return c}function zG(n){const t=new Date;return t.setHours(0,0,0,0),t.toLocaleTimeString(n.code)}function HG(n,t,i){return n.getTime()>=t.getTime()&&n.getTime()<=i.getTime()}function M0(n,t){const i=rH(n);if(isNaN(i.valueOf())){let s=Fl(n,"P pp",new Date,{locale:t});return!isNaN(s.valueOf())||(s=Fl(n,"Pp",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Fl(n,"P HH:mm",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Fl(n,"P hh:mm a..aaa",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Fl(n,"P HH:mm:ss",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Fl(n,"P hh:mm:ss a..aaa",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Fl(n,"P",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Fl(n,"P p",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Fl(n,"pp",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Fl(n,"p",new Date,{locale:t}),!isNaN(s.valueOf()))?s:void 0}return i}function IS(n,t){const i=n.split("-");if(i.length!==2)return;const s=M0(i[0].trim(),t);if(!s)return;const u=M0(i[1].trim(),t);if(u)return[s,u]}var Qe=(n=>(n[n.DateTime=0]="DateTime",n[n.DateOnly=1]="DateOnly",n[n.TimeOnly=2]="TimeOnly",n[n.DateRange=3]="DateRange",n))(Qe||{}),Ta=(n=>(n[n.DaySelector=0]="DaySelector",n[n.MonthSelector=1]="MonthSelector",n[n.YearSelector=2]="YearSelector",n[n.TimeSelector=3]="TimeSelector",n[n.DateRangeSelector=4]="DateRangeSelector",n))(Ta||{}),Mh=(n=>(n[n.Day=0]="Day",n[n.Month=1]="Month",n[n.Year=2]="Year",n[n.Range=3]="Range",n))(Mh||{}),N0=(n=>(n[n.Short=0]="Short",n[n.Medium=1]="Medium",n[n.Long=2]="Long",n))(N0||{}),Gn=(n=>(n[n.TwelveHour=0]="TwelveHour",n[n.TwentyFourHour=1]="TwentyFourHour",n))(Gn||{}),tu=(n=>(n[n.Normal=0]="Normal",n[n.Range=1]="Range",n))(tu||{}),bg=(n=>(n[n.Right=0]="Right",n[n.Left=1]="Left",n[n.None=2]="None",n))(bg||{}),pe=(n=>(n[n.SetDateSelector=0]="SetDateSelector",n[n.SetViewDate=1]="SetViewDate",n[n.SetSelectedDate=2]="SetSelectedDate",n[n.SetSelectedDateRange=3]="SetSelectedDateRange",n[n.SetSelectedStartDate=4]="SetSelectedStartDate",n[n.SetSelectedEndDate=5]="SetSelectedEndDate",n[n.SetTimeFormat=6]="SetTimeFormat",n[n.ClearDates=7]="ClearDates",n[n.InitializeDates=8]="InitializeDates",n))(pe||{});const wG=(n,t)=>{switch(t.type){case 0:return t.dateSelector!==void 0?{...n,currentSelector:t.dateSelector,currentViewDate:t.viewDate||n.currentViewDate}:{...n};case 1:return{...n,currentViewDate:t.viewDate||new Date,dateInitialized:!0};case 2:return{...n,selectedDate:t.selectedDate||n.selectedDate,currentViewDate:t.viewDate||n.currentViewDate};case 3:return{...n,selectedStartDate:t.selectedStartDate||n.selectedStartDate,selectedEndDate:t.selectedEndDate||n.selectedEndDate};case 4:return{...n,selectedStartDate:t.selectedStartDate,selectedEndDate:void 0};case 5:return{...n,selectedEndDate:t.selectedEndDate};case 6:return{...n,timeFormat:t.timeFormat||n.timeFormat};case 7:return{currentSelector:n.currentSelector,currentViewDate:n.currentViewDate,timeFormat:n.timeFormat,dateInitialized:!0};case 8:{const i={...n,currentViewDate:UG(t.initialDate),dateInitialized:!0};return Array.isArray(t.initialDate)?{...i,selectedStartDate:t.initialDate[0],selectedEndDate:t.initialDate[1]}:{...i,selectedDate:t.initialDate}}default:return{...n,currentSelector:Ta.DaySelector}}};function UG(n){return n?Array.isArray(n)?n[0]:n:new Date}const WS=(n,t,i)=>{const s=H.useCallback(m=>{i({type:pe.SetViewDate,viewDate:Zo(t,m)})},[t]),u=H.useCallback(m=>{i({type:pe.SetViewDate,viewDate:Ov(t,m)})},[t]),c=H.useCallback(m=>{i({type:pe.SetViewDate,viewDate:r0(t,m)})},[t]),f=H.useCallback(m=>{i({type:pe.SetViewDate,viewDate:Rv(t,m)})},[t]),p=H.useCallback(m=>{i({type:pe.SetDateSelector,dateSelector:m})},[]);return{...n,incrementViewMonths:s,decrementViewMonths:u,incrementViewYears:c,decrementViewYears:f,setDateSelector:p}},Eg=({viewDate:n,selectedDate:t,selectedStartDate:i,selectedEndDate:s,selectionMode:u=tu.Normal,locale:c,onDateSelected:f,selectableDate:p,isValidDate:m,dispatcher:S})=>{const[b,_]=H.useState(!1),[x,D]=H.useState(),[A,N]=H.useState(),[R,O]=H.useState(),[U,j]=H.useState(),V=H.useRef(void 0),F=H.useRef(void 0),$=H.useContext(kS),st=H.useMemo(()=>$.calendarTemplate,[$.calendarTemplate]);H.useEffect(()=>{V.current=c,F.current=NG(V.current),_(!0)},[]),H.useEffect(()=>{n&&V.current&&O(M9(n,V.current,u===tu.Normal))},[n,b]),H.useEffect(()=>{j(t?new Date(t.getFullYear(),t.getMonth(),t.getDate()):void 0)},[t]),H.useEffect(()=>{D(i?new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0).getTime():void 0),N(s?new Date(s.getFullYear(),s.getMonth(),s.getDate(),23,59,59).getTime():void 0)},[i,s]),H.useEffect(()=>{V.current&&c&&(V.current=c,O(M9(n,V.current,u===tu.Normal)))},[c]);const I=pt=>{if(u===tu.Normal)S?.({type:pe.SetSelectedDate,selectedDate:pt,viewDate:pt}),f?.(pt);else{if(!f)throw new Error("Range selection mode requires onDateSelected to be set");!i||uz(pt,i)?f(pt):i&&!s?f(pt,{setEndDate:!0}):i&&s&&f(pt)}},et=pt=>U?.toLocaleDateString()===pt.toLocaleDateString(),nt=pt=>{if(x&&A){const tt=pt.getTime();return tt>=x&&tt<=A}return!1},bt=WS({viewDate:n,selectedDate:t,selectedStartDate:i,selectedEndDate:s,selectionMode:u,locale:c,weekDays:F.current,monthMatrix:R,selectableDate:p,isValidDate:m,onDateClicked:I,isSelectedDate:et,isInSelectedDateRange:nt},n,S),dt=st||((pt,tt)=>X.jsx("div",{className:"bc-dt-calendar bsc:w-full",children:tt}));return X.jsx(vc,{props:bt,template:dt,children:X.jsxs("div",{className:"bc-dt-day-row bsc:grid bsc:min-w-[329px] bsc:grid-cols-7 bsc:gap-3",children:[F.current?.map((pt,tt)=>X.jsx("div",{className:"bc-dt-day-cell bsc:text-center bsc:font-bold",children:pt},tt)),R?.map((pt,tt)=>pt.map((w,Z)=>{const K=w.dayValue!==null&&(p===void 0||p(w.dayValue)),at=Se("bsc:text-center bsc:py-1 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",{"bsc:text-gray-3":!w.isCurrent,"bsc:bg-primary-1 bsc:text-white bsc:dark:bg-mono-light-1 bsc:dark:text-mono-dark-1":w&&w.dayValue&&(U&&et(w.dayValue)||x&&!A&&lb(x,w.dayValue)||x&&A&&nt(w.dayValue)),"bsc:cursor-pointer":K,"bsc:text-error bsc:cursor-not-allowed":!K,"bsc:bg-primary-5 bsc:dark:bg-mono-light-3 bsc:dark:text-mono-dark-1":w.dayValue&&iH(w.dayValue)&&!(et(w.dayValue)||nt(w.dayValue))},"bc-dt-date-cell");return X.jsx("div",{className:at,onClick:()=>w&&w.dayValue&&K&&(m===void 0||m(w.dayValue))&&I(w.dayValue),children:w.dayValue?.getDate().toLocaleString(V.current?.code)},tt.toString()+Z.toString())}))]})})},Tg=({title:n,scrollerType:t,onTitleClicked:i,onMovePrevious:s,onMoveNext:u,viewDate:c,dispatcher:f})=>{const m=H.useContext(kS).dateScrollerTemplate,S=WS({title:n,scrollerType:t,onTitleClicked:i,onMovePrevious:s,onMoveNext:u},c,f),b="bsc:bg-transparent bsc:cursor-pointer bsc:focus:outline-hidden bsc:hover:bg-primary-1! bsc:hover:text-white! bsc:dark:hover:bg-mono-light-3!",x=m||((D,A)=>X.jsx("div",{className:"bc-dt-scroller bsc:flex bsc:w-full bsc:flex-row bsc:items-center bsc:px-2 bsc:py-1",children:A}));return X.jsxs(vc,{props:S,template:x,children:[X.jsx("div",{className:"bc-dt-scroller-left bsc:shrink bsc:cursor-pointer",children:X.jsx(Ql,{className:b,onClick:s,children:X.jsx(Ts,{icon:"chevronLeft",size:ka.Regular})})}),X.jsx("div",{className:"bc-dt-scroller-title bsc:grow bsc:cursor-pointer bsc:text-center bsc:hover:text-primary-2 bsc:dark:hover:text-mono-light-3",onClick:i,children:n}),X.jsx("div",{className:"bc-dt-scroller-right bsc:shrink bsc:cursor-pointer",children:X.jsx(Ql,{className:b,onClick:u,children:X.jsx(Ts,{icon:"chevronRight",size:ka.Regular})})})]})},BG=({selectedDate:n,viewDate:t,locale:i,showTimeSelector:s,selectableDate:u,isValidDate:c,onChange:f,dispatcher:p})=>{const m=()=>{t&&p({type:pe.SetViewDate,viewDate:Ov(t,1)})},S=()=>{t&&p({type:pe.SetViewDate,viewDate:Zo(t,1)})},b=()=>{p({type:pe.SetDateSelector,dateSelector:Ta.MonthSelector})},_=()=>{p({type:pe.SetDateSelector,dateSelector:Ta.TimeSelector})},x=()=>t?t.toLocaleDateString(i.code,{month:"long",year:"numeric"}):"";return X.jsxs("div",{className:"bc-dt-day-selector bsc:p-2",children:[X.jsx(Tg,{title:x(),scrollerType:Mh.Day,onTitleClicked:b,onMovePrevious:m,onMoveNext:S,viewDate:t,dispatcher:p}),X.jsx(Eg,{viewDate:t,selectedDate:n,locale:i,selectableDate:u,isValidDate:c,onDateSelected:f,dispatcher:p}),s&&X.jsx("div",{className:"bc-dt-time-value-wrapper bsc:flex bsc:w-full bsc:flex-row bsc:justify-center bsc:p-2",children:X.jsx("div",{className:"bc-dt-time-value bsc:cursor-pointer bsc:p-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1 bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-2",onClick:_,children:n?.toLocaleTimeString(i.code)||zG(i)})})]})},VG=({viewDate:n,locale:t,dateSelection:i=Qe.DateTime,dispatcher:s})=>{const u=H.useRef(OG(t)),c=()=>{const b=Rv(n,1);s({type:pe.SetViewDate,viewDate:b})},f=()=>{const b=r0(n,1);s({type:pe.SetViewDate,viewDate:b})},p=b=>{s({type:pe.SetDateSelector,dateSelector:i!==Qe.DateRange?Ta.DaySelector:Ta.DateRangeSelector,viewDate:CH(n,b)})},m=()=>n.toLocaleDateString(t.code,{year:"numeric"}),S=()=>{s({type:pe.SetDateSelector,dateSelector:Ta.YearSelector})};return X.jsxs("div",{className:"bc-dt-month-selector bsc:p-2",style:{minWidth:"20rem"},children:[X.jsx(Tg,{title:m(),scrollerType:Mh.Month,onTitleClicked:S,onMovePrevious:c,onMoveNext:f,viewDate:n,dispatcher:s}),X.jsx("div",{className:"bc-dt-month-grid bsc:grid bsc:w-full bsc:grid-cols-4 bsc:gap-4",children:u.current.map((b,_)=>b.map((x,D)=>X.jsx("div",{className:"bc-dt-month-cell bsc:cursor-pointer bsc:text-center bsc:py-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",onClick:()=>p(x.monthNumber),children:x.monthName},_.toString()+D.toString())))})]})},GG=({viewDate:n,selectedStartDate:t,selectedEndDate:i,locale:s,onChange:u,dispatcher:c})=>{const f=ng("screen and (max-device-width: 40rem)"),p=Zo(n,1),m=(D,A)=>{!A||!A.setEndDate?c({type:pe.SetSelectedStartDate,selectedStartDate:D}):(c({type:pe.SetSelectedEndDate,selectedEndDate:D}),t&&u&&u([t,D]))},S=()=>{c({type:pe.SetDateSelector,dateSelector:Ta.MonthSelector})},b=()=>f?`${n.toLocaleDateString(s.code,{month:"long"})} ${n.toLocaleDateString(s.code,{year:"numeric"})}`:`${n.toLocaleDateString(s.code,{month:"long"})} ${n.toLocaleDateString(s.code,{year:"numeric"})} - ${p.toLocaleDateString(s.code,{month:"long"})} ${p.toLocaleDateString(s.code,{year:"numeric"})}`,_=()=>{n&&c({type:pe.SetViewDate,viewDate:Ov(n,1)})},x=()=>{n&&c({type:pe.SetViewDate,viewDate:Zo(n,1)})};return X.jsxs("div",{className:"bc-dt-range-selector bsc:flex bsc:flex-col",children:[X.jsx("div",{className:"bc-dt-range-scroller-wrapper bsc:shrink",children:X.jsx(Tg,{title:b(),scrollerType:Mh.Range,onTitleClicked:S,onMovePrevious:_,onMoveNext:x,viewDate:n,dispatcher:c})}),X.jsx("div",{className:"bsc-flex-grow",children:X.jsx(Hv,{mobileMarkup:X.jsx("div",{className:"bc-dt-range-calendar bsc:px-2 bsc:py-1",children:X.jsx(Eg,{viewDate:n,selectedStartDate:t,selectedEndDate:i,selectionMode:tu.Range,onDateSelected:m,locale:s,dispatcher:c})}),aboveMobileMarkup:X.jsxs("div",{className:"bc-dt-range-wrapper bsc:flex bsc:flex-row bsc:px-2 bsc:py-1",children:[X.jsx("div",{className:"bc-dt-range-calendar-1 bsc:border-r bsc:border-solid bsc:border-gray-3 bsc:pr-4",children:X.jsx(Eg,{viewDate:n,selectedStartDate:t,selectedEndDate:i,selectionMode:tu.Range,onDateSelected:m,locale:s,dispatcher:c})}),X.jsx("div",{className:"bc-dt-range-calendar-2 bsc:pl-4",children:X.jsx(Eg,{viewDate:p,selectedStartDate:t,selectedEndDate:i,selectionMode:tu.Range,onDateSelected:m,locale:s,dispatcher:c})})]})})})]})},jG=({viewDate:n,showDateSelector:t,locale:i,timeFormat:s=Gn.TwelveHour,timeConstraints:u,onChange:c,dispatcher:f})=>{const p=H.useRef(s===Gn.TwelveHour?11:23),m=H.useRef(s===Gn.TwelveHour?["12","01","02","03","04","05","06","07","08","09","10","11"]:["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"]),S=H.useRef(DH(0,59,pt=>pt.toString().padStart(2,"0"))),b=H.useRef(["AM","PM"]),_=H.useRef(sR(n)),x=pt=>pt>11?pt-12:pt,[D,A]=H.useState(x(n.getHours())),[N,R]=H.useState(n.getMinutes()),[O,U]=H.useState(n.getHours()<=12?0:1),j=H.useRef(n.toLocaleDateString(i.code));H.useEffect(()=>{const pt=n.getHours(),tt=n.getMinutes();if(pt!==D&&A(s===Gn.TwelveHour?x(pt):pt),tt!==N&&R(tt),s===Gn.TwelveHour){const w=pt<=11?0:1;w!==O&&U(w)}},[n]);const V=()=>{const pt=u?.hours?.step||1,tt=D<p.current?D+pt:0;A(tt),et(tt,N,O)},F=()=>{const pt=u?.hours?.step||1,tt=D>0?D-pt:p.current;A(tt),et(tt,N,O)},$=()=>{const pt=u?.minutes?.step||1,tt=N+pt<(u?.minutes?.max||59)?N+pt:u?.minutes?.min||0;R(tt),et(D,tt,O)},st=()=>{const pt=u?.minutes?.step||1,tt=N-pt>=(u?.minutes?.min||0)?N-pt:(u?.minutes?.max||60)-pt;R(tt),et(D,tt,O)},I=()=>{const pt=O===0?1:0;U(pt),et(D,N,pt)},et=(pt,tt,w)=>{const Z=s===Gn.TwelveHour&&w===1?pt+12:pt;_.current.setHours(Z,tt),f({type:pe.SetSelectedDate,selectedDate:_.current,viewDate:_.current}),c?.(_.current)},nt=()=>{f({type:pe.SetDateSelector,dateSelector:Ta.DaySelector})},bt=Se("bsc:w-full bsc:grid bsc:grid-rows-3 bsc:gap-4 bsc:items-center bc-dt-time-grid",{"bsc:grid-cols-4":s===Gn.TwelveHour,"bsc:grid-cols-3":s===Gn.TwentyFourHour}),lt=Se("bsc:text-center bsc:cursor-pointer bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:text-mono-light-1 bsc:dark:hover:bg-mono-light-1 bsc:dark:hover:text-mono-dark-1 bc-dt-time-date-value",{"bsc:col-span-4":s===Gn.TwelveHour,"bsc:col-span-3":s===Gn.TwentyFourHour}),dt="bsc-bg-transparent bsc:p-2 bsc:cursor-pointer bsc:focus:outline-hidden bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-1 bsc:dark:hover:text-mono-dark-1";return X.jsx("div",{className:"bc-dt-time-selector bsc:flex bsc:flex-row bsc:justify-center bsc:p-2",style:{minWidth:s===Gn.TwelveHour?"15rem":"11rem"},children:X.jsxs("div",{className:bt,children:[t&&X.jsx("div",{className:lt,onClick:nt,children:j.current}),X.jsx("div",{className:"bc-dt-time-hour-increase bsc:cursor-pointer bsc:text-center",children:X.jsx(Ql,{className:dt,onClick:V,children:X.jsx(Ts,{icon:"chevronUp",size:ka.Regular})})}),X.jsx("div",{}),X.jsx("div",{className:"bc-dt-time-minute-increase bsc:cursor-pointer bsc:text-center",children:X.jsx(Ql,{className:dt,onClick:$,children:X.jsx(Ts,{icon:"chevronUp",size:ka.Regular})})}),s===Gn.TwelveHour&&X.jsx("div",{className:"bc-dt-time-meridian-increase bsc:cursor-pointer bsc:text-center",children:X.jsx(Ql,{className:dt,onClick:I,children:X.jsx(Ts,{icon:"chevronUp",size:ka.Regular})})}),X.jsx("div",{className:"bc-dt-time-hour-value bsc:text-center",children:m.current[D]}),X.jsx("div",{className:"bc-dt-time-separator bsc:text-center",children:":"}),X.jsx("div",{className:"bc-dt-time-minute-value bsc:text-center",children:S.current[N]}),s===Gn.TwelveHour&&X.jsx("div",{className:"bc-dt-time-meridian-value bsc:text-center",children:b.current[O]}),X.jsx("div",{className:"bc-dt-time-hour-decrease bsc:cursor-pointer bsc:text-center",children:X.jsx(Ql,{className:dt,onClick:F,children:X.jsx(Ts,{icon:"chevronDown",size:ka.Regular})})}),X.jsx("div",{}),X.jsx("div",{className:"bc-dt-time-minute-decrease bsc:cursor-pointer bsc:text-center",children:X.jsx(Ql,{className:dt,onClick:st,children:X.jsx(Ts,{icon:"chevronDown",size:ka.Regular})})}),s===Gn.TwelveHour&&X.jsx("div",{className:"bc-dt-time-meridian-decrease bsc:cursor-pointer bsc:text-center",children:X.jsx(Ql,{className:dt,onClick:I,children:X.jsx(Ts,{icon:"chevronDown",size:ka.Regular})})})]})})},LG=({viewDate:n,locale:t,dispatcher:i})=>{const s=RG(n,t),u=()=>{const m=Rv(n,10);i({type:pe.SetViewDate,viewDate:m})},c=()=>{const m=r0(n,10);i({type:pe.SetViewDate,viewDate:m})},f=m=>{const S=parseInt(m);i({type:pe.SetDateSelector,dateSelector:Ta.MonthSelector,viewDate:_H(n,S)})},p=()=>`${s[0][0].toString()} - ${s[2][1].toString()}`;return X.jsxs("div",{className:"bc-dt-year-selector bsc:p-2",style:{minWidth:"20rem"},children:[X.jsx(Tg,{title:p(),scrollerType:Mh.Year,onMovePrevious:u,onMoveNext:c,viewDate:n,dispatcher:i}),X.jsx("div",{className:"bc-dt-year-wrapper bsc:w-full",children:X.jsx("div",{className:"bc-dt-year-grid bsc:grid bsc:grid-cols-4 bsc:gap-4",children:s.map((m,S)=>m.map((b,_)=>b.length>0?X.jsx("div",{className:"bc-dt-year-cell bsc:cursor-pointer bsc:text-center bsc:py-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",onClick:()=>f(b),children:b},S.toString()+_.toString()):X.jsx("div",{},S.toString()+_.toString())))})})]})};class PG{constructor(t,i){this.dateSelection=t;const s=2023,u=12,c=20,p=new Date(s,u-1,c).toLocaleDateString(i,{year:"numeric",month:"numeric",day:"numeric"});this.dateFormat=p.replace(`${s}`,"YYYY").replace(`${u}`,"MM").replace(`${c}`,"DD");const m=new Date,S=18,b=24,_=37,x=317;m.setHours(S,b,_,x);const D=m.toLocaleTimeString(i);this.use24HourTime=D.startsWith("18"),this.timeFormat=D.replace(`${this.use24HourTime?S:"6"}`,"HH").replace(`${b}`,"MM").replace(`${_}`,"SS").replace(`${x}`,"LLL"),this.createDateParts()}dateFormat;timeFormat;use24HourTime;monthPart;dayPart;yearPart;twelveHourPart;twentyFourHourPart;minutePart;meridianPart;get is24HourTime(){return this.use24HourTime}createInputFormat(){const t={deleteShiftsFormatPart:!1,formatParts:[]};switch(this.dateSelection){case Qe.DateOnly:return this.createDateFormat(t);case Qe.TimeOnly:return this.createTimeFormat(t);case Qe.DateRange:return this.createDateRangeFormat(t);case Qe.DateTime:return this.createDateTimeFormat(t)}}createDateFormat(t){return this.dateFormat.startsWith("MM")?t.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?t.formatParts.push(...this.createDayMonthYearFormatParts()):t.formatParts.push(...this.createYearMonthDayFormatParts()),t}createTimeFormat(t){return this.use24HourTime?t.formatParts.push(...this.createTwentyFourHourFormatParts()):t.formatParts.push(...this.createTwelveHourFormatParts()),t}createDateRangeFormat(t){const i=[];this.dateFormat.startsWith("MM")?i.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?i.push(...this.createDayMonthYearFormatParts()):i.push(...this.createYearMonthDayFormatParts());const s={characterCount:3,placeholder:" - ",inputText:" - ",isSeparator:!0};return t.formatParts.push(...i,s,...i),t}createDateTimeFormat(t){this.dateFormat.startsWith("MM")?t.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?t.formatParts.push(...this.createDayMonthYearFormatParts()):t.formatParts.push(...this.createYearMonthDayFormatParts());const i={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return t.formatParts.push(i),this.use24HourTime?t.formatParts.push(...this.createTwentyFourHourFormatParts()):t.formatParts.push(...this.createTwelveHourFormatParts()),t}createMonthDayYearFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("MM",""),i=t.indexOf("DD"),s=t.substring(0,i);t=t.replace(s,"").replace("DD","");const u={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};i=t.indexOf("YYYY"),s=t.substring(0,i);const c={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};return[this.monthPart,u,this.dayPart,c,this.yearPart]}return[]}createDayMonthYearFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("DD",""),i=t.indexOf("MM"),s=t.substring(0,i);t=t.replace(s,"").replace("MM","");const u={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};i=t.indexOf("YYYY"),s=t.substring(0,i);const c={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};return[this.dayPart,u,this.monthPart,c,this.yearPart]}return[]}createYearMonthDayFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("YYYY",""),i=t.indexOf("MM"),s=t.substring(0,i);t=t.replace(s,"").replace("MM","");const u={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};i=t.indexOf("DD"),s=t.substring(0,i);const c={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};return[this.yearPart,u,this.monthPart,c,this.dayPart]}return[]}createTwelveHourFormatParts(){if(this.twelveHourPart&&this.minutePart&&this.meridianPart){const t=this.timeFormat.replace("HH",""),i=t.indexOf("MM"),s=t.substring(0,i),u={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0},c={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return[this.twelveHourPart,u,this.minutePart,c,this.meridianPart]}return[]}createTwentyFourHourFormatParts(){if(this.twentyFourHourPart&&this.minutePart){const t=this.timeFormat.replace("HH",""),i=t.indexOf("MM"),s=t.substring(0,i),u={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};return[this.twentyFourHourPart,u,this.minutePart]}return[]}createDateParts(){this.monthPart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:Il.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.dayPart={characterCount:2,placeholder:"D",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:Il.Numeric,minimumValue:1,maximumValue:31,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.yearPart={characterCount:4,placeholder:"Y",inputText:"_",isSeparator:!1,allCharactersRequired:!0,valueType:Il.Numeric},this.twelveHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:Il.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.twentyFourHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:Il.Numeric,minimumValue:0,maximumValue:23,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.minutePart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:Il.Numeric,minimumValue:0,maximumValue:59,exceedingMaximumValueCausesError:!0,padWithZeros:!0},this.meridianPart={characterCount:2,inputText:"_",isSeparator:!1,valueType:Il.Text,possibleValues:["AM","PM"]}}}const YG=(n,t)=>{const[i,s]=H.useState(),u=H.useRef(void 0);return H.useEffect(()=>{t&&!i&&(u.current=new PG(n,t),s(u.current.createInputFormat()))},[t]),[i,u.current?.is24HourTime]},qG=({value:n,readOnly:t=!1,label:i,useDefaultDateValue:s=!1,useFormattedInput:u=!1,allowClear:c=!1,closeSelector:f=!1,locale:p,className:m,dateSelection:S=Qe.DateTime,dateFormat:b,timeConstraints:_,icon:x,iconPosition:D=bg.Right,inputElement:A,selectableDate:N,isValidDate:R,onChange:O,onError:U,calendarTemplate:j,dateScrollerTemplate:V,inputTemplate:F,wrapperTemplate:$})=>{const[st,I]=H.useState(!1),[et,nt]=H.useState(),[bt,lt]=H.useState(),[dt,pt,tt]=OD(S),w=H.useRef(void 0),Z=H.useRef(!1),K=H.useRef(p||xH()),at=H.useRef(void 0),St=H.useRef(void 0),W=H.useRef(void 0),gt=H.useRef(null),Tt=H.useRef(null),[Pt,le]=YG(S,et),xn=yT.useDateLocale(K.current),xe=H.useRef({calendarTemplate:j,dateScrollerTemplate:V});H.useEffect(()=>{nt(xn.code),at.current=xn;const Ht=ln();ue(n||s?{type:pe.InitializeDates,initialDate:Array.isArray(Ht)?Ht[0]:Ht}:{type:pe.SetViewDate,viewDate:Array.isArray(Ht)?Ht[0]:Ht})},[xn]),H.useEffect(()=>{if(n){const Ht=ln();ue({type:pe.InitializeDates,initialDate:Ht})}else ue({type:pe.ClearDates})},[n,at.current]),H.useEffect(()=>{le&&ue({type:pe.SetTimeFormat,timeFormat:le?Gn.TwentyFourHour:Gn.TwelveHour})},[le]),H.useEffect(()=>{A&&(St.current=A)},[A]),H.useEffect(()=>{ue({type:pe.SetDateSelector,dateSelector:Dn()})},[dt]);const Dn=H.useCallback(()=>tt.current===Qe.TimeOnly?Ta.TimeSelector:tt.current===Qe.DateTime||tt.current===Qe.DateOnly?Ta.DaySelector:Ta.DateRangeSelector,[]),ln=()=>{const Ht=new Date;return Ht.setHours(0,0,0,0),n?typeof n=="string"?tt.current!==Qe.DateRange?M0(n,at.current):IS(n,at.current):n:Ht},Be={currentSelector:Dn(),currentViewDate:new Date,timeFormat:Gn.TwelveHour,dateInitialized:!1},[At,ue]=H.useReducer(wG,Be),ta=()=>{Mi(),I(!0)},ea=H.useMemo(()=>s0(()=>{I(!1)},250),[]),An=H.useMemo(()=>s0(()=>{ea.cancel()},5),[ea]),Ba=Ht=>{const ge=Ht.target.innerText;Ji(ge)},rn=Ht=>{if(Ht){const ge=tt.current!==Qe.DateRange?M0(Ht,at.current):IS(Ht,at.current);if(ge)if(R){const qr=Array.isArray(ge)?ge.every(Wl=>R(Wl)):R(ge);return!qr&&U&&U(ge),qr}else return!0;else return!1}else return!0},ha=Ht=>{Ji(Ht||"")},Ji=Ht=>{const ge=tt.current!==Qe.DateRange?M0(Ht,at.current):IS(Ht,at.current);ge?(Array.isArray(ge)?(HG(ge[0],rb(At.currentViewDate),gR(Zo(At.currentViewDate,1)))||ue({type:pe.SetViewDate,viewDate:ge[0]}),ue({type:pe.SetSelectedDateRange,selectedStartDate:ge[0],selectedEndDate:ge[1]})):ue({type:pe.SetSelectedDate,selectedDate:ge,viewDate:ge}),O?.(ge)):Ht===""&&(ue({type:pe.ClearDates}),O?.())},di=Ht=>{tt.current===Qe.DateOnly&&f===!0&&I(!1),O?.(Ht)},Fi=()=>{Mi(),I(!st),Tt.current?Tt.current.focus():gt.current&>.current.focus()},Mn=()=>{ue({type:pe.ClearDates}),I(!1),O?.()},on=(Ht,ge)=>{(!St.current||w.current!==ge)&&(St.current=Ht,w.current=ge,Z.current=!0)},Mi=()=>{(!W.current||Z.current)&&St.current&&(W.current=St.current,lt(St.current),Z.current=!1)},Ut=()=>{I(!1),ue({type:pe.SetDateSelector,dateSelector:Dn()})},Ae=()=>{switch(b){case N0.Short:return"short";case N0.Medium:return"medium";case N0.Long:return"long";default:return}},jn=()=>{const Ht=Ae();switch(tt.current){case Qe.DateTime:return At.selectedDate?Ht?At.selectedDate.toLocaleString(at.current?.code,{dateStyle:Ht,timeStyle:Ht}):At.selectedDate.toLocaleString(at.current?.code):"";case Qe.DateOnly:return At.selectedDate?Ht?At.selectedDate.toLocaleDateString(at.current?.code,{dateStyle:Ht}):At.selectedDate.toLocaleDateString(at.current?.code):"";case Qe.TimeOnly:return At.selectedDate?Ht?At.selectedDate.toLocaleTimeString(at.current?.code,{timeStyle:Ht,hour12:At.timeFormat===Gn.TwelveHour,hourCycle:At.timeFormat===Gn.TwentyFourHour?"h23":void 0}):At.selectedDate.toLocaleTimeString(at.current?.code,{hour12:At.timeFormat===Gn.TwelveHour,hourCycle:At.timeFormat===Gn.TwentyFourHour?"h23":void 0}):"";case Qe.DateRange:return At.selectedStartDate&&At.selectedEndDate?Ht?`${At.selectedStartDate.toLocaleDateString(at.current?.code,{dateStyle:Ht})} - ${At.selectedEndDate.toLocaleDateString(at.current?.code,{dateStyle:Ht})}`:`${At.selectedStartDate.toLocaleDateString(at.current?.code)} - ${At.selectedEndDate.toLocaleDateString(at.current?.code)}`:"";default:return At.selectedDate?Ht?At.selectedDate.toLocaleString(at.current?.code,{dateStyle:Ht,timeStyle:Ht}):At.selectedDate.toLocaleString(at.current?.code):""}},Va=dt===Qe.DateTime||dt===Qe.DateOnly||dt===Qe.DateRange,ke=dt===Qe.DateTime||dt===Qe.TimeOnly,mn=D===bg.None?{}:D===bg.Right?{rightElement:X.jsxs("div",{className:"bsc:flex bsc:text-black bsc:dark:text-mono-light-1",children:[c&&!t&&X.jsx("div",{children:X.jsx(Ts,{icon:"close",size:ka.Small,className:"bsc:cursor-pointer bsc:text-sm",onClick:Mn})}),X.jsx("div",{className:"bsc:ml-2",onClick:t?void 0:Fi,children:x||X.jsx(Ts,{icon:"calendar",size:ka.Small,className:t?void 0:"bsc:cursor-pointer"})})]}),rightElementClassName:"bsc:justify-center"}:{leftElement:X.jsxs("div",{className:"bsc:flex bsc:text-black bsc:dark:text-mono-light-1",children:[X.jsx("div",{className:"bsc:mr-2",onClick:t?void 0:Fi,children:x||X.jsx(Ts,{icon:"calendar",size:ka.Small,className:t?void 0:"bsc:cursor-pointer"})}),c&&!t&&X.jsx("div",{children:X.jsx(Ts,{icon:"close",size:ka.Small,className:"bsc:cursor-pointer bsc:text-sm",onClick:Mn})})]}),leftElementClassName:"bsc:justify-center"},eu={setDateSelector:Ht=>pt(Ht)},nu=$||((Ht,ge)=>X.jsx(X.Fragment,{children:ge})),da=()=>X.jsx(vc,{props:eu,template:nu,children:X.jsxs(X.Fragment,{children:[At.currentSelector===Ta.DaySelector&&Va&&At.dateInitialized&&at.current&&X.jsx(BG,{selectedDate:At.selectedDate,viewDate:At.currentViewDate,locale:at.current,showTimeSelector:tt.current===Qe.DateTime,selectableDate:N,isValidDate:R,dispatcher:ue,onChange:di}),At.currentSelector===Ta.MonthSelector&&Va&&At.dateInitialized&&at.current&&X.jsx(VG,{viewDate:At.currentViewDate,locale:at.current,dateSelection:tt.current,dispatcher:ue}),At.currentSelector===Ta.YearSelector&&Va&&At.dateInitialized&&at.current&&X.jsx(LG,{viewDate:At.currentViewDate,locale:at.current,dispatcher:ue}),At.currentSelector===Ta.TimeSelector&&ke&&At.dateInitialized&&at.current&&X.jsx(jG,{viewDate:At.currentViewDate,showDateSelector:tt.current===Qe.DateTime,locale:at.current,timeFormat:At.timeFormat,timeConstraints:_,onChange:O,dispatcher:ue}),At.currentSelector===Ta.DateRangeSelector&&Va&&At.dateInitialized&&at.current&&X.jsx(GG,{viewDate:At.currentViewDate,selectedStartDate:At.selectedStartDate,selectedEndDate:At.selectedEndDate,locale:at.current,onChange:O,dispatcher:ue})]})}),Pr=WS({label:i,readOnly:t,allowClear:c,getValue:jn,onFocus:ta,onInput:Ba,iconPosition:D,iconElement:mn.rightElement||mn.leftElement},At.currentViewDate,ue),Yr=F||((Ht,ge)=>X.jsx(X.Fragment,{children:ge})),au=Se("bsc:text-left",{"bc-read-only bsc:bg-gray-4 bsc:dark:bg-mono-dark-3":t,"bsc:bg-white bsc:dark:bg-mono-dark-1":!t},"bc-dt-input",m);return X.jsx(kS.Provider,{value:xe.current,children:X.jsxs("div",{className:"bc-date-time",children:[i&&X.jsx(wr,{label:i,readOnly:t,className:"bc-dt-label"}),X.jsx(Hv,{mobileMarkup:X.jsxs(X.Fragment,{children:[X.jsx(vc,{props:Pr,template:Yr,children:X.jsx($1,{ref:gt,value:jn(),readOnly:t,inputMode:"none",className:au,onFocus:ta,onElementCreate:Ht=>on(Ht,!1),...mn})}),X.jsx(b9,{visible:st,target:bt,hidden:Ut,unmountWhenHidden:!0,children:da()})]}),aboveMobileMarkup:X.jsxs(X.Fragment,{children:[X.jsx(vc,{props:Pr,template:Yr,children:u===!1?X.jsx($1,{ref:gt,value:jn(),readOnly:t,className:au,onFocus:ta,onBlur:ea,onInput:Ba,onElementCreate:Ht=>on(Ht,!1),...mn}):X.jsx(A9,{ref:Tt,value:jn(),readOnly:t,className:au,format:Pt,isInputValid:rn,onFocus:ta,onBlur:ea,onChange:ha,onElementCreate:Ht=>on(Ht,!0),...mn})}),X.jsx(C9,{visible:st,target:bt,shouldTargetCloseOverlay:!1,shouldScrollCloseOverlay:!0,shouldCheckZIndex:!0,shouldRemainOnScreen:!0,hidden:Ut,isClickedWithin:An,unmountWhenHidden:!1,children:da()})]})})]})})};var $S,O9;function XG(){if(O9)return $S;O9=1;function n(D,A){var N,R;if(typeof A=="function")R=A(D),R!==void 0&&(D=R);else if(Array.isArray(A))for(N=0;N<A.length;N++)R=A[N](D),R!==void 0&&(D=R);return D}function t(D,A){return D[0]==="-"&&Array.isArray(A)&&/^-\d+$/.test(D)?A.length+parseInt(D,10):D}function i(D){return/^\d+$/.test(D)}function s(D){return Object.prototype.toString.call(D)==="[object Object]"}function u(D){return Object(D)===D}function c(D){return Object.keys(D).length===0}var f=["__proto__","prototype","constructor"],p=function(D){return f.indexOf(D)===-1};function m(D,A){D.indexOf("[")>=0&&(D=D.replace(/\[/g,A).replace(/]/g,""));var N=D.split(A),R=N.filter(p);if(R.length!==N.length)throw Error("Refusing to update blacklisted property "+D);return N}var S=Object.prototype.hasOwnProperty;function b(D,A,N,R){if(!(this instanceof b))return new b(D,A,N,R);typeof A>"u"&&(A=!1),typeof N>"u"&&(N=!0),typeof R>"u"&&(R=!0),this.separator=D||".",this.override=A,this.useArray=N,this.useBrackets=R,this.keepArray=!1,this.cleanup=[]}var _=new b(".",!1,!0,!0);function x(D){return function(){return _[D].apply(_,arguments)}}return b.prototype._fill=function(D,A,N,R){var O=D.shift();if(D.length>0){if(A[O]=A[O]||(this.useArray&&i(D[0])?[]:{}),!u(A[O]))if(this.override)A[O]={};else{if(!(u(N)&&c(N)))throw new Error("Trying to redefine `"+O+"` which is a "+typeof A[O]);return}this._fill(D,A[O],N,R)}else{if(!this.override&&u(A[O])&&!c(A[O])){if(!(u(N)&&c(N)))throw new Error("Trying to redefine non-empty obj['"+O+"']");return}A[O]=n(N,R)}},b.prototype.object=function(D,A){var N=this;return Object.keys(D).forEach(function(R){var O=A===void 0?null:A[R],U=m(R,N.separator).join(N.separator);U.indexOf(N.separator)!==-1?(N._fill(U.split(N.separator),D,D[R],O),delete D[R]):D[R]=n(D[R],O)}),D},b.prototype.str=function(D,A,N,R){var O=m(D,this.separator).join(this.separator);return D.indexOf(this.separator)!==-1?this._fill(O.split(this.separator),N,A,R):N[D]=n(A,R),N},b.prototype.pick=function(D,A,N,R){var O,U,j,V,F;for(U=m(D,this.separator),O=0;O<U.length;O++)if(V=t(U[O],A),A&&typeof A=="object"&&V in A){if(O===U.length-1)return N?(j=A[V],R&&Array.isArray(A)?A.splice(V,1):delete A[V],Array.isArray(A)&&(F=U.slice(0,-1).join("."),this.cleanup.indexOf(F)===-1&&this.cleanup.push(F)),j):A[V];A=A[V]}else return;return N&&Array.isArray(A)&&(A=A.filter(function($){return $!==void 0})),A},b.prototype.delete=function(D,A){return this.remove(D,A,!0)},b.prototype.remove=function(D,A,N){var R;if(this.cleanup=[],Array.isArray(D)){for(R=0;R<D.length;R++)this.pick(D[R],A,!0,N);return N||this._cleanup(A),A}else return this.pick(D,A,!0,N)},b.prototype._cleanup=function(D){var A,N,R,O;if(this.cleanup.length){for(N=0;N<this.cleanup.length;N++)R=this.cleanup[N].split("."),O=R.splice(0,-1).join("."),A=O?this.pick(O,D):D,A=A[R[0]].filter(function(U){return U!==void 0}),this.set(this.cleanup[N],A,D);this.cleanup=[]}},b.prototype.del=b.prototype.remove,b.prototype.move=function(D,A,N,R,O){return typeof R=="function"||Array.isArray(R)?this.set(A,n(this.pick(D,N,!0),R),N,O):(O=R,this.set(A,this.pick(D,N,!0),N,O)),N},b.prototype.transfer=function(D,A,N,R,O,U){return typeof O=="function"||Array.isArray(O)?this.set(A,n(this.pick(D,N,!0),O),R,U):(U=O,this.set(A,this.pick(D,N,!0),R,U)),R},b.prototype.copy=function(D,A,N,R,O,U){return typeof O=="function"||Array.isArray(O)?this.set(A,n(JSON.parse(JSON.stringify(this.pick(D,N,!1))),O),R,U):(U=O,this.set(A,this.pick(D,N,!1),R,U)),R},b.prototype.set=function(D,A,N,R){var O,U,j,V;if(typeof A>"u")return N;for(j=m(D,this.separator),O=0;O<j.length;O++){if(V=j[O],O===j.length-1)if(R&&s(A)&&s(N[V]))for(U in A)S.call(A,U)&&(N[V][U]=A[U]);else if(R&&Array.isArray(N[V])&&Array.isArray(A))for(var F=0;F<A.length;F++)N[j[O]].push(A[F]);else N[V]=A;else(!S.call(N,V)||!s(N[V])&&!Array.isArray(N[V]))&&(/^\d+$/.test(j[O+1])?N[V]=[]:N[V]={});N=N[V]}return N},b.prototype.transform=function(D,A,N){return A=A||{},N=N||{},Object.keys(D).forEach((function(R){this.set(D[R],this.pick(R,A),N)}).bind(this)),N},b.prototype.dot=function(D,A,N){A=A||{},N=N||[];var R=Array.isArray(D);return Object.keys(D).forEach((function(O){var U=R&&this.useBrackets?"["+O+"]":O;if(u(D[O])&&(s(D[O])&&!c(D[O])||Array.isArray(D[O])&&!this.keepArray&&D[O].length!==0))if(R&&this.useBrackets){var j=N[N.length-1]||"";return this.dot(D[O],A,N.slice(0,-1).concat(j+U))}else return this.dot(D[O],A,N.concat(U));else R&&this.useBrackets?A[N.join(this.separator).concat("["+O+"]")]=D[O]:A[N.concat(U).join(this.separator)]=D[O]}).bind(this)),A},b.pick=x("pick"),b.move=x("move"),b.transfer=x("transfer"),b.transform=x("transform"),b.copy=x("copy"),b.object=x("object"),b.str=x("str"),b.set=x("set"),b.delete=x("delete"),b.del=b.remove=x("remove"),b.dot=x("dot"),["override","overwrite"].forEach(function(D){Object.defineProperty(b,D,{get:function(){return _.override},set:function(A){_.override=!!A}})}),["useArray","keepArray","useBrackets"].forEach(function(D){Object.defineProperty(b,D,{get:function(){return _[D]},set:function(A){_[D]=A}})}),b._process=n,$S=b,$S}var KG=XG();const R9=X2(KG),QG=({name:n,label:t,value:i,data:s,textField:u,valueField:c,readOnly:f=!1,orientation:p=Za.Horizontal,isMultiSelect:m=!1,className:S,onChange:b,itemTemplate:_})=>{const[x,D]=H.useState(),[A,N]=H.useState([]),R=tv(()=>s,[s]),O=H.useId();H.useEffect(()=>{if(m){const lt=Array.isArray(i)?i.map(dt=>dt.toString()):i?[String(i)]:void 0;N(lt??[])}else i&&D(i.toString())},[i]);const U=lt=>m?A.findIndex(dt=>dt===lt)>-1:x===lt,j=lt=>{const dt=lt.toString();if(m){const pt=U(dt);let tt;pt?tt=A.filter(w=>w!=dt):tt=[...A,dt],N(tt),b?.({name:n,value:tt})}else dt!==x&&(D(dt),b?.({name:n,value:dt}))},V=lt=>{Array.isArray(lt?.value)?N(lt?.value??[]):D(lt?.value),b?.(lt)},F=kp(nh.FocusWithin),$=H.useCallback((lt,dt)=>X.jsx(X.Fragment,{children:dt}),[]),st=_||$,I=(lt,dt,pt)=>{const tt=`element_${O}_${dt}`,w=R9.pick(u,lt),Z=String(R9.pick(c,lt)),K=dt===0,at=dt===pt.length-1,St=Se("bc-group-button-item bsc:cursor-pointer bsc:border-solid bsc:p-2 bsc:font-medium",{"bsc:has-data-checked:bg-primary-1 bsc:dark:has-data-checked:bg-mono-light-1 bsc:has-data-checked:text-white bsc:dark:has-data-checked:text-mono-dark-1 bsc:dark:text-mono-light-1 bsc:text-gray-2 bsc:border-gray-3 bsc:dark:border-mono-light-2":!f,"bc-read-only bsc:has-data-checked:bg-primary-4 bsc:dark:has-data-checked:bg-mono-light-3 bsc:has-data-checked:text-gray-5 bsc:dark:has-data-checked:text-mono-dark-3 bsc:dark:text-mono-light-3 bsc:text-gray-3 bsc:border-gray-4 bsc:dark:border-mono-light-3 bsc:pointer-events-none":f,"bsc:border-t bsc:border-l bsc:border-b bsc:rounded-l-md bsc:pl-2":K&&p===Za.Horizontal,"bsc:border-t bsc:border-r bsc:border-l bsc:border-b bsc:rounded-r-md bsc:pr-2":at&&p===Za.Horizontal,"bsc:border-t bsc:border-b":!K&&!at&&p===Za.Horizontal,"bsc:border-l":!K&&p===Za.Horizontal,"bsc:border-l bsc:border-r bsc:border-t bsc:rounded-t-md":K&&p===Za.Vertical,"bsc:border bsc:rounded-b-md":at&&p===Za.Vertical,"bsc:border-t bsc:border-l bsc:border-r":!K&&!at&&p===Za.Vertical},F),W={itemId:tt,selectedValue:m?A:x,itemText:w,itemValue:Z,itemData:lt,itemStyles:St,isSelected:U(Z),isFirstItem:K,isLastItem:at,onItemChanged:j};return m?X.jsx(vc,{props:W,template:st,children:X.jsx(rh,{className:St,children:X.jsx(c6,{value:Z,className:"bsc:block bsc:w-full bsc:cursor-pointer",children:w})})},tt):X.jsx(vc,{props:W,template:st,children:X.jsx(rh,{className:St,children:X.jsx(y6,{value:Z,className:"bsc:block bsc:w-full bsc:cursor-pointer",children:w})})},tt)},et=Se("bsc:flex bsc:flex-col bsc:gap-2",S),nt=Se("bsc:flex",{"bsc:flex-col bsc:w-max":p===Za.Vertical}),bt=lt=>m?X.jsx(d6,{name:n,value:A,readOnly:f,onChange:V,className:nt,children:lt.map(I)}):X.jsx(g6,{name:n,value:x,readOnly:f,onChange:V,className:nt,children:lt.map(I)});return X.jsxs(rh,{className:et,children:[t&&X.jsx(wr,{label:t,readOnly:f}),R&&bt(R)]})},ZG=H.memo(QG),JG=({name:n,label:t,value:i,data:s,textField:u,valueField:c,readOnly:f=!1,labelLocation:p=Es.Right,orientation:m=Za.Vertical,className:S,useAnimation:b,onChange:_})=>{const x=tv(()=>s,[s]),D=H.useId(),A=hv(b),N=kp(nh.FocusWithin),R=Se("bc-radio-container bsc:flex bsc:flex-col bsc:gap-1",S),O=Se("bc-radio-wrapper bsc:flex bsc:gap-1",{"bsc:flex-col":m===Za.Vertical,"bsc:*:pr-2":m===Za.Horizontal}),U=Se("bc-radio-item-wrapper bsc:flex bsc:items-center bsc:*:cursor-pointer",{"bc-read-only":f}),j=Se("bc-radio-item bsc:group bsc:relative bsc:*:size-[21px] bsc:rounded-full",{"bsc:ml-2":p===Es.Left,"bsc:mr-2":p===Es.Right,"bc-read-only":f},N),V=Se("bc-radio-item-svg bsc:stroke-2 bsc:fill-none bsc:rounded-full bsc:stroke-gray-1 bsc:dark:stroke-mono-light-2 bsc:group-data-read-only:stroke-gray-4 bsc:dark:group-data-read-only:stroke-mono-light-3"),F=Se("bsc:group-data-checked:fill-primary-1 bsc:dark:group-data-checked:fill-mono-light-2 bsc:group-data-checked:group-data-read-only:fill-primary-4 bsc:dark:group-data-checked:group-data-read-only:fill-mono-light-3",{"bsc:group-data-checked:animate-bounce":!f&&A}),$=Se("bsc:invisible bsc:group-data-checked:visible bsc:group-data-checked:fill-white bsc:dark:group-data-checked:fill-mono-dark-1",{"bsc:group-data-checked:animate-bounce":!f&&A}),st=(I,et)=>{const nt=I[u],bt=I[c];return X.jsxs(rh,{className:U,children:[p===Es.Left&&X.jsx(wr,{label:nt,readOnly:f}),X.jsx(y6,{value:bt,className:j,children:X.jsxs("svg",{viewBox:"0 0 30 30",preserveAspectRatio:"xMidYMid meet",className:V,children:[X.jsx("circle",{cx:15,cy:15,r:15,className:F}),X.jsx("circle",{cx:"50%",cy:"50%",r:7,className:$})]})}),p===Es.Right&&X.jsx(wr,{label:nt,readOnly:f})]},`radio_${D}_item${et}`)};return X.jsxs("div",{className:R,children:[t&&X.jsx(wr,{label:t,readOnly:f}),X.jsx(g6,{name:n,value:i,readOnly:f,onChange:_,className:O,children:x&&x.map(st)})]})},FG=H.memo(JG),kG=({name:n,label:t,value:i,checked:s=!1,readOnly:u=!1,useAnimation:c,className:f,onChange:p})=>{const m=hv(c),S=Se("bc-toggle-wrapper bsc:flex bsc:flex-col",f),b=kp(nh.FocusWithin),_=Se("bc-toggle-container bsc:group bsc:flex bsc:mt-0.5 bsc:relative bsc:w-[60px] bsc:h-[26px] bsc:rounded-full bsc:[transition:background-color_1s]",{"bsc:cursor-pointer bsc:bg-gray-3 bsc:dark:bg-mono-dark-3 bsc:has-checked:bg-primary-1 bsc:dark:has-checked:bg-mono-light-2":!u,"bc-read-only bsc:pointer-events-none bsc:bg-gray-4 bsc:dark:bg-mono-dark-2 bsc:has-checked:bg-primary-4 bsc:dark:has-checked:bg-mono-light-3":u},b),x=Se("bc-toggle-switch bsc:absolute bsc:rounded-full bsc:dark:border bsc:dark:border-solid bsc:dark:border-mono-dark-1 bsc:group-data-toggled:translate-x-[35px] bsc:w-[18px] bsc:h-[18px] bsc:top-[4px] bsc:left-[4px]",{"bsc:bg-white bsc:cursor-pointer":!u,"bc-read-only bsc:bg-gray-5 bsc:pointer-events-none":u,"bsc:[transition:0.3s]":!u&&m});return X.jsxs(rh,{className:S,children:[t&&X.jsx(wr,{label:t,readOnly:u}),X.jsx(bA,{name:n,value:i,toggled:s,onChange:p,className:_,children:X.jsx("div",{className:x})})]})},IG=H.memo(kG);$t.AvatarEditor=zD,$t.BeeSoftProvider=HD,$t.Button=Ql,$t.Checkbox=v6,$t.CheckboxGroup=CA,$t.ContentEditableInput=$1,$t.DateFormatType=N0,$t.DateScrollerType=Mh,$t.DateSelectionType=Qe,$t.DateTime=qG,$t.FormGroupItemOrientation=Za,$t.FormattedInput=A9,$t.GroupButton=ZG,$t.MediaQuery=Hv,$t.MobileOverlayPanel=b9,$t.OverlayPanel=C9,$t.RadioButton=FG,$t.SelectionLabelLocation=Es,$t.Toggle=IG,$t.applyBeeSoftTheme=RH,$t.createBeeSoftTheme=zH,Object.defineProperty($t,Symbol.toStringTag,{value:"Module"})}));
|
|
234
|
+
<%s key={someKey} {...props} />`,qt,se,Ke,se),dt[se+qt]=!0)}if(se=null,Rt!==void 0&&(i(Rt),se=""+Rt),f(Et)&&(i(Et.key),se=""+Et.key),"key"in Et){Rt={};for(var yn in Et)yn!=="key"&&(Rt[yn]=Et[yn])}else Rt=Et;return se&&p(Rt,typeof $=="function"?$.displayName||$.name||"Unknown":$),S($,se,Rt,u(),Bt,Vt)}function _($){x($)?$._store&&($._store.validated=1):typeof $=="object"&&$!==null&&$.$$typeof===it&&($._payload.status==="fulfilled"?x($._payload.value)&&$._payload.value._store&&($._payload.value._store.validated=1):$._store&&($._store.validated=1))}function x($){return typeof $=="object"&&$!==null&&$.$$typeof===A}var D=w,A=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),G=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),et=Symbol.for("react.suspense"),ft=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),it=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),St=Symbol.for("react.client.reference"),nt=D.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ht=Object.prototype.hasOwnProperty,yt=Array.isArray,tt=console.createTask?console.createTask:function(){return null};D={react_stack_bottom_frame:function($){return $()}};var H,Q={},K=D.react_stack_bottom_frame.bind(D,c)(),pt=tt(s(c)),dt={};J1.Fragment=O,J1.jsx=function($,Et,Rt){var qt=1e4>nt.recentlyCreatedOwnerStacks++;return b($,Et,Rt,!1,qt?Error("react-stack-top-frame"):K,qt?tt(s($)):pt)},J1.jsxs=function($,Et,Rt){var qt=1e4>nt.recentlyCreatedOwnerStacks++;return b($,Et,Rt,!0,qt?Error("react-stack-top-frame"):K,qt?tt(s($)):pt)}})()),J1}var q4;function LD(){return q4||(q4=1,process.env.NODE_ENV==="production"?nv.exports=GD():nv.exports=jD()),nv.exports}var Ja=LD();function PD(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var X4,K4;function YD(){return K4||(K4=1,X4=function n(t,i){if(t===i)return!0;if(t&&i&&typeof t=="object"&&typeof i=="object"){if(t.constructor!==i.constructor)return!1;var s,u,c;if(Array.isArray(t)){if(s=t.length,s!=i.length)return!1;for(u=s;u--!==0;)if(!n(t[u],i[u]))return!1;return!0}if(t.constructor===RegExp)return t.source===i.source&&t.flags===i.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===i.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===i.toString();if(c=Object.keys(t),s=c.length,s!==Object.keys(i).length)return!1;for(u=s;u--!==0;)if(!Object.prototype.hasOwnProperty.call(i,c[u]))return!1;for(u=s;u--!==0;){var f=c[u];if(!n(t[f],i[f]))return!1}return!0}return t!==t&&i!==i}),X4}var qD=YD();const XD=PD(qD),KD=()=>{throw new Error("useEvent should not be called before the component is mounted")},e0=n=>{const t=w.useRef(KD);w.useInsertionEffect(()=>{t.current=n},[n]);const i=w.useRef(null);return i.current||(i.current=function(){return t.current?.apply(this,arguments)}),i.current},Q4=n=>{const t=w.useRef(void 0);let i=!1;t.current!==void 0&&(i=!XD(t.current,n));const s={changed:i,previousValue:t.current};return t.current=n,s},QD=n=>typeof n=="function",ZD=n=>{const[t,i]=w.useState({value:n,initial:!0}),s=w.useRef(n);return[t,u=>{if(!QD(u))i({value:u,initial:!1});else{const c=u(s.current);s.current=c,i({value:c,initial:!1})}}]},JD=n=>{const[t,i]=ZD(n),s=w.useRef({value:n,initial:!0});return s.current!==t&&(s.current=t),[t,i,s]},Z4=w.createContext(void 0),F1=()=>w.useContext(Z4),av=({id:n,name:t,value:i,type:s,checked:u,readOnly:c,onChange:f})=>Ja.jsx("input",{id:n,name:t,value:i,type:s,checked:u,onChange:f,readOnly:c,disabled:c,className:"bsh:appearance-none! bsh:absolute! bsh:left-[-1000px]!"});function FD(n){const t=Object.keys(n),i={};for(let s=0,u=t.length;s<u;s++){const c=t[s];if(c){const f=n[c],p=c.replace(/([A-Z])/g,m=>`-${m.toLowerCase()}`);typeof f=="boolean"?f&&(i[`data-${p}`]=!0):i[`data-${p}`]=n[c]}}return i}const n0=({wrapperElement:n,renderProps:t,elementProps:i,innerWrapperElement:s,className:u,children:c})=>{if(typeof c=="function")return s?Ja.jsxs(Ja.Fragment,{children:[s,c(t)]}):c(t);{const f=s?Ja.jsxs(Ja.Fragment,{children:[s,c]}):c;return w.createElement(n,Object.assign({},t?FD(t):{},i,{className:u}),f)}};var kD=Symbol.for("preact-signals");function iv(){if(rh>1)rh--;else{for(var n,t=!1;a0!==void 0;){var i=a0;for(a0=void 0,sv++;i!==void 0;){var s=i.o;if(i.o=void 0,i.f&=-3,!(8&i.f)&&k4(i))try{i.c()}catch(u){t||(n=u,t=!0)}i=s}}if(sv=0,rh--,t)throw n}}var Ge=void 0;function J4(n){var t=Ge;Ge=void 0;try{return n()}finally{Ge=t}}var a0=void 0,rh=0,sv=0,k1=0;function F4(n){if(Ge!==void 0){var t=n.n;if(t===void 0||t.t!==Ge)return t={i:0,S:n,p:Ge.s,n:void 0,t:Ge,e:void 0,x:void 0,r:t},Ge.s!==void 0&&(Ge.s.n=t),Ge.s=t,n.n=t,32&Ge.f&&n.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Ge.s,t.n=void 0,Ge.s.n=t,Ge.s=t),t}}function Fa(n,t){this.v=n,this.i=0,this.n=void 0,this.t=void 0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}Fa.prototype.brand=kD,Fa.prototype.h=function(){return!0},Fa.prototype.S=function(n){var t=this,i=this.t;i!==n&&n.e===void 0&&(n.x=i,this.t=n,i!==void 0?i.e=n:J4(function(){var s;(s=t.W)==null||s.call(t)}))},Fa.prototype.U=function(n){var t=this;if(this.t!==void 0){var i=n.e,s=n.x;i!==void 0&&(i.x=s,n.e=void 0),s!==void 0&&(s.e=i,n.x=void 0),n===this.t&&(this.t=s,s===void 0&&J4(function(){var u;(u=t.Z)==null||u.call(t)}))}},Fa.prototype.subscribe=function(n){var t=this;return rv(function(){var i=t.value,s=Ge;Ge=void 0;try{n(i)}finally{Ge=s}},{name:"sub"})},Fa.prototype.valueOf=function(){return this.value},Fa.prototype.toString=function(){return this.value+""},Fa.prototype.toJSON=function(){return this.value},Fa.prototype.peek=function(){var n=Ge;Ge=void 0;try{return this.value}finally{Ge=n}},Object.defineProperty(Fa.prototype,"value",{get:function(){var n=F4(this);return n!==void 0&&(n.i=this.i),this.v},set:function(n){if(n!==this.v){if(sv>100)throw new Error("Cycle detected");this.v=n,this.i++,k1++,rh++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{iv()}}}});function ID(n,t){return new Fa(n,t)}function k4(n){for(var t=n.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function I4(n){for(var t=n.s;t!==void 0;t=t.n){var i=t.S.n;if(i!==void 0&&(t.r=i),t.S.n=t,t.i=-1,t.n===void 0){n.s=t;break}}}function W4(n){for(var t=n.s,i=void 0;t!==void 0;){var s=t.p;t.i===-1?(t.S.U(t),s!==void 0&&(s.n=t.n),t.n!==void 0&&(t.n.p=s)):i=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=s}n.s=i}function oh(n,t){Fa.call(this,void 0),this.x=n,this.s=void 0,this.g=k1-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}oh.prototype=new Fa,oh.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===k1))return!0;if(this.g=k1,this.f|=1,this.i>0&&!k4(this))return this.f&=-2,!0;var n=Ge;try{I4(this),Ge=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(i){this.v=i,this.f|=16,this.i++}return Ge=n,W4(this),this.f&=-2,!0},oh.prototype.S=function(n){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}Fa.prototype.S.call(this,n)},oh.prototype.U=function(n){if(this.t!==void 0&&(Fa.prototype.U.call(this,n),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},oh.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var n=this.t;n!==void 0;n=n.x)n.t.N()}},Object.defineProperty(oh.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var n=F4(this);if(this.h(),n!==void 0&&(n.i=this.i),16&this.f)throw this.v;return this.v}});function $4(n){var t=n.u;if(n.u=void 0,typeof t=="function"){rh++;var i=Ge;Ge=void 0;try{t()}catch(s){throw n.f&=-2,n.f|=8,lv(n),s}finally{Ge=i,iv()}}}function lv(n){for(var t=n.s;t!==void 0;t=t.n)t.S.U(t);n.x=void 0,n.s=void 0,$4(n)}function WD(n){if(Ge!==this)throw new Error("Out-of-order effect");W4(this),Ge=n,this.f&=-2,8&this.f&&lv(this),iv()}function uh(n,t){this.x=n,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=t?.name}uh.prototype.c=function(){var n=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{n()}},uh.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,$4(this),I4(this),rh++;var n=Ge;return Ge=this,WD.bind(this,n)},uh.prototype.N=function(){2&this.f||(this.f|=2,this.o=a0,a0=this)},uh.prototype.d=function(){this.f|=8,1&this.f||lv(this)},uh.prototype.dispose=function(){this.d()};function rv(n,t){var i=new uh(n,t);try{i.c()}catch(u){throw i.d(),u}var s=i.d.bind(i);return s[Symbol.dispose]=s,s}var ov={exports:{}},uv={},t6;function $D(){if(t6)return uv;t6=1;var n=w;function t(_,x){return _===x&&(_!==0||1/_===1/x)||_!==_&&x!==x}var i=typeof Object.is=="function"?Object.is:t,s=n.useState,u=n.useEffect,c=n.useLayoutEffect,f=n.useDebugValue;function p(_,x){var D=x(),A=s({inst:{value:D,getSnapshot:x}}),N=A[0].inst,O=A[1];return c(function(){N.value=D,N.getSnapshot=x,m(N)&&O({inst:N})},[_,D,x]),u(function(){return m(N)&&O({inst:N}),_(function(){m(N)&&O({inst:N})})},[_]),f(D),D}function m(_){var x=_.getSnapshot;_=_.value;try{var D=x();return!i(_,D)}catch{return!0}}function S(_,x){return x()}var b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?S:p;return uv.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:b,uv}var e6={},n6;function tA(){return n6||(n6=1,process.env.NODE_ENV!=="production"&&(function(){function n(D,A){return D===A&&(D!==0||1/D===1/A)||D!==D&&A!==A}function t(D,A){b||u.startTransition===void 0||(b=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var N=A();if(!_){var O=A();c(N,O)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),_=!0)}O=f({inst:{value:N,getSnapshot:A}});var R=O[0].inst,U=O[1];return m(function(){R.value=N,R.getSnapshot=A,i(R)&&U({inst:R})},[D,N,A]),p(function(){return i(R)&&U({inst:R}),D(function(){i(R)&&U({inst:R})})},[D]),S(N),N}function i(D){var A=D.getSnapshot;D=D.value;try{var N=A();return!c(D,N)}catch{return!0}}function s(D,A){return A()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var u=w,c=typeof Object.is=="function"?Object.is:n,f=u.useState,p=u.useEffect,m=u.useLayoutEffect,S=u.useDebugValue,b=!1,_=!1,x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?s:t;e6.useSyncExternalStore=u.useSyncExternalStore!==void 0?u.useSyncExternalStore:x,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),e6}var a6;function eA(){return a6||(a6=1,process.env.NODE_ENV==="production"?ov.exports=$D():ov.exports=tA()),ov.exports}var nA=eA(),aA=w.version.split(".").map(Number)[0],i6=[],iA=Symbol.for(aA>=19?"react.transitional.element":"react.element"),mc,s6=Symbol.dispose||Symbol.for("Symbol.dispose");function cv(n,t){var i=t.effect.S();return mc=t,sA.bind(t,n,i)}function sA(n,t){t(),mc=n}var l6,fv,r6=function(){},lA=((l6={o:0,effect:{s:void 0,c:function(){},S:function(){return r6},d:function(){}},subscribe:function(){return r6},getSnapshot:function(){return 0},S:function(){},f:function(){}})[s6]=function(){},l6),rA=Promise.prototype.then.bind(Promise.resolve());function oA(){fv||(fv=rA(uA))}function uA(){var n;fv=void 0,(n=mc)==null||n.f()}function cA(n){oA();var t=w.useRef();t.current==null&&(typeof window>"u"?t.current=lA:t.current=(function(s){var u,c,f,p,m=0,S=rv(function(){c=this});return c.c=function(){m=m+1|0,p&&p()},(u={o:s,effect:c,subscribe:function(b){return p=b,function(){m=m+1|0,p=void 0,S()}},getSnapshot:function(){return m},S:function(){if(mc!=null){var b=mc.o,_=this.o;b==0&&_==0||b==0&&_==1?(mc.f(),f=cv(void 0,this)):b==1&&_==0||b==2&&_==0||(f=cv(mc,this))}else f=cv(void 0,this)},f:function(){var b=f;f=void 0,b?.()}})[s6]=function(){this.f()},u})(n));var i=t.current;return nA.useSyncExternalStore(i.subscribe,i.getSnapshot,i.getSnapshot),i.S(),i}Object.defineProperties(Fa.prototype,{$$typeof:{configurable:!0,value:iA},type:{configurable:!0,value:function(n){var t=n.data,i=cA(1);try{return t.value}finally{i.f()}}},props:{configurable:!0,get:function(){return{data:this}}},ref:{configurable:!0,value:null}});function Fo(n,t){return w.useMemo(function(){return ID(n,t)},i6)}function ch(n,t){var i=w.useRef(n);i.current=n,w.useEffect(function(){return rv(function(){return i.current()},t)},i6)}const o6=w.createContext(void 0),u6=()=>w.useContext(o6),fA=(n,t)=>{const{name:i,value:s,checked:u=!1,partial:c=!1,readOnly:f=!1,onChange:p,children:m,className:S}=n,[b,_]=w.useState(i),[x,D]=w.useState(f),A=w.useRef(void 0),N=w.useRef(void 0),O=w.useRef(void 0),R=w.useRef(void 0),U=w.useRef(void 0),j=w.useRef(void 0),G=u6(),k=F1(),et=w.useId(),ft=w.useMemo(()=>k?.sharedId||n.id||et,[k?.sharedId,n.id,et]),[I,it,J]=JD({checked:!1,partial:!1}),St=Q4(u),nt=Q4(c);w.useEffect(()=>{if(I.initial)it({checked:c?!1:u,partial:c});else{const Q=St.changed?u:I.value.checked,K=nt.changed?c:I.value.partial;it({checked:K?!1:Q,partial:K})}},[u,c]),w.useEffect(()=>{D(f)},[f]),w.useEffect(()=>{G&&(A.current=G.nameSignal,N.current=G.valueSignal,O.current=G.readOnlySignal,R.current=G.useComparator,U.current=G.compare,j.current=G.onCheckboxChange)},[G]),ch(()=>{if(N.current)if(R.current?.value&&U.current){const Q=U.current,K=N.current.value?.some(pt=>Q(s,pt))??!1;it(pt=>({...pt,checked:K}))}else{const Q=N.current.value?.some(K=>s===K)??!1;it(K=>({...K,checked:Q}))}}),ch(()=>{A.current&&_(A.current.value)}),ch(()=>{O.current&&D(O.current.value??!1)});const ht=e0(Q=>{const K=J.current?.value.partial===!0?!0:Q.target.checked;it({checked:K,partial:!1}),j.current?j.current({originalEvent:Q,name:b,value:s,checked:K}):p?.({originalEvent:Q,name:b,value:s,checked:K})}),yt=Q=>{const K={checked:Q?!1:J.current?.value.checked??!1,partial:Q};it(K)},tt=Q=>{it({checked:Q,partial:!1})};w.useImperativeHandle(t,()=>({setPartiallyChecked:yt,setChecked:tt}));const H=b&&Ja.jsx(av,{id:ft,name:b,type:"checkbox",checked:I.value.checked,readOnly:x,onChange:ht});return n0({wrapperElement:"label",renderProps:{...I.value,readOnly:x},elementProps:{htmlFor:ft},className:S,innerWrapperElement:H,children:m})},c6=w.memo(w.forwardRef(fA)),hA=(n,t)=>n&&t&&typeof n=="object"&&typeof t=="object"&&"value"in n&&"value"in t?n.value===t.value:n===t,f6=(n=hA)=>e0((t,i)=>{if(typeof n=="string"){const s=n;return t?.[s]===i?.[s]}return n(t,i)}),h6=({props:n,children:t})=>Ja.jsx(o6.Provider,{value:n,children:t}),dA=({name:n,value:t,comparator:i,readOnly:s=!1,onChange:u,className:c,children:f})=>{const p=Fo(),m=Fo(),S=Fo(),b=Fo(),_=f6(i),x=e0(A=>{if(A){const{checked:N}=A,O=A.value;if(m.value)if(i)if(N)m.value.findIndex(R=>_(O,R))===-1&&m.value.push(O);else{const R=m.value.filter(U=>!_(O,U));m.value=[...R]}else if(N)m.value.indexOf(O)===-1&&m.value.push(O);else{const R=m.value.filter(U=>U!==O);m.value=[...R]}else N&&(m.value=[O])}u?.({originalEvent:A?.originalEvent,name:n,value:m.value})}),D=w.useMemo(()=>({nameSignal:p,valueSignal:m,readOnlySignal:S,useComparator:b,compare:_,onCheckboxChange:x}),[]);return w.useEffect(()=>{p.value=n},[n]),w.useEffect(()=>{m.value=t},[t]),w.useEffect(()=>{S.value=s},[s]),w.useEffect(()=>{b.value=i!==void 0},[i]),Ja.jsx("div",{className:c,children:Ja.jsx(h6,{props:D,children:f})})},d6=w.memo(dA),fh=({className:n,children:t})=>{const i=w.useId(),s=w.useMemo(()=>({sharedId:i}),[i]),u=Ja.jsx(Z4.Provider,{value:s,children:t});return n0({wrapperElement:"div",className:n,children:u})},pA=({htmlFor:n,className:t,children:i})=>{const s=F1(),u=w.useMemo(()=>s?.sharedId||n,[s?.sharedId,n]);return n0({wrapperElement:"label",elementProps:{htmlFor:u},className:t,children:i})};var p6={exports:{}},m6;function mA(){return m6||(m6=1,(function(n){(function(){var t={}.hasOwnProperty;function i(){for(var c="",f=0;f<arguments.length;f++){var p=arguments[f];p&&(c=u(c,s(p)))}return c}function s(c){if(typeof c=="string"||typeof c=="number")return c;if(typeof c!="object")return"";if(Array.isArray(c))return i.apply(null,c);if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]"))return c.toString();var f="";for(var p in c)t.call(c,p)&&c[p]&&(f=u(f,p));return f}function u(c,f){return f?c?c+" "+f:c+f:c}n.exports?(i.default=i,n.exports=i):window.classNames=i})()})(p6)),p6.exports}mA();const gA=({intersectionObserver:n,resizeObserver:t,page:i,height:s,children:u})=>{const c=w.useRef(void 0);w.useEffect(()=>()=>{c.current&&(n?.unobserve(c.current),t?.unobserve(c.current))},[]),w.useEffect(()=>(c.current&&n?.observe(c.current),()=>{c.current&&n&&n.unobserve(c.current)}),[n]);const f=m=>{c.current&&(n?.unobserve(c.current),t?.unobserve(c.current)),n?.observe(m),t?.observe(m),c.current=m},p=s?{height:`${s}px`}:{};return Ja.jsx("div",{"data-page":i,"data-name":"page",style:p,ref:m=>{m&&f(m)},children:u})};w.memo(gA);const yA=({intersectionObserver:n,page:t})=>{const i=w.useRef(void 0);w.useEffect(()=>()=>{i.current&&n?.unobserve(i.current)},[]);const s=u=>{i.current&&n?.unobserve(i.current),n?.observe(u),i.current=u};return Ja.jsx("div",{"data-page":t,"data-name":"marker",ref:u=>{u&&s(u)}})};w.memo(yA);const vA=({name:n,value:t,comparator:i,readOnly:s=!1,onChange:u,className:c,children:f})=>{const p=Fo(),m=Fo(),S=Fo(),b=Fo(),_=f6(i),x=w.useMemo(()=>({nameSignal:p,valueSignal:m,readOnlySignal:S,useComparator:b,compare:_}),[]);w.useEffect(()=>{p.value=n},[n]),w.useEffect(()=>{m.value=t},[t]),w.useEffect(()=>{S.value=s},[s]),w.useEffect(()=>{b.value=i!==void 0},[i]);const D=e0(A=>{u?.({originalEvent:A,name:n,value:m.value})});return Ja.jsx("div",{className:c,onChange:D,children:Ja.jsx(h6,{props:x,children:f})})},g6=w.memo(vA),SA=({value:n,className:t,children:i})=>{const[s,u]=w.useState(),[c,f]=w.useState(!1),[p,m]=w.useState(!1),S=w.useRef(void 0),b=w.useRef(void 0),_=w.useRef(void 0),x=w.useRef(void 0),D=w.useRef(void 0),A=u6(),N=F1(),O=w.useId(),R=w.useMemo(()=>N?.sharedId||O,[N?.sharedId,O]);w.useEffect(()=>{A&&(S.current=A.nameSignal,b.current=A.valueSignal,_.current=A.readOnlySignal,x.current=A.useComparator,D.current=A.compare)},[A]),ch(()=>{x&&b.current&&D.current?f(D.current(n,b.current.value)):f(n===b.current?.value)}),ch(()=>{u(S.current?.value)}),ch(()=>{m(_.current?.value??!1)});const U=e0(j=>{j.target.checked&&b.current&&(b.current.value=n)});return n0({wrapperElement:"label",renderProps:{checked:c,readOnly:p},elementProps:{htmlFor:R},className:t,innerWrapperElement:s?Ja.jsx(av,{id:R,name:s,type:"radio",value:n,checked:c,readOnly:p,onChange:U}):null,children:i})},y6=w.memo(SA),bA=(n,t)=>{const{id:i,name:s,value:u,toggled:c=!1,readOnly:f,onChange:p,children:m,className:S}=n,[b,_]=w.useState(c),x=F1(),D=w.useId(),A=w.useMemo(()=>x?.sharedId||i||D,[x?.sharedId,i,D]);w.useEffect(()=>{_(c)},[c]);const N=R=>{_(R.target.checked),p?.({originalEvent:R,name:s,value:u,checked:R.target.checked})},O=R=>{_(R)};return w.useImperativeHandle(t,()=>({setToggled:O})),n0({wrapperElement:"label",renderProps:{toggled:b,readOnly:f},elementProps:{htmlFor:A},className:S,innerWrapperElement:Ja.jsx(av,{id:A,name:s,type:"checkbox",checked:b,readOnly:f,onChange:N}),children:m})},EA=w.memo(w.forwardRef(bA)),hv=n=>{const[t,i]=w.useState(!0),s=j4();return w.useEffect(()=>{s&&s.useAnimations!==void 0?i(s.useAnimations):n!==void 0&&i(n)},[s,n]),t},Pr=({label:n,htmlFor:t,readOnly:i=!1,className:s})=>{const u=Ee("bc-label",{"bsc:text-black bsc:dark:text-mono-light-1":!i,"bc-read-only bsc:text-gray-4 bsc:dark:text-mono-light-3 bsc:pointer-events-none":i},s);return X.jsx(pA,{htmlFor:t,className:u,children:n})},TA=(n,t)=>{const{name:i,label:s,value:u,readOnly:c=!1,checked:f=!1,partial:p=!1,labelLocation:m=Cs.Right,className:S,useAnimation:b,onChange:_}=n,x=hv(b),D=Ee("bc-checkbox-wrapper bsc:flex bsc:items-center bsc:group/wrapper bsc:*:cursor-pointer bsc:has-data-read-only:text-gray-4 bsc:dark:has-data-read-only:text-mono-light-3 bsc:has-data-read-only:pointer-events-none",S),A=Ee("bc-checkbox-label bsc:peer-data-read-only:text-gray-4 bsc:dark:peer-data-read-only:text-mono-light-3",{"bsc:ml-2":m===Cs.Right,"bsc:mr-2":m===Cs.Left}),N=$p(lh.FocusWithin),O=Ee("bc-checkbox-outer bsc:group/checkbox bsc:peer bsc:rounded bsc:*:block bsc:*:size-[21px]","bsc:inset-shadow-[0_0_0_1px] bsc:inset-shadow-gray-2 bsc:dark:inset-shadow-[0_0_0_1px] bsc:dark:inset-shadow-mono-light-2","bsc:group-hover/wrapper:not-data-checked:inset-shadow-[0_0_0_2px] bsc:group-hover/wrapper:not-data-checked:inset-shadow-gray-4","bsc:dark:group-hover/wrapper:not-data-checked:inset-shadow-[0_0_0_2px] bsc:[transition:box-shadow_0.3s]",N),R=Ee("bc-checkbox-svg bsc:rounded bsc:stroke-mono-light-1 bsc:stroke-2 bsc:[stroke-linecap:round]","bsc:[stroke-linejoin:round] bsc:dark:stroke-mono-dark-3 bsc:[transform:scale(0)]","bsc:group-data-checked/checkbox:group-data-read-only/checkbox:bg-primary-4 bsc:group-data-checked/checkbox:group-data-read-only/checkbox:fill-primary-4 bsc:group-data-partial/checkbox:group-data-read-only/checkbox:bg-primary-4 bsc:group-data-partial/checkbox:group-data-read-only/checkbox:fill-primary-4 bsc:dark:group-data-checked/checkbox:group-data-read-only/checkbox:bg-mono-light-3 bsc:dark:group-data-checked/checkbox:group-data-read-only/checkbox:fill-mono-light-3 bsc:dark:group-data-partial/checkbox:group-data-read-only/checkbox:bg-mono-light-3 bsc:dark:group-data-partial/checkbox:group-data-read-only/checkbox:fill-mono-light-3","bsc:group-data-checked/checkbox:group-not-data-read-only/checkbox:bg-primary-1 bsc:group-data-checked/checkbox:group-not-data-read-only/checkbox:fill-primary-1 bsc:group-data-partial/checkbox:bg-primary-1 bsc:group-data-partial/checkbox:fill-primary-1 bsc:dark:group-data-checked/checkbox:bg-mono-light-1 bsc:dark:group-data-checked/checkbox:fill-mono-light-1 bsc:dark:group-data-partial/checkbox:bg-mono-light-1 bsc:dark:group-data-partial/checkbox:fill-mono-light-1",{"bsc:group-data-checked/checkbox:group-not-data-read-only/checkbox:animate-bounce bsc:group-data-partial/checkbox:group-not-data-read-only/checkbox:animate-bounce bsc:group-data-checked/checkbox:group-data-read-only/checkbox:[transform:scale(1)] bsc:group-data-partial/checkbox:group-data-read-only/checkbox:[transform:scale(1)]":x,"bsc:group-data-checked/checkbox:[transform:scale(1)] bsc:group-data-partial/checkbox:[transform:scale(1)]":!x});return X.jsxs(fh,{className:D,children:[s&&m===Cs.Left&&X.jsx(Pr,{label:s,readOnly:c,className:A}),X.jsx(c6,{ref:t,name:i,value:u,checked:f,partial:p,readOnly:c,className:O,onChange:_,children:X.jsxs("svg",{viewBox:"0 0 21 21",className:R,children:[X.jsx("polyline",{className:"bsc:[visibility:hidden] bsc:group-data-checked/checkbox:visible",points:"5 10.75 8.5 14.25 16 6"}),X.jsx("polyline",{className:"bsc:[visibility:hidden] bsc:group-data-partial/checkbox:visible",points:"6 10.5 16 10.5"})]})}),s&&m===Cs.Right&&X.jsx(Pr,{label:s,readOnly:c,className:A})]})},v6=w.memo(w.forwardRef(TA)),CA=({name:n,label:t,value:i,data:s,textField:u,valueField:c,readOnly:f=!1,orientation:p=Za.Vertical,className:m,onChange:S})=>{const[b,_]=w.useState([]),x=tv(()=>s,[s]);w.useEffect(()=>{_(i??[])},[i]);const D=U=>{if(U){const{value:j}=U;_(j??[]),S?.({name:n,value:j})}},A=(U,j)=>X.jsx(v6,{label:U[u],value:U[c],className:"bsc:mr-3"},`${n}_checkbox_${j}`),N=Ee("bsc:flex bsc:flex-col bsc:gap-1",m),O=Ee("bsc:flex bsc:gap-1",{"bsc:flex-col":p===Za.Vertical}),R=U=>X.jsx(d6,{name:n,value:b,readOnly:f,onChange:D,className:O,children:U.map(A)});return X.jsxs("div",{className:N,children:[t&&X.jsx(Pr,{label:t,readOnly:f}),x&&R(x)]})},_A=w.memo(CA);var S6=typeof global=="object"&&global&&global.Object===Object&&global,xA=typeof self=="object"&&self&&self.Object===Object&&self,fl=S6||xA||Function("return this")(),hh=fl.Symbol,b6=Object.prototype,DA=b6.hasOwnProperty,AA=b6.toString,i0=hh?hh.toStringTag:void 0;function MA(n){var t=DA.call(n,i0),i=n[i0];try{n[i0]=void 0;var s=!0}catch{}var u=AA.call(n);return s&&(t?n[i0]=i:delete n[i0]),u}var NA=Object.prototype,OA=NA.toString;function RA(n){return OA.call(n)}var zA="[object Null]",HA="[object Undefined]",E6=hh?hh.toStringTag:void 0;function dh(n){return n==null?n===void 0?HA:zA:E6&&E6 in Object(n)?MA(n):RA(n)}function ph(n){return n!=null&&typeof n=="object"}var wA="[object Symbol]";function UA(n){return typeof n=="symbol"||ph(n)&&dh(n)==wA}var dv=Array.isArray,BA=/\s/;function VA(n){for(var t=n.length;t--&&BA.test(n.charAt(t)););return t}var GA=/^\s+/;function jA(n){return n&&n.slice(0,VA(n)+1).replace(GA,"")}function ko(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}var T6=NaN,LA=/^[-+]0x[0-9a-f]+$/i,PA=/^0b[01]+$/i,YA=/^0o[0-7]+$/i,qA=parseInt;function C6(n){if(typeof n=="number")return n;if(UA(n))return T6;if(ko(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=ko(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=jA(n);var i=PA.test(n);return i||YA.test(n)?qA(n.slice(2),i?2:8):LA.test(n)?T6:+n}var XA="[object AsyncFunction]",KA="[object Function]",QA="[object GeneratorFunction]",ZA="[object Proxy]";function _6(n){if(!ko(n))return!1;var t=dh(n);return t==KA||t==QA||t==XA||t==ZA}var pv=fl["__core-js_shared__"],x6=(function(){var n=/[^.]+$/.exec(pv&&pv.keys&&pv.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function JA(n){return!!x6&&x6 in n}var FA=Function.prototype,kA=FA.toString;function gc(n){if(n!=null){try{return kA.call(n)}catch{}try{return n+""}catch{}}return""}var IA=/[\\^$.*+?()[\]{}|]/g,WA=/^\[object .+?Constructor\]$/,$A=Function.prototype,tM=Object.prototype,eM=$A.toString,nM=tM.hasOwnProperty,aM=RegExp("^"+eM.call(nM).replace(IA,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function iM(n){if(!ko(n)||JA(n))return!1;var t=_6(n)?aM:WA;return t.test(gc(n))}function sM(n,t){return n?.[t]}function yc(n,t){var i=sM(n,t);return iM(i)?i:void 0}var mv=yc(fl,"WeakMap"),D6=Object.create,lM=(function(){function n(){}return function(t){if(!ko(t))return{};if(D6)return D6(t);n.prototype=t;var i=new n;return n.prototype=void 0,i}})(),A6=(function(){try{var n=yc(Object,"defineProperty");return n({},"",{}),n}catch{}})();function rM(n,t){for(var i=-1,s=n==null?0:n.length;++i<s&&t(n[i],i,n)!==!1;);return n}var oM=9007199254740991,uM=/^(?:0|[1-9]\d*)$/;function cM(n,t){var i=typeof n;return t=t??oM,!!t&&(i=="number"||i!="symbol"&&uM.test(n))&&n>-1&&n%1==0&&n<t}function fM(n,t,i){t=="__proto__"&&A6?A6(n,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[t]=i}function M6(n,t){return n===t||n!==n&&t!==t}var hM=Object.prototype,dM=hM.hasOwnProperty;function pM(n,t,i){var s=n[t];(!(dM.call(n,t)&&M6(s,i))||i===void 0&&!(t in n))&&fM(n,t,i)}var mM=9007199254740991;function N6(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=mM}function gM(n){return n!=null&&N6(n.length)&&!_6(n)}var yM=Object.prototype;function O6(n){var t=n&&n.constructor,i=typeof t=="function"&&t.prototype||yM;return n===i}function vM(n,t){for(var i=-1,s=Array(n);++i<n;)s[i]=t(i);return s}var SM="[object Arguments]";function R6(n){return ph(n)&&dh(n)==SM}var z6=Object.prototype,bM=z6.hasOwnProperty,EM=z6.propertyIsEnumerable,TM=R6((function(){return arguments})())?R6:function(n){return ph(n)&&bM.call(n,"callee")&&!EM.call(n,"callee")};function CM(){return!1}var H6=typeof ne=="object"&&ne&&!ne.nodeType&&ne,w6=H6&&typeof module=="object"&&module&&!module.nodeType&&module,_M=w6&&w6.exports===H6,U6=_M?fl.Buffer:void 0,xM=U6?U6.isBuffer:void 0,B6=xM||CM,DM="[object Arguments]",AM="[object Array]",MM="[object Boolean]",NM="[object Date]",OM="[object Error]",RM="[object Function]",zM="[object Map]",HM="[object Number]",wM="[object Object]",UM="[object RegExp]",BM="[object Set]",VM="[object String]",GM="[object WeakMap]",jM="[object ArrayBuffer]",LM="[object DataView]",PM="[object Float32Array]",YM="[object Float64Array]",qM="[object Int8Array]",XM="[object Int16Array]",KM="[object Int32Array]",QM="[object Uint8Array]",ZM="[object Uint8ClampedArray]",JM="[object Uint16Array]",FM="[object Uint32Array]",un={};un[PM]=un[YM]=un[qM]=un[XM]=un[KM]=un[QM]=un[ZM]=un[JM]=un[FM]=!0,un[DM]=un[AM]=un[jM]=un[MM]=un[LM]=un[NM]=un[OM]=un[RM]=un[zM]=un[HM]=un[wM]=un[UM]=un[BM]=un[VM]=un[GM]=!1;function kM(n){return ph(n)&&N6(n.length)&&!!un[dh(n)]}function gv(n){return function(t){return n(t)}}var V6=typeof ne=="object"&&ne&&!ne.nodeType&&ne,s0=V6&&typeof module=="object"&&module&&!module.nodeType&&module,IM=s0&&s0.exports===V6,yv=IM&&S6.process,mh=(function(){try{var n=s0&&s0.require&&s0.require("util").types;return n||yv&&yv.binding&&yv.binding("util")}catch{}})(),G6=mh&&mh.isTypedArray,WM=G6?gv(G6):kM,$M=Object.prototype,tN=$M.hasOwnProperty;function eN(n,t){var i=dv(n),s=!i&&TM(n),u=!i&&!s&&B6(n),c=!i&&!s&&!u&&WM(n),f=i||s||u||c,p=f?vM(n.length,String):[],m=p.length;for(var S in n)tN.call(n,S)&&!(f&&(S=="length"||u&&(S=="offset"||S=="parent")||c&&(S=="buffer"||S=="byteLength"||S=="byteOffset")||cM(S,m)))&&p.push(S);return p}function j6(n,t){return function(i){return n(t(i))}}var nN=j6(Object.keys,Object),aN=Object.prototype,iN=aN.hasOwnProperty;function sN(n){if(!O6(n))return nN(n);var t=[];for(var i in Object(n))iN.call(n,i)&&i!="constructor"&&t.push(i);return t}function lN(n){return gM(n)?eN(n):sN(n)}var l0=yc(Object,"create");function rN(){this.__data__=l0?l0(null):{},this.size=0}function oN(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}var uN="__lodash_hash_undefined__",cN=Object.prototype,fN=cN.hasOwnProperty;function hN(n){var t=this.__data__;if(l0){var i=t[n];return i===uN?void 0:i}return fN.call(t,n)?t[n]:void 0}var dN=Object.prototype,pN=dN.hasOwnProperty;function mN(n){var t=this.__data__;return l0?t[n]!==void 0:pN.call(t,n)}var gN="__lodash_hash_undefined__";function yN(n,t){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=l0&&t===void 0?gN:t,this}function vc(n){var t=-1,i=n==null?0:n.length;for(this.clear();++t<i;){var s=n[t];this.set(s[0],s[1])}}vc.prototype.clear=rN,vc.prototype.delete=oN,vc.prototype.get=hN,vc.prototype.has=mN,vc.prototype.set=yN;function vN(){this.__data__=[],this.size=0}function I1(n,t){for(var i=n.length;i--;)if(M6(n[i][0],t))return i;return-1}var SN=Array.prototype,bN=SN.splice;function EN(n){var t=this.__data__,i=I1(t,n);if(i<0)return!1;var s=t.length-1;return i==s?t.pop():bN.call(t,i,1),--this.size,!0}function TN(n){var t=this.__data__,i=I1(t,n);return i<0?void 0:t[i][1]}function CN(n){return I1(this.__data__,n)>-1}function _N(n,t){var i=this.__data__,s=I1(i,n);return s<0?(++this.size,i.push([n,t])):i[s][1]=t,this}function Yr(n){var t=-1,i=n==null?0:n.length;for(this.clear();++t<i;){var s=n[t];this.set(s[0],s[1])}}Yr.prototype.clear=vN,Yr.prototype.delete=EN,Yr.prototype.get=TN,Yr.prototype.has=CN,Yr.prototype.set=_N;var r0=yc(fl,"Map");function xN(){this.size=0,this.__data__={hash:new vc,map:new(r0||Yr),string:new vc}}function DN(n){var t=typeof n;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?n!=="__proto__":n===null}function W1(n,t){var i=n.__data__;return DN(t)?i[typeof t=="string"?"string":"hash"]:i.map}function AN(n){var t=W1(this,n).delete(n);return this.size-=t?1:0,t}function MN(n){return W1(this,n).get(n)}function NN(n){return W1(this,n).has(n)}function ON(n,t){var i=W1(this,n),s=i.size;return i.set(n,t),this.size+=i.size==s?0:1,this}function gh(n){var t=-1,i=n==null?0:n.length;for(this.clear();++t<i;){var s=n[t];this.set(s[0],s[1])}}gh.prototype.clear=xN,gh.prototype.delete=AN,gh.prototype.get=MN,gh.prototype.has=NN,gh.prototype.set=ON;function RN(n,t){for(var i=-1,s=t.length,u=n.length;++i<s;)n[u+i]=t[i];return n}var zN=j6(Object.getPrototypeOf,Object);function HN(){this.__data__=new Yr,this.size=0}function wN(n){var t=this.__data__,i=t.delete(n);return this.size=t.size,i}function UN(n){return this.__data__.get(n)}function BN(n){return this.__data__.has(n)}var VN=200;function GN(n,t){var i=this.__data__;if(i instanceof Yr){var s=i.__data__;if(!r0||s.length<VN-1)return s.push([n,t]),this.size=++i.size,this;i=this.__data__=new gh(s)}return i.set(n,t),this.size=i.size,this}function yh(n){var t=this.__data__=new Yr(n);this.size=t.size}yh.prototype.clear=HN,yh.prototype.delete=wN,yh.prototype.get=UN,yh.prototype.has=BN,yh.prototype.set=GN;var L6=typeof ne=="object"&&ne&&!ne.nodeType&&ne,P6=L6&&typeof module=="object"&&module&&!module.nodeType&&module,jN=P6&&P6.exports===L6,Y6=jN?fl.Buffer:void 0;Y6&&Y6.allocUnsafe;function LN(n,t){return n.slice()}function PN(n,t){for(var i=-1,s=n==null?0:n.length,u=0,c=[];++i<s;){var f=n[i];t(f,i,n)&&(c[u++]=f)}return c}function YN(){return[]}var qN=Object.prototype,XN=qN.propertyIsEnumerable,q6=Object.getOwnPropertySymbols,KN=q6?function(n){return n==null?[]:(n=Object(n),PN(q6(n),function(t){return XN.call(n,t)}))}:YN;function QN(n,t,i){var s=t(n);return dv(n)?s:RN(s,i(n))}function ZN(n){return QN(n,lN,KN)}var vv=yc(fl,"DataView"),Sv=yc(fl,"Promise"),bv=yc(fl,"Set"),X6="[object Map]",JN="[object Object]",K6="[object Promise]",Q6="[object Set]",Z6="[object WeakMap]",J6="[object DataView]",FN=gc(vv),kN=gc(r0),IN=gc(Sv),WN=gc(bv),$N=gc(mv),qr=dh;(vv&&qr(new vv(new ArrayBuffer(1)))!=J6||r0&&qr(new r0)!=X6||Sv&&qr(Sv.resolve())!=K6||bv&&qr(new bv)!=Q6||mv&&qr(new mv)!=Z6)&&(qr=function(n){var t=dh(n),i=t==JN?n.constructor:void 0,s=i?gc(i):"";if(s)switch(s){case FN:return J6;case kN:return X6;case IN:return K6;case WN:return Q6;case $N:return Z6}return t});var tO=Object.prototype,eO=tO.hasOwnProperty;function nO(n){var t=n.length,i=new n.constructor(t);return t&&typeof n[0]=="string"&&eO.call(n,"index")&&(i.index=n.index,i.input=n.input),i}var F6=fl.Uint8Array;function Ev(n){var t=new n.constructor(n.byteLength);return new F6(t).set(new F6(n)),t}function aO(n,t){var i=Ev(n.buffer);return new n.constructor(i,n.byteOffset,n.byteLength)}var iO=/\w*$/;function sO(n){var t=new n.constructor(n.source,iO.exec(n));return t.lastIndex=n.lastIndex,t}var k6=hh?hh.prototype:void 0,I6=k6?k6.valueOf:void 0;function lO(n){return I6?Object(I6.call(n)):{}}function rO(n,t){var i=Ev(n.buffer);return new n.constructor(i,n.byteOffset,n.length)}var oO="[object Boolean]",uO="[object Date]",cO="[object Map]",fO="[object Number]",hO="[object RegExp]",dO="[object Set]",pO="[object String]",mO="[object Symbol]",gO="[object ArrayBuffer]",yO="[object DataView]",vO="[object Float32Array]",SO="[object Float64Array]",bO="[object Int8Array]",EO="[object Int16Array]",TO="[object Int32Array]",CO="[object Uint8Array]",_O="[object Uint8ClampedArray]",xO="[object Uint16Array]",DO="[object Uint32Array]";function AO(n,t,i){var s=n.constructor;switch(t){case gO:return Ev(n);case oO:case uO:return new s(+n);case yO:return aO(n);case vO:case SO:case bO:case EO:case TO:case CO:case _O:case xO:case DO:return rO(n);case cO:return new s;case fO:case pO:return new s(n);case hO:return sO(n);case dO:return new s;case mO:return lO(n)}}function MO(n){return typeof n.constructor=="function"&&!O6(n)?lM(zN(n)):{}}var NO="[object Map]";function OO(n){return ph(n)&&qr(n)==NO}var W6=mh&&mh.isMap,RO=W6?gv(W6):OO,zO="[object Set]";function HO(n){return ph(n)&&qr(n)==zO}var $6=mh&&mh.isSet,wO=$6?gv($6):HO,tb="[object Arguments]",UO="[object Array]",BO="[object Boolean]",VO="[object Date]",GO="[object Error]",eb="[object Function]",jO="[object GeneratorFunction]",LO="[object Map]",PO="[object Number]",nb="[object Object]",YO="[object RegExp]",qO="[object Set]",XO="[object String]",KO="[object Symbol]",QO="[object WeakMap]",ZO="[object ArrayBuffer]",JO="[object DataView]",FO="[object Float32Array]",kO="[object Float64Array]",IO="[object Int8Array]",WO="[object Int16Array]",$O="[object Int32Array]",tR="[object Uint8Array]",eR="[object Uint8ClampedArray]",nR="[object Uint16Array]",aR="[object Uint32Array]",Ie={};Ie[tb]=Ie[UO]=Ie[ZO]=Ie[JO]=Ie[BO]=Ie[VO]=Ie[FO]=Ie[kO]=Ie[IO]=Ie[WO]=Ie[$O]=Ie[LO]=Ie[PO]=Ie[nb]=Ie[YO]=Ie[qO]=Ie[XO]=Ie[KO]=Ie[tR]=Ie[eR]=Ie[nR]=Ie[aR]=!0,Ie[GO]=Ie[eb]=Ie[QO]=!1;function $1(n,t,i,s,u,c){var f;if(f!==void 0)return f;if(!ko(n))return n;var p=dv(n);if(p)f=nO(n);else{var m=qr(n),S=m==eb||m==jO;if(B6(n))return LN(n);if(m==nb||m==tb||S&&!u)f=S?{}:MO(n);else{if(!Ie[m])return u?n:{};f=AO(n,m)}}c||(c=new yh);var b=c.get(n);if(b)return b;c.set(n,f),wO(n)?n.forEach(function(D){f.add($1(D,t,i,D,n,c))}):RO(n)&&n.forEach(function(D,A){f.set(A,$1(D,t,i,A,n,c))});var _=ZN,x=p?void 0:_(n);return rM(x||n,function(D,A){x&&(A=D,D=n[A]),pM(f,A,$1(D,t,i,A,n,c))}),f}var iR=1,sR=4;function lR(n){return $1(n,iR|sR)}var Tv=function(){return fl.Date.now()},rR="Expected a function",oR=Math.max,uR=Math.min;function o0(n,t,i){var s,u,c,f,p,m,S=0,b=!1,_=!1,x=!0;if(typeof n!="function")throw new TypeError(rR);t=C6(t)||0,ko(i)&&(b=!!i.leading,_="maxWait"in i,c=_?oR(C6(i.maxWait)||0,t):c,x="trailing"in i?!!i.trailing:x);function D(et){var ft=s,I=u;return s=u=void 0,S=et,f=n.apply(I,ft),f}function A(et){return S=et,p=setTimeout(R,t),b?D(et):f}function N(et){var ft=et-m,I=et-S,it=t-ft;return _?uR(it,c-I):it}function O(et){var ft=et-m,I=et-S;return m===void 0||ft>=t||ft<0||_&&I>=c}function R(){var et=Tv();if(O(et))return U(et);p=setTimeout(R,N(et))}function U(et){return p=void 0,x&&s?D(et):(s=u=void 0,f)}function j(){p!==void 0&&clearTimeout(p),S=0,s=m=u=p=void 0}function G(){return p===void 0?f:U(Tv())}function k(){var et=Tv(),ft=O(et);if(s=arguments,u=this,m=et,ft){if(p===void 0)return A(m);if(_)return clearTimeout(p),p=setTimeout(R,t),D(m)}return p===void 0&&(p=setTimeout(R,t)),f}return k.cancel=j,k.flush=G,k}var cR="Expected a function";function fR(n,t,i){var s=!0,u=!0;if(typeof n!="function")throw new TypeError(cR);return ko(i)&&(s="leading"in i?!0:s,u="trailing"in i?!!i.trailing:u),o0(n,t,{leading:s,maxWait:t,trailing:u})}const hR=(n,t)=>{const{value:i,readOnly:s=!1,debounceTime:u=800,fillContainer:c=!0,leftElement:f,rightElement:p,className:m,leftElementClassName:S,rightElementClassName:b,isSingleLine:_=!0,allowSingleLineScroll:x=!1,inputMode:D,placeholder:A,onFocus:N,onBlur:O,onInput:R,onKeyDown:U,onInnerTextChange:j,onInnerHTMLChange:G,onElementCreate:k,onLeftElementClick:et,onRightElementClick:ft}=n,I=w.useRef("bsc:grow bsc:focus:outline-hidden"),it=w.useRef("bsc:text-gray-4"),J=w.useRef(void 0),St=Lr(Vt=>{const se=Vt.target,Ke=se.innerHTML;se.className=`${I.current}`,A&&Ke===A&&(se.innerHTML=""),N?.(Vt)}),nt=Lr(Vt=>{const se=Vt.target.innerHTML;if(A&&se===""){const Ke=Vt.target;Ke.innerHTML=A,Ke.className=`${I.current} ${it.current}`}O?.(Vt)}),ht=w.useCallback(Vt=>{J.current?.removeEventListener("focus",St),J.current?.removeEventListener("blur",nt),A&&Vt&&Vt!==document.activeElement&&Vt.innerHTML===""&&(Vt.innerHTML=A,Vt.className=`${I.current} ${it.current}`),Vt.addEventListener("focus",St),Vt.addEventListener("blur",nt),J.current=Vt},[A]),yt=w.useCallback(Vt=>{k?.(Vt)},[k]),tt=Vt=>{et?.(Vt)},H=Vt=>{ft?.(Vt)},Q=o0(Vt=>{R?.(Vt),j?.(Vt.target.innerText),G?.(Vt.target.innerHTML)},u),K=Lr(Vt=>{U?.(Vt.nativeEvent),Vt.key==="Enter"&&Vt.preventDefault()}),pt=w.useCallback(Vt=>{J.current&&(J.current.innerText=Vt)},[]),dt=w.useCallback(Vt=>{J.current&&(J.current.innerHTML=Vt)},[]),$=w.useCallback(()=>{J.current?.focus()},[]);w.useImperativeHandle(t,()=>({inputElement:J.current,setInnerText:pt,setInnerHTML:dt,focus:$}));const Et={};_&&(Et.onKeyDown=K);const Rt=Ee({"bsc:w-full ":c},"bsc:flex bsc:flex-row bsc:items-center bsc:shadow-sm bsc:border bsc:border-solid bsc:border-gray-3 bsc:dark:border-white bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1 bsc:rounded-md bsc:p-2",{"bsc:overflow-x-auto bsc:overflow-y-hidden bsc:whitespace-pre":_&&x,"bsc:overflow-hidden bsc:whitespace-pre":_&&!x},m),qt=Ee("bsc:shrink",{"bsc:mr-2":f},S),Bt=Ee("bsc:shrink",{"bsc:ml-2":p},b);return X.jsxs("div",{className:Rt,ref:Vt=>{Vt&&yt(Vt)},children:[f&&X.jsx("div",{className:qt,onClick:tt,children:f}),X.jsx("div",{ref:Vt=>{Vt&&ht(Vt)},className:I.current,contentEditable:!s,suppressContentEditableWarning:!0,inputMode:D,onInput:Q,...Et,children:i}),p&&X.jsx("div",{className:Bt,onClick:H,children:p})]})},tg=w.forwardRef(hR);function He(n){const t=Object.prototype.toString.call(n);return n instanceof Date||typeof n=="object"&&t==="[object Date]"?new n.constructor(+n):typeof n=="number"||t==="[object Number]"||typeof n=="string"||t==="[object String]"?new Date(n):new Date(NaN)}function We(n,t){return n instanceof Date?new n.constructor(t):new Date(t)}function vh(n,t){const i=He(n);return isNaN(t)?We(n,NaN):(t&&i.setDate(i.getDate()+t),i)}function Io(n,t){const i=He(n);if(isNaN(t))return We(n,NaN);if(!t)return i;const s=i.getDate(),u=We(n,i.getTime());u.setMonth(i.getMonth()+t+1,0);const c=u.getDate();return s>=c?u:(i.setFullYear(u.getFullYear(),u.getMonth(),s),i)}const ab=6048e5,Cv=6e4,_v=36e5,dR=1e3;let pR={};function u0(){return pR}function Wo(n,t){const i=u0(),s=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,u=He(n),c=u.getDay(),f=(c<s?7:0)+c-s;return u.setDate(u.getDate()-f),u.setHours(0,0,0,0),u}function Sh(n){return Wo(n,{weekStartsOn:1})}function mR(n){const t=He(n),i=t.getFullYear(),s=We(n,0);s.setFullYear(i+1,0,4),s.setHours(0,0,0,0);const u=Sh(s),c=We(n,0);c.setFullYear(i,0,4),c.setHours(0,0,0,0);const f=Sh(c);return t.getTime()>=u.getTime()?i+1:t.getTime()>=f.getTime()?i:i-1}function ib(n){const t=He(n);return t.setHours(0,0,0,0),t}function sb(n){const t=He(n),i=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return i.setUTCFullYear(t.getFullYear()),+n-+i}function gR(n){const t=mR(n),i=We(n,0);return i.setFullYear(t,0,4),i.setHours(0,0,0,0),Sh(i)}function c0(n,t){return Io(n,t*12)}function lb(n,t){const i=ib(n),s=ib(t);return+i==+s}function yR(n){const t=He(n),i=t.getMonth();return t.setFullYear(t.getFullYear(),i+1,0),t.setHours(23,59,59,999),t}function vR(n,t){const i=He(n.start),s=He(n.end);let u=+i>+s;const c=u?+i:+s,f=u?s:i;f.setHours(0,0,0,0);let p=1;const m=[];for(;+f<=c;)m.push(He(f)),f.setDate(f.getDate()+p),f.setHours(0,0,0,0);return u?m.reverse():m}function rb(n){const t=He(n);return t.setDate(1),t.setHours(0,0,0,0),t}function SR(n,t){const i=He(n.start),s=He(n.end);let u=+i>+s;const c=u?+i:+s,f=u?s:i;f.setHours(0,0,0,0),f.setMonth(0,1);let p=1;const m=[];for(;+f<=c;)m.push(He(f)),f.setFullYear(f.getFullYear()+p);return u?m.reverse():m}const bR={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ER=(n,t,i)=>{let s;const u=bR[n];return typeof u=="string"?s=u:t===1?s=u.one:s=u.other.replace("{{count}}",t.toString()),i?.addSuffix?i.comparison&&i.comparison>0?"in "+s:s+" ago":s};function xv(n){return(t={})=>{const i=t.width?String(t.width):n.defaultWidth;return n.formats[i]||n.formats[n.defaultWidth]}}const TR={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},CR={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},_R={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xR={date:xv({formats:TR,defaultWidth:"full"}),time:xv({formats:CR,defaultWidth:"full"}),dateTime:xv({formats:_R,defaultWidth:"full"})},DR={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},AR=(n,t,i,s)=>DR[n];function f0(n){return(t,i)=>{const s=i?.context?String(i.context):"standalone";let u;if(s==="formatting"&&n.formattingValues){const f=n.defaultFormattingWidth||n.defaultWidth,p=i?.width?String(i.width):f;u=n.formattingValues[p]||n.formattingValues[f]}else{const f=n.defaultWidth,p=i?.width?String(i.width):n.defaultWidth;u=n.values[p]||n.values[f]}const c=n.argumentCallback?n.argumentCallback(t):t;return u[c]}}const MR={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},NR={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},OR={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},RR={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},zR={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},HR={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},wR={ordinalNumber:(n,t)=>{const i=Number(n),s=i%100;if(s>20||s<10)switch(s%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:f0({values:MR,defaultWidth:"wide"}),quarter:f0({values:NR,defaultWidth:"wide",argumentCallback:n=>n-1}),month:f0({values:OR,defaultWidth:"wide"}),day:f0({values:RR,defaultWidth:"wide"}),dayPeriod:f0({values:zR,defaultWidth:"wide",formattingValues:HR,defaultFormattingWidth:"wide"})};function h0(n){return(t,i={})=>{const s=i.width,u=s&&n.matchPatterns[s]||n.matchPatterns[n.defaultMatchWidth],c=t.match(u);if(!c)return null;const f=c[0],p=s&&n.parsePatterns[s]||n.parsePatterns[n.defaultParseWidth],m=Array.isArray(p)?BR(p,_=>_.test(f)):UR(p,_=>_.test(f));let S;S=n.valueCallback?n.valueCallback(m):m,S=i.valueCallback?i.valueCallback(S):S;const b=t.slice(f.length);return{value:S,rest:b}}}function UR(n,t){for(const i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&t(n[i]))return i}function BR(n,t){for(let i=0;i<n.length;i++)if(t(n[i]))return i}function VR(n){return(t,i={})=>{const s=t.match(n.matchPattern);if(!s)return null;const u=s[0],c=t.match(n.parsePattern);if(!c)return null;let f=n.valueCallback?n.valueCallback(c[0]):c[0];f=i.valueCallback?i.valueCallback(f):f;const p=t.slice(u.length);return{value:f,rest:p}}}const GR=/^(\d+)(th|st|nd|rd)?/i,jR=/\d+/i,LR={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},PR={any:[/^b/i,/^(a|c)/i]},YR={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},qR={any:[/1/i,/2/i,/3/i,/4/i]},XR={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},KR={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},QR={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ZR={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},JR={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},FR={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},kR={ordinalNumber:VR({matchPattern:GR,parsePattern:jR,valueCallback:n=>parseInt(n,10)}),era:h0({matchPatterns:LR,defaultMatchWidth:"wide",parsePatterns:PR,defaultParseWidth:"any"}),quarter:h0({matchPatterns:YR,defaultMatchWidth:"wide",parsePatterns:qR,defaultParseWidth:"any",valueCallback:n=>n+1}),month:h0({matchPatterns:XR,defaultMatchWidth:"wide",parsePatterns:KR,defaultParseWidth:"any"}),day:h0({matchPatterns:QR,defaultMatchWidth:"wide",parsePatterns:ZR,defaultParseWidth:"any"}),dayPeriod:h0({matchPatterns:JR,defaultMatchWidth:"any",parsePatterns:FR,defaultParseWidth:"any"})},IR={code:"en-US",formatDistance:ER,formatLong:xR,formatRelative:AR,localize:wR,match:kR,options:{weekStartsOn:0,firstWeekContainsDate:1}};function WR(n){const t=He(n),i=+Sh(t)-+gR(t);return Math.round(i/ab)+1}function ob(n,t){const i=He(n),s=i.getFullYear(),u=u0(),c=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??u.firstWeekContainsDate??u.locale?.options?.firstWeekContainsDate??1,f=We(n,0);f.setFullYear(s+1,0,c),f.setHours(0,0,0,0);const p=Wo(f,t),m=We(n,0);m.setFullYear(s,0,c),m.setHours(0,0,0,0);const S=Wo(m,t);return i.getTime()>=p.getTime()?s+1:i.getTime()>=S.getTime()?s:s-1}function $R(n,t){const i=u0(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,u=ob(n,t),c=We(n,0);return c.setFullYear(u,0,s),c.setHours(0,0,0,0),Wo(c,t)}function tz(n,t){const i=He(n),s=+Wo(i,t)-+$R(i,t);return Math.round(s/ab)+1}const ub=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},cb=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},fb={p:cb,P:(n,t)=>{const i=n.match(/(P+)(p+)?/)||[],s=i[1],u=i[2];if(!u)return ub(n,t);let c;switch(s){case"P":c=t.dateTime({width:"short"});break;case"PP":c=t.dateTime({width:"medium"});break;case"PPP":c=t.dateTime({width:"long"});break;default:c=t.dateTime({width:"full"});break}return c.replace("{{date}}",ub(s,t)).replace("{{time}}",cb(u,t))}},ez=/^D+$/,nz=/^Y+$/,az=["D","DD","YY","YYYY"];function iz(n){return ez.test(n)}function sz(n){return nz.test(n)}function hb(n,t,i){const s=lz(n,t,i);if(console.warn(s),az.includes(n))throw new RangeError(s)}function lz(n,t,i){const s=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${s} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function Dv(n){return He(n).getDay()}function db(n){const t=He(n),i=t.getFullYear(),s=t.getMonth(),u=We(n,0);return u.setFullYear(i,s+1,0),u.setHours(0,0,0,0),u.getDate()}function rz(){return Object.assign({},u0())}function oz(n){let i=He(n).getDay();return i===0&&(i=7),i}function uz(n){const t=He(n),i=t.getMonth();return t.setFullYear(t.getFullYear(),i+1,0),t.setHours(0,0,0,0),t}function cz(n,t){const i=He(n),s=He(t);return+i<+s}function fz(n,t){const i=t instanceof Date?We(t,0):new t(0);return i.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),i.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),i}const hz=10;class pb{subPriority=0;validate(t,i){return!0}}class dz extends pb{constructor(t,i,s,u,c){super(),this.value=t,this.validateValue=i,this.setValue=s,this.priority=u,c&&(this.subPriority=c)}validate(t,i){return this.validateValue(t,this.value,i)}set(t,i,s){return this.setValue(t,i,this.value,s)}}class pz extends pb{priority=hz;subPriority=-1;set(t,i){return i.timestampIsSet?t:We(t,fz(t,Date))}}class we{run(t,i,s,u){const c=this.parse(t,i,s,u);return c?{setter:new dz(c.value,this.validate,this.set,this.priority,this.subPriority),rest:c.rest}:null}validate(t,i,s){return!0}}class mz extends we{priority=140;parse(t,i,s){switch(i){case"G":case"GG":case"GGG":return s.era(t,{width:"abbreviated"})||s.era(t,{width:"narrow"});case"GGGGG":return s.era(t,{width:"narrow"});default:return s.era(t,{width:"wide"})||s.era(t,{width:"abbreviated"})||s.era(t,{width:"narrow"})}}set(t,i,s){return i.era=s,t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const Qn={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Wl={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Zn(n,t){return n&&{value:t(n.value),rest:n.rest}}function _n(n,t){const i=t.match(n);return i?{value:parseInt(i[0],10),rest:t.slice(i[0].length)}:null}function $l(n,t){const i=t.match(n);if(!i)return null;if(i[0]==="Z")return{value:0,rest:t.slice(1)};const s=i[1]==="+"?1:-1,u=i[2]?parseInt(i[2],10):0,c=i[3]?parseInt(i[3],10):0,f=i[5]?parseInt(i[5],10):0;return{value:s*(u*_v+c*Cv+f*dR),rest:t.slice(i[0].length)}}function mb(n){return _n(Qn.anyDigitsSigned,n)}function Gn(n,t){switch(n){case 1:return _n(Qn.singleDigit,t);case 2:return _n(Qn.twoDigits,t);case 3:return _n(Qn.threeDigits,t);case 4:return _n(Qn.fourDigits,t);default:return _n(new RegExp("^\\d{1,"+n+"}"),t)}}function eg(n,t){switch(n){case 1:return _n(Qn.singleDigitSigned,t);case 2:return _n(Qn.twoDigitsSigned,t);case 3:return _n(Qn.threeDigitsSigned,t);case 4:return _n(Qn.fourDigitsSigned,t);default:return _n(new RegExp("^-?\\d{1,"+n+"}"),t)}}function Av(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function gb(n,t){const i=t>0,s=i?t:1-t;let u;if(s<=50)u=n||100;else{const c=s+50,f=Math.trunc(c/100)*100,p=n>=c%100;u=n+f-(p?100:0)}return i?u:1-u}function yb(n){return n%400===0||n%4===0&&n%100!==0}class gz extends we{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,i,s){const u=c=>({year:c,isTwoDigitYear:i==="yy"});switch(i){case"y":return Zn(Gn(4,t),u);case"yo":return Zn(s.ordinalNumber(t,{unit:"year"}),u);default:return Zn(Gn(i.length,t),u)}}validate(t,i){return i.isTwoDigitYear||i.year>0}set(t,i,s){const u=t.getFullYear();if(s.isTwoDigitYear){const f=gb(s.year,u);return t.setFullYear(f,0,1),t.setHours(0,0,0,0),t}const c=!("era"in i)||i.era===1?s.year:1-s.year;return t.setFullYear(c,0,1),t.setHours(0,0,0,0),t}}class yz extends we{priority=130;parse(t,i,s){const u=c=>({year:c,isTwoDigitYear:i==="YY"});switch(i){case"Y":return Zn(Gn(4,t),u);case"Yo":return Zn(s.ordinalNumber(t,{unit:"year"}),u);default:return Zn(Gn(i.length,t),u)}}validate(t,i){return i.isTwoDigitYear||i.year>0}set(t,i,s,u){const c=ob(t,u);if(s.isTwoDigitYear){const p=gb(s.year,c);return t.setFullYear(p,0,u.firstWeekContainsDate),t.setHours(0,0,0,0),Wo(t,u)}const f=!("era"in i)||i.era===1?s.year:1-s.year;return t.setFullYear(f,0,u.firstWeekContainsDate),t.setHours(0,0,0,0),Wo(t,u)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class vz extends we{priority=130;parse(t,i){return eg(i==="R"?4:i.length,t)}set(t,i,s){const u=We(t,0);return u.setFullYear(s,0,4),u.setHours(0,0,0,0),Sh(u)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class Sz extends we{priority=130;parse(t,i){return eg(i==="u"?4:i.length,t)}set(t,i,s){return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class bz extends we{priority=120;parse(t,i,s){switch(i){case"Q":case"QQ":return Gn(i.length,t);case"Qo":return s.ordinalNumber(t,{unit:"quarter"});case"QQQ":return s.quarter(t,{width:"abbreviated",context:"formatting"})||s.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(t,{width:"narrow",context:"formatting"});default:return s.quarter(t,{width:"wide",context:"formatting"})||s.quarter(t,{width:"abbreviated",context:"formatting"})||s.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,i){return i>=1&&i<=4}set(t,i,s){return t.setMonth((s-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class Ez extends we{priority=120;parse(t,i,s){switch(i){case"q":case"qq":return Gn(i.length,t);case"qo":return s.ordinalNumber(t,{unit:"quarter"});case"qqq":return s.quarter(t,{width:"abbreviated",context:"standalone"})||s.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(t,{width:"narrow",context:"standalone"});default:return s.quarter(t,{width:"wide",context:"standalone"})||s.quarter(t,{width:"abbreviated",context:"standalone"})||s.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,i){return i>=1&&i<=4}set(t,i,s){return t.setMonth((s-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class Tz extends we{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,i,s){const u=c=>c-1;switch(i){case"M":return Zn(_n(Qn.month,t),u);case"MM":return Zn(Gn(2,t),u);case"Mo":return Zn(s.ordinalNumber(t,{unit:"month"}),u);case"MMM":return s.month(t,{width:"abbreviated",context:"formatting"})||s.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(t,{width:"narrow",context:"formatting"});default:return s.month(t,{width:"wide",context:"formatting"})||s.month(t,{width:"abbreviated",context:"formatting"})||s.month(t,{width:"narrow",context:"formatting"})}}validate(t,i){return i>=0&&i<=11}set(t,i,s){return t.setMonth(s,1),t.setHours(0,0,0,0),t}}class Cz extends we{priority=110;parse(t,i,s){const u=c=>c-1;switch(i){case"L":return Zn(_n(Qn.month,t),u);case"LL":return Zn(Gn(2,t),u);case"Lo":return Zn(s.ordinalNumber(t,{unit:"month"}),u);case"LLL":return s.month(t,{width:"abbreviated",context:"standalone"})||s.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(t,{width:"narrow",context:"standalone"});default:return s.month(t,{width:"wide",context:"standalone"})||s.month(t,{width:"abbreviated",context:"standalone"})||s.month(t,{width:"narrow",context:"standalone"})}}validate(t,i){return i>=0&&i<=11}set(t,i,s){return t.setMonth(s,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function _z(n,t,i){const s=He(n),u=tz(s,i)-t;return s.setDate(s.getDate()-u*7),s}class xz extends we{priority=100;parse(t,i,s){switch(i){case"w":return _n(Qn.week,t);case"wo":return s.ordinalNumber(t,{unit:"week"});default:return Gn(i.length,t)}}validate(t,i){return i>=1&&i<=53}set(t,i,s,u){return Wo(_z(t,s,u),u)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function Dz(n,t){const i=He(n),s=WR(i)-t;return i.setDate(i.getDate()-s*7),i}class Az extends we{priority=100;parse(t,i,s){switch(i){case"I":return _n(Qn.week,t);case"Io":return s.ordinalNumber(t,{unit:"week"});default:return Gn(i.length,t)}}validate(t,i){return i>=1&&i<=53}set(t,i,s){return Sh(Dz(t,s))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const Mz=[31,28,31,30,31,30,31,31,30,31,30,31],Nz=[31,29,31,30,31,30,31,31,30,31,30,31];class Oz extends we{priority=90;subPriority=1;parse(t,i,s){switch(i){case"d":return _n(Qn.date,t);case"do":return s.ordinalNumber(t,{unit:"date"});default:return Gn(i.length,t)}}validate(t,i){const s=t.getFullYear(),u=yb(s),c=t.getMonth();return u?i>=1&&i<=Nz[c]:i>=1&&i<=Mz[c]}set(t,i,s){return t.setDate(s),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class Rz extends we{priority=90;subpriority=1;parse(t,i,s){switch(i){case"D":case"DD":return _n(Qn.dayOfYear,t);case"Do":return s.ordinalNumber(t,{unit:"date"});default:return Gn(i.length,t)}}validate(t,i){const s=t.getFullYear();return yb(s)?i>=1&&i<=366:i>=1&&i<=365}set(t,i,s){return t.setMonth(0,s),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function Mv(n,t,i){const s=u0(),u=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,c=He(n),f=c.getDay(),m=(t%7+7)%7,S=7-u,b=t<0||t>6?t-(f+S)%7:(m+S)%7-(f+S)%7;return vh(c,b)}class zz extends we{priority=90;parse(t,i,s){switch(i){case"E":case"EE":case"EEE":return s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});default:return s.day(t,{width:"wide",context:"formatting"})||s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"})}}validate(t,i){return i>=0&&i<=6}set(t,i,s,u){return t=Mv(t,s,u),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class Hz extends we{priority=90;parse(t,i,s,u){const c=f=>{const p=Math.floor((f-1)/7)*7;return(f+u.weekStartsOn+6)%7+p};switch(i){case"e":case"ee":return Zn(Gn(i.length,t),c);case"eo":return Zn(s.ordinalNumber(t,{unit:"day"}),c);case"eee":return s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});case"eeeee":return s.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});default:return s.day(t,{width:"wide",context:"formatting"})||s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"})}}validate(t,i){return i>=0&&i<=6}set(t,i,s,u){return t=Mv(t,s,u),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class wz extends we{priority=90;parse(t,i,s,u){const c=f=>{const p=Math.floor((f-1)/7)*7;return(f+u.weekStartsOn+6)%7+p};switch(i){case"c":case"cc":return Zn(Gn(i.length,t),c);case"co":return Zn(s.ordinalNumber(t,{unit:"day"}),c);case"ccc":return s.day(t,{width:"abbreviated",context:"standalone"})||s.day(t,{width:"short",context:"standalone"})||s.day(t,{width:"narrow",context:"standalone"});case"ccccc":return s.day(t,{width:"narrow",context:"standalone"});case"cccccc":return s.day(t,{width:"short",context:"standalone"})||s.day(t,{width:"narrow",context:"standalone"});default:return s.day(t,{width:"wide",context:"standalone"})||s.day(t,{width:"abbreviated",context:"standalone"})||s.day(t,{width:"short",context:"standalone"})||s.day(t,{width:"narrow",context:"standalone"})}}validate(t,i){return i>=0&&i<=6}set(t,i,s,u){return t=Mv(t,s,u),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function Uz(n,t){const i=He(n),s=oz(i),u=t-s;return vh(i,u)}class Bz extends we{priority=90;parse(t,i,s){const u=c=>c===0?7:c;switch(i){case"i":case"ii":return Gn(i.length,t);case"io":return s.ordinalNumber(t,{unit:"day"});case"iii":return Zn(s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"}),u);case"iiiii":return Zn(s.day(t,{width:"narrow",context:"formatting"}),u);case"iiiiii":return Zn(s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"}),u);default:return Zn(s.day(t,{width:"wide",context:"formatting"})||s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"}),u)}}validate(t,i){return i>=1&&i<=7}set(t,i,s){return t=Uz(t,s),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class Vz extends we{priority=80;parse(t,i,s){switch(i){case"a":case"aa":case"aaa":return s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(t,{width:"narrow",context:"formatting"});default:return s.dayPeriod(t,{width:"wide",context:"formatting"})||s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,i,s){return t.setHours(Av(s),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class Gz extends we{priority=80;parse(t,i,s){switch(i){case"b":case"bb":case"bbb":return s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(t,{width:"narrow",context:"formatting"});default:return s.dayPeriod(t,{width:"wide",context:"formatting"})||s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,i,s){return t.setHours(Av(s),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class jz extends we{priority=80;parse(t,i,s){switch(i){case"B":case"BB":case"BBB":return s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(t,{width:"narrow",context:"formatting"});default:return s.dayPeriod(t,{width:"wide",context:"formatting"})||s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,i,s){return t.setHours(Av(s),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class Lz extends we{priority=70;parse(t,i,s){switch(i){case"h":return _n(Qn.hour12h,t);case"ho":return s.ordinalNumber(t,{unit:"hour"});default:return Gn(i.length,t)}}validate(t,i){return i>=1&&i<=12}set(t,i,s){const u=t.getHours()>=12;return u&&s<12?t.setHours(s+12,0,0,0):!u&&s===12?t.setHours(0,0,0,0):t.setHours(s,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class Pz extends we{priority=70;parse(t,i,s){switch(i){case"H":return _n(Qn.hour23h,t);case"Ho":return s.ordinalNumber(t,{unit:"hour"});default:return Gn(i.length,t)}}validate(t,i){return i>=0&&i<=23}set(t,i,s){return t.setHours(s,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class Yz extends we{priority=70;parse(t,i,s){switch(i){case"K":return _n(Qn.hour11h,t);case"Ko":return s.ordinalNumber(t,{unit:"hour"});default:return Gn(i.length,t)}}validate(t,i){return i>=0&&i<=11}set(t,i,s){return t.getHours()>=12&&s<12?t.setHours(s+12,0,0,0):t.setHours(s,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class qz extends we{priority=70;parse(t,i,s){switch(i){case"k":return _n(Qn.hour24h,t);case"ko":return s.ordinalNumber(t,{unit:"hour"});default:return Gn(i.length,t)}}validate(t,i){return i>=1&&i<=24}set(t,i,s){const u=s<=24?s%24:s;return t.setHours(u,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class Xz extends we{priority=60;parse(t,i,s){switch(i){case"m":return _n(Qn.minute,t);case"mo":return s.ordinalNumber(t,{unit:"minute"});default:return Gn(i.length,t)}}validate(t,i){return i>=0&&i<=59}set(t,i,s){return t.setMinutes(s,0,0),t}incompatibleTokens=["t","T"]}class Kz extends we{priority=50;parse(t,i,s){switch(i){case"s":return _n(Qn.second,t);case"so":return s.ordinalNumber(t,{unit:"second"});default:return Gn(i.length,t)}}validate(t,i){return i>=0&&i<=59}set(t,i,s){return t.setSeconds(s,0),t}incompatibleTokens=["t","T"]}class Qz extends we{priority=30;parse(t,i){const s=u=>Math.trunc(u*Math.pow(10,-i.length+3));return Zn(Gn(i.length,t),s)}set(t,i,s){return t.setMilliseconds(s),t}incompatibleTokens=["t","T"]}class Zz extends we{priority=10;parse(t,i){switch(i){case"X":return $l(Wl.basicOptionalMinutes,t);case"XX":return $l(Wl.basic,t);case"XXXX":return $l(Wl.basicOptionalSeconds,t);case"XXXXX":return $l(Wl.extendedOptionalSeconds,t);default:return $l(Wl.extended,t)}}set(t,i,s){return i.timestampIsSet?t:We(t,t.getTime()-sb(t)-s)}incompatibleTokens=["t","T","x"]}class Jz extends we{priority=10;parse(t,i){switch(i){case"x":return $l(Wl.basicOptionalMinutes,t);case"xx":return $l(Wl.basic,t);case"xxxx":return $l(Wl.basicOptionalSeconds,t);case"xxxxx":return $l(Wl.extendedOptionalSeconds,t);default:return $l(Wl.extended,t)}}set(t,i,s){return i.timestampIsSet?t:We(t,t.getTime()-sb(t)-s)}incompatibleTokens=["t","T","X"]}class Fz extends we{priority=40;parse(t){return mb(t)}set(t,i,s){return[We(t,s*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class kz extends we{priority=20;parse(t){return mb(t)}set(t,i,s){return[We(t,s),{timestampIsSet:!0}]}incompatibleTokens="*"}const Iz={G:new mz,y:new gz,Y:new yz,R:new vz,u:new Sz,Q:new bz,q:new Ez,M:new Tz,L:new Cz,w:new xz,I:new Az,d:new Oz,D:new Rz,E:new zz,e:new Hz,c:new wz,i:new Bz,a:new Vz,b:new Gz,B:new jz,h:new Lz,H:new Pz,K:new Yz,k:new qz,m:new Xz,s:new Kz,S:new Qz,X:new Zz,x:new Jz,t:new Fz,T:new kz},Wz=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$z=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,tH=/^'([^]*?)'?$/,eH=/''/g,nH=/\S/,aH=/[a-zA-Z]/;function Mi(n,t,i,s){const u=rz(),c=s?.locale??u.locale??IR,f=s?.firstWeekContainsDate??s?.locale?.options?.firstWeekContainsDate??u.firstWeekContainsDate??u.locale?.options?.firstWeekContainsDate??1,p=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??u.weekStartsOn??u.locale?.options?.weekStartsOn??0;if(t==="")return n===""?He(i):We(i,NaN);const m={firstWeekContainsDate:f,weekStartsOn:p,locale:c},S=[new pz],b=t.match($z).map(N=>{const O=N[0];if(O in fb){const R=fb[O];return R(N,c.formatLong)}return N}).join("").match(Wz),_=[];for(let N of b){!s?.useAdditionalWeekYearTokens&&sz(N)&&hb(N,t,n),!s?.useAdditionalDayOfYearTokens&&iz(N)&&hb(N,t,n);const O=N[0],R=Iz[O];if(R){const{incompatibleTokens:U}=R;if(Array.isArray(U)){const G=_.find(k=>U.includes(k.token)||k.token===O);if(G)throw new RangeError(`The format string mustn't contain \`${G.fullToken}\` and \`${N}\` at the same time`)}else if(R.incompatibleTokens==="*"&&_.length>0)throw new RangeError(`The format string mustn't contain \`${N}\` and any other token at the same time`);_.push({token:O,fullToken:N});const j=R.run(n,N,c.match,m);if(!j)return We(i,NaN);S.push(j.setter),n=j.rest}else{if(O.match(aH))throw new RangeError("Format string contains an unescaped latin alphabet character `"+O+"`");if(N==="''"?N="'":O==="'"&&(N=iH(N)),n.indexOf(N)===0)n=n.slice(N.length);else return We(i,NaN)}}if(n.length>0&&nH.test(n))return We(i,NaN);const x=S.map(N=>N.priority).sort((N,O)=>O-N).filter((N,O,R)=>R.indexOf(N)===O).map(N=>S.filter(O=>O.priority===N).sort((O,R)=>R.subPriority-O.subPriority)).map(N=>N[0]);let D=He(i);if(isNaN(D.getTime()))return We(i,NaN);const A={};for(const N of x){if(!N.validate(D,m))return We(i,NaN);const O=N.set(D,A,m);Array.isArray(O)?(D=O[0],Object.assign(A,O[1])):D=O}return We(i,D)}function iH(n){return n.match(tH)[1].replace(eH,"'")}function sH(n){return lb(n,Date.now())}function lH(n,t){return vh(n,-t)}function rH(n,t){let i=t-Dv(n);return i<=0&&(i+=7),vh(n,i)}function oH(n,t){const s=hH(n);let u;if(s.date){const m=dH(s.date,2);u=pH(m.restDateString,m.year)}if(!u||isNaN(u.getTime()))return new Date(NaN);const c=u.getTime();let f=0,p;if(s.time&&(f=mH(s.time),isNaN(f)))return new Date(NaN);if(s.timezone){if(p=gH(s.timezone),isNaN(p))return new Date(NaN)}else{const m=new Date(c+f),S=new Date(0);return S.setFullYear(m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate()),S.setHours(m.getUTCHours(),m.getUTCMinutes(),m.getUTCSeconds(),m.getUTCMilliseconds()),S}return new Date(c+f+p)}const ng={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},uH=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,cH=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,fH=/^([+-])(\d{2})(?::?(\d{2}))?$/;function hH(n){const t={},i=n.split(ng.dateTimeDelimiter);let s;if(i.length>2)return t;if(/:/.test(i[0])?s=i[0]:(t.date=i[0],s=i[1],ng.timeZoneDelimiter.test(t.date)&&(t.date=n.split(ng.timeZoneDelimiter)[0],s=n.substr(t.date.length,n.length))),s){const u=ng.timezone.exec(s);u?(t.time=s.replace(u[1],""),t.timezone=u[1]):t.time=s}return t}function dH(n,t){const i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),s=n.match(i);if(!s)return{year:NaN,restDateString:""};const u=s[1]?parseInt(s[1]):null,c=s[2]?parseInt(s[2]):null;return{year:c===null?u:c*100,restDateString:n.slice((s[1]||s[2]).length)}}function pH(n,t){if(t===null)return new Date(NaN);const i=n.match(uH);if(!i)return new Date(NaN);const s=!!i[4],u=d0(i[1]),c=d0(i[2])-1,f=d0(i[3]),p=d0(i[4]),m=d0(i[5])-1;if(s)return EH(t,p,m)?yH(t,p,m):new Date(NaN);{const S=new Date(0);return!SH(t,c,f)||!bH(t,u)?new Date(NaN):(S.setUTCFullYear(t,c,Math.max(u,f)),S)}}function d0(n){return n?parseInt(n):1}function mH(n){const t=n.match(cH);if(!t)return NaN;const i=Nv(t[1]),s=Nv(t[2]),u=Nv(t[3]);return TH(i,s,u)?i*_v+s*Cv+u*1e3:NaN}function Nv(n){return n&&parseFloat(n.replace(",","."))||0}function gH(n){if(n==="Z")return 0;const t=n.match(fH);if(!t)return 0;const i=t[1]==="+"?-1:1,s=parseInt(t[2]),u=t[3]&&parseInt(t[3])||0;return CH(s,u)?i*(s*_v+u*Cv):NaN}function yH(n,t,i){const s=new Date(0);s.setUTCFullYear(n,0,4);const u=s.getUTCDay()||7,c=(t-1)*7+i+1-u;return s.setUTCDate(s.getUTCDate()+c),s}const vH=[31,null,31,30,31,30,31,31,30,31,30,31];function vb(n){return n%400===0||n%4===0&&n%100!==0}function SH(n,t,i){return t>=0&&t<=11&&i>=1&&i<=(vH[t]||(vb(n)?29:28))}function bH(n,t){return t>=1&&t<=(vb(n)?366:365)}function EH(n,t,i){return t>=1&&t<=53&&i>=0&&i<=6}function TH(n,t,i){return n===24?t===0&&i===0:i>=0&&i<60&&t>=0&&t<60&&n>=0&&n<25}function CH(n,t){return t>=0&&t<=59}function _H(n,t){const i=He(n),s=i.getFullYear(),u=i.getDate(),c=We(n,0);c.setFullYear(s,t,15),c.setHours(0,0,0,0);const f=db(c);return i.setMonth(t,Math.min(u,f)),i}function xH(n,t){const i=He(n);return isNaN(+i)?We(n,NaN):(i.setFullYear(t),i)}function Ov(n,t){return Io(n,-t)}function Rv(n,t){return c0(n,-t)}function DH(){return window.navigator.languages?window.navigator.languages[0]:window.navigator.language}function AH(n,t,i){const s=[];for(let u=n;u<=t;u++)s.push(i?i(u):u);return s}function MH(n,t){const i=n.target;return i?!t.isSameNode(i)&&!t.contains(i):!1}function NH(n,t){return n.isSameNode(t)||n.contains(t)}function OH(n,t){const i=Object.entries(t),s=getComputedStyle(n);for(let u=0,c=i.length;u<c;u++){const[f,p]=i[u];if(typeof p=="string"&&p.indexOf(",")>-1){if(!p.split(",").map(S=>S.trim()).includes(s[f]))return!1}else if(s[f]!==p)return!1}return!0}function RH(n,t){const i=Object.entries(t),s=getComputedStyle(n);for(let u=0,c=i.length;u<c;u++){const[f,p]=i[u];if(typeof p=="string"&&p.indexOf(",")>-1){if(p.split(",").map(S=>S.trim()).includes(s[f]))return!0}else if(s[f]===p)return!0}return!1}function Sb(n,t,i=!1,s){if(i&&OH(n,t)){if(!s||s?.(n)===!0)return n}else if(!i&&RH(n,t)&&(!s||s?.(n)===!0))return n;return n.parentElement?Sb(n.parentElement,t,i,s):n}function bb(n,t){const i=Array.from(document.querySelectorAll("body *")),s=[];for(let u=0,c=i.length;u<c;u++){const f=getComputedStyle(i[u]);f[n]&&t(f[n])&&s.push(f[n])}return s}function Cj(n){return n}function zH(n){const t=document.documentElement;Object.keys(n).forEach(i=>{t.style.setProperty(i,n[i])})}function HH(n){return{"--theme-bsc-primary-1":n.primary1,"--theme-bsc-primary-2":n.primary2,"--theme-bsc-primary-3":n.primary3,"--theme-bsc-primary-4":n.primary4,"--theme-bsc-primary-5":n.primary5,"--theme-bsc-gray-1":n.gray1||"#303030","--theme-bsc-gray-2":n.gray2||"#5f5f5f","--theme-bsc-gray-3":n.gray3||"#8f8f8f","--theme-bsc-gray-4":n.gray4||"#bebebe","--theme-bsc-gray-5":n.gray5||"#eee","--theme-bsc-black":n.black||"#000","--theme-bsc-white":n.white||"#fff","--theme-bsc-mono-dark-1":n.monoDark1||"#222","--theme-bsc-mono-dark-2":n.monoDark2||"#3c3c3c","--theme-bsc-mono-dark-3":n.monoDark3||"#4e4e4e","--theme-bsc-mono-light-1":n.monoLight1||"#fefefe","--theme-bsc-mono-light-2":n.monoLight2||"#eee","--theme-bsc-mono-light-3":n.monoLight3||"#ccc","--theme-bsc-info":n.info||"#2e7ff8","--theme-bsc-success":n.success||"#53ae0c","--theme-bsc-warning":n.warning||"#ff6914","--theme-bsc-error":n.error||"#f01616"}}var ka=(n=>(n[n.Regular=24]="Regular",n[n.Small=20]="Small",n))(ka||{});const Eb=({className:n})=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:n,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008ZM12 15h.008v.008H12V15Zm0 2.25h.008v.008H12v-.008ZM9.75 15h.008v.008H9.75V15Zm0 2.25h.008v.008H9.75v-.008ZM7.5 15h.008v.008H7.5V15Zm0 2.25h.008v.008H7.5v-.008Zm6.75-4.5h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V15Zm0 2.25h.008v.008h-.008v-.008Zm2.25-4.5h.008v.008H16.5v-.008Zm0 2.25h.008v.008H16.5V15Z"})}),wH=({className:n})=>{const t=Ee("bsc:h-6 bsc:w-6",n);return X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})})},UH=({className:n})=>{const t=Ee("bsc:h-6 bsc:w-6",n);return X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5 8.25 12l7.5-7.5"})})},BH=({className:n})=>{const t=Ee("bsc:h-6 bsc:w-6",n);return X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})})},VH=({className:n})=>{const t=Ee("bsc:h-6 bsc:w-6",n);return X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"})})},GH=({className:n})=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:n,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})}),_s=({icon:n,size:t=ka.Regular,onClick:i,className:s})=>{const u=w.useRef({calendar:Eb,chevronDown:wH,chevronLeft:UH,chevronRight:BH,chevronUp:VH,close:GH}),c=w.useMemo(()=>u.current[n]||Eb,[n]),f=Ee({"bsc:h-[24px] bsc:w-[24px]":t===ka.Regular,"bsc:h-[20px] bsc:w-[20px]":t===ka.Small},s);return X.jsx("div",{onClick:i,children:X.jsx(c,{className:f})})},Sc=({template:n,props:t,children:i})=>n(t,i);function jH(n,t){if(t===n)return!1;const i=Object.values(t),s=Object.values(n);if(i.length!==s.length||i.some((c,f)=>c!==s[f]))return!0;const u=Object.keys(n);return Object.keys(t).some((c,f)=>c!==u[f])}function LH(n,t){return n.matches[t]=!1,n.mediaQueries[t]={},n}function Tb(n){const t=Object.keys(n);return typeof window>"u"?t.reduce(LH,{mediaQueries:{},matches:{}}):t.reduce((i,s)=>{const u=window.matchMedia(n[s]);return i.mediaQueries[s]=u,i.matches[s]=u.matches,i},{mediaQueries:{},matches:{}})}function PH(n,t){function i(s,u){return s[u]=n.mediaQueries[u].matches,s}switch(t.type){case"updateMatches":return{matches:Object.keys(n.mediaQueries).reduce(i,{}),mediaQueries:n.mediaQueries};case"setQueries":return Tb(t.queries)}}function YH(n){const t=wa.useRef(n),[i,s]=wa.useReducer(PH,n,Tb);wa.useEffect(()=>{jH(n,t.current)&&(s({type:"setQueries",queries:n}),t.current=n)},[n]);function u(){return s({type:"updateMatches"})}function c(m){const S=u;return typeof m.addListener<"u"?m.addListener(S):m.addEventListener("change",S),S}wa.useEffect(()=>{const m=Object.values(i.mediaQueries),S=m.map(c);function b(_,x){typeof _.addListener<"u"?_.removeListener(S[x]):_.removeEventListener("change",S[x])}return()=>{m.forEach(b)}},[i.mediaQueries]);const{matches:f}=i,p=wa.useMemo(()=>Object.values(f),[f]);return{matches:f,matchesAny:p.some(Boolean),matchesAll:p.length>0&&p.every(Boolean)}}function ag(n){return YH(qH(n)).matchesAll}const zv={};function qH(n){return zv[n]===void 0&&(zv[n]={default:n}),zv[n]}const Hv=({mobileQuery:n="screen and (max-device-width: 40rem)",tabletQuery:t="screen and (min-device-width: 40.01rem) and (max-device-width: 63.9375rem)",desktopQuery:i="screen and (min-device-width: 64rem)",mobileMarkup:s,aboveMobileMarkup:u,tabletMarkup:c,desktopMarkup:f})=>{const p=ag(n),m=ag(t),S=ag(i);return p&&s?s:!p&&u?u:m&&c?c:S&&f?f:(console.error("Invalid media settings"),null)};function Cb(n,t,i){const s=c=>{const f=c.target,p=n.style.display!=="hidden";n&&p&&!NH(n,f)&&!u(i,f)?t(!1):t(!0)},u=(c,f)=>{if(!c)return!1;for(let p=0,m=c.length;p<m;p++)if(c[p].isSameNode(f)||c[p].contains(f))return!0;return!1};return document.addEventListener("mousedown",s),s}function _b(n){document.removeEventListener("mousedown",n)}function xb(n){return n.target?n.target:n}const Db=w.createContext({});function XH(n){const t=w.useRef(null);return t.current===null&&(t.current=n()),t.current}const wv=typeof window<"u",KH=wv?w.useLayoutEffect:w.useEffect,Uv=w.createContext(null);function Bv(n,t){n.indexOf(t)===-1&&n.push(t)}function Vv(n,t){const i=n.indexOf(t);i>-1&&n.splice(i,1)}const Xr=(n,t,i)=>i>t?t:i<n?n:i;function Gv(n,t){return t?`${n}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:n}let bh=()=>{},Kr=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(bh=(n,t,i)=>{!n&&typeof console<"u"&&console.warn(Gv(t,i))},Kr=(n,t,i)=>{if(!n)throw new Error(Gv(t,i))});const Qr={},Ab=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n);function Mb(n){return typeof n=="object"&&n!==null}const Nb=n=>/^0[^.\s]+$/u.test(n);function jv(n){let t;return()=>(t===void 0&&(t=n()),t)}const xs=n=>n,QH=(n,t)=>i=>t(n(i)),p0=(...n)=>n.reduce(QH),m0=(n,t,i)=>{const s=t-n;return s===0?1:(i-n)/s};class Lv{constructor(){this.subscriptions=[]}add(t){return Bv(this.subscriptions,t),()=>Vv(this.subscriptions,t)}notify(t,i,s){const u=this.subscriptions.length;if(u)if(u===1)this.subscriptions[0](t,i,s);else for(let c=0;c<u;c++){const f=this.subscriptions[c];f&&f(t,i,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const hl=n=>n*1e3,Ds=n=>n/1e3;function Ob(n,t){return t?n*(1e3/t):0}const Rb=new Set;function Pv(n,t,i){n||Rb.has(t)||(console.warn(Gv(t,i)),Rb.add(t))}const zb=(n,t,i)=>(((1-3*i+3*t)*n+(3*i-6*t))*n+3*t)*n,ZH=1e-7,JH=12;function FH(n,t,i,s,u){let c,f,p=0;do f=t+(i-t)/2,c=zb(f,s,u)-n,c>0?i=f:t=f;while(Math.abs(c)>ZH&&++p<JH);return f}function g0(n,t,i,s){if(n===t&&i===s)return xs;const u=c=>FH(c,0,1,n,i);return c=>c===0||c===1?c:zb(u(c),t,s)}const Hb=n=>t=>t<=.5?n(2*t)/2:(2-n(2*(1-t)))/2,wb=n=>t=>1-n(1-t),Ub=g0(.33,1.53,.69,.99),Yv=wb(Ub),Bb=Hb(Yv),Vb=n=>(n*=2)<1?.5*Yv(n):.5*(2-Math.pow(2,-10*(n-1))),qv=n=>1-Math.sin(Math.acos(n)),Gb=wb(qv),jb=Hb(qv),kH=g0(.42,0,1,1),IH=g0(0,0,.58,1),Lb=g0(.42,0,.58,1),WH=n=>Array.isArray(n)&&typeof n[0]!="number",Pb=n=>Array.isArray(n)&&typeof n[0]=="number",Yb={linear:xs,easeIn:kH,easeInOut:Lb,easeOut:IH,circIn:qv,circInOut:jb,circOut:Gb,backIn:Yv,backInOut:Bb,backOut:Ub,anticipate:Vb},$H=n=>typeof n=="string",qb=n=>{if(Pb(n)){Kr(n.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,i,s,u]=n;return g0(t,i,s,u)}else if($H(n))return Kr(Yb[n]!==void 0,`Invalid easing type '${n}'`,"invalid-easing-type"),Yb[n];return n},ig=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function tw(n,t){let i=new Set,s=new Set,u=!1,c=!1;const f=new WeakSet;let p={delta:0,timestamp:0,isProcessing:!1};function m(b){f.has(b)&&(S.schedule(b),n()),b(p)}const S={schedule:(b,_=!1,x=!1)=>{const A=x&&u?i:s;return _&&f.add(b),A.has(b)||A.add(b),b},cancel:b=>{s.delete(b),f.delete(b)},process:b=>{if(p=b,u){c=!0;return}u=!0,[i,s]=[s,i],i.forEach(m),i.clear(),u=!1,c&&(c=!1,S.process(b))}};return S}const ew=40;function Xb(n,t){let i=!1,s=!0;const u={delta:0,timestamp:0,isProcessing:!1},c=()=>i=!0,f=ig.reduce((j,G)=>(j[G]=tw(c),j),{}),{setup:p,read:m,resolveKeyframes:S,preUpdate:b,update:_,preRender:x,render:D,postRender:A}=f,N=()=>{const j=Qr.useManualTiming?u.timestamp:performance.now();i=!1,Qr.useManualTiming||(u.delta=s?1e3/60:Math.max(Math.min(j-u.timestamp,ew),1)),u.timestamp=j,u.isProcessing=!0,p.process(u),m.process(u),S.process(u),b.process(u),_.process(u),x.process(u),D.process(u),A.process(u),u.isProcessing=!1,i&&t&&(s=!1,n(N))},O=()=>{i=!0,s=!0,u.isProcessing||n(N)};return{schedule:ig.reduce((j,G)=>{const k=f[G];return j[G]=(et,ft=!1,I=!1)=>(i||O(),k.schedule(et,ft,I)),j},{}),cancel:j=>{for(let G=0;G<ig.length;G++)f[ig[G]].cancel(j)},state:u,steps:f}}const{schedule:mn,cancel:$o,state:Ua,steps:Xv}=Xb(typeof requestAnimationFrame<"u"?requestAnimationFrame:xs,!0);let sg;function nw(){sg=void 0}const Ni={now:()=>(sg===void 0&&Ni.set(Ua.isProcessing||Qr.useManualTiming?Ua.timestamp:performance.now()),sg),set:n=>{sg=n,queueMicrotask(nw)}},Kb=n=>t=>typeof t=="string"&&t.startsWith(n),Qb=Kb("--"),aw=Kb("var(--"),Kv=n=>aw(n)?iw.test(n.split("/*")[0].trim()):!1,iw=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Zb(n){return typeof n!="string"?!1:n.split("/*")[0].includes("var(--")}const Eh={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},y0={...Eh,transform:n=>Xr(0,1,n)},lg={...Eh,default:1},v0=n=>Math.round(n*1e5)/1e5,Qv=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function sw(n){return n==null}const lw=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Zv=(n,t)=>i=>!!(typeof i=="string"&&lw.test(i)&&i.startsWith(n)||t&&!sw(i)&&Object.prototype.hasOwnProperty.call(i,t)),Jb=(n,t,i)=>s=>{if(typeof s!="string")return s;const[u,c,f,p]=s.match(Qv);return{[n]:parseFloat(u),[t]:parseFloat(c),[i]:parseFloat(f),alpha:p!==void 0?parseFloat(p):1}},rw=n=>Xr(0,255,n),Jv={...Eh,transform:n=>Math.round(rw(n))},bc={test:Zv("rgb","red"),parse:Jb("red","green","blue"),transform:({red:n,green:t,blue:i,alpha:s=1})=>"rgba("+Jv.transform(n)+", "+Jv.transform(t)+", "+Jv.transform(i)+", "+v0(y0.transform(s))+")"};function ow(n){let t="",i="",s="",u="";return n.length>5?(t=n.substring(1,3),i=n.substring(3,5),s=n.substring(5,7),u=n.substring(7,9)):(t=n.substring(1,2),i=n.substring(2,3),s=n.substring(3,4),u=n.substring(4,5),t+=t,i+=i,s+=s,u+=u),{red:parseInt(t,16),green:parseInt(i,16),blue:parseInt(s,16),alpha:u?parseInt(u,16)/255:1}}const Fv={test:Zv("#"),parse:ow,transform:bc.transform},S0=n=>({test:t=>typeof t=="string"&&t.endsWith(n)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${n}`}),tu=S0("deg"),tr=S0("%"),zt=S0("px"),uw=S0("vh"),cw=S0("vw"),Fb={...tr,parse:n=>tr.parse(n)/100,transform:n=>tr.transform(n*100)},Th={test:Zv("hsl","hue"),parse:Jb("hue","saturation","lightness"),transform:({hue:n,saturation:t,lightness:i,alpha:s=1})=>"hsla("+Math.round(n)+", "+tr.transform(v0(t))+", "+tr.transform(v0(i))+", "+v0(y0.transform(s))+")"},ta={test:n=>bc.test(n)||Fv.test(n)||Th.test(n),parse:n=>bc.test(n)?bc.parse(n):Th.test(n)?Th.parse(n):Fv.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?bc.transform(n):Th.transform(n),getAnimatableNone:n=>{const t=ta.parse(n);return t.alpha=0,ta.transform(t)}},fw=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function hw(n){return isNaN(n)&&typeof n=="string"&&(n.match(Qv)?.length||0)+(n.match(fw)?.length||0)>0}const kb="number",Ib="color",dw="var",pw="var(",Wb="${}",mw=/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 b0(n){const t=n.toString(),i=[],s={color:[],number:[],var:[]},u=[];let c=0;const p=t.replace(mw,m=>(ta.test(m)?(s.color.push(c),u.push(Ib),i.push(ta.parse(m))):m.startsWith(pw)?(s.var.push(c),u.push(dw),i.push(m)):(s.number.push(c),u.push(kb),i.push(parseFloat(m))),++c,Wb)).split(Wb);return{values:i,split:p,indexes:s,types:u}}function $b(n){return b0(n).values}function t8(n){const{split:t,types:i}=b0(n),s=t.length;return u=>{let c="";for(let f=0;f<s;f++)if(c+=t[f],u[f]!==void 0){const p=i[f];p===kb?c+=v0(u[f]):p===Ib?c+=ta.transform(u[f]):c+=u[f]}return c}}const gw=n=>typeof n=="number"?0:ta.test(n)?ta.getAnimatableNone(n):n;function yw(n){const t=$b(n);return t8(n)(t.map(gw))}const eu={test:hw,parse:$b,createTransformer:t8,getAnimatableNone:yw};function kv(n,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?n+(t-n)*6*i:i<1/2?t:i<2/3?n+(t-n)*(2/3-i)*6:n}function vw({hue:n,saturation:t,lightness:i,alpha:s}){n/=360,t/=100,i/=100;let u=0,c=0,f=0;if(!t)u=c=f=i;else{const p=i<.5?i*(1+t):i+t-i*t,m=2*i-p;u=kv(m,p,n+1/3),c=kv(m,p,n),f=kv(m,p,n-1/3)}return{red:Math.round(u*255),green:Math.round(c*255),blue:Math.round(f*255),alpha:s}}function rg(n,t){return i=>i>0?t:n}const xn=(n,t,i)=>n+(t-n)*i,Iv=(n,t,i)=>{const s=n*n,u=i*(t*t-s)+s;return u<0?0:Math.sqrt(u)},Sw=[Fv,bc,Th],bw=n=>Sw.find(t=>t.test(n));function e8(n){const t=bw(n);if(bh(!!t,`'${n}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let i=t.parse(n);return t===Th&&(i=vw(i)),i}const n8=(n,t)=>{const i=e8(n),s=e8(t);if(!i||!s)return rg(n,t);const u={...i};return c=>(u.red=Iv(i.red,s.red,c),u.green=Iv(i.green,s.green,c),u.blue=Iv(i.blue,s.blue,c),u.alpha=xn(i.alpha,s.alpha,c),bc.transform(u))},Wv=new Set(["none","hidden"]);function Ew(n,t){return Wv.has(n)?i=>i<=0?n:t:i=>i>=1?t:n}function Tw(n,t){return i=>xn(n,t,i)}function $v(n){return typeof n=="number"?Tw:typeof n=="string"?Kv(n)?rg:ta.test(n)?n8:xw:Array.isArray(n)?a8:typeof n=="object"?ta.test(n)?n8:Cw:rg}function a8(n,t){const i=[...n],s=i.length,u=n.map((c,f)=>$v(c)(c,t[f]));return c=>{for(let f=0;f<s;f++)i[f]=u[f](c);return i}}function Cw(n,t){const i={...n,...t},s={};for(const u in i)n[u]!==void 0&&t[u]!==void 0&&(s[u]=$v(n[u])(n[u],t[u]));return u=>{for(const c in s)i[c]=s[c](u);return i}}function _w(n,t){const i=[],s={color:0,var:0,number:0};for(let u=0;u<t.values.length;u++){const c=t.types[u],f=n.indexes[c][s[c]],p=n.values[f]??0;i[u]=p,s[c]++}return i}const xw=(n,t)=>{const i=eu.createTransformer(t),s=b0(n),u=b0(t);return s.indexes.var.length===u.indexes.var.length&&s.indexes.color.length===u.indexes.color.length&&s.indexes.number.length>=u.indexes.number.length?Wv.has(n)&&!u.values.length||Wv.has(t)&&!s.values.length?Ew(n,t):p0(a8(_w(s,u),u.values),i):(bh(!0,`Complex values '${n}' 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"),rg(n,t))};function i8(n,t,i){return typeof n=="number"&&typeof t=="number"&&typeof i=="number"?xn(n,t,i):$v(n)(n,t)}const Dw=n=>{const t=({timestamp:i})=>n(i);return{start:(i=!0)=>mn.update(t,i),stop:()=>$o(t),now:()=>Ua.isProcessing?Ua.timestamp:Ni.now()}},s8=(n,t,i=10)=>{let s="";const u=Math.max(Math.round(t/i),2);for(let c=0;c<u;c++)s+=Math.round(n(c/(u-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},og=2e4;function tS(n){let t=0;const i=50;let s=n.next(t);for(;!s.done&&t<og;)t+=i,s=n.next(t);return t>=og?1/0:t}function Aw(n,t=100,i){const s=i({...n,keyframes:[0,t]}),u=Math.min(tS(s),og);return{type:"keyframes",ease:c=>s.next(u*c).value/t,duration:Ds(u)}}const Mw=5;function l8(n,t,i){const s=Math.max(t-Mw,0);return Ob(i-n(s),t-s)}const Dn={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},eS=.001;function Nw({duration:n=Dn.duration,bounce:t=Dn.bounce,velocity:i=Dn.velocity,mass:s=Dn.mass}){let u,c;bh(n<=hl(Dn.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let f=1-t;f=Xr(Dn.minDamping,Dn.maxDamping,f),n=Xr(Dn.minDuration,Dn.maxDuration,Ds(n)),f<1?(u=S=>{const b=S*f,_=b*n,x=b-i,D=nS(S,f),A=Math.exp(-_);return eS-x/D*A},c=S=>{const _=S*f*n,x=_*i+i,D=Math.pow(f,2)*Math.pow(S,2)*n,A=Math.exp(-_),N=nS(Math.pow(S,2),f);return(-u(S)+eS>0?-1:1)*((x-D)*A)/N}):(u=S=>{const b=Math.exp(-S*n),_=(S-i)*n+1;return-eS+b*_},c=S=>{const b=Math.exp(-S*n),_=(i-S)*(n*n);return b*_});const p=5/n,m=Rw(u,c,p);if(n=hl(n),isNaN(m))return{stiffness:Dn.stiffness,damping:Dn.damping,duration:n};{const S=Math.pow(m,2)*s;return{stiffness:S,damping:f*2*Math.sqrt(s*S),duration:n}}}const Ow=12;function Rw(n,t,i){let s=i;for(let u=1;u<Ow;u++)s=s-n(s)/t(s);return s}function nS(n,t){return n*Math.sqrt(1-t*t)}const zw=["duration","bounce"],Hw=["stiffness","damping","mass"];function r8(n,t){return t.some(i=>n[i]!==void 0)}function ww(n){let t={velocity:Dn.velocity,stiffness:Dn.stiffness,damping:Dn.damping,mass:Dn.mass,isResolvedFromDuration:!1,...n};if(!r8(n,Hw)&&r8(n,zw))if(n.visualDuration){const i=n.visualDuration,s=2*Math.PI/(i*1.2),u=s*s,c=2*Xr(.05,1,1-(n.bounce||0))*Math.sqrt(u);t={...t,mass:Dn.mass,stiffness:u,damping:c}}else{const i=Nw(n);t={...t,...i,mass:Dn.mass},t.isResolvedFromDuration=!0}return t}function ug(n=Dn.visualDuration,t=Dn.bounce){const i=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:t}:n;let{restSpeed:s,restDelta:u}=i;const c=i.keyframes[0],f=i.keyframes[i.keyframes.length-1],p={done:!1,value:c},{stiffness:m,damping:S,mass:b,duration:_,velocity:x,isResolvedFromDuration:D}=ww({...i,velocity:-Ds(i.velocity||0)}),A=x||0,N=S/(2*Math.sqrt(m*b)),O=f-c,R=Ds(Math.sqrt(m/b)),U=Math.abs(O)<5;s||(s=U?Dn.restSpeed.granular:Dn.restSpeed.default),u||(u=U?Dn.restDelta.granular:Dn.restDelta.default);let j;if(N<1){const k=nS(R,N);j=et=>{const ft=Math.exp(-N*R*et);return f-ft*((A+N*R*O)/k*Math.sin(k*et)+O*Math.cos(k*et))}}else if(N===1)j=k=>f-Math.exp(-R*k)*(O+(A+R*O)*k);else{const k=R*Math.sqrt(N*N-1);j=et=>{const ft=Math.exp(-N*R*et),I=Math.min(k*et,300);return f-ft*((A+N*R*O)*Math.sinh(I)+k*O*Math.cosh(I))/k}}const G={calculatedDuration:D&&_||null,next:k=>{const et=j(k);if(D)p.done=k>=_;else{let ft=k===0?A:0;N<1&&(ft=k===0?hl(A):l8(j,k,et));const I=Math.abs(ft)<=s,it=Math.abs(f-et)<=u;p.done=I&&it}return p.value=p.done?f:et,p},toString:()=>{const k=Math.min(tS(G),og),et=s8(ft=>G.next(k*ft).value,k,30);return k+"ms "+et},toTransition:()=>{}};return G}ug.applyToOptions=n=>{const t=Aw(n,100,ug);return n.ease=t.ease,n.duration=hl(t.duration),n.type="keyframes",n};function aS({keyframes:n,velocity:t=0,power:i=.8,timeConstant:s=325,bounceDamping:u=10,bounceStiffness:c=500,modifyTarget:f,min:p,max:m,restDelta:S=.5,restSpeed:b}){const _=n[0],x={done:!1,value:_},D=I=>p!==void 0&&I<p||m!==void 0&&I>m,A=I=>p===void 0?m:m===void 0||Math.abs(p-I)<Math.abs(m-I)?p:m;let N=i*t;const O=_+N,R=f===void 0?O:f(O);R!==O&&(N=R-_);const U=I=>-N*Math.exp(-I/s),j=I=>R+U(I),G=I=>{const it=U(I),J=j(I);x.done=Math.abs(it)<=S,x.value=x.done?R:J};let k,et;const ft=I=>{D(x.value)&&(k=I,et=ug({keyframes:[x.value,A(x.value)],velocity:l8(j,I,x.value),damping:u,stiffness:c,restDelta:S,restSpeed:b}))};return ft(0),{calculatedDuration:null,next:I=>{let it=!1;return!et&&k===void 0&&(it=!0,G(I),ft(I)),k!==void 0&&I>=k?et.next(I-k):(!it&&G(I),x)}}}function Uw(n,t,i){const s=[],u=i||Qr.mix||i8,c=n.length-1;for(let f=0;f<c;f++){let p=u(n[f],n[f+1]);if(t){const m=Array.isArray(t)?t[f]||xs:t;p=p0(m,p)}s.push(p)}return s}function Bw(n,t,{clamp:i=!0,ease:s,mixer:u}={}){const c=n.length;if(Kr(c===t.length,"Both input and output ranges must be the same length","range-length"),c===1)return()=>t[0];if(c===2&&t[0]===t[1])return()=>t[1];const f=n[0]===n[1];n[0]>n[c-1]&&(n=[...n].reverse(),t=[...t].reverse());const p=Uw(t,s,u),m=p.length,S=b=>{if(f&&b<n[0])return t[0];let _=0;if(m>1)for(;_<n.length-2&&!(b<n[_+1]);_++);const x=m0(n[_],n[_+1],b);return p[_](x)};return i?b=>S(Xr(n[0],n[c-1],b)):S}function Vw(n,t){const i=n[n.length-1];for(let s=1;s<=t;s++){const u=m0(0,t,s);n.push(xn(i,1,u))}}function Gw(n){const t=[0];return Vw(t,n.length-1),t}function jw(n,t){return n.map(i=>i*t)}function Lw(n,t){return n.map(()=>t||Lb).splice(0,n.length-1)}function Ch({duration:n=300,keyframes:t,times:i,ease:s="easeInOut"}){const u=WH(s)?s.map(qb):qb(s),c={done:!1,value:t[0]},f=jw(i&&i.length===t.length?i:Gw(t),n),p=Bw(f,t,{ease:Array.isArray(u)?u:Lw(t,u)});return{calculatedDuration:n,next:m=>(c.value=p(m),c.done=m>=n,c)}}const Pw=n=>n!==null;function iS(n,{repeat:t,repeatType:i="loop"},s,u=1){const c=n.filter(Pw),p=u<0||t&&i!=="loop"&&t%2===1?0:c.length-1;return!p||s===void 0?c[p]:s}const Yw={decay:aS,inertia:aS,tween:Ch,keyframes:Ch,spring:ug};function o8(n){typeof n.type=="string"&&(n.type=Yw[n.type])}class sS{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,i){return this.finished.then(t,i)}}const qw=n=>n/100;class lS extends sS{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:i}=this.options;i&&i.updatedAt!==Ni.now()&&this.tick(Ni.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;o8(t);const{type:i=Ch,repeat:s=0,repeatDelay:u=0,repeatType:c,velocity:f=0}=t;let{keyframes:p}=t;const m=i||Ch;process.env.NODE_ENV!=="production"&&m!==Ch&&Kr(p.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${p}`,"spring-two-frames"),m!==Ch&&typeof p[0]!="number"&&(this.mixKeyframes=p0(qw,i8(p[0],p[1])),p=[0,100]);const S=m({...t,keyframes:p});c==="mirror"&&(this.mirroredGenerator=m({...t,keyframes:[...p].reverse(),velocity:-f})),S.calculatedDuration===null&&(S.calculatedDuration=tS(S));const{calculatedDuration:b}=S;this.calculatedDuration=b,this.resolvedDuration=b+u,this.totalDuration=this.resolvedDuration*(s+1)-u,this.generator=S}updateTime(t){const i=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=i}tick(t,i=!1){const{generator:s,totalDuration:u,mixKeyframes:c,mirroredGenerator:f,resolvedDuration:p,calculatedDuration:m}=this;if(this.startTime===null)return s.next(0);const{delay:S=0,keyframes:b,repeat:_,repeatType:x,repeatDelay:D,type:A,onUpdate:N,finalKeyframe:O}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),i?this.currentTime=t:this.updateTime(t);const R=this.currentTime-S*(this.playbackSpeed>=0?1:-1),U=this.playbackSpeed>=0?R<0:R>u;this.currentTime=Math.max(R,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let j=this.currentTime,G=s;if(_){const I=Math.min(this.currentTime,u)/p;let it=Math.floor(I),J=I%1;!J&&I>=1&&(J=1),J===1&&it--,it=Math.min(it,_+1),it%2&&(x==="reverse"?(J=1-J,D&&(J-=D/p)):x==="mirror"&&(G=f)),j=Xr(0,1,J)*p}const k=U?{done:!1,value:b[0]}:G.next(j);c&&(k.value=c(k.value));let{done:et}=k;!U&&m!==null&&(et=this.playbackSpeed>=0?this.currentTime>=u:this.currentTime<=0);const ft=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&et);return ft&&A!==aS&&(k.value=iS(b,this.options,O,this.speed)),N&&N(k.value),ft&&this.finish(),k}then(t,i){return this.finished.then(t,i)}get duration(){return Ds(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ds(t)}get time(){return Ds(this.currentTime)}set time(t){t=hl(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ni.now());const i=this.playbackSpeed!==t;this.playbackSpeed=t,i&&(this.time=Ds(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Dw,startTime:i}=this.options;this.driver||(this.driver=t(u=>this.tick(u))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=i??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ni.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&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}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Xw(n){for(let t=1;t<n.length;t++)n[t]??(n[t]=n[t-1])}const Ec=n=>n*180/Math.PI,rS=n=>{const t=Ec(Math.atan2(n[1],n[0]));return oS(t)},Kw={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:rS,rotateZ:rS,skewX:n=>Ec(Math.atan(n[1])),skewY:n=>Ec(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},oS=n=>(n=n%360,n<0&&(n+=360),n),u8=rS,c8=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),f8=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),Qw={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:c8,scaleY:f8,scale:n=>(c8(n)+f8(n))/2,rotateX:n=>oS(Ec(Math.atan2(n[6],n[5]))),rotateY:n=>oS(Ec(Math.atan2(-n[2],n[0]))),rotateZ:u8,rotate:u8,skewX:n=>Ec(Math.atan(n[4])),skewY:n=>Ec(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function uS(n){return n.includes("scale")?1:0}function cS(n,t){if(!n||n==="none")return uS(t);const i=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,u;if(i)s=Qw,u=i;else{const p=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Kw,u=p}if(!u)return uS(t);const c=s[t],f=u[1].split(",").map(Jw);return typeof c=="function"?c(f):f[c]}const Zw=(n,t)=>{const{transform:i="none"}=getComputedStyle(n);return cS(i,t)};function Jw(n){return parseFloat(n.trim())}const _h=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],xh=new Set(_h),h8=n=>n===Eh||n===zt,Fw=new Set(["x","y","z"]),kw=_h.filter(n=>!Fw.has(n));function Iw(n){const t=[];return kw.forEach(i=>{const s=n.getValue(i);s!==void 0&&(t.push([i,s.get()]),s.set(i.startsWith("scale")?1:0))}),t}const nu={width:({x:n},{paddingLeft:t="0",paddingRight:i="0"})=>n.max-n.min-parseFloat(t)-parseFloat(i),height:({y:n},{paddingTop:t="0",paddingBottom:i="0"})=>n.max-n.min-parseFloat(t)-parseFloat(i),top:(n,{top:t})=>parseFloat(t),left:(n,{left:t})=>parseFloat(t),bottom:({y:n},{top:t})=>parseFloat(t)+(n.max-n.min),right:({x:n},{left:t})=>parseFloat(t)+(n.max-n.min),x:(n,{transform:t})=>cS(t,"x"),y:(n,{transform:t})=>cS(t,"y")};nu.translateX=nu.x,nu.translateY=nu.y;const Tc=new Set;let fS=!1,hS=!1,dS=!1;function d8(){if(hS){const n=Array.from(Tc).filter(s=>s.needsMeasurement),t=new Set(n.map(s=>s.element)),i=new Map;t.forEach(s=>{const u=Iw(s);u.length&&(i.set(s,u),s.render())}),n.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const u=i.get(s);u&&u.forEach(([c,f])=>{s.getValue(c)?.set(f)})}),n.forEach(s=>s.measureEndState()),n.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}hS=!1,fS=!1,Tc.forEach(n=>n.complete(dS)),Tc.clear()}function p8(){Tc.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(hS=!0)})}function Ww(){dS=!0,p8(),d8(),dS=!1}class pS{constructor(t,i,s,u,c,f=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=i,this.name=s,this.motionValue=u,this.element=c,this.isAsync=f}scheduleResolve(){this.state="scheduled",this.isAsync?(Tc.add(this),fS||(fS=!0,mn.read(p8),mn.resolveKeyframes(d8))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:i,element:s,motionValue:u}=this;if(t[0]===null){const c=u?.get(),f=t[t.length-1];if(c!==void 0)t[0]=c;else if(s&&i){const p=s.readValue(i,f);p!=null&&(t[0]=p)}t[0]===void 0&&(t[0]=f),u&&c===void 0&&u.set(t[0])}Xw(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Tc.delete(this)}cancel(){this.state==="scheduled"&&(Tc.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const $w=n=>n.startsWith("--");function tU(n,t,i){$w(t)?n.style.setProperty(t,i):n.style[t]=i}const eU=jv(()=>window.ScrollTimeline!==void 0),nU={};function aU(n,t){const i=jv(n);return()=>nU[t]??i()}const m8=aU(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),E0=([n,t,i,s])=>`cubic-bezier(${n}, ${t}, ${i}, ${s})`,g8={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:E0([0,.65,.55,1]),circOut:E0([.55,0,1,.45]),backIn:E0([.31,.01,.66,-.59]),backOut:E0([.33,1.53,.69,.99])};function y8(n,t){if(n)return typeof n=="function"?m8()?s8(n,t):"ease-out":Pb(n)?E0(n):Array.isArray(n)?n.map(i=>y8(i,t)||g8.easeOut):g8[n]}function iU(n,t,i,{delay:s=0,duration:u=300,repeat:c=0,repeatType:f="loop",ease:p="easeOut",times:m}={},S=void 0){const b={[t]:i};m&&(b.offset=m);const _=y8(p,u);Array.isArray(_)&&(b.easing=_);const x={delay:s,duration:u,easing:Array.isArray(_)?"linear":_,fill:"both",iterations:c+1,direction:f==="reverse"?"alternate":"normal"};return S&&(x.pseudoElement=S),n.animate(b,x)}function v8(n){return typeof n=="function"&&"applyToOptions"in n}function sU({type:n,...t}){return v8(n)&&m8()?n.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class lU extends sS{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:i,name:s,keyframes:u,pseudoElement:c,allowFlatten:f=!1,finalKeyframe:p,onComplete:m}=t;this.isPseudoElement=!!c,this.allowFlatten=f,this.options=t,Kr(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const S=sU(t);this.animation=iU(i,s,u,S,c),S.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!c){const b=iS(u,this.options,p,this.speed);this.updateMotionValue?this.updateMotionValue(b):tU(i,s,b),this.animation.cancel()}m?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Ds(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ds(t)}get time(){return Ds(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=hl(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&eU()?(this.animation.timeline=t,xs):i(this)}}const S8={anticipate:Vb,backInOut:Bb,circInOut:jb};function rU(n){return n in S8}function oU(n){typeof n.ease=="string"&&rU(n.ease)&&(n.ease=S8[n.ease])}const b8=10;class uU extends lU{constructor(t){oU(t),o8(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:i,onUpdate:s,onComplete:u,element:c,...f}=this.options;if(!i)return;if(t!==void 0){i.set(t);return}const p=new lS({...f,autoplay:!1}),m=hl(this.finishedTime??this.time);i.setWithVelocity(p.sample(m-b8).value,p.sample(m).value,b8),p.stop()}}const E8=(n,t)=>t==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(eu.test(n)||n==="0")&&!n.startsWith("url("));function cU(n){const t=n[0];if(n.length===1)return!0;for(let i=0;i<n.length;i++)if(n[i]!==t)return!0}function fU(n,t,i,s){const u=n[0];if(u===null)return!1;if(t==="display"||t==="visibility")return!0;const c=n[n.length-1],f=E8(u,t),p=E8(c,t);return bh(f===p,`You are trying to animate ${t} from "${u}" to "${c}". "${f?c:u}" is not an animatable value.`,"value-not-animatable"),!f||!p?!1:cU(n)||(i==="spring"||v8(i))&&s}function mS(n){n.duration=0,n.type="keyframes"}const hU=new Set(["opacity","clipPath","filter","transform"]),dU=jv(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function pU(n){const{motionValue:t,name:i,repeatDelay:s,repeatType:u,damping:c,type:f}=n;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:m,transformTemplate:S}=t.owner.getProps();return dU()&&i&&hU.has(i)&&(i!=="transform"||!S)&&!m&&!s&&u!=="mirror"&&c!==0&&f!=="inertia"}const mU=40;class gU extends sS{constructor({autoplay:t=!0,delay:i=0,type:s="keyframes",repeat:u=0,repeatDelay:c=0,repeatType:f="loop",keyframes:p,name:m,motionValue:S,element:b,..._}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ni.now();const x={autoplay:t,delay:i,type:s,repeat:u,repeatDelay:c,repeatType:f,name:m,motionValue:S,element:b,..._},D=b?.KeyframeResolver||pS;this.keyframeResolver=new D(p,(A,N,O)=>this.onKeyframesResolved(A,N,x,!O),m,S,b),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,i,s,u){this.keyframeResolver=void 0;const{name:c,type:f,velocity:p,delay:m,isHandoff:S,onUpdate:b}=s;this.resolvedAt=Ni.now(),fU(t,c,f,p)||((Qr.instantAnimations||!m)&&b?.(iS(t,s,i)),t[0]=t[t.length-1],mS(s),s.repeat=0);const x={startTime:u?this.resolvedAt?this.resolvedAt-this.createdAt>mU?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:i,...s,keyframes:t},D=!S&&pU(x)?new uU({...x,element:x.motionValue.owner.current}):new lS(x);D.finished.then(()=>this.notifyFinished()).catch(xs),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(t,i){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ww()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const yU=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vU(n){const t=yU.exec(n);if(!t)return[,];const[,i,s,u]=t;return[`--${i??s}`,u]}const SU=4;function T8(n,t,i=1){Kr(i<=SU,`Max CSS variable fallback depth detected in property "${n}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,u]=vU(n);if(!s)return;const c=window.getComputedStyle(t).getPropertyValue(s);if(c){const f=c.trim();return Ab(f)?parseFloat(f):f}return Kv(u)?T8(u,t,i+1):u}function gS(n,t){return n?.[t]??n?.default??n}const C8=new Set(["width","height","top","left","right","bottom",..._h]),bU={test:n=>n==="auto",parse:n=>n},_8=n=>t=>t.test(n),x8=[Eh,zt,tr,tu,cw,uw,bU],D8=n=>x8.find(_8(n));function EU(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||Nb(n):!0}const TU=new Set(["brightness","contrast","saturate","opacity"]);function CU(n){const[t,i]=n.slice(0,-1).split("(");if(t==="drop-shadow")return n;const[s]=i.match(Qv)||[];if(!s)return n;const u=i.replace(s,"");let c=TU.has(t)?1:0;return s!==i&&(c*=100),t+"("+c+u+")"}const _U=/\b([a-z-]*)\(.*?\)/gu,yS={...eu,getAnimatableNone:n=>{const t=n.match(_U);return t?t.map(CU).join(" "):n}},A8={...Eh,transform:Math.round},vS={borderWidth:zt,borderTopWidth:zt,borderRightWidth:zt,borderBottomWidth:zt,borderLeftWidth:zt,borderRadius:zt,radius:zt,borderTopLeftRadius:zt,borderTopRightRadius:zt,borderBottomRightRadius:zt,borderBottomLeftRadius:zt,width:zt,maxWidth:zt,height:zt,maxHeight:zt,top:zt,right:zt,bottom:zt,left:zt,inset:zt,insetBlock:zt,insetBlockStart:zt,insetBlockEnd:zt,insetInline:zt,insetInlineStart:zt,insetInlineEnd:zt,padding:zt,paddingTop:zt,paddingRight:zt,paddingBottom:zt,paddingLeft:zt,paddingBlock:zt,paddingBlockStart:zt,paddingBlockEnd:zt,paddingInline:zt,paddingInlineStart:zt,paddingInlineEnd:zt,margin:zt,marginTop:zt,marginRight:zt,marginBottom:zt,marginLeft:zt,marginBlock:zt,marginBlockStart:zt,marginBlockEnd:zt,marginInline:zt,marginInlineStart:zt,marginInlineEnd:zt,backgroundPositionX:zt,backgroundPositionY:zt,...{rotate:tu,rotateX:tu,rotateY:tu,rotateZ:tu,scale:lg,scaleX:lg,scaleY:lg,scaleZ:lg,skew:tu,skewX:tu,skewY:tu,distance:zt,translateX:zt,translateY:zt,translateZ:zt,x:zt,y:zt,z:zt,perspective:zt,transformPerspective:zt,opacity:y0,originX:Fb,originY:Fb,originZ:zt},zIndex:A8,fillOpacity:y0,strokeOpacity:y0,numOctaves:A8},xU={...vS,color:ta,backgroundColor:ta,outlineColor:ta,fill:ta,stroke:ta,borderColor:ta,borderTopColor:ta,borderRightColor:ta,borderBottomColor:ta,borderLeftColor:ta,filter:yS,WebkitFilter:yS},M8=n=>xU[n];function N8(n,t){let i=M8(n);return i!==yS&&(i=eu),i.getAnimatableNone?i.getAnimatableNone(t):void 0}const DU=new Set(["auto","none","0"]);function AU(n,t,i){let s=0,u;for(;s<n.length&&!u;){const c=n[s];typeof c=="string"&&!DU.has(c)&&b0(c).values.length&&(u=n[s]),s++}if(u&&i)for(const c of t)n[c]=N8(i,u)}class MU extends pS{constructor(t,i,s,u,c){super(t,i,s,u,c,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:i,name:s}=this;if(!i||!i.current)return;super.readKeyframes();for(let b=0;b<t.length;b++){let _=t[b];if(typeof _=="string"&&(_=_.trim(),Kv(_))){const x=T8(_,i.current);x!==void 0&&(t[b]=x),b===t.length-1&&(this.finalKeyframe=_)}}if(this.resolveNoneKeyframes(),!C8.has(s)||t.length!==2)return;const[u,c]=t,f=D8(u),p=D8(c),m=Zb(u),S=Zb(c);if(m!==S&&nu[s]){this.needsMeasurement=!0;return}if(f!==p)if(h8(f)&&h8(p))for(let b=0;b<t.length;b++){const _=t[b];typeof _=="string"&&(t[b]=parseFloat(_))}else nu[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:i}=this,s=[];for(let u=0;u<t.length;u++)(t[u]===null||EU(t[u]))&&s.push(u);s.length&&AU(t,s,i)}measureInitialState(){const{element:t,unresolvedKeyframes:i,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=nu[s](t.measureViewportBox(),window.getComputedStyle(t.current)),i[0]=this.measuredOrigin;const u=i[i.length-1];u!==void 0&&t.getValue(s,u).jump(u,!1)}measureEndState(){const{element:t,name:i,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const u=t.getValue(i);u&&u.jump(this.measuredOrigin,!1);const c=s.length-1,f=s[c];s[c]=nu[i](t.measureViewportBox(),window.getComputedStyle(t.current)),f!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=f),this.removedTransforms?.length&&this.removedTransforms.forEach(([p,m])=>{t.getValue(p).set(m)}),this.resolveNoneKeyframes()}}function NU(n,t,i){if(n instanceof EventTarget)return[n];if(typeof n=="string"){let s=document;const u=i?.[n]??s.querySelectorAll(n);return u?Array.from(u):[]}return Array.from(n)}const O8=(n,t)=>t&&typeof n=="number"?t.transform(n):n;function OU(n){return Mb(n)&&"offsetHeight"in n}const R8=30,RU=n=>!isNaN(parseFloat(n));class zU{constructor(t,i={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const u=Ni.now();if(this.updatedAt!==u&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=i.owner}setCurrent(t){this.current=t,this.updatedAt=Ni.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=RU(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Pv(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,i){this.events[t]||(this.events[t]=new Lv);const s=this.events[t].add(i);return t==="change"?()=>{s(),mn.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,i){this.passiveEffect=t,this.stopPassiveEffect=i}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,i,s){this.set(i),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,i=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,i&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ni.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>R8)return 0;const i=Math.min(this.updatedAt-this.prevUpdatedAt,R8);return Ob(parseFloat(this.current)-parseFloat(this.prevFrameValue),i)}start(t){return this.stop(),new Promise(i=>{this.hasAnimated=!0,this.animation=t(i),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 Dh(n,t){return new zU(n,t)}const{schedule:SS}=Xb(queueMicrotask,!1),dl={x:!1,y:!1};function z8(){return dl.x||dl.y}function HU(n){return n==="x"||n==="y"?dl[n]?null:(dl[n]=!0,()=>{dl[n]=!1}):dl.x||dl.y?null:(dl.x=dl.y=!0,()=>{dl.x=dl.y=!1})}function H8(n,t){const i=NU(n),s=new AbortController,u={passive:!0,...t,signal:s.signal};return[i,u,()=>s.abort()]}function w8(n){return!(n.pointerType==="touch"||z8())}function wU(n,t,i={}){const[s,u,c]=H8(n,i),f=p=>{if(!w8(p))return;const{target:m}=p,S=t(m,p);if(typeof S!="function"||!m)return;const b=_=>{w8(_)&&(S(_),m.removeEventListener("pointerleave",b))};m.addEventListener("pointerleave",b,u)};return s.forEach(p=>{p.addEventListener("pointerenter",f,u)}),c}const U8=(n,t)=>t?n===t?!0:U8(n,t.parentElement):!1,bS=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1,UU=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function B8(n){return UU.has(n.tagName)||n.isContentEditable===!0}const cg=new WeakSet;function V8(n){return t=>{t.key==="Enter"&&n(t)}}function ES(n,t){n.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const BU=(n,t)=>{const i=n.currentTarget;if(!i)return;const s=V8(()=>{if(cg.has(i))return;ES(i,"down");const u=V8(()=>{ES(i,"up")}),c=()=>ES(i,"cancel");i.addEventListener("keyup",u,t),i.addEventListener("blur",c,t)});i.addEventListener("keydown",s,t),i.addEventListener("blur",()=>i.removeEventListener("keydown",s),t)};function G8(n){return bS(n)&&!z8()}function VU(n,t,i={}){const[s,u,c]=H8(n,i),f=p=>{const m=p.currentTarget;if(!G8(p))return;cg.add(m);const S=t(m,p),b=(D,A)=>{window.removeEventListener("pointerup",_),window.removeEventListener("pointercancel",x),cg.has(m)&&cg.delete(m),G8(D)&&typeof S=="function"&&S(D,{success:A})},_=D=>{b(D,m===window||m===document||i.useGlobalTarget||U8(m,D.target))},x=D=>{b(D,!1)};window.addEventListener("pointerup",_,u),window.addEventListener("pointercancel",x,u)};return s.forEach(p=>{(i.useGlobalTarget?window:p).addEventListener("pointerdown",f,u),OU(p)&&(p.addEventListener("focus",S=>BU(S,u)),!B8(p)&&!p.hasAttribute("tabindex")&&(p.tabIndex=0))}),c}function j8(n){return Mb(n)&&"ownerSVGElement"in n}function GU(n){return j8(n)&&n.tagName==="svg"}const Ia=n=>!!(n&&n.getVelocity),jU=[...x8,ta,eu],LU=n=>jU.find(_8(n)),L8=w.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});function PU(n=!0){const t=w.useContext(Uv);if(t===null)return[!0,null];const{isPresent:i,onExitComplete:s,register:u}=t,c=w.useId();w.useEffect(()=>{if(n)return u(c)},[n]);const f=w.useCallback(()=>n&&s&&s(c),[c,s,n]);return!i&&s?[!1,f]:[!0]}const P8=w.createContext({strict:!1}),Y8={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"]},Ah={};for(const n in Y8)Ah[n]={isEnabled:t=>Y8[n].some(i=>!!t[i])};function YU(n){for(const t in n)Ah[t]={...Ah[t],...n[t]}}const qU=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 fg(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||qU.has(n)}let q8=n=>!fg(n);function XU(n){typeof n=="function"&&(q8=t=>t.startsWith("on")?!fg(t):n(t))}try{XU(require("@emotion/is-prop-valid").default)}catch{}function KU(n,t,i){const s={};for(const u in n)u==="values"&&typeof n.values=="object"||(q8(u)||i===!0&&fg(u)||!t&&!fg(u)||n.draggable&&u.startsWith("onDrag"))&&(s[u]=n[u]);return s}const hg=w.createContext({});function dg(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function T0(n){return typeof n=="string"||Array.isArray(n)}const TS=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],CS=["initial",...TS];function pg(n){return dg(n.animate)||CS.some(t=>T0(n[t]))}function X8(n){return!!(pg(n)||n.variants)}function QU(n,t){if(pg(n)){const{initial:i,animate:s}=n;return{initial:i===!1||T0(i)?i:void 0,animate:T0(s)?s:void 0}}return n.inherit!==!1?t:{}}function ZU(n){const{initial:t,animate:i}=QU(n,w.useContext(hg));return w.useMemo(()=>({initial:t,animate:i}),[K8(t),K8(i)])}function K8(n){return Array.isArray(n)?n.join(" "):n}function Q8(n,t){return t.max===t.min?0:n/(t.max-t.min)*100}const C0={correct:(n,t)=>{if(!t.target)return n;if(typeof n=="string")if(zt.test(n))n=parseFloat(n);else return n;const i=Q8(n,t.target.x),s=Q8(n,t.target.y);return`${i}% ${s}%`}},JU={correct:(n,{treeScale:t,projectionDelta:i})=>{const s=n,u=eu.parse(n);if(u.length>5)return s;const c=eu.createTransformer(n),f=typeof u[0]!="number"?1:0,p=i.x.scale*t.x,m=i.y.scale*t.y;u[0+f]/=p,u[1+f]/=m;const S=xn(p,m,.5);return typeof u[2+f]=="number"&&(u[2+f]/=S),typeof u[3+f]=="number"&&(u[3+f]/=S),c(u)}},_S={borderRadius:{...C0,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:C0,borderTopRightRadius:C0,borderBottomLeftRadius:C0,borderBottomRightRadius:C0,boxShadow:JU};function Z8(n,{layout:t,layoutId:i}){return xh.has(n)||n.startsWith("origin")||(t||i!==void 0)&&(!!_S[n]||n==="opacity")}const FU={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},kU=_h.length;function IU(n,t,i){let s="",u=!0;for(let c=0;c<kU;c++){const f=_h[c],p=n[f];if(p===void 0)continue;let m=!0;if(typeof p=="number"?m=p===(f.startsWith("scale")?1:0):m=parseFloat(p)===0,!m||i){const S=O8(p,vS[f]);if(!m){u=!1;const b=FU[f]||f;s+=`${b}(${S}) `}i&&(t[f]=S)}}return s=s.trim(),i?s=i(t,u?"":s):u&&(s="none"),s}function xS(n,t,i){const{style:s,vars:u,transformOrigin:c}=n;let f=!1,p=!1;for(const m in t){const S=t[m];if(xh.has(m)){f=!0;continue}else if(Qb(m)){u[m]=S;continue}else{const b=O8(S,vS[m]);m.startsWith("origin")?(p=!0,c[m]=b):s[m]=b}}if(t.transform||(f||i?s.transform=IU(t,n.transform,i):s.transform&&(s.transform="none")),p){const{originX:m="50%",originY:S="50%",originZ:b=0}=c;s.transformOrigin=`${m} ${S} ${b}`}}const DS=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function J8(n,t,i){for(const s in t)!Ia(t[s])&&!Z8(s,i)&&(n[s]=t[s])}function WU({transformTemplate:n},t){return w.useMemo(()=>{const i=DS();return xS(i,t,n),Object.assign({},i.vars,i.style)},[t])}function $U(n,t){const i=n.style||{},s={};return J8(s,i,n),Object.assign(s,WU(n,t)),s}function tB(n,t){const i={},s=$U(n,t);return n.drag&&n.dragListener!==!1&&(i.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(i.tabIndex=0),i.style=s,i}const eB={offset:"stroke-dashoffset",array:"stroke-dasharray"},nB={offset:"strokeDashoffset",array:"strokeDasharray"};function aB(n,t,i=1,s=0,u=!0){n.pathLength=1;const c=u?eB:nB;n[c.offset]=zt.transform(-s);const f=zt.transform(t),p=zt.transform(i);n[c.array]=`${f} ${p}`}const iB=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function F8(n,{attrX:t,attrY:i,attrScale:s,pathLength:u,pathSpacing:c=1,pathOffset:f=0,...p},m,S,b){if(xS(n,p,S),m){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:_,style:x}=n;_.transform&&(x.transform=_.transform,delete _.transform),(x.transform||_.transformOrigin)&&(x.transformOrigin=_.transformOrigin??"50% 50%",delete _.transformOrigin),x.transform&&(x.transformBox=b?.transformBox??"fill-box",delete _.transformBox);for(const D of iB)_[D]!==void 0&&(x[D]=_[D],delete _[D]);t!==void 0&&(_.x=t),i!==void 0&&(_.y=i),s!==void 0&&(_.scale=s),u!==void 0&&aB(_,u,c,f,!1)}const k8=()=>({...DS(),attrs:{}}),I8=n=>typeof n=="string"&&n.toLowerCase()==="svg";function sB(n,t,i,s){const u=w.useMemo(()=>{const c=k8();return F8(c,t,I8(s),n.transformTemplate,n.style),{...c.attrs,style:{...c.style}}},[t]);if(n.style){const c={};J8(c,n.style,n),u.style={...c,...u.style}}return u}const lB=["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 AS(n){return typeof n!="string"||n.includes("-")?!1:!!(lB.indexOf(n)>-1||/[A-Z]/u.test(n))}function rB(n,t,i,{latestValues:s},u,c=!1,f){const m=(f??AS(n)?sB:tB)(t,s,u,n),S=KU(t,typeof n=="string",c),b=n!==w.Fragment?{...S,...m,ref:i}:{},{children:_}=t,x=w.useMemo(()=>Ia(_)?_.get():_,[_]);return w.createElement(n,{...b,children:x})}function W8(n){const t=[{},{}];return n?.values.forEach((i,s)=>{t[0][s]=i.get(),t[1][s]=i.getVelocity()}),t}function MS(n,t,i,s){if(typeof t=="function"){const[u,c]=W8(s);t=t(i!==void 0?i:n.custom,u,c)}if(typeof t=="string"&&(t=n.variants&&n.variants[t]),typeof t=="function"){const[u,c]=W8(s);t=t(i!==void 0?i:n.custom,u,c)}return t}function mg(n){return Ia(n)?n.get():n}function oB({scrapeMotionValuesFromProps:n,createRenderState:t},i,s,u){return{latestValues:uB(i,s,u,n),renderState:t()}}function uB(n,t,i,s){const u={},c=s(n,{});for(const x in c)u[x]=mg(c[x]);let{initial:f,animate:p}=n;const m=pg(n),S=X8(n);t&&S&&!m&&n.inherit!==!1&&(f===void 0&&(f=t.initial),p===void 0&&(p=t.animate));let b=i?i.initial===!1:!1;b=b||f===!1;const _=b?p:f;if(_&&typeof _!="boolean"&&!dg(_)){const x=Array.isArray(_)?_:[_];for(let D=0;D<x.length;D++){const A=MS(n,x[D]);if(A){const{transitionEnd:N,transition:O,...R}=A;for(const U in R){let j=R[U];if(Array.isArray(j)){const G=b?j.length-1:0;j=j[G]}j!==null&&(u[U]=j)}for(const U in N)u[U]=N[U]}}}return u}const $8=n=>(t,i)=>{const s=w.useContext(hg),u=w.useContext(Uv),c=()=>oB(n,t,s,u);return i?c():XH(c)};function NS(n,t,i){const{style:s}=n,u={};for(const c in s)(Ia(s[c])||t.style&&Ia(t.style[c])||Z8(c,n)||i?.getValue(c)?.liveStyle!==void 0)&&(u[c]=s[c]);return u}const cB=$8({scrapeMotionValuesFromProps:NS,createRenderState:DS});function t7(n,t,i){const s=NS(n,t,i);for(const u in n)if(Ia(n[u])||Ia(t[u])){const c=_h.indexOf(u)!==-1?"attr"+u.charAt(0).toUpperCase()+u.substring(1):u;s[c]=n[u]}return s}const fB=$8({scrapeMotionValuesFromProps:t7,createRenderState:k8}),hB=Symbol.for("motionComponentSymbol");function dB(n,t,i){const s=w.useRef(i);w.useInsertionEffect(()=>{s.current=i});const u=w.useRef(null);return w.useCallback(c=>{c&&n.onMount?.(c),t&&(c?t.mount(c):t.unmount());const f=s.current;if(typeof f=="function")if(c){const p=f(c);typeof p=="function"&&(u.current=p)}else u.current?(u.current(),u.current=null):f(c);else f&&(f.current=c)},[t])}const OS=n=>n.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),e7="data-"+OS("framerAppearId"),n7=w.createContext({});function _0(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function pB(n,t,i,s,u,c){const{visualElement:f}=w.useContext(hg),p=w.useContext(P8),m=w.useContext(Uv),S=w.useContext(L8).reducedMotion,b=w.useRef(null);s=s||p.renderer,!b.current&&s&&(b.current=s(n,{visualState:t,parent:f,props:i,presenceContext:m,blockInitialAnimation:m?m.initial===!1:!1,reducedMotionConfig:S,isSVG:c}));const _=b.current,x=w.useContext(n7);_&&!_.projection&&u&&(_.type==="html"||_.type==="svg")&&mB(b.current,i,u,x);const D=w.useRef(!1);w.useInsertionEffect(()=>{_&&D.current&&_.update(i,m)});const A=i[e7],N=w.useRef(!!A&&!window.MotionHandoffIsComplete?.(A)&&window.MotionHasOptimisedAnimation?.(A));return KH(()=>{_&&(D.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),_.scheduleRenderMicrotask(),N.current&&_.animationState&&_.animationState.animateChanges())}),w.useEffect(()=>{_&&(!N.current&&_.animationState&&_.animationState.animateChanges(),N.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(A)}),N.current=!1),_.enteringChildren=void 0)}),_}function mB(n,t,i,s){const{layoutId:u,layout:c,drag:f,dragConstraints:p,layoutScroll:m,layoutRoot:S,layoutCrossfade:b}=t;n.projection=new i(n.latestValues,t["data-framer-portal-id"]?void 0:a7(n.parent)),n.projection.setOptions({layoutId:u,layout:c,alwaysMeasureLayout:!!f||p&&_0(p),visualElement:n,animationType:typeof c=="string"?c:"both",initialPromotionConfig:s,crossfade:b,layoutScroll:m,layoutRoot:S})}function a7(n){if(n)return n.options.allowProjection!==!1?n.projection:a7(n.parent)}function RS(n,{forwardMotionProps:t=!1,type:i}={},s,u){s&&YU(s);const c=i?i==="svg":AS(n),f=c?fB:cB;function p(S,b){let _;const x={...w.useContext(L8),...S,layoutId:gB(S)},{isStatic:D}=x,A=ZU(S),N=f(S,D);if(!D&&wv){yB(x,s);const O=vB(x);_=O.MeasureLayout,A.visualElement=pB(n,N,x,u,O.ProjectionNode,c)}return X.jsxs(hg.Provider,{value:A,children:[_&&A.visualElement?X.jsx(_,{visualElement:A.visualElement,...x}):null,rB(n,S,dB(N,A.visualElement,b),N,D,t,c)]})}p.displayName=`motion.${typeof n=="string"?n:`create(${n.displayName??n.name??""})`}`;const m=w.forwardRef(p);return m[hB]=n,m}function gB({layoutId:n}){const t=w.useContext(Db).id;return t&&n!==void 0?t+"-"+n:n}function yB(n,t){const i=w.useContext(P8).strict;if(process.env.NODE_ENV!=="production"&&t&&i){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?bh(!1,s,"lazy-strict-mode"):Kr(!1,s,"lazy-strict-mode")}}function vB(n){const{drag:t,layout:i}=Ah;if(!t&&!i)return{};const s={...t,...i};return{MeasureLayout:t?.isEnabled(n)||i?.isEnabled(n)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function SB(n,t){if(typeof Proxy>"u")return RS;const i=new Map,s=(c,f)=>RS(c,f,n,t),u=(c,f)=>(process.env.NODE_ENV!=="production"&&Pv(!1,"motion() is deprecated. Use motion.create() instead."),s(c,f));return new Proxy(u,{get:(c,f)=>f==="create"?s:(i.has(f)||i.set(f,RS(f,void 0,n,t)),i.get(f))})}function i7({top:n,left:t,right:i,bottom:s}){return{x:{min:t,max:i},y:{min:n,max:s}}}function bB({x:n,y:t}){return{top:t.min,right:n.max,bottom:t.max,left:n.min}}function EB(n,t){if(!t)return n;const i=t({x:n.left,y:n.top}),s=t({x:n.right,y:n.bottom});return{top:i.y,left:i.x,bottom:s.y,right:s.x}}function zS(n){return n===void 0||n===1}function HS({scale:n,scaleX:t,scaleY:i}){return!zS(n)||!zS(t)||!zS(i)}function Cc(n){return HS(n)||s7(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function s7(n){return l7(n.x)||l7(n.y)}function l7(n){return n&&n!=="0%"}function gg(n,t,i){const s=n-i,u=t*s;return i+u}function r7(n,t,i,s,u){return u!==void 0&&(n=gg(n,u,s)),gg(n,i,s)+t}function wS(n,t=0,i=1,s,u){n.min=r7(n.min,t,i,s,u),n.max=r7(n.max,t,i,s,u)}function o7(n,{x:t,y:i}){wS(n.x,t.translate,t.scale,t.originPoint),wS(n.y,i.translate,i.scale,i.originPoint)}const u7=.999999999999,c7=1.0000000000001;function TB(n,t,i,s=!1){const u=i.length;if(!u)return;t.x=t.y=1;let c,f;for(let p=0;p<u;p++){c=i[p],f=c.projectionDelta;const{visualElement:m}=c.options;m&&m.props.style&&m.props.style.display==="contents"||(s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Nh(n,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),f&&(t.x*=f.x.scale,t.y*=f.y.scale,o7(n,f)),s&&Cc(c.latestValues)&&Nh(n,c.latestValues))}t.x<c7&&t.x>u7&&(t.x=1),t.y<c7&&t.y>u7&&(t.y=1)}function Mh(n,t){n.min=n.min+t,n.max=n.max+t}function f7(n,t,i,s,u=.5){const c=xn(n.min,n.max,u);wS(n,t,i,c,s)}function Nh(n,t){f7(n.x,t.x,t.scaleX,t.scale,t.originX),f7(n.y,t.y,t.scaleY,t.scale,t.originY)}function h7(n,t){return i7(EB(n.getBoundingClientRect(),t))}function CB(n,t,i){const s=h7(n,i),{scroll:u}=t;return u&&(Mh(s.x,u.offset.x),Mh(s.y,u.offset.y)),s}const d7=()=>({translate:0,scale:1,origin:0,originPoint:0}),Oh=()=>({x:d7(),y:d7()}),p7=()=>({min:0,max:0}),ha=()=>({x:p7(),y:p7()}),US={current:null},m7={current:!1};function _B(){if(m7.current=!0,!!wv)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),t=()=>US.current=n.matches;n.addEventListener("change",t),t()}else US.current=!1}const xB=new WeakMap;function DB(n,t,i){for(const s in t){const u=t[s],c=i[s];if(Ia(u))n.addValue(s,u);else if(Ia(c))n.addValue(s,Dh(u,{owner:n}));else if(c!==u)if(n.hasValue(s)){const f=n.getValue(s);f.liveStyle===!0?f.jump(u):f.hasAnimated||f.set(u)}else{const f=n.getStaticValue(s);n.addValue(s,Dh(f!==void 0?f:u,{owner:n}))}}for(const s in i)t[s]===void 0&&n.removeValue(s);return t}const g7=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class AB{scrapeMotionValuesFromProps(t,i,s){return{}}constructor({parent:t,props:i,presenceContext:s,reducedMotionConfig:u,blockInitialAnimation:c,visualState:f},p={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=pS,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=()=>{const x=Ni.now();this.renderScheduledAt<x&&(this.renderScheduledAt=x,mn.render(this.render,!1,!0))};const{latestValues:m,renderState:S}=f;this.latestValues=m,this.baseTarget={...m},this.initialValues=i.initial?{...m}:{},this.renderState=S,this.parent=t,this.props=i,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=u,this.options=p,this.blockInitialAnimation=!!c,this.isControllingVariants=pg(i),this.isVariantNode=X8(i),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:b,..._}=this.scrapeMotionValuesFromProps(i,{},this);for(const x in _){const D=_[x];m[x]!==void 0&&Ia(D)&&D.set(m[x])}}mount(t){this.current=t,xB.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,s)=>this.bindToMotionValue(s,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(m7.current||_B(),this.shouldReduceMotion=US.current),process.env.NODE_ENV!=="production"&&Pv(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),$o(this.notifyUpdate),$o(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const i=this.features[t];i&&(i.unmount(),i.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,i){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=xh.has(t);s&&this.onBindTransform&&this.onBindTransform();const u=i.on("change",f=>{this.latestValues[t]=f,this.props.onUpdate&&mn.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let c;window.MotionCheckAppearSync&&(c=window.MotionCheckAppearSync(this,t,i)),this.valueSubscriptions.set(t,()=>{u(),c&&c(),i.owner&&i.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ah){const i=Ah[t];if(!i)continue;const{isEnabled:s,Feature:u}=i;if(!this.features[t]&&u&&s(this.props)&&(this.features[t]=new u(this)),this.features[t]){const c=this.features[t];c.isMounted?c.update():(c.mount(),c.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ha()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,i){this.latestValues[t]=i}update(t,i){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=i;for(let s=0;s<g7.length;s++){const u=g7[s];this.propEventSubscriptions[u]&&(this.propEventSubscriptions[u](),delete this.propEventSubscriptions[u]);const c="on"+u,f=t[c];f&&(this.propEventSubscriptions[u]=this.on(u,f))}this.prevMotionValues=DB(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const i=this.getClosestVariantNode();if(i)return i.variantChildren&&i.variantChildren.add(t),()=>i.variantChildren.delete(t)}addValue(t,i){const s=this.values.get(t);i!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,i),this.values.set(t,i),this.latestValues[t]=i.get())}removeValue(t){this.values.delete(t);const i=this.valueSubscriptions.get(t);i&&(i(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,i){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&i!==void 0&&(s=Dh(i===null?void 0:i,{owner:this}),this.addValue(t,s)),s}readValue(t,i){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(Ab(s)||Nb(s))?s=parseFloat(s):!LU(s)&&eu.test(i)&&(s=N8(t,i)),this.setBaseTarget(t,Ia(s)?s.get():s)),Ia(s)?s.get():s}setBaseTarget(t,i){this.baseTarget[t]=i}getBaseTarget(t){const{initial:i}=this.props;let s;if(typeof i=="string"||typeof i=="object"){const c=MS(this.props,i,this.presenceContext?.custom);c&&(s=c[t])}if(i&&s!==void 0)return s;const u=this.getBaseTargetFromProps(this.props,t);return u!==void 0&&!Ia(u)?u:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,i){return this.events[t]||(this.events[t]=new Lv),this.events[t].add(i)}notify(t,...i){this.events[t]&&this.events[t].notify(...i)}scheduleRenderMicrotask(){SS.render(this.render)}}class y7 extends AB{constructor(){super(...arguments),this.KeyframeResolver=MU}sortInstanceNodePosition(t,i){return t.compareDocumentPosition(i)&2?1:-1}getBaseTargetFromProps(t,i){return t.style?t.style[i]:void 0}removeValueFromRenderState(t,{vars:i,style:s}){delete i[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ia(t)&&(this.childSubscription=t.on("change",i=>{this.current&&(this.current.textContent=`${i}`)}))}}function v7(n,{style:t,vars:i},s,u){const c=n.style;let f;for(f in t)c[f]=t[f];u?.applyProjectionStyles(c,s);for(f in i)c.setProperty(f,i[f])}function MB(n){return window.getComputedStyle(n)}class NB extends y7{constructor(){super(...arguments),this.type="html",this.renderInstance=v7}readValueFromInstance(t,i){if(xh.has(i))return this.projection?.isProjecting?uS(i):Zw(t,i);{const s=MB(t),u=(Qb(i)?s.getPropertyValue(i):s[i])||0;return typeof u=="string"?u.trim():u}}measureInstanceViewportBox(t,{transformPagePoint:i}){return h7(t,i)}build(t,i,s){xS(t,i,s.transformTemplate)}scrapeMotionValuesFromProps(t,i,s){return NS(t,i,s)}}const S7=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"]);function OB(n,t,i,s){v7(n,t,void 0,s);for(const u in t.attrs)n.setAttribute(S7.has(u)?u:OS(u),t.attrs[u])}class RB extends y7{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ha}getBaseTargetFromProps(t,i){return t[i]}readValueFromInstance(t,i){if(xh.has(i)){const s=M8(i);return s&&s.default||0}return i=S7.has(i)?i:OS(i),t.getAttribute(i)}scrapeMotionValuesFromProps(t,i,s){return t7(t,i,s)}build(t,i,s){F8(t,i,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,i,s,u){OB(t,i,s,u)}mount(t){this.isSVGTag=I8(t.tagName),super.mount(t)}}const zB=(n,t)=>t.isSVG??AS(n)?new RB(t):new NB(t,{allowProjection:n!==w.Fragment});function Rh(n,t,i){const s=n.getProps();return MS(s,t,i!==void 0?i:s.custom,n)}const BS=n=>Array.isArray(n);function HB(n,t,i){n.hasValue(t)?n.getValue(t).set(i):n.addValue(t,Dh(i))}function wB(n){return BS(n)?n[n.length-1]||0:n}function UB(n,t){const i=Rh(n,t);let{transitionEnd:s={},transition:u={},...c}=i||{};c={...c,...s};for(const f in c){const p=wB(c[f]);HB(n,f,p)}}function BB(n){return!!(Ia(n)&&n.add)}function VS(n,t){const i=n.getValue("willChange");if(BB(i))return i.add(t);if(!i&&Qr.WillChange){const s=new Qr.WillChange("auto");n.addValue("willChange",s),s.add(t)}}function b7(n){return n.props[e7]}const VB=n=>n!==null;function GB(n,{repeat:t,repeatType:i="loop"},s){const u=n.filter(VB),c=t&&i!=="loop"&&t%2===1?0:u.length-1;return u[c]}const jB={type:"spring",stiffness:500,damping:25,restSpeed:10},LB=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),PB={type:"keyframes",duration:.8},YB={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},qB=(n,{keyframes:t})=>t.length>2?PB:xh.has(n)?n.startsWith("scale")?LB(t[1]):jB:YB;function XB({when:n,delay:t,delayChildren:i,staggerChildren:s,staggerDirection:u,repeat:c,repeatType:f,repeatDelay:p,from:m,elapsed:S,...b}){return!!Object.keys(b).length}const GS=(n,t,i,s={},u,c)=>f=>{const p=gS(s,n)||{},m=p.delay||s.delay||0;let{elapsed:S=0}=s;S=S-hl(m);const b={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:t.getVelocity(),...p,delay:-S,onUpdate:x=>{t.set(x),p.onUpdate&&p.onUpdate(x)},onComplete:()=>{f(),p.onComplete&&p.onComplete()},name:n,motionValue:t,element:c?void 0:u};XB(p)||Object.assign(b,qB(n,b)),b.duration&&(b.duration=hl(b.duration)),b.repeatDelay&&(b.repeatDelay=hl(b.repeatDelay)),b.from!==void 0&&(b.keyframes[0]=b.from);let _=!1;if((b.type===!1||b.duration===0&&!b.repeatDelay)&&(mS(b),b.delay===0&&(_=!0)),(Qr.instantAnimations||Qr.skipAnimations)&&(_=!0,mS(b),b.delay=0),b.allowFlatten=!p.type&&!p.ease,_&&!c&&t.get()!==void 0){const x=GB(b.keyframes,p);if(x!==void 0){mn.update(()=>{b.onUpdate(x),b.onComplete()});return}}return p.isSync?new lS(b):new gU(b)};function KB({protectedKeys:n,needsAnimating:t},i){const s=n.hasOwnProperty(i)&&t[i]!==!0;return t[i]=!1,s}function E7(n,t,{delay:i=0,transitionOverride:s,type:u}={}){let{transition:c=n.getDefaultTransition(),transitionEnd:f,...p}=t;s&&(c=s);const m=[],S=u&&n.animationState&&n.animationState.getState()[u];for(const b in p){const _=n.getValue(b,n.latestValues[b]??null),x=p[b];if(x===void 0||S&&KB(S,b))continue;const D={delay:i,...gS(c||{},b)},A=_.get();if(A!==void 0&&!_.isAnimating&&!Array.isArray(x)&&x===A&&!D.velocity)continue;let N=!1;if(window.MotionHandoffAnimation){const R=b7(n);if(R){const U=window.MotionHandoffAnimation(R,b,mn);U!==null&&(D.startTime=U,N=!0)}}VS(n,b),_.start(GS(b,_,x,n.shouldReduceMotion&&C8.has(b)?{type:!1}:D,n,N));const O=_.animation;O&&m.push(O)}return f&&Promise.all(m).then(()=>{mn.update(()=>{f&&UB(n,f)})}),m}function T7(n,t,i,s=0,u=1){const c=Array.from(n).sort((S,b)=>S.sortNodePosition(b)).indexOf(t),f=n.size,p=(f-1)*s;return typeof i=="function"?i(c,f):u===1?c*s:p-c*s}function jS(n,t,i={}){const s=Rh(n,t,i.type==="exit"?n.presenceContext?.custom:void 0);let{transition:u=n.getDefaultTransition()||{}}=s||{};i.transitionOverride&&(u=i.transitionOverride);const c=s?()=>Promise.all(E7(n,s,i)):()=>Promise.resolve(),f=n.variantChildren&&n.variantChildren.size?(m=0)=>{const{delayChildren:S=0,staggerChildren:b,staggerDirection:_}=u;return QB(n,t,m,S,b,_,i)}:()=>Promise.resolve(),{when:p}=u;if(p){const[m,S]=p==="beforeChildren"?[c,f]:[f,c];return m().then(()=>S())}else return Promise.all([c(),f(i.delay)])}function QB(n,t,i=0,s=0,u=0,c=1,f){const p=[];for(const m of n.variantChildren)m.notify("AnimationStart",t),p.push(jS(m,t,{...f,delay:i+(typeof s=="function"?0:s)+T7(n.variantChildren,m,s,u,c)}).then(()=>m.notify("AnimationComplete",t)));return Promise.all(p)}function ZB(n,t,i={}){n.notify("AnimationStart",t);let s;if(Array.isArray(t)){const u=t.map(c=>jS(n,c,i));s=Promise.all(u)}else if(typeof t=="string")s=jS(n,t,i);else{const u=typeof t=="function"?Rh(n,t,i.custom):t;s=Promise.all(E7(n,u,i))}return s.then(()=>{n.notify("AnimationComplete",t)})}function C7(n,t){if(!Array.isArray(t))return!1;const i=t.length;if(i!==n.length)return!1;for(let s=0;s<i;s++)if(t[s]!==n[s])return!1;return!0}const JB=CS.length;function _7(n){if(!n)return;if(!n.isControllingVariants){const i=n.parent?_7(n.parent)||{}:{};return n.props.initial!==void 0&&(i.initial=n.props.initial),i}const t={};for(let i=0;i<JB;i++){const s=CS[i],u=n.props[s];(T0(u)||u===!1)&&(t[s]=u)}return t}const FB=[...TS].reverse(),kB=TS.length;function IB(n){return t=>Promise.all(t.map(({animation:i,options:s})=>ZB(n,i,s)))}function WB(n){let t=IB(n),i=x7(),s=!0;const u=m=>(S,b)=>{const _=Rh(n,b,m==="exit"?n.presenceContext?.custom:void 0);if(_){const{transition:x,transitionEnd:D,...A}=_;S={...S,...A,...D}}return S};function c(m){t=m(n)}function f(m){const{props:S}=n,b=_7(n.parent)||{},_=[],x=new Set;let D={},A=1/0;for(let O=0;O<kB;O++){const R=FB[O],U=i[R],j=S[R]!==void 0?S[R]:b[R],G=T0(j),k=R===m?U.isActive:null;k===!1&&(A=O);let et=j===b[R]&&j!==S[R]&&G;if(et&&s&&n.manuallyAnimateOnMount&&(et=!1),U.protectedKeys={...D},!U.isActive&&k===null||!j&&!U.prevProp||dg(j)||typeof j=="boolean")continue;const ft=$B(U.prevProp,j);let I=ft||R===m&&U.isActive&&!et&&G||O>A&&G,it=!1;const J=Array.isArray(j)?j:[j];let St=J.reduce(u(R),{});k===!1&&(St={});const{prevResolvedValues:nt={}}=U,ht={...nt,...St},yt=Q=>{I=!0,x.has(Q)&&(it=!0,x.delete(Q)),U.needsAnimating[Q]=!0;const K=n.getValue(Q);K&&(K.liveStyle=!1)};for(const Q in ht){const K=St[Q],pt=nt[Q];if(D.hasOwnProperty(Q))continue;let dt=!1;BS(K)&&BS(pt)?dt=!C7(K,pt):dt=K!==pt,dt?K!=null?yt(Q):x.add(Q):K!==void 0&&x.has(Q)?yt(Q):U.protectedKeys[Q]=!0}U.prevProp=j,U.prevResolvedValues=St,U.isActive&&(D={...D,...St}),s&&n.blockInitialAnimation&&(I=!1);const tt=et&&ft;I&&(!tt||it)&&_.push(...J.map(Q=>{const K={type:R};if(typeof Q=="string"&&s&&!tt&&n.manuallyAnimateOnMount&&n.parent){const{parent:pt}=n,dt=Rh(pt,Q);if(pt.enteringChildren&&dt){const{delayChildren:$}=dt.transition||{};K.delay=T7(pt.enteringChildren,n,$)}}return{animation:Q,options:K}}))}if(x.size){const O={};if(typeof S.initial!="boolean"){const R=Rh(n,Array.isArray(S.initial)?S.initial[0]:S.initial);R&&R.transition&&(O.transition=R.transition)}x.forEach(R=>{const U=n.getBaseTarget(R),j=n.getValue(R);j&&(j.liveStyle=!0),O[R]=U??null}),_.push({animation:O})}let N=!!_.length;return s&&(S.initial===!1||S.initial===S.animate)&&!n.manuallyAnimateOnMount&&(N=!1),s=!1,N?t(_):Promise.resolve()}function p(m,S){if(i[m].isActive===S)return Promise.resolve();n.variantChildren?.forEach(_=>_.animationState?.setActive(m,S)),i[m].isActive=S;const b=f(m);for(const _ in i)i[_].protectedKeys={};return b}return{animateChanges:f,setActive:p,setAnimateFunction:c,getState:()=>i,reset:()=>{i=x7()}}}function $B(n,t){return typeof t=="string"?t!==n:Array.isArray(t)?!C7(t,n):!1}function _c(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function x7(){return{animate:_c(!0),whileInView:_c(),whileHover:_c(),whileTap:_c(),whileDrag:_c(),whileFocus:_c(),exit:_c()}}class au{constructor(t){this.isMounted=!1,this.node=t}update(){}}class tV extends au{constructor(t){super(t),t.animationState||(t.animationState=WB(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();dg(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:i}=this.node.prevProps||{};t!==i&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let eV=0;class nV extends au{constructor(){super(...arguments),this.id=eV++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:i}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const u=this.node.animationState.setActive("exit",!t);i&&!t&&u.then(()=>{i(this.id)})}mount(){const{register:t,onExitComplete:i}=this.node.presenceContext||{};i&&i(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const aV={animation:{Feature:tV},exit:{Feature:nV}};function x0(n,t,i,s={passive:!0}){return n.addEventListener(t,i,s),()=>n.removeEventListener(t,i)}function D0(n){return{point:{x:n.pageX,y:n.pageY}}}const iV=n=>t=>bS(t)&&n(t,D0(t));function A0(n,t,i,s){return x0(n,t,iV(i),s)}const D7=1e-4,sV=1-D7,lV=1+D7,A7=.01,rV=0-A7,oV=0+A7;function hi(n){return n.max-n.min}function uV(n,t,i){return Math.abs(n-t)<=i}function M7(n,t,i,s=.5){n.origin=s,n.originPoint=xn(t.min,t.max,n.origin),n.scale=hi(i)/hi(t),n.translate=xn(i.min,i.max,n.origin)-n.originPoint,(n.scale>=sV&&n.scale<=lV||isNaN(n.scale))&&(n.scale=1),(n.translate>=rV&&n.translate<=oV||isNaN(n.translate))&&(n.translate=0)}function M0(n,t,i,s){M7(n.x,t.x,i.x,s?s.originX:void 0),M7(n.y,t.y,i.y,s?s.originY:void 0)}function N7(n,t,i){n.min=i.min+t.min,n.max=n.min+hi(t)}function cV(n,t,i){N7(n.x,t.x,i.x),N7(n.y,t.y,i.y)}function O7(n,t,i){n.min=t.min-i.min,n.max=n.min+hi(t)}function yg(n,t,i){O7(n.x,t.x,i.x),O7(n.y,t.y,i.y)}function As(n){return[n("x"),n("y")]}const R7=({current:n})=>n?n.ownerDocument.defaultView:null,z7=(n,t)=>Math.abs(n-t);function fV(n,t){const i=z7(n.x,t.x),s=z7(n.y,t.y);return Math.sqrt(i**2+s**2)}class H7{constructor(t,i,{transformPagePoint:s,contextWindow:u=window,dragSnapToOrigin:c=!1,distanceThreshold:f=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=PS(this.lastMoveEventInfo,this.history),D=this.startEvent!==null,A=fV(x.offset,{x:0,y:0})>=this.distanceThreshold;if(!D&&!A)return;const{point:N}=x,{timestamp:O}=Ua;this.history.push({...N,timestamp:O});const{onStart:R,onMove:U}=this.handlers;D||(R&&R(this.lastMoveEvent,x),this.startEvent=this.lastMoveEvent),U&&U(this.lastMoveEvent,x)},this.handlePointerMove=(x,D)=>{this.lastMoveEvent=x,this.lastMoveEventInfo=LS(D,this.transformPagePoint),mn.update(this.updatePoint,!0)},this.handlePointerUp=(x,D)=>{this.end();const{onEnd:A,onSessionEnd:N,resumeAnimation:O}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&O&&O(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const R=PS(x.type==="pointercancel"?this.lastMoveEventInfo:LS(D,this.transformPagePoint),this.history);this.startEvent&&A&&A(x,R),N&&N(x,R)},!bS(t))return;this.dragSnapToOrigin=c,this.handlers=i,this.transformPagePoint=s,this.distanceThreshold=f,this.contextWindow=u||window;const p=D0(t),m=LS(p,this.transformPagePoint),{point:S}=m,{timestamp:b}=Ua;this.history=[{...S,timestamp:b}];const{onSessionStart:_}=i;_&&_(t,PS(m,this.history)),this.removeListeners=p0(A0(this.contextWindow,"pointermove",this.handlePointerMove),A0(this.contextWindow,"pointerup",this.handlePointerUp),A0(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),$o(this.updatePoint)}}function LS(n,t){return t?{point:t(n.point)}:n}function w7(n,t){return{x:n.x-t.x,y:n.y-t.y}}function PS({point:n},t){return{point:n,delta:w7(n,U7(t)),offset:w7(n,hV(t)),velocity:dV(t,.1)}}function hV(n){return n[0]}function U7(n){return n[n.length-1]}function dV(n,t){if(n.length<2)return{x:0,y:0};let i=n.length-1,s=null;const u=U7(n);for(;i>=0&&(s=n[i],!(u.timestamp-s.timestamp>hl(t)));)i--;if(!s)return{x:0,y:0};const c=Ds(u.timestamp-s.timestamp);if(c===0)return{x:0,y:0};const f={x:(u.x-s.x)/c,y:(u.y-s.y)/c};return f.x===1/0&&(f.x=0),f.y===1/0&&(f.y=0),f}function pV(n,{min:t,max:i},s){return t!==void 0&&n<t?n=s?xn(t,n,s.min):Math.max(n,t):i!==void 0&&n>i&&(n=s?xn(i,n,s.max):Math.min(n,i)),n}function B7(n,t,i){return{min:t!==void 0?n.min+t:void 0,max:i!==void 0?n.max+i-(n.max-n.min):void 0}}function mV(n,{top:t,left:i,bottom:s,right:u}){return{x:B7(n.x,i,u),y:B7(n.y,t,s)}}function V7(n,t){let i=t.min-n.min,s=t.max-n.max;return t.max-t.min<n.max-n.min&&([i,s]=[s,i]),{min:i,max:s}}function gV(n,t){return{x:V7(n.x,t.x),y:V7(n.y,t.y)}}function yV(n,t){let i=.5;const s=hi(n),u=hi(t);return u>s?i=m0(t.min,t.max-s,n.min):s>u&&(i=m0(n.min,n.max-u,t.min)),Xr(0,1,i)}function vV(n,t){const i={};return t.min!==void 0&&(i.min=t.min-n.min),t.max!==void 0&&(i.max=t.max-n.min),i}const YS=.35;function SV(n=YS){return n===!1?n=0:n===!0&&(n=YS),{x:G7(n,"left","right"),y:G7(n,"top","bottom")}}function G7(n,t,i){return{min:j7(n,t),max:j7(n,i)}}function j7(n,t){return typeof n=="number"?n:n[t]||0}const bV=new WeakMap;class EV{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ha(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:i=!1,distanceThreshold:s}={}){const{presenceContext:u}=this.visualElement;if(u&&u.isPresent===!1)return;const c=_=>{i?(this.stopAnimation(),this.snapToCursor(D0(_).point)):this.pauseAnimation()},f=(_,x)=>{this.stopAnimation();const{drag:D,dragPropagation:A,onDragStart:N}=this.getProps();if(D&&!A&&(this.openDragLock&&this.openDragLock(),this.openDragLock=HU(D),!this.openDragLock))return;this.latestPointerEvent=_,this.latestPanInfo=x,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),As(R=>{let U=this.getAxisMotionValue(R).get()||0;if(tr.test(U)){const{projection:j}=this.visualElement;if(j&&j.layout){const G=j.layout.layoutBox[R];G&&(U=hi(G)*(parseFloat(U)/100))}}this.originPoint[R]=U}),N&&mn.postRender(()=>N(_,x)),VS(this.visualElement,"transform");const{animationState:O}=this.visualElement;O&&O.setActive("whileDrag",!0)},p=(_,x)=>{this.latestPointerEvent=_,this.latestPanInfo=x;const{dragPropagation:D,dragDirectionLock:A,onDirectionLock:N,onDrag:O}=this.getProps();if(!D&&!this.openDragLock)return;const{offset:R}=x;if(A&&this.currentDirection===null){this.currentDirection=TV(R),this.currentDirection!==null&&N&&N(this.currentDirection);return}this.updateAxis("x",x.point,R),this.updateAxis("y",x.point,R),this.visualElement.render(),O&&O(_,x)},m=(_,x)=>{this.latestPointerEvent=_,this.latestPanInfo=x,this.stop(_,x),this.latestPointerEvent=null,this.latestPanInfo=null},S=()=>As(_=>this.getAnimationState(_)==="paused"&&this.getAxisMotionValue(_).animation?.play()),{dragSnapToOrigin:b}=this.getProps();this.panSession=new H7(t,{onSessionStart:c,onStart:f,onMove:p,onSessionEnd:m,resumeAnimation:S},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:b,distanceThreshold:s,contextWindow:R7(this.visualElement)})}stop(t,i){const s=t||this.latestPointerEvent,u=i||this.latestPanInfo,c=this.isDragging;if(this.cancel(),!c||!u||!s)return;const{velocity:f}=u;this.startAnimation(f);const{onDragEnd:p}=this.getProps();p&&mn.postRender(()=>p(s,u))}cancel(){this.isDragging=!1;const{projection:t,animationState:i}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),i&&i.setActive("whileDrag",!1)}updateAxis(t,i,s){const{drag:u}=this.getProps();if(!s||!vg(t,u,this.currentDirection))return;const c=this.getAxisMotionValue(t);let f=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(f=pV(f,this.constraints[t],this.elastic[t])),c.set(f)}resolveConstraints(){const{dragConstraints:t,dragElastic:i}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,u=this.constraints;t&&_0(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=mV(s.layoutBox,t):this.constraints=!1,this.elastic=SV(i),u!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&As(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=vV(s.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:i}=this.getProps();if(!t||!_0(t))return!1;const s=t.current;Kr(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:u}=this.visualElement;if(!u||!u.layout)return!1;const c=CB(s,u.root,this.visualElement.getTransformPagePoint());let f=gV(u.layout.layoutBox,c);if(i){const p=i(bB(f));this.hasMutatedConstraints=!!p,p&&(f=i7(p))}return f}startAnimation(t){const{drag:i,dragMomentum:s,dragElastic:u,dragTransition:c,dragSnapToOrigin:f,onDragTransitionEnd:p}=this.getProps(),m=this.constraints||{},S=As(b=>{if(!vg(b,i,this.currentDirection))return;let _=m&&m[b]||{};f&&(_={min:0,max:0});const x=u?200:1e6,D=u?40:1e7,A={type:"inertia",velocity:s?t[b]:0,bounceStiffness:x,bounceDamping:D,timeConstant:750,restDelta:1,restSpeed:10,...c,..._};return this.startAxisValueAnimation(b,A)});return Promise.all(S).then(p)}startAxisValueAnimation(t,i){const s=this.getAxisMotionValue(t);return VS(this.visualElement,t),s.start(GS(t,s,0,i,this.visualElement,!1))}stopAnimation(){As(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){As(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const i=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),u=s[i];return u||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){As(i=>{const{drag:s}=this.getProps();if(!vg(i,s,this.currentDirection))return;const{projection:u}=this.visualElement,c=this.getAxisMotionValue(i);if(u&&u.layout){const{min:f,max:p}=u.layout.layoutBox[i],m=c.get()||0;c.set(t[i]-xn(f,p,.5)+m)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:i}=this.getProps(),{projection:s}=this.visualElement;if(!_0(i)||!s||!this.constraints)return;this.stopAnimation();const u={x:0,y:0};As(f=>{const p=this.getAxisMotionValue(f);if(p&&this.constraints!==!1){const m=p.get();u[f]=yV({min:m,max:m},this.constraints[f])}});const{transformTemplate:c}=this.visualElement.getProps();this.visualElement.current.style.transform=c?c({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),As(f=>{if(!vg(f,t,null))return;const p=this.getAxisMotionValue(f),{min:m,max:S}=this.constraints[f];p.set(xn(m,S,u[f]))})}addListeners(){if(!this.visualElement.current)return;bV.set(this.visualElement,this);const t=this.visualElement.current,i=A0(t,"pointerdown",m=>{const{drag:S,dragListener:b=!0}=this.getProps();S&&b&&!B8(m.target)&&this.start(m)}),s=()=>{const{dragConstraints:m}=this.getProps();_0(m)&&m.current&&(this.constraints=this.resolveRefConstraints())},{projection:u}=this.visualElement,c=u.addEventListener("measure",s);u&&!u.layout&&(u.root&&u.root.updateScroll(),u.updateLayout()),mn.read(s);const f=x0(window,"resize",()=>this.scalePositionWithinConstraints()),p=u.addEventListener("didUpdate",(({delta:m,hasLayoutChanged:S})=>{this.isDragging&&S&&(As(b=>{const _=this.getAxisMotionValue(b);_&&(this.originPoint[b]+=m[b].translate,_.set(_.get()+m[b].translate))}),this.visualElement.render())}));return()=>{f(),i(),c(),p&&p()}}getProps(){const t=this.visualElement.getProps(),{drag:i=!1,dragDirectionLock:s=!1,dragPropagation:u=!1,dragConstraints:c=!1,dragElastic:f=YS,dragMomentum:p=!0}=t;return{...t,drag:i,dragDirectionLock:s,dragPropagation:u,dragConstraints:c,dragElastic:f,dragMomentum:p}}}function vg(n,t,i){return(t===!0||t===n)&&(i===null||i===n)}function TV(n,t=10){let i=null;return Math.abs(n.y)>t?i="y":Math.abs(n.x)>t&&(i="x"),i}class CV extends au{constructor(t){super(t),this.removeGroupControls=xs,this.removeListeners=xs,this.controls=new EV(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||xs}update(){const{dragControls:t}=this.node.getProps(),{dragControls:i}=this.node.prevProps||{};t!==i&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const L7=n=>(t,i)=>{n&&mn.postRender(()=>n(t,i))};class _V extends au{constructor(){super(...arguments),this.removePointerDownListener=xs}onPointerDown(t){this.session=new H7(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:R7(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:i,onPan:s,onPanEnd:u}=this.node.getProps();return{onSessionStart:L7(t),onStart:L7(i),onMove:s,onEnd:(c,f)=>{delete this.session,u&&mn.postRender(()=>u(c,f))}}}mount(){this.removePointerDownListener=A0(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Sg={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let qS=!1;class xV extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:i,switchLayoutGroup:s,layoutId:u}=this.props,{projection:c}=t;c&&(i.group&&i.group.add(c),s&&s.register&&u&&s.register(c),qS&&c.root.didUpdate(),c.addEventListener("animationComplete",()=>{this.safeToRemove()}),c.setOptions({...c.options,onExitComplete:()=>this.safeToRemove()})),Sg.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:i,visualElement:s,drag:u,isPresent:c}=this.props,{projection:f}=s;return f&&(f.isPresent=c,qS=!0,u||t.layoutDependency!==i||i===void 0||t.isPresent!==c?f.willUpdate():this.safeToRemove(),t.isPresent!==c&&(c?f.promote():f.relegate()||mn.postRender(()=>{const p=f.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),SS.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:i,switchLayoutGroup:s}=this.props,{projection:u}=t;qS=!0,u&&(u.scheduleCheckAfterUnmount(),i&&i.group&&i.group.remove(u),s&&s.deregister&&s.deregister(u))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function P7(n){const[t,i]=PU(),s=w.useContext(Db);return X.jsx(xV,{...n,layoutGroup:s,switchLayoutGroup:w.useContext(n7),isPresent:t,safeToRemove:i})}function DV(n,t,i){const s=Ia(n)?n:Dh(n);return s.start(GS("",s,t,i)),s.animation}const AV=(n,t)=>n.depth-t.depth;class MV{constructor(){this.children=[],this.isDirty=!1}add(t){Bv(this.children,t),this.isDirty=!0}remove(t){Vv(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(AV),this.isDirty=!1,this.children.forEach(t)}}function NV(n,t){const i=Ni.now(),s=({timestamp:u})=>{const c=u-i;c>=t&&($o(s),n(c-t))};return mn.setup(s,!0),()=>$o(s)}const Y7=["TopLeft","TopRight","BottomLeft","BottomRight"],OV=Y7.length,q7=n=>typeof n=="string"?parseFloat(n):n,X7=n=>typeof n=="number"||zt.test(n);function RV(n,t,i,s,u,c){u?(n.opacity=xn(0,i.opacity??1,zV(s)),n.opacityExit=xn(t.opacity??1,0,HV(s))):c&&(n.opacity=xn(t.opacity??1,i.opacity??1,s));for(let f=0;f<OV;f++){const p=`border${Y7[f]}Radius`;let m=K7(t,p),S=K7(i,p);if(m===void 0&&S===void 0)continue;m||(m=0),S||(S=0),m===0||S===0||X7(m)===X7(S)?(n[p]=Math.max(xn(q7(m),q7(S),s),0),(tr.test(S)||tr.test(m))&&(n[p]+="%")):n[p]=S}(t.rotate||i.rotate)&&(n.rotate=xn(t.rotate||0,i.rotate||0,s))}function K7(n,t){return n[t]!==void 0?n[t]:n.borderRadius}const zV=Q7(0,.5,Gb),HV=Q7(.5,.95,xs);function Q7(n,t,i){return s=>s<n?0:s>t?1:i(m0(n,t,s))}function Z7(n,t){n.min=t.min,n.max=t.max}function pl(n,t){Z7(n.x,t.x),Z7(n.y,t.y)}function J7(n,t){n.translate=t.translate,n.scale=t.scale,n.originPoint=t.originPoint,n.origin=t.origin}function F7(n,t,i,s,u){return n-=t,n=gg(n,1/i,s),u!==void 0&&(n=gg(n,1/u,s)),n}function wV(n,t=0,i=1,s=.5,u,c=n,f=n){if(tr.test(t)&&(t=parseFloat(t),t=xn(f.min,f.max,t/100)-f.min),typeof t!="number")return;let p=xn(c.min,c.max,s);n===c&&(p-=t),n.min=F7(n.min,t,i,p,u),n.max=F7(n.max,t,i,p,u)}function k7(n,t,[i,s,u],c,f){wV(n,t[i],t[s],t[u],t.scale,c,f)}const UV=["x","scaleX","originX"],BV=["y","scaleY","originY"];function I7(n,t,i,s){k7(n.x,t,UV,i?i.x:void 0,s?s.x:void 0),k7(n.y,t,BV,i?i.y:void 0,s?s.y:void 0)}function W7(n){return n.translate===0&&n.scale===1}function $7(n){return W7(n.x)&&W7(n.y)}function t9(n,t){return n.min===t.min&&n.max===t.max}function VV(n,t){return t9(n.x,t.x)&&t9(n.y,t.y)}function e9(n,t){return Math.round(n.min)===Math.round(t.min)&&Math.round(n.max)===Math.round(t.max)}function n9(n,t){return e9(n.x,t.x)&&e9(n.y,t.y)}function a9(n){return hi(n.x)/hi(n.y)}function i9(n,t){return n.translate===t.translate&&n.scale===t.scale&&n.originPoint===t.originPoint}class GV{constructor(){this.members=[]}add(t){Bv(this.members,t),t.scheduleRender()}remove(t){if(Vv(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const i=this.members[this.members.length-1];i&&this.promote(i)}}relegate(t){const i=this.members.findIndex(u=>t===u);if(i===0)return!1;let s;for(let u=i;u>=0;u--){const c=this.members[u];if(c.isPresent!==!1){s=c;break}}return s?(this.promote(s),!0):!1}promote(t,i){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,i&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:u}=t.options;u===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:i,resumingFrom:s}=t;i.onExitComplete&&i.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function jV(n,t,i){let s="";const u=n.x.translate/t.x,c=n.y.translate/t.y,f=i?.z||0;if((u||c||f)&&(s=`translate3d(${u}px, ${c}px, ${f}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),i){const{transformPerspective:S,rotate:b,rotateX:_,rotateY:x,skewX:D,skewY:A}=i;S&&(s=`perspective(${S}px) ${s}`),b&&(s+=`rotate(${b}deg) `),_&&(s+=`rotateX(${_}deg) `),x&&(s+=`rotateY(${x}deg) `),D&&(s+=`skewX(${D}deg) `),A&&(s+=`skewY(${A}deg) `)}const p=n.x.scale*t.x,m=n.y.scale*t.y;return(p!==1||m!==1)&&(s+=`scale(${p}, ${m})`),s||"none"}const XS=["","X","Y","Z"],LV=1e3;let PV=0;function KS(n,t,i,s){const{latestValues:u}=t;u[n]&&(i[n]=u[n],t.setStaticValue(n,0),s&&(s[n]=0))}function s9(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:t}=n.options;if(!t)return;const i=b7(t);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:u,layoutId:c}=n.options;window.MotionCancelOptimisedAnimation(i,"transform",mn,!(u||c))}const{parent:s}=n;s&&!s.hasCheckedOptimisedAppear&&s9(s)}function l9({attachResizeListener:n,defaultParent:t,measureScroll:i,checkIsScrollRoot:s,resetTransform:u}){return class{constructor(f={},p=t?.()){this.id=PV++,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,this.nodes.forEach(XV),this.nodes.forEach(JV),this.nodes.forEach(FV),this.nodes.forEach(KV)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=f,this.root=p?p.root||p:this,this.path=p?[...p.path,p]:[],this.parent=p,this.depth=p?p.depth+1:0;for(let m=0;m<this.path.length;m++)this.path[m].shouldResetTransform=!0;this.root===this&&(this.nodes=new MV)}addEventListener(f,p){return this.eventHandlers.has(f)||this.eventHandlers.set(f,new Lv),this.eventHandlers.get(f).add(p)}notifyListeners(f,...p){const m=this.eventHandlers.get(f);m&&m.notify(...p)}hasListeners(f){return this.eventHandlers.has(f)}mount(f){if(this.instance)return;this.isSVG=j8(f)&&!GU(f),this.instance=f;const{layoutId:p,layout:m,visualElement:S}=this.options;if(S&&!S.current&&S.mount(f),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(m||p)&&(this.isLayoutDirty=!0),n){let b,_=0;const x=()=>this.root.updateBlockedByResize=!1;mn.read(()=>{_=window.innerWidth}),n(f,()=>{const D=window.innerWidth;D!==_&&(_=D,this.root.updateBlockedByResize=!0,b&&b(),b=NV(x,250),Sg.hasAnimatedSinceResize&&(Sg.hasAnimatedSinceResize=!1,this.nodes.forEach(u9)))})}p&&this.root.registerSharedNode(p,this),this.options.animate!==!1&&S&&(p||m)&&this.addEventListener("didUpdate",({delta:b,hasLayoutChanged:_,hasRelativeLayoutChanged:x,layout:D})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const A=this.options.transition||S.getDefaultTransition()||tG,{onLayoutAnimationStart:N,onLayoutAnimationComplete:O}=S.getProps(),R=!this.targetLayout||!n9(this.targetLayout,D),U=!_&&x;if(this.options.layoutRoot||this.resumeFrom||U||_&&(R||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const j={...gS(A,"layout"),onPlay:N,onComplete:O};(S.shouldReduceMotion||this.options.layoutRoot)&&(j.delay=0,j.type=!1),this.startAnimation(j),this.setAnimationOrigin(b,U)}else _||u9(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=D})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const f=this.getStack();f&&f.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),$o(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(kV),this.animationId++)}getTransformTemplate(){const{visualElement:f}=this.options;return f&&f.getProps().transformTemplate}willUpdate(f=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&s9(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let b=0;b<this.path.length;b++){const _=this.path[b];_.shouldResetTransform=!0,_.updateScroll("snapshot"),_.options.layoutRoot&&_.willUpdate(!1)}const{layoutId:p,layout:m}=this.options;if(p===void 0&&!m)return;const S=this.getTransformTemplate();this.prevTransformTemplateValue=S?S(this.latestValues,""):void 0,this.updateSnapshot(),f&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(r9);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(o9);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ZV),this.nodes.forEach(YV),this.nodes.forEach(qV)):this.nodes.forEach(o9),this.clearAllSnapshots();const p=Ni.now();Ua.delta=Xr(0,1e3/60,p-Ua.timestamp),Ua.timestamp=p,Ua.isProcessing=!0,Xv.update.process(Ua),Xv.preRender.process(Ua),Xv.render.process(Ua),Ua.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,SS.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(QV),this.sharedNodes.forEach(IV)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,mn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){mn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!hi(this.snapshot.measuredBox.x)&&!hi(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 m=0;m<this.path.length;m++)this.path[m].updateScroll();const f=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=ha(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:p}=this.options;p&&p.notify("LayoutMeasure",this.layout.layoutBox,f?f.layoutBox:void 0)}updateScroll(f="measure"){let p=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===f&&(p=!1),p&&this.instance){const m=s(this.instance);this.scroll={animationId:this.root.animationId,phase:f,isRoot:m,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:m}}}resetTransform(){if(!u)return;const f=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,p=this.projectionDelta&&!$7(this.projectionDelta),m=this.getTransformTemplate(),S=m?m(this.latestValues,""):void 0,b=S!==this.prevTransformTemplateValue;f&&this.instance&&(p||Cc(this.latestValues)||b)&&(u(this.instance,S),this.shouldResetTransform=!1,this.scheduleRender())}measure(f=!0){const p=this.measurePageBox();let m=this.removeElementScroll(p);return f&&(m=this.removeTransform(m)),eG(m),{animationId:this.root.animationId,measuredBox:p,layoutBox:m,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:f}=this.options;if(!f)return ha();const p=f.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(nG))){const{scroll:S}=this.root;S&&(Mh(p.x,S.offset.x),Mh(p.y,S.offset.y))}return p}removeElementScroll(f){const p=ha();if(pl(p,f),this.scroll?.wasRoot)return p;for(let m=0;m<this.path.length;m++){const S=this.path[m],{scroll:b,options:_}=S;S!==this.root&&b&&_.layoutScroll&&(b.wasRoot&&pl(p,f),Mh(p.x,b.offset.x),Mh(p.y,b.offset.y))}return p}applyTransform(f,p=!1){const m=ha();pl(m,f);for(let S=0;S<this.path.length;S++){const b=this.path[S];!p&&b.options.layoutScroll&&b.scroll&&b!==b.root&&Nh(m,{x:-b.scroll.offset.x,y:-b.scroll.offset.y}),Cc(b.latestValues)&&Nh(m,b.latestValues)}return Cc(this.latestValues)&&Nh(m,this.latestValues),m}removeTransform(f){const p=ha();pl(p,f);for(let m=0;m<this.path.length;m++){const S=this.path[m];if(!S.instance||!Cc(S.latestValues))continue;HS(S.latestValues)&&S.updateSnapshot();const b=ha(),_=S.measurePageBox();pl(b,_),I7(p,S.latestValues,S.snapshot?S.snapshot.layoutBox:void 0,b)}return Cc(this.latestValues)&&I7(p,this.latestValues),p}setTargetDelta(f){this.targetDelta=f,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(f){this.options={...this.options,...f,crossfade:f.crossfade!==void 0?f.crossfade:!0}}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!==Ua.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(f=!1){const p=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=p.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=p.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=p.isSharedProjectionDirty);const m=!!this.resumingFrom||this!==p;if(!(f||m&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:b,layoutId:_}=this.options;if(!this.layout||!(b||_))return;this.resolvedRelativeTargetAt=Ua.timestamp;const x=this.getClosestProjectingParent();x&&this.linkedParentVersion!==x.layoutVersion&&!x.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(x&&x.layout?this.createRelativeTarget(x,this.layout.layoutBox,x.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ha(),this.targetWithTransforms=ha()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),cV(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):pl(this.target,this.layout.layoutBox),o7(this.target,this.targetDelta)):pl(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,x&&!!x.resumingFrom==!!this.resumingFrom&&!x.options.layoutScroll&&x.target&&this.animationProgress!==1?this.createRelativeTarget(x,this.target,x.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||HS(this.parent.latestValues)||s7(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(f,p,m){this.relativeParent=f,this.linkedParentVersion=f.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ha(),this.relativeTargetOrigin=ha(),yg(this.relativeTargetOrigin,p,m),pl(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const f=this.getLead(),p=!!this.resumingFrom||this!==f;let m=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(m=!1),p&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(m=!1),this.resolvedRelativeTargetAt===Ua.timestamp&&(m=!1),m)return;const{layout:S,layoutId:b}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(S||b))return;pl(this.layoutCorrected,this.layout.layoutBox);const _=this.treeScale.x,x=this.treeScale.y;TB(this.layoutCorrected,this.treeScale,this.path,p),f.layout&&!f.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(f.target=f.layout.layoutBox,f.targetWithTransforms=ha());const{target:D}=f;if(!D){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(J7(this.prevProjectionDelta.x,this.projectionDelta.x),J7(this.prevProjectionDelta.y,this.projectionDelta.y)),M0(this.projectionDelta,this.layoutCorrected,D,this.latestValues),(this.treeScale.x!==_||this.treeScale.y!==x||!i9(this.projectionDelta.x,this.prevProjectionDelta.x)||!i9(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",D))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(f=!0){if(this.options.visualElement?.scheduleRender(),f){const p=this.getStack();p&&p.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Oh(),this.projectionDelta=Oh(),this.projectionDeltaWithTransform=Oh()}setAnimationOrigin(f,p=!1){const m=this.snapshot,S=m?m.latestValues:{},b={...this.latestValues},_=Oh();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!p;const x=ha(),D=m?m.source:void 0,A=this.layout?this.layout.source:void 0,N=D!==A,O=this.getStack(),R=!O||O.members.length<=1,U=!!(N&&!R&&this.options.crossfade===!0&&!this.path.some($V));this.animationProgress=0;let j;this.mixTargetDelta=G=>{const k=G/1e3;c9(_.x,f.x,k),c9(_.y,f.y,k),this.setTargetDelta(_),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(yg(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox),WV(this.relativeTarget,this.relativeTargetOrigin,x,k),j&&VV(this.relativeTarget,j)&&(this.isProjectionDirty=!1),j||(j=ha()),pl(j,this.relativeTarget)),N&&(this.animationValues=b,RV(b,S,this.latestValues,k,U,R)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(f){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&($o(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=mn.update(()=>{Sg.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Dh(0)),this.currentAnimation=DV(this.motionValue,[0,1e3],{...f,velocity:0,isSync:!0,onUpdate:p=>{this.mixTargetDelta(p),f.onUpdate&&f.onUpdate(p)},onStop:()=>{},onComplete:()=>{f.onComplete&&f.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);const f=this.getStack();f&&f.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(LV),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const f=this.getLead();let{targetWithTransforms:p,target:m,layout:S,latestValues:b}=f;if(!(!p||!m||!S)){if(this!==f&&this.layout&&S&&m9(this.options.animationType,this.layout.layoutBox,S.layoutBox)){m=this.target||ha();const _=hi(this.layout.layoutBox.x);m.x.min=f.target.x.min,m.x.max=m.x.min+_;const x=hi(this.layout.layoutBox.y);m.y.min=f.target.y.min,m.y.max=m.y.min+x}pl(p,m),Nh(p,b),M0(this.projectionDeltaWithTransform,this.layoutCorrected,p,b)}}registerSharedNode(f,p){this.sharedNodes.has(f)||this.sharedNodes.set(f,new GV),this.sharedNodes.get(f).add(p);const S=p.options.initialPromotionConfig;p.promote({transition:S?S.transition:void 0,preserveFollowOpacity:S&&S.shouldPreserveFollowOpacity?S.shouldPreserveFollowOpacity(p):void 0})}isLead(){const f=this.getStack();return f?f.lead===this:!0}getLead(){const{layoutId:f}=this.options;return f?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:f}=this.options;return f?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:f}=this.options;if(f)return this.root.sharedNodes.get(f)}promote({needsReset:f,transition:p,preserveFollowOpacity:m}={}){const S=this.getStack();S&&S.promote(this,m),f&&(this.projectionDelta=void 0,this.needsReset=!0),p&&this.setOptions({transition:p})}relegate(){const f=this.getStack();return f?f.relegate(this):!1}resetSkewAndRotation(){const{visualElement:f}=this.options;if(!f)return;let p=!1;const{latestValues:m}=f;if((m.z||m.rotate||m.rotateX||m.rotateY||m.rotateZ||m.skewX||m.skewY)&&(p=!0),!p)return;const S={};m.z&&KS("z",f,S,this.animationValues);for(let b=0;b<XS.length;b++)KS(`rotate${XS[b]}`,f,S,this.animationValues),KS(`skew${XS[b]}`,f,S,this.animationValues);f.render();for(const b in S)f.setStaticValue(b,S[b]),this.animationValues&&(this.animationValues[b]=S[b]);f.scheduleRender()}applyProjectionStyles(f,p){if(!this.instance||this.isSVG)return;if(!this.isVisible){f.visibility="hidden";return}const m=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,f.visibility="",f.opacity="",f.pointerEvents=mg(p?.pointerEvents)||"",f.transform=m?m(this.latestValues,""):"none";return}const S=this.getLead();if(!this.projectionDelta||!this.layout||!S.target){this.options.layoutId&&(f.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,f.pointerEvents=mg(p?.pointerEvents)||""),this.hasProjected&&!Cc(this.latestValues)&&(f.transform=m?m({},""):"none",this.hasProjected=!1);return}f.visibility="";const b=S.animationValues||S.latestValues;this.applyTransformsToTarget();let _=jV(this.projectionDeltaWithTransform,this.treeScale,b);m&&(_=m(b,_)),f.transform=_;const{x,y:D}=this.projectionDelta;f.transformOrigin=`${x.origin*100}% ${D.origin*100}% 0`,S.animationValues?f.opacity=S===this?b.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:b.opacityExit:f.opacity=S===this?b.opacity!==void 0?b.opacity:"":b.opacityExit!==void 0?b.opacityExit:0;for(const A in _S){if(b[A]===void 0)continue;const{correct:N,applyTo:O,isCSSVariable:R}=_S[A],U=_==="none"?b[A]:N(b[A],S);if(O){const j=O.length;for(let G=0;G<j;G++)f[O[G]]=U}else R?this.options.visualElement.renderState.vars[A]=U:f[A]=U}this.options.layoutId&&(f.pointerEvents=S===this?mg(p?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(f=>f.currentAnimation?.stop()),this.root.nodes.forEach(r9),this.root.sharedNodes.clear()}}}function YV(n){n.updateLayout()}function qV(n){const t=n.resumeFrom?.snapshot||n.snapshot;if(n.isLead()&&n.layout&&t&&n.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:s}=n.layout,{animationType:u}=n.options,c=t.source!==n.layout.source;u==="size"?As(b=>{const _=c?t.measuredBox[b]:t.layoutBox[b],x=hi(_);_.min=i[b].min,_.max=_.min+x}):m9(u,t.layoutBox,i)&&As(b=>{const _=c?t.measuredBox[b]:t.layoutBox[b],x=hi(i[b]);_.max=_.min+x,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[b].max=n.relativeTarget[b].min+x)});const f=Oh();M0(f,i,t.layoutBox);const p=Oh();c?M0(p,n.applyTransform(s,!0),t.measuredBox):M0(p,i,t.layoutBox);const m=!$7(f);let S=!1;if(!n.resumeFrom){const b=n.getClosestProjectingParent();if(b&&!b.resumeFrom){const{snapshot:_,layout:x}=b;if(_&&x){const D=ha();yg(D,t.layoutBox,_.layoutBox);const A=ha();yg(A,i,x.layoutBox),n9(D,A)||(S=!0),b.options.layoutRoot&&(n.relativeTarget=A,n.relativeTargetOrigin=D,n.relativeParent=b)}}}n.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:p,layoutDelta:f,hasLayoutChanged:m,hasRelativeLayoutChanged:S})}else if(n.isLead()){const{onExitComplete:i}=n.options;i&&i()}n.options.transition=void 0}function XV(n){n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function KV(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function QV(n){n.clearSnapshot()}function r9(n){n.clearMeasurements()}function o9(n){n.isLayoutDirty=!1}function ZV(n){const{visualElement:t}=n.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),n.resetTransform()}function u9(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function JV(n){n.resolveTargetDelta()}function FV(n){n.calcProjection()}function kV(n){n.resetSkewAndRotation()}function IV(n){n.removeLeadSnapshot()}function c9(n,t,i){n.translate=xn(t.translate,0,i),n.scale=xn(t.scale,1,i),n.origin=t.origin,n.originPoint=t.originPoint}function f9(n,t,i,s){n.min=xn(t.min,i.min,s),n.max=xn(t.max,i.max,s)}function WV(n,t,i,s){f9(n.x,t.x,i.x,s),f9(n.y,t.y,i.y,s)}function $V(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const tG={duration:.45,ease:[.4,0,.1,1]},h9=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),d9=h9("applewebkit/")&&!h9("chrome/")?Math.round:xs;function p9(n){n.min=d9(n.min),n.max=d9(n.max)}function eG(n){p9(n.x),p9(n.y)}function m9(n,t,i){return n==="position"||n==="preserve-aspect"&&!uV(a9(t),a9(i),.2)}function nG(n){return n!==n.root&&n.scroll?.wasRoot}const aG=l9({attachResizeListener:(n,t)=>x0(n,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),QS={current:void 0},g9=l9({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!QS.current){const n=new aG({});n.mount(window),n.setOptions({layoutScroll:!0}),QS.current=n}return QS.current},resetTransform:(n,t)=>{n.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),iG={pan:{Feature:_V},drag:{Feature:CV,ProjectionNode:g9,MeasureLayout:P7}};function y9(n,t,i){const{props:s}=n;n.animationState&&s.whileHover&&n.animationState.setActive("whileHover",i==="Start");const u="onHover"+i,c=s[u];c&&mn.postRender(()=>c(t,D0(t)))}class sG extends au{mount(){const{current:t}=this.node;t&&(this.unmount=wU(t,(i,s)=>(y9(this.node,s,"Start"),u=>y9(this.node,u,"End"))))}unmount(){}}class lG extends au{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!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=p0(x0(this.node.current,"focus",()=>this.onFocus()),x0(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function v9(n,t,i){const{props:s}=n;if(n.current instanceof HTMLButtonElement&&n.current.disabled)return;n.animationState&&s.whileTap&&n.animationState.setActive("whileTap",i==="Start");const u="onTap"+(i==="End"?"":i),c=s[u];c&&mn.postRender(()=>c(t,D0(t)))}class rG extends au{mount(){const{current:t}=this.node;t&&(this.unmount=VU(t,(i,s)=>(v9(this.node,s,"Start"),(u,{success:c})=>v9(this.node,u,c?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ZS=new WeakMap,JS=new WeakMap,oG=n=>{const t=ZS.get(n.target);t&&t(n)},uG=n=>{n.forEach(oG)};function cG({root:n,...t}){const i=n||document;JS.has(i)||JS.set(i,{});const s=JS.get(i),u=JSON.stringify(t);return s[u]||(s[u]=new IntersectionObserver(uG,{root:n,...t})),s[u]}function fG(n,t,i){const s=cG(t);return ZS.set(n,i),s.observe(n),()=>{ZS.delete(n),s.unobserve(n)}}const hG={some:0,all:1};class dG extends au{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:i,margin:s,amount:u="some",once:c}=t,f={root:i?i.current:void 0,rootMargin:s,threshold:typeof u=="number"?u:hG[u]},p=m=>{const{isIntersecting:S}=m;if(this.isInView===S||(this.isInView=S,c&&!S&&this.hasEnteredView))return;S&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",S);const{onViewportEnter:b,onViewportLeave:_}=this.node.getProps(),x=S?b:_;x&&x(m)};return fG(this.node.current,f,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:i}=this.node;["amount","margin","root"].some(pG(t,i))&&this.startObserver()}unmount(){}}function pG({viewport:n={}},{viewport:t={}}={}){return i=>n[i]!==t[i]}const mG={...aV,...{inView:{Feature:dG},tap:{Feature:rG},focus:{Feature:lG},hover:{Feature:sG}},...iG,...{layout:{ProjectionNode:g9,MeasureLayout:P7}}},S9=SB(mG,zB),b9=({visible:n,target:t,appendTo:i=document.body,unmountWhenHidden:s=!1,transitionDuration:u=400,showTransitionOptions:c="easeInOut",hideTransitionOptions:f="linear",approveText:p="DONE",shown:m,hidden:S,isClickedWithin:b,children:_})=>{const[x,D]=w.useState(-1),[A,N]=w.useState(-1),[O,R]=w.useState(n),[U,j]=w.useState(!0),G=w.useRef(100),k=w.useRef(101),et=w.useRef(void 0),ft=w.useRef(void 0),I=w.useRef(void 0),it=w.useRef(!1),J=u/1e3;w.useEffect(()=>{t&&(et.current=xb(t));const Et=bb("zIndex",Rt=>Rt==="auto"||Rt==="-1"?!1:parseInt(Rt)>100).map(Rt=>parseInt(Rt,10));Et.length>0&&(G.current=Math.max(...Et)+1,k.current=Math.max(...Et)+2),j(!1),R(n)},[n,t]);const St=Et=>{ft.current=Et},nt=()=>{N(G.current),D(k.current),it.current=!0},ht=()=>{if(!ft.current)return;m?.();let Et;et.current&&(Et=[et.current]);const Rt=qt=>{qt?b?.():(j(!1),R(!1))};I.current=Cb(ft.current,Rt,Et)},yt=()=>{I.current&&_b(I.current)},tt=()=>{N(-1),D(-1),S?.()},H=Lr(()=>{O?nt():yt()}),Q=Lr(()=>{O?ht():tt(),j(!0)}),K={opacity:.5},pt={opacity:0},dt={opacity:1,pointerEvents:"auto"},$={opacity:0,pointerEvents:"none"};return it.current&&!O&&s===!0&&U?null:ST.createPortal(X.jsxs("div",{children:[X.jsx(S9.div,{className:"bsc:fixed bsc:left-0 bsc:top-0 bsc:h-full bsc:w-full bsc:bg-mono-dark-1",style:{zIndex:A},initial:!1,animate:O?K:pt}),X.jsxs(S9.div,{ref:Et=>{Et&&St(Et)},className:"dark:bsc-border-mono-light-1 bsc:fixed bsc:bottom-0 bsc:left-0 bsc:w-full bsc:bg-white bsc:dark:border-t bsc:dark:border-solid bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1",style:{zIndex:x},initial:!1,animate:O?dt:$,transition:{duration:J,ease:O?c:f},onAnimationStart:H,onAnimationComplete:Q,children:[X.jsx("div",{className:"bsc:w-full",children:_}),X.jsx(X.Fragment,{children:X.jsx(Il,{buttonType:"primary",fullWidth:!0,onClick:()=>R(!1),className:"bsc:text-xs bsc:font-bold",children:p})})]})]}),i)};var E9=(n=>(n[n.TopLeft=0]="TopLeft",n[n.TopRight=1]="TopRight",n[n.BottomLeft=2]="BottomLeft",n[n.BottomRight=3]="BottomRight",n))(E9||{}),T9=(n=>(n[n.TopLeft=0]="TopLeft",n[n.TopRight=1]="TopRight",n[n.BottomLeft=2]="BottomLeft",n[n.BottomRight=3]="BottomRight",n))(T9||{});class gn{static positionToTarget(t,i=2){const s=t.getBoundingClientRect();let u=0,c=0;const f=window.scrollY;switch(i){case 2:u=s.top+s.height+f,c=s.left;break;case 0:u=s.top+f,c=s.left;break;case 3:u=s.top+s.height+f,c=s.left+s.width;break;case 1:u=s.top+f,c=s.left+s.width}return{top:u,left:c}}static positionElementToTarget(t,i,s=0,u=2){let{left:c,top:f}=gn.positionToTarget(i,u);const p=t.getBoundingClientRect();switch(s){case 0:break;case 1:c=c-p.width;break;case 2:f=f-p.height;break;case 3:f=f-p.height,c=c-p.width;break}return{top:f,left:c}}static canPositionElementOnScreenWithTarget(t,i){const s=gn.getScreenDimensions(),u=t.getBoundingClientRect(),c=gn.positionElementToTarget(t,i,0,2);if(c.left+u.width<s.width&&c.top+u.height<s.height||gn.positionElementToTarget(t,i,1,3).left>=0&&c.top+u.height<s.height)return!0;const p=gn.positionElementToTarget(t,i,2,0);if(p.left+u.width<s.width&&p.top>=0)return!0;const m=gn.positionElementToTarget(t,i,3,1);return m.left>=0&&m.top>=0}static canPositionElementOnScreen(t){const i=gn.getScreenDimensions(),s=t.getBoundingClientRect();return s.width<=i.width&&s.height<=i.height}static positionElementToTargetOnScreen(t,i,s=0,u=2){const{left:c,top:f}=gn.positionElementToTarget(t,i,s,u),p=t.getBoundingClientRect(),m=gn.determineOffScreenLocation(p);if(m){if(s===0&&u===2){if(m.right&&!m.bottom)return gn.positionElementToTarget(t,i,1,3);if(m.bottom&&!m.right)return gn.positionElementToTarget(t,i,2,0);if(m.right&&m.bottom)return gn.positionElementToTarget(t,i,3,1)}else if(s===1&&u===3){if(m.left&&!m.bottom)return gn.positionElementToTarget(t,i,0,2);if(m.bottom&&!m.left)return gn.positionElementToTarget(t,i,3,1);if(m.left&&m.bottom)return gn.positionElementToTarget(t,i,2,0)}}return{top:f,left:c}}static determineOffScreenLocation(t){const i=gn.getScreenDimensions(),s={left:t.left<0,top:t.top<0,right:t.left+t.width>i.width,bottom:t.top+t.height>i.height};return s.left||s.top||s.right||s.bottom?s:void 0}static getScreenDimensions(){return{width:window.innerWidth,height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}}}const C9=({visible:n,target:t,targetPosition:i=E9.BottomLeft,elementAlignment:s=T9.TopLeft,shouldTargetCloseOverlay:u=!0,shouldMatchTargetWidth:c=!1,shouldScrollCloseOverlay:f=!1,shouldCheckZIndex:p=!1,shouldRemainOnScreen:m=!1,unmountWhenHidden:S=!1,transitionDuration:b=400,showTransitionOptions:_="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:x="linear",shown:D,hidden:A,isClickedWithin:N,markupCreated:O,children:R})=>{const[U,j]=w.useState(-1),[G,k]=w.useState(n),[et,ft]=w.useState(!1),I=w.useRef(!1),it=w.useRef(100),J=w.useRef({left:0,top:0,width:0}),St=w.useRef(void 0),nt=w.useRef(void 0),ht=w.useRef(void 0),yt=w.useRef(void 0),tt=w.useRef(void 0),H=w.useRef(void 0),Q=w.useRef(!1),K=j4();w.useEffect(()=>(m===!0&&(H.current=new ResizeObserver(pt)),()=>{m===!0&&(nt.current&&H.current?.unobserve(nt.current),H.current?.disconnect())}),[]),w.useEffect(()=>{if(t&&(St.current=xb(t),f)){const Oe=K?.isValidScrollableElement;ht.current=Sb(St.current,{overflow:"scroll, auto",overflowX:"scroll, auto",overflowY:"scroll, auto"},!1,Oe),ht.current.tagName.toLowerCase()==="html"&&(ht.current=document)}if(p){const Oe=bb("zIndex",It=>parseInt(It)>=100).map(It=>parseInt(It));Oe.length>0&&(it.current=Math.max(...Oe)+1)}n!==void 0&&k(n)},[t,n,f,p]);const pt=Oe=>{if(nt.current){const It=gn.getScreenDimensions(),Jn=Oe[Oe.length-1].target,Gt=Jn.getBoundingClientRect(),xe=gn.determineOffScreenLocation(Gt);if(xe){if(St.current&&gn.canPositionElementOnScreenWithTarget(Jn,St.current)){const $e=gn.positionElementToTargetOnScreen(nt.current,St.current,s,i);J.current={...J.current,...$e}}else xe.right?J.current.left=It.width-Gt.width:xe.left&&(J.current.left=0),xe.bottom?J.current.top=It.height-Gt.height:xe.top&&(J.current.top=0);dt()}}},dt=o0(()=>{I.current=!I.current,ft(I.current)},20),$=()=>{j(it.current)},Et=()=>{if(!nt.current)return;D?.();let Oe;!u&&St.current&&(Oe=[St.current]);const It=Jn=>{Jn?N?.():k(!1)};yt.current=Cb(nt.current,It,Oe),f&&(tt.current=fR(Jn=>nt.current&&MH(Jn,nt.current)&&k(!1),100,{leading:!0}),ht.current&&ht.current.addEventListener("scroll",tt.current)),Q.current=!0},Rt=()=>{ht.current&&tt.current&&(ht.current.removeEventListener("scroll",tt.current),tt.current=void 0),yt.current&&_b(yt.current)},qt=()=>{j(-1),A?.()},Bt=Oe=>{if(m===!0&&nt.current&&H.current?.unobserve(nt.current),nt.current=Oe,O?.(Oe),St.current){const It=gn.positionElementToTarget(nt.current,St.current,s,i);J.current={...It,width:St.current.offsetWidth},m===!0&&(gn.canPositionElementOnScreenWithTarget(nt.current,St.current)||gn.canPositionElementOnScreen(nt.current))&&H.current?.observe(nt.current)}},Vt=Lr(()=>{G?$():Rt()}),se=Lr(()=>{G?Et():qt()}),Ke=w.useMemo(()=>G?{transition:`opacity ${b}ms ${_}`,pointerEvents:"auto",opacity:1}:{transition:`opacity ${b}ms ${x}`,pointerEvents:"none",opacity:0},[G]),yn=w.useMemo(()=>{const Oe={top:`${J.current.top}px`,left:`${J.current.left}px`,zIndex:U};return c&&(Oe.width=`${J.current.width}px`),Oe},[et,U,c]);return Q.current&&!G&&S===!0?null:X.jsx("div",{onTransitionStart:Vt,onTransitionEnd:se,children:X.jsx("div",{className:"bsc:fixed bsc:border! bsc:border-solid! bsc:border-black bsc:bg-white bsc:shadow bsc:dark:border-mono-light-1 bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1",style:{...yn,...Ke},ref:Oe=>{Oe&&Bt(Oe)},children:R})})};let bg;const gG=new Uint8Array(16);function yG(){if(!bg&&(bg=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!bg))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bg(gG)}const Ba=[];for(let n=0;n<256;++n)Ba.push((n+256).toString(16).slice(1));function vG(n,t=0){return Ba[n[t+0]]+Ba[n[t+1]]+Ba[n[t+2]]+Ba[n[t+3]]+"-"+Ba[n[t+4]]+Ba[n[t+5]]+"-"+Ba[n[t+6]]+Ba[n[t+7]]+"-"+Ba[n[t+8]]+Ba[n[t+9]]+"-"+Ba[n[t+10]]+Ba[n[t+11]]+Ba[n[t+12]]+Ba[n[t+13]]+Ba[n[t+14]]+Ba[n[t+15]]}const _9={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function SG(n,t,i){if(_9.randomUUID&&!n)return _9.randomUUID();n=n||{};const s=n.random||(n.rng||yG)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,vG(s)}class N0{static create(t){const i=[];let s=0;for(let u=0,c=t.formatParts.length;u<c;u++){const f=t.formatParts[u],p=s,m=p+f.characterCount;i.push({startPosition:p,endPosition:m,...f}),s=m}return i}}class bG{instanceCollection;formatPartList;inputSlotCollection;currentPartIndex=0;currentPartIndices=[];currentCursorPosition=0;highlightCursorPosition=0;currentCursorStartPosition=-1;currentCursorEndPosition=-1;inputElement;inputSelection=null;inputRange;textNode;constructor(t,i){this.instanceCollection=O0.getInstance(),this.formatPartList=N0.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(i,t)}get isSelection(){return this.inputRange!==void 0&&this.inputRange.startOffset!==this.inputRange.endOffset}get isAllSelected(){const t=this.inputSlotCollection.getLastSlot();return this.isSelection&&this.inputRange?.startOffset===0&&this.inputRange.endOffset===t.endPosition}getCursorPosition(){return this.currentCursorPosition}getCursorStartPosition(){return this.currentCursorStartPosition}getCursorEndPosition(){return this.currentCursorEndPosition}getCurrentPartIndex(){return this.currentPartIndex}getCurrentPartIndices(){return this.currentPartIndices}setInputElement(t){this.inputElement=t}setCursorToCurrentPosition(){this.setCursorSelection(this.currentCursorPosition>-1?this.currentCursorPosition:this.highlightCursorPosition)}setCursorPosition(t){this.setCursorSelection(t)}setCursorSelection(t,i){if(this.createInputRangeSelection(),this.inputRange&&this.textNode){let s,u,c=!0;i===void 0?(s=t,u=t):t<i?(s=t,u=i):(c=!1,s=i,u=t),this.inputRange.setStart(this.textNode,s),this.inputRange.setEnd(this.textNode,u),this.currentPartIndices=[],s===u?(this.currentCursorPosition=u,this.highlightCursorPosition=u,this.currentCursorStartPosition=-1,this.currentCursorEndPosition=-1,this.setPartIndexByCursorPosition()):(c?this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1?this.highlightCursorPosition=u:this.currentCursorStartPosition!==s?this.highlightCursorPosition=s:this.currentCursorEndPosition!==u&&(this.highlightCursorPosition=u):this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1?this.highlightCursorPosition=s:this.currentCursorStartPosition!==u?this.highlightCursorPosition=u:this.currentCursorEndPosition!==s&&(this.highlightCursorPosition=s),this.currentCursorStartPosition=s,this.currentCursorEndPosition=u,this.currentCursorPosition=-1,this.setPartIndexByHighlightPosition(),this.setPartIndicesByCursorPositions())}}findCursorPosition(){const t=window.getSelection(),i=t?.getRangeAt(0);if(this.inputElement&&t&&i){const s=document.createTreeWalker(this.inputElement,NodeFilter.SHOW_TEXT,p=>{const m=document.createRange();return m.selectNodeContents(p),m.compareBoundaryPoints(Range.END_TO_END,i)<1?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});let u=0;for(;s.nextNode();)u+=s.currentNode.textContent?.length||0;i.startContainer.nodeType===Node.TEXT_NODE&&(u+=i.startOffset);const c=this.inputSlotCollection.getLastSlotWithData(),f=c.startPosition+c.partText.length;t.anchorOffset===t.focusOffset?this.setCursorSelection(u>f?f:u):this.setCursorSelection(t.anchorOffset,t.focusOffset)}}isAtLastPart(){return this.currentPartIndex===this.formatPartList.length-1}moveHome(){const t=this.inputSlotCollection.getFirstSlot();this.setCursorSelection(t.startPosition)}moveEnd(){const t=this.inputSlotCollection.getLastSlotWithData(),i=t.startPosition+t.partText.length;this.setCursorSelection(i)}moveCursorLeft(){if(this.updateCursorPosition(),this.currentCursorPosition>0&&!this.isSelection){const t=this.currentCursorPosition-1;let i=this.formatPartList[this.currentPartIndex];if(t>=i.startPosition&&t<=i.endPosition)this.setCursorSelection(t);else for(let s=this.currentPartIndex-1;s>=0;s--)if(i=this.formatPartList[s],t>=i.startPosition&&t<=i.endPosition){i.isSeparator?this.setCursorSelection(this.formatPartList[s-1].endPosition):this.setCursorSelection(t);break}}else this.isSelection?this.setCursorSelection(this.currentCursorPosition):this.moveHome()}moveCursorRight(){this.updateCursorPosition(!1);const t=this.inputSlotCollection.getLastSlotWithData(),i=t.startPosition+t.partText.length;if(this.currentCursorPosition<i&&!this.isSelection){const s=this.currentCursorPosition+1;let u=this.formatPartList[this.currentPartIndex];if(s>=u.startPosition&&s<=u.endPosition)this.setCursorSelection(s);else for(let c=this.currentPartIndex+1,f=this.formatPartList.length;c<f;c++)if(u=this.formatPartList[c],s>=u.startPosition&&s<=u.endPosition){u.isSeparator?this.setCursorSelection(this.formatPartList[c+1].startPosition):this.setCursorSelection(s);break}}else this.setCursorSelection(this.currentCursorPosition)}moveToNextInputPart(){if(this.currentPartIndex<this.formatPartList.length-1){const t=this.findNextEditablePart();t&&(this.currentPartIndex=t.partIndex,this.setCursorSelection(t.startPosition))}}moveToPreviousInputPart(){if(this.currentPartIndex>0){const t=this.findPreviousEditablePart();t&&(this.currentPartIndex=t.partIndex,this.setCursorSelection(t.endPosition))}}highlightAll(){const t=this.formatPartList[this.formatPartList.length-1].endPosition;this.setCursorSelection(0,t)}moveHighlightLeft(){this.updateHighlightPositions();const t=this.highlightCursorPosition>this.currentCursorStartPosition;if(this.currentCursorStartPosition>0||t){let i=t?this.currentCursorStartPosition:this.currentCursorStartPosition-1,s=t?this.highlightCursorPosition-1:this.currentCursorEndPosition,u=this.formatPartList[this.currentPartIndex];if(i>=u.startPosition&&i<=u.endPosition||t&&s>=u.startPosition&&s<=u.endPosition)this.setCursorSelection(i,s);else for(let c=this.currentPartIndex-1;c>=0;c--)if(u=this.formatPartList[c],i>=u.startPosition&&i<=u.endPosition||t&&s>=u.startPosition&&s<=u.endPosition){u.isSeparator?(t?s=this.formatPartList[c-1].endPosition:i=this.formatPartList[c-1].endPosition,this.setCursorSelection(i,s)):this.setCursorSelection(i,s);break}}}moveHighlightRight(){this.updateHighlightPositions();const t=this.inputSlotCollection.getLastSlotWithData(),i=t.startPosition+t.partText.length,s=this.highlightCursorPosition<this.currentCursorEndPosition;if(this.currentCursorEndPosition<i||s){let u=s?this.highlightCursorPosition+1:this.currentCursorStartPosition,c=s?this.currentCursorEndPosition:this.currentCursorEndPosition+1,f=this.formatPartList[this.currentPartIndex];if(c>=f.startPosition&&c<=f.endPosition||s&&u>=f.startPosition&&u<=f.endPosition)this.setCursorSelection(u,c);else for(let p=this.currentPartIndex+1,m=this.formatPartList.length;p<m;p++)if(f=this.formatPartList[p],c>=f.startPosition&&c<=f.endPosition||s&&u>=f.startPosition&&u<=f.endPosition){f.isSeparator?(s?u=this.formatPartList[p+1].startPosition:c=this.formatPartList[p+1].startPosition,this.setCursorSelection(u,c)):this.setCursorSelection(u,c);break}}}updateHighlightPositions(){this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1&&this.currentCursorPosition>-1&&(this.currentCursorStartPosition=this.currentCursorPosition,this.currentCursorEndPosition=this.currentCursorPosition,this.highlightCursorPosition=this.currentCursorPosition)}updateCursorPosition(t=!0){this.currentCursorPosition===-1&&this.currentCursorStartPosition>-1&&this.currentCursorEndPosition>-1&&(t?this.currentCursorPosition=this.currentCursorStartPosition:this.currentCursorPosition=this.currentCursorEndPosition)}findNextEditablePart(){return this.inputSlotCollection.getNextSlot(this.currentPartIndex)}findPreviousEditablePart(){return this.inputSlotCollection.getPreviousSlot(this.currentPartIndex)}setPartIndexByCursorPosition(){for(let t=0;t<this.formatPartList.length;t++){const i=this.formatPartList[t];if(this.currentCursorPosition>=i.startPosition&&this.currentCursorPosition<=i.endPosition){if(i.isSeparator){this.currentCursorPosition=this.formatPartList[t+1].startPosition,this.currentPartIndex=t+1;break}this.currentPartIndex=t;break}}}setPartIndexByHighlightPosition(){for(let t=0;t<this.formatPartList.length;t++){const i=this.formatPartList[t];if(this.highlightCursorPosition>=i.startPosition&&this.highlightCursorPosition<=i.endPosition){if(i.isSeparator){this.highlightCursorPosition=this.formatPartList[t+1].startPosition,this.currentPartIndex=t+1;break}this.currentPartIndex=t;break}}}setPartIndicesByCursorPositions(){for(let t=0,i=this.formatPartList.length;t<i;t++){const s=this.formatPartList[t];s.isSeparator||(s.startPosition>=this.currentCursorStartPosition&&s.startPosition<=this.currentCursorEndPosition||s.endPosition>=this.currentCursorStartPosition&&s.endPosition<=this.currentCursorEndPosition||s.startPosition<this.currentCursorStartPosition&&s.endPosition>this.currentCursorEndPosition)&&this.currentPartIndices.push(t)}}createInputRangeSelection(){this.inputElement&&(this.inputSelection=window.getSelection(),this.inputRange=document.createRange(),this.inputSelection?.removeAllRanges(),this.inputRange.selectNodeContents(this.inputElement),this.inputRange.collapse(!0),this.inputSelection?.addRange(this.inputRange),this.inputElement.firstChild&&(this.textNode=this.inputElement.firstChild))}}class EG{static create(t){const i=[];for(let s=0,u=t.length;s<u;s++){const c=t[s];c.isSeparator||i.push({partIndex:s,partText:"",isComplete:!1,...c})}return i}}class TG{inputSlots;constructor(t){this.inputSlots=EG.create(N0.create(t))}clearAllSlots(){for(let t=0,i=this.inputSlots.length;t<i;t++)this.inputSlots[t].partText=""}getSlot(t){return this.inputSlots.find(i=>i.partIndex===t)}getSlots(t){return this.inputSlots.filter(i=>t.includes(i.partIndex))}getSlotPosition(t){let i=-1;for(let s=0,u=this.inputSlots.length;s<u;s++){const c=this.inputSlots[s];if(t>=c.startPosition&&t<=c.endPosition){i=c.partIndex;break}}return i}getSlotsFromCursorPosition(t){const i=this.getSlotPosition(t);return i>-1?this.inputSlots.filter(s=>s.partIndex>=i):void 0}getSlotFromCursorPosition(t){const i=this.getSlotPosition(t);return i>-1?this.inputSlots.find(s=>s.partIndex===i):void 0}getFirstSlot(){return this.inputSlots[0]}getLastSlot(){return this.inputSlots[this.inputSlots.length-1]}getNextSlot(t){const i=this.inputSlots.findIndex(s=>s.partIndex===t);if(i>-1&&i+1<this.inputSlots.length)return this.inputSlots[i+1]}getPreviousSlot(t){const i=this.inputSlots.findIndex(s=>s.partIndex===t);if(i>-1&&i-1>=0)return this.inputSlots[i-1]}getLastSlotWithData(){const t=this.inputSlots.findIndex(s=>!s.isComplete);let i=t;for(let s=t+1,u=this.inputSlots.length;s<u;s++)this.inputSlots[s].partText.length>0&&(i=s);return this.inputSlots[i>-1?i:0]}allSlotsCompleted(){return this.inputSlots.every(t=>t.isComplete)}allSlotsEmpty(){return this.inputSlots.every(t=>t.partText.length===0)}}class O0{static instance;static getInstance(){return this.instance||(this.instance=new CG),this.instance}}class CG{navigatorInstances;inputSlotInstances;constructor(){this.navigatorInstances={},this.inputSlotInstances={}}getNavigatorInstance(t,i){return this.navigatorInstances[t]||(this.navigatorInstances[t]=new bG(i,t)),this.navigatorInstances[t]}getInputSlotInstance(t,i){return this.inputSlotInstances[t]||(this.inputSlotInstances[t]=new TG(i)),this.inputSlotInstances[t]}removeInstances(t){this.navigatorInstances[t]&&delete this.navigatorInstances[t],this.inputSlotInstances[t]&&delete this.inputSlotInstances[t]}}class FS{instanceCollection;formatPartList;inputSlotCollection;inputElement;constructor(t,i){this.instanceCollection=O0.getInstance(),this.formatPartList=N0.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(i,t)}setInputElement(t){this.inputElement=t}render(){let t="";for(let i=0,s=this.formatPartList.length;i<s;i++){const u=this.formatPartList[i];if(u.isSeparator)t+=u.inputText;else{const c=this.inputSlotCollection.getSlot(i);c&&(t+=c.partText+c.inputText?.repeat(c.characterCount-c.partText.length))}}this.inputElement&&(this.inputElement.innerHTML=t)}}var er=(n=>(n[n.Text=0]="Text",n[n.Numeric=1]="Numeric",n))(er||{});class x9{numberKeys=["0","1","2","3","4","5","6","7","8","9"];movementKeys=["ArrowLeft","ArrowRight","Home","End","a"];editingKeys=["Backspace","Delete"];ignoreKeys=["Shift","Alt","Control","Fn","Meta"];isNumberKey(t){return this.numberKeys.includes(t)}isMovementKey(t){return this.movementKeys.includes(t.key)}isEditingKey(t){return this.editingKeys.includes(t.key)}isIgnoreKey(t){return this.ignoreKeys.includes(t.key)}}class _G{_currentIndex=0;index=0;formatParts;get currentIndex(){return this._currentIndex}constructor(t){this.formatParts=N0.create(t)}hasNext(){return this.index<this.formatParts.length}next(){if(this.index<this.formatParts.length)return this._currentIndex=this.index++,this.formatParts[this._currentIndex]}peek(){if(this.index<this.formatParts.length)return this.formatParts[this.index]}reset(){this.index=0}}class xG{formatParts;constructor(t){this.formatParts=N0.create(t)}getUniqueSeparators(){const t=[],i=this.formatParts.filter(s=>s.isSeparator);for(let s=0,u=i.length;s<u;s++){const c=i[s];c.inputText&&!t.includes(c.inputText)&&t.push(c.inputText)}return t}}class D9{constructor(t,i){this.format=t,this.instanceCollection=O0.getInstance(),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(i,t),this.formatNavigator=this.instanceCollection.getNavigatorInstance(i,t),this.keyTypeChecker=new x9,this.formatRenderer=new FS(t,i),this.formatPartList=new _G(t),this.partEntryList=new xG(t)}instanceCollection;inputSlotCollection;formatNavigator;keyTypeChecker;formatRenderer;formatPartList;partEntryList;setInputElement(t){this.formatRenderer.setInputElement(t)}processKeyPress(t){if(this.keyTypeChecker.isEditingKey(t)){this.processEditRules(t);return}this.formatNavigator.isSelection?(this.processSelectionEditRules(),setTimeout(()=>this.processInputRules(t))):this.processInputRules(t)}processInputValue(t){this.inputSlotCollection.clearAllSlots(),this.formatPartList.reset();let i=0;for(;this.formatPartList.hasNext();){const s=this.formatPartList.next();if(s&&!s.isSeparator)if(this.formatPartList.peek()?.isSeparator===!0){const u=this.formatPartList.currentIndex,c=this.formatPartList.next();if(c&&c.inputText){const f=t.indexOf(c.inputText,i),p=this.inputSlotCollection.getSlot(u);if(p&&f>-1){const m=f-i>p.characterCount?i+p.characterCount:f;p.partText=t.substring(i,m),this.processSlotRules(p),i=f+c.characterCount}}}else{const u=this.inputSlotCollection.getSlot(this.formatPartList.currentIndex);u&&(u.partText=t.substring(i,i+u.characterCount),this.processSlotRules(u))}}}processPastedValue(t,i=!1){i&&this.processSelectionEditRules();const s=this.formatNavigator.getCursorPosition(),u=this.inputSlotCollection.getSlotsFromCursorPosition(s);if(u){const c=s-u[0].startPosition,f=u[0].partText.substring(0,c);let p=u[0].partText.substring(c);u[0].partText="";for(let _=1,x=u.length;_<x;_++)p+=u[_].partText,u[_].partText="";const m=this.removeSeparatorsFromValue(t),S=f+m+p;let b=0;for(let _=0,x=u.length;_<x;_++){const D=u[_];D.partText=S.substring(b,D.characterCount+b),b+=D.characterCount,this.processSlotRules(D)}}}removeSeparatorsFromValue(t){let i=t;const s=this.partEntryList.getUniqueSeparators();for(let u=0,c=s.length;u<c;u++){const f=s[u];i=i.replaceAll(f,"")}return i}processEditRules(t){this.formatNavigator.isSelection?this.processSelectionEditRules():this.processNonSelectionEditRules(t)}processNonSelectionEditRules(t){const i=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!i)return;const s=this.formatNavigator.getCursorPosition(),u=s-i.startPosition,c=this.format.deleteShiftsFormatPart||!1;switch(t.key){case"Backspace":{if(!(i.startPosition===s))i.partText=i.partText.substring(0,u-1)+i.partText.substring(u),c&&this.shiftFormatParts(i),this.formatRenderer.render(),this.formatNavigator.moveCursorLeft(),this.processSlotRules(i,!0);else{this.processSlotRules(i,!0);const p=this.inputSlotCollection.getPreviousSlot(i.partIndex);p&&(p.partText=p.partText.substring(0,p.partText.length-1),c&&this.shiftFormatParts(p),this.formatRenderer.render(),this.formatNavigator.setCursorPosition(p.startPosition+p.partText.length),this.processSlotRules(p,!0))}break}case"Delete":i.partText=i.partText.substring(0,u)+i.partText.substring(u+1),c&&this.shiftFormatParts(i),this.formatRenderer.render(),this.formatNavigator.setCursorToCurrentPosition(),this.processSlotRules(i,!0);break}}processSelectionEditRules(){const t=this.inputSlotCollection.getSlots(this.formatNavigator.getCurrentPartIndices());if(t.length<=0)return;const i=this.formatNavigator.getCursorStartPosition(),s=this.formatNavigator.getCursorEndPosition();for(let u=0,c=t.length;u<c;u++){const f=t[u];f.startPosition>=i&&f.endPosition<=s?f.partText="":f.startPosition>=i&&f.endPosition>s?f.partText=f.partText.substring(s-f.startPosition):f.startPosition<i&&f.endPosition<=s?f.partText=f.partText.substring(0,i-f.startPosition):f.startPosition<i&&f.endPosition>s&&(f.partText=f.partText.substring(0,i-f.startPosition)+f.partText.substring(s-f.startPosition))}this.formatRenderer.render(),this.formatNavigator.setCursorPosition(i);for(let u=0,c=t.length;u<c;u++)this.processSlotRules(t[u])}shiftFormatParts(t){let i=t,s;for(;(s=this.inputSlotCollection.getNextSlot(i.partIndex))!==void 0;){const u=s.partText.substring(0,1);s.partText=s.partText.substring(1),i.partText=i.partText+u,i=s}}processInputRules(t){const i=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!i)return;const{key:s}=t,u=i.characterCount,c=i.partText;if(i.valueType===er.Numeric){if(!this.keyTypeChecker.isNumberKey(s))return;const f=i.maximumValue,p=i.exceedingMaximumValueCausesTab||!1,m=i.padWithZeros||!1,S=parseInt(this.createNewValue(i,s));if(f&&S>f)if(p){m&&(i.partText=i.partText.padStart(u,"0")),i.isComplete=!0;const b=this.inputSlotCollection.getNextSlot(i.partIndex);b&&!b.isComplete&&(b.partText=s),this.formatRenderer.render(),b&&this.formatNavigator.setCursorPosition(b.isComplete?b.startPosition:b.startPosition+1)}else return;else c.length+1===u?(this.addToInputSlot(s),i.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):c.length+1<u&&(this.addToInputSlot(s),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}else c.length+1===u?(this.addToInputSlot(s),i.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):(this.addToInputSlot(s),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}addToInputSlot(t){const i=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());i&&(i.partText=this.createNewValue(i,t))}createNewValue(t,i){const s=t.partText,u=this.formatNavigator.getCursorPosition();if(u>=t.startPosition+t.partText.length)return s+i;{const c=u-t.startPosition;return s.substring(0,c)+i+s.substring(c)}}processSlotRules(t,i=!1){const s=t.characterCount,u=t.allCharactersRequired||!1;if(t.valueType===er.Numeric){const c=t.minimumValue,f=t.maximumValue;if(u)t.isComplete=t.partText.length===s;else if(c!==void 0&&f!==void 0){const p=t.padWithZeros||!1,m=parseInt(t.partText);t.isComplete=m>=c&&m<=f,t.isComplete&&p&&!i&&(t.partText=t.partText.padStart(s,"0"))}else t.isComplete=t.partText.length>0}else u?t.isComplete=t.partText.length===s:t.isComplete=t.partText.length>0}}class DG{constructor(t,i){this.format=t,this.instanceCollection=O0.getInstance(),this.formatNavigator=this.instanceCollection.getNavigatorInstance(i,t),this.ruleProcessor=new D9(t,i),this.keyTypeChecker=new x9,this.formatRenderer=new FS(t,i)}instanceCollection;formatNavigator;ruleProcessor;keyTypeChecker;formatRenderer;setInputElement(t){this.ruleProcessor.setInputElement(t),this.formatRenderer.setInputElement(t)}processMovementKey(t){const{key:i,metaKey:s,ctrlKey:u,shiftKey:c}=t;switch(i){case"ArrowLeft":c?this.formatNavigator.moveHighlightLeft():s?this.formatNavigator.moveHome():this.formatNavigator.moveCursorLeft();break;case"ArrowRight":c?this.formatNavigator.moveHighlightRight():s?this.formatNavigator.moveEnd():this.formatNavigator.moveCursorRight();break;case"Home":this.formatNavigator.moveHome();break;case"End":this.formatNavigator.moveEnd();break;case"a":(s||u)&&this.formatNavigator.highlightAll();break}}processKeyPress(t){return this.keyTypeChecker.isIgnoreKey(t)?!1:this.keyTypeChecker.isMovementKey(t)?(this.processMovementKey(t),!1):(this.ruleProcessor.processKeyPress(t),!0)}}class AG{constructor(t,i=""){this.inputValue=i,this.instanceId=SG(),this.instanceCollection=O0.getInstance(),this.keyProcessor=new DG(t,this.instanceId),this.formatNavigator=this.instanceCollection.getNavigatorInstance(this.instanceId,t),this.formatRenderer=new FS(t,this.instanceId),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(this.instanceId,t),this.inputRuleProcessor=new D9(t,this.instanceId)}instanceId;instanceCollection;keyProcessor;formatNavigator;formatRenderer;inputSlotCollection;inputRuleProcessor;previousOutputValue="";inputElementSet=!1;isInputFocused=!1;currentSlotPosition=-1;inputElement;onFormatChange;onSlotChange;inputElementCreated(t){this.keyProcessor.setInputElement(t),this.formatNavigator.setInputElement(t),this.formatRenderer.setInputElement(t),this.inputElement=t,this.inputElementSet=!0,this.inputElementSet&&this.inputValue.length>0&&this.inputValuePassed(this.inputValue)}inputFocused(){this.isInputFocused=!0,this.formatRenderer.render(),setTimeout(()=>{this.fireOnSlotChange()})}inputBlurred(){this.isInputFocused=!1}inputValuePassed(t){this.inputValue=t,this.inputElementSet&&(this.inputValue.length>0?this.inputRuleProcessor.processInputValue(t):(this.inputSlotCollection.clearAllSlots(),this.previousOutputValue=void 0),this.renderFormat())}pastedValue(t){t.length>0&&(this.formatNavigator.isSelection?this.formatNavigator.isAllSelected?this.inputValuePassed(t):this.inputRuleProcessor.processPastedValue(t,!0):this.inputValue.length===0?this.inputValuePassed(t):this.inputRuleProcessor.processPastedValue(t),this.renderFormat(!0))}registerFormatChangeEvent(t){this.onFormatChange=t}registerSlotChangeEvent(t){this.onSlotChange=t}mouseUpHandler(){this.formatNavigator.findCursorPosition(),this.fireOnSlotChange()}keyDownHandler(t){if(t.key!=="Tab"){if(!(t.key==="c"&&(t.ctrlKey||t.metaKey))&&!(t.key==="x"&&(t.ctrlKey||t.metaKey))&&!(t.key==="v"&&(t.ctrlKey||t.metaKey)))t.preventDefault(),t.stopPropagation();else return;this.keyProcessor.processKeyPress(t)&&this.inputElement&&this.onFormatChange&&(this.inputSlotCollection.allSlotsCompleted()&&this.previousOutputValue!==this.inputElement.innerHTML?(this.previousOutputValue=this.inputElement.innerHTML,this.onFormatChange(this.inputElement.innerHTML)):this.inputSlotCollection.allSlotsEmpty()&&this.previousOutputValue!==void 0&&(this.previousOutputValue=void 0,this.onFormatChange())),this.fireOnSlotChange()}}dispose(){this.instanceCollection.removeInstances(this.instanceId)}fireOnSlotChange(){const t=this.formatNavigator.getCursorPosition(),i=this.inputSlotCollection.getSlotPosition(t);if(console.log("cursor",t,"slot",i,"current",this.currentSlotPosition),i!==this.currentSlotPosition){this.currentSlotPosition=i;const s=this.inputSlotCollection.getSlotFromCursorPosition(t);s&&this.onSlotChange&&this.onSlotChange(s)}}renderFormat(t=!1){setTimeout(()=>{this.formatRenderer.render(),this.isInputFocused&&this.formatNavigator.setCursorToCurrentPosition(),this.inputValue.length>0&&(this.previousOutputValue=this.inputElement?.innerHTML),t&&this.inputElement?.innerHTML&&this.onFormatChange&&this.onFormatChange(this.inputElement.innerHTML),this.fireOnSlotChange()})}}const MG=(n,t)=>{const{value:i="",format:s,readOnly:u=!1,debounceTime:c=800,fillContainer:f=!0,leftElement:p,rightElement:m,className:S,leftElementClassName:b,rightElementClassName:_,isSingleLine:x=!1,allowSingleLineScroll:D=!1,isInputValid:A,onSlotKeyDown:N,onChange:O,onFocus:R,onBlur:U,onElementCreate:j,onLeftElementClick:G,onRightElementClick:k}=n,[et,ft]=w.useState(!0),I=w.useRef(void 0),it=w.useRef(void 0),J=w.useRef(void 0),St=w.useRef(void 0),nt=w.useRef(!1);w.useEffect(()=>(document.addEventListener("mouseup",pt),()=>{J.current?.dispose(),document.removeEventListener("mouseup",pt)}),[]),w.useEffect(()=>{J.current?.inputValuePassed(i)},[i]),w.useEffect(()=>{J.current?.dispose(),s&&(J.current=new AG(s,i),it.current&&J.current?.inputElementCreated(it.current),J.current?.registerFormatChangeEvent(ht),J.current?.registerSlotChangeEvent(yt))},[s]);const ht=Lr(Bt=>{A?A(Bt)?(ft(!0),O?.(Bt)):ft(!1):O?.(Bt)}),yt=Lr(Bt=>{console.log("slot changed filed",Bt),St.current=Bt}),tt=w.useCallback(Bt=>{J.current?.inputFocused(),R?.(Bt)},[R]),H=w.useCallback(Bt=>{J.current?.inputBlurred(),U?.(Bt)},[U]),Q=w.useCallback(()=>{nt.current=!0},[]),K=w.useCallback(()=>{if(nt.current)nt.current=!1,J.current?.mouseUpHandler();else{const Bt=new MouseEvent("mouseup");document.dispatchEvent(Bt)}},[]),pt=w.useCallback(()=>{nt.current&&(nt.current=!1,J.current?.mouseUpHandler())},[]),dt=w.useCallback(Bt=>{St.current&&N&&N(Bt,St.current),J.current?.keyDownHandler(Bt)},[]),$=w.useCallback(Bt=>{Bt.preventDefault(),Bt.stopPropagation();const Vt=Bt.clipboardData?.getData("text/plain");Vt&&J.current?.pastedValue(Vt)},[]),Et=w.useCallback(Bt=>{I.current?.inputElement?.removeEventListener("keydown",dt),I.current?.inputElement?.removeEventListener("mousedown",Q),I.current?.inputElement?.removeEventListener("mouseup",K),I.current?.inputElement?.removeEventListener("paste",$),I.current=Bt,I.current?.inputElement?.addEventListener("keydown",dt),I.current?.inputElement?.addEventListener("mousedown",Q),I.current?.inputElement?.addEventListener("mouseup",K),I.current?.inputElement?.addEventListener("paste",$),it.current=I.current?.inputElement},[]),Rt=w.useCallback(()=>{I.current?.focus()},[]);w.useImperativeHandle(t,()=>({focus:Rt}));const qt=Ee(S,{"bsc:border-error!":!et});return X.jsx(tg,{ref:Bt=>{Bt&&Et(Bt)},readOnly:u,debounceTime:c,fillContainer:f,leftElement:p,rightElement:m,className:qt,leftElementClassName:b,rightElementClassName:_,isSingleLine:x,allowSingleLineScroll:D,onFocus:tt,onBlur:H,onElementCreate:j,onLeftElementClick:G,onRightElementClick:k})},A9=w.forwardRef(MG),kS=w.createContext(void 0);var Ye=(n=>(n[n.DateTime=0]="DateTime",n[n.DateOnly=1]="DateOnly",n[n.TimeOnly=2]="TimeOnly",n[n.DateRange=3]="DateRange",n))(Ye||{}),Ta=(n=>(n[n.DaySelector=0]="DaySelector",n[n.MonthSelector=1]="MonthSelector",n[n.YearSelector=2]="YearSelector",n[n.TimeSelector=3]="TimeSelector",n[n.DateRangeSelector=4]="DateRangeSelector",n))(Ta||{}),zh=(n=>(n[n.Day=0]="Day",n[n.Month=1]="Month",n[n.Year=2]="Year",n[n.Range=3]="Range",n))(zh||{}),R0=(n=>(n[n.Short=0]="Short",n[n.Medium=1]="Medium",n[n.Long=2]="Long",n))(R0||{}),An=(n=>(n[n.TwelveHour=0]="TwelveHour",n[n.TwentyFourHour=1]="TwentyFourHour",n))(An||{}),iu=(n=>(n[n.Normal=0]="Normal",n[n.Range=1]="Range",n))(iu||{}),Eg=(n=>(n[n.Right=0]="Right",n[n.Left=1]="Left",n[n.None=2]="None",n))(Eg||{});function M9(n,t,i=!0){const s=db(n),u=rb(n),c=uz(n);let f=Dv(u)-(t.options?.weekStartsOn||0);f=f===-1?6:f;const p=Dv(c)-(t.options?.weekStartsOn||0),m=vR({start:u,end:c}),S=s+f>35?6:5,b=N9(S,7,{dayValue:null,isCurrent:!0});let _=1;for(let x=0,D=S;x<D;x++){for(let A=x>0?0:f;A<7;A++){const N=m[_-1];if(N.setHours(n.getHours(),n.getMinutes(),n.getSeconds()),b[x][A].dayValue=N,++_>s)break}if(_>s)break}if(f>0&&i)for(let x=0;x<f;x++)b[0][x].dayValue=lH(u,f-x),b[0][x].isCurrent=!1;if(p>-1&&i)for(let x=6;x>p;x--)b[S-1][x].dayValue=vh(c,x-p),b[S-1][x].isCurrent=!1;return b}function N9(n,t,i){const s=[];for(let u=0,c=n;u<c;u++){const f=[];for(let p=0,m=t;p<m;p++){const S=NG(i)?i:{...i};f.push(S)}s.push(f)}return s}function NG(n){const t=typeof n;return t==="string"||t==="number"||t==="boolean"||n instanceof Date}function OG(n){const t=rH(new Date,n.options?.weekStartsOn||0),i=[];for(let s=0;s<7;s++)i.push(vh(t,s).toLocaleDateString(n.code,{weekday:"short"}));return i}function RG(n){const t=new Date(Date.UTC(2020,0,1)),i=[[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}],[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}],[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}]];let s=0;for(let u=0;u<3;u++)for(let c=0;c<4;c++)i[u][c]={monthNumber:s,monthName:Io(t,s++).toLocaleDateString(n.code,{month:"short"})};return i}function zG(n,t){const i=new Date(n.getTime()),s=Math.floor(i.getFullYear()/10)*10;i.setFullYear(s);const u=SR({start:i,end:c0(i,9)}),c=N9(3,4,"");let f=0;for(let p=0;p<3;p++)for(let m=0;m<4&&(c[p][m]=u[f++].toLocaleDateString(t.code,{year:"numeric"}),f!==u.length);m++);return c}function HG(n){const t=new Date;return t.setHours(0,0,0,0),t.toLocaleTimeString(n.code)}function wG(n,t,i){return n.getTime()>=t.getTime()&&n.getTime()<=i.getTime()}function xc(n,t){const i=oH(n);if(isNaN(i.valueOf())){let s=Mi(n,"P pp",new Date,{locale:t});return!isNaN(s.valueOf())||(s=Mi(n,"Pp",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Mi(n,"P HH:mm",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Mi(n,"P hh:mm a..aaa",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Mi(n,"P HH:mm:ss",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Mi(n,"P hh:mm:ss a..aaa",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Mi(n,"P",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Mi(n,"P p",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Mi(n,"pp",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Mi(n,"p",new Date,{locale:t}),!isNaN(s.valueOf()))||!t&&(s=Mi(n,"HH:mm",new Date),!isNaN(s.valueOf())||(s=Mi(n,"hh:mm a..aaa",new Date),!isNaN(s.valueOf()))||(s=Mi(n,"HH:mm:ss",new Date),!isNaN(s.valueOf()))||(s=Mi(n,"hh:mm:ss a..aaa",new Date),!isNaN(s.valueOf())))?s:void 0}return i}function IS(n,t){const i=n.split("-");if(i.length!==2)return;const s=xc(i[0].trim(),t);if(!s)return;const u=xc(i[1].trim(),t);if(u)return[s,u]}function O9(n){return n===An.TwelveHour?["12","01","02","03","04","05","06","07","08","09","10","11"]:["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"]}var ye=(n=>(n[n.SetDateSelector=0]="SetDateSelector",n[n.SetViewDate=1]="SetViewDate",n[n.SetSelectedDate=2]="SetSelectedDate",n[n.SetSelectedDateRange=3]="SetSelectedDateRange",n[n.SetSelectedStartDate=4]="SetSelectedStartDate",n[n.SetSelectedEndDate=5]="SetSelectedEndDate",n[n.SetTimeFormat=6]="SetTimeFormat",n[n.ClearDates=7]="ClearDates",n[n.InitializeDates=8]="InitializeDates",n))(ye||{});const UG=(n,t)=>{switch(t.type){case 0:return t.dateSelector!==void 0?{...n,currentSelector:t.dateSelector,currentViewDate:t.viewDate||n.currentViewDate}:{...n};case 1:return{...n,currentViewDate:t.viewDate||new Date,dateInitialized:!0};case 2:return{...n,selectedDate:t.selectedDate||n.selectedDate,currentViewDate:t.viewDate||n.currentViewDate};case 3:return{...n,selectedStartDate:t.selectedStartDate||n.selectedStartDate,selectedEndDate:t.selectedEndDate||n.selectedEndDate};case 4:return{...n,selectedStartDate:t.selectedStartDate,selectedEndDate:void 0};case 5:return{...n,selectedEndDate:t.selectedEndDate};case 6:return{...n,timeFormat:t.timeFormat||n.timeFormat};case 7:return{currentSelector:n.currentSelector,currentViewDate:n.currentViewDate,timeFormat:n.timeFormat,dateInitialized:!0};case 8:{const i={...n,currentViewDate:BG(t.initialDate),dateInitialized:!0};return Array.isArray(t.initialDate)?{...i,selectedStartDate:t.initialDate[0],selectedEndDate:t.initialDate[1]}:{...i,selectedDate:t.initialDate}}default:return{...n,currentSelector:Ta.DaySelector}}};function BG(n){return n?Array.isArray(n)?n[0]:n:new Date}const WS=(n,t,i)=>{const s=w.useCallback(m=>{i({type:ye.SetViewDate,viewDate:Io(t,m)})},[t]),u=w.useCallback(m=>{i({type:ye.SetViewDate,viewDate:Ov(t,m)})},[t]),c=w.useCallback(m=>{i({type:ye.SetViewDate,viewDate:c0(t,m)})},[t]),f=w.useCallback(m=>{i({type:ye.SetViewDate,viewDate:Rv(t,m)})},[t]),p=w.useCallback(m=>{i({type:ye.SetDateSelector,dateSelector:m})},[]);return{...n,incrementViewMonths:s,decrementViewMonths:u,incrementViewYears:c,decrementViewYears:f,setDateSelector:p}},Tg=({viewDate:n,selectedDate:t,selectedStartDate:i,selectedEndDate:s,selectionMode:u=iu.Normal,locale:c,onDateSelected:f,selectableDate:p,isValidDate:m,dispatcher:S})=>{const[b,_]=w.useState(!1),[x,D]=w.useState(),[A,N]=w.useState(),[O,R]=w.useState(),[U,j]=w.useState(),G=w.useRef(void 0),k=w.useRef(void 0),et=w.useContext(kS),ft=w.useMemo(()=>et.calendarTemplate,[et.calendarTemplate]);w.useEffect(()=>{G.current=c,k.current=OG(G.current),_(!0)},[]),w.useEffect(()=>{n&&G.current&&R(M9(n,G.current,u===iu.Normal))},[n,b]),w.useEffect(()=>{j(t?new Date(t.getFullYear(),t.getMonth(),t.getDate()):void 0)},[t]),w.useEffect(()=>{D(i?new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0).getTime():void 0),N(s?new Date(s.getFullYear(),s.getMonth(),s.getDate(),23,59,59).getTime():void 0)},[i,s]),w.useEffect(()=>{G.current&&c&&(G.current=c,R(M9(n,G.current,u===iu.Normal)))},[c]);const I=yt=>{if(u===iu.Normal)S?.({type:ye.SetSelectedDate,selectedDate:yt,viewDate:yt}),f?.(yt);else{if(!f)throw new Error("Range selection mode requires onDateSelected to be set");!i||cz(yt,i)?f(yt):i&&!s?f(yt,{setEndDate:!0}):i&&s&&f(yt)}},it=yt=>U?.toLocaleDateString()===yt.toLocaleDateString(),J=yt=>{if(x&&A){const tt=yt.getTime();return tt>=x&&tt<=A}return!1},St=WS({viewDate:n,selectedDate:t,selectedStartDate:i,selectedEndDate:s,selectionMode:u,locale:c,weekDays:k.current,monthMatrix:O,selectableDate:p,isValidDate:m,onDateClicked:I,isSelectedDate:it,isInSelectedDateRange:J},n,S),ht=ft||((yt,tt)=>X.jsx("div",{className:"bc-dt-calendar bsc:w-full",children:tt}));return X.jsx(Sc,{props:St,template:ht,children:X.jsxs("div",{className:"bc-dt-day-row bsc:grid bsc:min-w-[329px] bsc:grid-cols-7 bsc:gap-3",children:[k.current?.map((yt,tt)=>X.jsx("div",{className:"bc-dt-day-cell bsc:text-center bsc:font-bold",children:yt},tt)),O?.map((yt,tt)=>yt.map((H,Q)=>{const K=H.dayValue!==null&&(p===void 0||p(H.dayValue)),pt=Ee("bsc:text-center bsc:py-1 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",{"bsc:text-gray-3":!H.isCurrent,"bsc:bg-primary-1 bsc:text-white bsc:dark:bg-mono-light-1 bsc:dark:text-mono-dark-1":H&&H.dayValue&&(U&&it(H.dayValue)||x&&!A&&lb(x,H.dayValue)||x&&A&&J(H.dayValue)),"bsc:cursor-pointer":K,"bsc:text-error bsc:cursor-not-allowed":!K,"bsc:bg-primary-5 bsc:dark:bg-mono-light-3 bsc:dark:text-mono-dark-1":H.dayValue&&sH(H.dayValue)&&!(it(H.dayValue)||J(H.dayValue))},"bc-dt-date-cell");return X.jsx("div",{className:pt,onClick:()=>H&&H.dayValue&&K&&(m===void 0||m(H.dayValue))&&I(H.dayValue),children:H.dayValue?.getDate().toLocaleString(G.current?.code)},tt.toString()+Q.toString())}))]})})},Cg=({title:n,scrollerType:t,onTitleClicked:i,onMovePrevious:s,onMoveNext:u,viewDate:c,dispatcher:f})=>{const m=w.useContext(kS).dateScrollerTemplate,S=WS({title:n,scrollerType:t,onTitleClicked:i,onMovePrevious:s,onMoveNext:u},c,f),b="bsc:bg-transparent bsc:cursor-pointer bsc:focus:outline-hidden bsc:hover:bg-primary-1! bsc:hover:text-white! bsc:dark:hover:bg-mono-light-3!",x=m||((D,A)=>X.jsx("div",{className:"bc-dt-scroller bsc:flex bsc:w-full bsc:flex-row bsc:items-center bsc:px-2 bsc:py-1",children:A}));return X.jsxs(Sc,{props:S,template:x,children:[X.jsx("div",{className:"bc-dt-scroller-left bsc:shrink bsc:cursor-pointer",children:X.jsx(Il,{className:b,onClick:s,children:X.jsx(_s,{icon:"chevronLeft",size:ka.Regular})})}),X.jsx("div",{className:"bc-dt-scroller-title bsc:grow bsc:cursor-pointer bsc:text-center bsc:hover:text-primary-2 bsc:dark:hover:text-mono-light-3",onClick:i,children:n}),X.jsx("div",{className:"bc-dt-scroller-right bsc:shrink bsc:cursor-pointer",children:X.jsx(Il,{className:b,onClick:u,children:X.jsx(_s,{icon:"chevronRight",size:ka.Regular})})})]})},VG=({selectedDate:n,viewDate:t,locale:i,showTimeSelector:s,selectableDate:u,isValidDate:c,onChange:f,dispatcher:p})=>{const m=()=>{t&&p({type:ye.SetViewDate,viewDate:Ov(t,1)})},S=()=>{t&&p({type:ye.SetViewDate,viewDate:Io(t,1)})},b=()=>{p({type:ye.SetDateSelector,dateSelector:Ta.MonthSelector})},_=()=>{p({type:ye.SetDateSelector,dateSelector:Ta.TimeSelector})},x=()=>t?t.toLocaleDateString(i.code,{month:"long",year:"numeric"}):"";return X.jsxs("div",{className:"bc-dt-day-selector bsc:p-2",children:[X.jsx(Cg,{title:x(),scrollerType:zh.Day,onTitleClicked:b,onMovePrevious:m,onMoveNext:S,viewDate:t,dispatcher:p}),X.jsx(Tg,{viewDate:t,selectedDate:n,locale:i,selectableDate:u,isValidDate:c,onDateSelected:f,dispatcher:p}),s&&X.jsx("div",{className:"bc-dt-time-value-wrapper bsc:flex bsc:w-full bsc:flex-row bsc:justify-center bsc:p-2",children:X.jsx("div",{className:"bc-dt-time-value bsc:cursor-pointer bsc:p-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1 bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-2",onClick:_,children:n?.toLocaleTimeString(i.code)||HG(i)})})]})},GG=({viewDate:n,locale:t,dateSelection:i=Ye.DateTime,dispatcher:s})=>{const u=w.useRef(RG(t)),c=()=>{const b=Rv(n,1);s({type:ye.SetViewDate,viewDate:b})},f=()=>{const b=c0(n,1);s({type:ye.SetViewDate,viewDate:b})},p=b=>{s({type:ye.SetDateSelector,dateSelector:i!==Ye.DateRange?Ta.DaySelector:Ta.DateRangeSelector,viewDate:_H(n,b)})},m=()=>n.toLocaleDateString(t.code,{year:"numeric"}),S=()=>{s({type:ye.SetDateSelector,dateSelector:Ta.YearSelector})};return X.jsxs("div",{className:"bc-dt-month-selector bsc:p-2",style:{minWidth:"20rem"},children:[X.jsx(Cg,{title:m(),scrollerType:zh.Month,onTitleClicked:S,onMovePrevious:c,onMoveNext:f,viewDate:n,dispatcher:s}),X.jsx("div",{className:"bc-dt-month-grid bsc:grid bsc:w-full bsc:grid-cols-4 bsc:gap-4",children:u.current.map((b,_)=>b.map((x,D)=>X.jsx("div",{className:"bc-dt-month-cell bsc:cursor-pointer bsc:text-center bsc:py-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",onClick:()=>p(x.monthNumber),children:x.monthName},_.toString()+D.toString())))})]})},jG=({viewDate:n,selectedStartDate:t,selectedEndDate:i,locale:s,onChange:u,dispatcher:c})=>{const f=ag("screen and (max-device-width: 40rem)"),p=Io(n,1),m=(D,A)=>{!A||!A.setEndDate?c({type:ye.SetSelectedStartDate,selectedStartDate:D}):(c({type:ye.SetSelectedEndDate,selectedEndDate:D}),t&&u&&u([t,D]))},S=()=>{c({type:ye.SetDateSelector,dateSelector:Ta.MonthSelector})},b=()=>f?`${n.toLocaleDateString(s.code,{month:"long"})} ${n.toLocaleDateString(s.code,{year:"numeric"})}`:`${n.toLocaleDateString(s.code,{month:"long"})} ${n.toLocaleDateString(s.code,{year:"numeric"})} - ${p.toLocaleDateString(s.code,{month:"long"})} ${p.toLocaleDateString(s.code,{year:"numeric"})}`,_=()=>{n&&c({type:ye.SetViewDate,viewDate:Ov(n,1)})},x=()=>{n&&c({type:ye.SetViewDate,viewDate:Io(n,1)})};return X.jsxs("div",{className:"bc-dt-range-selector bsc:flex bsc:flex-col",children:[X.jsx("div",{className:"bc-dt-range-scroller-wrapper bsc:shrink",children:X.jsx(Cg,{title:b(),scrollerType:zh.Range,onTitleClicked:S,onMovePrevious:_,onMoveNext:x,viewDate:n,dispatcher:c})}),X.jsx("div",{className:"bsc-flex-grow",children:X.jsx(Hv,{mobileMarkup:X.jsx("div",{className:"bc-dt-range-calendar bsc:px-2 bsc:py-1",children:X.jsx(Tg,{viewDate:n,selectedStartDate:t,selectedEndDate:i,selectionMode:iu.Range,onDateSelected:m,locale:s,dispatcher:c})}),aboveMobileMarkup:X.jsxs("div",{className:"bc-dt-range-wrapper bsc:flex bsc:flex-row bsc:px-2 bsc:py-1",children:[X.jsx("div",{className:"bc-dt-range-calendar-1 bsc:border-r bsc:border-solid bsc:border-gray-3 bsc:pr-4",children:X.jsx(Tg,{viewDate:n,selectedStartDate:t,selectedEndDate:i,selectionMode:iu.Range,onDateSelected:m,locale:s,dispatcher:c})}),X.jsx("div",{className:"bc-dt-range-calendar-2 bsc:pl-4",children:X.jsx(Tg,{viewDate:p,selectedStartDate:t,selectedEndDate:i,selectionMode:iu.Range,onDateSelected:m,locale:s,dispatcher:c})})]})})})]})},LG=({viewDate:n,showDateSelector:t,locale:i,timeFormat:s=An.TwelveHour,timeConstraints:u,onChange:c,dispatcher:f},p)=>{const m=w.useRef(s===An.TwelveHour?11:23),S=w.useRef(O9(s)),b=w.useRef(AH(0,59,tt=>tt.toString().padStart(2,"0"))),_=w.useRef(["AM","PM"]),x=w.useRef(lR(n)),D=tt=>tt>11?tt-12:tt,[A,N]=w.useState(D(n.getHours())),[O,R]=w.useState(n.getMinutes()),[U,j]=w.useState(n.getHours()<=12?0:1),G=w.useRef(n.toLocaleDateString(i.code));w.useEffect(()=>{const tt=n.getHours(),H=n.getMinutes();if(tt!==A&&N(s===An.TwelveHour?D(tt):tt),H!==O&&R(H),s===An.TwelveHour){const Q=tt<=11?0:1;Q!==U&&j(Q)}},[n]),w.useEffect(()=>{S.current=O9(s)},[s]);const k=()=>{const tt=u?.hours?.step||1,H=A<m.current?A+tt:0;N(H),J(H,O,U)},et=()=>{const tt=u?.hours?.step||1,H=A>0?A-tt:m.current;N(H),J(H,O,U)},ft=()=>{const tt=u?.minutes?.step||1,H=O+tt<(u?.minutes?.max||59)?O+tt:u?.minutes?.min||0;R(H),J(A,H,U)},I=()=>{const tt=u?.minutes?.step||1,H=O-tt>=(u?.minutes?.min||0)?O-tt:(u?.minutes?.max||60)-tt;R(H),J(A,H,U)},it=()=>{const tt=U===0?1:0;j(tt),J(A,O,tt)},J=(tt,H,Q)=>{const K=s===An.TwelveHour&&Q===1?tt+12:tt;x.current.setHours(K,H),f({type:ye.SetSelectedDate,selectedDate:x.current,viewDate:x.current}),c?.(x.current)},St=()=>{f({type:ye.SetDateSelector,dateSelector:Ta.DaySelector})};w.useImperativeHandle(p,()=>({increaseHour:k,decreaseHour:et,increaseMinute:ft,decreaseMinute:I,changeMeridian:it}));const nt=Ee("bsc:w-full bsc:grid bsc:grid-rows-3 bsc:gap-4 bsc:items-center bc-dt-time-grid",{"bsc:grid-cols-4":s===An.TwelveHour,"bsc:grid-cols-3":s===An.TwentyFourHour}),ht=Ee("bsc:text-center bsc:cursor-pointer bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:text-mono-light-1 bsc:dark:hover:bg-mono-light-1 bsc:dark:hover:text-mono-dark-1 bc-dt-time-date-value",{"bsc:col-span-4":s===An.TwelveHour,"bsc:col-span-3":s===An.TwentyFourHour}),yt="bsc-bg-transparent bsc:p-2 bsc:cursor-pointer bsc:focus:outline-hidden bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-1 bsc:dark:hover:text-mono-dark-1";return X.jsx("div",{className:"bc-dt-time-selector bsc:flex bsc:flex-row bsc:justify-center bsc:p-2",style:{minWidth:s===An.TwelveHour?"15rem":"11rem"},children:X.jsxs("div",{className:nt,children:[t&&X.jsx("div",{className:ht,onClick:St,children:G.current}),X.jsx("div",{className:"bc-dt-time-hour-increase bsc:cursor-pointer bsc:text-center",children:X.jsx(Il,{className:yt,onClick:k,children:X.jsx(_s,{icon:"chevronUp",size:ka.Regular})})}),X.jsx("div",{}),X.jsx("div",{className:"bc-dt-time-minute-increase bsc:cursor-pointer bsc:text-center",children:X.jsx(Il,{className:yt,onClick:ft,children:X.jsx(_s,{icon:"chevronUp",size:ka.Regular})})}),s===An.TwelveHour&&X.jsx("div",{className:"bc-dt-time-meridian-increase bsc:cursor-pointer bsc:text-center",children:X.jsx(Il,{className:yt,onClick:it,children:X.jsx(_s,{icon:"chevronUp",size:ka.Regular})})}),X.jsx("div",{className:"bc-dt-time-hour-value bsc:text-center",children:S.current[A]}),X.jsx("div",{className:"bc-dt-time-separator bsc:text-center",children:":"}),X.jsx("div",{className:"bc-dt-time-minute-value bsc:text-center",children:b.current[O]}),s===An.TwelveHour&&X.jsx("div",{className:"bc-dt-time-meridian-value bsc:text-center",children:_.current[U]}),X.jsx("div",{className:"bc-dt-time-hour-decrease bsc:cursor-pointer bsc:text-center",children:X.jsx(Il,{className:yt,onClick:et,children:X.jsx(_s,{icon:"chevronDown",size:ka.Regular})})}),X.jsx("div",{}),X.jsx("div",{className:"bc-dt-time-minute-decrease bsc:cursor-pointer bsc:text-center",children:X.jsx(Il,{className:yt,onClick:I,children:X.jsx(_s,{icon:"chevronDown",size:ka.Regular})})}),s===An.TwelveHour&&X.jsx("div",{className:"bc-dt-time-meridian-decrease bsc:cursor-pointer bsc:text-center",children:X.jsx(Il,{className:yt,onClick:it,children:X.jsx(_s,{icon:"chevronDown",size:ka.Regular})})})]})})},PG=w.forwardRef(LG),YG=({viewDate:n,locale:t,dispatcher:i})=>{const s=zG(n,t),u=()=>{const m=Rv(n,10);i({type:ye.SetViewDate,viewDate:m})},c=()=>{const m=c0(n,10);i({type:ye.SetViewDate,viewDate:m})},f=m=>{const S=parseInt(m);i({type:ye.SetDateSelector,dateSelector:Ta.MonthSelector,viewDate:xH(n,S)})},p=()=>`${s[0][0].toString()} - ${s[2][1].toString()}`;return X.jsxs("div",{className:"bc-dt-year-selector bsc:p-2",style:{minWidth:"20rem"},children:[X.jsx(Cg,{title:p(),scrollerType:zh.Year,onMovePrevious:u,onMoveNext:c,viewDate:n,dispatcher:i}),X.jsx("div",{className:"bc-dt-year-wrapper bsc:w-full",children:X.jsx("div",{className:"bc-dt-year-grid bsc:grid bsc:grid-cols-4 bsc:gap-4",children:s.map((m,S)=>m.map((b,_)=>b.length>0?X.jsx("div",{className:"bc-dt-year-cell bsc:cursor-pointer bsc:text-center bsc:py-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",onClick:()=>f(b),children:b},S.toString()+_.toString()):X.jsx("div",{},S.toString()+_.toString())))})})]})};class qG{constructor(t,i,s){this.dateSelection=t;const u=2023,c=12,f=20,m=new Date(u,c-1,f).toLocaleDateString(i,{year:"numeric",month:"numeric",day:"numeric"});this.dateFormat=m.replace(`${u}`,"YYYY").replace(`${c}`,"MM").replace(`${f}`,"DD");const S=new Date,b=18,_=24,x=37,D=317;S.setHours(b,_,x,D);const A=S.toLocaleTimeString(i),N=A.startsWith("18");this.use24HourTime=s===void 0?N:s===An.TwentyFourHour,this.timeFormat=A.replace(`${N?b:"6"}`,"HH").replace(`${_}`,"MM").replace(`${x}`,"SS").replace(`${D}`,"LLL"),this.createDateParts()}dateFormat;timeFormat;use24HourTime;monthPart;dayPart;yearPart;twelveHourPart;twentyFourHourPart;minutePart;meridianPart;get is24HourTime(){return this.use24HourTime}createInputFormat(){const t={deleteShiftsFormatPart:!1,formatParts:[]};switch(this.dateSelection){case Ye.DateOnly:return this.createDateFormat(t);case Ye.TimeOnly:return this.createTimeFormat(t);case Ye.DateRange:return this.createDateRangeFormat(t);case Ye.DateTime:return this.createDateTimeFormat(t)}}createDateFormat(t){return this.dateFormat.startsWith("MM")?t.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?t.formatParts.push(...this.createDayMonthYearFormatParts()):t.formatParts.push(...this.createYearMonthDayFormatParts()),t}createTimeFormat(t){return this.use24HourTime?t.formatParts.push(...this.createTwentyFourHourFormatParts()):t.formatParts.push(...this.createTwelveHourFormatParts()),t}createDateRangeFormat(t){const i=[];this.dateFormat.startsWith("MM")?i.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?i.push(...this.createDayMonthYearFormatParts()):i.push(...this.createYearMonthDayFormatParts());const s={characterCount:3,placeholder:" - ",inputText:" - ",isSeparator:!0};return t.formatParts.push(...i,s,...i),t}createDateTimeFormat(t){this.dateFormat.startsWith("MM")?t.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?t.formatParts.push(...this.createDayMonthYearFormatParts()):t.formatParts.push(...this.createYearMonthDayFormatParts());const i={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return t.formatParts.push(i),this.use24HourTime?t.formatParts.push(...this.createTwentyFourHourFormatParts()):t.formatParts.push(...this.createTwelveHourFormatParts()),t}createMonthDayYearFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("MM",""),i=t.indexOf("DD"),s=t.substring(0,i);t=t.replace(s,"").replace("DD","");const u={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};i=t.indexOf("YYYY"),s=t.substring(0,i);const c={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};return[this.monthPart,u,this.dayPart,c,this.yearPart]}return[]}createDayMonthYearFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("DD",""),i=t.indexOf("MM"),s=t.substring(0,i);t=t.replace(s,"").replace("MM","");const u={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};i=t.indexOf("YYYY"),s=t.substring(0,i);const c={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};return[this.dayPart,u,this.monthPart,c,this.yearPart]}return[]}createYearMonthDayFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("YYYY",""),i=t.indexOf("MM"),s=t.substring(0,i);t=t.replace(s,"").replace("MM","");const u={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};i=t.indexOf("DD"),s=t.substring(0,i);const c={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};return[this.yearPart,u,this.monthPart,c,this.dayPart]}return[]}createTwelveHourFormatParts(){if(this.twelveHourPart&&this.minutePart&&this.meridianPart){const t=this.timeFormat.replace("HH",""),i=t.indexOf("MM"),s=t.substring(0,i),u={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0},c={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return[this.twelveHourPart,u,this.minutePart,c,this.meridianPart]}return[]}createTwentyFourHourFormatParts(){if(this.twentyFourHourPart&&this.minutePart){const t=this.timeFormat.replace("HH",""),i=t.indexOf("MM"),s=t.substring(0,i),u={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};return[this.twentyFourHourPart,u,this.minutePart]}return[]}createDateParts(){this.monthPart={name:"month",characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:er.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.dayPart={name:"day",characterCount:2,placeholder:"D",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:er.Numeric,minimumValue:1,maximumValue:31,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.yearPart={name:"year",characterCount:4,placeholder:"Y",inputText:"_",isSeparator:!1,allCharactersRequired:!0,valueType:er.Numeric},this.twelveHourPart={name:"hour",characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:er.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.twentyFourHourPart={name:"hour",characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:er.Numeric,minimumValue:0,maximumValue:23,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.minutePart={name:"minute",characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:er.Numeric,minimumValue:0,maximumValue:59,exceedingMaximumValueCausesError:!0,padWithZeros:!0},this.meridianPart={name:"meridian",characterCount:2,inputText:"_",isSeparator:!1,valueType:er.Text,possibleValues:["AM","PM"]}}}const XG=(n,t,i)=>{const[s,u]=w.useState(),c=w.useRef(void 0);return w.useEffect(()=>{t&&!s&&(c.current=new qG(n,t,i),u(c.current.createInputFormat()))},[t,i]),[s,c.current?.is24HourTime]},KG=({value:n,readOnly:t=!1,label:i,useDefaultDateValue:s=!1,useFormattedInput:u=!1,allowClear:c=!1,closeSelector:f=!1,locale:p,className:m,dateSelection:S=Ye.DateTime,dateFormat:b,timeFormat:_,timeConstraints:x,icon:D,iconPosition:A=Eg.Right,inputElement:N,selectableDate:O,isValidDate:R,onChange:U,onError:j,calendarTemplate:G,dateScrollerTemplate:k,inputTemplate:et,wrapperTemplate:ft})=>{const[I,it]=w.useState(!1),[J,St]=w.useState(),[nt,ht]=w.useState(),[yt,tt,H]=RD(S),Q=w.useRef(void 0),K=w.useRef(!1),pt=w.useRef(p||DH()),dt=w.useRef(void 0),$=w.useRef(void 0),Et=w.useRef(void 0),Rt=w.useRef(null),qt=w.useRef(null),Bt=w.useRef(null),[Vt,se]=XG(S,J,_),Ke=vT.useDateLocale(pt.current),yn=w.useRef({calendarTemplate:G,dateScrollerTemplate:k});w.useEffect(()=>{St(Ke.code),dt.current=Ke;const Ut=It();xe(n||s?{type:ye.InitializeDates,initialDate:Array.isArray(Ut)?Ut[0]:Ut}:{type:ye.SetViewDate,viewDate:Array.isArray(Ut)?Ut[0]:Ut})},[Ke]),w.useEffect(()=>{if(n){const Ut=It();xe({type:ye.InitializeDates,initialDate:Ut})}else xe({type:ye.ClearDates})},[n,dt.current]),w.useEffect(()=>{se!==void 0&&xe({type:ye.SetTimeFormat,timeFormat:se?An.TwentyFourHour:An.TwelveHour})},[se]),w.useEffect(()=>{N&&($.current=N)},[N]),w.useEffect(()=>{xe({type:ye.SetDateSelector,dateSelector:Oe()})},[yt]);const Oe=w.useCallback(()=>H.current===Ye.TimeOnly?Ta.TimeSelector:H.current===Ye.DateTime||H.current===Ye.DateOnly?Ta.DaySelector:Ta.DateRangeSelector,[]),It=()=>{const Ut=new Date;return Ut.setHours(0,0,0,0),n?typeof n=="string"?H.current!==Ye.DateRange?xc(n,dt.current):IS(n,dt.current):n:Ut},Jn={currentSelector:Oe(),currentViewDate:new Date,timeFormat:_===void 0?An.TwelveHour:_,dateInitialized:!1},[Gt,xe]=w.useReducer(UG,Jn),$e=()=>{na(),it(!0)},da=w.useMemo(()=>o0(()=>{it(!1)},250),[]),cn=w.useMemo(()=>o0(()=>{da.cancel()},5),[da]),ea=Ut=>{const ce=Ut.target.innerText;Ii(ce)},Ms=Ut=>{if(Ut){const ce=H.current!==Ye.DateRange?H.current===Ye.TimeOnly&&_!==void 0?xc(Ut):xc(Ut,dt.current):IS(Ut,dt.current);if(ce)if(R){const ir=Array.isArray(ce)?ce.every(Mc=>R(Mc)):R(ce);return!ir&&j&&j(ce),ir}else return!0;else return!1}else return!0},di=Ut=>{Ii(Ut||"")},Ii=Ut=>{const ce=H.current!==Ye.DateRange?H.current===Ye.TimeOnly&&_!==void 0?xc(Ut):xc(Ut,dt.current):IS(Ut,dt.current);ce?(Array.isArray(ce)?(wG(ce[0],rb(Gt.currentViewDate),yR(Io(Gt.currentViewDate,1)))||xe({type:ye.SetViewDate,viewDate:ce[0]}),xe({type:ye.SetSelectedDateRange,selectedStartDate:ce[0],selectedEndDate:ce[1]})):xe({type:ye.SetSelectedDate,selectedDate:ce,viewDate:ce}),U?.(ce)):Ut===""&&(xe({type:ye.ClearDates}),U?.())},jn=Ut=>{H.current===Ye.DateOnly&&f&&it(!1),U?.(Ut)},Mn=w.useCallback((Ut,ce)=>{console.log("onSlotKeyDown",Ut,ce),Ut.key==="ArrowUp"?ce.name==="hour"?Bt.current?.increaseHour():ce.name==="minute"?Bt.current?.increaseMinute():ce.name==="meridian"&&Bt.current?.changeMeridian():Ut.key==="ArrowDown"&&(ce.name==="hour"?Bt.current?.decreaseHour():ce.name==="minute"?Bt.current?.decreaseMinute():ce.name==="meridian"&&Bt.current?.changeMeridian())},[]),Oi=()=>{na(),it(!I),qt.current?qt.current.focus():Rt.current&&Rt.current.focus()},Ht=()=>{xe({type:ye.ClearDates}),it(!1),U?.()},De=(Ut,ce)=>{(!$.current||Q.current!==ce)&&($.current=Ut,Q.current=ce,K.current=!0)},na=()=>{(!Et.current||K.current)&&$.current&&(Et.current=$.current,ht($.current),K.current=!1)},pi=()=>{it(!1),xe({type:ye.SetDateSelector,dateSelector:Oe()})},tn=()=>{switch(b){case R0.Short:return"short";case R0.Medium:return"medium";case R0.Long:return"long";default:return}},Nn=()=>{const Ut=tn();switch(H.current){case Ye.DateTime:return Gt.selectedDate?Ut?Gt.selectedDate.toLocaleString(dt.current?.code,{dateStyle:Ut,timeStyle:Ut}):Gt.selectedDate.toLocaleString(dt.current?.code):"";case Ye.DateOnly:return Gt.selectedDate?Ut?Gt.selectedDate.toLocaleDateString(dt.current?.code,{dateStyle:Ut}):Gt.selectedDate.toLocaleDateString(dt.current?.code):"";case Ye.TimeOnly:return Gt.selectedDate?Ut?Gt.selectedDate.toLocaleTimeString(dt.current?.code,{timeStyle:Ut,hour12:Gt.timeFormat===An.TwelveHour,hourCycle:Gt.timeFormat===An.TwentyFourHour?"h23":void 0}):Gt.selectedDate.toLocaleTimeString(dt.current?.code,{hour12:Gt.timeFormat===An.TwelveHour,hourCycle:Gt.timeFormat===An.TwentyFourHour?"h23":void 0}):"";case Ye.DateRange:return Gt.selectedStartDate&&Gt.selectedEndDate?Ut?`${Gt.selectedStartDate.toLocaleDateString(dt.current?.code,{dateStyle:Ut})} - ${Gt.selectedEndDate.toLocaleDateString(dt.current?.code,{dateStyle:Ut})}`:`${Gt.selectedStartDate.toLocaleDateString(dt.current?.code)} - ${Gt.selectedEndDate.toLocaleDateString(dt.current?.code)}`:"";default:return Gt.selectedDate?Ut?Gt.selectedDate.toLocaleString(dt.current?.code,{dateStyle:Ut,timeStyle:Ut}):Gt.selectedDate.toLocaleString(dt.current?.code):""}},ml=yt===Ye.DateTime||yt===Ye.DateOnly||yt===Ye.DateRange,nr=yt===Ye.DateTime||yt===Ye.TimeOnly,Ns=A===Eg.None?{}:A===Eg.Right?{rightElement:X.jsxs("div",{className:"bsc:flex bsc:text-black bsc:dark:text-mono-light-1",children:[c&&!t&&X.jsx("div",{children:X.jsx(_s,{icon:"close",size:ka.Small,className:"bsc:cursor-pointer bsc:text-sm",onClick:Ht})}),X.jsx("div",{className:"bsc:ml-2",onClick:t?void 0:Oi,children:D||X.jsx(_s,{icon:"calendar",size:ka.Small,className:t?void 0:"bsc:cursor-pointer"})})]}),rightElementClassName:"bsc:justify-center"}:{leftElement:X.jsxs("div",{className:"bsc:flex bsc:text-black bsc:dark:text-mono-light-1",children:[X.jsx("div",{className:"bsc:mr-2",onClick:t?void 0:Oi,children:D||X.jsx(_s,{icon:"calendar",size:ka.Small,className:t?void 0:"bsc:cursor-pointer"})}),c&&!t&&X.jsx("div",{children:X.jsx(_s,{icon:"close",size:ka.Small,className:"bsc:cursor-pointer bsc:text-sm",onClick:Ht})})]}),leftElementClassName:"bsc:justify-center"},Ca={setDateSelector:Ut=>tt(Ut)},z0=ft||((Ut,ce)=>X.jsx(X.Fragment,{children:ce})),Zr=()=>X.jsx(Sc,{props:Ca,template:z0,children:X.jsxs(X.Fragment,{children:[Gt.currentSelector===Ta.DaySelector&&ml&&Gt.dateInitialized&&dt.current&&X.jsx(VG,{selectedDate:Gt.selectedDate,viewDate:Gt.currentViewDate,locale:dt.current,showTimeSelector:H.current===Ye.DateTime,selectableDate:O,isValidDate:R,dispatcher:xe,onChange:jn}),Gt.currentSelector===Ta.MonthSelector&&ml&&Gt.dateInitialized&&dt.current&&X.jsx(GG,{viewDate:Gt.currentViewDate,locale:dt.current,dateSelection:H.current,dispatcher:xe}),Gt.currentSelector===Ta.YearSelector&&ml&&Gt.dateInitialized&&dt.current&&X.jsx(YG,{viewDate:Gt.currentViewDate,locale:dt.current,dispatcher:xe}),Gt.currentSelector===Ta.TimeSelector&&nr&&Gt.dateInitialized&&dt.current&&X.jsx(PG,{ref:Bt,viewDate:Gt.currentViewDate,showDateSelector:H.current===Ye.DateTime,locale:dt.current,timeFormat:Gt.timeFormat,timeConstraints:x,onChange:U,dispatcher:xe}),Gt.currentSelector===Ta.DateRangeSelector&&ml&&Gt.dateInitialized&&dt.current&&X.jsx(jG,{viewDate:Gt.currentViewDate,selectedStartDate:Gt.selectedStartDate,selectedEndDate:Gt.selectedEndDate,locale:dt.current,onChange:U,dispatcher:xe})]})}),Ac=WS({label:i,readOnly:t,allowClear:c,getValue:Nn,onFocus:$e,onInput:ea,iconPosition:A,iconElement:Ns.rightElement||Ns.leftElement},Gt.currentViewDate,xe),Ri=et||((Ut,ce)=>X.jsx(X.Fragment,{children:ce})),ar=Ee("bsc:text-left",{"bc-read-only bsc:bg-gray-4 bsc:dark:bg-mono-dark-3":t,"bsc:bg-white bsc:dark:bg-mono-dark-1":!t},"bc-dt-input",m);return X.jsx(kS.Provider,{value:yn.current,children:X.jsxs("div",{className:"bc-date-time",children:[i&&X.jsx(Pr,{label:i,readOnly:t,className:"bc-dt-label"}),X.jsx(Hv,{mobileMarkup:X.jsxs(X.Fragment,{children:[X.jsx(Sc,{props:Ac,template:Ri,children:X.jsx(tg,{ref:Rt,value:Nn(),readOnly:t,inputMode:"none",className:ar,onFocus:$e,onElementCreate:Ut=>De(Ut,!1),...Ns})}),X.jsx(b9,{visible:I,target:nt,hidden:pi,unmountWhenHidden:!0,children:Zr()})]}),aboveMobileMarkup:X.jsxs(X.Fragment,{children:[X.jsx(Sc,{props:Ac,template:Ri,children:u?X.jsx(A9,{ref:qt,value:Nn(),readOnly:t,className:ar,format:Vt,isInputValid:Ms,onSlotKeyDown:Mn,onFocus:$e,onBlur:da,onChange:di,onElementCreate:Ut=>De(Ut,!0),...Ns}):X.jsx(tg,{ref:Rt,value:Nn(),readOnly:t,className:ar,onFocus:$e,onBlur:da,onInput:ea,onElementCreate:Ut=>De(Ut,!1),...Ns})}),X.jsx(C9,{visible:I,target:nt,shouldTargetCloseOverlay:!1,shouldScrollCloseOverlay:!0,shouldCheckZIndex:!0,shouldRemainOnScreen:!0,hidden:pi,isClickedWithin:cn,unmountWhenHidden:!1,children:Zr()})]})})]})})};var $S,R9;function QG(){if(R9)return $S;R9=1;function n(D,A){var N,O;if(typeof A=="function")O=A(D),O!==void 0&&(D=O);else if(Array.isArray(A))for(N=0;N<A.length;N++)O=A[N](D),O!==void 0&&(D=O);return D}function t(D,A){return D[0]==="-"&&Array.isArray(A)&&/^-\d+$/.test(D)?A.length+parseInt(D,10):D}function i(D){return/^\d+$/.test(D)}function s(D){return Object.prototype.toString.call(D)==="[object Object]"}function u(D){return Object(D)===D}function c(D){return Object.keys(D).length===0}var f=["__proto__","prototype","constructor"],p=function(D){return f.indexOf(D)===-1};function m(D,A){D.indexOf("[")>=0&&(D=D.replace(/\[/g,A).replace(/]/g,""));var N=D.split(A),O=N.filter(p);if(O.length!==N.length)throw Error("Refusing to update blacklisted property "+D);return N}var S=Object.prototype.hasOwnProperty;function b(D,A,N,O){if(!(this instanceof b))return new b(D,A,N,O);typeof A>"u"&&(A=!1),typeof N>"u"&&(N=!0),typeof O>"u"&&(O=!0),this.separator=D||".",this.override=A,this.useArray=N,this.useBrackets=O,this.keepArray=!1,this.cleanup=[]}var _=new b(".",!1,!0,!0);function x(D){return function(){return _[D].apply(_,arguments)}}return b.prototype._fill=function(D,A,N,O){var R=D.shift();if(D.length>0){if(A[R]=A[R]||(this.useArray&&i(D[0])?[]:{}),!u(A[R]))if(this.override)A[R]={};else{if(!(u(N)&&c(N)))throw new Error("Trying to redefine `"+R+"` which is a "+typeof A[R]);return}this._fill(D,A[R],N,O)}else{if(!this.override&&u(A[R])&&!c(A[R])){if(!(u(N)&&c(N)))throw new Error("Trying to redefine non-empty obj['"+R+"']");return}A[R]=n(N,O)}},b.prototype.object=function(D,A){var N=this;return Object.keys(D).forEach(function(O){var R=A===void 0?null:A[O],U=m(O,N.separator).join(N.separator);U.indexOf(N.separator)!==-1?(N._fill(U.split(N.separator),D,D[O],R),delete D[O]):D[O]=n(D[O],R)}),D},b.prototype.str=function(D,A,N,O){var R=m(D,this.separator).join(this.separator);return D.indexOf(this.separator)!==-1?this._fill(R.split(this.separator),N,A,O):N[D]=n(A,O),N},b.prototype.pick=function(D,A,N,O){var R,U,j,G,k;for(U=m(D,this.separator),R=0;R<U.length;R++)if(G=t(U[R],A),A&&typeof A=="object"&&G in A){if(R===U.length-1)return N?(j=A[G],O&&Array.isArray(A)?A.splice(G,1):delete A[G],Array.isArray(A)&&(k=U.slice(0,-1).join("."),this.cleanup.indexOf(k)===-1&&this.cleanup.push(k)),j):A[G];A=A[G]}else return;return N&&Array.isArray(A)&&(A=A.filter(function(et){return et!==void 0})),A},b.prototype.delete=function(D,A){return this.remove(D,A,!0)},b.prototype.remove=function(D,A,N){var O;if(this.cleanup=[],Array.isArray(D)){for(O=0;O<D.length;O++)this.pick(D[O],A,!0,N);return N||this._cleanup(A),A}else return this.pick(D,A,!0,N)},b.prototype._cleanup=function(D){var A,N,O,R;if(this.cleanup.length){for(N=0;N<this.cleanup.length;N++)O=this.cleanup[N].split("."),R=O.splice(0,-1).join("."),A=R?this.pick(R,D):D,A=A[O[0]].filter(function(U){return U!==void 0}),this.set(this.cleanup[N],A,D);this.cleanup=[]}},b.prototype.del=b.prototype.remove,b.prototype.move=function(D,A,N,O,R){return typeof O=="function"||Array.isArray(O)?this.set(A,n(this.pick(D,N,!0),O),N,R):(R=O,this.set(A,this.pick(D,N,!0),N,R)),N},b.prototype.transfer=function(D,A,N,O,R,U){return typeof R=="function"||Array.isArray(R)?this.set(A,n(this.pick(D,N,!0),R),O,U):(U=R,this.set(A,this.pick(D,N,!0),O,U)),O},b.prototype.copy=function(D,A,N,O,R,U){return typeof R=="function"||Array.isArray(R)?this.set(A,n(JSON.parse(JSON.stringify(this.pick(D,N,!1))),R),O,U):(U=R,this.set(A,this.pick(D,N,!1),O,U)),O},b.prototype.set=function(D,A,N,O){var R,U,j,G;if(typeof A>"u")return N;for(j=m(D,this.separator),R=0;R<j.length;R++){if(G=j[R],R===j.length-1)if(O&&s(A)&&s(N[G]))for(U in A)S.call(A,U)&&(N[G][U]=A[U]);else if(O&&Array.isArray(N[G])&&Array.isArray(A))for(var k=0;k<A.length;k++)N[j[R]].push(A[k]);else N[G]=A;else(!S.call(N,G)||!s(N[G])&&!Array.isArray(N[G]))&&(/^\d+$/.test(j[R+1])?N[G]=[]:N[G]={});N=N[G]}return N},b.prototype.transform=function(D,A,N){return A=A||{},N=N||{},Object.keys(D).forEach((function(O){this.set(D[O],this.pick(O,A),N)}).bind(this)),N},b.prototype.dot=function(D,A,N){A=A||{},N=N||[];var O=Array.isArray(D);return Object.keys(D).forEach((function(R){var U=O&&this.useBrackets?"["+R+"]":R;if(u(D[R])&&(s(D[R])&&!c(D[R])||Array.isArray(D[R])&&!this.keepArray&&D[R].length!==0))if(O&&this.useBrackets){var j=N[N.length-1]||"";return this.dot(D[R],A,N.slice(0,-1).concat(j+U))}else return this.dot(D[R],A,N.concat(U));else O&&this.useBrackets?A[N.join(this.separator).concat("["+R+"]")]=D[R]:A[N.concat(U).join(this.separator)]=D[R]}).bind(this)),A},b.pick=x("pick"),b.move=x("move"),b.transfer=x("transfer"),b.transform=x("transform"),b.copy=x("copy"),b.object=x("object"),b.str=x("str"),b.set=x("set"),b.delete=x("delete"),b.del=b.remove=x("remove"),b.dot=x("dot"),["override","overwrite"].forEach(function(D){Object.defineProperty(b,D,{get:function(){return _.override},set:function(A){_.override=!!A}})}),["useArray","keepArray","useBrackets"].forEach(function(D){Object.defineProperty(b,D,{get:function(){return _[D]},set:function(A){_[D]=A}})}),b._process=n,$S=b,$S}var ZG=QG();const z9=X2(ZG),JG=({name:n,label:t,value:i,data:s,textField:u,valueField:c,readOnly:f=!1,orientation:p=Za.Horizontal,isMultiSelect:m=!1,className:S,onChange:b,itemTemplate:_})=>{const[x,D]=w.useState(),[A,N]=w.useState([]),O=tv(()=>s,[s]),R=w.useId();w.useEffect(()=>{if(m){const nt=Array.isArray(i)?i.map(ht=>ht.toString()):i?[String(i)]:void 0;N(nt??[])}else i&&D(i.toString())},[i]);const U=nt=>m?A.findIndex(ht=>ht===nt)>-1:x===nt,j=nt=>{const ht=nt.toString();if(m){const yt=U(ht);let tt;yt?tt=A.filter(H=>H!=ht):tt=[...A,ht],N(tt),b?.({name:n,value:tt})}else ht!==x&&(D(ht),b?.({name:n,value:ht}))},G=nt=>{Array.isArray(nt?.value)?N(nt?.value??[]):D(nt?.value),b?.(nt)},k=$p(lh.FocusWithin),et=w.useCallback((nt,ht)=>X.jsx(X.Fragment,{children:ht}),[]),ft=_||et,I=(nt,ht,yt)=>{const tt=`element_${R}_${ht}`,H=z9.pick(u,nt),Q=String(z9.pick(c,nt)),K=ht===0,pt=ht===yt.length-1,dt=Ee("bc-group-button-item bsc:cursor-pointer bsc:border-solid bsc:p-2 bsc:font-medium",{"bsc:has-data-checked:bg-primary-1 bsc:dark:has-data-checked:bg-mono-light-1 bsc:has-data-checked:text-white bsc:dark:has-data-checked:text-mono-dark-1 bsc:dark:text-mono-light-1 bsc:text-gray-2 bsc:border-gray-3 bsc:dark:border-mono-light-2":!f,"bc-read-only bsc:has-data-checked:bg-primary-4 bsc:dark:has-data-checked:bg-mono-light-3 bsc:has-data-checked:text-gray-5 bsc:dark:has-data-checked:text-mono-dark-3 bsc:dark:text-mono-light-3 bsc:text-gray-3 bsc:border-gray-4 bsc:dark:border-mono-light-3 bsc:pointer-events-none":f,"bsc:border-t bsc:border-l bsc:border-b bsc:rounded-l-md bsc:pl-2":K&&p===Za.Horizontal,"bsc:border-t bsc:border-r bsc:border-l bsc:border-b bsc:rounded-r-md bsc:pr-2":pt&&p===Za.Horizontal,"bsc:border-t bsc:border-b":!K&&!pt&&p===Za.Horizontal,"bsc:border-l":!K&&p===Za.Horizontal,"bsc:border-l bsc:border-r bsc:border-t bsc:rounded-t-md":K&&p===Za.Vertical,"bsc:border bsc:rounded-b-md":pt&&p===Za.Vertical,"bsc:border-t bsc:border-l bsc:border-r":!K&&!pt&&p===Za.Vertical},k),$={itemId:tt,selectedValue:m?A:x,itemText:H,itemValue:Q,itemData:nt,itemStyles:dt,isSelected:U(Q),isFirstItem:K,isLastItem:pt,onItemChanged:j};return m?X.jsx(Sc,{props:$,template:ft,children:X.jsx(fh,{className:dt,children:X.jsx(c6,{value:Q,className:"bsc:block bsc:w-full bsc:cursor-pointer",children:H})})},tt):X.jsx(Sc,{props:$,template:ft,children:X.jsx(fh,{className:dt,children:X.jsx(y6,{value:Q,className:"bsc:block bsc:w-full bsc:cursor-pointer",children:H})})},tt)},it=Ee("bsc:flex bsc:flex-col bsc:gap-2",S),J=Ee("bsc:flex",{"bsc:flex-col bsc:w-max":p===Za.Vertical}),St=nt=>m?X.jsx(d6,{name:n,value:A,readOnly:f,onChange:G,className:J,children:nt.map(I)}):X.jsx(g6,{name:n,value:x,readOnly:f,onChange:G,className:J,children:nt.map(I)});return X.jsxs(fh,{className:it,children:[t&&X.jsx(Pr,{label:t,readOnly:f}),O&&St(O)]})},FG=w.memo(JG),kG=({name:n,label:t,value:i,data:s,textField:u,valueField:c,readOnly:f=!1,labelLocation:p=Cs.Right,orientation:m=Za.Vertical,className:S,useAnimation:b,onChange:_})=>{const x=tv(()=>s,[s]),D=w.useId(),A=hv(b),N=$p(lh.FocusWithin),O=Ee("bc-radio-container bsc:flex bsc:flex-col bsc:gap-1",S),R=Ee("bc-radio-wrapper bsc:flex bsc:gap-1",{"bsc:flex-col":m===Za.Vertical,"bsc:*:pr-2":m===Za.Horizontal}),U=Ee("bc-radio-item-wrapper bsc:flex bsc:items-center bsc:*:cursor-pointer",{"bc-read-only":f}),j=Ee("bc-radio-item bsc:group bsc:relative bsc:*:size-[21px] bsc:rounded-full",{"bsc:ml-2":p===Cs.Left,"bsc:mr-2":p===Cs.Right,"bc-read-only":f},N),G=Ee("bc-radio-item-svg bsc:stroke-2 bsc:fill-none bsc:rounded-full bsc:stroke-gray-1 bsc:dark:stroke-mono-light-2 bsc:group-data-read-only:stroke-gray-4 bsc:dark:group-data-read-only:stroke-mono-light-3"),k=Ee("bsc:group-data-checked:fill-primary-1 bsc:dark:group-data-checked:fill-mono-light-2 bsc:group-data-checked:group-data-read-only:fill-primary-4 bsc:dark:group-data-checked:group-data-read-only:fill-mono-light-3",{"bsc:group-data-checked:animate-bounce":!f&&A}),et=Ee("bsc:invisible bsc:group-data-checked:visible bsc:group-data-checked:fill-white bsc:dark:group-data-checked:fill-mono-dark-1",{"bsc:group-data-checked:animate-bounce":!f&&A}),ft=(I,it)=>{const J=I[u],St=I[c];return X.jsxs(fh,{className:U,children:[p===Cs.Left&&X.jsx(Pr,{label:J,readOnly:f}),X.jsx(y6,{value:St,className:j,children:X.jsxs("svg",{viewBox:"0 0 30 30",preserveAspectRatio:"xMidYMid meet",className:G,children:[X.jsx("circle",{cx:15,cy:15,r:15,className:k}),X.jsx("circle",{cx:"50%",cy:"50%",r:7,className:et})]})}),p===Cs.Right&&X.jsx(Pr,{label:J,readOnly:f})]},`radio_${D}_item${it}`)};return X.jsxs("div",{className:O,children:[t&&X.jsx(Pr,{label:t,readOnly:f}),X.jsx(g6,{name:n,value:i,readOnly:f,onChange:_,className:R,children:x&&x.map(ft)})]})},IG=w.memo(kG),WG=({name:n,label:t,value:i,checked:s=!1,readOnly:u=!1,useAnimation:c,className:f,onChange:p})=>{const m=hv(c),S=Ee("bc-toggle-wrapper bsc:flex bsc:flex-col",f),b=$p(lh.FocusWithin),_=Ee("bc-toggle-container bsc:group bsc:flex bsc:mt-0.5 bsc:relative bsc:w-[60px] bsc:h-[26px] bsc:rounded-full bsc:[transition:background-color_1s]",{"bsc:cursor-pointer bsc:bg-gray-3 bsc:dark:bg-mono-dark-3 bsc:has-checked:bg-primary-1 bsc:dark:has-checked:bg-mono-light-2":!u,"bc-read-only bsc:pointer-events-none bsc:bg-gray-4 bsc:dark:bg-mono-dark-2 bsc:has-checked:bg-primary-4 bsc:dark:has-checked:bg-mono-light-3":u},b),x=Ee("bc-toggle-switch bsc:absolute bsc:rounded-full bsc:dark:border bsc:dark:border-solid bsc:dark:border-mono-dark-1 bsc:group-data-toggled:translate-x-[35px] bsc:w-[18px] bsc:h-[18px] bsc:top-[4px] bsc:left-[4px]",{"bsc:bg-white bsc:cursor-pointer":!u,"bc-read-only bsc:bg-gray-5 bsc:pointer-events-none":u,"bsc:[transition:0.3s]":!u&&m});return X.jsxs(fh,{className:S,children:[t&&X.jsx(Pr,{label:t,readOnly:u}),X.jsx(EA,{name:n,value:i,toggled:s,onChange:p,className:_,children:X.jsx("div",{className:x})})]})},$G=w.memo(WG);ne.AvatarEditor=HD,ne.BeeSoftProvider=wD,ne.Button=Il,ne.Checkbox=v6,ne.CheckboxGroup=_A,ne.ContentEditableInput=tg,ne.DateFormatType=R0,ne.DateScrollerType=zh,ne.DateSelectionType=Ye,ne.DateTime=KG,ne.FormGroupItemOrientation=Za,ne.FormattedInput=A9,ne.GroupButton=FG,ne.MediaQuery=Hv,ne.MobileOverlayPanel=b9,ne.OverlayPanel=C9,ne.RadioButton=IG,ne.SelectionLabelLocation=Cs,ne.Toggle=$G,ne.applyBeeSoftTheme=zH,ne.createBeeSoftTheme=HH,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})}));
|