@rainbow-robotics/preview-host 1.3.8-dev.3 → 1.10.1-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +254 -254
  2. package/build.mjs +53 -53
  3. package/dist/assets/{AmrCapabilityControl.DP3e5iv2.js → AmrCapabilityControl.uMKnOOk0.js} +1 -1
  4. package/dist/assets/{RbLocalizationProvider.s0vAzBAv.js → RbLocalizationProvider.c-57mWsf.js} +7 -7
  5. package/dist/assets/{__federation_expose_App.Bqy6IUtK.js → __federation_expose_App.Cr76Vrqb.js} +297 -292
  6. package/dist/assets/__federation_fn_import.DdkEuT6t.js +2 -2
  7. package/dist/assets/{cssMode.D4goIV7A.js → cssMode.DWY0mg29.js} +1 -1
  8. package/dist/assets/{freemarker2.CLWibmwl.js → freemarker2.BcQcIHbV.js} +1 -1
  9. package/dist/assets/{handlebars.rFBV_WV6.js → handlebars.apOy76CD.js} +1 -1
  10. package/dist/assets/{html.BXMRa22D.js → html.FOC5wcqt.js} +1 -1
  11. package/dist/assets/{htmlMode.pCIx3J4F.js → htmlMode.DZcYEntg.js} +1 -1
  12. package/dist/assets/{index.DnZ5v4VN.js → index.Bxmeiw-f.js} +5 -5
  13. package/dist/assets/index.Dzu1iP6J.js +1 -0
  14. package/dist/assets/{index.CCNNHbaO.js → index.G9r3GUil.js} +1 -1
  15. package/dist/assets/{javascript.BlAITfvZ.js → javascript.CEL3KJ9t.js} +1 -1
  16. package/dist/assets/{jsonMode.CWsT0d9H.js → jsonMode.Clw0nKgf.js} +1 -1
  17. package/dist/assets/{liquid.DzklPy6U.js → liquid.JBTTz117.js} +1 -1
  18. package/dist/assets/{lspLanguageFeatures.BUHVArVi.js → lspLanguageFeatures.Ap43Ejq9.js} +1 -1
  19. package/dist/assets/{mdx.gSxxtcy7.js → mdx.B2yIdDo_.js} +1 -1
  20. package/dist/assets/{python.Ch5alZKK.js → python.DKT8_C5B.js} +1 -1
  21. package/dist/assets/{razor.DUJoRHtn.js → razor.z656zFnB.js} +1 -1
  22. package/dist/assets/remoteEntry.js +1 -1
  23. package/dist/assets/{tsMode.C5Hwpu7Y.js → tsMode.CJn1kWbF.js} +1 -1
  24. package/dist/assets/{typescript.CsgNHoEz.js → typescript.B27DsFAh.js} +1 -1
  25. package/dist/assets/{useFileDownload.B-U2izPN.js → useFileDownload.BVrgd27i.js} +199 -199
  26. package/dist/assets/{xml.ywFLMI46.js → xml.D8-DrtSf.js} +1 -1
  27. package/dist/assets/{yaml.CnUGE33H.js → yaml.c2GnKl-i.js} +1 -1
  28. package/dist/data/joint/joint_data_20250617_101757_1.csv +448 -448
  29. package/dist/data/robots/models.json +47 -47
  30. package/dist/data/robots/test.json +38 -38
  31. package/dist/data/service-info.json +174 -102
  32. package/dist/imgs/nexus/commands_tree_icons/color_folder.svg +9 -9
  33. package/dist/imgs/nexus/forms/gripper/g11_help.png +0 -0
  34. package/dist/imgs/nexus/forms/gripper/gripper_11.png +0 -0
  35. package/dist/imgs/nexus/forms/gripper/gripper_12.png +0 -0
  36. package/dist/imgs/nexus/forms/gripper/gripper_13.png +0 -0
  37. package/dist/imgs/nexus/forms/gripper/gripper_14.png +0 -0
  38. package/dist/imgs/nexus/forms/gripper/gripper_15.png +0 -0
  39. package/dist/imgs/nexus/forms/gripper/gripper_16.png +0 -0
  40. package/dist/imgs/nexus/forms/gripper/gripper_17.png +0 -0
  41. package/dist/imgs/nexus/forms/gripper/gripper_18.png +0 -0
  42. package/dist/imgs/nexus/forms/gripper/gripper_19_0.png +0 -0
  43. package/dist/imgs/nexus/forms/gripper/gripper_19_1.png +0 -0
  44. package/dist/imgs/nexus/forms/gripper/gripper_20.png +0 -0
  45. package/dist/imgs/nexus/forms/gripper/gripper_21.png +0 -0
  46. package/dist/imgs/nexus/forms/gripper/gripper_22.png +0 -0
  47. package/dist/imgs/profile.svg +4 -4
  48. package/dist/index.html +17 -17
  49. package/package.json +1 -1
  50. package/serve.mjs +193 -193
  51. package/dist/assets/index.BTuqSe0A.js +0 -1
@@ -5,10 +5,10 @@ import{importShared as q}from"./__federation_fn_import.DdkEuT6t.js";import{j as
5
5
  *
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
- */var Ey;function NO(){if(Ey)return vn;Ey=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,v=t?Symbol.for("react.memo"):60115,g=t?Symbol.for("react.lazy"):60116,w=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,_=t?Symbol.for("react.responder"):60118,S=t?Symbol.for("react.scope"):60119;function x(R){if(typeof R=="object"&&R!==null){var P=R.$$typeof;switch(P){case e:switch(R=R.type,R){case l:case u:case r:case a:case o:case f:return R;default:switch(R=R&&R.$$typeof,R){case s:case d:case g:case v:case i:return R;default:return P}}case n:return P}}}function C(R){return x(R)===u}return vn.AsyncMode=l,vn.ConcurrentMode=u,vn.ContextConsumer=s,vn.ContextProvider=i,vn.Element=e,vn.ForwardRef=d,vn.Fragment=r,vn.Lazy=g,vn.Memo=v,vn.Portal=n,vn.Profiler=a,vn.StrictMode=o,vn.Suspense=f,vn.isAsyncMode=function(R){return C(R)||x(R)===l},vn.isConcurrentMode=C,vn.isContextConsumer=function(R){return x(R)===s},vn.isContextProvider=function(R){return x(R)===i},vn.isElement=function(R){return typeof R=="object"&&R!==null&&R.$$typeof===e},vn.isForwardRef=function(R){return x(R)===d},vn.isFragment=function(R){return x(R)===r},vn.isLazy=function(R){return x(R)===g},vn.isMemo=function(R){return x(R)===v},vn.isPortal=function(R){return x(R)===n},vn.isProfiler=function(R){return x(R)===a},vn.isStrictMode=function(R){return x(R)===o},vn.isSuspense=function(R){return x(R)===f},vn.isValidElementType=function(R){return typeof R=="string"||typeof R=="function"||R===r||R===u||R===a||R===o||R===f||R===m||typeof R=="object"&&R!==null&&(R.$$typeof===g||R.$$typeof===v||R.$$typeof===i||R.$$typeof===s||R.$$typeof===d||R.$$typeof===y||R.$$typeof===_||R.$$typeof===S||R.$$typeof===w)},vn.typeOf=x,vn}var My;function PO(){return My||(My=1,Fm.exports=NO()),Fm.exports}var Vm,ky;function AO(){if(ky)return Vm;ky=1;var t=PO(),e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[t.ForwardRef]=r,a[t.Memo]=o;function i(g){return t.isMemo(g)?o:a[g.$$typeof]||e}var s=Object.defineProperty,l=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;function v(g,w,y){if(typeof w!="string"){if(m){var _=f(w);_&&_!==m&&v(g,_,y)}var S=l(w);u&&(S=S.concat(u(w)));for(var x=i(g),C=i(w),R=0;R<S.length;++R){var P=S[R];if(!n[P]&&!(y&&y[P])&&!(C&&C[P])&&!(x&&x[P])){var O=d(w,P);try{s(g,P,O)}catch{}}}}return g}return Vm=v,Vm}AO();var Mr=Z.Fragment,h=function(e,n,r){return q6.call(n,"css")?Z.jsx(U6,Y6(e,n),r):Z.jsx(e,n,r)},te=function(e,n,r){return q6.call(n,"css")?Z.jsxs(U6,Y6(e,n),r):Z.jsxs(e,n,r)};function K6(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=K6(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function p0(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=K6(t))&&(r&&(r+=" "),r+=e);return r}const IO=(t,e)=>{const n=new Array(t.length+e.length);for(let r=0;r<t.length;r++)n[r]=t[r];for(let r=0;r<e.length;r++)n[t.length+r]=e[r];return n},OO=(t,e)=>({classGroupId:t,validator:e}),X6=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),h0="-",Ry=[],LO="arbitrary..",$O=t=>{const e=BO(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return DO(i);const s=i.split(h0),l=s[0]===""&&s.length>1?1:0;return Z6(s,l,e)},getConflictingClassGroupIds:(i,s)=>{if(s){const l=r[i],u=n[i];return l?u?IO(u,l):l:u||Ry}return n[i]||Ry}}},Z6=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const o=t[e],a=n.nextPart.get(o);if(a){const u=Z6(t,e+1,a);if(u)return u}const i=n.validators;if(i===null)return;const s=e===0?t.join(h0):t.slice(e).join(h0),l=i.length;for(let u=0;u<l;u++){const d=i[u];if(d.validator(s))return d.classGroupId}},DO=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),r=e.slice(0,n);return r?LO+r:void 0})(),BO=t=>{const{theme:e,classGroups:n}=t;return zO(n,e)},zO=(t,e)=>{const n=X6();for(const r in t){const o=t[r];Jv(o,n,r,e)}return n},Jv=(t,e,n,r)=>{const o=t.length;for(let a=0;a<o;a++){const i=t[a];FO(i,e,n,r)}},FO=(t,e,n,r)=>{if(typeof t=="string"){VO(t,e,n);return}if(typeof t=="function"){jO(t,e,n,r);return}HO(t,e,n,r)},VO=(t,e,n)=>{const r=t===""?e:Q6(e,t);r.classGroupId=n},jO=(t,e,n,r)=>{if(WO(t)){Jv(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(OO(n,t))},HO=(t,e,n,r)=>{const o=Object.entries(t),a=o.length;for(let i=0;i<a;i++){const[s,l]=o[i];Jv(l,Q6(e,s),n,r)}},Q6=(t,e)=>{let n=t;const r=e.split(h0),o=r.length;for(let a=0;a<o;a++){const i=r[a];let s=n.nextPart.get(i);s||(s=X6(),n.nextPart.set(i,s)),n=s}return n},WO=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,qO=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),r=Object.create(null);const o=(a,i)=>{n[a]=i,e++,e>t&&(e=0,r=n,n=Object.create(null))};return{get(a){let i=n[a];if(i!==void 0)return i;if((i=r[a])!==void 0)return o(a,i),i},set(a,i){a in n?n[a]=i:o(a,i)}}},Y2="!",Ty=":",UO=[],Ny=(t,e,n,r,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),YO=t=>{const{prefix:e,experimentalParseClassName:n}=t;let r=o=>{const a=[];let i=0,s=0,l=0,u;const d=o.length;for(let w=0;w<d;w++){const y=o[w];if(i===0&&s===0){if(y===Ty){a.push(o.slice(l,w)),l=w+1;continue}if(y==="/"){u=w;continue}}y==="["?i++:y==="]"?i--:y==="("?s++:y===")"&&s--}const f=a.length===0?o:o.slice(l);let m=f,v=!1;f.endsWith(Y2)?(m=f.slice(0,-1),v=!0):f.startsWith(Y2)&&(m=f.slice(1),v=!0);const g=u&&u>l?u-l:void 0;return Ny(a,v,m,g)};if(e){const o=e+Ty,a=r;r=i=>i.startsWith(o)?a(i.slice(o.length)):Ny(UO,!1,i,void 0,!0)}if(n){const o=r;r=a=>n({className:a,parseClassName:o})}return r},GO=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,r)=>{e.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let a=0;a<n.length;a++){const i=n[a],s=i[0]==="[",l=e.has(i);s||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(i)):o.push(i)}return o.length>0&&(o.sort(),r.push(...o)),r}},KO=t=>({cache:qO(t.cacheSize),parseClassName:YO(t),sortModifiers:GO(t),...$O(t)}),XO=/\s+/,ZO=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=e,i=[],s=t.trim().split(XO);let l="";for(let u=s.length-1;u>=0;u-=1){const d=s[u],{isExternal:f,modifiers:m,hasImportantModifier:v,baseClassName:g,maybePostfixModifierPosition:w}=n(d);if(f){l=d+(l.length>0?" "+l:l);continue}let y=!!w,_=r(y?g.substring(0,w):g);if(!_){if(!y){l=d+(l.length>0?" "+l:l);continue}if(_=r(g),!_){l=d+(l.length>0?" "+l:l);continue}y=!1}const S=m.length===0?"":m.length===1?m[0]:a(m).join(":"),x=v?S+Y2:S,C=x+_;if(i.indexOf(C)>-1)continue;i.push(C);const R=o(_,y);for(let P=0;P<R.length;++P){const O=R[P];i.push(x+O)}l=d+(l.length>0?" "+l:l)}return l},QO=(...t)=>{let e=0,n,r,o="";for(;e<t.length;)(n=t[e++])&&(r=J6(n))&&(o&&(o+=" "),o+=r);return o},J6=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=J6(t[r]))&&(n&&(n+=" "),n+=e);return n},JO=(t,...e)=>{let n,r,o,a;const i=l=>{const u=e.reduce((d,f)=>f(d),t());return n=KO(u),r=n.cache.get,o=n.cache.set,a=s,s(l)},s=l=>{const u=r(l);if(u)return u;const d=ZO(l,n);return o(l,d),d};return a=i,(...l)=>a(QO(...l))},eL=[],rr=t=>{const e=n=>n[t]||eL;return e.isThemeGetter=!0,e},e8=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,t8=/^\((?:(\w[\w-]*):)?(.+)\)$/i,tL=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,nL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rL=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,oL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,aL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,iL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,cs=t=>tL.test(t),Xt=t=>!!t&&!Number.isNaN(Number(t)),us=t=>!!t&&Number.isInteger(Number(t)),jm=t=>t.endsWith("%")&&Xt(t.slice(0,-1)),ki=t=>nL.test(t),n8=()=>!0,sL=t=>rL.test(t)&&!oL.test(t),ew=()=>!1,lL=t=>aL.test(t),cL=t=>iL.test(t),uL=t=>!lt(t)&&!ct(t),dL=t=>Vs(t,a8,ew),lt=t=>e8.test(t),ul=t=>Vs(t,i8,sL),Py=t=>Vs(t,bL,Xt),fL=t=>Vs(t,l8,n8),pL=t=>Vs(t,s8,ew),Ay=t=>Vs(t,r8,ew),hL=t=>Vs(t,o8,cL),Tp=t=>Vs(t,c8,lL),ct=t=>t8.test(t),td=t=>Yl(t,i8),mL=t=>Yl(t,s8),Iy=t=>Yl(t,r8),gL=t=>Yl(t,a8),vL=t=>Yl(t,o8),Np=t=>Yl(t,c8,!0),wL=t=>Yl(t,l8,!0),Vs=(t,e,n)=>{const r=e8.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},Yl=(t,e,n=!1)=>{const r=t8.exec(t);return r?r[1]?e(r[1]):n:!1},r8=t=>t==="position"||t==="percentage",o8=t=>t==="image"||t==="url",a8=t=>t==="length"||t==="size"||t==="bg-size",i8=t=>t==="length",bL=t=>t==="number",s8=t=>t==="family-name",l8=t=>t==="number"||t==="weight",c8=t=>t==="shadow",yL=()=>{const t=rr("color"),e=rr("font"),n=rr("text"),r=rr("font-weight"),o=rr("tracking"),a=rr("leading"),i=rr("breakpoint"),s=rr("container"),l=rr("spacing"),u=rr("radius"),d=rr("shadow"),f=rr("inset-shadow"),m=rr("text-shadow"),v=rr("drop-shadow"),g=rr("blur"),w=rr("perspective"),y=rr("aspect"),_=rr("ease"),S=rr("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],R=()=>[...C(),ct,lt],P=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],$=()=>[ct,lt,l],A=()=>[cs,"full","auto",...$()],M=()=>[us,"none","subgrid",ct,lt],L=()=>["auto",{span:["full",us,ct,lt]},us,ct,lt],B=()=>[us,"auto",ct,lt],F=()=>["auto","min","max","fr",ct,lt],N=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...$()],I=()=>[cs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...$()],D=()=>[cs,"screen","full","dvw","lvw","svw","min","max","fit",...$()],U=()=>[cs,"screen","full","lh","dvh","lvh","svh","min","max","fit",...$()],Y=()=>[t,ct,lt],oe=()=>[...C(),Iy,Ay,{position:[ct,lt]}],Q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],re=()=>["auto","cover","contain",gL,dL,{size:[ct,lt]}],le=()=>[jm,td,ul],ee=()=>["","none","full",u,ct,lt],ne=()=>["",Xt,td,ul],ue=()=>["solid","dashed","dotted","double"],ve=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],we=()=>[Xt,jm,Iy,Ay],ye=()=>["","none",g,ct,lt],Le=()=>["none",Xt,ct,lt],Oe=()=>["none",Xt,ct,lt],Ne=()=>[Xt,ct,lt],me=()=>[cs,"full",...$()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ki],breakpoint:[ki],color:[n8],container:[ki],"drop-shadow":[ki],ease:["in","out","in-out"],font:[uL],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ki],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ki],shadow:[ki],spacing:["px",Xt],text:[ki],"text-shadow":[ki],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",cs,lt,ct,y]}],container:["container"],columns:[{columns:[Xt,lt,ct,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:R()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{"inset-s":A(),start:A()}],end:[{"inset-e":A(),end:A()}],"inset-bs":[{"inset-bs":A()}],"inset-be":[{"inset-be":A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[us,"auto",ct,lt]}],basis:[{basis:[cs,"full","auto",s,...$()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Xt,cs,"auto","initial","none",lt]}],grow:[{grow:["",Xt,ct,lt]}],shrink:[{shrink:["",Xt,ct,lt]}],order:[{order:[us,"first","last","none",ct,lt]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:$()}],"gap-x":[{"gap-x":$()}],"gap-y":[{"gap-y":$()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:$()}],px:[{px:$()}],py:[{py:$()}],ps:[{ps:$()}],pe:[{pe:$()}],pbs:[{pbs:$()}],pbe:[{pbe:$()}],pt:[{pt:$()}],pr:[{pr:$()}],pb:[{pb:$()}],pl:[{pl:$()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mbs:[{mbs:z()}],mbe:[{mbe:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":$()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":$()}],"space-y-reverse":["space-y-reverse"],size:[{size:I()}],"inline-size":[{inline:["auto",...D()]}],"min-inline-size":[{"min-inline":["auto",...D()]}],"max-inline-size":[{"max-inline":["none",...D()]}],"block-size":[{block:["auto",...U()]}],"min-block-size":[{"min-block":["auto",...U()]}],"max-block-size":[{"max-block":["none",...U()]}],w:[{w:[s,"screen",...I()]}],"min-w":[{"min-w":[s,"screen","none",...I()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...I()]}],h:[{h:["screen","lh",...I()]}],"min-h":[{"min-h":["screen","lh","none",...I()]}],"max-h":[{"max-h":["screen","lh",...I()]}],"font-size":[{text:["base",n,td,ul]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,wL,fL]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jm,lt]}],"font-family":[{font:[mL,pL,e]}],"font-features":[{"font-features":[lt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ct,lt]}],"line-clamp":[{"line-clamp":[Xt,"none",ct,Py]}],leading:[{leading:[a,...$()]}],"list-image":[{"list-image":["none",ct,lt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ct,lt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ue(),"wavy"]}],"text-decoration-thickness":[{decoration:[Xt,"from-font","auto",ct,ul]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[Xt,"auto",ct,lt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ct,lt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ct,lt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:Q()}],"bg-size":[{bg:re()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},us,ct,lt],radial:["",ct,lt],conic:[us,ct,lt]},vL,hL]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:ee()}],"rounded-s":[{"rounded-s":ee()}],"rounded-e":[{"rounded-e":ee()}],"rounded-t":[{"rounded-t":ee()}],"rounded-r":[{"rounded-r":ee()}],"rounded-b":[{"rounded-b":ee()}],"rounded-l":[{"rounded-l":ee()}],"rounded-ss":[{"rounded-ss":ee()}],"rounded-se":[{"rounded-se":ee()}],"rounded-ee":[{"rounded-ee":ee()}],"rounded-es":[{"rounded-es":ee()}],"rounded-tl":[{"rounded-tl":ee()}],"rounded-tr":[{"rounded-tr":ee()}],"rounded-br":[{"rounded-br":ee()}],"rounded-bl":[{"rounded-bl":ee()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-bs":[{"border-bs":ne()}],"border-w-be":[{"border-be":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ue(),"hidden","none"]}],"divide-style":[{divide:[...ue(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-bs":[{"border-bs":Y()}],"border-color-be":[{"border-be":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...ue(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Xt,ct,lt]}],"outline-w":[{outline:["",Xt,td,ul]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",d,Np,Tp]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",f,Np,Tp]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[Xt,ul]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",m,Np,Tp]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[Xt,ct,lt]}],"mix-blend":[{"mix-blend":[...ve(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ve()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Xt]}],"mask-image-linear-from-pos":[{"mask-linear-from":we()}],"mask-image-linear-to-pos":[{"mask-linear-to":we()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":we()}],"mask-image-t-to-pos":[{"mask-t-to":we()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":we()}],"mask-image-r-to-pos":[{"mask-r-to":we()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":we()}],"mask-image-b-to-pos":[{"mask-b-to":we()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":we()}],"mask-image-l-to-pos":[{"mask-l-to":we()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":we()}],"mask-image-x-to-pos":[{"mask-x-to":we()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":we()}],"mask-image-y-to-pos":[{"mask-y-to":we()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[ct,lt]}],"mask-image-radial-from-pos":[{"mask-radial-from":we()}],"mask-image-radial-to-pos":[{"mask-radial-to":we()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[Xt]}],"mask-image-conic-from-pos":[{"mask-conic-from":we()}],"mask-image-conic-to-pos":[{"mask-conic-to":we()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:Q()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ct,lt]}],filter:[{filter:["","none",ct,lt]}],blur:[{blur:ye()}],brightness:[{brightness:[Xt,ct,lt]}],contrast:[{contrast:[Xt,ct,lt]}],"drop-shadow":[{"drop-shadow":["","none",v,Np,Tp]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",Xt,ct,lt]}],"hue-rotate":[{"hue-rotate":[Xt,ct,lt]}],invert:[{invert:["",Xt,ct,lt]}],saturate:[{saturate:[Xt,ct,lt]}],sepia:[{sepia:["",Xt,ct,lt]}],"backdrop-filter":[{"backdrop-filter":["","none",ct,lt]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[Xt,ct,lt]}],"backdrop-contrast":[{"backdrop-contrast":[Xt,ct,lt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Xt,ct,lt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Xt,ct,lt]}],"backdrop-invert":[{"backdrop-invert":["",Xt,ct,lt]}],"backdrop-opacity":[{"backdrop-opacity":[Xt,ct,lt]}],"backdrop-saturate":[{"backdrop-saturate":[Xt,ct,lt]}],"backdrop-sepia":[{"backdrop-sepia":["",Xt,ct,lt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":$()}],"border-spacing-x":[{"border-spacing-x":$()}],"border-spacing-y":[{"border-spacing-y":$()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ct,lt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Xt,"initial",ct,lt]}],ease:[{ease:["linear","initial",_,ct,lt]}],delay:[{delay:[Xt,ct,lt]}],animate:[{animate:["none",S,ct,lt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,ct,lt]}],"perspective-origin":[{"perspective-origin":R()}],rotate:[{rotate:Le()}],"rotate-x":[{"rotate-x":Le()}],"rotate-y":[{"rotate-y":Le()}],"rotate-z":[{"rotate-z":Le()}],scale:[{scale:Oe()}],"scale-x":[{"scale-x":Oe()}],"scale-y":[{"scale-y":Oe()}],"scale-z":[{"scale-z":Oe()}],"scale-3d":["scale-3d"],skew:[{skew:Ne()}],"skew-x":[{"skew-x":Ne()}],"skew-y":[{"skew-y":Ne()}],transform:[{transform:[ct,lt,"","none","gpu","cpu"]}],"transform-origin":[{origin:R()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:me()}],"translate-x":[{"translate-x":me()}],"translate-y":[{"translate-y":me()}],"translate-z":[{"translate-z":me()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ct,lt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mbs":[{"scroll-mbs":$()}],"scroll-mbe":[{"scroll-mbe":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pbs":[{"scroll-pbs":$()}],"scroll-pbe":[{"scroll-pbe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ct,lt]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[Xt,td,ul,Py]}],stroke:[{stroke:["none",...Y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},_L=JO(yL),Dl=t=>Number(t.replace(/,/gi,"")),Wo=t=>{if(t=String(t??0),t.match(/[^0-9,.]/g))return t;if(t){const e=t.split(".");return e[0]=(e[0]??"").replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")}return"0"},Bi=t=>{const e=t.split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e},rn=(t,e)=>(...n)=>{let o=`${n.reduce((s,l,u)=>{if(typeof l=="string")s+=`${l} `,n[u]=t[l];else if(typeof l=="object"){const d={};s+=Object.entries(l).reduce((f,[m,v])=>(t[m]&&(d[t[m]]=!!v),v&&(f+=` ${m} `),f),""),n[u]=d}return s},"")} ${p0(n)}`;e&&(o+=` ${e} ${p0([t[e]])} `,n.push(t[e]));const a=o.trim().split(" ");return a.filter((s,l)=>a.indexOf(s)===l).join(" ")};function ae(...t){return _L(p0(t))}const m0=t=>{if(typeof t=="object"&&t!==null)return Array.isArray(t)?t.map(e=>e==="true"||e==="false"?e==="true":typeof e=="object"&&e!==null?m0(e):e):Object.entries(t).reduce((e,[n,r])=>r==="true"||r==="false"?{...e,[n]:r==="true"}:typeof r=="object"&&r!==null?{...e,[n]:m0(r)}:{...e,[n]:r},{})},yhe=t=>t?t.charAt(0).toUpperCase()+t.slice(1):"",_he=t=>typeof t=="number"||!t||Number.isNaN(Number(t))||String(t??"")?.endsWith(".")?t:Number(t),xhe=t=>t*Math.PI/180,She=t=>t*180/Math.PI,Che=t=>t/1e3,Ehe=t=>{if(t==null)return"-";if(t===0)return"0 Byte";const e=["Byte","KB","MB","GB","TB"],n=Math.min(Math.floor(Math.log(t)/Math.log(1024)),e.length-1),r=t/1024**n;return`${n===0?r:r.toFixed(2)} ${e[n]}`},Oy="data:image/svg+xml,%3csvg%20width='64'%20height='64'%20viewBox='0%200%2064%2064'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11%2023C11%2021.8954%2011.8954%2021%2013%2021H19C20.1046%2021%2021%2021.8954%2021%2023V41C21%2042.1046%2020.1046%2043%2019%2043H13C11.8954%2043%2011%2042.1046%2011%2041V23Z'%20fill='%23FB2C36'/%3e%3cpath%20d='M50.3086%2016.0078C53.4789%2016.1684%2056%2018.7898%2056%2022V42C56%2045.3137%2053.3137%2048%2050%2048H12C8.68629%2048%206%2045.3137%206%2042V22C6%2018.7898%208.52111%2016.1684%2011.6914%2016.0078L12%2016H50L50.3086%2016.0078ZM12%2019C10.3431%2019%209%2020.3431%209%2022V42C9%2043.6569%2010.3431%2045%2012%2045H50C51.6569%2045%2053%2043.6569%2053%2042V22C53%2020.3431%2051.6569%2019%2050%2019H12ZM59.5%2025C60.3284%2025%2061%2025.6716%2061%2026.5V37.5C61%2038.3284%2060.3284%2039%2059.5%2039C58.6716%2039%2058%2038.3284%2058%2037.5V26.5C58%2025.6716%2058.6716%2025%2059.5%2025Z'%20fill='%23FAFAFA'%20fill-opacity='0.3'/%3e%3c/svg%3e",xL=`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
9
- <path d="M11 23C11 21.8954 11.8954 21 13 21H49C50.1046 21 51 21.8954 51 23V41C51 42.1046 50.1046 43 49 43H13C11.8954 43 11 42.1046 11 41V23Z" fill="#00C951"/>
10
- <path d="M50.3086 16.0078C53.4789 16.1684 56 18.7898 56 22V42C56 45.3137 53.3137 48 50 48H12C8.68629 48 6 45.3137 6 42V22C6 18.7898 8.52111 16.1684 11.6914 16.0078L12 16H50L50.3086 16.0078ZM12 19C10.3431 19 9 20.3431 9 22V42C9 43.6569 10.3431 45 12 45H50C51.6569 45 53 43.6569 53 42V22C53 20.3431 51.6569 19 50 19H12ZM59.5 25C60.3284 25 61 25.6716 61 26.5V37.5C61 38.3284 60.3284 39 59.5 39C58.6716 39 58 38.3284 58 37.5V26.5C58 25.6716 58.6716 25 59.5 25Z" fill="#FAFAFA" fill-opacity="0.3"/>
11
- </svg>
8
+ */var Ey;function NO(){if(Ey)return vn;Ey=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,v=t?Symbol.for("react.memo"):60115,g=t?Symbol.for("react.lazy"):60116,w=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,_=t?Symbol.for("react.responder"):60118,S=t?Symbol.for("react.scope"):60119;function x(R){if(typeof R=="object"&&R!==null){var P=R.$$typeof;switch(P){case e:switch(R=R.type,R){case l:case u:case r:case a:case o:case f:return R;default:switch(R=R&&R.$$typeof,R){case s:case d:case g:case v:case i:return R;default:return P}}case n:return P}}}function C(R){return x(R)===u}return vn.AsyncMode=l,vn.ConcurrentMode=u,vn.ContextConsumer=s,vn.ContextProvider=i,vn.Element=e,vn.ForwardRef=d,vn.Fragment=r,vn.Lazy=g,vn.Memo=v,vn.Portal=n,vn.Profiler=a,vn.StrictMode=o,vn.Suspense=f,vn.isAsyncMode=function(R){return C(R)||x(R)===l},vn.isConcurrentMode=C,vn.isContextConsumer=function(R){return x(R)===s},vn.isContextProvider=function(R){return x(R)===i},vn.isElement=function(R){return typeof R=="object"&&R!==null&&R.$$typeof===e},vn.isForwardRef=function(R){return x(R)===d},vn.isFragment=function(R){return x(R)===r},vn.isLazy=function(R){return x(R)===g},vn.isMemo=function(R){return x(R)===v},vn.isPortal=function(R){return x(R)===n},vn.isProfiler=function(R){return x(R)===a},vn.isStrictMode=function(R){return x(R)===o},vn.isSuspense=function(R){return x(R)===f},vn.isValidElementType=function(R){return typeof R=="string"||typeof R=="function"||R===r||R===u||R===a||R===o||R===f||R===m||typeof R=="object"&&R!==null&&(R.$$typeof===g||R.$$typeof===v||R.$$typeof===i||R.$$typeof===s||R.$$typeof===d||R.$$typeof===y||R.$$typeof===_||R.$$typeof===S||R.$$typeof===w)},vn.typeOf=x,vn}var My;function PO(){return My||(My=1,Fm.exports=NO()),Fm.exports}var Vm,ky;function AO(){if(ky)return Vm;ky=1;var t=PO(),e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[t.ForwardRef]=r,a[t.Memo]=o;function i(g){return t.isMemo(g)?o:a[g.$$typeof]||e}var s=Object.defineProperty,l=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;function v(g,w,y){if(typeof w!="string"){if(m){var _=f(w);_&&_!==m&&v(g,_,y)}var S=l(w);u&&(S=S.concat(u(w)));for(var x=i(g),C=i(w),R=0;R<S.length;++R){var P=S[R];if(!n[P]&&!(y&&y[P])&&!(C&&C[P])&&!(x&&x[P])){var O=d(w,P);try{s(g,P,O)}catch{}}}}return g}return Vm=v,Vm}AO();var Mr=Z.Fragment,h=function(e,n,r){return q6.call(n,"css")?Z.jsx(U6,Y6(e,n),r):Z.jsx(e,n,r)},te=function(e,n,r){return q6.call(n,"css")?Z.jsxs(U6,Y6(e,n),r):Z.jsxs(e,n,r)};function K6(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=K6(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function p0(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=K6(t))&&(r&&(r+=" "),r+=e);return r}const IO=(t,e)=>{const n=new Array(t.length+e.length);for(let r=0;r<t.length;r++)n[r]=t[r];for(let r=0;r<e.length;r++)n[t.length+r]=e[r];return n},OO=(t,e)=>({classGroupId:t,validator:e}),X6=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),h0="-",Ry=[],LO="arbitrary..",$O=t=>{const e=BO(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return DO(i);const s=i.split(h0),l=s[0]===""&&s.length>1?1:0;return Z6(s,l,e)},getConflictingClassGroupIds:(i,s)=>{if(s){const l=r[i],u=n[i];return l?u?IO(u,l):l:u||Ry}return n[i]||Ry}}},Z6=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const o=t[e],a=n.nextPart.get(o);if(a){const u=Z6(t,e+1,a);if(u)return u}const i=n.validators;if(i===null)return;const s=e===0?t.join(h0):t.slice(e).join(h0),l=i.length;for(let u=0;u<l;u++){const d=i[u];if(d.validator(s))return d.classGroupId}},DO=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),r=e.slice(0,n);return r?LO+r:void 0})(),BO=t=>{const{theme:e,classGroups:n}=t;return zO(n,e)},zO=(t,e)=>{const n=X6();for(const r in t){const o=t[r];Jv(o,n,r,e)}return n},Jv=(t,e,n,r)=>{const o=t.length;for(let a=0;a<o;a++){const i=t[a];FO(i,e,n,r)}},FO=(t,e,n,r)=>{if(typeof t=="string"){VO(t,e,n);return}if(typeof t=="function"){jO(t,e,n,r);return}HO(t,e,n,r)},VO=(t,e,n)=>{const r=t===""?e:Q6(e,t);r.classGroupId=n},jO=(t,e,n,r)=>{if(WO(t)){Jv(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(OO(n,t))},HO=(t,e,n,r)=>{const o=Object.entries(t),a=o.length;for(let i=0;i<a;i++){const[s,l]=o[i];Jv(l,Q6(e,s),n,r)}},Q6=(t,e)=>{let n=t;const r=e.split(h0),o=r.length;for(let a=0;a<o;a++){const i=r[a];let s=n.nextPart.get(i);s||(s=X6(),n.nextPart.set(i,s)),n=s}return n},WO=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,qO=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),r=Object.create(null);const o=(a,i)=>{n[a]=i,e++,e>t&&(e=0,r=n,n=Object.create(null))};return{get(a){let i=n[a];if(i!==void 0)return i;if((i=r[a])!==void 0)return o(a,i),i},set(a,i){a in n?n[a]=i:o(a,i)}}},Y2="!",Ty=":",UO=[],Ny=(t,e,n,r,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),YO=t=>{const{prefix:e,experimentalParseClassName:n}=t;let r=o=>{const a=[];let i=0,s=0,l=0,u;const d=o.length;for(let w=0;w<d;w++){const y=o[w];if(i===0&&s===0){if(y===Ty){a.push(o.slice(l,w)),l=w+1;continue}if(y==="/"){u=w;continue}}y==="["?i++:y==="]"?i--:y==="("?s++:y===")"&&s--}const f=a.length===0?o:o.slice(l);let m=f,v=!1;f.endsWith(Y2)?(m=f.slice(0,-1),v=!0):f.startsWith(Y2)&&(m=f.slice(1),v=!0);const g=u&&u>l?u-l:void 0;return Ny(a,v,m,g)};if(e){const o=e+Ty,a=r;r=i=>i.startsWith(o)?a(i.slice(o.length)):Ny(UO,!1,i,void 0,!0)}if(n){const o=r;r=a=>n({className:a,parseClassName:o})}return r},GO=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,r)=>{e.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let a=0;a<n.length;a++){const i=n[a],s=i[0]==="[",l=e.has(i);s||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(i)):o.push(i)}return o.length>0&&(o.sort(),r.push(...o)),r}},KO=t=>({cache:qO(t.cacheSize),parseClassName:YO(t),sortModifiers:GO(t),...$O(t)}),XO=/\s+/,ZO=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=e,i=[],s=t.trim().split(XO);let l="";for(let u=s.length-1;u>=0;u-=1){const d=s[u],{isExternal:f,modifiers:m,hasImportantModifier:v,baseClassName:g,maybePostfixModifierPosition:w}=n(d);if(f){l=d+(l.length>0?" "+l:l);continue}let y=!!w,_=r(y?g.substring(0,w):g);if(!_){if(!y){l=d+(l.length>0?" "+l:l);continue}if(_=r(g),!_){l=d+(l.length>0?" "+l:l);continue}y=!1}const S=m.length===0?"":m.length===1?m[0]:a(m).join(":"),x=v?S+Y2:S,C=x+_;if(i.indexOf(C)>-1)continue;i.push(C);const R=o(_,y);for(let P=0;P<R.length;++P){const O=R[P];i.push(x+O)}l=d+(l.length>0?" "+l:l)}return l},QO=(...t)=>{let e=0,n,r,o="";for(;e<t.length;)(n=t[e++])&&(r=J6(n))&&(o&&(o+=" "),o+=r);return o},J6=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=J6(t[r]))&&(n&&(n+=" "),n+=e);return n},JO=(t,...e)=>{let n,r,o,a;const i=l=>{const u=e.reduce((d,f)=>f(d),t());return n=KO(u),r=n.cache.get,o=n.cache.set,a=s,s(l)},s=l=>{const u=r(l);if(u)return u;const d=ZO(l,n);return o(l,d),d};return a=i,(...l)=>a(QO(...l))},eL=[],rr=t=>{const e=n=>n[t]||eL;return e.isThemeGetter=!0,e},e8=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,t8=/^\((?:(\w[\w-]*):)?(.+)\)$/i,tL=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,nL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rL=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,oL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,aL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,iL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,cs=t=>tL.test(t),Xt=t=>!!t&&!Number.isNaN(Number(t)),us=t=>!!t&&Number.isInteger(Number(t)),jm=t=>t.endsWith("%")&&Xt(t.slice(0,-1)),ki=t=>nL.test(t),n8=()=>!0,sL=t=>rL.test(t)&&!oL.test(t),ew=()=>!1,lL=t=>aL.test(t),cL=t=>iL.test(t),uL=t=>!lt(t)&&!ct(t),dL=t=>Vs(t,a8,ew),lt=t=>e8.test(t),ul=t=>Vs(t,i8,sL),Py=t=>Vs(t,bL,Xt),fL=t=>Vs(t,l8,n8),pL=t=>Vs(t,s8,ew),Ay=t=>Vs(t,r8,ew),hL=t=>Vs(t,o8,cL),Tp=t=>Vs(t,c8,lL),ct=t=>t8.test(t),td=t=>Yl(t,i8),mL=t=>Yl(t,s8),Iy=t=>Yl(t,r8),gL=t=>Yl(t,a8),vL=t=>Yl(t,o8),Np=t=>Yl(t,c8,!0),wL=t=>Yl(t,l8,!0),Vs=(t,e,n)=>{const r=e8.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},Yl=(t,e,n=!1)=>{const r=t8.exec(t);return r?r[1]?e(r[1]):n:!1},r8=t=>t==="position"||t==="percentage",o8=t=>t==="image"||t==="url",a8=t=>t==="length"||t==="size"||t==="bg-size",i8=t=>t==="length",bL=t=>t==="number",s8=t=>t==="family-name",l8=t=>t==="number"||t==="weight",c8=t=>t==="shadow",yL=()=>{const t=rr("color"),e=rr("font"),n=rr("text"),r=rr("font-weight"),o=rr("tracking"),a=rr("leading"),i=rr("breakpoint"),s=rr("container"),l=rr("spacing"),u=rr("radius"),d=rr("shadow"),f=rr("inset-shadow"),m=rr("text-shadow"),v=rr("drop-shadow"),g=rr("blur"),w=rr("perspective"),y=rr("aspect"),_=rr("ease"),S=rr("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],R=()=>[...C(),ct,lt],P=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],$=()=>[ct,lt,l],A=()=>[cs,"full","auto",...$()],M=()=>[us,"none","subgrid",ct,lt],L=()=>["auto",{span:["full",us,ct,lt]},us,ct,lt],B=()=>[us,"auto",ct,lt],F=()=>["auto","min","max","fr",ct,lt],N=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...$()],I=()=>[cs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...$()],D=()=>[cs,"screen","full","dvw","lvw","svw","min","max","fit",...$()],U=()=>[cs,"screen","full","lh","dvh","lvh","svh","min","max","fit",...$()],Y=()=>[t,ct,lt],oe=()=>[...C(),Iy,Ay,{position:[ct,lt]}],Q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],re=()=>["auto","cover","contain",gL,dL,{size:[ct,lt]}],le=()=>[jm,td,ul],ee=()=>["","none","full",u,ct,lt],ne=()=>["",Xt,td,ul],ue=()=>["solid","dashed","dotted","double"],ve=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],we=()=>[Xt,jm,Iy,Ay],ye=()=>["","none",g,ct,lt],Le=()=>["none",Xt,ct,lt],Oe=()=>["none",Xt,ct,lt],Ne=()=>[Xt,ct,lt],me=()=>[cs,"full",...$()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ki],breakpoint:[ki],color:[n8],container:[ki],"drop-shadow":[ki],ease:["in","out","in-out"],font:[uL],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ki],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ki],shadow:[ki],spacing:["px",Xt],text:[ki],"text-shadow":[ki],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",cs,lt,ct,y]}],container:["container"],columns:[{columns:[Xt,lt,ct,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:R()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{"inset-s":A(),start:A()}],end:[{"inset-e":A(),end:A()}],"inset-bs":[{"inset-bs":A()}],"inset-be":[{"inset-be":A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[us,"auto",ct,lt]}],basis:[{basis:[cs,"full","auto",s,...$()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Xt,cs,"auto","initial","none",lt]}],grow:[{grow:["",Xt,ct,lt]}],shrink:[{shrink:["",Xt,ct,lt]}],order:[{order:[us,"first","last","none",ct,lt]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:$()}],"gap-x":[{"gap-x":$()}],"gap-y":[{"gap-y":$()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:$()}],px:[{px:$()}],py:[{py:$()}],ps:[{ps:$()}],pe:[{pe:$()}],pbs:[{pbs:$()}],pbe:[{pbe:$()}],pt:[{pt:$()}],pr:[{pr:$()}],pb:[{pb:$()}],pl:[{pl:$()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mbs:[{mbs:z()}],mbe:[{mbe:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":$()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":$()}],"space-y-reverse":["space-y-reverse"],size:[{size:I()}],"inline-size":[{inline:["auto",...D()]}],"min-inline-size":[{"min-inline":["auto",...D()]}],"max-inline-size":[{"max-inline":["none",...D()]}],"block-size":[{block:["auto",...U()]}],"min-block-size":[{"min-block":["auto",...U()]}],"max-block-size":[{"max-block":["none",...U()]}],w:[{w:[s,"screen",...I()]}],"min-w":[{"min-w":[s,"screen","none",...I()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...I()]}],h:[{h:["screen","lh",...I()]}],"min-h":[{"min-h":["screen","lh","none",...I()]}],"max-h":[{"max-h":["screen","lh",...I()]}],"font-size":[{text:["base",n,td,ul]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,wL,fL]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jm,lt]}],"font-family":[{font:[mL,pL,e]}],"font-features":[{"font-features":[lt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ct,lt]}],"line-clamp":[{"line-clamp":[Xt,"none",ct,Py]}],leading:[{leading:[a,...$()]}],"list-image":[{"list-image":["none",ct,lt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ct,lt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ue(),"wavy"]}],"text-decoration-thickness":[{decoration:[Xt,"from-font","auto",ct,ul]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[Xt,"auto",ct,lt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ct,lt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ct,lt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:Q()}],"bg-size":[{bg:re()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},us,ct,lt],radial:["",ct,lt],conic:[us,ct,lt]},vL,hL]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:ee()}],"rounded-s":[{"rounded-s":ee()}],"rounded-e":[{"rounded-e":ee()}],"rounded-t":[{"rounded-t":ee()}],"rounded-r":[{"rounded-r":ee()}],"rounded-b":[{"rounded-b":ee()}],"rounded-l":[{"rounded-l":ee()}],"rounded-ss":[{"rounded-ss":ee()}],"rounded-se":[{"rounded-se":ee()}],"rounded-ee":[{"rounded-ee":ee()}],"rounded-es":[{"rounded-es":ee()}],"rounded-tl":[{"rounded-tl":ee()}],"rounded-tr":[{"rounded-tr":ee()}],"rounded-br":[{"rounded-br":ee()}],"rounded-bl":[{"rounded-bl":ee()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-bs":[{"border-bs":ne()}],"border-w-be":[{"border-be":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ue(),"hidden","none"]}],"divide-style":[{divide:[...ue(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-bs":[{"border-bs":Y()}],"border-color-be":[{"border-be":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...ue(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Xt,ct,lt]}],"outline-w":[{outline:["",Xt,td,ul]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",d,Np,Tp]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",f,Np,Tp]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[Xt,ul]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",m,Np,Tp]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[Xt,ct,lt]}],"mix-blend":[{"mix-blend":[...ve(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ve()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Xt]}],"mask-image-linear-from-pos":[{"mask-linear-from":we()}],"mask-image-linear-to-pos":[{"mask-linear-to":we()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":we()}],"mask-image-t-to-pos":[{"mask-t-to":we()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":we()}],"mask-image-r-to-pos":[{"mask-r-to":we()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":we()}],"mask-image-b-to-pos":[{"mask-b-to":we()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":we()}],"mask-image-l-to-pos":[{"mask-l-to":we()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":we()}],"mask-image-x-to-pos":[{"mask-x-to":we()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":we()}],"mask-image-y-to-pos":[{"mask-y-to":we()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[ct,lt]}],"mask-image-radial-from-pos":[{"mask-radial-from":we()}],"mask-image-radial-to-pos":[{"mask-radial-to":we()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[Xt]}],"mask-image-conic-from-pos":[{"mask-conic-from":we()}],"mask-image-conic-to-pos":[{"mask-conic-to":we()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:Q()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ct,lt]}],filter:[{filter:["","none",ct,lt]}],blur:[{blur:ye()}],brightness:[{brightness:[Xt,ct,lt]}],contrast:[{contrast:[Xt,ct,lt]}],"drop-shadow":[{"drop-shadow":["","none",v,Np,Tp]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",Xt,ct,lt]}],"hue-rotate":[{"hue-rotate":[Xt,ct,lt]}],invert:[{invert:["",Xt,ct,lt]}],saturate:[{saturate:[Xt,ct,lt]}],sepia:[{sepia:["",Xt,ct,lt]}],"backdrop-filter":[{"backdrop-filter":["","none",ct,lt]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[Xt,ct,lt]}],"backdrop-contrast":[{"backdrop-contrast":[Xt,ct,lt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Xt,ct,lt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Xt,ct,lt]}],"backdrop-invert":[{"backdrop-invert":["",Xt,ct,lt]}],"backdrop-opacity":[{"backdrop-opacity":[Xt,ct,lt]}],"backdrop-saturate":[{"backdrop-saturate":[Xt,ct,lt]}],"backdrop-sepia":[{"backdrop-sepia":["",Xt,ct,lt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":$()}],"border-spacing-x":[{"border-spacing-x":$()}],"border-spacing-y":[{"border-spacing-y":$()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ct,lt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Xt,"initial",ct,lt]}],ease:[{ease:["linear","initial",_,ct,lt]}],delay:[{delay:[Xt,ct,lt]}],animate:[{animate:["none",S,ct,lt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,ct,lt]}],"perspective-origin":[{"perspective-origin":R()}],rotate:[{rotate:Le()}],"rotate-x":[{"rotate-x":Le()}],"rotate-y":[{"rotate-y":Le()}],"rotate-z":[{"rotate-z":Le()}],scale:[{scale:Oe()}],"scale-x":[{"scale-x":Oe()}],"scale-y":[{"scale-y":Oe()}],"scale-z":[{"scale-z":Oe()}],"scale-3d":["scale-3d"],skew:[{skew:Ne()}],"skew-x":[{"skew-x":Ne()}],"skew-y":[{"skew-y":Ne()}],transform:[{transform:[ct,lt,"","none","gpu","cpu"]}],"transform-origin":[{origin:R()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:me()}],"translate-x":[{"translate-x":me()}],"translate-y":[{"translate-y":me()}],"translate-z":[{"translate-z":me()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ct,lt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mbs":[{"scroll-mbs":$()}],"scroll-mbe":[{"scroll-mbe":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pbs":[{"scroll-pbs":$()}],"scroll-pbe":[{"scroll-pbe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ct,lt]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[Xt,td,ul,Py]}],stroke:[{stroke:["none",...Y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},_L=JO(yL),Dl=t=>Number(t.replace(/,/gi,"")),Wo=t=>{if(t=String(t??0),t.match(/[^0-9,.]/g))return t;if(t){const e=t.split(".");return e[0]=(e[0]??"").replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")}return"0"},Bi=t=>{const e=t.split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e},rn=(t,e)=>(...n)=>{let o=`${n.reduce((s,l,u)=>{if(typeof l=="string")s+=`${l} `,n[u]=t[l];else if(typeof l=="object"){const d={};s+=Object.entries(l).reduce((f,[m,v])=>(t[m]&&(d[t[m]]=!!v),v&&(f+=` ${m} `),f),""),n[u]=d}return s},"")} ${p0(n)}`;e&&(o+=` ${e} ${p0([t[e]])} `,n.push(t[e]));const a=o.trim().split(" ");return a.filter((s,l)=>a.indexOf(s)===l).join(" ")};function ae(...t){return _L(p0(t))}const m0=t=>{if(typeof t=="object"&&t!==null)return Array.isArray(t)?t.map(e=>e==="true"||e==="false"?e==="true":typeof e=="object"&&e!==null?m0(e):e):Object.entries(t).reduce((e,[n,r])=>r==="true"||r==="false"?{...e,[n]:r==="true"}:typeof r=="object"&&r!==null?{...e,[n]:m0(r)}:{...e,[n]:r},{})},yhe=t=>t?t.charAt(0).toUpperCase()+t.slice(1):"",_he=t=>typeof t=="number"||!t||Number.isNaN(Number(t))||String(t??"")?.endsWith(".")?t:Number(t),xhe=t=>t*Math.PI/180,She=t=>t*180/Math.PI,Che=t=>t/1e3,Ehe=t=>{if(t==null)return"-";if(t===0)return"0 Byte";const e=["Byte","KB","MB","GB","TB"],n=Math.min(Math.floor(Math.log(t)/Math.log(1024)),e.length-1),r=t/1024**n;return`${n===0?r:r.toFixed(2)} ${e[n]}`},Oy="data:image/svg+xml,%3csvg%20width='64'%20height='64'%20viewBox='0%200%2064%2064'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11%2023C11%2021.8954%2011.8954%2021%2013%2021H19C20.1046%2021%2021%2021.8954%2021%2023V41C21%2042.1046%2020.1046%2043%2019%2043H13C11.8954%2043%2011%2042.1046%2011%2041V23Z'%20fill='%23FB2C36'/%3e%3cpath%20d='M50.3086%2016.0078C53.4789%2016.1684%2056%2018.7898%2056%2022V42C56%2045.3137%2053.3137%2048%2050%2048H12C8.68629%2048%206%2045.3137%206%2042V22C6%2018.7898%208.52111%2016.1684%2011.6914%2016.0078L12%2016H50L50.3086%2016.0078ZM12%2019C10.3431%2019%209%2020.3431%209%2022V42C9%2043.6569%2010.3431%2045%2012%2045H50C51.6569%2045%2053%2043.6569%2053%2042V22C53%2020.3431%2051.6569%2019%2050%2019H12ZM59.5%2025C60.3284%2025%2061%2025.6716%2061%2026.5V37.5C61%2038.3284%2060.3284%2039%2059.5%2039C58.6716%2039%2058%2038.3284%2058%2037.5V26.5C58%2025.6716%2058.6716%2025%2059.5%2025Z'%20fill='%23FAFAFA'%20fill-opacity='0.3'/%3e%3c/svg%3e",xL=`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">\r
9
+ <path d="M11 23C11 21.8954 11.8954 21 13 21H49C50.1046 21 51 21.8954 51 23V41C51 42.1046 50.1046 43 49 43H13C11.8954 43 11 42.1046 11 41V23Z" fill="#00C951"/>\r
10
+ <path d="M50.3086 16.0078C53.4789 16.1684 56 18.7898 56 22V42C56 45.3137 53.3137 48 50 48H12C8.68629 48 6 45.3137 6 42V22C6 18.7898 8.52111 16.1684 11.6914 16.0078L12 16H50L50.3086 16.0078ZM12 19C10.3431 19 9 20.3431 9 22V42C9 43.6569 10.3431 45 12 45H50C51.6569 45 53 43.6569 53 42V22C53 20.3431 51.6569 19 50 19H12ZM59.5 25C60.3284 25 61 25.6716 61 26.5V37.5C61 38.3284 60.3284 39 59.5 39C58.6716 39 58 38.3284 58 37.5V26.5C58 25.6716 58.6716 25 59.5 25Z" fill="#FAFAFA" fill-opacity="0.3"/>\r
11
+ </svg>\r
12
12
  `,SL="data:image/svg+xml,%3csvg%20width='64'%20height='64'%20viewBox='0%200%2064%2064'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11%2023C11%2021.8954%2011.8954%2021%2013%2021H49C50.1046%2021%2051%2021.8954%2051%2023V41C51%2042.1046%2050.1046%2043%2049%2043H13C11.8954%2043%2011%2042.1046%2011%2041V23Z'%20fill='%2300C951'/%3e%3cpath%20d='M50.3086%2016.0078C53.4789%2016.1684%2056%2018.7898%2056%2022V42C56%2045.3137%2053.3137%2048%2050%2048H12C8.68629%2048%206%2045.3137%206%2042V22C6%2018.7898%208.52111%2016.1684%2011.6914%2016.0078L12%2016H50L50.3086%2016.0078ZM12%2019C10.3431%2019%209%2020.3431%209%2022V42C9%2043.6569%2010.3431%2045%2012%2045H50C51.6569%2045%2053%2043.6569%2053%2042V22C53%2020.3431%2051.6569%2019%2050%2019H12ZM59.5%2025C60.3284%2025%2061%2025.6716%2061%2026.5V37.5C61%2038.3284%2060.3284%2039%2059.5%2039C58.6716%2039%2058%2038.3284%2058%2037.5V26.5C58%2025.6716%2058.6716%2025%2059.5%2025Z'%20fill='%23FAFAFA'%20fill-opacity='0.3'/%3e%3c/svg%3e",CL="data:image/svg+xml,%3csvg%20width='64'%20height='64'%20viewBox='0%200%2064%2064'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11%2023C11%2021.8954%2011.8954%2021%2013%2021H29C30.1046%2021%2031%2021.8954%2031%2023V41C31%2042.1046%2030.1046%2043%2029%2043H13C11.8954%2043%2011%2042.1046%2011%2041V23Z'%20fill='%23FF6900'/%3e%3cpath%20d='M50.3086%2016.0078C53.4789%2016.1684%2056%2018.7898%2056%2022V42C56%2045.3137%2053.3137%2048%2050%2048H12C8.68629%2048%206%2045.3137%206%2042V22C6%2018.7898%208.52111%2016.1684%2011.6914%2016.0078L12%2016H50L50.3086%2016.0078ZM12%2019C10.3431%2019%209%2020.3431%209%2022V42C9%2043.6569%2010.3431%2045%2012%2045H50C51.6569%2045%2053%2043.6569%2053%2042V22C53%2020.3431%2051.6569%2019%2050%2019H12ZM59.5%2025C60.3284%2025%2061%2025.6716%2061%2026.5V37.5C61%2038.3284%2060.3284%2039%2059.5%2039C58.6716%2039%2058%2038.3284%2058%2037.5V26.5C58%2025.6716%2058.6716%2025%2059.5%2025Z'%20fill='%23FAFAFA'%20fill-opacity='0.3'/%3e%3c/svg%3e",EL="data:image/svg+xml,%3csvg%20width='64'%20height='64'%20viewBox='0%200%2064%2064'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11%2023C11%2021.8954%2011.8954%2021%2013%2021H39C40.1046%2021%2041%2021.8954%2041%2023V41C41%2042.1046%2040.1046%2043%2039%2043H13C11.8954%2043%2011%2042.1046%2011%2041V23Z'%20fill='%23EAB308'/%3e%3cpath%20d='M50.3086%2016.0078C53.4789%2016.1684%2056%2018.7898%2056%2022V42C56%2045.3137%2053.3137%2048%2050%2048H12C8.68629%2048%206%2045.3137%206%2042V22C6%2018.7898%208.52111%2016.1684%2011.6914%2016.0078L12%2016H50L50.3086%2016.0078ZM12%2019C10.3431%2019%209%2020.3431%209%2022V42C9%2043.6569%2010.3431%2045%2012%2045H50C51.6569%2045%2053%2043.6569%2053%2042V22C53%2020.3431%2051.6569%2019%2050%2019H12ZM59.5%2025C60.3284%2025%2061%2025.6716%2061%2026.5V37.5C61%2038.3284%2060.3284%2039%2059.5%2039C58.6716%2039%2058%2038.3284%2058%2037.5V26.5C58%2025.6716%2058.6716%2025%2059.5%2025Z'%20fill='%23FAFAFA'%20fill-opacity='0.3'/%3e%3c/svg%3e",ML="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12%2020H7.86671C7.33337%2020%206.93893%2019.7611%206.68337%2019.2833C6.42782%2018.8056%206.4556%2018.3444%206.76671%2017.9L16.7334%203.56666C16.9556%203.25555%2017.2445%203.03888%2017.6%202.91666C17.9556%202.79444%2018.3223%202.79999%2018.7%202.93333C19.0778%203.06666%2019.3556%203.29999%2019.5334%203.63333C19.7112%203.96666%2019.7778%204.32222%2019.7334%204.69999L18.6667%2013.3333H23.8334C24.4112%2013.3333%2024.8167%2013.5889%2025.05%2014.1C25.2834%2014.6111%2025.2112%2015.0889%2024.8334%2015.5333L13.8667%2028.6667C13.6223%2028.9556%2013.3223%2029.1444%2012.9667%2029.2333C12.6112%2029.3222%2012.2667%2029.2889%2011.9334%2029.1333C11.6%2028.9778%2011.3389%2028.7389%2011.15%2028.4167C10.9612%2028.0944%2010.8889%2027.7444%2010.9334%2027.3667L12%2020Z'%20fill='%23FAFAFA'/%3e%3cpath%20d='M17.2546%200.935429C17.866%200.783001%2018.4829%200.798845%2019.073%200.956913L19.3659%201.04773L19.6657%201.16785C20.3511%201.47811%2020.9228%201.98962%2021.2976%202.69227C21.6687%203.38806%2021.8111%204.1537%2021.7194%204.93348L21.7185%204.94519L20.9294%2011.3329H23.8337V13.3329H18.6667L19.7331%204.70008C19.7776%204.32233%2019.7107%203.96698%2019.5329%203.63367C19.3551%203.30034%2019.0777%203.06681%2018.6999%202.93348C18.3222%202.80018%2017.9558%202.79473%2017.6003%202.91687C17.2448%203.03908%2016.9553%203.25525%2016.7331%203.56629L6.76632%2017.9003C6.45548%2018.3445%206.42794%2018.8055%206.68331%2019.2831C6.90699%2019.7013%207.23706%2019.937%207.67355%2019.9891L7.86691%2019.9999H11.9997L10.9333%2027.3671L10.9226%2027.5067C10.9091%2027.8313%2010.9848%2028.1348%2011.1501%2028.4169C11.339%2028.739%2011.6%2028.9781%2011.9333%2029.1337C12.2666%2029.2892%2012.611%2029.3221%2012.9665%2029.2333C13.2776%2029.1555%2013.5462%2029.0012%2013.7722%2028.7704L13.8669%2028.6669L24.8337%2015.5331C25.2112%2015.0888%2025.2827%2014.6114%2025.0495%2014.1005C24.8453%2013.6532%2024.5097%2013.4014%2024.0417%2013.3456L23.8337%2013.3329V11.3329C24.4218%2011.3329%2025.0553%2011.4661%2025.6374%2011.8329C26.1498%2012.1558%2026.5169%2012.5941%2026.7683%2013.0653L26.8698%2013.2694L26.9577%2013.4794C27.1497%2013.9795%2027.2384%2014.5436%2027.1482%2015.1405C27.0469%2015.8102%2026.7423%2016.3698%2026.3679%2016.8143L15.4021%2029.9481L15.3933%2029.9589C14.8876%2030.5564%2014.2278%2030.9797%2013.4519%2031.1737C12.6495%2031.3743%2011.835%2031.2949%2011.0876%2030.9462C10.3807%2030.6163%209.81522%2030.0949%209.42452%2029.4286C9.01113%2028.7234%208.85268%2027.9343%208.94699%2027.1327L8.94991%2027.1063L8.95382%2027.08L9.68917%2021.9999H7.86691C7.29309%2021.9999%206.69041%2021.8678%206.13449%2021.5311C5.58047%2021.1955%205.18671%2020.7257%204.91964%2020.2264C4.64805%2019.7186%204.47659%2019.1183%204.51632%2018.4589C4.55605%2017.7995%204.79869%2017.2241%205.12863%2016.7528L15.0915%202.42469L15.0984%202.41492L15.1062%202.40418C15.566%201.76051%2016.1937%201.28524%2016.9499%201.02527L17.2546%200.935429Z'%20fill='%2309090B'/%3e%3c/svg%3e",kL="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12%2020H7.86671C7.33337%2020%206.93893%2019.7611%206.68337%2019.2833C6.42782%2018.8056%206.4556%2018.3444%206.76671%2017.9L16.7334%203.56666C16.9556%203.25555%2017.2445%203.03888%2017.6%202.91666C17.9556%202.79444%2018.3223%202.79999%2018.7%202.93333C19.0778%203.06666%2019.3556%203.29999%2019.5334%203.63333C19.7112%203.96666%2019.7778%204.32222%2019.7334%204.69999L18.6667%2013.3333H23.8334C24.4112%2013.3333%2024.8167%2013.5889%2025.05%2014.1C25.2834%2014.6111%2025.2112%2015.0889%2024.8334%2015.5333L13.8667%2028.6667C13.6223%2028.9556%2013.3223%2029.1444%2012.9667%2029.2333C12.6112%2029.3222%2012.2667%2029.2889%2011.9334%2029.1333C11.6%2028.9778%2011.3389%2028.7389%2011.15%2028.4167C10.9612%2028.0944%2010.8889%2027.7444%2010.9334%2027.3667L12%2020Z'%20fill='%2309090B'/%3e%3cpath%20d='M17.2546%200.935429C17.866%200.783001%2018.4829%200.798845%2019.073%200.956913L19.3659%201.04773L19.6657%201.16785C20.3511%201.47811%2020.9228%201.98962%2021.2976%202.69227C21.6687%203.38806%2021.8111%204.1537%2021.7194%204.93348L21.7185%204.94519L20.9294%2011.3329H23.8337V13.3329H18.6667L19.7331%204.70008C19.7776%204.32233%2019.7107%203.96698%2019.5329%203.63367C19.3551%203.30034%2019.0777%203.06681%2018.6999%202.93348C18.3222%202.80018%2017.9558%202.79473%2017.6003%202.91687C17.2448%203.03908%2016.9553%203.25526%2016.7331%203.56629L6.76632%2017.9003C6.45548%2018.3445%206.42794%2018.8055%206.68331%2019.2831C6.90699%2019.7013%207.23706%2019.937%207.67355%2019.9891L7.86691%2019.9999H11.9997L10.9333%2027.3671L10.9226%2027.5067C10.9091%2027.8313%2010.9848%2028.1348%2011.1501%2028.4169C11.339%2028.739%2011.6%2028.9781%2011.9333%2029.1337C12.2666%2029.2892%2012.611%2029.3221%2012.9665%2029.2333C13.2776%2029.1555%2013.5462%2029.0012%2013.7722%2028.7704L13.8669%2028.6669L24.8337%2015.5331C25.2112%2015.0888%2025.2827%2014.6114%2025.0495%2014.1005C24.8453%2013.6532%2024.5097%2013.4014%2024.0417%2013.3456L23.8337%2013.3329V11.3329C24.4218%2011.3329%2025.0553%2011.4661%2025.6374%2011.8329C26.1498%2012.1558%2026.5169%2012.5941%2026.7683%2013.0653L26.8698%2013.2694L26.9577%2013.4794C27.1497%2013.9795%2027.2384%2014.5436%2027.1482%2015.1405C27.0469%2015.8102%2026.7423%2016.3698%2026.3679%2016.8143L15.4021%2029.9481L15.3933%2029.9589C14.8876%2030.5564%2014.2278%2030.9797%2013.4519%2031.1737C12.6495%2031.3743%2011.835%2031.2949%2011.0876%2030.9462C10.3807%2030.6163%209.81522%2030.0949%209.42452%2029.4286C9.01113%2028.7234%208.85268%2027.9343%208.94699%2027.1327L8.94991%2027.1063L8.95382%2027.08L9.68917%2021.9999H7.86691C7.29309%2021.9999%206.69041%2021.8678%206.13449%2021.5311C5.58047%2021.1955%205.18671%2020.7257%204.91964%2020.2264C4.64805%2019.7186%204.47659%2019.1183%204.51632%2018.4589C4.55605%2017.7995%204.79869%2017.2241%205.12863%2016.7528L15.0915%202.42469L15.0984%202.41492L15.1062%202.40418C15.566%201.76051%2016.1937%201.28524%2016.9499%201.02527L17.2546%200.935429Z'%20fill='white'/%3e%3c/svg%3e",Ly=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,$y=p0,he=(t,e)=>n=>{var r;if(e?.variants==null)return $y(t,n?.class,n?.className);const{variants:o,defaultVariants:a}=e,i=Object.keys(o).map(u=>{const d=n?.[u],f=a?.[u];if(d===null)return null;const m=Ly(d)||Ly(f);return o[u][m]}),s=n&&Object.entries(n).reduce((u,d)=>{let[f,m]=d;return m===void 0||(u[f]=m),u},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:m,...v}=d;return Object.entries(v).every(g=>{let[w,y]=g;return Array.isArray(y)?y.includes({...a,...s}[w]):{...a,...s}[w]===y})?[...u,f,m]:u},[]);return $y(t,i,l,n?.class,n?.className)},RL=he("relative inline-block shrink-0",{variants:{size:{xs:"size-[1.125rem]",sm:"size-[1.3125rem]",md:"size-[1.5rem]",lg:"size-[1.875rem]"}},defaultVariants:{size:"md"}}),TL=he("pointer-events-none absolute top-1/4 left-1/4 z-[2] h-1/2 w-1/2"),Mhe=he({variants:{status:{empty:"bg-fill-subtle w-0",critical:"bg-fill-danger w-2.5",low:"bg-fill-warning w-5",normal:"bg-accent-yellow w-7",full:"bg-fill-success w-10"}},defaultVariants:{status:"critical"}}),{useMemo:NL}=await q("react"),Dy=64,PL=t=>t==null||t===0?"empty":t<25?"critical":t<50?"low":t<75?"normal":"full",AL={empty:Oy,critical:Oy,low:CL,normal:EL,full:SL},By=xL.match(/<path[^>]*d="([^"]+)"[^>]*fill="#FAFAFA"[^>]*fill-opacity="0\.3"/)?.[1],IL=()=>typeof document>"u"?!1:document.getElementById("rainbow-ui")?.getAttribute("data-theme")==="dark"||document.body.getAttribute("data-theme")==="dark";function khe({className:t,wrapperClassName:e,status:n,size:r="md",percent:o,charging:a=!1,borderColor:i,showPercentLabel:s=!1,percentLabelClassName:l,style:u,...d}){const f=o==null?void 0:Math.max(0,Math.min(o,100)),m=NL(()=>f===0&&typeof n<"u"?n:f!==void 0?PL(f):n??"critical",[n,f]),v=AL[m],g=i??"var(--color-border-subtle)",w=IL(),y=!!i||!w,_=w?ML:kL,S=s&&f!=null,x=`${Math.round(f??0)}%`,C=h("div",{"data-slot":"battery",role:"img","aria-label":`battery-${m}`,className:ae(RL({size:r}),t),style:u,...d,children:te("div",{"data-slot":"battery-icon",className:"absolute inset-0",children:[h("img",{"data-slot":"battery-base",src:v,alt:"","aria-hidden":!0,className:"pointer-events-none absolute inset-0 size-full"}),y&&By&&h("svg",{"data-slot":"battery-border","aria-hidden":!0,viewBox:`0 0 ${Dy} ${Dy}`,className:"pointer-events-none absolute inset-0 z-[1] size-full",children:h("path",{d:By,fill:g})}),a&&h("img",{"data-slot":"battery-charging",src:_,alt:"","aria-hidden":!0,className:TL()})]})});return S?te("div",{"data-slot":"battery-wrapper",className:ae("inline-flex items-center gap-1 align-middle",e),children:[C,h("div",{"data-slot":"battert-percent",className:ae("text-fg-subtle typo-compact-xs-medium flex items-center justify-start",l),children:x})]}):C}const OL="_spinner_1h0pd_40",LL="_rotate_1h0pd_1",$L="_border_1h0pd_46",DL="_path_1h0pd_52",BL="_dash_1h0pd_1",zL={spinner:OL,rotate:LL,border:$L,path:DL,dash:BL},Hm=rn(zL,"rb-ui"),Hi=({className:t="",borderClassName:e,pathClassName:n,size:r=20})=>te("svg",{className:Hm("spinner",t),viewBox:"0 0 50 50",width:r,height:r,stroke:"currentColor",children:[h("circle",{className:ae(Hm("border"),e),cx:"25",cy:"25",r:"20",fill:"none"}),h("circle",{className:ae(Hm("path"),n),cx:"25",cy:"25",r:"20",fill:"none"})]}),FL="_ripple_78a71_39",VL="_animate_78a71_44",jL={ripple:FL,animate:VL,"material-ripple":"_material-ripple_78a71_1"},{useRef:HL,useCallback:WL,useState:qL,useEffect:UL,memo:YL}=await q("react"),Pp={color:"#ddd",duration:500,maxSize:400,disabled:!1},GL=rn(jL,"rb-ui"),KL=({color:t=Pp.color,duration:e=Pp.duration,maxSize:n=Pp.maxSize,disabled:r=Pp.disabled,children:o})=>{const a=HL(null),[i,s]=qL(null),l=()=>{if(a.current){if(a.current.childElementCount>1)throw new Error("[Ripple]: Ripple 컴포넌트 사용할 시 Ripple 컴포넌트의 하위 자식 엘리먼트 갯수는 하나여야만 합니다. 그렇지 않을 시 Ripple은 작동하지 않습니다.");if(a.current.childElementCount===0)throw new Error("[Ripple]: Ripple 컴포넌트의 하위 자식 엘리먼트가 존재하지 않습니다. 하위 자식 엘리먼트가 없을 경우 Ripple은 작동하지 않습니다.");s(a.current.children[0])}},u=WL(d=>{if(!i||r)return;i.style.position="relative",i.style.overflow="hidden";const{clientX:f,clientY:m}=d,{left:v,top:g,width:w,height:y}=i.getBoundingClientRect(),_=document.createElement("jwripple"),S=w+y/2;_.classList.add("animate"),_.setAttribute("style",`
13
13
  position: absolute;
14
14
  top: ${m-g}px;
@@ -231,7 +231,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
231
231
  ${He}
232
232
  width: ${ve}px;
233
233
  height: ${we}px;
234
- `,y.current.setAttribute("style",He),x.current.setAttribute("style",_e),S.current&&S.current.setAttribute("style",qe),C.current===2)return C.current=0,L(!0);await jse(20),C.current+=1,D()},[i,r,l,z,V,N,I]),U=tx(()=>kn.debounce(Q=>{Q.type!=="click"&&R.current||(Q.type==="click"&&(Q.preventDefault(),R.current=!0),Q.type==="mouseout"?L(!1):C.current===0&&D(),Q.preventDefault())},100),[D]),Y=gs(()=>{!_.current||typeof v=="boolean"||B.forEach(Q=>{_.current.addEventListener(Q,U)})},[v,B,U]),oe=gs(()=>{_.current&&B.forEach(Q=>{_.current.removeEventListener(Q,U)})},[B,U]);return Nf(y,Q=>{if(typeof v=="boolean")return;const re=_.current;re&&!re.contains(Q.target)&&(R.current=!1,L(!1))}),Xg(()=>(F(),Y(),()=>{oe()}),[D,F,Y,oe]),Xg(()=>{const Q=kn.throttle(()=>{L(!1)},30);return window.removeEventListener("resize",Q),window.addEventListener("resize",Q),g&&(window.removeEventListener("scroll",Q),window.addEventListener("scroll",Q)),()=>{window.removeEventListener("resize",Q),window.removeEventListener("scroll",Q)}},[g,D]),Xg(()=>{v&&P&&D(),L(v)},[P,v,D]),h(Gl,{id:"tooltip",children:te("div",{ref:()=>{P||O(!0)},className:vl("tooltip",t,$,{open:M}),style:{visibility:M?"visible":"hidden","--tooltip-color":u,"--tooltip-text-color":d,"--tooltip-box-shadow":f,"--tooltip-border-radius":m},children:[h("div",{ref:x,className:vl("tooltip-shadow")}),!s&&h("div",{ref:S,className:vl("tooltip-arrow"),children:h("span",{children:h(h8,{className:vl("tooltip-arrow-icon")})})}),h("div",{ref:y,className:vl("tooltip-text"),children:h("div",{className:vl("speech-bubble-wrap"),children:h("div",{className:vl("speech-bubble"),style:{width:n},children:h("div",{children:w})})})})]})})},ak=t=>{window.cacheImgs||(window.cacheImgs={}),Array.isArray(t)||(t=[t]),t.forEach(e=>{if(e&&!window.cacheImgs[e]){const n=new Image;n.src=e;const r=Object.entries(window.cacheImgs);if(r.length>200){r.sort((a,i)=>a[1].index-i[1].index);const o=r[0][0];delete window.cacheImgs[o],window.cacheImgs=r.slice(1,r.length).reduce((a,i)=>({...a,[i[0]]:{...i[1],index:i[1].index-1}}),{})}window.cacheImgs[e]={image:n,index:r.length}}})},Hse="_loading_fcm70_43",ik={"virtual-scroll":"_virtual-scroll_fcm70_39",loading:Hse,"virtual-item":"_virtual-item_fcm70_46","no-data":"_no-data_fcm70_49"},{cloneElement:nx,createElement:Wse,memo:sk,useCallback:Ud,useEffect:H0,useMemo:Fc,useRef:Jc,useState:Vd}=await q("react"),t0=rn(ik,"rb-ui"),lk=(t,e,n)=>{let r=0;for(let o=0;o<e;o++)r+=t[o]||n;return r},ck=sk(({gapY:t,index:e,resizeObserver:n,children:r,heightList:o,estimateHeight:a,updateHeight:i})=>{const s=Jc(null),[l,u]=Vd({position:"absolute",width:"100%",top:(s.current?.offsetHeight??0+t)*e,left:0,zIndex:1,visibility:o[e]?"visible":"hidden"}),d=Ud(()=>{if(s.current){const m=s.current.offsetHeight;i(m,e)}},[e,i]),f=Ud(()=>{if(o[e]){const m=lk(o,e,a);u(v=>({...v,left:0,top:m+t,visibility:"visible"}))}else d()},[a,t,o,e,d]);return H0(()=>{f()},[f]),H0(()=>{const m=s.current;return n.observe(m),()=>{n.unobserve(m)}},[n]),h("div",{ref:s,"data-index":e,className:t0("virtual-item"),style:l,children:r})});ck.displayName="VirtualItem";const qse=({className:t="",scrollTarget:e,list:n,preloadCnt:r=5,itemHeight:o,gapY:a=0,loading:i,loadingElement:s=h(Hi,{}),skeletonElement:l,skeletonCnt:u=3,noDataMsg:d,element:f})=>{const m=Jc(null),v=Jc(null),g=Jc(0),w=Jc(0),y=Jc({startIndex:0,endIndex:50}),[_]=Vd(!!n),[S,x]=Vd([]),[C,R]=Vd({startIndex:0,endIndex:50}),[P,O]=Vd({containerWidth:m.current?.clientWidth??0,gapY:typeof a=="number"?a:a(m.current?.clientWidth??0)}),$=Fc(()=>Wse(f),[f]),A=Fc(()=>new ResizeObserver(I=>{for(const D of I){const{clientWidth:U,offsetHeight:Y,dataset:oe}=D.target,Q=Number(oe.index??-1);Q===-1?O({containerWidth:U??0,gapY:typeof a=="number"?a:a(U??0)}):x(re=>re.map((le,ee)=>ee===Q?Y:le))}}),[a]),M=Fc(()=>i||!n,[i,n]),L=Fc(()=>!n&&!l?[]:M?Array.from({length:u}).map(()=>{}):n.slice(C.startIndex,C.endIndex),[n,l,C,u,M]),B=Fc(()=>{const I=typeof o=="number"?o:o(P.containerWidth);return S.filter(U=>!!U).length?Math.max(...S.filter(U=>!!U)):I},[S,o,P.containerWidth]),F=Fc(()=>{const I=n?n.length:u;return I===0||!(B>0)?0:lk(S,I,B)+P.gapY*I},[n,u,S,B,P.gapY]),N=Ud(()=>{const I=e?"current"in e?e.current:e:null,D=I?I.scrollTop:window.scrollY,U=I?I.offsetHeight:window.innerHeight,Y=n?n.length:u,oe=[];for(let le=0;le<Y;le++)oe.push((oe[le-1]??0)+(S[le]||B));let Q=oe.findIndex(le=>le>=D),re=oe.findIndex(le=>le>=D+U);return Q===-1?Q=y.current.startIndex:(Q=Q-10-r,Q=B&&Q>0?Q:0),re===-1?re=y.current.endIndex:(re=re+10+r,re=B&&re>0?re:50),{startIndex:Q,endIndex:re}},[e,n,u,S,B,r]),V=Ud((I,D)=>{!n&&!l||x(U=>(U[D]=I,U.slice(0,n?n.length:u)))},[n,l,u]),z=Ud(()=>{const I=e?"current"in e?e.current:e:null,D=I?I.scrollTop:window.scrollY,U=Date.now(),Y=D-w.current,oe=Y>0,Q=Math.abs(Y);v.current!==null&&cancelAnimationFrame(v.current),v.current=requestAnimationFrame(()=>{const re=N();if(Q>0&&D>0&&(oe&&re.endIndex<y.current.endIndex||!oe&&re.startIndex>y.current.startIndex)){cancelAnimationFrame(v.current),v.current=null;return}if(oe&&Q>B?re.endIndex+=Math.floor(Q/B):!oe&&Q>B&&(re.startIndex-=Math.floor(Q/B),re.startIndex<=0&&(re.startIndex=0)),U-g.current>=200||D<=0||Q===0){R(re),w.current=D,y.current={...re},g.current=U,v.current=null;return}else Q>=B*(r/2)?(R(re),w.current=D,y.current={...re},g.current=U,v.current=null):(y.current.endIndex-re.endIndex>r||re.startIndex-y.current.startIndex>r)&&(R(re),w.current=D,g.current=U,y.current={...re})})},[N,B,r,e]);return H0(()=>{A.observe(m.current)},[m,A]),H0(()=>{if(typeof window<"u"&&m.current){const I=e?"current"in e?e.current:e:window;return z(),I.removeEventListener("scroll",z),I.addEventListener("scroll",z),()=>{v.current!==null&&cancelAnimationFrame(v.current),I.removeEventListener("scroll",z)}}},[e,v,z]),te("div",{ref:m,className:t0(t,"virtual-scroll",{"no-data":n&&!n.length}),style:{height:F,minHeight:_&&!n?"100000px":0},children:[M&&!l&&h("div",{className:t0("loading"),children:s}),!M&&n.length===0&&(typeof d=="object"?d:h(zf,{className:t0("no-msg-comp"),nullText:d})),L.map((I,D)=>{const U=C.startIndex+D;return h(ck,{...P,index:U,resizeObserver:A,heightList:S,estimateHeight:B,updateHeight:V,children:h("div",{children:n?nx($,{item:I,imageCacher:ak,index:U}):nx(l,{})})},`${U}-${P.containerWidth}-${n?"":"skeleton"}`)})]})},ove=sk(qse),W0=await q("react"),{cloneElement:Use,createElement:Yse,memo:uk,useCallback:Bv,useEffect:Qg,useMemo:Vc,useRef:wl,useState:Yd}=W0;typeof window>"u"&&(W0.useLayoutEffect=W0.useEffect);const n0=rn(ik,"rb-ui"),dk=uk(({width:t,gapX:e,gapY:n,rowIndex:r,columnIndex:o,startIndex:a,children:i})=>{const[s,l]=Yd(),[u,d]=Yd({position:"absolute",width:t,top:(s?.offsetHeight??0+n)*(a+o),left:r?(t+e)*r:0,zIndex:1}),f=Bv(()=>{if(s){const m=s.offsetHeight;d(v=>({...v,width:t,left:r?(t+e)*r:0,top:(m+n)*(a+o),visibility:"visible"}))}},[s,t,r,e,n,a,o]);return W0.useLayoutEffect(()=>{f()},[f]),h("div",{ref:l,className:n0("virtual-item"),style:u,children:i})});dk.displayName="VirtualItem";const Gse=({list:t,className:e="",scrollTarget:n,preloadRowCnt:r=2,itemWidth:o,itemHeight:a,gapX:i,gapY:s,loading:l,loadingElement:u=h(Hi,{}),skeletonElement:d,skeletonCnt:f=3,noDataMsg:m,element:v})=>{const g=wl(null),w=wl(null),y=wl(0),_=wl(0),S=wl(0),x=wl(0),C=wl({startIndex:0,endIndex:10}),[R]=Yd(!!t),[P,O]=Yd({startIndex:0,endIndex:10}),[$,A]=Yd({containerWidth:g.current?.clientWidth??0,width:typeof o=="number"?o:o(g.current?.clientWidth??0),gapX:typeof i=="number"?i:i(g.current?.clientWidth??0),gapY:typeof s=="number"?s:s(g.current?.clientWidth??0)}),M=Vc(()=>{if(!(typeof window>"u"))return new ResizeObserver(D=>{for(const U of D){const{clientWidth:Y}=U.target;A({containerWidth:Y??0,width:typeof o=="number"?o:o(Y??0),gapX:typeof i=="number"?i:i(Y??0),gapY:typeof s=="number"?s:s(Y??0)})}})},[i,s,o]),L=Vc(()=>l||!t,[l,t]),B=Vc(()=>{const D=Y=>{const{containerWidth:oe,width:Q}=$,re=parseInt((oe/Q).toString()),le=Math.ceil(Y.length/re)||0,ee=new Array(le);for(let ne=0;ne<le;ne++)ee[ne]=Y.slice(ne*re,(ne+1)*re).map(ue=>ue);return ee},U=Array.from({length:f}).map(()=>{});return D(L?U:t)},[t,L,$,f]),F=Vc(()=>B.slice(P.startIndex,P.endIndex),[P,B]),N=Vc(()=>{const D=typeof a=="number"?a:a($.containerWidth);if(g.current){const U=Array.from(g.current.children);U.length&&(g.current.style.minHeight="");const Y=Math.max(...U.map(oe=>(oe.offsetHeight??0)+$.gapY),0)||D||0;return y.current=Y,Y}return D||0},[B,F,$,a]),V=Vc(()=>{if(!(!t&&!d))return N>0?B.length*N:0},[t,d,N,B.length]),z=Bv(()=>{const D=n?"current"in n?n.current:n:null,U=D?D.scrollTop:window.scrollY,Y=D?D.offsetHeight:window.innerHeight,oe=D?D.scrollHeight:document.body.scrollHeight,Q=_.current>U?0:Math.floor((U-_.current)/N)-r,re=Math.ceil((U+Y)/N)+r;return oe===U+Y?{startIndex:C.current.startIndex,endIndex:C.current.endIndex}:{startIndex:N&&Q>=0?Q:0,endIndex:!N||!re?10:re}},[N,r,n]),I=Bv(()=>{const D=n?"current"in n?n.current:n:null,U=D?D.scrollTop:window.scrollY,Y=Date.now(),oe=U-x.current,Q=oe>0,re=Q?oe:oe*-1;w.current!==null&&cancelAnimationFrame(w.current),w.current=requestAnimationFrame(()=>{const le=z();if(re>0&&U>0&&(Q&&le.endIndex<C.current.endIndex||!Q&&le.startIndex>C.current.startIndex)){cancelAnimationFrame(w.current),w.current=null;return}if(Q&&re>N?le.endIndex+=Math.floor(re/N):!Q&&re>N&&(le.startIndex-=Math.floor(re/N),le.startIndex<=0&&(le.startIndex=0)),Y-S.current>=200||U<=0||re===0){O(le),x.current=U,C.current={...le},S.current=Y,w.current=null;return}else if(re>=N*(r/2)){O(le),x.current=U,S.current=Y,C.current={...le},w.current=null;return}else(C.current.endIndex-le.endIndex>r||le.startIndex-C.current.startIndex>r)&&(O(le),x.current=U,S.current=Y,C.current={...le})})},[z,N,r,n]);return Qg(()=>{if(M){const D=g.current;return M.observe(D),()=>{D&&M.unobserve(D)}}},[g,M]),Qg(()=>{if(g.current){const{top:D}=g.current.getBoundingClientRect();_.current=window.scrollY+D}},[]),Qg(()=>{if(typeof window<"u"&&g.current){const D=n?"current"in n?n.current:n:window;return I(),D?.removeEventListener("scroll",I),D?.addEventListener("scroll",I),()=>{w.current!==null&&cancelAnimationFrame(w.current),D?.removeEventListener("scroll",I)}}},[n,w,I]),te("div",{ref:g,className:n0(e,"virtual-scroll",{"no-data":!!t&&!t.length}),style:{height:V,minHeight:R&&!F.length?"9999999px":0},children:[L&&!d&&h("div",{className:n0("loading"),children:u}),!L&&t.length===0&&(typeof m=="object"?m:h(zf,{className:n0("no-msg-comp"),nullText:m})),F.map((D,U)=>D.map((Y,oe)=>{const Q=(P.startIndex+U)*D.length+oe,re=U*D.length+oe;return h(dk,{...$,rowIndex:oe,columnIndex:U,startIndex:P.startIndex,children:h("div",{children:Use(t?Yse(v,{item:Y,imageCacher:ak,index:Q}):d,{})})},`${re}-${$.containerWidth}${L?"skeleton":""}`)}))]})};uk(Gse);const Kse="_joystick_1y6py_40",Xse="_disabled_1y6py_48",Zse="_arc_1y6py_220",Qse="_stick_1y6py_71",Jse={joystick:Kse,disabled:Xse,"joystick-inner":"_joystick-inner_1y6py_55","direction-icons":"_direction-icons_1y6py_107","icon-top":"_icon-top_1y6py_91","icon-bottom":"_icon-bottom_1y6py_99","icon-left":"_icon-left_1y6py_75","icon-right":"_icon-right_1y6py_83","curved-icons":"_curved-icons_1y6py_155","icon-curved-top":"_icon-curved-top_1y6py_92","icon-curved-bottom":"_icon-curved-bottom_1y6py_100","stick-area":"_stick-area_1y6py_203","stick-area-inner":"_stick-area-inner_1y6py_213",arc:Zse,stick:Qse},{useRef:Ni,useCallback:bl,useId:ele,useEffect:rx}=await q("react"),Fr=rn(Jse),tle=({className:t,type:e="direction",size:n=100,stickColor:r="radial-gradient(circle at 25px 25px, #444444, #141414)",arcColor:o="var(--color-scale-zinc-100)",stickAreaColor:a="#878787",throttleThreshold:i=.05,throttleDuration:s,xOnly:l=!1,yOnly:u=!1,disableDiagonal:d=!1,disabled:f=!1,keepMoveEventInterval:m,paddingSize:v=10,style:g,onStart:w,onMove:y,onEnd:_})=>{const S=Ni(null),x=Ni(null),C=Ni(null),R=Ni(null),P=Ni(null),O=Ni(null),$=Ni(null),A=Ni({x:0,y:0}),M=Ni({type:"none",startPosition:{x:0,y:0},normalizedDistance:{x:0,y:0},rotate:{radian:0,degree:0},distance:{x:0,y:0},direction:{x:"center",y:"center"},time:Date.now()}),L=ele().replace(/:/g,""),B=({clientX:oe,clientY:Q})=>{if(!x.current)return;const{width:re,top:le,left:ee}=x.current.getBoundingClientRect(),ne=re/2,ue=oe-ee-ne,ve=Q-le-ne;x.current.style.transform=`translate3d(${ue}px, ${ve}px, 0px)`,S.current.style.transition=""},F=bl(()=>{x.current&&(x.current.style.transform="translate3d(0px, 0px, 0px)",x.current.classList.remove("left","right","top","bottom","center"))},[]),N=bl(({clientX:oe,clientY:Q})=>{if(!S.current||!C.current)return;const le=C.current.offsetWidth/2,ee={x:oe-M.current.startPosition.x,y:Q-M.current.startPosition.y};d?Math.abs(ee.x)>Math.abs(ee.y)?ee.y=0:Math.abs(ee.x)<Math.abs(ee.y)?ee.x=0:(ee.x=0,ee.y=0):l?ee.y=0:u&&(ee.x=0);const ne=Math.hypot(ee.x,ee.y);if(ne>le){const Ne=le/ne;ee.x*=Ne,ee.y*=Ne}const ue={x:Math.abs(ee.x)>3?ee.x>0?"right":"left":"center",y:Math.abs(ee.y)>3?ee.y>0?"bottom":"top":"center"},ve=Math.atan2(ee.x,-ee.y);let we=ve*180/Math.PI;we<0&&(we+=360);const ye={radian:ve,degree:we},Le={x:ee.x/le,y:-ee.y/le},Oe=Math.hypot(Le.x-A.current.x,Le.y-A.current.y);return{direction:ue,distance:ee,normalizedDistance:Le,movementRatio:Oe,rotate:ye}},[d,l,u]),V=bl(({clientX:oe,clientY:Q})=>{if(!S.current||!C.current)return;const{direction:re,distance:le,rotate:ee,normalizedDistance:ne,movementRatio:ue}=N({clientX:oe,clientY:Q});S.current.style.transform=`translate3d(${le.x}px, ${le.y}px, 0px)`,C.current.style.setProperty("--joy-angle",`${ee.degree}deg`);const ve=Math.hypot(ne.x,ne.y);return C.current.style.setProperty("--joy-ratio",`${ve}`),x.current.classList.remove("left","right","top","bottom","center"),x.current.classList.add(re.x,re.y),{direction:re,distance:{x:le.x,y:-le.y},rotate:ee,normalizedDistance:ne,movementRatio:ue}},[N]),z=bl(()=>{S.current&&(S.current.style.transition="transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1)",C.current?.style.setProperty("--joy-ratio","0"),S.current.style.transform="translate3d(0px, 0px, 0px)")},[]),I=bl(()=>{const Q=Date.now()-M.current.time;if(!$.current||["none","end"].includes(M.current.type)||Q<s)return;const re=$.current;re.preventDefault(),re.stopPropagation();const{clientX:le,clientY:ee}=re,{distance:ne,direction:ue,rotate:ve,normalizedDistance:we,movementRatio:ye}=V({clientX:le,clientY:ee});M.current={...M.current,type:"move",rotate:ve,distance:ne,normalizedDistance:we,direction:ue,time:Date.now()};const Le={...M.current,event:re,targets:{joystick:x.current,stickArea:C.current,stick:S.current}};ye>=i&&(A.current=we,y?.(Le)),console.log("keepMoveEventInterval",m),m&&(window.clearInterval(P.current),P.current=window.setInterval(()=>{console.log("moveEventIntervalIdRef.current",P.current),console.log("moveStatusRef.current",M.current),M.current.type==="move"&&y?.(Le)},m))},[i,s,y,V,m]),D=bl(oe=>{window.clearInterval(P.current),!["none","end"].includes(M.current.type)&&(oe.target instanceof Element&&oe.target.releasePointerCapture?.(oe.pointerId),oe.preventDefault(),oe.stopPropagation(),M.current.type="end",setTimeout(()=>{M.current.type="none"},100),F(),z(),x.current.classList.remove("active"),window.clearInterval(P.current),$.current=null,_?.({type:"end",...M.current,direction:{x:"center",y:"center"},normalizedDistance:{x:0,y:0},rotate:{degree:0,radian:0},distance:{x:0,y:0},event:oe,targets:{joystick:x.current,stickArea:C.current,stick:S.current}}))},[_,F,z]),U=oe=>{if(oe.button===2||f||["start","move","end"].includes(M.current.type))return;R.current=`${L}-${oe.pointerId}`,oe.currentTarget.setPointerCapture(oe.pointerId),oe.stopPropagation(),oe.preventDefault();const{clientX:Q,clientY:re}=oe;M.current.type="start",M.current.startPosition={x:Q,y:re},x.current.classList.add("active"),B({clientX:Q,clientY:re}),w?.({...M.current,event:oe,targets:{joystick:x.current,stickArea:C.current,stick:S.current},distance:{x:0,y:0},normalizedDistance:{x:0,y:0},rotate:{radian:0,degree:0},startPosition:{x:Q,y:re},direction:{x:"center",y:"center"}})},Y=bl(oe=>{$.current=oe.nativeEvent,R.current===`${L}-${oe.pointerId}`&&(O.current&&cancelAnimationFrame(O.current),O.current=requestAnimationFrame(I))},[I,L]);return rx(()=>{const oe=Q=>{D(Q)};return window.addEventListener("pointerup",oe),()=>{window.removeEventListener("pointerup",oe)}},[L,D]),rx(()=>{const oe=P.current;return()=>{window.clearInterval(oe)}},[]),h("div",{className:Fr("joystick",t,{disabled:f}),style:{...g,"--joy-stick-size":`${n+v*2}px`,"--joy-stick-color":r,"--joy-stick-area-color":a,"--joy-arc-color":o},onContextMenu:oe=>oe.preventDefault(),children:te("div",{ref:x,className:Fr("joystick-inner"),style:{padding:v},children:[h("div",{ref:C,className:Fr("stick-area"),style:{padding:v},onPointerDownCapture:U,onPointerUpCapture:D,onPointerMove:Y,children:te("span",{className:Fr("stick-area-inner"),children:[h("span",{className:Fr("arc")}),e==="direction"&&te("div",{className:Fr("direction-icons"),children:[h("span",{className:Fr("icon-top"),children:h(C$,{})}),h("span",{className:Fr("icon-bottom"),children:h(_$,{})}),h("span",{className:Fr("icon-left"),children:h(x$,{})}),h("span",{className:Fr("icon-right"),children:h(S$,{})}),h("span",{className:Fr("icon-curved-top")})]}),e==="curved"&&te("div",{className:Fr("curved-icons"),children:[h("span",{className:Fr("icon-curved-top"),children:h(Wy,{})}),h("span",{className:Fr("icon-curved-bottom"),children:h(Wy,{})})]})]})}),h("div",{ref:S,className:Fr("stick")})]})})},nle="_border_b2cyl_50",rle={"white-button":"_white-button_b2cyl_40",border:nle},ole=rn(rle),fk=({className:t,outline:e,ripple:n,...r})=>h(Ah,{className:ole(t,"white-button",{border:e}),ripple:{color:"#9d9d9d",...n},...r}),{useMemo:ave}=await q("react"),{useState:ox,useEffect:Jg,useRef:vs,useCallback:o1}=await q("react"),ale=({className:t,initStatus:e=!0,hideErrorMessage:n,label:r,lebelPosition:o="top",loading:a,loadingMessage:i="Connecting...",disconnectedMessage:s=`Disconnected
234
+ `,y.current.setAttribute("style",He),x.current.setAttribute("style",_e),S.current&&S.current.setAttribute("style",qe),C.current===2)return C.current=0,L(!0);await jse(20),C.current+=1,D()},[i,r,l,z,V,N,I]),U=tx(()=>kn.debounce(Q=>{Q.type!=="click"&&R.current||(Q.type==="click"&&(Q.preventDefault(),R.current=!0),Q.type==="mouseout"?L(!1):C.current===0&&D(),Q.preventDefault())},100),[D]),Y=gs(()=>{!_.current||typeof v=="boolean"||B.forEach(Q=>{_.current.addEventListener(Q,U)})},[v,B,U]),oe=gs(()=>{_.current&&B.forEach(Q=>{_.current.removeEventListener(Q,U)})},[B,U]);return Nf(y,Q=>{if(typeof v=="boolean")return;const re=_.current;re&&!re.contains(Q.target)&&(R.current=!1,L(!1))}),Xg(()=>(F(),Y(),()=>{oe()}),[D,F,Y,oe]),Xg(()=>{const Q=kn.throttle(()=>{L(!1)},30);return window.removeEventListener("resize",Q),window.addEventListener("resize",Q),g&&(window.removeEventListener("scroll",Q,!0),window.addEventListener("scroll",Q,!0)),()=>{window.removeEventListener("resize",Q),window.removeEventListener("scroll",Q,!0)}},[g,D]),Xg(()=>{v&&P&&D(),L(v)},[P,v,D]),h(Gl,{id:"tooltip",children:te("div",{ref:()=>{P||O(!0)},className:vl("tooltip",t,$,{open:M}),style:{visibility:M?"visible":"hidden","--tooltip-color":u,"--tooltip-text-color":d,"--tooltip-box-shadow":f,"--tooltip-border-radius":m},children:[h("div",{ref:x,className:vl("tooltip-shadow")}),!s&&h("div",{ref:S,className:vl("tooltip-arrow"),children:h("span",{children:h(h8,{className:vl("tooltip-arrow-icon")})})}),h("div",{ref:y,className:vl("tooltip-text"),children:h("div",{className:vl("speech-bubble-wrap"),children:h("div",{className:vl("speech-bubble"),style:{width:n},children:h("div",{children:w})})})})]})})},ak=t=>{window.cacheImgs||(window.cacheImgs={}),Array.isArray(t)||(t=[t]),t.forEach(e=>{if(e&&!window.cacheImgs[e]){const n=new Image;n.src=e;const r=Object.entries(window.cacheImgs);if(r.length>200){r.sort((a,i)=>a[1].index-i[1].index);const o=r[0][0];delete window.cacheImgs[o],window.cacheImgs=r.slice(1,r.length).reduce((a,i)=>({...a,[i[0]]:{...i[1],index:i[1].index-1}}),{})}window.cacheImgs[e]={image:n,index:r.length}}})},Hse="_loading_fcm70_43",ik={"virtual-scroll":"_virtual-scroll_fcm70_39",loading:Hse,"virtual-item":"_virtual-item_fcm70_46","no-data":"_no-data_fcm70_49"},{cloneElement:nx,createElement:Wse,memo:sk,useCallback:Ud,useEffect:H0,useMemo:Fc,useRef:Jc,useState:Vd}=await q("react"),t0=rn(ik,"rb-ui"),lk=(t,e,n)=>{let r=0;for(let o=0;o<e;o++)r+=t[o]||n;return r},ck=sk(({gapY:t,index:e,resizeObserver:n,children:r,heightList:o,estimateHeight:a,updateHeight:i})=>{const s=Jc(null),[l,u]=Vd({position:"absolute",width:"100%",top:(s.current?.offsetHeight??0+t)*e,left:0,zIndex:1,visibility:o[e]?"visible":"hidden"}),d=Ud(()=>{if(s.current){const m=s.current.offsetHeight;i(m,e)}},[e,i]),f=Ud(()=>{if(o[e]){const m=lk(o,e,a);u(v=>({...v,left:0,top:m+t,visibility:"visible"}))}else d()},[a,t,o,e,d]);return H0(()=>{f()},[f]),H0(()=>{const m=s.current;return n.observe(m),()=>{n.unobserve(m)}},[n]),h("div",{ref:s,"data-index":e,className:t0("virtual-item"),style:l,children:r})});ck.displayName="VirtualItem";const qse=({className:t="",scrollTarget:e,list:n,preloadCnt:r=5,itemHeight:o,gapY:a=0,loading:i,loadingElement:s=h(Hi,{}),skeletonElement:l,skeletonCnt:u=3,noDataMsg:d,element:f})=>{const m=Jc(null),v=Jc(null),g=Jc(0),w=Jc(0),y=Jc({startIndex:0,endIndex:50}),[_]=Vd(!!n),[S,x]=Vd([]),[C,R]=Vd({startIndex:0,endIndex:50}),[P,O]=Vd({containerWidth:m.current?.clientWidth??0,gapY:typeof a=="number"?a:a(m.current?.clientWidth??0)}),$=Fc(()=>Wse(f),[f]),A=Fc(()=>new ResizeObserver(I=>{for(const D of I){const{clientWidth:U,offsetHeight:Y,dataset:oe}=D.target,Q=Number(oe.index??-1);Q===-1?O({containerWidth:U??0,gapY:typeof a=="number"?a:a(U??0)}):x(re=>re.map((le,ee)=>ee===Q?Y:le))}}),[a]),M=Fc(()=>i||!n,[i,n]),L=Fc(()=>!n&&!l?[]:M?Array.from({length:u}).map(()=>{}):n.slice(C.startIndex,C.endIndex),[n,l,C,u,M]),B=Fc(()=>{const I=typeof o=="number"?o:o(P.containerWidth);return S.filter(U=>!!U).length?Math.max(...S.filter(U=>!!U)):I},[S,o,P.containerWidth]),F=Fc(()=>{const I=n?n.length:u;return I===0||!(B>0)?0:lk(S,I,B)+P.gapY*I},[n,u,S,B,P.gapY]),N=Ud(()=>{const I=e?"current"in e?e.current:e:null,D=I?I.scrollTop:window.scrollY,U=I?I.offsetHeight:window.innerHeight,Y=n?n.length:u,oe=[];for(let le=0;le<Y;le++)oe.push((oe[le-1]??0)+(S[le]||B));let Q=oe.findIndex(le=>le>=D),re=oe.findIndex(le=>le>=D+U);return Q===-1?Q=y.current.startIndex:(Q=Q-10-r,Q=B&&Q>0?Q:0),re===-1?re=y.current.endIndex:(re=re+10+r,re=B&&re>0?re:50),{startIndex:Q,endIndex:re}},[e,n,u,S,B,r]),V=Ud((I,D)=>{!n&&!l||x(U=>(U[D]=I,U.slice(0,n?n.length:u)))},[n,l,u]),z=Ud(()=>{const I=e?"current"in e?e.current:e:null,D=I?I.scrollTop:window.scrollY,U=Date.now(),Y=D-w.current,oe=Y>0,Q=Math.abs(Y);v.current!==null&&cancelAnimationFrame(v.current),v.current=requestAnimationFrame(()=>{const re=N();if(Q>0&&D>0&&(oe&&re.endIndex<y.current.endIndex||!oe&&re.startIndex>y.current.startIndex)){cancelAnimationFrame(v.current),v.current=null;return}if(oe&&Q>B?re.endIndex+=Math.floor(Q/B):!oe&&Q>B&&(re.startIndex-=Math.floor(Q/B),re.startIndex<=0&&(re.startIndex=0)),U-g.current>=200||D<=0||Q===0){R(re),w.current=D,y.current={...re},g.current=U,v.current=null;return}else Q>=B*(r/2)?(R(re),w.current=D,y.current={...re},g.current=U,v.current=null):(y.current.endIndex-re.endIndex>r||re.startIndex-y.current.startIndex>r)&&(R(re),w.current=D,g.current=U,y.current={...re})})},[N,B,r,e]);return H0(()=>{A.observe(m.current)},[m,A]),H0(()=>{if(typeof window<"u"&&m.current){const I=e?"current"in e?e.current:e:window;return z(),I.removeEventListener("scroll",z),I.addEventListener("scroll",z),()=>{v.current!==null&&cancelAnimationFrame(v.current),I.removeEventListener("scroll",z)}}},[e,v,z]),te("div",{ref:m,className:t0(t,"virtual-scroll",{"no-data":n&&!n.length}),style:{height:F,minHeight:_&&!n?"100000px":0},children:[M&&!l&&h("div",{className:t0("loading"),children:s}),!M&&n.length===0&&(typeof d=="object"?d:h(zf,{className:t0("no-msg-comp"),nullText:d})),L.map((I,D)=>{const U=C.startIndex+D;return h(ck,{...P,index:U,resizeObserver:A,heightList:S,estimateHeight:B,updateHeight:V,children:h("div",{children:n?nx($,{item:I,imageCacher:ak,index:U}):nx(l,{})})},`${U}-${P.containerWidth}-${n?"":"skeleton"}`)})]})},ove=sk(qse),W0=await q("react"),{cloneElement:Use,createElement:Yse,memo:uk,useCallback:Bv,useEffect:Qg,useMemo:Vc,useRef:wl,useState:Yd}=W0;typeof window>"u"&&(W0.useLayoutEffect=W0.useEffect);const n0=rn(ik,"rb-ui"),dk=uk(({width:t,gapX:e,gapY:n,rowIndex:r,columnIndex:o,startIndex:a,children:i})=>{const[s,l]=Yd(),[u,d]=Yd({position:"absolute",width:t,top:(s?.offsetHeight??0+n)*(a+o),left:r?(t+e)*r:0,zIndex:1}),f=Bv(()=>{if(s){const m=s.offsetHeight;d(v=>({...v,width:t,left:r?(t+e)*r:0,top:(m+n)*(a+o),visibility:"visible"}))}},[s,t,r,e,n,a,o]);return W0.useLayoutEffect(()=>{f()},[f]),h("div",{ref:l,className:n0("virtual-item"),style:u,children:i})});dk.displayName="VirtualItem";const Gse=({list:t,className:e="",scrollTarget:n,preloadRowCnt:r=2,itemWidth:o,itemHeight:a,gapX:i,gapY:s,loading:l,loadingElement:u=h(Hi,{}),skeletonElement:d,skeletonCnt:f=3,noDataMsg:m,element:v})=>{const g=wl(null),w=wl(null),y=wl(0),_=wl(0),S=wl(0),x=wl(0),C=wl({startIndex:0,endIndex:10}),[R]=Yd(!!t),[P,O]=Yd({startIndex:0,endIndex:10}),[$,A]=Yd({containerWidth:g.current?.clientWidth??0,width:typeof o=="number"?o:o(g.current?.clientWidth??0),gapX:typeof i=="number"?i:i(g.current?.clientWidth??0),gapY:typeof s=="number"?s:s(g.current?.clientWidth??0)}),M=Vc(()=>{if(!(typeof window>"u"))return new ResizeObserver(D=>{for(const U of D){const{clientWidth:Y}=U.target;A({containerWidth:Y??0,width:typeof o=="number"?o:o(Y??0),gapX:typeof i=="number"?i:i(Y??0),gapY:typeof s=="number"?s:s(Y??0)})}})},[i,s,o]),L=Vc(()=>l||!t,[l,t]),B=Vc(()=>{const D=Y=>{const{containerWidth:oe,width:Q}=$,re=parseInt((oe/Q).toString()),le=Math.ceil(Y.length/re)||0,ee=new Array(le);for(let ne=0;ne<le;ne++)ee[ne]=Y.slice(ne*re,(ne+1)*re).map(ue=>ue);return ee},U=Array.from({length:f}).map(()=>{});return D(L?U:t)},[t,L,$,f]),F=Vc(()=>B.slice(P.startIndex,P.endIndex),[P,B]),N=Vc(()=>{const D=typeof a=="number"?a:a($.containerWidth);if(g.current){const U=Array.from(g.current.children);U.length&&(g.current.style.minHeight="");const Y=Math.max(...U.map(oe=>(oe.offsetHeight??0)+$.gapY),0)||D||0;return y.current=Y,Y}return D||0},[B,F,$,a]),V=Vc(()=>{if(!(!t&&!d))return N>0?B.length*N:0},[t,d,N,B.length]),z=Bv(()=>{const D=n?"current"in n?n.current:n:null,U=D?D.scrollTop:window.scrollY,Y=D?D.offsetHeight:window.innerHeight,oe=D?D.scrollHeight:document.body.scrollHeight,Q=_.current>U?0:Math.floor((U-_.current)/N)-r,re=Math.ceil((U+Y)/N)+r;return oe===U+Y?{startIndex:C.current.startIndex,endIndex:C.current.endIndex}:{startIndex:N&&Q>=0?Q:0,endIndex:!N||!re?10:re}},[N,r,n]),I=Bv(()=>{const D=n?"current"in n?n.current:n:null,U=D?D.scrollTop:window.scrollY,Y=Date.now(),oe=U-x.current,Q=oe>0,re=Q?oe:oe*-1;w.current!==null&&cancelAnimationFrame(w.current),w.current=requestAnimationFrame(()=>{const le=z();if(re>0&&U>0&&(Q&&le.endIndex<C.current.endIndex||!Q&&le.startIndex>C.current.startIndex)){cancelAnimationFrame(w.current),w.current=null;return}if(Q&&re>N?le.endIndex+=Math.floor(re/N):!Q&&re>N&&(le.startIndex-=Math.floor(re/N),le.startIndex<=0&&(le.startIndex=0)),Y-S.current>=200||U<=0||re===0){O(le),x.current=U,C.current={...le},S.current=Y,w.current=null;return}else if(re>=N*(r/2)){O(le),x.current=U,S.current=Y,C.current={...le},w.current=null;return}else(C.current.endIndex-le.endIndex>r||le.startIndex-C.current.startIndex>r)&&(O(le),x.current=U,S.current=Y,C.current={...le})})},[z,N,r,n]);return Qg(()=>{if(M){const D=g.current;return M.observe(D),()=>{D&&M.unobserve(D)}}},[g,M]),Qg(()=>{if(g.current){const{top:D}=g.current.getBoundingClientRect();_.current=window.scrollY+D}},[]),Qg(()=>{if(typeof window<"u"&&g.current){const D=n?"current"in n?n.current:n:window;return I(),D?.removeEventListener("scroll",I),D?.addEventListener("scroll",I),()=>{w.current!==null&&cancelAnimationFrame(w.current),D?.removeEventListener("scroll",I)}}},[n,w,I]),te("div",{ref:g,className:n0(e,"virtual-scroll",{"no-data":!!t&&!t.length}),style:{height:V,minHeight:R&&!F.length?"9999999px":0},children:[L&&!d&&h("div",{className:n0("loading"),children:u}),!L&&t.length===0&&(typeof m=="object"?m:h(zf,{className:n0("no-msg-comp"),nullText:m})),F.map((D,U)=>D.map((Y,oe)=>{const Q=(P.startIndex+U)*D.length+oe,re=U*D.length+oe;return h(dk,{...$,rowIndex:oe,columnIndex:U,startIndex:P.startIndex,children:h("div",{children:Use(t?Yse(v,{item:Y,imageCacher:ak,index:Q}):d,{})})},`${re}-${$.containerWidth}${L?"skeleton":""}`)}))]})};uk(Gse);const Kse="_joystick_1y6py_40",Xse="_disabled_1y6py_48",Zse="_arc_1y6py_220",Qse="_stick_1y6py_71",Jse={joystick:Kse,disabled:Xse,"joystick-inner":"_joystick-inner_1y6py_55","direction-icons":"_direction-icons_1y6py_107","icon-top":"_icon-top_1y6py_91","icon-bottom":"_icon-bottom_1y6py_99","icon-left":"_icon-left_1y6py_75","icon-right":"_icon-right_1y6py_83","curved-icons":"_curved-icons_1y6py_155","icon-curved-top":"_icon-curved-top_1y6py_92","icon-curved-bottom":"_icon-curved-bottom_1y6py_100","stick-area":"_stick-area_1y6py_203","stick-area-inner":"_stick-area-inner_1y6py_213",arc:Zse,stick:Qse},{useRef:Ni,useCallback:bl,useId:ele,useEffect:rx}=await q("react"),Fr=rn(Jse),tle=({className:t,type:e="direction",size:n=100,stickColor:r="radial-gradient(circle at 25px 25px, #444444, #141414)",arcColor:o="var(--color-scale-zinc-100)",stickAreaColor:a="#878787",throttleThreshold:i=.05,throttleDuration:s,xOnly:l=!1,yOnly:u=!1,disableDiagonal:d=!1,disabled:f=!1,keepMoveEventInterval:m,paddingSize:v=10,style:g,onStart:w,onMove:y,onEnd:_})=>{const S=Ni(null),x=Ni(null),C=Ni(null),R=Ni(null),P=Ni(null),O=Ni(null),$=Ni(null),A=Ni({x:0,y:0}),M=Ni({type:"none",startPosition:{x:0,y:0},normalizedDistance:{x:0,y:0},rotate:{radian:0,degree:0},distance:{x:0,y:0},direction:{x:"center",y:"center"},time:Date.now()}),L=ele().replace(/:/g,""),B=({clientX:oe,clientY:Q})=>{if(!x.current)return;const{width:re,top:le,left:ee}=x.current.getBoundingClientRect(),ne=re/2,ue=oe-ee-ne,ve=Q-le-ne;x.current.style.transform=`translate3d(${ue}px, ${ve}px, 0px)`,S.current.style.transition=""},F=bl(()=>{x.current&&(x.current.style.transform="translate3d(0px, 0px, 0px)",x.current.classList.remove("left","right","top","bottom","center"))},[]),N=bl(({clientX:oe,clientY:Q})=>{if(!S.current||!C.current)return;const le=C.current.offsetWidth/2,ee={x:oe-M.current.startPosition.x,y:Q-M.current.startPosition.y};d?Math.abs(ee.x)>Math.abs(ee.y)?ee.y=0:Math.abs(ee.x)<Math.abs(ee.y)?ee.x=0:(ee.x=0,ee.y=0):l?ee.y=0:u&&(ee.x=0);const ne=Math.hypot(ee.x,ee.y);if(ne>le){const Ne=le/ne;ee.x*=Ne,ee.y*=Ne}const ue={x:Math.abs(ee.x)>3?ee.x>0?"right":"left":"center",y:Math.abs(ee.y)>3?ee.y>0?"bottom":"top":"center"},ve=Math.atan2(ee.x,-ee.y);let we=ve*180/Math.PI;we<0&&(we+=360);const ye={radian:ve,degree:we},Le={x:ee.x/le,y:-ee.y/le},Oe=Math.hypot(Le.x-A.current.x,Le.y-A.current.y);return{direction:ue,distance:ee,normalizedDistance:Le,movementRatio:Oe,rotate:ye}},[d,l,u]),V=bl(({clientX:oe,clientY:Q})=>{if(!S.current||!C.current)return;const{direction:re,distance:le,rotate:ee,normalizedDistance:ne,movementRatio:ue}=N({clientX:oe,clientY:Q});S.current.style.transform=`translate3d(${le.x}px, ${le.y}px, 0px)`,C.current.style.setProperty("--joy-angle",`${ee.degree}deg`);const ve=Math.hypot(ne.x,ne.y);return C.current.style.setProperty("--joy-ratio",`${ve}`),x.current.classList.remove("left","right","top","bottom","center"),x.current.classList.add(re.x,re.y),{direction:re,distance:{x:le.x,y:-le.y},rotate:ee,normalizedDistance:ne,movementRatio:ue}},[N]),z=bl(()=>{S.current&&(S.current.style.transition="transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1)",C.current?.style.setProperty("--joy-ratio","0"),S.current.style.transform="translate3d(0px, 0px, 0px)")},[]),I=bl(()=>{const Q=Date.now()-M.current.time;if(!$.current||["none","end"].includes(M.current.type)||Q<s)return;const re=$.current;re.preventDefault(),re.stopPropagation();const{clientX:le,clientY:ee}=re,{distance:ne,direction:ue,rotate:ve,normalizedDistance:we,movementRatio:ye}=V({clientX:le,clientY:ee});M.current={...M.current,type:"move",rotate:ve,distance:ne,normalizedDistance:we,direction:ue,time:Date.now()};const Le={...M.current,event:re,targets:{joystick:x.current,stickArea:C.current,stick:S.current}};ye>=i&&(A.current=we,y?.(Le)),console.log("keepMoveEventInterval",m),m&&(window.clearInterval(P.current),P.current=window.setInterval(()=>{console.log("moveEventIntervalIdRef.current",P.current),console.log("moveStatusRef.current",M.current),M.current.type==="move"&&y?.(Le)},m))},[i,s,y,V,m]),D=bl(oe=>{window.clearInterval(P.current),!["none","end"].includes(M.current.type)&&(oe.target instanceof Element&&oe.target.releasePointerCapture?.(oe.pointerId),oe.preventDefault(),oe.stopPropagation(),M.current.type="end",setTimeout(()=>{M.current.type="none"},100),F(),z(),x.current.classList.remove("active"),window.clearInterval(P.current),$.current=null,_?.({type:"end",...M.current,direction:{x:"center",y:"center"},normalizedDistance:{x:0,y:0},rotate:{degree:0,radian:0},distance:{x:0,y:0},event:oe,targets:{joystick:x.current,stickArea:C.current,stick:S.current}}))},[_,F,z]),U=oe=>{if(oe.button===2||f||["start","move","end"].includes(M.current.type))return;R.current=`${L}-${oe.pointerId}`,oe.currentTarget.setPointerCapture(oe.pointerId),oe.stopPropagation(),oe.preventDefault();const{clientX:Q,clientY:re}=oe;M.current.type="start",M.current.startPosition={x:Q,y:re},x.current.classList.add("active"),B({clientX:Q,clientY:re}),w?.({...M.current,event:oe,targets:{joystick:x.current,stickArea:C.current,stick:S.current},distance:{x:0,y:0},normalizedDistance:{x:0,y:0},rotate:{radian:0,degree:0},startPosition:{x:Q,y:re},direction:{x:"center",y:"center"}})},Y=bl(oe=>{$.current=oe.nativeEvent,R.current===`${L}-${oe.pointerId}`&&(O.current&&cancelAnimationFrame(O.current),O.current=requestAnimationFrame(I))},[I,L]);return rx(()=>{const oe=Q=>{D(Q)};return window.addEventListener("pointerup",oe),()=>{window.removeEventListener("pointerup",oe)}},[L,D]),rx(()=>{const oe=P.current;return()=>{window.clearInterval(oe)}},[]),h("div",{className:Fr("joystick",t,{disabled:f}),style:{...g,"--joy-stick-size":`${n+v*2}px`,"--joy-stick-color":r,"--joy-stick-area-color":a,"--joy-arc-color":o},onContextMenu:oe=>oe.preventDefault(),children:te("div",{ref:x,className:Fr("joystick-inner"),style:{padding:v},children:[h("div",{ref:C,className:Fr("stick-area"),style:{padding:v},onPointerDownCapture:U,onPointerUpCapture:D,onPointerMove:Y,children:te("span",{className:Fr("stick-area-inner"),children:[h("span",{className:Fr("arc")}),e==="direction"&&te("div",{className:Fr("direction-icons"),children:[h("span",{className:Fr("icon-top"),children:h(C$,{})}),h("span",{className:Fr("icon-bottom"),children:h(_$,{})}),h("span",{className:Fr("icon-left"),children:h(x$,{})}),h("span",{className:Fr("icon-right"),children:h(S$,{})}),h("span",{className:Fr("icon-curved-top")})]}),e==="curved"&&te("div",{className:Fr("curved-icons"),children:[h("span",{className:Fr("icon-curved-top"),children:h(Wy,{})}),h("span",{className:Fr("icon-curved-bottom"),children:h(Wy,{})})]})]})}),h("div",{ref:S,className:Fr("stick")})]})})},nle="_border_b2cyl_50",rle={"white-button":"_white-button_b2cyl_40",border:nle},ole=rn(rle),fk=({className:t,outline:e,ripple:n,...r})=>h(Ah,{className:ole(t,"white-button",{border:e}),ripple:{color:"#9d9d9d",...n},...r}),{useMemo:ave}=await q("react"),{useState:ox,useEffect:Jg,useRef:vs,useCallback:o1}=await q("react"),ale=({className:t,initStatus:e=!0,hideErrorMessage:n,label:r,lebelPosition:o="top",loading:a,loadingMessage:i="Connecting...",disconnectedMessage:s=`Disconnected
235
235
  연결할 수 없습니다`,...l})=>{const[u,d]=ox(""),f=vs(null),m=vs(null),v=vs(""),g=vs([]),w=vs(null),y=vs({iceUfrag:"",icePwd:"",medias:[]}),_=vs([]),S=2e3,x=vs(e),[C,R]=ox(a??!1),P=me=>JSON.parse(`"${me}"`),O=me=>me!==null?me.split(", ").map(pe=>{const be=pe.match(/^<(.+?)>; rel="ice-server"(; username="(.*?)"; credential="(.*?)"; credential-type="password")?/i);if(!be)return{urls:[]};const Ue={urls:[be[1]]};return be[3]!==void 0&&(Ue.username=P(be[3]),Ue.credential=P(be[4]),Ue.credentialType="password"),Ue}):[],$=o1(me=>{fetch(me,{method:"DELETE"}).catch(()=>{})},[]),A=o1(()=>{f.current!==null&&(f.current.onicecandidate=null,f.current.oniceconnectionstatechange=null,f.current.ontrack=null,f.current.close(),f.current=null)},[]),M=me=>{const pe={iceUfrag:"",icePwd:"",medias:[]};for(const be of me.split(`\r
236
236
  `))be.startsWith("m=")?pe.medias.push(be.slice(2)):pe.iceUfrag===""&&be.startsWith("a=ice-ufrag:")?pe.iceUfrag=be.slice(12):pe.icePwd===""&&be.startsWith("a=ice-pwd:")&&(pe.icePwd=be.slice(10));return pe},L=me=>{const pe=me.split(" ").slice(3);for(let be=96;be<=127;be++)if(!pe.includes(be.toString()))return be.toString();throw Error("unable to find a free payload type")},B=me=>{const pe=me.split(`\r
237
237
  `);let be=L(pe[0]);return pe[0]+=` ${be}`,pe.splice(pe.length-1,0,`a=rtpmap:${be} PCMU/8000/2`),pe.splice(pe.length-1,0,`a=rtcp-fb:${be} transport-cc`),be=L(pe[0]),pe[0]+=` ${be}`,pe.splice(pe.length-1,0,`a=rtpmap:${be} PCMA/8000/2`),pe.splice(pe.length-1,0,`a=rtcp-fb:${be} transport-cc`),pe.join(`\r
@@ -268,7 +268,7 @@ Make sure your charset is UTF-8`);a=(a>>>8&255)*192+(a&255),r.put(a,13)}},w2=n,w
268
268
  The chosen QR Code version cannot contain this amount of data.
269
269
  Minimum version required to store current data is: `+L+`.
270
270
  `);const B=x(O,$,M),F=t.getSymbolSize(O),N=new r(F);return v(N,O),g(N),w(N,O),_(N,$,0),O>=7&&y(N,O),S(N,B),isNaN(A)&&(A=i.getBestMask(N,_.bind(null,N,$))),i.applyMask(A,N),_(N,$,A),{modules:N,version:O,errorCorrectionLevel:$,maskPattern:A,segments:M}}return t2.create=function(O,$){if(typeof O>"u"||O==="")throw new Error("No input text");let A=e.M,M,L;return typeof $<"u"&&(A=e.from($.errorCorrectionLevel,e.M),M=u.from($.version),L=i.from($.maskPattern),$.toSJISFunc&&t.setToSJISFunction($.toSJISFunc)),R(O,M,A,L)},t2}var y2={},_2={},Tx;function gk(){return Tx||(Tx=1,(function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(a){return[a,a]}))),r.length===6&&r.push("F","F");const o=parseInt(r.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+r.slice(0,6).join("")}}t.getOptions=function(r){r||(r={}),r.color||(r.color={});const o=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,a=r.width&&r.width>=21?r.width:void 0,i=r.scale||4;return{width:a,scale:a?4:i,margin:o,color:{dark:e(r.color.dark||"#000000ff"),light:e(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},t.getScale=function(r,o){return o.width&&o.width>=r+o.margin*2?o.width/(r+o.margin*2):o.scale},t.getImageWidth=function(r,o){const a=t.getScale(r,o);return Math.floor((r+o.margin*2)*a)},t.qrToImageData=function(r,o,a){const i=o.modules.size,s=o.modules.data,l=t.getScale(i,a),u=Math.floor((i+a.margin*2)*l),d=a.margin*l,f=[a.color.light,a.color.dark];for(let m=0;m<u;m++)for(let v=0;v<u;v++){let g=(m*u+v)*4,w=a.color.light;if(m>=d&&v>=d&&m<u-d&&v<u-d){const y=Math.floor((m-d)/l),_=Math.floor((v-d)/l);w=f[s[y*i+_]?1:0]}r[g++]=w.r,r[g++]=w.g,r[g++]=w.b,r[g]=w.a}}})(_2)),_2}var Nx;function Cle(){return Nx||(Nx=1,(function(t){const e=gk();function n(o,a,i){o.clearRect(0,0,a.width,a.height),a.style||(a.style={}),a.height=i,a.width=i,a.style.height=i+"px",a.style.width=i+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(a,i,s){let l=s,u=i;typeof l>"u"&&(!i||!i.getContext)&&(l=i,i=void 0),i||(u=r()),l=e.getOptions(l);const d=e.getImageWidth(a.modules.size,l),f=u.getContext("2d"),m=f.createImageData(d,d);return e.qrToImageData(m.data,a,l),n(f,u,d),f.putImageData(m,0,0),u},t.renderToDataURL=function(a,i,s){let l=s;typeof l>"u"&&(!i||!i.getContext)&&(l=i,i=void 0),l||(l={});const u=t.render(a,i,l),d=l.type||"image/png",f=l.rendererOpts||{};return u.toDataURL(d,f.quality)}})(y2)),y2}var x2={},Px;function Ele(){if(Px)return x2;Px=1;const t=gk();function e(o,a){const i=o.a/255,s=a+'="'+o.hex+'"';return i<1?s+" "+a+'-opacity="'+i.toFixed(2).slice(1)+'"':s}function n(o,a,i){let s=o+a;return typeof i<"u"&&(s+=" "+i),s}function r(o,a,i){let s="",l=0,u=!1,d=0;for(let f=0;f<o.length;f++){const m=Math.floor(f%a),v=Math.floor(f/a);!m&&!u&&(u=!0),o[f]?(d++,f>0&&m>0&&o[f-1]||(s+=u?n("M",m+i,.5+v+i):n("m",l,0),l=0,u=!1),m+1<a&&o[f+1]||(s+=n("h",d),d=0)):l++}return s}return x2.render=function(a,i,s){const l=t.getOptions(i),u=a.modules.size,d=a.modules.data,f=u+l.margin*2,m=l.color.light.a?"<path "+e(l.color.light,"fill")+' d="M0 0h'+f+"v"+f+'H0z"/>':"",v="<path "+e(l.color.dark,"stroke")+' d="'+r(d,u,l.margin)+'"/>',g='viewBox="0 0 '+f+" "+f+'"',y='<svg xmlns="http://www.w3.org/2000/svg" '+(l.width?'width="'+l.width+'" height="'+l.width+'" ':"")+g+' shape-rendering="crispEdges">'+m+v+`</svg>
271
- `;return typeof s=="function"&&s(null,y),y},x2}var Ax;function Mle(){if(Ax)return jc;Ax=1;const t=ile(),e=Sle(),n=Cle(),r=Ele();function o(a,i,s,l,u){const d=[].slice.call(arguments,1),f=d.length,m=typeof d[f-1]=="function";if(!m&&!t())throw new Error("Callback required as last argument");if(m){if(f<2)throw new Error("Too few arguments provided");f===2?(u=s,s=i,i=l=void 0):f===3&&(i.getContext&&typeof u>"u"?(u=l,l=void 0):(u=l,l=s,s=i,i=void 0))}else{if(f<1)throw new Error("Too few arguments provided");return f===1?(s=i,i=l=void 0):f===2&&!i.getContext&&(l=s,s=i,i=void 0),new Promise(function(v,g){try{const w=e.create(s,l);v(a(w,i,l))}catch(w){g(w)}})}try{const v=e.create(s,l);u(null,a(v,i,l))}catch(v){u(v)}}return jc.create=e.create,jc.toCanvas=o.bind(null,n.render),jc.toDataURL=o.bind(null,n.renderToDataURL),jc.toString=o.bind(null,function(a,i,s){return r.render(a,s)}),jc}Mle();const{useCallback:ive,useEffect:sve,useState:lve}=await q("react"),{useCallback:cve,useEffect:uve,useId:dve,useRef:fve,useState:pve}=await q("react"),{useCallback:hve,useEffect:mve,useId:gve,useRef:vve,useState:wve}=await q("react"),kle="_selected_621ky_62",Rle={"inbox-pagination":"_inbox-pagination_621ky_41","pagination-page":"_pagination-page_621ky_54",selected:kle,"pagination-next":"_pagination-next_621ky_65","pagination-prev":"_pagination-prev_621ky_65","pagination-next-double":"_pagination-next-double_621ky_65","pagination-prev-double":"_pagination-prev-double_621ky_65"},{useMemo:gd}=await q("react"),Hc=rn(Rle),bve=({className:t,currPage:e=1,listSize:n=20,pageSize:r=5,totalCount:o=0,handlePageChange:a})=>{const i=gd(()=>{const f=o/n;return f%1===0?f:Math.floor(f)+1},[n,o]),s=gd(()=>Array.from({length:o},(f,m)=>Array.from({length:r},(v,g)=>m*r+g+1)),[r,o]),l=gd(()=>(s.find(f=>f.includes(e))??[]).filter(f=>f<=i),[e,s,i]),u=gd(()=>{const f=l[0]??1;return Math.max(1,f-1)},[l]),d=gd(()=>{const f=l[l.length-1]??i;return Math.min(i,f+1)},[l,i]);return te("ul",{className:Hc(t,"inbox-pagination"),children:[h("li",{children:h("button",{className:Hc("pagination-prev-double"),type:"button",disabled:e===1,onClick:()=>a(u),children:h(d$,{})})}),h("li",{children:h("button",{className:Hc("pagination-prev"),type:"button",disabled:e===1,onClick:()=>a(e-1),children:h(p$,{})})}),l.map(f=>h("li",{children:h("button",{className:Hc("pagination-page",e===f&&"selected"),type:"button",onClick:()=>a(f),children:f})},f)),h("li",{children:h("button",{className:Hc("pagination-next"),type:"button",disabled:!(e<i),onClick:()=>a(e+1),children:h(h$,{})})}),h("li",{children:h("button",{className:Hc("pagination-next-double"),type:"button",disabled:e===i,onClick:()=>a(d),children:h(f$,{})})})]})},{useEffect:yve,useRef:_ve,useState:xve}=await q("react"),Tle="_inner_16agd_43",Nle="_left_16agd_50",Ple="_right_16agd_53",Ale="_disabled_16agd_87",Ile={"joystick-with-buttons":"_joystick-with-buttons_16agd_40",inner:Tle,left:Nle,right:Ple,"btn-group":"_btn-group_16agd_61","btn-group-item":"_btn-group-item_16agd_69",disabled:Ale,"joy-stick-container":"_joy-stick-container_16agd_95","joy-stick":"_joy-stick_16agd_95","hide-joystick":"_hide-joystick_16agd_110","transition-disabled":"_transition-disabled_16agd_115"},{useCallback:Ole,useEffect:Ix,useMemo:Ox,useRef:S2,useState:Lx}=await q("react"),Wc=rn(Ile),Sve=({className:t,joystickType:e,disableDiagonal:n,xOnly:r,yOnly:o,buttonsDirection:a,buttons:i,hideJoystick:s,onJoystickMove:l})=>{const u=S2(null),d=S2([]),f=S2({timeoutId:[],animationFrameId:[]}),{isMobile:m,isSmallTablet:v}=s3(),[g,w]=Lx(!s),[y,_]=Lx(!1),S=Ox(()=>{const $=i?.length??0;return $>=4?{oneObjectDeg:35,initDeg:a==="left"?-5:5}:$===3?{oneObjectDeg:40,initDeg:a==="left"?15:-15}:{oneObjectDeg:45,initDeg:a==="left"?25:-25}},[i?.length,a]),x=Ox(()=>m?80:v?100:110,[m,v]),C=$=>{_(!0),l?.({isMoving:!0,type:e,data:$})},R=$=>{l?.({isMoving:!0,type:e,data:$})},P=$=>{_(!1),l?.({isMoving:!1,type:e,data:$})},O=Ole(({oneObjectDeg:$,initDeg:A})=>{if(!u.current)return;const M=u.current.getBoundingClientRect(),L=M.width/2,B=M.height/2,F=M.width/2;s?(f.current.animationFrameId.forEach(N=>{cancelAnimationFrame(N)}),f.current.timeoutId.forEach(N=>{clearTimeout(N)}),d.current?.forEach((N,V)=>{if(!N)return;const z=N,I=z.offsetWidth,D=20;z&&(a==="left"?(z.style.left=`${I*V+D*(V+1)}px`,z.style.transform="translateY(-100%)"):(z.style.left=`calc(100% - ${I*V+D*(V+1)}px)`,z.style.transform="translateX(-100%) translateY(-100%)"),z.style.top=`calc(100% - ${D}px)`,z.style.transition="",z.style.opacity="1")})):d.current?.forEach((N,V)=>{const z=N;if(z){const I=(A-90)*(Math.PI/180),D=a==="left"?(A-90+V*$)*(Math.PI/180):(A-90-V*$)*(Math.PI/180);let U=I,Y=.1,oe=.06;const Q=.85,re=.02,le=L+Math.cos(I)*F,ee=B+Math.sin(I)*F;z.style.position="absolute",z.style.left=`${le-z.clientWidth/2}px`,z.style.top=`${ee-z.clientHeight/2}px`,z.style.opacity=`${Y}`,z.style.transform="scale(0.98)";const ne=()=>{if(s)return;const ue=D-U;oe+=ue*re,oe*=Q,U+=oe,Y+=.03,Y=Math.min(Y,1);const ve=.98+(1-Math.abs(ue)/Math.PI)*.02,we=L+Math.cos(U)*F,ye=B+Math.sin(U)*F;z.style.left=`${we-z.clientWidth/2}px`,z.style.top=`${ye-z.clientHeight/2}px`,z.style.opacity=`${Y}`,z.style.transform=`scale(${ve})`,z.style.transition="none",Math.abs(ue)>.002||Math.abs(oe)>.002?f.current.animationFrameId[V]=requestAnimationFrame(ne):(z.style.opacity="1",z.style.transform="scale(1)",z.style.transition="")};f.current.timeoutId[V]=window.setTimeout(()=>{f.current.animationFrameId[V]=requestAnimationFrame(ne)},V*60)}})},[s,a]);return Ix(()=>{O(S)},[O,S,x]),Ix(()=>{setTimeout(()=>{w(!0)},200)},[]),h("div",{className:Wc(t,"joystick-with-buttons",{"hide-joystick":s,"transition-disabled":!g}),children:te("div",{className:Wc("inner",a),children:[h("div",{ref:u,className:Wc("btn-group"),children:i?.map(($,A)=>h("div",{ref:M=>{d.current[A]=M},className:Wc("btn-group-item",{disabled:y}),onClick:M=>{M.stopPropagation()},children:$.element},A))}),h("div",{className:Wc("joy-stick-container"),style:{width:x,height:x},children:h(tle,{className:Wc("joy-stick"),type:e,size:x,disableDiagonal:n,xOnly:r,yOnly:o,paddingSize:30,keepMoveEventInterval:200,onStart:C,onMove:R,onEnd:P})})]})})},Lle=({className:t,containerId:e,open:n,onOpenChange:r,title:o,content:a,buttonText:i="확인",buttonClassName:s,snapshotCnt:l,resolve:u,onConfirm:d})=>{const f=()=>{u(!0),d?.()};return h(tc,{className:ae("w-fit","min-w-[25rem]","max-w-[95vw]",t),open:n,onOpenChange:r,type:"dialog",dialogContainer:e?document.getElementById(e):void 0,snapshotCnt:l,hideCloseButton:!0,enableDimClose:!1,header:o?{title:o}:void 0,footer:h(Ah,{className:ae("h-[2.5rem] text-[1rem] font-medium",s),onClick:f,children:i}),children:h("div",{className:"whitespace-pre-wrap",children:a})})},{useState:$le}=await q("react"),Dle=({className:t,open:e,onOpenChange:n,title:r,content:o,buttonText:a={yes:"확인",no:"취소"},buttonClassName:i,buttonWrapperClassName:s,snapshotCnt:l,containerId:u,onConfirm:d,onCancel:f,resolve:m})=>{const[v,g]=$le(!1),w=async()=>{g(!0);try{await d?.(),m(!0)}finally{g(!1)}},y=()=>{f?.(),m(!1)};return h(tc,{className:ae("w-fit","min-w-[25rem]","max-w-[95vw]",t),open:e,onOpenChange:n,type:"dialog",snapshotCnt:l,dialogContainer:u?document.getElementById(u):void 0,hideCloseButton:!0,enableDimClose:!1,header:r?{title:r}:void 0,footer:te(Yo,{className:ae("btn-wrapper",s),alignItems:"center",gap:8,children:[h(fk,{className:ae("h-[2.5rem] px-[1rem] text-[1rem] font-medium",i?.no),onClick:y,children:a.no}),h(Ah,{className:ae("h-[2.5rem] px-[1rem] text-[1rem] font-medium",i?.yes),autoFocus:!0,onClick:w,loading:v,children:a.yes})]}),children:h("div",{className:"text-default text-center whitespace-pre-wrap",children:o})})},{cloneElement:Ble,useState:zle}=await q("react"),Fle=({className:t,open:e,onOpenChange:n,title:r,content:o,placeholder:a,inputType:i="text",inputElement:s,autoFocus:l=!1,value:u,buttonText:d={yes:"확인",no:"취소"},buttonClassName:f,buttonWrapperClassName:m,containerId:v,snapshotCnt:g,resolve:w,close:y})=>{const[_,S]=zle(u||"");return h(tc,{className:ae("w-fit","min-w-[25rem]","max-w-[95vw]",t),open:e,onOpenChange:n,type:"dialog",snapshotCnt:g,dialogContainer:v?document.getElementById(v):void 0,hideCloseButton:!0,enableDimClose:!1,header:r?{title:r}:void 0,footer:te(Yo,{className:ae("btn-wrapper",m),alignItems:"center",gap:8,children:[h(fk,{className:ae("h-[2.5rem] text-[1rem] font-medium",f?.no),onClick:()=>y(),children:d.no}),h(Ah,{className:ae("h-[2.5rem] text-[1rem] font-medium",f?.yes),onClick:()=>w(_),children:d.yes})]}),children:te(Ul,{gap:16,children:[h("div",{children:o}),s?Ble(s,{value:_,handleChange:S,tabIndex:l?0:-1,placeholder:a,type:i}):h(ek,{className:ae("w-full"),type:i,tabIndex:l?0:-1,placeholder:a,value:_,handleChange:S})]})})},{useMemo:Cve}=await q("react"),Vle="_spin_tbvd8_59",jle={"count-down":"_count-down_tbvd8_40","count-down-text":"_count-down-text_tbvd8_45","count-down-refresh-img":"_count-down-refresh-img_tbvd8_49",spin:Vle},{useRef:C2,useCallback:vd,useEffect:Hle,useState:Wle,forwardRef:qle,useImperativeHandle:Ule}=await q("react"),E2=rn(jle),Yle=qle(({className:t,remainSeconds:e=10,initialPlay:n,loop:r,refreshIconClassName:o,textClassName:a,onStart:i,onComplete:s},l)=>{const u=C2(null),d=C2(null),f=C2(e),[m,v]=Wle(!1),g=vd(x=>{x<0||(f.current=x,d.current.textContent=x.toString())},[]),w=vd(()=>{g(e)},[e,g]),y=vd(()=>{u.current&&window.clearInterval(u.current)},[]),_=vd(()=>{u.current&&window.clearInterval(u.current),f.current===e&&i?.(),u.current=window.setInterval(()=>{g(f.current-1),f.current<=0&&(r?(v(!0),setTimeout(()=>{v(!1)},1e3),w()):y(),s?.())},1e3)},[r,e,i,s,w,y,g]),S=vd(()=>{v(!0),setTimeout(()=>{v(!1)},1e3),w(),_()},[w,_]);return Hle(()=>(d.current.textContent=f.current.toString(),n&&_(),()=>{u.current&&window.clearInterval(u.current)}),[]),Ule(l,()=>({restart:S,stop:y,start:_,reset:w})),h(Yo,{className:E2(t,"count-down"),justifyContent:"center",alignItems:"center",children:te("button",{onClick:S,children:[h(Hq,{className:E2("count-down-refresh-img",o,{spin:m})}),h("span",{ref:d,className:E2("count-down-text",a)})]})})});Yle.displayName="CountDown";const $x=5177,Gle=()=>{if(typeof window>"u")return"";const t=window.__RB_ASSETS_BASE_URL__;if(t)return t;const{protocol:e,hostname:n}=window.location;return e==="file:"||!n?`http://127.0.0.1:${$x}`:`${e}//${n}:${$x}`},C3=t=>{const e=t.startsWith("/")?t:`/${t}`;return`${Gle()}${e}`},Dx=t=>C3(`/imgs${t.startsWith("/")?t:`/${t}`}`),Eve=t=>C3(`/models${t}`),Mve=t=>C3(`/data/joint${t}`),{useEffect:kve}=await q("react"),Kle="_readonly_1w1i8_46",Xle="_input_1w1i8_49",Zle={"side-number-input":"_side-number-input_1w1i8_40",readonly:Kle,"number-btn":"_number-btn_1w1i8_46",input:Xle},{forwardRef:Qle,useCallback:pa,useEffect:wd,useImperativeHandle:Jle,useMemo:ece,useRef:qa,useState:Bx}=await q("react"),i1=rn(Zle,"rb-ui"),tce=t=>{const e=t?.target?.value;return kn.replace(e,/^0+[\d,]/gm,o=>kn.last(o)).replace(/[^\d.-]/g,"")},nce=Qle(({className:t="",inputClassName:e="",step:n=1,error:r,isDirect:o=!0,increaseStep:a,decreaseStep:i,maxLength:s,increaseElement:l="+",decreaseElement:u="-",detectDobleClick:d,rippleOption:f,notAllowedEmptyValue:m,inputDisabled:v,disableAutoAccel:g,disableLongPress:w,handleChange:y,onButtonPointerDown:_,onButtonPointerUp:S,handleEnter:x,...C},R)=>{const{value:P,readOnly:O,disabled:$,min:A,max:M="9999999999999",digit:L=18,onFocus:B,onBlur:F}=C,N=qa(null),V=qa(!1),z=qa(!1),I=qa({up:0,down:0}),D=qa(""),U=qa(null),Y=qa(null),oe=qa(0),Q=qa(0),re=qa(1e3),[le,ee]=Bx(P??""),[ne,ue]=Bx(!1),ve=ece(()=>$||new Ut(A??0).cmp(new Ut(M))>0,[$,M,A]),we=pa((_e,at,ht)=>at===0?_e:ht==="up"?new Ut(_e||0).add(new Ut(U.current?.increase??at??1)).toDP(L,Ut.ROUND_DOWN).toString():new Ut(_e||0).sub(new Ut(U.current?.decrease??at??1)).toDP(L,Ut.ROUND_DOWN).toString(),[L]),ye=pa(_e=>typeof _e>"u"||!_e||ve?"":_e.endsWith(".")?_e:typeof A<"u"&&new Ut(Number(_e)).lt(new Ut(A))?String(A):typeof M<"u"&&new Ut(Dl(_e||"")).gt(new Ut(M))?String(M):_e,[A,M,ve]),Le=pa(_e=>ve?"":_e.endsWith(".")?_e:ye(_e),[ve,ye]),Oe=pa(({type:_e,e:at})=>{if(!N.current||ve)return;const{value:ht,name:st}=N.current,Ct=tce({target:{value:ht}}),cn=L?new RegExp(`^-?[0-9]*[.]{0,1}[0-9]{0,${L}}$`,"gm"):/^-?\d{0,18}$/;Ct.match(cn)&&(typeof s<"u"&&(Ct||"").split(".")[0].replace(/[^0-9]/g,"").length>Number(s)||(N.current.value=Bi(Ct??"").join("."),D.current!==Ct&&(y?.(Ct,st,{type:_e}),at&&C.onChange?.(at),D.current=Ct),ee(Ct)))},[ve,L,s,y,C]),Ne=pa((_e,at)=>{N.current&&(ue(at),at?B?.(_e):(N.current.value=Le(N.current.value),m&&!_e.target.value&&(N.current.value=C.value),Oe({}),F?.(_e)))},[B,Le,m,C.value,Oe,F]),me=pa(_e=>{if(ve||O){V.current=!1,window.clearTimeout(oe.current);return}D.current=we(D.current??"0",Y.current,_e),D.current=ye(D.current??"0"),ee(String(D.current)),y?.(D.current,C.name,{type:_e}),_?.(_e),window.clearTimeout(Q.current),Q.current=window.setTimeout(()=>{V.current&&(me(_e),re.current>100&&!g&&(re.current-=re.current/5))},re.current)},[_,we,ye,ve,y,C.name,g,O]),pe=pa(_e=>{const{value:at="",name:ht}=_e.target;m&&!at&&(_e.target.value=C.value),x?.(at,ht),_e.target.blur()},[x,C.value,m]),be=pa(_e=>{_e.key==="Enter"&&!_e.nativeEvent.isComposing&&pe(_e),C.onKeyDown?.(_e)},[C,pe]),Ue=pa((_e,at)=>{if(!(Date.now()-I.current[_e]<500&&d)){if(ve||O){V.current=!1,window.clearTimeout(oe.current);return}I.current[_e]=Date.now(),me(_e),w||(oe.current=window.setTimeout(()=>{V.current=!0,me(_e)},re.current)),z.current=!0}},[d,ve,O,me,w]),He=pa((_e,at)=>{if(ve||O||!z.current){V.current=!1,window.clearTimeout(oe.current);return}V.current=!1,z.current=!1,window.clearTimeout(oe.current),_e&&S?.(_e,at),_e&&Oe({type:_e})},[ve,Oe,O,S]),qe=pa(()=>{V.current=!1,window.clearTimeout(oe.current),window.clearTimeout(Q.current)},[]);return wd(()=>{D.current=P??""},[P]),wd(()=>{typeof P<"u"&&ee(P)},[P]),wd(()=>{Y.current=n},[n]),wd(()=>{U.current={increase:a,decrease:i}},[a,i]),Jle(R,()=>N.current),wd(()=>{const _e=at=>{at.type==="contextmenu"&&V.current&&at.preventDefault()};return window.addEventListener("contextmenu",_e),window.addEventListener("pointerup",_e),window.addEventListener("pointercancel",_e),()=>{window.removeEventListener("contextmenu",_e),window.removeEventListener("pointerup",_e),window.removeEventListener("pointercancel",_e)}},[qe]),te(Yo,{className:i1("side-number-input",{focus:ne,readonly:O,disabled:$,error:r},t),alignItems:"center",justifyContent:"center",children:[h(Rr,{...f,disabled:ve||f?.disabled,children:h("button",{type:"button","data-type":"down",className:i1("number-btn","down"),disabled:ve||M===le,onPointerDown:_e=>{Ue("down",_e)},onPointerUp:_e=>{He("down",_e)},onPointerLeave:_e=>{_e.currentTarget.hasPointerCapture?.(_e.pointerId)||He(void 0,_e)},onPointerCancel:_e=>{He(void 0,_e)},onLostPointerCapture:_e=>{He(void 0,_e)},onContextMenu:_e=>{_e.preventDefault()},children:u})}),h("input",{...C,className:i1("input",{focus:ne,readonly:O,disabled:$,error:r},e),ref:N,type:"text",value:Bi(le??"").join(".")??"",readOnly:!o,disabled:$||v,onChange:_e=>Oe({e:_e}),onFocus:_e=>Ne(_e,!0),onBlur:_e=>Ne(_e,!1),onKeyDown:be,onContextMenu:_e=>{_e.preventDefault()}}),h(Rr,{...f,disabled:ve||f?.disabled,children:h("button",{type:"button","data-type":"up",className:i1("number-btn","up"),disabled:ve||A===le,onPointerDown:_e=>{Ue("up",_e)},onPointerUp:_e=>{He("up",_e)},onPointerLeave:_e=>{_e.currentTarget.hasPointerCapture?.(_e.pointerId)||He(void 0,_e)},onPointerCancel:_e=>{He(void 0,_e)},onLostPointerCapture:_e=>{He(void 0,_e)},onContextMenu:_e=>{_e.preventDefault()},children:l})})]})});nce.displayName="SideNumberInput";const{useCallback:s1}=await q("react"),Rve=({alertComponent:t,confirmComponent:e,promptComponent:n,options:r}={})=>{const{modal:o,closeModal:a}=OE(),i=s1(async({modalId:d,componentName:f,...m})=>o({component:t??Lle,props:{...m,containerId:r?.containerId},options:{id:d,componentName:f??kn.uniqueId()}}),[o,t,r?.containerId]),s=s1(async({modalId:d,componentName:f,...m})=>o({component:e??Dle,props:{...m,containerId:r?.containerId},options:{id:d,componentName:f??kn.uniqueId()}}),[o,e,r?.containerId]),l=s1(async({modalId:d,componentName:f,...m})=>o({component:n??Fle,props:{...m,containerId:r?.containerId},options:{id:d,componentName:f??kn.uniqueId()}}),[o,n,r?.containerId]),u=s1(d=>{a(d)},[a]);return{alertDialog:i,confirmDialog:s,promptDialog:l,closeDialog:u}},{useCallback:l1}=await q("react"),Tve=({alertComponent:t,confirmComponent:e,promptComponent:n}={})=>{const{modal:r,closeModal:o}=OE(),a=l1(async({modalId:u,componentName:d,...f})=>r({component:t??sfe,props:f,options:{id:u,componentName:d??kn.uniqueId()}}),[r,t]),i=l1(async({modalId:u,componentName:d,...f})=>r({component:e??cfe,props:f,options:{id:u,componentName:d??kn.uniqueId()}}),[r,e]),s=l1(async({modalId:u,componentName:d,...f})=>r({component:n??mfe,props:f,options:{id:u,componentName:d??kn.uniqueId()}}),[r,n]),l=l1(u=>{o(u)},[o]);return{alertDialog:a,confirmDialog:i,promptDialog:s,closeDialog:l}},oi=Object.create(null);oi.open="0";oi.close="1";oi.ping="2";oi.pong="3";oi.message="4";oi.upgrade="5";oi.noop="6";const r0=Object.create(null);Object.keys(oi).forEach(t=>{r0[oi[t]]=t});const zv={type:"error",data:"parser error"},vk=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",wk=typeof ArrayBuffer=="function",bk=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,E3=({type:t,data:e},n,r)=>vk&&e instanceof Blob?n?r(e):zx(e,r):wk&&(e instanceof ArrayBuffer||bk(e))?n?r(e):zx(new Blob([e]),r):r(oi[t]+(e||"")),zx=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)};function Fx(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let M2;function rce(t,e){if(vk&&t.data instanceof Blob)return t.data.arrayBuffer().then(Fx).then(e);if(wk&&(t.data instanceof ArrayBuffer||bk(t.data)))return e(Fx(t.data));E3(t,!1,n=>{M2||(M2=new TextEncoder),e(M2.encode(n))})}const Vx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",jd=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Vx.length;t++)jd[Vx.charCodeAt(t)]=t;const oce=t=>{let e=t.length*.75,n=t.length,r,o=0,a,i,s,l;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const u=new ArrayBuffer(e),d=new Uint8Array(u);for(r=0;r<n;r+=4)a=jd[t.charCodeAt(r)],i=jd[t.charCodeAt(r+1)],s=jd[t.charCodeAt(r+2)],l=jd[t.charCodeAt(r+3)],d[o++]=a<<2|i>>4,d[o++]=(i&15)<<4|s>>2,d[o++]=(s&3)<<6|l&63;return u},ace=typeof ArrayBuffer=="function",M3=(t,e)=>{if(typeof t!="string")return{type:"message",data:yk(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:ice(t.substring(1),e)}:r0[n]?t.length>1?{type:r0[n],data:t.substring(1)}:{type:r0[n]}:zv},ice=(t,e)=>{if(ace){const n=oce(t);return yk(n,e)}else return{base64:!0,data:t}},yk=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},_k="",sce=(t,e)=>{const n=t.length,r=new Array(n);let o=0;t.forEach((a,i)=>{E3(a,!1,s=>{r[i]=s,++o===n&&e(r.join(_k))})})},lce=(t,e)=>{const n=t.split(_k),r=[];for(let o=0;o<n.length;o++){const a=M3(n[o],e);if(r.push(a),a.type==="error")break}return r};function cce(){return new TransformStream({transform(t,e){rce(t,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const a=new DataView(o.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{o=new Uint8Array(9);const a=new DataView(o.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}t.data&&typeof t.data!="string"&&(o[0]|=128),e.enqueue(o),e.enqueue(n)})}})}let k2;function c1(t){return t.reduce((e,n)=>e+n.length,0)}function u1(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let r=0;for(let o=0;o<e;o++)n[o]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}function uce(t,e){k2||(k2=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(i,s){for(n.push(i);;){if(r===0){if(c1(n)<1)break;const l=u1(n,1);a=(l[0]&128)===128,o=l[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(c1(n)<2)break;const l=u1(n,2);o=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(c1(n)<8)break;const l=u1(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),d=u.getUint32(0);if(d>Math.pow(2,21)-1){s.enqueue(zv);break}o=d*Math.pow(2,32)+u.getUint32(4),r=3}else{if(c1(n)<o)break;const l=u1(n,o);s.enqueue(M3(a?l:k2.decode(l),e)),r=0}if(o===0||o>t){s.enqueue(zv);break}}}})}const xk=4;function Qn(t){if(t)return dce(t)}function dce(t){for(var e in Qn.prototype)t[e]=Qn.prototype[e];return t}Qn.prototype.on=Qn.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};Qn.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};Qn.prototype.off=Qn.prototype.removeListener=Qn.prototype.removeAllListeners=Qn.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===e||r.fn===e){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+t],this};Qn.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,e)}return this};Qn.prototype.emitReserved=Qn.prototype.emit;Qn.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};Qn.prototype.hasListeners=function(t){return!!this.listeners(t).length};const Bh=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),Ho=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),fce="arraybuffer";function Sk(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const pce=Ho.setTimeout,hce=Ho.clearTimeout;function zh(t,e){e.useNativeTimers?(t.setTimeoutFn=pce.bind(Ho),t.clearTimeoutFn=hce.bind(Ho)):(t.setTimeoutFn=Ho.setTimeout.bind(Ho),t.clearTimeoutFn=Ho.clearTimeout.bind(Ho))}const mce=1.33;function gce(t){return typeof t=="string"?vce(t):Math.ceil((t.byteLength||t.size)*mce)}function vce(t){let e=0,n=0;for(let r=0,o=t.length;r<o;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}function Ck(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function wce(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function bce(t){let e={},n=t.split("&");for(let r=0,o=n.length;r<o;r++){let a=n[r].split("=");e[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return e}class yce extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}}class k3 extends Qn{constructor(e){super(),this.writable=!1,zh(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,n,r){return super.emitReserved("error",new yce(e,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const n=M3(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,n={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const n=wce(e);return n.length?"?"+n:""}}class _ce extends k3{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const n=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};lce(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,sce(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Ck()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}}let Ek=!1;try{Ek=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const xce=Ek;function Sce(){}class Cce extends _ce{constructor(e){if(super(e),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||r!==e.port}}doWrite(e,n){const r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(o,a)=>{this.onError("xhr post error",o,a)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}}let lu=class o0 extends Qn{constructor(e,n,r){super(),this.createRequest=e,zh(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var e;const n=Sk(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=o0.requestsCount++,o0.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Sce,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete o0.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};lu.requestsCount=0;lu.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",jx);else if(typeof addEventListener=="function"){const t="onpagehide"in Ho?"pagehide":"unload";addEventListener(t,jx,!1)}}function jx(){for(let t in lu.requests)lu.requests.hasOwnProperty(t)&&lu.requests[t].abort()}const Ece=(function(){const t=Mk({xdomain:!1});return t&&t.responseType!==null})();class Mce extends Cce{constructor(e){super(e);const n=e&&e.forceBase64;this.supportsBinary=Ece&&!n}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new lu(Mk,this.uri(),e)}}function Mk(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||xce))return new XMLHttpRequest}catch{}if(!e)try{return new Ho[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const kk=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class kce extends k3{get name(){return"websocket"}doOpen(){const e=this.uri(),n=this.opts.protocols,r=kk?{}:Sk(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const r=e[n],o=n===e.length-1;E3(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch{}o&&Bh(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Ck()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}}const R2=Ho.WebSocket||Ho.MozWebSocket;class Rce extends kce{createSocket(e,n,r){return kk?new R2(e,n,r):n?new R2(e,n):new R2(e)}doWrite(e,n){this.ws.send(n)}}class Tce extends k3{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const n=uce(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),o=cce();o.readable.pipeTo(e.writable),this._writer=o.writable.getWriter();const a=()=>{r.read().then(({done:s,value:l})=>{s||(this.onPacket(l),a())}).catch(s=>{})};a();const i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const r=e[n],o=n===e.length-1;this._writer.write(r).then(()=>{o&&Bh(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const Nce={websocket:Rce,webtransport:Tce,polling:Mce},Pce=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Ace=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Fv(t){if(t.length>8e3)throw"URI too long";const e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let o=Pce.exec(t||""),a={},i=14;for(;i--;)a[Ace[i]]=o[i]||"";return n!=-1&&r!=-1&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=Ice(a,a.path),a.queryKey=Oce(a,a.query),a}function Ice(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Oce(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Vv=typeof addEventListener=="function"&&typeof removeEventListener=="function",a0=[];Vv&&addEventListener("offline",()=>{a0.forEach(t=>t())},!1);class Ls extends Qn{constructor(e,n){if(super(),this.binaryType=fce,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(n=e,e=null),e){const r=Fv(e);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=Fv(n.host).host);zh(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=bce(this.opts.query)),Vv&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},a0.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const n=Object.assign({},this.opts.query);n.EIO=xk,n.transport=e,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&Ls.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(e);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Ls.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=e.data,this._onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=gce(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,Bh(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,n,r){return this._sendPacket("message",e,n,r),this}send(e,n,r){return this._sendPacket("message",e,n,r),this}_sendPacket(e,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:e,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),o&&this.once("flush",o),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}_onError(e){if(Ls.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Vv&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=a0.indexOf(this._offlineEventListener);r!==-1&&a0.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ls.protocol=xk;class Lce extends Ls{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let n=this.createTransport(e),r=!1;Ls.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ls.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function a(){r||(r=!0,d(),n.close(),n=null)}const i=f=>{const m=new Error("probe error: "+f);m.transport=n.name,a(),this.emitReserved("upgradeError",m)};function s(){i("transport closed")}function l(){i("socket closed")}function u(f){n&&f.name!==n.name&&a()}const d=()=>{n.removeListener("open",o),n.removeListener("error",i),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",o),n.once("error",i),n.once("close",s),this.once("close",l),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const n=[];for(let r=0;r<e.length;r++)~this.transports.indexOf(e[r])&&n.push(e[r]);return n}}let $ce=class extends Lce{constructor(e,n={}){const r=typeof e=="object"?e:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>Nce[o]).filter(o=>!!o)),super(e,r)}};function Dce(t,e="",n){let r=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),r=Fv(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+e,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const Bce=typeof ArrayBuffer=="function",zce=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Rk=Object.prototype.toString,Fce=typeof Blob=="function"||typeof Blob<"u"&&Rk.call(Blob)==="[object BlobConstructor]",Vce=typeof File=="function"||typeof File<"u"&&Rk.call(File)==="[object FileConstructor]";function R3(t){return Bce&&(t instanceof ArrayBuffer||zce(t))||Fce&&t instanceof Blob||Vce&&t instanceof File}function i0(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(i0(t[n]))return!0;return!1}if(R3(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return i0(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&i0(t[n]))return!0;return!1}function jce(t){const e=[],n=t.data,r=t;return r.data=jv(n,e),r.attachments=e.length,{packet:r,buffers:e}}function jv(t,e){if(!t)return t;if(R3(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=jv(t[r],e);return n}else if(typeof t=="object"&&!(t instanceof Date)){const n={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=jv(t[r],e));return n}return t}function Hce(t,e){return t.data=Hv(t.data,e),delete t.attachments,t}function Hv(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=Hv(t[n],e);else if(typeof t=="object")for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=Hv(t[n],e));return t}const Wce=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var nn;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(nn||(nn={}));class qce{constructor(e){this.replacer=e}encode(e){return(e.type===nn.EVENT||e.type===nn.ACK)&&i0(e)?this.encodeAsBinary({type:e.type===nn.EVENT?nn.BINARY_EVENT:nn.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===nn.BINARY_EVENT||e.type===nn.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(n+=e.nsp+","),e.id!=null&&(n+=e.id),e.data!=null&&(n+=JSON.stringify(e.data,this.replacer)),n}encodeAsBinary(e){const n=jce(e),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class T3 extends Qn{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let n;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(e);const r=n.type===nn.BINARY_EVENT;r||n.type===nn.BINARY_ACK?(n.type=r?nn.EVENT:nn.ACK,this.reconstructor=new Uce(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(R3(e)||e.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let n=0;const r={type:Number(e.charAt(0))};if(nn[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===nn.BINARY_EVENT||r.type===nn.BINARY_ACK){const a=n+1;for(;e.charAt(++n)!=="-"&&n!=e.length;);const i=e.substring(a,n);if(i!=Number(i)||e.charAt(n)!=="-")throw new Error("Illegal attachments");const s=Number(i);if(!Yce(s)||s<0)throw new Error("Illegal attachments");if(s>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=s}if(e.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););r.nsp=e.substring(a,n)}else r.nsp="/";const o=e.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const i=e.charAt(n);if(i==null||Number(i)!=i){--n;break}if(n===e.length)break}r.id=Number(e.substring(a,n+1))}if(e.charAt(++n)){const a=this.tryParse(e.substr(n));if(T3.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case nn.CONNECT:return Hx(n);case nn.DISCONNECT:return n===void 0;case nn.CONNECT_ERROR:return typeof n=="string"||Hx(n);case nn.EVENT:case nn.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Wce.indexOf(n[0])===-1);case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Uce{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const n=Hce(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Yce=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function Hx(t){return Object.prototype.toString.call(t)==="[object Object]"}const Gce=Object.freeze(Object.defineProperty({__proto__:null,Decoder:T3,Encoder:qce,get PacketType(){return nn}},Symbol.toStringTag,{value:"Module"}));function ma(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const Kce=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Tk extends Qn{constructor(e,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[ma(e,"open",this.onopen.bind(this)),ma(e,"packet",this.onpacket.bind(this)),ma(e,"error",this.onerror.bind(this)),ma(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){var r,o,a;if(Kce.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const i={type:nn.EVENT,data:n};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const d=this.ids++,f=n.pop();this._registerAckCallback(d,f),i.id=d}const s=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,l=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!s||(l?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[e]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let s=0;s<this.sendBuffer.length;s++)this.sendBuffer[s].id===e&&this.sendBuffer.splice(s,1);n.call(this,new Error("operation has timed out"))},o),i=(...s)=>{this.io.clearTimeoutFn(a),n.apply(this,s)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...n){return new Promise((r,o)=>{const a=(i,s)=>i?o(i):r(s);a.withError=!0,n.push(a),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((o,...a)=>(this._queue[0],o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:nn.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(r=>String(r.id)===e)){const r=this.acks[e];delete this.acks[e],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case nn.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(e);break;case nn.ACK:case nn.BINARY_ACK:this.onack(e);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:nn.ACK,id:e,data:o}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,e.data)}}}function Nu(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Nu.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-n:t+n}return Math.min(t,this.max)|0};Nu.prototype.reset=function(){this.attempts=0};Nu.prototype.setMin=function(t){this.ms=t};Nu.prototype.setMax=function(t){this.max=t};Nu.prototype.setJitter=function(t){this.jitter=t};class Wv extends Qn{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,zh(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Nu({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const o=n.parser||Gce;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new $ce(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=ma(n,"open",function(){r.onopen(),e&&e()}),a=s=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",s),e?e(s):this.maybeReconnectOnOpen()},i=ma(n,"error",a);if(this._timeout!==!1){const s=this._timeout,l=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),n.close()},s);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(o),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(ma(e,"ping",this.onping.bind(this)),ma(e,"data",this.ondata.bind(this)),ma(e,"error",this.onerror.bind(this)),ma(e,"close",this.onclose.bind(this)),ma(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){Bh(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new Tk(this,e,n),this.nsps[e]=r),r}_destroy(e){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let r=0;r<n.length;r++)this.engine.write(n[r],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const bd={};function s0(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=Dce(t,e.path||"/socket.io"),r=n.source,o=n.id,a=n.path,i=bd[o]&&a in bd[o].nsps,s=e.forceNew||e["force new connection"]||e.multiplex===!1||i;let l;return s?l=new Wv(r,e):(bd[o]||(bd[o]=new Wv(r,e)),l=bd[o]),n.query&&!e.query&&(e.query=n.queryKey),l.socket(n.path,e)}Object.assign(s0,{Manager:Wv,Socket:Tk,io:s0,connect:s0});var T2,Wx;function Xce(){if(Wx)return T2;Wx=1;var t=typeof Element<"u",e=typeof Map=="function",n=typeof Set=="function",r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function o(a,i){if(a===i)return!0;if(a&&i&&typeof a=="object"&&typeof i=="object"){if(a.constructor!==i.constructor)return!1;var s,l,u;if(Array.isArray(a)){if(s=a.length,s!=i.length)return!1;for(l=s;l--!==0;)if(!o(a[l],i[l]))return!1;return!0}var d;if(e&&a instanceof Map&&i instanceof Map){if(a.size!==i.size)return!1;for(d=a.entries();!(l=d.next()).done;)if(!i.has(l.value[0]))return!1;for(d=a.entries();!(l=d.next()).done;)if(!o(l.value[1],i.get(l.value[0])))return!1;return!0}if(n&&a instanceof Set&&i instanceof Set){if(a.size!==i.size)return!1;for(d=a.entries();!(l=d.next()).done;)if(!i.has(l.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(a)&&ArrayBuffer.isView(i)){if(s=a.length,s!=i.length)return!1;for(l=s;l--!==0;)if(a[l]!==i[l])return!1;return!0}if(a.constructor===RegExp)return a.source===i.source&&a.flags===i.flags;if(a.valueOf!==Object.prototype.valueOf&&typeof a.valueOf=="function"&&typeof i.valueOf=="function")return a.valueOf()===i.valueOf();if(a.toString!==Object.prototype.toString&&typeof a.toString=="function"&&typeof i.toString=="function")return a.toString()===i.toString();if(u=Object.keys(a),s=u.length,s!==Object.keys(i).length)return!1;for(l=s;l--!==0;)if(!Object.prototype.hasOwnProperty.call(i,u[l]))return!1;if(t&&a instanceof Element)return!1;for(l=s;l--!==0;)if(!((u[l]==="_owner"||u[l]==="__v"||u[l]==="__o")&&a.$$typeof)&&!o(a[u[l]],i[u[l]]))return!1;return!0}return a!==a&&i!==i}return T2=function(i,s){try{return o(i,s)}catch(l){if((l.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw l}},T2}var Zce=Xce();const Qce=Ea(Zce),{createContext:Jce,useCallback:ha,useContext:N3,useEffect:$l,useLayoutEffect:eue,useMemo:tue,useRef:Di,useState:Rs}=await q("react"),l0={connected:null,realConnected:null,isInitialConnecting:!0,socketId:null,getSocketId:()=>null,setSocketUrl:()=>{},socketEventOn:()=>{},socketEventOff:()=>{},socketEventEmit:()=>{},setPrevResponse:()=>{},getPrevResponse:()=>null},Fh=Jce(l0),Pve=({url:t,socketOptions:e={},children:n,loadingElement:r})=>{const{transports:o=["websocket","polling"],reconnectionAttempts:a=1/0,reconnectionDelay:i=1e3,reconnectionDelayMax:s=5e3,timeout:l=2e4,...u}=e,d=Di(null),f=Di({}),m=Di({}),v=Di({}),[g,w]=Rs(t),[y,_]=Rs(l0.realConnected),[S,x]=Rs(l0.connected),[C,R]=Rs(l0.isInitialConnecting),[P,O]=Rs(null);$l(()=>{w(t)},[t]);const $=ha(D=>{w(D)},[]),A=ha((D,U)=>{Object.values(f.current[D]??{}).forEach(Y=>{Y(U)})},[]),M=ha((D,U)=>{d.current?.emit(D,U)},[]),L=ha(({topic:D,id:U,subscribePayload:Y},oe)=>{if(f.current[D]||(f.current[D]={}),!d.current?.hasListeners(D)){const Q={topic:D,...Y??{}};Y&&Object.keys(Y).length>0&&(v.current[D]=Y),M("subscribe",Q),d.current?.on(D,re=>{A(D,re)})}f.current[D][U]=oe},[M,A]),B=ha(({topic:D,id:U})=>{if(f.current[D]?.[U]&&(delete f.current[D][U],Object.keys(f.current[D]).length===0)){d.current?.off(D);const Y=v.current[D],oe=Y?{topic:D,...Y}:{topic:D};M("unsubscribe",oe),delete v.current[D]}},[M]),F=ha((D,U)=>m.current[D]?.[U],[]),N=ha((D,U)=>{m.current[D]={raw:U,parsed:m0(U)}},[]),V=ha(()=>d.current?.id??null,[]),z=ha(()=>{d.current&&(d.current.disconnect(),d.current=null),d.current=s0(g,{transports:o,reconnectionAttempts:a,reconnectionDelay:i,reconnectionDelayMax:s,timeout:l,...u}),Object.keys(f.current).forEach(D=>{Object.keys(f.current[D]??{}).length>0&&d.current?.on(D,U=>{A(D,U)})}),d.current.on("connect",()=>{console.log("Socket.io connected"),x(!0),_(!0),O(d.current?.id??null),A("connect","connected")}),d.current.on("disconnect",D=>{console.log("Socket.io disconnected",D),_(!1),A("disconnect","disconnected")}),d.current.io.on("reconnect",D=>{console.log("Socket.io reconnect",D),A("reconnect",D),Object.keys(f.current).forEach(U=>{if(Object.keys(f.current[U])?.length){const Y={topic:U,...v.current[U]??{}};M("subscribe",Y),d.current?.emit("subscribe",Y)}})}),d.current.io.on("reconnect_attempt",D=>{console.log("Socket.io reconnect_attempt",D),D>3&&x(!1),A("reconnect_attempt",D)}),d.current.io.on("reconnect_error",D=>{A("reconnect_error",D)}),d.current.io.on("reconnect_failed",()=>{console.error("Socket.io reconnect_failed"),x(!1),_(!1),A("reconnect_failed","reconnect_failed")}),d.current.on("error",D=>{console.error("Socket.io error: ",D),A("error",D)})},[A,a,i,s,JSON.stringify(u),JSON.stringify(o),g]),I=tue(()=>({connected:S,realConnected:y,isInitialConnecting:C,socketId:P,getSocketId:V,setSocketUrl:$,socketEventOn:L,socketEventOff:B,socketEventEmit:M,setPrevResponse:N,getPrevResponse:F}),[S,y,C,P,V,$,L,B,M,N,F]);return eue(()=>{z()},[z]),$l(()=>{!S&&m.current&&Object.keys(m.current).forEach(D=>{M(D,void 0),N(D,void 0)})},[S,N,M]),$l(()=>{S&&R(!1)},[S]),h(Fh.Provider,{value:I,children:n})},Ave=()=>{const{connected:t,realConnected:e,socketEventEmit:n,setSocketUrl:r,socketId:o,getSocketId:a}=N3(Fh);return{connected:t,realConnected:e,socketEventEmit:n,setSocketUrl:r,socketId:o,getSocketId:a}},nue=t=>{const{socketEventOn:e,socketEventOff:n,setPrevResponse:r,getPrevResponse:o}=N3(Fh),a=Di({options:t.options,callback:t.callback}),[i]=Rs(kn.uniqueId()),{topic:s}=t;$l(()=>{a.current={options:t.options,callback:t.callback}},[t]),$l(()=>{if(!t.options?.disabled)return e({topic:s,id:i,subscribePayload:t.options?.subscribePayload},l=>{const{options:u,callback:d}=a.current;u?.prevData,r(s,l);const f=m0(l);d?.(f)}),()=>{n({topic:s,id:i})}},[o,r,n,e,s,i,t.options?.disabled,t.options?.subscribePayload])},Ive=(t,e={})=>{const{realConnected:n,isInitialConnecting:r,getPrevResponse:o,setPrevResponse:a}=N3(Fh),[i,s]=Rs(!o(t,"parsed")&&!!e.defaultValue),l=n?o(t,"parsed")??e.defaultValue:e.defaultValue,[u,d]=Rs(e.selector?e.selector(l):l),f=Di(u),m=Di(i),v=Di(e);f.current=u,m.current=i,v.current=e;const g=ha(S=>{e.disabled||(d(e.selector?e.selector(S):S),a(t,S),s(!1))},[a,t,e]),w=e.throttleMs??0,y=Di({timer:null,pending:null,hasPending:!1}),_=ha(S=>{const x=e.selector?e.selector(S):S;!e.disableDuplicateCheck&&Qce(x,f.current)&&!m.current||(d(x),x&&s(!1))},[e]);return $l(()=>{const S=y.current;return()=>{S.timer&&clearTimeout(S.timer)}},[]),nue({topic:t,callback:S=>{if(w<=0){_(S);return}const x=y.current;x.pending=S,x.hasPending=!0,!x.timer&&(x.timer=setTimeout(()=>{x.timer=null,x.hasPending&&(x.hasPending=!1,_(x.pending),x.pending=null)},w))},options:{...e,prevData:u,subscribePayload:e.subscribePayload}}),$l(()=>{if(!n){const S=v.current,x=S.defaultValue===void 0?void 0:S.selector?S.selector(S.defaultValue):S.defaultValue;d(x),a(t,void 0),s(S.defaultValue!==void 0)}},[n,a,t]),{data:u,changeData:g,loading:!u&&!r,isDefaultData:i}},{useRef:Ove}=await q("react"),{useMutation:Lve}=await q("@tanstack/react-query"),{useMutation:$ve}=await q("@tanstack/react-query"),{useMutation:Dve}=await q("@tanstack/react-query"),{useMutation:Bve}=await q("@tanstack/react-query"),{useMutation:zve}=await q("@tanstack/react-query"),{useMutation:Fve}=await q("@tanstack/react-query"),{useMutation:Vve}=await q("@tanstack/react-query"),{useMutation:jve}=await q("@tanstack/react-query"),{useMutation:Hve}=await q("@tanstack/react-query"),{useCallback:Wve}=await q("react"),{useCallback:qve}=await q("react"),{useMutation:Uve}=await q("@tanstack/react-query"),{useMutation:Yve,useQueryClient:Gve}=await q("@tanstack/react-query"),{useMutation:Kve,useQueryClient:Xve}=await q("@tanstack/react-query"),{useMutation:Zve,useQueryClient:Qve}=await q("@tanstack/react-query"),{useMutation:Jve}=await q("@tanstack/react-query"),{useMutation:ewe}=await q("@tanstack/react-query"),{useMutation:twe}=await q("@tanstack/react-query"),{useMutation:nwe}=await q("@tanstack/react-query"),{useMutation:rwe}=await q("@tanstack/react-query"),{useMutation:owe}=await q("@tanstack/react-query"),{useMutation:awe}=await q("@tanstack/react-query"),{useMutation:iwe}=await q("@tanstack/react-query"),{useMutation:swe}=await q("@tanstack/react-query"),{useMutation:lwe}=await q("@tanstack/react-query"),{useMutation:cwe}=await q("@tanstack/react-query"),{useMutation:uwe}=await q("@tanstack/react-query"),{useMutation:dwe}=await q("@tanstack/react-query"),{useMutation:fwe}=await q("@tanstack/react-query"),{useMutation:pwe}=await q("@tanstack/react-query"),{useMutation:hwe}=await q("@tanstack/react-query"),{useMutation:mwe}=await q("@tanstack/react-query"),{useMutation:gwe}=await q("@tanstack/react-query"),{useMutation:vwe}=await q("@tanstack/react-query"),{useMutation:wwe}=await q("@tanstack/react-query"),{useMutation:bwe}=await q("@tanstack/react-query"),{useMutation:ywe}=await q("@tanstack/react-query"),{useMutation:_we}=await q("@tanstack/react-query"),{useMutation:xwe}=await q("@tanstack/react-query"),{useMutation:Swe}=await q("@tanstack/react-query"),{useMutation:Cwe}=await q("@tanstack/react-query"),{useMutation:Ewe}=await q("@tanstack/react-query"),{useMutation:Mwe}=await q("@tanstack/react-query"),{useMutation:kwe}=await q("@tanstack/react-query"),{useMutation:Rwe}=await q("@tanstack/react-query"),{useMutation:Twe}=await q("@tanstack/react-query"),{useMutation:Nwe}=await q("@tanstack/react-query"),{useMutation:Pwe}=await q("@tanstack/react-query"),{useMutation:Awe}=await q("@tanstack/react-query"),{useMutation:Iwe}=await q("@tanstack/react-query"),{useMutation:Owe}=await q("@tanstack/react-query"),{useMutation:Lwe}=await q("@tanstack/react-query"),{useMutation:$we}=await q("@tanstack/react-query"),{useMutation:Dwe}=await q("@tanstack/react-query"),{useMutation:Bwe}=await q("@tanstack/react-query"),{useMutation:zwe}=await q("@tanstack/react-query"),{useMutation:rue}=await q("@tanstack/react-query"),oue="/setUrl",Fwe=()=>rue({mutationFn:t=>Th.post(oue,t)}),{useMutation:Vwe}=await q("@tanstack/react-query"),{useMutation:jwe}=await q("@tanstack/react-query"),{useCallback:Hwe}=await q("react"),{useMutation:Wwe}=await q("@tanstack/react-query"),{useCallback:qwe}=await q("react"),{useMutation:Uwe}=await q("@tanstack/react-query"),{useCallback:Ywe}=await q("react"),{useMutation:Gwe}=await q("@tanstack/react-query"),{useCallback:Kwe}=await q("react"),{useMutation:Xwe}=await q("@tanstack/react-query"),{useCallback:Zwe}=await q("react"),{useMutation:Qwe}=await q("@tanstack/react-query"),{useCallback:Jwe}=await q("react"),{useMutation:e3e}=await q("@tanstack/react-query"),{useCallback:t3e}=await q("react"),{useMutation:n3e}=await q("@tanstack/react-query"),{useMutation:r3e}=await q("@tanstack/react-query"),{useMutation:o3e}=await q("@tanstack/react-query"),{useMutation:a3e}=await q("@tanstack/react-query"),{useMutation:i3e}=await q("@tanstack/react-query"),{useMutation:s3e}=await q("@tanstack/react-query"),{useMutation:l3e}=await q("@tanstack/react-query"),{useMutation:c3e}=await q("@tanstack/react-query"),{useMutation:u3e}=await q("@tanstack/react-query"),{useCallback:d3e}=await q("react"),{useMutation:f3e}=await q("@tanstack/react-query"),{useCallback:p3e}=await q("react"),{useEffect:h3e,useRef:m3e,useState:g3e}=await q("react"),{useMutation:v3e}=await q("@tanstack/react-query"),{useEffect:w3e,useRef:b3e,useState:y3e}=await q("react"),{useMutation:_3e}=await q("@tanstack/react-query"),{useMutation:x3e}=await q("@tanstack/react-query"),{useMutation:S3e}=await q("@tanstack/react-query"),{useMutation:C3e}=await q("@tanstack/react-query"),{useEffect:E3e,useMemo:M3e,useState:k3e}=await q("react"),{useMemo:R3e}=await q("react"),aue={moveState:{autoMove:"stop",moveId:"",moveResult:"",dockMove:"",jogMove:"none",obs:"none",pathState:"none",step:0,multiId:"",multiState:""},pose:{x:0,y:0,rz:0},vel:{vx:0,vy:0,wz:0},curNode:{id:"",name:"",state:"",pose:{x:0,y:0,rz:0}},goalNode:{id:"",name:"",state:"",pose:{x:0,y:0,rz:0}}},iue=t=>({...t,pose:{x:String(t.pose.x),y:String(t.pose.y),rz:String(t.pose.rz)}});iue(aue);const{useCallback:T3e,useMemo:N3e}=await q("react"),{useMemo:P3e}=await q("react"),{useRef:A3e}=await q("react"),{useCallback:I3e,useEffect:O3e,useRef:L3e,useState:$3e}=await q("react"),{useCallback:D3e}=await q("react"),{useCallback:B3e}=await q("react"),{useEffect:qx,useState:sue}=await q("react"),lue=t=>{const[e,n]=sue("");return qx(()=>{},[e,t]),qx(()=>{let r="",o;const a=i=>{clearTimeout(o);const s=document.activeElement;if(!(s&&(s.tagName==="INPUT"||s.tagName==="TEXTAREA"||s.tagName==="SELECT"||s.contentEditable==="true"))){if(i.key==="Enter"){n(r.trim()),r="";return}/^[a-zA-Z0-9\-_]$/.test(i.key)&&(r+=i.key),o=setTimeout(()=>{n(r.trim()),r=""},100)}};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[]),{barCodeValue:e}},{useMemo:z3e}=await q("react"),{useEffect:F3e,useRef:V3e,useCallback:j3e}=await q("react"),{useRef:cue,useState:uue}=await q("react"),H3e=({onFiles:t,accept:e,multiple:n=!0,onRejected:r})=>{const o=cue(null),[a,i]=uue(!1),s=v=>{const g=n?v:v.slice(0,1);if(g.length===0)return;if(!e||e.length===0){t(g);return}const w=e.map(S=>S.toLowerCase()),y=g.filter(S=>w.some(x=>S.name.toLowerCase().endsWith(x))),_=g.filter(S=>!y.includes(S));_.length>0&&r?.(_),y.length>0&&t(y)},l=v=>{v.preventDefault(),v.stopPropagation(),i(!0)},u=v=>{v.preventDefault(),v.stopPropagation(),i(!1)},d=v=>{v.preventDefault(),v.stopPropagation(),i(!1),s(Array.from(v.dataTransfer.files))},f=()=>o.current?.click(),m={ref:o,type:"file",multiple:n,accept:e?.join(","),style:{display:"none"},onChange:v=>{s(Array.from(v.target.files??[])),v.target.value=""}};return{isDragging:a,dropProps:{onDragOver:l,onDragLeave:u,onDrop:d},inputProps:m,open:f}},due={"popover-area":"_popover-area_y74pu_40","btn-popover":"_btn-popover_y74pu_45","popover-element-wrap":"_popover-element-wrap_y74pu_59","popover-element":"_popover-element_y74pu_59"},{cloneElement:fue,forwardRef:pue,useCallback:yd,useEffect:hue,useImperativeHandle:mue,useMemo:Ux,useRef:Yx,useState:Gx}=await q("react"),d1=rn(due,"rb-ui"),Kx=[],P3=pue(({id:t,className:e="",popoverAreaClassName:n,popoverElementClassName:r,anchorId:o,detectDoubleClick:a,popoverElement:i,popoverStyle:s={top:0,left:0,zIndex:1},popoverAnimation:l={name:"pop-fade",duration:200},ripple:u,disabled:d=!1,excludeOutSideIds:f=Kx,whenWindowScrollClose:m,children:v,onClick:g,onClose:w},y)=>{const _=Yx(null),S=Yx(!1),[x,C]=Gx(!1),[R,P]=Gx(""),O=Ux(()=>x?R==="enter"||R==="leave"?{animationName:l.name,animationDuration:`${l.duration}ms`,animationTimingFunction:l.timingFunc||"ease",animationDirection:R==="leave"?"reverse":"normal",animationFillMode:R==="leave"?"forwards":"normal"}:{}:{},[l,x,R]),$=yd(N=>new Promise(V=>setTimeout(V,N)),[]),A=yd(async()=>{!o||R==="leave"||(P(""),await $(10),P("leave"),await $(l.duration),C(!1),w?.())},[o,R,l.duration,$,w]),M=yd(async()=>{o&&(C(!0),P("enter"),await $(l.duration),P(""))},[o,l.duration,$]),L=yd(()=>{x?A():M()},[x,A,M]),B=yd(async N=>{d||S.current&&a||(S.current=!0,setTimeout(()=>{S.current=!1},500),L(),g?.(N))},[a,d,L,g]),F=Ux(()=>{const N=typeof i?.type=="string"?void 0:{close:A};return h("div",{className:d1("popover-element-wrap",r),draggable:!1,children:x&&h("div",{className:d1("popover-element",R),style:{...s,...O},children:fue(i??h(Mr,{}),N)})})},[O,A,x,i,r,s,R]);return Nf(_,N=>{const V=[...f,o].filter(I=>!!I).concat(Kx).map(I=>document.querySelector(`#${I}`)).filter(I=>I),z=N.target;document.body.contains(z)&&(z.closest('[data-slot="select-drop-box"]')||V.some(I=>I?.contains(z))||x&&A())},{event:"mouseup"}),hue(()=>{const N=()=>{C(!1),P("")};return x&&m&&window.addEventListener("scroll",N),()=>{window.removeEventListener("scroll",N)}},[m,x]),mue(y,()=>({close:A,open:M})),te("div",{ref:_,id:t,className:d1("popover-area",n),children:[h(Rr,{...u,disabled:d||u?.disabled,children:h("button",{className:d1("btn-popover",e,x&&"open",d&&"pointer-events-none cursor-not-allowed"),"data-pad-focus":"true",disabled:d,onClick:B,children:v})}),o?h(Gl,{id:o,children:F}):null]})});P3.displayName="PopoverButton";function Nk({className:t,onCancel:e,onConfirm:n,onReset:r,labels:o}){return te(Yo,{className:ae("w-full p-4",t),justifyContent:"space-between",alignItems:"center",children:[h(Wr,{variant:"transparent",size:"sm",onClick:r,children:o?.reset??"Reset"}),te(Yo,{inline:!0,alignItems:"center",gap:4,children:[h(Wr,{className:"light:bg-fill-subtlest",variant:"soft",size:"sm",onClick:e,children:o?.cancel??"Cancel"}),h(Wr,{variant:"brand",size:"sm",onClick:n,children:o?.confirm??"Confirm"})]})]})}const gue=he(["inline-flex items-center overflow-hidden","bg-fill-control-surface outline outline-1 outline-offset-[-1px]","transition-colors"].join(" "),{variants:{size:{xs2:"px-2_5 h-8 rounded-md",sm:"px-2_5 h-9 rounded-md",md:"h-10 rounded-md px-3",lg:"h-12 rounded-lg px-3"},variant:{default:"outline-border-default"},focus:{true:"outline-border-input-focused",false:""},error:{true:"outline-border-danger-stronger",false:""},readOnly:{true:"bg-fill-control-surface-disabled outline-border-disabled",false:""},disabled:{true:"bg-fill-control-surface-disabled outline-border-disabled hover:bg-fill-control-surface-disabled text-fg-disabled pointer-events-none cursor-not-allowed",false:""}},compoundVariants:[{variant:"default",focus:!1,error:!1,readOnly:!1,disabled:!1,className:"[&:hover]:bg-fill-control-surface-hovered [&:hover]:outline-border-default"},{focus:!0,className:"[&:hover]:bg-fill-control-surface [&:hover]:outline-border-input-focused"},{error:!0,className:"[&:hover]:bg-fill-control-surface [&:hover]:outline-border-danger-stronger"},{readOnly:!0,className:"[&:hover]:bg-fill-control-surface-disabled [&:hover]:outline-border-disabled"},{disabled:!0,className:"[&:hover]:bg-fill-control-surface-disabled [&:hover]:outline-border-disabled"}],defaultVariants:{size:"md",variant:"default",focus:!1,error:!1,readOnly:!1,disabled:!1}}),vue=he("flex-1 truncate text-left",{variants:{size:{xs2:"typo-compact-xs2-normal pr-1",sm:"typo-compact-sm-normal pr-1",md:"typo-compact-sm2-normal pr-1_5",lg:"typo-compact-sm2-normal pr-2"},placeholder:{true:"text-fg-subtler font-normal",false:"text-fg-default font-medium"},disabled:{true:"text-fg-disabled",false:""}},defaultVariants:{size:"md",placeholder:!0,disabled:!1}}),wue=he("inline-flex shrink-0 items-center justify-center",{variants:{size:{xs2:"size-4",sm:"size-4",md:"size-5",lg:"size-5"},disabled:{true:"text-fg-disabled",false:"text-fg-default"}},defaultVariants:{size:"md",disabled:!1}}),bue=he(["absolute left-0 z-[999999] max-w-0","bg-overlay outline-border-subtle rounded-md outline outline-1 outline-offset-[-1px]","shadow-down-xs","overflow-x-hidden"].join(" "),{variants:{mode:{default:"no-scrollbar max-h-60 overflow-y-auto p-1",empty:"p-1_5 h-48 max-h-56",loading:"p-1_5 h-48 max-h-56"}},defaultVariants:{mode:"default"}}),yue=he("text-center",{variants:{size:{xs2:"typo-compact-xs2-normal",sm:"typo-compact-sm-normal",md:"typo-compact-sm2-normal",lg:"typo-compact-sm2-normal"}},defaultVariants:{size:"md"}}),_ue=he("inline-flex h-9 w-full items-center overflow-hidden rounded-sm px-3",{variants:{selected:{true:"",false:""},disabled:{true:"",false:""},hovered:{true:"bg-fill-transparent-hovered",false:"bg-fill-transparent"}},compoundVariants:[{selected:!1,disabled:!1,hovered:!1,className:"text-fg-subtler font-normal"},{selected:!1,disabled:!1,hovered:!0,className:"text-fg-default font-normal"},{selected:!0,disabled:!1,className:"text-fg-default font-semibold"},{selected:!1,disabled:!0,className:"text-fg-disabled font-normal"},{selected:!0,disabled:!0,className:"text-fg-disabled font-semibold"}],defaultVariants:{selected:!1,disabled:!1,hovered:!1}}),xue=he("line-clamp-1 flex-1 pr-4 text-left",{variants:{size:{xs2:"typo-compact-xs2-normal",sm:"typo-compact-xs2-normal",md:"typo-compact-xs2-normal",lg:"typo-compact-xs2-normal"}},defaultVariants:{size:"md"}}),{useCallback:Sue,useMemo:Cue,useState:Eue}=await q("react"),qv=({className:t="",size:e="md",text:n,value:r,label:o,children:a,description:i,selectedValue:s="",searchText:l="",enableGamepadFocus:u,disabled:d,handleChange:f})=>{const m=s===r,[v,g]=Eue(!1),w=Cue(()=>l?kn.lowerCase(n).includes(kn.lowerCase(l)):!1,[n,l]),y=Sue(_=>{_.button===2||d||f?.({label:o??a,value:r})},[a,d,f,r,o]);return h("div",{"data-slot":"select-option",className:ae(_ue({selected:m,disabled:!!d,hovered:!d&&(w||v)}),i&&"h-auto min-h-9 overflow-visible py-2",t,{active:m}),role:"button","data-pad-focus":u&&!d?"true":"false",tabIndex:-1,onClick:y,onMouseEnter:()=>{d||g(!0)},onMouseLeave:()=>g(!1),children:te("div",{"data-slot":"select-option-content",className:"flex min-w-0 flex-1 items-center gap-2",children:[te("div",{"data-slot":"select-option-text",className:ae("min-w-0 flex-1",xue({size:e}),i&&"line-clamp-none"),children:[a,i&&h("div",{"data-slot":"select-option-description",className:"typo-compact-xs-normal text-fg-subtle",children:i})]}),m&&h(js,{"aria-hidden":!0,"data-slot":"select-option-check",className:ae("size-4 shrink-0",d?"text-fg-disabled":"text-fg-default")})]})})};qv.displayName="Option";const Pk=he("",{variants:{size:{xs2:"typo-compact-xs-normal",sm:"typo-compact-xs2-normal",md:"typo-compact-sm2-normal",lg:"typo-compact-sm2-normal",xl:"typo-compact-lg-normal"}},defaultVariants:{size:"md"}}),A3=({className:t,nullText:e="no data",children:n,style:r,size:o})=>te("div",{"data-slot":"no-data",className:ae("text-fg-subtle flex flex-col items-center justify-center gap-1",t,Pk({size:o})),style:r,children:[h("span",{"data-slot":"no-data-icon",className:"inline-flex items-center justify-center",children:n}),h("div",{"data-slot":"no-data-text",children:e})]}),{useEffect:Mue,useRef:kue,useMemo:Rue,Children:Tue}=await q("react"),Nue=({className:t,children:e,size:n,noDataMsg:r=h(A3,{className:ae(Pk({size:n}),"flex h-full w-full items-center justify-center")}),...o})=>{const a=kue(null),i=Rue(()=>Tue.map(e,s=>s).length===0,[e]);return Mue(()=>{setTimeout(()=>{const s=document.querySelector('[data-slot="dialog-content"]');if(s&&o.open){const l=s.querySelector(".active");typeof s.scrollTo=="function"&&s.scrollTo(0,l?.offsetTop??0)}},50)},[o.open]),h(tc,{"data-slot":"select-modal-drop-box",className:ae("bg-overlay shadow-down-xs border-subtle max-h-[calc(var(--vh,1vh)*50)] w-min max-w-[90vw] min-w-80 overflow-y-auto p-1 outline-hidden",t),...o,children:h("div",{ref:a,"data-slot":"select-modal-drop-box-list",className:ae(i?"flex min-h-60 items-stretch":""),children:i?r:e})})},{Children:Pue,forwardRef:Aue,useCallback:N2,useEffect:yl,useImperativeHandle:Iue,useMemo:Xx,useRef:Zx}=await q("react"),Oue=4,Ak=Aue((t,e)=>{const{className:n,theme:r,size:o,children:a,label:i,inputEl:s,parentEl:l,maxHeight:u=200,search:d,searchText:f="",searchPlaceholder:m,noDataMsg:v=h(A3,{className:ae(yue({size:o}),"flex h-full w-full items-center justify-center")}),direction:g="bottom",showCloseBtn:w,whenScrollCloseDropBox:y,setOpen:_,handleSearchTextChange:S,handleKeyPress:x}=t,C=Zx(null),R=Zx(null),{isMobile:P}=s3(),O=g==="top"?"top-start":"bottom-start",{refs:$,floatingStyles:A,update:M}=u7({placement:O,strategy:"fixed",whileElementsMounted:l7,middleware:[d7(Oue),p7({fallbackPlacements:g==="top"?["bottom-start"]:["top-start"]}),f7({padding:8}),h7({apply({availableHeight:I,rects:D,elements:U}){const Y=Math.min(u,Math.max(120,I));Object.assign(U.floating.style,{minWidth:`${D.reference.width}px`,maxHeight:`${Y}px`})}})]}),L=window.innerHeight*.01;document.documentElement.style.setProperty("--vh",L+"px");const B=Xx(()=>Pue.map(a,I=>I).length===0,[a]),F=Xx(()=>P?i||w:!1,[P,i,w]),N=N2(I=>{const{value:D}=I.target;S(D)},[S]),V=N2(()=>{S("")},[S]),z=N2(()=>{s&&s.blur(),_(!1)},[s,_]);return yl(()=>{const I=R.current;if(I){const D=I.querySelector(".active");if(D&&typeof I.scrollTo=="function"){const U=D.getBoundingClientRect().top-I.getBoundingClientRect().top+I.scrollTop;I.scrollTo(0,U)}}},[l]),yl(()=>{if(R){const I=R.current,D=I.querySelector(".match");D&&([...I.children].map(U=>U.classList.remove("match")),D.classList.add("match"),I.scrollTo(0,D.offsetTop))}},[f,R]),yl(()=>{const I=()=>{window.innerWidth<800||(_(!1),s&&s.blur())};return window.removeEventListener("resize",I),window.addEventListener("resize",I),y&&(window.removeEventListener("scroll",I),window.addEventListener("scroll",I)),()=>{window.removeEventListener("scroll",I),window.removeEventListener("resize",I)}},[s,_,y]),yl(()=>(P&&D8(),()=>{P&&B8()}),[P]),Iue(e,()=>C.current),yl(()=>{$.setReference(l)},[l,$]),yl(()=>{const D=(Y=>{const oe=[];let Q=Y?.parentElement??null;for(;Q;){const re=window.getComputedStyle(Q),le=re.overflowY,ee=re.overflowX;(/(auto|scroll|overlay)/.test(le)||/(auto|scroll|overlay)/.test(ee))&&oe.push(Q),Q=Q.parentElement}return oe.push(window),oe})(l),U=()=>{M()};return D.forEach(Y=>Y.addEventListener("scroll",U,{passive:!0})),window.addEventListener("resize",U,{passive:!0}),()=>{D.forEach(Y=>Y.removeEventListener("scroll",U)),window.removeEventListener("resize",U)}},[l,M]),yl(()=>{let I=0;const D=()=>{M(),I=window.requestAnimationFrame(D)};return I=window.requestAnimationFrame(D),()=>{window.cancelAnimationFrame(I)}},[M]),te("div",{ref:I=>{C.current=I,$.setFloating(I)},"data-slot":"select-drop-box","data-pad-scope":"dropdown-box","data-theme":r,role:"button",tabIndex:-1,className:ae(bue({mode:B?"empty":"default"}),"!fixed !top-0 !left-0 flex flex-col",n),style:A,onKeyDown:x,children:[F&&te("div",{"data-slot":"select-drop-box-header",className:"border-subtle flex items-center gap-2 border-b px-2 py-2",children:[i&&h("label",{"data-slot":"select-drop-box-label",className:"text-fg-default flex-1 text-sm font-medium",children:i}),w&&h("button",{type:"button","data-slot":"select-drop-box-close",className:"text-fg-subtle ml-auto px-2 text-sm",onClick:z,children:h(df,{})})]}),d&&h("div",{"data-slot":"select-drop-box-search",className:"border-subtle border-b p-1",children:h(sw,{type:"text",size:o,className:"w-full",placeholder:m,value:f,prefixIcon:h(Z0,{className:"text-fg-subtle size-4"}),onChange:N,onKeyDown:x,handleReset:V})}),h("div",{ref:R,"data-slot":"select-drop-box-list",className:ae("min-h-0 overflow-y-auto",B?"flex flex-1 items-stretch":""),children:B?v:a})]})});Ak.displayName="SelectDropBox";const{Children:Lue,cloneElement:$ue,useCallback:qc,useEffect:f1,useMemo:p1,useRef:h1,useState:_l,forwardRef:Due,useImperativeHandle:Bue}=await q("react"),Uv=Due((t,e)=>{const{className:n="",size:r="md",children:o,name:a,value:i,error:s,search:l,mobileLabel:u,placeholder:d,disabled:f,readOnly:m,dropBoxClassName:v,maxDropBoxHeight:g=200,modalBoxClassName:w,selectArrow:y=h(K0,{}),keepDropDown:_,searchPlaceholder:S="Search",showCloseBtn:x,whenScrollCloseDropBox:C,enableModal:R=!xo.isDesktop,enableGamepadFocus:P=!0,noDataMsg:O,onClick:$,handleChange:A,...M}=t,L=h1(null),B=h1(null),F=h1(null),N=h1(Date.now()),[V,z]=_l(i),[I,D]=_l(""),[U,Y]=_l(""),[oe,Q]=_l(!1),[re,le]=_l(!1),[ee,ne]=_l(null),[ue,ve]=_l(null),we=p1(()=>{const qe=({value:ht})=>{f||(z(ht),A?.(ht,a),L.current.value=String(ht),M.onChange?.({target:L.current}),_||Q(!1))},_e=ht=>(ht??[]).flatMap(st=>{if(!st?.props)return[];if(st.type?.displayName==="Option"){let Ct;return st.props.text||(typeof st.props.label=="string"?Ct=st.props.label:typeof st.props.children=="string"?Ct=st.props.children:Ct=st.props.value.toString()),$ue(st,{...st.props,size:r,text:Ct.toLowerCase(),selectedValue:V,searchText:I,handleChange:qe,enableGamepadFocus:P})}return Array.isArray(st.props.children)?_e(st.props.children):[]}),at=Lue.map(o,ht=>ht);return _e(at)},[o,f,A,a,M,_,r,V,I,P]),ye=p1(()=>we.filter(qe=>qe.props.text.toLowerCase().includes(U.toLowerCase())),[we,U]),Le=p1(()=>we.find(qe=>{const _e=qe.props.value;return _e===V||_e===i}),[we,V,i]),Oe=p1(()=>{if(!Le){const at=we[0]?.props;return{text:d??at?.label??at?.children??"",isPlaceholder:!!d}}const{label:qe,children:_e}=Le.props;return{text:qe??_e??"",isPlaceholder:!1}},[Le,we,d]),Ne=qc(()=>{const qe=Date.now();if(qe-N.current<300){N.current=qe;return}if($)$();else{if(f||m)return;const at=B.current?.closest("[data-theme]")?.getAttribute("data-theme");ne(at),Q(ht=>!ht),N.current=qe}},[f,m,$]),me=qc(qe=>{D(qe),Y(qe)},[]),pe=qc(()=>{if(!oe){Q(!0);return}const qe=we.find(_e=>_e.props.text.includes(I.toLowerCase()));if(qe){const _e=qe.props;z(_e.value),A?.(_e.value,a),L.current.value=String(_e.value||""),M.onChange?.({target:L.current}),Q(!1),L.current.blur()}},[A,M,a,oe,we,I]),be=qc(qe=>{let _e;const at=we.findIndex(st=>{const Ct=st.props;return I?Ct.text===I:Ct.value===V});qe==="down"?_e=at+1>=we.length?we[0]:we[at+1]:_e=at<=0?we[we.length-1]:we[at-1];const ht=_e.props.text;D(ht)},[we,V,I]),Ue=qc(qe=>{qe.key==="Enter"&&!qe.nativeEvent.isComposing?pe():qe.key==="ArrowDown"?(be("down"),qe.preventDefault()):qe.key==="ArrowUp"&&(be("up"),qe.preventDefault())},[pe,be]),He=qc((qe,_e)=>{le(_e),_e?M.onFocus?.(qe):M.onBlur?.(qe)},[M]);return Nf(B,qe=>{!("button"in qe&&qe.button===2)&&!F.current?.contains(qe.target)&&Q(!1)},{offTouchEvent:!0}),f1(()=>{if(we.length&&!d&&!Le){const _e=we[0].props.value;z(L.current?.value??_e)}},[d,Le,we]),f1(()=>{typeof i<"u"&&z(i)},[i]),f1(()=>{oe||(D(""),Y(""))},[oe]),f1(()=>{if(!oe){ve(null);return}const qe=B.current?.closest('[data-slot="dialog-content"]');ve(qe instanceof HTMLElement?qe:null)},[oe]),Bue(e,()=>(L.current.handleClickSelectBox=Ne,{...L.current,get value(){return L.current.value},set value(qe){z(_e=>typeof _e=="string"&&_e===qe||typeof _e=="number"&&_e===Number(qe)||typeof _e=="boolean"&&String(_e)===String(qe)?_e:qe),L.current.value=qe}})),te(Mr,{children:[h("div",{ref:B,"data-slot":"select-box",className:ae(gue({size:r,variant:"default",focus:re,error:s,disabled:f,readOnly:m}),n),onClick:Ne,children:te("label",{"data-slot":"select-box-control",className:"relative flex w-full min-w-0 items-center",children:[h("div",{"data-slot":"select-box-value",className:vue({size:r,placeholder:Oe.isPlaceholder,disabled:f}),children:h("span",{children:Oe.text})}),h("input",{...M,ref:L,type:"text",value:V??L.current?.value??"",name:a,readOnly:!0,className:"sr-only","data-pad-focus":P?"true":"false",onFocus:qe=>He(qe,!0),onBlur:qe=>He(qe,!1),onKeyDown:Ue}),h("span",{"data-slot":"select-box-icon",className:ae(wue({size:r,disabled:f}),"transition-transform duration-200",oe&&"rotate-180"),children:y})]})}),R&&h(Nue,{className:w,type:"dialog",open:oe,size:r,hideCloseButton:!0,onOpenChange:Q,noDataMsg:O,children:ye}),!R&&oe&&h(Gl,{container:ue,children:h(Ak,{ref:F,className:v,size:r,label:u,inputEl:L.current,parentEl:B.current,theme:ee,maxHeight:g,setOpen:Q,search:l,searchText:I,searchPlaceholder:S,showCloseBtn:x,whenScrollCloseDropBox:C,noDataMsg:O,handleSearchTextChange:me,handleKeyPress:Ue,children:ye})})]})});Uv.displayName="RBSelectBox";const zue=he("inline-flex w-full items-start gap-2",{defaultVariants:{controlPlacement:"start",size:"default",tone:"default",type:"default"},compoundVariants:[{className:"outline-border-danger-stronger",tone:"invalid",type:"box"}],variants:{controlPlacement:{end:"justify-between",start:"justify-start"},size:{default:"",sm:"gap-1.5"},tone:{default:"",disabled:"",invalid:""},type:{box:"bg-raised outline-border-subtle p-2_5 rounded-md outline outline-1 outline-offset-[-1px]",default:""}}}),Fue=he("focus-visible:ring-border-stronger data-[state=checked]:bg-fill-brand data-[state=unchecked]:bg-fill-subtler relative inline-flex shrink-0 items-center rounded-full border border-transparent outline-hidden transition-colors focus-visible:ring-2 disabled:pointer-events-none",{variants:{size:{default:"h-5 w-9",sm:"h-4 w-7"},tone:{default:"",disabled:"data-[state=checked]:bg-fill-subtler data-[state=unchecked]:bg-fill-subtler",invalid:"border-danger-stronger"}},defaultVariants:{size:"default",tone:"default"}}),Vue=he(["absolute top-1/2 left-0 -translate-y-1/2","data-[state=unchecked]:translate-x-0.5","pointer-events-none rounded-full transition-transform"].join(" "),{variants:{size:{default:"size-4 data-[state=checked]:translate-x-4",sm:"size-3 data-[state=checked]:translate-x-3"},tone:{default:"data-[state=checked]:bg-fg-static-white bg-white",disabled:"bg-fg-disabled data-[state=checked]:!bg-fg-disabled",invalid:""}},defaultVariants:{size:"default",tone:"default"}}),jue=he("gap-0_5 inline-flex min-w-0 flex-1 flex-col"),Hue=he("text-fg-default",{defaultVariants:{size:"default",tone:"default"},variants:{size:{default:"typo-compact-sm-medium",sm:"typo-compact-xs-semibold"},tone:{default:"",disabled:"text-fg-disabled",invalid:"text-fg-danger"}}}),Wue=he("text-fg-default",{defaultVariants:{size:"default",tone:"default"},variants:{size:{default:"typo-compact-sm-normal",sm:"typo-compact-xs-normal"},tone:{default:"",disabled:"text-fg-disabled",invalid:""}}});function que({className:t,disabled:e=!1,invalid:n=!1,size:r="default",...o}){const a=e?"disabled":n?"invalid":"default";return h($X,{"data-slot":"switch","data-size":r,"data-tone":a,"data-pad-focus":"true",disabled:e,className:ae(Fue({tone:a,size:r}),t),...o,children:h(DX,{"data-slot":"switch-thumb",className:Vue({size:r,tone:a})})})}const Uue=Array.from({length:24},(t,e)=>String(e).padStart(2,"0")),Yue=Array.from({length:60},(t,e)=>String(e).padStart(2,"0")),Qx=t=>({hour:String(t?.getHours()??0).padStart(2,"0"),minute:String(t?.getMinutes()??0).padStart(2,"0")});function Ik({pickerType:t="range",selectedDate:e,onChange:n,labels:r}){const o=t==="range"?"min-w-[84px]":"min-w-[76px]",a=(s,l)=>{const u=e.from??e.to??new Date;let d=new Date(e.from??u),f=t==="range"?new Date(e.to??u):void 0;e.from||d.setHours(0,0,0,0),f&&!e.to&&f.setHours(0,0,0,0),(s==="from"?d:f)?.setHours(Number(l.hour),Number(l.minute),0,0),f&&d.toDateString()===f.toDateString()&&d>f&&(s==="from"?f=new Date(d):d=new Date(f)),n({...e,from:d,to:f})},i=[{label:r?.from??(t==="range"?"From":"Time"),time:Qx(e.from),onChange:s=>a("from",s)},...t==="range"?[{label:r?.to??"To",time:Qx(e.to),onChange:s=>a("to",s)}]:[]];return h("div",{"data-slot":"footer-time",className:"border-subtle flex w-full flex-col items-start border-t",children:te("div",{"data-slot":"footer-time-content",className:ae("w-full px-4 py-3",t==="range"?"inline-flex items-center justify-between gap-4":"flex flex-wrap items-start gap-2"),children:[te("label",{"data-slot":"footer-time-set-time",className:"inline-flex shrink-0 items-center gap-2",children:[h(que,{checked:e.timeEnabled,onCheckedChange:s=>n({...e,timeEnabled:s})}),h("span",{className:"typo-compact-sm-medium text-fg-default whitespace-nowrap",children:r?.setTime??"Set Time"})]}),h("div",{"data-slot":"footer-time-time-rows",className:ae("flex w-full items-center",t==="range"?"justify-end gap-4":"flex-col gap-1"),children:i.map(({label:s,time:l,onChange:u})=>te("div",{"data-slot":"footer-time-row",className:ae("inline-flex items-center",t==="range"?"shrink-0 gap-2":"w-full justify-between"),children:[h("div",{className:"typo-compact-sm-medium text-fg-subtler text-center whitespace-nowrap",children:s}),te("div",{className:"inline-flex items-center gap-2",children:[h(Uv,{"data-slot":"footer-time-hour-select",className:ae("w-fit",o),size:"sm",value:l.hour,disabled:!e.timeEnabled,readOnly:!e.timeEnabled,placeholder:l.hour,handleChange:d=>u({...l,hour:String(d??"00")}),children:Uue.map(d=>h(qv,{value:d,children:d},d))}),h(Uv,{"data-slot":"footer-time-minute-select",className:ae("w-fit",o),size:"sm",value:l.minute,disabled:!e.timeEnabled,readOnly:!e.timeEnabled,placeholder:l.minute,handleChange:d=>u({...l,minute:String(d??"00")}),children:Yue.map(d=>h(qv,{value:d,children:d},d))})]})]},s))})]})})}function Ok({label:t,onClick:e}){return h(Wr,{className:"light:bg-fill-subtlest",size:"xs",variant:"soft",onClick:e,children:t})}const Lk=he(["gap-1_5 inline-flex min-w-72 items-center overflow-hidden","outline outline-1 outline-offset-[-1px]","transition-colors"].join(" "),{variants:{size:{xs2:"h-8 rounded-md px-2",sm:"h-9 rounded-md px-2",md:"px-2_5 h-10 rounded-md",lg:"px-2_5 h-12 rounded-lg"},variant:{default:"bg-fill-control-surface outline-border-default"},focus:{true:"outline-border-input-focused",false:""},error:{true:"outline-border-danger-stronger",false:""},readOnly:{true:"bg-fill-control-surface-disabled outline-border-disabled",false:""},disabled:{true:"bg-fill-control-surface-disabled outline-border-disabled pointer-events-none cursor-not-allowed",false:""},interactive:{true:"cursor-pointer",false:"cursor-default"}},compoundVariants:[{variant:"default",focus:!1,error:!1,readOnly:!1,disabled:!1,className:"[&:hover]:bg-fill-control-surface-hovered [&:hover]:outline-border-default"},{focus:!0,className:"[&:hover]:bg-fill-control-surface-hovered [&:hover]:outline-border-input-focused"},{error:!0,className:"[&:hover]:bg-fill-control-surface [&:hover]:outline-border-danger-stronger"},{readOnly:!0,className:"[&:hover]:bg-fill-control-surface-disabled [&:hover]:outline-border-disabled"},{disabled:!0,className:"[&:hover]:bg-fill-control-surface-disabled [&:hover]:outline-border-disabled"}],defaultVariants:{size:"md",variant:"default",focus:!1,error:!1,readOnly:!1,disabled:!1,interactive:!0}}),$k=he("inline-flex shrink-0 items-center justify-center [&_svg]:block [&_svg]:shrink-0 [&_svg]:leading-none",{variants:{size:{xs2:"size-4",sm:"size-4",md:"size-5",lg:"size-5"},disabled:{true:"text-fg-disabled",false:"text-fg-subtlest"}},defaultVariants:{size:"md",disabled:!1}}),Dk=he("inline-flex min-w-0 flex-1 items-center gap-1 overflow-hidden whitespace-nowrap"),c0=he("truncate",{variants:{size:{xs2:"typo-compact-xs2-normal",sm:"typo-compact-xs2-medium",md:"typo-compact-sm2-medium",lg:"typo-compact-sm2-medium"},tone:{default:"text-fg-default",placeholder:"text-fg-subtler font-normal"},disabled:{true:"text-fg-disabled",false:""}},compoundVariants:[{tone:"placeholder",disabled:!0,className:"text-fg-disabled"}],defaultVariants:{size:"md",tone:"default",disabled:!1}}),Gue=he("",{variants:{size:{xs2:"typo-compact-xs2-normal",sm:"typo-compact-xs2-normal",md:"typo-compact-sm2-medium",lg:"typo-compact-sm2-medium"},disabled:{true:"text-fg-disabled",false:"text-fg-subtler"}},defaultVariants:{size:"md",disabled:!1}}),Bk=he(["bg-overlay relative z-[1]","shadow-up-lg inline-flex flex-col overflow-visible","outline-border-subtle rounded-md outline outline-1 outline-offset-[-2px]"].join(" "),{variants:{pickerType:{basic:"max-w-72",range:"min-w-140"}},defaultVariants:{pickerType:"basic"}}),Kue=he("py-1_5 inline-flex w-full items-start justify-between"),Xue=he("inline-flex flex-1 flex-col items-start justify-start p-3"),Zue=he("typo-compact-sm-medium inline-flex size-5 items-center justify-center text-center",{variants:{weekend:{true:"text-fg-danger",false:"text-fg-default"}},defaultVariants:{weekend:!1}}),xl=he(["typo-compact-sm-medium relative flex h-9 flex-1 items-center justify-center px-2 text-center","transition-colors"].join(" "),{variants:{state:{default:"bg-fill-transparent text-fg-default hover:bg-fill-transparent-hovered rounded-md",disabled:"bg-fill-transparent text-fg-disabled pointer-events-none !cursor-default rounded-md",single:"bg-fill-brand text-fg-default hover:!bg-fill-brand-hovered rounded-md font-semibold",rangeStart:"bg-fill-brand hover:!bg-fill-brand-hovered rounded-none! rounded-l-md! font-medium text-white",rangeMiddle:"bg-fill-subtlest text-fg-default rounded-none!",rangeEnd:"bg-fill-brand hover:!bg-fill-brand-hovered rounded-none! rounded-r-md! font-medium text-white"}},defaultVariants:{state:"default"}}),{useRef:Que}=await q("react");function Jue(t){const e=Que(null),n=wC(t.date,t.displayMonth,e);if(n.isHidden)return h("div",{role:"gridcell"});if(!n.isButton)return h("div",{...n.divProps});const r=n.activeModifiers.outside,o=n.buttonProps["aria-selected"]===!0||n.buttonProps["aria-selected"]==="true"||n.activeModifiers.selected||n.activeModifiers.range_start||n.activeModifiers.range_end||n.activeModifiers.range_middle,a=r||n.activeModifiers.range_start||n.activeModifiers.range_end||n.activeModifiers.range_middle,i=n.buttonProps.className?.replace(a?/\bday_selected\b/g:/$^/,"").replace(r||o?/\bday_range_start\b|\bday_range_end\b|\bday_range_middle\b|\bday_today\b/g:/$^/,"").replace(/\s+/g," ").trim();return h(nf,{ref:e,...n.buttonProps,className:i,"aria-selected":r?void 0:n.buttonProps["aria-selected"],disabled:n.buttonProps.disabled||r})}function zk({className:t,classNames:e,showOutsideDays:n=!0,...r}){return h(PX,{showOutsideDays:n,className:ae("cursor-default p-0",t),classNames:{months:ae(Kue(),r.mode==="range"?"gap-0":"justify-center"),month:Xue(),caption:"bg-fill-transparent relative inline-flex h-8 w-full items-center justify-center px-8",caption_label:"typo-compact-sm-semibold text-fg-default pointer-events-none",nav:"flex items-center gap-1",nav_button:ae(u8({variant:"transparent",size:"xs"}),"absolute top-1/2 size-5 -translate-y-1/2 p-0"),nav_button_previous:"left-0",nav_button_next:"right-0",table:"w-full border-collapse",head_row:"inline-flex h-10 w-full items-center justify-center",head_cell:ae("flex h-9 flex-1 items-center justify-center overflow-hidden px-2",Zue(),"[&:first-child]:text-fg-danger [&:last-child]:text-fg-danger"),row:"inline-flex h-10 w-full items-center justify-center",cell:ae("relative flex h-9 flex-1 items-center justify-center overflow-hidden p-0 text-center focus-within:relative focus-within:z-20",r.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md! [&:has(>.day-range-start)]:rounded-l-md! first:[&:has([aria-selected])]:rounded-l-md! last:[&:has([aria-selected])]:rounded-r-md!":"[&:has([aria-selected])]:rounded-md!"),day:ae(xl({state:"default"}),"h-9 w-full flex-none px-0"),day_range_start:ae(xl({state:"rangeStart"}),"h-9 w-full flex-none px-0 text-white!"),day_range_end:ae(xl({state:"rangeEnd"}),"h-9 w-full flex-none px-0 text-white!"),day_selected:ae(xl({state:"single"}),"h-9 w-full flex-none px-0"),day_today:"[&:not([aria-selected=true])]:!bg-fill-default [&:not([aria-selected=true])]:hover:!bg-fill-default [&:not([aria-selected=true])]:rounded-full! [&:not([aria-selected=true])]:!text-fg-inverse",day_outside:ae(xl({state:"disabled"}),"!bg-fill-transparent hover:!bg-fill-transparent aria-selected:text-fg-disabled"),day_disabled:ae(xl({state:"disabled"}),"h-9 w-full flex-none px-0"),day_range_middle:ae(xl({state:"rangeMiddle"}),"h-9 w-full flex-none rounded-none! px-0 hover:text-white!"),day_hidden:"invisible",...e},components:{Day:Jue,IconLeft:({className:o,...a})=>h(X0,{className:ae("size-4",o),...a}),IconRight:({className:o,...a})=>h(Su,{className:ae("size-4",o),...a})},...r})}const{useCallback:_d,useEffect:Jx,useId:ede,useRef:tde,useState:xd}=await q("react"),nde=[{key:"today",label:"Today"},{key:"month-ago",label:"1 month ago"},{key:"year-ago",label:"1 year ago"}],rde=()=>({hour:"00",minute:"00"}),Yv=t=>t?{hour:String(t.getHours()).padStart(2,"0"),minute:String(t.getMinutes()).padStart(2,"0")}:rde(),e6=t=>!!(t&&(t.getHours()!==0||t.getMinutes()!==0)),t6=(t,e)=>{const n=new Date(t);return n.setHours(Number(e.hour),Number(e.minute),0,0),n},n6=t=>Array.isArray(t)?t[0]:t,r6=(t,e,n)=>{if(!t)return e;const r=V8(t.getTime());if(!n)return r;const o=Yv(t);return`${r} ${o.hour}:${o.minute}`},W3e=({className:t,showType:e="popover",value:n,name:r,disabled:o,readOnly:a,size:i="md",variant:s="default",error:l=!1,showPresets:u=!0,showFooter:d=!0,placeholder:f,handleChange:m})=>{const v=tde(null),g=ede().replace(/:/g,""),[w,y]=xd(!1),[_,S]=xd(!1),[x,C]=xd(()=>{const I=n6(n);return{from:I,to:void 0,timeEnabled:e6(I)}}),[R,P]=xd(x),[O,$]=xd(x.from??new Date),A=typeof f=="string"?f:"Select date",M=()=>{o||y(!0)},L=I=>{I.key==="Enter"&&(v.current?.open(),y(!0))},B=_d(()=>{y(!1),v.current?.close()},[]),F=_d(()=>{if(R.from){const I=new Date(R.from);R.timeEnabled?I.setSeconds(0,0):I.setHours(0,0,0,0),C(R),m?.(I,void 0,r??"")}B()},[m,B,r,R]),N=_d(()=>{const I={from:void 0,to:void 0,timeEnabled:!1};C(I),P(I),m?.(void 0,void 0,r??"")},[m,r]),V=_d(I=>{const D=new Date,U=new Date(D);switch(I){case"today":break;case"month-ago":U.setMonth(D.getMonth()-1);break;case"year-ago":U.setFullYear(D.getFullYear()-1);break}P(Y=>({...Y,from:t6(U,Yv(Y.from))})),$(U)},[]),z=_d(()=>te(Ul,{className:ae(Bk({pickerType:"basic"})),children:[u&&h("div",{"data-slot":"date-input-presets",className:"border-subtle inline-flex w-full flex-wrap items-start justify-center gap-1 border-b px-3 py-4",children:nde.map(I=>h(Ok,{label:I.label,onClick:()=>V(I.key)},I.key))}),h(zk,{"data-slot":"date-input-calendar",month:O,selected:R.from,mode:"single",numberOfMonths:1,onMonthChange:$,onSelect:I=>{P(D=>({...D,from:I?t6(I,Yv(D.from)):void 0})),I&&$(I)}}),d&&h(Ik,{"data-slot":"date-input-footer-time",pickerType:"basic",selectedDate:R,onChange:P}),h(Nk,{"data-slot":"date-input-footer-button",onReset:N,onCancel:B,onConfirm:F})]}),[F,B,V,N,R,O,d,u]);return Jx(()=>{const I=n6(n),D={from:I,to:void 0,timeEnabled:e6(I)};C(D),P(D),$(I??new Date)},[n]),Jx(()=>{w||(P(x),$(x.from??new Date))},[w,x]),te(Mr,{children:[te(P3,{ref:v,disabled:o,anchorId:e==="popover"&&!o?`date-input-popover-${g}`:void 0,className:ae("inline-block"),ripple:{disabled:!0},popoverStyle:{top:"10px",left:"0"},popoverElement:h(z,{}),onClose:()=>y(!1),onClick:M,children:[te("div",{"data-slot":"date-input",className:ae(Lk({size:i,variant:s,focus:_||w,error:l,readOnly:a,disabled:o,interactive:!o&&!a}),t),children:[h("span",{"data-slot":"date-input-icon","aria-hidden":!0,className:$k({size:i,disabled:o}),children:h(rw,{})}),h("span",{"data-slot":"date-input-content",className:Dk(),children:h("input",{"data-slot":"date-input-input",type:"text",readOnly:!0,disabled:o,value:r6(x.from,"",x.timeEnabled),placeholder:r6(void 0,A,!1),onFocus:()=>S(!0),onBlur:()=>S(!1),onKeyDown:L,className:ae("w-full min-w-0",c0({size:i,tone:x.from?"default":"placeholder",disabled:o}))})})]}),e==="popover"&&h("div",{id:`date-input-popover-${g}`})]}),e==="modal"&&h(tc,{className:ae("w-auto border-none p-0"),open:w,hideCloseButton:!0,onOpenChange:y,children:h(z,{})})]})},o6=[{key:"last-24-hours",label:"Last 24 hours"},{key:"last-3-days",label:"Last 3 days"},{key:"last-week",label:"Last week"},{key:"last-month",label:"Last month"},{key:"last-3-month",label:"Last 3 month"}],ode=(t,e=new Date)=>{const n=new Date(e),r=new Date(e);switch(t){case"last-24-hours":n.setDate(e.getDate()-1);break;case"last-3-days":n.setDate(e.getDate()-3);break;case"last-week":n.setDate(e.getDate()-7);break;case"last-month":n.setMonth(e.getMonth()-1);break;case"last-3-month":n.setMonth(e.getMonth()-3);break}return{from:n,to:r}},{useCallback:Sd,useEffect:a6,useId:ade,useRef:ide,useState:m1}=await q("react"),sde=(t,e,n)=>{const r=[];return t&&r.push({before:t}),e&&r.push({after:e}),Array.isArray(n)?r.push(...n):n!==void 0&&r.push(n),r},Gv=()=>({hour:"00",minute:"00"}),kl=t=>t?{hour:String(t.getHours()).padStart(2,"0"),minute:String(t.getMinutes()).padStart(2,"0")}:Gv(),g1=t=>!!(t&&(t.getHours()!==0||t.getMinutes()!==0)),bs=(t,e)=>{const n=new Date(t);return n.setHours(Number(e.hour),Number(e.minute),0,0),n},lde=(t,e)=>!t||!e?!1:t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate(),i6=(t,e,n)=>{if(!t)return e;const r=V8(t.getTime());if(!n)return r;const o=kl(t);return`${r} ${o.hour}:${o.minute}`},q3e=({className:t,calendarPanelClassName:e,showType:n="popover",value:r,name:o,min:a,max:i,maxDays:s,placeholder:l,disabled:u,disabledDates:d,readOnly:f,size:m="md",variant:v="default",error:g=!1,showPresets:w=!0,showFooter:y=!0,handleChange:_,presets:S})=>{const x=ide(null),C=ade().replace(/:/g,""),[R,P]=m1(!1),[O]=m1(!1),[$,A]=m1({from:r?.[0],to:r?.[1],timeEnabled:g1(r?.[0])||g1(r?.[1])}),[M,L]=m1($),B=!!($?.from||$?.to),F=typeof l=="string"?l:l?.start||l?.end||"Select date",N=()=>{u||P(!0)},V=Sd(()=>{P(!1),x.current?.close()},[]),z=Sd(()=>{if(M.from){const Y=M.to??M.from,oe=bs(M.from,kl(M.from)),Q=bs(Y,kl(Y)),re=M.timeEnabled?oe:bs(oe,Gv()),le=M.timeEnabled?Q:bs(Q,Gv());A({from:oe,to:Q,timeEnabled:M.timeEnabled}),_?.(re,le,o??"")}V()},[_,V,o,M]),I=Sd(()=>{const Y={from:void 0,to:void 0,timeEnabled:!1};A(Y),L(Y),_?.(void 0,void 0,o??"")},[_,o]),D=Sd(Y=>{const{from:oe,to:Q}=ode(Y);L(re=>({...re,from:bs(oe,kl(re.from)),to:bs(Q,kl(re.to))}))},[]),U=Sd(()=>te(Ul,{className:ae(Bk({pickerType:"range"}),e),children:[w&&h("div",{"data-slot":"data-input-presets",className:"border-subtle inline-flex w-full flex-wrap items-start justify-center gap-1 border-b px-3 py-4",children:(S?o6.filter(Y=>S.includes(Y.key)):o6).map(Y=>h(Ok,{label:Y.label,onClick:()=>D(Y.key)},Y.key))}),h(zk,{"data-slot":"data-input-calendar",selected:M,mode:"range",numberOfMonths:2,max:s,disabled:sde(a,i,d),initialFocus:!0,defaultMonth:M?.from,onSelect:Y=>{L(oe=>{const Q=Y?.from?bs(Y.from,kl(oe.from)):void 0;let re=Y?.to;!re&&oe.timeEnabled&&oe.to&&(re=Y?.from);let le=re?bs(re,kl(oe.to)):void 0;return Q&&le&&lde(Q,le)&&Q>le&&(le=new Date(Q)),{...oe,from:Q,to:le}})}}),y&&h(Ik,{"data-slot":"date-input-footer-time",pickerType:"range",selectedDate:M,onChange:L}),h(Nk,{"data-slot":"date-input-footer-button",onReset:I,onCancel:V,onConfirm:z})]}),[e,D,V,z,I,d,i,s,a,S,M,y,w]);return a6(()=>{const Y={from:r?.[0],to:r?.[1]},oe={...Y,timeEnabled:g1(Y.from)||g1(Y.to)};A(oe),L(oe)},[r]),a6(()=>{R||L($)},[R,$]),te(Mr,{children:[te(P3,{ref:x,disabled:u,anchorId:n==="popover"&&!u?`date-input-popover-${C}`:void 0,className:"inline-block",ripple:{disabled:!0},popoverStyle:{top:"10px",left:"0"},popoverElement:h(U,{}),onClose:()=>P(!1),onClick:N,children:[te("div",{"data-slot":"date-input",className:ae(Lk({size:m,variant:v,focus:O||R,error:g,readOnly:f,disabled:u,interactive:!u&&!f}),t),children:[h("span",{"data-slot":"date-input-icon","aria-hidden":!0,className:$k({size:m,disabled:u}),children:h(rw,{})}),h("span",{"data-slot":"date-input-content",className:Dk(),children:B?te(Mr,{children:[h("span",{"data-slot":"date-input-value",className:c0({size:m,tone:$?.from?"default":"placeholder",disabled:u}),children:i6($?.from,F,$.timeEnabled)}),h("span",{"data-slot":"date-input-separator",className:Gue({size:m,disabled:u}),children:"~"}),h("span",{"data-slot":"date-input-value",className:c0({size:m,tone:$?.to?"default":"placeholder",disabled:u}),children:i6($?.to,F,$.timeEnabled)})]}):h("span",{"data-slot":"date-input-value",className:c0({size:m,tone:"placeholder",disabled:u}),children:F})})]}),n==="popover"&&h("div",{id:`date-input-popover-${C}`})]}),n==="modal"&&h(tc,{className:ae("w-auto max-w-fit border-none p-0"),open:R,hideCloseButton:!0,onOpenChange:P,children:h(U,{})})]})},cde=he("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 bg-dim fixed inset-0 z-50"),ude=he("bg-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 shadow-down-md fixed top-1/2 left-1/2 z-50 inline-flex max-w-[95vw] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-lg outline-hidden transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{size:{sm:"max-h-[25rem] min-h-40 w-[22.5rem]",md:"max-h-[35rem] w-[30rem]",lg:"max-h-[35rem] w-[34.375rem]"}},defaultVariants:{size:"lg"}}),dde=he("gap-0_5 relative flex flex-col items-start self-stretch px-4 pt-4 pr-16 pb-2"),fde=he("flex items-center justify-end gap-4 self-stretch p-4"),pde=he("text-fg-default typo-title-01-bold"),hde=he("text-fg-subtle typo-compact-sm-normal"),mde=he("text-fg-subtle hover:bg-fill-transparent-hovered hover:text-fg-default focus-visible:outline-border-stronger absolute top-3 right-3 inline-flex size-7 items-center justify-center rounded-[3px] outline-hidden transition-colors focus-visible:outline focus-visible:outline-1"),{forwardRef:Vh,useEffect:gde,useId:vde,useRef:wde}=await q("react"),q0=new Map,bde=300;function yde(t,e){q0.set(t,e)}function s6(t){q0.delete(t)}function _de(){const t=Array.from(q0.values());if(q0.clear(),t.length===0){Rl.resetModal();return}t.forEach(e=>e()),setTimeout(()=>{const e=document.querySelectorAll('[data-slot="dialog-content"][data-state="closed"]'),n=Array.from(e).flatMap(r=>r.getAnimations().map(o=>o.finished));if(n.length===0){Rl.resetModal();return}Promise.allSettled(n).then(()=>{Rl.resetModal()})},bde)}function xde({...t}){const e=vde(),n=wde(t.onOpenChange);return n.current=t.onOpenChange,gde(()=>(t.open?yde(e,()=>n.current?.(!1)):s6(e),()=>s6(e)),[e,t.open]),h(bf,{"data-slot":"dialog",...t})}function U3e({...t}){return h(Vw,{"data-slot":"dialog-trigger",...t})}function Sde({...t}){return h(yf,{"data-slot":"dialog-portal",...t})}function Y3e({...t}){return h(Zl,{"data-slot":"dialog-close",...t})}const Fk=Vh(({closeAllLabel:t},e)=>h("button",{ref:e,type:"button","aria-label":"dialog-all-close",className:"text-fg-default typo-compact-sm-semibold border-fg-subtler bg-fg-inverse pointer-events-auto fixed top-4 right-4 z-50 h-8 w-20 cursor-pointer rounded-md border p-1",onClick:_de,children:h("span",{children:t})}));Fk.displayName="RBDialogCloseAll";const Vk=Vh(({className:t,...e},n)=>h(_f,{ref:n,"data-slot":"dialog-overlay",className:ae(cde(),t),...e}));Vk.displayName="RBDialogOverlay";function Cde({className:t,children:e,container:n,showCloseButton:r=!0,size:o="lg",closeAllLabel:a,...i}){const s=n??(typeof document<"u"?document.querySelector(".modal-container")??void 0:void 0);return te(Sde,{container:s,children:[h(Vk,{onContextMenu:l=>l.preventDefault()}),h(Fk,{closeAllLabel:a}),te(xf,{"data-slot":"dialog-content","data-size":o,className:ae(ude({size:o}),t),...i,children:[e,r&&te(Zl,{"data-slot":"dialog-close",className:mde(),tabIndex:-1,children:[h(df,{className:"size-4"}),h("span",{className:"sr-only",children:"Close"})]})]})]})}function Ede({className:t,...e}){return h("div",{"data-slot":"dialog-header",className:ae(dde(),t),...e})}function Mde({className:t,...e}){return h("div",{"data-slot":"dialog-footer",className:ae(fde(),t),...e})}const u0=Vh(({className:t,...e},n)=>h(Sf,{ref:n,"data-slot":"dialog-title",className:ae(pde(),t),...e}));u0.displayName="RBDialogTitle";const d0=Vh(({className:t,...e},n)=>h(Cf,{ref:n,"data-slot":"dialog-description",className:ae(hde(),t),...e}));d0.displayName="RBDialogDescription";const kde=he("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 bg-dim fixed inset-0 z-50"),Rde=he("bg-raised border-subtle data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex h-auto flex-col overflow-hidden transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{defaultVariants:{side:"bottom"},variants:{side:{top:"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 w-full rounded-b-xl border-b",bottom:"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 w-full rounded-t-xl border-t",left:"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 max-w-96 rounded-r-xl border-r",right:"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 max-w-96 rounded-l-xl border-l"}}}),Tde=he("bg-fg-default h-1 w-28 rounded-full"),Nde=he("flex items-center justify-center self-stretch pt-4"),Pde=he("gap-0_5 flex flex-col p-4"),Ade=he("mt-auto flex flex-col items-stretch gap-2 self-stretch p-4"),Ide=he("text-fg-default typo-title-01-medium"),Ode=he("text-fg-subtle typo-compact-sm-normal"),Lde=he("flex flex-col gap-3 self-stretch overflow-hidden px-4 pt-4"),$de=he("text-fg-default hover:text-fg-default-hovered focus-visible:outline-border-stronger absolute top-4 right-4 inline-flex size-4 items-center justify-center rounded-xs outline-hidden transition-colors focus-visible:outline focus-visible:outline-1");function Dde({side:t,...e}){return h(qr.Root,{"data-slot":"drawer",...e,direction:t??e.direction})}function G3e({...t}){return h(qr.Trigger,{"data-slot":"drawer-trigger",...t})}function K3e({...t}){return h(qr.Close,{"data-slot":"drawer-close",...t})}function Bde({...t}){return h(qr.Portal,{"data-slot":"drawer-portal",...t})}function zde({className:t,...e}){return h(qr.Overlay,{"data-slot":"drawer-overlay",className:ae(kde(),t),...e})}function Fde({className:t,children:e,side:n="bottom",showHandle:r,showCloseButton:o=!1,...a}){const i=r??n==="bottom";return te(Bde,{children:[h(zde,{}),te(qr.Content,{"data-slot":"drawer-content","data-position":n,className:ae(Rde({side:n}),t),...a,children:[n==="bottom"&&i&&h("div",{className:Nde(),children:h("div",{className:Tde()})}),e,o&&te(qr.Close,{className:$de(),children:[h(df,{}),h("span",{className:"sr-only",children:"Close"})]})]})]})}function Vde({className:t,...e}){return h("div",{"data-slot":"drawer-header",className:ae(Pde(),t),...e})}function X3e({className:t,...e}){return h("div",{"data-slot":"drawer-body",className:ae(Lde(),t),...e})}function jde({className:t,...e}){return h("div",{"data-slot":"drawer-footer",className:ae(Ade(),t),...e})}function Hde({className:t,...e}){return h(qr.Title,{"data-slot":"drawer-title",className:ae(Ide(),t),...e})}function Wde({className:t,...e}){return h(qr.Description,{"data-slot":"drawer-description",className:ae(Ode(),t),...e})}const qde=he("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 bg-dim fixed inset-0 z-50"),Ude=he("bg-raised outline-border-subtle data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 p-4 outline outline-1 outline-offset-[-1px] transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{defaultVariants:{side:"right"},variants:{side:{bottom:"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom shadow-up-lg inset-x-0 bottom-0 h-[520px] max-h-[80vh]",left:"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full max-w-[90vw] shadow-[0px_4px_6px_-4px_rgba(0,0,0,0.10)] shadow-lg",right:"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right shadow-up-lg inset-y-0 right-0 h-full max-w-[90vw]",top:"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-[520px] max-h-[80vh] shadow-[0px_4px_6px_-4px_rgba(0,0,0,0.10)] shadow-lg"}}}),Yde=he("gap-0_5 flex flex-col"),Gde=he("mt-auto flex flex-col items-stretch gap-2 overflow-hidden"),Kde=he("text-fg-default typo-title-01-medium"),Xde=he("text-fg-subtle typo-compact-sm-normal"),Zde=he("text-fg-default hover:text-fg-default-hovered focus-visible:outline-border-stronger absolute top-4 right-4 inline-flex size-4 items-center justify-center rounded-xs outline-hidden transition-colors focus-visible:outline focus-visible:outline-1");function Qde({...t}){return h(bf,{"data-slot":"sheet",...t})}function Z3e({...t}){return h(Vw,{"data-slot":"sheet-trigger",...t})}function Q3e({...t}){return h(Zl,{"data-slot":"sheet-close",...t})}function Jde({...t}){return h(yf,{"data-slot":"sheet-portal",...t})}function efe({className:t,...e}){return h(_f,{"data-slot":"sheet-overlay",className:ae(qde(),t),...e})}function tfe({className:t,children:e,side:n="right",showCloseButton:r=!0,...o}){return te(Jde,{children:[h(efe,{}),te(xf,{"data-slot":"sheet-content","data-position":n,className:ae(Ude({side:n}),t),...o,children:[e,r&&te(Zl,{className:Zde(),children:[h(df,{}),h("span",{className:"sr-only",children:"Close"})]})]})]})}function nfe({className:t,...e}){return h("div",{"data-slot":"sheet-header",className:ae(Yde(),t),...e})}function rfe({className:t,...e}){return h("div",{"data-slot":"sheet-footer",className:ae(Gde(),t),...e})}function ofe({className:t,...e}){return h(Sf,{"data-slot":"sheet-title",className:ae(Kde(),t),...e})}function afe({className:t,...e}){return h(Cf,{"data-slot":"sheet-description",className:ae(Xde(),t),...e})}const ife=({className:t,type:e,open:n,onOpenChange:r,header:o,footer:a,children:i,hideCloseButton:s,handleInteractOutside:l})=>{const u=e.split("-")[0];return h(Qde,{open:n,onOpenChange:r,children:te(tfe,{className:ae(t,{"[&>button:last-child]:hidden":s}),side:u,onInteractOutside:l,children:[!!o&&te(nfe,{children:[!!o.title&&h(ofe,{children:o.title}),!!o.description&&h(afe,{children:o.description})]}),i,!!a&&h(rfe,{children:a})]})})},jh=({className:t,open:e,type:n="dialog",dialogContainer:r,children:o,enableDimClose:a=!0,header:i,hideCloseButton:s,footer:l,gamePadType:u="modal",onOpenChange:d,disableAutoFocus:f=!1,closeAllButtonLabel:m="Close All"})=>{const v=g=>{a||g.preventDefault()};return n==="drawer"?h(Dde,{open:e,onOpenChange:d,children:te(Fde,{className:ae(t),onInteractOutside:v,children:[!!i&&te(Vde,{children:[!!i.title&&h(Hde,{children:i.title}),!!i.description&&h(Wde,{children:i.description})]}),o,!!l&&h(jde,{children:l})]})}):n==="dialog"?h(xde,{open:e,onOpenChange:d,children:te(Cde,{...f&&{onOpenAutoFocus:g=>g.preventDefault()},className:ae(t),container:r,"data-pad-scope":u,showCloseButton:!s,closeAllLabel:m,onInteractOutside:v,children:[i?te(Ede,{children:[i.title?h(u0,{children:i.title}):h(Il,{children:h(u0,{})}),i.description?h(d0,{children:i.description}):h(Il,{children:h(d0,{})})]}):te(Il,{children:[h(u0,{}),h(d0,{})]}),o,!!l&&h(Mde,{children:l})]})}):h(ife,{className:t,type:n,header:i,footer:l,open:e,enableDimClose:a,hideCloseButton:s,onOpenChange:d,handleInteractOutside:v,children:o})},sfe=({className:t,containerId:e,open:n,onOpenChange:r,title:o,content:a,contentClassName:i,buttonText:s="확인",snapshotCnt:l,resolve:u,onConfirm:d})=>{const f=()=>{u(!0),d?.()};return h(jh,{"data-slot":"alert-modal",className:ae("w-fit","min-w-[25rem]","max-w-[95vw]",t),open:n,onOpenChange:r,type:"dialog",dialogContainer:e?document.getElementById(e):void 0,snapshotCnt:l,hideCloseButton:!0,enableDimClose:!1,gamePadType:"dialog",header:o?{title:o}:void 0,footer:h(Wr,{variant:"brand",onClick:f,children:s}),children:h("div",{"data-slot":"alert-modal-content",className:ae("text-body-xs2-normal text-fg-default px-4 py-3 whitespace-pre-wrap",i),children:a})})},{useState:lfe}=await q("react"),cfe=({className:t,open:e,onOpenChange:n,title:r,description:o,content:a,contentClassName:i,buttonText:s={yes:"Confirm",no:"Cancel"},buttonClassName:l,buttonWrapperClassName:u,snapshotCnt:d,containerId:f,onConfirm:m,onCancel:v,resolve:g})=>{const[w,y]=lfe(!1),_=async()=>{y(!0);try{await m?.(),g(!0)}finally{y(!1)}},S=()=>{v?.(),g(!1)};return h(jh,{"data-slot":"confirm-modal",className:ae("w-fit","min-w-[25rem]","max-w-[95vw]",t),open:e,onOpenChange:n,type:"dialog",snapshotCnt:d,dialogContainer:f?document.getElementById(f):void 0,hideCloseButton:!0,enableDimClose:!1,gamePadType:"dialog",header:r||o?{title:r,description:o}:void 0,footer:te(Yo,{"data-slot":"confirm-modal-button-wrapper",className:ae("btn-wrapper",u),alignItems:"center",gap:8,children:[h(Wr,{variant:"outlined",className:ae(l?.no),disabled:w,onClick:S,children:s.no}),h(Wr,{variant:"brand",className:ae(l?.yes),autoFocus:!0,loading:w,onClick:_,children:s.yes})]}),children:h("div",{"data-slot":"confirm-modal-content",className:ae("text-body-xs2-normal text-fg-default px-4 py-3 whitespace-pre-wrap",i),children:a})})},ufe={default:"text-fg-subtle",error:"text-fg-danger",success:"text-fg-success"};function dfe({className:t,helperText:e,helperTone:n="default"}){return e?h("div",{"data-slot":"text-helper",className:ae("pt-1_5 w-full",t),children:h("div",{"data-slot":"text-helper-message",className:ae("typo-compact-xs-normal",ufe[n]),children:e})}):null}function ffe({className:t,label:e,description:n,required:r=!1,children:o}){return!e&&!n&&!o?null:te("div",{"data-slot":"text-label",className:ae("gap-0_5 flex w-full flex-col",t),children:[e&&te("div",{"data-slot":"text-label-heading",className:"gap-0_5 typo-compact-xs-semibold inline-flex items-start",children:[h("span",{"data-slot":"text-label-text",className:"text-fg-default",children:e}),r&&h("span",{"data-slot":"text-label-required",className:"text-fg-information",children:"*"})]}),n&&h("div",{"data-slot":"text-label-description",className:"text-fg-subtle typo-compact-xs-normal",children:n}),o&&h("div",{className:"pt-1","data-slot":"text-label-children",children:o})]})}function pfe({className:t="",labelClassName:e="",helperClassName:n="",label:r,description:o,required:a=!1,helperText:i,helperTone:s="default",children:l}){return h("div",{"data-slot":"text-field",className:ae("w-full",t),children:te(ffe,{className:e,label:r,description:o,required:a,children:[h("div",{"data-slot":"text-field-control",children:l}),h(dfe,{className:n,helperText:i,helperTone:s})]})})}const{cloneElement:hfe,useState:l6}=await q("react"),mfe=({className:t,open:e,onOpenChange:n,title:r,content:o,contentClassName:a,placeholder:i,inputType:s="text",inputElement:l,label:u,description:d,required:f=!1,helperText:m,helperTone:v="default",autoFocus:g=!1,value:w,buttonText:y={yes:"Confirm",no:"Cancel"},buttonClassName:_,buttonWrapperClassName:S,containerId:x,snapshotCnt:C,resolve:R,close:P})=>{const[O,$]=l6(w||""),[A,M]=l6(!1),L=s==="password"&&A?"text":s;return h(jh,{"data-slot":"prompt-modal",className:ae("w-fit","min-w-[25rem]","max-w-[95vw]",t),open:e,onOpenChange:n,type:"dialog",snapshotCnt:C,dialogContainer:x?document.getElementById(x):void 0,hideCloseButton:!0,enableDimClose:!1,gamePadType:"dialog",header:r?{title:r}:void 0,footer:te(Yo,{"data-slot":"prompt-modal-button-wrapper",className:ae("btn-wrapper",S),alignItems:"center",gap:8,children:[h(Wr,{variant:"outlined",className:ae(_?.no),onClick:()=>R(null),children:y.no}),h(Wr,{variant:"brand",className:ae(_?.yes),onClick:()=>R(O),children:y.yes})]}),children:te(Ul,{children:[o&&h("div",{"data-slot":"prompt-modal-content",className:ae("text-body-xs2-normal text-fg-default px-4 py-3 whitespace-pre-wrap",a),children:o}),l?h("div",{"data-slot":"prompt-modal-input",className:"w-full px-4 py-2",children:hfe(l,{value:O,handleChange:$,tabIndex:g?0:-1,placeholder:i,type:s})}):h("div",{"data-slot":"prompt-modal-input",className:"w-full px-4 py-2",children:h(pfe,{label:u,description:d,required:f,helperText:m,helperTone:v,children:te("div",{className:"relative w-full",children:[h(sw,{className:ae("w-full",s==="password"&&"pr-10"),type:L,tabIndex:g?0:-1,placeholder:i,value:O,handleChange:$,handleEnter:()=>R(O)}),s==="password"&&h("button",{type:"button",className:"text-fg-subtle hover:text-fg-default absolute top-1/2 right-4 -translate-y-1/2",onClick:()=>M(B=>!B),children:A?h(k8,{className:"size-4"}):h(R8,{className:"size-4"})})]})})})]})})},gfe=he("gap-2_5 inline-flex items-center justify-center pt-4"),P2=he("gap-0_5 flex items-center justify-start"),v1=he("py-0_5 inline-flex size-6 shrink-0 items-center justify-center rounded-sm transition-colors duration-200 ease-out",{variants:{disabled:{true:"bg-fill-transparent text-fg-disabled pointer-events-none",false:"bg-fill-transparent text-fg-default hover:bg-fill-transparent-hovered"}},defaultVariants:{disabled:!1}}),w1=he("inline-flex size-3.5 items-center justify-center"),vfe=he("inline-flex size-6 shrink-0 flex-col items-center justify-center rounded-md transition-colors duration-200 ease-out",{variants:{selected:{true:"text-fg-default outline-border-default outline outline-1 outline-offset-[-1px]",false:"text-fg-subtler hover:bg-fill-subtler-hovered"}},defaultVariants:{selected:!1}}),wfe=he("inline-flex h-5 w-7 items-center justify-center text-center text-xs leading-4 font-semibold"),{useMemo:Cd}=await q("react"),J3e=({className:t,currPage:e=1,listSize:n=20,pageSize:r=5,totalCount:o=0,handlePageChange:a})=>{const i=Cd(()=>{const f=o/n;return f%1===0?f:Math.floor(f)+1},[n,o]),s=Cd(()=>{const f=Math.ceil(i/r);return Array.from({length:f},(m,v)=>Array.from({length:r},(g,w)=>v*r+w+1))},[r,i]),l=Cd(()=>{const f=(s.find(m=>m.includes(e))??[]).filter(m=>m<=i);return f.length===0?[1]:f},[e,s,i]),u=Cd(()=>{const f=l[0]??1;return Math.max(1,f-1)},[l]),d=Cd(()=>{const f=l[l.length-1]??i;return Math.min(i,f+1)},[l,i]);return te("div",{"data-slot":"pagination",className:ae(gfe(),t),children:[te("div",{"data-slot":"pagination-prev-group",className:P2(),children:[h("button",{"data-slot":"pagination-prev-double",className:v1({disabled:e===1}),type:"button",disabled:e===1,onClick:()=>a(u),children:h("span",{"data-slot":"pagination-nav-icon",className:w1(),children:h(_8,{})})}),h("button",{"data-slot":"pagination-prev",className:v1({disabled:e===1}),type:"button",disabled:e===1,onClick:()=>a(e-1),children:h("span",{"data-slot":"pagination-nav-icon",className:w1(),children:h(X0,{})})})]}),h("div",{"data-slot":"pagination-pages",className:P2(),children:l.map(f=>h("button",{"data-slot":"pagination-page",className:vfe({selected:e===f}),type:"button",onClick:()=>a(f),children:h("span",{"data-slot":"pagination-page-text",className:wfe(),children:f})},f))}),te("div",{"data-slot":"pagination-next-group",className:P2(),children:[h("button",{"data-slot":"pagination-next",className:v1({disabled:!(e<i)}),type:"button",disabled:!(e<i),onClick:()=>a(e+1),children:h("span",{"data-slot":"pagination-nav-icon",className:w1(),children:h(Su,{})})}),h("button",{"data-slot":"pagination-next-double",className:v1({disabled:e===i||i===0}),type:"button",disabled:e===i||i===0,onClick:()=>a(d),children:h("span",{"data-slot":"pagination-nav-icon",className:w1(),children:h(x8,{})})})]})]})},bfe=he(["inline-flex w-48 items-center gap-1 overflow-hidden","bg-fill-control-surface outline outline-1 outline-offset-[-1px]","transition-colors"].join(" "),{variants:{size:{xs2:"h-8 rounded-md px-0.5",sm:"h-9 rounded-md px-0.5",md:"h-10 rounded-md px-0.5",lg:"h-12 rounded-lg px-1"},variant:{default:"outline-border-default",success:"outline-border-success-stronger"},focus:{true:"outline-border-input-focused",false:""},error:{true:"outline-border-danger-stronger",false:""},readOnly:{true:"bg-fill-control-surface-disabled outline-border-disabled",false:""},disabled:{true:"bg-fill-control-surface-disabled outline-border-disabled pointer-events-none cursor-not-allowed",false:""},inputDisabled:{true:"bg-fill-control-surface-disabled outline-border-disabled",false:""}},compoundVariants:[{variant:"default",focus:!1,error:!1,readOnly:!1,disabled:!1,inputDisabled:!1,className:"[&:hover]:bg-fill-control-surface-hovered [&:hover]:outline-border-default"},{variant:"success",focus:!1,error:!1,readOnly:!1,disabled:!1,inputDisabled:!1,className:"[&:hover]:bg-fill-control-surface [&:hover]:outline-border-success-stronger"},{focus:!0,className:"[&:hover]:bg-fill-control-surface [&:hover]:outline-border-input-focused"},{error:!0,className:"[&:hover]:bg-fill-control-surface [&:hover]:outline-border-danger-stronger"},{readOnly:!0,className:"[&:hover]:bg-fill-control-surface-disabled [&:hover]:outline-border-disabled"},{disabled:!0,className:"[&:hover]:bg-fill-control-surface-disabled [&:hover]:outline-border-disabled"},{inputDisabled:!0,className:"[&:hover]:bg-fill-control-surface-disabled [&:hover]:outline-border-disabled"}],defaultVariants:{size:"md",variant:"default",focus:!1,error:!1,readOnly:!1,disabled:!1,inputDisabled:!1}}),c6=he("bg-fill-transparent touch-action-none inline-flex shrink-0 items-center justify-center rounded-sm transition-[background-color] [&_*]:pointer-events-none",{variants:{size:{xs2:"size-7",sm:"size-8",md:"size-9",lg:"size-10"},disabledLike:{true:"cursor-not-allowed",false:"cursor-pointer"},pressed:{true:"scale-90",false:""}},defaultVariants:{size:"md",disabledLike:!1,pressed:!1}}),u6=he("",{variants:{size:{xs2:"size-3.5",sm:"size-3.5",md:"size-4",lg:"size-4"},disabledLike:{true:"text-fg-disabled",false:"text-fg-default"},pressed:{true:"scale-90",false:""}},compoundVariants:[{disabledLike:!1,pressed:!0,className:"transform transition-transform"}],defaultVariants:{size:"md",disabledLike:!1,pressed:!1}}),yfe=he(["w-full border-none bg-transparent text-center ring-0 outline-none","placeholder:text-fg-subtler appearance-none [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none"].join(" "),{variants:{size:{xs2:"typo-compact-xs2-semibold",sm:"typo-compact-sm-normal",md:"typo-compact-sm2-normal",lg:"typo-compact-sm2-normal"},variant:{default:"text-fg-default",success:"text-fg-default"},focus:{true:"placeholder:text-fg-subtler",false:""},error:{true:"placeholder:text-fg-subtler",false:""},readOnly:{true:"placeholder:text-fg-default",false:""},disabled:{true:"text-fg-disabled placeholder:text-fg-disabled",false:""},inputDisabled:{true:"text-fg-disabled placeholder:text-fg-disabled",false:""}},defaultVariants:{size:"md",variant:"default"}}),{forwardRef:_fe,useCallback:eo,useEffect:Uc,useImperativeHandle:xfe,useMemo:Sfe,useRef:Ua,useState:A2}=await q("react"),Cfe=t=>{const e=t?.target?.value;return kn.replace(e,/^0+[\d,]/gm,o=>kn.last(o)).replace(/[^\d.-]/g,"")},Efe=_fe(({className:t="",type:e,size:n,variant:r,step:o=1,error:a,isDirect:i=!0,increaseStep:s,decreaseStep:l,maxLength:u,increaseElement:d,decreaseElement:f,detectDobleClick:m,useSetButton:v,notAllowedEmptyValue:g,inputDisabled:w,disableAutoAccel:y,disableLongPress:_,fixedDigit:S,initialLongPressDelay:x=300,enableArrowKeys:C,enableWheel:R,handleChange:P,onButtonPointerDown:O,onButtonPointerUp:$,handleEnter:A,...M},L)=>{const{value:B,readOnly:F,disabled:N,min:V,max:z="9999999999999",digit:I=18,onFocus:D,onBlur:U}=M,Y=Ua(null),oe=Ua(!1),Q=Ua(!1),re=Ua({up:0,down:0}),le=Ua(""),ee=Ua(null),ne=Ua(null),ue=Ua(0),ve=Ua(0),we=Ua(x),[ye,Le]=A2(B??""),[Oe,Ne]=A2(!1),[me,pe]=A2(null),be=Sfe(()=>N||new Ut(V??0).cmp(new Ut(z))>0,[N,z,V]),Ue=eo((Ce,Ye,wt)=>{if(Ye===0)return Ce;const un=wt==="up"?new Ut(Ce||0).add(new Ut(ee.current?.increase??Ye??1)).toDP(I,Ut.ROUND_DOWN):new Ut(Ce||0).sub(new Ut(ee.current?.decrease??Ye??1)).toDP(I,Ut.ROUND_DOWN);return S!==void 0?un.toFixed(S):un.toString()},[I,S]),He=eo(Ce=>typeof Ce>"u"||!Ce||be?"":Ce.endsWith(".")?Ce:typeof V<"u"&&new Ut(Number(Ce)).lt(new Ut(V))?String(V):typeof z<"u"&&new Ut(Dl(Ce||"")).gt(new Ut(z))?String(z):Ce,[V,z,be]),qe=eo(Ce=>be?"":Ce.endsWith(".")?Ce:He(Ce),[be,He]),_e=eo(Ce=>{const Ye=Y.current;Ye&&(Ye.value=Bi(Ce??"").join("."),delete Ye.dataset.tempNumberKeypadValue,Ye.dispatchEvent(new Event("input",{bubbles:!0})))},[]),at=eo(({type:Ce,e:Ye})=>{if(!Y.current||be)return;const{value:wt,name:un}=Y.current,on=Cfe({target:{value:wt}}),Lt=I?new RegExp(`^-?[0-9]*[.]{0,1}[0-9]{0,${I}}$`,"gm"):/^-?\d{0,18}$/;on.match(Lt)&&(typeof u<"u"&&(on||"").split(".")[0].replace(/[^0-9]/g,"").length>Number(u)||(Y.current.value=Bi(on??"").join("."),le.current!==on&&(P?.(on,un,{type:Ce}),Ye&&M.onChange?.(Ye),le.current=on),Le(on)))},[be,I,u,P,M]),ht=eo((Ce,Ye)=>{Y.current&&(Ne(Ye),Ye?D?.(Ce):(Y.current.value=qe(Y.current.value),g&&!Ce.target.value&&(Y.current.value=M.value),at({}),U?.(Ce)))},[D,qe,g,M.value,at,U]),st=eo(Ce=>{if(be||F){oe.current=!1,window.clearTimeout(ue.current);return}le.current=Ue(le.current??"0",ne.current,Ce),le.current=He(le.current??"0"),Le(String(le.current)),_e(le.current),P?.(le.current,M.name,{type:Ce}),window.clearTimeout(ve.current),ve.current=window.setTimeout(()=>{oe.current&&(st(Ce),we.current>50&&!y&&(we.current-=we.current/6))},we.current)},[Ue,He,be,P,M.name,y,F,_e]),Ct=eo(Ce=>{const{value:Ye="",name:wt}=Ce.target;g&&!Ye&&(Ce.target.value=M.value),A?.(Ye,wt),Ce.target.blur()},[A,M.value,g]),cn=eo(Ce=>{if(Ce.key==="Enter"&&!Ce.nativeEvent.isComposing)Ct(Ce);else if(C&&(Ce.key==="ArrowUp"||Ce.key==="ArrowDown")&&(Ce.preventDefault(),!be&&!F)){const Ye=Ce.key==="ArrowUp"?"up":"down";le.current=Ue(le.current??"0",ne.current,Ye),le.current=He(le.current??"0"),Le(String(le.current)),_e(le.current),P?.(le.current,M.name,{type:Ye})}M.onKeyDown?.(Ce)},[M,Ct,C,be,F,Ue,He,P,_e]);Uc(()=>{const Ce=Y.current;if(!Ce||!R)return;const Ye=wt=>{if(be||F)return;wt.preventDefault();const un=wt.deltaY<0?"up":"down";le.current=Ue(le.current??"0",ne.current,un),le.current=He(le.current??"0"),Le(String(le.current)),_e(le.current),P?.(le.current,M.name,{type:un})};return Ce.addEventListener("wheel",Ye,{passive:!1}),()=>Ce.removeEventListener("wheel",Ye)},[R,be,F,Ue,He,P,M.name,_e]);const Sn=eo((Ce,Ye)=>{if(!(Date.now()-re.current[Ce]<500&&m)){if(be||F){oe.current=!1,window.clearTimeout(ue.current);return}re.current[Ce]=Date.now(),pe(Ce),st(Ce),O?.(Ce,Ye),_||(ue.current=window.setTimeout(()=>{oe.current=!0,st(Ce)},we.current)),Q.current=!0}},[m,be,F,st,_,O]),Jn=eo(Ce=>{Ce&&Ce.currentTarget.hasPointerCapture?.(Ce.pointerId)&&Ce.currentTarget.releasePointerCapture?.(Ce.pointerId)},[]);eo((Ce,Ye=20)=>{const wt=Ce.currentTarget.getBoundingClientRect();return Ce.clientX<wt.left-Ye||Ce.clientX>wt.right+Ye||Ce.clientY<wt.top-Ye||Ce.clientY>wt.bottom+Ye},[]);const Gt=eo((Ce,Ye)=>{if(be||F||!Q.current){oe.current=!1,window.clearTimeout(ue.current),Q.current&&Ce&&$?.(Ce,Ye);return}oe.current=!1,Q.current=!1,pe(null),window.clearTimeout(ue.current),we.current=x,Ce&&$?.(Ce,Ye),Ce&&at({type:Ce})},[be,at,F,$,x]),Tn=eo(()=>{oe.current=!1,pe(null),window.clearTimeout(ue.current),window.clearTimeout(ve.current),we.current=x},[x]);Uc(()=>{le.current=B??""},[B]),Uc(()=>{typeof B<"u"&&Le(B)},[B]),Uc(()=>{ne.current=o},[o]),Uc(()=>{ee.current={increase:s,decrease:l}},[s,l]),xfe(L,()=>Y.current),Uc(()=>{const Ce=Ye=>{Ye.type==="contextmenu"&&(oe.current||Q.current)&&Ye.preventDefault()};return window.addEventListener("contextmenu",Ce),window.addEventListener("pointerup",Ce),window.addEventListener("pointercancel",Ce),()=>{window.removeEventListener("contextmenu",Ce),window.removeEventListener("pointerup",Ce),window.removeEventListener("pointercancel",Ce)}},[Tn]);const Hn=f??h(T8,{"aria-hidden":!0,className:u6({size:n,disabledLike:be||V===ye,pressed:me==="down"})}),Tt=d??h(N8,{"aria-hidden":!0,className:u6({size:n,disabledLike:be||z===ye,pressed:me==="up"})});return te(Yo,{"data-slot":"side-number-input",className:ae(bfe({size:n,variant:r,focus:Oe,readOnly:F,disabled:N,error:a,inputDisabled:w}),t),alignItems:"center",justifyContent:"space-between",onContextMenu:Ce=>{Ce.target instanceof HTMLInputElement||Ce.preventDefault()},children:[h("button",{type:"button","data-slot":"side-number-input-decrease","data-type":"down",className:c6({size:n,disabledLike:be||z===ye,pressed:me==="down"}),disabled:be||z===ye,onPointerDown:Ce=>{Ce.preventDefault(),Ce.currentTarget.setPointerCapture?.(Ce.pointerId),Sn("down",Ce)},onPointerMove:Ce=>{Q.current&&Ce.currentTarget.hasPointerCapture?.(Ce.pointerId)},onPointerUp:Ce=>{Gt("down",Ce),Jn(Ce)},onPointerCancel:Ce=>{Gt("down",Ce),Jn(Ce)},onLostPointerCapture:Ce=>{Gt("down",Ce)},onContextMenu:Ce=>{Ce.preventDefault()},children:Hn}),h("input",{...M,type:"text",inputMode:e==="nx-number"?"none":void 0,"data-slot":"side-number-input-field",className:yfe({size:n,variant:r,focus:Oe,readOnly:F,disabled:N,error:a,inputDisabled:w}),ref:Y,value:Bi(ye??"").join(".")??"",readOnly:!i,disabled:N||w,onChange:Ce=>at({e:Ce}),onFocus:Ce=>ht(Ce,!0),onBlur:Ce=>ht(Ce,!1),onKeyDown:cn,onContextMenu:Ce=>{Ce.preventDefault()}}),h("button",{type:"button","data-slot":"side-number-input-increase","data-type":"up",className:c6({size:n,disabledLike:be||V===ye,pressed:me==="up"}),disabled:be||V===ye,onPointerDown:Ce=>{Ce.preventDefault(),Ce.currentTarget.setPointerCapture?.(Ce.pointerId),Sn("up",Ce)},onPointerMove:Ce=>{Q.current&&Ce.currentTarget.hasPointerCapture?.(Ce.pointerId)},onPointerUp:Ce=>{Gt("up",Ce),Jn(Ce)},onPointerCancel:Ce=>{Gt("up",Ce),Jn(Ce)},onLostPointerCapture:Ce=>{Gt("up",Ce)},onContextMenu:Ce=>{Ce.preventDefault()},children:Tt}),e==="nx-number"&&h(aw,{inputRef:Y,maxLength:Number(u),useSet:v,onSet:A})]})});Efe.displayName="SideNumberInput";const Mfe=he("group inline-flex items-center select-none",{variants:{size:{sm:"gap-1",md:"gap-1_5"},checked:{true:"",false:""},disabled:{true:"pointer-events-none cursor-not-allowed",false:"cursor-pointer"},readOnly:{true:"pointer-events-none cursor-not-allowed",false:""}},defaultVariants:{size:"sm",checked:!1,disabled:!1,readOnly:!1}}),kfe=he("relative inline-flex shrink-0 items-center justify-center rounded-full border transition-[background-color,border-color] duration-200 ease-out",{variants:{size:{sm:"size-4",md:"size-5"},checked:{true:"",false:""},disabled:{true:"",false:""}},compoundVariants:[{checked:!1,disabled:!1,className:"border-subtle bg-fill-control-surface"},{checked:!0,disabled:!1,className:"bg-fill-brand border-transparent"},{checked:!1,disabled:!0,className:"bg-fill-disabled border-disabled"},{checked:!0,disabled:!0,className:"bg-fill-disabled border-none"}],defaultVariants:{size:"sm",checked:!1,disabled:!1}}),Rfe=he("rounded-full transition-[opacity,transform,background-color] duration-200 ease-out",{variants:{size:{sm:"size-1.5",md:"size-2"},checked:{true:"",false:""},disabled:{true:"",false:""}},compoundVariants:[{checked:!0,disabled:!1,className:"bg-fg-static-white scale-100 opacity-100"},{checked:!1,disabled:!1,className:"bg-fg-static-white scale-0 opacity-0"},{checked:!0,disabled:!0,className:"bg-fg-disabled scale-100"},{checked:!1,disabled:!0,className:"bg-fg-disabled scale-0 opacity-0"}],defaultVariants:{size:"sm",checked:!1,disabled:!1}}),Tfe=he("",{variants:{size:{sm:"typo-compact-xs2-normal",md:"typo-compact-sm2-normal"},disabled:{true:"text-fg-disabled",false:"text-fg-default"}},defaultVariants:{size:"sm",disabled:!1}}),Nfe=he(["relative inline-flex","[&_[data-slot='radio-check']]:hidden","[&_[data-slot='radio-text']]:inline-flex","[&_[data-slot='radio-text']]:items-center","[&_[data-slot='radio-text']]:justify-center","[&_[data-slot='radio-text']]:gap-1","[&_[data-slot='radio-text']]:cursor-pointer","[&_[data-slot='radio-text']]:rounded-md","[&_[data-slot='radio-text']]:bg-fill-transparent","[&_[data-slot='radio-text']]:text-fg-default","[&_[data-slot='radio-text']]:outline","[&_[data-slot='radio-text']]:outline-1","[&_[data-slot='radio-text']]:outline-offset-[-1px]","[&_[data-slot='radio-text']]:outline-border-default","[&_[data-slot='radio-text']]:transition-colors","[&_[data-slot='radio-text']]:hover:bg-fill-transparent-hovered","[&_.peer:checked~[data-slot='radio-text']]:bg-fill-subtler","[&_.peer:checked~[data-slot='radio-text']]:text-fg-default","[&_.peer:checked~[data-slot='radio-text']]:outline-transparent","[&_.peer:checked~[data-slot='radio-text']]:hover:bg-fill-subtler-hovered","[&_.peer:disabled~[data-slot='radio-text']]:bg-fill-transparent","[&_.peer:disabled~[data-slot='radio-text']]:cursor-not-allowed","[&_.peer:disabled~[data-slot='radio-text']]:text-fg-disabled","[&_.peer:disabled~[data-slot='radio-text']]:outline-border-disabled","[&_.peer:disabled~[data-slot='radio-text']]:hover:bg-fill-transparent","[&_.peer:checked:disabled~[data-slot='radio-text']]:bg-fill-disabled","[&_.peer:checked:disabled~[data-slot='radio-text']]:text-fg-disabled","[&_.peer:checked:disabled~[data-slot='radio-text']]:outline-transparent","[&_.peer[readonly]~[data-slot='radio-text']]:bg-fill-transparent","[&_.peer[readonly]~[data-slot='radio-text']]:cursor-not-allowed","[&_.peer[readonly]~[data-slot='radio-text']]:text-fg-default","[&_.peer[readonly]~[data-slot='radio-text']]:outline-border-subtler","[&_.peer[readonly]~[data-slot='radio-text']]:hover:bg-fill-transparent","[&_.peer:checked[readonly]~[data-slot='radio-text']]:bg-fill-disabled","[&_.peer:checked[readonly]~[data-slot='radio-text']]:text-fg-default","[&_.peer:checked[readonly]~[data-slot='radio-text']]:outline-transparent"].join(" "),{variants:{size:{sm:["[&_[data-slot='radio-text']]:min-h-7","[&_[data-slot='radio-text']]:px-2","[&_[data-slot='radio-text']]:typo-compact-xs-semibold"].join(" "),md:["[&_[data-slot='radio-text']]:min-h-8","[&_[data-slot='radio-text']]:px-3","[&_[data-slot='radio-text']]:typo-compact-xs-semibold"].join(" ")},disabled:{true:"pointer-events-none cursor-not-allowed",false:""}},defaultVariants:{size:"sm",disabled:!1}}),{forwardRef:Pfe,useCallback:Afe,useImperativeHandle:Ife,useMemo:Ofe,useRef:Lfe}=await q("react"),jk=Pfe(({className:t="",children:e,size:n,disabled:r,readOnly:o,checkValue:a,value:i,handleChange:s,...l},u)=>{const d=Lfe(null),f=Ofe(()=>{if(!(typeof i>"u"))return i===a},[i,a]),m=Afe(v=>{const{name:g,value:w}=v.target;(typeof a=="number"?Number(w)===a:w===a)&&s?.(a,g),l.onChange?.(v)},[s,l,a]);return Ife(u,()=>d.current),te("label",{"data-slot":"radio-root",className:ae(Mfe({size:n,checked:f,disabled:r,readOnly:o}),t),children:[h("input",{ref:d,...l,type:"radio",value:a,checked:f,readOnly:o,disabled:r,onChange:m,className:"peer sr-only"}),h("span",{"data-slot":"radio-check",className:kfe({size:n,checked:f,disabled:r}),children:h("i",{"data-slot":"radio-icon",className:Rfe({size:n,checked:f,disabled:r})})}),e&&h("span",{"data-slot":"radio-text",className:Tfe({size:n,disabled:r}),children:e})]})});jk.displayName="RBRadioBox";const{forwardRef:$fe}=await q("react"),Dfe=$fe(({className:t="",children:e,rippleOption:n={disabled:!0},size:r="sm",disabled:o,...a},i)=>h(Rr,{...n,children:h(jk,{ref:i,size:r,disabled:o,className:ae(Nfe({size:r,disabled:o}),t),...a,children:e})}));Dfe.displayName="RBRadioButton";const Hk=he("block",{variants:{swipeContent:{true:"swipe-content",false:""}},defaultVariants:{swipeContent:!1}}),Wk=he("relative isolate",{variants:{hasScrollMask:{true:"overflow-hidden",false:""}},defaultVariants:{hasScrollMask:!1}}),qk=he("relative overflow-x-auto overflow-y-visible whitespace-nowrap [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"),Bfe=he("border-subtle inline-flex items-end border-b",{variants:{size:{sm:"gap-3",md:"gap-3_5",lg:"gap-4"}},defaultVariants:{size:"md"}}),zfe=he("px-0_5 relative -mb-px inline-flex shrink-0 items-center justify-center border-b text-center transition-colors",{variants:{size:{sm:"typo-compact-sm-semibold h-8",md:"typo-compact-sm2-semibold h-10",lg:"typo-compact-lg-semibold h-12"},selected:{true:"",false:"border-transparent"},disabled:{true:"pointer-events-none cursor-not-allowed",false:"cursor-pointer"},slider:{true:"",false:""}},compoundVariants:[{selected:!0,disabled:!1,slider:!1,className:"text-fg-default z-[1] border-transparent"},{selected:!1,disabled:!1,className:"text-fg-subtler"},{selected:!0,disabled:!0,slider:!1,className:"text-fg-disabled z-[1] border-transparent"},{selected:!1,disabled:!0,className:"text-fg-disabled"},{selected:!0,disabled:!1,slider:!0,className:"text-fg-default z-[1] border-transparent"},{selected:!0,disabled:!0,slider:!0,className:"text-fg-disabled z-[1] border-transparent"}],defaultVariants:{size:"md",selected:!1,disabled:!1,slider:!1}}),Ffe=he("bg-fill-default pointer-events-none absolute bottom-[-1px] left-0 z-[1] h-[1px] transition-[transform,width] duration-200",{variants:{visible:{true:"",false:"opacity-0"}},defaultVariants:{visible:!0}}),f0=he("max-w-full",{variants:{hasContent:{true:"pt-2",false:""},swipeContent:{true:"[&_.swiper-wrapper]:!transition-property-[transform]",false:""}},defaultVariants:{hasContent:!0,swipeContent:!1}}),cu=he("",{variants:{active:{true:"block",false:"hidden"},disabled:{true:"",false:""},swipeContent:{true:"block",false:""}},defaultVariants:{active:!1,disabled:!1,swipeContent:!1}}),ebe=he("inline-flex items-center overflow-x-auto whitespace-nowrap [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",{variants:{size:{sm:"gap-1",md:"gap-1_5",lg:"gap-1_5"}},defaultVariants:{size:"md"}}),Vfe=he("inline-flex shrink-0 items-center justify-center rounded-full transition-colors",{variants:{size:{sm:"px-2_5 typo-compact-sm-semibold h-7",md:"typo-compact-sm2-semibold h-8 px-3",lg:"typo-compact-lg-semibold h-10 px-4"},selected:{true:"",false:"bg-fill-transparent outline-border-subtle outline outline-1 outline-offset-[-1px]"},disabled:{true:"cursor-not-allowed",false:"cursor-pointer"}},compoundVariants:[{selected:!0,disabled:!1,className:"bg-fill-default text-fg-inverse"},{selected:!1,disabled:!1,className:"text-fg-subtler"},{selected:!0,disabled:!0,className:"bg-fill-disabled text-fg-disabled"},{selected:!1,disabled:!0,className:"text-fg-disabled outline-border-disabled"}],defaultVariants:{size:"md",selected:!1,disabled:!1}}),jfe=he("items-center border-b-0",{variants:{size:{sm:"gap-1",md:"gap-1_5",lg:"gap-1_5"}},defaultVariants:{size:"md"}}),Hfe=he("items-center border-b-0",{variants:{size:{xs:"gap-1",xs2:"gap-1"}},defaultVariants:{size:"xs2"}}),Wfe=he("relative inline-flex shrink-0 items-center justify-center rounded-md transition-colors",{variants:{size:{xs:"typo-compact-xs-semibold h-7 px-2",xs2:"typo-compact-xs-semibold h-8 px-3"},selected:{true:"outline outline-1 outline-offset-[-1px] outline-transparent",false:"bg-fill-transparent outline-border-default outline outline-1 outline-offset-[-1px]"},disabled:{true:"cursor-not-allowed",false:"cursor-pointer"}},compoundVariants:[{selected:!0,disabled:!1,className:"bg-fill-subtler text-fg-default"},{selected:!1,disabled:!1,className:"text-fg-default"},{selected:!0,disabled:!0,className:"bg-fill-disabled text-fg-disabled"},{selected:!1,disabled:!0,className:"text-fg-disabled outline-border-disabled"}],defaultVariants:{size:"xs2",selected:!1,disabled:!1}}),{forwardRef:qfe}=await q("react"),Uk=qfe(({className:t="",size:e="md",slider:n=!1,useDefaultStyle:r=!0,selected:o=!1,disabled:a=!1,role:i,children:s,onClick:l,"aria-selected":u},d)=>h("button",{ref:d,type:"button",disabled:a,role:i,"aria-selected":u,className:ae(r&&zfe({size:e,selected:o,disabled:a,slider:n}),t),onClick:l,children:h("span",{className:"text-center",children:s})}));Uk.displayName="RBTabItem";const{useCallback:I2,useEffect:Ed,useMemo:b1,useRef:Md,useState:Ufe}=await q("react"),Yfe=Oh,Gfe=Ih,Kfe=({className:t="",size:e,tabItems:n,activeKey:r,name:o,slider:a,swipeContent:i,disabled:s,rippleOption:l={disabled:!0},tabNavScrollRef:u,destroyInactiveTabPanel:d=!0,tabBtnClassName:f,style:m,onClick:v,handleChange:g})=>{const w=Md(null),y=Md(null),_=Md([]),S=Md(null),x=Md(!1),C=b1(()=>n?.filter(F=>!F?.isHide)??[],[n]),[R,P]=Ufe(r??C[0]?.key),O=b1(()=>{const F=C.findIndex(N=>N.key===R);return F===-1?0:F},[R,C]),$=b1(()=>{if(!C.length)return null;if(i){const F=()=>{const{swipeDirection:N}=S.current,{key:V,disabled:z}=C[S.current.activeIndex],{key:I}=C[S.current.activeIndex-1]??C[0],{key:D}=C[S.current.activeIndex+1]??C[S.current.activeIndex];z?(P(N==="next"?D:I),g?.(N==="next"?D:I,o)):(P(V),g?.(V,o))};return h(Gfe,{className:ae(f0({swipeContent:!0})),autoHeight:!0,threshold:1,slidesPerView:1,enabled:!s,onSwiper:N=>{S.current=N},onSlideChange:F,children:C.map(N=>h(Yfe,{className:ae(cu({disabled:s||N.disabled})),style:{visibility:N.disabled?"hidden":"visible"},children:N.children},N.key))})}else return d?h("div",{className:ae(f0()),children:h("div",{className:ae(cu({active:!0,disabled:s||C[O]?.disabled})),children:C[O]?.children})},`contents-${C[O]?.key}`):h("div",{className:ae(f0()),children:C.map((F,N)=>h("div",{className:ae(cu({active:O===N,disabled:s||F.disabled})),children:F.children},`contents-${F.key}`))})},[O,d,s,g,o,i,C]),A=I2(()=>{const F=u?.current??y.current,N=_.current.find(V=>V&&V.classList.contains("active"))??_.current[0];if(N){const{offsetLeft:V,clientWidth:z}=N,I=V-F.offsetWidth/2+z/2;F.scrollTo({top:0,left:I,behavior:"smooth"})}},[u]),M=I2(()=>{const F=w.current;if(!a||!F)return;const N=_.current.find(V=>V&&V.classList.contains("active"))??_.current[0];if(N){const{offsetLeft:V,clientWidth:z}=N;F.style.transform=`translateX(${V}px)`,F.style.width=`${z}px`,x.current?F.style.transition="":(F.style.transition="none",x.current=!0)}else F.style.transform="translateX(0px)",F.style.width="0px"},[a]),L=I2((F,N)=>{typeof r>"u"&&P(F),g?.(F,o),v?.(F,N)},[r,o,g,v]),B=b1(()=>{if(!(typeof window>"u"))return new ResizeObserver(()=>{M()})},[M]);return Ed(()=>{typeof r<"u"&&r!==R&&P(r)},[r,R]),Ed(()=>{M(),A(),S.current&&S.current.slideTo(O,250)},[O,M,A]),Ed(()=>{const F=()=>{M(),A()};return window.addEventListener("resize",F),()=>{window.removeEventListener("resize",F)}},[M,A]),Ed(()=>{i&&S.current&&(s?S.current.disable():S.current.enable())},[s,i]),Ed(()=>{if(B){const F=_.current;return F.forEach(N=>{N&&B.observe(N)}),()=>{F.forEach(N=>{N&&B.unobserve(N)})}}},[B]),te("div",{"data-slot":"tab-wrapper",className:ae(Hk({swipeContent:!!i}),t),style:m,children:[h("div",{"data-slot":"tab-nav",className:ae(Wk()),children:h("div",{"data-slot":"tab-nav-viewport",ref:y,className:ae(qk()),children:te("div",{"data-slot":"tab-nav-list",className:ae("relative flex w-full",Bfe({size:e})),children:[C.map((F,N)=>h(Rr,{...l,disabled:l.disabled||F.disabled||s,children:h(Uk,{ref:V=>{V&&(_.current[N]=V)},"data-slot":"tab-nav-item",className:ae(R===F.key&&"active",f),slider:!!a,selected:R===F.key,disabled:!!(s||F.disabled),role:"tab","aria-selected":R===F.key,onClick:V=>L(F.key,V),children:F.label})},F.key)),h("span",{ref:w,"data-slot":"tab-slider",className:ae(Ffe({visible:!!a})),style:{width:0}})]})})}),h("div",{"data-slot":"tab-content",children:$})]})};Kfe.displayName="RBTab";const{forwardRef:Xfe}=await q("react"),Yk=Xfe(({className:t="",size:e="md",selected:n=!1,disabled:r=!1,role:o,children:a,onClick:i,"aria-selected":s},l)=>h("button",{ref:l,type:"button",disabled:r,role:o,"aria-selected":s,className:ae(Vfe({size:e,selected:n,disabled:r}),t),onClick:i,children:a}));Yk.displayName="RBChipItem";const{useCallback:O2,useEffect:kd,useMemo:Rd,useRef:Td,useState:Zfe}=await q("react"),Qfe=Oh,Jfe=Ih,epe=({className:t="",size:e,tabItems:n,activeKey:r,name:o,slider:a,swipeContent:i,disabled:s,rippleOption:l={disabled:!0},tabNavScrollRef:u,destroyInactiveTabPanel:d=!0,tabBtnClassName:f,style:m,onClick:v,handleChange:g})=>{const w=Td(null),y=Td(null),_=Td([]),S=Td(null),x=Td(!1),C=Rd(()=>n?.filter(N=>!N?.isHide)??[],[n]),[R,P]=Zfe(r??C[0]?.key),O=Rd(()=>{const N=C.findIndex(V=>V.key===R);return N===-1?0:N},[R,C]),$=Rd(()=>C[O]?.children!=null,[O,C]),A=Rd(()=>C.length?i?h(Jfe,{autoHeight:!0,threshold:1,slidesPerView:1,enabled:!s,onSwiper:V=>{S.current=V},onSlideChange:()=>{const{swipeDirection:V}=S.current,{key:z,disabled:I}=C[S.current.activeIndex],{key:D}=C[S.current.activeIndex-1]??C[0],{key:U}=C[S.current.activeIndex+1]??C[S.current.activeIndex];I?(P(V==="next"?U:D),g?.(V==="next"?U:D,o)):(P(z),g?.(z,o))},children:C.map(V=>h(Qfe,{className:ae(cu({active:!0,swipeContent:!0,disabled:s||V.disabled})),style:{visibility:V.disabled?"hidden":"visible"},children:V.children},V.key))}):d?h("div",{children:h("div",{className:ae(cu(),{active:!0,disabled:s||C[O]?.disabled}),children:C[O]?.children})},`contents-${C[O]?.key}`):h("div",{children:C.map((N,V)=>h("div",{className:ae(cu(),{active:O===V,disabled:s||N.disabled}),children:N.children},`contents-${N.key}`))}):null,[O,d,s,g,o,i,C]),M=O2(()=>{const N=u?.current??y.current,V=_.current.find(z=>z&&z.classList.contains("active"))??_.current[0];if(V){const{offsetLeft:z,clientWidth:I}=V,D=z-N.offsetWidth/2+I/2;N.scrollTo({top:0,left:D,behavior:"smooth"})}},[u]),L=O2(()=>{const N=w.current;if(!a||!N)return;const V=_.current.find(z=>z&&z.classList.contains("active"))??_.current[0];if(V){const{offsetLeft:z,clientWidth:I}=V;N.style.transform=`translateX(${z}px)`,N.style.width=`${I}px`,x.current?N.style.transition="":(N.style.transition="none",x.current=!0)}else N.style.transform="translateX(0px)",N.style.width="0px"},[a]),B=O2((N,V)=>{typeof r>"u"&&P(N),g?.(N,o),v?.(N,V)},[r,o,g,v]),F=Rd(()=>{if(!(typeof window>"u"))return new ResizeObserver(()=>{L()})},[L]);return kd(()=>{typeof r<"u"&&r!==R&&P(r)},[r,R]),kd(()=>{L(),M(),S.current&&S.current.slideTo(O,250)},[O,L,M]),kd(()=>{const N=()=>{L(),M()};return window.addEventListener("resize",N),()=>{window.removeEventListener("resize",N)}},[L,M]),kd(()=>{i&&S.current&&(s?S.current.disable():S.current.enable())},[s,i]),kd(()=>{if(F){const N=_.current;return N.forEach(V=>{V&&F.observe(V)}),()=>{N.forEach(V=>{V&&F.unobserve(V)})}}},[F]),te("div",{"data-slot":"chip-tab-wrapper",className:ae(Hk({swipeContent:!!i}),t),style:m,children:[h("div",{"data-slot":"chip-tab-nav",className:ae(Wk()),children:h("div",{"data-slot":"chip-tab-nav-viewport",ref:y,className:ae(qk()),children:h("div",{"data-slot":"chip-tab-nav-list",className:ae("relative flex",jfe({size:e})),children:C.map((N,V)=>h(Rr,{...l,disabled:l.disabled||N.disabled||s,children:h(Yk,{ref:z=>{z&&(_.current[V]=z)},"data-slot":"chip-tab-nav-item",className:ae(R===N.key&&"active",f),size:e,selected:R===N.key,disabled:!!(s||N.disabled),role:"tab","aria-selected":R===N.key,onClick:z=>B(N.key,z),children:N.label})},N.key))})})}),h("div",{"data-slot":"chip-tab-content",className:ae(f0({hasContent:$})),children:A})]})};epe.displayName="RBTab";const{forwardRef:tpe}=await q("react"),Gk=tpe(({className:t="",size:e="xs2",selected:n=!1,disabled:r=!1,role:o,children:a,onClick:i,"aria-selected":s,...l},u)=>h("button",{ref:u,type:"button",disabled:r,role:o,"aria-selected":s,"data-pad-focus":"true",className:ae(Wfe({size:e,selected:n,disabled:r}),t),onClick:i,...l,children:a}));Gk.displayName="RBChipsBoxItem";const{useCallback:y1,useEffect:_1,useMemo:L2,useRef:$2,useState:Yc}=await q("react"),npe=({className:t="",size:e="xs2",tabItems:n,activeKey:r,name:o,disabled:a=!1,destroyInactiveTabPanel:i=!0,rippleOption:s={disabled:!0},tabBtnClassName:l="",style:u,enableOverflowExpand:d=!0,showBottomBorder:f=!0,rightIconButtonProps:m,leftSlot:v,handleChange:g,onClick:w})=>{const[y,_]=Yc(!1),[S,x]=Yc(!1),[C,R]=Yc(0),P=$2(null),O=$2([]),$=$2(null),A=L2(()=>n?.filter(ne=>!ne?.isHide)??[],[n]),[M,L]=Yc(r??A[0]?.key),[B,F]=Yc(!1),[N,V]=Yc(!1),z=y1(()=>{const ne=P.current;if(!ne){x(!1),R(0);return}const ue=ne.scrollWidth>ne.clientWidth+1;x(ue),R(ue?ne.clientWidth/2:0)},[]),I=L2(()=>{const ne=A.findIndex(ue=>ue.key===M);return ne===-1?0:ne},[M,A]),D=y1(()=>{if(z(),y){F(!1),V(!1);return}const ne=P.current;if(!ne)return;if(!(ne.scrollWidth>ne.clientWidth+1)){F(!1),V(!1);return}const ve=Math.max(0,ne.scrollWidth-ne.clientWidth);F(ne.scrollLeft>1),V(ne.scrollLeft<ve-1)},[z,y]),U=y1(()=>{if(y)return;const ne=P.current,ue=O.current.find(Le=>Le&&Le.classList.contains("active"))??O.current[0];if(!ne||!ue)return;const{offsetLeft:ve,clientWidth:we}=ue,ye=ve-ne.offsetWidth/2+we/2;ne.scrollTo({top:0,left:ye,behavior:"smooth"})},[y]),Y=y1((ne,ue)=>{typeof r>"u"&&L(ne),g?.(ne,o),w?.(ne,ue)},[r,g,o,w]),oe=ne=>{_(ue=>!ue),m?.onClick?.(ne)};_1(()=>{typeof r<"u"&&r!==M&&L(r)},[r,M]),_1(()=>{U(),D()},[I,y,U,D]),_1(()=>{z();const ne=P.current;if(!ne)return;const ue=new ResizeObserver(()=>{z(),D(),U()});ue.observe(ne);const ve=()=>{z(),D(),U()};return window.addEventListener("resize",ve),()=>{ue.disconnect(),window.removeEventListener("resize",ve)}},[z,D,U,A]),_1(()=>{const ne=P.current;if(!ne||y)return;const ue=()=>{$.current!==null&&window.clearTimeout($.current),D(),$.current=window.setTimeout(()=>{D()},140)};return D(),ne.addEventListener("scroll",ue,{passive:!0}),()=>{ne.removeEventListener("scroll",ue),$.current!==null&&window.clearTimeout($.current)}},[y,D]);const Q=y?h(ow,{}):h(K0,{}),re=e==="xs2"?"h-11":"h-10",le=d&&(y||S),ee=L2(()=>A.length?i?h("div",{children:h("div",{className:ae("block",(a||A[I]?.disabled)&&"pointer-events-none opacity-50"),children:A[I]?.children})},`contents-${A[I]?.key}`):h("div",{children:A.map((ne,ue)=>h("div",{className:ae(I===ue?"block":"hidden"),children:ne.children},`contents-${ne.key}`))}):null,[I,i,a,A]);return te("div",{className:ae("block",t),style:u,children:[te("div",{className:ae("relative isolate",f&&"border-subtler border-b"),children:[v&&h("div",{className:"absolute top-0 bottom-0 left-0 z-[4] flex items-center pl-1",children:v}),h("div",{ref:P,className:ae("relative p-1.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",y?"overflow-x-visible overflow-y-visible pr-0":"overflow-x-auto overflow-y-hidden pr-10 whitespace-nowrap",v&&"pl-9"),children:te("div",{className:ae(Hfe({size:e}),"relative flex",y?"w-full flex-wrap content-start gap-y-1":"w-max min-w-full flex-nowrap"),children:[A.map((ne,ue)=>h(Rr,{...s,disabled:s.disabled||ne.disabled||a,children:h(Gk,{ref:ve=>{O.current[ue]=ve},className:ae(M===ne.key&&"active",l),size:e,selected:M===ne.key,disabled:!!(a||ne.disabled),role:"tab","aria-selected":M===ne.key,onClick:ve=>Y(ne.key,ve),children:ne.label})},ne.key)),h("div",{"aria-hidden":"true",className:y?"hidden":"inline-block",style:{width:`${C}px`,flexShrink:0}})]})}),!y&&te(Mr,{children:[h("div",{"aria-hidden":"true",className:ae("to-bg-default pointer-events-none absolute top-0 bottom-px -left-px z-[2] w-11 shrink-0 bg-gradient-to-l from-transparent to-[30%] transition-opacity duration-150",B?"opacity-100":"opacity-0")}),h("div",{"aria-hidden":"true",className:ae("from-bg-default pointer-events-none absolute top-0 -right-px bottom-px z-[3] w-11 shrink-0 bg-gradient-to-l from-[30%] to-transparent transition-opacity duration-150",N?"opacity-100":"opacity-0")})]}),le?te("div",{className:ae("pointer-events-none absolute top-0 right-0 z-[5] w-9",re,"from-bg-default bg-gradient-to-l from-[80%] to-transparent"),children:[y?null:h("div",{className:"bg-default absolute top-0 right-0 bottom-0 w-px"}),h("div",{className:ae("pointer-events-auto flex items-center justify-center",re),children:h(d8,{size:"3xs",variant:"circle",icon:Q,...m,onClick:oe})})]}):null]}),ee]})};npe.displayName="RBChipsBoxTab";const Kk=({className:t,borderClassName:e,pathClassName:n,size:r,style:o})=>te("svg",{className:ae("spinner","animate-spinner-rotate relative z-2 stroke-[5px]",t),viewBox:"0 0 50 50",width:r,height:r,stroke:"currentColor",style:o,children:[h("circle",{className:ae("stroke-linecap-round stroke-width-inherit stroke-inherit opacity-30",e),cx:"25",cy:"25",r:"20",fill:"none"}),h("circle",{className:ae("animate-spinner-path-dash infinite stroke-linecap-round stroke-width-inherit stroke-inherit ease-in-out",n),cx:"25",cy:"25",r:"20",fill:"none"})]}),rpe=he(["overflow-x-auto overflow-y-hidden min-[1280px]:overflow-hidden","[&::-webkit-scrollbar]:h-0 [&::-webkit-scrollbar]:w-0","[&_table]:w-full [&_table]:min-w-full [&_table]:border-collapse","[&_th]:relative [&_th]:h-9 [&_th]:border-b [&_th]:border-b-[var(--color-border-subtler)]","[&_th]:bg-fill-transparent [&_th]:px-2 [&_th]:py-0","[&_th]:text-fg-default [&_th]:text-left [&_th]:align-middle","[&_td]:relative [&_td]:min-h-7 [&_td]:border-b [&_td]:border-b-[var(--color-border-subtler)]","[&_td]:bg-fill-transparent [&_td]:py-1_5 [&_td]:px-2","[&_td]:typo-body-xs-normal [&_td]:text-fg-subtle [&_td]:align-middle","[&_tbody_tr]:relative [&_tbody_tr]:transition-all [&_tbody_tr]:duration-200","[&_[data-slot='ico-check']]:mr-0 [&_label]:p-0"].join(" "),{variants:{noData:{true:"overflow-hidden",false:""},loading:{true:"",false:""},stickyThead:{true:["[&_table]:border-separate [&_table]:border-spacing-0","[&_thead_tr]:sticky [&_thead_tr]:top-0 [&_thead_tr]:z-10","[&_th]:sticky [&_th]:top-0 [&_th]:z-10","[&_th]:bg-inherit [&_th]:bg-clip-padding","[&_th]:shadow-[inset_0_-1px_0_0_var(--color-border-subtler)]"].join(" "),false:""}},defaultVariants:{noData:!1,loading:!1,stickyThead:!1}}),ope=he("transition-colors duration-150",{variants:{sortable:{true:"hover:bg-fill-transparent-hovered cursor-pointer select-none",false:""},align:{left:"",center:"",right:""}},defaultVariants:{sortable:!1,align:"left"}}),ape=he("typo-compact-xs-semibold text-fg-default gap-0_5 inline-flex h-full w-full items-center bg-transparent",{variants:{align:{left:"justify-start text-left",center:"justify-center text-center",right:"justify-end text-right"}},defaultVariants:{align:"left"}}),ipe=he("text-fg-default inline-flex size-4 items-center justify-center bg-transparent [&>svg]:size-full"),spe=he("flex min-h-36 w-full items-center justify-center"),lpe=he("!border-b-0 !border-none !p-0"),cpe=he("!table-row"),upe=he("min-h-60 w-full max-w-[calc(100vw-2.5rem)] border-b-0"),dpe=he("",{variants:{expend:{true:"hover:bg-fill-transparent-hovered cursor-pointer",false:""},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{expend:!1,align:"left"}}),fpe=he("[&_.table-checkbox]:w-2.5"),ppe=he(""),hpe=he("!overflow-hidden !border-none !p-0"),mpe=he("!m-0 overflow-hidden !p-0 transition-[max-height] duration-200"),gpe=he("border-subtler py-2_5 border-b px-3"),{useCallback:vpe,useState:wpe}=await q("react"),Xk=({className:t="",children:e,align:n="left",fieldId:r,size:o="",colSpan:a,rowSpan:i,expend:s,expendOpen:l,handleExpendToggle:u,onClick:d})=>{const[f,m]=wpe(l),v=vpe(g=>{if(d?.(g),!!s)try{m(w=>!w)}catch(w){console.error(w)}finally{setTimeout(()=>{u?.(!f)},10)}},[s,f,d,u]);return h("td",{"data-slot":"table-cell",className:ae(dpe({expend:s,align:n}),r,s&&l&&"expend-open",t),colSpan:a,rowSpan:i,style:{width:o},onClick:v,children:h(Bf,{children:e})})};Xk.displayName="RBTdColumn";const{Children:Kv,Fragment:bpe,isValidElement:Zk,useMemo:D2,useState:d6}=await q("react"),Xv=t=>{let e=[];return Kv.forEach(t,n=>{if(Zk(n)){const r=n;r.type===bpe?e=[...e,...Xv(r.props.children)]:typeof n.type=="function"&&(n.type.name==="RBTdColumn"||n.type.displayName==="RBTdColumn")?e.push(n):e=[...e,...Xv(r.props.children)]}}),e},tbe=({className:t="",list:e,children:n,loadingElement:r=h(Kk,{className:"text-fg-default size-7",borderClassName:"text-fg-subtler opacity-100"}),errorFallback:o,noDataMsg:a,hideThead:i,stickyThead:s=!1,theadTopRows:l,sortUpElement:u=h(A8,{}),sortDownElement:d=h(I8,{}),sortNormalElement:f=h(b8,{}),loading:m})=>{const[v,g]=d6(!1),[w,y]=d6(null),_=D2(()=>{const R=(e||[]).length>0?e?.[0]:{};return Xv(n({item:R,index:0}))},[n,e]),S=D2(()=>{const R=_?.map(P=>{const O=P;return{className:O.props?.className??"",align:O.props?.align??"left",label:O.props?.label,fieldId:O.props?.fieldId,enableSorting:typeof O.props?.sortValue<"u"||!!O.props?.handleClickSort,handleClickSort:O.props?.handleClickSort,thColSpan:O.props?.thColSpan,thRowSpan:O.props?.thRowSpan,rowSpan:O.props?.rowSpan,colSpan:O.props?.colSpan,size:O.props?.size,order:O.props?.order??""}});return R?R.filter(P=>typeof P.label<"u").map(P=>w?.fieldId?{...P,order:w?.fieldId===P.fieldId?w?.order:""}:P):[]},[_,w]),x=D2(()=>{const{fieldId:R,order:P}=w??{};if(!P)return e;const $=e.map((A,M)=>Kv.map(n({item:A,index:M}),L=>{if(Zk(L)){const B=L;return B.type===Xk?L:Kv.toArray(B.props.children)}return[]})).reduce((A,M)=>{const L=M.find(B=>B.props.fieldId===R);return A.push(L.props?.sortValue??0),A},[]);return kn.orderBy(e.map((A,M)=>({...A,sortValue:$[M]})),["sortValue"],[P])},[e,w,n]),C=async R=>{let P="desc";const{order:O,index:$,fieldId:A,enableSorting:M,handleClickSort:L}=R;if(!M||v)return;O==="desc"?P="asc":O==="asc"&&(P="");const B={index:$,order:P,fieldId:A};if(y(B),L)try{g(!0),await L(B)}finally{g(!1)}};return h(Bf,{fallback:o,children:h("div",{"data-slot":"table-root",className:ae(rpe({noData:!!e&&e.length===0,loading:!e||v||m,stickyThead:s}),t),children:te("table",{"data-slot":"table",children:[!i&&te("thead",{"data-slot":"table-head",children:[l,h("tr",{"data-slot":"table-head-row",children:S.map((R,P)=>h("th",{"data-slot":"table-head-cell",className:ae(ope({sortable:R.enableSorting,align:R.align}),R.fieldId,R.className),rowSpan:R.thRowSpan??R.rowSpan,colSpan:R.thColSpan??R.colSpan,style:{width:R.size},onClick:()=>C({...R,index:P}),children:te("div",{"data-slot":"table-head-cell-content",className:ape({align:R.align}),children:[R.label,!!R.enableSorting&&te("span",{"data-slot":"table-head-cell-sort-icon",className:ipe(),children:[R.order!=="desc"&&R.order!=="asc"&&f,R.order==="desc"&&d,R.order==="asc"&&u]})]})},`th-${R.fieldId??P}`))})]}),te("tbody",{"data-slot":"table-body",children:[(!e||v||m)&&h("tr",{"data-slot":"table-loading-row",children:h("td",{"data-slot":"table-loading-cell",className:lpe(),colSpan:S.length,children:h("div",{"data-slot":"table-loading-content",className:spe(),children:r})})}),!!e&&!m&&!v&&(e.length>0?x.map((R,P)=>n({item:R,index:P})):h("tr",{"data-slot":"table-empty-row",className:cpe(),children:h("td",{"data-slot":"table-empty-cell",colSpan:S.length,children:typeof a=="object"?a:h(A3,{"data-slot":"table-empty-content",className:upe(),nullText:a})})}))]})]})})})},{useCallback:f6,useEffect:p6,useMemo:h6,useRef:ype,useState:_pe}=await q("react"),xpe=({className:t="",children:e,expendOpen:n=!1,handleExpendChange:r,beforeExpendOpen:o,onClick:a})=>{const i=ype(null),[s,l]=_pe(n),u=f6(v=>{if(i.current){const g=typeof v=="boolean"?v:!s,w=i.current.firstChild;w&&(w.style.maxHeight=g?`${w.scrollHeight}px`:"0px")}},[i,s]),d=f6(async()=>{try{o&&!s&&(await o(),await ok(10))}catch(v){console.error(v)}finally{l(!s),r?.(!s)}},[s,r,o]),f=h6(()=>{const v=w=>w.flatMap(y=>y?.props?y.type?.displayName==="RBTdColumn"?{...y,props:{...y.props,handleExpendToggle:d,expendOpen:s}}:Array.isArray(y.props.children)?v(y.props.children):[]:[]),g=Array.isArray(e)?e:[e];return v(g)},[e,s,d]),m=h6(()=>{const v=w=>w.flatMap(y=>{if(y?.props){if(y.type?.displayName==="RBTdExpend")return y;if(Array.isArray(y.props.children))return v(y.props.children)}}),g=Array.isArray(e)?e:[e];return v(g).filter(w=>w)[0]},[e]);return p6(()=>{u(s)},[s,u]),p6(()=>{typeof n<"u"&&l(n)},[n]),te(Mr,{children:[h("tr",{"data-slot":"table-row",className:ae(fpe(),t),onClick:a,children:f}),!!m&&h("tr",{"data-slot":"table-expand-row",className:ppe(),children:h("td",{"data-slot":"table-expand-cell",ref:i,className:hpe(),colSpan:f.length,children:m})})]})};xpe.displayName="RBTableRow";const Spe=({className:t="",children:e,style:n})=>h("div",{"data-slot":"table-expand-content",className:mpe(),children:h("div",{"data-slot":"table-expand-content-inner",className:ae(gpe(),t),style:n,children:e})});Spe.displayName="RBTdExpend";const Cpe=he("inline-flex items-center justify-center rounded-full",{variants:{type:{number:"typo-compact-2xs-semibold size-4 min-w-4 gap-1 overflow-hidden px-1",capsule:"typo-compact-2xs-semibold gap-1_5 px-1_5 py-0_5",soft:"typo-compact-2xs-semibold gap-1_5 px-1_5 py-0_5",transparent:"typo-compact-2xs-semibold gap-0_5 rounded-none p-0"}},defaultVariants:{type:"number"}}),Epe=he("",{variants:{variant:{solid:"bg-fill-default text-fg-inverse hover:bg-fill-default-hovered",soft:"bg-fill-subtler text-fg-default hover:bg-fill-subtler-hovered",outlined:"bg-fill-transparent text-fg-default outline-border-default hover:bg-fill-transparent-hovered outline outline-1 outline-offset-[-1px]",ghost:"bg-fill-transparent text-fg-default hover:bg-fill-transparent-hovered"}},defaultVariants:{variant:"solid"}}),Mpe=he("",{variants:{color:{red:"bg-fill-danger text-fg-inverse",orange:"bg-fg-warning text-fg-inverse",green:"bg-fill-success text-fg-inverse",blue:"bg-fill-information text-fg-inverse",purple:"bg-fill-debug text-fg-inverse",gray:"bg-fill-subtle text-fg-inverse","gray-subtle":"bg-fill-subtler text-fg-inverse"}},defaultVariants:{color:"red"}}),kpe=he("",{variants:{color:{red:"bg-fill-danger-subtlest text-fg-danger",orange:"bg-fill-caution-subtlest text-fg-caution",green:"bg-fill-success-subtlest text-fg-success",blue:"bg-fill-information-subtlest text-fg-information",purple:"bg-fill-debug-subtlest text-fg-debug",gray:"bg-fill-disabled text-fg-subtle","gray-subtle":"bg-fill-subtlest text-fg-subtler"}},defaultVariants:{color:"red"}}),Rpe=he("",{variants:{color:{red:"text-fg-danger bg-transparent",orange:"text-fg-warning bg-transparent",green:"text-fg-success bg-transparent",blue:"text-fg-information bg-transparent",purple:"text-fg-debug bg-transparent",gray:"text-fg-subtle bg-transparent","gray-subtle":"text-fg-subtler bg-transparent"}},defaultVariants:{color:"red"}});function nbe({className:t,type:e="number",numberVariant:n="solid",color:r="red",leadingIcon:o,children:a}){return h("span",{"data-slot":"badge",className:ae(Cpe({type:e}),{[Epe({variant:n})]:e==="number",[Mpe({color:r})]:e==="capsule",[kpe({color:r})]:e==="soft",[Rpe({color:r})]:e==="transparent"},t),children:e==="transparent"?te(Mr,{children:[o,h("span",{"data-slot":"badge-content",className:"relative top-px inline-flex items-center",children:a})]}):a})}const Tpe=he("inline-flex w-full flex-col items-start gap-7 overflow-hidden"),Npe=he("flex h-48 w-full flex-col items-center justify-center gap-3 overflow-hidden px-9 py-5"),Ppe=he("text-fg-subtle typo-body-xs2-normal w-full max-w-[600px] text-center"),Ape=he("text-fg-subtler inline-flex size-6 items-center justify-center [&_svg]:size-full");function m6({className:t,type:e="button",message:n="엠프티뷰의 안내 메세지를 입력해주세요.",description:r,buttonLabel:o="버튼 라벨",onButtonClick:a,icon:i}){const s=e==="button";return h("div",{"data-slot":"empty-view",className:ae(Tpe(),t),children:te("div",{"data-slot":"empty-view-section",className:Npe(),children:[!s&&h("i",{"data-slot":"empty-view-icon","aria-hidden":!0,className:Ape(),children:i??h(Z0,{})}),te("div",{children:[h("p",{"data-slot":"empty-view-message",className:Ppe(),children:n}),r&&h("p",{"data-slot":"empty-view-description",className:"text-fg-subtler typo-body-xs2-normal w-full max-w-150 text-center",children:r})]}),s&&h(Wr,{"data-slot":"empty-view-button",size:"sm",variant:"soft",onClick:a,children:o})]})})}const Ipe=he("relative z-[1] w-full",{variants:{disabled:{true:"[&_[data-slot=multi-range-range]]:bg-fill-default [&_[data-slot=text-input]]:bg-fill-control-surface-disabled [&_[data-slot=text-input]]:text-fg-disabled [&_[data-slot=text-input]]:outline-border-disabled [&_[data-slot=multi-range-text-field]]:text-fg-disabled [&_input[type='range']::-moz-range-thumb]:border-default [&_input[type='range']::-moz-range-thumb]:bg-default [&_input[type='range']::-webkit-slider-thumb]:border-default [&_input[type='range']::-webkit-slider-thumb]:bg-default opacity-30 [&_[data-slot=multi-range-slider]]:pointer-events-none [&_[data-slot=multi-range-slider]]:cursor-not-allowed [&_input[type='range']::-moz-range-thumb]:cursor-not-allowed [&_input[type='range']::-webkit-slider-thumb]:cursor-not-allowed",false:""}},defaultVariants:{disabled:!1}}),Ope=he("relative inline-flex w-full items-center justify-center"),Lpe=he("h-[var(--mri-slider-height)] w-[calc(100%_-_var(--mri-thumb-size))]"),g6=he("pointer-events-none absolute top-1/2 left-0 z-[3] h-[var(--mri-slider-height)] w-full -translate-y-1/2 appearance-none bg-transparent opacity-100"),$pe=he("relative z-[2] h-[var(--mri-slider-height)]"),Dpe=he("absolute inset-0 z-[1] rounded-full bg-[var(--mri-track-color,var(--color-fill-subtler))]"),Bpe=he("absolute top-0 bottom-0 z-[2] rounded-full bg-[var(--mri-range-color,var(--color-fill-brand))]"),zpe=he("flex w-full items-start justify-between pt-1"),v6=he("",{variants:{align:{left:"",right:"ml-auto text-right"}},defaultVariants:{align:"left"}}),w6=he("typo-compact-xs2-normal text-fg-default bg-fill-control-surface outline-border-default inline-block h-8 w-auto shrink-0 rounded-md px-2.5 text-center outline outline-1 outline-offset-[-1px] transition-colors"),b6="[&::-webkit-slider-thumb]:pointer-events-auto [&::-webkit-slider-thumb]:h-[var(--mri-thumb-size)] [&::-webkit-slider-thumb]:w-[var(--mri-thumb-size)] [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border [&::-webkit-slider-thumb]:border-[var(--mri-thumb-border-color,var(--color-fg-default))] [&::-webkit-slider-thumb]:bg-[var(--mri-thumb-color,var(--color-fg-default))] [&::-webkit-slider-thumb]:cursor-pointer [&::-moz-range-thumb]:pointer-events-auto [&::-moz-range-thumb]:h-[var(--mri-thumb-size)] [&::-moz-range-thumb]:w-[var(--mri-thumb-size)] [&::-moz-range-thumb]:appearance-none [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border [&::-moz-range-thumb]:border-[var(--mri-thumb-border-color,var(--color-fg-default))] [&::-moz-range-thumb]:bg-[var(--mri-thumb-color,var(--color-fg-wte))] [&::-moz-range-thumb]:cursor-pointer",{forwardRef:Fpe,useCallback:x1,useEffect:y6,useImperativeHandle:Vpe,useMemo:B2,useRef:Nd,useState:jpe}=await q("react"),Hpe=Fpe((t,e)=>{const{className:n="",value:r,name:o,min:a,max:i,step:s=1,thumbSize:l=12,sliderHeight:u=4,thumbBorderColor:d,thumbColor:f,trackColor:m,rangeColor:v,showTextInput:g=!0,disabled:w=!1,handleChange:y,onChange:_}=t,S=Nd([a,i]),x=Nd(null),C=Nd(null),R=Nd(null),P=Nd(null),[O,$]=jpe([a,i]),A=B2(()=>O.map(I=>(I-a)/(i-a)*100),[O,a,i]),M=w||a===i,L=B2(()=>Wo(O[0]),[O]),B=B2(()=>Wo(O[1]),[O]),F=x1(()=>{!R.current||!P.current||(R.current.value=L,P.current.value=B)},[L,B]),N=x1(I=>{I.key==="Enter"&&!I.nativeEvent.isComposing&&(R.current.blur(),P.current.blur())},[]),V=x1((I,D,U=!1)=>{if(g&&(!R.current||!P.current))return;const{value:Y}=D.target;if(I==="left"){let oe=Math.min(Dl(Y),O[1]-s);oe=oe>a?oe:a,$([oe,O[1]]),U&&y?.([oe,O[1]],o),R.current.value=Wo(oe)}else{let oe=Math.max(Dl(Y),O[0]+s);oe=oe<=i?oe:i,$([O[0],oe]),U&&y?.([O[0],oe],o),P.current.value=Wo(oe)}_?.(D),F()},[_,g,F,y,o,O,s,a,i]),z=x1(()=>{O.some((I,D)=>I!==S.current[D])&&(S.current=[...O],y?.(O,o))},[O,o,y]);return y6(()=>{F()},[F]),y6(()=>{typeof r<"u"&&($(r),S.current=[...r])},[r]),Vpe(e,()=>({focus:x.current.focus})),te("div",{"data-slot":"multi-range-input",className:ae(Ipe({disabled:M}),n),style:{"--mri-thumb-size":`${l}px`,"--mri-slider-height":`${u}px`,"--mri-thumb-border-color":d,"--mri-thumb-color":f,"--mri-track-color":m,"--mri-range-color":v},children:[h("div",{className:Ope(),style:{height:"var(--mri-thumb-size)"},children:te("div",{className:Lpe(),children:[h("input",{ref:x,type:"range",value:O[0],min:a,max:i,step:s,disabled:M,className:ae(g6(),b6),onChange:I=>V("left",I),onMouseUp:z,onMouseLeave:z,onTouchEnd:z}),h("input",{ref:C,type:"range",value:O[1],min:a,max:i,step:s,disabled:M,className:ae(g6(),b6),onChange:I=>V("right",I),onMouseUp:z,onMouseLeave:z,onTouchEnd:z}),te("div",{"data-slot":"multi-range-slider",className:$pe(),children:[h("div",{"data-slot":"multi-range-track",className:Dpe()}),h("div",{"data-slot":"multi-range-range",className:Bpe(),style:{left:`${A[0]}%`,right:`${100-A[1]}%`}})]})]})}),g&&te("div",{"data-slot":"multi-range-text-wrap",className:zpe(),children:[h("div",{className:v6({align:"left"}),children:h("input",{"data-slot":"multi-range-text-field",ref:R,type:"text",inputMode:"numeric",defaultValue:O[0],size:Math.max(L.length,1),disabled:M,className:w6(),onBlur:I=>V("left",I,!0),onKeyDown:N})}),h("div",{className:v6({align:"right"}),children:h("input",{"data-slot":"multi-range-text-field",ref:P,type:"text",inputMode:"numeric",defaultValue:O[1],size:Math.max(B.length,1),disabled:M,className:w6(),onBlur:I=>V("right",I,!0),onKeyDown:N})})]})]})});Hpe.displayName="MultiRangeInput";const Wpe=he("relative touch-none rounded-full",{variants:{disabled:{false:"",true:"cursor-not-allowed [&>*]:pointer-events-none [&>*]:opacity-40"}},defaultVariants:{disabled:!1}}),qpe=he(["relative flex h-full cursor-grab items-center justify-center","will-change-[transform,opacity]","transition-opacity duration-150 ease-in-out"],{variants:{active:{false:"",true:"cursor-grabbing opacity-100"}},defaultVariants:{active:!1}}),Upe=he(["absolute top-0 left-0 z-[1] h-full w-full","will-change-transform [backface-visibility:hidden]"]),Ype=he("shadow-down-sm relative block h-full rounded-full bg-[var(--joy-stick-area-color,var(--color-fill-inverse))] opacity-40 transition-opacity duration-100",{variants:{active:{false:"",true:"opacity-100"}},defaultVariants:{active:!1}}),Gpe=he(["relative z-[2] h-10 w-10 rounded-full","border-disabled shadow-down-xs border","pointer-events-none touch-none","will-change-transform [backface-visibility:hidden]","transition-[scale,box-shadow] duration-200 ease-out"],{variants:{active:{false:"",true:"shadow-down-sm scale-110"}},defaultVariants:{active:!1}}),Kpe=he(["pointer-events-none absolute inset-0 rounded-full","[--joy-sweep:calc(30deg_+_var(--joy-ratio,0)_*_45deg)]","opacity-[var(--joy-ratio,0)] transition-opacity duration-100","bg-[conic-gradient(from_calc(var(--joy-angle,0deg)_-_var(--joy-sweep)_/_2),transparent_0deg,var(--joy-arc-color)_calc(var(--joy-sweep)_*_0.3),var(--joy-arc-color)_calc(var(--joy-sweep)_*_0.7),transparent_var(--joy-sweep))]","[mask:radial-gradient(closest-side,transparent_calc(100%_-_3px_-_var(--joy-ratio,0)_*_1px),#000_calc(100%_-_2px_-_var(--joy-ratio,0)_*_1px))]"]),Xpe=he("pointer-events-none absolute top-0 left-0 z-[2] h-full w-full touch-none"),S1=he(["absolute z-[1] inline-flex items-center justify-center","size-3.5 text-center","transition-[opacity,color] duration-150 ease-out","[&_svg]:inline-block [&_svg]:size-3.5 [&_svg]:align-middle"],{variants:{position:{top:"top-2 left-1/2 -translate-x-1/2",bottom:"bottom-2 left-1/2 -translate-x-1/2",left:"top-1/2 left-2 -translate-y-1/2",right:"top-1/2 right-2 -translate-y-1/2"},highlighted:{false:"text-fg-default opacity-70",true:"text-[var(--joy-arc-color)] opacity-100"}},defaultVariants:{highlighted:!1}}),Zpe=he("pointer-events-none absolute top-0 left-0 z-[2] h-full w-full touch-none"),_6=he(["absolute z-[1] inline-flex size-5 items-center justify-center","text-center transition-[opacity,color] duration-150 ease-out","[&_svg]:inline-block [&_svg]:size-5","[&_svg_path]:stroke-opacity-100"],{variants:{position:{top:"top-[5px] left-1/2 -translate-x-1/2",bottom:"bottom-[5px] left-1/2 -translate-x-1/2 [&_svg]:rotate-x-180 [&_svg]:rotate-y-180"},highlighted:{false:"text-fg-default opacity-40",true:"text-[var(--joy-arc-color)] opacity-100"}},defaultVariants:{highlighted:!1}}),{useRef:Pi,useCallback:Sl,useId:Qpe,useEffect:x6,useState:S6}=await q("react"),rbe=({className:t,type:e="direction",size:n=100,stickColor:r="radial-gradient(circle, #727272 0%, #3B3B3B 100%)",arcColor:o="var(--color-scale-zinc-100)",stickAreaColor:a="var(--color-fill-inverse)",throttleThreshold:i=.05,throttleDuration:s,xOnly:l=!1,yOnly:u=!1,disableDiagonal:d=!1,disabled:f=!1,keepMoveEventInterval:m,paddingSize:v=10,style:g,onStart:w,onMove:y,onEnd:_})=>{const S=Pi(null),x=Pi(null),C=Pi(null),R=Pi(null),P=Pi(null),O=Pi(null),$=Pi(null),A=Pi({x:0,y:0}),M=Pi({type:"none",startPosition:{x:0,y:0},normalizedDistance:{x:0,y:0},rotate:{radian:0,degree:0},distance:{x:0,y:0},direction:{x:"center",y:"center"},time:Date.now()}),L=Qpe().replace(/:/g,""),[B,F]=S6(!1),[N,V]=S6({x:"center",y:"center"}),z=({clientX:ee,clientY:ne})=>{if(!x.current)return;const{width:ue,top:ve,left:we}=x.current.getBoundingClientRect(),ye=ue/2,Le=ee-we-ye,Oe=ne-ve-ye;x.current.style.transform=`translate3d(${Le}px, ${Oe}px, 0px)`,S.current.style.transition=""},I=Sl(()=>{x.current&&(x.current.style.transform="translate3d(0px, 0px, 0px)",x.current.classList.remove("left","right","top","bottom","center"))},[]),D=Sl(({clientX:ee,clientY:ne})=>{if(!S.current||!C.current)return;const ve=C.current.offsetWidth/2,we={x:ee-M.current.startPosition.x,y:ne-M.current.startPosition.y};d?Math.abs(we.x)>Math.abs(we.y)?we.y=0:Math.abs(we.x)<Math.abs(we.y)?we.x=0:(we.x=0,we.y=0):l?we.y=0:u&&(we.x=0);const ye=Math.hypot(we.x,we.y);if(ye>ve){const Ue=ve/ye;we.x*=Ue,we.y*=Ue}const Le={x:Math.abs(we.x)>3?we.x>0?"right":"left":"center",y:Math.abs(we.y)>3?we.y>0?"bottom":"top":"center"},Oe=Math.atan2(we.x,-we.y);let Ne=Oe*180/Math.PI;Ne<0&&(Ne+=360);const me={radian:Oe,degree:Ne},pe={x:we.x/ve,y:-we.y/ve},be=Math.hypot(pe.x-A.current.x,pe.y-A.current.y);return{direction:Le,distance:we,normalizedDistance:pe,movementRatio:be,rotate:me}},[d,l,u]),U=Sl(({clientX:ee,clientY:ne})=>{if(!S.current||!C.current)return;const{direction:ue,distance:ve,rotate:we,normalizedDistance:ye,movementRatio:Le}=D({clientX:ee,clientY:ne});S.current.style.transform=`translate3d(${ve.x}px, ${ve.y}px, 0px)`,C.current.style.setProperty("--joy-angle",`${we.degree}deg`);const Oe=Math.hypot(ye.x,ye.y);return C.current.style.setProperty("--joy-ratio",`${Oe}`),x.current.classList.remove("left","right","top","bottom","center"),x.current.classList.add(ue.x,ue.y),V(ue),{direction:ue,distance:{x:ve.x,y:-ve.y},rotate:we,normalizedDistance:ye,movementRatio:Le}},[D]),Y=Sl(()=>{S.current&&(S.current.style.transition="transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1)",C.current?.style.setProperty("--joy-ratio","0"),S.current.style.transform="translate3d(0px, 0px, 0px)")},[]),oe=Sl(()=>{const ne=Date.now()-M.current.time;if(!$.current||["none","end"].includes(M.current.type)||ne<s)return;const ue=$.current;ue.preventDefault(),ue.stopPropagation();const{clientX:ve,clientY:we}=ue,{distance:ye,direction:Le,rotate:Oe,normalizedDistance:Ne,movementRatio:me}=U({clientX:ve,clientY:we});M.current={...M.current,type:"move",rotate:Oe,distance:ye,normalizedDistance:Ne,direction:Le,time:Date.now()};const pe={...M.current,event:ue,targets:{joystick:x.current,stickArea:C.current,stick:S.current}};me>=i&&(A.current=Ne,y?.(pe)),m&&(window.clearInterval(P.current),P.current=window.setInterval(()=>{M.current.type==="move"&&y?.(pe)},m))},[i,s,y,U,m]),Q=Sl(ee=>{window.clearInterval(P.current),!["none","end"].includes(M.current.type)&&(ee.target instanceof Element&&ee.target.releasePointerCapture?.(ee.pointerId),ee.preventDefault(),ee.stopPropagation(),M.current.type="end",setTimeout(()=>{M.current.type="none"},100),I(),Y(),F(!1),V({x:"center",y:"center"}),x.current.classList.remove("active"),window.clearInterval(P.current),$.current=null,_?.({type:"end",...M.current,direction:{x:"center",y:"center"},normalizedDistance:{x:0,y:0},rotate:{degree:0,radian:0},distance:{x:0,y:0},event:ee,targets:{joystick:x.current,stickArea:C.current,stick:S.current}}))},[_,I,Y]),re=ee=>{if(ee.button===2||f||["start","move","end"].includes(M.current.type))return;R.current=`${L}-${ee.pointerId}`,ee.currentTarget.setPointerCapture(ee.pointerId),ee.stopPropagation(),ee.preventDefault();const{clientX:ne,clientY:ue}=ee;M.current.type="start",M.current.startPosition={x:ne,y:ue},F(!0),V({x:"center",y:"center"}),x.current.classList.add("active"),z({clientX:ne,clientY:ue}),w?.({...M.current,event:ee,targets:{joystick:x.current,stickArea:C.current,stick:S.current},distance:{x:0,y:0},normalizedDistance:{x:0,y:0},rotate:{radian:0,degree:0},startPosition:{x:ne,y:ue},direction:{x:"center",y:"center"}})},le=Sl(ee=>{$.current=ee.nativeEvent,R.current===`${L}-${ee.pointerId}`&&(O.current&&cancelAnimationFrame(O.current),O.current=requestAnimationFrame(oe))},[oe,L]);return x6(()=>{const ee=ne=>{Q(ne)};return window.addEventListener("pointerup",ee),()=>{window.removeEventListener("pointerup",ee)}},[L,Q]),x6(()=>{const ee=P.current;return()=>{window.clearInterval(ee)}},[]),h("div",{"data-slot":"joy-stick",className:ae(Wpe({disabled:f}),t),style:{...g,width:`${n+v*2}px`,height:`${n+v*2}px`,"--joy-stick-color":r,"--joy-stick-area-color":a,"--joy-arc-color":o},onContextMenu:ee=>ee.preventDefault(),children:te("div",{"data-slot":"joy-stick-inner",ref:x,className:qpe({active:B}),style:{padding:v},children:[h("div",{"data-slot":"joy-stick-stick-area",ref:C,className:Upe(),style:{padding:v},onPointerDownCapture:re,onPointerUpCapture:Q,onPointerMove:le,children:te("span",{"data-slot":"joy-stick-stick-area-inner",className:Ype({active:B}),style:{"--joy-stick-area-color":a},children:[h("span",{"data-slot":"joy-stick-arc",className:Kpe()}),e==="direction"&&te("div",{className:Xpe(),children:[h("span",{className:S1({position:"top",highlighted:B&&N.y==="top"}),children:h(y8,{})}),h("span",{className:S1({position:"bottom",highlighted:B&&N.y==="bottom"}),children:h(g8,{})}),h("span",{className:S1({position:"left",highlighted:B&&N.x==="left"}),children:h(v8,{})}),h("span",{className:S1({position:"right",highlighted:B&&N.x==="right"}),children:h(w8,{})})]}),e==="curved"&&te("div",{className:Zpe(),children:[h("span",{className:_6({position:"top",highlighted:B&&N.y==="top"}),children:h(G2,{})}),h("span",{className:_6({position:"bottom",highlighted:B&&N.y==="bottom"}),children:h(G2,{})})]})]})}),h("div",{"data-slot":"joy-stick-stick",ref:S,className:Gpe({active:B}),style:{background:"var(--joy-stick-color)"}})]})})},Jpe=he("pointer-events-none"),e1e=he("absolute z-[9] w-full rounded-md"),t1e=he("pointer-events-none absolute z-[99] overflow-hidden",{variants:{hidden:{false:"",true:"hidden"}},defaultVariants:{hidden:!1}}),n1e=he("block"),r1e=he(["block size-2.5","fill-bg-tooltip"]),o1e=he("absolute z-[9999]"),a1e=he("relative"),i1e=he(["inline-flex items-center justify-center overflow-hidden","bg-tooltip max-w-60 rounded-md px-3 py-2"]),s1e=he(["text-fg-inverse flex-1","typo-body-xs2-normal","break-words whitespace-normal"]),{useCallback:ys,useEffect:z2,useMemo:C6,useRef:Gc,useState:F2}=await q("react"),l1e=t=>new Promise(e=>setTimeout(e,t)),obe=({className:t="",anchorId:e,width:n=200,space:r=0,place:o="bottom",events:a=["hover"],arrowPosition:i=0,hideArrow:s,tooltipPosition:l,tooltipColor:u,tooltipTextColor:d,tooltipBoxShadow:f,tooltipBorderRadius:m,open:v,whenWindowScrollClose:g,children:w})=>{const y=Gc(null),_=Gc(null),S=Gc(null),x=Gc(null),C=Gc(0),R=Gc(!1),[P,O]=F2(!1),[$,A]=F2(o),[M,L]=F2(!!v),B=C6(()=>{const Q=[...a],re=Q.findIndex(le=>le==="hover");return re!==-1&&!xo.isMobile&&Q.splice(re,0,"mouseover","mouseout"),Q},[a]),F=ys(()=>{if(_.current)return _.current;const Q=document.querySelector(`#${e}`);Q&&(_.current=Q)},[e]),N=ys((Q,re)=>{if(!_.current)return;const{scrollY:le,innerHeight:ee}=window,ne=le,ue=le+ee,{top:ve}=_.current.getBoundingClientRect();return ne>Q&&ve>0?Q+ve:ue<Q+re?ue-re-10:Q},[]),V=ys((Q,re)=>{const{scrollX:le,innerWidth:ee}=window,ne=le,ue=le+ee;return ne>Q?ne+r:ue<Q+re?ue-re-r:Q},[r]),z=ys(Q=>{const{targetTop:re,targetLeft:le,targetWidth:ee,targetHeight:ne,tooltipHeight:ue,arrowWidth:ve,arrowHeight:we}=Q;return scrollY+re-ue-we-r<scrollY&&o==="top"?"bottom":scrollY+re+ne+we+r>scrollY+innerHeight&&o==="bottom"?"top":le-ve-r<100&&o==="left"?"right":innerWidth-(scrollX+le+ee+ve+r+10)<100&&o==="right"?"left":le+scrollX<scrollX?"right":o},[o,r]),I=ys(()=>{if(!y.current||!_.current)return{targetTop:0,targetLeft:0,targetWidth:0,targetHeight:0,arrowWidth:0,arrowHeight:0,tooltipWidth:0,tooltipHeight:0,scrollX:0,scrollY:0,innerWidth:0,innerHeight:0};const{top:Q,left:re,height:le,width:ee}=_.current.getBoundingClientRect(),{offsetHeight:ne,offsetWidth:ue}=y.current,{clientWidth:ve=0,clientHeight:we=0}=S.current??{},{scrollX:ye,scrollY:Le,innerWidth:Oe,innerHeight:Ne}=window,{position:me,top:pe,left:be}=document.body.style,Ue=me==="fixed"?Number(pe.replace("px",""))*-1:0,He=me==="fixed"?Number(be.replace("px",""))*-1:0;return{targetTop:Q,targetLeft:re,targetWidth:ee,targetHeight:le,arrowWidth:ve,arrowHeight:we,tooltipWidth:ue,tooltipHeight:ne,scrollX:He||ye,scrollY:Ue||Le,innerWidth:Oe,innerHeight:Ne}},[]),D=ys(async()=>{if(!_.current||!y.current)return;const{targetTop:Q,targetLeft:re,targetWidth:le,targetHeight:ee,arrowWidth:ne,arrowHeight:ue,tooltipWidth:ve,tooltipHeight:we,scrollX:ye,scrollY:Le,innerWidth:Oe,innerHeight:Ne}=I(),{top:me=0,left:pe=0}=l??{},be=i||0,Ue=s?Math.max(r,8):r,He=z({targetTop:Q,targetLeft:re,targetWidth:le,targetHeight:ee,arrowWidth:ne,arrowHeight:ue,tooltipWidth:ve,tooltipHeight:we,scrollX:ye,scrollY:Le,innerWidth:Oe,innerHeight:Ne});A(He);let qe="",_e="",at="";switch(He){case"top":qe+=`
271
+ `;return typeof s=="function"&&s(null,y),y},x2}var Ax;function Mle(){if(Ax)return jc;Ax=1;const t=ile(),e=Sle(),n=Cle(),r=Ele();function o(a,i,s,l,u){const d=[].slice.call(arguments,1),f=d.length,m=typeof d[f-1]=="function";if(!m&&!t())throw new Error("Callback required as last argument");if(m){if(f<2)throw new Error("Too few arguments provided");f===2?(u=s,s=i,i=l=void 0):f===3&&(i.getContext&&typeof u>"u"?(u=l,l=void 0):(u=l,l=s,s=i,i=void 0))}else{if(f<1)throw new Error("Too few arguments provided");return f===1?(s=i,i=l=void 0):f===2&&!i.getContext&&(l=s,s=i,i=void 0),new Promise(function(v,g){try{const w=e.create(s,l);v(a(w,i,l))}catch(w){g(w)}})}try{const v=e.create(s,l);u(null,a(v,i,l))}catch(v){u(v)}}return jc.create=e.create,jc.toCanvas=o.bind(null,n.render),jc.toDataURL=o.bind(null,n.renderToDataURL),jc.toString=o.bind(null,function(a,i,s){return r.render(a,s)}),jc}Mle();const{useCallback:ive,useEffect:sve,useState:lve}=await q("react"),{useCallback:cve,useEffect:uve,useId:dve,useRef:fve,useState:pve}=await q("react"),{useCallback:hve,useEffect:mve,useId:gve,useRef:vve,useState:wve}=await q("react"),kle="_selected_621ky_62",Rle={"inbox-pagination":"_inbox-pagination_621ky_41","pagination-page":"_pagination-page_621ky_54",selected:kle,"pagination-next":"_pagination-next_621ky_65","pagination-prev":"_pagination-prev_621ky_65","pagination-next-double":"_pagination-next-double_621ky_65","pagination-prev-double":"_pagination-prev-double_621ky_65"},{useMemo:gd}=await q("react"),Hc=rn(Rle),bve=({className:t,currPage:e=1,listSize:n=20,pageSize:r=5,totalCount:o=0,handlePageChange:a})=>{const i=gd(()=>{const f=o/n;return f%1===0?f:Math.floor(f)+1},[n,o]),s=gd(()=>Array.from({length:o},(f,m)=>Array.from({length:r},(v,g)=>m*r+g+1)),[r,o]),l=gd(()=>(s.find(f=>f.includes(e))??[]).filter(f=>f<=i),[e,s,i]),u=gd(()=>{const f=l[0]??1;return Math.max(1,f-1)},[l]),d=gd(()=>{const f=l[l.length-1]??i;return Math.min(i,f+1)},[l,i]);return te("ul",{className:Hc(t,"inbox-pagination"),children:[h("li",{children:h("button",{className:Hc("pagination-prev-double"),type:"button",disabled:e===1,onClick:()=>a(u),children:h(d$,{})})}),h("li",{children:h("button",{className:Hc("pagination-prev"),type:"button",disabled:e===1,onClick:()=>a(e-1),children:h(p$,{})})}),l.map(f=>h("li",{children:h("button",{className:Hc("pagination-page",e===f&&"selected"),type:"button",onClick:()=>a(f),children:f})},f)),h("li",{children:h("button",{className:Hc("pagination-next"),type:"button",disabled:!(e<i),onClick:()=>a(e+1),children:h(h$,{})})}),h("li",{children:h("button",{className:Hc("pagination-next-double"),type:"button",disabled:e===i,onClick:()=>a(d),children:h(f$,{})})})]})},{useEffect:yve,useRef:_ve,useState:xve}=await q("react"),Tle="_inner_16agd_43",Nle="_left_16agd_50",Ple="_right_16agd_53",Ale="_disabled_16agd_87",Ile={"joystick-with-buttons":"_joystick-with-buttons_16agd_40",inner:Tle,left:Nle,right:Ple,"btn-group":"_btn-group_16agd_61","btn-group-item":"_btn-group-item_16agd_69",disabled:Ale,"joy-stick-container":"_joy-stick-container_16agd_95","joy-stick":"_joy-stick_16agd_95","hide-joystick":"_hide-joystick_16agd_110","transition-disabled":"_transition-disabled_16agd_115"},{useCallback:Ole,useEffect:Ix,useMemo:Ox,useRef:S2,useState:Lx}=await q("react"),Wc=rn(Ile),Sve=({className:t,joystickType:e,disableDiagonal:n,xOnly:r,yOnly:o,buttonsDirection:a,buttons:i,hideJoystick:s,onJoystickMove:l})=>{const u=S2(null),d=S2([]),f=S2({timeoutId:[],animationFrameId:[]}),{isMobile:m,isSmallTablet:v}=s3(),[g,w]=Lx(!s),[y,_]=Lx(!1),S=Ox(()=>{const $=i?.length??0;return $>=4?{oneObjectDeg:35,initDeg:a==="left"?-5:5}:$===3?{oneObjectDeg:40,initDeg:a==="left"?15:-15}:{oneObjectDeg:45,initDeg:a==="left"?25:-25}},[i?.length,a]),x=Ox(()=>m?80:v?100:110,[m,v]),C=$=>{_(!0),l?.({isMoving:!0,type:e,data:$})},R=$=>{l?.({isMoving:!0,type:e,data:$})},P=$=>{_(!1),l?.({isMoving:!1,type:e,data:$})},O=Ole(({oneObjectDeg:$,initDeg:A})=>{if(!u.current)return;const M=u.current.getBoundingClientRect(),L=M.width/2,B=M.height/2,F=M.width/2;s?(f.current.animationFrameId.forEach(N=>{cancelAnimationFrame(N)}),f.current.timeoutId.forEach(N=>{clearTimeout(N)}),d.current?.forEach((N,V)=>{if(!N)return;const z=N,I=z.offsetWidth,D=20;z&&(a==="left"?(z.style.left=`${I*V+D*(V+1)}px`,z.style.transform="translateY(-100%)"):(z.style.left=`calc(100% - ${I*V+D*(V+1)}px)`,z.style.transform="translateX(-100%) translateY(-100%)"),z.style.top=`calc(100% - ${D}px)`,z.style.transition="",z.style.opacity="1")})):d.current?.forEach((N,V)=>{const z=N;if(z){const I=(A-90)*(Math.PI/180),D=a==="left"?(A-90+V*$)*(Math.PI/180):(A-90-V*$)*(Math.PI/180);let U=I,Y=.1,oe=.06;const Q=.85,re=.02,le=L+Math.cos(I)*F,ee=B+Math.sin(I)*F;z.style.position="absolute",z.style.left=`${le-z.clientWidth/2}px`,z.style.top=`${ee-z.clientHeight/2}px`,z.style.opacity=`${Y}`,z.style.transform="scale(0.98)";const ne=()=>{if(s)return;const ue=D-U;oe+=ue*re,oe*=Q,U+=oe,Y+=.03,Y=Math.min(Y,1);const ve=.98+(1-Math.abs(ue)/Math.PI)*.02,we=L+Math.cos(U)*F,ye=B+Math.sin(U)*F;z.style.left=`${we-z.clientWidth/2}px`,z.style.top=`${ye-z.clientHeight/2}px`,z.style.opacity=`${Y}`,z.style.transform=`scale(${ve})`,z.style.transition="none",Math.abs(ue)>.002||Math.abs(oe)>.002?f.current.animationFrameId[V]=requestAnimationFrame(ne):(z.style.opacity="1",z.style.transform="scale(1)",z.style.transition="")};f.current.timeoutId[V]=window.setTimeout(()=>{f.current.animationFrameId[V]=requestAnimationFrame(ne)},V*60)}})},[s,a]);return Ix(()=>{O(S)},[O,S,x]),Ix(()=>{setTimeout(()=>{w(!0)},200)},[]),h("div",{className:Wc(t,"joystick-with-buttons",{"hide-joystick":s,"transition-disabled":!g}),children:te("div",{className:Wc("inner",a),children:[h("div",{ref:u,className:Wc("btn-group"),children:i?.map(($,A)=>h("div",{ref:M=>{d.current[A]=M},className:Wc("btn-group-item",{disabled:y}),onClick:M=>{M.stopPropagation()},children:$.element},A))}),h("div",{className:Wc("joy-stick-container"),style:{width:x,height:x},children:h(tle,{className:Wc("joy-stick"),type:e,size:x,disableDiagonal:n,xOnly:r,yOnly:o,paddingSize:30,keepMoveEventInterval:200,onStart:C,onMove:R,onEnd:P})})]})})},Lle=({className:t,containerId:e,open:n,onOpenChange:r,title:o,content:a,buttonText:i="확인",buttonClassName:s,snapshotCnt:l,resolve:u,onConfirm:d})=>{const f=()=>{u(!0),d?.()};return h(tc,{className:ae("w-fit","min-w-[25rem]","max-w-[95vw]",t),open:n,onOpenChange:r,type:"dialog",dialogContainer:e?document.getElementById(e):void 0,snapshotCnt:l,hideCloseButton:!0,enableDimClose:!1,header:o?{title:o}:void 0,footer:h(Ah,{className:ae("h-[2.5rem] text-[1rem] font-medium",s),onClick:f,children:i}),children:h("div",{className:"whitespace-pre-wrap",children:a})})},{useState:$le}=await q("react"),Dle=({className:t,open:e,onOpenChange:n,title:r,content:o,buttonText:a={yes:"확인",no:"취소"},buttonClassName:i,buttonWrapperClassName:s,snapshotCnt:l,containerId:u,onConfirm:d,onCancel:f,resolve:m})=>{const[v,g]=$le(!1),w=async()=>{g(!0);try{await d?.(),m(!0)}finally{g(!1)}},y=()=>{f?.(),m(!1)};return h(tc,{className:ae("w-fit","min-w-[25rem]","max-w-[95vw]",t),open:e,onOpenChange:n,type:"dialog",snapshotCnt:l,dialogContainer:u?document.getElementById(u):void 0,hideCloseButton:!0,enableDimClose:!1,header:r?{title:r}:void 0,footer:te(Yo,{className:ae("btn-wrapper",s),alignItems:"center",gap:8,children:[h(fk,{className:ae("h-[2.5rem] px-[1rem] text-[1rem] font-medium",i?.no),onClick:y,children:a.no}),h(Ah,{className:ae("h-[2.5rem] px-[1rem] text-[1rem] font-medium",i?.yes),autoFocus:!0,onClick:w,loading:v,children:a.yes})]}),children:h("div",{className:"text-default text-center whitespace-pre-wrap",children:o})})},{cloneElement:Ble,useState:zle}=await q("react"),Fle=({className:t,open:e,onOpenChange:n,title:r,content:o,placeholder:a,inputType:i="text",inputElement:s,autoFocus:l=!1,value:u,buttonText:d={yes:"확인",no:"취소"},buttonClassName:f,buttonWrapperClassName:m,containerId:v,snapshotCnt:g,resolve:w,close:y})=>{const[_,S]=zle(u||"");return h(tc,{className:ae("w-fit","min-w-[25rem]","max-w-[95vw]",t),open:e,onOpenChange:n,type:"dialog",snapshotCnt:g,dialogContainer:v?document.getElementById(v):void 0,hideCloseButton:!0,enableDimClose:!1,header:r?{title:r}:void 0,footer:te(Yo,{className:ae("btn-wrapper",m),alignItems:"center",gap:8,children:[h(fk,{className:ae("h-[2.5rem] text-[1rem] font-medium",f?.no),onClick:()=>y(),children:d.no}),h(Ah,{className:ae("h-[2.5rem] text-[1rem] font-medium",f?.yes),onClick:()=>w(_),children:d.yes})]}),children:te(Ul,{gap:16,children:[h("div",{children:o}),s?Ble(s,{value:_,handleChange:S,tabIndex:l?0:-1,placeholder:a,type:i}):h(ek,{className:ae("w-full"),type:i,tabIndex:l?0:-1,placeholder:a,value:_,handleChange:S})]})})},{useMemo:Cve}=await q("react"),Vle="_spin_tbvd8_59",jle={"count-down":"_count-down_tbvd8_40","count-down-text":"_count-down-text_tbvd8_45","count-down-refresh-img":"_count-down-refresh-img_tbvd8_49",spin:Vle},{useRef:C2,useCallback:vd,useEffect:Hle,useState:Wle,forwardRef:qle,useImperativeHandle:Ule}=await q("react"),E2=rn(jle),Yle=qle(({className:t,remainSeconds:e=10,initialPlay:n,loop:r,refreshIconClassName:o,textClassName:a,onStart:i,onComplete:s},l)=>{const u=C2(null),d=C2(null),f=C2(e),[m,v]=Wle(!1),g=vd(x=>{x<0||(f.current=x,d.current.textContent=x.toString())},[]),w=vd(()=>{g(e)},[e,g]),y=vd(()=>{u.current&&window.clearInterval(u.current)},[]),_=vd(()=>{u.current&&window.clearInterval(u.current),f.current===e&&i?.(),u.current=window.setInterval(()=>{g(f.current-1),f.current<=0&&(r?(v(!0),setTimeout(()=>{v(!1)},1e3),w()):y(),s?.())},1e3)},[r,e,i,s,w,y,g]),S=vd(()=>{v(!0),setTimeout(()=>{v(!1)},1e3),w(),_()},[w,_]);return Hle(()=>(d.current.textContent=f.current.toString(),n&&_(),()=>{u.current&&window.clearInterval(u.current)}),[]),Ule(l,()=>({restart:S,stop:y,start:_,reset:w})),h(Yo,{className:E2(t,"count-down"),justifyContent:"center",alignItems:"center",children:te("button",{onClick:S,children:[h(Hq,{className:E2("count-down-refresh-img",o,{spin:m})}),h("span",{ref:d,className:E2("count-down-text",a)})]})})});Yle.displayName="CountDown";const $x=5177,Gle=()=>{if(typeof window>"u")return"";const t=window.__RB_ASSETS_BASE_URL__;if(t)return t;const{protocol:e,hostname:n}=window.location;return e==="file:"||!n?`http://127.0.0.1:${$x}`:`${e}//${n}:${$x}`},C3=t=>{const e=t.startsWith("/")?t:`/${t}`;return`${Gle()}${e}`},Dx=t=>C3(`/imgs${t.startsWith("/")?t:`/${t}`}`),Eve=t=>C3(`/models${t}`),Mve=t=>C3(`/data/joint${t}`),{useEffect:kve}=await q("react"),Kle="_readonly_1w1i8_46",Xle="_input_1w1i8_49",Zle={"side-number-input":"_side-number-input_1w1i8_40",readonly:Kle,"number-btn":"_number-btn_1w1i8_46",input:Xle},{forwardRef:Qle,useCallback:pa,useEffect:wd,useImperativeHandle:Jle,useMemo:ece,useRef:qa,useState:Bx}=await q("react"),i1=rn(Zle,"rb-ui"),tce=t=>{const e=t?.target?.value;return kn.replace(e,/^0+[\d,]/gm,o=>kn.last(o)).replace(/[^\d.-]/g,"")},nce=Qle(({className:t="",inputClassName:e="",step:n=1,error:r,isDirect:o=!0,increaseStep:a,decreaseStep:i,maxLength:s,increaseElement:l="+",decreaseElement:u="-",detectDobleClick:d,rippleOption:f,notAllowedEmptyValue:m,inputDisabled:v,disableAutoAccel:g,disableLongPress:w,handleChange:y,onButtonPointerDown:_,onButtonPointerUp:S,handleEnter:x,...C},R)=>{const{value:P,readOnly:O,disabled:$,min:A,max:M="9999999999999",digit:L=18,onFocus:B,onBlur:F}=C,N=qa(null),V=qa(!1),z=qa(!1),I=qa({up:0,down:0}),D=qa(""),U=qa(null),Y=qa(null),oe=qa(0),Q=qa(0),re=qa(1e3),[le,ee]=Bx(P??""),[ne,ue]=Bx(!1),ve=ece(()=>$||new Ut(A??0).cmp(new Ut(M))>0,[$,M,A]),we=pa((_e,at,ht)=>at===0?_e:ht==="up"?new Ut(_e||0).add(new Ut(U.current?.increase??at??1)).toDP(L,Ut.ROUND_DOWN).toString():new Ut(_e||0).sub(new Ut(U.current?.decrease??at??1)).toDP(L,Ut.ROUND_DOWN).toString(),[L]),ye=pa(_e=>typeof _e>"u"||!_e||ve?"":_e.endsWith(".")?_e:typeof A<"u"&&new Ut(Number(_e)).lt(new Ut(A))?String(A):typeof M<"u"&&new Ut(Dl(_e||"")).gt(new Ut(M))?String(M):_e,[A,M,ve]),Le=pa(_e=>ve?"":_e.endsWith(".")?_e:ye(_e),[ve,ye]),Oe=pa(({type:_e,e:at})=>{if(!N.current||ve)return;const{value:ht,name:st}=N.current,Ct=tce({target:{value:ht}}),cn=L?new RegExp(`^-?[0-9]*[.]{0,1}[0-9]{0,${L}}$`,"gm"):/^-?\d{0,18}$/;Ct.match(cn)&&(typeof s<"u"&&(Ct||"").split(".")[0].replace(/[^0-9]/g,"").length>Number(s)||(N.current.value=Bi(Ct??"").join("."),D.current!==Ct&&(y?.(Ct,st,{type:_e}),at&&C.onChange?.(at),D.current=Ct),ee(Ct)))},[ve,L,s,y,C]),Ne=pa((_e,at)=>{N.current&&(ue(at),at?B?.(_e):(N.current.value=Le(N.current.value),m&&!_e.target.value&&(N.current.value=C.value),Oe({}),F?.(_e)))},[B,Le,m,C.value,Oe,F]),me=pa(_e=>{if(ve||O){V.current=!1,window.clearTimeout(oe.current);return}D.current=we(D.current??"0",Y.current,_e),D.current=ye(D.current??"0"),ee(String(D.current)),y?.(D.current,C.name,{type:_e}),_?.(_e),window.clearTimeout(Q.current),Q.current=window.setTimeout(()=>{V.current&&(me(_e),re.current>100&&!g&&(re.current-=re.current/5))},re.current)},[_,we,ye,ve,y,C.name,g,O]),pe=pa(_e=>{const{value:at="",name:ht}=_e.target;m&&!at&&(_e.target.value=C.value),x?.(at,ht),_e.target.blur()},[x,C.value,m]),be=pa(_e=>{_e.key==="Enter"&&!_e.nativeEvent.isComposing&&pe(_e),C.onKeyDown?.(_e)},[C,pe]),Ue=pa((_e,at)=>{if(!(Date.now()-I.current[_e]<500&&d)){if(ve||O){V.current=!1,window.clearTimeout(oe.current);return}I.current[_e]=Date.now(),me(_e),w||(oe.current=window.setTimeout(()=>{V.current=!0,me(_e)},re.current)),z.current=!0}},[d,ve,O,me,w]),He=pa((_e,at)=>{if(ve||O||!z.current){V.current=!1,window.clearTimeout(oe.current);return}V.current=!1,z.current=!1,window.clearTimeout(oe.current),_e&&S?.(_e,at),_e&&Oe({type:_e})},[ve,Oe,O,S]),qe=pa(()=>{V.current=!1,window.clearTimeout(oe.current),window.clearTimeout(Q.current)},[]);return wd(()=>{D.current=P??""},[P]),wd(()=>{typeof P<"u"&&ee(P)},[P]),wd(()=>{Y.current=n},[n]),wd(()=>{U.current={increase:a,decrease:i}},[a,i]),Jle(R,()=>N.current),wd(()=>{const _e=at=>{at.type==="contextmenu"&&V.current&&at.preventDefault()};return window.addEventListener("contextmenu",_e),window.addEventListener("pointerup",_e),window.addEventListener("pointercancel",_e),()=>{window.removeEventListener("contextmenu",_e),window.removeEventListener("pointerup",_e),window.removeEventListener("pointercancel",_e)}},[qe]),te(Yo,{className:i1("side-number-input",{focus:ne,readonly:O,disabled:$,error:r},t),alignItems:"center",justifyContent:"center",children:[h(Rr,{...f,disabled:ve||f?.disabled,children:h("button",{type:"button","data-type":"down",className:i1("number-btn","down"),disabled:ve||M===le,onPointerDown:_e=>{Ue("down",_e)},onPointerUp:_e=>{He("down",_e)},onPointerLeave:_e=>{_e.currentTarget.hasPointerCapture?.(_e.pointerId)||He(void 0,_e)},onPointerCancel:_e=>{He(void 0,_e)},onLostPointerCapture:_e=>{He(void 0,_e)},onContextMenu:_e=>{_e.preventDefault()},children:u})}),h("input",{...C,className:i1("input",{focus:ne,readonly:O,disabled:$,error:r},e),ref:N,type:"text",value:Bi(le??"").join(".")??"",readOnly:!o,disabled:$||v,onChange:_e=>Oe({e:_e}),onFocus:_e=>Ne(_e,!0),onBlur:_e=>Ne(_e,!1),onKeyDown:be,onContextMenu:_e=>{_e.preventDefault()}}),h(Rr,{...f,disabled:ve||f?.disabled,children:h("button",{type:"button","data-type":"up",className:i1("number-btn","up"),disabled:ve||A===le,onPointerDown:_e=>{Ue("up",_e)},onPointerUp:_e=>{He("up",_e)},onPointerLeave:_e=>{_e.currentTarget.hasPointerCapture?.(_e.pointerId)||He(void 0,_e)},onPointerCancel:_e=>{He(void 0,_e)},onLostPointerCapture:_e=>{He(void 0,_e)},onContextMenu:_e=>{_e.preventDefault()},children:l})})]})});nce.displayName="SideNumberInput";const{useCallback:s1}=await q("react"),Rve=({alertComponent:t,confirmComponent:e,promptComponent:n,options:r}={})=>{const{modal:o,closeModal:a}=OE(),i=s1(async({modalId:d,componentName:f,...m})=>o({component:t??Lle,props:{...m,containerId:r?.containerId},options:{id:d,componentName:f??kn.uniqueId()}}),[o,t,r?.containerId]),s=s1(async({modalId:d,componentName:f,...m})=>o({component:e??Dle,props:{...m,containerId:r?.containerId},options:{id:d,componentName:f??kn.uniqueId()}}),[o,e,r?.containerId]),l=s1(async({modalId:d,componentName:f,...m})=>o({component:n??Fle,props:{...m,containerId:r?.containerId},options:{id:d,componentName:f??kn.uniqueId()}}),[o,n,r?.containerId]),u=s1(d=>{a(d)},[a]);return{alertDialog:i,confirmDialog:s,promptDialog:l,closeDialog:u}},{useCallback:l1}=await q("react"),Tve=({alertComponent:t,confirmComponent:e,promptComponent:n}={})=>{const{modal:r,closeModal:o}=OE(),a=l1(async({modalId:u,componentName:d,...f})=>r({component:t??sfe,props:f,options:{id:u,componentName:d??kn.uniqueId()}}),[r,t]),i=l1(async({modalId:u,componentName:d,...f})=>r({component:e??cfe,props:f,options:{id:u,componentName:d??kn.uniqueId()}}),[r,e]),s=l1(async({modalId:u,componentName:d,...f})=>r({component:n??mfe,props:f,options:{id:u,componentName:d??kn.uniqueId()}}),[r,n]),l=l1(u=>{o(u)},[o]);return{alertDialog:a,confirmDialog:i,promptDialog:s,closeDialog:l}},oi=Object.create(null);oi.open="0";oi.close="1";oi.ping="2";oi.pong="3";oi.message="4";oi.upgrade="5";oi.noop="6";const r0=Object.create(null);Object.keys(oi).forEach(t=>{r0[oi[t]]=t});const zv={type:"error",data:"parser error"},vk=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",wk=typeof ArrayBuffer=="function",bk=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,E3=({type:t,data:e},n,r)=>vk&&e instanceof Blob?n?r(e):zx(e,r):wk&&(e instanceof ArrayBuffer||bk(e))?n?r(e):zx(new Blob([e]),r):r(oi[t]+(e||"")),zx=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)};function Fx(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let M2;function rce(t,e){if(vk&&t.data instanceof Blob)return t.data.arrayBuffer().then(Fx).then(e);if(wk&&(t.data instanceof ArrayBuffer||bk(t.data)))return e(Fx(t.data));E3(t,!1,n=>{M2||(M2=new TextEncoder),e(M2.encode(n))})}const Vx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",jd=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Vx.length;t++)jd[Vx.charCodeAt(t)]=t;const oce=t=>{let e=t.length*.75,n=t.length,r,o=0,a,i,s,l;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const u=new ArrayBuffer(e),d=new Uint8Array(u);for(r=0;r<n;r+=4)a=jd[t.charCodeAt(r)],i=jd[t.charCodeAt(r+1)],s=jd[t.charCodeAt(r+2)],l=jd[t.charCodeAt(r+3)],d[o++]=a<<2|i>>4,d[o++]=(i&15)<<4|s>>2,d[o++]=(s&3)<<6|l&63;return u},ace=typeof ArrayBuffer=="function",M3=(t,e)=>{if(typeof t!="string")return{type:"message",data:yk(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:ice(t.substring(1),e)}:r0[n]?t.length>1?{type:r0[n],data:t.substring(1)}:{type:r0[n]}:zv},ice=(t,e)=>{if(ace){const n=oce(t);return yk(n,e)}else return{base64:!0,data:t}},yk=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},_k="",sce=(t,e)=>{const n=t.length,r=new Array(n);let o=0;t.forEach((a,i)=>{E3(a,!1,s=>{r[i]=s,++o===n&&e(r.join(_k))})})},lce=(t,e)=>{const n=t.split(_k),r=[];for(let o=0;o<n.length;o++){const a=M3(n[o],e);if(r.push(a),a.type==="error")break}return r};function cce(){return new TransformStream({transform(t,e){rce(t,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const a=new DataView(o.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{o=new Uint8Array(9);const a=new DataView(o.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}t.data&&typeof t.data!="string"&&(o[0]|=128),e.enqueue(o),e.enqueue(n)})}})}let k2;function c1(t){return t.reduce((e,n)=>e+n.length,0)}function u1(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let r=0;for(let o=0;o<e;o++)n[o]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}function uce(t,e){k2||(k2=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(i,s){for(n.push(i);;){if(r===0){if(c1(n)<1)break;const l=u1(n,1);a=(l[0]&128)===128,o=l[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(c1(n)<2)break;const l=u1(n,2);o=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(c1(n)<8)break;const l=u1(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),d=u.getUint32(0);if(d>Math.pow(2,21)-1){s.enqueue(zv);break}o=d*Math.pow(2,32)+u.getUint32(4),r=3}else{if(c1(n)<o)break;const l=u1(n,o);s.enqueue(M3(a?l:k2.decode(l),e)),r=0}if(o===0||o>t){s.enqueue(zv);break}}}})}const xk=4;function Qn(t){if(t)return dce(t)}function dce(t){for(var e in Qn.prototype)t[e]=Qn.prototype[e];return t}Qn.prototype.on=Qn.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};Qn.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};Qn.prototype.off=Qn.prototype.removeListener=Qn.prototype.removeAllListeners=Qn.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===e||r.fn===e){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+t],this};Qn.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,e)}return this};Qn.prototype.emitReserved=Qn.prototype.emit;Qn.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};Qn.prototype.hasListeners=function(t){return!!this.listeners(t).length};const Bh=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),Ho=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),fce="arraybuffer";function Sk(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const pce=Ho.setTimeout,hce=Ho.clearTimeout;function zh(t,e){e.useNativeTimers?(t.setTimeoutFn=pce.bind(Ho),t.clearTimeoutFn=hce.bind(Ho)):(t.setTimeoutFn=Ho.setTimeout.bind(Ho),t.clearTimeoutFn=Ho.clearTimeout.bind(Ho))}const mce=1.33;function gce(t){return typeof t=="string"?vce(t):Math.ceil((t.byteLength||t.size)*mce)}function vce(t){let e=0,n=0;for(let r=0,o=t.length;r<o;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}function Ck(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function wce(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function bce(t){let e={},n=t.split("&");for(let r=0,o=n.length;r<o;r++){let a=n[r].split("=");e[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return e}class yce extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}}class k3 extends Qn{constructor(e){super(),this.writable=!1,zh(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,n,r){return super.emitReserved("error",new yce(e,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const n=M3(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,n={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const n=wce(e);return n.length?"?"+n:""}}class _ce extends k3{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const n=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};lce(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,sce(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Ck()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}}let Ek=!1;try{Ek=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const xce=Ek;function Sce(){}class Cce extends _ce{constructor(e){if(super(e),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||r!==e.port}}doWrite(e,n){const r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(o,a)=>{this.onError("xhr post error",o,a)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}}let lu=class o0 extends Qn{constructor(e,n,r){super(),this.createRequest=e,zh(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var e;const n=Sk(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=o0.requestsCount++,o0.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Sce,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete o0.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};lu.requestsCount=0;lu.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",jx);else if(typeof addEventListener=="function"){const t="onpagehide"in Ho?"pagehide":"unload";addEventListener(t,jx,!1)}}function jx(){for(let t in lu.requests)lu.requests.hasOwnProperty(t)&&lu.requests[t].abort()}const Ece=(function(){const t=Mk({xdomain:!1});return t&&t.responseType!==null})();class Mce extends Cce{constructor(e){super(e);const n=e&&e.forceBase64;this.supportsBinary=Ece&&!n}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new lu(Mk,this.uri(),e)}}function Mk(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||xce))return new XMLHttpRequest}catch{}if(!e)try{return new Ho[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const kk=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class kce extends k3{get name(){return"websocket"}doOpen(){const e=this.uri(),n=this.opts.protocols,r=kk?{}:Sk(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const r=e[n],o=n===e.length-1;E3(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch{}o&&Bh(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Ck()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}}const R2=Ho.WebSocket||Ho.MozWebSocket;class Rce extends kce{createSocket(e,n,r){return kk?new R2(e,n,r):n?new R2(e,n):new R2(e)}doWrite(e,n){this.ws.send(n)}}class Tce extends k3{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const n=uce(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),o=cce();o.readable.pipeTo(e.writable),this._writer=o.writable.getWriter();const a=()=>{r.read().then(({done:s,value:l})=>{s||(this.onPacket(l),a())}).catch(s=>{})};a();const i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const r=e[n],o=n===e.length-1;this._writer.write(r).then(()=>{o&&Bh(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const Nce={websocket:Rce,webtransport:Tce,polling:Mce},Pce=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Ace=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Fv(t){if(t.length>8e3)throw"URI too long";const e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let o=Pce.exec(t||""),a={},i=14;for(;i--;)a[Ace[i]]=o[i]||"";return n!=-1&&r!=-1&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=Ice(a,a.path),a.queryKey=Oce(a,a.query),a}function Ice(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Oce(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Vv=typeof addEventListener=="function"&&typeof removeEventListener=="function",a0=[];Vv&&addEventListener("offline",()=>{a0.forEach(t=>t())},!1);class Ls extends Qn{constructor(e,n){if(super(),this.binaryType=fce,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(n=e,e=null),e){const r=Fv(e);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=Fv(n.host).host);zh(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=bce(this.opts.query)),Vv&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},a0.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const n=Object.assign({},this.opts.query);n.EIO=xk,n.transport=e,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&Ls.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(e);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Ls.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=e.data,this._onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=gce(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,Bh(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,n,r){return this._sendPacket("message",e,n,r),this}send(e,n,r){return this._sendPacket("message",e,n,r),this}_sendPacket(e,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:e,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),o&&this.once("flush",o),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}_onError(e){if(Ls.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Vv&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=a0.indexOf(this._offlineEventListener);r!==-1&&a0.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ls.protocol=xk;class Lce extends Ls{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let n=this.createTransport(e),r=!1;Ls.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ls.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function a(){r||(r=!0,d(),n.close(),n=null)}const i=f=>{const m=new Error("probe error: "+f);m.transport=n.name,a(),this.emitReserved("upgradeError",m)};function s(){i("transport closed")}function l(){i("socket closed")}function u(f){n&&f.name!==n.name&&a()}const d=()=>{n.removeListener("open",o),n.removeListener("error",i),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",o),n.once("error",i),n.once("close",s),this.once("close",l),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const n=[];for(let r=0;r<e.length;r++)~this.transports.indexOf(e[r])&&n.push(e[r]);return n}}let $ce=class extends Lce{constructor(e,n={}){const r=typeof e=="object"?e:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>Nce[o]).filter(o=>!!o)),super(e,r)}};function Dce(t,e="",n){let r=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),r=Fv(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+e,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const Bce=typeof ArrayBuffer=="function",zce=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Rk=Object.prototype.toString,Fce=typeof Blob=="function"||typeof Blob<"u"&&Rk.call(Blob)==="[object BlobConstructor]",Vce=typeof File=="function"||typeof File<"u"&&Rk.call(File)==="[object FileConstructor]";function R3(t){return Bce&&(t instanceof ArrayBuffer||zce(t))||Fce&&t instanceof Blob||Vce&&t instanceof File}function i0(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(i0(t[n]))return!0;return!1}if(R3(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return i0(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&i0(t[n]))return!0;return!1}function jce(t){const e=[],n=t.data,r=t;return r.data=jv(n,e),r.attachments=e.length,{packet:r,buffers:e}}function jv(t,e){if(!t)return t;if(R3(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=jv(t[r],e);return n}else if(typeof t=="object"&&!(t instanceof Date)){const n={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=jv(t[r],e));return n}return t}function Hce(t,e){return t.data=Hv(t.data,e),delete t.attachments,t}function Hv(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=Hv(t[n],e);else if(typeof t=="object")for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=Hv(t[n],e));return t}const Wce=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var nn;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(nn||(nn={}));class qce{constructor(e){this.replacer=e}encode(e){return(e.type===nn.EVENT||e.type===nn.ACK)&&i0(e)?this.encodeAsBinary({type:e.type===nn.EVENT?nn.BINARY_EVENT:nn.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===nn.BINARY_EVENT||e.type===nn.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(n+=e.nsp+","),e.id!=null&&(n+=e.id),e.data!=null&&(n+=JSON.stringify(e.data,this.replacer)),n}encodeAsBinary(e){const n=jce(e),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class T3 extends Qn{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let n;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(e);const r=n.type===nn.BINARY_EVENT;r||n.type===nn.BINARY_ACK?(n.type=r?nn.EVENT:nn.ACK,this.reconstructor=new Uce(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(R3(e)||e.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let n=0;const r={type:Number(e.charAt(0))};if(nn[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===nn.BINARY_EVENT||r.type===nn.BINARY_ACK){const a=n+1;for(;e.charAt(++n)!=="-"&&n!=e.length;);const i=e.substring(a,n);if(i!=Number(i)||e.charAt(n)!=="-")throw new Error("Illegal attachments");const s=Number(i);if(!Yce(s)||s<0)throw new Error("Illegal attachments");if(s>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=s}if(e.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););r.nsp=e.substring(a,n)}else r.nsp="/";const o=e.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const i=e.charAt(n);if(i==null||Number(i)!=i){--n;break}if(n===e.length)break}r.id=Number(e.substring(a,n+1))}if(e.charAt(++n)){const a=this.tryParse(e.substr(n));if(T3.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case nn.CONNECT:return Hx(n);case nn.DISCONNECT:return n===void 0;case nn.CONNECT_ERROR:return typeof n=="string"||Hx(n);case nn.EVENT:case nn.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Wce.indexOf(n[0])===-1);case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Uce{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const n=Hce(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Yce=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function Hx(t){return Object.prototype.toString.call(t)==="[object Object]"}const Gce=Object.freeze(Object.defineProperty({__proto__:null,Decoder:T3,Encoder:qce,get PacketType(){return nn}},Symbol.toStringTag,{value:"Module"}));function ma(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const Kce=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Tk extends Qn{constructor(e,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[ma(e,"open",this.onopen.bind(this)),ma(e,"packet",this.onpacket.bind(this)),ma(e,"error",this.onerror.bind(this)),ma(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){var r,o,a;if(Kce.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const i={type:nn.EVENT,data:n};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const d=this.ids++,f=n.pop();this._registerAckCallback(d,f),i.id=d}const s=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,l=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!s||(l?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[e]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let s=0;s<this.sendBuffer.length;s++)this.sendBuffer[s].id===e&&this.sendBuffer.splice(s,1);n.call(this,new Error("operation has timed out"))},o),i=(...s)=>{this.io.clearTimeoutFn(a),n.apply(this,s)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...n){return new Promise((r,o)=>{const a=(i,s)=>i?o(i):r(s);a.withError=!0,n.push(a),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((o,...a)=>(this._queue[0],o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:nn.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(r=>String(r.id)===e)){const r=this.acks[e];delete this.acks[e],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case nn.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nn.EVENT:case nn.BINARY_EVENT:this.onevent(e);break;case nn.ACK:case nn.BINARY_ACK:this.onack(e);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.CONNECT_ERROR:this.destroy();const r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:nn.ACK,id:e,data:o}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,e.data)}}}function Nu(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Nu.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-n:t+n}return Math.min(t,this.max)|0};Nu.prototype.reset=function(){this.attempts=0};Nu.prototype.setMin=function(t){this.ms=t};Nu.prototype.setMax=function(t){this.max=t};Nu.prototype.setJitter=function(t){this.jitter=t};class Wv extends Qn{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,zh(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Nu({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const o=n.parser||Gce;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new $ce(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=ma(n,"open",function(){r.onopen(),e&&e()}),a=s=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",s),e?e(s):this.maybeReconnectOnOpen()},i=ma(n,"error",a);if(this._timeout!==!1){const s=this._timeout,l=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),n.close()},s);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(o),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(ma(e,"ping",this.onping.bind(this)),ma(e,"data",this.ondata.bind(this)),ma(e,"error",this.onerror.bind(this)),ma(e,"close",this.onclose.bind(this)),ma(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){Bh(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new Tk(this,e,n),this.nsps[e]=r),r}_destroy(e){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let r=0;r<n.length;r++)this.engine.write(n[r],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const bd={};function s0(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=Dce(t,e.path||"/socket.io"),r=n.source,o=n.id,a=n.path,i=bd[o]&&a in bd[o].nsps,s=e.forceNew||e["force new connection"]||e.multiplex===!1||i;let l;return s?l=new Wv(r,e):(bd[o]||(bd[o]=new Wv(r,e)),l=bd[o]),n.query&&!e.query&&(e.query=n.queryKey),l.socket(n.path,e)}Object.assign(s0,{Manager:Wv,Socket:Tk,io:s0,connect:s0});var T2,Wx;function Xce(){if(Wx)return T2;Wx=1;var t=typeof Element<"u",e=typeof Map=="function",n=typeof Set=="function",r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function o(a,i){if(a===i)return!0;if(a&&i&&typeof a=="object"&&typeof i=="object"){if(a.constructor!==i.constructor)return!1;var s,l,u;if(Array.isArray(a)){if(s=a.length,s!=i.length)return!1;for(l=s;l--!==0;)if(!o(a[l],i[l]))return!1;return!0}var d;if(e&&a instanceof Map&&i instanceof Map){if(a.size!==i.size)return!1;for(d=a.entries();!(l=d.next()).done;)if(!i.has(l.value[0]))return!1;for(d=a.entries();!(l=d.next()).done;)if(!o(l.value[1],i.get(l.value[0])))return!1;return!0}if(n&&a instanceof Set&&i instanceof Set){if(a.size!==i.size)return!1;for(d=a.entries();!(l=d.next()).done;)if(!i.has(l.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(a)&&ArrayBuffer.isView(i)){if(s=a.length,s!=i.length)return!1;for(l=s;l--!==0;)if(a[l]!==i[l])return!1;return!0}if(a.constructor===RegExp)return a.source===i.source&&a.flags===i.flags;if(a.valueOf!==Object.prototype.valueOf&&typeof a.valueOf=="function"&&typeof i.valueOf=="function")return a.valueOf()===i.valueOf();if(a.toString!==Object.prototype.toString&&typeof a.toString=="function"&&typeof i.toString=="function")return a.toString()===i.toString();if(u=Object.keys(a),s=u.length,s!==Object.keys(i).length)return!1;for(l=s;l--!==0;)if(!Object.prototype.hasOwnProperty.call(i,u[l]))return!1;if(t&&a instanceof Element)return!1;for(l=s;l--!==0;)if(!((u[l]==="_owner"||u[l]==="__v"||u[l]==="__o")&&a.$$typeof)&&!o(a[u[l]],i[u[l]]))return!1;return!0}return a!==a&&i!==i}return T2=function(i,s){try{return o(i,s)}catch(l){if((l.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw l}},T2}var Zce=Xce();const Qce=Ea(Zce),{createContext:Jce,useCallback:ha,useContext:N3,useEffect:$l,useLayoutEffect:eue,useMemo:tue,useRef:Di,useState:Rs}=await q("react"),l0={connected:null,realConnected:null,isInitialConnecting:!0,socketId:null,getSocketId:()=>null,setSocketUrl:()=>{},socketEventOn:()=>{},socketEventOff:()=>{},socketEventEmit:()=>{},setPrevResponse:()=>{},getPrevResponse:()=>null},Fh=Jce(l0),Pve=({url:t,socketOptions:e={},children:n,loadingElement:r})=>{const{transports:o=["websocket","polling"],reconnectionAttempts:a=1/0,reconnectionDelay:i=1e3,reconnectionDelayMax:s=5e3,timeout:l=2e4,...u}=e,d=Di(null),f=Di({}),m=Di({}),v=Di({}),[g,w]=Rs(t),[y,_]=Rs(l0.realConnected),[S,x]=Rs(l0.connected),[C,R]=Rs(l0.isInitialConnecting),[P,O]=Rs(null);$l(()=>{w(t)},[t]);const $=ha(D=>{w(D)},[]),A=ha((D,U)=>{Object.values(f.current[D]??{}).forEach(Y=>{Y(U)})},[]),M=ha((D,U)=>{d.current?.emit(D,U)},[]),L=ha(({topic:D,id:U,subscribePayload:Y},oe)=>{if(f.current[D]||(f.current[D]={}),!d.current?.hasListeners(D)){const Q={topic:D,...Y??{}};Y&&Object.keys(Y).length>0&&(v.current[D]=Y),M("subscribe",Q),d.current?.on(D,re=>{A(D,re)})}f.current[D][U]=oe},[M,A]),B=ha(({topic:D,id:U})=>{if(f.current[D]?.[U]&&(delete f.current[D][U],Object.keys(f.current[D]).length===0)){d.current?.off(D);const Y=v.current[D],oe=Y?{topic:D,...Y}:{topic:D};M("unsubscribe",oe),delete v.current[D]}},[M]),F=ha((D,U)=>m.current[D]?.[U],[]),N=ha((D,U)=>{m.current[D]={raw:U,parsed:m0(U)}},[]),V=ha(()=>d.current?.id??null,[]),z=ha(()=>{d.current&&(d.current.disconnect(),d.current=null),d.current=s0(g,{transports:o,reconnectionAttempts:a,reconnectionDelay:i,reconnectionDelayMax:s,timeout:l,...u}),Object.keys(f.current).forEach(D=>{Object.keys(f.current[D]??{}).length>0&&d.current?.on(D,U=>{A(D,U)})}),d.current.on("connect",()=>{console.log("Socket.io connected"),x(!0),_(!0),O(d.current?.id??null),A("connect","connected")}),d.current.on("disconnect",D=>{console.log("Socket.io disconnected",D),_(!1),A("disconnect","disconnected")}),d.current.io.on("reconnect",D=>{console.log("Socket.io reconnect",D),A("reconnect",D),Object.keys(f.current).forEach(U=>{if(Object.keys(f.current[U])?.length){const Y={topic:U,...v.current[U]??{}};M("subscribe",Y),d.current?.emit("subscribe",Y)}})}),d.current.io.on("reconnect_attempt",D=>{console.log("Socket.io reconnect_attempt",D),D>3&&x(!1),A("reconnect_attempt",D)}),d.current.io.on("reconnect_error",D=>{A("reconnect_error",D)}),d.current.io.on("reconnect_failed",()=>{console.error("Socket.io reconnect_failed"),x(!1),_(!1),A("reconnect_failed","reconnect_failed")}),d.current.on("error",D=>{console.error("Socket.io error: ",D),A("error",D)})},[A,a,i,s,JSON.stringify(u),JSON.stringify(o),g]),I=tue(()=>({connected:S,realConnected:y,isInitialConnecting:C,socketId:P,getSocketId:V,setSocketUrl:$,socketEventOn:L,socketEventOff:B,socketEventEmit:M,setPrevResponse:N,getPrevResponse:F}),[S,y,C,P,V,$,L,B,M,N,F]);return eue(()=>{z()},[z]),$l(()=>{!S&&m.current&&Object.keys(m.current).forEach(D=>{M(D,void 0),N(D,void 0)})},[S,N,M]),$l(()=>{S&&R(!1)},[S]),h(Fh.Provider,{value:I,children:n})},Ave=()=>{const{connected:t,realConnected:e,socketEventEmit:n,setSocketUrl:r,socketId:o,getSocketId:a}=N3(Fh);return{connected:t,realConnected:e,socketEventEmit:n,setSocketUrl:r,socketId:o,getSocketId:a}},nue=t=>{const{socketEventOn:e,socketEventOff:n,setPrevResponse:r,getPrevResponse:o}=N3(Fh),a=Di({options:t.options,callback:t.callback}),[i]=Rs(kn.uniqueId()),{topic:s}=t;$l(()=>{a.current={options:t.options,callback:t.callback}},[t]),$l(()=>{if(!t.options?.disabled)return e({topic:s,id:i,subscribePayload:t.options?.subscribePayload},l=>{const{options:u,callback:d}=a.current;u?.prevData,r(s,l);const f=m0(l);d?.(f)}),()=>{n({topic:s,id:i})}},[o,r,n,e,s,i,t.options?.disabled,t.options?.subscribePayload])},Ive=(t,e={})=>{const{realConnected:n,isInitialConnecting:r,getPrevResponse:o,setPrevResponse:a}=N3(Fh),[i,s]=Rs(!o(t,"parsed")&&!!e.defaultValue),l=n?o(t,"parsed")??e.defaultValue:e.defaultValue,[u,d]=Rs(e.selector?e.selector(l):l),f=Di(u),m=Di(i),v=Di(e);f.current=u,m.current=i,v.current=e;const g=ha(S=>{e.disabled||(d(e.selector?e.selector(S):S),a(t,S),s(!1))},[a,t,e]),w=e.throttleMs??0,y=Di({timer:null,pending:null,hasPending:!1}),_=ha(S=>{const x=e.selector?e.selector(S):S;!e.disableDuplicateCheck&&Qce(x,f.current)&&!m.current||(d(x),x&&s(!1))},[e]);return $l(()=>{const S=y.current;return()=>{S.timer&&clearTimeout(S.timer)}},[]),nue({topic:t,callback:S=>{if(w<=0){_(S);return}const x=y.current;x.pending=S,x.hasPending=!0,!x.timer&&(x.timer=setTimeout(()=>{x.timer=null,x.hasPending&&(x.hasPending=!1,_(x.pending),x.pending=null)},w))},options:{...e,prevData:u,subscribePayload:e.subscribePayload}}),$l(()=>{if(!n){const S=v.current,x=S.defaultValue===void 0?void 0:S.selector?S.selector(S.defaultValue):S.defaultValue;d(x),a(t,void 0),s(S.defaultValue!==void 0)}},[n,a,t]),{data:u,changeData:g,loading:!u&&!r,isDefaultData:i}},{useRef:Ove}=await q("react"),{useMutation:Lve}=await q("@tanstack/react-query"),{useMutation:$ve}=await q("@tanstack/react-query"),{useMutation:Dve}=await q("@tanstack/react-query"),{useMutation:Bve}=await q("@tanstack/react-query"),{useMutation:zve}=await q("@tanstack/react-query"),{useMutation:Fve}=await q("@tanstack/react-query"),{useMutation:Vve}=await q("@tanstack/react-query"),{useMutation:jve}=await q("@tanstack/react-query"),{useMutation:Hve}=await q("@tanstack/react-query"),{useCallback:Wve}=await q("react"),{useCallback:qve}=await q("react"),{useMutation:Uve}=await q("@tanstack/react-query"),{useMutation:Yve,useQueryClient:Gve}=await q("@tanstack/react-query"),{useMutation:Kve,useQueryClient:Xve}=await q("@tanstack/react-query"),{useMutation:Zve,useQueryClient:Qve}=await q("@tanstack/react-query"),{useMutation:Jve}=await q("@tanstack/react-query"),{useMutation:ewe}=await q("@tanstack/react-query"),{useMutation:twe}=await q("@tanstack/react-query"),{useMutation:nwe}=await q("@tanstack/react-query"),{useMutation:rwe}=await q("@tanstack/react-query"),{useMutation:owe}=await q("@tanstack/react-query"),{useMutation:awe}=await q("@tanstack/react-query"),{useMutation:iwe}=await q("@tanstack/react-query"),{useMutation:swe}=await q("@tanstack/react-query"),{useMutation:lwe}=await q("@tanstack/react-query"),{useMutation:cwe}=await q("@tanstack/react-query"),{useMutation:uwe}=await q("@tanstack/react-query"),{useMutation:dwe}=await q("@tanstack/react-query"),{useMutation:fwe}=await q("@tanstack/react-query"),{useMutation:pwe}=await q("@tanstack/react-query"),{useMutation:hwe}=await q("@tanstack/react-query"),{useMutation:mwe}=await q("@tanstack/react-query"),{useMutation:gwe}=await q("@tanstack/react-query"),{useMutation:vwe}=await q("@tanstack/react-query"),{useMutation:wwe}=await q("@tanstack/react-query"),{useMutation:bwe}=await q("@tanstack/react-query"),{useMutation:ywe}=await q("@tanstack/react-query"),{useMutation:_we}=await q("@tanstack/react-query"),{useMutation:xwe}=await q("@tanstack/react-query"),{useMutation:Swe}=await q("@tanstack/react-query"),{useMutation:Cwe}=await q("@tanstack/react-query"),{useMutation:Ewe}=await q("@tanstack/react-query"),{useMutation:Mwe}=await q("@tanstack/react-query"),{useMutation:kwe}=await q("@tanstack/react-query"),{useMutation:Rwe}=await q("@tanstack/react-query"),{useMutation:Twe}=await q("@tanstack/react-query"),{useMutation:Nwe}=await q("@tanstack/react-query"),{useMutation:Pwe}=await q("@tanstack/react-query"),{useMutation:Awe}=await q("@tanstack/react-query"),{useMutation:Iwe}=await q("@tanstack/react-query"),{useMutation:Owe}=await q("@tanstack/react-query"),{useMutation:Lwe}=await q("@tanstack/react-query"),{useMutation:$we}=await q("@tanstack/react-query"),{useMutation:Dwe}=await q("@tanstack/react-query"),{useMutation:Bwe}=await q("@tanstack/react-query"),{useMutation:zwe}=await q("@tanstack/react-query"),{useMutation:rue}=await q("@tanstack/react-query"),oue="/setUrl",Fwe=()=>rue({mutationFn:t=>Th.post(oue,t)}),{useMutation:Vwe}=await q("@tanstack/react-query"),{useMutation:jwe}=await q("@tanstack/react-query"),{useCallback:Hwe}=await q("react"),{useMutation:Wwe}=await q("@tanstack/react-query"),{useCallback:qwe}=await q("react"),{useMutation:Uwe}=await q("@tanstack/react-query"),{useCallback:Ywe}=await q("react"),{useMutation:Gwe}=await q("@tanstack/react-query"),{useCallback:Kwe}=await q("react"),{useMutation:Xwe}=await q("@tanstack/react-query"),{useCallback:Zwe}=await q("react"),{useMutation:Qwe}=await q("@tanstack/react-query"),{useCallback:Jwe}=await q("react"),{useMutation:e3e}=await q("@tanstack/react-query"),{useCallback:t3e}=await q("react"),{useMutation:n3e}=await q("@tanstack/react-query"),{useMutation:r3e}=await q("@tanstack/react-query"),{useMutation:o3e}=await q("@tanstack/react-query"),{useMutation:a3e}=await q("@tanstack/react-query"),{useMutation:i3e}=await q("@tanstack/react-query"),{useMutation:s3e}=await q("@tanstack/react-query"),{useMutation:l3e}=await q("@tanstack/react-query"),{useMutation:c3e}=await q("@tanstack/react-query"),{useMutation:u3e}=await q("@tanstack/react-query"),{useCallback:d3e}=await q("react"),{useMutation:f3e}=await q("@tanstack/react-query"),{useCallback:p3e}=await q("react"),{useEffect:h3e,useRef:m3e,useState:g3e}=await q("react"),{useMutation:v3e}=await q("@tanstack/react-query"),{useEffect:w3e,useRef:b3e,useState:y3e}=await q("react"),{useMutation:_3e}=await q("@tanstack/react-query"),{useMutation:x3e}=await q("@tanstack/react-query"),{useMutation:S3e}=await q("@tanstack/react-query"),{useMutation:C3e}=await q("@tanstack/react-query"),{useEffect:E3e,useMemo:M3e,useState:k3e}=await q("react"),{useMemo:R3e}=await q("react"),aue={moveState:{autoMove:"stop",moveId:"",moveResult:"",dockMove:"",jogMove:"none",obs:"none",pathState:"none",step:0,multiId:"",multiState:""},pose:{x:0,y:0,rz:0},vel:{vx:0,vy:0,wz:0},curNode:{id:"",name:"",state:"",pose:{x:0,y:0,rz:0}},goalNode:{id:"",name:"",state:"",pose:{x:0,y:0,rz:0}}},iue=t=>({...t,pose:{x:String(t.pose.x),y:String(t.pose.y),rz:String(t.pose.rz)}});iue(aue);const{useCallback:T3e,useMemo:N3e}=await q("react"),{useMemo:P3e}=await q("react"),{useRef:A3e}=await q("react"),{useCallback:I3e,useEffect:O3e,useRef:L3e,useState:$3e}=await q("react"),{useCallback:D3e}=await q("react"),{useCallback:B3e}=await q("react"),{useEffect:qx,useState:sue}=await q("react"),lue=t=>{const[e,n]=sue("");return qx(()=>{},[e,t]),qx(()=>{let r="",o;const a=i=>{clearTimeout(o);const s=document.activeElement;if(!(s&&(s.tagName==="INPUT"||s.tagName==="TEXTAREA"||s.tagName==="SELECT"||s.contentEditable==="true"))){if(i.key==="Enter"){n(r.trim()),r="";return}/^[a-zA-Z0-9\-_]$/.test(i.key)&&(r+=i.key),o=setTimeout(()=>{n(r.trim()),r=""},100)}};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[]),{barCodeValue:e}},{useMemo:z3e}=await q("react"),{useEffect:F3e,useRef:V3e,useCallback:j3e}=await q("react"),{useRef:cue,useState:uue}=await q("react"),H3e=({onFiles:t,accept:e,multiple:n=!0,onRejected:r})=>{const o=cue(null),[a,i]=uue(!1),s=v=>{const g=n?v:v.slice(0,1);if(g.length===0)return;if(!e||e.length===0){t(g);return}const w=e.map(S=>S.toLowerCase()),y=g.filter(S=>w.some(x=>S.name.toLowerCase().endsWith(x))),_=g.filter(S=>!y.includes(S));_.length>0&&r?.(_),y.length>0&&t(y)},l=v=>{v.preventDefault(),v.stopPropagation(),i(!0)},u=v=>{v.preventDefault(),v.stopPropagation(),i(!1)},d=v=>{v.preventDefault(),v.stopPropagation(),i(!1),s(Array.from(v.dataTransfer.files))},f=()=>o.current?.click(),m={ref:o,type:"file",multiple:n,accept:e?.join(","),style:{display:"none"},onChange:v=>{s(Array.from(v.target.files??[])),v.target.value=""}};return{isDragging:a,dropProps:{onDragOver:l,onDragLeave:u,onDrop:d},inputProps:m,open:f}},due={"popover-area":"_popover-area_y74pu_40","btn-popover":"_btn-popover_y74pu_45","popover-element-wrap":"_popover-element-wrap_y74pu_59","popover-element":"_popover-element_y74pu_59"},{cloneElement:fue,forwardRef:pue,useCallback:yd,useEffect:hue,useImperativeHandle:mue,useMemo:Ux,useRef:Yx,useState:Gx}=await q("react"),d1=rn(due,"rb-ui"),Kx=[],P3=pue(({id:t,className:e="",popoverAreaClassName:n,popoverElementClassName:r,anchorId:o,detectDoubleClick:a,popoverElement:i,popoverStyle:s={top:0,left:0,zIndex:1},popoverAnimation:l={name:"pop-fade",duration:200},ripple:u,disabled:d=!1,excludeOutSideIds:f=Kx,whenWindowScrollClose:m,children:v,onClick:g,onClose:w},y)=>{const _=Yx(null),S=Yx(!1),[x,C]=Gx(!1),[R,P]=Gx(""),O=Ux(()=>x?R==="enter"||R==="leave"?{animationName:l.name,animationDuration:`${l.duration}ms`,animationTimingFunction:l.timingFunc||"ease",animationDirection:R==="leave"?"reverse":"normal",animationFillMode:R==="leave"?"forwards":"normal"}:{}:{},[l,x,R]),$=yd(N=>new Promise(V=>setTimeout(V,N)),[]),A=yd(async()=>{!o||R==="leave"||(P(""),await $(10),P("leave"),await $(l.duration),C(!1),w?.())},[o,R,l.duration,$,w]),M=yd(async()=>{o&&(C(!0),P("enter"),await $(l.duration),P(""))},[o,l.duration,$]),L=yd(()=>{x?A():M()},[x,A,M]),B=yd(async N=>{d||S.current&&a||(S.current=!0,setTimeout(()=>{S.current=!1},500),L(),g?.(N))},[a,d,L,g]),F=Ux(()=>{const N=typeof i?.type=="string"?void 0:{close:A};return h("div",{className:d1("popover-element-wrap",r),draggable:!1,children:x&&h("div",{className:d1("popover-element",R),style:{...s,...O},children:fue(i??h(Mr,{}),N)})})},[O,A,x,i,r,s,R]);return Nf(_,N=>{const V=[...f,o].filter(I=>!!I).concat(Kx).map(I=>document.querySelector(`#${I}`)).filter(I=>I),z=N.target;document.body.contains(z)&&(z.closest('[data-slot="select-drop-box"]')||V.some(I=>I?.contains(z))||x&&A())},{event:"mouseup"}),hue(()=>{const N=()=>{C(!1),P("")};return x&&m&&window.addEventListener("scroll",N),()=>{window.removeEventListener("scroll",N)}},[m,x]),mue(y,()=>({close:A,open:M})),te("div",{ref:_,id:t,className:d1("popover-area",n),children:[h(Rr,{...u,disabled:d||u?.disabled,children:h("button",{className:d1("btn-popover",e,x&&"open",d&&"pointer-events-none cursor-not-allowed"),"data-pad-focus":"true",disabled:d,onClick:B,children:v})}),o?h(Gl,{id:o,children:F}):null]})});P3.displayName="PopoverButton";function Nk({className:t,onCancel:e,onConfirm:n,onReset:r,labels:o}){return te(Yo,{className:ae("w-full p-4",t),justifyContent:"space-between",alignItems:"center",children:[h(Wr,{variant:"transparent",size:"sm",onClick:r,children:o?.reset??"Reset"}),te(Yo,{inline:!0,alignItems:"center",gap:4,children:[h(Wr,{className:"light:bg-fill-subtlest",variant:"soft",size:"sm",onClick:e,children:o?.cancel??"Cancel"}),h(Wr,{variant:"brand",size:"sm",onClick:n,children:o?.confirm??"Confirm"})]})]})}const gue=he(["inline-flex items-center overflow-hidden","bg-fill-control-surface outline outline-1 outline-offset-[-1px]","transition-colors"].join(" "),{variants:{size:{xs2:"px-2_5 h-8 rounded-md",sm:"px-2_5 h-9 rounded-md",md:"h-10 rounded-md px-3",lg:"h-12 rounded-lg px-3"},variant:{default:"outline-border-default"},focus:{true:"outline-border-input-focused",false:""},error:{true:"outline-border-danger-stronger",false:""},readOnly:{true:"bg-fill-control-surface-disabled outline-border-disabled",false:""},disabled:{true:"bg-fill-control-surface-disabled outline-border-disabled hover:bg-fill-control-surface-disabled text-fg-disabled pointer-events-none cursor-not-allowed",false:""}},compoundVariants:[{variant:"default",focus:!1,error:!1,readOnly:!1,disabled:!1,className:"[&:hover]:bg-fill-control-surface-hovered [&:hover]:outline-border-default"},{focus:!0,className:"[&:hover]:bg-fill-control-surface [&:hover]:outline-border-input-focused"},{error:!0,className:"[&:hover]:bg-fill-control-surface [&:hover]:outline-border-danger-stronger"},{readOnly:!0,className:"[&:hover]:bg-fill-control-surface-disabled [&:hover]:outline-border-disabled"},{disabled:!0,className:"[&:hover]:bg-fill-control-surface-disabled [&:hover]:outline-border-disabled"}],defaultVariants:{size:"md",variant:"default",focus:!1,error:!1,readOnly:!1,disabled:!1}}),vue=he("flex-1 truncate text-left",{variants:{size:{xs2:"typo-compact-xs2-normal pr-1",sm:"typo-compact-sm-normal pr-1",md:"typo-compact-sm2-normal pr-1_5",lg:"typo-compact-sm2-normal pr-2"},placeholder:{true:"text-fg-subtler font-normal",false:"text-fg-default font-medium"},disabled:{true:"text-fg-disabled",false:""}},defaultVariants:{size:"md",placeholder:!0,disabled:!1}}),wue=he("inline-flex shrink-0 items-center justify-center",{variants:{size:{xs2:"size-4",sm:"size-4",md:"size-5",lg:"size-5"},disabled:{true:"text-fg-disabled",false:"text-fg-default"}},defaultVariants:{size:"md",disabled:!1}}),bue=he(["absolute left-0 z-[999999] max-w-0","bg-overlay outline-border-subtle rounded-md outline outline-1 outline-offset-[-1px]","shadow-down-xs","overflow-x-hidden"].join(" "),{variants:{mode:{default:"no-scrollbar max-h-60 overflow-y-auto p-1",empty:"p-1_5 h-48 max-h-56",loading:"p-1_5 h-48 max-h-56"}},defaultVariants:{mode:"default"}}),yue=he("text-center",{variants:{size:{xs2:"typo-compact-xs2-normal",sm:"typo-compact-sm-normal",md:"typo-compact-sm2-normal",lg:"typo-compact-sm2-normal"}},defaultVariants:{size:"md"}}),_ue=he("inline-flex h-9 w-full items-center overflow-hidden rounded-sm px-3",{variants:{selected:{true:"",false:""},disabled:{true:"",false:""},hovered:{true:"bg-fill-transparent-hovered",false:"bg-fill-transparent"}},compoundVariants:[{selected:!1,disabled:!1,hovered:!1,className:"text-fg-subtler font-normal"},{selected:!1,disabled:!1,hovered:!0,className:"text-fg-default font-normal"},{selected:!0,disabled:!1,className:"text-fg-default font-semibold"},{selected:!1,disabled:!0,className:"text-fg-disabled font-normal"},{selected:!0,disabled:!0,className:"text-fg-disabled font-semibold"}],defaultVariants:{selected:!1,disabled:!1,hovered:!1}}),xue=he("line-clamp-1 flex-1 pr-4 text-left",{variants:{size:{xs2:"typo-compact-xs2-normal",sm:"typo-compact-xs2-normal",md:"typo-compact-xs2-normal",lg:"typo-compact-xs2-normal"}},defaultVariants:{size:"md"}}),{useCallback:Sue,useMemo:Cue,useState:Eue}=await q("react"),qv=({className:t="",size:e="md",text:n,value:r,label:o,children:a,description:i,selectedValue:s="",searchText:l="",enableGamepadFocus:u,disabled:d,handleChange:f})=>{const m=s===r,[v,g]=Eue(!1),w=Cue(()=>l?kn.lowerCase(n).includes(kn.lowerCase(l)):!1,[n,l]),y=Sue(_=>{_.button===2||d||f?.({label:o??a,value:r})},[a,d,f,r,o]);return h("div",{"data-slot":"select-option",className:ae(_ue({selected:m,disabled:!!d,hovered:!d&&(w||v)}),i&&"h-auto min-h-9 overflow-visible py-2",t,{active:m}),role:"button","data-pad-focus":u&&!d?"true":"false",tabIndex:-1,onClick:y,onMouseEnter:()=>{d||g(!0)},onMouseLeave:()=>g(!1),children:te("div",{"data-slot":"select-option-content",className:"flex min-w-0 flex-1 items-center gap-2",children:[te("div",{"data-slot":"select-option-text",className:ae("min-w-0 flex-1",xue({size:e}),i&&"line-clamp-none"),children:[a,i&&h("div",{"data-slot":"select-option-description",className:"typo-compact-xs-normal text-fg-subtle",children:i})]}),m&&h(js,{"aria-hidden":!0,"data-slot":"select-option-check",className:ae("size-4 shrink-0",d?"text-fg-disabled":"text-fg-default")})]})})};qv.displayName="Option";const Pk=he("",{variants:{size:{xs2:"typo-compact-xs-normal",sm:"typo-compact-xs2-normal",md:"typo-compact-sm2-normal",lg:"typo-compact-sm2-normal",xl:"typo-compact-lg-normal"}},defaultVariants:{size:"md"}}),A3=({className:t,nullText:e="no data",children:n,style:r,size:o})=>te("div",{"data-slot":"no-data",className:ae("text-fg-subtle flex flex-col items-center justify-center gap-1",t,Pk({size:o})),style:r,children:[h("span",{"data-slot":"no-data-icon",className:"inline-flex items-center justify-center",children:n}),h("div",{"data-slot":"no-data-text",children:e})]}),{useEffect:Mue,useRef:kue,useMemo:Rue,Children:Tue}=await q("react"),Nue=({className:t,children:e,size:n,noDataMsg:r=h(A3,{className:ae(Pk({size:n}),"flex h-full w-full items-center justify-center")}),...o})=>{const a=kue(null),i=Rue(()=>Tue.map(e,s=>s).length===0,[e]);return Mue(()=>{setTimeout(()=>{const s=document.querySelector('[data-slot="dialog-content"]');if(s&&o.open){const l=s.querySelector(".active");typeof s.scrollTo=="function"&&s.scrollTo(0,l?.offsetTop??0)}},50)},[o.open]),h(tc,{"data-slot":"select-modal-drop-box",className:ae("bg-overlay shadow-down-xs border-subtle max-h-[calc(var(--vh,1vh)*50)] w-min max-w-[90vw] min-w-80 overflow-y-auto p-1 outline-hidden",t),...o,children:h("div",{ref:a,"data-slot":"select-modal-drop-box-list",className:ae(i?"flex min-h-60 items-stretch":""),children:i?r:e})})},{Children:Pue,forwardRef:Aue,useCallback:N2,useEffect:yl,useImperativeHandle:Iue,useMemo:Xx,useRef:Zx}=await q("react"),Oue=4,Ak=Aue((t,e)=>{const{className:n,theme:r,size:o,children:a,label:i,inputEl:s,parentEl:l,maxHeight:u=200,search:d,searchText:f="",searchPlaceholder:m,noDataMsg:v=h(A3,{className:ae(yue({size:o}),"flex h-full w-full items-center justify-center")}),direction:g="bottom",showCloseBtn:w,whenScrollCloseDropBox:y,setOpen:_,handleSearchTextChange:S,handleKeyPress:x}=t,C=Zx(null),R=Zx(null),{isMobile:P}=s3(),O=g==="top"?"top-start":"bottom-start",{refs:$,floatingStyles:A,update:M}=u7({placement:O,strategy:"fixed",whileElementsMounted:l7,middleware:[d7(Oue),p7({fallbackPlacements:g==="top"?["bottom-start"]:["top-start"]}),f7({padding:8}),h7({apply({availableHeight:I,rects:D,elements:U}){const Y=Math.min(u,Math.max(120,I));Object.assign(U.floating.style,{minWidth:`${D.reference.width}px`,maxHeight:`${Y}px`})}})]}),L=window.innerHeight*.01;document.documentElement.style.setProperty("--vh",L+"px");const B=Xx(()=>Pue.map(a,I=>I).length===0,[a]),F=Xx(()=>P?i||w:!1,[P,i,w]),N=N2(I=>{const{value:D}=I.target;S(D)},[S]),V=N2(()=>{S("")},[S]),z=N2(()=>{s&&s.blur(),_(!1)},[s,_]);return yl(()=>{const I=R.current;if(I){const D=I.querySelector(".active");if(D&&typeof I.scrollTo=="function"){const U=D.getBoundingClientRect().top-I.getBoundingClientRect().top+I.scrollTop;I.scrollTo(0,U)}}},[l]),yl(()=>{if(R){const I=R.current,D=I.querySelector(".match");D&&([...I.children].map(U=>U.classList.remove("match")),D.classList.add("match"),I.scrollTo(0,D.offsetTop))}},[f,R]),yl(()=>{const I=()=>{window.innerWidth<800||(_(!1),s&&s.blur())};return window.removeEventListener("resize",I),window.addEventListener("resize",I),y&&(window.removeEventListener("scroll",I),window.addEventListener("scroll",I)),()=>{window.removeEventListener("scroll",I),window.removeEventListener("resize",I)}},[s,_,y]),yl(()=>(P&&D8(),()=>{P&&B8()}),[P]),Iue(e,()=>C.current),yl(()=>{$.setReference(l)},[l,$]),yl(()=>{const D=(Y=>{const oe=[];let Q=Y?.parentElement??null;for(;Q;){const re=window.getComputedStyle(Q),le=re.overflowY,ee=re.overflowX;(/(auto|scroll|overlay)/.test(le)||/(auto|scroll|overlay)/.test(ee))&&oe.push(Q),Q=Q.parentElement}return oe.push(window),oe})(l),U=()=>{M()};return D.forEach(Y=>Y.addEventListener("scroll",U,{passive:!0})),window.addEventListener("resize",U,{passive:!0}),()=>{D.forEach(Y=>Y.removeEventListener("scroll",U)),window.removeEventListener("resize",U)}},[l,M]),yl(()=>{let I=0;const D=()=>{M(),I=window.requestAnimationFrame(D)};return I=window.requestAnimationFrame(D),()=>{window.cancelAnimationFrame(I)}},[M]),te("div",{ref:I=>{C.current=I,$.setFloating(I)},"data-slot":"select-drop-box","data-pad-scope":"dropdown-box","data-theme":r,role:"button",tabIndex:-1,className:ae(bue({mode:B?"empty":"default"}),"!fixed !top-0 !left-0 flex flex-col",n),style:A,onKeyDown:x,children:[F&&te("div",{"data-slot":"select-drop-box-header",className:"border-subtle flex items-center gap-2 border-b px-2 py-2",children:[i&&h("label",{"data-slot":"select-drop-box-label",className:"text-fg-default flex-1 text-sm font-medium",children:i}),w&&h("button",{type:"button","data-slot":"select-drop-box-close",className:"text-fg-subtle ml-auto px-2 text-sm",onClick:z,children:h(df,{})})]}),d&&h("div",{"data-slot":"select-drop-box-search",className:"border-subtle border-b p-1",children:h(sw,{type:"text",size:o,className:"w-full",placeholder:m,value:f,prefixIcon:h(Z0,{className:"text-fg-subtle size-4"}),onChange:N,onKeyDown:x,handleReset:V})}),h("div",{ref:R,"data-slot":"select-drop-box-list",className:ae("min-h-0 overflow-y-auto",B?"flex flex-1 items-stretch":""),children:B?v:a})]})});Ak.displayName="SelectDropBox";const{Children:Lue,cloneElement:$ue,useCallback:qc,useEffect:f1,useMemo:p1,useRef:h1,useState:_l,forwardRef:Due,useImperativeHandle:Bue}=await q("react"),Uv=Due((t,e)=>{const{className:n="",size:r="md",children:o,name:a,value:i,error:s,search:l,mobileLabel:u,placeholder:d,disabled:f,readOnly:m,dropBoxClassName:v,maxDropBoxHeight:g=200,modalBoxClassName:w,selectArrow:y=h(K0,{}),keepDropDown:_,searchPlaceholder:S="Search",showCloseBtn:x,whenScrollCloseDropBox:C,enableModal:R=!xo.isDesktop,enableGamepadFocus:P=!0,noDataMsg:O,onClick:$,handleChange:A,...M}=t,L=h1(null),B=h1(null),F=h1(null),N=h1(Date.now()),[V,z]=_l(i),[I,D]=_l(""),[U,Y]=_l(""),[oe,Q]=_l(!1),[re,le]=_l(!1),[ee,ne]=_l(null),[ue,ve]=_l(null),we=p1(()=>{const qe=({value:ht})=>{f||(z(ht),A?.(ht,a),L.current.value=String(ht),M.onChange?.({target:L.current}),_||Q(!1))},_e=ht=>(ht??[]).flatMap(st=>{if(!st?.props)return[];if(st.type?.displayName==="Option"){let Ct;return st.props.text||(typeof st.props.label=="string"?Ct=st.props.label:typeof st.props.children=="string"?Ct=st.props.children:Ct=st.props.value.toString()),$ue(st,{...st.props,size:r,text:Ct.toLowerCase(),selectedValue:V,searchText:I,handleChange:qe,enableGamepadFocus:P})}return Array.isArray(st.props.children)?_e(st.props.children):[]}),at=Lue.map(o,ht=>ht);return _e(at)},[o,f,A,a,M,_,r,V,I,P]),ye=p1(()=>we.filter(qe=>qe.props.text.toLowerCase().includes(U.toLowerCase())),[we,U]),Le=p1(()=>we.find(qe=>{const _e=qe.props.value;return _e===V||_e===i}),[we,V,i]),Oe=p1(()=>{if(!Le){const at=we[0]?.props;return{text:d??at?.label??at?.children??"",isPlaceholder:!!d}}const{label:qe,children:_e}=Le.props;return{text:qe??_e??"",isPlaceholder:!1}},[Le,we,d]),Ne=qc(()=>{const qe=Date.now();if(qe-N.current<300){N.current=qe;return}if($)$();else{if(f||m)return;const at=B.current?.closest("[data-theme]")?.getAttribute("data-theme");ne(at),Q(ht=>!ht),N.current=qe}},[f,m,$]),me=qc(qe=>{D(qe),Y(qe)},[]),pe=qc(()=>{if(!oe){Q(!0);return}const qe=we.find(_e=>_e.props.text.includes(I.toLowerCase()));if(qe){const _e=qe.props;z(_e.value),A?.(_e.value,a),L.current.value=String(_e.value||""),M.onChange?.({target:L.current}),Q(!1),L.current.blur()}},[A,M,a,oe,we,I]),be=qc(qe=>{let _e;const at=we.findIndex(st=>{const Ct=st.props;return I?Ct.text===I:Ct.value===V});qe==="down"?_e=at+1>=we.length?we[0]:we[at+1]:_e=at<=0?we[we.length-1]:we[at-1];const ht=_e.props.text;D(ht)},[we,V,I]),Ue=qc(qe=>{qe.key==="Enter"&&!qe.nativeEvent.isComposing?pe():qe.key==="ArrowDown"?(be("down"),qe.preventDefault()):qe.key==="ArrowUp"&&(be("up"),qe.preventDefault())},[pe,be]),He=qc((qe,_e)=>{le(_e),_e?M.onFocus?.(qe):M.onBlur?.(qe)},[M]);return Nf(B,qe=>{!("button"in qe&&qe.button===2)&&!F.current?.contains(qe.target)&&Q(!1)},{offTouchEvent:!0}),f1(()=>{if(we.length&&!d&&!Le){const _e=we[0].props.value;z(L.current?.value??_e)}},[d,Le,we]),f1(()=>{typeof i<"u"&&z(i)},[i]),f1(()=>{oe||(D(""),Y(""))},[oe]),f1(()=>{if(!oe){ve(null);return}const qe=B.current?.closest('[data-slot="dialog-content"]');ve(qe instanceof HTMLElement?qe:null)},[oe]),Bue(e,()=>(L.current.handleClickSelectBox=Ne,{...L.current,get value(){return L.current.value},set value(qe){z(_e=>typeof _e=="string"&&_e===qe||typeof _e=="number"&&_e===Number(qe)||typeof _e=="boolean"&&String(_e)===String(qe)?_e:qe),L.current.value=qe}})),te(Mr,{children:[h("div",{ref:B,"data-slot":"select-box",className:ae(gue({size:r,variant:"default",focus:re,error:s,disabled:f,readOnly:m}),n),onClick:Ne,children:te("label",{"data-slot":"select-box-control",className:"relative flex w-full min-w-0 items-center",children:[h("div",{"data-slot":"select-box-value",className:vue({size:r,placeholder:Oe.isPlaceholder,disabled:f}),children:h("span",{children:Oe.text})}),h("input",{...M,ref:L,type:"text",value:V??L.current?.value??"",name:a,readOnly:!0,className:"sr-only","data-pad-focus":P?"true":"false",onFocus:qe=>He(qe,!0),onBlur:qe=>He(qe,!1),onKeyDown:Ue}),h("span",{"data-slot":"select-box-icon",className:ae(wue({size:r,disabled:f}),"transition-transform duration-200",oe&&"rotate-180"),children:y})]})}),R&&h(Nue,{className:w,type:"dialog",open:oe,size:r,hideCloseButton:!0,onOpenChange:Q,noDataMsg:O,children:ye}),!R&&oe&&h(Gl,{container:ue,children:h(Ak,{ref:F,className:v,size:r,label:u,inputEl:L.current,parentEl:B.current,theme:ee,maxHeight:g,setOpen:Q,search:l,searchText:I,searchPlaceholder:S,showCloseBtn:x,whenScrollCloseDropBox:C,noDataMsg:O,handleSearchTextChange:me,handleKeyPress:Ue,children:ye})})]})});Uv.displayName="RBSelectBox";const zue=he("inline-flex w-full items-start gap-2",{defaultVariants:{controlPlacement:"start",size:"default",tone:"default",type:"default"},compoundVariants:[{className:"outline-border-danger-stronger",tone:"invalid",type:"box"}],variants:{controlPlacement:{end:"justify-between",start:"justify-start"},size:{default:"",sm:"gap-1.5"},tone:{default:"",disabled:"",invalid:""},type:{box:"bg-raised outline-border-subtle p-2_5 rounded-md outline outline-1 outline-offset-[-1px]",default:""}}}),Fue=he("focus-visible:ring-border-stronger data-[state=checked]:bg-fill-brand data-[state=unchecked]:bg-fill-subtler relative inline-flex shrink-0 items-center rounded-full border border-transparent outline-hidden transition-colors focus-visible:ring-2 disabled:pointer-events-none",{variants:{size:{default:"h-5 w-9",sm:"h-4 w-7"},tone:{default:"",disabled:"data-[state=checked]:bg-fill-subtler data-[state=unchecked]:bg-fill-subtler",invalid:"border-danger-stronger"}},defaultVariants:{size:"default",tone:"default"}}),Vue=he(["absolute top-1/2 left-0 -translate-y-1/2","data-[state=unchecked]:translate-x-0.5","pointer-events-none rounded-full transition-transform"].join(" "),{variants:{size:{default:"size-4 data-[state=checked]:translate-x-4",sm:"size-3 data-[state=checked]:translate-x-3"},tone:{default:"data-[state=checked]:bg-fg-static-white bg-white",disabled:"bg-fg-disabled data-[state=checked]:!bg-fg-disabled",invalid:""}},defaultVariants:{size:"default",tone:"default"}}),jue=he("gap-0_5 inline-flex min-w-0 flex-1 flex-col"),Hue=he("text-fg-default",{defaultVariants:{size:"default",tone:"default"},variants:{size:{default:"typo-compact-sm-medium",sm:"typo-compact-xs-semibold"},tone:{default:"",disabled:"text-fg-disabled",invalid:"text-fg-danger"}}}),Wue=he("text-fg-default",{defaultVariants:{size:"default",tone:"default"},variants:{size:{default:"typo-compact-sm-normal",sm:"typo-compact-xs-normal"},tone:{default:"",disabled:"text-fg-disabled",invalid:""}}});function que({className:t,disabled:e=!1,invalid:n=!1,size:r="default",...o}){const a=e?"disabled":n?"invalid":"default";return h($X,{"data-slot":"switch","data-size":r,"data-tone":a,"data-pad-focus":"true",disabled:e,className:ae(Fue({tone:a,size:r}),t),...o,children:h(DX,{"data-slot":"switch-thumb",className:Vue({size:r,tone:a})})})}const Uue=Array.from({length:24},(t,e)=>String(e).padStart(2,"0")),Yue=Array.from({length:60},(t,e)=>String(e).padStart(2,"0")),Qx=t=>({hour:String(t?.getHours()??0).padStart(2,"0"),minute:String(t?.getMinutes()??0).padStart(2,"0")});function Ik({pickerType:t="range",selectedDate:e,onChange:n,labels:r}){const o=t==="range"?"min-w-[84px]":"min-w-[76px]",a=(s,l)=>{const u=e.from??e.to??new Date;let d=new Date(e.from??u),f=t==="range"?new Date(e.to??u):void 0;e.from||d.setHours(0,0,0,0),f&&!e.to&&f.setHours(0,0,0,0),(s==="from"?d:f)?.setHours(Number(l.hour),Number(l.minute),0,0),f&&d.toDateString()===f.toDateString()&&d>f&&(s==="from"?f=new Date(d):d=new Date(f)),n({...e,from:d,to:f})},i=[{label:r?.from??(t==="range"?"From":"Time"),time:Qx(e.from),onChange:s=>a("from",s)},...t==="range"?[{label:r?.to??"To",time:Qx(e.to),onChange:s=>a("to",s)}]:[]];return h("div",{"data-slot":"footer-time",className:"border-subtle flex w-full flex-col items-start border-t",children:te("div",{"data-slot":"footer-time-content",className:ae("w-full px-4 py-3",t==="range"?"inline-flex items-center justify-between gap-4":"flex flex-wrap items-start gap-2"),children:[te("label",{"data-slot":"footer-time-set-time",className:"inline-flex shrink-0 items-center gap-2",children:[h(que,{checked:e.timeEnabled,onCheckedChange:s=>n({...e,timeEnabled:s})}),h("span",{className:"typo-compact-sm-medium text-fg-default whitespace-nowrap",children:r?.setTime??"Set Time"})]}),h("div",{"data-slot":"footer-time-time-rows",className:ae("flex w-full items-center",t==="range"?"justify-end gap-4":"flex-col gap-1"),children:i.map(({label:s,time:l,onChange:u})=>te("div",{"data-slot":"footer-time-row",className:ae("inline-flex items-center",t==="range"?"shrink-0 gap-2":"w-full justify-between"),children:[h("div",{className:"typo-compact-sm-medium text-fg-subtler text-center whitespace-nowrap",children:s}),te("div",{className:"inline-flex items-center gap-2",children:[h(Uv,{"data-slot":"footer-time-hour-select",className:ae("w-fit",o),size:"sm",value:l.hour,disabled:!e.timeEnabled,readOnly:!e.timeEnabled,placeholder:l.hour,handleChange:d=>u({...l,hour:String(d??"00")}),children:Uue.map(d=>h(qv,{value:d,children:d},d))}),h(Uv,{"data-slot":"footer-time-minute-select",className:ae("w-fit",o),size:"sm",value:l.minute,disabled:!e.timeEnabled,readOnly:!e.timeEnabled,placeholder:l.minute,handleChange:d=>u({...l,minute:String(d??"00")}),children:Yue.map(d=>h(qv,{value:d,children:d},d))})]})]},s))})]})})}function Ok({label:t,onClick:e}){return h(Wr,{className:"light:bg-fill-subtlest",size:"xs",variant:"soft",onClick:e,children:t})}const Lk=he(["gap-1_5 inline-flex min-w-72 items-center overflow-hidden","outline outline-1 outline-offset-[-1px]","transition-colors"].join(" "),{variants:{size:{xs2:"h-8 rounded-md px-2",sm:"h-9 rounded-md px-2",md:"px-2_5 h-10 rounded-md",lg:"px-2_5 h-12 rounded-lg"},variant:{default:"bg-fill-control-surface outline-border-default"},focus:{true:"outline-border-input-focused",false:""},error:{true:"outline-border-danger-stronger",false:""},readOnly:{true:"bg-fill-control-surface-disabled outline-border-disabled",false:""},disabled:{true:"bg-fill-control-surface-disabled outline-border-disabled pointer-events-none cursor-not-allowed",false:""},interactive:{true:"cursor-pointer",false:"cursor-default"}},compoundVariants:[{variant:"default",focus:!1,error:!1,readOnly:!1,disabled:!1,className:"[&:hover]:bg-fill-control-surface-hovered [&:hover]:outline-border-default"},{focus:!0,className:"[&:hover]:bg-fill-control-surface-hovered [&:hover]:outline-border-input-focused"},{error:!0,className:"[&:hover]:bg-fill-control-surface [&:hover]:outline-border-danger-stronger"},{readOnly:!0,className:"[&:hover]:bg-fill-control-surface-disabled [&:hover]:outline-border-disabled"},{disabled:!0,className:"[&:hover]:bg-fill-control-surface-disabled [&:hover]:outline-border-disabled"}],defaultVariants:{size:"md",variant:"default",focus:!1,error:!1,readOnly:!1,disabled:!1,interactive:!0}}),$k=he("inline-flex shrink-0 items-center justify-center [&_svg]:block [&_svg]:shrink-0 [&_svg]:leading-none",{variants:{size:{xs2:"size-4",sm:"size-4",md:"size-5",lg:"size-5"},disabled:{true:"text-fg-disabled",false:"text-fg-subtlest"}},defaultVariants:{size:"md",disabled:!1}}),Dk=he("inline-flex min-w-0 flex-1 items-center gap-1 overflow-hidden whitespace-nowrap"),c0=he("truncate",{variants:{size:{xs2:"typo-compact-xs2-normal",sm:"typo-compact-xs2-medium",md:"typo-compact-sm2-medium",lg:"typo-compact-sm2-medium"},tone:{default:"text-fg-default",placeholder:"text-fg-subtler font-normal"},disabled:{true:"text-fg-disabled",false:""}},compoundVariants:[{tone:"placeholder",disabled:!0,className:"text-fg-disabled"}],defaultVariants:{size:"md",tone:"default",disabled:!1}}),Gue=he("",{variants:{size:{xs2:"typo-compact-xs2-normal",sm:"typo-compact-xs2-normal",md:"typo-compact-sm2-medium",lg:"typo-compact-sm2-medium"},disabled:{true:"text-fg-disabled",false:"text-fg-subtler"}},defaultVariants:{size:"md",disabled:!1}}),Bk=he(["bg-overlay relative z-[1]","shadow-up-lg inline-flex flex-col overflow-visible","outline-border-subtle rounded-md outline outline-1 outline-offset-[-2px]"].join(" "),{variants:{pickerType:{basic:"max-w-72",range:"min-w-140"}},defaultVariants:{pickerType:"basic"}}),Kue=he("py-1_5 inline-flex w-full items-start justify-between"),Xue=he("inline-flex flex-1 flex-col items-start justify-start p-3"),Zue=he("typo-compact-sm-medium inline-flex size-5 items-center justify-center text-center",{variants:{weekend:{true:"text-fg-danger",false:"text-fg-default"}},defaultVariants:{weekend:!1}}),xl=he(["typo-compact-sm-medium relative flex h-9 flex-1 items-center justify-center px-2 text-center","transition-colors"].join(" "),{variants:{state:{default:"bg-fill-transparent text-fg-default hover:bg-fill-transparent-hovered rounded-md",disabled:"bg-fill-transparent text-fg-disabled pointer-events-none !cursor-default rounded-md",single:"bg-fill-brand text-fg-default hover:!bg-fill-brand-hovered rounded-md font-semibold",rangeStart:"bg-fill-brand hover:!bg-fill-brand-hovered rounded-none! rounded-l-md! font-medium text-white",rangeMiddle:"bg-fill-subtlest text-fg-default rounded-none!",rangeEnd:"bg-fill-brand hover:!bg-fill-brand-hovered rounded-none! rounded-r-md! font-medium text-white"}},defaultVariants:{state:"default"}}),{useRef:Que}=await q("react");function Jue(t){const e=Que(null),n=wC(t.date,t.displayMonth,e);if(n.isHidden)return h("div",{role:"gridcell"});if(!n.isButton)return h("div",{...n.divProps});const r=n.activeModifiers.outside,o=n.buttonProps["aria-selected"]===!0||n.buttonProps["aria-selected"]==="true"||n.activeModifiers.selected||n.activeModifiers.range_start||n.activeModifiers.range_end||n.activeModifiers.range_middle,a=r||n.activeModifiers.range_start||n.activeModifiers.range_end||n.activeModifiers.range_middle,i=n.buttonProps.className?.replace(a?/\bday_selected\b/g:/$^/,"").replace(r||o?/\bday_range_start\b|\bday_range_end\b|\bday_range_middle\b|\bday_today\b/g:/$^/,"").replace(/\s+/g," ").trim();return h(nf,{ref:e,...n.buttonProps,className:i,"aria-selected":r?void 0:n.buttonProps["aria-selected"],disabled:n.buttonProps.disabled||r})}function zk({className:t,classNames:e,showOutsideDays:n=!0,...r}){return h(PX,{showOutsideDays:n,className:ae("cursor-default p-0",t),classNames:{months:ae(Kue(),r.mode==="range"?"gap-0":"justify-center"),month:Xue(),caption:"bg-fill-transparent relative inline-flex h-8 w-full items-center justify-center px-8",caption_label:"typo-compact-sm-semibold text-fg-default pointer-events-none",nav:"flex items-center gap-1",nav_button:ae(u8({variant:"transparent",size:"xs"}),"absolute top-1/2 size-5 -translate-y-1/2 p-0"),nav_button_previous:"left-0",nav_button_next:"right-0",table:"w-full border-collapse",head_row:"inline-flex h-10 w-full items-center justify-center",head_cell:ae("flex h-9 flex-1 items-center justify-center overflow-hidden px-2",Zue(),"[&:first-child]:text-fg-danger [&:last-child]:text-fg-danger"),row:"inline-flex h-10 w-full items-center justify-center",cell:ae("relative flex h-9 flex-1 items-center justify-center overflow-hidden p-0 text-center focus-within:relative focus-within:z-20",r.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md! [&:has(>.day-range-start)]:rounded-l-md! first:[&:has([aria-selected])]:rounded-l-md! last:[&:has([aria-selected])]:rounded-r-md!":"[&:has([aria-selected])]:rounded-md!"),day:ae(xl({state:"default"}),"h-9 w-full flex-none px-0"),day_range_start:ae(xl({state:"rangeStart"}),"h-9 w-full flex-none px-0 text-white!"),day_range_end:ae(xl({state:"rangeEnd"}),"h-9 w-full flex-none px-0 text-white!"),day_selected:ae(xl({state:"single"}),"h-9 w-full flex-none px-0"),day_today:"[&:not([aria-selected=true])]:!bg-fill-default [&:not([aria-selected=true])]:hover:!bg-fill-default [&:not([aria-selected=true])]:rounded-full! [&:not([aria-selected=true])]:!text-fg-inverse",day_outside:ae(xl({state:"disabled"}),"!bg-fill-transparent hover:!bg-fill-transparent aria-selected:text-fg-disabled"),day_disabled:ae(xl({state:"disabled"}),"h-9 w-full flex-none px-0"),day_range_middle:ae(xl({state:"rangeMiddle"}),"h-9 w-full flex-none rounded-none! px-0 hover:text-white!"),day_hidden:"invisible",...e},components:{Day:Jue,IconLeft:({className:o,...a})=>h(X0,{className:ae("size-4",o),...a}),IconRight:({className:o,...a})=>h(Su,{className:ae("size-4",o),...a})},...r})}const{useCallback:_d,useEffect:Jx,useId:ede,useRef:tde,useState:xd}=await q("react"),nde=[{key:"today",label:"Today"},{key:"month-ago",label:"1 month ago"},{key:"year-ago",label:"1 year ago"}],rde=()=>({hour:"00",minute:"00"}),Yv=t=>t?{hour:String(t.getHours()).padStart(2,"0"),minute:String(t.getMinutes()).padStart(2,"0")}:rde(),e6=t=>!!(t&&(t.getHours()!==0||t.getMinutes()!==0)),t6=(t,e)=>{const n=new Date(t);return n.setHours(Number(e.hour),Number(e.minute),0,0),n},n6=t=>Array.isArray(t)?t[0]:t,r6=(t,e,n)=>{if(!t)return e;const r=V8(t.getTime());if(!n)return r;const o=Yv(t);return`${r} ${o.hour}:${o.minute}`},W3e=({className:t,showType:e="popover",value:n,name:r,disabled:o,readOnly:a,size:i="md",variant:s="default",error:l=!1,showPresets:u=!0,showFooter:d=!0,placeholder:f,handleChange:m})=>{const v=tde(null),g=ede().replace(/:/g,""),[w,y]=xd(!1),[_,S]=xd(!1),[x,C]=xd(()=>{const I=n6(n);return{from:I,to:void 0,timeEnabled:e6(I)}}),[R,P]=xd(x),[O,$]=xd(x.from??new Date),A=typeof f=="string"?f:"Select date",M=()=>{o||y(!0)},L=I=>{I.key==="Enter"&&(v.current?.open(),y(!0))},B=_d(()=>{y(!1),v.current?.close()},[]),F=_d(()=>{if(R.from){const I=new Date(R.from);R.timeEnabled?I.setSeconds(0,0):I.setHours(0,0,0,0),C(R),m?.(I,void 0,r??"")}B()},[m,B,r,R]),N=_d(()=>{const I={from:void 0,to:void 0,timeEnabled:!1};C(I),P(I),m?.(void 0,void 0,r??"")},[m,r]),V=_d(I=>{const D=new Date,U=new Date(D);switch(I){case"today":break;case"month-ago":U.setMonth(D.getMonth()-1);break;case"year-ago":U.setFullYear(D.getFullYear()-1);break}P(Y=>({...Y,from:t6(U,Yv(Y.from))})),$(U)},[]),z=_d(()=>te(Ul,{className:ae(Bk({pickerType:"basic"})),children:[u&&h("div",{"data-slot":"date-input-presets",className:"border-subtle inline-flex w-full flex-wrap items-start justify-center gap-1 border-b px-3 py-4",children:nde.map(I=>h(Ok,{label:I.label,onClick:()=>V(I.key)},I.key))}),h(zk,{"data-slot":"date-input-calendar",month:O,selected:R.from,mode:"single",numberOfMonths:1,onMonthChange:$,onSelect:I=>{P(D=>({...D,from:I?t6(I,Yv(D.from)):void 0})),I&&$(I)}}),d&&h(Ik,{"data-slot":"date-input-footer-time",pickerType:"basic",selectedDate:R,onChange:P}),h(Nk,{"data-slot":"date-input-footer-button",onReset:N,onCancel:B,onConfirm:F})]}),[F,B,V,N,R,O,d,u]);return Jx(()=>{const I=n6(n),D={from:I,to:void 0,timeEnabled:e6(I)};C(D),P(D),$(I??new Date)},[n]),Jx(()=>{w||(P(x),$(x.from??new Date))},[w,x]),te(Mr,{children:[te(P3,{ref:v,disabled:o,anchorId:e==="popover"&&!o?`date-input-popover-${g}`:void 0,className:ae("inline-block"),ripple:{disabled:!0},popoverStyle:{top:"10px",left:"0"},popoverElement:h(z,{}),onClose:()=>y(!1),onClick:M,children:[te("div",{"data-slot":"date-input",className:ae(Lk({size:i,variant:s,focus:_||w,error:l,readOnly:a,disabled:o,interactive:!o&&!a}),t),children:[h("span",{"data-slot":"date-input-icon","aria-hidden":!0,className:$k({size:i,disabled:o}),children:h(rw,{})}),h("span",{"data-slot":"date-input-content",className:Dk(),children:h("input",{"data-slot":"date-input-input",type:"text",readOnly:!0,disabled:o,value:r6(x.from,"",x.timeEnabled),placeholder:r6(void 0,A,!1),onFocus:()=>S(!0),onBlur:()=>S(!1),onKeyDown:L,className:ae("w-full min-w-0",c0({size:i,tone:x.from?"default":"placeholder",disabled:o}))})})]}),e==="popover"&&h("div",{id:`date-input-popover-${g}`})]}),e==="modal"&&h(tc,{className:ae("w-auto border-none p-0"),open:w,hideCloseButton:!0,onOpenChange:y,children:h(z,{})})]})},o6=[{key:"last-24-hours",label:"Last 24 hours"},{key:"last-3-days",label:"Last 3 days"},{key:"last-week",label:"Last week"},{key:"last-month",label:"Last month"},{key:"last-3-month",label:"Last 3 month"}],ode=(t,e=new Date)=>{const n=new Date(e),r=new Date(e);switch(t){case"last-24-hours":n.setDate(e.getDate()-1);break;case"last-3-days":n.setDate(e.getDate()-3);break;case"last-week":n.setDate(e.getDate()-7);break;case"last-month":n.setMonth(e.getMonth()-1);break;case"last-3-month":n.setMonth(e.getMonth()-3);break}return{from:n,to:r}},{useCallback:Sd,useEffect:a6,useId:ade,useRef:ide,useState:m1}=await q("react"),sde=(t,e,n)=>{const r=[];return t&&r.push({before:t}),e&&r.push({after:e}),Array.isArray(n)?r.push(...n):n!==void 0&&r.push(n),r},Gv=()=>({hour:"00",minute:"00"}),kl=t=>t?{hour:String(t.getHours()).padStart(2,"0"),minute:String(t.getMinutes()).padStart(2,"0")}:Gv(),g1=t=>!!(t&&(t.getHours()!==0||t.getMinutes()!==0)),bs=(t,e)=>{const n=new Date(t);return n.setHours(Number(e.hour),Number(e.minute),0,0),n},lde=(t,e)=>!t||!e?!1:t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate(),i6=(t,e,n)=>{if(!t)return e;const r=V8(t.getTime());if(!n)return r;const o=kl(t);return`${r} ${o.hour}:${o.minute}`},q3e=({className:t,calendarPanelClassName:e,showType:n="popover",value:r,name:o,min:a,max:i,maxDays:s,placeholder:l,disabled:u,disabledDates:d,readOnly:f,size:m="md",variant:v="default",error:g=!1,showPresets:w=!0,showFooter:y=!0,handleChange:_,presets:S})=>{const x=ide(null),C=ade().replace(/:/g,""),[R,P]=m1(!1),[O]=m1(!1),[$,A]=m1({from:r?.[0],to:r?.[1],timeEnabled:g1(r?.[0])||g1(r?.[1])}),[M,L]=m1($),B=!!($?.from||$?.to),F=typeof l=="string"?l:l?.start||l?.end||"Select date",N=()=>{u||P(!0)},V=Sd(()=>{P(!1),x.current?.close()},[]),z=Sd(()=>{if(M.from){const Y=M.to??M.from,oe=bs(M.from,kl(M.from)),Q=bs(Y,kl(Y)),re=M.timeEnabled?oe:bs(oe,Gv()),le=M.timeEnabled?Q:bs(Q,Gv());A({from:oe,to:Q,timeEnabled:M.timeEnabled}),_?.(re,le,o??"")}V()},[_,V,o,M]),I=Sd(()=>{const Y={from:void 0,to:void 0,timeEnabled:!1};A(Y),L(Y),_?.(void 0,void 0,o??"")},[_,o]),D=Sd(Y=>{const{from:oe,to:Q}=ode(Y);L(re=>({...re,from:bs(oe,kl(re.from)),to:bs(Q,kl(re.to))}))},[]),U=Sd(()=>te(Ul,{className:ae(Bk({pickerType:"range"}),e),children:[w&&h("div",{"data-slot":"data-input-presets",className:"border-subtle inline-flex w-full flex-wrap items-start justify-center gap-1 border-b px-3 py-4",children:(S?o6.filter(Y=>S.includes(Y.key)):o6).map(Y=>h(Ok,{label:Y.label,onClick:()=>D(Y.key)},Y.key))}),h(zk,{"data-slot":"data-input-calendar",selected:M,mode:"range",numberOfMonths:2,max:s,disabled:sde(a,i,d),initialFocus:!0,defaultMonth:M?.from,onSelect:Y=>{L(oe=>{const Q=Y?.from?bs(Y.from,kl(oe.from)):void 0;let re=Y?.to;!re&&oe.timeEnabled&&oe.to&&(re=Y?.from);let le=re?bs(re,kl(oe.to)):void 0;return Q&&le&&lde(Q,le)&&Q>le&&(le=new Date(Q)),{...oe,from:Q,to:le}})}}),y&&h(Ik,{"data-slot":"date-input-footer-time",pickerType:"range",selectedDate:M,onChange:L}),h(Nk,{"data-slot":"date-input-footer-button",onReset:I,onCancel:V,onConfirm:z})]}),[e,D,V,z,I,d,i,s,a,S,M,y,w]);return a6(()=>{const Y={from:r?.[0],to:r?.[1]},oe={...Y,timeEnabled:g1(Y.from)||g1(Y.to)};A(oe),L(oe)},[r]),a6(()=>{R||L($)},[R,$]),te(Mr,{children:[te(P3,{ref:x,disabled:u,anchorId:n==="popover"&&!u?`date-input-popover-${C}`:void 0,className:"inline-block",ripple:{disabled:!0},popoverStyle:{top:"10px",left:"0"},popoverElement:h(U,{}),onClose:()=>P(!1),onClick:N,children:[te("div",{"data-slot":"date-input",className:ae(Lk({size:m,variant:v,focus:O||R,error:g,readOnly:f,disabled:u,interactive:!u&&!f}),t),children:[h("span",{"data-slot":"date-input-icon","aria-hidden":!0,className:$k({size:m,disabled:u}),children:h(rw,{})}),h("span",{"data-slot":"date-input-content",className:Dk(),children:B?te(Mr,{children:[h("span",{"data-slot":"date-input-value",className:c0({size:m,tone:$?.from?"default":"placeholder",disabled:u}),children:i6($?.from,F,$.timeEnabled)}),h("span",{"data-slot":"date-input-separator",className:Gue({size:m,disabled:u}),children:"~"}),h("span",{"data-slot":"date-input-value",className:c0({size:m,tone:$?.to?"default":"placeholder",disabled:u}),children:i6($?.to,F,$.timeEnabled)})]}):h("span",{"data-slot":"date-input-value",className:c0({size:m,tone:"placeholder",disabled:u}),children:F})})]}),n==="popover"&&h("div",{id:`date-input-popover-${C}`})]}),n==="modal"&&h(tc,{className:ae("w-auto max-w-fit border-none p-0"),open:R,hideCloseButton:!0,onOpenChange:P,children:h(U,{})})]})},cde=he("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 bg-dim fixed inset-0 z-50"),ude=he("bg-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 shadow-down-md fixed top-1/2 left-1/2 z-50 inline-flex max-w-[95vw] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-lg outline-hidden transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{size:{sm:"max-h-[25rem] min-h-40 w-[22.5rem]",md:"max-h-[35rem] w-[30rem]",lg:"max-h-[35rem] w-[34.375rem]"}},defaultVariants:{size:"lg"}}),dde=he("gap-0_5 relative flex flex-col items-start self-stretch px-4 pt-4 pr-16 pb-2"),fde=he("flex items-center justify-end gap-4 self-stretch p-4"),pde=he("text-fg-default typo-title-01-bold"),hde=he("text-fg-subtle typo-compact-sm-normal"),mde=he("text-fg-subtle hover:bg-fill-transparent-hovered hover:text-fg-default focus-visible:outline-border-stronger absolute top-3 right-3 inline-flex size-7 items-center justify-center rounded-[3px] outline-hidden transition-colors focus-visible:outline focus-visible:outline-1"),{forwardRef:Vh,useEffect:gde,useId:vde,useRef:wde}=await q("react"),q0=new Map,bde=300;function yde(t,e){q0.set(t,e)}function s6(t){q0.delete(t)}function _de(){const t=Array.from(q0.values());if(q0.clear(),t.length===0){Rl.resetModal();return}t.forEach(e=>e()),setTimeout(()=>{const e=document.querySelectorAll('[data-slot="dialog-content"][data-state="closed"]'),n=Array.from(e).flatMap(r=>r.getAnimations().map(o=>o.finished));if(n.length===0){Rl.resetModal();return}Promise.allSettled(n).then(()=>{Rl.resetModal()})},bde)}function xde({...t}){const e=vde(),n=wde(t.onOpenChange);return n.current=t.onOpenChange,gde(()=>(t.open?yde(e,()=>n.current?.(!1)):s6(e),()=>s6(e)),[e,t.open]),h(bf,{"data-slot":"dialog",...t})}function U3e({...t}){return h(Vw,{"data-slot":"dialog-trigger",...t})}function Sde({...t}){return h(yf,{"data-slot":"dialog-portal",...t})}function Y3e({...t}){return h(Zl,{"data-slot":"dialog-close",...t})}const Fk=Vh(({closeAllLabel:t},e)=>h("button",{ref:e,type:"button","aria-label":"dialog-all-close",className:"text-fg-default typo-compact-sm-semibold border-fg-subtler bg-fg-inverse pointer-events-auto fixed top-4 right-4 z-50 h-8 w-20 cursor-pointer rounded-md border p-1",onClick:_de,children:h("span",{children:t})}));Fk.displayName="RBDialogCloseAll";const Vk=Vh(({className:t,...e},n)=>h(_f,{ref:n,"data-slot":"dialog-overlay",className:ae(cde(),t),...e}));Vk.displayName="RBDialogOverlay";function Cde({className:t,children:e,container:n,showCloseButton:r=!0,size:o="lg",closeAllLabel:a,...i}){const s=n??(typeof document<"u"?document.querySelector(".modal-container")??void 0:void 0);return te(Sde,{container:s,children:[h(Vk,{onContextMenu:l=>l.preventDefault()}),h(Fk,{closeAllLabel:a}),te(xf,{"data-slot":"dialog-content","data-size":o,className:ae(ude({size:o}),t),...i,children:[e,r&&te(Zl,{"data-slot":"dialog-close",className:mde(),tabIndex:-1,children:[h(df,{className:"size-4"}),h("span",{className:"sr-only",children:"Close"})]})]})]})}function Ede({className:t,...e}){return h("div",{"data-slot":"dialog-header",className:ae(dde(),t),...e})}function Mde({className:t,...e}){return h("div",{"data-slot":"dialog-footer",className:ae(fde(),t),...e})}const u0=Vh(({className:t,...e},n)=>h(Sf,{ref:n,"data-slot":"dialog-title",className:ae(pde(),t),...e}));u0.displayName="RBDialogTitle";const d0=Vh(({className:t,...e},n)=>h(Cf,{ref:n,"data-slot":"dialog-description",className:ae(hde(),t),...e}));d0.displayName="RBDialogDescription";const kde=he("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 bg-dim fixed inset-0 z-50"),Rde=he("bg-raised border-subtle data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex h-auto flex-col overflow-hidden transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{defaultVariants:{side:"bottom"},variants:{side:{top:"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 w-full rounded-b-xl border-b",bottom:"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 w-full rounded-t-xl border-t",left:"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 max-w-96 rounded-r-xl border-r",right:"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 max-w-96 rounded-l-xl border-l"}}}),Tde=he("bg-fg-default h-1 w-28 rounded-full"),Nde=he("flex items-center justify-center self-stretch pt-4"),Pde=he("gap-0_5 flex flex-col p-4"),Ade=he("mt-auto flex flex-col items-stretch gap-2 self-stretch p-4"),Ide=he("text-fg-default typo-title-01-medium"),Ode=he("text-fg-subtle typo-compact-sm-normal"),Lde=he("flex flex-col gap-3 self-stretch overflow-hidden px-4 pt-4"),$de=he("text-fg-default hover:text-fg-default-hovered focus-visible:outline-border-stronger absolute top-4 right-4 inline-flex size-4 items-center justify-center rounded-xs outline-hidden transition-colors focus-visible:outline focus-visible:outline-1");function Dde({side:t,...e}){return h(qr.Root,{"data-slot":"drawer",...e,direction:t??e.direction})}function G3e({...t}){return h(qr.Trigger,{"data-slot":"drawer-trigger",...t})}function K3e({...t}){return h(qr.Close,{"data-slot":"drawer-close",...t})}function Bde({...t}){return h(qr.Portal,{"data-slot":"drawer-portal",...t})}function zde({className:t,...e}){return h(qr.Overlay,{"data-slot":"drawer-overlay",className:ae(kde(),t),...e})}function Fde({className:t,children:e,side:n="bottom",showHandle:r,showCloseButton:o=!1,...a}){const i=r??n==="bottom";return te(Bde,{children:[h(zde,{}),te(qr.Content,{"data-slot":"drawer-content","data-position":n,className:ae(Rde({side:n}),t),...a,children:[n==="bottom"&&i&&h("div",{className:Nde(),children:h("div",{className:Tde()})}),e,o&&te(qr.Close,{className:$de(),children:[h(df,{}),h("span",{className:"sr-only",children:"Close"})]})]})]})}function Vde({className:t,...e}){return h("div",{"data-slot":"drawer-header",className:ae(Pde(),t),...e})}function X3e({className:t,...e}){return h("div",{"data-slot":"drawer-body",className:ae(Lde(),t),...e})}function jde({className:t,...e}){return h("div",{"data-slot":"drawer-footer",className:ae(Ade(),t),...e})}function Hde({className:t,...e}){return h(qr.Title,{"data-slot":"drawer-title",className:ae(Ide(),t),...e})}function Wde({className:t,...e}){return h(qr.Description,{"data-slot":"drawer-description",className:ae(Ode(),t),...e})}const qde=he("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 bg-dim fixed inset-0 z-50"),Ude=he("bg-raised outline-border-subtle data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 p-4 outline outline-1 outline-offset-[-1px] transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{defaultVariants:{side:"right"},variants:{side:{bottom:"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom shadow-up-lg inset-x-0 bottom-0 h-[520px] max-h-[80vh]",left:"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full max-w-[90vw] shadow-[0px_4px_6px_-4px_rgba(0,0,0,0.10)] shadow-lg",right:"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right shadow-up-lg inset-y-0 right-0 h-full max-w-[90vw]",top:"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-[520px] max-h-[80vh] shadow-[0px_4px_6px_-4px_rgba(0,0,0,0.10)] shadow-lg"}}}),Yde=he("gap-0_5 flex flex-col"),Gde=he("mt-auto flex flex-col items-stretch gap-2 overflow-hidden"),Kde=he("text-fg-default typo-title-01-medium"),Xde=he("text-fg-subtle typo-compact-sm-normal"),Zde=he("text-fg-default hover:text-fg-default-hovered focus-visible:outline-border-stronger absolute top-4 right-4 inline-flex size-4 items-center justify-center rounded-xs outline-hidden transition-colors focus-visible:outline focus-visible:outline-1");function Qde({...t}){return h(bf,{"data-slot":"sheet",...t})}function Z3e({...t}){return h(Vw,{"data-slot":"sheet-trigger",...t})}function Q3e({...t}){return h(Zl,{"data-slot":"sheet-close",...t})}function Jde({...t}){return h(yf,{"data-slot":"sheet-portal",...t})}function efe({className:t,...e}){return h(_f,{"data-slot":"sheet-overlay",className:ae(qde(),t),...e})}function tfe({className:t,children:e,side:n="right",showCloseButton:r=!0,...o}){return te(Jde,{children:[h(efe,{}),te(xf,{"data-slot":"sheet-content","data-position":n,className:ae(Ude({side:n}),t),...o,children:[e,r&&te(Zl,{className:Zde(),children:[h(df,{}),h("span",{className:"sr-only",children:"Close"})]})]})]})}function nfe({className:t,...e}){return h("div",{"data-slot":"sheet-header",className:ae(Yde(),t),...e})}function rfe({className:t,...e}){return h("div",{"data-slot":"sheet-footer",className:ae(Gde(),t),...e})}function ofe({className:t,...e}){return h(Sf,{"data-slot":"sheet-title",className:ae(Kde(),t),...e})}function afe({className:t,...e}){return h(Cf,{"data-slot":"sheet-description",className:ae(Xde(),t),...e})}const ife=({className:t,type:e,open:n,onOpenChange:r,header:o,footer:a,children:i,hideCloseButton:s,handleInteractOutside:l})=>{const u=e.split("-")[0];return h(Qde,{open:n,onOpenChange:r,children:te(tfe,{className:ae(t,{"[&>button:last-child]:hidden":s}),side:u,onInteractOutside:l,children:[!!o&&te(nfe,{children:[!!o.title&&h(ofe,{children:o.title}),!!o.description&&h(afe,{children:o.description})]}),i,!!a&&h(rfe,{children:a})]})})},jh=({className:t,open:e,type:n="dialog",dialogContainer:r,children:o,enableDimClose:a=!0,header:i,hideCloseButton:s,footer:l,gamePadType:u="modal",onOpenChange:d,disableAutoFocus:f=!1,closeAllButtonLabel:m="Close All"})=>{const v=g=>{a||g.preventDefault()};return n==="drawer"?h(Dde,{open:e,onOpenChange:d,children:te(Fde,{className:ae(t),onInteractOutside:v,children:[!!i&&te(Vde,{children:[!!i.title&&h(Hde,{children:i.title}),!!i.description&&h(Wde,{children:i.description})]}),o,!!l&&h(jde,{children:l})]})}):n==="dialog"?h(xde,{open:e,onOpenChange:d,children:te(Cde,{...f&&{onOpenAutoFocus:g=>g.preventDefault()},className:ae(t),container:r,"data-pad-scope":u,showCloseButton:!s,closeAllLabel:m,onInteractOutside:v,children:[i?te(Ede,{children:[i.title?h(u0,{children:i.title}):h(Il,{children:h(u0,{})}),i.description?h(d0,{children:i.description}):h(Il,{children:h(d0,{})})]}):te(Il,{children:[h(u0,{}),h(d0,{})]}),o,!!l&&h(Mde,{children:l})]})}):h(ife,{className:t,type:n,header:i,footer:l,open:e,enableDimClose:a,hideCloseButton:s,onOpenChange:d,handleInteractOutside:v,children:o})},sfe=({className:t,containerId:e,open:n,onOpenChange:r,title:o,content:a,contentClassName:i,buttonText:s="확인",snapshotCnt:l,resolve:u,onConfirm:d})=>{const f=()=>{u(!0),d?.()};return h(jh,{"data-slot":"alert-modal",className:ae("max-h-[calc(var(--vh,1vh)*60)] w-fit max-w-[95vw] min-w-[25rem]",t),open:n,onOpenChange:r,type:"dialog",dialogContainer:e?document.getElementById(e):void 0,snapshotCnt:l,hideCloseButton:!0,enableDimClose:!1,gamePadType:"dialog",header:o?{title:o}:void 0,footer:h(Wr,{variant:"brand",onClick:f,children:s}),children:h("div",{"data-slot":"alert-modal-content",className:ae("min-h-0 flex-1 overflow-y-auto","text-body-xs2-normal text-fg-default px-4 py-3 whitespace-pre-wrap",i),children:a})})},{useState:lfe}=await q("react"),cfe=({className:t,open:e,onOpenChange:n,title:r,description:o,content:a,contentClassName:i,buttonText:s={yes:"Confirm",no:"Cancel"},buttonClassName:l,buttonWrapperClassName:u,snapshotCnt:d,containerId:f,onConfirm:m,onCancel:v,resolve:g})=>{const[w,y]=lfe(!1),_=async()=>{y(!0);try{await m?.(),g(!0)}finally{y(!1)}},S=()=>{v?.(),g(!1)};return h(jh,{"data-slot":"confirm-modal",className:ae("max-h-[calc(var(--vh,1vh)*60)] w-fit max-w-[95vw] min-w-[25rem]",t),open:e,onOpenChange:n,type:"dialog",snapshotCnt:d,dialogContainer:f?document.getElementById(f):void 0,hideCloseButton:!0,enableDimClose:!1,gamePadType:"dialog",header:r||o?{title:r,description:o}:void 0,footer:te(Yo,{"data-slot":"confirm-modal-button-wrapper",className:ae("btn-wrapper",u),alignItems:"center",gap:8,children:[h(Wr,{variant:"outlined",className:ae(l?.no),disabled:w,onClick:S,children:s.no}),h(Wr,{variant:"brand",className:ae(l?.yes),autoFocus:!0,loading:w,onClick:_,children:s.yes})]}),children:h("div",{"data-slot":"confirm-modal-content",className:ae("min-h-0 flex-1 overflow-y-auto","text-body-xs2-normal text-fg-default px-4 py-3 whitespace-pre-wrap",i),children:a})})},ufe={default:"text-fg-subtle",error:"text-fg-danger",success:"text-fg-success"};function dfe({className:t,helperText:e,helperTone:n="default"}){return e?h("div",{"data-slot":"text-helper",className:ae("pt-1_5 w-full",t),children:h("div",{"data-slot":"text-helper-message",className:ae("typo-compact-xs-normal",ufe[n]),children:e})}):null}function ffe({className:t,label:e,description:n,required:r=!1,children:o}){return!e&&!n&&!o?null:te("div",{"data-slot":"text-label",className:ae("gap-0_5 flex w-full flex-col",t),children:[e&&te("div",{"data-slot":"text-label-heading",className:"gap-0_5 typo-compact-xs-semibold inline-flex items-start",children:[h("span",{"data-slot":"text-label-text",className:"text-fg-default",children:e}),r&&h("span",{"data-slot":"text-label-required",className:"text-fg-information",children:"*"})]}),n&&h("div",{"data-slot":"text-label-description",className:"text-fg-subtle typo-compact-xs-normal",children:n}),o&&h("div",{className:"pt-1","data-slot":"text-label-children",children:o})]})}function pfe({className:t="",labelClassName:e="",helperClassName:n="",label:r,description:o,required:a=!1,helperText:i,helperTone:s="default",children:l}){return h("div",{"data-slot":"text-field",className:ae("w-full",t),children:te(ffe,{className:e,label:r,description:o,required:a,children:[h("div",{"data-slot":"text-field-control",children:l}),h(dfe,{className:n,helperText:i,helperTone:s})]})})}const{cloneElement:hfe,useState:l6}=await q("react"),mfe=({className:t,open:e,onOpenChange:n,title:r,content:o,contentClassName:a,placeholder:i,inputType:s="text",inputElement:l,label:u,description:d,required:f=!1,helperText:m,helperTone:v="default",autoFocus:g=!1,value:w,buttonText:y={yes:"Confirm",no:"Cancel"},buttonClassName:_,buttonWrapperClassName:S,containerId:x,snapshotCnt:C,resolve:R,close:P})=>{const[O,$]=l6(w||""),[A,M]=l6(!1),L=s==="password"&&A?"text":s;return h(jh,{"data-slot":"prompt-modal",className:ae("max-h-[calc(var(--vh,1vh)*60)] w-fit max-w-[95vw] min-w-[25rem]",t),open:e,onOpenChange:n,type:"dialog",snapshotCnt:C,dialogContainer:x?document.getElementById(x):void 0,hideCloseButton:!0,enableDimClose:!1,gamePadType:"dialog",header:r?{title:r}:void 0,footer:te(Yo,{"data-slot":"prompt-modal-button-wrapper",className:ae("btn-wrapper",S),alignItems:"center",gap:8,children:[h(Wr,{variant:"outlined",className:ae(_?.no),onClick:()=>R(null),children:y.no}),h(Wr,{variant:"brand",className:ae(_?.yes),onClick:()=>R(O),children:y.yes})]}),children:te(Ul,{className:"min-h-0 flex-1",children:[o&&h("div",{"data-slot":"prompt-modal-content",className:ae("min-h-0 flex-1 overflow-y-auto","text-body-xs2-normal text-fg-default px-4 py-3 whitespace-pre-wrap",a),children:o}),l?h("div",{"data-slot":"prompt-modal-input",className:"w-full shrink-0 px-4 py-2",children:hfe(l,{value:O,handleChange:$,tabIndex:g?0:-1,placeholder:i,type:s})}):h("div",{"data-slot":"prompt-modal-input",className:"w-full shrink-0 px-4 py-2",children:h(pfe,{label:u,description:d,required:f,helperText:m,helperTone:v,children:te("div",{className:"relative w-full",children:[h(sw,{className:ae("w-full",s==="password"&&"pr-10"),type:L,tabIndex:g?0:-1,placeholder:i,value:O,handleChange:$,handleEnter:()=>R(O)}),s==="password"&&h("button",{type:"button",className:"text-fg-subtle hover:text-fg-default absolute top-1/2 right-4 -translate-y-1/2",onClick:()=>M(B=>!B),children:A?h(k8,{className:"size-4"}):h(R8,{className:"size-4"})})]})})})]})})},gfe=he("gap-2_5 inline-flex items-center justify-center pt-4"),P2=he("gap-0_5 flex items-center justify-start"),v1=he("py-0_5 inline-flex size-6 shrink-0 items-center justify-center rounded-sm transition-colors duration-200 ease-out",{variants:{disabled:{true:"bg-fill-transparent text-fg-disabled pointer-events-none",false:"bg-fill-transparent text-fg-default hover:bg-fill-transparent-hovered"}},defaultVariants:{disabled:!1}}),w1=he("inline-flex size-3.5 items-center justify-center"),vfe=he("inline-flex size-6 shrink-0 flex-col items-center justify-center rounded-md transition-colors duration-200 ease-out",{variants:{selected:{true:"text-fg-default outline-border-default outline outline-1 outline-offset-[-1px]",false:"text-fg-subtler hover:bg-fill-subtler-hovered"}},defaultVariants:{selected:!1}}),wfe=he("inline-flex h-5 w-7 items-center justify-center text-center text-xs leading-4 font-semibold"),{useMemo:Cd}=await q("react"),J3e=({className:t,currPage:e=1,listSize:n=20,pageSize:r=5,totalCount:o=0,handlePageChange:a})=>{const i=Cd(()=>{const f=o/n;return f%1===0?f:Math.floor(f)+1},[n,o]),s=Cd(()=>{const f=Math.ceil(i/r);return Array.from({length:f},(m,v)=>Array.from({length:r},(g,w)=>v*r+w+1))},[r,i]),l=Cd(()=>{const f=(s.find(m=>m.includes(e))??[]).filter(m=>m<=i);return f.length===0?[1]:f},[e,s,i]),u=Cd(()=>{const f=l[0]??1;return Math.max(1,f-1)},[l]),d=Cd(()=>{const f=l[l.length-1]??i;return Math.min(i,f+1)},[l,i]);return te("div",{"data-slot":"pagination",className:ae(gfe(),t),children:[te("div",{"data-slot":"pagination-prev-group",className:P2(),children:[h("button",{"data-slot":"pagination-prev-double",className:v1({disabled:e===1}),type:"button",disabled:e===1,onClick:()=>a(u),children:h("span",{"data-slot":"pagination-nav-icon",className:w1(),children:h(_8,{})})}),h("button",{"data-slot":"pagination-prev",className:v1({disabled:e===1}),type:"button",disabled:e===1,onClick:()=>a(e-1),children:h("span",{"data-slot":"pagination-nav-icon",className:w1(),children:h(X0,{})})})]}),h("div",{"data-slot":"pagination-pages",className:P2(),children:l.map(f=>h("button",{"data-slot":"pagination-page",className:vfe({selected:e===f}),type:"button",onClick:()=>a(f),children:h("span",{"data-slot":"pagination-page-text",className:wfe(),children:f})},f))}),te("div",{"data-slot":"pagination-next-group",className:P2(),children:[h("button",{"data-slot":"pagination-next",className:v1({disabled:!(e<i)}),type:"button",disabled:!(e<i),onClick:()=>a(e+1),children:h("span",{"data-slot":"pagination-nav-icon",className:w1(),children:h(Su,{})})}),h("button",{"data-slot":"pagination-next-double",className:v1({disabled:e===i||i===0}),type:"button",disabled:e===i||i===0,onClick:()=>a(d),children:h("span",{"data-slot":"pagination-nav-icon",className:w1(),children:h(x8,{})})})]})]})},bfe=he(["inline-flex w-48 items-center gap-1 overflow-hidden","bg-fill-control-surface outline outline-1 outline-offset-[-1px]","transition-colors"].join(" "),{variants:{size:{xs2:"h-8 rounded-md px-0.5",sm:"h-9 rounded-md px-0.5",md:"h-10 rounded-md px-0.5",lg:"h-12 rounded-lg px-1"},variant:{default:"outline-border-default",success:"outline-border-success-stronger"},focus:{true:"outline-border-input-focused",false:""},error:{true:"outline-border-danger-stronger",false:""},readOnly:{true:"bg-fill-control-surface-disabled outline-border-disabled",false:""},disabled:{true:"bg-fill-control-surface-disabled outline-border-disabled pointer-events-none cursor-not-allowed",false:""},inputDisabled:{true:"bg-fill-control-surface-disabled outline-border-disabled",false:""}},compoundVariants:[{variant:"default",focus:!1,error:!1,readOnly:!1,disabled:!1,inputDisabled:!1,className:"[&:hover]:bg-fill-control-surface-hovered [&:hover]:outline-border-default"},{variant:"success",focus:!1,error:!1,readOnly:!1,disabled:!1,inputDisabled:!1,className:"[&:hover]:bg-fill-control-surface [&:hover]:outline-border-success-stronger"},{focus:!0,className:"[&:hover]:bg-fill-control-surface [&:hover]:outline-border-input-focused"},{error:!0,className:"[&:hover]:bg-fill-control-surface [&:hover]:outline-border-danger-stronger"},{readOnly:!0,className:"[&:hover]:bg-fill-control-surface-disabled [&:hover]:outline-border-disabled"},{disabled:!0,className:"[&:hover]:bg-fill-control-surface-disabled [&:hover]:outline-border-disabled"},{inputDisabled:!0,className:"[&:hover]:bg-fill-control-surface-disabled [&:hover]:outline-border-disabled"}],defaultVariants:{size:"md",variant:"default",focus:!1,error:!1,readOnly:!1,disabled:!1,inputDisabled:!1}}),c6=he("bg-fill-transparent touch-action-none inline-flex shrink-0 items-center justify-center rounded-sm transition-[background-color] [&_*]:pointer-events-none",{variants:{size:{xs2:"size-7",sm:"size-8",md:"size-9",lg:"size-10"},disabledLike:{true:"cursor-not-allowed",false:"cursor-pointer"},pressed:{true:"scale-90",false:""}},defaultVariants:{size:"md",disabledLike:!1,pressed:!1}}),u6=he("",{variants:{size:{xs2:"size-3.5",sm:"size-3.5",md:"size-4",lg:"size-4"},disabledLike:{true:"text-fg-disabled",false:"text-fg-default"},pressed:{true:"scale-90",false:""}},compoundVariants:[{disabledLike:!1,pressed:!0,className:"transform transition-transform"}],defaultVariants:{size:"md",disabledLike:!1,pressed:!1}}),yfe=he(["w-full border-none bg-transparent text-center ring-0 outline-none","placeholder:text-fg-subtler appearance-none [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none"].join(" "),{variants:{size:{xs2:"typo-compact-xs2-semibold",sm:"typo-compact-sm-normal",md:"typo-compact-sm2-normal",lg:"typo-compact-sm2-normal"},variant:{default:"text-fg-default",success:"text-fg-default"},focus:{true:"placeholder:text-fg-subtler",false:""},error:{true:"placeholder:text-fg-subtler",false:""},readOnly:{true:"placeholder:text-fg-default",false:""},disabled:{true:"text-fg-disabled placeholder:text-fg-disabled",false:""},inputDisabled:{true:"text-fg-disabled placeholder:text-fg-disabled",false:""}},defaultVariants:{size:"md",variant:"default"}}),{forwardRef:_fe,useCallback:eo,useEffect:Uc,useImperativeHandle:xfe,useMemo:Sfe,useRef:Ua,useState:A2}=await q("react"),Cfe=t=>{const e=t?.target?.value;return kn.replace(e,/^0+[\d,]/gm,o=>kn.last(o)).replace(/[^\d.-]/g,"")},Efe=_fe(({className:t="",type:e,size:n,variant:r,step:o=1,error:a,isDirect:i=!0,increaseStep:s,decreaseStep:l,maxLength:u,increaseElement:d,decreaseElement:f,detectDobleClick:m,useSetButton:v,notAllowedEmptyValue:g,inputDisabled:w,disableAutoAccel:y,disableLongPress:_,fixedDigit:S,initialLongPressDelay:x=300,enableArrowKeys:C,enableWheel:R,handleChange:P,onButtonPointerDown:O,onButtonPointerUp:$,handleEnter:A,...M},L)=>{const{value:B,readOnly:F,disabled:N,min:V,max:z="9999999999999",digit:I=18,onFocus:D,onBlur:U}=M,Y=Ua(null),oe=Ua(!1),Q=Ua(!1),re=Ua({up:0,down:0}),le=Ua(""),ee=Ua(null),ne=Ua(null),ue=Ua(0),ve=Ua(0),we=Ua(x),[ye,Le]=A2(B??""),[Oe,Ne]=A2(!1),[me,pe]=A2(null),be=Sfe(()=>N||new Ut(V??0).cmp(new Ut(z))>0,[N,z,V]),Ue=eo((Ce,Ye,wt)=>{if(Ye===0)return Ce;const un=wt==="up"?new Ut(Ce||0).add(new Ut(ee.current?.increase??Ye??1)).toDP(I,Ut.ROUND_DOWN):new Ut(Ce||0).sub(new Ut(ee.current?.decrease??Ye??1)).toDP(I,Ut.ROUND_DOWN);return S!==void 0?un.toFixed(S):un.toString()},[I,S]),He=eo(Ce=>typeof Ce>"u"||!Ce||be?"":Ce.endsWith(".")?Ce:typeof V<"u"&&new Ut(Number(Ce)).lt(new Ut(V))?String(V):typeof z<"u"&&new Ut(Dl(Ce||"")).gt(new Ut(z))?String(z):Ce,[V,z,be]),qe=eo(Ce=>be?"":Ce.endsWith(".")?Ce:He(Ce),[be,He]),_e=eo(Ce=>{const Ye=Y.current;Ye&&(Ye.value=Bi(Ce??"").join("."),delete Ye.dataset.tempNumberKeypadValue,Ye.dispatchEvent(new Event("input",{bubbles:!0})))},[]),at=eo(({type:Ce,e:Ye})=>{if(!Y.current||be)return;const{value:wt,name:un}=Y.current,on=Cfe({target:{value:wt}}),Lt=I?new RegExp(`^-?[0-9]*[.]{0,1}[0-9]{0,${I}}$`,"gm"):/^-?\d{0,18}$/;on.match(Lt)&&(typeof u<"u"&&(on||"").split(".")[0].replace(/[^0-9]/g,"").length>Number(u)||(Y.current.value=Bi(on??"").join("."),le.current!==on&&(P?.(on,un,{type:Ce}),Ye&&M.onChange?.(Ye),le.current=on),Le(on)))},[be,I,u,P,M]),ht=eo((Ce,Ye)=>{Y.current&&(Ne(Ye),Ye?D?.(Ce):(Y.current.value=qe(Y.current.value),g&&!Ce.target.value&&(Y.current.value=M.value),at({}),U?.(Ce)))},[D,qe,g,M.value,at,U]),st=eo(Ce=>{if(be||F){oe.current=!1,window.clearTimeout(ue.current);return}le.current=Ue(le.current??"0",ne.current,Ce),le.current=He(le.current??"0"),Le(String(le.current)),_e(le.current),P?.(le.current,M.name,{type:Ce}),window.clearTimeout(ve.current),ve.current=window.setTimeout(()=>{oe.current&&(st(Ce),we.current>50&&!y&&(we.current-=we.current/6))},we.current)},[Ue,He,be,P,M.name,y,F,_e]),Ct=eo(Ce=>{const{value:Ye="",name:wt}=Ce.target;g&&!Ye&&(Ce.target.value=M.value),A?.(Ye,wt),Ce.target.blur()},[A,M.value,g]),cn=eo(Ce=>{if(Ce.key==="Enter"&&!Ce.nativeEvent.isComposing)Ct(Ce);else if(C&&(Ce.key==="ArrowUp"||Ce.key==="ArrowDown")&&(Ce.preventDefault(),!be&&!F)){const Ye=Ce.key==="ArrowUp"?"up":"down";le.current=Ue(le.current??"0",ne.current,Ye),le.current=He(le.current??"0"),Le(String(le.current)),_e(le.current),P?.(le.current,M.name,{type:Ye})}M.onKeyDown?.(Ce)},[M,Ct,C,be,F,Ue,He,P,_e]);Uc(()=>{const Ce=Y.current;if(!Ce||!R)return;const Ye=wt=>{if(be||F)return;wt.preventDefault();const un=wt.deltaY<0?"up":"down";le.current=Ue(le.current??"0",ne.current,un),le.current=He(le.current??"0"),Le(String(le.current)),_e(le.current),P?.(le.current,M.name,{type:un})};return Ce.addEventListener("wheel",Ye,{passive:!1}),()=>Ce.removeEventListener("wheel",Ye)},[R,be,F,Ue,He,P,M.name,_e]);const Sn=eo((Ce,Ye)=>{if(!(Date.now()-re.current[Ce]<500&&m)){if(be||F){oe.current=!1,window.clearTimeout(ue.current);return}re.current[Ce]=Date.now(),pe(Ce),st(Ce),O?.(Ce,Ye),_||(ue.current=window.setTimeout(()=>{oe.current=!0,st(Ce)},we.current)),Q.current=!0}},[m,be,F,st,_,O]),Jn=eo(Ce=>{Ce&&Ce.currentTarget.hasPointerCapture?.(Ce.pointerId)&&Ce.currentTarget.releasePointerCapture?.(Ce.pointerId)},[]);eo((Ce,Ye=20)=>{const wt=Ce.currentTarget.getBoundingClientRect();return Ce.clientX<wt.left-Ye||Ce.clientX>wt.right+Ye||Ce.clientY<wt.top-Ye||Ce.clientY>wt.bottom+Ye},[]);const Gt=eo((Ce,Ye)=>{if(be||F||!Q.current){oe.current=!1,window.clearTimeout(ue.current),Q.current&&Ce&&$?.(Ce,Ye);return}oe.current=!1,Q.current=!1,pe(null),window.clearTimeout(ue.current),we.current=x,Ce&&$?.(Ce,Ye),Ce&&at({type:Ce})},[be,at,F,$,x]),Tn=eo(()=>{oe.current=!1,pe(null),window.clearTimeout(ue.current),window.clearTimeout(ve.current),we.current=x},[x]);Uc(()=>{le.current=B??""},[B]),Uc(()=>{typeof B<"u"&&Le(B)},[B]),Uc(()=>{ne.current=o},[o]),Uc(()=>{ee.current={increase:s,decrease:l}},[s,l]),xfe(L,()=>Y.current),Uc(()=>{const Ce=Ye=>{Ye.type==="contextmenu"&&(oe.current||Q.current)&&Ye.preventDefault()};return window.addEventListener("contextmenu",Ce),window.addEventListener("pointerup",Ce),window.addEventListener("pointercancel",Ce),()=>{window.removeEventListener("contextmenu",Ce),window.removeEventListener("pointerup",Ce),window.removeEventListener("pointercancel",Ce)}},[Tn]);const Hn=f??h(T8,{"aria-hidden":!0,className:u6({size:n,disabledLike:be||V===ye,pressed:me==="down"})}),Tt=d??h(N8,{"aria-hidden":!0,className:u6({size:n,disabledLike:be||z===ye,pressed:me==="up"})});return te(Yo,{"data-slot":"side-number-input",className:ae(bfe({size:n,variant:r,focus:Oe,readOnly:F,disabled:N,error:a,inputDisabled:w}),t),alignItems:"center",justifyContent:"space-between",onContextMenu:Ce=>{Ce.target instanceof HTMLInputElement||Ce.preventDefault()},children:[h("button",{type:"button","data-slot":"side-number-input-decrease","data-type":"down",className:c6({size:n,disabledLike:be||z===ye,pressed:me==="down"}),disabled:be||z===ye,onPointerDown:Ce=>{Ce.preventDefault(),Ce.currentTarget.setPointerCapture?.(Ce.pointerId),Sn("down",Ce)},onPointerMove:Ce=>{Q.current&&Ce.currentTarget.hasPointerCapture?.(Ce.pointerId)},onPointerUp:Ce=>{Gt("down",Ce),Jn(Ce)},onPointerCancel:Ce=>{Gt("down",Ce),Jn(Ce)},onLostPointerCapture:Ce=>{Gt("down",Ce)},onContextMenu:Ce=>{Ce.preventDefault()},children:Hn}),h("input",{...M,type:"text",inputMode:e==="nx-number"?"none":void 0,"data-slot":"side-number-input-field",className:yfe({size:n,variant:r,focus:Oe,readOnly:F,disabled:N,error:a,inputDisabled:w}),ref:Y,value:Bi(ye??"").join(".")??"",readOnly:!i,disabled:N||w,onChange:Ce=>at({e:Ce}),onFocus:Ce=>ht(Ce,!0),onBlur:Ce=>ht(Ce,!1),onKeyDown:cn,onContextMenu:Ce=>{Ce.preventDefault()}}),h("button",{type:"button","data-slot":"side-number-input-increase","data-type":"up",className:c6({size:n,disabledLike:be||V===ye,pressed:me==="up"}),disabled:be||V===ye,onPointerDown:Ce=>{Ce.preventDefault(),Ce.currentTarget.setPointerCapture?.(Ce.pointerId),Sn("up",Ce)},onPointerMove:Ce=>{Q.current&&Ce.currentTarget.hasPointerCapture?.(Ce.pointerId)},onPointerUp:Ce=>{Gt("up",Ce),Jn(Ce)},onPointerCancel:Ce=>{Gt("up",Ce),Jn(Ce)},onLostPointerCapture:Ce=>{Gt("up",Ce)},onContextMenu:Ce=>{Ce.preventDefault()},children:Tt}),e==="nx-number"&&h(aw,{inputRef:Y,maxLength:Number(u),useSet:v,onSet:A})]})});Efe.displayName="SideNumberInput";const Mfe=he("group inline-flex items-center select-none",{variants:{size:{sm:"gap-1",md:"gap-1_5"},checked:{true:"",false:""},disabled:{true:"pointer-events-none cursor-not-allowed",false:"cursor-pointer"},readOnly:{true:"pointer-events-none cursor-not-allowed",false:""}},defaultVariants:{size:"sm",checked:!1,disabled:!1,readOnly:!1}}),kfe=he("relative inline-flex shrink-0 items-center justify-center rounded-full border transition-[background-color,border-color] duration-200 ease-out",{variants:{size:{sm:"size-4",md:"size-5"},checked:{true:"",false:""},disabled:{true:"",false:""}},compoundVariants:[{checked:!1,disabled:!1,className:"border-subtle bg-fill-control-surface"},{checked:!0,disabled:!1,className:"bg-fill-brand border-transparent"},{checked:!1,disabled:!0,className:"bg-fill-disabled border-disabled"},{checked:!0,disabled:!0,className:"bg-fill-disabled border-none"}],defaultVariants:{size:"sm",checked:!1,disabled:!1}}),Rfe=he("rounded-full transition-[opacity,transform,background-color] duration-200 ease-out",{variants:{size:{sm:"size-1.5",md:"size-2"},checked:{true:"",false:""},disabled:{true:"",false:""}},compoundVariants:[{checked:!0,disabled:!1,className:"bg-fg-static-white scale-100 opacity-100"},{checked:!1,disabled:!1,className:"bg-fg-static-white scale-0 opacity-0"},{checked:!0,disabled:!0,className:"bg-fg-disabled scale-100"},{checked:!1,disabled:!0,className:"bg-fg-disabled scale-0 opacity-0"}],defaultVariants:{size:"sm",checked:!1,disabled:!1}}),Tfe=he("",{variants:{size:{sm:"typo-compact-xs2-normal",md:"typo-compact-sm2-normal"},disabled:{true:"text-fg-disabled",false:"text-fg-default"}},defaultVariants:{size:"sm",disabled:!1}}),Nfe=he(["relative inline-flex","[&_[data-slot='radio-check']]:hidden","[&_[data-slot='radio-text']]:inline-flex","[&_[data-slot='radio-text']]:items-center","[&_[data-slot='radio-text']]:justify-center","[&_[data-slot='radio-text']]:gap-1","[&_[data-slot='radio-text']]:cursor-pointer","[&_[data-slot='radio-text']]:rounded-md","[&_[data-slot='radio-text']]:bg-fill-transparent","[&_[data-slot='radio-text']]:text-fg-default","[&_[data-slot='radio-text']]:outline","[&_[data-slot='radio-text']]:outline-1","[&_[data-slot='radio-text']]:outline-offset-[-1px]","[&_[data-slot='radio-text']]:outline-border-default","[&_[data-slot='radio-text']]:transition-colors","[&_[data-slot='radio-text']]:hover:bg-fill-transparent-hovered","[&_.peer:checked~[data-slot='radio-text']]:bg-fill-subtler","[&_.peer:checked~[data-slot='radio-text']]:text-fg-default","[&_.peer:checked~[data-slot='radio-text']]:outline-transparent","[&_.peer:checked~[data-slot='radio-text']]:hover:bg-fill-subtler-hovered","[&_.peer:disabled~[data-slot='radio-text']]:bg-fill-transparent","[&_.peer:disabled~[data-slot='radio-text']]:cursor-not-allowed","[&_.peer:disabled~[data-slot='radio-text']]:text-fg-disabled","[&_.peer:disabled~[data-slot='radio-text']]:outline-border-disabled","[&_.peer:disabled~[data-slot='radio-text']]:hover:bg-fill-transparent","[&_.peer:checked:disabled~[data-slot='radio-text']]:bg-fill-disabled","[&_.peer:checked:disabled~[data-slot='radio-text']]:text-fg-disabled","[&_.peer:checked:disabled~[data-slot='radio-text']]:outline-transparent","[&_.peer[readonly]~[data-slot='radio-text']]:bg-fill-transparent","[&_.peer[readonly]~[data-slot='radio-text']]:cursor-not-allowed","[&_.peer[readonly]~[data-slot='radio-text']]:text-fg-default","[&_.peer[readonly]~[data-slot='radio-text']]:outline-border-subtler","[&_.peer[readonly]~[data-slot='radio-text']]:hover:bg-fill-transparent","[&_.peer:checked[readonly]~[data-slot='radio-text']]:bg-fill-disabled","[&_.peer:checked[readonly]~[data-slot='radio-text']]:text-fg-default","[&_.peer:checked[readonly]~[data-slot='radio-text']]:outline-transparent"].join(" "),{variants:{size:{sm:["[&_[data-slot='radio-text']]:min-h-7","[&_[data-slot='radio-text']]:px-2","[&_[data-slot='radio-text']]:typo-compact-xs-semibold"].join(" "),md:["[&_[data-slot='radio-text']]:min-h-8","[&_[data-slot='radio-text']]:px-3","[&_[data-slot='radio-text']]:typo-compact-xs-semibold"].join(" ")},disabled:{true:"pointer-events-none cursor-not-allowed",false:""}},defaultVariants:{size:"sm",disabled:!1}}),{forwardRef:Pfe,useCallback:Afe,useImperativeHandle:Ife,useMemo:Ofe,useRef:Lfe}=await q("react"),jk=Pfe(({className:t="",children:e,size:n,disabled:r,readOnly:o,checkValue:a,value:i,handleChange:s,...l},u)=>{const d=Lfe(null),f=Ofe(()=>{if(!(typeof i>"u"))return i===a},[i,a]),m=Afe(v=>{const{name:g,value:w}=v.target;(typeof a=="number"?Number(w)===a:w===a)&&s?.(a,g),l.onChange?.(v)},[s,l,a]);return Ife(u,()=>d.current),te("label",{"data-slot":"radio-root",className:ae(Mfe({size:n,checked:f,disabled:r,readOnly:o}),t),children:[h("input",{ref:d,...l,type:"radio",value:a,checked:f,readOnly:o,disabled:r,onChange:m,className:"peer sr-only"}),h("span",{"data-slot":"radio-check",className:kfe({size:n,checked:f,disabled:r}),children:h("i",{"data-slot":"radio-icon",className:Rfe({size:n,checked:f,disabled:r})})}),e&&h("span",{"data-slot":"radio-text",className:Tfe({size:n,disabled:r}),children:e})]})});jk.displayName="RBRadioBox";const{forwardRef:$fe}=await q("react"),Dfe=$fe(({className:t="",children:e,rippleOption:n={disabled:!0},size:r="sm",disabled:o,...a},i)=>h(Rr,{...n,children:h(jk,{ref:i,size:r,disabled:o,className:ae(Nfe({size:r,disabled:o}),t),...a,children:e})}));Dfe.displayName="RBRadioButton";const Hk=he("block",{variants:{swipeContent:{true:"swipe-content",false:""}},defaultVariants:{swipeContent:!1}}),Wk=he("relative isolate",{variants:{hasScrollMask:{true:"overflow-hidden",false:""}},defaultVariants:{hasScrollMask:!1}}),qk=he("relative overflow-x-auto overflow-y-visible whitespace-nowrap [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"),Bfe=he("border-subtle inline-flex items-end border-b",{variants:{size:{sm:"gap-3",md:"gap-3_5",lg:"gap-4"}},defaultVariants:{size:"md"}}),zfe=he("px-0_5 relative -mb-px inline-flex shrink-0 items-center justify-center border-b text-center transition-colors",{variants:{size:{sm:"typo-compact-sm-semibold h-8",md:"typo-compact-sm2-semibold h-10",lg:"typo-compact-lg-semibold h-12"},selected:{true:"",false:"border-transparent"},disabled:{true:"pointer-events-none cursor-not-allowed",false:"cursor-pointer"},slider:{true:"",false:""}},compoundVariants:[{selected:!0,disabled:!1,slider:!1,className:"text-fg-default z-[1] border-transparent"},{selected:!1,disabled:!1,className:"text-fg-subtler"},{selected:!0,disabled:!0,slider:!1,className:"text-fg-disabled z-[1] border-transparent"},{selected:!1,disabled:!0,className:"text-fg-disabled"},{selected:!0,disabled:!1,slider:!0,className:"text-fg-default z-[1] border-transparent"},{selected:!0,disabled:!0,slider:!0,className:"text-fg-disabled z-[1] border-transparent"}],defaultVariants:{size:"md",selected:!1,disabled:!1,slider:!1}}),Ffe=he("bg-fill-default pointer-events-none absolute bottom-[-1px] left-0 z-[1] h-[1px] transition-[transform,width] duration-200",{variants:{visible:{true:"",false:"opacity-0"}},defaultVariants:{visible:!0}}),f0=he("max-w-full",{variants:{hasContent:{true:"pt-2",false:""},swipeContent:{true:"[&_.swiper-wrapper]:!transition-property-[transform]",false:""}},defaultVariants:{hasContent:!0,swipeContent:!1}}),cu=he("",{variants:{active:{true:"block",false:"hidden"},disabled:{true:"",false:""},swipeContent:{true:"block",false:""}},defaultVariants:{active:!1,disabled:!1,swipeContent:!1}}),ebe=he("inline-flex items-center overflow-x-auto whitespace-nowrap [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",{variants:{size:{sm:"gap-1",md:"gap-1_5",lg:"gap-1_5"}},defaultVariants:{size:"md"}}),Vfe=he("inline-flex shrink-0 items-center justify-center rounded-full transition-colors",{variants:{size:{sm:"px-2_5 typo-compact-sm-semibold h-7",md:"typo-compact-sm2-semibold h-8 px-3",lg:"typo-compact-lg-semibold h-10 px-4"},selected:{true:"",false:"bg-fill-transparent outline-border-subtle outline outline-1 outline-offset-[-1px]"},disabled:{true:"cursor-not-allowed",false:"cursor-pointer"}},compoundVariants:[{selected:!0,disabled:!1,className:"bg-fill-default text-fg-inverse"},{selected:!1,disabled:!1,className:"text-fg-subtler"},{selected:!0,disabled:!0,className:"bg-fill-disabled text-fg-disabled"},{selected:!1,disabled:!0,className:"text-fg-disabled outline-border-disabled"}],defaultVariants:{size:"md",selected:!1,disabled:!1}}),jfe=he("items-center border-b-0",{variants:{size:{sm:"gap-1",md:"gap-1_5",lg:"gap-1_5"}},defaultVariants:{size:"md"}}),Hfe=he("items-center border-b-0",{variants:{size:{xs:"gap-1",xs2:"gap-1"}},defaultVariants:{size:"xs2"}}),Wfe=he("relative inline-flex shrink-0 items-center justify-center rounded-md transition-colors",{variants:{size:{xs:"typo-compact-xs-semibold h-7 px-2",xs2:"typo-compact-xs-semibold h-8 px-3"},selected:{true:"outline outline-1 outline-offset-[-1px] outline-transparent",false:"bg-fill-transparent outline-border-default outline outline-1 outline-offset-[-1px]"},disabled:{true:"cursor-not-allowed",false:"cursor-pointer"}},compoundVariants:[{selected:!0,disabled:!1,className:"bg-fill-subtler text-fg-default"},{selected:!1,disabled:!1,className:"text-fg-default"},{selected:!0,disabled:!0,className:"bg-fill-disabled text-fg-disabled"},{selected:!1,disabled:!0,className:"text-fg-disabled outline-border-disabled"}],defaultVariants:{size:"xs2",selected:!1,disabled:!1}}),{forwardRef:qfe}=await q("react"),Uk=qfe(({className:t="",size:e="md",slider:n=!1,useDefaultStyle:r=!0,selected:o=!1,disabled:a=!1,role:i,children:s,onClick:l,"aria-selected":u},d)=>h("button",{ref:d,type:"button",disabled:a,role:i,"aria-selected":u,className:ae(r&&zfe({size:e,selected:o,disabled:a,slider:n}),t),onClick:l,children:h("span",{className:"text-center",children:s})}));Uk.displayName="RBTabItem";const{useCallback:I2,useEffect:Ed,useMemo:b1,useRef:Md,useState:Ufe}=await q("react"),Yfe=Oh,Gfe=Ih,Kfe=({className:t="",size:e,tabItems:n,activeKey:r,name:o,slider:a,swipeContent:i,disabled:s,rippleOption:l={disabled:!0},tabNavScrollRef:u,destroyInactiveTabPanel:d=!0,tabBtnClassName:f,style:m,onClick:v,handleChange:g})=>{const w=Md(null),y=Md(null),_=Md([]),S=Md(null),x=Md(!1),C=b1(()=>n?.filter(F=>!F?.isHide)??[],[n]),[R,P]=Ufe(r??C[0]?.key),O=b1(()=>{const F=C.findIndex(N=>N.key===R);return F===-1?0:F},[R,C]),$=b1(()=>{if(!C.length)return null;if(i){const F=()=>{const{swipeDirection:N}=S.current,{key:V,disabled:z}=C[S.current.activeIndex],{key:I}=C[S.current.activeIndex-1]??C[0],{key:D}=C[S.current.activeIndex+1]??C[S.current.activeIndex];z?(P(N==="next"?D:I),g?.(N==="next"?D:I,o)):(P(V),g?.(V,o))};return h(Gfe,{className:ae(f0({swipeContent:!0})),autoHeight:!0,threshold:1,slidesPerView:1,enabled:!s,onSwiper:N=>{S.current=N},onSlideChange:F,children:C.map(N=>h(Yfe,{className:ae(cu({disabled:s||N.disabled})),style:{visibility:N.disabled?"hidden":"visible"},children:N.children},N.key))})}else return d?h("div",{className:ae(f0()),children:h("div",{className:ae(cu({active:!0,disabled:s||C[O]?.disabled})),children:C[O]?.children})},`contents-${C[O]?.key}`):h("div",{className:ae(f0()),children:C.map((F,N)=>h("div",{className:ae(cu({active:O===N,disabled:s||F.disabled})),children:F.children},`contents-${F.key}`))})},[O,d,s,g,o,i,C]),A=I2(()=>{const F=u?.current??y.current,N=_.current.find(V=>V&&V.classList.contains("active"))??_.current[0];if(N){const{offsetLeft:V,clientWidth:z}=N,I=V-F.offsetWidth/2+z/2;F.scrollTo({top:0,left:I,behavior:"smooth"})}},[u]),M=I2(()=>{const F=w.current;if(!a||!F)return;const N=_.current.find(V=>V&&V.classList.contains("active"))??_.current[0];if(N){const{offsetLeft:V,clientWidth:z}=N;F.style.transform=`translateX(${V}px)`,F.style.width=`${z}px`,x.current?F.style.transition="":(F.style.transition="none",x.current=!0)}else F.style.transform="translateX(0px)",F.style.width="0px"},[a]),L=I2((F,N)=>{typeof r>"u"&&P(F),g?.(F,o),v?.(F,N)},[r,o,g,v]),B=b1(()=>{if(!(typeof window>"u"))return new ResizeObserver(()=>{M()})},[M]);return Ed(()=>{typeof r<"u"&&r!==R&&P(r)},[r,R]),Ed(()=>{M(),A(),S.current&&S.current.slideTo(O,250)},[O,M,A]),Ed(()=>{const F=()=>{M(),A()};return window.addEventListener("resize",F),()=>{window.removeEventListener("resize",F)}},[M,A]),Ed(()=>{i&&S.current&&(s?S.current.disable():S.current.enable())},[s,i]),Ed(()=>{if(B){const F=_.current;return F.forEach(N=>{N&&B.observe(N)}),()=>{F.forEach(N=>{N&&B.unobserve(N)})}}},[B]),te("div",{"data-slot":"tab-wrapper",className:ae(Hk({swipeContent:!!i}),t),style:m,children:[h("div",{"data-slot":"tab-nav",className:ae(Wk()),children:h("div",{"data-slot":"tab-nav-viewport",ref:y,className:ae(qk()),children:te("div",{"data-slot":"tab-nav-list",className:ae("relative flex w-full",Bfe({size:e})),children:[C.map((F,N)=>h(Rr,{...l,disabled:l.disabled||F.disabled||s,children:h(Uk,{ref:V=>{V&&(_.current[N]=V)},"data-slot":"tab-nav-item",className:ae(R===F.key&&"active",f),slider:!!a,selected:R===F.key,disabled:!!(s||F.disabled),role:"tab","aria-selected":R===F.key,onClick:V=>L(F.key,V),children:F.label})},F.key)),h("span",{ref:w,"data-slot":"tab-slider",className:ae(Ffe({visible:!!a})),style:{width:0}})]})})}),h("div",{"data-slot":"tab-content",children:$})]})};Kfe.displayName="RBTab";const{forwardRef:Xfe}=await q("react"),Yk=Xfe(({className:t="",size:e="md",selected:n=!1,disabled:r=!1,role:o,children:a,onClick:i,"aria-selected":s},l)=>h("button",{ref:l,type:"button",disabled:r,role:o,"aria-selected":s,className:ae(Vfe({size:e,selected:n,disabled:r}),t),onClick:i,children:a}));Yk.displayName="RBChipItem";const{useCallback:O2,useEffect:kd,useMemo:Rd,useRef:Td,useState:Zfe}=await q("react"),Qfe=Oh,Jfe=Ih,epe=({className:t="",size:e,tabItems:n,activeKey:r,name:o,slider:a,swipeContent:i,disabled:s,rippleOption:l={disabled:!0},tabNavScrollRef:u,destroyInactiveTabPanel:d=!0,tabBtnClassName:f,style:m,onClick:v,handleChange:g})=>{const w=Td(null),y=Td(null),_=Td([]),S=Td(null),x=Td(!1),C=Rd(()=>n?.filter(N=>!N?.isHide)??[],[n]),[R,P]=Zfe(r??C[0]?.key),O=Rd(()=>{const N=C.findIndex(V=>V.key===R);return N===-1?0:N},[R,C]),$=Rd(()=>C[O]?.children!=null,[O,C]),A=Rd(()=>C.length?i?h(Jfe,{autoHeight:!0,threshold:1,slidesPerView:1,enabled:!s,onSwiper:V=>{S.current=V},onSlideChange:()=>{const{swipeDirection:V}=S.current,{key:z,disabled:I}=C[S.current.activeIndex],{key:D}=C[S.current.activeIndex-1]??C[0],{key:U}=C[S.current.activeIndex+1]??C[S.current.activeIndex];I?(P(V==="next"?U:D),g?.(V==="next"?U:D,o)):(P(z),g?.(z,o))},children:C.map(V=>h(Qfe,{className:ae(cu({active:!0,swipeContent:!0,disabled:s||V.disabled})),style:{visibility:V.disabled?"hidden":"visible"},children:V.children},V.key))}):d?h("div",{children:h("div",{className:ae(cu(),{active:!0,disabled:s||C[O]?.disabled}),children:C[O]?.children})},`contents-${C[O]?.key}`):h("div",{children:C.map((N,V)=>h("div",{className:ae(cu(),{active:O===V,disabled:s||N.disabled}),children:N.children},`contents-${N.key}`))}):null,[O,d,s,g,o,i,C]),M=O2(()=>{const N=u?.current??y.current,V=_.current.find(z=>z&&z.classList.contains("active"))??_.current[0];if(V){const{offsetLeft:z,clientWidth:I}=V,D=z-N.offsetWidth/2+I/2;N.scrollTo({top:0,left:D,behavior:"smooth"})}},[u]),L=O2(()=>{const N=w.current;if(!a||!N)return;const V=_.current.find(z=>z&&z.classList.contains("active"))??_.current[0];if(V){const{offsetLeft:z,clientWidth:I}=V;N.style.transform=`translateX(${z}px)`,N.style.width=`${I}px`,x.current?N.style.transition="":(N.style.transition="none",x.current=!0)}else N.style.transform="translateX(0px)",N.style.width="0px"},[a]),B=O2((N,V)=>{typeof r>"u"&&P(N),g?.(N,o),v?.(N,V)},[r,o,g,v]),F=Rd(()=>{if(!(typeof window>"u"))return new ResizeObserver(()=>{L()})},[L]);return kd(()=>{typeof r<"u"&&r!==R&&P(r)},[r,R]),kd(()=>{L(),M(),S.current&&S.current.slideTo(O,250)},[O,L,M]),kd(()=>{const N=()=>{L(),M()};return window.addEventListener("resize",N),()=>{window.removeEventListener("resize",N)}},[L,M]),kd(()=>{i&&S.current&&(s?S.current.disable():S.current.enable())},[s,i]),kd(()=>{if(F){const N=_.current;return N.forEach(V=>{V&&F.observe(V)}),()=>{N.forEach(V=>{V&&F.unobserve(V)})}}},[F]),te("div",{"data-slot":"chip-tab-wrapper",className:ae(Hk({swipeContent:!!i}),t),style:m,children:[h("div",{"data-slot":"chip-tab-nav",className:ae(Wk()),children:h("div",{"data-slot":"chip-tab-nav-viewport",ref:y,className:ae(qk()),children:h("div",{"data-slot":"chip-tab-nav-list",className:ae("relative flex",jfe({size:e})),children:C.map((N,V)=>h(Rr,{...l,disabled:l.disabled||N.disabled||s,children:h(Yk,{ref:z=>{z&&(_.current[V]=z)},"data-slot":"chip-tab-nav-item",className:ae(R===N.key&&"active",f),size:e,selected:R===N.key,disabled:!!(s||N.disabled),role:"tab","aria-selected":R===N.key,onClick:z=>B(N.key,z),children:N.label})},N.key))})})}),h("div",{"data-slot":"chip-tab-content",className:ae(f0({hasContent:$})),children:A})]})};epe.displayName="RBTab";const{forwardRef:tpe}=await q("react"),Gk=tpe(({className:t="",size:e="xs2",selected:n=!1,disabled:r=!1,role:o,children:a,onClick:i,"aria-selected":s,...l},u)=>h("button",{ref:u,type:"button",disabled:r,role:o,"aria-selected":s,"data-pad-focus":"true",className:ae(Wfe({size:e,selected:n,disabled:r}),t),onClick:i,...l,children:a}));Gk.displayName="RBChipsBoxItem";const{useCallback:y1,useEffect:_1,useMemo:L2,useRef:$2,useState:Yc}=await q("react"),npe=({className:t="",size:e="xs2",tabItems:n,activeKey:r,name:o,disabled:a=!1,destroyInactiveTabPanel:i=!0,rippleOption:s={disabled:!0},tabBtnClassName:l="",style:u,enableOverflowExpand:d=!0,showBottomBorder:f=!0,rightIconButtonProps:m,leftSlot:v,handleChange:g,onClick:w})=>{const[y,_]=Yc(!1),[S,x]=Yc(!1),[C,R]=Yc(0),P=$2(null),O=$2([]),$=$2(null),A=L2(()=>n?.filter(ne=>!ne?.isHide)??[],[n]),[M,L]=Yc(r??A[0]?.key),[B,F]=Yc(!1),[N,V]=Yc(!1),z=y1(()=>{const ne=P.current;if(!ne){x(!1),R(0);return}const ue=ne.scrollWidth>ne.clientWidth+1;x(ue),R(ue?ne.clientWidth/2:0)},[]),I=L2(()=>{const ne=A.findIndex(ue=>ue.key===M);return ne===-1?0:ne},[M,A]),D=y1(()=>{if(z(),y){F(!1),V(!1);return}const ne=P.current;if(!ne)return;if(!(ne.scrollWidth>ne.clientWidth+1)){F(!1),V(!1);return}const ve=Math.max(0,ne.scrollWidth-ne.clientWidth);F(ne.scrollLeft>1),V(ne.scrollLeft<ve-1)},[z,y]),U=y1(()=>{if(y)return;const ne=P.current,ue=O.current.find(Le=>Le&&Le.classList.contains("active"))??O.current[0];if(!ne||!ue)return;const{offsetLeft:ve,clientWidth:we}=ue,ye=ve-ne.offsetWidth/2+we/2;ne.scrollTo({top:0,left:ye,behavior:"smooth"})},[y]),Y=y1((ne,ue)=>{typeof r>"u"&&L(ne),g?.(ne,o),w?.(ne,ue)},[r,g,o,w]),oe=ne=>{_(ue=>!ue),m?.onClick?.(ne)};_1(()=>{typeof r<"u"&&r!==M&&L(r)},[r,M]),_1(()=>{U(),D()},[I,y,U,D]),_1(()=>{z();const ne=P.current;if(!ne)return;const ue=new ResizeObserver(()=>{z(),D(),U()});ue.observe(ne);const ve=()=>{z(),D(),U()};return window.addEventListener("resize",ve),()=>{ue.disconnect(),window.removeEventListener("resize",ve)}},[z,D,U,A]),_1(()=>{const ne=P.current;if(!ne||y)return;const ue=()=>{$.current!==null&&window.clearTimeout($.current),D(),$.current=window.setTimeout(()=>{D()},140)};return D(),ne.addEventListener("scroll",ue,{passive:!0}),()=>{ne.removeEventListener("scroll",ue),$.current!==null&&window.clearTimeout($.current)}},[y,D]);const Q=y?h(ow,{}):h(K0,{}),re=e==="xs2"?"h-11":"h-10",le=d&&(y||S),ee=L2(()=>A.length?i?h("div",{children:h("div",{className:ae("block",(a||A[I]?.disabled)&&"pointer-events-none opacity-50"),children:A[I]?.children})},`contents-${A[I]?.key}`):h("div",{children:A.map((ne,ue)=>h("div",{className:ae(I===ue?"block":"hidden"),children:ne.children},`contents-${ne.key}`))}):null,[I,i,a,A]);return te("div",{className:ae("block",t),style:u,children:[te("div",{className:ae("relative isolate",f&&"border-subtler border-b"),children:[v&&h("div",{className:"absolute top-0 bottom-0 left-0 z-[4] flex items-center pl-1",children:v}),h("div",{ref:P,className:ae("relative p-1.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",y?"overflow-x-visible overflow-y-visible pr-0":"overflow-x-auto overflow-y-hidden pr-10 whitespace-nowrap",v&&"pl-9"),children:te("div",{className:ae(Hfe({size:e}),"relative flex",y?"w-full flex-wrap content-start gap-y-1":"w-max min-w-full flex-nowrap"),children:[A.map((ne,ue)=>h(Rr,{...s,disabled:s.disabled||ne.disabled||a,children:h(Gk,{ref:ve=>{O.current[ue]=ve},className:ae(M===ne.key&&"active",l),size:e,selected:M===ne.key,disabled:!!(a||ne.disabled),role:"tab","aria-selected":M===ne.key,onClick:ve=>Y(ne.key,ve),children:ne.label})},ne.key)),h("div",{"aria-hidden":"true",className:y?"hidden":"inline-block",style:{width:`${C}px`,flexShrink:0}})]})}),!y&&te(Mr,{children:[h("div",{"aria-hidden":"true",className:ae("to-bg-default pointer-events-none absolute top-0 bottom-px -left-px z-[2] w-11 shrink-0 bg-gradient-to-l from-transparent to-[30%] transition-opacity duration-150",B?"opacity-100":"opacity-0")}),h("div",{"aria-hidden":"true",className:ae("from-bg-default pointer-events-none absolute top-0 -right-px bottom-px z-[3] w-11 shrink-0 bg-gradient-to-l from-[30%] to-transparent transition-opacity duration-150",N?"opacity-100":"opacity-0")})]}),le?te("div",{className:ae("pointer-events-none absolute top-0 right-0 z-[5] w-9",re,"from-bg-default bg-gradient-to-l from-[80%] to-transparent"),children:[y?null:h("div",{className:"bg-default absolute top-0 right-0 bottom-0 w-px"}),h("div",{className:ae("pointer-events-auto flex items-center justify-center",re),children:h(d8,{size:"3xs",variant:"circle",icon:Q,...m,onClick:oe})})]}):null]}),ee]})};npe.displayName="RBChipsBoxTab";const Kk=({className:t,borderClassName:e,pathClassName:n,size:r,style:o})=>te("svg",{className:ae("spinner","animate-spinner-rotate relative z-2 stroke-[5px]",t),viewBox:"0 0 50 50",width:r,height:r,stroke:"currentColor",style:o,children:[h("circle",{className:ae("stroke-linecap-round stroke-width-inherit stroke-inherit opacity-30",e),cx:"25",cy:"25",r:"20",fill:"none"}),h("circle",{className:ae("animate-spinner-path-dash infinite stroke-linecap-round stroke-width-inherit stroke-inherit ease-in-out",n),cx:"25",cy:"25",r:"20",fill:"none"})]}),rpe=he(["overflow-x-auto overflow-y-hidden min-[1280px]:overflow-hidden","[&::-webkit-scrollbar]:h-0 [&::-webkit-scrollbar]:w-0","[&_table]:w-full [&_table]:min-w-full [&_table]:border-collapse","[&_th]:relative [&_th]:h-9 [&_th]:border-b [&_th]:border-b-[var(--color-border-subtler)]","[&_th]:bg-fill-transparent [&_th]:px-2 [&_th]:py-0","[&_th]:text-fg-default [&_th]:text-left [&_th]:align-middle","[&_td]:relative [&_td]:min-h-7 [&_td]:border-b [&_td]:border-b-[var(--color-border-subtler)]","[&_td]:bg-fill-transparent [&_td]:py-1_5 [&_td]:px-2","[&_td]:typo-body-xs-normal [&_td]:text-fg-subtle [&_td]:align-middle","[&_tbody_tr]:relative [&_tbody_tr]:transition-all [&_tbody_tr]:duration-200","[&_[data-slot='ico-check']]:mr-0 [&_label]:p-0"].join(" "),{variants:{noData:{true:"overflow-hidden",false:""},loading:{true:"",false:""},stickyThead:{true:["[&_table]:border-separate [&_table]:border-spacing-0","[&_thead_tr]:sticky [&_thead_tr]:top-0 [&_thead_tr]:z-10","[&_th]:sticky [&_th]:top-0 [&_th]:z-10","[&_th]:bg-inherit [&_th]:bg-clip-padding","[&_th]:shadow-[inset_0_-1px_0_0_var(--color-border-subtler)]"].join(" "),false:""}},defaultVariants:{noData:!1,loading:!1,stickyThead:!1}}),ope=he("transition-colors duration-150",{variants:{sortable:{true:"hover:bg-fill-transparent-hovered cursor-pointer select-none",false:""},align:{left:"",center:"",right:""}},defaultVariants:{sortable:!1,align:"left"}}),ape=he("typo-compact-xs-semibold text-fg-default gap-0_5 inline-flex h-full w-full items-center bg-transparent",{variants:{align:{left:"justify-start text-left",center:"justify-center text-center",right:"justify-end text-right"}},defaultVariants:{align:"left"}}),ipe=he("text-fg-default inline-flex size-4 items-center justify-center bg-transparent [&>svg]:size-full"),spe=he("flex min-h-36 w-full items-center justify-center"),lpe=he("!border-b-0 !border-none !p-0"),cpe=he("!table-row"),upe=he("min-h-60 w-full max-w-[calc(100vw-2.5rem)] border-b-0"),dpe=he("",{variants:{expend:{true:"hover:bg-fill-transparent-hovered cursor-pointer",false:""},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{expend:!1,align:"left"}}),fpe=he("[&_.table-checkbox]:w-2.5"),ppe=he(""),hpe=he("!overflow-hidden !border-none !p-0"),mpe=he("!m-0 overflow-hidden !p-0 transition-[max-height] duration-200"),gpe=he("border-subtler py-2_5 border-b px-3"),{useCallback:vpe,useState:wpe}=await q("react"),Xk=({className:t="",children:e,align:n="left",fieldId:r,size:o="",colSpan:a,rowSpan:i,expend:s,expendOpen:l,handleExpendToggle:u,onClick:d})=>{const[f,m]=wpe(l),v=vpe(g=>{if(d?.(g),!!s)try{m(w=>!w)}catch(w){console.error(w)}finally{setTimeout(()=>{u?.(!f)},10)}},[s,f,d,u]);return h("td",{"data-slot":"table-cell",className:ae(dpe({expend:s,align:n}),r,s&&l&&"expend-open",t),colSpan:a,rowSpan:i,style:{width:o},onClick:v,children:h(Bf,{children:e})})};Xk.displayName="RBTdColumn";const{Children:Kv,Fragment:bpe,isValidElement:Zk,useMemo:D2,useState:d6}=await q("react"),Xv=t=>{let e=[];return Kv.forEach(t,n=>{if(Zk(n)){const r=n;r.type===bpe?e=[...e,...Xv(r.props.children)]:typeof n.type=="function"&&(n.type.name==="RBTdColumn"||n.type.displayName==="RBTdColumn")?e.push(n):e=[...e,...Xv(r.props.children)]}}),e},tbe=({className:t="",list:e,children:n,loadingElement:r=h(Kk,{className:"text-fg-default size-7",borderClassName:"text-fg-subtler opacity-100"}),errorFallback:o,noDataMsg:a,hideThead:i,stickyThead:s=!1,theadTopRows:l,sortUpElement:u=h(A8,{}),sortDownElement:d=h(I8,{}),sortNormalElement:f=h(b8,{}),loading:m})=>{const[v,g]=d6(!1),[w,y]=d6(null),_=D2(()=>{const R=(e||[]).length>0?e?.[0]:{};return Xv(n({item:R,index:0}))},[n,e]),S=D2(()=>{const R=_?.map(P=>{const O=P;return{className:O.props?.className??"",align:O.props?.align??"left",label:O.props?.label,fieldId:O.props?.fieldId,enableSorting:typeof O.props?.sortValue<"u"||!!O.props?.handleClickSort,handleClickSort:O.props?.handleClickSort,thColSpan:O.props?.thColSpan,thRowSpan:O.props?.thRowSpan,rowSpan:O.props?.rowSpan,colSpan:O.props?.colSpan,size:O.props?.size,order:O.props?.order??""}});return R?R.filter(P=>typeof P.label<"u").map(P=>w?.fieldId?{...P,order:w?.fieldId===P.fieldId?w?.order:""}:P):[]},[_,w]),x=D2(()=>{const{fieldId:R,order:P}=w??{};if(!P)return e;const $=e.map((A,M)=>Kv.map(n({item:A,index:M}),L=>{if(Zk(L)){const B=L;return B.type===Xk?L:Kv.toArray(B.props.children)}return[]})).reduce((A,M)=>{const L=M.find(B=>B.props.fieldId===R);return A.push(L.props?.sortValue??0),A},[]);return kn.orderBy(e.map((A,M)=>({...A,sortValue:$[M]})),["sortValue"],[P])},[e,w,n]),C=async R=>{let P="desc";const{order:O,index:$,fieldId:A,enableSorting:M,handleClickSort:L}=R;if(!M||v)return;O==="desc"?P="asc":O==="asc"&&(P="");const B={index:$,order:P,fieldId:A};if(y(B),L)try{g(!0),await L(B)}finally{g(!1)}};return h(Bf,{fallback:o,children:h("div",{"data-slot":"table-root",className:ae(rpe({noData:!!e&&e.length===0,loading:!e||v||m,stickyThead:s}),t),children:te("table",{"data-slot":"table",children:[!i&&te("thead",{"data-slot":"table-head",children:[l,h("tr",{"data-slot":"table-head-row",children:S.map((R,P)=>h("th",{"data-slot":"table-head-cell",className:ae(ope({sortable:R.enableSorting,align:R.align}),R.fieldId,R.className),rowSpan:R.thRowSpan??R.rowSpan,colSpan:R.thColSpan??R.colSpan,style:{width:R.size},onClick:()=>C({...R,index:P}),children:te("div",{"data-slot":"table-head-cell-content",className:ape({align:R.align}),children:[R.label,!!R.enableSorting&&te("span",{"data-slot":"table-head-cell-sort-icon",className:ipe(),children:[R.order!=="desc"&&R.order!=="asc"&&f,R.order==="desc"&&d,R.order==="asc"&&u]})]})},`th-${R.fieldId??P}`))})]}),te("tbody",{"data-slot":"table-body",children:[(!e||v||m)&&h("tr",{"data-slot":"table-loading-row",children:h("td",{"data-slot":"table-loading-cell",className:lpe(),colSpan:S.length,children:h("div",{"data-slot":"table-loading-content",className:spe(),children:r})})}),!!e&&!m&&!v&&(e.length>0?x.map((R,P)=>n({item:R,index:P})):h("tr",{"data-slot":"table-empty-row",className:cpe(),children:h("td",{"data-slot":"table-empty-cell",colSpan:S.length,children:typeof a=="object"?a:h(A3,{"data-slot":"table-empty-content",className:upe(),nullText:a})})}))]})]})})})},{useCallback:f6,useEffect:p6,useMemo:h6,useRef:ype,useState:_pe}=await q("react"),xpe=({className:t="",children:e,expendOpen:n=!1,handleExpendChange:r,beforeExpendOpen:o,onClick:a})=>{const i=ype(null),[s,l]=_pe(n),u=f6(v=>{if(i.current){const g=typeof v=="boolean"?v:!s,w=i.current.firstChild;w&&(w.style.maxHeight=g?`${w.scrollHeight}px`:"0px")}},[i,s]),d=f6(async()=>{try{o&&!s&&(await o(),await ok(10))}catch(v){console.error(v)}finally{l(!s),r?.(!s)}},[s,r,o]),f=h6(()=>{const v=w=>w.flatMap(y=>y?.props?y.type?.displayName==="RBTdColumn"?{...y,props:{...y.props,handleExpendToggle:d,expendOpen:s}}:Array.isArray(y.props.children)?v(y.props.children):[]:[]),g=Array.isArray(e)?e:[e];return v(g)},[e,s,d]),m=h6(()=>{const v=w=>w.flatMap(y=>{if(y?.props){if(y.type?.displayName==="RBTdExpend")return y;if(Array.isArray(y.props.children))return v(y.props.children)}}),g=Array.isArray(e)?e:[e];return v(g).filter(w=>w)[0]},[e]);return p6(()=>{u(s)},[s,u]),p6(()=>{typeof n<"u"&&l(n)},[n]),te(Mr,{children:[h("tr",{"data-slot":"table-row",className:ae(fpe(),t),onClick:a,children:f}),!!m&&h("tr",{"data-slot":"table-expand-row",className:ppe(),children:h("td",{"data-slot":"table-expand-cell",ref:i,className:hpe(),colSpan:f.length,children:m})})]})};xpe.displayName="RBTableRow";const Spe=({className:t="",children:e,style:n})=>h("div",{"data-slot":"table-expand-content",className:mpe(),children:h("div",{"data-slot":"table-expand-content-inner",className:ae(gpe(),t),style:n,children:e})});Spe.displayName="RBTdExpend";const Cpe=he("inline-flex items-center justify-center rounded-full",{variants:{type:{number:"typo-compact-2xs-semibold size-4 min-w-4 gap-1 overflow-hidden px-1",capsule:"typo-compact-2xs-semibold gap-1_5 px-1_5 py-0_5",soft:"typo-compact-2xs-semibold gap-1_5 px-1_5 py-0_5",transparent:"typo-compact-2xs-semibold gap-0_5 rounded-none p-0"}},defaultVariants:{type:"number"}}),Epe=he("",{variants:{variant:{solid:"bg-fill-default text-fg-inverse hover:bg-fill-default-hovered",soft:"bg-fill-subtler text-fg-default hover:bg-fill-subtler-hovered",outlined:"bg-fill-transparent text-fg-default outline-border-default hover:bg-fill-transparent-hovered outline outline-1 outline-offset-[-1px]",ghost:"bg-fill-transparent text-fg-default hover:bg-fill-transparent-hovered"}},defaultVariants:{variant:"solid"}}),Mpe=he("",{variants:{color:{red:"bg-fill-danger text-fg-inverse",orange:"bg-fg-warning text-fg-inverse",green:"bg-fill-success text-fg-inverse",blue:"bg-fill-information text-fg-inverse",purple:"bg-fill-debug text-fg-inverse",gray:"bg-fill-subtle text-fg-inverse","gray-subtle":"bg-fill-subtler text-fg-inverse"}},defaultVariants:{color:"red"}}),kpe=he("",{variants:{color:{red:"bg-fill-danger-subtlest text-fg-danger",orange:"bg-fill-caution-subtlest text-fg-caution",green:"bg-fill-success-subtlest text-fg-success",blue:"bg-fill-information-subtlest text-fg-information",purple:"bg-fill-debug-subtlest text-fg-debug",gray:"bg-fill-disabled text-fg-subtle","gray-subtle":"bg-fill-subtlest text-fg-subtler"}},defaultVariants:{color:"red"}}),Rpe=he("",{variants:{color:{red:"text-fg-danger bg-transparent",orange:"text-fg-warning bg-transparent",green:"text-fg-success bg-transparent",blue:"text-fg-information bg-transparent",purple:"text-fg-debug bg-transparent",gray:"text-fg-subtle bg-transparent","gray-subtle":"text-fg-subtler bg-transparent"}},defaultVariants:{color:"red"}});function nbe({className:t,type:e="number",numberVariant:n="solid",color:r="red",leadingIcon:o,children:a}){return h("span",{"data-slot":"badge",className:ae(Cpe({type:e}),{[Epe({variant:n})]:e==="number",[Mpe({color:r})]:e==="capsule",[kpe({color:r})]:e==="soft",[Rpe({color:r})]:e==="transparent"},t),children:e==="transparent"?te(Mr,{children:[o,h("span",{"data-slot":"badge-content",className:"relative top-px inline-flex items-center",children:a})]}):a})}const Tpe=he("inline-flex w-full flex-col items-start gap-7 overflow-hidden"),Npe=he("flex h-48 w-full flex-col items-center justify-center gap-3 overflow-hidden px-9 py-5"),Ppe=he("text-fg-subtle typo-body-xs2-normal w-full max-w-[600px] text-center"),Ape=he("text-fg-subtler inline-flex size-6 items-center justify-center [&_svg]:size-full");function m6({className:t,type:e="button",message:n="엠프티뷰의 안내 메세지를 입력해주세요.",description:r,buttonLabel:o="버튼 라벨",onButtonClick:a,icon:i}){const s=e==="button";return h("div",{"data-slot":"empty-view",className:ae(Tpe(),t),children:te("div",{"data-slot":"empty-view-section",className:Npe(),children:[!s&&h("i",{"data-slot":"empty-view-icon","aria-hidden":!0,className:Ape(),children:i??h(Z0,{})}),te("div",{children:[h("p",{"data-slot":"empty-view-message",className:Ppe(),children:n}),r&&h("p",{"data-slot":"empty-view-description",className:"text-fg-subtler typo-body-xs2-normal w-full max-w-150 text-center",children:r})]}),s&&h(Wr,{"data-slot":"empty-view-button",size:"sm",variant:"soft",onClick:a,children:o})]})})}const Ipe=he("relative z-[1] w-full",{variants:{disabled:{true:"[&_[data-slot=multi-range-range]]:bg-fill-default [&_[data-slot=text-input]]:bg-fill-control-surface-disabled [&_[data-slot=text-input]]:text-fg-disabled [&_[data-slot=text-input]]:outline-border-disabled [&_[data-slot=multi-range-text-field]]:text-fg-disabled [&_input[type='range']::-moz-range-thumb]:border-default [&_input[type='range']::-moz-range-thumb]:bg-default [&_input[type='range']::-webkit-slider-thumb]:border-default [&_input[type='range']::-webkit-slider-thumb]:bg-default opacity-30 [&_[data-slot=multi-range-slider]]:pointer-events-none [&_[data-slot=multi-range-slider]]:cursor-not-allowed [&_input[type='range']::-moz-range-thumb]:cursor-not-allowed [&_input[type='range']::-webkit-slider-thumb]:cursor-not-allowed",false:""}},defaultVariants:{disabled:!1}}),Ope=he("relative inline-flex w-full items-center justify-center"),Lpe=he("h-[var(--mri-slider-height)] w-[calc(100%_-_var(--mri-thumb-size))]"),g6=he("pointer-events-none absolute top-1/2 left-0 z-[3] h-[var(--mri-slider-height)] w-full -translate-y-1/2 appearance-none bg-transparent opacity-100"),$pe=he("relative z-[2] h-[var(--mri-slider-height)]"),Dpe=he("absolute inset-0 z-[1] rounded-full bg-[var(--mri-track-color,var(--color-fill-subtler))]"),Bpe=he("absolute top-0 bottom-0 z-[2] rounded-full bg-[var(--mri-range-color,var(--color-fill-brand))]"),zpe=he("flex w-full items-start justify-between pt-1"),v6=he("",{variants:{align:{left:"",right:"ml-auto text-right"}},defaultVariants:{align:"left"}}),w6=he("typo-compact-xs2-normal text-fg-default bg-fill-control-surface outline-border-default inline-block h-8 w-auto shrink-0 rounded-md px-2.5 text-center outline outline-1 outline-offset-[-1px] transition-colors"),b6="[&::-webkit-slider-thumb]:pointer-events-auto [&::-webkit-slider-thumb]:h-[var(--mri-thumb-size)] [&::-webkit-slider-thumb]:w-[var(--mri-thumb-size)] [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border [&::-webkit-slider-thumb]:border-[var(--mri-thumb-border-color,var(--color-fg-default))] [&::-webkit-slider-thumb]:bg-[var(--mri-thumb-color,var(--color-fg-default))] [&::-webkit-slider-thumb]:cursor-pointer [&::-moz-range-thumb]:pointer-events-auto [&::-moz-range-thumb]:h-[var(--mri-thumb-size)] [&::-moz-range-thumb]:w-[var(--mri-thumb-size)] [&::-moz-range-thumb]:appearance-none [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border [&::-moz-range-thumb]:border-[var(--mri-thumb-border-color,var(--color-fg-default))] [&::-moz-range-thumb]:bg-[var(--mri-thumb-color,var(--color-fg-wte))] [&::-moz-range-thumb]:cursor-pointer",{forwardRef:Fpe,useCallback:x1,useEffect:y6,useImperativeHandle:Vpe,useMemo:B2,useRef:Nd,useState:jpe}=await q("react"),Hpe=Fpe((t,e)=>{const{className:n="",value:r,name:o,min:a,max:i,step:s=1,thumbSize:l=12,sliderHeight:u=4,thumbBorderColor:d,thumbColor:f,trackColor:m,rangeColor:v,showTextInput:g=!0,disabled:w=!1,handleChange:y,onChange:_}=t,S=Nd([a,i]),x=Nd(null),C=Nd(null),R=Nd(null),P=Nd(null),[O,$]=jpe([a,i]),A=B2(()=>O.map(I=>(I-a)/(i-a)*100),[O,a,i]),M=w||a===i,L=B2(()=>Wo(O[0]),[O]),B=B2(()=>Wo(O[1]),[O]),F=x1(()=>{!R.current||!P.current||(R.current.value=L,P.current.value=B)},[L,B]),N=x1(I=>{I.key==="Enter"&&!I.nativeEvent.isComposing&&(R.current.blur(),P.current.blur())},[]),V=x1((I,D,U=!1)=>{if(g&&(!R.current||!P.current))return;const{value:Y}=D.target;if(I==="left"){let oe=Math.min(Dl(Y),O[1]-s);oe=oe>a?oe:a,$([oe,O[1]]),U&&y?.([oe,O[1]],o),R.current.value=Wo(oe)}else{let oe=Math.max(Dl(Y),O[0]+s);oe=oe<=i?oe:i,$([O[0],oe]),U&&y?.([O[0],oe],o),P.current.value=Wo(oe)}_?.(D),F()},[_,g,F,y,o,O,s,a,i]),z=x1(()=>{O.some((I,D)=>I!==S.current[D])&&(S.current=[...O],y?.(O,o))},[O,o,y]);return y6(()=>{F()},[F]),y6(()=>{typeof r<"u"&&($(r),S.current=[...r])},[r]),Vpe(e,()=>({focus:x.current.focus})),te("div",{"data-slot":"multi-range-input",className:ae(Ipe({disabled:M}),n),style:{"--mri-thumb-size":`${l}px`,"--mri-slider-height":`${u}px`,"--mri-thumb-border-color":d,"--mri-thumb-color":f,"--mri-track-color":m,"--mri-range-color":v},children:[h("div",{className:Ope(),style:{height:"var(--mri-thumb-size)"},children:te("div",{className:Lpe(),children:[h("input",{ref:x,type:"range",value:O[0],min:a,max:i,step:s,disabled:M,className:ae(g6(),b6),onChange:I=>V("left",I),onMouseUp:z,onMouseLeave:z,onTouchEnd:z}),h("input",{ref:C,type:"range",value:O[1],min:a,max:i,step:s,disabled:M,className:ae(g6(),b6),onChange:I=>V("right",I),onMouseUp:z,onMouseLeave:z,onTouchEnd:z}),te("div",{"data-slot":"multi-range-slider",className:$pe(),children:[h("div",{"data-slot":"multi-range-track",className:Dpe()}),h("div",{"data-slot":"multi-range-range",className:Bpe(),style:{left:`${A[0]}%`,right:`${100-A[1]}%`}})]})]})}),g&&te("div",{"data-slot":"multi-range-text-wrap",className:zpe(),children:[h("div",{className:v6({align:"left"}),children:h("input",{"data-slot":"multi-range-text-field",ref:R,type:"text",inputMode:"numeric",defaultValue:O[0],size:Math.max(L.length,1),disabled:M,className:w6(),onBlur:I=>V("left",I,!0),onKeyDown:N})}),h("div",{className:v6({align:"right"}),children:h("input",{"data-slot":"multi-range-text-field",ref:P,type:"text",inputMode:"numeric",defaultValue:O[1],size:Math.max(B.length,1),disabled:M,className:w6(),onBlur:I=>V("right",I,!0),onKeyDown:N})})]})]})});Hpe.displayName="MultiRangeInput";const Wpe=he("relative touch-none rounded-full",{variants:{disabled:{false:"",true:"cursor-not-allowed [&>*]:pointer-events-none [&>*]:opacity-40"}},defaultVariants:{disabled:!1}}),qpe=he(["relative flex h-full cursor-grab items-center justify-center","will-change-[transform,opacity]","transition-opacity duration-150 ease-in-out"],{variants:{active:{false:"",true:"cursor-grabbing opacity-100"}},defaultVariants:{active:!1}}),Upe=he(["absolute top-0 left-0 z-[1] h-full w-full","will-change-transform [backface-visibility:hidden]"]),Ype=he("shadow-down-sm relative block h-full rounded-full bg-[var(--joy-stick-area-color,var(--color-fill-inverse))] opacity-40 transition-opacity duration-100",{variants:{active:{false:"",true:"opacity-100"}},defaultVariants:{active:!1}}),Gpe=he(["relative z-[2] h-10 w-10 rounded-full","border-disabled shadow-down-xs border","pointer-events-none touch-none","will-change-transform [backface-visibility:hidden]","transition-[scale,box-shadow] duration-200 ease-out"],{variants:{active:{false:"",true:"shadow-down-sm scale-110"}},defaultVariants:{active:!1}}),Kpe=he(["pointer-events-none absolute inset-0 rounded-full","[--joy-sweep:calc(30deg_+_var(--joy-ratio,0)_*_45deg)]","opacity-[var(--joy-ratio,0)] transition-opacity duration-100","bg-[conic-gradient(from_calc(var(--joy-angle,0deg)_-_var(--joy-sweep)_/_2),transparent_0deg,var(--joy-arc-color)_calc(var(--joy-sweep)_*_0.3),var(--joy-arc-color)_calc(var(--joy-sweep)_*_0.7),transparent_var(--joy-sweep))]","[mask:radial-gradient(closest-side,transparent_calc(100%_-_3px_-_var(--joy-ratio,0)_*_1px),#000_calc(100%_-_2px_-_var(--joy-ratio,0)_*_1px))]"]),Xpe=he("pointer-events-none absolute top-0 left-0 z-[2] h-full w-full touch-none"),S1=he(["absolute z-[1] inline-flex items-center justify-center","size-3.5 text-center","transition-[opacity,color] duration-150 ease-out","[&_svg]:inline-block [&_svg]:size-3.5 [&_svg]:align-middle"],{variants:{position:{top:"top-2 left-1/2 -translate-x-1/2",bottom:"bottom-2 left-1/2 -translate-x-1/2",left:"top-1/2 left-2 -translate-y-1/2",right:"top-1/2 right-2 -translate-y-1/2"},highlighted:{false:"text-fg-default opacity-70",true:"text-[var(--joy-arc-color)] opacity-100"}},defaultVariants:{highlighted:!1}}),Zpe=he("pointer-events-none absolute top-0 left-0 z-[2] h-full w-full touch-none"),_6=he(["absolute z-[1] inline-flex size-5 items-center justify-center","text-center transition-[opacity,color] duration-150 ease-out","[&_svg]:inline-block [&_svg]:size-5","[&_svg_path]:stroke-opacity-100"],{variants:{position:{top:"top-[5px] left-1/2 -translate-x-1/2",bottom:"bottom-[5px] left-1/2 -translate-x-1/2 [&_svg]:rotate-x-180 [&_svg]:rotate-y-180"},highlighted:{false:"text-fg-default opacity-40",true:"text-[var(--joy-arc-color)] opacity-100"}},defaultVariants:{highlighted:!1}}),{useRef:Pi,useCallback:Sl,useId:Qpe,useEffect:x6,useState:S6}=await q("react"),rbe=({className:t,type:e="direction",size:n=100,stickColor:r="radial-gradient(circle, #727272 0%, #3B3B3B 100%)",arcColor:o="var(--color-scale-zinc-100)",stickAreaColor:a="var(--color-fill-inverse)",throttleThreshold:i=.05,throttleDuration:s,xOnly:l=!1,yOnly:u=!1,disableDiagonal:d=!1,disabled:f=!1,keepMoveEventInterval:m,paddingSize:v=10,style:g,onStart:w,onMove:y,onEnd:_})=>{const S=Pi(null),x=Pi(null),C=Pi(null),R=Pi(null),P=Pi(null),O=Pi(null),$=Pi(null),A=Pi({x:0,y:0}),M=Pi({type:"none",startPosition:{x:0,y:0},normalizedDistance:{x:0,y:0},rotate:{radian:0,degree:0},distance:{x:0,y:0},direction:{x:"center",y:"center"},time:Date.now()}),L=Qpe().replace(/:/g,""),[B,F]=S6(!1),[N,V]=S6({x:"center",y:"center"}),z=({clientX:ee,clientY:ne})=>{if(!x.current)return;const{width:ue,top:ve,left:we}=x.current.getBoundingClientRect(),ye=ue/2,Le=ee-we-ye,Oe=ne-ve-ye;x.current.style.transform=`translate3d(${Le}px, ${Oe}px, 0px)`,S.current.style.transition=""},I=Sl(()=>{x.current&&(x.current.style.transform="translate3d(0px, 0px, 0px)",x.current.classList.remove("left","right","top","bottom","center"))},[]),D=Sl(({clientX:ee,clientY:ne})=>{if(!S.current||!C.current)return;const ve=C.current.offsetWidth/2,we={x:ee-M.current.startPosition.x,y:ne-M.current.startPosition.y};d?Math.abs(we.x)>Math.abs(we.y)?we.y=0:Math.abs(we.x)<Math.abs(we.y)?we.x=0:(we.x=0,we.y=0):l?we.y=0:u&&(we.x=0);const ye=Math.hypot(we.x,we.y);if(ye>ve){const Ue=ve/ye;we.x*=Ue,we.y*=Ue}const Le={x:Math.abs(we.x)>3?we.x>0?"right":"left":"center",y:Math.abs(we.y)>3?we.y>0?"bottom":"top":"center"},Oe=Math.atan2(we.x,-we.y);let Ne=Oe*180/Math.PI;Ne<0&&(Ne+=360);const me={radian:Oe,degree:Ne},pe={x:we.x/ve,y:-we.y/ve},be=Math.hypot(pe.x-A.current.x,pe.y-A.current.y);return{direction:Le,distance:we,normalizedDistance:pe,movementRatio:be,rotate:me}},[d,l,u]),U=Sl(({clientX:ee,clientY:ne})=>{if(!S.current||!C.current)return;const{direction:ue,distance:ve,rotate:we,normalizedDistance:ye,movementRatio:Le}=D({clientX:ee,clientY:ne});S.current.style.transform=`translate3d(${ve.x}px, ${ve.y}px, 0px)`,C.current.style.setProperty("--joy-angle",`${we.degree}deg`);const Oe=Math.hypot(ye.x,ye.y);return C.current.style.setProperty("--joy-ratio",`${Oe}`),x.current.classList.remove("left","right","top","bottom","center"),x.current.classList.add(ue.x,ue.y),V(ue),{direction:ue,distance:{x:ve.x,y:-ve.y},rotate:we,normalizedDistance:ye,movementRatio:Le}},[D]),Y=Sl(()=>{S.current&&(S.current.style.transition="transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1)",C.current?.style.setProperty("--joy-ratio","0"),S.current.style.transform="translate3d(0px, 0px, 0px)")},[]),oe=Sl(()=>{const ne=Date.now()-M.current.time;if(!$.current||["none","end"].includes(M.current.type)||ne<s)return;const ue=$.current;ue.preventDefault(),ue.stopPropagation();const{clientX:ve,clientY:we}=ue,{distance:ye,direction:Le,rotate:Oe,normalizedDistance:Ne,movementRatio:me}=U({clientX:ve,clientY:we});M.current={...M.current,type:"move",rotate:Oe,distance:ye,normalizedDistance:Ne,direction:Le,time:Date.now()};const pe={...M.current,event:ue,targets:{joystick:x.current,stickArea:C.current,stick:S.current}};me>=i&&(A.current=Ne,y?.(pe)),m&&(window.clearInterval(P.current),P.current=window.setInterval(()=>{M.current.type==="move"&&y?.(pe)},m))},[i,s,y,U,m]),Q=Sl(ee=>{window.clearInterval(P.current),!["none","end"].includes(M.current.type)&&(ee.target instanceof Element&&ee.target.releasePointerCapture?.(ee.pointerId),ee.preventDefault(),ee.stopPropagation(),M.current.type="end",setTimeout(()=>{M.current.type="none"},100),I(),Y(),F(!1),V({x:"center",y:"center"}),x.current.classList.remove("active"),window.clearInterval(P.current),$.current=null,_?.({type:"end",...M.current,direction:{x:"center",y:"center"},normalizedDistance:{x:0,y:0},rotate:{degree:0,radian:0},distance:{x:0,y:0},event:ee,targets:{joystick:x.current,stickArea:C.current,stick:S.current}}))},[_,I,Y]),re=ee=>{if(ee.button===2||f||["start","move","end"].includes(M.current.type))return;R.current=`${L}-${ee.pointerId}`,ee.currentTarget.setPointerCapture(ee.pointerId),ee.stopPropagation(),ee.preventDefault();const{clientX:ne,clientY:ue}=ee;M.current.type="start",M.current.startPosition={x:ne,y:ue},F(!0),V({x:"center",y:"center"}),x.current.classList.add("active"),z({clientX:ne,clientY:ue}),w?.({...M.current,event:ee,targets:{joystick:x.current,stickArea:C.current,stick:S.current},distance:{x:0,y:0},normalizedDistance:{x:0,y:0},rotate:{radian:0,degree:0},startPosition:{x:ne,y:ue},direction:{x:"center",y:"center"}})},le=Sl(ee=>{$.current=ee.nativeEvent,R.current===`${L}-${ee.pointerId}`&&(O.current&&cancelAnimationFrame(O.current),O.current=requestAnimationFrame(oe))},[oe,L]);return x6(()=>{const ee=ne=>{Q(ne)};return window.addEventListener("pointerup",ee),()=>{window.removeEventListener("pointerup",ee)}},[L,Q]),x6(()=>{const ee=P.current;return()=>{window.clearInterval(ee)}},[]),h("div",{"data-slot":"joy-stick",className:ae(Wpe({disabled:f}),t),style:{...g,width:`${n+v*2}px`,height:`${n+v*2}px`,"--joy-stick-color":r,"--joy-stick-area-color":a,"--joy-arc-color":o},onContextMenu:ee=>ee.preventDefault(),children:te("div",{"data-slot":"joy-stick-inner",ref:x,className:qpe({active:B}),style:{padding:v},children:[h("div",{"data-slot":"joy-stick-stick-area",ref:C,className:Upe(),style:{padding:v},onPointerDownCapture:re,onPointerUpCapture:Q,onPointerMove:le,children:te("span",{"data-slot":"joy-stick-stick-area-inner",className:Ype({active:B}),style:{"--joy-stick-area-color":a},children:[h("span",{"data-slot":"joy-stick-arc",className:Kpe()}),e==="direction"&&te("div",{className:Xpe(),children:[h("span",{className:S1({position:"top",highlighted:B&&N.y==="top"}),children:h(y8,{})}),h("span",{className:S1({position:"bottom",highlighted:B&&N.y==="bottom"}),children:h(g8,{})}),h("span",{className:S1({position:"left",highlighted:B&&N.x==="left"}),children:h(v8,{})}),h("span",{className:S1({position:"right",highlighted:B&&N.x==="right"}),children:h(w8,{})})]}),e==="curved"&&te("div",{className:Zpe(),children:[h("span",{className:_6({position:"top",highlighted:B&&N.y==="top"}),children:h(G2,{})}),h("span",{className:_6({position:"bottom",highlighted:B&&N.y==="bottom"}),children:h(G2,{})})]})]})}),h("div",{"data-slot":"joy-stick-stick",ref:S,className:Gpe({active:B}),style:{background:"var(--joy-stick-color)"}})]})})},Jpe=he("pointer-events-none"),e1e=he("absolute z-[9] w-full rounded-md"),t1e=he("pointer-events-none absolute z-[99] overflow-hidden",{variants:{hidden:{false:"",true:"hidden"}},defaultVariants:{hidden:!1}}),n1e=he("block"),r1e=he(["block size-2.5","fill-bg-tooltip"]),o1e=he("absolute z-[9999]"),a1e=he("relative"),i1e=he(["inline-flex items-center justify-center overflow-hidden","bg-tooltip max-w-60 rounded-md px-3 py-2"]),s1e=he(["text-fg-inverse flex-1","typo-body-xs2-normal","break-words whitespace-normal"]),{useCallback:ys,useEffect:z2,useMemo:C6,useRef:Gc,useState:F2}=await q("react"),l1e=t=>new Promise(e=>setTimeout(e,t)),obe=({className:t="",anchorId:e,width:n=200,space:r=0,place:o="bottom",events:a=["hover"],arrowPosition:i=0,hideArrow:s,tooltipPosition:l,tooltipColor:u,tooltipTextColor:d,tooltipBoxShadow:f,tooltipBorderRadius:m,open:v,whenWindowScrollClose:g,children:w})=>{const y=Gc(null),_=Gc(null),S=Gc(null),x=Gc(null),C=Gc(0),R=Gc(!1),[P,O]=F2(!1),[$,A]=F2(o),[M,L]=F2(!!v),B=C6(()=>{const Q=[...a],re=Q.findIndex(le=>le==="hover");return re!==-1&&!xo.isMobile&&Q.splice(re,0,"mouseover","mouseout"),Q},[a]),F=ys(()=>{if(_.current)return _.current;const Q=document.querySelector(`#${e}`);Q&&(_.current=Q)},[e]),N=ys((Q,re)=>{if(!_.current)return;const{scrollY:le,innerHeight:ee}=window,ne=le,ue=le+ee,{top:ve}=_.current.getBoundingClientRect();return ne>Q&&ve>0?Q+ve:ue<Q+re?ue-re-10:Q},[]),V=ys((Q,re)=>{const{scrollX:le,innerWidth:ee}=window,ne=le,ue=le+ee;return ne>Q?ne+r:ue<Q+re?ue-re-r:Q},[r]),z=ys(Q=>{const{targetTop:re,targetLeft:le,targetWidth:ee,targetHeight:ne,tooltipHeight:ue,arrowWidth:ve,arrowHeight:we}=Q;return scrollY+re-ue-we-r<scrollY&&o==="top"?"bottom":scrollY+re+ne+we+r>scrollY+innerHeight&&o==="bottom"?"top":le-ve-r<100&&o==="left"?"right":innerWidth-(scrollX+le+ee+ve+r+10)<100&&o==="right"?"left":le+scrollX<scrollX?"right":o},[o,r]),I=ys(()=>{if(!y.current||!_.current)return{targetTop:0,targetLeft:0,targetWidth:0,targetHeight:0,arrowWidth:0,arrowHeight:0,tooltipWidth:0,tooltipHeight:0,scrollX:0,scrollY:0,innerWidth:0,innerHeight:0};const{top:Q,left:re,height:le,width:ee}=_.current.getBoundingClientRect(),{offsetHeight:ne,offsetWidth:ue}=y.current,{clientWidth:ve=0,clientHeight:we=0}=S.current??{},{scrollX:ye,scrollY:Le,innerWidth:Oe,innerHeight:Ne}=window,{position:me,top:pe,left:be}=document.body.style,Ue=me==="fixed"?Number(pe.replace("px",""))*-1:0,He=me==="fixed"?Number(be.replace("px",""))*-1:0;return{targetTop:Q,targetLeft:re,targetWidth:ee,targetHeight:le,arrowWidth:ve,arrowHeight:we,tooltipWidth:ue,tooltipHeight:ne,scrollX:He||ye,scrollY:Ue||Le,innerWidth:Oe,innerHeight:Ne}},[]),D=ys(async()=>{if(!_.current||!y.current)return;const{targetTop:Q,targetLeft:re,targetWidth:le,targetHeight:ee,arrowWidth:ne,arrowHeight:ue,tooltipWidth:ve,tooltipHeight:we,scrollX:ye,scrollY:Le,innerWidth:Oe,innerHeight:Ne}=I(),{top:me=0,left:pe=0}=l??{},be=i||0,Ue=s?Math.max(r,8):r,He=z({targetTop:Q,targetLeft:re,targetWidth:le,targetHeight:ee,arrowWidth:ne,arrowHeight:ue,tooltipWidth:ve,tooltipHeight:we,scrollX:ye,scrollY:Le,innerWidth:Oe,innerHeight:Ne});A(He);let qe="",_e="",at="";switch(He){case"top":qe+=`
272
272
  top: ${me+Le+Q-we-ue-Ue}px;
273
273
  left: ${V(pe+ye+re+le/2-ve/2,ve)}px;
274
274
  `,_e+=`
@@ -308,4 +308,4 @@ Minimum version required to store current data is: `+L+`.
308
308
  top ${r}ms ease,
309
309
  bottom ${r}ms ease,
310
310
  max-height ${r}ms ease
311
- `},children:h("div",{"data-comp":"ToastStackContent",style:F&&B?{minHeight:y[M]+(g[M]?28:0),position:"relative",width:"100%"}:void 0,children:a[M]?.map((N,V)=>h(M0e,{...N,toastOrder:V+1,toastCount:a[M]?.length??0,component:o,animationDuration:r,isWrapperMouseOver:l[M],isStackExpanded:d[M],isWrapperExpandedForLayout:B,isWrapperScrollable:g[M],requestStackExpand:O,onStackMouseEnter:R,onStackMouseLeave:P},N.id))})},M)})})},{useEffect:R0e,useMemo:V2,useRef:T6,useState:N6}=await q("react"),v_e=({className:t,open:e,type:n="basic",variant:r="default",title:o,content:a,icon:i,actionLabel:s,handleActionClick:l,closeOnActionClick:u=!0,position:d,toastCount:f,isWrapperMouseOver:m,isStackExpanded:v,pauseTimer:g,resumeTimer:w,requestStackExpand:y,closeToast:_})=>{const S=T6(null),x=T6(null),[C,R]=N6(!1),[P,O]=N6(!1),$=!!s,A=(f??0)>=3&&!m&&!v,M=A,L=V2(()=>v0e(n,r),[n,r]),B=V2(()=>_0e(d,C),[d,C]),F=V2(()=>{switch(r){case"copy":return h(C8,{});case"danger":return h(E8,{});case"warning":case"caution":return h(O8,{});case"success":return n==="basic"?h(u0e,{}):h(js,{});default:return null}},[n,r]),N=i??F,V=$?w0e(n,r):null,z=$&&!!o!=!!a,I=Y=>{Y.button!==2&&(Y.stopPropagation(),Y.preventDefault(),Y.currentTarget.setPointerCapture?.(Y.pointerId),S.current=Y.pointerId,x.current={startX:Y.clientX,startY:Y.clientY},g())},D=Y=>{if(!x.current||S.current!==Y.pointerId)return;Y.stopPropagation(),Y.preventDefault();const{startX:oe,startY:Q}=x.current,{clientX:re,clientY:le}=Y;x.current.deltaX=re-oe,x.current.deltaY=le-Q;const ee=Y.currentTarget;ee.style.transitionProperty="translate",O(!0),d==="top-center"?x.current.deltaY<0?ee.style.top=`${x.current.deltaY}px`:(x.current=null,ee.hasPointerCapture?.(Y.pointerId)&&ee.releasePointerCapture(Y.pointerId)):d==="bottom-center"?x.current.deltaY>0?ee.style.bottom=`-${x.current.deltaY}px`:(x.current=null,ee.hasPointerCapture?.(Y.pointerId)&&ee.releasePointerCapture(Y.pointerId)):d.includes("left")?ee.style.left=`${x.current.deltaX}px`:d.includes("right")&&(ee.style.right=`-${x.current.deltaX}px`)},U=Y=>{if(Y.stopPropagation(),Y.preventDefault(),S.current!==Y.pointerId)return;const oe=Y.currentTarget;if(oe.style.transitionProperty="",oe.hasPointerCapture?.(Y.pointerId)&&oe.releasePointerCapture(Y.pointerId),!x.current){O(!1),S.current=null,w();return}const{deltaX:Q=0,deltaY:re=0}=x.current,ee=d.includes("left")||d.includes("right")?Q:re;if(Q===0&&re===0){if((f??0)>=3&&!v){y?.(),O(!1),S.current=null,x.current=null,w();return}_();return}Math.abs(ee)>15?_():d==="top-center"?oe.style.top="0px":d==="bottom-center"?oe.style.bottom="0px":d.includes("left")?oe.style.left="0px":d.includes("right")&&(oe.style.right="0px"),O(!1),S.current=null,x.current=null,w()};return R0e(()=>{R(e)},[e]),h("div",{"data-comp":"RBSimpleToast",className:ae(y0e({open:C,hidden:!1,stacked:!1,motion:B}),!C&&"pointer-events-none",t),onPointerDown:I,onPointerMove:D,onPointerUp:U,onPointerLeave:U,onContextMenu:Y=>Y.preventDefault(),children:h("div",{className:ae(p0e({type:n,variant:r,hasAction:$,stacked:M,active:P})),style:P?{boxShadow:"none"}:void 0,onTouchEnd:()=>O(!1),children:te(Ul,{className:"w-full items-stretch gap-3",children:[te(Yo,{alignItems:"flex-start",className:ae(R6(),z&&"w-full justify-between gap-3"),children:[te(Yo,{alignItems:"flex-start",className:ae(R6(),"min-w-0 flex-1"),children:[N?h("span",{className:h0e({type:n,tone:L,variant:r}),children:N}):null,te(Ul,{className:ae(m0e(),"w-full"),children:[o?h("div",{className:ae(g0e(),A?"truncate":"wrap-break-word whitespace-pre-line"),children:o}):null,a?h("div",{className:ae(A?"truncate":"wrap-break-word whitespace-pre-line"),children:a}):null]})]}),V&&z?h("span",{className:"shrink-0",onPointerDown:Y=>Y.stopPropagation(),onPointerUp:Y=>Y.stopPropagation(),onClick:Y=>Y.stopPropagation(),children:h(Wr,{size:V.size,variant:V.variant,onClick:()=>{l?.(),u&&_?.()},children:s})}):null]}),V&&!z?h("span",{className:"inline-flex w-full justify-end",onPointerDown:Y=>Y.stopPropagation(),onPointerUp:Y=>Y.stopPropagation(),onClick:Y=>Y.stopPropagation(),children:h(Wr,{size:V.size,variant:V.variant,onClick:()=>{l?.(),u&&_?.()},children:s})}):null]})})})},{useEffect:T0e}=await q("react"),w_e=({className:t,open:e,resolve:n,onOpenChange:r})=>{const{barCodeValue:o}=lue(),{theme:a}=Q0();return T0e(()=>{o&&n(o)},[o,n]),te(jh,{className:ae("RBQrBarCodeGuideModal","max-h-full w-fit",t),open:e,header:{title:"QR 코드 스캔 가이드"},onOpenChange:r,children:[te("div",{className:"text-fg-default text-body-sm-normal mt-[1.5rem] mb-[1rem] text-center leading-[1.5]",children:["바코드 USB를 로봇에 연결 후",h("br",{}),"로봇 명판에 QR 코드를 찍어주세요"]}),h("div",{className:"mx-auto w-[30rem] p-5",children:h("img",{src:Dx(a==="dark"?"/qr-bar-code-guide-dark-img.png":"/qr-bar-code-guide-img.webp"),alt:"qr-bar-code-guide",className:"w-full object-cover"})})]})};var j2={};const It=t=>typeof t=="string",Id=()=>{let t,e;const n=new Promise((r,o)=>{t=r,e=o});return n.resolve=t,n.reject=e,n},P6=t=>t==null?"":""+t,N0e=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},P0e=/###/g,A6=t=>t&&t.indexOf("###")>-1?t.replace(P0e,"."):t,I6=t=>!t||It(t),Gd=(t,e,n)=>{const r=It(e)?e.split("."):e;let o=0;for(;o<r.length-1;){if(I6(t))return{};const a=A6(r[o]);!t[a]&&n&&(t[a]=new n),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={},++o}return I6(t)?{}:{obj:t,k:A6(r[o])}},O6=(t,e,n)=>{const{obj:r,k:o}=Gd(t,e,Object);if(r!==void 0||e.length===1){r[o]=n;return}let a=e[e.length-1],i=e.slice(0,e.length-1),s=Gd(t,i,Object);for(;s.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),s=Gd(t,i,Object),s?.obj&&typeof s.obj[`${s.k}.${a}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},A0e=(t,e,n,r)=>{const{obj:o,k:a}=Gd(t,e,Object);o[a]=o[a]||[],o[a].push(n)},U0=(t,e)=>{const{obj:n,k:r}=Gd(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},I0e=(t,e,n)=>{const r=U0(t,n);return r!==void 0?r:U0(e,n)},lR=(t,e,n)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?It(t[r])||t[r]instanceof String||It(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):lR(t[r],e[r],n):t[r]=e[r]);return t},El=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var O0e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const L0e=t=>It(t)?t.replace(/[&<>"'\/]/g,e=>O0e[e]):t;class $0e{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const D0e=[" ",",","?","!",";"],B0e=new $0e(20),z0e=(t,e,n)=>{e=e||"",n=n||"";const r=D0e.filter(i=>e.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const o=B0e.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!o.test(t);if(!a){const i=t.indexOf(n);i>0&&!o.test(t.substring(0,i))&&(a=!0)}return a},Zv=(t,e,n=".")=>{if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const r=e.split(n);let o=t;for(let a=0;a<r.length;){if(!o||typeof o!="object")return;let i,s="";for(let l=a;l<r.length;++l)if(l!==a&&(s+=n),s+=r[l],i=o[s],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&l<r.length-1)continue;a+=l-a+1;break}o=i}return o},uf=t=>t?.replace(/_/g,"-"),F0e={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class Y0{constructor(e,n={}){this.init(e,n)}init(e,n={}){this.prefix=n.prefix||"i18next:",this.logger=e||F0e,this.options=n,this.debug=n.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,r,o){return o&&!this.debug?null:(It(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new Y0(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Y0(this.logger,e)}}var Ja=new Y0;class Hh{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e,...n){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([o,a])=>{for(let i=0;i<a;i++)o(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,a])=>{for(let i=0;i<a;i++)o.apply(o,[e,...n])})}}class L6 extends Hh{constructor(e,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r,o={}){const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,i=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,n],r&&(Array.isArray(r)?s.push(...r):It(r)&&a?s.push(...r.split(a)):s.push(r)));const l=U0(this.data,s);return!l&&!n&&!r&&e.indexOf(".")>-1&&(e=s[0],n=s[1],r=s.slice(2).join(".")),l||!i||!It(r)?l:Zv(this.data?.[e]?.[n],r,a)}addResource(e,n,r,o,a={silent:!1}){const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=[e,n];r&&(s=s.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(s=e.split("."),o=n,n=s[1]),this.addNamespaces(n),O6(this.data,s,o),a.silent||this.emit("added",e,n,r,o)}addResources(e,n,r,o={silent:!1}){for(const a in r)(It(r[a])||Array.isArray(r[a]))&&this.addResource(e,n,a,r[a],{silent:!0});o.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,o,a,i={silent:!1,skipCopy:!1}){let s=[e,n];e.indexOf(".")>-1&&(s=e.split("."),o=r,r=n,n=s[1]),this.addNamespaces(n);let l=U0(this.data,s)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?lR(l,r,a):l={...l,...r},O6(this.data,s,l),i.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var cR={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,o){return t.forEach(a=>{e=this.processors[a]?.process(e,n,r,o)??e}),e}};const uR=Symbol("i18next/PATH_KEY");function V0e(){const t=[],e=Object.create(null);let n;return e.get=(r,o)=>(n?.revoke?.(),o===uR?t:(t.push(o),n=Proxy.revocable(r,e),n.proxy)),Proxy.revocable(Object.create(null),e).proxy}function uu(t,e){const{[uR]:n}=t(V0e()),r=e?.keySeparator??".",o=e?.nsSeparator??":";if(n.length>1&&o){const a=e?.ns,i=Array.isArray(a)?a:null;if(i&&i.length>1&&i.slice(1).includes(n[0]))return`${n[0]}${o}${n.slice(1).join(r)}`}return n.join(r)}const $6={},H2=t=>!It(t)&&typeof t!="boolean"&&typeof t!="number";class G0 extends Hh{constructor(e,n={}){super(),N0e(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ja.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,n={interpolation:{}}){const r={...n};if(e==null)return!1;const o=this.resolve(e,r);if(o?.res===void 0)return!1;const a=H2(o.res);return!(r.returnObjects===!1&&a)}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const i=r&&e.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!z0e(e,r,o);if(i&&!s){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:It(a)?[a]:a};const u=e.split(r);(r!==o||r===o&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),e=u.join(o)}return{key:e,namespaces:It(a)?[a]:a}}translate(e,n,r){let o=typeof n=="object"?{...n}:n;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o={...o}),o||(o={}),e==null)return"";typeof e=="function"&&(e=uu(e,{...this.options,...o})),Array.isArray(e)||(e=[String(e)]),e=e.map(F=>typeof F=="function"?uu(F,{...this.options,...o}):String(F));const a=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:s,namespaces:l}=this.extractFromKey(e[e.length-1],o),u=l[l.length-1];let d=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const f=o.lng||this.language,m=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode")return m?a?{res:`${u}${d}${s}`,usedKey:s,exactUsedKey:s,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(o)}:`${u}${d}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(o)}:s;const v=this.resolve(e,o);let g=v?.res;const w=v?.usedKey||s,y=v?.exactUsedKey||s,_=["[object Number]","[object Function]","[object RegExp]"],S=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,C=o.count!==void 0&&!It(o.count),R=G0.hasDefaultValue(o),P=C?this.pluralResolver.getSuffix(f,o.count,o):"",O=o.ordinal&&C?this.pluralResolver.getSuffix(f,o.count,{ordinal:!1}):"",$=C&&!o.ordinal&&o.count===0,A=$&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${P}`]||o[`defaultValue${O}`]||o.defaultValue;let M=g;x&&!g&&R&&(M=A);const L=H2(M),B=Object.prototype.toString.apply(M);if(x&&M&&L&&_.indexOf(B)<0&&!(It(S)&&Array.isArray(M))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const F=this.options.returnedObjectHandler?this.options.returnedObjectHandler(w,M,{...o,ns:l}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(v.res=F,v.usedParams=this.getUsedParamsDetails(o),v):F}if(i){const F=Array.isArray(M),N=F?[]:{},V=F?y:w;for(const z in M)if(Object.prototype.hasOwnProperty.call(M,z)){const I=`${V}${i}${z}`;R&&!g?N[z]=this.translate(I,{...o,defaultValue:H2(A)?A[z]:void 0,joinArrays:!1,ns:l}):N[z]=this.translate(I,{...o,joinArrays:!1,ns:l}),N[z]===I&&(N[z]=M[z])}g=N}}else if(x&&It(S)&&Array.isArray(g))g=g.join(S),g&&(g=this.extendTranslation(g,e,o,r));else{let F=!1,N=!1;!this.isValidLookup(g)&&R&&(F=!0,g=A),this.isValidLookup(g)||(N=!0,g=s);const z=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&N?void 0:g,I=R&&A!==g&&this.options.updateMissing;if(N||F||I){if(this.logger.log(I?"updateKey":"missingKey",f,u,s,I?A:g),i){const oe=this.resolve(s,{...o,keySeparator:!1});oe&&oe.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let D=[];const U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&U&&U[0])for(let oe=0;oe<U.length;oe++)D.push(U[oe]);else this.options.saveMissingTo==="all"?D=this.languageUtils.toResolveHierarchy(o.lng||this.language):D.push(o.lng||this.language);const Y=(oe,Q,re)=>{const le=R&&re!==g?re:z;this.options.missingKeyHandler?this.options.missingKeyHandler(oe,u,Q,le,I,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(oe,u,Q,le,I,o),this.emit("missingKey",oe,u,Q,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?D.forEach(oe=>{const Q=this.pluralResolver.getSuffixes(oe,o);$&&o[`defaultValue${this.options.pluralSeparator}zero`]&&Q.indexOf(`${this.options.pluralSeparator}zero`)<0&&Q.push(`${this.options.pluralSeparator}zero`),Q.forEach(re=>{Y([oe],s+re,o[`defaultValue${re}`]||A)})}):Y(D,s,A))}g=this.extendTranslation(g,e,o,v,r),N&&g===s&&this.options.appendNamespaceToMissingKey&&(g=`${u}${d}${s}`),(N||F)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${s}`:s,F?g:void 0,o))}return a?(v.res=g,v.usedParams=this.getUsedParamsDetails(o),v):g}extendTranslation(e,n,r,o,a){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const l=It(e)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(l){const f=e.match(this.interpolator.nestingRegexp);u=f&&f.length}let d=r.replace&&!It(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,r.lng||this.language||o.usedLng,r),l){const f=e.match(this.interpolator.nestingRegexp),m=f&&f.length;u<m&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,(...f)=>a?.[0]===f[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${n[0]}`),null):this.translate(...f,n),r)),r.interpolation&&this.interpolator.reset()}const i=r.postProcess||this.options.postProcess,s=It(i)?[i]:i;return e!=null&&s?.length&&r.applyPostProcessor!==!1&&(e=cR.handle(s,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,n={}){let r,o,a,i,s;return It(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(l=>typeof l=="function"?uu(l,{...this.options,...n}):l)),e.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,n),d=u.key;o=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const m=n.count!==void 0&&!It(n.count),v=m&&!n.ordinal&&n.count===0,g=n.context!==void 0&&(It(n.context)||typeof n.context=="number")&&n.context!=="",w=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(y=>{this.isValidLookup(r)||(s=y,!$6[`${w[0]}-${y}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&($6[`${w[0]}-${y}`]=!0,this.logger.warn(`key "${o}" for languages "${w.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),w.forEach(_=>{if(this.isValidLookup(r))return;i=_;const S=[d];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(S,d,_,y,n);else{let C;m&&(C=this.pluralResolver.getSuffix(_,n.count,n));const R=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(n.ordinal&&C.indexOf(P)===0&&S.push(d+C.replace(P,this.options.pluralSeparator)),S.push(d+C),v&&S.push(d+R)),g){const O=`${d}${this.options.contextSeparator||"_"}${n.context}`;S.push(O),m&&(n.ordinal&&C.indexOf(P)===0&&S.push(O+C.replace(P,this.options.pluralSeparator)),S.push(O+C),v&&S.push(O+R))}}let x;for(;x=S.pop();)this.isValidLookup(r)||(a=x,r=this.getResource(_,y,x,n))}))})}),{res:r,usedKey:o,exactUsedKey:a,usedLng:i,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r,o={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,n,r,o):this.resourceStore.getResource(e,n,r,o)}getUsedParamsDetails(e={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!It(e.replace);let o=r?e.replace:e;if(r&&typeof e.count<"u"&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const a of n)delete o[a]}return o}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,n.length)&&e[r]!==void 0)return!0;return!1}}class D6{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ja.create("languageUtils")}getScriptPartFromCode(e){if(e=uf(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=uf(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(It(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const o=this.getScriptPartFromCode(r);if(this.isSupportedCode(o))return n=o;const a=this.getLanguagePartFromCode(r);if(this.isSupportedCode(a))return n=a;n=this.options.supportedLngs.find(i=>{if(i===a)return i;if(!(i.indexOf("-")<0&&a.indexOf("-")<0)&&(i.indexOf("-")>0&&a.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===a||i.indexOf(a)===0&&a.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),It(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],e),o=[],a=i=>{i&&(this.isSupportedCode(i)?o.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return It(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):It(e)&&a(this.formatLanguageCode(e)),r.forEach(i=>{o.indexOf(i)<0&&a(this.formatLanguageCode(i))}),o}}const B6={zero:0,one:1,two:2,few:3,many:4,other:5},z6={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class j0e{constructor(e,n={}){this.languageUtils=e,this.options=n,this.logger=Ja.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,n={}){const r=uf(e==="dev"?"en":e),o=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:o});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let i;try{i=new Intl.PluralRules(r,{type:o})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),z6;if(!e.match(/-|_/))return z6;const l=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(l,n)}return this.pluralRulesCache[a]=i,i}needsPlural(e,n={}){let r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,n,r={}){return this.getSuffixes(e,r).map(o=>`${n}${o}`)}getSuffixes(e,n={}){let r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,a)=>B6[o]-B6[a]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(e,n,r={}){const o=this.getRule(e,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",n,r))}}const F6=(t,e,n,r=".",o=!0)=>{let a=I0e(t,e,n);return!a&&o&&It(n)&&(a=Zv(t,n,r),a===void 0&&(a=Zv(e,n,r))),a},W2=t=>t.replace(/\$/g,"$$$$");class V6{constructor(e={}){this.logger=Ja.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:a,prefixEscaped:i,suffix:s,suffixEscaped:l,formatSeparator:u,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:m,nestingPrefixEscaped:v,nestingSuffix:g,nestingSuffixEscaped:w,nestingOptionsSeparator:y,maxReplaces:_,alwaysFormat:S}=e.interpolation;this.escape=n!==void 0?n:L0e,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?El(a):i||"{{",this.suffix=s?El(s):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=m?El(m):v||El("$t("),this.nestingSuffix=g?El(g):w||El(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=_||1e3,this.alwaysFormat=S!==void 0?S:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,n,r,o){let a,i,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=v=>{if(v.indexOf(this.formatSeparator)<0){const _=F6(n,l,v,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(_,void 0,r,{...o,...n,interpolationkey:v}):_}const g=v.split(this.formatSeparator),w=g.shift().trim(),y=g.join(this.formatSeparator).trim();return this.format(F6(n,l,w,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...o,...n,interpolationkey:w})};this.resetRegExp();const d=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:v=>W2(v)},{regex:this.regexp,safeValue:v=>this.escapeValue?W2(this.escape(v)):W2(v)}].forEach(v=>{for(s=0;a=v.regex.exec(e);){const g=a[1].trim();if(i=u(g),i===void 0)if(typeof d=="function"){const y=d(e,a,o);i=It(y)?y:""}else if(o&&Object.prototype.hasOwnProperty.call(o,g))i="";else if(f){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${e}`),i="";else!It(i)&&!this.useRawValueToEscape&&(i=P6(i));const w=v.safeValue(i);if(e=e.replace(a[0],w),f?(v.regex.lastIndex+=i.length,v.regex.lastIndex-=a[0].length):v.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,n,r={}){let o,a,i;const s=(l,u)=>{const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const f=l.split(new RegExp(`${El(d)}[ ]*{`));let m=`{${f[1]}`;l=f[0],m=this.interpolate(m,i);const v=m.match(/'/g),g=m.match(/"/g);((v?.length??0)%2===0&&!g||(g?.length??0)%2!==0)&&(m=m.replace(/'/g,'"'));try{i=JSON.parse(m),u&&(i={...u,...i})}catch(w){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,w),`${l}${d}${m}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,l};for(;o=this.nestingRegexp.exec(e);){let l=[];i={...r},i=i.replace&&!It(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const u=/{.*}/.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(u!==-1&&(l=o[1].slice(u).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),o[1]=o[1].slice(0,u)),a=n(s.call(this,o[1].trim(),i),i),a&&o[0]===e&&!It(a))return a;It(a)||(a=P6(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${e}`),a=""),l.length&&(a=l.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:o[1].trim()}),a.trim())),e=e.replace(o[0],a),this.regexp.lastIndex=0}return e}}const H0e=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);e==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):e==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(i=>{if(i){const[s,...l]=i.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),d=s.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:e,formatOptions:n}},j6=t=>{const e={};return(n,r,o)=>{let a=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(a={...a,[o.interpolationkey]:void 0});const i=r+JSON.stringify(a);let s=e[i];return s||(s=t(uf(r),o),e[i]=s),s(n)}},W0e=t=>(e,n,r)=>t(uf(n),r)(e);class q0e{constructor(e={}){this.logger=Ja.create("formatter"),this.options=e,this.init(e)}init(e,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?j6:W0e;this.formats={number:r((o,a)=>{const i=new Intl.NumberFormat(o,{...a});return s=>i.format(s)}),currency:r((o,a)=>{const i=new Intl.NumberFormat(o,{...a,style:"currency"});return s=>i.format(s)}),datetime:r((o,a)=>{const i=new Intl.DateTimeFormat(o,{...a});return s=>i.format(s)}),relativetime:r((o,a)=>{const i=new Intl.RelativeTimeFormat(o,{...a});return s=>i.format(s,a.range||"day")}),list:r((o,a)=>{const i=new Intl.ListFormat(o,{...a});return s=>i.format(s)})}}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=j6(n)}format(e,n,r,o={}){const a=n.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(s=>s.indexOf(")")>-1)){const s=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,s)].join(this.formatSeparator)}return a.reduce((s,l)=>{const{formatName:u,formatOptions:d}=H0e(l);if(this.formats[u]){let f=s;try{const m=o?.formatParams?.[o.interpolationkey]||{},v=m.locale||m.lng||o.locale||o.lng||r;f=this.formats[u](s,v,{...d,...o,...m})}catch(m){this.logger.warn(m)}return f}else this.logger.warn(`there was no format function for ${u}`);return s},e)}}const U0e=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class Y0e extends Hh{constructor(e,n,r,o={}){super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Ja.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,o.backend,o)}queueLoad(e,n,r,o){const a={},i={},s={},l={};return e.forEach(u=>{let d=!0;n.forEach(f=>{const m=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?i[m]===void 0&&(i[m]=!0):(this.state[m]=1,d=!1,i[m]===void 0&&(i[m]=!0),a[m]===void 0&&(a[m]=!0),l[f]===void 0&&(l[f]=!0)))}),d||(s[u]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(e,n,r){const o=e.split("|"),a=o[0],i=o[1];n&&this.emit("failedLoading",a,i,n),!n&&r&&this.store.addResourceBundle(a,i,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&r&&(this.state[e]=0);const s={};this.queue.forEach(l=>{A0e(l.loaded,[a],i),U0e(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{s[u]||(s[u]={});const d=l.loaded[u];d.length&&d.forEach(f=>{s[u][f]===void 0&&(s[u][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(e,n,r,o=0,a=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:o,wait:a,callback:i});return}this.readingCalls++;const s=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,r,o+1,a*2,i)},a);return}i(u,d)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(e,n);u&&typeof u.then=="function"?u.then(d=>s(null,d)).catch(s):s(null,u)}catch(u){s(u)}return}return l(e,n,s)}prepareLoading(e,n,r={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();It(e)&&(e=this.languageUtils.toResolveHierarchy(e)),It(n)&&(n=[n]);const a=this.queueLoad(e,n,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(i=>{this.loadOne(i)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e,n=""){const r=e.split("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(i,s)=>{i&&this.logger.warn(`${n}loading namespace ${a} for language ${o} failed`,i),!i&&s&&this.logger.log(`${n}loaded namespace ${a} for language ${o}`,s),this.loaded(e,i,s)})}saveMissing(e,n,r,o,a,i={},s=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const l={...i,isUpdate:a},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(e,n,r,o,l):d=u(e,n,r,o),d&&typeof d.then=="function"?d.then(f=>s(null,f)).catch(s):s(null,d)}catch(d){s(d)}else u(e,n,r,o,s,l)}!e||!e[0]||this.store.addResource(e[0],n,r,o)}}}const q2=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),It(t[1])&&(e.defaultValue=t[1]),It(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(r=>{e[r]=n[r]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),H6=t=>(It(t.ns)&&(t.ns=[t.ns]),It(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),It(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs?.indexOf?.("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t),T1=()=>{},G0e=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})},dR="__i18next_supportNoticeShown",K0e=()=>!!(typeof globalThis<"u"&&globalThis[dR]||typeof process<"u"&&j2&&j2.I18NEXT_NO_SUPPORT_NOTICE||typeof process<"u"&&j2),X0e=()=>{typeof globalThis<"u"&&(globalThis[dR]=!0)},Z0e=t=>!!(t?.modules?.backend?.name?.indexOf("Locize")>0||t?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||t?.options?.backend?.backends&&t.options.backend.backends.some(e=>e?.name?.indexOf("Locize")>0||e?.constructor?.name?.indexOf("Locize")>0)||t?.options?.backend?.projectId||t?.options?.backend?.backendOptions&&t.options.backend.backendOptions.some(e=>e?.projectId));class Kd extends Hh{constructor(e={},n){if(super(),this.options=H6(e),this.services={},this.logger=Ja,this.modules={external:[]},G0e(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(e={},n){this.isInitializing=!0,typeof e=="function"&&(n=e,e={}),e.defaultNS==null&&e.ns&&(It(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const r=q2();this.options={...r,...this.options,...H6(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!Z0e(this)&&!K0e()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),X0e());const o=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?Ja.init(o(this.modules.logger),this.options):Ja.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=q0e;const d=new D6(this.options);this.store=new L6(this.options.resources,this.options);const f=this.services;f.logger=Ja,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new j0e(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(f.formatter=o(u),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new V6(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Y0e(o(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(v,...g)=>{this.emit(v,...g)}),this.modules.languageDetector&&(f.languageDetector=o(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=o(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new G0(this.services,this.options),this.translator.on("*",(v,...g)=>{this.emit(v,...g)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,n||(n=T1),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...d)=>this.store[u](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...d)=>(this.store[u](...d),this)});const s=Id(),l=()=>{const u=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(f),n(d,f)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),s}loadResources(e,n=T1){let r=n;const o=It(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],i=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(u=>{u!=="cimode"&&a.indexOf(u)<0&&a.push(u)})};o?i(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>i(l)),this.options.preload?.forEach?.(s=>i(s)),this.services.backendConnector.load(a,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(e,n,r){const o=Id();return typeof e=="function"&&(r=e,e=void 0),typeof n=="function"&&(r=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),r||(r=T1),this.services.backendConnector.reload(e,n,a=>{o.resolve(),r(a)}),o}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&cR.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,n){this.isLanguageChangingTo=e;const r=Id();this.emit("languageChanging",e);const o=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},a=(s,l)=>{l?this.isLanguageChangingTo===e&&(o(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,r.resolve((...u)=>this.t(...u)),n&&n(s,(...u)=>this.t(...u))},i=s=>{!e&&!s&&this.services.languageDetector&&(s=[]);const l=It(s)?s:s&&s[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(It(s)?[s]:s);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector?.cacheUserLanguage?.(u)),this.loadResources(u,d=>{a(d,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?i(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e),r}getFixedT(e,n,r){const o=(a,i,...s)=>{let l;typeof i!="object"?l=this.options.overloadTranslationOptionHandler([a,i].concat(s)):l={...i},l.lng=l.lng||o.lng,l.lngs=l.lngs||o.lngs,l.ns=l.ns||o.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||o.keyPrefix);const u={...this.options,...l};typeof l.keyPrefix=="function"&&(l.keyPrefix=uu(l.keyPrefix,u));const d=this.options.keySeparator||".";let f;return l.keyPrefix&&Array.isArray(a)?f=a.map(m=>(typeof m=="function"&&(m=uu(m,u)),`${l.keyPrefix}${d}${m}`)):(typeof a=="function"&&(a=uu(a,u)),f=l.keyPrefix?`${l.keyPrefix}${d}${a}`:a),this.t(f,l)};return It(e)?o.lng=e:o.lngs=e,o.ns=n,o.keyPrefix=r,o}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(s,l)=>{const u=this.services.backendConnector.state[`${s}|${l}`];return u===-1||u===0||u===2};if(n.precheck){const s=n.precheck(this,i);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,e)&&(!o||i(a,e)))}loadNamespaces(e,n){const r=Id();return this.options.ns?(It(e)&&(e=[e]),e.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=Id();It(e)&&(e=[e]);const o=this.options.preload||[],a=e.filter(i=>o.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=o.concat(a),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const o=new Intl.Locale(e);if(o&&o.getTextInfo){const a=o.getTextInfo();if(a&&a.direction)return a.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new D6(q2());return e.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},n){const r=new Kd(e,n);return r.createInstance=Kd.createInstance,r}cloneInstance(e={},n=T1){const r=e.forkResourceStore;r&&delete e.forkResourceStore;const o={...this.options,...e,isClone:!0},a=new Kd(o);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(s=>{a[s]=this[s]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r){const s=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((d,f)=>(d[f]={...l[u][f]},d),l[u]),l),{});a.store=new L6(s,o),a.services.resourceStore=a.store}if(e.interpolation){const l={...q2().interpolation,...this.options.interpolation,...e.interpolation},u={...o,interpolation:l};a.services.interpolator=new V6(u)}return a.translator=new G0(a.services,o),a.translator.on("*",(s,...l)=>{a.emit(s,...l)}),a.init(o,n),a.translator.options=o,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Pr=Kd.createInstance();Pr.createInstance;Pr.dir;Pr.init;Pr.loadResources;Pr.reloadResources;Pr.use;Pr.changeLanguage;Pr.getFixedT;Pr.t;Pr.exists;Pr.setDefaultNamespace;Pr.hasLoadedNamespace;Pr.loadNamespaces;Pr.loadLanguages;const Q0e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,J0e={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},ehe=t=>J0e[t],the=t=>t.replace(Q0e,ehe);let W6={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:the,transDefaultProps:void 0};const nhe=(t={})=>{W6={...W6,...t}},rhe={type:"3rdParty",init(t){nhe(t.options.react)}},{createContext:ohe}=await q("react"),ahe=ohe(),{createElement:ihe,useMemo:she}=await q("react");function lhe({i18n:t,defaultNS:e,children:n}){const r=she(()=>({i18n:t,defaultNS:e}),[t,e]);return ihe(ahe.Provider,{value:r},n)}const{createContext:che,useContext:uhe}=await q("react");let dhe=(t=>String(t));const fhe=t=>{dhe=t.t.bind(t)},fR=che(null),b_e=()=>{const t=uhe(fR);if(!t)throw new Error("useLocalization must be used within RbLocalizationProvider");return t},{useCallback:phe,useEffect:hhe,useMemo:mhe,useState:U2}=await q("react"),y_e=({children:t,appName:e,resources:n,defaultLng:r="en",fallbackLng:o="en",separateInstance:a=!0})=>{const[i,s]=U2(null),[l,u]=U2(!1),[d,f]=U2(localStorage.getItem(`${e}_Language`)||r);hhe(()=>{(async()=>{try{const g=a?Pr.createInstance():Pr;await g.use(rhe).init({lng:d,fallbackLng:o,resources:n,interpolation:{escapeValue:!1}}),fhe(g),s(g),u(!0)}catch(g){console.error("Localization init Failed:",g)}})()},[n,d,o,a]);const m=phe(g=>{i?.changeLanguage(g),f(g),localStorage.setItem(`${e}_Language`,g)},[i,e]),v=mhe(()=>i?{i18n:i,t:i.t.bind(i),changeLanguage:m,currentLanguage:d}:null,[i,m,d]);return!l||!v?h("div",{className:"bg-default flex h-screen w-full items-center justify-center",children:h(Kk,{size:"3rem",className:"text-fg-default"})}):h(fR.Provider,{value:v,children:h(lhe,{i18n:i,children:t})})};export{khe as $,uH as A,Bee as B,dH as C,cw as D,rn as E,uw as F,he as G,te as H,YU as I,cg as J,ug as K,yZ as L,UU as M,WU as N,_f as O,To as P,zhe as Q,M7 as R,Hi as S,_Z as T,Yo as U,qv as V,o6 as W,hz as X,Phe as Y,sfe as Z,nbe as _,ad as a,Wr as a$,abe as a0,ube as a1,fbe as a2,cbe as a3,pbe as a4,ibe as a5,sbe as a6,dbe as a7,lbe as a8,tw as a9,Wde as aA,jde as aB,Vde as aC,zde as aD,Bde as aE,Hde as aF,G3e as aG,hbe as aH,Sbe as aI,_be as aJ,gbe as aK,xbe as aL,Ebe as aM,M1e as aN,wbe as aO,Cbe as aP,Mbe as aQ,kbe as aR,vbe as aS,ybe as aT,bbe as aU,mbe as aV,m6 as aW,d8 as aX,The as aY,Nhe as aZ,rbe as a_,tz as aa,ZB as ab,Yk as ac,epe as ad,Gk as ae,npe as af,cfe as ag,W3e as ah,Nk as ai,Ik as aj,Ok as ak,xde as al,Y3e as am,Cde as an,d0 as ao,Mde as ap,Ede as aq,Vk as ar,Sde as as,u0 as at,U3e as au,xz as av,Dde as aw,X3e as ax,K3e as ay,Fde as az,mg as b,Ybe as b$,Rbe as b0,Dbe as b1,Lbe as b2,Nbe as b3,$be as b4,zbe as b5,Tbe as b6,Pbe as b7,Abe as b8,Bbe as b9,nfe as bA,efe as bB,Jde as bC,ofe as bD,Z3e as bE,Efe as bF,v_e as bG,Wbe as bH,Kk as bI,que as bJ,qbe as bK,Kfe as bL,Uk as bM,tbe as bN,xpe as bO,Gbe as bP,Zbe as bQ,Kbe as bR,Xbe as bS,Xk as bT,Spe as bU,mF as bV,pfe as bW,dfe as bX,sw as bY,ffe as bZ,Ube as b_,Fbe as ba,Hbe as bb,Ibe as bc,jbe as bd,Vbe as be,Obe as bf,jh as bg,Hpe as bh,A3 as bi,J3e as bj,mfe as bk,w_e as bl,jk as bm,Dfe as bn,q3e as bo,Qbe as bp,eye as bq,Jbe as br,Uv as bs,Ak as bt,zk as bu,Qde as bv,Q3e as bw,tfe as bx,afe as by,rfe as bz,lh as c,Hq as c$,obe as c0,Ul as c1,oz as c2,Cpe as c3,Mhe as c4,u1e as c5,k$ as c6,QB as c7,qB as c8,ebe as c9,rve as cA,Mr as cB,AD as cC,_he as cD,Eve as cE,C3 as cF,Dx as cG,xhe as cH,iB as cI,sB as cJ,She as cK,ID as cL,Ave as cM,Dl as cN,V8 as cO,Rve as cP,xo as cQ,hB as cR,zf as cS,FD as cT,zD as cU,FB as cV,$B as cW,zB as cX,BB as cY,DB as cZ,LB as c_,gz as ca,Tpe as cb,ode as cc,JL as cd,nz as ce,u8 as cf,Mfe as cg,gue as ch,bfe as ci,Bfe as cj,uF as ck,Oz as cl,Qn as cm,Q0 as cn,b_e as co,Dhe as cp,Th as cq,Ive as cr,P3 as cs,V2e as ct,Hd as cu,Wo as cv,kte as cw,ya as cx,kn as cy,OE as cz,id as d,o_e as d$,tc as d0,Che as d1,Rr as d2,ow as d3,K0 as d4,Gme as d5,TD as d6,ND as d7,Rhe as d8,MB as d9,s_e as dA,Xye as dB,hye as dC,i_e as dD,Cye as dE,uye as dF,Oye as dG,$ye as dH,Lye as dI,Dye as dJ,Bye as dK,Hye as dL,xye as dM,jye as dN,Vye as dO,Iye as dP,dye as dQ,Gye as dR,Fye as dS,Zye as dT,n_e as dU,c_e as dV,sye as dW,fye as dX,vye as dY,pye as dZ,iye as d_,$he as da,rge as db,oge as dc,age as dd,Vq as de,q$ as df,Y$ as dg,rye as dh,tye as di,nye as dj,oye as dk,l_e as dl,t_e as dm,aye as dn,r_e as dp,qye as dq,Wye as dr,Jye as ds,gye as dt,Pye as du,Yye as dv,lye as dw,Sye as dx,e_e as dy,Eye as dz,mG as e,R8 as e$,_ye as e0,u_e as e1,Kye as e2,wye as e3,Uye as e4,Aye as e5,Tye as e6,a_e as e7,bye as e8,yye as e9,df as eA,Lhe as eB,H3e as eC,CD as eD,g8 as eE,k8 as eF,PB as eG,gB as eH,nB as eI,X9 as eJ,dB as eK,jD as eL,m8 as eM,jB as eN,oM as eO,K$ as eP,Nf as eQ,G$ as eR,rD as eS,W$ as eT,f2e as eU,Sve as eV,UD as eW,HD as eX,EB as eY,CB as eZ,nue as e_,Mye as ea,Nye as eb,Rye as ec,kye as ed,mye as ee,zye as ef,Qye as eg,cye as eh,dhe as ei,lue as ej,Gn as ek,Ohe as el,PD as em,O8 as en,eD as eo,eB as ep,rB as eq,Z$ as er,Poe as es,wD as et,J$ as eu,yB as ev,hD as ew,x8 as ex,_8 as ey,N8 as ez,Hs as f,Ihe as f$,MD as f0,DD as f1,SB as f2,YD as f3,u7 as f4,d7 as f5,p7 as f6,f7,l7 as f8,Ph as f9,Z0 as fA,Jie as fB,_B as fC,f8 as fD,qhe as fE,C8 as fF,Zz as fG,LD as fH,V$ as fI,j$ as fJ,uD as fK,pB as fL,gD as fM,RD as fN,ED as fO,xD as fP,js as fQ,X0 as fR,QD as fS,mD as fT,fD as fU,nve as fV,bve as fW,nC as fX,rw as fY,RB as fZ,Zme as f_,F$ as fa,wB as fb,vB as fc,Q$ as fd,GD as fe,lB as ff,BD as fg,mB as fh,$D as fi,tB as fj,oB as fk,xB as fl,bB as fm,H$ as fn,T8 as fo,sD as fp,y8 as fq,tte as fr,E8 as fs,Tve as ft,Qme as fu,Gl as fv,tve as fw,Ose as fx,nk as fy,yhe as fz,qo as g,ove as g0,Ehe as g1,sV as g2,iV as g3,Kme as g4,Dme as g5,Fwe as g6,lge as g7,Xme as g8,Jme as g9,kD as gA,KD as gB,ale as gC,NB as gD,vD as gE,Su as gF,cD as gG,Df as gH,Rl as ga,Fee as gb,y_e as gc,Ahe as gd,Pve as ge,g_e as gf,SD as gg,uB as gh,pD as gi,aB as gj,yD as gk,JD as gl,aD as gm,nc as gn,sM as go,Yme as gp,Nte as gq,Ume as gr,Mte as gs,kr as gt,pte as gu,g3 as gv,IE as gw,Mve as gx,Hee as gy,jee as gz,yw as h,ln as i,h as j,Wt as k,it as l,v7 as m,I7 as n,_w as o,Go as p,X8 as q,fH as r,H8 as s,bf as t,Ko as u,yf as v,xf as w,ae as x,bZ as y,xZ as z};
311
+ `},children:h("div",{"data-comp":"ToastStackContent",style:F&&B?{minHeight:y[M]+(g[M]?28:0),position:"relative",width:"100%"}:void 0,children:a[M]?.map((N,V)=>h(M0e,{...N,toastOrder:V+1,toastCount:a[M]?.length??0,component:o,animationDuration:r,isWrapperMouseOver:l[M],isStackExpanded:d[M],isWrapperExpandedForLayout:B,isWrapperScrollable:g[M],requestStackExpand:O,onStackMouseEnter:R,onStackMouseLeave:P},N.id))})},M)})})},{useEffect:R0e,useMemo:V2,useRef:T6,useState:N6}=await q("react"),v_e=({className:t,open:e,type:n="basic",variant:r="default",title:o,content:a,icon:i,actionLabel:s,handleActionClick:l,closeOnActionClick:u=!0,position:d,toastCount:f,isWrapperMouseOver:m,isStackExpanded:v,pauseTimer:g,resumeTimer:w,requestStackExpand:y,closeToast:_})=>{const S=T6(null),x=T6(null),[C,R]=N6(!1),[P,O]=N6(!1),$=!!s,A=(f??0)>=3&&!m&&!v,M=A,L=V2(()=>v0e(n,r),[n,r]),B=V2(()=>_0e(d,C),[d,C]),F=V2(()=>{switch(r){case"copy":return h(C8,{});case"danger":return h(E8,{});case"warning":case"caution":return h(O8,{});case"success":return n==="basic"?h(u0e,{}):h(js,{});default:return null}},[n,r]),N=i??F,V=$?w0e(n,r):null,z=$&&!!o!=!!a,I=Y=>{Y.button!==2&&(Y.stopPropagation(),Y.preventDefault(),Y.currentTarget.setPointerCapture?.(Y.pointerId),S.current=Y.pointerId,x.current={startX:Y.clientX,startY:Y.clientY},g())},D=Y=>{if(!x.current||S.current!==Y.pointerId)return;Y.stopPropagation(),Y.preventDefault();const{startX:oe,startY:Q}=x.current,{clientX:re,clientY:le}=Y;x.current.deltaX=re-oe,x.current.deltaY=le-Q;const ee=Y.currentTarget;ee.style.transitionProperty="translate",O(!0),d==="top-center"?x.current.deltaY<0?ee.style.top=`${x.current.deltaY}px`:(x.current=null,ee.hasPointerCapture?.(Y.pointerId)&&ee.releasePointerCapture(Y.pointerId)):d==="bottom-center"?x.current.deltaY>0?ee.style.bottom=`-${x.current.deltaY}px`:(x.current=null,ee.hasPointerCapture?.(Y.pointerId)&&ee.releasePointerCapture(Y.pointerId)):d.includes("left")?ee.style.left=`${x.current.deltaX}px`:d.includes("right")&&(ee.style.right=`-${x.current.deltaX}px`)},U=Y=>{if(Y.stopPropagation(),Y.preventDefault(),S.current!==Y.pointerId)return;const oe=Y.currentTarget;if(oe.style.transitionProperty="",oe.hasPointerCapture?.(Y.pointerId)&&oe.releasePointerCapture(Y.pointerId),!x.current){O(!1),S.current=null,w();return}const{deltaX:Q=0,deltaY:re=0}=x.current,ee=d.includes("left")||d.includes("right")?Q:re;if(Q===0&&re===0){if((f??0)>=3&&!v){y?.(),O(!1),S.current=null,x.current=null,w();return}_();return}Math.abs(ee)>15?_():d==="top-center"?oe.style.top="0px":d==="bottom-center"?oe.style.bottom="0px":d.includes("left")?oe.style.left="0px":d.includes("right")&&(oe.style.right="0px"),O(!1),S.current=null,x.current=null,w()};return R0e(()=>{R(e)},[e]),h("div",{"data-comp":"RBSimpleToast",className:ae(y0e({open:C,hidden:!1,stacked:!1,motion:B}),!C&&"pointer-events-none",t),onPointerDown:I,onPointerMove:D,onPointerUp:U,onPointerLeave:U,onContextMenu:Y=>Y.preventDefault(),children:h("div",{className:ae(p0e({type:n,variant:r,hasAction:$,stacked:M,active:P})),style:P?{boxShadow:"none"}:void 0,onTouchEnd:()=>O(!1),children:te(Ul,{className:"w-full items-stretch gap-3",children:[te(Yo,{alignItems:"flex-start",className:ae(R6(),z&&"w-full justify-between gap-3"),children:[te(Yo,{alignItems:"flex-start",className:ae(R6(),"min-w-0 flex-1"),children:[N?h("span",{className:h0e({type:n,tone:L,variant:r}),children:N}):null,te(Ul,{className:ae(m0e(),"w-full"),children:[o?h("div",{className:ae(g0e(),A?"truncate":"wrap-break-word whitespace-pre-line"),children:o}):null,a?h("div",{className:ae(A?"truncate":"wrap-break-word whitespace-pre-line"),children:a}):null]})]}),V&&z?h("span",{className:"shrink-0",onPointerDown:Y=>Y.stopPropagation(),onPointerUp:Y=>Y.stopPropagation(),onClick:Y=>Y.stopPropagation(),children:h(Wr,{size:V.size,variant:V.variant,onClick:()=>{l?.(),u&&_?.()},children:s})}):null]}),V&&!z?h("span",{className:"inline-flex w-full justify-end",onPointerDown:Y=>Y.stopPropagation(),onPointerUp:Y=>Y.stopPropagation(),onClick:Y=>Y.stopPropagation(),children:h(Wr,{size:V.size,variant:V.variant,onClick:()=>{l?.(),u&&_?.()},children:s})}):null]})})})},{useEffect:T0e}=await q("react"),w_e=({className:t,open:e,resolve:n,onOpenChange:r})=>{const{barCodeValue:o}=lue(),{theme:a}=Q0();return T0e(()=>{o&&n(o)},[o,n]),te(jh,{className:ae("RBQrBarCodeGuideModal","max-h-full w-fit",t),open:e,header:{title:"QR 코드 스캔 가이드"},onOpenChange:r,children:[te("div",{className:"text-fg-default text-body-sm-normal mt-[1.5rem] mb-[1rem] text-center leading-[1.5]",children:["바코드 USB를 로봇에 연결 후",h("br",{}),"로봇 명판에 QR 코드를 찍어주세요"]}),h("div",{className:"mx-auto w-[30rem] p-5",children:h("img",{src:Dx(a==="dark"?"/qr-bar-code-guide-dark-img.png":"/qr-bar-code-guide-img.webp"),alt:"qr-bar-code-guide",className:"w-full object-cover"})})]})};var j2={};const It=t=>typeof t=="string",Id=()=>{let t,e;const n=new Promise((r,o)=>{t=r,e=o});return n.resolve=t,n.reject=e,n},P6=t=>t==null?"":""+t,N0e=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},P0e=/###/g,A6=t=>t&&t.indexOf("###")>-1?t.replace(P0e,"."):t,I6=t=>!t||It(t),Gd=(t,e,n)=>{const r=It(e)?e.split("."):e;let o=0;for(;o<r.length-1;){if(I6(t))return{};const a=A6(r[o]);!t[a]&&n&&(t[a]=new n),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={},++o}return I6(t)?{}:{obj:t,k:A6(r[o])}},O6=(t,e,n)=>{const{obj:r,k:o}=Gd(t,e,Object);if(r!==void 0||e.length===1){r[o]=n;return}let a=e[e.length-1],i=e.slice(0,e.length-1),s=Gd(t,i,Object);for(;s.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),s=Gd(t,i,Object),s?.obj&&typeof s.obj[`${s.k}.${a}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},A0e=(t,e,n,r)=>{const{obj:o,k:a}=Gd(t,e,Object);o[a]=o[a]||[],o[a].push(n)},U0=(t,e)=>{const{obj:n,k:r}=Gd(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},I0e=(t,e,n)=>{const r=U0(t,n);return r!==void 0?r:U0(e,n)},lR=(t,e,n)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?It(t[r])||t[r]instanceof String||It(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):lR(t[r],e[r],n):t[r]=e[r]);return t},El=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var O0e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const L0e=t=>It(t)?t.replace(/[&<>"'\/]/g,e=>O0e[e]):t;class $0e{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const D0e=[" ",",","?","!",";"],B0e=new $0e(20),z0e=(t,e,n)=>{e=e||"",n=n||"";const r=D0e.filter(i=>e.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const o=B0e.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!o.test(t);if(!a){const i=t.indexOf(n);i>0&&!o.test(t.substring(0,i))&&(a=!0)}return a},Zv=(t,e,n=".")=>{if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const r=e.split(n);let o=t;for(let a=0;a<r.length;){if(!o||typeof o!="object")return;let i,s="";for(let l=a;l<r.length;++l)if(l!==a&&(s+=n),s+=r[l],i=o[s],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&l<r.length-1)continue;a+=l-a+1;break}o=i}return o},uf=t=>t?.replace(/_/g,"-"),F0e={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class Y0{constructor(e,n={}){this.init(e,n)}init(e,n={}){this.prefix=n.prefix||"i18next:",this.logger=e||F0e,this.options=n,this.debug=n.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,r,o){return o&&!this.debug?null:(It(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new Y0(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Y0(this.logger,e)}}var Ja=new Y0;class Hh{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e,...n){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([o,a])=>{for(let i=0;i<a;i++)o(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,a])=>{for(let i=0;i<a;i++)o.apply(o,[e,...n])})}}class L6 extends Hh{constructor(e,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r,o={}){const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,i=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,n],r&&(Array.isArray(r)?s.push(...r):It(r)&&a?s.push(...r.split(a)):s.push(r)));const l=U0(this.data,s);return!l&&!n&&!r&&e.indexOf(".")>-1&&(e=s[0],n=s[1],r=s.slice(2).join(".")),l||!i||!It(r)?l:Zv(this.data?.[e]?.[n],r,a)}addResource(e,n,r,o,a={silent:!1}){const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=[e,n];r&&(s=s.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(s=e.split("."),o=n,n=s[1]),this.addNamespaces(n),O6(this.data,s,o),a.silent||this.emit("added",e,n,r,o)}addResources(e,n,r,o={silent:!1}){for(const a in r)(It(r[a])||Array.isArray(r[a]))&&this.addResource(e,n,a,r[a],{silent:!0});o.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,o,a,i={silent:!1,skipCopy:!1}){let s=[e,n];e.indexOf(".")>-1&&(s=e.split("."),o=r,r=n,n=s[1]),this.addNamespaces(n);let l=U0(this.data,s)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?lR(l,r,a):l={...l,...r},O6(this.data,s,l),i.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var cR={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,o){return t.forEach(a=>{e=this.processors[a]?.process(e,n,r,o)??e}),e}};const uR=Symbol("i18next/PATH_KEY");function V0e(){const t=[],e=Object.create(null);let n;return e.get=(r,o)=>(n?.revoke?.(),o===uR?t:(t.push(o),n=Proxy.revocable(r,e),n.proxy)),Proxy.revocable(Object.create(null),e).proxy}function uu(t,e){const{[uR]:n}=t(V0e()),r=e?.keySeparator??".",o=e?.nsSeparator??":";if(n.length>1&&o){const a=e?.ns,i=Array.isArray(a)?a:null;if(i&&i.length>1&&i.slice(1).includes(n[0]))return`${n[0]}${o}${n.slice(1).join(r)}`}return n.join(r)}const $6={},H2=t=>!It(t)&&typeof t!="boolean"&&typeof t!="number";class G0 extends Hh{constructor(e,n={}){super(),N0e(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ja.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,n={interpolation:{}}){const r={...n};if(e==null)return!1;const o=this.resolve(e,r);if(o?.res===void 0)return!1;const a=H2(o.res);return!(r.returnObjects===!1&&a)}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const i=r&&e.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!z0e(e,r,o);if(i&&!s){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:It(a)?[a]:a};const u=e.split(r);(r!==o||r===o&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),e=u.join(o)}return{key:e,namespaces:It(a)?[a]:a}}translate(e,n,r){let o=typeof n=="object"?{...n}:n;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o={...o}),o||(o={}),e==null)return"";typeof e=="function"&&(e=uu(e,{...this.options,...o})),Array.isArray(e)||(e=[String(e)]),e=e.map(F=>typeof F=="function"?uu(F,{...this.options,...o}):String(F));const a=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:s,namespaces:l}=this.extractFromKey(e[e.length-1],o),u=l[l.length-1];let d=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const f=o.lng||this.language,m=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode")return m?a?{res:`${u}${d}${s}`,usedKey:s,exactUsedKey:s,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(o)}:`${u}${d}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(o)}:s;const v=this.resolve(e,o);let g=v?.res;const w=v?.usedKey||s,y=v?.exactUsedKey||s,_=["[object Number]","[object Function]","[object RegExp]"],S=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,C=o.count!==void 0&&!It(o.count),R=G0.hasDefaultValue(o),P=C?this.pluralResolver.getSuffix(f,o.count,o):"",O=o.ordinal&&C?this.pluralResolver.getSuffix(f,o.count,{ordinal:!1}):"",$=C&&!o.ordinal&&o.count===0,A=$&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${P}`]||o[`defaultValue${O}`]||o.defaultValue;let M=g;x&&!g&&R&&(M=A);const L=H2(M),B=Object.prototype.toString.apply(M);if(x&&M&&L&&_.indexOf(B)<0&&!(It(S)&&Array.isArray(M))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const F=this.options.returnedObjectHandler?this.options.returnedObjectHandler(w,M,{...o,ns:l}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(v.res=F,v.usedParams=this.getUsedParamsDetails(o),v):F}if(i){const F=Array.isArray(M),N=F?[]:{},V=F?y:w;for(const z in M)if(Object.prototype.hasOwnProperty.call(M,z)){const I=`${V}${i}${z}`;R&&!g?N[z]=this.translate(I,{...o,defaultValue:H2(A)?A[z]:void 0,joinArrays:!1,ns:l}):N[z]=this.translate(I,{...o,joinArrays:!1,ns:l}),N[z]===I&&(N[z]=M[z])}g=N}}else if(x&&It(S)&&Array.isArray(g))g=g.join(S),g&&(g=this.extendTranslation(g,e,o,r));else{let F=!1,N=!1;!this.isValidLookup(g)&&R&&(F=!0,g=A),this.isValidLookup(g)||(N=!0,g=s);const z=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&N?void 0:g,I=R&&A!==g&&this.options.updateMissing;if(N||F||I){if(this.logger.log(I?"updateKey":"missingKey",f,u,s,I?A:g),i){const oe=this.resolve(s,{...o,keySeparator:!1});oe&&oe.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let D=[];const U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&U&&U[0])for(let oe=0;oe<U.length;oe++)D.push(U[oe]);else this.options.saveMissingTo==="all"?D=this.languageUtils.toResolveHierarchy(o.lng||this.language):D.push(o.lng||this.language);const Y=(oe,Q,re)=>{const le=R&&re!==g?re:z;this.options.missingKeyHandler?this.options.missingKeyHandler(oe,u,Q,le,I,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(oe,u,Q,le,I,o),this.emit("missingKey",oe,u,Q,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?D.forEach(oe=>{const Q=this.pluralResolver.getSuffixes(oe,o);$&&o[`defaultValue${this.options.pluralSeparator}zero`]&&Q.indexOf(`${this.options.pluralSeparator}zero`)<0&&Q.push(`${this.options.pluralSeparator}zero`),Q.forEach(re=>{Y([oe],s+re,o[`defaultValue${re}`]||A)})}):Y(D,s,A))}g=this.extendTranslation(g,e,o,v,r),N&&g===s&&this.options.appendNamespaceToMissingKey&&(g=`${u}${d}${s}`),(N||F)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${s}`:s,F?g:void 0,o))}return a?(v.res=g,v.usedParams=this.getUsedParamsDetails(o),v):g}extendTranslation(e,n,r,o,a){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const l=It(e)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(l){const f=e.match(this.interpolator.nestingRegexp);u=f&&f.length}let d=r.replace&&!It(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,r.lng||this.language||o.usedLng,r),l){const f=e.match(this.interpolator.nestingRegexp),m=f&&f.length;u<m&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,(...f)=>a?.[0]===f[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${n[0]}`),null):this.translate(...f,n),r)),r.interpolation&&this.interpolator.reset()}const i=r.postProcess||this.options.postProcess,s=It(i)?[i]:i;return e!=null&&s?.length&&r.applyPostProcessor!==!1&&(e=cR.handle(s,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,n={}){let r,o,a,i,s;return It(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(l=>typeof l=="function"?uu(l,{...this.options,...n}):l)),e.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,n),d=u.key;o=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const m=n.count!==void 0&&!It(n.count),v=m&&!n.ordinal&&n.count===0,g=n.context!==void 0&&(It(n.context)||typeof n.context=="number")&&n.context!=="",w=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(y=>{this.isValidLookup(r)||(s=y,!$6[`${w[0]}-${y}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&($6[`${w[0]}-${y}`]=!0,this.logger.warn(`key "${o}" for languages "${w.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),w.forEach(_=>{if(this.isValidLookup(r))return;i=_;const S=[d];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(S,d,_,y,n);else{let C;m&&(C=this.pluralResolver.getSuffix(_,n.count,n));const R=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(n.ordinal&&C.indexOf(P)===0&&S.push(d+C.replace(P,this.options.pluralSeparator)),S.push(d+C),v&&S.push(d+R)),g){const O=`${d}${this.options.contextSeparator||"_"}${n.context}`;S.push(O),m&&(n.ordinal&&C.indexOf(P)===0&&S.push(O+C.replace(P,this.options.pluralSeparator)),S.push(O+C),v&&S.push(O+R))}}let x;for(;x=S.pop();)this.isValidLookup(r)||(a=x,r=this.getResource(_,y,x,n))}))})}),{res:r,usedKey:o,exactUsedKey:a,usedLng:i,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r,o={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,n,r,o):this.resourceStore.getResource(e,n,r,o)}getUsedParamsDetails(e={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!It(e.replace);let o=r?e.replace:e;if(r&&typeof e.count<"u"&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const a of n)delete o[a]}return o}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,n.length)&&e[r]!==void 0)return!0;return!1}}class D6{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ja.create("languageUtils")}getScriptPartFromCode(e){if(e=uf(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=uf(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(It(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const o=this.getScriptPartFromCode(r);if(this.isSupportedCode(o))return n=o;const a=this.getLanguagePartFromCode(r);if(this.isSupportedCode(a))return n=a;n=this.options.supportedLngs.find(i=>{if(i===a)return i;if(!(i.indexOf("-")<0&&a.indexOf("-")<0)&&(i.indexOf("-")>0&&a.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===a||i.indexOf(a)===0&&a.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),It(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],e),o=[],a=i=>{i&&(this.isSupportedCode(i)?o.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return It(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):It(e)&&a(this.formatLanguageCode(e)),r.forEach(i=>{o.indexOf(i)<0&&a(this.formatLanguageCode(i))}),o}}const B6={zero:0,one:1,two:2,few:3,many:4,other:5},z6={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class j0e{constructor(e,n={}){this.languageUtils=e,this.options=n,this.logger=Ja.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,n={}){const r=uf(e==="dev"?"en":e),o=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:o});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let i;try{i=new Intl.PluralRules(r,{type:o})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),z6;if(!e.match(/-|_/))return z6;const l=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(l,n)}return this.pluralRulesCache[a]=i,i}needsPlural(e,n={}){let r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,n,r={}){return this.getSuffixes(e,r).map(o=>`${n}${o}`)}getSuffixes(e,n={}){let r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,a)=>B6[o]-B6[a]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(e,n,r={}){const o=this.getRule(e,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",n,r))}}const F6=(t,e,n,r=".",o=!0)=>{let a=I0e(t,e,n);return!a&&o&&It(n)&&(a=Zv(t,n,r),a===void 0&&(a=Zv(e,n,r))),a},W2=t=>t.replace(/\$/g,"$$$$");class V6{constructor(e={}){this.logger=Ja.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:a,prefixEscaped:i,suffix:s,suffixEscaped:l,formatSeparator:u,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:m,nestingPrefixEscaped:v,nestingSuffix:g,nestingSuffixEscaped:w,nestingOptionsSeparator:y,maxReplaces:_,alwaysFormat:S}=e.interpolation;this.escape=n!==void 0?n:L0e,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?El(a):i||"{{",this.suffix=s?El(s):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=m?El(m):v||El("$t("),this.nestingSuffix=g?El(g):w||El(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=_||1e3,this.alwaysFormat=S!==void 0?S:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,n,r,o){let a,i,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=v=>{if(v.indexOf(this.formatSeparator)<0){const _=F6(n,l,v,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(_,void 0,r,{...o,...n,interpolationkey:v}):_}const g=v.split(this.formatSeparator),w=g.shift().trim(),y=g.join(this.formatSeparator).trim();return this.format(F6(n,l,w,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...o,...n,interpolationkey:w})};this.resetRegExp();const d=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:v=>W2(v)},{regex:this.regexp,safeValue:v=>this.escapeValue?W2(this.escape(v)):W2(v)}].forEach(v=>{for(s=0;a=v.regex.exec(e);){const g=a[1].trim();if(i=u(g),i===void 0)if(typeof d=="function"){const y=d(e,a,o);i=It(y)?y:""}else if(o&&Object.prototype.hasOwnProperty.call(o,g))i="";else if(f){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${e}`),i="";else!It(i)&&!this.useRawValueToEscape&&(i=P6(i));const w=v.safeValue(i);if(e=e.replace(a[0],w),f?(v.regex.lastIndex+=i.length,v.regex.lastIndex-=a[0].length):v.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,n,r={}){let o,a,i;const s=(l,u)=>{const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const f=l.split(new RegExp(`${El(d)}[ ]*{`));let m=`{${f[1]}`;l=f[0],m=this.interpolate(m,i);const v=m.match(/'/g),g=m.match(/"/g);((v?.length??0)%2===0&&!g||(g?.length??0)%2!==0)&&(m=m.replace(/'/g,'"'));try{i=JSON.parse(m),u&&(i={...u,...i})}catch(w){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,w),`${l}${d}${m}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,l};for(;o=this.nestingRegexp.exec(e);){let l=[];i={...r},i=i.replace&&!It(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const u=/{.*}/.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(u!==-1&&(l=o[1].slice(u).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),o[1]=o[1].slice(0,u)),a=n(s.call(this,o[1].trim(),i),i),a&&o[0]===e&&!It(a))return a;It(a)||(a=P6(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${e}`),a=""),l.length&&(a=l.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:o[1].trim()}),a.trim())),e=e.replace(o[0],a),this.regexp.lastIndex=0}return e}}const H0e=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);e==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):e==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(i=>{if(i){const[s,...l]=i.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),d=s.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:e,formatOptions:n}},j6=t=>{const e={};return(n,r,o)=>{let a=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(a={...a,[o.interpolationkey]:void 0});const i=r+JSON.stringify(a);let s=e[i];return s||(s=t(uf(r),o),e[i]=s),s(n)}},W0e=t=>(e,n,r)=>t(uf(n),r)(e);class q0e{constructor(e={}){this.logger=Ja.create("formatter"),this.options=e,this.init(e)}init(e,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?j6:W0e;this.formats={number:r((o,a)=>{const i=new Intl.NumberFormat(o,{...a});return s=>i.format(s)}),currency:r((o,a)=>{const i=new Intl.NumberFormat(o,{...a,style:"currency"});return s=>i.format(s)}),datetime:r((o,a)=>{const i=new Intl.DateTimeFormat(o,{...a});return s=>i.format(s)}),relativetime:r((o,a)=>{const i=new Intl.RelativeTimeFormat(o,{...a});return s=>i.format(s,a.range||"day")}),list:r((o,a)=>{const i=new Intl.ListFormat(o,{...a});return s=>i.format(s)})}}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=j6(n)}format(e,n,r,o={}){const a=n.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(s=>s.indexOf(")")>-1)){const s=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,s)].join(this.formatSeparator)}return a.reduce((s,l)=>{const{formatName:u,formatOptions:d}=H0e(l);if(this.formats[u]){let f=s;try{const m=o?.formatParams?.[o.interpolationkey]||{},v=m.locale||m.lng||o.locale||o.lng||r;f=this.formats[u](s,v,{...d,...o,...m})}catch(m){this.logger.warn(m)}return f}else this.logger.warn(`there was no format function for ${u}`);return s},e)}}const U0e=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class Y0e extends Hh{constructor(e,n,r,o={}){super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Ja.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,o.backend,o)}queueLoad(e,n,r,o){const a={},i={},s={},l={};return e.forEach(u=>{let d=!0;n.forEach(f=>{const m=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?i[m]===void 0&&(i[m]=!0):(this.state[m]=1,d=!1,i[m]===void 0&&(i[m]=!0),a[m]===void 0&&(a[m]=!0),l[f]===void 0&&(l[f]=!0)))}),d||(s[u]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(e,n,r){const o=e.split("|"),a=o[0],i=o[1];n&&this.emit("failedLoading",a,i,n),!n&&r&&this.store.addResourceBundle(a,i,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&r&&(this.state[e]=0);const s={};this.queue.forEach(l=>{A0e(l.loaded,[a],i),U0e(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{s[u]||(s[u]={});const d=l.loaded[u];d.length&&d.forEach(f=>{s[u][f]===void 0&&(s[u][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(e,n,r,o=0,a=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:o,wait:a,callback:i});return}this.readingCalls++;const s=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,r,o+1,a*2,i)},a);return}i(u,d)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(e,n);u&&typeof u.then=="function"?u.then(d=>s(null,d)).catch(s):s(null,u)}catch(u){s(u)}return}return l(e,n,s)}prepareLoading(e,n,r={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();It(e)&&(e=this.languageUtils.toResolveHierarchy(e)),It(n)&&(n=[n]);const a=this.queueLoad(e,n,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(i=>{this.loadOne(i)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e,n=""){const r=e.split("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(i,s)=>{i&&this.logger.warn(`${n}loading namespace ${a} for language ${o} failed`,i),!i&&s&&this.logger.log(`${n}loaded namespace ${a} for language ${o}`,s),this.loaded(e,i,s)})}saveMissing(e,n,r,o,a,i={},s=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const l={...i,isUpdate:a},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(e,n,r,o,l):d=u(e,n,r,o),d&&typeof d.then=="function"?d.then(f=>s(null,f)).catch(s):s(null,d)}catch(d){s(d)}else u(e,n,r,o,s,l)}!e||!e[0]||this.store.addResource(e[0],n,r,o)}}}const q2=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),It(t[1])&&(e.defaultValue=t[1]),It(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(r=>{e[r]=n[r]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),H6=t=>(It(t.ns)&&(t.ns=[t.ns]),It(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),It(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs?.indexOf?.("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t),T1=()=>{},G0e=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})},dR="__i18next_supportNoticeShown",K0e=()=>!!(typeof globalThis<"u"&&globalThis[dR]||typeof process<"u"&&j2&&j2.I18NEXT_NO_SUPPORT_NOTICE||typeof process<"u"&&j2),X0e=()=>{typeof globalThis<"u"&&(globalThis[dR]=!0)},Z0e=t=>!!(t?.modules?.backend?.name?.indexOf("Locize")>0||t?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||t?.options?.backend?.backends&&t.options.backend.backends.some(e=>e?.name?.indexOf("Locize")>0||e?.constructor?.name?.indexOf("Locize")>0)||t?.options?.backend?.projectId||t?.options?.backend?.backendOptions&&t.options.backend.backendOptions.some(e=>e?.projectId));class Kd extends Hh{constructor(e={},n){if(super(),this.options=H6(e),this.services={},this.logger=Ja,this.modules={external:[]},G0e(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(e={},n){this.isInitializing=!0,typeof e=="function"&&(n=e,e={}),e.defaultNS==null&&e.ns&&(It(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const r=q2();this.options={...r,...this.options,...H6(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!Z0e(this)&&!K0e()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),X0e());const o=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?Ja.init(o(this.modules.logger),this.options):Ja.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=q0e;const d=new D6(this.options);this.store=new L6(this.options.resources,this.options);const f=this.services;f.logger=Ja,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new j0e(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(f.formatter=o(u),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new V6(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Y0e(o(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(v,...g)=>{this.emit(v,...g)}),this.modules.languageDetector&&(f.languageDetector=o(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=o(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new G0(this.services,this.options),this.translator.on("*",(v,...g)=>{this.emit(v,...g)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,n||(n=T1),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...d)=>this.store[u](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...d)=>(this.store[u](...d),this)});const s=Id(),l=()=>{const u=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(f),n(d,f)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),s}loadResources(e,n=T1){let r=n;const o=It(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],i=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(u=>{u!=="cimode"&&a.indexOf(u)<0&&a.push(u)})};o?i(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>i(l)),this.options.preload?.forEach?.(s=>i(s)),this.services.backendConnector.load(a,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(e,n,r){const o=Id();return typeof e=="function"&&(r=e,e=void 0),typeof n=="function"&&(r=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),r||(r=T1),this.services.backendConnector.reload(e,n,a=>{o.resolve(),r(a)}),o}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&cR.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,n){this.isLanguageChangingTo=e;const r=Id();this.emit("languageChanging",e);const o=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},a=(s,l)=>{l?this.isLanguageChangingTo===e&&(o(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,r.resolve((...u)=>this.t(...u)),n&&n(s,(...u)=>this.t(...u))},i=s=>{!e&&!s&&this.services.languageDetector&&(s=[]);const l=It(s)?s:s&&s[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(It(s)?[s]:s);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector?.cacheUserLanguage?.(u)),this.loadResources(u,d=>{a(d,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?i(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e),r}getFixedT(e,n,r){const o=(a,i,...s)=>{let l;typeof i!="object"?l=this.options.overloadTranslationOptionHandler([a,i].concat(s)):l={...i},l.lng=l.lng||o.lng,l.lngs=l.lngs||o.lngs,l.ns=l.ns||o.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||o.keyPrefix);const u={...this.options,...l};typeof l.keyPrefix=="function"&&(l.keyPrefix=uu(l.keyPrefix,u));const d=this.options.keySeparator||".";let f;return l.keyPrefix&&Array.isArray(a)?f=a.map(m=>(typeof m=="function"&&(m=uu(m,u)),`${l.keyPrefix}${d}${m}`)):(typeof a=="function"&&(a=uu(a,u)),f=l.keyPrefix?`${l.keyPrefix}${d}${a}`:a),this.t(f,l)};return It(e)?o.lng=e:o.lngs=e,o.ns=n,o.keyPrefix=r,o}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(s,l)=>{const u=this.services.backendConnector.state[`${s}|${l}`];return u===-1||u===0||u===2};if(n.precheck){const s=n.precheck(this,i);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,e)&&(!o||i(a,e)))}loadNamespaces(e,n){const r=Id();return this.options.ns?(It(e)&&(e=[e]),e.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=Id();It(e)&&(e=[e]);const o=this.options.preload||[],a=e.filter(i=>o.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=o.concat(a),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const o=new Intl.Locale(e);if(o&&o.getTextInfo){const a=o.getTextInfo();if(a&&a.direction)return a.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new D6(q2());return e.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},n){const r=new Kd(e,n);return r.createInstance=Kd.createInstance,r}cloneInstance(e={},n=T1){const r=e.forkResourceStore;r&&delete e.forkResourceStore;const o={...this.options,...e,isClone:!0},a=new Kd(o);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(s=>{a[s]=this[s]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r){const s=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((d,f)=>(d[f]={...l[u][f]},d),l[u]),l),{});a.store=new L6(s,o),a.services.resourceStore=a.store}if(e.interpolation){const l={...q2().interpolation,...this.options.interpolation,...e.interpolation},u={...o,interpolation:l};a.services.interpolator=new V6(u)}return a.translator=new G0(a.services,o),a.translator.on("*",(s,...l)=>{a.emit(s,...l)}),a.init(o,n),a.translator.options=o,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Pr=Kd.createInstance();Pr.createInstance;Pr.dir;Pr.init;Pr.loadResources;Pr.reloadResources;Pr.use;Pr.changeLanguage;Pr.getFixedT;Pr.t;Pr.exists;Pr.setDefaultNamespace;Pr.hasLoadedNamespace;Pr.loadNamespaces;Pr.loadLanguages;const Q0e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,J0e={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},ehe=t=>J0e[t],the=t=>t.replace(Q0e,ehe);let W6={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:the,transDefaultProps:void 0};const nhe=(t={})=>{W6={...W6,...t}},rhe={type:"3rdParty",init(t){nhe(t.options.react)}},{createContext:ohe}=await q("react"),ahe=ohe(),{createElement:ihe,useMemo:she}=await q("react");function lhe({i18n:t,defaultNS:e,children:n}){const r=she(()=>({i18n:t,defaultNS:e}),[t,e]);return ihe(ahe.Provider,{value:r},n)}const{createContext:che,useContext:uhe}=await q("react");let dhe=(t=>String(t));const fhe=t=>{dhe=t.t.bind(t)},fR=che(null),b_e=()=>{const t=uhe(fR);if(!t)throw new Error("useLocalization must be used within RbLocalizationProvider");return t},{useCallback:phe,useEffect:hhe,useMemo:mhe,useState:U2}=await q("react"),y_e=({children:t,appName:e,resources:n,defaultLng:r="en",fallbackLng:o="en",separateInstance:a=!0})=>{const[i,s]=U2(null),[l,u]=U2(!1),[d,f]=U2(localStorage.getItem(`${e}_Language`)||r);hhe(()=>{(async()=>{try{const g=a?Pr.createInstance():Pr;await g.use(rhe).init({lng:d,fallbackLng:o,resources:n,interpolation:{escapeValue:!1}}),fhe(g),s(g),u(!0)}catch(g){console.error("Localization init Failed:",g)}})()},[n,d,o,a]);const m=phe(g=>{i?.changeLanguage(g),f(g),localStorage.setItem(`${e}_Language`,g)},[i,e]),v=mhe(()=>i?{i18n:i,t:i.t.bind(i),changeLanguage:m,currentLanguage:d}:null,[i,m,d]);return!l||!v?h("div",{className:"bg-default flex h-screen w-full items-center justify-center",children:h(Kk,{size:"3rem",className:"text-fg-default"})}):h(fR.Provider,{value:v,children:h(lhe,{i18n:i,children:t})})};export{khe as $,uH as A,Bee as B,dH as C,cw as D,rn as E,uw as F,he as G,te as H,YU as I,cg as J,ug as K,yZ as L,UU as M,WU as N,_f as O,To as P,zhe as Q,M7 as R,Hi as S,_Z as T,Yo as U,qv as V,o6 as W,hz as X,Phe as Y,sfe as Z,nbe as _,ad as a,Wr as a$,abe as a0,ube as a1,fbe as a2,cbe as a3,pbe as a4,ibe as a5,sbe as a6,dbe as a7,lbe as a8,tw as a9,Wde as aA,jde as aB,Vde as aC,zde as aD,Bde as aE,Hde as aF,G3e as aG,hbe as aH,Sbe as aI,_be as aJ,gbe as aK,xbe as aL,Ebe as aM,M1e as aN,wbe as aO,Cbe as aP,Mbe as aQ,kbe as aR,vbe as aS,ybe as aT,bbe as aU,mbe as aV,m6 as aW,d8 as aX,The as aY,Nhe as aZ,rbe as a_,tz as aa,ZB as ab,Yk as ac,epe as ad,Gk as ae,npe as af,cfe as ag,W3e as ah,Nk as ai,Ik as aj,Ok as ak,xde as al,Y3e as am,Cde as an,d0 as ao,Mde as ap,Ede as aq,Vk as ar,Sde as as,u0 as at,U3e as au,xz as av,Dde as aw,X3e as ax,K3e as ay,Fde as az,mg as b,Ybe as b$,Rbe as b0,Dbe as b1,Lbe as b2,Nbe as b3,$be as b4,zbe as b5,Tbe as b6,Pbe as b7,Abe as b8,Bbe as b9,nfe as bA,efe as bB,Jde as bC,ofe as bD,Z3e as bE,Efe as bF,v_e as bG,Wbe as bH,Kk as bI,que as bJ,qbe as bK,Kfe as bL,Uk as bM,tbe as bN,xpe as bO,Gbe as bP,Zbe as bQ,Kbe as bR,Xbe as bS,Xk as bT,Spe as bU,mF as bV,pfe as bW,dfe as bX,sw as bY,ffe as bZ,Ube as b_,Fbe as ba,Hbe as bb,Ibe as bc,jbe as bd,Vbe as be,Obe as bf,jh as bg,Hpe as bh,A3 as bi,J3e as bj,mfe as bk,w_e as bl,jk as bm,Dfe as bn,q3e as bo,Qbe as bp,eye as bq,Jbe as br,Uv as bs,Ak as bt,zk as bu,Qde as bv,Q3e as bw,tfe as bx,afe as by,rfe as bz,lh as c,Hq as c$,obe as c0,Ul as c1,oz as c2,Cpe as c3,Mhe as c4,u1e as c5,k$ as c6,QB as c7,qB as c8,ebe as c9,rve as cA,Mr as cB,AD as cC,_he as cD,Eve as cE,C3 as cF,Dx as cG,xhe as cH,iB as cI,sB as cJ,She as cK,ID as cL,Ave as cM,Dl as cN,V8 as cO,Rve as cP,xo as cQ,hB as cR,zf as cS,FD as cT,zD as cU,FB as cV,$B as cW,zB as cX,BB as cY,DB as cZ,LB as c_,gz as ca,Tpe as cb,ode as cc,JL as cd,nz as ce,u8 as cf,Mfe as cg,gue as ch,bfe as ci,Bfe as cj,uF as ck,Oz as cl,Qn as cm,Q0 as cn,b_e as co,Dhe as cp,Th as cq,Ive as cr,P3 as cs,V2e as ct,Hd as cu,Wo as cv,kte as cw,ya as cx,kn as cy,OE as cz,id as d,o_e as d$,tc as d0,Che as d1,Rr as d2,ow as d3,K0 as d4,Gme as d5,TD as d6,ND as d7,Rhe as d8,MB as d9,s_e as dA,Xye as dB,hye as dC,i_e as dD,Cye as dE,uye as dF,Oye as dG,$ye as dH,Lye as dI,Dye as dJ,Bye as dK,Hye as dL,xye as dM,jye as dN,Vye as dO,Iye as dP,dye as dQ,Gye as dR,Fye as dS,Zye as dT,n_e as dU,c_e as dV,sye as dW,fye as dX,vye as dY,pye as dZ,iye as d_,$he as da,rge as db,oge as dc,age as dd,Vq as de,q$ as df,Y$ as dg,rye as dh,tye as di,nye as dj,oye as dk,l_e as dl,t_e as dm,aye as dn,r_e as dp,qye as dq,Wye as dr,Jye as ds,gye as dt,Pye as du,Yye as dv,lye as dw,Sye as dx,e_e as dy,Eye as dz,mG as e,u7 as e$,_ye as e0,u_e as e1,Kye as e2,wye as e3,Uye as e4,Aye as e5,Tye as e6,a_e as e7,bye as e8,yye as e9,Lhe as eA,H3e as eB,CD as eC,g8 as eD,k8 as eE,PB as eF,gB as eG,nB as eH,X9 as eI,dB as eJ,jD as eK,m8 as eL,jB as eM,oM as eN,K$ as eO,Nf as eP,f2e as eQ,Sve as eR,UD as eS,HD as eT,EB as eU,CB as eV,nue as eW,R8 as eX,MD as eY,SB as eZ,YD as e_,Mye as ea,Nye as eb,Rye as ec,kye as ed,mye as ee,zye as ef,Qye as eg,cye as eh,dhe as ei,Gn as ej,Ohe as ek,PD as el,O8 as em,eD as en,eB as eo,rB as ep,Z$ as eq,Poe as er,wD as es,J$ as et,yB as eu,hD as ev,x8 as ew,_8 as ex,N8 as ey,df as ez,Hs as f,ove as f$,d7 as f0,p7 as f1,f7 as f2,l7 as f3,Ph as f4,F$ as f5,wB as f6,vB as f7,Q$ as f8,GD as f9,f8 as fA,qhe as fB,C8 as fC,Zz as fD,LD as fE,V$ as fF,j$ as fG,uD as fH,pB as fI,G$ as fJ,W$ as fK,gD as fL,RD as fM,ED as fN,xD as fO,js as fP,X0 as fQ,QD as fR,mD as fS,fD as fT,nve as fU,bve as fV,nC as fW,rw as fX,RB as fY,Zme as fZ,Ihe as f_,lB as fa,BD as fb,mB as fc,$D as fd,DD as fe,tB as ff,oB as fg,xB as fh,bB as fi,H$ as fj,T8 as fk,sD as fl,y8 as fm,tte as fn,lue as fo,E8 as fp,Tve as fq,Qme as fr,Gl as fs,tve as ft,Ose as fu,nk as fv,yhe as fw,Z0 as fx,Jie as fy,_B as fz,qo as g,Ehe as g0,sV as g1,iV as g2,Kme as g3,Dme as g4,Fwe as g5,lge as g6,Xme as g7,Jme as g8,Rl as g9,KD as gA,rD as gB,ale as gC,NB as gD,vD as gE,Su as gF,cD as gG,Df as gH,Fee as ga,y_e as gb,Ahe as gc,Pve as gd,g_e as ge,SD as gf,uB as gg,pD as gh,aB as gi,yD as gj,JD as gk,aD as gl,nc as gm,sM as gn,Yme as go,Nte as gp,Ume as gq,Mte as gr,kr as gs,pte as gt,g3 as gu,IE as gv,Mve as gw,Hee as gx,jee as gy,kD as gz,yw as h,ln as i,h as j,Wt as k,it as l,v7 as m,I7 as n,_w as o,Go as p,X8 as q,fH as r,H8 as s,bf as t,Ko as u,yf as v,xf as w,ae as x,bZ as y,xZ as z};