@citizenplane/pimp 8.11.3 → 8.13.0

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 (173) hide show
  1. package/README.md +0 -2
  2. package/dist/assets/BaseInputLabel-B6HBeOYW.css +1 -0
  3. package/dist/assets/BaseInputLabel-BKfOnmKd.js +1 -0
  4. package/dist/assets/BaseInputLabel.stories-B3jMVrza.js +28 -0
  5. package/dist/assets/Color-YHDXOIA2-CfioBzZb.js +1 -0
  6. package/dist/assets/Colors-mWZwWrlN.js +1 -0
  7. package/dist/assets/CpAlert-6hd7PZeZ.js +1 -0
  8. package/dist/assets/CpAlert-BW1Zf1Km.css +1 -0
  9. package/dist/assets/CpAlert.stories-CcK6sLCO.js +58 -0
  10. package/dist/assets/CpBadge-BRRUYYEk.js +1 -0
  11. package/dist/assets/CpBadge-CE420vX2.css +1 -0
  12. package/dist/assets/CpBadge.stories-Btggeh1U.js +170 -0
  13. package/dist/assets/CpButton-DQb7zTje.js +1 -0
  14. package/dist/assets/CpButton-gbl9KLuG.css +1 -0
  15. package/dist/assets/CpButton.stories-Chy_2ILm.js +86 -0
  16. package/dist/assets/CpCheckbox-Dalwqglu.js +1 -0
  17. package/dist/assets/CpCheckbox-DdQW6Gbc.css +1 -0
  18. package/dist/assets/CpCheckbox.stories-BEtAkjE-.js +167 -0
  19. package/dist/assets/CpDate-BdnXxnGQ.css +1 -0
  20. package/dist/assets/CpDate-DdtWXX2Q.js +3 -0
  21. package/dist/assets/CpDate.stories-C2Jg2QqC.js +59 -0
  22. package/dist/assets/CpDatepicker-DlzMF4b8.js +5 -0
  23. package/dist/assets/CpDatepicker-DqugfF5T.css +1 -0
  24. package/dist/assets/CpDatepicker.stories-CvOQvZYr.js +83 -0
  25. package/dist/assets/CpDialog-BTJusbSJ.js +1 -0
  26. package/dist/assets/CpDialog-BeuM9Ffk.css +1 -0
  27. package/dist/assets/CpDialog.stories-jA8uhNJR.js +43 -0
  28. package/dist/assets/CpHeading-BfoX1SIY.js +1 -0
  29. package/dist/assets/CpHeading-DgViCnDE.css +1 -0
  30. package/dist/assets/CpHeading.stories-DYb8vPG0.js +85 -0
  31. package/dist/assets/CpIcon-CdMV7BxY.css +1 -0
  32. package/dist/assets/CpIcon-DjtGpusx.js +5 -0
  33. package/dist/assets/CpIcon.stories-Cavk2BnC.js +47 -0
  34. package/dist/assets/CpInput-BT29xZan.js +1 -0
  35. package/dist/assets/CpInput-CAegPnB6.css +1 -0
  36. package/dist/assets/CpInput.stories-BbBe4bFT.js +98 -0
  37. package/dist/assets/CpLoader-B--Vqrhj.js +1 -0
  38. package/dist/assets/CpLoader.stories-CZ0hlfa2.js +10 -0
  39. package/dist/assets/CpRadio-C7OtLwPR.js +1 -0
  40. package/dist/assets/CpRadio-DiUdGJPg.css +1 -0
  41. package/dist/assets/CpRadio.stories-DPcn2bvJ.js +132 -0
  42. package/dist/assets/CpSelect-DlLk_-bg.js +1 -0
  43. package/dist/assets/CpSelect-HpT9AKcz.css +1 -0
  44. package/dist/assets/CpSelect.stories-C90Kd5cu.js +85 -0
  45. package/dist/assets/CpSelectMenu-Bpz33Tbp.js +1 -0
  46. package/dist/assets/CpSelectMenu-Dw4sbiEj.css +1 -0
  47. package/dist/assets/CpSelectMenu.stories-Bw2sNo0F.js +104 -0
  48. package/dist/assets/CpSwitch-CIWoB1sY.css +1 -0
  49. package/dist/assets/CpSwitch-CeGY7EL9.js +1 -0
  50. package/dist/assets/CpSwitch.stories-DbepH0R0.js +132 -0
  51. package/dist/assets/CpTable-BN6Amfsc.css +1 -0
  52. package/dist/assets/CpTable-RA2YDd8h.js +1 -0
  53. package/dist/assets/CpTable.stories-Dgc6tAkl.js +151 -0
  54. package/dist/assets/CpTableEmptyState-DLgi2hhT.css +1 -0
  55. package/dist/assets/CpTableEmptyState-TCjommO_.js +1 -0
  56. package/dist/assets/CpTableEmptyState.stories-C2oOfeda.js +20 -0
  57. package/dist/assets/CpTextarea-CzC-Bjsy.css +1 -0
  58. package/dist/assets/CpTextarea-HUf2FbPC.js +1 -0
  59. package/dist/assets/CpTextarea.stories-_17UyFSg.js +64 -0
  60. package/dist/assets/CpToaster-BXpKEwda.css +1 -0
  61. package/dist/assets/CpToaster-D9ITJUky.js +1 -0
  62. package/dist/assets/CpToaster.stories-BhEsau9e.js +124 -0
  63. package/dist/assets/CpTooltip-BIIOHaoi.css +1 -0
  64. package/dist/assets/CpTooltip-CD0Q4ym2.js +1 -0
  65. package/dist/assets/CpTooltip.stories-acOxur2H.js +121 -0
  66. package/dist/assets/DocsRenderer-CFRXHY34-Do1gGJEp.js +623 -0
  67. package/dist/assets/Intent-UfUixXOL.js +1 -0
  68. package/dist/assets/ToggleColors-CSr2zujL.js +1 -0
  69. package/dist/assets/TransitionExpand-BHMSqajW.css +1 -0
  70. package/dist/assets/TransitionExpand-BLDnMZa8.js +1 -0
  71. package/dist/assets/TransitionExpand.stories-5x0MQdG_.js +121 -0
  72. package/dist/assets/_commonjsHelpers-CqkleIqs.js +1 -0
  73. package/dist/assets/_plugin-vue_export-helper-DlAUqK2U.js +1 -0
  74. package/dist/assets/anime.esm-RriTVqCw.js +8 -0
  75. package/dist/assets/entry-preview-CE4fSG5C.js +1 -0
  76. package/dist/assets/entry-preview-docs-DMfJ0ifx.js +16 -0
  77. package/dist/assets/iframe-DLKLJnYS.js +211 -0
  78. package/dist/assets/index-Bx-go_-4.js +8 -0
  79. package/dist/assets/index-CtrtR6PF.js +1 -0
  80. package/dist/assets/index-DCv8Njl6.js +1 -0
  81. package/dist/assets/index-DrFu-skq.js +6 -0
  82. package/dist/assets/preview-B8lJiyuQ.js +34 -0
  83. package/dist/assets/preview-BBWR9nbA.js +1 -0
  84. package/dist/assets/preview-BWzBA1C2.js +396 -0
  85. package/dist/assets/preview-CHl-kSbv.js +2 -0
  86. package/dist/assets/preview-CIuMKJn5.js +240 -0
  87. package/dist/assets/preview-CvbIS5ZJ.js +1 -0
  88. package/dist/assets/preview-D2UkcbT2.js +3 -0
  89. package/dist/assets/preview-DD_OYowb.js +1 -0
  90. package/dist/assets/preview-DGUiP6tS.js +7 -0
  91. package/dist/assets/preview-OgCpecWL.css +1 -0
  92. package/dist/assets/vue.esm-bundler-DmHyoj4Y.js +36 -0
  93. package/dist/favicon.svg +1 -0
  94. package/dist/iframe.html +666 -0
  95. package/dist/index.html +177 -0
  96. package/dist/index.json +1 -0
  97. package/dist/nunito-sans-bold-italic.woff2 +0 -0
  98. package/dist/nunito-sans-bold.woff2 +0 -0
  99. package/dist/nunito-sans-italic.woff2 +0 -0
  100. package/dist/nunito-sans-regular.woff2 +0 -0
  101. package/dist/project.json +1 -0
  102. package/dist/sb-addons/chromatic-com-storybook-9/manager-bundle.js +331 -0
  103. package/dist/sb-addons/chromatic-com-storybook-9/manager-bundle.js.LEGAL.txt +51 -0
  104. package/dist/sb-addons/essentials-actions-2/manager-bundle.js +3 -0
  105. package/dist/sb-addons/essentials-backgrounds-4/manager-bundle.js +12 -0
  106. package/dist/sb-addons/essentials-controls-1/manager-bundle.js +402 -0
  107. package/dist/sb-addons/essentials-docs-3/manager-bundle.js +242 -0
  108. package/dist/sb-addons/essentials-measure-7/manager-bundle.js +3 -0
  109. package/dist/sb-addons/essentials-outline-8/manager-bundle.js +3 -0
  110. package/dist/sb-addons/essentials-toolbars-6/manager-bundle.js +3 -0
  111. package/dist/sb-addons/essentials-viewport-5/manager-bundle.js +3 -0
  112. package/dist/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +3 -0
  113. package/dist/sb-addons/storybook-experimental-addon-test-10/manager-bundle.js +223 -0
  114. package/dist/sb-common-assets/favicon.svg +1 -0
  115. package/dist/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  116. package/dist/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  117. package/dist/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  118. package/dist/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  119. package/dist/sb-manager/globals-module-info.js +1052 -0
  120. package/dist/sb-manager/globals-runtime.js +42127 -0
  121. package/dist/sb-manager/globals.js +48 -0
  122. package/dist/sb-manager/runtime.js +12048 -0
  123. package/package.json +24 -5
  124. package/src/README.md +0 -25
  125. package/src/assets/styles/base/_base.scss +1 -5
  126. package/src/assets/styles/utilities/_index.scss +19 -0
  127. package/src/components/core/BaseInputLabel.vue +0 -1
  128. package/src/components/date-pickers/CpDate.vue +8 -5
  129. package/src/components/inputs/CpInput.vue +5 -16
  130. package/src/components/inputs/CpTextarea.vue +4 -6
  131. package/src/components/selects/CpSelect.vue +5 -5
  132. package/src/stories/BaseInputLabel.stories.ts +35 -0
  133. package/src/stories/CpAlert.stories.ts +90 -0
  134. package/src/stories/CpBadge.stories.ts +158 -0
  135. package/src/stories/CpButton.stories.ts +134 -0
  136. package/src/stories/CpCheckbox.stories.ts +184 -0
  137. package/src/stories/CpDate.stories.ts +110 -0
  138. package/src/stories/CpDatepicker.stories.ts +162 -0
  139. package/src/stories/CpDialog.stories.ts +53 -0
  140. package/src/stories/CpHeading.stories.ts +77 -0
  141. package/src/stories/CpIcon.stories.ts +79 -0
  142. package/src/stories/CpInput.stories.ts +155 -0
  143. package/src/stories/CpLoader.stories.ts +29 -0
  144. package/src/stories/CpRadio.stories.ts +139 -0
  145. package/src/stories/CpSelect.stories.ts +147 -0
  146. package/src/stories/CpSelectMenu.stories.ts +132 -0
  147. package/src/stories/CpSwitch.stories.ts +137 -0
  148. package/src/stories/CpTable.stories.ts +192 -0
  149. package/src/stories/CpTableEmptyState.stories.ts +34 -0
  150. package/src/stories/CpTextarea.stories.ts +112 -0
  151. package/src/stories/CpToaster.stories.ts +147 -0
  152. package/src/stories/CpTooltip.stories.ts +101 -0
  153. package/src/stories/TransitionExpand.stories.ts +85 -0
  154. package/vitest.workspace.js +31 -0
  155. package/dist/pimp.es.js +0 -14987
  156. package/dist/pimp.umd.js +0 -12
  157. package/dist/style.css +0 -1
  158. package/src/App.vue +0 -110
  159. package/src/components/core/playground-sections/SectionAtomicElements.vue +0 -83
  160. package/src/components/core/playground-sections/SectionButtons.vue +0 -142
  161. package/src/components/core/playground-sections/SectionContainer.vue +0 -50
  162. package/src/components/core/playground-sections/SectionDatePickers.vue +0 -160
  163. package/src/components/core/playground-sections/SectionDialog.vue +0 -47
  164. package/src/components/core/playground-sections/SectionFeedbackIndicators.vue +0 -47
  165. package/src/components/core/playground-sections/SectionInputs.vue +0 -46
  166. package/src/components/core/playground-sections/SectionListsAndTables.vue +0 -268
  167. package/src/components/core/playground-sections/SectionSelectMenus.vue +0 -98
  168. package/src/components/core/playground-sections/SectionSelects.vue +0 -120
  169. package/src/components/core/playground-sections/SectionSimpleInputs.vue +0 -305
  170. package/src/components/core/playground-sections/SectionToasters.vue +0 -68
  171. package/src/components/core/playground-sections/SectionToggles.vue +0 -158
  172. package/src/components/core/playground-sections/SectionTypography.vue +0 -40
  173. package/src/main.js +0 -15
