(function(){var Xv=Object.create,tf=Object.defineProperty,Uv=Object.getOwnPropertyDescriptor,Vv=Object.getOwnPropertyNames,Wv=Object.getPrototypeOf,Qv=Object.prototype.hasOwnProperty,Et=(n,s)=>()=>(n&&(s=n(n=0)),s),Di=(n,s)=>()=>(s||(n((s={exports:{}}).exports,s),n=null),s.exports),gg=(n,s)=>{let u={};for(var r in n)tf(u,r,{get:n[r],enumerable:!0});return s||tf(u,Symbol.toStringTag,{value:"Module"}),u},qv=(n,s,u,r)=>{if(s&&typeof s=="object"||typeof s=="function")for(var d=Vv(s),m=0,p=d.length,y;ms[S]).bind(null,y),enumerable:!(r=Uv(s,y))||r.enumerable});return n},xc=(n,s,u)=>(u=n!=null?Xv(Wv(n)):{},qv(s||!n||!n.__esModule?tf(u,"default",{value:n,enumerable:!0}):u,n)),Kv=Di((n=>{function s(lt,nt){var et=lt.length;lt.push(nt);t:for(;0>>1,Nt=lt[Ct];if(0>>1;Ctd(tt,et))ytd(Ot,tt)?(lt[Ct]=Ot,lt[yt]=et,Ct=yt):(lt[Ct]=tt,lt[j]=et,Ct=j);else if(ytd(Ot,et))lt[Ct]=Ot,lt[yt]=et,Ct=yt;else break t}}return nt}function d(lt,nt){var et=lt.sortIndex-nt.sortIndex;return et!==0?et:lt.id-nt.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;n.unstable_now=function(){return m.now()}}else{var p=Date,y=p.now();n.unstable_now=function(){return p.now()-y}}var S=[],x=[],L=1,_=null,M=3,w=!1,N=!1,J=!1,q=!1,G=typeof setTimeout=="function"?setTimeout:null,V=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;function F(lt){for(var nt=u(x);nt!==null;){if(nt.callback===null)r(x);else if(nt.startTime<=lt)r(x),nt.sortIndex=nt.expirationTime,s(S,nt);else break;nt=u(x)}}function ot(lt){if(J=!1,F(lt),!N)if(u(S)!==null)N=!0,ut||(ut=!0,jt());else{var nt=u(x);nt!==null&&Lt(ot,nt.startTime-lt)}}var ut=!1,at=-1,mt=5,Rt=-1;function zt(){return q?!0:!(n.unstable_now()-Rtlt&&zt());){var Ct=_.callback;if(typeof Ct=="function"){_.callback=null,M=_.priorityLevel;var Nt=Ct(_.expirationTime<=lt);if(lt=n.unstable_now(),typeof Nt=="function"){_.callback=Nt,F(lt),nt=!0;break e}_===u(S)&&r(S),F(lt)}else r(S);_=u(S)}if(_!==null)nt=!0;else{var te=u(x);te!==null&&Lt(ot,te.startTime-lt),nt=!1}}break t}finally{_=null,M=et,w=!1}nt=void 0}}finally{nt?jt():ut=!1}}}var jt;if(typeof U=="function")jt=function(){U(Gt)};else if(typeof MessageChannel<"u"){var Ht=new MessageChannel,Mt=Ht.port2;Ht.port1.onmessage=Gt,jt=function(){Mt.postMessage(null)}}else jt=function(){G(Gt,0)};function Lt(lt,nt){at=G(function(){lt(n.unstable_now())},nt)}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(lt){lt.callback=null},n.unstable_forceFrameRate=function(lt){0>lt||125Ct?(lt.sortIndex=et,s(x,lt),u(S)===null&<===u(x)&&(J?(V(at),at=-1):J=!0,Lt(ot,et-Ct))):(lt.sortIndex=Nt,s(S,lt),N||w||(N=!0,ut||(ut=!0,jt()))),lt},n.unstable_shouldYield=zt,n.unstable_wrapCallback=function(lt){var nt=M;return function(){var et=M;M=nt;try{return lt.apply(this,arguments)}finally{M=et}}}})),gm=Di(((n,s)=>{s.exports=Kv()})),kv=Di((n=>{var s=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),y=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),L=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),w=Symbol.iterator;function N(j){return j===null||typeof j!="object"?null:(j=w&&j[w]||j["@@iterator"],typeof j=="function"?j:null)}var J={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},q=Object.assign,G={};function V(j,tt,yt){this.props=j,this.context=tt,this.refs=G,this.updater=yt||J}V.prototype.isReactComponent={},V.prototype.setState=function(j,tt){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,tt,"setState")},V.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function U(){}U.prototype=V.prototype;function F(j,tt,yt){this.props=j,this.context=tt,this.refs=G,this.updater=yt||J}var ot=F.prototype=new U;ot.constructor=F,q(ot,V.prototype),ot.isPureReactComponent=!0;var ut=Array.isArray;function at(){}var mt={H:null,A:null,T:null,S:null},Rt=Object.prototype.hasOwnProperty;function zt(j,tt,yt){var Ot=yt.ref;return{$$typeof:s,type:j,key:tt,ref:Ot!==void 0?Ot:null,props:yt}}function Gt(j,tt){return zt(j.type,tt,j.props)}function jt(j){return typeof j=="object"&&j!==null&&j.$$typeof===s}function Ht(j){var tt={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(yt){return tt[yt]})}var Mt=/\/+/g;function Lt(j,tt){return typeof j=="object"&&j!==null&&j.key!=null?Ht(""+j.key):tt.toString(36)}function lt(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(at,at):(j.status="pending",j.then(function(tt){j.status==="pending"&&(j.status="fulfilled",j.value=tt)},function(tt){j.status==="pending"&&(j.status="rejected",j.reason=tt)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function nt(j,tt,yt,Ot,Wt){var Bt=typeof j;(Bt==="undefined"||Bt==="boolean")&&(j=null);var kt=!1;if(j===null)kt=!0;else switch(Bt){case"bigint":case"string":case"number":kt=!0;break;case"object":switch(j.$$typeof){case s:case u:kt=!0;break;case _:return kt=j._init,nt(kt(j._payload),tt,yt,Ot,Wt)}}if(kt)return Wt=Wt(j),kt=Ot===""?"."+Lt(j,0):Ot,ut(Wt)?(yt="",kt!=null&&(yt=kt.replace(Mt,"$&/")+"/"),nt(Wt,tt,yt,"",function(ti){return ti})):Wt!=null&&(jt(Wt)&&(Wt=Gt(Wt,yt+(Wt.key==null||j&&j.key===Wt.key?"":(""+Wt.key).replace(Mt,"$&/")+"/")+kt)),tt.push(Wt)),1;kt=0;var fa=Ot===""?".":Ot+":";if(ut(j))for(var he=0;he{s.exports=kv()})),Fv=Di((n=>{var s=Cs();function u(x){var L="https://react.dev/errors/"+x;if(1{function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(r){console.error(r)}}u(),s.exports=Fv()})),$v=Di((n=>{var s=gm(),u=Cs(),r=Pv();function d(t){var e="https://react.dev/errors/"+t;if(1te||(t.current=Nt[te],Nt[te]=null,te--)}function yt(t,e){te++,Nt[te]=t.current,t.current=e}var Ot=j(null),Wt=j(null),Bt=j(null),kt=j(null);function fa(t,e){switch(yt(Bt,e),yt(Wt,t),yt(Ot,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?fv(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=fv(e),t=mv(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}tt(Ot),yt(Ot,t)}function he(){tt(Ot),tt(Wt),tt(Bt)}function ti(t){t.memoizedState!==null&&yt(kt,t);var e=Ot.current,l=mv(e,t.type);e!==l&&(yt(Wt,t),yt(Ot,l))}function an(t){Wt.current===t&&(tt(Ot),tt(Wt)),kt.current===t&&(tt(kt),Kh._currentValue=Ct)}var di,nn;function ei(t){if(di===void 0)try{throw Error()}catch(l){var e=l.stack.trim().match(/\n( *(at )?)/);di=e&&e[1]||"",nn=-1)":-1f||O[c]!==Q[f]){var it=` `+O[c].replace(" at new "," at ");return t.displayName&&it.includes("")&&(it=it.replace("",t.displayName)),it}while(1<=c&&0<=f);break}}}finally{aa=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?ei(l):""}function za(t,e){switch(t.tag){case 26:case 27:case 5:return ei(t.type);case 16:return ei("Lazy");case 13:return t.child!==e&&e!==null?ei("Suspense Fallback"):ei("Suspense");case 19:return ei("SuspenseList");case 0:case 15:return La(t.type,!1);case 11:return La(t.type.render,!1);case 1:return La(t.type,!0);case 31:return ei("Activity");default:return""}}function Ma(t){try{var e="",l=null;do e+=za(t,l),l=t,t=t.return;while(t);return e}catch(c){return` Error generating stack: `+c.message+` `+c.stack}}var ai=Object.prototype.hasOwnProperty,ii=s.unstable_scheduleCallback,el=s.unstable_cancelCallback,En=s.unstable_shouldYield,ma=s.unstable_requestPaint,Na=s.unstable_now,Ko=s.unstable_getCurrentPriorityLevel,al=s.unstable_ImmediatePriority,Il=s.unstable_UserBlockingPriority,il=s.unstable_NormalPriority,Zi=s.unstable_LowPriority,zn=s.unstable_IdlePriority,Lu=s.log,Ns=s.unstable_setDisableYieldValue,Mn=null,Da=null;function Ji(t){if(typeof Lu=="function"&&Ns(t),Da&&typeof Da.setStrictMode=="function")try{Da.setStrictMode(Mn,t)}catch{}}var Qa=Math.clz32?Math.clz32:ko,xu=Math.log,Nd=Math.LN2;function ko(t){return t>>>=0,t===0?32:31-(xu(t)/Nd|0)|0}var ln=256,Bi=262144,Nn=4194304;function Tn(t){var e=t&42;if(e!==0)return e;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function An(t,e,l){var c=t.pendingLanes;if(c===0)return 0;var f=0,g=t.suspendedLanes,C=t.pingedLanes;t=t.warmLanes;var z=c&134217727;return z!==0?(c=z&~g,c!==0?f=Tn(c):(C&=z,C!==0?f=Tn(C):l||(l=z&~t,l!==0&&(f=Tn(l))))):(z=c&~g,z!==0?f=Tn(z):C!==0?f=Tn(C):l||(l=c&~t,l!==0&&(f=Tn(l)))),f===0?0:e!==0&&e!==f&&(e&g)===0&&(g=f&-f,l=e&-e,g>=l||g===32&&(l&4194048)!==0)?e:f}function nl(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Fo(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+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 wn(){var t=Nn;return Nn<<=1,(Nn&62914560)===0&&(Nn=4194304),t}function _u(t){for(var e=[],l=0;31>l;l++)e.push(t);return e}function Zl(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Eu(t,e,l,c,f,g){var C=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var z=t.entanglements,O=t.expirationTimes,Q=t.hiddenUpdates;for(l=C&~l;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var tr=/[\n"\\]/g;function ka(t){return t.replace(tr,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function Nu(t,e,l,c,f,g,C,z){t.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?t.type=C:t.removeAttribute("type"),e!=null?C==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Ui(e)):t.value!==""+Ui(e)&&(t.value=""+Ui(e)):C!=="submit"&&C!=="reset"||t.removeAttribute("value"),e!=null?sn(t,C,Ui(e)):l!=null?sn(t,C,Ui(l)):c!=null&&t.removeAttribute("value"),f==null&&g!=null&&(t.defaultChecked=!!g),f!=null&&(t.checked=f&&typeof f!="function"&&typeof f!="symbol"),z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?t.name=""+Ui(z):t.removeAttribute("name")}function er(t,e,l,c,f,g,C,z){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),e!=null||l!=null){if(!(g!=="submit"&&g!=="reset"||e!=null)){Hc(t);return}l=l!=null?""+Ui(l):"",e=e!=null?""+Ui(e):l,z||e===t.value||(t.value=e),t.defaultValue=e}c=c??f,c=typeof c!="function"&&typeof c!="symbol"&&!!c,t.checked=z?t.checked:!!c,t.defaultChecked=!!c,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(t.name=C),Hc(t)}function sn(t,e,l){e==="number"&&Ue(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function cl(t,e,l,c){if(t=t.options,e){e={};for(var f=0;f"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gd=!1;if(Rn)try{var Au={};Object.defineProperty(Au,"passive",{get:function(){Gd=!0}}),window.addEventListener("test",Au,Au),window.removeEventListener("test",Au,Au)}catch{Gd=!1}var Ti=null,cr=null,ws=null;function Ic(){if(ws)return ws;var t,e=cr,l=e.length,c,f="value"in Ti?Ti.value:Ti.textContent,g=f.length;for(t=0;t=Gu),Ud=" ",kf=!1;function Aa(t,e){switch(t){case"keyup":return Os.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vd(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ys=!1;function Ff(t,e){switch(t){case"compositionend":return Vd(e);case"keypress":return e.which!==32?null:(kf=!0,Ud);case"textInput":return t=e.data,t===Ud&&kf?null:t;default:return null}}function Pf(t,e){if(Ys)return t==="compositionend"||!ju&&Aa(t,e)?(t=Ic(),ws=cr=Ti=null,Ys=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:l,offset:e-t};t=c}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=e0(l)}}function Vi(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Vi(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Kc(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Ue(t.document);e instanceof t.HTMLIFrameElement;){try{var l=typeof e.contentWindow.location.href=="string"}catch{l=!1}if(l)t=e.contentWindow;else break;e=Ue(t.document)}return e}function vr(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var $d=Rn&&"documentMode"in document&&11>=document.documentMode,js=null,yr=null,Gs=null,kc=!1;function th(t,e,l){var c=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;kc||js==null||js!==Ue(c)||(c=js,"selectionStart"in c&&vr(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Gs&&Rs(Gs,c)||(Gs=c,c=me(yr,"onSelect"),0>=C,f-=C,gi=1<<32-Qa(e)+f|l<$t?(ve=Yt,Yt=null):ve=Yt.sibling;var ze=K(X,Yt,W[$t],st);if(ze===null){Yt===null&&(Yt=ve);break}t&&Yt&&ze.alternate===null&&e(X,Yt),H=g(ze,H,$t),Ee===null?Dt=ze:Ee.sibling=ze,Ee=ze,Yt=ve}if($t===W.length)return l(X,Yt),Xt&&qi(X,$t),Dt;if(Yt===null){for(;$t$t?(ve=Yt,Yt=null):ve=Yt.sibling;var Lc=K(X,Yt,ze.value,st);if(Lc===null){Yt===null&&(Yt=ve);break}t&&Yt&&Lc.alternate===null&&e(X,Yt),H=g(Lc,H,$t),Ee===null?Dt=Lc:Ee.sibling=Lc,Ee=Lc,Yt=ve}if(ze.done)return l(X,Yt),Xt&&qi(X,$t),Dt;if(Yt===null){for(;!ze.done;$t++,ze=W.next())ze=ct(X,ze.value,st),ze!==null&&(H=g(ze,H,$t),Ee===null?Dt=ze:Ee.sibling=ze,Ee=ze);return Xt&&qi(X,$t),Dt}for(Yt=c(Yt);!ze.done;$t++,ze=W.next())ze=$(Yt,X,$t,ze.value,st),ze!==null&&(t&&ze.alternate!==null&&Yt.delete(ze.key===null?$t:ze.key),H=g(ze,H,$t),Ee===null?Dt=ze:Ee.sibling=ze,Ee=ze);return t&&Yt.forEach(function(Pb){return e(X,Pb)}),Xt&&qi(X,$t),Dt}function He(X,H,W,st){if(typeof W=="object"&&W!==null&&W.type===q&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case N:t:{for(var Dt=W.key;H!==null;){if(H.key===Dt){if(Dt=W.type,Dt===q){if(H.tag===7){l(X,H.sibling),st=f(H,W.props.children),st.return=X,X=st;break t}}else if(H.elementType===Dt||typeof Dt=="object"&&Dt!==null&&Dt.$$typeof===Rt&&Us(Dt)===H.type){l(X,H.sibling),st=f(H,W.props),Ft(st,W),st.return=X,X=st;break t}l(X,H);break}else e(X,H);H=H.sibling}W.type===q?(st=ql(W.props.children,X.mode,st,W.key),st.return=X,X=st):(st=wa(W.type,W.key,W.props,null,X.mode,st),Ft(st,W),st.return=X,X=st)}return C(X);case J:t:{for(Dt=W.key;H!==null;){if(H.key===Dt)if(H.tag===4&&H.stateNode.containerInfo===W.containerInfo&&H.stateNode.implementation===W.implementation){l(X,H.sibling),st=f(H,W.children||[]),st.return=X,X=st;break t}else{l(X,H);break}else e(X,H);H=H.sibling}st=on(W,X.mode,st),st.return=X,X=st}return C(X);case Rt:return W=Us(W),He(X,H,W,st)}if(lt(W))return wt(X,H,W,st);if(Ht(W)){if(Dt=Ht(W),typeof Dt!="function")throw Error(d(150));return W=Dt.call(W),Jt(X,H,W,st)}if(typeof W.then=="function")return He(X,H,ku(W),st);if(W.$$typeof===F)return He(X,H,Js(X,W),st);Tr(X,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,H!==null&&H.tag===6?(l(X,H.sibling),st=f(H,W),st.return=X,X=st):(l(X,H),st=cn(W,X.mode,st),st.return=X,X=st),C(X)):l(X,H)}return function(X,H,W,st){try{Ku=0;var Dt=He(X,H,W,st);return Vs=null,Dt}catch(Yt){if(Yt===Xs||Yt===In)throw Yt;var Ee=Ai(29,Yt,null,X.mode);return Ee.lanes=st,Ee.return=X,Ee}}}var Sl=pi(!0),d0=pi(!1),fn=!1;function es(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function as(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function is(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Cl(t,e,l){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(oe&2)!==0){var f=c.pending;return f===null?e.next=e:(e.next=f.next,f.next=e),c.pending=e,e=Ju(t),Qi(t,null,l),e}return Sr(t,c,e,l),Ju(t)}function Fu(t,e,l){if(e=e.updateQueue,e!==null&&(e=e.shared,(l&4194048)!==0)){var c=e.lanes;c&=t.pendingLanes,l|=c,e.lanes=l,qa(t,l)}}function Zn(t,e){var l=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,l===c)){var f=null,g=null;if(l=l.firstBaseUpdate,l!==null){do{var C={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};g===null?f=g=C:g=g.next=C,l=l.next}while(l!==null);g===null?f=g=e:g=g.next=e}else f=g=e;l={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:g,shared:c.shared,callbacks:c.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=e:t.next=e,l.lastBaseUpdate=e}var io=!1;function Ws(){if(io){var t=$l;if(t!==null)throw t}}function Qs(t,e,l,c){io=!1;var f=t.updateQueue;fn=!1;var g=f.firstBaseUpdate,C=f.lastBaseUpdate,z=f.shared.pending;if(z!==null){f.shared.pending=null;var O=z,Q=O.next;O.next=null,C===null?g=Q:C.next=Q,C=O;var it=t.alternate;it!==null&&(it=it.updateQueue,z=it.lastBaseUpdate,z!==C&&(z===null?it.firstBaseUpdate=Q:z.next=Q,it.lastBaseUpdate=O))}if(g!==null){var ct=f.baseState;C=0,it=Q=O=null,z=g;do{var K=z.lane&-536870913,$=K!==z.lane;if($?(ee&K)===K:(c&K)===K){K!==0&&K===le&&(io=!0),it!==null&&(it=it.next={lane:0,tag:z.tag,payload:z.payload,callback:null,next:null});t:{var wt=t,Jt=z;K=e;var He=l;switch(Jt.tag){case 1:if(wt=Jt.payload,typeof wt=="function"){ct=wt.call(He,ct,K);break t}ct=wt;break t;case 3:wt.flags=wt.flags&-65537|128;case 0:if(wt=Jt.payload,K=typeof wt=="function"?wt.call(He,ct,K):wt,K==null)break t;ct=M({},ct,K);break t;case 2:fn=!0}}K=z.callback,K!==null&&(t.flags|=64,$&&(t.flags|=8192),$=f.callbacks,$===null?f.callbacks=[K]:$.push(K))}else $={lane:K,tag:z.tag,payload:z.payload,callback:z.callback,next:null},it===null?(Q=it=$,O=ct):it=it.next=$,C|=K;if(z=z.next,z===null){if(z=f.shared.pending,z===null)break;$=z,z=$.next,$.next=null,f.lastBaseUpdate=$,f.shared.pending=null}}while(!0);it===null&&(O=ct),f.baseState=O,f.firstBaseUpdate=Q,f.lastBaseUpdate=it,g===null&&(f.shared.lanes=0),fe|=C,t.lanes=C,t.memoizedState=ct}}function Ar(t,e){if(typeof t!="function")throw Error(d(191,t));t.call(e)}function Ll(t,e){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;tg?g:8;var C=nt.T,z={};nt.T=z,Oh(t,!1,e,l);try{var O=f(),Q=nt.S;Q!==null&&Q(z,O),O!==null&&typeof O=="object"&&typeof O.then=="function"?oo(t,e,Z1(O,c),xe(t)):oo(t,e,c,xe(t))}catch(it){oo(t,e,{then:function(){},status:"rejected",reason:it},xe())}finally{et.p=g,C!==null&&z.types!==null&&(C.types=z.types),nt.T=C}}function X1(){}function Ah(t,e,l,c){if(t.tag!==5)throw Error(d(476));var f=R0(t).queue;Th(t,f,e,Ct,l===null?X1:function(){return j0(t),l(c)})}function R0(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:Ct,baseState:Ct,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:Ct},next:null};var l={};return e.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:l},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function j0(t){var e=R0(t);e.next===null&&(e=t.alternate.memoizedState),oo(t,e.next.queue,{},xe())}function wh(){return ta(Kh)}function G0(){return ke().memoizedState}function H0(){return ke().memoizedState}function U1(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var l=xe();t=is(l);var c=Cl(e,t,l);c!==null&&(Qe(c,e,l),Fu(c,e,l)),e={cache:zr()},t.payload=e;return}e=e.return}}function V1(t,e,l){var c=xe();l={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Dr(t)?I0(e,l):(l=Cr(t,e,l,c),l!==null&&(Qe(l,t,c),Z0(l,e,c)))}function D0(t,e,l){oo(t,e,l,xe())}function oo(t,e,l,c){var f={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Dr(t))I0(e,f);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=e.lastRenderedReducer,g!==null))try{var C=e.lastRenderedState,z=g(C,l);if(f.hasEagerState=!0,f.eagerState=z,na(z,C))return Sr(t,e,f,0),Te===null&&$c(),!1}catch{}if(l=Cr(t,e,f,c),l!==null)return Qe(l,t,c),Z0(l,e,c),!0}return!1}function Oh(t,e,l,c){if(c={lane:2,revertLane:P(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Dr(t)){if(e)throw Error(d(479))}else e=Cr(t,l,c,2),e!==null&&Qe(e,t,2)}function Dr(t){var e=t.alternate;return t===Qt||e!==null&&e===Qt}function I0(t,e){tc=no=!0;var l=t.pending;l===null?e.next=e:(e.next=l.next,l.next=e),t.pending=e}function Z0(t,e,l){if((l&4194048)!==0){var c=e.lanes;c&=t.pendingLanes,l|=c,e.lanes=l,qa(t,l)}}var ro={readContext:ta,use:uo,useCallback:se,useContext:se,useEffect:se,useImperativeHandle:se,useLayoutEffect:se,useInsertionEffect:se,useMemo:se,useReducer:se,useRef:se,useState:se,useDebugValue:se,useDeferredValue:se,useTransition:se,useSyncExternalStore:se,useId:se,useHostTransitionStatus:se,useFormState:se,useActionState:se,useOptimistic:se,useMemoCache:se,useCacheRefresh:se};ro.useEffectEvent=se;var J0={readContext:ta,use:uo,useCallback:function(t,e){return li().memoizedState=[t,e===void 0?null:e],t},useContext:ta,useEffect:N0,useImperativeHandle:function(t,e,l){l=l!=null?l.concat([t]):null,Rr(4194308,4,Mh.bind(null,e,t),l)},useLayoutEffect:function(t,e){return Rr(4194308,4,t,e)},useInsertionEffect:function(t,e){Rr(4,2,t,e)},useMemo:function(t,e){var l=li();e=e===void 0?null:e;var c=t();if(qs){Ji(!0);try{t()}finally{Ji(!1)}}return l.memoizedState=[c,e],c},useReducer:function(t,e,l){var c=li();if(l!==void 0){var f=l(e);if(qs){Ji(!0);try{l(e)}finally{Ji(!1)}}}else f=e;return c.memoizedState=c.baseState=f,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:f},c.queue=t,t=t.dispatch=V1.bind(null,Qt,t),[c.memoizedState,t]},useRef:function(t){var e=li();return t={current:t},e.memoizedState=t},useState:function(t){t=xh(t);var e=t.queue,l=D0.bind(null,Qt,e);return e.dispatch=l,[t.memoizedState,l]},useDebugValue:co,useDeferredValue:function(t,e){return Nh(li(),t,e)},useTransition:function(){var t=xh(!1);return t=Th.bind(null,Qt,t.queue,!0,!1),li().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,l){var c=Qt,f=li();if(Xt){if(l===void 0)throw Error(d(407));l=l()}else{if(l=e(),Te===null)throw Error(d(349));(ee&127)!==0||ec(c,e,l)}f.memoizedState=l;var g={value:l,getSnapshot:e};return f.queue=g,N0(m0.bind(null,c,g,t),[t]),c.flags|=2048,ic(9,{destroy:void 0},f0.bind(null,c,g,l,e),null),l},useId:function(){var t=li(),e=Te.identifierPrefix;if(Xt){var l=rn,c=gi;l=(c&~(1<<32-Qa(c)-1)).toString(32)+l,e="_"+e+"R_"+l,l=Jn++,0<\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof c.is=="string"?C.createElement("select",{is:c.is}):C.createElement("select"),c.multiple?g.multiple=!0:c.size&&(g.size=c.size);break;default:g=typeof c.is=="string"?C.createElement(f,{is:c.is}):C.createElement(f)}}g[D]=e,g[rt]=c;t:for(C=e.child;C!==null;){if(C.tag===5||C.tag===6)g.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===e)break t;for(;C.sibling===null;){if(C.return===null||C.return===e)break t;C=C.return}C.sibling.return=C.return,C=C.sibling}e.stateNode=g;t:switch(ri(g,f,c),f){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break t;case"img":c=!0;break t;default:c=!1}c&&El(e)}}return Ne(e),mo(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,l),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==c&&El(e);else{if(typeof c!="string"&&e.stateNode===null)throw Error(d(166));if(t=Bt.current,Zs(e)){if(t=e.stateNode,l=e.memoizedProps,c=null,f=Ya,f!==null)switch(f.tag){case 27:case 5:c=f.memoizedProps}t[D]=e,t=!!(t.nodeValue===l||c!==null&&c.suppressHydrationWarning===!0||dv(t.nodeValue,l)),t||pl(e,!0)}else t=am(t).createTextNode(c),t[D]=e,e.stateNode=t}return Ne(e),null;case 31:if(l=e.memoizedState,t===null||t.memoizedState!==null){if(c=Zs(e),l!==null){if(t===null){if(!c)throw Error(d(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(d(557));t[D]=e}else yl(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Ne(e),t=!1}else l=kl(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return e.flags&256?(Oi(e),e):(Oi(e),null);if((e.flags&128)!==0)throw Error(d(558))}return Ne(e),null;case 13:if(c=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(f=Zs(e),c!==null&&c.dehydrated!==null){if(t===null){if(!f)throw Error(d(318));if(f=e.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(d(317));f[D]=e}else yl(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Ne(e),f=!1}else f=kl(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=f),f=!0;if(!f)return e.flags&256?(Oi(e),e):(Oi(e),null)}return Oi(e),(e.flags&128)!==0?(e.lanes=l,e):(l=c!==null,t=t!==null&&t.memoizedState!==null,l&&(c=e.child,f=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(f=c.alternate.memoizedState.cachePool.pool),g=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),g!==f&&(c.flags|=2048)),l!==t&&l&&(e.child.flags|=8192),Qr(e,e.updateQueue),Ne(e),null);case 4:return he(),t===null&&ft(e.stateNode.containerInfo),Ne(e),null;case 10:return hn(e.type),Ne(e),null;case 19:if(tt(sa),c=e.memoizedState,c===null)return Ne(e),null;if(f=(e.flags&128)!==0,g=c.rendering,g===null)if(f)go(c,!1);else{if(At!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(g=Yr(t),g!==null){for(e.flags|=128,go(c,!1),t=g.updateQueue,e.updateQueue=t,Qr(e,t),e.subtreeFlags=0,t=l,l=e.child;l!==null;)ih(l,t),l=l.sibling;return yt(sa,sa.current&1|2),Xt&&qi(e,c.treeForkCount),e.child}t=t.sibling}c.tail!==null&&Na()>Lo&&(e.flags|=128,f=!0,go(c,!1),e.lanes=4194304)}else{if(!f)if(t=Yr(g),t!==null){if(e.flags|=128,f=!0,t=t.updateQueue,e.updateQueue=t,Qr(e,t),go(c,!0),c.tail===null&&c.tailMode==="hidden"&&!g.alternate&&!Xt)return Ne(e),null}else 2*Na()-c.renderingStartTime>Lo&&l!==536870912&&(e.flags|=128,f=!0,go(c,!1),e.lanes=4194304);c.isBackwards?(g.sibling=e.child,e.child=g):(t=c.last,t!==null?t.sibling=g:e.child=g,c.last=g)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=Na(),t.sibling=null,l=sa.current,yt(sa,f?l&1|2:l&1),Xt&&qi(e,c.treeForkCount),t):(Ne(e),null);case 22:case 23:return Oi(e),Pu(),c=e.memoizedState!==null,t!==null?t.memoizedState!==null!==c&&(e.flags|=8192):c&&(e.flags|=8192),c?(l&536870912)!==0&&(e.flags&128)===0&&(Ne(e),e.subtreeFlags&6&&(e.flags|=8192)):Ne(e),l=e.updateQueue,l!==null&&Qr(e,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),c=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(c=e.memoizedState.cachePool.pool),c!==l&&(e.flags|=2048),t!==null&&tt(Bs),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),hn(la),Ne(e),null;case 25:return null;case 30:return null}throw Error(d(156,e.tag))}function Gi(t,e){switch(eo(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return hn(la),he(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return an(e),null;case 31:if(e.memoizedState!==null){if(Oi(e),e.alternate===null)throw Error(d(340));yl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(Oi(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(d(340));yl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return tt(sa),null;case 4:return he(),null;case 10:return hn(e.type),null;case 22:case 23:return Oi(e),Pu(),t!==null&&tt(Bs),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return hn(la),null;case 25:return null;default:return null}}function Uh(t,e){switch(eo(e),e.tag){case 3:hn(la),he();break;case 26:case 27:case 5:an(e);break;case 4:he();break;case 31:e.memoizedState!==null&&Oi(e);break;case 13:Oi(e);break;case 19:tt(sa);break;case 10:hn(e.type);break;case 22:case 23:Oi(e),Pu(),t!==null&&tt(Bs);break;case 24:hn(la)}}function po(t,e){try{var l=e.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var f=c.next;l=f;do{if((l.tag&t)===t){c=void 0;var g=l.create,C=l.inst;c=g(),C.destroy=c}l=l.next}while(l!==f)}}catch(z){_e(e,e.return,z)}}function Vn(t,e,l){try{var c=e.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var g=f.next;c=g;do{if((c.tag&t)===t){var C=c.inst,z=C.destroy;if(z!==void 0){C.destroy=void 0,f=e;var O=l,Q=z;try{Q()}catch(it){_e(f,O,it)}}}c=c.next}while(c!==g)}}catch(it){_e(e,e.return,it)}}function Vh(t){var e=t.updateQueue;if(e!==null){var l=t.stateNode;try{Ll(e,l)}catch(c){_e(t,t.return,c)}}}function qr(t,e,l){l.props=Ks(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(c){_e(t,e,c)}}function sc(t,e){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var c=t.stateNode;break;case 30:c=t.stateNode;break;default:c=t.stateNode}typeof l=="function"?t.refCleanup=l(c):l.current=c}}catch(f){_e(t,e,f)}}function ui(t,e){var l=t.ref,c=t.refCleanup;if(l!==null)if(typeof c=="function")try{c()}catch(f){_e(t,e,f)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(f){_e(t,e,f)}else l.current=null}function Ps(t){var e=t.type,l=t.memoizedProps,c=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":l.autoFocus&&c.focus();break t;case"img":l.src?c.src=l.src:l.srcSet&&(c.srcset=l.srcSet)}}catch(f){_e(t,t.return,f)}}function uc(t,e,l){try{var c=t.stateNode;bb(c,t.type,l,e),c[rt]=e}catch(f){_e(t,t.return,f)}}function cc(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&vc(t.type)||t.tag===4}function bi(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||cc(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&vc(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Si(t,e,l){var c=t.tag;if(c===5||c===6)t=t.stateNode,e?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,e):(e=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,e.appendChild(t),l=l._reactRootContainer,l!=null||e.onclick!==null||(e.onclick=ol));else if(c!==4&&(c===27&&vc(t.type)&&(l=t.stateNode,e=null),t=t.child,t!==null))for(Si(t,e,l),t=t.sibling;t!==null;)Si(t,e,l),t=t.sibling}function mn(t,e,l){var c=t.tag;if(c===5||c===6)t=t.stateNode,e?l.insertBefore(t,e):l.appendChild(t);else if(c!==4&&(c===27&&vc(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(mn(t,e,l),t=t.sibling;t!==null;)mn(t,e,l),t=t.sibling}function gn(t){var e=t.stateNode,l=t.memoizedProps;try{for(var c=t.type,f=e.attributes;f.length;)e.removeAttributeNode(f[0]);ri(e,c,l),e[D]=t,e[rt]=l}catch(g){_e(t,t.return,g)}}var Ra=!1,ue=!1,$s=!1,zl=typeof WeakSet=="function"?WeakSet:Set,oa=null;function Ja(t,e){if(t=t.containerInfo,F1=om,t=Kc(t),vr(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else t:{l=(l=t.ownerDocument)&&l.defaultView||window;var c=l.getSelection&&l.getSelection();if(c&&c.rangeCount!==0){l=c.anchorNode;var f=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{l.nodeType,g.nodeType}catch{l=null;break t}var C=0,z=-1,O=-1,Q=0,it=0,ct=t,K=null;e:for(;;){for(var $;ct!==l||f!==0&&ct.nodeType!==3||(z=C+f),ct!==g||c!==0&&ct.nodeType!==3||(O=C+c),ct.nodeType===3&&(C+=ct.nodeValue.length),($=ct.firstChild)!==null;)K=ct,ct=$;for(;;){if(ct===t)break e;if(K===l&&++Q===f&&(z=C),K===g&&++it===c&&(O=C),($=ct.nextSibling)!==null)break;ct=K,K=ct.parentNode}ct=$}l=z===-1||O===-1?null:{start:z,end:O}}else l=null}l=l||{start:0,end:0}}else l=null;for(P1={focusedElem:t,selectionRange:l},om=!1,oa=e;oa!==null;)if(e=oa,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,oa=t;else for(;oa!==null;){switch(e=oa,g=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(l=0;l title"))),ri(g,c,l),g[D]=t,ga(g),c=g;break t;case"link":var C=Nv("link","href",f).get(c+(l.href||""));if(C){for(var z=0;zHe&&(C=He,He=Jt,Jt=C);var X=Pd(z,Jt),H=Pd(z,He);if(X&&H&&($.rangeCount!==1||$.anchorNode!==X.node||$.anchorOffset!==X.offset||$.focusNode!==H.node||$.focusOffset!==H.offset)){var W=ct.createRange();W.setStart(X.node,X.offset),$.removeAllRanges(),Jt>He?($.addRange(W),$.extend(H.node,H.offset)):(W.setEnd(H.node,H.offset),$.addRange(W))}}}}for(ct=[],$=z;$=$.parentNode;)$.nodeType===1&&ct.push({element:$,left:$.scrollLeft,top:$.scrollTop});for(typeof z.focus=="function"&&z.focus(),z=0;zl?32:l,nt.T=null,l=ea,ea=null;var g=qn,C=bn;if(ra=0,Je=qn=null,bn=0,(oe&6)!==0)throw Error(d(331));var z=oe;if(oe|=4,iu(g.current),eu(g,g.current,C,l),oe=z,i(0,!1),Da&&typeof Da.onPostCommitFiberRoot=="function")try{Da.onPostCommitFiberRoot(Mn,g)}catch{}return!0}finally{et.p=f,nt.T=c,gc(t,e)}}function xo(t,e,l){e=mi(l,e),e=Ri(t.stateNode,e,2),t=Cl(t,e,2),t!==null&&(Zl(t,2),a(t))}function _e(t,e,l){if(t.tag===3)xo(t,t,l);else for(;e!==null;){if(e.tag===3){xo(e,t,l);break}else if(e.tag===1){var c=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Nl===null||!Nl.has(c))){t=mi(l,t),l=Gh(2),c=Cl(e,l,2),c!==null&&(Zr(l,c,e,t),Zl(c,2),a(c));break}}e=e.return}}function cu(t,e,l){var c=t.pingCache;if(c===null){c=t.pingCache=new Fi;var f=new Set;c.set(e,f)}else f=c.get(e),f===void 0&&(f=new Set,c.set(e,f));f.has(l)||(Fe=!0,f.add(l),t=id.bind(null,t,e,l),e.then(t,t))}function id(t,e,l){var c=t.pingCache;c!==null&&c.delete(e),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,Te===t&&(ee&l)===l&&(At===4||At===3&&(ee&62914560)===ee&&300>Na()-Fr?(oe&2)===0&&Tl(t,0):oc|=l,Pi===ee&&(Pi=0)),a(t)}function wl(t,e){e===0&&(e=wn()),t=Ql(t,e),t!==null&&(Zl(t,e),a(t))}function Ea(t){var e=t.memoizedState,l=0;e!==null&&(l=e.retryLane),wl(t,l)}function vs(t,e){var l=0;switch(t.tag){case 31:case 13:var c=t.stateNode,f=t.memoizedState;f!==null&&(l=f.retryLane);break;case 19:c=t.stateNode;break;case 22:c=t.stateNode._retryCache;break;default:throw Error(d(314))}c!==null&&c.delete(e),wl(t,l)}function pc(t,e){return ii(t,e)}var $i=null,ys=null,_o=!1,Eo=!1,ou=!1,Kn=0;function a(t){t!==ys&&t.next===null&&(ys===null?$i=ys=t:ys=ys.next=t),Eo=!0,_o||(_o=!0,R())}function i(t,e){if(!ou&&Eo){ou=!0;do for(var l=!1,c=$i;c!==null;){if(!e)if(t!==0){var f=c.pendingLanes;if(f===0)var g=0;else{var C=c.suspendedLanes,z=c.pingedLanes;g=(1<<31-Qa(42|t)+1)-1,g&=f&~(C&~z),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(l=!0,E(c,g))}else g=ee,g=An(c,c===Te?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(g&3)===0||nl(c,g)||(l=!0,E(c,g));c=c.next}while(l);ou=!1}}function o(){h()}function h(){Eo=_o=!1;var t=0;Kn!==0&&Cb()&&(t=Kn);for(var e=Na(),l=null,c=$i;c!==null;){var f=c.next,g=v(c,e);g===0?(c.next=null,l===null?$i=f:l.next=f,f===null&&(ys=l)):(l=c,(t!==0||(g&3)!==0)&&(Eo=!0)),c=f}ra!==0&&ra!==5||i(t,!1),Kn!==0&&(Kn=0)}function v(t,e){for(var l=t.suspendedLanes,c=t.pingedLanes,f=t.expirationTimes,g=t.pendingLanes&-62914561;0z)break;var it=O.transferSize,ct=O.initiatorType;it&&hv(ct)&&(O=O.responseEnd,C+=it*(O"u"?null:document;function _v(t,e,l){var c=nd;if(c&&typeof e=="string"&&e){var f=ka(e);f='link[rel="'+t+'"][href="'+f+'"]',typeof l=="string"&&(f+='[crossorigin="'+l+'"]'),xv.has(f)||(xv.add(f),t={rel:t,crossOrigin:l,href:e},c.querySelector(f)===null&&(e=c.createElement("link"),ri(e,"link",t),ga(e),c.head.appendChild(e)))}}function Ab(t){ru.D(t),_v("dns-prefetch",t,null)}function wb(t,e){ru.C(t,e),_v("preconnect",t,e)}function Ob(t,e,l){ru.L(t,e,l);var c=nd;if(c&&t&&e){var f='link[rel="preload"][as="'+ka(e)+'"]';e==="image"&&l&&l.imageSrcSet?(f+='[imagesrcset="'+ka(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(f+='[imagesizes="'+ka(l.imageSizes)+'"]')):f+='[href="'+ka(t)+'"]';var g=f;switch(e){case"style":g=ld(t);break;case"script":g=sd(t)}Fn.has(g)||(t=M({rel:"preload",href:e==="image"&&l&&l.imageSrcSet?void 0:t,as:e},l),Fn.set(g,t),c.querySelector(f)!==null||e==="style"&&c.querySelector(Qh(g))||e==="script"&&c.querySelector(qh(g))||(e=c.createElement("link"),ri(e,"link",t),ga(e),c.head.appendChild(e)))}}function Yb(t,e){ru.m(t,e);var l=nd;if(l&&t){var c=e&&typeof e.as=="string"?e.as:"script",f='link[rel="modulepreload"][as="'+ka(c)+'"][href="'+ka(t)+'"]',g=f;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=sd(t)}if(!Fn.has(g)&&(t=M({rel:"modulepreload",href:t},e),Fn.set(g,t),l.querySelector(f)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(qh(g)))return}c=l.createElement("link"),ri(c,"link",t),ga(c),l.head.appendChild(c)}}}function Rb(t,e,l){ru.S(t,e,l);var c=nd;if(c&&t){var f=Xl(c).hoistableStyles,g=ld(t);e=e||"default";var C=f.get(g);if(!C){var z={loading:0,preload:null};if(C=c.querySelector(Qh(g)))z.loading=5;else{t=M({rel:"stylesheet",href:t,"data-precedence":e},l),(l=Fn.get(g))&&lg(t,l);var O=C=c.createElement("link");ga(O),ri(O,"link",t),O._p=new Promise(function(Q,it){O.onload=Q,O.onerror=it}),O.addEventListener("load",function(){z.loading|=1}),O.addEventListener("error",function(){z.loading|=2}),z.loading|=4,nm(C,e,c)}C={type:"stylesheet",instance:C,count:1,state:z},f.set(g,C)}}}function jb(t,e){ru.X(t,e);var l=nd;if(l&&t){var c=Xl(l).hoistableScripts,f=sd(t),g=c.get(f);g||(g=l.querySelector(qh(f)),g||(t=M({src:t,async:!0},e),(e=Fn.get(f))&&sg(t,e),g=l.createElement("script"),ga(g),ri(g,"link",t),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(f,g))}}function Gb(t,e){ru.M(t,e);var l=nd;if(l&&t){var c=Xl(l).hoistableScripts,f=sd(t),g=c.get(f);g||(g=l.querySelector(qh(f)),g||(t=M({src:t,async:!0,type:"module"},e),(e=Fn.get(f))&&sg(t,e),g=l.createElement("script"),ga(g),ri(g,"link",t),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(f,g))}}function Ev(t,e,l,c){var f=(f=Bt.current)?im(f):null;if(!f)throw Error(d(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(e=ld(l.href),l=Xl(f).hoistableStyles,c=l.get(e),c||(c={type:"style",instance:null,count:0,state:null},l.set(e,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=ld(l.href);var g=Xl(f).hoistableStyles,C=g.get(t);if(C||(f=f.ownerDocument||f,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(t,C),(g=f.querySelector(Qh(t)))&&!g._p&&(C.instance=g,C.state.loading=5),Fn.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Fn.set(t,l),g||Hb(f,t,l,C.state))),e&&c===null)throw Error(d(528,""));return C}if(e&&c!==null)throw Error(d(529,""));return null;case"script":return e=l.async,l=l.src,typeof l=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=sd(l),l=Xl(f).hoistableScripts,c=l.get(e),c||(c={type:"script",instance:null,count:0,state:null},l.set(e,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(d(444,t))}}function ld(t){return'href="'+ka(t)+'"'}function Qh(t){return'link[rel="stylesheet"]['+t+"]"}function zv(t){return M({},t,{"data-precedence":t.precedence,precedence:null})}function Hb(t,e,l,c){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?c.loading=1:(e=t.createElement("link"),c.preload=e,e.addEventListener("load",function(){return c.loading|=1}),e.addEventListener("error",function(){return c.loading|=2}),ri(e,"link",l),ga(e),t.head.appendChild(e))}function sd(t){return'[src="'+ka(t)+'"]'}function qh(t){return"script[async]"+t}function Mv(t,e,l){if(e.count++,e.instance===null)switch(e.type){case"style":var c=t.querySelector('style[data-href~="'+ka(l.href)+'"]');if(c)return e.instance=c,ga(c),c;var f=M({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return c=(t.ownerDocument||t).createElement("style"),ga(c),ri(c,"style",f),nm(c,l.precedence,t),e.instance=c;case"stylesheet":f=ld(l.href);var g=t.querySelector(Qh(f));if(g)return e.state.loading|=4,e.instance=g,ga(g),g;c=zv(l),(f=Fn.get(f))&&lg(c,f),g=(t.ownerDocument||t).createElement("link"),ga(g);var C=g;return C._p=new Promise(function(z,O){C.onload=z,C.onerror=O}),ri(g,"link",c),e.state.loading|=4,nm(g,l.precedence,t),e.instance=g;case"script":return g=sd(l.src),(f=t.querySelector(qh(g)))?(e.instance=f,ga(f),f):(c=l,(f=Fn.get(g))&&(c=M({},l),sg(c,f)),t=t.ownerDocument||t,f=t.createElement("script"),ga(f),ri(f,"link",c),t.head.appendChild(f),e.instance=f);case"void":return null;default:throw Error(d(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(c=e.instance,e.state.loading|=4,nm(c,l.precedence,t));return e.instance}function nm(t,e,l){for(var c=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=c.length?c[c.length-1]:null,g=f,C=0;C title"):null)}function Db(t,e,l){if(l===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;return e.rel==="stylesheet"?(t=e.disabled,typeof e.precedence=="string"&&t==null):!0;case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Av(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Ib(t,e,l,c){if(l.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var f=ld(c.href),g=e.querySelector(Qh(f));if(g){e=g._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=sm.bind(t),e.then(t,t)),l.state.loading|=4,l.instance=g,ga(g);return}g=e.ownerDocument||e,c=zv(c),(f=Fn.get(f))&&lg(c,f),g=g.createElement("link"),ga(g);var C=g;C._p=new Promise(function(z,O){C.onload=z,C.onerror=O}),ri(g,"link",c),l.instance=g}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,e),(e=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=sm.bind(t),e.addEventListener("load",l),e.addEventListener("error",l))}}var ug=0;function Zb(t,e){return t.stylesheets&&t.count===0&&cm(t,t.stylesheets),0ug?50:800)+e);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(c),clearTimeout(f)}}:null}function sm(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)cm(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var um=null;function cm(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,um=new Map,e.forEach(Jb,t),um=null,sm.call(t))}function Jb(t,e){if(!(e.state.loading&4)){var l=um.get(t);if(l)var c=l.get(null);else{l=new Map,um.set(t,l);for(var f=t.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g{function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(r){console.error(r)}}u(),s.exports=$v()})),e4=Di((n=>{var s=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function r(d,m,p){var y=null;if(p!==void 0&&(y=""+p),m.key!==void 0&&(y=""+m.key),"key"in m){p={};for(var S in m)S!=="key"&&(p[S]=m[S])}else p=m;return m=p.ref,{$$typeof:s,type:d,key:y,ref:m!==void 0?m:null,props:p}}n.Fragment=u,n.jsx=r,n.jsxs=r})),pg=Di(((n,s)=>{s.exports=e4()})),a4=t4(),Kt=xc(Cs(),1),Y=pg();function i4(n){const s=(0,Kt.lazy)(async()=>({default:await n()}));return function(r){return(0,Y.jsx)(Kt.Suspense,{fallback:null,children:(0,Y.jsx)(s,{...r})})}}var Mo=["none","silver","multicolor"],Pn=[{id:"p01",code:"P-01",kind:"Single",label:"สีเดียว",tones:1},{id:"p02",code:"P-02",kind:"2 Tone",label:"แบ่งซ้ายขวา",tones:2},{id:"p03",code:"P-03",kind:"2 Tone",label:"สามแฉก",tones:2},{id:"p04",code:"P-04",kind:"3 Tone",label:"ซ้าย กลาง ขวา",tones:3},{id:"p05",code:"P-05",kind:"2 Tone",label:"หกแฉก",tones:2},{id:"p06",code:"P-06",kind:"2 Tone",label:"แบ่งบนล่าง",tones:2},{id:"p07",code:"P-07",kind:"Single",label:"ไล่ใส",tones:1},{id:"p08",code:"P-08",kind:"2 Tone",label:"ไล่เฉดบนลงล่าง",tones:2}],Ln=[{code:"Y01",name:"เหลืองนีออน",hex:"#E7FF1E"},{code:"Y02",name:"เหลืองทานตะวัน",hex:"#F1D20A"},{code:"Y03",name:"เหลืองราชพฤกษ์",hex:"#FFF11A"},{code:"O01",name:"ส้มคอร์เดีย",hex:"#CE722F"},{code:"R01",name:"แดงกุหลาบ",hex:"#F3223A"},{code:"R02",name:"แดงป็อปปี้",hex:"#FF3131"},{code:"R03",name:"แดงคอสมอส",hex:"#D6293F"},{code:"P01",name:"ชมพูบานเย็น",hex:"#F254B6"},{code:"P02",name:"ชมพูซากุระ",hex:"#F6B9D2"},{code:"G01",name:"เขียวอ่อนไบเตย",hex:"#72B74E"},{code:"G02",name:"เขียวเข้มมรกต",hex:"#199163"},{code:"B01",name:"ฟ้าโทแพซ",hex:"#91A3BB"},{code:"B02",name:"น้ำเงินรอยัล",hex:"#4866AC"},{code:"B03",name:"ฟ้าเทอร์ควอยซ์",hex:"#5AA1B5"},{code:"BL01",name:"น้ำเงินกรมท่า",hex:"#0B2A52"},{code:"BL02",name:"น้ำเงินเข้ม",hex:"#1B4FA0"},{code:"PU01",name:"ม่วงไลแลค",hex:"#B369A8"},{code:"PU02",name:"ม่วงไวน์",hex:"#6755C5"},{code:"BK01",name:"ดำสนิท",hex:"#141414"},{code:"C01",name:"ใส",hex:"#F7F5F0"},{code:"C02",name:"เบจ",hex:"#CCA996"}],_c=["ลายเพลต","สีเพลต","กลิตเตอร์","ลายหุ้มลวด","สีหุ้มลวด","สติกเกอร์","สรุปดีไซน์"],Ec=n=>Ln.find(s=>s.code===n)??Ln[0];function ef(){return{plate:{pattern:"p01",colors:[Ec("P01"),Ec("R01"),Ec("C02")]},cover:{pattern:"p01",colors:[Ec("C02"),Ec("P01"),Ec("R01")]},glitter:"none",coverGlitter:"none",stickerChoices:[null,null,null],pieces:[]}}function pm(n,s){const[u,r,d]=s.map(m=>m.hex);return n==="p02"?`linear-gradient(90deg,${u} 0 44%,${r} 56% 100%)`:n==="p03"?`conic-gradient(from 306deg at 50% 70%,${r} 0 30deg,${u} 42deg 66deg,${r} 78deg 360deg)`:n==="p04"?`linear-gradient(90deg,${u} 0 28%,${r} 38% 62%,${d} 72% 100%)`:n==="p05"?`conic-gradient(from 300deg at 50% 70%,${u} 0 15deg,${r} 21deg 33deg,${u} 39deg 51deg,${r} 57deg 69deg,${u} 75deg 87deg,${r} 93deg 105deg,${u} 111deg 360deg)`:n==="p06"?`linear-gradient(180deg,${u} 0 40%,${r} 52% 100%)`:n==="p07"?`linear-gradient(180deg,rgba(255,255,255,.92),${u} 92%)`:n==="p08"?`linear-gradient(180deg,${u},${r})`:u}function od(n){return Pn.find(s=>s.id===n)??Pn[0]}function _i(n){return Ec(n)}var af="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",nf=62,vg="A",vm=12,yg=7,bg=7,lf=10,ym=6,n4=360/ym,Sg=(n,s,u)=>Math.min(u,Math.max(s,n)),Ol=(n,s)=>{let u=Math.max(0,Math.round(n)),r="";for(let d=0;d{let s=0;for(const u of n){const r=af.indexOf(u);if(r<0)return null;s=s*nf+r}return s},Cg=n=>{let s=0;for(const u of n)s=(s+af.indexOf(u))%nf;return af[s]},l4=n=>(n.match(/.{1,4}/g)??[n]).join("-"),sf=n=>n.replace(/[^0-9A-Za-z]/g,"");function s4(n,s){const u=(p,y)=>{const S=p.findIndex(y);return S<0?0:S},r=p=>Ol(u(Ln,y=>y.code===p),1),d=n.pieces.slice(0,bg);let m=vg+Ol(u(Pn,p=>p.id===n.plate.pattern),1)+n.plate.colors.slice(0,3).map(p=>r(p.code)).join("")+Ol(u(Pn,p=>p.id===n.cover.pattern),1)+n.cover.colors.slice(0,3).map(p=>r(p.code)).join("")+Ol(Math.max(0,Mo.indexOf(n.glitter)),1)+Ol(Math.max(0,Mo.indexOf(n.coverGlitter)),1)+Ol(d.length,1);for(const p of d){const y=u(s,x=>x.id===p.sticker.id),S=Math.round((p.rotation%360+360)%360/ym)%n4;m+=Ol(y,2)+Ol(Sg(p.x,0,100)*lf,2)+Ol(Sg(p.y,0,100)*lf,2)+Ol(S,1)}return l4(m+Cg(m))}function u4(n,s,u){const r=sf(n);if(!r)return{ok:!1,reason:"กรุณากรอกโค้ดดีไซน์"};if(r[0]!==vg)return{ok:!1,reason:"โค้ดนี้มาจากเวอร์ชันอื่น"};if(r.lengthbg)return{ok:!1,reason:"โค้ดไม่ถูกต้อง"};if(d.length!==vm+m*yg)return{ok:!1,reason:"โค้ดไม่ครบถ้วน"};const p=(G,V)=>{const U=No(d.slice(G,G+1));return U===null||U>=V?null:U},y=p(1,Pn.length),S=p(5,Pn.length),x=p(9,Mo.length),L=p(10,Mo.length);if(y===null||S===null||x===null||L===null)return{ok:!1,reason:"โค้ดไม่ถูกต้อง"};const _=G=>{const V=[0,1,2].map(U=>p(G+U,Ln.length));return V.some(U=>U===null)?null:V.map(U=>Ln[U])},M=_(2),w=_(6);if(!M||!w)return{ok:!1,reason:"โค้ดไม่ถูกต้อง"};const N=ef();N.plate={pattern:Pn[y].id,colors:M},N.cover={pattern:Pn[S].id,colors:w},N.glitter=Mo[x],N.coverGlitter=Mo[L],N.pieces=[];let J=0;for(let G=0;G=3)break;q.some(V=>V?.id===G.sticker.id)||q.push(G.sticker)}for(;q.length<3;)q.push(null);return N.stickerChoices=q,{ok:!0,design:N,missingStickers:J}}var c4=[{id:"smile-and-go",title:"ยิ้มปุ๊บเที่ยวปั๊บ",desc:"เก็บบรรยากาศวันหยุดไว้ในทุกยิ้ม กับลาย Smile & Go สำหรับคนที่พร้อมออกเดินทาง",image:"https://www.smileseasons.com/wp-content/uploads/2026/09/smile-and-go-retainer.webp",isNew:!0},{id:"design-1",title:"อุ๊ย! เชอร์รี่",desc:"แดงสด หวานฉ่ำ และขี้เล่น เติมพลังเชอร์รี่ให้ทุกครั้งที่ยิ้ม",image:"https://www.smileseasons.com/wp-content/uploads/2026/08/opp-cherry.webp",isNew:!0},{id:"design-2",title:"มะแมว",desc:"ยิ้มธรรมดาโลกไม่จำ ยิ้มลายมะแมวมะม่วงฉ่ำๆ โลกจำแน่นอน",image:"https://www.smileseasons.com/wp-content/uploads/2026/06/mamaew_retainer.webp",isNew:!1},{id:"back-to-school",title:"Back to School",desc:"เติมสีสันให้วันเปิดเทอม ด้วยลายสนุกที่ดูสดใสทุกครั้งที่ยิ้ม",image:"https://www.smileseasons.com/wp-content/uploads/2026/05/Backtoschool.webp",isNew:!1},{id:"songkran",title:"สงกรานต์ (Songkran)",desc:"สาดความสดใสรับซัมเมอร์ ชุ่มฉ่ำไปกับรอยยิ้มของคุณ",image:"https://www.smileseasons.com/wp-content/uploads/2026/04/สงกรานต์รีเทนเนอร์_Website.webp",isNew:!1},{id:"popcorn",title:"Popcorn",desc:"เพลิดเพลินกับความสดใสและสนุกสุดเหวี่ยง เหมือนกำลังดูหนังเรื่องโปรด",image:"https://www.smileseasons.com/wp-content/uploads/2026/03/Popcornne_website1-scaled.webp",isNew:!1},{id:"design-6",title:"วาเลนไทน์",desc:"เติมความหวานและความรักให้รอยยิ้มของคุณ",image:"https://www.smileseasons.com/wp-content/uploads/2026/02/วาเลนไทน์-website-scaled.webp",isNew:!1},{id:"after-party",title:"After Party",desc:"ลายโทนเข้มที่ยังซ่อนประกายสนุก ๆ ไว้ทุกมุม",image:"https://www.smileseasons.com/wp-content/uploads/2026/02/AfterParty_website-scaled.webp",isNew:!1},{id:"ho-ho-ho",title:"Ho Ho Ho!",desc:"ฉลองเทศกาลแห่งความสุขด้วยรอยยิ้มจากซานต้า",image:"https://www.smileseasons.com/wp-content/uploads/2025/12/HoHoHo3-1.webp",isNew:!1},{id:"black-magic",title:"Black Magic",desc:"ทำทุกคนต้องมนต์สะกดด้วยรอยยิ้มของคุณ",image:"https://www.smileseasons.com/wp-content/uploads/2026/01/Black-Magic.webp",isNew:!1},{id:"my-smile",title:"My Smile",desc:"ลายน่ารักที่บอกความเป็นคุณได้แบบไม่ซ้ำใคร",image:"https://www.smileseasons.com/wp-content/uploads/2025/11/mysmile_website.webp",isNew:!1},{id:"sunday-beach",title:"Sunday Beach",desc:"รอยยิ้มสดใสเหมือนพักผ่อนกลางคลื่นทะเล",image:"https://www.smileseasons.com/wp-content/uploads/2025/10/SundayBeach_website.webp",isNew:!1},{id:"design-12",title:"เทรุ เทรุ",desc:"ตุ๊กตาไล่ฝนนำพาความสดใสมาให้ทุกวัน",image:"https://www.smileseasons.com/wp-content/uploads/2025/09/Teru4.webp",isNew:!1},{id:"deep-blue-sea",title:"Deep Blue Sea",desc:"ดำดิ่งสู่ความลึกลับของมหาสมุทรสีคราม",image:"https://www.smileseasons.com/wp-content/uploads/2025/06/2.webp",isNew:!1},{id:"sunny-sky",title:"Sunny Sky",desc:"ท้องฟ้าที่สดใสในวันที่แดดจ้าและเมฆสวย",image:"https://www.smileseasons.com/wp-content/uploads/2025/06/1.webp",isNew:!1},{id:"design-15",title:"แคนดี้",desc:"หวานน่ารักไปกับโลกของลูกกวาดหลากสี",image:"https://www.smileseasons.com/wp-content/uploads/2021/07/candy2-100.jpg",isNew:!1},{id:"pride",title:"Pride",desc:"เฉลิมฉลองความหลากหลายและความเท่าเทียม",image:"https://www.smileseasons.com/wp-content/uploads/2023/06/Pride-1080-2.png",isNew:!1},{id:"design-17",title:"กาแล็คซี่",desc:"เดินทางข้ามหมู่ดาวในจักรวาลอันกว้างใหญ่",image:"https://www.smileseasons.com/wp-content/uploads/2021/07/galaxy2-100.jpg",isNew:!1},{id:"design-18",title:"น้องส้มจี๊ด",desc:"ความเปรี้ยวซ่าและความสดใสของผลส้ม",image:"https://www.smileseasons.com/wp-content/uploads/2023/06/%E0%B8%99%E0%B9%89%E0%B8%AD%E0%B8%87%E0%B8%AA%E0%B9%89%E0%B8%A1%E0%B8%88%E0%B8%B5%E0%B9%8A%E0%B8%94%E0%B8%94%E0%B8%94%E0%B8%94%E0%B8%94-1080-2.png",isNew:!1},{id:"design-19",title:"บลู ฮาวาย",desc:"สัมผัสบรรยากาศทะเลฮาวายกับเครื่องดื่มแก้วโปรด",image:"https://www.smileseasons.com/wp-content/uploads/2020/09/bluehawaii@0.5x-80.jpg",isNew:!1},{id:"design-20",title:"แตงโม",desc:"ความสดชื่นหวานฉ่ำของแตงโมในฤดูร้อน",image:"https://www.smileseasons.com/wp-content/uploads/2017/11/watermelon@0.5x-100.jpg",isNew:!1},{id:"design-21",title:"แก้วมังกร",desc:"เสน่ห์ที่เป็นเอกลักษณ์ของผลไม้สีชมพูสด",image:"https://www.smileseasons.com/wp-content/uploads/2017/11/dragon@0.5x-100.jpg",isNew:!1},{id:"design-22",title:"กีวี",desc:"ความเปรี้ยวอมหวานที่มาพร้อมความสดชื่น",image:"https://www.smileseasons.com/wp-content/uploads/2017/11/kiwi-100.jpg",isNew:!1},{id:"design-23",title:"วุ้นใสผลไม้",desc:"รวมความอร่อยของผลไม้นานาชนิดในวุ้นใส",image:"https://www.smileseasons.com/wp-content/uploads/2017/11/jelly-100.jpg",isNew:!1},{id:"design-24",title:"ขบวนการห้าสี",desc:"รวมพลังฮีโร่หลากสีสันเพื่อปกป้องรอยยิ้ม",image:"https://www.smileseasons.com/wp-content/uploads/2017/11/pentacolor-100.jpg",isNew:!1},{id:"design-25",title:"สตรอว์เบอร์รี",desc:"ความหอมหวานที่เป็นที่ชื่นชอบของทุกคน",image:"https://www.smileseasons.com/wp-content/uploads/2017/11/Artboard-1-100.jpg",isNew:!1},{id:"strawberry-2",title:"สตรอว์เบอร์รี 2",desc:"เพิ่มความหวานฉ่ำให้รอยยิ้มอีกระดับ",image:"https://www.smileseasons.com/wp-content/uploads/2020/02/strawberry02-50.jpg",isNew:!1},{id:"design-27",title:"น้องเสือโคร่ง",desc:"ลวดลายที่สง่างามและน่าเกรงขามของเจ้าป่า",image:"https://www.smileseasons.com/wp-content/uploads/2017/11/tiger-100.jpg",isNew:!1},{id:"design-28",title:"รักเมืองไทย",desc:"ความภาคภูมิใจในสีธงชาติไทย",image:"https://www.smileseasons.com/wp-content/uploads/2017/11/Thaiflag@0.5x-100.jpg",isNew:!1},{id:"design-29",title:"ยูนิคอร์น",desc:"เวทมนตร์มหัศจรรย์จากดินแดนแห่งเทพนิยาย",image:"https://www.smileseasons.com/wp-content/uploads/2017/11/unicorn@0.5x-100.jpg",isNew:!1},{id:"design-30",title:"น้องเต่าทอง",desc:"แมลงตัวน้อยผู้นำโชคและความน่ารัก",image:"https://www.smileseasons.com/wp-content/uploads/2020/02/ladyBug-100.jpg",isNew:!1},{id:"design-31",title:"ชมพูฟ้าเสมา",desc:"สีสันอันเป็นเอกลักษณ์ของสถาบันการศึกษา",image:"https://www.smileseasons.com/wp-content/uploads/2017/11/sema@0.5x-100.jpg",isNew:!1}],Lg="ssdc-retainer-measurement-session",xg="ssdc-retainer-first-touch",o4="smile_seasons_retainer_designer",r4="release_1_measurement_v1",d4=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","fbclid","ttclid","msclkid"],_g=null,bm=0,Eg=0,uf=!1,rd=!1;function h4(){if(!document.referrer)return"";try{const n=new URL(document.referrer);return`${n.origin}${n.pathname}`}catch{return""}}function Sm(n){return typeof crypto<"u"&&"randomUUID"in crypto?`${n}-${crypto.randomUUID()}`:`${n}-${Date.now()}-${Math.random().toString(36).slice(2)}`}function f4(){try{const n=sessionStorage.getItem(Lg);if(n)return n;const s=Sm("session");return sessionStorage.setItem(Lg,s),s}catch{return Sm("session")}}function m4(n){const s=Object.fromEntries(d4.flatMap(r=>{const d=n.get(r);return d?[[r,d]]:[]}));let u={};try{const r=localStorage.getItem(xg);r&&(u=JSON.parse(r)),!r&&Object.keys(s).length>0&&(u=s,localStorage.setItem(xg,JSON.stringify(s)))}catch{u=s}return{...Object.fromEntries(Object.entries(u).map(([r,d])=>[`first_${r}`,d])),...s}}function g4(n,s){typeof window>"u"||(Eg=performance.now(),bm=0,uf=!1,rd=!1,_g={app_name:o4,app_version:r4,session_id:f4(),embed_mode:s.embed?"elementor":"standalone",preset:s.preset,page_path:window.location.pathname,page_referrer:h4(),device_category:window.matchMedia("(max-width: 900px)").matches?"mobile":"desktop",...m4(n)})}function Pe(n,s={}){if(typeof window>"u")return;bm+=1;const u={..._g,...s,event:n,event_id:Sm("event"),event_sequence:bm,event_time:new Date().toISOString(),engagement_time_msec:Math.max(0,Math.round(performance.now()-Eg))};window.dataLayer=window.dataLayer??[],window.dataLayer.push(u),window.parent!==window&&window.parent.postMessage({type:"ssdc-retainer-analytics",payload:u},"*"),window.dispatchEvent(new CustomEvent("ssdc-retainer-analytics",{detail:u}))}function Yl(n){rd=!1,!uf&&(uf=!0,Pe("retainer_design_started",{source:n}))}function p4(n){rd||(rd=!0,Pe("retainer_design_completed",n))}function zg(){uf=!1,rd=!1}function v4(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}var Mg,du,vt,$e,Ce=Et((()=>{Mg=Math.PI/180,du=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},vt={_global:du,version:"10.3.0",isBrowser:v4(),isUnminified:/param/.test(function(n){}.toString()),dblClickWindow:400,getAngle(n){return vt.angleDeg?n*Mg: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 vt.DD.isDragging},isTransforming(){var n,s;return(s=(n=vt.Transformer)===null||n===void 0?void 0:n.isTransforming())!==null&&s!==void 0?s:!1},isDragReady(){return!!vt.DD.node},releaseCanvasOnDestroy:!0,document:du.document,_injectGlobal(n){typeof du.Konva<"u"&&console.error("Several Konva instances detected. It is not recommended to use multiple Konva instances in the same environment."),du.Konva=n}},$e=n=>{vt[n.prototype.getClassName()]=n},vt._injectGlobal(vt)})),Ng,Cm,xn,Tg,Ag,wg,Og,Yg,Rg,To,jg,Gg,Hg,Lm,Dg,cf,Ig,dd,Ao,Zg,Z,ha=Et((()=>{Ce(),Ng=`Konva.js unsupported environment. Looks like you are trying to use Konva.js in Node.js environment. because "document" object is undefined. To use Konva.js in Node.js environment, you need to use the "canvas-backend" or "skia-backend" module. bash: npm install canvas js: import "konva/canvas-backend"; or bash: npm install skia-canvas js: import "konva/skia-backend"; `,Cm=()=>{if(typeof document>"u")throw new Error(Ng)},xn=class Jv{constructor(s=[1,0,0,1,0,0]){this.dirty=!1,this.m=s&&s.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 Jv(this.m)}copyInto(s){s.m[0]=this.m[0],s.m[1]=this.m[1],s.m[2]=this.m[2],s.m[3]=this.m[3],s.m[4]=this.m[4],s.m[5]=this.m[5]}point(s){const u=this.m;return{x:u[0]*s.x+u[2]*s.y+u[4],y:u[1]*s.x+u[3]*s.y+u[5]}}translate(s,u){return this.m[4]+=this.m[0]*s+this.m[2]*u,this.m[5]+=this.m[1]*s+this.m[3]*u,this}scale(s,u){return this.m[0]*=s,this.m[1]*=s,this.m[2]*=u,this.m[3]*=u,this}rotate(s){const u=Math.cos(s),r=Math.sin(s),d=this.m[0]*u+this.m[2]*r,m=this.m[1]*u+this.m[3]*r,p=this.m[0]*-r+this.m[2]*u,y=this.m[1]*-r+this.m[3]*u;return this.m[0]=d,this.m[1]=m,this.m[2]=p,this.m[3]=y,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(s,u){const r=this.m[0]+this.m[2]*u,d=this.m[1]+this.m[3]*u,m=this.m[2]+this.m[0]*s,p=this.m[3]+this.m[1]*s;return this.m[0]=r,this.m[1]=d,this.m[2]=m,this.m[3]=p,this}multiply(s){const u=this.m[0]*s.m[0]+this.m[2]*s.m[1],r=this.m[1]*s.m[0]+this.m[3]*s.m[1],d=this.m[0]*s.m[2]+this.m[2]*s.m[3],m=this.m[1]*s.m[2]+this.m[3]*s.m[3],p=this.m[0]*s.m[4]+this.m[2]*s.m[5]+this.m[4],y=this.m[1]*s.m[4]+this.m[3]*s.m[5]+this.m[5];return this.m[0]=u,this.m[1]=r,this.m[2]=d,this.m[3]=m,this.m[4]=p,this.m[5]=y,this}invert(){const s=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),u=this.m[3]*s,r=-this.m[1]*s,d=-this.m[2]*s,m=this.m[0]*s,p=s*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),y=s*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=u,this.m[1]=r,this.m[2]=d,this.m[3]=m,this.m[4]=p,this.m[5]=y,this}getMatrix(){return this.m}decompose(){const s=this.m[0],u=this.m[1],r=this.m[2],d=this.m[3],m=this.m[4],p=this.m[5],y=s*d-u*r,S={x:m,y:p,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(s!=0||u!=0){const x=Math.sqrt(s*s+u*u);S.rotation=u>0?Math.acos(s/x):-Math.acos(s/x),S.scaleX=x,S.scaleY=y/x,S.skewX=(s*r+u*d)/y,S.skewY=0}else if(r!=0||d!=0){const x=Math.sqrt(r*r+d*d);S.rotation=Math.PI/2-(d>0?Math.acos(-r/x):-Math.acos(r/x)),S.scaleX=y/x,S.scaleY=x,S.skewX=0,S.skewY=(s*r+u*d)/y}return S.rotation=Z._getRotation(S.rotation),S}},Tg="[object Array]",Ag="[object Number]",wg="[object String]",Og="[object Boolean]",Yg=Math.PI/180,Rg=180/Math.PI,To="#",jg="",Gg="0",Hg="Konva warning: ",Lm="Konva error: ",Dg="rgb(",cf={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]},Ig=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,dd=[],Ao=null,Zg=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(n){setTimeout(n,16)},Z={_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)===Tg},_isNumber(n){return Object.prototype.toString.call(n)===Ag&&!isNaN(n)&&isFinite(n)},_isString(n){return Object.prototype.toString.call(n)===wg},_isBoolean(n){return Object.prototype.toString.call(n)===Og},isObject(n){return n instanceof Object},isValidSelector(n){if(typeof n!="string")return!1;const s=n[0];return s==="#"||s==="."||s===s.toUpperCase()},_sign(n){return n===0||n>0?1:-1},requestAnimFrame(n){dd.push(n),dd.length===1&&Zg(function(){const s=dd;dd=[],s.forEach(function(u){u()})})},createCanvasElement(){Cm();const n=document.createElement("canvas");try{n.style=n.style||{}}catch{}return n},createImageElement(){return Cm(),document.createElement("img")},_isInDocument(n){for(;n=n.parentNode;)if(n==document)return!0;return!1},_urlToImage(n,s){const u=Z.createImageElement();u.onload=function(){s(u)},u.src=n},_rgbToHex(n,s,u){return((1<<24)+(n<<16)+(s<<8)+u).toString(16).slice(1)},_hexToRgb(n){n=n.replace(To,jg);const s=parseInt(n,16);return{r:s>>16&255,g:s>>8&255,b:s&255}},getRandomColor(){let n=(Math.random()*16777215<<0).toString(16);for(;n.length<6;)n=Gg+n;return To+n},isCanvasFarblingActive(){if(Ao!==null)return Ao;if(typeof document>"u")return Ao=!1,!1;const n=this.createCanvasElement();n.width=10,n.height=10;const s=n.getContext("2d",{willReadFrequently:!0});s.clearRect(0,0,10,10),s.fillStyle="#282828",s.fillRect(0,0,10,10);const u=s.getImageData(0,0,10,10).data;let r=!1;for(let d=0;d<100;d++)if(u[d*4]!==40||u[d*4+1]!==40||u[d*4+2]!==40||u[d*4+3]!==255){r=!0;break}return Ao=r,this.releaseCanvas(n),Ao},getHitColor(){const n=this.getRandomColor();return this.isCanvasFarblingActive()?this.getSnappedHexColor(n):n},getHitColorKey(n,s,u){return this.isCanvasFarblingActive()&&(n=Math.round(n/5)*5,s=Math.round(s/5)*5,u=Math.round(u/5)*5),To+this._rgbToHex(n,s,u)},getSnappedHexColor(n){const s=this._hexToRgb(n);return To+this._rgbToHex(Math.round(s.r/5)*5,Math.round(s.g/5)*5,Math.round(s.b/5)*5)},getRGB(n){let s;return n in cf?(s=cf[n],{r:s[0],g:s[1],b:s[2]}):n[0]===To?this._hexToRgb(n.substring(1)):n.substr(0,4)===Dg?(s=Ig.exec(n.replace(/ /g,"")),{r:parseInt(s[1],10),g:parseInt(s[2],10),b:parseInt(s[3],10)}):{r:0,g:0,b:0}},colorToRGBA(n){return n=n||"black",Z._namedColorToRBA(n)||Z._hex3ColorToRGBA(n)||Z._hex4ColorToRGBA(n)||Z._hex6ColorToRGBA(n)||Z._hex8ColorToRGBA(n)||Z._rgbColorToRGBA(n)||Z._rgbaColorToRGBA(n)||Z._hslColorToRGBA(n)},_namedColorToRBA(n){const s=cf[n.toLowerCase()];return s?{r:s[0],g:s[1],b:s[2],a:1}:null},_rgbColorToRGBA(n){if(n.indexOf("rgb(")===0){n=n.match(/rgb\(([^)]+)\)/)[1];const s=n.split(/ *, */).map(Number);return{r:s[0],g:s[1],b:s[2],a:1}}},_rgbaColorToRGBA(n){if(n.indexOf("rgba(")===0){n=n.match(/rgba\(([^)]+)\)/)[1];const s=n.split(/ *, */).map((u,r)=>u.slice(-1)==="%"?r===3?parseInt(u)/100:parseInt(u)/100*255:Number(u));return{r:s[0],g:s[1],b:s[2],a:s[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[s,...u]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(n),r=Number(u[0])/360,d=Number(u[1])/100,m=Number(u[2])/100;let p,y,S;if(d===0)return S=m*255,{r:Math.round(S),g:Math.round(S),b:Math.round(S),a:1};m<.5?p=m*(1+d):p=m+d-m*d;const x=2*m-p,L=[0,0,0];for(let _=0;_<3;_++)y=r+1/3*-(_-1),y<0&&y++,y>1&&y--,6*y<1?S=x+(p-x)*6*y:2*y<1?S=p:3*y<2?S=x+(p-x)*(2/3-y)*6:S=x,L[_]=S*255;return{r:Math.round(L[0]),g:Math.round(L[1]),b:Math.round(L[2]),a:1}}},haveIntersection(n,s){return!(s.x>n.x+n.width||s.x+s.widthn.y+n.height||s.y+s.height1?(p=u,y=r,S=(u-d)*(u-d)+(r-m)*(r-m)):(p=n+L*(u-n),y=s+L*(r-s),S=(p-d)*(p-d)+(y-m)*(y-m))}return[p,y,S]},_getProjectionToLine(n,s,u){const r=Z.cloneObject(n);let d=Number.MAX_VALUE;return s.forEach(function(m,p){if(!u&&p===s.length-1)return;const y=s[(p+1)%s.length],S=Z._getProjectionToSegment(m.x,m.y,y.x,y.y,n.x,n.y),x=S[0],L=S[1],_=S[2];_s.length){const p=s;s=n,n=p}for(let p=0;p{s.width=0,s.height=0})},drawRoundedRectPath(n,s,u,r){let d=s<0?s:0,m=u<0?u:0;s=Math.abs(s),u=Math.abs(u);let p=0,y=0,S=0,x=0;typeof r=="number"?p=y=S=x=Math.min(r,s/2,u/2):(p=Math.min(r[0]||0,s/2,u/2),y=Math.min(r[1]||0,s/2,u/2),x=Math.min(r[2]||0,s/2,u/2),S=Math.min(r[3]||0,s/2,u/2)),n.moveTo(d+p,m),n.lineTo(d+s-y,m),n.arc(d+s-y,m+y,y,Math.PI*3/2,0,!1),n.lineTo(d+s,m+u-x),n.arc(d+s-x,m+u-x,x,0,Math.PI/2,!1),n.lineTo(d+S,m+u),n.arc(d+S,m+u-S,S,Math.PI/2,Math.PI,!1),n.lineTo(d,m+p),n.arc(d+p,m+p,p,Math.PI,Math.PI*3/2,!1)},drawRoundedPolygonPath(n,s,u,r,d){r=Math.abs(r);for(let m=0;m{ha(),Ce(),xm=",",Bg="(",Xg=")",Ug="([",Vg="])",Wg=";",Qg="()",qg="=",_m=["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"],Kg=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled","filter"],kg=100,hd=null,fd=class{constructor(n){this.canvas=n,vt.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(n){n.fillEnabled()&&this._fill(n)}_fill(n){}strokeShape(n){n.hasStroke()&&this._stroke(n)}_stroke(n){}fillStrokeShape(n){n.attrs.fillAfterStrokeEnabled?(this.strokeShape(n),this.fillShape(n)):(this.fillShape(n),this.strokeShape(n))}getTrace(n,s){let u=this.traceArr,r=u.length,d="",m,p,y,S;for(m=0;mtypeof x=="number"?Math.floor(x):x)),d+=Bg+S.join(xm)+Xg)):(d+=p.property,n||(d+=qg+p.val)),d+=Wg;return d}clearTrace(){this.traceArr=[]}_trace(n){let s=this.traceArr,u;s.push(n),u=s.length,u>=kg&&s.shift()}reset(){const n=this.getCanvas().getPixelRatio();this.setTransform(1*n,0,0,1*n,0,0)}getCanvas(){return this.canvas}clear(n){const s=this.getCanvas();n?this.clearRect(n.x||0,n.y||0,n.width||0,n.height||0):this.clearRect(0,0,s.getWidth()/s.pixelRatio,s.getHeight()/s.pixelRatio)}_applyLineCap(n){const s=n.attrs.lineCap;s&&this.setAttr("lineCap",s)}_applyOpacity(n){const s=n.getAbsoluteOpacity();s!==1&&this.setAttr("globalAlpha",s)}_applyLineJoin(n){const s=n.attrs.lineJoin;s&&this.setAttr("lineJoin",s)}_applyMiterLimit(n){const s=n.attrs.miterLimit;s!=null&&this.setAttr("miterLimit",s)}setAttr(n,s){this._context[n]=s}arc(n,s,u,r,d,m){this._context.arc(n,s,u,r,d,m)}arcTo(n,s,u,r,d){this._context.arcTo(n,s,u,r,d)}beginPath(){this._context.beginPath()}bezierCurveTo(n,s,u,r,d,m){this._context.bezierCurveTo(n,s,u,r,d,m)}clearRect(n,s,u,r){this._context.clearRect(n,s,u,r)}clip(...n){this._context.clip.apply(this._context,n)}closePath(){this._context.closePath()}createImageData(n,s){const u=arguments;if(u.length===2)return this._context.createImageData(n,s);if(u.length===1)return this._context.createImageData(n)}createLinearGradient(n,s,u,r){return this._context.createLinearGradient(n,s,u,r)}createPattern(n,s){return this._context.createPattern(n,s)}createRadialGradient(n,s,u,r,d,m){return this._context.createRadialGradient(n,s,u,r,d,m)}drawImage(n,s,u,r,d,m,p,y,S){const x=arguments,L=this._context;x.length===3?L.drawImage(n,s,u):x.length===5?L.drawImage(n,s,u,r,d):x.length===9&&L.drawImage(n,s,u,r,d,m,p,y,S)}ellipse(n,s,u,r,d,m,p,y){this._context.ellipse(n,s,u,r,d,m,p,y)}isPointInPath(n,s,u,r){return u?this._context.isPointInPath(u,n,s,r):this._context.isPointInPath(n,s,r)}fill(...n){this._context.fill.apply(this._context,n)}fillRect(n,s,u,r){this._context.fillRect(n,s,u,r)}strokeRect(n,s,u,r){this._context.strokeRect(n,s,u,r)}fillText(n,s,u,r){r?this._context.fillText(n,s,u,r):this._context.fillText(n,s,u)}measureText(n){return this._context.measureText(n)}getImageData(n,s,u,r){return this._context.getImageData(n,s,u,r)}lineTo(n,s){this._context.lineTo(n,s)}moveTo(n,s){this._context.moveTo(n,s)}rect(n,s,u,r){this._context.rect(n,s,u,r)}roundRect(n,s,u,r,d){this._context.roundRect(n,s,u,r,d)}putImageData(n,s,u){this._context.putImageData(n,s,u)}quadraticCurveTo(n,s,u,r){this._context.quadraticCurveTo(n,s,u,r)}restore(){this._context.restore()}rotate(n){this._context.rotate(n)}save(){this._context.save()}scale(n,s){this._context.scale(n,s)}setLineDash(n){this._context.setLineDash?this._context.setLineDash(n):"mozDash"in this._context?this._context.mozDash=n:"webkitLineDash"in this._context&&(this._context.webkitLineDash=n)}getLineDash(){return this._context.getLineDash()}setTransform(n,s,u,r,d,m){this._context.setTransform(n,s,u,r,d,m)}stroke(n){n?this._context.stroke(n):this._context.stroke()}strokeText(n,s,u,r){this._context.strokeText(n,s,u,r)}transform(n,s,u,r,d,m){this._context.transform(n,s,u,r,d,m)}translate(n,s){this._context.translate(n,s)}_enableTrace(){let n=this,s=_m.length,u=this.setAttr,r,d;const m=function(p){let y=n[p],S;n[p]=function(){return d=y4(Array.prototype.slice.call(arguments,0)),S=y.apply(n,arguments),n._trace({method:p,args:d}),S}};for(r=0;r{ha(),Em(),Ce(),rf=class{constructor(n){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;const s=(n||{}).pixelRatio||vt.pixelRatio||b4();this.pixelRatio=s,this._canvas=Z.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(n){const s=this.pixelRatio;this.pixelRatio=n,this.setSize(this.getWidth()/s,this.getHeight()/s)}setWidth(n){this.width=this._canvas.width=n*this.pixelRatio,this._canvas.style.width=n+"px";const s=this.pixelRatio;this.getContext()._context.scale(s,s)}setHeight(n){this.height=this._canvas.height=n*this.pixelRatio,this._canvas.style.height=n+"px";const s=this.pixelRatio;this.getContext()._context.scale(s,s)}getWidth(){return this.width}getHeight(){return this.height}setSize(n,s){this.setWidth(n||0),this.setHeight(s||0)}toDataURL(n,s){try{return this._canvas.toDataURL(n,s)}catch{try{return this._canvas.toDataURL()}catch(r){return Z.error("Unable to get data URL. "+r.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}},Ls=class extends rf{constructor(n={width:0,height:0,willReadFrequently:!1}){super(n),this.context=new Fg(this,{willReadFrequently:n.willReadFrequently}),this.setSize(n.width,n.height)}},df=class extends rf{constructor(n={width:0,height:0}){super(n),this.hitCanvas=!0,this.context=new Pg(this),this.setSize(n.width,n.height)}}})),Se,zm=Et((()=>{Ce(),ha(),Se={get isDragging(){let n=!1;return Se._dragElements.forEach(s=>{s.dragStatus==="dragging"&&(n=!0)}),n},justDragged:!1,get node(){let n;return Se._dragElements.forEach(s=>{n=s.node}),n},_dragElements:new Map,_drag(n){const s=[];Se._dragElements.forEach((u,r)=>{const{node:d}=u,m=d.getStage();m.setPointersPositions(n),u.pointerId===void 0&&(u.pointerId=Z._getFirstPointerId(n));const p=m._changedPointerPositions.find(y=>y.id===u.pointerId);if(p){if(u.dragStatus!=="dragging"){const y=d.dragDistance();if(Math.max(Math.abs(p.x-u.startPointerPos.x),Math.abs(p.y-u.startPointerPos.y)){u.getStage()&&u.fire("dragmove",{type:"dragmove",target:u,evt:n},!0)})},_endDragBefore(n){const s=[];Se._dragElements.forEach(u=>{const{node:r}=u,d=r.getStage();if(n&&d.setPointersPositions(n),!d._changedPointerPositions.find(p=>p.id===u.pointerId))return;(u.dragStatus==="dragging"||u.dragStatus==="stopped")&&(Se.justDragged=!0,vt._mouseListenClick=!1,vt._touchListenClick=!1,vt._pointerListenClick=!1,u.dragStatus="stopped");const m=u.node.getLayer()||u.node instanceof vt.Stage&&u.node;m&&s.indexOf(m)===-1&&s.push(m)}),s.forEach(u=>{u.draw()})},_endDragAfter(n){Se._dragElements.forEach((s,u)=>{s.dragStatus==="stopped"&&s.node.fire("dragend",{type:"dragend",target:s.node,evt:n},!0),s.dragStatus!=="dragging"&&Se._dragElements.delete(u)})}},vt.isBrowser&&(window.addEventListener("mouseup",Se._endDragBefore,!0),window.addEventListener("touchend",Se._endDragBefore,!0),window.addEventListener("touchcancel",Se._endDragBefore,!0),window.addEventListener("mousemove",Se._drag),window.addEventListener("touchmove",Se._drag),window.addEventListener("mouseup",Se._endDragAfter,!1),window.addEventListener("touchend",Se._endDragAfter,!1),window.addEventListener("touchcancel",Se._endDragAfter,!1))}));function hu(n){return Z._isString(n)?'"'+n+'"':Object.prototype.toString.call(n)==="[object Number]"||Z._isBoolean(n)?n:Object.prototype.toString.call(n)}function $g(n){return n>255?255:n<0?0:Math.round(n)}function gt(){if(vt.isUnminified)return function(n,s){return Z._isNumber(n)||Z.warn(hu(n)+' is a not valid value for "'+s+'" attribute. The value should be a number.'),n}}function ff(n){if(vt.isUnminified)return function(s,u){let r=Z._isNumber(s),d=Z._isArray(s)&&s.length==n;return!r&&!d&&Z.warn(hu(s)+' is a not valid value for "'+u+'" attribute. The value should be a number or Array('+n+")"),s}}function Mm(){if(vt.isUnminified)return function(n,s){return Z._isNumber(n)||n==="auto"||Z.warn(hu(n)+' is a not valid value for "'+s+'" attribute. The value should be a number or "auto".'),n}}function zc(){if(vt.isUnminified)return function(n,s){return Z._isString(n)||Z.warn(hu(n)+' is a not valid value for "'+s+'" attribute. The value should be a string.'),n}}function t2(){if(vt.isUnminified)return function(n,s){const u=Z._isString(n),r=Object.prototype.toString.call(n)==="[object CanvasGradient]"||n&&n.addColorStop;return u||r||Z.warn(hu(n)+' is a not valid value for "'+s+'" attribute. The value should be a string or a native gradient.'),n}}function S4(){if(vt.isUnminified)return function(n,s){const u=Int8Array?Object.getPrototypeOf(Int8Array):null;return u&&n instanceof u||(Z._isArray(n)?n.forEach(function(r){Z._isNumber(r)||Z.warn('"'+s+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):Z.warn(hu(n)+' is a not valid value for "'+s+'" attribute. The value should be a array of numbers.')),n}}function $n(){if(vt.isUnminified)return function(n,s){return n===!0||n===!1||Z.warn(hu(n)+' is a not valid value for "'+s+'" attribute. The value should be a boolean.'),n}}function C4(n){if(vt.isUnminified)return function(s,u){return s==null||Z.isObject(s)||Z.warn(hu(s)+' is a not valid value for "'+u+'" attribute. The value should be an object with properties '+n),s}}var ge=Et((()=>{Ce(),ha()})),wo,Oo,A,re=Et((()=>{ha(),ge(),wo="get",Oo="set",A={addGetterSetter(n,s,u,r,d){A.addGetter(n,s,u),A.addSetter(n,s,r,d),A.addOverloadedGetterSetter(n,s)},addGetter(n,s,u){const r=wo+Z._capitalize(s);n.prototype[r]=n.prototype[r]||function(){const d=this.attrs[s];return d===void 0?u:d}},addSetter(n,s,u,r){const d=Oo+Z._capitalize(s);n.prototype[d]||A.overWriteSetter(n,s,u,r)},overWriteSetter(n,s,u,r){const d=Oo+Z._capitalize(s);n.prototype[d]=function(m){return u&&m!==void 0&&m!==null&&(m=u.call(this,m,s)),this._setAttr(s,m),r&&r.call(this),this}},addComponentsGetterSetter(n,s,u,r,d){const m=u.length,p=Z._capitalize,y=wo+p(s),S=Oo+p(s);n.prototype[y]=function(){const L={};for(let _=0;_{this._setAttr(s+p(M),void 0)}),this._fireChangeEvent(s,_,L),d&&d.call(this),this},A.addOverloadedGetterSetter(n,s)},addOverloadedGetterSetter(n,s){const u=Z._capitalize(s),r=Oo+u,d=wo+u;n.prototype[s]=function(){return arguments.length?(this[r](arguments[0]),this):this[d]()}},addDeprecatedGetterSetter(n,s,u,r){Z.error("Adding deprecated "+s);const d=wo+Z._capitalize(s),m=s+" property is deprecated and will be removed soon. Look at Konva change log for more information.";n.prototype[d]=function(){Z.error(m);const p=this.attrs[s];return p===void 0?u:p},A.addSetter(n,s,r,function(){Z.error(m)}),A.addOverloadedGetterSetter(n,s)},backCompat(n,s){Z.each(s,function(u,r){const d=n.prototype[r],m=wo+Z._capitalize(u),p=Oo+Z._capitalize(u);function y(){d.apply(this,arguments),Z.error('"'+u+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}n.prototype[u]=y,n.prototype[m]=y,n.prototype[p]=y})},afterSetFilter(){this._filterUpToDate=!1}}}));function L4(n){const s=/(\w+)\(([^)]+)\)/g;let u;for(;(u=s.exec(n))!==null;){const[,r,d]=u;switch(r){case"blur":{const m=parseFloat(d.replace("px",""));return function(p){this.blurRadius(m*.5);const y=vt.Filters;y&&y.Blur&&y.Blur.call(this,p)}}case"brightness":{const m=d.includes("%")?parseFloat(d)/100:parseFloat(d);return function(p){this.brightness(m);const y=vt.Filters;y&&y.Brightness&&y.Brightness.call(this,p)}}case"contrast":{const m=parseFloat(d);return function(p){const y=100*(Math.sqrt(m)-1);this.contrast(y);const S=vt.Filters;S&&S.Contrast&&S.Contrast.call(this,p)}}case"grayscale":return function(m){const p=vt.Filters;p&&p.Grayscale&&p.Grayscale.call(this,m)};case"sepia":return function(m){const p=vt.Filters;p&&p.Sepia&&p.Sepia.call(this,m)};case"invert":return function(m){const p=vt.Filters;p&&p.Invert&&p.Invert.call(this,m)};default:Z.warn(`CSS filter "${r}" is not supported in fallback mode. Consider using function filters for better compatibility.`);break}}return()=>{}}var md,Nm,Rl,Tm,fu,e2,a2,i2,mf,n2,l2,s2,u2,c2,o2,Am,wm,gd,Om,xs,r2,gf,d2,h2,bt,Re,Sa=Et((()=>{hf(),Em(),zm(),re(),Ce(),ha(),ge(),md="absoluteOpacity",Nm="allEventListeners",Rl="absoluteTransform",Tm="absoluteScale",fu="canvas",e2="Change",a2="children",i2="konva",mf="listening",n2="mouseenter",l2="mouseleave",s2="pointerenter",u2="pointerleave",c2="touchenter",o2="touchleave",Am="set",wm="Shape",gd=" ",Om="stage",xs="transform",r2="Stage",gf="visible",d2=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(gd),h2=1,bt=class $h{constructor(s){this._id=h2++,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(s),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(s){(s===xs||s===Rl)&&this._cache.get(s)?this._cache.get(s).dirty=!0:s?this._cache.delete(s):this._cache.clear()}_getCache(s,u){let r=this._cache.get(s);return(r===void 0||(s===xs||s===Rl)&&r.dirty===!0)&&(r=u.call(this),this._cache.set(s,r)),r}_calculate(s,u,r){if(!this._attachedDepsListeners.get(s)){const d=u.map(m=>m+"Change.konva").join(gd);this.on(d,()=>{this._clearCache(s)}),this._attachedDepsListeners.set(s,!0)}return this._getCache(s,r)}_getCanvasCache(){return this._cache.get(fu)}_clearSelfAndDescendantCache(s){this._clearCache(s),s===Rl&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(fu)){const{scene:s,filter:u,hit:r}=this._cache.get(fu);Z.releaseCanvas(s._canvas,u._canvas,r._canvas),this._cache.delete(fu)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(s){const u=s||{};let r={};(u.x===void 0||u.y===void 0||u.width===void 0||u.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let d=Math.ceil(u.width||r.width),m=Math.ceil(u.height||r.height),p=u.pixelRatio,y=u.x===void 0?Math.floor(r.x):u.x,S=u.y===void 0?Math.floor(r.y):u.y,x=u.offset||0,L=u.drawBorder||!1,_=u.hitCanvasPixelRatio||1;if(!d||!m){Z.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const M=Math.abs(Math.round(r.x)-y)>.5?1:0,w=Math.abs(Math.round(r.y)-S)>.5?1:0;d+=x*2+M,m+=x*2+w,y-=x,S-=x;const N=new Ls({pixelRatio:p,width:d,height:m}),J=new Ls({pixelRatio:p,width:0,height:0,willReadFrequently:!0}),q=new df({pixelRatio:_,width:d,height:m}),G=N.getContext(),V=q.getContext(),U=new Ls({width:N.width/N.pixelRatio+Math.abs(y),height:N.height/N.pixelRatio+Math.abs(S),pixelRatio:N.pixelRatio}),F=U.getContext();return q.isCache=!0,N.isCache=!0,this._cache.delete(fu),this._filterUpToDate=!1,u.imageSmoothingEnabled===!1&&(N.getContext()._context.imageSmoothingEnabled=!1,J.getContext()._context.imageSmoothingEnabled=!1),G.save(),V.save(),F.save(),G.translate(-y,-S),V.translate(-y,-S),F.translate(-y,-S),U.x=y,U.y=S,this._isUnderCache=!0,this._clearSelfAndDescendantCache(md),this._clearSelfAndDescendantCache(Tm),this.drawScene(N,this,U),this.drawHit(q,this),this._isUnderCache=!1,G.restore(),V.restore(),L&&(G.save(),G.beginPath(),G.rect(0,0,d,m),G.closePath(),G.setAttr("strokeStyle","red"),G.setAttr("lineWidth",5),G.stroke(),G.restore()),Z.releaseCanvas(U._canvas),this._cache.set(fu,{scene:N,filter:J,hit:q,x:y,y:S}),this._requestDraw(),this}isCached(){return this._cache.has(fu)}getClientRect(s){throw new Error('abstract "getClientRect" method call')}_transformedRect(s,u){const r=[{x:s.x,y:s.y},{x:s.x+s.width,y:s.y},{x:s.x+s.width,y:s.y+s.height},{x:s.x,y:s.y+s.height}];let d=1/0,m=1/0,p=-1/0,y=-1/0;const S=this.getAbsoluteTransform(u);return r.forEach(function(x){const L=S.point(x);d===void 0&&(d=p=L.x,m=y=L.y),d=Math.min(d,L.x),m=Math.min(m,L.y),p=Math.max(p,L.x),y=Math.max(y,L.y)}),{x:d,y:m,width:p-d,height:y-m}}_drawCachedSceneCanvas(s){s.save(),s._applyOpacity(this),s._applyGlobalCompositeOperation(this);const u=this._getCanvasCache();s.translate(u.x,u.y);const r=this._getCachedSceneCanvas(),d=r.pixelRatio;s.drawImage(r._canvas,0,0,r.width/d,r.height/d),s.restore()}_drawCachedHitCanvas(s){const u=this._getCanvasCache(),r=u.hit;s.save(),s.translate(u.x,u.y),s.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),s.restore()}_getCachedSceneCanvas(){let s=this.filters(),u=this._getCanvasCache(),r=u.scene,d=u.filter,m=d.getContext(),p,y,S,x;if(!s||s.length===0)return r;if(this._filterUpToDate)return d;let L=!0;for(let M=0;M{this.isAncestorOf(s.node)&&Se._dragElements.delete(u)}),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(Rl),this._clearSelfAndDescendantCache(md),this._clearSelfAndDescendantCache(Tm),this._clearSelfAndDescendantCache(Om),this._clearSelfAndDescendantCache(gf),this._clearSelfAndDescendantCache(mf)}_remove(){this._clearCaches();const s=this.getParent();s&&s.children&&(s.children.splice(this.index,1),s._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(s){const u="get"+Z._capitalize(s);return Z._isFunction(this[u])?this[u]():this.attrs[s]}getAncestors(){let s=this.getParent(),u=[];for(;s;)u.push(s),s=s.getParent();return u}getAttrs(){return this.attrs||{}}setAttrs(s){return this._batchTransformChanges(()=>{let u,r;if(!s)return this;for(u in s)u!==a2&&(r=Am+Z._capitalize(u),Z._isFunction(this[r])?this[r](s[u]):this._setAttr(u,s[u]))}),this}isListening(){return this._getCache(mf,this._isListening)}_isListening(s){if(!this.listening())return!1;const u=this.getParent();return u&&u!==s&&this!==s?u._isListening(s):!0}isVisible(){return this._getCache(gf,this._isVisible)}_isVisible(s){if(!this.visible())return!1;const u=this.getParent();return u&&u!==s&&this!==s?u._isVisible(s):!0}shouldDrawHit(s,u=!1){if(s)return this._isVisible(s)&&this._isListening(s);const r=this.getLayer();let d=!1;Se._dragElements.forEach(p=>{p.dragStatus==="dragging"&&(p.node.nodeType==="Stage"||p.node.getLayer()===r)&&(d=!0)});const m=!u&&!vt.hitOnDragEnabled&&(d||vt.isTransforming());return this.isListening()&&this.isVisible()&&!m}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let s=this.getDepth(),u=this,r=0,d,m,p,y;function S(L){for(d=[],m=L.length,p=0;p0&&d[0].getDepth()<=s&&S(d)}const x=this.getStage();return u.nodeType!==r2&&x&&S(x.getChildren()),r}getDepth(){let s=0,u=this.parent;for(;u;)s++,u=u.parent;return s}_batchTransformChanges(s){this._batchingTransformChange=!0,s(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(xs),this._clearSelfAndDescendantCache(Rl)),this._needClearTransformCache=!1}setPosition(s){return this._batchTransformChanges(()=>{this.x(s.x),this.y(s.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const s=this.getStage();if(!s)return null;const u=s.getPointerPosition();if(!u)return null;const r=this.getAbsoluteTransform().copy();return r.invert(),r.point(u)}getAbsolutePosition(s){let u=!1,r=this.parent;for(;r;){if(r.isCached()){u=!0;break}r=r.parent}u&&!s&&(s=!0);const d=this.getAbsoluteTransform(s).getMatrix(),m=new xn,p=this.offset();return m.m=d.slice(),m.translate(p.x,p.y),m.getTranslation()}setAbsolutePosition(s){const{x:u,y:r,...d}=this._clearTransform();this.attrs.x=u,this.attrs.y=r,this._clearCache(xs);const m=this._getAbsoluteTransform().copy();return m.invert(),m.translate(s.x,s.y),s={x:this.attrs.x+m.getTranslation().x,y:this.attrs.y+m.getTranslation().y},this._setTransform(d),this.setPosition({x:s.x,y:s.y}),this._clearCache(xs),this._clearSelfAndDescendantCache(Rl),this}_setTransform(s){let u;for(u in s)this.attrs[u]=s[u]}_clearTransform(){const s={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,s}move(s){let u=s.x,r=s.y,d=this.x(),m=this.y();return u!==void 0&&(d+=u),r!==void 0&&(m+=r),this.setPosition({x:d,y:m}),this}_eachAncestorReverse(s,u){let r=[],d=this.getParent(),m,p;if(!(u&&u._id===this._id)){for(r.unshift(this);d&&(!u||d._id!==u._id);)r.unshift(d),d=d.parent;for(m=r.length,p=0;p0?(this.parent.children.splice(s,1),this.parent.children.splice(s-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return Z.warn("Node has no parent. moveToBottom function is ignored."),!1;const s=this.index;return s>0?(this.parent.children.splice(s,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(s){if(!this.parent)return Z.warn("Node has no parent. zIndex parameter is ignored."),this;(s<0||s>=this.parent.children.length)&&Z.warn("Unexpected value "+s+" 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 u=this.index;return this.parent.children.splice(u,1),this.parent.children.splice(s,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(md,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let s=this.opacity();const u=this.getParent();return u&&!u._isUnderCache&&(s*=u.getAbsoluteOpacity()),s}moveTo(s){return this.getParent()!==s&&(this._remove(),s.add(this)),this}toObject(){let s=this.getAttrs(),u,r,d,m,p;const y={attrs:{},className:this.getClassName()};for(u in s)r=s[u],p=Z.isObject(r)&&!Z._isPlainObject(r)&&!Z._isArray(r),!p&&(d=typeof this[u]=="function"&&this[u],delete s[u],m=d?d.call(this):null,s[u]=r,m!==r&&(y.attrs[u]=r));return Z._prepareToStringify(y)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(s,u,r){const d=[];u&&this._isMatch(s)&&d.push(this);let m=this.parent;for(;m;){if(m===r)return d;m._isMatch(s)&&d.push(m),m=m.parent}return d}isAncestorOf(s){return!1}findAncestor(s,u,r){return this.findAncestors(s,u,r)[0]}_isMatch(s){if(!s)return!1;if(typeof s=="function")return s(this);let u=s.replace(/ /g,"").split(","),r=u.length,d,m;for(d=0;d{try{const d=s?.callback;d&&delete s.callback,Z._urlToImage(this.toDataURL(s),function(m){u(m),d?.(m)})}catch(d){r(d)}})}toBlob(s){return new Promise((u,r)=>{try{const d=s?.callback;d&&delete s.callback,this.toCanvas(s).toBlob(m=>{u(m),d?.(m)},s?.mimeType,s?.quality)}catch(d){r(d)}})}setSize(s){return this.width(s.width),this.height(s.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():vt.dragDistance}_off(s,u,r){let d=this.eventListeners[s],m,p,y;for(m=0;m=0)||this.isDragging())return;let u=!1;Se._dragElements.forEach(r=>{this.isAncestorOf(r.node)&&(u=!0)}),u||this._createDragElement(s)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const s=Se._dragElements.get(this._id),u=s&&s.dragStatus==="dragging",r=s&&s.dragStatus==="ready";u?this.stopDrag():r&&Se._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(s={x:0,y:0}){const u=this.getStage();if(!u)return!1;const r={x:-s.x,y:-s.y,width:u.width()+2*s.x,height:u.height()+2*s.y};return Z.haveIntersection(r,this.getClientRect())}static create(s,u){return Z._isString(s)&&(s=JSON.parse(s)),this._createNode(s,u)}static _createNode(s,u){let r=$h.prototype.getClassName.call(s),d=s.children,m,p,y;u&&(s.attrs.container=u),vt[r]||(Z.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const S=vt[r];if(m=new S(s.attrs),d)for(p=d.length,y=0;y{re(),Sa(),ge(),Ii=class extends bt{constructor(){super(...arguments),this.children=[]}getChildren(n){const s=this.children||[];return n?s.filter(n):s}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(n=>{n.parent=null,n.index=0,n.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(n=>{n.parent=null,n.index=0,n.destroy()}),this.children=[],this._requestDraw(),this}add(...n){if(n.length===0)return this;if(n.length>1){for(let u=0;u0?s[0]:void 0}_generalFind(n,s){const u=[];return this._descendants(r=>{const d=r._isMatch(n);return d&&u.push(r),!!(d&&s)}),u}_descendants(n){let s=!1;const u=this.getChildren();for(const r of u){if(s=n(r),s)return!0;if(r.hasChildren()&&(s=r._descendants(n),s))return!0}return!1}toObject(){const n=bt.prototype.toObject.call(this);return n.children=[],this.getChildren().forEach(s=>{n.children.push(s.toObject())}),n}isAncestorOf(n){let s=n.getParent();for(;s;){if(s._id===this._id)return!0;s=s.getParent()}return!1}clone(n){const s=bt.prototype.clone.call(this,n);return this.getChildren().forEach(function(u){s.add(u.clone())}),s}getAllIntersections(n){const s=[];return this.find("Shape").forEach(u=>{u.isVisible()&&u.intersects(n)&&s.push(u)}),s}_clearSelfAndDescendantCache(n){var s;super._clearSelfAndDescendantCache(n),!this.isCached()&&((s=this.children)===null||s===void 0||s.forEach(function(u){u._clearSelfAndDescendantCache(n)}))}_setChildrenIndices(){var n;(n=this.children)===null||n===void 0||n.forEach(function(s,u){s.index=u}),this._requestDraw()}drawScene(n,s,u){const r=this.getLayer(),d=n||r&&r.getCanvas(),m=d&&d.getContext(),p=this._getCanvasCache(),y=p&&p.scene,S=d&&d.isCache;if(!this.isVisible()&&!S)return this;if(y){m.save();const x=this.getAbsoluteTransform(s).getMatrix();m.transform(x[0],x[1],x[2],x[3],x[4],x[5]),this._drawCachedSceneCanvas(m),m.restore()}else this._drawChildren("drawScene",d,s,u);return this}drawHit(n,s){if(!this.shouldDrawHit(s))return this;const u=this.getLayer(),r=n||u&&u.hitCanvas,d=r&&r.getContext(),m=this._getCanvasCache();if(m&&m.hit){d.save();const p=this.getAbsoluteTransform(s).getMatrix();d.transform(p[0],p[1],p[2],p[3],p[4],p[5]),this._drawCachedHitCanvas(d),d.restore()}else this._drawChildren("drawHit",r,s);return this}_drawChildren(n,s,u,r){var d;const m=s&&s.getContext(),p=this.clipWidth(),y=this.clipHeight(),S=this.clipFunc(),x=typeof p=="number"&&typeof y=="number"||S,L=u===this;if(x){m.save();const M=this.getAbsoluteTransform(u);let w=M.getMatrix();m.transform(w[0],w[1],w[2],w[3],w[4],w[5]),m.beginPath();let N;if(S)N=S.call(this,m,this);else{const J=this.clipX(),q=this.clipY();m.rect(J||0,q||0,p,y)}m.clip.apply(m,N),w=M.copy().invert().getMatrix(),m.transform(w[0],w[1],w[2],w[3],w[4],w[5])}const _=!L&&this.globalCompositeOperation()!=="source-over"&&n==="drawScene";_&&(m.save(),m._applyGlobalCompositeOperation(this)),(d=this.children)===null||d===void 0||d.forEach(function(M){M[n](s,u,r)}),_&&m.restore(),x&&m.restore()}getClientRect(n={}){var s;const u=n.skipTransform,r=n.relativeTo;let d,m,p,y,S={x:1/0,y:1/0,width:0,height:0};const x=this;(s=this.children)===null||s===void 0||s.forEach(function(M){if(!M.visible())return;const w=M.getClientRect({relativeTo:x,skipShadow:n.skipShadow,skipStroke:n.skipStroke});w.width===0&&w.height===0||(d===void 0?(d=w.x,m=w.y,p=w.x+w.width,y=w.y+w.height):(d=Math.min(d,w.x),m=Math.min(m,w.y),p=Math.max(p,w.x+w.width),y=Math.max(y,w.y+w.height)))});const L=this.find("Shape");let _=!1;for(let M=0;M{Ce(),Yo=new Map,jm=vt._global.PointerEvent!==void 0}));function p2(n={}){return(n.clipFunc||n.clipWidth||n.clipHeight)&&Z.warn("Stage does not support clipping. Please use clip for Layers or Groups."),n}var v2,y2,Gm,b2,Hm,Dm,Im,Zm,Jm,Bm,Ro,jo,Mc,Go,S2,vd,Ho,yd,bd,vf,Xm,Um,Vm,Wm,yf,C2,L2,bf,Do,Nc,x2,Io,Sd,x4=Et((()=>{ha(),re(),pf(),Ce(),hf(),zm(),g2(),v2="Stage",y2="string",Gm="px",b2="mouseout",Hm="mouseleave",Dm="mouseover",Im="mouseenter",Zm="mousemove",Jm="mousedown",Bm="mouseup",Ro="pointermove",jo="pointerdown",Mc="pointerup",Go="pointercancel",S2="lostpointercapture",vd="pointerout",Ho="pointerleave",yd="pointerover",bd="pointerenter",vf="contextmenu",Xm="touchstart",Um="touchend",Vm="touchmove",Wm="touchcancel",yf="wheel",C2=5,L2=[[Im,"_pointerenter"],[Jm,"_pointerdown"],[Zm,"_pointermove"],[Bm,"_pointerup"],[Hm,"_pointerleave"],[Xm,"_pointerdown"],[Vm,"_pointermove"],[Um,"_pointerup"],[Wm,"_pointercancel"],[Dm,"_pointerover"],[yf,"_wheel"],[vf,"_contextmenu"],[jo,"_pointerdown"],[Ro,"_pointermove"],[Mc,"_pointerup"],[Go,"_pointercancel"],[Ho,"_pointerleave"],[S2,"_lostpointercapture"]],bf={mouse:{[vd]:b2,[Ho]:Hm,[yd]:Dm,[bd]:Im,[Ro]:Zm,[jo]:Jm,[Mc]:Bm,[Go]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[vd]:"touchout",[Ho]:"touchleave",[yd]:"touchover",[bd]:"touchenter",[Ro]:Vm,[jo]:Xm,[Mc]:Um,[Go]:Wm,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[vd]:vd,[Ho]:Ho,[yd]:yd,[bd]:bd,[Ro]:Ro,[jo]:jo,[Mc]:Mc,[Go]:Go,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},Do=n=>n.indexOf("pointer")>=0?"pointer":n.indexOf("touch")>=0?"touch":"mouse",Nc=n=>{const s=Do(n);if(s==="pointer")return vt.pointerEventsEnabled&&bf.pointer;if(s==="touch")return bf.touch;if(s==="mouse")return bf.mouse},x2="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);",Io=[],Sd=class extends Ii{constructor(n){super(p2(n)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),Io.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{p2(this.attrs)}),this._checkVisibility()}_validateAdd(n){const s=n.getType()==="Layer",u=n.getType()==="FastLayer";s||u||Z.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const n=this.visible()?"":"none";this.content.style.display=n}setContainer(n){if(typeof n===y2){let s;if(n.charAt(0)==="."){const u=n.slice(1);n=document.getElementsByClassName(u)[0]}else n.charAt(0)!=="#"?s=n:s=n.slice(1),n=document.getElementById(s);if(!n)throw"Can not find container in document with id "+s}return this._setAttr("container",n),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),n.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){const n=this.children,s=n.length;for(let u=0;u-1&&Io.splice(s,1),Z.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const n=this._pointerPositions[0]||this._changedPointerPositions[0];return n?{x:n.x,y:n.y}:(Z.warn(x2),null)}_getPointerById(n){return this._pointerPositions.find(s=>s.id===n)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(n){n={...n},n.x=n.x||0,n.y=n.y||0,n.width=n.width||this.width(),n.height=n.height||this.height();const s=new Ls({width:n.width,height:n.height,pixelRatio:n.pixelRatio||1}),u=s.getContext()._context,r=this.children;return(n.x||n.y)&&u.translate(-1*n.x,-1*n.y),r.forEach(function(d){if(!d.isVisible())return;const m=d._toKonvaCanvas(n);u.drawImage(m._canvas,n.x,n.y,m.getWidth()/m.getPixelRatio(),m.getHeight()/m.getPixelRatio())}),s}getIntersection(n){if(!n)return null;const s=this.children,u=s.length-1;for(let r=u;r>=0;r--){const d=s[r].getIntersection(n);if(d)return d}return null}_resizeDOM(){const n=this.width(),s=this.height();this.content&&(this.content.style.width=n+Gm,this.content.style.height=s+Gm),this.bufferCanvas.setSize(n,s),this.bufferHitCanvas.setSize(n,s),this.children.forEach(u=>{u.setSize({width:n,height:s}),u.draw()})}add(n,...s){if(arguments.length>1){for(let r=0;rC2&&Z.warn("The stage has "+u+" 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."),n.setSize({width:this.width(),height:this.height()}),n.draw(),vt.isBrowser&&this.content.appendChild(n.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(n){return f2(n,this)}setPointerCapture(n){m2(n,this)}releaseCapture(n){pd(n,this)}getLayers(){return this.children}_bindContentEvents(){vt.isBrowser&&L2.forEach(([n,s])=>{this.content.addEventListener(n,u=>{this[s](u)},{passive:!1})})}_pointerenter(n){this.setPointersPositions(n);const s=Nc(n.type);s&&this._fire(s.pointerenter,{evt:n,target:this,currentTarget:this})}_pointerover(n){this.setPointersPositions(n);const s=Nc(n.type);s&&this._fire(s.pointerover,{evt:n,target:this,currentTarget:this})}_getTargetShape(n){let s=this[n+"targetShape"];return s&&!s.getStage()&&(s=null),s}_pointerleave(n){const s=Nc(n.type),u=Do(n.type);if(!s)return;this.setPointersPositions(n);const r=this._getTargetShape(u),d=!(vt.isDragging()||vt.isTransforming())||vt.hitOnDragEnabled;r&&d?(r._fireAndBubble(s.pointerout,{evt:n}),r._fireAndBubble(s.pointerleave,{evt:n}),this._fire(s.pointerleave,{evt:n,target:this,currentTarget:this}),this[u+"targetShape"]=null):d&&(this._fire(s.pointerleave,{evt:n,target:this,currentTarget:this}),this._fire(s.pointerout,{evt:n,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(n){const s=Nc(n.type),u=Do(n.type);if(!s)return;this.setPointersPositions(n);let r=!1;this._changedPointerPositions.forEach(d=>{const m=this.getIntersection(d);if(Se.justDragged=!1,vt["_"+u+"ListenClick"]=!0,!m||!m.isListening()){this[u+"ClickStartShape"]=void 0;return}vt.capturePointerEventsEnabled&&m.setPointerCapture(d.id),this[u+"ClickStartShape"]=m,m._fireAndBubble(s.pointerdown,{evt:n,pointerId:d.id}),r=!0;const p=n.type.indexOf("touch")>=0;m.preventDefault()&&n.cancelable&&p&&n.preventDefault()}),r||this._fire(s.pointerdown,{evt:n,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(n){const s=Nc(n.type),u=Do(n.type);if(!s)return;const r=n.type.indexOf("touch")>=0||n.pointerType==="touch";if(vt.isDragging()&&Se.node.preventDefault()&&n.cancelable&&r&&n.preventDefault(),this.setPointersPositions(n),!(!(vt.isDragging()||vt.isTransforming())||vt.hitOnDragEnabled))return;const d={};let m=!1;const p=this._getTargetShape(u);this._changedPointerPositions.forEach(y=>{const S=Ym(y.id)||this.getIntersection(y),x=y.id,L={evt:n,pointerId:x},_=p!==S;if(_&&p&&(p._fireAndBubble(s.pointerout,{...L},S),p._fireAndBubble(s.pointerleave,{...L},S)),S){if(d[S._id])return;d[S._id]=!0}S&&S.isListening()?(m=!0,_&&(S._fireAndBubble(s.pointerover,{...L},p),S._fireAndBubble(s.pointerenter,{...L},p),this[u+"targetShape"]=S),S._fireAndBubble(s.pointermove,{...L})):p&&(this._fire(s.pointerover,{evt:n,target:this,currentTarget:this,pointerId:x}),this[u+"targetShape"]=null)}),m||this._fire(s.pointermove,{evt:n,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(n){const s=Nc(n.type),u=Do(n.type);if(!s)return;this.setPointersPositions(n);const r=this[u+"ClickStartShape"],d=this[u+"ClickEndShape"],m={};let p=!1;this._changedPointerPositions.forEach(y=>{const S=Ym(y.id)||this.getIntersection(y);if(S){if(S.releaseCapture(y.id),m[S._id])return;m[S._id]=!0}const x=y.id,L={evt:n,pointerId:x};let _=!1;vt["_"+u+"InDblClickWindow"]?(_=!0,clearTimeout(this[u+"DblTimeout"])):Se.justDragged||(vt["_"+u+"InDblClickWindow"]=!0,clearTimeout(this[u+"DblTimeout"])),this[u+"DblTimeout"]=setTimeout(function(){vt["_"+u+"InDblClickWindow"]=!1},vt.dblClickWindow),S&&S.isListening()?(p=!0,this[u+"ClickEndShape"]=S,S._fireAndBubble(s.pointerup,{...L}),vt["_"+u+"ListenClick"]&&r&&r===S&&(S._fireAndBubble(s.pointerclick,{...L}),_&&d&&d===S&&S._fireAndBubble(s.pointerdblclick,{...L}))):(this[u+"ClickEndShape"]=null,p||(this._fire(s.pointerup,{evt:n,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),p=!0),vt["_"+u+"ListenClick"]&&this._fire(s.pointerclick,{evt:n,target:this,currentTarget:this,pointerId:x}),_&&this._fire(s.pointerdblclick,{evt:n,target:this,currentTarget:this,pointerId:x}))}),p||this._fire(s.pointerup,{evt:n,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),vt["_"+u+"ListenClick"]=!1,n.cancelable&&u!=="touch"&&u!=="pointer"&&n.preventDefault()}_contextmenu(n){this.setPointersPositions(n);const s=this.getIntersection(this.getPointerPosition());s&&s.isListening()?s._fireAndBubble(vf,{evt:n}):this._fire(vf,{evt:n,target:this,currentTarget:this})}_wheel(n){this.setPointersPositions(n);const s=this.getIntersection(this.getPointerPosition());s&&s.isListening()?s._fireAndBubble(yf,{evt:n}):this._fire(yf,{evt:n,target:this,currentTarget:this})}_pointercancel(n){this.setPointersPositions(n);const s=Ym(n.pointerId)||this.getIntersection(this.getPointerPosition());s&&s._fireAndBubble(Mc,Rm(n)),pd(n.pointerId)}_lostpointercapture(n){pd(n.pointerId)}setPointersPositions(n){const s=this._getContentPosition();let u=null,r=null;n=n||window.event,n.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(n.touches,d=>{this._pointerPositions.push({id:d.identifier,x:(d.clientX-s.left)/s.scaleX,y:(d.clientY-s.top)/s.scaleY})}),Array.prototype.forEach.call(n.changedTouches||n.touches,d=>{this._changedPointerPositions.push({id:d.identifier,x:(d.clientX-s.left)/s.scaleX,y:(d.clientY-s.top)/s.scaleY})})):(u=(n.clientX-s.left)/s.scaleX,r=(n.clientY-s.top)/s.scaleY,this.pointerPos={x:u,y:r},this._pointerPositions=[{x:u,y:r,id:Z._getFirstPointerId(n)}],this._changedPointerPositions=[{x:u,y:r,id:Z._getFirstPointerId(n)}])}_setPointerPosition(n){Z.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(n)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};const n=this.content.getBoundingClientRect();return{top:n.top,left:n.left,scaleX:n.width/this.content.clientWidth||1,scaleY:n.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new Ls({width:this.width(),height:this.height()}),this.bufferHitCanvas=new df({pixelRatio:1,width:this.width(),height:this.height()}),!vt.isBrowser)return;const n=this.container();if(!n)throw"Stage has no container. A container is required.";n.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"),n.appendChild(this.content),this._resizeDOM()}cache(){return Z.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(n){n.batchDraw()}),this}},Sd.prototype.nodeType=v2,$e(Sd),A.addGetterSetter(Sd,"container"),vt.isBrowser&&document.addEventListener("visibilitychange",()=>{Io.forEach(n=>{n.batchDraw()})})}));function Qm(){return Sf||(Sf=Z.createCanvasElement().getContext("2d"),Sf)}function _4(n){const s=this.attrs.fillRule;s?n.fill(s):n.fill()}function E4(n){n.stroke()}function z4(n){const s=this.attrs.fillRule;s?n.fill(s):n.fill()}function M4(n){n.stroke()}function N4(){this._clearCache(qm)}function T4(){this._clearCache(Km)}function A4(){this._clearCache(km)}function w4(){this._clearCache(Fm)}function O4(){this._clearCache(Pm)}var qm,Km,km,Fm,Pm,Sf,Zo,ht,Va=Et((()=>{Ce(),ha(),re(),Sa(),ge(),g2(),qm="hasShadow",Km="shadowRGBA",km="patternImage",Fm="linearGradient",Pm="radialGradient",Zo={},ht=class extends bt{constructor(n){super(n);let s,u=0;for(;s=Z.getHitColor(),!(s&&!(s in Zo));)if(u++,u>=1e4){Z.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."),s=Z.getRandomColor();break}this.colorKey=s,Zo[s]=this}getContext(){return Z.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return Z.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(qm,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(km,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const n=Qm().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const s=new xn;s.translate(this.fillPatternX(),this.fillPatternY()),s.rotate(vt.getAngle(this.fillPatternRotation())),s.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),s.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const u=s.getMatrix(),r=typeof DOMMatrix>"u"?{a:u[0],b:u[1],c:u[2],d:u[3],e:u[4],f:u[5]}:new DOMMatrix(u);n.setTransform(r)}return n}}_getLinearGradient(){return this._getCache(Fm,this.__getLinearGradient)}__getLinearGradient(){const n=this.fillLinearGradientColorStops();if(n){const s=Qm(),u=this.fillLinearGradientStartPoint(),r=this.fillLinearGradientEndPoint(),d=s.createLinearGradient(u.x,u.y,r.x,r.y);for(let m=0;mthis.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 n=this.hitStrokeWidth();return n==="auto"?this.hasStroke():this.strokeEnabled()&&!!n}intersects(n){const s=this.getStage();if(!s)return!1;const u=s.bufferHitCanvas;return u.getContext().clear(),this.drawHit(u,void 0,!0),u.context.getImageData(Math.round(n.x),Math.round(n.y),1,1).data[3]>0}destroy(){return bt.prototype.destroy.call(this),delete Zo[this.colorKey],delete this.colorKey,this}_useBufferCanvas(n){var s;if(!(!((s=this.attrs.perfectDrawEnabled)!==null&&s!==void 0)||s))return!1;const u=n||this.hasFill(),r=this.hasStroke(),d=this.getAbsoluteOpacity()!==1;if(u&&r&&d)return!0;const m=this.hasShadow(),p=this.shadowForStrokeEnabled();return!!(u&&r&&m&&p)}setStrokeHitEnabled(n){Z.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),n?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){const n=this.size();return{x:this._centroid?-n.width/2:0,y:this._centroid?-n.height/2:0,width:n.width,height:n.height}}getClientRect(n={}){let s=!1,u=this.getParent();for(;u;){if(u.isCached()){s=!0;break}u=u.getParent()}const r=n.skipTransform,d=n.relativeTo||s&&this.getStage()||void 0,m=this.getSelfRect(),p=!n.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,y=m.width+p,S=m.height+p,x=!n.skipShadow&&this.hasShadow(),L=x?this.shadowOffsetX():0,_=x?this.shadowOffsetY():0,M=y+Math.abs(L),w=S+Math.abs(_),N=x&&this.shadowBlur()||0,J={width:M+N*2,height:w+N*2,x:-(p/2+N)+Math.min(L,0)+m.x,y:-(p/2+N)+Math.min(_,0)+m.y};return r?J:this._transformedRect(J,d)}drawScene(n,s,u){const r=this.getLayer(),d=(n||r.getCanvas()).getContext(),m=this._getCanvasCache(),p=this.getSceneFunc(),y=this.hasShadow();let S;const x=s===this;if(!this.isVisible()&&!x)return this;if(m){d.save();const L=this.getAbsoluteTransform(s).getMatrix();return d.transform(L[0],L[1],L[2],L[3],L[4],L[5]),this._drawCachedSceneCanvas(d),d.restore(),this}if(!p)return this;if(d.save(),this._useBufferCanvas()){S=this.getStage();const L=u||S.bufferCanvas,_=L.getContext();u?(_.save(),_.setTransform(1,0,0,1,0,0),_.clearRect(0,0,L.width,L.height),_.restore()):_.clear(),_.save(),_._applyLineJoin(this),_._applyMiterLimit(this);const M=this.getAbsoluteTransform(s).getMatrix();_.transform(M[0],M[1],M[2],M[3],M[4],M[5]),p.call(this,_,this),_.restore();const w=L.pixelRatio;y&&d._applyShadow(this),x||(d._applyOpacity(this),d._applyGlobalCompositeOperation(this)),d.drawImage(L._canvas,L.x||0,L.y||0,L.width/w,L.height/w)}else{if(d._applyLineJoin(this),d._applyMiterLimit(this),!x){const L=this.getAbsoluteTransform(s).getMatrix();d.transform(L[0],L[1],L[2],L[3],L[4],L[5]),d._applyOpacity(this),d._applyGlobalCompositeOperation(this)}y&&d._applyShadow(this),p.call(this,d,this)}return d.restore(),this}drawHit(n,s,u=!1){if(!this.shouldDrawHit(s,u))return this;const r=this.getLayer(),d=n||r.hitCanvas,m=d&&d.getContext(),p=this.hitFunc()||this.sceneFunc(),y=this._getCanvasCache(),S=y&&y.hit;if(this.colorKey||Z.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){m.save();const x=this.getAbsoluteTransform(s).getMatrix();return m.transform(x[0],x[1],x[2],x[3],x[4],x[5]),this._drawCachedHitCanvas(m),m.restore(),this}if(!p)return this;if(m.save(),m._applyLineJoin(this),m._applyMiterLimit(this),this!==s){const x=this.getAbsoluteTransform(s).getMatrix();m.transform(x[0],x[1],x[2],x[3],x[4],x[5])}return p.call(this,m,this),m.restore(),this}drawHitFromCache(n=0){const s=this._getCanvasCache(),u=this._getCachedSceneCanvas(),r=s.hit,d=r.getContext(),m=r.getWidth(),p=r.getHeight();d.clear(),d.drawImage(u._canvas,0,0,m,p);try{const y=d.getImageData(0,0,m,p),S=y.data,x=S.length,L=Z._hexToRgb(this.colorKey);for(let _=0;_n?(S[_]=L.r,S[_+1]=L.g,S[_+2]=L.b,S[_+3]=255):S[_+3]=0;d.putImageData(y,0,0)}catch(y){Z.error("Unable to draw hit graph from cached scene canvas. "+y.message)}return this}hasPointerCapture(n){return f2(n,this)}setPointerCapture(n){m2(n,this)}releaseCapture(n){pd(n,this)}},ht.prototype._fillFunc=_4,ht.prototype._strokeFunc=E4,ht.prototype._fillFuncHit=z4,ht.prototype._strokeFuncHit=M4,ht.prototype._centroid=!1,ht.prototype.nodeType="Shape",$e(ht),ht.prototype.eventListeners={},ht.prototype.on("shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",N4),ht.prototype.on("shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",T4),ht.prototype.on("fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",A4),ht.prototype.on("fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",w4),ht.prototype.on("fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",O4),A.addGetterSetter(ht,"stroke",void 0,t2()),A.addGetterSetter(ht,"strokeWidth",2,gt()),A.addGetterSetter(ht,"fillAfterStrokeEnabled",!1),A.addGetterSetter(ht,"hitStrokeWidth","auto",Mm()),A.addGetterSetter(ht,"strokeHitEnabled",!0,$n()),A.addGetterSetter(ht,"perfectDrawEnabled",!0,$n()),A.addGetterSetter(ht,"shadowForStrokeEnabled",!0,$n()),A.addGetterSetter(ht,"lineJoin"),A.addGetterSetter(ht,"lineCap"),A.addGetterSetter(ht,"miterLimit"),A.addGetterSetter(ht,"sceneFunc"),A.addGetterSetter(ht,"hitFunc"),A.addGetterSetter(ht,"dash"),A.addGetterSetter(ht,"dashOffset",0,gt()),A.addGetterSetter(ht,"shadowColor",void 0,zc()),A.addGetterSetter(ht,"shadowBlur",0,gt()),A.addGetterSetter(ht,"shadowOpacity",1,gt()),A.addComponentsGetterSetter(ht,"shadowOffset",["x","y"]),A.addGetterSetter(ht,"shadowOffsetX",0,gt()),A.addGetterSetter(ht,"shadowOffsetY",0,gt()),A.addGetterSetter(ht,"fillPatternImage"),A.addGetterSetter(ht,"fill",void 0,t2()),A.addGetterSetter(ht,"fillPatternX",0,gt()),A.addGetterSetter(ht,"fillPatternY",0,gt()),A.addGetterSetter(ht,"fillLinearGradientColorStops"),A.addGetterSetter(ht,"strokeLinearGradientColorStops"),A.addGetterSetter(ht,"fillRadialGradientStartRadius",0),A.addGetterSetter(ht,"fillRadialGradientEndRadius",0),A.addGetterSetter(ht,"fillRadialGradientColorStops"),A.addGetterSetter(ht,"fillPatternRepeat","repeat"),A.addGetterSetter(ht,"fillEnabled",!0),A.addGetterSetter(ht,"strokeEnabled",!0),A.addGetterSetter(ht,"shadowEnabled",!0),A.addGetterSetter(ht,"dashEnabled",!0),A.addGetterSetter(ht,"strokeScaleEnabled",!0),A.addGetterSetter(ht,"fillPriority","color"),A.addComponentsGetterSetter(ht,"fillPatternOffset",["x","y"]),A.addGetterSetter(ht,"fillPatternOffsetX",0,gt()),A.addGetterSetter(ht,"fillPatternOffsetY",0,gt()),A.addComponentsGetterSetter(ht,"fillPatternScale",["x","y"]),A.addGetterSetter(ht,"fillPatternScaleX",1,gt()),A.addGetterSetter(ht,"fillPatternScaleY",1,gt()),A.addComponentsGetterSetter(ht,"fillLinearGradientStartPoint",["x","y"]),A.addComponentsGetterSetter(ht,"strokeLinearGradientStartPoint",["x","y"]),A.addGetterSetter(ht,"fillLinearGradientStartPointX",0),A.addGetterSetter(ht,"strokeLinearGradientStartPointX",0),A.addGetterSetter(ht,"fillLinearGradientStartPointY",0),A.addGetterSetter(ht,"strokeLinearGradientStartPointY",0),A.addComponentsGetterSetter(ht,"fillLinearGradientEndPoint",["x","y"]),A.addComponentsGetterSetter(ht,"strokeLinearGradientEndPoint",["x","y"]),A.addGetterSetter(ht,"fillLinearGradientEndPointX",0),A.addGetterSetter(ht,"strokeLinearGradientEndPointX",0),A.addGetterSetter(ht,"fillLinearGradientEndPointY",0),A.addGetterSetter(ht,"strokeLinearGradientEndPointY",0),A.addComponentsGetterSetter(ht,"fillRadialGradientStartPoint",["x","y"]),A.addGetterSetter(ht,"fillRadialGradientStartPointX",0),A.addGetterSetter(ht,"fillRadialGradientStartPointY",0),A.addComponentsGetterSetter(ht,"fillRadialGradientEndPoint",["x","y"]),A.addGetterSetter(ht,"fillRadialGradientEndPointX",0),A.addGetterSetter(ht,"fillRadialGradientEndPointY",0),A.addGetterSetter(ht,"fillPatternRotation",0),A.addGetterSetter(ht,"fillRule",void 0,zc()),A.backCompat(ht,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})})),_2,E2,$m,z2,mu,M2=Et((()=>{ha(),pf(),Sa(),re(),hf(),ge(),Va(),Ce(),_2="beforeDraw",E2="draw",$m=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],z2=$m.length,mu=class extends Ii{constructor(n){super(n),this.canvas=new Ls,this.hitCanvas=new df({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(n){return this.getContext().clear(n),this.getHitCanvas().getContext().clear(n),this}setZIndex(n){super.setZIndex(n);const s=this.getStage();return s&&s.content&&(s.content.removeChild(this.getNativeCanvasElement()),n{this.draw(),this._waitingForDraw=!1})),this}getIntersection(n){if(!this.isListening()||!this.isVisible())return null;let s=1,u=!1;for(;;){for(let r=0;r0)return{antialiased:!0};return{}}drawScene(n,s,u){const r=this.getLayer(),d=n||r&&r.getCanvas();return this._fire(_2,{node:this}),this.clearBeforeDraw()&&d.getContext().clear(),Ii.prototype.drawScene.call(this,d,s,u),this._fire(E2,{node:this}),this}drawHit(n,s){const u=this.getLayer(),r=n||u&&u.hitCanvas;return u&&u.clearBeforeDraw()&&u.getHitCanvas().getContext().clear(),Ii.prototype.drawHit.call(this,r,s),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(n){Z.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(n)}getHitGraphEnabled(n){return Z.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;const n=this.parent;this.hitCanvas._canvas.parentNode?n.content.removeChild(this.hitCanvas._canvas):n.content.appendChild(this.hitCanvas._canvas)}destroy(){return Z.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}},mu.prototype.nodeType="Layer",$e(mu),A.addGetterSetter(mu,"imageSmoothingEnabled",!0),A.addGetterSetter(mu,"clearBeforeDraw",!0),A.addGetterSetter(mu,"hitGraphEnabled",!0,$n())})),Cf,Y4=Et((()=>{ha(),M2(),Ce(),Cf=class extends mu{constructor(n){super(n),this.listening(!1),Z.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}},Cf.prototype.nodeType="FastLayer",$e(Cf)})),Tc,t1=Et((()=>{ha(),pf(),Ce(),Tc=class extends Ii{_validateAdd(n){const s=n.getType();s!=="Group"&&s!=="Shape"&&Z.throw("You may only add groups and shapes to groups.")}},Tc.prototype.nodeType="Group",$e(Tc)})),Lf,Ac,e1=Et((()=>{Ce(),ha(),Lf=(function(){return du.performance&&du.performance.now?function(){return du.performance.now()}:function(){return new Date().getTime()}})(),Ac=class cd{constructor(s,u){this.id=cd.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Lf(),frameRate:0},this.func=s,this.setLayers(u)}setLayers(s){let u=[];return s&&(u=Array.isArray(s)?s:[s]),this.layers=u,this}getLayers(){return this.layers}addLayer(s){const u=this.layers,r=u.length;for(let d=0;d{ha(),e1(),Sa(),Ce(),N2={node:1,duration:1,easing:1,onFinish:1,yoyo:1},T2=1,a1=2,i1=3,n1=["fill","stroke","shadowColor"],A2=0,w2=class{constructor(n,s,u,r,d,m,p){this.prop=n,this.propFunc=s,this.begin=r,this._pos=r,this.duration=m,this._change=0,this.prevPos=0,this.yoyo=p,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=u,this._change=d-this.begin,this.pause()}fire(n){const s=this[n];s&&s()}setTime(n){n>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():n<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=n,this.update())}getTime(){return this._time}setPosition(n){this.prevPos=this._pos,this.propFunc(n),this._pos=n}getPosition(n){return n===void 0&&(n=this._time),this.func(n,this.begin,this._change,this.duration)}play(){this.state=a1,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=i1,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(n){this.pause(),this._time=n,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 n=this.getTimer()-this._startTime;this.state===a1?this.setTime(n):this.state===i1&&this.setTime(this.duration-n)}pause(){this.state=T2,this.fire("onPause")}getTimer(){return new Date().getTime()}},Cd=class ba{constructor(s){const u=this,r=s.node,d=r._id,m=s.easing||Jo.Linear,p=!!s.yoyo;let y,S;typeof s.duration>"u"?y=.3:s.duration===0?y=.001:y=s.duration,this.node=r,this._id=A2++;const x=r.getLayer()||(r instanceof vt.Stage?r.getLayers():null);x||Z.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ac(function(){u.tween.onEnterFrame()},x),this.tween=new w2(S,function(L){u._tweenFunc(L)},m,0,1,y*1e3,p),this._addListeners(),ba.attrs[d]||(ba.attrs[d]={}),ba.attrs[d][this._id]||(ba.attrs[d][this._id]={}),ba.tweens[d]||(ba.tweens[d]={});for(S in s)N2[S]===void 0&&this._addAttr(S,s[S]);this.reset(),this.onFinish=s.onFinish,this.onReset=s.onReset,this.onUpdate=s.onUpdate}_addAttr(s,u){const r=this.node,d=r._id;let m,p,y,S,x;const L=ba.tweens[d][s];L&&delete ba.attrs[d][L][s];let _=r.getAttr(s);if(Z._isArray(u))if(m=[],p=Math.max(u.length,_.length),s==="points"&&u.length!==_.length&&(u.length>_.length?(S=_,_=Z._prepareArrayForTween(_,u,r.closed())):(y=u,u=Z._prepareArrayForTween(u,_,r.closed()))),s.indexOf("fill")===0)for(let M=0;M{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{const s=this.node,u=ba.attrs[s._id][this._id];u.points&&u.points.trueEnd&&s.setAttr("points",u.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{const s=this.node,u=ba.attrs[s._id][this._id];u.points&&u.points.trueStart&&s.points(u.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(s){return this.tween.seek(s*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){const s=this.node._id,u=this._id,r=ba.tweens[s];this.pause(),this.anim&&this.anim.stop();for(const d in r)delete ba.tweens[s][d];delete ba.attrs[s][u],ba.tweens[s]&&(Object.keys(ba.tweens[s]).length===0&&delete ba.tweens[s],Object.keys(ba.attrs[s]).length===0&&delete ba.attrs[s])}},Cd.attrs={},Cd.tweens={},bt.prototype.to=function(n){const s=n.onFinish;n.node=this,n.onFinish=function(){this.destroy(),s&&s()},new Cd(n).play()},Jo={BackEaseIn(n,s,u,r){return u*(n/=r)*n*((1.70158+1)*n-1.70158)+s},BackEaseOut(n,s,u,r){return u*((n=n/r-1)*n*((1.70158+1)*n+1.70158)+1)+s},BackEaseInOut(n,s,u,r){let d=1.70158;return(n/=r/2)<1?u/2*(n*n*(((d*=1.525)+1)*n-d))+s:u/2*((n-=2)*n*(((d*=1.525)+1)*n+d)+2)+s},ElasticEaseIn(n,s,u,r,d,m){let p=0;return n===0?s:(n/=r)===1?s+u:(m||(m=r*.3),!d||d{Ce(),ha(),Sa(),pf(),x4(),M2(),Y4(),t1(),zm(),Va(),e1(),R4(),Em(),hf(),xf=Z._assign(vt,{Util:Z,Transform:xn,Node:bt,Container:Ii,Stage:Sd,stages:Io,Layer:mu,FastLayer:Cf,Group:Tc,DD:Se,Shape:ht,shapes:Zo,Animation:Ac,Tween:Cd,Easings:Jo,Context:fd,Canvas:rf})})),jl,j4=Et((()=>{re(),Va(),Ce(),ge(),jl=class extends ht{_sceneFunc(n){const s=vt.getAngle(this.angle()),u=this.clockwise();n.beginPath(),n.arc(0,0,this.outerRadius(),0,s,u),n.arc(0,0,this.innerRadius(),s,0,!u),n.closePath(),n.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(n){this.outerRadius(n/2)}setHeight(n){this.outerRadius(n/2)}getSelfRect(){const n=this.innerRadius(),s=this.outerRadius(),u=this.clockwise(),r=vt.getAngle(u?360-this.angle():this.angle()),d=Math.cos(Math.min(r,Math.PI)),m=1,p=Math.sin(Math.min(Math.max(Math.PI,r),3*Math.PI/2)),y=Math.sin(Math.min(r,Math.PI/2)),S=d*(d>0?n:s),x=m*(m>0?s:n),L=p*(p>0?n:s),_=y*(y>0?s:n);return{x:S,y:u?-1*_:L,width:x-S,height:_-L}}},jl.prototype._centroid=!0,jl.prototype.className="Arc",jl.prototype._attrsAffectingSize=["innerRadius","outerRadius","angle","clockwise"],$e(jl),A.addGetterSetter(jl,"innerRadius",0,gt()),A.addGetterSetter(jl,"outerRadius",0,gt()),A.addGetterSetter(jl,"angle",0,gt()),A.addGetterSetter(jl,"clockwise",!1,$n())}));function l1(n,s,u,r,d,m,p){const y=Math.sqrt(Math.pow(u-n,2)+Math.pow(r-s,2)),S=Math.sqrt(Math.pow(d-u,2)+Math.pow(m-r,2)),x=p*y/(y+S),L=p*S/(y+S);return[u-x*(d-n),r-x*(m-s),u+L*(d-n),r+L*(m-s)]}function Y2(n,s){const u=n.length,r=[];for(let d=2;d=0){const S=Math.sqrt(y);u.push((-m+S)/(2*d)),u.push((-m-S)/(2*d))}}}return u.filter(r=>r>0&&r<1).flatMap(r=>s.map(d=>{const m=1-r;return m*m*m*d[0]+3*m*m*r*d[1]+3*m*r*r*d[2]+r*r*r*d[3]}))}var Gl,R2=Et((()=>{re(),Ce(),Va(),ge(),Gl=class extends ht{constructor(n){super(n),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(n){const s=this.points(),u=s.length,r=this.tension(),d=this.closed(),m=this.bezier();if(!u)return;let p=0;if(n.beginPath(),n.moveTo(s[0],s[1]),r!==0&&u>4){const y=this.getTensionPoints(),S=y.length;for(p=d?0:4,d||n.quadraticCurveTo(y[0],y[1],y[2],y[3]);p{j2=[[],[],[-.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]],G2=[[],[],[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]],H2=[[1],[1,1],[1,2,1],[1,3,3,1]],s1=(n,s,u)=>{let r,d;const p=u/2;r=0;for(let y=0;y<20;y++)d=p*j2[20][y]+p,r+=G2[20][y]*H4(n,s,d);return p*r},u1=(n,s,u)=>{u===void 0&&(u=1);const r=n[0]-2*n[1]+n[2],d=s[0]-2*s[1]+s[2],m=2*n[1]-2*n[0],p=2*s[1]-2*s[0],y=4*(r*r+d*d),S=4*(r*m+d*p),x=m*m+p*p;if(y===0)return u*Math.sqrt(Math.pow(n[2]-n[0],2)+Math.pow(s[2]-s[0],2));const L=S/(2*y),_=x/y,M=u+L,w=_-L*L,N=M*M+w>0?Math.sqrt(M*M+w):0,J=L*L+w>0?Math.sqrt(L*L+w):0,q=L+Math.sqrt(L*L+w)!==0?w*Math.log(Math.abs((M+N)/(L+J))):0;return Math.sqrt(y)/2*(M*N-L*J+q)},_f=(n,s,u)=>{const r=u.length-1;let d,m;if(r===0)return 0;if(n===0){m=0;for(let p=0;p<=r;p++)m+=H2[r][p]*Math.pow(1-s,r-p)*Math.pow(s,p)*u[p];return m}else{d=new Array(r);for(let p=0;p{let r=1,d=n/s,m=(n-u(d))/s,p=0;for(;r>.001;){const y=u(d+m),S=Math.abs(n-y)/s;if(S500)break}return d}})),en,o1=Et((()=>{re(),Ce(),Va(),D4(),en=class tn extends ht{constructor(s){super(s),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=tn.parsePathData(this.data()),this.pathLength=tn.getPathLength(this.dataArray)}_sceneFunc(s){const u=this.dataArray;s.beginPath();let r=!1;for(let d=0;dL?x:L,q=x>L?1:x/L,G=x>L?L/x:1;s.translate(y,S),s.rotate(w),s.scale(q,G),s.arc(0,0,J,_,_+M,1-N),s.scale(1/q,1/G),s.rotate(-w),s.translate(-y,-S);break;case"z":r=!0,s.closePath();break}}!r&&!this.hasFill()?s.strokeShape(this):s.fillStrokeShape(this)}getSelfRect(){let s=[];this.dataArray.forEach(function(S){if(S.command==="A"){const x=S.points[4],L=S.points[5],_=S.points[4]+L;let M=Math.PI/180;if(Math.abs(x-_)_;w-=M){const N=tn.getPointOnEllipticalArc(S.points[0],S.points[1],S.points[2],S.points[3],w,0);s.push(N.x,N.y)}else for(let w=x+M;w<_;w+=M){const N=tn.getPointOnEllipticalArc(S.points[0],S.points[1],S.points[2],S.points[3],w,0);s.push(N.x,N.y)}}else if(S.command==="C")for(let x=0;x<=1;x+=.01){const L=tn.getPointOnCubicBezier(x,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3],S.points[4],S.points[5]);s.push(L.x,L.y)}else s=s.concat(S.points)});let u=s[0],r=s[0],d=s[1],m=s[1],p,y;for(let S=0;Su[d].pathLength;)s-=u[d].pathLength,++d;if(d===m)return r=u[d-1].points.slice(-2),{x:r[0],y:r[1]};if(s<.01)return u[d].command==="M"?(r=u[d].points.slice(0,2),{x:r[0],y:r[1]}):{x:u[d].start.x,y:u[d].start.y};const p=u[d],y=p.points;switch(p.command){case"L":return tn.getPointOnLine(s,p.start.x,p.start.y,y[0],y[1]);case"C":return tn.getPointOnCubicBezier(c1(s,tn.getPathLength(u),J=>s1([p.start.x,y[0],y[2],y[4]],[p.start.y,y[1],y[3],y[5]],J)),p.start.x,p.start.y,y[0],y[1],y[2],y[3],y[4],y[5]);case"Q":return tn.getPointOnQuadraticBezier(c1(s,tn.getPathLength(u),J=>u1([p.start.x,y[0],y[2]],[p.start.y,y[1],y[3]],J)),p.start.x,p.start.y,y[0],y[1],y[2],y[3]);case"A":const S=y[0],x=y[1],L=y[2],_=y[3],M=y[5],w=y[6];let N=y[4];return N+=M*s/p.pathLength,tn.getPointOnEllipticalArc(S,x,L,_,N,w)}return null}static getPointOnLine(s,u,r,d,m,p,y){p=p??u,y=y??r;const S=this.getLineLength(u,r,d,m);if(S<1e-10)return{x:u,y:r};if(d===u)return{x:p,y:y+(m>r?s:-s)};const x=(m-r)/(d-u),L=Math.sqrt(s*s/(1+x*x))*(d=0&&(J+=2,J>=7&&(J-=7));continue}if(J>=0){if(J===3){if(/^[01]{2}\d+(?:\.\d+)?$/.test(V)){N.push(parseInt(V[0],10)),N.push(parseInt(V[1],10)),N.push(parseFloat(V.slice(2))),J+=3,J>=7&&(J-=7);continue}if(V==="11"||V==="10"||V==="01"){N.push(parseInt(V[0],10)),N.push(parseInt(V[1],10)),J+=2,J>=7&&(J-=7);continue}if(V==="0"||V==="1"){N.push(parseInt(V,10)),J+=1,J>=7&&(J-=7);continue}}else if(J===4){if(/^[01]\d+(?:\.\d+)?$/.test(V)){N.push(parseInt(V[0],10)),N.push(parseFloat(V.slice(1))),J+=2,J>=7&&(J-=7);continue}if(V==="0"||V==="1"){N.push(parseInt(V,10)),J+=1,J>=7&&(J-=7);continue}}const U=parseFloat(V);isNaN(U)?N.push(0):N.push(U),J+=1,J>=7&&(J-=7)}else{const U=parseFloat(V);isNaN(U)?N.push(0):N.push(U)}}for(;N.length>0&&!isNaN(N[0]);){let q="",G=[];const V=y,U=S;let F,ot,ut,at,mt,Rt,zt,Gt,jt,Ht;switch(w){case"l":y+=N.shift(),S+=N.shift(),q="L",G.push(y,S);break;case"L":y=N.shift(),S=N.shift(),G.push(y,S);break;case"m":const Mt=N.shift(),Lt=N.shift();if(y+=Mt,S+=Lt,q="M",m.length>2&&m[m.length-1].command==="z"){for(let lt=m.length-2;lt>=0;lt--)if(m[lt].command==="M"){y=m[lt].points[0]+Mt,S=m[lt].points[1]+Lt;break}}G.push(y,S),w="l";break;case"M":y=N.shift(),S=N.shift(),q="M",G.push(y,S),w="L";break;case"h":y+=N.shift(),q="L",G.push(y,S);break;case"H":y=N.shift(),q="L",G.push(y,S);break;case"v":S+=N.shift(),q="L",G.push(y,S);break;case"V":S=N.shift(),q="L",G.push(y,S);break;case"C":G.push(N.shift(),N.shift(),N.shift(),N.shift()),y=N.shift(),S=N.shift(),G.push(y,S);break;case"c":G.push(y+N.shift(),S+N.shift(),y+N.shift(),S+N.shift()),y+=N.shift(),S+=N.shift(),q="C",G.push(y,S);break;case"S":ot=y,ut=S,F=m[m.length-1],F.command==="C"&&(ot=y+(y-F.points[2]),ut=S+(S-F.points[3])),G.push(ot,ut,N.shift(),N.shift()),y=N.shift(),S=N.shift(),q="C",G.push(y,S);break;case"s":ot=y,ut=S,F=m[m.length-1],F.command==="C"&&(ot=y+(y-F.points[2]),ut=S+(S-F.points[3])),G.push(ot,ut,y+N.shift(),S+N.shift()),y+=N.shift(),S+=N.shift(),q="C",G.push(y,S);break;case"Q":G.push(N.shift(),N.shift()),y=N.shift(),S=N.shift(),G.push(y,S);break;case"q":G.push(y+N.shift(),S+N.shift()),y+=N.shift(),S+=N.shift(),q="Q",G.push(y,S);break;case"T":ot=y,ut=S,F=m[m.length-1],F.command==="Q"&&(ot=y+(y-F.points[0]),ut=S+(S-F.points[1])),y=N.shift(),S=N.shift(),q="Q",G.push(ot,ut,y,S);break;case"t":ot=y,ut=S,F=m[m.length-1],F.command==="Q"&&(ot=y+(y-F.points[0]),ut=S+(S-F.points[1])),y+=N.shift(),S+=N.shift(),q="Q",G.push(ot,ut,y,S);break;case"A":at=N.shift(),mt=N.shift(),Rt=N.shift(),zt=N.shift(),Gt=N.shift(),jt=y,Ht=S,y=N.shift(),S=N.shift(),q="A",G=this.convertEndpointToCenterParameterization(jt,Ht,y,S,zt,Gt,at,mt,Rt);break;case"a":at=N.shift(),mt=N.shift(),Rt=N.shift(),zt=N.shift(),Gt=N.shift(),jt=y,Ht=S,y+=N.shift(),S+=N.shift(),q="A",G=this.convertEndpointToCenterParameterization(jt,Ht,y,S,zt,Gt,at,mt,Rt);break}m.push({command:q||w,points:G,start:{x:V,y:U},pathLength:this.calcLength(V,U,q||w,G)})}(w==="z"||w==="Z")&&m.push({command:"z",points:[],start:void 0,pathLength:0})}return m}static calcLength(s,u,r,d){let m,p,y,S;const x=tn;switch(r){case"L":return x.getLineLength(s,u,d[0],d[1]);case"C":return s1([s,d[0],d[2],d[4]],[u,d[1],d[3],d[5]],1);case"Q":return u1([s,d[0],d[2]],[u,d[1],d[3]],1);case"A":m=0;const L=d[4],_=d[5],M=d[4]+_;let w=Math.PI/180;if(Math.abs(L-M)M;S-=w)y=x.getPointOnEllipticalArc(d[0],d[1],d[2],d[3],S,0),m+=x.getLineLength(p.x,p.y,y.x,y.y),p=y;else for(S=L+w;S1&&(y*=Math.sqrt(w),S*=Math.sqrt(w));let N=Math.sqrt((y*y*(S*S)-y*y*(M*M)-S*S*(_*_))/(y*y*(M*M)+S*S*(_*_)));m===p&&(N*=-1),isNaN(N)&&(N=0);const J=N*y*M/S,q=N*-S*_/y,G=(s+r)/2+Math.cos(L)*J-Math.sin(L)*q,V=(u+d)/2+Math.sin(L)*J+Math.cos(L)*q,U=function(zt){return Math.sqrt(zt[0]*zt[0]+zt[1]*zt[1])},F=function(zt,Gt){return(zt[0]*Gt[0]+zt[1]*Gt[1])/(U(zt)*U(Gt))},ot=function(zt,Gt){return(zt[0]*Gt[1]=1&&(Rt=0),p===0&&Rt>0&&(Rt=Rt-2*Math.PI),p===1&&Rt<0&&(Rt=Rt+2*Math.PI),[G,V,y,S,ut,Rt,L,p]}},en.prototype.className="Path",en.prototype._attrsAffectingSize=["data"],$e(en),A.addGetterSetter(en,"data")})),gu,I4=Et((()=>{re(),R2(),ge(),Ce(),o1(),gu=class extends Gl{_sceneFunc(n){super._sceneFunc(n);const s=Math.PI*2,u=this.points();let r=u;const d=this.tension()!==0&&u.length>4;d&&(r=this.getTensionPoints());const m=this.pointerLength(),p=u.length;let y,S;if(d){const _=[r[r.length-4],r[r.length-3],r[r.length-2],r[r.length-1],u[p-2],u[p-1]],M=en.calcLength(r[r.length-4],r[r.length-3],"C",_),w=en.getPointOnQuadraticBezier(Math.min(1,1-m/M),_[0],_[1],_[2],_[3],_[4],_[5]);y=u[p-2]-w.x,S=u[p-1]-w.y}else y=u[p-2]-u[p-4],S=u[p-1]-u[p-3];const x=(Math.atan2(S,y)+s)%s,L=this.pointerWidth();this.pointerAtEnding()&&(n.save(),n.beginPath(),n.translate(u[p-2],u[p-1]),n.rotate(x),n.moveTo(0,0),n.lineTo(-m,L/2),n.lineTo(-m,-L/2),n.closePath(),n.restore(),this.__fillStroke(n)),this.pointerAtBeginning()&&(n.save(),n.beginPath(),n.translate(u[0],u[1]),d?(y=(r[0]+r[2])/2-u[0],S=(r[1]+r[3])/2-u[1]):(y=u[2]-u[0],S=u[3]-u[1]),n.rotate((Math.atan2(-S,-y)+s)%s),n.moveTo(0,0),n.lineTo(-m,L/2),n.lineTo(-m,-L/2),n.closePath(),n.restore(),this.__fillStroke(n))}__fillStroke(n){const s=this.dashEnabled();s&&(this.attrs.dashEnabled=!1,n.setLineDash([])),n.fillStrokeShape(this),s&&(this.attrs.dashEnabled=!0)}getSelfRect(){const n=super.getSelfRect(),s=this.pointerWidth()/2;return{x:n.x,y:n.y-s,width:n.width,height:n.height+s*2}}},gu.prototype.className="Arrow",$e(gu),A.addGetterSetter(gu,"pointerLength",10,gt()),A.addGetterSetter(gu,"pointerWidth",10,gt()),A.addGetterSetter(gu,"pointerAtBeginning",!1),A.addGetterSetter(gu,"pointerAtEnding",!0)})),wc,Z4=Et((()=>{re(),Va(),ge(),Ce(),wc=class extends ht{_sceneFunc(n){n.beginPath(),n.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),n.closePath(),n.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(n){this.radius()!==n/2&&this.radius(n/2)}setHeight(n){this.radius()!==n/2&&this.radius(n/2)}},wc.prototype._centroid=!0,wc.prototype.className="Circle",wc.prototype._attrsAffectingSize=["radius"],$e(wc),A.addGetterSetter(wc,"radius",0,gt())})),_s,J4=Et((()=>{re(),Va(),ge(),Ce(),_s=class extends ht{_sceneFunc(n){const s=this.radiusX(),u=this.radiusY();n.beginPath(),n.save(),s!==u&&n.scale(1,u/s),n.arc(0,0,s,0,Math.PI*2,!1),n.restore(),n.closePath(),n.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(n){this.radiusX(n/2)}setHeight(n){this.radiusY(n/2)}},_s.prototype.className="Ellipse",_s.prototype._centroid=!0,_s.prototype._attrsAffectingSize=["radiusX","radiusY"],$e(_s),A.addComponentsGetterSetter(_s,"radius",["x","y"]),A.addGetterSetter(_s,"radiusX",0,gt()),A.addGetterSetter(_s,"radiusY",0,gt())})),_n,B4=Et((()=>{ha(),re(),Va(),Ce(),ge(),_n=class Bv extends ht{constructor(s){super(s),this._loadListener=()=>{this._requestDraw()},this.on("imageChange.konva",u=>{this._removeImageLoad(u.oldVal),this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const s=this.image();s&&s.complete||s&&s.readyState===4||s&&s.addEventListener&&s.addEventListener("load",this._loadListener)}_removeImageLoad(s){s&&s.removeEventListener&&s.removeEventListener("load",this._loadListener)}destroy(){return this._removeImageLoad(this.image()),super.destroy(),this}_useBufferCanvas(){const s=!!this.cornerRadius(),u=this.hasShadow();return s&&u?!0:super._useBufferCanvas(!0)}_sceneFunc(s){const u=this.getWidth(),r=this.getHeight(),d=this.cornerRadius(),m=this.attrs.image;let p;if(m){const y=this.attrs.cropWidth,S=this.attrs.cropHeight;y&&S?p=[m,this.cropX(),this.cropY(),y,S,0,0,u,r]:p=[m,0,0,u,r]}(this.hasFill()||this.hasStroke()||d)&&(s.beginPath(),d?Z.drawRoundedRectPath(s,u,r,d):s.rect(0,0,u,r),s.closePath(),s.fillStrokeShape(this)),m&&(d&&s.clip(),s.drawImage.apply(s,p))}_hitFunc(s){const u=this.width(),r=this.height(),d=this.cornerRadius();s.beginPath(),d?Z.drawRoundedRectPath(s,u,r,d):s.rect(0,0,u,r),s.closePath(),s.fillStrokeShape(this)}getWidth(){var s,u,r;return(r=(s=this.attrs.width)!==null&&s!==void 0?s:(u=this.image())===null||u===void 0?void 0:u.width)!==null&&r!==void 0?r:0}getHeight(){var s,u,r;return(r=(s=this.attrs.height)!==null&&s!==void 0?s:(u=this.image())===null||u===void 0?void 0:u.height)!==null&&r!==void 0?r:0}static fromURL(s,u,r=null){const d=Z.createImageElement();d.onload=function(){u(new Bv({image:d}))},d.onerror=r,d.crossOrigin="Anonymous",d.src=s}},_n.prototype.className="Image",_n.prototype._attrsAffectingSize=["image"],$e(_n),A.addGetterSetter(_n,"cornerRadius",0,ff(4)),A.addGetterSetter(_n,"image"),A.addComponentsGetterSetter(_n,"crop",["x","y","width","height"]),A.addGetterSetter(_n,"cropX",0,gt()),A.addGetterSetter(_n,"cropY",0,gt()),A.addGetterSetter(_n,"cropWidth",0,gt()),A.addGetterSetter(_n,"cropHeight",0,gt())})),r1,D2,I2,Ef,zf,Mf,Nf,Z2,Tf,pu,X4=Et((()=>{re(),Va(),t1(),ge(),Ce(),r1=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],D2="Change.konva",I2="none",Ef="up",zf="right",Mf="down",Nf="left",Z2=r1.length,Tf=class extends Tc{constructor(n){super(n),this.on("add.konva",function(s){this._addListeners(s.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(n){let s=this,u;const r=function(){s._sync()};for(u=0;u{re(),Va(),Ce(),ha(),ge(),Bo=class extends ht{_sceneFunc(n){const s=this.cornerRadius(),u=this.width(),r=this.height();n.beginPath(),s?Z.drawRoundedRectPath(n,u,r,s):n.rect(0,0,u,r),n.closePath(),n.fillStrokeShape(this)}},Bo.prototype.className="Rect",$e(Bo),A.addGetterSetter(Bo,"cornerRadius",0,ff(4))})),Es,U4=Et((()=>{re(),Va(),ge(),Ce(),ha(),Es=class extends ht{_sceneFunc(n){const s=this._getPoints(),u=this.radius(),r=this.sides(),d=this.cornerRadius();if(n.beginPath(),d)Z.drawRoundedPolygonPath(n,s,r,u,d);else{n.moveTo(s[0].x,s[0].y);for(let m=1;m{s=Math.min(s,m.x),u=Math.max(u,m.x),r=Math.min(r,m.y),d=Math.max(d,m.y)}),{x:s,y:r,width:u-s,height:d-r}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(n){this.radius(n/2)}setHeight(n){this.radius(n/2)}},Es.prototype.className="RegularPolygon",Es.prototype._centroid=!0,Es.prototype._attrsAffectingSize=["radius"],$e(Es),A.addGetterSetter(Es,"radius",0,gt()),A.addGetterSetter(Es,"sides",0,gt()),A.addGetterSetter(Es,"cornerRadius",0,ff(4))})),d1,vu,V4=Et((()=>{re(),Va(),ge(),Ce(),d1=Math.PI*2,vu=class extends ht{_sceneFunc(n){n.beginPath(),n.arc(0,0,this.innerRadius(),0,d1,!1),n.moveTo(this.outerRadius(),0),n.arc(0,0,this.outerRadius(),d1,0,!0),n.closePath(),n.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(n){this.outerRadius(n/2)}setHeight(n){this.outerRadius(n/2)}},vu.prototype.className="Ring",vu.prototype._centroid=!0,vu.prototype._attrsAffectingSize=["innerRadius","outerRadius"],$e(vu),A.addGetterSetter(vu,"innerRadius",0,gt()),A.addGetterSetter(vu,"outerRadius",0,gt())})),tl,W4=Et((()=>{re(),Va(),e1(),ge(),Ce(),tl=class extends ht{constructor(n){super(n),this._updated=!0,this.anim=new Ac(()=>{const s=this._updated;return this._updated=!1,s}),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(n){const s=this.animation(),u=this.frameIndex(),r=u*4,d=this.animations()[s],m=this.frameOffsets(),p=d[r+0],y=d[r+1],S=d[r+2],x=d[r+3],L=this.image();if((this.hasFill()||this.hasStroke())&&(n.beginPath(),n.rect(0,0,S,x),n.closePath(),n.fillStrokeShape(this)),L)if(m){const _=m[s],M=u*2;n.drawImage(L,p,y,S,x,_[M+0],_[M+1],S,x)}else n.drawImage(L,p,y,S,x,0,0,S,x)}_hitFunc(n){const s=this.animation(),u=this.frameIndex(),r=u*4,d=this.animations()[s],m=this.frameOffsets(),p=d[r+2],y=d[r+3];if(n.beginPath(),m){const S=m[s],x=u*2;n.rect(S[x+0],S[x+1],p,y)}else n.rect(0,0,p,y);n.closePath(),n.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){const n=this;this.interval=setInterval(function(){n._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;const n=this.getLayer();this.anim.setLayers(n),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){const n=this.frameIndex(),s=this.animation();n{re(),Va(),ge(),Ce(),zs=class extends ht{_sceneFunc(n){const s=this.innerRadius(),u=this.outerRadius(),r=this.numPoints();n.beginPath(),n.moveTo(0,0-u);for(let d=1;d{if(new RegExp("\\p{Emoji}","u").test(u)){const m=d[r+1];m&&new RegExp("\\p{Emoji_Modifier}|\\u200D","u").test(m)?(s.push(u+m),d[r+1]=""):s.push(u)}else new RegExp("\\p{Regional_Indicator}{2}","u").test(u+(d[r+1]||""))?s.push(u+d[r+1]):r>0&&new RegExp("\\p{Mn}|\\p{Me}|\\p{Mc}","u").test(u)?s[s.length-1]+=u:u&&s.push(u);return s},[])}function q4(){if(Uo!==null)return Uo;Uo=!1;try{const n=document.createElement("canvas");n.width=10,n.height=10;const s=n.getContext(m1);if(s){s.globalAlpha=0,s.shadowColor="black",s.shadowBlur=5,s.shadowOffsetX=5,s.shadowOffsetY=5,s.fillStyle="black",s.font="10px Arial",s.fillText("X",0,10);const u=s.getImageData(0,0,10,10).data;for(let r=3;r0){Uo=!0;break}}}catch{}return Uo}function K4(n){return n.split(",").map(s=>{s=s.trim();const u=s.indexOf(" ")>=0,r=s.indexOf('"')>=0||s.indexOf("'")>=0;return u&&!r&&(s=`"${s}"`),s}).join(", ")}function h1(){return wf||(wf=Z.createCanvasElement().getContext(m1),wf)}function k4(n){n.fillText(this._partialText,this._partialTextX,this._partialTextY)}function F4(n){n.setAttr("miterLimit",2),n.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function P4(n){return n=n||{},!n.fillLinearGradientColorStops&&!n.fillRadialGradientColorStops&&!n.fillPatternImage&&(n.fill=n.fill||"black"),n}var Oc,B2,f1,Xo,X2,m1,g1,p1,U2,V2,W2,Q2,v1,y1,q2,Ld,K2,b1,k2,F2,S1,Af,C1,P2,Uo,wf,De,$2=Et((()=>{ha(),re(),Va(),Ce(),ge(),Oc="auto",B2="center",f1="inherit",Xo="justify",X2="Change.konva",m1="2d",g1="-",p1="left",U2="text",V2="Text",W2="top",Q2="bottom",v1="middle",y1="normal",q2="px ",Ld=" ",K2="right",b1="rtl",k2="word",F2="char",S1="none",Af="…",C1=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],P2=C1.length,Uo=null,De=class extends ht{constructor(n){super(P4(n)),this._partialTextX=0,this._partialTextY=0;for(let s=0;sCt+yu(Nt.text).length,0);N({char:nt,index:lt+et,x:at,y:ot+mt,lineIndex:F,column:lt,isLastInLine:jt,width:this.measureSize(nt).width,context:n})}n.fillStrokeShape(this),N&&n.restore(),at+=this.measureSize(nt).width+w}}else w!==0&&n.setAttr("letterSpacing",`${w}px`),this._partialTextX=at,this._partialTextY=ot+mt,this._partialText=zt,n.fillStrokeShape(this);if(U){n.save(),n.beginPath();const Mt=vt.legacyTextRendering?0:-Math.round(p/4),Lt=Ht;n.moveTo(Lt,ot+mt+Mt);const lt=_===Xo&&!jt?M-m*2:Gt;n.lineTo(Lt+Math.round(lt),ot+mt+Mt),n.lineWidth=p/15,n.strokeStyle=this._getLinearGradient()||J,n.stroke(),n.restore()}n.restore(),d>1&&(ot+=y)}}_hitFunc(n){const s=this.getWidth(),u=this.getHeight();n.beginPath(),n.rect(0,0,s,u),n.closePath(),n.fillStrokeShape(this)}setText(n){const s=Z._isString(n)?n:n==null?"":n+"";return this._setAttr(U2,s),this}getWidth(){return this.attrs.width===Oc||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===Oc||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return Z.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(n){var s,u,r,d,m,p,y,S,x,L,_;let M=h1(),w=this.fontSize(),N;M.save(),M.font=this._getContextFont(),N=M.measureText(n),M.restore();const J=w/100;return{actualBoundingBoxAscent:(s=N.actualBoundingBoxAscent)!==null&&s!==void 0?s:71.58203125*J,actualBoundingBoxDescent:(u=N.actualBoundingBoxDescent)!==null&&u!==void 0?u:0,actualBoundingBoxLeft:(r=N.actualBoundingBoxLeft)!==null&&r!==void 0?r:-7.421875*J,actualBoundingBoxRight:(d=N.actualBoundingBoxRight)!==null&&d!==void 0?d:75.732421875*J,alphabeticBaseline:(m=N.alphabeticBaseline)!==null&&m!==void 0?m:0,emHeightAscent:(p=N.emHeightAscent)!==null&&p!==void 0?p:100*J,emHeightDescent:(y=N.emHeightDescent)!==null&&y!==void 0?y:-20*J,fontBoundingBoxAscent:(S=N.fontBoundingBoxAscent)!==null&&S!==void 0?S:91*J,fontBoundingBoxDescent:(x=N.fontBoundingBoxDescent)!==null&&x!==void 0?x:21*J,hangingBaseline:(L=N.hangingBaseline)!==null&&L!==void 0?L:72.80000305175781*J,ideographicBaseline:(_=N.ideographicBaseline)!==null&&_!==void 0?_:-21*J,width:N.width,height:w}}_getContextFont(){return this.fontStyle()+Ld+this.fontVariant()+Ld+(this.fontSize()+q2)+K4(this.fontFamily())}_addTextLine(n){this.align()===Xo&&(n=n.trim());const s=this._getTextWidth(n);return this.textArr.push({text:n,width:s,lastInParagraph:!1})}_getTextWidth(n){const s=this.letterSpacing(),u=n.length;return h1().measureText(n).width+s*u}_setTextData(){let n=this.text().split(` `),s=+this.fontSize(),u=0,r=this.lineHeight()*s,d=this.attrs.width,m=this.attrs.height,p=d!==Oc&&d!==void 0,y=m!==Oc&&m!==void 0,S=this.padding(),x=d-S*2,L=m-S*2,_=0,M=this.wrap(),w=M!==F2&&M!==S1,N=this.ellipsis();this.textArr=[],h1().font=this._getContextFont();const J=N?this._getTextWidth(Af):0;for(let q=0,G=n.length;qx)for(;V.length>0;){let F=0,ot=yu(V).length,ut="",at=0;for(;F>>1,Rt=yu(V).slice(0,mt+1).join(""),zt=this._getTextWidth(Rt);(N&&y&&_+r>L?zt+J:zt)<=x?(F=mt+1,ut=Rt,at=zt):ot=mt}if(ut){if(w){const mt=yu(V),Rt=yu(ut),zt=mt[Rt.length],Gt=zt===Ld||zt===g1;let jt;if(Gt&&at<=x)jt=Rt.length;else{const Ht=Rt.lastIndexOf(Ld),Mt=Rt.lastIndexOf(g1);jt=Math.max(Ht,Mt)+1}jt>0&&(F=jt,ut=mt.slice(0,F).join(""),at=this._getTextWidth(ut))}if(ut=ut.trimRight(),this._addTextLine(ut),u=Math.max(u,at),_+=r,this._shouldHandleEllipsis(_)){this._tryToAddEllipsisToLastLine();break}if(V=yu(V).slice(F).join("").trimLeft(),V.length>0&&(U=this._getTextWidth(V),U<=x)){this._addTextLine(V),_+=r,u=Math.max(u,U);break}}else break}else this._addTextLine(V),_+=r,u=Math.max(u,U),this._shouldHandleEllipsis(_)&&qL)break}this.textHeight=s,this.textWidth=u}_shouldHandleEllipsis(n){const s=+this.fontSize(),u=this.lineHeight()*s,r=this.attrs.height,d=r!==Oc&&r!==void 0,m=r-this.padding()*2;return this.wrap()===S1||d&&n+u>m}_tryToAddEllipsisToLastLine(){const n=this.attrs.width,s=n!==Oc&&n!==void 0,u=n-this.padding()*2,r=this.ellipsis(),d=this.textArr[this.textArr.length-1];!d||!r||(s&&(this._getTextWidth(d.text+Af){ha(),re(),Va(),o1(),$2(),ge(),Ce(),ap="",L1="normal",Ca=class extends ht{constructor(n){super(n),this.dummyCanvas=Z.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 directionChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return en.getPathLength(this.dataArray)}_getPointAtLength(n){return!this.attrs.data||n>this.pathLength?null:en.getPointAtLengthOfDataArray(n,this.dataArray)}_readDataAttribute(){this.dataArray=en.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(n){n.setAttr("font",this._getContextFont()),n.setAttr("textBaseline",this.textBaseline()),n.setAttr("textAlign","left"),n.save();const s=this.textDecoration(),u=this.fill(),r=this.fontSize(),d=this.glyphInfo,m=s.indexOf("underline")!==-1,p=s.indexOf("line-through")!==-1;m&&n.beginPath();for(let y=0;y=1){const u=s[0].p0;n.moveTo(u.x,u.y)}for(let u=0;uthis.pathLength&&q-this.pathLength<=S?this.pathLength:q);if(!G)return;const V=en.getLineLength(w.x,w.y,G.x,G.y);let U=0;if(y)try{U=y(s[M-1].char,N)*this.fontSize()}catch{U=0}w.x+=U,G.x+=U,this.textWidth+=U;const F=en.getPointOnLine(U+V/2,w.x,w.y,G.x,G.y),ot=Math.atan2(G.y-w.y,G.x-w.x);this.glyphInfo.push({transposeX:F.x,transposeY:F.y,text:n[M],rotation:ot,p0:w,p1:G,width:V}),_+=J}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};const n=[];this.glyphInfo.forEach(function(S){n.push(S.p0.x),n.push(S.p0.y),n.push(S.p1.x),n.push(S.p1.y)});let s=n[0]||0,u=n[0]||0,r=n[1]||0,d=n[1]||0,m,p;for(let S=0;S{ha(),re(),Sa(),Va(),J2(),t1(),Ce(),ge(),x1="tr-konva",np=["resizeEnabledChange","rotateAnchorOffsetChange","rotateAnchorAngleChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(n=>n+`.${x1}`).join(" "),_1="nodesRect",lp=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange","draggableChange"],sp={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},up="ontouchstart"in vt._global,xd=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],E1=1e8,Of=0,de=class extends Tc{constructor(n){super(n),this._movingAnchorName=null,this._transforming=!1,this._elementsCreated=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(np,this.update),this.getNode()&&this.update()}attachTo(n){return this.setNode(n),this}setNode(n){return Z.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([n])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return x1+this._id}setNodes(n=[]){this._nodes&&this._nodes.length&&this.detach();const s=n.filter(u=>u.isAncestorOf(this)?(Z.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);return this._nodes=n=s,n.length===1&&this.useSingleNodeRotation()?this.rotation(n[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(u=>{const r=()=>{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 d=u._attrsAffectingSize.map(m=>m+"Change."+this._getEventNamespace()).join(" ");u.on(d,r)}u.on(lp.map(d=>d+`.${this._getEventNamespace()}`).join(" "),r),u.on(`absoluteTransformChange.${this._getEventNamespace()}`,r),this._proxyDrag(u)}),this._resetTransformCache(),this.findOne(".top-left")&&this.update(),this}_proxyDrag(n){let s;n.on(`dragstart.${this._getEventNamespace()}`,u=>{s=n.getAbsolutePosition(),!this.isDragging()&&n!==this.findOne(".back")&&this.startDrag(u,!1)}),n.on(`dragmove.${this._getEventNamespace()}`,u=>{if(!s)return;const r=n.getAbsolutePosition(),d=r.x-s.x,m=r.y-s.y;this.nodes().forEach(p=>{if(p===n||p.isDragging())return;const y=p.getAbsolutePosition();p.setAbsolutePosition({x:y.x+d,y:y.y+m}),p.startDrag(u)}),s=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(n=>{n.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(_1),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(_1,this.__getNodeRect)}__getNodeShape(n,s=this.rotation(),u){const r=n.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),d=n.getAbsoluteScale(u),m=n.getAbsolutePosition(u),p=r.x*d.x-n.offsetX()*d.x,y=r.y*d.y-n.offsetY()*d.y,S=(vt.getAngle(n.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2);return ip({x:m.x+p*Math.cos(S)+y*Math.sin(-S),y:m.y+y*Math.cos(S)+p*Math.sin(S),width:r.width*d.x,height:r.height*d.y,rotation:S},-vt.getAngle(s),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-E1,y:-E1,width:0,height:0,rotation:0};const n=[];this.nodes().map(y=>{const S=y.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),x=[{x:S.x,y:S.y},{x:S.x+S.width,y:S.y},{x:S.x+S.width,y:S.y+S.height},{x:S.x,y:S.y+S.height}],L=y.getAbsoluteTransform();x.forEach(function(_){const M=L.point(_);n.push(M)})});const s=new xn;s.rotate(-vt.getAngle(this.rotation()));let u=1/0,r=1/0,d=-1/0,m=-1/0;n.forEach(function(y){const S=s.point(y);u===void 0&&(u=d=S.x,r=m=S.y),u=Math.min(u,S.x),r=Math.min(r,S.y),d=Math.max(d,S.x),m=Math.max(m,S.y)}),s.invert();const p=s.point({x:u,y:r});return{x:p.x,y:p.y,width:d-u,height:m-r,rotation:vt.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(),xd.forEach(n=>{this._createAnchor(n)}),this._createAnchor("rotater"),this._elementsCreated=!0}_createAnchor(n){const s=new Bo({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:n+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:up?10:"auto"}),u=this;s.on("mousedown touchstart",function(r){u._handleMouseDown(r)}),s.on("dragstart",r=>{s.stopDrag(),r.cancelBubble=!0}),s.on("dragend",r=>{r.cancelBubble=!0}),s.on("mouseenter",()=>{const r=ty(n,vt.getAngle(this.rotation()),this.rotateAnchorCursor());s.getStage().content&&(s.getStage().content.style.cursor=r),this._cursorChange=!0}),s.on("mouseout",()=>{s.getStage().content&&(s.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(s)}_createBack(){const n=new ht({name:"back",width:0,height:0,sceneFunc(s,u){const r=u.getParent(),d=r.padding(),m=u.width(),p=u.height();if(s.beginPath(),s.rect(-d,-d,m+d*2,p+d*2),r.rotateEnabled()&&r.rotateLineVisible()){const y=r.rotateAnchorAngle(),S=r.rotateAnchorOffset(),x=Z.degToRad(y),L=Math.sin(x),_=-Math.cos(x),M=m/2,w=p/2;let N=1/0;_<0?N=Math.min(N,-w/_):_>0&&(N=Math.min(N,(p-w)/_)),L<0?N=Math.min(N,-M/L):L>0&&(N=Math.min(N,(m-M)/L));const J=M+L*N,q=w+_*N,G=Z._sign(p),V=J+L*S*G,U=q+_*S*G;s.moveTo(J,q),s.lineTo(V,U)}s.fillStrokeShape(u)},hitFunc:(s,u)=>{if(!this.shouldOverdrawWholeArea())return;const r=this.padding();s.beginPath(),s.rect(-r,-r,u.width()+r*2,u.height()+r*2),s.fillStrokeShape(u)}});this.add(n),this._proxyDrag(n),n.on("dragstart",s=>{s.cancelBubble=!0}),n.on("dragmove",s=>{s.cancelBubble=!0}),n.on("dragend",s=>{s.cancelBubble=!0}),this.on("dragmove",s=>{this.update()})}_handleMouseDown(n){if(this._transforming)return;this._movingAnchorName=n.target.name().split(" ")[0];const s=this._getNodeRect(),u=s.width,r=s.height,d=Math.sqrt(Math.pow(u,2)+Math.pow(r,2));this.sin=Math.abs(r/d),this.cos=Math.abs(u/d),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 m=n.target.getAbsolutePosition(),p=n.target.getStage().getPointerPosition();this._anchorDragOffset={x:p.x-m.x,y:p.y-m.y},Of++,this._fire("transformstart",{evt:n.evt,target:this.getNode()}),this._nodes.forEach(y=>{y._fire("transformstart",{evt:n.evt,target:y})})}_handleMouseMove(n){let s,u,r;const d=this.findOne("."+this._movingAnchorName),m=d.getStage();m.setPointersPositions(n);const p=m.getPointerPosition();let y={x:p.x-this._anchorDragOffset.x,y:p.y-this._anchorDragOffset.y};const S=d.getAbsolutePosition();this.anchorDragBoundFunc()&&(y=this.anchorDragBoundFunc()(S,y,n)),d.setAbsolutePosition(y);const x=d.getAbsolutePosition();if(S.x===x.x&&S.y===x.y)return;if(this._movingAnchorName==="rotater"){const G=this._getNodeRect();s=d.x()-G.width/2,u=-d.y()+G.height/2;const V=vt.getAngle(this.rotateAnchorAngle());let U=Math.atan2(-u,s)+Math.PI/2-V;G.height<0&&(U-=Math.PI);const F=vt.getAngle(this.rotation())+U,ot=vt.getAngle(this.rotationSnapTolerance()),ut=ay(G,iy(this.rotationSnaps(),F,ot)-G.rotation);this._fitNodesInto(ut,n);return}const L=this.shiftBehavior();let _;L==="inverted"?_=this.keepRatio()&&!n.shiftKey:L==="none"?_=this.keepRatio():_=this.keepRatio()||n.shiftKey;let M=this.centeredScaling()||n.altKey;if(this._movingAnchorName==="top-left"){if(_){const G=M?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};r=Math.sqrt(Math.pow(G.x-d.x(),2)+Math.pow(G.y-d.y(),2));const V=this.findOne(".top-left").x()>G.x?-1:1,U=this.findOne(".top-left").y()>G.y?-1:1;s=r*this.cos*V,u=r*this.sin*U,this.findOne(".top-left").x(G.x-s),this.findOne(".top-left").y(G.y-u)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(d.y());else if(this._movingAnchorName==="top-right"){if(_){const G=M?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};r=Math.sqrt(Math.pow(d.x()-G.x,2)+Math.pow(G.y-d.y(),2));const V=this.findOne(".top-right").x()G.y?-1:1;s=r*this.cos*V,u=r*this.sin*U,this.findOne(".top-right").x(G.x+s),this.findOne(".top-right").y(G.y-u)}var w=d.position();this.findOne(".top-left").y(w.y),this.findOne(".bottom-right").x(w.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(d.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(d.x());else if(this._movingAnchorName==="bottom-left"){if(_){const G=M?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};r=Math.sqrt(Math.pow(G.x-d.x(),2)+Math.pow(d.y()-G.y,2));const V=G.x{var d;r._fire("transformend",{evt:n,target:r}),(d=r.getLayer())===null||d===void 0||d.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(n,s){const u=this._getNodeRect(),r=1;if(Z._inRange(n.width,-this.padding()*2-r,r)){this.update();return}if(Z._inRange(n.height,-this.padding()*2-r,r)){this.update();return}const d=new xn;if(d.rotate(vt.getAngle(this.rotation())),this._movingAnchorName&&n.width<0&&this._movingAnchorName.indexOf("left")>=0){const _=d.point({x:-this.padding()*2,y:0});n.x+=_.x,n.y+=_.y,n.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=_.x,this._anchorDragOffset.y-=_.y}else if(this._movingAnchorName&&n.width<0&&this._movingAnchorName.indexOf("right")>=0){const _=d.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=_.x,this._anchorDragOffset.y-=_.y,n.width+=this.padding()*2}if(this._movingAnchorName&&n.height<0&&this._movingAnchorName.indexOf("top")>=0){const _=d.point({x:0,y:-this.padding()*2});n.x+=_.x,n.y+=_.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=_.x,this._anchorDragOffset.y-=_.y,n.height+=this.padding()*2}else if(this._movingAnchorName&&n.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const _=d.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=_.x,this._anchorDragOffset.y-=_.y,n.height+=this.padding()*2}if(this.boundBoxFunc()){const _=this.boundBoxFunc()(u,n);_?n=_:Z.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const m=1e7,p=new xn;p.translate(u.x,u.y),p.rotate(u.rotation),p.scale(u.width/m,u.height/m);const y=new xn,S=n.width/m,x=n.height/m;this.flipEnabled()===!1?(y.translate(n.x,n.y),y.rotate(n.rotation),y.translate(n.width<0?n.width:0,n.height<0?n.height:0),y.scale(Math.abs(S),Math.abs(x))):(y.translate(n.x,n.y),y.rotate(n.rotation),y.scale(S,x));const L=y.multiply(p.invert());this._nodes.forEach(_=>{var M;if(!_.getStage())return;const w=_.getParent().getAbsoluteTransform(),N=_.getTransform().copy();N.translate(_.offsetX(),_.offsetY());const J=new xn;J.multiply(w.copy().invert()).multiply(L).multiply(w).multiply(N);const q=J.decompose();_.setAttrs(q),(M=_.getLayer())===null||M===void 0||M.batchDraw()}),this.rotation(Z._getRotation(n.rotation)),this._nodes.forEach(_=>{this._fire("transform",{evt:s,target:_}),_._fire("transform",{evt:s,target:_})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(n,s){this.findOne(n).setAttrs(s)}update(){var n;const s=this._getNodeRect();this.rotation(Z._getRotation(s.rotation));const u=s.width,r=s.height,d=this.enabledAnchors(),m=this.resizeEnabled(),p=this.padding(),y=this.anchorSize(),S=this.find("._anchor");S.forEach(ot=>{ot.setAttrs({width:y,height:y,offsetX:y/2,offsetY:y/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:y/2+p,offsetY:y/2+p,visible:m&&d.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:u/2,y:0,offsetY:y/2+p,visible:m&&d.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:u,y:0,offsetX:y/2-p,offsetY:y/2+p,visible:m&&d.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:r/2,offsetX:y/2+p,visible:m&&d.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:u,y:r/2,offsetX:y/2-p,visible:m&&d.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:r,offsetX:y/2+p,offsetY:y/2-p,visible:m&&d.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:u/2,y:r,offsetY:y/2-p,visible:m&&d.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:u,y:r,offsetX:y/2-p,offsetY:y/2-p,visible:m&&d.indexOf("bottom-right")>=0});const x=this.rotateAnchorAngle(),L=this.rotateAnchorOffset(),_=Z.degToRad(x),M=Math.sin(_),w=-Math.cos(_),N=u/2,J=r/2;let q=1/0;w<0?q=Math.min(q,-J/w):w>0&&(q=Math.min(q,(r-J)/w)),M<0?q=Math.min(q,-N/M):M>0&&(q=Math.min(q,(u-N)/M));const G=N+M*q,V=J+w*q,U=Z._sign(r);this._batchChangeChild(".rotater",{x:G+M*L*U,y:V+w*L*U-p*w,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:u,height:r,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),draggable:this.nodes().some(ot=>ot.draggable()),x:0,y:0});const F=this.anchorStyleFunc();F&&S.forEach(ot=>{F(ot)}),(n=this.getLayer())===null||n===void 0||n.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();const n=this.findOne("."+this._movingAnchorName);n&&n.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),Tc.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}add(...n){return this._elementsCreated?(Z.error("You cannot add external nodes to the Transformer. Use tr.nodes([node]) instead."),this):super.add(...n)}toObject(){return bt.prototype.toObject.call(this)}clone(n){return bt.prototype.clone.call(this,n)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}},de.isTransforming=()=>Of>0,de.prototype.className="Transformer",$e(de),A.addGetterSetter(de,"enabledAnchors",xd,ny),A.addGetterSetter(de,"flipEnabled",!0,$n()),A.addGetterSetter(de,"resizeEnabled",!0),A.addGetterSetter(de,"anchorSize",10,gt()),A.addGetterSetter(de,"rotateEnabled",!0),A.addGetterSetter(de,"rotateLineVisible",!0),A.addGetterSetter(de,"rotationSnaps",[]),A.addGetterSetter(de,"rotateAnchorOffset",50,gt()),A.addGetterSetter(de,"rotateAnchorAngle",0,gt()),A.addGetterSetter(de,"rotateAnchorCursor","crosshair"),A.addGetterSetter(de,"rotationSnapTolerance",5,gt()),A.addGetterSetter(de,"borderEnabled",!0),A.addGetterSetter(de,"anchorStroke","rgb(0, 161, 255)"),A.addGetterSetter(de,"anchorStrokeWidth",1,gt()),A.addGetterSetter(de,"anchorFill","white"),A.addGetterSetter(de,"anchorCornerRadius",0,gt()),A.addGetterSetter(de,"borderStroke","rgb(0, 161, 255)"),A.addGetterSetter(de,"borderStrokeWidth",1,gt()),A.addGetterSetter(de,"borderDash"),A.addGetterSetter(de,"keepRatio",!0),A.addGetterSetter(de,"shiftBehavior","default"),A.addGetterSetter(de,"centeredScaling",!1),A.addGetterSetter(de,"ignoreStroke",!1),A.addGetterSetter(de,"padding",0,gt()),A.addGetterSetter(de,"nodes"),A.addGetterSetter(de,"node"),A.addGetterSetter(de,"boundBoxFunc"),A.addGetterSetter(de,"anchorDragBoundFunc"),A.addGetterSetter(de,"anchorStyleFunc"),A.addGetterSetter(de,"shouldOverdrawWholeArea",!1),A.addGetterSetter(de,"useSingleNodeRotation",!0),A.backCompat(de,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"})})),Hl,sy=Et((()=>{re(),Va(),Ce(),ge(),Hl=class extends ht{_sceneFunc(n){n.beginPath(),n.arc(0,0,this.radius(),0,vt.getAngle(this.angle()),this.clockwise()),n.lineTo(0,0),n.closePath(),n.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(n){this.radius(n/2)}setHeight(n){this.radius(n/2)}},Hl.prototype.className="Wedge",Hl.prototype._centroid=!0,Hl.prototype._attrsAffectingSize=["radius"],$e(Hl),A.addGetterSetter(Hl,"radius",0,gt()),A.addGetterSetter(Hl,"angle",0,gt()),A.addGetterSetter(Hl,"clockwise",!1),A.backCompat(Hl,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"})}));function cp(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}function uy(n,s){const u=n.data,r=n.width,d=n.height;let m,p,y,S,x,L,_,M,w,N,J,q,G,V,U,F,ot,ut,at,mt;const Rt=s+s+1,zt=r-1,Gt=d-1,jt=s+1,Ht=jt*(jt+1)/2,Mt=new cp,Lt=op[s],lt=rp[s];let nt=null,et=Mt,Ct=null,Nt=null;for(let te=1;te>lt,at!==0?(at=255/at,u[p]=(S*Lt>>lt)*at,u[p+1]=(x*Lt>>lt)*at,u[p+2]=(L*Lt>>lt)*at):u[p]=u[p+1]=u[p+2]=0,S-=M,x-=w,L-=N,_-=J,M-=Ct.r,w-=Ct.g,N-=Ct.b,J-=Ct.a,m=y+((m=j+s+1)>lt,at>0?(at=255/at,u[m]=(S*Lt>>lt)*at,u[m+1]=(x*Lt>>lt)*at,u[m+2]=(L*Lt>>lt)*at):u[m]=u[m+1]=u[m+2]=0,S-=M,x-=w,L-=N,_-=J,M-=Ct.r,w-=Ct.g,N-=Ct.b,J-=Ct.a,m=te+((m=tt+jt){re(),Sa(),ge(),op=[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],rp=[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],dp=function(s){const u=Math.round(this.blurRadius());u>0&&uy(s,u)},A.addGetterSetter(bt,"blurRadius",0,gt(),A.afterSetFilter)})),hp,oy=Et((()=>{re(),Sa(),ge(),hp=function(n){const s=this.brightness()*255,u=n.data,r=u.length;for(let d=0;d{fp=function(n){const s=this.brightness(),u=n.data,r=u.length;for(let d=0;d{re(),Sa(),ge(),mp=function(n){const s=Math.pow((this.contrast()+100)/100,2),u=n.data,r=u.length;let d=150,m=150,p=150;for(let y=0;y255?255:d,m=m<0?0:m>255?255:m,p=p<0?0:p>255?255:p,u[y]=d,u[y+1]=m,u[y+2]=p},A.addGetterSetter(bt,"contrast",0,gt(),A.afterSetFilter)})),gp,hy=Et((()=>{re(),Sa(),ge(),gp=function(n){var s,u,r,d,m,p,y,S,x;const L=n.data,_=n.width,M=n.height,w=Math.min(1,Math.max(0,(u=(s=this.embossStrength)===null||s===void 0?void 0:s.call(this))!==null&&u!==void 0?u:.5)),N=Math.min(1,Math.max(0,(d=(r=this.embossWhiteLevel)===null||r===void 0?void 0:r.call(this))!==null&&d!==void 0?d:.5)),J=(y={"top-left":315,top:270,"top-right":225,right:180,"bottom-right":135,bottom:90,"bottom-left":45,left:0}[(p=(m=this.embossDirection)===null||m===void 0?void 0:m.call(this))!==null&&p!==void 0?p:"top-left"])!==null&&y!==void 0?y:315,q=!!((x=(S=this.embossBlend)===null||S===void 0?void 0:S.call(this))!==null&&x!==void 0&&x),G=w*10,V=N*255,U=J*Math.PI/180,F=Math.cos(U),ot=Math.sin(U),ut=128/1020*G,at=new Uint8ClampedArray(L),mt=new Float32Array(_*M);for(let Ht=0,Mt=0;MtHt<0?0:Ht>255?255:Ht;for(let Ht=1;Ht{re(),Sa(),ge(),pp=function(n){const s=n.data,u=s.length;let r=s[0],d=r,m,p=s[1],y=p,S,x=s[2],L=x,_;const M=this.enhance();if(M===0)return;for(let U=0;Ud&&(d=m),S=s[U+1],Sy&&(y=S),_=s[U+2],_L&&(L=_);d===r&&(d=255,r=0),y===p&&(y=255,p=0),L===x&&(L=255,x=0);let w,N,J,q,G,V;if(M>0)w=d+M*(255-d),N=r-M*(r-0),J=y+M*(255-y),q=p-M*(p-0),G=L+M*(255-L),V=x-M*(x-0);else{const U=(d+r)*.5;w=d+M*(d-U),N=r+M*(r-U);const F=(y+p)*.5;J=y+M*(y-F),q=p+M*(p-F);const ot=(L+x)*.5;G=L+M*(L-ot),V=x+M*(x-ot)}for(let U=0;U{vp=function(n){const s=n.data,u=s.length;for(let r=0;r{re(),Sa(),ge(),A.addGetterSetter(bt,"hue",0,gt(),A.afterSetFilter),A.addGetterSetter(bt,"saturation",0,gt(),A.afterSetFilter),A.addGetterSetter(bt,"luminance",0,gt(),A.afterSetFilter),yp=function(n){const s=n.data,u=s.length,r=1,d=Math.pow(2,this.saturation()),m=Math.abs(this.hue()+360)%360,p=this.luminance()*127,y=r*d*Math.cos(m*Math.PI/180),S=r*d*Math.sin(m*Math.PI/180),x=.299*r+.701*y+.167*S,L=.587*r-.587*y+.33*S,_=.114*r-.114*y-.497*S,M=.299*r-.299*y-.328*S,w=.587*r+.413*y+.035*S,N=.114*r-.114*y+.293*S,J=.299*r-.3*y+1.25*S,q=.587*r-.586*y-1.05*S,G=.114*r+.886*y-.2*S;let V,U,F,ot;for(let ut=0;ut{re(),Sa(),ge(),bp=function(n){const s=n.data,u=s.length,r=Math.pow(2,this.value()),d=Math.pow(2,this.saturation()),m=Math.abs(this.hue()+360)%360,p=r*d*Math.cos(m*Math.PI/180),y=r*d*Math.sin(m*Math.PI/180),S=.299*r+.701*p+.167*y,x=.587*r-.587*p+.33*y,L=.114*r-.114*p-.497*y,_=.299*r-.299*p-.328*y,M=.587*r+.413*p+.035*y,w=.114*r-.114*p+.293*y,N=.299*r-.3*p+1.25*y,J=.587*r-.586*p-1.05*y,q=.114*r+.886*p-.2*y;for(let G=0;G{Sp=function(n){const s=n.data,u=s.length;for(let r=0;r{re(),Sa(),ha(),ge(),Cp=function(n,s,u){const r=n.data,d=s.data,m=n.width,p=n.height,y=u.polarCenterX||m/2,S=u.polarCenterY||p/2;let x=Math.sqrt(y*y+S*S),L=m-y,_=p-S;const M=Math.sqrt(L*L+_*_);x=M>x?M:x;const w=p,N=m,J=360/N*Math.PI/180;for(let q=0;qx?M:x;const w=p,N=m,J=u.polarRotation||0;let q,G;for(L=0;Ls&&(F=U,ot=0,ut=-1),d=0;d=0&&w=0&&N=0&&w=0&&N=1020?255:0}return p}function _y(n,s,u){const r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],d=Math.round(Math.sqrt(r.length)),m=Math.floor(d/2),p=[];for(let y=0;y=0&&w=0&&N{re(),Sa(),ge(),_p=function(n){let s=Sy(n,this.threshold());return s&&(s=Ly(s,n.width,n.height),s=xy(s,n.width,n.height),s=_y(s,n.width,n.height),Cy(n,s)),n},A.addGetterSetter(bt,"threshold",0,gt(),A.afterSetFilter)})),Ep,zy=Et((()=>{re(),Sa(),ge(),Ep=function(n){const s=this.noise()*255,u=n.data,r=u.length,d=s/2;for(let m=0;m{re(),ha(),Sa(),ge(),zp=function(n){let s=Math.ceil(this.pixelSize()),u=n.width,r=n.height,d=Math.ceil(u/s),m=Math.ceil(r/s),p=n.data;if(s<=0){Z.error("pixelSize value can not be <= 0");return}for(let y=0;y=u))for(let U=J;U=r)continue;const F=(u*U+V)*4;x+=p[F+0],L+=p[F+1],_+=p[F+2],M+=p[F+3],G+=1}x=x/G,L=L/G,_=_/G,M=M/G;for(let V=w;V=u))for(let U=J;U=r)continue;const F=(u*U+V)*4;p[F+0]=x,p[F+1]=L,p[F+2]=_,p[F+3]=M}}},A.addGetterSetter(bt,"pixelSize",8,gt(),A.afterSetFilter)})),Mp,Ny=Et((()=>{re(),Sa(),ge(),Mp=function(n){const s=Math.round(this.levels()*254)+1,u=n.data,r=u.length,d=255/s;for(let m=0;m{re(),Sa(),ge(),Np=function(n){const s=n.data,u=s.length,r=this.red(),d=this.green(),m=this.blue();for(let p=0;p255?255:n<0?0:Math.round(n)}),A.addGetterSetter(bt,"green",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),A.addGetterSetter(bt,"blue",0,$g,A.afterSetFilter)})),Tp,Ay=Et((()=>{re(),Sa(),ge(),Tp=function(n){const s=n.data,u=s.length,r=this.red(),d=this.green(),m=this.blue(),p=this.alpha();for(let y=0;y255?255:n<0?0:Math.round(n)}),A.addGetterSetter(bt,"green",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),A.addGetterSetter(bt,"blue",0,$g,A.afterSetFilter),A.addGetterSetter(bt,"alpha",1,function(n){return this._filterUpToDate=!1,n>1?1:n<0?0:n})})),Ap,wy=Et((()=>{Ap=function(n){const s=n.data,u=s.length;for(let r=0;r{wp=function(n){const u=n.data;for(let r=0;r=128&&(u[r]=255-d,u[r+1]=255-m,u[r+2]=255-p)}return n}})),Op,Yy=Et((()=>{re(),Sa(),ge(),Op=function(n){const s=this.threshold()*255,u=n.data,r=u.length;for(let d=0;d{O2(),j4(),I4(),Z4(),J4(),B4(),X4(),R2(),o1(),J2(),U4(),V4(),W4(),Q4(),$2(),$4(),ly(),sy(),cy(),oy(),ry(),dy(),hy(),fy(),my(),gy(),py(),vy(),yy(),Ey(),zy(),My(),Ny(),Ty(),Ay(),wy(),Oy(),Yy(),Ry=xf.Util._assign(xf,{Arc:jl,Arrow:gu,Circle:wc,Ellipse:_s,Image:_n,Label:Tf,Tag:pu,Line:Gl,Path:en,Rect:Bo,RegularPolygon:Es,Ring:vu,Sprite:tl,Star:zs,Text:De,TextPath:Ca,Transformer:de,Wedge:Hl,Filters:{Blur:dp,Brightness:fp,Brighten:hp,Contrast:mp,Emboss:gp,Enhance:pp,Grayscale:vp,HSL:yp,HSV:bp,Invert:Sp,Kaleidoscope:xp,Mask:_p,Noise:Ep,Pixelate:zp,Posterize:Mp,RGB:Np,RGBA:Tp,Sepia:Ap,Solarize:wp,Threshold:Op}})})),Gy=Et((()=>{jy()})),Ed,Yp=Et((()=>{O2(),Ed=xf})),Hy=Di(((n,s)=>{s.exports=function(u){function r(a,i,o,h){return new oh(a,i,o,h)}function d(){}function m(a){var i="https://react.dev/errors/"+a;if(1us||(a.current=Vr[us],Vr[us]=null,us--)}function J(a,i){us++,Vr[us]=a.current,a.current=i}function q(a){return a>>>=0,a===0?32:31-(F0(a)/Jh|0)|0}function G(a){var i=a&42;if(i!==0)return i;switch(a&-a){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 a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function V(a,i,o){var h=a.pendingLanes;if(h===0)return 0;var v=0,b=a.suspendedLanes,E=a.pingedLanes;a=a.warmLanes;var R=h&134217727;return R!==0?(h=R&~b,h!==0?v=G(h):(E&=R,E!==0?v=G(E):o||(o=R&~a,o!==0&&(v=G(o))))):(R=h&~b,R!==0?v=G(R):E!==0?v=G(E):o||(o=h&~a,o!==0&&(v=G(o)))),v===0?0:i!==0&&i!==v&&(i&b)===0&&(b=v&-v,o=i&-i,b>=o||b===32&&(o&4194048)!==0)?i:v}function U(a,i){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&i)===0}function F(a,i){switch(a){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 ot(){var a=fo;return fo<<=1,(fo&62914560)===0&&(fo=4194304),a}function ut(a){for(var i=[],o=0;31>o;o++)i.push(a);return i}function at(a,i){a.pendingLanes|=i,i!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function mt(a,i,o,h,v,b){var E=a.pendingLanes;a.pendingLanes=o,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=o,a.entangledLanes&=o,a.errorRecoveryDisabledLanes&=o,a.shellSuspendCounter=0;var R=a.entanglements,P=a.expirationTimes,dt=a.hiddenUpdates;for(o=E&~o;0)":-1v||P[h]!==dt[v]){var St=` `+P[h].replace(" at new "," at ");return a.displayName&&St.includes("")&&(St=St.replace("",a.displayName)),St}while(1<=h&&0<=v);break}}}finally{qr=!1,Error.prepareStackTrace=o}return(o=a?a.displayName||a.name:"")?lt(o):""}function et(a,i){switch(a.tag){case 26:case 27:case 5:return lt(a.type);case 16:return lt("Lazy");case 13:return a.child!==i&&i!==null?lt("Suspense Fallback"):lt("Suspense");case 19:return lt("SuspenseList");case 0:case 15:return nt(a.type,!1);case 11:return nt(a.type.render,!1);case 1:return nt(a.type,!0);case 31:return lt("Activity");default:return""}}function Ct(a){try{var i="",o=null;do i+=et(a,o),o=a,a=a.return;while(a);return i}catch(h){return` Error generating stack: `+h.message+` `+h.stack}}function Nt(a,i){if(typeof a=="object"&&a!==null){var o=sc.get(a);return o!==void 0?o:(i={value:a,source:i,stack:Ct(i)},sc.set(a,i),i)}return{value:a,source:i,stack:Ct(i)}}function te(a,i){ui[Ps++]=cc,ui[Ps++]=uc,uc=a,cc=i}function j(a,i,o){bi[Si++]=gn,bi[Si++]=Ra,bi[Si++]=mn,mn=a;var h=gn;a=Ra;var v=32-si(h)-1;h&=~(1<>=E,v-=E,gn=1<<32-si(i)+v|o<me?(Ha=Zt,Zt=null):Ha=Zt.sibling;var be=xt(I,Zt,k[me],ft);if(be===null){Zt===null&&(Zt=Ha);break}a&&Zt&&be.alternate===null&&i(I,Zt),B=b(be,B,me),Xe===null?It=be:Xe.sibling=be,Xe=be,Zt=Ha}if(me===k.length)return o(I,Zt),ce&&te(I,me),It;if(Zt===null){for(;meme?(Ha=Zt,Zt=null):Ha=Zt.sibling;var Ss=xt(I,Zt,be.value,ft);if(Ss===null){Zt===null&&(Zt=Ha);break}a&&Zt&&Ss.alternate===null&&i(I,Zt),B=b(Ss,B,me),Xe===null?It=Ss:Xe.sibling=Ss,Xe=Ss,Zt=Ha}if(be.done)return o(I,Zt),ce&&te(I,me),It;if(Zt===null){for(;!be.done;me++,be=k.next())be=pt(I,be.value,ft),be!==null&&(B=b(be,B,me),Xe===null?It=be:Xe.sibling=be,Xe=be);return ce&&te(I,me),It}for(Zt=h(Zt);!be.done;me++,be=k.next())be=Vt(Zt,I,me,be.value,ft),be!==null&&(a&&be.alternate!==null&&Zt.delete(be.key===null?me:be.key),B=b(be,B,me),Xe===null?It=be:Xe.sibling=be,Xe=be);return a&&Zt.forEach(function(K1){return i(I,K1)}),ce&&te(I,me),It}function bs(I,B,k,ft){if(typeof k=="object"&&k!==null&&k.type===as&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case fn:t:{for(var It=k.key;B!==null;){if(B.key===It){if(It=k.type,It===as){if(B.tag===7){o(I,B.sibling),ft=v(B,k.props.children),ft.return=I,I=ft;break t}}else if(B.elementType===It||typeof It=="object"&&It!==null&&It.$$typeof===Ll&&wn(It)===B.type){o(I,B.sibling),ft=v(B,k.props),On(ft,k),ft.return=I,I=ft;break t}o(I,B);break}else i(I,B);B=B.sibling}k.type===as?(ft=In(k.props.children,I.mode,ft,k.key),ft.return=I,I=ft):(ft=Qu(k.type,k.key,k.props,null,I.mode,ft),On(ft,k),ft.return=I,I=ft)}return E(I);case es:t:{for(It=k.key;B!==null;){if(B.key===It)if(B.tag===4&&B.stateNode.containerInfo===k.containerInfo&&B.stateNode.implementation===k.implementation){o(I,B.sibling),ft=v(B,k.children||[]),ft.return=I,I=ft;break t}else{o(I,B);break}else i(I,B);B=B.sibling}ft=Nr(k,I.mode,ft),ft.return=I,I=ft}return E(I);case Ll:return k=wn(k),bs(I,B,k,ft)}if(Pu(k))return da(I,B,k,ft);if(_(k)){if(It=_(k),typeof It!="function")throw Error(m(150));return k=It.call(k),zo(I,B,k,ft)}if(typeof k.then=="function")return bs(I,B,Eu(k),ft);if(k.$$typeof===Zn)return bs(I,B,Na(I,k),ft);qa(I,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(k=""+k,B!==null&&B.tag===6?(o(I,B.sibling),ft=v(B,k),ft.return=I,I=ft):(o(I,B),ft=qu(k,I.mode,ft),ft.return=I,I=ft),E(I)):o(I,B)}return function(I,B,k,ft){try{ds=0;var It=bs(I,B,k,ft);return iu=null,It}catch(Zt){if(Zt===Qn||Zt===So)throw Zt;var Xe=r(29,Zt,null,I.mode);return Xe.lanes=ft,Xe.return=I,Xe}}}function ll(){for(var a=oe,i=Te=oe=0;ib?b:8);var E=Tt.T,R={};Tt.T=R,Uc(a,!1,i,o);try{var P=v(),dt=Tt.S;dt!==null&&dt(R,P),P!==null&&typeof P=="object"&&typeof P.then=="function"?Xc(a,i,ln(P,h),Xt(a)):Xc(a,i,h,Xt(a))}catch(St){Xc(a,i,{then:function(){},status:"rejected",reason:St},Xt())}finally{xa(b),E!==null&&R.types!==null&&(E.types=R.types),Tt.T=E}}function rr(a){var i=a.memoizedState;if(i!==null)return i;i={memoizedState:vi,baseState:vi,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sn,lastRenderedState:vi},next:null};var o={};return i.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sn,lastRenderedState:o},next:null},a.memoizedState=i,a=a.alternate,a!==null&&(a.memoizedState=i),i}function Dd(){return ma(Un)}function Vf(){return Ue().memoizedState}function Id(){return Ue().memoizedState}function H1(a){for(var i=a.return;i!==null;){switch(i.tag){case 24:case 3:var o=Xt();a=Ut(o);var h=ne(i,a,o);h!==null&&(Ie(h,i,o),Ta(h,i,o)),i={cache:al()},a.payload=i;return}i=i.return}}function D1(a,i,o){var h=Xt();o={lane:h,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},dr(a)?Zd(i,o):(o=Bl(a,i,o,h),o!==null&&(Ie(o,a,h),Qf(o,i,h)))}function Wf(a,i,o){Xc(a,i,o,Xt())}function Xc(a,i,o,h){var v={lane:h,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(dr(a))Zd(i,v);else{var b=a.alternate;if(a.lanes===0&&(b===null||b.lanes===0)&&(b=i.lastRenderedReducer,b!==null))try{var E=i.lastRenderedState,R=b(E,o);if(v.hasEagerState=!0,v.eagerState=R,Gi(R,E))return Jl(a,i,v,0),we===null&&ll(),!1}catch{}if(o=Bl(a,i,v,h),o!==null)return Ie(o,a,h),Qf(o,i,h),!0}return!1}function Uc(a,i,o,h){if(h={lane:2,revertLane:xu(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},dr(a)){if(i)throw Error(m(479))}else i=Bl(a,o,h,2),i!==null&&Ie(i,a,2)}function dr(a){var i=a.alternate;return a===At||i!==null&&i===At}function Zd(a,i){ja=oc=!0;var o=a.pending;o===null?i.next=i:(i.next=o.next,o.next=i),a.pending=i}function Qf(a,i,o){if((o&4194048)!==0){var h=i.lanes;h&=a.pendingLanes,o|=h,i.lanes=o,zt(a,o)}}function Jd(a,i,o,h){i=a.memoizedState,o=o(h,i),o=o==null?i:Sl({},i,o),a.memoizedState=o,a.lanes===0&&(a.updateQueue.baseState=o)}function qf(a,i,o,h,v,b,E){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(h,b,E):i.prototype&&i.prototype.isPureReactComponent?!An(o,h)||!An(v,b):!0}function Kf(a,i,o,h){a=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(o,h),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(o,h),i.state!==a&&ra.enqueueReplaceState(i,i.state,null)}function Os(a,i){var o=i;if("ref"in i){o={};for(var h in i)h!=="ref"&&(o[h]=i[h])}if(a=a.defaultProps){o===i&&(o=Sl({},o));for(var v in a)o[v]===void 0&&(o[v]=a[v])}return o}function ju(a,i){try{var o=a.onUncaughtError;o(i.value,{componentStack:i.stack})}catch(h){setTimeout(function(){throw h})}}function Gu(a,i,o){try{var h=a.onCaughtError;h(o.value,{componentStack:o.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function Bd(a,i,o){return o=Ut(o),o.tag=3,o.payload={element:null},o.callback=function(){ju(a,i)},o}function Xd(a){return a=Ut(a),a.tag=3,a}function Ud(a,i,o,h){var v=o.type.getDerivedStateFromError;if(typeof v=="function"){var b=h.value;a.payload=function(){return v(b)},a.callback=function(){Gu(i,o,h)}}var E=o.stateNode;E!==null&&typeof E.componentDidCatch=="function"&&(a.callback=function(){Gu(i,o,h),typeof v!="function"&&(wl===null?wl=new Set([this]):wl.add(this));var R=h.stack;this.componentDidCatch(h.value,{componentStack:R!==null?R:""})})}function kf(a,i,o,h,v){if(o.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(i=o.alternate,i!==null&&ii(i,o,v,!0),o=va.current,o!==null){switch(o.tag){case 31:case 13:return Ba===null?dn():o.alternate===null&&Be===0&&(Be=3),o.flags&=-257,o.flags|=65536,o.lanes=v,h===Co?o.flags|=16384:(i=o.updateQueue,i===null?o.updateQueue=new Set([h]):i.add(h),$l(a,h,v)),!1;case 22:return o.flags|=65536,h===Co?o.flags|=16384:(i=o.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([h])},o.updateQueue=i):(o=i.retryQueue,o===null?i.retryQueue=new Set([h]):o.add(h)),$l(a,h,v)),!1}throw Error(m(435,o.tag))}return $l(a,h,v),dn(),!1}if(ce)return i=va.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=v,h!==pn&&(a=Error(m(422),{cause:h}),aa(Nt(a,o)))):(h!==pn&&(i=Error(m(423),{cause:h}),aa(Nt(i,o))),a=a.current.alternate,a.flags|=65536,v&=-v,a.lanes|=v,h=Nt(h,o),v=Bd(a.stateNode,h,v),hi(a,v),Be!==4&&(Be=2)),!1;var b=Error(m(520),{cause:h});if(b=Nt(b,o),gc===null?gc=[b]:gc.push(b),Be!==4&&(Be=2),i===null)return!0;h=Nt(h,o),o=i;do{switch(o.tag){case 3:return o.flags|=65536,a=v&-v,o.lanes|=a,a=Bd(o.stateNode,h,a),hi(o,a),!1;case 1:if(i=o.type,b=o.stateNode,(o.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(wl===null||!wl.has(b))))return o.flags|=65536,v&=-v,o.lanes|=v,v=Xd(v),Ud(v,a,o,h),hi(o,v),!1}o=o.return}while(o!==null);return!1}function Aa(a,i,o,h){i.child=a===null?$0(i,null,o,h):hs(i,a.child,o,h)}function Vd(a,i,o,h,v){o=o.render;var b=i.ref;if("ref"in h){var E={};for(var R in h)R!=="ref"&&(E[R]=h[R])}else E=h;return En(i),h=Mu(a,i,o,E,b,v),R=$o(),a!==null&&!Je?(Ad(a,i,v),na(a,i,v)):(ce&&R&&tt(i),i.flags|=1,Aa(a,i,h,v),i.child)}function Ys(a,i,o,h,v){if(a===null){var b=o.type;return typeof b=="function"&&!Wu(b)&&b.defaultProps===void 0&&o.compare===null?(i.tag=15,i.type=b,Ff(a,i,b,h,v)):(a=Qu(o.type,null,h,i,i.mode,v),a.ref=i.ref,a.return=i,i.child=a)}if(b=a.child,!Rs(a,v)){var E=b.memoizedProps;if(o=o.compare,o=o!==null?o:An,o(E,h)&&a.ref===i.ref)return na(a,i,v)}return i.flags|=1,a=Dn(b,h),a.ref=i.ref,a.return=i,i.child=a}function Ff(a,i,o,h,v){if(a!==null){var b=a.memoizedProps;if(An(b,h)&&a.ref===i.ref)if(Je=!1,i.pendingProps=h=b,Rs(a,v))(a.flags&131072)!==0&&(Je=!0);else return i.lanes=a.lanes,na(a,i,v)}return Du(a,i,o,h,v)}function Pf(a,i,o,h){var v=h.children,b=a!==null?a.memoizedState:null;if(a===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((i.flags&128)!==0){if(b=b!==null?b.baseLanes|o:o,a!==null){for(h=i.child=a.child,v=0;h!==null;)v=v|h.lanes|h.childLanes,h=h.sibling;h=v&~b}else h=0,i.child=null;return Wd(a,i,b,o,h)}if((o&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},a!==null&&Nn(i,b!==null?b.cachePool:null),b!==null?zu(i,b):Xl(),Ul(i);else return h=i.lanes=536870912,Wd(a,i,b!==null?b.baseLanes|o:o,o,h)}else b!==null?(Nn(i,b.cachePool),zu(i,b),Mi(i),i.memoizedState=null):(a!==null&&Nn(i,null),Xl(),Mi(i));return Aa(a,i,v,o),i.child}function Vc(a,i){return a!==null&&a.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Wd(a,i,o,h,v){var b=Bi();return b=b===null?null:{parent:Yi?ye._currentValue:ye._currentValue2,pool:b},i.memoizedState={baseLanes:o,cachePool:b},a!==null&&Nn(i,null),Xl(),Ul(i),a!==null&&ii(a,i,h,!0),i.childLanes=v,null}function Wc(a,i){return i=pr({mode:i.mode,children:i.children},a.mode),i.ref=a.ref,a.child=i,i.return=a,i}function Hu(a,i,o){return hs(i,a.child,null,o),a=Wc(i,i.pendingProps),a.flags|=2,Ni(i),i.memoizedState=null,a}function Qc(a,i,o){var h=i.pendingProps,v=(i.flags&128)!==0;if(i.flags&=-129,a===null){if(ce){if(h.mode==="hidden")return a=Wc(i,h),i.lanes=536870912,Vc(null,a);if(Po(i),(a=We)?(a=V1(a,Ze),a!==null&&(i.memoizedState={dehydrated:a,treeContext:mn!==null?{id:gn,overflow:Ra}:null,retryLane:536870912,hydrationErrors:null},o=rh(a),o.return=i,i.child=o,Ja=i,We=null)):a=null,a===null)throw he(i);return i.lanes=536870912,null}return Wc(i,h)}var b=a.memoizedState;if(b!==null){var E=b.dehydrated;if(Po(i),v)if(i.flags&256)i.flags&=-257,i=Hu(a,i,o);else if(i.memoizedState!==null)i.child=a.child,i.flags|=128,i=null;else throw Error(m(558));else if(Je||ii(a,i,o,!1),v=(o&a.childLanes)!==0,Je||v){if(h=we,h!==null&&(E=Gt(h,o),E!==0&&E!==b.retryLane))throw b.retryLane=E,Xi(a,E),Ie(h,a,E),qn;dn(),i=Hu(a,i,o)}else a=b.treeContext,se&&(We=j0(E),Ja=i,ce=!0,Le=null,Ze=!1,a!==null&&Ot(i,a)),i=Wc(i,h),i.flags|=4096;return i}return a=Dn(a.child,{mode:h.mode,children:h.children}),a.ref=i.ref,i.child=a,a.return=i,a}function hr(a,i){var o=i.ref;if(o===null)a!==null&&a.ref!==null&&(i.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(m(284));(a===null||a.ref!==o)&&(i.flags|=4194816)}}function Du(a,i,o,h,v){return En(i),o=Mu(a,i,o,h,void 0,v),h=$o(),a!==null&&!Je?(Ad(a,i,v),na(a,i,v)):(ce&&h&&tt(i),i.flags|=1,Aa(a,i,o,v),i.child)}function Qd(a,i,o,h,v,b){return En(i),i.updateQueue=null,o=Yn(i,h,o,v),Gc(a),h=$o(),a!==null&&!Je?(Ad(a,i,b),na(a,i,b)):(ce&&h&&tt(i),i.flags|=1,Aa(a,i,o,b),i.child)}function qd(a,i,o,h,v){if(En(i),i.stateNode===null){var b=cs,E=o.contextType;typeof E=="object"&&E!==null&&(b=ma(E)),b=new o(h,b),i.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=ra,i.stateNode=b,b._reactInternals=i,b=i.stateNode,b.props=h,b.state=i.memoizedState,b.refs={},rt(i),E=o.contextType,b.context=typeof E=="object"&&E!==null?ma(E):cs,b.state=i.memoizedState,E=o.getDerivedStateFromProps,typeof E=="function"&&(Jd(i,o,E,h),b.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(E=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),E!==b.state&&ra.enqueueReplaceState(b,b.state,null),Ia(i,h,b,v),zi(),b.state=i.memoizedState),typeof b.componentDidMount=="function"&&(i.flags|=4194308),h=!0}else if(a===null){b=i.stateNode;var R=i.memoizedProps,P=Os(o,R);b.props=P;var dt=b.context,St=o.contextType;E=cs,typeof St=="object"&&St!==null&&(E=ma(St));var pt=o.getDerivedStateFromProps;St=typeof pt=="function"||typeof b.getSnapshotBeforeUpdate=="function",R=i.pendingProps!==R,St||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(R||dt!==E)&&Kf(i,b,h,E),qt=!1;var xt=i.memoizedState;b.state=xt,Ia(i,h,b,v),zi(),dt=i.memoizedState,R||xt!==dt||qt?(typeof pt=="function"&&(Jd(i,o,pt,h),dt=i.memoizedState),(P=qt||qf(i,o,P,h,xt,dt,E))?(St||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(i.flags|=4194308)):(typeof b.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=h,i.memoizedState=dt),b.props=h,b.state=dt,b.context=E,h=P):(typeof b.componentDidMount=="function"&&(i.flags|=4194308),h=!1)}else{b=i.stateNode,_t(a,i),E=i.memoizedProps,St=Os(o,E),b.props=St,pt=i.pendingProps,xt=b.context,dt=o.contextType,P=cs,typeof dt=="object"&&dt!==null&&(P=ma(dt)),R=o.getDerivedStateFromProps,(dt=typeof R=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(E!==pt||xt!==P)&&Kf(i,b,h,P),qt=!1,xt=i.memoizedState,b.state=xt,Ia(i,h,b,v),zi();var Vt=i.memoizedState;E!==pt||xt!==Vt||qt||a!==null&&a.dependencies!==null&&el(a.dependencies)?(typeof R=="function"&&(Jd(i,o,R,h),Vt=i.memoizedState),(St=qt||qf(i,o,St,h,xt,Vt,P)||a!==null&&a.dependencies!==null&&el(a.dependencies))?(dt||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(h,Vt,P),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(h,Vt,P)),typeof b.componentDidUpdate=="function"&&(i.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof b.componentDidUpdate!="function"||E===a.memoizedProps&&xt===a.memoizedState||(i.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===a.memoizedProps&&xt===a.memoizedState||(i.flags|=1024),i.memoizedProps=h,i.memoizedState=Vt),b.props=h,b.state=Vt,b.context=P,h=St):(typeof b.componentDidUpdate!="function"||E===a.memoizedProps&&xt===a.memoizedState||(i.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===a.memoizedProps&&xt===a.memoizedState||(i.flags|=1024),h=!1)}return b=h,hr(a,i),h=(i.flags&128)!==0,b||h?(b=i.stateNode,o=h&&typeof o.getDerivedStateFromError!="function"?null:b.render(),i.flags|=1,a!==null&&h?(i.child=hs(i,a.child,null,v),i.child=hs(i,null,o,v)):Aa(a,i,o,v),i.memoizedState=b.state,a=i.child):a=na(a,i,v),a}function fr(a,i,o,h){return nn(),i.flags|=256,Aa(a,i,o,h),i.child}function qc(a){return{baseLanes:a,cachePool:Tn()}}function mr(a,i,o){return a=a!==null?a.childLanes&~o:0,i&&(a|=xi),a}function Kd(a,i,o){var h=i.pendingProps,v=!1,b=(i.flags&128)!==0,E;if((E=b)||(E=a!==null&&a.memoizedState===null?!1:(Fe.current&2)!==0),E&&(v=!0,i.flags&=-129),E=(i.flags&32)!==0,i.flags&=-33,a===null){if(ce){if(v?ul(i):Mi(i),(a=We)?(a=D0(a,Ze),a!==null&&(i.memoizedState={dehydrated:a,treeContext:mn!==null?{id:gn,overflow:Ra}:null,retryLane:536870912,hydrationErrors:null},o=rh(a),o.return=i,i.child=o,Ja=i,We=null)):a=null,a===null)throw he(i);return co(a)?i.lanes=32:i.lanes=536870912,null}var R=h.children;return h=h.fallback,v?(Mi(i),v=i.mode,R=pr({mode:"hidden",children:R},v),h=In(h,v,o,null),R.return=i,h.return=i,R.sibling=h,i.child=R,h=i.child,h.memoizedState=qc(o),h.childLanes=mr(a,E,o),i.memoizedState=bn,Vc(null,h)):(ul(i),gr(i,R))}var P=a.memoizedState;if(P!==null&&(R=P.dehydrated,R!==null)){if(b)i.flags&256?(ul(i),i.flags&=-257,i=kd(a,i,o)):i.memoizedState!==null?(Mi(i),i.child=a.child,i.flags|=128,i=null):(Mi(i),R=h.fallback,v=i.mode,h=pr({mode:"visible",children:h.children},v),R=In(R,v,o,null),R.flags|=2,h.return=i,R.return=i,h.sibling=R,i.child=h,hs(i,a.child,null,o),h=i.child,h.memoizedState=qc(o),h.childLanes=mr(a,E,o),i.memoizedState=bn,i=Vc(null,h));else if(ul(i),co(R))E=w0(R).digest,h=Error(m(419)),h.stack="",h.digest=E,aa({value:h,source:null,stack:null}),i=kd(a,i,o);else if(Je||ii(a,i,o,!1),E=(o&a.childLanes)!==0,Je||E){if(E=we,E!==null&&(h=Gt(E,o),h!==0&&h!==P.retryLane))throw P.retryLane=h,Xi(a,h),Ie(E,a,h),qn;Hr(R)||dn(),i=kd(a,i,o)}else Hr(R)?(i.flags|=192,i.child=a.child,i=null):(a=P.treeContext,se&&(We=wh(R),Ja=i,ce=!0,Le=null,Ze=!1,a!==null&&Ot(i,a)),i=gr(i,h.children),i.flags|=4096);return i}return v?(Mi(i),R=h.fallback,v=i.mode,P=a.child,b=P.sibling,h=Dn(P,{mode:"hidden",children:h.children}),h.subtreeFlags=P.subtreeFlags&65011712,b!==null?R=Dn(b,R):(R=In(R,v,o,null),R.flags|=2),R.return=i,h.return=i,h.sibling=R,i.child=h,Vc(null,h),h=i.child,R=a.child.memoizedState,R===null?R=qc(o):(v=R.cachePool,v!==null?(P=Yi?ye._currentValue:ye._currentValue2,v=v.parent!==P?{parent:P,pool:P}:v):v=Tn(),R={baseLanes:R.baseLanes|o,cachePool:v}),h.memoizedState=R,h.childLanes=mr(a,E,o),i.memoizedState=bn,Vc(a.child,h)):(ul(i),o=a.child,a=o.sibling,o=Dn(o,{mode:"visible",children:h.children}),o.return=i,o.sibling=null,a!==null&&(E=i.deletions,E===null?(i.deletions=[a],i.flags|=16):E.push(a)),i.child=o,i.memoizedState=null,o)}function gr(a,i){return i=pr({mode:"visible",children:i},a.mode),i.return=a,a.child=i}function pr(a,i){return a=r(22,a,null,i),a.lanes=0,a}function kd(a,i,o){return hs(i,a.child,null,o),a=gr(i,i.pendingProps.children),a.flags|=2,i.memoizedState=null,a}function $f(a,i,o){a.lanes|=i;var h=a.alternate;h!==null&&(h.lanes|=i),Ma(a.return,i,o)}function Fd(a,i,o,h,v,b){var E=a.memoizedState;E===null?a.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:h,tail:o,tailMode:v,treeForkCount:b}:(E.isBackwards=i,E.rendering=null,E.renderingStartTime=0,E.last=h,E.tail=o,E.tailMode=v,E.treeForkCount=b)}function t0(a,i,o){var h=i.pendingProps,v=h.revealOrder,b=h.tail;h=h.children;var E=Fe.current,R=(E&2)!==0;if(R?(E=E&1|2,i.flags|=128):E&=1,J(Fe,E),Aa(a,i,h,o),h=ce?cc:0,!R&&a!==null&&(a.flags&128)!==0)t:for(a=i.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&$f(a,o,i);else if(a.tag===19)$f(a,o,i);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break t;for(;a.sibling===null;){if(a.return===null||a.return===i)break t;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(v){case"forwards":for(o=i.child,v=null;o!==null;)a=o.alternate,a!==null&&jc(a)===null&&(v=o),o=o.sibling;o=v,o===null?(v=i.child,i.child=null):(v=o.sibling,o.sibling=null),Fd(i,!1,v,o,b,h);break;case"backwards":case"unstable_legacy-backwards":for(o=null,v=i.child,i.child=null;v!==null;){if(a=v.alternate,a!==null&&jc(a)===null){i.child=v;break}a=v.sibling,v.sibling=o,o=v,v=a}Fd(i,!0,o,null,b,h);break;case"together":Fd(i,!1,null,null,void 0,h);break;default:i.memoizedState=null}return i.child}function na(a,i,o){if(a!==null&&(i.dependencies=a.dependencies),Al|=i.lanes,(o&i.childLanes)===0)if(a!==null){if(ii(a,i,o,!1),(o&i.childLanes)===0)return null}else return null;if(a!==null&&i.child!==a.child)throw Error(m(153));if(i.child!==null){for(a=i.child,o=Dn(a,a.pendingProps),i.child=o,o.return=i;a.sibling!==null;)a=a.sibling,o=o.sibling=Dn(a,a.pendingProps),o.return=i;o.sibling=null}return i.child}function Rs(a,i){return(a.lanes&i)!==0?!0:(a=a.dependencies,!!(a!==null&&el(a)))}function e0(a,i,o){switch(i.tag){case 3:Wt(i,i.stateNode.containerInfo),La(i,ye,a.memoizedState.cache),nn();break;case 27:case 5:kt(i);break;case 4:Wt(i,i.stateNode.containerInfo);break;case 10:La(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Po(i),null;break;case 13:var h=i.memoizedState;if(h!==null)return h.dehydrated!==null?(ul(i),i.flags|=128,null):(o&i.child.childLanes)!==0?Kd(a,i,o):(ul(i),a=na(a,i,o),a!==null?a.sibling:null);ul(i);break;case 19:var v=(a.flags&128)!==0;if(h=(o&i.childLanes)!==0,h||(ii(a,i,o,!1),h=(o&i.childLanes)!==0),v){if(h)return t0(a,i,o);i.flags|=128}if(v=i.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),J(Fe,Fe.current),h)break;return null;case 22:return i.lanes=0,Pf(a,i,o,i.pendingProps);case 24:La(i,ye,a.memoizedState.cache)}return na(a,i,o)}function Pd(a,i,o){if(a!==null)if(a.memoizedProps!==i.pendingProps)Je=!0;else{if(!Rs(a,o)&&(i.flags&128)===0)return Je=!1,e0(a,i,o);Je=(a.flags&131072)!==0}else Je=!1,ce&&(i.flags&1048576)!==0&&j(i,cc,i.index);switch(i.lanes=0,i.tag){case 16:t:{var h=i.pendingProps;if(a=wn(i.elementType),i.type=a,typeof a=="function")Wu(a)?(h=Os(a,h),i.tag=1,i=qd(null,i,a,h,o)):(i.tag=0,i=Du(null,i,a,h,o));else{if(a!=null){var v=a.$$typeof;if(v===io){i.tag=11,i=Vd(null,i,a,h,o);break t}else if(v===Ar){i.tag=14,i=Ys(null,i,a,h,o);break t}}throw i=M(a)||a,Error(m(306,i,""))}}return i;case 0:return Du(a,i,i.type,i.pendingProps,o);case 1:return h=i.type,v=Os(h,i.pendingProps),qd(a,i,h,v,o);case 3:t:{if(Wt(i,i.stateNode.containerInfo),a===null)throw Error(m(387));var b=i.pendingProps;v=i.memoizedState,h=v.element,_t(a,i),Ia(i,b,null,o);var E=i.memoizedState;if(b=E.cache,La(i,ye,b),b!==v.cache&&ai(i,[ye],o,!0),zi(),b=E.element,se&&v.isDehydrated)if(v={element:b,isDehydrated:!1,cache:E.cache},i.updateQueue.baseState=v,i.memoizedState=v,i.flags&256){i=fr(a,i,b,o);break t}else if(b!==h){h=Nt(Error(m(424)),i),aa(h),i=fr(a,i,b,o);break t}else for(se&&(We=R0(i.stateNode.containerInfo),Ja=i,ce=!0,Le=null,Ze=!0),o=$0(i,null,b,o),i.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(nn(),b===h){i=na(a,i,o);break t}Aa(a,i,b,o)}i=i.child}return i;case 26:if(Ri)return hr(a,i),a===null?(o=Q0(i.type,null,i.pendingProps,null))?i.memoizedState=o:ce||(i.stateNode=q0(i.type,i.pendingProps,zl.current,i)):i.memoizedState=Q0(i.type,a.memoizedProps,i.pendingProps,a.memoizedState),null;case 27:if(pa)return kt(i),a===null&&pa&&ce&&(h=i.stateNode=k0(i.type,i.pendingProps,zl.current,ue.current,!1),Ja=i,Ze=!0,We=G0(i.type,h,We)),Aa(a,i,i.pendingProps.children,o),hr(a,i),a===null&&(i.flags|=4194304),i.child;case 5:return a===null&&ce&&(Ir(i.type,i.pendingProps,ue.current),(v=h=We)&&(h=H0(h,i.type,i.pendingProps,Ze),h!==null?(i.stateNode=h,Ja=i,We=Ah(h),Ze=!1,v=!0):v=!1),v||he(i)),kt(i),v=i.type,b=i.pendingProps,E=a!==null?a.memoizedProps:null,h=b.children,Ke(v,b)?h=null:E!==null&&Ke(v,E)&&(i.flags|=32),i.memoizedState!==null&&(v=Mu(a,i,Ui,null,null,o),Yi?Un._currentValue=v:Un._currentValue2=v),hr(a,i),Aa(a,i,h,o),i.child;case 6:return a===null&&ce&&(W0(i.pendingProps,ue.current),(a=o=We)&&(o=U1(o,i.pendingProps,Ze),o!==null?(i.stateNode=o,Ja=i,We=null,a=!0):a=!1),a||he(i)),null;case 13:return Kd(a,i,o);case 4:return Wt(i,i.stateNode.containerInfo),h=i.pendingProps,a===null?i.child=hs(i,null,h,o):Aa(a,i,h,o),i.child;case 11:return Vd(a,i,i.type,i.pendingProps,o);case 7:return Aa(a,i,i.pendingProps,o),i.child;case 8:return Aa(a,i,i.pendingProps.children,o),i.child;case 12:return Aa(a,i,i.pendingProps.children,o),i.child;case 10:return h=i.pendingProps,La(i,i.type,h.value),Aa(a,i,h.children,o),i.child;case 9:return v=i.type._context,h=i.pendingProps.children,En(i),v=ma(v),h=h(v),i.flags|=1,Aa(a,i,h,o),i.child;case 14:return Ys(a,i,i.type,i.pendingProps,o);case 15:return Ff(a,i,i.type,i.pendingProps,o);case 19:return t0(a,i,o);case 31:return Qc(a,i,o);case 22:return Pf(a,i,o,i.pendingProps);case 24:return En(i),h=ma(ye),a===null?(v=Bi(),v===null&&(v=we,b=al(),v.pooledCache=b,b.refCount++,b!==null&&(v.pooledCacheLanes|=o),v=b),i.memoizedState={parent:h,cache:v},rt(i),La(i,ye,v)):((a.lanes&o)!==0&&(_t(a,i),Ia(i,null,null,o),zi()),v=a.memoizedState,b=i.memoizedState,v.parent!==h?(v={parent:h,cache:h},i.memoizedState=v,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=v),La(i,ye,h)):(h=b.cache,La(i,ye,h),h!==v.cache&&ai(i,[ye],o,!0))),Aa(a,i,i.pendingProps.children,o),i.child;case 29:throw i.pendingProps}throw Error(m(156,i.tag))}function Vi(a){a.flags|=4}function Kc(a){Bn&&(a.flags|=8)}function vr(a,i){if(a!==null&&a.child===i.child)return!1;if((i.flags&16)!==0)return!0;for(a=i.child;a!==null;){if((a.flags&8218)!==0||(a.subtreeFlags&8218)!==0)return!0;a=a.sibling}return!1}function $d(a,i,o,h){if(ua)for(o=i.child;o!==null;){if(o.tag===5||o.tag===6)Qt(a,o.stateNode);else if(!(o.tag===4||pa&&o.tag===27)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return;o=o.return}o.sibling.return=o.return,o=o.sibling}else if(Bn)for(var v=i.child;v!==null;){if(v.tag===5){var b=v.stateNode;o&&h&&(b=zh(b,v.type,v.memoizedProps)),Qt(a,b)}else if(v.tag===6)b=v.stateNode,o&&h&&(b=Mh(b,v.memoizedProps)),Qt(a,b);else if(v.tag!==4){if(v.tag===22&&v.memoizedState!==null)b=v.child,b!==null&&(b.return=v),$d(a,v,!0,!0);else if(v.child!==null){v.child.return=v,v=v.child;continue}}if(v===i)break;for(;v.sibling===null;){if(v.return===null||v.return===i)return;v=v.return}v.sibling.return=v.return,v=v.sibling}}function js(a,i,o,h){var v=!1;if(Bn)for(var b=i.child;b!==null;){if(b.tag===5){var E=b.stateNode;o&&h&&(E=zh(E,b.type,b.memoizedProps)),T0(a,E)}else if(b.tag===6)E=b.stateNode,o&&h&&(E=Mh(E,b.memoizedProps)),T0(a,E);else if(b.tag!==4){if(b.tag===22&&b.memoizedState!==null)v=b.child,v!==null&&(v.return=b),js(a,b,!0,!0),v=!0;else if(b.child!==null){b.child.return=b,b=b.child;continue}}if(b===i)break;for(;b.sibling===null;){if(b.return===null||b.return===i)return v;b=b.return}b.sibling.return=b.return,b=b.sibling}return v}function yr(a,i){if(Bn&&vr(a,i)){a=i.stateNode;var o=a.containerInfo,h=Gr();js(h,i,!1,!1),a.pendingChildren=h,Vi(i),A0(o,h)}}function Gs(a,i,o,h){if(ua)a.memoizedProps!==h&&Vi(i);else if(Bn){var v=a.stateNode,b=a.memoizedProps;if((a=vr(a,i))||b!==h){var E=ue.current;b=N0(v,o,b,h,!a,null),b===v?i.stateNode=v:(Kc(i),Me(b,o,h,E)&&Vi(i),i.stateNode=b,a&&$d(b,i,!1,!1))}else i.stateNode=v}}function kc(a,i,o,h,v){if((a.mode&32)!==0&&(o===null?bh(i,h):li(i,o,h))){if(a.flags|=16777216,(v&335544128)===v||ke(i,h))if(lo(a.stateNode,i,h))a.flags|=8192;else if(Er())a.flags|=8192;else throw yn=Co,rs}else a.flags&=-16777217}function th(a,i){if(ho(i)){if(a.flags|=16777216,!Ih(i))if(Er())a.flags|=8192;else throw yn=Co,rs}else a.flags&=-16777217}function jn(a,i){i!==null&&(a.flags|=4),a.flags&16384&&(i=a.tag!==22?ot():536870912,a.lanes|=i,uu|=i)}function Gn(a,i){if(!ce)switch(a.tailMode){case"hidden":i=a.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?a.tail=null:o.sibling=null;break;case"collapsed":o=a.tail;for(var h=null;o!==null;)o.alternate!==null&&(h=o),o=o.sibling;h===null?i||a.tail===null?a.tail=null:a.tail.sibling=null:h.sibling=null}}function Oe(a){var i=a.alternate!==null&&a.alternate.child===a.child,o=0,h=0;if(i)for(var v=a.child;v!==null;)o|=v.lanes|v.childLanes,h|=v.subtreeFlags&65011712,h|=v.flags&65011712,v.return=a,v=v.sibling;else for(v=a.child;v!==null;)o|=v.lanes|v.childLanes,h|=v.subtreeFlags,h|=v.flags,v.return=a,v=v.sibling;return a.subtreeFlags|=h,a.childLanes=o,i}function a0(a,i,o){var h=i.pendingProps;switch(yt(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Oe(i),null;case 1:return Oe(i),null;case 3:return o=i.stateNode,h=null,a!==null&&(h=a.memoizedState.cache),i.memoizedState.cache!==h&&(i.flags|=2048),za(ye),Bt(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(a===null||a.child===null)&&(di(i)?Vi(i):a===null||a.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,ei())),yr(a,i),Oe(i),null;case 26:if(Ri){var v=i.type,b=i.memoizedState;return a===null?(Vi(i),b!==null?(Oe(i),th(i,b)):(Oe(i),kc(i,v,null,h,o))):b?b!==a.memoizedState?(Vi(i),Oe(i),th(i,b)):(Oe(i),i.flags&=-16777217):(b=a.memoizedProps,ua?b!==h&&Vi(i):Gs(a,i,v,h),Oe(i),kc(i,v,b,h,o)),null}case 27:if(pa){if(fa(i),o=zl.current,v=i.type,a!==null&&i.stateNode!=null)ua?a.memoizedProps!==h&&Vi(i):Gs(a,i,v,h);else{if(!h){if(i.stateNode===null)throw Error(m(166));return Oe(i),null}a=ue.current,di(i)?ti(i,a):(a=k0(v,h,o,a,!0),i.stateNode=a,Vi(i))}return Oe(i),null}case 5:if(fa(i),v=i.type,a!==null&&i.stateNode!=null)Gs(a,i,v,h);else{if(!h){if(i.stateNode===null)throw Error(m(166));return Oe(i),null}if(b=ue.current,di(i))ti(i,b),jh(i.stateNode,v,h,b)&&(i.flags|=64);else{var E=xl(v,h,zl.current,b,i);Kc(i),$d(E,i,!1,!1),i.stateNode=E,Me(E,v,h,b)&&Vi(i)}}return Oe(i),kc(i,i.type,a===null?null:a.memoizedProps,i.pendingProps,o),null;case 6:if(a&&i.stateNode!=null)o=a.memoizedProps,ua?o!==h&&Vi(i):Bn&&(o!==h?(a=zl.current,o=ue.current,Kc(i),i.stateNode=no(h,a,o,i)):i.stateNode=a.stateNode);else{if(typeof h!="string"&&i.stateNode===null)throw Error(m(166));if(a=zl.current,o=ue.current,di(i)){if(!se)throw Error(m(176));if(a=i.stateNode,o=i.memoizedProps,h=null,v=Ja,v!==null)switch(v.tag){case 27:case 5:h=v.memoizedProps}Oh(a,o,i,h)||he(i,!0)}else Kc(i),i.stateNode=no(h,a,o,i)}return Oe(i),null;case 31:if(o=i.memoizedState,a===null||a.memoizedState!==null){if(h=di(i),o!==null){if(a===null){if(!h)throw Error(m(318));if(!se)throw Error(m(556));if(a=i.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(m(557));Dr(a,i)}else nn(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Oe(i),a=!1}else o=ei(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=o),a=!0;if(!a)return i.flags&256?(Ni(i),i):(Ni(i),null);if((i.flags&128)!==0)throw Error(m(558))}return Oe(i),null;case 13:if(h=i.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(v=di(i),h!==null&&h.dehydrated!==null){if(a===null){if(!v)throw Error(m(318));if(!se)throw Error(m(344));if(v=i.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(m(317));I0(v,i)}else nn(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Oe(i),v=!1}else v=ei(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=v),v=!0;if(!v)return i.flags&256?(Ni(i),i):(Ni(i),null)}return Ni(i),(i.flags&128)!==0?(i.lanes=o,i):(o=h!==null,a=a!==null&&a.memoizedState!==null,o&&(h=i.child,v=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(v=h.alternate.memoizedState.cachePool.pool),b=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(b=h.memoizedState.cachePool.pool),b!==v&&(h.flags|=2048)),o!==a&&o&&(i.child.flags|=8192),jn(i,i.updateQueue),Oe(i),null);case 4:return Bt(),yr(a,i),a===null&&ph(i.stateNode.containerInfo),Oe(i),null;case 10:return za(i.type),Oe(i),null;case 19:if(N(Fe),h=i.memoizedState,h===null)return Oe(i),null;if(v=(i.flags&128)!==0,b=h.rendering,b===null)if(v)Gn(h,!1);else{if(Be!==0||a!==null&&(a.flags&128)!==0)for(a=i.child;a!==null;){if(b=jc(a),b!==null){for(i.flags|=128,Gn(h,!1),a=b.updateQueue,i.updateQueue=a,jn(i,a),i.subtreeFlags=0,a=o,o=i.child;o!==null;)Xs(o,a),o=o.sibling;return J(Fe,Fe.current&1|2),ce&&te(i,h.treeForkCount),i.child}a=a.sibling}h.tail!==null&&yi()>cu&&(i.flags|=128,v=!0,Gn(h,!1),i.lanes=4194304)}else{if(!v)if(a=jc(b),a!==null){if(i.flags|=128,v=!0,a=a.updateQueue,i.updateQueue=a,jn(i,a),Gn(h,!0),h.tail===null&&h.tailMode==="hidden"&&!b.alternate&&!ce)return Oe(i),null}else 2*yi()-h.renderingStartTime>cu&&o!==536870912&&(i.flags|=128,v=!0,Gn(h,!1),i.lanes=4194304);h.isBackwards?(b.sibling=i.child,i.child=b):(a=h.last,a!==null?a.sibling=b:i.child=b,h.last=b)}return h.tail!==null?(a=h.tail,h.rendering=a,h.tail=a.sibling,h.renderingStartTime=yi(),a.sibling=null,o=Fe.current,J(Fe,v?o&1|2:o&1),ce&&te(i,h.treeForkCount),a):(Oe(i),null);case 22:case 23:return Ni(i),ga(),h=i.memoizedState!==null,a!==null?a.memoizedState!==null!==h&&(i.flags|=8192):h&&(i.flags|=8192),h?(o&536870912)!==0&&(i.flags&128)===0&&(Oe(i),i.subtreeFlags&6&&(i.flags|=8192)):Oe(i),o=i.updateQueue,o!==null&&jn(i,o.retryQueue),o=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(o=a.memoizedState.cachePool.pool),h=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(h=i.memoizedState.cachePool.pool),h!==o&&(i.flags|=2048),a!==null&&N(vn),null;case 24:return o=null,a!==null&&(o=a.memoizedState.cache),i.memoizedState.cache!==o&&(i.flags|=2048),za(ye),Oe(i),null;case 25:return null;case 30:return null}throw Error(m(156,i.tag))}function Hs(a,i){switch(yt(i),i.tag){case 1:return a=i.flags,a&65536?(i.flags=a&-65537|128,i):null;case 3:return za(ye),Bt(),a=i.flags,(a&65536)!==0&&(a&128)===0?(i.flags=a&-65537|128,i):null;case 26:case 27:case 5:return fa(i),null;case 31:if(i.memoizedState!==null){if(Ni(i),i.alternate===null)throw Error(m(340));nn()}return a=i.flags,a&65536?(i.flags=a&-65537|128,i):null;case 13:if(Ni(i),a=i.memoizedState,a!==null&&a.dehydrated!==null){if(i.alternate===null)throw Error(m(340));nn()}return a=i.flags,a&65536?(i.flags=a&-65537|128,i):null;case 19:return N(Fe),null;case 4:return Bt(),null;case 10:return za(i.type),null;case 22:case 23:return Ni(i),ga(),a!==null&&N(vn),a=i.flags,a&65536?(i.flags=a&-65537|128,i):null;case 24:return za(ye),null;case 25:return null;default:return null}}function eh(a,i){switch(yt(i),i.tag){case 3:za(ye),Bt();break;case 26:case 27:case 5:fa(i);break;case 4:Bt();break;case 31:i.memoizedState!==null&&Ni(i);break;case 13:Ni(i);break;case 19:N(Fe);break;case 10:za(i.type);break;case 22:case 23:Ni(i),ga(),a!==null&&N(vn);break;case 24:za(ye)}}function Iu(a,i){try{var o=i.updateQueue,h=o!==null?o.lastEffect:null;if(h!==null){var v=h.next;o=v;do{if((o.tag&a)===a){h=void 0;var b=o.create,E=o.inst;h=b(),E.destroy=h}o=o.next}while(o!==v)}}catch(R){le(i,i.return,R)}}function rl(a,i,o){try{var h=i.updateQueue,v=h!==null?h.lastEffect:null;if(v!==null){var b=v.next;h=b;do{if((h.tag&a)===a){var E=h.inst,R=E.destroy;if(R!==void 0){E.destroy=void 0,v=i;var P=o,dt=R;try{dt()}catch(St){le(v,P,St)}}}h=h.next}while(h!==b)}}catch(St){le(i,i.return,St)}}function i0(a){var i=a.updateQueue;if(i!==null){var o=a.stateNode;try{sl(i,o)}catch(h){le(a,a.return,h)}}}function n0(a,i,o){o.props=Os(a.type,a.memoizedProps),o.state=a.memoizedState;try{o.componentWillUnmount()}catch(h){le(a,i,h)}}function Fc(a,i){try{var o=a.ref;if(o!==null){switch(a.tag){case 26:case 27:case 5:var h=$u(a.stateNode);break;case 30:h=a.stateNode;break;default:h=a.stateNode}typeof o=="function"?a.refCleanup=o(h):o.current=h}}catch(v){le(a,i,v)}}function un(a,i){var o=a.ref,h=a.refCleanup;if(o!==null)if(typeof h=="function")try{h()}catch(v){le(a,i,v)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(v){le(a,i,v)}else o.current=null}function ah(a){var i=a.type,o=a.memoizedProps,h=a.stateNode;try{_h(h,i,o,a)}catch(v){le(a,a.return,v)}}function Pc(a,i,o){try{S0(a.stateNode,a.type,o,i,a)}catch(h){le(a,a.return,h)}}function Wi(a){return a.tag===5||a.tag===3||(Ri?a.tag===26:!1)||(pa?a.tag===27&&ks(a.type):!1)||a.tag===4}function Zu(a){t:for(;;){for(;a.sibling===null;){if(a.return===null||Wi(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(pa&&a.tag===27&&ks(a.type)||a.flags&2||a.child===null||a.tag===4)continue t;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function fi(a,i,o){var h=a.tag;if(h===5||h===6)a=a.stateNode,i?L0(o,a,i):y0(o,a);else if(h!==4&&(pa&&h===27&&ks(a.type)&&(o=a.stateNode,i=null),a=a.child,a!==null))for(fi(a,i,o),a=a.sibling;a!==null;)fi(a,i,o),a=a.sibling}function dl(a,i,o){var h=a.tag;if(h===5||h===6)a=a.stateNode,i?C0(o,a,i):v0(o,a);else if(h!==4&&(pa&&h===27&&ks(a.type)&&(o=a.stateNode),a=a.child,a!==null))for(dl(a,i,o),a=a.sibling;a!==null;)dl(a,i,o),a=a.sibling}function br(a,i,o){a=a.containerInfo;try{Eh(a,o)}catch(h){le(i,i.return,h)}}function $c(a){var i=a.stateNode,o=a.memoizedProps;try{Xr(a.type,o,i,a)}catch(h){le(a,a.return,h)}}function Sr(a,i){for(sa(a.containerInfo),ya=i;ya!==null;)if(a=ya,i=a.child,(a.subtreeFlags&1028)!==0&&i!==null)i.return=a,ya=i;else for(;ya!==null;){a=ya;var o=a.alternate;switch(i=a.flags,a.tag){case 0:if((i&4)!==0&&(i=a.updateQueue,i=i!==null?i.events:null,i!==null))for(var h=0;h";case Cn:return":has("+(xr(a)||"")+")";case lu:return'[role="'+a.value+'"]';case Tl:return'"'+a.value+'"';case fc:return'[data-testname="'+a.value+'"]';default:throw Error(m(365))}}function Ya(a,i){var o=[];a=[a,0];for(var h=0;ho?32:o;o=Tt.T;var v=Xn();try{xa(h),Tt.T=null,h=_o,_o=null;var b=vs,E=$i;if(Ea=0,pc=vs=null,$i=0,(ae&6)!==0)throw Error(m(331));var R=ae;if(ae|=4,rn(b.current),Is(b,b.current,E,h),ae=R,zn(0,!1),ji&&typeof ji.onPostCommitFiberRoot=="function")try{ji.onPostCommitFiberRoot(Ne,b)}catch{}return!0}finally{xa(v),Tt.T=o,zr(a,i)}}function Mr(a,i,o){i=Nt(o,i),i=Bd(a.stateNode,i,2),a=ne(a,i,2),a!==null&&(at(a,2),Zi(a))}function le(a,i,o){if(a.tag===3)Mr(a,a,o);else for(;i!==null;){if(i.tag===3){Mr(i,a,o);break}else if(i.tag===1){var h=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(wl===null||!wl.has(h))){a=Nt(o,a),o=Xd(2),h=ne(i,o,2),h!==null&&(Ud(o,h,i,a),at(h,2),Zi(h));break}}i=i.return}}function $l(a,i,o){var h=a.pingCache;if(h===null){h=a.pingCache=new em;var v=new Set;h.set(i,v)}else v=h.get(i),v===void 0&&(v=new Set,h.set(i,v));v.has(o)||(td=!0,v.add(o),a=I1.bind(null,a,i,o),i.then(a,a))}function I1(a,i,o){var h=a.pingCache;h!==null&&h.delete(i),a.pingedLanes|=a.suspendedLanes&o,a.warmLanes&=~o,we===a&&(ie&o)===o&&(Be===4||Be===3&&(ie&62914560)===ie&&300>yi()-xo?(ae&2)===0&&kl(a,0):ed|=o,uu===ie&&(uu=0)),Zi(a)}function ch(a,i){i===0&&(i=ot()),a=Xi(a,i),a!==null&&(at(a,i),Zi(a))}function Z1(a){var i=a.memoizedState,o=0;i!==null&&(o=i.retryLane),ch(a,o)}function r0(a,i){var o=0;switch(a.tag){case 31:case 13:var h=a.stateNode,v=a.memoizedState;v!==null&&(o=v.retryLane);break;case 19:h=a.stateNode;break;case 22:h=a.stateNode._retryCache;break;default:throw Error(m(314))}h!==null&&h.delete(i),ch(a,o)}function Bs(a,i){return lc(a,i)}function oh(a,i,o,h){this.tag=a,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=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wu(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Dn(a,i){var o=a.alternate;return o===null?(o=r(a.tag,i,a.key,a.mode),o.elementType=a.elementType,o.type=a.type,o.stateNode=a.stateNode,o.alternate=a,a.alternate=o):(o.pendingProps=i,o.type=a.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=a.flags&65011712,o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,i=a.dependencies,o.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},o.sibling=a.sibling,o.index=a.index,o.ref=a.ref,o.refCleanup=a.refCleanup,o}function Xs(a,i){a.flags&=65011714;var o=a.alternate;return o===null?(a.childLanes=0,a.lanes=i,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,i=o.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),a}function Qu(a,i,o,h,v,b){var E=0;if(h=a,typeof a=="function")Wu(a)&&(E=1);else if(typeof a=="string")E=Ri&&pa?Gh(a,o,ue.current)?26:Zh(a)?27:5:Ri?Gh(a,o,ue.current)?26:5:pa&&Zh(a)?27:5;else t:switch(a){case ns:return a=r(31,o,i,v),a.elementType=ns,a.lanes=b,a;case as:return In(o.children,v,b,i);case is:E=8,v|=24;break;case Cl:return a=r(12,o,i,v|2),a.elementType=Cl,a.lanes=b,a;case Ws:return a=r(13,o,i,v),a.elementType=Ws,a.lanes=b,a;case Qs:return a=r(19,o,i,v),a.elementType=Qs,a.lanes=b,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case Zn:E=10;break t;case Fu:E=9;break t;case io:E=11;break t;case Ar:E=14;break t;case Ll:E=16,h=null;break t}E=29,o=Error(m(130,a===null?"null":typeof a,"")),h=null}return i=r(E,o,i,v),i.elementType=a,i.type=h,i.lanes=b,i}function In(a,i,o,h){return a=r(7,a,h,i),a.lanes=o,a}function qu(a,i,o){return a=r(6,a,null,i),a.lanes=o,a}function rh(a){var i=r(18,null,null,0);return i.stateNode=a,i}function Nr(a,i,o){return i=r(4,a.children!==null?a.children:[],a.key,i),i.lanes=o,i.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},i}function Us(a,i,o,h,v,b,E,R,P){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Jn,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ut(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ut(0),this.hiddenUpdates=ut(null),this.identifierPrefix=h,this.onUncaughtError=v,this.onCaughtError=b,this.onRecoverableError=E,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=P,this.incompleteTransitions=new Map}function ts(a,i,o,h,v,b,E,R,P,dt,St,pt){return a=new Us(a,i,o,E,P,dt,St,pt,R),i=1,b===!0&&(i|=24),b=r(3,null,null,i),a.current=b,b.stateNode=a,i=al(),i.refCount++,a.pooledCache=i,i.refCount++,b.memoizedState={element:h,isDehydrated:o,cache:i},rt(b),a}function dh(a){return a?(a=cs,a):cs}function hh(a){var i=a._reactInternals;if(i===void 0)throw typeof a.render=="function"?Error(m(188)):(a=Object.keys(a).join(","),Error(m(268,a)));return a=S(i),a=a!==null?x(a):null,a===null?null:$u(a.stateNode)}function Vs(a,i,o,h,v,b){v=dh(v),h.context===null?h.context=v:h.pendingContext=v,h=Ut(i),h.payload={element:o},b=b===void 0?null:b,b!==null&&(h.callback=b),o=ne(a,h,i),o!==null&&(Ie(o,a,i),Ta(o,a,i))}function Ku(a,i){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var o=a.retryLane;a.retryLane=o!==0&&o=dt&&b>=pt&&v<=St&&E<=xt){a.splice(i,1);break}else if(h!==dt||o.width!==P.width||xtE){if(!(b!==pt||o.height!==P.height||Stv)){dt>h&&(P.width+=dt-h,P.x=h),Stb&&(P.height+=pt-b,P.y=b),xto&&(o=R)),R ")+` No matching component was found for: `)+a.join(" > ")}return null},Ft.getPublicRootInstance=function(a){if(a=a.current,!a.child)return null;switch(a.child.tag){case 27:case 5:return $u(a.child.stateNode);default:return a.child.stateNode}},Ft.injectIntoDevTools=function(){var a={bundleType:0,version:Ki,rendererPackageName:ls,currentDispatcherRef:Tt,reconcilerVersion:"19.2.0"};if(Or!==null&&(a.rendererConfig=Or),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")a=!1;else{var i=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(i.isDisabled||!i.supportsFiber)a=!0;else{try{Ne=i.inject(a),ji=i}catch{}a=!!i.checkDCE}}return a},Ft.isAlreadyRendering=function(){return(ae&6)!==0},Ft.observeVisibleRects=function(a,i,o,h){if(!ec)throw Error(m(363));a=Ye(a,i);var v=B1(a,o,h).disconnect;return{disconnect:function(){v()}}},Ft.shouldError=function(){return null},Ft.shouldSuspend=function(){return!1},Ft.startHostTransition=function(a,i,o,h){if(a.tag!==5)throw Error(m(476));var v=rr(a).queue;Uf(a,v,i,vi,o===null?d:function(){var b=rr(a);return b.next===null&&(b=a.alternate.memoizedState),Xc(a,b.next.queue,{},Xt()),o(h)})},Ft.updateContainer=function(a,i,o,h){var v=i.current,b=Xt();return Vs(v,b,a,i,o,h),b},Ft.updateContainerSync=function(a,i,o,h){return Vs(i.current,2,a,i,o,h),2},Ft},s.exports.default=s.exports,Object.defineProperty(s.exports,"__esModule",{value:!0})})),Dy=Di(((n,s)=>{s.exports=Hy()})),Iy=Di((n=>{n.ConcurrentRoot=1,n.DefaultEventPriority=32,n.DiscreteEventPriority=2})),Rp=Di(((n,s)=>{s.exports=Iy()}));function Zy(n){A1=n}function Jy(n){return function(...s){const u=n.apply(this,s);if(!jf){jf=!0;try{A1()}finally{jf=!1}}return u}}function Rf(n,s,u=Dp){if(!N1&&"zIndex"in s&&(console.warn(Hp),N1=!0),!T1&&s.draggable){var r=s.x!==void 0||s.y!==void 0,d=s.onDragEnd||s.onDragMove;r&&!d&&(console.warn(Gp),T1=!0)}for(var m in u)if(!M1[m]){var p=m.slice(0,2)==="on",y=u[m]!==s[m];if(p&&y){var S=m.substr(2).toLowerCase();S.substr(0,7)==="content"&&(S="content"+S.substr(7,1).toUpperCase()+S.substr(8)),n.off(S+Vo)}s.hasOwnProperty(m)||n.setAttr(m,void 0)}var x=jp||s._useStrictMode,L={},_=!1;const M={};for(var m in s)if(!M1[m]){var p=m.slice(0,2)==="on",w=u[m]!==s[m];if(p&&w){var S=m.substr(2).toLowerCase();S.substr(0,7)==="content"&&(S="content"+S.substr(7,1).toUpperCase()+S.substr(8)),s[m]&&(M[S]=s[m])}!p&&(s[m]!==u[m]||x&&s[m]!==n.getAttr(m))&&(_=!0,L[m]=s[m])}_&&(n.setAttrs(L),bu(n));for(var S in M)n.off(S+Vo),n.on(S+Vo,Jy(M[S]))}function bu(n){if(!vt.autoDrawEnabled){var s=n.getLayer()||n.getStage();s&&s.batchDraw()}}var M1,N1,T1,Vo,jp,Gp,Hp,Dp,A1,jf,Ip=Et((()=>{Ce(),M1={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0},N1=!1,T1=!1,Vo=".react-konva-event",jp=!1,Gp=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. Position of a node will be changed during drag&drop, so you should update state of the react app as well. Consider to add onDragMove or onDragEnd events. For more info see: https://github.com/konvajs/react-konva/issues/256 `,Hp=`ReactKonva: You are using "zIndex" attribute for a Konva node. react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. For more info see: https://github.com/konvajs/react-konva/issues/194 `,Dp={},A1=()=>{},jf=!1})),By=gg({HostTransitionContext:()=>Wp,NotPendingTransition:()=>null,afterActiveInstanceBlur:()=>b3,appendChild:()=>i3,appendChildToContainer:()=>n3,appendInitialChild:()=>Xy,beforeActiveInstanceBlur:()=>y3,cancelTimeout:()=>Up,clearContainer:()=>g3,commitMount:()=>o3,commitTextUpdate:()=>c3,commitUpdate:()=>r3,createInstance:()=>Uy,createTextInstance:()=>Vy,detachDeletedInstance:()=>p3,finalizeInitialChildren:()=>Wy,getChildHostContext:()=>e3,getCurrentEventPriority:()=>S3,getCurrentUpdatePriority:()=>_3,getInstanceFromNode:()=>v3,getInstanceFromScope:()=>L3,getPublicInstance:()=>Qy,getRootHostContext:()=>t3,hideInstance:()=>d3,hideTextInstance:()=>h3,idlePriority:()=>Gf.unstable_IdlePriority,insertBefore:()=>Zp,insertInContainerBefore:()=>l3,isPrimaryRenderer:()=>!1,maySuspendCommit:()=>w3,noTimeout:()=>-1,now:()=>Gf.unstable_now,preloadInstance:()=>O3,prepareForCommit:()=>qy,preparePortalMount:()=>Ky,prepareScopeUpdate:()=>C3,prepareUpdate:()=>ky,removeChild:()=>s3,removeChildFromContainer:()=>u3,requestPostPaintCallback:()=>A3,resetAfterCommit:()=>Fy,resetFormInstance:()=>G3,resetTextContent:()=>Py,resolveEventTimeStamp:()=>T3,resolveEventType:()=>N3,resolveUpdatePriority:()=>E3,run:()=>Gf.unstable_runWithPriority,scheduleMicrotask:()=>Vp,scheduleTimeout:()=>Xp,setCurrentUpdatePriority:()=>x3,shouldAttemptEagerTransition:()=>z3,shouldDeprioritizeSubtree:()=>$y,shouldSetTextContent:()=>a3,startSuspendingCommit:()=>Y3,supportsHydration:()=>!1,supportsMicrotasks:()=>!0,supportsMutation:()=>!0,supportsPersistence:()=>!1,suspendInstance:()=>R3,trackSchedulerEvent:()=>M3,unhideInstance:()=>f3,unhideTextInstance:()=>m3,waitForCommitToBeReady:()=>j3,warnsIfNotActing:()=>!1});function Xy(n,s){if(typeof s=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${s}`);return}n.add(s),bu(n)}function Uy(n,s,u){let r=Ed[n];r||(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`),r=Ed.Group);const d={},m={};for(var p in s)p!=="ref"&&(p.slice(0,2)==="on"?m[p]=s[p]:d[p]=s[p]);const y=new r(d);return Rf(y,m),y}function Vy(n,s,u){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${n}"`)}function Wy(n,s,u){return!1}function Qy(n){return n}function qy(){return null}function Ky(){return null}function ky(n,s,u,r){return Bp}function Fy(){}function Py(n){}function $y(n,s){return!1}function t3(){return w1}function e3(){return w1}function a3(n,s){return!1}function i3(n,s){s.parent===n?s.moveToTop():n.add(s),bu(n)}function n3(n,s){s.parent===n?s.moveToTop():n.add(s),bu(n)}function Zp(n,s,u){s._remove(),n.add(s),s.setZIndex(u.getZIndex()),bu(n)}function l3(n,s,u){Zp(n,s,u)}function s3(n,s){s.destroy(),s.off(Vo),bu(n)}function u3(n,s){s.destroy(),s.off(Vo),bu(n)}function c3(n,s,u){console.error(`Text components are not yet supported in ReactKonva. You text is: "${u}"`)}function o3(n,s,u){}function r3(n,s,u,r){Rf(n,r,u)}function d3(n){n.hide(),bu(n)}function h3(n){}function f3(n,s){(s.visible==null||s.visible)&&n.show()}function m3(n,s){}function g3(n){}function p3(){}function v3(){return null}function y3(){}function b3(){}function S3(){return Hf.DefaultEventPriority}function C3(){}function L3(){return null}function x3(n){O1=n}function _3(){return O1}function E3(){return Hf.DiscreteEventPriority}function z3(){return!1}function M3(){}function N3(){return null}function T3(){return-1.1}function A3(){}function w3(){return!1}function O3(){return!0}function Y3(){}function R3(){}function j3(){return null}function G3(){}var Jp,Gf,Hf,w1,Bp,O1,Xp,Up,H3,Vp,D3,I3,Z3,J3,B3,X3,U3,Wp,V3=Et((()=>{Jp=xc(Cs()),Yp(),Ip(),Gf=gm(),Hf=Rp(),w1={},Bp={},Ed.Node.prototype._applyProps=Rf,O1=Hf.DefaultEventPriority,Xp=setTimeout,Up=clearTimeout,H3=!0,Vp=typeof queueMicrotask=="function"?queueMicrotask:n=>Promise.resolve(null).then(n),D3=-1,I3=!1,Z3=!1,J3=!0,B3=!1,X3=!1,U3=null,Wp=Jp.createContext(null)}));function Qp(n,s,u){if(!n)return;if(u(n)===!0)return n;let r=s?n.return:n.child;for(;r;){const d=Qp(r,s,u);if(d)return d;r=s?null:r.sibling}}function qp(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}function W3(){const n=Ei.useContext(Df);if(n===null)throw new Error("its-fine: useFiber must be called within a !");const s=Ei.useId();return Ei.useMemo(()=>{for(const u of[n,n?.alternate]){if(!u)continue;const r=Qp(u,!1,d=>{let m=d.memoizedState;for(;m;){if(m.memoizedState===s)return!0;m=m.next}});if(r)return r}},[n,s])}function Q3(){const n=W3(),[s]=Ei.useState(()=>new Map);s.clear();let u=n;for(;u;){const r=u.type;kp(r)&&r!==Df&&!s.has(r)&&s.set(r,Ei.use(qp(r))),u=u.return}return s}function q3(){const n=Q3();return Ei.useMemo(()=>Array.from(n.keys()).reduce((s,u)=>r=>Ei.createElement(s,null,Ei.createElement(u.Provider,{...r,value:n.get(u)})),s=>Ei.createElement(Y1,{...s})),[n])}var Ei,K3,Df,Y1,Kp,kp,k3=Et((()=>{Ei=xc(Cs(),1),K3=(()=>{var n,s;return typeof window<"u"&&(((n=window.document)==null?void 0:n.createElement)||((s=window.navigator)==null?void 0:s.product)==="ReactNative")})()?Ei.useLayoutEffect:Ei.useEffect,Df=qp(Ei.createContext(null)),Y1=class extends Ei.Component{render(){return Ei.createElement(Df.Provider,{value:this._reactInternals},this.props.children)}},Kp=Symbol.for("react.context"),kp=n=>n!==null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===Kp}));function F3(n){const s=Wa.useRef({});return Wa.useLayoutEffect(()=>{s.current=n}),Wa.useLayoutEffect(()=>()=>{s.current={}},[]),s.current}var Wa,Fp,Pp,$p,tv,ev,av,iv,P3,Su,nv,$3=Et((()=>{if(Wa=xc(Cs()),Yp(),Fp=xc(Dy()),Pp=Rp(),V3(),Ip(),k3(),"19.2.6".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.");$p=()=>{const n=Wa.useRef(0);return Wa.useMemo(()=>{n.current++},[]),n.current>1},tv=n=>{const s=Wa.useRef(null),u=Wa.useRef(null),r=Wa.useRef(null),d=F3(n),m=q3(),p=Wa.useRef(null),y=L=>{const{forwardedRef:_}=n;_&&(typeof _=="function"?_(L):_.current=L)},S=$p(),x=()=>{y(null),Su.flushSyncFromReconciler(()=>{Su.updateContainer(null,r.current,null)}),u.current?.destroy(),u.current=null};return Wa.useLayoutEffect(()=>(p.current&&(clearTimeout(p.current),p.current=null),u.current?y(u.current):(u.current=new Ed.Stage({width:n.width,height:n.height,container:s.current}),y(u.current),r.current=Su.createContainer(u.current,Pp.ConcurrentRoot,null,!1,null,"",console.error,console.error,console.error,null),Su.updateContainer(Wa.createElement(m,{},n.children),r.current,null,()=>{})),()=>{S?p.current=setTimeout(x,0):x()}),[]),Wa.useLayoutEffect(()=>{y(u.current),Rf(u.current,n,d),Su.updateContainer(Wa.createElement(m,{},n.children),r.current,null),Su.flushSyncWork()}),Wa.createElement("div",{ref:s,id:n.id,accessKey:n.accessKey,className:n.className,role:n.role,style:n.style,tabIndex:n.tabIndex,title:n.title})},ev="Layer",av="Group",iv="Circle",P3="Image",Su=(0,Fp.default)(By),Zy(()=>Su.flushSyncWork()),nv=Wa.forwardRef((n,s)=>Wa.createElement(Y1,{},Wa.createElement(tv,{...n,forwardedRef:s})))})),tb=Et((()=>{Gy(),$3()})),eb=gg({RetainerStickerCanvas:()=>nb});function ab(n){const[s,u]=(0,Dl.useState)(null);return(0,Dl.useEffect)(()=>{const r=new window.Image;let d=!0;return r.decoding="async",r.draggable=!1,r.onload=()=>{d&&u(r)},r.src=n,()=>{d=!1,r.onload=null}},[n]),s}function ib({piece:n,width:s,height:u,selectedPiece:r,interactive:d,onSelect:m,onCommitMove:p,constrain:y,onDragStateChange:S}){const x=ab(n.sticker.url),L=(0,Dl.useRef)({x:n.x,y:n.y}),_=Math.min(s,u)*.15,M=d&&r===n.uid;return(0,Dl.useEffect)(()=>{L.current={x:n.x,y:n.y}},[n.x,n.y]),(0,Cu.jsxs)(av,{x:n.x/100*s,y:n.y/100*u,rotation:n.rotation,scaleX:n.scale,scaleY:n.scale,draggable:d,listening:d,dragBoundFunc:w=>{const N=L.current,J=y({...n,x:N.x,y:N.y},w.x/s*100,w.y/u*100);return L.current=J,{x:J.x/100*s,y:J.y/100*u}},onClick:()=>m(n.uid),onTap:()=>m(n.uid),onDragStart:w=>{m(n.uid),S(!0),L.current={x:n.x,y:n.y},w.target.moveToTop()},onDragEnd:()=>{const w=L.current;p(n,w.x,w.y),S(!1)},children:[(0,Cu.jsx)(iv,{name:"sticker-hit-area",radius:_/2+2,fill:"rgba(255, 255, 255, 0.001)",listening:d}),M&&(0,Cu.jsx)("Circle",{radius:_/2+2,stroke:"#f58220",strokeWidth:2,shadowColor:"rgba(245, 130, 32, 0.22)",shadowBlur:8,listening:!1}),x&&(0,Cu.jsx)("Image",{image:x,x:-_/2,y:-_/2,width:_,height:_,listening:d,shadowColor:"rgba(0, 0, 0, 0.22)",shadowBlur:3,shadowOffsetY:2})]})}function nb(n){const s=(0,Dl.useRef)(null),[u,r]=(0,Dl.useState)({width:1,height:1}),{interactive:d,onDragStateChange:m}=n,p=(0,Dl.useMemo)(()=>{const y=n.pieces.filter(x=>x.uid!==n.selectedPiece),S=n.pieces.find(x=>x.uid===n.selectedPiece);return S?[...y,S]:y},[n.pieces,n.selectedPiece]);return(0,Dl.useEffect)(()=>{const y=s.current;if(!y)return;const S=()=>{const L=y.getBoundingClientRect();r({width:Math.max(1,L.width),height:Math.max(1,L.height)})};if(S(),typeof ResizeObserver>"u")return window.addEventListener("resize",S),()=>window.removeEventListener("resize",S);const x=new ResizeObserver(S);return x.observe(y),()=>x.disconnect()},[]),(0,Dl.useEffect)(()=>{d||m(!1)},[d,m]),(0,Cu.jsx)("div",{ref:s,className:"retainer-canvas-host",role:"application","aria-label":"พื้นที่จัดวางสติกเกอร์บนรีเทนเนอร์",children:(0,Cu.jsx)(nv,{width:u.width,height:u.height,onMouseDown:y=>{y.target===y.target.getStage()&&n.onSelect(null)},onTouchStart:y=>{y.target===y.target.getStage()&&n.onSelect(null)},children:(0,Cu.jsx)(ev,{children:p.map(y=>(0,lv.createElement)(ib,{...n,key:y.uid,piece:y,width:u.width,height:u.height}))})})})}var Dl,Cu,lv,lb=Et((()=>{Dl=xc(Cs(),1),tb(),Cu=pg(),lv=xc(Cs(),1)})),sb=i4(()=>Promise.resolve().then(()=>(lb(),eb)).then(n=>n.RetainerStickerCanvas),{ssr:!1}),Ms={base:"https://www.smileseasons.com/wp-content/uploads/2026/07/retainer-base.webp",plateMask:"https://www.smileseasons.com/wp-content/uploads/2026/07/retainer-main-plate.webp",coverMask:"https://www.smileseasons.com/wp-content/uploads/2026/07/retainer-acrylic-wire-cover.webp",silver:"https://www.smileseasons.com/wp-content/uploads/2026/07/glitter-silver.webp",multicolor:"https://www.smileseasons.com/wp-content/uploads/2026/07/glitter-multicolor.webp"},If="https://lin.ee/ZEZX3en",R1="ssdc-retainer-miniapp-v1",ub=15,cb=6.25,sv=[{x:43,y:38},{x:57,y:38},{x:33,y:50},{x:67,y:50},{x:27,y:67},{x:73,y:67},{x:50,y:46}],Wo=[{id:"none",label:"ไม่ใส่",note:"เรียบใส เห็นสีชัด"},{id:"silver",label:"สีเงิน",note:"ประกายละเอียด"},{id:"multicolor",label:"หลากสี",note:"สนุกและเด่นขึ้น"}],Qo=n=>Wo.find(s=>s.id===n)?.label??"ไม่ใส่";function ob(){return(0,Y.jsx)("svg",{"aria-hidden":"true",enableBackground:"new 0 0 100 100",viewBox:"0 0 100 100",children:(0,Y.jsxs)("g",{fill:"currentColor",children:[(0,Y.jsx)("path",{d:"m59.992897 41.7268105-34.7343883-12.8162957c-3.835701-1.4152966-8.0656681.5344715-9.4809656 4.3701706l-12.8162964 34.7343903c-1.415296 3.8356934.534472 8.0656662 4.3701715 9.4809647l34.7343903 12.8162918c3.8356972 1.4152985 8.06567-.5344696 9.4809647-4.3701706l12.8162956-34.7343864c1.4152973-3.8357011-.5344708-8.0656663-4.3701718-9.4809647zm-31.3180103-2.7188378c3.0898685 1.1401024 4.6362362 4.4949036 3.4961376 7.584774-1.1401024 3.0898666-4.4949036 4.6362381-7.584774 3.4961357-3.0898705-1.1400986-4.6362381-4.4948997-3.4961376-7.5847702 1.2466488-3.0505561 4.6014519-4.5969238 7.584774-3.4961395zm-12.1872768 33.0296326c-3.0898685-1.1400986-4.6362371-4.4949036-3.4961367-7.5847702 1.1401005-3.0898705 4.4949045-4.6362381 7.5847731-3.4961395s4.6362362 4.4949036 3.4961357 7.5847702c-1.1401005 3.0898742-4.4949036 4.6362381-7.5847721 3.4961395zm15.1302299-6.8857269c-3.0898685-1.1400986-4.6362381-4.4948997-3.4961376-7.5847702s4.4949017-4.6362419 7.5847721-3.4961395 4.6362381 4.4949036 3.4961395 7.584774c-1.1401024 3.0898704-4.4949035 4.6362342-7.584774 3.4961357zm6.9250412 15.0236816c-3.0898705-1.1400986-4.6362381-4.4949036-3.4961395-7.5847702 1.1401024-3.0898743 4.4949036-4.6362381 7.584774-3.4961395s4.6362381 4.4949036 3.4961395 7.5847702c-1.1401024 3.0898742-4.4949035 4.6362381-7.584774 3.4961395zm8.1379547-22.0552673c-3.0898705-1.1401024-4.6362381-4.4949036-3.4961395-7.584774 1.1401024-3.0898705 4.4949036-4.6362381 7.584774-3.4961357 3.0898705 1.1400986 4.6362381 4.4949036 3.4961395 7.5847702s-4.4949035 4.636238-7.584774 3.4961395z"}),(0,Y.jsx)("path",{d:"m90.1180267 9.2264185h-37.0234146c-4.0885201 0-7.3819771 3.2933855-7.3819771 7.3819742v15.0023994l15.8541679 5.8486843c6.1667786 2.2827454 9.3353958 9.153717 7.0526505 15.3204269l-3.0322723 8.2337379h24.5308456c4.0884476 0 7.3819733-3.2933846 7.3819733-7.3819733v-37.0232752c0-4.0885887-3.2935257-7.3819742-7.3819733-7.3819742zm-26.8022194 24.0765371c-3.5206757 0-6.3598976-2.83922-6.3598976-6.3599644 0-3.5204678 2.839222-6.3596878 6.3598976-6.3596878 3.5206032 0 6.3598289 2.83922 6.3598289 6.3596878 0 3.5207444-2.8392257 6.3599644-6.3598289 6.3599644zm16.5810204 16.4674835c-3.520607 0-6.3598251-2.839222-6.3598251-6.3599663 0-3.5204659 2.8392181-6.3596878 6.3598251-6.3596878s6.3598328 2.839222 6.3598328 6.3596878c0 3.5207444-2.8392258 6.3599663-6.3598328 6.3599663z"})]})})}function uv({flip:n=!1}){return(0,Y.jsx)("svg",{"aria-hidden":"true",viewBox:"0 0 480.008 480.008",style:n?{transform:"scaleX(-1)"}:void 0,children:(0,Y.jsx)("path",{fill:"currentColor",d:`M475.328,116.683l-96-96c-4.576-4.576-11.456-5.952-17.44-3.456c-5.984,2.496-9.888,8.32-9.888,14.784v48h-16 c-185.568,0-336,150.432-336,336v32c0,8.832,7.168,16,16,16h64c8.832,0,16-7.168,16-16v-32c0-132.544,107.456-240,240-240h16v48 c0,6.464,3.904,12.32,9.888,14.784c5.984,2.496,12.864,1.12,17.44-3.456l96-96C481.568,133.067,481.568,122.955,475.328,116.683z`})})}function qo(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`piece-${Date.now()}-${Math.random().toString(36).slice(2)}`}function zd(n,s,u){return Math.max(s,Math.min(u,n))}function rb(n){const s=[...n];for(let u=s.length-1;u>0;u-=1){const r=Math.floor(Math.random()*(u+1));[s[u],s[r]]=[s[r],s[u]]}return s}function Md(n){return new Promise((s,u)=>{const r=new Image;r.onload=()=>s(r),r.onerror=()=>u(new Error(`Unable to load ${n}`)),r.src=n})}function db(n,s,u){const r=s>=33+u&&s<=47-u&&n>=34+u&&n<=66-u,d=n>=22+u&&n<=43-u&&s>=42+u&&s<=75-u,m=n>=57+u&&n<=78-u&&s>=42+u&&s<=75-u;return r||d||m}function cv(n,s,u){const r=zd(Math.round(s/100*n.width),0,n.width-1),d=zd(Math.round(u/100*n.height),0,n.height-1);return n.data[(d*n.width+r)*4+3]}function ov(n,s,u,r){const d=cb*r;if(!n)return db(s,u,d);if(cv(n,s,u)<28)return!1;for(const m of[.58,1])for(let p=0;p<16;p+=1){const y=Math.PI*2*p/16;if(cv(n,s+Math.cos(y)*d*m,u+Math.sin(y)*d*m)<28)return!1}return!0}function j1(n,s,u,r){const d=zd(u,5,95),m=zd(r,5,95);if(ov(n,d,m,s.scale))return{x:d,y:m};let p={x:s.x,y:s.y};for(let y=1;y<=36;y+=1){const S=y/36,x=s.x+(d-s.x)*S,L=s.y+(m-s.y)*S;if(!ov(n,x,L,s.scale))break;p={x,y:L}}return p}function hb(n,s,u){const[r,d,m]=s.colors.map(y=>y.hex),p=(y,S,x,L,_)=>{const M=n.createLinearGradient(y,S,x,L);_.forEach(([w,N])=>M.addColorStop(w,N)),n.fillStyle=M,n.fillRect(0,0,u,u)};if(s.pattern==="p02")p(0,0,u,0,[[0,r],[.44,r],[.56,d],[1,d]]);else if(s.pattern==="p03"||s.pattern==="p05")if(typeof n.createConicGradient=="function"){const y=n.createConicGradient(((s.pattern==="p03"?306:300)-90)*(Math.PI/180),u*.5,u*.7);s.pattern==="p03"?(y.addColorStop(0,d),y.addColorStop(.09,d),y.addColorStop(.13,r),y.addColorStop(.2,r),y.addColorStop(.24,d),y.addColorStop(1,d)):([0,.1,.2].forEach(S=>{y.addColorStop(S,r),y.addColorStop(S+.05,d),y.addColorStop(S+.09,r)}),y.addColorStop(1,r)),n.fillStyle=y,n.fillRect(0,0,u,u)}else n.fillStyle=r,n.fillRect(0,0,u,u);else s.pattern==="p04"?p(0,0,u,0,[[0,r],[.28,r],[.38,d],[.62,d],[.72,m],[1,m]]):s.pattern==="p06"?p(0,0,0,u,[[0,r],[.4,r],[.52,d],[1,d]]):s.pattern==="p07"?p(0,0,0,u,[[0,"rgba(255,255,255,.92)"],[.92,r]]):s.pattern==="p08"?p(0,0,0,u,[[0,r],[1,d]]):(n.fillStyle=r,n.fillRect(0,0,u,u))}function fb(n,s,u,r,d,m){if(typeof n.roundRect=="function"){n.roundRect(s,u,r,d,m);return}const p=Math.min(m,r/2,d/2);n.moveTo(s+p,u),n.lineTo(s+r-p,u),n.quadraticCurveTo(s+r,u,s+r,u+p),n.lineTo(s+r,u+d-p),n.quadraticCurveTo(s+r,u+d,s+r-p,u+d),n.lineTo(s+p,u+d),n.quadraticCurveTo(s,u+d,s,u+d-p),n.lineTo(s,u+p),n.quadraticCurveTo(s,u,s+p,u),n.closePath()}async function mb(n){const s=document.createElement("canvas");s.width=1200,s.height=1480;const u=s.getContext("2d");if(!u)throw new Error("Canvas is unavailable");u.fillStyle="#ffffff",u.fillRect(0,0,s.width,s.height);const r=150,d=70,m=900;u.fillStyle="#f4f9ff",u.strokeStyle="#dce9f6",u.lineWidth=3,u.beginPath(),fb(u,r,d,m,m,26),u.fill(),u.stroke();const[p,y,S]=await Promise.all([Md(Ms.base),Md(Ms.plateMask),Md(Ms.coverMask)]),x=m*.03,L=r+x,_=d+x,M=m*.94;u.drawImage(p,L,_,M,M);const w=(U,F)=>{const ot=document.createElement("canvas");ot.width=M,ot.height=M;const ut=ot.getContext("2d");ut&&(hb(ut,U,M),ut.globalCompositeOperation="destination-in",ut.drawImage(F,0,0,M,M),u.save(),u.globalAlpha=.82,u.globalCompositeOperation="multiply",u.drawImage(ot,L,_),u.restore())};w(n.cover,S),w(n.plate,y);const N=async(U,F)=>{if(U==="none")return;const ot=await Md(U==="silver"?Ms.silver:Ms.multicolor),ut=document.createElement("canvas");ut.width=M,ut.height=M;const at=ut.getContext("2d");at&&(at.drawImage(ot,0,0,M,M),at.globalCompositeOperation="destination-in",at.drawImage(F,0,0,M,M),u.save(),u.globalAlpha=U==="silver"?.86:.9,u.drawImage(ut,L,_),u.restore())};await N(n.coverGlitter,S),await N(n.glitter,y),u.save(),u.globalAlpha=.22,u.globalCompositeOperation="multiply",u.drawImage(p,L,_,M,M),u.restore(),u.save(),u.globalAlpha=.15,u.globalCompositeOperation="screen",u.drawImage(p,L,_,M,M),u.restore();const J=document.createElement("canvas");J.width=M,J.height=M;const q=J.getContext("2d");if(q){for(const U of n.pieces){const F=await Md(U.sticker.url),ot=M*(ub/100)*U.scale;q.save(),q.translate(U.x/100*M,U.y/100*M),q.rotate(U.rotation*Math.PI/180),q.drawImage(F,-ot/2,-ot/2,ot,ot),q.restore()}q.globalCompositeOperation="destination-in",q.drawImage(y,0,0,M,M),u.drawImage(J,L,_)}const G=od(n.plate.pattern),V=od(n.cover.pattern);return u.fillStyle="#004a8d",u.font="700 38px sans-serif",u.fillText("Retainer DIY Design",150,1040),u.fillStyle="#27384a",u.font="600 25px sans-serif",[`เพลตหลัก: ${G.code} ${G.label}`,`สีเพลต: ${n.plate.colors.slice(0,G.tones).map(U=>U.code).join(" / ")}`,`หุ้มลวด: ${V.code} ${V.label}`,`สีหุ้มลวด: ${n.cover.colors.slice(0,V.tones).map(U=>U.code).join(" / ")}`,`กลิตเตอร์เพลต: ${Qo(n.glitter)}`,`กลิตเตอร์หุ้มลวด: ${Qo(n.coverGlitter)}`,`สติกเกอร์: ${n.pieces.length} ชิ้น`].forEach((U,F)=>u.fillText(U,150,1098+F*38)),u.fillStyle="#005aab",u.font="800 30px sans-serif",u.fillText("SMILE SEASONS",150,1394),u.fillStyle="#63768a",u.font="20px sans-serif",u.fillText("ภาพจำลองสำหรับประกอบการเลือกดีไซน์ สีและตำแหน่งจริงอาจต่างออกไปเล็กน้อย",150,1434),s}function gb(n){return new Promise((s,u)=>{n.toBlob(r=>{r?s(r):u(new Error("Unable to create PNG"))},"image/png")})}function pb(n){const s=document.createElement("textarea");s.value=n,s.style.position="fixed",s.style.opacity="0",document.body.appendChild(s),s.select();const u=document.execCommand("copy");return s.remove(),u}async function G1(n){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(n),!0}catch{}try{return pb(n)}catch{return!1}}function vb(){const[n,s]=(0,Kt.useState)(()=>ef()),[u,r]=(0,Kt.useState)(0),[d,m]=(0,Kt.useState)(0),[p,y]=(0,Kt.useState)([]),[S,x]=(0,Kt.useState)([]),[L,_]=(0,Kt.useState)("ทั้งหมด"),[M,w]=(0,Kt.useState)(36),[N,J]=(0,Kt.useState)(0),[q,G]=(0,Kt.useState)(0),[V,U]=(0,Kt.useState)("plate"),[F,ot]=(0,Kt.useState)(0),[ut,at]=(0,Kt.useState)(null),[mt,Rt]=(0,Kt.useState)(""),[zt,Gt]=(0,Kt.useState)(!1),[jt,Ht]=(0,Kt.useState)(!1),[Mt,Lt]=(0,Kt.useState)(!0),[lt,nt]=(0,Kt.useState)(!1),[et,Ct]=(0,Kt.useState)(null),[Nt,te]=(0,Kt.useState)(null),[j,tt]=(0,Kt.useState)(!1),[yt,Ot]=(0,Kt.useState)(""),[Wt,Bt]=(0,Kt.useState)(null),[kt,fa]=(0,Kt.useState)("design"),he=(0,Kt.useRef)(null),ti=(0,Kt.useRef)(null),an=(0,Kt.useRef)(null),di=(0,Kt.useRef)(null),nn=(0,Kt.useRef)(null),ei=(0,Kt.useRef)(!1),aa=(0,Kt.useCallback)(T=>{Rt(T),di.current&&clearTimeout(di.current),di.current=setTimeout(()=>Rt(""),3e3)},[]);(0,Kt.useEffect)(()=>{const T=new AbortController,D=new URLSearchParams(window.location.search),rt=!0,_t=D.get("preset")?.toLowerCase();return g4(D,{embed:rt,preset:_t??"default"}),Pe("retainer_designer_open",{entry_point:"elementor_embed"}),Pe("retainer_step_view",{step_index:1,step_name:_c[0]}),(async()=>{try{const ne=await fetch("data:application/json;base64,eyJjYXRlZ29yaWVzIjpbIuC4quC4seC4leC4p+C5jOC4meC5ieC4reC4ouC4meC5iOC4suC4o+C4seC4gSIsIuC4q+C4seC4p+C5g+C4iOC5geC4peC4sOC4q+C4meC5ieC4suC4ouC4tOC5ieC4oSIsIuC4nOC4seC4geC4nOC4peC5hOC4oeC5iSIsIuC4lOC4suC4pyIsIuC4guC4meC4oeC4q+C4p+C4suC4mSIsIuC4lOC4reC4geC5hOC4oeC5ieC5geC4peC4sOC4mOC4o+C4o+C4oeC4iuC4suC4leC4tCIsIuC4geC4teC4rOC4suC5geC4peC4sOC5gOC4geC4oSIsIuC4peC4suC4ouC4geC4o+C4suC4n+C4tOC4gSIsIuC5geC4n+C4meC4leC4suC4i+C4tSIsIuC4lOC4meC4leC4o+C4tSIsIuC4mOC4teC4oeC5hOC4l+C4oiIsIuC4mOC4teC4oeC4jeC4teC5iOC4m+C4uOC5iOC4mSIsIuC4mOC4teC4oeC5gOC4geC4suC4q+C4peC4tSIsIuC4mOC4teC4oeC4neC4o+C4seC5iOC4h+C5gOC4qOC4qiIsIuC4mOC4teC4oeC4reC4seC4h+C4geC4pOC4qSJdLCJpdGVt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I6Imh0dHBzOi8vd3d3LnNtaWxlc2Vhc29ucy5jb20vd3AtY29udGVudC91cGxvYWRzLzIwMjYvMDcvcGluZWFwcGxlLWphbS1qYXItMS53ZWJwIn0seyJpZCI6InN0cmF3YmVycnktamFtLWphci0xIiwibmFtZSI6IlN0cmF3YmVycnkgSmFtIEphciAxIiwiY2F0ZWdvcnkiOiLguJjguLXguKHguK3guLHguIfguIHguKTguKkiLCJ1cmwiOiJodHRwczovL3d3dy5zbWlsZXNlYXNvbnMuY29tL3dwLWNvbnRlbnQvdXBsb2Fkcy8yMDI2LzA3L3N0cmF3YmVycnktamFtLWphci0xLndlYnAifSx7ImlkIjoidGVhcG90LTEiLCJuYW1lIjoiVGVhcG90IDEiLCJjYXRlZ29yeSI6IuC4mOC4teC4oeC4reC4seC4h+C4geC4pOC4qSIsInVybCI6Imh0dHBzOi8vd3d3LnNtaWxlc2Vhc29ucy5jb20vd3AtY29udGVudC91cGxvYWRzLzIwMjYvMDcvdGVhcG90LTEud2VicCJ9XX0=",{signal:T.signal});if(!ne.ok)throw new Error("Sticker manifest unavailable");const Ta=await ne.json();Ht(rt),Lt(D.get("renderer")!=="dom"),y(Ta.items),x(Ta.categories);let hi=ef(),zi=null;try{zi=localStorage.getItem(R1)}catch{}if(zi)try{const Ia=JSON.parse(zi);Ia?.plate&&Ia?.cover&&Array.isArray(Ia.pieces)&&(hi={...hi,...Ia,coverGlitter:Ia.coverGlitter??"none"})}catch{try{localStorage.removeItem(R1)}catch{}}if(_t){const Ia=ia=>Ta.items.find(sl=>sl.id===ia)??null;if(_t==="champions"){const ia=Ia("soccer-ball-1");hi={...hi,plate:{pattern:"p08",colors:[_i("B02"),_i("B01"),_i("C01")]},cover:{pattern:"p01",colors:[_i("C01"),_i("B01"),_i("B02")]},glitter:"silver",stickerChoices:[ia,null,null],pieces:ia?[{uid:qo(),sticker:ia,x:50,y:43,rotation:0,scale:1}]:[]}}else if(_t==="valentine"){const ia=Ia("red-heart-1");hi={...hi,plate:{pattern:"p02",colors:[_i("P01"),_i("R01"),_i("C02")]},cover:{pattern:"p07",colors:[_i("P01"),_i("R01"),_i("C02")]},glitter:"multicolor",stickerChoices:[ia,null,null],pieces:ia?[{uid:qo(),sticker:ia,x:50,y:43,rotation:-8,scale:1}]:[]}}else if(_t==="pride"){const ia=Ia("rainbow-1");hi={...hi,plate:{pattern:"p04",colors:[_i("R01"),_i("Y03"),_i("B02")]},glitter:"multicolor",stickerChoices:[ia,null,null],pieces:ia?[{uid:qo(),sticker:ia,x:50,y:43,rotation:0,scale:1}]:[]}}}s(hi),Gt(!0)}catch(ne){ne.name!=="AbortError"&&(Gt(!0),aa("โหลดคลังสติกเกอร์ไม่สำเร็จ กรุณาลองใหม่"))}})(),()=>T.abort()},[aa]),(0,Kt.useEffect)(()=>{if(zt)try{localStorage.setItem(R1,JSON.stringify(n))}catch{}},[n,zt]),(0,Kt.useEffect)(()=>{const T=new Image;T.onload=()=>{const D=document.createElement("canvas");D.width=T.naturalWidth,D.height=T.naturalHeight;const rt=D.getContext("2d",{willReadFrequently:!0});if(rt){rt.drawImage(T,0,0);try{he.current={data:rt.getImageData(0,0,D.width,D.height).data,width:D.width,height:D.height}}catch{he.current=null}}},T.src=Ms.plateMask},[]),(0,Kt.useEffect)(()=>{if(!jt||typeof ResizeObserver>"u")return;const T=()=>{window.parent.postMessage({type:"ssdc-retainer-resize",height:document.documentElement.scrollHeight},"*")},D=new ResizeObserver(T);return D.observe(document.body),T(),()=>D.disconnect()},[jt]),(0,Kt.useEffect)(()=>{et&&nn.current?.focus()},[et]),(0,Kt.useEffect)(()=>()=>{di.current&&clearTimeout(di.current),et&&URL.revokeObjectURL(et)},[et]),(0,Kt.useEffect)(()=>()=>{ti.current!==null&&cancelAnimationFrame(ti.current)},[]);const La=od(n.plate.pattern),za=od(n.cover.pattern),Ma=n.pieces.find(T=>T.uid===ut)??null,ai=Ma?{x:3+Ma.x*.94,y:3+Ma.y*.94}:null,ii=(0,Kt.useMemo)(()=>{const T=L==="ทั้งหมด"?p:p.filter(D=>D.category===L);return{all:T,total:T.length,visible:T.slice(0,M)}},[L,p,M]),el=(T,D)=>{const rt=T.scrollWidth-T.clientWidth;D(rt>0?Math.min(2,Math.round(T.scrollLeft/rt*2)):0)},En=T=>(0,Y.jsx)("div",{className:"scroll-cue mobile-only","aria-hidden":"true",children:[0,1,2].map(D=>(0,Y.jsx)("i",{"data-active":T===D,"aria-hidden":"true"},D))}),ma=(T,D)=>{s(rt=>({...rt,[T]:D(rt[T])}))},Na=(T,D)=>{Yl("pattern"),ma(T,rt=>({...rt,pattern:D})),m(0),Pe("retainer_pattern_selected",{area:T,pattern:D})},Ko=(T,D)=>{Yl("color"),ma(T,rt=>{const _t=[...rt.colors];return _t[d]=D,{...rt,colors:_t}}),Pe("retainer_color_selected",{area:T,slot:d+1,code:D.code})},al=(T,D,rt)=>{s(_t=>({..._t,pieces:_t.pieces.map(Ut=>{if(Ut.uid!==T)return Ut;const ne=j1(he.current,Ut,D,rt);return{...Ut,...ne}})}))},Il=(0,Kt.useCallback)((T,D,rt)=>{al(T.uid,D,rt),Yl("sticker_move"),Pe("retainer_sticker_moved",{sticker_id:T.sticker.id,renderer:"canvas"})},[]),il=(0,Kt.useCallback)((T,D,rt)=>j1(he.current,T,D,rt),[]),Zi=(T,D,rt)=>{an.current={pieceId:T,x:D,y:rt},ti.current===null&&(ti.current=requestAnimationFrame(()=>{ti.current=null;const _t=an.current;an.current=null,_t&&al(_t.pieceId,_t.x,_t.y)}))},zn=()=>{ti.current!==null&&(cancelAnimationFrame(ti.current),ti.current=null);const T=an.current;an.current=null,T&&al(T.pieceId,T.x,T.y)},Lu=(T,D)=>{Yl("sticker_rotate"),s(rt=>({...rt,pieces:rt.pieces.map(_t=>_t.uid===T?{..._t,rotation:(_t.rotation+D+360)%360}:_t)}))},Ns=T=>{ut&&Lu(ut,T)},Mn=T=>{if(n.pieces.length>=7){aa("วางสติกเกอร์ได้สูงสุด 7 ชิ้น");return}Yl("sticker");const D=sv[n.pieces.length],rt={uid:qo(),sticker:T,x:D.x,y:D.y,rotation:0,scale:1};s(_t=>_t.pieces.length>=7?_t:{..._t,pieces:[..._t.pieces,rt]}),at(rt.uid),Pe("retainer_sticker_added",{sticker_id:T.id})},Da=T=>{const D=n.stickerChoices.findIndex(Ut=>Ut?.id===T.id);if(D>=0){ot(D),Mn(T);return}const rt=n.stickerChoices.findIndex(Ut=>!Ut);if(rt>=0){s(Ut=>{const ne=[...Ut.stickerChoices];return ne[rt]=T,{...Ut,stickerChoices:ne}}),ot(rt),Mn(T);return}const _t=n.stickerChoices[F];Yl("sticker_replace"),s(Ut=>{const ne=[...Ut.stickerChoices];return ne[F]=T,{...Ut,stickerChoices:ne,pieces:Ut.pieces.map(Ta=>Ta.sticker.id===_t?.id?{...Ta,sticker:T}:Ta)}}),Pe("retainer_sticker_added",{sticker_id:T.id,action:"replace"}),aa(`เปลี่ยนลายช่องที่ ${F+1} แล้ว`)},Ji=()=>{if(!Ma){aa("เลือกสติกเกอร์บนภาพก่อน");return}Mn(Ma.sticker)},Qa=T=>{Yl("sticker_remove"),s(D=>{const rt=D.pieces.filter(ne=>ne.uid!==T),_t=new Set(rt.map(ne=>ne.sticker.id)),Ut=D.stickerChoices.map(ne=>ne&&_t.has(ne.id)?ne:null);return{...D,pieces:rt,stickerChoices:Ut}}),at(null),aa("ลบสติกเกอร์แล้ว")},xu=()=>{ut&&Qa(ut)},Nd=()=>{s(ef()),r(0),m(0),at(null),ot(0),U("plate"),zg(),Pe("retainer_design_reset"),aa("เริ่มดีไซน์ใหม่แล้ว")},ko=()=>{Yl("randomize");const T=Ut=>Ut[Math.floor(Math.random()*Ut.length)],D=rb(p).slice(0,Math.min(3,p.length)),rt=D.length?T([1,2,3,4,5]):0,_t=Array.from({length:rt},(Ut,ne)=>({uid:qo(),sticker:D[ne%D.length],...sv[ne],rotation:Math.floor(Math.random()*12)*30,scale:1}));s({plate:{pattern:T(Pn).id,colors:[T(Ln),T(Ln),T(Ln)]},cover:{pattern:T(Pn).id,colors:[T(Ln),T(Ln),T(Ln)]},glitter:T(Wo).id,coverGlitter:T(Wo).id,stickerChoices:[...D,null,null,null].slice(0,3),pieces:_t}),at(null),Pe("retainer_design_randomized"),aa("สุ่มดีไซน์ใหม่ให้แล้ว")},ln=(0,Kt.useMemo)(()=>{const T=new Map;return n.pieces.forEach(D=>{T.set(D.sticker.name,(T.get(D.sticker.name)??0)+1)}),Array.from(T.entries())},[n.pieces]),Bi=(0,Kt.useMemo)(()=>s4(n,p),[n,p]),Nn=()=>{const T=new Map;return n.pieces.forEach(D=>{T.set(D.sticker.id,(T.get(D.sticker.id)??0)+1)}),{plate_pattern:n.plate.pattern,plate_color:n.plate.colors[0]?.code??"",cover_pattern:n.cover.pattern,cover_color:n.cover.colors[0]?.code??"",glitter:n.glitter,cover_glitter:n.coverGlitter,stickers:Array.from(T.entries()).map(([D,rt])=>`${D}:${rt}`).join("|"),design_code:sf(Bi)}},Tn=()=>{const T=n.plate.colors.slice(0,La.tones).map(rt=>`${rt.name} ${rt.code}`).join(" / "),D=n.cover.colors.slice(0,za.tones).map(rt=>`${rt.name} ${rt.code}`).join(" / ");return["สนใจสั่งทำรีเทนเนอร์ DIY (แบบลวด Hawley เพลตสี)",`เพลตหลัก: ${La.code} ${La.label} / ${T}`,`อะคริลิกหุ้มลวด: ${za.code} ${za.label} / ${D}`,`กลิตเตอร์เพลต: ${Qo(n.glitter)}`,`กลิตเตอร์หุ้มลวด: ${Qo(n.coverGlitter)}`,`สติกเกอร์: ${ln.length?ln.map(([rt,_t])=>`${rt} x${_t}`).join(", "):"ไม่มี"}`,`โค้ดดีไซน์: ${Bi}`,"รบกวนช่วยประเมินราคาและนัดหมายด้วยครับ/ค่ะ"].join(` `)},An=()=>{G1(Tn()).then(D=>{aa(D?"คัดลอกสรุปดีไซน์แล้ว วางในแชท LINE ได้เลย":"เปิด LINE แล้ว ส่งโค้ดดีไซน์ให้ทีมงานได้เลย")}),Pe("generate_lead",{method:"line_oa",pieces:n.pieces.length,...Nn()});const T=window.open(If,"_blank");T?T.opener=null:window.location.assign(If)},nl=T=>{T!==kt&&(fa(T),Pe("retainer_mode_toggled",{mode:T}))},Fo=()=>{G1(["สนใจลายจาก Collection รีเทนเนอร์ของ Smile Seasons","รบกวนช่วยแนะนำลายและประเมินราคาให้หน่อยครับ/ค่ะ"].join(` `)).then(D=>{aa(D?"คัดลอกข้อความแล้ว วางในแชท LINE ได้เลย":"เปิด LINE แล้ว สอบถามลายที่สนใจได้เลย")}),Pe("generate_lead",{method:"line_oa",source:"collection"});const T=window.open(If,"_blank");T?T.opener=null:window.location.assign(If)},wn=()=>{G1(Bi).then(T=>{aa(T?"คัดลอกโค้ดดีไซน์แล้ว":"คัดลอกไม่สำเร็จ กรุณากดค้างเพื่อคัดลอก")}),Pe("retainer_design_code_copied",{design_code:sf(Bi)})},_u=()=>{if(!p.length){Bt({tone:"error",text:"กำลังโหลดคลังสติกเกอร์ กรุณารอสักครู่"});return}const T=u4(yt,p,qo);if(!T.ok){Bt({tone:"error",text:T.reason}),Pe("retainer_design_code_applied",{status:"invalid"});return}s(T.design),at(null),ot(0),m(0),zg(),Bt({tone:"ok",text:T.missingStickers?`เปิดดีไซน์แล้ว (มีสติกเกอร์ ${T.missingStickers} ชิ้นที่ไม่มีในคลังปัจจุบัน)`:"เปิดดีไซน์จากโค้ดเรียบร้อยแล้ว"}),aa("เปิดดีไซน์จากโค้ดแล้ว"),Pe("retainer_design_code_applied",{status:"ok",design_code:sf(yt)})},Zl=async()=>{tt(!0);try{const T=await gb(await mb(n));et&&URL.revokeObjectURL(et);const D=URL.createObjectURL(T),rt=`smile-seasons-retainer-${La.code.toLowerCase()}-${za.code.toLowerCase()}.png`;Ct(D),te(new File([T],rt,{type:"image/png"})),Pe("retainer_design_saved",{pieces:n.pieces.length,...Nn()})}catch{aa("สร้างรูปไม่สำเร็จ กรุณาลองใหม่")}finally{tt(!1)}},Eu=async()=>{if(!Nt)return;try{if(navigator.share&&(!navigator.canShare||navigator.canShare({files:[Nt]}))){await navigator.share({files:[Nt],title:"Retainer DIY Design",text:"ดีไซน์รีเทนเนอร์จาก Smile Seasons"}),Pe("share",{method:"web_share",content_type:"retainer_design"});return}}catch(D){if(D.name==="AbortError")return}const T=document.createElement("a");T.href=et??"",T.download=Nt.name,T.click(),Pe("share",{method:"download",content_type:"retainer_design"})},On=()=>{et&&URL.revokeObjectURL(et),Ct(null),te(null)},qa=T=>{const D=zd(T,0,_c.length-1);r(D),m(0),J(0),G(0),D!==5&&at(null),D<=2?U("plate"):D<=4&&U("cover"),Pe("retainer_step_view",{step_index:D+1,step_name:_c[D]}),D===6&&p4({pieces:n.pieces.length,plate_pattern:n.plate.pattern,cover_pattern:n.cover.pattern,glitter:n.glitter})},Rc=T=>{_(T),w(36),G(0)},ll=T=>(0,Y.jsx)("div",{className:"pattern-grid",children:Pn.map(D=>(0,Y.jsxs)("button",{className:"pattern-card","data-active":n[T].pattern===D.id,onClick:()=>Na(T,D.id),type:"button","aria-pressed":n[T].pattern===D.id,children:[(0,Y.jsx)("span",{className:`pattern-preview ${T}`,style:{background:pm(D.id,n[T].colors)}}),(0,Y.jsxs)("span",{className:"pattern-meta",children:[(0,Y.jsx)("strong",{children:D.code}),(0,Y.jsx)("small",{children:D.label})]})]},D.id))}),Jl=(T,D)=>{const rt=T==="plate"?"glitter":"coverGlitter";Yl("glitter"),s(_t=>({..._t,[rt]:D})),Pe("retainer_glitter_selected",{glitter:D,area:T})},Bl=T=>{const D=T==="plate"?n.glitter:n.coverGlitter;return(0,Y.jsx)("div",{className:"glitter-grid",children:Wo.map(rt=>(0,Y.jsxs)("button",{type:"button","data-active":D===rt.id,onClick:()=>Jl(T,rt.id),"aria-pressed":D===rt.id,children:[(0,Y.jsx)("span",{"data-glitter":rt.id}),(0,Y.jsx)("strong",{children:rt.label}),(0,Y.jsx)("small",{children:rt.note})]},rt.id))})},Xi=T=>{const D=od(n[T].pattern),rt=Math.min(d,D.tones-1);return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)("div",{className:"slot-row","aria-label":"เลือกส่วนสี",children:Array.from({length:D.tones},(_t,Ut)=>(0,Y.jsxs)("button",{className:"slot-button","data-active":rt===Ut,onClick:()=>m(Ut),type:"button","aria-pressed":rt===Ut,children:[(0,Y.jsx)("span",{style:{background:n[T].colors[Ut].hex}}),"สี ",Ut+1]},Ut))}),(0,Y.jsxs)("div",{className:"selected-color","aria-live":"polite",children:[(0,Y.jsx)("span",{style:{background:n[T].colors[rt].hex}}),(0,Y.jsxs)("div",{children:[(0,Y.jsxs)("small",{children:["กำลังเลือกสี ",rt+1]}),(0,Y.jsxs)("strong",{children:[n[T].colors[rt].name," · ",n[T].colors[rt].code]})]})]}),(0,Y.jsx)("div",{className:"color-grid",onScroll:_t=>el(_t.currentTarget,J),"aria-label":"เลื่อนดูตัวเลือกสี",children:Ln.map(_t=>(0,Y.jsxs)("button",{className:"color-card","data-active":n[T].colors[rt].code===_t.code,onClick:()=>Ko(T,_t),type:"button","aria-label":`เลือกสี ${_t.name} ${_t.code}`,"aria-pressed":n[T].colors[rt].code===_t.code,children:[(0,Y.jsx)("span",{style:{background:_t.hex}}),(0,Y.jsx)("strong",{children:_t.name}),(0,Y.jsx)("small",{children:_t.code})]},_t.code))}),En(N)]})};return(0,Y.jsxs)("main",{className:`miniapp ${jt?"embed-mode":""}`,"data-step":u,"data-renderer":Mt?"canvas":"dom",children:[(0,Y.jsxs)("div",{className:"mode-switcher",role:"tablist","aria-label":"เลือกโหมด",children:[(0,Y.jsx)("button",{type:"button",role:"tab","aria-selected":kt==="design","data-active":kt==="design",onClick:()=>nl("design"),children:"ออกแบบเอง"}),(0,Y.jsx)("button",{type:"button",role:"tab","aria-selected":kt==="collection","data-active":kt==="collection",onClick:()=>nl("collection"),children:"ดู Collection ลายสำเร็จรูป"})]}),(0,Y.jsxs)("section",{className:"designer-intro","aria-labelledby":"app-title",children:[(0,Y.jsx)("h1",{id:"app-title",children:"มาลองออกแบบกัน"}),(0,Y.jsx)("p",{children:"ลองจับคู่สี รูปแบบเพลต กลิตเตอร์ และสติกเกอร์กว่า 150 แบบ ทุกครั้งที่ปรับ คุณจะเห็นตัวอย่างบนรีเทนเนอร์ทันที เมื่อได้ดีไซน์ที่ชอบแล้ว ส่งให้ทีมงานประเมินราคาและนัดหมายทาง LINE ได้เลย"})]}),kt==="collection"&&(0,Y.jsxs)("section",{className:"collection-shell","aria-label":"Collection ลายรีเทนเนอร์สำเร็จรูป",children:[(0,Y.jsx)("div",{className:"collection-grid",children:c4.map(T=>(0,Y.jsxs)("a",{className:"collection-card",href:T.image,target:"_blank",rel:"noopener noreferrer",title:T.desc,"aria-label":`${T.title}, ${T.desc}, คลิกเพื่อดูรูปขยาย`,onClick:()=>Pe("retainer_collection_image_expanded",{item:T.id}),children:[T.isNew&&(0,Y.jsx)("span",{className:"collection-new-tag",children:"New"}),(0,Y.jsx)("div",{className:"collection-image-container",children:(0,Y.jsx)("img",{src:T.image,alt:`รีเทนเนอร์ลาย ${T.title}`,loading:"lazy",width:200,height:200})}),(0,Y.jsx)("strong",{className:"collection-card-title",children:T.title})]},T.id))}),(0,Y.jsxs)("div",{className:"collection-cta",children:[(0,Y.jsx)("span",{children:"ถูกใจลายไหนแล้ว?"}),(0,Y.jsx)("button",{type:"button",className:"line-button",onClick:Fo,children:"เปิด LINE สอบถาม"})]})]}),(0,Y.jsxs)("section",{className:"designer-shell",hidden:kt!=="design","aria-label":"เครื่องมือออกแบบรีเทนเนอร์",children:[(0,Y.jsxs)("div",{className:"preview-column",children:[(0,Y.jsxs)("div",{className:"preview-heading",children:[(0,Y.jsxs)("div",{children:[(0,Y.jsx)("small",{children:"LIVE PREVIEW"}),(0,Y.jsx)("strong",{children:"ดีไซน์ของคุณ"})]}),(0,Y.jsxs)("span",{children:[n.pieces.length,"/7 ชิ้น"]})]}),(0,Y.jsxs)("div",{className:"stage",id:"retainer-stage",onContextMenu:T=>T.preventDefault(),onDragStart:T=>T.preventDefault(),children:[(0,Y.jsxs)("div",{className:"stage-actions",children:[(0,Y.jsx)("button",{onClick:ko,type:"button","aria-label":"สุ่มดีไซน์",title:"สุ่มดีไซน์",children:(0,Y.jsx)(ob,{})}),(0,Y.jsx)("button",{className:"reset-design",onClick:Nd,type:"button","aria-label":"รีเซ็ทดีไซน์",title:"รีเซ็ทดีไซน์",children:"รีเซ็ท"})]}),(0,Y.jsx)("div",{className:"floating-step-heading mobile-only","aria-live":"polite",children:(0,Y.jsxs)("strong",{children:[u+1,". ",_c[u]]})}),u===5&&(0,Y.jsx)("div",{className:"stage-choices","aria-label":"ลายสติกเกอร์ที่เลือก",children:n.stickerChoices.map((T,D)=>(0,Y.jsx)("button",{type:"button","data-active":F===D,onClick:()=>ot(D),"aria-label":T?`เลือก ${T.name}`:`ช่องสติกเกอร์ ${D+1}`,"aria-pressed":F===D,children:T?(0,Y.jsx)("img",{src:T.url,alt:"",draggable:!1}):(0,Y.jsx)("span",{children:"+"})},D))}),(0,Y.jsx)("a",{className:"stage-brand",href:"https://www.smileseasons.com/","aria-label":"Smile Seasons Dental Clinic",children:(0,Y.jsx)("img",{src:"https://www.smileseasons.com/wp-content/uploads/2026/04/Smile-Seasons-Dental-Clinic-Logo.webp",alt:"Smile Seasons Dental Clinic"})}),(0,Y.jsxs)("div",{className:"retainer-art","aria-label":"ตัวอย่างรีเทนเนอร์",children:[(0,Y.jsx)("span",{className:"retainer-shadow","aria-hidden":"true"}),(0,Y.jsx)("img",{className:"retainer-image base",src:Ms.base,alt:"ตัวอย่างรีเทนเนอร์แบบลวด"}),(0,Y.jsx)("span",{className:"retainer-fill cover",style:{background:pm(n.cover.pattern,n.cover.colors)},"aria-hidden":"true"}),(0,Y.jsx)("span",{className:"retainer-fill plate",style:{background:pm(n.plate.pattern,n.plate.colors)},"aria-hidden":"true"}),n.coverGlitter!=="none"&&(0,Y.jsx)("span",{className:"glitter-layer cover","data-glitter":n.coverGlitter,"aria-hidden":"true"}),n.glitter!=="none"&&(0,Y.jsx)("span",{className:"glitter-layer","data-glitter":n.glitter,"aria-hidden":"true"}),(0,Y.jsx)("img",{className:"retainer-image detail",src:Ms.base,alt:"","aria-hidden":"true"}),(0,Y.jsx)("img",{className:"retainer-image gloss",src:Ms.base,alt:"","aria-hidden":"true"}),Mt?(0,Y.jsx)(sb,{pieces:n.pieces,selectedPiece:ut,interactive:u===5,onSelect:at,onCommitMove:Il,constrain:il,onDragStateChange:nt}):(0,Y.jsx)("div",{className:"sticker-layer","aria-label":"สติกเกอร์ที่วางบนรีเทนเนอร์",children:n.pieces.map(T=>(0,Y.jsx)("button",{className:"sticker-piece","data-selected":T.uid===ut,type:"button",tabIndex:u===5?0:-1,style:{left:`${T.x}%`,top:`${T.y}%`,transform:`translate(-50%, -50%) rotate(${T.rotation}deg) scale(${T.scale})`},"aria-label":`${T.sticker.name} ลากเพื่อย้าย ใช้ปุ่มลูกศรเพื่อขยับ`,onPointerDown:D=>{D.isPrimary&&(D.preventDefault(),D.stopPropagation(),at(T.uid),ei.current=!1,D.currentTarget.setPointerCapture(D.pointerId),D.currentTarget.style.willChange="left, top")},onPointerMove:D=>{if(!D.currentTarget.hasPointerCapture(D.pointerId))return;D.preventDefault(),D.stopPropagation();const rt=D.currentTarget.parentElement;if(!rt)return;const _t=rt.getBoundingClientRect(),Ut=D.nativeEvent.getCoalescedEvents?.(),ne=Ut?.[Ut.length-1]??D.nativeEvent,Ta=j1(he.current,T,(ne.clientX-_t.left)/_t.width*100,(ne.clientY-_t.top)/_t.height*100);D.currentTarget.style.left=`${Ta.x}%`,D.currentTarget.style.top=`${Ta.y}%`,ei.current=!0,Zi(T.uid,Ta.x,Ta.y)},onPointerUp:D=>{D.preventDefault(),D.stopPropagation(),zn(),D.currentTarget.style.willChange="auto",D.currentTarget.hasPointerCapture(D.pointerId)&&D.currentTarget.releasePointerCapture(D.pointerId),ei.current&&(Yl("sticker_move"),Pe("retainer_sticker_moved",{sticker_id:T.sticker.id}),ei.current=!1)},onPointerCancel:D=>{zn(),ei.current=!1,D.currentTarget.style.willChange="auto",D.currentTarget.hasPointerCapture(D.pointerId)&&D.currentTarget.releasePointerCapture(D.pointerId)},onKeyDown:D=>{const rt=D.shiftKey?3:1,_t={ArrowLeft:[-rt,0],ArrowRight:[rt,0],ArrowUp:[0,-rt],ArrowDown:[0,rt]};if(_t[D.key]){D.preventDefault();const[Ut,ne]=_t[D.key];al(T.uid,T.x+Ut,T.y+ne)}else D.key.toLowerCase()==="q"?(D.preventDefault(),at(T.uid),Lu(T.uid,-15)):D.key.toLowerCase()==="e"?(D.preventDefault(),at(T.uid),Lu(T.uid,15)):(D.key==="Delete"||D.key==="Backspace")&&(D.preventDefault(),Qa(T.uid))},children:(0,Y.jsx)("img",{src:T.sticker.url,alt:"",draggable:!1})},T.uid))})]}),u===5&&Ma&&ai&&!lt&&(0,Y.jsxs)("div",{className:"piece-handles","aria-label":"เครื่องมือปรับสติกเกอร์ที่เลือก",children:[(0,Y.jsx)("button",{className:"piece-handle rotate-left",style:{left:`calc(${ai.x}% - 44px)`,top:`calc(${ai.y}% - 44px)`},onClick:()=>Ns(-15),type:"button","aria-label":"หมุนสติกเกอร์ 15 องศาไปทางซ้าย",children:(0,Y.jsx)(uv,{flip:!0})}),(0,Y.jsx)("button",{className:"piece-handle rotate-right",style:{left:`calc(${ai.x}% + 44px)`,top:`calc(${ai.y}% - 44px)`},onClick:()=>Ns(15),type:"button","aria-label":"หมุนสติกเกอร์ 15 องศาไปทางขวา",children:(0,Y.jsx)(uv,{})}),(0,Y.jsx)("button",{className:"piece-handle remove",style:{left:`calc(${ai.x}% - 44px)`,top:`calc(${ai.y}% + 44px)`},onClick:xu,type:"button","aria-label":"ลบสติกเกอร์ชิ้นที่เลือก",children:"ลบ"}),(0,Y.jsx)("button",{className:"piece-handle duplicate",style:{left:`calc(${ai.x}% + 44px)`,top:`calc(${ai.y}% + 44px)`},onClick:Ji,disabled:n.pieces.length>=7,type:"button","aria-label":"เพิ่มสติกเกอร์ลายเดิมอีกหนึ่งชิ้น",children:"เพิ่ม"})]}),u===5&&n.pieces.length===0&&(0,Y.jsx)("p",{className:"stage-empty",children:"เลือกลายด้านล่าง แล้วลากจัดตำแหน่งบนรีเทนเนอร์"})]}),(0,Y.jsxs)("div",{className:"piece-toolbar","data-active":!!Ma,"data-step-active":u===5,children:[(0,Y.jsx)("span",{children:Ma?`เลือก: ${Ma.sticker.name}`:"แตะสติกเกอร์บนภาพเพื่อแก้ไข"}),(0,Y.jsxs)("div",{children:[(0,Y.jsx)("button",{onClick:()=>Ns(-15),disabled:!Ma,type:"button",children:"↶ 15°"}),(0,Y.jsx)("button",{onClick:()=>Ns(15),disabled:!Ma,type:"button",children:"↷ 15°"}),(0,Y.jsx)("button",{onClick:Ji,disabled:!Ma||n.pieces.length>=7,type:"button",children:"ทำซ้ำ"}),(0,Y.jsx)("button",{className:"danger",onClick:xu,disabled:!Ma,type:"button",children:"ลบ"})]})]}),(0,Y.jsx)("p",{className:"preview-note",children:"ภาพจำลองสำหรับเลือกดีไซน์ ชิ้นงานจริงจะได้รับการตรวจและยืนยันก่อนผลิต"})]}),(0,Y.jsxs)("div",{className:"control-panel",children:[(0,Y.jsxs)("nav",{className:"desktop-tabs desktop-only","aria-label":"ส่วนออกแบบ",children:[(0,Y.jsxs)("button",{type:"button","data-active":u<=4,onClick:()=>qa(V==="plate"?0:3),"aria-current":u<=4?"step":void 0,children:[(0,Y.jsx)("i",{children:"1"}),(0,Y.jsx)("span",{children:"สีและลาย"})]}),(0,Y.jsxs)("button",{type:"button","data-active":u===5,onClick:()=>qa(5),"aria-current":u===5?"step":void 0,children:[(0,Y.jsx)("i",{children:"2"}),(0,Y.jsx)("span",{children:"สติกเกอร์"})]}),(0,Y.jsxs)("button",{type:"button","data-active":u===6,onClick:()=>qa(6),"aria-current":u===6?"step":void 0,children:[(0,Y.jsx)("i",{children:"3"}),(0,Y.jsx)("span",{children:"สรุปและส่ง"})]})]}),(0,Y.jsx)("nav",{className:"step-tabs mobile-only","aria-label":"ขั้นตอนออกแบบ",children:_c.map((T,D)=>(0,Y.jsxs)("button",{type:"button","data-active":u===D,"aria-current":u===D?"step":void 0,"aria-label":`ขั้นตอน ${D+1}: ${T}`,onClick:()=>qa(D),children:[(0,Y.jsx)("i",{"aria-hidden":"true"}),(0,Y.jsx)("span",{children:T})]},T))}),(0,Y.jsxs)("div",{className:"panel-content",children:[u<=4&&(0,Y.jsxs)("div",{className:"desktop-color-workflow desktop-only",children:[(0,Y.jsxs)("div",{className:"desktop-row",children:[(0,Y.jsx)("span",{className:"section-label",children:"เลือกส่วนที่ต้องการออกแบบ"}),(0,Y.jsxs)("div",{className:"area-selector",children:[(0,Y.jsx)("button",{type:"button","data-active":V==="plate",onClick:()=>{U("plate"),m(0),qa(0)},children:"เพลตหลัก"}),(0,Y.jsx)("button",{type:"button","data-active":V==="cover",onClick:()=>{U("cover"),m(0),qa(3)},children:"อะคริลิกหุ้มลวด"})]})]}),(0,Y.jsxs)("div",{className:"desktop-row",children:[(0,Y.jsxs)("span",{className:"section-label",children:["เลือกรูปแบบ",V==="plate"?"เพลตหลัก":"หุ้มลวด"]}),ll(V)]}),(0,Y.jsxs)("div",{className:"desktop-row",children:[(0,Y.jsx)("span",{className:"section-label",children:"เลือกสี"}),Xi(V)]}),(0,Y.jsxs)("div",{className:"desktop-row",children:[(0,Y.jsxs)("span",{className:"section-label",children:["เพิ่มกลิตเตอร์บน",V==="plate"?"เพลตหลัก":"อะคริลิกหุ้มลวด"]}),Bl(V)]}),(0,Y.jsx)("button",{className:"desktop-next",type:"button",onClick:()=>qa(5),children:"ถัดไป: เลือกสติกเกอร์ →"})]}),u<=4&&(0,Y.jsxs)("div",{className:`mobile-step-content mobile-only${u===4?" is-scrollable":""}`,children:[u===0&&ll("plate"),u===1&&Xi("plate"),u===2&&Bl("plate"),u===3&&ll("cover"),u===4&&(0,Y.jsxs)(Y.Fragment,{children:[Xi("cover"),(0,Y.jsx)("span",{className:"section-label",children:"เพิ่มกลิตเตอร์บนอะคริลิกหุ้มลวด"}),Bl("cover")]})]}),u===5&&(0,Y.jsxs)("div",{className:"sticker-controls",onContextMenu:T=>T.preventDefault(),onDragStart:T=>T.preventDefault(),children:[(0,Y.jsx)("div",{className:"choice-row","aria-label":"ลายสติกเกอร์ที่เลือก",children:n.stickerChoices.map((T,D)=>(0,Y.jsxs)("button",{type:"button","data-active":F===D,onClick:()=>ot(D),"aria-pressed":F===D,children:[T?(0,Y.jsx)("img",{src:T.url,alt:"",draggable:!1}):(0,Y.jsx)("i",{children:D+1}),(0,Y.jsx)("span",{children:T?.name??`ลาย ${D+1}`})]},D))}),(0,Y.jsx)("div",{className:"category-rail","aria-label":"หมวดหมู่สติกเกอร์",children:["ทั้งหมด",...S].map(T=>(0,Y.jsx)("button",{type:"button","data-active":L===T,onClick:()=>Rc(T),children:T},T))}),(0,Y.jsxs)("div",{className:"sticker-grid desktop-sticker-grid desktop-only","aria-busy":!zt,children:[!zt&&(0,Y.jsx)("p",{className:"loading-copy",children:"กำลังโหลดคลังสติกเกอร์…"}),ii.visible.map(T=>{const D=n.stickerChoices.some(rt=>rt?.id===T.id);return(0,Y.jsxs)("button",{type:"button","data-picked":D,onClick:()=>Da(T),"aria-label":`${D?"เพิ่มอีกชิ้น":"เลือก"} ${T.name}`,children:[(0,Y.jsx)("img",{src:T.url,alt:"",loading:"lazy",draggable:!1}),(0,Y.jsx)("span",{children:T.name})]},T.id)})]}),(0,Y.jsxs)("div",{className:"sticker-grid mobile-sticker-grid mobile-only","aria-busy":!zt,"aria-label":"เลื่อนดูสติกเกอร์",onScroll:T=>el(T.currentTarget,G),children:[!zt&&(0,Y.jsx)("p",{className:"loading-copy",children:"กำลังโหลดคลังสติกเกอร์…"}),ii.all.map(T=>{const D=n.stickerChoices.some(rt=>rt?.id===T.id);return(0,Y.jsxs)("button",{type:"button","data-picked":D,onClick:()=>Da(T),"aria-label":`${D?"เพิ่มอีกชิ้น":"เลือก"} ${T.name}`,children:[(0,Y.jsx)("img",{src:T.url,alt:"",draggable:!1}),(0,Y.jsx)("span",{children:T.name})]},T.id)})]},L),En(q),ii.visible.lengthw(T=>T+36),children:["ดูเพิ่มอีก ",Math.min(36,ii.total-ii.visible.length)," ลาย"]}),(0,Y.jsx)("button",{className:"desktop-next desktop-only",type:"button",onClick:()=>qa(6),children:"ออกแบบเสร็จแล้ว ไปสรุปและส่งดีไซน์ →"})]}),u===6&&(0,Y.jsxs)("div",{className:"summary",children:[(0,Y.jsxs)("div",{className:"summary-overview",children:[(0,Y.jsxs)("article",{className:"summary-card",children:[(0,Y.jsx)("span",{children:"เพลตหลัก"}),(0,Y.jsxs)("strong",{children:[La.code," · ",La.label]}),(0,Y.jsxs)("div",{className:"summary-colors","aria-label":"สีเพลตหลัก",children:[n.plate.colors.slice(0,La.tones).map(T=>(0,Y.jsx)("i",{style:{background:T.hex},title:`${T.name} (${T.code})`},T.code)),(0,Y.jsx)("small",{children:n.plate.colors.slice(0,La.tones).map(T=>T.code).join(" / ")})]})]}),(0,Y.jsxs)("article",{className:"summary-card",children:[(0,Y.jsx)("span",{children:"หุ้มลวด"}),(0,Y.jsxs)("strong",{children:[za.code," · ",za.label]}),(0,Y.jsxs)("div",{className:"summary-colors","aria-label":"สีหุ้มลวด",children:[n.cover.colors.slice(0,za.tones).map(T=>(0,Y.jsx)("i",{style:{background:T.hex},title:`${T.name} (${T.code})`},T.code)),(0,Y.jsx)("small",{children:n.cover.colors.slice(0,za.tones).map(T=>T.code).join(" / ")})]})]}),(0,Y.jsxs)("div",{className:"summary-facts",children:[(0,Y.jsxs)("div",{children:[(0,Y.jsx)("span",{children:"กลิตเตอร์เพลต"}),(0,Y.jsx)("strong",{children:Qo(n.glitter)}),(0,Y.jsx)("small",{children:Wo.find(T=>T.id===n.glitter)?.note})]}),(0,Y.jsxs)("div",{children:[(0,Y.jsx)("span",{children:"กลิตเตอร์หุ้มลวด"}),(0,Y.jsx)("strong",{children:Qo(n.coverGlitter)}),(0,Y.jsx)("small",{children:Wo.find(T=>T.id===n.coverGlitter)?.note})]}),(0,Y.jsxs)("div",{children:[(0,Y.jsx)("span",{children:"สติกเกอร์"}),(0,Y.jsx)("strong",{children:ln.length?`${n.pieces.length} ชิ้น · ${ln.length} แบบ`:"ไม่ได้เลือก"}),(0,Y.jsx)("small",{children:ln.length?ln.map(([T,D])=>`${T} ×${D}`).join(", "):"ยังไม่ได้เพิ่มสติกเกอร์"})]})]})]}),(0,Y.jsxs)("div",{className:"design-code-box",children:[(0,Y.jsx)("span",{className:"design-code-title",children:"โค้ดดีไซน์ของคุณ"}),(0,Y.jsxs)("div",{className:"design-code-value",children:[(0,Y.jsx)("code",{children:Bi}),(0,Y.jsx)("button",{type:"button",onClick:wn,children:"คัดลอก"})]}),(0,Y.jsx)("small",{children:"เก็บโค้ดนี้ไว้ แล้วนำกลับมากรอกเพื่อเปิดดูดีไซน์เดิมได้ทุกเมื่อ"}),(0,Y.jsxs)("div",{className:"design-code-restore",children:[(0,Y.jsx)("input",{type:"text",value:yt,onChange:T=>{Ot(T.target.value),Bt(null)},placeholder:"วางโค้ดที่นี่เพื่อเปิดดีไซน์เดิม","aria-label":"กรอกโค้ดดีไซน์เพื่อเปิดดูอีกครั้ง",spellCheck:!1,autoCapitalize:"none"}),(0,Y.jsx)("button",{type:"button",onClick:_u,children:"เปิดดีไซน์"})]}),Wt&&(0,Y.jsx)("p",{className:"design-code-status","data-tone":Wt.tone,role:"status",children:Wt.text})]}),(0,Y.jsxs)("div",{className:"summary-actions",children:[(0,Y.jsx)("button",{className:"save-button",type:"button",onClick:Zl,disabled:j,children:j?"กำลังสร้างรูป…":"1. บันทึกรูปดีไซน์"}),(0,Y.jsx)("button",{className:"line-button",type:"button",onClick:An,children:"2. เปิด LINE เพื่อส่งดีไซน์"})]}),(0,Y.jsx)("p",{className:"summary-help",children:"ข้อความสรุปจะถูกคัดลอกให้อัตโนมัติ หากไม่เห็นข้อความใน LINE สามารถกดวางได้ทันที"})]})]}),(0,Y.jsxs)("div",{className:"panel-navigation mobile-only",children:[(0,Y.jsx)("button",{className:"back",type:"button",onClick:()=>qa(u-1),disabled:u===0,children:"ย้อนกลับ"}),u<_c.length-1&&(0,Y.jsxs)("button",{className:"next",type:"button",onClick:()=>qa(u+1),children:["ถัดไป: ",_c[u+1]," →"]})]})]})]}),kt==="design"&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)("p",{className:"designer-disclaimer",children:"ภาพนี้ใช้สำหรับดูตัวอย่างดีไซน์ สีและตำแหน่งสติกเกอร์ของชิ้นงานจริงอาจต่างออกไปเล็กน้อย ทีมงานจะยืนยันกับคุณอีกครั้งก่อนผลิต"}),(0,Y.jsxs)("section",{className:"desktop-section-actions desktop-only","aria-label":"บันทึกและส่งดีไซน์",children:[(0,Y.jsx)("button",{className:"save-button",type:"button",onClick:Zl,disabled:j,children:j?"กำลังสร้างรูป…":"1. บันทึกรูปดีไซน์"}),(0,Y.jsx)("button",{className:"line-button",type:"button",onClick:An,children:"2. เปิด LINE เพื่อส่งดีไซน์"})]})]}),(0,Y.jsxs)("footer",{className:"app-footer",children:[(0,Y.jsx)("strong",{children:"Smile Seasons Dental Clinic"}),(0,Y.jsx)("span",{children:"ภาพในเครื่องมือเป็นภาพจำลอง ทีมงานจะยืนยันดีไซน์ก่อนผลิตจริง"})]}),(0,Y.jsx)("div",{className:"toast","data-visible":!!mt,role:"status","aria-live":"polite",children:mt}),et&&Nt&&(0,Y.jsxs)("div",{className:"export-modal",role:"dialog","aria-modal":"true","aria-labelledby":"export-title",onKeyDown:T=>{if(T.key==="Escape"&&On(),T.key==="Tab"){const D=Array.from(T.currentTarget.querySelectorAll("button, a[href]"));if(!D.length)return;const rt=D[0],_t=D[D.length-1];T.shiftKey&&document.activeElement===rt?(T.preventDefault(),_t.focus()):!T.shiftKey&&document.activeElement===_t&&(T.preventDefault(),rt.focus())}},children:[(0,Y.jsx)("button",{className:"modal-backdrop",type:"button",onClick:On,"aria-label":"ปิดหน้าตัวอย่าง"}),(0,Y.jsxs)("div",{className:"export-dialog",children:[(0,Y.jsx)("button",{ref:nn,className:"modal-close",type:"button",onClick:On,"aria-label":"ปิด",children:"×"}),(0,Y.jsx)("span",{className:"modal-kicker",children:"DESIGN READY"}),(0,Y.jsx)("h2",{id:"export-title",children:"รูปดีไซน์พร้อมแล้ว"}),(0,Y.jsx)("img",{src:et,alt:"ตัวอย่างไฟล์ดีไซน์รีเทนเนอร์"}),(0,Y.jsxs)("div",{children:[(0,Y.jsx)("a",{href:et,target:"_blank",rel:"noopener noreferrer",children:"เปิดรูปเต็ม"}),(0,Y.jsx)("button",{type:"button",onClick:Eu,children:"บันทึก / แชร์รูป"})]}),(0,Y.jsx)("p",{children:"บน iPhone เลือก “บันทึก / แชร์รูป” แล้วเลือก Save Image หรือบันทึกไปที่ Files"})]})]})]})}var yb='@font-face{font-family:IBM Plex Sans Thai;src:url(/fonts/ibm-plex-sans-thai-regular.woff2)format("woff2");font-style:normal;font-weight:400;font-display:swap}@font-face{font-family:IBM Plex Sans Thai;src:url(/fonts/ibm-plex-sans-thai-semibold.woff2)format("woff2");font-style:normal;font-weight:600;font-display:swap}@font-face{font-family:IBM Plex Sans Thai;src:url(/fonts/ibm-plex-sans-thai-bold.woff2)format("woff2");font-style:normal;font-weight:800;font-display:swap}:root{--blue:#005aab;--blue-dark:#004a8d;--blue-ink:#0a355d;--blue-soft:#eaf6ff;--orange:#f58220;--orange-soft:#fff4e6;--ink:#333;--muted:#596b7d;--border:#e4edf6;--border-strong:#d7e6f5;--surface:#fff;--surface-tint:#f6fbff;--surface-sunk:#eef3f7;--canvas:#f8fbff;--shadow:0 16px 44px #004a8d17;--success:#1c7a4a;--warning:#c4450c;--danger:#b42318;--danger-border:#d92d20;--line-green:#06c755;--track:#c5d8e9;--track-strong:#c7dcec;--track-soft:#a9cbe5;--ease-out:cubic-bezier(.16, 1, .3, 1);--ease-in-out:cubic-bezier(.65, 0, .35, 1);--dur-short:.16s;--dur-medium:.2s}*{box-sizing:border-box}html{scroll-behavior:smooth;background:var(--canvas);min-width:320px}body{background:radial-gradient(circle at 0 0, #48c7df1a, transparent 32rem), var(--canvas);min-height:100vh;color:var(--ink);margin:0;font-family:IBM Plex Sans Thai,system-ui,sans-serif}button,a{font:inherit}button{-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible{outline:3px solid var(--orange);outline-offset:2px}.miniapp{min-height:100vh;overflow-x:clip}.mobile-only{display:none!important}.designer-intro{text-align:center;width:min(100% - 3rem,1120px);margin:1rem auto 1.6rem}.designer-intro h1{color:var(--blue-dark);margin:0 0 .55rem;font-size:clamp(1.7rem,4vw,2.45rem);font-weight:800;line-height:1.25}.designer-intro p{max-width:760px;color:var(--muted);margin:0 auto;font-size:1rem;line-height:1.68}.mode-switcher{border:1px solid var(--border-strong);background:var(--surface-tint);border-radius:99px;flex:none;gap:.2rem;width:fit-content;max-width:min(100% - 2rem,380px);margin:.45rem auto .3rem;padding:.15rem;display:flex}.mode-switcher button{min-height:30px;color:var(--muted);cursor:pointer;white-space:nowrap;transition:background var(--dur-medium) var(--ease-out), color var(--dur-medium) var(--ease-out);background:0 0;border:0;border-radius:99px;padding-inline:.8rem;font-size:.7rem;font-weight:700}.mode-switcher button[data-active=true]{background:var(--blue);color:var(--surface);box-shadow:0 8px 18px #005aab38}.collection-shell{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;flex-direction:column;gap:.4rem;width:min(100% - 1rem,1120px);min-height:0;margin:0 auto;display:flex;overflow-y:auto}.collection-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.85rem;display:grid}.collection-card{background:var(--surface-sunk);cursor:zoom-in;border-radius:14px;align-self:start;display:block;position:relative;overflow:hidden;box-shadow:0 2px 6px #004a8d24}.collection-new-tag{z-index:1;background:var(--orange);color:var(--surface);letter-spacing:.02em;border-radius:10px;padding:2px 9px;font-size:.66rem;font-weight:700;position:absolute;top:6px;right:6px;box-shadow:0 2px 6px #0003}.collection-image-container{display:block;overflow:hidden}.collection-image-container img{aspect-ratio:1;object-fit:cover;width:100%;height:auto;transition:transform var(--dur-medium) var(--ease-out);display:block}.collection-card:hover .collection-image-container img{transform:scale(1.08)}.collection-card-title{color:var(--surface);text-overflow:ellipsis;white-space:nowrap;background:linear-gradient(#0a355d00,#0a355de0);padding:14px 9px 7px;font-size:.78rem;font-weight:700;line-height:1.3;position:absolute;bottom:0;left:0;right:0;overflow:hidden}.collection-cta{border:1px solid var(--border-strong);background:var(--blue-soft);border-radius:12px;flex:none;justify-content:center;align-items:center;gap:.5rem;margin-top:auto;padding:.5rem .6rem;display:flex;position:sticky;bottom:0;box-shadow:0 -6px 14px #f8fbffe6}.collection-cta span{color:var(--blue-ink);font-size:.7rem;font-weight:600}.collection-cta .line-button{cursor:pointer;border-radius:99px;flex:none;min-height:30px;padding-inline:.8rem;font-size:.7rem;font-weight:800}@media (width>=768px){.collection-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:1.15rem}}.designer-shell{grid-template-columns:minmax(0,1fr) 390px;align-items:start;gap:1.7rem;width:min(100% - 3rem,1120px);margin:0 auto 1rem;display:grid}.designer-shell[hidden]{display:none}.preview-column{min-width:0;position:sticky;top:1rem}.preview-heading{justify-content:space-between;align-items:end;max-width:560px;margin:0 auto .55rem;padding:0 .2rem;display:flex}.preview-heading>div{display:grid}.preview-heading small{color:var(--blue);letter-spacing:.1em;font-size:.62rem;font-weight:800}.preview-heading strong{color:var(--blue-dark);font-size:1.08rem}.preview-heading>span{background:var(--blue-soft);color:var(--blue-dark);font-variant-numeric:tabular-nums;border-radius:99px;padding:.3rem .6rem;font-size:.68rem;font-weight:800}.stage{aspect-ratio:1;border:1px solid var(--border);background:radial-gradient(circle at 50% 44%, #fffffffa 0 36%, #e7f5ffd1 64%, #fff4e67a 100%), linear-gradient(145deg, var(--surface), var(--surface-tint));isolation:isolate;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;border-radius:8px;width:100%;max-width:560px;margin:0 auto;position:relative;overflow:hidden;box-shadow:0 18px 45px #005aab1f}.stage-actions{z-index:25;gap:.4rem;display:flex;position:absolute;top:.8rem;right:.8rem}.stage-actions button{border:1px solid var(--border-strong);min-width:44px;min-height:44px;color:var(--blue-dark);cursor:pointer;background:#fffffff2;border-radius:50%;place-items:center;padding:.35rem;font-size:.62rem;font-weight:800;display:grid;box-shadow:0 8px 22px #004a8d21}.stage-actions .reset-design{border-color:var(--orange);background:var(--orange);min-width:58px;color:var(--surface);border-radius:99px;font-size:.7rem;box-shadow:0 8px 22px #f582203d}.stage-actions svg,.panel-navigation svg{fill:currentColor;width:19px;height:19px}.stage-brand{z-index:26;background:0 0;place-items:center;width:72px;height:54px;padding:0;display:grid;position:absolute;bottom:.7rem;right:.7rem}.stage-brand img{object-fit:contain;width:100%;height:100%;display:block}.retainer-art{width:100%;height:100%;position:relative}.retainer-shadow{z-index:0;filter:blur(7px);background:radial-gradient(#2d465a38,#0000 68%);border-radius:50%;height:13%;position:absolute;bottom:15%;left:16%;right:16%}.retainer-image,.retainer-fill,.glitter-layer,.sticker-layer,.retainer-canvas-host{width:94%;height:94%;position:absolute;inset:3%}.retainer-image{object-fit:contain;pointer-events:none}.retainer-image.base{z-index:1}.retainer-fill{z-index:2;opacity:1;mix-blend-mode:multiply;-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.retainer-fill.plate{z-index:3;-webkit-mask-image:url(/assets/retainer/retainer-main-plate.webp);mask-image:url(/assets/retainer/retainer-main-plate.webp)}.retainer-fill.cover{-webkit-mask-image:url(/assets/retainer/retainer-acrylic-wire-cover.webp);mask-image:url(/assets/retainer/retainer-acrylic-wire-cover.webp)}.glitter-layer{z-index:4;filter:drop-shadow(0 0 1px #2a364659);background-position:50%;background-repeat:no-repeat;background-size:contain;-webkit-mask-image:url(/assets/retainer/retainer-main-plate.webp);mask-image:url(/assets/retainer/retainer-main-plate.webp);-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.glitter-layer.cover{z-index:2;-webkit-mask-image:url(/assets/retainer/retainer-acrylic-wire-cover.webp);mask-image:url(/assets/retainer/retainer-acrylic-wire-cover.webp)}.glitter-layer[data-glitter=silver]{background-image:url(/assets/retainer/glitter-silver.webp)}.glitter-layer[data-glitter=multicolor]{background-image:url(/assets/retainer/glitter-multicolor.webp)}.retainer-image.detail{z-index:5;opacity:.22;mix-blend-mode:multiply}.retainer-image.gloss{z-index:6;opacity:.15;mix-blend-mode:screen}.sticker-layer,.retainer-canvas-host{z-index:8;overscroll-behavior:contain;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;overflow:hidden;-webkit-mask-image:url(/assets/retainer/retainer-main-plate.webp);mask-image:url(/assets/retainer/retainer-main-plate.webp);-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.retainer-canvas-host canvas{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;display:block;touch-action:none!important}.sticker-piece{aspect-ratio:1;cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;background:0 0;border:2px solid #0000;border-radius:50%;width:15%;padding:2px;position:absolute}.sticker-piece:after{content:"";border-radius:50%;position:absolute;inset:-9px}.sticker-piece[data-selected=true]{z-index:2;border-color:var(--orange);box-shadow:0 0 0 4px #f582202e}.miniapp:not([data-step="5"]) .sticker-piece{pointer-events:none}.miniapp:not([data-step="5"]) .sticker-piece[data-selected=true]{box-shadow:none;border-color:#0000}.sticker-piece img{object-fit:contain;filter:drop-shadow(0 2px 3px #00000038);pointer-events:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none;-webkit-touch-callout:none;width:100%;height:100%;display:block}.stage-choices{z-index:26;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;gap:.3rem;display:flex;position:absolute;bottom:.65rem;left:.65rem}.stage-choices button{border:1.5px dashed var(--border-strong);width:42px;height:42px;color:var(--muted);cursor:pointer;background:#fffffff5;border-radius:50%;place-items:center;padding:4px;display:grid;box-shadow:0 4px 12px #004a8d29}.stage-choices button[data-active=true]{border-color:var(--orange);border-style:solid}.stage-choices img{object-fit:contain;pointer-events:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none;-webkit-touch-callout:none;width:100%;height:100%}.stage-choices span{font-size:1rem;font-weight:800}.stage-empty{z-index:20;width:min(78%,330px);color:var(--blue-dark);text-align:center;background:#fffffff0;border:1.5px dashed #005aab57;border-radius:13px;margin:0;padding:.55rem .8rem;font-size:.75rem;font-weight:700;position:absolute;top:56%;left:50%;transform:translate(-50%,-50%);box-shadow:0 8px 20px #004a8d1a}.piece-handles{z-index:27;pointer-events:none;position:absolute;inset:0}.piece-handle{border:1.5px solid var(--blue);width:44px;height:44px;color:var(--blue);cursor:pointer;pointer-events:auto;touch-action:manipulation;background:#fffffff5;border-radius:50%;place-items:center;padding:0;font:800 1rem/1 inherit;display:grid;position:absolute;transform:translate(-50%,-50%);box-shadow:0 4px 12px #004a8d2e}.piece-handle svg{flex:none;width:18px;height:18px}.piece-handle.remove{border-color:var(--danger-border);color:var(--danger)}.piece-handle.remove,.piece-handle.duplicate{border-radius:99px;width:54px;height:32px;font-size:.62rem}.piece-handle:disabled{opacity:.4;cursor:default}.piece-toolbar{border:1px solid var(--border);background:var(--surface);border-radius:12px;justify-content:space-between;align-items:center;gap:.6rem;max-width:560px;min-height:48px;margin:.55rem auto 0;padding:.45rem .55rem;display:flex}.piece-toolbar[data-step-active=false]{display:none}.piece-toolbar>span{min-width:0;color:var(--muted);text-overflow:ellipsis;white-space:nowrap;font-size:.68rem;overflow:hidden}.piece-toolbar>div{flex:none;gap:.3rem;display:flex}.piece-toolbar button{border:1px solid var(--border-strong);background:var(--canvas);min-height:34px;color:var(--blue-dark);cursor:pointer;border-radius:8px;padding:.3rem .55rem;font-size:.64rem;font-weight:700}.piece-toolbar button.danger{color:var(--danger)}.piece-toolbar button:disabled{opacity:.35;cursor:default}.preview-note,.designer-disclaimer{color:var(--muted);text-align:center;font-size:.76rem;font-style:italic;line-height:1.55}.preview-note{max-width:500px;margin:.65rem auto 0}.control-panel{border:1px solid var(--border-strong);background:var(--surface);min-width:0;box-shadow:var(--shadow);border-radius:20px;overflow:hidden}.desktop-tabs{border-bottom:1px solid var(--border-strong);background:var(--canvas);gap:.35rem;padding:.55rem;display:flex}.desktop-tabs button{min-width:0;min-height:62px;color:var(--muted);cursor:pointer;background:0 0;border:0;border-radius:13px;flex-direction:column;flex:1 1 0;justify-content:center;align-items:center;gap:4px;padding:.45rem .25rem;font-size:.74rem;font-weight:700;display:flex}.desktop-tabs i{border:1.5px solid var(--border-strong);background:var(--surface);width:25px;height:25px;color:var(--blue);border-radius:50%;place-items:center;font-size:.72rem;font-style:normal;font-weight:800;display:grid}.desktop-tabs button[data-active=true]{background:var(--surface);color:var(--blue-dark);box-shadow:0 4px 12px #004a8d14}.desktop-tabs button[data-active=true] i{border-color:var(--orange);background:var(--orange);color:var(--surface)}.panel-content{padding:1.2rem}.desktop-color-workflow,.sticker-controls,.summary{min-width:0}.desktop-row{margin-bottom:1.15rem}.section-label{color:var(--blue-dark);margin-bottom:.6rem;font-size:.9rem;font-weight:700;display:block}.area-selector{grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;display:grid}.area-selector button{border:1.5px solid var(--border-strong);background:var(--canvas);min-height:46px;color:var(--muted);cursor:pointer;border-radius:11px;font-size:.78rem;font-weight:700}.area-selector button[data-active=true]{border-color:var(--blue);background:var(--blue-soft);color:var(--blue-dark)}.pattern-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:.5rem;display:grid}.pattern-card{border:1.5px solid var(--border-strong);background:var(--surface);min-width:0;color:var(--ink);cursor:pointer;text-align:left;border-radius:10px;padding:.32rem;overflow:hidden}.pattern-card[data-active=true]{border-color:var(--blue);box-shadow:0 0 0 3px #005aab14}.pattern-preview{aspect-ratio:1.24;width:100%;margin-bottom:.3rem;display:block;-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:110%;mask-size:110%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.pattern-preview.plate{-webkit-mask-image:url(/assets/retainer/retainer-main-plate.webp);mask-image:url(/assets/retainer/retainer-main-plate.webp)}.pattern-preview.cover{-webkit-mask-image:url(/assets/retainer/retainer-acrylic-wire-cover.webp);mask-image:url(/assets/retainer/retainer-acrylic-wire-cover.webp)}.pattern-meta{min-width:0;display:grid}.pattern-meta strong{color:var(--blue-dark);font-size:.65rem}.pattern-meta small{color:var(--muted);text-overflow:ellipsis;white-space:nowrap;font-size:.54rem;overflow:hidden}.slot-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:.45rem;margin-bottom:.55rem;display:grid}.slot-button{border:1.5px solid var(--border-strong);background:var(--canvas);min-width:0;min-height:40px;color:var(--muted);cursor:pointer;border-radius:10px;justify-content:center;align-items:center;gap:.38rem;font-size:.7rem;font-weight:700;display:inline-flex}.slot-button>span{border:2px solid var(--surface);border-radius:50%;width:17px;height:17px;box-shadow:0 0 0 1px #0000001a}.slot-button[data-active=true]{border-color:var(--blue);background:var(--blue-soft);color:var(--blue-dark)}.selected-color{background:var(--blue-soft);border-radius:10px;align-items:center;gap:.55rem;min-height:42px;margin-bottom:.6rem;padding:.45rem .6rem;display:flex}.selected-color>span{border:2px solid var(--surface);border-radius:50%;flex:none;width:27px;height:27px;box-shadow:0 0 0 1px #004a8d26}.selected-color>div{min-width:0;display:grid}.selected-color small{color:var(--muted);font-size:.58rem}.selected-color strong{color:var(--blue-dark);text-overflow:ellipsis;white-space:nowrap;font-size:.72rem;overflow:hidden}.color-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:.48rem;display:grid}.color-card{border:1.5px solid var(--border-strong);background:var(--surface);min-width:0;min-height:56px;color:var(--ink);cursor:pointer;text-align:left;border-radius:10px;grid-template-rows:1fr 1fr;grid-template-columns:22px minmax(0,1fr);align-items:center;gap:0 .3rem;padding:.35rem;display:grid;overflow:hidden}.color-card>span{border:2px solid var(--surface);border-radius:7px;grid-row:1/3;width:22px;height:38px;box-shadow:0 0 0 1.5px #0a355d40}.color-card strong,.color-card small{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.color-card strong{align-self:end;font-size:.56rem}.color-card small{color:var(--muted);align-self:start;font-size:.54rem}.color-card[data-active=true]{border-color:var(--blue)}.scroll-cue{justify-content:center;align-items:center;gap:3px}.scroll-cue i{background:var(--track);width:4px;height:4px;transition:width var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out);border-radius:99px;display:block}.scroll-cue i[data-active=true]{background:var(--blue);width:11px}.glitter-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:.55rem;display:grid}.glitter-grid button{border:1.5px solid var(--border-strong);background:var(--surface);min-width:0;color:var(--ink);cursor:pointer;text-align:left;border-radius:11px;padding:.45rem;display:grid}.glitter-grid button>span{background:linear-gradient(145deg, var(--surface), var(--surface-sunk));border-radius:8px;width:100%;height:38px;margin-bottom:.32rem;display:block}.glitter-grid button>span[data-glitter=silver]{background:url(/assets/retainer/glitter-silver.webp) 50%/cover}.glitter-grid button>span[data-glitter=multicolor]{background:url(/assets/retainer/glitter-multicolor.webp) 50%/cover}.glitter-grid strong{color:var(--blue-dark);font-size:.72rem}.glitter-grid small{color:var(--muted);font-size:.57rem}.glitter-grid button[data-active=true]{border-color:var(--blue);box-shadow:0 0 0 3px #005aab14}.desktop-next,.load-more{border:1.5px solid var(--blue);background:var(--surface);width:100%;min-height:44px;color:var(--blue);cursor:pointer;border-radius:99px;justify-content:center;align-items:center;margin-top:.8rem;padding:.55rem .8rem;font-size:.76rem;font-weight:800;display:inline-flex}.choice-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem;margin-bottom:.65rem;display:grid}.choice-row button{border:1.5px dashed var(--border-strong);background:var(--canvas);min-width:0;min-height:68px;color:var(--muted);cursor:pointer;border-radius:11px;flex-direction:column;justify-content:center;align-items:center;gap:.2rem;padding:.35rem;display:flex}.choice-row button[data-active=true]{border-color:var(--orange);background:var(--surface);border-style:solid}.choice-row img,.choice-row i{object-fit:contain;place-items:center;width:38px;height:38px;font-style:normal;display:grid}.choice-row img{pointer-events:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none;-webkit-touch-callout:none}.choice-row span{text-align:center;text-overflow:ellipsis;white-space:nowrap;width:100%;font-size:.6rem;font-weight:600;overflow:hidden}.category-rail{scrollbar-width:none;gap:.38rem;margin:0 -1.2rem .65rem;padding:.05rem 1.2rem .4rem;display:flex;overflow-x:auto}.category-rail::-webkit-scrollbar{display:none}.color-grid::-webkit-scrollbar{display:none}.category-rail button{border:1px solid var(--border-strong);background:var(--canvas);min-height:34px;color:var(--muted);cursor:pointer;white-space:nowrap;border-radius:99px;flex:none;padding:.3rem .7rem;font-size:.64rem;font-weight:700}.category-rail button[data-active=true]{border-color:var(--blue);background:var(--blue);color:var(--surface)}.sticker-grid{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;grid-template-columns:repeat(4,minmax(0,1fr));gap:.45rem;display:grid}.sticker-grid>button{border:1.5px solid var(--border-strong);background:var(--canvas);min-width:0;color:var(--muted);cursor:pointer;border-radius:10px;padding:.32rem;display:grid;overflow:hidden}.sticker-grid>button[data-picked=true]{border-color:var(--blue);background:var(--blue-soft)}.sticker-grid img{aspect-ratio:1;object-fit:contain;pointer-events:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none;-webkit-touch-callout:none;width:100%;display:block}.sticker-grid span{text-align:center;text-overflow:ellipsis;white-space:nowrap;font-size:.48rem;overflow:hidden}.loading-copy{color:var(--muted);text-align:center;grid-column:1/-1;font-size:.72rem}.summary-overview{grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem;display:grid}.summary-card{border:1px solid var(--border);background:var(--canvas);border-radius:12px;gap:.28rem;min-width:0;padding:.7rem;display:grid}.summary-card>span,.summary-facts span{color:var(--muted);font-size:.58rem}.summary-card>strong{color:var(--blue-dark);font-size:.72rem;line-height:1.3}.summary-colors{align-items:center;gap:.25rem;min-width:0;display:flex}.summary-colors i{border:2px solid var(--surface);border-radius:50%;flex:none;width:17px;height:17px;box-shadow:0 0 0 1px #004a8d26}.summary-colors small{min-width:0;color:var(--muted);text-overflow:ellipsis;white-space:nowrap;font-size:.55rem;overflow:hidden}.summary-facts{border:1px solid var(--border);background:var(--border);border-radius:12px;grid-column:1/-1;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;display:grid;overflow:hidden}.summary-facts>div{background:var(--surface);gap:.15rem;padding:.55rem .7rem;display:grid}.summary-facts>div:last-child:nth-child(odd){grid-column:1/-1}.summary-facts strong{color:var(--blue-dark);font-size:.68rem;font-weight:600}.summary-facts small{min-width:0;color:var(--muted);text-overflow:ellipsis;white-space:nowrap;font-size:.52rem;overflow:hidden}.summary-actions{gap:.5rem;margin-top:.65rem;display:grid}.summary-actions button,.desktop-section-actions button{cursor:pointer;border-radius:99px;min-height:48px;font-size:.8rem;font-weight:800}.save-button{border:1.5px solid var(--blue);background:var(--surface);color:var(--blue-dark)}.line-button{background:var(--line-green);color:var(--surface);border:0;box-shadow:0 10px 24px #06c75533}.summary-actions button:disabled,.desktop-section-actions button:disabled{opacity:.55;cursor:wait}.summary-help{color:var(--muted);text-align:center;margin:.55rem 0 0;font-size:.58rem;line-height:1.45}.design-code-restore input:focus-visible{border-color:var(--blue);outline-offset:1px;outline:2px solid #005aab40}.design-code-box{border:1px solid var(--border-strong);background:var(--blue-soft);border-radius:12px;gap:.35rem;margin-top:.65rem;padding:.65rem .7rem;display:grid}.design-code-box>*{min-width:0}.design-code-title{color:var(--blue-dark);font-size:.66rem;font-weight:700}.design-code-value{align-items:center;gap:.4rem;display:flex}.design-code-value code{border:1px solid var(--border-strong);background:var(--surface);min-width:0;color:var(--blue-ink);letter-spacing:.02em;white-space:normal;overflow-wrap:anywhere;border-radius:9px;flex:1;padding:.4rem .55rem;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.64rem;line-height:1.5}.design-code-value button,.design-code-restore button{border:1.5px solid var(--blue);background:var(--surface);min-height:38px;color:var(--blue-dark);cursor:pointer;border-radius:99px;flex:none;padding-inline:.8rem;font-size:.66rem;font-weight:700}.design-code-box small{color:var(--muted);font-size:.54rem;line-height:1.45}.design-code-restore{align-items:center;gap:.4rem;display:flex}.design-code-restore input{border:1px solid var(--border-strong);background:var(--surface);min-width:0;min-height:38px;color:var(--blue-ink);border-radius:9px;flex:1;padding:.4rem .6rem;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.64rem}.design-code-status{margin:0;font-size:.56rem;font-weight:600;line-height:1.45}.design-code-status[data-tone=ok]{color:var(--success)}.design-code-status[data-tone=error]{color:var(--warning)}@media (width>=901px){.summary .summary-actions,.summary .summary-help{display:none}.embed-mode.miniapp{flex-direction:column;width:100%;height:100%;min-height:0;padding-block:1.1rem;display:flex;overflow:hidden}.embed-mode .designer-intro,.embed-mode .designer-disclaimer,.embed-mode .app-footer{display:none}.embed-mode .mode-switcher{flex:none;margin-block:.2rem .7rem}.embed-mode .designer-shell{flex:auto;align-items:stretch;height:auto;min-height:0;margin:0 auto;overflow:hidden}.embed-mode .collection-shell{flex:auto;height:auto;min-height:0;margin:0 auto;overflow-y:auto}.embed-mode .preview-column{grid-template-rows:auto minmax(0,1fr);gap:.6rem;height:100%;min-height:0;display:grid;position:static}.embed-mode .preview-heading{width:100%;max-width:none;margin:0 0 .2rem}.embed-mode .stage{aspect-ratio:auto;align-self:center;max-width:none;height:100%;min-height:0;max-height:56vh}.embed-mode .retainer-art{aspect-ratio:1;width:auto;max-width:100%;height:100%;min-height:0;margin:0 auto}.embed-mode .control-panel{flex-direction:column;height:100%;min-height:0;display:flex}.embed-mode .panel-content{flex:auto;min-height:0;overflow-y:auto}.embed-mode .desktop-section-actions{flex:none;width:min(100%,780px);margin:.85rem auto 0}}.designer-disclaimer{max-width:760px;margin:.8rem auto;padding:0 1rem}.desktop-section-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;width:min(100% - 3rem,780px);margin:1rem auto 2rem;display:grid}.app-footer{border-top:1px solid var(--border);width:min(100% - 3rem,1120px);color:var(--muted);justify-content:space-between;align-items:center;gap:1rem;margin:0 auto;padding:1.2rem 0 2rem;display:flex}.app-footer strong{color:var(--blue-dark);font-size:.76rem}.app-footer span{text-align:right;font-size:.64rem}.toast{z-index:120;bottom:calc(1rem + env(safe-area-inset-bottom,0px));background:var(--blue-ink);max-width:calc(100% - 2rem);color:var(--surface);opacity:0;pointer-events:none;transition:opacity var(--dur-medium) var(--ease-out), transform var(--dur-medium) var(--ease-out);border-radius:99px;padding:.65rem .9rem;font-size:.72rem;font-weight:600;position:fixed;left:50%;transform:translate(-50%,16px);box-shadow:0 12px 35px #00204047}.toast[data-visible=true]{opacity:1;transform:translate(-50%)}.export-modal{z-index:200;place-items:center;padding:1rem;display:grid;position:fixed;inset:0}.modal-backdrop{-webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px);background:#051c32bd;border:0;width:100%;height:100%;position:absolute;inset:0}.export-dialog{z-index:1;background:var(--surface);text-align:center;border-radius:20px;width:min(100%,430px);max-height:calc(100dvh - 2rem);padding:1rem;position:relative;overflow-y:auto;box-shadow:0 26px 80px #0018305c}.modal-close{border:1px solid var(--border);background:var(--surface);width:36px;height:36px;color:var(--blue-dark);cursor:pointer;border-radius:50%;place-items:center;font-size:1.15rem;display:grid;position:absolute;top:.65rem;right:.65rem}.modal-kicker{color:var(--orange);letter-spacing:.1em;font-size:.58rem;font-weight:800}.export-dialog h2{color:var(--blue-dark);margin:.15rem 2rem .7rem;font-size:1.2rem}.export-dialog>img{object-fit:contain;border:1px solid var(--border);background:var(--canvas);border-radius:12px;width:100%;max-height:55dvh;display:block}.export-dialog>div{grid-template-columns:1fr 1fr;gap:.55rem;margin-top:.7rem;display:grid}.export-dialog a,.export-dialog>div button{border:1.5px solid var(--blue);cursor:pointer;border-radius:99px;justify-content:center;align-items:center;min-height:44px;font-size:.74rem;font-weight:700;text-decoration:none;display:inline-flex}.export-dialog a{background:var(--surface);color:var(--blue)}.export-dialog>div button{background:var(--blue);color:var(--surface)}.export-dialog>p{color:var(--muted);margin:.65rem 0 0;font-size:.62rem;line-height:1.45}.embed-mode .designer-intro,.embed-mode .app-footer{display:none}.embed-mode .designer-shell{margin-top:.5rem}@media (width<=900px){html,body{overscroll-behavior:none;width:100%;height:100%;overflow:hidden}.desktop-only,.designer-intro,.designer-disclaimer,.app-footer{display:none!important}.mobile-only{display:block!important}.miniapp{background:var(--canvas);grid-template-rows:auto minmax(0,1fr);width:100%;height:100%;min-height:0;display:grid;overflow:hidden}.mode-switcher{margin:.55rem auto .45rem}.designer-shell{grid-template-rows:minmax(0,41fr) minmax(0,59fr);grid-template-columns:minmax(0,1fr);align-items:stretch;gap:.38rem;width:100%;height:100%;min-height:0;margin:0;padding:.38rem;display:grid;overflow:hidden}.collection-shell{width:100%;height:100%;min-height:0;margin:0;padding:.15rem .7rem .6rem;overflow-y:auto}.preview-column{grid-template-rows:minmax(0,1fr) auto;height:100%;min-height:0;display:grid;position:static;overflow:hidden}.preview-heading,.preview-note{display:none}.stage{aspect-ratio:auto;touch-action:none;border-radius:13px;width:100%;max-width:none;height:100%;min-height:0}.retainer-art{aspect-ratio:1;width:auto;min-width:0;max-width:100%;height:100%;min-height:0;margin:0 auto}.stage-actions{gap:.25rem;top:.42rem;right:.42rem}.stage-actions button{min-width:44px;min-height:44px;padding:.28rem}.stage-actions .reset-design{min-width:54px;padding-inline:.55rem;font-size:.64rem}.stage-actions svg{width:23px;height:23px}.stage-choices{gap:.28rem;top:auto;bottom:.42rem;left:.38rem}.stage-choices button{width:46px;height:46px}.floating-step-heading{z-index:25;background:0 0;width:min(47%,180px);padding:.15rem .2rem;line-height:1.5;position:absolute;top:.5rem;left:.5rem}.floating-step-heading span,.floating-step-heading strong{white-space:nowrap;display:block;overflow:visible}.floating-step-heading span{color:var(--muted);font-size:.54rem;font-weight:700;line-height:1.5}.floating-step-heading strong{color:var(--blue-dark);margin-top:.05rem;font-size:.72rem;line-height:1.55}.stage-brand{width:50px;height:19px;box-shadow:none;background:0 0;padding:0;bottom:.42rem;left:50%;right:auto;transform:translate(-50%)}.stage-empty{padding:.4rem .55rem;font-size:.62rem;top:59%}.piece-toolbar{display:none!important}.piece-handle{width:42px;height:42px;font-size:1rem}.piece-handle.remove,.piece-handle.duplicate{width:50px;height:30px;font-size:.58rem}.control-panel{grid-template-rows:20px minmax(0, 1fr) calc(42px + env(safe-area-inset-bottom,0px));border-radius:13px;width:100%;max-width:100%;height:100%;min-height:0;display:grid}.step-tabs{border-bottom:1px solid var(--border);background:var(--canvas);grid-template-columns:repeat(7,minmax(0,1fr));align-items:center;gap:.18rem;min-height:0;padding:0 .5rem;position:relative;display:grid!important}.step-tabs:before{z-index:0;background:var(--track-strong);content:"";height:1px;position:absolute;top:50%;left:calc(.5rem + 7.14%);right:calc(.5rem + 7.14%);transform:translateY(-50%)}.step-tabs button{z-index:1;min-width:0;height:100%;color:var(--muted);cursor:pointer;background:0 0;border:0;place-items:center;padding:0;display:grid;position:relative}.step-tabs i{background:var(--track-soft);width:6px;height:6px;box-shadow:0 0 0 3px var(--canvas);border:0;border-radius:50%;display:block}.step-tabs span{display:none}.step-tabs button[data-active=true]{background:0 0}.step-tabs button[data-active=true] i{background:var(--blue);width:9px;height:9px;box-shadow:0 0 0 3px #005aab26}.panel-content{min-height:0;padding:.42rem .58rem;overflow:hidden}.mobile-step-content,.mobile-step-content>.pattern-grid,.mobile-step-content>.glitter-grid,.sticker-controls,.summary{width:100%;height:100%;min-height:0}.pattern-grid{grid-template-rows:repeat(2,minmax(0,1fr));grid-template-columns:repeat(4,minmax(0,1fr));gap:.32rem}.pattern-card{border-radius:8px;grid-template-rows:minmax(0,1fr) auto;min-height:0;padding:.22rem;display:grid}.pattern-preview{aspect-ratio:auto;height:100%;min-height:0;margin-bottom:.16rem}.pattern-meta{justify-content:space-between;gap:.2rem;display:flex}.pattern-meta strong{font-size:.54rem}.pattern-meta small{font-size:.46rem}.mobile-step-content:has(.color-grid){grid-template-rows:31px 31px minmax(0,1fr) 6px;gap:.24rem;display:grid!important}.slot-row,.selected-color{min-height:0;margin:0}.slot-button{min-height:32px;font-size:.57rem}.slot-button>span{width:14px;height:14px}.selected-color{min-height:32px;padding:.25rem .45rem}.selected-color>span{width:22px;height:22px}.selected-color small{display:none}.selected-color strong{font-size:.62rem}.color-grid{overscroll-behavior-inline:contain;scroll-snap-type:x proximity;scrollbar-width:none;grid-template-rows:repeat(2,minmax(0,1fr));grid-template-columns:none;grid-auto-columns:calc(18.6916% - .224299rem);grid-auto-flow:column;gap:.3rem;min-height:0;padding:.05rem .16rem .05rem 0;display:grid;overflow:auto hidden;-webkit-mask-image:linear-gradient(90deg,#000 0 94%,#0000 100%);mask-image:linear-gradient(90deg,#000 0 94%,#0000 100%)}.color-card{scroll-snap-align:start;text-align:center;border-radius:9px;grid-template-rows:minmax(0,1fr) auto;grid-template-columns:minmax(0,1fr);place-items:center;gap:.06rem;min-height:0;padding:.12rem}.color-card>span{width:100%;height:100%;min-height:0;box-shadow:none;border:0;border-radius:6px;grid-row:auto;align-self:center}.color-card strong{display:none}.color-card small{align-self:center;font-size:.43rem}.glitter-grid{grid-template-rows:repeat(3,minmax(0,1fr));grid-template-columns:minmax(0,1fr);align-items:stretch;gap:.4rem}.glitter-grid button{grid-template-rows:repeat(2,minmax(0,1fr));grid-template-columns:minmax(62px,.65fr) minmax(0,1fr);column-gap:.55rem;min-height:0;padding:0;overflow:hidden}.glitter-grid button>span{border-radius:9px 0 0 9px;grid-row:1/3;height:100%;min-height:32px;margin:0}.glitter-grid strong{align-self:end;padding:.25rem .45rem 0 0;font-size:.62rem}.glitter-grid small{align-self:start;padding:0 .45rem .25rem 0;font-size:.5rem}:is(.mobile-step-content.is-scrollable,.mobile-step-content.is-scrollable:has(.color-grid)){overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none;height:100%;padding-right:.12rem;overflow-y:auto;display:block!important}.mobile-step-content.is-scrollable::-webkit-scrollbar{display:none}.mobile-step-content.is-scrollable>.slot-row,.mobile-step-content.is-scrollable>.selected-color{margin-bottom:.24rem}.mobile-step-content.is-scrollable>.color-grid{height:108px;margin-bottom:.24rem}.mobile-step-content.is-scrollable>.section-label{margin:.5rem 0 .3rem}.mobile-step-content.is-scrollable>.glitter-grid{grid-template-rows:none;grid-auto-rows:44px;height:auto;padding-bottom:.2rem}.sticker-controls{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;grid-template-rows:28px minmax(0,1fr) 6px;gap:.2rem;display:grid}.sticker-controls>.choice-row{display:none}.category-rail{min-height:0;margin:0 -.58rem;padding:0 .58rem .15rem}.category-rail button{min-height:28px;padding:.2rem .55rem;font-size:.55rem}.mobile-sticker-grid{overscroll-behavior-inline:contain;scroll-snap-type:x proximity;scrollbar-width:none;touch-action:pan-x;grid-template-rows:repeat(2,minmax(0,1fr));grid-template-columns:none;grid-auto-columns:calc(18.6916% - .224299rem);grid-auto-flow:column;gap:.3rem;min-height:0;padding:0 .16rem .06rem 0;overflow:auto hidden;-webkit-mask-image:linear-gradient(90deg,#000 0 94%,#0000 100%);mask-image:linear-gradient(90deg,#000 0 94%,#0000 100%);display:grid!important}.mobile-sticker-grid::-webkit-scrollbar{display:none}.sticker-grid>button{scroll-snap-align:start;border-radius:8px;grid-template-rows:minmax(0,1fr) auto;min-height:0;padding:.14rem}.sticker-grid img{aspect-ratio:auto;height:100%;min-height:0}.sticker-grid span{font-size:.39rem}.scroll-cue{display:flex!important}.summary{-webkit-overflow-scrolling:touch;overscroll-behavior:contain;flex-direction:column;gap:.45rem;padding-bottom:.2rem;display:flex;overflow-y:auto}.summary-overview{flex:none;grid-template-rows:none;grid-template-columns:minmax(0,1fr);gap:.35rem;min-height:0;display:grid}.summary-card{border-radius:8px;grid-template-rows:repeat(2,minmax(0,1fr));grid-template-columns:62px minmax(0,1fr);align-content:center;column-gap:.45rem;min-height:0;padding:.38rem .45rem;display:grid}.summary-card>span{grid-row:1/3;align-self:center;font-size:.48rem}.summary-card>strong{text-overflow:ellipsis;white-space:nowrap;align-self:end;font-size:.58rem;line-height:1.25;overflow:hidden}.summary-colors{align-self:start}.summary-colors i{width:14px;height:14px}.summary-colors small{font-size:.48rem}.summary-facts{display:contents}.summary-facts>div{border:1px solid var(--border);background:var(--surface);border-radius:8px;grid-template-rows:repeat(2,minmax(0,1fr));grid-template-columns:62px minmax(0,1fr);align-items:center;column-gap:.45rem;min-height:0;padding:.35rem .45rem;display:grid;overflow:hidden}.summary-facts>div:last-child:nth-child(odd){grid-column:auto}.summary-facts span{grid-row:1/3;font-size:.48rem}.summary-facts strong{text-overflow:ellipsis;white-space:nowrap;align-self:end;font-size:.55rem;overflow:hidden}.summary-facts small{text-overflow:ellipsis;white-space:nowrap;align-self:start;font-size:.47rem;overflow:hidden}.summary-actions{z-index:2;border-top:1px solid var(--border);background:var(--surface);grid-template-columns:minmax(0,1fr);gap:.4rem;margin:0;padding-top:.5rem;position:sticky;bottom:0;box-shadow:0 -6px 12px -6px #004a8d29}.summary-actions button{min-height:46px;font-size:.72rem}.summary-help{white-space:normal;margin:0;font-size:.52rem}.design-code-box{flex:none;gap:.4rem;margin-top:0;padding:.6rem}.design-code-value code{padding:.5rem .55rem;font-size:.72rem}.design-code-restore{flex-direction:column;align-items:stretch;gap:.35rem}.design-code-value button,.design-code-restore button,.design-code-restore input{min-height:44px}.design-code-restore input{font-size:16px}.design-code-box small{font-size:.6rem}.design-code-status{font-size:.64rem}.panel-navigation{padding:.2rem .32rem calc(.2rem + env(safe-area-inset-bottom,0px));border-top:1px solid var(--border);background:var(--canvas);grid-template-columns:minmax(68px,.65fr) minmax(0,1.55fr);align-items:center;gap:.35rem;display:grid!important}.panel-navigation button{border:1px solid var(--border-strong);background:var(--surface);min-width:0;min-height:34px;color:var(--muted);cursor:pointer;text-overflow:ellipsis;white-space:nowrap;border-radius:99px;padding:.12rem .3rem;font-size:.58rem;font-weight:800;overflow:hidden}.panel-navigation button.next{border-color:var(--blue);background:linear-gradient(135deg, var(--blue), var(--blue-dark));color:var(--surface)}.panel-navigation button.back{justify-self:start;width:auto;min-width:60px;padding:.12rem .4rem}.panel-navigation button:disabled{opacity:.35}.toast{bottom:calc(.55rem + env(safe-area-inset-bottom,0px));font-size:.62rem}.export-dialog{max-height:calc(100dvh - 1rem);padding:.75rem}.export-dialog>img{max-height:51dvh}}@media (width<=900px) and (height<=700px) and (orientation:portrait){.designer-shell{grid-template-rows:minmax(0,43fr) minmax(0,57fr);gap:.25rem;padding:.25rem}.control-panel{grid-template-rows:16px minmax(0, 1fr) calc(40px + env(safe-area-inset-bottom,0px))}.step-tabs{padding-block:0}.piece-toolbar{min-height:34px}.piece-toolbar button{min-height:27px}}@media (width<=900px) and (orientation:landscape){.designer-shell{grid-template-rows:minmax(0,1fr);grid-template-columns:minmax(0,43fr) minmax(0,57fr)}.control-panel{grid-template-rows:16px minmax(0, 1fr) calc(40px + env(safe-area-inset-bottom,0px))}.piece-toolbar>span{display:none}.piece-toolbar>div{justify-content:center;width:100%}}@media (width<=380px){.piece-toolbar>span{display:none}.piece-toolbar>div{justify-content:center;width:100%}}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}',Yc=document.getElementById("ssdc-retainer-app");if(Yc&&!Yc.dataset.mounted){Yc.dataset.mounted="true";const n=Yc.shadowRoot??Yc.attachShadow({mode:"open"}),s=document.createElement("style");s.textContent=` :host { display: block; width: 100%; height: 100svh; min-height: 620px; contain: layout style; font-family: inherit; } .ssdc-retainer-root { width: 100%; height: 100%; font-family: inherit; } ${yb.replace(/@font-face\s*\{[^}]*\}\s*/g,"").replace(/:root/g,":host").replaceAll("/assets/retainer/","https://www.smileseasons.com/wp-content/uploads/2026/07/")} `;const u=document.createElement("div");u.className="ssdc-retainer-root",n.append(s,u),(0,a4.createRoot)(u).render((0,Y.jsx)(vb,{}));const r=()=>{const d=Yc.getBoundingClientRect().top+window.scrollY,m=window.innerHeight-d;Yc.style.height=`${Math.max(560,Math.round(m))}px`};r(),window.addEventListener("resize",r),window.addEventListener("orientationchange",r)}})();