@alepha/devtools 0.19.3 → 0.19.4

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 (188) hide show
  1. package/assets/ui/200.html +2 -2
  2. package/assets/ui/200.html.br +2 -1
  3. package/assets/ui/404.html +2 -2
  4. package/assets/ui/404.html.br +2 -1
  5. package/assets/ui/asset.Co90YiKM.css +1 -0
  6. package/assets/ui/asset.Co90YiKM.css.br +0 -0
  7. package/assets/ui/{chunk.D_-fkSwu.js → chunk.5aCoyqfh.js} +1 -1
  8. package/assets/ui/chunk.5aCoyqfh.js.br +0 -0
  9. package/assets/ui/chunk.AicQIFSI.js +1 -0
  10. package/assets/ui/chunk.AicQIFSI.js.br +0 -0
  11. package/assets/ui/{chunk.yh4jaMrg.js → chunk.B25mt84g.js} +1 -1
  12. package/assets/ui/chunk.B25mt84g.js.br +0 -0
  13. package/assets/ui/chunk.B9RkIaX-.js +1 -0
  14. package/assets/ui/chunk.B9RkIaX-.js.br +2 -0
  15. package/assets/ui/{chunk.B9jGefQy.js → chunk.BHvLlrSE.js} +1 -1
  16. package/assets/ui/chunk.BHvLlrSE.js.br +0 -0
  17. package/assets/ui/{chunk.Cj1opA98.js → chunk.BQTCyAmI.js} +1 -1
  18. package/assets/ui/chunk.BQTCyAmI.js.br +0 -0
  19. package/assets/ui/{chunk.CvCu4yZb.js → chunk.BSkVN_fO.js} +1 -1
  20. package/assets/ui/chunk.BSkVN_fO.js.br +0 -0
  21. package/assets/ui/chunk.Be6RDdvy.js +7 -0
  22. package/assets/ui/chunk.Be6RDdvy.js.br +0 -0
  23. package/assets/ui/{chunk.De1vj4hM.js → chunk.BennGilR.js} +1 -1
  24. package/assets/ui/chunk.BennGilR.js.br +0 -0
  25. package/assets/ui/chunk.Bm1U8jkC.js +1 -0
  26. package/assets/ui/chunk.Bm1U8jkC.js.br +0 -0
  27. package/assets/ui/chunk.Bu6ZqSw8.js +1 -0
  28. package/assets/ui/chunk.Bu6ZqSw8.js.br +0 -0
  29. package/assets/ui/{chunk.DYIu-C82.js → chunk.Bz4sdeJh.js} +1 -1
  30. package/assets/ui/chunk.Bz4sdeJh.js.br +0 -0
  31. package/assets/ui/{chunk.BHYZ9sAK.js → chunk.CVhxB_15.js} +1 -1
  32. package/assets/ui/chunk.CVhxB_15.js.br +0 -0
  33. package/assets/ui/chunk.CdOrvGjm.js +80 -0
  34. package/assets/ui/chunk.CdOrvGjm.js.br +0 -0
  35. package/{dist/public/chunk.9plHAFDW.js → assets/ui/chunk.Cegc4FKP.js} +1 -1
  36. package/assets/ui/chunk.Cegc4FKP.js.br +0 -0
  37. package/assets/ui/{chunk.Dc4PCYcb.js → chunk.CgYWVQAO.js} +1 -1
  38. package/assets/ui/chunk.CgYWVQAO.js.br +0 -0
  39. package/assets/ui/chunk.D5WfK8mA.js +1 -0
  40. package/assets/ui/chunk.D5WfK8mA.js.br +0 -0
  41. package/assets/ui/chunk.D6c-Jq33.js +1 -0
  42. package/assets/ui/chunk.D6c-Jq33.js.br +0 -0
  43. package/assets/ui/{chunk.DOwjsMaD.js → chunk.DGcirGNX.js} +1 -1
  44. package/assets/ui/chunk.DGcirGNX.js.br +0 -0
  45. package/assets/ui/chunk.Dab7se_P.js +1 -0
  46. package/assets/ui/chunk.Dab7se_P.js.br +0 -0
  47. package/assets/ui/{chunk.B82rsdDI.js → chunk.DyV4G4y9.js} +1 -1
  48. package/assets/ui/chunk.DyV4G4y9.js.br +0 -0
  49. package/assets/ui/{chunk.Bc7_n90V.js → chunk.W_TFMb5-.js} +1 -1
  50. package/assets/ui/chunk.W_TFMb5-.js.br +0 -0
  51. package/assets/ui/{chunk.D93ZmnLR.js → chunk.dxweq5IS.js} +1 -1
  52. package/assets/ui/chunk.dxweq5IS.js.br +1 -0
  53. package/assets/ui/{chunk.CJt_09bu.js → chunk.froMhC7u.js} +1 -1
  54. package/assets/ui/chunk.froMhC7u.js.br +0 -0
  55. package/assets/ui/{chunk.CK6Z-I-W.js → chunk.umroamPs.js} +1 -1
  56. package/assets/ui/chunk.umroamPs.js.br +0 -0
  57. package/assets/ui/{chunk.DxnuHDOY.js → chunk.uqgDIUyw.js} +1 -1
  58. package/assets/ui/chunk.uqgDIUyw.js.br +0 -0
  59. package/assets/ui/entry.DI5fIO6T.js +2 -0
  60. package/assets/ui/entry.DI5fIO6T.js.br +0 -0
  61. package/assets/ui/index.html +2 -2
  62. package/assets/ui/index.html.br +2 -1
  63. package/dist/public/200.html +2 -2
  64. package/dist/public/200.html.br +2 -1
  65. package/dist/public/404.html +2 -2
  66. package/dist/public/404.html.br +2 -1
  67. package/dist/public/asset.Co90YiKM.css +1 -0
  68. package/dist/public/asset.Co90YiKM.css.br +0 -0
  69. package/dist/public/{chunk.D_-fkSwu.js → chunk.5aCoyqfh.js} +1 -1
  70. package/dist/public/chunk.5aCoyqfh.js.br +0 -0
  71. package/dist/public/chunk.AicQIFSI.js +1 -0
  72. package/dist/public/chunk.AicQIFSI.js.br +0 -0
  73. package/dist/public/{chunk.yh4jaMrg.js → chunk.B25mt84g.js} +1 -1
  74. package/dist/public/chunk.B25mt84g.js.br +0 -0
  75. package/dist/public/chunk.B9RkIaX-.js +1 -0
  76. package/dist/public/chunk.B9RkIaX-.js.br +2 -0
  77. package/dist/public/{chunk.B9jGefQy.js → chunk.BHvLlrSE.js} +1 -1
  78. package/dist/public/chunk.BHvLlrSE.js.br +0 -0
  79. package/dist/public/{chunk.Cj1opA98.js → chunk.BQTCyAmI.js} +1 -1
  80. package/dist/public/chunk.BQTCyAmI.js.br +0 -0
  81. package/dist/public/{chunk.CvCu4yZb.js → chunk.BSkVN_fO.js} +1 -1
  82. package/dist/public/chunk.BSkVN_fO.js.br +0 -0
  83. package/dist/public/chunk.Be6RDdvy.js +7 -0
  84. package/dist/public/chunk.Be6RDdvy.js.br +0 -0
  85. package/dist/public/{chunk.De1vj4hM.js → chunk.BennGilR.js} +1 -1
  86. package/dist/public/chunk.BennGilR.js.br +0 -0
  87. package/dist/public/chunk.Bm1U8jkC.js +1 -0
  88. package/dist/public/chunk.Bm1U8jkC.js.br +0 -0
  89. package/dist/public/chunk.Bu6ZqSw8.js +1 -0
  90. package/dist/public/chunk.Bu6ZqSw8.js.br +0 -0
  91. package/dist/public/{chunk.DYIu-C82.js → chunk.Bz4sdeJh.js} +1 -1
  92. package/dist/public/chunk.Bz4sdeJh.js.br +0 -0
  93. package/dist/public/{chunk.BHYZ9sAK.js → chunk.CVhxB_15.js} +1 -1
  94. package/dist/public/chunk.CVhxB_15.js.br +0 -0
  95. package/dist/public/chunk.CdOrvGjm.js +80 -0
  96. package/dist/public/chunk.CdOrvGjm.js.br +0 -0
  97. package/{assets/ui/chunk.9plHAFDW.js → dist/public/chunk.Cegc4FKP.js} +1 -1
  98. package/dist/public/chunk.Cegc4FKP.js.br +0 -0
  99. package/dist/public/{chunk.Dc4PCYcb.js → chunk.CgYWVQAO.js} +1 -1
  100. package/dist/public/chunk.CgYWVQAO.js.br +0 -0
  101. package/dist/public/chunk.D5WfK8mA.js +1 -0
  102. package/dist/public/chunk.D5WfK8mA.js.br +0 -0
  103. package/dist/public/chunk.D6c-Jq33.js +1 -0
  104. package/dist/public/chunk.D6c-Jq33.js.br +0 -0
  105. package/dist/public/{chunk.DOwjsMaD.js → chunk.DGcirGNX.js} +1 -1
  106. package/dist/public/chunk.DGcirGNX.js.br +0 -0
  107. package/dist/public/chunk.Dab7se_P.js +1 -0
  108. package/dist/public/chunk.Dab7se_P.js.br +0 -0
  109. package/dist/public/{chunk.B82rsdDI.js → chunk.DyV4G4y9.js} +1 -1
  110. package/dist/public/chunk.DyV4G4y9.js.br +0 -0
  111. package/dist/public/{chunk.Bc7_n90V.js → chunk.W_TFMb5-.js} +1 -1
  112. package/dist/public/chunk.W_TFMb5-.js.br +0 -0
  113. package/dist/public/{chunk.D93ZmnLR.js → chunk.dxweq5IS.js} +1 -1
  114. package/dist/public/chunk.dxweq5IS.js.br +1 -0
  115. package/dist/public/{chunk.CJt_09bu.js → chunk.froMhC7u.js} +1 -1
  116. package/dist/public/chunk.froMhC7u.js.br +0 -0
  117. package/dist/public/{chunk.CK6Z-I-W.js → chunk.umroamPs.js} +1 -1
  118. package/dist/public/chunk.umroamPs.js.br +0 -0
  119. package/dist/public/{chunk.DxnuHDOY.js → chunk.uqgDIUyw.js} +1 -1
  120. package/dist/public/chunk.uqgDIUyw.js.br +0 -0
  121. package/dist/public/entry.DI5fIO6T.js +2 -0
  122. package/dist/public/entry.DI5fIO6T.js.br +0 -0
  123. package/dist/public/index.html +2 -2
  124. package/dist/public/index.html.br +2 -1
  125. package/package.json +11 -11
  126. package/src/entities/logs.ts +3 -1
  127. package/assets/ui/asset.Cxu56LSy.css +0 -1
  128. package/assets/ui/asset.Cxu56LSy.css.br +0 -0
  129. package/assets/ui/chunk.9plHAFDW.js.br +0 -0
  130. package/assets/ui/chunk.B82rsdDI.js.br +0 -0
  131. package/assets/ui/chunk.B9jGefQy.js.br +0 -0
  132. package/assets/ui/chunk.BHYZ9sAK.js.br +0 -0
  133. package/assets/ui/chunk.Bc7_n90V.js.br +0 -0
  134. package/assets/ui/chunk.CCbhJSL_.js +0 -1
  135. package/assets/ui/chunk.CCbhJSL_.js.br +0 -0
  136. package/assets/ui/chunk.CJt_09bu.js.br +0 -0
  137. package/assets/ui/chunk.CK6Z-I-W.js.br +0 -1
  138. package/assets/ui/chunk.Cj1opA98.js.br +0 -0
  139. package/assets/ui/chunk.CvCu4yZb.js.br +0 -0
  140. package/assets/ui/chunk.D93ZmnLR.js.br +0 -6
  141. package/assets/ui/chunk.D9MCnLj_.js +0 -7
  142. package/assets/ui/chunk.D9MCnLj_.js.br +0 -0
  143. package/assets/ui/chunk.DOwjsMaD.js.br +0 -0
  144. package/assets/ui/chunk.DYIu-C82.js.br +0 -0
  145. package/assets/ui/chunk.D_-fkSwu.js.br +0 -0
  146. package/assets/ui/chunk.Dc4PCYcb.js.br +0 -0
  147. package/assets/ui/chunk.De1vj4hM.js.br +0 -0
  148. package/assets/ui/chunk.DuQak1OK.js +0 -1
  149. package/assets/ui/chunk.DuQak1OK.js.br +0 -0
  150. package/assets/ui/chunk.DxnuHDOY.js.br +0 -0
  151. package/assets/ui/chunk.TIounDiA.js +0 -1
  152. package/assets/ui/chunk.TIounDiA.js.br +0 -0
  153. package/assets/ui/chunk.p3hCiSrt.js +0 -80
  154. package/assets/ui/chunk.p3hCiSrt.js.br +0 -0
  155. package/assets/ui/chunk.yh4jaMrg.js.br +0 -0
  156. package/assets/ui/entry.DnXws2rz.js +0 -2
  157. package/assets/ui/entry.DnXws2rz.js.br +0 -0
  158. package/dist/public/asset.Cxu56LSy.css +0 -1
  159. package/dist/public/asset.Cxu56LSy.css.br +0 -0
  160. package/dist/public/chunk.9plHAFDW.js.br +0 -0
  161. package/dist/public/chunk.B82rsdDI.js.br +0 -0
  162. package/dist/public/chunk.B9jGefQy.js.br +0 -0
  163. package/dist/public/chunk.BHYZ9sAK.js.br +0 -0
  164. package/dist/public/chunk.Bc7_n90V.js.br +0 -0
  165. package/dist/public/chunk.CCbhJSL_.js +0 -1
  166. package/dist/public/chunk.CCbhJSL_.js.br +0 -0
  167. package/dist/public/chunk.CJt_09bu.js.br +0 -0
  168. package/dist/public/chunk.CK6Z-I-W.js.br +0 -1
  169. package/dist/public/chunk.Cj1opA98.js.br +0 -0
  170. package/dist/public/chunk.CvCu4yZb.js.br +0 -0
  171. package/dist/public/chunk.D93ZmnLR.js.br +0 -6
  172. package/dist/public/chunk.D9MCnLj_.js +0 -7
  173. package/dist/public/chunk.D9MCnLj_.js.br +0 -0
  174. package/dist/public/chunk.DOwjsMaD.js.br +0 -0
  175. package/dist/public/chunk.DYIu-C82.js.br +0 -0
  176. package/dist/public/chunk.D_-fkSwu.js.br +0 -0
  177. package/dist/public/chunk.Dc4PCYcb.js.br +0 -0
  178. package/dist/public/chunk.De1vj4hM.js.br +0 -0
  179. package/dist/public/chunk.DuQak1OK.js +0 -1
  180. package/dist/public/chunk.DuQak1OK.js.br +0 -0
  181. package/dist/public/chunk.DxnuHDOY.js.br +0 -0
  182. package/dist/public/chunk.TIounDiA.js +0 -1
  183. package/dist/public/chunk.TIounDiA.js.br +0 -0
  184. package/dist/public/chunk.p3hCiSrt.js +0 -80
  185. package/dist/public/chunk.p3hCiSrt.js.br +0 -0
  186. package/dist/public/chunk.yh4jaMrg.js.br +0 -0
  187. package/dist/public/entry.DnXws2rz.js +0 -2
  188. package/dist/public/entry.DnXws2rz.js.br +0 -0
@@ -0,0 +1,80 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=Symbol.for(`Alepha.Kind`),d=Symbol.for(`Alepha.Module`),f=Symbol.for(`Alepha.Options`),p=class extends Error{name=`AlephaError`},m=class extends p{name=`CircularDependencyError`;constructor(e,t){super(`Instance not available. Looks like a circular dependency. ? -> ${t?.map(e=>`${e} -> `).join(``)}${e} -> ?`)}},h=class extends p{name=`ContainerLockedError`;constructor(e=`Container is locked. No more providers can be added.`){super(e)}},g=class extends p{name=`TooLateSubstitutionError`;constructor(e,t){super(`Service already substituted. Please, substitute Service '${e}' with Service '${t}' before using it.`)}},_=class extends p{name=`MissingContextError`;constructor(){super(`Missing context. Did you forget to call Alepha.create()?`),this.name=`MissingContextError`}},v={},y=()=>{if(!v.alepha)throw new _;return{alepha:v.alepha,service:v.service,module:v.service?.[d]}},b=class{alepha;options;config;constructor(e){this.alepha=e.alepha,this.options=e.options,this.config={propertyKey:``,service:e.service,module:e.module}}onInit(){}},x=(e,t)=>{let{alepha:n,service:r}=y();return d in e&&e[d]&&n.with(e[d]),n.inject(e,{lifetime:`transient`,args:[{options:t,alepha:n,service:r??Wk}]})};function S(e){if(typeof e!=`function`)return!1;let t=Object.getOwnPropertyDescriptor(e,`prototype`);return!!t&&!t.writable}var C=e=>{let{services:t=[],primitives:n=[],name:r}=e;if(!r||!w.NAME_REGEX.test(r))throw new p(`Invalid module name '${r}'. It should be in the format of 'project.module.submodule'`);let i=class extends w{options=e;register(n){if(e.atoms)for(let t of e.atoms)n.store.register(t);if(typeof e.register==`function`){e.register(n);return}for(let e of t)n.inject(e,{parent:this.constructor})}};Object.defineProperty(i,`name`,{value:r,writable:!1});for(let e of t)w.is(e)||(e[d]=i);for(let e of n)typeof e[u]==`function`&&(e[u][d]=i);return i},w=class e{static NAME_REGEX=/^[a-z-]+(\.[a-z-][a-z0-9-]*)*$/;static is(t){return t.prototype instanceof e}static of(e){return e[d]}},T=Symbol(`als.parent`),E=class e{static create=()=>{};als;constructor(){this.als=e.create()}createContextId(){return crypto.randomUUID()}run(e,t={}){if(!this.als)return e();let n=this.als.getStore()??void 0;return t.registry??=new Map,t.context??=this.createContextId(),this.als.run({...t,[T]:n},e)}exists(){return!!this.get(`context`)}get(e,t){if(!this.als)return;let n=this.als.getStore();if(!n||t===`app`)return;if(t===`current`)return e in n?n[e]:void 0;if(t===`parent`)return n[T]?.[e];if(e in n)return n[e];let r=n[T];for(;r;){if(e in r)return r[e];r=r[T]}}has(e){if(!this.als)return!1;let t=this.als.getStore();if(!t)return!1;if(e in t)return!0;let n=t[T];for(;n;){if(e in n)return!0;n=n[T]}return!1}set(e,t){if(!this.als)return;let n=this.als.getStore();n&&(n[e]=t)}},D=(e,t={})=>{let{alepha:n,service:r}=y();return e===n.constructor?n:n.inject(e,{parent:r??n.constructor,...t})},O=class{stringify=JSON.stringify;parse=JSON.parse},k=class{},A=class extends k{json=D(O);encoder=new TextEncoder;decoder=new TextDecoder;encodeToString(e,t){return this.json.stringify(t)}encodeToBinary(e,t){return this.encoder.encode(this.encodeToString(e,t))}decode(e,t){if(t instanceof Uint8Array){let e=this.decoder.decode(t);return this.json.parse(e)}if(typeof t==`string`){let e=t.trim();return e.startsWith(`{`)||e.startsWith(`[`)?this.json.parse(t):t}return t}},j=e=>x(M,e),M=class extends b{called=0;onInit(){let e=this.options.handler,t=e=>{if(e)return(Array.isArray(e)?e:[e]).map(e=>e.constructor)};this.alepha.events.on(this.options.on,{caller:this.config.service,priority:this.options.priority,before:t(this.options.before),after:t(this.options.after),callback:t=>(this.called+=1,e(t))})}};j[u]=M;var N={assign:0,create:0,clone:0,discard:0,update:0};function P(e,t){return N.assign+=1,{...e,...t}}function F(e,t,n){return e>=t&&e<=n}function ee(e){return F(e,127462,127487)}function I(e){return F(e,65024,65039)}function te(e){return F(e,768,879)||F(e,6832,6911)||F(e,7616,7679)||F(e,65056,65071)}function ne(e){return e>65535?2:1}function L(e,t){for(;t<e.length;){let n=e.codePointAt(t);if(te(n)||I(n))t+=ne(n);else break}return t}function re(e,t){let n=e.codePointAt(t),r=t+ne(n);for(r=L(e,r);r<e.length-1&&e[r]===`‍`;){let t=e.codePointAt(r+1);r+=1+ne(t),r=L(e,r)}return ee(n)&&r<e.length&&ee(e.codePointAt(r))&&(r+=ne(e.codePointAt(r))),r}function ie(e){return F(e,55296,56319)||F(e,768,879)||e===8205}function ae(e){let t=0,n=0;for(;n<e.length;)n=re(e,n),t++;return t}function oe(e,t){if(t===0)return!0;let n=0,r=0;for(;r<e.length;)if(r=re(e,r),n++,n>=t)return!0;return!1}function se(e,t){let n=0,r=0;for(;r<e.length;)if(r=re(e,r),n++,n>t)return!1;return!0}function ce(e,t){if(t===0)return!0;let n=0;for(;n<e.length;){if(ie(e.charCodeAt(n)))return oe(e,t);if(n++,n>=t)return!0}return!1}function le(e,t){let n=0;for(;n<e.length;){if(ie(e.charCodeAt(n)))return se(e,t);if(n++,n>t)return!1}return!0}var ue=s({Entries:()=>Fe,EntriesRegExp:()=>Pe,Every:()=>Me,EveryAll:()=>Ne,GraphemeCount:()=>ke,HasPropertyKey:()=>U,IsArray:()=>R,IsAsyncIterator:()=>de,IsBigInt:()=>z,IsBoolean:()=>fe,IsClassInstance:()=>De,IsConstructor:()=>pe,IsDeepEqual:()=>Ve,IsEqual:()=>H,IsFunction:()=>me,IsGreaterEqualThan:()=>Te,IsGreaterThan:()=>Se,IsInteger:()=>he,IsIterator:()=>ge,IsLessEqualThan:()=>we,IsLessThan:()=>Ce,IsMaxLength:()=>Ae,IsMinLength:()=>je,IsMultipleOf:()=>Ee,IsNull:()=>_e,IsNumber:()=>ve,IsObject:()=>be,IsObjectNotArray:()=>ye,IsString:()=>B,IsSymbol:()=>xe,IsUndefined:()=>V,IsValueLike:()=>Oe,Keys:()=>Ie,Symbols:()=>Le,Values:()=>Re});function R(e){return Array.isArray(e)}function de(e){return be(e)&&Symbol.asyncIterator in e}function z(e){return H(typeof e,`bigint`)}function fe(e){return H(typeof e,`boolean`)}function pe(e){if(V(e)||!me(e))return!1;let t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function me(e){return H(typeof e,`function`)}function he(e){return Number.isInteger(e)}function ge(e){return be(e)&&Symbol.iterator in e}function _e(e){return H(e,null)}function ve(e){return Number.isFinite(e)}function ye(e){return be(e)&&!R(e)}function be(e){return H(typeof e,`object`)&&!_e(e)}function B(e){return H(typeof e,`string`)}function xe(e){return H(typeof e,`symbol`)}function V(e){return H(e,void 0)}function H(e,t){return e===t}function Se(e,t){return e>t}function Ce(e,t){return e<t}function we(e,t){return e<=t}function Te(e,t){return e>=t}function Ee(e,t){if(z(e)||z(t))return BigInt(e)%BigInt(t)===0n;if(!ve(e)||he(e)&&1/t%1==0)return!0;let n=e%t;return Math.min(Math.abs(n),Math.abs(n-t))<1e-10}function De(e){if(!be(e))return!1;let t=globalThis.Object.getPrototypeOf(e);return _e(t)?!1:H(typeof t.constructor,`function`)&&!(H(t.constructor,globalThis.Object)||H(t.constructor.name,`Object`))}function Oe(e){return z(e)||fe(e)||_e(e)||ve(e)||B(e)||V(e)}function ke(e){return ae(e)}function Ae(e,t){return le(e,t)}function je(e,t){return ce(e,t)}function Me(e,t,n){for(let r=t;r<e.length;r++)if(!n(e[r],r))return!1;return!0}function Ne(e,t,n){let r=!0;for(let i=t;i<e.length;i++)n(e[i],i)||(r=!1);return r}function U(e,t){return H(t,`__proto__`)||H(t,`constructor`)?Object.prototype.hasOwnProperty.call(e,t):t in e}function Pe(e){return Ie(e).map(t=>[RegExp(`^${t}$`),e[t]])}function Fe(e){return Object.entries(e)}function Ie(e){return Object.getOwnPropertyNames(e)}function Le(e){return Object.getOwnPropertySymbols(e)}function Re(e){return Object.values(e)}function ze(e,t){if(!be(t))return!1;let n=Ie(e);return H(n.length,Ie(t).length)&&n.every(n=>Ve(e[n],t[n]))}function Be(e,t){return R(t)&&H(e.length,t.length)&&e.every((n,r)=>Ve(e[r],t[r]))}function Ve(e,t){return R(e)?Be(e,t):be(e)?ze(e,t):H(e,t)}var He=/^[\p{ID_Start}_$][\p{ID_Continue}_$\u200C\u200D]*$/u;function Ue(e){return He.test(e)}function We(e,t){return`(${e} && ${t})`}function Ge(e,t){return`(${e} || ${t})`}function Ke(e){return`!(${e})`}function qe(e){return`Array.isArray(${e})`}function Je(e){return`Guard.IsAsyncIterator(${e})`}function Ye(e){return`typeof ${e} === "bigint"`}function Xe(e){return`typeof ${e} === "boolean"`}function Ze(e){return`Number.isInteger(${e})`}function Qe(e){return`Guard.IsIterator(${e})`}function $e(e){return`${e} === null`}function et(e){return`Number.isFinite(${e})`}function tt(e){return We(nt(e),Ke(qe(e)))}function nt(e){return`typeof ${e} === "object" && ${e} !== null`}function rt(e){return`typeof ${e} === "string"`}function it(e){return`typeof ${e} === "symbol"`}function at(e){return`${e} === undefined`}function ot(e){return`typeof ${e} === "function"`}function st(e){return`Guard.IsConstructor(${e})`}function ct(e,t){return`${e} === ${t}`}function lt(e,t){return`${e} > ${t}`}function ut(e,t){return`${e} < ${t}`}function dt(e,t){return`${e} <= ${t}`}function ft(e,t){return`${e} >= ${t}`}function pt(e,t){return`Guard.IsMinLength(${e}, ${t})`}function mt(e,t){return`Guard.IsMaxLength(${e}, ${t})`}function ht(e,t,n,r){return H(t,`0`)?`${e}.every((${n[0]}, ${n[1]}) => ${r})`:`((value, callback) => { for(let index = ${t}; index < value.length; index++) if (!callback(value[index], index)) return false; return true })(${e}, (${n[0]}, ${n[1]}) => ${r})`}function gt(e){return`Object.entries(${e})`}function _t(e){return`Object.getOwnPropertyNames(${e})`}function vt(e,t){return H(t,`"__proto__"`)||H(t,`"constructor"`)?`Object.prototype.hasOwnProperty.call(${e}, ${t})`:`${t} in ${e}`}function yt(e,t){return`Guard.IsDeepEqual(${e}, ${t})`}function bt(e){return`[${e.join(`, `)}]`}function xt(e,t){return`((${e.join(`, `)}) => ${t})`}function St(e,t){return`${e}(${t.join(`, `)})`}function Ct(e,t){return`new ${e}(${t.join(`, `)})`}function wt(e,t){return`${e}${Ue(t)?`.${t}`:`[${Tt(t)}]`}`}function Tt(e){return B(e)?JSON.stringify(e):`${e}`}function Et(e,t,n){return`(${e} ? ${t} : ${n})`}function Dt(e){return`{ ${e.join(`; `)}; }`}function Ot(e,t){return`const ${e} = ${t}`}function kt(e,t){return`if(${e}) { ${t} }`}function At(e){return`return ${e}`}function jt(e){return H(e.length,0)?`true`:e.reduce((e,t)=>We(e,t))}function Mt(e){return H(e.length,0)?`false`:e.reduce((e,t)=>Ge(e,t))}function Nt(e){return`++${e}`}function Pt(e,t){return`Guard.IsMultipleOf(${e}, ${t})`}function Ft(e){return e instanceof Boolean}function It(e){return e instanceof Number}function Lt(e){return e instanceof String}function Rt(e){return globalThis.ArrayBuffer.isView(e)}function zt(e){return e instanceof globalThis.RegExp}function Bt(e){return e instanceof globalThis.Date}function Vt(e){return e instanceof globalThis.Set}function Ht(e){return e instanceof globalThis.Map}function Ut(e){return be(e)&&U(e,`~guard`)}function Wt(e){return e}function Gt(e){return e.map(e=>Yt(e))}function Kt(e){let t={},n=Object.getOwnPropertyDescriptors(e);for(let e of Object.keys(n)){let r=n[e];U(r,`value`)&&Object.defineProperty(t,e,{...r,value:Yt(r.value)})}return t}function qt(e){return new RegExp(e.source,e.flags)}function Jt(e){return e}function Yt(e){return e instanceof RegExp?qt(e):Ut(e)?Wt(e):R(e)?Gt(e):be(e)?Kt(e):Jt(e)}function Xt(e){return N.clone+=1,Yt(e)}var Zt={immutableTypes:!1,maxErrors:8,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1};function Qt(e){for(let t of Ie(e)){let n=e[t];n!==void 0&&Object.defineProperty(Zt,t,{value:n})}}function $t(){return Zt}function en(e,t){for(let n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:!1,value:t[n]});return e}function tn(e,t){return{...e,...t}}function nn(e,t,n={}){N.create+=1;let r=$t(),i=tn(t,n),a=r.enumerableKind?tn(i,e):en(i,e);return r.immutableTypes?Object.freeze(a):a}function rn(e,t){N.discard+=1;let n={},r=Object.getOwnPropertyDescriptors(Xt(e)),i=new Set(t);for(let e of Object.keys(r))i.has(e)||Object.defineProperty(n,e,r[e]);return n}function an(e,t,n){N.update+=1;let r=$t(),i=Xt(e);for(let e of Object.keys(t))Object.defineProperty(i,e,{configurable:!0,writable:!0,enumerable:r.enumerableKind,value:t[e]});for(let e of Object.keys(n))Object.defineProperty(i,e,{configurable:!0,enumerable:!0,writable:!0,value:n[e]});return i}function on(e,t){return be(e)&&U(e,`~kind`)&&H(e[`~kind`],t)}function sn(e){return be(e)}function cn(e){return nn({"~kind":`OptionalAddAction`},{type:e},{})}function ln(e){return be(e)&&U(e,`~kind`)&&U(e,`type`)&&H(e[`~kind`],`OptionalAddAction`)&&sn(e.type)}function un(e){return nn({"~kind":`OptionalRemoveAction`},{type:e},{})}function dn(e){return be(e)&&U(e,`~kind`)&&U(e,`type`)&&H(e[`~kind`],`OptionalRemoveAction`)&&sn(e.type)}function fn(e){return nn({"~kind":`ReadonlyAddAction`},{type:e},{})}function pn(e){return be(e)&&U(e,`~kind`)&&U(e,`type`)&&H(e[`~kind`],`ReadonlyAddAction`)&&sn(e.type)}function mn(e){return nn({"~kind":`ReadonlyRemoveAction`},{type:e},{})}function hn(e){return be(e)&&U(e,`~kind`)&&U(e,`type`)&&H(e[`~kind`],`ReadonlyRemoveAction`)&&sn(e.type)}function gn(e,t,n){return nn({"~kind":`Deferred`},{action:e,parameters:t,options:n},{})}function _n(e){return on(e,`Deferred`)}function vn(e){return an(e,{"~immutable":!0},{})}function yn(e){return vn(e)}function bn(e){return sn(e)&&U(e,`~immutable`)}function xn(e){return rn(e,[`~optional`])}function Sn(e){return an(e,{"~optional":!0},{})}function Cn(e){return Sn(e)}function wn(e){return sn(e)&&U(e,`~optional`)}function Tn(e){return rn(e,[`~readonly`])}function En(e){return an(e,{"~readonly":!0},{})}function Dn(e){return En(e)}function On(e){return sn(e)&&U(e,`~readonly`)}function kn(e,t){return nn({"~kind":`Array`},{type:`array`,items:e},t)}function An(e){return on(e,`Array`)}function jn(e){return rn(e,[`~kind`,`type`,`items`])}function Mn(e,t){return nn({"~kind":`AsyncIterator`},{type:`asyncIterator`,iteratorItems:e},t)}function Nn(e){return on(e,`AsyncIterator`)}function Pn(e){return rn(e,[`~kind`,`type`,`iteratorItems`])}function Fn(e){return{enumerable:$t().enumerableKind,writable:!1,configurable:!1,value:e}}var In=class{constructor(){globalThis.Object.defineProperty(this,`~kind`,Fn(`Base`)),globalThis.Object.defineProperty(this,`~guard`,Fn({check:e=>this.Check(e),errors:e=>this.Errors(e)}))}Check(e){return!0}Errors(e){return[]}Convert(e){return e}Clean(e){return e}Default(e){return e}Create(){throw Error(`Create not implemented`)}Clone(){throw Error(`Clone not implemented`)}};function Ln(e){return on(e,`Base`)}function Rn(e,t,n={}){return nn({"~kind":`Constructor`},{type:`constructor`,parameters:e,instanceType:t},n)}function zn(e){return on(e,`Constructor`)}function Bn(e){return rn(e,[`~kind`,`type`,`parameters`,`instanceType`])}function Vn(e,t,n={}){return nn({"~kind":`Function`},{type:`function`,parameters:e,returnType:t},n)}function Hn(e){return on(e,`Function`)}function Un(e){return rn(e,[`~kind`,`type`,`parameters`,`returnType`])}function Wn(e,t){return nn({"~kind":`Ref`},{$ref:e},t)}function Gn(e){return on(e,`Ref`)}function Kn(e,t){return nn({"~kind":`Generic`},{type:`generic`,parameters:e,expression:t})}function qn(e){return on(e,`Generic`)}function Jn(e){return nn({"~kind":`Any`},{},e)}function Yn(e){return on(e,`Any`)}var Xn=`(?!)`;function Zn(e){return nn({"~kind":`Never`},{not:{}},e)}function Qn(e){return on(e,`Never`)}function $n(e){return Ie(e).filter(t=>!wn(e[t]))}function er(e){return Ie(e)}function tr(e){return Re(e)}function nr(e,t={}){let n=$n(e);return nn({"~kind":`Object`},{type:`object`,...n.length>0?{required:n}:{},properties:e},t)}function rr(e){return on(e,`Object`)}function ir(e){return rn(e,[`~kind`,`type`,`properties`,`required`])}function ar(e,t={}){return nn({"~kind":`Union`},{anyOf:e},t)}function or(e){return on(e,`Union`)}function sr(e){return rn(e,[`~kind`,`anyOf`])}function cr(e){return nn({"~kind":`Unknown`},{},e)}function lr(e){return on(e,`Unknown`)}function ur(e,t,n){return nn({"~kind":`Cyclic`},{$defs:Ie(e).reduce((t,n)=>({...t,[n]:an(e[n],{},{$id:n})}),{}),$ref:t},n)}function dr(e){return on(e,`Cyclic`)}function fr(e,t){return t[e.length]?.(...e)??(()=>{throw Error(`Invalid Arguments`)})()}function pr(...e){let[t,n]=fr(e,{2:(e,t)=>[e,t,t],1:e=>[e,cr(),cr()]});return nn({"~kind":`Infer`},{type:`infer`,name:t,extends:n},{})}function mr(e){return on(e,`Infer`)}function hr(e){return ye(e)}function gr(e){return Ie(e).filter(e=>isNaN(e)).reduce((t,n)=>[...t,e[n]],[])}function _r(e,t){return nn({"~kind":`Enum`},{enum:hr(e)?gr(e):e},t)}function vr(e){return on(e,`Enum`)}function yr(e,t={}){return nn({"~kind":`Intersect`},{allOf:e},t)}function br(e){return on(e,`Intersect`)}function xr(e){return rn(e,[`~kind`,`allOf`])}function Sr(){throw Error(`Unreachable`)}var Cr=void 0;function wr(){try{return Er(`null`)(),!0}catch{return!1}}function Tr(){return V(Cr)&&(Cr=wr()),Cr&&$t().useAcceleration}function Er(...e){return new globalThis.Function(...e)}var Dr=s({Hash:()=>ni,HashCode:()=>ti});function Or(e){let t=new Set,n=e;for(;n&&n!==Object.prototype;){for(let e of Reflect.ownKeys(n))e!==`constructor`&&typeof e!=`symbol`&&t.add(e);n=Object.getPrototypeOf(n)}return[...t]}function kr(e){return typeof e==`number`}var Ar;(function(e){e[e.Array=0]=`Array`,e[e.BigInt=1]=`BigInt`,e[e.Boolean=2]=`Boolean`,e[e.Date=3]=`Date`,e[e.Constructor=4]=`Constructor`,e[e.Function=5]=`Function`,e[e.Null=6]=`Null`,e[e.Number=7]=`Number`,e[e.Object=8]=`Object`,e[e.RegExp=9]=`RegExp`,e[e.String=10]=`String`,e[e.Symbol=11]=`Symbol`,e[e.TypeArray=12]=`TypeArray`,e[e.Undefined=13]=`Undefined`})(Ar||={});var jr=BigInt(`14695981039346656037`),[Mr,Nr]=[BigInt(`1099511628211`),BigInt(`18446744073709551616`)],Pr=Array.from({length:256}).map((e,t)=>BigInt(t)),Fr=new Float64Array(1),Ir=new DataView(Fr.buffer),Lr=new Uint8Array(Fr.buffer);function Rr(e){jr^=Pr[e],jr=jr*Mr%Nr}function zr(e){Rr(Ar.Array);for(let t of e)ei(t)}function Br(e){Rr(Ar.BigInt),Ir.setBigInt64(0,e);for(let e of Lr)Rr(e)}function Vr(e){Rr(Ar.Boolean),Rr(+!!e)}function Hr(e){Rr(Ar.Constructor),ei(e.toString())}function Ur(e){Rr(Ar.Date),ei(e.getTime())}function Wr(e){Rr(Ar.Function),ei(e.toString())}function Gr(e){Rr(Ar.Null)}function Kr(e){Rr(Ar.Number),Ir.setFloat64(0,e,!0);for(let e of Lr)Rr(e)}function qr(e){Rr(Ar.Object);for(let t of Or(e).sort())ei(t),ei(e[t])}function Jr(e){Rr(Ar.RegExp),Xr(e.toString())}var Yr=new TextEncoder;function Xr(e){Rr(Ar.String);for(let t of Yr.encode(e))Rr(t)}function Zr(e){Rr(Ar.Symbol),ei(e.toString())}function Qr(e){Rr(Ar.TypeArray);let t=new Uint8Array(e.buffer);for(let e=0;e<t.length;e++)Rr(t[e])}function $r(e){return Rr(Ar.Undefined)}function ei(e){return Rt(e)?Qr(e):Bt(e)?Ur(e):zt(e)?Jr(e):Ft(e)?Vr(e.valueOf()):Lt(e)?Xr(e.valueOf()):It(e)?Kr(e.valueOf()):kr(e)?Kr(e):R(e)?zr(e):fe(e)?Vr(e):z(e)?Br(e):pe(e)?Hr(e):_e(e)?Gr(e):be(e)?qr(e):B(e)?Xr(e):xe(e)?Zr(e):V(e)?$r(e):me(e)?Wr(e):Sr()}function ti(e){return jr=BigInt(`14695981039346656037`),ei(e),jr}function ni(e){return ti(e).toString(16).padStart(16,`0`)}function ri(e){switch(e.keyword){case`additionalProperties`:return`must not have additional properties`;case`anyOf`:return`must match a schema in anyOf`;case`boolean`:return`schema is false`;case`const`:return`must be equal to constant`;case`contains`:return`must contain at least 1 valid item`;case`dependencies`:return`must have properties ${e.params.dependencies.join(`, `)} when property ${e.params.property} is present`;case`dependentRequired`:return`must have properties ${e.params.dependencies.join(`, `)} when property ${e.params.property} is present`;case`enum`:return`must be equal to one of the allowed values`;case`exclusiveMaximum`:return`must be ${e.params.comparison} ${e.params.limit}`;case`exclusiveMinimum`:return`must be ${e.params.comparison} ${e.params.limit}`;case`format`:return`must match format "${e.params.format}"`;case`if`:return`must match "${e.params.failingKeyword}" schema`;case`maxItems`:return`must not have more than ${e.params.limit} items`;case`maxLength`:return`must not have more than ${e.params.limit} characters`;case`maxProperties`:return`must not have more than ${e.params.limit} properties`;case`maximum`:return`must be ${e.params.comparison} ${e.params.limit}`;case`minItems`:return`must not have fewer than ${e.params.limit} items`;case`minLength`:return`must not have fewer than ${e.params.limit} characters`;case`minProperties`:return`must not have fewer than ${e.params.limit} properties`;case`minimum`:return`must be ${e.params.comparison} ${e.params.limit}`;case`multipleOf`:return`must be multiple of ${e.params.multipleOf}`;case`not`:return`must not be valid`;case`oneOf`:return`must match exactly one schema in oneOf`;case`pattern`:return`must match pattern "${e.params.pattern}"`;case`propertyNames`:return`property names ${e.params.propertyNames.join(`, `)} are invalid`;case`required`:return`must have required properties ${e.params.requiredProperties.join(`, `)}`;case`type`:return typeof e.params.type==`string`?`must be ${e.params.type}`:`must be either ${e.params.type.join(` or `)}`;case`unevaluatedItems`:return`must not have unevaluated items`;case`unevaluatedProperties`:return`must not have unevaluated properties`;case`uniqueItems`:return`must not have duplicate items`;case`~guard`:return`must match check function`;case`~refine`:return e.params.message;default:return`an unknown validation error occurred`}}var ii=ri;function ai(){return ii}var oi=class{constructor(e,t){this.type=e,this.decode=t}Encode(e){let t=this.type,n={decode:di(t)?e=>this.decode(t[`~codec`].decode(e)):this.decode,encode:di(t)?n=>t[`~codec`].encode(e(n)):e};return an(this.type,{"~codec":n},{})}},si=class{constructor(e){this.type=e}Decode(e){return new oi(this.type,e)}};function ci(e){return new si(e)}function li(e,t){return ci(e).Decode(t).Encode(()=>{throw Error(`Encode not implemented`)})}function ui(e,t){return ci(e).Decode(()=>{throw Error(`Decode not implemented`)}).Encode(t)}function di(e){return sn(e)&&U(e,`~codec`)&&be(e[`~codec`])&&U(e[`~codec`],`encode`)&&U(e[`~codec`],`decode`)}function fi(e,t){return an(e,{"~refine":mi(e)?[...e[`~refine`],t]:[t]},{})}function pi(e,t,n=`error`){return fi(e,{refine:t,message:n})}function mi(e){return sn(e)&&U(e,`~refine`)}var hi=`-?(?:0|[1-9][0-9]*)n`;function gi(e){return nn({"~kind":`BigInt`},{type:`bigint`},e)}function _i(e){return on(e,`BigInt`)}function vi(e){return nn({"~kind":`Boolean`},{type:`boolean`},e)}function yi(e){return on(e,`Boolean`)}function bi(e){return nn({"~kind":`Identifier`},{name:e})}function xi(e){return on(e,`Identifier`)}var Si=`-?(?:0|[1-9][0-9]*)`;function Ci(e){return nn({"~kind":`Integer`},{type:`integer`},e)}function wi(e){return on(e,`Integer`)}function Ti(e,t){return nn({"~kind":`Iterator`},{type:`iterator`,iteratorItems:e},t)}function Ei(e){return on(e,`Iterator`)}function Di(e){return rn(e,[`~kind`,`type`,`iteratorItems`])}var Oi=class extends Error{constructor(e){super(`Invalid Literal value`),Object.defineProperty(this,`cause`,{value:{value:e},writable:!1,configurable:!1,enumerable:!1})}};function ki(e){return z(e)?`bigint`:fe(e)?`boolean`:ve(e)?`number`:B(e)?`string`:(()=>{throw new Oi(e)})()}function Ai(e,t){return nn({"~kind":`Literal`},{type:ki(e),const:e},t)}function ji(e){return z(e)||fe(e)||ve(e)||B(e)}function Mi(e){return Ii(e)&&z(e.const)}function Ni(e){return Ii(e)&&fe(e.const)}function Pi(e){return Ii(e)&&ve(e.const)}function Fi(e){return Ii(e)&&B(e.const)}function Ii(e){return on(e,`Literal`)}function Li(e){return nn({"~kind":`Null`},{type:`null`},e)}function Ri(e){return on(e,`Null`)}var zi=`-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?`;function Bi(e){return nn({"~kind":`Number`},{type:`number`},e)}function Vi(e){return on(e,`Number`)}function Hi(e){return nn({"~kind":`Symbol`},{type:`symbol`},e)}function Ui(e){return on(e,`Symbol`)}function Wi(...e){let[t,n,r]=fr(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[e,t,t],1:e=>[e,cr(),cr()]});return nn({"~kind":`Parameter`},{name:t,extends:n,equals:r},{})}function Gi(e){return on(e,`Parameter`)}function Ki(e,t){return nn({"~kind":`Promise`},{type:`promise`,item:e},t)}function qi(e){return on(e,`Promise`)}function Ji(e){return rn(e,[`~kind`,`type`,`item`])}function Yi(e){return nn({"~kind":`String`},{type:`string`},e)}function Xi(e){return on(e,`String`)}function Zi(e){let t=_d(e);return H(t.length,2)?t[0]:[]}function Qi(e){return!0}function $i(e){let[t,...n]=e;return sn(t)?ta(t)?$i(n):!1:!0}function ea(e){return H(e.length,0)?!1:$i(e)}function ta(e){return or(e)?ea(e.anyOf):Ii(e)?Qi(e.const):!1}function na(e){return ea(e)}function ra(e){return nn({"~kind":`TemplateLiteral`},{type:`string`,pattern:e},{})}function ia(e,t,n=[]){let[r,...i]=e;return B(r)?ia(i,t,[...n,`${r}${t}`]):n}function aa(e,t){return H(e.length,0)?[`${t}`]:ia(e,t)}function oa(e,t,n=[]){let[r,...i]=t;return sn(r)?oa(e,i,[...n,...sa(e,r)]):n}function sa(e,t){return or(t)?oa(e,t.anyOf):Ii(t)?aa(e,t.const):Sr()}function ca(e,t){let[n,...r]=t;return sn(n)?ca(sa(e,n),r):e}function la(e){return e.map(e=>Ai(e))}function ua(e){return ar(la(ca([],e)))}function da(e){return H(e.length,0)?Sr():H(e.length,1)&&Ii(e[0])?e[0]:ua(e)}function fa(e){let t=Zi(e);return H(t.length,0)?Yi():na(t)?da(t):ra(e)}function pa(e){let t=fa(e);return Ld(t)?Yi():t}function ma(e,t){return nn({"~kind":`Record`},{type:`object`,patternProperties:{[e]:t}})}var ha=`^${Si}$`,ga=`^${zi}$`,_a=`^.*$`;function va(e,t,n={}){return gn(`Record`,[e,t],n)}function ya(e,t,n={}){return _y({},va(e,t,n))}function ba(e,t,n={}){return ya(e,t,n)}function xa(e,t){return ma(e,t)}function Sa(e){return Ie(e.patternProperties)[0]}function Ca(e){let t=Sa(e);return H(t,_a)?Yi():H(t,ha)?Ci():H(t,ga)?Bi():fa(t)}function wa(e){return e.patternProperties[Sa(e)]}function Ta(e){return on(e,`Record`)}function Ea(e){return nn({"~kind":`Rest`},{type:`rest`,items:e},{})}function Da(e){return on(e,`Rest`)}function Oa(e){return nn({"~kind":`This`},{$ref:`#`},e)}function ka(e){return on(e,`This`)}function Aa(e,t={}){let[n,r,i]=[e,e.length,!1];return nn({"~kind":`Tuple`},{type:`array`,additionalItems:i,items:n,minItems:r},t)}function ja(e){return on(e,`Tuple`)}function Ma(e){return rn(e,[`~kind`,`type`,`items`,`minItems`,`additionalItems`])}function Na(e){return nn({"~kind":`Undefined`},{type:`undefined`},e)}function Pa(e){return on(e,`Undefined`)}function Fa(e){return nn({"~kind":`Unsafe`},{},e)}function Ia(e){return on(e,`Unsafe`)}function La(e){return nn({"~kind":`Void`},{type:`void`},e)}function Ra(e){return on(e,`Void`)}function za(e,t){return H(e,`Array`)?kn(t[0]):H(e,`AsyncIterator`)?Mn(t[0]):H(e,`Iterator`)?Ti(t[0]):H(e,`Promise`)?Ki(t[0]):H(e,`Awaited`)?vy(t[0]):H(e,`Capitalize`)?rh(t[0]):H(e,`ConstructorParameters`)?Dh(t[0]):H(e,`Evaluate`)?by(t[0]):H(e,`Exclude`)?Mh(t[0],t[1]):H(e,`Extract`)?zh(t[0],t[1]):H(e,`Index`)?vg(t[0],t[1]):H(e,`InstanceType`)?Pg(t[0]):H(e,`Lowercase`)?ah(t[0]):H(e,`NonNullable`)?g_(t[0]):H(e,`Omit`)?S_(t[0],t[1]):H(e,`Options`)?O_(t[0],t[1]):H(e,`Parameters`)?M_(t[0]):H(e,`Partial`)?L_(t[0]):H(e,`Pick`)?K_(t[0],t[1]):H(e,`Readonly`)?Q_(t[0]):H(e,`KeyOf`)?Vg(t[0]):H(e,`Record`)?va(t[0],t[1]):H(e,`Required`)?Mv(t[0]):H(e,`ReturnType`)?Iv(t[0]):H(e,`Uncapitalize`)?sh(t[0]):H(e,`Uppercase`)?lh(t[0]):Km(Wn(e),t)}function Ba(){throw Error(`Unreachable`)}var Va=(e,t=[])=>e.reduce((e,t)=>R(t)&&H(t.length,2)?[...e,t[0]]:[...e,t],[]),Ha=e=>{let[t,n]=e;return Va([...t,...n])};function Ua(e){return Wi(e[0],e[2],e[4])}function Wa(e){return Wi(e[0],e[2],e[2])}function Ga(e){return Wi(e[0],cr(),e[2])}function Ka(e){return Wi(e,cr(),cr())}function qa(e){return e}function Ja(e){return Ha(e)}function Ya(e){return e[1]}function Xa(e){return Ha(e)}function Za(e){return e[1]}function Qa(e){return za(e[0],e[1])}function $a(e){return null}function eo(e){return Yi()}function to(e){return Bi()}function no(e){return vi()}function ro(e){return Na()}function io(e){return Li()}function ao(e){return Ci()}function oo(e){return gi()}function so(e){return cr()}function co(e){return Jn()}function lo(e){return nr({})}function uo(e){return Zn()}function fo(e){return Hi()}function po(e){return La()}function mo(e){return Oa()}function ho(e){return e}function go(e){return e[1]}function _o(e){return Ai(e)}function vo(e){return H(e.length,3)?[e[0],e[1],...e[2]]:[e[0]]}function yo(e){return e[1]}function bo(e){return Nd(e)}function xo(e){return Ai(BigInt(e))}function So(e){return Ai(H(e,`true`))}function Co(e){return Ai(parseFloat(e))}function wo(e){return Ai(e)}function To(e){return e}function Eo(e){return e.length>0}function Do(e){return e.reduce((e,t)=>H(t.length,3)?[...e,[t[1]]]:[...e,[]],[])}function Oo(e){return H(e.length,6)?[e[1],e[3],e[5]]:[]}function ko(e){return R(e)&&H(e.length,3)?e[1]:e}var Ao=(e,t)=>t.reduce((e,t)=>{let n=t;return H(n.length,1)?vg(e,n[0]):H(n.length,0)?kn(e):Ba()},e),jo=(e,t)=>H(t.length,3)?Ch(e,t[0],t[1],t[2]):e;function Mo(e){let[t,n,r,i]=e;return jo(t?Vg(Ao(n,r)):Ao(n,r),i)}function No(e,t){return H(t.length,3)?(()=>{let[n,r,i]=t,a=No(r,i);if(H(n,`&`))return br(a)?yr([e,...a.allOf]):yr([e,a]);if(H(n,`|`))return or(a)?ar([e,...a.anyOf]):ar([e,a]);Ba()})():e}function Po(e){return e}function Fo(e){let[t,n]=e;return No(t,n)}function Io(e){return e}function Lo(e){let[t,n]=e;return No(t,n)}function Ro(e){return vn(e[1])}function zo(e){return e[1]}function Bo(e){return Kn(e[0],e[2])}function Vo(e){return H(e.length,4)?pr(e[1],e[3]):H(e.length,2)?pr(e[1],cr()):Ba()}function Ho(e){return e}function Uo(e){return`${e}`}function Wo(e){return e}function Go(e){return e}function Ko(e){return wi(e[3])?ha:Vi(e[3])?ga:Ui(e[3])||Xi(e[3])?_a:Ba()}function qo(e){return e}function Jo(e){return e.length>0}function Yo(e){return e.length>0}function Xo(e){let[t,n,r,i,a]=e;return{[n]:t&&r?En(Sn(a)):t&&!r?En(a):!t&&r?Sn(a):a}}function Zo(e){return e}function Qo(e){return Ha(e)}function $o(e){return e.reduce((e,t)=>U(t,ha)||U(t,ga)||U(t,_a)?[e[0],P(e[1],t)]:[P(e[0],t),e[1]],[{},{}])}function es(e){return $o(e[1])}function ts(e){let[t,n]=e;return nr(t,H(Ie(n).length,0)?{}:{patternProperties:n})}function ns(e){return H(e.length,5)?En(Sn(e[4])):H(e.length,3)?e[2]:H(e.length,4)?H(e[2],`readonly`)?En(e[3]):Sn(e[3]):Ba()}function rs(e){return En(Sn(e[1]))}function is(e){return En(e[1])}function as(e){return Sn(e[0])}function os(e){return e}function ss(e){return H(e.length,2)?Ea(e[1]):H(e.length,1)?e[0]:Ba()}function cs(e){return Ha(e)}function ls(e){return Aa(e[1])}function us(e){return En(Sn(e[4]))}function ds(e){return En(e[3])}function fs(e){return Sn(e[3])}function ps(e){return e[2]}function ms(e){return e}function hs(e){return H(e.length,2)?Ea(e[1]):H(e.length,1)?e[0]:Ba()}function gs(e){return Ha(e)}function _s(e){return Vn(e[1],e[4])}function vs(e){return Rn(e[2],e[5])}function ys(e,t){return H(e,`remove`)?mn(t):H(e,`add`)?fn(t):t}function bs(e){return H(e.length,2)&&H(e[0],`-`)?`remove`:H(e.length,2)&&H(e[0],`+`)||H(e.length,1)?`add`:`none`}function xs(e,t){return H(e,`remove`)?un(t):H(e,`add`)?cn(t):t}function Ss(e){return H(e.length,2)&&H(e[0],`-`)?`remove`:H(e.length,2)&&H(e[0],`+`)||H(e.length,1)?`add`:`none`}function Cs(e){return H(e.length,2)?[e[1]]:[]}function ws(e){return R(e[6])&&H(e[6].length,1)?$g(bi(e[3]),e[5],e[6][0],ys(e[1],xs(e[8],e[10]))):$g(bi(e[3]),e[5],Wn(e[3]),ys(e[1],xs(e[8],e[10])))}function Ts(e){return Wn(e)}function Es(e){return O_(e[2],e[4])}function Ds(e){return parseFloat(e)}function Os(e){return H(e,`true`)}function ks(e){return e}function As(e){return null}function js(e){return{[e[0]]:e[2]}}function Ms(e){return Ha(e)}function Ns(e){return e.reduce((e,t)=>P(e,t),{})}function Ps(e){return Ns(e[1])}function Fs(e){return Ha(e)}function Is(e){return e[1]}function Ls(e){return e}function Rs(e){return gi()}function zs(e){return Yi()}function Bs(e){return Bi()}function Vs(e){return Ci()}function Hs(e){return Zn()}function Us(e){return Ai(e)}function Ws(e){return e}function Gs(e){return ar(e[1])}function Ks(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function qs(e){return[e[0],...e[1]]}function Js(e){return e}function Ys(e){return e[1]}function Xs(e){return Ha(e)}function Zs(e){return H(e.length,2)?e[1]:[]}function Qs(e){let t=e[2],n=e[3],[r,i]=e[4],a=H(Ie(i).length,0)?{}:{patternProperties:i};return{[e[1]]:Kn(t,pp(n,r,a))}}function $s(e){let t=e[2],[n,r]=e[3],i=H(Ie(r).length,0)?{}:{patternProperties:r};return{[e[1]]:pp(t,n,i)}}function ec(e){return{[e[1]]:Kn(e[2],e[4])}}function tc(e){return{[e[1]]:e[3]}}function nc(e){return null}function rc(e){return e}function ic(e){return $o(Ha(e))}function ac(e){return e[1]}function oc(e){let t=e[0],n=e[1];return Sy(P(t,n[0]))}function sc(e){return e}function cc(e){return H(e.length,2)}function lc(e,t,n){return cc(e)?t(e[0],e[1]):n()}function uc(e,t){return H(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function dc(e,t){for(let n=0;n<e.length;n++){let r=uc(e[n],t);if(cc(r))return r}return[]}function fc(e,t){return Array.from({length:t-e+1},(t,n)=>String.fromCharCode(e+n))}var pc=[...fc(97,122),...fc(65,90)],mc=fc(49,57),hc=[`0`,...mc],gc=`//`,_c=`/*`,vc=`*/`;function yc(e){let t=e.indexOf(vc);return H(t,-1)?``:e.slice(t+2)}function bc(e){let t=e.indexOf(`
2
+ `);return H(t,-1)?``:e.slice(t)}function xc(e){return e.replace(/^[ \t\r\f\v]+/,``)}function Sc(e){let t=xc(e);return t.startsWith(_c)?Sc(yc(t.slice(2))):t.startsWith(gc)?Sc(bc(t.slice(2))):t}function Cc(e){let t=e.trimStart();return t.startsWith(_c)?Cc(yc(t.slice(2))):t.startsWith(gc)?Cc(bc(t.slice(2))):t}function wc(e,t){return lc(dc([e],t),(e,t)=>[e,t],()=>[``,t])}function Tc(e,t){return e.includes(t)}function Ec(e,t,n,r=``){return lc(dc(e,n),(n,i)=>Tc(t,n)?Ec(e,t,i,r):Ec(e,t,i,`${r}${n}`),()=>[r,n])}function Dc(e){return dc(mc,e)}var Oc=[...hc,`_`];function kc(e){return Ec(Oc,[`_`],e)}function Ac(e){return lc(dc([`0`],e),(e,t)=>[e,t],()=>lc(Dc(e),(e,t)=>lc(kc(t),(t,n)=>[`${e}${t}`,n],()=>[]),()=>[]))}function jc(e){return Ac(Cc(e))}function Mc(e){return wc(`-`,e)}function Nc(e){return lc(Mc(e),(e,t)=>lc(jc(t),(t,n)=>[`${e}${t}`,n],()=>[]),()=>[])}function Pc(e){return Nc(Cc(e))}function Fc(e){return lc(Pc(e),(e,t)=>lc(dc([`n`],t),(t,n)=>[`${e}`,n],()=>[]),()=>[])}function Ic(e){return Fc(e)}function Lc(e,t){return dc([e],t)}function W(e,t){return H(e,``)?[``,t]:e.startsWith(`
3
+ `)?Lc(e,Sc(t)):e.startsWith(` `)?Lc(e,t):Lc(e,Cc(t))}var Rc=[...pc,`_`,`$`];function zc(e){return dc(Rc,e)}var Bc=[...Rc,...hc];function Vc(e,t=``){return lc(dc(Bc,e),(e,n)=>Vc(n,`${t}${e}`),()=>[t,e])}function Hc(e){return lc(zc(e),(e,t)=>lc(Vc(t),(t,n)=>[`${e}${t}`,n],()=>[]),()=>[])}function Uc(e){return Hc(Cc(e))}var Wc=[...hc,`_`];function Gc(e){return cc(dc([`.`],e))}function Kc(e){return lc(Ec(Wc,[`_`],e),(e,t)=>H(e,``)?[]:[e,t],()=>[])}function qc(e){return lc(dc([`.`],e),(e,t)=>lc(Kc(t),(t,n)=>[`0${e}${t}`,n],()=>[]),()=>[])}function Jc(e){return lc(jc(e),(e,t)=>lc(dc([`.`],t),(t,n)=>lc(Kc(n),(n,r)=>[`${e}${t}${n}`,r],()=>[`${e}`,n]),()=>[`${e}`,t]),()=>[])}function Yc(e){return Gc(e)?qc(e):Jc(e)}function Xc(e){return Yc(Cc(e))}function Zc(e){return wc(`-`,e)}function Qc(e){return lc(Zc(e),(e,t)=>lc(Xc(t),(t,n)=>[`${e}${t}`,n],()=>[]),()=>[])}function $c(e){return Qc(Cc(e))}function el(e){return H(e,``)?[]:[e.slice(0,1),e.slice(1)]}function tl(e,t){let[n,...r]=e;return B(n)?t.startsWith(n)?!0:tl(r,t):!1}function nl(e,t,n=``){return lc(el(t),(r,i)=>tl(e,t)?[n,t]:nl(e,i,`${n}${r}`),()=>[])}function rl(e,t,n){return lc(dc([e],n),(e,n)=>lc(nl([t],n),(e,n)=>lc(dc([t],n),(t,n)=>[`${e}`,n],()=>[]),()=>[]),()=>[])}function il(e,t,n){return lc(dc([e],n),(e,n)=>lc(nl([`
4
+ `,t],n),(e,n)=>lc(dc([t],n),(t,n)=>[`${e}`,n],()=>[]),()=>[]),()=>[])}function al(e,t,n,r){return n?rl(e,t,Cc(r)):il(e,t,Cc(r))}function ol(e,t){return dc(e,t)}function sl(e,t){return al(e,e,!1,t)}function cl(e,t){return lc(ol(e,t),(e,t)=>sl(e,`${e}${t}`),()=>[])}function ll(e,t){return cl(e,Cc(t))}function ul(e,t){return lc(nl(e,t),(e,t)=>H(e,``)?[]:[e,t],()=>[])}var G=(e,t,n=()=>[])=>e.length===2?t(e):n(),dl=e=>G(G(Uc(e),([e,t])=>G(W(`extends`,t),([t,n])=>G(lu(n),([n,r])=>G(W(`=`,r),([r,i])=>G(lu(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[Ua(e),t]),fl=e=>G(G(Uc(e),([e,t])=>G(W(`extends`,t),([t,n])=>G(lu(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Wa(e),t]),pl=e=>G(G(Uc(e),([e,t])=>G(W(`=`,t),([t,n])=>G(lu(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Ga(e),t]),ml=e=>G(Uc(e),([e,t])=>[Ka(e),t]),hl=e=>G(G(dl(e),([e,t])=>[e,t],()=>G(fl(e),([e,t])=>[e,t],()=>G(pl(e),([e,t])=>[e,t],()=>G(ml(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[qa(e),t]),gl=(e,t=[])=>G(G(hl(e),([e,t])=>G(W(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>gl(n,[...t,e]),()=>[t,e]),_l=e=>G(G(gl(e),([e,t])=>G(G(G(hl(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[Ja(e),t]),vl=e=>G(G(W(`<`,e),([e,t])=>G(_l(t),([t,n])=>G(W(`>`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Ya(e),t]),yl=(e,t=[])=>G(G(lu(e),([e,t])=>G(W(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>yl(n,[...t,e]),()=>[t,e]),bl=e=>G(G(yl(e),([e,t])=>G(G(G(lu(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[Xa(e),t]),xl=e=>G(G(W(`<`,e),([e,t])=>G(bl(t),([t,n])=>G(W(`>`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Za(e),t]),Sl=e=>G(G(Uc(e),([e,t])=>G(xl(t),([t,n])=>[[e,t],n])),([e,t])=>[Qa(e),t]),Cl=e=>G(G(G(W(`;`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[$a(e),t]),wl=e=>G(W(`string`,e),([e,t])=>[eo(e),t]),Tl=e=>G(W(`number`,e),([e,t])=>[to(e),t]),El=e=>G(W(`boolean`,e),([e,t])=>[no(e),t]),Dl=e=>G(W(`undefined`,e),([e,t])=>[ro(e),t]),Ol=e=>G(W(`null`,e),([e,t])=>[io(e),t]),kl=e=>G(W(`integer`,e),([e,t])=>[ao(e),t]),Al=e=>G(W(`bigint`,e),([e,t])=>[oo(e),t]),jl=e=>G(W(`unknown`,e),([e,t])=>[so(e),t]),Ml=e=>G(W(`any`,e),([e,t])=>[co(e),t]),Nl=e=>G(W(`object`,e),([e,t])=>[lo(e),t]),Pl=e=>G(W(`never`,e),([e,t])=>[uo(e),t]),Fl=e=>G(W(`symbol`,e),([e,t])=>[fo(e),t]),Il=e=>G(W(`void`,e),([e,t])=>[po(e),t]),Ll=e=>G(W(`this`,e),([e,t])=>[mo(e),t]),Rl=e=>G(G(wl(e),([e,t])=>[e,t],()=>G(Tl(e),([e,t])=>[e,t],()=>G(El(e),([e,t])=>[e,t],()=>G(Dl(e),([e,t])=>[e,t],()=>G(Ol(e),([e,t])=>[e,t],()=>G(kl(e),([e,t])=>[e,t],()=>G(Al(e),([e,t])=>[e,t],()=>G(jl(e),([e,t])=>[e,t],()=>G(Ml(e),([e,t])=>[e,t],()=>G(Nl(e),([e,t])=>[e,t],()=>G(Pl(e),([e,t])=>[e,t],()=>G(Fl(e),([e,t])=>[e,t],()=>G(Il(e),([e,t])=>[e,t],()=>G(Ll(e),([e,t])=>[e,t],()=>[])))))))))))))),([e,t])=>[ho(e),t]),zl=e=>G(G(W("${",e),([e,t])=>G(lu(t),([t,n])=>G(W(`}`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[go(e),t]),Bl=e=>G(nl(["${","`"],e),([e,t])=>[_o(e),t]),Vl=e=>G(G(G(Bl(e),([e,t])=>G(zl(t),([t,n])=>G(Vl(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>G(G(Bl(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G(G(Bl(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[]))),([e,t])=>[vo(e),t]),Hl=e=>G(G(W("`",e),([e,t])=>G(Vl(t),([t,n])=>G(W("`",n),([n,r])=>[[e,t,n],r]))),([e,t])=>[yo(e),t]),Ul=e=>G(Hl(e),([e,t])=>[bo(e),t]),Wl=e=>G(Ic(e),([e,t])=>[xo(e),t]),Gl=e=>G(G(W(`true`,e),([e,t])=>[e,t],()=>G(W(`false`,e),([e,t])=>[e,t],()=>[])),([e,t])=>[So(e),t]),Kl=e=>G($c(e),([e,t])=>[Co(e),t]),ql=e=>G(ll([`'`,`"`],e),([e,t])=>[wo(e),t]),Jl=e=>G(G(Wl(e),([e,t])=>[e,t],()=>G(Gl(e),([e,t])=>[e,t],()=>G(Kl(e),([e,t])=>[e,t],()=>G(ql(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[To(e),t]),Yl=e=>G(G(G(W(`keyof`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Eo(e),t]),Xl=(e,t=[])=>G(G(G(W(`[`,e),([e,t])=>G(lu(t),([t,n])=>G(W(`]`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>G(G(W(`[`,e),([e,t])=>G(W(`]`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>[])),([e,n])=>Xl(n,[...t,e]),()=>[t,e]),Zl=e=>G(Xl(e),([e,t])=>[Do(e),t]),Ql=e=>G(G(G(W(`extends`,e),([e,t])=>G(lu(t),([t,n])=>G(W(`?`,n),([n,r])=>G(lu(r),([r,i])=>G(W(`:`,i),([i,a])=>G(lu(a),([a,o])=>[[e,t,n,r,i,a],o])))))),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Oo(e),t]),$l=e=>G(G(G(W(`(`,e),([e,t])=>G(lu(t),([t,n])=>G(W(`)`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>G(Rl(e),([e,t])=>[e,t],()=>G(Su(e),([e,t])=>[e,t],()=>G(ju(e),([e,t])=>[e,t],()=>G(Ul(e),([e,t])=>[e,t],()=>G(Jl(e),([e,t])=>[e,t],()=>G(Vu(e),([e,t])=>[e,t],()=>G(Bu(e),([e,t])=>[e,t],()=>G(Gu(e),([e,t])=>[e,t],()=>G(qu(e),([e,t])=>[e,t],()=>G(Sl(e),([e,t])=>[e,t],()=>G(Ku(e),([e,t])=>[e,t],()=>[])))))))))))),([e,t])=>[ko(e),t]),eu=e=>G(G(Yl(e),([e,t])=>G($l(t),([t,n])=>G(Zl(n),([n,r])=>G(Ql(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[Mo(e),t]),tu=e=>G(G(G(W(`&`,e),([e,t])=>G(eu(t),([t,n])=>G(tu(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Po(e),t]),nu=e=>G(G(eu(e),([e,t])=>G(tu(t),([t,n])=>[[e,t],n])),([e,t])=>[Fo(e),t]),ru=e=>G(G(G(W(`|`,e),([e,t])=>G(nu(t),([t,n])=>G(ru(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Io(e),t]),iu=e=>G(G(nu(e),([e,t])=>G(ru(t),([t,n])=>[[e,t],n])),([e,t])=>[Lo(e),t]),au=e=>G(G(W(`readonly`,e),([e,t])=>G(iu(t),([t,n])=>[[e,t],n])),([e,t])=>[Ro(e),t]),ou=e=>G(G(W(`|`,e),([e,t])=>G(iu(t),([t,n])=>[[e,t],n])),([e,t])=>[zo(e),t]),su=e=>G(G(vl(e),([e,t])=>G(W(`=`,t),([t,n])=>G(lu(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Bo(e),t]),cu=e=>G(G(G(W(`infer`,e),([e,t])=>G(Uc(t),([t,n])=>G(W(`extends`,n),([n,r])=>G(iu(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[e,t],()=>G(G(W(`infer`,e),([e,t])=>G(Uc(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>[])),([e,t])=>[Vo(e),t]),lu=e=>G(G(cu(e),([e,t])=>[e,t],()=>G(ou(e),([e,t])=>[e,t],()=>G(au(e),([e,t])=>[e,t],()=>G(iu(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[Ho(e),t]),uu=e=>G($c(e),([e,t])=>[Uo(e),t]),du=e=>G(Uc(e),([e,t])=>[Wo(e),t]),fu=e=>G(ll([`'`,`"`],e),([e,t])=>[Go(e),t]),pu=e=>G(G(W(`[`,e),([e,t])=>G(Uc(t),([t,n])=>G(W(`:`,n),([n,r])=>G(G(kl(r),([e,t])=>[e,t],()=>G(Tl(r),([e,t])=>[e,t],()=>G(wl(r),([e,t])=>[e,t],()=>G(Fl(r),([e,t])=>[e,t],()=>[])))),([r,i])=>G(W(`]`,i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[Ko(e),t]),mu=e=>G(G(uu(e),([e,t])=>[e,t],()=>G(du(e),([e,t])=>[e,t],()=>G(fu(e),([e,t])=>[e,t],()=>G(pu(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[qo(e),t]),hu=e=>G(G(G(W(`readonly`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Jo(e),t]),gu=e=>G(G(G(W(`?`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Yo(e),t]),_u=e=>G(G(hu(e),([e,t])=>G(mu(t),([t,n])=>G(gu(n),([n,r])=>G(W(`:`,r),([r,i])=>G(lu(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[Xo(e),t]),vu=e=>G(G(G(W(`,`,e),([e,t])=>G(W(`
5
+ `,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>G(G(W(`;`,e),([e,t])=>G(W(`
6
+ `,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>G(G(W(`,`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G(G(W(`;`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G(G(W(`
7
+ `,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[]))))),([e,t])=>[Zo(e),t]),yu=(e,t=[])=>G(G(_u(e),([e,t])=>G(vu(t),([t,n])=>[[e,t],n])),([e,n])=>yu(n,[...t,e]),()=>[t,e]),bu=e=>G(G(yu(e),([e,t])=>G(G(G(_u(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[Qo(e),t]),xu=e=>G(G(W(`{`,e),([e,t])=>G(bu(t),([t,n])=>G(W(`}`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[es(e),t]),Su=e=>G(xu(e),([e,t])=>[ts(e),t]),Cu=e=>G(G(G(Uc(e),([e,t])=>G(W(`?`,t),([t,n])=>G(W(`:`,n),([n,r])=>G(W(`readonly`,r),([r,i])=>G(lu(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[e,t],()=>G(G(Uc(e),([e,t])=>G(W(`:`,t),([t,n])=>G(W(`readonly`,n),([n,r])=>G(lu(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[e,t],()=>G(G(Uc(e),([e,t])=>G(W(`?`,t),([t,n])=>G(W(`:`,n),([n,r])=>G(lu(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[e,t],()=>G(G(Uc(e),([e,t])=>G(W(`:`,t),([t,n])=>G(lu(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>[])))),([e,t])=>[ns(e),t]),wu=e=>G(G(W(`readonly`,e),([e,t])=>G(lu(t),([t,n])=>G(W(`?`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[rs(e),t]),Tu=e=>G(G(W(`readonly`,e),([e,t])=>G(lu(t),([t,n])=>[[e,t],n])),([e,t])=>[is(e),t]),Eu=e=>G(G(lu(e),([e,t])=>G(W(`?`,t),([t,n])=>[[e,t],n])),([e,t])=>[as(e),t]),Du=e=>G(G(Cu(e),([e,t])=>[e,t],()=>G(wu(e),([e,t])=>[e,t],()=>G(Tu(e),([e,t])=>[e,t],()=>G(Eu(e),([e,t])=>[e,t],()=>G(lu(e),([e,t])=>[e,t],()=>[]))))),([e,t])=>[os(e),t]),Ou=e=>G(G(G(W(`...`,e),([e,t])=>G(Du(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>G(G(Du(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[])),([e,t])=>[ss(e),t]),ku=(e,t=[])=>G(G(Ou(e),([e,t])=>G(W(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>ku(n,[...t,e]),()=>[t,e]),Au=e=>G(G(ku(e),([e,t])=>G(G(G(Ou(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[cs(e),t]),ju=e=>G(G(W(`[`,e),([e,t])=>G(Au(t),([t,n])=>G(W(`]`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[ls(e),t]),Mu=e=>G(G(Uc(e),([e,t])=>G(W(`?`,t),([t,n])=>G(W(`:`,n),([n,r])=>G(W(`readonly`,r),([r,i])=>G(lu(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[us(e),t]),Nu=e=>G(G(Uc(e),([e,t])=>G(W(`:`,t),([t,n])=>G(W(`readonly`,n),([n,r])=>G(lu(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[ds(e),t]),Pu=e=>G(G(Uc(e),([e,t])=>G(W(`?`,t),([t,n])=>G(W(`:`,n),([n,r])=>G(lu(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[fs(e),t]),Fu=e=>G(G(Uc(e),([e,t])=>G(W(`:`,t),([t,n])=>G(lu(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[ps(e),t]),Iu=e=>G(G(Mu(e),([e,t])=>[e,t],()=>G(Nu(e),([e,t])=>[e,t],()=>G(Pu(e),([e,t])=>[e,t],()=>G(Fu(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[ms(e),t]),Lu=e=>G(G(G(W(`...`,e),([e,t])=>G(Iu(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>G(G(Iu(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[])),([e,t])=>[hs(e),t]),Ru=(e,t=[])=>G(G(Lu(e),([e,t])=>G(W(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>Ru(n,[...t,e]),()=>[t,e]),zu=e=>G(G(Ru(e),([e,t])=>G(G(G(Lu(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[gs(e),t]),Bu=e=>G(G(W(`(`,e),([e,t])=>G(zu(t),([t,n])=>G(W(`)`,n),([n,r])=>G(W(`=>`,r),([r,i])=>G(lu(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[_s(e),t]),Vu=e=>G(G(W(`new`,e),([e,t])=>G(W(`(`,t),([t,n])=>G(zu(n),([n,r])=>G(W(`)`,r),([r,i])=>G(W(`=>`,i),([i,a])=>G(lu(a),([a,o])=>[[e,t,n,r,i,a],o])))))),([e,t])=>[vs(e),t]),Hu=e=>G(G(G(W(`+`,e),([e,t])=>G(W(`readonly`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>G(G(W(`-`,e),([e,t])=>G(W(`readonly`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>G(G(W(`readonly`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])))),([e,t])=>[bs(e),t]),Uu=e=>G(G(G(W(`+`,e),([e,t])=>G(W(`?`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>G(G(W(`-`,e),([e,t])=>G(W(`?`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>G(G(W(`?`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])))),([e,t])=>[Ss(e),t]),Wu=e=>G(G(G(W(`as`,e),([e,t])=>G(lu(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Cs(e),t]),Gu=e=>G(G(W(`{`,e),([e,t])=>G(Hu(t),([t,n])=>G(W(`[`,n),([n,r])=>G(Uc(r),([r,i])=>G(W(`in`,i),([i,a])=>G(lu(a),([a,o])=>G(Wu(o),([o,s])=>G(W(`]`,s),([s,c])=>G(Uu(c),([c,l])=>G(W(`:`,l),([l,u])=>G(lu(u),([u,d])=>G(Cl(d),([d,f])=>G(W(`}`,f),([f,p])=>[[e,t,n,r,i,a,o,s,c,l,u,d,f],p]))))))))))))),([e,t])=>[ws(e),t]),Ku=e=>G(Uc(e),([e,t])=>[Ts(e),t]),qu=e=>G(G(W(`Options`,e),([e,t])=>G(W(`<`,t),([t,n])=>G(lu(n),([n,r])=>G(W(`,`,r),([r,i])=>G(td(i),([i,a])=>G(W(`>`,a),([a,o])=>[[e,t,n,r,i,a],o])))))),([e,t])=>[Es(e),t]),Ju=e=>G($c(e),([e,t])=>[Ds(e),t]),Yu=e=>G(G(W(`true`,e),([e,t])=>[e,t],()=>G(W(`false`,e),([e,t])=>[e,t],()=>[])),([e,t])=>[Os(e),t]),Xu=e=>G(ll([`"`,`'`],e),([e,t])=>[ks(e),t]),Zu=e=>G(W(`null`,e),([e,t])=>[As(e),t]),Qu=e=>G(G(mu(e),([e,t])=>G(W(`:`,t),([t,n])=>G(ad(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[js(e),t]),$u=(e,t=[])=>G(G(Qu(e),([e,t])=>G(vu(t),([t,n])=>[[e,t],n])),([e,n])=>$u(n,[...t,e]),()=>[t,e]),ed=e=>G(G($u(e),([e,t])=>G(G(G(Qu(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[Ms(e),t]),td=e=>G(G(W(`{`,e),([e,t])=>G(ed(t),([t,n])=>G(W(`}`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Ps(e),t]),nd=(e,t=[])=>G(G(ad(e),([e,t])=>G(W(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>nd(n,[...t,e]),()=>[t,e]),rd=e=>G(G(nd(e),([e,t])=>G(G(G(ad(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[Fs(e),t]),id=e=>G(G(W(`[`,e),([e,t])=>G(rd(t),([t,n])=>G(W(`]`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Is(e),t]),ad=e=>G(G(Ju(e),([e,t])=>[e,t],()=>G(Yu(e),([e,t])=>[e,t],()=>G(Xu(e),([e,t])=>[e,t],()=>G(Zu(e),([e,t])=>[e,t],()=>G(td(e),([e,t])=>[e,t],()=>G(id(e),([e,t])=>[e,t],()=>[])))))),([e,t])=>[Ls(e),t]),od=e=>G(W(`-?(?:0|[1-9][0-9]*)n`,e),([e,t])=>[Rs(e),t]),sd=e=>G(W(`.*`,e),([e,t])=>[zs(e),t]),cd=e=>G(W(`-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?`,e),([e,t])=>[Bs(e),t]),ld=e=>G(W(`-?(?:0|[1-9][0-9]*)`,e),([e,t])=>[Vs(e),t]),ud=e=>G(W(`(?!)`,e),([e,t])=>[Hs(e),t]),dd=e=>G(ul([`-?(?:0|[1-9][0-9]*)n`,`.*`,`-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?`,`-?(?:0|[1-9][0-9]*)`,`(?!)`,`(`,`)`,`$`,`|`],e),([e,t])=>[Us(e),t]),fd=e=>G(G(od(e),([e,t])=>[e,t],()=>G(sd(e),([e,t])=>[e,t],()=>G(cd(e),([e,t])=>[e,t],()=>G(ld(e),([e,t])=>[e,t],()=>G(ud(e),([e,t])=>[e,t],()=>G(pd(e),([e,t])=>[e,t],()=>G(dd(e),([e,t])=>[e,t],()=>[]))))))),([e,t])=>[Ws(e),t]),pd=e=>G(G(W(`(`,e),([e,t])=>G(gd(t),([t,n])=>G(W(`)`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Gs(e),t]),md=e=>G(G(G(hd(e),([e,t])=>G(W(`|`,t),([t,n])=>G(md(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>G(G(hd(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[]))),([e,t])=>[Ks(e),t]),hd=e=>G(G(fd(e),([e,t])=>G(gd(t),([t,n])=>[[e,t],n])),([e,t])=>[qs(e),t]),gd=e=>G(G(md(e),([e,t])=>[e,t],()=>G(hd(e),([e,t])=>[e,t],()=>[])),([e,t])=>[Js(e),t]),_d=e=>G(G(W(`^`,e),([e,t])=>G(gd(t),([t,n])=>G(W(`$`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Ys(e),t]),vd=(e,t=[])=>G(G(lu(e),([e,t])=>G(W(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>vd(n,[...t,e]),()=>[t,e]),yd=e=>G(G(vd(e),([e,t])=>G(G(G(lu(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[Xs(e),t]),bd=e=>G(G(G(W(`extends`,e),([e,t])=>G(yd(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Zs(e),t]),xd=e=>G(G(W(`interface`,e),([e,t])=>G(Uc(t),([t,n])=>G(vl(n),([n,r])=>G(bd(r),([r,i])=>G(xu(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[Qs(e),t]),Sd=e=>G(G(W(`interface`,e),([e,t])=>G(Uc(t),([t,n])=>G(bd(n),([n,r])=>G(xu(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[$s(e),t]),Cd=e=>G(G(W(`type`,e),([e,t])=>G(Uc(t),([t,n])=>G(vl(n),([n,r])=>G(W(`=`,r),([r,i])=>G(lu(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[ec(e),t]),wd=e=>G(G(W(`type`,e),([e,t])=>G(Uc(t),([t,n])=>G(W(`=`,n),([n,r])=>G(lu(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[tc(e),t]),Td=e=>G(G(G(W(`export`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[nc(e),t]),Ed=e=>G(G(G(W(`;`,e),([e,t])=>G(W(`
8
+ `,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>G(G(W(`;`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G(G(W(`
9
+ `,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[]))),([e,t])=>[rc(e),t]),Dd=(e,t=[])=>G(G(kd(e),([e,t])=>G(Ed(t),([t,n])=>[[e,t],n])),([e,n])=>Dd(n,[...t,e]),()=>[t,e]),Od=e=>G(G(Dd(e),([e,t])=>G(G(G(kd(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[ic(e),t]),kd=e=>G(G(Td(e),([e,t])=>G(G(xd(t),([e,t])=>[e,t],()=>G(Sd(t),([e,t])=>[e,t],()=>G(Cd(t),([e,t])=>[e,t],()=>G(wd(t),([e,t])=>[e,t],()=>[])))),([t,n])=>G(Cl(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[ac(e),t]),Ad=e=>G(G(kd(e),([e,t])=>G(Od(t),([t,n])=>[[e,t],n])),([e,t])=>[oc(e),t]),jd=e=>G(G(Ad(e),([e,t])=>[e,t],()=>G(su(e),([e,t])=>[e,t],()=>G(lu(e),([e,t])=>[e,t],()=>[]))),([e,t])=>[sc(e),t]);function Md(e){let t=Hl(`\`${e}\``);return H(t.length,2)?t[0]:Sr()}function Nd(e,t={}){return gn(`TemplateLiteral`,[e],t)}function Pd(e){return _y({},Nd(e,{}))}function Fd(e){return Pd(Md(e))}function Id(e,t={}){return an(B(e)?Fd(e):Pd(e),{},t)}function Ld(e){return on(e,`TemplateLiteral`)}var Rd=s({ExtendsFalse:()=>Ud,ExtendsTrue:()=>Vd,ExtendsUnion:()=>zd,IsExtendsFalse:()=>Wd,IsExtendsTrue:()=>Hd,IsExtendsTrueLike:()=>Gd,IsExtendsUnion:()=>Bd,Match:()=>Kd,TakeLeft:()=>qd});function zd(e){return nn({"~kind":`ExtendsUnion`},{inferred:e})}function Bd(e){return be(e)&&U(e,`~kind`)&&U(e,`inferred`)&&H(e[`~kind`],`ExtendsUnion`)&&be(e.inferred)}function Vd(e){return nn({"~kind":`ExtendsTrue`},{inferred:e})}function Hd(e){return be(e)&&U(e,`~kind`)&&U(e,`inferred`)&&H(e[`~kind`],`ExtendsTrue`)&&be(e.inferred)}function Ud(){return nn({"~kind":`ExtendsFalse`},{})}function Wd(e){return be(e)&&U(e,`~kind`)&&H(e[`~kind`],`ExtendsFalse`)}function Gd(e){return Bd(e)||Hd(e)}function Kd(e,t,n){return Gd(e)?t(e.inferred):n()}function qd(e,t,n){return H(e.length,0)?n():t(e[0],e.slice(1))}function Jd(e){return B(e)||ve(e)?Ai(e):_e(e)?Li():Zn()}function Yd(e){return e.map(e=>Jd(e))}function Xd(e){return ar(Yd(e))}function Zd(e){return Xd(e.enum)}function Qd(e,t,n,r){return Kd(fp(e,n,r),r=>Vd(P(P(e,r),{[t]:n})),()=>Ud())}function $d(e,t){return Vd(e)}function ef(e,t,n){return fp(e,t,Xd(n))}function tf(e,t,n){return qd(n,(n,r)=>Kd(fp(e,t,n),e=>tf(e,t,r),()=>Ud()),()=>Vd(e))}function nf(e,t,n){return fp(e,t,pa(n))}function rf(e,t,n){return qd(n,(n,r)=>Kd(fp(e,t,n),e=>Vd(e),()=>rf(e,t,r)),()=>Ud())}function af(e,t,n){return Yn(n)?$d(e,t):vr(n)?ef(e,t,n.enum):mr(n)?Qd(e,n.name,t,n.extends):br(n)?tf(e,t,n.allOf):Ld(n)?nf(e,t,n.pattern):or(n)?rf(e,t,n.anyOf):lr(n)?Vd(e):Ud()}function of(e,t,n){return mr(n)?af(e,t,n):Yn(n)||lr(n)?Vd(e):zd(e)}function sf(e,t){let n=bn(e),r=bn(t);return n&&r||!n&&r?!0:!(n&&!r)}function cf(e,t,n,r){return An(r)?sf(t,r)?fp(e,n,r.items):Ud():af(e,t,r)}function lf(e,t,n){return Nn(n)?fp(e,t,n.iteratorItems):af(e,Mn(t),n)}function uf(e,t,n){return _i(n)?Vd(e):af(e,t,n)}function df(e,t,n){return yi(n)?Vd(e):af(e,t,n)}function ff(e,t,n,r,i){let a=mr(r)?t:r,o=mr(r)?r:t,s=wn(t),c=wn(r);return!s&&c?Ud():Kd(fp(e,a,o),e=>hf(e,n,i),()=>Ud())}function pf(e,t,n,r){return qd(r,(r,i)=>ff(e,t,n,r,i),()=>wn(t)?Vd(e):Ud())}function mf(e,t,n){return qd(t,(t,r)=>pf(e,t,r,n),()=>Vd(e))}function hf(e,t,n){return mf(e,t,n)}function gf(e,t,n){return Ra(n)?Vd(e):fp(e,t,n)}function _f(e,t,n,r){return Yn(r)||lr(r)?Vd(e):zn(r)?Kd(hf(e,t,r.parameters),e=>gf(e,n,r.instanceType),()=>Ud()):Ud()}function vf(e,t,n){return fp(e,Zd(t),n)}function yf(e,t,n,r){return Yn(r)||lr(r)?Vd(e):Hn(r)?Kd(hf(e,t,r.parameters),e=>gf(e,n,r.returnType),()=>Ud()):Ud()}function bf(e,t,n){return wi(n)||Vi(n)?Vd(e):af(e,t,n)}function xf(e,t,n){return fp(e,Xp(t),n)}function Sf(e,t,n){return Ei(n)?fp(e,t,n.iteratorItems):af(e,Ti(t),n)}function Cf(e,t,n){return t===n?Vd(e):Ud()}function wf(e,t,n){return Ii(n)?Cf(e,t,n.const):_i(n)?Vd(e):af(e,Ai(t),n)}function Tf(e,t,n){return Ii(n)?Cf(e,t,n.const):yi(n)?Vd(e):af(e,Ai(t),n)}function Ef(e,t,n){return Ii(n)?Cf(e,t,n.const):Vi(n)?Vd(e):af(e,Ai(t),n)}function Df(e,t,n){return Ii(n)?Cf(e,t,n.const):Xi(n)?Vd(e):af(e,Ai(t),n)}function Of(e,t,n){return z(t.const)?wf(e,t.const,n):fe(t.const)?Tf(e,t.const,n):ve(t.const)?Ef(e,t.const,n):B(t.const)?Df(e,t.const,n):Sr()}function kf(e,t,n){return mr(n)?af(e,t,n):Vd(e)}function Af(e,t,n){return Ri(n)?Vd(e):af(e,t,n)}function jf(e,t,n){return Vi(n)?Vd(e):af(e,t,n)}function Mf(e,t,n){return wn(t)?wn(n)?Vd(e):Ud():Vd(e)}function Nf(e,t,n){return mr(n)&&Qn(n.extends)?Ud():Kd(fp(e,t,n),e=>Mf(e,t,n),()=>Ud())}function Pf(e,t){return e.reduce((e,n)=>n in t&&Gd(t[n])?{...e,...t[n].inferred}:Sr(),{})}function Ff(e,t,n){let r={};for(let i of Ie(n))r[i]=i in t?Nf({},t[i],n[i]):wn(n[i])?mr(n[i])?Vd(P(e,{[n[i].name]:n[i].extends})):Vd(e):Ud();let i=Re(r).every(e=>Gd(e)),a=i?Pf(Ie(r),r):{};return i?Vd(a):Ud()}function If(e,t,n){let r=Ff(e,t,n);return Gd(r)?Vd(P(e,r.inferred)):Ud()}function Lf(e,t,n){return If(e,t,n)}function Rf(e,t,n){return rr(n)?Lf(e,t,n.properties):af(e,nr(t),n)}function zf(e,t,n){return qi(n)?fp(e,t,n.item):af(e,Ki(t),n)}function Bf(e,t,n){return Xi(n)?Vd(e):af(e,t,n)}function Vf(e,t,n){return Ui(n)?Vd(e):af(e,t,n)}function Hf(e,t,n){return fp(e,pa(t),n)}function Uf(e,t){return nn({"~kind":`Inferrable`},{name:e,type:t},{})}function Wf(e){return be(e)&&U(e,`~kind`)&&U(e,`name`)&&U(e,`type`)&&H(e[`~kind`],`Inferrable`)&&B(e.name)&&be(e.type)}function Gf(e){return Da(e)?mr(e.items)?An(e.items.extends)?Uf(e.items.name,e.items.extends.items):lr(e.items.extends)?Uf(e.items.name,e.items.extends):void 0:Sr():void 0}function Kf(e){return mr(e)?Uf(e.name,e.extends):void 0}function qf(e,t,n=[]){return qd(e,(e,r)=>Kd(fp({},e,t),()=>qf(r,t,[...n,e]),()=>void 0),()=>n)}function Jf(e,t,n,r){let i=qf(n,r);return R(i)?Vd(P(e,{[t]:Aa(i)})):Ud()}function Yf(e,t,n,r){let i=qf(n,r);return R(i)?Vd(P(e,{[t]:ar(i)})):Ud()}function Xf(e){return[...e].reverse()}function Zf(e,t){return t?Xf(e):e}function Qf(e){let t=e.length>0?e[0]:void 0;return sn(sn(t)?Gf(t):void 0)}function $f(e,t,n,r,i,a){return Kd(fp(e,n,i),e=>np(e,t,r,a),()=>Ud())}function ep(e,t,n,r,i){let a=Gf(r);return Wf(a)?Jf(e,a.name,Zf(n,t),a.type):qd(n,(n,a)=>$f(e,t,n,a,r,i),()=>Ud())}function tp(e,t,n,r){return qd(r,(r,i)=>ep(e,t,n,r,i),()=>H(n.length,0)?Vd(e):Ud())}function np(e,t,n,r){return tp(e,t,n,r)}function rp(e,t,n){let r=py(e,{callstack:[]},n),i=Qf(r);return np(e,i,Zf(t,i),Zf(r,i))}function ip(e,t,n){let r=Kf(n);return Wf(r)?Yf(e,r.name,t,r.type):qd(t,(t,r)=>Kd(fp(e,t,n),e=>ip(e,r,n),()=>Ud()),()=>Vd(e))}function ap(e,t,n){let r=py(e,{callstack:[]},t);return ja(n)?rp(e,r,n.items):An(n)?ip(e,r,n.items):af(e,Aa(r),n)}function op(e,t,n){return Ra(n)||Pa(n)?Vd(e):af(e,t,n)}function sp(e,t,n){return qd(n,(n,r)=>Kd(fp(e,t,n),e=>Vd(e),()=>sp(e,t,r)),()=>Ud())}function cp(e,t,n){return qd(t,(t,r)=>Kd(sp(e,t,n),e=>cp(e,r,n),()=>Ud()),()=>Vd(e))}function lp(e,t,n){let r=Kf(n);return Wf(r)?Yf(e,r.name,t,r.type):or(n)?cp(e,t,n.anyOf):cp(e,t,[n])}function up(e,t,n){return mr(n)?af(e,t,n):Yn(n)||lr(n)?Vd(e):Ud()}function dp(e,t,n){return Ra(n)?Vd(e):af(e,t,n)}function fp(e,t,n){return Yn(t)?of(e,t,n):An(t)?cf(e,t,t.items,n):Nn(t)?lf(e,t.iteratorItems,n):_i(t)?uf(e,t,n):yi(t)?df(e,t,n):zn(t)?_f(e,t.parameters,t.instanceType,n):vr(t)?vf(e,t,n):Hn(t)?yf(e,t.parameters,t.returnType,n):wi(t)?bf(e,t,n):br(t)?xf(e,t.allOf,n):Ei(t)?Sf(e,t.iteratorItems,n):Ii(t)?Of(e,t,n):Qn(t)?kf(e,t,n):Ri(t)?Af(e,t,n):Vi(t)?jf(e,t,n):rr(t)?Rf(e,t.properties,n):qi(t)?zf(e,t.item,n):Xi(t)?Bf(e,t,n):Ui(t)?Vf(e,t,n):Ld(t)?Hf(e,t.pattern,n):ja(t)?ap(e,t.items,n):Pa(t)?op(e,t,n):or(t)?lp(e,t.anyOf,n):lr(t)?up(e,t,n):Ra(t)?dp(e,t,n):Ud()}function pp(e,t,n={}){return gn(`Interface`,[e,t],n)}function mp(e){return sn(e)&&U(e,`action`)&&H(e.action,`Interface`)}function hp(e,t,n={}){return _y({},pp(e,t,n))}function gp(e,t,n){return e.includes(n)?!0:yp([...e,n],t,t[n])}function _p(e,t,n){return vp(e,t,tr(n))}function vp(e,t,n){let[r,...i]=n;return sn(r)?yp(e,t,r)?!0:vp(e,t,i):!1}function yp(e,t,n){return Gn(n)?gp(e,t,n.$ref):An(n)?yp(e,t,n.items):Nn(n)?yp(e,t,n.iteratorItems):zn(n)?vp(e,t,[...n.parameters,n.instanceType]):Hn(n)?vp(e,t,[...n.parameters,n.returnType]):mp(n)?_p(e,t,n.parameters[1]):br(n)?vp(e,t,n.allOf):Ei(n)?yp(e,t,n.iteratorItems):rr(n)?_p(e,t,n.properties):qi(n)?yp(e,t,n.item):or(n)?vp(e,t,n.anyOf):ja(n)?vp(e,t,n.items):Ta(n)?yp(e,t,wa(n)):!1}function bp(e,t,n){return yp(e,t,n)}function xp(e,t){return t.reduce((t,n)=>n in e?bp([n],e,e[n])?[...t,n]:t:Sr(),[])}function Sp(e){return xp(e,er(e))}function Cp(e,t,n){return n.includes(t)?n:t in e?Ep(e,e[t],[...n,t]):Sr()}function wp(e,t,n){return Tp(e,tr(t),n)}function Tp(e,t,n){return t.reduce((t,n)=>Ep(e,n,t),n)}function Ep(e,t,n){return Gn(t)?Cp(e,t.$ref,n):An(t)?Ep(e,t.items,n):Nn(t)?Ep(e,t.iteratorItems,n):zn(t)?Tp(e,[...t.parameters,t.instanceType],n):Hn(t)?Tp(e,[...t.parameters,t.returnType],n):mp(t)?wp(e,t.parameters[1],n):br(t)?Tp(e,t.allOf,n):Ei(t)?Ep(e,t.iteratorItems,n):rr(t)?wp(e,t.properties,n):qi(t)?Ep(e,t.item,n):or(t)?Tp(e,t.anyOf,n):ja(t)?Tp(e,t.items,n):Ta(t)?Ep(e,wa(t),n):n}function Dp(e,t,n){return Ep(e,n,[t])}function Op(e){return Jn()}function kp(e){return Ie(e).reduce((t,n)=>({...t,[n]:jp(e[n])}),{})}function Ap(e){return e.reduce((e,t)=>[...e,jp(t)],[])}function jp(e){return Gn(e)?Op(e.$ref):An(e)?kn(jp(e.items),jn(e)):Nn(e)?Mn(jp(e.iteratorItems)):zn(e)?Rn(Ap(e.parameters),jp(e.instanceType)):Hn(e)?Vn(Ap(e.parameters),jp(e.returnType)):br(e)?yr(Ap(e.allOf)):Ei(e)?Ti(jp(e.iteratorItems)):rr(e)?nr(kp(e.properties)):qi(e)?Ki(jp(e.item)):Ta(e)?ba(Ca(e),jp(wa(e))):or(e)?ar(Ap(e.anyOf)):ja(e)?Aa(Ap(e.items)):e}function Mp(e,t){return t in e?jp(e[t]):cr()}function Np(e){return Mp(e.$defs,e.$ref)}function Pp(e){return e.reduceRight((e,t,n)=>({[n]:t,...e}),{})}function Fp(e){return nr(Pp(e.items))}function Ip(e,t){return On(e)?!!On(t):!1}function Lp(e,t){return wn(e)?!!wn(t):!1}function Rp(e,t){let n=Ip(e,t),r=Lp(e,t),i=Tn(xn(Xp([e,t])));return n&&r?En(Sn(i)):n&&!r?En(i):!n&&r?Sn(i):i}function zp(e,t,n){return n in e?n in t?Rp(e[n],t[n]):e[n]:n in t?t[n]:Zn()}function Bp(e,t){return[...new Set([...Ie(t),...Ie(e)])].reduce((n,r)=>({...n,[r]:zp(e,t,r)}),{})}function Vp(e){return rr(e)?e.properties:ja(e)?Pp(e.items):Sr()}function Hp(e,t){return nr(Bp(Vp(e),Vp(t)))}function Up(e,t){let n=dm(e,t);return H(n,`left-inside`)?e:H(n,`right-inside`)||H(n,`equal`)?t:Zn()}function Wp(e){return rr(e)||ja(e)}function Gp(e,t){let n=or(e),r=or(t);return n||r}function Kp(e,t){let n=Qp(e),r=Qp(t),i=Gp(n,r),a=Wp(n),o=Wp(r);return i?Xp([n,r]):a&&o?Hp(n,r):a&&!o?n:!a&&o?r:Up(n,r)}function qp(e,t,n=[]){let[r,...i]=t;return V(r)?n.length===0?[e]:n:qp(e,i,[...n,Kp(e,r)])}function Jp(e,t,n=[]){let[r,...i]=e;return sn(r)?Jp(i,t,[...n,...Yp([r],t)]):n}function Yp(e,t=[]){let[n,...r]=e;return sn(n)?or(n)?Yp(r,Jp(n.anyOf,t)):Yp(r,qp(n,t)):t}function Xp(e){return vm(Yp(e))}function Zp(e){return vm(e)}function Qp(e){return br(e)?Xp(e.allOf):or(e)?Zp(e.anyOf):e}function $p(e){return H(e.length,1)?e[0]:H(e.length,0)?Zn():ar(e)}function em(e,t,n){let r=my(e,{callstack:[]},t),i=fy({},{callstack:[]},n);return Xp([...r,nr(i)])}function tm(e,t){return Ie(e).filter(e=>t.includes(e)).reduce((t,n)=>{let r=e[n],i=mp(r)?em(e,r.parameters[0],r.parameters[1]):r;return{...t,[n]:i}},{})}function nm(e,t,n){return ur(tm(e,Dp(e,t,n)),t)}function rm(e,t){return t in e?Gn(e[t])?rm(e,e[t].$ref):e[t]:Zn()}function im(e,t){return rm(e,t)}function am(e){return dr(e)?Np(e):e}function om(e,t,n){return fp(e,am(t),am(n))}var sm=`equal`,cm=`disjoint`,lm=`left-inside`,um=`right-inside`;function dm(e,t){let n=[lr(e)?Ud():om({},e,t),lr(e)?Vd({}):om({},t,e)];return Gd(n[0])&&Gd(n[1])?sm:Gd(n[0])&&Wd(n[1])?lm:Wd(n[0])&&Gd(n[1])?um:cm}function fm(e){return or(e)?pm(e.anyOf):[e]}function pm(e){return e.reduce((e,t)=>[...e,...fm(t)],[])}function mm(e,t){return t.filter(t=>dm(e,t)!==`right-inside`)}function hm(e,t){return H(t.some(t=>{let n=dm(e,t);return H(n,`left-inside`)||H(n,`equal`)}),!1)}function gm(e,t){let n=Qp(e);return Yn(n)?[n]:hm(n,t)?[...mm(n,t),n]:t}function _m(e){return e.reduce((e,t)=>rr(t)?[...e,t]:Qn(t)?e:gm(t,e),[])}function vm(e){let t=pm(_m(e));return t.length===0?Zn():t.length===1?t[0]:ar(t)}function ym(e,t,n,r){return an(Qp(gy(e,t,n)),{},r)}function bm(e,t,n,r){return ym(e,t,n,r)}function xm(e,t=[]){return _n(e)&&H(e.action,`Conditional`)?Gn(e.parameters[0])?xm(e.parameters[2],xm(e.parameters[3],[...t,e.parameters[0].$ref])):xm(e.parameters[2],xm(e.parameters[3],t)):_n(e)&&H(e.action,`Mapped`)&&_n(e.parameters[1])&&H(e.parameters[1].action,`KeyOf`)&&Gn(e.parameters[1].parameters[0])?[...t,e.parameters[1].parameters[0].$ref]:t}function Sm(e,t){return e.reduce((e,n)=>[...e,t.includes(n.name)],[])}function Cm(e,t,n=[]){let[r,...i]=e,[a,...o]=t;return Se(e.length,0)&&Se(t.length,0)?Cm(i,o,[...n,[a,r]]):n}function wm(e){return or(e)?[...e.anyOf]:[e]}function Tm(e,t){return e.reduce((e,n)=>[...e,[...n,t]],[])}function Em(e,t){return t.reduce((t,n)=>[...t,...Tm(e,n)],[])}function Dm(e){return e.reduce((e,t)=>H(t[0],!0)?Em(e,wm(t[1])):Em(e,[t[1]]),[[]])}function Om(e,t,n){let r=Cm(t,Sm(e,xm(n)));return _n(n)&&H(n.action,`Conditional`)||_n(n)&&H(n.action,`Mapped`)?Dm(r):[t]}function km(){return[`(not-resolvable)`,Zn()]}function Am(){return[`(not-generic)`,Zn()]}function jm(e,t,n){return[e,Kn(t,n)]}function Mm(e,t,n){return t in e?Nm(e,t,e[t],n):km()}function Nm(e,t,n,r){return qn(n)?jm(t,n.parameters,n.expression):Gn(n)?Mm(e,n.$ref,r):Am()}function Pm(e,t,n){return Nm(e,`(anonymous)`,t,n)}function Fm(e,t,n){if(mr(t)||Jm(t)||Gd(om({},t,n)))return;let r={parameter:e,expect:n,actual:t};throw Error(`Argument for parameter ${e} does not satisfy constraint`,{cause:r})}function Im(e,t,n,r,i){let a=gy(e,t,i);return Fm(n,a,r),P(e,{[n]:a})}function Lm(e,t,n,r,i){let a=gy(e,t,n.extends),o=gy(e,t,n.equals),[s,...c]=i;return sn(s)?Rm(Im(e,t,n.name,a,s),t,r,c):Rm(Im(e,t,n.name,a,o),t,r,[])}function Rm(e,t,n,r){let[i,...a]=n;return sn(i)?Lm(e,t,i,a,r):e}function zm(e,t,n,r){return Rm(e,t,n,r)}function Bm(e){return Se(e.callstack.length,0)?e.callstack[e.callstack.length-1]:``}function Vm(e,t){return H(Bm(e),t)}function Hm(e,t,n,r,i,a){return gy(e,t,gy(zm(e,t,r,a),{callstack:[...t.callstack,n.$ref]},i))}function Um(e,t,n,r,i,a){return a.reduce((a,o)=>[...a,Hm(e,t,n,r,i,o)],[])}function Wm(e,t,n,r,i,a){let o=Um(e,t,n,r,i,Om(r,a,i));return H(o.length,1)?o[0]:Zp(o)}function Gm(e,t,n,r){let i=my(e,t,r),a=Pm(e,n,r),o=a[0],s=a[1];return qn(s)?Vm(t,o)?Km(Wn(o),i):Wm(e,t,Wn(o),s.parameters,s.expression,i):Km(n,i)}function Km(e,t){return nn({"~kind":`Call`},{target:e,arguments:t},{})}function qm(e,t){return Gm({},{callstack:[]},e,t)}function Jm(e){return on(e,`Call`)}function Ym(e){return qi(e)?Ym(e.item):e}function Xm(e,t,n,r){return an(Ym(gy(e,t,n)),{},r)}function Zm(e,t,n,r){return cy(e,[n])?Xm(e,t,n,r):vy(n,r)}function Qm(e,t){return e(t)}function $m(e,t){return B(t)?Ai(Qm(e,t)):Ai(t)}function eh(e,t){return nh(e,pa(t))}function th(e,t){return ar(t.map(t=>nh(e,t)))}function nh(e,t){return Ii(t)?$m(e,t.const):Ld(t)?eh(e,t.pattern):or(t)?th(e,t.anyOf):t}function rh(e,t={}){return gn(`Capitalize`,[e],t)}function ih(e,t={}){return _y({},rh(e,t))}function ah(e,t={}){return gn(`Lowercase`,[e],t)}function oh(e,t={}){return _y({},ah(e,t))}function sh(e,t={}){return gn(`Uncapitalize`,[e],t)}function ch(e,t={}){return _y({},sh(e,t))}function lh(e,t={}){return gn(`Uppercase`,[e],t)}function uh(e,t={}){return _y({},lh(e,t))}var dh=e=>e[0].toUpperCase()+e.slice(1),fh=e=>e.toLowerCase(),ph=e=>e[0].toLowerCase()+e.slice(1),mh=e=>e.toUpperCase();function hh(e,t,n,r){return an(nh(dh,gy(e,t,n)),{},r)}function gh(e,t,n,r){return cy(e,[n])?hh(e,t,n,r):rh(n,r)}function _h(e,t,n,r){return an(nh(fh,gy(e,t,n)),{},r)}function vh(e,t,n,r){return cy(e,[n])?_h(e,t,n,r):ah(n,r)}function yh(e,t,n,r){return an(nh(ph,gy(e,t,n)),{},r)}function bh(e,t,n,r){return cy(e,[n])?yh(e,t,n,r):sh(n,r)}function xh(e,t,n,r){return an(nh(mh,gy(e,t,n)),{},r)}function Sh(e,t,n,r){return cy(e,[n])?xh(e,t,n,r):lh(n,r)}function Ch(e,t,n,r,i={}){return gn(`Conditional`,[e,t,n,r],i)}function wh(e,t,n,r,i={}){return _y({},Ch(e,t,n,r,i))}function Th(e,t,n,r,i,a,o){let s=om(e,gy(e,t,n),gy(e,t,r));return an(Bd(s)?ar([gy(s.inferred,t,i),gy(e,t,a)]):Hd(s)?gy(s.inferred,t,i):gy(e,t,a),{},o)}function Eh(e,t,n,r,i,a,o){return cy(e,[n,r])?Th(e,t,n,r,i,a,o):Ch(n,r,i,a,o)}function Dh(e,t={}){return gn(`ConstructorParameters`,[e],t)}function Oh(e,t={}){return _y({},Dh(e,t))}function kh(e){return zn(e)?gy({},{callstack:[]},Aa(e.parameters)):Zn()}function Ah(e,t,n,r){return an(kh(gy(e,t,n)),{},r)}function jh(e,t,n,r){return cy(e,[n])?Ah(e,t,n,r):Dh(n,r)}function Mh(e,t,n={}){return gn(`Exclude`,[e,t],n)}function Nh(e,t,n={}){return _y({},Mh(e,t,n))}function Ph(e,t){return e.reduce((e,n)=>[...e,...Fh(n,t)],[])}function Fh(e,t){return Gd(om({},e,t))?[]:[e]}function Ih(e,t){return Zp(vr(e)?Ph(Yd(e.enum),t):or(e)?Ph(pm(e.anyOf),t):Fh(e,t))}function Lh(e,t,n,r,i){return an(Ih(gy(e,t,n),gy(e,t,r)),{},i)}function Rh(e,t,n,r,i){return cy(e,[n,r])?Lh(e,t,n,r,i):Mh(n,r,i)}function zh(e,t,n={}){return gn(`Extract`,[e,t],n)}function Bh(e,t,n={}){return _y({},zh(e,t,n))}function Vh(e,t){return e.reduce((e,n)=>[...e,...Hh(n,t)],[])}function Hh(e,t){return Gd(om({},e,t))?[e]:[]}function Uh(e,t){return Zp(vr(e)?Vh(Yd(e.enum),t):or(e)?Vh(pm(e.anyOf),t):Hh(e,t))}function Wh(e,t,n,r,i){return an(Uh(gy(e,t,n),gy(e,t,r)),{},i)}function Gh(e,t,n,r,i){return cy(e,[n,r])?Wh(e,t,n,r,i):zh(n,r,i)}var Kh=RegExp(`^(?:0|[1-9][0-9]*)$`);function qh(e){let t=`${e}`;return Kh.test(t)?parseInt(t):e}function Jh(e){return Ai(qh(e))}function Yh(e){return e.map(e=>Xh(e))}function Xh(e){return br(e)?yr(Yh(e.allOf)):or(e)?ar(Yh(e.anyOf)):Ii(e)?Jh(e.const):e}function Zh(e,t){return Gd(om({},Xh(t),Bi()))?e:Ii(t)&&H(t.const,`length`)?Bi():Zn()}function Qh(e,t){return ig(im(e,t))}function $h(e){return e.reduce((e,t)=>[...e,...ig(t)],[])}function eg(e){return $h(Yd(e))}function tg(e){return ig(Xp(e))}function ng(e){return[`${e}`]}function rg(e){return ig(pa(e))}function ig(e){return dr(e)?Qh(e.$defs,e.$ref):vr(e)?eg(e.enum):br(e)?tg(e.allOf):Ii(e)?ng(e.const):Ld(e)?rg(e.pattern):or(e)?$h(e.anyOf):[]}function ag(e){return ig(e)}function og(e,t){return t in e?[e[t]]:[]}function sg(e,t){return t.reduce((t,n)=>[...t,...og(e,n)],[])}function cg(e,t){return Zp(sg(e,ag(t)))}function lg(e){return Ai(qh(e))}function ug(e){return e.map(e=>dg(e))}function dg(e){return br(e)?yr(ug(e.allOf)):or(e)?ar(ug(e.anyOf)):Ii(e)?lg(e.const):e}function fg(e,t){return e.reduceRight((e,n,r)=>Gd(om({},Ai(r),t))?[n,...e]:e,[])}function pg(e,t){return $p(fg(e,dg(t)))}function mg(e){return $p(e)}function hg(e,t){return Ii(t)&&H(t.const,`length`)?Ai(e.length):Vi(t)||wi(t)?mg(e):pg(e,t)}function gg(e){return e.reduce((e,t)=>ji(t)?[...e,Ai(t)]:e,[])}function _g(e){return ar(gg(e))}function vg(e,t,n={}){return gn(`Index`,[e,t],n)}function yg(e,t,n={}){return _y({},vg(e,R(t)?_g(t):t,n))}function bg(e,t){return Og(im(e,t))}function xg(e,t){let n=Ie(e).filter(e=>!U(t,e)),r=Ie(t).filter(t=>!U(e,t)),i=Ie(e).filter(e=>U(t,e)),a=n.reduce((t,n)=>({...t,[n]:e[n]}),{}),o=r.reduce((e,n)=>({...e,[n]:t[n]}),{}),s=i.reduce((n,r)=>({...n,[r]:Xp([e[r],t[r]])}),{});return P(P(a,o),s)}function Sg(e){return e.reduce((e,t)=>xg(e,Og(t)),{})}function Cg(e){return e}function wg(e){return Og(Fp(Aa(e)))}function Tg(e,t){return Ie(e).filter(e=>e in t).reduce((n,r)=>({...n,[r]:Zp([e[r],t[r]])}),{})}function Eg(e,t){let[n,...r]=e;return sn(n)?Eg(r,Tg(t,Og(n))):t}function Dg(e){let[t,...n]=e;return sn(t)?Eg(n,Og(t)):Sr()}function Og(e){return dr(e)?bg(e.$defs,e.$ref):br(e)?Sg(e.allOf):or(e)?Dg(e.anyOf):ja(e)?wg(e.items):rr(e)?Cg(e.properties):{}}function kg(e){return nr(Og(e))}function Ag(e){return dr(e)||br(e)||or(e)?kg(e):e}function jg(e,t){let n=Ag(e);return An(n)?Zh(n.items,t):rr(n)?cg(n.properties,t):ja(n)?hg(n.items,t):Zn()}function Mg(e,t,n,r,i){return an(jg(gy(e,t,n),gy(e,t,r)),{},i)}function Ng(e,t,n,r,i){return cy(e,[n,r])?Mg(e,t,n,r,i):vg(n,r,i)}function Pg(e,t={}){return gn(`InstanceType`,[e],t)}function Fg(e,t={}){return _y({},Pg(e,t))}function Ig(e){return zn(e)?e.instanceType:Zn()}function Lg(e,t,n,r){return an(Ig(gy(e,t,n)),{},r)}function Rg(e,t,n,r={}){return cy(e,[n])?Lg(e,t,n,r):Pg(n,r)}function zg(e,t,n,r,i){let a=my(e,{callstack:[]},n),o=fy(e,{callstack:[]},r);return an(Xp([...a,nr(o)]),{},i)}function Bg(e,t,n,r,i){return cy(e,n)?zg(e,t,n,r,i):pp(n,r,i)}function Vg(e,t={}){return gn(`KeyOf`,[e],t)}function Hg(e,t={}){return _y({},Vg(e,t))}function Ug(){return ar([Bi(),Yi(),Hi()])}function Wg(e){return Bi()}function Gg(e){return e.reduce((e,t)=>ji(t)?[...e,Ai(qh(t))]:Sr(),[])}function Kg(e){return $p(Gg(Ie(e)))}function qg(e){return Ca(e)}function Jg(e){return $p(e.map((e,t)=>Ai(t)))}function Yg(e){return dr(e)||br(e)||or(e)?kg(e):e}function Xg(e){let t=Yg(e);return Yn(t)?Ug():An(t)?Wg(t.items):rr(t)?Kg(t.properties):Ta(t)?qg(t):ja(t)?Jg(t.items):Zn()}function Zg(e,t,n,r){return an(Xg(gy(e,t,n)),{},r)}function Qg(e,t,n,r){return cy(e,[n])?Zg(e,t,n,r):Vg(n,r)}function $g(e,t,n,r,i={}){return gn(`Mapped`,[e,t,n,r],i)}function e_(e,t,n,r,i={}){return _y({},$g(e,t,n,r,i))}function t_(e){return r_(pa(e))}function n_(e){return e.reduce((e,t)=>[...e,...r_(t)],[])}function r_(e){return vr(e)?n_(Yd(e.enum)):Fi(e)||Pi(e)?[e]:Ld(e)?t_(e.pattern):or(e)?n_(e.anyOf):[e]}function i_(e){return r_(e)}function a_(e){return Ld(e)?pa(e.pattern):e}function o_(e,t,n,r,i,a){let o=P(e,{[n.name]:r}),s=a_(gy(o,t,i)),c=gy(o,t,a);return Pi(s)||Fi(s)?{[s.const]:c}:{}}function s_(e,t,n,r,i,a){return r.reduce((r,o)=>[...r,o_(e,t,n,o,i,a)],[])}function c_(e){return e.reduce((e,t)=>[...e,nr(t)],[])}function l_(e,t,n,r,i,a){return Xp(c_(s_(e,t,n,i_(r),i,a)))}function u_(e,t,n,r,i,a,o){return an(l_(e,t,n,gy(e,t,r),i,a),{},o)}function d_(e,t,n,r,i,a,o){return cy(e,[r])?u_(e,t,n,r,i,a,o):$g(n,r,i,a,o)}function f_(e,t){return Ie(e).filter(e=>t.includes(e)).reduce((t,n)=>({...t,[n]:nm(e,n,e[n])}),{})}function p_(e,t){return Ie(e).filter(e=>!t.includes(e)).reduce((t,n)=>({...t,[n]:gy(e,{callstack:[]},e[n])}),{})}function m_(e,t){let n=Sp(e),r=f_(e,n),i=p_(e,n);return an({...r,...i},{},t)}function h_(e,t,n,r){return m_(P(e,n),r)}function g_(e,t={}){return gn(`NonNullable`,[e],t)}function __(e,t={}){return _y({},g_(e,t))}function v_(e){return Rh({},{callstack:[]},e,ar([Li(),Na()]),{})}function y_(e,t,n,r){return an(v_(gy(e,t,n)),{},r)}function b_(e,t,n,r){return cy(e,[n])?y_(e,t,n,r):g_(n,r)}function x_(e){let t=kg(e);return rr(t)?t.properties:Sr()}function S_(e,t,n={}){return gn(`Omit`,[e,t],n)}function C_(e,t,n={}){return _y({},S_(e,R(t)?_g(t):t,n))}function w_(e,t){return Ie(e).reduce((n,r)=>t.includes(r)?n:{...n,[r]:e[r]},{})}function T_(e,t){return nr(w_(x_(e),ag(t)))}function E_(e,t,n,r,i){return an(T_(gy(e,t,n),gy(e,t,r)),{},i)}function D_(e,t,n,r,i){return cy(e,[n,r])?E_(e,t,n,r,i):S_(n,r,i)}function O_(e,t){return gn(`Options`,[e,t],{})}function k_(e,t){return _y({},O_(e,t))}function A_(e,t,n,r){return an(gy(e,t,n),{},r)}function j_(e,t,n,r){return cy(e,[n])?A_(e,t,n,r):O_(n,r)}function M_(e,t={}){return gn(`Parameters`,[e],t)}function N_(e,t={}){return _y({},M_(e,t))}function P_(e){return Hn(e)?gy({},{callstack:[]},Aa(e.parameters)):Zn()}function F_(e,t,n,r){return an(P_(gy(e,t,n)),{},r)}function I_(e,t,n,r){return cy(e,[n])?F_(e,t,n,r):M_(n,r)}function L_(e,t={}){return gn(`Partial`,[e],t)}function R_(e,t={}){return _y({},L_(e,t))}function z_(e,t){let n=U_(im(e,t));return ur(P(e,{[t]:n}),t)}function B_(e){return Xp(e.map(e=>U_(e)))}function V_(e){return ar(e.map(e=>U_(e)))}function H_(e){return nr(Ie(e).reduce((t,n)=>({...t,[n]:Cn(e[n])}),{}))}function U_(e){return dr(e)?z_(e.$defs,e.$ref):br(e)?B_(e.allOf):or(e)?V_(e.anyOf):rr(e)?H_(e.properties):nr({})}function W_(e,t,n,r){return an(U_(gy(e,t,n)),{},r)}function G_(e,t,n,r){return cy(e,[n])?W_(e,t,n,r):L_(n,r)}function K_(e,t,n={}){return gn(`Pick`,[e,t],n)}function q_(e,t,n={}){return _y({},K_(e,R(t)?_g(t):t,n))}function J_(e,t){return Ie(e).reduce((n,r)=>t.includes(r)?P(n,{[r]:e[r]}):n,{})}function Y_(e,t){return nr(J_(x_(e),ag(t)))}function X_(e,t,n,r,i){return an(Y_(gy(e,t,n),gy(e,t,r)),{},i)}function Z_(e,t,n,r,i){return cy(e,[n,r])?X_(e,t,n,r,i):K_(n,r,i)}function Q_(e,t={}){return gn(`ReadonlyType`,[e],t)}function $_(e,t={}){return _y({},Q_(e,t))}function ev(e){return yn(kn(e))}function tv(e,t){let n=ov(im(e,t));return ur(P(e,{[t]:n}),t)}function nv(e){return Xp(e.map(e=>ov(e)))}function rv(e){return nr(Ie(e).reduce((t,n)=>({...t,[n]:Dn(e[n])}),{}))}function iv(e){return yn(Aa(e))}function av(e){return ar(e.map(e=>ov(e)))}function ov(e){return An(e)?ev(e.items):dr(e)?tv(e.$defs,e.$ref):br(e)?nv(e.allOf):rr(e)?rv(e.properties):ja(e)?iv(e.items):or(e)?av(e.anyOf):e}function sv(e,t,n,r){return an(ov(gy(e,t,n)),{},r)}function cv(e,t,n,r){return cy(e,[n])?sv(e,t,n,r):Q_(n,r)}function lv(e){return ma(_a,e)}function uv(e){return nr({true:e,false:e})}function dv(e,t){return Cv(Xd(e),t)}function fv(e,t){return ma(ha,t)}function pv(e,t){return Cv(Xp(e),t)}function mv(e,t){return B(e)||ve(e)?nr({[e]:t}):H(e,!1)?nr({false:t}):H(e,!0)?nr({true:t}):nr({})}function hv(e,t){return ma(ga,t)}function gv(e,t){return U(e,`pattern`)&&(B(e.pattern)||e.pattern instanceof RegExp)?ma(e.pattern.toString(),t):ma(_a,t)}function _v(e,t){return na(Zi(e))?Cv(pa(e),t):ma(e,t)}function vv(e){return e.some(e=>Xi(e)||Vi(e)||wi(e))}function yv(e,t){return H(vv(e),!0)?ma(_a,t):void 0}function bv(e,t){return e.reduce((e,n)=>Ii(n)&&(B(n.const)||ve(n.const))?{...e,[n.const]:t}:e,{})}function xv(e,t){return nr(bv(e,t))}function Sv(e,t){let n=pm(e),r=yv(n,t);return sn(r)?r:xv(n,t)}function Cv(e,t){return Yn(e)?lv(t):yi(e)?uv(t):vr(e)?dv(e.enum,t):wi(e)?fv(e,t):br(e)?pv(e.allOf,t):Ii(e)?mv(e.const,t):Vi(e)?hv(e,t):or(e)?Sv(e.anyOf,t):Xi(e)?gv(e,t):Ld(e)?_v(e.pattern,t):nr({})}function wv(e,t,n,r,i){return an(Cv(gy(e,t,n),gy(e,t,r)),{},i)}function Tv(e,t,n,r,i){return cy(e,[n])?wv(e,t,n,r,i):va(n,r,i)}function Ev(e,t,n,r){return r in e?bp([r],e,e[r])?n:gy(e,t,e[r]):n}function Dv(e,t){let n=jv(im(e,t));return ur(P(e,{[t]:n}),t)}function Ov(e){return Xp(e.map(e=>jv(e)))}function kv(e){return ar(e.map(e=>jv(e)))}function Av(e){return nr(Ie(e).reduce((t,n)=>({...t,[n]:xn(e[n])}),{}))}function jv(e){return dr(e)?Dv(e.$defs,e.$ref):br(e)?Ov(e.allOf):or(e)?kv(e.anyOf):rr(e)?Av(e.properties):nr({})}function Mv(e,t={}){return gn(`Required`,[e],t)}function Nv(e,t={}){return _y({},Mv(e,t))}function Pv(e,t,n,r){return an(jv(gy(e,t,n)),{},r)}function Fv(e,t,n,r){return cy(e,[n])?Pv(e,t,n,r):Mv(n,r)}function Iv(e,t={}){return gn(`ReturnType`,[e],t)}function Lv(e,t={}){return _y({},Iv(e,t))}function Rv(e){return Hn(e)?e.returnType:Zn()}function zv(e,t,n,r){return an(Rv(gy(e,t,n)),{},r)}function Bv(e,t,n,r){return cy(e,[n])?zv(e,t,n,r):Iv(n,r)}function Vv(e){return e.join(`|`)}function Hv(e){return e.slice(1,e.length-1)}function Uv(e,t,n){return $v(t,`${n}${e}`)}function Wv(e,t){return $v(e,`${t}${hi}`)}function Gv(e,t){return $v(e,`${t}${Si}`)}function Kv(e,t){return $v(e,`${t}${zi}`)}function qv(e,t){return Qv(ar([Ai(`false`),Ai(`true`)]),e,t)}function Jv(e,t){return $v(e,`${t}.*`)}function Yv(e,t,n){return $v(t,`${n}${Hv(e)}`)}function Xv(e,t,n){return Zv(Yd(e),t,n)}function Zv(e,t,n,r=[]){let[i,...a]=e;return sn(i)?Zv(a,t,n,[...r,Qv(i,[],``)]):$v(t,`${n}(${Vv(r)})`)}function Qv(e,t,n){return vr(e)?Xv(e.enum,t,n):wi(e)?Gv(t,n):Ii(e)?Uv(e.const,t,n):_i(e)?Wv(t,n):yi(e)?qv(t,n):Vi(e)?Kv(t,n):Xi(e)?Jv(t,n):Ld(e)?Yv(e.pattern,t,n):or(e)?Zv(e.anyOf,t,n):Xn}function $v(e,t){let[n,...r]=e;return sn(n)?Qv(n,r,t):t}function ey(e){return`^${$v(e,``)}$`}function ty(e){return ra(ey(e))}function ny(e,t,n,r){return an(ty(my(e,t,n)),{},r)}function ry(e,t,n,r){return cy(e,n)?ny(e,t,n,r):Nd(n,r)}function iy(e){return Da(e)?ja(e.items)?ay(e.items.items):mr(e.items)||Gn(e.items)?[e]:[Zn()]:[e]}function ay(e){return e.reduce((e,t)=>[...e,...iy(t)],[])}function oy(e,t){return t in e}function sy(e,t){return br(t)?cy(e,t.allOf):or(t)?cy(e,t.anyOf):Gn(t)?oy(e,t.$ref):!0}function cy(e,t){let[n,...r]=t;return sn(n)?sy(e,n)?cy(e,r):!1:!0}function ly(e,t,n){return hn(e)?ly(e.type,`remove`,n):dn(e)?ly(e.type,t,`remove`):pn(e)?ly(e.type,`add`,n):ln(e)?ly(e.type,t,`add`):[e,t,n]}function uy(e,t){return H(e,`remove`)?Tn(t):H(e,`add`)?En(t):t}function dy(e,t){return H(e,`remove`)?xn(t):H(e,`add`)?Sn(t):t}function fy(e,t,n){return Ie(n).reduce((r,i)=>({...r,[i]:gy(e,t,n[i])}),{})}function py(e,t,n){return ay(my(e,t,n))}function my(e,t,n){return n.map(n=>gy(e,t,n))}function hy(e,t,n,r,i){return H(n,`Awaited`)?Zm(e,t,r[0],i):H(n,`Capitalize`)?gh(e,t,r[0],i):H(n,`Conditional`)?Eh(e,t,r[0],r[1],r[2],r[3],i):H(n,`ConstructorParameters`)?jh(e,t,r[0],i):H(n,`Evaluate`)?bm(e,t,r[0],i):H(n,`Exclude`)?Rh(e,t,r[0],r[1],i):H(n,`Extract`)?Gh(e,t,r[0],r[1],i):H(n,`Index`)?Ng(e,t,r[0],r[1],i):H(n,`InstanceType`)?Rg(e,t,r[0],i):H(n,`Interface`)?Bg(e,t,r[0],r[1],i):H(n,`KeyOf`)?Qg(e,t,r[0],i):H(n,`Lowercase`)?vh(e,t,r[0],i):H(n,`Mapped`)?d_(e,t,r[0],r[1],r[2],r[3],i):H(n,`Module`)?h_(e,t,r[0],i):H(n,`NonNullable`)?b_(e,t,r[0],i):H(n,`Pick`)?Z_(e,t,r[0],r[1],i):H(n,`Options`)?j_(e,t,r[0],r[1]):H(n,`Parameters`)?I_(e,t,r[0],i):H(n,`Partial`)?G_(e,t,r[0],i):H(n,`Omit`)?D_(e,t,r[0],r[1],i):H(n,`ReadonlyType`)?cv(e,t,r[0],i):H(n,`Record`)?Tv(e,t,r[0],r[1],i):H(n,`Required`)?Fv(e,t,r[0],i):H(n,`ReturnType`)?Bv(e,t,r[0],i):H(n,`TemplateLiteral`)?ry(e,t,r[0],i):H(n,`Uncapitalize`)?bh(e,t,r[0],i):H(n,`Uppercase`)?Sh(e,t,r[0],i):gn(n,r,i)}function gy(e,t,n){let r=bn(n),i=ly(n,On(n)?`add`:`none`,wn(n)?`add`:`none`),a=Ln(i[0])?i[0].Clone():i[0],o=Gn(a)?Ev(e,t,a,a.$ref):An(a)?kn(gy(e,t,a.items),jn(a)):Nn(a)?Mn(gy(e,t,a.iteratorItems),Pn(a)):Jm(a)?Gm(e,t,a.target,a.arguments):zn(a)?Rn(my(e,t,a.parameters),gy(e,t,a.instanceType),Bn(a)):_n(a)?hy(e,t,a.action,a.parameters,a.options):Hn(a)?Vn(my(e,t,a.parameters),gy(e,t,a.returnType),Un(a)):br(a)?yr(my(e,t,a.allOf),xr(a)):Ei(a)?Ti(gy(e,t,a.iteratorItems),Di(a)):rr(a)?nr(fy(e,t,a.properties),ir(a)):qi(a)?Ki(gy(e,t,a.item),Ji(a)):Ta(a)?xa(Sa(a),gy(e,t,wa(a))):Da(a)?Ea(gy(e,t,a.items)):ja(a)?Aa(py(e,t,a.items),Ma(a)):or(a)?ar(my(e,t,a.anyOf),sr(a)):a,s=r?yn(o):o;return uy(i[1],dy(i[2],s))}function _y(e,t){return gy(e,{callstack:[]},t)}function vy(e,t={}){return gn(`Awaited`,[e],t)}function yy(e,t={}){return _y({},vy(e,t))}function by(e,t={}){return gn(`Evaluate`,[e],t)}function xy(e,t={}){return _y({},by(e,t))}function Sy(e,t={}){return gn(`Module`,[e],t)}function Cy(e,t={}){return _y({},Sy(e,t))}function wy(...e){let[t,n,r]=fr(e,{2:(e,t)=>B(e)?[{},e,t]:[e,t,{}],3:(e,t,n)=>[e,t,n],1:e=>[{},e,{}]}),i=jd(n);return an(R(i)&&H(i.length,2)?gy(t,{callstack:[]},i[0]):Zn(),{},r)}var Ty=s({Any:()=>Jn,Array:()=>kn,AsyncIterator:()=>Mn,Awaited:()=>yy,Base:()=>In,BigInt:()=>gi,Boolean:()=>vi,Call:()=>qm,Capitalize:()=>ih,Codec:()=>ci,Conditional:()=>wh,Constructor:()=>Rn,ConstructorParameters:()=>Oh,Cyclic:()=>ur,Decode:()=>li,DecodeBuilder:()=>si,Encode:()=>ui,EncodeBuilder:()=>oi,Enum:()=>_r,Evaluate:()=>xy,Exclude:()=>Nh,Extends:()=>om,ExtendsResult:()=>Rd,Extract:()=>Bh,Function:()=>Vn,Generic:()=>Kn,Identifier:()=>bi,Immutable:()=>yn,Index:()=>yg,Infer:()=>pr,InstanceType:()=>Fg,Instantiate:()=>_y,Integer:()=>Ci,Interface:()=>hp,Intersect:()=>yr,IsAny:()=>Yn,IsArray:()=>An,IsAsyncIterator:()=>Nn,IsBase:()=>Ln,IsBigInt:()=>_i,IsBoolean:()=>yi,IsCall:()=>Jm,IsCodec:()=>di,IsConstructor:()=>zn,IsCyclic:()=>dr,IsEnum:()=>vr,IsFunction:()=>Hn,IsGeneric:()=>qn,IsIdentifier:()=>xi,IsImmutable:()=>bn,IsInfer:()=>mr,IsInteger:()=>wi,IsIntersect:()=>br,IsIterator:()=>Ei,IsKind:()=>on,IsLiteral:()=>Ii,IsNever:()=>Qn,IsNull:()=>Ri,IsNumber:()=>Vi,IsObject:()=>rr,IsOptional:()=>wn,IsParameter:()=>Gi,IsPromise:()=>qi,IsReadonly:()=>On,IsRecord:()=>Ta,IsRef:()=>Gn,IsRefine:()=>mi,IsRest:()=>Da,IsSchema:()=>sn,IsString:()=>Xi,IsSymbol:()=>Ui,IsTemplateLiteral:()=>Ld,IsThis:()=>ka,IsTuple:()=>ja,IsUndefined:()=>Pa,IsUnion:()=>or,IsUnknown:()=>lr,IsUnsafe:()=>Ia,IsVoid:()=>Ra,Iterator:()=>Ti,KeyOf:()=>Hg,Literal:()=>Ai,Lowercase:()=>oh,Mapped:()=>e_,Module:()=>Cy,Never:()=>Zn,NonNullable:()=>__,Null:()=>Li,Number:()=>Bi,Object:()=>nr,Omit:()=>C_,Optional:()=>Cn,Options:()=>k_,Parameter:()=>Wi,Parameters:()=>N_,Partial:()=>R_,Pick:()=>q_,Promise:()=>Ki,Readonly:()=>Dn,ReadonlyType:()=>$_,Record:()=>ba,RecordKey:()=>Ca,RecordKeyAsPattern:()=>Sa,RecordValue:()=>wa,Ref:()=>Wn,Refine:()=>pi,Required:()=>Nv,Rest:()=>Ea,ReturnType:()=>Lv,Script:()=>wy,String:()=>Yi,Symbol:()=>Hi,TemplateLiteral:()=>Id,This:()=>Oa,Tuple:()=>Aa,Uncapitalize:()=>ch,Undefined:()=>Na,Union:()=>ar,Unknown:()=>cr,Unsafe:()=>Fa,Uppercase:()=>uh,Void:()=>La}),Ey=[0,31,28,31,30,31,30,31,31,30,31,30,31],Dy=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;function Oy(e){return e%4==0&&(e%100!=0||e%400==0)}function ky(e){let t=Dy.exec(e);if(!t)return!1;let n=+t[1],r=+t[2],i=+t[3];return r>=1&&r<=12&&i>=1&&i<=(r===2&&Oy(n)?29:Ey[r])}var Ay=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(?:Z|([+-])(\d\d):(\d\d))?$/i;function jy(e,t=!0){let n=Ay.exec(e);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=n[4]===`-`?-1:1,s=+(n[5]||0),c=+(n[6]||0);if(s>23||c>59||t&&!n[4]&&e.toLowerCase().indexOf(`z`)===-1)return!1;if(r<=23&&i<=59&&a<60)return!0;let l=i-c*o,u=r-s*o-+(l<0);return(u===23||u===-1)&&(l===59||l===-1)&&a<61}function My(e,t=!0){let n=e.split(/T/i);return n.length===2&&ky(n[0])&&jy(n[1],t)}var Ny=/^P((\d+Y(\d+M(\d+D)?)?|\d+M(\d+D)?|\d+D)(T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S))?|T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S)|\d+W)$/;function Py(e){return Ny.test(e)}var Fy=/^(?!.*\.\.)[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i;function Iy(e){return Fy.test(e)}var Ly=36,Ry=1,zy=26,By=38,Vy=700,Hy=72,Uy=128;function Wy(e,t,n){e=n?Math.floor(e/Vy):e>>1,e+=Math.floor(e/t);let r=0;for(;e>(Ly-Ry)*zy>>1;)e=Math.floor(e/(Ly-Ry)),r+=Ly;return r+Math.floor((Ly-Ry+1)*e/(e+By))}function Gy(e){let t=[],n=Uy,r=0,i=Hy,a=e.lastIndexOf(`-`);if(a>0)for(let n=0;n<a;n++){let r=e.charCodeAt(n);if(r>=128)throw Error(`Invalid punycode: non-basic before delimiter`);t.push(r)}let o=a<0?0:a+1;for(;o<e.length;){let a=r,s=1,c=Ly;for(;;){if(o>=e.length)throw Error(`Invalid punycode: unexpected end of input`);let t=e.charCodeAt(o++),n;if(t>=97&&t<=122)n=t-97;else if(t>=48&&t<=57)n=t-48+26;else if(t>=65&&t<=90)n=t-65;else throw Error(`Invalid punycode: bad digit character`);r+=n*s;let a=c<=i?Ry:c>=i+zy?zy:c-i;if(n<a)break;s*=Ly-a,c+=Ly}let l=t.length+1;i=Wy(r-a,l,a===0),n+=Math.floor(r/l),r%=l,t.splice(r,0,n),r++}return globalThis.String.fromCodePoint(...t)}function Ky(e){return/\p{Mn}/u.test(String.fromCodePoint(e))}function qy(e){return/\p{Mc}/u.test(String.fromCodePoint(e))}function Jy(e){return/\p{Me}/u.test(String.fromCodePoint(e))}function Yy(e){return Ky(e)||qy(e)||Jy(e)}var Xy=new Set([1600,2042,12334,12335,12337,12338,12339,12340,12341,12347]),Zy=new Set([2381,2509,2637,2765,2893,3021,3149,3277,3387,3388,3405,3530,6980,7082,7083,43456,69702,69759,69817,69939,69940,70080,70197,70477,70722,70850,71103,71231,71350,72767,73028,73029]);function Qy(e){return/\p{Script=Greek}/u.test(String.fromCodePoint(e))}function $y(e){return/\p{Script=Hebrew}/u.test(String.fromCodePoint(e))}function eb(e){return/\p{Script=Hiragana}/u.test(String.fromCodePoint(e))}function tb(e){return/\p{Script=Katakana}/u.test(String.fromCodePoint(e))}function nb(e){return/\p{Script=Han}/u.test(String.fromCodePoint(e))}function rb(e){return e>=1632&&e<=1641}function ib(e){return e>=1776&&e<=1785}function ab(e){return Zy.has(e)}function ob(e){if(e.length===0)return!1;let t=[...e].map(e=>e.codePointAt(0)),n=t.length;if(t[0]===45||t[n-1]===45||n>=4&&t[2]===45&&t[3]===45||Yy(t[0]))return!1;let r=!1,i=!1,a=!1;for(let e=0;e<n;e++){let n=t[e];if(Xy.has(n))return!1;(eb(n)||tb(n)||nb(n))&&(r=!0),rb(n)&&(i=!0),ib(n)&&(a=!0);let o=t[e-1],s=t[e+1];switch(n){case 183:if(o!==108||s!==108)return!1;break;case 885:if(s===void 0||!Qy(s))return!1;break;case 1523:case 1524:if(o===void 0||!$y(o))return!1;break;case 8205:if(o===void 0||!ab(o))return!1;break;case 12539:break}}return!(e.includes(`・`)&&!r||i&&a)}function sb(e){if(e.charCodeAt(0)===45||e.charCodeAt(e.length-1)===45||e.length>=4&&e.charCodeAt(2)===45&&e.charCodeAt(3)===45)return!1;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(!(n>=97&&n<=122||n>=65&&n<=90||n>=48&&n<=57||n===45))return!1}return!0}function cb(e){return e.toLowerCase().startsWith(`xn--`)}function lb(e){try{return ob(Gy(e.slice(4)))}catch{return!1}}function ub(e){return e.length===0||e.length>63?!1:cb(e)?lb(e):ob(e)}function db(e){return e.length===0||e.length>63?!1:cb(e)?lb(e):sb(e)}function fb(e){if(e.length===0||e.length>253||e.charCodeAt(e.length-1)===46)return!1;for(let t of e.split(`.`))if(!db(t))return!1;return!0}var pb=/^(?!.*\.\.)[\p{L}\p{N}!#$%&'*+/=?^_`{|}~-]+(?:\.[\p{L}\p{N}!#$%&'*+/=?^_`{|}~-]+)*@[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,61}[\p{L}\p{N}])?(?:\.[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,61}[\p{L}\p{N}])?)*$/iu;function mb(e){return pb.test(e)}function hb(e){if(e.length===0||e.includes(` `))return!1;let t=e.normalize(`NFC`).replace(/[\u002E\u3002\uFF0E\uFF61]/g,`.`);if(t.length>253)return!1;for(let e of t.split(`.`))if(!ub(e))return!1;return!0}function gb(e,t,n){let r=0,i=0,a=0,o=0;for(let s=t;s<n;s++){let t=e.charCodeAt(s);if(t===46){if(a===0||i>255||o===48&&a>1)return!1;r++,i=0,a=0,o=0}else if(t>=48&&t<=57)a===0&&(o=t),i=i*10+(t-48),a++;else return!1}return r===3&&a>0&&i<=255&&!(o===48&&a>1)}function _b(e){return gb(e,0,e.length)}function vb(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function yb(e){let t=e.length;if(t===0)return!1;let n=0,r=!1,i=0;if(e.charCodeAt(0)===58&&e.charCodeAt(1)===58){if(t===2)return!0;r=!0,i=2}for(;i<t;){let a=0,o=i;for(;i<t&&vb(e.charCodeAt(i));)i++,a++;if(a===0)return!1;let s=e.charCodeAt(i);if(s===46){if(!gb(e,o,t))return!1;n+=2,i=t;break}if(a>4)return!1;if(n++,i===t)break;if(s!==58)return!1;if(i++,e.charCodeAt(i)===58){if(r||e.charCodeAt(i+1)===58)return!1;if(r=!0,i++,i===t)break}}return r?n<=7:n===8}function bb(e){try{return new URL(e,`http://example.com`),!0}catch{return!1}}function xb(e){if(e.includes(` `)||e.includes(`\\`)||/[\x00-\x1F\x7F]/.test(e)||/%(?![0-9a-fA-F]{2})/.test(e))return!1;if(e===``)return!0;let t=e.indexOf(`:`);return t>0&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e.substring(0,t))?bb(e):e.match(/^([a-zA-Z][a-zA-Z0-9+\-.]*)(\/\/)/)&&t===-1?!1:bb(e)}function Sb(e){try{return new URL(e),!0}catch{return!1}}var Cb=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;function wb(e){return Cb.test(e)}var Tb=/^(?:\/(?:[^~/]|~0|~1)*)*$/;function Eb(e){return Tb.test(e)}function Db(e){if(e.length===0)return!1;try{return new RegExp(e),!0}catch{return!1}}var Ob=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function kb(e){return Ob.test(e)}var Ab=/^(?!.*[^\x00-\x7F])(?!.*\\)(?:(?:[a-z][a-z0-9+\-.]*:)?(?:\/\/[^\s[\]{}<>^`|]*)?|[^\s[\]{}<>^`|]*)(?:\?[^\s[\]{}<>^`|]*)?(?:#[^\s[\]{}<>^`|]*)?$/i;function jb(e){return Ab.test(e)}var Mb=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;function Nb(e){return Mb.test(e)}function Pb(e){return e>=97&&e<=122||e>=65&&e<=90}function Fb(e){return Pb(e)||e>=48&&e<=57}function Ib(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Lb(e){return Fb(e)||e===43||e===45||e===46}function Rb(e){return Fb(e)||e===45||e===46||e===95||e===126}function zb(e){return e===33||e===36||e===38||e===39||e===40||e===41||e===42||e===43||e===44||e===59||e===61}function Bb(e){return Rb(e)||zb(e)||e===58||e===64}function Vb(e){let t=e.length;if(t===0||!Pb(e.charCodeAt(0)))return!1;let n=1;for(;n<t;){let t=e.charCodeAt(n);if(t===58)break;if(!Lb(t))return!1;n++}if(e.charCodeAt(n)!==58)return!1;if(n++,e.charCodeAt(n)===47&&e.charCodeAt(n+1)===47){n+=2;let r=n,i=-1;for(let r=n;r<t;r++){let t=e.charCodeAt(r);if(t===64){i=r;break}if(t===47||t===63||t===35)break}if(i!==-1){for(let t=r;t<i;t++){let n=e.charCodeAt(t);if(n===91||n===93)return!1;if(n===37){if(t+2>=i||!Ib(e.charCodeAt(t+1))||!Ib(e.charCodeAt(t+2)))return!1;t+=2}else if(!Rb(n)&&!zb(n)&&n!==58)return!1}n=i+1}if(e.charCodeAt(n)===91){for(n++;n<t&&e.charCodeAt(n)!==93;)n++;if(e.charCodeAt(n)!==93)return!1;n++}else for(;n<t;){let t=e.charCodeAt(n);if(t===47||t===63||t===35||t===58)break;if(t<128&&!Rb(t)&&!zb(t))return!1;n++}if(e.charCodeAt(n)===58)for(n++;n<t;){let t=e.charCodeAt(n);if(t===47||t===63||t===35)break;if(t<48||t>57)return!1;n++}}for(;n<t;){let r=e.charCodeAt(n);if(r===37){if(n+2>=t||!Ib(e.charCodeAt(n+1))||!Ib(e.charCodeAt(n+2)))return!1;n+=2}else if(r>127)return!1;else if(!(Bb(r)||r===47||r===63||r===35))return!1;n++}return!0}var Hb=/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu;function Ub(e){return Hb.test(e)}var Wb=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function Gb(e){return Wb.test(e)}var Kb=new Map;function qb(){Kb.clear()}function Jb(){return[...Kb.entries()]}function Yb(e,t){Kb.set(e,t)}function Xb(e){return Kb.has(e)}function Zb(e){return Kb.get(e)}function Qb(e,t){return Kb.get(e)?.(t)??!0}function $b(){qb(),Kb.set(`date-time`,My),Kb.set(`date`,ky),Kb.set(`duration`,Py),Kb.set(`email`,Iy),Kb.set(`hostname`,fb),Kb.set(`idn-email`,mb),Kb.set(`idn-hostname`,hb),Kb.set(`ipv4`,_b),Kb.set(`ipv6`,yb),Kb.set(`iri-reference`,xb),Kb.set(`iri`,Sb),Kb.set(`json-pointer-uri-fragment`,wb),Kb.set(`json-pointer`,Eb),Kb.set(`regex`,Db),Kb.set(`relative-json-pointer`,kb),Kb.set(`time`,jy),Kb.set(`uri-reference`,jb),Kb.set(`uri-template`,Nb),Kb.set(`uri`,Vb),Kb.set(`url`,Ub),Kb.set(`uuid`,Gb)}$b();var ex=s({Clear:()=>qb,Entries:()=>Jb,Get:()=>Zb,Has:()=>Xb,IsDate:()=>ky,IsDateTime:()=>My,IsDuration:()=>Py,IsEmail:()=>Iy,IsHostname:()=>fb,IsIPv4:()=>_b,IsIPv6:()=>yb,IsIdnEmail:()=>mb,IsIdnHostname:()=>hb,IsIri:()=>Sb,IsIriReference:()=>xb,IsJsonPointer:()=>Eb,IsJsonPointerUriFragment:()=>wb,IsRegex:()=>Db,IsRelativeJsonPointer:()=>kb,IsTime:()=>jy,IsUri:()=>Vb,IsUriReference:()=>jb,IsUriTemplate:()=>Nb,IsUrl:()=>Ub,IsUuid:()=>Gb,Reset:()=>$b,Set:()=>Yb,Test:()=>Qb}),tx=ex;function nx(e){return be(e)&&U(e,`check`)&&U(e,`errors`)&&me(e.check)&&me(e.errors)}function rx(e){return U(e,`~guard`)&&nx(e[`~guard`])}function ix(e){return U(e,`~refine`)&&R(e[`~refine`])&&Me(e[`~refine`],0,e=>be(e)&&U(e,`refine`)&&U(e,`message`)&&me(e.refine)&&B(e.message))}function ax(e){return be(e)&&!R(e)}function ox(e){return fe(e)}function sx(e){return ax(e)||ox(e)}function cx(e){return U(e,`additionalItems`)&&sx(e.additionalItems)}function lx(e){return U(e,`additionalProperties`)&&sx(e.additionalProperties)}function ux(e){return U(e,`allOf`)&&R(e.allOf)&&e.allOf.every(e=>sx(e))}function dx(e){return U(e,`$anchor`)&&B(e.$anchor)}function fx(e){return U(e,`anyOf`)&&R(e.anyOf)&&e.anyOf.every(e=>sx(e))}function px(e){return U(e,`const`)}function mx(e){return U(e,`contains`)&&sx(e.contains)}function hx(e){return U(e,`default`)}function gx(e){return U(e,`dependencies`)&&be(e.dependencies)&&Object.values(e.dependencies).every(e=>sx(e)||R(e)&&e.every(e=>B(e)))}function _x(e){return U(e,`dependentRequired`)&&be(e.dependentRequired)&&Object.values(e.dependentRequired).every(e=>R(e)&&e.every(e=>B(e)))}function vx(e){return U(e,`dependentSchemas`)&&be(e.dependentSchemas)&&Object.values(e.dependentSchemas).every(e=>sx(e))}function yx(e){return U(e,`$dynamicAnchor`)&&B(e.$dynamicAnchor)}function bx(e){return U(e,`else`)&&sx(e.else)}function xx(e){return U(e,`enum`)&&R(e.enum)}function Sx(e){return U(e,`exclusiveMaximum`)&&(ve(e.exclusiveMaximum)||z(e.exclusiveMaximum))}function Cx(e){return U(e,`exclusiveMinimum`)&&(ve(e.exclusiveMinimum)||z(e.exclusiveMinimum))}function wx(e){return U(e,`format`)&&B(e.format)}function Tx(e){return U(e,`$id`)&&B(e.$id)}function Ex(e){return U(e,`if`)&&sx(e.if)}function Dx(e){return U(e,`items`)&&(sx(e.items)||R(e.items)&&e.items.every(e=>sx(e)))}function Ox(e){return Dx(e)&&R(e.items)}function kx(e){return U(e,`maximum`)&&(ve(e.maximum)||z(e.maximum))}function Ax(e){return U(e,`maxContains`)&&ve(e.maxContains)}function jx(e){return U(e,`maxItems`)&&ve(e.maxItems)}function Mx(e){return U(e,`maxLength`)&&ve(e.maxLength)}function Nx(e){return U(e,`maxProperties`)&&ve(e.maxProperties)}function Px(e){return U(e,`minimum`)&&(ve(e.minimum)||z(e.minimum))}function Fx(e){return U(e,`minContains`)&&ve(e.minContains)}function Ix(e){return U(e,`minItems`)&&ve(e.minItems)}function Lx(e){return U(e,`minLength`)&&ve(e.minLength)}function Rx(e){return U(e,`minProperties`)&&ve(e.minProperties)}function zx(e){return U(e,`multipleOf`)&&(ve(e.multipleOf)||z(e.multipleOf))}function Bx(e){return U(e,`not`)&&sx(e.not)}function Vx(e){return U(e,`oneOf`)&&R(e.oneOf)&&e.oneOf.every(e=>sx(e))}function Hx(e){return U(e,`pattern`)&&(B(e.pattern)||e.pattern instanceof RegExp)}function Ux(e){return U(e,`patternProperties`)&&be(e.patternProperties)&&Object.values(e.patternProperties).every(e=>sx(e))}function Wx(e){return U(e,`prefixItems`)&&R(e.prefixItems)&&e.prefixItems.every(e=>sx(e))}function Gx(e){return U(e,`properties`)&&be(e.properties)&&Object.values(e.properties).every(e=>sx(e))}function Kx(e){return U(e,`propertyNames`)&&(be(e.propertyNames)||sx(e.propertyNames))}function qx(e){return U(e,`$recursiveAnchor`)&&fe(e.$recursiveAnchor)}function Jx(e){return qx(e)&&H(e.$recursiveAnchor,!0)}function Yx(e){return U(e,`$recursiveRef`)&&B(e.$recursiveRef)}function Xx(e){return U(e,`$ref`)&&B(e.$ref)}function Zx(e){return U(e,`required`)&&R(e.required)&&e.required.every(e=>B(e))}function Qx(e){return U(e,`then`)&&sx(e.then)}function $x(e){return U(e,`type`)&&(B(e.type)||R(e.type)&&e.type.every(e=>B(e)))}function eS(e){return U(e,`uniqueItems`)&&fe(e.uniqueItems)}function tS(e){return U(e,`unevaluatedItems`)&&sx(e.unevaluatedItems)}function nS(e){return U(e,`unevaluatedProperties`)&&sx(e.unevaluatedProperties)}function rS(e){return tS(e)||nS(e)||Ie(e).some(t=>aS(e[t]))}function iS(e){return e.some(e=>aS(e))}function aS(e){return R(e)?iS(e):be(e)?rS(e):!1}function oS(e,t){return aS(t)||Ie(e).some(t=>aS(e[t]))}var sS=class{constructor(e){this.hasUnevaluated=e}UseUnevaluated(){return this.hasUnevaluated}Push(){return St(wt(`context`,`Push`),[])}Pop(){return St(wt(`context`,`Pop`),[])}AddIndex(e){return St(wt(`context`,`AddIndex`),[e])}AddKey(e){return St(wt(`context`,`AddKey`),[e])}Merge(e){return St(wt(`context`,`Merge`),[e])}},cS=class{constructor(){this.stack=[{indices:new Set,keys:new Set}]}Push(){let e=new Set,t=new Set;return this.stack.push({indices:e,keys:t}),!0}Pop(){return this.stack.pop(),!0}AddIndex(e){return this.GetIndices().add(e),!0}AddKey(e){return this.GetKeys().add(e),!0}GetIndices(){return this.stack[this.stack.length-1].indices}GetKeys(){return this.stack[this.stack.length-1].keys}Merge(e){for(let t of e)t.GetIndices().forEach(e=>this.GetIndices().add(e)),t.GetKeys().forEach(e=>this.GetKeys().add(e));return!0}},lS=class extends cS{constructor(e){super(),this.callback=e}AddError(e){return this.callback(e),!1}},uS=class extends lS{constructor(){super(e=>this.errors.push(e)),this.errors=[]}AddError(e){return this.errors.push(e),!1}GetErrors(){return this.errors}},dS={identifier:`External`,variables:[]};function fS(e){let t=`External[${dS.variables.length}]`;return dS.variables.push(e),t}function pS(){dS.variables=[]}function mS(){return{...dS}}function hS(e,t,n,r){return St(wt(wt(fS(n),`~guard`),`check`),[r])}function gS(e,t,n,r){return n[`~guard`].check(r)}function _S(e,t,n,r,i,a){return i[`~guard`].check(a)||t.AddError({keyword:`~guard`,schemaPath:n,instancePath:r,params:{errors:i[`~guard`].errors(a)}})}function vS(e,t,n,r){return ht(fS(n[`~refine`].map(e=>e)),Tt(0),[`refinement`,`_`],St(wt(`refinement`,`refine`),[r]))}function yS(e,t,n,r){return Me(n[`~refine`],0,(e,t)=>e.refine(r))}function bS(e,t,n,r,i,a){return Ne(i[`~refine`],0,(e,i)=>e.refine(a)||t.AddError({keyword:`~refine`,schemaPath:n,instancePath:r,params:{index:i,message:e.message}}))}var xS=0;function SS(){return`var_${xS++}`}function CS(e){return Dx(e)&&R(e.items)}function wS(e,t,n,r){if(!CS(n))return Tt(!0);let[i,a]=[SS(),SS()],o=DT(e,t,n.additionalItems,i),s=ut(a,Tt(n.items.length)),c=t.AddIndex(a),l=t.UseUnevaluated()?Ge(s,We(o,c)):Ge(s,o);return St(wt(r,`every`),[xt([i,a],l)])}function TS(e,t,n,r){return CS(n)?r.every((r,i)=>Ce(i,n.items.length)||kT(e,t,n.additionalItems,r)&&t.AddIndex(i)):!0}function ES(e,t,n,r,i,a){return CS(i)?a.every((a,o)=>{let s=`${n}/additionalItems`,c=`${r}/${o}`;return Ce(o,i.items.length)||jT(e,t,s,c,i.additionalItems,a)&&t.AddIndex(o)}):!0}function DS(e){return`^${e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}$`}function OS(e){let t=[];return Ux(e)&&t.push(...Ie(e.patternProperties)),Gx(e)&&t.push(...Ie(e.properties).map(DS)),H(t.length,0)?`(?!)`:`(${t.join(`|`)})`}function kS(e,t,n){return Zx(t)&&Gx(t)&&!Ux(t)&&H(t.additionalProperties,!1)&&H(Ie(t.properties).length,t.required.length)}function AS(e,t,n){return ct(wt(St(wt(`Object`,`getOwnPropertyNames`),[n]),`length`),Tt(t.required.length))}function jS(e,t,n,r){let[i,a]=[SS(),SS()],o=fS(new RegExp(OS(n))),s=DT(e,t,n.additionalProperties,`${r}[${i}]`),c=St(wt(o,`test`),[i]),l=t.AddKey(i),u=t.UseUnevaluated()?Ge(c,We(s,l)):Ge(c,s);return ht(_t(r),Tt(0),[i,a],u)}function MS(e,t,n,r){return kS(t,n,r)?AS(t,n,r):jS(e,t,n,r)}function NS(e,t,n,r){let i=new RegExp(OS(n));return Me(Ie(r),0,(a,o)=>i.test(a)||kT(e,t,n.additionalProperties,r[a])&&t.AddKey(a))}function PS(e,t,n,r,i,a){let o=new RegExp(OS(i)),s=[];return Ne(Ie(a),0,(c,l)=>{let u=`${n}/additionalProperties`,d=`${r}/${c}`,f=new uS,p=o.test(c)||jT(e,f,u,d,i.additionalProperties,a[c])&&t.AddKey(c);return p||s.push(c),p})||t.AddError({keyword:`additionalProperties`,schemaPath:n,instancePath:r,params:{additionalProperties:s}})}function FS(e,t,n,r,i){let a=Ot(`results`,`[]`),o=n.map((e,t)=>Ot(`context_${t}`,Ct(`CheckContext`,[]))),s=n.map((n,i)=>Ot(`condition_${i}`,St(xt([`context`],OT(e,t,n,r)),[`context_${i}`]))),c=n.map((e,t)=>kt(`condition_${t}`,St(wt(`results`,`push`),[`context_${t}`]))),l=At(We(i,t.Merge(`results`)));return St(xt([],Dt([a,...o,...s,...c,l])),[])}function IS(e,t,n,r){return FS(e,t,n.allOf,r,ct(wt(`results`,`length`),Tt(n.allOf.length)))}function LS(e,t,n,r){return jt(n.allOf.map(n=>OT(e,t,n,r)))}function RS(e,t,n,r){return t.UseUnevaluated()?IS(e,t,n,r):LS(e,t,n,r)}function zS(e,t,n,r){let i=n.allOf.reduce((t,n)=>{let i=new cS;return AT(e,i,n,r)?[...t,i]:t},[]);return H(i.length,n.allOf.length)&&t.Merge(i)}function BS(e,t,n,r,i,a){let o=[],s=i.allOf.reduce((t,i,s)=>{let c=`${n}/allOf/${s}`,l=new uS,u=MT(e,l,c,r,i,a);return u||o.push(l),u?[...t,l]:t},[]),c=H(s.length,i.allOf.length)&&t.Merge(s);return c||o.forEach(e=>e.GetErrors().forEach(e=>t.AddError(e))),c}function VS(e,t,n,r){return FS(e,t,n.anyOf,r,lt(wt(`results`,`length`),Tt(0)))}function HS(e,t,n,r){return Mt(n.anyOf.map(n=>OT(e,t,n,r)))}function US(e,t,n,r){return t.UseUnevaluated()?VS(e,t,n,r):HS(e,t,n,r)}function WS(e,t,n,r){let i=n.anyOf.reduce((t,n)=>{let i=new cS;return AT(e,i,n,r)?[...t,i]:t},[]);return Se(i.length,0)&&t.Merge(i)}function GS(e,t,n,r,i,a){let o=[],s=i.anyOf.reduce((t,i,s)=>{let c=new uS,l=MT(e,c,`${n}/anyOf/${s}`,r,i,a);return l||o.push(c),l?[...t,c]:t},[]),c=Se(s.length,0)&&t.Merge(s);return c||o.forEach(e=>e.GetErrors().forEach(e=>t.AddError(e))),c||t.AddError({keyword:`anyOf`,schemaPath:n,instancePath:r,params:{}})}function KS(e,t,n,r){return Tt(!!n)}function qS(e,t,n,r){return n}function JS(e,t,n,r,i,a){return qS(e,t,i,a)||t.AddError({keyword:`boolean`,schemaPath:n,instancePath:r,params:{}})}function YS(e,t,n,r){return Oe(n.const)?ct(r,Tt(n.const)):yt(r,fS(n.const))}function XS(e,t,n,r){return Oe(n.const)?H(r,n.const):Ve(r,n.const)}function ZS(e,t,n,r,i,a){return XS(e,t,i,a)||t.AddError({keyword:`const`,schemaPath:n,instancePath:r,params:{allowedValue:i.const}})}function QS(e){return!(Fx(e)&&H(e.minContains,0))}function $S(e,t,n,r){if(!QS(n))return Tt(!0);let i=SS();return We(Ke(ct(wt(r,`length`),Tt(0))),St(wt(r,`some`),[xt([i],OT(e,t,n.contains,i))]))}function eC(e,t,n,r){return QS(n)?!H(r.length,0)&&r.some(r=>AT(e,t,n.contains,r)):!0}function tC(e,t,n,r,i,a){return eC(e,t,i,a)||t.AddError({keyword:`contains`,schemaPath:n,instancePath:r,params:{minContains:1}})}function nC(e,t,n,r){return Ge(ct(wt(_t(r),`length`),Tt(0)),jt(Fe(n.dependencies).map(([n,i])=>{let a=Ke(vt(r,Tt(n))),o=OT(e,t,i,r);return Ge(a,R(i)?(e=>jt(e.map(e=>vt(r,Tt(e)))))(i):o)})))}function rC(e,t,n,r){let i=H(Ie(r).length,0),a=Me(Fe(n.dependencies),0,([n,i])=>!U(r,n)||(R(i)?i.every(e=>U(r,e)):AT(e,t,i,r)));return i||a}function iC(e,t,n,r,i,a){let o=H(Ie(a).length,0),s=Ne(Fe(i.dependencies),0,([i,o])=>{let s=`${n}/dependencies/${i}`;return!U(a,i)||(R(o)?o.every(e=>U(a,e)||t.AddError({keyword:`dependencies`,schemaPath:n,instancePath:r,params:{property:i,dependencies:o}})):MT(e,t,s,r,o,a))});return o||s}function aC(e,t,n,r){return Ge(ct(wt(_t(r),`length`),Tt(0)),jt(Fe(n.dependentRequired).map(([e,t])=>Ge(Ke(vt(r,Tt(e))),jt(t.map(e=>vt(r,Tt(e))))))))}function oC(e,t,n,r){let i=H(Ie(r).length,0),a=Me(Fe(n.dependentRequired),0,([e,t])=>!U(r,e)||t.every(e=>U(r,e)));return i||a}function sC(e,t,n,r,i,a){let o=H(Ie(a).length,0),s=Ne(Fe(i.dependentRequired),0,([e,i])=>!U(a,e)||Ne(i,0,o=>U(a,o)||t.AddError({keyword:`dependentRequired`,schemaPath:n,instancePath:r,params:{property:e,dependencies:i}})));return o||s}function cC(e,t,n,r){return Ge(ct(wt(_t(r),`length`),Tt(0)),jt(Fe(n.dependentSchemas).map(([n,i])=>Ge(Ke(vt(r,Tt(n))),OT(e,t,i,r)))))}function lC(e,t,n,r){let i=H(Ie(r).length,0),a=Me(Fe(n.dependentSchemas),0,([n,i])=>!U(r,n)||AT(e,t,i,r));return i||a}function uC(e,t,n,r,i,a){let o=H(Ie(a).length,0),s=Ne(Fe(i.dependentSchemas),0,([i,o])=>{let s=`${n}/dependentSchemas/${i}`;return!U(a,i)||MT(e,t,s,r,o,a)});return o||s}function dC(e,t,n,r){return Mt(n.enum.map(e=>Oe(e)?ct(r,Tt(e)):yt(r,fS(e))))}function fC(e,t,n,r){return n.enum.some(e=>Oe(e)?H(r,e):Ve(r,e))}function pC(e,t,n,r,i,a){return fC(e,t,i,a)||t.AddError({keyword:`enum`,schemaPath:n,instancePath:r,params:{allowedValues:i.enum}})}function mC(e,t,n,r){return ut(r,Tt(n.exclusiveMaximum))}function hC(e,t,n,r){return Ce(r,n.exclusiveMaximum)}function gC(e,t,n,r,i,a){return hC(e,t,i,a)||t.AddError({keyword:`exclusiveMaximum`,schemaPath:n,instancePath:r,params:{comparison:`<`,limit:i.exclusiveMaximum}})}function _C(e,t,n,r){return lt(r,Tt(n.exclusiveMinimum))}function vC(e,t,n,r){return Se(r,n.exclusiveMinimum)}function yC(e,t,n,r,i,a){return vC(e,t,i,a)||t.AddError({keyword:`exclusiveMinimum`,schemaPath:n,instancePath:r,params:{comparison:`>`,limit:i.exclusiveMinimum}})}function bC(e,t,n,r){return St(wt(`Format`,`Test`),[Tt(n.format),r])}function xC(e,t,n,r){return Qb(n.format,r)}function SC(e,t,n,r,i,a){return xC(e,t,i,a)||t.AddError({keyword:`format`,schemaPath:n,instancePath:r,params:{format:i.format}})}function CC(e,t,n,r){let i=Qx(n)?n.then:!0,a=bx(n)?n.else:!0;return Et(OT(e,t,n.if,r),OT(e,t,i,r),OT(e,t,a,r))}function wC(e,t,n,r){let i=Qx(n)?n.then:!0,a=bx(n)?n.else:!0;return AT(e,t,n.if,r)?AT(e,t,i,r):AT(e,t,a,r)}function TC(e,t,n,r,i,a){let o=Qx(i)?i.then:!0,s=bx(i)?i.else:!0,c=new uS,l=MT(e,c,`${n}/if`,r,i.if,a)?MT(e,c,`${n}/then`,r,o,a)||t.AddError({keyword:`if`,schemaPath:n,instancePath:r,params:{failingKeyword:`then`}}):MT(e,t,`${n}/else`,r,s,a)||t.AddError({keyword:`if`,schemaPath:n,instancePath:r,params:{failingKeyword:`else`}});return l&&t.Merge([c]),l}function EC(e,t,n,r){return jt(n.items.map((n,i)=>{let a=dt(wt(r,`length`),Tt(i)),o=DT(e,t,n,`${r}[${i}]`),s=t.AddIndex(Tt(i));return Ge(a,t.UseUnevaluated()?We(o,s):o)}))}function DC(e,t,n,r){return Me(n.items,0,(n,i)=>we(r.length,i)||kT(e,t,n,r[i])&&t.AddIndex(i))}function OC(e,t,n,r,i,a){return Ne(i.items,0,(i,o)=>{let s=`${n}/items/${o}`,c=`${r}/${o}`;return we(a.length,o)||jT(e,t,s,c,i,a[o])&&t.AddIndex(o)})}function kC(e,t,n,r){let i=Wx(n)?n.prefixItems.length:0,a=DT(e,t,n.items,`element`),o=t.AddIndex(`index`),s=t.UseUnevaluated()?We(a,o):a;return ht(r,Tt(i),[`element`,`index`],s)}function AC(e,t,n,r){return Me(r,Wx(n)?n.prefixItems.length:0,(r,i)=>kT(e,t,n.items,r)&&t.AddIndex(i))}function jC(e,t,n,r,i,a){return Ne(a,Wx(i)?i.prefixItems.length:0,(a,o)=>jT(e,t,`${n}/items`,`${r}/${o}`,i.items,a)&&t.AddIndex(o))}function MC(e,t,n,r){return Ox(n)?EC(e,t,n,r):kC(e,t,n,r)}function NC(e,t,n,r){return Ox(n)?DC(e,t,n,r):AC(e,t,n,r)}function PC(e,t,n,r,i,a){return Ox(i)?OC(e,t,n,r,i,a):jC(e,t,n,r,i,a)}function FC(e){return mx(e)}function IC(e,t,n,r){if(!FC(n))return Tt(!0);let[i,a]=[SS(),SS()];return dt(St(wt(r,`reduce`),[xt([i,a],Et(OT(e,t,n.contains,a),Nt(i),i)),Tt(0)]),Tt(n.maxContains))}function LC(e,t,n,r){return FC(n)?we(r.reduce((r,i)=>AT(e,t,n.contains,i)?++r:r,0),n.maxContains):!0}function RC(e,t,n,r,i,a){let o=Fx(i)?i.minContains:1;return LC(e,t,i,a)||t.AddError({keyword:`contains`,schemaPath:n,instancePath:r,params:{minContains:o,maxContains:i.maxContains}})}function zC(e,t,n,r){return dt(r,Tt(n.maximum))}function BC(e,t,n,r){return we(r,n.maximum)}function VC(e,t,n,r,i,a){return BC(e,t,i,a)||t.AddError({keyword:`maximum`,schemaPath:n,instancePath:r,params:{comparison:`<=`,limit:i.maximum}})}function HC(e,t,n,r){return dt(wt(r,`length`),Tt(n.maxItems))}function UC(e,t,n,r){return we(r.length,n.maxItems)}function WC(e,t,n,r,i,a){return UC(e,t,i,a)||t.AddError({keyword:`maxItems`,schemaPath:n,instancePath:r,params:{limit:i.maxItems}})}function GC(e,t,n,r){return mt(r,Tt(n.maxLength))}function KC(e,t,n,r){return Ae(r,n.maxLength)}function qC(e,t,n,r,i,a){return KC(e,t,i,a)||t.AddError({keyword:`maxLength`,schemaPath:n,instancePath:r,params:{limit:i.maxLength}})}function JC(e,t,n,r){return dt(wt(_t(r),`length`),Tt(n.maxProperties))}function YC(e,t,n,r){return we(Ie(r).length,n.maxProperties)}function XC(e,t,n,r,i,a){return YC(e,t,i,a)||t.AddError({keyword:`maxProperties`,schemaPath:n,instancePath:r,params:{limit:i.maxProperties}})}function ZC(e){return mx(e)}function QC(e,t,n,r){if(!ZC(n))return Tt(!0);let[i,a]=[SS(),SS()];return ft(St(wt(r,`reduce`),[xt([i,a],Et(OT(e,t,n.contains,a),Nt(i),i)),Tt(0)]),Tt(n.minContains))}function $C(e,t,n,r){return ZC(n)?Te(r.reduce((r,i)=>AT(e,t,n.contains,i)?++r:r,0),n.minContains):!0}function ew(e,t,n,r,i,a){return $C(e,t,i,a)||t.AddError({keyword:`contains`,schemaPath:n,instancePath:r,params:{minContains:i.minContains}})}function tw(e,t,n,r){return ft(r,Tt(n.minimum))}function nw(e,t,n,r){return Te(r,n.minimum)}function rw(e,t,n,r,i,a){return nw(e,t,i,a)||t.AddError({keyword:`minimum`,schemaPath:n,instancePath:r,params:{comparison:`>=`,limit:i.minimum}})}function iw(e,t,n,r){return ft(wt(r,`length`),Tt(n.minItems))}function aw(e,t,n,r){return Te(r.length,n.minItems)}function ow(e,t,n,r,i,a){return aw(e,t,i,a)||t.AddError({keyword:`minItems`,schemaPath:n,instancePath:r,params:{limit:i.minItems}})}function sw(e,t,n,r){return pt(r,Tt(n.minLength))}function cw(e,t,n,r){return je(r,n.minLength)}function lw(e,t,n,r,i,a){return cw(e,t,i,a)||t.AddError({keyword:`minLength`,schemaPath:n,instancePath:r,params:{limit:i.minLength}})}function uw(e,t,n,r){return ft(wt(_t(r),`length`),Tt(n.minProperties))}function dw(e,t,n,r){return Te(Ie(r).length,n.minProperties)}function fw(e,t,n,r,i,a){return dw(e,t,i,a)||t.AddError({keyword:`minProperties`,schemaPath:n,instancePath:r,params:{limit:i.minProperties}})}function pw(e,t,n,r){return Pt(r,Tt(n.multipleOf))}function mw(e,t,n,r){return Ee(r,n.multipleOf)}function hw(e,t,n,r,i,a){return mw(e,t,i,a)||t.AddError({keyword:`multipleOf`,schemaPath:n,instancePath:r,params:{multipleOf:i.multipleOf}})}function gw(e,t,n,r){return FS(e,t,[n.not],r,Ke(ct(wt(`results`,`length`),Tt(1))))}function _w(e,t,n,r){return Ke(OT(e,t,n.not,r))}function vw(e,t,n,r){return t.UseUnevaluated()?gw(e,t,n,r):_w(e,t,n,r)}function yw(e,t,n,r){let i=new cS;return!AT(e,i,n.not,r)&&t.Merge([i])}function bw(e,t,n,r,i,a){return yw(e,t,i,a)||t.AddError({keyword:`not`,schemaPath:n,instancePath:r,params:{}})}function xw(e,t,n,r){return FS(e,t,n.oneOf,r,ct(wt(`results`,`length`),Tt(1)))}function Sw(e,t,n,r){return ct(St(wt(bt(n.oneOf.map(n=>OT(e,t,n,r))),`reduce`),[xt([`count`,`result`],Et(ct(`result`,Tt(!0)),Nt(`count`),`count`)),Tt(0)]),Tt(1))}function Cw(e,t,n,r){return t.UseUnevaluated()?xw(e,t,n,r):Sw(e,t,n,r)}function ww(e,t,n,r){let i=n.oneOf.reduce((t,n)=>{let i=new cS;return AT(e,i,n,r)?[...t,i]:t},[]);return H(i.length,1)&&t.Merge(i)}function Tw(e,t,n,r,i,a){let o=[],s=[],c=i.oneOf.reduce((t,i,c)=>{let l=new uS,u=MT(e,l,`${n}/oneOf/${c}`,r,i,a);return u&&s.push(c),u||o.push(l),u?[...t,l]:t},[]),l=H(c.length,1)&&t.Merge(c);return!l&&H(s.length,0)&&o.forEach(e=>e.GetErrors().forEach(e=>t.AddError(e))),l||t.AddError({keyword:`oneOf`,schemaPath:n,instancePath:r,params:{passingSchemas:s}})}function Ew(e,t,n,r){return St(wt(fS(B(n.pattern)?new RegExp(n.pattern,`u`):n.pattern),`test`),[r])}function Dw(e,t,n,r){return(B(n.pattern)?new RegExp(n.pattern,`u`):n.pattern).test(r)}function Ow(e,t,n,r,i,a){return Dw(e,t,i,a)||t.AddError({keyword:`pattern`,schemaPath:n,instancePath:r,params:{pattern:i.pattern}})}function kw(e,t,n,r){return jt(Fe(n.patternProperties).map(([n,i])=>{let[a,o]=[SS(),SS()],s=Ke(St(wt(fS(new RegExp(n,`u`)),`test`),[a])),c=DT(e,t,i,o),l=t.AddKey(a),u=t.UseUnevaluated()?Ge(s,We(c,l)):Ge(s,c);return ht(gt(r),Tt(0),[`[${a}, ${o}]`,`_`],u)}))}function Aw(e,t,n,r){return Me(Fe(n.patternProperties),0,([n,i])=>{let a=new RegExp(n,`u`);return Me(Fe(r),0,([n,r])=>!a.test(n)||kT(e,t,i,r)&&t.AddKey(n))})}function jw(e,t,n,r,i,a){return Ne(Fe(i.patternProperties),0,([i,o])=>{let s=`${n}/patternProperties/${i}`,c=new RegExp(i,`u`);return Ne(Fe(a),0,([n,i])=>{let a=`${r}/${n}`;return!c.test(n)||jT(e,t,s,a,o,i)&&t.AddKey(n)})})}function Mw(e,t,n,r){return jt(n.prefixItems.map((n,i)=>{let a=dt(wt(r,`length`),Tt(i)),o=DT(e,t,n,`${r}[${i}]`),s=t.AddIndex(Tt(i));return Ge(a,t.UseUnevaluated()?We(o,s):o)}))}function Nw(e,t,n,r){return H(r.length,0)||Me(n.prefixItems,0,(n,i)=>we(r.length,i)||kT(e,t,n,r[i])&&t.AddIndex(i))}function Pw(e,t,n,r,i,a){return H(a.length,0)||Ne(i.prefixItems,0,(i,o)=>{let s=`${n}/prefixItems/${o}`,c=`${r}/${o}`;return we(a.length,o)||jT(e,t,s,c,i,a[o])&&t.AddIndex(o)})}function Fw(e,t){return e.includes(t)||$t().exactOptionalPropertyTypes}function Iw(e,t){return at(wt(e,t))}function Lw(e,t){return V(e[t])}function Rw(e,t,n,r){let i=Zx(n)?n.required:[];return jt(Fe(n.properties).map(([n,a])=>{let o=Ke(vt(r,Tt(n))),s=DT(e,t,a,wt(r,n)),c=t.AddKey(Tt(n)),l=t.UseUnevaluated()?We(s,c):s,u=i.includes(n)?l:Ge(o,l);return Fw(i,n)?u:Ge(Iw(r,n),u)}))}function zw(e,t,n,r){let i=Zx(n)?n.required:[];return Me(Fe(n.properties),0,([n,a])=>{let o=!U(r,n)||kT(e,t,a,r[n])&&t.AddKey(n);return Fw(i,n)?o:Lw(r,n)||o})}function Bw(e,t,n,r,i,a){let o=Zx(i)?i.required:[];return Ne(Fe(i.properties),0,([i,s])=>{let c=`${n}/properties/${i}`,l=`${r}/${i}`,u=()=>!U(a,i)||jT(e,t,c,l,s,a[i])&&t.AddKey(i);return Fw(o,i)?u():Lw(a,i)||u()})}function Vw(e,t,n,r){let[i,a]=[SS(),SS()];return ht(_t(r),Tt(0),[i,a],OT(e,t,n.propertyNames,i))}function Hw(e,t,n,r){return Me(Ie(r),0,(r,i)=>AT(e,t,n.propertyNames,r))}function Uw(e,t,n,r,i,a){let o=[];return Ne(Ie(a),0,(t,a)=>{let s=`${r}/${t}`,c=`${n}/propertyNames`,l=MT(e,new uS,c,s,i.propertyNames,t);return l||o.push(t),l})||t.AddError({keyword:`propertyNames`,schemaPath:n,instancePath:r,params:{propertyNames:o}})}function Ww(e,t,n,r){return RT(e,t,e.RecursiveRef(n.$recursiveRef)??!1,r)}function Gw(e,t,n,r){let i=e.RecursiveRef(n.$recursiveRef)??!1;return sx(i)&&AT(e,t,i,r)}function Kw(e,t,n,r,i,a){let o=e.RecursiveRef(i.$recursiveRef)??!1;return sx(o)&&MT(e,t,`#`,r,o,a)}function qw(e,t,n,r){let i=xt([`context`,`value`],RT(e,t,n,`value`));return St(xt([`context`,`value`],Dt([Ot(`nextContext`,Ct(`CheckContext`,[])),Ot(`result`,St(i,[`nextContext`,`value`])),kt(`result`,t.Merge(`[nextContext]`)),At(`result`)])),[`context`,r])}function Jw(e,t,n,r){return RT(e,t,n,r)}function Yw(e,t,n,r){let i=e.Ref(n.$ref)??!1;return t.UseUnevaluated()?qw(e,t,i,r):Jw(e,t,i,r)}function Xw(e,t,n,r){let i=e.Ref(n.$ref)??!1,a=new cS,o=sx(i)&&AT(e,a,i,r);return o&&t.Merge([a]),o}function Zw(e,t,n,r,i,a){let o=e.Ref(i.$ref)??!1,s=new uS,c=sx(o)&&MT(e,s,`#`,r,o,a);return c&&t.Merge([s]),c||s.GetErrors().forEach(e=>t.AddError(e)),c}function Qw(e,t,n,r){return jt(n.required.map(e=>vt(r,Tt(e))))}function $w(e,t,n,r){return Me(n.required,0,e=>U(r,e))}function eT(e,t,n,r,i,a){let o=[];return Ne(i.required,0,e=>{let t=U(a,e);return t||o.push(e),t})||t.AddError({keyword:`required`,schemaPath:n,instancePath:r,params:{requiredProperties:o}})}function tT(e,t,n,r){return H(n,`object`)?tt(r):H(n,`array`)?qe(r):H(n,`boolean`)?Xe(r):H(n,`integer`)?Ze(r):H(n,`number`)?et(r):H(n,`null`)?$e(r):H(n,`string`)?rt(r):H(n,`asyncIterator`)?Je(r):H(n,`bigint`)?Ye(r):H(n,`constructor`)?st(r):H(n,`function`)?ot(r):H(n,`iterator`)?Qe(r):H(n,`symbol`)?it(r):H(n,`undefined`)||H(n,`void`)?at(r):Tt(!0)}function nT(e,t,n,r,i){return H(n,`object`)?ye(i):H(n,`array`)?R(i):H(n,`boolean`)?fe(i):H(n,`integer`)?he(i):H(n,`number`)?ve(i):H(n,`null`)?_e(i):H(n,`string`)?B(i):H(n,`asyncIterator`)?de(i):H(n,`bigint`)?z(i):H(n,`constructor`)?pe(i):H(n,`function`)?me(i):H(n,`iterator`)?ge(i):H(n,`symbol`)?xe(i):H(n,`undefined`)||H(n,`void`)?V(i):!0}function rT(e,t,n,r){return Mt(n.map(n=>tT(e,t,n,r)))}function iT(e,t,n,r,i){return n.some(n=>nT(e,t,n,r,i))}function aT(e,t,n,r){return R(n.type)?rT(e,t,n.type,r):tT(e,t,n.type,r)}function oT(e,t,n,r){return R(n.type)?iT(e,t,n.type,n,r):nT(e,t,n.type,n,r)}function sT(e,t,n,r,i,a){return(R(i.type)?iT(e,t,i.type,i,a):nT(e,t,i.type,i,a))||t.AddError({keyword:`type`,schemaPath:n,instancePath:r,params:{type:i.type}})}function cT(e,t,n,r){let[i,a]=[SS(),SS()],o=St(wt(`context`,`GetIndices`),[]),s=St(wt(`indices`,`has`),[i]),c=OT(e,t,n.unevaluatedItems,a),l=St(wt(`context`,`AddIndex`),[i]),u=ht(r,Tt(0),[a,i],We(Ge(s,c),l));return St(xt([`context`],Dt([Ot(`indices`,o),At(u)])),[`context`])}function lT(e,t,n,r){let i=t.GetIndices();return Me(r,0,(r,a)=>(i.has(a)||AT(e,t,n.unevaluatedItems,r))&&t.AddIndex(a))}function uT(e,t,n,r,i,a){let o=t.GetIndices(),s=[];return Ne(a,0,(a,c)=>{let l=new uS,u=(o.has(c)||MT(e,l,n,r,i.unevaluatedItems,a))&&t.AddIndex(c);return u||s.push(c),u})||t.AddError({keyword:`unevaluatedItems`,schemaPath:n,instancePath:r,params:{unevaluatedItems:s}})}function dT(e,t,n,r){let[i,a]=[SS(),SS()],o=St(wt(`context`,`GetKeys`),[]),s=St(wt(`keys`,`has`),[i]),c=St(wt(`context`,`AddKey`),[i]),l=OT(e,t,n.unevaluatedProperties,a),u=ht(gt(r),Tt(0),[`[${i}, ${a}]`,`_`],Ge(s,We(l,c)));return St(xt([`context`],Dt([Ot(`keys`,o),At(u)])),[`context`])}function fT(e,t,n,r){let i=t.GetKeys();return Me(Fe(r),0,([r,a])=>i.has(r)||AT(e,t,n.unevaluatedProperties,a)&&t.AddKey(r))}function pT(e,t,n,r,i,a){let o=t.GetKeys(),s=[];return Ne(Fe(a),0,([a,c])=>{let l=new uS,u=o.has(a)||MT(e,l,n,r,i.unevaluatedProperties,c)&&t.AddKey(a);return u||s.push(a),u})||t.AddError({keyword:`unevaluatedProperties`,schemaPath:n,instancePath:r,params:{unevaluatedProperties:s}})}function mT(e){return!H(e.uniqueItems,!1)}function hT(e,t,n,r){return mT(n)?ct(wt(Ct(`Set`,[St(wt(r,`map`),[wt(`Hashing`,`Hash`)])]),`size`),wt(r,`length`)):Tt(!0)}function gT(e,t,n,r){if(!mT(n))return!0;let i=new Set(r.map(ni)).size,a=r.length;return H(i,a)}function _T(e,t,n,r,i,a){if(!mT(i))return!0;let o=new Set,s=a.reduce((e,t,n)=>{let r=ni(t);return o.has(r)?[...e,n]:(o.add(r),e)},[]);return H(s.length,0)||t.AddError({keyword:`uniqueItems`,schemaPath:n,instancePath:r,params:{duplicateItems:s}})}function vT(e,t){return $x(e)&&(R(e.type)&&e.type.includes(t)||H(e.type,t))}function yT(e){return vT(e,`object`)}function bT(e){return ax(e)&&(lx(e)||gx(e)||_x(e)||vx(e)||Gx(e)||Ux(e)||Kx(e)||Rx(e)||Nx(e)||Zx(e)||nS(e))}function xT(e){return vT(e,`array`)}function ST(e){return ax(e)&&(cx(e)||Dx(e)||mx(e)||Ax(e)||jx(e)||Fx(e)||Ix(e)||Wx(e)||tS(e)||eS(e))}function CT(e){return vT(e,`string`)}function wT(e){return ax(e)&&(Lx(e)||Mx(e)||wx(e)||Hx(e))}function TT(e){return vT(e,`number`)||vT(e,`bigint`)}function ET(e){return ax(e)&&(Px(e)||kx(e)||Sx(e)||Cx(e)||zx(e))}function DT(e,t,n,r){return t.UseUnevaluated()?We(We(t.Push(),OT(e,t,n,r)),t.Pop()):OT(e,t,n,r)}function OT(e,t,n,r){e.Push(n);let i=[];if(ox(n))return KS(e,t,n,r);if($x(n)&&i.push(aT(e,t,n,r)),bT(n)){let a=[];Zx(n)&&a.push(Qw(e,t,n,r)),lx(n)&&a.push(MS(e,t,n,r)),gx(n)&&a.push(nC(e,t,n,r)),_x(n)&&a.push(aC(e,t,n,r)),vx(n)&&a.push(cC(e,t,n,r)),Ux(n)&&a.push(kw(e,t,n,r)),Gx(n)&&a.push(Rw(e,t,n,r)),Kx(n)&&a.push(Vw(e,t,n,r)),Rx(n)&&a.push(uw(e,t,n,r)),Nx(n)&&a.push(JC(e,t,n,r));let o=jt(a),s=Ge(Ke(tt(r)),o);i.push(yT(n)?o:s)}if(ST(n)){let a=[];cx(n)&&a.push(wS(e,t,n,r)),mx(n)&&a.push($S(e,t,n,r)),Dx(n)&&a.push(MC(e,t,n,r)),Ax(n)&&a.push(IC(e,t,n,r)),jx(n)&&a.push(HC(e,t,n,r)),Fx(n)&&a.push(QC(e,t,n,r)),Ix(n)&&a.push(iw(e,t,n,r)),Wx(n)&&a.push(Mw(e,t,n,r)),eS(n)&&a.push(hT(e,t,n,r));let o=jt(a),s=Ge(Ke(qe(r)),o);i.push(xT(n)?o:s)}if(wT(n)){let a=[];Mx(n)&&a.push(GC(e,t,n,r)),Lx(n)&&a.push(sw(e,t,n,r)),wx(n)&&a.push(bC(e,t,n,r)),Hx(n)&&a.push(Ew(e,t,n,r));let o=jt(a),s=Ge(Ke(rt(r)),o);i.push(CT(n)?o:s)}if(ET(n)){let a=[];Sx(n)&&a.push(mC(e,t,n,r)),Cx(n)&&a.push(_C(e,t,n,r)),kx(n)&&a.push(zC(e,t,n,r)),Px(n)&&a.push(tw(e,t,n,r)),zx(n)&&a.push(pw(e,t,n,r));let o=jt(a),s=Ge(Ke(Ge(et(r),Ye(r))),o);i.push(TT(n)?o:s)}Yx(n)&&i.push(Ww(e,t,n,r)),Xx(n)&&i.push(Yw(e,t,n,r)),rx(n)&&i.push(hS(e,t,n,r)),px(n)&&i.push(YS(e,t,n,r)),xx(n)&&i.push(dC(e,t,n,r)),Ex(n)&&i.push(CC(e,t,n,r)),Bx(n)&&i.push(vw(e,t,n,r)),ux(n)&&i.push(RS(e,t,n,r)),fx(n)&&i.push(US(e,t,n,r)),Vx(n)&&i.push(Cw(e,t,n,r)),tS(n)&&i.push(Ge(Ke(qe(r)),cT(e,t,n,r))),nS(n)&&i.push(Ge(Ke(nt(r)),dT(e,t,n,r))),ix(n)&&i.push(vS(e,t,n,r));let a=jt(i);return e.Pop(n),a}function kT(e,t,n,r){return t.Push()&&AT(e,t,n,r)&&t.Pop()}function AT(e,t,n,r){e.Push(n);let i=ox(n)?qS(e,t,n,r):(!$x(n)||oT(e,t,n,r))&&(!(be(r)&&!R(r))||(!Zx(n)||$w(e,t,n,r))&&(!lx(n)||NS(e,t,n,r))&&(!gx(n)||rC(e,t,n,r))&&(!_x(n)||oC(e,t,n,r))&&(!vx(n)||lC(e,t,n,r))&&(!Ux(n)||Aw(e,t,n,r))&&(!Gx(n)||zw(e,t,n,r))&&(!Kx(n)||Hw(e,t,n,r))&&(!Rx(n)||dw(e,t,n,r))&&(!Nx(n)||YC(e,t,n,r)))&&(!R(r)||(!cx(n)||TS(e,t,n,r))&&(!mx(n)||eC(e,t,n,r))&&(!Dx(n)||NC(e,t,n,r))&&(!Ax(n)||LC(e,t,n,r))&&(!jx(n)||UC(e,t,n,r))&&(!Fx(n)||$C(e,t,n,r))&&(!Ix(n)||aw(e,t,n,r))&&(!Wx(n)||Nw(e,t,n,r))&&(!eS(n)||gT(e,t,n,r)))&&(!B(r)||(!Mx(n)||KC(e,t,n,r))&&(!Lx(n)||cw(e,t,n,r))&&(!wx(n)||xC(e,t,n,r))&&(!Hx(n)||Dw(e,t,n,r)))&&(!(ve(r)||z(r))||(!Sx(n)||hC(e,t,n,r))&&(!Cx(n)||vC(e,t,n,r))&&(!kx(n)||BC(e,t,n,r))&&(!Px(n)||nw(e,t,n,r))&&(!zx(n)||mw(e,t,n,r)))&&(!Yx(n)||Gw(e,t,n,r))&&(!Xx(n)||Xw(e,t,n,r))&&(!rx(n)||gS(e,t,n,r))&&(!px(n)||XS(e,t,n,r))&&(!xx(n)||fC(e,t,n,r))&&(!Ex(n)||wC(e,t,n,r))&&(!Bx(n)||yw(e,t,n,r))&&(!ux(n)||zS(e,t,n,r))&&(!fx(n)||WS(e,t,n,r))&&(!Vx(n)||ww(e,t,n,r))&&(!tS(n)||!R(r)||lT(e,t,n,r))&&(!nS(n)||!be(r)||fT(e,t,n,r))&&(!ix(n)||yS(e,t,n,r));return e.Pop(n),i}function jT(e,t,n,r,i,a){return t.Push()&&MT(e,t,n,r,i,a)&&t.Pop()}function MT(e,t,n,r,i,a){e.Push(i);let o=ox(i)?JS(e,t,n,r,i,a):!!((!$x(i)||sT(e,t,n,r,i,a))&+(!(be(a)&&!R(a))||!!((!Zx(i)||eT(e,t,n,r,i,a))&+(!lx(i)||PS(e,t,n,r,i,a))&(!gx(i)||iC(e,t,n,r,i,a))&(!_x(i)||sC(e,t,n,r,i,a))&(!vx(i)||uC(e,t,n,r,i,a))&(!Ux(i)||jw(e,t,n,r,i,a))&(!Gx(i)||Bw(e,t,n,r,i,a))&(!Kx(i)||Uw(e,t,n,r,i,a))&(!Rx(i)||fw(e,t,n,r,i,a))&(!Nx(i)||XC(e,t,n,r,i,a))))&(!R(a)||!!((!cx(i)||ES(e,t,n,r,i,a))&+(!mx(i)||tC(e,t,n,r,i,a))&(!Dx(i)||PC(e,t,n,r,i,a))&(!Ax(i)||RC(e,t,n,r,i,a))&(!jx(i)||WC(e,t,n,r,i,a))&(!Fx(i)||ew(e,t,n,r,i,a))&(!Ix(i)||ow(e,t,n,r,i,a))&(!Wx(i)||Pw(e,t,n,r,i,a))&(!eS(i)||_T(e,t,n,r,i,a))))&(!B(a)||!!((!Mx(i)||qC(e,t,n,r,i,a))&+(!Lx(i)||lw(e,t,n,r,i,a))&(!wx(i)||SC(e,t,n,r,i,a))&(!Hx(i)||Ow(e,t,n,r,i,a))))&(!(ve(a)||z(a))||!!((!Sx(i)||gC(e,t,n,r,i,a))&+(!Cx(i)||yC(e,t,n,r,i,a))&(!kx(i)||VC(e,t,n,r,i,a))&(!Px(i)||rw(e,t,n,r,i,a))&(!zx(i)||hw(e,t,n,r,i,a))))&(!Yx(i)||Kw(e,t,n,r,i,a))&(!Xx(i)||Zw(e,t,n,r,i,a))&(!rx(i)||_S(e,t,n,r,i,a))&(!px(i)||ZS(e,t,n,r,i,a))&(!xx(i)||pC(e,t,n,r,i,a))&(!Ex(i)||TC(e,t,n,r,i,a))&(!Bx(i)||bw(e,t,n,r,i,a))&(!ux(i)||BS(e,t,n,r,i,a))&(!fx(i)||GS(e,t,n,r,i,a))&(!Vx(i)||Tw(e,t,n,r,i,a))&(!tS(i)||!R(a)||uT(e,t,n,r,i,a))&(!nS(i)||!be(a)||pT(e,t,n,r,i,a)))&&(!ix(i)||bS(e,t,n,r,i,a));return e.Pop(i),o}var NT=new Map;function PT(e,t,n,r){return e.UseUnevaluated()?St(`check_${n}`,[`context`,r]):St(`check_${n}`,[r])}function FT(e,t,n,r){let i=OT(e,t,n,`value`);return t.UseUnevaluated()?Ot(`check_${r}`,xt([`context`,`value`],i)):Ot(`check_${r}`,xt([`value`],i))}function IT(){NT.clear()}function LT(){return[...NT.values()]}function RT(e,t,n,r){let i=ax(n)?ni({__baseURL:e.BaseURL().href,...n}):ni(n),a=PT(t,n,i,r);return NT.has(i)?a:(NT.set(i,``),NT.set(i,FT(e,t,n,i)),a)}function zT(e,t){return be(t)?t[e]:void 0}function BT(e,t){return e.reduce((e,t)=>zT(t,e),t)}function VT(e){if(H(e.length,0))return[];let t=e.split(`/`).map(e=>e.replace(/~1/g,`/`).replace(/~0/g,`~`));return t.length>0&&t[0]===``?t.slice(1):t}function HT(e,t){return BT(VT(t),e)}function UT(e,t,n){if(e.$id===n.hash)return e;let r=new URL(e.$id,t.href),i=new URL(n.href,t.href);if(H(r.pathname,i.pathname))return n.hash.startsWith(`#`)?GT(e,t,n):e}function WT(e,t,n){let r=new URL(`#${e.$anchor}`,t.href),i=new URL(n.href,t.href);if(H(r.href,i.href))return e}function GT(e,t,n){return n.href.endsWith(`#`)?e:n.hash.startsWith(`#`)?HT(e,decodeURIComponent(n.hash.slice(1))):void 0}function KT(e,t,n){if(Tx(e)){let r=UT(e,t,n);if(!V(r))return r}if(dx(e)){let r=WT(e,t,n);if(!V(r))return r}return GT(e,t,n)}function qT(e,t,n){return e.reduce((e,r)=>{let i=YT(r,t,n);return V(i)?e:i},void 0)}function JT(e,t,n){return Ie(e).reduce((r,i)=>{let a=YT(e[i],t,n);return V(a)?r:a},void 0)}function YT(e,t,n){if(t=ax(e)&&Tx(e)?new URL(e.$id,t.href):t,ax(e)){let r=KT(e,t,n);if(!V(r))return r}if(R(e))return qT(e,t,n);if(be(e))return JT(e,t,n)}function XT(e,t){let n=new URL(`http://unknown`),r=Tx(e)?new URL(e.$id,n.href):n;return YT(e,r,new URL(t,r.href))}var ZT=class{constructor(e,t){this.context=e,this.schema=t,this.ids=[],this.anchors=[],this.recursiveAnchors=[],this.dynamicAnchors=[]}BaseURL(){return this.ids.reduce((e,t)=>new URL(t.$id,e),new URL(`http://unknown`))}Base(){return this.ids[this.ids.length-1]??this.schema}Push(e){ax(e)&&(Tx(e)&&this.ids.push(e),dx(e)&&this.anchors.push(e),Jx(e)&&this.recursiveAnchors.push(e),yx(e)&&this.dynamicAnchors.push(e))}Pop(e){ax(e)&&(Tx(e)&&this.ids.pop(),dx(e)&&this.anchors.pop(),Jx(e)&&this.recursiveAnchors.pop(),yx(e)&&this.dynamicAnchors.pop())}FromContext(e){return U(this.context,e)?this.context[e]:void 0}FromRef(e){return e.startsWith(`#`)?XT(this.Base(),e):XT(this.schema,e)}Ref(e){return this.FromContext(e)??this.FromRef(e)}RecursiveRef(e){return Jx(this.Base())?XT(this.recursiveAnchors[0],e):XT(this.Base(),e)}};function QT(e){return`${e.Functions().join(`;
10
+ `)}; return (value) => { ${(e.UseUnevaluated()?[`const context = new CheckContext({}, {})`,`return ${e.Call()}`]:[`return ${e.Call()}`]).join(`; `)} }`}function $T(e,t){return Er(`CheckContext`,`Guard`,`Format`,`Hashing`,e.External().identifier,t)(cS,ue,ex,Dr,e.External().variables)}function eE(e){let t=new ZT(e.Context(),e.Schema()),n=new cS;return r=>AT(t,n,e.Schema(),r)}function tE(e,t){return Tr()?$T(e,t):eE(e)}var nE=class{constructor(e,t,n,r,i,a){this.context=e,this.schema=t,this.external=n,this.functions=r,this.call=i,this.useUnevaluated=a}Context(){return this.context}Schema(){return this.schema}UseUnevaluated(){return this.useUnevaluated}External(){return this.external}Functions(){return this.functions}Call(){return this.call}Evaluate(){let e=QT(this),t=tE(this,e);return{IsAccelerated:Tr(),Code:e,Check:t}}};function rE(...e){let[t,n]=fr(e,{2:(e,t)=>[e,t],1:e=>[{},e]});pS(),IT();let r=new ZT(t,n),i=new sS(oS(t,n)),a=RT(r,i,n,`value`),o=LT();return new nE(t,n,mS(),o,a,i.UseUnevaluated())}function iE(...e){let[t,n,r]=fr(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]}),i=$t(),a=ai(),o=[];return[MT(new ZT(t,n),new lS(e=>{if(!Te(o.length,i.maxErrors))return o.push({...e,message:a(e)})}),`#`,``,n,r),o]}function aE(...e){let[t,n,r]=fr(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return AT(new ZT(t,n),new cS,n,r)}function oE(...e){let[t,n,r]=fr(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return aE(t,n,r)}function sE(...e){let[t,n,r]=fr(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]}),[i,a]=iE(t,n,r);return a}var cE=class extends Error{constructor(e,t,n){super(e),Object.defineProperty(this,`cause`,{value:{source:e,errors:n,value:t},writable:!1,configurable:!1,enumerable:!1})}};function lE(e,t,n){return R(n)?n.map(n=>jE(e,t.items,n)):n}function uE(e,t,n){return t.Clean(n)}function dE(e,t,n){return jE({...e,...t.$defs},Wn(t.$ref),n)}function fE(e,t){let n=U(t,`unevaluatedProperties`)?{additionalProperties:t.unevaluatedProperties}:{},r=xy(_y(e,t));return rr(r)?k_(r,n):r}function pE(e,t,n){return jE(e,fE(e,t),n)}function mE(e){return U(e,`additionalProperties`)?e.additionalProperties:void 0}function hE(e,t,n){if(!be(n)||R(n))return n;let r=mE(t);for(let i of Ie(n)){if(U(t.properties,i)){n[i]=jE(e,t.properties[i],n[i]);continue}if(fe(r)&&H(r,!0)||sn(r)&&oE(e,r,n[i])){n[i]=jE(e,r,n[i]);continue}delete n[i]}return n}function gE(e,t,n){if(!be(n))return n;let r=mE(t),[i,a]=[new RegExp(Sa(t)),wa(t)];for(let t of Ie(n)){if(i.test(t)){n[t]=jE(e,a,n[t]);continue}if(fe(r)&&H(r,!0)||sn(r)&&oE(e,r,n[t])){n[t]=jE(e,r,n[t]);continue}delete n[t]}return n}function _E(e,t,n){return U(e,t.$ref)?jE(e,e[t.$ref],n):n}function vE(e,t,n){if(!R(n))return n;let r=Math.min(n.length,t.items.length);for(let i=0;i<r;i++)n[i]=jE(e,t.items[i],n[i]);return Se(n.length,r)?n.slice(0,r):n}function yE(e){return e}function bE(e){let t={};for(let n of Object.getOwnPropertyNames(e))t[n]=DE(e[n]);for(let n of Object.getOwnPropertySymbols(e))t[n]=DE(e[n]);return t}function xE(e){return De(e)?yE(e):bE(e)}function SE(e){return e.map(e=>DE(e))}function CE(e){return e.slice()}function wE(e){return new Map(DE([...e.entries()]))}function TE(e){return new Set(DE([...e.values()]))}function EE(e){return e}function DE(e){return Rt(e)?CE(e):Ht(e)?wE(e):Vt(e)?TE(e):R(e)?SE(e):be(e)?xE(e):EE(e)}function OE(e,t){return JSON.stringify(e).localeCompare(JSON.stringify(t))}function kE(e,t=1){return e.sort((e,n)=>{let r=dm(e,n);return(H(r,`disjoint`)?OE(e,n):H(r,`right-inside`)?1:H(r,`left-inside`)?-1:OE(e,n))*t})}function AE(e,t,n){for(let r of kE(t.anyOf)){let t=jE(e,r,DE(n));if(oE(e,r,t))return t}return n}function jE(e,t,n){return An(t)?lE(e,t,n):Ln(t)?uE(e,t,n):dr(t)?dE(e,t,n):br(t)?pE(e,t,n):rr(t)?hE(e,t,n):Ta(t)?gE(e,t,n):Gn(t)?_E(e,t,n):ja(t)?vE(e,t,n):or(t)?AE(e,t,n):n}function ME(...e){let[t,n,r]=fr(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return jE(t,n,r)}function NE(e){return be(e)&&U(e,`value`)}function PE(e){return{value:e}}function FE(e){return R(e)?PE(e):PE([e])}function IE(e){return H(e,!0)?PE(BigInt(1)):PE(BigInt(0))}var LE=/^-?(0|[1-9]\d*)n$/,RE=/^-?(0|[1-9]\d*)\.\d+$/,zE=/^-?(0|[1-9]\d*)$/;function BE(e){return LE.test(e)}function VE(e){return RE.test(e)}function HE(e){return zE.test(e)}function UE(e){let t=e.toLowerCase();return BE(e)?PE(BigInt(e.slice(0,e.length-1))):VE(e)?PE(BigInt(e.split(`.`)[0])):HE(e)?PE(BigInt(e)):H(t,`false`)?PE(BigInt(0)):H(t,`true`)?PE(BigInt(1)):void 0}function WE(e){return z(e)?PE(e):fe(e)?IE(e):ve(e)?PE(BigInt(Math.trunc(e))):_e(e)?PE(BigInt(0)):B(e)?UE(e):V(e)?PE(BigInt(0)):void 0}function GE(e){return H(e,BigInt(0))?PE(!1):H(e,BigInt(1))?PE(!0):void 0}function KE(e){return H(e,0)?PE(!1):H(e,1)?PE(!0):void 0}function qE(e){return H(e.toLowerCase(),`false`)?PE(!1):H(e.toLowerCase(),`true`)?PE(!0):H(e,`0`)?PE(!1):H(e,`1`)?PE(!0):void 0}function JE(e){return z(e)?GE(e):fe(e)?PE(e):ve(e)?KE(e):_e(e)?PE(!1):B(e)?qE(e):V(e)?PE(!1):void 0}function YE(e){return H(e,BigInt(0))?PE(null):void 0}function XE(e){return H(e,!1)?PE(null):void 0}function ZE(e){return H(e,0)?PE(null):void 0}function QE(e){let t=e.toLowerCase();return H(t,`undefined`)||H(t,`null`)||H(e,``)||H(e,`0`)?PE(null):void 0}function $E(e){return z(e)?YE(e):fe(e)?XE(e):ve(e)?ZE(e):_e(e)?PE(null):B(e)?QE(e):V(e)?PE(null):void 0}var eD=BigInt(2**53-1),tD=BigInt(-(2**53-1));function nD(e){return e<=eD&&e>=tD?PE(Number(e)):void 0}function rD(e){return PE(+!!e)}function iD(e){let t=+e;if(ve(t))return PE(t);let n=e.toLowerCase();if(H(n,`false`))return PE(0);if(H(n,`true`))return PE(1);let r=WE(e);if(NE(r))return r.value<=eD&&r.value>=tD?PE(Number(r.value)):void 0}function aD(e){return z(e)?nD(e):fe(e)?rD(e):ve(e)?PE(e):_e(e)?PE(0):B(e)?iD(e):V(e)?PE(0):void 0}function oD(e){return z(e)||fe(e)||ve(e)?PE(e.toString()):_e(e)?PE(`null`):B(e)?PE(e):V(e)?PE(``):void 0}function sD(e){return H(e,BigInt(0))?PE(void 0):void 0}function cD(e){return H(e,!1)?PE(void 0):void 0}function lD(e){return H(e,0)?PE(void 0):void 0}function uD(e){let t=e.toLowerCase();return H(t,`undefined`)||H(t,`null`)||H(e,``)||H(e,`0`)?PE(void 0):void 0}function dD(e){return z(e)?sD(e):fe(e)?cD(e):ve(e)?lD(e):_e(e)?PE(void 0):B(e)?uD(e):V(e)?PE(e):void 0}function fD(e,t,n){return FE(n).value.map(n=>BD(e,t.items,n))}function pD(e,t,n){return t.Convert(n)}function mD(e,t,n){let r=WE(n);return NE(r)?r.value:n}function hD(e,t,n){let r=JE(n);return NE(r)?r.value:n}function gD(e,t,n){return BD({...e,...t.$defs},Wn(t.$ref),n)}function _D(e,t,n){if(t.anyOf.some(t=>oE(e,t,n)))return n;let r=t.anyOf.map(t=>BD(e,t,DE(n))).find(n=>oE(e,t,n));return V(r)?n:r}function vD(e,t,n){return _D(e,Zd(t),n)}function yD(e,t,n){let r=aD(n);return NE(r)?Math.trunc(r.value):n}function bD(e,t,n){return BD(e,xy(_y(e,t)),n)}function xD(e,t,n){let r=WE(n);return NE(r)&&H(t.const,r.value)?r.value:n}function SD(e,t,n){let r=JE(n);return NE(r)&&H(t.const,r.value)?r.value:n}function CD(e,t,n){let r=aD(n);return NE(r)&&H(t.const,r.value)?r.value:n}function wD(e,t,n){let r=oD(n);return NE(r)&&H(t.const,r.value)?r.value:n}function TD(e,t,n){return H(t.const,n)?n:Mi(t)?xD(e,t,n):Ni(t)?SD(e,t,n):Pi(t)?CD(e,t,n):Fi(t)?wD(e,t,n):Sr()}function ED(e,t,n){let r=$E(n);return NE(r)?r.value:n}function DD(e,t,n){let r=aD(n);return NE(r)?r.value:n}function OD(e,t,n,r){let i=Ie(r);for(let[a,o]of t)for(let t of i)a.test(t)||(r[t]=BD(e,n,r[t]));return r}function kD(e,t,n){return wn(e)&&V(n[t])}function AD(e,t,n){let r=Pe(t.properties),i=Ie(n);for(let[t,a]of r)for(let r of i)!t.test(r)||kD(a,r,n)||(n[r]=BD(e,a,n[r]));return U(t,`additionalProperties`)&&be(t.additionalProperties)?OD(e,r,t.additionalProperties,n):n}function jD(e,t,n){return ye(n)?AD(e,t,n):n}function MD(e,t,n){let r=Pe(t.patternProperties),i=Ie(n);for(let[t,a]of r)for(let r of i)t.test(r)&&(n[r]=BD(e,a,n[r]));return U(t,`additionalProperties`)&&be(t.additionalProperties)?OD(e,r,t.additionalProperties,n):n}function ND(e,t,n){return ye(n)?MD(e,t,n):n}function PD(e,t,n){return U(e,t.$ref)?BD(e,e[t.$ref],n):n}function FD(e,t,n){let r=oD(n);return NE(r)?r.value:n}function ID(e,t,n){return BD(e,pa(t.pattern),n)}function LD(e,t,n){if(!R(n))return n;for(let r=0;r<Math.min(t.items.length,n.length);r++)n[r]=BD(e,t.items[r],n[r]);return n}function RD(e,t,n){let r=dD(n);return NE(r)?r.value:n}function zD(e,t,n){return NE(dD(n))?void 0:n}function BD(e,t,n){return An(t)?fD(e,t,n):Ln(t)?pD(e,t,n):_i(t)?mD(e,t,n):yi(t)?hD(e,t,n):dr(t)?gD(e,t,n):vr(t)?vD(e,t,n):wi(t)?yD(e,t,n):br(t)?bD(e,t,n):Ii(t)?TD(e,t,n):Ri(t)?ED(e,t,n):Vi(t)?DD(e,t,n):rr(t)?jD(e,t,n):Ta(t)?ND(e,t,n):Gn(t)?PD(e,t,n):Xi(t)?FD(e,t,n):Ld(t)?ID(e,t,n):ja(t)?LD(e,t,n):Pa(t)?RD(e,t,n):or(t)?_D(e,t,n):Ra(t)?zD(e,t,n):n}function VD(...e){let[t,n,r]=fr(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return BD(t,n,r)}function HD(e,t,n){if(!R(n))return n;for(let r=0;r<n.length;r++)n[r]=QD(e,t.items,n[r]);return n}function UD(e,t,n){return t.Default(n)}function WD(e,t,n){return QD({...e,...t.$defs},Wn(t.$ref),n)}function GD(e,t){return V(t)?me(e.default)?e.default():DE(e.default):t}function KD(e,t,n){return QD(e,xy(_y(e,t)),n)}function qD(e,t,n){if(!be(n))return n;let r=Ie(t.properties);for(let i of r)V(QD(e,t.properties[i],n[i]))&&(wn(t.properties[i])||!U(t.properties[i],`default`))||(n[i]=QD(e,t.properties[i],n[i]));if(!lx(t)||fe(t.additionalProperties))return n;for(let i of Ie(n))r.includes(i)||(n[i]=QD(e,t.additionalProperties,n[i]));return n}function JD(e,t,n){if(!be(n))return n;let[r,i]=[new RegExp(Sa(t)),wa(t)];for(let t of Ie(n))r.test(t)&&hx(i)&&(n[t]=QD(e,i,n[t]));if(!lx(t))return n;for(let i of Ie(n))r.test(i)||(n[i]=QD(e,t.additionalProperties,n[i]));return n}function YD(e,t,n){return U(e,t.$ref)?QD(e,e[t.$ref],n):n}function XD(e,t,n){if(!R(n))return n;let[r,i]=[t.items,Math.max(t.items.length,n.length)];for(let t=0;t<i;t++)t<r.length&&(n[t]=QD(e,r[t],n[t]));return n}function ZD(e,t,n){for(let r of t.anyOf){let t=QD(e,r,DE(n));if(oE(e,r,t))return t}return n}function QD(e,t,n){let r=hx(t)?GD(t,n):n;return An(t)?HD(e,t,r):Ln(t)?UD(e,t,r):dr(t)?WD(e,t,r):br(t)?KD(e,t,r):rr(t)?qD(e,t,r):Ta(t)?JD(e,t,r):Gn(t)?YD(e,t,r):ja(t)?XD(e,t,r):or(t)?ZD(e,t,r):r}function $D(...e){let[t,n,r]=fr(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return QD(t,n,r)}function eO(e){return(...t)=>{let[n,r,i]=fr(t,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return e.reduce((e,t)=>t(n,r,e),i)}}function tO(e,t,n){return t[`~codec`].decode(n)}function nO(e,t,n){return t[`~codec`].encode(n)}function rO(e,t,n,r){return di(n)?H(e,`Decode`)?tO(t,n,r):nO(t,n,r):r}function iO(e,t,n,r){if(!R(r))return Sr();for(let i=0;i<r.length;i++)r[i]=DO(e,t,n.items,r[i]);return rO(e,t,n,r)}function aO(e,t,n,r){let i=rO(e,t,n,r);if(!R(i))return i;for(let r=0;r<i.length;r++)i[r]=DO(e,t,n.items,i[r]);return i}function oO(e,t,n,r){return H(e,`Decode`)?iO(e,t,n,r):aO(e,t,n,r)}function sO(e,t,n,r){return r=DO(e,{...t,...n.$defs},Wn(n.$ref),r),rO(e,t,n,r)}function cO(e){return e.reduce((e,t)=>({...e,...t}),{})}function lO(e,t){for(let n of t)if(!Ve(e,n))return n;return e}function uO(e,t,n,r){if(H(n.allOf.length,0))return rO(e,t,n,r);let i=n.allOf.map(n=>DO(e,t,n,ME(n,DE(r))));return rO(e,t,n,i.every(e=>be(e))?cO(i):lO(r,i))}function dO(e,t,n,r){if(H(n.allOf.length,0))return rO(e,t,n,r);let i=rO(e,t,n,r),a=n.allOf.map(n=>DO(e,t,n,ME(n,DE(i))));return a.every(e=>be(e))?cO(a):lO(i,a)}function fO(e,t,n,r){return H(e,`Decode`)?uO(e,t,n,r):dO(e,t,n,r)}function pO(e,t,n,r){if(!ye(r))return Sr();for(let i of Ie(n.properties))!U(r,i)||kD(n.properties[i],i,r)||(r[i]=DO(e,t,n.properties[i],r[i]));return rO(e,t,n,r)}function mO(e,t,n,r){let i=rO(e,t,n,r);if(!ye(i))return i;for(let r of Ie(n.properties))!U(i,r)||kD(n.properties[r],r,i)||(i[r]=DO(e,t,n.properties[r],i[r]));return i}function hO(e,t,n,r){return H(e,`Decode`)?pO(e,t,n,r):mO(e,t,n,r)}function gO(e,t,n,r){if(!ye(r))return Sr();let i=new RegExp(Sa(n));for(let a of Ie(r))i.test(a)||Sr(),r[a]=DO(e,t,wa(n),r[a]);return rO(e,t,n,r)}function _O(e,t,n,r){let i=rO(e,t,n,r);if(!ye(i))return i;let a=new RegExp(Sa(n));for(let r of Ie(i))a.test(r)&&(i[r]=DO(e,t,wa(n),i[r]));return i}function vO(e,t,n,r){return H(e,`Decode`)?gO(e,t,n,r):_O(e,t,n,r)}function yO(e,t,n,r){return U(t,n.$ref)?DO(e,t,t[n.$ref],r):r}function bO(e,t,n,r){return H(e,`Decode`)?rO(e,t,n,yO(e,t,n,r)):yO(e,t,n,rO(e,t,n,r))}function xO(e,t,n,r){if(!R(r))return Sr();for(let i=0;i<Math.min(n.items.length,r.length);i++)r[i]=DO(e,t,n.items[i],r[i]);return rO(e,t,n,r)}function SO(e,t,n,r){let i=rO(e,t,n,r);if(!R(i))return r;for(let r=0;r<Math.min(n.items.length,i.length);r++)i[r]=DO(e,t,n.items[r],i[r]);return i}function CO(e,t,n,r){return H(e,`Decode`)?xO(e,t,n,r):SO(e,t,n,r)}function wO(e,t,n,r){for(let i of kE(n.anyOf,1))if(oE(t,i,r))return rO(e,t,n,DO(e,t,i,r));return r}function TO(e,t,n,r){let i=rO(e,t,n,r);for(let r of kE(n.anyOf,-1)){let n=DO(e,t,r,DE(i));if(oE(t,r,n))return n}return i}function EO(e,t,n,r){return H(e,`Decode`)?wO(e,t,n,r):TO(e,t,n,r)}function DO(e,t,n,r){return An(n)?oO(e,t,n,r):dr(n)?sO(e,t,n,r):br(n)?fO(e,t,n,r):rr(n)?hO(e,t,n,r):Ta(n)?vO(e,t,n,r):Gn(n)?bO(e,t,n,r):ja(n)?CO(e,t,n,r):or(n)?EO(e,t,n,r):rO(e,t,n,r)}var OO=class extends cE{constructor(e,t){super(`Decode`,e,t)}};function kO(e,t,n){if(!oE(e,t,n))throw new OO(n,sE(e,t,n));return n}function AO(e,t,n){return DO(`Decode`,e,t,n)}var jO=eO([(e,t,n)=>DE(n),(e,t,n)=>$D(e,t,n),(e,t,n)=>VD(e,t,n),(e,t,n)=>ME(e,t,n),(e,t,n)=>kO(e,t,n),(e,t,n)=>AO(e,t,n)]);function MO(...e){let[t,n,r]=fr(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return jO(t,n,r)}var NO=class extends cE{constructor(e,t){super(`Encode`,e,t)}};function PO(e,t,n){if(!oE(e,t,n))throw new NO(n,sE(e,t,n));return n}function FO(e,t,n){return DO(`Encode`,e,t,n)}var IO=eO([(e,t,n)=>DE(n),(e,t,n)=>FO(e,t,n),(e,t,n)=>$D(e,t,n),(e,t,n)=>VD(e,t,n),(e,t,n)=>ME(e,t,n),(e,t,n)=>PO(e,t,n)]);function LO(...e){let[t,n,r]=fr(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return IO(t,n,r)}function RO(e,t){return di(t)||KO(e,t.items)}function zO(e,t){return di(t)||UO({...e,...t.$defs},Wn(t.$ref))}function BO(e,t){return di(t)||t.allOf.some(t=>KO(e,t))}function VO(e,t){return di(t)||Ie(t.properties).some(n=>KO(e,t.properties[n]))}function HO(e,t){return di(t)||KO(e,wa(t))}function UO(e,t){return qO.has(t.$ref)?!1:(qO.add(t.$ref),di(t)||U(e,t.$ref)&&KO(e,e[t.$ref]))}function WO(e,t){return di(t)||t.items.some(t=>KO(e,t))}function GO(e,t){return di(t)||t.anyOf.some(t=>KO(e,t))}function KO(e,t){return An(t)?RO(e,t):dr(t)?zO(e,t):br(t)?BO(e,t):rr(t)?VO(e,t):Ta(t)?HO(e,t):Gn(t)?UO(e,t):ja(t)?WO(e,t):or(t)?GO(e,t):di(t)}var qO=new Set;function JO(...e){let[t,n]=fr(e,{2:(e,t)=>[e,t],1:e=>[{},e]});return qO.clear(),KO(t,n)}var YO=class extends Error{constructor(e,t){super(t),this.type=e}};function XO(e,t){return me(t.default)?t.default(t):be(t.default)?DE(t.default):t.default}function ZO(e,t){if(eS(t)&&!hx(t))throw new YO(t,`Arrays with uniqueItems constraints must specify a default annotation`);let n=Ix(t)?t.minItems:0;return Array.from({length:n},()=>wk(e,t.items))}async function*QO(){}function $O(e,t){return QO()}function ek(e,t){return t.Create()}function tk(e,t){return Cx(t)?BigInt(t.exclusiveMinimum)+BigInt(1):Px(t)?BigInt(t.minimum):BigInt(0)}function nk(e,t){return!1}function rk(e,t){let n=wk(e,t.instanceType);return class{constructor(){Object.assign(this,n)}}}function ik(e,t){return wk({...e,...t.$defs},Wn(t.$ref))}function ak(e,t){return wk(e,Zd(t))}function ok(e,t){let n=wk(e,t.returnType);return()=>n}function sk(e,t){return Cx(t)&&ve(t.exclusiveMinimum)?t.exclusiveMinimum+1:Px(t)?t.minimum:0}function ck(e,t){return wk(e,xy(_y(e,t)))}function*lk(){}function uk(e,t){return lk()}function dk(e,t){return t.const}function fk(e,t){throw new YO(t,`Cannot create TNever types`)}function pk(e,t){return null}function mk(e,t){return Cx(t)&&ve(t.exclusiveMinimum)?t.exclusiveMinimum+1:Px(t)?t.minimum:0}function hk(e,t){return(V(t.required)?[]:t.required).reduce((n,r)=>({...n,[r]:wk(e,t.properties[r])}),{})}function gk(e,t){return Promise.resolve(wk(e,t.item))}function _k(e,t){if(Rx(t)&&!hx(t))throw new YO(t,`Record with the minProperties constraint must have a default annotation`);return{}}function vk(e,t){return U(e,t.$ref)?wk(e,e[t.$ref]):(()=>{throw new YO(t,`Unable to deref Ref`)})()}function yk(e,t){if((Hx(t)||wx(t))&&!hx(t))throw Error(`Strings with format or pattern constraints must specify default`);let n=Lx(t)?t.minLength:0;return``.padEnd(n)}function bk(e,t){return Symbol()}function xk(e,t){let n=pa(t.pattern);if(Xi(n))throw new YO(t,`Unable to create TemplateLiteral due to infinite type expansion`);return wk(e,n)}function Sk(e,t){return Array.from({length:t.minItems},(n,r)=>wk(e,t.items[r]))}function Ck(e,t){if(H(t.anyOf.length,0))throw Error(`Unable to create Union with no variants`);return wk(e,t.anyOf[0])}function wk(e,t){return hx(t)?XO(e,t):An(t)?ZO(e,t):Nn(t)?$O(e,t):Ln(t)?ek(e,t):_i(t)?tk(e,t):yi(t)?nk(e,t):zn(t)?rk(e,t):dr(t)?ik(e,t):vr(t)?ak(e,t):Hn(t)?ok(e,t):wi(t)?sk(e,t):br(t)?ck(e,t):Ei(t)?uk(e,t):Ii(t)?dk(e,t):Qn(t)?fk(e,t):Ri(t)?pk(e,t):Vi(t)?mk(e,t):rr(t)?hk(e,t):qi(t)?gk(e,t):Ta(t)?_k(e,t):Gn(t)?vk(e,t):Xi(t)?yk(e,t):Ui(t)?bk(e,t):Ld(t)?xk(e,t):ja(t)?Sk(e,t):Pa(t)?void 0:or(t)?Ck(e,t):(Ra(t),void 0)}function Tk(...e){let[t,n]=fr(e,{2:(e,t)=>[e,t],1:e=>[{},e]});return wk(t,n)}var Ek=class extends cE{constructor(e,t){super(`Parse`,e,t)}};function Dk(e,t,n){if(!oE(e,t,n))throw new Ek(n,sE(e,t,n));return n}var Ok=eO([(e,t,n)=>DE(n),(e,t,n)=>$D(e,t,n),(e,t,n)=>VD(e,t,n),(e,t,n)=>ME(e,t,n),(e,t,n)=>Dk(e,t,n)]);function kk(...e){let[t,n,r]=fr(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});if(oE(t,n,r))return r;if($t().correctiveParse)return Ok(t,n,r);throw new Ek(r,sE(t,n,r))}ar([nr({type:Ai(`insert`),path:Yi(),value:cr()}),Object({type:Ai(`update`),path:Yi(),value:cr()}),nr({type:Ai(`delete`),path:Yi()})]);var Ak=e=>e&&typeof e==`object`&&`format`in e&&e.format===`binary`,jk=e=>!!e&&typeof e==`object`&&!Array.isArray(e)&&typeof e.name==`string`&&typeof e.type==`string`&&typeof e.size==`number`&&typeof e.stream.bind(e)==`function`;Qt({correctiveParse:!0});var Mk=class{isBigInt=e=>Xi(e)&&`format`in e&&e.format===`bigint`;isUUID=e=>Xi(e)&&`format`in e&&e.format===`uuid`;isObject=rr;isNumber=Vi;isString=Xi;isBoolean=yi;isAny=Yn;isArray=An;isOptional=wn;isUnion=or;isInteger=wi;isNull=Ri;isUndefined=Pa;isUnsafe=Ia;isRecord=Ta;isTuple=ja;isVoid=Ra;isLiteral=Ii;isSchema=sn;isScalar=e=>this.isString(e)||this.isNumber(e)||this.isInteger(e)||this.isBoolean(e);isFile=Ak;isDateTime=e=>K.schema.isString(e)&&e.format===`date-time`;isDate=e=>K.schema.isString(e)&&e.format===`date`;isTime=e=>K.schema.isString(e)&&e.format===`time`;isDuration=e=>K.schema.isString(e)&&e.format===`duration`},Nk=class e{static format=tx;static{tx.Set(`bigint`,t=>e.isValidBigInt(t))}static translateError(e,t){return e.cause.message}static setLocale(e){}static isValidBigInt(e){if(typeof e==`number`)return Number.isInteger(e);if(!e.trim()||!/^-?\d+$/.test(e))return!1;try{return BigInt(e),!0}catch{return!1}}static DEFAULT_STRING_MAX_LENGTH=255;static DEFAULT_SHORT_STRING_MAX_LENGTH=64;static DEFAULT_LONG_STRING_MAX_LENGTH=1024;static DEFAULT_RICH_STRING_MAX_LENGTH=65535;static DEFAULT_ARRAY_MAX_ITEMS=1e3;raw=Ty;any=Jn;void=La;undefined=Na;record=ba;union=ar;tuple=Aa;null=Li;const=Ai;options=k_;schema=new Mk;extend(e,t,n){return hp(Array.isArray(e)?e:[e],t,{additionalProperties:!1,...n})}pick(e,t,n){return q_(e,t,{additionalProperties:!1,...n})}omit(e,t,n){return C_(e,t,{additionalProperties:!1,...n})}partial(e,t){return R_(e,{additionalProperties:!1,...t})}object(e,t){return nr(e,{additionalProperties:!1,...t})}array(t,n){return kn(t,{maxItems:e.DEFAULT_ARRAY_MAX_ITEMS,...n})}string(e={}){return Yi({...e})}text(t={}){let{size:n,...r}=t;return Yi({maxLength:n===`short`?e.DEFAULT_SHORT_STRING_MAX_LENGTH:n===`long`?e.DEFAULT_LONG_STRING_MAX_LENGTH:n===`rich`?e.DEFAULT_RICH_STRING_MAX_LENGTH:e.DEFAULT_STRING_MAX_LENGTH,"~options":{trim:t.trim??!0,lowercase:t.lowercase??!1},...r})}json(e){return K.record(K.text(),K.any(),e)}boolean(e){return vi({...e})}number(e){return Bi({...e})}integer(e){return Ci({...e})}int32(e){return Ci({minimum:-2147483648,maximum:2147483647,...e})}int64(e){return Bi({format:`int64`,multipleOf:1,minimum:-9007199254740991,maximum:9007199254740991,...e})}optional(e){return Cn(e)}nullable(e,t){return ar([Li(),e],t)}nullify=(e,t)=>e_(bi(`K`),Hg(e),Wn(`K`),ar([yg(e,Wn(`K`)),Li()]),t);enum(e,t){let{mode:n,name:r,...i}=t??{},a=Fa(K.text({enum:e,pattern:e.map(e=>`^${e}$`).join(`|`),...i}));return n===`text`?Object.assign(a,{mode:`text`}):Object.assign(a,{enumName:r}),a}bigint(e){return K.string({...e,format:`bigint`})}url(e){return this.string({...e,format:`url`})}binary(e={}){return this.string({...e,format:`binary`})}uuid(e){return this.string({...e,format:`uuid`})}file(e){return Fa(Jn({[f]:e,format:`binary`}))}stream(){return Fa(Jn({format:`stream`,type:`string`}))}email(e){return this.text({...e,format:`email`,trim:!0,lowercase:!0})}e164(e){return this.text({...e,description:`Phone number in E.164 format, e.g. +1234567890.`,pattern:`^\\+[1-9]\\d{1,14}$`})}bcp47(e){return this.text({...e,description:`BCP 47 language tag, e.g. en, en-US, fr, fr-CA.`,pattern:`^[a-z]{2,3}(?:-[A-Z]{2})?$`})}shortText(e){return this.text({size:`short`,...e})}longText(e){return this.text({size:`long`,...e})}richText(e){return this.text({size:`rich`,...e})}constantCase=e=>this.text({pattern:`^[A-Z_-]+$`,...e});valueLabel=e=>this.object({value:this.constantCase({description:`Machine-readable value.`}),label:this.text({description:`Human-readable label.`}),description:this.optional(this.text({description:`Description of the value.`,size:`long`}))},e);datetime=e=>K.text({...e,format:`date-time`});date=e=>K.text({...e,format:`date`});time=e=>K.text({...e,format:`time`});duration=e=>K.text({...e,format:`duration`})},K=new Nk,Pk=class extends k{cache=new Map;textEncoder=new TextEncoder;textDecoder=new TextDecoder;varCounter=0;useFunctionCompilation=!0;configure(e){return e.useFunctionCompilation!==void 0&&(this.useFunctionCompilation=e.useFunctionCompilation,this.cache.clear()),this}onConfigure=j({on:`configure`,handler:()=>{this.useFunctionCompilation=this.canUseFunction()}});encodeToString(e,t){return this.getCodec(e).encode(t)}encodeToBinary(e,t){return this.textEncoder.encode(this.encodeToString(e,t))}decode(e,t){if(t instanceof Uint8Array){let n=this.textDecoder.decode(t);return this.getCodec(e).decode(n)}return typeof t==`string`?this.getCodec(e).decode(t):Array.isArray(t)?this.reconstructObject(e,t):t}canUseFunction(){try{return Function(`return true`)()===!0}catch{return!1}}getCodec(e){let t=this.cache.get(e);return t||(t=this.useFunctionCompilation?this.compileWithFunction(e):this.compileInterpreted(e),this.cache.set(e,t)),t}nextVar(){return`_${this.varCounter++}`}compileWithFunction(e){this.varCounter=0;let t=this.genEnc(e,`v`);this.varCounter=0;let n=this.genDec(e);return{encode:Function(`v`,`return JSON.stringify(${t});`),decode:Function(`s`,`const a=JSON.parse(s);let i=0;${n.code}return ${n.result};`)}}compileInterpreted(e){let t=this;return{encode(n){return JSON.stringify(t.interpretEncode(e,n))},decode(n){let r={arr:JSON.parse(n),i:0};return t.interpretDecode(e,r)}}}interpretEncode(e,t){if(this.isLeaf(e))return t;if(K.schema.isBigInt(e))return`${t}n`;if(K.schema.isArray(e)){let n=e;return!Array.isArray(t)||K.schema.isScalar(n.items)?t:t.map(e=>this.interpretEncode(n.items,e))}if(K.schema.isObject(e)){let n=[];for(let{key:r,isOpt:i,isNullable:a,inner:o}of this.getObjectFields(e)){let e=t[r];i?n.push(e===void 0?null:this.interpretEncode(o,e)):a?n.push(e===null?null:this.interpretEncode(o,e)):n.push(this.interpretEncode(o,e))}return n}if(K.schema.isOptional(e)||K.schema.isUnion(e)){let n=this.unwrap(e);return this.isNullable(e)?t===null?null:this.interpretEncode(n,t):t===void 0?null:this.interpretEncode(n,t)}return t}interpretDecode(e,t){if(this.isLeaf(e))return t.arr[t.i++];if(K.schema.isBigInt(e))return BigInt(t.arr[t.i++].slice(0,-1));if(K.schema.isArray(e)){let n=e,r=t.arr[t.i++];return Array.isArray(r)&&K.schema.isObject(n.items)?r.map(e=>this.interpretDecodeFromValue(n.items,e)):r}if(K.schema.isObject(e)){let n={};for(let{key:r,isOpt:i,isNullable:a,inner:o}of this.getObjectFields(e)){let e=t.arr[t.i++];i?e!==null&&(n[r]=this.interpretDecodeFromValue(o,e)):a?n[r]=e===null?null:this.interpretDecodeFromValue(o,e):n[r]=this.interpretDecodeFromValue(o,e)}return n}if(K.schema.isOptional(e)||K.schema.isUnion(e)){let n=this.unwrap(e),r=t.arr[t.i++];return r===null?this.isNullable(e)?null:void 0:K.schema.isObject(n)||K.schema.isArray(n)?this.interpretDecodeFromValue(n,r):r}return t.arr[t.i++]}interpretDecodeFromValue(e,t){if(this.isLeaf(e))return t;if(K.schema.isBigInt(e))return BigInt(t.slice(0,-1));if(K.schema.isArray(e)){if(!Array.isArray(t))return t;let n=e;return K.schema.isObject(n.items)?t.map(e=>this.interpretDecodeFromValue(n.items,e)):t}if(K.schema.isObject(e)){let n=e.properties,r=Object.keys(n),i={};for(let e=0;e<r.length;e++){let a=r[e],o=n[a],s=K.schema.isOptional(o),c=this.unwrap(o),l=t[e];s&&l===null||(K.schema.isObject(c)?i[a]=this.interpretDecodeFromValue(c,l):K.schema.isBigInt(c)?i[a]=BigInt(l.slice(0,-1)):i[a]=l)}return i}return t}genEnc(e,t){if(this.isLeaf(e))return t;if(K.schema.isBigInt(e))return`${t}+'n'`;if(K.schema.isArray(e)){let n=e,r=this.genEnc(n.items,`e`);return K.schema.isScalar(n.items)?t:`${t}.map(e=>${r})`}if(K.schema.isObject(e)){let n=[];for(let{key:r,isOpt:i,isNullable:a,inner:o}of this.getObjectFields(e)){let e=`${t}[${JSON.stringify(r)}]`,s=this.genEnc(o,e);i?n.push(`${e}!==undefined?${s}:null`):a?n.push(`${e}!==null?${s}:null`):n.push(s)}return`[${n.join(`,`)}]`}if(K.schema.isOptional(e)||K.schema.isUnion(e)){let n=this.unwrap(e),r=this.genEnc(n,t);return this.isNullable(e)?`${t}!==null?${r}:null`:`${t}!==undefined?${r}:null`}return t}genDec(e){let t=this.nextVar();if(this.isLeaf(e))return{code:``,result:`a[i++]`};if(K.schema.isBigInt(e))return{code:``,result:`BigInt(a[i++].slice(0,-1))`};if(K.schema.isArray(e)){let t=e;return K.schema.isObject(t.items)?{code:``,result:`a[i++].map(e=>${this.genDecFromValue(t.items,`e`)})`}:{code:``,result:`a[i++]`}}if(K.schema.isObject(e)){let n=this.getObjectFields(e);if(n.every(({isOpt:e,isNullable:t,inner:n})=>!e&&!t&&!K.schema.isObject(n)&&!K.schema.isArray(n)))return{code:``,result:`{${n.map(({key:e})=>`${JSON.stringify(e)}:a[i++]`).join(`,`)}}`};let r=`const ${t}={};`;for(let{key:e,isOpt:i,isNullable:a,inner:o}of n){let n=JSON.stringify(e);if(i){let e=this.genDecFromValue(o,`t`);r+=`{const t=a[i++];if(t!==null){${t}[${n}]=${e};}}`}else if(a){let e=this.genDecFromValue(o,`t`);r+=`{const t=a[i++];if(t===null){${t}[${n}]=null;}else{${t}[${n}]=${e};}}`}else if(K.schema.isObject(o)){let e=this.genDecFromValue(o,`a[i++]`);r+=`${t}[${n}]=${e};`}else if(K.schema.isArray(o)){let e=o;if(K.schema.isObject(e.items)){let i=this.genDecFromValue(e.items,`e`);r+=`${t}[${n}]=a[i++].map(e=>${i});`}else r+=`${t}[${n}]=a[i++];`}else r+=`${t}[${n}]=a[i++];`}return{code:r,result:t}}if(K.schema.isOptional(e)||K.schema.isUnion(e)){let n=this.unwrap(e),r=this.genDec(n);return{code:`const ${t}t=a[i++];let ${t};if(${t}t===null){${t}=${this.isNullable(e)?`null`:`undefined`};}else{${r.code.replace(/a\[i\+\+\]/g,`${t}t`)}${t}=${r.result.replace(/a\[i\+\+\]/g,`${t}t`)};}`,result:t}}return{code:``,result:`a[i++]`}}genDecFromValue(e,t){if(this.isLeaf(e))return t;if(K.schema.isBigInt(e))return`BigInt(${t}.slice(0,-1))`;if(K.schema.isArray(e)){let n=e.items;if(K.schema.isObject(n)||K.schema.isBigInt(n)){let e=this.nextVar();return`${t}.map(${e}=>${this.genDecFromValue(n,e)})`}return t}if(K.schema.isObject(e)){let n=e.properties,r=Object.keys(n),i=this.nextVar();return`((${i}=${t})=>({${r.map((e,t)=>{let r=this.unwrap(n[e]),a=`${i}[${t}]`,o=JSON.stringify(e);return K.schema.isObject(r)?`${o}:${this.genDecFromValue(r,a)}`:K.schema.isBigInt(r)?`${o}:BigInt(${a}.slice(0,-1))`:`${o}:${a}`}).join(`,`)}}))()`}return t}isLeaf(e){return K.schema.isScalar(e)||this.isEnum(e)}getObjectFields(e){let t=e.properties,n=new Set(e.required||[]);return Object.keys(t).map(e=>{let r=t[e];return{key:e,isOpt:!n.has(e)||K.schema.isOptional(r),isNullable:this.isNullable(r),inner:this.unwrap(r)}})}isEnum(e){return`enum`in e&&Array.isArray(e.enum)&&(e.enum?.length??0)>0}isNullable(e){return K.schema.isUnion(e)?e.anyOf?.some(e=>K.schema.isNull(e))??!1:!1}unwrap(e){return`anyOf`in e&&Array.isArray(e.anyOf)&&e.anyOf.find(e=>!K.schema.isNull(e))||e}reconstructObject(e,t){if(!K.schema.isObject(e))return t;let n={},r=0;for(let{key:i,isOpt:a,isNullable:o,inner:s}of this.getObjectFields(e)){let e=t[r++];a?e!==null&&(n[i]=K.schema.isObject(s)?this.reconstructObject(s,e):e):o?n[i]=e===null?null:K.schema.isObject(s)?this.reconstructObject(s,e):e:n[i]=K.schema.isObject(s)?this.reconstructObject(s,e):e}return n}},Fk=class e extends In{constructor(...e){super();let t=fr(e,{6:(e,t,n,r,i,a)=>[e,t,n,r,i,a],2:(e,t)=>[e,t]});if(t.length===6){let[e,n,r,i,a,o]=t;this.context=e,this.type=n,this.isAccelerated=r,this.hasCodec=i,this.code=a,this.check=o}else{let[e,n]=t,r=rE(e,n).Evaluate();this.hasCodec=JO(e,n),this.context=e,this.type=n,this.isAccelerated=r.IsAccelerated,this.code=r.Code,this.check=r.Check}}IsAccelerated(){return this.isAccelerated}Context(){return this.context}Type(){return this.type}Code(){return this.code}Check(e){return this.check(e)}Errors(e){return Tr()&&this.check(e)?[]:sE(this.context,this.type,e)}Clean(e){return ME(this.context,this.type,e)}Convert(e){return VD(this.context,this.type,e)}Create(){return Tk(this.context,this.type)}Default(e){return $D(this.context,this.type,e)}Clone(){return new e(this.context,this.type,this.isAccelerated,this.hasCodec,this.code,this.check)}Parse(e){if(this.Check(e))return e;if($t().correctiveParse)return Ok(this.context,this.type,e);throw new Ek(e,this.Errors(e))}Decode(e){return this.hasCodec?MO(this.context,this.type,e):this.Parse(e)}Encode(e){return this.hasCodec?LO(this.context,this.type,e):this.Parse(e)}};function Ik(...e){let[t,n]=fr(e,{2:(e,t)=>[e,t],1:e=>[{},e]});return new Fk(t,n)}var Lk=class extends p{name=`TypeBoxError`;cause;value;constructor(e){super(`Invalid input: ${e.message}${e.instancePath?` at ${e.instancePath}`:``}`,{cause:e});let t=e.params;t?.requiredProperties?this.value={path:`/${t.requiredProperties[0]}`,message:`must be defined`}:this.value={path:e.instancePath,message:e.message},this.cause=e}},Rk=class{cache=new Map;useEval=!0;validate(e,t,n={}){let r=this.beforeParse(e,t,{trim:n.trim??!0,nullToUndefined:n.nullToUndefined??!0,deleteUndefined:n.deleteUndefined??!0});try{return this.useEval?this.getValidator(e).Parse(r):kk(e,r)}catch(e){throw e.cause?.errors?.[0]?new Lk(e.cause.errors[0]):e}}getValidator(e){if(this.cache.has(e))return this.cache.get(e);let t=Ik(e);return this.cache.set(e,t),t}beforeParse(e,t,n){if(!e)return t;if(!(t===null&&!this.isSchemaNullable(e)&&n.nullToUndefined)){if(!e.type&&e.anyOf&&(e=e.anyOf.find(e=>e.type!==`null`&&e.type!==`undefined`)||e),Array.isArray(t))return t.map(t=>this.beforeParse(e.items,t,n));if(typeof t==`string`&&e.type===`string`){let r=t;return n.trim&&e[`~options`]?.trim&&(r=r.trim()),e[`~options`]?.lowercase&&(r=r.toLowerCase()),r}if(typeof t==`object`&&t&&e.type===`object`){let r={};for(let i in t){let a=this.beforeParse(e.properties?.[i],t[i],n);a===void 0&&n.deleteUndefined||(r[i]=a)}return r}return t}}isSchemaNullable=e=>e?e.type===`null`||Array.isArray(e.type)&&e.type.includes(`null`)?!0:e.anyOf?e.anyOf.some(e=>this.isSchemaNullable(e)):e.oneOf?e.oneOf.some(e=>this.isSchemaNullable(e)):e.allOf?e.allOf.some(e=>this.isSchemaNullable(e)):!1:!1;onConfigure=j({on:`configure`,handler:()=>{this.useEval=this.canEval()}});canEval(){try{return Ik(K.object({test:K.string()})).Parse({test:`value`}),!0}catch{return!1}}},zk=class{codecs=new Map;jsonCodec=D(A);keylessCodec=D(Pk);schemaValidator=D(Rk);default=`json`;constructor(){this.register({name:`json`,codec:this.jsonCodec,default:!0}),this.register({name:`keyless`,codec:this.keylessCodec})}register(e){this.codecs.set(e.name,e.codec),e.default&&(this.default=e.name)}getCodec(e){let t=this.codecs.get(e);if(!t)throw new p(`Codec "${e}" not found. Available codecs: ${Array.from(this.codecs.keys()).join(`, `)}`);return t}encode(e,t,n){let r=this.getCodec(n?.encoder??this.default),i=n?.as??`object`;return n?.validation!==!1&&(t=this.schemaValidator.validate(e,t,n?.validation)),i===`object`?t:i===`binary`?r.encodeToBinary(e,t):r.encodeToString(e,t)}decode(e,t,n){let r=n?.encoder??this.default,i=this.getCodec(r).decode(e,t);return n?.validation!==!1&&(i=this.schemaValidator.validate(e,i,n?.validation)),i}validate(e,t,n){return this.schemaValidator.validate(e,t,n)}},Bk=class{logFn;events={};cache=new Map;sortedCache=new Map;constructor(e){this.logFn=e}get log(){return this.logFn?.()}clear(){this.events={},this.cache.clear(),this.sortedCache.clear()}on(e,t){this.events[e]||(this.events[e]={first:[],normal:[],last:[]});let n=typeof t==`function`?{callback:t}:t,r=this.events[e];return n.priority===`first`?r.first.push(n):n.priority===`last`?r.last.push(n):r.normal.push(n),this.invalidateCache(e),()=>{let t=this.events[e];if(t){for(let e of[`first`,`normal`,`last`])t[e]=t[e].filter(e=>e.callback!==n.callback);this.invalidateCache(e)}}}invalidateCache(e){this.cache.delete(e),this.cache.delete(`${e}:catch`),this.sortedCache.delete(e)}resolve(e){let t=this.sortedCache.get(e);if(t)return t;let n=this.events[e];if(!n)return[];let r=[...this.topoSort(n.first),...this.topoSort(n.normal),...this.topoSort(n.last)];return this.sortedCache.set(e,r),r}topoSort(e){if(e.length<=1||!e.some(e=>e.before&&e.before.length>0||e.after&&e.after.length>0))return e;let t=new Map,n=new Map;for(let r of e)t.set(r,0),n.set(r,new Set);let r=new Map;for(let t of e)if(t.caller){let e=r.get(t.caller);e||(e=[],r.set(t.caller,e)),e.push(t)}for(let i of e){if(i.after)for(let e of i.after){let a=r.get(e);if(a)for(let e of a)e!==i&&!n.get(e).has(i)&&(n.get(e).add(i),t.set(i,t.get(i)+1))}if(i.before)for(let e of i.before){let a=r.get(e);if(a)for(let e of a)e!==i&&!n.get(i).has(e)&&(n.get(i).add(e),t.set(e,t.get(e)+1))}}let i=[];for(let n of e)t.get(n)===0&&i.push(n);let a=[];for(;i.length>0;){let e=i.shift();a.push(e);for(let r of n.get(e)){let e=t.get(r)-1;t.set(r,e),e===0&&i.push(r)}}if(a.length!==e.length)throw new p(`Circular dependency detected in hook before/after constraints`);return a}compile(e,t={}){let n=this.resolve(e);if(n.length===0)return()=>{};let r=t.catch??!1,i=this.log,a=async(t,a)=>{for(let o=t;o<n.length;o++){let t=n[o];try{let n=t.callback(a);n&&typeof n==`object`&&`then`in n&&(r?await n.catch(n=>{i?.error(`${String(e)}(${t.caller?.name??`unknown`}) ERROR`,n)}):await n)}catch(n){if(r)i?.error(`${String(e)}(${t.caller?.name??`unknown`}) ERROR`,n);else throw n}}};return t=>{for(let o=0;o<n.length;o++){let s=n[o];try{let n=s.callback(t);if(n&&typeof n==`object`&&`then`in n)return r?n.catch(t=>{i?.error(`${String(e)}(${s.caller?.name??`unknown`}) ERROR`,t)}).then(()=>a(o+1,t)):n.then(()=>a(o+1,t))}catch(t){if(r)i?.error(`${String(e)}(${s.caller?.name??`unknown`}) ERROR`,t);else throw t}}}}async emit(e,t,n={}){if(!n.log){let r=n.catch?`${e}:catch`:e,i=this.cache.get(r);i||(i=this.compile(e,{catch:n.catch}),this.cache.set(r,i)),await i(t);return}let r=this.resolve(e);if(r.length===0)return;let i=performance.now();this.log?.trace(`${String(e)} ...`);for(let i of r){let r=i.caller?.name??`unknown`,a=performance.now();this.log?.trace(`${String(e)}(${r}) ...`);try{let e=i.callback(t);e&&typeof e==`object`&&`then`in e&&await e}catch(t){if(n.catch){this.log?.error(`${String(e)}(${r}) ERROR`,t);continue}throw new p(`Failed during '${String(e)}()' hook for service: ${r}`,{cause:t})}this.log?.debug(`${String(e)}(${r}) OK [${(performance.now()-a).toFixed(1)}ms]`)}this.log?.debug(`${String(e)} OK [${(performance.now()-i).toFixed(1)}ms]`)}},Vk=e=>new Hk(e),Hk=class{options;get schema(){return this.options.schema}get key(){return this.options.name}constructor(e){this.options=e}};Vk[u]=`atom`;var Uk=class{als=D(E);events=D(Bk);codec=D(A);atoms=new Map;store={};constructor(e={}){this.store=e}exportAtoms(e){let t={};if(e===`current`){if(this.als?.exists())for(let e of this.atoms.values()){let n=this.als.get(e.key,`current`);n!==void 0&&(t[e.key]=n)}return t}for(let[n,r]of this.atoms.entries()){let i=this.get(r,e);i!==void 0&&(t[n]=i)}return t}getAtoms(e=!0){let t=[];if(e&&this.als?.exists())for(let e of this.atoms.values()){let n=this.als.get(e.key);n!==void 0&&t.push({atom:e,value:n})}else for(let[e,n]of this.atoms.entries())t.push({atom:n,value:this.store[e]});return t}register(e){let t=e.key;return this.atoms.has(t)||(this.atoms.set(t,e),t in this.store||this.set(t,e.options.default,{skipContext:!0})),this}get(e,t){e instanceof Hk&&this.register(e);let n=e instanceof Hk?e.key:e,r=this.store;return t===`app`?r[n]:this.als?.exists()?this.als.get(n,t)??(t?void 0:r[n]):r[n]}set(e,t,n){e instanceof Hk&&this.register(e);let r=e instanceof Hk?e.key:e,i=this.store,a=this.get(r);return a===t&&typeof t!=`object`?this:(n?.skipContext!==!0&&this.als?.exists()?this.als.set(r,t):i[r]=t,n?.skipEvents!==!0&&this.events?.emit(`state:mutate`,{key:r,value:t,prevValue:a},{catch:!0}).catch(()=>null),this)}mut(e,t){let n=t(this.get(e));return this.set(e,n)}has(e){return this.als?.has(e)?!0:e in this.store}del(e){return this.set(e,void 0)}push(e,...t){let n=this.get(e)??[];return Array.isArray(n)&&this.set(e,[...n,...t]),this}clear(){return this.store={},this}keys(){return Object.keys(this.store)}},Wk=class e{static create(t={}){typeof process==`object`&&(t.env={...t.env}),typeof process==`object`&&(t.env??={},Object.assign(t.env,{NODE_ENV:`production`}));let n=new e(t);if(n.isTest()){let e=globalThis,r=t[`alepha.test.beforeAll`]??e.beforeAll,i=t[`alepha.test.afterAll`]??e.afterAll,a=t[`alepha.test.afterEach`]??e.afterEach,o=t[`alepha.test.onTestFinished`]??e.onTestFinished;r?.(()=>n.start()),i?.(()=>n.stop());try{o?.(()=>n.stop())}catch{}n.store.set(`alepha.test.beforeAll`,r).set(`alepha.test.afterAll`,i).set(`alepha.test.afterEach`,a).set(`alepha.test.onTestFinished`,o)}else t[`alepha.logger`]??={trace:console.log,debug:console.debug,info:console.log,warn:console.warn,error:console.error};return n}locked=!1;configured=!1;started=!1;ready=!1;startPromise;startedAt=0;pendingInstantiations=[];cacheEnv=new Map;modules=[];substitutions=new Map;primitiveRegistry=new Map;registry=new Map;context;events;store;codec;get log(){return this.store.get(`alepha.logger`)}get env(){return this.store.get(`env`)??{}}constructor(e={}){this.store=this.inject(Uk,{args:[e]}),this.events=this.inject(Bk),this.events.logFn=()=>this.log,this.context=this.inject(E),this.codec=this.inject(zk)}fork(e,t={}){return this.context.run(e,t)}get(e,t){return this.store.get(e,t)}set(e,t){return this.store.set(e,t),this}isLocked(){return this.locked}isConfigured(){return this.configured}isStarted(){return this.started}isReady(){return this.ready}isCI(){return this.env.GITHUB_ACTIONS?!0:!!this.env.CI}isBrowser(){return typeof window<`u`}isViteDev(){return this.isBrowser()?!1:!!this.env.VITE_ALEPHA_DEV}isBun(){return`Bun`in globalThis}isServerless(){return this.isBrowser()?!1:!!(this.env.ALEPHA_SERVERLESS||this.env.VERCEL_REGION||typeof global==`object`&&typeof global.Cloudflare==`object`)}isTest(){return this.env.NODE_ENV===`test`}isProduction(){return this.env.NODE_ENV===`production`}static STARTUP_TIMEOUT=3e4;async start(){if(this.ready)return this.log?.debug(`App is already started, skipping...`),this;if(this.startPromise){let t=performance.now()-this.startedAt;if(t>e.STARTUP_TIMEOUT)this.log?.warn(`Previous start attempt is stale (${Math.round(t)}ms ago), resetting...`),this.resetStartup();else return this.log?.warn(`App is already starting, waiting for it to finish...`),this.startPromise}return this.startedAt=performance.now(),this.startPromise=this.boot(),this.startPromise}async boot(){let e=performance.now();this.log?.info(`Starting App...`);try{for(let[e]of this.substitutions.entries())this.inject(e);let t=this.store.get(`alepha.target`);if(t){this.store.set(`alepha.target`,void 0),this.modules=[],this.registry=new Map,this.primitiveRegistry=new Map,this.pendingInstantiations=[],this.events.clear(),delete t[d],this.with(t);for(let[e]of this.substitutions.entries())this.inject(e)}return this.locked=!0,await this.events.emit(`configure`,this,{log:!0}),this.configured=!0,await this.events.emit(`start`,this,{log:!0}),this.started=!0,await this.events.emit(`ready`,this,{log:!0}),this.log?.info(`App is now ready [${Math.round(performance.now()-e)}ms]`),this.ready=!0,this}catch(e){throw this.resetStartup(),e}}resetStartup(){this.startPromise=void 0,this.startedAt=0,this.locked=!1,this.configured=!1,this.started=!1,this.ready=!1}async stop(){this.started&&(this.log?.info(`Stopping App...`),await this.events.emit(`stop`,this,{log:!0}),this.log?.info(`App is now off`),this.started=!1,this.ready=!1,this.startPromise=void 0,this.startedAt=0)}async destroy(){await this.stop(),this.modules=[],this.registry=new Map,this.primitiveRegistry=new Map,this.pendingInstantiations=[],this.substitutions=new Map,this.cacheEnv=new Map,this.events.clear(),this.locked=!1,this.configured=!1}has(t,n={}){if(t===e)return!0;let{inStack:r=!0,inRegistry:i=!0,inSubstitutions:a=!0,registry:o=this.registry}=n,{provide:s}=typeof t==`object`&&`provide`in t?t:{provide:t};if(a&&this.substitutions.get(s)||i&&o.get(s))return!0;if(r){let e=this.substitutions.get(s)?.use;return e&&this.pendingInstantiations.includes(e)?!0:this.pendingInstantiations.includes(s)}return!1}with(e){if(this.store?.get(`alepha.target`))return this;let t=`default`in e?e.default:e;if(this.has(t,{inSubstitutions:!1,inRegistry:!1}))return this;if(typeof t==`object`){if(t.provide===t.use)return this.inject(t.provide),this;if(!this.substitutions.has(t.provide)&&!this.has(t.provide)){if(this.started)throw new h;d in t.provide&&typeof t.provide[d]==`function`&&(t.use[d]??=t.provide[d]),this.substitutions.set(t.provide,{use:t.use})}else if(!t.optional)throw new g(t.provide.name,t.use.name);return this}return this.inject(t),this}inject(t,n={}){let r=n.lifetime??`singleton`,i=n.parent===void 0?v?.parent??e:n.parent,a=r===`transient`,o=r===`scoped`?this.context.get(`registry`)??this.registry:this.registry;if(t===e)return this;if(typeof t==`string`){for(let[e,n]of o.entries())if(e.name===t)return n.instance;throw new p(`Service not found: ${t}`)}let s=this.substitutions.get(t);if(s)return this.inject(s.use,{parent:i,lifetime:r});let c=this.pendingInstantiations.indexOf(t);if(c!==-1&&!a)throw new m(t.name,this.pendingInstantiations.slice(0,c).map(e=>e.name));if(!a){let e=o.get(t);if(e)return!e.parents.includes(i)&&i!==t&&e.parents.push(i),e.instance;if(this.started){let e=t[d]?.name;throw new h(`Container is locked. No more services can be added. Attempted to inject '${t.name}' from '${i?.name}'. ${e?`Module '${e}' is not registered ?`:``}`)}}let l=t[d];if(l&&typeof l==`function`&&this.with(l),this.has(t,{registry:o})&&!a)return this.inject(t,{parent:i,lifetime:r});let u=this.new(t,n.args),f={parents:[i],instance:u};if(a||o.set(t,f),u instanceof w){this.modules.push(u);let e=v.parent;v.parent=u.constructor,u.register(this),v.parent=e}return u}parseEnv(e){if(this.cacheEnv.has(e))return this.cacheEnv.get(e);let t=this.codec.validate(e,this.env),n=Object.keys(t).sort((e,t)=>t.length-e.length),r=!0;for(let e=0;r&&e<10;e++){r=!1;for(let e in t)if(typeof t[e]==`string`)for(let i of n){let n=t[e];t[e]=n.replaceAll(`$${i}`,String(t[i]??``)),t[e]!==n&&(r=!0)}}return this.cacheEnv.set(e,t),t}getEnvSchemas(){let e=[];for(let[t,n]of this.cacheEnv.entries())e.push({schema:t,values:n});return e}graph(){for(let[e]of this.substitutions.entries())this.has(e)||this.inject(e);let e={};for(let[t,{parents:n}]of this.registry.entries()){if(t.name===``||w.is(t))continue;e[t.name]={from:n.filter(e=>!!e).map(e=>e.name)};let r=this.substitutions.entries().filter(e=>e[1].use===t).map(e=>e[0].name).toArray();r.length&&(e[t.name].as=r);let i=w.of(t);i&&(e[t.name].module=i.name)}return e}dump(){let e={};for(let[t]of this.cacheEnv.entries()){let n=t;for(let[t,r]of Object.entries(n.properties)){let i=r;e[t]={description:i.description,default:i.default,required:n.required?.includes(t)??void 0,enum:i.enum?[...i.enum]:void 0}}}return{env:e,providers:this.graph()}}services(e){let t=[];for(let[n,r]of this.registry.entries())r.instance instanceof e&&t.push(r.instance);return t}primitives(e){if(typeof e==`string`){let t=e.toLowerCase().replace(`$`,``),n=`${t}primitive`;for(let[e,r]of this.primitiveRegistry.entries()){let i=e.name.toLowerCase();if(i===t||i===n)return r}return[]}return this.primitiveRegistry.get(e[u])??[]}new(e,t=[]){this.pendingInstantiations.push(e),v.alepha=this,v.service=e;let n=S(e)?new e(...t):e(...t)??{},r=n;for(let[e,t]of Object.entries(r))if(t instanceof b&&this.processPrimitive(t,e),typeof t==`object`&&t&&typeof t[f]==`object`&&`getter`in t[f]){let n=t[f].getter;Object.defineProperty(r,e,{get:()=>this.store.get(n)})}return this.pendingInstantiations.pop(),this.pendingInstantiations.length===0&&(v.alepha=void 0),v.service=this.pendingInstantiations[this.pendingInstantiations.length-1],n}processPrimitive(e,t=``){e.config.propertyKey=t,e.onInit();let n=e.constructor,r=this.primitiveRegistry.get(n);r?r.push(e):this.primitiveRegistry.set(n,[e])}};function Gk(e){if(e.const!==void 0)return K.const(e.const);if(e.enum&&Array.isArray(e.enum))return e.enum.every(e=>typeof e==`string`)?K.enum(e.enum,Kk({title:e.title,description:e.description,default:e.default})):K.union(e.enum.map(e=>K.const(e)));if(e.anyOf&&Array.isArray(e.anyOf)){let t=e.anyOf.find(e=>e.type===`null`),n=e.anyOf.filter(e=>e.type!==`null`);if(t&&n.length===1){let e=Gk(n[0]);return K.nullable(e)}return K.union(e.anyOf.map(e=>Gk(e)))}if(e.allOf&&Array.isArray(e.allOf)){let t=e.allOf.find(e=>e.type===`null`),n=e.allOf.filter(e=>e.type!==`null`);if(t&&n.length===1){let e=Gk(n[0]);return K.nullable(e)}if(n.length>0)return Gk(n[0])}if(e.oneOf&&Array.isArray(e.oneOf)){let t=e.oneOf.find(e=>e.type===`null`),n=e.oneOf.filter(e=>e.type!==`null`);if(t&&n.length===1){let e=Gk(n[0]);return K.nullable(e)}return K.union(e.oneOf.map(e=>Gk(e)))}switch(Array.isArray(e.type)?e.type[0]:e.type){case`string`:return qk(e);case`number`:return Jk(e);case`integer`:return Yk(e);case`boolean`:return Xk(e);case`null`:return K.null();case`object`:return Zk(e);case`array`:return Qk(e);default:return e.properties?Zk(e):K.any()}}function Kk(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>t!==void 0))}function qk(e){let t=Kk({title:e.title,description:e.description,default:e.default,minLength:e.minLength,maxLength:e.maxLength,pattern:e.pattern}),n=e[`~options`]?{...t,"~options":e[`~options`]}:t;switch(e.format){case`email`:return K.email(n);case`uuid`:return K.uuid(n);case`date-time`:return K.datetime(n);case`date`:return K.date(n);case`time`:return K.time(n);case`url`:case`uri`:return K.url(n);case`binary`:return K.binary(n);case`bigint`:return K.bigint(n);case`duration`:return K.duration(n);case`color`:return K.text({...n,format:`color`});case`e164`:return K.e164(n);case`bcp47`:return K.bcp47(n);default:return e.format?K.string({...n,format:e.format}):K.string(n)}}function Jk(e){return K.number(Kk({title:e.title,description:e.description,default:e.default,minimum:e.minimum,maximum:e.maximum,exclusiveMinimum:e.exclusiveMinimum,exclusiveMaximum:e.exclusiveMaximum,multipleOf:e.multipleOf}))}function Yk(e){return K.integer(Kk({title:e.title,description:e.description,default:e.default,minimum:e.minimum,maximum:e.maximum,exclusiveMinimum:e.exclusiveMinimum,exclusiveMaximum:e.exclusiveMaximum,multipleOf:e.multipleOf}))}function Xk(e){return K.boolean(Kk({title:e.title,description:e.description,default:e.default}))}function Zk(e){if(!e.properties)return K.json(Kk({title:e.title,description:e.description}));let t=new Set(e.required??[]),n={};for(let[r,i]of Object.entries(e.properties)){let e=Gk(i);t.has(r)||(e=K.optional(e)),n[r]=e}return K.object(n,Kk({title:e.title,description:e.description}))}function Qk(e){let t=e.items?Gk(e.items):K.any();return K.array(t,Kk({title:e.title,description:e.description,minItems:e.minItems,maxItems:e.maxItems,uniqueItems:e.uniqueItems}))}function $k(e){let t=x(eA,e);return Object.setPrototypeOf((...e)=>t.run(...e),t)}var eA=class extends b{handler=new tA(this.options.handler,this.options.use);get middlewares(){return(this.options.use??[]).map(e=>e[f])}run(...e){return this.handler.run(...e)}},tA=class{fn;middlewares;constructor(e,t){this.fn=e,this.middlewares=t??[]}wrapped;use(...e){this.middlewares.unshift(...e),this.wrapped=void 0}run(...e){if(!this.wrapped){this.wrapped=this.fn;for(let e=this.middlewares.length-1;e>=0;e--)this.wrapped=this.middlewares[e](this.wrapped)}return this.wrapped(...e)}};$k[u]=eA;var nA=e=>{let{alepha:t}=y();t.store.register(e);let n=t.store.get(e.key);return{[f]:{getter:e.key},...n}};K.object({page:K.optional(K.integer({description:`The page number to retrieve.`,minimum:0,default:0})),size:K.optional(K.integer({description:`The number of items per page.`,minimum:1,maximum:100,default:10})),sort:K.optional(K.text({description:`Sort by field(s). Multiple columns separated by comma. Prefix with '-' for DESC. Examples: 'name' (ASC), '-createdAt' (DESC), 'role,-name' (role ASC, name DESC)`}))});var rA=K.object({number:K.integer({description:`Page number, starting from 0`}),size:K.integer({description:`Number of items per page (requested page size)`}),offset:K.integer({description:`Offset in the dataset (page × size)`}),numberOfElements:K.integer({description:`Number of elements in THIS page (content.length). Different from totalElements which is the total across all pages.`}),totalElements:K.optional(K.integer({description:`Total number of elements across all pages. Only available when counting is enabled.`})),totalPages:K.optional(K.integer({description:"Total number of pages. Only available when `totalElements` is present."})),isEmpty:K.boolean({description:`Indicates if the current page has no items (numberOfElements === 0)`}),isFirst:K.boolean({description:`Indicates if this is the first page (number === 0)`}),isLast:K.boolean({description:`Indicates if this is the last page (no more pages after this)`}),sort:K.optional(K.object({sorted:K.boolean({description:`Whether the results are sorted`}),fields:K.array(K.object({field:K.text({description:`The field used for sorting`}),direction:K.enum([`asc`,`desc`],{description:`The direction of the sort. Either 'asc' or 'desc'`})}))}))}),iA=(e,t)=>K.object({content:K.array(e),page:rA},t);Nk.prototype.page=e=>iA(e);var aA=(e,t)=>{let n=e instanceof Wk?e:Wk.create({env:{...t?.env}});if(!(e instanceof Wk)){let t=Array.isArray(e)?e:[e];for(let e of t)n.with(e)}return(async()=>{try{await t?.configure?.(n),await n.start(),t?.ready&&await t.ready(n)}catch(e){n.log?.error(`Alepha failed to start`,e)}})(),window.alepha=n,n},oA=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ee=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},I={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=I,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,ee)}catch(e){ee(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.5`})),sA=o(((e,t)=>{t.exports=oA()})),q=l(sA(),1),cA=e=>{let[t,n]=(0,q.useState)(!1);return(0,q.useEffect)(()=>n(!0),[]),e.disabled||t?e.children:e.fallback},lA=class extends q.Component{constructor(e){super(e),this.state={}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onError&&this.props.onError(e,t)}render(){return this.state.error?this.props.fallback(this.state.error,()=>{this.setState({error:void 0})}):this.props.children}},uA=(0,q.createContext)(void 0),dA=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),fA=o(((e,t)=>{t.exports=dA()})),J=fA(),pA=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_relativeTime=r()})(e,(function(){return function(e,t,n){e||={};var r=t.prototype,i={future:`in %s`,past:`%s ago`,s:`a few seconds`,m:`a minute`,mm:`%d minutes`,h:`an hour`,hh:`%d hours`,d:`a day`,dd:`%d days`,M:`a month`,MM:`%d months`,y:`a year`,yy:`%d years`};function a(e,t,n,i){return r.fromToBase(e,t,n,i)}n.en.relativeTime=i,r.fromToBase=function(t,r,a,o,s){for(var c,l,u,d=a.$locale().relativeTime||i,f=e.thresholds||[{l:`s`,r:44,d:`second`},{l:`m`,r:89},{l:`mm`,r:44,d:`minute`},{l:`h`,r:89},{l:`hh`,r:21,d:`hour`},{l:`d`,r:35},{l:`dd`,r:25,d:`day`},{l:`M`,r:45},{l:`MM`,r:10,d:`month`},{l:`y`,r:17},{l:`yy`,d:`year`}],p=f.length,m=0;m<p;m+=1){var h=f[m];h.d&&(c=o?n(t).diff(a,h.d,!0):a.diff(t,h.d,!0));var g=(e.rounding||Math.round)(Math.abs(c));if(u=c>0,g<=h.r||!h.r){g<=1&&m>0&&(h=f[m-1]);var _=d[h.l];s&&(g=s(``+g)),l=typeof _==`string`?_.replace(`%d`,g):_(g,r,h.l,u);break}}if(r)return l;var v=u?d.future:d.past;return typeof v==`function`?v(l):v.replace(`%s`,l)},r.to=function(e,t){return a(e,t,this,!0)},r.from=function(e,t){return a(e,t,this)};var o=function(e){return e.$u?n.utc():n()};r.toNow=function(e){return this.to(o(this),e)},r.fromNow=function(e){return this.from(o(this),e)}}}))})),mA=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_duration=r()})(e,(function(){var e,t,n=1e3,r=6e4,i=36e5,a=864e5,o=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,s=31536e6,c=2628e6,l=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:s,months:c,days:a,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof v},f=function(e,t,n){return new v(e,n,t.$l)},p=function(e){return t.p(e)+`s`},m=function(e){return e<0},h=function(e){return m(e)?Math.ceil(e):Math.floor(e)},g=function(e){return Math.abs(e)},_=function(e,t){return e?m(e)?{negative:!0,format:``+g(e)+t}:{negative:!1,format:``+e+t}:{negative:!1,format:``}},v=function(){function m(e,t,n){var r=this;if(this.$d={},this.$l=n,e===void 0&&(this.$ms=0,this.parseFromMilliseconds()),t)return f(e*u[p(t)],this);if(typeof e==`number`)return this.$ms=e,this.parseFromMilliseconds(),this;if(typeof e==`object`)return Object.keys(e).forEach((function(t){r.$d[p(t)]=e[t]})),this.calMilliseconds(),this;if(typeof e==`string`){var i=e.match(l);if(i){var a=i.slice(2).map((function(e){return e==null?0:Number(e)}));return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var g=m.prototype;return g.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*u[n]}),0)},g.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=h(e/s),e%=s,this.$d.months=h(e/c),e%=c,this.$d.days=h(e/a),e%=a,this.$d.hours=h(e/i),e%=i,this.$d.minutes=h(e/r),e%=r,this.$d.seconds=h(e/n),e%=n,this.$d.milliseconds=e},g.toISOString=function(){var e=_(this.$d.years,`Y`),t=_(this.$d.months,`M`),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=_(n,`D`),i=_(this.$d.hours,`H`),a=_(this.$d.minutes,`M`),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var s=_(o,`S`),c=e.negative||t.negative||r.negative||i.negative||a.negative||s.negative,l=i.format||a.format||s.format?`T`:``,u=(c?`-`:``)+`P`+e.format+t.format+r.format+l+i.format+a.format+s.format;return u===`P`||u===`-P`?`P0D`:u},g.toJSON=function(){return this.toISOString()},g.format=function(e){var n=e||`YYYY-MM-DDTHH:mm:ss`,r={Y:this.$d.years,YY:t.s(this.$d.years,2,`0`),YYYY:t.s(this.$d.years,4,`0`),M:this.$d.months,MM:t.s(this.$d.months,2,`0`),D:this.$d.days,DD:t.s(this.$d.days,2,`0`),H:this.$d.hours,HH:t.s(this.$d.hours,2,`0`),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,`0`),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,`0`),SSS:t.s(this.$d.milliseconds,3,`0`)};return n.replace(o,(function(e,t){return t||String(r[e])}))},g.as=function(e){return this.$ms/u[p(e)]},g.get=function(e){var t=this.$ms,n=p(e);return n===`milliseconds`?t%=1e3:t=n===`weeks`?h(t/u[n]):this.$d[n],t||0},g.add=function(e,t,n){var r;return r=t?e*u[p(t)]:d(e)?e.$ms:f(e,this).$ms,f(this.$ms+r*(n?-1:1),this)},g.subtract=function(e,t){return this.add(e,t,!0)},g.locale=function(e){var t=this.clone();return t.$l=e,t},g.clone=function(){return f(this.$ms,this)},g.humanize=function(t){return e().add(this.$ms,`ms`).locale(this.$l).fromNow(!t)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get(`milliseconds`)},g.asMilliseconds=function(){return this.as(`milliseconds`)},g.seconds=function(){return this.get(`seconds`)},g.asSeconds=function(){return this.as(`seconds`)},g.minutes=function(){return this.get(`minutes`)},g.asMinutes=function(){return this.as(`minutes`)},g.hours=function(){return this.get(`hours`)},g.asHours=function(){return this.as(`hours`)},g.days=function(){return this.get(`days`)},g.asDays=function(){return this.as(`days`)},g.weeks=function(){return this.get(`weeks`)},g.asWeeks=function(){return this.as(`weeks`)},g.months=function(){return this.get(`months`)},g.asMonths=function(){return this.as(`months`)},g.years=function(){return this.get(`years`)},g.asYears=function(){return this.as(`years`)},m}(),y=function(e,t,n){return e.add(t.years()*n,`y`).add(t.months()*n,`M`).add(t.days()*n,`d`).add(t.hours()*n,`h`).add(t.minutes()*n,`m`).add(t.seconds()*n,`s`).add(t.milliseconds()*n,`ms`)};return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){return f(e,{$l:i.locale()},t)},i.isDuration=d;var a=r.prototype.add,o=r.prototype.subtract;r.prototype.add=function(e,t){return d(e)?y(this,e,1):a.bind(this)(e,t)},r.prototype.subtract=function(e,t){return d(e)?y(this,e,-1):o.bind(this)(e,t)}}}))})),hA=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_utc=r()})(e,(function(){var e=`minute`,t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,i,a){var o=i.prototype;a.utc=function(e){return new i({date:e,utc:!0,args:arguments})},o.utc=function(t){var n=a(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},o.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var s=o.parse;o.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var c=o.init;o.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else c.call(this)};var l=o.utcOffset;o.utcOffset=function(r,i){var a=this.$utils().u;if(a(r))return this.$u?0:a(this.$offset)?l.call(this):this.$offset;if(typeof r==`string`&&(r=function(e){e===void 0&&(e=``);var r=e.match(t);if(!r)return null;var i=(``+r[0]).match(n)||[`-`,0,0],a=i[0],o=60*i[1]+ +i[2];return o===0?0:a===`+`?o:-o}(r),r===null))return this;var o=Math.abs(r)<=16?60*r:r;if(o===0)return this.utc(i);var s=this.clone();if(i)return s.$offset=o,s.$u=!1,s;var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(s=this.local().add(o+c,e)).$offset=o,s.$x.$localOffset=c,s};var u=o.format;o.format=function(e){var t=e||(this.$u?`YYYY-MM-DDTHH:mm:ss[Z]`:``);return u.call(this,t)},o.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var d=o.toDate;o.toDate=function(e){return e===`s`&&this.$offset?a(this.format(`YYYY-MM-DD HH:mm:ss:SSS`)).toDate():d.call(this)};var f=o.diff;o.diff=function(e,t,n){if(e&&this.$u===e.$u)return f.call(this,e,t,n);var r=this.local(),i=a(e).local();return f.call(r,i,t,n)}}}))})),gA=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_timezone=r()})(e,(function(){var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(n,r,i){var a,o=function(e,n,r){r===void 0&&(r={});var i=new Date(e);return function(e,n){n===void 0&&(n={});var r=n.timeZoneName||`short`,i=e+`|`+r,a=t[i];return a||(a=new Intl.DateTimeFormat(`en-US`,{hour12:!1,timeZone:e,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,timeZoneName:r}),t[i]=a),a}(n,r).formatToParts(i)},s=function(t,n){for(var r=o(t,n),a=[],s=0;s<r.length;s+=1){var c=r[s],l=c.type,u=c.value,d=e[l];d>=0&&(a[d]=parseInt(u,10))}var f=a[3],p=f===24?0:f,m=a[0]+`-`+a[1]+`-`+a[2]+` `+p+`:`+a[4]+`:`+a[5]+`:000`,h=+t;return(i.utc(m).valueOf()-(h-=h%1e3))/6e4},c=r.prototype;c.tz=function(e,t){e===void 0&&(e=a);var n,r=this.utcOffset(),o=this.toDate(),s=o.toLocaleString(`en-US`,{timeZone:e}),c=Math.round((o-new Date(s))/1e3/60),l=15*-Math.round(o.getTimezoneOffset()/15)-c;if(!Number(l))n=this.utcOffset(0,t);else if(n=i(s,{locale:this.$L}).$set(`millisecond`,this.$ms).utcOffset(l,!0),t){var u=n.utcOffset();n=n.add(r-u,`minute`)}return n.$x.$timezone=e,n},c.offsetName=function(e){var t=this.$x.$timezone||i.tz.guess(),n=o(this.valueOf(),t,{timeZoneName:e}).find((function(e){return e.type.toLowerCase()===`timezonename`}));return n&&n.value};var l=c.startOf;c.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return l.call(this,e,t);var n=i(this.format(`YYYY-MM-DD HH:mm:ss:SSS`),{locale:this.$L});return l.call(n,e,t).tz(this.$x.$timezone,!0)},i.tz=function(e,t,n){var r=n&&t,o=n||t||a,c=s(+i(),o);if(typeof e!=`string`)return i(e).tz(o);var l=function(e,t,n){var r=e-60*t*1e3,i=s(r,n);if(t===i)return[r,t];var a=s(r-=60*(i-t)*1e3,n);return i===a?[r,i]:[e-60*Math.min(i,a)*1e3,Math.max(i,a)]}(i.utc(e,r).valueOf(),c,o),u=l[0],d=l[1],f=i(u).utcOffset(d);return f.$x.$timezone=o,f},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(e){a=e}}}))})),_A=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_localizedFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`};return function(t,n,r){var i=n.prototype,a=i.format;r.en.formats=e,i.format=function(t){t===void 0&&(t=`YYYY-MM-DDTHH:mm:ssZ`);var n=this.$locale().formats,r=function(t,n){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,r,i){var a=i&&i.toUpperCase();return r||n[i]||e[i]||n[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))}(t,n===void 0?{}:n);return a.call(this,r)}}}))})),vA=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),yA=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(vA()):typeof define==`function`&&define.amd?define([`dayjs`],r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_ar=r(n.dayjs)})(e,(function(e){function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r=`يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر`.split(`_`),i={1:`١`,2:`٢`,3:`٣`,4:`٤`,5:`٥`,6:`٦`,7:`٧`,8:`٨`,9:`٩`,0:`٠`},a={"١":`1`,"٢":`2`,"٣":`3`,"٤":`4`,"٥":`5`,"٦":`6`,"٧":`7`,"٨":`8`,"٩":`9`,"٠":`0`},o=/[١٢٣٤٥٦٧٨٩٠]/g,s=/،/g,c=/\d/g,l=/,/g,u={name:`ar`,weekdays:`الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت`.split(`_`),weekdaysShort:`أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت`.split(`_`),weekdaysMin:`ح_ن_ث_ر_خ_ج_س`.split(`_`),months:r,monthsShort:r,weekStart:6,meridiem:function(e){return e>12?`م`:`ص`},relativeTime:{future:`بعد %s`,past:`منذ %s`,s:`ثانية واحدة`,m:`دقيقة واحدة`,mm:`%d دقائق`,h:`ساعة واحدة`,hh:`%d ساعات`,d:`يوم واحد`,dd:`%d أيام`,M:`شهر واحد`,MM:`%d أشهر`,y:`عام واحد`,yy:`%d أعوام`},preparse:function(e){return e.replace(o,(function(e){return a[e]})).replace(s,`,`)},postformat:function(e){return e.replace(c,(function(e){return i[e]})).replace(l,`،`)},ordinal:function(e){return e},formats:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`D/‏M/‏YYYY`,LL:`D MMMM YYYY`,LLL:`D MMMM YYYY HH:mm`,LLLL:`dddd D MMMM YYYY HH:mm`}};return n.default.locale(u,null,!0),u}))})),bA=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(vA()):typeof define==`function`&&define.amd?define([`dayjs`],r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_fr=r(n.dayjs)})(e,(function(e){function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r={name:`fr`,weekdays:`dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi`.split(`_`),weekdaysShort:`dim._lun._mar._mer._jeu._ven._sam.`.split(`_`),weekdaysMin:`di_lu_ma_me_je_ve_sa`.split(`_`),months:`janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre`.split(`_`),monthsShort:`janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.`.split(`_`),weekStart:1,yearStart:4,formats:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`DD/MM/YYYY`,LL:`D MMMM YYYY`,LLL:`D MMMM YYYY HH:mm`,LLLL:`dddd D MMMM YYYY HH:mm`},relativeTime:{future:`dans %s`,past:`il y a %s`,s:`quelques secondes`,m:`une minute`,mm:`%d minutes`,h:`une heure`,hh:`%d heures`,d:`un jour`,dd:`%d jours`,M:`un mois`,MM:`%d mois`,y:`un an`,yy:`%d ans`},ordinal:function(e){return``+e+(e===1?`er`:``)}};return n.default.locale(r,null,!0),r}))})),xA=l(pA(),1),SA=l(mA(),1),CA=l(hA(),1),wA=l(gA(),1),TA=l(_A(),1);yA(),bA();var Y=l(vA(),1),EA=Y.default,DA=class e{static PLUGINS=[SA.default,xA.default,CA.default,wA.default,TA.default];alepha=D(Wk);ref=null;timeouts=[];intervals=[];constructor(){for(let t of e.PLUGINS)EA.extend(t)}onStart=j({on:`start`,handler:async()=>{await Promise.all(this.intervals.map(async e=>{e.timer??=(await e.run(),setInterval(e.run,e.duration))}))}});onStop=j({on:`stop`,handler:()=>{for(let e of[...this.timeouts])this.clearTimeout(e);for(let e of this.intervals)clearInterval(e.timer),e.duration=0,e.timer=null}});setLocale(e){EA.locale(e)}isDateTime(e){return EA.isDayjs(e)}utc(e){return EA.utc(e)}of(e){return EA(e)}toISOString(e=this.now()){return this.of(e).toISOString()}now(){return this.getCurrentDate()}nowISOString(){return this.ref?this.ref.toISOString():new Date().toISOString()}nowMillis(){return this.ref?this.ref.valueOf():Date.now()}getCurrentDate(){return this.ref?this.ref:EA()}duration=(e,t)=>Array.isArray(e)?EA.duration(e[0],e[1]):typeof e==`number`?EA.duration(e,t||`milliseconds`):e;isDurationLike(e){try{return EA.isDuration(this.duration(e))}catch{return!1}}async tick(){await new Promise(e=>setTimeout(e,0))}wait(e,t={}){return new Promise(n=>{let r,i,a=this.createTimeout(()=>{t.signal&&r&&t.signal.removeEventListener(`abort`,i),n()},e,t.now);t.signal&&(r=()=>this.clearTimeout(a),i=()=>{r(),n()},t.signal.addEventListener(`abort`,i))})}createInterval(e,t,n=!1){let r={run:e,duration:this.duration(t).asMilliseconds()};return this.intervals.push(r),n&&(r.timer=setInterval(r.run,r.duration)),r}createTimeout(e,t,n){if(this.ref&&n)return this.of(n).add(this.duration(t))<this.now()&&e(),{now:n,duration:0,callback:()=>{},clear:()=>{}};let r={now:n??this.now().valueOf(),duration:this.duration(t).asMilliseconds(),callback:e,clear:()=>this.clearTimeout(r)};return r.timer=setTimeout(()=>{let e=this.timeouts.indexOf(r);e!==-1&&this.timeouts.splice(e,1),r.callback()},r.duration),this.timeouts.push(r),r}clearTimeout(e){clearTimeout(e.timer),e.duration=0,e.timer=null;let t=this.timeouts.indexOf(e);t!==-1&&this.timeouts.splice(t,1)}clearInterval(e){clearInterval(e.timer),e.duration=0,e.timer=null}async deadline(e,t){let n=new AbortController,r=this.createTimeout(()=>n.abort(),t);try{return await e(n.signal)}finally{this.clearTimeout(r)}}async travel(e,t){this.ref=this.ref||this.now();let n=this.duration(e,t).asMilliseconds(),r=this.nowMillis();this.ref=this.ref.add(this.duration(e,t));for(let e of[...this.timeouts]){if(!e.timer)continue;clearTimeout(e.timer),e.timer=null;let t=r-e.now;if(e.duration=e.duration-t-n,e.duration<=0){let t=this.timeouts.indexOf(e);t!==-1&&this.timeouts.splice(t,1),e.callback()}else e.timer=setTimeout(()=>{let t=this.timeouts.indexOf(e);t!==-1&&this.timeouts.splice(t,1),e.callback()},e.duration)}for(let e of this.intervals){if(!e.timer)continue;clearInterval(e.timer);let t=Math.floor(n/e.duration);for(let n=0;n<t;n++)await e.run();e.timer=null}await this.tick()}pause(){return this.ref=this.ref||this.now(),this.ref}reset(){this.ref=null}},OA=e=>x(kA,e),kA=class extends b{dateTimeProvider=D(DA);called=0;onInit(){this.dateTimeProvider.createInterval(async()=>{await this.options.handler(),this.called+=1},this.options.duration)}};OA[u]=kA;var AA=C({name:`alepha.datetime`,primitives:[OA],services:[DA]}),jA=()=>{let e=(0,q.useContext)(uA);if(!e)throw new p(`Hook 'useAlepha()' must be used within an AlephaContext.Provider`);return e},MA=e=>{let t=jA();return(0,q.useMemo)(()=>t.inject(e),[])};function NA(e,t){let n=jA(),r=MA(DA),[i,a]=(0,q.useState)(!1),[o,s]=(0,q.useState)(),[c,l]=(0,q.useState)(),u=(0,q.useRef)(!1),d=(0,q.useRef)(void 0),f=(0,q.useRef)(void 0),p=(0,q.useRef)(!0),m=(0,q.useRef)(void 0);(0,q.useEffect)(()=>(p.current=!0,()=>{p.current=!1,d.current&&=(r.clearTimeout(d.current),void 0),m.current&&=(r.clearInterval(m.current),void 0),f.current&&=(f.current.abort(),void 0)}),[]);let h=(0,q.useCallback)(async(...t)=>{if(u.current)return;f.current&&f.current.abort();let r=new AbortController;f.current=r,u.current=!0,a(!0),s(void 0);try{await n.events.emit(`react:action:begin`,{type:`custom`,id:e.id});let i=await e.handler(...t,{signal:r.signal});return!p.current||r.signal.aborted?void 0:(l(i),await n.events.emit(`react:action:success`,{type:`custom`,id:e.id}),e.onSuccess&&await e.onSuccess(i),i)}catch(t){if(t instanceof Error&&t.name===`AbortError`||!p.current)return;let r=t;if(s(r),await n.events.emit(`react:action:error`,{type:`custom`,id:e.id,error:r}),e.onError)await e.onError(r);else throw r}finally{u.current=!1,p.current&&a(!1),await n.events.emit(`react:action:end`,{type:`custom`,id:e.id}),f.current===r&&(f.current=void 0)}},[...t,e.id,e.onError,e.onSuccess]),g=(0,q.useCallback)(async(...t)=>e.debounce?(d.current&&r.clearTimeout(d.current),new Promise(n=>{d.current=r.createTimeout(async()=>{n(await h(...t))},e.debounce??0)})):h(...t),[h,e.debounce]),_=(0,q.useCallback)(()=>{d.current&&=(r.clearTimeout(d.current),void 0),f.current&&=(f.current.abort(),void 0),p.current&&(u.current=!1,a(!1))},[]);return(0,q.useEffect)(()=>{e.runOnInit&&g()},t),(0,q.useEffect)(()=>{if(e.runEvery)return m.current=r.createInterval(()=>g(),e.runEvery,!0),()=>{m.current&&=(r.clearInterval(m.current),void 0)}},[g,e.runEvery]),{run:g,loading:i,error:o,cancel:_,result:c}}var PA=K.object({path:K.text({description:`Pathname used to access the action.`}),method:K.optional(K.text({description:`HTTP method. Omitted when GET (the default for ~75% of actions).`})),contentType:K.optional(K.text({description:`Content type for the request body. Only present for non-JSON types (e.g. 'multipart/form-data'). When absent, defaults to application/json.`})),kind:K.optional(K.text({description:`Action kind. Used to distinguish special action types (e.g. 'sse' for Server-Sent Events streams).`})),service:K.optional(K.text({description:`Service name associated with the action, used for service discovery and routing.`}))}),FA=K.object({prefix:K.optional(K.text()),actions:K.record(K.text(),PA),permissions:K.optional(K.array(K.text()))}),IA=Vk({name:`alepha.server.request.apiLinks`,schema:K.optional(FA)}),LA=Vk({name:`alepha.server.links.options`,description:`Configuration options for the links module.`,schema:K.object({batch:K.boolean({description:`Enable batch collection for browser-side calls.`,default:!0})}),default:{batch:!0}}),RA=class{},zA=class{},BA=class{alepha=D(Wk);formatter=D(zA);destination=D(RA);dateTimeProvider=D(DA);levels={SILENT:-1,ERROR:0,WARN:1,INFO:2,DEBUG:3,TRACE:4};service;module;app;appLogLevel=`INFO`;logLevel=`INFO`;constructor(e,t){this.service=e,this.module=t,this.app=this.alepha.env.APP_NAME}get context(){return this.alepha.context.get(`context`)}get level(){let e=this.alepha.store.get(`alepha.logger.level`);return e&&e!==this.appLogLevel&&(this.appLogLevel=e,this.logLevel=this.parseLevel(this.appLogLevel,this.module)),this.logLevel}parseLevel(e,t){let n=e.toLowerCase().split(/[,;]/);for(let e of n){let n=e.trim();if(n&&(n.includes(`:`)||n.includes(`=`))){let[e,r]=n.split(/[:=]/),i=e.trim(),a=r?.trim();if(!a)continue;if(this.matchesPattern(t,i))try{return this.asLogLevel(a)}catch{throw new p(`Invalid log level '${r?.trim()}' for module pattern '${i}'`)}}}for(let e of n){let t=e.trim();if(t&&!t.includes(`:`)&&!t.includes(`=`))try{return this.asLogLevel(t)}catch{throw new p(`Invalid global log level "${t}"`)}}return`INFO`}matchesPattern(e,t){if(t.includes(`*`)){let n=t.replace(/\./g,`\\.`).replace(/\*/g,`.*`);return RegExp(`^${n}`).test(e)}return e.startsWith(t)}asLogLevel(e){let t=e.trim().toUpperCase();if(this.levels[t]!==void 0)return t;throw new p(`Invalid log level: ${e}`)}error(e,t){this.log(`ERROR`,e,t)}warn(e,t){this.log(`WARN`,e,t)}info(e,t){this.log(`INFO`,e,t)}debug(e,t){this.log(`DEBUG`,e,t)}trace(e,t){this.log(`TRACE`,e,t)}log(e,t,n){let r=``;typeof t==`string`?r=t:typeof n==`string`&&(r=n);let i;typeof n==`object`&&n?i=n:typeof t==`object`&&t&&(i=t);let a={level:e,message:r,data:i,context:this.context,service:this.service,module:this.module,app:this.app,timestamp:this.dateTimeProvider.nowMillis()};if(this.levels[e]>this.levels[this.level]){this.emit(a);return}let o=this.formatter.format(a);this.emit(a,o),this.destination.write(o,a)}emit(e,t){this.alepha.events.emit(`log`,{message:t,entry:e},{catch:!0}).catch(()=>null)}},VA=(e={})=>{let{alepha:t,service:n,module:r}=y();return D(BA,{lifetime:`transient`,args:[e.name??n?.name??`Func`,r?.name??t.env.MODULE_NAME??`app`]})};VA[u]=BA;var HA=class e{static COLORS={RESET:`\x1B[0m`,BLACK:`\x1B[30m`,RED:`\x1B[31m`,GREEN:`\x1B[32m`,ORANGE:`\x1B[33m`,BLUE:`\x1B[34m`,PURPLE:`\x1B[35m`,CYAN:`\x1B[36m`,GREY_LIGHT:`\x1B[37m`,GREY_LIGHT_BOLD:`\x1B[1;37m`,GREY_DARK:`\x1B[90m`,GREY_DARK_BOLD:`\x1B[1;90m`,WHITE:`\x1B[97m`,WHITE_BOLD:`\x1B[1;97m`,DIM:`\x1B[2m`,BOLD:`\x1B[1m`,INVERSE:`\x1B[7m`,SILENT:``,ERROR:`\x1B[31m`,WARN:`\x1B[33m`,INFO:`\x1B[32m`,DEBUG:`\x1B[34m`,TRACE:`\x1B[90m`};alepha=D(Wk);enabled=!0;constructor(){this.enabled=this.isEnabled()}isEnabled(){return this.alepha.env.NO_COLOR?!1:this.alepha.env.FORCE_COLOR?!0:this.alepha.isBrowser()&&!navigator.userAgent.includes(`Chrome`)?!1:!this.alepha.isProduction()}set(t,n,r=e.COLORS.RESET){return this.enabled?`${e.COLORS[t]}${n}${r}`:n}},UA=class extends RA{write(e){console.log(e)}},WA=class extends zA{format(e){let t={level:e.level,message:e.message,context:e.context,service:e.service,module:e.module,app:e.app,time:e.timestamp};return e.data instanceof Error?t.error=this.formatJsonError(e.data):t.data=e.data,JSON.stringify(t)}formatJsonError(e){return{name:e.name,message:e.message,stack:e.stack,cause:e.cause instanceof Error?this.formatJsonError(e.cause):void 0}}},GA=class extends RA{entries=[];options={maxEntries:1e4};write(e,t){this.entries.push({...t,formatted:e}),this.entries.length>this.options.maxEntries&&(this.entries=this.entries.slice(-Math.floor(this.options.maxEntries*.8)))}get logs(){return[...this.entries]}clear(){this.entries=[]}},KA=class extends zA{color=D(HA);alepha=D(Wk);format(e){let{data:t,timestamp:n}=e,r=``,i=``,a=t instanceof Error;if(a)i=this.formatError(t);else if(t){let e=``,n=t;if(`error`in t&&t.error instanceof Error){e=this.formatError(t.error);let{error:r,...i}=t;n=i}if(Object.keys(n).length>0)try{i=JSON.stringify(n)}catch{i=`[Unserializable Object]`}e&&(i+=`\n${e}`)}r+=this.color.set(`GREY_DARK`,`[${this.formatTimestamp(n)}]`),r+=` `,r+=this.color.set(e.level,e.level.toUpperCase()),r+=` `,e.app&&(r+=this.color.set(`GREY_DARK`,`${e.app}`),r+=` `),e.context&&(r+=this.color.set(`GREY_DARK`,`(${this.formatContext(e.context)})`),r+=` `);let o=this.color.set(`GREY_LIGHT`,`${e.module}.`),s=this.color.set(this.alepha.isBrowser()?`RESET`:`WHITE`,e.service);return r+=`<${o}${s}>`,e.message?r+=`: ${this.color.set(`CYAN`,e.message)}`:r+=`:`,i&&(a?r+=` \n${i}`:r+=` ${this.color.set(`GREY_DARK`,i)}`),r}formatTimestamp(e){let t=new Date(e),n=t.getHours(),r=t.getMinutes(),i=t.getSeconds(),a=t.getMilliseconds();return`${this.pad2(n)}:${this.pad2(r)}:${this.pad2(i)}.${this.pad3(a)}`}pad2=e=>(e<10?`0`:``)+e;pad3=e=>e<10?`00${e}`:e<100?`0${e}`:`${e}`;formatContext(e){return this.alepha.isProduction()?e:e.slice(0,8)}formatError(e){if(this.alepha.isBrowser())return setTimeout(()=>{console.error(e)}),``;let t=this.alepha.store.get(`alepha.vite.server`);t?.ssrFixStacktrace(e);let n=e.stack??e.message,r=e.cause;for(;r&&r instanceof Error;)t?.ssrFixStacktrace(r),n+=`\nCaused by: ${r.stack??r.message}`,r=r.cause;return n}},qA=class extends zA{format(e){let t=``;if(t+=`${e.message}`,e.data instanceof Error){t+=`\n${e.data.message}`;let n=e.data.cause;for(;n instanceof Error;)t+=`\nCaused by: ${n.message}`,n=n.cause}return t}};K.object({level:K.enum([`SILENT`,`TRACE`,`DEBUG`,`INFO`,`WARN`,`ERROR`]),message:K.text({size:`rich`}),service:K.text(),module:K.text(),context:K.optional(K.text()),app:K.optional(K.text()),data:K.optional(K.any()),timestamp:K.number()}),C({name:`alepha.logger`,primitives:[VA],services:[BA,UA,GA,WA,KA,qA,HA],register:e=>{let t=e.parseEnv(JA),n=t.LOG_LEVEL,r=t.LOG_FORMAT;if(t.DEBUG){if(t.DEBUG===`1`||t.DEBUG===`true`)n??=`trace`;else{let e=t.DEBUG.split(`,`).map(e=>e.trim().replaceAll(`:`,`.`)).filter(Boolean);n??=`${e.map(e=>`${e}:debug`).join(`,`)},info`}r??=`pretty`}e.with({optional:!0,provide:RA,use:(()=>{if(e.isTest()&&!n){let t=t=>{if(t.task?.result?.state===`fail`){let t=e.inject(GA);for(let e of t.logs)console.log(e.formatted)}};try{e.store.get(`alepha.test.afterEach`)?.(t),e.store.get(`alepha.test.onTestFinished`)?.(t)}catch{}return GA}return UA})()}),e.with({optional:!0,provide:zA,use:r?r===`json`?WA:r===`raw`?qA:KA:e.isProduction()&&!e.isBrowser()?WA:KA}),e.store.set(`alepha.logger`,e.inject(BA,{lifetime:`transient`,args:[`Alepha`,`alepha.core`]})),e.store.set(`alepha.logger.level`,n??(e.isTest()?`trace`:e.isProduction()&&e.isBrowser()?`warn`:`info`))}});var JA=K.object({DEBUG:K.optional(K.text({description:`Enable debug logging for specific modules using the debug package convention. Example: DEBUG=alepha:*`})),LOG_LEVEL:K.optional(K.text({description:`Application log level on startup.
11
+ Levels are: trace, debug, info, warn, error, silent
12
+ Level can be set for a specific module:
13
+ "my.module.name:debug,info" -> Set debug level for my.module.name and info for all other modules
14
+ "alepha:trace,info" -> Set trace level for all alepha modules and info for all other modules`,lowercase:!0})),LOG_FORMAT:K.optional(K.enum([`json`,`pretty`,`raw`],{description:`Default log format for the application.`,lowercase:!0}))}),YA=class extends p{},XA=class{encoder=new TextEncoder;decoder=new TextDecoder;codes={BINARY:1,JSON:2,STRING:3,COMPRESSED:4};async setTyped(e,t,n,r){let i=this.serialize(n);r?.compress&&(i=await this.compress(i)),await this.set(e,t,i,r?.ttl)}async getTyped(e,t){let n=await this.get(e,t);if(n){if(n[0]===this.codes.COMPRESSED){let e=await this.decompress(n.subarray(1));return this.deserialize(e)}return this.deserialize(n)}}async invalidateKeys(e,t){let n=[];for(let r of t)if(r.endsWith(`*`)){let t=await this.keys(e,r.slice(0,-1));n.push(...t)}else n.push(r);await this.del(e,...n)}serialize(e){if(e instanceof Uint8Array){let t=new Uint8Array(1+e.length);return t[0]=this.codes.BINARY,t.set(e,1),t}let t=this.encoder.encode(typeof e==`string`?e:JSON.stringify(e)),n=typeof e==`string`?this.codes.STRING:this.codes.JSON,r=new Uint8Array(1+t.length);return r[0]=n,r.set(t,1),r}deserialize(e){let t=e[0],n=e.slice(1);if(t===this.codes.BINARY)return n;if(t===this.codes.JSON)return JSON.parse(this.decoder.decode(n));if(t===this.codes.STRING)return this.decoder.decode(n);throw new YA(`Unknown serialization type: ${t}`)}async compress(e){let t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),n=new Uint8Array(await new Response(new Blob([t]).stream().pipeThrough(new CompressionStream(`gzip`))).arrayBuffer()),r=new Uint8Array(1+n.length);return r[0]=this.codes.COMPRESSED,r.set(n,1),r}async decompress(e){let t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(await new Response(new Blob([t]).stream().pipeThrough(new DecompressionStream(`gzip`))).arrayBuffer())}},ZA=class extends XA{dateTimeProvider=D(DA);log=VA();store={};getCalls=[];setCalls=[];delCalls=[];_stats={hits:0,misses:0,sets:0,deletes:0};getError=null;setError=null;delError=null;constructor(e={}){super(),this.getError=e.getError??null,this.setError=e.setError??null,this.delError=e.delError??null}async get(e,t){if(this.getCalls.push({name:e,key:t,timestamp:this.dateTimeProvider.nowMillis()}),this.getError)throw this.getError;let n=this.store[e]?.[t]?.data;return n===void 0?this._stats.misses++:this._stats.hits++,n}async set(e,t,n,r){if(this.setCalls.push({name:e,key:t,value:n,ttl:r,timestamp:this.dateTimeProvider.nowMillis()}),this._stats.sets++,this.setError)throw this.setError;return this.store[e]??(this.store[e]={}),this.store[e][t]??={},this.store[e][t].data=n,this.log.debug(`Setting cache for name`,{name:e,key:t,ttl:r}),this.store[e][t].timeout&&(this.dateTimeProvider.clearTimeout(this.store[e][t].timeout),this.store[e][t].timeout=void 0),r&&(this.store[e][t].timeout=this.dateTimeProvider.createTimeout(()=>this.del(e,t),r)),this.store[e][t].data}async del(e,...t){if(this.delCalls.push({name:e,keys:t,timestamp:this.dateTimeProvider.nowMillis()}),this._stats.deletes++,this.delError)throw this.delError;if(t.length===0){if(this.log.debug(`Deleting all cache for name`,{name:e}),this.store[e])for(let t of Object.keys(this.store[e])){let n=this.store[e][t]?.timeout;n&&this.dateTimeProvider.clearTimeout(n)}delete this.store[e];return}this.log.debug(`Deleting cache for name`,{name:e,keys:t});for(let n of t){if(this.store[e]==null)break;let t=this.store[e][n]?.timeout;t&&this.dateTimeProvider.clearTimeout(t),delete this.store[e][n]}Object.keys(this.store[e]??{}).length===0&&delete this.store[e]}async has(e,t){return this.store[e]?.[t]?.data!=null}async keys(e,t){let n=this.store[e]??{},r=Object.keys(n);return t?r.filter(e=>e.startsWith(t)):r}async clear(){this.log.debug(`Clearing all cache`);for(let e of Object.keys(this.store))for(let t of Object.keys(this.store[e])){let n=this.store[e][t]?.timeout;n&&this.dateTimeProvider.clearTimeout(n)}this.store={}}async incr(e,t,n){this.store[e]??(this.store[e]={});let r=this.store[e][t]?.data,i=0;if(r)try{i=this.deserialize(r)}catch{let e=new TextDecoder().decode(r);i=Number.parseInt(e,10)||0}let a=i+n;return this.store[e][t]??={},this.store[e][t].data=this.serialize(a),a}stats(){return{...this._stats}}wasSet(e,t){return t===void 0?this.setCalls.some(t=>t.name===e):this.setCalls.some(n=>n.name===e&&n.key===t)}wasGet(e,t){return t===void 0?this.getCalls.some(t=>t.name===e):this.getCalls.some(n=>n.name===e&&n.key===t)}wasDeleted(e,t){return t===void 0?this.delCalls.some(t=>t.name===e):this.delCalls.some(n=>n.name===e&&n.keys.includes(t))}size(e){return e===void 0?Object.values(this.store).reduce((e,t)=>e+Object.keys(t).length,0):Object.keys(this.store[e]??{}).length}names(){return Object.keys(this.store)}reset(){for(let e of Object.keys(this.store))for(let t of Object.keys(this.store[e])){let n=this.store[e][t]?.timeout;n&&this.dateTimeProvider.clearTimeout(n)}this.store={},this.getCalls=[],this.setCalls=[],this.delCalls=[],this._stats={hits:0,misses:0,sets:0,deletes:0},this.getError=null,this.setError=null,this.delError=null}};function QA(e={}){let t=x(ej,e);if(e.handler)return Object.setPrototypeOf((...e)=>t.run(...e),t);let n=e=>(async(...n)=>{let r=t.key(...n),i=await t.get(r);if(i!==void 0)return i;let a=await e(...n);return t.set(r,a).catch(()=>{}),a});return n[f]={name:`$cache`,options:e},Object.setPrototypeOf(n,t)}var $A=Vk({name:`alepha.cache.options`,schema:K.object({enabled:K.boolean({default:!0,description:`Whether caching is enabled.`}),defaultTtl:K.number({default:300,description:`Default time to live for cache entries in seconds.`})}),default:{enabled:!0,defaultTtl:300}}),ej=class extends b{settings=nA($A);dateTimeProvider=D(DA);provider=this.$provider();get container(){return this.options.name??`${this.config.service.name}:${this.config.propertyKey}`}async run(...e){let t=this.options.handler;if(!t)throw new p(`Cache handler is not defined.`);let n=this.key(...e),r=await this.get(n);if(r!==void 0)return r;let i=await t(...e);return await this.set(n,i),i}key(...e){return this.options.key?this.options.key(...e):JSON.stringify(e)}async incr(e,t=1){return this.provider.incr(this.container,e,t)}async invalidate(...e){await this.provider.invalidateKeys(this.container,e)}async set(e,t,n){if(!this.alepha.isStarted()||this.options.disabled||!this.settings.enabled)return;let r=this.dateTimeProvider.duration(n??this.options.ttl??[this.settings.defaultTtl,`seconds`]).as(`milliseconds`);await this.provider.setTyped(this.container,e,t,{ttl:r>0?r:void 0,compress:this.options.compress})}async get(e){if(!(!this.alepha.isStarted()||this.options.disabled||!this.settings.enabled))return this.provider.getTyped(this.container,e)}$provider(){return this.options.provider?this.options.provider===`memory`?this.alepha.inject(ZA):this.alepha.inject(this.options.provider):this.alepha.inject(XA)}};QA[u]=ej,C({name:`alepha.cache`,primitives:[QA],services:[XA,ZA],register:e=>e.with({optional:!0,provide:XA,use:ZA})});var tj=(e,t)=>e&&typeof e==`object`&&`message`in e&&typeof e.message==`string`&&`status`in e&&typeof e.status==`number`?t?e.status===t:!0:!1,nj=class extends p{name=`HttpError`;static is=tj;static toJSON(e){let t={error:e.error,status:e.status,message:e.message};return e.details&&(t.details=e.details),e.requestId&&(t.requestId=e.requestId),e.reason&&(t.cause=e.reason),t}error;status;requestId;details;reason;constructor(e,t){super(e.message,{cause:t}),this.status=e.status??500,this.details=e.details,this.requestId=e.requestId,typeof e.cause==`object`?this.reason={name:e.cause.name,message:e.cause.message}:t instanceof Error&&(this.reason={name:t.name,message:t.message}),this.constructor.name===`HttpError`?this.error=e.error??rj[this.status]??`HttpError`:this.error=this.constructor.name}},rj={400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,405:`MethodNotAllowedError`,409:`ConflictError`,410:`GoneError`,413:`PayloadTooLargeError`,415:`UnsupportedMediaTypeError`,429:`TooManyRequestsError`,500:`InternalServerError`,501:`NotImplementedError`,502:`BadGatewayError`,503:`ServiceUnavailableError`,504:`GatewayTimeoutError`},ij=e=>{if(e.contentType===`multipart/form-data`||e.requestBodyType===`multipart/form-data`)return!0;if(e.schema?.body&&`properties`in e.schema.body){let t=e.schema.body.properties;for(let e in t)if(t[e].format===`binary`)return!0}return!1},aj=K.object({error:K.text({description:`HTTP error name`}),status:K.integer({description:`HTTP status code`}),message:K.text({description:`Short text which describe the error`,size:`rich`}),details:K.optional(K.text({description:`Detailed description of the error`,size:`rich`})),requestId:K.optional(K.text()),cause:K.optional(K.object({name:K.text(),message:K.text({description:`Cause Error message`,size:`rich`})}))},{title:`HttpError`,description:`Generic response after a failed operation`}),oj=class{log=VA();alepha=D(Wk);cache=QA({provider:`memory`,name:`http:client`});pendingRequests={};async fetchAction(e){let t=e.action,n=e.options??{},r=e.config??{},i=e.host??``,a={...n.request},o=t.method,s={},c=this.url(i,t,r);return await this.alepha.events.emit(`client:onRequest`,{route:t,config:r,options:n,headers:s,request:a}),a.method??=o,await this.body(a,s,t,r),a.headers={...r.headers,...Object.fromEntries(new Headers(a.headers).entries()),...s},await this.fetch(c,{...a,schema:t.schema,...n})}async fetch(e,t={}){let n={cache:t.localCache,schema:t.schema?.response,key:t.key};t.method??=`GET`,this.log.trace(`Request`,{url:e,method:t.method,body:t.body,headers:t.headers,options:n});let r=await this.cache.get(e);if(r&&t.method===`GET`)if(r.etag)t.headers=new Headers(t.headers),t.headers.has(`if-none-match`)||t.headers.set(`if-none-match`,r.etag);else return{data:r.data,status:200,statusText:`OK`,headers:new Headers};await this.alepha.events.emit(`client:beforeFetch`,{url:e,options:n,request:t});let i=t.method===`GET`||t.method===`HEAD`||t.method===`OPTIONS`,a=n.key??(i?JSON.stringify({url:e,method:t.method}):void 0);if(a){let e=this.pendingRequests[a];if(e)return this.log.info(`Request already pending`,a),e}let o=fetch(e,t).then(async r=>{this.log.debug(`Response`,{url:e,status:r.status});let i={data:await this.responseData(r,n),status:r.status,statusText:r.statusText,headers:r.headers,raw:r};if(t.method===`GET`){if(n.cache)await this.cache.set(e,{data:i.data},typeof n.cache==`boolean`?void 0:n.cache);else if(!this.alepha.isBrowser()){let t=r.headers.get(`etag`)??void 0;t&&await this.cache.set(e,{data:i.data,etag:t})}}return i}).finally(()=>{a&&delete this.pendingRequests[a]});return a&&(this.pendingRequests[a]=o),o}url(e,t,n){let r=e;return t.prefix&&(r+=t.prefix),r+=t.path,r=this.pathVariables(r,t,n),r=this.queryParams(r,t,n),r}async body(e,t,n,r={}){if(typeof e.headers==`object`&&`content-type`in e.headers&&e.headers[`content-type`]===`multipart/form-data`||ij(n)){typeof e.headers==`object`&&`content-type`in e.headers&&delete e.headers[`content-type`];let t=new FormData;for(let[e,n]of Object.entries(r.body??{})){if(typeof n==`string`){t.append(e,n);continue}if(n instanceof Blob){t.append(e,n);continue}jk(n)&&t.append(e,new File([await n.arrayBuffer()],n.name,{type:n.type}))}e.body=t;return}!e.body&&n.schema?.body&&(t[`content-type`]=`application/json`,e.body=this.alepha.codec.encode(n.schema?.body,r.body,{as:`string`}))}async responseData(e,t){if(e.status===304){let t=e.url;typeof window<`u`&&(t=t.replace(window.location.origin,``));let n=await this.cache.get(t);return n?n.data:``}if(e.status!==204){if(this.isMaybeFile(e))return this.createFileLike(e);if(e.headers.get(`Content-Type`)?.startsWith(`text/`))return await e.text();if(e.headers.get(`Content-Type`)===`application/json`){let n=await e.json();if(e.status>=400){let e=new nj(this.alepha.codec.decode(aj,n));throw await this.alepha.events.emit(`client:onError`,{error:e}),e}return t.schema?this.alepha.codec.decode(t.schema,n):n}if(e.status>=400){let t=new nj({status:e.status,message:`An error occurred while fetching the resource. (${e.statusText})`});throw await this.alepha.events.emit(`client:onError`,{error:t}),t}return e}}isMaybeFile(e){let t=e.headers.get(`Content-Type`);return t?e.headers.get(`Content-Disposition`)?.includes(`attachment`)?!0:t.startsWith(`application/octet-stream`)||t.startsWith(`application/pdf`)||t.startsWith(`application/zip`)||t.startsWith(`image/`)||t.startsWith(`video/`)||t.startsWith(`audio/`):!1}createFileLike(e,t=``){let n=(e.headers.get(`Content-Disposition`)??``).match(/filename="(.+)"/);return{name:n?.[1]?n[1]:t,type:e.headers.get(`Content-Type`)??`application/octet-stream`,size:Number(e.headers.get(`Content-Length`)??0),lastModified:Date.now(),stream:()=>{throw new p(`Not implemented`)},arrayBuffer:async()=>await e.arrayBuffer(),text:async()=>await e.text()}}pathVariables(e,t,n={}){if(typeof n.params==`object`){let r=t.schema?.params?this.alepha.codec.decode(t.schema.params,n.params):n.params;for(let t of Object.keys(r))e=e.replace(`:${t}`,r[t]),e=e.replace(`{${t}}`,r[t])}return e}queryParams(e,t,n={}){if(typeof n.query==`object`){let r=t.schema?.query?this.alepha.codec.decode(t.schema.query,n.query??{}):n.query;for(let e of Object.keys(r))r[e]===void 0&&delete r[e],typeof r[e]==`object`&&(r[e]=JSON.stringify(r[e]));let i=new URLSearchParams(r).toString();return i?`${e}?${i}`:e}return e}},sj=class extends nj{constructor(e=`No permission to access this resource`,t){super({message:e,status:403},t)}},cj=class extends nj{name=`UnauthorizedError`;constructor(e=`Not allowed to access this resource`,t){super({message:e,status:401},t)}},lj=class{headers={};status;body;redirect(e,t=302){this.status=t,this.headers.location=e}setStatus(e){return this.status=e,this}setHeader(e,t){return this.headers[e.toLowerCase()]=t,this}setBody(e){return this.body=e,this}};K.object({ok:K.boolean({description:`True when operation succeed`}),id:K.optional(K.union([K.text(),K.integer()])),count:K.optional(K.number({description:`Number of resources affected`}))},{title:`Ok`,description:`Generic response after a successful operation on a resource`});var uj=C({name:`alepha.server`,primitives:[],services:[oj]}),dj=class e{static MAX_BATCH_SIZE=20;log=VA();httpClient=D(oj);pending=[];scheduled=!1;add(e){return new Promise((t,n)=>{this.pending.push({entry:e,resolve:t,reject:n}),this.scheduled||(this.scheduled=!0,setTimeout(()=>{this.scheduled=!1,this.flush().catch(e=>this.log.error(e))},10))})}async flush(){let t=this.pending.splice(0);if(t.length===0)return;if(t.length===1){let e=t[0];try{let t=await e.entry.directCall();e.resolve(t)}catch(t){e.reject(t)}return}let{unique:n,indexMap:r}=this.dedupe(t),i=this.chunk(n,e.MAX_BATCH_SIZE);try{let e=(await Promise.all(i.map(e=>{let t=[...new Set(e.map(e=>e.entry.action))].join(`,`);return this.httpClient.fetch(`/api/_batch?actions=${t}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e.map(e=>({action:e.entry.action,params:e.entry.params,query:e.entry.query,body:e.entry.body})))}).then(e=>e.data)}))).flat();for(let n=0;n<t.length;n++){let i=e[r[n]];i.status>=400?t[n].reject(new nj({message:i.error??`${i.action} failed (${i.status})`,status:i.status})):t[n].resolve(i.data)}}catch(e){for(let n of t)n.reject(e)}}dedupe(e){let t=new Map,n=[],r=[];for(let i of e){let e=`${i.entry.action}:${JSON.stringify({params:i.entry.params,query:i.entry.query,body:i.entry.body})}`,a=t.get(e);if(a!==void 0)r.push(a);else{let a=n.length;t.set(e,a),n.push(i),r.push(a)}}return{unique:n,indexMap:r}}chunk(e,t){let n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n}},fj=class e{static path={apiLinks:`/api/_links`};log=VA();alepha=D(Wk);httpClient=D(oj);serverLinkMap=new Map;actionMap=new Map;permissions=new Set;lastLoadedRegistry=null;batchCollector;options=nA(LA);getServerLinks(){return this.alepha.isBrowser()?(this.log.warn("Getting server links in the browser is not supported. Use `fetchLinks` to get links from the server."),[]):[...this.serverLinkMap.values()]}registerLink(e){if(this.alepha.isBrowser()){this.log.warn("Registering links in the browser is not supported. Use `fetchLinks` to get links from the server.");return}if(!e.handler&&!e.host)throw new p(`Can't create link - 'handler' or 'host' is required`);if(this.serverLinkMap.get(e.name)?.handler&&e.handler)throw new p(`Duplicate action name "${e.name}". Each action must have a unique name.`);this.serverLinkMap.set(e.name,e)}loadRegistry(e){this.lastLoadedRegistry=e,this.permissions.clear(),this.actionMap.clear();for(let[t,n]of Object.entries(e.actions))this.actionMap.set(t,{name:t,path:n.path,kind:n.kind,method:n.method,contentType:n.contentType,service:n.service});if(e.permissions)for(let t of e.permissions)this.permissions.add(t)}get links(){let e=this.alepha.store.get(`alepha.server.request.apiLinks`);if(e){if(this.alepha.isBrowser())return(this.actionMap.size===0||e!==this.lastLoadedRegistry)&&this.loadRegistry(e),[...this.actionMap.values()];let t=[];for(let n of Object.keys(e.actions)){let e=this.serverLinkMap.get(n);e&&t.push(e)}return t}return[...this.serverLinkMap.values()]}async fetchLinks(){let{data:t}=await this.httpClient.fetch(`${e.path.apiLinks}`,{method:`GET`,schema:{response:FA}});return this.alepha.store.set(`alepha.server.request.apiLinks`,t),this.loadRegistry(t),[...this.actionMap.values()]}client(e={}){return new Proxy({},{get:(t,n)=>{if(typeof n==`string`)return this.createVirtualAction(n,e)}})}can(e){if(this.actionMap.size>0){if(this.actionMap.has(e))return!0}else if(this.serverLinkMap.has(e)||this.links.some(t=>t.name===e))return!0;if(e.includes(`:`)){if(e.endsWith(`*`)){let t=e.slice(0,-1);for(let e of this.permissions)if(e.startsWith(t))return!0;return!1}return this.permissions.has(e)}return!1}async follow(e,t={},n={}){this.log.trace(`Following link`,{name:e,config:t,options:n});let r=await this.getLinkByName(e,n);return r.handler&&!n.request?(this.log.trace(`Local link found`,{name:e}),r.handler({method:r.method,url:new URL(`http://localhost${r.path}`),query:t.query??{},body:t.body??{},params:t.params??{},headers:t.headers??{},metadata:{},reply:new lj},n)):(this.log.trace(`Remote link found`,{name:e,host:r.host,service:r.service}),this.options.batch&&this.alepha.isBrowser()&&!r.host?(this.batchCollector??=this.alepha.inject(dj),this.batchCollector.add({action:e,params:t.params,query:t.query,body:t.body,directCall:()=>this.followRemote(r,t,n).then(e=>e.data)})):this.followRemote(r,t,n).then(e=>e.data))}createVirtualAction(e,t={}){let n=async(n={},r={})=>this.follow(e,n,{...t,...r});return Object.defineProperty(n,`name`,{value:e,writable:!1}),n.run=async(n={},r={})=>this.follow(e,n,{...t,...r}),n.fetch=async(n={},r={})=>{let i=await this.getLinkByName(e,t);return this.followRemote(i,n,r)},n.can=()=>this.can(e),n}async followRemote(e,t={},n={}){n.request??={},n.request.headers=new Headers(n.request.headers);let r=this.alepha.store.get(`alepha.http.request`);r?.headers.authorization&&n.request.headers.set(`authorization`,r.headers.authorization);let i=this.alepha.context.get(`context`);typeof i==`string`&&n.request.headers.set(`x-request-id`,i);let a={...e,schema:{body:K.any(),response:K.any()}};return!e.host&&e.service&&(a.path=`/${e.service}${a.path}`),a.path=`${a.prefix??`/api`}${a.path}`,a.prefix=void 0,this.httpClient.fetchAction({host:e.host,config:t,options:n,action:a})}async getLinkByName(e,t={}){this.alepha.isBrowser()&&!this.alepha.store.get(`alepha.server.request.apiLinks`)&&await this.fetchLinks();let n=this.links.find(n=>n.name===e&&(!t.service||t.service===n.service));if(!n){let t=new cj(`Action ${e} not found.`);throw await this.alepha.events.emit(`client:onError`,{route:n,error:t}),t}return t.hostname?{...n,host:t.hostname}:n}},pj=e=>D(fj).client(e);pj[u]=`$client`;var mj=e=>x(hj,e),hj=class extends b{get name(){return this.options.name??this.config.propertyKey}};mj[u]=hj;var gj=C({name:`alepha.server.links`,atoms:[IA,LA],primitives:[mj,pj],services:[fj,dj]}),_j=(e,t)=>{let n=jA();(0,q.useEffect)(()=>{if(!n.isBrowser())return;let t=[];for(let[r,i]of Object.entries(e))t.push(n.events.on(r,i));return()=>{for(let e of t)e()}},t)};function vj(e,t){let n=jA();(0,q.useMemo)(()=>{t!=null&&n.store.get(e)==null&&n.store.set(e,t)},[t]);let[r,i]=(0,q.useState)(n.store.get(e));return(0,q.useEffect)(()=>{if(!n.isBrowser())return;let t=e instanceof Hk?e.key:e;return n.events.on(`state:mutate`,e=>{e.key===t&&i(e.value)})},[]),[r,t=>{n.store.set(e,t)}]}var yj=C({name:`alepha.react.core`}),bj=(e,t=[`loading`,`dirty`,`error`])=>{let n=jA(),r=t,[i,a]=(0,q.useState)(!1),[o,s]=(0,q.useState)(!1),[c,l]=(0,q.useState)(void 0),[u,d]=(0,q.useState)(void 0),f=`form`in e?e.form:e,p=`path`in e?e.path:void 0,m=r.includes(`values`),h=r.includes(`error`),g=r.includes(`dirty`),_=r.includes(`loading`);return(0,q.useEffect)(()=>{let e=[];return(h||m||g)&&e.push(n.events.on(`form:change`,e=>{e.id===f.id&&((!p||e.path===p)&&(g&&a(!0),h&&l(void 0)),m&&d(f.currentValues))})),_&&e.push(n.events.on(`form:submit:begin`,e=>{e.id===f.id&&s(!0)}),n.events.on(`form:submit:end`,e=>{e.id===f.id&&s(!1)})),(m||g)&&e.push(n.events.on(`form:submit:success`,e=>{e.id===f.id&&(m&&d(e.values),g&&a(!1))})),g&&e.push(n.events.on(`form:reset`,e=>{e.id===f.id&&a(!1)})),h&&e.push(n.events.on(`form:submit:error`,e=>{e.id===f.id&&(!p||e.error instanceof Lk&&e.error.value.path===p)&&l(e.error)})),()=>{for(let t of e)t()}},[]),{dirty:i,loading:o,error:c,values:u}},xj=class extends Lk{name=`ValidationError`;constructor(e){super({message:e.message,instancePath:e.path,schemaPath:``,keyword:`not`,params:{}})}},Sj=e=>{let t=jA(),[n,r]=(0,q.useState)(e?.initialValue);return(0,q.useEffect)(()=>{if(!(!e?.form||!t.isBrowser()))return t.events.on(`form:change`,t=>{t.id===e.form.id&&t.path===e.path&&r(t.value)})},[]),[n,t=>{e.set(t)}]},Cj=class{log=VA();alepha=D(Wk);values={};initialValues={};submitInProgress=!1;input;get submitting(){return this.submitInProgress}constructor(e,t){this.id=e,this.options=t,this.options=t;let n=this.extractSchemaDefaults(t.schema);if(Object.keys(n).length>0&&Object.assign(this.values,n),t.initialValues){let e=this.alepha.codec.decode(t.schema,t.initialValues);Object.assign(this.values,e)}this.initialValues={...this.values},this.input=this.createProxyFromSchema(t,t.schema,{store:this.values,parent:``})}extractSchemaDefaults(e,t=``){let n={};if(!e.properties)return n;for(let[r,i]of Object.entries(e.properties)){let e=t?`${t}.${r}`:r;if(`default`in i&&i.default!==void 0)n[e]=i.default;else if(i&&`type`in i&&i.type===`object`&&`properties`in i){let t=this.extractSchemaDefaults(i,e);Object.assign(n,t)}}return n}get currentValues(){return this.restructureValues(this.values)}get props(){return{id:this.id,noValidate:!0,onSubmit:e=>{e?.preventDefault?.(),this.submit()},onReset:e=>this.reset(e)}}setInitialValues=e=>{let t=this.alepha.codec.decode(this.options.schema,e);for(let e in this.initialValues)delete this.initialValues[e];Object.assign(this.initialValues,t);for(let e in this.values)delete this.values[e];Object.assign(this.values,{...this.initialValues});for(let[e,t]of Object.entries(this.values)){let n=`/${e.replaceAll(`.`,`/`)}`;this.alepha.events.emit(`form:change`,{id:this.id,path:n,value:t},{catch:!0})}};reset=e=>{e?.preventDefault?.();for(let e in this.values)delete this.values[e];Object.assign(this.values,{...this.initialValues});for(let[e,t]of Object.entries(this.values)){let n=`/${e.replaceAll(`.`,`/`)}`;this.alepha.events.emit(`form:change`,{id:this.id,path:n,value:t},{catch:!0})}this.alepha.events.emit(`form:reset`,{id:this.id},{catch:!0}),this.options.onReset?.()};submit=async()=>{if(this.submitInProgress){this.log.warn(`Form submission already in progress, ignoring duplicate submit.`);return}await this.alepha.events.emit(`react:action:begin`,{type:`form`,id:this.id}),await this.alepha.events.emit(`form:submit:begin`,{id:this.id}),this.submitInProgress=!0;let e=this.options;try{let t=this.restructureValues(this.values);K.schema.isSchema(e.schema)&&(t=this.alepha.codec.decode(e.schema,t)),await e.handler(t),await this.alepha.events.emit(`react:action:success`,{type:`form`,id:this.id}),await this.alepha.events.emit(`form:submit:success`,{id:this.id,values:t})}catch(t){this.log.error(`Form submission error:`,t),e.onError?.(t),await this.alepha.events.emit(`react:action:error`,{type:`form`,id:this.id,error:t}),await this.alepha.events.emit(`form:submit:error`,{error:t,id:this.id})}finally{this.submitInProgress=!1}await this.alepha.events.emit(`react:action:end`,{type:`form`,id:this.id}),await this.alepha.events.emit(`form:submit:end`,{id:this.id})};restructureValues(e){let t={};for(let[n,r]of Object.entries(e))n.includes(`.`)?this.restructureNestedValue(t,n,r):t[n]=r;return t}restructureNestedValue(e,t,n){let r=t.split(`.`),i=r.pop();if(!i)return;let a=e;for(let e of r)a[e]??={},a=a[e];a[i]=n}createProxyFromSchema(e,t,n){return n.parent,new Proxy({},{get:(r,i)=>{if(!e.schema||!K.schema.isObject(t))return{};if(i in t.properties)return this.createInputFromSchema(i,e,t,t.required?.includes(i)||!1,n)}})}createInputFromSchema(e,t,n,r,i){let a=i.parent||``,o=n.properties?.[e];if(!o)return{path:``,required:r,initialValue:void 0,props:{},schema:n,set:()=>{},form:this};let s=n.required?.includes(e)??!1,c=a?`${a}.${e}`:e,l=`/${c.replaceAll(`.`,`/`)}`,u=e=>{let n=this.getValueFromInput(e,o);i.store[c]=n,t.onChange&&t.onChange(c,n,i.store),this.alepha.events.emit(`form:change`,{id:this.id,path:l,value:n},{catch:!0})},d={name:c};if(t.id&&(d.id=`${t.id}-${c}`,d[`data-testid`]=d.id),K.schema.isString(o)&&(o.maxLength!=null&&(d.maxLength=Number(o.maxLength)),o.minLength!=null&&(d.minLength=Number(o.minLength))),s&&(d.required=!0),`description`in o&&typeof o.description==`string`&&(d[`aria-label`]=o.description),K.schema.isInteger(o)||K.schema.isNumber(o)?d.type=`number`:e===`password`?d.type=`password`:e===`email`?d.type=`email`:e===`url`?d.type=`url`:K.schema.isString(o)?o.format===`binary`?d.type=`file`:o.format===`date`?d.type=`date`:o.format===`time`?d.type=`time`:o.format===`date-time`?d.type=`datetime-local`:d.type=`text`:K.schema.isBoolean(o)&&(d.type=`checkbox`),t.onCreateField){let n=t.onCreateField(e,o);Object.assign(d,n)}return K.schema.isObject(o)?{path:l,props:d,schema:o,set:u,form:this,required:r,initialValue:i.store[c],items:this.createProxyFromSchema(t,o,{parent:c,store:i.store})}:K.schema.isArray(o)?{path:l,props:d,schema:o,set:u,form:this,required:r,initialValue:i.store[c],items:[]}:{path:l,props:d,schema:o,set:u,form:this,required:r,initialValue:i.store[c]}}getValueFromInput(e,t){if(e instanceof File)return K.schema.isString(t)&&t.format===`binary`?e:null;if(K.schema.isBoolean(t))return e===`true`?!0:e===`false`?!1:e===``||e==null?void 0:!!e;if(K.schema.isNumber(t)){let t=Number(e);return Number.isNaN(t)?null:t}return K.schema.isString(t)?t.format===`date`?new Date(e).toISOString().slice(0,10):t.format===`time`?new Date(`1970-01-01T${e}`).toISOString().slice(11,16):t.format===`date-time`?new Date(e).toISOString():String(e):e}},wj=(e,t=[])=>{let n=jA(),r=(0,q.useId)(),i=(0,q.useRef)(e.initialValues),a=(0,q.useMemo)(()=>n.inject(Cj,{lifetime:`transient`,args:[e.id||r,e]}),t);return(0,q.useEffect)(()=>{i.current!==e.initialValues&&(i.current=e.initialValues,e.initialValues&&a.setInitialValues(e.initialValues))},[e.initialValues]),a},Tj=C({name:`alepha.react.form`}),Ej=class{expand(e){let t=[],n=[];return e.description||e.image||e.url||e.siteName||e.locale||e.type||e.og||e.twitter?(e.description&&t.push({name:`description`,content:e.description}),e.url&&n.push({rel:`canonical`,href:e.url}),this.expandOpenGraph(e,t),this.expandTwitter(e,t),{meta:t,link:n}):{meta:t,link:n}}expandOpenGraph(e,t){let n=e.og?.title??e.title,r=e.og?.description??e.description,i=e.og?.image??e.image;(e.type||n)&&t.push({property:`og:type`,content:e.type??`website`}),e.url&&t.push({property:`og:url`,content:e.url}),n&&t.push({property:`og:title`,content:n}),r&&t.push({property:`og:description`,content:r}),i&&(t.push({property:`og:image`,content:i}),e.imageWidth&&t.push({property:`og:image:width`,content:String(e.imageWidth)}),e.imageHeight&&t.push({property:`og:image:height`,content:String(e.imageHeight)}),e.imageAlt&&t.push({property:`og:image:alt`,content:e.imageAlt})),e.siteName&&t.push({property:`og:site_name`,content:e.siteName}),e.locale&&t.push({property:`og:locale`,content:e.locale})}expandTwitter(e,t){let n=e.twitter?.title??e.title,r=e.twitter?.description??e.description,i=e.twitter?.image??e.image;(e.twitter?.card||n||i)&&t.push({name:`twitter:card`,content:e.twitter?.card??(i?`summary_large_image`:`summary`)}),e.url&&t.push({name:`twitter:url`,content:e.url}),n&&t.push({name:`twitter:title`,content:n}),r&&t.push({name:`twitter:description`,content:r}),i&&(t.push({name:`twitter:image`,content:i}),e.imageAlt&&t.push({name:`twitter:image:alt`,content:e.imageAlt})),e.twitter?.site&&t.push({name:`twitter:site`,content:e.twitter.site}),e.twitter?.creator&&t.push({name:`twitter:creator`,content:e.twitter.creator})}},Dj=class{log=VA();seoExpander=D(Ej);global=[];warnedAboutHtmlAttributes=!1;resolveGlobalHead(){let e={htmlAttributes:{lang:`en`}};for(let t of this.global??[]){let n=typeof t==`function`?t():t;n.htmlAttributes&&(e.htmlAttributes={...e.htmlAttributes,...n.htmlAttributes})}return e}resolveGlobal(){let e={};for(let t of this.global??[]){let n=typeof t==`function`?t():t,{meta:r,link:i}=this.seoExpander.expand(n);e={...e,...n,meta:[...e.meta??[],...r,...n.meta??[]],link:[...e.link??[],...i,...n.link??[]],script:[...e.script??[],...n.script??[]]}}return e}fillHead(e){e.head={...e.head};for(let t of this.global??[]){let n=typeof t==`function`?t():t;this.mergeHead(e,n)}for(let t of e.layers)t.route?.head&&!t.error&&this.fillHeadByPage(t.route,e,t.props??{});e.head.title??=`App`,e.head.htmlAttributes={lang:`en`,...e.head.htmlAttributes}}mergeHead(e,t){let{meta:n,link:r}=this.seoExpander.expand(t);e.head={...e.head,...t,meta:[...e.head.meta??[],...n,...t.meta??[]],link:[...e.head.link??[],...r,...t.link??[]],script:[...e.head.script??[],...t.script??[]]}}fillHeadByPage(e,t,n){if(!e.head)return;t.head??={};let r=typeof e.head==`function`?e.head(n,t.head):e.head,{meta:i,link:a}=this.seoExpander.expand(r);t.head.meta=[...t.head.meta??[],...i],t.head.link=[...t.head.link??[],...a],r.title&&(t.head??={},t.head.titleSeparator?t.head.title=`${r.title}${t.head.titleSeparator}${t.head.title}`:t.head.title=r.title,t.head.titleSeparator=r.titleSeparator),r.htmlAttributes&&!this.warnedAboutHtmlAttributes&&(this.warnedAboutHtmlAttributes=!0,this.log.warn(`Page-level htmlAttributes are ignored. Use global $head() for htmlAttributes instead, as they are sent before page loaders run for early streaming optimization.`)),r.bodyAttributes&&(t.head.bodyAttributes={...t.head.bodyAttributes,...r.bodyAttributes}),r.meta&&(t.head.meta=[...t.head.meta??[],...r.meta??[]]),r.link&&(t.head.link=[...t.head.link??[],...r.link??[]]),r.script&&(t.head.script=[...t.head.script??[],...r.script??[]])}},Oj=e=>x(kj,e),kj=class extends b{provider=D(Dj);onInit(){this.provider.global=[...this.provider.global??[],this.options]}};Oj[u]=kj;var Aj=class{alepha=D(Wk);headProvider=D(Dj);get document(){return window.document}fillAndRenderHead(e){this.alepha.isBrowser()&&(this.headProvider.fillHead(e),e.head&&this.renderHead(this.document,e.head))}refreshGlobalHead(){let e=this.headProvider.resolveGlobal();this.renderHead(this.document,e)}getHead(e){return{get title(){return e.title},get htmlAttributes(){let t={};for(let n of e.documentElement.attributes)t[n.name]=n.value;return t},get bodyAttributes(){let t={};for(let n of e.body.attributes)t[n.name]=n.value;return t},get meta(){let t=[];for(let n of e.head.querySelectorAll(`meta[name]`)){let e=n.getAttribute(`name`),r=n.getAttribute(`content`);e&&r&&t.push({name:e,content:r})}for(let n of e.head.querySelectorAll(`meta[property]`)){let e=n.getAttribute(`property`),r=n.getAttribute(`content`);e&&r&&t.push({property:e,content:r})}return t}}}renderHead(e,t){if(t.title&&(e.title=t.title),t.bodyAttributes)for(let[n,r]of Object.entries(t.bodyAttributes))r?e.body.setAttribute(n,r):e.body.removeAttribute(n);if(t.htmlAttributes)for(let[n,r]of Object.entries(t.htmlAttributes))r?e.documentElement.setAttribute(n,r):e.documentElement.removeAttribute(n);if(t.meta)for(let n of t.meta)this.renderMetaTag(e,n);if(t.link)for(let n of t.link){let{rel:t,href:r}=n,i=e.querySelector(`link[rel="${t}"][href="${r}"]`);i||(i=e.createElement(`link`),i.setAttribute(`rel`,t),i.setAttribute(`href`,r),n.type&&i.setAttribute(`type`,n.type),n.as&&i.setAttribute(`as`,n.as),n.crossorigin!=null&&i.setAttribute(`crossorigin`,``),e.head.appendChild(i))}if(t.script)for(let n of t.script)this.renderScriptTag(e,n)}renderScriptTag(e,t){let n=e.createElement(`script`);if(typeof t==`string`){n.textContent=t,e.head.appendChild(n);return}let{content:r,...i}=t;if(!(i.src&&e.querySelector(`script[src="${i.src}"]`))){for(let[e,t]of Object.entries(i))t===!0?n.setAttribute(e,``):t!==void 0&&t!==!1&&n.setAttribute(e,String(t));r&&(n.textContent=r),e.head.appendChild(n)}}renderMetaTag(e,t){let{content:n}=t;if(t.property){let r=e.querySelector(`meta[property="${t.property}"]`);if(r)r.setAttribute(`content`,n);else{let r=e.createElement(`meta`);r.setAttribute(`property`,t.property),r.setAttribute(`content`,n),e.head.appendChild(r)}return}if(t.name){let r=e.querySelector(`meta[name="${t.name}"]`);if(r)r.setAttribute(`content`,n);else{let r=e.createElement(`meta`);r.setAttribute(`name`,t.name),r.setAttribute(`content`,n),e.head.appendChild(r)}}}},jj=C({name:`alepha.react.head`,primitives:[Oj],services:[yj,Aj]}),Mj=class{parseRequestCookies(e){let t={},n=e.split(`;`);for(let e of n){let n=e.indexOf(`=`);if(n===-1)continue;let r=e.slice(0,n).trim(),i=e.slice(n+1).trim();!r||!i||(t[r]=i)}return t}serializeResponseCookies(e,t){let n=[];for(let[r,i]of Object.entries(e)){if(i==null){n.push(`${r}=; Path=/; Max-Age=0`);continue}i.value&&n.push(this.cookieToString(r,i,t))}return n}cookieToString(e,t,n){let r=[];return r.push(`${e}=${t.value}`),t.path&&r.push(`Path=${t.path}`),t.maxAge&&r.push(`Max-Age=${t.maxAge}`),t.secure!==!1&&n&&r.push(`Secure`),t.httpOnly&&r.push(`HttpOnly`),t.sameSite&&r.push(`SameSite=${t.sameSite}`),t.domain&&r.push(`Domain=${t.domain}`),r.join(`; `)}},Nj=(e,t)=>(t&&(e={key:e.key,schema:e.schema,...t}),x(Pj,e)),Pj=class extends b{cookieParser=D(Mj);alepha=D(Wk);dateTimeProvider=D(DA);cookie;onInit(){this.options.key&&(this.alepha.events.on(`state:mutate`,({key:e,value:t})=>{e===this.options.key&&this.set(t)}),this.alepha.events.on(`configure`,()=>{try{let e=this.get();e!==void 0&&this.alepha.set(this.options.key,e)}catch{}}))}get schema(){return this.options.schema}get name(){return this.options.name??`${this.config.propertyKey}`}set(e){let t=JSON.stringify(this.alepha.codec.decode(this.schema,e)),n=this.options;if(n.compress)throw new p(`Compression is not supported in browser cookies.`);if(n.encrypt)throw new p(`Encryption is not supported in browser cookies.`);if(n.sign)throw new p(`Signing is not supported in browser cookies.`);let r={value:encodeURIComponent(t),path:n.path??`/`,sameSite:n.sameSite??`lax`,secure:!1,httpOnly:!1,domain:n.domain};n.ttl&&(r.maxAge=this.dateTimeProvider.duration(n.ttl).as(`seconds`)),document.cookie=this.cookieParser.cookieToString(this.name,r)}get(e){let t=this.cookieParser.parseRequestCookies(document.cookie)[this.name];if(!t)return;let n=decodeURIComponent(t);if(this.options.compress)throw new p(`Compression is not supported in browser cookies.`);if(this.options.encrypt)throw new p(`Encryption is not supported in browser cookies.`);if(this.options.sign)throw new p(`Signing is not supported in browser cookies.`);return this.alepha.codec.decode(this.schema,JSON.parse(n))}del(){let e=this.options,t={value:``,path:e.path??`/`,sameSite:e.sameSite??`lax`,secure:!1,httpOnly:!1,domain:e.domain,maxAge:0};document.cookie=this.cookieParser.cookieToString(this.name,t)}};Nj[u]=Pj,C({name:`alepha.server.cookies`,primitives:[],services:[uj]});var Fj=class{log=VA();alepha=D(Wk);dateTimeProvider=D(DA);cookie=Nj({name:`lang`,schema:K.text(),ttl:[1,`year`]});registry=[];options={fallbackLang:`en`};dateFormat=new Intl.DateTimeFormat(this.lang);numberFormat=new Intl.NumberFormat(this.lang);get languages(){let e=new Set;for(let t of this.registry)e.add(t.lang);return e.add(this.options.fallbackLang),Array.from(e)}constructor(){this.refreshLocale()}onRender=j({on:`server:onRequest`,priority:`last`,handler:async({request:e})=>{this.alepha.store.set(`alepha.react.i18n.lang`,this.cookie.get(e))}});onStart=j({on:`start`,handler:async()=>{if(this.alepha.isBrowser()){let e=this.cookie.get();e&&this.alepha.store.set(`alepha.react.i18n.lang`,e);for(let e of this.registry)(e.lang===this.lang||e.lang===this.options.fallbackLang)&&(this.log.trace(`Loading language`,{lang:e.lang,name:e.name,target:e.target}),e.translations=await e.loader());return}for(let e of this.registry)e.translations=await e.loader()}});refreshLocale(){this.numberFormat=new Intl.NumberFormat(this.lang),this.dateFormat=new Intl.DateTimeFormat(this.lang),this.dateTimeProvider.setLocale(this.lang),Nk.setLocale(this.lang)}setLang=async e=>{if(this.alepha.isBrowser()){for(let t of this.registry)if(e===t.lang){if(Object.keys(t.translations).length>0)continue;t.translations=await t.loader()}this.cookie.set(e)}this.alepha.store.set(`alepha.react.i18n.lang`,e),this.refreshLocale()};mutate=j({on:`state:mutate`,handler:async({key:e,value:t})=>{if(e===`alepha.react.i18n.lang`&&this.alepha.isBrowser()){let e=!1;for(let n of this.registry)if(t===n.lang){if(Object.keys(n.translations).length>0)continue;n.translations=await n.loader(),e=!0}this.refreshLocale(),e&&this.alepha.store.set(`alepha.react.i18n.lang`,t)}}});get lang(){return this.alepha.store.get(`alepha.react.i18n.lang`)||this.options.fallbackLang}translate=(e,t=[])=>{for(let n of this.registry)if(n.lang===this.lang&&n.translations[e])return this.render(n.translations[e],t);for(let n of this.registry)if(n.lang===this.options.fallbackLang&&n.translations[e])return this.render(n.translations[e],t);return e};l=(e,t={})=>{if(typeof e==`number`&&!t.date)return new Intl.NumberFormat(this.lang,t.number).format(e);if(e instanceof Date||this.dateTimeProvider.isDateTime(e)||typeof e==`string`&&t.date||typeof e==`number`&&t.date){let n=this.dateTimeProvider.of(e);return t.timezone&&(n=n.tz(t.timezone)),typeof t.date==`string`?t.date===`fromNow`?n.locale(this.lang).fromNow():n.locale(this.lang).format(t.date):t.date?new Intl.DateTimeFormat(this.lang,t.timezone?{...t.date,timeZone:t.timezone}:t.date).format(n.toDate()):t.timezone?new Intl.DateTimeFormat(this.lang,{timeZone:t.timezone}).format(n.toDate()):new Intl.DateTimeFormat(this.lang).format(n.toDate())}return e instanceof Lk?Nk.translateError(e,this.lang):e};tr=(e,t={})=>{let n=this.translate(e,t.args||[]);return n===e&&t.default?t.default:n};render(e,t){let n=e;for(let e=0;e<t.length;e++)n=n.replace(`$${e+1}`,t[e]);return n}},Ij=e=>x(Lj,e),Lj=class extends b{provider=D(Fj);onInit(){this.provider.registry.push({target:this.config.service.name,name:this.options.name??this.config.propertyKey,lang:this.options.lang??this.config.propertyKey,loader:async()=>(await this.options.lazy()).default,translations:{}})}};Ij[u]=Lj;var Rj=()=>(vj(`alepha.react.i18n.lang`),MA(Fj)),zj=C({name:`alepha.react.i18n`,primitives:[Ij],services:[Fj]}),Bj=Vk({name:`alepha.ui.sidebar`,schema:K.object({closed:K.boolean(),collapsed:K.boolean(),expandedWidth:K.number(),collapsedWidth:K.number()}),default:{closed:!0,collapsed:!1,expandedWidth:300,collapsedWidth:72}}),Vj=Vk({name:`alepha.ui.theme`,schema:K.object({index:K.integer()}),default:{index:0}}),Hj=Vk({name:`alepha.ui.themeOverrides`,schema:K.object({primaryColor:K.optional(K.text()),radius:K.optional(K.text()),fontFamily:K.optional(K.text()),fontSize:K.optional(K.text()),scale:K.optional(K.text())}),default:{}}),Uj={name:`Default`,description:`Default Alepha Theme`};function Wj(e){return Object.keys(e)}function Gj(e){return e&&typeof e==`object`&&!Array.isArray(e)}function Kj(e,t){let n={...e},r=t;return Gj(e)&&Gj(t)&&Object.keys(t).forEach(t=>{Gj(r[t])&&t in e?n[t]=Kj(n[t],r[t]):n[t]=r[t]}),n}function qj(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function Jj(e){return typeof e!=`string`||!e.includes(`var(--mantine-scale)`)?e:e.match(/^calc\((.*?)\)$/)?.[1].split(`*`)[0].trim()}function Yj(e){let t=Jj(e);return typeof t==`number`?t:typeof t==`string`?t.includes(`calc`)||t.includes(`var`)?t:t.includes(`px`)?Number(t.replace(`px`,``)):t.includes(`rem`)?Number(t.replace(`rem`,``))*16:t.includes(`em`)?Number(t.replace(`em`,``))*16:Number(t):NaN}function Xj(e){return e===`0rem`?`0rem`:`calc(${e} * var(--mantine-scale))`}function Zj(e,{shouldScale:t=!1}={}){function n(r){if(r===0||r===`0`)return`0${e}`;if(typeof r==`number`){let n=`${r/16}${e}`;return t?Xj(n):n}if(typeof r==`string`){if(r===``||r.startsWith(`calc(`)||r.startsWith(`clamp(`)||r.includes(`rgba(`))return r;if(r.includes(`,`))return r.split(`,`).map(e=>n(e)).join(`,`);if(r.includes(` `))return r.split(` `).map(e=>n(e)).join(` `);let i=r.replace(`px`,``);if(!Number.isNaN(Number(i))){let n=`${Number(i)/16}${e}`;return t?Xj(n):n}}return r}return n}var X=Zj(`rem`,{shouldScale:!0}),Qj=Zj(`em`);function $j(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}function eM(e){if(typeof e==`number`)return!0;if(typeof e==`string`){if(e.startsWith(`calc(`)||e.startsWith(`var(`)||e.includes(` `)&&e.trim()!==``)return!0;let t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(e=>t.test(e))}return!1}function tM(e){return Array.isArray(e)||e===null?!1:typeof e==`object`?e.type!==q.Fragment:!1}function nM(e){let t=(0,q.createContext)(null);return[t,()=>{let n=(0,q.use)(t);if(n===null)throw Error(e);return n}]}function rM(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function iM(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].disabled)return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].disabled)return e}return e}function aM(e,t,n){for(let n=e+1;n<t.length;n+=1)if(!t[n].disabled)return n;if(n){for(let e=0;e<t.length;e+=1)if(!t[e].disabled)return e}return e}function oM(e,t,n){return rM(e,n)===rM(t,n)}function sM({parentSelector:e,siblingSelector:t,onKeyDown:n,loop:r=!0,activateOnFocus:i=!1,dir:a=`rtl`,orientation:o}){return s=>{n?.(s);let c=Array.from(rM(s.currentTarget,e)?.querySelectorAll(t)||[]).filter(t=>oM(s.currentTarget,t,e)),l=c.findIndex(e=>s.currentTarget===e),u=aM(l,c,r),d=iM(l,c,r),f=a===`rtl`?d:u,p=a===`rtl`?u:d;switch(s.key){case`ArrowRight`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[f].focus(),i&&c[f].click());break;case`ArrowLeft`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[p].focus(),i&&c[p].click());break;case`ArrowUp`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[d].focus(),i&&c[d].click());break;case`ArrowDown`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[u].focus(),i&&c[u].click());break;case`Home`:s.stopPropagation(),s.preventDefault(),!c[0].disabled&&c[0].focus();break;case`End`:{s.stopPropagation(),s.preventDefault();let e=c.length-1;!c[e].disabled&&c[e].focus();break}}}}var cM={app:100,modal:200,popover:300,overlay:400,max:9999};function lM(e){return cM[e]}var uM=()=>{};function dM(e,t={active:!0}){return typeof e!=`function`||!t.active?t.onKeyDown||uM:n=>{n.key===`Escape`&&(e(n),t.onTrigger?.())}}function fM(e,t=`size`,n=!0){if(e!==void 0)return eM(e)?n?X(e):e:`var(--${t}-${e})`}function pM(e){return fM(e,`mantine-spacing`)}function mM(e){return e===void 0?`var(--mantine-radius-default)`:fM(e,`mantine-radius`)}function hM(e){return fM(e,`mantine-font-size`)}function gM(e){return fM(e,`mantine-line-height`,!1)}function _M(e){if(e)return fM(e,`mantine-shadow`,!1)}function vM(e,t){return n=>{e?.(n),t?.(n)}}function yM(e,t){return e in t?Yj(t[e]):Yj(e)}function bM(e,t){let n=e.map(e=>({value:e,px:yM(e,t)}));return n.sort((e,t)=>e.px-t.px),n}function xM(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function SM(e,t,n){return n?Array.from(rM(n,t)?.querySelectorAll(e)||[]).findIndex(e=>e===n):null}function CM(e,t,n){return t===void 0&&n===void 0?e:t!==void 0&&n===void 0?Math.max(e,t):Math.min(t===void 0&&n!==void 0?e:Math.max(e,t),n)}function wM(e=`mantine-`){return`${e}${Math.random().toString(36).slice(2,11)}`}function TM(e,t){if(e===t||Number.isNaN(e)&&Number.isNaN(t))return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=Object.keys(e),{length:r}=n;if(r!==Object.keys(t).length)return!1;for(let i=0;i<r;i+=1){let r=n[i];if(!(r in t)||e[r]!==t[r]&&!(Number.isNaN(e[r])&&Number.isNaN(t[r])))return!1}return!0}function EM(e){let t=(0,q.useRef)(e);return(0,q.useEffect)(()=>{t.current=e}),(0,q.useMemo)(()=>((...e)=>t.current?.(...e)),[])}function DM(e,t){let{delay:n,flushOnUnmount:r,leading:i}=typeof t==`number`?{delay:t,flushOnUnmount:!1,leading:!1}:t,a=EM(e),o=(0,q.useRef)(0),s=(0,q.useMemo)(()=>{let e=Object.assign((...t)=>{window.clearTimeout(o.current);let r=e._isFirstCall;e._isFirstCall=!1;function s(){window.clearTimeout(o.current),o.current=0,e._isFirstCall=!0}if(i&&r){a(...t),e.flush=()=>{o.current!==0&&(s(),a(...t))},e.cancel=()=>{s()},o.current=window.setTimeout(()=>{s()},n);return}if(i&&!r){e.flush=()=>{o.current!==0&&(s(),a(...t))},e.cancel=()=>{s()},o.current=window.setTimeout(()=>{s()},n);return}let c=()=>{o.current!==0&&(s(),a(...t))};e.flush=c,e.cancel=()=>{s()},o.current=window.setTimeout(c,n)},{flush:()=>{},cancel:()=>{},_isFirstCall:!0});return e},[a,n,i]);return(0,q.useEffect)(()=>()=>{r?s.flush():s.cancel()},[s,r]),s}var OM=[`mousedown`,`touchstart`];function kM(e,t,n){let r=(0,q.useRef)(null),i=t||OM,a=(0,q.useEffectEvent)(t=>{let{target:i}=t??{};if(Array.isArray(n)){let r=!document.body.contains(i)&&i?.tagName!==`HTML`;n.every(e=>!!e&&!t.composedPath().includes(e))&&!r&&e(t)}else r.current&&!r.current.contains(i)&&e(t)});return(0,q.useEffect)(()=>(i.forEach(e=>document.addEventListener(e,a)),()=>{i.forEach(e=>document.removeEventListener(e,a))}),[]),r}function AM(e,t){return typeof t==`boolean`?t:typeof window<`u`&&`matchMedia`in window?window.matchMedia(e).matches:!1}function jM(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){let[r,i]=(0,q.useState)(n?t:AM(e));return(0,q.useEffect)(()=>{try{if(`matchMedia`in window){let t=window.matchMedia(e);i(t.matches);let n=e=>i(e.matches);return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}}}catch{return}},[e]),r||!1}function MM(e,t){return jM(`(prefers-color-scheme: dark)`,e===`dark`,t)?`dark`:`light`}var NM=typeof document<`u`?q.useLayoutEffect:q.useEffect;function PM(e,t){let n=(0,q.useRef)(!1);(0,q.useEffect)(()=>()=>{n.current=!1},[]),(0,q.useEffect)(()=>{if(n.current)return e();n.current=!0},t)}function FM({opened:e,shouldReturnFocus:t=!0}){let n=(0,q.useRef)(null),r=()=>{n.current&&`focus`in n.current&&typeof n.current.focus==`function`&&n.current?.focus({preventScroll:!0})};return PM(()=>{let i=-1,a=e=>{e.key===`Tab`&&window.clearTimeout(i)};return document.addEventListener(`keydown`,a),e?n.current=document.activeElement:t&&(i=window.setTimeout(r,10)),()=>{window.clearTimeout(i),document.removeEventListener(`keydown`,a)}},[e,t]),r}var IM=/input|select|textarea|button|object/,LM=`a, input, select, textarea, button, object, [tabindex]`;function RM(e){return e.style.display===`none`}function zM(e){if(e.getAttribute(`aria-hidden`)||e.getAttribute(`hidden`)||e.getAttribute(`type`)===`hidden`)return!1;let t=e;for(;t&&!(t===document.body||t.nodeType===11);){if(RM(t))return!1;t=t.parentNode}return!0}function BM(e){let t=e.getAttribute(`tabindex`);return t===null&&(t=void 0),parseInt(t,10)}function VM(e){let t=e.nodeName.toLowerCase(),n=!Number.isNaN(BM(e));return(IM.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||n)&&zM(e)}function HM(e){let t=BM(e);return(Number.isNaN(t)||t>=0)&&VM(e)}function UM(e){return Array.from(e.querySelectorAll(LM)).filter(HM)}function WM(e,t){let n=UM(e);if(!n.length){t.preventDefault();return}let r=n[t.shiftKey?0:n.length-1],i=e.getRootNode(),a=r===i.activeElement||e===i.activeElement,o=i.activeElement;if(o.tagName===`INPUT`&&o.getAttribute(`type`)===`radio`&&(a=n.filter(e=>e.getAttribute(`type`)===`radio`&&e.getAttribute(`name`)===o.getAttribute(`name`)).includes(r)),!a)return;t.preventDefault();let s=n[t.shiftKey?n.length-1:0];s&&s.focus()}function GM(e=!0){let t=(0,q.useRef)(null),n=e=>{let t=e.querySelector(`[data-autofocus]`);if(!t){let n=Array.from(e.querySelectorAll(LM));t=n.find(HM)||n.find(VM)||null,!t&&VM(e)&&(t=e)}t?t.focus({preventScroll:!0}):console.warn(`[@mantine/hooks/use-focus-trap] Failed to find focusable element within provided node`,e)},r=(0,q.useCallback)(r=>{e&&r!==null&&t.current!==r&&(r?(setTimeout(()=>{r.getRootNode()?n(r):console.warn(`[@mantine/hooks/use-focus-trap] Ref node is not part of the dom`,r)}),t.current=r):t.current=null)},[e]);return(0,q.useEffect)(()=>{if(!e)return;t.current&&setTimeout(()=>n(t.current));let r=e=>{e.key===`Tab`&&t.current&&WM(t.current,e)};return document.addEventListener(`keydown`,r),()=>document.removeEventListener(`keydown`,r)},[e]),r}var KM=e=>(e+1)%1e6;function qM(){let[,e]=(0,q.useReducer)(KM,0);return e}function JM(e){let[t,n]=(0,q.useState)(`mantine-${(0,q.useId)().replace(/:/g,``)}`);return NM(()=>{n(wM())},[]),typeof e==`string`?e:t}function YM(e,t,n){let r=(0,q.useEffectEvent)(t);(0,q.useEffect)(()=>(window.addEventListener(e,r,n),()=>window.removeEventListener(e,r,n)),[e])}function XM(e,t){if(typeof e==`function`)return e(t);typeof e==`object`&&e&&`current`in e&&(e.current=t)}function ZM(...e){let t=new Map;return n=>{if(e.forEach(e=>{let r=XM(e,n);r&&t.set(e,r)}),t.size>0)return()=>{e.forEach(e=>{let n=t.get(e);n&&typeof n==`function`?n():XM(e,null)}),t.clear()}}}function QM(...e){return(0,q.useCallback)(ZM(...e),e)}function $M(e){return{x:CM(e.x,0,1),y:CM(e.y,0,1)}}function eN(e,t,n=`ltr`){let r=(0,q.useRef)(!1),i=(0,q.useRef)(!1),a=(0,q.useRef)(0),[o,s]=(0,q.useState)(!1);return(0,q.useEffect)(()=>{r.current=!0},[]),{ref:(0,q.useCallback)(o=>{let c=({x:t,y:i})=>{cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{if(r.current&&o){o.style.userSelect=`none`;let r=o.getBoundingClientRect();if(r.width&&r.height){let a=CM((t-r.left)/r.width,0,1);e({x:n===`ltr`?a:1-a,y:CM((i-r.top)/r.height,0,1)})}}})},l=()=>{document.addEventListener(`mousemove`,m),document.addEventListener(`mouseup`,f),document.addEventListener(`touchmove`,g,{passive:!1}),document.addEventListener(`touchend`,f)},u=()=>{document.removeEventListener(`mousemove`,m),document.removeEventListener(`mouseup`,f),document.removeEventListener(`touchmove`,g),document.removeEventListener(`touchend`,f)},d=()=>{!i.current&&r.current&&(i.current=!0,typeof t?.onScrubStart==`function`&&t.onScrubStart(),s(!0),l())},f=()=>{i.current&&r.current&&(i.current=!1,s(!1),u(),setTimeout(()=>{typeof t?.onScrubEnd==`function`&&t.onScrubEnd()},0))},p=e=>{d(),e.preventDefault(),m(e)},m=e=>c({x:e.clientX,y:e.clientY}),h=e=>{e.cancelable&&e.preventDefault(),d(),g(e)},g=e=>{e.cancelable&&e.preventDefault(),c({x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY})};return o?.addEventListener(`mousedown`,p),o?.addEventListener(`touchstart`,h,{passive:!1}),()=>{o&&(o.removeEventListener(`mousedown`,p),o.removeEventListener(`touchstart`,h))}},[n,e]),active:o}}function tN({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){let[i,a]=(0,q.useState)(t===void 0?n:t);return e===void 0?[i,(e,...t)=>{a(e),r?.(e,...t)},!1]:[e,r,!0]}function nN(e,t){return jM(`(prefers-reduced-motion: reduce)`,e,t)}function rN(e,t){if(!e||!t)return!1;if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(!TM(e[n],t[n]))return!1;return!0}function iN(e){let t=(0,q.useRef)([]),n=(0,q.useRef)(0);return rN(t.current,e)||(t.current=e,n.current+=1),[n.current]}function aN(e,t){(0,q.useEffect)(e,iN(t))}var oN={" ":`space`,ArrowLeft:`arrowleft`,ArrowRight:`arrowright`,ArrowUp:`arrowup`,ArrowDown:`arrowdown`,Escape:`escape`,Esc:`escape`,esc:`escape`,Enter:`enter`,Tab:`tab`,Backspace:`backspace`,Delete:`delete`,Insert:`insert`,Home:`home`,End:`end`,PageUp:`pageup`,PageDown:`pagedown`,"+":`plus`,"-":`minus`,"*":`asterisk`,"/":`slash`};function sN(e){let t=e.replace(`Key`,``).toLowerCase();return oN[e]||t}function cN(e){let t=e.toLowerCase().split(`+`).map(e=>e.trim()),n={alt:t.includes(`alt`),ctrl:t.includes(`ctrl`),meta:t.includes(`meta`),mod:t.includes(`mod`),shift:t.includes(`shift`),plus:t.includes(`[plus]`)},r=[`alt`,`ctrl`,`meta`,`shift`,`mod`],i=t.find(e=>!r.includes(e));return{...n,key:i===`[plus]`?`+`:i}}function lN(e,t,n){let{alt:r,ctrl:i,meta:a,mod:o,shift:s,key:c}=e,{altKey:l,ctrlKey:u,metaKey:d,shiftKey:f,key:p,code:m}=t;if(r!==l)return!1;if(o){if(!u&&!d)return!1}else if(i!==u||a!==d)return!1;return s===f?!!(c&&(n?sN(m)===sN(c):sN(p??m)===sN(c))):!1}function uN(e,t){return n=>lN(cN(e),n,t)}function dN(e,t,n=!1){return e.target instanceof HTMLElement?(n||!e.target.isContentEditable)&&!t.includes(e.target.tagName):!0}function fN(e,t=[`INPUT`,`TEXTAREA`,`SELECT`],n=!1){let r=(0,q.useEffectEvent)(r=>{e.forEach(([e,i,a={preventDefault:!0,usePhysicalKeys:!1}])=>{uN(e,a.usePhysicalKeys)(r)&&dN(r,t,n)&&(a.preventDefault&&r.preventDefault(),i(r))})});(0,q.useEffect)(()=>(document.documentElement.addEventListener(`keydown`,r),()=>document.documentElement.removeEventListener(`keydown`,r)),[])}function pN(e){return/(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)/i.test(e)}function mN(e){return/(iPhone)|(iPad)|(iPod)/i.test(e)}function hN(e){return/(Win32)|(Win64)|(Windows)|(WinCE)/i.test(e)}function gN(e){return/Android/i.test(e)}function _N(e){return/Linux/i.test(e)}function vN(e){return/CrOS/i.test(e)}function yN(){if(typeof window>`u`)return`undetermined`;let{userAgent:e}=window.navigator;return mN(e)||pN(e)&&`ontouchend`in document?`ios`:pN(e)?`macos`:hN(e)?`windows`:gN(e)?`android`:_N(e)?`linux`:vN(e)?`chromeos`:`undetermined`}function bN(e={getValueInEffect:!0}){let[t,n]=(0,q.useState)(e.getValueInEffect?`undetermined`:yN());return NM(()=>{e.getValueInEffect&&n(yN)},[]),t}function xN(e=!1,t={}){let[n,r]=(0,q.useState)(e),i=(0,q.useCallback)(()=>{r(e=>e||(t.onOpen?.(),!0))},[t.onOpen]),a=(0,q.useCallback)(()=>{r(e=>e&&(t.onClose?.(),!1))},[t.onClose]);return[n,{open:i,close:a,toggle:(0,q.useCallback)(()=>{n?a():i()},[a,i,n]),set:r}]}function SN(e,t,n={autoInvoke:!1}){let r=(0,q.useRef)(null),i=(0,q.useCallback)((...n)=>{r.current||=window.setTimeout(()=>{e(n),r.current=null},t)},[t]),a=(0,q.useCallback)(()=>{r.current&&=(window.clearTimeout(r.current),null)},[]);return(0,q.useEffect)(()=>(n.autoInvoke&&i(),a),[a,i]),{start:i,clear:a}}function CN(e){let t=(0,q.useRef)(void 0);return(0,q.useEffect)(()=>{t.current=e},[e]),t.current}function wN(){let[e,t]=(0,q.useState)(!1);return NM(()=>{t(typeof window<`u`&&!TN()&&`EyeDropper`in window)},[]),{supported:e,open:(0,q.useCallback)((t={})=>e?new window.EyeDropper().open(t):Promise.resolve(void 0),[e])}}function TN(){return navigator.userAgent.includes(`OPR`)}function EN(e,t,n){let r=(0,q.useRef)(null);(0,q.useEffect)(()=>{r.current&&=(r.current.disconnect(),null);let i=typeof n==`function`?n():n;return i&&(r.current=new MutationObserver(e),r.current.observe(i,t)),()=>{r.current&&=(r.current.disconnect(),null)}},[e,t,n])}function DN(){let[e,t]=(0,q.useState)(!1);return(0,q.useEffect)(()=>t(!0),[]),e}var ON=o((e=>{var t=sA();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.5`})),kN=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ON()}));function AN(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}function jN(e){function t(t){let n=Object.keys(t).reduce((n,r)=>(n[`${e}:${r}`]=e=>t[r](e.detail),n),{});NM(()=>(Object.keys(n).forEach(e=>{window.removeEventListener(e,n[e]),window.addEventListener(e,n[e])}),()=>Object.keys(n).forEach(e=>{window.removeEventListener(e,n[e])})),[n])}function n(t){return(...n)=>AN(`${e}:${String(t)}`,n[0])}return[t,n]}var MN=l(kN(),1);function NN(){return`development`}function PN(e){let t=new Map;return(...n)=>{let r=JSON.stringify(n);if(t.has(r))return t.get(r);let i=e(...n);return t.set(r,i),i}}function FN(e,t){return t.length===0?e:t.reduce((t,n)=>Math.abs(n-e)<Math.abs(t-e)?n:t)}function IN(e){return e?.props?.ref}function LN(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`}function RN(e,t=document){let n=t.querySelector(e);if(n)return n;let r=t.querySelectorAll(`*`);for(let t=0;t<r.length;t+=1){let n=r[t];if(n.shadowRoot){let t=RN(e,n.shadowRoot);if(t)return t}}return null}function zN(e,t=document){let n=[],r=t.querySelectorAll(e);n.push(...Array.from(r));let i=t.querySelectorAll(`*`);for(let t=0;t<i.length;t+=1){let r=i[t];if(r.shadowRoot){let t=zN(e,r.shadowRoot);n.push(...t)}}return n}function BN(e){if(!e)return document;let t=e.getRootNode();return t instanceof ShadowRoot||t instanceof Document?t:document}function VN(e){let t=q.Children.toArray(e);return t.length!==1||!tM(t[0])?null:t[0]}function HN(e){return e}function UN(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=UN(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function WN(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=UN(e))&&(r&&(r+=` `),r+=t);return r}var GN={};function KN(e){let t={};return e.forEach(e=>{Object.entries(e).forEach(([e,n])=>{t[e]?t[e]=WN(t[e],n):t[e]=n})}),t}function qN({theme:e,classNames:t,props:n,stylesCtx:r}){return KN((Array.isArray(t)?t:[t]).map(t=>typeof t==`function`?t(e,n,r):t||GN))}function JN({theme:e,styles:t,props:n,stylesCtx:r}){let i=Array.isArray(t)?t:[t],a={};for(let t of i)typeof t==`function`?Object.assign(a,t(e,n,r)):t&&Object.assign(a,t);return a}function YN(e){return e===`auto`||e===`dark`||e===`light`}function XN({key:e=`mantine-color-scheme-value`}={}){let t;return{get:t=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return YN(n)?n:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(e){console.warn(`[@mantine/core] Local storage color scheme manager was unable to save color scheme.`,e)}},subscribe:n=>{t=t=>{t.storageArea===window.localStorage&&t.key===e&&YN(t.newValue)&&n(t.newValue)},window.addEventListener(`storage`,t)},unsubscribe:()=>{window.removeEventListener(`storage`,t)},clear:()=>{window.localStorage.removeItem(e)}}}function ZN(e,t){return typeof e.primaryShade==`number`?e.primaryShade:t===`dark`?e.primaryShade.dark:e.primaryShade.light}function QN(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function $N(e){let t=e.replace(`#`,``);if(t.length===3){let e=t.split(``);t=[e[0],e[0],e[1],e[1],e[2],e[2]].join(``)}if(t.length===8){let e=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:e}}let n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255,a:1}}function eP(e){let[t,n,r,i]=e.replace(/[^0-9,./]/g,``).split(/[/,]/).map(Number);return{r:t,g:n,b:r,a:i===void 0?1:i}}function tP(e){let t=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!t)return{r:0,g:0,b:0,a:1};let n=parseInt(t[1],10),r=parseInt(t[2],10)/100,i=parseInt(t[3],10)/100,a=t[5]?parseFloat(t[5]):void 0,o=(1-Math.abs(2*i-1))*r,s=n/60,c=o*(1-Math.abs(s%2-1)),l=i-o/2,u,d,f;return s>=0&&s<1?(u=o,d=c,f=0):s>=1&&s<2?(u=c,d=o,f=0):s>=2&&s<3?(u=0,d=o,f=c):s>=3&&s<4?(u=0,d=c,f=o):s>=4&&s<5?(u=c,d=0,f=o):(u=o,d=0,f=c),{r:Math.round((u+l)*255),g:Math.round((d+l)*255),b:Math.round((f+l)*255),a:a||1}}function nP(e){return QN(e)?$N(e):e.startsWith(`rgb`)?eP(e):e.startsWith(`hsl`)?tP(e):{r:0,g:0,b:0,a:1}}function rP(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function iP(e){let t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function aP(e){if(e.startsWith(`oklch(`))return(iP(e)||0)/100;let{r:t,g:n,b:r}=nP(e),i=t/255,a=n/255,o=r/255,s=rP(i),c=rP(a),l=rP(o);return .2126*s+.7152*c+.0722*l}function oP(e,t=.179){return e.startsWith(`var(`)?!1:aP(e)>t}function sP({color:e,theme:t,colorScheme:n}){if(typeof e!=`string`)throw Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e===`bright`)return{color:e,value:n===`dark`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:oP(n===`dark`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-bright`};if(e===`dimmed`)return{color:e,value:n===`dark`?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:oP(n===`dark`?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:`--mantine-color-dimmed`};if(e===`white`||e===`black`)return{color:e,value:e===`white`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:oP(e===`white`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};let[r,i]=e.split(`.`),a=i?Number(i):void 0,o=r in t.colors;if(o){let e=a===void 0?t.colors[r][ZN(t,n||`light`)]:t.colors[r][a];return{color:r,value:e,shade:a,isThemeColor:o,isLight:oP(e,t.luminanceThreshold),variable:i?`--mantine-color-${r}-${a}`:`--mantine-color-${r}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:oP(e,t.luminanceThreshold),shade:a,variable:void 0}}function cP(e,t){let n=sP({color:e||t.primaryColor,theme:t});return n.variable?`var(${n.variable})`:e}function lP(e,t){if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, black ${t*100}%)`;let{r:n,g:r,b:i,a}=nP(e),o=1-t,s=e=>Math.round(e*o);return`rgba(${s(n)}, ${s(r)}, ${s(i)}, ${a})`}function uP(e,t){let n={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},r=cP(n.from,t),i=cP(n.to,t);return`linear-gradient(${n.deg}deg, ${r} 0%, ${i} 100%)`}function dP(e,t){if(typeof e!=`string`||t>1||t<0)return`rgba(0, 0, 0, 1)`;if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, transparent ${(1-t)*100}%)`;if(e.startsWith(`oklch`))return e.includes(`/`)?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(`)`,` / ${t})`);let{r:n,g:r,b:i}=nP(e);return`rgba(${n}, ${r}, ${i}, ${t})`}var fP=dP,pP=({color:e,theme:t,variant:n,gradient:r,autoContrast:i})=>{let a=sP({color:e,theme:t}),o=typeof i==`boolean`?i:t.autoContrast;if(n===`none`)return{background:`transparent`,hover:`transparent`,color:`inherit`,border:`none`};if(n===`filled`){let t=o&&a.isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`;return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:t,border:`${X(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:t,border:`${X(1)} solid transparent`}:{background:e,hover:lP(e,.1),color:t,border:`${X(1)} solid transparent`}}if(n===`light`){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${X(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:n,hover:lP(n,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${X(1)} solid transparent`}}return{background:e,hover:lP(e,.1),color:oP(e)?`var(--mantine-color-black)`:`var(--mantine-color-white)`,border:`${X(1)} solid transparent`}}if(n===`outline`)return a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${X(1)} solid var(--mantine-color-${e}-outline)`}:{background:`transparent`,hover:dP(t.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${X(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:`transparent`,hover:dP(e,.05),color:e,border:`${X(1)} solid ${e}`};if(n===`subtle`){if(a.isThemeColor){if(a.shade===void 0)return{background:`transparent`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${X(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:`transparent`,hover:dP(n,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${X(1)} solid transparent`}}return{background:`transparent`,hover:dP(e,.12),color:e,border:`${X(1)} solid transparent`}}return n===`transparent`?a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${e}-light-color)`,border:`${X(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${X(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:e,border:`${X(1)} solid transparent`}:n===`white`?a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-white)`,hover:lP(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${X(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:lP(t.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${X(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:lP(t.white,.01),color:e,border:`${X(1)} solid transparent`}:n===`gradient`?{background:uP(r,t),hover:uP(r,t),color:`var(--mantine-color-white)`,border:`none`}:n===`default`?{background:`var(--mantine-color-default)`,hover:`var(--mantine-color-default-hover)`,color:`var(--mantine-color-default-color)`,border:`${X(1)} solid var(--mantine-color-default-border)`}:{}};function mP({color:e,theme:t,autoContrast:n}){return(typeof n==`boolean`?n:t.autoContrast)&&sP({color:e||t.primaryColor,theme:t}).isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function hP(e,t){return mP({color:e.colors[e.primaryColor][ZN(e,t)],theme:e,autoContrast:null})}function gP(e,t){return typeof e==`boolean`?e:t.autoContrast}var _P=(0,q.createContext)(null);function vP(){let e=(0,q.use)(_P);if(!e)throw Error(`[@mantine/core] MantineProvider was not found in tree`);return e}function yP(){return vP().cssVariablesResolver}function bP(){return vP().classNamesPrefix}function xP(){return vP().getStyleNonce}function SP(){return vP().withStaticClasses}function CP(){return vP().headless}function wP(){return vP().stylesTransform?.sx}function TP(){return vP().stylesTransform?.styles}function EP(){return vP().env||`default`}function DP(e){let t=document.createElement(`style`);return t.setAttribute(`data-mantine-styles`,`inline`),t.innerHTML=`*, *::before, *::after {transition: none !important;}`,t.setAttribute(`data-mantine-disable-transition`,`true`),e&&t.setAttribute(`nonce`,e),document.head.appendChild(t),()=>document.querySelectorAll(`[data-mantine-disable-transition]`).forEach(e=>e.remove())}function OP({keepTransitions:e}={}){let t=(0,q.useRef)(uM),n=(0,q.useRef)(-1),r=(0,q.use)(_P),i=(0,q.useRef)(xP()?.());if(!r)throw Error(`[@mantine/core] MantineProvider was not found in tree`);let a=a=>{r.setColorScheme(a),t.current=e?()=>{}:DP(i.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current?.()},10)},o=()=>{r.clearColorScheme(),t.current=e?()=>{}:DP(i.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current?.()},10)},s=MM(`light`,{getInitialValueInEffect:!1}),c=r.colorScheme===`auto`?s:r.colorScheme,l=(0,q.useCallback)(()=>a(c===`light`?`dark`:`light`),[a,c]);return(0,q.useEffect)(()=>()=>{t.current?.(),window.clearTimeout(n.current)},[]),{colorScheme:r.colorScheme,setColorScheme:a,clearColorScheme:o,toggleColorScheme:l}}function kP(e,t){let n=typeof window<`u`&&`matchMedia`in window&&window.matchMedia(`(prefers-color-scheme: dark)`)?.matches,r=e===`auto`?n?`dark`:`light`:e;t()?.setAttribute(`data-mantine-color-scheme`,r)}function AP({manager:e,defaultColorScheme:t,getRootElement:n,forceColorScheme:r}){let i=(0,q.useRef)(null),[a,o]=(0,q.useState)(()=>e.get(t)),s=r||a,c=(0,q.useCallback)(t=>{r||(kP(t,n),o(t),e.set(t))},[e.set,s,r]),l=(0,q.useCallback)(()=>{o(t),kP(t,n),e.clear()},[e.clear,t]);return(0,q.useEffect)(()=>(e.subscribe(c),e.unsubscribe),[e.subscribe,e.unsubscribe]),NM(()=>{kP(e.get(t),n)},[]),(0,q.useEffect)(()=>{if(r)return kP(r,n),()=>{};r===void 0&&kP(a,n),typeof window<`u`&&`matchMedia`in window&&(i.current=window.matchMedia(`(prefers-color-scheme: dark)`));let e=e=>{a===`auto`&&kP(e.matches?`dark`:`light`,n)};return i.current?.addEventListener(`change`,e),()=>i.current?.removeEventListener(`change`,e)},[a,r]),{colorScheme:s,setColorScheme:c,clearColorScheme:l}}var jP=({defaultColorScheme:e,localStorageKey:t,forceColorScheme:n})=>n?`document.documentElement.setAttribute("data-mantine-color-scheme", '${n}');`:`try {
15
+ var _colorScheme = window.localStorage.getItem("${t}");
16
+ var colorScheme = _colorScheme === "light" || _colorScheme === "dark" || _colorScheme === "auto" ? _colorScheme : "${e}";
17
+ var computedColorScheme = colorScheme !== "auto" ? colorScheme : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
18
+ document.documentElement.setAttribute("data-mantine-color-scheme", computedColorScheme);
19
+ } catch (e) {}
20
+ `;function MP({defaultColorScheme:e=`light`,localStorageKey:t=`mantine-color-scheme-value`,forceColorScheme:n,...r}){let i=[`light`,`dark`,`auto`].includes(e)?e:`light`;return(0,J.jsx)(`script`,{...r,"data-mantine-script":!0,dangerouslySetInnerHTML:{__html:jP({defaultColorScheme:i,localStorageKey:t,forceColorScheme:n})}})}var NP={dark:[`#C9C9C9`,`#b8b8b8`,`#828282`,`#696969`,`#424242`,`#3b3b3b`,`#2e2e2e`,`#242424`,`#1f1f1f`,`#141414`],gray:[`#f8f9fa`,`#f1f3f5`,`#e9ecef`,`#dee2e6`,`#ced4da`,`#adb5bd`,`#868e96`,`#495057`,`#343a40`,`#212529`],red:[`#fff5f5`,`#ffe3e3`,`#ffc9c9`,`#ffa8a8`,`#ff8787`,`#ff6b6b`,`#fa5252`,`#f03e3e`,`#e03131`,`#c92a2a`],pink:[`#fff0f6`,`#ffdeeb`,`#fcc2d7`,`#faa2c1`,`#f783ac`,`#f06595`,`#e64980`,`#d6336c`,`#c2255c`,`#a61e4d`],grape:[`#f8f0fc`,`#f3d9fa`,`#eebefa`,`#e599f7`,`#da77f2`,`#cc5de8`,`#be4bdb`,`#ae3ec9`,`#9c36b5`,`#862e9c`],violet:[`#f3f0ff`,`#e5dbff`,`#d0bfff`,`#b197fc`,`#9775fa`,`#845ef7`,`#7950f2`,`#7048e8`,`#6741d9`,`#5f3dc4`],indigo:[`#edf2ff`,`#dbe4ff`,`#bac8ff`,`#91a7ff`,`#748ffc`,`#5c7cfa`,`#4c6ef5`,`#4263eb`,`#3b5bdb`,`#364fc7`],blue:[`#e7f5ff`,`#d0ebff`,`#a5d8ff`,`#74c0fc`,`#4dabf7`,`#339af0`,`#228be6`,`#1c7ed6`,`#1971c2`,`#1864ab`],cyan:[`#e3fafc`,`#c5f6fa`,`#99e9f2`,`#66d9e8`,`#3bc9db`,`#22b8cf`,`#15aabf`,`#1098ad`,`#0c8599`,`#0b7285`],teal:[`#e6fcf5`,`#c3fae8`,`#96f2d7`,`#63e6be`,`#38d9a9`,`#20c997`,`#12b886`,`#0ca678`,`#099268`,`#087f5b`],green:[`#ebfbee`,`#d3f9d8`,`#b2f2bb`,`#8ce99a`,`#69db7c`,`#51cf66`,`#40c057`,`#37b24d`,`#2f9e44`,`#2b8a3e`],lime:[`#f4fce3`,`#e9fac8`,`#d8f5a2`,`#c0eb75`,`#a9e34b`,`#94d82d`,`#82c91e`,`#74b816`,`#66a80f`,`#5c940d`],yellow:[`#fff9db`,`#fff3bf`,`#ffec99`,`#ffe066`,`#ffd43b`,`#fcc419`,`#fab005`,`#f59f00`,`#f08c00`,`#e67700`],orange:[`#fff4e6`,`#ffe8cc`,`#ffd8a8`,`#ffc078`,`#ffa94d`,`#ff922b`,`#fd7e14`,`#f76707`,`#e8590c`,`#d9480f`]},PP=`-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji`,FP={scale:1,fontSmoothing:!0,focusRing:`auto`,white:`#fff`,black:`#000`,colors:NP,primaryShade:{light:6,dark:8},primaryColor:`blue`,variantColorResolver:pP,autoContrast:!1,luminanceThreshold:.3,fontFamily:PP,fontFamilyMonospace:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace`,respectReducedMotion:!1,cursorType:`default`,defaultGradient:{from:`blue`,to:`cyan`,deg:45},defaultRadius:`md`,activeClassName:`mantine-active`,focusClassName:``,headings:{fontFamily:PP,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:X(34),lineHeight:`1.3`},h2:{fontSize:X(26),lineHeight:`1.35`},h3:{fontSize:X(22),lineHeight:`1.4`},h4:{fontSize:X(18),lineHeight:`1.45`},h5:{fontSize:X(16),lineHeight:`1.5`},h6:{fontSize:X(14),lineHeight:`1.5`}}},fontSizes:{xs:X(12),sm:X(14),md:X(16),lg:X(18),xl:X(20)},lineHeights:{xs:`1.4`,sm:`1.45`,md:`1.55`,lg:`1.6`,xl:`1.65`},fontWeights:{regular:`400`,medium:`600`,bold:`700`},radius:{xs:X(2),sm:X(4),md:X(8),lg:X(16),xl:X(32)},spacing:{xs:X(10),sm:X(12),md:X(16),lg:X(20),xl:X(32)},breakpoints:{xs:`36em`,sm:`48em`,md:`62em`,lg:`75em`,xl:`88em`},shadows:{xs:`0 ${X(1)} ${X(3)} rgba(0, 0, 0, 0.05), 0 ${X(1)} ${X(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${X(1)} ${X(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${X(10)} ${X(15)} ${X(-5)}, rgba(0, 0, 0, 0.04) 0 ${X(7)} ${X(7)} ${X(-5)}`,md:`0 ${X(1)} ${X(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${X(20)} ${X(25)} ${X(-5)}, rgba(0, 0, 0, 0.04) 0 ${X(10)} ${X(10)} ${X(-5)}`,lg:`0 ${X(1)} ${X(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${X(28)} ${X(23)} ${X(-7)}, rgba(0, 0, 0, 0.04) 0 ${X(12)} ${X(12)} ${X(-7)}`,xl:`0 ${X(1)} ${X(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${X(36)} ${X(28)} ${X(-7)}, rgba(0, 0, 0, 0.04) 0 ${X(17)} ${X(17)} ${X(-7)}`},other:{},components:{}},IP=`[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color`,LP=`[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }`;function RP(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function zP(e){if(!(e.primaryColor in e.colors))throw Error(IP);if(typeof e.primaryShade==`object`&&(!RP(e.primaryShade.dark)||!RP(e.primaryShade.light))||typeof e.primaryShade==`number`&&!RP(e.primaryShade))throw Error(LP)}function BP(e,t){if(!t)return zP(e),e;let n=Kj(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(n.headings.fontFamily=t.fontFamily),zP(n),n}var VP=(0,q.createContext)(null),HP=()=>(0,q.use)(VP)||FP;function UP(){let e=(0,q.use)(VP);if(!e)throw Error(`@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app`);return e}function WP({theme:e,children:t,inherit:n=!0}){let r=HP();return(0,J.jsx)(VP,{value:(0,q.useMemo)(()=>BP(n?r:FP,e),[e,r,n]),children:t})}WP.displayName=`@mantine/core/MantineThemeProvider`;function GP(e){return Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(``)}function KP(e,t){let n=t?[t]:[`:root`,`:host`],r=GP(e.variables),i=r?`${n.join(`, `)}{${r}}`:``,a=GP(e.dark),o=GP(e.light),s=e=>n.map(t=>t===`:host`?`${t}([data-mantine-color-scheme="${e}"])`:`${t}[data-mantine-color-scheme="${e}"]`).join(`, `);return`${i}\n\n${a?`${s(`dark`)}{${a}}`:``}\n\n${o?`${s(`light`)}{${o}}`:``}`}function qP({theme:e,color:t,colorScheme:n,name:r=t,withColorValues:i=!0}){if(!e.colors[t])return{};if(n===`light`){let n=ZN(e,`light`),a={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${n===9?8:n+1})`,[`--mantine-color-${r}-light`]:`var(--mantine-color-${r}-1)`,[`--mantine-color-${r}-light-hover`]:`var(--mantine-color-${r}-2)`,[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-9)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-outline-hover`]:fP(e.colors[t][n],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...a}:a}let a=ZN(e,`dark`),o={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${a===9?8:a+1})`,[`--mantine-color-${r}-light`]:lP(e.colors[t][9],.5),[`--mantine-color-${r}-light-hover`]:lP(e.colors[t][9],.3),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-0)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(a-4,0)})`,[`--mantine-color-${r}-outline-hover`]:fP(e.colors[t][Math.max(a-4,0)],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...o}:o}function JP(e){return!!e&&typeof e==`object`&&`mantine-virtual-color`in e}function YP(e,t,n){Wj(t).forEach(r=>Object.assign(e,{[`--mantine-${n}-${r}`]:t[r]}))}var XP=e=>{let t=ZN(e,`light`),n=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:X(e.defaultRadius),r={variables:{"--mantine-z-index-app":`100`,"--mantine-z-index-modal":`200`,"--mantine-z-index-popover":`300`,"--mantine-z-index-overlay":`400`,"--mantine-z-index-max":`9999`,"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?`antialiased`:`unset`,"--mantine-moz-font-smoothing":e.fontSmoothing?`grayscale`:`unset`,"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":`light`,"--mantine-primary-color-contrast":hP(e,`light`),"--mantine-color-bright":`var(--mantine-color-black)`,"--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":`var(--mantine-color-red-6)`,"--mantine-color-placeholder":`var(--mantine-color-gray-5)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":`var(--mantine-color-white)`,"--mantine-color-default-hover":`var(--mantine-color-gray-0)`,"--mantine-color-default-color":`var(--mantine-color-black)`,"--mantine-color-default-border":`var(--mantine-color-gray-4)`,"--mantine-color-dimmed":`var(--mantine-color-gray-6)`,"--mantine-color-disabled":`var(--mantine-color-gray-2)`,"--mantine-color-disabled-color":`var(--mantine-color-gray-5)`,"--mantine-color-disabled-border":`var(--mantine-color-gray-3)`},dark:{"--mantine-color-scheme":`dark`,"--mantine-primary-color-contrast":hP(e,`dark`),"--mantine-color-bright":`var(--mantine-color-white)`,"--mantine-color-text":`var(--mantine-color-dark-0)`,"--mantine-color-body":`var(--mantine-color-dark-7)`,"--mantine-color-error":`var(--mantine-color-red-8)`,"--mantine-color-placeholder":`var(--mantine-color-dark-3)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":`var(--mantine-color-dark-6)`,"--mantine-color-default-hover":`var(--mantine-color-dark-5)`,"--mantine-color-default-color":`var(--mantine-color-white)`,"--mantine-color-default-border":`var(--mantine-color-dark-4)`,"--mantine-color-dimmed":`var(--mantine-color-dark-2)`,"--mantine-color-disabled":`var(--mantine-color-dark-6)`,"--mantine-color-disabled-color":`var(--mantine-color-dark-3)`,"--mantine-color-disabled-border":`var(--mantine-color-dark-4)`}};YP(r.variables,e.breakpoints,`breakpoint`),YP(r.variables,e.spacing,`spacing`),YP(r.variables,e.fontSizes,`font-size`),YP(r.variables,e.lineHeights,`line-height`),YP(r.variables,e.shadows,`shadow`),YP(r.variables,e.radius,`radius`),YP(r.variables,e.fontWeights,`font-weight`),e.colors[e.primaryColor].forEach((t,n)=>{r.variables[`--mantine-primary-color-${n}`]=`var(--mantine-color-${e.primaryColor}-${n})`}),Wj(e.colors).forEach(t=>{let n=e.colors[t];if(JP(n)){Object.assign(r.light,qP({theme:e,name:n.name,color:n.light,colorScheme:`light`,withColorValues:!0})),Object.assign(r.dark,qP({theme:e,name:n.name,color:n.dark,colorScheme:`dark`,withColorValues:!0}));return}n.forEach((e,n)=>{r.variables[`--mantine-color-${t}-${n}`]=e}),Object.assign(r.light,qP({theme:e,color:t,colorScheme:`light`,withColorValues:!1})),Object.assign(r.dark,qP({theme:e,color:t,colorScheme:`dark`,withColorValues:!1}))});let i=e.headings.sizes;return Wj(i).forEach(t=>{r.variables[`--mantine-${t}-font-size`]=i[t].fontSize,r.variables[`--mantine-${t}-line-height`]=i[t].lineHeight,r.variables[`--mantine-${t}-font-weight`]=i[t].fontWeight||e.headings.fontWeight}),r};function ZP(){let e=UP(),t=xP(),n=Wj(e.breakpoints).reduce((t,n)=>{let r=e.breakpoints[n].includes(`px`),i=Yj(e.breakpoints[n]);return`${t}@media (max-width: ${r?`${i-.1}px`:Qj(i-.1)}) {.mantine-visible-from-${n} {display: none !important;}}@media (min-width: ${r?`${i}px`:Qj(i)}) {.mantine-hidden-from-${n} {display: none !important;}}`},``);return(0,J.jsx)(`style`,{"data-mantine-styles":`classes`,nonce:t?.(),dangerouslySetInnerHTML:{__html:n}})}function QP({theme:e,generator:t}){let n=XP(e),r=t?.(e);return r?Kj(n,r):n}var $P=XP(FP);function eF(e){let t={variables:{},light:{},dark:{}};return Wj(e.variables).forEach(n=>{$P.variables[n]!==e.variables[n]&&(t.variables[n]=e.variables[n])}),Wj(e.light).forEach(n=>{$P.light[n]!==e.light[n]&&(t.light[n]=e.light[n])}),Wj(e.dark).forEach(n=>{$P.dark[n]!==e.dark[n]&&(t.dark[n]=e.dark[n])}),t}function tF(e){return KP({variables:{},dark:{"--mantine-color-scheme":`dark`},light:{"--mantine-color-scheme":`light`}},e)}function nF({cssVariablesSelector:e,deduplicateCssVariables:t}){let n=UP(),r=xP(),i=QP({theme:n,generator:yP()}),a=(e===void 0||e===`:root`||e===`:host`)&&t,o=KP(a?eF(i):i,e);return o?(0,J.jsx)(`style`,{"data-mantine-styles":!0,nonce:r?.(),dangerouslySetInnerHTML:{__html:`${o}${a?``:tF(e)}`}}):null}nF.displayName=`@mantine/CssVariables`;function rF({respectReducedMotion:e,getRootElement:t}){NM(()=>{e&&t()?.setAttribute(`data-respect-reduced-motion`,`true`)},[e])}function iF({theme:e,children:t,getStyleNonce:n,withStaticClasses:r=!0,withGlobalClasses:i=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:s,classNamesPrefix:c=`mantine`,colorSchemeManager:l=XN(),defaultColorScheme:u=`light`,getRootElement:d=()=>document.documentElement,cssVariablesResolver:f,forceColorScheme:p,stylesTransform:m,env:h}){let{colorScheme:g,setColorScheme:_,clearColorScheme:v}=AP({defaultColorScheme:u,forceColorScheme:p,manager:l,getRootElement:d});return rF({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:d}),(0,J.jsx)(_P,{value:{colorScheme:g,setColorScheme:_,clearColorScheme:v,getRootElement:d,classNamesPrefix:c,getStyleNonce:n,cssVariablesResolver:f,cssVariablesSelector:s??`:root`,withStaticClasses:r,stylesTransform:m,env:h},children:(0,J.jsxs)(WP,{theme:e,children:[o&&(0,J.jsx)(nF,{cssVariablesSelector:s,deduplicateCssVariables:a}),i&&(0,J.jsx)(ZP,{}),t]})})}iF.displayName=`@mantine/core/MantineProvider`;function aF({children:e,theme:t,env:n}){return(0,J.jsx)(_P,{value:{colorScheme:`auto`,setColorScheme:()=>{},clearColorScheme:()=>{},getRootElement:()=>document.documentElement,classNamesPrefix:`mantine`,cssVariablesSelector:`:root`,withStaticClasses:!1,headless:!0,env:n},children:(0,J.jsx)(WP,{theme:t,children:e})})}aF.displayName=`@mantine/core/HeadlessMantineProvider`;function Z(e,t,n){let r=UP(),i=r.components[e]?.defaultProps,a=typeof i==`function`?i(r):i;return{...t,...a,...$j(n)}}function oF({classNames:e,styles:t,props:n,stylesCtx:r}){let i=UP();return{resolvedClassNames:qN({theme:i,classNames:e,props:n,stylesCtx:r||void 0}),resolvedStyles:JN({theme:i,styles:t,props:n,stylesCtx:r||void 0})}}var sF={always:`mantine-focus-always`,auto:`mantine-focus-auto`,never:`mantine-focus-never`};function cF({theme:e,options:t,unstyled:n}){return WN(t?.focusable&&!n&&(e.focusClassName||sF[e.focusRing]),t?.active&&!n&&e.activeClassName)}function lF({selector:e,stylesCtx:t,options:n,props:r,theme:i}){return qN({theme:i,classNames:n?.classNames,props:n?.props||r,stylesCtx:t})[e]}function uF({selector:e,stylesCtx:t,theme:n,classNames:r,props:i}){return qN({theme:n,classNames:r,props:i,stylesCtx:t})[e]}function dF({rootSelector:e,selector:t,className:n}){return e===t?n:void 0}function fF({selector:e,classes:t,unstyled:n}){return n?void 0:t[e]}function pF({themeName:e,classNamesPrefix:t,selector:n,withStaticClass:r}){return r===!1?[]:e.map(e=>`${t}-${e}-${n}`)}function mF({options:e,classes:t,selector:n,unstyled:r}){return e?.variant&&!r?t[`${n}--${e.variant}`]:void 0}function hF({theme:e,options:t,themeName:n,selector:r,classNamesPrefix:i,resolvedClassNames:a,resolvedThemeClassNames:o,classes:s,unstyled:c,className:l,rootSelector:u,props:d,stylesCtx:f,withStaticClasses:p,headless:m,transformedStyles:h}){return WN(cF({theme:e,options:t,unstyled:c||m}),o.map(e=>e[r]),mF({options:t,classes:s,selector:r,unstyled:c||m}),a[r],uF({selector:r,stylesCtx:f,theme:e,classNames:h,props:d}),lF({selector:r,stylesCtx:f,options:t,props:d,theme:e}),dF({rootSelector:u,selector:r,className:l}),fF({selector:r,classes:s,unstyled:c||m}),p&&!m&&pF({themeName:n,classNamesPrefix:i,selector:r,withStaticClass:t?.withStaticClass}),t?.className)}function gF({style:e,theme:t}){return Array.isArray(e)?e.reduce((e,n)=>({...e,...gF({style:n,theme:t})}),{}):typeof e==`function`?e(t):e??{}}function _F({theme:e,selector:t,options:n,props:r,stylesCtx:i,rootSelector:a,withStylesTransform:o,resolvedStyles:s,resolvedThemeStyles:c,resolvedVars:l,resolvedRootStyle:u}){return{...c[t],...s[t],...!o&&JN({theme:e,styles:n?.styles,props:n?.props||r,stylesCtx:i})[t],...l[t],...a===t?u:null,...gF({style:n?.style,theme:e})}}function vF(e){return e.reduce((e,t)=>(t&&Object.keys(t).forEach(n=>{e[n]={...e[n],...$j(t[n])}}),e),{})}function yF({props:e,stylesCtx:t,themeName:n,theme:r}){let i=TP()?.();return{getTransformedStyles:a=>i?[...a.map(n=>i(n,{props:e,theme:r,ctx:t})),...n.map(n=>i(r.components[n]?.styles,{props:e,theme:r,ctx:t}))].filter(Boolean):[],withStylesTransform:!!i}}function bF({name:e,classes:t,props:n,stylesCtx:r,className:i,style:a,rootSelector:o=`root`,unstyled:s,classNames:c,styles:l,vars:u,varsResolver:d,attributes:f}){let p=UP(),m=bP(),h=SP(),g=CP(),_=(Array.isArray(e)?e:[e]).filter(e=>e),{withStylesTransform:v,getTransformedStyles:y}=yF({props:n,stylesCtx:r,themeName:_,theme:p}),b=qN({theme:p,classNames:c,props:n,stylesCtx:r}),x=_.map(e=>qN({theme:p,classNames:p.components[e]?.classNames,props:n,stylesCtx:r})),S=v?{}:JN({theme:p,styles:l,props:n,stylesCtx:r}),C={};if(!v)for(let e of _){let t=JN({theme:p,styles:p.components[e]?.styles,props:n,stylesCtx:r});for(let e of Object.keys(t))C[e]={...C[e],...t[e]}}let w=vF([g?{}:d?.(p,n,r),..._.map(e=>p.components?.[e]?.vars?.(p,n,r)),u?.(p,n,r)]),T=gF({style:a,theme:p});return(e,a)=>({...f?.[e],className:hF({theme:p,options:a,themeName:_,selector:e,classNamesPrefix:m,resolvedClassNames:b,resolvedThemeClassNames:x,classes:t,unstyled:s,className:i,rootSelector:o,props:n,stylesCtx:r,withStaticClasses:h,headless:g,transformedStyles:y([a?.styles,l])}),style:_F({theme:p,selector:e,options:a,props:n,stylesCtx:r,rootSelector:o,withStylesTransform:v,resolvedStyles:S,resolvedThemeStyles:C,resolvedVars:w,resolvedRootStyle:T})})}function xF(e){return Wj(e).reduce((t,n)=>e[n]===void 0?t:`${t}${qj(n)}:${e[n]};`,``).trim()}function SF({selector:e,styles:t,media:n,container:r}){let i=t?xF(t):``,a=Array.isArray(n)?n.map(t=>`@media${t.query}{${e}{${xF(t.styles)}}}`):[],o=Array.isArray(r)?r.map(t=>`@container ${t.query}{${e}{${xF(t.styles)}}}`):[];return`${i?`${e}{${i}}`:``}${a.join(``)}${o.join(``)}`.trim()}function CF(e){return(0,J.jsx)(`style`,{"data-mantine-styles":`inline`,nonce:xP()?.(),dangerouslySetInnerHTML:{__html:SF(e)}})}function wF(e){let{m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pe:y,ps:b,pis:x,pie:S,bd:C,bdrs:w,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:j,ta:M,lh:N,fs:P,tt:F,td:ee,w:I,miw:te,maw:ne,h:L,mih:re,mah:ie,bgsz:ae,bgp:oe,bgr:se,bga:ce,pos:le,top:ue,left:R,bottom:de,right:z,inset:fe,display:pe,flex:me,hiddenFrom:he,visibleFrom:ge,lightHidden:_e,darkHidden:ve,sx:ye,...be}=e;return{styleProps:$j({m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pis:x,pie:S,pe:y,ps:b,bd:C,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:j,ta:M,lh:N,fs:P,tt:F,td:ee,w:I,miw:te,maw:ne,h:L,mih:re,mah:ie,bgsz:ae,bgp:oe,bgr:se,bga:ce,pos:le,top:ue,left:R,bottom:de,right:z,inset:fe,display:pe,flex:me,bdrs:w,hiddenFrom:he,visibleFrom:ge,lightHidden:_e,darkHidden:ve,sx:ye}),rest:be}}var TF={m:{type:`spacing`,property:`margin`},mt:{type:`spacing`,property:`marginTop`},mb:{type:`spacing`,property:`marginBottom`},ml:{type:`spacing`,property:`marginLeft`},mr:{type:`spacing`,property:`marginRight`},ms:{type:`spacing`,property:`marginInlineStart`},me:{type:`spacing`,property:`marginInlineEnd`},mis:{type:`spacing`,property:`marginInlineStart`},mie:{type:`spacing`,property:`marginInlineEnd`},mx:{type:`spacing`,property:`marginInline`},my:{type:`spacing`,property:`marginBlock`},p:{type:`spacing`,property:`padding`},pt:{type:`spacing`,property:`paddingTop`},pb:{type:`spacing`,property:`paddingBottom`},pl:{type:`spacing`,property:`paddingLeft`},pr:{type:`spacing`,property:`paddingRight`},ps:{type:`spacing`,property:`paddingInlineStart`},pe:{type:`spacing`,property:`paddingInlineEnd`},pis:{type:`spacing`,property:`paddingInlineStart`},pie:{type:`spacing`,property:`paddingInlineEnd`},px:{type:`spacing`,property:`paddingInline`},py:{type:`spacing`,property:`paddingBlock`},bd:{type:`border`,property:`border`},bdrs:{type:`radius`,property:`borderRadius`},bg:{type:`color`,property:`background`},c:{type:`textColor`,property:`color`},opacity:{type:`identity`,property:`opacity`},ff:{type:`fontFamily`,property:`fontFamily`},fz:{type:`fontSize`,property:`fontSize`},fw:{type:`identity`,property:`fontWeight`},lts:{type:`size`,property:`letterSpacing`},ta:{type:`identity`,property:`textAlign`},lh:{type:`lineHeight`,property:`lineHeight`},fs:{type:`identity`,property:`fontStyle`},tt:{type:`identity`,property:`textTransform`},td:{type:`identity`,property:`textDecoration`},w:{type:`spacing`,property:`width`},miw:{type:`spacing`,property:`minWidth`},maw:{type:`spacing`,property:`maxWidth`},h:{type:`spacing`,property:`height`},mih:{type:`spacing`,property:`minHeight`},mah:{type:`spacing`,property:`maxHeight`},bgsz:{type:`size`,property:`backgroundSize`},bgp:{type:`identity`,property:`backgroundPosition`},bgr:{type:`identity`,property:`backgroundRepeat`},bga:{type:`identity`,property:`backgroundAttachment`},pos:{type:`identity`,property:`position`},top:{type:`size`,property:`top`},left:{type:`size`,property:`left`},bottom:{type:`size`,property:`bottom`},right:{type:`size`,property:`right`},inset:{type:`size`,property:`inset`},display:{type:`identity`,property:`display`},flex:{type:`identity`,property:`flex`}};function EF(e,t){let n=sP({color:e,theme:t});return n.color===`dimmed`?`var(--mantine-color-dimmed)`:n.color===`bright`?`var(--mantine-color-bright)`:n.variable?`var(${n.variable})`:n.color}function DF(e,t){let n=sP({color:e,theme:t});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:EF(e,t)}function OF(e,t){if(typeof e==`number`)return X(e);if(typeof e==`string`){let[n,r,...i]=e.split(` `).filter(e=>e.trim()!==``),a=`${X(n)}`;return r&&(a+=` ${r}`),i.length>0&&(a+=` ${EF(i.join(` `),t)}`),a.trim()}return e}var kF={text:`var(--mantine-font-family)`,mono:`var(--mantine-font-family-monospace)`,monospace:`var(--mantine-font-family-monospace)`,heading:`var(--mantine-font-family-headings)`,headings:`var(--mantine-font-family-headings)`};function AF(e){return typeof e==`string`&&e in kF?kF[e]:e}var jF=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function MF(e,t){return typeof e==`string`&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e==`string`&&jF.includes(e)?`var(--mantine-${e}-font-size)`:typeof e==`number`||typeof e==`string`?X(e):e}function NF(e){return e}var PF=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function FF(e,t){return typeof e==`string`&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e==`string`&&PF.includes(e)?`var(--mantine-${e}-line-height)`:e}function IF(e,t){return typeof e==`string`&&e in t.radius?`var(--mantine-radius-${e})`:typeof e==`number`||typeof e==`string`?X(e):e}function LF(e){return typeof e==`number`?X(e):e}function RF(e,t){if(typeof e==`number`)return X(e);if(typeof e==`string`){let n=e.replace(`-`,``);if(!(n in t.spacing))return X(e);let r=`--mantine-spacing-${n}`;return e.startsWith(`-`)?`calc(var(${r}) * -1)`:`var(${r})`}return e}var zF={color:EF,textColor:DF,fontSize:MF,spacing:RF,radius:IF,identity:NF,size:LF,lineHeight:FF,fontFamily:AF,border:OF};function BF(e){return e.replace(`(min-width: `,``).replace(`em)`,``)}function VF({media:e,...t}){let n=Object.keys(e).sort((e,t)=>Number(BF(e))-Number(BF(t))).map(t=>({query:t,styles:e[t]}));return{...t,media:n}}function HF(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return!(t.length===1&&t[0]===`base`)}function UF(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function WF(e){return typeof e==`object`&&e?Wj(e).filter(e=>e!==`base`):[]}function GF(e,t){return typeof e==`object`&&e&&t in e?e[t]:e}function KF({styleProps:e,data:t,theme:n}){return VF(Wj(e).reduce((r,i)=>{if(i===`hiddenFrom`||i===`visibleFrom`||i===`sx`)return r;let a=t[i],o=Array.isArray(a.property)?a.property:[a.property],s=UF(e[i]);if(!HF(e[i]))return o.forEach(e=>{r.inlineStyles[e]=zF[a.type](s,n)}),r;r.hasResponsiveStyles=!0;let c=WF(e[i]);return o.forEach(t=>{s!=null&&(r.styles[t]=zF[a.type](s,n)),c.forEach(o=>{let s=`(min-width: ${n.breakpoints[o]})`;r.media[s]={...r.media[s],[t]:zF[a.type](GF(e[i],o),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function qF(){return`__m__-${(0,q.useId)().replace(/[:«»]/g,``)}`}function JF(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...JF(n,t)}),{}):typeof e==`function`?e(t):e??{}}function YF(e){return e}var XF=YF;function ZF(e){return e}function Q(e){let t=e;return t.extend=ZF,t.withProps=e=>{let n=n=>(0,J.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}function QF(e){return Q(e)}function $F(e){let t=e;return t.withProps=e=>{let n=n=>(0,J.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=ZF,t}function eI(e){return`data-${(e.startsWith(`data-`)?e.slice(5):e).replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}`}function tI(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r===void 0||r===``||r===!1||r===null||(t[eI(n)]=e[n]),t},{})}function nI(e){return e?typeof e==`string`?{[eI(e)]:!0}:Array.isArray(e)?[...e].reduce((e,t)=>({...e,...nI(t)}),{}):tI(e):null}function rI(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...rI(n,t)}),{}):typeof e==`function`?e(t):e??{}}function iI({theme:e,style:t,vars:n,styleProps:r}){let i=rI(t,e),a=rI(n,e);return{...i,...a,...r}}function aI({component:e,style:t,__vars:n,className:r,variant:i,mod:a,size:o,hiddenFrom:s,visibleFrom:c,lightHidden:l,darkHidden:u,renderRoot:d,__size:f,ref:p,...m}){let h=UP(),g=e||`div`,{styleProps:_,rest:v}=wF(m),y=wP()?.()?.(_.sx),b=qF(),x=KF({styleProps:_,theme:h,data:TF}),S={ref:p,style:iI({theme:h,style:t,vars:n,styleProps:x.inlineStyles}),className:WN(r,y,{[b]:x.hasResponsiveStyles,"mantine-light-hidden":l,"mantine-dark-hidden":u,[`mantine-hidden-from-${s}`]:s,[`mantine-visible-from-${c}`]:c}),"data-variant":i,"data-size":eM(o)?void 0:o||void 0,size:f,...nI(a),...v};return(0,J.jsxs)(J.Fragment,{children:[x.hasResponsiveStyles&&(0,J.jsx)(CF,{selector:`.${b}`,styles:x.styles,media:x.media}),typeof d==`function`?d(S):(0,J.jsx)(g,{...S})]})}aI.displayName=`@mantine/core/Box`;var $=XF(aI),oI=(0,q.createContext)({dir:`ltr`,toggleDirection:()=>{},setDirection:()=>{}});function sI(){return(0,q.use)(oI)}var[cI,lI]=nM(`ScrollArea.Root component was not found in tree`);function uI(e,t){let n=(0,q.useEffectEvent)(t);NM(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e])}function dI(e){let{style:t,...n}=e,r=lI(),[i,a]=(0,q.useState)(0),[o,s]=(0,q.useState)(0),c=!!(i&&o);return uI(r.scrollbarX,()=>{let e=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(e),s(e)}),uI(r.scrollbarY,()=>{let e=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(e),a(e)}),c?(0,J.jsx)(`div`,{...n,style:{...t,width:i,height:o}}):null}function fI(e){let t=lI(),n=!!(t.scrollbarX&&t.scrollbarY);return t.type!==`scroll`&&n?(0,J.jsx)(dI,{...e}):null}var pI={scrollHideDelay:1e3,type:`hover`};function mI(e){let{type:t,scrollHideDelay:n,scrollbars:r,getStyles:i,ref:a,...o}=Z(`ScrollAreaRoot`,pI,e),[s,c]=(0,q.useState)(null),[l,u]=(0,q.useState)(null),[d,f]=(0,q.useState)(null),[p,m]=(0,q.useState)(null),[h,g]=(0,q.useState)(null),[_,v]=(0,q.useState)(0),[y,b]=(0,q.useState)(0),[x,S]=(0,q.useState)(!1),[C,w]=(0,q.useState)(!1),T=QM(a,e=>c(e));return(0,J.jsx)(cI,{value:{type:t,scrollHideDelay:n,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:C,onScrollbarYEnabledChange:w,onCornerWidthChange:v,onCornerHeightChange:b,getStyles:i},children:(0,J.jsx)($,{...o,ref:T,__vars:{"--sa-corner-width":r===`xy`?`${_}px`:`0px`,"--sa-corner-height":r===`xy`?`${y}px`:`0px`}})})}mI.displayName=`@mantine/core/ScrollAreaRoot`;function hI(e,t){let n=e/t;return Number.isNaN(n)?0:n}function gI(e){let t=hI(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function _I(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function vI(e,[t,n]){return Math.min(n,Math.max(t,e))}function yI(e,t,n=`ltr`){let r=gI(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=vI(e,n===`ltr`?[0,o]:[o*-1,0]);return _I([0,o],[0,s])(c)}function bI(e,t,n,r=`ltr`){let i=gI(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return _I([c,l],d)(e)}function xI(e,t){return e>0&&e<t}function SI(e){return e?parseInt(e,10):0}function CI(e,t,{checkForDefaultPrevented:n=!0}={}){return r=>{e?.(r),(n===!1||!r.defaultPrevented)&&t?.(r)}}var[wI,TI]=nM(`ScrollAreaScrollbar was not found in tree`);function EI(e){let{sizes:t,hasThumb:n,onThumbChange:r,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:s,onWheelScroll:c,onResize:l,ref:u,...d}=e,f=lI(),[p,m]=(0,q.useState)(null),h=QM(u,e=>m(e)),g=(0,q.useRef)(null),_=(0,q.useRef)(``),{viewport:v}=f,y=t.content-t.viewport,b=(0,q.useEffectEvent)(c),x=EM(o),S=DM(l,10),C=e=>{g.current&&s({x:e.clientX-g.current.left,y:e.clientY-g.current.top})};return(0,q.useEffect)(()=>{let e=e=>{let t=e.target;p?.contains(t)&&b(e,y)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[v,p,y]),(0,q.useEffect)(x,[t,x]),uI(p,S),uI(f.content,S),(0,J.jsx)(wI,{value:{scrollbar:p,hasThumb:n,onThumbChange:EM(r),onThumbPointerUp:EM(i),onThumbPositionChange:x,onThumbPointerDown:EM(a)},children:(0,J.jsx)(`div`,{...d,ref:h,"data-mantine-scrollbar":!0,style:{position:`absolute`,...d.style},onPointerDown:CI(e.onPointerDown,e=>{e.preventDefault(),e.button===0&&(e.target.setPointerCapture(e.pointerId),g.current=p.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,C(e))}),onPointerMove:CI(e.onPointerMove,C),onPointerUp:CI(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(e.preventDefault(),t.releasePointerCapture(e.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,g.current=null}})})}var DI=e=>{let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=lI(),[s,c]=(0,q.useState)(),l=(0,q.useRef)(null),u=QM(i,l,o.onScrollbarXChange);return(0,q.useEffect)(()=>{l.current&&c(getComputedStyle(l.current))},[l]),(0,J.jsx)(EI,{"data-orientation":`horizontal`,...a,ref:u,sizes:t,style:{...r,"--sa-thumb-width":`${gI(t)}px`},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),xI(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:SI(s.paddingLeft),paddingEnd:SI(s.paddingRight)}})}})};DI.displayName=`@mantine/core/ScrollAreaScrollbarX`;function OI(e){let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=lI(),[s,c]=(0,q.useState)(),l=(0,q.useRef)(null),u=QM(i,l,o.onScrollbarYChange);return(0,q.useEffect)(()=>{l.current&&c(window.getComputedStyle(l.current))},[]),(0,J.jsx)(EI,{...a,"data-orientation":`vertical`,ref:u,sizes:t,style:{"--sa-thumb-height":`${gI(t)}px`,...r},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),xI(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:SI(s.paddingTop),paddingEnd:SI(s.paddingBottom)}})}})}OI.displayName=`@mantine/core/ScrollAreaScrollbarY`;function kI(e){let{orientation:t=`vertical`,...n}=e,{dir:r}=sI(),i=lI(),a=(0,q.useRef)(null),o=(0,q.useRef)(0),[s,c]=(0,q.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=hI(s.viewport,s.content),u={...n,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>{a.current=e},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:e=>{o.current=e}},d=(e,t)=>bI(e,o.current,s,t);return t===`horizontal`?(0,J.jsx)(DI,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=yI(e,s,r);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,r))}}):t===`vertical`?(0,J.jsx)(OI,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=yI(e,s);s.scrollbar.size===0?a.current.style.setProperty(`--thumb-opacity`,`0`):a.current.style.setProperty(`--thumb-opacity`,`1`),a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}kI.displayName=`@mantine/core/ScrollAreaScrollbarVisible`;function AI(e){let t=lI(),{forceMount:n,...r}=e,[i,a]=(0,q.useState)(!1),o=e.orientation===`horizontal`,s=DM(()=>{if(t.viewport){let e=t.viewport.offsetWidth<t.viewport.scrollWidth,n=t.viewport.offsetHeight<t.viewport.scrollHeight;a(o?e:n)}},10);return uI(t.viewport,s),uI(t.content,s),n||i?(0,J.jsx)(kI,{"data-state":i?`visible`:`hidden`,...r}):null}AI.displayName=`@mantine/core/ScrollAreaScrollbarAuto`;function jI(e){let{forceMount:t,...n}=e,r=lI(),[i,a]=(0,q.useState)(!1);return(0,q.useEffect)(()=>{let{scrollArea:e}=r,t=0;if(e){let n=()=>{window.clearTimeout(t),a(!0)},i=()=>{t=window.setTimeout(()=>a(!1),r.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,i),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,i)}}},[r.scrollArea,r.scrollHideDelay]),t||i?(0,J.jsx)(AI,{"data-state":i?`visible`:`hidden`,...n}):null}jI.displayName=`@mantine/core/ScrollAreaScrollbarHover`;function MI(e){let{forceMount:t,...n}=e,r=lI(),i=e.orientation===`horizontal`,[a,o]=(0,q.useState)(`hidden`),s=DM(()=>o(`idle`),100);return(0,q.useEffect)(()=>{if(a===`idle`){let e=window.setTimeout(()=>o(`hidden`),r.scrollHideDelay);return()=>window.clearTimeout(e)}},[a,r.scrollHideDelay]),(0,q.useEffect)(()=>{let{viewport:e}=r,t=i?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(o(`scrolling`),s()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[r.viewport,i,s]),t||a!==`hidden`?(0,J.jsx)(kI,{"data-state":a===`hidden`?`hidden`:`visible`,...n,onPointerEnter:CI(e.onPointerEnter,()=>o(`interacting`)),onPointerLeave:CI(e.onPointerLeave,()=>o(`idle`))}):null}function NI(e){let{forceMount:t,...n}=e,r=lI(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=r,o=e.orientation===`horizontal`;return(0,q.useEffect)(()=>(o?i(!0):a(!0),()=>{o?i(!1):a(!1)}),[o,i,a]),r.type===`hover`?(0,J.jsx)(jI,{...n,forceMount:t}):r.type===`scroll`?(0,J.jsx)(MI,{...n,forceMount:t}):r.type===`auto`?(0,J.jsx)(AI,{...n,forceMount:t}):r.type===`always`?(0,J.jsx)(kI,{...n}):null}NI.displayName=`@mantine/core/ScrollAreaScrollbar`;function PI(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)}function FI(e){let{style:t,ref:n,...r}=e,i=lI(),a=TI(),{onThumbPositionChange:o}=a,s=QM(n,e=>a.onThumbChange(e)),c=(0,q.useRef)(void 0),l=DM(()=>{c.current&&=(c.current(),void 0)},100);return(0,q.useEffect)(()=>{let{viewport:e}=i;if(e){let t=()=>{l(),c.current||(c.current=PI(e,o),o())};return o(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[i.viewport,l,o]),(0,J.jsx)(`div`,{"data-state":a.hasThumb?`visible`:`hidden`,...r,ref:s,style:{width:`var(--sa-thumb-width)`,height:`var(--sa-thumb-height)`,...t},onPointerDownCapture:CI(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;a.onThumbPointerDown({x:n,y:r})}),onPointerUp:CI(e.onPointerUp,a.onThumbPointerUp)})}FI.displayName=`@mantine/core/ScrollAreaThumb`;function II(e){let{forceMount:t,...n}=e,r=TI();return t||r.hasThumb?(0,J.jsx)(FI,{...n}):null}II.displayName=`@mantine/core/ScrollAreaThumb`;function LI({children:e,style:t,ref:n,onWheel:r,...i}){let a=lI(),o=QM(n,a.onViewportChange),s=e=>{if(r?.(e),a.scrollbarXEnabled&&a.viewport&&e.shiftKey){let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollWidth:i,clientWidth:o}=a.viewport,s=t<1,c=t>=n-r-1;i>o&&(s||c)&&e.stopPropagation()}};return(0,J.jsx)($,{...i,ref:o,onWheel:s,style:{overflowX:a.scrollbarXEnabled?`scroll`:`hidden`,overflowY:a.scrollbarYEnabled?`scroll`:`hidden`,...t},children:(0,J.jsx)(`div`,{...a.getStyles(`content`),ref:a.onContentChange,children:e})})}LI.displayName=`@mantine/core/ScrollAreaViewport`;var RI={root:`m_d57069b5`,content:`m_b1336c6`,viewport:`m_c0783ff9`,viewportInner:`m_f8f631dd`,scrollbar:`m_c44ba933`,thumb:`m_d8b5e363`,corner:`m_21657268`};function zI(){return typeof window<`u`}function BI(e){return UI(e)?(e.nodeName||``).toLowerCase():`#document`}function VI(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function HI(e){return((UI(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function UI(e){return zI()?e instanceof Node||e instanceof VI(e).Node:!1}function WI(e){return zI()?e instanceof Element||e instanceof VI(e).Element:!1}function GI(e){return zI()?e instanceof HTMLElement||e instanceof VI(e).HTMLElement:!1}function KI(e){return!zI()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof VI(e).ShadowRoot}function qI(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=iL(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function JI(e){return/^(table|td|th)$/.test(BI(e))}function YI(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var XI=/transform|translate|scale|rotate|perspective|filter/,ZI=/paint|layout|strict|content/,QI=e=>!!e&&e!==`none`,$I;function eL(e){let t=WI(e)?iL(e):e;return QI(t.transform)||QI(t.translate)||QI(t.scale)||QI(t.rotate)||QI(t.perspective)||!nL()&&(QI(t.backdropFilter)||QI(t.filter))||XI.test(t.willChange||``)||ZI.test(t.contain||``)}function tL(e){let t=oL(e);for(;GI(t)&&!rL(t);){if(eL(t))return t;if(YI(t))return null;t=oL(t)}return null}function nL(){return $I??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),$I}function rL(e){return/^(html|body|#document)$/.test(BI(e))}function iL(e){return VI(e).getComputedStyle(e)}function aL(e){return WI(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function oL(e){if(BI(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||KI(e)&&e.host||HI(e);return KI(t)?t.host:t}function sL(e){let t=oL(e);return rL(t)?e.ownerDocument?e.ownerDocument.body:e.body:GI(t)&&qI(t)?t:sL(t)}function cL(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=sL(e),i=r===e.ownerDocument?.body,a=VI(r);if(i){let e=lL(a);return t.concat(a,a.visualViewport||[],qI(r)?r:[],e&&n?cL(e):[])}else return t.concat(r,cL(r,[],n))}function lL(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var uL=[`top`,`right`,`bottom`,`left`],dL=Math.min,fL=Math.max,pL=Math.round,mL=Math.floor,hL=e=>({x:e,y:e}),gL={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function _L(e,t,n){return fL(e,dL(t,n))}function vL(e,t){return typeof e==`function`?e(t):e}function yL(e){return e.split(`-`)[0]}function bL(e){return e.split(`-`)[1]}function xL(e){return e===`x`?`y`:`x`}function SL(e){return e===`y`?`height`:`width`}function CL(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function wL(e){return xL(CL(e))}function TL(e,t,n){n===void 0&&(n=!1);let r=bL(e),i=wL(e),a=SL(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=PL(o)),[o,PL(o)]}function EL(e){let t=PL(e);return[DL(e),t,DL(t)]}function DL(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var OL=[`left`,`right`],kL=[`right`,`left`],AL=[`top`,`bottom`],jL=[`bottom`,`top`];function ML(e,t,n){switch(e){case`top`:case`bottom`:return n?t?kL:OL:t?OL:kL;case`left`:case`right`:return t?AL:jL;default:return[]}}function NL(e,t,n,r){let i=bL(e),a=ML(yL(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(DL)))),a}function PL(e){let t=yL(e);return gL[t]+e.slice(t.length)}function FL(e){return{top:0,right:0,bottom:0,left:0,...e}}function IL(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:FL(e)}function LL(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function RL(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function zL(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function BL(){return/apple/i.test(navigator.vendor)}function VL(){return RL().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function HL(){return zL().includes(`jsdom/`)}var UL=`data-floating-ui-focusable`,WL=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function GL(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function KL(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&KI(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function qL(e){return`composedPath`in e?e.composedPath()[0]:e.target}function JL(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function YL(e){return e.matches(`html,body`)}function XL(e){return e?.ownerDocument||document}function ZL(e){return GI(e)&&e.matches(WL)}function QL(e){if(!e||HL())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function $L(e){return e?e.hasAttribute(UL)?e:e.querySelector(`[`+UL+`]`)||e:null}function eR(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...eR(e,t.id,n)])}function tR(e){return`nativeEvent`in e}function nR(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var rR=typeof document<`u`?q.useLayoutEffect:function(){},iR={...q};function aR(e){let t=q.useRef(e);return rR(()=>{t.current=e}),t}var oR=iR.useInsertionEffect||(e=>e());function sR(e){let t=q.useRef(()=>{});return oR(()=>{t.current=e}),q.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function cR(e,t,n){let{reference:r,floating:i}=e,a=CL(t),o=wL(t),s=SL(o),c=yL(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(bL(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function lR(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=vL(t,e),p=IL(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=LL(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=LL(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var uR=50,dR=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:lR},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=cR(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<uR&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=cR(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},fR=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=vL(e,t)||{};if(l==null)return{};let d=IL(u),f={x:n,y:r},p=wL(i),m=SL(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=dL(d[_],T),D=dL(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=_L(O,A,k),M=!c.arrow&&bL(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),pR=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=vL(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=yL(r),_=CL(o),v=yL(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[PL(o)]:EL(o)),x=p!==`none`;!d&&x&&b.push(...NL(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=TL(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==CL(t))||T.every(e=>CL(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=CL(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function mR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function hR(e){return uL.some(t=>e[t]>=0)}var gR=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=vL(e,t);switch(i){case`referenceHidden`:{let e=mR(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:hR(e)}}}case`escaped`:{let e=mR(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:hR(e)}}}default:return{}}}}};function _R(e){let t=dL(...e.map(e=>e.left)),n=dL(...e.map(e=>e.top)),r=fL(...e.map(e=>e.right)),i=fL(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function vR(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>LL(_R(e)))}var yR=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=vL(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]),d=vR(u),f=LL(_R(u)),p=IL(s);function m(){if(d.length===2&&d[0].left>d[1].right&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&c<e.right+p.right&&l>e.top-p.top&&l<e.bottom+p.bottom)||f;if(d.length>=2){if(CL(n)===`y`){let e=d[0],t=d[d.length-1],r=yL(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left,s=r?e.right:t.right;return{top:i,bottom:a,left:o,right:s,width:s-o,height:a-i,x:o,y:i}}let e=yL(n)===`left`,t=fL(...d.map(e=>e.right)),r=dL(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom,s=r,c=t;return{top:a,bottom:o,left:s,right:c,width:c-s,height:o-a,x:s,y:a}}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},bR=new Set([`left`,`top`]);async function xR(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=yL(n),s=bL(n),c=CL(n)===`y`,l=bR.has(o)?-1:1,u=a&&c?-1:1,d=vL(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var SR=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await xR(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},CR=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=vL(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=CL(yL(i)),p=xL(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=_L(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=_L(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},wR=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=vL(e,t),u={x:n,y:r},d=CL(i),f=xL(d),p=u[f],m=u[d],h=vL(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=bR.has(yL(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},TR=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=vL(e,t),u=await o.detectOverflow(t,l),d=yL(i),f=bL(i),p=CL(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=dL(h-u[g],v),x=dL(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=fL(u.left,0),t=fL(u.right,0),n=fL(u.top,0),r=fL(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:fL(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:fL(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function ER(e){let t=iL(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=GI(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=pL(n)!==a||pL(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function DR(e){return WI(e)?e:e.contextElement}function OR(e){let t=DR(e);if(!GI(t))return hL(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ER(t),o=(a?pL(n.width):n.width)/r,s=(a?pL(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var kR=hL(0);function AR(e){let t=VI(e);return!nL()||!t.visualViewport?kR:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function jR(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==VI(e)?!1:t}function MR(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=DR(e),o=hL(1);t&&(r?WI(r)&&(o=OR(r)):o=OR(e));let s=jR(a,n,r)?AR(a):hL(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=VI(a),t=r&&WI(r)?VI(r):r,n=e,i=lL(n);for(;i&&r&&t!==n;){let e=OR(i),t=i.getBoundingClientRect(),r=iL(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=VI(i),i=lL(n)}}return LL({width:u,height:d,x:c,y:l})}function NR(e,t){let n=aL(e).scrollLeft;return t?t.left+n:MR(HI(e)).left+n}function PR(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-NR(e,n),y:n.top+t.scrollTop}}function FR(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=HI(r),s=t?YI(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=hL(1),u=hL(0),d=GI(r);if((d||!d&&!a)&&((BI(r)!==`body`||qI(o))&&(c=aL(r)),d)){let e=MR(r);l=OR(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?PR(o,c):hL(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function IR(e){return Array.from(e.getClientRects())}function LR(e){let t=HI(e),n=aL(e),r=e.ownerDocument.body,i=fL(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=fL(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+NR(e),s=-n.scrollTop;return iL(r).direction===`rtl`&&(o+=fL(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var RR=25;function zR(e,t){let n=VI(e),r=HI(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=nL();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=NR(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=RR&&(a-=o)}else l<=RR&&(a+=l);return{width:a,height:o,x:s,y:c}}function BR(e,t){let n=MR(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=GI(e)?OR(e):hL(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function VR(e,t,n){let r;if(t===`viewport`)r=zR(e,n);else if(t===`document`)r=LR(HI(e));else if(WI(t))r=BR(t,n);else{let n=AR(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return LL(r)}function HR(e,t){let n=oL(e);return n===t||!WI(n)||rL(n)?!1:iL(n).position===`fixed`||HR(n,t)}function UR(e,t){let n=t.get(e);if(n)return n;let r=cL(e,[],!1).filter(e=>WI(e)&&BI(e)!==`body`),i=null,a=iL(e).position===`fixed`,o=a?oL(e):e;for(;WI(o)&&!rL(o);){let t=iL(o),n=eL(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||qI(o)&&!n&&HR(e,o))?r=r.filter(e=>e!==o):i=t,o=oL(o)}return t.set(e,r),r}function WR(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?YI(t)?[]:UR(t,this._c):[].concat(n),r],o=VR(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=VR(t,a[e],i);s=fL(n.top,s),c=dL(n.right,c),l=dL(n.bottom,l),u=fL(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function GR(e){let{width:t,height:n}=ER(e);return{width:t,height:n}}function KR(e,t,n){let r=GI(t),i=HI(t),a=n===`fixed`,o=MR(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=hL(0);function l(){c.x=NR(i)}if(r||!r&&!a)if((BI(t)!==`body`||qI(i))&&(s=aL(t)),r){let e=MR(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?PR(i,s):hL(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function qR(e){return iL(e).position===`static`}function JR(e,t){if(!GI(e)||iL(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return HI(e)===n&&(n=n.ownerDocument.body),n}function YR(e,t){let n=VI(e);if(YI(e))return n;if(!GI(e)){let t=oL(e);for(;t&&!rL(t);){if(WI(t)&&!qR(t))return t;t=oL(t)}return n}let r=JR(e,t);for(;r&&JI(r)&&qR(r);)r=JR(r,t);return r&&rL(r)&&qR(r)&&!eL(r)?n:r||tL(e)||n}var XR=async function(e){let t=this.getOffsetParent||YR,n=this.getDimensions,r=await n(e.floating);return{reference:KR(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ZR(e){return iL(e).direction===`rtl`}var QR={convertOffsetParentRelativeRectToViewportRelativeRect:FR,getDocumentElement:HI,getClippingRect:WR,getOffsetParent:YR,getElementRects:XR,getClientRects:IR,getDimensions:GR,getScale:OR,isElement:WI,isRTL:ZR};function $R(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ez(e,t){let n=null,r,i=HI(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=mL(d),h=mL(i.clientWidth-(u+f)),g=mL(i.clientHeight-(d+p)),_=mL(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:fL(0,dL(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!$R(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function tz(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=DR(e),u=i||a?[...l?cL(l):[],...t?cL(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?ez(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?MR(e):null;c&&g();function g(){let t=MR(e);h&&!$R(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var nz=SR,rz=CR,iz=pR,az=TR,oz=gR,sz=fR,cz=yR,lz=wR,uz=(e,t,n)=>{let r=new Map,i={platform:QR,...n},a={...i.platform,_c:r};return dR(e,t,{...i,platform:a})},dz=typeof document<`u`?q.useLayoutEffect:function(){};function fz(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!fz(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!fz(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function pz(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function mz(e,t){let n=pz(e);return Math.round(t*n)/n}function hz(e){let t=q.useRef(e);return dz(()=>{t.current=e}),t}function gz(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=q.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=q.useState(r);fz(f,r)||p(r);let[m,h]=q.useState(null),[g,_]=q.useState(null),v=q.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=q.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=q.useRef(null),C=q.useRef(null),w=q.useRef(u),T=c!=null,E=hz(c),D=hz(i),O=hz(l),k=q.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),uz(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!fz(w.current,t)&&(w.current=t,MN.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);dz(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=q.useRef(!1);dz(()=>(A.current=!0,()=>{A.current=!1}),[]),dz(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=q.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=q.useMemo(()=>({reference:b,floating:x}),[b,x]),N=q.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=mz(M.floating,u.x),r=mz(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...pz(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return q.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var _z=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:sz({element:r.current,padding:i}).fn(n):r?sz({element:r,padding:i}).fn(n):{}}}},vz=(e,t)=>{let n=nz(e);return{name:n.name,fn:n.fn,options:[e,t]}},yz=(e,t)=>{let n=rz(e);return{name:n.name,fn:n.fn,options:[e,t]}},bz=(e,t)=>({fn:lz(e).fn,options:[e,t]}),xz=(e,t)=>{let n=iz(e);return{name:n.name,fn:n.fn,options:[e,t]}},Sz=(e,t)=>{let n=az(e);return{name:n.name,fn:n.fn,options:[e,t]}},Cz=(e,t)=>{let n=oz(e);return{name:n.name,fn:n.fn,options:[e,t]}},wz=(e,t)=>{let n=cz(e);return{name:n.name,fn:n.fn,options:[e,t]}},Tz=(e,t)=>{let n=_z(e);return{name:n.name,fn:n.fn,options:[e,t]}};function Ez(e){let t=q.useRef(void 0),n=q.useCallback(t=>{let n=e.map(e=>{if(e!=null){if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>e?.())}},e);return q.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var Dz=`data-floating-ui-focusable`,Oz=`active`,kz=`selected`,Az=`ArrowLeft`,jz=`ArrowRight`,Mz=`ArrowUp`,Nz=`ArrowDown`,Pz=[Az,jz],Fz=[Mz,Nz];[...Pz,...Fz];var Iz={...q},Lz=!1,Rz=0,zz=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+ Rz++;function Bz(){let[e,t]=q.useState(()=>Lz?zz():void 0);return rR(()=>{e??t(zz())},[]),q.useEffect(()=>{Lz=!0},[]),e}var Vz=Iz.useId||Bz;function Hz(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var Uz=q.createContext(null),Wz=q.createContext(null),Gz=()=>q.useContext(Uz)?.id||null,Kz=()=>q.useContext(Wz);function qz(e){return`data-floating-ui-`+e}function Jz(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var Yz=qz(`safe-polygon`);function Xz(e,t,n){if(n&&!nR(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function Zz(e){return typeof e==`function`?e():e}function Qz(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=Kz(),m=Gz(),h=aR(l),g=aR(c),_=aR(n),v=aR(d),y=q.useRef(),b=q.useRef(-1),x=q.useRef(),S=q.useRef(-1),C=q.useRef(!0),w=q.useRef(!1),T=q.useRef(()=>{}),E=q.useRef(!1),D=sR(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});q.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||(Jz(b),Jz(S),C.current=!0,E.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),q.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){D()&&r(!1,e,`hover`)}let t=XL(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,D]);let O=q.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=Xz(g.current,`close`,y.current);i&&!x.current?(Jz(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(Jz(b),r(!1,e,n))},[g,r]),k=sR(()=>{T.current(),x.current=void 0}),A=sR(()=>{if(w.current){let e=XL(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(Yz),w.current=!1}}),j=sR(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);q.useEffect(()=>{if(!s)return;function e(e){if(Jz(b),C.current=!1,u&&!nR(y.current)||Zz(v.current)>0&&!Xz(g.current,`open`))return;let t=Xz(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(j()){A();return}T.current();let t=XL(o.floating);if(Jz(S),E.current=!1,h.current&&i.current.floatingContext){n||Jz(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),T.current=()=>{t.removeEventListener(`mousemove`,r)};return}(y.current!==`touch`||!KL(o.floating,e.relatedTarget))&&O(e)}function a(e){j()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e)}})(e))}function c(){Jz(b)}function l(e){j()||O(e,!1)}if(WI(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,O,k,A,r,n,_,p,g,h,i,j,v]),rR(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&D()){w.current=!0;let e=o.floating;if(WI(o.domReference)&&e){var t;let n=XL(o.floating).body;n.setAttribute(Yz,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,D]),rR(()=>{n||(y.current=void 0,E.current=!1,k(),A())},[n,k,A]),q.useEffect(()=>()=>{k(),Jz(b),Jz(S),A()},[s,o.domReference,k,A]);let M=q.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!C.current&&!_.current&&r(!0,t,`hover`)}u&&!nR(y.current)||n||Zz(v.current)===0||E.current&&e.movementX**2+e.movementY**2<2||(Jz(S),y.current===`touch`?i():(E.current=!0,S.current=window.setTimeout(i,Zz(v.current))))}}},[u,r,n,_,v]);return q.useMemo(()=>s?{reference:M}:{},[s,M])}var $z=()=>{},eB=q.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:$z,setState:$z,isInstantPhase:!1}),tB=()=>q.useContext(eB);function nB(e){let{children:t,delay:n,timeoutMs:r=0}=e,[i,a]=q.useReducer((e,t)=>({...e,...t}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),o=q.useRef(null),s=q.useCallback(e=>{a({currentId:e})},[]);return rR(()=>{i.currentId?o.current===null?o.current=i.currentId:i.isInstantPhase||a({isInstantPhase:!0}):(i.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[i.currentId,i.isInstantPhase]),(0,J.jsx)(eB.Provider,{value:q.useMemo(()=>({...i,setState:a,setCurrentId:s}),[i,s]),children:t})}function rB(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,floatingId:i}=e,{id:a,enabled:o=!0}=t,s=a??i,c=tB(),{currentId:l,setCurrentId:u,initialDelay:d,setState:f,timeoutMs:p}=c;return rR(()=>{o&&l&&(f({delay:{open:1,close:Xz(d,`close`)}}),l!==s&&r(!1))},[o,s,r,f,l,d]),rR(()=>{function e(){r(!1),f({delay:d,currentId:null})}if(o&&l&&!n&&l===s){if(p){let t=window.setTimeout(e,p);return()=>{clearTimeout(t)}}e()}},[o,n,f,l,s,r,d,p]),rR(()=>{o&&(u===$z||!n||u(s))},[o,n,u,s]),c}var iB={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},aB={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},oB=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function sB(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=Kz(),g=sR(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=q.useRef(!1),{escapeKey:y,outsidePress:b}=oB(p),{escapeKey:x,outsidePress:S}=oB(m),C=q.useRef(!1),w=sR(e=>{if(!n||!o||!s||e.key!==`Escape`||C.current)return;let t=a.current.floatingContext?.nodeId,i=h?eR(h.nodesRef.current,t):[];if(!y&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,tR(e)?e.nativeEvent:e,`escape-key`)}),T=sR(e=>{var t;let n=()=>{var t;w(e),(t=qL(e))==null||t.removeEventListener(`keydown`,n)};(t=qL(e))==null||t.addEventListener(`keydown`,n)}),E=sR(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=v.current;if(v.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=qL(e),s=`[`+qz(`inert`)+`]`,c=XL(i.floating).querySelectorAll(s),u=WI(o)?o:null;for(;u&&!rL(u);){let e=oL(u);if(rL(e)||!WI(e))break;u=e}if(c.length&&WI(o)&&!YL(o)&&!KL(o,i.floating)&&Array.from(c).every(e=>!KL(u,e)))return;if(GI(o)&&k){let t=rL(o),n=iL(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&eR(h.nodesRef.current,d).some(t=>JL(e,t.context?.elements.floating));if(JL(e,i.floating)||JL(e,i.domReference)||f)return;let p=h?eR(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,`outside-press`)}),D=sR(e=>{var t;let n=()=>{var t;E(e),(t=qL(e))==null||t.removeEventListener(l,n)};(t=qL(e))==null||t.addEventListener(l,n)});q.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=y,a.current.__outsidePressBubbles=b;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),C.current=!0}function u(){e=window.setTimeout(()=>{C.current=!1},nL()?5:0)}let d=XL(i.floating);s&&(d.addEventListener(`keydown`,x?T:w,x),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,S?D:E,S);let p=[];return f&&(WI(i.domReference)&&(p=cL(i.domReference)),WI(i.floating)&&(p=p.concat(cL(i.floating))),!WI(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(cL(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t,{passive:!0})}),()=>{s&&(d.removeEventListener(`keydown`,x?T:w,x),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,S?D:E,S),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,y,b,w,x,T,E,S,D]),q.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let O=q.useMemo(()=>({onKeyDown:w,...u&&{[iB[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[w,r,u,d]),k=q.useMemo(()=>{function e(e){e.button===0&&(v.current=!0)}return{onKeyDown:w,onMouseDown:e,onMouseUp:e,[aB[l]]:()=>{a.current.insideReactTree=!0}}},[w,l,a]);return q.useMemo(()=>o?{reference:O,floating:k}:{},[o,O,k])}function cB(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=Vz(),a=q.useRef({}),[o]=q.useState(()=>Hz()),s=Gz()!=null,[c,l]=q.useState(r.reference),u=sR((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=q.useMemo(()=>({setPositionReference:l}),[]),f=q.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return q.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function lB(e){e===void 0&&(e={});let{nodeId:t}=e,n=cB({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[a,o]=q.useState(null),[s,c]=q.useState(null),l=i?.domReference||a,u=q.useRef(null),d=Kz();rR(()=>{l&&(u.current=l)},[l]);let f=gz({...e,elements:{...i,...s&&{reference:s}}}),p=q.useCallback(e=>{let t=WI(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;c(t),f.refs.setReference(t)},[f.refs]),m=q.useCallback(e=>{(WI(e)||e===null)&&(u.current=e,o(e)),(WI(f.refs.reference.current)||f.refs.reference.current===null||e!==null&&!WI(e))&&f.refs.setReference(e)},[f.refs]),h=q.useMemo(()=>({...f.refs,setReference:m,setPositionReference:p,domReference:u}),[f.refs,m,p]),g=q.useMemo(()=>({...f.elements,domReference:l}),[f.elements,l]),_=q.useMemo(()=>({...f,...r,refs:h,elements:g,nodeId:t}),[f,h,g,t,r]);return rR(()=>{r.dataRef.current.floatingContext=_;let e=d?.nodesRef.current.find(e=>e.id===t);e&&(e.context=_)}),q.useMemo(()=>({...f,context:_,refs:h,elements:g}),[f,h,g,_])}function uB(){return VL()&&BL()}function dB(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=q.useRef(!1),u=q.useRef(-1),d=q.useRef(!0);q.useEffect(()=>{if(!s)return;let e=VI(o.domReference);function t(){!n&&GI(o.domReference)&&o.domReference===GL(XL(o.domReference))&&(l.current=!0)}function r(){d.current=!0}function i(){d.current=!1}return e.addEventListener(`blur`,t),uB()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),uB()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[o.domReference,n,s]),q.useEffect(()=>{if(!s)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(l.current=!0)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,s]),q.useEffect(()=>()=>{Jz(u)},[]);let f=q.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(e){if(l.current)return;let t=qL(e.nativeEvent);if(c&&WI(t)){if(uB()&&!e.relatedTarget){if(!d.current&&!ZL(t))return}else if(!QL(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(e){l.current=!1;let t=e.relatedTarget,n=e.nativeEvent,i=WI(t)&&t.hasAttribute(qz(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.current=window.setTimeout(()=>{let e=GL(o.domReference?o.domReference.ownerDocument:document);!t&&e===o.domReference||KL(a.current.floatingContext?.refs.floating.current,e)||KL(o.domReference,e)||i||r(!1,n,`focus`)})}}),[a,o.domReference,r,c]);return q.useMemo(()=>s?{reference:f}:{},[s,f])}function fB(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[Oz]:t,[kz]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[Dz]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[Oz,kz].includes(n)))if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}),e),{})}}function pB(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=q.useCallback(t=>fB(t,e,`reference`),t),a=q.useCallback(t=>fB(t,e,`floating`),n),o=q.useCallback(t=>fB(t,e,`item`),r);return q.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var mB=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function hB(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=Vz(),c=r.domReference?.id||s,l=q.useMemo(()=>$L(r.floating)?.id||i,[r.floating,i]),u=mB.get(o)??o,d=Gz()!=null,f=q.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=q.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=q.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return q.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}var gB={scrollHideDelay:1e3,type:`hover`,scrollbars:`xy`},_B=HN((e,{scrollbarSize:t,overscrollBehavior:n,scrollbars:r})=>{let i=n;return n&&r&&(r===`x`?i=`${n} auto`:r===`y`&&(i=`auto ${n}`)),{root:{"--scrollarea-scrollbar-size":X(t),"--scrollarea-over-scroll-behavior":i}}}),vB=Q(e=>{let t=Z(`ScrollArea`,gB,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,scrollbarSize:s,vars:c,type:l,scrollHideDelay:u,viewportProps:d,viewportRef:f,onScrollPositionChange:p,children:m,offsetScrollbars:h,scrollbars:g,onBottomReached:_,onTopReached:v,onLeftReached:y,onRightReached:b,overscrollBehavior:x,startScrollPosition:S,attributes:C,...w}=t,[T,E]=(0,q.useState)(!1),[D,O]=(0,q.useState)(!1),[k,A]=(0,q.useState)(!1),j=(0,q.useRef)(!0),M=(0,q.useRef)(!1),N=(0,q.useRef)(!0),P=(0,q.useRef)(!1),F=bF({name:`ScrollArea`,props:t,classes:RI,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:C,vars:c,varsResolver:_B}),ee=(0,q.useRef)(null),I=Ez([f,ee]);return NM(()=>{S&&ee.current&&ee.current.scrollTo({left:S.x??0,top:S.y??0})},[]),uI(h===`present`?ee.current:null,()=>{let e=ee.current;e&&(O(e.scrollHeight>e.clientHeight),A(e.scrollWidth>e.clientWidth))}),(0,J.jsxs)(mI,{getStyles:F,type:l===`never`?`always`:l,scrollHideDelay:u,scrollbars:g,...F(`root`),...w,children:[(0,J.jsx)(LI,{...d,...F(`viewport`,{style:d?.style}),ref:I,"data-offset-scrollbars":h===!0?`xy`:h||void 0,"data-scrollbars":g||void 0,"data-horizontal-hidden":h===`present`&&!k?`true`:void 0,"data-vertical-hidden":h===`present`&&!D?`true`:void 0,onScroll:e=>{d?.onScroll?.(e),p?.({x:e.currentTarget.scrollLeft,y:e.currentTarget.scrollTop});let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollLeft:i,scrollWidth:a,clientWidth:o}=e.currentTarget,s=t-(n-r)>=-.8,c=t===0;s&&!M.current&&_?.(),c&&!j.current&&v?.(),M.current=s,j.current=c;let l=i-(a-o)>=-.8,u=i===0;l&&!P.current&&b?.(),u&&!N.current&&y?.(),P.current=l,N.current=u},children:m}),(g===`xy`||g===`x`)&&(0,J.jsx)(NI,{...F(`scrollbar`),orientation:`horizontal`,"data-hidden":l===`never`||h===`present`&&!k?!0:void 0,forceMount:!0,onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),children:(0,J.jsx)(II,{...F(`thumb`)})}),(g===`xy`||g===`y`)&&(0,J.jsx)(NI,{...F(`scrollbar`),orientation:`vertical`,"data-hidden":l===`never`||h===`present`&&!D?!0:void 0,forceMount:!0,onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),children:(0,J.jsx)(II,{...F(`thumb`)})}),(0,J.jsx)(fI,{...F(`corner`),"data-hovered":T||void 0,"data-hidden":l===`never`||void 0})]})});vB.displayName=`@mantine/core/ScrollArea`;var yB=Q(e=>{let{children:t,classNames:n,styles:r,scrollbarSize:i,scrollHideDelay:a,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:u,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,scrollbars:h,style:g,vars:_,onBottomReached:v,onTopReached:y,startScrollPosition:b,onOverflowChange:x,...S}=Z(`ScrollAreaAutosize`,gB,e),C=(0,q.useRef)(null),w=Ez([u,C]),T=(0,q.useRef)(!1),E=(0,q.useRef)(!1),D=(0,q.useEffectEvent)(()=>{let e=C.current;if(!e||!x)return;let t=e.scrollHeight>e.clientHeight;t!==T.current&&(E.current?x(t):(E.current=!0,t&&x(!0)),T.current=t)});return uI(x?C.current:null,D),(0,J.jsx)($,{...S,variant:p,style:[{display:`flex`,overflow:`hidden`},g],children:(0,J.jsx)($,{style:{display:`flex`,flexDirection:`column`,flex:1,overflow:`hidden`,...h===`y`&&{minWidth:0},...h===`x`&&{minHeight:0},...h===`xy`&&{minWidth:0,minHeight:0},...h===!1&&{minWidth:0,minHeight:0}},children:(0,J.jsx)(vB,{classNames:n,styles:r,scrollHideDelay:a,scrollbarSize:i,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:w,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,vars:_,scrollbars:h,onBottomReached:v,onTopReached:y,startScrollPosition:b,"data-autosize":`true`,children:t})})})});vB.classes=RI,vB.varsResolver=_B,yB.displayName=`@mantine/core/ScrollAreaAutosize`,yB.classes=RI,vB.Autosize=yB;var bB={root:`m_87cf2631`},xB={__staticSelector:`UnstyledButton`},SB=$F(e=>{let t=Z(`UnstyledButton`,xB,e),{className:n,component:r=`button`,__staticSelector:i,unstyled:a,classNames:o,styles:s,style:c,attributes:l,...u}=t;return(0,J.jsx)($,{...bF({name:i,props:t,classes:bB,className:n,style:c,classNames:o,styles:s,unstyled:a,attributes:l})(`root`,{focusable:!0}),component:r,type:r===`button`?`button`:void 0,...u})});SB.classes=bB,SB.displayName=`@mantine/core/UnstyledButton`;var CB={root:`m_515a97f8`},wB=Q(e=>{let t=Z(`VisuallyHidden`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,...l}=t;return(0,J.jsx)($,{component:`span`,...bF({name:`VisuallyHidden`,classes:CB,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c})(`root`),...l})});wB.classes=CB,wB.displayName=`@mantine/core/VisuallyHidden`;var TB={root:`m_1b7284a3`},EB=HN((e,{radius:t,shadow:n})=>({root:{"--paper-radius":t===void 0?void 0:mM(t),"--paper-shadow":_M(n)}})),DB=$F(e=>{let t=Z(`Paper`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,withBorder:s,vars:c,radius:l,shadow:u,variant:d,mod:f,attributes:p,...m}=t,h=bF({name:`Paper`,props:t,classes:TB,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:c,varsResolver:EB});return(0,J.jsx)($,{mod:[{"data-with-border":s},f],...h(`root`),variant:d,...m})});DB.classes=TB,DB.varsResolver=EB,DB.displayName=`@mantine/core/Paper`;function OB(e,t,n,r){return e===`center`||r===`center`?{top:t}:e===`end`?{bottom:n}:e===`start`?{top:n}:{}}function kB(e,t,n,r,i){return e===`center`||r===`center`?{left:t}:e===`end`?{[i===`ltr`?`right`:`left`]:n}:e===`start`?{[i===`ltr`?`left`:`right`]:n}:{}}var AB={bottom:`borderTopLeftRadius`,left:`borderTopRightRadius`,right:`borderBottomLeftRadius`,top:`borderBottomRightRadius`};function jB({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,arrowX:a,arrowY:o,dir:s}){let[c,l=`center`]=e.split(`-`),u={width:t,height:t,transform:`rotate(45deg)`,position:`absolute`,[AB[c]]:r},d=-t/2;return c===`left`?{...u,...OB(l,o,n,i),right:d,borderLeftColor:`transparent`,borderBottomColor:`transparent`,clipPath:`polygon(100% 0, 0 0, 100% 100%)`}:c===`right`?{...u,...OB(l,o,n,i),left:d,borderRightColor:`transparent`,borderTopColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 100%)`}:c===`top`?{...u,...kB(l,a,n,i,s),bottom:d,borderTopColor:`transparent`,borderLeftColor:`transparent`,clipPath:`polygon(0 100%, 100% 100%, 100% 0)`}:c===`bottom`?{...u,...kB(l,a,n,i,s),top:d,borderBottomColor:`transparent`,borderRightColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 0)`}:{}}function MB({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,visible:a,arrowX:o,arrowY:s,style:c,...l}){let{dir:u}=sI();return a?(0,J.jsx)(`div`,{...l,style:{...c,...jB({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,dir:u,arrowX:o,arrowY:s})}}):null}MB.displayName=`@mantine/core/FloatingArrow`;function NB(e,t){if(e===`rtl`&&(t.includes(`right`)||t.includes(`left`))){let[e,n]=t.split(`-`),r=e===`right`?`left`:`right`;return n===void 0?r:`${r}-${n}`}return t}function PB({open:e,close:t,openDelay:n,closeDelay:r}){let i=(0,q.useRef)(-1),a=(0,q.useRef)(-1),o=()=>{window.clearTimeout(i.current),window.clearTimeout(a.current)};return(0,q.useEffect)(()=>o,[]),{openDropdown:()=>{o(),n===0||n===void 0?e():i.current=window.setTimeout(e,n)},closeDropdown:()=>{o(),r===0||r===void 0?t():a.current=window.setTimeout(t,r)}}}var FB={root:`m_9814e45f`},IB={zIndex:lM(`modal`)},LB=HN((e,{gradient:t,color:n,backgroundOpacity:r,blur:i,radius:a,zIndex:o})=>({root:{"--overlay-bg":t||(n!==void 0||r!==void 0)&&dP(n||`#000`,r??.6)||void 0,"--overlay-filter":i?`blur(${X(i)})`:void 0,"--overlay-radius":a===void 0?void 0:mM(a),"--overlay-z-index":o?.toString()}})),RB=$F(e=>{let t=Z(`Overlay`,IB,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,fixed:c,center:l,children:u,radius:d,zIndex:f,gradient:p,blur:m,color:h,backgroundOpacity:g,mod:_,attributes:v,...y}=t;return(0,J.jsx)($,{...bF({name:`Overlay`,props:t,classes:FB,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:v,vars:s,varsResolver:LB})(`root`),mod:[{center:l,fixed:c},_],...y,children:u})});RB.classes=FB,RB.varsResolver=LB,RB.displayName=`@mantine/core/Overlay`;function zB(e){let t=document.createElement(`div`);return t.setAttribute(`data-portal`,`true`),typeof e.className==`string`&&t.classList.add(...e.className.split(` `).filter(Boolean)),typeof e.style==`object`&&Object.assign(t.style,e.style),typeof e.id==`string`&&t.setAttribute(`id`,e.id),t}function BB({target:e,reuseTargetNode:t,...n}){if(e)return typeof e==`string`?document.querySelector(e)||zB(n):e;if(t){let e=document.querySelector(`[data-mantine-shared-portal-node]`);if(e)return e;let t=zB(n);return t.setAttribute(`data-mantine-shared-portal-node`,`true`),document.body.appendChild(t),t}return zB(n)}var VB={reuseTargetNode:!0},HB=Q(e=>{let{children:t,target:n,reuseTargetNode:r,ref:i,...a}=Z(`Portal`,VB,e),[o,s]=(0,q.useState)(!1),c=(0,q.useRef)(null);return NM(()=>(s(!0),c.current=BB({target:n,reuseTargetNode:r,...a}),XM(i,c.current),!n&&!r&&c.current&&document.body.appendChild(c.current),()=>{!n&&!r&&c.current&&document.body.removeChild(c.current)}),[n]),!o||!c.current?null:(0,MN.createPortal)((0,J.jsx)(J.Fragment,{children:t}),c.current)});HB.displayName=`@mantine/core/Portal`;var UB=Q(({withinPortal:e=!0,children:t,...n})=>EP()===`test`||!e?(0,J.jsx)(J.Fragment,{children:t}):(0,J.jsx)(HB,{...n,children:t}));UB.displayName=`@mantine/core/OptionalPortal`;var WB=e=>({in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(.9) translateY(${e===`bottom`?10:-10}px)`},transitionProperty:`transform, opacity`}),GB={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:`opacity`},"fade-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(30px)`},transitionProperty:`opacity, transform`},"fade-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-30px)`},transitionProperty:`opacity, transform`},"fade-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(30px)`},transitionProperty:`opacity, transform`},"fade-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-30px)`},transitionProperty:`opacity, transform`},scale:{in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-y":{in:{opacity:1,transform:`scaleY(1)`},out:{opacity:0,transform:`scaleY(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-x":{in:{opacity:1,transform:`scaleX(1)`},out:{opacity:0,transform:`scaleX(0)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"skew-up":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(-20px) skew(-10deg, -5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"skew-down":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(20px) skew(-10deg, -5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-left":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(-5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-right":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-100%)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(100%)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"slide-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(100%)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"slide-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-100%)`},common:{transformOrigin:`right`},transitionProperty:`transform, opacity`},pop:{...WB(`bottom`),common:{transformOrigin:`center center`}},"pop-bottom-left":{...WB(`bottom`),common:{transformOrigin:`bottom left`}},"pop-bottom-right":{...WB(`bottom`),common:{transformOrigin:`bottom right`}},"pop-top-left":{...WB(`top`),common:{transformOrigin:`top left`}},"pop-top-right":{...WB(`top`),common:{transformOrigin:`top right`}}},KB={entering:`in`,entered:`in`,exiting:`out`,exited:`out`,"pre-exiting":`out`,"pre-entering":`out`};function qB({transition:e,state:t,duration:n,timingFunction:r}){let i={WebkitBackfaceVisibility:`hidden`,transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e==`string`?e in GB?{transitionProperty:GB[e].transitionProperty,...i,...GB[e].common,...GB[e][KB[t]]}:{}:{transitionProperty:e.transitionProperty,...i,...e.common,...e[KB[t]]}}function JB({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:i,onExit:a,onEntered:o,onExited:s,enterDelay:c,exitDelay:l}){let u=UP(),d=nN(),f=u.respectReducedMotion?d:!1,[p,m]=(0,q.useState)(f?0:e),[h,g]=(0,q.useState)(r?`entered`:`exited`),_=(0,q.useRef)(-1),v=(0,q.useRef)(-1),y=(0,q.useRef)(-1);function b(){window.clearTimeout(_.current),window.clearTimeout(v.current),cancelAnimationFrame(y.current)}let x=n=>{b();let r=n?i:a,c=n?o:s,l=f?0:n?e:t;m(l),l===0?(typeof r==`function`&&r(),typeof c==`function`&&c(),g(n?`entered`:`exited`)):y.current=requestAnimationFrame(()=>{MN.flushSync(()=>{g(n?`pre-entering`:`pre-exiting`)}),y.current=requestAnimationFrame(()=>{typeof r==`function`&&r(),g(n?`entering`:`exiting`),_.current=window.setTimeout(()=>{typeof c==`function`&&c(),g(n?`entered`:`exited`)},l)})})},S=e=>{if(b(),typeof(e?c:l)!=`number`){x(e);return}v.current=window.setTimeout(()=>{x(e)},e?c:l)};return PM(()=>{S(r)},[r]),(0,q.useEffect)(()=>()=>{b()},[]),{transitionDuration:p,transitionStatus:h,transitionTimingFunction:n||`ease`}}function YB({keepMounted:e,transition:t=`fade`,duration:n=250,exitDuration:r=n,mounted:i,children:a,timingFunction:o=`ease`,onExit:s,onEntered:c,onEnter:l,onExited:u,enterDelay:d,exitDelay:f}){let p=EP(),{transitionDuration:m,transitionStatus:h,transitionTimingFunction:g}=JB({mounted:i,exitDuration:r,duration:n,timingFunction:o,onExit:s,onEntered:c,onEnter:l,onExited:u,enterDelay:d,exitDelay:f});if(p===`test`)return i?(0,J.jsx)(J.Fragment,{children:a({})}):e?a({display:`none`}):null;if(m===0)return e?(0,J.jsx)(q.Activity,{mode:i?`visible`:`hidden`,children:a({})}):i?(0,J.jsx)(J.Fragment,{children:a({})}):null;let _=h===`exited`;return e?(0,J.jsx)(q.Activity,{mode:_?`hidden`:`visible`,children:a(_?{}:qB({transition:t,duration:m,state:h,timingFunction:g}))}):_?null:(0,J.jsx)(J.Fragment,{children:a(qB({transition:t,duration:m,state:h,timingFunction:g}))})}YB.displayName=`@mantine/core/Transition`;var XB={duration:100,transition:`fade`};function ZB(e,t){return{...XB,...t,...e}}var[QB,$B]=nM(`Popover component was not found in the tree`);function eV({children:e,active:t=!0,refProp:n=`ref`,innerRef:r}){let i=QM(GM(t),r),a=VN(e);return a?(0,q.cloneElement)(a,{[n]:i}):e}function tV(e){return(0,J.jsx)(wB,{tabIndex:-1,"data-autofocus":!0,...e})}eV.displayName=`@mantine/core/FocusTrap`,tV.displayName=`@mantine/core/FocusTrapInitialFocus`,eV.InitialFocus=tV;var nV={dropdown:`m_38a85659`,arrow:`m_a31dc6c1`,overlay:`m_3d7bc908`},rV=Q(e=>{let t=Z(`PopoverDropdown`,null,e),{className:n,style:r,vars:i,children:a,onKeyDownCapture:o,variant:s,classNames:c,styles:l,ref:u,...d}=t,f=$B(),p=FM({opened:f.opened,shouldReturnFocus:f.returnFocus}),m=f.withRoles?{"aria-labelledby":f.getTargetId(),id:f.getDropdownId(),role:`dialog`,tabIndex:-1}:{},h=QM(u,f.floating);return f.disabled?null:(0,J.jsx)(UB,{...f.portalProps,withinPortal:f.withinPortal,children:(0,J.jsx)(YB,{mounted:f.opened,...f.transitionProps,transition:f.transitionProps?.transition||`fade`,duration:f.transitionProps?.duration??150,keepMounted:f.keepMounted,exitDuration:typeof f.transitionProps?.exitDuration==`number`?f.transitionProps.exitDuration:f.transitionProps?.duration,children:e=>(0,J.jsx)(eV,{active:f.trapFocus&&f.opened,innerRef:h,children:(0,J.jsxs)($,{...m,...d,variant:s,onKeyDownCapture:dM(()=>{f.onClose?.(),f.onDismiss?.()},{active:f.closeOnEscape,onTrigger:p,onKeyDown:o}),"data-position":f.placement,"data-fixed":f.floatingStrategy===`fixed`||void 0,...f.getStyles(`dropdown`,{className:n,props:t,classNames:c,styles:l,style:[{...e,zIndex:f.zIndex,top:f.y??0,left:f.x??0,width:f.width===`target`?void 0:X(f.width),...f.referenceHidden?{display:`none`}:null},f.resolvedStyles.dropdown,l?.dropdown,r]}),children:[a,(0,J.jsx)(MB,{ref:f.arrowRef,arrowX:f.arrowX,arrowY:f.arrowY,visible:f.withArrow,position:f.placement,arrowSize:f.arrowSize,arrowRadius:f.arrowRadius,arrowOffset:f.arrowOffset,arrowPosition:f.arrowPosition,...f.getStyles(`arrow`,{props:t,classNames:c,styles:l})})]})})})})});rV.classes=nV,rV.displayName=`@mantine/core/PopoverDropdown`;var iV={refProp:`ref`,popupType:`dialog`},aV=Q(e=>{let{children:t,refProp:n,popupType:r,ref:i,...a}=Z(`PopoverTarget`,iV,e),o=VN(t);if(!o)throw Error(`Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let s=a,c=$B(),l=QM(c.reference,IN(o),i),u=c.withRoles?{"aria-haspopup":r,"aria-expanded":c.opened,"aria-controls":c.opened?c.getDropdownId():void 0,id:c.getTargetId()}:{},d=o.props;return(0,q.cloneElement)(o,{...s,...u,...c.targetProps,className:WN(c.targetProps.className,s.className,d.className),[n]:l,...c.controlled?null:{onClick:e=>{c.onToggle(),d.onClick?.(e)}}})});aV.displayName=`@mantine/core/PopoverTarget`;function oV(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function sV(e,t,n){let r=oV(e.middlewares),i=[vz(e.offset),Cz()];return e.dropdownVisible&&n!==`test`&&e.preventPositionChangeWhenVisible&&(r.flip=!1),r.flip&&i.push(typeof r.flip==`boolean`?xz():xz(r.flip)),r.shift&&i.push(yz(typeof r.shift==`boolean`?{limiter:bz(),padding:5}:{limiter:bz(),padding:5,...r.shift})),r.inline&&i.push(typeof r.inline==`boolean`?wz():wz(r.inline)),i.push(Tz({element:e.arrowRef,padding:e.arrowOffset})),(r.size||e.width===`target`)&&i.push(Sz({...typeof r.size==`boolean`?{}:r.size,apply({rects:n,availableWidth:i,availableHeight:a,...o}){let s=t().refs.floating.current?.style??{};r.size&&(typeof r.size==`object`&&r.size.apply?r.size.apply({rects:n,availableWidth:i,availableHeight:a,...o}):Object.assign(s,{maxWidth:`${i}px`,maxHeight:`${a}px`})),e.width===`target`&&Object.assign(s,{width:`${n.reference.width}px`})}})),i}function cV(e){let t=EP(),[n,r]=tN({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),i=(0,q.useRef)(n),a=()=>{n&&!e.disabled&&r(!1)},o=()=>{e.disabled||r(!n)},s=lB({strategy:e.strategy,placement:e.preventPositionChangeWhenVisible?e.positionRef.current:e.position,middleware:sV(e,()=>s,t),whileElementsMounted:e.keepMounted?void 0:tz});return(0,q.useEffect)(()=>{if(!(!s.refs.reference.current||!s.refs.floating.current)&&n)return tz(s.refs.reference.current,s.refs.floating.current,s.update)},[n,s.update]),PM(()=>{e.onPositionChange?.(s.placement),e.positionRef.current=s.placement},[s.placement,e.preventPositionChangeWhenVisible]),PM(()=>{n!==i.current&&(n?e.onOpen?.():e.onClose?.()),i.current=n},[n,e.onClose,e.onOpen]),NM(()=>{let t=-1;return n&&(t=window.setTimeout(()=>e.setDropdownVisible(!0),4)),()=>{window.clearTimeout(t)}},[n,e.position]),{floating:s,controlled:typeof e.opened==`boolean`,opened:n,onClose:a,onToggle:o}}var lV={position:`bottom`,offset:8,transitionProps:{transition:`fade`,duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,clickOutsideEvents:[`mousedown`,`touchstart`],zIndex:lM(`popover`),__staticSelector:`Popover`,width:`max-content`},uV=HN((e,{radius:t,shadow:n})=>({dropdown:{"--popover-radius":t===void 0?void 0:mM(t),"--popover-shadow":_M(n)}}));function dV(e){let t=Z(`Popover`,lV,e),{children:n,position:r,offset:i,onPositionChange:a,opened:o,transitionProps:s,onExitTransitionEnd:c,onEnterTransitionEnd:l,width:u,middlewares:d,withArrow:f,arrowSize:p,arrowOffset:m,arrowRadius:h,arrowPosition:g,unstyled:_,classNames:v,styles:y,closeOnClickOutside:b,withinPortal:x,portalProps:S,closeOnEscape:C,clickOutsideEvents:w,trapFocus:T,onClose:E,onDismiss:D,onOpen:O,onChange:k,zIndex:A,radius:j,shadow:M,id:N,defaultOpened:P,__staticSelector:F,withRoles:ee,disabled:I,returnFocus:te,variant:ne,keepMounted:L,vars:re,floatingStrategy:ie,withOverlay:ae,overlayProps:oe,hideDetached:se,attributes:ce,preventPositionChangeWhenVisible:le,...ue}=t,R=bF({name:F,props:t,classes:nV,classNames:v,styles:y,unstyled:_,attributes:ce,rootSelector:`dropdown`,vars:re,varsResolver:uV}),{resolvedStyles:de}=oF({classNames:v,styles:y,props:t}),[z,fe]=(0,q.useState)(o??P??!1),pe=(0,q.useRef)(r),me=(0,q.useRef)(null),[he,ge]=(0,q.useState)(null),[_e,ve]=(0,q.useState)(null),{dir:ye}=sI(),be=EP(),B=JM(N),xe=cV({middlewares:d,width:u,position:NB(ye,r),offset:typeof i==`number`?i+(f?p/2:0):i,arrowRef:me,arrowOffset:m,onPositionChange:a,opened:o,defaultOpened:P,onChange:k,onOpen:O,onClose:E,onDismiss:D,strategy:ie,dropdownVisible:z,setDropdownVisible:fe,positionRef:pe,disabled:I,preventPositionChangeWhenVisible:le,keepMounted:L});kM(()=>{b&&(xe.onClose(),D?.())},w,[he,_e]);let V=(0,q.useCallback)(e=>{ge(e),xe.floating.refs.setReference(e)},[xe.floating.refs.setReference]),H=(0,q.useCallback)(e=>{ve(e),xe.floating.refs.setFloating(e)},[xe.floating.refs.setFloating]),Se=(0,q.useCallback)(()=>{s?.onExited?.(),c?.(),fe(!1),le||(pe.current=r)},[s?.onExited,c,le,r]),Ce=(0,q.useCallback)(()=>{s?.onEntered?.(),l?.()},[s?.onEntered,l]);return(0,J.jsxs)(QB,{value:{returnFocus:te,disabled:I,controlled:xe.controlled,reference:V,floating:H,x:xe.floating.x,y:xe.floating.y,arrowX:xe.floating?.middlewareData?.arrow?.x,arrowY:xe.floating?.middlewareData?.arrow?.y,opened:xe.opened,arrowRef:me,transitionProps:{...s,onExited:Se,onEntered:Ce},width:u,withArrow:f,arrowSize:p,arrowOffset:m,arrowRadius:h,arrowPosition:g,placement:xe.floating.placement,trapFocus:T,withinPortal:x,portalProps:S,zIndex:A,radius:j,shadow:M,closeOnEscape:C,onDismiss:D,onClose:xe.onClose,onToggle:xe.onToggle,getTargetId:()=>B,getDropdownId:()=>`${B}-dropdown`,withRoles:ee,targetProps:ue,__staticSelector:F,classNames:v,styles:y,unstyled:_,variant:ne,keepMounted:L,getStyles:R,resolvedStyles:de,floatingStrategy:ie,referenceHidden:se&&be!==`test`?xe.floating.middlewareData.hide?.referenceHidden:!1},children:[n,ae&&(0,J.jsx)(YB,{transition:`fade`,mounted:xe.opened,duration:s?.duration||250,exitDuration:s?.exitDuration||250,children:e=>(0,J.jsx)(UB,{withinPortal:x,children:(0,J.jsx)(RB,{...oe,...R(`overlay`,{className:oe?.className,style:[e,oe?.style]})})})})]})}dV.Target=aV,dV.Dropdown=rV,dV.varsResolver=uV,dV.displayName=`@mantine/core/Popover`,dV.extend=e=>e,dV.withProps=e=>{let t=t=>(0,J.jsx)(dV,{...e,...t});return t.extend=dV.extend,t.displayName=`WithProps(${dV.displayName})`,t};var fV={root:`m_5ae2e3c`,barsLoader:`m_7a2bd4cd`,bar:`m_870bb79`,"bars-loader-animation":`m_5d2b3b9d`,dotsLoader:`m_4e3f22d7`,dot:`m_870c4af`,"loader-dots-animation":`m_aac34a1`,ovalLoader:`m_b34414df`,"oval-loader-animation":`m_f8e89c4b`},pV=({className:e,...t})=>(0,J.jsxs)($,{component:`span`,className:WN(fV.barsLoader,e),...t,children:[(0,J.jsx)(`span`,{className:fV.bar}),(0,J.jsx)(`span`,{className:fV.bar}),(0,J.jsx)(`span`,{className:fV.bar})]});pV.displayName=`@mantine/core/Bars`;var mV=({className:e,...t})=>(0,J.jsxs)($,{component:`span`,className:WN(fV.dotsLoader,e),...t,children:[(0,J.jsx)(`span`,{className:fV.dot}),(0,J.jsx)(`span`,{className:fV.dot}),(0,J.jsx)(`span`,{className:fV.dot})]});mV.displayName=`@mantine/core/Dots`;var hV=({className:e,...t})=>(0,J.jsx)($,{component:`span`,className:WN(fV.ovalLoader,e),...t});hV.displayName=`@mantine/core/Oval`;var gV={bars:pV,oval:hV,dots:mV},_V={loaders:gV,type:`oval`},vV=HN((e,{size:t,color:n})=>({root:{"--loader-size":fM(t,`loader-size`),"--loader-color":n?cP(n,e):void 0}})),yV=Q(e=>{let t=Z(`Loader`,_V,e),{size:n,color:r,type:i,vars:a,className:o,style:s,classNames:c,styles:l,unstyled:u,loaders:d,variant:f,children:p,attributes:m,...h}=t,g=bF({name:`Loader`,props:t,classes:fV,className:o,style:s,classNames:c,styles:l,unstyled:u,attributes:m,vars:a,varsResolver:vV});return p?(0,J.jsx)($,{...g(`root`),...h,children:p}):(0,J.jsx)($,{...g(`root`),component:d[i],variant:f,size:n,...h})});yV.defaultLoaders=gV,yV.classes=fV,yV.varsResolver=vV,yV.displayName=`@mantine/core/Loader`;var bV={root:`m_8d3f4000`,icon:`m_8d3afb97`,loader:`m_302b9fb1`,group:`m_1a0f1b21`,groupSection:`m_437b6484`},xV={orientation:`horizontal`},SV=HN((e,{borderWidth:t})=>({group:{"--ai-border-width":X(t)}})),CV=Q(e=>{let t=Z(`ActionIconGroup`,xV,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,variant:u,mod:d,attributes:f,...p}=Z(`ActionIconGroup`,xV,e);return(0,J.jsx)($,{...bF({name:`ActionIconGroup`,props:t,classes:bV,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:c,varsResolver:SV,rootSelector:`group`})(`group`),variant:u,mod:[{"data-orientation":s},d],role:`group`,...p})});CV.classes=bV,CV.varsResolver=SV,CV.displayName=`@mantine/core/ActionIconGroup`;var wV=HN((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":fM(o,`section-height`),"--section-padding-x":fM(o,`section-padding-x`),"--section-fz":hM(o),"--section-radius":t===void 0?void 0:mM(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),TV=Q(e=>{let t=Z(`ActionIconGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,variant:c,gradient:l,radius:u,autoContrast:d,attributes:f,...p}=t;return(0,J.jsx)($,{...bF({name:`ActionIconGroupSection`,props:t,classes:bV,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:wV,rootSelector:`groupSection`})(`groupSection`),variant:c,...p})});TV.classes=bV,TV.varsResolver=wV,TV.displayName=`@mantine/core/ActionIconGroupSection`;var EV=HN((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ai-size":fM(t,`ai-size`),"--ai-radius":n===void 0?void 0:mM(n),"--ai-bg":a||r?s.background:void 0,"--ai-hover":a||r?s.hover:void 0,"--ai-hover-color":a||r?s.hoverColor:void 0,"--ai-color":s.color,"--ai-bd":a||r?s.border:void 0}}}),DV=$F(e=>{let t=Z(`ActionIcon`,null,e),{className:n,unstyled:r,variant:i,classNames:a,styles:o,style:s,loading:c,loaderProps:l,size:u,color:d,radius:f,__staticSelector:p,gradient:m,vars:h,children:g,disabled:_,"data-disabled":v,autoContrast:y,mod:b,attributes:x,...S}=t,C=bF({name:[`ActionIcon`,p],props:t,className:n,style:s,classes:bV,classNames:a,styles:o,unstyled:r,attributes:x,vars:h,varsResolver:EV});return(0,J.jsxs)(SB,{...C(`root`,{active:!_&&!c&&!v}),...S,unstyled:r,variant:i,size:u,disabled:_||c,mod:[{loading:c,disabled:_||v},b],children:[typeof c==`boolean`&&(0,J.jsx)(YB,{mounted:c,transition:`slide-down`,duration:150,children:e=>(0,J.jsx)($,{component:`span`,...C(`loader`,{style:e}),"aria-hidden":!0,children:(0,J.jsx)(yV,{color:`var(--ai-color)`,size:`calc(var(--ai-size) * 0.55)`,...l})})}),(0,J.jsx)($,{component:`span`,mod:{loading:c},...C(`icon`),children:g})]})});DV.classes=bV,DV.varsResolver=EV,DV.displayName=`@mantine/core/ActionIcon`,DV.Group=CV,DV.GroupSection=TV;function OV({size:e=`var(--cb-icon-size, 70%)`,style:t,...n}){return(0,J.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...t,width:e,height:e},...n,children:(0,J.jsx)(`path`,{d:`M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}OV.displayName=`@mantine/core/CloseIcon`;var kV={root:`m_86a44da5`,"root--subtle":`m_220c80f2`},AV={variant:`subtle`},jV=HN((e,{size:t,radius:n,iconSize:r})=>({root:{"--cb-size":fM(t,`cb-size`),"--cb-radius":n===void 0?void 0:mM(n),"--cb-icon-size":X(r)}})),MV=$F(e=>{let t=Z(`CloseButton`,AV,e),{iconSize:n,children:r,vars:i,radius:a,className:o,classNames:s,style:c,styles:l,unstyled:u,"data-disabled":d,disabled:f,variant:p,icon:m,mod:h,attributes:g,__staticSelector:_,...v}=t,y=bF({name:_||`CloseButton`,props:t,className:o,style:c,classes:kV,classNames:s,styles:l,unstyled:u,attributes:g,vars:i,varsResolver:jV});return(0,J.jsxs)(SB,{...v,unstyled:u,variant:p,disabled:f,mod:[{disabled:f||d},h],...y(`root`,{variant:p,active:!f&&!d}),children:[m||(0,J.jsx)(OV,{}),r]})});MV.classes=kV,MV.varsResolver=jV,MV.displayName=`@mantine/core/CloseButton`;function NV(e){return q.Children.toArray(e).filter(Boolean)}var PV={root:`m_4081bf90`},FV={preventGrowOverflow:!0,gap:`md`,align:`center`,justify:`flex-start`,wrap:`wrap`},IV=HN((e,{grow:t,preventGrowOverflow:n,gap:r,align:i,justify:a,wrap:o},{childWidth:s})=>({root:{"--group-child-width":t&&n?s:void 0,"--group-gap":pM(r),"--group-align":i,"--group-justify":a,"--group-wrap":o}})),LV=Q(e=>{let t=Z(`Group`,FV,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,children:s,gap:c,align:l,justify:u,wrap:d,grow:f,preventGrowOverflow:p,vars:m,variant:h,__size:g,mod:_,attributes:v,...y}=t,b=NV(s),x=b.length,S=pM(c??`md`);return(0,J.jsx)($,{...bF({name:`Group`,props:t,stylesCtx:{childWidth:`calc(${100/x}% - (${S} - ${S} / ${x}))`},className:r,style:i,classes:PV,classNames:n,styles:a,unstyled:o,attributes:v,vars:m,varsResolver:IV})(`root`),variant:h,mod:[{grow:f},_],size:g,...y,children:b})});LV.classes=PV,LV.varsResolver=IV,LV.displayName=`@mantine/core/Group`;var[RV,zV]=nM(`ModalBase component was not found in tree`);function BV({opened:e,transitionDuration:t}){let[n,r]=(0,q.useState)(e),i=(0,q.useRef)(-1),a=nN()?0:t;return(0,q.useEffect)(()=>(e?(r(!0),window.clearTimeout(i.current)):a===0?r(!1):i.current=window.setTimeout(()=>r(!1),a),()=>window.clearTimeout(i.current)),[e,a]),n}function VV({id:e,transitionProps:t,opened:n,trapFocus:r,closeOnEscape:i,onClose:a,returnFocus:o}){let s=JM(e),[c,l]=(0,q.useState)(!1),[u,d]=(0,q.useState)(!1),f=BV({opened:n,transitionDuration:typeof t?.duration==`number`?t?.duration:200});return YM(`keydown`,e=>{e.key===`Escape`&&i&&!e.isComposing&&n&&e.target?.getAttribute(`data-mantine-stop-propagation`)!==`true`&&a()},{capture:!0}),FM({opened:n,shouldReturnFocus:r&&o}),{_id:s,titleMounted:c,bodyMounted:u,shouldLockScroll:f,setTitleMounted:l,setBodyMounted:d}}var HV=function(){return HV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},HV.apply(this,arguments)};function UV(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function WV(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var GV=`right-scroll-bar-position`,KV=`width-before-scroll-bar`,qV=`with-scroll-bars-hidden`,JV=`--removed-body-scroll-bar-size`;function YV(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function XV(e,t){var n=(0,q.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var ZV=typeof window<`u`?q.useLayoutEffect:q.useEffect,QV=new WeakMap;function $V(e,t){var n=XV(t||null,function(t){return e.forEach(function(e){return YV(e,t)})});return ZV(function(){var t=QV.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||YV(e,null)}),i.forEach(function(e){r.has(e)||YV(e,a)})}QV.set(n,e)},[e]),n}function eH(e){return e}function tH(e,t){t===void 0&&(t=eH);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function nH(e){e===void 0&&(e={});var t=tH(null);return t.options=HV({async:!0,ssr:!1},e),t}var rH=function(e){var t=e.sideCar,n=UV(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return q.createElement(r,HV({},n))};rH.isSideCarExport=!0;function iH(e,t){return e.useMedium(t),rH}var aH=nH(),oH=function(){},sH=q.forwardRef(function(e,t){var n=q.useRef(null),r=q.useState({onScrollCapture:oH,onWheelCapture:oH,onTouchMoveCapture:oH}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=UV(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=$V([n,t]),C=HV(HV({},b),i);return q.createElement(q.Fragment,null,u&&q.createElement(x,{sideCar:aH,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?q.cloneElement(q.Children.only(s),HV(HV({},C),{ref:S})):q.createElement(v,HV({},C,{className:c,ref:S}),s))});sH.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},sH.classNames={fullWidth:KV,zeroRight:GV};var cH,lH=function(){if(cH)return cH;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function uH(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=lH();return t&&e.setAttribute(`nonce`,t),e}function dH(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function fH(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var pH=function(){var e=0,t=null;return{add:function(n){e==0&&(t=uH())&&(dH(t,n),fH(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},mH=function(){var e=pH();return function(t,n){q.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},hH=function(){var e=mH();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},gH={left:0,top:0,right:0,gap:0},_H=function(e){return parseInt(e||``,10)||0},vH=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[_H(n),_H(r),_H(i)]},yH=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return gH;var t=vH(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},bH=hH(),xH=`data-scroll-locked`,SH=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
21
+ .${qV} {
22
+ overflow: hidden ${r};
23
+ padding-right: ${s}px ${r};
24
+ }
25
+ body[${xH}] {
26
+ overflow: hidden ${r};
27
+ overscroll-behavior: contain;
28
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
29
+ padding-left: ${i}px;
30
+ padding-top: ${a}px;
31
+ padding-right: ${o}px;
32
+ margin-left:0;
33
+ margin-top:0;
34
+ margin-right: ${s}px ${r};
35
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
36
+ }
37
+
38
+ .${GV} {
39
+ right: ${s}px ${r};
40
+ }
41
+
42
+ .${KV} {
43
+ margin-right: ${s}px ${r};
44
+ }
45
+
46
+ .${GV} .${GV} {
47
+ right: 0 ${r};
48
+ }
49
+
50
+ .${KV} .${KV} {
51
+ margin-right: 0 ${r};
52
+ }
53
+
54
+ body[${xH}] {
55
+ ${JV}: ${s}px;
56
+ }
57
+ `},CH=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},wH=function(){q.useEffect(function(){return document.body.setAttribute(xH,(CH()+1).toString()),function(){var e=CH()-1;e<=0?document.body.removeAttribute(xH):document.body.setAttribute(xH,e.toString())}},[])},TH=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;wH();var a=q.useMemo(function(){return yH(i)},[i]);return q.createElement(bH,{styles:SH(a,!t,i,n?``:`!important`)})},EH=!1;if(typeof window<`u`)try{var DH=Object.defineProperty({},`passive`,{get:function(){return EH=!0,!0}});window.addEventListener(`test`,DH,DH),window.removeEventListener(`test`,DH,DH)}catch{EH=!1}var OH=EH?{passive:!1}:!1,kH=function(e){return e.tagName===`TEXTAREA`},AH=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!kH(e)&&n[t]===`visible`)},jH=function(e){return AH(e,`overflowY`)},MH=function(e){return AH(e,`overflowX`)},NH=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),IH(e,r)){var i=LH(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},PH=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},FH=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},IH=function(e,t){return e===`v`?jH(t):MH(t)},LH=function(e,t){return e===`v`?PH(t):FH(t)},RH=function(e,t){return e===`h`&&t===`rtl`?-1:1},zH=function(e,t,n,r,i){var a=RH(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=LH(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&IH(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},BH=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},VH=function(e){return[e.deltaX,e.deltaY]},HH=function(e){return e&&`current`in e?e.current:e},UH=function(e,t){return e[0]===t[0]&&e[1]===t[1]},WH=function(e){return`
58
+ .block-interactivity-${e} {pointer-events: none;}
59
+ .allow-interactivity-${e} {pointer-events: all;}
60
+ `},GH=0,KH=[];function qH(e){var t=q.useRef([]),n=q.useRef([0,0]),r=q.useRef(),i=q.useState(GH++)[0],a=q.useState(hH)[0],o=q.useRef(e);q.useEffect(function(){o.current=e},[e]),q.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=WV([e.lockRef.current],(e.shards||[]).map(HH),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=q.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=BH(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=NH(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=NH(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return zH(h,t,e,h===`h`?s:c,!0)},[]),c=q.useCallback(function(e){var n=e;if(!(!KH.length||KH[KH.length-1]!==a)){var r=`deltaY`in n?VH(n):BH(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&UH(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(HH).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=q.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:JH(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=q.useCallback(function(e){n.current=BH(e),r.current=void 0},[]),d=q.useCallback(function(t){l(t.type,VH(t),t.target,s(t,e.lockRef.current))},[]),f=q.useCallback(function(t){l(t.type,BH(t),t.target,s(t,e.lockRef.current))},[]);q.useEffect(function(){return KH.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,OH),document.addEventListener(`touchmove`,c,OH),document.addEventListener(`touchstart`,u,OH),function(){KH=KH.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,OH),document.removeEventListener(`touchmove`,c,OH),document.removeEventListener(`touchstart`,u,OH)}},[]);var p=e.removeScrollBar,m=e.inert;return q.createElement(q.Fragment,null,m?q.createElement(a,{styles:WH(i)}):null,p?q.createElement(TH,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function JH(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var YH=iH(aH,qH),XH=q.forwardRef(function(e,t){return q.createElement(sH,HV({},e,{ref:t,sideCar:YH}))});XH.classNames=sH.classNames;function ZH({keepMounted:e,opened:t,onClose:n,id:r,transitionProps:i,onExitTransitionEnd:a,onEnterTransitionEnd:o,trapFocus:s,closeOnEscape:c,returnFocus:l,closeOnClickOutside:u,withinPortal:d,portalProps:f,lockScroll:p,children:m,zIndex:h,shadow:g,padding:_,__vars:v,unstyled:y,removeScrollProps:b,...x}){let{_id:S,titleMounted:C,bodyMounted:w,shouldLockScroll:T,setTitleMounted:E,setBodyMounted:D}=VV({id:r,transitionProps:i,opened:t,trapFocus:s,closeOnEscape:c,onClose:n,returnFocus:l}),{key:O,...k}=b||{};return(0,J.jsx)(UB,{...f,withinPortal:d,children:(0,J.jsx)(RV,{value:{opened:t,onClose:n,closeOnClickOutside:u,onExitTransitionEnd:a,onEnterTransitionEnd:o,transitionProps:{...i,keepMounted:e},getTitleId:()=>`${S}-title`,getBodyId:()=>`${S}-body`,titleMounted:C,bodyMounted:w,setTitleMounted:E,setBodyMounted:D,trapFocus:s,closeOnEscape:c,zIndex:h,unstyled:y},children:(0,J.jsx)(XH,{enabled:T&&p,...k,children:(0,J.jsx)($,{...x,id:S,__vars:{...v,"--mb-z-index":(h||lM(`modal`)).toString(),"--mb-shadow":_M(g),"--mb-padding":pM(_)},children:m})},O)})})}ZH.displayName=`@mantine/core/ModalBase`;function QH(){let e=zV();return(0,q.useEffect)(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var $H={title:`m_615af6c9`,header:`m_b5489c3c`,inner:`m_60c222c7`,content:`m_fd1ab0aa`,close:`m_606cb269`,body:`m_5df29311`};function eU({className:e,...t}){let n=QH(),r=zV();return(0,J.jsx)($,{id:n,className:WN({[$H.body]:!r.unstyled},e),...t})}eU.displayName=`@mantine/core/ModalBaseBody`;function tU({className:e,onClick:t,...n}){let r=zV();return(0,J.jsx)(MV,{...n,onClick:e=>{r.onClose(),t?.(e)},className:WN({[$H.close]:!r.unstyled},e),unstyled:r.unstyled})}tU.displayName=`@mantine/core/ModalBaseCloseButton`;function nU({transitionProps:e,className:t,innerProps:n,onKeyDown:r,style:i,ref:a,...o}){let s=zV();return(0,J.jsx)(YB,{mounted:s.opened,transition:`pop`,...s.transitionProps,onExited:()=>{s.onExitTransitionEnd?.(),s.transitionProps?.onExited?.()},onEntered:()=>{s.onEnterTransitionEnd?.(),s.transitionProps?.onEntered?.()},...e,children:e=>(0,J.jsx)(`div`,{...n,className:WN({[$H.inner]:!s.unstyled},n.className),children:(0,J.jsx)(eV,{active:s.opened&&s.trapFocus,innerRef:a,children:(0,J.jsx)(DB,{...o,component:`section`,role:`dialog`,tabIndex:-1,"aria-modal":!0,"aria-describedby":s.bodyMounted?s.getBodyId():void 0,"aria-labelledby":s.titleMounted?s.getTitleId():void 0,style:[i,e],className:WN({[$H.content]:!s.unstyled},t),unstyled:s.unstyled,children:o.children})})})})}nU.displayName=`@mantine/core/ModalBaseContent`;function rU({className:e,...t}){let n=zV();return(0,J.jsx)($,{component:`header`,className:WN({[$H.header]:!n.unstyled},e),...t})}rU.displayName=`@mantine/core/ModalBaseHeader`;var iU={duration:200,timingFunction:`ease`,transition:`fade`};function aU(e){let t=zV();return{...iU,...t.transitionProps,...e}}function oU({onClick:e,transitionProps:t,style:n,visible:r,...i}){let a=zV(),o=aU(t);return(0,J.jsx)(YB,{mounted:r===void 0?a.opened:r,...o,transition:`fade`,children:t=>(0,J.jsx)(RB,{fixed:!0,style:[n,t],zIndex:a.zIndex,unstyled:a.unstyled,onClick:t=>{e?.(t),a.closeOnClickOutside&&a.onClose()},...i})})}oU.displayName=`@mantine/core/ModalBaseOverlay`;function sU(){let e=zV();return(0,q.useEffect)(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function cU({className:e,...t}){let n=sU(),r=zV();return(0,J.jsx)($,{component:`h2`,className:WN({[$H.title]:!r.unstyled},e),id:n,...t})}cU.displayName=`@mantine/core/ModalBaseTitle`;function lU({children:e}){return(0,J.jsx)(J.Fragment,{children:e})}var uU=(0,q.createContext)({size:`sm`}),dU=Q(e=>{let t=Z(`InputClearButton`,null,e),{size:n,variant:r,vars:i,classNames:a,styles:o,...s}=t,c=(0,q.use)(uU),{resolvedClassNames:l,resolvedStyles:u}=oF({classNames:a,styles:o,props:t});return(0,J.jsx)(MV,{variant:r||`transparent`,size:n||c?.size||`sm`,classNames:l,styles:u,__staticSelector:`InputClearButton`,style:{pointerEvents:`all`,background:`var(--input-bg)`,...s.style},...s})});dU.displayName=`@mantine/core/InputClearButton`;var fU={xs:7,sm:8,md:10,lg:12,xl:15};function pU({__clearable:e,__clearSection:t,rightSection:n,__defaultRightSection:r,size:i=`sm`,__clearSectionMode:a=`both`}){let o=e&&t;return a===`rightSection`?n===null?null:n||r:a===`clear`?n===null?null:o||r:o&&(n||r)?(0,J.jsxs)(`div`,{"data-combined-clear-section":!0,style:{display:`flex`,gap:2,alignItems:`center`,paddingInlineEnd:fU[i]},children:[o,n||r]}):n===null?null:n||o||r}var mU=(0,q.createContext)({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0}),hU={wrapper:`m_6c018570`,input:`m_8fb7ebe7`,section:`m_82577fc2`,placeholder:`m_88bacfd0`,root:`m_46b77525`,label:`m_8fdc1311`,required:`m_78a94662`,error:`m_8f816625`,description:`m_fe47ce59`},gU=HN((e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${hM(t)} - ${X(2)})`}})),_U=Q(e=>{let t=Z(`InputDescription`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,__inheritStyles:l=!0,attributes:u,...d}=Z(`InputDescription`,null,t),f=(0,q.use)(mU),p=bF({name:[`InputWrapper`,c],props:t,classes:hU,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,rootSelector:`description`,vars:s,varsResolver:gU});return(0,J.jsx)($,{component:`p`,...(l&&f?.getStyles||p)(`description`,f?.getStyles?{className:r,style:i}:void 0),...d})});_U.classes=hU,_U.varsResolver=gU,_U.displayName=`@mantine/core/InputDescription`;var vU=HN((e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${hM(t)} - ${X(2)})`}})),yU=Q(e=>{let t=Z(`InputError`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=bF({name:[`InputWrapper`,l],props:t,classes:hU,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`error`,vars:s,varsResolver:vU}),p=(0,q.use)(mU);return(0,J.jsx)($,{component:`p`,...(u&&p?.getStyles||f)(`error`,p?.getStyles?{className:r,style:i}:void 0),...d})});yU.classes=hU,yU.varsResolver=vU,yU.displayName=`@mantine/core/InputError`;var bU={labelElement:`label`},xU=HN((e,{size:t})=>({label:{"--input-label-size":hM(t),"--input-asterisk-color":void 0}})),SU=Q(e=>{let t=Z(`InputLabel`,bU,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,labelElement:c,required:l,htmlFor:u,onMouseDown:d,children:f,__staticSelector:p,mod:m,attributes:h,...g}=t,_=bF({name:[`InputWrapper`,p],props:t,classes:hU,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,rootSelector:`label`,vars:s,varsResolver:xU}),v=(0,q.use)(mU),y=v?.getStyles||_;return(0,J.jsxs)($,{...y(`label`,v?.getStyles?{className:r,style:i}:void 0),component:c,htmlFor:c===`label`?u:void 0,mod:[{required:l},m],onMouseDown:e=>{d?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault()},...g,children:[f,l&&(0,J.jsx)(`span`,{...y(`required`),"aria-hidden":!0,children:` *`})]})});SU.classes=hU,SU.varsResolver=xU,SU.displayName=`@mantine/core/InputLabel`;var CU=Q(e=>{let t=Z(`InputPlaceholder`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,error:l,mod:u,attributes:d,...f}=t;return(0,J.jsx)($,{...bF({name:[`InputPlaceholder`,c],props:t,classes:hU,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,rootSelector:`placeholder`})(`placeholder`),mod:[{error:!!l},u],component:`span`,...f})});CU.classes=hU,CU.displayName=`@mantine/core/InputPlaceholder`;function wU(e,{hasDescription:t,hasError:n}){let r=e.findIndex(e=>e===`input`),i=e.slice(0,r),a=e.slice(r+1),o=t&&i.includes(`description`)||n&&i.includes(`error`);return{offsetBottom:t&&a.includes(`description`)||n&&a.includes(`error`),offsetTop:o}}var TU={labelElement:`label`,inputContainer:e=>e,inputWrapperOrder:[`label`,`description`,`input`,`error`]},EU=HN((e,{size:t})=>({label:{"--input-label-size":hM(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${hM(t)} - ${X(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${hM(t)} - ${X(2)})`}})),DU=Q(e=>{let t=Z(`InputWrapper`,TU,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,variant:l,__staticSelector:u,inputContainer:d,inputWrapperOrder:f,label:p,error:m,description:h,labelProps:g,descriptionProps:_,errorProps:v,labelElement:y,children:b,withAsterisk:x,id:S,required:C,__stylesApiProps:w,mod:T,attributes:E,...D}=t,O=bF({name:[`InputWrapper`,u],props:w||t,classes:hU,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:E,vars:s,varsResolver:EU}),k={size:c,variant:l,__staticSelector:u},A=JM(S),j=typeof x==`boolean`?x:C,M=v?.id||`${A}-error`,N=_?.id||`${A}-description`,P=A,F=!!m&&typeof m!=`boolean`,ee=!!h,I=`${F?M:``} ${ee?N:``}`,te=I.trim().length>0?I.trim():void 0,ne=g?.id||`${A}-label`,L=p&&(0,J.jsx)(SU,{labelElement:y,id:ne,htmlFor:P,required:j,...k,...g,children:p},`label`),re=ee&&(0,J.jsx)(_U,{..._,...k,size:_?.size||k.size,id:_?.id||N,children:h},`description`),ie=(0,J.jsx)(q.Fragment,{children:d(b)},`input`),ae=F&&(0,q.createElement)(yU,{...v,...k,size:v?.size||k.size,key:`error`,id:v?.id||M},m),oe=f.map(e=>{switch(e){case`label`:return L;case`input`:return ie;case`description`:return re;case`error`:return ae;default:return null}});return(0,J.jsx)(mU,{value:{getStyles:O,describedBy:te,inputId:P,labelId:ne,...wU(f,{hasDescription:ee,hasError:F})},children:(0,J.jsx)($,{variant:l,size:c,mod:[{error:!!m},T],id:y===`label`?void 0:S,...O(`root`),...D,children:oe})})});DU.classes=hU,DU.varsResolver=EU,DU.displayName=`@mantine/core/InputWrapper`;var OU={variant:`default`,leftSectionPointerEvents:`none`,rightSectionPointerEvents:`none`,withAria:!0,withErrorStyles:!0,size:`sm`,loading:!1,loadingPosition:`right`},kU=HN((e,t,n)=>({wrapper:{"--input-margin-top":n.offsetTop?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-margin-bottom":n.offsetBottom?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-height":fM(t.size,`input-height`),"--input-fz":hM(t.size),"--input-radius":t.radius===void 0?void 0:mM(t.radius),"--input-left-section-width":t.leftSectionWidth===void 0?void 0:X(t.leftSectionWidth),"--input-right-section-width":t.rightSectionWidth===void 0?void 0:X(t.rightSectionWidth),"--input-padding-y":t.multiline?fM(t.size,`input-padding-y`):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}})),AU=$F(e=>{let t=Z(`Input`,OU,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,required:s,__staticSelector:c,__stylesApiProps:l,size:u,wrapperProps:d,error:f,disabled:p,leftSection:m,leftSectionProps:h,leftSectionWidth:g,rightSection:_,rightSectionProps:v,rightSectionWidth:y,rightSectionPointerEvents:b,leftSectionPointerEvents:x,variant:S,vars:C,pointer:w,multiline:T,radius:E,id:D,withAria:O,withErrorStyles:k,mod:A,inputSize:j,attributes:M,__clearSection:N,__clearable:P,__clearSectionMode:F,__defaultRightSection:ee,loading:I,loadingPosition:te,rootRef:ne,...L}=t,{styleProps:re,rest:ie}=wF(L),ae=(0,q.use)(mU),oe={offsetBottom:ae?.offsetBottom,offsetTop:ae?.offsetTop},se=bF({name:[`Input`,c],props:l||t,classes:hU,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:M,stylesCtx:oe,rootSelector:`wrapper`,vars:C,varsResolver:kU}),ce=O?{required:s,disabled:p,"aria-invalid":f?!0:void 0,"aria-describedby":ae?.describedBy,id:ae?.inputId||D}:{},le=I?(0,J.jsx)(yV,{size:te===`left`?`calc(var(--input-left-section-size) / 2)`:`calc(var(--input-right-section-size) / 2)`}):null,ue=I&&te===`left`?le:m,R=pU({__clearable:P,__clearSection:N,rightSection:I&&te===`right`?le:_,__defaultRightSection:ee,size:u,__clearSectionMode:F});return(0,J.jsx)(uU,{value:{size:u||`sm`},children:(0,J.jsxs)($,{ref:ne,...se(`wrapper`),...re,...d,mod:[{error:!!f&&k,pointer:w,disabled:p,multiline:T,"data-with-right-section":!!R,"data-with-left-section":!!ue},A],variant:S,size:u,children:[ue&&(0,J.jsx)(`div`,{...h,"data-position":`left`,...se(`section`,{className:h?.className,style:h?.style}),children:ue}),(0,J.jsx)($,{component:`input`,...ie,...ce,required:s,mod:{disabled:p,error:!!f&&k},variant:S,__size:j,...se(`input`)}),R&&(0,J.jsx)(`div`,{...v,"data-position":`right`,...se(`section`,{className:v?.className,style:v?.style}),children:R})]})})});AU.classes=hU,AU.varsResolver=kU,AU.Wrapper=DU,AU.Label=SU,AU.Error=yU,AU.Description=_U,AU.Placeholder=CU,AU.ClearButton=dU,AU.displayName=`@mantine/core/Input`;function jU(e,t,n){let r=Z(e,t,n),{label:i,description:a,error:o,required:s,classNames:c,styles:l,className:u,unstyled:d,__staticSelector:f,__stylesApiProps:p,errorProps:m,labelProps:h,descriptionProps:g,wrapperProps:_,id:v,size:y,style:b,inputContainer:x,inputWrapperOrder:S,withAsterisk:C,variant:w,vars:T,mod:E,attributes:D,...O}=r,{styleProps:k,rest:A}=wF(O),j={label:i,description:a,error:o,required:s,classNames:c,className:u,__staticSelector:f,__stylesApiProps:p||r,errorProps:m,labelProps:h,descriptionProps:g,unstyled:d,styles:l,size:y,style:b,inputContainer:x,inputWrapperOrder:S,withAsterisk:C,variant:w,id:v,mod:E,attributes:D,..._};return{...A,classNames:c,styles:l,unstyled:d,wrapperProps:{...j,...k},inputProps:{required:s,classNames:c,styles:l,unstyled:d,size:y,__staticSelector:f,__stylesApiProps:p||r,error:o,variant:w,id:v,attributes:D}}}var MU={__staticSelector:`InputBase`,withAria:!0,size:`sm`},NU=$F(e=>{let{inputProps:t,wrapperProps:n,...r}=jU(`InputBase`,MU,e);return(0,J.jsx)(AU.Wrapper,{...n,children:(0,J.jsx)(AU,{...t,...r})})});NU.classes={...AU.classes,...AU.Wrapper.classes},NU.displayName=`@mantine/core/InputBase`;var PU={gap:{type:`spacing`,property:`gap`},rowGap:{type:`spacing`,property:`rowGap`},columnGap:{type:`spacing`,property:`columnGap`},align:{type:`identity`,property:`alignItems`},justify:{type:`identity`,property:`justifyContent`},wrap:{type:`identity`,property:`flexWrap`},direction:{type:`identity`,property:`flexDirection`}},FU={root:`m_8bffd616`},IU=$F(e=>{let t=Z(`Flex`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,gap:c,rowGap:l,columnGap:u,align:d,justify:f,wrap:p,direction:m,attributes:h,...g}=t,_=bF({name:`Flex`,classes:FU,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s}),v=UP(),y=qF(),b=KF({styleProps:{gap:c,rowGap:l,columnGap:u,align:d,justify:f,wrap:p,direction:m},theme:v,data:PU});return(0,J.jsxs)(J.Fragment,{children:[b.hasResponsiveStyles&&(0,J.jsx)(CF,{selector:`.${y}`,styles:b.styles,media:b.media}),(0,J.jsx)($,{..._(`root`,{className:y,style:$j(b.inlineStyles)}),...g})]})});IU.classes=FU,IU.displayName=`@mantine/core/Flex`;function LU(e,t){if(!t||!e)return!1;let n=t.parentNode;for(;n!=null;){if(n===e)return!0;n=n.parentNode}return!1}function RU({target:e,parent:t,ref:n,displayAfterTransitionEnd:r,onTransitionStart:i,onTransitionEnd:a}){let o=(0,q.useRef)(-1),s=(0,q.useRef)(e),[c,l]=(0,q.useState)(!1),[u,d]=(0,q.useState)(typeof r==`boolean`?r:!1),f=()=>{if(!e||!t||!n.current)return;let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=window.getComputedStyle(e),o=window.getComputedStyle(t),s=SI(a.borderTopWidth)+SI(o.borderTopWidth),c=SI(a.borderLeftWidth)+SI(o.borderLeftWidth),l={top:r.top-i.top-s,left:r.left-i.left-c,width:r.width,height:r.height};n.current.style.transform=`translateY(${l.top}px) translateX(${l.left}px)`,n.current.style.width=`${l.width}px`,n.current.style.height=`${l.height}px`},p=()=>{window.clearTimeout(o.current),n.current&&(n.current.style.transitionDuration=`0ms`),f(),o.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration=``)},30)},m=(0,q.useRef)(null),h=(0,q.useRef)(null);return(0,q.useEffect)(()=>{if(c&&s.current!==e&&i&&i(),s.current=e,f(),e)return m.current=new ResizeObserver(p),m.current.observe(e),t&&(h.current=new ResizeObserver(p),h.current.observe(t)),()=>{m.current?.disconnect(),h.current?.disconnect()}},[t,e]),(0,q.useEffect)(()=>{if(t){let e=e=>{LU(e.target,t)&&(p(),d(!1))};return t.addEventListener(`transitionend`,e),()=>{t.removeEventListener(`transitionend`,e)}}},[t]),(0,q.useEffect)(()=>{if(n.current&&a){let e=e=>{e.propertyName===`transform`&&a()};return n.current.addEventListener(`transitionend`,e),()=>{n.current?.removeEventListener(`transitionend`,e)}}},[a]),SN(()=>{NN()!==`test`&&l(!0)},20,{autoInvoke:!0}),EN(e=>{e.forEach(e=>{e.type===`attributes`&&e.attributeName===`dir`&&p()})},{attributes:!0,attributeFilter:[`dir`]},()=>document.documentElement),{initialized:c,hidden:u}}var zU={root:`m_96b553a6`},BU=HN((e,{transitionDuration:t},{shouldReduceMotion:n})=>({root:{"--transition-duration":e.respectReducedMotion&&n?`0ms`:typeof t==`number`?`${t}ms`:t||`150ms`}})),VU=Q(e=>{let t=Z(`FloatingIndicator`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,target:c,parent:l,transitionDuration:u,mod:d,displayAfterTransitionEnd:f,onTransitionStart:p,onTransitionEnd:m,attributes:h,ref:g,..._}=t,v=bF({name:`FloatingIndicator`,classes:zU,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:BU,stylesCtx:{shouldReduceMotion:nN()}}),y=(0,q.useRef)(null),{initialized:b,hidden:x}=RU({target:c,parent:l,ref:y,displayAfterTransitionEnd:f,onTransitionStart:p,onTransitionEnd:m}),S=QM(g,y);return!c||!l?null:(0,J.jsx)($,{ref:S,mod:[{initialized:b,hidden:x},d],...v(`root`),..._})});VU.displayName=`@mantine/core/FloatingIndicator`,VU.classes=zU,VU.varsResolver=BU;function HU({style:e,size:t=16,...n}){return(0,J.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...e,width:X(t),height:X(t),display:`block`},...n,children:(0,J.jsx)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}HU.displayName=`@mantine/core/AccordionChevron`;var UU={root:`m_b6d8b162`};function WU(e){if(e===`start`)return`start`;if(e===`end`||e)return`end`}var GU={inherit:!1},KU=HN((e,{variant:t,lineClamp:n,gradient:r,size:i})=>({root:{"--text-fz":hM(i),"--text-lh":gM(i),"--text-gradient":t===`gradient`?uP(r,e):void 0,"--text-line-clamp":typeof n==`number`?n.toString():void 0}})),qU=$F(e=>{let t=Z(`Text`,GU,e),{lineClamp:n,truncate:r,inline:i,inherit:a,gradient:o,span:s,__staticSelector:c,vars:l,className:u,style:d,classNames:f,styles:p,unstyled:m,variant:h,mod:g,size:_,attributes:v,...y}=t;return(0,J.jsx)($,{...bF({name:[`Text`,c],props:t,classes:UU,className:u,style:d,classNames:f,styles:p,unstyled:m,attributes:v,vars:l,varsResolver:KU})(`root`,{focusable:!0}),component:s?`span`:`p`,variant:h,mod:[{"data-truncate":WU(r),"data-line-clamp":typeof n==`number`,"data-inline":i,"data-inherit":a},g],size:_,...y})});qU.classes=UU,qU.varsResolver=KU,qU.displayName=`@mantine/core/Text`;var JU={root:`m_849cf0da`},YU={underline:`hover`},XU=$F(e=>{let{underline:t,className:n,unstyled:r,mod:i,...a}=Z(`Anchor`,YU,e);return(0,J.jsx)(qU,{component:`a`,className:WN({[JU.root]:!r},n),...a,mod:[{underline:t},i],__staticSelector:`Anchor`,unstyled:r})});XU.classes=JU,XU.displayName=`@mantine/core/Anchor`;var[ZU,QU]=nM(`AppShell was not found in tree`),$U={root:`m_89ab340`,navbar:`m_45252eee`,aside:`m_9cdde9a`,header:`m_3b16f56b`,main:`m_8983817`,footer:`m_3840c879`,section:`m_6dcfc7c7`},eW=Q(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=Z(`AppShellAside`,null,e),d=QU();return d.disabled?null:(0,J.jsx)($,{component:`aside`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`aside`,{className:WN({[XH.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-aside-z-index":`calc(${c??d.zIndex} + 1)`}})});eW.classes=$U,eW.displayName=`@mantine/core/AppShellAside`;var tW=Q(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=Z(`AppShellFooter`,null,e),d=QU();return d.disabled?null:(0,J.jsx)($,{component:`footer`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`footer`,{className:WN({[XH.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-footer-z-index":(c??d.zIndex)?.toString()}})});tW.classes=$U,tW.displayName=`@mantine/core/AppShellFooter`;var nW=Q(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=Z(`AppShellHeader`,null,e),d=QU();return d.disabled?null:(0,J.jsx)($,{component:`header`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`header`,{className:WN({[XH.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-header-z-index":(c??d.zIndex)?.toString()}})});nW.classes=$U,nW.displayName=`@mantine/core/AppShellHeader`;var rW=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`AppShellMain`,null,e);return(0,J.jsx)($,{component:`main`,...QU().getStyles(`main`,{className:n,style:r,classNames:t,styles:i}),...o})});rW.classes=$U,rW.displayName=`@mantine/core/AppShellMain`;var iW=Q(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=Z(`AppShellNavbar`,null,e),d=QU();return d.disabled?null:(0,J.jsx)($,{component:`nav`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`navbar`,{className:n,classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-navbar-z-index":`calc(${c??d.zIndex} + 1)`}})});iW.classes=$U,iW.displayName=`@mantine/core/AppShellNavbar`;var aW=$F(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,grow:o,mod:s,...c}=Z(`AppShellSection`,null,e),l=QU();return(0,J.jsx)($,{mod:[{grow:o},s],...l.getStyles(`section`,{className:n,style:r,classNames:t,styles:i}),...c})});aW.classes=$U,aW.displayName=`@mantine/core/AppShellSection`;function oW(e){return typeof e==`object`?e.base:e}function sW(e){let t=typeof e==`object`&&!!e&&e.base!==void 0&&Object.keys(e).length===1;return typeof e==`number`||typeof e==`string`||t}function cW(e){return!(typeof e!=`object`||!e||Object.keys(e).length===1&&`base`in e)}function lW({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,aside:r,theme:i,mode:a}){let o=r?.width,s=`translateX(var(--app-shell-aside-width))`,c=`translateX(calc(var(--app-shell-aside-width) * -1))`;if(r?.breakpoint&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},a===`fixed`?(n[r?.breakpoint][`--app-shell-aside-width`]=`100%`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`):(n[r?.breakpoint][`--app-shell-aside-width`]=`0px`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`)),sW(o)){let t=X(oW(o));e[`--app-shell-aside-width`]=t,e[`--app-shell-aside-offset`]=t}if(cW(o)&&(o.base!==void 0&&(e[`--app-shell-aside-width`]=X(o.base),e[`--app-shell-aside-offset`]=X(o.base)),Wj(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-aside-width`]=X(o[e]),t[e][`--app-shell-aside-offset`]=X(o[e]))})),r?.breakpoint&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-aside-position`]=`sticky`,t[r.breakpoint][`--app-shell-aside-grid-row`]=`2`,t[r.breakpoint][`--app-shell-aside-grid-column`]=`3`,t[r.breakpoint][`--app-shell-main-column-end`]=`3`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-aside-transform`]=s,t[e][`--app-shell-aside-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-aside-offset`]=`0px !important`:(t[e][`--app-shell-aside-width`]=`0px`,t[e][`--app-shell-aside-display`]=`none`,t[e][`--app-shell-main-column-end`]=`-1`),t[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}if(r?.collapsed?.mobile){let e=yM(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},a===`fixed`?(n[e][`--app-shell-aside-width`]=`100%`,n[e][`--app-shell-aside-offset`]=`0px`):n[e][`--app-shell-aside-width`]=`0px`,n[e][`--app-shell-aside-transform`]=s,n[e][`--app-shell-aside-transform-rtl`]=c,n[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}}function uW({baseStyles:e,minMediaStyles:t,footer:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-footer-position`]=`sticky`,e[`--app-shell-footer-grid-column`]=`1 / -1`,e[`--app-shell-footer-grid-row`]=`3`),sW(i)){let t=X(oW(i));e[`--app-shell-footer-height`]=t,a&&(e[`--app-shell-footer-offset`]=t)}cW(i)&&(i.base!==void 0&&(e[`--app-shell-footer-height`]=X(i.base),a&&(e[`--app-shell-footer-offset`]=X(i.base))),Wj(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-footer-height`]=X(i[e]),a&&(t[e][`--app-shell-footer-offset`]=X(i[e])))})),n?.collapsed&&(e[`--app-shell-footer-transform`]=`translateY(var(--app-shell-footer-height))`,r===`fixed`&&(e[`--app-shell-footer-offset`]=`0px !important`))}function dW({baseStyles:e,minMediaStyles:t,header:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-header-position`]=`sticky`,e[`--app-shell-header-grid-column`]=`1 / -1`,e[`--app-shell-header-grid-row`]=`1`),sW(i)){let t=X(oW(i));e[`--app-shell-header-height`]=t,a&&(e[`--app-shell-header-offset`]=t)}cW(i)&&(i.base!==void 0&&(e[`--app-shell-header-height`]=X(i.base),a&&(e[`--app-shell-header-offset`]=X(i.base))),Wj(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-header-height`]=X(i[e]),a&&(t[e][`--app-shell-header-offset`]=X(i[e])))})),n?.collapsed&&(e[`--app-shell-header-transform`]=`translateY(calc(var(--app-shell-header-height) * -1))`,r===`fixed`&&(e[`--app-shell-header-offset`]=`0px !important`))}function fW({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,navbar:r,theme:i,mode:a}){let o=r?.width,s=`translateX(calc(var(--app-shell-navbar-width) * -1))`,c=`translateX(var(--app-shell-navbar-width))`;if(r?.breakpoint&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},n[r?.breakpoint][`--app-shell-navbar-offset`]=`0px`,n[r?.breakpoint][`--app-shell-navbar-width`]=`100%`,a===`static`&&(n[r?.breakpoint][`--app-shell-navbar-grid-width`]=`0px`)),sW(o)){let t=X(oW(o));e[`--app-shell-navbar-width`]=t,e[`--app-shell-navbar-offset`]=t,a===`static`&&(e[`--app-shell-navbar-grid-width`]=t)}if(cW(o)&&(o.base!==void 0&&(e[`--app-shell-navbar-width`]=X(o.base),e[`--app-shell-navbar-offset`]=X(o.base),a===`static`&&(e[`--app-shell-navbar-grid-width`]=X(o.base))),Wj(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-navbar-width`]=X(o[e]),t[e][`--app-shell-navbar-offset`]=X(o[e]),a===`static`&&(t[e][`--app-shell-navbar-grid-width`]=X(o[e])))})),r?.breakpoint&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-navbar-position`]=`sticky`,t[r.breakpoint][`--app-shell-navbar-grid-row`]=`2`,t[r.breakpoint][`--app-shell-navbar-grid-column`]=`1`,t[r.breakpoint][`--app-shell-main-column-start`]=`2`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-navbar-transform`]=s,t[e][`--app-shell-navbar-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-navbar-offset`]=`0px !important`:(t[e][`--app-shell-navbar-width`]=`0px`,t[e][`--app-shell-navbar-display`]=`none`,t[e][`--app-shell-main-column-start`]=`1`)}if(r?.collapsed?.mobile){let e=yM(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},n[e][`--app-shell-navbar-width`]=`100%`,n[e][`--app-shell-navbar-offset`]=`0px`,a===`static`&&(n[e][`--app-shell-navbar-grid-width`]=`0px`),n[e][`--app-shell-navbar-transform`]=s,n[e][`--app-shell-navbar-transform-rtl`]=c}}function pW(e){return Number(e)===0?`0px`:pM(e)}function mW({padding:e,baseStyles:t,minMediaStyles:n}){sW(e)&&(t[`--app-shell-padding`]=pW(oW(e))),cW(e)&&(e.base&&(t[`--app-shell-padding`]=pW(e.base)),Wj(e).forEach(t=>{t!==`base`&&(n[t]=n[t]||{},n[t][`--app-shell-padding`]=pW(e[t]))}))}function hW({navbar:e,header:t,footer:n,aside:r,padding:i,theme:a,mode:o}){let s={},c={},l={};o===`static`&&(l[`--app-shell-main-grid-column`]=`1 / -1`,l[`--app-shell-main-grid-row`]=`2`),fW({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,navbar:e,theme:a,mode:o}),lW({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,aside:r,theme:a,mode:o}),dW({baseStyles:l,minMediaStyles:s,header:t,mode:o}),uW({baseStyles:l,minMediaStyles:s,footer:n,mode:o}),mW({baseStyles:l,minMediaStyles:s,padding:i});let u=bM(Wj(s),a.breakpoints).map(e=>({query:`(min-width: ${Qj(e.px)})`,styles:s[e.value]})),d=bM(Wj(c),a.breakpoints).map(e=>({query:`(max-width: ${Qj(e.px)})`,styles:c[e.value]}));return{baseStyles:l,media:[...u,...d]}}function gW({navbar:e,header:t,aside:n,footer:r,padding:i,mode:a,selector:o}){let s=UP(),c=vP(),{media:l,baseStyles:u}=hW({navbar:e,header:t,footer:r,aside:n,padding:i,theme:s,mode:a});return(0,J.jsx)(CF,{media:l,styles:u,selector:o||c.cssVariablesSelector})}function _W({transitionDuration:e,disabled:t}){let[n,r]=(0,q.useState)(!0),i=(0,q.useRef)(-1),a=(0,q.useRef)(-1);return YM(`resize`,()=>{r(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>(0,q.startTransition)(()=>{r(!1)}),200)}),NM(()=>{r(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>(0,q.startTransition)(()=>{r(!1)}),e||0)},[t,e]),n}var vW={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:`ease`,zIndex:lM(`app`),mode:`fixed`},yW=HN((e,{transitionDuration:t,transitionTimingFunction:n})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":n}})),bW=Q(e=>{let t=Z(`AppShell`,vW,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,navbar:c,withBorder:l,padding:u,transitionDuration:d,transitionTimingFunction:f,header:p,zIndex:m,layout:h,disabled:g,aside:_,footer:v,offsetScrollbars:y=!0,mode:b,mod:x,attributes:S,id:C,...w}=t,T=bF({name:`AppShell`,classes:$U,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:S,vars:s,varsResolver:yW}),E=_W({disabled:g,transitionDuration:d}),D=JM(C);return(0,J.jsxs)(ZU,{value:{getStyles:T,withBorder:l,zIndex:m,disabled:g,offsetScrollbars:y,mode:b},children:[(0,J.jsx)(gW,{navbar:c,header:p,aside:_,footer:v,padding:u,mode:b,selector:b===`static`?`#${D}`:void 0}),(0,J.jsx)($,{...T(`root`),id:D,mod:[{resizing:E,layout:h,disabled:g,mode:b},x],...w})]})});bW.classes=$U,bW.varsResolver=yW,bW.displayName=`@mantine/core/AppShell`,bW.Navbar=iW,bW.Header=nW,bW.Main=rW,bW.Aside=eW,bW.Footer=tW,bW.Section=aW;function xW(e){return typeof e==`string`?{value:e,label:e}:typeof e==`object`&&`value`in e&&!(`label`in e)?{value:e.value,label:`${e.value}`,disabled:e.disabled}:typeof e==`object`&&`group`in e?{group:e.group,items:e.items.map(e=>xW(e))}:typeof e==`number`||typeof e==`bigint`||typeof e==`boolean`?{value:e,label:`${e}`}:e}function SW(e){return e?e.map(e=>xW(e)):[]}function CW(e){return e.reduce((e,t)=>`group`in t?{...e,...CW(t.items)}:(e[`${t.value}`]=t,e),{})}var wW={dropdown:`m_88b62a41`,search:`m_985517d8`,options:`m_b2821a6e`,option:`m_92253aa5`,empty:`m_2530cd1d`,header:`m_858f94bd`,footer:`m_82b967cb`,group:`m_254f3e4f`,groupLabel:`m_2bb2e9e5`,chevron:`m_2943220b`,optionsDropdownOption:`m_390b5f4`,optionsDropdownCheckIcon:`m_8ee53fc2`,optionsDropdownCheckPlaceholder:`m_a530ee0a`},TW={error:null},EW=HN((e,{size:t,color:n})=>({chevron:{"--combobox-chevron-size":fM(t,`combobox-chevron-size`),"--combobox-chevron-color":n?cP(n,e):void 0}})),DW=Q(e=>{let t=Z(`ComboboxChevron`,TW,e),{size:n,error:r,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,attributes:u,mod:d,...f}=t,p=bF({name:`ComboboxChevron`,classes:wW,props:t,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,varsResolver:EW,attributes:u,rootSelector:`chevron`});return(0,J.jsx)($,{component:`svg`,...f,...p(`chevron`),size:n,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,mod:[`combobox-chevron`,{error:r},d],children:(0,J.jsx)(`path`,{d:`M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})});DW.classes=wW,DW.varsResolver=EW,DW.displayName=`@mantine/core/ComboboxChevron`;var[OW,kW]=nM(`Combobox component was not found in tree`);function AW({size:e,onMouseDown:t,onClick:n,onClear:r,...i}){return(0,J.jsx)(AU.ClearButton,{tabIndex:-1,"aria-hidden":!0,...i,onMouseDown:e=>{e.preventDefault(),t?.(e)},onClick:e=>{r(),n?.(e)}})}AW.displayName=`@mantine/core/ComboboxClearButton`;var jW=Q(e=>{let{classNames:t,styles:n,className:r,style:i,hidden:a,...o}=Z(`ComboboxDropdown`,null,e),s=kW();return(0,J.jsx)(dV.Dropdown,{...o,role:`presentation`,"data-hidden":a||void 0,...s.getStyles(`dropdown`,{className:r,style:i,classNames:t,styles:n})})});jW.classes=wW,jW.displayName=`@mantine/core/ComboboxDropdown`;var MW={refProp:`ref`},NW=Q(e=>{let{children:t,refProp:n,ref:r}=Z(`ComboboxDropdownTarget`,MW,e);if(kW(),!tM(t))throw Error(`Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return(0,J.jsx)(dV.Target,{ref:r,refProp:n,children:t})});NW.displayName=`@mantine/core/ComboboxDropdownTarget`;var PW=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`ComboboxEmpty`,null,e);return(0,J.jsx)($,{...kW().getStyles(`empty`,{className:n,classNames:t,styles:i,style:r}),...o})});PW.classes=wW,PW.displayName=`@mantine/core/ComboboxEmpty`;function FW({onKeyDown:e,withKeyboardNavigation:t,withAriaAttributes:n,withExpandedAttribute:r,targetType:i,autoComplete:a}){let o=kW(),[s,c]=(0,q.useState)(null),l=n=>{if(e?.(n),!o.readOnly&&t){if(n.nativeEvent.isComposing)return;if(n.nativeEvent.code===`ArrowDown`&&(n.preventDefault(),o.store.dropdownOpened?c(o.store.selectNextOption()):(o.store.openDropdown(`keyboard`),c(o.store.selectActiveOption()),o.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),n.nativeEvent.code===`ArrowUp`&&(n.preventDefault(),o.store.dropdownOpened?c(o.store.selectPreviousOption()):(o.store.openDropdown(`keyboard`),c(o.store.selectActiveOption()),o.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),n.nativeEvent.code===`Enter`||n.nativeEvent.code===`NumpadEnter`){if(n.nativeEvent.keyCode===229)return;let e=o.store.getSelectedOptionIndex();o.store.dropdownOpened&&e!==-1?(n.preventDefault(),o.store.clickSelectedOption()):i===`button`&&(n.preventDefault(),o.store.openDropdown(`keyboard`))}n.key===`Escape`&&o.store.closeDropdown(`keyboard`),n.nativeEvent.code===`Space`&&i===`button`&&(n.preventDefault(),o.store.toggleDropdown(`keyboard`))}};return{...n?{...r?{role:`combobox`}:{},"aria-haspopup":`listbox`,"aria-expanded":r?!!(o.store.listId&&o.store.dropdownOpened):void 0,"aria-controls":o.store.dropdownOpened&&o.store.listId?o.store.listId:void 0,"aria-activedescendant":o.store.dropdownOpened&&s||void 0,autoComplete:a,"data-expanded":o.store.dropdownOpened||void 0,"data-mantine-stop-propagation":o.store.dropdownOpened||void 0}:{},onKeyDown:l}}var IW={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},LW=Q(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=Z(`ComboboxEventsTarget`,IW,e),u=VN(t);if(!u)throw Error(`Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let d=kW();return(0,q.cloneElement)(u,{...FW({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:u.props.onKeyDown,autoComplete:s}),...l,[n]:QM(c,d.store.targetRef,IN(u))})});LW.displayName=`@mantine/core/ComboboxEventsTarget`;var RW=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`ComboboxFooter`,null,e);return(0,J.jsx)($,{...kW().getStyles(`footer`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});RW.classes=wW,RW.displayName=`@mantine/core/ComboboxFooter`;var zW=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,label:s,id:c,...l}=Z(`ComboboxGroup`,null,e),u=kW(),d=JM(c);return(0,J.jsxs)($,{role:`group`,"aria-labelledby":s?d:void 0,...u.getStyles(`group`,{className:n,classNames:t,style:r,styles:i}),...l,children:[s&&(0,J.jsx)(`div`,{id:d,...u.getStyles(`groupLabel`,{classNames:t,styles:i}),children:s}),o]})});zW.classes=wW,zW.displayName=`@mantine/core/ComboboxGroup`;var BW=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`ComboboxHeader`,null,e);return(0,J.jsx)($,{...kW().getStyles(`header`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});BW.classes=wW,BW.displayName=`@mantine/core/ComboboxHeader`;function VW({value:e,valuesDivider:t=`,`,...n}){return(0,J.jsx)(`input`,{type:`hidden`,value:Array.isArray(e)?e.join(t):e?`${e}`:``,...n})}VW.displayName=`@mantine/core/ComboboxHiddenInput`;var HW=Q(e=>{let t=Z(`ComboboxOption`,null,e),{classNames:n,className:r,style:i,styles:a,vars:o,onClick:s,id:c,active:l,onMouseDown:u,onMouseOver:d,disabled:f,selected:p,mod:m,...h}=t,g=kW(),_=(0,q.useId)(),v=c||_;return(0,J.jsx)($,{...g.getStyles(`option`,{className:r,classNames:n,styles:a,style:i}),...h,id:v,mod:[`combobox-option`,{"combobox-active":l,"combobox-disabled":f,"combobox-selected":p},m],role:`option`,onClick:e=>{f?e.preventDefault():(g.onOptionSubmit?.(t.value,t),s?.(e))},onMouseDown:e=>{e.preventDefault(),u?.(e)},onMouseOver:e=>{g.resetSelectionOnOptionHover&&g.store.resetSelectedOption(),d?.(e)}})});HW.classes=wW,HW.displayName=`@mantine/core/ComboboxOption`;var UW=Q(e=>{let{classNames:t,className:n,style:r,styles:i,id:a,onMouseDown:o,labelledBy:s,...c}=Z(`ComboboxOptions`,null,e),l=kW(),u=JM(a);return(0,q.useEffect)(()=>{l.store.setListId(u)},[u]),(0,J.jsx)($,{...l.getStyles(`options`,{className:n,style:r,classNames:t,styles:i}),...c,id:u,role:`listbox`,"aria-labelledby":s,onMouseDown:e=>{e.preventDefault(),o?.(e)}})});UW.classes=wW,UW.displayName=`@mantine/core/ComboboxOptions`;var WW={withAriaAttributes:!0,withKeyboardNavigation:!0},GW=Q(e=>{let{classNames:t,styles:n,unstyled:r,vars:i,withAriaAttributes:a,onKeyDown:o,withKeyboardNavigation:s,size:c,ref:l,...u}=Z(`ComboboxSearch`,WW,e),d=kW(),f=d.getStyles(`search`),p=FW({targetType:`input`,withAriaAttributes:a,withKeyboardNavigation:s,withExpandedAttribute:!1,onKeyDown:o,autoComplete:`off`});return(0,J.jsx)(AU,{ref:QM(l,d.store.searchRef),classNames:[{input:f.className},t],styles:[{input:f.style},n],size:c||d.size,...p,...u,__staticSelector:`Combobox`})});GW.classes=wW,GW.displayName=`@mantine/core/ComboboxSearch`;var KW={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},qW=Q(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=Z(`ComboboxTarget`,KW,e),u=VN(t);if(!u)throw Error(`Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let d=kW(),f=(0,q.cloneElement)(u,{...FW({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:u.props.onKeyDown,autoComplete:s}),...l});return(0,J.jsx)(dV.Target,{refProp:n,ref:QM(c,d.store.targetRef),children:f})});qW.displayName=`@mantine/core/ComboboxTarget`;function JW(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function YW(e,t,n){for(let n=e+1;n<t.length;n+=1)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=0;e<t.length;e+=1)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function XW(e){for(let t=0;t<e.length;t+=1)if(!e[t].hasAttribute(`data-combobox-disabled`))return t;return-1}function ZW({defaultOpened:e,opened:t,onOpenedChange:n,onDropdownClose:r,onDropdownOpen:i,loop:a=!0,scrollBehavior:o=`instant`}={}){let[s,c]=tN({value:t,defaultValue:e,finalValue:!1,onChange:n}),l=(0,q.useRef)(null),u=(0,q.useRef)(-1),d=(0,q.useRef)(null),f=(0,q.useRef)(null),p=(0,q.useRef)(-1),m=(0,q.useRef)(-1),h=(0,q.useRef)(-1),g=(0,q.useCallback)((e=`unknown`)=>{s||(c(!0),i?.(e))},[c,i,s]),_=(0,q.useCallback)((e=`unknown`)=>{s&&(c(!1),r?.(e))},[c,r,s]),v=(0,q.useCallback)((e=`unknown`)=>{s?_(e):g(e)},[_,g,s]),y=(0,q.useCallback)(()=>{let e=BN(f.current),t=RN(`#${l.current} [data-combobox-selected]`,e);t?.removeAttribute(`data-combobox-selected`),t?.removeAttribute(`aria-selected`)},[]),b=(0,q.useCallback)(e=>{let t=BN(f.current),n=RN(`#${l.current}`,t),r=n?zN(`[data-combobox-option]`,n):null;if(!r)return null;let i=e>=r.length?0:e<0?r.length-1:e;return u.current=i,r?.[i]&&!r[i].hasAttribute(`data-combobox-disabled`)?(y(),r[i].setAttribute(`data-combobox-selected`,`true`),r[i].setAttribute(`aria-selected`,`true`),r[i].scrollIntoView({block:`nearest`,behavior:o}),r[i].id):null},[o,y]),x=(0,q.useCallback)(()=>{let e=BN(f.current),t=RN(`#${l.current} [data-combobox-active]`,e);return b(t?zN(`#${l.current} [data-combobox-option]`,e).findIndex(e=>e===t):0)},[b]),S=(0,q.useCallback)(()=>{let e=BN(f.current),t=zN(`#${l.current} [data-combobox-option]`,e);return b(YW(u.current,t,a))},[b,a]),C=(0,q.useCallback)(()=>{let e=BN(f.current),t=zN(`#${l.current} [data-combobox-option]`,e);return b(JW(u.current,t,a))},[b,a]),w=(0,q.useCallback)(()=>{let e=BN(f.current);return b(XW(zN(`#${l.current} [data-combobox-option]`,e)))},[b]),T=(0,q.useCallback)((e=`selected`,t)=>{if(typeof e==`number`){u.current=e;let n=BN(f.current),r=zN(`#${l.current} [data-combobox-option]`,n);t?.scrollIntoView&&r[e]?.scrollIntoView({block:`nearest`,behavior:o});return}h.current=window.setTimeout(()=>{let n=BN(f.current),r=zN(`#${l.current} [data-combobox-option]`,n),i=r.findIndex(t=>t.hasAttribute(`data-combobox-${e}`));u.current=i,t?.scrollIntoView&&r[i]?.scrollIntoView({block:`nearest`,behavior:o})},0)},[]),E=(0,q.useCallback)(()=>{u.current=-1,y()},[y]),D=(0,q.useCallback)(()=>{let e=BN(f.current);(zN(`#${l.current} [data-combobox-option]`,e)?.[u.current])?.click()},[]),O=(0,q.useCallback)(e=>{l.current=e},[]),k=(0,q.useCallback)(()=>{p.current=window.setTimeout(()=>d.current?.focus(),0)},[]),A=(0,q.useCallback)(()=>{m.current=window.setTimeout(()=>f.current?.focus(),0)},[]),j=(0,q.useCallback)(()=>u.current,[]);return(0,q.useEffect)(()=>()=>{window.clearTimeout(p.current),window.clearTimeout(m.current),window.clearTimeout(h.current)},[]),{dropdownOpened:s,openDropdown:g,closeDropdown:_,toggleDropdown:v,selectedOptionIndex:u.current,getSelectedOptionIndex:j,selectOption:b,selectFirstOption:w,selectActiveOption:x,selectNextOption:S,selectPreviousOption:C,resetSelectedOption:E,updateSelectedOptionIndex:T,listId:l.current,setListId:O,clickSelectedOption:D,searchRef:d,focusSearchInput:k,targetRef:f,focusTarget:A}}var QW={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:`target`,transitionProps:{transition:`fade`,duration:0},size:`sm`},$W=HN((e,{size:t,dropdownPadding:n})=>({options:{"--combobox-option-fz":hM(t),"--combobox-option-padding":fM(t,`combobox-option-padding`)},dropdown:{"--combobox-padding":n===void 0?void 0:X(n),"--combobox-option-fz":hM(t),"--combobox-option-padding":fM(t,`combobox-option-padding`)}})),eG=e=>{let t=Z(`Combobox`,QW,e),{classNames:n,styles:r,unstyled:i,children:a,store:o,vars:s,onOptionSubmit:c,onClose:l,size:u,dropdownPadding:d,resetSelectionOnOptionHover:f,__staticSelector:p,readOnly:m,attributes:h,...g}=t,_=ZW(),v=o||_,y=bF({name:p||`Combobox`,classes:wW,props:t,classNames:n,styles:r,unstyled:i,attributes:h,vars:s,varsResolver:$W}),b=()=>{l?.(),v.closeDropdown()};return(0,J.jsx)(OW,{value:{getStyles:y,store:v,onOptionSubmit:c,size:u,resetSelectionOnOptionHover:f,readOnly:m},children:(0,J.jsx)(dV,{opened:v.dropdownOpened,preventPositionChangeWhenVisible:!1,...g,onChange:e=>!e&&b(),withRoles:!1,unstyled:i,children:a})})};eG.extend=e=>e,eG.classes=wW,eG.varsResolver=$W,eG.displayName=`@mantine/core/Combobox`,eG.Target=qW,eG.Dropdown=jW,eG.Options=UW,eG.Option=HW,eG.Search=GW,eG.Empty=PW,eG.Chevron=DW,eG.Footer=RW,eG.Header=BW,eG.EventsTarget=LW,eG.DropdownTarget=NW,eG.Group=zW,eG.ClearButton=AW,eG.HiddenInput=VW;function tG({children:e,role:t}){let n=(0,q.use)(mU);return n?(0,J.jsx)(`div`,{role:t,"aria-labelledby":n.labelId,"aria-describedby":n.describedBy,children:e}):(0,J.jsx)(J.Fragment,{children:e})}function nG({size:e,style:t,...n}){return(0,J.jsx)(`svg`,{viewBox:`0 0 10 7`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:e===void 0?t:{width:X(e),height:X(e),...t},"aria-hidden":!0,...n,children:(0,J.jsx)(`path`,{d:`M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}function rG({indeterminate:e,...t}){return e?(0,J.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 32 6`,"aria-hidden":!0,...t,children:(0,J.jsx)(`rect`,{width:`32`,height:`6`,fill:`currentColor`,rx:`3`})}):(0,J.jsx)(nG,{...t})}var iG={root:`m_5f75b09e`,body:`m_5f6e695e`,labelWrapper:`m_d3ea56bb`,label:`m_8ee546b8`,description:`m_328f68c0`,error:`m_8e8a99cc`},aG=iG;function oG({__staticSelector:e,__stylesApiProps:t,className:n,classNames:r,styles:i,unstyled:a,children:o,label:s,description:c,id:l,disabled:u,error:d,size:f,labelPosition:p=`left`,bodyElement:m=`div`,labelElement:h=`label`,variant:g,style:_,vars:v,mod:y,attributes:b,...x}){let S=bF({name:e,props:t,className:n,style:_,classes:iG,classNames:r,styles:i,unstyled:a,attributes:b});return(0,J.jsx)($,{...S(`root`),__vars:{"--label-fz":hM(f),"--label-lh":fM(f,`label-lh`)},mod:[{"label-position":p},y],variant:g,size:f,...x,children:(0,J.jsxs)($,{component:m,htmlFor:m===`label`?l:void 0,...S(`body`),children:[o,(0,J.jsxs)(`div`,{...S(`labelWrapper`),"data-disabled":u||void 0,children:[s&&(0,J.jsx)($,{component:h,htmlFor:h===`label`?l:void 0,...S(`label`),"data-disabled":u||void 0,children:s}),c&&(0,J.jsx)(AU.Description,{size:f,__inheritStyles:!1,...S(`description`),children:c}),d&&typeof d!=`boolean`&&(0,J.jsx)(AU.Error,{size:f,__inheritStyles:!1,...S(`error`),children:d})]})]})})}oG.displayName=`@mantine/core/InlineInput`;function sG(e){return`group`in e}function cG({options:e,search:t,limit:n}){let r=t.trim().toLowerCase(),i=[];for(let a=0;a<e.length;a+=1){let o=e[a];if(i.length===n)return i;sG(o)&&i.push({group:o.group,items:cG({options:o.items,search:t,limit:n-i.length})}),sG(o)||o.label.toLowerCase().includes(r)&&i.push(o)}return i}function lG(e){if(e.length===0)return!0;for(let t of e)if(!(`group`in t)||t.items.length>0)return!1;return!0}function uG(e,t=new Set){if(Array.isArray(e))for(let n of e)if(sG(n))uG(n.items,t);else{if(n.value===void 0)throw Error(`[@mantine/core] Each option must have value property`);if(t.has(n.value))throw Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);t.add(n.value)}}function dG(e,t){return Array.isArray(e)?e.includes(t):e===t}function fG({data:e,withCheckIcon:t,withAlignedLabels:n,value:r,checkIconPosition:i,unstyled:a,renderOption:o}){if(!sG(e)){let s=dG(r,e.value),c=t&&(s?(0,J.jsx)(nG,{className:wW.optionsDropdownCheckIcon}):n?(0,J.jsx)(`div`,{className:wW.optionsDropdownCheckPlaceholder}):null),l=(0,J.jsxs)(J.Fragment,{children:[i===`left`&&c,(0,J.jsx)(`span`,{children:e.label}),i===`right`&&c]});return(0,J.jsx)(eG.Option,{value:e.value,disabled:e.disabled,className:WN({[wW.optionsDropdownOption]:!a}),"data-reverse":i===`right`||void 0,"data-checked":s||void 0,"aria-selected":s,active:s,children:typeof o==`function`?o({option:e,checked:s}):l})}let s=e.items.map(e=>(0,J.jsx)(fG,{data:e,value:r,unstyled:a,withCheckIcon:t,withAlignedLabels:n,checkIconPosition:i,renderOption:o},`${e.value}`));return(0,J.jsx)(eG.Group,{label:e.group,children:s})}function pG({data:e,hidden:t,hiddenWhenEmpty:n,filter:r,search:i,limit:a,maxDropdownHeight:o,withScrollArea:s=!0,filterOptions:c=!0,withCheckIcon:l=!1,withAlignedLabels:u=!1,value:d,checkIconPosition:f,nothingFoundMessage:p,unstyled:m,labelId:h,renderOption:g,scrollAreaProps:_,"aria-label":v}){uG(e);let y=typeof i==`string`?(r||cG)({options:e,search:c?i:``,limit:a??1/0}):e,b=lG(y),x=y.map(e=>(0,J.jsx)(fG,{data:e,withCheckIcon:l,withAlignedLabels:u,value:d,checkIconPosition:f,unstyled:m,renderOption:g},sG(e)?e.group:`${e.value}`));return(0,J.jsx)(eG.Dropdown,{hidden:t||n&&b,"data-composed":!0,children:(0,J.jsxs)(eG.Options,{labelledBy:h,"aria-label":v,children:[s?(0,J.jsx)(vB.Autosize,{mah:o??220,type:`scroll`,scrollbarSize:`var(--combobox-padding)`,offsetScrollbars:`y`,..._,children:x}):x,b&&p&&(0,J.jsx)(eG.Empty,{children:p})]})})}var mG=Q(e=>{let t=Z(`Autocomplete`,{size:`sm`},e),{classNames:n,styles:r,unstyled:i,vars:a,dropdownOpened:o,defaultDropdownOpened:s,onDropdownClose:c,onDropdownOpen:l,onFocus:u,onBlur:d,onClick:f,onChange:p,data:m,value:h,defaultValue:g,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:v,onOptionSubmit:y,comboboxProps:b,readOnly:x,disabled:S,filter:C,limit:w,withScrollArea:T,maxDropdownHeight:E,size:D,id:O,renderOption:k,autoComplete:A,scrollAreaProps:j,onClear:M,clearButtonProps:N,error:P,clearable:F,clearSectionMode:ee,rightSection:I,autoSelectOnBlur:te,openOnFocus:ne=!0,attributes:L,...re}=t,ie=JM(O),ae=SW(m),oe=CW(ae),[se,ce]=tN({value:h,defaultValue:g,finalValue:``,onChange:p}),le=ZW({opened:o,defaultOpened:s,onDropdownOpen:()=>{l?.(),v&&le.selectFirstOption()},onDropdownClose:()=>{c?.(),setTimeout(le.resetSelectedOption,0)}}),ue=e=>{ce(e),le.resetSelectedOption()},{resolvedClassNames:R,resolvedStyles:de}=oF({props:t,styles:r,classNames:n});(0,q.useEffect)(()=>{_&&le.selectFirstOption()},[_,se]);let z=(0,J.jsx)(eG.ClearButton,{...N,onClear:()=>{ue(``),M?.()}});return(0,J.jsxs)(eG,{store:le,__staticSelector:`Autocomplete`,classNames:R,styles:de,unstyled:i,readOnly:x,size:D,attributes:L,keepMounted:te,onOptionSubmit:e=>{y?.(e),ue(oe[e].label),le.closeDropdown()},...b,children:[(0,J.jsx)(eG.Target,{autoComplete:A,withExpandedAttribute:!0,children:(0,J.jsx)(NU,{...re,size:D,__staticSelector:`Autocomplete`,__clearSection:z,__clearable:F&&!!se&&!S&&!x,__clearSectionMode:ee,rightSection:I,disabled:S,readOnly:x,value:se,error:P,onChange:e=>{ue(e.currentTarget.value),le.openDropdown(),_&&le.selectFirstOption()},onFocus:e=>{ne&&le.openDropdown(),u?.(e)},onBlur:e=>{te&&le.clickSelectedOption(),le.closeDropdown(),d?.(e)},onClick:e=>{le.openDropdown(),f?.(e)},classNames:R,styles:de,unstyled:i,attributes:L,id:ie})}),(0,J.jsx)(pG,{data:ae,hidden:x||S,filter:C,search:se,limit:w,hiddenWhenEmpty:!0,withScrollArea:T,maxDropdownHeight:E,unstyled:i,labelId:re.label?`${ie}-label`:void 0,"aria-label":re.label?void 0:re[`aria-label`],renderOption:k,scrollAreaProps:j})]})});mG.classes={...NU.classes,...eG.classes},mG.displayName=`@mantine/core/Autocomplete`;var hG={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},gG=HN((e,{radius:t,color:n,gradient:r,variant:i,size:a,autoContrast:o,circle:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:o});return{root:{"--badge-height":fM(a,`badge-height`),"--badge-padding-x":fM(a,`badge-padding-x`),"--badge-fz":fM(a,`badge-fz`),"--badge-radius":s||t===void 0?void 0:mM(t),"--badge-bg":n||i?c.background:void 0,"--badge-color":n||i?c.color:void 0,"--badge-bd":n||i?c.border:void 0,"--badge-dot-color":i===`dot`?cP(n,e):void 0}}}),_G=$F(e=>{let t=Z(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,gradient:u,leftSection:d,rightSection:f,children:p,variant:m,fullWidth:h,autoContrast:g,circle:_,mod:v,attributes:y,...b}=t,x=bF({name:`Badge`,props:t,classes:hG,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:gG});return(0,J.jsxs)($,{variant:m,mod:[{block:h,circle:_,"with-right-section":!!f,"with-left-section":!!d},v],...x(`root`,{variant:m}),...b,children:[d&&(0,J.jsx)(`span`,{...x(`section`),"data-position":`left`,children:d}),(0,J.jsx)(`span`,{...x(`label`),children:p}),f&&(0,J.jsx)(`span`,{...x(`section`),"data-position":`right`,children:f})]})});_G.classes=hG,_G.varsResolver=gG,_G.displayName=`@mantine/core/Badge`;var vG={root:`m_fea6bf1a`,burger:`m_d4fb9cad`},yG=HN((e,{color:t,size:n,lineSize:r,transitionDuration:i,transitionTimingFunction:a})=>({root:{"--burger-color":t?cP(t,e):void 0,"--burger-size":fM(n,`burger-size`),"--burger-line-size":r?X(r):void 0,"--burger-transition-duration":i===void 0?void 0:`${i}ms`,"--burger-transition-timing-function":a}})),bG=Q(e=>{let t=Z(`Burger`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,opened:c,children:l,transitionDuration:u,transitionTimingFunction:d,lineSize:f,attributes:p,...m}=t,h=bF({name:`Burger`,classes:vG,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:yG});return(0,J.jsxs)(SB,{...h(`root`),...m,children:[(0,J.jsx)($,{mod:[`reduce-motion`,{opened:c}],...h(`burger`)}),l]})});bG.classes=vG,bG.varsResolver=yG,bG.displayName=`@mantine/core/Burger`;var xG={root:`m_77c9d27d`,inner:`m_80f1301b`,label:`m_811560b9`,section:`m_a74036a`,loader:`m_a25b86ee`,group:`m_80d6d844`,groupSection:`m_70be2a01`},SG={orientation:`horizontal`},CG=HN((e,{borderWidth:t})=>({group:{"--button-border-width":X(t)}})),wG=Q(e=>{let t=Z(`ButtonGroup`,SG,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,mod:u,attributes:d,...f}=Z(`ButtonGroup`,SG,e);return(0,J.jsx)($,{...bF({name:`ButtonGroup`,props:t,classes:xG,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:c,varsResolver:CG,rootSelector:`group`})(`group`),mod:[{"data-orientation":s},u],role:`group`,...f})});wG.classes=xG,wG.varsResolver=CG,wG.displayName=`@mantine/core/ButtonGroup`;var TG=HN((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":fM(o,`section-height`),"--section-padding-x":fM(o,`section-padding-x`),"--section-fz":o?.includes(`compact`)?hM(o.replace(`compact-`,``)):hM(o),"--section-radius":t===void 0?void 0:mM(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),EG=Q(e=>{let t=Z(`ButtonGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,gradient:c,radius:l,autoContrast:u,attributes:d,...f}=t;return(0,J.jsx)($,{...bF({name:`ButtonGroupSection`,props:t,classes:xG,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:TG,rootSelector:`groupSection`})(`groupSection`),...f})});EG.classes=xG,EG.varsResolver=TG,EG.displayName=`@mantine/core/ButtonGroupSection`;var DG={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${X(1)}))`},out:{opacity:0,transform:`translate(-50%, -200%)`},common:{transformOrigin:`center`},transitionProperty:`transform, opacity`},OG=HN((e,{radius:t,color:n,gradient:r,variant:i,size:a,justify:o,autoContrast:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--button-justify":o,"--button-height":fM(a,`button-height`),"--button-padding-x":fM(a,`button-padding-x`),"--button-fz":a?.includes(`compact`)?hM(a.replace(`compact-`,``)):hM(a),"--button-radius":t===void 0?void 0:mM(t),"--button-bg":n||i?c.background:void 0,"--button-hover":n||i?c.hover:void 0,"--button-color":c.color,"--button-bd":n||i?c.border:void 0,"--button-hover-color":n||i?c.hoverColor:void 0}}}),kG=$F(e=>{let t=Z(`Button`,null,e),{style:n,vars:r,className:i,color:a,disabled:o,children:s,leftSection:c,rightSection:l,fullWidth:u,variant:d,radius:f,loading:p,loaderProps:m,gradient:h,classNames:g,styles:_,unstyled:v,"data-disabled":y,autoContrast:b,mod:x,attributes:S,...C}=t,w=bF({name:`Button`,props:t,classes:xG,className:i,style:n,classNames:g,styles:_,unstyled:v,attributes:S,vars:r,varsResolver:OG}),T=!!c,E=!!l;return(0,J.jsxs)(SB,{...w(`root`,{active:!o&&!p&&!y}),unstyled:v,variant:d,disabled:o||p,mod:[{disabled:o||y,loading:p,block:u,"with-left-section":T,"with-right-section":E},x],...C,children:[typeof p==`boolean`&&(0,J.jsx)(YB,{mounted:p,transition:DG,duration:150,children:e=>(0,J.jsx)($,{component:`span`,...w(`loader`,{style:e}),"aria-hidden":!0,children:(0,J.jsx)(yV,{color:`var(--button-color)`,size:`calc(var(--button-height) / 1.8)`,...m})})}),(0,J.jsxs)(`span`,{...w(`inner`),children:[c&&(0,J.jsx)($,{component:`span`,...w(`section`),mod:{position:`left`},children:c}),(0,J.jsx)($,{component:`span`,mod:{loading:p},...w(`label`),children:s}),l&&(0,J.jsx)($,{component:`span`,...w(`section`),mod:{position:`right`},children:l})]})]})});kG.classes=xG,kG.varsResolver=OG,kG.displayName=`@mantine/core/Button`,kG.Group=wG,kG.GroupSection=EG;var[AG,jG]=nM(`Card component was not found in tree`),MG={root:`m_e615b15f`,section:`m_599a2148`},NG=$F(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,withBorder:o,inheritPadding:s,mod:c,...l}=Z(`CardSection`,null,e),u=jG();return(0,J.jsx)($,{mod:[{"with-border":o,"inherit-padding":s},c],...u.getStyles(`section`,{className:n,style:r,styles:i,classNames:t}),...l})});NG.classes=MG,NG.displayName=`@mantine/core/CardSection`;var PG=HN((e,{padding:t})=>({root:{"--card-padding":pM(t)}})),FG={orientation:`vertical`},IG=$F(e=>{let t=Z(`Card`,FG,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,padding:l,attributes:u,orientation:d,...f}=t,p=bF({name:`Card`,props:t,classes:MG,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:PG}),m=q.Children.toArray(c),h=m.map((e,t)=>typeof e==`object`&&e&&`type`in e&&e.type===NG?(0,q.cloneElement)(e,{"data-orientation":d,"data-first-section":t===0||void 0,"data-last-section":t===m.length-1||void 0}):e);return(0,J.jsx)(AG,{value:{getStyles:p},children:(0,J.jsx)(DB,{unstyled:o,"data-orientation":d,...p(`root`),...f,children:h})})});IG.classes=MG,IG.varsResolver=PG,IG.displayName=`@mantine/core/Card`,IG.Section=NG;var LG={root:`m_de3d2490`,colorOverlay:`m_862f3d1b`,shadowOverlay:`m_98ae7f22`,alphaOverlay:`m_95709ac0`,childrenOverlay:`m_93e74e3`},RG={withShadow:!0},zG=HN((e,{radius:t,size:n})=>({root:{"--cs-radius":t===void 0?void 0:mM(t),"--cs-size":X(n)}})),BG=$F(e=>{let t=Z(`ColorSwatch`,RG,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,radius:l,withShadow:u,children:d,attributes:f,...p}=Z(`ColorSwatch`,RG,t),m=bF({name:`ColorSwatch`,props:t,classes:LG,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:zG});return(0,J.jsxs)($,{...m(`root`,{focusable:!0}),...p,children:[(0,J.jsx)(`span`,{...m(`alphaOverlay`)}),u&&(0,J.jsx)(`span`,{...m(`shadowOverlay`)}),(0,J.jsx)(`span`,{...m(`colorOverlay`,{style:{backgroundColor:c}})}),(0,J.jsx)(`span`,{...m(`childrenOverlay`),children:d})]})});BG.classes=LG,BG.varsResolver=zG,BG.displayName=`@mantine/core/ColorSwatch`;function VG(e,t=0,n=10**t){return Math.round(n*e)/n}function HG({h:e,s:t,l:n,a:r}){let i=t*((n<50?n:100-n)/100);return{h:e,s:i>0?2*i/(n+i)*100:0,v:n+i,a:r}}var UG={grad:360/400,turn:360,rad:360/(Math.PI*2)};function WG(e,t=`deg`){return Number(e)*(UG[t]||1)}var GG=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function KG(e){let t=GG.exec(e);return t?HG({h:WG(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}}function qG({r:e,g:t,b:n,a:r}){let i=Math.max(e,t,n),a=i-Math.min(e,t,n),o=a?i===e?(t-n)/a:i===t?2+(n-e)/a:4+(e-t)/a:0;return{h:VG(60*(o<0?o+6:o),3),s:VG(i?a/i*100:0,3),v:VG(i/255*100,3),a:r}}function JG(e){let t=e[0]===`#`?e.slice(1):e;return t.length===3?qG({r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:1}):qG({r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:1})}function YG(e){let t=e[0]===`#`?e.slice(1):e,n=e=>VG(parseInt(e,16)/255,3);if(t.length===4){let e=t.slice(0,3),r=n(t[3]+t[3]);return{...JG(e),a:r}}let r=t.slice(0,6),i=n(t.slice(6,8));return{...JG(r),a:i}}var XG=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function ZG(e){let t=XG.exec(e);return t?qG({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}}var QG={hex:/^#?([0-9A-F]{3}){1,2}$/i,hexa:/^#?([0-9A-F]{4}){1,2}$/i,rgb:/^rgb\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,rgba:/^rgba\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,hsl:/hsl\(\s*(\d+)\s*,\s*(\d+(?:\.\d+)?%)\s*,\s*(\d+(?:\.\d+)?%)\)/i,hsla:/^hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*(\d*(?:\.\d+)?)\)$/i},$G={hex:JG,hexa:YG,rgb:ZG,rgba:ZG,hsl:KG,hsla:KG};function eK(e){for(let[,t]of Object.entries(QG))if(t.test(e))return!0;return!1}function tK(e){if(typeof e!=`string`)return{h:0,s:0,v:0,a:1};if(e===`transparent`)return{h:0,s:0,v:0,a:0};let t=e.trim();for(let[e,n]of Object.entries(QG))if(n.test(t))return $G[e](t);return{h:0,s:0,v:0,a:1}}var nK=(0,q.createContext)(null);function rK({position:e,...t}){return(0,J.jsx)($,{__vars:{"--thumb-y-offset":`${e.y*100}%`,"--thumb-x-offset":`${e.x*100}%`},...t})}rK.displayName=`@mantine/core/ColorPickerThumb`;var iK={wrapper:`m_fee9c77`,preview:`m_9dddfbac`,body:`m_bffecc3e`,sliders:`m_3283bb96`,thumb:`m_40d572ba`,swatch:`m_d8ee6fd8`,swatches:`m_5711e686`,saturation:`m_202a296e`,saturationOverlay:`m_11b3db02`,slider:`m_d856d47d`,sliderOverlay:`m_8f327113`},aK=Q(e=>{let t=Z(`ColorSlider`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,onChange:c,onChangeEnd:l,maxValue:u,round:d,size:f=`md`,focusable:p=!0,value:m,overlays:h,thumbColor:g=`transparent`,onScrubStart:_,onScrubEnd:v,__staticSelector:y=`ColorPicker`,attributes:b,ref:x,...S}=t,C=bF({name:y,classes:iK,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:b,rootSelector:`slider`}),w=(0,q.use)(nK)?.getStyles||C,T=UP(),[E,D]=(0,q.useState)({y:0,x:m/u}),O=(0,q.useRef)(E),k=e=>d?Math.round(e*u):e*u,{ref:A}=eN(({x:e,y:t})=>{O.current={x:e,y:t},c?.(k(e))},{onScrubEnd:()=>{let{x:e}=O.current;l?.(k(e)),v?.()},onScrubStart:_});PM(()=>{D({y:0,x:m/u})},[m]);let j=(e,t)=>{e.preventDefault();let n=$M(t);c?.(k(n.x)),l?.(k(n.x))},M=e=>{switch(e.key){case`ArrowRight`:j(e,{x:E.x+.05,y:E.y});break;case`ArrowLeft`:j(e,{x:E.x-.05,y:E.y});break}},N=h.map((e,t)=>(0,q.createElement)(`div`,{...w(`sliderOverlay`),style:e,key:t}));return(0,J.jsxs)($,{...S,ref:QM(A,x),...w(`slider`),size:f,role:`slider`,"aria-valuenow":m,"aria-valuemax":u,"aria-valuemin":0,tabIndex:p?0:-1,onKeyDown:M,"data-focus-ring":T.focusRing,__vars:{"--cp-thumb-size":`var(--cp-thumb-size-${f})`},children:[N,(0,J.jsx)(rK,{position:E,...w(`thumb`,{style:{top:X(1),background:g}})})]})});aK.displayName=`@mantine/core/ColorSlider`,aK.classes=iK;var oK={__staticSelector:`AlphaSlider`},sK=Q(e=>{let{value:t,onChange:n,onChangeEnd:r,color:i,...a}=Z(`AlphaSlider`,oK,e);return(0,J.jsx)(aK,{...a,value:t,onChange:e=>n?.(VG(e,2)),onChangeEnd:e=>r?.(VG(e,2)),maxValue:1,round:!1,"data-alpha":!0,overlays:[{backgroundImage:`linear-gradient(45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(-45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--slider-checkers) 75%), linear-gradient(-45deg, var(--mantine-color-body) 75%, var(--slider-checkers) 75%)`,backgroundSize:`${X(8)} ${X(8)}`,backgroundPosition:`0 0, 0 ${X(4)}, ${X(4)} ${X(-4)}, ${X(-4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${i})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${X(1)} inset, rgb(0, 0, 0, .15) 0 0 ${X(4)} inset`}]})});sK.displayName=`@mantine/core/AlphaSlider`,sK.classes=aK.classes;function cK({h:e,s:t,v:n,a:r}){let i=e/360*6,a=t/100,o=n/100,s=Math.floor(i),c=o*(1-a),l=o*(1-(i-s)*a),u=o*(1-(1-i+s)*a),d=s%6;return{r:VG([o,l,c,c,u,o][d]*255),g:VG([u,o,o,l,c,c][d]*255),b:VG([c,c,u,o,o,l][d]*255),a:VG(r,2)}}function lK(e,t){let{r:n,g:r,b:i,a}=cK(e);return t?`rgba(${n}, ${r}, ${i}, ${VG(a,2)})`:`rgb(${n}, ${r}, ${i})`}function uK({h:e,s:t,v:n,a:r},i){let a=(200-t)*n/100,o={h:Math.round(e),s:Math.round(a>0&&a<200?t*n/100/(a<=100?a:200-a)*100:0),l:Math.round(a/2)};return i?`hsla(${o.h}, ${o.s}%, ${o.l}%, ${VG(r,2)})`:`hsl(${o.h}, ${o.s}%, ${o.l}%)`}function dK(e){let t=e.toString(16);return t.length<2?`0${t}`:t}function fK(e){let{r:t,g:n,b:r}=cK(e);return`#${dK(t)}${dK(n)}${dK(r)}`}function pK(e){let t=Math.round(e.a*255);return`${fK(e)}${dK(t)}`}var mK={hex:fK,hexa:e=>pK(e),rgb:e=>lK(e,!1),rgba:e=>lK(e,!0),hsl:e=>uK(e,!1),hsla:e=>uK(e,!0)};function hK(e,t){return t?e in mK?mK[e](t):mK.hex(t):`#000000`}var gK={__staticSelector:`HueSlider`},_K=Q(e=>{let{value:t,onChange:n,onChangeEnd:r,color:i,...a}=Z(`HueSlider`,gK,e);return(0,J.jsx)(aK,{...a,value:t,onChange:n,onChangeEnd:r,maxValue:360,thumbColor:`hsl(${t}, 100%, 50%)`,round:!0,"data-hue":!0,overlays:[{backgroundImage:`linear-gradient(to right,hsl(0,100%,50%),hsl(60,100%,50%),hsl(120,100%,50%),hsl(170,100%,50%),hsl(240,100%,50%),hsl(300,100%,50%),hsl(360,100%,50%))`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${X(1)} inset, rgb(0, 0, 0, .15) 0 0 ${X(4)} inset`}]})});_K.displayName=`@mantine/core/HueSlider`,_K.classes=aK.classes;function vK({className:e,onChange:t,onChangeEnd:n,value:r,saturationLabel:i,focusable:a=!0,size:o,color:s,onScrubStart:c,onScrubEnd:l,...u}){let{getStyles:d}=(0,q.use)(nK),[f,p]=(0,q.useState)({x:r.s/100,y:1-r.v/100}),m=(0,q.useRef)(f),{ref:h}=eN(({x:e,y:n})=>{m.current={x:e,y:n},t({s:Math.round(e*100),v:Math.round((1-n)*100)})},{onScrubEnd:()=>{let{x:e,y:t}=m.current;n({s:Math.round(e*100),v:Math.round((1-t)*100)}),l?.()},onScrubStart:c});(0,q.useEffect)(()=>{p({x:r.s/100,y:1-r.v/100})},[r.s,r.v]);let g=(e,r)=>{e.preventDefault();let i=$M(r);t({s:Math.round(i.x*100),v:Math.round((1-i.y)*100)}),n({s:Math.round(i.x*100),v:Math.round((1-i.y)*100)})},_=e=>{switch(e.key){case`ArrowUp`:g(e,{y:f.y-.05,x:f.x});break;case`ArrowDown`:g(e,{y:f.y+.05,x:f.x});break;case`ArrowRight`:g(e,{x:f.x+.05,y:f.y});break;case`ArrowLeft`:g(e,{x:f.x-.05,y:f.y});break}};return(0,J.jsxs)($,{...d(`saturation`),ref:h,...u,role:`slider`,"aria-label":i,"aria-valuenow":f.x,"aria-valuetext":hK(`rgba`,r),tabIndex:a?0:-1,onKeyDown:_,children:[(0,J.jsx)(`div`,{...d(`saturationOverlay`,{style:{backgroundColor:`hsl(${r.h}, 100%, 50%)`}})}),(0,J.jsx)(`div`,{...d(`saturationOverlay`,{style:{backgroundImage:`linear-gradient(90deg, #fff, transparent)`}})}),(0,J.jsx)(`div`,{...d(`saturationOverlay`,{style:{backgroundImage:`linear-gradient(0deg, #000, transparent)`}})}),(0,J.jsx)(rK,{position:f,...d(`thumb`,{style:{backgroundColor:s}})})]})}vK.displayName=`@mantine/core/Saturation`;function yK({className:e,datatype:t,setValue:n,onChangeEnd:r,size:i,focusable:a,data:o,swatchesPerRow:s,value:c,...l}){let u=(0,q.use)(nK),d=o.map((e,t)=>(0,q.createElement)(BG,{...u.getStyles(`swatch`),unstyled:u.unstyled,component:`button`,type:`button`,color:e,key:t,radius:`sm`,onClick:()=>{n(e),r?.(e)},"aria-label":e,tabIndex:a?0:-1,"data-swatch":!0},c===e&&(0,J.jsx)(nG,{size:`35%`,color:aP(e)<.5?`white`:`black`})));return(0,J.jsx)($,{...u.getStyles(`swatches`),...l,children:d})}yK.displayName=`@mantine/core/Swatches`;var bK={swatchesPerRow:7,withPicker:!0,focusable:!0,size:`md`,__staticSelector:`ColorPicker`},xK=HN((e,{size:t,swatchesPerRow:n})=>({wrapper:{"--cp-preview-size":fM(t,`cp-preview-size`),"--cp-width":fM(t,`cp-width`),"--cp-body-spacing":pM(t),"--cp-swatch-size":`${100/n}%`,"--cp-thumb-size":fM(t,`cp-thumb-size`),"--cp-saturation-height":fM(t,`cp-saturation-height`)}})),SK=Q(e=>{let t=Z(`ColorPicker`,bK,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,format:c=`hex`,value:l,defaultValue:u,onChange:d,onChangeEnd:f,withPicker:p,size:m,saturationLabel:h,hueLabel:g,alphaLabel:_,focusable:v,swatches:y,swatchesPerRow:b,fullWidth:x,onColorSwatchClick:S,__staticSelector:C,mod:w,attributes:T,name:E,hiddenInputProps:D,...O}=t,k=bF({name:C,props:t,classes:iK,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:T,rootSelector:`wrapper`,vars:s,varsResolver:xK}),A=(0,q.useRef)(c||`hex`),j=(0,q.useRef)(``),M=(0,q.useRef)(-1),N=(0,q.useRef)(!1),P=c===`hexa`||c===`rgba`||c===`hsla`,[F,ee,I]=tN({value:l,defaultValue:u,finalValue:`#FFFFFF`,onChange:d}),[te,ne]=(0,q.useState)(tK(F)),L=()=>{window.clearTimeout(M.current),N.current=!0},re=()=>{window.clearTimeout(M.current),M.current=window.setTimeout(()=>{N.current=!1},200)},ie=e=>{ne(t=>{let n={...t,...e};return j.current=hK(A.current,n),n}),ee(j.current)};return PM(()=>{typeof l==`string`&&eK(l)&&!N.current&&ne(tK(l))},[l]),PM(()=>{A.current=c||`hex`,ee(hK(A.current,te))},[c]),(0,J.jsx)(nK,{value:{getStyles:k,unstyled:o},children:(0,J.jsxs)($,{...k(`wrapper`),size:m,mod:[{"full-width":x},w],...O,children:[E&&(0,J.jsx)(`input`,{type:`hidden`,name:E,value:F,...D}),p&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(vK,{value:te,onChange:ie,onChangeEnd:({s:e,v:t})=>f?.(hK(A.current,{...te,s:e,v:t})),color:F,size:m,focusable:v,saturationLabel:h,onScrubStart:L,onScrubEnd:re}),(0,J.jsxs)(`div`,{...k(`body`),children:[(0,J.jsxs)(`div`,{...k(`sliders`),children:[(0,J.jsx)(_K,{value:te.h,onChange:e=>ie({h:e}),onChangeEnd:e=>f?.(hK(A.current,{...te,h:e})),size:m,focusable:v,"aria-label":g,onScrubStart:L,onScrubEnd:re}),P&&(0,J.jsx)(sK,{value:te.a,onChange:e=>ie({a:e}),onChangeEnd:e=>{f?.(hK(A.current,{...te,a:e}))},size:m,color:hK(`hex`,te),focusable:v,"aria-label":_,onScrubStart:L,onScrubEnd:re})]}),P&&(0,J.jsx)(BG,{color:F,radius:`sm`,size:`var(--cp-preview-size)`,...k(`preview`)})]})]}),Array.isArray(y)&&(0,J.jsx)(yK,{data:y,swatchesPerRow:b,focusable:v,setValue:ee,value:F,onChangeEnd:e=>{let t=hK(c,tK(e));S?.(t),f?.(t),I||ne(tK(e))}})]})})});SK.classes=iK,SK.varsResolver=xK,SK.displayName=`@mantine/core/ColorPicker`;function CK({style:e,...t}){return(0,J.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,style:{width:`var(--ci-eye-dropper-icon-size)`,height:`var(--ci-eye-dropper-icon-size)`,...e},viewBox:`0 0 24 24`,strokeWidth:`1.5`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,...t,children:[(0,J.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,J.jsx)(`path`,{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`}),(0,J.jsx)(`path`,{d:`M12 3l0 4`}),(0,J.jsx)(`path`,{d:`M12 21l0 -3`}),(0,J.jsx)(`path`,{d:`M3 12l4 0`}),(0,J.jsx)(`path`,{d:`M21 12l-3 0`}),(0,J.jsx)(`path`,{d:`M12 12l0 .01`})]})}var wK={eyeDropperIcon:`m_b077c2bc`,eyeDropperButton:`m_66a028b5`,colorPreview:`m_c5ccdcab`,dropdown:`m_5ece2cd7`},TK={format:`hex`,fixOnBlur:!0,withPreview:!0,swatchesPerRow:7,withPicker:!0,popoverProps:{transitionProps:{transition:`fade`,duration:0}},withEyeDropper:!0,size:`sm`,leftSectionPointerEvents:`none`},EK=HN((e,{size:t})=>({eyeDropperIcon:{"--ci-eye-dropper-icon-size":fM(t,`ci-eye-dropper-icon-size`)},eyeDropperButton:{"--ci-button-size":fM(t,`ci-button-size`)},colorPreview:{"--ci-preview-size":fM(t,`ci-preview-size`)}})),DK=Q(e=>{let t=Z(`ColorInput`,TK,e),{classNames:n,styles:r,unstyled:i,disallowInput:a,fixOnBlur:o,popoverProps:s,withPreview:c,withEyeDropper:l,eyeDropperIcon:u,closeOnColorSwatchClick:d,eyeDropperButtonProps:f,value:p,defaultValue:m,onChange:h,onChangeEnd:g,onClick:_,onFocus:v,onBlur:y,inputProps:b,format:x=`hex`,wrapperProps:S,readOnly:C,withPicker:w,swatches:T,disabled:E,leftSection:D,rightSection:O,swatchesPerRow:k,...A}=jU(`ColorInput`,TK,e),j=bF({name:`ColorInput`,props:t,classes:wK,classNames:n,styles:r,unstyled:i,rootSelector:`wrapper`,vars:t.vars,varsResolver:EK}),{resolvedClassNames:M,resolvedStyles:N}=oF({classNames:n,styles:r,props:t}),[P,F]=(0,q.useState)(!1),[ee,I]=(0,q.useState)(``),[te,ne]=tN({value:p,defaultValue:m,finalValue:``,onChange:h}),{supported:L,open:re}=wN(),ie=(0,J.jsx)(DV,{...f,...j(`eyeDropperButton`,{className:f?.className,style:f?.style}),variant:`subtle`,color:`gray`,unstyled:i,onClick:()=>re().then(e=>{if(e?.sRGBHex){let t=hK(x,tK(e.sRGBHex));ne(t),g?.(t)}}).catch(()=>{}),children:u||(0,J.jsx)(CK,{...j(`eyeDropperIcon`)})}),ae=e=>{v?.(e),F(!0)},oe=e=>{o&&ne(ee),y?.(e),F(!1)},se=e=>{_?.(e),F(!0)};return(0,q.useEffect)(()=>{(eK(te)||te.trim()===``)&&I(te)},[te]),PM(()=>{eK(te)&&ne(hK(x,tK(te)))},[x]),(0,J.jsx)(AU.Wrapper,{...S,classNames:M,styles:N,__staticSelector:`ColorInput`,children:(0,J.jsxs)(dV,{__staticSelector:`ColorInput`,position:`bottom-start`,offset:5,opened:P,...s,classNames:M,styles:N,unstyled:i,withRoles:!1,disabled:C||w===!1&&(!Array.isArray(T)||T.length===0),children:[(0,J.jsx)(dV.Target,{children:(0,J.jsx)(AU,{autoComplete:`off`,...A,...b,classNames:M,styles:N,disabled:E,__staticSelector:`ColorInput`,onFocus:ae,onBlur:oe,onClick:se,spellCheck:!1,value:te,onChange:e=>{let t=e.currentTarget.value;ne(t),eK(t)&&g?.(hK(x,tK(t)))},leftSection:D||(c?(0,J.jsx)(BG,{color:eK(te)?te:`#fff`,size:`var(--ci-preview-size)`,...j(`colorPreview`)}):null),readOnly:a||C,pointer:a,unstyled:i,rightSection:O||(l&&!E&&!C&&L?ie:null)})}),(0,J.jsx)(dV.Dropdown,{onMouseDown:e=>e.preventDefault(),className:wK.dropdown,children:(0,J.jsx)(SK,{__staticSelector:`ColorInput`,value:te,onChange:ne,onChangeEnd:g,format:x,swatches:T,swatchesPerRow:k,withPicker:w,size:b.size,focusable:!1,unstyled:i,styles:N,classNames:M,onColorSwatchClick:()=>d&&F(!1),attributes:S.attributes})})]})})});DK.classes=NU.classes,DK.varsResolver=EK,DK.displayName=`@mantine/core/ColorInput`;var OK={root:`m_7485cace`},kK={strategy:`block`},AK=HN((e,{size:t,fluid:n})=>({root:{"--container-size":n?void 0:fM(t,`container-size`)}})),jK=Q(e=>{let t=Z(`Container`,kK,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,fluid:c,mod:l,attributes:u,strategy:d,...f}=t,p=bF({name:`Container`,classes:OK,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:AK});return(0,J.jsx)($,{mod:[{fluid:c,strategy:d},l],...p(`root`),...f})});jK.classes=OK,jK.varsResolver=AK,jK.displayName=`@mantine/core/Container`;var MK={root:`m_3eebeb36`,label:`m_9e365f20`},NK={orientation:`horizontal`},PK=HN((e,{color:t,variant:n,size:r})=>({root:{"--divider-color":t?cP(t,e):void 0,"--divider-border-style":n,"--divider-size":fM(r,`divider-size`)}})),FK=Q(e=>{let t=Z(`Divider`,NK,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,orientation:l,label:u,labelPosition:d,mod:f,attributes:p,...m}=t,h=bF({name:`Divider`,classes:MK,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:PK});return(0,J.jsx)($,{mod:[{orientation:l,withLabel:!!u},f],role:`separator`,...h(`root`),...m,children:u&&(0,J.jsx)($,{component:`span`,mod:{position:d},...h(`label`),children:u})})});FK.classes=MK,FK.varsResolver=PK,FK.displayName=`@mantine/core/Divider`;var IK={root:`m_e9408a47`,"root--default":`m_84c9523a`,"root--filled":`m_ef274e49`,"root--unstyled":`m_eda993d3`,legend:`m_90794832`,"legend--unstyled":`m_74ca27fe`},LK={variant:`default`},RK=HN((e,{radius:t})=>({root:{"--fieldset-radius":t===void 0?void 0:mM(t)}})),zK=Q(e=>{let t=Z(`Fieldset`,LK,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,legend:c,variant:l,children:u,attributes:d,...f}=t,p=bF({name:`Fieldset`,classes:IK,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:RK});return(0,J.jsxs)($,{component:`fieldset`,variant:l,...p(`root`,{variant:l}),...f,children:[c&&(0,J.jsx)(`legend`,{...p(`legend`,{variant:l}),children:c}),u]})});zK.classes=IK,zK.varsResolver=RK,zK.displayName=`@mantine/core/Fieldset`;var BK=QF(e=>{let{onChange:t,children:n,multiple:r,accept:i,name:a,form:o,resetRef:s,disabled:c,capture:l,inputProps:u,ref:d,...f}=Z(`FileButton`,null,e),p=(0,q.useRef)(null),m=()=>{!c&&p.current?.click()};return XM(s,()=>{p.current&&(p.current.value=``)}),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`input`,{style:{display:`none`},type:`file`,accept:i,multiple:r,onChange:e=>{if(e.currentTarget.files===null)return t(r?[]:null);t(r?Array.from(e.currentTarget.files):e.currentTarget.files[0]||null)},ref:QM(d,p),name:a,form:o,capture:l,...u}),n({onClick:m,...f})]})});BK.displayName=`@mantine/core/FileButton`;var VK={valueComponent:({value:e})=>(0,J.jsx)(`div`,{style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:Array.isArray(e)?e.map(e=>e.name).join(`, `):e?.name}),size:`sm`},HK=QF(e=>{let t=Z(`FileInput`,VK,e),{unstyled:n,vars:r,onChange:i,value:a,defaultValue:o,multiple:s,accept:c,name:l,form:u,valueComponent:d,clearable:f,clearSectionMode:p,clearButtonProps:m,readOnly:h,capture:g,fileInputProps:_,rightSection:v,size:y,placeholder:b,component:x,resetRef:S,classNames:C,styles:w,attributes:T,...E}=t,D=(0,q.useRef)(null),{resolvedClassNames:O,resolvedStyles:k}=oF({classNames:C,styles:w,props:t}),[A,j]=tN({value:a,defaultValue:o,onChange:i,finalValue:s?[]:null}),M=Array.isArray(A)?A.length!==0:A!==null,N=(0,J.jsx)(MV,{...m,variant:`subtle`,onClick:()=>j(s?[]:null),size:y,unstyled:n}),P=f&&M&&!h;return(0,q.useEffect)(()=>{(Array.isArray(A)&&A.length===0||A===null)&&D.current?.()},[A]),(0,J.jsx)(BK,{onChange:j,multiple:s,accept:c,name:l,form:u,resetRef:QM(D,S),disabled:h,capture:g,inputProps:_,children:e=>(0,J.jsx)(NU,{component:x||`button`,rightSection:v,__clearSection:N,__clearable:P,__clearSectionMode:p,...e,...E,__staticSelector:`FileInput`,multiline:!0,type:`button`,pointer:!0,__stylesApiProps:t,unstyled:n,size:y,classNames:C,styles:w,attributes:T,children:M?(0,J.jsx)(d,{value:A}):(0,J.jsx)(AU.Placeholder,{__staticSelector:`FileInput`,classNames:O,styles:k,attributes:T,children:b})})})});HK.classes=NU.classes,HK.displayName=`@mantine/core/FileInput`;var[UK,WK]=nM(`Grid component was not found in tree`),GK=(e,t)=>{if(e===`content`)return`auto`;if(e===`auto`)return`0rem`;if(e)return e===t?`100%`:`calc(${100*e/t}% - ${(t-e)/t} * var(--grid-column-gap))`},KK=(e,t,n)=>n||e===`auto`?`100%`:e===`content`?`unset`:GK(e,t),qK=(e,t)=>{if(e)return e===`auto`||t?`1`:`auto`},JK=(e,t)=>{if(e===0)return`0`;if(e)return`calc(${100*e/t}% + ${e/t} * var(--grid-column-gap))`};function YK({span:e,order:t,offset:n,align:r,selector:i}){let a=UP(),o=WK(),s=o.breakpoints||a.breakpoints,c=xM(e),l=c===void 0?12:c,u=$j({"--col-order":xM(t)?.toString(),"--col-flex-grow":qK(l,o.grow),"--col-flex-basis":GK(l,o.columns),"--col-width":l===`content`?`auto`:void 0,"--col-max-width":KK(l,o.columns,o.grow),"--col-offset":JK(xM(n),o.columns),"--col-align-self":xM(r)}),d=Wj(s).reduce((i,a)=>(i[a]||(i[a]={}),typeof t==`object`&&t[a]!==void 0&&(i[a][`--col-order`]=t[a]?.toString()),typeof e==`object`&&e[a]!==void 0&&(i[a][`--col-flex-grow`]=qK(e[a],o.grow),i[a][`--col-flex-basis`]=GK(e[a],o.columns),i[a][`--col-width`]=e[a]===`content`?`auto`:void 0,i[a][`--col-max-width`]=KK(e[a],o.columns,o.grow)),typeof n==`object`&&n[a]!==void 0&&(i[a][`--col-offset`]=JK(n[a],o.columns)),typeof r==`object`&&r[a]!==void 0&&(i[a][`--col-align-self`]=r[a]),i),{}),f=bM(Wj(d),s).filter(e=>Wj(d[e.value]).length>0).map(e=>({query:o.type===`container`?`mantine-grid (min-width: ${s[e.value]})`:`(min-width: ${s[e.value]})`,styles:d[e.value]}));return(0,J.jsx)(CF,{styles:u,media:o.type===`container`?void 0:f,container:o.type===`container`?f:void 0,selector:i})}var XK={container:`m_8478a6da`,root:`m_410352e9`,inner:`m_dee7bd2f`,col:`m_96bdd299`},ZK={span:12},QK=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,span:o,order:s,offset:c,align:l,...u}=Z(`GridCol`,ZK,e),d=WK(),f=qF();return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(YK,{selector:`.${f}`,span:o,order:s,offset:c,align:l}),(0,J.jsx)($,{...d.getStyles(`col`,{className:WN(n,f),style:r,classNames:t,styles:i}),...u})]})});QK.classes=XK,QK.displayName=`@mantine/core/GridCol`;function $K({gap:e,rowGap:t,columnGap:n,selector:r,breakpoints:i,type:a}){let o=UP(),s=i||o.breakpoints,c=$j({"--grid-gap":pM(xM(e)),"--grid-row-gap":pM(xM(t)),"--grid-column-gap":pM(xM(n))}),l=Wj(s).reduce((r,i)=>(r[i]||(r[i]={}),typeof e==`object`&&e[i]!==void 0&&(r[i][`--grid-gap`]=pM(e[i])),typeof t==`object`&&t[i]!==void 0&&(r[i][`--grid-row-gap`]=pM(t[i])),typeof n==`object`&&n[i]!==void 0&&(r[i][`--grid-column-gap`]=pM(n[i])),r),{}),u=bM(Wj(l),s).filter(e=>Wj(l[e.value]).length>0).map(e=>({query:a===`container`?`mantine-grid (min-width: ${s[e.value]})`:`(min-width: ${s[e.value]})`,styles:l[e.value]}));return(0,J.jsx)(CF,{styles:c,media:a===`container`?void 0:u,container:a===`container`?u:void 0,selector:r})}var eq={gap:`md`,columns:12},tq=HN((e,{justify:t,align:n,overflow:r})=>({root:{"--grid-justify":t,"--grid-align":n,"--grid-overflow":r}})),nq=Q(e=>{let t=Z(`Grid`,eq,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,grow:c,gap:l,rowGap:u,columnGap:d,columns:f,align:p,justify:m,children:h,breakpoints:g,type:_,attributes:v,...y}=t,b=bF({name:`Grid`,classes:XK,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:v,vars:s,varsResolver:tq}),x=qF();return _===`container`&&g?(0,J.jsxs)(UK,{value:{getStyles:b,grow:c,columns:f,breakpoints:g,type:_},children:[(0,J.jsx)($K,{selector:`.${x}`,...t}),(0,J.jsx)(`div`,{...b(`container`),children:(0,J.jsx)($,{...b(`root`,{className:x}),...y,children:(0,J.jsx)(`div`,{...b(`inner`),children:h})})})]}):(0,J.jsxs)(UK,{value:{getStyles:b,grow:c,columns:f,breakpoints:g,type:_},children:[(0,J.jsx)($K,{selector:`.${x}`,...t}),(0,J.jsx)($,{...b(`root`,{className:x}),...y,children:(0,J.jsx)(`div`,{...b(`inner`),children:h})})]})});nq.classes=XK,nq.varsResolver=tq,nq.displayName=`@mantine/core/Grid`,nq.Col=QK;function rq({color:e,theme:t,defaultShade:n}){let r=sP({color:e,theme:t});return r.isThemeColor?r.shade===void 0?`var(--mantine-color-${r.color}-${n})`:`var(${r.variable})`:e}var iq={root:`m_bcb3f3c2`},aq={color:`yellow`},oq=HN((e,{color:t})=>({root:{"--mark-bg-dark":rq({color:t,theme:e,defaultShade:5}),"--mark-bg-light":rq({color:t,theme:e,defaultShade:2})}})),sq=Q(e=>{let t=Z(`Mark`,aq,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,variant:l,attributes:u,...d}=t;return(0,J.jsx)($,{component:`mark`,variant:l,...bF({name:`Mark`,props:t,className:r,style:i,classes:iq,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:oq})(`root`),...d})});sq.classes=iq,sq.varsResolver=oq,sq.displayName=`@mantine/core/Mark`;function cq(e){return e.replace(/[-[\]{}()*+?.,\\^$|#]/g,`\\$&`)}function lq(e,t,n={}){if(t==null)return[{chunk:e,highlighted:!1}];let r=Array.isArray(t)?t.map(cq):cq(t);if(!(Array.isArray(r)?r.filter(e=>e.trim().length>0).length>0:r.trim()!==``))return[{chunk:e,highlighted:!1}];let i=typeof r==`string`?r.trim():r.filter(e=>e.trim().length!==0).map(e=>e.trim()).sort((e,t)=>t.length-e.length).join(`|`),a=n.wholeWord?`\\b(${i})\\b`:`(${i})`,o=new RegExp(a,`gi`);return e.split(o).map((e,t)=>({chunk:e,highlighted:t%2==1})).filter(({chunk:e})=>e)}var uq={color:`yellow`,wholeWord:!1},dq=$F(e=>{let{unstyled:t,children:n,highlight:r,highlightStyles:i,color:a,wholeWord:o,...s}=Z(`Highlight`,uq,e),c=Array.isArray(r)&&typeof r[0]==`object`,l=new Map,u;u=c?r.map(e=>(e.color&&l.set(e.text.toLowerCase(),e.color),e.text)):Array.isArray(r)?r:[r];let d=lq(n,u,{wholeWord:o});return(0,J.jsx)(qU,{unstyled:t,...s,__staticSelector:`Highlight`,children:d.map(({chunk:e,highlighted:n},r)=>n?(0,J.jsx)(sq,{unstyled:t,color:l.get(e.toLowerCase())||a,style:i,"data-highlight":e,children:e},r):(0,J.jsx)(`span`,{children:e},r))})});dq.classes=qU.classes,dq.displayName=`@mantine/core/Highlight`;var fq={root:`m_9e117634`},pq=HN((e,{radius:t,fit:n})=>({root:{"--image-radius":t===void 0?void 0:mM(t),"--image-object-fit":n}})),mq=$F(e=>{let t=Z(`Image`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,onError:c,src:l,radius:u,fit:d,fallbackSrc:f,mod:p,attributes:m,...h}=t,[g,_]=(0,q.useState)(!l);(0,q.useEffect)(()=>_(!l),[l]);let v=bF({name:`Image`,classes:fq,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:s,varsResolver:pq});return g&&f?(0,J.jsx)($,{component:`img`,src:f,...v(`root`),onError:c,mod:[`fallback`,p],...h}):(0,J.jsx)($,{component:`img`,...v(`root`),src:l,onError:e=>{c?.(e),_(!0)},mod:p,...h})});mq.classes=fq,mq.varsResolver=pq,mq.displayName=`@mantine/core/Image`;var hq=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],gq={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`};function _q(e){Object.keys(gq).forEach(t=>{e.style.setProperty(t,gq[t],`important`)})}function vq(e){let t=window.getComputedStyle(e);if(t===null)return null;let n={};for(let e of hq)n[e]=t[e];return n.boxSizing===``?null:{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)}}var yq=null;function bq(e,t,n=1,r=1/0){yq||(yq=document.createElement(`textarea`),yq.setAttribute(`tabindex`,`-1`),yq.setAttribute(`aria-hidden`,`true`),yq.setAttribute(`aria-label`,`autosize measurement`),_q(yq)),yq.parentNode===null&&document.body.appendChild(yq);let{paddingSize:i,borderSize:a,sizingStyle:o}=e,{boxSizing:s}=o;Object.keys(o).forEach(e=>{yq.style[e]=o[e]}),_q(yq),yq.value=t;let c=s===`border-box`?yq.scrollHeight+a:yq.scrollHeight-i;yq.value=t,c=s===`border-box`?yq.scrollHeight+a:yq.scrollHeight-i,yq.value=`x`;let l=yq.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);let d=l*r;return s===`border-box`&&(d=d+i+a),c=Math.min(d,c),[c,l]}function xq({maxRows:e,minRows:t,onChange:n,ref:r,...i}){let a=i.value!==void 0,o=(0,q.useRef)(null),s=QM(o,r),c=(0,q.useRef)(0),l=()=>{let n=o.current,r=vq(n);if(!r)return;let[i]=bq(r,n.value||n.placeholder||`x`,t,e);c.current!==i&&(c.current=i,n.style.setProperty(`height`,`${i}px`,`important`))},u=e=>{a||l(),n?.(e)};return(0,q.useLayoutEffect)(l),(0,q.useEffect)(()=>{let e=()=>l();return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,q.useEffect)(()=>{let e=()=>l();return document.fonts.addEventListener(`loadingdone`,e),()=>document.fonts.removeEventListener(`loadingdone`,e)},[]),(0,q.useEffect)(()=>{let e=e=>{if(o.current?.form===e.target&&!a){let e=o.current.value;requestAnimationFrame(()=>{o.current&&e!==o.current.value&&l()})}};return document.body.addEventListener(`reset`,e),()=>document.body.removeEventListener(`reset`,e)},[a]),(0,J.jsx)(`textarea`,{...i,onChange:u,ref:s})}var Sq={size:`sm`},Cq=Q(e=>{let{autosize:t,maxRows:n,minRows:r,__staticSelector:i,resize:a,...o}=Z(`Textarea`,Sq,e),s=t&&NN()!==`test`,c=s?{maxRows:n,minRows:r}:{};return(0,J.jsx)(NU,{component:s?xq:`textarea`,...o,__staticSelector:i||`Textarea`,multiline:!0,"data-no-overflow":t&&n===void 0||void 0,__vars:{"--input-resize":a},...c})});Cq.classes=NU.classes,Cq.displayName=`@mantine/core/Textarea`;var wq={root:`m_dc6f14e2`},Tq=HN((e,{size:t})=>({root:{"--kbd-fz":fM(t,`kbd-fz`)}})),Eq=Q(e=>{let t=Z(`Kbd`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,...l}=t;return(0,J.jsx)($,{component:`kbd`,...bF({name:`Kbd`,classes:wq,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,vars:s,varsResolver:Tq})(`root`),...l})});Eq.classes=wq,Eq.varsResolver=Tq,Eq.displayName=`@mantine/core/Kbd`;var[Dq,Oq]=nM(`Menu component was not found in the tree`),kq={dropdown:`m_dc9b7c9f`,label:`m_9bfac126`,divider:`m_efdf90cb`,item:`m_99ac2aa1`,itemLabel:`m_5476e0d3`,itemSection:`m_8b75e504`,chevron:`m_b85b0bed`},Aq=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`MenuDivider`,null,e);return(0,J.jsx)($,{...Oq().getStyles(`divider`,{className:n,style:r,styles:i,classNames:t}),...o})});Aq.classes=kq,Aq.displayName=`@mantine/core/MenuDivider`;var jq=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,onMouseEnter:o,onMouseLeave:s,onKeyDown:c,children:l,ref:u,...d}=Z(`MenuDropdown`,null,e),f=(0,q.useRef)(null),p=Oq(),m=vM(c,e=>{(e.key===`ArrowUp`||e.key===`ArrowDown`)&&(e.preventDefault(),f.current?.querySelectorAll(`[data-menu-item]:not(:disabled)`)[0]?.focus())}),h=vM(o,()=>(p.trigger===`hover`||p.trigger===`click-hover`)&&p.openDropdown()),g=vM(s,()=>(p.trigger===`hover`||p.trigger===`click-hover`)&&p.closeDropdown());return(0,J.jsxs)(dV.Dropdown,{...d,onMouseEnter:h,onMouseLeave:g,role:`menu`,"aria-orientation":`vertical`,ref:QM(u,f),...p.getStyles(`dropdown`,{className:n,style:r,styles:i,classNames:t,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:m,children:[p.withInitialFocusPlaceholder&&(0,J.jsx)(`div`,{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),l]})});jq.classes=kq,jq.displayName=`@mantine/core/MenuDropdown`;var Mq=(0,q.createContext)(null),Nq=$F(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,leftSection:c,rightSection:l,children:u,disabled:d,"data-disabled":f,ref:p,...m}=Z(`MenuItem`,null,e),h=Oq(),g=(0,q.use)(Mq),_=UP(),{dir:v}=sI(),y=(0,q.useRef)(null),b=m,x=vM(b.onClick,()=>{f||(typeof s==`boolean`?s&&h.closeDropdownImmediately():h.closeOnItemClick&&h.closeDropdownImmediately())}),S=o?_.variantColorResolver({color:o,theme:_,variant:`light`}):void 0,C=o?sP({color:o,theme:_}):null,w=vM(b.onKeyDown,e=>{e.key===`ArrowLeft`&&g&&(g.close(),g.focusParentItem())});return(0,J.jsxs)(SB,{onMouseDown:e=>e.preventDefault(),...m,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,...h.getStyles(`item`,{className:n,style:r,styles:i,classNames:t}),ref:QM(y,p),role:`menuitem`,disabled:d,"data-menu-item":!0,"data-disabled":d||f||void 0,"data-mantine-stop-propagation":!0,onClick:x,onKeyDown:sM({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:h.loop,dir:v,orientation:`vertical`,onKeyDown:w}),__vars:{"--menu-item-color":C?.isThemeColor&&C?.shade===void 0?`var(--mantine-color-${C.color}-6)`:S?.color,"--menu-item-hover":S?.hover},children:[c&&(0,J.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`left`,children:c}),u&&(0,J.jsx)(`div`,{...h.getStyles(`itemLabel`,{styles:i,classNames:t}),children:u}),l&&(0,J.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`right`,children:l})]})});Nq.classes=kq,Nq.displayName=`@mantine/core/MenuItem`;var Pq=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`MenuLabel`,null,e);return(0,J.jsx)($,{...Oq().getStyles(`label`,{className:n,style:r,styles:i,classNames:t}),...o})});Pq.classes=kq,Pq.displayName=`@mantine/core/MenuLabel`;var Fq=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,onMouseEnter:o,onMouseLeave:s,onKeyDown:c,children:l,ref:u,...d}=Z(`MenuSubDropdown`,null,e),f=(0,q.useRef)(null),p=Oq(),m=(0,q.use)(Mq),h=vM(o,m?.open),g=vM(s,m?.close);return(0,J.jsx)(dV.Dropdown,{...d,onMouseEnter:h,onMouseLeave:g,role:`menu`,"aria-orientation":`vertical`,ref:QM(u,f),...p.getStyles(`dropdown`,{className:n,style:r,styles:i,classNames:t,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:l})});Fq.classes=kq,Fq.displayName=`@mantine/core/MenuSubDropdown`;var Iq=$F(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,leftSection:s,rightSection:c,children:l,disabled:u,"data-disabled":d,closeMenuOnClick:f,ref:p,...m}=Z(`MenuSubItem`,null,e),h=Oq(),g=(0,q.use)(Mq),_=UP(),{dir:v}=sI(),y=(0,q.useRef)(null),b=m,x=o?_.variantColorResolver({color:o,theme:_,variant:`light`}):void 0,S=o?sP({color:o,theme:_}):null,C=vM(b.onKeyDown,e=>{e.key===`ArrowRight`&&(g?.open(),g?.focusFirstItem()),e.key===`ArrowLeft`&&g?.parentContext&&(g.parentContext.close(),g.parentContext.focusParentItem())}),w=vM(b.onClick,()=>{!d&&f&&h.closeDropdownImmediately()}),T=vM(b.onMouseEnter,g?.open),E=vM(b.onMouseLeave,g?.close);return(0,J.jsxs)(SB,{onMouseDown:e=>e.preventDefault(),...m,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,...h.getStyles(`item`,{className:n,style:r,styles:i,classNames:t}),ref:QM(y,p),role:`menuitem`,disabled:u,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":u||d||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:T,onMouseLeave:E,onClick:w,onKeyDown:sM({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:h.loop,dir:v,orientation:`vertical`,onKeyDown:C}),__vars:{"--menu-item-color":S?.isThemeColor&&S?.shade===void 0?`var(--mantine-color-${S.color}-6)`:x?.color,"--menu-item-hover":x?.hover},children:[s&&(0,J.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`left`,children:s}),l&&(0,J.jsx)(`div`,{...h.getStyles(`itemLabel`,{styles:i,classNames:t}),children:l}),(0,J.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`right`,children:c||(0,J.jsx)(HU,{...h.getStyles(`chevron`),size:14})})]})});Iq.classes=kq,Iq.displayName=`@mantine/core/MenuSubItem`;function Lq({children:e,refProp:t}){if(!tM(e))throw Error(`Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return Oq(),(0,J.jsx)(dV.Target,{refProp:t,popupType:`menu`,children:e})}Lq.displayName=`@mantine/core/MenuSubTarget`;var Rq={offset:0,position:`right-start`,transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function zq(e){let{children:t,closeDelay:n,openDelay:r,...i}=Z(`MenuSub`,Rq,e),a=JM(),[o,{open:s,close:c}]=xN(!1),l=(0,q.use)(Mq),{openDropdown:u,closeDropdown:d}=PB({open:s,close:c,closeDelay:n,openDelay:r});return(0,J.jsx)(Mq,{value:{opened:o,close:d,open:u,focusFirstItem:()=>window.setTimeout(()=>{document.getElementById(`${a}-dropdown`)?.querySelectorAll(`[data-menu-item]:not([data-disabled])`)[0]?.focus()},16),focusParentItem:()=>window.setTimeout(()=>{document.getElementById(`${a}-target`)?.focus()},16),parentContext:l},children:(0,J.jsx)(dV,{opened:o,withinPortal:!1,withArrow:!1,id:a,...i,children:t})})}zq.extend=e=>e,zq.displayName=`@mantine/core/MenuSub`,zq.Target=Lq,zq.Dropdown=Fq,zq.Item=Iq;var Bq={refProp:`ref`};function Vq(e){let{children:t,refProp:n,...r}=Z(`MenuTarget`,Bq,e),i=VN(t);if(!i)throw Error(`Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=Oq(),o=i.props,s=vM(o.onClick,()=>{a.trigger===`click`?a.toggleDropdown():a.trigger===`click-hover`&&(a.setOpenedViaClick(!0),a.opened||a.openDropdown())}),c=vM(o.onMouseEnter,()=>(a.trigger===`hover`||a.trigger===`click-hover`)&&a.openDropdown()),l=vM(o.onMouseLeave,()=>{(a.trigger===`hover`||a.trigger===`click-hover`&&!a.openedViaClick)&&a.closeDropdown()});return(0,J.jsx)(dV.Target,{refProp:n,popupType:`menu`,...r,children:(0,q.cloneElement)(i,{onClick:s,onMouseEnter:c,onMouseLeave:l,"data-expanded":a.opened?!0:void 0})})}Vq.displayName=`@mantine/core/MenuTarget`;var Hq={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:[`mousedown`,`touchstart`,`keydown`],loop:!0,trigger:`click`,openDelay:0,closeDelay:100,menuItemTabIndex:-1},Uq=Q(e=>{let t=Z(`Menu`,Hq,e),{children:n,onOpen:r,onClose:i,opened:a,defaultOpened:o,trapFocus:s,onChange:c,closeOnItemClick:l,loop:u,closeOnEscape:d,trigger:f,openDelay:p,closeDelay:m,classNames:h,styles:g,unstyled:_,variant:v,vars:y,menuItemTabIndex:b,keepMounted:x,withInitialFocusPlaceholder:S,attributes:C,...w}=t,T=bF({name:`Menu`,classes:kq,props:t,classNames:h,styles:g,unstyled:_,attributes:C}),[E,D]=tN({value:a,defaultValue:o,finalValue:!1,onChange:c}),[O,k]=(0,q.useState)(!1),A=()=>{D(!1),k(!1),E&&i?.()},j=()=>{D(!0),!E&&r?.()},M=()=>{E?A():j()},{openDropdown:N,closeDropdown:P}=PB({open:j,close:A,closeDelay:m,openDelay:p}),F=e=>SM(`[data-menu-item]`,`[data-menu-dropdown]`,e),{resolvedClassNames:ee,resolvedStyles:I}=oF({classNames:h,styles:g,props:t});return(0,J.jsx)(Dq,{value:{getStyles:T,opened:E,toggleDropdown:M,getItemIndex:F,openedViaClick:O,setOpenedViaClick:k,closeOnItemClick:l,closeDropdown:f===`click`?A:P,openDropdown:f===`click`?j:N,closeDropdownImmediately:A,loop:u,trigger:f,unstyled:_,menuItemTabIndex:b,withInitialFocusPlaceholder:S},children:(0,J.jsx)(dV,{returnFocus:!0,...w,opened:E,onChange:M,defaultOpened:o,trapFocus:x?!1:s,closeOnEscape:d,__staticSelector:`Menu`,classNames:ee,styles:I,unstyled:_,variant:v,keepMounted:x,children:n})})});Uq.displayName=`@mantine/core/Menu`,Uq.classes=kq,Uq.Item=Nq,Uq.Label=Pq,Uq.Dropdown=jq,Uq.Target=Vq,Uq.Divider=Aq,Uq.Sub=zq;var[Wq,Gq]=nM(`Modal component was not found in tree`),Kq={root:`m_9df02822`,content:`m_54c44539`,inner:`m_1f958f16`,header:`m_d0e2b9cd`},qq=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`ModalBody`,null,e);return(0,J.jsx)(eU,{...Gq().getStyles(`body`,{classNames:t,style:r,styles:i,className:n}),...o})});qq.classes=Kq,qq.displayName=`@mantine/core/ModalBody`;var Jq=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`ModalCloseButton`,null,e);return(0,J.jsx)(tU,{...Gq().getStyles(`close`,{classNames:t,style:r,styles:i,className:n}),...o})});Jq.classes=Kq,Jq.displayName=`@mantine/core/ModalCloseButton`;var Yq=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,__hidden:s,...c}=Z(`ModalContent`,null,e),l=Gq(),u=l.scrollAreaComponent||lU;return(0,J.jsx)(nU,{...l.getStyles(`content`,{className:n,style:r,styles:i,classNames:t}),innerProps:l.getStyles(`inner`,{className:n,style:r,styles:i,classNames:t}),"data-full-screen":l.fullScreen||void 0,"data-modal-content":!0,"data-hidden":s||void 0,...c,children:(0,J.jsx)(u,{style:{maxHeight:l.fullScreen?`100dvh`:`calc(100dvh - (${X(l.yOffset)} * 2))`},children:o})})});Yq.classes=Kq,Yq.displayName=`@mantine/core/ModalContent`;var Xq=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`ModalHeader`,null,e);return(0,J.jsx)(rU,{...Gq().getStyles(`header`,{classNames:t,style:r,styles:i,className:n}),...o})});Xq.classes=Kq,Xq.displayName=`@mantine/core/ModalHeader`;var Zq=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`ModalOverlay`,null,e);return(0,J.jsx)(oU,{...Gq().getStyles(`overlay`,{classNames:t,style:r,styles:i,className:n}),...o})});Zq.classes=Kq,Zq.displayName=`@mantine/core/ModalOverlay`;var Qq={__staticSelector:`Modal`,closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:lM(`modal`),transitionProps:{duration:200,transition:`fade-down`},yOffset:`5dvh`},$q=HN((e,{radius:t,size:n,yOffset:r,xOffset:i})=>({root:{"--modal-radius":t===void 0?void 0:mM(t),"--modal-size":fM(n,`modal-size`),"--modal-y-offset":X(r),"--modal-x-offset":X(i)}})),eJ=Q(e=>{let t=Z(`ModalRoot`,Qq,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,yOffset:c,scrollAreaComponent:l,radius:u,fullScreen:d,centered:f,xOffset:p,__staticSelector:m,attributes:h,...g}=t,_=bF({name:m,classes:Kq,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:$q});return(0,J.jsx)(Wq,{value:{yOffset:c,scrollAreaComponent:l,getStyles:_,fullScreen:d},children:(0,J.jsx)(ZH,{..._(`root`),"data-full-screen":d||void 0,"data-centered":f||void 0,"data-offset-scrollbars":l===vB.Autosize||void 0,unstyled:o,...g})})});eJ.classes=Kq,eJ.varsResolver=$q,eJ.displayName=`@mantine/core/ModalRoot`;var tJ=(0,q.createContext)(null);function nJ({children:e}){let[t,n]=(0,q.useState)([]),[r,i]=(0,q.useState)(lM(`modal`));return(0,J.jsx)(tJ,{value:{stack:t,addModal:(e,t)=>{n(t=>[...new Set([...t,e])]),i(e=>typeof t==`number`&&typeof e==`number`?Math.max(e,t):e)},removeModal:e=>n(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${r} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:r},children:e})}nJ.displayName=`@mantine/core/ModalStack`;var rJ=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`ModalTitle`,null,e);return(0,J.jsx)(cU,{...Gq().getStyles(`title`,{classNames:t,style:r,styles:i,className:n}),...o})});rJ.classes=Kq,rJ.displayName=`@mantine/core/ModalTitle`;var iJ={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:lM(`modal`),transitionProps:{duration:200,transition:`fade-down`},withOverlay:!0,withCloseButton:!0},aJ=Q(e=>{let{title:t,withOverlay:n,overlayProps:r,withCloseButton:i,closeButtonProps:a,children:o,radius:s,opened:c,stackId:l,zIndex:u,...d}=Z(`Modal`,iJ,e),f=(0,q.use)(tJ),p=!!t||i,m=f&&l?{closeOnEscape:f.currentId===l,trapFocus:f.currentId===l,zIndex:f.getZIndex(l)}:{},h=n===!1?!1:l&&f?f.currentId===l:c;return(0,q.useEffect)(()=>{f&&l&&(c?f.addModal(l,u||lM(`modal`)):f.removeModal(l))},[c,l,u]),(0,J.jsxs)(eJ,{radius:s,opened:c,zIndex:f&&l?f.getZIndex(l):u,...d,...m,children:[n&&(0,J.jsx)(Zq,{visible:h,transitionProps:f&&l?{duration:0}:void 0,...r}),(0,J.jsxs)(Yq,{radius:s,__hidden:f&&l&&c?l!==f.currentId:!1,children:[p&&(0,J.jsxs)(Xq,{children:[t&&(0,J.jsx)(rJ,{children:t}),i&&(0,J.jsx)(Jq,{...a})]}),(0,J.jsx)(qq,{children:o})]})]})});aJ.classes=Kq,aJ.displayName=`@mantine/core/Modal`,aJ.Root=eJ,aJ.Overlay=Zq,aJ.Content=Yq,aJ.Body=qq,aJ.Header=Xq,aJ.Title=rJ,aJ.CloseButton=Jq,aJ.Stack=nJ;var oJ=(0,q.createContext)(null),sJ={root:`m_7cda1cd6`,"root--default":`m_44da308b`,"root--contrast":`m_e3a01f8`,label:`m_1e0e6180`,remove:`m_ae386778`,group:`m_1dcfd90b`},cJ=(0,q.createContext)(null),lJ=HN((e,{gap:t},{size:n})=>({group:{"--pg-gap":t===void 0?fM(n,`pg-gap`):fM(t)}})),uJ=Q(e=>{let t=Z(`PillGroup`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,disabled:l,attributes:u,...d}=t,f=(0,q.use)(oJ)?.size||c||void 0,p=bF({name:`PillGroup`,classes:sJ,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:lJ,stylesCtx:{size:f},rootSelector:`group`});return(0,J.jsx)(cJ,{value:{size:f,disabled:l},children:(0,J.jsx)($,{size:f,...p(`group`),...d})})});uJ.classes=sJ,uJ.varsResolver=lJ,uJ.displayName=`@mantine/core/PillGroup`;var dJ={variant:`default`},fJ=HN((e,{radius:t},{size:n})=>({root:{"--pill-fz":fM(n,`pill-fz`),"--pill-height":fM(n,`pill-height`),"--pill-radius":t===void 0?void 0:mM(t)}})),pJ=Q(e=>{let t=Z(`Pill`,dJ,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,variant:c,children:l,withRemoveButton:u,onRemove:d,removeButtonProps:f,radius:p,size:m,disabled:h,mod:g,attributes:_,...v}=t,y=(0,q.use)(cJ),b=(0,q.use)(oJ),x=m||y?.size||void 0,S=b?.variant===`filled`?`contrast`:c||`default`,C=bF({name:`Pill`,classes:sJ,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:_,vars:s,varsResolver:fJ,stylesCtx:{size:x}});return(0,J.jsxs)($,{component:`span`,variant:S,size:x,...C(`root`,{variant:S}),mod:[{"with-remove":u&&!h,disabled:h||y?.disabled},g],...v,children:[(0,J.jsx)(`span`,{...C(`label`),children:l}),u&&(0,J.jsx)(MV,{variant:`transparent`,radius:p,tabIndex:-1,"aria-hidden":!0,unstyled:o,...f,...C(`remove`,{className:f?.className,style:f?.style}),onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),f?.onMouseDown?.(e)},onClick:e=>{e.stopPropagation(),d?.(),f?.onClick?.(e)}})]})});pJ.classes=sJ,pJ.varsResolver=fJ,pJ.displayName=`@mantine/core/Pill`,pJ.Group=uJ;var mJ={field:`m_45c4369d`},hJ={type:`visible`},gJ=Q(e=>{let t=Z(`PillsInputField`,hJ,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,type:c,disabled:l,id:u,pointer:d,mod:f,attributes:p,ref:m,...h}=t,g=(0,q.use)(oJ),_=(0,q.use)(mU),v=bF({name:`PillsInputField`,classes:mJ,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,rootSelector:`field`}),y=l||g?.disabled;return(0,J.jsx)($,{component:`input`,ref:QM(m,g?.fieldRef),"data-type":c,disabled:y,mod:[{disabled:y,pointer:d},f],...v(`field`),...h,id:_?.inputId||u,"aria-invalid":g?.hasError,"aria-describedby":_?.describedBy,type:`text`,onMouseDown:e=>!d&&e.stopPropagation()})});gJ.classes=mJ,gJ.displayName=`@mantine/core/PillsInputField`;var _J={size:`sm`},vJ=Q(e=>{let{children:t,onMouseDown:n,onClick:r,size:i,disabled:a,__staticSelector:o,error:s,variant:c,...l}=Z(`PillsInput`,_J,e),u=(0,q.useRef)(null);return(0,J.jsx)(oJ,{value:{fieldRef:u,size:i,disabled:a,hasError:!!s,variant:c},children:(0,J.jsx)(NU,{size:i,error:s,variant:c,component:`div`,"data-no-overflow":!0,onMouseDown:e=>{e.preventDefault(),n?.(e),u.current?.focus()},onClick:e=>{e.preventDefault(),e.currentTarget.closest(`fieldset`)?.disabled||(u.current?.focus(),r?.(e))},...l,multiline:!0,disabled:a,__staticSelector:o||`PillsInput`,withAria:!1,children:t})})});vJ.displayName=`@mantine/core/PillsInput`,vJ.classes=NU.classes,vJ.Field=gJ;function yJ(e){return typeof e==`string`?e.trim().toLowerCase():e}function bJ({data:e,value:t}){let n=t.map(yJ);return e.reduce((e,t)=>(sG(t)?e.push({group:t.group,items:t.items.filter(e=>n.indexOf(yJ(e.value))===-1)}):n.indexOf(yJ(t.value))===-1&&e.push(t),e),[])}var xJ={xs:41,sm:50,md:60,lg:72,xl:89},SJ={maxValues:1/0,withCheckIcon:!0,checkIconPosition:`left`,hiddenInputValuesDivider:`,`,clearSearchOnChange:!0,openOnFocus:!0,size:`sm`},CJ=QF(e=>{let t=Z(`MultiSelect`,SJ,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,value:l,defaultValue:u,onChange:d,onKeyDown:f,variant:p,data:m,dropdownOpened:h,defaultDropdownOpened:g,onDropdownOpen:_,onDropdownClose:v,selectFirstOptionOnChange:y,selectFirstOptionOnDropdownOpen:b,onOptionSubmit:x,comboboxProps:S,filter:C,limit:w,withScrollArea:T,maxDropdownHeight:E,searchValue:D,defaultSearchValue:O,onSearchChange:k,readOnly:A,disabled:j,onFocus:M,onBlur:N,radius:P,rightSection:F,rightSectionWidth:ee,rightSectionPointerEvents:I,rightSectionProps:te,leftSection:ne,leftSectionWidth:L,leftSectionPointerEvents:re,leftSectionProps:ie,inputContainer:ae,inputWrapperOrder:oe,withAsterisk:se,labelProps:ce,descriptionProps:le,errorProps:ue,wrapperProps:R,description:de,label:z,error:fe,maxValues:pe,searchable:me,nothingFoundMessage:he,withCheckIcon:ge,withAlignedLabels:_e,checkIconPosition:ve,hidePickedOptions:ye,withErrorStyles:be,name:B,form:xe,id:V,clearable:H,clearSectionMode:Se,clearButtonProps:Ce,hiddenInputProps:we,placeholder:Te,hiddenInputValuesDivider:Ee,required:De,mod:Oe,renderOption:ke,renderPill:Ae,onRemove:je,onClear:Me,onMaxValues:Ne,scrollAreaProps:U,chevronColor:Pe,attributes:Fe,clearSearchOnChange:Ie,openOnFocus:Le,loading:Re,loadingPosition:ze,...Be}=t,Ve=JM(V),He=SW(m),Ue=CW(He),We=(0,q.useRef)({}),Ge=ZW({opened:h,defaultOpened:g,onDropdownOpen:()=>{_?.(),b&&Ge.selectFirstOption()},onDropdownClose:()=>{v?.(),Ge.resetSelectedOption()}}),{styleProps:Ke,rest:{type:qe,autoComplete:Je,...Ye}}=wF(Be),[Xe,Ze]=tN({value:l,defaultValue:u,finalValue:[],onChange:d}),[Qe,$e]=tN({value:D,defaultValue:O,finalValue:``,onChange:k}),et=e=>{$e(e),Ge.resetSelectedOption()},tt=bF({name:`MultiSelect`,classes:{},props:t,classNames:n,styles:a,unstyled:o,attributes:Fe}),{resolvedClassNames:nt,resolvedStyles:rt}=oF({props:t,styles:a,classNames:n}),it=e=>{f?.(e),e.key===` `&&!me&&(e.preventDefault(),Ge.toggleDropdown()),e.key===`Backspace`&&Qe.length===0&&Xe.length>0&&(je?.(Xe[Xe.length-1]),Ze(Xe.slice(0,Xe.length-1)))},at=Xe.map((e,t)=>{let n=Ue[`${e}`]||We.current[`${e}`];return Ae?(0,J.jsx)(q.Fragment,{children:Ae({option:n,value:e,onRemove:()=>{Ze(Xe.filter(t=>e!==t)),je?.(e)},disabled:j})},`${e}-${t}`):(0,J.jsx)(pJ,{withRemoveButton:!A&&!Ue[`${e}`]?.disabled,onRemove:()=>{Ze(Xe.filter(t=>e!==t)),je?.(e)},unstyled:o,disabled:j,...tt(`pill`),children:n?.label||e},`${e}-${t}`)});(0,q.useEffect)(()=>{y&&Ge.selectFirstOption()},[y,Qe]),(0,q.useEffect)(()=>{Xe.forEach(e=>{`${e}`in Ue&&(We.current[`${e}`]=Ue[`${e}`])})},[Ue,Xe]);let ot=(0,J.jsx)(eG.ClearButton,{...Ce,onClear:()=>{Me?.(),Ze([]),et(``)}}),st=bJ({data:He,value:Xe}),ct=H&&Xe.length>0&&!j&&!A,lt=ct?{paddingInlineEnd:xJ[c]??xJ.sm}:void 0;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(eG,{store:Ge,classNames:nt,styles:rt,unstyled:o,size:c,readOnly:A,__staticSelector:`MultiSelect`,attributes:Fe,onOptionSubmit:e=>{x?.(e),Ie&&et(``),Ge.updateSelectedOptionIndex(`selected`),Xe.includes(Ue[`${e}`].value)?(Ze(Xe.filter(t=>t!==Ue[`${e}`].value)),je?.(Ue[`${e}`].value)):Xe.length<pe?Ze([...Xe,Ue[`${e}`].value]):Ne?.()},...S,children:[(0,J.jsx)(eG.DropdownTarget,{children:(0,J.jsx)(vJ,{...Ke,__staticSelector:`MultiSelect`,classNames:nt,styles:rt,unstyled:o,size:c,className:r,style:i,variant:p,disabled:j,radius:P,__defaultRightSection:(0,J.jsx)(eG.Chevron,{size:c,error:fe,unstyled:o,color:Pe}),__clearSection:ot,__clearable:ct,__clearSectionMode:Se,rightSection:F,rightSectionPointerEvents:I||`none`,rightSectionWidth:ee,rightSectionProps:te,leftSection:ne,leftSectionWidth:L,leftSectionPointerEvents:re,leftSectionProps:ie,loading:Re,loadingPosition:ze,inputContainer:ae,inputWrapperOrder:oe,withAsterisk:se,labelProps:ce,descriptionProps:le,errorProps:ue,wrapperProps:R,description:de,label:z,error:fe,withErrorStyles:be,__stylesApiProps:{...t,rightSectionPointerEvents:I||`none`,multiline:!0},pointer:!me,onClick:()=>me?Ge.openDropdown():Ge.toggleDropdown(),"data-expanded":Ge.dropdownOpened||void 0,id:Ve,required:De,mod:Oe,attributes:Fe,children:(0,J.jsxs)(pJ.Group,{attributes:Fe,disabled:j,unstyled:o,...tt(`pillsList`,{style:lt}),children:[at,(0,J.jsx)(eG.EventsTarget,{autoComplete:Je,withExpandedAttribute:!0,children:(0,J.jsx)(vJ.Field,{...Ye,id:Ve,placeholder:Te,type:!me&&!Te?`hidden`:`visible`,...tt(`inputField`),unstyled:o,onFocus:e=>{M?.(e),Le&&me&&Ge.openDropdown()},onBlur:e=>{N?.(e),Ge.closeDropdown(),et(``)},onKeyDown:it,value:Qe,onChange:e=>{et(e.currentTarget.value),me&&Ge.openDropdown(),y&&Ge.selectFirstOption()},disabled:j,readOnly:A||!me,pointer:!me})})]})})}),(0,J.jsx)(pG,{data:ye?st:He,hidden:A||j,filter:C,search:Qe,limit:w,hiddenWhenEmpty:!he,withScrollArea:T,maxDropdownHeight:E,filterOptions:me,value:Xe,checkIconPosition:ve,withCheckIcon:ge,withAlignedLabels:_e,nothingFoundMessage:he,unstyled:o,labelId:z?`${Ve}-label`:void 0,"aria-label":z?void 0:Be[`aria-label`],renderOption:ke,scrollAreaProps:U})]}),(0,J.jsx)(eG.HiddenInput,{name:B,valuesDivider:Ee,value:Xe,form:xe,disabled:j,...we})]})});CJ.classes={...NU.classes,...eG.classes},CJ.displayName=`@mantine/core/MultiSelect`;var wJ={root:`m_a513464`,icon:`m_a4ceffb`,loader:`m_b0920b15`,body:`m_a49ed24`,title:`m_3feedf16`,description:`m_3d733a3a`,closeButton:`m_919a4d88`},TJ={withCloseButton:!0},EJ=HN((e,{radius:t,color:n})=>({root:{"--notification-radius":t===void 0?void 0:mM(t),"--notification-color":n?cP(n,e):void 0}})),DJ=Q(e=>{let t=Z(`Notification`,TJ,e),{className:n,color:r,radius:i,loading:a,withCloseButton:o,withBorder:s,title:c,icon:l,children:u,onClose:d,closeButtonProps:f,classNames:p,style:m,styles:h,unstyled:g,vars:_,mod:v,loaderProps:y,role:b,attributes:x,...S}=t,C=bF({name:`Notification`,classes:wJ,props:t,className:n,style:m,classNames:p,styles:h,unstyled:g,attributes:x,vars:_,varsResolver:EJ});return(0,J.jsxs)($,{...C(`root`),mod:[{"data-with-icon":!!l||a,"data-with-border":s},v],role:b||`alert`,...S,children:[l&&!a&&(0,J.jsx)(`div`,{...C(`icon`),children:l}),a&&(0,J.jsx)(yV,{size:28,color:r,...C(`loader`),...y}),(0,J.jsxs)(`div`,{...C(`body`),children:[c&&(0,J.jsx)(`div`,{...C(`title`),children:c}),(0,J.jsx)($,{...C(`description`),mod:{"data-with-title":!!c},children:u})]}),o&&(0,J.jsx)(MV,{iconSize:16,color:`gray`,...f,unstyled:g,onClick:e=>{f?.onClick?.(e),d?.()},...C(`closeButton`)})]})});DJ.classes=wJ,DJ.varsResolver=EJ,DJ.displayName=`@mantine/core/Notification`;function OJ(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var kJ;(function(e){e.event=`event`,e.props=`prop`})(kJ||={});function AJ(){}function jJ(e){var t,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t&&r.length===t.length&&r.every(function(e,n){return e===t[n]})?n:(t=r,n=e.apply(void 0,r),n)}}function MJ(e){return!!(e||``).match(/\d/)}function NJ(e){return e==null}function PJ(e){return typeof e==`number`&&isNaN(e)}function FJ(e){return NJ(e)||PJ(e)||typeof e==`number`&&!isFinite(e)}function IJ(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,`\\$&`)}function LJ(e){switch(e){case`lakh`:return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case`wan`:return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}function RJ(e,t,n){var r=LJ(n),i=e.search(/[1-9]/);return i=i===-1?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,`$1`+t)}function zJ(e){var t=(0,q.useRef)(e);return t.current=e,(0,q.useRef)(function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return t.current.apply(t,e)}).current}function BJ(e,t){t===void 0&&(t=!0);var n=e[0]===`-`,r=n&&t;e=e.replace(`-`,``);var i=e.split(`.`);return{beforeDecimal:i[0],afterDecimal:i[1]||``,hasNegation:n,addNegation:r}}function VJ(e){if(!e)return e;var t=e[0]===`-`;t&&(e=e.substring(1,e.length));var n=e.split(`.`),r=n[0].replace(/^0+/,``)||`0`,i=n[1]||``;return(t?`-`:``)+r+(i?`.`+i:``)}function HJ(e,t,n){for(var r=``,i=n?`0`:``,a=0;a<=t-1;a++)r+=e[a]||i;return r}function UJ(e,t){return Array(t+1).join(e)}function WJ(e){var t=e+``,n=t[0]===`-`?`-`:``;n&&(t=t.substring(1));var r=t.split(/[eE]/g),i=r[0],a=r[1];if(a=Number(a),!a)return n+i;i=i.replace(`.`,``);var o=1+a,s=i.length;return o<0?i=`0.`+UJ(`0`,Math.abs(o))+i:o>=s?i+=UJ(`0`,o-s):i=(i.substring(0,o)||`0`)+`.`+i.substring(o),n+i}function GJ(e,t,n){if([``,`-`].indexOf(e)!==-1)return e;var r=(e.indexOf(`.`)!==-1||n)&&t,i=BJ(e),a=i.beforeDecimal,o=i.afterDecimal,s=i.hasNegation,c=parseFloat(`0.`+(o||`0`)),l=(o.length<=t?`0.`+o:c.toFixed(t)).split(`.`),u=a;a&&Number(l[0])&&(u=a.split(``).reverse().reduce(function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e},l[0]));var d=HJ(l[1]||``,t,n),f=s?`-`:``,p=r?`.`:``;return``+f+u+p+d}function KJ(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move(`character`,t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var qJ=jJ(function(e,t){for(var n=0,r=0,i=e.length,a=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-r]===t[a-1-r]&&a-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:a-r}}}),JJ=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function YJ(e,t,n){return Math.min(Math.max(e,t),n)}function XJ(e){return Math.max(e.selectionStart,e.selectionEnd)}function ZJ(){return typeof navigator<`u`&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function QJ(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:``}}function $J(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function eY(e,t,n,r,i,a,o){o===void 0&&(o=$J);var s=i.findIndex(function(e){return e}),c=e.slice(0,s);!t&&!n.startsWith(c)&&(t=c,n=c+n,r+=c.length);for(var l=n.length,u=e.length,d={},f=Array(l),p=0;p<l;p++){f[p]=-1;for(var m=0,h=u;m<h;m++)if(o({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:m})&&d[m]!==!0){f[p]=m,d[m]=!0;break}}for(var g=r;g<l&&(f[g]===-1||!a(n[g]));)g++;var _=g===l||f[g]===-1?u:f[g];for(g=r-1;g>0&&f[g]===-1;)g--;var v=g===-1||f[g]===-1?0:f[g]+1;return v>_?_:r-v<_-r?v:_}function tY(e,t,n,r){var i=e.length;if(t=YJ(t,0,i),r===`left`){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=i&&!n[t];)t++;t>i&&(t=n.lastIndexOf(!0))}return t===-1&&(t=i),t}function nY(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(MJ(e[n])||MJ(e[n-1]));return t}function rY(e,t,n,r,i,a){a===void 0&&(a=AJ);var o=zJ(function(e,t){var n,a;return FJ(e)?(a=``,n=``):typeof e==`number`||t?(a=typeof e==`number`?WJ(e):e,n=r(a)):(a=i(e,void 0),n=r(a)),{formattedValue:n,numAsString:a}}),s=(0,q.useState)(function(){return o(NJ(e)?t:e,n)}),c=s[0],l=s[1],u=zJ(function(e,t){e.formattedValue!==c.formattedValue&&l({formattedValue:e.formattedValue,numAsString:e.value}),a(e,t)}),d=e,f=n;NJ(e)&&(d=c.numAsString,f=!0);var p=o(d,f);return(0,q.useMemo)(function(){l(p)},[p.formattedValue]),(0,q.useEffect)(function(){if(!NJ(t)&&NJ(e)&&c.formattedValue!==``){var n=parseFloat(c.numAsString);u({formattedValue:c.formattedValue,value:c.numAsString,floatValue:isNaN(n)?void 0:n},{event:void 0,source:kJ.props})}},[]),[c,u]}function iY(e){return e.replace(/[^0-9]/g,``)}function aY(e){return e}function oY(e){var t=e.type;t===void 0&&(t=`text`);var n=e.displayType;n===void 0&&(n=`input`);var r=e.customInput,i=e.renderText,a=e.getInputRef,o=e.format;o===void 0&&(o=aY);var s=e.removeFormatting;s===void 0&&(s=iY);var c=e.defaultValue,l=e.valueIsNumericString,u=e.onValueChange,d=e.isAllowed,f=e.onChange;f===void 0&&(f=AJ);var p=e.onKeyDown;p===void 0&&(p=AJ);var m=e.onMouseUp;m===void 0&&(m=AJ);var h=e.onFocus;h===void 0&&(h=AJ);var g=e.onBlur;g===void 0&&(g=AJ);var _=e.value,v=e.getCaretBoundary;v===void 0&&(v=nY);var y=e.isValidInputCharacter;y===void 0&&(y=MJ);var b=e.isCharacterSame,x=OJ(e,[`type`,`displayType`,`customInput`,`renderText`,`getInputRef`,`format`,`removeFormatting`,`defaultValue`,`valueIsNumericString`,`onValueChange`,`isAllowed`,`onChange`,`onKeyDown`,`onMouseUp`,`onFocus`,`onBlur`,`value`,`getCaretBoundary`,`isValidInputCharacter`,`isCharacterSame`]),S=rY(_,c,!!l,o,s,u),C=S[0],w=C.formattedValue,T=C.numAsString,E=S[1],D=(0,q.useRef)(),O=(0,q.useRef)({formattedValue:w,numAsString:T}),k=function(e,t){O.current={formattedValue:e.formattedValue,numAsString:e.value},E(e,t)},A=(0,q.useState)(!1),j=A[0],M=A[1],N=(0,q.useRef)(null),P=(0,q.useRef)({setCaretTimeout:null,focusTimeout:null});(0,q.useEffect)(function(){return M(!0),function(){clearTimeout(P.current.setCaretTimeout),clearTimeout(P.current.focusTimeout)}},[]);var F=o,ee=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},I=function(e,t,n){e.selectionStart===0&&e.selectionEnd===e.value.length||(KJ(e,t),P.current.setCaretTimeout=setTimeout(function(){e.value===n&&e.selectionStart!==t&&KJ(e,t)},0))},te=function(e,t,n){return tY(e,t,v(e),n)},ne=function(e,t,n){var r=v(t),i=eY(t,w,e,n,r,y,b);return i=tY(t,i,r),i},L=function(e){var t=e.formattedValue;t===void 0&&(t=``);var n=e.input,r=e.source,i=e.event,a=e.numAsString,o;if(n){var s=e.inputValue||n.value,c=XJ(n);n.value=t,o=ne(s,t,c),o!==void 0&&I(n,o,t)}t!==w&&k(ee(t,a),{event:i,source:r})};(0,q.useEffect)(function(){var e=O.current,t=e.formattedValue,n=e.numAsString;(w!==t||T!==n)&&k(ee(w,T),{event:void 0,source:kJ.props})},[w,T]);var re=N.current?XJ(N.current):void 0;(typeof window<`u`?q.useLayoutEffect:q.useEffect)(function(){var e=N.current;if(w!==O.current.formattedValue&&e){var t=ne(O.current.formattedValue,w,re);e.value=w,I(e,t,w)}},[w]);var ie=function(e,t,n){var r=t.target,i=D.current?JJ(D.current,r.selectionEnd):qJ(w,e),a=Object.assign(Object.assign({},i),{lastValue:w}),o=s(e,a),c=F(o);if(o=s(c,void 0),d&&!d(ee(c,o))){var l=t.target,u=ne(e,w,XJ(l));return l.value=w,I(l,u,w),!1}return L({formattedValue:c,numAsString:o,inputValue:e,event:t,source:n,input:t.target}),!0},ae=function(e,t){t===void 0&&(t=0),D.current={selectionStart:e.selectionStart,selectionEnd:e.selectionEnd+t}},oe=function(e){var t=e.target.value;ie(t,e,kJ.event)&&f(e),D.current=void 0},se=function(e){var t=e.target,n=e.key,r=t.selectionStart,i=t.selectionEnd,a=t.value;a===void 0&&(a=``);var o;n===`ArrowLeft`||n===`Backspace`?o=Math.max(r-1,0):n===`ArrowRight`?o=Math.min(r+1,a.length):n===`Delete`&&(o=r);var s=0;n===`Delete`&&r===i&&(s=1);var c=n===`ArrowLeft`||n===`ArrowRight`;if(o===void 0||r!==i&&!c){p(e),ae(t,s);return}var l=o;c?(l=te(a,o,n===`ArrowLeft`?`left`:`right`),l!==o&&e.preventDefault()):n===`Delete`&&!y(a[o])?l=te(a,o,`right`):n===`Backspace`&&!y(a[o])&&(l=te(a,o,`left`)),l!==o&&I(t,l,a),p(e),ae(t,s)},ce=function(e){var t=e.target,n=function(){var e=t.selectionStart,n=t.selectionEnd,r=t.value;if(r===void 0&&(r=``),e===n){var i=te(r,e);i!==e&&I(t,i,r)}};n(),requestAnimationFrame(function(){n()}),m(e),ae(t)},le=function(e){e.persist&&e.persist();var t=e.target,n=e.currentTarget;N.current=t,P.current.focusTimeout=setTimeout(function(){var r=t.selectionStart,i=t.selectionEnd,a=t.value;a===void 0&&(a=``);var o=te(a,r);o!==r&&!(r===0&&i===a.length)&&I(t,o,a),h(Object.assign(Object.assign({},e),{currentTarget:n}))},0)},ue=function(e){N.current=null,clearTimeout(P.current.focusTimeout),clearTimeout(P.current.setCaretTimeout),g(e)},R=j&&ZJ()?`numeric`:void 0,de=Object.assign({inputMode:R},x,{type:t,value:w,onChange:oe,onKeyDown:se,onMouseUp:ce,onFocus:le,onBlur:ue});if(n===`text`)return i?q.createElement(q.Fragment,null,i(w,x)||null):q.createElement(`span`,Object.assign({},x,{ref:a}),w);if(r){var z=r;return q.createElement(z,Object.assign({},de,{ref:a}))}return q.createElement(`input`,Object.assign({},de,{ref:a}))}function sY(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,i=t.prefix;i===void 0&&(i=``);var a=t.suffix;a===void 0&&(a=``);var o=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s=`thousand`),e===``||e===`-`)return e;var c=cY(t),l=c.thousandSeparator,u=c.decimalSeparator,d=n!==0&&e.indexOf(`.`)!==-1||n&&r,f=BJ(e,o),p=f.beforeDecimal,m=f.afterDecimal,h=f.addNegation;return n!==void 0&&(m=HJ(m,n,!!r)),l&&(p=RJ(p,l,s)),i&&(p=i+p),a&&(m+=a),h&&(p=`-`+p),e=p+(d&&u||``)+m,e}function cY(e){var t=e.decimalSeparator;t===void 0&&(t=`.`);var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return n===!0&&(n=`,`),r||=[t,`.`],{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function lY(e,t){e===void 0&&(e=``);var n=RegExp(`(-)`),r=RegExp(`(-)(.)*(-)`),i=n.test(e),a=r.test(e);return e=e.replace(/-/g,``),i&&!a&&t&&(e=`-`+e),e}function uY(e,t){return RegExp(`(^-)|[0-9]|`+IJ(e),t?`g`:void 0)}function dY(e,t,n){return e===``?!0:!t?.match(/\d/)&&!n?.match(/\d/)&&typeof e==`string`&&!isNaN(Number(e))}function fY(e,t,n){var r;t===void 0&&(t=QJ(e));var i=n.allowNegative,a=n.prefix;a===void 0&&(a=``);var o=n.suffix;o===void 0&&(o=``);var s=n.decimalScale,c=t.from,l=t.to,u=l.start,d=l.end,f=cY(n),p=f.allowedDecimalSeparators,m=f.decimalSeparator,h=e[d]===m;if(MJ(e)&&(e===a||e===o)&&t.lastValue===``)return e;if(d-u===1&&p.indexOf(e[u])!==-1){var g=s===0?``:m;e=e.substring(0,u)+g+e.substring(u+1,e.length)}var _=function(e,t,n){var r=!1,i=!1;a.startsWith(`-`)?r=!1:e.startsWith(`--`)?(r=!1,i=!0):o.startsWith(`-`)&&e.length===o.length?r=!1:e[0]===`-`&&(r=!0);var s=+!!r;return i&&(s=2),s&&(e=e.substring(s),t-=s,n-=s),{value:e,start:t,end:n,hasNegation:r}},v=_(e,u,d),y=v.hasNegation;r=v,e=r.value,u=r.start,d=r.end;var b=_(t.lastValue,c.start,c.end),x=b.start,S=b.end,C=b.value,w=e.substring(u,d);e.length&&C.length&&(x>C.length-o.length||S<a.length)&&!(w&&o.startsWith(w))&&(e=C);var T=0;e.startsWith(a)?T+=a.length:u<a.length&&(T=u),e=e.substring(T),d-=T;var E=e.length,D=e.length-o.length;e.endsWith(o)?E=D:(d>D||d>e.length-o.length)&&(E=d),e=e.substring(0,E),e=lY(y?`-`+e:e,i),e=(e.match(uY(m,!0))||[]).join(``);var O=e.indexOf(m);e=e.replace(new RegExp(IJ(m),`g`),function(e,t){return t===O?`.`:``});var k=BJ(e,i),A=k.beforeDecimal,j=k.afterDecimal,M=k.addNegation;return l.end-l.start<c.end-c.start&&A===``&&h&&!parseFloat(j)&&(e=M?`-`:``),e}function pY(e,t){var n=t.prefix;n===void 0&&(n=``);var r=t.suffix;r===void 0&&(r=``);var i=Array.from({length:e.length+1}).map(function(){return!0}),a=e[0]===`-`;i.fill(!1,0,Math.min(n.length+ +!!a,e.length));var o=e.length;return i.fill(!1,o-r.length+1,o+1),i}function mY(e){var t=cY(e),n=t.thousandSeparator,r=t.decimalSeparator,i=e.prefix;i===void 0&&(i=``);var a=e.allowNegative;if(a===void 0&&(a=!0),n===r)throw Error(`
61
+ Decimal separator can't be same as thousand separator.
62
+ thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = ",")
63
+ decimalSeparator: `+r+` (default value for decimalSeparator is .)
64
+ `);return i.startsWith(`-`)&&a&&(console.error(`
65
+ Prefix can't start with '-' when allowNegative is true.
66
+ prefix: `+i+`
67
+ allowNegative: `+a+`
68
+ `),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function hY(e){e=mY(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=AJ);var a=e.onBlur;a===void 0&&(a=AJ);var o=e.thousandSeparator,s=e.decimalScale,c=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l=``);var u=e.defaultValue,d=e.value,f=e.valueIsNumericString,p=e.onValueChange,m=OJ(e,[`decimalSeparator`,`allowedDecimalSeparators`,`thousandsGroupStyle`,`suffix`,`allowNegative`,`allowLeadingZeros`,`onKeyDown`,`onBlur`,`thousandSeparator`,`decimalScale`,`fixedDecimalScale`,`prefix`,`defaultValue`,`value`,`valueIsNumericString`,`onValueChange`]),h=cY(e),g=h.decimalSeparator,_=h.allowedDecimalSeparators,v=function(t){return sY(t,e)},y=function(t,n){return fY(t,n,e)},b=NJ(d)?u:d,x=f??dY(b,l,t);NJ(d)?NJ(u)||(x||=typeof u==`number`):x||=typeof d==`number`;var S=function(e){return FJ(e)?e:(typeof e==`number`&&(e=WJ(e)),x&&typeof s==`number`?GJ(e,s,!!c):e)},C=rY(S(d),S(u),!!x,v,y,p),w=C[0],T=w.numAsString,E=w.formattedValue,D=C[1];return Object.assign(Object.assign({},m),{value:E,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===g?!0:MJ(e)},isCharacterSame:function(e){var t=e.currentValue,n=e.lastValue,r=e.formattedValue,i=e.currentValueIndex,a=e.formattedValueIndex,o=t[i],u=r[a],f=qJ(n,t).to,p=function(e){return y(e).indexOf(`.`)+l.length};return d===0&&c&&s&&t[f.start]===g&&p(t)<i&&p(r)>a?!1:i>=f.start&&i<f.end&&_&&_.includes(o)&&u===g?!0:o===u},onValueChange:D,format:v,removeFormatting:y,getCaretBoundary:function(t){return pY(t,e)},onKeyDown:function(e){var t=e.target,r=e.key,a=t.selectionStart,u=t.selectionEnd,d=t.value;if(d===void 0&&(d=``),(r===`Backspace`||r===`Delete`)&&u<l.length&&d!==`-`){e.preventDefault();return}if(a!==u){i(e);return}r===`Backspace`&&d[0]===`-`&&a===l.length+1&&n&&KJ(t,1),s&&c&&(r===`Backspace`&&d[a-1]===g?(KJ(t,a-1),e.preventDefault()):r===`Delete`&&d[a]===g&&e.preventDefault()),_?.includes(r)&&d[a]===g&&KJ(t,a+1);var f=o===!0?`,`:o;r===`Backspace`&&d[a-1]===f&&KJ(t,a-1),r===`Delete`&&d[a]===f&&KJ(t,a+1),i(e)},onBlur:function(t){var n=T;n.match(/\d/g)||(n=``),r||(n=VJ(n)),c&&s&&(n=GJ(n,s,c)),n!==T&&D({formattedValue:sY(n,e),value:n,floatValue:parseFloat(n)},{event:t,source:kJ.event}),a(t)}})}function gY(e){var t=hY(e);return q.createElement(oY,Object.assign({},t))}function _Y({direction:e,style:t,...n}){return(0,J.jsx)(`svg`,{style:{width:`var(--ni-chevron-size)`,height:`var(--ni-chevron-size)`,transform:e===`up`?`rotate(180deg)`:void 0,...t},viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...n,children:(0,J.jsx)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}var vY={root:`m_e2f5cd4e`,controls:`m_95e17d22`,control:`m_80b4b171`},yY=/^(0\.0*|-0(\.0*)?)$/,bY=/^-?0\d+(\.\d+)?\.?$/,xY=/\.\d*0$/,SY=/^-?\d+\.$/;function CY(e){return typeof e==`string`&&e!==``&&!Number.isNaN(Number(e))}function wY(e){return typeof e==`bigint`}function TY(e){return typeof e==`number`?e<2**53-1:e===``||CY(e)&&Number(e)<2**53-1}function EY(e,t){return e===``||e===`-`||!t&&e.startsWith(`-`)?!1:/^-?\d+$/.test(e)}function DY(e,t){return typeof e==`bigint`?!0:e===``||EY(e,t)}function OY(e){if(!/^-?\d+$/.test(e))return null;try{return BigInt(e)}catch{return null}}function kY(e){if(typeof e==`bigint`)return e;if(typeof e==`number`&&Number.isFinite(e)&&Number.isInteger(e))return BigInt(e)}function AY(e,t,n){return t!==void 0&&e<t?t:n!==void 0&&e>n?n:e}function jY(e){return e.toString().replace(`.`,``).length}function MY(e,t){return(typeof e==`number`?e<2**53-1:!Number.isNaN(Number(e)))&&!Number.isNaN(e)&&jY(t)<14&&t!==``}function NY(e,t,n){return e===void 0?!0:(t===void 0||e>=t)&&(n===void 0||e<=n)}var PY={size:`sm`,step:1,clampBehavior:`blur`,allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0,allowedDecimalSeparators:[`.`,`,`]},FY=HN((e,{size:t})=>({controls:{"--ni-chevron-size":fM(t,`ni-chevron-size`)}}));function IY(e,t,n){let r=e.toString(),i=SY.test(r),a=r.replace(/^0+(?=\d)/,``),o=parseFloat(a);if(Number.isNaN(o))return a;if(o>2**53-1)return t===void 0?a:t;let s=CM(o,n,t);return i?`${s.toString().replace(/^0+(?=\d)/,``)}.`:s}function LY(e,t){if(e===``||e===`-`)return e;let n=OY(e);return n===null?e:t.clampBehavior===`blur`?AY(n,t.min,t.max):n}var RY=QF(e=>{let t=Z(`NumberInput`,PY,e),{className:n,classNames:r,styles:i,unstyled:a,vars:o,onChange:s,onValueChange:c,value:l,defaultValue:u,max:d,min:f,step:p,hideControls:m,rightSection:h,isAllowed:g,clampBehavior:_,onBlur:v,allowDecimal:y,decimalScale:b,onKeyDown:x,onKeyDownCapture:S,handlersRef:C,startValue:w,disabled:T,rightSectionPointerEvents:E,allowNegative:D,readOnly:O,size:k,rightSectionWidth:A,stepHoldInterval:j,stepHoldDelay:M,allowLeadingZeros:N,withKeyboardEvents:P,trimLeadingZeroesOnBlur:F,allowedDecimalSeparators:ee,selectAllOnFocus:I,onMinReached:te,onMaxReached:ne,onFocus:L,attributes:re,ref:ie,...ae}=t,oe=D??!0,se=N??!0,ce=bF({name:`NumberInput`,classes:vY,props:t,classNames:r,styles:i,unstyled:a,attributes:re,vars:o,varsResolver:FY}),{resolvedClassNames:le,resolvedStyles:ue}=oF({classNames:r,styles:i,props:t}),R=(0,q.useRef)(wY(l)||wY(u)?`bigint`:`number`);wY(l)?R.current=`bigint`:typeof l==`number`&&(R.current=`number`);let de=R.current===`bigint`,[z,fe]=tN({value:l,defaultValue:u,finalValue:``,onChange:s}),pe=M!==void 0&&j!==void 0,me=(0,q.useRef)(null),he=(0,q.useRef)(null),ge=(0,q.useRef)(0),_e=typeof f==`number`?f:void 0,ve=typeof d==`number`?d:void 0,ye=typeof p==`number`?p:PY.step,be=typeof w==`number`?w:PY.startValue,B=kY(f),xe=kY(d),V=kY(p)??BigInt(1),H=kY(w)??BigInt(0),Se=e=>!EY(e,oe)||se&&bY.test(e)?e:OY(e)??e,Ce=e=>{let t=Number(e);return Number.isSafeInteger(t)?t:void 0},we=(e,t)=>{t.source===`event`&&fe(de?Se(e.value):MY(e.floatValue,e.value)&&!yY.test(e.value)&&!(se&&bY.test(e.value))&&!xY.test(e.value)&&!SY.test(e.value)?e.floatValue:e.value),c?.(e,t)},Te=e=>{let t=String(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0},Ee=e=>{me.current&&e!==void 0&&me.current.setSelectionRange(e,e)},De=(0,q.useRef)(uM);De.current=()=>{if(de){if(!DY(z,oe))return;let e,t=z;if(typeof t==`bigint`){let n=t+V;xe!==void 0&&n>xe&&ne?.(),e=xe!==void 0&&n>xe?xe:n}else if(typeof t==`string`&&t!==``){let n=OY(t);if(n===null)return;let r=n+V;xe!==void 0&&r>xe&&ne?.(),e=xe!==void 0&&r>xe?xe:r}else e=AY(H,B,xe);let n=e.toString();fe(e),c?.({floatValue:Ce(e),formattedValue:n,value:n},{source:`increment`}),setTimeout(()=>Ee(me.current?.value.length),0);return}if(!TY(z))return;let e,t=Te(z),n=Te(ye),r=Math.max(t,n),i=10**r;if(!CY(z)&&(typeof z!=`number`||Number.isNaN(z)))e=CM(be,_e,ve);else if(ve!==void 0){let t=(Math.round(Number(z)*i)+Math.round(ye*i))/i;t>ve&&ne?.(),e=t<=ve?t:ve}else e=(Math.round(Number(z)*i)+Math.round(ye*i))/i;let a=e.toFixed(r);fe(parseFloat(a)),c?.({floatValue:parseFloat(a),formattedValue:a,value:a},{source:`increment`}),setTimeout(()=>Ee(me.current?.value.length),0)};let Oe=(0,q.useRef)(uM);Oe.current=()=>{if(de){if(!DY(z,oe))return;let e,t=B===void 0?oe?void 0:BigInt(0):B,n=z;if(typeof n==`bigint`){let r=n-V;t!==void 0&&r<t&&te?.(),e=t!==void 0&&r<t?t:r}else if(typeof n==`string`&&n!==``){let r=OY(n);if(r===null)return;let i=r-V;t!==void 0&&i<t&&te?.(),e=t!==void 0&&i<t?t:i}else e=AY(H,t,xe);let r=e.toString();fe(e),c?.({floatValue:Ce(e),formattedValue:r,value:r},{source:`decrement`}),setTimeout(()=>Ee(me.current?.value.length),0);return}if(!TY(z))return;let e,t=_e===void 0?oe?-(2**53-1):0:_e,n=Te(z),r=Te(ye),i=Math.max(n,r),a=10**i;if(!CY(z)&&typeof z!=`number`||Number.isNaN(z))e=CM(be,t,ve);else{let n=(Math.round(Number(z)*a)-Math.round(ye*a))/a;t!==void 0&&n<t&&te?.(),e=t!==void 0&&n<t?t:n}let o=e.toFixed(i);fe(parseFloat(o)),c?.({floatValue:parseFloat(o),formattedValue:o,value:o},{source:`decrement`}),setTimeout(()=>Ee(me.current?.value.length),0)};let ke=e=>{let t=e.clipboardData.getData(`text`),n=ae.decimalSeparator||`.`,r=(ee||[`.`,`,`]).filter(e=>e!==n);if(r.some(e=>t.includes(e))){e.preventDefault();let i=t;r.forEach(e=>{i=i.split(e).join(n)});let a=me.current;if(a){let e=a.selectionStart??0,t=a.selectionEnd??0,n=a.value,r=n.substring(0,e)+i+n.substring(t);(Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,`value`)?.set)?.call(a,r),a.dispatchEvent(new Event(`change`,{bubbles:!0}));let o=e+i.length;setTimeout(()=>Ee(o),0)}}ae.onPaste?.(e)},Ae=e=>{x?.(e),!(O||!P)&&(e.key===`ArrowUp`&&(e.preventDefault(),De.current?.()),e.key===`ArrowDown`&&(e.preventDefault(),Oe.current?.()))},je=e=>{if(S?.(e),e.key===`Backspace`){let t=me.current;t&&t.selectionStart===0&&t.selectionStart===t.selectionEnd&&(e.preventDefault(),window.setTimeout(()=>Ee(0),0))}},Me=e=>{I&&setTimeout(()=>e.currentTarget.select(),0),L?.(e)},Ne=e=>{let t=z;de?(_===`blur`&&typeof t==`bigint`&&(t=AY(t,B,xe)),F&&typeof t==`string`&&(t=LY(t,{min:B,max:xe,clampBehavior:_}))):(_===`blur`&&typeof t==`number`&&(t=CM(t,_e,ve)),F&&typeof t==`string`&&Te(t)<15&&(t=IY(t,ve,_e))),z!==t&&fe(t),v?.(e)};XM(C,{increment:De.current,decrement:Oe.current});let U=e=>{e?De.current?.():Oe.current?.(),ge.current+=1},Pe=e=>{if(U(e),pe){let t=typeof j==`number`?j:j(ge.current);he.current=window.setTimeout(()=>Pe(e),t)}},Fe=(e,t)=>{e.preventDefault(),me.current?.focus(),U(t),pe&&(he.current=window.setTimeout(()=>Pe(t),M))},Ie=()=>{he.current&&window.clearTimeout(he.current),he.current=null,ge.current=0},Le=(0,J.jsxs)(`div`,{...ce(`controls`),children:[(0,J.jsx)(SB,{...ce(`control`),tabIndex:-1,"aria-hidden":!0,disabled:T||typeof z==`number`&&ve!==void 0&&z>=ve||typeof z==`bigint`&&xe!==void 0&&z>=xe,mod:{direction:`up`},onMouseDown:e=>e.preventDefault(),onPointerDown:e=>{Fe(e,!0)},onPointerUp:Ie,onPointerLeave:Ie,children:(0,J.jsx)(_Y,{direction:`up`})}),(0,J.jsx)(SB,{...ce(`control`),tabIndex:-1,"aria-hidden":!0,disabled:T||typeof z==`number`&&_e!==void 0&&z<=_e||typeof z==`bigint`&&B!==void 0&&z<=B,mod:{direction:`down`},onMouseDown:e=>e.preventDefault(),onPointerDown:e=>{Fe(e,!1)},onPointerUp:Ie,onPointerLeave:Ie,children:(0,J.jsx)(_Y,{direction:`down`})})]});return(0,J.jsx)(NU,{component:gY,allowNegative:D,className:WN(vY.root,n),size:k,...ae,inputMode:de?`numeric`:`decimal`,readOnly:O,disabled:T,value:typeof z==`bigint`?z.toString():z,getInputRef:QM(ie,me),onValueChange:we,rightSection:m||O||!(de?DY(z,oe):TY(z))?h:h||Le,classNames:le,styles:ue,unstyled:a,__staticSelector:`NumberInput`,decimalScale:de?0:y?b:0,onPaste:ke,onFocus:Me,onKeyDown:Ae,onKeyDownCapture:je,rightSectionPointerEvents:E??(T?`none`:void 0),rightSectionWidth:A??`var(--ni-right-section-width-${k||`sm`})`,allowLeadingZeros:N,allowedDecimalSeparators:ee,onBlur:Ne,attributes:re,isAllowed:e=>{if(!(!g||g(e)))return!1;if(_!==`strict`)return!0;if(!de)return NY(e.floatValue,_e,ve);if(e.value===``||e.value===`-`)return!0;let t=OY(e.value);return t===null?!0:(B===void 0||t>=B)&&(xe===void 0||t<=xe)}})});RY.classes={...NU.classes,...vY},RY.varsResolver=FY,RY.displayName=`@mantine/core/NumberInput`;function zY({reveal:e}){return(0,J.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 256 256`,style:{width:`var(--psi-icon-size)`,height:`var(--psi-icon-size)`},children:e?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`path`,{fill:`none`,d:`M0 0h256v256H0z`}),(0,J.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`16`,d:`M48 40l160 176M154.91 157.6a40 40 0 01-53.82-59.2M135.53 88.71a40 40 0 0132.3 35.53`}),(0,J.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`16`,d:`M208.61 169.1C230.41 149.58 240 128 240 128s-32-72-112-72a126 126 0 00-20.68 1.68M74 68.6C33.23 89.24 16 128 16 128s32 72 112 72a118.05 118.05 0 0054-12.6`})]}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`path`,{fill:`none`,d:`M0 0h256v256H0z`}),(0,J.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`16`,d:`M128 56c-80 0-112 72-112 72s32 72 112 72 112-72 112-72-32-72-112-72z`}),(0,J.jsx)(`circle`,{cx:`128`,cy:`128`,r:`40`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`16`})]})})}var BY={root:`m_f61ca620`,input:`m_ccf8da4c`,innerInput:`m_f2d85dd2`,visibilityToggle:`m_b1072d44`},VY={visibilityToggleIcon:zY,size:`sm`},HY=HN((e,{size:t})=>({root:{"--psi-icon-size":fM(t,`psi-icon-size`),"--psi-button-size":fM(t,`psi-button-size`)}})),UY=Q(e=>{let t=Z(`PasswordInput`,VY,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,required:c,error:l,leftSection:u,disabled:d,id:f,variant:p,inputContainer:m,description:h,label:g,size:_,errorProps:v,descriptionProps:y,labelProps:b,withAsterisk:x,inputWrapperOrder:S,wrapperProps:C,radius:w,rightSection:T,rightSectionWidth:E,rightSectionPointerEvents:D,leftSectionWidth:O,visible:k,defaultVisible:A,onVisibilityChange:j,visibilityToggleIcon:M,visibilityToggleButtonProps:N,rightSectionProps:P,leftSectionProps:F,leftSectionPointerEvents:ee,withErrorStyles:I,mod:te,attributes:ne,...L}=t,re=JM(f),[ie,ae]=tN({value:k,defaultValue:A,finalValue:!1,onChange:j}),oe=()=>ae(!ie),se=bF({name:`PasswordInput`,classes:BY,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:ne,vars:s,varsResolver:HY}),{resolvedClassNames:ce,resolvedStyles:le}=oF({classNames:n,styles:a,props:t}),{styleProps:ue,rest:R}=wF(L),de=v?.id||`${re}-error`,z=y?.id||`${re}-description`,fe=`${l&&typeof l!=`boolean`?de:``} ${h?z:``}`,pe=fe.trim().length>0?fe.trim():void 0,me=(0,J.jsx)(DV,{...se(`visibilityToggle`),disabled:d,radius:w,"aria-pressed":ie,tabIndex:-1,"aria-label":`Toggle password visibility`,...N,variant:N?.variant??`subtle`,color:`gray`,unstyled:o,onTouchEnd:e=>{e.preventDefault(),N?.onTouchEnd?.(e),oe()},onMouseDown:e=>{e.preventDefault(),N?.onMouseDown?.(e),oe()},onKeyDown:e=>{N?.onKeyDown?.(e),e.key===` `&&(e.preventDefault(),oe())},children:(0,J.jsx)(M,{reveal:ie})});return(0,J.jsx)(AU.Wrapper,{required:c,id:re,label:g,error:l,description:h,size:_,classNames:ce,styles:le,__staticSelector:`PasswordInput`,__stylesApiProps:t,unstyled:o,withAsterisk:x,inputWrapperOrder:S,inputContainer:m,variant:p,labelProps:{...b,htmlFor:re},descriptionProps:{...y,id:z},errorProps:{...v,id:de},mod:te,attributes:ne,...se(`root`),...ue,...C,children:(0,J.jsx)(AU,{component:`div`,error:l,leftSection:u,size:_,classNames:{...ce,input:WN(BY.input,ce.input)},styles:le,radius:w,disabled:d,__staticSelector:`PasswordInput`,__stylesApiProps:t,rightSectionWidth:E,rightSection:T??me,variant:p,unstyled:o,leftSectionWidth:O,rightSectionPointerEvents:D||`all`,rightSectionProps:P,leftSectionProps:F,leftSectionPointerEvents:ee,withAria:!1,withErrorStyles:I,attributes:ne,children:(0,J.jsx)(`input`,{required:c,"data-invalid":!!l||void 0,"data-with-left-section":!!u||void 0,...se(`innerInput`),disabled:d,id:re,...R,"aria-describedby":pe,autoComplete:R.autoComplete||`off`,type:ie?`text`:`password`})})})});UY.classes={...NU.classes,...BY},UY.varsResolver=HY,UY.displayName=`@mantine/core/PasswordInput`;var[WY,GY]=nM(`Progress.Root component was not found in tree`),KY={root:`m_db6d6462`,section:`m_2242eb65`,"stripes-animation":`m_81a374bd`,"stripes-animation-vertical":`m_e0fb7a86`,label:`m_91e40b74`},qY=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`ProgressLabel`,null,e);return(0,J.jsx)($,{...GY().getStyles(`label`,{className:n,style:r,classNames:t,styles:i}),...o})});qY.classes=KY,qY.displayName=`@mantine/core/ProgressLabel`;var JY=HN((e,{size:t,radius:n,transitionDuration:r})=>({root:{"--progress-size":fM(t,`progress-size`),"--progress-radius":n===void 0?void 0:mM(n),"--progress-transition-duration":typeof r==`number`?`${r}ms`:void 0}})),YY=Q(e=>{let t=Z(`ProgressRoot`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,autoContrast:c,transitionDuration:l,orientation:u,attributes:d,mod:f,...p}=t,m=bF({name:`Progress`,classes:KY,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:JY});return(0,J.jsx)(WY,{value:{getStyles:m,autoContrast:c},children:(0,J.jsx)($,{mod:[{orientation:u},f],...m(`root`),...p})})});YY.classes=KY,YY.varsResolver=JY,YY.displayName=`@mantine/core/ProgressRoot`;var XY={withAria:!0},ZY=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,value:o,withAria:s,color:c,striped:l,animated:u,mod:d,...f}=Z(`ProgressSection`,XY,e),p=GY(),m=UP(),h=s?{role:`progressbar`,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":o,"aria-valuetext":`${o}%`}:{};return(0,J.jsx)($,{...p.getStyles(`section`,{className:n,classNames:t,styles:i,style:r}),...f,...h,mod:[{striped:l||u,animated:u},d],__vars:{"--progress-section-size":`${o}%`,"--progress-section-color":cP(c,m),"--progress-label-color":gP(p.autoContrast,m)?mP({color:c,theme:m,autoContrast:p.autoContrast}):void 0}})});ZY.classes=KY,ZY.displayName=`@mantine/core/ProgressSection`;var QY=Q(e=>{let t=Z(`Progress`,null,e),{value:n,classNames:r,styles:i,vars:a,color:o,striped:s,animated:c,"aria-label":l,...u}=t,{resolvedClassNames:d,resolvedStyles:f}=oF({classNames:r,styles:i,props:t});return(0,J.jsx)(YY,{classNames:d,styles:f,vars:a,...u,children:(0,J.jsx)(ZY,{value:n,color:o,striped:s,animated:c,"aria-label":l})})});QY.classes=KY,QY.displayName=`@mantine/core/Progress`,QY.Section=ZY,QY.Root=YY,QY.Label=qY;function $Y({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,q.useState)(n),a=(0,q.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=lB({placement:t,middleware:[yz({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,q.useCallback)(({clientX:e,clientY:t})=>{l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,q.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=cL(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var eX={tooltip:`m_1b3c8819`,arrow:`m_f898399f`},tX={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:lM(`popover`)},nX=HN((e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:mM(t),"--tooltip-bg":n?cP(n,e):void 0,"--tooltip-color":n?`var(--mantine-color-white)`:void 0}})),rX=Q(e=>{let t=Z(`TooltipFloating`,tX,e),{children:n,refProp:r,withinPortal:i,style:a,className:o,classNames:s,styles:c,unstyled:l,radius:u,color:d,label:f,offset:p,position:m,multiline:h,zIndex:g,disabled:_,defaultOpened:v,variant:y,vars:b,portalProps:x,attributes:S,ref:C,...w}=t,T=UP(),E=bF({name:`TooltipFloating`,props:t,classes:eX,className:o,style:a,classNames:s,styles:c,unstyled:l,attributes:S,rootSelector:`tooltip`,vars:b,varsResolver:nX}),{handleMouseMove:D,x:O,y:k,opened:A,boundaryRef:j,floating:M,setOpened:N}=$Y({offset:p,position:m,defaultOpened:v}),P=VN(n);if(!P)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let F=QM(j,IN(P),C),ee=P.props,I=e=>{ee.onMouseEnter?.(e),D(e),N(!0)},te=e=>{ee.onMouseLeave?.(e),N(!1)};return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(UB,{...x,withinPortal:i,children:(0,J.jsx)($,{...w,...E(`tooltip`,{style:{...JF(a,T),zIndex:g,display:!_&&A?`block`:`none`,top:(k&&Math.round(k))??``,left:(O&&Math.round(O))??``}}),variant:y,ref:M,mod:{multiline:h},children:f})}),(0,q.cloneElement)(P,{...ee,[r]:F,onMouseEnter:I,onMouseLeave:te})]})});rX.classes=eX,rX.varsResolver=nX,rX.displayName=`@mantine/core/TooltipFloating`;var iX=(0,q.createContext)({withinGroup:!1}),aX={openDelay:0,closeDelay:0};function oX(e){let{openDelay:t,closeDelay:n,children:r}=Z(`TooltipGroup`,aX,e);return(0,J.jsx)(iX,{value:{withinGroup:!0},children:(0,J.jsx)(nB,{delay:{open:t,close:n},children:r})})}oX.displayName=`@mantine/core/TooltipGroup`,oX.extend=e=>e;function sX(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function cX(e){let t=sX(e.middlewares),n=[vz(e.offset)];return t.shift&&n.push(yz(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?xz():xz(t.flip)),n.push(Tz({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?wz():wz(t.inline)):e.inline&&n.push(wz()),n}function lX(e){let[t,n]=(0,q.useState)(e.defaultOpened),r=typeof e.opened==`boolean`?e.opened:t,i=(0,q.use)(iX).withinGroup,a=JM(),o=(0,q.useCallback)(e=>{n(e),e&&g(a)},[a]),{x:s,y:c,context:l,refs:u,placement:d,middlewareData:{arrow:{x:f,y:p}={}}}=lB({strategy:e.strategy,placement:e.position,open:r,onOpenChange:o,middleware:cX(e),whileElementsMounted:tz}),{delay:m,currentId:h,setCurrentId:g}=rB(l,{id:a}),{getReferenceProps:_,getFloatingProps:v}=pB([Qz(l,{enabled:e.events?.hover,delay:i?m:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch}),dB(l,{enabled:e.events?.focus,visibleOnly:!0}),hB(l,{role:`tooltip`}),sB(l,{enabled:e.opened===void 0})]);PM(()=>{e.onPositionChange?.(d)},[d]);let y=r&&h&&h!==a;return{x:s,y:c,arrowX:f,arrowY:p,reference:u.setReference,floating:u.setFloating,getFloatingProps:v,getReferenceProps:_,isGroupPhase:y,opened:r,placement:d}}var uX={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:lM(`popover`),middlewares:{flip:!0,shift:!0,inline:!1}},dX=HN((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:mM(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),fX=Q(e=>{let t=Z(`Tooltip`,uX,e),{children:n,position:r,refProp:i,label:a,openDelay:o,closeDelay:s,onPositionChange:c,opened:l,defaultOpened:u,withinPortal:d,radius:f,color:p,classNames:m,styles:h,unstyled:g,style:_,className:v,withArrow:y,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,offset:w,transitionProps:T,multiline:E,events:D,zIndex:O,disabled:k,onClick:A,onMouseEnter:j,onMouseLeave:M,inline:N,variant:P,keepMounted:F,vars:ee,portalProps:I,mod:te,floatingStrategy:ne,middlewares:L,autoContrast:re,attributes:ie,target:ae,ref:oe,...se}=t,{dir:ce}=sI(),le=(0,q.useRef)(null),ue=lX({position:NB(ce,r),closeDelay:s,openDelay:o,onPositionChange:c,opened:l,defaultOpened:u,events:D,arrowRef:le,arrowOffset:x,offset:typeof w==`number`?w+(y?b/2:0):w,inline:N,strategy:ne,middlewares:L});(0,q.useEffect)(()=>{let e=ae instanceof HTMLElement?ae:typeof ae==`string`?document.querySelector(ae):ae?.current||null;e&&ue.reference(e)},[ae,ue]);let R=bF({name:`Tooltip`,props:t,classes:eX,className:v,style:_,classNames:m,styles:h,unstyled:g,attributes:ie,rootSelector:`tooltip`,vars:ee,varsResolver:dX}),de=VN(n);if(!ae&&!de)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let z=R(`tooltip`);if(ae){let e=ZB(T,{duration:100,transition:`fade`});return(0,J.jsx)(J.Fragment,{children:(0,J.jsx)(UB,{...I,withinPortal:d,children:(0,J.jsx)(YB,{...e,keepMounted:F,mounted:!k&&!!ue.opened,duration:ue.isGroupPhase?10:e.duration,children:e=>(0,J.jsxs)($,{...se,"data-fixed":ne===`fixed`||void 0,variant:P,mod:[{multiline:E},te],...z,...ue.getFloatingProps({ref:ue.floating,className:z.className,style:{...z.style,...e,zIndex:O,top:ue.y??0,left:ue.x??0}}),children:[a,(0,J.jsx)(MB,{ref:le,arrowX:ue.arrowX,arrowY:ue.arrowY,visible:y,position:ue.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...R(`arrow`)})]})})})})}let fe=de.props,pe=QM(ue.reference,IN(de),oe),me=ZB(T,{duration:100,transition:`fade`});return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(UB,{...I,withinPortal:d,children:(0,J.jsx)(YB,{...me,keepMounted:F,mounted:!k&&!!ue.opened,duration:ue.isGroupPhase?10:me.duration,children:e=>(0,J.jsxs)($,{...se,"data-fixed":ne===`fixed`||void 0,variant:P,mod:[{multiline:E},te],...ue.getFloatingProps({ref:ue.floating,className:R(`tooltip`).className,style:{...R(`tooltip`).style,...e,zIndex:O,top:ue.y??0,left:ue.x??0}}),children:[a,(0,J.jsx)(MB,{ref:le,arrowX:ue.arrowX,arrowY:ue.arrowY,visible:y,position:ue.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...R(`arrow`)})]})})}),(0,q.cloneElement)(de,ue.getReferenceProps({onClick:A,onMouseEnter:j,onMouseLeave:M,onMouseMove:t.onMouseMove,onPointerDown:t.onPointerDown,onPointerEnter:t.onPointerEnter,...fe,className:WN(v,fe.className),[i]:pe}))]})});fX.classes=eX,fX.varsResolver=dX,fX.displayName=`@mantine/core/Tooltip`,fX.Floating=rX,fX.Group=oX;var pX={root:`m_cf365364`,indicator:`m_9e182ccd`,label:`m_1738fcb2`,input:`m_1714d588`,control:`m_69686b9b`,innerLabel:`m_78882f40`},mX={withItemsBorders:!0},hX=HN((e,{radius:t,color:n,transitionDuration:r,size:i,transitionTimingFunction:a})=>({root:{"--sc-radius":t===void 0?void 0:mM(t),"--sc-color":n?cP(n,e):void 0,"--sc-shadow":n?void 0:`var(--mantine-shadow-xs)`,"--sc-transition-duration":r===void 0?void 0:`${r}ms`,"--sc-transition-timing-function":a,"--sc-padding":fM(i,`sc-padding`),"--sc-font-size":hM(i)}})),gX=QF(e=>{let t=Z(`SegmentedControl`,mX,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,data:c,value:l,defaultValue:u,onChange:d,size:f,name:p,disabled:m,readOnly:h,fullWidth:g,orientation:_,radius:v,color:y,transitionDuration:b,transitionTimingFunction:x,variant:S,autoContrast:C,withItemsBorders:w,mod:T,attributes:E,ref:D,...O}=t,k=bF({name:`SegmentedControl`,props:t,classes:pX,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:E,vars:s,varsResolver:hX}),A=UP(),j=c.map(e=>LN(e)?{label:`${e}`,value:e}:e),M=DN(),[N,P]=(0,q.useState)(wM()),[F,ee]=(0,q.useState)(null),[I,te]=(0,q.useState)({}),ne=(e,t)=>{I[t]=e,te(I)},[L,re]=tN({value:l,defaultValue:u,finalValue:Array.isArray(c)?j.find(e=>!e.disabled)?.value??c[0]?.value??null:null,onChange:d}),ie=JM(p),ae=j.map(e=>(0,q.createElement)($,{...k(`control`),mod:{active:L===e.value,orientation:_},key:`${e.value}`},(0,q.createElement)(`input`,{...k(`input`),disabled:m||e.disabled,type:`radio`,name:ie,value:`${e.value}`,id:`${ie}-${e.value}`,checked:L===e.value,onChange:()=>!h&&re(e.value),"data-focus-ring":A.focusRing,key:`${e.value}-input`}),(0,q.createElement)($,{component:`label`,...k(`label`),mod:{active:L===e.value&&!(m||e.disabled),disabled:m||e.disabled,"read-only":h},htmlFor:`${ie}-${e.value}`,ref:t=>ne(t,`${e.value}`),__vars:{"--sc-label-color":y===void 0?void 0:mP({color:y,theme:A,autoContrast:C})},key:`${e.value}-label`},(0,J.jsx)(`span`,{...k(`innerLabel`),children:e.label})))),oe=QM(D,e=>ee(e));return aN(()=>{P(wM())},[c.length]),c.length===0?null:(0,J.jsxs)($,{...k(`root`),variant:S,size:f,ref:oe,mod:[{"full-width":g,orientation:_,initialized:M,"with-items-borders":w},T],...O,role:`radiogroup`,"data-disabled":m,children:[L!==void 0&&(0,J.jsx)(VU,{target:I[`${L}`],parent:F,component:`span`,transitionDuration:`var(--sc-transition-duration)`,...k(`indicator`)},N),ae]})});gX.classes=pX,gX.varsResolver=hX,gX.displayName=`@mantine/core/SegmentedControl`;var _X={size:`sm`,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:`left`,openOnFocus:!0},vX=QF(e=>{let t=Z(`Select`,_X,e),{classNames:n,styles:r,unstyled:i,vars:a,dropdownOpened:o,defaultDropdownOpened:s,onDropdownClose:c,onDropdownOpen:l,onFocus:u,onBlur:d,onClick:f,onChange:p,data:m,value:h,defaultValue:g,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:v,onOptionSubmit:y,comboboxProps:b,readOnly:x,disabled:S,filter:C,limit:w,withScrollArea:T,maxDropdownHeight:E,size:D,searchable:O,rightSection:k,checkIconPosition:A,withCheckIcon:j,withAlignedLabels:M,nothingFoundMessage:N,name:P,form:F,searchValue:ee,defaultSearchValue:I,onSearchChange:te,allowDeselect:ne,error:L,rightSectionPointerEvents:re,id:ie,clearable:ae,clearSectionMode:oe,clearButtonProps:se,hiddenInputProps:ce,renderOption:le,onClear:ue,autoComplete:R,scrollAreaProps:de,__defaultRightSection:z,__clearSection:fe,__clearable:pe,chevronColor:me,autoSelectOnBlur:he,openOnFocus:ge,attributes:_e,...ve}=t,ye=(0,q.useMemo)(()=>SW(m),[m]),be=(0,q.useRef)({}),B=(0,q.useMemo)(()=>CW(ye),[ye]),xe=JM(ie),[V,H,Se]=tN({value:h,defaultValue:g,finalValue:null,onChange:p}),Ce=V==null?void 0:`${V}`in B?B[`${V}`]:be.current[`${V}`],we=CN(Ce),[Te,Ee,De]=tN({value:ee,defaultValue:I,finalValue:Ce?Ce.label:``,onChange:te}),Oe=ZW({opened:o,defaultOpened:s,onDropdownOpen:()=>{l?.(),v?Oe.selectFirstOption():Oe.updateSelectedOptionIndex(`active`,{scrollIntoView:!0})},onDropdownClose:()=>{c?.(),setTimeout(Oe.resetSelectedOption,0)}}),ke=e=>{Ee(e),Oe.resetSelectedOption()},{resolvedClassNames:Ae,resolvedStyles:je}=oF({props:t,styles:r,classNames:n});(0,q.useEffect)(()=>{_&&Oe.selectFirstOption()},[_,Te]),(0,q.useEffect)(()=>{h===null&&ke(``),h!=null&&Ce&&(we?.value!==Ce.value||we?.label!==Ce.label)&&ke(Ce.label)},[h,Ce]),(0,q.useEffect)(()=>{!Se&&!De&&ke(V==null?``:`${V}`in B?B[`${V}`]?.label:be.current[`${V}`]?.label||``)},[B,V]),(0,q.useEffect)(()=>{V&&`${V}`in B&&(be.current[`${V}`]=B[`${V}`])},[B,V]);let Me=(0,J.jsx)(eG.ClearButton,{...se,onClear:()=>{H(null,null),ke(``),ue?.()}}),Ne=ae&&!!V&&!S&&!x;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(eG,{store:Oe,__staticSelector:`Select`,classNames:Ae,styles:je,unstyled:i,readOnly:x,size:D,attributes:_e,keepMounted:he,onOptionSubmit:e=>{y?.(e);let t=ne&&`${B[e].value}`==`${V}`?null:B[e],n=t?t.value:null;n!==V&&H(n,t),!Se&&ke(n==null?``:t?.label||``),Oe.closeDropdown()},...b,children:[(0,J.jsx)(eG.Target,{targetType:O?`input`:`button`,autoComplete:R,withExpandedAttribute:!0,children:(0,J.jsx)(NU,{id:xe,__defaultRightSection:(0,J.jsx)(eG.Chevron,{size:D,error:L,unstyled:i,color:me}),__clearSection:Me,__clearable:Ne,__clearSectionMode:oe,rightSection:k,rightSectionPointerEvents:re||`none`,...ve,size:D,__staticSelector:`Select`,disabled:S,readOnly:x||!O,value:Te,onChange:e=>{ke(e.currentTarget.value),Oe.openDropdown(),_&&Oe.selectFirstOption()},onFocus:e=>{ge&&O&&Oe.openDropdown(),u?.(e)},onBlur:e=>{he&&Oe.clickSelectedOption(),O&&Oe.closeDropdown();let t=V!=null&&(`${V}`in B?B[`${V}`]:be.current[`${V}`]);ke(t&&t.label||``),d?.(e)},onClick:e=>{O?Oe.openDropdown():Oe.toggleDropdown(),f?.(e)},classNames:Ae,styles:je,unstyled:i,pointer:!O,error:L,attributes:_e})}),(0,J.jsx)(pG,{data:ye,hidden:x||S,filter:C,search:Te,limit:w,hiddenWhenEmpty:!N,withScrollArea:T,maxDropdownHeight:E,filterOptions:!!O&&Ce?.label!==Te,value:V,checkIconPosition:A,withCheckIcon:j,withAlignedLabels:M,nothingFoundMessage:N,unstyled:i,labelId:ve.label?`${xe}-label`:void 0,"aria-label":ve.label?void 0:ve[`aria-label`],renderOption:le,scrollAreaProps:de})]}),(0,J.jsx)(eG.HiddenInput,{value:V,name:P,form:F,disabled:S,...ce})]})});vX.classes={...NU.classes,...eG.classes},vX.displayName=`@mantine/core/Select`;function yX(e){if(e!==void 0)return typeof e==`number`?X(e):e}function bX({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=UP(),s=t===void 0?e:t,c=r!==void 0,l=$j({"--sg-spacing-x":pM(xM(e)),"--sg-spacing-y":pM(xM(s)),"--sg-auto-rows":i,...c?{"--sg-min-col-width":yX(r)}:{"--sg-cols":xM(n)?.toString()}}),u=Wj(o.breakpoints).reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=pM(e[r])),typeof s==`object`&&s[r]!==void 0&&(t[r][`--sg-spacing-y`]=pM(s[r])),!c&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,J.jsx)(CF,{styles:l,media:bM(Wj(u),o.breakpoints).filter(e=>Wj(u[e.value]).length>0).map(e=>({query:`(min-width: ${o.breakpoints[e.value]})`,styles:u[e.value]})),selector:a})}function xX(e){return typeof e==`object`&&e?Wj(e):[]}function SX(e){return e.sort((e,t)=>Yj(e)-Yj(t))}function CX({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}){return SX(Array.from(new Set([...xX(e),...xX(t),...r===void 0?xX(n):[]])))}function wX({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=t===void 0?e:t,s=r!==void 0,c=$j({"--sg-spacing-x":pM(xM(e)),"--sg-spacing-y":pM(xM(o)),"--sg-auto-rows":i,...s?{"--sg-min-col-width":yX(r)}:{"--sg-cols":xM(n)?.toString()}}),l=CX({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}),u=l.reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=pM(e[r])),typeof o==`object`&&o[r]!==void 0&&(t[r][`--sg-spacing-y`]=pM(o[r])),!s&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,J.jsx)(CF,{styles:c,container:l.map(e=>({query:`simple-grid (min-width: ${e})`,styles:u[e]})),selector:a})}var TX={container:`m_925c2d2c`,root:`m_2415a157`},EX={cols:1,spacing:`md`,type:`media`},DX=Q(e=>{let t=Z(`SimpleGrid`,EX,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,cols:c,verticalSpacing:l,spacing:u,type:d,minColWidth:f,autoFlow:p,autoRows:m,attributes:h,...g}=t,_=bF({name:`SimpleGrid`,classes:TX,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s}),v=qF(),y=f===void 0?void 0:p||`auto-fill`;return d===`container`?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(wX,{...t,selector:`.${v}`}),(0,J.jsx)(`div`,{..._(`container`),children:(0,J.jsx)($,{..._(`root`,{className:v}),...g,"data-auto-cols":y})})]}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(bX,{...t,selector:`.${v}`}),(0,J.jsx)($,{..._(`root`,{className:v}),...g,"data-auto-cols":y})]})});DX.classes=TX,DX.displayName=`@mantine/core/SimpleGrid`;var[OX,kX]=nM(`SliderProvider was not found in tree`);function AX({size:e,disabled:t,variant:n,color:r,thumbSize:i,radius:a,orientation:o,...s}){let{getStyles:c}=kX();return(0,J.jsx)($,{tabIndex:-1,variant:n,size:e,...c(`root`),mod:{orientation:o},...s})}AX.displayName=`@mantine/core/SliderRoot`;function jX({max:e,min:t,value:n,position:r,label:i,dragging:a,onMouseDown:o,onKeyDownCapture:s,labelTransitionProps:c,labelAlwaysOn:l,thumbLabel:u,onFocus:d,onBlur:f,showLabelOnHover:p,isHovered:m,children:h=null,disabled:g,orientation:_=`horizontal`,ref:v}){let{getStyles:y}=kX(),[b,x]=(0,q.useState)(!1),S=l||a||b||p&&m;return(0,J.jsxs)($,{tabIndex:g?-1:0,role:`slider`,"aria-label":u,"aria-valuemax":e,"aria-valuemin":t,"aria-valuenow":n,"aria-disabled":g,"aria-orientation":_,ref:v,__vars:{"--slider-thumb-offset":`${r}%`},...y(`thumb`,{focusable:!0}),mod:{dragging:a,disabled:g},onFocus:e=>{x(!0),typeof d==`function`&&d(e)},onBlur:e=>{x(!1),typeof f==`function`&&f(e)},onTouchStart:o,onMouseDown:o,onKeyDownCapture:s,onClick:e=>e.stopPropagation(),children:[h,(0,J.jsx)(YB,{mounted:i!=null&&!!S,transition:`fade`,duration:0,...c,children:e=>(0,J.jsx)(`div`,{...y(`label`,{style:e}),children:i})})]})}jX.displayName=`@mantine/core/SliderThumb`;function MX({value:e,min:t,max:n}){let r=(e-t)/(n-t)*100;return Math.min(Math.max(r,0),100)}function NX({mark:e,offset:t,value:n,inverted:r=!1}){return r?typeof t==`number`&&e.value<=t||e.value>=n:typeof t==`number`?e.value>=t&&e.value<=n:e.value<=n}function PX({marks:e,min:t,max:n,disabled:r,value:i,offset:a,inverted:o}){let{getStyles:s}=kX();return e?(0,J.jsx)(`div`,{children:e.map((e,c)=>e.hidden?null:(0,q.createElement)($,{...s(`markWrapper`),__vars:{"--mark-offset":`${MX({value:e.value,min:t,max:n})}%`},key:c},(0,J.jsx)($,{...s(`mark`),mod:{filled:NX({mark:e,value:i,offset:a,inverted:o}),disabled:r}}),e.label&&(0,J.jsx)(`div`,{...s(`markLabel`),children:e.label})))}):null}PX.displayName=`@mantine/core/SliderMarks`;function FX({filled:e,children:t,offset:n,disabled:r,marksOffset:i,inverted:a,containerProps:o,...s}){let{getStyles:c}=kX();return(0,J.jsx)($,{...c(`trackContainer`),mod:{disabled:r},...o,children:(0,J.jsxs)($,{...c(`track`),mod:{inverted:a,disabled:r},children:[(0,J.jsx)($,{mod:{inverted:a,disabled:r},__vars:{"--slider-bar-width":`calc(${e}% + 2 * var(--slider-size))`,"--slider-bar-offset":`calc(${n}% - var(--slider-size))`},...c(`bar`)}),t,(0,J.jsx)(PX,{...s,offset:i,disabled:r,inverted:a})]})})}FX.displayName=`@mantine/core/SliderTrack`;function IX({value:e,containerWidth:t,min:n,max:r,step:i,precision:a}){let o=(t?Math.min(Math.max(e,0),t)/t:e)*(r-n),s=(o===0?0:Math.round(o/i)*i)+n,c=Math.max(s,n);return a===void 0?c:Number(c.toFixed(a))}function LX(e,t){return parseFloat(e.toFixed(t))}function RX(e){if(!e)return 0;let t=e.toString().split(`.`);return t.length>1?t[1].length:0}function zX(e,t){let n=[...t].sort((e,t)=>e.value-t.value).find(t=>t.value>e);return n?n.value:e}function BX(e,t){let n=[...t].sort((e,t)=>t.value-e.value).find(t=>t.value<e);return n?n.value:e}function VX(e){let t=[...e].sort((e,t)=>e.value-t.value);return t.length>0?t[0].value:0}function HX(e){let t=[...e].sort((e,t)=>e.value-t.value);return t.length>0?t[t.length-1].value:100}var UX={root:`m_dd36362e`,label:`m_c9357328`,thumb:`m_c9a9a60a`,trackContainer:`m_a8645c2`,track:`m_c9ade57f`,bar:`m_38aeed47`,markWrapper:`m_b7b0423a`,mark:`m_dd33bc19`,markLabel:`m_68c77a5b`},WX={radius:`xl`,min:0,max:100,step:1,marks:[],label:e=>e,labelTransitionProps:{transition:`fade`,duration:0},thumbLabel:``,showLabelOnHover:!0,scale:e=>e,size:`md`},GX=HN((e,{size:t,color:n,thumbSize:r,radius:i})=>({root:{"--slider-size":fM(t,`slider-size`),"--slider-color":n?cP(n,e):void 0,"--slider-radius":i===void 0?void 0:mM(i),"--slider-thumb-size":r===void 0?`calc(var(--slider-size) * 2)`:X(r)}})),KX=Q(e=>{let t=Z(`Slider`,WX,e),{classNames:n,styles:r,value:i,onChange:a,onChangeEnd:o,size:s,min:c,max:l,domain:u,step:d,precision:f,defaultValue:p,name:m,marks:h,label:g,labelTransitionProps:_,labelAlwaysOn:v,thumbLabel:y,showLabelOnHover:b,thumbChildren:x,disabled:S,unstyled:C,scale:w,inverted:T,orientation:E,className:D,style:O,vars:k,hiddenInputProps:A,restrictToMarks:j,thumbProps:M,attributes:N,ref:P,...F}=t,ee=bF({name:`Slider`,props:t,classes:UX,classNames:n,className:D,styles:r,style:O,attributes:N,vars:k,varsResolver:GX,unstyled:C}),{dir:I}=sI(),[te,ne]=(0,q.useState)(!1),[L,re]=tN({value:typeof i==`number`?CM(i,c,l):i,defaultValue:typeof p==`number`?CM(p,c,l):p,finalValue:CM(0,c,l),onChange:a}),ie=(0,q.useRef)(L),ae=(0,q.useRef)(o);(0,q.useEffect)(()=>{ae.current=o},[o]);let oe=(0,q.useRef)(null),se=(0,q.useRef)(null),[ce,le]=u||[c,l],ue=MX({value:L,min:ce,max:le}),R=w(L),de=typeof g==`function`?g(R):g,z=f??RX(d),fe=(0,q.useCallback)(({x:e})=>{if(!S){let t=CM(IX({value:e,min:ce,max:le,step:d,precision:z}),c,l);re(j&&h?.length?FN(t,h.map(e=>e.value)):t),ie.current=t}},[S,c,l,ce,le,d,z,re,h,j]),{ref:pe,active:me}=eN(({x:e,y:t})=>fe({x:E===`vertical`?1-t:e}),{onScrubEnd:(0,q.useCallback)(()=>{if(!S&&ae.current){let e=j&&h?.length?FN(ie.current,h.map(e=>e.value)):ie.current;ae.current(e)}},[S,h,j])},I),he=(0,q.useCallback)(e=>{!S&&ae.current&&ae.current(e)},[S]),ge=e=>{if(!S)switch(e.key){case`ArrowUp`:{if(e.preventDefault(),se.current?.focus(),j&&h){let e=zX(L,h);re(e),he(e);break}let t=LX(Math.min(Math.max(L+d,ce),le),z);re(t),he(t);break}case`ArrowRight`:{if(e.preventDefault(),se.current?.focus(),j&&h){let e=I===`rtl`?BX(L,h):zX(L,h);re(e),he(e);break}let t=LX(Math.min(Math.max(I===`rtl`?L-d:L+d,ce),le),z);re(t),he(t);break}case`ArrowDown`:{if(e.preventDefault(),se.current?.focus(),j&&h){let e=BX(L,h);re(e),he(e);break}let t=LX(Math.min(Math.max(L-d,ce),le),z);re(t),he(t);break}case`ArrowLeft`:{if(e.preventDefault(),se.current?.focus(),j&&h){let e=I===`rtl`?zX(L,h):BX(L,h);re(e),he(e);break}let t=LX(Math.min(Math.max(I===`rtl`?L+d:L-d,ce),le),z);re(t),he(t);break}case`Home`:if(e.preventDefault(),se.current?.focus(),j&&h){re(VX(h)),he(VX(h));break}re(c),he(c);break;case`End`:if(e.preventDefault(),se.current?.focus(),j&&h){re(HX(h)),he(HX(h));break}re(l),he(l);break;default:break}};return(0,J.jsx)(OX,{value:{getStyles:ee},children:(0,J.jsxs)(AX,{...F,ref:QM(P,oe),onKeyDownCapture:ge,onMouseDownCapture:()=>oe.current?.focus(),size:s,disabled:S,orientation:E,children:[(0,J.jsx)(FX,{inverted:T,offset:0,filled:ue,marks:h,min:ce,max:le,value:R,disabled:S,containerProps:{ref:pe,onMouseEnter:b?()=>ne(!0):void 0,onMouseLeave:b?()=>ne(!1):void 0},children:(0,J.jsx)(jX,{max:le,min:ce,value:R,position:ue,dragging:me,label:de,ref:se,labelTransitionProps:_,labelAlwaysOn:v,thumbLabel:y,showLabelOnHover:b,isHovered:te,disabled:S,orientation:E,...M,children:x})}),(0,J.jsx)(`input`,{type:`hidden`,name:m,value:R,...A})]})})});KX.classes=UX,KX.varsResolver=GX,KX.displayName=`@mantine/core/Slider`;var qX=(0,q.createContext)(null),JX={hiddenInputValuesSeparator:`,`},YX=QF((e=>{let{value:t,defaultValue:n,onChange:r,size:i,wrapperProps:a,children:o,readOnly:s,name:c,hiddenInputValuesSeparator:l,hiddenInputProps:u,maxSelectedValues:d,disabled:f,...p}=Z(`SwitchGroup`,JX,e),[m,h]=tN({value:t,defaultValue:n,finalValue:[],onChange:r}),g=e=>{let t=e.currentTarget.value;if(s)return;let n=m.includes(t);!n&&d&&m.length>=d||h(n?m.filter(e=>e!==t):[...m,t])},_=e=>{if(f)return!0;if(!d)return!1;let t=m.includes(e),n=m.length>=d;return!t&&n},v=m.join(l);return(0,J.jsx)(qX,{value:{value:m,onChange:g,size:i,isDisabled:_},children:(0,J.jsxs)(AU.Wrapper,{size:i,...a,...p,labelElement:`div`,__staticSelector:`SwitchGroup`,children:[(0,J.jsx)(tG,{role:`group`,children:o}),(0,J.jsx)(`input`,{type:`hidden`,name:c,value:v,...u})]})})}));YX.classes=AU.Wrapper.classes,YX.displayName=`@mantine/core/SwitchGroup`;var XX={root:`m_5f93f3bb`,input:`m_926b4011`,track:`m_9307d992`,thumb:`m_93039a1d`,trackLabel:`m_8277e082`},ZX={labelPosition:`right`,withThumbIndicator:!0},QX=HN((e,{radius:t,color:n,size:r})=>({root:{"--switch-radius":t===void 0?void 0:mM(t),"--switch-height":fM(r,`switch-height`),"--switch-width":fM(r,`switch-width`),"--switch-thumb-size":fM(r,`switch-thumb-size`),"--switch-label-font-size":fM(r,`switch-label-font-size`),"--switch-track-label-padding":fM(r,`switch-track-label-padding`),"--switch-color":n?cP(n,e):void 0}})),$X=Q(e=>{let t=Z(`Switch`,ZX,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,label:l,offLabel:u,onLabel:d,id:f,size:p,radius:m,wrapperProps:h,thumbIcon:g,checked:_,defaultChecked:v,onChange:y,labelPosition:b,description:x,error:S,disabled:C,variant:w,rootRef:T,mod:E,withThumbIndicator:D,attributes:O,...k}=t,A=(0,q.use)(qX),j=p||A?.size,M=bF({name:`Switch`,props:t,classes:XX,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:O,vars:s,varsResolver:QX}),{styleProps:N,rest:P}=wF(k),F=JM(f),ee={checked:A?.value.includes(P.value)??_,onChange:e=>{A?.onChange(e),y?.(e)}},I=C||A?.isDisabled?.(P.value),[te,ne]=tN({value:ee.checked??_,defaultValue:v,finalValue:!1});return(0,J.jsxs)(oG,{...M(`root`),__staticSelector:`Switch`,__stylesApiProps:t,id:F,size:j,labelPosition:b,label:l,description:x,error:S,disabled:I,bodyElement:`label`,labelElement:`span`,classNames:n,styles:a,unstyled:o,"data-checked":ee.checked,variant:w,ref:T,mod:E,attributes:O,inert:P.inert,...N,...h,children:[(0,J.jsx)(`input`,{...P,...ee,disabled:I,checked:te,"data-checked":ee.checked,onChange:e=>{ee.onChange?.(e),ne(e.currentTarget.checked)},id:F,type:`checkbox`,role:`switch`,inert:P.inert,...M(`input`)}),(0,J.jsxs)($,{"aria-hidden":`true`,component:`span`,mod:{error:S,"label-position":b,"without-labels":!d&&!u},...M(`track`),children:[(0,J.jsx)($,{component:`span`,mod:{"reduce-motion":!0,"with-thumb-indicator":D&&!g},...M(`thumb`),children:g}),(0,J.jsx)(`span`,{...M(`trackLabel`),children:te?d:u})]})]})});$X.classes={...XX,...aG},$X.varsResolver=QX,$X.displayName=`@mantine/core/Switch`,$X.Group=YX;function eZ({data:e,value:t}){let n=t.map(e=>e.trim().toLowerCase());return e.reduce((e,t)=>(sG(t)?e.push({group:t.group,items:t.items.filter(e=>n.indexOf(e.label.toLowerCase().trim())===-1)}):n.indexOf(t.label.toLowerCase().trim())===-1&&e.push(t),e),[])}function tZ(e,t){return e?t.split(RegExp(`[${e.join(``)}]`)).map(e=>e.trim()).filter(e=>e!==``):[t]}function nZ({splitChars:e,allowDuplicates:t,maxTags:n,value:r,currentTags:i,isDuplicate:a,onDuplicate:o}){let s=tZ(e,r),c=[];if(t)c.push(...i,...s);else{c.push(...i);for(let e of s)(a?e=>a(e,c):e=>c.some(t=>t.toLowerCase()===e.toLowerCase()))(e)?o?.(e):c.push(e)}return n?c.slice(0,n):c}var rZ={maxTags:1/0,acceptValueOnBlur:!0,splitChars:[`,`],hiddenInputValuesDivider:`,`,openOnFocus:!0,size:`sm`},iZ=Q(e=>{let t=Z(`TagsInput`,rZ,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,value:l,defaultValue:u,onChange:d,onKeyDown:f,maxTags:p,allowDuplicates:m,onDuplicate:h,variant:g,data:_,dropdownOpened:v,defaultDropdownOpened:y,onDropdownOpen:b,onDropdownClose:x,selectFirstOptionOnChange:S,selectFirstOptionOnDropdownOpen:C,onOptionSubmit:w,comboboxProps:T,filter:E,limit:D,withScrollArea:O,maxDropdownHeight:k,searchValue:A,defaultSearchValue:j,onSearchChange:M,readOnly:N,disabled:P,splitChars:F,onFocus:ee,onBlur:I,onPaste:te,radius:ne,rightSection:L,rightSectionWidth:re,rightSectionPointerEvents:ie,rightSectionProps:ae,leftSection:oe,leftSectionWidth:se,leftSectionPointerEvents:ce,leftSectionProps:le,inputContainer:ue,inputWrapperOrder:R,withAsterisk:de,required:z,labelProps:fe,descriptionProps:pe,errorProps:me,wrapperProps:he,description:ge,label:_e,error:ve,withErrorStyles:ye,name:be,form:B,id:xe,clearable:V,clearSectionMode:H,clearButtonProps:Se,hiddenInputProps:Ce,hiddenInputValuesDivider:we,mod:Te,renderOption:Ee,renderPill:De,onRemove:Oe,onClear:ke,onMaxTags:Ae,scrollAreaProps:je,acceptValueOnBlur:Me,isDuplicate:Ne,openOnFocus:U,attributes:Pe,ref:Fe,loading:Ie,loadingPosition:Le,...Re}=t,ze=JM(xe),Be=SW(_),Ve=CW(Be),He=(0,q.useRef)(null),Ue=QM(He,Fe),We=ZW({opened:v,defaultOpened:y,onDropdownOpen:()=>{b?.(),C&&We.selectFirstOption()},onDropdownClose:()=>{x?.(),We.resetSelectedOption()}}),{styleProps:Ge,rest:{type:Ke,autoComplete:qe,...Je}}=wF(Re),[Ye,Xe]=tN({value:l,defaultValue:u,finalValue:[],onChange:d}),[Ze,Qe]=tN({value:A,defaultValue:j,finalValue:``,onChange:M}),$e=e=>{Qe(e),We.resetSelectedOption()},et=bF({name:`TagsInput`,classes:{},props:t,classNames:n,styles:a,unstyled:o}),{resolvedClassNames:tt,resolvedStyles:nt}=oF({props:t,styles:a,classNames:n}),rt=e=>{if((Ne?Ne(e,Ye):Ye.some(t=>t.toLowerCase()===e.toLowerCase()))&&(h?.(e),!m)){$e(``);return}if(Ye.length>=p){Ae?.(e);return}w?.(e),$e(``),e.length>0&&Xe([...Ye,e])},it=e=>{if(f?.(e),e.isPropagationStopped())return;let t=Ze.trim(),{length:n}=t;if(F.includes(e.key)&&n>0&&(Xe(nZ({splitChars:F,allowDuplicates:m,maxTags:p,value:Ze,currentTags:Ye,isDuplicate:Ne,onDuplicate:h})),$e(``),e.preventDefault()),e.key===`Enter`&&n>0&&!e.nativeEvent.isComposing){if(e.preventDefault(),document.querySelector(`#${We.listId} [data-combobox-option][data-combobox-selected]`))return;rt(t)}e.key===`Backspace`&&n===0&&Ye.length>0&&!e.nativeEvent.isComposing&&!N&&(Oe?.(Ye[Ye.length-1]),Xe(Ye.slice(0,Ye.length-1)))},at=e=>{te?.(e),e.preventDefault(),e.clipboardData&&(Xe(nZ({splitChars:F,allowDuplicates:m,maxTags:p,value:`${Ze}${e.clipboardData.getData(`text/plain`)}`,currentTags:Ye,isDuplicate:Ne,onDuplicate:h})),$e(``))},ot=Ye.map((e,t)=>{let n=()=>{let n=Ye.slice();n.splice(t,1),Xe(n),Oe?.(e)};return De?(0,J.jsx)(q.Fragment,{children:De({option:Ve[e]||{value:e,label:e,disabled:!1},value:e,onRemove:n,disabled:P||N})},`${e}-${t}`):(0,J.jsx)(pJ,{withRemoveButton:!N,onRemove:n,unstyled:o,disabled:P,attributes:Pe,...et(`pill`),children:e},`${e}-${t}`)});(0,q.useEffect)(()=>{S&&We.selectFirstOption()},[S,Ye,Ze]);let st=(0,J.jsx)(eG.ClearButton,{...Se,onClear:()=>{Xe([]),$e(``),He.current?.focus(),We.openDropdown(),ke?.()}});return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(eG,{store:We,classNames:tt,styles:nt,unstyled:o,size:c,readOnly:N,__staticSelector:`TagsInput`,attributes:Pe,onOptionSubmit:e=>{w?.(e),$e(``),Ye.length>=p?Ae?.(e):Xe([...Ye,Ve[e].value]),We.resetSelectedOption()},...T,children:[(0,J.jsx)(eG.DropdownTarget,{children:(0,J.jsx)(vJ,{...Ge,__staticSelector:`TagsInput`,classNames:tt,styles:nt,unstyled:o,size:c,className:r,style:i,variant:g,disabled:P,radius:ne,rightSection:L,__clearSection:st,__clearable:V&&Ye.length>0&&!P&&!N,__clearSectionMode:H,rightSectionWidth:re,rightSectionPointerEvents:ie,rightSectionProps:ae,leftSection:oe,leftSectionWidth:se,leftSectionPointerEvents:ce,leftSectionProps:le,loading:Ie,loadingPosition:Le,inputContainer:ue,inputWrapperOrder:R,withAsterisk:de,required:z,labelProps:fe,descriptionProps:pe,errorProps:me,wrapperProps:he,description:ge,label:_e,error:ve,withErrorStyles:ye,__stylesApiProps:{...t,multiline:!0},id:ze,mod:Te,attributes:Pe,children:(0,J.jsxs)(pJ.Group,{disabled:P,unstyled:o,...et(`pillsList`),children:[ot,(0,J.jsx)(eG.EventsTarget,{autoComplete:qe,withExpandedAttribute:!0,children:(0,J.jsx)(vJ.Field,{...Je,ref:Ue,...et(`inputField`),unstyled:o,onKeyDown:it,onFocus:e=>{ee?.(e),U&&We.openDropdown()},onBlur:e=>{I?.(e),Me&&rt(Ze),We.closeDropdown()},onPaste:at,value:Ze,onChange:e=>$e(e.currentTarget.value),required:z&&Ye.length===0,disabled:P,readOnly:N,id:ze})})]})})}),(0,J.jsx)(pG,{data:eZ({data:Be,value:Ye}),hidden:N||P,filter:E,search:Ze,limit:D,hiddenWhenEmpty:!0,withScrollArea:O,maxDropdownHeight:k,unstyled:o,labelId:_e?`${ze}-label`:void 0,"aria-label":_e?void 0:Re[`aria-label`],renderOption:Ee,scrollAreaProps:je})]}),(0,J.jsx)(eG.HiddenInput,{name:be,form:B,value:Ye,valuesDivider:we,disabled:P,...Ce})]})});iZ.classes={...NU.classes,...eG.classes},iZ.displayName=`@mantine/core/TagsInput`;var aZ=Q(e=>(0,J.jsx)(NU,{component:`input`,...Z(`TextInput`,null,e),__staticSelector:`TextInput`}));aZ.classes=NU.classes,aZ.displayName=`@mantine/core/TextInput`;function oZ(e,t,n=[]){let r=[];for(let i of e)if(Array.isArray(i.children)&&i.children.length>0){let e=oZ(i.children,t,n);if(e.currentTreeChecked.length===i.children.length){let t=e.currentTreeChecked.every(e=>e.checked),a={checked:t,indeterminate:!t,value:i.value,hasChildren:!0};r.push(a),n.push(a)}else if(e.currentTreeChecked.length>0){let e={checked:!1,indeterminate:!0,value:i.value,hasChildren:!0};r.push(e),n.push(e)}}else if(t.includes(i.value)){let e={checked:!0,indeterminate:!1,value:i.value,hasChildren:!1};r.push(e),n.push(e)}return{result:n,currentTreeChecked:r}}function sZ(e,t){for(let n of t){if(n.value===e)return n;if(Array.isArray(n.children)){let t=sZ(e,n.children);if(t)return t}}return null}function cZ(e,t,n=[]){let r=sZ(e,t);return r?!Array.isArray(r.children)||r.children.length===0?[r.value]:(r.children.forEach(e=>{Array.isArray(e.children)&&e.children.length>0?cZ(e.value,t,n):n.push(e.value)}),n):n}function lZ(e){return e.reduce((e,t)=>(Array.isArray(t.children)&&t.children.length>0?e.push(...lZ(t.children)):e.push(t.value),e),[])}function uZ(e,t,n){return n.length===0?!1:n.includes(e)?!0:oZ(t,n).result.some(t=>t.value===e&&t.checked)}var dZ=PN(uZ);function fZ(e,t,n){return n.length===0?!1:oZ(t,n).result.some(t=>t.value===e&&t.indeterminate)}var pZ=PN(fZ);function mZ(e,t,n,r={}){return t.forEach(t=>{r[t.value]=t.value in e?e[t.value]:t.value===n,Array.isArray(t.children)&&mZ(e,t.children,n,r)}),r}function hZ(e,t){let n=mZ({},e,[]);return t===`*`?Object.keys(n).reduce((e,t)=>({...e,[t]:!0}),{}):(t.forEach(e=>{n[e]=!0}),n)}function gZ(e,t){let n=[];return e.forEach(e=>n.push(...cZ(e,t))),Array.from(new Set(n))}function _Z({initialSelectedState:e=[],expandedState:t,initialCheckedState:n=[],checkedState:r,initialExpandedState:i={},selectedState:a,multiple:o=!1,onNodeCollapse:s,onNodeExpand:c,onCheckedStateChange:l,onSelectedStateChange:u,onExpandedStateChange:d}={}){let[f,p]=(0,q.useState)([]),[m,h]=tN({value:t,defaultValue:i,finalValue:{},onChange:d}),[g,_]=tN({value:a,defaultValue:e,finalValue:[],onChange:u}),[v,y]=tN({value:r,defaultValue:n,finalValue:[],onChange:l}),[b,x]=(0,q.useState)(null),S=(0,q.useCallback)(e=>{h(mZ(m,e,g)),y(gZ(v,e)),p(e)},[g,v,m]),C=(0,q.useCallback)(e=>{let t={...m,[e]:!m[e]};t[e]?c?.(e):s?.(e),h(t)},[s,c,m]),w=(0,q.useCallback)(e=>{m[e]!==!1&&s?.(e),h({...m,[e]:!1})},[s,m]),T=(0,q.useCallback)(e=>{m[e]!==!0&&c?.(e),h({...m,[e]:!0})},[c,m]),E=(0,q.useCallback)(()=>{let e={...m};Object.keys(e).forEach(t=>{e[t]=!0}),h(e)},[m]),D=(0,q.useCallback)(()=>{let e={...m};Object.keys(e).forEach(t=>{e[t]=!1}),h(e)},[m]),O=(0,q.useCallback)(e=>{if(!o)return g.includes(e)?(x(null),[]):(x(e),[e]);if(g.includes(e))return x(null),g.filter(t=>t!==e);x(e),_([...g,e])},[g]),k=(0,q.useCallback)(e=>{x(e),_(o?g.includes(e)?g:[...g,e]:[e])},[g]),A=(0,q.useCallback)(e=>{b===e&&x(null),_(g.filter(t=>t!==e))},[g]),j=(0,q.useCallback)(()=>{_([]),x(null)},[]);return{multiple:o,expandedState:m,selectedState:g,checkedState:v,anchorNode:b,initialize:S,toggleExpanded:C,collapse:w,expand:T,expandAllNodes:E,collapseAllNodes:D,setExpandedState:h,checkNode:(0,q.useCallback)(e=>{let t=cZ(e,f);y(Array.from(new Set([...v,...t])))},[f,v]),uncheckNode:(0,q.useCallback)(e=>{let t=cZ(e,f);y(v.filter(e=>!t.includes(e)))},[f,v]),checkAllNodes:(0,q.useCallback)(()=>{y(lZ(f))},[f]),uncheckAllNodes:(0,q.useCallback)(()=>{y([])},[]),setCheckedState:y,toggleSelected:O,select:k,deselect:A,clearSelected:j,setSelectedState:_,getCheckedNodes:()=>oZ(f,v).result,isNodeChecked:e=>dZ(e,f,v),isNodeIndeterminate:e=>pZ(e,f,v)}}function vZ(e,t,n){if(!e||!t)return[];let r=n.indexOf(e),i=n.indexOf(t),a=Math.min(r,i),o=Math.max(r,i);return n.slice(a,o+1)}function yZ({node:e,getStyles:t,rootIndex:n,controller:r,expandOnClick:i,selectOnClick:a,isSubtree:o,level:s=1,renderNode:c,flatValues:l,allowRangeSelection:u,expandOnSpace:d,checkOnSpace:f,keepMounted:p}){let m=(0,q.useRef)(null),h=(e.children||[]).map(e=>(0,J.jsx)(yZ,{node:e,flatValues:l,getStyles:t,rootIndex:void 0,level:s+1,controller:r,expandOnClick:i,isSubtree:!0,renderNode:c,selectOnClick:a,allowRangeSelection:u,expandOnSpace:d,checkOnSpace:f,keepMounted:p},e.value)),g=t=>{if(t.nativeEvent.code===`ArrowRight`&&(t.stopPropagation(),t.preventDefault(),r.expandedState[e.value]?t.currentTarget.querySelector(`[role=treeitem]`)?.focus():r.expand(e.value)),t.nativeEvent.code===`ArrowLeft`&&(t.stopPropagation(),t.preventDefault(),r.expandedState[e.value]&&(e.children||[]).length>0?r.collapse(e.value):o&&rM(t.currentTarget,`[role=treeitem]`)?.focus()),t.nativeEvent.code===`ArrowDown`||t.nativeEvent.code===`ArrowUp`){let e=rM(t.currentTarget,`[data-tree-root]`);if(!e)return;t.stopPropagation(),t.preventDefault();let n=Array.from(e.querySelectorAll(`[role=treeitem]`)).filter(e=>e.style.display!==`none`),i=n.indexOf(t.currentTarget);if(i===-1)return;let a=t.nativeEvent.code===`ArrowDown`?i+1:i-1;if(n[a]?.focus(),t.shiftKey){let e=n[a];e&&r.setSelectedState(vZ(r.anchorNode,e.dataset.value,l))}}t.nativeEvent.code===`Space`&&(d&&(t.stopPropagation(),t.preventDefault(),r.toggleExpanded(e.value)),f&&(t.stopPropagation(),t.preventDefault(),r.isNodeChecked(e.value)?r.uncheckNode(e.value):r.checkNode(e.value)))},_=t=>{t.stopPropagation(),u&&t.shiftKey&&r.anchorNode?(r.setSelectedState(vZ(r.anchorNode,e.value,l)),m.current?.focus()):(i&&r.toggleExpanded(e.value),a&&r.select(e.value),m.current?.focus())},v=r.selectedState.includes(e.value),y={...t(`label`),onClick:_,"data-selected":v||void 0,"data-value":e.value};return(0,J.jsxs)(`li`,{...t(`node`,{style:{"--label-offset":`calc(var(--level-offset) * ${s-1})`}}),role:`treeitem`,"aria-selected":v,"data-value":e.value,"data-selected":v||void 0,"data-level":s,tabIndex:n===0?0:-1,onKeyDown:g,ref:m,children:[typeof c==`function`?c({node:e,level:s,selected:v,tree:r,expanded:r.expandedState[e.value]||!1,hasChildren:Array.isArray(e.children)&&e.children.length>0,elementProps:y}):(0,J.jsx)(`div`,{...y,children:e.label}),p&&h.length>0?(0,J.jsx)(q.Activity,{mode:r.expandedState[e.value]?`visible`:`hidden`,children:(0,J.jsx)($,{component:`ul`,role:`group`,...t(`subtree`),"data-level":s,children:h})}):r.expandedState[e.value]&&h.length>0&&(0,J.jsx)($,{component:`ul`,role:`group`,...t(`subtree`),"data-level":s,children:h})]})}yZ.displayName=`@mantine/core/TreeNode`;var bZ={root:`m_f698e191`,subtree:`m_75f3ecf`,node:`m_f6970eb1`,label:`m_dc283425`};function xZ(e){return e.reduce((e,t)=>(e.push(t.value),t.children&&e.push(...xZ(t.children)),e),[])}var SZ={expandOnClick:!0,allowRangeSelection:!0,expandOnSpace:!0},CZ=HN((e,{levelOffset:t})=>({root:{"--level-offset":pM(t)}})),wZ=Q(e=>{let t=Z(`Tree`,SZ,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,data:c,expandOnClick:l,tree:u,renderNode:d,selectOnClick:f,clearSelectionOnOutsideClick:p,allowRangeSelection:m,expandOnSpace:h,levelOffset:g,checkOnSpace:_,keepMounted:v,attributes:y,ref:b,...x}=t,S=_Z(),C=u||S,w=bF({name:`Tree`,classes:bZ,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:CZ}),T=QM(b,kM(()=>p&&C.clearSelected())),E=(0,q.useMemo)(()=>xZ(c),[c]);(0,q.useEffect)(()=>{C.initialize(c)},[c]);let D=c.map((e,t)=>(0,J.jsx)(yZ,{node:e,getStyles:w,rootIndex:t,expandOnClick:l,selectOnClick:f,controller:C,renderNode:d,flatValues:E,allowRangeSelection:m,expandOnSpace:h,checkOnSpace:_,keepMounted:v},e.value));return(0,J.jsx)($,{component:`ul`,ref:T,...w(`root`),...x,role:`tree`,"aria-multiselectable":C.multiple,"data-tree-root":!0,children:D})});wZ.displayName=`@mantine/core/Tree`,wZ.classes=bZ,wZ.varsResolver=CZ;var TZ={name:`Editorial`,description:`Serif typography with newspaper elegance`,defaultColorScheme:`light`,head:{link:[{rel:`preconnect`,href:`https://fonts.googleapis.com`},{rel:`preconnect`,href:`https://fonts.gstatic.com`,crossorigin:``},{rel:`stylesheet`,href:`https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;800&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap`}]},primaryColor:`ink`,primaryShade:{light:7,dark:3},autoContrast:!0,fontFamily:`"Source Serif 4", "Georgia", "Times New Roman", serif`,fontFamilyMonospace:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,headings:{fontFamily:`"Playfair Display", "Georgia", "Times New Roman", serif`,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:`2.5rem`,lineHeight:`1.15`},h2:{fontSize:`1.75rem`,lineHeight:`1.2`},h3:{fontSize:`1.375rem`,lineHeight:`1.3`},h4:{fontSize:`1.125rem`,lineHeight:`1.4`},h5:{fontSize:`1rem`,lineHeight:`1.5`},h6:{fontSize:`0.875rem`,lineHeight:`1.5`}}},defaultRadius:`sm`,radius:{xs:`2px`,sm:`3px`,md:`4px`,lg:`6px`,xl:`8px`},shadows:{xs:`0 1px 2px rgba(0, 0, 0, 0.06)`,sm:`0 1px 3px rgba(0, 0, 0, 0.08)`,md:`0 2px 6px rgba(0, 0, 0, 0.08)`,lg:`0 4px 12px rgba(0, 0, 0, 0.1)`,xl:`0 8px 24px rgba(0, 0, 0, 0.1)`},colors:{ink:[`#f5f3f0`,`#e8e4de`,`#d4cec5`,`#b5ad9f`,`#8c8272`,`#6b6050`,`#4a4035`,`#332b22`,`#1f1812`,`#0d0a07`],burgundy:[`#faf0f0`,`#f0d4d4`,`#e0adad`,`#cc8585`,`#b35e5e`,`#944545`,`#763636`,`#5a2828`,`#3d1b1b`,`#220f0f`],gray:[`#faf9f7`,`#f0eee9`,`#e0dcd5`,`#c8c2b8`,`#a8a194`,`#8a8273`,`#6b6456`,`#504a3f`,`#36322b`,`#1e1b17`],dark:[`#d5d2cd`,`#aba59c`,`#817a6e`,`#5e584e`,`#46413a`,`#36322c`,`#2a2721`,`#201d19`,`#171411`,`#0d0b09`]},components:{Button:kG.extend({defaultProps:{fw:600},styles:{root:{letterSpacing:`0.02em`}}}),ActionIcon:DV.extend({styles:{root:{border:`1px solid var(--mantine-color-default-border)`}}}),Paper:DB.extend({styles:{root:{border:`1px solid var(--mantine-color-default-border)`}}}),Card:IG.extend({styles:{root:{border:`1px solid var(--mantine-color-default-border)`}}}),TextInput:aZ.extend({styles:{input:{border:`1px solid var(--mantine-color-default-border)`}}}),Badge:_G.extend({defaultProps:{fw:600,variant:`outline`},styles:{root:{fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`,letterSpacing:`0.04em`,textTransform:`uppercase`,fontSize:`0.65rem`}}})}},EZ={name:`Midnight`,description:`Clean, developer-focused design`,primaryColor:`pink`,primaryShade:{light:7,dark:8},fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"`,fontFamilyMonospace:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,headings:{fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,fontWeight:`600`,textWrap:`wrap`,sizes:{h1:{fontSize:`2rem`,lineHeight:`1.25`},h2:{fontSize:`1.5rem`,lineHeight:`1.3`},h3:{fontSize:`1.25rem`,lineHeight:`1.4`},h4:{fontSize:`1rem`,lineHeight:`1.5`},h5:{fontSize:`0.875rem`,lineHeight:`1.5`},h6:{fontSize:`0.75rem`,lineHeight:`1.5`}}},radius:{xs:`3px`,sm:`6px`,md:`6px`,lg:`8px`,xl:`12px`},defaultRadius:`sm`,colors:{dark:[`#d0d7de`,`#8b949e`,`#6e7681`,`#484f58`,`#30363d`,`#21262d`,`#161b22`,`#151b23`,`#0d1117`,`#010409`],gray:[`#f6f8fa`,`#eaeef2`,`#d0d7de`,`#afb8c1`,`#8c959f`,`#6e7781`,`#57606a`,`#424a53`,`#32383f`,`#24292f`],blue:[`#ddf4ff`,`#b6e3ff`,`#80ccff`,`#54aeff`,`#218bff`,`#0969da`,`#0550ae`,`#033d8b`,`#0a3069`,`#002155`],green:[`#dafbe1`,`#aceebb`,`#6fdd8b`,`#4ac26b`,`#2da44e`,`#1a7f37`,`#116329`,`#044f1e`,`#003d16`,`#002d11`],red:[`#ffebe9`,`#ffcecb`,`#ffaba8`,`#ff8182`,`#fa4549`,`#cf222e`,`#a40e26`,`#82071e`,`#660018`,`#4c0014`]}},DZ={name:`Monochrome`,description:`Pure black and white — zero color, maximum typography`,primaryColor:`mono`,primaryShade:{light:8,dark:1},autoContrast:!0,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,fontFamilyMonospace:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,headings:{fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,fontWeight:`800`,textWrap:`wrap`,sizes:{h1:{fontSize:`2.25rem`,lineHeight:`1.15`},h2:{fontSize:`1.625rem`,lineHeight:`1.25`},h3:{fontSize:`1.25rem`,lineHeight:`1.35`},h4:{fontSize:`1.0625rem`,lineHeight:`1.45`},h5:{fontSize:`0.9375rem`,lineHeight:`1.5`},h6:{fontSize:`0.8125rem`,lineHeight:`1.5`}}},defaultRadius:`0`,radius:{xs:`0`,sm:`0`,md:`0`,lg:`0`,xl:`2px`},shadows:{xs:`0 1px 2px rgba(0, 0, 0, 0.08)`,sm:`0 1px 4px rgba(0, 0, 0, 0.1)`,md:`0 2px 8px rgba(0, 0, 0, 0.12)`,lg:`0 4px 16px rgba(0, 0, 0, 0.14)`,xl:`0 8px 32px rgba(0, 0, 0, 0.16)`},colors:{mono:[`#f5f5f5`,`#e0e0e0`,`#c0c0c0`,`#a0a0a0`,`#808080`,`#606060`,`#404040`,`#282828`,`#141414`,`#000000`],gray:[`#f5f5f5`,`#e5e5e5`,`#cccccc`,`#b0b0b0`,`#909090`,`#707070`,`#555555`,`#3a3a3a`,`#252525`,`#121212`],blue:[`#f5f5f5`,`#e0e0e0`,`#c0c0c0`,`#a0a0a0`,`#808080`,`#606060`,`#404040`,`#282828`,`#141414`,`#000000`],green:[`#f5f5f5`,`#e0e0e0`,`#c0c0c0`,`#a0a0a0`,`#808080`,`#606060`,`#404040`,`#282828`,`#141414`,`#000000`],red:[`#f5f5f5`,`#e0e0e0`,`#c0c0c0`,`#a0a0a0`,`#808080`,`#606060`,`#404040`,`#282828`,`#141414`,`#000000`],dark:[`#d0d0d0`,`#a0a0a0`,`#707070`,`#505050`,`#383838`,`#282828`,`#1c1c1c`,`#141414`,`#0a0a0a`,`#000000`]},components:{Button:kG.extend({defaultProps:{fw:700},styles:{root:{border:`2px solid currentColor`,letterSpacing:`0.03em`,textTransform:`uppercase`,fontSize:`0.8125rem`}}}),ActionIcon:DV.extend({styles:{root:{border:`2px solid currentColor`}}}),Paper:DB.extend({styles:{root:{border:`2px solid var(--mantine-color-default-border)`}}}),Card:IG.extend({styles:{root:{border:`2px solid var(--mantine-color-default-border)`}}}),TextInput:aZ.extend({styles:{input:{border:`2px solid var(--mantine-color-default-border)`}}}),Badge:_G.extend({defaultProps:{fw:700,variant:`outline`},styles:{root:{textTransform:`uppercase`,letterSpacing:`0.06em`,fontSize:`0.65rem`,border:`2px solid currentColor`}}})}},OZ={name:`Rosé Pine`,description:`Muted pinks and golds on warm dark backgrounds`,defaultColorScheme:`dark`,primaryColor:`rose`,primaryShade:{light:5,dark:4},autoContrast:!0,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,fontFamilyMonospace:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,headings:{fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,fontWeight:`600`,textWrap:`wrap`,sizes:{h1:{fontSize:`2rem`,lineHeight:`1.25`},h2:{fontSize:`1.5rem`,lineHeight:`1.3`},h3:{fontSize:`1.25rem`,lineHeight:`1.4`},h4:{fontSize:`1rem`,lineHeight:`1.5`},h5:{fontSize:`0.875rem`,lineHeight:`1.5`},h6:{fontSize:`0.75rem`,lineHeight:`1.5`}}},defaultRadius:`md`,radius:{xs:`4px`,sm:`6px`,md:`8px`,lg:`12px`,xl:`16px`},shadows:{xs:`0 1px 3px rgba(0, 0, 0, 0.2)`,sm:`0 2px 6px rgba(0, 0, 0, 0.2)`,md:`0 4px 12px rgba(0, 0, 0, 0.25)`,lg:`0 8px 24px rgba(0, 0, 0, 0.3)`,xl:`0 12px 36px rgba(0, 0, 0, 0.35)`},colors:{rose:[`#faf0f4`,`#f2d8e3`,`#eabdd0`,`#e0a0bb`,`#d4849f`,`#c4748f`,`#b06282`,`#9a5275`,`#7a3f5e`,`#5c2e47`],gold:[`#fdf8ec`,`#f8ecc8`,`#f2dda0`,`#eacb72`,`#e0b94d`,`#c9a33e`,`#a98830`,`#866b24`,`#634f1a`,`#403310`],pine:[`#ecf5f0`,`#d0e6da`,`#add4be`,`#86c0a0`,`#62ac84`,`#4e9670`,`#3e7a5a`,`#2f5e44`,`#20412f`,`#12251b`],foam:[`#edf6f7`,`#d2e9eb`,`#b0d9dd`,`#8bc6cc`,`#6ab3bb`,`#569da5`,`#438088`,`#33636a`,`#23454a`,`#14292c`],red:[`#f9eef0`,`#efd3d8`,`#e3b2bb`,`#d68e9b`,`#c86c7c`,`#b25566`,`#944454`,`#733442`,`#52252f`,`#33161d`],gray:[`#f4f0f2`,`#e4dde1`,`#cec5cb`,`#b5aab2`,`#9a8e96`,`#7e737a`,`#635a60`,`#4a4248`,`#332d31`,`#1e1a1c`],dark:[`#e0d8e0`,`#b0a6b2`,`#817786`,`#615768`,`#4a3f54`,`#3a3044`,`#2a2436`,`#211e2e`,`#1a1724`,`#110f1a`]},components:{Button:kG.extend({defaultProps:{fw:500},styles:{root:{transition:`background-color 0.15s ease, opacity 0.15s ease`}}}),ActionIcon:DV.extend({styles:{root:{transition:`background-color 0.15s ease, opacity 0.15s ease`}}}),Paper:DB.extend({defaultProps:{shadow:`sm`},styles:{root:{border:`1px solid var(--mantine-color-default-border)`}}}),Card:IG.extend({defaultProps:{shadow:`sm`},styles:{root:{border:`1px solid var(--mantine-color-default-border)`}}}),TextInput:aZ.extend({styles:{input:{border:`1px solid var(--mantine-color-default-border)`}}}),Badge:_G.extend({defaultProps:{fw:500}})}},kZ={name:`Soft Brutalism`,description:`Pastel pop with bold borders and offset shadows`,head:{link:[{rel:`preconnect`,href:`https://fonts.googleapis.com`},{rel:`preconnect`,href:`https://fonts.gstatic.com`,crossorigin:``},{rel:`stylesheet`,href:`https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap`}]},primaryColor:`lavender`,primaryShade:{light:5,dark:7},autoContrast:!0,cursorType:`pointer`,fontFamily:`Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,fontFamilyMonospace:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,headings:{fontFamily:`Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:`2rem`,lineHeight:`1.25`},h2:{fontSize:`1.5rem`,lineHeight:`1.3`},h3:{fontSize:`1.25rem`,lineHeight:`1.4`},h4:{fontSize:`1rem`,lineHeight:`1.5`},h5:{fontSize:`0.875rem`,lineHeight:`1.5`},h6:{fontSize:`0.75rem`,lineHeight:`1.5`}}},defaultRadius:`md`,radius:{xs:`6px`,sm:`8px`,md:`12px`,lg:`16px`,xl:`24px`},shadows:{xs:`2px 2px 0 0 rgba(100, 80, 140, 0.15)`,sm:`3px 3px 0 0 rgba(100, 80, 140, 0.2)`,md:`4px 4px 0 0 rgba(100, 80, 140, 0.2)`,lg:`6px 6px 0 0 rgba(100, 80, 140, 0.25)`,xl:`8px 8px 0 0 rgba(100, 80, 140, 0.3)`},colors:{lavender:[`#f3f0fa`,`#e4dcf4`,`#d1c4e9`,`#b4a7d6`,`#9a8bc4`,`#7f6cb0`,`#6a549e`,`#543f87`,`#3d2d6b`,`#2a1d52`],peach:[`#fef3ec`,`#fce4d0`,`#f9d0ae`,`#f4b886`,`#f4a261`,`#e68a42`,`#c67234`,`#a35a28`,`#6b3a1a`,`#4a2710`],mint:[`#ecfaf0`,`#d4f2dc`,`#b3e8c2`,`#8edba4`,`#81c995`,`#5ab874`,`#42a05c`,`#2e8548`,`#1a5c2e`,`#0f3f1e`],coral:[`#fef0ef`,`#fcd9d7`,`#f8b8b4`,`#f29490`,`#e97171`,`#d65454`,`#b83e3e`,`#962d2d`,`#6b1f1f`,`#4a1414`],gray:[`#faf8f6`,`#f0ece8`,`#ddd7d0`,`#c4bbb2`,`#a89e95`,`#8c8279`,`#6e655d`,`#524b44`,`#3a342f`,`#24211e`],dark:[`#d4d0dc`,`#a9a2b5`,`#7e7690`,`#5c546e`,`#443c56`,`#342d45`,`#2a2339`,`#1e1a2e`,`#161224`,`#0f0c1a`]},components:{Button:kG.extend({defaultProps:{fw:600},styles:{root:{border:`2px solid currentColor`,boxShadow:`3px 3px 0 0 rgba(100, 80, 140, 0.2)`,transition:`box-shadow 0.15s ease, transform 0.15s ease`}}}),ActionIcon:DV.extend({styles:{root:{border:`2px solid currentColor`,boxShadow:`2px 2px 0 0 rgba(100, 80, 140, 0.15)`}}}),Paper:DB.extend({defaultProps:{shadow:`sm`},styles:{root:{border:`2px solid var(--mantine-color-default-border)`}}}),Card:IG.extend({defaultProps:{shadow:`sm`},styles:{root:{border:`2px solid var(--mantine-color-default-border)`}}}),TextInput:aZ.extend({styles:{input:{border:`2px solid var(--mantine-color-default-border)`,transition:`box-shadow 0.15s ease, border-color 0.15s ease`}}}),Badge:_G.extend({defaultProps:{fw:600},styles:{root:{border:`2px solid currentColor`}}})}},AZ={name:`Terminal`,description:`Green phosphor on black — monospace hacker aesthetic`,defaultColorScheme:`dark`,primaryColor:`terminal`,primaryShade:{light:5,dark:4},autoContrast:!0,fontFamily:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,fontFamilyMonospace:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,headings:{fontFamily:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:`1.75rem`,lineHeight:`1.3`},h2:{fontSize:`1.375rem`,lineHeight:`1.35`},h3:{fontSize:`1.125rem`,lineHeight:`1.4`},h4:{fontSize:`1rem`,lineHeight:`1.5`},h5:{fontSize:`0.875rem`,lineHeight:`1.5`},h6:{fontSize:`0.75rem`,lineHeight:`1.5`}}},defaultRadius:`0`,radius:{xs:`0`,sm:`0`,md:`0`,lg:`2px`,xl:`4px`},shadows:{xs:`none`,sm:`none`,md:`0 0 8px rgba(0, 255, 65, 0.08)`,lg:`0 0 16px rgba(0, 255, 65, 0.1)`,xl:`0 0 24px rgba(0, 255, 65, 0.12)`},colors:{terminal:[`#e6fff0`,`#b3ffd1`,`#80ffb3`,`#4dff94`,`#00ff41`,`#00d636`,`#00ad2b`,`#008521`,`#005c17`,`#00330d`],amber:[`#fff8e6`,`#ffecb3`,`#ffe080`,`#ffd54d`,`#ffca28`,`#d4a520`,`#aa8418`,`#806310`,`#554208`,`#2b2104`],red:[`#ffe6e6`,`#ffb3b3`,`#ff8080`,`#ff4d4d`,`#ff1a1a`,`#d41515`,`#aa1010`,`#800c0c`,`#550808`,`#2b0404`],gray:[`#e8eaed`,`#c8cdd3`,`#a4aab3`,`#808892`,`#5f6872`,`#474f58`,`#363c44`,`#282d33`,`#1c2026`,`#12151a`],dark:[`#c9cdd2`,`#8b9198`,`#5c636b`,`#3d444c`,`#2b3138`,`#1e242b`,`#151a20`,`#0e1216`,`#080c0f`,`#020303`]},components:{Button:kG.extend({defaultProps:{fw:600},styles:{root:{border:`1px solid currentColor`,textTransform:`uppercase`,letterSpacing:`0.05em`,fontSize:`0.8125rem`}}}),ActionIcon:DV.extend({styles:{root:{border:`1px solid currentColor`}}}),Paper:DB.extend({styles:{root:{border:`1px solid var(--mantine-color-default-border)`}}}),Card:IG.extend({styles:{root:{border:`1px solid var(--mantine-color-default-border)`}}}),TextInput:aZ.extend({styles:{input:{border:`1px solid var(--mantine-color-default-border)`,fontFamily:`inherit`}}}),Badge:_G.extend({defaultProps:{fw:600},styles:{root:{border:`1px solid currentColor`,textTransform:`uppercase`,letterSpacing:`0.05em`}}})}},jZ=Vk({name:`alepha.ui.themeList`,schema:K.array(K.json()),default:[Uj,EZ,kZ,AZ,TZ,OZ,DZ]}),MZ=class e{alepha=D(Wk);cookie=Nj({name:`theme`,schema:Vj.schema,ttl:[1,`year`]});overridesCookie=Nj({name:`themeOverrides`,schema:Hj.schema,ttl:[1,`year`]});head=Oj(()=>{let e=this.getTheme();return!e||!e.name?{}:{htmlAttributes:{"data-theme":this.slugify(e.name)},...e.head}});setTheme(e){if(!this.alepha.store.get(jZ)[e])throw new p(`Theme with index ${e} not found`);this.cookie.set({index:e}),this.alepha.store.set(Vj,{index:e}),this.alepha.isBrowser()&&this.alepha.inject(Aj).refreshGlobalHead()}slugify(e){return e.toLowerCase().replace(/\s+/g,`-`)}static FONT_SIZE_MULTIPLIERS={xs:.85,sm:.925,md:1,lg:1.1,xl:1.25};static SCALE_VALUES={xs:.85,sm:.925,md:1,lg:1.1,xl:1.25};static DEFAULT_FONT_SIZES={xs:`0.75rem`,sm:`0.875rem`,md:`1rem`,lg:`1.125rem`,xl:`1.25rem`};getTheme(){let t=this.getThemeIndex(),n=this.alepha.store.get(jZ),r=n[t]||n[0]||Uj,i=this.getThemeOverrides();if(!i.primaryColor&&!i.radius&&!i.fontFamily&&!i.fontSize&&!i.scale)return r;let a={...r,...i.primaryColor&&{primaryColor:i.primaryColor},...i.radius&&{defaultRadius:i.radius},...i.fontFamily&&{fontFamily:i.fontFamily},...i.scale&&i.scale!==`md`&&{scale:e.SCALE_VALUES[i.scale]??1}};if(i.fontSize&&i.fontSize!==`md`){let t=e.FONT_SIZE_MULTIPLIERS[i.fontSize]??1,n=r.fontSizes??e.DEFAULT_FONT_SIZES;a.fontSizes=Object.fromEntries(Object.entries(n).map(([e,n])=>[e,`${(Number.parseFloat(String(n))*t).toFixed(4)}rem`]))}return a}setThemeOverrides(e){this.overridesCookie.set(e),this.alepha.store.set(Hj,e),this.alepha.isBrowser()&&this.alepha.inject(Aj).refreshGlobalHead()}getThemeOverrides(){try{return this.overridesCookie.get()??this.alepha.store.get(Hj)??{}}catch{return this.alepha.store.get(Hj)??{}}}resetThemeOverrides(){this.setThemeOverrides({})}getThemeIndex(){try{return this.cookie.get()?.index??this.alepha.store.get(Vj)?.index??0}catch{return this.alepha.store.get(Vj)?.index??0}}},NZ=(0,q.createContext)(null);NZ.displayName=`@mantine/modals/ModalsContext`;function PZ(){let e=(0,q.use)(NZ);if(!e)throw Error(`[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component`);return e}var[FZ,IZ]=jN(`mantine-modals`),LZ={open:e=>{let t=e.modalId||wM();return IZ(`openModal`)({...e,modalId:t}),t},close:IZ(`closeModal`),closeAll:IZ(`closeAllModals`),openConfirmModal:e=>{let t=e.modalId||wM();return IZ(`openConfirmModal`)({...e,modalId:t}),t},openContextModal:e=>{let t=e.modalId||wM();return IZ(`openContextModal`)({...e,modalId:t}),t},updateModal:e=>IZ(`updateModal`)(e),updateContextModal:e=>IZ(`updateContextModal`)(e)};function RZ({id:e,cancelProps:t,confirmProps:n,labels:r={cancel:``,confirm:``},closeOnConfirm:i=!0,closeOnCancel:a=!0,groupProps:o,onCancel:s,onConfirm:c,children:l}){let{cancel:u,confirm:d}=r,f=PZ(),p=n=>{typeof t?.onClick==`function`&&t?.onClick(n),typeof s==`function`&&s(),a&&f.closeModal(e)},m=t=>{typeof n?.onClick==`function`&&n?.onClick(t),typeof c==`function`&&c(),i&&f.closeModal(e)};return(0,J.jsxs)(J.Fragment,{children:[l&&(0,J.jsx)($,{mb:`md`,children:l}),(0,J.jsxs)(LV,{mt:l?0:`md`,justify:`flex-end`,...o,children:[(0,J.jsx)(kG,{variant:`default`,...t,onClick:p,children:t?.children||u}),(0,J.jsx)(kG,{...n,onClick:m,children:n?.children||d})]})]})}function zZ(e,t){t&&e.type===`confirm`&&e.props.onCancel?.(),e.props.onClose?.()}function BZ(e,t){switch(t.type){case`OPEN`:return{current:t.modal,modals:[...e.modals,t.modal]};case`CLOSE`:{if(!e.modals.find(e=>e.id===t.modalId))return e;let n=e.modals.filter(e=>e.id!==t.modalId);return{current:n[n.length-1]||e.current,modals:n}}case`CLOSE_ALL`:return e.modals.length?{current:e.current,modals:[]}:e;case`UPDATE`:{let{modalId:n,newProps:r}=t,i=e.modals.map(e=>e.id===n?e.type===`content`||e.type===`confirm`?{...e,props:{...e.props,...r}}:e.type===`context`?{...e,props:{...e.props,...r,innerProps:{...e.props.innerProps,...r.innerProps}}}:e:e),a=e.current?.id===n&&i.find(e=>e.id===n)||e.current;return{...e,modals:i,current:a}}default:return e}}function VZ(e){if(!e)return{confirmProps:{},modalProps:{}};let{id:t,children:n,onCancel:r,onConfirm:i,closeOnConfirm:a,closeOnCancel:o,cancelProps:s,confirmProps:c,groupProps:l,labels:u,...d}=e;return{confirmProps:{id:t,children:n,onCancel:r,onConfirm:i,closeOnConfirm:a,closeOnCancel:o,cancelProps:s,confirmProps:c,groupProps:l,labels:u},modalProps:{id:t,...d}}}function HZ({children:e,modalProps:t,labels:n,modals:r}){let[i,a]=(0,q.useReducer)(BZ,{modals:[],current:null}),o=(0,q.useRef)(i);o.current=i;let s=(0,q.useCallback)(e=>{o.current.modals.concat().reverse().forEach(t=>{zZ(t,e)}),a({type:`CLOSE_ALL`,canceled:e})},[o,a]),c=(0,q.useCallback)(({modalId:e,...t})=>{let n=e||wM();return a({type:`OPEN`,modal:{id:n,type:`content`,props:t}}),n},[a]),l=(0,q.useCallback)(({modalId:e,...t})=>{let n=e||wM();return a({type:`OPEN`,modal:{id:n,type:`confirm`,props:t}}),n},[a]),u=(0,q.useCallback)((e,{modalId:t,...n})=>{let r=t||wM();return a({type:`OPEN`,modal:{id:r,type:`context`,props:n,ctx:e}}),r},[a]),d=(0,q.useCallback)((e,t)=>{let n=o.current.modals.find(t=>t.id===e);n&&zZ(n,t),a({type:`CLOSE`,modalId:e,canceled:t})},[o,a]),f=(0,q.useCallback)(({modalId:e,...t})=>{a({type:`UPDATE`,modalId:e,newProps:t})},[a]),p=(0,q.useCallback)(({modalId:e,...t})=>{a({type:`UPDATE`,modalId:e,newProps:t})},[a]);FZ({openModal:c,openConfirmModal:l,openContextModal:({modal:e,...t})=>u(e,t),closeModal:d,closeContextModal:d,closeAllModals:s,updateModal:f,updateContextModal:p});let m={modalProps:t||{},modals:i.modals,openModal:c,openConfirmModal:l,openContextModal:u,closeModal:d,closeContextModal:d,closeAll:s,updateModal:f,updateContextModal:p},{modalProps:h,content:g}=(()=>{let e=o.current.current;switch(e?.type){case`context`:{let{innerProps:t,...n}=e.props,i=r[e.ctx];return{modalProps:n,content:(0,J.jsx)(i,{innerProps:t,context:m,id:e.id})}}case`confirm`:{let{modalProps:t,confirmProps:r}=VZ(e.props);return{modalProps:t,content:(0,J.jsx)(RZ,{...r,id:e.id,labels:e.props.labels||n})}}case`content`:{let{children:t,...n}=e.props;return{modalProps:n,content:t}}default:return{modalProps:{},content:null}}})();return(0,J.jsxs)(NZ,{value:m,children:[(0,J.jsx)(aJ,{zIndex:lM(`modal`)+1,...t,...h,opened:i.modals.length>0,onClose:()=>d(i.current?.id),children:g}),e]})}var UZ=({options:e,onClose:t})=>(0,J.jsxs)(J.Fragment,{children:[e?.message&&(0,J.jsx)(qU,{mb:`md`,children:e.message}),(0,J.jsx)(IU,{justify:`flex-end`,children:(0,J.jsx)(kG,{onClick:t,children:e?.okLabel||`OK`})})]}),WZ=({options:e,onConfirm:t})=>(0,J.jsxs)(J.Fragment,{children:[e?.message&&(0,J.jsx)(qU,{mb:`md`,children:e.message}),(0,J.jsxs)(IU,{justify:`flex-end`,children:[(0,J.jsx)(kG,{variant:`subtle`,onClick:()=>t(!1),children:e?.cancelLabel||`Cancel`}),(0,J.jsx)(kG,{color:e?.confirmColor||`blue`,onClick:()=>t(!0),children:e?.confirmLabel||`Confirm`})]})]}),GZ=({options:e,onSubmit:t})=>{let[n,r]=(0,q.useState)(e?.defaultValue||``),i=(0,q.useRef)(null);(0,q.useEffect)(()=>{i.current?.focus()},[]);let a=()=>{(!e?.required||n.trim())&&t(n)};return(0,J.jsxs)(J.Fragment,{children:[e?.message&&(0,J.jsx)(qU,{mb:`md`,children:e.message}),(0,J.jsx)(aZ,{ref:i,label:e?.label,placeholder:e?.placeholder,value:n,onChange:e=>r(e.currentTarget.value),onKeyDown:e=>{e.key===`Enter`&&a()},required:e?.required,mb:`md`}),(0,J.jsxs)(IU,{justify:`flex-end`,gap:`xs`,children:[(0,J.jsx)(kG,{variant:`subtle`,onClick:()=>t(null),children:e?.cancelLabel||`Cancel`}),(0,J.jsx)(kG,{onClick:a,disabled:e?.required&&!n.trim(),children:e?.submitLabel||`OK`})]})]})},KZ=class{options={default:{centered:!0,withCloseButton:!0,size:`md`,overlayProps:{backgroundOpacity:.55,blur:3},transitionProps:{transition:`pop`,duration:200}}};alert(e){return new Promise(t=>{let n=!1,r=()=>{n||(n=!0,t())},i=this.open({...e,title:e?.title||`Alert`,onClose:r,content:(0,J.jsx)(UZ,{options:e,onClose:()=>{this.close(i),r()}})})})}confirm(e){return new Promise(t=>{let n=!1,r=e=>{n||(n=!0,t(e))},i=this.open({...e,title:e?.title||`Confirm`,closeOnClickOutside:!1,closeOnEscape:!1,onClose:()=>r(!1),content:(0,J.jsx)(WZ,{options:e,onConfirm:e=>{r(e),this.close(i)}})})})}prompt(e){return new Promise(t=>{let n=!1,r=e=>{n||(n=!0,t(e))},i=this.open({...e,title:e?.title||`Input`,closeOnClickOutside:!1,closeOnEscape:!1,onClose:()=>r(null),content:(0,J.jsx)(GZ,{options:e,onSubmit:e=>{r(e),this.close(i)}})})})}open(e){return LZ.open({...this.options.default,...e,children:e?.content||e?.message})}close(e){e?LZ.close(e):LZ.closeAll()}};function qZ(e){let t=e,n=!1,r=new Set;return{getState(){return t},updateState(e){t=typeof e==`function`?e(t):e},setState(e){this.updateState(e),r.forEach(e=>e(t))},initialize(e){n||=(t=e,!0)},subscribe(e){return r.add(e),()=>r.delete(e)}}}function JZ(e){return(0,q.useSyncExternalStore)(e.subscribe,()=>e.getState(),()=>e.getState())}function YZ(e,t,n){let r=[],i=[],a={};for(let o of e){let e=o.position||t;a[e]=a[e]||0,a[e]+=1,a[e]<=n?i.push(o):r.push(o)}return{notifications:i,queue:r}}var XZ=qZ({notifications:[],queue:[],defaultPosition:`bottom-right`,limit:5}),ZZ=(e=XZ)=>JZ(e);function QZ(e,t){let n=e.getState(),r=YZ(t([...n.notifications,...n.queue]),n.defaultPosition,n.limit);e.setState({notifications:r.notifications,queue:r.queue,limit:n.limit,defaultPosition:n.defaultPosition})}function $Z(e,t=XZ){let n=e.id||wM();return QZ(t,t=>e.id&&t.some(t=>t.id===e.id)?t:[...t,{...e,id:n}]),n}function eQ(e,t=XZ){return QZ(t,t=>t.filter(t=>t.id===e?(t.onClose?.(t),!1):!0)),e}function tQ(e,t=XZ){return QZ(t,t=>t.map(t=>t.id===e.id?{...t,...e}:t)),e.id}function nQ(e=XZ){QZ(e,()=>[])}function rQ(e=XZ){QZ(e,t=>t.slice(0,e.getState().limit))}var iQ={show:$Z,hide:eQ,update:tQ,clean:nQ,cleanQueue:rQ,updateState:QZ},aQ=[`bottom-center`,`bottom-left`,`bottom-right`,`top-center`,`top-left`,`top-right`];function oQ(e,t){return e.reduce((e,n)=>(e[n.position||t].push(n),e),aQ.reduce((e,t)=>(e[t]=[],e),{}))}var sQ={left:`translateX(-100%)`,right:`translateX(100%)`,"top-center":`translateY(-100%)`,"bottom-center":`translateY(100%)`},cQ={left:`translateX(0)`,right:`translateX(0)`,"top-center":`translateY(0)`,"bottom-center":`translateY(0)`};function lQ({state:e,maxHeight:t,position:n,transitionDuration:r}){let[i,a]=n.split(`-`),o=a===`center`?`${i}-center`:a,s={opacity:0,maxHeight:t,transform:sQ[o],transitionDuration:`${r}ms, ${r}ms, ${r}ms`,transitionTimingFunction:`cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear`,transitionProperty:`opacity, transform, max-height`},c={opacity:1,transform:cQ[o]},l={opacity:0,maxHeight:0,transform:sQ[o]},u={entering:c,entered:c,exiting:l,exited:l};return{...s,...u[e]}}function uQ(e,t){return typeof t==`number`?t:t===!1||e===!1?!1:e}function dQ({data:e,onHide:t,autoClose:n,paused:r,onHoverStart:i,onHoverEnd:a,...o}){let{autoClose:s,message:c,...l}=e,u=uQ(n,e.autoClose),d=(0,q.useRef)(-1),[f,p]=(0,q.useState)(!1),m=()=>window.clearTimeout(d.current),h=()=>{t(e.id),m()},g=()=>{m(),typeof u==`number`&&(d.current=window.setTimeout(h,u))},_=()=>{p(!0),i?.()},v=()=>{p(!1),a?.()};return(0,q.useEffect)(()=>{e.onOpen?.(e)},[]),(0,q.useEffect)(()=>(g(),m),[u]),(0,q.useEffect)(()=>(r||f?m():g(),m),[r,f]),(0,J.jsx)(DJ,{...o,...l,onClose:h,onMouseEnter:_,onMouseLeave:v,children:c})}dQ.displayName=`@mantine/notifications/NotificationContainer`;var fQ={root:`m_b37d9ac7`,notification:`m_5ed0edd0`};function pQ(){return pQ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pQ.apply(null,arguments)}function mQ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function hQ(e,t){return hQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},hQ(e,t)}function gQ(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,hQ(e,t)}var _Q={disabled:!1},vQ=q.createContext(null),yQ=function(e){return e.scrollTop},bQ=`unmounted`,xQ=`exited`,SQ=`entering`,CQ=`entered`,wQ=`exiting`,TQ=function(e){gQ(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=xQ,r.appearStatus=SQ):o=CQ:o=t.unmountOnExit||t.mountOnEnter?bQ:xQ,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:xQ}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=SQ):(n===`entering`||n===`entered`)&&(t=wQ)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null)if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:MN.default.findDOMNode(this);n&&yQ(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:bQ})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[MN.default.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||_Q.disabled){this.safeSetState({status:CQ},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:SQ},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:CQ},function(){t.props.onEntered(a,o)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:MN.default.findDOMNode(this);if(!t||_Q.disabled){this.safeSetState({status:xQ},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:wQ},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:xQ},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:MN.default.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=mQ(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return q.createElement(vQ.Provider,{value:null},typeof n==`function`?n(e,r):q.cloneElement(q.Children.only(n),r))},t}(q.Component);TQ.contextType=vQ,TQ.propTypes={};function EQ(){}TQ.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:EQ,onEntering:EQ,onEntered:EQ,onExit:EQ,onExiting:EQ,onExited:EQ},TQ.UNMOUNTED=bQ,TQ.EXITED=xQ,TQ.ENTERING=SQ,TQ.ENTERED=CQ,TQ.EXITING=wQ;function DQ(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function OQ(e,t){var n=function(e){return t&&(0,q.isValidElement)(e)?t(e):e},r=Object.create(null);return e&&q.Children.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function kQ(e,t){e||={},t||={};function n(n){return n in t?t[n]:e[n]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var l=r[c][o];s[r[c][o]]=n(l)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function AQ(e,t,n){return n[t]==null?e.props[t]:n[t]}function jQ(e,t){return OQ(e.children,function(n){return(0,q.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:AQ(n,`appear`,e),enter:AQ(n,`enter`,e),exit:AQ(n,`exit`,e)})})}function MQ(e,t,n){var r=OQ(e.children),i=kQ(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if((0,q.isValidElement)(o)){var s=a in t,c=a in r,l=t[a],u=(0,q.isValidElement)(l)&&!l.props.in;c&&(!s||u)?i[a]=(0,q.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:AQ(o,`exit`,e),enter:AQ(o,`enter`,e)}):!c&&s&&!u?i[a]=(0,q.cloneElement)(o,{in:!1}):c&&s&&(0,q.isValidElement)(l)&&(i[a]=(0,q.cloneElement)(o,{onExited:n.bind(null,o),in:l.props.in,exit:AQ(o,`exit`,e),enter:AQ(o,`enter`,e)}))}}),i}var NQ=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},PQ={component:`div`,childFactory:function(e){return e}},FQ=function(e){gQ(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.state={contextValue:{isMounting:!0},handleExited:r.handleExited.bind(DQ(r)),firstRender:!0},r}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?jQ(e,r):MQ(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=OQ(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=pQ({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=mQ(e,[`component`,`childFactory`]),i=this.state.contextValue,a=NQ(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,t===null?q.createElement(vQ.Provider,{value:i},a):q.createElement(vQ.Provider,{value:i},q.createElement(t,r,a))},t}(q.Component);FQ.propTypes={},FQ.defaultProps=PQ;var IQ=TQ,LQ={position:`bottom-right`,autoClose:4e3,transitionDuration:250,containerWidth:440,notificationMaxHeight:200,limit:5,zIndex:lM(`overlay`),store:XZ,withinPortal:!0,pauseResetOnHover:`all`},RQ=HN((e,{zIndex:t,containerWidth:n})=>({root:{"--notifications-z-index":t?.toString(),"--notifications-container-width":X(n)}})),zQ=Q(e=>{let t=Z(`Notifications`,LQ,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,position:l,autoClose:u,transitionDuration:d,containerWidth:f,notificationMaxHeight:p,limit:m,zIndex:h,store:g,portalProps:_,withinPortal:v,pauseResetOnHover:y,...b}=t,x=UP(),S=ZZ(g),C=qM(),w=nN(),T=(0,q.useRef)({}),E=(0,q.useRef)(0),[D,O]=(0,q.useState)(0),k=(0,q.useCallback)(()=>O(e=>e+1),[]),A=(0,q.useCallback)(()=>O(e=>Math.max(0,e-1)),[]),j=x.respectReducedMotion&&w?1:d,M=bF({name:`Notifications`,classes:fQ,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,vars:s,varsResolver:RQ});(0,q.useEffect)(()=>{g?.updateState(e=>({...e,limit:m||5,defaultPosition:l}))},[m,l]),PM(()=>{S.notifications.length>E.current&&setTimeout(()=>C(),0),E.current=S.notifications.length},[S.notifications]);let N=oQ(S.notifications,l),P=aQ.reduce((e,t)=>(e[t]=N[t].map(({style:e,...n})=>(0,J.jsx)(IQ,{timeout:j,onEnter:()=>T.current[n.id].offsetHeight,nodeRef:{current:T.current[n.id]},children:r=>(0,J.jsx)(dQ,{ref:e=>{e&&(T.current[n.id]=e)},data:n,onHide:e=>eQ(e,g),autoClose:u,paused:y===`all`?D>0:!1,onHoverStart:k,onHoverEnd:A,...M(`notification`,{style:{...lQ({state:r,position:t,transitionDuration:j,maxHeight:p}),...e}})})},n.id)),e),{});return(0,J.jsxs)(UB,{withinPortal:v,..._,children:[(0,J.jsx)($,{...M(`root`),"data-position":`top-center`,...b,children:(0,J.jsx)(FQ,{children:P[`top-center`]})}),(0,J.jsx)($,{...M(`root`),"data-position":`top-left`,...b,children:(0,J.jsx)(FQ,{children:P[`top-left`]})}),(0,J.jsx)($,{...M(`root`,{className:XH.classNames.fullWidth}),"data-position":`top-right`,...b,children:(0,J.jsx)(FQ,{children:P[`top-right`]})}),(0,J.jsx)($,{...M(`root`,{className:XH.classNames.fullWidth}),"data-position":`bottom-right`,...b,children:(0,J.jsx)(FQ,{children:P[`bottom-right`]})}),(0,J.jsx)($,{...M(`root`),"data-position":`bottom-left`,...b,children:(0,J.jsx)(FQ,{children:P[`bottom-left`]})}),(0,J.jsx)($,{...M(`root`),"data-position":`bottom-center`,...b,children:(0,J.jsx)(FQ,{children:P[`bottom-center`]})})]})});zQ.classes=fQ,zQ.varsResolver=RQ,zQ.displayName=`@mantine/notifications/Notifications`,zQ.show=iQ.show,zQ.hide=iQ.hide,zQ.update=iQ.update,zQ.clean=iQ.clean,zQ.cleanQueue=iQ.cleanQueue,zQ.updateState=iQ.updateState;var BQ={outline:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},filled:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`currentColor`,stroke:`none`}},VQ=(e,t,n,r)=>{let i=(0,q.forwardRef)(({color:n=`currentColor`,size:i=24,stroke:a=2,title:o,className:s,children:c,...l},u)=>(0,q.createElement)(`svg`,{ref:u,...BQ[e],width:i,height:i,className:[`tabler-icon`,`tabler-icon-${t}`,s].join(` `),...e===`filled`?{fill:n}:{strokeWidth:a,stroke:n},...l},[o&&(0,q.createElement)(`title`,{key:`svg-title`},o),...r.map(([e,t])=>(0,q.createElement)(e,t)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i},HQ=VQ(`outline`,`alert-triangle`,`AlertTriangle`,[[`path`,{d:`M12 9v4`,key:`svg-0`}],[`path`,{d:`M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0`,key:`svg-1`}],[`path`,{d:`M12 16h.01`,key:`svg-2`}]]),UQ=VQ(`outline`,`arrow-left`,`ArrowLeft`,[[`path`,{d:`M5 12l14 0`,key:`svg-0`}],[`path`,{d:`M5 12l6 6`,key:`svg-1`}],[`path`,{d:`M5 12l6 -6`,key:`svg-2`}]]),WQ=VQ(`outline`,`at`,`At`,[[`path`,{d:`M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0`,key:`svg-0`}],[`path`,{d:`M16 12v1.5a2.5 2.5 0 0 0 5 0v-1.5a9 9 0 1 0 -5.5 8.28`,key:`svg-1`}]]),GQ=VQ(`outline`,`calendar`,`Calendar`,[[`path`,{d:`M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12`,key:`svg-0`}],[`path`,{d:`M16 3v4`,key:`svg-1`}],[`path`,{d:`M8 3v4`,key:`svg-2`}],[`path`,{d:`M4 11h16`,key:`svg-3`}],[`path`,{d:`M11 15h1`,key:`svg-4`}],[`path`,{d:`M12 15v3`,key:`svg-5`}]]),KQ=VQ(`outline`,`check`,`Check`,[[`path`,{d:`M5 12l5 5l10 -10`,key:`svg-0`}]]),qQ=VQ(`outline`,`chevron-down`,`ChevronDown`,[[`path`,{d:`M6 9l6 6l6 -6`,key:`svg-0`}]]),JQ=VQ(`outline`,`chevron-right`,`ChevronRight`,[[`path`,{d:`M9 6l6 6l-6 6`,key:`svg-0`}]]),YQ=VQ(`outline`,`clock`,`Clock`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 7v5l3 3`,key:`svg-1`}]]),XQ=VQ(`outline`,`color-picker`,`ColorPicker`,[[`path`,{d:`M11 7l6 6`,key:`svg-0`}],[`path`,{d:`M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4`,key:`svg-1`}]]),ZQ=VQ(`outline`,`copy`,`Copy`,[[`path`,{d:`M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666`,key:`svg-0`}],[`path`,{d:`M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1`,key:`svg-1`}]]),QQ=VQ(`outline`,`file`,`File`,[[`path`,{d:`M14 3v4a1 1 0 0 0 1 1h4`,key:`svg-0`}],[`path`,{d:`M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2`,key:`svg-1`}]]),$Q=VQ(`outline`,`filter`,`Filter`,[[`path`,{d:`M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227`,key:`svg-0`}]]),e$=VQ(`outline`,`grip-vertical`,`GripVertical`,[[`path`,{d:`M8 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-0`}],[`path`,{d:`M8 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-1`}],[`path`,{d:`M8 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-2`}],[`path`,{d:`M14 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-3`}],[`path`,{d:`M14 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-4`}],[`path`,{d:`M14 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-5`}]]),t$=VQ(`outline`,`hash`,`Hash`,[[`path`,{d:`M5 9l14 0`,key:`svg-0`}],[`path`,{d:`M5 15l14 0`,key:`svg-1`}],[`path`,{d:`M11 4l-4 16`,key:`svg-2`}],[`path`,{d:`M17 4l-4 16`,key:`svg-3`}]]),n$=VQ(`outline`,`info-circle`,`InfoCircle`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 9h.01`,key:`svg-1`}],[`path`,{d:`M11 12h1v4h1`,key:`svg-2`}]]),r$=VQ(`outline`,`info-triangle`,`InfoTriangle`,[[`path`,{d:`M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0`,key:`svg-0`}],[`path`,{d:`M12 9h.01`,key:`svg-1`}],[`path`,{d:`M11 12h1v4h1`,key:`svg-2`}]]),i$=VQ(`outline`,`key`,`Key`,[[`path`,{d:`M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0`,key:`svg-0`}],[`path`,{d:`M15 9h.01`,key:`svg-1`}]]),a$=VQ(`outline`,`language`,`Language`,[[`path`,{d:`M9 6.371c0 4.418 -2.239 6.629 -5 6.629`,key:`svg-0`}],[`path`,{d:`M4 6.371h7`,key:`svg-1`}],[`path`,{d:`M5 9c0 2.144 2.252 3.908 6 4`,key:`svg-2`}],[`path`,{d:`M12 20l4 -9l4 9`,key:`svg-3`}],[`path`,{d:`M19.1 18h-6.2`,key:`svg-4`}],[`path`,{d:`M6.694 3l.793 .582`,key:`svg-5`}]]),o$=VQ(`outline`,`layout-sidebar-left-collapse`,`LayoutSidebarLeftCollapse`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M9 4v16`,key:`svg-1`}],[`path`,{d:`M15 10l-2 2l2 2`,key:`svg-2`}]]),s$=VQ(`outline`,`layout-sidebar-right-collapse`,`LayoutSidebarRightCollapse`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M15 4v16`,key:`svg-1`}],[`path`,{d:`M9 10l2 2l-2 2`,key:`svg-2`}]]),c$=VQ(`outline`,`letter-case`,`LetterCase`,[[`path`,{d:`M14 15.5a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0 -7 0`,key:`svg-0`}],[`path`,{d:`M3 19v-10.5a3.5 3.5 0 0 1 7 0v10.5`,key:`svg-1`}],[`path`,{d:`M3 13h7`,key:`svg-2`}],[`path`,{d:`M21 12v7`,key:`svg-3`}]]),l$=VQ(`outline`,`link`,`Link`,[[`path`,{d:`M9 15l6 -6`,key:`svg-0`}],[`path`,{d:`M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464`,key:`svg-1`}],[`path`,{d:`M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463`,key:`svg-2`}]]),u$=VQ(`outline`,`list`,`List`,[[`path`,{d:`M9 6l11 0`,key:`svg-0`}],[`path`,{d:`M9 12l11 0`,key:`svg-1`}],[`path`,{d:`M9 18l11 0`,key:`svg-2`}],[`path`,{d:`M5 6l0 .01`,key:`svg-3`}],[`path`,{d:`M5 12l0 .01`,key:`svg-4`}],[`path`,{d:`M5 18l0 .01`,key:`svg-5`}]]),d$=VQ(`outline`,`mail`,`Mail`,[[`path`,{d:`M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10`,key:`svg-0`}],[`path`,{d:`M3 7l9 6l9 -6`,key:`svg-1`}]]),f$=VQ(`outline`,`moon`,`Moon`,[[`path`,{d:`M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454l0 .008`,key:`svg-0`}]]),p$=VQ(`outline`,`palette`,`Palette`,[[`path`,{d:`M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25`,key:`svg-0`}],[`path`,{d:`M7.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-1`}],[`path`,{d:`M11.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-2`}],[`path`,{d:`M15.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-3`}]]),m$=VQ(`outline`,`phone`,`Phone`,[[`path`,{d:`M5 4h4l2 5l-2.5 1.5a11 11 0 0 0 5 5l1.5 -2.5l5 2v4a2 2 0 0 1 -2 2a16 16 0 0 1 -15 -15a2 2 0 0 1 2 -2`,key:`svg-0`}]]),h$=VQ(`outline`,`plus`,`Plus`,[[`path`,{d:`M12 5l0 14`,key:`svg-0`}],[`path`,{d:`M5 12l14 0`,key:`svg-1`}]]),g$=VQ(`outline`,`search`,`Search`,[[`path`,{d:`M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0`,key:`svg-0`}],[`path`,{d:`M21 21l-6 -6`,key:`svg-1`}]]),_$=VQ(`outline`,`selector`,`Selector`,[[`path`,{d:`M8 9l4 -4l4 4`,key:`svg-0`}],[`path`,{d:`M16 15l-4 4l-4 -4`,key:`svg-1`}]]),v$=VQ(`outline`,`square-rounded`,`SquareRounded`,[[`path`,{d:`M12 3c7.2 0 9 1.8 9 9c0 7.2 -1.8 9 -9 9c-7.2 0 -9 -1.8 -9 -9c0 -7.2 1.8 -9 9 -9`,key:`svg-0`}]]),y$=VQ(`outline`,`sun`,`Sun`,[[`path`,{d:`M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0`,key:`svg-0`}],[`path`,{d:`M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7`,key:`svg-1`}]]),b$=VQ(`outline`,`toggle-left`,`ToggleLeft`,[[`path`,{d:`M6 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-0`}],[`path`,{d:`M2 12a6 6 0 0 1 6 -6h8a6 6 0 0 1 6 6a6 6 0 0 1 -6 6h-8a6 6 0 0 1 -6 -6`,key:`svg-1`}]]),x$=VQ(`outline`,`trash`,`Trash`,[[`path`,{d:`M4 7l16 0`,key:`svg-0`}],[`path`,{d:`M10 11l0 6`,key:`svg-1`}],[`path`,{d:`M14 11l0 6`,key:`svg-2`}],[`path`,{d:`M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12`,key:`svg-3`}],[`path`,{d:`M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3`,key:`svg-4`}]]),S$=VQ(`outline`,`x`,`X`,[[`path`,{d:`M18 6l-12 12`,key:`svg-0`}],[`path`,{d:`M6 6l12 12`,key:`svg-1`}]]),C$=class{raw=iQ;options={default:{radius:`md`,withBorder:!0,withCloseButton:!0,autoClose:5e3,position:`top-center`}};show(e){iQ.show({...this.options.default,...e})}info(e){typeof e==`string`&&(e={message:e}),this.show({color:`blue`,icon:(0,J.jsx)(n$,{size:20}),title:`Info`,message:`Information notification`,...e})}success(e){typeof e==`string`&&(e={message:e}),this.show({color:`green`,icon:(0,J.jsx)(KQ,{size:16}),title:`Success`,message:`Operation completed successfully`,...e})}warning(e){typeof e==`string`&&(e={message:e}),this.show({color:`yellow`,icon:(0,J.jsx)(HQ,{size:20}),title:`Warning`,message:`Please review this warning`,...e})}danger(e){typeof e==`string`&&(e={message:e}),this.show({color:`red`,icon:(0,J.jsx)(S$,{size:20}),title:`Error`,message:`An error occurred`,...e})}},w$=class{fetch(e,t={}){throw new p(`Fetch is not available for this environment.`)}render(e,t={}){throw new p(`Render is not available for this environment.`)}},T$=e=>x(E$,e),E$=class extends b{reactPageService=D(w$);onInit(){this.options.static&&(this.options.use??=[],this.options.use.some(e=>e[f]?.name===`$cache`)||this.options.use.push(QA({name:`page:${this.name}`,provider:`memory`,ttl:[1,`week`]})))}get name(){return this.options.name??this.config.propertyKey}async render(e){return this.reactPageService.render(this.name,e)}async fetch(e){return this.reactPageService.fetch(this.options.path||``,e)}};T$[u]=E$;var D$=class{routePathRegex=/^\/[A-Za-z0-9._~!$&%'()*+,;=:@{}?/-]*$/;tree={children:{}};cache=new Map;match(e){if(this.cache.has(e))return this.cache.get(e);let t=this.mapParams(this.createRouteMatch(e));return this.cache.set(e,t),t}test(e){if(!this.routePathRegex.test(e))throw new p(`Route '${e}' is not valid`)}push(e){let t=e.path.replaceAll(`//`,`/`);this.test(t);let n=this.createParts(t),r=this.tree;for(let i=0;i<n.length;i++){let a=i===n.length-1,o=n[i].toLowerCase();if(o===`*`&&a){r.wildcard={route:e};break}if(o.includes(`*`))throw new p(`Route '${t}' has an invalid wildcard syntax`);if(o.includes(`{`)||o.includes(`}`))if(o.startsWith(`{`)&&o.endsWith(`}`))o=`:${o.slice(1,-1)}`;else throw new p(`Route '${t}' has an invalid param syntax`);if(o.startsWith(`:`)){let o=n[i].slice(1).replaceAll(`}`,``);if(!o)throw new p(`Route '${t}' has an empty param name`);r.param?r.param.name!==o&&(e.mapParams??={},e.mapParams[r.param.name]=o):r.param={name:o,children:{}},a&&(r.param.route=e),r=r.param;continue}r.children[o]||(r.children[o]={children:{}}),a&&(r.children[o].route=e),r=r.children[o]}}createRouteMatch(e){if(e[0]!==`/`)throw new p(`Path '${e}' must start with "/"`);let t=this.createParts(e),n=this.tree,r,i={};for(let e=0;e<t.length;e++){let a=t[e].toLowerCase();if(n.children[a])n.wildcard&&(r=n.wildcard),n=n.children[a];else if(n.param)n.wildcard&&(r=n.wildcard),i[n.param.name]=t[e],n=n.param;else if(n.wildcard)return i[`*`]=t.slice(e).join(`/`),{route:n.wildcard.route,params:i};else return{route:r?.route,params:i}}return n?.route?{route:n.route,params:i}:n.wildcard?{route:n.wildcard.route,params:i}:{route:r?.route,params:i}}mapParams(e){if(e.route?.mapParams&&e.params)for(let[t,n]of Object.entries(e.route.mapParams))e.params[t]&&(e.params[n]=e.params[t],delete e.params[t]);return e}createParts(e){let t=e.split(`?`)[0].replaceAll(`//`,`/`);return t.endsWith(`/`)&&t.length>1&&(t=t.slice(0,-1)),t.split(`/`).slice(1)}},O$=e=>(0,J.jsxs)(`div`,{style:{width:`100%`,minHeight:`90vh`,boxSizing:`border-box`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,textAlign:`center`,fontFamily:`system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`,padding:`2rem`,...e.style},children:[(0,J.jsx)(`div`,{style:{fontSize:`6rem`,fontWeight:200,lineHeight:1},children:`404`}),(0,J.jsx)(`div`,{style:{fontSize:`0.875rem`,marginTop:`1rem`,opacity:.6},children:`Page not found`})]}),k$=class extends p{redirect;constructor(e){super(`Redirection`),this.redirect=e}},A$=()=>{let[e]=vj(`alepha.react.router.state`);if(!e)throw new p(`Missing react router state`);return e},j$=`ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace`,M$=e=>e.alepha.isProduction()?(0,J.jsx)(F$,{error:e.error}):(0,J.jsx)(N$,{...e}),N$=e=>{let[t,n]=(0,q.useState)(!1),r=A$().url.pathname,i=()=>{let t=L$(e.error);typeof navigator<`u`&&navigator.clipboard&&(navigator.clipboard.writeText(t),n(!0),setTimeout(()=>n(!1),2e3))},a=R$(e.error);return(0,J.jsx)(`div`,{style:z$.overlay,children:(0,J.jsxs)(`div`,{style:z$.card,children:[(0,J.jsxs)(`div`,{style:z$.header,children:[(0,J.jsxs)(`div`,{style:z$.headerLeft,children:[(0,J.jsx)(`div`,{style:z$.icon,children:`!`}),(0,J.jsx)(`div`,{style:z$.title,children:e.error.name||`Error`})]}),(0,J.jsxs)(`div`,{style:z$.headerRight,children:[e.onRetry&&(0,J.jsx)(`button`,{type:`button`,style:z$.retryBtn,onClick:e.onRetry,children:`Retry`}),(0,J.jsx)(`button`,{type:`button`,style:z$.copyBtn,onClick:i,children:t?`Copied`:`Copy`})]})]}),(0,J.jsx)(P$,{error:e.error}),(0,J.jsxs)(`div`,{style:z$.meta,children:[r&&(0,J.jsx)(`span`,{style:z$.metaItem,children:r}),(0,J.jsx)(`span`,{style:z$.metaItem,children:new Date().toLocaleTimeString()}),a&&(0,J.jsx)(`span`,{style:z$.statusBadge,children:a})]})]})})},P$=e=>{let{error:t,depth:n=0}=e;return(0,J.jsxs)(J.Fragment,{children:[n>0&&(0,J.jsx)(`div`,{style:z$.causedBy,children:`Caused by:`}),(0,J.jsxs)(`pre`,{style:z$.messageBlock,children:[t.name,`: `,t.message]}),t.stack&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`div`,{style:z$.stackLabel,children:`STACK TRACE`}),(0,J.jsx)(`pre`,{style:z$.stackBlock,children:I$(t.stack)})]}),t.cause instanceof Error&&(0,J.jsx)(P$,{error:t.cause,depth:n+1})]})},F$=e=>{let t=e.error.requestId;return(0,J.jsx)(`div`,{style:B$.page,children:(0,J.jsxs)(`div`,{style:B$.card,children:[(0,J.jsx)(`div`,{style:B$.heading,children:`Something went wrong`}),(0,J.jsx)(`div`,{style:B$.subtitle,children:`We're having trouble processing your request.`}),t&&(0,J.jsxs)(`div`,{style:B$.refText,children:[`Reference: `,t]}),(0,J.jsxs)(`div`,{style:B$.actions,children:[(0,J.jsx)(`button`,{type:`button`,style:B$.reloadBtn,onClick:()=>{typeof window<`u`&&window.location.reload()},children:`Reload page`}),(0,J.jsx)(`a`,{href:`/`,style:B$.homeLink,children:`Go home`})]})]})})};function I$(e){return e.split(`
69
+ `).slice(1).map(e=>e.trim()).join(`
70
+ `)}function L$(e){let t=[],n=(e,r)=>{r>0&&t.push(`
71
+ Caused by:`),t.push(`${e.name}: ${e.message}`),e.stack&&t.push(I$(e.stack)),e.cause instanceof Error&&n(e.cause,r+1)};return n(e,0),t.join(`
72
+ `)}function R$(e){if(`status`in e&&typeof e.status==`number`)return e.status}var z$={overlay:{position:`fixed`,inset:0,zIndex:2147483647,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:`24px`,backgroundColor:`rgba(0, 0, 0, 0.75)`,backdropFilter:`blur(4px)`,fontFamily:j$,fontSize:`13px`,color:`#e5e7eb`,boxSizing:`border-box`,overflow:`auto`},card:{width:`100%`,maxWidth:`900px`,maxHeight:`90vh`,overflow:`auto`,padding:`24px`,backgroundColor:`#111`,borderLeft:`4px solid #ef4444`,borderRadius:`8px`,boxShadow:`0 25px 50px rgba(0, 0, 0, 0.5)`},header:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:`20px`,flexWrap:`wrap`,gap:`12px`},headerLeft:{display:`flex`,alignItems:`center`,gap:`12px`,minWidth:0},headerRight:{display:`flex`,gap:`8px`,flexShrink:0},icon:{width:`28px`,height:`28px`,borderRadius:`50%`,backgroundColor:`#ef4444`,color:`#fff`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontWeight:700,fontSize:`16px`,flexShrink:0},title:{color:`#f87171`,fontSize:`18px`,fontWeight:700},retryBtn:{padding:`6px 16px`,backgroundColor:`#2563eb`,color:`#fff`,border:`none`,borderRadius:`6px`,cursor:`pointer`,fontFamily:j$,fontSize:`12px`,fontWeight:600},copyBtn:{padding:`6px 16px`,backgroundColor:`transparent`,color:`#9ca3af`,border:`1px solid #374151`,borderRadius:`6px`,cursor:`pointer`,fontFamily:j$,fontSize:`12px`,fontWeight:600},messageBlock:{margin:`0 0 12px`,padding:`12px`,backgroundColor:`#1f2937`,borderRadius:`6px`,color:`#f9fafb`,fontSize:`13px`,lineHeight:1.6,whiteSpace:`pre-wrap`,wordBreak:`break-word`,overflow:`auto`},stackLabel:{fontSize:`10px`,color:`#6b7280`,textTransform:`uppercase`,letterSpacing:`1.5px`,marginBottom:`6px`,fontWeight:600},stackBlock:{margin:`0 0 20px`,padding:`12px`,backgroundColor:`#0f172a`,borderRadius:`6px`,color:`#94a3b8`,fontSize:`12px`,lineHeight:1.6,whiteSpace:`pre-wrap`,wordBreak:`break-all`,overflow:`auto`},causedBy:{fontSize:`10px`,color:`#6b7280`,textTransform:`uppercase`,letterSpacing:`1.5px`,marginBottom:`8px`,paddingTop:`12px`,borderTop:`1px solid #374151`,fontWeight:600},meta:{display:`flex`,gap:`16px`,alignItems:`center`,paddingTop:`12px`,borderTop:`1px solid #1f2937`,flexWrap:`wrap`},metaItem:{fontSize:`11px`,color:`#6b7280`},statusBadge:{fontSize:`11px`,color:`#fbbf24`,backgroundColor:`#422006`,padding:`2px 8px`,borderRadius:`4px`,fontWeight:600}},B$={page:{minHeight:`100vh`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#0f172a`,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`,padding:`24px`},card:{textAlign:`center`,maxWidth:`440px`},heading:{fontSize:`28px`,fontWeight:700,color:`#f1f5f9`,marginBottom:`12px`},subtitle:{fontSize:`16px`,color:`#94a3b8`,marginBottom:`24px`,lineHeight:1.5},refText:{fontSize:`13px`,color:`#64748b`,marginBottom:`24px`,fontFamily:j$},actions:{display:`flex`,gap:`12px`,justifyContent:`center`,alignItems:`center`},reloadBtn:{padding:`10px 24px`,backgroundColor:`#2563eb`,color:`#fff`,border:`none`,borderRadius:`8px`,cursor:`pointer`,fontSize:`14px`,fontWeight:600},homeLink:{padding:`10px 24px`,color:`#94a3b8`,textDecoration:`none`,fontSize:`14px`}},V$=(0,q.createContext)(void 0),H$=(0,q.memo)(e=>{let t=(0,q.use)(V$),n=t?.index??0,r=t?.onError,i=A$(),a=jA(),[o,s]=(0,q.useState)(0),[c,l]=(0,q.useState)(i.layers[n]?.element),[u,d]=(0,q.useState)(``),f=(0,q.useRef)(0),p=(0,q.useRef)(0);_j({"react:transition:begin":async({previous:e,state:t})=>{let r=e.layers[n];if(!r||`${t.url.pathname}/`.startsWith(`${r.path}/`))return;let i=U$(r.route?.animation,t,`exit`);if(i){let e=i.duration||200;p.current=Date.now(),f.current=e,d(i.animation)}else p.current=0,f.current=0,d(``)},"react:transition:end":async({state:e})=>{let t=e.layers[n];if(p.current){let e=f.current,t=Date.now()-p.current;t<e&&await new Promise(n=>setTimeout(n,e-t))}if(!t?.cache){l(t?.element);let n=U$(t?.route?.animation,e,`enter`);d(n?n.animation:``)}}},[]);let m=c??e.children??null;return u&&(m=(0,J.jsx)(`div`,{style:{display:`flex`,flex:1,height:`100%`,width:`100%`,position:`relative`,overflow:`hidden`},children:(0,J.jsx)(`div`,{style:{height:`100%`,width:`100%`,display:`flex`,animation:u},children:m})})),e.errorBoundary===!1?(0,J.jsx)(J.Fragment,{children:m}):e.errorBoundary?(0,J.jsx)(lA,{fallback:e.errorBoundary,children:m},o):(0,J.jsx)(lA,{fallback:e=>{let t=r?.(e,i)??(0,J.jsx)(M$,{error:e,alepha:a});return t instanceof k$?`Redirection inside ErrorBoundary is not allowed.`:t},children:m},o)});function U$(e,t,n=`enter`){if(!e)return;let r=typeof e==`function`?e(t):e;if(typeof r==`string`)return n===`exit`?void 0:{duration:300,animation:`300ms ${r}`};if(typeof r==`object`){let e=r[n],t=typeof e==`object`?e.duration??300:300,i=typeof e==`object`?e.name:e;return{duration:t,animation:`${t}ms ${typeof e==`object`?e.timing??``:``} ${i}`}}}var W$=Vk({name:`alepha.react.page.options`,description:`Configuration options for the React page provider.`,schema:K.object({strictMode:K.boolean({default:!0}),staticFilePattern:K.string()}),default:{strictMode:!0,staticFilePattern:`\\.[a-zA-Z0-9]{1,10}$`}}),G$=class{dateTimeProvider=D(DA);log=VA();options=nA(W$);alepha=D(Wk);pages=[];nextIdCursor=0;configure=j({on:`configure`,handler:()=>{let e=!1,t=this.alepha.primitives(T$),n=e=>{if(e.options.parent)return!0;for(let n of t)if((n.options.children?Array.isArray(n.options.children)?n.options.children:n.options.children():[]).includes(e))return!0};for(let r of t)r.options.path===`/*`&&(e=!0),!n(r)&&this.add(this.map(t,r));!e&&t.length>0&&this.add({path:`/*`,name:`notFound`,component:O$,onServerResponse:({reply:e})=>{e.status=404}})}});getPages(){return this.pages}getConcretePages(){let e=[];for(let t of this.pages){if(t.children&&t.children.length>0)continue;let n=this.pathname(t.name);if(n.includes(`:`)||n.includes(`*`)){if(typeof t.static==`object`){let n=t.static.entries;if(n&&n.length>0)for(let r of n){let n=r.params,i=this.compile(t.path??``,n);!i.includes(`:`)&&!i.includes(`*`)&&e.push({...t,name:n[Object.keys(n)[0]],staticName:t.name,path:i,...r})}}continue}e.push(t)}return e}page(e){for(let t of this.pages)if(t.name===e)return t;throw new p(`Page '${e}' not found`)}pathname(e,t={}){let n=this.page(e);if(!n)throw new p(`Page ${e} not found`);let r=n.path??``,i=n.parent;for(;i;)r=`${i.path??``}/${r}`,i=i.parent;if(r=this.compile(r,t.params??{}),t.query){let e=new URLSearchParams(t.query);e.toString()&&(r+=`?${e.toString()}`)}return r.replace(/\/\/+/g,`/`)||`/`}url(e,t={}){return new URL(this.pathname(e,t),t.host??`http://localhost`)}root(e){let t=(0,q.createElement)(uA.Provider,{value:this.alepha},(0,q.createElement)(H$,{},e.layers[0]?.element));return this.options.strictMode?(0,q.createElement)(q.StrictMode,{},t):t}convertStringObjectToObject=(e,t)=>{if(K.schema.isObject(e)&&typeof t==`object`){for(let n in e.properties)if(K.schema.isObject(e.properties[n])&&typeof t[n]==`string`)try{t[n]=this.alepha.codec.decode(e.properties[n],decodeURIComponent(t[n]))}catch{}}return t};async createLayers(e,t,n=[]){let r={},i=[{route:e}],a=e.parent;for(;a;)i.unshift({route:a}),a=a.parent;let o=!1;for(let e=0;e<i.length;e++){let a=i[e],s=a.route,c={};try{this.convertStringObjectToObject(s.schema?.query,t.query),c.query=s.schema?.query?this.alepha.codec.decode(s.schema.query,t.query):{}}catch(e){a.error=e instanceof Error?e:Error(String(e));break}try{c.params=s.schema?.params?this.alepha.codec.decode(s.schema.params,t.params):{}}catch(e){a.error=e instanceof Error?e:Error(String(e));break}if(a.config={...c},n?.[e]&&!o&&n[e].name===s.name){let t=e=>e?e.replace(/\/\/+/g,`/`):`/`;if(JSON.stringify({part:t(n[e].part),params:n[e].config?.params??{}})===JSON.stringify({part:t(s.path),params:c.params??{}})){a.props=n[e].props,a.error=n[e].error,a.cache=!0,r={...r,...a.props};continue}o=!0}if(s.redirect)return{redirect:s.redirect};if(s.loader)try{let e=Object.create(t);Object.assign(e,c,r);let n=await s.loader?.(e)??{};a.props={...n},r={...r,...n}}catch(e){if(e instanceof k$)return{redirect:e.redirect};this.log.error(`Page loader has failed`,e),a.error=e instanceof Error?e:Error(String(e));break}}let s=``;for(let e=0;e<i.length;e++){let n=i[e],a=n.props??{},o={...n.config?.params};for(let e of Object.keys(o))o[e]=String(o[e]);s+=`/`,s+=n.route.path?this.compile(n.route.path,o):``;let c=s.replace(/\/+/,`/`),l=this.getErrorHandler(n.route);if(l){let e=t.onError;t.onError=(t,n)=>{let r=l(t,n);return r===void 0?e(t,n):r}}if(!n.error)try{let i=await this.createElement(n.route,{...n.route.props?n.route.props():{},...a,...r},t.url);t.layers.push({name:n.route.name,props:a,part:n.route.path,config:n.config,element:this.renderView(e+1,c,i,n.route),index:e+1,path:c,route:n.route,cache:n.cache})}catch(e){n.error=e instanceof Error?e:Error(String(e))}if(n.error)try{let r=await t.onError(n.error,t);if(r===void 0)throw n.error;if(r instanceof k$)return{redirect:r.redirect};r===null&&(r=this.renderError(n.error)),t.layers.push({props:a,error:n.error,name:n.route.name,part:n.route.path,config:n.config,element:this.renderView(e+1,c,r,n.route),index:e+1,path:c,route:n.route,cache:n.cache});break}catch(e){if(e instanceof k$)return{redirect:e.redirect};throw e}}return{state:t}}getErrorHandler(e){if(e.errorHandler)return e.errorHandler;let t=e.parent;for(;t;){if(t.errorHandler)return t.errorHandler;t=t.parent}}async createElement(e,t,n){if(e.lazy&&e.component&&this.log.warn(`Page ${e.name} has both lazy and component options, lazy will be used`),e.lazy)try{return(0,q.createElement)((await e.lazy()).default,t)}catch(e){if(this.alepha.isBrowser()&&this.isChunkLoadError(e)&&this.reloadAfterChunkError(n))return;throw e}if(e.component)return(0,q.createElement)(e.component,t)}isChunkLoadError(e){if(!(e instanceof Error))return!1;let t=e.message;return/Failed to fetch dynamically imported module/.test(t)||/error loading dynamically imported module/i.test(t)||/Unable to preload CSS/.test(t)||/Importing a module script failed/.test(t)}reloadAfterChunkError(e){let t=`alepha:chunk-reload`,n=sessionStorage.getItem(t),r=this.dateTimeProvider.nowMillis();return n&&r-Number(n)<1e4?(this.log.error(`Chunk load failed after recent reload, not retrying to avoid loop`),!1):(this.log.warn(`Chunk load failed after deployment, reloading page`),sessionStorage.setItem(t,String(r)),window.location.assign(e?e.pathname+e.search:window.location.href),!0)}renderError(e){return(0,q.createElement)(M$,{error:e,alepha:this.alepha})}renderEmptyView(){return(0,q.createElement)(H$,{})}href(e,t={}){let n=this.pages.find(t=>t.name===e.options.name);if(!n)throw new p(`Page ${e.options.name} not found`);let r=n.path??``,i=n.parent;for(;i;)r=`${i.path??``}/${r}`,i=i.parent;return r=this.compile(r,t),r.replace(/\/\/+/g,`/`)||`/`}compile(e,t={}){for(let[n,r]of Object.entries(t))e=e.replace(`:${n}`,r);return e}renderView(e,t,n,r){n??=this.renderEmptyView();let i=r.client?(0,q.createElement)(cA,typeof r.client==`object`?r.client:{},n):n;return(0,q.createElement)(V$.Provider,{value:{index:e,path:t,onError:this.getErrorHandler(r)??(e=>this.renderError(e))}},i)}map(e,t){let n=t.options.children?Array.isArray(t.options.children)?t.options.children:t.options.children():[];return n.push(...(t=>{let n=[];for(let r of e)r.options.parent===t&&n.push(r);return n})(t)),{...t.options,name:t.name,parent:void 0,children:n.map(t=>this.map(e,t))}}add(e){if(this.alepha.isReady())throw new p(`Router is already initialized`);e.name??=this.nextId();let t=e;if(t.match=this.createMatch(t),this.pages.push(t),t.children)for(let e of t.children)e.parent=t,this.add(e)}createMatch(e){let t=e.path??`/`,n=e.parent;for(;n;)t=`${n.path??``}/${t}`,n=n.parent;let r=t.replace(/\/\/+/g,`/`);return r.endsWith(`/`)&&r!==`/`&&(r=r.slice(0,-1)),r}nextId(){return this.nextIdCursor+=1,`P${this.nextIdCursor}`}},K$=e=>e&&typeof e==`object`&&typeof e.path==`string`&&typeof e.page==`object`,q$=class extends D${log=VA();alepha=D(Wk);pageApi=D(G$);browserHeadProvider=D(Aj);add(e){this.pageApi.add(e)}configure=j({on:`configure`,handler:async()=>{for(let e of this.pageApi.getPages())(e.component||e.lazy||e.redirect)&&this.push({path:e.match,page:e})}});async transition(e,t=[],n={},r=()=>!1){let{pathname:i,search:a}=e,o={url:e,query:{},params:{},layers:[],onError:()=>null,meta:n};await this.alepha.events.emit(`react:action:begin`,{type:`transition`}),await this.alepha.events.emit(`react:transition:begin`,{previous:this.alepha.store.get(`alepha.react.router.state`),state:o});try{let{route:e,params:n}=this.match(i),s={};if(a)for(let[e,t]of new URLSearchParams(a).entries())s[e]=String(t);if(e?.page.can&&!e.page.can())throw new sj(`Access denied to this page.`);if(o.name=e?.page.name,o.query=s,o.params=n??{},K$(e)){let{redirect:n}=await this.pageApi.createLayers(e.page,o,t);if(r())return;if(n)return n}o.layers.length===0&&o.layers.push({name:`not-found`,element:(0,q.createElement)(O$),index:0,path:`/`}),await this.alepha.events.emit(`react:action:success`,{type:`transition`}),await this.alepha.events.emit(`react:transition:success`,{state:o})}catch(e){if(r())return;this.log.error(`Transition has failed`,e);let t;try{let n=o.onError(e,o);n!=null&&!(n instanceof k$)&&(t=n)}catch{}o.layers=[{name:`error`,element:t??this.pageApi.renderError(e),index:0,path:`/`}],await this.alepha.events.emit(`react:action:error`,{type:`transition`,error:e}),await this.alepha.events.emit(`react:transition:error`,{error:e,state:o})}if(!r()){if(t)for(let e=0;e<t.length;e++){let n=t[e];o.layers[e]?.name!==n.name&&n.name!==`error`&&this.pageApi.page(n.name)?.onLeave?.()}for(let e=0;e<o.layers.length;e++){let n=o.layers[e];t?.[e]?.name!==n.name&&n.name!==`error`&&this.pageApi.page(n.name)?.onEnter?.()}this.alepha.store.set(`alepha.react.router.state`,o),await this.alepha.events.emit(`react:action:end`,{type:`transition`}),await this.alepha.events.emit(`react:transition:end`,{state:o}),this.browserHeadProvider.fillAndRenderHead(o)}}root(e){return this.pageApi.root(e)}},J$=Vk({name:`alepha.react.browser.options`,schema:K.object({scrollRestoration:K.enum([`top`,`manual`])}),default:{scrollRestoration:`top`}}),Y$=class{log=VA();client=D(fj);alepha=D(Wk);router=D(q$);dateTimeProvider=D(DA);browserHeadProvider=D(Aj);options=nA(J$);get rootId(){return`root`}getRootElement(){let e=this.document.getElementById(this.rootId);if(e)return e;let t=this.document.createElement(`div`);return t.id=this.rootId,this.document.body.prepend(t),t}transitioning;transitionId=0;get state(){return this.alepha.store.get(`alepha.react.router.state`)}get document(){return window.document}get history(){return window.history}get location(){return window.location}get base(){let e=`/__devtools`;return e===`/`?``:e}get url(){let e=this.location.pathname+this.location.search;return this.base?e.replace(this.base,``):e}pushState(e,t){let n=this.base+e;t?this.history.replaceState({},``,n):this.history.pushState({},``,n)}async invalidate(e){let t=[];if(this.log.trace(`Invalidating layers`),e){let[n]=Object.keys(e),r=e[n];for(let e of this.state.layers){if(e.props?.[n]){t.push({...e,props:{...e.props,[n]:r}});break}t.push(e)}}await this.render({previous:t})}async push(e,t={}){this.log.trace(`Going to ${e}`,{url:e,options:t});let n=++this.transitionId;if(await this.render({url:e,previous:t.force?[]:this.state.layers,meta:t.meta,transitionId:n}),n===this.transitionId){if(this.state.url.pathname+this.state.url.search!==e){this.pushState(this.state.url.pathname+this.state.url.search);return}this.pushState(e,t.replace)}}async render(e={}){let t=e.transitionId??++this.transitionId,n=e.previous??this.state.layers,r=e.url??this.url,i=this.dateTimeProvider.now();this.transitioning={to:r,from:this.state?.url.pathname},this.log.debug(`Transitioning...`,{to:r});let a=()=>this.transitionId!==t,o=await this.router.transition(new URL(`http://localhost${r}`),n,e.meta,a);if(a()){this.log.debug(`Transition superseded — discarding stale result`,{to:r});return}if(o)if(this.log.info(`Redirecting to`,{redirect:o}),o.startsWith(`http`))window.location.href=o;else return await this.render({url:o});let s=this.dateTimeProvider.now().diff(i);this.log.info(`Transition OK [${s}ms]`,this.transitioning),this.transitioning=void 0}getHydrationState(){try{let e=this.document.getElementById(`__ssr`);if(e?.textContent)return JSON.parse(e.textContent)}catch(e){console.error(e)}}onTransitionEnd=j({on:`react:transition:end`,handler:()=>{this.options.scrollRestoration===`top`&&typeof window<`u`&&!this.alepha.isTest()&&(this.log.trace(`Restoring scroll position to top`),window.scrollTo(0,0))}});ready=j({on:`ready`,handler:async()=>{let e=this.getHydrationState(),t=e?.[`alepha.react.router.layers`]??[];if(e)for(let[t,n]of Object.entries(e))t!==`alepha.react.router.layers`&&this.alepha.set(t,n);await this.render({previous:t});let n=this.router.root(this.state);await this.alepha.events.emit(`react:browser:render`,{element:n,root:this.getRootElement(),hydration:e,state:this.state}),window.addEventListener(`popstate`,()=>{this.base+this.state.url.pathname!==this.location.pathname&&(this.log.debug(`Popstate event triggered - rendering new state`,{url:this.location.pathname+this.location.search}),this.render())})}})},X$=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Z$=o(((e,t)=>{t.exports=X$()})),Q$=o((e=>{var t=Z$(),n=sA(),r=kN();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),D=Symbol.for(`react.memo_cache_sentinel`),O=Symbol.iterator;function k(e){return typeof e!=`object`||!e?null:(e=O&&e[O]||e[`@@iterator`],typeof e==`function`?e:null)}var A=Symbol.for(`react.client.reference`);function j(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===A?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case E:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?j(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return j(e(t))}catch{}}return null}var M=Array.isArray,N=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},ee=[],I=-1;function te(e){return{current:e}}function ne(e){0>I||(e.current=ee[I],ee[I]=null,I--)}function L(e,t){I++,ee[I]=e.current,e.current=t}var re=te(null),ie=te(null),ae=te(null),oe=te(null);function se(e,t){switch(L(ae,t),L(ie,e),L(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Kd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Kd(t),e=qd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ne(re),L(re,e)}function ce(){ne(re),ne(ie),ne(ae)}function le(e){e.memoizedState!==null&&L(oe,e);var t=re.current,n=qd(t,e.type);t!==n&&(L(ie,e),L(re,n))}function ue(e){ie.current===e&&(ne(re),ne(ie)),oe.current===e&&(ne(oe),rp._currentValue=F)}var R,de;function z(e){if(R===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);R=t&&t[1]||``,de=-1<e.stack.indexOf(`
73
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
74
+ `+R+e+de}var fe=!1;function pe(e,t){if(!e||fe)return``;fe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
75
+ `),l=s.split(`
76
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
77
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{fe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?z(n):``}function me(e,t){switch(e.tag){case 26:case 27:case 5:return z(e.type);case 16:return z(`Lazy`);case 13:return e.child!==t&&t!==null?z(`Suspense Fallback`):z(`Suspense`);case 19:return z(`SuspenseList`);case 0:case 15:return pe(e.type,!1);case 11:return pe(e.type.render,!1);case 1:return pe(e.type,!0);case 31:return z(`Activity`);default:return``}}function he(e){try{var t=``,n=null;do t+=me(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
78
+ Error generating stack: `+e.message+`
79
+ `+e.stack}}var ge=Object.prototype.hasOwnProperty,_e=t.unstable_scheduleCallback,ve=t.unstable_cancelCallback,ye=t.unstable_shouldYield,be=t.unstable_requestPaint,B=t.unstable_now,xe=t.unstable_getCurrentPriorityLevel,V=t.unstable_ImmediatePriority,H=t.unstable_UserBlockingPriority,Se=t.unstable_NormalPriority,Ce=t.unstable_LowPriority,we=t.unstable_IdlePriority,Te=t.log,Ee=t.unstable_setDisableYieldValue,De=null,Oe=null;function ke(e){if(typeof Te==`function`&&Ee(e),Oe&&typeof Oe.setStrictMode==`function`)try{Oe.setStrictMode(De,e)}catch{}}var Ae=Math.clz32?Math.clz32:Ne,je=Math.log,Me=Math.LN2;function Ne(e){return e>>>=0,e===0?32:31-(je(e)/Me|0)|0}var U=256,Pe=262144,Fe=4194304;function Ie(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Le(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ie(n))):i=Ie(o):i=Ie(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ie(n))):i=Ie(o)):i=Ie(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Re(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ze(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Be(){var e=Fe;return Fe<<=1,!(Fe&62914560)&&(Fe=4194304),e}function Ve(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function He(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ue(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ae(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&We(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function We(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ae(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ge(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ae(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Ke(e,t){var n=t&-t;return n=n&42?1:qe(n),(n&(e.suspendedLanes|t))===0?n:0}function qe(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Je(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Ye(){var e=P.p;return e===0?(e=window.event,e===void 0?32:yp(e.type)):e}function Xe(e,t){var n=P.p;try{return P.p=e,t()}finally{P.p=n}}var Ze=Math.random().toString(36).slice(2),Qe=`__reactFiber$`+Ze,$e=`__reactProps$`+Ze,et=`__reactContainer$`+Ze,tt=`__reactEvents$`+Ze,nt=`__reactListeners$`+Ze,rt=`__reactHandles$`+Ze,it=`__reactResources$`+Ze,at=`__reactMarker$`+Ze;function ot(e){delete e[Qe],delete e[$e],delete e[tt],delete e[nt],delete e[rt]}function st(e){var t=e[Qe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[et]||n[Qe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=gf(e);e!==null;){if(n=e[Qe])return n;e=gf(e)}return t}e=n,n=e.parentNode}return null}function ct(e){if(e=e[Qe]||e[et]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function lt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function ut(e){var t=e[it];return t||=e[it]={hoistableStyles:new Map,hoistableScripts:new Map},t}function dt(e){e[at]=!0}var ft=new Set,pt={};function mt(e,t){ht(e,t),ht(e+`Capture`,t)}function ht(e,t){for(pt[e]=t,e=0;e<t.length;e++)ft.add(t[e])}var gt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),_t={},vt={};function yt(e){return ge.call(vt,e)?!0:ge.call(_t,e)?!1:gt.test(e)?vt[e]=!0:(_t[e]=!0,!1)}function bt(e,t,n){if(yt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function xt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function St(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Ct(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function wt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Tt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Et(e){if(!e._valueTracker){var t=wt(e)?`checked`:`value`;e._valueTracker=Tt(e,t,``+e[t])}}function Dt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=wt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Ot(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var kt=/[\n"\\]/g;function At(e){return e.replace(kt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function jt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Ct(t)):e.value!==``+Ct(t)&&(e.value=``+Ct(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Nt(e,o,Ct(n)):Nt(e,o,Ct(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Ct(s):e.removeAttribute(`name`)}function Mt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Et(e);return}n=n==null?``:``+Ct(n),t=t==null?n:``+Ct(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Et(e)}function Nt(e,t,n){t===`number`&&Ot(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Pt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Ct(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ft(e,t,n){if(t!=null&&(t=``+Ct(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Ct(n)}function It(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(M(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Ct(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Et(e)}function Lt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Rt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function zt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Rt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Bt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&zt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&zt(e,o,t[o])}function Vt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Ht=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Ut=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Wt(e){return Ut.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Gt(){}var Kt=null;function qt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jt=null,Yt=null;function Xt(e){var t=ct(e);if(t&&(e=t.stateNode)){var n=e[$e]||null;a:switch(e=t.stateNode,t.type){case`input`:if(jt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+At(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[$e]||null;if(!a)throw Error(i(90));jt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Dt(r)}break a;case`textarea`:Ft(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Pt(e,!!n.multiple,t,!1)}}}var Zt=!1;function Qt(e,t,n){if(Zt)return e(t,n);Zt=!0;try{return e(t)}finally{if(Zt=!1,(Jt!==null||Yt!==null)&&(Su(),Jt&&(t=Jt,e=Yt,Yt=Jt=null,Xt(t),e)))for(t=0;t<e.length;t++)Xt(e[t])}}function $t(e,t){var n=e.stateNode;if(n===null)return null;var r=n[$e]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var en=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),tn=!1;if(en)try{var nn={};Object.defineProperty(nn,`passive`,{get:function(){tn=!0}}),window.addEventListener(`test`,nn,nn),window.removeEventListener(`test`,nn,nn)}catch{tn=!1}var rn=null,an=null,on=null;function sn(){if(on)return on;var e,t=an,n=t.length,r,i=`value`in rn?rn.value:rn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return on=i.slice(e,1<r?1-r:void 0)}function cn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ln(){return!0}function un(){return!1}function dn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?ln:un,this.isPropagationStopped=un,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=ln)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=ln)},persist:function(){},isPersistent:ln}),t}var fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pn=dn(fn),mn=f({},fn,{view:0,detail:0}),hn=dn(mn),gn,_n,vn,yn=f({},mn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:An,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==vn&&(vn&&e.type===`mousemove`?(gn=e.screenX-vn.screenX,_n=e.screenY-vn.screenY):_n=gn=0,vn=e),gn)},movementY:function(e){return`movementY`in e?e.movementY:_n}}),bn=dn(yn),xn=dn(f({},yn,{dataTransfer:0})),Sn=dn(f({},mn,{relatedTarget:0})),Cn=dn(f({},fn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=dn(f({},fn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Tn=dn(f({},fn,{data:0})),En={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Dn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},On={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function kn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=On[e])?!!t[e]:!1}function An(){return kn}var jn=dn(f({},mn,{key:function(e){if(e.key){var t=En[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=cn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Dn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:An,charCode:function(e){return e.type===`keypress`?cn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?cn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Mn=dn(f({},yn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Nn=dn(f({},mn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:An})),Pn=dn(f({},fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Fn=dn(f({},yn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),In=dn(f({},fn,{newState:0,oldState:0})),Ln=[9,13,27,32],Rn=en&&`CompositionEvent`in window,zn=null;en&&`documentMode`in document&&(zn=document.documentMode);var Bn=en&&`TextEvent`in window&&!zn,Vn=en&&(!Rn||zn&&8<zn&&11>=zn),Hn=` `,Un=!1;function Wn(e,t){switch(e){case`keyup`:return Ln.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Gn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Kn=!1;function qn(e,t){switch(e){case`compositionend`:return Gn(t);case`keypress`:return t.which===32?(Un=!0,Hn):null;case`textInput`:return e=t.data,e===Hn&&Un?null:e;default:return null}}function Jn(e,t){if(Kn)return e===`compositionend`||!Rn&&Wn(e,t)?(e=sn(),on=an=rn=null,Kn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Vn&&t.locale!==`ko`?null:t.data;default:return null}}var Yn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Xn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Yn[e.type]:t===`textarea`}function Zn(e,t,n,r){Jt?Yt?Yt.push(r):Yt=[r]:Jt=r,t=Ad(t,`onChange`),0<t.length&&(n=new pn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Qn=null,$n=null;function er(e){Sd(e,0)}function tr(e){if(Dt(lt(e)))return e}function nr(e,t){if(e===`change`)return t}var rr=!1;if(en){var ir;if(en){var ar=`oninput`in document;if(!ar){var or=document.createElement(`div`);or.setAttribute(`oninput`,`return;`),ar=typeof or.oninput==`function`}ir=ar}else ir=!1;rr=ir&&(!document.documentMode||9<document.documentMode)}function sr(){Qn&&(Qn.detachEvent(`onpropertychange`,cr),$n=Qn=null)}function cr(e){if(e.propertyName===`value`&&tr($n)){var t=[];Zn(t,$n,e,qt(e)),Qt(er,t)}}function lr(e,t,n){e===`focusin`?(sr(),Qn=t,$n=n,Qn.attachEvent(`onpropertychange`,cr)):e===`focusout`&&sr()}function ur(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return tr($n)}function dr(e,t){if(e===`click`)return tr(t)}function fr(e,t){if(e===`input`||e===`change`)return tr(t)}function pr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var mr=typeof Object.is==`function`?Object.is:pr;function hr(e,t){if(mr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ge.call(t,i)||!mr(e[i],t[i]))return!1}return!0}function gr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _r(e,t){var n=gr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=gr(n)}}function vr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?vr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ot(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ot(e.document)}return t}function br(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var xr=en&&`documentMode`in document&&11>=document.documentMode,Sr=null,Cr=null,wr=null,Tr=!1;function Er(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Tr||Sr==null||Sr!==Ot(r)||(r=Sr,`selectionStart`in r&&br(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),wr&&hr(wr,r)||(wr=r,r=Ad(Cr,`onSelect`),0<r.length&&(t=new pn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Sr)))}function Dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Or={animationend:Dr(`Animation`,`AnimationEnd`),animationiteration:Dr(`Animation`,`AnimationIteration`),animationstart:Dr(`Animation`,`AnimationStart`),transitionrun:Dr(`Transition`,`TransitionRun`),transitionstart:Dr(`Transition`,`TransitionStart`),transitioncancel:Dr(`Transition`,`TransitionCancel`),transitionend:Dr(`Transition`,`TransitionEnd`)},kr={},Ar={};en&&(Ar=document.createElement(`div`).style,`AnimationEvent`in window||(delete Or.animationend.animation,delete Or.animationiteration.animation,delete Or.animationstart.animation),`TransitionEvent`in window||delete Or.transitionend.transition);function jr(e){if(kr[e])return kr[e];if(!Or[e])return e;var t=Or[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ar)return kr[e]=t[n];return e}var Mr=jr(`animationend`),Nr=jr(`animationiteration`),Pr=jr(`animationstart`),Fr=jr(`transitionrun`),Ir=jr(`transitionstart`),Lr=jr(`transitioncancel`),Rr=jr(`transitionend`),zr=new Map,Br=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Br.push(`scrollEnd`);function Vr(e,t){zr.set(e,t),mt(t,[e])}var Hr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Ur=[],Wr=0,Gr=0;function Kr(){for(var e=Wr,t=Gr=Wr=0;t<e;){var n=Ur[t];Ur[t++]=null;var r=Ur[t];Ur[t++]=null;var i=Ur[t];Ur[t++]=null;var a=Ur[t];if(Ur[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Xr(n,i,a)}}function qr(e,t,n,r){Ur[Wr++]=e,Ur[Wr++]=t,Ur[Wr++]=n,Ur[Wr++]=r,Gr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Jr(e,t,n,r){return qr(e,t,n,r),Zr(e)}function Yr(e,t){return qr(e,null,null,t),Zr(e)}function Xr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ae(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Zr(e){if(50<pu)throw pu=0,mu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Qr={};function $r(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ei(e,t,n,r){return new $r(e,t,n,r)}function ti(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ni(e,t){var n=e.alternate;return n===null?(n=ei(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ri(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ii(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ti(e)&&(s=1);else if(typeof e==`string`)s=Jf(e,n,re.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case E:return e=ei(31,n,t,a),e.elementType=E,e.lanes=o,e;case g:return ai(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=ei(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=ei(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=ei(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ei(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ai(e,t,n,r){return e=ei(7,e,r,t),e.lanes=n,e}function oi(e,t,n){return e=ei(6,e,null,t),e.lanes=n,e}function si(e){var t=ei(18,null,null,0);return t.stateNode=e,t}function ci(e,t,n){return t=ei(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var li=new WeakMap;function ui(e,t){if(typeof e==`object`&&e){var n=li.get(e);return n===void 0?(t={value:e,source:t,stack:he(t)},li.set(e,t),t):n}return{value:e,source:t,stack:he(t)}}var di=[],fi=0,pi=null,mi=0,hi=[],gi=0,_i=null,vi=1,yi=``;function bi(e,t){di[fi++]=mi,di[fi++]=pi,pi=e,mi=t}function xi(e,t,n){hi[gi++]=vi,hi[gi++]=yi,hi[gi++]=_i,_i=e;var r=vi;e=yi;var i=32-Ae(r)-1;r&=~(1<<i),n+=1;var a=32-Ae(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,vi=1<<32-Ae(t)+i|n<<i|r,yi=a+e}else vi=1<<a|n<<i|r,yi=e}function Si(e){e.return!==null&&(bi(e,1),xi(e,1,0))}function Ci(e){for(;e===pi;)pi=di[--fi],di[fi]=null,mi=di[--fi],di[fi]=null;for(;e===_i;)_i=hi[--gi],hi[gi]=null,yi=hi[--gi],hi[gi]=null,vi=hi[--gi],hi[gi]=null}function wi(e,t){hi[gi++]=vi,hi[gi++]=yi,hi[gi++]=_i,vi=t.id,yi=t.overflow,_i=e}var Ti=null,Ei=null,Di=!1,Oi=null,ki=!1,Ai=Error(i(519));function ji(e){throw Li(ui(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ai}function Mi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Qe]=e,t[$e]=r,n){case`dialog`:Cd(`cancel`,t),Cd(`close`,t);break;case`iframe`:case`object`:case`embed`:Cd(`load`,t);break;case`video`:case`audio`:for(n=0;n<bd.length;n++)Cd(bd[n],t);break;case`source`:Cd(`error`,t);break;case`img`:case`image`:case`link`:Cd(`error`,t),Cd(`load`,t);break;case`details`:Cd(`toggle`,t);break;case`input`:Cd(`invalid`,t),Mt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Cd(`invalid`,t);break;case`textarea`:Cd(`invalid`,t),It(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Id(t.textContent,n)?(r.popover!=null&&(Cd(`beforetoggle`,t),Cd(`toggle`,t)),r.onScroll!=null&&Cd(`scroll`,t),r.onScrollEnd!=null&&Cd(`scrollend`,t),r.onClick!=null&&(t.onclick=Gt),t=!0):t=!1,t||ji(e,!0)}function Ni(e){for(Ti=e.return;Ti;)switch(Ti.tag){case 5:case 31:case 13:ki=!1;return;case 27:case 3:ki=!0;return;default:Ti=Ti.return}}function Pi(e){if(e!==Ti)return!1;if(!Di)return Ni(e),Di=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Jd(e.type,e.memoizedProps)),n=!n),n&&Ei&&ji(e),Ni(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ei=hf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ei=hf(e)}else t===27?(t=Ei,nf(e.type)?(e=mf,mf=null,Ei=e):Ei=t):Ei=Ti?pf(e.stateNode.nextSibling):null;return!0}function Fi(){Ei=Ti=null,Di=!1}function Ii(){var e=Oi;return e!==null&&($l===null?$l=e:$l.push.apply($l,e),Oi=null),e}function Li(e){Oi===null?Oi=[e]:Oi.push(e)}var Ri=te(null),zi=null,Bi=null;function Vi(e,t,n){L(Ri,t._currentValue),t._currentValue=n}function Hi(e){e._currentValue=Ri.current,ne(Ri)}function Ui(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Wi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Ui(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Ui(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Gi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;mr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===oe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[rp]:e.push(rp))}a=a.return}e!==null&&Wi(t,e,n,r),t.flags|=262144}function Ki(e){for(e=e.firstContext;e!==null;){if(!mr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function qi(e){zi=e,Bi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ji(e){return Xi(zi,e)}function Yi(e,t){return zi===null&&qi(e),Xi(e,t)}function Xi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Bi===null){if(e===null)throw Error(i(308));Bi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Bi=Bi.next=t;return n}var Zi=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Qi=t.unstable_scheduleCallback,$i=t.unstable_NormalPriority,ea={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ta(){return{controller:new Zi,data:new Map,refCount:0}}function na(e){e.refCount--,e.refCount===0&&Qi($i,function(){e.controller.abort()})}var ra=null,ia=0,aa=0,oa=null;function sa(e,t){if(ra===null){var n=ra=[];ia=0,aa=md(),oa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ia++,t.then(ca,ca),t}function ca(){if(--ia===0&&ra!==null){oa!==null&&(oa.status=`fulfilled`);var e=ra;ra=null,aa=0,oa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function la(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ua=N.S;N.S=function(e,t){nu=B(),typeof t==`object`&&t&&typeof t.then==`function`&&sa(e,t),ua!==null&&ua(e,t)};var da=te(null);function fa(){var e=da.current;return e===null?Ll.pooledCache:e}function pa(e,t){t===null?L(da,da.current):L(da,t.pool)}function ma(){var e=fa();return e===null?null:{parent:ea._currentValue,pool:e}}var ha=Error(i(460)),ga=Error(i(474)),_a=Error(i(542)),va={then:function(){}};function ya(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ba(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Gt,Gt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,wa(e),e;default:if(typeof t.status==`string`)t.then(Gt,Gt);else{if(e=Ll,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,wa(e),e}throw Sa=t,ha}}function xa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Sa=e,ha):e}}var Sa=null;function Ca(){if(Sa===null)throw Error(i(459));var e=Sa;return Sa=null,e}function wa(e){if(e===ha||e===_a)throw Error(i(483))}var Ta=null,Ea=0;function Da(e){var t=Ea;return Ea+=1,Ta===null&&(Ta=[]),ba(Ta,e,t)}function Oa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function ka(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Aa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ni(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=oi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&xa(i)===t.type)?(t=a(t,n.props),Oa(t,n),t.return=e,t):(t=ii(n.type,n.key,n.props,null,e.mode,r),Oa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ci(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=ai(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=oi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=ii(t.type,t.key,t.props,null,e.mode,n),Oa(n,t),n.return=e,n;case h:return t=ci(t,e.mode,n),t.return=e,t;case T:return t=xa(t),f(e,t,n)}if(M(t)||k(t))return t=ai(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Da(t),n);if(t.$$typeof===b)return f(e,Yi(e,t),n);ka(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=xa(n),p(e,t,n,r)}if(M(n)||k(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Da(n),r);if(n.$$typeof===b)return p(e,t,Yi(e,n),r);ka(e,n)}return null}function _(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=xa(r),_(e,t,n,r,i)}if(M(r)||k(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,Da(r),i);if(r.$$typeof===b)return _(e,t,n,Yi(t,r),i);ka(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),Di&&bi(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return Di&&bi(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),Di&&bi(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),Di&&bi(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return Di&&bi(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),Di&&bi(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&xa(l)===r.type){n(e,r.sibling),c=a(r,o.props),Oa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===g?(c=ai(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ii(o.type,o.key,o.props,null,e.mode,c),Oa(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ci(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=xa(o),x(e,r,o,c)}if(M(o))return v(e,r,o,c);if(k(o)){if(l=k(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Da(o),c);if(o.$$typeof===b)return x(e,r,Yi(e,o),c);ka(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=oi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ea=0;var i=x(e,t,n,r);return Ta=null,i}catch(t){if(t===ha||t===_a)throw t;var a=ei(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var ja=Aa(!0),Ma=Aa(!1),Na=!1;function Pa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Fa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ia(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function La(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Il&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Zr(e),Xr(e,null,n),t}return qr(e,r,t,n),Zr(e)}function Ra(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ge(e,n)}}function za(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ba=!1;function Va(){if(Ba){var e=oa;if(e!==null)throw e}}function Ha(e,t,n,r){Ba=!1;var i=e.updateQueue;Na=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(zl&p)===p:(r&p)===p){p!==0&&p===aa&&(Ba=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Na=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ql|=o,e.lanes=o,e.memoizedState=d}}function Ua(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Wa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ua(n[e],t)}var Ga=te(null),Ka=te(0);function qa(e,t){e=Gl,L(Ka,e),L(Ga,t),Gl=e|t.baseLanes}function Ja(){L(Ka,Gl),L(Ga,Ga.current)}function Ya(){Gl=Ka.current,ne(Ga),ne(Ka)}var Xa=te(null),Za=null;function Qa(e){var t=e.alternate;L(ro,ro.current&1),L(Xa,e),Za===null&&(t===null||Ga.current!==null||t.memoizedState!==null)&&(Za=e)}function $a(e){L(ro,ro.current),L(Xa,e),Za===null&&(Za=e)}function eo(e){e.tag===22?(L(ro,ro.current),L(Xa,e),Za===null&&(Za=e)):to(e)}function to(){L(ro,ro.current),L(Xa,Xa.current)}function no(e){ne(Xa),Za===e&&(Za=null),ne(ro)}var ro=te(0);function io(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||uf(n)||df(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ao=0,oo=null,so=null,co=null,lo=!1,uo=!1,fo=!1,po=0,mo=0,ho=null,go=0;function _o(){throw Error(i(321))}function vo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mr(e[n],t[n]))return!1;return!0}function yo(e,t,n,r,i,a){return ao=a,oo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?Is:Ls,fo=!1,a=n(r,i),fo=!1,uo&&(a=xo(t,n,r,i)),bo(e),a}function bo(e){N.H=Fs;var t=so!==null&&so.next!==null;if(ao=0,co=so=oo=null,lo=!1,mo=0,ho=null,t)throw Error(i(300));e===null||ec||(e=e.dependencies,e!==null&&Ki(e)&&(ec=!0))}function xo(e,t,n,r){oo=e;var a=0;do{if(uo&&(ho=null),mo=0,uo=!1,25<=a)throw Error(i(301));if(a+=1,co=so=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}N.H=Rs,o=t(n,r)}while(uo);return o}function So(){var e=N.H,t=e.useState()[0];return t=typeof t.then==`function`?ko(t):t,e=e.useState()[0],(so===null?null:so.memoizedState)!==e&&(oo.flags|=1024),t}function Co(){var e=po!==0;return po=0,e}function wo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function To(e){if(lo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}lo=!1}ao=0,co=so=oo=null,uo=!1,mo=po=0,ho=null}function Eo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return co===null?oo.memoizedState=co=e:co=co.next=e,co}function Do(){if(so===null){var e=oo.alternate;e=e===null?null:e.memoizedState}else e=so.next;var t=co===null?oo.memoizedState:co.next;if(t!==null)co=t,so=e;else{if(e===null)throw oo.alternate===null?Error(i(467)):Error(i(310));so=e,e={memoizedState:so.memoizedState,baseState:so.baseState,baseQueue:so.baseQueue,queue:so.queue,next:null},co===null?oo.memoizedState=co=e:co=co.next=e}return co}function Oo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ko(e){var t=mo;return mo+=1,ho===null&&(ho=[]),e=ba(ho,e,t),t=oo,(co===null?t.memoizedState:co.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?Is:Ls),e}function Ao(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ko(e);if(e.$$typeof===b)return Ji(e)}throw Error(i(438,String(e)))}function jo(e){var t=null,n=oo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=oo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Oo(),oo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=D;return t.index++,n}function Mo(e,t){return typeof t==`function`?t(e):t}function No(e){return Po(Do(),so,e)}function Po(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(ao&f)===f:(zl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===aa&&(d=!0);else if((ao&p)===p){u=u.next,p===aa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,oo.lanes|=p,ql|=p;f=u.action,fo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,oo.lanes|=f,ql|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!mr(o,e.memoizedState)&&(ec=!0,d&&(n=oa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Fo(e){var t=Do(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);mr(o,t.memoizedState)||(ec=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Io(e,t,n){var r=oo,a=Do(),o=Di;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!mr((so||a).memoizedState,n);if(s&&(a.memoizedState=n,ec=!0),a=a.queue,ss(zo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||co!==null&&co.memoizedState.tag&1){if(r.flags|=2048,ns(9,{destroy:void 0},Ro.bind(null,r,a,n,t),null),Ll===null)throw Error(i(349));o||ao&127||Lo(r,t,n)}return n}function Lo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=oo.updateQueue,t===null?(t=Oo(),oo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ro(e,t,n,r){t.value=n,t.getSnapshot=r,Bo(t)&&Vo(e)}function zo(e,t,n){return n(function(){Bo(t)&&Vo(e)})}function Bo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mr(e,n)}catch{return!0}}function Vo(e){var t=Yr(e,2);t!==null&&_u(t,e,2)}function Ho(e){var t=Eo();if(typeof e==`function`){var n=e;if(e=n(),fo){ke(!0);try{n()}finally{ke(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:e},t}function Uo(e,t,n,r){return e.baseState=n,Po(e,so,typeof r==`function`?r:Mo)}function Wo(e,t,n,r,a){if(Ms(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};N.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Go(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Go(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=N.T,o={};N.T=o;try{var s=n(i,r),c=N.S;c!==null&&c(o,s),Ko(e,t,s)}catch(n){Jo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),N.T=a}}else try{a=n(i,r),Ko(e,t,a)}catch(n){Jo(e,t,n)}}function Ko(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){qo(e,t,n)},function(n){return Jo(e,t,n)}):qo(e,t,n)}function qo(e,t,n){t.status=`fulfilled`,t.value=n,Yo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Go(e,n)))}function Jo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Yo(t),t=t.next;while(t!==r)}e.action=null}function Yo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Xo(e,t){return t}function Zo(e,t){if(Di){var n=Ll.formState;if(n!==null){a:{var r=oo;if(Di){if(Ei){b:{for(var i=Ei,a=ki;i.nodeType!==8;){if(!a){i=null;break b}if(i=pf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ei=pf(i.nextSibling),r=i.data===`F!`;break a}}ji(r)}r=!1}r&&(t=n[0])}}return n=Eo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xo,lastRenderedState:t},n.queue=r,n=ks.bind(null,oo,r),r.dispatch=n,r=Ho(!1),a=js.bind(null,oo,!1,r.queue),r=Eo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Wo.bind(null,oo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Qo(e){return $o(Do(),so,e)}function $o(e,t,n){if(t=Po(e,t,Xo)[0],e=No(Mo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ko(t)}catch(e){throw e===ha?_a:e}else r=t;t=Do();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(oo.flags|=2048,ns(9,{destroy:void 0},es.bind(null,i,n),null)),[r,a,e]}function es(e,t){e.action=t}function ts(e){var t=Do(),n=so;if(n!==null)return $o(t,n,e);Do(),t=t.memoizedState,n=Do();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ns(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=oo.updateQueue,t===null&&(t=Oo(),oo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function rs(){return Do().memoizedState}function is(e,t,n,r){var i=Eo();oo.flags|=e,i.memoizedState=ns(1|t,{destroy:void 0},n,r===void 0?null:r)}function as(e,t,n,r){var i=Do();r=r===void 0?null:r;var a=i.memoizedState.inst;so!==null&&r!==null&&vo(r,so.memoizedState.deps)?i.memoizedState=ns(t,a,n,r):(oo.flags|=e,i.memoizedState=ns(1|t,a,n,r))}function os(e,t){is(8390656,8,e,t)}function ss(e,t){as(2048,8,e,t)}function cs(e){oo.flags|=4;var t=oo.updateQueue;if(t===null)t=Oo(),oo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ls(e){var t=Do().memoizedState;return cs({ref:t,nextImpl:e}),function(){if(Il&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function us(e,t){return as(4,2,e,t)}function ds(e,t){return as(4,4,e,t)}function fs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ps(e,t,n){n=n==null?null:n.concat([e]),as(4,4,fs.bind(null,t,e),n)}function ms(){}function hs(e,t){var n=Do();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&vo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function gs(e,t){var n=Do();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&vo(t,r[1]))return r[0];if(r=e(),fo){ke(!0);try{e()}finally{ke(!1)}}return n.memoizedState=[r,t],r}function _s(e,t,n){return n===void 0||ao&1073741824&&!(zl&261930)?e.memoizedState=t:(e.memoizedState=n,e=gu(),oo.lanes|=e,ql|=e,n)}function vs(e,t,n,r){return mr(n,t)?n:Ga.current===null?!(ao&42)||ao&1073741824&&!(zl&261930)?(ec=!0,e.memoizedState=n):(e=gu(),oo.lanes|=e,ql|=e,t):(e=_s(e,n,r),mr(e,t)||(ec=!0),e)}function ys(e,t,n,r,i){var a=P.p;P.p=a!==0&&8>a?a:8;var o=N.T,s={};N.T=s,js(e,!1,t,n);try{var c=i(),l=N.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?As(e,t,la(c,r),hu(e)):As(e,t,r,hu(e))}catch(n){As(e,t,{then:function(){},status:`rejected`,reason:n},hu())}finally{P.p=a,o!==null&&s.types!==null&&(o.types=s.types),N.T=o}}function bs(){}function xs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ss(e).queue;ys(e,a,t,F,n===null?bs:function(){return Cs(e),n(r)})}function Ss(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:F},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Cs(e){var t=Ss(e);t.next===null&&(t=e.alternate.memoizedState),As(e,t.next.queue,{},hu())}function ws(){return Ji(rp)}function Ts(){return Do().memoizedState}function Es(){return Do().memoizedState}function Ds(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=hu();e=Ia(n);var r=La(t,e,n);r!==null&&(_u(r,t,n),Ra(r,t,n)),t={cache:ta()},e.payload=t;return}t=t.return}}function Os(e,t,n){var r=hu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ms(e)?Ns(t,n):(n=Jr(e,t,n,r),n!==null&&(_u(n,e,r),Ps(n,t,r)))}function ks(e,t,n){As(e,t,n,hu())}function As(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ms(e))Ns(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,mr(s,o))return qr(e,t,i,0),Ll===null&&Kr(),!1}catch{}if(n=Jr(e,t,i,r),n!==null)return _u(n,e,r),Ps(n,t,r),!0}return!1}function js(e,t,n,r){if(r={lane:2,revertLane:md(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ms(e)){if(t)throw Error(i(479))}else t=Jr(e,n,r,2),t!==null&&_u(t,e,2)}function Ms(e){var t=e.alternate;return e===oo||t!==null&&t===oo}function Ns(e,t){uo=lo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ps(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ge(e,n)}}var Fs={readContext:Ji,use:Ao,useCallback:_o,useContext:_o,useEffect:_o,useImperativeHandle:_o,useLayoutEffect:_o,useInsertionEffect:_o,useMemo:_o,useReducer:_o,useRef:_o,useState:_o,useDebugValue:_o,useDeferredValue:_o,useTransition:_o,useSyncExternalStore:_o,useId:_o,useHostTransitionStatus:_o,useFormState:_o,useActionState:_o,useOptimistic:_o,useMemoCache:_o,useCacheRefresh:_o};Fs.useEffectEvent=_o;var Is={readContext:Ji,use:Ao,useCallback:function(e,t){return Eo().memoizedState=[e,t===void 0?null:t],e},useContext:Ji,useEffect:os,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),is(4194308,4,fs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return is(4194308,4,e,t)},useInsertionEffect:function(e,t){is(4,2,e,t)},useMemo:function(e,t){var n=Eo();t=t===void 0?null:t;var r=e();if(fo){ke(!0);try{e()}finally{ke(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Eo();if(n!==void 0){var i=n(t);if(fo){ke(!0);try{n(t)}finally{ke(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Os.bind(null,oo,e),[r.memoizedState,e]},useRef:function(e){var t=Eo();return e={current:e},t.memoizedState=e},useState:function(e){e=Ho(e);var t=e.queue,n=ks.bind(null,oo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ms,useDeferredValue:function(e,t){return _s(Eo(),e,t)},useTransition:function(){var e=Ho(!1);return e=ys.bind(null,oo,e.queue,!0,!1),Eo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=oo,a=Eo();if(Di){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Ll===null)throw Error(i(349));zl&127||Lo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,os(zo.bind(null,r,o,e),[e]),r.flags|=2048,ns(9,{destroy:void 0},Ro.bind(null,r,o,n,t),null),n},useId:function(){var e=Eo(),t=Ll.identifierPrefix;if(Di){var n=yi,r=vi;n=(r&~(1<<32-Ae(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=po++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=go++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ws,useFormState:Zo,useActionState:Zo,useOptimistic:function(e){var t=Eo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=js.bind(null,oo,!0,n),n.dispatch=t,[e,t]},useMemoCache:jo,useCacheRefresh:function(){return Eo().memoizedState=Ds.bind(null,oo)},useEffectEvent:function(e){var t=Eo(),n={impl:e};return t.memoizedState=n,function(){if(Il&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ls={readContext:Ji,use:Ao,useCallback:hs,useContext:Ji,useEffect:ss,useImperativeHandle:ps,useInsertionEffect:us,useLayoutEffect:ds,useMemo:gs,useReducer:No,useRef:rs,useState:function(){return No(Mo)},useDebugValue:ms,useDeferredValue:function(e,t){return vs(Do(),so.memoizedState,e,t)},useTransition:function(){var e=No(Mo)[0],t=Do().memoizedState;return[typeof e==`boolean`?e:ko(e),t]},useSyncExternalStore:Io,useId:Ts,useHostTransitionStatus:ws,useFormState:Qo,useActionState:Qo,useOptimistic:function(e,t){return Uo(Do(),so,e,t)},useMemoCache:jo,useCacheRefresh:Es};Ls.useEffectEvent=ls;var Rs={readContext:Ji,use:Ao,useCallback:hs,useContext:Ji,useEffect:ss,useImperativeHandle:ps,useInsertionEffect:us,useLayoutEffect:ds,useMemo:gs,useReducer:Fo,useRef:rs,useState:function(){return Fo(Mo)},useDebugValue:ms,useDeferredValue:function(e,t){var n=Do();return so===null?_s(n,e,t):vs(n,so.memoizedState,e,t)},useTransition:function(){var e=Fo(Mo)[0],t=Do().memoizedState;return[typeof e==`boolean`?e:ko(e),t]},useSyncExternalStore:Io,useId:Ts,useHostTransitionStatus:ws,useFormState:ts,useActionState:ts,useOptimistic:function(e,t){var n=Do();return so===null?(n.baseState=e,[e,n.queue.dispatch]):Uo(n,so,e,t)},useMemoCache:jo,useCacheRefresh:Es};Rs.useEffectEvent=ls;function zs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Bs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=hu(),i=Ia(r);i.payload=t,n!=null&&(i.callback=n),t=La(e,i,r),t!==null&&(_u(t,e,r),Ra(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=hu(),i=Ia(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=La(e,i,r),t!==null&&(_u(t,e,r),Ra(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=hu(),r=Ia(n);r.tag=2,t!=null&&(r.callback=t),t=La(e,r,n),t!==null&&(_u(t,e,n),Ra(t,e,n))}};function Vs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!hr(n,r)||!hr(i,a):!0}function Hs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Bs.enqueueReplaceState(t,t.state,null)}function Us(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ws(e){Hr(e)}function Gs(e){console.error(e)}function Ks(e){Hr(e)}function qs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Js(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ys(e,t,n){return n=Ia(n),n.tag=3,n.payload={element:null},n.callback=function(){qs(e,t)},n}function Xs(e){return e=Ia(e),e.tag=3,e}function Zs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Js(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Js(t,n,r),typeof i!=`function`&&(au===null?au=new Set([this]):au.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Qs(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Gi(t,n,a,!0),n=Xa.current,n!==null){switch(n.tag){case 31:case 13:return Za===null?ku():n.alternate===null&&Kl===0&&(Kl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===va?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Ju(e,r,a)),!1;case 22:return n.flags|=65536,r===va?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Ju(e,r,a)),!1}throw Error(i(435,n.tag))}return Ju(e,r,a),ku(),!1}if(Di)return t=Xa.current,t===null?(r!==Ai&&(t=Error(i(423),{cause:r}),Li(ui(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=ui(r,n),a=Ys(e.stateNode,r,a),za(e,a),Kl!==4&&(Kl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ai&&(e=Error(i(422),{cause:r}),Li(ui(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=ui(o,n),Ql===null?Ql=[o]:Ql.push(o),Kl!==4&&(Kl=2),t===null)return!0;r=ui(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ys(n.stateNode,r,e),za(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(au===null||!au.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Xs(a),Zs(a,e,n,r),za(n,a),!1}n=n.return}while(n!==null);return!1}var $s=Error(i(461)),ec=!1;function tc(e,t,n,r){t.child=e===null?Ma(t,null,n,r):ja(t,e.child,n,r)}function nc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return qi(t),r=yo(e,t,n,o,a,i),s=Co(),e!==null&&!ec?(wo(e,t,i),Ec(e,t,i)):(Di&&s&&Si(t),t.flags|=1,tc(e,t,r,i),t.child)}function rc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ti(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ic(e,t,a,r,i)):(e=ii(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Dc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?hr:n,n(o,r)&&e.ref===t.ref)return Ec(e,t,i)}return t.flags|=1,e=ni(a,r),e.ref=t.ref,e.return=t,t.child=e}function ic(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(hr(a,r)&&e.ref===t.ref)if(ec=!1,t.pendingProps=r=a,Dc(e,i))e.flags&131072&&(ec=!0);else return t.lanes=e.lanes,Ec(e,t,i)}return fc(e,t,n,r,i)}function ac(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return sc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&pa(t,a===null?null:a.cachePool),a===null?Ja():qa(t,a),eo(t);else return r=t.lanes=536870912,sc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&pa(t,null),Ja(),to(t)):(pa(t,a.cachePool),qa(t,a),to(t),t.memoizedState=null);return tc(e,t,i,n),t.child}function oc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function sc(e,t,n,r,i){var a=fa();return a=a===null?null:{parent:ea._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&pa(t,null),Ja(),eo(t),e!==null&&Gi(e,t,r,!0),t.childLanes=i,null}function cc(e,t){return t=xc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function lc(e,t,n){return ja(t,e.child,null,n),e=cc(t,t.pendingProps),e.flags|=2,no(t),t.memoizedState=null,e}function uc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Di){if(r.mode===`hidden`)return e=cc(t,r),t.lanes=536870912,oc(null,e);if($a(t),(e=Ei)?(e=lf(e,ki),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_i===null?null:{id:vi,overflow:yi},retryLane:536870912,hydrationErrors:null},n=si(e),n.return=t,t.child=n,Ti=t,Ei=null)):e=null,e===null)throw ji(t);return t.lanes=536870912,null}return cc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if($a(t),a)if(t.flags&256)t.flags&=-257,t=lc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(ec||Gi(e,t,n,!1),a=(n&e.childLanes)!==0,ec||a){if(r=Ll,r!==null&&(s=Ke(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Yr(e,s),_u(r,e,s),$s;ku(),t=lc(e,t,n)}else e=o.treeContext,Ei=pf(s.nextSibling),Ti=t,Di=!0,Oi=null,ki=!1,e!==null&&wi(t,e),t=cc(t,r),t.flags|=4096;return t}return e=ni(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function dc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function fc(e,t,n,r,i){return qi(t),n=yo(e,t,n,r,void 0,i),r=Co(),e!==null&&!ec?(wo(e,t,i),Ec(e,t,i)):(Di&&r&&Si(t),t.flags|=1,tc(e,t,n,i),t.child)}function pc(e,t,n,r,i,a){return qi(t),t.updateQueue=null,n=xo(t,r,n,i),bo(e),r=Co(),e!==null&&!ec?(wo(e,t,a),Ec(e,t,a)):(Di&&r&&Si(t),t.flags|=1,tc(e,t,n,a),t.child)}function mc(e,t,n,r,i){if(qi(t),t.stateNode===null){var a=Qr,o=n.contextType;typeof o==`object`&&o&&(a=Ji(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Bs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Pa(t),o=n.contextType,a.context=typeof o==`object`&&o?Ji(o):Qr,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(zs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Bs.enqueueReplaceState(a,a.state,null),Ha(t,r,a,i),Va(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Us(n,s);a.props=c;var l=a.context,u=n.contextType;o=Qr,typeof u==`object`&&u&&(o=Ji(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Hs(t,a,r,o),Na=!1;var f=t.memoizedState;a.state=f,Ha(t,r,a,i),Va(),l=t.memoizedState,s||f!==l||Na?(typeof d==`function`&&(zs(t,n,d,r),l=t.memoizedState),(c=Na||Vs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Fa(e,t),o=t.memoizedProps,u=Us(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Qr,typeof l==`object`&&l&&(c=Ji(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Hs(t,a,r,c),Na=!1,f=t.memoizedState,a.state=f,Ha(t,r,a,i),Va();var p=t.memoizedState;o!==d||f!==p||Na||e!==null&&e.dependencies!==null&&Ki(e.dependencies)?(typeof s==`function`&&(zs(t,n,s,r),p=t.memoizedState),(u=Na||Vs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ki(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,dc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=ja(t,e.child,null,i),t.child=ja(t,null,n,i)):tc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Ec(e,t,i),e}function hc(e,t,n,r){return Fi(),t.flags|=256,tc(e,t,n,r),t.child}var gc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _c(e){return{baseLanes:e,cachePool:ma()}}function vc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Xl),e}function yc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(ro.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Di){if(a?Qa(t):to(t),(e=Ei)?(e=lf(e,ki),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_i===null?null:{id:vi,overflow:yi},retryLane:536870912,hydrationErrors:null},n=si(e),n.return=t,t.child=n,Ti=t,Ei=null)):e=null,e===null)throw ji(t);return df(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(to(t),a=t.mode,c=xc({mode:`hidden`,children:c},a),r=ai(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=_c(n),r.childLanes=vc(e,s,n),t.memoizedState=gc,oc(null,r)):(Qa(t),bc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Qa(t),t.flags&=-257,t=Sc(e,t,n)):t.memoizedState===null?(to(t),c=r.fallback,a=t.mode,r=xc({mode:`visible`,children:r.children},a),c=ai(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,ja(t,e.child,null,n),r=t.child,r.memoizedState=_c(n),r.childLanes=vc(e,s,n),t.memoizedState=gc,t=oc(null,r)):(to(t),t.child=e.child,t.flags|=128,t=null);else if(Qa(t),df(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Li({value:r,source:null,stack:null}),t=Sc(e,t,n)}else if(ec||Gi(e,t,n,!1),s=(n&e.childLanes)!==0,ec||s){if(s=Ll,s!==null&&(r=Ke(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Yr(e,r),_u(s,e,r),$s;uf(c)||ku(),t=Sc(e,t,n)}else uf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ei=pf(c.nextSibling),Ti=t,Di=!0,Oi=null,ki=!1,e!==null&&wi(t,e),t=bc(t,r.children),t.flags|=4096);return t}return a?(to(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ni(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ai(c,a,n,null),c.flags|=2):c=ni(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,oc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=_c(n):(a=c.cachePool,a===null?a=ma():(l=ea._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=vc(e,s,n),t.memoizedState=gc,oc(e.child,r)):(Qa(t),n=e.child,e=n.sibling,n=ni(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function bc(e,t){return t=xc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function xc(e,t){return e=ei(22,e,null,t),e.lanes=0,e}function Sc(e,t,n){return ja(t,e.child,null,n),e=bc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Cc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ui(e.return,t,n)}function wc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Tc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=ro.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,L(ro,o),tc(e,t,r,n),r=Di?mi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Cc(e,n,t);else if(e.tag===19)Cc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&io(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),wc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&io(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}wc(t,!0,n,null,a,r);break;case`together`:wc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Ec(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ql|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Gi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ni(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ni(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Dc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Ki(e))):!0}function Oc(e,t,n){switch(t.tag){case 3:se(t,t.stateNode.containerInfo),Vi(t,ea,e.memoizedState.cache),Fi();break;case 27:case 5:le(t);break;case 4:se(t,t.stateNode.containerInfo);break;case 10:Vi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,$a(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Qa(t),e=Ec(e,t,n),e===null?null:e.sibling):yc(e,t,n):(Qa(t),t.flags|=128,null);Qa(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Gi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Tc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),L(ro,ro.current),r)break;return null;case 22:return t.lanes=0,ac(e,t,n,t.pendingProps);case 24:Vi(t,ea,e.memoizedState.cache)}return Ec(e,t,n)}function kc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ec=!0;else{if(!Dc(e,n)&&!(t.flags&128))return ec=!1,Oc(e,t,n);ec=!!(e.flags&131072)}else ec=!1,Di&&t.flags&1048576&&xi(t,mi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=xa(t.elementType),t.type=e,typeof e==`function`)ti(e)?(r=Us(e,r),t.tag=1,t=mc(null,t,e,r,n)):(t.tag=0,t=fc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=nc(null,t,e,r,n);break a}else if(a===w){t.tag=14,t=rc(null,t,e,r,n);break a}}throw t=j(e)||e,Error(i(306,t,``))}}return t;case 0:return fc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Us(r,t.pendingProps),mc(e,t,r,a,n);case 3:a:{if(se(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Fa(e,t),Ha(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Vi(t,ea,r),r!==o.cache&&Wi(t,[ea],n,!0),Va(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=hc(e,t,r,n);break a}else if(r!==a){a=ui(Error(i(424)),t),Li(a),t=hc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ei=pf(e.firstChild),Ti=t,Di=!0,Oi=null,ki=!0,n=Ma(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Fi(),r===a){t=Ec(e,t,n);break a}tc(e,t,r,n)}t=t.child}return t;case 26:return dc(e,t),e===null?(n=Pf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Di||(n=t.type,e=t.pendingProps,r=Gd(ae.current).createElement(n),r[Qe]=t,r[$e]=e,zd(r,n,e),dt(r),t.stateNode=r):t.memoizedState=Pf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return le(t),e===null&&Di&&(r=t.stateNode=_f(t.type,t.pendingProps,ae.current),Ti=t,ki=!0,a=Ei,nf(t.type)?(mf=a,Ei=pf(r.firstChild)):Ei=a),tc(e,t,t.pendingProps.children,n),dc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Di&&((a=r=Ei)&&(r=sf(r,t.type,t.pendingProps,ki),r===null?a=!1:(t.stateNode=r,Ti=t,Ei=pf(r.firstChild),ki=!1,a=!0)),a||ji(t)),le(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Jd(a,o)?r=null:s!==null&&Jd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=yo(e,t,So,null,null,n),rp._currentValue=a),dc(e,t),tc(e,t,r,n),t.child;case 6:return e===null&&Di&&((e=n=Ei)&&(n=cf(n,t.pendingProps,ki),n===null?e=!1:(t.stateNode=n,Ti=t,Ei=null,e=!0)),e||ji(t)),null;case 13:return yc(e,t,n);case 4:return se(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ja(t,null,r,n):tc(e,t,r,n),t.child;case 11:return nc(e,t,t.type,t.pendingProps,n);case 7:return tc(e,t,t.pendingProps,n),t.child;case 8:return tc(e,t,t.pendingProps.children,n),t.child;case 12:return tc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Vi(t,t.type,r.value),tc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,qi(t),a=Ji(a),r=r(a),t.flags|=1,tc(e,t,r,n),t.child;case 14:return rc(e,t,t.type,t.pendingProps,n);case 15:return ic(e,t,t.type,t.pendingProps,n);case 19:return Tc(e,t,n);case 31:return uc(e,t,n);case 22:return ac(e,t,n,t.pendingProps);case 24:return qi(t),r=Ji(ea),e===null?(a=fa(),a===null&&(a=Ll,o=ta(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Pa(t),Vi(t,ea,a)):((e.lanes&n)!==0&&(Fa(e,t),Ha(t,null,null,n),Va()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Vi(t,ea,r),r!==a.cache&&Wi(t,[ea],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Vi(t,ea,r))),tc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Ac(e){e.flags|=4}function jc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Eu())e.flags|=8192;else throw Sa=va,ga}else e.flags&=-16777217}function Mc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Yf(t))if(Eu())e.flags|=8192;else throw Sa=va,ga}function Nc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Be(),e.lanes|=t,Zl|=t)}function Pc(e,t){if(!Di)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Fc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ic(e,t,n){var r=t.pendingProps;switch(Ci(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fc(t),null;case 1:return Fc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Hi(ea),ce(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Pi(t)?Ac(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ii())),Fc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Ac(t),o===null?(Fc(t),jc(t,a,null,r,n)):(Fc(t),Mc(t,o))):o?o===e.memoizedState?(Fc(t),t.flags&=-16777217):(Ac(t),Fc(t),Mc(t,o)):(e=e.memoizedProps,e!==r&&Ac(t),Fc(t),jc(t,a,e,r,n)),null;case 27:if(ue(t),n=ae.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ac(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Fc(t),null}e=re.current,Pi(t)?Mi(t,e):(e=_f(a,r,n),t.stateNode=e,Ac(t))}return Fc(t),null;case 5:if(ue(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ac(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Fc(t),null}if(o=re.current,Pi(t))Mi(t,o);else{var s=Gd(ae.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Qe]=t,o[$e]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(zd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Ac(t)}}return Fc(t),jc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ac(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ae.current,Pi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ti,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Qe]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Id(e.nodeValue,n)),e||ji(t,!0)}else e=Gd(e).createTextNode(r),e[Qe]=t,t.stateNode=e}return Fc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Pi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Qe]=t}else Fi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fc(t),e=!1}else n=Ii(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(no(t),t):(no(t),null);if(t.flags&128)throw Error(i(558))}return Fc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Pi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Qe]=t}else Fi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fc(t),a=!1}else a=Ii(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(no(t),t):(no(t),null)}return no(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Nc(t,t.updateQueue),Fc(t),null);case 4:return ce(),e===null&&Ed(t.stateNode.containerInfo),Fc(t),null;case 10:return Hi(t.type),Fc(t),null;case 19:if(ne(ro),r=t.memoizedState,r===null)return Fc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Pc(r,!1);else{if(Kl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=io(e),o!==null){for(t.flags|=128,Pc(r,!1),e=o.updateQueue,t.updateQueue=e,Nc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ri(n,e),n=n.sibling;return L(ro,ro.current&1|2),Di&&bi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&B()>ru&&(t.flags|=128,a=!0,Pc(r,!1),t.lanes=4194304)}else{if(!a)if(e=io(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Nc(t,e),Pc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Di)return Fc(t),null}else 2*B()-r.renderingStartTime>ru&&n!==536870912&&(t.flags|=128,a=!0,Pc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Fc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=B(),e.sibling=null,n=ro.current,L(ro,a?n&1|2:n&1),Di&&bi(t,r.treeForkCount),e);case 22:case 23:return no(t),Ya(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Fc(t),t.subtreeFlags&6&&(t.flags|=8192)):Fc(t),n=t.updateQueue,n!==null&&Nc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ne(da),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Hi(ea),Fc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Lc(e,t){switch(Ci(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Hi(ea),ce(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ue(t),null;case 31:if(t.memoizedState!==null){if(no(t),t.alternate===null)throw Error(i(340));Fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(no(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ne(ro),null;case 4:return ce(),null;case 10:return Hi(t.type),null;case 22:case 23:return no(t),Ya(),e!==null&&ne(da),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Hi(ea),null;case 25:return null;default:return null}}function W(e,t){switch(Ci(t),t.tag){case 3:Hi(ea),ce();break;case 26:case 27:case 5:ue(t);break;case 4:ce();break;case 31:t.memoizedState!==null&&no(t);break;case 13:no(t);break;case 19:ne(ro);break;case 10:Hi(t.type);break;case 22:case 23:no(t),Ya(),e!==null&&ne(da);break;case 24:Hi(ea)}}function Rc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){qu(t,t.return,e)}}function zc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){qu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){qu(t,t.return,e)}}function Bc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Wa(t,n)}catch(t){qu(e,e.return,t)}}}function Vc(e,t,n){n.props=Us(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){qu(e,t,n)}}function Hc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){qu(e,t,n)}}function Uc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){qu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){qu(e,t,n)}else n.current=null}function Wc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){qu(e,e.return,t)}}function Gc(e,t,n){try{var r=e.stateNode;Bd(r,e.type,n,t),r[$e]=t}catch(t){qu(e,e.return,t)}}function Kc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&nf(e.type)||e.tag===4}function qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Kc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&nf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Gt));else if(r!==4&&(r===27&&nf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&nf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Yc(e,t,n),e=e.sibling;e!==null;)Yc(e,t,n),e=e.sibling}function Xc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);zd(t,r,n),t[Qe]=e,t[$e]=n}catch(t){qu(e,e.return,t)}}var Zc=!1,Qc=!1,$c=!1,el=typeof WeakSet==`function`?WeakSet:Set,tl=null;function nl(e,t){if(e=e.containerInfo,Ud=fp,e=yr(e),br(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Wd={focusedElem:e,selectionRange:n},fp=!1,tl=t;tl!==null;)if(t=tl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,tl=e;else for(;tl!==null;){switch(t=tl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Us(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){qu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)of(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:of(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,tl=e;break}tl=t.return}}function rl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:_l(e,n),r&4&&Rc(5,n);break;case 1:if(_l(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){qu(n,n.return,e)}else{var i=Us(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){qu(n,n.return,e)}}r&64&&Bc(n),r&512&&Hc(n,n.return);break;case 3:if(_l(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Wa(e,t)}catch(e){qu(n,n.return,e)}}break;case 27:t===null&&r&4&&Xc(n);case 26:case 5:_l(e,n),t===null&&r&4&&Wc(n),r&512&&Hc(n,n.return);break;case 12:_l(e,n);break;case 31:_l(e,n),r&4&&ll(e,n);break;case 13:_l(e,n),r&4&&ul(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Zu.bind(null,n),ff(e,n))));break;case 22:if(r=n.memoizedState!==null||Zc,!r){t=t!==null&&t.memoizedState!==null||Qc,i=Zc;var a=Qc;Zc=r,(Qc=t)&&!a?yl(e,n,(n.subtreeFlags&8772)!=0):_l(e,n),Zc=i,Qc=a}break;case 30:break;default:_l(e,n)}}function il(e){var t=e.alternate;t!==null&&(e.alternate=null,il(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ot(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var al=null,ol=!1;function sl(e,t,n){for(n=n.child;n!==null;)cl(e,t,n),n=n.sibling}function cl(e,t,n){if(Oe&&typeof Oe.onCommitFiberUnmount==`function`)try{Oe.onCommitFiberUnmount(De,n)}catch{}switch(n.tag){case 26:Qc||Uc(n,t),sl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Qc||Uc(n,t);var r=al,i=ol;nf(n.type)&&(al=n.stateNode,ol=!1),sl(e,t,n),vf(n.stateNode),al=r,ol=i;break;case 5:Qc||Uc(n,t);case 6:if(r=al,i=ol,al=null,sl(e,t,n),al=r,ol=i,al!==null)if(ol)try{(al.nodeType===9?al.body:al.nodeName===`HTML`?al.ownerDocument.body:al).removeChild(n.stateNode)}catch(e){qu(n,t,e)}else try{al.removeChild(n.stateNode)}catch(e){qu(n,t,e)}break;case 18:al!==null&&(ol?(e=al,rf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Rp(e)):rf(al,n.stateNode));break;case 4:r=al,i=ol,al=n.stateNode.containerInfo,ol=!0,sl(e,t,n),al=r,ol=i;break;case 0:case 11:case 14:case 15:zc(2,n,t),Qc||zc(4,n,t),sl(e,t,n);break;case 1:Qc||(Uc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Vc(n,t,r)),sl(e,t,n);break;case 21:sl(e,t,n);break;case 22:Qc=(r=Qc)||n.memoizedState!==null,sl(e,t,n),Qc=r;break;default:sl(e,t,n)}}function ll(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Rp(e)}catch(e){qu(t,t.return,e)}}}function ul(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Rp(e)}catch(e){qu(t,t.return,e)}}function G(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new el),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new el),t;default:throw Error(i(435,e.tag))}}function dl(e,t){var n=G(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Qu.bind(null,e,t);t.then(r,r)}})}function fl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(nf(c.type)){al=c.stateNode,ol=!1;break a}break;case 5:al=c.stateNode,ol=!1;break a;case 3:case 4:al=c.stateNode.containerInfo,ol=!0;break a}c=c.return}if(al===null)throw Error(i(160));cl(o,s,a),al=null,ol=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ml(t,e),t=t.sibling}var pl=null;function ml(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:fl(t,e),hl(e),r&4&&(zc(3,e,e.return),Rc(3,e),zc(5,e,e.return));break;case 1:fl(t,e),hl(e),r&512&&(Qc||n===null||Uc(n,n.return)),r&64&&Zc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=pl;if(fl(t,e),hl(e),r&512&&(Qc||n===null||Uc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[at]||o[Qe]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),zd(o,r,n),o[Qe]=e,dt(o),r=o;break a;case`link`:var s=Kf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),zd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Kf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),zd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[Qe]=e,dt(o),r=o}e.stateNode=r}else qf(a,e.type,e.stateNode);else e.stateNode=Vf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Gc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?qf(a,e.type,e.stateNode):Vf(a,r,e.memoizedProps))}break;case 27:fl(t,e),hl(e),r&512&&(Qc||n===null||Uc(n,n.return)),n!==null&&r&4&&Gc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(fl(t,e),hl(e),r&512&&(Qc||n===null||Uc(n,n.return)),e.flags&32){a=e.stateNode;try{Lt(a,``)}catch(t){qu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Gc(e,a,n===null?a:n.memoizedProps)),r&1024&&($c=!0);break;case 6:if(fl(t,e),hl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){qu(e,e.return,t)}}break;case 3:if(Gf=null,a=pl,pl=xf(t.containerInfo),fl(t,e),pl=a,hl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Rp(t.containerInfo)}catch(t){qu(e,e.return,t)}$c&&($c=!1,gl(e));break;case 4:r=pl,pl=xf(e.stateNode.containerInfo),fl(t,e),hl(e),pl=r;break;case 12:fl(t,e),hl(e);break;case 31:fl(t,e),hl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 13:fl(t,e),hl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(tu=B()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Zc,d=Qc;if(Zc=u||a,Qc=d||l,fl(t,e),Qc=d,Zc=u,hl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Zc||Qc||vl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){qu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){qu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?af(m,!0):af(l.stateNode,!1)}catch(e){qu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,dl(e,n))));break;case 19:fl(t,e),hl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 30:break;case 21:break;default:fl(t,e),hl(e)}}function hl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Kc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Yc(e,qc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Lt(o,``),n.flags&=-33),Yc(e,qc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Jc(e,qc(e),s);break;default:throw Error(i(161))}}catch(t){qu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;gl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function _l(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)rl(e,t.alternate,t),t=t.sibling}function vl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:zc(4,t,t.return),vl(t);break;case 1:Uc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Vc(t,t.return,n),vl(t);break;case 27:vf(t.stateNode);case 26:case 5:Uc(t,t.return),vl(t);break;case 22:t.memoizedState===null&&vl(t);break;case 30:vl(t);break;default:vl(t)}e=e.sibling}}function yl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:yl(i,a,n),Rc(4,a);break;case 1:if(yl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){qu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ua(c[i],s)}catch(e){qu(r,r.return,e)}}n&&o&64&&Bc(a),Hc(a,a.return);break;case 27:Xc(a);case 26:case 5:yl(i,a,n),n&&r===null&&o&4&&Wc(a),Hc(a,a.return);break;case 12:yl(i,a,n);break;case 31:yl(i,a,n),n&&o&4&&ll(i,a);break;case 13:yl(i,a,n),n&&o&4&&ul(i,a);break;case 22:a.memoizedState===null&&yl(i,a,n),Hc(a,a.return);break;case 30:break;default:yl(i,a,n)}t=t.sibling}}function bl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&na(n))}function xl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&na(e))}function Sl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Cl(e,t,n,r),t=t.sibling}function Cl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Sl(e,t,n,r),i&2048&&Rc(9,t);break;case 1:Sl(e,t,n,r);break;case 3:Sl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&na(e)));break;case 12:if(i&2048){Sl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){qu(t,t.return,e)}}else Sl(e,t,n,r);break;case 31:Sl(e,t,n,r);break;case 13:Sl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Sl(e,t,n,r):(a._visibility|=2,wl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Sl(e,t,n,r):Tl(e,t),i&2048&&bl(o,t);break;case 24:Sl(e,t,n,r),i&2048&&xl(t.alternate,t);break;default:Sl(e,t,n,r)}}function wl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:wl(a,o,s,c,i),Rc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,wl(a,o,s,c,i)):u._visibility&2?wl(a,o,s,c,i):Tl(a,o),i&&l&2048&&bl(o.alternate,o);break;case 24:wl(a,o,s,c,i),i&&l&2048&&xl(o.alternate,o);break;default:wl(a,o,s,c,i)}t=t.sibling}}function Tl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Tl(n,r),i&2048&&bl(r.alternate,r);break;case 24:Tl(n,r),i&2048&&xl(r.alternate,r);break;default:Tl(n,r)}t=t.sibling}}var El=8192;function Dl(e,t,n){if(e.subtreeFlags&El)for(e=e.child;e!==null;)Ol(e,t,n),e=e.sibling}function Ol(e,t,n){switch(e.tag){case 26:Dl(e,t,n),e.flags&El&&e.memoizedState!==null&&Xf(n,pl,e.memoizedState,e.memoizedProps);break;case 5:Dl(e,t,n);break;case 3:case 4:var r=pl;pl=xf(e.stateNode.containerInfo),Dl(e,t,n),pl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=El,El=16777216,Dl(e,t,n),El=r):Dl(e,t,n));break;default:Dl(e,t,n)}}function kl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Al(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];tl=r,Nl(r,e)}kl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)jl(e),e=e.sibling}function jl(e){switch(e.tag){case 0:case 11:case 15:Al(e),e.flags&2048&&zc(9,e,e.return);break;case 3:Al(e);break;case 12:Al(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ml(e)):Al(e);break;default:Al(e)}}function Ml(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];tl=r,Nl(r,e)}kl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:zc(8,t,t.return),Ml(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ml(t));break;default:Ml(t)}e=e.sibling}}function Nl(e,t){for(;tl!==null;){var n=tl;switch(n.tag){case 0:case 11:case 15:zc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:na(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,tl=r;else a:for(n=e;tl!==null;){r=tl;var i=r.sibling,a=r.return;if(il(r),r===n){tl=null;break a}if(i!==null){i.return=a,tl=i;break a}tl=a}}}var Pl={getCacheForType:function(e){var t=Ji(ea),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ji(ea).controller.signal}},Fl=typeof WeakMap==`function`?WeakMap:Map,Il=0,Ll=null,Rl=null,zl=0,Bl=0,Vl=null,Hl=!1,Ul=!1,Wl=!1,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=0,Ql=null,$l=null,eu=!1,tu=0,nu=0,ru=1/0,iu=null,au=null,ou=0,su=null,cu=null,lu=0,uu=0,du=null,fu=null,pu=0,mu=null;function hu(){return Il&2&&zl!==0?zl&-zl:N.T===null?Ye():md()}function gu(){if(Xl===0)if(!(zl&536870912)||Di){var e=Pe;Pe<<=1,!(Pe&3932160)&&(Pe=262144),Xl=e}else Xl=536870912;return e=Xa.current,e!==null&&(e.flags|=32),Xl}function _u(e,t,n){(e===Ll&&(Bl===2||Bl===9)||e.cancelPendingCommit!==null)&&(wu(e,0),xu(e,zl,Xl,!1)),He(e,n),(!(Il&2)||e!==Ll)&&(e===Ll&&(!(Il&2)&&(Jl|=n),Kl===4&&xu(e,zl,Xl,!1)),od(e))}function vu(e,t,n){if(Il&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Re(e,t),a=r?Mu(e,t):Au(e,t,!0),o=r;do{if(a===0){Ul&&!r&&xu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!bu(n)){a=Au(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Ql;var l=c.current.memoizedState.isDehydrated;if(l&&(wu(c,s).flags|=256),s=Au(c,s,!1),s!==2){if(Wl&&!l){c.errorRecoveryDisabledLanes|=o,Jl|=o,a=4;break a}o=$l,$l=a,o!==null&&($l===null?$l=o:$l.push.apply($l,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){wu(e,0),xu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:xu(r,t,Xl,!Hl);break a;case 2:$l=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=tu+300-B(),10<a)){if(xu(r,t,Xl,!Hl),Le(r,0,!0)!==0)break a;lu=t,r.timeoutHandle=Zd(yu.bind(null,r,n,$l,iu,eu,t,Xl,Jl,Zl,Hl,o,`Throttled`,-0,0),a);break a}yu(r,n,$l,iu,eu,t,Xl,Jl,Zl,Hl,o,null,-0,0)}}break}while(1);od(e)}function yu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Gt},Ol(t,a,d);var m=(a&62914560)===a?tu-B():(a&4194048)===a?nu-B():0;if(m=Qf(d,m),m!==null){lu=a,e.cancelPendingCommit=m(zu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),xu(e,a,o,!l);return}}zu(e,t,a,n,r,i,o,s,c)}function bu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!mr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function xu(e,t,n,r){t&=~Yl,t&=~Jl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ae(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&We(e,n,t)}function Su(){return Il&6?!0:(sd(0,!1),!1)}function Cu(){if(Rl!==null){if(Bl===0)var e=Rl.return;else e=Rl,Bi=zi=null,To(e),Ta=null,Ea=0,e=Rl;for(;e!==null;)W(e.alternate,e),e=e.return;Rl=null}}function wu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),lu=0,Cu(),Ll=e,Rl=n=ni(e.current,null),zl=t,Bl=0,Vl=null,Hl=!1,Ul=Re(e,t),Wl=!1,Zl=Xl=Yl=Jl=ql=Kl=0,$l=Ql=null,eu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ae(r),a=1<<i;t|=e[i],r&=~a}return Gl=t,Kr(),n}function Tu(e,t){oo=null,N.H=Fs,t===ha||t===_a?(t=Ca(),Bl=3):t===ga?(t=Ca(),Bl=4):Bl=t===$s?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Vl=t,Rl===null&&(Kl=1,qs(e,ui(t,e.current)))}function Eu(){var e=Xa.current;return e===null?!0:(zl&4194048)===zl?Za===null:(zl&62914560)===zl||zl&536870912?e===Za:!1}function Du(){var e=N.H;return N.H=Fs,e===null?Fs:e}function Ou(){var e=N.A;return N.A=Pl,e}function ku(){Kl=4,Hl||(zl&4194048)!==zl&&Xa.current!==null||(Ul=!0),!(ql&134217727)&&!(Jl&134217727)||Ll===null||xu(Ll,zl,Xl,!1)}function Au(e,t,n){var r=Il;Il|=2;var i=Du(),a=Ou();(Ll!==e||zl!==t)&&(iu=null,wu(e,t)),t=!1;var o=Kl;a:do try{if(Bl!==0&&Rl!==null){var s=Rl,c=Vl;switch(Bl){case 8:Cu(),o=6;break a;case 3:case 2:case 9:case 6:Xa.current===null&&(t=!0);var l=Bl;if(Bl=0,Vl=null,Iu(e,s,c,l),n&&Ul){o=0;break a}break;default:l=Bl,Bl=0,Vl=null,Iu(e,s,c,l)}}ju(),o=Kl;break}catch(t){Tu(e,t)}while(1);return t&&e.shellSuspendCounter++,Bi=zi=null,Il=r,N.H=i,N.A=a,Rl===null&&(Ll=null,zl=0,Kr()),o}function ju(){for(;Rl!==null;)Pu(Rl)}function Mu(e,t){var n=Il;Il|=2;var r=Du(),a=Ou();Ll!==e||zl!==t?(iu=null,ru=B()+500,wu(e,t)):Ul=Re(e,t);a:do try{if(Bl!==0&&Rl!==null){t=Rl;var o=Vl;b:switch(Bl){case 1:Bl=0,Vl=null,Iu(e,t,o,1);break;case 2:case 9:if(ya(o)){Bl=0,Vl=null,Fu(t);break}t=function(){Bl!==2&&Bl!==9||Ll!==e||(Bl=7),od(e)},o.then(t,t);break a;case 3:Bl=7;break a;case 4:Bl=5;break a;case 7:ya(o)?(Bl=0,Vl=null,Fu(t)):(Bl=0,Vl=null,Iu(e,t,o,7));break;case 5:var s=null;switch(Rl.tag){case 26:s=Rl.memoizedState;case 5:case 27:var c=Rl;if(s?Yf(s):c.stateNode.complete){Bl=0,Vl=null;var l=c.sibling;if(l!==null)Rl=l;else{var u=c.return;u===null?Rl=null:(Rl=u,Lu(u))}break b}}Bl=0,Vl=null,Iu(e,t,o,5);break;case 6:Bl=0,Vl=null,Iu(e,t,o,6);break;case 8:Cu(),Kl=6;break a;default:throw Error(i(462))}}Nu();break}catch(t){Tu(e,t)}while(1);return Bi=zi=null,N.H=r,N.A=a,Il=n,Rl===null?(Ll=null,zl=0,Kr(),Kl):0}function Nu(){for(;Rl!==null&&!ye();)Pu(Rl)}function Pu(e){var t=kc(e.alternate,e,Gl);e.memoizedProps=e.pendingProps,t===null?Lu(e):Rl=t}function Fu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=pc(n,t,t.pendingProps,t.type,void 0,zl);break;case 11:t=pc(n,t,t.pendingProps,t.type.render,t.ref,zl);break;case 5:To(t);default:W(n,t),t=Rl=ri(t,Gl),t=kc(n,t,Gl)}e.memoizedProps=e.pendingProps,t===null?Lu(e):Rl=t}function Iu(e,t,n,r){Bi=zi=null,To(t),Ta=null,Ea=0;var i=t.return;try{if(Qs(e,i,t,n,zl)){Kl=1,qs(e,ui(n,e.current)),Rl=null;return}}catch(t){if(i!==null)throw Rl=i,t;Kl=1,qs(e,ui(n,e.current)),Rl=null;return}t.flags&32768?(Di||r===1?e=!0:Ul||zl&536870912?e=!1:(Hl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Xa.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ru(t,e)):Lu(t)}function Lu(e){var t=e;do{if(t.flags&32768){Ru(t,Hl);return}e=t.return;var n=Ic(t.alternate,t,Gl);if(n!==null){Rl=n;return}if(t=t.sibling,t!==null){Rl=t;return}Rl=t=e}while(t!==null);Kl===0&&(Kl=5)}function Ru(e,t){do{var n=Lc(e.alternate,e);if(n!==null){n.flags&=32767,Rl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Rl=e;return}Rl=e=n}while(e!==null);Kl=6,Rl=null}function zu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Wu();while(ou!==0);if(Il&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Gr,Ue(e,n,o,s,c,l),e===Ll&&(Rl=Ll=null,zl=0),cu=t,su=e,lu=n,uu=o,du=a,fu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,$u(Se,function(){return Gu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=N.T,N.T=null,a=P.p,P.p=2,s=Il,Il|=4;try{nl(e,t,n)}finally{Il=s,P.p=a,N.T=r}}ou=1,Bu(),Vu(),Hu()}}function Bu(){if(ou===1){ou=0;var e=su,t=cu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=N.T,N.T=null;var r=P.p;P.p=2;var i=Il;Il|=4;try{ml(t,e);var a=Wd,o=yr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&vr(s.ownerDocument.documentElement,s)){if(c!==null&&br(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=_r(s,h),v=_r(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}fp=!!Ud,Wd=Ud=null}finally{Il=i,P.p=r,N.T=n}}e.current=t,ou=2}}function Vu(){if(ou===2){ou=0;var e=su,t=cu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=N.T,N.T=null;var r=P.p;P.p=2;var i=Il;Il|=4;try{rl(e,t.alternate,t)}finally{Il=i,P.p=r,N.T=n}}ou=3}}function Hu(){if(ou===4||ou===3){ou=0,be();var e=su,t=cu,n=lu,r=fu;t.subtreeFlags&10256||t.flags&10256?ou=5:(ou=0,cu=su=null,Uu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(au=null),Je(n),t=t.stateNode,Oe&&typeof Oe.onCommitFiberRoot==`function`)try{Oe.onCommitFiberRoot(De,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=N.T,i=P.p,P.p=2,N.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{N.T=t,P.p=i}}lu&3&&Wu(),od(e),i=e.pendingLanes,n&261930&&i&42?e===mu?pu++:(pu=0,mu=e):pu=0,sd(0,!1)}}function Uu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,na(t)))}function Wu(){return Bu(),Vu(),Hu(),Gu()}function Gu(){if(ou!==5)return!1;var e=su,t=uu;uu=0;var n=Je(lu),r=N.T,a=P.p;try{P.p=32>n?32:n,N.T=null,n=du,du=null;var o=su,s=lu;if(ou=0,cu=su=null,lu=0,Il&6)throw Error(i(331));var c=Il;if(Il|=4,jl(o.current),Cl(o,o.current,s,n),Il=c,sd(0,!1),Oe&&typeof Oe.onPostCommitFiberRoot==`function`)try{Oe.onPostCommitFiberRoot(De,o)}catch{}return!0}finally{P.p=a,N.T=r,Uu(e,t)}}function Ku(e,t,n){t=ui(n,t),t=Ys(e.stateNode,t,2),e=La(e,t,2),e!==null&&(He(e,2),od(e))}function qu(e,t,n){if(e.tag===3)Ku(e,e,n);else for(;t!==null;){if(t.tag===3){Ku(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(au===null||!au.has(r))){e=ui(n,e),n=Xs(2),r=La(t,n,2),r!==null&&(Zs(n,r,t,e),He(r,2),od(r));break}}t=t.return}}function Ju(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Fl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Wl=!0,i.add(n),e=Yu.bind(null,e,t,n),t.then(e,e))}function Yu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ll===e&&(zl&n)===n&&(Kl===4||Kl===3&&(zl&62914560)===zl&&300>B()-tu?!(Il&2)&&wu(e,0):Yl|=n,Zl===zl&&(Zl=0)),od(e)}function Xu(e,t){t===0&&(t=Be()),e=Yr(e,t),e!==null&&(He(e,t),od(e))}function Zu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Xu(e,n)}function Qu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Xu(e,n)}function $u(e,t){return _e(e,t)}var ed=null,td=null,nd=!1,rd=!1,id=!1,ad=0;function od(e){e!==td&&e.next===null&&(td===null?ed=td=e:td=td.next=e),rd=!0,nd||(nd=!0,pd())}function sd(e,t){if(!id&&rd){id=!0;do for(var n=!1,r=ed;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ae(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,fd(r,a))}else a=zl,a=Le(r,r===Ll?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Re(r,a)||(n=!0,fd(r,a));r=r.next}while(n);id=!1}}function cd(){ld()}function ld(){rd=nd=!1;var e=0;ad!==0&&Xd()&&(e=ad);for(var t=B(),n=null,r=ed;r!==null;){var i=r.next,a=ud(r,t);a===0?(r.next=null,n===null?ed=i:n.next=i,i===null&&(td=n)):(n=r,(e!==0||a&3)&&(rd=!0)),r=i}ou!==0&&ou!==5||sd(e,!1),ad!==0&&(ad=0)}function ud(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ae(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ze(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Ll,n=zl,n=Le(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Bl===2||Bl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ve(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Re(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ve(r),Je(n)){case 2:case 8:n=H;break;case 32:n=Se;break;case 268435456:n=we;break;default:n=Se}return r=dd.bind(null,e),n=_e(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ve(r),e.callbackPriority=2,e.callbackNode=null,2}function dd(e,t){if(ou!==0&&ou!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Wu()&&e.callbackNode!==n)return null;var r=zl;return r=Le(e,e===Ll?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(vu(e,r,t),ud(e,B()),e.callbackNode!=null&&e.callbackNode===n?dd.bind(null,e):null)}function fd(e,t){if(Wu())return null;vu(e,t,!0)}function pd(){ef(function(){Il&6?_e(V,cd):ld()})}function md(){if(ad===0){var e=aa;e===0&&(e=U,U<<=1,!(U&261888)&&(U=256)),ad=e}return ad}function hd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Wt(``+e)}function gd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function _d(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=hd((i[$e]||null).action),o=r.submitter;o&&(t=(t=o[$e]||null)?hd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new pn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ad!==0){var e=o?gd(i,o):new FormData(i);xs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?gd(i,o):new FormData(i),xs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var vd=0;vd<Br.length;vd++){var yd=Br[vd];Vr(yd.toLowerCase(),`on`+(yd[0].toUpperCase()+yd.slice(1)))}Vr(Mr,`onAnimationEnd`),Vr(Nr,`onAnimationIteration`),Vr(Pr,`onAnimationStart`),Vr(`dblclick`,`onDoubleClick`),Vr(`focusin`,`onFocus`),Vr(`focusout`,`onBlur`),Vr(Fr,`onTransitionRun`),Vr(Ir,`onTransitionStart`),Vr(Lr,`onTransitionCancel`),Vr(Rr,`onTransitionEnd`),ht(`onMouseEnter`,[`mouseout`,`mouseover`]),ht(`onMouseLeave`,[`mouseout`,`mouseover`]),ht(`onPointerEnter`,[`pointerout`,`pointerover`]),ht(`onPointerLeave`,[`pointerout`,`pointerover`]),mt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),mt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),mt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),mt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),mt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),mt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var bd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),xd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(bd));function Sd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Hr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Hr(e)}i.currentTarget=null,a=c}}}}function Cd(e,t){var n=t[tt];n===void 0&&(n=t[tt]=new Set);var r=e+`__bubble`;n.has(r)||(Dd(t,e,2,!1),n.add(r))}function wd(e,t,n){var r=0;t&&(r|=4),Dd(n,e,r,t)}var Td=`_reactListening`+Math.random().toString(36).slice(2);function Ed(e){if(!e[Td]){e[Td]=!0,ft.forEach(function(t){t!==`selectionchange`&&(xd.has(t)||wd(t,!1,e),wd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Td]||(t[Td]=!0,wd(`selectionchange`,!1,t))}}function Dd(e,t,n,r){switch(yp(t)){case 2:var i=pp;break;case 8:i=mp;break;default:i=hp}n=i.bind(null,t,n,e),i=void 0,!tn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Od(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=st(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}Qt(function(){var r=a,i=qt(n),s=[];a:{var c=zr.get(e);if(c!==void 0){var l=pn,u=e;switch(e){case`keypress`:if(cn(n)===0)break a;case`keydown`:case`keyup`:l=jn;break;case`focusin`:u=`focus`,l=Sn;break;case`focusout`:u=`blur`,l=Sn;break;case`beforeblur`:case`afterblur`:l=Sn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=bn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=xn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Nn;break;case Mr:case Nr:case Pr:l=Cn;break;case Rr:l=Pn;break;case`scroll`:case`scrollend`:l=hn;break;case`wheel`:l=Fn;break;case`copy`:case`cut`:case`paste`:l=wn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Mn;break;case`toggle`:case`beforetoggle`:l=In}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=$t(m,p),g!=null&&d.push(kd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Kt&&(u=n.relatedTarget||n.fromElement)&&(st(u)||u[et]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?st(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=bn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Mn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:lt(l),h=u==null?c:lt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,st(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=jd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Md(s,c,l,d,!1),u!==null&&f!==null&&Md(s,f,u,d,!0)}}a:{if(c=r?lt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=nr;else if(Xn(c))if(rr)v=fr;else{v=ur;var y=lr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Vt(r.elementType)&&(v=nr):v=dr;if(v&&=v(e,r)){Zn(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Nt(c,`number`,c.value)}switch(y=r?lt(r):window,e){case`focusin`:(Xn(y)||y.contentEditable===`true`)&&(Sr=y,Cr=r,wr=null);break;case`focusout`:wr=Cr=Sr=null;break;case`mousedown`:Tr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Tr=!1,Er(s,n,i);break;case`selectionchange`:if(xr)break;case`keydown`:case`keyup`:Er(s,n,i)}var b;if(Rn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Kn?Wn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Vn&&n.locale!==`ko`&&(Kn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Kn&&(b=sn()):(rn=i,an=`value`in rn?rn.value:rn.textContent,Kn=!0)),y=Ad(r,x),0<y.length&&(x=new Tn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Gn(n),b!==null&&(x.data=b)))),(b=Bn?qn(e,n):Jn(e,n))&&(x=Ad(r,`onBeforeInput`),0<x.length&&(y=new Tn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),_d(s,e,r,n,i)}Sd(s,t)})}function kd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ad(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=$t(e,n),i!=null&&r.unshift(kd(e,i,a)),i=$t(e,t),i!=null&&r.push(kd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function jd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Md(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=$t(n,a),l!=null&&o.unshift(kd(n,l,c))):i||(l=$t(n,a),l!=null&&o.push(kd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Nd=/\r\n?/g,Pd=/\u0000|\uFFFD/g;function Fd(e){return(typeof e==`string`?e:``+e).replace(Nd,`
80
+ `).replace(Pd,``)}function Id(e,t){return t=Fd(t),Fd(e)===t}function Ld(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Lt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Lt(e,``+r);break;case`className`:xt(e,`class`,r);break;case`tabIndex`:xt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:xt(e,n,r);break;case`style`:Bt(e,r,o);break;case`data`:if(t!==`object`){xt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Wt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Ld(e,t,`name`,a.name,a,null),Ld(e,t,`formEncType`,a.formEncType,a,null),Ld(e,t,`formMethod`,a.formMethod,a,null),Ld(e,t,`formTarget`,a.formTarget,a,null)):(Ld(e,t,`encType`,a.encType,a,null),Ld(e,t,`method`,a.method,a,null),Ld(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Wt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Gt);break;case`onScroll`:r!=null&&Cd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Cd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Wt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Cd(`beforetoggle`,e),Cd(`toggle`,e),bt(e,`popover`,r);break;case`xlinkActuate`:St(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:St(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:St(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:St(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:St(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:St(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:St(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:St(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:St(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:bt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Ht.get(n)||n,bt(e,n,r))}}function Rd(e,t,n,r,a,o){switch(n){case`style`:Bt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Lt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Lt(e,``+r);break;case`onScroll`:r!=null&&Cd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Cd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Gt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!pt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[$e]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):bt(e,n,r)}}}function zd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Cd(`error`,e),Cd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Ld(e,t,o,s,n,null)}}a&&Ld(e,t,`srcSet`,n.srcSet,n,null),r&&Ld(e,t,`src`,n.src,n,null);return;case`input`:Cd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Ld(e,t,r,d,n,null)}}Mt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Cd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Ld(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Pt(e,!!r,n,!0):Pt(e,!!r,t,!1);return;case`textarea`:for(s in Cd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Ld(e,t,s,c,n,null)}It(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Ld(e,t,l,r,n,null)}return;case`dialog`:Cd(`beforetoggle`,e),Cd(`toggle`,e),Cd(`cancel`,e),Cd(`close`,e);break;case`iframe`:case`object`:Cd(`load`,e);break;case`video`:case`audio`:for(r=0;r<bd.length;r++)Cd(bd[r],e);break;case`image`:Cd(`error`,e),Cd(`load`,e);break;case`details`:Cd(`toggle`,e);break;case`embed`:case`source`:case`link`:Cd(`error`,e),Cd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Ld(e,t,u,r,n,null)}return;default:if(Vt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Rd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Ld(e,t,c,r,n,null))}function Bd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Ld(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Ld(e,t,p,m,r,f)}}jt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Ld(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Ld(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Pt(e,!!n,n?[]:``,!1):Pt(e,!!n,t,!0)):Pt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Ld(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Ld(e,t,s,a,r,o)}Ft(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Ld(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Ld(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Ld(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Ld(e,t,u,p,r,m)}return;default:if(Vt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Rd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Rd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Ld(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Ld(e,t,f,p,r,m)}function Vd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Hd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Vd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Vd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Ud=null,Wd=null;function Gd(e){return e.nodeType===9?e:e.ownerDocument}function Kd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function qd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Jd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Yd=null;function Xd(){var e=window.event;return e&&e.type===`popstate`?e===Yd?!1:(Yd=e,!0):(Yd=null,!1)}var Zd=typeof setTimeout==`function`?setTimeout:void 0,Qd=typeof clearTimeout==`function`?clearTimeout:void 0,$d=typeof Promise==`function`?Promise:void 0,ef=typeof queueMicrotask==`function`?queueMicrotask:$d===void 0?Zd:function(e){return $d.resolve(null).then(e).catch(tf)};function tf(e){setTimeout(function(){throw e})}function nf(e){return e===`head`}function rf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Rp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)vf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,vf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[at]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&vf(e.ownerDocument.body);n=i}while(n);Rp(t)}function af(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function of(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:of(n),ot(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function sf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[at])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=pf(e.nextSibling),e===null)break}return null}function cf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=pf(e.nextSibling),e===null))return null;return e}function lf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=pf(e.nextSibling),e===null))return null;return e}function uf(e){return e.data===`$?`||e.data===`$~`}function df(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function ff(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function pf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var mf=null;function hf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return pf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function gf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function _f(e,t,n){switch(t=Gd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function vf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ot(e)}var yf=new Map,bf=new Set;function xf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Sf=P.d;P.d={f:Cf,r:wf,D:Df,C:Of,L:kf,m:Af,X:Mf,S:jf,M:Nf};function Cf(){var e=Sf.f(),t=Su();return e||t}function wf(e){var t=ct(e);t!==null&&t.tag===5&&t.type===`form`?Cs(t):Sf.r(e)}var Tf=typeof document>`u`?null:document;function Ef(e,t,n){var r=Tf;if(r&&typeof t==`string`&&t){var i=At(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),bf.has(i)||(bf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),zd(t,`link`,e),dt(t),r.head.appendChild(t)))}}function Df(e){Sf.D(e),Ef(`dns-prefetch`,e,null)}function Of(e,t){Sf.C(e,t),Ef(`preconnect`,e,t)}function kf(e,t,n){Sf.L(e,t,n);var r=Tf;if(r&&e&&t){var i=`link[rel="preload"][as="`+At(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+At(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+At(n.imageSizes)+`"]`)):i+=`[href="`+At(e)+`"]`;var a=i;switch(t){case`style`:a=Ff(e);break;case`script`:a=zf(e)}yf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),yf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(If(a))||t===`script`&&r.querySelector(Bf(a))||(t=r.createElement(`link`),zd(t,`link`,e),dt(t),r.head.appendChild(t)))}}function Af(e,t){Sf.m(e,t);var n=Tf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+At(r)+`"][href="`+At(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=zf(e)}if(!yf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),yf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Bf(a)))return}r=n.createElement(`link`),zd(r,`link`,e),dt(r),n.head.appendChild(r)}}}function jf(e,t,n){Sf.S(e,t,n);var r=Tf;if(r&&e){var i=ut(r).hoistableStyles,a=Ff(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(If(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=yf.get(a))&&Uf(e,n);var c=o=r.createElement(`link`);dt(c),zd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Hf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Mf(e,t){Sf.X(e,t);var n=Tf;if(n&&e){var r=ut(n).hoistableScripts,i=zf(e),a=r.get(i);a||(a=n.querySelector(Bf(i)),a||(e=f({src:e,async:!0},t),(t=yf.get(i))&&Wf(e,t),a=n.createElement(`script`),dt(a),zd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nf(e,t){Sf.M(e,t);var n=Tf;if(n&&e){var r=ut(n).hoistableScripts,i=zf(e),a=r.get(i);a||(a=n.querySelector(Bf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=yf.get(i))&&Wf(e,t),a=n.createElement(`script`),dt(a),zd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pf(e,t,n,r){var a=(a=ae.current)?xf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Ff(n.href),n=ut(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Ff(n.href);var o=ut(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(If(e)))&&!o._p&&(s.instance=o,s.state.loading=5),yf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},yf.set(e,n),o||Rf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=zf(n),n=ut(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Ff(e){return`href="`+At(e)+`"`}function If(e){return`link[rel="stylesheet"][`+e+`]`}function Lf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Rf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),zd(t,`link`,n),dt(t),e.head.appendChild(t))}function zf(e){return`[src="`+At(e)+`"]`}function Bf(e){return`script[async]`+e}function Vf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+At(n.href)+`"]`);if(r)return t.instance=r,dt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),dt(r),zd(r,`style`,a),Hf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Ff(n.href);var o=e.querySelector(If(a));if(o)return t.state.loading|=4,t.instance=o,dt(o),o;r=Lf(n),(a=yf.get(a))&&Uf(r,a),o=(e.ownerDocument||e).createElement(`link`),dt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),zd(o,`link`,r),t.state.loading|=4,Hf(o,n.precedence,e),t.instance=o;case`script`:return o=zf(n.src),(a=e.querySelector(Bf(o)))?(t.instance=a,dt(a),a):(r=n,(a=yf.get(o))&&(r=f({},n),Wf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),dt(a),zd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Hf(r,n.precedence,e));return t.instance}function Hf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Uf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Wf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Gf=null;function Kf(e,t,n){if(Gf===null){var r=new Map,i=Gf=new Map;i.set(n,r)}else i=Gf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[at]||a[Qe]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function qf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Jf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Yf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Ff(r.href),a=t.querySelector(If(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=$f.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,dt(a);return}a=t.ownerDocument||t,r=Lf(r),(i=yf.get(i))&&Uf(r,i),a=a.createElement(`link`),dt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),zd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=$f.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Zf=0;function Qf(e,t){return e.stylesheets&&e.count===0&&tp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&tp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Zf===0&&(Zf=62500*Hd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&tp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Zf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function $f(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)tp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ep=null;function tp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ep=new Map,t.forEach(np,e),ep=null,$f.call(e))}function np(e,t){if(!(t.state.loading&4)){var n=ep.get(e);if(n)var r=n.get(null);else{n=new Map,ep.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=$f.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var rp={$$typeof:b,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function ip(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ve(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ve(0),this.hiddenUpdates=Ve(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ap(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ip(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ei(3,null,null,t),e.current=a,a.stateNode=e,t=ta(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Pa(a),e}function op(e){return e?(e=Qr,e):Qr}function sp(e,t,n,r,i,a){i=op(i),r.context===null?r.context=i:r.pendingContext=i,r=Ia(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=La(e,r,t),n!==null&&(_u(n,e,t),Ra(n,e,t))}function cp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function lp(e,t){cp(e,t),(e=e.alternate)&&cp(e,t)}function up(e){if(e.tag===13||e.tag===31){var t=Yr(e,67108864);t!==null&&_u(t,e,67108864),lp(e,67108864)}}function dp(e){if(e.tag===13||e.tag===31){var t=hu();t=qe(t);var n=Yr(e,t);n!==null&&_u(n,e,t),lp(e,t)}}var fp=!0;function pp(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=2,hp(e,t,n,r)}finally{P.p=a,N.T=i}}function mp(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=8,hp(e,t,n,r)}finally{P.p=a,N.T=i}}function hp(e,t,n,r){if(fp){var i=gp(r);if(i===null)Od(e,t,r,_p,n),Op(e,r);else if(Ap(i,e,t,n,r))r.stopPropagation();else if(Op(e,r),t&4&&-1<Dp.indexOf(e)){for(;i!==null;){var a=ct(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ie(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ae(o);s.entanglements[1]|=c,o&=~c}od(a),!(Il&6)&&(ru=B()+500,sd(0,!1))}}break;case 31:case 13:s=Yr(a,2),s!==null&&_u(s,a,2),Su(),lp(a,2)}if(a=gp(r),a===null&&Od(e,t,r,_p,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Od(e,t,r,null,n)}}function gp(e){return e=qt(e),vp(e)}var _p=null;function vp(e){if(_p=null,e=st(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return _p=e,null}function yp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(xe()){case V:return 2;case H:return 8;case Se:case Ce:return 32;case we:return 268435456;default:return 32}default:return 32}}var bp=!1,xp=null,Sp=null,Cp=null,wp=new Map,Tp=new Map,Ep=[],Dp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Op(e,t){switch(e){case`focusin`:case`focusout`:xp=null;break;case`dragenter`:case`dragleave`:Sp=null;break;case`mouseover`:case`mouseout`:Cp=null;break;case`pointerover`:case`pointerout`:wp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Tp.delete(t.pointerId)}}function kp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=ct(t),t!==null&&up(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ap(e,t,n,r,i){switch(t){case`focusin`:return xp=kp(xp,e,t,n,r,i),!0;case`dragenter`:return Sp=kp(Sp,e,t,n,r,i),!0;case`mouseover`:return Cp=kp(Cp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return wp.set(a,kp(wp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Tp.set(a,kp(Tp.get(a)||null,e,t,n,r,i)),!0}return!1}function jp(e){var t=st(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Xe(e.priority,function(){dp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Xe(e.priority,function(){dp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Mp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=gp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Kt=r,n.target.dispatchEvent(r),Kt=null}else return t=ct(n),t!==null&&up(t),e.blockedOn=n,!1;t.shift()}return!0}function Np(e,t,n){Mp(e)&&n.delete(t)}function Pp(){bp=!1,xp!==null&&Mp(xp)&&(xp=null),Sp!==null&&Mp(Sp)&&(Sp=null),Cp!==null&&Mp(Cp)&&(Cp=null),wp.forEach(Np),Tp.forEach(Np)}function Fp(e,n){e.blockedOn===n&&(e.blockedOn=null,bp||(bp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Pp)))}var Ip=null;function Lp(e){Ip!==e&&(Ip=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Ip===e&&(Ip=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(vp(r||n)===null)continue;break}var a=ct(n);a!==null&&(e.splice(t,3),t-=3,xs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Rp(e){function t(t){return Fp(t,e)}xp!==null&&Fp(xp,e),Sp!==null&&Fp(Sp,e),Cp!==null&&Fp(Cp,e),wp.forEach(t),Tp.forEach(t);for(var n=0;n<Ep.length;n++){var r=Ep[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ep.length&&(n=Ep[0],n.blockedOn===null);)jp(n),n.blockedOn===null&&Ep.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[$e]||null;if(typeof a==`function`)o||Lp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[$e]||null)s=o.formAction;else if(vp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Lp(n)}}}function zp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Bp(e){this._internalRoot=e}Vp.prototype.render=Bp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;sp(n,hu(),e,t,null,null)},Vp.prototype.unmount=Bp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;sp(e.current,2,null,e,null,null),Su(),t[et]=null}};function Vp(e){this._internalRoot=e}Vp.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ye();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ep.length&&t!==0&&t<Ep[n].priority;n++);Ep.splice(n,0,e),n===0&&jp(e)}};var Hp=n.version;if(Hp!==`19.2.5`)throw Error(i(527,Hp,`19.2.5`));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Up={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:N,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Wp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wp.isDisabled&&Wp.supportsFiber)try{De=Wp.inject(Up),Oe=Wp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ws,s=Gs,c=Ks;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ap(e,1,!1,null,null,n,r,null,o,s,c,zp),e[et]=t.current,Ed(e),new Bp(t)},e.hydrateRoot=function(e,t,n){if(!a(e))throw Error(i(299));var r=!1,o=``,s=Ws,c=Gs,l=Ks,u=null;return n!=null&&(!0===n.unstable_strictMode&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),t=ap(e,1,!0,t,n??null,r,o,u,s,c,l,zp),t.context=op(null),n=t.current,r=hu(),r=qe(r),o=Ia(r),o.callback=null,La(n,o,r),n=r,t.current.lanes=n,He(t,n),od(t),e[et]=t.current,Ed(e),new Vp(t)}})),$$=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Q$()}))(),e1=class{log=VA();root;onBrowserRender=j({on:`react:browser:render`,handler:async({hydration:e,root:t,element:n})=>{e?.[`alepha.react.router.layers`]?(this.root=(0,$$.hydrateRoot)(t,n),this.log.info(`Hydrated root element`)):(this.root??=(0,$$.createRoot)(t),this.root.render(n),this.log.info(`Created root element`))}})},t1=class{alepha=D(Wk);pageApi=D(G$);get state(){return this.alepha.store.get(`alepha.react.router.state`)}get pages(){return this.pageApi.getPages()}get concretePages(){return this.pageApi.getConcretePages()}get browser(){if(this.alepha.isBrowser())return this.alepha.inject(Y$)}isActive(e,t={}){let n=this.state.url.pathname,r=n===e||n===`${e}/`||`${n}/`===e;return t.startWith&&!r&&(r=n.startsWith(e)),r}node(e,t={}){let n=this.pageApi.page(e);return!n.lazy&&!n.component?{...n,label:n.label??n.name,children:void 0}:{...n,label:n.label??n.name,href:this.path(e,t),children:void 0}}path(e,t={}){return this.pageApi.pathname(e,{params:{...this.state?.params,...t.params},query:t.query})}async reload(){this.browser&&await this.push(this.location.pathname+this.location.search,{replace:!0,force:!0})}getURL(){return this.browser?new URL(this.location.href):this.state.url}get location(){if(!this.browser)throw new p(`Browser is required`);return this.browser.location}get current(){return this.state}get pathname(){return this.state.url.pathname}get query(){let e={};for(let[t,n]of new URLSearchParams(this.state.url.search).entries())e[t]=String(n);return e}async back(){this.browser?.history.back()}async forward(){this.browser?.history.forward()}async invalidate(e){await this.browser?.invalidate(e)}async push(e,t){for(let n of this.pages)if(n.name===e){await this.browser?.push(this.path(e,t),t);return}await this.browser?.push(e,t)}anchor(e,t={}){let n=e;for(let r of this.pages)if(r.name===e){n=this.path(e,t);break}return{href:this.base(n),onClick:e=>{e.stopPropagation(),e.preventDefault(),this.push(n,t).catch(console.error)}}}base(e){let t=`/__devtools`;return t===`/`?e:t+e}setQueryParams(e,t={}){let n=new URLSearchParams((typeof e==`function`?e:()=>e)(this.query)).toString(),r=n?`${this.pathname}?${n}`:this.pathname,i=this.base(r);t.push?window.history.pushState({},``,i):window.history.replaceState({},``,i)}},n1=()=>MA(t1),r1=e=>{let t=n1();return(0,q.createElement)(`a`,{...e,...t.anchor(e.href)},e.children)},i1=e=>{A$();let t=n1(),[n,r]=(0,q.useState)(!1),i=typeof e==`string`?{href:e}:{...e,href:e.href},a=i.href,o=t.isActive(a,i);return{isPending:n,isActive:o,anchorProps:{href:t.base(a),onClick:async e=>{if(e?.stopPropagation(),e?.preventDefault(),!o&&!n){r(!0);try{await t.push(a)}finally{r(!1)}}}}}},a1=(e,t={})=>{let n=jA(),r=t.key??`q`,i=n1(),a=i.query[r],[o={},s]=(0,q.useState)(s1(n,e,i.query[r]));return(0,q.useEffect)(()=>{s(s1(n,e,a))},[a]),[o,t=>{s(t),i.setQueryParams(i=>({...i,[r]:o1(n,e,t)}))}]},o1=(e,t,n)=>btoa(JSON.stringify(e.codec.decode(t,n))),s1=(e,t,n)=>{try{return e.codec.decode(t,JSON.parse(atob(decodeURIComponent(n))))}catch{return}};C({name:`alepha.react.router`,primitives:[T$],services:[G$,q$,Y$,t1,e1,w$],register:e=>e.with(yj).with(jj).with(AA).with(uj).with(gj).with(G$).with(Y$).with(q$).with(e1).with(t1)});var c1=class{root=T$({path:`/`,component:A0})};function l1(e){let t=.5;return e>=0&&e<=20?t=10:e>=20&&e<=50?t=4:e>=50&&e<=80?t=2:e>=80&&e<=99?t=1:e>=99&&e<=100&&(t=0),e+t}var u1=()=>qZ({mounted:!1,progress:0,interval:0,step:1,stepInterval:100,timeouts:[]}),d1=e=>JZ(e);function f1(e,t){let n=t.getState();t.setState({...n,...e(t.getState())})}function p1(e){f1(e=>({progress:Math.max(e.progress-e.step,0)}),e)}function m1(e,t){f1(()=>({progress:CM(e,0,100),mounted:!0}),t)}function h1(e){f1(e=>(window.clearInterval(e.interval),e.timeouts.forEach(e=>window.clearTimeout(e)),{timeouts:[]}),e)}function g1(e){h1(e),f1(t=>({progress:100,timeouts:[window.setTimeout(()=>{f1(()=>({mounted:!1}),e)},50),window.setTimeout(()=>{f1(()=>({progress:0}),e)},t.stepInterval+50)]}),e)}function _1(e){f1(e=>({progress:l1(e.progress),mounted:!0}),e),f1(t=>(window.clearInterval(t.interval),{interval:window.setInterval(()=>{f1(e=>({progress:l1(e.progress),mounted:!0}),e)},t.stepInterval),mounted:!0}),e)}function v1(e){f1(e=>(window.clearInterval(e.interval),{interval:-1}),e)}function y1(e){h1(e),v1(e),f1(()=>({progress:0,mounted:!1}),e)}function b1(e){f1(t=>{let n=Math.min(t.progress+t.step,100),r=n!==100&&n!==0;if(!r){let i=window.setTimeout(()=>y1(e),t.stepInterval+50);return{progress:n,mounted:r,timeouts:[...t.timeouts,i]}}return{progress:n,mounted:r}},e)}function x1(){let e=u1();return[e,{start:()=>_1(e),stop:()=>v1(e),reset:()=>y1(e),set:t=>m1(t,e),increment:()=>b1(e),decrement:()=>p1(e),complete:()=>g1(e),cleanup:()=>h1(e)}]}var[S1,C1]=x1(),{start:w1,stop:T1,reset:E1,set:D1,increment:O1,decrement:k1,complete:A1,cleanup:j1}=C1,M1={root:`m_8f2832ae`,section:`m_7a0fe999`};function N1({initialProgress:e=0,color:t,size:n=3,stepInterval:r=500,withinPortal:i=!0,portalProps:a,zIndex:o=lM(`max`),store:s=S1,...c}){s.initialize({mounted:!1,progress:e,interval:-1,step:1,stepInterval:r,timeouts:[]});let l=d1(s);return(0,q.useEffect)(()=>()=>y1(s),[s]),(0,J.jsx)(UB,{...a,withinPortal:i,children:(0,J.jsx)(QY,{radius:0,value:l.progress,size:n,color:t,classNames:M1,"data-mounted":l.mounted||void 0,__vars:{"--nprogress-z-index":o?.toString()},...c})})}N1.displayName=`@mantine/nprogress/NavigationProgress`;var P1=()=>{vj(Vj),vj(Hj);let e=MA(MZ);return[e.getTheme(),t=>{e.setTheme(t.index)},{overrides:e.getThemeOverrides(),setOverrides:t=>{e.setThemeOverrides(t)},resetOverrides:()=>{e.resetThemeOverrides()}}]},F1=()=>MA(C$),I1=()=>qZ({opened:!1,empty:!1,selected:-1,listId:``,query:``,registeredActions:new Set}),L1=e=>JZ(e);function R1(e,t){let n=t.getState();t.setState({...n,...e(t.getState())})}function z1(e){R1(()=>({opened:!0,selected:-1}),e)}function B1(e){R1(()=>({opened:!1}),e)}function V1(e){R1(e=>({opened:!e.opened,selected:e.opened?e.selected:-1}),e)}function H1(e,t){t.updateState(t=>({...t,selected:e}))}function U1(e,t){t.updateState(t=>({...t,listId:e}))}function W1(e,t=document){let n=t.querySelector(e);if(n)return n;let r=t instanceof ShadowRoot?t.host.children:t.children;for(let t=0;t<r.length;t+=1){let n=r[t];if(n.shadowRoot){let t=W1(e,n.shadowRoot);if(t)return t}let i=W1(e,n);if(i)return i}return null}function G1(e,t){let n=t.getState(),r=n.listId?W1(`#${n.listId}`):null,i=r?.querySelector(`[data-selected]`),a=r?.querySelectorAll(`[data-action]`)??[],o=CM(e===-1?a.length-1:e===a.length?0:e,0,a.length-1);return i?.removeAttribute(`data-selected`),a[o]?.scrollIntoView({block:`nearest`}),a[o]?.setAttribute(`data-selected`,`true`),H1(o,t),o}function K1(e){return G1(e.getState().selected+1,e)}function q1(e){return G1(e.getState().selected-1,e)}function J1(e){W1(`#${e.getState().listId} [data-selected]`)?.click()}function Y1(e,t){let n=t.getState();return n.registeredActions.add(e),()=>{n.registeredActions.delete(e)}}function X1(e,t){R1(()=>({query:e}),t),Promise.resolve().then(()=>{G1(0,t),R1(e=>({empty:e.query.trim().length>0&&e.registeredActions.size===0||!1}),t)})}function Z1({clearQuery:e},t){t.updateState(t=>({...t,selected:-1,query:e?``:t.query,empty:e?!1:t.empty}))}var Q1={open:z1,close:B1,toggle:V1,updateState:R1,setSelectedAction:H1,setListId:U1,selectAction:G1,selectNextAction:K1,selectPreviousAction:q1,triggerSelectedAction:J1,registerAction:Y1,setQuery:X1,clearSpotlightState:Z1};function $1(){let e=I1();return[e,{open:()=>z1(e),close:()=>B1(e),toggle:()=>V1(e)}]}var[e0,t0]=$1(),{open:n0,close:r0,toggle:i0}=t0;function a0(e){let t=e;return t.group!==void 0&&Array.isArray(t.actions)}var[o0,s0]=nM(`Spotlight component was not found in tree`),c0={root:`m_d2b315db`,content:`m_3cd250e0`,body:`m_d2abce9b`,search:`m_f366a061`,actionsList:`m_6e463822`,action:`m_d49bb8ef`,actionBody:`m_3d475731`,actionSection:`m_832642f6`,actionLabel:`m_6c2a1345`,actionDescription:`m_a6d9d78d`,empty:`m_82f78f74`,footer:`m_ddcaf054`,actionsGroup:`m_5a3e5f7b`},l0={dimmedSections:!0,highlightQuery:!1},u0=Q(e=>{let{className:t,style:n,classNames:r,styles:i,id:a,description:o,label:s,leftSection:c,rightSection:l,children:u,dimmedSections:d,highlightQuery:f,highlightColor:p,closeSpotlightOnTrigger:m,onClick:h,onMouseDown:g,keywords:_,vars:v,...y}=Z(`SpotlightAction`,l0,e),b=s0(),x={classNames:r,styles:i},S=f&&typeof s==`string`?(0,J.jsx)(dq,{component:`span`,highlight:b.query,color:p,...b.getStyles(`actionLabel`,x),children:s}):(0,J.jsx)(`span`,{...b.getStyles(`actionLabel`,x),children:s});return(0,J.jsx)(SB,{"data-action":!0,...b.getStyles(`action`,{className:t,style:n,...x}),...y,onMouseDown:e=>{e.preventDefault(),g?.(e)},onClick:e=>{h?.(e),(m??b.closeOnActionTrigger)&&Q1.close(b.store)},tabIndex:-1,children:u||(0,J.jsxs)(J.Fragment,{children:[c&&(0,J.jsx)($,{component:`span`,mod:{position:`left`,dimmed:d},...b.getStyles(`actionSection`,x),children:c}),(0,J.jsxs)(`span`,{...b.getStyles(`actionBody`,x),children:[S,(0,J.jsx)(`span`,{...b.getStyles(`actionDescription`,x),children:o})]}),l&&(0,J.jsx)($,{component:`span`,mod:{position:`right`,dimmed:d},...b.getStyles(`actionSection`,x),children:l})]})})});u0.classes=c0,u0.displayName=`@mantine/spotlight/SpotlightAction`;var d0=Q(e=>{let{className:t,style:n,styles:r,classNames:i,label:a,children:o,...s}=Z(`SpotlightActionsGroup`,null,e);return(0,J.jsx)($,{...s0().getStyles(`actionsGroup`,{className:t,style:n,classNames:i,styles:r}),...s,__vars:{"--spotlight-label":`'${a?.replace(/\\/g,`\\\\`).replace(/'/g,`\\'`)}'`},children:o})});d0.classes=c0,d0.displayName=`@mantine/core/SpotlightActionsGroup`;var f0=Q(e=>{let{className:t,style:n,id:r,children:i,vars:a,classNames:o,styles:s,...c}=Z(`SpotlightActionsList`,null,e),l=s0(),u=`mantine-${(0,q.useId)().replace(/:/g,``)}`,d=r||u;return(0,q.useEffect)(()=>(Q1.setListId(d,l.store),()=>Q1.setListId(``,l.store)),[]),(0,J.jsx)(vB.Autosize,{...l.getStyles(`actionsList`,{className:t,style:n,classNames:o,styles:s}),type:`scroll`,scrollbarSize:`var(--spotlight-actions-list-padding)`,offsetScrollbars:`y`,id:d,...c,children:i})});f0.classes=c0,f0.displayName=`@mantine/spotlight/SpotlightActionsList`;var p0=Q(e=>{let{className:t,style:n,classNames:r,styles:i,...a}=Z(`SpotlightEmpty`,null,e);return(0,J.jsx)($,{...s0().getStyles(`empty`,{classNames:r,styles:i,className:t,style:n}),...a})});p0.classes=c0,p0.displayName=`@mantine/spotlight/SpotlightEmpty`;var m0=Q(e=>{let{className:t,style:n,classNames:r,styles:i,...a}=Z(`SpotlightFooter`,null,e);return(0,J.jsx)($,{...s0().getStyles(`footer`,{className:t,classNames:r,style:n,styles:i}),...a})});m0.classes=c0,m0.displayName=`@mantine/spotlight/SpotlightFooter`;function h0(e,t){if(!e)return[];let n=()=>Q1.open(t);return Array.isArray(e)?e.map(e=>[e,n]):[[e,n]]}var g0={size:600,yOffset:80,zIndex:lM(`max`),overlayProps:{backgroundOpacity:.35,blur:7},transitionProps:{duration:200,transition:`pop`},store:e0,clearQueryOnClose:!0,closeOnActionTrigger:!0,shortcut:`mod + K`,maxHeight:400},_0=Q(e=>{let t=Z(`SpotlightRoot`,g0,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,store:c,children:l,query:u,onQueryChange:d,transitionProps:f,clearQueryOnClose:p,shortcut:m,tagsToIgnore:h,triggerOnContentEditable:g,disabled:_,onSpotlightOpen:v,onSpotlightClose:y,forceOpened:b,closeOnActionTrigger:x,maxHeight:S,scrollable:C,attributes:w,...T}=t,{opened:E,query:D}=L1(c),O=typeof u==`string`?u:D,k=e=>{d?.(e),Q1.setQuery(e,c)},A=bF({name:`Spotlight`,classes:c0,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w}),{resolvedClassNames:j,resolvedStyles:M}=oF({classNames:n,styles:a,props:t});return fN(h0(m,c),h,g),PM(()=>{E?v?.():y?.()},[E]),_?null:(0,J.jsx)(o0,{value:{getStyles:A,query:O,setQuery:k,store:c,closeOnActionTrigger:x},children:(0,J.jsx)(aJ,{...T,withCloseButton:!1,opened:E||!!b,padding:0,onClose:()=>Q1.close(c),className:r,style:i,classNames:j,styles:M,attributes:w,transitionProps:{...f,onExited:()=>{p&&k(``),Q1.clearSpotlightState({clearQuery:p},c),f?.onExited?.()}},__vars:{"--spotlight-max-height":C?X(S):void 0},__staticSelector:`Spotlight`,"data-scrollable":C||void 0,children:l})})});_0.classes=c0,_0.displayName=`@mantine/spotlight/SpotlightRoot`;var v0={size:`lg`},y0=Q(e=>{let{classNames:t,styles:n,onKeyDown:r,onChange:i,vars:a,value:o,attributes:s,...c}=Z(`SpotlightSearch`,v0,e),l=s0(),u=l.getStyles(`search`),[d,f]=(0,q.useState)(!1),p=e=>{r?.(e),!d&&(e.nativeEvent.code===`ArrowDown`&&(e.preventDefault(),Q1.selectNextAction(l.store)),e.nativeEvent.code===`ArrowUp`&&(e.preventDefault(),Q1.selectPreviousAction(l.store)),(e.nativeEvent.code===`Enter`||e.nativeEvent.code===`NumpadEnter`)&&(e.preventDefault(),Q1.triggerSelectedAction(l.store)))};return(0,J.jsx)(AU,{...u,classNames:[{input:u.className},t],styles:[{input:u.style},n],...c,value:o??l.query,onChange:e=>{l.setQuery(e.currentTarget.value),i?.(e)},onKeyDown:p,onCompositionStart:()=>f(!0),onCompositionEnd:()=>f(!1)})});y0.classes=c0,y0.displayName=`@mantine/spotlight/SpotlightSearch`;function b0(e){return Array.isArray(e)?e.map(e=>e.trim()).join(`,`).toLowerCase().trim():typeof e==`string`?e.toLowerCase().trim():``}function x0(e){return e.reduce((e,t)=>`actions`in t?[...e,...t.actions.map(e=>({...e,group:t.group}))]:[...e,t],[])}function S0(e){let t={},n=[];return e.forEach(e=>{e.group?(t[e.group]||(t[e.group]={pushed:!1,data:{group:e.group,actions:[]}}),t[e.group].data.actions.push(e),t[e.group].pushed||(t[e.group].pushed=!0,n.push(t[e.group].data))):n.push(e)}),n}var C0=(e,t)=>{let n=e.trim().toLowerCase(),r=[[],[]];return x0(t).forEach(e=>{e.label?.toLowerCase().includes(n)?r[0].push(e):(e.description?.toLowerCase().includes(n)||b0(e.keywords).includes(n))&&r[1].push(e)}),S0(r.flat())};function w0(e,t){if(!Array.isArray(e))return[];let n=0;return e.reduce((e,r)=>{if(n>=t)return e;if(a0(r)){let i=w0(r.actions,t-n);e.push({group:r.group,actions:i}),n+=i.length}else e.push(r),n+=1;return e},[])}var T0={size:600,yOffset:80,limit:1/0,zIndex:lM(`max`),overlayProps:{backgroundOpacity:.35,blur:7},transitionProps:{duration:200,transition:`pop`},store:e0,filter:C0,clearQueryOnClose:!0,closeOnActionTrigger:!0,shortcut:`mod + K`},E0=Q(e=>{let{searchProps:t,filter:n,query:r,onQueryChange:i,actions:a,nothingFound:o,highlightQuery:s,limit:c,scrollAreaProps:l,...u}=Z(`Spotlight`,T0,e),[d,f]=tN({value:r,defaultValue:``,finalValue:``,onChange:i}),p=w0(n(d,a),c).map(e=>{if(a0(e)){let t=e.actions.map(({id:e,...t})=>(0,J.jsx)(u0,{highlightQuery:s,...t},e));return(0,J.jsx)(d0,{label:e.group,children:t},e.group)}return(0,J.jsx)(u0,{highlightQuery:s,...e},e.id)});return(0,J.jsxs)(_0,{...u,query:d,onQueryChange:f,children:[(0,J.jsx)(y0,{...t}),p.length>0&&(0,J.jsx)(f0,{...l,children:p}),p.length===0&&o&&(0,J.jsx)(p0,{children:o})]})});E0.classes=c0,E0.displayName=`@mantine/spotlight/Spotlight`,E0.Search=y0,E0.ActionsList=f0,E0.Action=u0,E0.Empty=p0,E0.ActionsGroup=d0,E0.Footer=m0,E0.Root=_0,E0.open=t0.open,E0.close=t0.close,E0.toggle=t0.toggle;var D0=K.object({id:K.text({description:`Unique identifier for the user.`}),name:K.optional(K.text({description:`Full name of the user.`})),email:K.optional(K.text({description:`Email address of the user.`,format:`email`})),username:K.optional(K.text({description:`Preferred username of the user.`})),picture:K.optional(K.text({description:`URL to the user's profile picture.`})),sessionId:K.optional(K.text({description:`Session identifier for the user, if applicable.`})),organization:K.optional(K.uuid({description:`Organization the user belongs to.`})),roles:K.optional(K.array(K.text(),{description:`List of roles assigned to the user.`})),realm:K.optional(K.text({description:`The realm (issuer) the user was authenticated from.`}))}),O0=Vk({name:`alepha.security.user`,schema:K.optional(D0)});K.object({name:K.text({description:`Name of the permission.`}),group:K.optional(K.text({description:`Group of the permission.`})),description:K.optional(K.text({description:`Describe the permission.`})),method:K.optional(K.text({description:`HTTP method of the permission. When available.`})),path:K.optional(K.text({description:`Pathname of the permission. When available.`}))}),K.object({name:K.text({description:`Name of the role.`}),description:K.optional(K.text({description:`Describe the role.`})),default:K.optional(K.boolean({description:`If true, this role will be assigned to all users by default.`})),permissions:K.array(K.object({name:K.text({description:`Name of the permission.`}),ownership:K.optional(K.boolean({description:`If true, user will only have access to it's own resources.`})),exclude:K.optional(K.array(K.text(),{description:`Exclude some permissions. Useful when 'name' is a wildcard.`}))}))}),C({name:`alepha.security`});var k0=e=>{let t=e.shortcut??`mod+K`,n=e.searchPlaceholder??`Search...`,r=e.nothingFound??`Nothing found...`,i=n1(),[a]=vj(O0);return(0,J.jsx)(E0,{actions:(0,q.useMemo)(()=>i.concretePages.filter(e=>!(e.can&&!e.can())).map(e=>({id:e.name,label:e.label??e.name,description:e.description,onClick:()=>e.staticName?i.push(e.staticName,{params:e.params}):i.push(e.name),leftSection:n2(e.icon)})),[a]),shortcut:t,limit:10,searchProps:{leftSection:(0,J.jsx)(g$,{size:j0.sizes.icon.md}),placeholder:n},nothingFound:r})},A0=e=>{let t=F1(),[n]=P1();_j({"react:transition:begin":()=>{C1.start()},"react:transition:end":()=>{C1.complete()},"react:action:error":({error:e,type:n})=>{n===`transition`||e instanceof xj||e instanceof Lk||t.danger({title:e.name||`Error`,message:e.message??`An error occurred while processing your action.`})}},[]);let r=e.mantine?.defaultColorScheme??n.defaultColorScheme;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(MP,{defaultColorScheme:r,...e.colorSchemeScript}),(0,J.jsxs)(iF,{...e.mantine,defaultColorScheme:r,theme:{...n,...e.mantine?.theme},children:[(0,J.jsx)(zQ,{...e.notifications}),(0,J.jsx)(N1,{...e.navigationProgress}),(0,J.jsxs)(HZ,{...e.modals,children:[e.omnibar!==!1&&(0,J.jsx)(k0,{...e.omnibar}),e.children??(0,J.jsx)(H$,{})]})]})]})},j0={colors:{transparent:`transparent`,background:`var(--alepha-ground)`,surface:`var(--alepha-surface)`,elevated:`var(--alepha-elevated)`,border:`var(--alepha-border)`},sizes:{icon:{xs:16,sm:20,md:24,lg:28,xl:32}}};function M0(e){return(0,q.isValidElement)(e)?!1:typeof e==`function`||typeof e==`object`&&!!e&&`$$typeof`in e}var N0=e=>{let t=UP(),n={...e};n.variant;let{tooltip:r,menu:i,icon:a,iconSize:o,...s}=n;if(n.intent&&(n.intent===`primary`?s.color??=t.primaryColor:n.intent===`success`?(s.c??=`white`,s.color??=`green`):n.intent===`danger`?(s.c??=`white`,s.color??=`red`):n.intent===`warning`?s.color??=`yellow`:n.intent===`info`&&(s.c??=`white`,s.color??=`blue`)),n.icon){let e=j0.sizes.icon,t=n.iconSize??e[n.size||`sm`],r=M0(n.icon)?(0,J.jsx)(n.icon,{size:t}):(0,J.jsx)(`span`,{children:n.icon});n.children?s.leftSection=r:(s.children=q.Children.only(r),s.p??=8)}if(n.leftSection&&!n.children&&(s.px??=`xs`),n.textVisibleFrom){let{children:e,textVisibleFrom:t,leftSection:n,...a}=s;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(IU,{w:`100%`,visibleFrom:t,children:(0,J.jsx)(N0,{flex:1,...a,leftSection:n,tooltip:r,menu:i,children:e})}),(0,J.jsx)(IU,{w:`100%`,hiddenFrom:t,children:(0,J.jsx)(N0,{px:`xs`,...a,"aria-label":typeof e==`string`?e:void 0,tooltip:r,menu:i,children:n})})]})}let c=`href`in s&&s.href?s.href.startsWith(`http`)||s.target?(0,J.jsx)(z0,{...s,href:s.href,children:s.children}):(0,J.jsx)(R0,{...s,href:s.href,children:s.children}):(delete s.classNameActive,delete s.variantActive,delete s.propsActive,`action`in s&&s.action?(0,J.jsx)(I0,{...s,action:s.action,children:s.children}):`onClick`in s&&s.onClick?(0,J.jsx)(L0,{...s,onClick:s.onClick,children:s.children}):`form`in s&&s.form?s.type===`reset`?(0,J.jsx)(F0,{...s,form:s.form,children:s.children}):(0,J.jsx)(P0,{...s,form:s.form,children:s.children}):(0,J.jsx)(kG,{...s,children:s.children}));if(i&&(c=(0,J.jsxs)(Uq,{position:i.position||`bottom-start`,width:i.width||200,shadow:i.shadow||`md`,trigger:i.on===`hover`?`hover`:`click`,...i.menuProps,children:[(0,J.jsx)(Uq.Target,{...i.targetProps,children:c}),(0,J.jsx)(Uq.Dropdown,{children:i.items.map((e,t)=>(0,J.jsx)(B0,{item:e,index:t},t))})]})),r){let e={openDelay:1e3};return(0,J.jsx)(fX,{...typeof r==`string`||typeof r==`number`?{...e,label:r,children:c}:{...e,...r,children:c}})}return c},P0=e=>{let{form:t,...n}=e,r=bj(t);return(0,J.jsx)(kG,{...n,form:t.id,loading:r.loading,disabled:r.loading,type:`submit`,children:e.children})},F0=e=>{let{form:t,...n}=e,r=bj(t);return(0,J.jsx)(kG,{...n,disabled:r.loading,type:`reset`,children:e.children})},I0=e=>{let{action:t,...n}=e;return(0,J.jsx)(kG,{...n,disabled:t.loading||e.disabled,loading:t.loading,onClick:()=>t.run(),children:e.children})},L0=({preventDefault:e,...t})=>{let n=NA({handler:async n=>{e&&n.preventDefault(),await t.onClick(n)}},[t.onClick,e]);return(0,J.jsx)(kG,{...t,disabled:n.loading||t.disabled,loading:n.loading,onClick:n.run,children:t.children})},R0=e=>{let{active:t,classNameActive:n,variantActive:r,propsActive:i,routerGoOptions:a,onClick:o,anchorProps:s,anchor:c,...l}=e,u=n1(),{isPending:d,isActive:f}=i1(t?{href:e.href,...t}:{href:e.href}),p=u.anchor(e.href,a);i&&f&&Object.assign(l,i);let m=e=>{o?.(e),p.onClick?.(e)},h=l.className||``;return f&&t!==!1&&n&&(l.className=`${h} ${n}`.trim()),s||c?(0,J.jsx)(XU,{component:`a`,...p,...l,...s,onClick:m,children:e.children}):(0,J.jsx)(kG,{component:`a`,loading:d,...l,...p,onClick:m,variant:f&&t!==!1?r??`filled`:l.variant??`subtle`,children:e.children})},z0=e=>{let{active:t,classNameActive:n,variantActive:r,propsActive:i,routerGoOptions:a,target:o,...s}=e;return(0,J.jsx)(kG,{component:`a`,target:o,...s,children:e.children})},B0=e=>{let{item:t,index:n}=e,r=n1(),i=NA({handler:async e=>{await t.onClick?.()}},[t.onClick]);if(t.type===`divider`)return(0,J.jsx)(Uq.Divider,{},n);if(t.type===`label`)return(0,J.jsx)(Uq.Label,{children:t.label},n);if(t.children&&t.children.length>0)return(0,J.jsxs)(Uq,{trigger:`hover`,position:`right-start`,offset:2,children:[(0,J.jsx)(Uq.Target,{children:(0,J.jsx)(Uq.Item,{leftSection:t.icon,rightSection:(0,J.jsx)(JQ,{size:14}),children:t.label})}),(0,J.jsx)(Uq.Dropdown,{children:t.children.map((e,t)=>(0,J.jsx)(B0,{item:e,index:t},t))})]},n);let a={};return e.item.onClick?a.onClick=i.run:e.item.href&&Object.assign(a,r.anchor(e.item.href)),(0,J.jsx)(Uq.Item,{leftSection:t.icon??(t.active?(0,J.jsx)(KQ,{size:j0.sizes.icon.sm}):(0,J.jsx)(IU,{w:j0.sizes.icon.sm})),onClick:t.onClick,color:t.color,...a,children:t.label},n)},V0=e=>{let[t,n]=vj(Bj);return(0,J.jsx)(bG,{opened:!t.closed,onClick:()=>n({...t,closed:!t.closed}),hiddenFrom:`md`,size:`sm`,...e})},H0=e=>{let{setColorScheme:t}=OP(),n=()=>{t((document.documentElement.getAttribute(`data-mantine-color-scheme`)??`light`)===`dark`?`light`:`dark`)},r=e.size??`sm`,i=j0.sizes.icon[r]??j0.sizes.icon.sm;return(0,J.jsx)(N0,{onClick:n,variant:e.variant??`default`,size:r,"aria-label":`Toggle color scheme`,icon:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(y$,{size:i,className:`alepha-light-hidden`}),(0,J.jsx)(f$,{size:i,className:`alepha-dark-hidden`})]}),...e})},U0=e=>{let t=Rj();return(0,J.jsx)(N0,{variant:`default`,icon:a$,menu:{items:t.languages.map(e=>({label:t.tr(e),onClick:()=>t.setLang(e),active:t.lang===e}))},...e})},W0=e=>{let t=bN(),n=t===`macos`||t===`ios`?`⌘`:`Ctrl`;return e.collapsed?(0,J.jsx)(N0,{variant:`subtle`,onClick:t0.open,icon:g$,tooltip:{label:`Search`,position:`right`},...e.actionProps}):(0,J.jsx)(N0,{variant:`default`,onClick:t0.open,justify:`space-between`,rightSection:(0,J.jsxs)(Eq,{visibleFrom:`sm`,size:`sm`,children:[(0,J.jsx)(cA,{children:n}),`+K`]}),radius:`md`,...e.actionProps,children:(0,J.jsxs)(IU,{align:`center`,gap:`xs`,children:[(0,J.jsx)(g$,{size:16,color:`gray`}),(0,J.jsx)(IU,{visibleFrom:`sm`,miw:192,children:(0,J.jsx)(qU,{size:`xs`,c:`dimmed`,children:`Search...`})})]})})},G0=()=>MA(KZ),K0=[`red`,`pink`,`grape`,`violet`,`indigo`,`blue`,`cyan`,`teal`,`green`,`lime`,`yellow`,`orange`],q0=[{label:`xs`,value:`xs`},{label:`sm`,value:`sm`},{label:`md`,value:`md`},{label:`lg`,value:`lg`},{label:`xl`,value:`xl`}],J0=[{label:`xs`,value:`xs`},{label:`sm`,value:`sm`},{label:`md`,value:`md`},{label:`lg`,value:`lg`},{label:`xl`,value:`xl`}],Y0=[{label:`System`,value:``},{label:`Inter`,value:`Inter, sans-serif`},{label:`Mono`,value:`ui-monospace, SFMono-Regular, Menlo, monospace`},{label:`Serif`,value:`Georgia, 'Times New Roman', serif`}],X0=()=>{let[,,e]=P1(),t=G0(),n=UP(),{overrides:r,setOverrides:i}=e,a=r.primaryColor||n.primaryColor,o=r.radius||n.defaultRadius||`md`,s=r.fontFamily||``,c=r.fontSize||`md`,l=r.scale||`md`,u=e=>{i({...r,...e})};return(0,J.jsxs)(IU,{direction:`column`,gap:`lg`,children:[(0,J.jsxs)(IU,{direction:`column`,gap:`xs`,children:[(0,J.jsx)(qU,{fw:500,size:`sm`,children:`Primary Color`}),(0,J.jsx)(DX,{cols:6,spacing:`xs`,children:K0.map(e=>(0,J.jsx)(IU,{justify:`center`,children:(0,J.jsx)(BG,{color:n.colors[e]?.[6]??e,onClick:()=>u({primaryColor:e}),style:{cursor:`pointer`},size:32,children:a===e&&(0,J.jsx)(KQ,{size:14,color:`white`})})},e))})]}),(0,J.jsxs)(IU,{direction:`column`,gap:`xs`,children:[(0,J.jsx)(qU,{fw:500,size:`sm`,children:`Border Radius`}),(0,J.jsx)(IU,{gap:`xs`,children:q0.map(e=>(0,J.jsx)(N0,{variant:String(o)===e.value?`filled`:`default`,size:`xs`,flex:1,onClick:()=>u({radius:e.value}),children:e.label},e.value))})]}),(0,J.jsxs)(IU,{direction:`column`,gap:`xs`,children:[(0,J.jsx)(qU,{fw:500,size:`sm`,children:`Font Family`}),(0,J.jsx)(vX,{data:Y0,value:s,onChange:e=>u({fontFamily:e??``}),allowDeselect:!1})]}),(0,J.jsxs)(IU,{direction:`column`,gap:`xs`,children:[(0,J.jsx)(qU,{fw:500,size:`sm`,children:`Font Size`}),(0,J.jsx)(IU,{gap:`xs`,children:J0.map(e=>(0,J.jsx)(N0,{variant:c===e.value?`filled`:`default`,size:`xs`,flex:1,onClick:()=>u({fontSize:e.value}),children:e.label},e.value))})]}),(0,J.jsxs)(IU,{direction:`column`,gap:`xs`,children:[(0,J.jsx)(qU,{fw:500,size:`sm`,children:`Scale`}),(0,J.jsx)(IU,{gap:`xs`,children:J0.map(e=>(0,J.jsx)(N0,{variant:l===e.value?`filled`:`default`,size:`xs`,flex:1,onClick:()=>u({scale:e.value}),children:e.label},e.value))})]}),(0,J.jsxs)(IU,{justify:`space-between`,children:[(0,J.jsx)(N0,{variant:`subtle`,color:`red`,onClick:()=>e.resetOverrides(),children:`Reset`}),(0,J.jsx)(N0,{variant:`default`,px:`xl`,onClick:()=>t.close(),children:`OK`})]})]})},Z0=e=>{let{expert:t,...n}=e,[r,i]=P1(),a=vj(jZ)[0],o=G0(),s=a.map((e,t)=>({label:e.name,onClick:()=>i({index:t}),active:r.name===e.name}));return t&&s.push({type:`divider`},{label:`Customize...`,onClick:()=>{o.open({title:`Customize Theme`,content:(0,J.jsx)(X0,{})})}}),(0,J.jsx)(N0,{variant:`default`,icon:p$,menu:{items:s},...n})},Q0=e=>{let[t,n]=vj(Bj);return(0,J.jsx)(N0,{icon:t.collapsed?s$:o$,visibleFrom:`md`,variant:`default`,onClick:()=>{n({...t,collapsed:!t.collapsed})},tooltip:{position:`right`,label:t.collapsed?`Show sidebar`:`Hide sidebar`},...e})},$0=(0,q.forwardRef)((e,t)=>{let{fill:n,center:r,centerX:i,centerY:a,col:o,ground:s,surface:c,elevated:l,rounded:u,bordered:d,borderedTop:f,borderedBottom:p,shadowed:m,overflow:h,form:g,..._}=e;if(n&&(_.flex??=1),o&&(_.direction??=`column`),r&&(_.align??=`center`,_.justify??=`center`),i&&(_.justify??=`center`),a&&(_.align??=`center`),s?_.bg=`var(--alepha-ground)`:c?_.bg=`var(--alepha-surface)`:l&&(_.bg=`var(--alepha-elevated)`),u&&(_.bdrs=u===!0?`md`:u),d&&(_.bd=`1px solid var(--alepha-border)`),f&&(_.style={borderTop:`1px solid var(--alepha-border)`,..._.style??{}}),p&&(_.style={borderBottom:`1px solid var(--alepha-border)`,..._.style??{}}),m&&(_.className=`${_.className??``} shadow-${m===!0?`md`:m}`.trim()),h&&(_.className=`${_.className??``} overflow-auto`.trim()),g){let e=typeof g==`object`?g:{};return e instanceof Cj&&(e=e.props),(0,J.jsx)(IU,{ref:t,component:`form`,...e,..._})}return(0,J.jsx)(IU,{ref:t,..._})});$0.displayName=`Flex`;var e2=e=>{let{items:t=[]}=e,n=n1(),r=(e,t)=>{if(e.can&&!e.can())return null;if(`type`in e){if(e.type===`burger`)return(0,J.jsx)(V0,{},t);if(e.type===`dark`)return(0,J.jsx)(H0,{...e.props},t);if(e.type===`theme`)return(0,J.jsx)(Z0,{...e.props},t);if(e.type===`search`)return(0,J.jsx)(W0,{...e.props},t);if(e.type===`lang`)return(0,J.jsx)(U0,{...e.props},t);if(e.type===`spacer`)return(0,J.jsx)($0,{w:16},t);if(e.type===`divider`)return(0,J.jsx)(FK,{orientation:`vertical`},t);if(e.type===`logo`)return i(e,t);if(e.type===`back`)return a(e,t)}return`element`in e?e.element:null},i=(e,t)=>{let{src:n,text:r,icon:i,href:a,height:o=32,width:s,fontWeight:c=700,fontSize:l=`lg`}=e.props??{},u=n?(0,J.jsx)(mq,{src:n,h:o,w:s,fit:`contain`}):i?typeof i==`function`?(0,J.jsx)(i,{}):i:r?(0,J.jsx)(i2,{fw:c,size:l,children:r}):null;return a?(0,J.jsx)(XU,{component:r1,href:a,underline:`never`,c:`inherit`,children:u},t):(0,J.jsx)($0,{children:u},t)},a=(e,t)=>{let{label:r=`Back`,iconOnly:i=!0,href:a,icon:o}=e.props??{},s=o?typeof o==`function`?(0,J.jsx)(o,{size:18}):o:(0,J.jsx)(UQ,{size:18}),c=()=>{a?n.push(a):n.back()};return i?(0,J.jsx)(N0,{icon:s,variant:`subtle`,color:`gray`,onClick:c,tooltip:{label:r,position:`bottom`}},t):(0,J.jsx)(N0,{leftSection:s,variant:`subtle`,color:`gray`,onClick:c,children:r},t)},o=t.filter(e=>e.position===`left`),s=t.filter(e=>e.position===`center`),c=t.filter(e=>e.position===`right`),l=(0,J.jsxs)($0,{h:`100%`,align:`center`,px:e.container?0:`md`,justify:`space-between`,...e.flexProps,children:[(0,J.jsx)($0,{flex:1,children:o.map((e,t)=>(0,J.jsx)($0,{ml:t===0?0:`md`,align:`center`,children:r(e,t)},t))}),(0,J.jsx)($0,{children:s.map((e,t)=>(0,J.jsx)($0,{mx:`md`,align:`center`,children:r(e,t)},t))}),(0,J.jsx)($0,{flex:1,align:`center`,justify:`end`,children:c.map((e,t)=>(0,J.jsx)($0,{ml:t===0?0:`md`,align:`center`,children:r(e,t)},t))})]});return e.container?(0,J.jsx)(jK,{h:`100%`,...typeof e.container==`boolean`?{}:e.container,children:l}):l},t2=(0,q.forwardRef)((e,t)=>(0,J.jsx)(jK,{ref:t,...e}));t2.displayName=`Container`;var n2=(e,t)=>e?(0,q.isValidElement)(e)?e:M0(e)?(0,J.jsx)(e,{size:t??j0.sizes.icon.md}):e:null,r2={primary:`blue`,info:`cyan`,success:`green`,warning:`yellow`,danger:`red`},i2=(0,q.forwardRef)((e,t)=>{let{intent:n,bold:r,italic:i,light:a,muted:o,small:s,uppercase:c,capitalize:l,center:u,monospace:d,title:f,...p}=e;return n&&(p.c??=r2[n]),r&&(p.fw??=700),a&&(p.fw??=300),i&&(p.fs??=`italic`),o&&(p.c??=`dimmed`),s&&(p.size??=`xs`),c&&(p.tt??=`uppercase`),l&&(p.tt??=`capitalize`),u&&(p.ta??=`center`),d&&(p.ff??=`monospace`),f&&(p.size??=`xl`),(0,J.jsx)(qU,{ref:t,...p})});i2.displayName=`Text`;var a2=e=>{let t=n1(),n=()=>{e.onItemClick?.(e.item),e.item.onClick?.()},r=e.item.children&&e.item.children.length>0,i=r?{on:`hover`,position:`right`,menuProps:{arrowPosition:`center`,arrowSize:10,withArrow:!0},items:[{type:`label`,label:e.item.label},...e.item.children.filter(e=>!e.can||e.can()).map(e=>({label:e.label,icon:n2(e.icon,j0.sizes.icon.sm),href:e.href,active:e.href?t.isActive(e.href,{startWith:e.activeStartsWith}):void 0}))]}:void 0;return(0,J.jsx)($0,{w:`100%`,justify:`center`,pos:`relative`,children:(0,J.jsx)(N0,{size:e.item.theme?.size??e.theme.button?.size??(e.level===0?`sm`:`xs`),bd:0,variant:`default`,propsActive:{variant:`outline`},tooltip:r?void 0:{label:e.item.label,position:`right`},onClick:r?void 0:n,icon:n2(e.item.icon,j0.sizes.icon.sm)??(0,J.jsx)(v$,{size:j0.sizes.icon.sm}),href:r?void 0:e.item.href,target:r?void 0:e.item.target,menu:i,...e.item.actionProps})})},o2=e=>{let t=n1(),n=(0,q.useCallback)(e=>{if(!e.children)return!1;for(let r of e.children)if(r.href&&t.isActive(r.href)||n(r))return!0;return!1},[]),[r,i]=(0,q.useState)(n(e.item));return _j({"react:transition:end":()=>{n(e.item)&&i(!0)}},[]),e.level>2?null:(0,J.jsxs)($0,{direction:`column`,ps:e.level===0?0:32,pos:`relative`,children:[(0,J.jsx)(N0,{w:`100%`,justify:`space-between`,href:e.item.href,target:e.item.target,size:e.item.theme?.size??e.theme.button?.size??(e.level===0?`sm`:`xs`),bd:0,fw:`normal`,variant:`default`,propsActive:{variant:`outline`},radius:e.item.theme?.radius??e.theme.button?.radius??`md`,onClick:t=>{e.item.target||t.preventDefault(),e.item.children&&e.item.children.length>0?i(!r):(e.onItemClick?.(e.item),e.item.onClick?.())},leftSection:(0,J.jsxs)($0,{w:`100%`,align:`center`,gap:`sm`,children:[n2(e.item.icon,j0.sizes.icon.sm),(0,J.jsx)($0,{direction:`column`,children:(0,J.jsx)($0,{children:e.item.label})})]}),rightSection:e.item.children?(0,J.jsx)($0,{children:r?(0,J.jsx)(qQ,{size:14}):(0,J.jsx)(JQ,{size:14})}):e.item.rightSection,...e.item.actionProps}),e.item.children&&r&&(0,J.jsxs)($0,{direction:`column`,"data-parent-level":e.level,gap:2,py:2,children:[(0,J.jsx)($0,{style:{position:`absolute`,width:1,background:`linear-gradient(to bottom, transparent, var(--mantine-color-default-border), transparent)`,top:48,left:20+32*e.level,bottom:16}}),e.item.children.filter(e=>!e.can||e.can()).map((t,n)=>(0,J.jsx)(o2,{item:t,level:e.level+1,onItemClick:e.onItemClick,theme:e.theme},n))]})]})},s2=e=>{let t=n1(),n=(e,t,n)=>(0,J.jsx)($0,{h:1,bg:`var(--mantine-color-default-border)`,my:`xs`,mx:t?`calc(-1 * var(--mantine-spacing-md))`:n?0:`sm`},e),r=(t,i,a)=>{if(`type`in t){if(t.type===`spacer`)return a?null:(0,J.jsx)($0,{h:16},i);if(t.type===`divider`)return n(i,t.fill,a);if(t.type===`search`)return(0,J.jsx)($0,{mb:`xs`,w:`100%`,justify:`center`,pos:`relative`,children:(0,J.jsx)(W0,{collapsed:a})},i);if(t.type===`toggle`)return(0,J.jsx)(Q0,{},i);if(t.type===`section`)return t.children&&t.children.length>0&&!t.children.some(e=>!(`can`in e)||!e.can||e.can())?null:a?(0,J.jsx)(q.Fragment,{children:t.children?.map((e,t)=>r(e,`s${i}-${t}`,a))},i):(0,J.jsxs)(q.Fragment,{children:[(0,J.jsxs)($0,{mt:`md`,align:`center`,gap:`xs`,children:[n2(t.icon,j0.sizes.icon.sm),(0,J.jsx)(i2,{size:`xs`,c:`dimmed`,tt:`uppercase`,fw:`bold`,children:t.label})]}),t.children?.map((e,t)=>r(e,`s${i}-${t}`,a))]},i)}return`element`in t?(0,J.jsx)(q.Fragment,{children:t.element},i):t.can&&!t.can()||t.children&&t.children.length>0&&!t.children.some(e=>!e.can||e.can())?null:a?(0,J.jsx)(a2,{item:t,level:0,onItemClick:e.onItemClick,theme:e.theme??{}},i):(0,J.jsx)(o2,{item:t,level:0,onItemClick:e.onItemClick,theme:e.theme??{}},i)},i=()=>{if(e.items)return e.items;if(e.autoPopulateMenu){let n=t.concretePages.filter(e=>!e.can||e.can()).map(e=>({label:e.label??e.name,icon:n2(e.icon),href:t.path(e.name)}));if(typeof e.autoPopulateMenu==`object`&&e.autoPopulateMenu.startsWith){let t=e.autoPopulateMenu.startsWith;return n.filter(e=>e.href?.startsWith(t))}return n}return[]},a=e.items?e.gap??8:`xs`,o=(0,q.useMemo)(()=>i(),[e.items,e.autoPopulateMenu]),s=t=>(0,J.jsxs)($0,{flex:1,py:`md`,direction:`column`,...e.flexProps,children:[(0,J.jsx)($0,{gap:a,px:`md`,direction:`column`,children:o.filter(e=>e.position===`top`).map((e,n)=>r(e,n,t))}),(0,J.jsx)($0,{gap:a,px:`md`,direction:`column`,flex:1,children:o.filter(e=>!e.position).map((e,n)=>r(e,n,t))}),(0,J.jsx)($0,{gap:a,px:`md`,direction:`column`,children:o.filter(e=>e.position===`bottom`).map((e,n)=>r(e,n,t))})]});return e.collapsed?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)($0,{flex:1,direction:`column`,visibleFrom:`md`,children:s(!0)}),(0,J.jsx)($0,{flex:1,direction:`column`,hiddenFrom:`md`,children:s(!1)})]}):s(!1)},c2=e=>{let t=n1(),[n,r]=vj(Bj),i=e.sidebarProps?.collapsed===void 0?n.collapsed:e.sidebarProps.collapsed,{collapsedWidth:a,expandedWidth:o}=n,s=()=>{if(e.noSidebarWhen?.paths){for(let n of e.noSidebarWhen.paths)if(t.isActive(n,{startWith:!0}))return!1}return!0},[c,l]=(0,q.useState)(s());_j({"react:transition:end":()=>{l(s())},"react:transition:begin":()=>{r({...n,closed:!0})}},[n]);let u=[{position:`left`,type:`burger`}],d={...e.appBarProps};d.container??=e.container;let f=c&&e.sidebarProps!==void 0,p=e.appBarProps||e.header,m=e.footer;e.footerHeight&&(m??=(0,J.jsx)($0,{h:e.footerHeight}));let h=e.headerHeight??60,g=e.footerHeight??24,_=p?h:0,v=m?g:0,y=i?a:o,b=e.children??(0,J.jsx)(H$,{});return(0,J.jsxs)(bW,{layout:`alt`,w:`100%`,h:`100vh`,flex:1,header:p?{height:h}:void 0,navbar:f?{width:{base:y},breakpoint:`md`,collapsed:{mobile:n.closed}}:void 0,footer:m?{height:g}:void 0,...e.appShellProps,children:[p&&(0,J.jsx)(bW.Header,{...e.appShellHeaderProps,children:e.header??(0,J.jsx)(e2,{items:u,...d})}),f&&(0,J.jsxs)(bW.Navbar,{...e.appShellNavbarProps,children:[e.navbarHeader?(0,J.jsx)($0,{style:{borderBottom:`1px solid var(--mantine-color-default-border)`},h:_,children:e.navbarHeader({collapsed:i})}):null,(0,J.jsx)(s2,{...e.sidebarProps??{},collapsed:i}),e.navbarFooter?(0,J.jsx)($0,{style:{borderTop:`1px solid var(--mantine-color-default-border)`},h:v,children:e.navbarFooter}):null]}),(0,J.jsx)(bW.Main,{display:`flex`,bg:`var(--alepha-ground)`,pos:`relative`,h:e.fill?`100%`:`inherit`,...e.appShellMainProps,children:e.container?(0,J.jsx)(t2,{...typeof e.container==`boolean`?{}:e.container,children:b}):b}),m&&(0,J.jsx)(bW.Footer,{...e.appShellFooterProps,children:m})]})};j0.sizes.icon.xs,j0.sizes.icon.sm,j0.sizes.icon.md;var l2=(e,t)=>{let n=e.input.props.id,r=e.label??(`title`in e.input.schema&&typeof e.input.schema.title==`string`?e.input.schema.title:void 0)??x6(e.input.path),i=e.description??(`description`in e.input.schema&&typeof e.input.schema.description==`string`?e.input.schema.description:void 0),a=t.error&&t.error instanceof Lk?t.error.value.message:void 0,o=e.icon?(0,q.isValidElement)(e.icon)?e.icon:(0,q.createElement)(e.icon,{size:j0.sizes.icon.sm}):y6({type:e.input.schema&&`type`in e.input.schema?String(e.input.schema.type):void 0,format:e.input.schema&&`format`in e.input.schema&&typeof e.input.schema.format==`string`?e.input.schema.format:void 0,name:e.input.props.name,isEnum:e.input.schema&&`enum`in e.input.schema&&!!e.input.schema.enum,isArray:e.input.schema&&`type`in e.input.schema&&e.input.schema.type===`array`,size:e.size}),s=e.input.schema&&`format`in e.input.schema&&typeof e.input.schema.format==`string`?e.input.schema.format:void 0,c=e.input.required,l=e.input.schema,u=e.input.props?.[`data-testid`],d={label:r,description:i,error:a,required:c,disabled:!1,...u?{"data-testid":u}:{}};return`minLength`in l&&typeof l.minLength==`number`&&(d.minLength=l.minLength),`maxLength`in l&&typeof l.maxLength==`number`&&(d.maxLength=l.maxLength),`minimum`in l&&typeof l.minimum==`number`&&(d.minimum=l.minimum),`maximum`in l&&typeof l.maximum==`number`&&(d.maximum=l.maximum),{id:n,icon:o,format:s,schema:e.input.schema,inputProps:d}},u2=e=>{let t=jA(),n=(0,q.useRef)(0),[r,i]=(0,q.useState)(()=>{let t=e?.initialValue;return Array.isArray(t)?t.map(e=>({key:n.current++,value:e})):[]}),a=(0,q.useCallback)(e=>{if(!Array.isArray(e)){i([]);return}i(t=>t.length===e.length&&t.every((t,n)=>t.value===e[n])?t:(n.current=0,e.map(e=>({key:n.current++,value:e}))))},[]);return(0,q.useEffect)(()=>{if(!e?.form)return;let n=e.form.id,r=e.path;return t.events.on(`form:change`,e=>{e.id===n&&e.path===r&&a(e.value)})},[t,e,a]),{items:r,setItems:(0,q.useCallback)(t=>{i(t),e?.set(t.map(e=>e.value))},[e]),nextKey:(0,q.useCallback)(()=>n.current++,[])}},d2=(e,t,n,r,i,a)=>({schema:t,path:`${e.path}/${n}`,required:!1,form:e.form,initialValue:i,props:{id:`${e.props.id}-${n}`,name:`${e.props.name}[${n}]`},set:a}),f2=(e,t,n,r,i,a,o)=>({schema:t.properties[n],path:`${e.path}/${r}/${n}`,required:t.required?.includes(n)??!1,form:e.form,initialValue:a?.[n],props:{id:`${e.props.id}-${r}-${n}`,name:`${e.props.name}[${r}].${n}`},set:e=>o(n,e)}),p2=e=>{let{inputProps:t}=l2(e,{}),{items:n,setItems:r,nextKey:i}=u2(e.input);if(!e.input?.props)return null;let a=e.input.schema;if(!a||!(`items`in a))return null;let o=a.items,s=o&&`properties`in o,{min:c=0,max:l=1/0,columns:u=1}=e,d=()=>{if(n.length>=l)return;let e;if(s){e={};let t=o;for(let[n,r]of Object.entries(t.properties))`default`in r&&(e[n]=r.default)}else e=``;r([...n,{key:i(),value:e}])},f=e=>{n.length<=c||r(n.filter((t,n)=>n!==e))},p=(e,t)=>{let i=[...n];i[e]={...i[e],value:t},r(i)},m=(e,t,i)=>{let a=[...n];a[e]={...a[e],value:{...a[e].value,[t]:i}},r(a)},h=12/u,g=s?o:null,_=g?Object.keys(g.properties):[],v=()=>(0,J.jsxs)(IU,{direction:`column`,gap:`sm`,children:[n.map((t,r)=>(0,J.jsxs)(IU,{gap:`sm`,align:`flex-start`,p:`xs`,bg:j0.colors.surface,style:{borderRadius:`var(--mantine-radius-sm)`},children:[e.sortable&&(0,J.jsx)(DV,{variant:`subtle`,color:`gray`,style:{cursor:`grab`},children:(0,J.jsx)(e$,{size:16})}),g?(0,J.jsx)(nq,{style:{flex:1},gap:`sm`,children:_.map(n=>{let i=e.controlProps?.[n]??{},a=f2(e.input,g,n,r,t.key,t.value,(e,t)=>m(r,e,t));return(0,J.jsx)(nq.Col,{span:h,children:(0,J.jsx)(o6,{input:a,...i})},n)})}):(0,J.jsx)(IU,{style:{flex:1},children:(0,J.jsx)(o6,{input:d2(e.input,o,r,t.key,t.value,e=>p(r,e)),...e.itemControlProps})}),(0,J.jsx)(DV,{variant:`subtle`,color:`red`,onClick:()=>f(r),disabled:n.length<=c,children:(0,J.jsx)(x$,{size:16})})]},t.key)),(0,J.jsxs)(SB,{onClick:d,disabled:n.length>=l,style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:6,padding:`8px 12px`,borderRadius:`var(--mantine-radius-sm)`,border:`1px dashed var(--mantine-color-dimmed)`,color:`var(--mantine-color-dimmed)`,fontSize:`var(--mantine-font-size-sm)`,cursor:n.length>=l?`not-allowed`:`pointer`,opacity:n.length>=l?.5:1,transition:`all 150ms ease`},onMouseEnter:e=>{n.length<l&&(e.currentTarget.style.borderColor=`var(--mantine-color-blue-filled)`,e.currentTarget.style.color=`var(--mantine-color-blue-filled)`,e.currentTarget.style.background=`var(--mantine-color-blue-light)`)},onMouseLeave:e=>{e.currentTarget.style.borderColor=`var(--mantine-color-dimmed)`,e.currentTarget.style.color=`var(--mantine-color-dimmed)`,e.currentTarget.style.background=`transparent`},children:[(0,J.jsx)(h$,{size:14}),e.addLabel??`Add`]})]});return e.variant===`plain`?(0,J.jsxs)(IU,{direction:`column`,gap:`xs`,children:[t.label&&(0,J.jsx)(qU,{size:`sm`,fw:500,children:t.label}),t.description&&(0,J.jsx)(qU,{size:`sm`,c:`dimmed`,children:t.description}),v(),t.error&&(0,J.jsx)(qU,{size:`sm`,c:`red`,children:t.error})]}):(0,J.jsx)(zK,{legend:t.label,children:(0,J.jsxs)(IU,{direction:`column`,gap:`xs`,children:[t.description&&(0,J.jsx)(qU,{size:`sm`,c:`dimmed`,children:t.description}),v(),t.error&&(0,J.jsx)(qU,{size:`sm`,c:`red`,children:t.error})]})})};function m2({direction:e,levelIndex:t,rowIndex:n,cellIndex:r,size:i}){switch(e){case`up`:return t===0&&n===0?null:n===0?{levelIndex:t-1,rowIndex:r<=i[t-1][i[t-1].length-1]-1?i[t-1].length-1:i[t-1].length-2,cellIndex:r}:{levelIndex:t,rowIndex:n-1,cellIndex:r};case`down`:return n===i[t].length-1||n===i[t].length-2&&r>=i[t][i[t].length-1]?{levelIndex:t+1,rowIndex:0,cellIndex:r}:{levelIndex:t,rowIndex:n+1,cellIndex:r};case`left`:return t===0&&n===0&&r===0?null:n===0&&r===0?{levelIndex:t-1,rowIndex:i[t-1].length-1,cellIndex:i[t-1][i[t-1].length-1]-1}:r===0?{levelIndex:t,rowIndex:n-1,cellIndex:i[t][n-1]-1}:{levelIndex:t,rowIndex:n,cellIndex:r-1};case`right`:return n===i[t].length-1&&r===i[t][n]-1?{levelIndex:t+1,rowIndex:0,cellIndex:0}:r===i[t][n]-1?{levelIndex:t,rowIndex:n+1,cellIndex:0}:{levelIndex:t,rowIndex:n,cellIndex:r+1};default:return{levelIndex:t,rowIndex:n,cellIndex:r}}}function h2({controlsRef:e,direction:t,levelIndex:n,rowIndex:r,cellIndex:i,size:a}){let o=m2({direction:t,size:a,rowIndex:r,cellIndex:i,levelIndex:n});if(!o)return;let s=e.current?.[o.levelIndex]?.[o.rowIndex]?.[o.cellIndex];s&&(s.disabled||s.getAttribute(`data-hidden`)||s.getAttribute(`data-outside`)?h2({controlsRef:e,direction:t,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):s.focus())}function g2(e){switch(e){case`ArrowDown`:return`down`;case`ArrowUp`:return`up`;case`ArrowRight`:return`right`;case`ArrowLeft`:return`left`;default:return null}}function _2(e){return e.current?.map(e=>e.map(e=>e.length))}function v2({controlsRef:e,levelIndex:t,rowIndex:n,cellIndex:r,event:i}){let a=g2(i.key);a&&(i.preventDefault(),h2({controlsRef:e,direction:a,levelIndex:t,rowIndex:n,cellIndex:r,size:_2(e)}))}function y2(e,t){let n=e?(0,Y.default)(e):(0,Y.default)();if(t===``)return n.format(`YYYY-MM-DD HH:mm:ss`);let[r,i,a=0]=t.split(`:`).map(Number);return n=n.set(`hour`,r),n=n.set(`minute`,i),n=n.set(`second`,a),n=n.set(`millisecond`,0),n.format(`YYYY-MM-DD HH:mm:ss`)}function b2(e){return e==null||e===``?e:(0,Y.default)(e).format(`YYYY-MM-DD`)}function x2(e){return e==null||e===``?e:(0,Y.default)(e).format(`YYYY-MM-DD HH:mm:ss`)}function S2({minDate:e,maxDate:t}){let n=(0,Y.default)();return!e&&!t?b2(n):e&&(0,Y.default)(n).isBefore(e)?b2(e):t&&(0,Y.default)(n).isAfter(t)?b2(t):b2(n)}function C2(e,t,n){return!e&&!t?x2(n):e&&(0,Y.default)(n).isBefore(e)?x2(e):t&&(0,Y.default)(n).isAfter(t)?x2(t):x2(n)}var w2=(0,q.createContext)({locale:`en`,firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:`–`,consistentWeeks:!1});function T2(){let e=(0,q.use)(w2),t=(0,q.useCallback)(t=>t||e.locale,[e.locale]),n=(0,q.useCallback)(t=>typeof t==`number`?t:e.firstDayOfWeek,[e.firstDayOfWeek]),r=(0,q.useCallback)(t=>Array.isArray(t)?t:e.weekendDays,[e.weekendDays]),i=(0,q.useCallback)(t=>typeof t==`string`?t:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:t,getFirstDayOfWeek:n,getWeekendDays:r,getLabelSeparator:i}}function E2({value:e,type:t,withTime:n}){let r=n?x2:b2;if(t===`range`&&Array.isArray(e)){let t=r(e[0]),n=r(e[1]);return t?n?`${t} – ${n}`:`${t} –`:``}return t===`multiple`&&Array.isArray(e)?e.filter(Boolean).join(`, `):!Array.isArray(e)&&e?r(e):``}function D2({value:e,type:t,name:n,form:r,withTime:i=!1}){return(0,J.jsx)(`input`,{type:`hidden`,value:E2({value:e,type:t,withTime:i}),name:n,form:r})}D2.displayName=`@mantine/dates/HiddenDatesInput`;var O2={input:`m_468e7eda`},k2=Q(e=>{let t=Z(`TimeInput`,{size:`sm`},e),{classNames:n,styles:r,unstyled:i,vars:a,withSeconds:o,minTime:s,maxTime:c,value:l,onChange:u,step:d,...f}=t,{resolvedClassNames:p,resolvedStyles:m}=oF({classNames:n,styles:r,props:t}),h=e=>{if(s!==void 0||c!==void 0){let[t,n,r]=e.split(`:`).map(Number);if(s){let[e,i,a]=s.split(`:`).map(Number);if(t<e||t===e&&n<i||o&&t===e&&n===i&&r<a)return-1}if(c){let[e,i,a]=c.split(`:`).map(Number);if(t>e||t===e&&n>i||o&&t===e&&n===i&&r>a)return 1}}return 0},g=e=>{if(t.onBlur?.(e),s!==void 0||c!==void 0){let n=e.currentTarget.value;if(n){let r=h(n);r===1?(c&&(e.currentTarget.value=c),t.onChange?.(e)):r===-1&&(s&&(e.currentTarget.value=s),t.onChange?.(e))}}};return(0,J.jsx)(NU,{classNames:{...p,input:WN(O2.input,p?.input)},styles:m,unstyled:i,value:l,step:d??(o?1:60),...f,onChange:u,onBlur:g,type:`time`,__staticSelector:`TimeInput`})});k2.classes=NU.classes,k2.displayName=`@mantine/dates/TimeInput`;function A2(e){return e<10?`0${e}`:`${e}`}function j2(e){let[t=null,n=null,r=null]=e.split(`:`).map(Number);return{hours:t,minutes:n,seconds:r}}function M2(e,t){return`${e.getHours()}:${e.getMinutes()}${t?`:${e.getSeconds()}`:``}`}function N2({value:e,format:t,amPmLabels:n,withSeconds:r}){let i=j2(typeof e==`string`?e:M2(e,r));if(i.hours===null||i.minutes===null)return null;if(t===`24h`)return`${A2(i.hours)}:${A2(i.minutes)}${r?`:${A2(i.seconds||0)}`:``}`;let a=i.hours>=12;return`${i.hours%12==0?12:i.hours%12}:${A2(i.minutes)}${r?`:${A2(i.seconds||0)}`:``} ${a?n.pm:n.am}`}function P2({value:e,format:t=`24h`,amPmLabels:n={am:`AM`,pm:`PM`},withSeconds:r=!1}){return(0,J.jsx)(J.Fragment,{children:N2({value:e,format:t,amPmLabels:n,withSeconds:r})})}P2.displayName=`@mantine/dates/TimeValue`;var F2=e=>Number(e.toFixed(0)[0]);function I2({value:e,min:t,max:n,onChange:r,focusable:i,step:a,onNextInput:o,onPreviousInput:s,onFocus:c,readOnly:l,allowTemporaryZero:u=!1,placeholder:d=`--`,...f}){let p=F2(n),m=n+1-a,h=e=>{if(l)return;let i=e.replace(/\D/g,``);if(i!==``){let a=parseInt(i,10),s=u&&a===0&&t>0?0:CM(a,t,n);r(s),(s>p||e.startsWith(`00`))&&o?.()}};return(0,J.jsx)(`input`,{type:`text`,role:`spinbutton`,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":e===null?0:e,"data-empty":e===null||void 0,inputMode:`numeric`,placeholder:d,value:e===null?``:A2(e),onChange:e=>h(e.currentTarget.value),onKeyDown:i=>{l||((i.key===`0`||i.key===`Num0`)&&e===0&&(i.preventDefault(),o?.()),i.key===`Home`&&(i.preventDefault(),r(t)),i.key===`End`&&(i.preventDefault(),r(n)),(i.key===`Backspace`||i.key===`Delete`)&&(i.preventDefault(),e===null?s?.():r(null)),i.key===`ArrowRight`&&(i.preventDefault(),o?.()),i.key===`ArrowLeft`&&(i.preventDefault(),s?.()),i.key===`ArrowUp`&&(i.preventDefault(),r(e===null?t:CM(e+a,t,m))),i.key===`ArrowDown`&&(i.preventDefault(),r(e===null?m:CM(e-a,t,m))))},onFocus:e=>{e.currentTarget.select(),c?.(e)},onClick:e=>{e.stopPropagation(),e.currentTarget.select()},onMouseDown:e=>e.stopPropagation(),...f})}I2.displayName=`@mantine/dates/SpinInput`;var[L2,R2]=nM(`TimeInput component was not found in the component tree`);function z2({labels:e,value:t,onChange:n,className:r,style:i,onPreviousInput:a,readOnly:o,onMouseDown:s,onTouchStart:c,inputType:l,...u}){let d=R2(),f=r=>{o||(r.key===`Home`&&(r.preventDefault(),n(e.am)),r.key===`End`&&(r.preventDefault(),n(e.pm)),(r.key===`Backspace`||r.key===`Delete`)&&(r.preventDefault(),t===null?a?.():n(null)),r.key===`ArrowLeft`&&(r.preventDefault(),a?.()),(r.key===`ArrowUp`||r.key===`ArrowDown`)&&(r.preventDefault(),n(t===e.am?e.pm:e.am)),r.code===`KeyA`&&(r.preventDefault(),n(e.am)),r.code===`KeyP`&&(r.preventDefault(),n(e.pm)))};if(l===`input`){let e=t||`--`,a=e.length+1;return(0,J.jsx)(`input`,{...d.getStyles(`field`,{className:r,style:i}),value:e,size:a,onChange:e=>!o&&n(e.target.value||null),onClick:(e=>e.stopPropagation()),onKeyDown:f,onMouseDown:e=>{e.stopPropagation(),s?.(e)},"data-am-pm":!0,...u})}return(0,J.jsxs)(`select`,{...d.getStyles(`field`,{className:r,style:i}),value:t||``,onChange:e=>!o&&n(e.target.value||null),onClick:e=>e.stopPropagation(),onKeyDown:f,onMouseDown:e=>{e.stopPropagation(),s?.(e)},"data-am-pm":!0,...u,children:[(0,J.jsx)(`option`,{value:``,children:`--`}),(0,J.jsx)(`option`,{value:e.am,children:e.am}),(0,J.jsx)(`option`,{value:e.pm,children:e.pm})]})}z2.displayName=`@mantine/dates/AmPmInput`;function B2({value:e,active:t,onSelect:n}){let r=R2();return(0,J.jsx)(SB,{mod:{active:t},onClick:()=>n(e),onMouseDown:e=>e.preventDefault(),"data-value":e,tabIndex:-1,...r.getStyles(`control`),children:typeof e==`number`?A2(e):e})}B2.displayName=`@mantine/dates/TimeControl`;function V2({labels:e,value:t,onSelect:n}){let r=R2(),i=[e.am,e.pm].map(e=>(0,J.jsx)(B2,{value:e,active:t===e,onSelect:n},e));return(0,J.jsx)(`div`,{...r.getStyles(`controlsList`),children:i})}V2.displayName=`@mantine/dates/AmPmControlsList`;function H2(e,t){if(!e||!t)return!1;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.top>=r.top&&n.bottom<=r.bottom&&n.left>=r.left&&n.right<=r.right}function U2(e,t,n){let r=[];for(let i=e;i<=t;i+=n)r.push(i);return r}function W2({min:e,max:t,step:n,value:r,onSelect:i,reversed:a}){let o=R2(),s=(0,q.useRef)(null),c=U2(e,t,n),l=(a?c.reverse():c).map(e=>(0,J.jsx)(B2,{value:e,active:r===e,onSelect:i},e));return(0,q.useEffect)(()=>{r!==null&&requestAnimationFrame(()=>{let e=s.current?.querySelector(`[data-value="${r}"]`);H2(e,s.current)||e?.scrollIntoView({block:`nearest`})})},[r]),(0,J.jsx)(vB,{h:o.maxDropdownContentHeight,type:`never`,viewportRef:s,...o.getStyles(`scrollarea`),...o.scrollAreaProps,children:(0,J.jsx)(`div`,{...o.getStyles(`controlsList`),children:l})})}W2.displayName=`@mantine/dates/TimeControlsList`;function G2({time:e,compare:t,withSeconds:n}){let r=j2(e),i=j2(t);return n?r.hours===i.hours&&r.minutes===i.minutes&&r.seconds===i.seconds:r.hours===i.hours&&r.minutes===i.minutes}function K2({value:e,active:t,onChange:n,format:r,amPmLabels:i,withSeconds:a}){let o=R2();return(0,J.jsx)(SB,{mod:{active:t},onClick:()=>n(e),...o.getStyles(`presetControl`),children:(0,J.jsx)(P2,{withSeconds:a,value:e,format:r,amPmLabels:i})})}K2.displayName=`@mantine/dates/TimePresetControl`;function q2({value:e,data:t,onChange:n,format:r,amPmLabels:i,withSeconds:a}){let o=R2(),s=t.values.map(t=>(0,J.jsx)(K2,{value:t,format:r,amPmLabels:i,withSeconds:a,active:G2({time:t,compare:e,withSeconds:a}),onChange:n},t));return(0,J.jsxs)(`div`,{...o.getStyles(`presetsGroup`),children:[(0,J.jsx)(`div`,{...o.getStyles(`presetsGroupLabel`),children:t.label}),(0,J.jsx)(DX,{cols:a?2:3,spacing:4,children:s})]})}q2.displayName=`@mantine/dates/TimePresetGroup`;function J2({presets:e,format:t,amPmLabels:n,withSeconds:r,value:i,onChange:a}){let o=R2();if(e.length===0)return null;if(typeof e[0]==`string`){let s=e.map(e=>(0,J.jsx)(K2,{value:e,format:t,amPmLabels:n,withSeconds:r,active:G2({time:e,compare:i,withSeconds:r}),onChange:a},e));return(0,J.jsx)(vB.Autosize,{mah:o.maxDropdownContentHeight,type:`never`,...o.getStyles(`scrollarea`),...o.scrollAreaProps,children:(0,J.jsx)(`div`,{...o.getStyles(`presetsRoot`),children:(0,J.jsx)(DX,{cols:r?2:3,spacing:4,children:s})})})}let s=e.map((e,o)=>(0,J.jsx)(q2,{data:e,value:i,format:t,amPmLabels:n,withSeconds:r,onChange:a},o));return(0,J.jsx)(vB.Autosize,{mah:o.maxDropdownContentHeight,type:`never`,...o.getStyles(`scrollarea`),...o.scrollAreaProps,children:(0,J.jsx)(`div`,{...o.getStyles(`presetsRoot`),children:s})})}J2.displayName=`@mantine/dates/TimePresets`;function Y2(e){let[t=0,n=0,r=0]=e.split(`:`).map(Number);return t*3600+n*60+r}function X2(e){let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60;return{timeString:`${A2(t)}:${A2(n)}:${A2(r)}`,hours:t,minutes:n,seconds:r}}function Z2(e,t,n){let r=Y2(e),i=t?Y2(t):-1/0,a=n?Y2(n):1/0;return X2(Math.max(i,Math.min(r,a)))}function Q2({hours:e,minutes:t,seconds:n,amPmLabels:r}){if(e===null)return{hours:null,minutes:null,seconds:null,amPm:null};let i=e>=12?r.pm:r.am;return{hours:e%12==0?12:e%12,minutes:typeof t==`number`?t:null,seconds:typeof n==`number`?n:null,amPm:i}}function $2({time:e,format:t,amPmLabels:n}){if(e===``)return{hours:null,minutes:null,seconds:null,amPm:null};let{hours:r,minutes:i,seconds:a}=j2(e),o={hours:r,minutes:i,seconds:a};return t===`12h`?Q2({...o,amPmLabels:n}):{...o,amPm:null}}function e4({hours:e,minutes:t,seconds:n,amPm:r,amPmLabels:i,withSeconds:a}){let o=e;return r===i.pm&&e!==12?o+=12:r===i.am&&e===12&&(o=0),`${A2(o)}:${A2(t)}${a?`:${A2(n||0)}`:``}`}function t4({hours:e,minutes:t,seconds:n,format:r,withSeconds:i,amPm:a,amPmLabels:o}){return e===null||t===null||i&&n===null?{valid:!1,value:``}:r===`24h`?{valid:!0,value:`${A2(e)}:${A2(t)}${i?`:${A2(n)}`:``}`}:a===null?{valid:!1,value:``}:{valid:!0,value:e4({hours:e,minutes:t,seconds:n,amPm:a,amPmLabels:o,withSeconds:i})}}function n4({value:e,defaultValue:t,onChange:n,format:r,amPmLabels:i,withSeconds:a=!1,min:o,max:s,clearable:c,readOnly:l,disabled:u,pasteSplit:d}){let f=$2({time:e||t||``,amPmLabels:i,format:r}),p=t4({hours:f.hours,minutes:f.minutes,seconds:f.seconds,format:r,withSeconds:a,amPm:f.amPm,amPmLabels:i}),m=(0,q.useRef)(!0),h=(0,q.useRef)(!p.valid),[g,_]=(0,q.useState)(f.hours),[v,y]=(0,q.useState)(f.minutes),[b,x]=(0,q.useState)(f.seconds),[S,C]=(0,q.useState)(f.amPm),w=c&&!l&&!u&&(g!==null||v!==null||b!==null||S!==null),T=(0,q.useRef)(null),E=(0,q.useRef)(null),D=(0,q.useRef)(null),O=(0,q.useRef)(null),k=e=>{e===`hours`&&T.current?.focus(),e===`minutes`&&E.current?.focus(),e===`seconds`&&D.current?.focus(),e===`amPm`&&O.current?.focus()},A=(e,t)=>{let o=t4({hours:g,minutes:v,seconds:b,amPm:S,[e]:t,format:r,withSeconds:a,amPmLabels:i});o.valid?(m.current=!1,h.current=!1,e===`hours`&&_(t),e===`minutes`&&y(t),e===`seconds`&&x(t),e===`amPm`&&C(t),n?.(o.value)):(m.current=!1,h.current||=(n?.(``),!0))},j=e=>{m.current=!1;let t=$2({time:e,amPmLabels:i,format:r});_(t.hours),y(t.minutes),x(t.seconds),C(t.amPm),h.current=!t4({...t,format:r,withSeconds:a,amPmLabels:i}).valid,n?.(e)},M=e=>{let t=e;r===`12h`&&typeof e==`number`&&e>12&&(t=(e-1)%12+1),_(t),A(`hours`,t),k(`hours`)},N=e=>{y(e),A(`minutes`,e),k(`minutes`)},P=e=>{x(e),A(`seconds`,e),k(`seconds`)},F=e=>{C(e),A(`amPm`,e),k(`amPm`)},ee=()=>{m.current=!1,_(null),y(null),x(null),C(null),n?.(``),h.current=!0,k(`hours`)},I=e=>{e.preventDefault();let t=e.clipboardData.getData(`text`),c=(d||$2)({time:t,format:r,amPmLabels:i}),l=t4({...c,format:r,withSeconds:a,amPmLabels:i});if(l.valid){m.current=!1;let e=Z2(l.value,o||`00:00:00`,s||`23:59:59`);n?.(e.timeString),_(c.hours),y(c.minutes),x(c.seconds),C(c.amPm)}},te=t4({hours:g,minutes:v,seconds:b,format:r,withSeconds:a,amPm:S,amPmLabels:i});return PM(()=>{if(e===``){m.current=!1,_(null),y(null),x(null),C(null),m.current=!0;return}if(m.current&&typeof e==`string`){let t=$2({time:e||``,amPmLabels:i,format:r});_(t.hours),y(t.minutes),x(t.seconds),C(t.amPm)}m.current=!0},[e]),{refs:{hours:T,minutes:E,seconds:D,amPm:O},values:{hours:g,minutes:v,seconds:b,amPm:S},setHours:M,setMinutes:N,setSeconds:P,setAmPm:F,focus:k,clear:ee,onPaste:I,setTimeString:j,isClearable:w,hiddenInputValue:te.value}}var r4={fieldsRoot:`m_7a8f1e6d`,fieldsGroup:`m_d6bb0a54`,controlsList:`m_b97ecb26`,controlsListGroup:`m_31fe42f9`,dropdown:`m_9c4817c3`,control:`m_154c536b`,presetControl:`m_7be09d0c`,presetsGroup:`m_7d00001d`,presetsGroupLabel:`m_d8d918d7`,field:`m_6b43ba88`},i4={hoursStep:1,minutesStep:1,secondsStep:1,format:`24h`,amPmLabels:{am:`AM`,pm:`PM`},pasteSplit:$2,maxDropdownContentHeight:200,hoursPlaceholder:`--`,minutesPlaceholder:`--`,secondsPlaceholder:`--`},a4=HN((e,{size:t})=>({dropdown:{"--control-font-size":hM(t)}})),o4=Q(e=>{let t=Z(`TimePicker`,i4,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,onClick:c,format:l,value:u,defaultValue:d,onChange:f,hoursStep:p,minutesStep:m,secondsStep:h,withSeconds:g,hoursInputLabel:_,minutesInputLabel:v,secondsInputLabel:y,amPmInputLabel:b,amPmLabels:x,clearable:S,clearSectionMode:C,onMouseDown:w,onFocusCapture:T,onBlurCapture:E,min:D,max:O,popoverProps:k,withDropdown:A,rightSection:j,onFocus:M,onBlur:N,clearButtonProps:P,hoursInputProps:F,minutesInputProps:ee,secondsInputProps:I,amPmSelectProps:te,readOnly:ne,disabled:L,size:re,name:ie,form:ae,hiddenInputProps:oe,labelProps:se,pasteSplit:ce,hoursRef:le,minutesRef:ue,secondsRef:R,amPmRef:de,presets:z,maxDropdownContentHeight:fe,scrollAreaProps:pe,attributes:me,reverseTimeControlsList:he,hoursPlaceholder:ge,minutesPlaceholder:_e,secondsPlaceholder:ve,...ye}=t,{resolvedClassNames:be,resolvedStyles:B}=oF({classNames:n,styles:a,props:t}),xe=bF({name:`TimePicker`,classes:r4,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:me,vars:s,varsResolver:a4}),V=n4({value:u,defaultValue:d,onChange:f,format:l,amPmLabels:x,withSeconds:g,min:D,max:O,clearable:S,disabled:L,readOnly:ne,pasteSplit:ce}),H=QM(V.refs.hours,le),Se=QM(V.refs.minutes,ue),Ce=QM(V.refs.seconds,R),we=QM(V.refs.amPm,de),Te=JM(),Ee=(0,q.useRef)(!1),[De,Oe]=(0,q.useState)(!1),ke=e=>{Ee.current||(Ee.current=!0,M?.(e))},Ae=e=>{if(!e.currentTarget.contains(e.relatedTarget)){let t=V.values,n=t4({...t,format:l,amPmLabels:x,withSeconds:!!g});if(n.valid&&(D||O)){let e=Z2(n.value,D,O);e.timeString!==n.value&&V.setTimeString(e.timeString)}Ee.current=!1,N?.(e)}};return(0,J.jsx)(L2,{value:{getStyles:xe,scrollAreaProps:pe,maxDropdownContentHeight:fe},children:(0,J.jsxs)(dV,{opened:De,transitionProps:{duration:0},position:`bottom-start`,withRoles:!1,disabled:L||ne||!A,...k,children:[(0,J.jsx)(dV.Target,{children:(0,J.jsxs)(NU,{component:`div`,size:re,disabled:L,onClick:e=>{c?.(e),V.focus(`hours`)},onMouseDown:e=>{e.preventDefault(),w?.(e)},onFocusCapture:e=>{Oe(!0),T?.(e)},onBlurCapture:e=>{Oe(!1),E?.(e)},rightSection:j,__clearSection:(0,J.jsx)(MV,{...P,size:re,onClick:e=>{V.clear(),P?.onClick?.(e)},onMouseDown:e=>{e.preventDefault(),P?.onMouseDown?.(e)}}),__clearable:V.isClearable,__clearSectionMode:C,labelProps:{htmlFor:Te,...se},style:i,className:r,classNames:be,styles:B,attributes:me,__staticSelector:`TimePicker`,...ye,children:[(0,J.jsx)(`div`,{...xe(`fieldsRoot`),dir:`ltr`,children:(0,J.jsxs)(`div`,{...xe(`fieldsGroup`),onBlur:Ae,children:[(0,J.jsx)(I2,{id:Te,...F,...xe(`field`,{className:F?.className,style:F?.style}),value:V.values.hours,onChange:V.setHours,onNextInput:()=>V.focus(`minutes`),min:+(l===`12h`),max:l===`12h`?12:23,allowTemporaryZero:l===`12h`,focusable:!0,step:p,ref:H,"aria-label":_,readOnly:ne,disabled:L,onPaste:V.onPaste,onFocus:e=>{ke(e),F?.onFocus?.(e)},onBlur:e=>{let t=e.currentTarget.value;l===`12h`&&(t?parseInt(t,10):null)===0&&V.setHours(12),F?.onBlur?.(e)},placeholder:ge}),(0,J.jsx)(`span`,{children:`:`}),(0,J.jsx)(I2,{...ee,...xe(`field`,{className:ee?.className,style:ee?.style}),value:V.values.minutes,onChange:V.setMinutes,min:0,max:59,focusable:!0,step:m,ref:Se,onPreviousInput:()=>V.focus(`hours`),onNextInput:()=>g?V.focus(`seconds`):V.focus(`amPm`),"aria-label":v,tabIndex:-1,readOnly:ne,disabled:L,onPaste:V.onPaste,onFocus:e=>{ke(e),ee?.onFocus?.(e)},placeholder:_e}),g&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`span`,{children:`:`}),(0,J.jsx)(I2,{...I,...xe(`field`,{className:I?.className,style:I?.style}),value:V.values.seconds,onChange:V.setSeconds,min:0,max:59,focusable:!0,step:h,ref:Ce,onPreviousInput:()=>V.focus(`minutes`),onNextInput:()=>V.focus(`amPm`),"aria-label":y,tabIndex:-1,readOnly:ne,disabled:L,onPaste:V.onPaste,onFocus:e=>{ke(e),I?.onFocus?.(e)},placeholder:ve})]}),l===`12h`&&(0,J.jsx)(z2,{...te,inputType:A?`input`:`select`,labels:x,value:V.values.amPm,onChange:V.setAmPm,ref:we,"aria-label":b,onPreviousInput:()=>g?V.focus(`seconds`):V.focus(`minutes`),readOnly:ne,disabled:L,tabIndex:-1,onPaste:V.onPaste,onFocus:e=>{ke(e),te?.onFocus?.(e)}})]})}),(0,J.jsx)(`input`,{type:`hidden`,name:ie,form:ae,value:V.hiddenInputValue,...oe})]})}),(0,J.jsx)(dV.Dropdown,{...xe(`dropdown`),onMouseDown:e=>e.preventDefault(),children:z?(0,J.jsx)(J2,{value:V.hiddenInputValue,onChange:V.setTimeString,format:l,presets:z,amPmLabels:x,withSeconds:g||!1}):(0,J.jsxs)(`div`,{...xe(`controlsListGroup`),children:[(0,J.jsx)(W2,{min:+(l===`12h`),max:l===`12h`?12:23,step:p,value:V.values.hours,onSelect:V.setHours,reversed:he}),(0,J.jsx)(W2,{min:0,max:59,step:m,value:V.values.minutes,onSelect:V.setMinutes,reversed:he}),g&&(0,J.jsx)(W2,{min:0,max:59,step:h,value:V.values.seconds,onSelect:V.setSeconds,reversed:he}),l===`12h`&&(0,J.jsx)(V2,{labels:x,value:V.values.amPm,onSelect:V.setAmPm})]})})]})})});o4.displayName=`@mantine/dates/TimePicker`,o4.classes=r4,o4.varsResolver=a4;var s4={day:`m_396ce5cb`},c4=HN((e,{size:t})=>({day:{"--day-size":fM(t,`day-size`)}})),l4=Q(e=>{let t=Z(`Day`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,date:c,disabled:l,__staticSelector:u,weekend:d,outside:f,selected:p,renderDay:m,inRange:h,firstInRange:g,lastInRange:_,hidden:v,static:y,highlightToday:b,fullWidth:x,attributes:S,...C}=t;return(0,J.jsx)(SB,{...bF({name:u||`Day`,classes:s4,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:S,vars:s,varsResolver:c4,rootSelector:`day`})(`day`,{style:v?{display:`none`}:void 0}),component:y?`div`:`button`,disabled:l,"data-today":(0,Y.default)(c).isSame(new Date,`day`)||void 0,"data-hidden":v||void 0,"data-highlight-today":b||void 0,"data-disabled":l||void 0,"data-weekend":!l&&!f&&d||void 0,"data-outside":!l&&f||void 0,"data-selected":!l&&p||void 0,"data-in-range":h&&!l||void 0,"data-first-in-range":g&&!l||void 0,"data-last-in-range":_&&!l||void 0,"data-static":y||void 0,"data-full-width":x||void 0,unstyled:o,...C,children:m?.(c)||(0,Y.default)(c).date()})});l4.classes=s4,l4.varsResolver=c4,l4.displayName=`@mantine/dates/Day`;function u4({locale:e,format:t=`dd`,firstDayOfWeek:n=1}){let r=(0,Y.default)().day(n),i=[];for(let n=0;n<7;n+=1)typeof t==`string`?i.push((0,Y.default)(r).add(n,`days`).locale(e).format(t)):i.push(t((0,Y.default)(r).add(n,`days`).format(`YYYY-MM-DD`)));return i}var d4={weekday:`m_18a3eca`},f4=HN((e,{size:t})=>({weekdaysRow:{"--wr-fz":hM(t),"--wr-spacing":pM(t)}})),p4=Q(e=>{let t=Z(`WeekdaysRow`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,locale:c,firstDayOfWeek:l,weekdayFormat:u,cellComponent:d=`th`,__staticSelector:f,withWeekNumbers:p,attributes:m,...h}=t,g=bF({name:f||`WeekdaysRow`,classes:d4,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:s,varsResolver:f4,rootSelector:`weekdaysRow`}),_=T2(),v=u4({locale:_.getLocale(c),format:u,firstDayOfWeek:_.getFirstDayOfWeek(l)}).map((e,t)=>(0,J.jsx)(d,{...g(`weekday`),children:e},t));return(0,J.jsxs)($,{component:`tr`,...g(`weekdaysRow`),...h,children:[p&&(0,J.jsx)(d,{...g(`weekday`),children:`#`}),v]})});p4.classes=d4,p4.varsResolver=f4,p4.displayName=`@mantine/dates/WeekdaysRow`;function m4(e,t=1){let n=(0,Y.default)(e);if(!n.isValid())return n;let r=t===0?6:t-1;for(;n.day()!==r;)n=n.add(1,`day`);return n.format(`YYYY-MM-DD`)}function h4(e,t=1){let n=(0,Y.default)(e);for(;n.day()!==t;)n=n.subtract(1,`day`);return n.format(`YYYY-MM-DD`)}function g4({month:e,firstDayOfWeek:t=1,consistentWeeks:n}){let r=(0,Y.default)((0,Y.default)(e).subtract((0,Y.default)(e).date()-1,`day`).format(`YYYY-M-D`)),i=r.format(`YYYY-MM-DD`),a=m4(r.add(r.daysInMonth()-1,`day`).format(`YYYY-MM-DD`),t),o=[],s=(0,Y.default)(h4(i,t));for(;(0,Y.default)(s).isBefore(a,`day`);){let e=[];for(let t=0;t<7;t+=1)e.push(s.format(`YYYY-MM-DD`)),s=s.add(1,`day`);o.push(e)}if(n&&o.length<6){let e=o[o.length-1],t=e[e.length-1],n=(0,Y.default)(t).add(1,`day`);for(;o.length<6;){let e=[];for(let t=0;t<7;t+=1)e.push(n.format(`YYYY-MM-DD`)),n=n.add(1,`day`);o.push(e)}}return o}function _4(e,t){return(0,Y.default)(e).format(`YYYY-MM`)===(0,Y.default)(t).format(`YYYY-MM`)}function v4(e,t){return t?(0,Y.default)(e).isAfter((0,Y.default)(t).subtract(1,`day`),`day`):!0}function y4(e,t){return t?(0,Y.default)(e).isBefore((0,Y.default)(t).add(1,`day`),`day`):!0}function b4({dates:e,minDate:t,maxDate:n,getDayProps:r,excludeDate:i,hideOutsideDates:a,month:o}){let s=e.flat().filter(e=>y4(e,n)&&v4(e,t)&&!i?.(e)&&!r?.(e)?.disabled&&(!a||_4(e,o)));return s.find(e=>r?.(e)?.selected)||s.find(e=>(0,Y.default)().isSame(e,`date`))||s[0]}var x4=l(o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_isoWeek=r()})(e,(function(){var e=`day`;return function(t,n,r){var i=function(t){return t.add(4-t.isoWeekday(),e)},a=n.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var n,a,o,s,c=i(this),l=(n=this.isoWeekYear(),a=this.$u,o=(a?r.utc:r)().year(n).startOf(`year`),s=4-o.isoWeekday(),o.isoWeekday()>4&&(s+=7),o.add(s,e));return c.diff(l,`week`)+1},a.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var o=a.startOf;a.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return n.p(e)===`isoweek`?r?this.date(this.date()-(this.isoWeekday()-1)).startOf(`day`):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(`day`):o.bind(this)(e,t)}}}))}))(),1);Y.default.extend(x4.default);function S4(e){return(0,Y.default)(e.find(e=>(0,Y.default)(e).day()===1)).isoWeek()}var C4={month:`m_cc9820d3`,monthCell:`m_8f457cd5`,weekNumber:`m_6cff9dea`},w4={withCellSpacing:!0},T4=HN((e,{size:t})=>({weekNumber:{"--wn-fz":hM(t),"--wn-size":fM(t,`wn-size`)}})),E4=Q(e=>{let t=Z(`Month`,w4,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,locale:l,firstDayOfWeek:u,weekdayFormat:d,month:f,weekendDays:p,getDayProps:m,excludeDate:h,minDate:g,maxDate:_,renderDay:v,hideOutsideDates:y,hideWeekdays:b,getDayAriaLabel:x,static:S,__getDayRef:C,__onDayKeyDown:w,__onDayClick:T,__onDayMouseEnter:E,__preventFocus:D,__stopPropagation:O,withCellSpacing:k,size:A,highlightToday:j,withWeekNumbers:M,fullWidth:N,attributes:P,...F}=t,ee=bF({name:c||`Month`,classes:C4,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:P,vars:s,varsResolver:T4,rootSelector:`month`}),I=T2(),te=g4({month:f,firstDayOfWeek:I.getFirstDayOfWeek(u),consistentWeeks:I.consistentWeeks}),ne=b4({dates:te,minDate:b2(g),maxDate:b2(_),getDayProps:m,excludeDate:h,hideOutsideDates:y,month:f}),{resolvedClassNames:L,resolvedStyles:re}=oF({classNames:n,styles:a,props:t}),ie=te.map((e,t)=>{let n=e.map((e,n)=>{let r=!_4(e,f),i=x?.(e)||(0,Y.default)(e).locale(l||I.locale).format(`D MMMM YYYY`),a=m?.(e),s=(0,Y.default)(e).isSame(ne,`date`);return(0,J.jsx)(`td`,{...ee(`monthCell`),"data-with-spacing":k||void 0,children:(0,J.jsx)(l4,{__staticSelector:c||`Month`,classNames:L,styles:re,attributes:P,unstyled:o,"data-mantine-stop-propagation":O||void 0,highlightToday:j,renderDay:v,date:e,size:A,weekend:I.getWeekendDays(p).includes((0,Y.default)(e).get(`day`)),outside:r,hidden:y?r:!1,"aria-label":i,static:S,fullWidth:N,disabled:h?.(e)||!y4(e,b2(_))||!v4(e,b2(g)),ref:e=>{e&&C?.(t,n,e)},...a,onKeyDown:r=>{a?.onKeyDown?.(r),w?.(r,{rowIndex:t,cellIndex:n,date:e})},onMouseEnter:t=>{a?.onMouseEnter?.(t),E?.(t,e)},onClick:t=>{a?.onClick?.(t),T?.(t,e)},onMouseDown:e=>{a?.onMouseDown?.(e),D&&e.preventDefault()},tabIndex:D||!s?-1:0})},e.toString())});return(0,J.jsxs)(`tr`,{...ee(`monthRow`),children:[M&&(0,J.jsx)(`td`,{...ee(`weekNumber`),children:S4(e)}),n]},t)});return(0,J.jsxs)($,{component:`table`,...ee(`month`),size:A,"data-full-width":N||void 0,...F,children:[!b&&(0,J.jsx)(`thead`,{...ee(`monthThead`),children:(0,J.jsx)(p4,{__staticSelector:c||`Month`,locale:l,firstDayOfWeek:u,weekdayFormat:d,withWeekNumbers:M,size:A,classNames:L,styles:re,unstyled:o,attributes:P})}),(0,J.jsx)(`tbody`,{...ee(`monthTbody`),children:ie})]})});E4.classes=C4,E4.varsResolver=T4,E4.displayName=`@mantine/dates/Month`;var D4={pickerControl:`m_dc6a3c71`},O4=HN((e,{size:t})=>({pickerControl:{"--dpc-fz":hM(t),"--dpc-size":fM(t,`dpc-size`)}})),k4=Q(e=>{let t=Z(`PickerControl`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,firstInRange:c,lastInRange:l,inRange:u,__staticSelector:d,selected:f,disabled:p,fullWidth:m,attributes:h,...g}=t;return(0,J.jsx)(SB,{...bF({name:d||`PickerControl`,classes:D4,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:O4,rootSelector:`pickerControl`})(`pickerControl`),unstyled:o,"data-picker-control":!0,"data-full-width":m||void 0,"data-selected":f&&!p||void 0,"data-disabled":p||void 0,"data-in-range":u&&!p&&!f||void 0,"data-first-in-range":c&&!p||void 0,"data-last-in-range":l&&!p||void 0,disabled:p,...g})});k4.classes=D4,k4.varsResolver=O4,k4.displayName=`@mantine/dates/PickerControl`;function A4({year:e,minDate:t,maxDate:n}){return!t&&!n?!1:!!(t&&(0,Y.default)(e).isBefore(t,`year`)||n&&(0,Y.default)(e).isAfter(n,`year`))}function j4({years:e,minDate:t,maxDate:n,getYearControlProps:r}){let i=e.flat().filter(e=>!A4({year:e,minDate:t,maxDate:n})&&!r?.(e)?.disabled);return i.find(e=>r?.(e)?.selected)||i.find(e=>(0,Y.default)().isSame(e,`year`))||i[0]}function M4(e){let t=(0,Y.default)(e).year(),n=t-t%10,r=0,i=[[],[],[],[]];for(let e=0;e<4;e+=1){let t=e===3?1:3;for(let a=0;a<t;a+=1)i[e].push((0,Y.default)(new Date(n+r,0)).format(`YYYY-MM-DD`)),r+=1}return i}var N4={yearsList:`m_9206547b`,yearsListCell:`m_c5a19c7d`},P4={yearsListFormat:`YYYY`,withCellSpacing:!0},F4=Q(e=>{let t=Z(`YearsList`,P4,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,decade:c,yearsListFormat:l,locale:u,minDate:d,maxDate:f,getYearControlProps:p,__staticSelector:m,__getControlRef:h,__onControlKeyDown:g,__onControlClick:_,__onControlMouseEnter:v,__preventFocus:y,__stopPropagation:b,withCellSpacing:x,fullWidth:S,size:C,attributes:w,...T}=t,E=bF({name:m||`YearsList`,classes:N4,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:s,rootSelector:`yearsList`}),D=T2(),O=M4(c),k=j4({years:O,minDate:d,maxDate:f,getYearControlProps:p}),A=O.map((e,t)=>{let n=e.map((e,n)=>{let r=p?.(e),i=(0,Y.default)(e).isSame(k,`year`);return(0,J.jsx)(`td`,{...E(`yearsListCell`),"data-with-spacing":x||void 0,children:(0,J.jsx)(k4,{...E(`yearsListControl`),size:C,unstyled:o,fullWidth:S,"data-mantine-stop-propagation":b||void 0,disabled:A4({year:e,minDate:d,maxDate:f}),ref:e=>{e&&h?.(t,n,e)},...r,onKeyDown:i=>{r?.onKeyDown?.(i),g?.(i,{rowIndex:t,cellIndex:n,date:e})},onClick:t=>{r?.onClick?.(t),_?.(t,e)},onMouseEnter:t=>{r?.onMouseEnter?.(t),v?.(t,e)},onMouseDown:e=>{r?.onMouseDown?.(e),y&&e.preventDefault()},tabIndex:y||!i?-1:0,children:r?.children??(0,Y.default)(e).locale(D.getLocale(u)).format(l)})},n)});return(0,J.jsx)(`tr`,{...E(`yearsListRow`),children:n},t)});return(0,J.jsx)($,{component:`table`,size:C,...E(`yearsList`),"data-full-width":S||void 0,...T,children:(0,J.jsx)(`tbody`,{children:A})})});F4.classes=N4,F4.displayName=`@mantine/dates/YearsList`;function I4({month:e,minDate:t,maxDate:n}){return!t&&!n?!1:!!(t&&(0,Y.default)(e).isBefore(t,`month`)||n&&(0,Y.default)(e).isAfter(n,`month`))}function L4({months:e,minDate:t,maxDate:n,getMonthControlProps:r}){let i=e.flat().filter(e=>!I4({month:e,minDate:t,maxDate:n})&&!r?.(e)?.disabled);return i.find(e=>r?.(e)?.selected)||i.find(e=>(0,Y.default)().isSame(e,`month`))||i[0]}function R4(e){let t=(0,Y.default)(e).startOf(`year`).toDate(),n=[[],[],[],[]],r=0;for(let e=0;e<4;e+=1)for(let i=0;i<3;i+=1)n[e].push((0,Y.default)(t).add(r,`months`).format(`YYYY-MM-DD`)),r+=1;return n}var z4={monthsList:`m_2a6c32d`,monthsListCell:`m_fe27622f`},B4={monthsListFormat:`MMM`,withCellSpacing:!0},V4=Q(e=>{let t=Z(`MonthsList`,B4,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,year:l,monthsListFormat:u,locale:d,minDate:f,maxDate:p,getMonthControlProps:m,__getControlRef:h,__onControlKeyDown:g,__onControlClick:_,__onControlMouseEnter:v,__preventFocus:y,__stopPropagation:b,withCellSpacing:x,fullWidth:S,size:C,attributes:w,...T}=t,E=bF({name:c||`MonthsList`,classes:z4,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:s,rootSelector:`monthsList`}),D=T2(),O=R4(l),k=L4({months:O,minDate:b2(f),maxDate:b2(p),getMonthControlProps:m}),A=O.map((e,t)=>{let n=e.map((e,n)=>{let r=m?.(e),i=(0,Y.default)(e).isSame(k,`month`);return(0,J.jsx)(`td`,{...E(`monthsListCell`),"data-with-spacing":x||void 0,children:(0,J.jsx)(k4,{...E(`monthsListControl`),size:C,unstyled:o,fullWidth:S,__staticSelector:c||`MonthsList`,"data-mantine-stop-propagation":b||void 0,disabled:I4({month:e,minDate:b2(f),maxDate:b2(p)}),ref:e=>{e&&h?.(t,n,e)},...r,onKeyDown:i=>{r?.onKeyDown?.(i),g?.(i,{rowIndex:t,cellIndex:n,date:e})},onClick:t=>{r?.onClick?.(t),_?.(t,e)},onMouseEnter:t=>{r?.onMouseEnter?.(t),v?.(t,e)},onMouseDown:e=>{r?.onMouseDown?.(e),y&&e.preventDefault()},tabIndex:y||!i?-1:0,children:r?.children??(0,Y.default)(e).locale(D.getLocale(d)).format(u)})},n)});return(0,J.jsx)(`tr`,{...E(`monthsListRow`),children:n},t)});return(0,J.jsx)($,{component:`table`,size:C,...E(`monthsList`),"data-full-width":S||void 0,...T,children:(0,J.jsx)(`tbody`,{children:A})})});V4.classes=z4,V4.displayName=`@mantine/dates/MonthsList`;var H4={calendarHeader:`m_730a79ed`,calendarHeaderLevel:`m_f6645d97`,calendarHeaderControl:`m_2351eeb0`,calendarHeaderControlIcon:`m_367dc749`},U4={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:[`previous`,`level`,`next`]},W4=HN((e,{size:t})=>({calendarHeader:{"--dch-control-size":fM(t,`dch-control-size`),"--dch-fz":hM(t)}})),G4=Q(e=>{let t=Z(`CalendarHeader`,U4,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,nextIcon:c,previousIcon:l,nextLabel:u,previousLabel:d,onNext:f,onPrevious:p,onLevelClick:m,label:h,nextDisabled:g,previousDisabled:_,hasNextLevel:v,levelControlAriaLabel:y,withNext:b,withPrevious:x,headerControlsOrder:S,fullWidth:C,__staticSelector:w,__preventFocus:T,__stopPropagation:E,attributes:D,...O}=t,k=bF({name:w||`CalendarHeader`,classes:H4,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:D,vars:s,varsResolver:W4,rootSelector:`calendarHeader`}),A=T?e=>e.preventDefault():void 0,j=x&&(0,q.createElement)(SB,{...k(`calendarHeaderControl`),key:`previous`,"data-direction":`previous`,"aria-label":d,onClick:p,unstyled:o,onMouseDown:A,disabled:_,"data-disabled":_||void 0,tabIndex:T||_?-1:0,"data-mantine-stop-propagation":E||void 0},l||(0,J.jsx)(HU,{...k(`calendarHeaderControlIcon`),"data-direction":`previous`,size:`45%`})),M=(0,q.createElement)(SB,{component:v?`button`:`div`,...k(`calendarHeaderLevel`),key:`level`,onClick:v?m:void 0,unstyled:o,onMouseDown:v?A:void 0,disabled:!v,"data-static":!v||void 0,"aria-label":y,tabIndex:T||!v?-1:0,"data-mantine-stop-propagation":E||void 0},h),N=b&&(0,q.createElement)(SB,{...k(`calendarHeaderControl`),key:`next`,"data-direction":`next`,"aria-label":u,onClick:f,unstyled:o,onMouseDown:A,disabled:g,"data-disabled":g||void 0,tabIndex:T||g?-1:0,"data-mantine-stop-propagation":E||void 0},c||(0,J.jsx)(HU,{...k(`calendarHeaderControlIcon`),"data-direction":`next`,size:`45%`})),P=S.map(e=>e===`previous`?j:e===`level`?M:e===`next`?N:null);return(0,J.jsx)($,{...k(`calendarHeader`),"data-full-width":C||void 0,...O,children:P})});G4.classes=H4,G4.varsResolver=W4,G4.displayName=`@mantine/dates/CalendarHeader`;function K4(e){let t=M4(e);return[t[0][0],t[3][0]]}var q4={decadeLabelFormat:`YYYY`},J4=Q(e=>{let{decade:t,locale:n,minDate:r,maxDate:i,yearsListFormat:a,getYearControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:f,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,nextDisabled:y,previousDisabled:b,levelControlAriaLabel:x,withNext:S,withPrevious:C,headerControlsOrder:w,decadeLabelFormat:T,classNames:E,styles:D,unstyled:O,__staticSelector:k,__stopPropagation:A,size:j,fullWidth:M,attributes:N,...P}=Z(`DecadeLevel`,q4,e),F=T2(),[ee,I]=K4(t),te={__staticSelector:k||`DecadeLevel`,classNames:E,styles:D,unstyled:O,size:j,attributes:N},ne=typeof y==`boolean`?y:i?!(0,Y.default)(I).endOf(`year`).isBefore(i):!1,L=typeof b==`boolean`?b:r?!(0,Y.default)(ee).startOf(`year`).isAfter(r):!1,re=(e,t)=>(0,Y.default)(e).locale(n||F.locale).format(t);return(0,J.jsxs)($,{"data-decade-level":!0,size:j,...P,children:[(0,J.jsx)(G4,{label:typeof T==`function`?T(ee,I):`${re(ee,T)} – ${re(I,T)}`,__preventFocus:f,__stopPropagation:A,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,nextDisabled:ne,previousDisabled:L,hasNextLevel:!1,levelControlAriaLabel:x,withNext:S,withPrevious:C,headerControlsOrder:w,fullWidth:M,...te}),(0,J.jsx)(F4,{decade:t,locale:n,minDate:r,maxDate:i,yearsListFormat:a,getYearControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,__preventFocus:f,__stopPropagation:A,withCellSpacing:d,fullWidth:M,...te})]})});J4.classes={...F4.classes,...G4.classes},J4.displayName=`@mantine/dates/DecadeLevel`;var Y4={yearLabelFormat:`YYYY`},X4=Q(e=>{let{year:t,locale:n,minDate:r,maxDate:i,monthsListFormat:a,getMonthControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:f,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,onLevelClick:y,nextDisabled:b,previousDisabled:x,hasNextLevel:S,levelControlAriaLabel:C,withNext:w,withPrevious:T,headerControlsOrder:E,yearLabelFormat:D,__staticSelector:O,__stopPropagation:k,size:A,classNames:j,styles:M,unstyled:N,fullWidth:P,attributes:F,...ee}=Z(`YearLevel`,Y4,e),I=T2(),te={__staticSelector:O||`YearLevel`,classNames:j,styles:M,unstyled:N,size:A,attributes:F},ne=typeof b==`boolean`?b:i?!(0,Y.default)(t).endOf(`year`).isBefore(i):!1,L=typeof x==`boolean`?x:r?!(0,Y.default)(t).startOf(`year`).isAfter(r):!1;return(0,J.jsxs)($,{"data-year-level":!0,size:A,...ee,children:[(0,J.jsx)(G4,{label:typeof D==`function`?D(t):(0,Y.default)(t).locale(n||I.locale).format(D),__preventFocus:f,__stopPropagation:k,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,onLevelClick:y,nextDisabled:ne,previousDisabled:L,hasNextLevel:S,levelControlAriaLabel:C,withNext:w,withPrevious:T,headerControlsOrder:E,fullWidth:P,...te}),(0,J.jsx)(V4,{year:t,locale:n,minDate:r,maxDate:i,monthsListFormat:a,getMonthControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,__preventFocus:f,__stopPropagation:k,withCellSpacing:d,fullWidth:P,...te})]})});X4.classes={...G4.classes,...V4.classes},X4.displayName=`@mantine/dates/YearLevel`;var Z4={monthLabelFormat:`MMMM YYYY`},Q4=Q(e=>{let{month:t,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__getDayRef:m,__onDayKeyDown:h,__onDayClick:g,__onDayMouseEnter:_,withCellSpacing:v,highlightToday:y,withWeekNumbers:b,__preventFocus:x,__stopPropagation:S,nextIcon:C,previousIcon:w,nextLabel:T,previousLabel:E,onNext:D,onPrevious:O,onLevelClick:k,nextDisabled:A,previousDisabled:j,hasNextLevel:M,levelControlAriaLabel:N,withNext:P,withPrevious:F,headerControlsOrder:ee,monthLabelFormat:I,classNames:te,styles:ne,unstyled:L,__staticSelector:re,size:ie,static:ae,fullWidth:oe,attributes:se,...ce}=Z(`MonthLevel`,Z4,e),le=T2(),ue={__staticSelector:re||`MonthLevel`,classNames:te,styles:ne,unstyled:L,size:ie,attributes:se},R=typeof A==`boolean`?A:l?!(0,Y.default)(t).endOf(`month`).isBefore(l):!1,de=typeof j==`boolean`?j:c?!(0,Y.default)(t).startOf(`month`).isAfter(c):!1;return(0,J.jsxs)($,{"data-month-level":!0,size:ie,...ce,children:[(0,J.jsx)(G4,{label:typeof I==`function`?I(t):(0,Y.default)(t).locale(n||le.locale).format(I),__preventFocus:x,__stopPropagation:S,nextIcon:C,previousIcon:w,nextLabel:T,previousLabel:E,onNext:D,onPrevious:O,onLevelClick:k,nextDisabled:R,previousDisabled:de,hasNextLevel:M,levelControlAriaLabel:N,withNext:P,withPrevious:F,headerControlsOrder:ee,fullWidth:oe,...ue}),(0,J.jsx)(E4,{month:t,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__getDayRef:m,__onDayKeyDown:h,__onDayClick:g,__onDayMouseEnter:_,__preventFocus:x,__stopPropagation:S,static:ae,withCellSpacing:v,highlightToday:y,withWeekNumbers:b,fullWidth:oe,...ue})]})});Q4.classes={...E4.classes,...G4.classes},Q4.displayName=`@mantine/dates/MonthLevel`;var $4={levelsGroup:`m_30b26e33`},e3=Q(e=>{let t=Z(`LevelsGroup`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,fullWidth:l,attributes:u,...d}=t;return(0,J.jsx)($,{...bF({name:c||`LevelsGroup`,classes:$4,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,rootSelector:`levelsGroup`})(`levelsGroup`),"data-full-width":l||void 0,...d})});e3.classes=$4,e3.displayName=`@mantine/dates/LevelsGroup`;var t3={numberOfColumns:1},n3=Q(e=>{let{decade:t,locale:n,minDate:r,maxDate:i,yearsListFormat:a,getYearControlProps:o,__onControlClick:s,__onControlMouseEnter:c,withCellSpacing:l,__preventFocus:u,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,nextDisabled:_,previousDisabled:v,headerControlsOrder:y,classNames:b,styles:x,unstyled:S,__staticSelector:C,__stopPropagation:w,numberOfColumns:T,levelControlAriaLabel:E,decadeLabelFormat:D,size:O,fullWidth:k,vars:A,attributes:j,...M}=Z(`DecadeLevelGroup`,t3,e),N=(0,q.useRef)([]),P=Array(T).fill(0).map((e,A)=>{let M=(0,Y.default)(t).add(A*10,`years`).format(`YYYY-MM-DD`);return(0,J.jsx)(J4,{size:O,yearsListFormat:a,decade:M,withNext:A===T-1,withPrevious:A===0,decadeLabelFormat:D,__onControlClick:s,__onControlMouseEnter:c,__onControlKeyDown:(e,t)=>v2({levelIndex:A,rowIndex:t.rowIndex,cellIndex:t.cellIndex,event:e,controlsRef:N}),__getControlRef:(e,t,n)=>{Array.isArray(N.current[A])||(N.current[A]=[]),Array.isArray(N.current[A][e])||(N.current[A][e]=[]),N.current[A][e][t]=n},levelControlAriaLabel:typeof E==`function`?E(M):E,locale:n,minDate:r,maxDate:i,__preventFocus:u,__stopPropagation:w,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,nextDisabled:_,previousDisabled:v,getYearControlProps:o,__staticSelector:C||`DecadeLevelGroup`,classNames:b,styles:x,unstyled:S,withCellSpacing:l,headerControlsOrder:y,fullWidth:k,attributes:j},A)});return(0,J.jsx)(e3,{classNames:b,styles:x,__staticSelector:C||`DecadeLevelGroup`,size:O,unstyled:S,fullWidth:k,attributes:j,...M,children:P})});n3.classes={...e3.classes,...J4.classes},n3.displayName=`@mantine/dates/DecadeLevelGroup`;var r3={numberOfColumns:1},i3=Q(e=>{let{year:t,locale:n,minDate:r,maxDate:i,monthsListFormat:a,getMonthControlProps:o,__onControlClick:s,__onControlMouseEnter:c,withCellSpacing:l,__preventFocus:u,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,onLevelClick:_,nextDisabled:v,previousDisabled:y,hasNextLevel:b,headerControlsOrder:x,classNames:S,styles:C,unstyled:w,__staticSelector:T,__stopPropagation:E,numberOfColumns:D,levelControlAriaLabel:O,yearLabelFormat:k,size:A,fullWidth:j,vars:M,attributes:N,...P}=Z(`YearLevelGroup`,r3,e),F=(0,q.useRef)([]),ee=Array(D).fill(0).map((e,M)=>{let P=(0,Y.default)(t).add(M,`years`).format(`YYYY-MM-DD`);return(0,J.jsx)(X4,{size:A,monthsListFormat:a,year:P,withNext:M===D-1,withPrevious:M===0,yearLabelFormat:k,__stopPropagation:E,__onControlClick:s,__onControlMouseEnter:c,__onControlKeyDown:(e,t)=>v2({levelIndex:M,rowIndex:t.rowIndex,cellIndex:t.cellIndex,event:e,controlsRef:F}),__getControlRef:(e,t,n)=>{Array.isArray(F.current[M])||(F.current[M]=[]),Array.isArray(F.current[M][e])||(F.current[M][e]=[]),F.current[M][e][t]=n},levelControlAriaLabel:typeof O==`function`?O(P):O,locale:n,minDate:r,maxDate:i,__preventFocus:u,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,onLevelClick:_,nextDisabled:v,previousDisabled:y,hasNextLevel:b,getMonthControlProps:o,classNames:S,styles:C,unstyled:w,__staticSelector:T||`YearLevelGroup`,withCellSpacing:l,headerControlsOrder:x,fullWidth:j,attributes:N},M)});return(0,J.jsx)(e3,{classNames:S,styles:C,__staticSelector:T||`YearLevelGroup`,size:A,unstyled:w,fullWidth:j,attributes:N,...P,children:ee})});i3.classes={...X4.classes,...e3.classes},i3.displayName=`@mantine/dates/YearLevelGroup`;var a3={numberOfColumns:1},o3=Q(e=>{let{month:t,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__onDayClick:m,__onDayMouseEnter:h,withCellSpacing:g,highlightToday:_,withWeekNumbers:v,__preventFocus:y,nextIcon:b,previousIcon:x,nextLabel:S,previousLabel:C,onNext:w,onPrevious:T,onLevelClick:E,nextDisabled:D,previousDisabled:O,hasNextLevel:k,headerControlsOrder:A,classNames:j,styles:M,unstyled:N,numberOfColumns:P,levelControlAriaLabel:F,monthLabelFormat:ee,__staticSelector:I,__stopPropagation:te,size:ne,static:L,fullWidth:re,vars:ie,attributes:ae,...oe}=Z(`MonthLevelGroup`,a3,e),se=(0,q.useRef)([]),ce=Array(P).fill(0).map((e,ie)=>{let oe=(0,Y.default)(t).add(ie,`months`).format(`YYYY-MM-DD`);return(0,J.jsx)(Q4,{month:oe,withNext:ie===P-1,withPrevious:ie===0,monthLabelFormat:ee,__stopPropagation:te,__onDayClick:m,__onDayMouseEnter:h,__onDayKeyDown:(e,t)=>v2({levelIndex:ie,rowIndex:t.rowIndex,cellIndex:t.cellIndex,event:e,controlsRef:se}),__getDayRef:(e,t,n)=>{Array.isArray(se.current[ie])||(se.current[ie]=[]),Array.isArray(se.current[ie][e])||(se.current[ie][e]=[]),se.current[ie][e][t]=n},levelControlAriaLabel:typeof F==`function`?F(oe):F,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__preventFocus:y,nextIcon:b,previousIcon:x,nextLabel:S,previousLabel:C,onNext:w,onPrevious:T,onLevelClick:E,nextDisabled:D,previousDisabled:O,hasNextLevel:k,classNames:j,styles:M,unstyled:N,__staticSelector:I||`MonthLevelGroup`,size:ne,static:L,withCellSpacing:g,highlightToday:_,withWeekNumbers:v,headerControlsOrder:A,fullWidth:re,attributes:ae},ie)});return(0,J.jsx)(e3,{classNames:j,styles:M,__staticSelector:I||`MonthLevelGroup`,size:ne,fullWidth:re,attributes:ae,...oe,children:ce})});o3.classes={...e3.classes,...Q4.classes},o3.displayName=`@mantine/dates/MonthLevelGroup`;var s3={input:`m_6fa5e2aa`},c3=Q(e=>{let{inputProps:t,wrapperProps:n,placeholder:r,classNames:i,styles:a,unstyled:o,popoverProps:s,modalProps:c,dropdownType:l,children:u,formattedValue:d,dropdownHandlers:f,dropdownOpened:p,onClick:m,clearable:h,clearSectionMode:g,onClear:_,clearButtonProps:v,rightSection:y,shouldClear:b,readOnly:x,disabled:S,value:C,name:w,form:T,type:E,onDropdownClose:D,withTime:O,...k}=jU(`PickerInputBase`,{size:`sm`},e),A=(0,J.jsx)(AU.ClearButton,{onClick:_,unstyled:o,...v}),j=()=>{E===`range`&&Array.isArray(C)&&C[0]&&!C[1]&&_(),f.close()};return(0,J.jsxs)(J.Fragment,{children:[l===`modal`&&!x&&(0,J.jsx)(aJ,{opened:p,onClose:j,withCloseButton:!1,size:`auto`,"data-dates-modal":!0,unstyled:o,...c,children:u}),(0,J.jsx)(AU.Wrapper,{...n,children:(0,J.jsxs)(dV,{position:`bottom-start`,opened:p,trapFocus:!0,returnFocus:!1,unstyled:o,onClose:D,...s,disabled:s?.disabled||l===`modal`||x,onChange:e=>{e||(s?.onClose?.(),j())},children:[(0,J.jsx)(dV.Target,{children:(0,J.jsx)(AU,{"data-dates-input":!0,"data-read-only":x||void 0,disabled:S,component:`button`,type:`button`,multiline:!0,onClick:e=>{m?.(e),f.toggle()},__clearSection:A,__clearable:h&&b&&!x&&!S,__clearSectionMode:g,rightSection:y,...t,classNames:{...i,input:WN(s3.input,i?.input)},...k,children:d||(0,J.jsx)(AU.Placeholder,{error:t.error,unstyled:o,classNames:i,styles:a,__staticSelector:t.__staticSelector,children:r})})}),(0,J.jsx)(dV.Dropdown,{"data-dates-dropdown":!0,children:u})]})}),(0,J.jsx)(D2,{value:C,name:w,form:T,type:E,withTime:O})]})});c3.classes=s3,c3.displayName=`@mantine/dates/PickerInputBase`;var l3=e=>e===`range`?[null,null]:e===`multiple`?[]:null,u3=(e,t)=>{let n=t?x2:b2;return Array.isArray(e)?e.map(n):n(e)};function d3({type:e,value:t,defaultValue:n,onChange:r,withTime:i=!1}){let a=(0,q.useRef)(e),[o,s,c]=tN({value:u3(t,i),defaultValue:u3(n,i),finalValue:l3(e),onChange:r}),l=o;return a.current!==e&&(a.current=e,t===void 0&&(l=n===void 0?l3(e):n,s(l))),[l,s,c]}function f3(e,t){return e?e===`month`?0:e===`year`?1:2:t||0}function p3(e){return e===0?`month`:e===1?`year`:`decade`}function m3(e,t,n){return p3(CM(f3(e,0),f3(t,0),f3(n,2)))}var h3={maxLevel:`decade`,minLevel:`month`,__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},g3=Q(e=>{let t=Z(`Calendar`,h3,e),{vars:n,maxLevel:r,minLevel:i,defaultLevel:a,level:o,onLevelChange:s,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:p,nextLabel:m,previousLabel:h,onYearSelect:g,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:y,headerControlsOrder:b,__updateDateOnYearSelect:x,__updateDateOnMonthSelect:S,__setDateRef:C,__setLevelRef:w,firstDayOfWeek:T,weekdayFormat:E,weekendDays:D,getDayProps:O,excludeDate:k,renderDay:A,hideOutsideDates:j,hideWeekdays:M,getDayAriaLabel:N,monthLabelFormat:P,nextIcon:F,previousIcon:ee,__onDayClick:I,__onDayMouseEnter:te,withCellSpacing:ne,highlightToday:L,withWeekNumbers:re,monthsListFormat:ie,getMonthControlProps:ae,yearLabelFormat:oe,yearsListFormat:se,getYearControlProps:ce,decadeLabelFormat:le,classNames:ue,styles:R,unstyled:de,minDate:z,maxDate:fe,locale:pe,__staticSelector:me,size:he,__preventFocus:ge,__stopPropagation:_e,onNextDecade:ve,onPreviousDecade:ye,onNextYear:be,onPreviousYear:B,onNextMonth:xe,onPreviousMonth:V,static:H,enableKeyboardNavigation:Se,fullWidth:Ce,attributes:we,ref:Te,...Ee}=t,{resolvedClassNames:De,resolvedStyles:Oe}=oF({classNames:ue,styles:R,props:t}),[ke,Ae]=tN({value:o?m3(o,i,r):void 0,defaultValue:a?m3(a,i,r):void 0,finalValue:m3(void 0,i,r),onChange:s}),[je,Me]=d3({type:`default`,value:b2(c),defaultValue:b2(l),onChange:u});(0,q.useImperativeHandle)(C,()=>e=>{Me(e)}),(0,q.useImperativeHandle)(w,()=>e=>{Ae(e)});let Ne={__staticSelector:me||`Calendar`,styles:Oe,classNames:De,unstyled:de,size:he,attributes:we},U=f||d||1,Pe=(0,q.useRef)(null);if(Pe.current===null){let e=new Date;Pe.current=z&&(0,Y.default)(e).isAfter(z)?z:(0,Y.default)(e).format(`YYYY-MM-DD`)}let Fe=je||Pe.current,Ie=()=>{let e=(0,Y.default)(Fe).add(U,`month`).format(`YYYY-MM-DD`);xe?.(e),Me(e)},Le=()=>{let e=(0,Y.default)(Fe).subtract(U,`month`).format(`YYYY-MM-DD`);V?.(e),Me(e)},Re=()=>{let e=(0,Y.default)(Fe).add(U,`year`).format(`YYYY-MM-DD`);be?.(e),Me(e)},ze=()=>{let e=(0,Y.default)(Fe).subtract(U,`year`).format(`YYYY-MM-DD`);B?.(e),Me(e)},Be=()=>{let e=(0,Y.default)(Fe).add(10*U,`year`).format(`YYYY-MM-DD`);ve?.(e),Me(e)},Ve=()=>{let e=(0,Y.default)(Fe).subtract(10*U,`year`).format(`YYYY-MM-DD`);ye?.(e),Me(e)},He=(0,q.useRef)(null);return(0,q.useEffect)(()=>{if(!Se||H)return;let e=e=>{if(!He.current?.contains(document.activeElement))return;let t=e.ctrlKey||e.metaKey,n=e.shiftKey;switch(e.key){case`ArrowUp`:t&&n?(e.preventDefault(),Ve()):t&&(e.preventDefault(),ze());break;case`ArrowDown`:t&&n?(e.preventDefault(),Be()):t&&(e.preventDefault(),Re());break;case`y`:case`Y`:ke===`month`&&(e.preventDefault(),Ae(`year`));break}};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[Se,H,ke,Re,ze,Be,Ve]),(0,J.jsxs)($,{ref:QM(He,Te),size:he,"data-calendar":!0,"data-full-width":Ce||void 0,...Ee,children:[ke===`month`&&(0,J.jsx)(o3,{month:Fe,minDate:z,maxDate:fe,firstDayOfWeek:T,weekdayFormat:E,weekendDays:D,getDayProps:O,excludeDate:k,renderDay:A,hideOutsideDates:j,hideWeekdays:M,getDayAriaLabel:N,onNext:Ie,onPrevious:Le,hasNextLevel:r!==`month`,onLevelClick:()=>Ae(`year`),numberOfColumns:d,locale:pe,levelControlAriaLabel:p?.monthLevelControl,nextLabel:p?.nextMonth??m,nextIcon:F,previousLabel:p?.previousMonth??h,previousIcon:ee,monthLabelFormat:P,__onDayClick:I,__onDayMouseEnter:te,__preventFocus:ge,__stopPropagation:_e,static:H,withCellSpacing:ne,highlightToday:L,withWeekNumbers:re,headerControlsOrder:b,fullWidth:Ce,...Ne}),ke===`year`&&(0,J.jsx)(i3,{year:Fe,numberOfColumns:d,minDate:z,maxDate:fe,monthsListFormat:ie,getMonthControlProps:ae,locale:pe,onNext:Re,onPrevious:ze,hasNextLevel:r!==`month`&&r!==`year`,onLevelClick:()=>Ae(`decade`),levelControlAriaLabel:p?.yearLevelControl,nextLabel:p?.nextYear??m,nextIcon:F,previousLabel:p?.previousYear??h,previousIcon:ee,yearLabelFormat:oe,__onControlMouseEnter:y,__onControlClick:(e,t)=>{S&&Me(t),Ae(m3(`month`,i,r)),_?.(t)},__preventFocus:ge,__stopPropagation:_e,withCellSpacing:ne,headerControlsOrder:b,fullWidth:Ce,...Ne}),ke===`decade`&&(0,J.jsx)(n3,{decade:Fe,minDate:z,maxDate:fe,yearsListFormat:se,getYearControlProps:ce,locale:pe,onNext:Be,onPrevious:Ve,numberOfColumns:d,nextLabel:p?.nextDecade??m,nextIcon:F,previousLabel:p?.previousDecade??h,previousIcon:ee,decadeLabelFormat:le,__onControlMouseEnter:v,__onControlClick:(e,t)=>{x&&Me(t),Ae(m3(`year`,i,r)),g?.(t)},__preventFocus:ge,__stopPropagation:_e,withCellSpacing:ne,headerControlsOrder:b,fullWidth:Ce,...Ne})]})});g3.classes={...n3.classes,...i3.classes,...o3.classes},g3.displayName=`@mantine/dates/Calendar`;function _3(e){let{maxLevel:t,minLevel:n,defaultLevel:r,level:i,onLevelChange:a,nextIcon:o,previousIcon:s,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:p,nextLabel:m,previousLabel:h,onYearSelect:g,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:y,onNextMonth:b,onPreviousMonth:x,onNextYear:S,onPreviousYear:C,onNextDecade:w,onPreviousDecade:T,withCellSpacing:E,highlightToday:D,__updateDateOnYearSelect:O,__updateDateOnMonthSelect:k,__setDateRef:A,__setLevelRef:j,withWeekNumbers:M,headerControlsOrder:N,firstDayOfWeek:P,weekdayFormat:F,weekendDays:ee,getDayProps:I,excludeDate:te,renderDay:ne,hideOutsideDates:L,hideWeekdays:re,getDayAriaLabel:ie,monthLabelFormat:ae,monthsListFormat:oe,getMonthControlProps:se,yearLabelFormat:ce,yearsListFormat:le,getYearControlProps:ue,decadeLabelFormat:R,allowSingleDateInRange:de,allowDeselect:z,minDate:fe,maxDate:pe,locale:me,...he}=e;return{calendarProps:{maxLevel:t,minLevel:n,defaultLevel:r,level:i,onLevelChange:a,nextIcon:o,previousIcon:s,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:p,nextLabel:m,previousLabel:h,onYearSelect:g,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:y,onNextMonth:b,onPreviousMonth:x,onNextYear:S,onPreviousYear:C,onNextDecade:w,onPreviousDecade:T,withCellSpacing:E,highlightToday:D,__updateDateOnYearSelect:O,__updateDateOnMonthSelect:k,__setDateRef:A,withWeekNumbers:M,headerControlsOrder:N,firstDayOfWeek:P,weekdayFormat:F,weekendDays:ee,getDayProps:I,excludeDate:te,renderDay:ne,hideOutsideDates:L,hideWeekdays:re,getDayAriaLabel:ie,monthLabelFormat:ae,monthsListFormat:oe,getMonthControlProps:se,yearLabelFormat:ce,yearsListFormat:le,getYearControlProps:ue,decadeLabelFormat:R,allowSingleDateInRange:de,allowDeselect:z,minDate:fe,maxDate:pe,locale:me},others:he}}function v3(e,t){let n=[...t].sort((e,t)=>(0,Y.default)(e).isAfter((0,Y.default)(t))?1:-1);return(0,Y.default)(n[0]).startOf(`day`).subtract(1,`ms`).isBefore(e)&&(0,Y.default)(n[1]).endOf(`day`).add(1,`ms`).isAfter(e)}function y3({type:e,level:t,value:n,defaultValue:r,onChange:i,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:s}){let[c,l]=d3({type:e,value:n,defaultValue:r,onChange:i}),[u,d]=(0,q.useState)(e===`range`&&c[0]&&!c[1]?c[0]:null),[f,p]=(0,q.useState)(null),m=n=>{if(e===`range`){if(u&&!c[1]){if((0,Y.default)(n).isSame(u,t)&&!a){d(null),p(null),l([null,null]);return}let e=[n,u];e.sort((e,t)=>(0,Y.default)(e).isAfter((0,Y.default)(t))?1:-1),l(e),p(null),d(null);return}if(c[0]&&!c[1]&&(0,Y.default)(n).isSame(c[0],t)&&!a){d(null),p(null),l([null,null]);return}l([n,null]),p(null),d(n);return}if(e===`multiple`){c.some(e=>(0,Y.default)(e).isSame(n,t))?l(c.filter(e=>!(0,Y.default)(e).isSame(n,t))):l([...c,n]);return}c&&o&&(0,Y.default)(n).isSame(c,t)?l(null):l(n)},h=e=>u&&f?v3(e,[f,u]):c[0]&&c[1]?v3(e,c):!1,g=e===`range`?e=>{s?.(e),p(null)}:s,_=e=>c[0]&&(0,Y.default)(e).isSame(c[0],t)?!(f&&(0,Y.default)(f).isBefore(c[0])):!1,v=e=>c[1]?(0,Y.default)(e).isSame(c[1],t):!c[0]||!f?!1:(0,Y.default)(f).isBefore(c[0])&&(0,Y.default)(e).isSame(c[0],t),y=n=>{if(e===`range`)return{selected:c.some(e=>e&&(0,Y.default)(e).isSame(n,t)),inRange:h(n),firstInRange:_(n),lastInRange:v(n),"data-autofocus":!!c[0]&&(0,Y.default)(c[0]).isSame(n,t)||void 0};if(e===`multiple`)return{selected:c.some(e=>e&&(0,Y.default)(e).isSame(n,t)),"data-autofocus":!!c[0]&&(0,Y.default)(c[0]).isSame(n,t)||void 0};let r=(0,Y.default)(c).isSame(n,t);return{selected:r,"data-autofocus":r||void 0}},b=e===`range`&&u?p:()=>{};return(0,q.useEffect)(()=>{if(e===`range`)if(c[0]&&!c[1])d(c[0]);else{let e=c[0]==null&&c[1]==null,t=c[0]!=null&&c[1]!=null;(e||t)&&(d(null),p(null))}},[c]),{onDateChange:m,onRootMouseLeave:g,onHoveredDateChange:b,getControlProps:y,_value:c,setValue:l}}var b3={datePickerRoot:`m_765a40cf`,presetsList:`m_d6a681e1`,presetButton:`m_acd30b22`},x3=HN((e,{size:t})=>({datePickerRoot:{"--preset-font-size":hM(t)}})),S3={type:`default`,defaultLevel:`month`,numberOfColumns:1,size:`sm`},C3=Q(e=>{let t=Z(`DatePicker`,S3,e),{allowDeselect:n,allowSingleDateInRange:r,value:i,defaultValue:a,onChange:o,onMouseLeave:s,classNames:c,styles:l,__staticSelector:u,__onDayClick:d,__onDayMouseEnter:f,__onPresetSelect:p,__stopPropagation:m,presets:h,className:g,style:_,unstyled:v,size:y,vars:b,attributes:x,...S}=t,{calendarProps:C,others:w}=_3(S),T=(0,q.useRef)(null),E=(0,q.useRef)(null),D=bF({name:u||`DatePicker`,classes:b3,props:t,className:g,style:_,classNames:c,styles:l,unstyled:v,attributes:x,rootSelector:h?`datePickerRoot`:void 0,varsResolver:x3,vars:b}),{onDateChange:O,onRootMouseLeave:k,onHoveredDateChange:A,getControlProps:j,_value:M,setValue:N}=y3({type:w.type,level:`day`,allowDeselect:n,allowSingleDateInRange:r,value:i,defaultValue:a,onChange:o,onMouseLeave:s}),{resolvedClassNames:P,resolvedStyles:F}=oF({classNames:c,styles:l,props:t}),ee=(0,J.jsx)(g3,{classNames:P,styles:F,__staticSelector:u||`DatePicker`,onMouseLeave:k,size:y,...C,...h?{}:w,__stopPropagation:m,__setDateRef:T,__setLevelRef:E,minLevel:C.minLevel||`month`,__onDayMouseEnter:(e,t)=>{A(t),f?.(e,t)},__onDayClick:(e,t)=>{O(t),d?.(e,t)},getDayProps:e=>({...j(e),...C.getDayProps?.(e)}),getMonthControlProps:e=>({selected:typeof M==`string`?_4(e,M):!1,...C.getMonthControlProps?.(e)}),getYearControlProps:e=>({selected:typeof M==`string`?(0,Y.default)(e).isSame(M,`year`):!1,...C.getYearControlProps?.(e)}),hideOutsideDates:C.hideOutsideDates??C.numberOfColumns!==1,attributes:x,...h?{}:{className:g,style:_}});if(!h)return ee;let I=e=>{let t=Array.isArray(e)?e[0]:e;t!==void 0&&(T.current?.(t),E.current?.(`month`),p?p(t):N(e))},te=h.map((e,t)=>(0,J.jsx)(SB,{...D(`presetButton`),onClick:()=>I(e.value),onMouseDown:e=>e.preventDefault(),"data-mantine-stop-propagation":m||void 0,children:e.label},t));return(0,J.jsxs)($,{...D(`datePickerRoot`),size:y,...w,children:[(0,J.jsx)(`div`,{...D(`presetsList`),children:te}),ee]})});C3.classes=g3.classes,C3.varsResolver=x3,C3.displayName=`@mantine/dates/DatePicker`;function w3(e){if(e===null)return null;let t=new Date(e);return Number.isNaN(t.getTime())||!e?null:(0,Y.default)(t).format(`YYYY-MM-DD`)}function T3({date:e,maxDate:t,minDate:n}){return!(e==null||Number.isNaN(new Date(e).getTime())||t&&(0,Y.default)(e).isAfter(t,`date`)||n&&(0,Y.default)(e).isBefore(n,`date`))}var E3={valueFormat:`MMMM D, YYYY`,fixOnBlur:!0,size:`sm`},D3=Q(e=>{let{inputProps:t,wrapperProps:n,value:r,defaultValue:i,onChange:a,clearable:o,clearSectionMode:s,clearButtonProps:c,popoverProps:l,getDayProps:u,locale:d,valueFormat:f,withTime:p,dateParser:m,minDate:h,maxDate:g,fixOnBlur:_,onFocus:v,onBlur:y,onClick:b,onKeyDown:x,readOnly:S,name:C,form:w,rightSection:T,unstyled:E,classNames:D,styles:O,allowDeselect:k,date:A,defaultDate:j,onDateChange:M,getMonthControlProps:N,getYearControlProps:P,disabled:F,...ee}=jU(`DateInput`,E3,e),I=(0,q.useRef)(null),te=(0,q.useRef)(null),[ne,L]=(0,q.useState)(!1),{calendarProps:re,others:ie}=_3(ee),ae=T2(),oe=m||(e=>{let t=(0,Y.default)(e,f,ae.getLocale(d)).toDate();return Number.isNaN(t.getTime())?w3(e):(0,Y.default)(t).format(p?`YYYY-MM-DD HH:mm:ss`:`YYYY-MM-DD`)}),se=k===void 0?o:k,ce=e=>e?(0,Y.default)(e).locale(ae.getLocale(d)).format(f):``,[le,ue,R]=d3({type:`default`,value:r,defaultValue:i,onChange:a,withTime:p}),[de,z]=d3({type:`default`,value:A,defaultValue:i||j,onChange:M});(0,q.useEffect)(()=>{R&&r!==null&&z(r)},[R,r]);let[fe,pe]=(0,q.useState)(ce(le));(0,q.useEffect)(()=>{pe(ce(le))},[ae.getLocale(d)]);let me=e=>{let t=e.currentTarget.value;if(pe(t),L(!0),t.trim()===``&&(k||o))ue(null);else{let e=oe(t);e&&T3({date:e,minDate:h,maxDate:g})&&(ue(e),z(e))}},he=e=>{y?.(e),L(!1),_&&pe(ce(le))},ge=e=>{v?.(e),L(!0)},_e=e=>{b?.(e),L(!0)},ve=e=>{e.key===`Escape`&&L(!1),x?.(e)},ye=e=>({...u?.(e),selected:(0,Y.default)(le).isSame(e,`day`),onClick:t=>{u?.(e).onClick?.(t);let n=se&&(0,Y.default)(le).isSame(e,`day`)?null:e;ue(n),!R&&n&&pe(ce(n)),L(!1)}}),be=(0,J.jsx)(AU.ClearButton,{onClick:()=>{ue(null),!R&&pe(``),L(!1)},unstyled:E,...c}),B=o&&!!le&&!S&&!F;return PM(()=>{le!==void 0&&!ne&&pe(ce(le))},[le]),kM(()=>L(!1),void 0,[I.current,te.current]),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(AU.Wrapper,{...n,__staticSelector:`DateInput`,ref:I,children:(0,J.jsxs)(dV,{opened:ne,trapFocus:!1,position:`bottom-start`,disabled:S||F,withRoles:!1,unstyled:E,...l,children:[(0,J.jsx)(dV.Target,{children:(0,J.jsx)(AU,{"data-dates-input":!0,"data-read-only":S||void 0,autoComplete:`off`,value:fe,onChange:me,onBlur:he,onFocus:ge,onClick:_e,onKeyDown:ve,readOnly:S,rightSection:T,__clearSection:be,__clearable:B,__clearSectionMode:s,...t,...ie,disabled:F,__staticSelector:`DateInput`})}),(0,J.jsx)(dV.Dropdown,{onMouseDown:e=>e.preventDefault(),"data-dates-dropdown":!0,ref:te,children:(0,J.jsx)(g3,{__staticSelector:`DateInput`,...re,classNames:D,styles:O,unstyled:E,__preventFocus:!0,minDate:h,maxDate:g,locale:d,getDayProps:ye,size:t.size,date:de,onDateChange:z,getMonthControlProps:e=>({selected:typeof le==`string`?_4(e,le):!1,...N?.(e)}),getYearControlProps:e=>({selected:typeof le==`string`?(0,Y.default)(e).isSame(le,`year`):!1,...P?.(e)}),attributes:n.attributes})})]})}),(0,J.jsx)(D2,{name:C,form:w,value:le,type:`default`,withTime:p})]})});D3.classes={...AU.classes,...g3.classes},D3.displayName=`@mantine/dates/DateInput`;function O3({minDate:e,value:t}){let n=e?(0,Y.default)(e).format(`HH:mm:ss`):null;return t&&e&&t===e?n??void 0:void 0}function k3({maxDate:e,value:t}){let n=e?(0,Y.default)(e).format(`HH:mm:ss`):null;return t&&e&&t===e?n??void 0:void 0}var A3={timeWrapper:`m_208d2562`,timeInput:`m_62ee059`},j3={dropdownType:`popover`,size:`sm`},M3=Q(e=>{let t=Z(`DateTimePicker`,j3,e),{value:n,defaultValue:r,onChange:i,valueFormat:a,locale:o,classNames:s,styles:c,unstyled:l,timePickerProps:u,submitButtonProps:d,withSeconds:f,level:p,defaultLevel:m,size:h,variant:g,dropdownType:_,vars:v,minDate:y,maxDate:b,defaultDate:x,defaultTimeValue:S,presets:C,attributes:w,onDropdownClose:T,...E}=t,D=bF({name:`DateTimePicker`,classes:A3,props:t,classNames:s,styles:c,unstyled:l,attributes:w,vars:v}),{resolvedClassNames:O,resolvedStyles:k}=oF({classNames:s,styles:c,props:t}),A=a||(f?`DD/MM/YYYY HH:mm:ss`:`DD/MM/YYYY HH:mm`),j=(0,q.useRef)(null),M=QM(j,u?.hoursRef),{calendarProps:{allowSingleDateInRange:N,...P},others:F}=_3(E),ee=T2(),[I,te]=d3({type:`default`,value:n,defaultValue:r,onChange:i,withTime:!0}),ne=x||I,L=e=>e?(0,Y.default)(e).format(f?`HH:mm:ss`:`HH:mm`):``,[re,ie]=(0,q.useState)(S||L(I)),[ae,oe]=(0,q.useState)(p||m||`month`),[se,ce]=xN(!1),le=I?(0,Y.default)(I).locale(ee.getLocale(o)).format(A):``,ue=e=>{u?.onChange?.(e),ie(e),e&&te(y2(I,e))},R=e=>{e&&te(y2(C2(y,b,e),re||S||``)),j.current?.focus()},de=e=>{e.key===`Enter`&&(e.preventDefault(),ce.close())};PM(()=>{se||ie(L(I))},[I,se]),PM(()=>{se&&oe(`month`)},[se]);let z=_===`popover`,fe=()=>{let e=C2(y,b,I);I&&I!==e&&te(C2(y,b,I)),T?.()};return(0,J.jsxs)(c3,{formattedValue:le,dropdownOpened:E.disabled?!1:se,dropdownHandlers:ce,classNames:O,styles:k,unstyled:l,onClear:()=>te(null),shouldClear:!!I,value:I,size:h,variant:g,dropdownType:_,...F,type:`default`,__staticSelector:`DateTimePicker`,onDropdownClose:fe,withTime:!0,attributes:w,children:[(0,J.jsx)(C3,{...P,maxDate:b,minDate:y,size:h,variant:g,type:`default`,value:I,defaultDate:ne||S2({maxDate:b,minDate:y}),onChange:R,locale:o,classNames:O,styles:k,unstyled:l,__staticSelector:`DateTimePicker`,__stopPropagation:z,level:p,defaultLevel:m,onLevelChange:e=>{oe(e),P.onLevelChange?.(e)},presets:C,__onPresetSelect:e=>{te(e),e&&ie(L(e))},attributes:w}),ae===`month`&&(0,J.jsxs)(`div`,{...D(`timeWrapper`),children:[(0,J.jsx)(o4,{value:re,withSeconds:f,unstyled:l,min:O3({minDate:y,value:I}),max:k3({maxDate:b,value:I}),...u,...D(`timeInput`,{className:u?.className,style:u?.style}),onChange:ue,onKeyDown:de,size:h,"data-mantine-stop-propagation":z||void 0,hoursRef:M,attributes:w}),(0,J.jsx)(DV,{variant:`default`,size:`input-${h||`sm`}`,...D(`submitButton`,{className:d?.className,style:d?.style}),unstyled:l,"data-mantine-stop-propagation":z||void 0,children:(0,J.jsx)(nG,{size:`30%`}),...d,onClick:e=>{d?.onClick?.(e),ce.close(),fe()}})]})]})});M3.classes={...A3,...c3.classes,...C3.classes},M3.displayName=`@mantine/dates/DateTimePicker`;var N3=e=>{let t=bj(e.input),[n,r]=Sj(e.input),{inputProps:i,id:a,icon:o,format:s}=l2(e,t);if(!e.input?.props)return null;if(e.datetime||s===`date-time`){let t=typeof e.datetime==`object`?e.datetime:{};return(0,J.jsx)(M3,{...i,id:a,leftSection:o,value:n?new Date(n):null,onChange:e=>r(e?new Date(e).toISOString():void 0),...t})}if(e.date||s===`date`){let t=typeof e.date==`object`?e.date:{};return(0,J.jsx)(D3,{...i,id:a,leftSection:o,value:n?new Date(n):null,onChange:e=>r(e?new Date(e).toISOString().slice(0,10):void 0),...t})}if(e.time||s===`time`){let t=typeof e.time==`object`?e.time:{};return(0,J.jsx)(k2,{...i,id:a,leftSection:o,value:n??``,onChange:e=>r(e.currentTarget.value),...t})}return null},P3=e=>{let t=bj(e.input),[n,r]=Sj(e.input),{inputProps:i,id:a,icon:o}=l2(e,t);if(!e.input?.props)return null;if(e.sliderProps){let t=e.sliderProps.min??i.minimum??0,o=e.sliderProps.max??i.maximum??100;return(0,J.jsx)(AU.Wrapper,{...i,children:(0,J.jsx)(`div`,{style:{height:32,padding:8},children:(0,J.jsx)(KX,{...i,id:a,...e.sliderProps,value:n??0,min:t,max:o,label:()=>n,onChange:e=>r(e)})})})}return(0,J.jsx)(RY,{...i,id:a,leftSection:o,...e.numberInputProps,value:n??``,onChange:e=>{r(e===null?void 0:Number(e))}})},F3=e=>{let{inputProps:t}=l2(e,{});if(!e.input?.props)return null;let n=e.input.schema;if(!n?.properties)return null;let r=Object.keys(n.properties),i=12/(e.columns??1),a=e.input.items,o=()=>(0,J.jsx)(nq,{children:r.map(t=>{let n=e.controlProps?.[t]??{},r=a?.[t];return r?(0,J.jsx)(nq.Col,{span:i,children:(0,J.jsx)(o6,{input:r,...n})},t):null})});return e.variant===`plain`?o():(0,J.jsx)(zK,{legend:t.label,children:(0,J.jsxs)(IU,{direction:`column`,gap:`xs`,children:[t.description&&(0,J.jsx)(qU,{size:`sm`,c:`dimmed`,children:t.description}),o(),t.error&&(0,J.jsx)(qU,{size:`sm`,c:`red`,children:t.error})]})})};function I3(e){return!e||e.trim()===``?{}:new L3(e).parse()}var L3=class{pos=0;query;constructor(e){this.query=e.trim()}parse(){return this.parseExpression()}parseExpression(){return this.parseOr()}parseOr(){let e=this.parseAnd();if(this.peek()===`|`){let t=[e];for(;this.peek()===`|`;)this.consume(`|`),t.push(this.parseAnd());return{or:t}}return e}parseAnd(){let e=this.parsePrimary();if(this.peek()===`&`){let t=[e];for(;this.peek()===`&`;)this.consume(`&`),t.push(this.parsePrimary());return{and:t}}return e}parsePrimary(){if(this.skipWhitespace(),this.peek()===`(`){this.consume(`(`);let e=this.parseExpression();return this.consume(`)`),e}return this.parseCondition()}parseCondition(){let e=this.parseFieldPath();this.skipWhitespace();let t=this.parseOperator();this.skipWhitespace();let n=this.parseValue();if(n===``)throw new p(`Expected value for field '${e.join(`.`)}'`);return this.buildCondition(e,t,n)}parseFieldPath(){let e=[],t=``;for(;this.pos<this.query.length;){let n=this.query[this.pos];if(n===`.`&&t){e.push(t),t=``,this.pos++;continue}if(n===`=`||n===`!`||n===`>`||n===`<`||n===` `)break;t+=n,this.pos++}return t&&e.push(t),e}parseOperator(){this.skipWhitespace();let e=this.query.slice(this.pos);if(e.startsWith(`>=`))return this.pos+=2,`>=`;if(e.startsWith(`<=`))return this.pos+=2,`<=`;if(e.startsWith(`!=`))return this.pos+=2,`!=`;let t=this.query[this.pos];if(t===`=`||t===`>`||t===`<`)return this.pos++,t;throw new p(`Expected operator at position ${this.pos}`)}parseValue(){if(this.skipWhitespace(),this.query.slice(this.pos,this.pos+4).toLowerCase()===`null`)return this.pos+=4,null;if(this.query[this.pos]===`[`)return this.parseArray();if(this.query[this.pos]===`"`||this.query[this.pos]===`'`)return this.parseQuotedString();let e=``;for(;this.pos<this.query.length;){let t=this.query[this.pos];if(t===`&`||t===`|`||t===`)`)break;e+=t,this.pos++}return this.coerceValue(e.trim())}parseArray(){this.consume(`[`);let e=[];for(;this.pos<this.query.length&&this.query[this.pos]!==`]`;){if(this.skipWhitespace(),this.query[this.pos]===`"`||this.query[this.pos]===`'`)e.push(this.parseQuotedString());else{let t=``;for(;this.pos<this.query.length&&this.query[this.pos]!==`,`&&this.query[this.pos]!==`]`;)t+=this.query[this.pos],this.pos++;e.push(this.coerceValue(t.trim()))}this.skipWhitespace(),this.query[this.pos]===`,`&&this.pos++}return this.consume(`]`),e}parseQuotedString(){let e=this.query[this.pos];this.pos++;let t=``,n=!1;for(;this.pos<this.query.length;){let r=this.query[this.pos];if(n){t+=r,n=!1,this.pos++;continue}if(r===`\\`){n=!0,this.pos++;continue}if(r===e){this.pos++;break}t+=r,this.pos++}return t}coerceValue(e){return/^-?\d+$/.test(e)?parseInt(e,10):/^-?\d+\.\d+$/.test(e)?parseFloat(e):e.toLowerCase()===`true`?!0:e.toLowerCase()===`false`?!1:e}buildCondition(e,t,n){let r;if(t===`=`)if(n===null)r={isNull:!0};else if(Array.isArray(n))r={inArray:n};else if(typeof n==`string`&&n.includes(`*`)){let e=n.startsWith(`*`),t=n.endsWith(`*`),i=n.replace(/^\*|\*$/g,``);r=e&&t?{contains:i}:e?{endsWith:i}:t?{startsWith:i}:{eq:n}}else r={eq:n};else if(t===`!=`)r=n===null?{isNotNull:!0}:{ne:n};else if(t===`>`)r={gt:n};else if(t===`>=`)r={gte:n};else if(t===`<`)r={lt:n};else if(t===`<=`)r={lte:n};else throw new p(`Unsupported operator: ${t}`);if(e.length===1)return{[e[0]]:r};let i=r;for(let t=e.length-1;t>=0;t--)i={[e[t]]:i};return i}peek(){return this.skipWhitespace(),this.query[this.pos]||``}consume(e){if(this.skipWhitespace(),this.query[this.pos]!==e)throw new p(`Expected '${e}' at position ${this.pos}, got '${this.query[this.pos]}'`);this.pos++}skipWhitespace(){for(;this.pos<this.query.length&&/\s/.test(this.query[this.pos]);)this.pos++}},R3=(e,t,n)=>(Object.assign(e,{[t]:n??{}}),e),z3=Symbol.for(`Alepha.Postgres.Default`),B3=Symbol.for(`Alepha.Postgres.PrimaryKey`),V3=Symbol.for(`Alepha.Postgres.CreatedAt`),H3=Symbol.for(`Alepha.Postgres.UpdatedAt`),U3=Symbol.for(`Alepha.Postgres.DeletedAt`),W3=Symbol.for(`Alepha.Postgres.Version`),G3=Symbol.for(`Alepha.Postgres.Identity`),K3=Symbol.for(`Alepha.Postgres.Ref`),q3=Symbol.for(`Alepha.Postgres.Generated`),J3=Symbol.for(`Alepha.Postgres.Organization`),Y3=Symbol.for(`Alepha.Postgres.Serial`),X3=e=>{let t={};for(let n in e.properties){let r=e.properties[n];q3 in r||(z3 in r?t[n]=K.optional(r):t[n]=r)}return K.object(t,`options`in e&&typeof e.options==`object`?{...e.options}:{})},Z3=e=>{let t={};for(let n in e.properties){let r=e.properties[n];q3 in r||(K.schema.isOptional(r)?t[n]=K.optional(K.union([r,K.raw.Null()])):t[n]=r)}return K.object(t,`options`in e&&typeof e.options==`object`?{...e.options}:{})},Q3=e=>new $3(e),$3=class e{options;constructor(e){this.options=e}alias(t){let n=new e(this.options);return new Proxy(n,{get(e,n,r){return n===`$alias`?t:Reflect.get(e,n,r)}})}get cols(){let e={};for(let t of Object.keys(this.schema.properties))e[t]={name:t,entity:this};return e}get name(){return this.options.name}get schema(){return this.options.schema}get insertSchema(){return X3(this.options.schema)}get updateSchema(){return Z3(this.options.schema)}};Q3[u]=$3;var e6=e=>new t6(e),t6=class{options;isView=!0;constructor(e){this.options=e}get name(){return this.options.name}get schema(){return this.options.schema}get materialized(){return this.options.materialized??!1}};e6[u]=t6,new class{attr=R3;identityPrimaryKey=(e,t)=>R3(R3(R3(K.integer(t),B3),G3,e),z3);bigIdentityPrimaryKey=(e,t)=>R3(R3(R3(K.int64(t),B3),G3,e),z3);uuidPrimaryKey=()=>R3(R3(K.uuid(),B3),z3);primaryKey(e,t,n){if(!e||K.schema.isInteger(e))return R3(R3(R3(K.integer(t),B3),G3,n),z3);if(K.schema.isString(e)&&e.format===`uuid`)return R3(R3(K.uuid(),B3),z3);if(K.schema.isNumber(e)&&e.format===`int64`)return R3(R3(R3(K.number(t),B3),G3,n),z3);if(K.schema.isBigInt(e))return R3(R3(R3(K.bigint(t),B3),G3,n),z3);throw new p(`Unsupported type for primary key: ${e}`)}default=(e,t)=>(t!=null&&Object.assign(e,{default:t}),this.attr(e,z3));version=(e={})=>this.default(R3(K.integer(e),W3),0);createdAt=e=>R3(R3(K.datetime(e),V3),z3);updatedAt=e=>R3(R3(K.datetime(e),H3),z3);deletedAt=e=>R3(K.optional(K.datetime(e)),U3);organization=()=>R3(K.optional(K.uuid()),J3);ref=(e,t,n)=>{let r=n??{onDelete:K.schema.isOptional(e)?`set null`:`cascade`};return this.attr(e,K3,{ref:t,actions:r})};page=(e,t)=>iA(e,t)},R3(R3(R3(K.integer(),B3),Y3),z3),C({name:`alepha.orm`,primitives:[],services:[AA]});var n6=e=>{let{fields:t,onInsert:n}=e;return(0,J.jsxs)(IU,{gap:`md`,align:`flex-start`,wrap:`nowrap`,bg:j0.colors.surface,p:`sm`,bdrs:`sm`,children:[(0,J.jsxs)(IU,{direction:`column`,gap:`md`,style:{flex:1},children:[(0,J.jsxs)(IU,{direction:`column`,gap:`xs`,children:[(0,J.jsx)(qU,{size:`sm`,fw:600,children:`Operators`}),(0,J.jsx)(IU,{direction:`column`,gap:4,children:Object.entries(v6).map(([e,t])=>(0,J.jsxs)(IU,{gap:`xs`,wrap:`nowrap`,children:[(0,J.jsx)(N0,{px:`xs`,size:`xs`,h:24,variant:`default`,justify:`center`,miw:48,onClick:()=>n(t.symbol),children:t.symbol}),(0,J.jsx)(qU,{size:`xs`,c:`dimmed`,style:{flex:1},children:t.label})]},e))})]}),(0,J.jsx)(FK,{}),(0,J.jsxs)(IU,{direction:`column`,gap:`xs`,children:[(0,J.jsx)(qU,{size:`sm`,fw:600,children:`Logic`}),(0,J.jsxs)(IU,{direction:`column`,gap:4,children:[(0,J.jsxs)(IU,{gap:`xs`,wrap:`nowrap`,children:[(0,J.jsx)(N0,{px:`xs`,size:`xs`,h:24,variant:`default`,justify:`center`,miw:48,onClick:()=>n(`&`),children:`&`}),(0,J.jsx)(qU,{size:`xs`,c:`dimmed`,children:`AND`})]}),(0,J.jsxs)(IU,{gap:`xs`,wrap:`nowrap`,children:[(0,J.jsx)(N0,{px:`xs`,size:`xs`,h:24,variant:`default`,justify:`center`,miw:48,onClick:()=>n(`|`),children:`|`}),(0,J.jsx)(qU,{size:`xs`,c:`dimmed`,children:`OR`})]})]})]})]}),t.length>0&&(0,J.jsx)(FK,{orientation:`vertical`}),t.length>0&&(0,J.jsxs)(IU,{direction:`column`,gap:`xs`,style:{flex:2},children:[(0,J.jsx)(qU,{size:`sm`,fw:600,children:`Fields`}),(0,J.jsx)(IU,{direction:`column`,gap:4,style:{maxHeight:300,overflowY:`auto`},children:t.map(e=>(0,J.jsxs)(IU,{gap:`xs`,wrap:`nowrap`,align:`flex-start`,children:[(0,J.jsx)(N0,{px:`xs`,size:`xs`,h:24,variant:`default`,justify:`end`,miw:120,onClick:()=>n(e.path),children:e.path}),(0,J.jsxs)(IU,{mt:3,direction:`column`,gap:2,style:{flex:1,minWidth:0},children:[(0,J.jsx)(qU,{size:`xs`,c:`dimmed`,lineClamp:1,children:e.description||e.type}),e.enum&&(0,J.jsx)(IU,{gap:0,wrap:`wrap`,children:e.enum.map(e=>(0,J.jsx)(N0,{px:`xs`,size:`xs`,h:24,onClick:()=>n(e),children:e},e))})]}),(0,J.jsx)(_G,{size:`xs`,variant:`light`,style:{flexShrink:0},children:e.type})]},e.path))})]})]})},r6=e=>{let{schema:t,value:n=``,onChange:r,placeholder:i=`Enter query or click for assistance...`,...a}=e,[o,s]=(0,q.useState)(!1),[c,l]=(0,q.useState)(n),u=(0,q.useRef)(null),d=t?_6(t):[],[f,p]=(0,q.useState)(null),m=e=>{try{I3(e.trim())}catch(e){return p(e.message),!1}return p(null),!0},h=e=>{l(e),m(e)&&r?.(e)},g=()=>{l(``),r?.(``),m(``)},_=e=>{let t=c?`${c}${e} `:`${e} `;l(t),m(t)&&r?.(t),setTimeout(()=>{u.current?.focus();let e=u.current?.value.length||0;u.current?.setSelectionRange(e,e)},0)};return _j({"form:change":e=>{e.id===u.current?.form?.id&&e.path===a[`data-path`]&&l(e.value??``)}},[]),(0,J.jsxs)(dV,{width:800,position:`bottom-start`,shadow:`md`,opened:o,onChange:s,closeOnClickOutside:!0,closeOnEscape:!0,transitionProps:{transition:`fade-up`,duration:200,timingFunction:`ease`},children:[(0,J.jsx)(dV.Target,{children:(0,J.jsx)(aZ,{ref:u,placeholder:i,value:c,onChange:e=>h(e.currentTarget.value),onFocus:()=>s(!0),leftSection:f?(0,J.jsx)(r$,{size:16}):(0,J.jsx)($Q,{size:16}),rightSection:c&&(0,J.jsx)(DV,{size:`sm`,variant:`subtle`,color:`gray`,onClick:g,children:(0,J.jsx)(S$,{size:14})}),...a})}),(0,J.jsx)(dV.Dropdown,{bg:`transparent`,p:`xs`,bd:`1px solid ${j0.colors.border}`,style:{backdropFilter:`blur(20px)`},children:(0,J.jsx)(n6,{fields:d,onInsert:_})})]})},i6=e=>{let t=bj(e.input),[n,r]=Sj(e.input),{inputProps:i,id:a,icon:o}=l2(e,t),s=e.input.schema&&`type`in e.input.schema&&e.input.schema.type===`array`,c=e.input.schema&&`type`in e.input.schema&&(e.input.schema.type===`integer`||e.input.schema.type===`number`),l=e.input.schema&&`type`in e.input.schema&&e.input.schema.type===`boolean`,u=e.input.schema&&`enum`in e.input.schema&&Array.isArray(e.input.schema.enum)?e.input.schema.enum:[],{data:d,loading:f,mode:p,search:m}=a6(e.loader,e.loaderThreshold??100,e.loaderDebounce??300,e.input.initialValue),[h,g]=(0,q.useState)([]),_=JSON.stringify(u);(0,q.useEffect)(()=>{!e.input?.props||e.loader||(l&&u.length===0?g([{value:`true`,label:`True`},{value:`false`,label:`False`}]):g(u))},[e.input,e.loader,_,l]);let v=e.loader?d:h;if(!e.input?.props)return null;let y=e=>e==null?e:c?Number(e):l?e===`true`:e;if(e.segmentedProps){let t=typeof e.segmentedProps==`object`?e.segmentedProps:{},a=t.data??v.slice(0,10);return(0,J.jsx)(AU.Wrapper,{...i,children:(0,J.jsx)(IU,{my:`calc(var(--mantine-spacing-xs) / 2)`,children:(0,J.jsx)(gX,{disabled:i.disabled,value:n==null?``:String(n),...t,onChange:e=>{r(y(e))},data:a})})})}let b={size:e.size,id:a,leftSection:f?(0,J.jsx)(yV,{color:`gray`,size:10}):o,data:v},x={...b,searchable:!0,rightSection:(0,J.jsx)(`span`,{})},S=p===`long`?{filter:({options:e})=>e,onSearchChange:m.run}:{};if(e.creatable&&(s||e.tagsInputProps)){let t=e.tagsInputProps??{};return(0,J.jsx)(iZ,{...i,...b,...S,value:Array.isArray(n)?n:[],onChange:e=>{r(e)},...t})}if(e.creatable){let t=e.autocompleteProps??{};return(0,J.jsx)(mG,{...i,...b,...S,value:n==null?``:String(n),onChange:e=>{r(y(e))},...t})}if(s||e.multiSelectProps){let t=typeof e.multiSelectProps==`object`?e.multiSelectProps:{};return(0,J.jsx)(CJ,{...i,...x,...S,value:Array.isArray(n)?n:[],onChange:e=>{r(e)},...t})}let C=typeof e.selectProps==`object`?e.selectProps:{};return p===`static`?(0,J.jsx)(vX,{...i,...x,value:n==null?null:String(n),onChange:e=>{r(y(e))},...C}):(0,J.jsx)(vX,{...i,...x,...S,value:n==null?null:String(n),onChange:e=>{r(y(e))},...C})},a6=(e,t,n,r)=>{let[i,a]=(0,q.useState)([]),[o,s]=(0,q.useState)(!1),[c,l]=(0,q.useState)(`static`),u=(0,q.useRef)(new Map);return NA({name:`select:loader:init`,runOnInit:!0,handler:async()=>{if(!e){l(`static`);return}s(!0);try{let n=await e(``),i=n.length<=t;if(l(i?`short`:`long`),u.current.set(``,n),a(n),!i&&r!=null&&String(r)!==``){let t=await e(``,[String(r)]);t.length>0&&a(e=>{let n=new Set(e.map(e=>typeof e==`string`?e:e.value)),r=t.filter(e=>{let t=typeof e==`string`?e:e.value;return!n.has(t)});return[...e,...r]})}}finally{s(!1)}}},[e,t]),{data:i,loading:o,mode:c,search:NA({debounce:n,handler:async t=>{if(!(!e||c!==`long`)){if(u.current.has(t)){a(u.current.get(t));return}s(!0);try{let n=await e(t);u.current.set(t,n),a(n)}finally{s(!1)}}}},[e,c,n])}},o6=e=>{let t=bj(e.input,[`error`]),[n,r]=Sj(e.input);if(!e.input?.props)return null;let{inputProps:i,id:a,icon:o,format:s,schema:c}=l2(e,t),l={...e,...c.$control};if(l.query)return(0,J.jsx)(r6,{...i,schema:l.query,value:n,onChange:e=>{r(e)}});if(l.custom){let e=l.custom;return(0,J.jsx)(AU.Wrapper,{...i,children:(0,J.jsx)(IU,{flex:1,mt:`calc(var(--mantine-spacing-xs) / 2)`,children:(0,J.jsx)(e,{value:n,onChange:e=>{r(e)}})})})}let u=l.input.schema&&`type`in l.input.schema&&l.input.schema.type===`object`&&`properties`in l.input.schema;if(l.object||u){let e=typeof l.object==`object`?l.object:{};return(0,J.jsx)(F3,{input:l.input,label:l.label,description:l.description,...e})}let d=l.input.schema&&`type`in l.input.schema&&l.input.schema.type===`array`,f=d&&`items`in l.input.schema&&l.input.schema.items&&typeof l.input.schema.items==`object`&&`properties`in l.input.schema.items;if(l.array||f){let e=typeof l.array==`object`?l.array:{};return(0,J.jsx)(p2,{input:l.input,label:l.label,description:l.description,...e})}if(l.number||!l.select&&l.input.schema&&`type`in l.input.schema&&(l.input.schema.type===`number`||l.input.schema.type===`integer`)){let e=typeof l.number==`object`?l.number:{};return l.slider&&(e.sliderProps??={}),(0,J.jsx)(P3,{size:l.size,input:l.input,label:l.label,description:l.description,icon:o,...e})}if(l.file){let e=typeof l.file==`object`?l.file:{};return(0,J.jsx)(HK,{...i,size:l.size,id:a,leftSection:o,onChange:e=>r(e),...e})}if(l.color||s===`color`){let e=typeof l.color==`object`?l.color:{};return(0,J.jsx)(DK,{...i,size:l.size,id:a,leftSection:o,value:n??``,onChange:e=>r(e),...e})}if(l.input.schema&&`enum`in l.input.schema&&l.input.schema.enum||d&&!f||l.select){let e=typeof l.select==`object`?l.select:{};return l.segmented&&(e.segmentedProps??={}),(0,J.jsx)(i6,{size:l.size,input:l.input,label:l.label,description:l.description,icon:o,...e})}if(l.input.schema&&`type`in l.input.schema&&l.input.schema.type===`boolean`){if(l.switch){let e=typeof l.switch==`object`?l.switch:{};return(0,J.jsx)($X,{...i,size:l.size,id:a,color:`blue`,checked:!!n,onChange:e=>{r(e.currentTarget.checked)},...e})}let e={input:l.input,selectProps:{data:[{value:`true`,label:`Yes`},{value:`false`,label:`No`}]}};return(0,J.jsx)(i6,{size:l.size,label:l.label,description:l.description,icon:o,...e})}if(l.password||l.input.props.name?.includes(`password`)){let e=typeof l.password==`object`?l.password:{};return(0,J.jsx)(UY,{...i,size:l.size,id:a,leftSection:o,value:n??``,onChange:e=>r(e.target.value),...e})}if(l.area){let e=typeof l.area==`object`?l.area:{};return(0,J.jsx)(Cq,{...i,size:l.size,id:a,leftSection:o,value:n??``,onChange:e=>r(e.target.value),...e})}if(l.date||l.datetime||l.time||s===`date`||s===`date-time`||s===`time`)return(0,J.jsx)(N3,{size:l.size,input:l.input,label:l.label,description:l.description,icon:o,date:l.date,datetime:l.datetime,time:l.time});let p=typeof l.text==`object`?l.text:{},m=()=>{switch(s){case`email`:return`email`;case`url`:case`uri`:return`url`;case`tel`:case`phone`:return`tel`;default:return l.input.props.type??`text`}};return(0,J.jsx)(aZ,{...i,size:l.size,id:a,leftSection:o,type:m(),value:n??``,onChange:e=>r(e.target.value),...p})},s6=e=>{let{form:t,columns:n=3,children:r,controlProps:i,fieldControlProps:a,skipFormElement:o=!1,skipSubmitButton:s=!1,submitButtonProps:c,fill:l=!0,size:u}=e,{dirty:d}=bj(t,[`dirty`]),f=e.schema||t.options.schema;if(!f?.properties)return null;let p=Object.keys(f.properties),m=typeof n==`number`?{xs:12,sm:6,lg:12/n}:{base:n.base?12/n.base:void 0,xs:n.xs?12/n.xs:12,sm:n.sm?12/n.sm:6,md:n.md?12/n.md:void 0,lg:n.lg?12/n.lg:4,xl:n.xl?12/n.xl:void 0},h=()=>r?(0,J.jsx)(J.Fragment,{children:r(t.input)}):(0,J.jsx)(nq,{children:p.map(e=>{let n=t.input[e],r=f.properties[e];if(!n||!r)return null;let o=r&&`type`in r&&r.type===`object`,s=r&&`type`in r&&r.type===`array`&&`items`in r&&r.items&&`properties`in r.items,c=o||s?12:m,l={...i,...a?.[e]};return u&&(l.size=u),(0,J.jsx)(nq.Col,{span:c,children:(0,J.jsx)(o6,{input:n,...l})},e)})}),g=(0,J.jsxs)(IU,{direction:`column`,gap:`sm`,flex:l?1:void 0,...e.flexProps,children:[(0,J.jsx)(IU,{direction:`column`,gap:`sm`,flex:1,children:h()}),!s&&(0,J.jsx)(IG,{w:`100%`,withBorder:!0,children:(0,J.jsxs)(IU,{gap:`sm`,flex:1,children:[(0,J.jsx)(IU,{}),(0,J.jsx)(IU,{flex:1}),(0,J.jsxs)(IU,{gap:`sm`,children:[(0,J.jsx)(N0,{variant:`subtle`,type:`reset`,disabled:!d,children:`Reset`}),(0,J.jsx)(N0,{intent:`primary`,form:t,disabled:!d,...c,children:c?.children??`Submit`})]})]})})]});return o?g:(0,J.jsx)(IU,{component:`form`,flex:l?1:void 0,...t.props,...e.flexProps,children:g})},c6=e=>{let[t,n]=(0,q.useState)(!1),r=(0,q.useCallback)(t=>{t.stopPropagation(),navigator.clipboard.writeText(e.value),n(!0),setTimeout(()=>n(!1),1500)},[e.value]);return(0,J.jsx)(DV,{size:e.iconSize+4,variant:`transparent`,c:t?`green`:`dimmed`,onClick:r,className:`alepha-json-viewer-copy`,children:t?(0,J.jsx)(KQ,{size:e.iconSize}):(0,J.jsx)(ZQ,{size:e.iconSize})})},l6={xs:{icon:14,levelOffset:16},sm:{icon:16,levelOffset:20},md:{icon:18,levelOffset:24},lg:{icon:20,levelOffset:28},xl:{icon:22,levelOffset:32}},u6={root:{fontFamily:`var(--mantine-font-family-monospace)`},chevron:{flexShrink:0,color:`var(--mantine-color-dimmed)`},key:{color:`var(--mantine-color-cyan-text)`,fontWeight:500},colon:{color:`var(--mantine-color-dimmed)`},string:{color:`var(--mantine-color-teal-text)`},number:{color:`var(--mantine-color-blue-text)`},boolean:{color:`var(--mantine-color-violet-text)`},null:{color:`var(--mantine-color-dimmed)`,fontStyle:`italic`},preview:{color:`var(--mantine-color-dimmed)`}},d6=e=>e===null?`null`:e===void 0?`undefined`:Array.isArray(e)?`array`:typeof e,f6=e=>{let{nodeValue:t,nodeKey:n,path:r,isArrayItem:i}=e.node,a=d6(t),o=a===`object`||a===`array`,s=()=>{if(!o)return null;let n=(a===`array`?t:Object.keys(t)).length,r=a===`array`?`item`:`key`;return e.expanded?null:(0,J.jsx)(qU,{fs:`italic`,component:`span`,size:e.size,style:u6.preview,children:n===0?a===`array`?`[]`:`{}`:a===`array`?`[ ${n} ${n===1?r:`${r}s`} ]`:`{ ${n} ${n===1?r:`${r}s`} }`})},c=()=>o?JSON.stringify(t,null,2):String(t??``);return(0,J.jsxs)(IU,{gap:6,wrap:`nowrap`,...e.elementProps,className:`alepha-json-viewer-row ${e.elementProps.className||``}`,children:[e.hasChildren?e.expanded?(0,J.jsx)(qQ,{size:e.config.icon,style:u6.chevron}):(0,J.jsx)(JQ,{size:e.config.icon,style:u6.chevron}):(0,J.jsx)(`span`,{style:{width:e.config.icon,flexShrink:0}}),n!==void 0&&!i&&(0,J.jsxs)(qU,{component:`span`,size:e.size,children:[(0,J.jsx)(`span`,{style:u6.key,children:e.showQuotes?`"${n}"`:n}),(0,J.jsx)(`span`,{style:u6.colon,children:`:`})]}),n!==void 0&&i&&(0,J.jsxs)(qU,{component:`span`,size:e.size,children:[(0,J.jsx)(`span`,{style:u6.key,children:n}),(0,J.jsx)(`span`,{style:u6.colon,children:`:`})]}),e.hasChildren?s():o?a===`array`?(0,J.jsx)(qU,{component:`span`,size:e.size,style:u6.preview,children:`[]`}):(0,J.jsx)(qU,{component:`span`,size:e.size,style:u6.preview,children:`{}`}):e.renderValue(t,n,r),e.showCopyButton&&(0,J.jsx)(c6,{value:c(),iconSize:e.config.icon})]})},p6=e=>{let{data:t,defaultExpandedDepth:n=2,maxDepth:r=10,size:i=`sm`,showQuotes:a=!1,showCopyButton:o=!0,formatValue:s}=e,c=l6[i]||l6.sm,l=(0,q.useMemo)(()=>{let e=d6(t);if(e===`object`||e===`array`){let n=(e===`array`?t.map((e,t)=>[String(t),e]):Object.entries(t)).map(([t,n])=>m6(n,[],t,e===`array`,r)).filter(e=>e!==null);return[{value:`root`,label:``,nodeValue:t,nodeKey:void 0,path:[],isArrayItem:!1,isRoot:!0,children:n.length>0?n:void 0}]}let n=m6(t,[],void 0,!1,r);return n?[n]:[]},[t,r]),u=_Z({initialExpandedState:(0,q.useMemo)(()=>n===0?{}:n===1/0?hZ(l,`*`):hZ(l,h6(l,n+1)),[l,n])}),d=(0,q.useCallback)((e,t,n)=>{let r=s?.(t,e,n);if(r!==void 0)return(0,J.jsx)(qU,{component:`span`,size:i,style:u6.string,className:`alepha-json-viewer-value`,title:String(e),children:r});let a=d6(e);switch(a){case`string`:return(0,J.jsxs)(qU,{style:u6.string,component:`span`,size:i,className:`alepha-json-viewer-value`,title:e,children:[`"`,e,`"`]});case`number`:return(0,J.jsx)(qU,{component:`span`,size:i,style:u6.number,children:e});case`boolean`:return(0,J.jsx)(qU,{component:`span`,size:i,style:u6.boolean,children:String(e)});case`null`:case`undefined`:return(0,J.jsx)(qU,{component:`span`,size:i,style:u6.null,children:a});default:return(0,J.jsx)(qU,{component:`span`,size:i,children:String(e)})}},[s,a,i]),f=(0,q.useCallback)(({node:e,expanded:t,hasChildren:n,elementProps:r})=>(0,J.jsx)(f6,{node:e,expanded:t,hasChildren:n,elementProps:r,size:i,config:c,showQuotes:a,showCopyButton:o,renderValue:d}),[c,d,o,a,i]);return l.length===0?(0,J.jsx)(qU,{size:i,style:u6.null,children:t===null?`null`:t===void 0?`undefined`:`{}`}):(0,J.jsx)(wZ,{data:l,tree:u,levelOffset:c.levelOffset,expandOnClick:!0,renderNode:f,styles:{root:u6.root}})},m6=(e,t=[],n,r=!1,i=10)=>{let a=n===void 0?t:[...t,n],o=a.length>0?a.join(`.`):`root`;if(a.length>i)return{value:o,label:n??``,nodeValue:e,nodeKey:n,path:a,isArrayItem:r};let s=d6(e);if(s===`object`||s===`array`){let t=(s===`array`?e.map((e,t)=>[String(t),e]):Object.entries(e)).map(([e,t])=>m6(t,a,e,s===`array`,i)).filter(e=>e!==null);return{value:o,label:n??``,nodeValue:e,nodeKey:n,path:a,isArrayItem:r,children:t.length>0?t:void 0}}return{value:o,label:n??``,nodeValue:e,nodeKey:n,path:a,isArrayItem:r}},h6=(e,t,n=0)=>{if(n>=t)return[];let r=[];for(let i of e)i.children&&(r.push(i.value),r.push(...h6(i.children,t,n+1)));return r},g6=(e={})=>{let{alepha:t}=y();return e.themes&&t.store.set(jZ,e.themes),t.inject(c1)};function _6(e,t=``){let n=[];if(!e||typeof e!=`object`)return n;let r=`properties`in e?e.properties:e;if(!r||typeof r!=`object`)return n;for(let[e,i]of Object.entries(r)){if(typeof i!=`object`||!i)continue;let r=i,a=t?`${t}.${e}`:e,o=`format`in r?r.format:void 0,s=`type`in r?r.type:`object`;o===`date-time`?s=`datetime`:o===`date`?s=`date`:o===`time`?s=`time`:o===`duration`&&(s=`duration`);let c={name:e,path:a,type:s,format:o,description:`description`in r?r.description:void 0};`enum`in r&&r.enum&&(c.enum=r.enum,c.type=`enum`),`type`in r&&r.type===`object`&&`properties`in r&&typeof r.properties==`object`&&(c.nested=_6(r.properties,a)),n.push(c),c.nested&&n.push(...c.nested)}return n}var v6={eq:{symbol:`=`,label:`equals`,example:`name=John`},ne:{symbol:`!=`,label:`not equals`,example:`status!=archived`},gt:{symbol:`>`,label:`greater than`,example:`age>18`},gte:{symbol:`>=`,label:`greater or equal`,example:`age>=18`},lt:{symbol:`<`,label:`less than`,example:`age<65`},lte:{symbol:`<=`,label:`less or equal`,example:`age<=65`},null:{symbol:`=null`,label:`is null`,example:`deletedAt=null`},notNull:{symbol:`!=null`,label:`is not null`,example:`email!=null`},in:{symbol:`[...]`,label:`in array`,example:`status=[active,pending]`}},y6=e=>{let{type:t,format:n,name:r,isEnum:i,isArray:a,size:o=`xs`}=e,s=j0.sizes.icon[o]-4;if(n)switch(n){case`email`:return(0,J.jsx)(d$,{size:s});case`url`:case`uri`:return(0,J.jsx)(l$,{size:s});case`tel`:case`phone`:return(0,J.jsx)(m$,{size:s});case`date`:return(0,J.jsx)(GQ,{size:s});case`date-time`:return(0,J.jsx)(GQ,{size:s});case`time`:return(0,J.jsx)(YQ,{size:s});case`color`:return(0,J.jsx)(XQ,{size:s});case`uuid`:return(0,J.jsx)(i$,{size:s})}if(r){let e=r.toLowerCase();if(e.includes(`password`)||e.includes(`secret`))return(0,J.jsx)(i$,{size:s});if(e.includes(`email`)||e.includes(`mail`))return(0,J.jsx)(d$,{size:s});if(e.includes(`url`)||e.includes(`link`))return(0,J.jsx)(l$,{size:s});if(e.includes(`phone`)||e.includes(`tel`))return(0,J.jsx)(m$,{size:s});if(e.includes(`color`))return(0,J.jsx)(p$,{size:s});if(e.includes(`file`)||e.includes(`upload`))return(0,J.jsx)(QQ,{size:s});if(e.includes(`date`))return(0,J.jsx)(GQ,{size:s});if(e.includes(`time`))return(0,J.jsx)(YQ,{size:s})}if(i||a)return(0,J.jsx)(_$,{size:s});if(t)switch(t){case`boolean`:return(0,J.jsx)(b$,{size:s});case`number`:case`integer`:return(0,J.jsx)(t$,{size:s});case`array`:return(0,J.jsx)(u$,{size:s});case`string`:return(0,J.jsx)(c$,{size:s})}return(0,J.jsx)(WQ,{size:s})},b6=e=>e.replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/_/g,` `).replace(/\b\w/g,e=>e.toUpperCase()),x6=e=>{let t=e.split(`/`).filter(e=>e&&!/^\d+$/.test(e));return b6(t[t.length-1]||e.replaceAll(`/`,``))};C({name:`alepha.ui`,services:[KZ,C$,MZ,c1],register:e=>{e.with(zj),e.with(jj),e.with(Tj),e.with(MZ),e.with(KZ),e.with(C$)}});export{yV as $,VQ as A,fA as At,nq as B,i$ as C,sM as Ct,qQ as D,oj as Dt,JQ as E,wj as Et,vX as F,C as Ft,aG as G,IG as H,gX as I,o as It,qU as J,rG as K,fX as L,l as Lt,aZ as M,aA as Mt,$X as N,Gk as Nt,KQ as O,NA as Ot,DX as P,K as Pt,MV as Q,RY as R,l$ as S,fM as St,YQ as T,X as Tt,_G as U,FK as V,oG as W,NU as X,IU as Y,AU as Z,x$ as _,kN as _t,$0 as a,Q as at,d$ as b,JM as bt,H0 as c,bF as ct,a1 as d,EP as dt,DB as et,n1 as f,gP as ft,S$ as g,HN as gt,T$ as h,sP as ht,c2 as i,$ as it,EZ as j,sA as jt,HQ as k,MA as kt,N0 as l,Z as lt,A$ as m,cP as mt,p6 as n,vB as nt,G0 as o,QF as ot,H$ as p,mP as pt,tG as q,s6 as r,sI as rt,W0 as s,wF as st,g6 as t,SB as tt,j0 as u,UP as ut,g$ as v,tN as vt,ZQ as w,nM as wt,u$ as x,mM as xt,h$ as y,QM as yt,Cq as z};