@@ -0,0 +1,8 @@
1
+ var B={exports:{}},En=B.exports,Me;function Pn(){return Me||(Me=1,function(n,a){(function(o,i){i(a)})(En,function(o){function i(e){return e.text!==void 0&&e.text!==""?`'${e.type}' with value '${e.text}'`:`'${e.type}'`}class p extends Error{constructor(t){super(`No parslet found for token: ${i(t)}`),this.token=t,Object.setPrototypeOf(this,p.prototype)}getToken(){return this.token}}class u extends Error{constructor(t){super(`The parsing ended early. The next token was: ${i(t)}`),this.token=t,Object.setPrototypeOf(this,u.prototype)}getToken(){return this.token}}class y extends Error{constructor(t,r){let s=`Unexpected type: '${t.type}'.`;r!==void 0&&(s+=` Message: ${r}`),super(s),Object.setPrototypeOf(this,y.prototype)}}function m(e){return t=>t.startsWith(e)?{type:e,text:e}:null}function h(e){let t=0,r;const s=e[0];let c=!1;if(s!=="'"&&s!=='"')return null;for(;t<e.length;){if(t++,r=e[t],!c&&r===s){t++;break}c=!c&&r==="\\"}if(r!==s)throw new Error("Unterminated String");return e.slice(0,t)}const E=new RegExp("[$_\\p{ID_Start}]|\\\\u\\p{Hex_Digit}{4}|\\\\u\\{0*(?:\\p{Hex_Digit}{1,5}|10\\p{Hex_Digit}{4})\\}","u"),N=new RegExp("[$\\-\\p{ID_Continue}\\u200C\\u200D]|\\\\u\\p{Hex_Digit}{4}|\\\\u\\{0*(?:\\p{Hex_Digit}{1,5}|10\\p{Hex_Digit}{4})\\}","u");function oe(e){let t=e[0];if(!E.test(t))return null;let r=1;do{if(t=e[r],!N.test(t))break;r++}while(r<e.length);return e.slice(0,r)}const D=/^(NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity))/;function X(e){var t,r;return(r=(t=D.exec(e))===null||t===void 0?void 0:t[0])!==null&&r!==void 0?r:null}const Q=e=>{const t=oe(e);return t==null?null:{type:"Identifier",text:t}};function P(e){return t=>{if(!t.startsWith(e))return null;const r=t[e.length];return r!==void 0&&N.test(r)?null:{type:e,text:e}}}const se=e=>{const t=h(e);return t==null?null:{type:"StringValue",text:t}},Vt=e=>e.length>0?null:{type:"EOF",text:""},Dt=e=>{const t=X(e);return t===null?null:{type:"Number",text:t}},Kt=[Vt,m("=>"),m("("),m(")"),m("{"),m("}"),m("["),m("]"),m("|"),m("&"),m("<"),m(">"),m(","),m(";"),m("*"),m("?"),m("!"),m("="),m(":"),m("..."),m("."),m("#"),m("~"),m("/"),m("@"),P("undefined"),P("null"),P("function"),P("this"),P("new"),P("module"),P("event"),P("external"),P("typeof"),P("keyof"),P("readonly"),P("import"),P("is"),P("in"),P("asserts"),Dt,Q,se],$t=/^\s*\n\s*/;class K{static create(t){const r=this.read(t);t=r.text;const s=this.read(t);return t=s.text,new K(t,void 0,r.token,s.token)}constructor(t,r,s,c){this.text="",this.text=t,this.previous=r,this.current=s,this.next=c}static read(t,r=!1){r=r||$t.test(t),t=t.trim();for(const s of Kt){const c=s(t);if(c!==null){const d=Object.assign(Object.assign({},c),{startOfLine:r});return t=t.slice(d.text.length),{text:t,token:d}}}throw new Error("Unexpected Token "+t)}advance(){const t=K.read(this.text);return new K(t.text,this.current,this.next,t.token)}}function w(e){if(e===void 0)throw new Error("Unexpected undefined");if(e.type==="JsdocTypeKeyValue"||e.type==="JsdocTypeParameterList"||e.type==="JsdocTypeProperty"||e.type==="JsdocTypeReadonlyProperty"||e.type==="JsdocTypeObjectField"||e.type==="JsdocTypeJsdocObjectField"||e.type==="JsdocTypeIndexSignature"||e.type==="JsdocTypeMappedType")throw new y(e);return e}function ie(e){return e.type==="JsdocTypeKeyValue"?H(e):w(e)}function qt(e){return e.type==="JsdocTypeName"?e:H(e)}function H(e){if(e.type!=="JsdocTypeKeyValue")throw new y(e);return e}function Mt(e){var t;if(e.type==="JsdocTypeVariadic"){if(((t=e.element)===null||t===void 0?void 0:t.type)==="JsdocTypeName")return e;throw new y(e)}if(e.type!=="JsdocTypeNumber"&&e.type!=="JsdocTypeName")throw new y(e);return e}function le(e){return e.type==="JsdocTypeIndexSignature"||e.type==="JsdocTypeMappedType"}var f;(function(e){e[e.ALL=0]="ALL",e[e.PARAMETER_LIST=1]="PARAMETER_LIST",e[e.OBJECT=2]="OBJECT",e[e.KEY_VALUE=3]="KEY_VALUE",e[e.INDEX_BRACKETS=4]="INDEX_BRACKETS",e[e.UNION=5]="UNION",e[e.INTERSECTION=6]="INTERSECTION",e[e.PREFIX=7]="PREFIX",e[e.INFIX=8]="INFIX",e[e.TUPLE=9]="TUPLE",e[e.SYMBOL=10]="SYMBOL",e[e.OPTIONAL=11]="OPTIONAL",e[e.NULLABLE=12]="NULLABLE",e[e.KEY_OF_TYPE_OF=13]="KEY_OF_TYPE_OF",e[e.FUNCTION=14]="FUNCTION",e[e.ARROW=15]="ARROW",e[e.ARRAY_BRACKETS=16]="ARRAY_BRACKETS",e[e.GENERIC=17]="GENERIC",e[e.NAME_PATH=18]="NAME_PATH",e[e.PARENTHESIS=19]="PARENTHESIS",e[e.SPECIAL_TYPES=20]="SPECIAL_TYPES"})(f||(f={}));class U{constructor(t,r,s){this.grammar=t,typeof r=="string"?this._lexer=K.create(r):this._lexer=r,this.baseParser=s}get lexer(){return this._lexer}parse(){const t=this.parseType(f.ALL);if(this.lexer.current.type!=="EOF")throw new u(this.lexer.current);return t}parseType(t){return w(this.parseIntermediateType(t))}parseIntermediateType(t){const r=this.tryParslets(null,t);if(r===null)throw new p(this.lexer.current);return this.parseInfixIntermediateType(r,t)}parseInfixIntermediateType(t,r){let s=this.tryParslets(t,r);for(;s!==null;)t=s,s=this.tryParslets(t,r);return t}tryParslets(t,r){for(const s of this.grammar){const c=s(this,r,t);if(c!==null)return c}return null}consume(t){return Array.isArray(t)||(t=[t]),t.includes(this.lexer.current.type)?(this._lexer=this.lexer.advance(),!0):!1}acceptLexerState(t){this._lexer=t.lexer}}function Ae(e){return e==="EOF"||e==="|"||e===","||e===")"||e===">"}const ce=(e,t,r)=>{const s=e.lexer.current.type,c=e.lexer.next.type;return r==null&&s==="?"&&!Ae(c)||r!=null&&s==="?"?(e.consume("?"),r==null?{type:"JsdocTypeNullable",element:e.parseType(f.NULLABLE),meta:{position:"prefix"}}:{type:"JsdocTypeNullable",element:w(r),meta:{position:"suffix"}}):null};function g(e){const t=(r,s,c)=>{const d=r.lexer.current.type,T=r.lexer.next.type;if(c===null){if("parsePrefix"in e&&e.accept(d,T))return e.parsePrefix(r)}else if("parseInfix"in e&&e.precedence>s&&e.accept(d,T))return e.parseInfix(r,c);return null};return Object.defineProperty(t,"name",{value:e.name}),t}const z=g({name:"optionalParslet",accept:e=>e==="=",precedence:f.OPTIONAL,parsePrefix:e=>(e.consume("="),{type:"JsdocTypeOptional",element:e.parseType(f.OPTIONAL),meta:{position:"prefix"}}),parseInfix:(e,t)=>(e.consume("="),{type:"JsdocTypeOptional",element:w(t),meta:{position:"suffix"}})}),Z=g({name:"numberParslet",accept:e=>e==="Number",parsePrefix:e=>{const t=parseFloat(e.lexer.current.text);return e.consume("Number"),{type:"JsdocTypeNumber",value:t}}}),Bt=g({name:"parenthesisParslet",accept:e=>e==="(",parsePrefix:e=>{if(e.consume("("),e.consume(")"))return{type:"JsdocTypeParameterList",elements:[]};const t=e.parseIntermediateType(f.ALL);if(!e.consume(")"))throw new Error("Unterminated parenthesis");return t.type==="JsdocTypeParameterList"?t:t.type==="JsdocTypeKeyValue"?{type:"JsdocTypeParameterList",elements:[t]}:{type:"JsdocTypeParenthesis",element:w(t)}}}),Ct=g({name:"specialTypesParslet",accept:(e,t)=>e==="?"&&Ae(t)||e==="null"||e==="undefined"||e==="*",parsePrefix:e=>{if(e.consume("null"))return{type:"JsdocTypeNull"};if(e.consume("undefined"))return{type:"JsdocTypeUndefined"};if(e.consume("*"))return{type:"JsdocTypeAny"};if(e.consume("?"))return{type:"JsdocTypeUnknown"};throw new Error("Unacceptable token: "+e.lexer.current.text)}}),Yt=g({name:"notNullableParslet",accept:e=>e==="!",precedence:f.NULLABLE,parsePrefix:e=>(e.consume("!"),{type:"JsdocTypeNotNullable",element:e.parseType(f.NULLABLE),meta:{position:"prefix"}}),parseInfix:(e,t)=>(e.consume("!"),{type:"JsdocTypeNotNullable",element:w(t),meta:{position:"suffix"}})});function Gt({allowTrailingComma:e}){return g({name:"parameterListParslet",accept:t=>t===",",precedence:f.PARAMETER_LIST,parseInfix:(t,r)=>{const s=[ie(r)];t.consume(",");do try{const c=t.parseIntermediateType(f.PARAMETER_LIST);s.push(ie(c))}catch(c){if(c instanceof p)break;throw c}while(t.consume(","));if(s.length>0&&s.slice(0,-1).some(c=>c.type==="JsdocTypeVariadic"))throw new Error("Only the last parameter may be a rest parameter");return{type:"JsdocTypeParameterList",elements:s}}})}const Wt=g({name:"genericParslet",accept:(e,t)=>e==="<"||e==="."&&t==="<",precedence:f.GENERIC,parseInfix:(e,t)=>{const r=e.consume(".");e.consume("<");const s=[];do s.push(e.parseType(f.PARAMETER_LIST));while(e.consume(","));if(!e.consume(">"))throw new Error("Unterminated generic parameter list");return{type:"JsdocTypeGeneric",left:w(t),elements:s,meta:{brackets:"angle",dot:r}}}}),Xt=g({name:"unionParslet",accept:e=>e==="|",precedence:f.UNION,parseInfix:(e,t)=>{e.consume("|");const r=[];do r.push(e.parseType(f.UNION));while(e.consume("|"));return{type:"JsdocTypeUnion",elements:[w(t),...r]}}}),pe=[ce,z,Z,Bt,Ct,Yt,Gt({allowTrailingComma:!0}),Wt,Xt,z];function ee({allowSquareBracketsOnAnyType:e,allowJsdocNamePaths:t,pathGrammar:r}){return function(c,d,T){if(T==null||d>=f.NAME_PATH)return null;const J=c.lexer.current.type,x=c.lexer.next.type;if(!(J==="."&&x!=="<"||J==="["&&(e||T.type==="JsdocTypeName")||t&&(J==="~"||J==="#")))return null;let k,re=!1;c.consume(".")?k="property":c.consume("[")?(k="property-brackets",re=!0):c.consume("~")?k="inner":(c.consume("#"),k="instance");const $e=r!==null?new U(r,c.lexer,c):c,O=$e.parseIntermediateType(f.NAME_PATH);c.acceptLexerState($e);let M;switch(O.type){case"JsdocTypeName":M={type:"JsdocTypeProperty",value:O.value,meta:{quote:void 0}};break;case"JsdocTypeNumber":M={type:"JsdocTypeProperty",value:O.value.toString(10),meta:{quote:void 0}};break;case"JsdocTypeStringValue":M={type:"JsdocTypeProperty",value:O.value,meta:{quote:O.meta.quote}};break;case"JsdocTypeSpecialNamePath":if(O.specialType==="event")M=O;else throw new y(O,"Type 'JsdocTypeSpecialNamePath' is only allowed with specialType 'event'");break;default:throw new y(O,"Expecting 'JsdocTypeName', 'JsdocTypeNumber', 'JsdocStringValue' or 'JsdocTypeSpecialNamePath'")}if(re&&!c.consume("]")){const qe=c.lexer.current;throw new Error(`Unterminated square brackets. Next token is '${qe.type}' with text '${qe.text}'`)}return{type:"JsdocTypeNamePath",left:w(T),right:M,pathType:k}}}function I({allowedAdditionalTokens:e}){return g({name:"nameParslet",accept:t=>t==="Identifier"||t==="this"||t==="new"||e.includes(t),parsePrefix:t=>{const{type:r,text:s}=t.lexer.current;return t.consume(r),{type:"JsdocTypeName",value:s}}})}const $=g({name:"stringValueParslet",accept:e=>e==="StringValue",parsePrefix:e=>{const t=e.lexer.current.text;return e.consume("StringValue"),{type:"JsdocTypeStringValue",value:t.slice(1,-1),meta:{quote:t[0]==="'"?"single":"double"}}}});function te({pathGrammar:e,allowedTypes:t}){return g({name:"specialNamePathParslet",accept:r=>t.includes(r),parsePrefix:r=>{const s=r.lexer.current.type;if(r.consume(s),!r.consume(":"))return{type:"JsdocTypeName",value:s};let c,d=r.lexer.current;if(r.consume("StringValue"))c={type:"JsdocTypeSpecialNamePath",value:d.text.slice(1,-1),specialType:s,meta:{quote:d.text[0]==="'"?"single":"double"}};else{let x="";const v=["Identifier","@","/"];for(;v.some(k=>r.consume(k));)x+=d.text,d=r.lexer.current;c={type:"JsdocTypeSpecialNamePath",value:x,specialType:s,meta:{quote:void 0}}}const T=new U(e,r.lexer,r),J=T.parseInfixIntermediateType(c,f.ALL);return r.acceptLexerState(T),w(J)}})}const Re=[I({allowedAdditionalTokens:["external","module"]}),$,Z,ee({allowSquareBracketsOnAnyType:!1,allowJsdocNamePaths:!0,pathGrammar:null})],V=[...Re,te({allowedTypes:["event"],pathGrammar:Re})];function ue(e){let t;if(e.type==="JsdocTypeParameterList")t=e.elements;else if(e.type==="JsdocTypeParenthesis")t=[e.element];else throw new y(e);return t.map(r=>ie(r))}function Qt(e){const t=ue(e);if(t.some(r=>r.type==="JsdocTypeKeyValue"))throw new Error("No parameter should be named");return t}function ye({allowNamedParameters:e,allowNoReturnType:t,allowWithoutParenthesis:r,allowNewAsFunctionKeyword:s}){return g({name:"functionParslet",accept:(c,d)=>c==="function"||s&&c==="new"&&d==="(",parsePrefix:c=>{const d=c.consume("new");c.consume("function");const T=c.lexer.current.type==="(";if(!T){if(!r)throw new Error("function is missing parameter list");return{type:"JsdocTypeName",value:"function"}}let J={type:"JsdocTypeFunction",parameters:[],arrow:!1,constructor:d,parenthesis:T};const x=c.parseIntermediateType(f.FUNCTION);if(e===void 0)J.parameters=Qt(x);else{if(d&&x.type==="JsdocTypeFunction"&&x.arrow)return J=x,J.constructor=!0,J;J.parameters=ue(x);for(const v of J.parameters)if(v.type==="JsdocTypeKeyValue"&&!e.includes(v.key))throw new Error(`only allowed named parameters are ${e.join(", ")} but got ${v.type}`)}if(c.consume(":"))J.returnType=c.parseType(f.PREFIX);else if(!t)throw new Error("function is missing return type");return J}})}function de({allowPostfix:e,allowEnclosingBrackets:t}){return g({name:"variadicParslet",accept:r=>r==="...",precedence:f.PREFIX,parsePrefix:r=>{r.consume("...");const s=t&&r.consume("[");try{const c=r.parseType(f.PREFIX);if(s&&!r.consume("]"))throw new Error("Unterminated variadic type. Missing ']'");return{type:"JsdocTypeVariadic",element:w(c),meta:{position:"prefix",squareBrackets:s}}}catch(c){if(c instanceof p){if(s)throw new Error("Empty square brackets for variadic are not allowed.");return{type:"JsdocTypeVariadic",meta:{position:void 0,squareBrackets:!1}}}else throw c}},parseInfix:e?(r,s)=>(r.consume("..."),{type:"JsdocTypeVariadic",element:w(s),meta:{position:"suffix",squareBrackets:!1}}):void 0})}const _e=g({name:"symbolParslet",accept:e=>e==="(",precedence:f.SYMBOL,parseInfix:(e,t)=>{if(t.type!=="JsdocTypeName")throw new Error("Symbol expects a name on the left side. (Reacting on '(')");e.consume("(");const r={type:"JsdocTypeSymbol",value:t.value};if(!e.consume(")")){const s=e.parseIntermediateType(f.SYMBOL);if(r.element=Mt(s),!e.consume(")"))throw new Error("Symbol does not end after value")}return r}}),Fe=g({name:"arrayBracketsParslet",precedence:f.ARRAY_BRACKETS,accept:(e,t)=>e==="["&&t==="]",parseInfix:(e,t)=>(e.consume("["),e.consume("]"),{type:"JsdocTypeGeneric",left:{type:"JsdocTypeName",value:"Array"},elements:[w(t)],meta:{brackets:"square",dot:!1}})});function me({objectFieldGrammar:e,allowKeyTypes:t}){return g({name:"objectParslet",accept:r=>r==="{",parsePrefix:r=>{r.consume("{");const s={type:"JsdocTypeObject",meta:{separator:"comma"},elements:[]};if(!r.consume("}")){let c;const d=new U(e,r.lexer,r);for(;;){d.acceptLexerState(r);let T=d.parseIntermediateType(f.OBJECT);r.acceptLexerState(d),T===void 0&&t&&(T=r.parseIntermediateType(f.OBJECT));let J=!1;if(T.type==="JsdocTypeNullable"&&(J=!0,T=T.element),T.type==="JsdocTypeNumber"||T.type==="JsdocTypeName"||T.type==="JsdocTypeStringValue"){let v;T.type==="JsdocTypeStringValue"&&(v=T.meta.quote),s.elements.push({type:"JsdocTypeObjectField",key:T.value.toString(),right:void 0,optional:J,readonly:!1,meta:{quote:v}})}else if(T.type==="JsdocTypeObjectField"||T.type==="JsdocTypeJsdocObjectField")s.elements.push(T);else throw new y(T);if(r.lexer.current.startOfLine)c="linebreak";else if(r.consume(","))c="comma";else if(r.consume(";"))c="semicolon";else break;if(r.lexer.current.type==="}")break}if(s.meta.separator=c??"comma",!r.consume("}"))throw new Error("Unterminated record type. Missing '}'")}return s}})}function fe({allowSquaredProperties:e,allowKeyTypes:t,allowReadonly:r,allowOptional:s}){return g({name:"objectFieldParslet",precedence:f.KEY_VALUE,accept:c=>c===":",parseInfix:(c,d)=>{var T;let J=!1,x=!1;s&&d.type==="JsdocTypeNullable"&&(J=!0,d=d.element),r&&d.type==="JsdocTypeReadonlyProperty"&&(x=!0,d=d.element);const v=(T=c.baseParser)!==null&&T!==void 0?T:c;if(v.acceptLexerState(c),d.type==="JsdocTypeNumber"||d.type==="JsdocTypeName"||d.type==="JsdocTypeStringValue"||le(d)){if(le(d)&&!e)throw new y(d);v.consume(":");let k;d.type==="JsdocTypeStringValue"&&(k=d.meta.quote);const re=v.parseType(f.KEY_VALUE);return c.acceptLexerState(v),{type:"JsdocTypeObjectField",key:le(d)?d:d.value.toString(),right:re,optional:J,readonly:x,meta:{quote:k}}}else{if(!t)throw new y(d);v.consume(":");const k=v.parseType(f.KEY_VALUE);return c.acceptLexerState(v),{type:"JsdocTypeJsdocObjectField",left:w(d),right:k}}}})}function Te({allowOptional:e,allowVariadic:t}){return g({name:"keyValueParslet",precedence:f.KEY_VALUE,accept:r=>r===":",parseInfix:(r,s)=>{let c=!1,d=!1;if(e&&s.type==="JsdocTypeNullable"&&(c=!0,s=s.element),t&&s.type==="JsdocTypeVariadic"&&s.element!==void 0&&(d=!0,s=s.element),s.type!=="JsdocTypeName")throw new y(s);r.consume(":");const T=r.parseType(f.KEY_VALUE);return{type:"JsdocTypeKeyValue",key:s.value,right:T,optional:c,variadic:d}}})}const Le=[...pe,ye({allowWithoutParenthesis:!0,allowNamedParameters:["this","new"],allowNoReturnType:!0,allowNewAsFunctionKeyword:!1}),$,te({allowedTypes:["module","external","event"],pathGrammar:V}),de({allowEnclosingBrackets:!0,allowPostfix:!0}),I({allowedAdditionalTokens:["keyof"]}),_e,Fe,ee({allowSquareBracketsOnAnyType:!1,allowJsdocNamePaths:!0,pathGrammar:V})],Ht=[...Le,me({objectFieldGrammar:[I({allowedAdditionalTokens:["module","in"]}),fe({allowSquaredProperties:!1,allowKeyTypes:!0,allowOptional:!1,allowReadonly:!1}),...Le],allowKeyTypes:!0}),Te({allowOptional:!0,allowVariadic:!0})],je=g({name:"typeOfParslet",accept:e=>e==="typeof",parsePrefix:e=>(e.consume("typeof"),{type:"JsdocTypeTypeof",element:w(e.parseType(f.KEY_OF_TYPE_OF))})}),zt=[I({allowedAdditionalTokens:["module","keyof","event","external","in"]}),ce,z,$,Z,fe({allowSquaredProperties:!1,allowKeyTypes:!1,allowOptional:!1,allowReadonly:!1})],Zt=[...pe,me({allowKeyTypes:!1,objectFieldGrammar:zt}),I({allowedAdditionalTokens:["event","external","in"]}),je,ye({allowWithoutParenthesis:!1,allowNamedParameters:["this","new"],allowNoReturnType:!0,allowNewAsFunctionKeyword:!1}),de({allowEnclosingBrackets:!1,allowPostfix:!1}),I({allowedAdditionalTokens:["keyof"]}),te({allowedTypes:["module"],pathGrammar:V}),ee({allowSquareBracketsOnAnyType:!1,allowJsdocNamePaths:!0,pathGrammar:V}),Te({allowOptional:!1,allowVariadic:!1}),_e],en=g({name:"assertsParslet",accept:e=>e==="asserts",parsePrefix:e=>{e.consume("asserts");const t=e.parseIntermediateType(f.SYMBOL);if(t.type!=="JsdocTypeName")throw new y(t,"A typescript asserts always has to have a name on the left side.");return e.consume("is"),{type:"JsdocTypeAsserts",left:t,right:w(e.parseIntermediateType(f.INFIX))}}});function tn({allowQuestionMark:e}){return g({name:"tupleParslet",accept:t=>t==="[",parsePrefix:t=>{t.consume("[");const r={type:"JsdocTypeTuple",elements:[]};if(t.consume("]"))return r;const s=t.parseIntermediateType(f.ALL);if(s.type==="JsdocTypeParameterList"?s.elements[0].type==="JsdocTypeKeyValue"?r.elements=s.elements.map(H):r.elements=s.elements.map(w):s.type==="JsdocTypeKeyValue"?r.elements=[H(s)]:r.elements=[w(s)],!t.consume("]"))throw new Error("Unterminated '['");if(r.elements.some(c=>c.type==="JsdocTypeUnknown"))throw new Error("Question mark in tuple not allowed");return r}})}const nn=g({name:"keyOfParslet",accept:e=>e==="keyof",parsePrefix:e=>(e.consume("keyof"),{type:"JsdocTypeKeyof",element:w(e.parseType(f.KEY_OF_TYPE_OF))})}),rn=g({name:"importParslet",accept:e=>e==="import",parsePrefix:e=>{if(e.consume("import"),!e.consume("("))throw new Error("Missing parenthesis after import keyword");const t=e.parseType(f.PREFIX);if(t.type!=="JsdocTypeStringValue")throw new Error("Only string values are allowed as paths for imports");if(!e.consume(")"))throw new Error("Missing closing parenthesis after import keyword");return{type:"JsdocTypeImport",element:t}}}),an=g({name:"readonlyPropertyParslet",accept:e=>e==="readonly",parsePrefix:e=>(e.consume("readonly"),{type:"JsdocTypeReadonlyProperty",element:e.parseType(f.KEY_VALUE)})}),on=g({name:"arrowFunctionParslet",precedence:f.ARROW,accept:e=>e==="=>",parseInfix:(e,t)=>(e.consume("=>"),{type:"JsdocTypeFunction",parameters:ue(t).map(qt),arrow:!0,constructor:!1,parenthesis:!0,returnType:e.parseType(f.OBJECT)})}),sn=g({name:"intersectionParslet",accept:e=>e==="&",precedence:f.INTERSECTION,parseInfix:(e,t)=>{e.consume("&");const r=[];do r.push(e.parseType(f.INTERSECTION));while(e.consume("&"));return{type:"JsdocTypeIntersection",elements:[w(t),...r]}}}),ln=g({name:"predicateParslet",precedence:f.INFIX,accept:e=>e==="is",parseInfix:(e,t)=>{if(t.type!=="JsdocTypeName")throw new y(t,"A typescript predicate always has to have a name on the left side.");return e.consume("is"),{type:"JsdocTypePredicate",left:t,right:w(e.parseIntermediateType(f.INFIX))}}}),cn=g({name:"objectSquareBracketPropertyParslet",accept:e=>e==="[",parsePrefix:e=>{if(e.baseParser===void 0)throw new Error("Only allowed inside object grammar");e.consume("[");const t=e.lexer.current.text;e.consume("Identifier");let r;if(e.consume(":")){const s=e.baseParser;s.acceptLexerState(e),r={type:"JsdocTypeIndexSignature",key:t,right:s.parseType(f.INDEX_BRACKETS)},e.acceptLexerState(s)}else if(e.consume("in")){const s=e.baseParser;s.acceptLexerState(e),r={type:"JsdocTypeMappedType",key:t,right:s.parseType(f.ARRAY_BRACKETS)},e.acceptLexerState(s)}else throw new Error("Missing ':' or 'in' inside square bracketed property.");if(!e.consume("]"))throw new Error("Unterminated square brackets");return r}}),pn=[an,I({allowedAdditionalTokens:["module","event","keyof","event","external","in"]}),ce,z,$,Z,fe({allowSquaredProperties:!0,allowKeyTypes:!1,allowOptional:!0,allowReadonly:!0}),cn],un=[...pe,me({allowKeyTypes:!1,objectFieldGrammar:pn}),je,nn,rn,$,ye({allowWithoutParenthesis:!0,allowNoReturnType:!1,allowNamedParameters:["this","new","args"],allowNewAsFunctionKeyword:!0}),tn({allowQuestionMark:!1}),de({allowEnclosingBrackets:!1,allowPostfix:!1}),en,I({allowedAdditionalTokens:["event","external","in"]}),te({allowedTypes:["module"],pathGrammar:V}),Fe,on,ee({allowSquareBracketsOnAnyType:!0,allowJsdocNamePaths:!1,pathGrammar:V}),sn,ln,Te({allowVariadic:!0,allowOptional:!0})];function Ue(e,t){switch(t){case"closure":return new U(Zt,e).parse();case"jsdoc":return new U(Ht,e).parse();case"typescript":return new U(un,e).parse()}}function yn(e,t=["typescript","closure","jsdoc"]){let r;for(const s of t)try{return Ue(e,s)}catch(c){r=c}throw r}function q(e,t){const r=e[t.type];if(r===void 0)throw new Error(`In this set of transform rules exists no rule for type ${t.type}.`);return r(t,s=>q(e,s))}function S(e){throw new Error("This transform is not available. Are you trying the correct parsing mode?")}function Ve(e){const t={params:[]};for(const r of e.parameters)r.type==="JsdocTypeKeyValue"?r.key==="this"?t.this=r.right:r.key==="new"?t.new=r.right:t.params.push(r):t.params.push(r);return t}function ne(e,t,r){return e==="prefix"?r+t:t+r}function A(e,t){switch(t){case"double":return`"${e}"`;case"single":return`'${e}'`;case void 0:return e}}function De(){return{JsdocTypeParenthesis:(e,t)=>`(${e.element!==void 0?t(e.element):""})`,JsdocTypeKeyof:(e,t)=>`keyof ${t(e.element)}`,JsdocTypeFunction:(e,t)=>{if(e.arrow){if(e.returnType===void 0)throw new Error("Arrow function needs a return type.");let r=`(${e.parameters.map(t).join(", ")}) => ${t(e.returnType)}`;return e.constructor&&(r="new "+r),r}else{let r=e.constructor?"new":"function";return e.parenthesis&&(r+=`(${e.parameters.map(t).join(", ")})`,e.returnType!==void 0&&(r+=`: ${t(e.returnType)}`)),r}},JsdocTypeName:e=>e.value,JsdocTypeTuple:(e,t)=>`[${e.elements.map(t).join(", ")}]`,JsdocTypeVariadic:(e,t)=>e.meta.position===void 0?"...":ne(e.meta.position,t(e.element),"..."),JsdocTypeNamePath:(e,t)=>{const r=t(e.left),s=t(e.right);switch(e.pathType){case"inner":return`${r}~${s}`;case"instance":return`${r}#${s}`;case"property":return`${r}.${s}`;case"property-brackets":return`${r}[${s}]`}},JsdocTypeStringValue:e=>A(e.value,e.meta.quote),JsdocTypeAny:()=>"*",JsdocTypeGeneric:(e,t)=>{if(e.meta.brackets==="square"){const r=e.elements[0],s=t(r);return r.type==="JsdocTypeUnion"||r.type==="JsdocTypeIntersection"?`(${s})[]`:`${s}[]`}else return`${t(e.left)}${e.meta.dot?".":""}<${e.elements.map(t).join(", ")}>`},JsdocTypeImport:(e,t)=>`import(${t(e.element)})`,JsdocTypeObjectField:(e,t)=>{let r="";return e.readonly&&(r+="readonly "),typeof e.key=="string"?r+=A(e.key,e.meta.quote):r+=t(e.key),e.optional&&(r+="?"),e.right===void 0?r:r+`: ${t(e.right)}`},JsdocTypeJsdocObjectField:(e,t)=>`${t(e.left)}: ${t(e.right)}`,JsdocTypeKeyValue:(e,t)=>{let r=e.key;return e.optional&&(r+="?"),e.variadic&&(r="..."+r),e.right===void 0?r:r+`: ${t(e.right)}`},JsdocTypeSpecialNamePath:e=>`${e.specialType}:${A(e.value,e.meta.quote)}`,JsdocTypeNotNullable:(e,t)=>ne(e.meta.position,t(e.element),"!"),JsdocTypeNull:()=>"null",JsdocTypeNullable:(e,t)=>ne(e.meta.position,t(e.element),"?"),JsdocTypeNumber:e=>e.value.toString(),JsdocTypeObject:(e,t)=>`{${e.elements.map(t).join((e.meta.separator==="comma"?",":";")+" ")}}`,JsdocTypeOptional:(e,t)=>ne(e.meta.position,t(e.element),"="),JsdocTypeSymbol:(e,t)=>`${e.value}(${e.element!==void 0?t(e.element):""})`,JsdocTypeTypeof:(e,t)=>`typeof ${t(e.element)}`,JsdocTypeUndefined:()=>"undefined",JsdocTypeUnion:(e,t)=>e.elements.map(t).join(" | "),JsdocTypeUnknown:()=>"?",JsdocTypeIntersection:(e,t)=>e.elements.map(t).join(" & "),JsdocTypeProperty:e=>A(e.value,e.meta.quote),JsdocTypePredicate:(e,t)=>`${t(e.left)} is ${t(e.right)}`,JsdocTypeIndexSignature:(e,t)=>`[${e.key}: ${t(e.right)}]`,JsdocTypeMappedType:(e,t)=>`[${e.key} in ${t(e.right)}]`,JsdocTypeAsserts:(e,t)=>`asserts ${t(e.left)} is ${t(e.right)}`}}const dn=De();function mn(e){return q(dn,e)}const fn=["null","true","false","break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","finally","for","function","if","import","in","instanceof","new","return","super","switch","this","throw","try","typeof","var","void","while","with","yield"];function R(e){const t={type:"NameExpression",name:e};return fn.includes(e)&&(t.reservedWord=!0),t}const Tn={JsdocTypeOptional:(e,t)=>{const r=t(e.element);return r.optional=!0,r},JsdocTypeNullable:(e,t)=>{const r=t(e.element);return r.nullable=!0,r},JsdocTypeNotNullable:(e,t)=>{const r=t(e.element);return r.nullable=!1,r},JsdocTypeVariadic:(e,t)=>{if(e.element===void 0)throw new Error("dots without value are not allowed in catharsis mode");const r=t(e.element);return r.repeatable=!0,r},JsdocTypeAny:()=>({type:"AllLiteral"}),JsdocTypeNull:()=>({type:"NullLiteral"}),JsdocTypeStringValue:e=>R(A(e.value,e.meta.quote)),JsdocTypeUndefined:()=>({type:"UndefinedLiteral"}),JsdocTypeUnknown:()=>({type:"UnknownLiteral"}),JsdocTypeFunction:(e,t)=>{const r=Ve(e),s={type:"FunctionType",params:r.params.map(t)};return r.this!==void 0&&(s.this=t(r.this)),r.new!==void 0&&(s.new=t(r.new)),e.returnType!==void 0&&(s.result=t(e.returnType)),s},JsdocTypeGeneric:(e,t)=>({type:"TypeApplication",applications:e.elements.map(r=>t(r)),expression:t(e.left)}),JsdocTypeSpecialNamePath:e=>R(e.specialType+":"+A(e.value,e.meta.quote)),JsdocTypeName:e=>e.value!=="function"?R(e.value):{type:"FunctionType",params:[]},JsdocTypeNumber:e=>R(e.value.toString()),JsdocTypeObject:(e,t)=>{const r={type:"RecordType",fields:[]};for(const s of e.elements)s.type!=="JsdocTypeObjectField"&&s.type!=="JsdocTypeJsdocObjectField"?r.fields.push({type:"FieldType",key:t(s),value:void 0}):r.fields.push(t(s));return r},JsdocTypeObjectField:(e,t)=>{if(typeof e.key!="string")throw new Error("Index signatures and mapped types are not supported");return{type:"FieldType",key:R(A(e.key,e.meta.quote)),value:e.right===void 0?void 0:t(e.right)}},JsdocTypeJsdocObjectField:(e,t)=>({type:"FieldType",key:t(e.left),value:t(e.right)}),JsdocTypeUnion:(e,t)=>({type:"TypeUnion",elements:e.elements.map(r=>t(r))}),JsdocTypeKeyValue:(e,t)=>({type:"FieldType",key:R(e.key),value:e.right===void 0?void 0:t(e.right)}),JsdocTypeNamePath:(e,t)=>{const r=t(e.left);let s;e.right.type==="JsdocTypeSpecialNamePath"?s=t(e.right).name:s=A(e.right.value,e.right.meta.quote);const c=e.pathType==="inner"?"~":e.pathType==="instance"?"#":".";return R(`${r.name}${c}${s}`)},JsdocTypeSymbol:e=>{let t="",r=e.element,s=!1;return(r==null?void 0:r.type)==="JsdocTypeVariadic"&&(r.meta.position==="prefix"?t="...":s=!0,r=r.element),(r==null?void 0:r.type)==="JsdocTypeName"?t+=r.value:(r==null?void 0:r.type)==="JsdocTypeNumber"&&(t+=r.value.toString()),s&&(t+="..."),R(`${e.value}(${t})`)},JsdocTypeParenthesis:(e,t)=>t(w(e.element)),JsdocTypeMappedType:S,JsdocTypeIndexSignature:S,JsdocTypeImport:S,JsdocTypeKeyof:S,JsdocTypeTuple:S,JsdocTypeTypeof:S,JsdocTypeIntersection:S,JsdocTypeProperty:S,JsdocTypePredicate:S,JsdocTypeAsserts:S};function hn(e){return q(Tn,e)}function L(e){switch(e){case void 0:return"none";case"single":return"single";case"double":return"double"}}function gn(e){switch(e){case"inner":return"INNER_MEMBER";case"instance":return"INSTANCE_MEMBER";case"property":return"MEMBER";case"property-brackets":return"MEMBER"}}function he(e,t){return t.length===2?{type:e,left:t[0],right:t[1]}:{type:e,left:t[0],right:he(e,t.slice(1))}}const Jn={JsdocTypeOptional:(e,t)=>({type:"OPTIONAL",value:t(e.element),meta:{syntax:e.meta.position==="prefix"?"PREFIX_EQUAL_SIGN":"SUFFIX_EQUALS_SIGN"}}),JsdocTypeNullable:(e,t)=>({type:"NULLABLE",value:t(e.element),meta:{syntax:e.meta.position==="prefix"?"PREFIX_QUESTION_MARK":"SUFFIX_QUESTION_MARK"}}),JsdocTypeNotNullable:(e,t)=>({type:"NOT_NULLABLE",value:t(e.element),meta:{syntax:e.meta.position==="prefix"?"PREFIX_BANG":"SUFFIX_BANG"}}),JsdocTypeVariadic:(e,t)=>{const r={type:"VARIADIC",meta:{syntax:e.meta.position==="prefix"?"PREFIX_DOTS":e.meta.position==="suffix"?"SUFFIX_DOTS":"ONLY_DOTS"}};return e.element!==void 0&&(r.value=t(e.element)),r},JsdocTypeName:e=>({type:"NAME",name:e.value}),JsdocTypeTypeof:(e,t)=>({type:"TYPE_QUERY",name:t(e.element)}),JsdocTypeTuple:(e,t)=>({type:"TUPLE",entries:e.elements.map(t)}),JsdocTypeKeyof:(e,t)=>({type:"KEY_QUERY",value:t(e.element)}),JsdocTypeImport:e=>({type:"IMPORT",path:{type:"STRING_VALUE",quoteStyle:L(e.element.meta.quote),string:e.element.value}}),JsdocTypeUndefined:()=>({type:"NAME",name:"undefined"}),JsdocTypeAny:()=>({type:"ANY"}),JsdocTypeFunction:(e,t)=>{const r=Ve(e),s={type:e.arrow?"ARROW":"FUNCTION",params:r.params.map(c=>{if(c.type==="JsdocTypeKeyValue"){if(c.right===void 0)throw new Error("Function parameter without ':' is not expected to be 'KEY_VALUE'");return{type:"NAMED_PARAMETER",name:c.key,typeName:t(c.right)}}else return t(c)}),new:null,returns:null};return r.this!==void 0?s.this=t(r.this):e.arrow||(s.this=null),r.new!==void 0&&(s.new=t(r.new)),e.returnType!==void 0&&(s.returns=t(e.returnType)),s},JsdocTypeGeneric:(e,t)=>{const r={type:"GENERIC",subject:t(e.left),objects:e.elements.map(t),meta:{syntax:e.meta.brackets==="square"?"SQUARE_BRACKET":e.meta.dot?"ANGLE_BRACKET_WITH_DOT":"ANGLE_BRACKET"}};return e.meta.brackets==="square"&&e.elements[0].type==="JsdocTypeFunction"&&!e.elements[0].parenthesis&&(r.objects[0]={type:"NAME",name:"function"}),r},JsdocTypeObjectField:(e,t)=>{if(typeof e.key!="string")throw new Error("Index signatures and mapped types are not supported");if(e.right===void 0)return{type:"RECORD_ENTRY",key:e.key,quoteStyle:L(e.meta.quote),value:null,readonly:!1};let r=t(e.right);return e.optional&&(r={type:"OPTIONAL",value:r,meta:{syntax:"SUFFIX_KEY_QUESTION_MARK"}}),{type:"RECORD_ENTRY",key:e.key.toString(),quoteStyle:L(e.meta.quote),value:r,readonly:!1}},JsdocTypeJsdocObjectField:()=>{throw new Error("Keys may not be typed in jsdoctypeparser.")},JsdocTypeKeyValue:(e,t)=>{if(e.right===void 0)return{type:"RECORD_ENTRY",key:e.key,quoteStyle:"none",value:null,readonly:!1};let r=t(e.right);return e.optional&&(r={type:"OPTIONAL",value:r,meta:{syntax:"SUFFIX_KEY_QUESTION_MARK"}}),{type:"RECORD_ENTRY",key:e.key,quoteStyle:"none",value:r,readonly:!1}},JsdocTypeObject:(e,t)=>{const r=[];for(const s of e.elements)(s.type==="JsdocTypeObjectField"||s.type==="JsdocTypeJsdocObjectField")&&r.push(t(s));return{type:"RECORD",entries:r}},JsdocTypeSpecialNamePath:e=>{if(e.specialType!=="module")throw new Error(`jsdoctypeparser does not support type ${e.specialType} at this point.`);return{type:"MODULE",value:{type:"FILE_PATH",quoteStyle:L(e.meta.quote),path:e.value}}},JsdocTypeNamePath:(e,t)=>{let r=!1,s,c;e.right.type==="JsdocTypeSpecialNamePath"&&e.right.specialType==="event"?(r=!0,s=e.right.value,c=L(e.right.meta.quote)):(s=e.right.value,c=L(e.right.meta.quote));const d={type:gn(e.pathType),owner:t(e.left),name:s,quoteStyle:c,hasEventPrefix:r};if(d.owner.type==="MODULE"){const T=d.owner;return d.owner=d.owner.value,T.value=d,T}else return d},JsdocTypeUnion:(e,t)=>he("UNION",e.elements.map(t)),JsdocTypeParenthesis:(e,t)=>({type:"PARENTHESIS",value:t(w(e.element))}),JsdocTypeNull:()=>({type:"NAME",name:"null"}),JsdocTypeUnknown:()=>({type:"UNKNOWN"}),JsdocTypeStringValue:e=>({type:"STRING_VALUE",quoteStyle:L(e.meta.quote),string:e.value}),JsdocTypeIntersection:(e,t)=>he("INTERSECTION",e.elements.map(t)),JsdocTypeNumber:e=>({type:"NUMBER_VALUE",number:e.value.toString()}),JsdocTypeSymbol:S,JsdocTypeProperty:S,JsdocTypePredicate:S,JsdocTypeMappedType:S,JsdocTypeIndexSignature:S,JsdocTypeAsserts:S};function wn(e){return q(Jn,e)}function Nn(){return{JsdocTypeIntersection:(e,t)=>({type:"JsdocTypeIntersection",elements:e.elements.map(t)}),JsdocTypeGeneric:(e,t)=>({type:"JsdocTypeGeneric",left:t(e.left),elements:e.elements.map(t),meta:{dot:e.meta.dot,brackets:e.meta.brackets}}),JsdocTypeNullable:e=>e,JsdocTypeUnion:(e,t)=>({type:"JsdocTypeUnion",elements:e.elements.map(t)}),JsdocTypeUnknown:e=>e,JsdocTypeUndefined:e=>e,JsdocTypeTypeof:(e,t)=>({type:"JsdocTypeTypeof",element:t(e.element)}),JsdocTypeSymbol:(e,t)=>{const r={type:"JsdocTypeSymbol",value:e.value};return e.element!==void 0&&(r.element=t(e.element)),r},JsdocTypeOptional:(e,t)=>({type:"JsdocTypeOptional",element:t(e.element),meta:{position:e.meta.position}}),JsdocTypeObject:(e,t)=>({type:"JsdocTypeObject",meta:{separator:"comma"},elements:e.elements.map(t)}),JsdocTypeNumber:e=>e,JsdocTypeNull:e=>e,JsdocTypeNotNullable:(e,t)=>({type:"JsdocTypeNotNullable",element:t(e.element),meta:{position:e.meta.position}}),JsdocTypeSpecialNamePath:e=>e,JsdocTypeObjectField:(e,t)=>({type:"JsdocTypeObjectField",key:e.key,right:e.right===void 0?void 0:t(e.right),optional:e.optional,readonly:e.readonly,meta:e.meta}),JsdocTypeJsdocObjectField:(e,t)=>({type:"JsdocTypeJsdocObjectField",left:t(e.left),right:t(e.right)}),JsdocTypeKeyValue:(e,t)=>({type:"JsdocTypeKeyValue",key:e.key,right:e.right===void 0?void 0:t(e.right),optional:e.optional,variadic:e.variadic}),JsdocTypeImport:(e,t)=>({type:"JsdocTypeImport",element:t(e.element)}),JsdocTypeAny:e=>e,JsdocTypeStringValue:e=>e,JsdocTypeNamePath:e=>e,JsdocTypeVariadic:(e,t)=>{const r={type:"JsdocTypeVariadic",meta:{position:e.meta.position,squareBrackets:e.meta.squareBrackets}};return e.element!==void 0&&(r.element=t(e.element)),r},JsdocTypeTuple:(e,t)=>({type:"JsdocTypeTuple",elements:e.elements.map(t)}),JsdocTypeName:e=>e,JsdocTypeFunction:(e,t)=>{const r={type:"JsdocTypeFunction",arrow:e.arrow,parameters:e.parameters.map(t),constructor:e.constructor,parenthesis:e.parenthesis};return e.returnType!==void 0&&(r.returnType=t(e.returnType)),r},JsdocTypeKeyof:(e,t)=>({type:"JsdocTypeKeyof",element:t(e.element)}),JsdocTypeParenthesis:(e,t)=>({type:"JsdocTypeParenthesis",element:t(e.element)}),JsdocTypeProperty:e=>e,JsdocTypePredicate:(e,t)=>({type:"JsdocTypePredicate",left:t(e.left),right:t(e.right)}),JsdocTypeIndexSignature:(e,t)=>({type:"JsdocTypeIndexSignature",key:e.key,right:t(e.right)}),JsdocTypeMappedType:(e,t)=>({type:"JsdocTypeMappedType",key:e.key,right:t(e.right)}),JsdocTypeAsserts:(e,t)=>({type:"JsdocTypeAsserts",left:t(e.left),right:t(e.right)})}}const Ke={JsdocTypeAny:[],JsdocTypeFunction:["parameters","returnType"],JsdocTypeGeneric:["left","elements"],JsdocTypeImport:[],JsdocTypeIndexSignature:["right"],JsdocTypeIntersection:["elements"],JsdocTypeKeyof:["element"],JsdocTypeKeyValue:["right"],JsdocTypeMappedType:["right"],JsdocTypeName:[],JsdocTypeNamePath:["left","right"],JsdocTypeNotNullable:["element"],JsdocTypeNull:[],JsdocTypeNullable:["element"],JsdocTypeNumber:[],JsdocTypeObject:["elements"],JsdocTypeObjectField:["right"],JsdocTypeJsdocObjectField:["left","right"],JsdocTypeOptional:["element"],JsdocTypeParenthesis:["element"],JsdocTypeSpecialNamePath:[],JsdocTypeStringValue:[],JsdocTypeSymbol:["element"],JsdocTypeTuple:["elements"],JsdocTypeTypeof:["element"],JsdocTypeUndefined:[],JsdocTypeUnion:["elements"],JsdocTypeUnknown:[],JsdocTypeVariadic:["element"],JsdocTypeProperty:[],JsdocTypePredicate:["left","right"],JsdocTypeAsserts:["left","right"]};function ge(e,t,r,s,c){s==null||s(e,t,r);const d=Ke[e.type];for(const T of d){const J=e[T];if(J!==void 0)if(Array.isArray(J))for(const x of J)ge(x,e,T,s,c);else ge(J,e,T,s,c)}c==null||c(e,t,r)}function bn(e,t,r){ge(e,void 0,void 0,t,r)}o.catharsisTransform=hn,o.identityTransformRules=Nn,o.jtpTransform=wn,o.parse=Ue,o.stringify=mn,o.stringifyRules=De,o.transform=q,o.traverse=bn,o.tryParse=yn,o.visitorKeys=Ke})}(B,B.exports)),B.exports}var Je=Pn(),vn=Object.defineProperty,l=(n,a)=>vn(n,"name",{value:a,configurable:!0});const{UnknownArgTypesError:Sn}=__STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS__;var xn=l(n=>n.name==="literal","isLiteral"),kn=l(n=>n.value.replace(/['|"]/g,""),"toEnumOption"),On=l(n=>{switch(n.type){case"function":return{name:"function"};case"object":let a={};return n.signature.properties.forEach(o=>{a[o.key]=Y(o.value)}),{name:"object",value:a};default:throw new Sn({type:n,language:"Flow"})}},"convertSig"),Y=l(n=>{var p,u,y,m;let{name:a,raw:o}=n,i={};switch(typeof o<"u"&&(i.raw=o),n.name){case"literal":return{...i,name:"other",value:n.value};case"string":case"number":case"symbol":case"boolean":return{...i,name:a};case"Array":return{...i,name:"array",value:n.elements.map(Y)};case"signature":return{...i,...On(n)};case"union":return(p=n.elements)!=null&&p.every(xn)?{...i,name:"enum",value:(u=n.elements)==null?void 0:u.map(kn)}:{...i,name:a,value:(y=n.elements)==null?void 0:y.map(Y)};case"intersection":return{...i,name:a,value:(m=n.elements)==null?void 0:m.map(Y)};default:return{...i,name:"other",value:a}}},"convert");function Be(n,a){let o={},i=Object.keys(n);for(let p=0;p<i.length;p++){let u=i[p],y=n[u];o[u]=a(y,u,n)}return o}l(Be,"mapValues");var Ce=/^['"]|['"]$/g,In=l(n=>n.replace(Ce,""),"trimQuotes"),An=l(n=>Ce.test(n),"includesQuotes"),Ye=l(n=>{let a=In(n);return An(n)||Number.isNaN(Number(a))?a:Number(a)},"parseLiteral"),Rn=/^\(.*\) => /,C=l(n=>{let{name:a,raw:o,computed:i,value:p}=n,u={};switch(typeof o<"u"&&(u.raw=o),a){case"enum":{let m=i?p:p.map(h=>Ye(h.value));return{...u,name:a,value:m}}case"string":case"number":case"symbol":return{...u,name:a};case"func":return{...u,name:"function"};case"bool":case"boolean":return{...u,name:"boolean"};case"arrayOf":case"array":return{...u,name:"array",value:p&&C(p)};case"object":return{...u,name:a};case"objectOf":return{...u,name:a,value:C(p)};case"shape":case"exact":let y=Be(p,m=>C(m));return{...u,name:"object",value:y};case"union":return{...u,name:"union",value:p.map(m=>C(m))};case"instanceOf":case"element":case"elementType":default:{if((a==null?void 0:a.indexOf("|"))>0)try{let E=a.split("|").map(N=>JSON.parse(N));return{...u,name:"enum",value:E}}catch{}let m=p?`${a}(${p})`:a,h=Rn.test(a)?"function":"other";return{...u,name:h,value:m}}}},"convert");const{UnknownArgTypesError:_n}=__STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS__;var Fn=l(n=>{switch(n.type){case"function":return{name:"function"};case"object":let a={};return n.signature.properties.forEach(o=>{a[o.key]=G(o.value)}),{name:"object",value:a};default:throw new _n({type:n,language:"Typescript"})}},"convertSig"),G=l(n=>{var p,u,y,m;let{name:a,raw:o}=n,i={};switch(typeof o<"u"&&(i.raw=o),n.name){case"string":case"number":case"symbol":case"boolean":return{...i,name:a};case"Array":return{...i,name:"array",value:n.elements.map(G)};case"signature":return{...i,...Fn(n)};case"union":let h;return(p=n.elements)!=null&&p.every(E=>E.name==="literal")?h={...i,name:"enum",value:(u=n.elements)==null?void 0:u.map(E=>Ye(E.value))}:h={...i,name:a,value:(y=n.elements)==null?void 0:y.map(G)},h;case"intersection":return{...i,name:a,value:(m=n.elements)==null?void 0:m.map(G)};default:return{...i,name:"other",value:a}}},"convert"),we=l(n=>{let{type:a,tsType:o,flowType:i}=n;try{if(a!=null)return C(a);if(o!=null)return G(o);if(i!=null)return Y(i)}catch(p){console.error(p)}return null},"convert"),Ln=["null","undefined"];function ae(n){return Ln.some(a=>a===n)}l(ae,"isDefaultValueBlacklisted");var jn=l(n=>{if(!n)return"";if(typeof n=="string")return n;throw new Error(`Description: expected string, got: ${JSON.stringify(n)}`)},"str");function Ne(n){return!!n.__docgenInfo}l(Ne,"hasDocgen");function Ge(n){return n!=null&&Object.keys(n).length>0}l(Ge,"isValidDocgenSection");function We(n,a){return Ne(n)?n.__docgenInfo[a]:null}l(We,"getDocgenSection");function Xe(n){return Ne(n)?jn(n.__docgenInfo.description):""}l(Xe,"getDocgenDescription");var _;(function(n){n.start="/**",n.nostart="/***",n.delim="*",n.end="*/"})(_=_||(_={}));function Qe(n){return/^\s+$/.test(n)}l(Qe,"isSpace");function He(n){let a=n.match(/\r+$/);return a==null?["",n]:[n.slice(-a[0].length),n.slice(0,-a[0].length)]}l(He,"splitCR");function j(n){let a=n.match(/^\s+/);return a==null?["",n]:[n.slice(0,a[0].length),n.slice(a[0].length)]}l(j,"splitSpace");function ze(n){return n.split(/\n/)}l(ze,"splitLines");function Ze(n={}){return Object.assign({tag:"",name:"",type:"",optional:!1,description:"",problems:[],source:[]},n)}l(Ze,"seedSpec");function et(n={}){return Object.assign({start:"",delimiter:"",postDelimiter:"",tag:"",postTag:"",name:"",postName:"",type:"",postType:"",description:"",end:"",lineEnd:""},n)}l(et,"seedTokens");var Un=/^@\S+/;function tt({fence:n="```"}={}){let a=nt(n),o=l((i,p)=>a(i)?!p:p,"toggleFence");return l(function(i){let p=[[]],u=!1;for(let y of i)Un.test(y.tokens.description)&&!u?p.push([y]):p[p.length-1].push(y),u=o(y.tokens.description,u);return p},"parseBlock")}l(tt,"getParser");function nt(n){return typeof n=="string"?a=>a.split(n).length%2===0:n}l(nt,"getFencer");function rt({startLine:n=0,markers:a=_}={}){let o=null,i=n;return l(function(p){let u=p,y=et();if([y.lineEnd,u]=He(u),[y.start,u]=j(u),o===null&&u.startsWith(a.start)&&!u.startsWith(a.nostart)&&(o=[],y.delimiter=u.slice(0,a.start.length),u=u.slice(a.start.length),[y.postDelimiter,u]=j(u)),o===null)return i++,null;let m=u.trimRight().endsWith(a.end);if(y.delimiter===""&&u.startsWith(a.delim)&&!u.startsWith(a.end)&&(y.delimiter=a.delim,u=u.slice(a.delim.length),[y.postDelimiter,u]=j(u)),m){let h=u.trimRight();y.end=u.slice(h.length-a.end.length),u=h.slice(0,-a.end.length)}if(y.description=u,o.push({number:i,source:p,tokens:y}),i++,m){let h=o.slice();return o=null,h}return null},"parseSource")}l(rt,"getParser");function at({tokenizers:n}){return l(function(a){var o;let i=Ze({source:a});for(let p of n)if(i=p(i),!((o=i.problems[i.problems.length-1])===null||o===void 0)&&o.critical)break;return i},"parseSpec")}l(at,"getParser");function ot(){return n=>{let{tokens:a}=n.source[0],o=a.description.match(/\s*(@(\S+))(\s*)/);return o===null?(n.problems.push({code:"spec:tag:prefix",message:'tag should start with "@" symbol',line:n.source[0].number,critical:!0}),n):(a.tag=o[1],a.postTag=o[3],a.description=a.description.slice(o[0].length),n.tag=o[2],n)}}l(ot,"tagTokenizer");function st(n="compact"){let a=it(n);return o=>{let i=0,p=[];for(let[m,{tokens:h}]of o.source.entries()){let E="";if(m===0&&h.description[0]!=="{")return o;for(let N of h.description)if(N==="{"&&i++,N==="}"&&i--,E+=N,i===0)break;if(p.push([h,E]),i===0)break}if(i!==0)return o.problems.push({code:"spec:type:unpaired-curlies",message:"unpaired curlies",line:o.source[0].number,critical:!0}),o;let u=[],y=p[0][0].postDelimiter.length;for(let[m,[h,E]]of p.entries())h.type=E,m>0&&(h.type=h.postDelimiter.slice(y)+E,h.postDelimiter=h.postDelimiter.slice(0,y)),[h.postType,h.description]=j(h.description.slice(E.length)),u.push(h.type);return u[0]=u[0].slice(1),u[u.length-1]=u[u.length-1].slice(0,-1),o.type=a(u),o}}l(st,"typeTokenizer");var Vn=l(n=>n.trim(),"trim");function it(n){return n==="compact"?a=>a.map(Vn).join(""):n==="preserve"?a=>a.join(`
2
+ `):n}l(it,"getJoiner");var Dn=l(n=>n&&n.startsWith('"')&&n.endsWith('"'),"isQuoted");function lt(){let n=l((a,{tokens:o},i)=>o.type===""?a:i,"typeEnd");return a=>{let{tokens:o}=a.source[a.source.reduce(n,0)],i=o.description.trimLeft(),p=i.split('"');if(p.length>1&&p[0]===""&&p.length%2===1)return a.name=p[1],o.name=`"${p[1]}"`,[o.postName,o.description]=j(i.slice(o.name.length)),a;let u=0,y="",m=!1,h;for(let N of i){if(u===0&&Qe(N))break;N==="["&&u++,N==="]"&&u--,y+=N}if(u!==0)return a.problems.push({code:"spec:name:unpaired-brackets",message:"unpaired brackets",line:a.source[0].number,critical:!0}),a;let E=y;if(y[0]==="["&&y[y.length-1]==="]"){m=!0,y=y.slice(1,-1);let N=y.split("=");if(y=N[0].trim(),N[1]!==void 0&&(h=N.slice(1).join("=").trim()),y==="")return a.problems.push({code:"spec:name:empty-name",message:"empty name",line:a.source[0].number,critical:!0}),a;if(h==="")return a.problems.push({code:"spec:name:empty-default",message:"empty default value",line:a.source[0].number,critical:!0}),a;if(!Dn(h)&&/=(?!>)/.test(h))return a.problems.push({code:"spec:name:invalid-default",message:"invalid default value syntax",line:a.source[0].number,critical:!0}),a}return a.optional=m,a.name=y,o.name=E,h!==void 0&&(a.default=h),[o.postName,o.description]=j(i.slice(o.name.length)),a}}l(lt,"nameTokenizer");function ct(n="compact",a=_){let o=be(n);return i=>(i.description=o(i.source,a),i)}l(ct,"descriptionTokenizer");function be(n){return n==="compact"?pt:n==="preserve"?ut:n}l(be,"getJoiner");function pt(n,a=_){return n.map(({tokens:{description:o}})=>o.trim()).filter(o=>o!=="").join(" ")}l(pt,"compactJoiner");var Kn=l((n,{tokens:a},o)=>a.type===""?n:o,"lineNo"),$n=l(({tokens:n})=>(n.delimiter===""?n.start:n.postDelimiter.slice(1))+n.description,"getDescription");function ut(n,a=_){if(n.length===0)return"";n[0].tokens.description===""&&n[0].tokens.delimiter===a.start&&(n=n.slice(1));let o=n[n.length-1];return o!==void 0&&o.tokens.description===""&&o.tokens.end.endsWith(a.end)&&(n=n.slice(0,-1)),n=n.slice(n.reduce(Kn,0)),n.map($n).join(`
3
+ `)}l(ut,"preserveJoiner");function yt({startLine:n=0,fence:a="```",spacing:o="compact",markers:i=_,tokenizers:p=[ot(),st(o),lt(),ct(o)]}={}){if(n<0||n%1>0)throw new Error("Invalid startLine");let u=rt({startLine:n,markers:i}),y=tt({fence:a}),m=at({tokenizers:p}),h=be(o);return function(E){let N=[];for(let oe of ze(E)){let D=u(oe);if(D===null)continue;let X=y(D),Q=X.slice(1).map(m);N.push({description:h(X[0],i),tags:Q,source:D,problems:Q.reduce((P,se)=>P.concat(se.problems),[])})}return N}}l(yt,"getParser");function dt(n){return n.start+n.delimiter+n.postDelimiter+n.tag+n.postTag+n.type+n.postType+n.name+n.postName+n.description+n.end+n.lineEnd}l(dt,"join");function qn(){return n=>n.source.map(({tokens:a})=>dt(a)).join(`
4
+ `)}l(qn,"getStringifier");function mt(n,a={}){return yt(a)(n)}l(mt,"parse");function ft(n){return n!=null&&n.includes("@")}l(ft,"containsJsDoc");function Tt(n){let a=`/**
5
+ `+(n??"").split(`
6
+ `).map(i=>` * ${i}`).join(`
7
+ `)+`
8
+ */`,o=mt(a,{spacing:"preserve"});if(!o||o.length===0)throw new Error("Cannot parse JSDoc tags.");return o[0]}l(Tt,"parse");var Mn={tags:["param","arg","argument","returns","ignore","deprecated"]},Bn=l((n,a=Mn)=>{if(!ft(n))return{includesJsDoc:!1,ignore:!1};let o=Tt(n),i=ht(o,a.tags);return i.ignore?{includesJsDoc:!0,ignore:!0}:{includesJsDoc:!0,ignore:!1,description:o.description.trim(),extractedTags:i}},"parseJsDoc");function ht(n,a){let o={params:null,deprecated:null,returns:null,ignore:!1};for(let i of n.tags)if(!(a!==void 0&&!a.includes(i.tag)))if(i.tag==="ignore"){o.ignore=!0;break}else switch(i.tag){case"param":case"arg":case"argument":{let p=Jt(i);p!=null&&(o.params==null&&(o.params=[]),o.params.push(p));break}case"deprecated":{let p=wt(i);p!=null&&(o.deprecated=p);break}case"returns":{let p=Nt(i);p!=null&&(o.returns=p);break}}return o}l(ht,"extractJsDocTags");function gt(n){return n.replace(/[\.-]$/,"")}l(gt,"normaliseParamName");function Jt(n){if(!n.name||n.name==="-")return null;let a=ve(n.type);return{name:n.name,type:a,description:Pe(n.description),getPrettyName:l(()=>gt(n.name),"getPrettyName"),getTypeName:l(()=>a?Se(a):null,"getTypeName")}}l(Jt,"extractParam");function wt(n){return n.name?Ee(n.name,n.description):null}l(wt,"extractDeprecated");function Ee(n,a){let o=n===""?a:`${n} ${a}`;return Pe(o)}l(Ee,"joinNameAndDescription");function Pe(n){let a=n.replace(/^- /g,"").trim();return a===""?null:a}l(Pe,"normaliseDescription");function Nt(n){let a=ve(n.type);return a?{type:a,description:Ee(n.name,n.description),getTypeName:l(()=>Se(a),"getTypeName")}:null}l(Nt,"extractReturns");var F=Je.stringifyRules(),Cn=F.JsdocTypeObject;F.JsdocTypeAny=()=>"any";F.JsdocTypeObject=(n,a)=>`(${Cn(n,a)})`;F.JsdocTypeOptional=(n,a)=>a(n.element);F.JsdocTypeNullable=(n,a)=>a(n.element);F.JsdocTypeNotNullable=(n,a)=>a(n.element);F.JsdocTypeUnion=(n,a)=>n.elements.map(a).join("|");function ve(n){try{return Je.parse(n,"typescript")}catch{return null}}l(ve,"extractType");function Se(n){return Je.transform(F,n)}l(Se,"extractTypeName");function xe(n){return n.length>90}l(xe,"isTooLongForTypeSummary");function bt(n){return n.length>50}l(bt,"isTooLongForDefaultValueSummary");function b(n,a){return n===a?{summary:n}:{summary:n,detail:a}}l(b,"createSummaryValue");function Et(n,a){if(n!=null){let{value:o}=n;if(!ae(o))return bt(o)?b(a==null?void 0:a.name,o):b(o)}return null}l(Et,"createDefaultValue");function ke({name:n,value:a,elements:o,raw:i}){return a??(o!=null?o.map(ke).join(" | "):i??n)}l(ke,"generateUnionElement");function Pt({name:n,raw:a,elements:o}){return o!=null?b(o.map(ke).join(" | ")):a!=null?b(a.replace(/^\|\s*/,"")):b(n)}l(Pt,"generateUnion");function vt({type:n,raw:a}){return a!=null?b(a):b(n)}l(vt,"generateFuncSignature");function St({type:n,raw:a}){return a!=null?xe(a)?b(n,a):b(a):b(n)}l(St,"generateObjectSignature");function xt(n){let{type:a}=n;return a==="object"?St(n):vt(n)}l(xt,"generateSignature");function kt({name:n,raw:a}){return a!=null?xe(a)?b(n,a):b(a):b(n)}l(kt,"generateDefault");function Ot(n){if(n==null)return null;switch(n.name){case"union":return Pt(n);case"signature":return xt(n);default:return kt(n)}}l(Ot,"createType");var Yn=l((n,a)=>{let{flowType:o,description:i,required:p,defaultValue:u}=a;return{name:n,type:Ot(o),required:p,description:i,defaultValue:Et(u??null,o??null)}},"createFlowPropDef");function It({defaultValue:n}){if(n!=null){let{value:a}=n;if(!ae(a))return b(a)}return null}l(It,"createDefaultValue");function At({tsType:n,required:a}){if(n==null)return null;let o=n.name;return a||(o=o.replace(" | undefined","")),b(["Array","Record","signature"].includes(n.name)?n.raw:o)}l(At,"createType");var Gn=l((n,a)=>{let{description:o,required:i}=a;return{name:n,type:At(a),required:i,description:o,defaultValue:It(a)}},"createTsPropDef");function Rt(n){return n!=null?b(n.name):null}l(Rt,"createType");function _t(n){let{computed:a,func:o}=n;return typeof a>"u"&&typeof o>"u"}l(_t,"isReactDocgenTypescript");function Ft(n){return n?n.name==="string"?!0:n.name==="enum"?Array.isArray(n.value)&&n.value.every(({value:a})=>typeof a=="string"&&a[0]==='"'&&a[a.length-1]==='"'):!1:!1}l(Ft,"isStringValued");function Lt(n,a){if(n!=null){let{value:o}=n;if(!ae(o))return _t(n)&&Ft(a)?b(JSON.stringify(o)):b(o)}return null}l(Lt,"createDefaultValue");function Oe(n,a,o){let{description:i,required:p,defaultValue:u}=o;return{name:n,type:Rt(a),required:p,description:i,defaultValue:Lt(u,a)}}l(Oe,"createBasicPropDef");function W(n,a){var o;if(a!=null&&a.includesJsDoc){let{description:i,extractedTags:p}=a;i!=null&&(n.description=a.description);let u={...p,params:(o=p==null?void 0:p.params)==null?void 0:o.map(y=>({name:y.getPrettyName(),description:y.description}))};Object.values(u).filter(Boolean).length>0&&(n.jsDocTags=u)}return n}l(W,"applyJsDocResult");var Wn=l((n,a,o)=>{let i=Oe(n,a.type,a);return i.sbType=we(a),W(i,o)},"javaScriptFactory"),Xn=l((n,a,o)=>{let i=Gn(n,a);return i.sbType=we(a),W(i,o)},"tsFactory"),Qn=l((n,a,o)=>{let i=Yn(n,a);return i.sbType=we(a),W(i,o)},"flowFactory"),Hn=l((n,a,o)=>{let i=Oe(n,{name:"unknown"},a);return W(i,o)},"unknownFactory"),jt=l(n=>{switch(n){case"JavaScript":return Wn;case"TypeScript":return Xn;case"Flow":return Qn;default:return Hn}},"getPropDefFactory"),Ut=l(n=>n.type!=null?"JavaScript":n.flowType!=null?"Flow":n.tsType!=null?"TypeScript":"Unknown","getTypeSystem"),zn=l(n=>{let a=Ut(n[0]),o=jt(a);return n.map(i=>{var u;let p=i;return(u=i.type)!=null&&u.elements&&(p={...i,type:{...i.type,value:i.type.elements}}),Ie(p.name,p,a,o)})},"extractComponentSectionArray"),Zn=l(n=>{let a=Object.keys(n),o=Ut(n[a[0]]),i=jt(o);return a.map(p=>{let u=n[p];return u!=null?Ie(p,u,o,i):null}).filter(Boolean)},"extractComponentSectionObject"),ar=l((n,a)=>{let o=We(n,a);return Ge(o)?Array.isArray(o)?zn(o):Zn(o):[]},"extractComponentProps");function Ie(n,a,o,i){let p=Bn(a.description);return p.includesJsDoc&&p.ignore?null:{propDef:i(n,a,p),jsDocTags:p.extractedTags,docgenInfo:a,typeSystem:o}}l(Ie,"extractProp");function er(n){return n!=null?Xe(n):""}l(er,"extractComponentDescription");const{combineParameters:tr}=__STORYBOOK_MODULE_PREVIEW_API__;var or=l(n=>{let{component:a,argTypes:o,parameters:{docs:i={}}}=n,{extractArgTypes:p}=i,u=p&&a?p(a):{};return u?tr(u,o):o},"enhanceArgTypes"),nr="storybook/docs",sr=`${nr}/snippet-rendered`,rr=(n=>(n.AUTO="auto",n.CODE="code",n.DYNAMIC="dynamic",n))(rr||{});export{we as b,or as c,rr as g,er as n,ar as o,sr as y,Ne as z};
@@ -0,0 +1 @@
1
+ import{R as o}from"./DocsRenderer-CFRXHY34-Do1gGJEp.js";import"./iframe-DLKLJnYS.js";import"./_commonjsHelpers-CqkleIqs.js";import"./index-Bx-go_-4.js";import"./index-DrFu-skq.js";const e={},c=o.createContext(e);function m(t){const n=o.useContext(c);return o.useMemo(function(){return typeof t=="function"?t(n):{...n,...t}},[n,t])}function a(t){let n;return t.disableParentContext?n=typeof t.components=="function"?t.components(e):t.components||e:n=m(t.components),o.createElement(c.Provider,{value:n},t.children)}export{a as MDXProvider,m as useMDXComponents};
@@ -0,0 +1 @@
1
+ class P extends Error{}class Pn extends P{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class Gn extends P{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class Jn extends P{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class Q extends P{}class Zt extends P{constructor(e){super(`Invalid unit ${e}`)}}class N extends P{}class Z extends P{constructor(){super("Zone is an abstract class")}}const c="numeric",W="short",D="long",Ne={year:c,month:c,day:c},At={year:c,month:W,day:c},_n={year:c,month:W,day:c,weekday:W},zt={year:c,month:D,day:c},Ut={year:c,month:D,day:c,weekday:D},Rt={hour:c,minute:c},qt={hour:c,minute:c,second:c},Ht={hour:c,minute:c,second:c,timeZoneName:W},Yt={hour:c,minute:c,second:c,timeZoneName:D},Pt={hour:c,minute:c,hourCycle:"h23"},Gt={hour:c,minute:c,second:c,hourCycle:"h23"},Jt={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:W},_t={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:D},Bt={year:c,month:c,day:c,hour:c,minute:c},jt={year:c,month:c,day:c,hour:c,minute:c,second:c},Qt={year:c,month:W,day:c,hour:c,minute:c},Kt={year:c,month:W,day:c,hour:c,minute:c,second:c},Bn={year:c,month:W,day:c,weekday:W,hour:c,minute:c},Xt={year:c,month:D,day:c,hour:c,minute:c,timeZoneName:W},en={year:c,month:D,day:c,hour:c,minute:c,second:c,timeZoneName:W},tn={year:c,month:D,day:c,weekday:D,hour:c,minute:c,timeZoneName:D},nn={year:c,month:D,day:c,weekday:D,hour:c,minute:c,second:c,timeZoneName:D};class me{get type(){throw new Z}get name(){throw new Z}get ianaName(){return this.name}get isUniversal(){throw new Z}offsetName(e,t){throw new Z}formatOffset(e,t){throw new Z}offset(e){throw new Z}equals(e){throw new Z}get isValid(){throw new Z}}let Ve=null;class Ee extends me{static get instance(){return Ve===null&&(Ve=new Ee),Ve}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return mn(e,t,r)}formatOffset(e,t){return de(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}const qe=new Map;function jn(n){let e=qe.get(n);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),qe.set(n,e)),e}const Qn={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Kn(n,e){const t=n.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,i,a,o,u,l,f]=r;return[a,s,i,o,u,l,f]}function Xn(n,e){const t=n.formatToParts(e),r=[];for(let s=0;s<t.length;s++){const{type:i,value:a}=t[s],o=Qn[i];i==="era"?r[o]=a:h(o)||(r[o]=parseInt(a,10))}return r}const We=new Map;class $ extends me{static create(e){let t=We.get(e);return t===void 0&&We.set(e,t=new $(e)),t}static resetCache(){We.clear(),qe.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=$.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return mn(e,t,r,this.name)}formatOffset(e,t){return de(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const r=jn(this.name);let[s,i,a,o,u,l,f]=r.formatToParts?Xn(r,t):Kn(r,t);o==="BC"&&(s=-Math.abs(s)+1);const S=be({year:s,month:i,day:a,hour:u===24?0:u,minute:l,second:f,millisecond:0});let m=+t;const v=m%1e3;return m-=v>=0?v:1e3+v,(S-m)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let lt={};function er(n,e={}){const t=JSON.stringify([n,e]);let r=lt[t];return r||(r=new Intl.ListFormat(n,e),lt[t]=r),r}const He=new Map;function Ye(n,e={}){const t=JSON.stringify([n,e]);let r=He.get(t);return r===void 0&&(r=new Intl.DateTimeFormat(n,e),He.set(t,r)),r}const Pe=new Map;function tr(n,e={}){const t=JSON.stringify([n,e]);let r=Pe.get(t);return r===void 0&&(r=new Intl.NumberFormat(n,e),Pe.set(t,r)),r}const Ge=new Map;function nr(n,e={}){const{base:t,...r}=e,s=JSON.stringify([n,r]);let i=Ge.get(s);return i===void 0&&(i=new Intl.RelativeTimeFormat(n,e),Ge.set(s,i)),i}let le=null;function rr(){return le||(le=new Intl.DateTimeFormat().resolvedOptions().locale,le)}const Je=new Map;function rn(n){let e=Je.get(n);return e===void 0&&(e=new Intl.DateTimeFormat(n).resolvedOptions(),Je.set(n,e)),e}const _e=new Map;function sr(n){let e=_e.get(n);if(!e){const t=new Intl.Locale(n);e="getWeekInfo"in t?t.getWeekInfo():t.weekInfo,"minimalDays"in e||(e={...sn,...e}),_e.set(n,e)}return e}function ir(n){const e=n.indexOf("-x-");e!==-1&&(n=n.substring(0,e));const t=n.indexOf("-u-");if(t===-1)return[n];{let r,s;try{r=Ye(n).resolvedOptions(),s=n}catch{const u=n.substring(0,t);r=Ye(u).resolvedOptions(),s=u}const{numberingSystem:i,calendar:a}=r;return[s,i,a]}}function ar(n,e,t){return(t||e)&&(n.includes("-u-")||(n+="-u"),t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function or(n){const e=[];for(let t=1;t<=12;t++){const r=d.utc(2009,t,1);e.push(n(r))}return e}function ur(n){const e=[];for(let t=1;t<=7;t++){const r=d.utc(2016,11,13+t);e.push(n(r))}return e}function ke(n,e,t,r){const s=n.listingMode();return s==="error"?null:s==="en"?t(e):r(e)}function lr(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||rn(n.locale).numberingSystem==="latn"}class cr{constructor(e,t,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:s,floor:i,...a}=r;if(!t||Object.keys(a).length>0){const o={useGrouping:!1,...r};r.padTo>0&&(o.minimumIntegerDigits=r.padTo),this.inf=tr(e,o)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):rt(e,3);return O(t,this.padTo)}}}class fr{constructor(e,t,r){this.opts=r,this.originalZone=void 0;let s;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const a=-1*(e.offset/60),o=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;e.offset!==0&&$.create(o).valid?(s=o,this.dt=e):(s="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,s=e.zone.name):(s="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||s,this.dtf=Ye(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(t=>{if(t.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:r}}else return t}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class dr{constructor(e,t,r){this.opts={style:"long",...r},!t&&dn()&&(this.rtf=nr(e,r))}format(e,t){return this.rtf?this.rtf.format(e,t):Wr(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const sn={firstDay:1,minimalDays:4,weekend:[6,7]};class k{static fromOpts(e){return k.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,r,s,i=!1){const a=e||p.defaultLocale,o=a||(i?"en-US":rr()),u=t||p.defaultNumberingSystem,l=r||p.defaultOutputCalendar,f=je(s)||p.defaultWeekSettings;return new k(o,u,l,f,a)}static resetCache(){le=null,He.clear(),Pe.clear(),Ge.clear(),Je.clear(),_e.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:r,weekSettings:s}={}){return k.create(e,t,r,s)}constructor(e,t,r,s,i){const[a,o,u]=ir(e);this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=r||u||null,this.weekSettings=s,this.intl=ar(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=lr(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:k.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,je(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return ke(this,e,wn,()=>{const r=t?{month:e,day:"numeric"}:{month:e},s=t?"format":"standalone";return this.monthsCache[s][e]||(this.monthsCache[s][e]=or(i=>this.extract(i,r,"month"))),this.monthsCache[s][e]})}weekdays(e,t=!1){return ke(this,e,pn,()=>{const r=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=t?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=ur(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[s][e]})}meridiems(){return ke(this,void 0,()=>Sn,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[d.utc(2016,11,13,9),d.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return ke(this,e,On,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[d.utc(-40,1,1),d.utc(2017,1,1)].map(r=>this.extract(r,t,"era"))),this.eraCache[e]})}extract(e,t,r){const s=this.dtFormatter(e,t),i=s.formatToParts(),a=i.find(o=>o.type.toLowerCase()===r);return a?a.value:null}numberFormatter(e={}){return new cr(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new fr(e,this.intl,t)}relFormatter(e={}){return new dr(this.intl,this.isEnglish(),e)}listFormatter(e={}){return er(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||rn(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:hn()?sr(this.locale):sn}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Le=null;class I extends me{static get utcInstance(){return Le===null&&(Le=new I(0)),Le}static instance(e){return e===0?I.utcInstance:new I(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new I(Fe(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${de(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${de(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return de(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class hr extends me{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function U(n,e){if(h(n)||n===null)return e;if(n instanceof me)return n;if(Tr(n)){const t=n.toLowerCase();return t==="default"?e:t==="local"||t==="system"?Ee.instance:t==="utc"||t==="gmt"?I.utcInstance:I.parseSpecifier(t)||$.create(n)}else return R(n)?I.instance(n):typeof n=="object"&&"offset"in n&&typeof n.offset=="function"?n:new hr(n)}const Xe={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},ct={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},mr=Xe.hanidec.replace(/[\[|\]]/g,"").split("");function yr(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let t=0;t<n.length;t++){const r=n.charCodeAt(t);if(n[t].search(Xe.hanidec)!==-1)e+=mr.indexOf(n[t]);else for(const s in ct){const[i,a]=ct[s];r>=i&&r<=a&&(e+=r-i)}}return parseInt(e,10)}else return e}const Be=new Map;function gr(){Be.clear()}function F({numberingSystem:n},e=""){const t=n||"latn";let r=Be.get(t);r===void 0&&(r=new Map,Be.set(t,r));let s=r.get(e);return s===void 0&&(s=new RegExp(`${Xe[t]}${e}`),r.set(e,s)),s}let ft=()=>Date.now(),dt="system",ht=null,mt=null,yt=null,gt=60,wt,kt=null;class p{static get now(){return ft}static set now(e){ft=e}static set defaultZone(e){dt=e}static get defaultZone(){return U(dt,Ee.instance)}static get defaultLocale(){return ht}static set defaultLocale(e){ht=e}static get defaultNumberingSystem(){return mt}static set defaultNumberingSystem(e){mt=e}static get defaultOutputCalendar(){return yt}static set defaultOutputCalendar(e){yt=e}static get defaultWeekSettings(){return kt}static set defaultWeekSettings(e){kt=je(e)}static get twoDigitCutoffYear(){return gt}static set twoDigitCutoffYear(e){gt=e%100}static get throwOnInvalid(){return wt}static set throwOnInvalid(e){wt=e}static resetCaches(){k.resetCache(),$.resetCache(),d.resetCache(),gr()}}class V{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const an=[0,31,59,90,120,151,181,212,243,273,304,334],on=[0,31,60,91,121,152,182,213,244,274,305,335];function x(n,e){return new V("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function et(n,e,t){const r=new Date(Date.UTC(n,e-1,t));n<100&&n>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const s=r.getUTCDay();return s===0?7:s}function un(n,e,t){return t+(ye(n)?on:an)[e-1]}function ln(n,e){const t=ye(n)?on:an,r=t.findIndex(i=>i<e),s=e-t[r];return{month:r+1,day:s}}function tt(n,e){return(n-e+7)%7+1}function Me(n,e=4,t=1){const{year:r,month:s,day:i}=n,a=un(r,s,i),o=tt(et(r,s,i),t);let u=Math.floor((a-o+14-e)/7),l;return u<1?(l=r-1,u=he(l,e,t)):u>he(r,e,t)?(l=r+1,u=1):l=r,{weekYear:l,weekNumber:u,weekday:o,...Ce(n)}}function Tt(n,e=4,t=1){const{weekYear:r,weekNumber:s,weekday:i}=n,a=tt(et(r,1,e),t),o=K(r);let u=s*7+i-a-7+e,l;u<1?(l=r-1,u+=K(l)):u>o?(l=r+1,u-=K(r)):l=r;const{month:f,day:y}=ln(l,u);return{year:l,month:f,day:y,...Ce(n)}}function $e(n){const{year:e,month:t,day:r}=n,s=un(e,t,r);return{year:e,ordinal:s,...Ce(n)}}function pt(n){const{year:e,ordinal:t}=n,{month:r,day:s}=ln(e,t);return{year:e,month:r,day:s,...Ce(n)}}function St(n,e){if(!h(n.localWeekday)||!h(n.localWeekNumber)||!h(n.localWeekYear)){if(!h(n.weekday)||!h(n.weekNumber)||!h(n.weekYear))throw new Q("Cannot mix locale-based week fields with ISO-based week fields");return h(n.localWeekday)||(n.weekday=n.localWeekday),h(n.localWeekNumber)||(n.weekNumber=n.localWeekNumber),h(n.localWeekYear)||(n.weekYear=n.localWeekYear),delete n.localWeekday,delete n.localWeekNumber,delete n.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function wr(n,e=4,t=1){const r=xe(n.weekYear),s=b(n.weekNumber,1,he(n.weekYear,e,t)),i=b(n.weekday,1,7);return r?s?i?!1:x("weekday",n.weekday):x("week",n.weekNumber):x("weekYear",n.weekYear)}function kr(n){const e=xe(n.year),t=b(n.ordinal,1,K(n.year));return e?t?!1:x("ordinal",n.ordinal):x("year",n.year)}function cn(n){const e=xe(n.year),t=b(n.month,1,12),r=b(n.day,1,Ie(n.year,n.month));return e?t?r?!1:x("day",n.day):x("month",n.month):x("year",n.year)}function fn(n){const{hour:e,minute:t,second:r,millisecond:s}=n,i=b(e,0,23)||e===24&&t===0&&r===0&&s===0,a=b(t,0,59),o=b(r,0,59),u=b(s,0,999);return i?a?o?u?!1:x("millisecond",s):x("second",r):x("minute",t):x("hour",e)}function h(n){return typeof n>"u"}function R(n){return typeof n=="number"}function xe(n){return typeof n=="number"&&n%1===0}function Tr(n){return typeof n=="string"}function pr(n){return Object.prototype.toString.call(n)==="[object Date]"}function dn(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function hn(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Sr(n){return Array.isArray(n)?n:[n]}function Ot(n,e,t){if(n.length!==0)return n.reduce((r,s)=>{const i=[e(s),s];return r&&t(r[0],i[0])===r[0]?r:i},null)[1]}function Or(n,e){return e.reduce((t,r)=>(t[r]=n[r],t),{})}function ee(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function je(n){if(n==null)return null;if(typeof n!="object")throw new N("Week settings must be an object");if(!b(n.firstDay,1,7)||!b(n.minimalDays,1,7)||!Array.isArray(n.weekend)||n.weekend.some(e=>!b(e,1,7)))throw new N("Invalid week settings");return{firstDay:n.firstDay,minimalDays:n.minimalDays,weekend:Array.from(n.weekend)}}function b(n,e,t){return xe(n)&&n>=e&&n<=t}function vr(n,e){return n-e*Math.floor(n/e)}function O(n,e=2){const t=n<0;let r;return t?r="-"+(""+-n).padStart(e,"0"):r=(""+n).padStart(e,"0"),r}function z(n){if(!(h(n)||n===null||n===""))return parseInt(n,10)}function q(n){if(!(h(n)||n===null||n===""))return parseFloat(n)}function nt(n){if(!(h(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function rt(n,e,t=!1){const r=10**e;return(t?Math.trunc:Math.round)(n*r)/r}function ye(n){return n%4===0&&(n%100!==0||n%400===0)}function K(n){return ye(n)?366:365}function Ie(n,e){const t=vr(e-1,12)+1,r=n+(e-t)/12;return t===2?ye(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function be(n){let e=Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return n.year<100&&n.year>=0&&(e=new Date(e),e.setUTCFullYear(n.year,n.month-1,n.day)),+e}function vt(n,e,t){return-tt(et(n,1,e),t)+e-1}function he(n,e=4,t=1){const r=vt(n,e,t),s=vt(n+1,e,t);return(K(n)-r+s)/7}function Qe(n){return n>99?n:n>p.twoDigitCutoffYear?1900+n:2e3+n}function mn(n,e,t,r=null){const s=new Date(n),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:e,...i},o=new Intl.DateTimeFormat(t,a).formatToParts(s).find(u=>u.type.toLowerCase()==="timezonename");return o?o.value:null}function Fe(n,e){let t=parseInt(n,10);Number.isNaN(t)&&(t=0);const r=parseInt(e,10)||0,s=t<0||Object.is(t,-0)?-r:r;return t*60+s}function yn(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new N(`Invalid unit value ${n}`);return e}function De(n,e){const t={};for(const r in n)if(ee(n,r)){const s=n[r];if(s==null)continue;t[e(r)]=yn(s)}return t}function de(n,e){const t=Math.trunc(Math.abs(n/60)),r=Math.trunc(Math.abs(n%60)),s=n>=0?"+":"-";switch(e){case"short":return`${s}${O(t,2)}:${O(r,2)}`;case"narrow":return`${s}${t}${r>0?`:${r}`:""}`;case"techie":return`${s}${O(t,2)}${O(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Ce(n){return Or(n,["hour","minute","second","millisecond"])}const Nr=["January","February","March","April","May","June","July","August","September","October","November","December"],gn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Mr=["J","F","M","A","M","J","J","A","S","O","N","D"];function wn(n){switch(n){case"narrow":return[...Mr];case"short":return[...gn];case"long":return[...Nr];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const kn=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Tn=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ir=["M","T","W","T","F","S","S"];function pn(n){switch(n){case"narrow":return[...Ir];case"short":return[...Tn];case"long":return[...kn];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Sn=["AM","PM"],Dr=["Before Christ","Anno Domini"],Er=["BC","AD"],xr=["B","A"];function On(n){switch(n){case"narrow":return[...xr];case"short":return[...Er];case"long":return[...Dr];default:return null}}function br(n){return Sn[n.hour<12?0:1]}function Fr(n,e){return pn(e)[n.weekday-1]}function Cr(n,e){return wn(e)[n.month-1]}function Vr(n,e){return On(e)[n.year<0?0:1]}function Wr(n,e,t="always",r=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(n)===-1;if(t==="auto"&&i){const y=n==="days";switch(e){case 1:return y?"tomorrow":`next ${s[n][0]}`;case-1:return y?"yesterday":`last ${s[n][0]}`;case 0:return y?"today":`this ${s[n][0]}`}}const a=Object.is(e,-0)||e<0,o=Math.abs(e),u=o===1,l=s[n],f=r?u?l[1]:l[2]||l[1]:u?s[n][0]:n;return a?`${o} ${f} ago`:`in ${o} ${f}`}function Nt(n,e){let t="";for(const r of n)r.literal?t+=r.val:t+=e(r.val);return t}const Lr={D:Ne,DD:At,DDD:zt,DDDD:Ut,t:Rt,tt:qt,ttt:Ht,tttt:Yt,T:Pt,TT:Gt,TTT:Jt,TTTT:_t,f:Bt,ff:Qt,fff:Xt,ffff:tn,F:jt,FF:Kt,FFF:en,FFFF:nn};class M{static create(e,t={}){return new M(e,t)}static parseFormat(e){let t=null,r="",s=!1;const i=[];for(let a=0;a<e.length;a++){const o=e.charAt(a);o==="'"?(r.length>0&&i.push({literal:s||/^\s+$/.test(r),val:r}),t=null,r="",s=!s):s||o===t?r+=o:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=o,t=o)}return r.length>0&&i.push({literal:s||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(e){return Lr[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return O(e,t);const r={...this.opts};return t>0&&(r.padTo=t),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,t){const r=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(m,v)=>this.loc.extract(e,m,v),a=m=>e.isOffsetFixed&&e.offset===0&&m.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,m.format):"",o=()=>r?br(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),u=(m,v)=>r?Cr(e,m):i(v?{month:m}:{month:m,day:"numeric"},"month"),l=(m,v)=>r?Fr(e,m):i(v?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),f=m=>{const v=M.macroTokenToFormatOpts(m);return v?this.formatWithSystemDefault(e,v):m},y=m=>r?Vr(e,m):i({era:m},"era"),S=m=>{switch(m){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return o();case"d":return s?i({day:"numeric"},"day"):this.num(e.day);case"dd":return s?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return s?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return s?i({month:"numeric"},"month"):this.num(e.month);case"MM":return s?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return s?i({year:"numeric"},"year"):this.num(e.year);case"yy":return s?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return y("short");case"GG":return y("long");case"GGGGG":return y("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(m)}};return Nt(M.parseFormat(t),S)}formatDurationFromString(e,t){const r=u=>{switch(u[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=u=>l=>{const f=r(l);return f?this.num(u.get(f),l.length):l},i=M.parseFormat(t),a=i.reduce((u,{literal:l,val:f})=>l?u:u.concat(f),[]),o=e.shiftTo(...a.map(r).filter(u=>u));return Nt(i,s(o))}}const vn=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function te(...n){const e=n.reduce((t,r)=>t+r.source,"");return RegExp(`^${e}$`)}function ne(...n){return e=>n.reduce(([t,r,s],i)=>{const[a,o,u]=i(e,s);return[{...t,...a},o||r,u]},[{},null,1]).slice(0,2)}function re(n,...e){if(n==null)return[null,null];for(const[t,r]of e){const s=t.exec(n);if(s)return r(s)}return[null,null]}function Nn(...n){return(e,t)=>{const r={};let s;for(s=0;s<n.length;s++)r[n[s]]=z(e[t+s]);return[r,null,t+s]}}const Mn=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,$r=`(?:${Mn.source}?(?:\\[(${vn.source})\\])?)?`,st=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,In=RegExp(`${st.source}${$r}`),it=RegExp(`(?:T${In.source})?`),Zr=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Ar=/(\d{4})-?W(\d\d)(?:-?(\d))?/,zr=/(\d{4})-?(\d{3})/,Ur=Nn("weekYear","weekNumber","weekDay"),Rr=Nn("year","ordinal"),qr=/(\d{4})-(\d\d)-(\d\d)/,Dn=RegExp(`${st.source} ?(?:${Mn.source}|(${vn.source}))?`),Hr=RegExp(`(?: ${Dn.source})?`);function X(n,e,t){const r=n[e];return h(r)?t:z(r)}function Yr(n,e){return[{year:X(n,e),month:X(n,e+1,1),day:X(n,e+2,1)},null,e+3]}function se(n,e){return[{hours:X(n,e,0),minutes:X(n,e+1,0),seconds:X(n,e+2,0),milliseconds:nt(n[e+3])},null,e+4]}function ge(n,e){const t=!n[e]&&!n[e+1],r=Fe(n[e+1],n[e+2]),s=t?null:I.instance(r);return[{},s,e+3]}function we(n,e){const t=n[e]?$.create(n[e]):null;return[{},t,e+1]}const Pr=RegExp(`^T?${st.source}$`),Gr=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Jr(n){const[e,t,r,s,i,a,o,u,l]=n,f=e[0]==="-",y=u&&u[0]==="-",S=(m,v=!1)=>m!==void 0&&(v||m&&f)?-m:m;return[{years:S(q(t)),months:S(q(r)),weeks:S(q(s)),days:S(q(i)),hours:S(q(a)),minutes:S(q(o)),seconds:S(q(u),u==="-0"),milliseconds:S(nt(l),y)}]}const _r={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function at(n,e,t,r,s,i,a){const o={year:e.length===2?Qe(z(e)):z(e),month:gn.indexOf(t)+1,day:z(r),hour:z(s),minute:z(i)};return a&&(o.second=z(a)),n&&(o.weekday=n.length>3?kn.indexOf(n)+1:Tn.indexOf(n)+1),o}const Br=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function jr(n){const[,e,t,r,s,i,a,o,u,l,f,y]=n,S=at(e,s,r,t,i,a,o);let m;return u?m=_r[u]:l?m=0:m=Fe(f,y),[S,new I(m)]}function Qr(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Kr=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Xr=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,es=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Mt(n){const[,e,t,r,s,i,a,o]=n;return[at(e,s,r,t,i,a,o),I.utcInstance]}function ts(n){const[,e,t,r,s,i,a,o]=n;return[at(e,o,t,r,s,i,a),I.utcInstance]}const ns=te(Zr,it),rs=te(Ar,it),ss=te(zr,it),is=te(In),En=ne(Yr,se,ge,we),as=ne(Ur,se,ge,we),os=ne(Rr,se,ge,we),us=ne(se,ge,we);function ls(n){return re(n,[ns,En],[rs,as],[ss,os],[is,us])}function cs(n){return re(Qr(n),[Br,jr])}function fs(n){return re(n,[Kr,Mt],[Xr,Mt],[es,ts])}function ds(n){return re(n,[Gr,Jr])}const hs=ne(se);function ms(n){return re(n,[Pr,hs])}const ys=te(qr,Hr),gs=te(Dn),ws=ne(se,ge,we);function ks(n){return re(n,[ys,En],[gs,ws])}const It="Invalid Duration",xn={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Ts={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...xn},E=146097/400,_=146097/4800,ps={years:{quarters:4,months:12,weeks:E/7,days:E,hours:E*24,minutes:E*24*60,seconds:E*24*60*60,milliseconds:E*24*60*60*1e3},quarters:{months:3,weeks:E/28,days:E/4,hours:E*24/4,minutes:E*24*60/4,seconds:E*24*60*60/4,milliseconds:E*24*60*60*1e3/4},months:{weeks:_/7,days:_,hours:_*24,minutes:_*24*60,seconds:_*24*60*60,milliseconds:_*24*60*60*1e3},...xn},Y=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Ss=Y.slice(0).reverse();function A(n,e,t=!1){const r={values:t?e.values:{...n.values,...e.values||{}},loc:n.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||n.conversionAccuracy,matrix:e.matrix||n.matrix};return new g(r)}function bn(n,e){let t=e.milliseconds??0;for(const r of Ss.slice(1))e[r]&&(t+=e[r]*n[r].milliseconds);return t}function Dt(n,e){const t=bn(n,e)<0?-1:1;Y.reduceRight((r,s)=>{if(h(e[s]))return r;if(r){const i=e[r]*t,a=n[s][r],o=Math.floor(i/a);e[s]+=o*t,e[r]-=o*a*t}return s},null),Y.reduce((r,s)=>{if(h(e[s]))return r;if(r){const i=e[r]%1;e[r]-=i,e[s]+=i*n[r][s]}return s},null)}function Os(n){const e={};for(const[t,r]of Object.entries(n))r!==0&&(e[t]=r);return e}class g{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;let r=t?ps:Ts;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||k.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,t){return g.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new N(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new g({values:De(e,g.normalizeUnit),loc:k.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(R(e))return g.fromMillis(e);if(g.isDuration(e))return e;if(typeof e=="object")return g.fromObject(e);throw new N(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[r]=ds(e);return r?g.fromObject(r,t):g.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[r]=ms(e);return r?g.fromObject(r,t):g.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new N("need to specify a reason the Duration is invalid");const r=e instanceof V?e:new V(e,t);if(p.throwOnInvalid)throw new Jn(r);return new g({invalid:r})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new Zt(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const r={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?M.create(this.loc,r).formatDurationFromString(this,e):It}toHuman(e={}){if(!this.isValid)return It;const t=Y.map(r=>{const s=this.values[r];return h(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:r.slice(0,-1)}).format(s)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=rt(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},d.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?bn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=g.fromDurationLike(e),r={};for(const s of Y)(ee(t.values,s)||ee(this.values,s))&&(r[s]=t.get(s)+this.get(s));return A(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const t=g.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const r of Object.keys(this.values))t[r]=yn(e(this.values[r],r));return A(this,{values:t},!0)}get(e){return this[g.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...De(e,g.normalizeUnit)};return A(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:r,matrix:s}={}){const a={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:s,conversionAccuracy:r};return A(this,a)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Dt(this.matrix,e),A(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=Os(this.normalize().shiftToAll().toObject());return A(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(a=>g.normalizeUnit(a));const t={},r={},s=this.toObject();let i;for(const a of Y)if(e.indexOf(a)>=0){i=a;let o=0;for(const l in r)o+=this.matrix[l][a]*r[l],r[l]=0;R(s[a])&&(o+=s[a]);const u=Math.trunc(o);t[a]=u,r[a]=(o*1e3-u*1e3)/1e3}else R(s[a])&&(r[a]=s[a]);for(const a in r)r[a]!==0&&(t[i]+=a===i?r[a]:r[a]/this.matrix[i][a]);return Dt(this.matrix,t),A(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return A(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(r,s){return r===void 0||r===0?s===void 0||s===0:r===s}for(const r of Y)if(!t(this.values[r],e.values[r]))return!1;return!0}}const B="Invalid Interval";function vs(n,e){return!n||!n.isValid?T.invalid("missing or invalid start"):!e||!e.isValid?T.invalid("missing or invalid end"):e<n?T.invalid("end before start",`The end of an interval must be after its start, but you had start=${n.toISO()} and end=${e.toISO()}`):null}class T{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new N("need to specify a reason the Interval is invalid");const r=e instanceof V?e:new V(e,t);if(p.throwOnInvalid)throw new Gn(r);return new T({invalid:r})}static fromDateTimes(e,t){const r=ue(e),s=ue(t),i=vs(r,s);return i??new T({start:r,end:s})}static after(e,t){const r=g.fromDurationLike(t),s=ue(e);return T.fromDateTimes(s,s.plus(r))}static before(e,t){const r=g.fromDurationLike(t),s=ue(e);return T.fromDateTimes(s.minus(r),s)}static fromISO(e,t){const[r,s]=(e||"").split("/",2);if(r&&s){let i,a;try{i=d.fromISO(r,t),a=i.isValid}catch{a=!1}let o,u;try{o=d.fromISO(s,t),u=o.isValid}catch{u=!1}if(a&&u)return T.fromDateTimes(i,o);if(a){const l=g.fromISO(s,t);if(l.isValid)return T.after(i,l)}else if(u){const l=g.fromISO(r,t);if(l.isValid)return T.before(o,l)}}return T.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const r=this.start.startOf(e,t);let s;return t!=null&&t.useLocaleWeeks?s=this.end.reconfigure({locale:r.locale}):s=this.end,s=s.startOf(e,t),Math.floor(s.diff(r,e).get(e))+(s.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?T.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(ue).filter(a=>this.contains(a)).sort((a,o)=>a.toMillis()-o.toMillis()),r=[];let{s}=this,i=0;for(;s<this.e;){const a=t[i]||this.e,o=+a>+this.e?this.e:a;r.push(T.fromDateTimes(s,o)),s=o,i+=1}return r}splitBy(e){const t=g.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:r}=this,s=1,i;const a=[];for(;r<this.e;){const o=this.start.plus(t.mapUnits(u=>u*s));i=+o>+this.e?this.e:o,a.push(T.fromDateTimes(r,i)),r=i,s+=1}return a}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return t>=r?null:T.fromDateTimes(t,r)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return T.fromDateTimes(t,r)}static merge(e){const[t,r]=e.sort((s,i)=>s.s-i.s).reduce(([s,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[s,i.union(a)]:[s.concat([i]),a]:[s,a],[[],null]);return r&&t.push(r),t}static xor(e){let t=null,r=0;const s=[],i=e.map(u=>[{time:u.s,type:"s"},{time:u.e,type:"e"}]),a=Array.prototype.concat(...i),o=a.sort((u,l)=>u.time-l.time);for(const u of o)r+=u.type==="s"?1:-1,r===1?t=u.time:(t&&+t!=+u.time&&s.push(T.fromDateTimes(t,u.time)),t=null);return T.merge(s)}difference(...e){return T.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:B}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=Ne,t={}){return this.isValid?M.create(this.s.loc.clone(t),e).formatInterval(this):B}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:B}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:B}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:B}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:B}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):g.invalid(this.invalidReason)}mapEndpoints(e){return T.fromDateTimes(e(this.s),e(this.e))}}class Te{static hasDST(e=p.defaultZone){const t=d.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return $.isValidZone(e)}static normalizeZone(e){return U(e,p.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||k.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||k.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||k.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null,outputCalendar:i="gregory"}={}){return(s||k.create(t,r,i)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null,outputCalendar:i="gregory"}={}){return(s||k.create(t,r,i)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null}={}){return(s||k.create(t,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null}={}){return(s||k.create(t,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return k.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return k.create(t,null,"gregory").eras(e)}static features(){return{relative:dn(),localeWeek:hn()}}}function Et(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=t(e)-t(n);return Math.floor(g.fromMillis(r).as("days"))}function Ns(n,e,t){const r=[["years",(u,l)=>l.year-u.year],["quarters",(u,l)=>l.quarter-u.quarter+(l.year-u.year)*4],["months",(u,l)=>l.month-u.month+(l.year-u.year)*12],["weeks",(u,l)=>{const f=Et(u,l);return(f-f%7)/7}],["days",Et]],s={},i=n;let a,o;for(const[u,l]of r)t.indexOf(u)>=0&&(a=u,s[u]=l(n,e),o=i.plus(s),o>e?(s[u]--,n=i.plus(s),n>e&&(o=n,s[u]--,n=i.plus(s))):n=o);return[n,s,o,a]}function Ms(n,e,t,r){let[s,i,a,o]=Ns(n,e,t);const u=e-s,l=t.filter(y=>["hours","minutes","seconds","milliseconds"].indexOf(y)>=0);l.length===0&&(a<e&&(a=s.plus({[o]:1})),a!==s&&(i[o]=(i[o]||0)+u/(a-s)));const f=g.fromObject(i,r);return l.length>0?g.fromMillis(u,r).shiftTo(...l).plus(f):f}const Is="missing Intl.DateTimeFormat.formatToParts support";function w(n,e=t=>t){return{regex:n,deser:([t])=>e(yr(t))}}const Ds=" ",Fn=`[ ${Ds}]`,Cn=new RegExp(Fn,"g");function Es(n){return n.replace(/\./g,"\\.?").replace(Cn,Fn)}function xt(n){return n.replace(/\./g,"").replace(Cn," ").toLowerCase()}function C(n,e){return n===null?null:{regex:RegExp(n.map(Es).join("|")),deser:([t])=>n.findIndex(r=>xt(t)===xt(r))+e}}function bt(n,e){return{regex:n,deser:([,t,r])=>Fe(t,r),groups:e}}function pe(n){return{regex:n,deser:([e])=>e}}function xs(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function bs(n,e){const t=F(e),r=F(e,"{2}"),s=F(e,"{3}"),i=F(e,"{4}"),a=F(e,"{6}"),o=F(e,"{1,2}"),u=F(e,"{1,3}"),l=F(e,"{1,6}"),f=F(e,"{1,9}"),y=F(e,"{2,4}"),S=F(e,"{4,6}"),m=L=>({regex:RegExp(xs(L.val)),deser:([J])=>J,literal:!0}),G=(L=>{if(n.literal)return m(L);switch(L.val){case"G":return C(e.eras("short"),0);case"GG":return C(e.eras("long"),0);case"y":return w(l);case"yy":return w(y,Qe);case"yyyy":return w(i);case"yyyyy":return w(S);case"yyyyyy":return w(a);case"M":return w(o);case"MM":return w(r);case"MMM":return C(e.months("short",!0),1);case"MMMM":return C(e.months("long",!0),1);case"L":return w(o);case"LL":return w(r);case"LLL":return C(e.months("short",!1),1);case"LLLL":return C(e.months("long",!1),1);case"d":return w(o);case"dd":return w(r);case"o":return w(u);case"ooo":return w(s);case"HH":return w(r);case"H":return w(o);case"hh":return w(r);case"h":return w(o);case"mm":return w(r);case"m":return w(o);case"q":return w(o);case"qq":return w(r);case"s":return w(o);case"ss":return w(r);case"S":return w(u);case"SSS":return w(s);case"u":return pe(f);case"uu":return pe(o);case"uuu":return w(t);case"a":return C(e.meridiems(),0);case"kkkk":return w(i);case"kk":return w(y,Qe);case"W":return w(o);case"WW":return w(r);case"E":case"c":return w(t);case"EEE":return C(e.weekdays("short",!1),1);case"EEEE":return C(e.weekdays("long",!1),1);case"ccc":return C(e.weekdays("short",!0),1);case"cccc":return C(e.weekdays("long",!0),1);case"Z":case"ZZ":return bt(new RegExp(`([+-]${o.source})(?::(${r.source}))?`),2);case"ZZZ":return bt(new RegExp(`([+-]${o.source})(${r.source})?`),2);case"z":return pe(/[a-z_+-/]{1,256}?/i);case" ":return pe(/[^\S\n\r]/);default:return m(L)}})(n)||{invalidReason:Is};return G.token=n,G}const Fs={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Cs(n,e,t){const{type:r,value:s}=n;if(r==="literal"){const u=/^\s+$/.test(s);return{literal:!u,val:u?" ":s}}const i=e[r];let a=r;r==="hour"&&(e.hour12!=null?a=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?a="hour12":a="hour24":a=t.hour12?"hour12":"hour24");let o=Fs[a];if(typeof o=="object"&&(o=o[i]),o)return{literal:!1,val:o}}function Vs(n){return[`^${n.map(t=>t.regex).reduce((t,r)=>`${t}(${r.source})`,"")}$`,n]}function Ws(n,e,t){const r=n.match(e);if(r){const s={};let i=1;for(const a in t)if(ee(t,a)){const o=t[a],u=o.groups?o.groups+1:1;!o.literal&&o.token&&(s[o.token.val[0]]=o.deser(r.slice(i,i+u))),i+=u}return[r,s]}else return[r,{}]}function Ls(n){const e=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let t=null,r;return h(n.z)||(t=$.create(n.z)),h(n.Z)||(t||(t=new I(n.Z)),r=n.Z),h(n.q)||(n.M=(n.q-1)*3+1),h(n.h)||(n.h<12&&n.a===1?n.h+=12:n.h===12&&n.a===0&&(n.h=0)),n.G===0&&n.y&&(n.y=-n.y),h(n.u)||(n.S=nt(n.u)),[Object.keys(n).reduce((i,a)=>{const o=e(a);return o&&(i[o]=n[a]),i},{}),t,r]}let Ze=null;function $s(){return Ze||(Ze=d.fromMillis(1555555555555)),Ze}function Zs(n,e){if(n.literal)return n;const t=M.macroTokenToFormatOpts(n.val),r=$n(t,e);return r==null||r.includes(void 0)?n:r}function Vn(n,e){return Array.prototype.concat(...n.map(t=>Zs(t,e)))}class Wn{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Vn(M.parseFormat(t),e),this.units=this.tokens.map(r=>bs(r,e)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,s]=Vs(this.units);this.regex=RegExp(r,"i"),this.handlers=s}}explainFromTokens(e){if(this.isValid){const[t,r]=Ws(e,this.regex,this.handlers),[s,i,a]=r?Ls(r):[null,null,void 0];if(ee(r,"a")&&ee(r,"H"))throw new Q("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:r,result:s,zone:i,specificOffset:a}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Ln(n,e,t){return new Wn(n,t).explainFromTokens(e)}function As(n,e,t){const{result:r,zone:s,specificOffset:i,invalidReason:a}=Ln(n,e,t);return[r,s,i,a]}function $n(n,e){if(!n)return null;const r=M.create(e,n).dtFormatter($s()),s=r.formatToParts(),i=r.resolvedOptions();return s.map(a=>Cs(a,n,i))}const Ae="Invalid DateTime",zs=864e13;function ce(n){return new V("unsupported zone",`the zone "${n.name}" is not supported`)}function ze(n){return n.weekData===null&&(n.weekData=Me(n.c)),n.weekData}function Ue(n){return n.localWeekData===null&&(n.localWeekData=Me(n.c,n.loc.getMinDaysInFirstWeek(),n.loc.getStartOfWeek())),n.localWeekData}function H(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new d({...t,...e,old:t})}function Zn(n,e,t){let r=n-e*60*1e3;const s=t.offset(r);if(e===s)return[r,e];r-=(s-e)*60*1e3;const i=t.offset(r);return s===i?[r,s]:[n-Math.min(s,i)*60*1e3,Math.max(s,i)]}function Se(n,e){n+=e*60*1e3;const t=new Date(n);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function ve(n,e,t){return Zn(be(n),e,t)}function Ft(n,e){const t=n.o,r=n.c.year+Math.trunc(e.years),s=n.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,i={...n.c,year:r,month:s,day:Math.min(n.c.day,Ie(r,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},a=g.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),o=be(i);let[u,l]=Zn(o,t,n.zone);return a!==0&&(u+=a,l=n.zone.offset(u)),{ts:u,o:l}}function j(n,e,t,r,s,i){const{setZone:a,zone:o}=t;if(n&&Object.keys(n).length!==0||e){const u=e||o,l=d.fromObject(n,{...t,zone:u,specificOffset:i});return a?l:l.setZone(o)}else return d.invalid(new V("unparsable",`the input "${s}" can't be parsed as ${r}`))}function Oe(n,e,t=!0){return n.isValid?M.create(k.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function Re(n,e){const t=n.c.year>9999||n.c.year<0;let r="";return t&&n.c.year>=0&&(r+="+"),r+=O(n.c.year,t?6:4),e?(r+="-",r+=O(n.c.month),r+="-",r+=O(n.c.day)):(r+=O(n.c.month),r+=O(n.c.day)),r}function Ct(n,e,t,r,s,i){let a=O(n.c.hour);return e?(a+=":",a+=O(n.c.minute),(n.c.millisecond!==0||n.c.second!==0||!t)&&(a+=":")):a+=O(n.c.minute),(n.c.millisecond!==0||n.c.second!==0||!t)&&(a+=O(n.c.second),(n.c.millisecond!==0||!r)&&(a+=".",a+=O(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!i?a+="Z":n.o<0?(a+="-",a+=O(Math.trunc(-n.o/60)),a+=":",a+=O(Math.trunc(-n.o%60))):(a+="+",a+=O(Math.trunc(n.o/60)),a+=":",a+=O(Math.trunc(n.o%60)))),i&&(a+="["+n.zone.ianaName+"]"),a}const An={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Us={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Rs={ordinal:1,hour:0,minute:0,second:0,millisecond:0},zn=["year","month","day","hour","minute","second","millisecond"],qs=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Hs=["year","ordinal","hour","minute","second","millisecond"];function Ys(n){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[n.toLowerCase()];if(!e)throw new Zt(n);return e}function Vt(n){switch(n.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Ys(n)}}function Ps(n){if(fe===void 0&&(fe=p.now()),n.type!=="iana")return n.offset(fe);const e=n.name;let t=Ke.get(e);return t===void 0&&(t=n.offset(fe),Ke.set(e,t)),t}function Wt(n,e){const t=U(e.zone,p.defaultZone);if(!t.isValid)return d.invalid(ce(t));const r=k.fromObject(e);let s,i;if(h(n.year))s=p.now();else{for(const u of zn)h(n[u])&&(n[u]=An[u]);const a=cn(n)||fn(n);if(a)return d.invalid(a);const o=Ps(t);[s,i]=ve(n,o,t)}return new d({ts:s,zone:t,loc:r,o:i})}function Lt(n,e,t){const r=h(t.round)?!0:t.round,s=(a,o)=>(a=rt(a,r||t.calendary?0:2,!0),e.loc.clone(t).relFormatter(t).format(a,o)),i=a=>t.calendary?e.hasSame(n,a)?0:e.startOf(a).diff(n.startOf(a),a).get(a):e.diff(n,a).get(a);if(t.unit)return s(i(t.unit),t.unit);for(const a of t.units){const o=i(a);if(Math.abs(o)>=1)return s(o,a)}return s(n>e?-0:0,t.units[t.units.length-1])}function $t(n){let e={},t;return n.length>0&&typeof n[n.length-1]=="object"?(e=n[n.length-1],t=Array.from(n).slice(0,n.length-1)):t=Array.from(n),[e,t]}let fe;const Ke=new Map;class d{constructor(e){const t=e.zone||p.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new V("invalid input"):null)||(t.isValid?null:ce(t));this.ts=h(e.ts)?p.now():e.ts;let s=null,i=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,i]=[e.old.c,e.old.o];else{const o=R(e.o)&&!e.old?e.o:t.offset(this.ts);s=Se(this.ts,o),r=Number.isNaN(s.year)?new V("invalid input"):null,s=r?null:s,i=r?null:o}this._zone=t,this.loc=e.loc||k.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=s,this.o=i,this.isLuxonDateTime=!0}static now(){return new d({})}static local(){const[e,t]=$t(arguments),[r,s,i,a,o,u,l]=t;return Wt({year:r,month:s,day:i,hour:a,minute:o,second:u,millisecond:l},e)}static utc(){const[e,t]=$t(arguments),[r,s,i,a,o,u,l]=t;return e.zone=I.utcInstance,Wt({year:r,month:s,day:i,hour:a,minute:o,second:u,millisecond:l},e)}static fromJSDate(e,t={}){const r=pr(e)?e.valueOf():NaN;if(Number.isNaN(r))return d.invalid("invalid input");const s=U(t.zone,p.defaultZone);return s.isValid?new d({ts:r,zone:s,loc:k.fromObject(t)}):d.invalid(ce(s))}static fromMillis(e,t={}){if(R(e))return e<-864e13||e>zs?d.invalid("Timestamp out of range"):new d({ts:e,zone:U(t.zone,p.defaultZone),loc:k.fromObject(t)});throw new N(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(R(e))return new d({ts:e*1e3,zone:U(t.zone,p.defaultZone),loc:k.fromObject(t)});throw new N("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const r=U(t.zone,p.defaultZone);if(!r.isValid)return d.invalid(ce(r));const s=k.fromObject(t),i=De(e,Vt),{minDaysInFirstWeek:a,startOfWeek:o}=St(i,s),u=p.now(),l=h(t.specificOffset)?r.offset(u):t.specificOffset,f=!h(i.ordinal),y=!h(i.year),S=!h(i.month)||!h(i.day),m=y||S,v=i.weekYear||i.weekNumber;if((m||f)&&v)throw new Q("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(S&&f)throw new Q("Can't mix ordinal dates with month/day");const G=v||i.weekday&&!m;let L,J,ie=Se(u,l);G?(L=qs,J=Us,ie=Me(ie,a,o)):f?(L=Hs,J=Rs,ie=$e(ie)):(L=zn,J=An);let ot=!1;for(const oe of L){const Yn=i[oe];h(Yn)?ot?i[oe]=J[oe]:i[oe]=ie[oe]:ot=!0}const Un=G?wr(i,a,o):f?kr(i):cn(i),ut=Un||fn(i);if(ut)return d.invalid(ut);const Rn=G?Tt(i,a,o):f?pt(i):i,[qn,Hn]=ve(Rn,l,r),ae=new d({ts:qn,zone:r,o:Hn,loc:s});return i.weekday&&m&&e.weekday!==ae.weekday?d.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${ae.toISO()}`):ae.isValid?ae:d.invalid(ae.invalid)}static fromISO(e,t={}){const[r,s]=ls(e);return j(r,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[r,s]=cs(e);return j(r,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[r,s]=fs(e);return j(r,s,t,"HTTP",t)}static fromFormat(e,t,r={}){if(h(e)||h(t))throw new N("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:i=null}=r,a=k.fromOpts({locale:s,numberingSystem:i,defaultToEN:!0}),[o,u,l,f]=As(a,e,t);return f?d.invalid(f):j(o,u,r,`format ${t}`,e,l)}static fromString(e,t,r={}){return d.fromFormat(e,t,r)}static fromSQL(e,t={}){const[r,s]=ks(e);return j(r,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new N("need to specify a reason the DateTime is invalid");const r=e instanceof V?e:new V(e,t);if(p.throwOnInvalid)throw new Pn(r);return new d({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const r=$n(e,k.fromObject(t));return r?r.map(s=>s?s.val:null).join(""):null}static expandFormat(e,t={}){return Vn(M.parseFormat(e),k.fromObject(t)).map(s=>s.val).join("")}static resetCache(){fe=void 0,Ke.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?ze(this).weekYear:NaN}get weekNumber(){return this.isValid?ze(this).weekNumber:NaN}get weekday(){return this.isValid?ze(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Ue(this).weekday:NaN}get localWeekNumber(){return this.isValid?Ue(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Ue(this).weekYear:NaN}get ordinal(){return this.isValid?$e(this.c).ordinal:NaN}get monthShort(){return this.isValid?Te.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Te.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Te.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Te.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,r=be(this.c),s=this.zone.offset(r-e),i=this.zone.offset(r+e),a=this.zone.offset(r-s*t),o=this.zone.offset(r-i*t);if(a===o)return[this];const u=r-a*t,l=r-o*t,f=Se(u,a),y=Se(l,o);return f.hour===y.hour&&f.minute===y.minute&&f.second===y.second&&f.millisecond===y.millisecond?[H(this,{ts:u}),H(this,{ts:l})]:[this]}get isInLeapYear(){return ye(this.year)}get daysInMonth(){return Ie(this.year,this.month)}get daysInYear(){return this.isValid?K(this.year):NaN}get weeksInWeekYear(){return this.isValid?he(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?he(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:r,calendar:s}=M.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:r,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(I.instance(e),t)}toLocal(){return this.setZone(p.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:r=!1}={}){if(e=U(e,p.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||r){const i=e.offset(this.ts),a=this.toObject();[s]=ve(a,i,e)}return H(this,{ts:s,zone:e})}else return d.invalid(ce(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:r}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:r});return H(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=De(e,Vt),{minDaysInFirstWeek:r,startOfWeek:s}=St(t,this.loc),i=!h(t.weekYear)||!h(t.weekNumber)||!h(t.weekday),a=!h(t.ordinal),o=!h(t.year),u=!h(t.month)||!h(t.day),l=o||u,f=t.weekYear||t.weekNumber;if((l||a)&&f)throw new Q("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&a)throw new Q("Can't mix ordinal dates with month/day");let y;i?y=Tt({...Me(this.c,r,s),...t},r,s):h(t.ordinal)?(y={...this.toObject(),...t},h(t.day)&&(y.day=Math.min(Ie(y.year,y.month),y.day))):y=pt({...$e(this.c),...t});const[S,m]=ve(y,this.o,this.zone);return H(this,{ts:S,o:m})}plus(e){if(!this.isValid)return this;const t=g.fromDurationLike(e);return H(this,Ft(this,t))}minus(e){if(!this.isValid)return this;const t=g.fromDurationLike(e).negate();return H(this,Ft(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const r={},s=g.normalizeUnit(e);switch(s){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(s==="weeks")if(t){const i=this.loc.getStartOfWeek(),{weekday:a}=this;a<i&&(r.weekNumber=this.weekNumber-1),r.weekday=i}else r.weekday=1;if(s==="quarters"){const i=Math.ceil(this.month/3);r.month=(i-1)*3+1}return this.set(r)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?M.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Ae}toLocaleString(e=Ne,t={}){return this.isValid?M.create(this.loc.clone(t),e).formatDateTime(this):Ae}toLocaleParts(e={}){return this.isValid?M.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:r=!1,includeOffset:s=!0,extendedZone:i=!1}={}){if(!this.isValid)return null;const a=e==="extended";let o=Re(this,a);return o+="T",o+=Ct(this,a,t,r,s,i),o}toISODate({format:e="extended"}={}){return this.isValid?Re(this,e==="extended"):null}toISOWeekDate(){return Oe(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:r=!0,includePrefix:s=!1,extendedZone:i=!1,format:a="extended"}={}){return this.isValid?(s?"T":"")+Ct(this,a==="extended",t,e,r,i):null}toRFC2822(){return Oe(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Oe(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Re(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:r=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(r&&(s+=" "),t?s+="z":e&&(s+="ZZ")),Oe(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Ae}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",r={}){if(!this.isValid||!e.isValid)return g.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...r},i=Sr(t).map(g.normalizeUnit),a=e.valueOf()>this.valueOf(),o=a?this:e,u=a?e:this,l=Ms(o,u,i,s);return a?l.negate():l}diffNow(e="milliseconds",t={}){return this.diff(d.now(),e,t)}until(e){return this.isValid?T.fromDateTimes(this,e):this}hasSame(e,t,r){if(!this.isValid)return!1;const s=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,r)<=s&&s<=i.endOf(t,r)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||d.fromObject({},{zone:this.zone}),r=e.padding?this<t?-e.padding:e.padding:0;let s=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(s=e.unit,i=void 0),Lt(t,this.plus(r),{...e,numeric:"always",units:s,unit:i})}toRelativeCalendar(e={}){return this.isValid?Lt(e.base||d.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(d.isDateTime))throw new N("min requires all arguments be DateTimes");return Ot(e,t=>t.valueOf(),Math.min)}static max(...e){if(!e.every(d.isDateTime))throw new N("max requires all arguments be DateTimes");return Ot(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,r={}){const{locale:s=null,numberingSystem:i=null}=r,a=k.fromOpts({locale:s,numberingSystem:i,defaultToEN:!0});return Ln(a,e,t)}static fromStringExplain(e,t,r={}){return d.fromFormatExplain(e,t,r)}static buildFormatParser(e,t={}){const{locale:r=null,numberingSystem:s=null}=t,i=k.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0});return new Wn(i,e)}static fromFormatParser(e,t,r={}){if(h(e)||h(t))throw new N("fromFormatParser requires an input string and a format parser");const{locale:s=null,numberingSystem:i=null}=r,a=k.fromOpts({locale:s,numberingSystem:i,defaultToEN:!0});if(!a.equals(t.locale))throw new N(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${t.locale}`);const{result:o,zone:u,specificOffset:l,invalidReason:f}=t.explainFromTokens(e);return f?d.invalid(f):j(o,u,r,`format ${t.format}`,e,l)}static get DATE_SHORT(){return Ne}static get DATE_MED(){return At}static get DATE_MED_WITH_WEEKDAY(){return _n}static get DATE_FULL(){return zt}static get DATE_HUGE(){return Ut}static get TIME_SIMPLE(){return Rt}static get TIME_WITH_SECONDS(){return qt}static get TIME_WITH_SHORT_OFFSET(){return Ht}static get TIME_WITH_LONG_OFFSET(){return Yt}static get TIME_24_SIMPLE(){return Pt}static get TIME_24_WITH_SECONDS(){return Gt}static get TIME_24_WITH_SHORT_OFFSET(){return Jt}static get TIME_24_WITH_LONG_OFFSET(){return _t}static get DATETIME_SHORT(){return Bt}static get DATETIME_SHORT_WITH_SECONDS(){return jt}static get DATETIME_MED(){return Qt}static get DATETIME_MED_WITH_SECONDS(){return Kt}static get DATETIME_MED_WITH_WEEKDAY(){return Bn}static get DATETIME_FULL(){return Xt}static get DATETIME_FULL_WITH_SECONDS(){return en}static get DATETIME_HUGE(){return tn}static get DATETIME_HUGE_WITH_SECONDS(){return nn}}function ue(n){if(d.isDateTime(n))return n;if(n&&n.valueOf&&R(n.valueOf()))return d.fromJSDate(n);if(n&&typeof n=="object")return d.fromObject(n);throw new N(`Unknown datetime argument: ${n}, of type ${typeof n}`)}const Gs=()=>`_${Math.random().toString(36).substr(2,9)}`,Js=function({dateOne:e,dateTwo:t,format:r,locale:s}){let i="";return e&&(i=d.fromISO(e).toFormat(r,{locale:s})),t&&(i+=" - "+d.fromISO(t).toFormat(r,{locale:s})),i},_s=n=>typeof n!="string"?"":n.charAt(0).toUpperCase()+n.slice(1);export{d as D,Te as I,T as a,_s as c,Js as f,Gs as r};
@@ -0,0 +1,6 @@
1
+ function l(o){for(var f=[],i=1;i<arguments.length;i++)f[i-1]=arguments[i];var n=Array.from(typeof o=="string"?[o]:o);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var s=n.reduce(function(t,g){var a=g.match(/\n([\t ]+|(?!\s).)/g);return a?t.concat(a.map(function(u){var r,e;return(e=(r=u.match(/[\t ]/g))===null||r===void 0?void 0:r.length)!==null&&e!==void 0?e:0})):t},[]);if(s.length){var d=new RegExp(`
2
+ [ ]{`+Math.min.apply(Math,s)+"}","g");n=n.map(function(t){return t.replace(d,`
3
+ `)})}n[0]=n[0].replace(/^\r?\n/,"");var c=n[0];return f.forEach(function(t,g){var a=c.match(/(?:^|\n)( *)$/),u=a?a[1]:"",r=t;typeof t=="string"&&t.includes(`
4
+ `)&&(r=String(t).split(`
5
+ `).map(function(e,h){return h===0?e:""+u+e}).join(`
6
+ `)),c+=r+n[g+1]}),c}export{l as d};
@@ -0,0 +1,34 @@
1
+ import{d as P}from"./index-DrFu-skq.js";const{useEffect:_,useMemo:h}=__STORYBOOK_MODULE_PREVIEW_API__,{global:j}=__STORYBOOK_MODULE_GLOBAL__,{logger:X}=__STORYBOOK_MODULE_CLIENT_LOGGER__;var p="backgrounds",U={light:{name:"light",value:"#F8F8F8"},dark:{name:"dark",value:"#333"}},{document:b,window:O}=j,D=()=>{var r;return!!((r=O==null?void 0:O.matchMedia("(prefers-reduced-motion: reduce)"))!=null&&r.matches)},A=r=>{(Array.isArray(r)?r:[r]).forEach(N)},N=r=>{var t;let e=b.getElementById(r);e&&((t=e.parentElement)==null||t.removeChild(e))},F=(r,e)=>{let t=b.getElementById(r);if(t)t.innerHTML!==e&&(t.innerHTML=e);else{let o=b.createElement("style");o.setAttribute("id",r),o.innerHTML=e,b.head.appendChild(o)}},Y=(r,e,t)=>{var a;let o=b.getElementById(r);if(o)o.innerHTML!==e&&(o.innerHTML=e);else{let d=b.createElement("style");d.setAttribute("id",r),d.innerHTML=e;let i=`addon-backgrounds-grid${t?`-docs-${t}`:""}`,n=b.getElementById(i);n?(a=n.parentElement)==null||a.insertBefore(d,n):b.head.appendChild(d)}},W={cellSize:100,cellAmount:10,opacity:.8},w="addon-backgrounds",R="addon-backgrounds-grid",q=D()?"":"transition: background-color 0.3s;",J=(r,e)=>{let{globals:t,parameters:o,viewMode:a,id:d}=e,{options:i=U,disable:n,grid:s=W}=o[p]||{},c=t[p]||{},u=c.value,l=u?i[u]:void 0,$=(l==null?void 0:l.value)||"transparent",f=c.grid||!1,y=!!l&&!n,m=a==="docs"?`#anchor--${d} .docs-story`:".sb-show-main",E=a==="docs"?`#anchor--${d} .docs-story`:".sb-show-main",H=o.layout===void 0||o.layout==="padded",L=a==="docs"?20:H?16:0,{cellAmount:k,cellSize:g,opacity:x,offsetX:v=L,offsetY:S=L}=s,B=a==="docs"?`${w}-docs-${d}`:`${w}-color`,G=a==="docs"?d:null;_(()=>{let M=`
2
+ ${m} {
3
+ background: ${$} !important;
4
+ ${q}
5
+ }`;if(!y){A(B);return}Y(B,M,G)},[m,B,G,y,$]);let T=a==="docs"?`${R}-docs-${d}`:`${R}`;return _(()=>{if(!f){A(T);return}let M=[`${g*k}px ${g*k}px`,`${g*k}px ${g*k}px`,`${g}px ${g}px`,`${g}px ${g}px`].join(", "),K=`
6
+ ${E} {
7
+ background-size: ${M} !important;
8
+ background-position: ${v}px ${S}px, ${v}px ${S}px, ${v}px ${S}px, ${v}px ${S}px !important;
9
+ background-blend-mode: difference !important;
10
+ background-image: linear-gradient(rgba(130, 130, 130, ${x}) 1px, transparent 1px),
11
+ linear-gradient(90deg, rgba(130, 130, 130, ${x}) 1px, transparent 1px),
12
+ linear-gradient(rgba(130, 130, 130, ${x/2}) 1px, transparent 1px),
13
+ linear-gradient(90deg, rgba(130, 130, 130, ${x/2}) 1px, transparent 1px) !important;
14
+ }
15
+ `;F(T,K)},[k,g,E,T,f,v,S,x]),r()},Q=(r,e=[],t)=>{if(r==="transparent")return"transparent";if(e.find(a=>a.value===r)||r)return r;let o=e.find(a=>a.name===t);if(o)return o.value;if(t){let a=e.map(d=>d.name).join(", ");X.warn(P`
16
+ Backgrounds Addon: could not find the default color "${t}".
17
+ These are the available colors for your story based on your configuration:
18
+ ${a}.
19
+ `)}return"transparent"},Z=(r,e)=>{var u;let{globals:t,parameters:o}=e,a=(u=t[p])==null?void 0:u.value,d=o[p],i=h(()=>d.disable?"transparent":Q(a,d.values,d.default),[d,a]),n=h(()=>i&&i!=="transparent",[i]),s=e.viewMode==="docs"?`#anchor--${e.id} .docs-story`:".sb-show-main",c=h(()=>`
20
+ ${s} {
21
+ background: ${i} !important;
22
+ ${D()?"":"transition: background-color 0.3s;"}
23
+ }
24
+ `,[i,s]);return _(()=>{let l=e.viewMode==="docs"?`addon-backgrounds-docs-${e.id}`:"addon-backgrounds-color";if(!n){A(l);return}Y(l,c,e.viewMode==="docs"?e.id:null)},[n,c,e]),r()},V=(r,e)=>{var y;let{globals:t,parameters:o}=e,a=o[p].grid,d=((y=t[p])==null?void 0:y.grid)===!0&&a.disable!==!0,{cellAmount:i,cellSize:n,opacity:s}=a,c=e.viewMode==="docs",u=o.layout===void 0||o.layout==="padded"?16:0,l=a.offsetX??(c?20:u),$=a.offsetY??(c?20:u),f=h(()=>{let m=e.viewMode==="docs"?`#anchor--${e.id} .docs-story`:".sb-show-main",E=[`${n*i}px ${n*i}px`,`${n*i}px ${n*i}px`,`${n}px ${n}px`,`${n}px ${n}px`].join(", ");return`
25
+ ${m} {
26
+ background-size: ${E} !important;
27
+ background-position: ${l}px ${$}px, ${l}px ${$}px, ${l}px ${$}px, ${l}px ${$}px !important;
28
+ background-blend-mode: difference !important;
29
+ background-image: linear-gradient(rgba(130, 130, 130, ${s}) 1px, transparent 1px),
30
+ linear-gradient(90deg, rgba(130, 130, 130, ${s}) 1px, transparent 1px),
31
+ linear-gradient(rgba(130, 130, 130, ${s/2}) 1px, transparent 1px),
32
+ linear-gradient(90deg, rgba(130, 130, 130, ${s/2}) 1px, transparent 1px) !important;
33
+ }
34
+ `},[n]);return _(()=>{let m=e.viewMode==="docs"?`addon-backgrounds-grid-docs-${e.id}`:"addon-backgrounds-grid";if(!d){A(m);return}F(m,f)},[d,f,e]),r()},C,ae=(C=globalThis.FEATURES)!=null&&C.backgroundsStoryGlobals?[J]:[V,Z],I,oe={[p]:{grid:{cellSize:20,opacity:.5,cellAmount:5},disable:!1,...!((I=globalThis.FEATURES)!=null&&I.backgroundsStoryGlobals)&&{values:Object.values(U)}}},ee={[p]:{value:void 0,grid:!1}},z,de=(z=globalThis.FEATURES)!=null&&z.backgroundsStoryGlobals?ee:{[p]:null};export{ae as decorators,de as initialGlobals,oe as parameters};
@@ -0,0 +1 @@
1
+ var j="Invariant failed";function S(e,t){if(!e)throw new Error(j)}const{useEffect:T}=__STORYBOOK_MODULE_PREVIEW_API__,{global:d}=__STORYBOOK_MODULE_GLOBAL__;var K="measureEnabled";function Y(){let e=d.document.documentElement,t=Math.max(e.scrollHeight,e.offsetHeight);return{width:Math.max(e.scrollWidth,e.offsetWidth),height:t}}function G(){let e=d.document.createElement("canvas");e.id="storybook-addon-measure";let t=e.getContext("2d");S(t!=null);let{width:o,height:l}=Y();return A(e,t,{width:o,height:l}),e.style.position="absolute",e.style.left="0",e.style.top="0",e.style.zIndex="2147483647",e.style.pointerEvents="none",d.document.body.appendChild(e),{canvas:e,context:t,width:o,height:l}}function A(e,t,{width:o,height:l}){e.style.width=`${o}px`,e.style.height=`${l}px`;let i=d.window.devicePixelRatio;e.width=Math.floor(o*i),e.height=Math.floor(l*i),t.scale(i,i)}var h={};function U(){h.canvas||(h=G())}function H(){h.context&&h.context.clearRect(0,0,h.width??0,h.height??0)}function V(e){H(),e(h.context)}function Z(){S(h.canvas),S(h.context),A(h.canvas,h.context,{width:0,height:0});let{width:e,height:t}=Y();A(h.canvas,h.context,{width:e,height:t}),h.width=e,h.height=t}function J(){var e;h.canvas&&(H(),(e=h.canvas.parentNode)==null||e.removeChild(h.canvas),h={})}var w={margin:"#f6b26b",border:"#ffe599",padding:"#93c47d",content:"#6fa8dc",text:"#232020"},c=6;function W(e,{x:t,y:o,w:l,h:i,r:n}){t=t-l/2,o=o-i/2,l<2*n&&(n=l/2),i<2*n&&(n=i/2),e.beginPath(),e.moveTo(t+n,o),e.arcTo(t+l,o,t+l,o+i,n),e.arcTo(t+l,o+i,t,o+i,n),e.arcTo(t,o+i,t,o,n),e.arcTo(t,o,t+l,o,n),e.closePath()}function Q(e,{padding:t,border:o,width:l,height:i,top:n,left:r}){let f=l-o.left-o.right-t.left-t.right,a=i-t.top-t.bottom-o.top-o.bottom,s=r+o.left+t.left,u=n+o.top+t.top;return e==="top"?s+=f/2:e==="right"?(s+=f,u+=a/2):e==="bottom"?(s+=f/2,u+=a):e==="left"?u+=a/2:e==="center"&&(s+=f/2,u+=a/2),{x:s,y:u}}function x(e,t,{margin:o,border:l,padding:i},n,r){let f=m=>0,a=0,s=0,u=r?1:.5,g=r?n*2:0;return e==="padding"?f=m=>i[m]*u+g:e==="border"?f=m=>i[m]+l[m]*u+g:e==="margin"&&(f=m=>i[m]+l[m]+o[m]*u+g),t==="top"?s=-f("top"):t==="right"?a=f("right"):t==="bottom"?s=f("bottom"):t==="left"&&(a=-f("left")),{offsetX:a,offsetY:s}}function tt(e,t){return Math.abs(e.x-t.x)<Math.abs(e.w+t.w)/2&&Math.abs(e.y-t.y)<Math.abs(e.h+t.h)/2}function et(e,t,o){return e==="top"?t.y=o.y-o.h-c:e==="right"?t.x=o.x+o.w/2+c+t.w/2:e==="bottom"?t.y=o.y+o.h+c:e==="left"&&(t.x=o.x-o.w/2-c-t.w/2),{x:t.x,y:t.y}}function X(e,t,{x:o,y:l,w:i,h:n},r){return W(e,{x:o,y:l,w:i,h:n,r:3}),e.fillStyle=`${w[t]}dd`,e.fill(),e.strokeStyle=w[t],e.stroke(),e.fillStyle=w.text,e.fillText(r,o,l),W(e,{x:o,y:l,w:i,h:n,r:3}),e.fillStyle=`${w[t]}dd`,e.fill(),e.strokeStyle=w[t],e.stroke(),e.fillStyle=w.text,e.fillText(r,o,l),{x:o,y:l,w:i,h:n}}function C(e,t){e.font="600 12px monospace",e.textBaseline="middle",e.textAlign="center";let o=e.measureText(t),l=o.actualBoundingBoxAscent+o.actualBoundingBoxDescent,i=o.width+c*2,n=l+c*2;return{w:i,h:n}}function ot(e,t,{type:o,position:l="center",text:i},n,r=!1){let{x:f,y:a}=Q(l,t),{offsetX:s,offsetY:u}=x(o,l,t,c+1,r);f+=s,a+=u;let{w:g,h:m}=C(e,i);if(n&&tt({x:f,y:a,w:g,h:m},n)){let v=et(l,{x:f,y:a,w:g},n);f=v.x,a=v.y}return X(e,o,{x:f,y:a,w:g,h:m},i)}function it(e,{w:t,h:o}){let l=t*.5+c,i=o*.5+c;return{offsetX:(e.x==="left"?-1:1)*l,offsetY:(e.y==="top"?-1:1)*i}}function lt(e,t,{type:o,text:l}){let{floatingAlignment:i,extremities:n}=t,r=n[i.x],f=n[i.y],{w:a,h:s}=C(e,l),{offsetX:u,offsetY:g}=it(i,{w:a,h:s});return r+=u,f+=g,X(e,o,{x:r,y:f,w:a,h:s},l)}function E(e,t,o,l){let i=[];o.forEach((n,r)=>{let f=l&&n.position==="center"?lt(e,t,n):ot(e,t,n,i[r-1],l);i[r]=f})}function nt(e,t,o,l){let i=o.reduce((n,r)=>{var f;return Object.prototype.hasOwnProperty.call(n,r.position)||(n[r.position]=[]),(f=n[r.position])==null||f.push(r),n},{});i.top&&E(e,t,i.top,l),i.right&&E(e,t,i.right,l),i.bottom&&E(e,t,i.bottom,l),i.left&&E(e,t,i.left,l),i.center&&E(e,t,i.center,l)}var L={margin:"#f6b26ba8",border:"#ffe599a8",padding:"#93c47d8c",content:"#6fa8dca8"},B=30;function p(e){return parseInt(e.replace("px",""),10)}function b(e){return Number.isInteger(e)?e:e.toFixed(2)}function P(e){return e.filter(t=>t.text!==0&&t.text!=="0")}function ft(e){let t={top:d.window.scrollY,bottom:d.window.scrollY+d.window.innerHeight,left:d.window.scrollX,right:d.window.scrollX+d.window.innerWidth},o={top:Math.abs(t.top-e.top),bottom:Math.abs(t.bottom-e.bottom),left:Math.abs(t.left-e.left),right:Math.abs(t.right-e.right)};return{x:o.left>o.right?"left":"right",y:o.top>o.bottom?"top":"bottom"}}function rt(e){let t=d.getComputedStyle(e),{top:o,left:l,right:i,bottom:n,width:r,height:f}=e.getBoundingClientRect(),{marginTop:a,marginBottom:s,marginLeft:u,marginRight:g,paddingTop:m,paddingBottom:v,paddingLeft:k,paddingRight:F,borderBottomWidth:I,borderTopWidth:D,borderLeftWidth:$,borderRightWidth:N}=t;o=o+d.window.scrollY,l=l+d.window.scrollX,n=n+d.window.scrollY,i=i+d.window.scrollX;let y={top:p(a),bottom:p(s),left:p(u),right:p(g)},q={top:p(m),bottom:p(v),left:p(k),right:p(F)},z={top:p(D),bottom:p(I),left:p($),right:p(N)},_={top:o-y.top,bottom:n+y.bottom,left:l-y.left,right:i+y.right};return{margin:y,padding:q,border:z,top:o,left:l,bottom:n,right:i,width:r,height:f,extremities:_,floatingAlignment:ft(_)}}function at(e,{margin:t,width:o,height:l,top:i,left:n,bottom:r,right:f}){let a=l+t.bottom+t.top;e.fillStyle=L.margin,e.fillRect(n,i-t.top,o,t.top),e.fillRect(f,i-t.top,t.right,a),e.fillRect(n,r,o,t.bottom),e.fillRect(n-t.left,i-t.top,t.left,a);let s=[{type:"margin",text:b(t.top),position:"top"},{type:"margin",text:b(t.right),position:"right"},{type:"margin",text:b(t.bottom),position:"bottom"},{type:"margin",text:b(t.left),position:"left"}];return P(s)}function st(e,{padding:t,border:o,width:l,height:i,top:n,left:r,bottom:f,right:a}){let s=l-o.left-o.right,u=i-t.top-t.bottom-o.top-o.bottom;e.fillStyle=L.padding,e.fillRect(r+o.left,n+o.top,s,t.top),e.fillRect(a-t.right-o.right,n+t.top+o.top,t.right,u),e.fillRect(r+o.left,f-t.bottom-o.bottom,s,t.bottom),e.fillRect(r+o.left,n+t.top+o.top,t.left,u);let g=[{type:"padding",text:t.top,position:"top"},{type:"padding",text:t.right,position:"right"},{type:"padding",text:t.bottom,position:"bottom"},{type:"padding",text:t.left,position:"left"}];return P(g)}function ht(e,{border:t,width:o,height:l,top:i,left:n,bottom:r,right:f}){let a=l-t.top-t.bottom;e.fillStyle=L.border,e.fillRect(n,i,o,t.top),e.fillRect(n,r-t.bottom,o,t.bottom),e.fillRect(n,i+t.top,t.left,a),e.fillRect(f-t.right,i+t.top,t.right,a);let s=[{type:"border",text:t.top,position:"top"},{type:"border",text:t.right,position:"right"},{type:"border",text:t.bottom,position:"bottom"},{type:"border",text:t.left,position:"left"}];return P(s)}function ut(e,{padding:t,border:o,width:l,height:i,top:n,left:r}){let f=l-o.left-o.right-t.left-t.right,a=i-t.top-t.bottom-o.top-o.bottom;return e.fillStyle=L.content,e.fillRect(r+o.left+t.left,n+o.top+t.top,f,a),[{type:"content",position:"center",text:`${b(f)} x ${b(a)}`}]}function dt(e){return t=>{if(e&&t){let o=rt(e),l=at(t,o),i=st(t,o),n=ht(t,o),r=ut(t,o),f=o.width<=B*3||o.height<=B;nt(t,o,[...r,...i,...n,...l],f)}}}function mt(e){V(dt(e))}var gt=(e,t)=>{let o=d.document.elementFromPoint(e,t),l=i=>{if(i&&i.shadowRoot){let n=i.shadowRoot.elementFromPoint(e,t);return i.isEqualNode(n)?i:n.shadowRoot?l(n):n}return i};return l(o)||o},O,M={x:0,y:0};function R(e,t){O=gt(e,t),mt(O)}var pt=(e,t)=>{let{measureEnabled:o}=t.globals;return T(()=>{let l=i=>{window.requestAnimationFrame(()=>{i.stopPropagation(),M.x=i.clientX,M.y=i.clientY})};return document.addEventListener("pointermove",l),()=>{document.removeEventListener("pointermove",l)}},[]),T(()=>{let l=n=>{window.requestAnimationFrame(()=>{n.stopPropagation(),R(n.clientX,n.clientY)})},i=()=>{window.requestAnimationFrame(()=>{Z()})};return t.viewMode==="story"&&o&&(document.addEventListener("pointerover",l),U(),window.addEventListener("resize",i),R(M.x,M.y)),()=>{window.removeEventListener("resize",i),J()}},[o,t.viewMode]),e()},ct=[pt],wt={[K]:!1};export{ct as decorators,wt as initialGlobals};