@oliasoft-open-source/react-ui-library 4.8.0-beta-3 → 4.8.0-beta-5

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 (124) hide show
  1. package/dist/global.css +576 -576
  2. package/dist/index.d.ts +1 -8
  3. package/dist/index.js +338 -326
  4. package/dist/index.js.map +1 -1
  5. package/dist/storybook/assets/{Color-KGDBMAHA-BfJnf8wl.js → Color-KGDBMAHA-Bz9U70BD.js} +1 -1
  6. package/dist/storybook/assets/{DocsRenderer-PKQXORMH-pB_sm_Dd.js → DocsRenderer-PKQXORMH-pSX8_0Nr.js} +1 -1
  7. package/dist/storybook/assets/{accordion.stories-YV-J9E1H.js → accordion.stories-vgiXrB4-.js} +1 -1
  8. package/dist/storybook/assets/{actions-CHgr8eL8.js → actions-BhPnDYmS.js} +1 -1
  9. package/dist/storybook/assets/{actions.stories-CCDxFKFk.js → actions.stories-CUAkvJjE.js} +1 -1
  10. package/dist/storybook/assets/{afe.stories-BnD7J0sn.js → afe.stories-CBoaZ-5U.js} +1 -1
  11. package/dist/storybook/assets/{badge.stories-D5DA-vxC.js → badge.stories-Dkq_XgEW.js} +1 -1
  12. package/dist/storybook/assets/{blowout.stories-BlyKeeED.js → blowout.stories-CF976Bad.js} +1 -1
  13. package/dist/storybook/assets/button-DHevvVBE.js +1 -0
  14. package/dist/storybook/assets/button-fAxt_G4d.css +1 -0
  15. package/dist/storybook/assets/{button-group-CwJdFo2z.js → button-group-DCx4Z6vk.js} +1 -1
  16. package/dist/storybook/assets/{button-group.stories-DU5k5qCY.js → button-group.stories-DvSsGv_D.js} +1 -1
  17. package/dist/storybook/assets/{button.stories-DVtec2Eo.js → button.stories-DA9DGYD2.js} +1 -1
  18. package/dist/storybook/assets/{buttons-and-links-Ca04lY9X.js → buttons-and-links-B0beM0KB.js} +1 -1
  19. package/dist/storybook/assets/{casing-loads.stories-CEKi9p48.js → casing-loads.stories-W4rWa3bH.js} +1 -1
  20. package/dist/storybook/assets/{cell.stories-B0IK4EXk.js → cell.stories-pVmyCUQN.js} +1 -1
  21. package/dist/storybook/assets/{chunk-HLWAVYOI-HYUErAMH.js → chunk-HLWAVYOI-CuHfCuSg.js} +1 -1
  22. package/dist/storybook/assets/{color-DGvuSSEr.js → color-ReYZ4m5V.js} +1 -1
  23. package/dist/storybook/assets/{dialog-Di8hNunM.js → dialog-BtnEK12u.js} +1 -1
  24. package/dist/storybook/assets/drawer-BqojbwAS.js +3 -0
  25. package/dist/storybook/assets/drawer-DhrjYsQu.css +1 -0
  26. package/dist/storybook/assets/{drawer.stories-B-PsNJJ6.js → drawer.stories-fxIBm3g1.js} +1 -1
  27. package/dist/storybook/assets/{empty.stories-BVYXwvpa.js → empty.stories-DcwF0pkK.js} +1 -1
  28. package/dist/storybook/assets/{field.stories-B9p9nBgY.js → field.stories-BBqJzdkf.js} +1 -1
  29. package/dist/storybook/assets/{file-button.stories-FOaiNPt-.js → file-button.stories-DQxp1MPV.js} +1 -1
  30. package/dist/storybook/assets/{file-input-BpMtsZ2S.js → file-input-DlOuEoMf.js} +1 -1
  31. package/dist/storybook/assets/{file-input.stories-Jrdw5k-s.js → file-input.stories-BW--e4ZG.js} +1 -1
  32. package/dist/storybook/assets/{flex.stories-BEXf0VqI.js → flex.stories-BhvJpHpN.js} +1 -1
  33. package/dist/storybook/assets/{footer.stories-Bl3gEVhY.js → footer.stories-Biows6FL.js} +1 -1
  34. package/dist/storybook/assets/{form.stories-JRw9Y_sV.js → form.stories-CaUuJTP-.js} +1 -1
  35. package/dist/storybook/assets/{formation.stories-DNNvbCAo.js → formation.stories-CXNu3N_u.js} +1 -1
  36. package/dist/storybook/assets/{iframe-Csk0Yhc_.js → iframe-Ds9MEeRD.js} +2 -2
  37. package/dist/storybook/assets/{index-RtWQonQy.js → index-BCGvwS4L.js} +1 -1
  38. package/dist/storybook/assets/{index-CvQIWAVm.js → index-RIOk8k9q.js} +4 -4
  39. package/dist/storybook/assets/input-DD7t4kHm.css +1 -0
  40. package/dist/storybook/assets/input-DFNY9YDm.js +1 -0
  41. package/dist/storybook/assets/{input-group.stories-D7nvlp0S.js → input-group.stories-CY5ksLqR.js} +1 -1
  42. package/dist/storybook/assets/{input-validation-C2ibmhTz.js → input-validation-DyFpZQsn.js} +1 -1
  43. package/dist/storybook/assets/{input.stories-BruLeJ44.js → input.stories-EZ7qJt4K.js} +1 -1
  44. package/dist/storybook/assets/{inputs-DwngOtgA.js → inputs-0dwI7OeZ.js} +1 -1
  45. package/dist/storybook/assets/{layout-forms-Dh0s7R-p.js → layout-forms-BApBtPld.js} +1 -1
  46. package/dist/storybook/assets/{layout-general-CQq0CjM9.js → layout-general-9f8QN3PD.js} +1 -1
  47. package/dist/storybook/assets/{list-yVTOdmpX.js → list-DhcQLzoC.js} +1 -1
  48. package/dist/storybook/assets/{list.stories-ChqQXY5M.js → list.stories-IFLT_P7d.js} +1 -1
  49. package/dist/storybook/assets/{list.stories-data-Iq66w9oH.js → list.stories-data-tIuoGcNV.js} +1 -1
  50. package/dist/storybook/assets/{loader.stories-DM7ZJBgz.js → loader.stories-pS8zRM4u.js} +1 -1
  51. package/dist/storybook/assets/{menu.stories-mt3LwVCk.js → menu.stories-CXq2Fiuq.js} +1 -1
  52. package/dist/storybook/assets/message-Cl3kn7ZD.css +1 -0
  53. package/dist/storybook/assets/message-Y48EomV-.js +1 -0
  54. package/dist/storybook/assets/{message.stories-DEMcK-wa.js → message.stories-r_UlbshI.js} +1 -1
  55. package/dist/storybook/assets/meta-content-CvnoQB7n.js +9 -0
  56. package/dist/storybook/assets/meta-content-DnZPPeTF.css +1 -0
  57. package/dist/storybook/assets/{modal.stories-Benu2pYo.js → modal.stories-5y8dh1sC.js} +1 -1
  58. package/dist/storybook/assets/{number-input-FjN2w5Zq.js → number-input-hqsQsKER.js} +1 -1
  59. package/dist/storybook/assets/{number-input.stories-CjeUb5EQ.js → number-input.stories-DZ3eM89y.js} +15 -18
  60. package/dist/storybook/assets/{option-dropdown.stories-CoLsSS95.js → option-dropdown.stories-DVA8-yqU.js} +1 -1
  61. package/dist/storybook/assets/{padding-and-spacing-CNMAhndq.js → padding-and-spacing-CCiHHnai.js} +1 -1
  62. package/dist/storybook/assets/{page.stories-Cse3cMsO.js → page.stories-B_x_6shq.js} +1 -1
  63. package/dist/storybook/assets/{pagination-DXnrsBZs.js → pagination-DayOrCL5.js} +1 -1
  64. package/dist/storybook/assets/{pagination.stories-DKSBeVH-.js → pagination.stories-DqzdrU74.js} +1 -1
  65. package/dist/storybook/assets/{pop-confirm.stories-Dhid1FK8.js → pop-confirm.stories-DCpooB2O.js} +1 -1
  66. package/dist/storybook/assets/{popover-CzZdWNnB.js → popover-rq33c1W2.js} +1 -1
  67. package/dist/storybook/assets/{popover.stories-BKImRt9k.js → popover.stories-BcPmknc4.js} +1 -1
  68. package/dist/storybook/assets/{preview-BXgx9U1c.js → preview-C2ZSBCEy.js} +1 -1
  69. package/dist/storybook/assets/{preview-BjWBoeyd.js → preview-C3DVwYVR.js} +2 -2
  70. package/dist/storybook/assets/{projects.stories-BfMSNrkX.js → projects.stories-Clez6c2x.js} +1 -1
  71. package/dist/storybook/assets/{reservoirs.stories-CZme5ZCc.js → reservoirs.stories-SrSPvn3J.js} +1 -1
  72. package/dist/storybook/assets/{rich-text-input-DPMWElGY.css → rich-text-input-dDjxXFl-.css} +1 -1
  73. package/dist/storybook/assets/{rich-text-input.stories-a2GSF6vM.js → rich-text-input.stories-C7X6120m.js} +4 -4
  74. package/dist/storybook/assets/{row.stories-UAENUT5Q.js → row.stories-BuWQsbpc.js} +1 -1
  75. package/dist/storybook/assets/select-DAXADfWF.js +40 -0
  76. package/dist/storybook/assets/select-H-9tdhwc.css +1 -0
  77. package/dist/storybook/assets/{select.stories-Bj6BwvfZ.js → select.stories-Bvug9LhH.js} +1 -1
  78. package/dist/storybook/assets/{side-bar-CKbHPgIV.js → side-bar-BhPNjZba.js} +4 -4
  79. package/dist/storybook/assets/side-bar-auov230-.css +1 -0
  80. package/dist/storybook/assets/{side-bar.stories-MUj_dj1F.js → side-bar.stories-BsFhqiB3.js} +1 -1
  81. package/dist/storybook/assets/{site.stories-CRc-gQlK.js → site.stories-zUoOcZmf.js} +1 -1
  82. package/dist/storybook/assets/{slider-DAramr8j.js → slider-DckvIvC7.js} +1 -1
  83. package/dist/storybook/assets/{slider.stories-Cd0rLfHP.js → slider.stories-BJOTup9W.js} +1 -1
  84. package/dist/storybook/assets/{smart-upload-modal.stories-BStZdEeo.js → smart-upload-modal.stories-BWQlNSV5.js} +1 -1
  85. package/dist/storybook/assets/{spacer.stories-CHEZdgDM.js → spacer.stories-BBTt2LdE.js} +1 -1
  86. package/dist/storybook/assets/table-C9uAiJu6.css +1 -0
  87. package/dist/storybook/assets/table-DNN_2kqQ.js +86 -0
  88. package/dist/storybook/assets/{table.stories-CvFBGBd6.js → table.stories-BL9nAubQ.js} +1 -1
  89. package/dist/storybook/assets/table.stories-data-CG4FwGG3.js +1 -0
  90. package/dist/storybook/assets/textarea-D-R3vavM.js +1 -0
  91. package/dist/storybook/assets/textarea-H-YTEwr8.css +1 -0
  92. package/dist/storybook/assets/{textarea.stories-aRLEoDHg.js → textarea.stories-CrZgmMxl.js} +1 -1
  93. package/dist/storybook/assets/{title.stories-DvTVQphz.js → title.stories-BrxyGKY2.js} +1 -1
  94. package/dist/storybook/assets/{toaster-BNO0suPv.js → toaster-BoBcvmf9.js} +1 -1
  95. package/dist/storybook/assets/{toaster.stories-Dxg5K32_.js → toaster.stories-HO4VBTy-.js} +1 -1
  96. package/dist/storybook/assets/{tooltip.test-case.stories-i9YQqba1.js → tooltip.test-case.stories-joo9YReN.js} +1 -1
  97. package/dist/storybook/assets/{top-bar-C_tn2Pc5.js → top-bar-BlwEXx7O.js} +1 -1
  98. package/dist/storybook/assets/{top-bar.stories-B2a-RgK-.js → top-bar.stories-Bxk6q5go.js} +1 -1
  99. package/dist/storybook/assets/{top-bar.testcase.stories-DoPEAMYc.js → top-bar.testcase.stories-BUBXpPJs.js} +1 -1
  100. package/dist/storybook/assets/{tree.stories-6UHASEZu.js → tree.stories-CTPqyCKs.js} +1 -1
  101. package/dist/storybook/assets/unit-input.stories-3plFgvQq.js +353 -0
  102. package/dist/storybook/assets/{unit-table.stories-DtWOiSyD.js → unit-table.stories-DR17ZD2i.js} +1 -1
  103. package/dist/storybook/iframe.html +1 -1
  104. package/dist/storybook/project.json +1 -1
  105. package/package.json +1 -1
  106. package/dist/storybook/assets/button-BpFIj2Vw.css +0 -1
  107. package/dist/storybook/assets/button-VxhoNhrV.js +0 -1
  108. package/dist/storybook/assets/drawer-BhuWxI7V.js +0 -3
  109. package/dist/storybook/assets/drawer-v-B4gIC0.css +0 -1
  110. package/dist/storybook/assets/input-BW9trNAW.js +0 -1
  111. package/dist/storybook/assets/input-WN7SK0fa.css +0 -1
  112. package/dist/storybook/assets/message-BYzRg8Ae.js +0 -1
  113. package/dist/storybook/assets/message-nw5WQq6S.css +0 -1
  114. package/dist/storybook/assets/meta-content-B1HsACrT.css +0 -1
  115. package/dist/storybook/assets/meta-content-cbHGvPJ7.js +0 -9
  116. package/dist/storybook/assets/select-Br1k0mOD.js +0 -40
  117. package/dist/storybook/assets/select-Byh1FIvP.css +0 -1
  118. package/dist/storybook/assets/side-bar-DvwMCSK0.css +0 -1
  119. package/dist/storybook/assets/table-CyYpP6Fs.css +0 -1
  120. package/dist/storybook/assets/table-DMsE4ks-.js +0 -86
  121. package/dist/storybook/assets/table.stories-data-CR9VpXHs.js +0 -1
  122. package/dist/storybook/assets/textarea-BV7xWEdt.js +0 -1
  123. package/dist/storybook/assets/textarea-DapBtyYV.css +0 -1
  124. package/dist/storybook/assets/unit-input.stories-CT4Qgaiw.js +0 -359
@@ -1,4 +1,4 @@
1
- var vf=Object.defineProperty;var rl=t=>{throw TypeError(t)};var Ef=(t,e,n)=>e in t?vf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Me=(t,e,n)=>Ef(t,typeof e!="symbol"?e+"":e,n),sl=(t,e,n)=>e.has(t)||rl("Cannot "+n);var B=(t,e,n)=>(sl(t,e,"read from private field"),n?n.call(t):e.get(t)),ft=(t,e,n)=>e.has(t)?rl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),X=(t,e,n,r)=>(sl(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);import{j as ae}from"./jsx-runtime-eps93zm2.js";import{g as Ai,R as _e,r as z}from"./index-DhsZuJvc.js";import{D as Cf}from"./disabled-context-rmpd7YJS.js";import{C as Tf}from"./common-types-Sih75Sav.js";import{B as vu}from"./button-VxhoNhrV.js";import{r as Of}from"./index-CUZDtIZe.js";import{S as Mf}from"./select-Br1k0mOD.js";import"./index-Bk2sglWO.js";import"./spinner-AWUe4xwQ.js";import"./icon-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DP0QEDDI.js";import"./index-CEuq6vkz.js";import"./tooltip-1V7clEnw.js";import"./types-UmZ4Y_CR.js";import"./lodash-BHd_uQHh.js";import"./assertThisInitialized-B9jnkVVz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-CHgr8eL8.js";import"./badge-CLQ59MDF.js";import"./select.input-DIKP56UZ.js";var Co={exports:{}};(function(t,e){var n=typeof Reflect<"u"?Reflect.construct:void 0,r=Object.defineProperty,s=Error.captureStackTrace;s===void 0&&(s=function(c){var u=new Error;r(c,"stack",{configurable:!0,get:function(){var h=u.stack;return r(this,"stack",{configurable:!0,value:h,writable:!0}),h},set:function(h){r(c,"stack",{configurable:!0,value:h,writable:!0})}})});function i(l){l!==void 0&&r(this,"message",{configurable:!0,value:l,writable:!0});var c=this.constructor.name;c!==void 0&&c!==this.name&&r(this,"name",{configurable:!0,value:c,writable:!0}),s(this,this.constructor)}i.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:i,writable:!0}});var o=function(){function l(u,d){return r(u,"name",{configurable:!0,value:d})}try{var c=function(){};if(l(c,"foo"),c.name==="foo")return l}catch{}}();function a(l,c){if(c==null||c===Error)c=i;else if(typeof c!="function")throw new TypeError("super_ should be a function");var u;if(typeof l=="string")u=l,l=n!==void 0?function(){return n(c,arguments,this.constructor)}:function(){c.apply(this,arguments)},o!==void 0&&(o(l,u),u=void 0);else if(typeof l!="function")throw new TypeError("constructor should be either a string or a function");l.super_=l.super=c;var d={constructor:{configurable:!0,value:l,writable:!0}};return u!==void 0&&(d.name={configurable:!0,value:u,writable:!0}),l.prototype=Object.create(c.prototype,d),l}e=t.exports=a,e.BaseError=i})(Co,Co.exports);var Eu=Co.exports,il="ProseMirror-selectednode",da="",Kt="\0",ol="__state_override__",Nf={LastNodeCompatible:"lastNodeCompatible",FormattingMark:"formattingMark",FormattingNode:"formattingNode",NodeCursor:"nodeCursor",FontStyle:"fontStyle",Link:"link",Color:"color",Alignment:"alignment",Indentation:"indentation",Behavior:"behavior",Code:"code",InlineNode:"inline",ListContainerNode:"listContainer",ListItemNode:"listItemNode",Block:"block",BlockNode:"block",TextBlock:"textBlock",ExcludeInputRules:"excludeFromInputRules",PreventExits:"preventsExits",Media:"media"},j=Nf,It=Symbol.for("__remirror__"),xe=(t=>(t.PlainExtension="RemirrorPlainExtension",t.NodeExtension="RemirrorNodeExtension",t.MarkExtension="RemirrorMarkExtension",t.PlainExtensionConstructor="RemirrorPlainExtensionConstructor",t.NodeExtensionConstructor="RemirrorNodeExtensionConstructor",t.MarkExtensionConstructor="RemirrorMarkExtensionConstructor",t.Manager="RemirrorManager",t.Preset="RemirrorPreset",t.PresetConstructor="RemirrorPresetConstructor",t))(xe||{}),Y=(t=>(t[t.Critical=1e6]="Critical",t[t.Highest=1e5]="Highest",t[t.High=1e4]="High",t[t.Medium=1e3]="Medium",t[t.Default=100]="Default",t[t.Low=10]="Low",t[t.Lowest=0]="Lowest",t))(Y||{}),Pe=(t=>(t[t.None=0]="None",t[t.Create=1]="Create",t[t.EditorView=2]="EditorView",t[t.Runtime=3]="Runtime",t[t.Destroy=4]="Destroy",t))(Pe||{}),E=(t=>(t.Undo="_|undo|_",t.Redo="_|redo|_",t.Bold="_|bold|_",t.Italic="_|italic|_",t.Underline="_|underline|_",t.Strike="_|strike|_",t.Code="_|code|_",t.Paragraph="_|paragraph|_",t.H1="_|h1|_",t.H2="_|h2|_",t.H3="_|h3|_",t.H4="_|h4|_",t.H5="_|h5|_",t.H6="_|h6|_",t.TaskList="_|task|_",t.BulletList="_|bullet|_",t.OrderedList="_|number|_",t.Quote="_|quote|_",t.Divider="_|divider|_",t.Codeblock="_|codeblock|_",t.ClearFormatting="_|clear|_",t.Superscript="_|sup|_",t.Subscript="_|sub|_",t.LeftAlignment="_|left-align|_",t.CenterAlignment="_|center-align|_",t.RightAlignment="_|right-align|_",t.JustifyAlignment="_|justify-align|_",t.InsertLink="_|link|_",t.Find="_|find|_",t.FindBackwards="_|find-backwards|_",t.FindReplace="_|find-replace|_",t.AddFootnote="_|footnote|_",t.AddComment="_|comment|_",t.ContextMenu="_|context-menu|_",t.IncreaseFontSize="_|inc-font-size|_",t.DecreaseFontSize="_|dec-font-size|_",t.IncreaseIndent="_|indent|_",t.DecreaseIndent="_|dedent|_",t.Shortcuts="_|shortcuts|_",t.Copy="_|copy|_",t.Cut="_|cut|_",t.Paste="_|paste|_",t.PastePlain="_|paste-plain|_",t.SelectAll="_|select-all|_",t.Format="_|format|_",t))(E||{}),b=(t=>(t.PROD="RMR0000",t.UNKNOWN="RMR0001",t.INVALID_COMMAND_ARGUMENTS="RMR0002",t.CUSTOM="RMR0003",t.CORE_HELPERS="RMR0004",t.MUTATION="RMR0005",t.INTERNAL="RMR0006",t.MISSING_REQUIRED_EXTENSION="RMR0007",t.MANAGER_PHASE_ERROR="RMR0008",t.INVALID_GET_EXTENSION="RMR0010",t.INVALID_MANAGER_ARGUMENTS="RMR0011",t.SCHEMA="RMR0012",t.HELPERS_CALLED_IN_OUTER_SCOPE="RMR0013",t.INVALID_MANAGER_EXTENSION="RMR0014",t.DUPLICATE_COMMAND_NAMES="RMR0016",t.DUPLICATE_HELPER_NAMES="RMR0017",t.NON_CHAINABLE_COMMAND="RMR0018",t.INVALID_EXTENSION="RMR0019",t.INVALID_CONTENT="RMR0021",t.INVALID_NAME="RMR0050",t.EXTENSION="RMR0100",t.EXTENSION_SPEC="RMR0101",t.EXTENSION_EXTRA_ATTRIBUTES="RMR0102",t.INVALID_SET_EXTENSION_OPTIONS="RMR0103",t.REACT_PROVIDER_CONTEXT="RMR0200",t.REACT_GET_ROOT_PROPS="RMR0201",t.REACT_EDITOR_VIEW="RMR0202",t.REACT_CONTROLLED="RMR0203",t.REACT_NODE_VIEW="RMR0204",t.REACT_GET_CONTEXT="RMR0205",t.REACT_COMPONENTS="RMR0206",t.REACT_HOOKS="RMR0207",t.I18N_CONTEXT="RMR0300",t))(b||{}),_f=function(e){return Af(e)&&!Rf(e)};function Af(t){return!!t&&typeof t=="object"}function Rf(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||Pf(t)}var If=typeof Symbol=="function"&&Symbol.for,Df=If?Symbol.for("react.element"):60103;function Pf(t){return t.$$typeof===Df}function Lf(t){return Array.isArray(t)?[]:{}}function ss(t,e){return e.clone!==!1&&e.isMergeableObject(t)?sr(Lf(t),t,e):t}function Bf(t,e,n){return t.concat(e).map(function(r){return ss(r,n)})}function zf(t,e){if(!e.customMerge)return sr;var n=e.customMerge(t);return typeof n=="function"?n:sr}function $f(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function al(t){return Object.keys(t).concat($f(t))}function Cu(t,e){try{return e in t}catch{return!1}}function Ff(t,e){return Cu(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function Vf(t,e,n){var r={};return n.isMergeableObject(t)&&al(t).forEach(function(s){r[s]=ss(t[s],n)}),al(e).forEach(function(s){Ff(t,s)||(Cu(t,s)&&n.isMergeableObject(e[s])?r[s]=zf(s,n)(t[s],e[s],n):r[s]=ss(e[s],n))}),r}function sr(t,e,n){n=n||{},n.arrayMerge=n.arrayMerge||Bf,n.isMergeableObject=n.isMergeableObject||_f,n.cloneUnlessOtherwiseSpecified=ss;var r=Array.isArray(e),s=Array.isArray(t),i=r===s;return i?r?n.arrayMerge(t,e,n):Vf(t,e,n):ss(e,n)}sr.all=function(e,n){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(r,s){return sr(r,s,n)},{})};var Hf=sr,Uf=Hf;const jf=Ai(Uf);/*!
1
+ var vf=Object.defineProperty;var rl=t=>{throw TypeError(t)};var Ef=(t,e,n)=>e in t?vf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Me=(t,e,n)=>Ef(t,typeof e!="symbol"?e+"":e,n),sl=(t,e,n)=>e.has(t)||rl("Cannot "+n);var B=(t,e,n)=>(sl(t,e,"read from private field"),n?n.call(t):e.get(t)),ft=(t,e,n)=>e.has(t)?rl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),X=(t,e,n,r)=>(sl(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);import{j as ae}from"./jsx-runtime-eps93zm2.js";import{g as Ai,R as _e,r as z}from"./index-DhsZuJvc.js";import{D as Cf}from"./disabled-context-rmpd7YJS.js";import{C as Tf}from"./common-types-Sih75Sav.js";import{B as vu}from"./button-DHevvVBE.js";import{r as Of}from"./index-CUZDtIZe.js";import{S as Mf}from"./select-DAXADfWF.js";import"./index-Bk2sglWO.js";import"./spinner-AWUe4xwQ.js";import"./icon-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DP0QEDDI.js";import"./index-CEuq6vkz.js";import"./tooltip-1V7clEnw.js";import"./types-UmZ4Y_CR.js";import"./lodash-BHd_uQHh.js";import"./assertThisInitialized-B9jnkVVz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-BhPnDYmS.js";import"./badge-CLQ59MDF.js";import"./select.input-DIKP56UZ.js";var Co={exports:{}};(function(t,e){var n=typeof Reflect<"u"?Reflect.construct:void 0,r=Object.defineProperty,s=Error.captureStackTrace;s===void 0&&(s=function(c){var u=new Error;r(c,"stack",{configurable:!0,get:function(){var h=u.stack;return r(this,"stack",{configurable:!0,value:h,writable:!0}),h},set:function(h){r(c,"stack",{configurable:!0,value:h,writable:!0})}})});function i(l){l!==void 0&&r(this,"message",{configurable:!0,value:l,writable:!0});var c=this.constructor.name;c!==void 0&&c!==this.name&&r(this,"name",{configurable:!0,value:c,writable:!0}),s(this,this.constructor)}i.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:i,writable:!0}});var o=function(){function l(u,d){return r(u,"name",{configurable:!0,value:d})}try{var c=function(){};if(l(c,"foo"),c.name==="foo")return l}catch{}}();function a(l,c){if(c==null||c===Error)c=i;else if(typeof c!="function")throw new TypeError("super_ should be a function");var u;if(typeof l=="string")u=l,l=n!==void 0?function(){return n(c,arguments,this.constructor)}:function(){c.apply(this,arguments)},o!==void 0&&(o(l,u),u=void 0);else if(typeof l!="function")throw new TypeError("constructor should be either a string or a function");l.super_=l.super=c;var d={constructor:{configurable:!0,value:l,writable:!0}};return u!==void 0&&(d.name={configurable:!0,value:u,writable:!0}),l.prototype=Object.create(c.prototype,d),l}e=t.exports=a,e.BaseError=i})(Co,Co.exports);var Eu=Co.exports,il="ProseMirror-selectednode",da="",Kt="\0",ol="__state_override__",Nf={LastNodeCompatible:"lastNodeCompatible",FormattingMark:"formattingMark",FormattingNode:"formattingNode",NodeCursor:"nodeCursor",FontStyle:"fontStyle",Link:"link",Color:"color",Alignment:"alignment",Indentation:"indentation",Behavior:"behavior",Code:"code",InlineNode:"inline",ListContainerNode:"listContainer",ListItemNode:"listItemNode",Block:"block",BlockNode:"block",TextBlock:"textBlock",ExcludeInputRules:"excludeFromInputRules",PreventExits:"preventsExits",Media:"media"},j=Nf,It=Symbol.for("__remirror__"),xe=(t=>(t.PlainExtension="RemirrorPlainExtension",t.NodeExtension="RemirrorNodeExtension",t.MarkExtension="RemirrorMarkExtension",t.PlainExtensionConstructor="RemirrorPlainExtensionConstructor",t.NodeExtensionConstructor="RemirrorNodeExtensionConstructor",t.MarkExtensionConstructor="RemirrorMarkExtensionConstructor",t.Manager="RemirrorManager",t.Preset="RemirrorPreset",t.PresetConstructor="RemirrorPresetConstructor",t))(xe||{}),Y=(t=>(t[t.Critical=1e6]="Critical",t[t.Highest=1e5]="Highest",t[t.High=1e4]="High",t[t.Medium=1e3]="Medium",t[t.Default=100]="Default",t[t.Low=10]="Low",t[t.Lowest=0]="Lowest",t))(Y||{}),Pe=(t=>(t[t.None=0]="None",t[t.Create=1]="Create",t[t.EditorView=2]="EditorView",t[t.Runtime=3]="Runtime",t[t.Destroy=4]="Destroy",t))(Pe||{}),E=(t=>(t.Undo="_|undo|_",t.Redo="_|redo|_",t.Bold="_|bold|_",t.Italic="_|italic|_",t.Underline="_|underline|_",t.Strike="_|strike|_",t.Code="_|code|_",t.Paragraph="_|paragraph|_",t.H1="_|h1|_",t.H2="_|h2|_",t.H3="_|h3|_",t.H4="_|h4|_",t.H5="_|h5|_",t.H6="_|h6|_",t.TaskList="_|task|_",t.BulletList="_|bullet|_",t.OrderedList="_|number|_",t.Quote="_|quote|_",t.Divider="_|divider|_",t.Codeblock="_|codeblock|_",t.ClearFormatting="_|clear|_",t.Superscript="_|sup|_",t.Subscript="_|sub|_",t.LeftAlignment="_|left-align|_",t.CenterAlignment="_|center-align|_",t.RightAlignment="_|right-align|_",t.JustifyAlignment="_|justify-align|_",t.InsertLink="_|link|_",t.Find="_|find|_",t.FindBackwards="_|find-backwards|_",t.FindReplace="_|find-replace|_",t.AddFootnote="_|footnote|_",t.AddComment="_|comment|_",t.ContextMenu="_|context-menu|_",t.IncreaseFontSize="_|inc-font-size|_",t.DecreaseFontSize="_|dec-font-size|_",t.IncreaseIndent="_|indent|_",t.DecreaseIndent="_|dedent|_",t.Shortcuts="_|shortcuts|_",t.Copy="_|copy|_",t.Cut="_|cut|_",t.Paste="_|paste|_",t.PastePlain="_|paste-plain|_",t.SelectAll="_|select-all|_",t.Format="_|format|_",t))(E||{}),b=(t=>(t.PROD="RMR0000",t.UNKNOWN="RMR0001",t.INVALID_COMMAND_ARGUMENTS="RMR0002",t.CUSTOM="RMR0003",t.CORE_HELPERS="RMR0004",t.MUTATION="RMR0005",t.INTERNAL="RMR0006",t.MISSING_REQUIRED_EXTENSION="RMR0007",t.MANAGER_PHASE_ERROR="RMR0008",t.INVALID_GET_EXTENSION="RMR0010",t.INVALID_MANAGER_ARGUMENTS="RMR0011",t.SCHEMA="RMR0012",t.HELPERS_CALLED_IN_OUTER_SCOPE="RMR0013",t.INVALID_MANAGER_EXTENSION="RMR0014",t.DUPLICATE_COMMAND_NAMES="RMR0016",t.DUPLICATE_HELPER_NAMES="RMR0017",t.NON_CHAINABLE_COMMAND="RMR0018",t.INVALID_EXTENSION="RMR0019",t.INVALID_CONTENT="RMR0021",t.INVALID_NAME="RMR0050",t.EXTENSION="RMR0100",t.EXTENSION_SPEC="RMR0101",t.EXTENSION_EXTRA_ATTRIBUTES="RMR0102",t.INVALID_SET_EXTENSION_OPTIONS="RMR0103",t.REACT_PROVIDER_CONTEXT="RMR0200",t.REACT_GET_ROOT_PROPS="RMR0201",t.REACT_EDITOR_VIEW="RMR0202",t.REACT_CONTROLLED="RMR0203",t.REACT_NODE_VIEW="RMR0204",t.REACT_GET_CONTEXT="RMR0205",t.REACT_COMPONENTS="RMR0206",t.REACT_HOOKS="RMR0207",t.I18N_CONTEXT="RMR0300",t))(b||{}),_f=function(e){return Af(e)&&!Rf(e)};function Af(t){return!!t&&typeof t=="object"}function Rf(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||Pf(t)}var If=typeof Symbol=="function"&&Symbol.for,Df=If?Symbol.for("react.element"):60103;function Pf(t){return t.$$typeof===Df}function Lf(t){return Array.isArray(t)?[]:{}}function ss(t,e){return e.clone!==!1&&e.isMergeableObject(t)?sr(Lf(t),t,e):t}function Bf(t,e,n){return t.concat(e).map(function(r){return ss(r,n)})}function zf(t,e){if(!e.customMerge)return sr;var n=e.customMerge(t);return typeof n=="function"?n:sr}function $f(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function al(t){return Object.keys(t).concat($f(t))}function Cu(t,e){try{return e in t}catch{return!1}}function Ff(t,e){return Cu(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function Vf(t,e,n){var r={};return n.isMergeableObject(t)&&al(t).forEach(function(s){r[s]=ss(t[s],n)}),al(e).forEach(function(s){Ff(t,s)||(Cu(t,s)&&n.isMergeableObject(e[s])?r[s]=zf(s,n)(t[s],e[s],n):r[s]=ss(e[s],n))}),r}function sr(t,e,n){n=n||{},n.arrayMerge=n.arrayMerge||Bf,n.isMergeableObject=n.isMergeableObject||_f,n.cloneUnlessOtherwiseSpecified=ss;var r=Array.isArray(e),s=Array.isArray(t),i=r===s;return i?r?n.arrayMerge(t,e,n):Vf(t,e,n):ss(e,n)}sr.all=function(e,n){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(r,s){return sr(r,s,n)},{})};var Hf=sr,Uf=Hf;const jf=Ai(Uf);/*!
2
2
  * isobject <https://github.com/jonschlinkert/isobject>
3
3
  *
4
4
  * Copyright (c) 2014-2017, Jon Schlinkert.
@@ -178,12 +178,12 @@ ${t}</ul>
178
178
  `:`<li>${t}</li>
179
179
  `}}});function uw(t,e){const n=_(t,{gfm:!0,smartLists:!0,xhtml:!0});return e?e(n):n}var yr=class extends te{get name(){return"markdown"}onCreate(){this.store.setStringHandler("markdown",this.markdownToProsemirrorNode.bind(this))}createPlugin(){return{props:{clipboardTextSerializer:this.options.copyAsMarkdown?e=>{const n=document.createElement("div"),r=Dt.fromSchema(this.store.schema);return n.append(r.serializeFragment(e.content)),this.options.htmlToMarkdown(n.innerHTML)}:void 0}}}markdownToProsemirrorNode(t){return this.store.stringHandlers.html({...t,content:this.options.markdownToHtml(t.content,this.options.htmlSanitizer)})}insertMarkdown(t,e){return n=>{const{state:r}=n;let s=this.options.markdownToHtml(t,this.options.htmlSanitizer);s=!(e!=null&&e.alwaysWrapInBlock)&&s.startsWith("<p><")&&s.endsWith(`</p>
180
180
  `)?s.slice(3,-5):`<div>${s}</div>`;const i=this.store.stringHandlers.html({content:s,schema:r.schema,fragment:!0});return this.store.commands.insertNode.original(i,{...e,replaceEmptyParentBlock:!0})(n)}}getMarkdown(t){return this.options.htmlToMarkdown(this.store.helpers.getHTML(t))}toggleBoldMarkdown(){return t=>!1}};Gi([N()],yr.prototype,"insertMarkdown",1);Gi([se()],yr.prototype,"getMarkdown",1);Gi([N()],yr.prototype,"toggleBoldMarkdown",1);yr=Gi([G({defaultOptions:{htmlToMarkdown:aw,markdownToHtml:uw,htmlSanitizer:void 0,activeNodes:[j.Code],copyAsMarkdown:!1},staticKeys:["htmlToMarkdown","markdownToHtml","htmlSanitizer"]})],yr);var dw=Object.defineProperty,hw=Object.getOwnPropertyDescriptor,Xi=(t,e,n,r)=>{for(var s=r>1?void 0:r?hw(e,n):e,i=t.length-1,o;i>=0;i--)(o=t[i])&&(s=(r?o(e,n,s):o(s))||s);return r&&s&&dw(e,n,s),s},fw={icon:"paragraph",label:({t})=>t(hi.INSERT_LABEL),description:({t})=>t(hi.INSERT_DESCRIPTION)},pw={icon:"paragraph",label:({t})=>t(hi.CONVERT_LABEL),description:({t})=>t(hi.CONVERT_DESCRIPTION)},Pn=class extends Pt{get name(){return"paragraph"}createTags(){return[j.LastNodeCompatible,j.TextBlock,j.Block,j.FormattingNode]}createNodeSpec(t,e){return{content:"inline*",draggable:!1,...e,attrs:{...t.defaults()},parseDOM:[{tag:"p",getAttrs:n=>({...t.parse(n)})},...e.parseDOM??[]],toDOM:n=>["p",t.dom(n),0]}}convertParagraph(t={}){const{attrs:e,selection:n,preserveAttrs:r}=t;return this.store.commands.setBlockNodeType.original(this.type,e,n,r)}insertParagraph(t,e={}){const{selection:n,attrs:r}=e;return this.store.commands.insertNode.original(this.type,{content:t,selection:n,attrs:r})}shortcut(t){return this.convertParagraph()(t)}};Xi([N(pw)],Pn.prototype,"convertParagraph",1);Xi([N(fw)],Pn.prototype,"insertParagraph",1);Xi([Ye({shortcut:E.Paragraph,command:"convertParagraph"})],Pn.prototype,"shortcut",1);Pn=Xi([G({defaultPriority:Y.Medium})],Pn);var mw=Object.defineProperty,gw=Object.getOwnPropertyDescriptor,yw=(t,e,n,r)=>{for(var s=r>1?void 0:r?gw(e,n):e,i=t.length-1,o;i>=0;i--)(o=t[i])&&(s=(r?o(e,n,s):o(s))||s);return r&&s&&mw(e,n,s),s},un=class extends te{get name(){return"placeholder"}createAttributes(){return{"aria-placeholder":this.options.placeholder}}createPlugin(){return{state:{init:(t,e)=>({...this.options,empty:Ia(e.doc,{ignoreAttributes:!0})}),apply:(t,e,n,r)=>xw({pluginState:e,tr:t,extension:this,state:r})},props:{decorations:t=>bw({state:t,extension:this})}}}onSetOptions(t){const{changes:e}=t;e.placeholder.changed&&this.store.phase>=Pe.EditorView&&this.store.updateAttributes()}};un=yw([G({defaultOptions:{emptyNodeClass:z1.IS_EMPTY,placeholder:""}})],un);function xw(t){const{pluginState:e,extension:n,tr:r,state:s}=t;return r.docChanged?{...n.options,empty:Ia(s.doc)}:e}function bw(t){const{extension:e,state:n}=t,{empty:r}=e.pluginKey.getState(n),{emptyNodeClass:s,placeholder:i}=e.options;if(!r)return null;const o=[];return n.doc.descendants((a,l)=>{const c=Q.node(l,l+a.nodeSize,{class:s,"data-placeholder":i});o.push(c)}),W.create(n.doc,o)}var kw=Object.defineProperty,Sw=Object.getOwnPropertyDescriptor,ww=(t,e,n,r)=>{for(var s=r>1?void 0:r?Sw(e,n):e,i=t.length-1,o;i>=0;i--)(o=t[i])&&(s=(r?o(e,n,s):o(s))||s);return r&&s&&kw(e,n,s),s},aa=class extends Pt{get name(){return"text"}createTags(){return[j.InlineNode]}createNodeSpec(){return{}}};aa=ww([G({disableExtraAttributes:!0,defaultPriority:Y.Medium})],aa);var vw={...pr.defaultOptions,...Pn.defaultOptions,...kt.defaultOptions,excludeExtensions:[]};function Ew(t={}){t={...vw,...t};const{content:e,depth:n,getDispatch:r,getState:s,newGroupDelay:i,excludeExtensions:o}=t,a={};for(const c of o??[])a[c]=!0;const l=[];if(!a.history){const c=new kt({depth:n,getDispatch:r,getState:s,newGroupDelay:i});l.push(c)}return a.doc||l.push(new pr({content:e})),a.text||l.push(new aa),a.paragraph||l.push(new Pn),a.positioner||l.push(new ms),a.gapCursor||l.push(new sa),a.events||l.push(new wi),l}var Cw=Object.defineProperty,Tw=Object.getOwnPropertyDescriptor,Ow=(t,e,n,r)=>{for(var s=r>1?void 0:r?Tw(e,n):e,i=t.length-1,o;i>=0;i--)(o=t[i])&&(s=(r?o(e,n,s):o(s))||s);return r&&s&&Cw(e,n,s),s},cf=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},O=(t,e,n)=>(cf(t,e,"read from private field"),n?n.call(t):e.get(t)),je=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},He=(t,e,n,r)=>(cf(t,e,"write to private field"),e.set(t,n),n),jr,Mw=class{constructor(){this.portals=new Map,je(this,jr,ji()),this.on=t=>O(this,jr).on("update",t),this.once=t=>{const e=O(this,jr).on("update",n=>{e(),t(n)});return e}}update(){O(this,jr).emit("update",this.portals)}render({Component:t,container:e}){const n=this.portals.get(e);this.portals.set(e,{Component:t,key:(n==null?void 0:n.key)??si()}),this.update()}forceUpdate(){for(const[t,{Component:e}]of this.portals)this.portals.set(t,{Component:e,key:si()})}remove(t){this.portals.delete(t),this.update()}};jr=new WeakMap;var Nw=t=>{const{portals:e}=t;return _e.createElement(_e.Fragment,null,e.map(([n,{Component:r,key:s}])=>Of.createPortal(_e.createElement(r,null),n,s)))};function _w(t){const[e,n]=z.useState(()=>Array.from(t.portals.entries()));return z.useEffect(()=>t.on(r=>{n(Array.from(r.entries()))}),[t]),z.useMemo(()=>e,[e])}var ne,Wr,yn,Kr,Qs,qr,Jn,Jr,ei,Et,Ne,la,uf=class{constructor({getPosition:t,node:e,portalContainer:n,view:r,ReactComponent:s,options:i}){je(this,ne,void 0),je(this,Wr,[]),je(this,yn,void 0),je(this,Kr,void 0),je(this,Qs,void 0),je(this,qr,void 0),je(this,Jn,void 0),je(this,Jr,!1),je(this,ei,void 0),je(this,Et,void 0),je(this,Ne,void 0),je(this,la,l=>{l&&(R(O(this,Et),{code:b.REACT_NODE_VIEW,message:`You have applied a ref to a node view provided for '${O(this,ne).type.name}' which doesn't support content.`}),l.append(O(this,Et)))}),this.Component=()=>{const l=O(this,Qs);return R(l,{code:b.REACT_NODE_VIEW,message:`The custom react node view provided for ${O(this,ne).type.name} doesn't have a valid ReactComponent`}),_e.createElement(l,{updateAttributes:this.updateAttributes,selected:this.selected,view:O(this,yn),getPosition:O(this,qr),node:O(this,ne),forwardRef:O(this,la),decorations:O(this,Wr)})},this.updateAttributes=l=>{if(!O(this,yn).editable)return;const c=O(this,qr).call(this);if(c==null)return;const u=O(this,yn).state.tr.setNodeMarkup(c,void 0,{...O(this,ne).attrs,...l});O(this,yn).dispatch(u)},R(ee(t),{message:"You are attempting to use a node view for a mark type. This is not supported yet. Please check your configuration."}),He(this,ne,e),He(this,yn,r),He(this,Kr,n),He(this,Qs,s),He(this,qr,t),He(this,Jn,i),He(this,Ne,this.createDom());const{contentDOM:o,wrapper:a}=this.createContentDom()??{};He(this,ei,o??void 0),He(this,Et,a),O(this,Et)&&O(this,Ne).append(O(this,Et)),this.setDomAttributes(O(this,ne),O(this,Ne)),this.Component.displayName=_u(`${O(this,ne).type.name}NodeView`),this.renderComponent()}static create(t){const{portalContainer:e,ReactComponent:n,options:r}=t;return(s,i,o)=>new uf({options:r,node:s,view:i,getPosition:o,portalContainer:e,ReactComponent:n})}get selected(){return O(this,Jr)}get contentDOM(){return O(this,ei)}get dom(){return O(this,Ne)}renderComponent(){O(this,Kr).render({Component:this.Component,container:O(this,Ne)})}createDom(){const{defaultBlockNode:t,defaultInlineNode:e}=O(this,Jn),n=O(this,ne).isInline?document.createElement(e):document.createElement(t);return n.classList.add(`${cl(O(this,ne).type.name)}-node-view-wrapper`),n}createContentDom(){var t,e;if(O(this,ne).isLeaf)return;const n=(e=(t=O(this,ne).type.spec).toDOM)==null?void 0:e.call(t,O(this,ne));if(!n)return;const{contentDOM:r,dom:s}=Dt.renderSpec(document,n);let i;if($e(s))return i=s,s===r&&(i=document.createElement("span"),i.classList.add(`${cl(O(this,ne).type.name)}-node-view-content-wrapper`),i.append(r)),$e(r),{wrapper:i,contentDOM:r}}update(t,e){return _a({types:O(this,ne).type,node:t})?(O(this,ne)===t&&O(this,Wr)===e||(O(this,ne).sameMarkup(t)||this.setDomAttributes(t,O(this,Ne)),He(this,ne,t),He(this,Wr,e),this.renderComponent()),!0):!1}setDomAttributes(t,e){const{toDOM:n}=O(this,ne).type.spec;let r=t.attrs;if(n){const s=n(t);if(P(s)||Aw(s))return;Ln(s[1])&&(r=s[1])}for(const[s,i]of fe(r))e.setAttribute(s,i)}selectNode(){He(this,Jr,!0),O(this,Ne)&&O(this,Ne).classList.add(il),this.renderComponent()}deselectNode(){He(this,Jr,!1),O(this,Ne)&&O(this,Ne).classList.remove(il),this.renderComponent()}destroy(){O(this,Kr).remove(O(this,Ne))}ignoreMutation(t){return t.type==="selection"?!O(this,ne).type.spec.selectable:O(this,Et)?!O(this,Et).contains(t.target):!0}stopEvent(t){var e;if(!O(this,Ne))return!1;if(ee(O(this,Jn).stopEvent))return O(this,Jn).stopEvent({event:t});const n=t.target;if(!(O(this,Ne).contains(n)&&!((e=this.contentDOM)!=null&&e.contains(n))))return!1;const s=t.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!s)return!0;const o=!!O(this,ne).type.spec.draggable,a=I.isSelectable(O(this,ne)),l=t.type==="copy",c=t.type==="paste",u=t.type==="cut",d=t.type==="mousedown",h=t.type.startsWith("drag");return!o&&a&&h&&t.preventDefault(),!(h||s||l||c||u||d&&a)}},Gc=uf;ne=new WeakMap;Wr=new WeakMap;yn=new WeakMap;Kr=new WeakMap;Qs=new WeakMap;qr=new WeakMap;Jn=new WeakMap;Jr=new WeakMap;ei=new WeakMap;Et=new WeakMap;Ne=new WeakMap;la=new WeakMap;function Aw(t){return Wo(t)||Ln(t)&&Wo(t.dom)}var ks=class extends te{constructor(){super(...arguments),this.portalContainer=new Mw}get name(){return"reactComponent"}onCreate(){this.store.setStoreKey("portalContainer",this.portalContainer)}createNodeViews(){const t=M(),e=this.store.managerSettings.nodeViewComponents??{};for(const r of this.store.extensions)!r.ReactComponent||!Ns(r)||r.reactComponentEnvironment==="ssr"||(t[r.name]=Gc.create({options:this.options,ReactComponent:r.ReactComponent,portalContainer:this.portalContainer}));const n=fe({...this.options.nodeViewComponents,...e});for(const[r,s]of n)t[r]=Gc.create({options:this.options,ReactComponent:s,portalContainer:this.portalContainer});return t}};ks=Ow([G({defaultOptions:{defaultBlockNode:"div",defaultInlineNode:"span",defaultContentNode:"span",defaultEnvironment:"both",nodeViewComponents:{},stopEvent:null},staticKeys:["defaultBlockNode","defaultInlineNode","defaultContentNode","defaultEnvironment"]})],ks);function Rw(t){const e=z.createContext(null),n=Iw(e);return[s=>{const i=t(s);return _e.createElement(e.Provider,{value:i},s.children)},n,e]}function Iw(t){return(e,n)=>{const r=z.useContext(t),s=Dw(r);if(!r)throw new Error("`useContextHook` must be placed inside the `Provider` returned by the `createContextState` method");if(!e)return r;if(typeof e!="function")throw new TypeError("invalid arguments passed to `useContextHook`. This hook must be called with zero arguments, a getter function or a path string.");const i=e(r);if(!s||!n)return i;const o=e(s);return n(o,i)?o:i}}function Dw(t){const e=z.useRef();return Pw(()=>{e.current=t}),e.current}var Pw=typeof document<"u"?z.useLayoutEffect:z.useEffect;function Lw(t,e){return Rw(n=>{const r=z.useRef(null),s=z.useRef(),i=void 0,[o,a]=z.useState(()=>t({get:Xc(r),set:Yc(s),previousContext:void 0,props:n,state:i})),l=[...Object.values(n),i];return z.useEffect(()=>{l.length!==0&&a(c=>t({get:Xc(r),set:Yc(s),previousContext:c,props:n,state:i}))},l),r.current=o,s.current=a,o})}function Xc(t){return e=>{if(!t.current)throw new Error("`get` called outside of function scope. `get` can only be called within a function.");if(!e)return t.current;if(typeof e!="function")throw new TypeError("Invalid arguments passed to `useContextHook`. The hook must be called with zero arguments, a getter function or a path string.");return e(t.current)}}function Yc(t){return e=>{if(!t.current)throw new Error("`set` called outside of function scope. `set` can only be called within a function.");t.current(n=>({...n,...typeof e=="function"?e(n):e}))}}var df={},hf={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.errorMessages=t.ErrorType=void 0;var e;(function(n){n.MalformedUnicode="MALFORMED_UNICODE",n.MalformedHexadecimal="MALFORMED_HEXADECIMAL",n.CodePointLimit="CODE_POINT_LIMIT",n.OctalDeprecation="OCTAL_DEPRECATION",n.EndOfString="END_OF_STRING"})(e=t.ErrorType||(t.ErrorType={})),t.errorMessages=new Map([[e.MalformedUnicode,"malformed Unicode character escape sequence"],[e.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[e.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[e.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[e.EndOfString,"malformed escape sequence at end of string"]])})(hf);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.unraw=t.errorMessages=t.ErrorType=void 0;const e=hf;Object.defineProperty(t,"ErrorType",{enumerable:!0,get:function(){return e.ErrorType}}),Object.defineProperty(t,"errorMessages",{enumerable:!0,get:function(){return e.errorMessages}});function n(f){return!f.match(/[^a-f0-9]/i)?parseInt(f,16):NaN}function r(f,p,m){const g=n(f);if(Number.isNaN(g)||m!==void 0&&m!==f.length)throw new SyntaxError(e.errorMessages.get(p));return g}function s(f){const p=r(f,e.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(p)}function i(f,p){const m=r(f,e.ErrorType.MalformedUnicode,4);if(p!==void 0){const g=r(p,e.ErrorType.MalformedUnicode,4);return String.fromCharCode(m,g)}return String.fromCharCode(m)}function o(f){return f.charAt(0)==="{"&&f.charAt(f.length-1)==="}"}function a(f){if(!o(f))throw new SyntaxError(e.errorMessages.get(e.ErrorType.MalformedUnicode));const p=f.slice(1,-1),m=r(p,e.ErrorType.MalformedUnicode);try{return String.fromCodePoint(m)}catch(g){throw g instanceof RangeError?new SyntaxError(e.errorMessages.get(e.ErrorType.CodePointLimit)):g}}function l(f,p=!1){if(p)throw new SyntaxError(e.errorMessages.get(e.ErrorType.OctalDeprecation));const m=parseInt(f,8);return String.fromCharCode(m)}const c=new Map([["b","\b"],["f","\f"],["n",`
181
- `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function u(f){return c.get(f)||f}const d=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function h(f,p=!1){return f.replace(d,function(m,g,y,k,D,q,J,$,oe){if(g!==void 0)return"\\";if(y!==void 0)return s(y);if(k!==void 0)return a(k);if(D!==void 0)return i(D,q);if(J!==void 0)return i(J);if($==="0")return"\0";if($!==void 0)return l($,!p);if(oe!==void 0)return u(oe);throw new SyntaxError(e.errorMessages.get(e.ErrorType.EndOfString))})}t.unraw=h,t.default=h})(df);const Nn=t=>typeof t=="string",Bw=t=>typeof t=="function",Zc=new Map,ff="en";function tl(t){return[...Array.isArray(t)?t:[t],ff]}function pf(t,e,n){const r=tl(t);return Ni(()=>_i("date",r,n),()=>new Intl.DateTimeFormat(r,n)).format(Nn(e)?new Date(e):e)}function ca(t,e,n){const r=tl(t);return Ni(()=>_i("number",r,n),()=>new Intl.NumberFormat(r,n)).format(e)}function Qc(t,e,n,{offset:r=0,...s}){const i=tl(t),o=e?Ni(()=>_i("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):Ni(()=>_i("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return s[n]??s[o.select(n-r)]??s.other}function Ni(t,e){const n=t();let r=Zc.get(n);return r||(r=e(),Zc.set(n,r)),r}function _i(t,e,n){const r=e.join("-");return`${t}-${r}-${JSON.stringify(n)}`}const mf=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,gf="%__lingui_octothorpe__%",zw=(t,e,n={})=>{const r=e||t,s=o=>typeof o=="object"?o:n[o]||{style:o},i=(o,a)=>{const l=Object.keys(n).length?s("number"):void 0,c=ca(r,o,l);return a.replace(new RegExp(gf,"g"),c)};return{plural:(o,a)=>{const{offset:l=0}=a,c=Qc(r,!1,o,a);return i(o-l,c)},selectordinal:(o,a)=>{const{offset:l=0}=a,c=Qc(r,!0,o,a);return i(o-l,c)},select:$w,number:(o,a)=>ca(r,o,s(a)),date:(o,a)=>pf(r,o,s(a))}},$w=(t,e)=>e[t]??e.other;function Fw(t,e,n){return(r={},s)=>{const i=zw(e,n,s),o=(l,c=!1)=>Array.isArray(l)?l.reduce((u,d)=>{if(d==="#"&&c)return u+gf;if(Nn(d))return u+d;const[h,f,p]=d;let m={};f==="plural"||f==="selectordinal"||f==="select"?Object.entries(p).forEach(([y,k])=>{m[y]=o(k,f==="plural"||f==="selectordinal")}):m=p;let g;if(f){const y=i[f];g=y(r[h],m)}else g=r[h];return g==null?u:u+g},""):l,a=o(t);return Nn(a)&&mf.test(a)?df.unraw(a.trim()):Nn(a)?a.trim():a?String(a):""}}var Vw=Object.defineProperty,Hw=(t,e,n)=>e in t?Vw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Uw=(t,e,n)=>(Hw(t,e+"",n),n);class jw{constructor(){Uw(this,"_events",{})}on(e,n){var r;return(r=this._events)[e]??(r[e]=[]),this._events[e].push(n),()=>this.removeListener(e,n)}removeListener(e,n){const r=this._getListeners(e);if(!r)return;const s=r.indexOf(n);~s&&r.splice(s,1)}emit(e,...n){const r=this._getListeners(e);r&&r.map(s=>s.apply(this,n))}_getListeners(e){const n=this._events[e];return Array.isArray(n)?n:!1}}var Ww=Object.defineProperty,Kw=(t,e,n)=>e in t?Ww(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Un=(t,e,n)=>(Kw(t,typeof e!="symbol"?e+"":e,n),n);class qw extends jw{constructor(e){super(),Un(this,"_locale",""),Un(this,"_locales"),Un(this,"_localeData",{}),Un(this,"_messages",{}),Un(this,"_missing"),Un(this,"t",this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale=="string"||e.locales)&&this.activate(e.locale??ff,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(e,n){const r=this._localeData[e];r?Object.assign(r,n):this._localeData[e]=n}loadLocaleData(e,n){n!=null?this._loadLocaleData(e,n):Object.keys(e).forEach(r=>this._loadLocaleData(r,e[r])),this.emit("change")}_load(e,n){const r=this._messages[e];r?Object.assign(r,n):this._messages[e]=n}load(e,n){typeof e=="string"&&typeof n=="object"?this._load(e,n):Object.entries(e).forEach(([r,s])=>this._load(r,s)),this.emit("change")}loadAndActivate({locale:e,locales:n,messages:r}){this._locale=e,this._locales=n||void 0,this._messages[this._locale]=r,this.emit("change")}activate(e,n){this._locale=e,this._locales=n,this.emit("change")}_(e,n,r){let s=r==null?void 0:r.message;e||(e=""),Nn(e)||(n=e.values||n,s=e.message,e=e.id);const i=this.messages[e],o=i===void 0,a=this._missing;if(a&&o)return Bw(a)?a(this._locale,e):a;o&&this.emit("missing",{id:e,locale:this._locale});let l=i||s||e;return Nn(l)&&mf.test(l)?JSON.parse(`"${l}"`):Nn(l)?l:Fw(l,this._locale,this._locales)(n,r==null?void 0:r.formats)}date(e,n){return pf(this._locales||this._locale,e,n)}number(e,n){return ca(this._locales||this._locale,e,n)}}function Jw(t={}){return new qw(t)}const Yi=Jw();function S(t,e){return e?"other":t==1?"one":"other"}function Lt(t,e){return e?"other":t==0||t==1?"one":"other"}function Fe(t,e){var n=String(t).split("."),r=!n[1];return e?"other":t==1&&r?"one":"other"}function K(t,e){return"other"}function fn(t,e){return e?"other":t==1?"one":t==2?"two":"other"}const Gw=K,Xw=S,Yw=Lt;function Zw(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const Qw=S;function ev(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return e?"other":t==0?"zero":t==1?"one":t==2?"two":s>=3&&s<=10?"few":s>=11&&s<=99?"many":"other"}function tv(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return e?"other":t==0?"zero":t==1?"one":t==2?"two":s>=3&&s<=10?"few":s>=11&&s<=99?"many":"other"}function nv(t,e){return e?t==1||t==5||t==7||t==8||t==9||t==10?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const rv=S,sv=Fe;function iv(t,e){var n=String(t).split("."),r=n[0],s=r.slice(-1),i=r.slice(-2),o=r.slice(-3);return e?s==1||s==2||s==5||s==7||s==8||i==20||i==50||i==70||i==80?"one":s==3||s==4||o==100||o==200||o==300||o==400||o==500||o==600||o==700||o==800||o==900?"few":r==0||s==6||i==40||i==60||i==90?"many":"other":t==1?"one":"other"}function ov(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return e?(s==2||s==3)&&i!=12&&i!=13?"few":"other":s==1&&i!=11?"one":s>=2&&s<=4&&(i<12||i>14)?"few":r&&s==0||s>=5&&s<=9||i>=11&&i<=14?"many":"other"}const av=S,lv=S,cv=S,uv=Lt,dv=K;function hv(t,e){return e?t==1||t==5||t==7||t==8||t==9||t==10?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const fv=K;function pv(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),i=r&&n[0].slice(-2),o=r&&n[0].slice(-6);return e?"other":s==1&&i!=11&&i!=71&&i!=91?"one":s==2&&i!=12&&i!=72&&i!=92?"two":(s==3||s==4||s==9)&&(i<10||i>19)&&(i<70||i>79)&&(i<90||i>99)?"few":t!=0&&r&&o==0?"many":"other"}const mv=S;function gv(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=r.slice(-2),l=s.slice(-1),c=s.slice(-2);return e?"other":i&&o==1&&a!=11||l==1&&c!=11?"one":i&&o>=2&&o<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function yv(t,e){var n=String(t).split("."),r=!n[1];return e?t==1||t==3?"one":t==2?"two":t==4?"few":"other":t==1&&r?"one":"other"}const xv=S;function bv(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=s.slice(-1);return e?"other":i&&(r==1||r==2||r==3)||i&&o!=4&&o!=6&&o!=9||!i&&a!=4&&a!=6&&a!=9?"one":"other"}const kv=S,Sv=S,wv=S;function vv(t,e){var n=String(t).split("."),r=n[0],s=!n[1];return e?"other":t==1&&s?"one":r>=2&&r<=4&&s?"few":s?"other":"many"}function Ev(t,e){return e?t==0||t==7||t==8||t==9?"zero":t==1?"one":t==2?"two":t==3||t==4?"few":t==5||t==6?"many":"other":t==0?"zero":t==1?"one":t==2?"two":t==3?"few":t==6?"many":"other"}function Cv(t,e){var n=String(t).split("."),r=n[0],s=Number(n[0])==t;return e?"other":t==1||!s&&(r==0||r==1)?"one":"other"}const Tv=Fe;function Ov(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-2),a=s.slice(-2);return e?"other":i&&o==1||a==1?"one":i&&o==2||a==2?"two":i&&(o==3||o==4)||a==3||a==4?"few":"other"}const Mv=S,Nv=K,_v=S,Av=S;function Rv(t,e){var n=String(t).split("."),r=!n[1],s=Number(n[0])==t,i=s&&n[0].slice(-1),o=s&&n[0].slice(-2);return e?i==1&&o!=11?"one":i==2&&o!=12?"two":i==3&&o!=13?"few":"other":t==1&&r?"one":"other"}const Iv=S,Dv=S,Pv=Fe,Lv=S;function Bv(t,e){return e?"other":t>=0&&t<=1?"one":"other"}function zv(t,e){return e?"other":t>=0&&t<2?"one":"other"}const $v=Fe;function Fv(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=s.slice(-1);return e?t==1?"one":"other":i&&(r==1||r==2||r==3)||i&&o!=4&&o!=6&&o!=9||!i&&a!=4&&a!=6&&a!=9?"one":"other"}const Vv=S;function Hv(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const Uv=S,jv=Fe;function Wv(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1?"one":"other":t==1?"one":t==2?"two":r&&t>=3&&t<=6?"few":r&&t>=7&&t<=10?"many":"other"}function Kv(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1||t==11?"one":t==2||t==12?"two":t==3||t==13?"few":"other":t==1||t==11?"one":t==2||t==12?"two":r&&t>=3&&t<=10||r&&t>=13&&t<=19?"few":"other"}const qv=Fe,Jv=S;function Gv(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const Xv=Lt;function Yv(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=r.slice(-1),o=r.slice(-2);return e?"other":s&&i==1?"one":s&&i==2?"two":s&&(o==0||o==20||o==40||o==60||o==80)?"few":s?"other":"many"}const Zv=S,Qv=S;function eE(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=Number(n[0])==t,o=i&&n[0].slice(-1);return e?"other":t==1&&s?"one":r==2&&s?"two":s&&(t<0||t>10)&&i&&o==0?"many":"other"}function tE(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}function nE(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=r.slice(-2),l=s.slice(-1),c=s.slice(-2);return e?"other":i&&o==1&&a!=11||l==1&&c!=11?"one":i&&o>=2&&o<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function rE(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-2),a=s.slice(-2);return e?"other":i&&o==1||a==1?"one":i&&o==2||a==2?"two":i&&(o==3||o==4)||a==3||a==4?"few":"other"}function sE(t,e){return e?t==1||t==5?"one":"other":t==1?"one":"other"}function iE(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const oE=Fe,aE=K,lE=K,cE=K,uE=Fe;function dE(t,e){var n=String(t).split("."),r=n[0],s=Number(n[0])==t,i=r.slice(-1),o=r.slice(-2);return e?"other":s&&i==1&&o!=11||!s?"one":"other"}function hE(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}const fE=fn;function pE(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=Number(n[0])==t,o=i&&n[0].slice(-1);return e?"other":t==1&&s?"one":r==2&&s?"two":s&&(t<0||t>10)&&i&&o==0?"many":"other"}const mE=K,gE=K,yE=S,xE=Fe,bE=S,kE=K,SE=K;function wE(t,e){var n=String(t).split("."),r=n[0],s=r.slice(-2);return e?r==1?"one":r==0||s>=2&&s<=20||s==40||s==60||s==80?"many":"other":t==1?"one":"other"}function vE(t,e){return e?"other":t>=0&&t<2?"one":"other"}const EE=S,CE=S,TE=K,OE=K;function ME(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1);return e?s==6||s==9||r&&s==0&&t!=0?"many":"other":t==1?"one":"other"}const NE=S,_E=S,AE=K;function RE(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const IE=K,DE=S,PE=S;function LE(t,e){return e?"other":t==0?"zero":t==1?"one":"other"}const BE=S;function zE(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2),i=r&&n[0].slice(-3),o=r&&n[0].slice(-5),a=r&&n[0].slice(-6);return e?r&&t>=1&&t<=4||s>=1&&s<=4||s>=21&&s<=24||s>=41&&s<=44||s>=61&&s<=64||s>=81&&s<=84?"one":t==5||s==5?"many":"other":t==0?"zero":t==1?"one":s==2||s==22||s==42||s==62||s==82||r&&i==0&&(o>=1e3&&o<=2e4||o==4e4||o==6e4||o==8e4)||t!=0&&a==1e5?"two":s==3||s==23||s==43||s==63||s==83?"few":t!=1&&(s==1||s==21||s==41||s==61||s==81)?"many":"other"}const $E=S;function FE(t,e){var n=String(t).split("."),r=n[0];return e?"other":t==0?"zero":(r==0||r==1)&&t!=0?"one":"other"}const VE=S,HE=S,UE=K,jE=Lt;function WE(t,e){return e&&t==1?"one":"other"}function KE(t,e){var n=String(t).split("."),r=n[1]||"",s=Number(n[0])==t,i=s&&n[0].slice(-1),o=s&&n[0].slice(-2);return e?"other":i==1&&(o<11||o>19)?"one":i>=2&&i<=9&&(o<11||o>19)?"few":r!=0?"many":"other"}function qE(t,e){var n=String(t).split("."),r=n[1]||"",s=r.length,i=Number(n[0])==t,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return e?"other":i&&o==0||a>=11&&a<=19||s==2&&l>=11&&l<=19?"zero":o==1&&a!=11||s==2&&c==1&&l!=11||s!=2&&c==1?"one":"other"}const JE=S,GE=Lt,XE=S;function YE(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=r.slice(-2),l=s.slice(-1),c=s.slice(-2);return e?o==1&&a!=11?"one":o==2&&a!=12?"two":(o==7||o==8)&&a!=17&&a!=18?"many":"other":i&&o==1&&a!=11||l==1&&c!=11?"one":"other"}const ZE=S,QE=S;function eC(t,e){var n=String(t).split("."),r=!n[1],s=Number(n[0])==t,i=s&&n[0].slice(-2);return e?t==1?"one":"other":t==1&&r?"one":!r||t==0||i>=2&&i<=19?"few":"other"}function tC(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":"other":t==1?"one":"other"}function nC(t,e){return e&&t==1?"one":"other"}function rC(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return e?"other":t==1?"one":t==0||s>=2&&s<=10?"few":s>=11&&s<=19?"many":"other"}const sC=K,iC=S,oC=fn,aC=S,lC=S;function cC(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?r&&t>=1&&t<=4?"one":"other":t==1?"one":"other"}const uC=Fe,dC=S,hC=S,fC=S,pC=K,mC=S,gC=Lt,yC=S,xC=S,bC=S;function kC(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1||t==5||r&&t>=7&&t<=9?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t==1?"one":"other"}const SC=S,wC=K,vC=Lt,EC=S;function CC(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=r.slice(-1),o=r.slice(-2);return e?"other":t==1&&s?"one":s&&i>=2&&i<=4&&(o<12||o>14)?"few":s&&r!=1&&(i==0||i==1)||s&&i>=5&&i<=9||s&&o>=12&&o<=14?"many":"other"}function TC(t,e){var n=String(t).split("."),r=n[1]||"",s=r.length,i=Number(n[0])==t,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return e?"other":i&&o==0||a>=11&&a<=19||s==2&&l>=11&&l<=19?"zero":o==1&&a!=11||s==2&&c==1&&l!=11||s!=2&&c==1?"one":"other"}const OC=S;function MC(t,e){var n=String(t).split("."),r=n[0];return e?"other":r==0||r==1?"one":"other"}const NC=Fe,_C=S;function AC(t,e){var n=String(t).split("."),r=!n[1],s=Number(n[0])==t,i=s&&n[0].slice(-2);return e?t==1?"one":"other":t==1&&r?"one":!r||t==0||i>=2&&i<=19?"few":"other"}const RC=S,IC=K;function DC(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=r.slice(-1),o=r.slice(-2);return e?"other":s&&i==1&&o!=11?"one":s&&i>=2&&i<=4&&(o<12||o>14)?"few":s&&i==0||s&&i>=5&&i<=9||s&&o>=11&&o<=14?"many":"other"}const PC=S,LC=K,BC=S;function zC(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}function $C(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}const FC=S,VC=S,HC=fn,UC=S,jC=K,WC=K;function KC(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=r.slice(-2),l=s.slice(-1),c=s.slice(-2);return e?"other":i&&o==1&&a!=11||l==1&&c!=11?"one":i&&o>=2&&o<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function qC(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?"other":t>=0&&t<=1?"one":r&&t>=2&&t<=10?"few":"other"}function JC(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"";return e?"other":t==0||t==1||r==0&&s==1?"one":"other"}function GC(t,e){var n=String(t).split("."),r=n[0],s=!n[1];return e?"other":t==1&&s?"one":r>=2&&r<=4&&s?"few":s?"other":"many"}function XC(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=r.slice(-2);return e?"other":s&&i==1?"one":s&&i==2?"two":s&&(i==3||i==4)||!s?"few":"other"}const YC=fn,ZC=fn,QC=fn,eT=fn,tT=fn,nT=S,rT=S;function sT(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return e?t==1?"one":s==4&&i!=14?"many":"other":t==1?"one":"other"}function iT(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=r.slice(-2),l=s.slice(-1),c=s.slice(-2);return e?"other":i&&o==1&&a!=11||l==1&&c!=11?"one":i&&o>=2&&o<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}const oT=S,aT=S,lT=S,cT=K;function uT(t,e){var n=String(t).split("."),r=!n[1],s=Number(n[0])==t,i=s&&n[0].slice(-1),o=s&&n[0].slice(-2);return e?(i==1||i==2)&&o!=11&&o!=12?"one":"other":t==1&&r?"one":"other"}const dT=Fe,hT=S,fT=S,pT=S,mT=S,gT=K,yT=Lt,xT=S;function bT(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1);return e?s==6||s==9||t==10?"few":"other":t==1?"one":"other"}function kT(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=s.slice(-1);return e?t==1?"one":"other":i&&(r==1||r==2||r==3)||i&&o!=4&&o!=6&&o!=9||!i&&a!=4&&a!=6&&a!=9?"one":"other"}const ST=S,wT=K,vT=S,ET=S;function CT(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?"other":t==0||t==1||r&&t>=11&&t<=99?"one":"other"}const TT=S;function OT(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=Number(n[0])==t,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2),l=r.slice(-1),c=r.slice(-2);return e?o==3&&a!=13?"few":"other":s&&l==1&&c!=11?"one":s&&l>=2&&l<=4&&(c<12||c>14)?"few":s&&l==0||s&&l>=5&&l<=9||s&&c>=11&&c<=14?"many":"other"}const MT=Fe,NT=S,_T=S;function AT(t,e){return e&&t==1?"one":"other"}const RT=S,IT=S,DT=Lt,PT=S,LT=K,BT=S,zT=S,$T=Fe,FT=K,VT=K,HT=K;function UT(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const jT=Object.freeze(Object.defineProperty({__proto__:null,_in:Gw,af:Xw,ak:Yw,am:Zw,an:Qw,ar:ev,ars:tv,as:nv,asa:rv,ast:sv,az:iv,be:ov,bem:av,bez:lv,bg:cv,bho:uv,bm:dv,bn:hv,bo:fv,br:pv,brx:mv,bs:gv,ca:yv,ce:xv,ceb:bv,cgg:kv,chr:Sv,ckb:wv,cs:vv,cy:Ev,da:Cv,de:Tv,dsb:Ov,dv:Mv,dz:Nv,ee:_v,el:Av,en:Rv,eo:Iv,es:Dv,et:Pv,eu:Lv,fa:Bv,ff:zv,fi:$v,fil:Fv,fo:Vv,fr:Hv,fur:Uv,fy:jv,ga:Wv,gd:Kv,gl:qv,gsw:Jv,gu:Gv,guw:Xv,gv:Yv,ha:Zv,haw:Qv,he:eE,hi:tE,hr:nE,hsb:rE,hu:sE,hy:iE,ia:oE,id:aE,ig:lE,ii:cE,io:uE,is:dE,it:hE,iu:fE,iw:pE,ja:mE,jbo:gE,jgo:yE,ji:xE,jmc:bE,jv:kE,jw:SE,ka:wE,kab:vE,kaj:EE,kcg:CE,kde:TE,kea:OE,kk:ME,kkj:NE,kl:_E,km:AE,kn:RE,ko:IE,ks:DE,ksb:PE,ksh:LE,ku:BE,kw:zE,ky:$E,lag:FE,lb:VE,lg:HE,lkt:UE,ln:jE,lo:WE,lt:KE,lv:qE,mas:JE,mg:GE,mgo:XE,mk:YE,ml:ZE,mn:QE,mo:eC,mr:tC,ms:nC,mt:rC,my:sC,nah:iC,naq:oC,nb:aC,nd:lC,ne:cC,nl:uC,nn:dC,nnh:hC,no:fC,nqo:pC,nr:mC,nso:gC,ny:yC,nyn:xC,om:bC,or:kC,os:SC,osa:wC,pa:vC,pap:EC,pl:CC,prg:TC,ps:OC,pt:MC,pt_PT:NC,rm:_C,ro:AC,rof:RC,root:IC,ru:DC,rwk:PC,sah:LC,saq:BC,sc:zC,scn:$C,sd:FC,sdh:VC,se:HC,seh:UC,ses:jC,sg:WC,sh:KC,shi:qC,si:JC,sk:GC,sl:XC,sma:YC,smi:ZC,smj:QC,smn:eT,sms:tT,sn:nT,so:rT,sq:sT,sr:iT,ss:oT,ssy:aT,st:lT,su:cT,sv:uT,sw:dT,syr:hT,ta:fT,te:pT,teo:mT,th:gT,ti:yT,tig:xT,tk:bT,tl:kT,tn:ST,to:wT,tr:vT,ts:ET,tzm:CT,ug:TT,uk:OT,ur:MT,uz:NT,ve:_T,vi:AT,vo:RT,vun:IT,wa:DT,wae:PT,wo:LT,xh:BT,xog:zT,yi:$T,yo:FT,yue:VT,zh:HT,zu:UT},Symbol.toStringTag,{value:"Module"}));var WT=Object.defineProperty,KT=Object.getOwnPropertyDescriptor,qT=Object.getOwnPropertyNames,JT=Object.prototype.hasOwnProperty,GT=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of qT(e))!JT.call(t,s)&&s!==n&&WT(t,s,{get:()=>e[s],enumerable:!(r=KT(e,s))||r.enumerable});return t},XT=(t,e,n)=>(GT(t,e,"default"),n),YT=JSON.parse('{"extension.command.toggle-upper-case.label":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"extension.table.column_count":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"extension.table.row_count":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.toggle-columns.description":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"extension.command.toggle-columns.label":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"extension.command.set-text-direction.label":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"extension.command.set-text-direction.description":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"extension.command.toggle-heading.label":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"extension.command.toggle-callout.description":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"extension.command.toggle-callout.label":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"extension.command.toggle-code-block.description":"Add a code block","extension.command.add-annotation.label":"Add annotation","extension.command.toggle-blockquote.description":"Add blockquote formatting to the selected text","extension.command.toggle-bold.description":"Add bold formatting to the selected text","extension.command.toggle-code.description":"Add inline code formatting to the selected text","keyboard.shortcut.alt":"Alt","keyboard.shortcut.arrowDown":"Arrow Down","keyboard.shortcut.arrowLeft":"Arrow Left","keyboard.shortcut.arrowRight":"Arrow Right","keyboard.shortcut.arrowUp":"Arrow Up","keyboard.shortcut.backspace":"Backspace","ui.text-color.black":"Black","extension.command.toggle-blockquote.label":"Blockquote","ui.text-color.blue":"Blue","ui.text-color.blue.hue":["Blue ",["hue"]],"extension.command.toggle-bold.label":"Bold","extension.command.toggle-bullet-list.description":"Bulleted list","keyboard.shortcut.capsLock":"Caps Lock","extension.command.center-align.label":"Center align","extension.command.toggle-code.label":"Code","extension.command.toggle-code-block.label":"Codeblock","keyboard.shortcut.command":"Command","QcPNd6":"Image description","ogrUzJ":"Add a short description here.","yqdyzr":"Image","6/02F4":"Image source","X8H91v":"Image","zhQ7Zt":"Italic","ZL7E7l":"Underline","keyboard.shortcut.control":"Control","extension.command.convert-paragraph.description":"Convert current block into a paragraph block.","extension.command.convert-paragraph.label":"Convert Paragraph","extension.command.copy.label":"Copy","extension.command.copy.description":"Copy the selected text","extension.command.create-table.description":"Create a table with set number of rows and columns.","extension.command.create-table.label":"Create table","extension.command.cut.label":"Cut","extension.command.cut.description":"Cut the selected text","ui.text-color.cyan":"Cyan","ui.text-color.cyan.hue":["Cyan ",["hue"]],"extension.command.decrease-font-size.label":"Decrease","extension.command.decrease-indent.label":"Decrease indentation","extension.command.decrease-font-size.description":"Decrease the font size.","keyboard.shortcut.delete":"Delete","extension.command.insert-horizontal-rule.label":"Divider","keyboard.shortcut.end":"End","keyboard.shortcut.escape":"Enter","keyboard.shortcut.enter":"Enter","6PjrOF":"Add annotation","OTq5WC":"Center align","oeZ3ox":"Convert current block into a paragraph block.","m1khs+":"Convert Paragraph","w/1U+3":"Copy the selected text","kdodi0":"Copy","k0KR/u":"Create a table with set number of rows and columns.","zrwMyD":"Create table","D/nWxh":"Cut the selected text","jHPv5m":"Cut","5cNgRx":"Decrease the font size.","vyRNWx":"Decrease","Jgiol4":"Decrease indentation","1gJSHH":"Increase the font size","OQXJXz":"Increase","72TLhr":"Increase indentation","HFlfzJ":"Insert Emoji","RPq9fY":"Separate content with a diving horizontal line","OKQF+e":"Divider","zjYb9C":"Insert a new paragraph","4M4sXC":"Insert Paragraph","1Q+eVc":"Justify","ejWWtP":"Left align","wVqrpS":"Paste content into the editor","07v9aw":"Paste","zUYfou":"Redo the most recent action","9Nq9zr":"Redo","0uxaZe":"Remove annotation","iJWZAz":"Right align","g5WpPn":"Select all content within the editor","2+pZDT":"Select all","yChCR1":"Set text case","GMzAC/":"Set the font size for the selected text.","vzEyrv":"Font size","7VCkJ8":"Set the text color for the selected text.","qjWFaR":"Text color","LVWgFu":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"WXwRy1":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"G/o315":"Set the text highlight color for the selected text.","xtHg6d":"Text highlight","1p1W/p":"Add blockquote formatting to the selected text","6+rh6I":"Blockquote","0yB3LV":"Add bold formatting to the selected text","sFMo4Z":"Bold","SMKG/s":"Bulleted list","/BYCMi":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"V+3IBe":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"hbIo4L":"Add a code block","7GkMcx":"Codeblock","2r4JYl":"Add inline code formatting to the selected text","Up8Tpe":"Code","ATHSPS":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"7DC1VE":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"hnrBeo":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"NkZAcw":"Italicize the selected text","2fTW9e":"Italic","c759Ra":"Ordered list","uQwrZu":"Strikethrough the selected text","pT3qly":"Strikethrough","BHk+zu":"Subscript","18BVwM":"Superscript","tOIVCV":"Tasked list","4Janx3":"Underline the selected text","dCHt+D":"Underline","YYAprs":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"tczyZL":"Show hidden whitespace characters in your editor.","0qAX23":"Toggle Whitespace","ezMADU":"Undo the most recent action","N3P7EC":"Undo","2nj/+s":"Update annotation","dWD7u4":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"qXqgVT":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.set-font-size.label":"Font size","ui.text-color.grape":"Grape","ui.text-color.grape.hue":["Grape ",["hue"]],"ui.text-color.gray":"Gray","ui.text-color.gray.hue":["Gray ",["hue"]],"ui.text-color.green":"Green","ui.text-color.green.hue":["Green ",["hue"]],"keyboard.shortcut.home":"Home","extension.command.increase-font-size.label":"Increase","extension.command.increase-indent.label":"Increase indentation","extension.command.increase-font-size.description":"Increase the font size","ui.text-color.indigo":"Indigo","ui.text-color.indigo.hue":["Indigo ",["hue"]],"extension.command.insert-paragraph.description":"Insert a new paragraph","extension.command.insert-emoji.label":"Insert Emoji","extension.command.insert-paragraph.label":"Insert Paragraph","extension.command.toggle-italic.label":"Italic","extension.command.toggle-italic.description":"Italicize the selected text","extension.command.justify-align.label":"Justify","R7NlCw":"Alt","RbDiK5":"Arrow Down","Dgyd+E":"Arrow Left","8pdCk4":"Arrow Right","Gp/343":"Arrow Up","PFPV0A":"Backspace","0IRYvp":"Caps Lock","X7HX0D":"Command","zq0AdD":"Control","8SfToN":"Delete","Ys/uah":"End","3K5hww":"Enter","veQt1j":"Enter","ySv7i+":"Home","e6RUI1":"Page Down","EEJk31":"Page Up","7sbhAU":"Shift","Q4eplT":"Space","SUhVVC":"Tab","extension.command.left-align.label":"Left align","ui.text-color.lime":"Lime","ui.text-color.lime.hue":["Lime ",["hue"]],"react-components.mention-atom-component.zero-items":"No items available","ui.text-color.orange":"Orange","ui.text-color.orange.hue":["Orange ",["hue"]],"extension.command.toggle-ordered-list.label":"Ordered list","keyboard.shortcut.pageDown":"Page Down","keyboard.shortcut.pageUp":"Page Up","extension.command.paste.label":"Paste","extension.command.paste.description":"Paste content into the editor","ui.text-color.pink":"Pink","ui.text-color.pink.hue":["Pink ",["hue"]],"zvMfIA":"No items available","pEjhti":"Static Menu","ui.text-color.red":"Red","ui.text-color.red.hue":["Red ",["hue"]],"extension.command.redo.label":"Redo","extension.command.redo.description":"Redo the most recent action","extension.command.remove-annotation.label":"Remove annotation","extension.command.right-align.label":"Right align","extension.command.select-all.label":"Select all","extension.command.select-all.description":"Select all content within the editor","extension.command.insert-horizontal-rule.description":"Separate content with a diving horizontal line","extension.command.set-casing.label":"Set text case","extension.command.set-font-size.description":"Set the font size for the selected text.","extension.command.set-text-color.description":"Set the text color for the selected text.","extension.command.set-text-highlight.description":"Set the text highlight color for the selected text.","keyboard.shortcut.shift":"Shift","extension.command.toggle-whitespace.description":"Show hidden whitespace characters in your editor.","keyboard.shortcut.space":"Space","extension.command.toggle-strike.label":"Strikethrough","extension.command.toggle-strike.description":"Strikethrough the selected text","extension.command.toggle-subscript.label":"Subscript","extension.command.toggle-superscript.label":"Superscript","keyboard.shortcut.tab":"Tab","extension.command.toggle-task-list.description":"Tasked list","ui.text-color.teal":"Teal","ui.text-color.teal.hue":["Teal ",["hue"]],"extension.command.set-text-color.label":"Text color","extension.command.set-text-highlight.label":"Text highlight","extension.command.toggle-whitespace.label":"Toggle Whitespace","ui.text-color.transparent":"Transparent","slrB1c":"Black","6QML30":"Blue","xw+keN":["Blue ",["hue"]],"38RHqP":"Cyan","D89yPf":["Cyan ",["hue"]],"VjBLnd":"Grape","Rp40yv":["Grape ",["hue"]],"5Dm9D1":"Gray","HGjXjC":["Gray ",["hue"]],"b9fz+n":"Green","18jo3M":["Green ",["hue"]],"CFzqCV":"Indigo","aVlDku":["Indigo ",["hue"]],"04PfLc":"Lime","KRTK6Y":["Lime ",["hue"]],"pSnXFd":"Orange","ve/MJZ":["Orange ",["hue"]],"OvCgDa":"Pink","l7NqyT":["Pink ",["hue"]],"IT9k0j":"Red","AdyJ7/":["Red ",["hue"]],"3D2UWc":"Teal","Dcq0Y1":["Teal ",["hue"]],"bsi2ik":"Transparent","Tj3PRR":"Violet","xxMH5N":["Violet ",["hue"]],"Rum0ah":"White","4gaw/Q":"Yellow","hhauc3":["Yellow ",["hue"]],"extension.command.toggle-underline.label":"Underline","extension.command.toggle-underline.description":"Underline the selected text","extension.command.undo.label":"Undo","extension.command.undo.description":"Undo the most recent action","extension.command.update-annotation.label":"Update annotation","ui.text-color.violet":"Violet","ui.text-color.violet.hue":["Violet ",["hue"]],"ui.text-color.white":"White","ui.text-color.yellow":"Yellow","ui.text-color.yellow.hue":["Yellow ",["hue"]]}'),yf={};XT(yf,jT);Yi.loadLocaleData("en",{plurals:yf.en});Yi.load("en",YT);Yi.activate("en");var ZT=Object.defineProperty,QT=Object.getOwnPropertyDescriptor,eO=(t,e,n,r)=>{for(var s=r>1?void 0:r?QT(e,n):e,i=t.length-1,o;i>=0;i--)(o=t[i])&&(s=(r?o(e,n,s):o(s))||s);return r&&s&&ZT(e,n,s),s},tO={...un.defaultOptions,...ks.defaultOptions},nO=[...un.staticKeys,...ks.staticKeys],Ss=class extends te{get name(){return"react"}onSetOptions(t){const{pickChanged:e}=t;this.getExtension(un).setOptions(e(["placeholder"]))}createExtensions(){const{emptyNodeClass:t,placeholder:e,defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:s,defaultInlineNode:i,nodeViewComponents:o}=this.options;return[new un({emptyNodeClass:t,placeholder:e,priority:Y.Low}),new ks({defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:s,defaultInlineNode:i,nodeViewComponents:o})]}};Ss=eO([G({defaultOptions:tO,staticKeys:nO})],Ss);var xf={};Object.defineProperty(xf,"__esModule",{value:!0});function rO(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t.length===2)return tu(t[0],t[1])||null;var n=t.slice(1).reduce(function(r,s){return tu(r,s)},t[0]);return n||null}var Cr=xf.default=rO,eu=new WeakMap;function tu(t,e){if(t&&e){var n=eu.get(t)||new WeakMap;eu.set(t,n);var r=n.get(e)||function(s){nu(t,s),nu(e,s)};return n.set(e,r),r}return t||e}function nu(t,e){typeof t=="function"?t(e):t.current=e}var bf=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Eo=(t,e,n)=>(bf(t,e,"read from private field"),e.get(t)),sO=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},iO=(t,e,n,r)=>(bf(t,e,"write to private field"),e.set(t,n),n);function oO(){const[,t]=z.useState(M());return z.useCallback(()=>{t(M())},[])}var kf=z.createContext(null);function nl(t){const e=z.useContext(kf),n=z.useRef(oO());R(e,{code:b.REACT_PROVIDER_CONTEXT});const{addHandler:r}=e;return z.useEffect(()=>{let s=t;if(s){if(Ln(s)){const{autoUpdate:i}=s;s=i?()=>n.current():void 0}if(ee(s))return r("updated",s)}},[r,t]),e}function aO(t=!0){return nl({autoUpdate:t}).active}function lO(){return nl().commands}var[cO,nM]=Lw(({props:t})=>{const e=t.locale??"en",n=t.i18n??Yi,r=t.supportedLocales??[e],s=n._.bind(n);return{locale:e,i18n:n,supportedLocales:r,t:s}});function ru(t,e={}){const{core:n,react:r,...s}=e;return mb(t)?t:pb.create(()=>[...Lu(t),new Ss(r),...Ew(n)],s)}function uO(t,e={}){const n=z.useRef(t),r=z.useRef(e),[s,i]=z.useState(()=>ru(t,e));return n.current=t,r.current=e,z.useEffect(()=>s.addHandler("destroy",()=>{i(()=>ru(n.current,r.current))}),[s]),s}var dO=typeof Cr=="object"&&Cr.__esModule&&Cr.default?Cr.default:Cr,Gn,hO=class extends cb{constructor(t){if(super(t),sO(this,Gn,void 0),this.rootPropsConfig={called:!1,count:0},this.getRootProps=e=>this.internalGetRootProps(e,null),this.internalGetRootProps=(e,n)=>{this.rootPropsConfig.called=!0;const{refKey:r="ref",ref:s,...i}=e??M();return{[r]:dO(s,this.onRef),key:this.uid,...i,children:n}},this.onRef=e=>{e&&(this.rootPropsConfig.count+=1,R(this.rootPropsConfig.count<=1,{code:b.REACT_GET_ROOT_PROPS,message:`Called ${this.rootPropsConfig.count} times`}),iO(this,Gn,e),this.onRefLoad())},this.manager.view){this.manager.view.setProps({state:this.manager.view.state,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0});return}this.manager.getExtension(un).setOptions({placeholder:this.props.placeholder??""})}get name(){return"react"}update(t){return super.update(t),this}createView(t){return new _y(null,{state:t,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0,plugins:[]})}updateState({state:t,...e}){const{triggerChange:n=!0,tr:r,transactions:s}=e;if(this.props.state){const{onChange:i}=this.props;R(i,{code:b.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),R(n,{code:b.REACT_CONTROLLED,message:"Controlled editors do not support `clearContent` or `setContent` where `triggerChange` is `true`. Update the `state` prop instead."}),this.previousStateOverride||(this.previousStateOverride=this.getState()),this.onChange({state:t,tr:r,transactions:s});return}!r&&!s&&(t=t.apply(t.tr.setMeta(ol,{}))),this.view.updateState(t),n&&(s==null?void 0:s.length)!==0&&this.onChange({state:t,tr:r,transactions:s}),this.manager.onStateUpdate({previousState:this.previousState,state:t,tr:r,transactions:s})}updateControlledState(t,e){this.previousStateOverride=e,t=t.apply(t.tr.setMeta(ol,{})),this.view.updateState(t),this.manager.onStateUpdate({previousState:this.previousState,state:t}),this.previousStateOverride=void 0}addProsemirrorViewToDom(t,e){this.props.insertPosition==="start"?t.insertBefore(e,t.firstChild):t.append(e)}onRefLoad(){R(Eo(this,Gn),{code:b.REACT_EDITOR_VIEW,message:"Something went wrong when initializing the text editor. Please check your setup."});const{autoFocus:t}=this.props;this.addProsemirrorViewToDom(Eo(this,Gn),this.view.dom),t&&this.focus(t),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&Eo(this,Gn)&&this.view.setProps({...this.view.props,editable:()=>this.props.editable??!0})}get frameworkOutput(){return{...this.baseOutput,getRootProps:this.getRootProps,portalContainer:this.manager.store.portalContainer}}resetRender(){this.rootPropsConfig.called=!1,this.rootPropsConfig.count=0}};Gn=new WeakMap;var Sf=typeof document<"u"?z.useLayoutEffect:z.useEffect;function fO(t){const e=z.useRef();return Sf(()=>{e.current=t}),e.current}function pO(t){const{manager:e,state:n}=t,{placeholder:r,editable:s}=t;z.useRef(!0).current&&!tn(r)&&e.getExtension(Ss).setOptions({placeholder:r}),z.useEffect(()=>{r!=null&&e.getExtension(Ss).setOptions({placeholder:r})},[r,e]);const[o]=z.useState(()=>{if(n)return n;const l=e.createEmptyDoc(),[c,u]=me(t.initialContent)?t.initialContent:[t.initialContent??l];return e.createState({content:c,selection:u})}),a=mO({initialEditorState:o,getProps:()=>t});return z.useEffect(()=>()=>{a.destroy()},[a]),z.useEffect(()=>{a.onUpdate()},[s,a]),gO(a),a.frameworkOutput}function mO(t){const e=z.useRef(t);e.current=t;const n=z.useMemo(()=>new hO(e.current),[]);return n.update(t),n}function gO(t){const{state:e}=t.props,n=z.useRef(!!e),r=fO(e);Sf(()=>{const s=e?n.current===!0:n.current===!1;R(s,{code:b.REACT_CONTROLLED,message:n.current?"You have attempted to switch from a controlled to an uncontrolled editor. Once you set up an editor as a controlled editor it must always provide a `state` prop.":"You have provided a `state` prop to an uncontrolled editor. In order to set up your editor as controlled you must provide the `state` prop from the very first render."}),!(!e||e===r)&&t.updateControlledState(e,r??void 0)},[e,r,t])}function yO(t={}){const{content:e,document:n,selection:r,extensions:s,...i}=t,o=uO(s??(()=>[]),i),[a,l]=z.useState(()=>o.createState({selection:r,content:e??o.createEmptyDoc()})),c=z.useCallback(({state:d})=>{l(d)},[]),u=z.useCallback(()=>o.output,[o]);return z.useMemo(()=>({state:a,setState:l,manager:o,onChange:c,getContext:u}),[u,o,c,a])}var ua=()=>_e.createElement("div",{className:M1.EDITOR_WRAPPER,...nl().getRootProps()}),xO=t=>(t.hook(),null);function bO(t){const{children:e,autoRender:n,i18n:r,locale:s,supportedLocales:i,hooks:o=[],...a}=t,l=pO(a),c=_w(l.portalContainer),u=n==="start"||n===!0||!e&&tn(n),d=n==="end";return _e.createElement(cO,{i18n:r,locale:s,supportedLocales:i},_e.createElement(kf.Provider,{value:l},_e.createElement(Nw,{portals:c}),o.map((h,f)=>_e.createElement(xO,{hook:h,key:f})),u&&_e.createElement(ua,null),e,d&&_e.createElement(ua,null)))}const kO="_richTextToolbar_1gbkk_1",SO="_richTextToolbarContainer_1gbkk_5",su={richTextToolbar:kO,richTextToolbarContainer:SO};var Xn=(t=>(t.BOLD="bold",t.ITALIC="italic",t.CODE="code",t.UL="ul",t.OL="ol",t))(Xn||{});const wf=({disabled:t=!1,toolbarComponent:e=null})=>{const{focus:n,toggleBold:r,toggleBulletList:s,toggleCode:i,toggleItalic:o,toggleOrderedList:a}=lO(),l=aO(),c=[{icon:Xn.BOLD,onClick:r,active:l.bold()},{icon:Xn.ITALIC,onClick:o,active:l.italic()},{icon:Xn.CODE,onClick:i,active:l.code()},{icon:Xn.UL,onClick:s,active:l.bulletList()},{icon:Xn.OL,onClick:a,active:l.orderedList()}];return ae.jsxs("div",{className:su.richTextToolbarContainer,children:[ae.jsx("div",{className:su.richTextToolbar,children:c.map((u,d)=>ae.jsx(vu,{small:!0,round:!0,basic:!0,icon:u.icon,colored:Tf.MUTED,onClick:()=>{u.onClick(),n()},active:u.active,disabled:t},d))}),e]})};wf.__docgenInfo={description:"",methods:[],displayName:"RichTextToolbar",props:{disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},toolbarComponent:{required:!1,tsType:{name:"ReactNode"},description:"",defaultValue:{value:"null",computed:!1}}}};const wO="_inputInTable_ta5ga_1",vO="_inputHover_ta5ga_13",EO="_inputFocus_ta5ga_18",CO="_inputError_ta5ga_25",TO="_inputWarning_ta5ga_26",OO="_inputDisabled_ta5ga_61",MO="_hideScrollbars_ta5ga_67",NO="_richTextInput_ta5ga_77",_O={inputInTable:wO,inputHover:vO,inputFocus:EO,inputError:CO,inputWarning:TO,inputDisabled:OO,hideScrollbars:MO,richTextInput:NO},Zi=z.forwardRef(({placeholder:t,onChange:e,value:n,disabled:r,toolbarComponent:s},i)=>{const o=z.useContext(Cf),a=r||o,{manager:l,state:c,setState:u,getContext:d}=yO({extensions:()=>[new Dn({}),new xs({}),new gs,new ys,new yr({}),new bs,new un({placeholder:t})],content:n,selection:"start",stringHandler:"markdown"});z.useImperativeHandle(i,()=>d(),[d]);const h=({helpers:f,state:p})=>{const m=f.getMarkdown(p);e&&e(m),u(p)};return ae.jsx("div",{className:_O.richTextInput,children:ae.jsxs(bO,{manager:l,state:c,placeholder:t,onChange:h,editable:!a,children:[ae.jsx(wf,{disabled:a,toolbarComponent:s}),ae.jsx(ua,{})]})})});Zi.__docgenInfo={description:"",methods:[],displayName:"RichTextInput"};const rM={title:"Forms/RichTextInput",component:Zi,args:{}},As=t=>{const[e,n]=_e.useState(t.value);return ae.jsxs(ae.Fragment,{children:[ae.jsx(Zi,{...t,value:e,onChange:n}),ae.jsx("pre",{children:ae.jsx("strong",{children:"Markdown output:"})}),ae.jsx("pre",{children:e})]})},Bs=As.bind({}),Gr=As.bind({});Gr.args={value:`Paragraph goes here lorem ipsum dolor.
181
+ `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function u(f){return c.get(f)||f}const d=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function h(f,p=!1){return f.replace(d,function(m,g,y,k,D,q,J,$,oe){if(g!==void 0)return"\\";if(y!==void 0)return s(y);if(k!==void 0)return a(k);if(D!==void 0)return i(D,q);if(J!==void 0)return i(J);if($==="0")return"\0";if($!==void 0)return l($,!p);if(oe!==void 0)return u(oe);throw new SyntaxError(e.errorMessages.get(e.ErrorType.EndOfString))})}t.unraw=h,t.default=h})(df);const Nn=t=>typeof t=="string",Bw=t=>typeof t=="function",Zc=new Map,ff="en";function tl(t){return[...Array.isArray(t)?t:[t],ff]}function pf(t,e,n){const r=tl(t);return Ni(()=>_i("date",r,n),()=>new Intl.DateTimeFormat(r,n)).format(Nn(e)?new Date(e):e)}function ca(t,e,n){const r=tl(t);return Ni(()=>_i("number",r,n),()=>new Intl.NumberFormat(r,n)).format(e)}function Qc(t,e,n,{offset:r=0,...s}){const i=tl(t),o=e?Ni(()=>_i("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):Ni(()=>_i("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return s[n]??s[o.select(n-r)]??s.other}function Ni(t,e){const n=t();let r=Zc.get(n);return r||(r=e(),Zc.set(n,r)),r}function _i(t,e,n){const r=e.join("-");return`${t}-${r}-${JSON.stringify(n)}`}const mf=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,gf="%__lingui_octothorpe__%",zw=(t,e,n={})=>{const r=e||t,s=o=>typeof o=="object"?o:n[o]||{style:o},i=(o,a)=>{const l=Object.keys(n).length?s("number"):void 0,c=ca(r,o,l);return a.replace(new RegExp(gf,"g"),c)};return{plural:(o,a)=>{const{offset:l=0}=a,c=Qc(r,!1,o,a);return i(o-l,c)},selectordinal:(o,a)=>{const{offset:l=0}=a,c=Qc(r,!0,o,a);return i(o-l,c)},select:$w,number:(o,a)=>ca(r,o,s(a)),date:(o,a)=>pf(r,o,s(a))}},$w=(t,e)=>e[t]??e.other;function Fw(t,e,n){return(r={},s)=>{const i=zw(e,n,s),o=(l,c=!1)=>Array.isArray(l)?l.reduce((u,d)=>{if(d==="#"&&c)return u+gf;if(Nn(d))return u+d;const[h,f,p]=d;let m={};f==="plural"||f==="selectordinal"||f==="select"?Object.entries(p).forEach(([y,k])=>{m[y]=o(k,f==="plural"||f==="selectordinal")}):m=p;let g;if(f){const y=i[f];g=y(r[h],m)}else g=r[h];return g==null?u:u+g},""):l,a=o(t);return Nn(a)&&mf.test(a)?df.unraw(a.trim()):Nn(a)?a.trim():a?String(a):""}}var Vw=Object.defineProperty,Hw=(t,e,n)=>e in t?Vw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Uw=(t,e,n)=>(Hw(t,e+"",n),n);class jw{constructor(){Uw(this,"_events",{})}on(e,n){var r;return(r=this._events)[e]??(r[e]=[]),this._events[e].push(n),()=>this.removeListener(e,n)}removeListener(e,n){const r=this._getListeners(e);if(!r)return;const s=r.indexOf(n);~s&&r.splice(s,1)}emit(e,...n){const r=this._getListeners(e);r&&r.map(s=>s.apply(this,n))}_getListeners(e){const n=this._events[e];return Array.isArray(n)?n:!1}}var Ww=Object.defineProperty,Kw=(t,e,n)=>e in t?Ww(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Un=(t,e,n)=>(Kw(t,typeof e!="symbol"?e+"":e,n),n);class qw extends jw{constructor(e){super(),Un(this,"_locale",""),Un(this,"_locales"),Un(this,"_localeData",{}),Un(this,"_messages",{}),Un(this,"_missing"),Un(this,"t",this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale=="string"||e.locales)&&this.activate(e.locale??ff,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(e,n){const r=this._localeData[e];r?Object.assign(r,n):this._localeData[e]=n}loadLocaleData(e,n){n!=null?this._loadLocaleData(e,n):Object.keys(e).forEach(r=>this._loadLocaleData(r,e[r])),this.emit("change")}_load(e,n){const r=this._messages[e];r?Object.assign(r,n):this._messages[e]=n}load(e,n){typeof e=="string"&&typeof n=="object"?this._load(e,n):Object.entries(e).forEach(([r,s])=>this._load(r,s)),this.emit("change")}loadAndActivate({locale:e,locales:n,messages:r}){this._locale=e,this._locales=n||void 0,this._messages[this._locale]=r,this.emit("change")}activate(e,n){this._locale=e,this._locales=n,this.emit("change")}_(e,n,r){let s=r==null?void 0:r.message;e||(e=""),Nn(e)||(n=e.values||n,s=e.message,e=e.id);const i=this.messages[e],o=i===void 0,a=this._missing;if(a&&o)return Bw(a)?a(this._locale,e):a;o&&this.emit("missing",{id:e,locale:this._locale});let l=i||s||e;return Nn(l)&&mf.test(l)?JSON.parse(`"${l}"`):Nn(l)?l:Fw(l,this._locale,this._locales)(n,r==null?void 0:r.formats)}date(e,n){return pf(this._locales||this._locale,e,n)}number(e,n){return ca(this._locales||this._locale,e,n)}}function Jw(t={}){return new qw(t)}const Yi=Jw();function S(t,e){return e?"other":t==1?"one":"other"}function Lt(t,e){return e?"other":t==0||t==1?"one":"other"}function Fe(t,e){var n=String(t).split("."),r=!n[1];return e?"other":t==1&&r?"one":"other"}function K(t,e){return"other"}function fn(t,e){return e?"other":t==1?"one":t==2?"two":"other"}const Gw=K,Xw=S,Yw=Lt;function Zw(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const Qw=S;function ev(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return e?"other":t==0?"zero":t==1?"one":t==2?"two":s>=3&&s<=10?"few":s>=11&&s<=99?"many":"other"}function tv(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return e?"other":t==0?"zero":t==1?"one":t==2?"two":s>=3&&s<=10?"few":s>=11&&s<=99?"many":"other"}function nv(t,e){return e?t==1||t==5||t==7||t==8||t==9||t==10?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const rv=S,sv=Fe;function iv(t,e){var n=String(t).split("."),r=n[0],s=r.slice(-1),i=r.slice(-2),o=r.slice(-3);return e?s==1||s==2||s==5||s==7||s==8||i==20||i==50||i==70||i==80?"one":s==3||s==4||o==100||o==200||o==300||o==400||o==500||o==600||o==700||o==800||o==900?"few":r==0||s==6||i==40||i==60||i==90?"many":"other":t==1?"one":"other"}function ov(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return e?(s==2||s==3)&&i!=12&&i!=13?"few":"other":s==1&&i!=11?"one":s>=2&&s<=4&&(i<12||i>14)?"few":r&&s==0||s>=5&&s<=9||i>=11&&i<=14?"many":"other"}const av=S,lv=S,cv=S,uv=Lt,dv=K;function hv(t,e){return e?t==1||t==5||t==7||t==8||t==9||t==10?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const fv=K;function pv(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),i=r&&n[0].slice(-2),o=r&&n[0].slice(-6);return e?"other":s==1&&i!=11&&i!=71&&i!=91?"one":s==2&&i!=12&&i!=72&&i!=92?"two":(s==3||s==4||s==9)&&(i<10||i>19)&&(i<70||i>79)&&(i<90||i>99)?"few":t!=0&&r&&o==0?"many":"other"}const mv=S;function gv(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=r.slice(-2),l=s.slice(-1),c=s.slice(-2);return e?"other":i&&o==1&&a!=11||l==1&&c!=11?"one":i&&o>=2&&o<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function yv(t,e){var n=String(t).split("."),r=!n[1];return e?t==1||t==3?"one":t==2?"two":t==4?"few":"other":t==1&&r?"one":"other"}const xv=S;function bv(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=s.slice(-1);return e?"other":i&&(r==1||r==2||r==3)||i&&o!=4&&o!=6&&o!=9||!i&&a!=4&&a!=6&&a!=9?"one":"other"}const kv=S,Sv=S,wv=S;function vv(t,e){var n=String(t).split("."),r=n[0],s=!n[1];return e?"other":t==1&&s?"one":r>=2&&r<=4&&s?"few":s?"other":"many"}function Ev(t,e){return e?t==0||t==7||t==8||t==9?"zero":t==1?"one":t==2?"two":t==3||t==4?"few":t==5||t==6?"many":"other":t==0?"zero":t==1?"one":t==2?"two":t==3?"few":t==6?"many":"other"}function Cv(t,e){var n=String(t).split("."),r=n[0],s=Number(n[0])==t;return e?"other":t==1||!s&&(r==0||r==1)?"one":"other"}const Tv=Fe;function Ov(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-2),a=s.slice(-2);return e?"other":i&&o==1||a==1?"one":i&&o==2||a==2?"two":i&&(o==3||o==4)||a==3||a==4?"few":"other"}const Mv=S,Nv=K,_v=S,Av=S;function Rv(t,e){var n=String(t).split("."),r=!n[1],s=Number(n[0])==t,i=s&&n[0].slice(-1),o=s&&n[0].slice(-2);return e?i==1&&o!=11?"one":i==2&&o!=12?"two":i==3&&o!=13?"few":"other":t==1&&r?"one":"other"}const Iv=S,Dv=S,Pv=Fe,Lv=S;function Bv(t,e){return e?"other":t>=0&&t<=1?"one":"other"}function zv(t,e){return e?"other":t>=0&&t<2?"one":"other"}const $v=Fe;function Fv(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=s.slice(-1);return e?t==1?"one":"other":i&&(r==1||r==2||r==3)||i&&o!=4&&o!=6&&o!=9||!i&&a!=4&&a!=6&&a!=9?"one":"other"}const Vv=S;function Hv(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const Uv=S,jv=Fe;function Wv(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1?"one":"other":t==1?"one":t==2?"two":r&&t>=3&&t<=6?"few":r&&t>=7&&t<=10?"many":"other"}function Kv(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1||t==11?"one":t==2||t==12?"two":t==3||t==13?"few":"other":t==1||t==11?"one":t==2||t==12?"two":r&&t>=3&&t<=10||r&&t>=13&&t<=19?"few":"other"}const qv=Fe,Jv=S;function Gv(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const Xv=Lt;function Yv(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=r.slice(-1),o=r.slice(-2);return e?"other":s&&i==1?"one":s&&i==2?"two":s&&(o==0||o==20||o==40||o==60||o==80)?"few":s?"other":"many"}const Zv=S,Qv=S;function eE(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=Number(n[0])==t,o=i&&n[0].slice(-1);return e?"other":t==1&&s?"one":r==2&&s?"two":s&&(t<0||t>10)&&i&&o==0?"many":"other"}function tE(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}function nE(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=r.slice(-2),l=s.slice(-1),c=s.slice(-2);return e?"other":i&&o==1&&a!=11||l==1&&c!=11?"one":i&&o>=2&&o<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function rE(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-2),a=s.slice(-2);return e?"other":i&&o==1||a==1?"one":i&&o==2||a==2?"two":i&&(o==3||o==4)||a==3||a==4?"few":"other"}function sE(t,e){return e?t==1||t==5?"one":"other":t==1?"one":"other"}function iE(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const oE=Fe,aE=K,lE=K,cE=K,uE=Fe;function dE(t,e){var n=String(t).split("."),r=n[0],s=Number(n[0])==t,i=r.slice(-1),o=r.slice(-2);return e?"other":s&&i==1&&o!=11||!s?"one":"other"}function hE(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}const fE=fn;function pE(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=Number(n[0])==t,o=i&&n[0].slice(-1);return e?"other":t==1&&s?"one":r==2&&s?"two":s&&(t<0||t>10)&&i&&o==0?"many":"other"}const mE=K,gE=K,yE=S,xE=Fe,bE=S,kE=K,SE=K;function wE(t,e){var n=String(t).split("."),r=n[0],s=r.slice(-2);return e?r==1?"one":r==0||s>=2&&s<=20||s==40||s==60||s==80?"many":"other":t==1?"one":"other"}function vE(t,e){return e?"other":t>=0&&t<2?"one":"other"}const EE=S,CE=S,TE=K,OE=K;function ME(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1);return e?s==6||s==9||r&&s==0&&t!=0?"many":"other":t==1?"one":"other"}const NE=S,_E=S,AE=K;function RE(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const IE=K,DE=S,PE=S;function LE(t,e){return e?"other":t==0?"zero":t==1?"one":"other"}const BE=S;function zE(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2),i=r&&n[0].slice(-3),o=r&&n[0].slice(-5),a=r&&n[0].slice(-6);return e?r&&t>=1&&t<=4||s>=1&&s<=4||s>=21&&s<=24||s>=41&&s<=44||s>=61&&s<=64||s>=81&&s<=84?"one":t==5||s==5?"many":"other":t==0?"zero":t==1?"one":s==2||s==22||s==42||s==62||s==82||r&&i==0&&(o>=1e3&&o<=2e4||o==4e4||o==6e4||o==8e4)||t!=0&&a==1e5?"two":s==3||s==23||s==43||s==63||s==83?"few":t!=1&&(s==1||s==21||s==41||s==61||s==81)?"many":"other"}const $E=S;function FE(t,e){var n=String(t).split("."),r=n[0];return e?"other":t==0?"zero":(r==0||r==1)&&t!=0?"one":"other"}const VE=S,HE=S,UE=K,jE=Lt;function WE(t,e){return e&&t==1?"one":"other"}function KE(t,e){var n=String(t).split("."),r=n[1]||"",s=Number(n[0])==t,i=s&&n[0].slice(-1),o=s&&n[0].slice(-2);return e?"other":i==1&&(o<11||o>19)?"one":i>=2&&i<=9&&(o<11||o>19)?"few":r!=0?"many":"other"}function qE(t,e){var n=String(t).split("."),r=n[1]||"",s=r.length,i=Number(n[0])==t,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return e?"other":i&&o==0||a>=11&&a<=19||s==2&&l>=11&&l<=19?"zero":o==1&&a!=11||s==2&&c==1&&l!=11||s!=2&&c==1?"one":"other"}const JE=S,GE=Lt,XE=S;function YE(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=r.slice(-2),l=s.slice(-1),c=s.slice(-2);return e?o==1&&a!=11?"one":o==2&&a!=12?"two":(o==7||o==8)&&a!=17&&a!=18?"many":"other":i&&o==1&&a!=11||l==1&&c!=11?"one":"other"}const ZE=S,QE=S;function eC(t,e){var n=String(t).split("."),r=!n[1],s=Number(n[0])==t,i=s&&n[0].slice(-2);return e?t==1?"one":"other":t==1&&r?"one":!r||t==0||i>=2&&i<=19?"few":"other"}function tC(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":"other":t==1?"one":"other"}function nC(t,e){return e&&t==1?"one":"other"}function rC(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return e?"other":t==1?"one":t==0||s>=2&&s<=10?"few":s>=11&&s<=19?"many":"other"}const sC=K,iC=S,oC=fn,aC=S,lC=S;function cC(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?r&&t>=1&&t<=4?"one":"other":t==1?"one":"other"}const uC=Fe,dC=S,hC=S,fC=S,pC=K,mC=S,gC=Lt,yC=S,xC=S,bC=S;function kC(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1||t==5||r&&t>=7&&t<=9?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t==1?"one":"other"}const SC=S,wC=K,vC=Lt,EC=S;function CC(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=r.slice(-1),o=r.slice(-2);return e?"other":t==1&&s?"one":s&&i>=2&&i<=4&&(o<12||o>14)?"few":s&&r!=1&&(i==0||i==1)||s&&i>=5&&i<=9||s&&o>=12&&o<=14?"many":"other"}function TC(t,e){var n=String(t).split("."),r=n[1]||"",s=r.length,i=Number(n[0])==t,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return e?"other":i&&o==0||a>=11&&a<=19||s==2&&l>=11&&l<=19?"zero":o==1&&a!=11||s==2&&c==1&&l!=11||s!=2&&c==1?"one":"other"}const OC=S;function MC(t,e){var n=String(t).split("."),r=n[0];return e?"other":r==0||r==1?"one":"other"}const NC=Fe,_C=S;function AC(t,e){var n=String(t).split("."),r=!n[1],s=Number(n[0])==t,i=s&&n[0].slice(-2);return e?t==1?"one":"other":t==1&&r?"one":!r||t==0||i>=2&&i<=19?"few":"other"}const RC=S,IC=K;function DC(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=r.slice(-1),o=r.slice(-2);return e?"other":s&&i==1&&o!=11?"one":s&&i>=2&&i<=4&&(o<12||o>14)?"few":s&&i==0||s&&i>=5&&i<=9||s&&o>=11&&o<=14?"many":"other"}const PC=S,LC=K,BC=S;function zC(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}function $C(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}const FC=S,VC=S,HC=fn,UC=S,jC=K,WC=K;function KC(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=r.slice(-2),l=s.slice(-1),c=s.slice(-2);return e?"other":i&&o==1&&a!=11||l==1&&c!=11?"one":i&&o>=2&&o<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function qC(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?"other":t>=0&&t<=1?"one":r&&t>=2&&t<=10?"few":"other"}function JC(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"";return e?"other":t==0||t==1||r==0&&s==1?"one":"other"}function GC(t,e){var n=String(t).split("."),r=n[0],s=!n[1];return e?"other":t==1&&s?"one":r>=2&&r<=4&&s?"few":s?"other":"many"}function XC(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=r.slice(-2);return e?"other":s&&i==1?"one":s&&i==2?"two":s&&(i==3||i==4)||!s?"few":"other"}const YC=fn,ZC=fn,QC=fn,eT=fn,tT=fn,nT=S,rT=S;function sT(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return e?t==1?"one":s==4&&i!=14?"many":"other":t==1?"one":"other"}function iT(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=r.slice(-2),l=s.slice(-1),c=s.slice(-2);return e?"other":i&&o==1&&a!=11||l==1&&c!=11?"one":i&&o>=2&&o<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}const oT=S,aT=S,lT=S,cT=K;function uT(t,e){var n=String(t).split("."),r=!n[1],s=Number(n[0])==t,i=s&&n[0].slice(-1),o=s&&n[0].slice(-2);return e?(i==1||i==2)&&o!=11&&o!=12?"one":"other":t==1&&r?"one":"other"}const dT=Fe,hT=S,fT=S,pT=S,mT=S,gT=K,yT=Lt,xT=S;function bT(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1);return e?s==6||s==9||t==10?"few":"other":t==1?"one":"other"}function kT(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=s.slice(-1);return e?t==1?"one":"other":i&&(r==1||r==2||r==3)||i&&o!=4&&o!=6&&o!=9||!i&&a!=4&&a!=6&&a!=9?"one":"other"}const ST=S,wT=K,vT=S,ET=S;function CT(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?"other":t==0||t==1||r&&t>=11&&t<=99?"one":"other"}const TT=S;function OT(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=Number(n[0])==t,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2),l=r.slice(-1),c=r.slice(-2);return e?o==3&&a!=13?"few":"other":s&&l==1&&c!=11?"one":s&&l>=2&&l<=4&&(c<12||c>14)?"few":s&&l==0||s&&l>=5&&l<=9||s&&c>=11&&c<=14?"many":"other"}const MT=Fe,NT=S,_T=S;function AT(t,e){return e&&t==1?"one":"other"}const RT=S,IT=S,DT=Lt,PT=S,LT=K,BT=S,zT=S,$T=Fe,FT=K,VT=K,HT=K;function UT(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const jT=Object.freeze(Object.defineProperty({__proto__:null,_in:Gw,af:Xw,ak:Yw,am:Zw,an:Qw,ar:ev,ars:tv,as:nv,asa:rv,ast:sv,az:iv,be:ov,bem:av,bez:lv,bg:cv,bho:uv,bm:dv,bn:hv,bo:fv,br:pv,brx:mv,bs:gv,ca:yv,ce:xv,ceb:bv,cgg:kv,chr:Sv,ckb:wv,cs:vv,cy:Ev,da:Cv,de:Tv,dsb:Ov,dv:Mv,dz:Nv,ee:_v,el:Av,en:Rv,eo:Iv,es:Dv,et:Pv,eu:Lv,fa:Bv,ff:zv,fi:$v,fil:Fv,fo:Vv,fr:Hv,fur:Uv,fy:jv,ga:Wv,gd:Kv,gl:qv,gsw:Jv,gu:Gv,guw:Xv,gv:Yv,ha:Zv,haw:Qv,he:eE,hi:tE,hr:nE,hsb:rE,hu:sE,hy:iE,ia:oE,id:aE,ig:lE,ii:cE,io:uE,is:dE,it:hE,iu:fE,iw:pE,ja:mE,jbo:gE,jgo:yE,ji:xE,jmc:bE,jv:kE,jw:SE,ka:wE,kab:vE,kaj:EE,kcg:CE,kde:TE,kea:OE,kk:ME,kkj:NE,kl:_E,km:AE,kn:RE,ko:IE,ks:DE,ksb:PE,ksh:LE,ku:BE,kw:zE,ky:$E,lag:FE,lb:VE,lg:HE,lkt:UE,ln:jE,lo:WE,lt:KE,lv:qE,mas:JE,mg:GE,mgo:XE,mk:YE,ml:ZE,mn:QE,mo:eC,mr:tC,ms:nC,mt:rC,my:sC,nah:iC,naq:oC,nb:aC,nd:lC,ne:cC,nl:uC,nn:dC,nnh:hC,no:fC,nqo:pC,nr:mC,nso:gC,ny:yC,nyn:xC,om:bC,or:kC,os:SC,osa:wC,pa:vC,pap:EC,pl:CC,prg:TC,ps:OC,pt:MC,pt_PT:NC,rm:_C,ro:AC,rof:RC,root:IC,ru:DC,rwk:PC,sah:LC,saq:BC,sc:zC,scn:$C,sd:FC,sdh:VC,se:HC,seh:UC,ses:jC,sg:WC,sh:KC,shi:qC,si:JC,sk:GC,sl:XC,sma:YC,smi:ZC,smj:QC,smn:eT,sms:tT,sn:nT,so:rT,sq:sT,sr:iT,ss:oT,ssy:aT,st:lT,su:cT,sv:uT,sw:dT,syr:hT,ta:fT,te:pT,teo:mT,th:gT,ti:yT,tig:xT,tk:bT,tl:kT,tn:ST,to:wT,tr:vT,ts:ET,tzm:CT,ug:TT,uk:OT,ur:MT,uz:NT,ve:_T,vi:AT,vo:RT,vun:IT,wa:DT,wae:PT,wo:LT,xh:BT,xog:zT,yi:$T,yo:FT,yue:VT,zh:HT,zu:UT},Symbol.toStringTag,{value:"Module"}));var WT=Object.defineProperty,KT=Object.getOwnPropertyDescriptor,qT=Object.getOwnPropertyNames,JT=Object.prototype.hasOwnProperty,GT=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of qT(e))!JT.call(t,s)&&s!==n&&WT(t,s,{get:()=>e[s],enumerable:!(r=KT(e,s))||r.enumerable});return t},XT=(t,e,n)=>(GT(t,e,"default"),n),YT=JSON.parse('{"extension.command.toggle-upper-case.label":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"extension.table.column_count":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"extension.table.row_count":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.toggle-columns.description":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"extension.command.toggle-columns.label":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"extension.command.set-text-direction.label":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"extension.command.set-text-direction.description":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"extension.command.toggle-heading.label":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"extension.command.toggle-callout.description":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"extension.command.toggle-callout.label":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"extension.command.toggle-code-block.description":"Add a code block","extension.command.add-annotation.label":"Add annotation","extension.command.toggle-blockquote.description":"Add blockquote formatting to the selected text","extension.command.toggle-bold.description":"Add bold formatting to the selected text","extension.command.toggle-code.description":"Add inline code formatting to the selected text","keyboard.shortcut.alt":"Alt","keyboard.shortcut.arrowDown":"Arrow Down","keyboard.shortcut.arrowLeft":"Arrow Left","keyboard.shortcut.arrowRight":"Arrow Right","keyboard.shortcut.arrowUp":"Arrow Up","keyboard.shortcut.backspace":"Backspace","ui.text-color.black":"Black","extension.command.toggle-blockquote.label":"Blockquote","ui.text-color.blue":"Blue","ui.text-color.blue.hue":["Blue ",["hue"]],"extension.command.toggle-bold.label":"Bold","extension.command.toggle-bullet-list.description":"Bulleted list","keyboard.shortcut.capsLock":"Caps Lock","extension.command.center-align.label":"Center align","extension.command.toggle-code.label":"Code","extension.command.toggle-code-block.label":"Codeblock","keyboard.shortcut.command":"Command","QcPNd6":"Image description","ogrUzJ":"Add a short description here.","yqdyzr":"Image","6/02F4":"Image source","X8H91v":"Image","zhQ7Zt":"Italic","ZL7E7l":"Underline","keyboard.shortcut.control":"Control","extension.command.convert-paragraph.description":"Convert current block into a paragraph block.","extension.command.convert-paragraph.label":"Convert Paragraph","extension.command.copy.label":"Copy","extension.command.copy.description":"Copy the selected text","extension.command.create-table.description":"Create a table with set number of rows and columns.","extension.command.create-table.label":"Create table","extension.command.cut.label":"Cut","extension.command.cut.description":"Cut the selected text","ui.text-color.cyan":"Cyan","ui.text-color.cyan.hue":["Cyan ",["hue"]],"extension.command.decrease-font-size.label":"Decrease","extension.command.decrease-indent.label":"Decrease indentation","extension.command.decrease-font-size.description":"Decrease the font size.","keyboard.shortcut.delete":"Delete","extension.command.insert-horizontal-rule.label":"Divider","keyboard.shortcut.end":"End","keyboard.shortcut.escape":"Enter","keyboard.shortcut.enter":"Enter","6PjrOF":"Add annotation","OTq5WC":"Center align","oeZ3ox":"Convert current block into a paragraph block.","m1khs+":"Convert Paragraph","w/1U+3":"Copy the selected text","kdodi0":"Copy","k0KR/u":"Create a table with set number of rows and columns.","zrwMyD":"Create table","D/nWxh":"Cut the selected text","jHPv5m":"Cut","5cNgRx":"Decrease the font size.","vyRNWx":"Decrease","Jgiol4":"Decrease indentation","1gJSHH":"Increase the font size","OQXJXz":"Increase","72TLhr":"Increase indentation","HFlfzJ":"Insert Emoji","RPq9fY":"Separate content with a diving horizontal line","OKQF+e":"Divider","zjYb9C":"Insert a new paragraph","4M4sXC":"Insert Paragraph","1Q+eVc":"Justify","ejWWtP":"Left align","wVqrpS":"Paste content into the editor","07v9aw":"Paste","zUYfou":"Redo the most recent action","9Nq9zr":"Redo","0uxaZe":"Remove annotation","iJWZAz":"Right align","g5WpPn":"Select all content within the editor","2+pZDT":"Select all","yChCR1":"Set text case","GMzAC/":"Set the font size for the selected text.","vzEyrv":"Font size","7VCkJ8":"Set the text color for the selected text.","qjWFaR":"Text color","LVWgFu":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"WXwRy1":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"G/o315":"Set the text highlight color for the selected text.","xtHg6d":"Text highlight","1p1W/p":"Add blockquote formatting to the selected text","6+rh6I":"Blockquote","0yB3LV":"Add bold formatting to the selected text","sFMo4Z":"Bold","SMKG/s":"Bulleted list","/BYCMi":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"V+3IBe":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"hbIo4L":"Add a code block","7GkMcx":"Codeblock","2r4JYl":"Add inline code formatting to the selected text","Up8Tpe":"Code","ATHSPS":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"7DC1VE":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"hnrBeo":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"NkZAcw":"Italicize the selected text","2fTW9e":"Italic","c759Ra":"Ordered list","uQwrZu":"Strikethrough the selected text","pT3qly":"Strikethrough","BHk+zu":"Subscript","18BVwM":"Superscript","tOIVCV":"Tasked list","4Janx3":"Underline the selected text","dCHt+D":"Underline","YYAprs":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"tczyZL":"Show hidden whitespace characters in your editor.","0qAX23":"Toggle Whitespace","ezMADU":"Undo the most recent action","N3P7EC":"Undo","2nj/+s":"Update annotation","dWD7u4":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"qXqgVT":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.set-font-size.label":"Font size","ui.text-color.grape":"Grape","ui.text-color.grape.hue":["Grape ",["hue"]],"ui.text-color.gray":"Gray","ui.text-color.gray.hue":["Gray ",["hue"]],"ui.text-color.green":"Green","ui.text-color.green.hue":["Green ",["hue"]],"keyboard.shortcut.home":"Home","extension.command.increase-font-size.label":"Increase","extension.command.increase-indent.label":"Increase indentation","extension.command.increase-font-size.description":"Increase the font size","ui.text-color.indigo":"Indigo","ui.text-color.indigo.hue":["Indigo ",["hue"]],"extension.command.insert-paragraph.description":"Insert a new paragraph","extension.command.insert-emoji.label":"Insert Emoji","extension.command.insert-paragraph.label":"Insert Paragraph","extension.command.toggle-italic.label":"Italic","extension.command.toggle-italic.description":"Italicize the selected text","extension.command.justify-align.label":"Justify","R7NlCw":"Alt","RbDiK5":"Arrow Down","Dgyd+E":"Arrow Left","8pdCk4":"Arrow Right","Gp/343":"Arrow Up","PFPV0A":"Backspace","0IRYvp":"Caps Lock","X7HX0D":"Command","zq0AdD":"Control","8SfToN":"Delete","Ys/uah":"End","3K5hww":"Enter","veQt1j":"Enter","ySv7i+":"Home","e6RUI1":"Page Down","EEJk31":"Page Up","7sbhAU":"Shift","Q4eplT":"Space","SUhVVC":"Tab","extension.command.left-align.label":"Left align","ui.text-color.lime":"Lime","ui.text-color.lime.hue":["Lime ",["hue"]],"react-components.mention-atom-component.zero-items":"No items available","ui.text-color.orange":"Orange","ui.text-color.orange.hue":["Orange ",["hue"]],"extension.command.toggle-ordered-list.label":"Ordered list","keyboard.shortcut.pageDown":"Page Down","keyboard.shortcut.pageUp":"Page Up","extension.command.paste.label":"Paste","extension.command.paste.description":"Paste content into the editor","ui.text-color.pink":"Pink","ui.text-color.pink.hue":["Pink ",["hue"]],"zvMfIA":"No items available","pEjhti":"Static Menu","ui.text-color.red":"Red","ui.text-color.red.hue":["Red ",["hue"]],"extension.command.redo.label":"Redo","extension.command.redo.description":"Redo the most recent action","extension.command.remove-annotation.label":"Remove annotation","extension.command.right-align.label":"Right align","extension.command.select-all.label":"Select all","extension.command.select-all.description":"Select all content within the editor","extension.command.insert-horizontal-rule.description":"Separate content with a diving horizontal line","extension.command.set-casing.label":"Set text case","extension.command.set-font-size.description":"Set the font size for the selected text.","extension.command.set-text-color.description":"Set the text color for the selected text.","extension.command.set-text-highlight.description":"Set the text highlight color for the selected text.","keyboard.shortcut.shift":"Shift","extension.command.toggle-whitespace.description":"Show hidden whitespace characters in your editor.","keyboard.shortcut.space":"Space","extension.command.toggle-strike.label":"Strikethrough","extension.command.toggle-strike.description":"Strikethrough the selected text","extension.command.toggle-subscript.label":"Subscript","extension.command.toggle-superscript.label":"Superscript","keyboard.shortcut.tab":"Tab","extension.command.toggle-task-list.description":"Tasked list","ui.text-color.teal":"Teal","ui.text-color.teal.hue":["Teal ",["hue"]],"extension.command.set-text-color.label":"Text color","extension.command.set-text-highlight.label":"Text highlight","extension.command.toggle-whitespace.label":"Toggle Whitespace","ui.text-color.transparent":"Transparent","slrB1c":"Black","6QML30":"Blue","xw+keN":["Blue ",["hue"]],"38RHqP":"Cyan","D89yPf":["Cyan ",["hue"]],"VjBLnd":"Grape","Rp40yv":["Grape ",["hue"]],"5Dm9D1":"Gray","HGjXjC":["Gray ",["hue"]],"b9fz+n":"Green","18jo3M":["Green ",["hue"]],"CFzqCV":"Indigo","aVlDku":["Indigo ",["hue"]],"04PfLc":"Lime","KRTK6Y":["Lime ",["hue"]],"pSnXFd":"Orange","ve/MJZ":["Orange ",["hue"]],"OvCgDa":"Pink","l7NqyT":["Pink ",["hue"]],"IT9k0j":"Red","AdyJ7/":["Red ",["hue"]],"3D2UWc":"Teal","Dcq0Y1":["Teal ",["hue"]],"bsi2ik":"Transparent","Tj3PRR":"Violet","xxMH5N":["Violet ",["hue"]],"Rum0ah":"White","4gaw/Q":"Yellow","hhauc3":["Yellow ",["hue"]],"extension.command.toggle-underline.label":"Underline","extension.command.toggle-underline.description":"Underline the selected text","extension.command.undo.label":"Undo","extension.command.undo.description":"Undo the most recent action","extension.command.update-annotation.label":"Update annotation","ui.text-color.violet":"Violet","ui.text-color.violet.hue":["Violet ",["hue"]],"ui.text-color.white":"White","ui.text-color.yellow":"Yellow","ui.text-color.yellow.hue":["Yellow ",["hue"]]}'),yf={};XT(yf,jT);Yi.loadLocaleData("en",{plurals:yf.en});Yi.load("en",YT);Yi.activate("en");var ZT=Object.defineProperty,QT=Object.getOwnPropertyDescriptor,eO=(t,e,n,r)=>{for(var s=r>1?void 0:r?QT(e,n):e,i=t.length-1,o;i>=0;i--)(o=t[i])&&(s=(r?o(e,n,s):o(s))||s);return r&&s&&ZT(e,n,s),s},tO={...un.defaultOptions,...ks.defaultOptions},nO=[...un.staticKeys,...ks.staticKeys],Ss=class extends te{get name(){return"react"}onSetOptions(t){const{pickChanged:e}=t;this.getExtension(un).setOptions(e(["placeholder"]))}createExtensions(){const{emptyNodeClass:t,placeholder:e,defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:s,defaultInlineNode:i,nodeViewComponents:o}=this.options;return[new un({emptyNodeClass:t,placeholder:e,priority:Y.Low}),new ks({defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:s,defaultInlineNode:i,nodeViewComponents:o})]}};Ss=eO([G({defaultOptions:tO,staticKeys:nO})],Ss);var xf={};Object.defineProperty(xf,"__esModule",{value:!0});function rO(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t.length===2)return tu(t[0],t[1])||null;var n=t.slice(1).reduce(function(r,s){return tu(r,s)},t[0]);return n||null}var Cr=xf.default=rO,eu=new WeakMap;function tu(t,e){if(t&&e){var n=eu.get(t)||new WeakMap;eu.set(t,n);var r=n.get(e)||function(s){nu(t,s),nu(e,s)};return n.set(e,r),r}return t||e}function nu(t,e){typeof t=="function"?t(e):t.current=e}var bf=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Eo=(t,e,n)=>(bf(t,e,"read from private field"),e.get(t)),sO=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},iO=(t,e,n,r)=>(bf(t,e,"write to private field"),e.set(t,n),n);function oO(){const[,t]=z.useState(M());return z.useCallback(()=>{t(M())},[])}var kf=z.createContext(null);function nl(t){const e=z.useContext(kf),n=z.useRef(oO());R(e,{code:b.REACT_PROVIDER_CONTEXT});const{addHandler:r}=e;return z.useEffect(()=>{let s=t;if(s){if(Ln(s)){const{autoUpdate:i}=s;s=i?()=>n.current():void 0}if(ee(s))return r("updated",s)}},[r,t]),e}function aO(t=!0){return nl({autoUpdate:t}).active}function lO(){return nl().commands}var[cO,sM]=Lw(({props:t})=>{const e=t.locale??"en",n=t.i18n??Yi,r=t.supportedLocales??[e],s=n._.bind(n);return{locale:e,i18n:n,supportedLocales:r,t:s}});function ru(t,e={}){const{core:n,react:r,...s}=e;return mb(t)?t:pb.create(()=>[...Lu(t),new Ss(r),...Ew(n)],s)}function uO(t,e={}){const n=z.useRef(t),r=z.useRef(e),[s,i]=z.useState(()=>ru(t,e));return n.current=t,r.current=e,z.useEffect(()=>s.addHandler("destroy",()=>{i(()=>ru(n.current,r.current))}),[s]),s}var dO=typeof Cr=="object"&&Cr.__esModule&&Cr.default?Cr.default:Cr,Gn,hO=class extends cb{constructor(t){if(super(t),sO(this,Gn,void 0),this.rootPropsConfig={called:!1,count:0},this.getRootProps=e=>this.internalGetRootProps(e,null),this.internalGetRootProps=(e,n)=>{this.rootPropsConfig.called=!0;const{refKey:r="ref",ref:s,...i}=e??M();return{[r]:dO(s,this.onRef),key:this.uid,...i,children:n}},this.onRef=e=>{e&&(this.rootPropsConfig.count+=1,R(this.rootPropsConfig.count<=1,{code:b.REACT_GET_ROOT_PROPS,message:`Called ${this.rootPropsConfig.count} times`}),iO(this,Gn,e),this.onRefLoad())},this.manager.view){this.manager.view.setProps({state:this.manager.view.state,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0});return}this.manager.getExtension(un).setOptions({placeholder:this.props.placeholder??""})}get name(){return"react"}update(t){return super.update(t),this}createView(t){return new _y(null,{state:t,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0,plugins:[]})}updateState({state:t,...e}){const{triggerChange:n=!0,tr:r,transactions:s}=e;if(this.props.state){const{onChange:i}=this.props;R(i,{code:b.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),R(n,{code:b.REACT_CONTROLLED,message:"Controlled editors do not support `clearContent` or `setContent` where `triggerChange` is `true`. Update the `state` prop instead."}),this.previousStateOverride||(this.previousStateOverride=this.getState()),this.onChange({state:t,tr:r,transactions:s});return}!r&&!s&&(t=t.apply(t.tr.setMeta(ol,{}))),this.view.updateState(t),n&&(s==null?void 0:s.length)!==0&&this.onChange({state:t,tr:r,transactions:s}),this.manager.onStateUpdate({previousState:this.previousState,state:t,tr:r,transactions:s})}updateControlledState(t,e){this.previousStateOverride=e,t=t.apply(t.tr.setMeta(ol,{})),this.view.updateState(t),this.manager.onStateUpdate({previousState:this.previousState,state:t}),this.previousStateOverride=void 0}addProsemirrorViewToDom(t,e){this.props.insertPosition==="start"?t.insertBefore(e,t.firstChild):t.append(e)}onRefLoad(){R(Eo(this,Gn),{code:b.REACT_EDITOR_VIEW,message:"Something went wrong when initializing the text editor. Please check your setup."});const{autoFocus:t}=this.props;this.addProsemirrorViewToDom(Eo(this,Gn),this.view.dom),t&&this.focus(t),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&Eo(this,Gn)&&this.view.setProps({...this.view.props,editable:()=>this.props.editable??!0})}get frameworkOutput(){return{...this.baseOutput,getRootProps:this.getRootProps,portalContainer:this.manager.store.portalContainer}}resetRender(){this.rootPropsConfig.called=!1,this.rootPropsConfig.count=0}};Gn=new WeakMap;var Sf=typeof document<"u"?z.useLayoutEffect:z.useEffect;function fO(t){const e=z.useRef();return Sf(()=>{e.current=t}),e.current}function pO(t){const{manager:e,state:n}=t,{placeholder:r,editable:s}=t;z.useRef(!0).current&&!tn(r)&&e.getExtension(Ss).setOptions({placeholder:r}),z.useEffect(()=>{r!=null&&e.getExtension(Ss).setOptions({placeholder:r})},[r,e]);const[o]=z.useState(()=>{if(n)return n;const l=e.createEmptyDoc(),[c,u]=me(t.initialContent)?t.initialContent:[t.initialContent??l];return e.createState({content:c,selection:u})}),a=mO({initialEditorState:o,getProps:()=>t});return z.useEffect(()=>()=>{a.destroy()},[a]),z.useEffect(()=>{a.onUpdate()},[s,a]),gO(a),a.frameworkOutput}function mO(t){const e=z.useRef(t);e.current=t;const n=z.useMemo(()=>new hO(e.current),[]);return n.update(t),n}function gO(t){const{state:e}=t.props,n=z.useRef(!!e),r=fO(e);Sf(()=>{const s=e?n.current===!0:n.current===!1;R(s,{code:b.REACT_CONTROLLED,message:n.current?"You have attempted to switch from a controlled to an uncontrolled editor. Once you set up an editor as a controlled editor it must always provide a `state` prop.":"You have provided a `state` prop to an uncontrolled editor. In order to set up your editor as controlled you must provide the `state` prop from the very first render."}),!(!e||e===r)&&t.updateControlledState(e,r??void 0)},[e,r,t])}function yO(t={}){const{content:e,document:n,selection:r,extensions:s,...i}=t,o=uO(s??(()=>[]),i),[a,l]=z.useState(()=>o.createState({selection:r,content:e??o.createEmptyDoc()})),c=z.useCallback(({state:d})=>{l(d)},[]),u=z.useCallback(()=>o.output,[o]);return z.useMemo(()=>({state:a,setState:l,manager:o,onChange:c,getContext:u}),[u,o,c,a])}var ua=()=>_e.createElement("div",{className:M1.EDITOR_WRAPPER,...nl().getRootProps()}),xO=t=>(t.hook(),null);function bO(t){const{children:e,autoRender:n,i18n:r,locale:s,supportedLocales:i,hooks:o=[],...a}=t,l=pO(a),c=_w(l.portalContainer),u=n==="start"||n===!0||!e&&tn(n),d=n==="end";return _e.createElement(cO,{i18n:r,locale:s,supportedLocales:i},_e.createElement(kf.Provider,{value:l},_e.createElement(Nw,{portals:c}),o.map((h,f)=>_e.createElement(xO,{hook:h,key:f})),u&&_e.createElement(ua,null),e,d&&_e.createElement(ua,null)))}const kO="_richTextToolbar_1gbkk_1",SO="_richTextToolbarContainer_1gbkk_5",su={richTextToolbar:kO,richTextToolbarContainer:SO};var Xn=(t=>(t.BOLD="bold",t.ITALIC="italic",t.CODE="code",t.UL="ul",t.OL="ol",t))(Xn||{});const wf=({disabled:t=!1,toolbarComponent:e=null})=>{const{focus:n,toggleBold:r,toggleBulletList:s,toggleCode:i,toggleItalic:o,toggleOrderedList:a}=lO(),l=aO(),c=[{icon:Xn.BOLD,onClick:r,active:l.bold()},{icon:Xn.ITALIC,onClick:o,active:l.italic()},{icon:Xn.CODE,onClick:i,active:l.code()},{icon:Xn.UL,onClick:s,active:l.bulletList()},{icon:Xn.OL,onClick:a,active:l.orderedList()}];return ae.jsxs("div",{className:su.richTextToolbarContainer,children:[ae.jsx("div",{className:su.richTextToolbar,children:c.map((u,d)=>ae.jsx(vu,{small:!0,round:!0,basic:!0,icon:u.icon,colored:Tf.MUTED,onClick:()=>{u.onClick(),n()},active:u.active,disabled:t},d))}),e]})};wf.__docgenInfo={description:"",methods:[],displayName:"RichTextToolbar",props:{disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},toolbarComponent:{required:!1,tsType:{name:"ReactNode"},description:"",defaultValue:{value:"null",computed:!1}}}};const wO="_inputInTable_19adc_1",vO="_error_19adc_7",EO="_warning_19adc_7",CO="_inputHover_19adc_13",TO="_inputFocus_19adc_18",OO="_inputError_19adc_25",MO="_inputWarning_19adc_26",NO="_inputDisabled_19adc_61",_O="_hideScrollbars_19adc_67",AO="_richTextInput_19adc_77",RO={inputInTable:wO,error:vO,warning:EO,inputHover:CO,inputFocus:TO,inputError:OO,inputWarning:MO,inputDisabled:NO,hideScrollbars:_O,richTextInput:AO},Zi=z.forwardRef(({placeholder:t,onChange:e,value:n,disabled:r,toolbarComponent:s},i)=>{const o=z.useContext(Cf),a=r||o,{manager:l,state:c,setState:u,getContext:d}=yO({extensions:()=>[new Dn({}),new xs({}),new gs,new ys,new yr({}),new bs,new un({placeholder:t})],content:n,selection:"start",stringHandler:"markdown"});z.useImperativeHandle(i,()=>d(),[d]);const h=({helpers:f,state:p})=>{const m=f.getMarkdown(p);e&&e(m),u(p)};return ae.jsx("div",{className:RO.richTextInput,children:ae.jsxs(bO,{manager:l,state:c,placeholder:t,onChange:h,editable:!a,children:[ae.jsx(wf,{disabled:a,toolbarComponent:s}),ae.jsx(ua,{})]})})});Zi.__docgenInfo={description:"",methods:[],displayName:"RichTextInput"};const iM={title:"Forms/RichTextInput",component:Zi,args:{}},As=t=>{const[e,n]=_e.useState(t.value);return ae.jsxs(ae.Fragment,{children:[ae.jsx(Zi,{...t,value:e,onChange:n}),ae.jsx("pre",{children:ae.jsx("strong",{children:"Markdown output:"})}),ae.jsx("pre",{children:e})]})},Bs=As.bind({}),Gr=As.bind({});Gr.args={value:`Paragraph goes here lorem ipsum dolor.
182
182
  1. Item (*italic*)
183
183
  2. Item (**bold**)
184
184
  3. Item (\`code\`)
185
185
  * Item
186
- * Item`};const Xr=As.bind({});Xr.args={placeholder:"Enter message..."};const Yr=As.bind({});Yr.args={disabled:!0};const Zr=()=>{const[t,e]=_e.useState("starting value"),n=_e.useRef(null),r=s=>{e(""),s.current.clearContent()};return ae.jsxs(ae.Fragment,{children:[ae.jsx(vu,{label:"Clear input!",colored:"red",onClick:()=>r(n)}),ae.jsx(Zi,{value:t,onChange:e,ref:n}),ae.jsx("pre",{children:ae.jsx("strong",{children:"Markdown output:"})}),ae.jsx("pre",{children:t})]})},AO=ae.jsx(Mf,{options:[{label:"Aardvarks",value:"termites"},{label:"Kangaroos",value:"grass"},{label:"Koalas",value:"leaves"},{label:"Wombats",value:"bark"}],width:"auto",value:"termites",small:!0}),Qr=As.bind({});Qr.args={toolbarComponent:AO};Zr.__docgenInfo={description:"",methods:[],displayName:"HandlingStateExternallyWithRef"};var iu,ou,au;Bs.parameters={...Bs.parameters,docs:{...(iu=Bs.parameters)==null?void 0:iu.docs,source:{originalSource:`args => {
186
+ * Item`};const Xr=As.bind({});Xr.args={placeholder:"Enter message..."};const Yr=As.bind({});Yr.args={disabled:!0};const Zr=()=>{const[t,e]=_e.useState("starting value"),n=_e.useRef(null),r=s=>{e(""),s.current.clearContent()};return ae.jsxs(ae.Fragment,{children:[ae.jsx(vu,{label:"Clear input!",colored:"red",onClick:()=>r(n)}),ae.jsx(Zi,{value:t,onChange:e,ref:n}),ae.jsx("pre",{children:ae.jsx("strong",{children:"Markdown output:"})}),ae.jsx("pre",{children:t})]})},IO=ae.jsx(Mf,{options:[{label:"Aardvarks",value:"termites"},{label:"Kangaroos",value:"grass"},{label:"Koalas",value:"leaves"},{label:"Wombats",value:"bark"}],width:"auto",value:"termites",small:!0}),Qr=As.bind({});Qr.args={toolbarComponent:IO};Zr.__docgenInfo={description:"",methods:[],displayName:"HandlingStateExternallyWithRef"};var iu,ou,au;Bs.parameters={...Bs.parameters,docs:{...(iu=Bs.parameters)==null?void 0:iu.docs,source:{originalSource:`args => {
187
187
  const [value, setValue] = React.useState(args.value);
188
188
  return <>
189
189
  <RichTextInput
@@ -253,4 +253,4 @@ ${t}</ul>
253
253
  </pre>
254
254
  <pre>{value}</pre>
255
255
  </>;
256
- }`,...(wu=(Su=Qr.parameters)==null?void 0:Su.docs)==null?void 0:wu.source}}};const sM=["Default","Filled","Placeholder","Disabled","HandlingStateExternallyWithRef","WithToolbarComponent"];export{Bs as Default,Yr as Disabled,Gr as Filled,Zr as HandlingStateExternallyWithRef,Xr as Placeholder,Qr as WithToolbarComponent,sM as __namedExportsOrder,rM as default};
256
+ }`,...(wu=(Su=Qr.parameters)==null?void 0:Su.docs)==null?void 0:wu.source}}};const oM=["Default","Filled","Placeholder","Disabled","HandlingStateExternallyWithRef","WithToolbarComponent"];export{Bs as Default,Yr as Disabled,Gr as Filled,Zr as HandlingStateExternallyWithRef,Xr as Placeholder,Qr as WithToolbarComponent,oM as __namedExportsOrder,iM as default};
@@ -1,4 +1,4 @@
1
- import{j as o}from"./jsx-runtime-eps93zm2.js";import{r as D}from"./index-DhsZuJvc.js";import{T as g}from"./table-DMsE4ks-.js";import{T as z}from"./text-B3-TSWok.js";import{t as R,s as G,u as J,v as K,w as Q}from"./table.stories-data-CR9VpXHs.js";import"./index-Bk2sglWO.js";import"./index.es-DazXb-ul.js";import"./inheritsLoose-DP0QEDDI.js";import"./redux-tRgGMjwY.js";import"./objectSpread2-DW4nTBoq.js";import"./tiny-invariant-DqLgxztJ.js";import"./index-CUZDtIZe.js";import"./memoize-one.esm-CcMeOnPo.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./lodash-BHd_uQHh.js";import"./actions-CHgr8eL8.js";import"./common-types-Sih75Sav.js";import"./disabled-context-rmpd7YJS.js";import"./button-VxhoNhrV.js";import"./spinner-AWUe4xwQ.js";import"./icon-BSFY3vDO.js";import"./index-CEuq6vkz.js";import"./tooltip-1V7clEnw.js";import"./types-BmbYqTX_.js";import"./types-UmZ4Y_CR.js";import"./badge-CLQ59MDF.js";import"./heading-CRNoBc7q.js";import"./help-icon-Buhx5nl6.js";import"./pagination-DXnrsBZs.js";import"./select-Br1k0mOD.js";import"./assertThisInitialized-B9jnkVVz.js";import"./select.input-DIKP56UZ.js";import"./input-BW9trNAW.js";import"./input-group-BaRSJAEN.js";import"./input-group-addon-D68iUKV2.js";import"./number-input-FjN2w5Zq.js";import"./index-C0x1JmaP.js";import"./index-DRSy5Ssd.js";import"./check-box-BtCGePRy.js";import"./slider-DAramr8j.js";import"./index-BI4_Bp97.js";import"./popover-CzZdWNnB.js";import"./flex-EllkLxgO.js";const Ie={title:"Basic/Table/Row",component:g,args:{table:{...R}}},v=n=>o.jsx(g,{...n}),i=v.bind({});i.args={table:G};const p=v.bind({});p.args={table:J};const c=v.bind({});c.args={table:K};const d=v.bind({});d.args={table:Q};const t=v.bind({});t.args={table:{...R,striped:!1}};t.parameters={docs:{description:{story:"`striped: false` removes tinted background on alternative rows."}}};const u=()=>{const[n,e]=D.useState(null),a=r=>e(n===r?null:r);return o.jsx(g,{table:{...R,striped:!1,rows:R.rows.map((r,x)=>({...r,onRowClick:()=>a(x),expandedContent:{content:n===x?o.jsx("div",{children:"Example expanded content"}):null}}))}})},m=()=>{const n={draggable:!0,headers:[{cells:[{value:"Name"},{value:"Weight (kg)"},{value:"Energy (kcal / 100g)"},{value:"Origin"}]}],rows:[{noDrag:!0,cells:[{value:"Undraggable"},{value:100},{value:361},{value:"Vietnam"}]},{cells:[{value:"Buckwheat"},{value:50},{value:358},{value:"Poland"}]},{cells:[{value:"Couscous"},{value:10},{value:368},{value:"France"}]}]},e=(s,b,l)=>{const y=[...s];return s[l].noDrag?s:(y.splice(l,0,y.splice(b,1)[0]),y)},[a,r]=D.useState(n.rows),x=s=>{const{to:b,from:l}=s;e(a,l,b),r(e(a,l,b))};return o.jsx(g,{table:{...n,rows:a},onListReorder:x})},w=()=>{const[n,e]=D.useState("Hover any row!"),a=[1,2,3,4,5].map(r=>({cells:[{value:`Row ${r}`},{value:`${r**2}`}],onRowMouseEnter:()=>e(`Hovering row ${r}`),onRowMouseLeave:()=>e("Not hovering any row...")}));return o.jsxs(o.Fragment,{children:[o.jsx(z,{children:n}),o.jsx(g,{table:{fixedWidth:"100%",headers:[{cells:[{value:"Description"},{value:"Value"}],onRowMouseEnter:()=>e("Hovering header row"),onRowMouseLeave:()=>e("Not hovering any row...")}],rows:a}})]})};u.__docgenInfo={description:"",methods:[],displayName:"Expandable"};m.__docgenInfo={description:"",methods:[],displayName:"DragAndDrop"};w.__docgenInfo={description:"",methods:[],displayName:"OnRowEnter"};var E,h,T;i.parameters={...i.parameters,docs:{...(E=i.parameters)==null?void 0:E.docs,source:{originalSource:`args => {
1
+ import{j as o}from"./jsx-runtime-eps93zm2.js";import{r as D}from"./index-DhsZuJvc.js";import{T as g}from"./table-DNN_2kqQ.js";import{T as z}from"./text-B3-TSWok.js";import{t as R,s as G,u as J,v as K,w as Q}from"./table.stories-data-CG4FwGG3.js";import"./index-Bk2sglWO.js";import"./index.es-DazXb-ul.js";import"./inheritsLoose-DP0QEDDI.js";import"./redux-tRgGMjwY.js";import"./objectSpread2-DW4nTBoq.js";import"./tiny-invariant-DqLgxztJ.js";import"./index-CUZDtIZe.js";import"./memoize-one.esm-CcMeOnPo.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./lodash-BHd_uQHh.js";import"./actions-BhPnDYmS.js";import"./common-types-Sih75Sav.js";import"./disabled-context-rmpd7YJS.js";import"./button-DHevvVBE.js";import"./spinner-AWUe4xwQ.js";import"./icon-BSFY3vDO.js";import"./index-CEuq6vkz.js";import"./tooltip-1V7clEnw.js";import"./types-BmbYqTX_.js";import"./types-UmZ4Y_CR.js";import"./badge-CLQ59MDF.js";import"./heading-CRNoBc7q.js";import"./help-icon-Buhx5nl6.js";import"./pagination-DayOrCL5.js";import"./select-DAXADfWF.js";import"./assertThisInitialized-B9jnkVVz.js";import"./select.input-DIKP56UZ.js";import"./input-DFNY9YDm.js";import"./input-group-BaRSJAEN.js";import"./input-group-addon-D68iUKV2.js";import"./number-input-hqsQsKER.js";import"./index-C0x1JmaP.js";import"./index-DRSy5Ssd.js";import"./check-box-BtCGePRy.js";import"./slider-DckvIvC7.js";import"./index-BI4_Bp97.js";import"./popover-rq33c1W2.js";import"./flex-EllkLxgO.js";const Ie={title:"Basic/Table/Row",component:g,args:{table:{...R}}},v=n=>o.jsx(g,{...n}),i=v.bind({});i.args={table:G};const p=v.bind({});p.args={table:J};const c=v.bind({});c.args={table:K};const d=v.bind({});d.args={table:Q};const t=v.bind({});t.args={table:{...R,striped:!1}};t.parameters={docs:{description:{story:"`striped: false` removes tinted background on alternative rows."}}};const u=()=>{const[n,e]=D.useState(null),a=r=>e(n===r?null:r);return o.jsx(g,{table:{...R,striped:!1,rows:R.rows.map((r,x)=>({...r,onRowClick:()=>a(x),expandedContent:{content:n===x?o.jsx("div",{children:"Example expanded content"}):null}}))}})},m=()=>{const n={draggable:!0,headers:[{cells:[{value:"Name"},{value:"Weight (kg)"},{value:"Energy (kcal / 100g)"},{value:"Origin"}]}],rows:[{noDrag:!0,cells:[{value:"Undraggable"},{value:100},{value:361},{value:"Vietnam"}]},{cells:[{value:"Buckwheat"},{value:50},{value:358},{value:"Poland"}]},{cells:[{value:"Couscous"},{value:10},{value:368},{value:"France"}]}]},e=(s,b,l)=>{const y=[...s];return s[l].noDrag?s:(y.splice(l,0,y.splice(b,1)[0]),y)},[a,r]=D.useState(n.rows),x=s=>{const{to:b,from:l}=s;e(a,l,b),r(e(a,l,b))};return o.jsx(g,{table:{...n,rows:a},onListReorder:x})},w=()=>{const[n,e]=D.useState("Hover any row!"),a=[1,2,3,4,5].map(r=>({cells:[{value:`Row ${r}`},{value:`${r**2}`}],onRowMouseEnter:()=>e(`Hovering row ${r}`),onRowMouseLeave:()=>e("Not hovering any row...")}));return o.jsxs(o.Fragment,{children:[o.jsx(z,{children:n}),o.jsx(g,{table:{fixedWidth:"100%",headers:[{cells:[{value:"Description"},{value:"Value"}],onRowMouseEnter:()=>e("Hovering header row"),onRowMouseLeave:()=>e("Not hovering any row...")}],rows:a}})]})};u.__docgenInfo={description:"",methods:[],displayName:"Expandable"};m.__docgenInfo={description:"",methods:[],displayName:"DragAndDrop"};w.__docgenInfo={description:"",methods:[],displayName:"OnRowEnter"};var E,h,T;i.parameters={...i.parameters,docs:{...(E=i.parameters)==null?void 0:E.docs,source:{originalSource:`args => {
2
2
  return <Table
3
3
  // eslint-disable-next-line react/jsx-props-no-spreading
4
4
  {...args} />;
@@ -0,0 +1,40 @@
1
+ import{j as p}from"./jsx-runtime-eps93zm2.js";import{r as q,g as ze}from"./index-DhsZuJvc.js";import{c as U}from"./index-Bk2sglWO.js";import{G as ae,I as Ee}from"./common-types-Sih75Sav.js";import{D as de}from"./disabled-context-rmpd7YJS.js";import{i as ne}from"./types-UmZ4Y_CR.js";import{T as me,u as We,m as Ue}from"./tooltip-1V7clEnw.js";import{p as Ge}from"./index-CEuq6vkz.js";import"./lodash-BHd_uQHh.js";import{a as $e,_ as Ve}from"./inheritsLoose-DP0QEDDI.js";import{_ as fe}from"./assertThisInitialized-B9jnkVVz.js";import{m as se}from"./memoize-one.esm-CcMeOnPo.js";import{M as ie}from"./types-BmbYqTX_.js";import{T as oe}from"./text-B3-TSWok.js";import{A as Ke}from"./actions-BhPnDYmS.js";import{I as ue}from"./icon-BSFY3vDO.js";import{s as Ye}from"./select.input-DIKP56UZ.js";const Be="_inputInTable_1nzfr_1",Ze="_error_1nzfr_7",Xe="_warning_1nzfr_7",Je="_inputHover_1nzfr_13",Qe="_inputFocus_1nzfr_18",en="_inputError_1nzfr_25",nn="_inputWarning_1nzfr_26",tn="_inputDisabled_1nzfr_61",rn="_hideScrollbars_1nzfr_67",an="_select_1nzfr_77",sn="_isInTable_1nzfr_121",ln="_unSelected_1nzfr_133",on="_small_1nzfr_174",un="_right_1nzfr_182",cn="_groupOrderFirst_1nzfr_193",dn="_groupOrderMiddle_1nzfr_194",mn="_groupOrderLast_1nzfr_198",z={inputInTable:Be,error:Ze,warning:Xe,inputHover:Je,inputFocus:Qe,inputError:en,inputWarning:nn,inputDisabled:tn,hideScrollbars:rn,select:an,isInTable:sn,unSelected:ln,small:on,right:un,groupOrderFirst:cn,groupOrderMiddle:dn,groupOrderLast:mn},Ie=({disabled:e=!1,error:n=null,warning:a=null,tooltip:d=null,options:c,onChange:v=()=>{},onFocus:f=()=>{},onBlur:s=()=>{},right:o=!1,small:g=!1,tabIndex:b=0,selectedOption:S,width:T=null,groupOrder:E=null,testId:_,isInTable:t=!1,clearable:l,placeholder:i,hasNonExistentValue:r,maxTooltipWidth:u,borderRadius:m})=>{const y=q.useContext(de),h=S===null||(S==null?void 0:S.value)===null?"unselected":S==null?void 0:S.value,I=h==="unselected",L=(h==="unselected"||l?[p.jsx("option",{value:"unselected",disabled:!l,hidden:!l,children:i||"Select..."},"unselected")]:[]).concat(r?[p.jsx("option",{value:S==null?void 0:S.value,disabled:e||y,children:S==null?void 0:S.label},"selectedNonExistentValue")]:[]).concat(c.map((x,w)=>p.jsx("option",{value:x.value,"data-testid":x.testId,children:x.label},w))),R=(()=>{if(E)switch(E){case ae.FIRST:return z.groupOrderFirst;case ae.LAST:return z.groupOrderLast;default:return z.groupOrderMiddle}return""})();return p.jsx(me,{error:!!n,warning:!!a,text:d||n||a,enabled:d&&ne(d)||n&&ne(n)||a&&ne(a)||!1,maxWidth:u,placement:"bottom-center",children:p.jsx("select",{className:U(z.select,I?z.unSelected:"",n?z.error:a?z.warning:"",o?z.right:"",g?z.small:"",t?z.isInTable:"",R),style:{width:T||"",borderRadius:m||""},onChange:x=>{const{value:w}=x.target;let M;w==="unselected"?M={value:null}:M=c.find(A=>String(A.value)===String(w))||{value:null},v(x,M)},onFocus:f,onBlur:s,tabIndex:b,value:h,disabled:e||y,"data-testid":_,children:L})})};Ie.__docgenInfo={description:"",methods:[],displayName:"NativeSelect",props:{borderRadius:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""},disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},error:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | React.ReactNode | null",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactReactNode",raw:"React.ReactNode"},{name:"null"}]},description:"",defaultValue:{value:"null",computed:!1}},warning:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | React.ReactNode | null",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactReactNode",raw:"React.ReactNode"},{name:"null"}]},description:"",defaultValue:{value:"null",computed:!1}},tooltip:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | React.ReactNode | null",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactReactNode",raw:"React.ReactNode"},{name:"null"}]},description:"",defaultValue:{value:"null",computed:!1}},options:{required:!0,tsType:{name:"Array",elements:[{name:"ISelectSelectedOption"}],raw:"ISelectSelectedOption[]"},description:""},onChange:{required:!1,tsType:{name:"signature",type:"function",raw:`(
2
+ evt: ChangeEvent<HTMLSelectElement>,
3
+ value: ISelectSelectedOption | { value: null },
4
+ ) => void`,signature:{arguments:[{type:{name:"ChangeEvent",elements:[{name:"HTMLSelectElement"}],raw:"ChangeEvent<HTMLSelectElement>"},name:"evt"},{type:{name:"union",raw:"ISelectSelectedOption | { value: null }",elements:[{name:"ISelectSelectedOption"},{name:"signature",type:"object",raw:"{ value: null }",signature:{properties:[{key:"value",value:{name:"null",required:!0}}]}}]},name:"value"}],return:{name:"void"}}},description:"",defaultValue:{value:"() => {}",computed:!1}},onFocus:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"",defaultValue:{value:"() => {}",computed:!1}},onBlur:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"",defaultValue:{value:"() => {}",computed:!1}},right:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},small:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},tabIndex:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0",computed:!1}},selectedOption:{required:!1,tsType:{name:"ISelectSelectedOption"},description:""},width:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | null",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"null"}]},description:"",defaultValue:{value:"null",computed:!1}},groupOrder:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:"",defaultValue:{value:"null",computed:!1}},testId:{required:!1,tsType:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}]},description:""},isInTable:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},clearable:{required:!1,tsType:{name:"boolean"},description:""},placeholder:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:""},hasNonExistentValue:{required:!1,tsType:{name:"boolean"},description:""},maxTooltipWidth:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""}}};var Oe={exports:{}};(function(e,n){(function(a,d){e.exports=d(q,Ge)})(window,function(a,d){return function(c){var v={};function f(s){if(v[s])return v[s].exports;var o=v[s]={i:s,l:!1,exports:{}};return c[s].call(o.exports,o,o.exports,f),o.l=!0,o.exports}return f.m=c,f.c=v,f.d=function(s,o,g){f.o(s,o)||Object.defineProperty(s,o,{enumerable:!0,get:g})},f.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},f.t=function(s,o){if(1&o&&(s=f(s)),8&o||4&o&&typeof s=="object"&&s&&s.__esModule)return s;var g=Object.create(null);if(f.r(g),Object.defineProperty(g,"default",{enumerable:!0,value:s}),2&o&&typeof s!="string")for(var b in s)f.d(g,b,(function(S){return s[S]}).bind(null,b));return g},f.n=function(s){var o=s&&s.__esModule?function(){return s.default}:function(){return s};return f.d(o,"a",o),o},f.o=function(s,o){return Object.prototype.hasOwnProperty.call(s,o)},f.p="",f(f.s=0)}([function(c,v,f){Object.defineProperty(v,"__esModule",{value:!0});var s=f(1);Object.defineProperty(v,"default",{enumerable:!0,get:function(){return function(o){return o&&o.__esModule?o:{default:o}}(s).default}}),c.exports=v.default},function(c,v,f){Object.defineProperty(v,"__esModule",{value:!0});var s=Object.assign||function(t){for(var l=1;l<arguments.length;l++){var i=arguments[l];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},o=function(){function t(l,i){for(var r=0;r<i.length;r++){var u=i[r];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(l,u.key,u)}}return function(l,i,r){return i&&t(l.prototype,i),r&&t(l,r),l}}(),g=T(f(2)),b=T(f(3)),S=f(4);function T(t){return t&&t.__esModule?t:{default:t}}var E=[],_=function(t){function l(i){(function(u,m){if(!(u instanceof m))throw new TypeError("Cannot call a class as a function")})(this,l);var r=function(u,m){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!m||typeof m!="object"&&typeof m!="function"?u:m}(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,i));return r.handleKeyboardEvent=r.handleKeyboardEvent.bind(r),r.registerExclusiveHandler=r.registerExclusiveHandler.bind(r),r.deregisterExclusiveHandler=r.deregisterExclusiveHandler.bind(r),r}return function(i,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);i.prototype=Object.create(r&&r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(i,r):i.__proto__=r)}(l,g.default.Component),o(l,[{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyboardEvent,!1),document.addEventListener("keyup",this.handleKeyboardEvent,!1),document.addEventListener("keypress",this.handleKeyboardEvent,!1);var i=this.props,r=i.isExclusive,u=i.isDisabled;r&&!u&&this.registerExclusiveHandler()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyboardEvent,!1),document.removeEventListener("keyup",this.handleKeyboardEvent,!1),document.removeEventListener("keypress",this.handleKeyboardEvent,!1),this.deregisterExclusiveHandler()}},{key:"componentDidUpdate",value:function(i){var r=i.isExclusive,u=i.isDisabled;(this.props.isExclusive!==r||this.props.isDisabled!==u)&&(this.props.isExclusive&&!this.props.isDisabled?this.registerExclusiveHandler():this.deregisterExclusiveHandler())}},{key:"registerExclusiveHandler",value:function(){this.deregisterExclusiveHandler(),E.unshift(this)}},{key:"deregisterExclusiveHandler",value:function(){var i=this;E.includes(this)&&(E=E.filter(function(r){return r!==i}))}},{key:"handleKeyboardEvent",value:function(i){var r=this.props,u=r.isDisabled,m=r.handleKeys,y=r.onKeyEvent,h=r.handleEventType,I=r.children,L=r.handleFocusableElements;if(u||h!==i.type||E.length>0&&E[0]!==this)return!1;var R=i.target===document.body||L,x=this.childrenContainer&&this.childrenContainer.contains(i.target);if(!(I?x:R))return!1;var w=(0,S.findMatchedKey)(i,m);return!!w&&(y(w,i),!0)}},{key:"render",value:function(){var i=this,r=this.props.children,u=Object.assign({},this.props),m=!0,y=!1,h=void 0;try{for(var I,L=Object.keys(l.propTypes)[Symbol.iterator]();!(m=(I=L.next()).done);m=!0)delete u[I.value]}catch(R){y=!0,h=R}finally{try{!m&&L.return&&L.return()}finally{if(y)throw h}}return r?g.default.createElement("span",s({ref:function(R){i.childrenContainer=R}},u),r):null}}]),l}();v.default=_,_.propTypes={handleKeys:b.default.array,handleEventType:b.default.oneOf(["keydown","keyup","keypress"]),handleFocusableElements:b.default.bool,onKeyEvent:b.default.func,isDisabled:b.default.bool,isExclusive:b.default.bool,children:b.default.any},_.defaultProps={handleKeys:[],handleFocusableElements:!1,handleEventType:"keydown",onKeyEvent:function(){return null}},c.exports=v.default},function(c,v){c.exports=a},function(c,v){c.exports=d},function(c,v,f){function s(r,u,m){return u in r?Object.defineProperty(r,u,{value:m,enumerable:!0,configurable:!0,writable:!0}):r[u]=m,r}Object.defineProperty(v,"__esModule",{value:!0}),v.matchKeyEvent=i,v.findMatchedKey=function(r,u){var m=u.map(function(y){var h=y.toLowerCase(),I=l[h];return I||[y]}).reduce(function(y,h){return y.concat(h)},[]).find(function(y){return i(r,y)});return!m&&u.includes("all")&&(m="other"),m};var o={backspace:[8],del:[46],delete:[46],ins:[45],insert:[45],tab:[9],enter:[13],return:[13],esc:[27],space:[32],pageup:[33],pagedown:[34],end:[35],home:[36],left:[37],up:[38],right:[39],down:[40],shift:[16],ctrl:[17],alt:[18],cap:[20],num:[144],clear:[12],meta:[91],";":[186,59],"=":[187,61],",":[188,44],"-":[189,45,173,109],minus:[189,45,173,109],".":[190,110],"/":[191,111],"`":[192],"[":[219],"\\":[220],"]":[221],"*":[106],"+":[107],plus:[107],"'":[222],quote:[222]},g=Object.keys(o).reduce(function(r,u){return Object.assign(r,s({},u.toUpperCase(),o[u]))},{}),b="0123456789".split("").reduce(function(r,u,m){return Object.assign(r,s({},u,[m+48,m+96]))},{}),S="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").reduce(function(r,u,m){return Object.assign(r,s({},u.toLowerCase(),[m+65]),s({},u,[m+65]))},{}),T="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19".split(",").reduce(function(r,u,m){return Object.assign(r,s({},"f"+u,[m+112]))},{}),E={control:"ctrl",ctrl:"ctrl",shift:"shift",meta:"meta",cmd:"meta",command:"meta",option:"alt",alt:"alt"},_=v.AllKeys=Object.assign({},o,g,b,S,T),t=Object.assign({},b,S),l={all:Object.keys(_),alphanumeric:Object.keys(t),numeric:Object.keys(b),alphabetic:Object.keys(S),function:Object.keys(T)};function i(r,u){var m=r.which||r.keyCode,y=r.type,h=Object.keys(E).filter(function(A){return r[A+"Key"]}).sort(),I=u.toLowerCase().trim(),L=I==="+"?["+"]:I.split(/\s?\+\s?/),R=L.pop(),x=_[R],w=L;if(y==="keypress")return u==String.fromCharCode(m).toLowerCase();if(w.length===0&&h.length===0)return x.indexOf(m)>=0;if(w.length>0&&h.length>0){var M=w.map(function(A){return E[A]}).sort(),F=M.length===h.length&&M.every(function(A,G){return h[G]===A});return x.indexOf(m)>=0&&F}return w.length==0&&h.length===1&&R===h[0]}}])})})(Oe);var pn=Oe.exports;const fn=ze(pn),we=()=>{const e=q.useRef(null);return[e,()=>{e.current&&e.current.focus()}]},Re=()=>{const[e,n]=q.useState(!1);return q.useEffect(()=>{(async()=>{document.fonts&&await document.fonts.ready.then(()=>n(!0))})()},[]),e};var gn=typeof performance=="object"&&typeof performance.now=="function",ge=gn?function(){return performance.now()}:function(){return Date.now()};function ve(e){cancelAnimationFrame(e.id)}function vn(e,n){var a=ge();function d(){ge()-a>=n?e.call(null):c.id=requestAnimationFrame(d)}var c={id:requestAnimationFrame(d)};return c}var le=-1;function ye(e){if(e===void 0&&(e=!1),le===-1||e){var n=document.createElement("div"),a=n.style;a.width="50px",a.height="50px",a.overflow="scroll",document.body.appendChild(n),le=n.offsetWidth-n.clientWidth,document.body.removeChild(n)}return le}var ee=null;function he(e){if(e===void 0&&(e=!1),ee===null||e){var n=document.createElement("div"),a=n.style;a.width="50px",a.height="50px",a.overflow="scroll",a.direction="rtl";var d=document.createElement("div"),c=d.style;return c.width="100px",c.height="100px",n.appendChild(d),document.body.appendChild(n),n.scrollLeft>0?ee="positive-descending":(n.scrollLeft=1,n.scrollLeft===0?ee="negative":ee="positive-ascending"),document.body.removeChild(n),ee}return ee}var yn=150,hn=function(n,a){return n};function Sn(e){var n,a=e.getItemOffset,d=e.getEstimatedTotalSize,c=e.getItemSize,v=e.getOffsetForIndexAndAlignment,f=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,o=e.initInstanceProps,g=e.shouldResetStyleCacheOnItemSizeChange,b=e.validateProps;return n=function(S){$e(T,S);function T(_){var t;return t=S.call(this,_)||this,t._instanceProps=o(t.props,fe(t)),t._outerRef=void 0,t._resetIsScrollingTimeoutId=null,t.state={instance:fe(t),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof t.props.initialScrollOffset=="number"?t.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},t._callOnItemsRendered=void 0,t._callOnItemsRendered=se(function(l,i,r,u){return t.props.onItemsRendered({overscanStartIndex:l,overscanStopIndex:i,visibleStartIndex:r,visibleStopIndex:u})}),t._callOnScroll=void 0,t._callOnScroll=se(function(l,i,r){return t.props.onScroll({scrollDirection:l,scrollOffset:i,scrollUpdateWasRequested:r})}),t._getItemStyle=void 0,t._getItemStyle=function(l){var i=t.props,r=i.direction,u=i.itemSize,m=i.layout,y=t._getItemStyleCache(g&&u,g&&m,g&&r),h;if(y.hasOwnProperty(l))h=y[l];else{var I=a(t.props,l,t._instanceProps),L=c(t.props,l,t._instanceProps),R=r==="horizontal"||m==="horizontal",x=r==="rtl",w=R?I:0;y[l]=h={position:"absolute",left:x?void 0:w,right:x?w:void 0,top:R?0:I,height:R?"100%":L,width:R?L:"100%"}}return h},t._getItemStyleCache=void 0,t._getItemStyleCache=se(function(l,i,r){return{}}),t._onScrollHorizontal=function(l){var i=l.currentTarget,r=i.clientWidth,u=i.scrollLeft,m=i.scrollWidth;t.setState(function(y){if(y.scrollOffset===u)return null;var h=t.props.direction,I=u;if(h==="rtl")switch(he()){case"negative":I=-u;break;case"positive-descending":I=m-r-u;break}return I=Math.max(0,Math.min(I,m-r)),{isScrolling:!0,scrollDirection:y.scrollOffset<I?"forward":"backward",scrollOffset:I,scrollUpdateWasRequested:!1}},t._resetIsScrollingDebounced)},t._onScrollVertical=function(l){var i=l.currentTarget,r=i.clientHeight,u=i.scrollHeight,m=i.scrollTop;t.setState(function(y){if(y.scrollOffset===m)return null;var h=Math.max(0,Math.min(m,u-r));return{isScrolling:!0,scrollDirection:y.scrollOffset<h?"forward":"backward",scrollOffset:h,scrollUpdateWasRequested:!1}},t._resetIsScrollingDebounced)},t._outerRefSetter=function(l){var i=t.props.outerRef;t._outerRef=l,typeof i=="function"?i(l):i!=null&&typeof i=="object"&&i.hasOwnProperty("current")&&(i.current=l)},t._resetIsScrollingDebounced=function(){t._resetIsScrollingTimeoutId!==null&&ve(t._resetIsScrollingTimeoutId),t._resetIsScrollingTimeoutId=vn(t._resetIsScrolling,yn)},t._resetIsScrolling=function(){t._resetIsScrollingTimeoutId=null,t.setState({isScrolling:!1},function(){t._getItemStyleCache(-1,null)})},t}T.getDerivedStateFromProps=function(t,l){return bn(t,l),b(t),null};var E=T.prototype;return E.scrollTo=function(t){t=Math.max(0,t),this.setState(function(l){return l.scrollOffset===t?null:{scrollDirection:l.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},E.scrollToItem=function(t,l){l===void 0&&(l="auto");var i=this.props,r=i.itemCount,u=i.layout,m=this.state.scrollOffset;t=Math.max(0,Math.min(t,r-1));var y=0;if(this._outerRef){var h=this._outerRef;u==="vertical"?y=h.scrollWidth>h.clientWidth?ye():0:y=h.scrollHeight>h.clientHeight?ye():0}this.scrollTo(v(this.props,t,l,m,this._instanceProps,y))},E.componentDidMount=function(){var t=this.props,l=t.direction,i=t.initialScrollOffset,r=t.layout;if(typeof i=="number"&&this._outerRef!=null){var u=this._outerRef;l==="horizontal"||r==="horizontal"?u.scrollLeft=i:u.scrollTop=i}this._callPropsCallbacks()},E.componentDidUpdate=function(){var t=this.props,l=t.direction,i=t.layout,r=this.state,u=r.scrollOffset,m=r.scrollUpdateWasRequested;if(m&&this._outerRef!=null){var y=this._outerRef;if(l==="horizontal"||i==="horizontal")if(l==="rtl")switch(he()){case"negative":y.scrollLeft=-u;break;case"positive-ascending":y.scrollLeft=u;break;default:var h=y.clientWidth,I=y.scrollWidth;y.scrollLeft=I-h-u;break}else y.scrollLeft=u;else y.scrollTop=u}this._callPropsCallbacks()},E.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&ve(this._resetIsScrollingTimeoutId)},E.render=function(){var t=this.props,l=t.children,i=t.className,r=t.direction,u=t.height,m=t.innerRef,y=t.innerElementType,h=t.innerTagName,I=t.itemCount,L=t.itemData,R=t.itemKey,x=R===void 0?hn:R,w=t.layout,M=t.outerElementType,F=t.outerTagName,A=t.style,G=t.useIsScrolling,K=t.width,$=this.state.isScrolling,H=r==="horizontal"||w==="horizontal",P=H?this._onScrollHorizontal:this._onScrollVertical,Z=this._getRangeToRender(),te=Z[0],re=Z[1],X=[];if(I>0)for(var k=te;k<=re;k++)X.push(q.createElement(l,{data:L,key:x(k,L),index:k,isScrolling:G?$:void 0,style:this._getItemStyle(k)}));var J=d(this.props,this._instanceProps);return q.createElement(M||F||"div",{className:i,onScroll:P,ref:this._outerRefSetter,style:Ve({position:"relative",height:u,width:K,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:r},A)},q.createElement(y||h||"div",{children:X,ref:m,style:{height:H?"100%":J,pointerEvents:$?"none":void 0,width:H?J:"100%"}}))},E._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var t=this.props.itemCount;if(t>0){var l=this._getRangeToRender(),i=l[0],r=l[1],u=l[2],m=l[3];this._callOnItemsRendered(i,r,u,m)}}if(typeof this.props.onScroll=="function"){var y=this.state,h=y.scrollDirection,I=y.scrollOffset,L=y.scrollUpdateWasRequested;this._callOnScroll(h,I,L)}},E._getRangeToRender=function(){var t=this.props,l=t.itemCount,i=t.overscanCount,r=this.state,u=r.isScrolling,m=r.scrollDirection,y=r.scrollOffset;if(l===0)return[0,0,0,0];var h=f(this.props,y,this._instanceProps),I=s(this.props,h,y,this._instanceProps),L=!u||m==="backward"?Math.max(1,i):1,R=!u||m==="forward"?Math.max(1,i):1;return[Math.max(0,h-L),Math.max(0,Math.min(l-1,I+R)),h,I]},T}(q.PureComponent),n.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},n}var bn=function(n,a){n.children,n.direction,n.height,n.layout,n.innerTagName,n.outerTagName,n.width,a.instance},_n=Sn({getItemOffset:function(n,a){var d=n.itemSize;return a*d},getItemSize:function(n,a){var d=n.itemSize;return d},getEstimatedTotalSize:function(n){var a=n.itemCount,d=n.itemSize;return d*a},getOffsetForIndexAndAlignment:function(n,a,d,c,v,f){var s=n.direction,o=n.height,g=n.itemCount,b=n.itemSize,S=n.layout,T=n.width,E=s==="horizontal"||S==="horizontal",_=E?T:o,t=Math.max(0,g*b-_),l=Math.min(t,a*b),i=Math.max(0,a*b-_+b+f);switch(d==="smart"&&(c>=i-_&&c<=l+_?d="auto":d="center"),d){case"start":return l;case"end":return i;case"center":{var r=Math.round(i+(l-i)/2);return r<Math.ceil(_/2)?0:r>t+Math.floor(_/2)?t:r}case"auto":default:return c>=i&&c<=l?c:c<i?i:l}},getStartIndexForOffset:function(n,a){var d=n.itemCount,c=n.itemSize;return Math.max(0,Math.min(d-1,Math.floor(a/c)))},getStopIndexForStartIndex:function(n,a,d){var c=n.direction,v=n.height,f=n.itemCount,s=n.itemSize,o=n.layout,g=n.width,b=c==="horizontal"||o==="horizontal",S=a*s,T=b?g:v,E=Math.ceil((T+d-S)/s);return Math.max(0,Math.min(f-1,a+E-1))},initInstanceProps:function(n){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(n){n.itemSize}});const Tn="_layerContainer_1lbvo_1",En="_layer_1lbvo_1",In="_small_1lbvo_23",On="_heading_1lbvo_26",wn="_option_1lbvo_27",Rn="_message_1lbvo_28",Ln="_focused_1lbvo_64",xn="_selected_1lbvo_68",Cn="_disabled_1lbvo_71",Mn="_check_1lbvo_75",Nn="_optionContent_1lbvo_92",qn="_label_1lbvo_97",An="_icon_1lbvo_104",Fn="_details_1lbvo_109",j={layerContainer:Tn,layer:En,small:In,heading:On,option:wn,message:Rn,focused:Ln,selected:xn,disabled:Cn,check:Mn,optionContent:Nn,label:qn,icon:An,details:Fn},Le=({label:e})=>p.jsx("div",{onClick:n=>n.stopPropagation(),className:j.heading,children:e});Le.__docgenInfo={description:"",methods:[],displayName:"Heading",props:{label:{required:!0,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""}}};const xe=({details:e,label:n,icon:a,disabled:d=!1,selected:c=!1,focused:v=!1,onSelectOption:f,actions:s,closeLayer:o,testId:g})=>p.jsxs("div",{className:U(j.option,d?j.disabled:"",c?j.selected:"",v?j.focused:""),onClick:!d&&f?f:void 0,"data-testid":g,children:[p.jsx("div",{className:j.optionContent,children:p.jsxs("span",{className:j.label,title:n,children:[n,a&&p.jsx("span",{className:j.icon,children:a})]})}),e&&p.jsx("div",{className:U(j.details),children:p.jsx(oe,{faint:!0,children:e})}),!!(s!=null&&s.length)&&p.jsx("div",{className:U(j.actions),children:p.jsx(Ke,{actions:s,closeLayer:o})}),p.jsx("span",{className:j.check,children:c?p.jsx(ue,{icon:Ee.CHECK}):null})]});xe.__docgenInfo={description:"",methods:[],displayName:"Option",props:{details:{required:!1,tsType:{name:"string"},description:""},label:{required:!0,tsType:{name:"string"},description:""},icon:{required:!1,tsType:{name:"ReactNode"},description:""},disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},selected:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},focused:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},onSelectOption:{required:!1,tsType:{name:"signature",type:"function",raw:`(
5
+ event?: React.MouseEvent<HTMLDivElement, MouseEvent>,
6
+ section?: ISelectSectionProps,
7
+ ) => void`,signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLDivElement, MouseEvent>",elements:[{name:"HTMLDivElement"},{name:"MouseEvent"}]},name:"event"},{type:{name:"signature",type:"object",raw:`{
8
+ section: ISelectSection;
9
+ selected?: boolean;
10
+ focused?: boolean;
11
+ onSelectOption?: (
12
+ event?: React.MouseEvent<HTMLDivElement, MouseEvent>,
13
+ section?: ISelectSectionProps,
14
+ ) => void;
15
+ closeLayer?: TEmpty;
16
+ }`,signature:{properties:[{key:"section",value:{name:"ISelectSection",required:!0}},{key:"selected",value:{name:"boolean",required:!1}},{key:"focused",value:{name:"boolean",required:!1}},{key:"onSelectOption",value:{name:"signature",type:"function",raw:`(
17
+ event?: React.MouseEvent<HTMLDivElement, MouseEvent>,
18
+ section?: ISelectSectionProps,
19
+ ) => void`,signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLDivElement, MouseEvent>",elements:[{name:"HTMLDivElement"},{name:"MouseEvent"}]},name:"event"},{type:{name:"ISelectSectionProps"},name:"section"}],return:{name:"void"}},required:!1}},{key:"closeLayer",value:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}},required:!1}}]}},name:"section"}],return:{name:"void"}}},description:""},actions:{required:!1,tsType:{name:"Array",elements:[{name:"any"}],raw:"any[]"},description:""},closeLayer:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},testId:{required:!1,tsType:{name:"string"},description:""}}};const Ce=({section:e,selected:n,focused:a,onSelectOption:d,closeLayer:c})=>{const v=q.useContext(de);switch(e.type){case ie.HEADING:return p.jsx(Le,{label:e.label});case ie.OPTION:default:return p.jsx(xe,{closeLayer:c,actions:e.actions,label:e.label,details:e.details,icon:e.icon,disabled:e.disabled||v,selected:n,focused:a,onSelectOption:d,testId:e.testId})}};Ce.__docgenInfo={description:"",methods:[],displayName:"Section",props:{section:{required:!0,tsType:{name:"ISelectSection"},description:""},selected:{required:!1,tsType:{name:"boolean"},description:""},focused:{required:!1,tsType:{name:"boolean"},description:""},onSelectOption:{required:!1,tsType:{name:"signature",type:"function",raw:`(
20
+ event?: React.MouseEvent<HTMLDivElement, MouseEvent>,
21
+ section?: ISelectSectionProps,
22
+ ) => void`,signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLDivElement, MouseEvent>",elements:[{name:"HTMLDivElement"},{name:"MouseEvent"}]},name:"event"},{type:{name:"signature",type:"object",raw:`{
23
+ section: ISelectSection;
24
+ selected?: boolean;
25
+ focused?: boolean;
26
+ onSelectOption?: (
27
+ event?: React.MouseEvent<HTMLDivElement, MouseEvent>,
28
+ section?: ISelectSectionProps,
29
+ ) => void;
30
+ closeLayer?: TEmpty;
31
+ }`,signature:{properties:[{key:"section",value:{name:"ISelectSection",required:!0}},{key:"selected",value:{name:"boolean",required:!1}},{key:"focused",value:{name:"boolean",required:!1}},{key:"onSelectOption",value:{name:"signature",type:"function",raw:`(
32
+ event?: React.MouseEvent<HTMLDivElement, MouseEvent>,
33
+ section?: ISelectSectionProps,
34
+ ) => void`,signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLDivElement, MouseEvent>",elements:[{name:"HTMLDivElement"},{name:"MouseEvent"}]},name:"event"},{type:{name:"ISelectSectionProps"},name:"section"}],return:{name:"void"}},required:!1}},{key:"closeLayer",value:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}},required:!1}}]}},name:"section"}],return:{name:"void"}}},description:""},closeLayer:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""}}};const ce=(e,n)=>{const d=document.createElement("canvas").getContext("2d");return d?(d.font=n,d.measureText(e).width):0},Me="13px",Ne="12px",jn="Roobert",Hn="sans-serif",Pn=12,Dn=8,kn=30,zn=24,Wn=5,Un=3,Gn=1,$n=2,Se=10,qe=(e=!1,n=!1)=>`${e?Ne:Me} ${n?jn:Hn}`,Vn=(e=!1,n=!1)=>(e?Dn:Pn)+(e?zn:kn)+(n?17:0),be=(e,n,a,d)=>{const c=qe(n,a),v=d?ce(d,c):0,f=Math.ceil(e.reduce((o,g)=>{var _;const b=(((_=g==null?void 0:g.actions)==null?void 0:_.length)??0)*24,S=g.icon?parseInt(n?Ne:Me)+7:0,T=`${g.label} ${g.details||""}`,E=ce(T,c)+b+S;return o=E>o?E:o,o},v)),s=Vn(n,!0);return f+s},Kn=(e,n,a)=>{const d=qe(!0,a),c=ce(e.label,d),v=(n?Un:Wn)*2+Gn*2+$n;return Math.ceil(c+v)},Ae=({listRef:e,isMulti:n,sections:a,selectedOptions:d,onSelectOption:c,focusedOptionIndex:v,width:f,small:s,firstSelectedOptionIndex:o,closeLayer:g,testId:b})=>{q.useEffect(()=>{o&&o!==null&&e.current!==null&&e.current.scrollToItem(o,"start")},[o,e]);const S=s?24:30;return p.jsx("div",{"data-testid":b,className:U(j.layer,s&&j.small),children:a.length?p.jsx(_n,{ref:e,height:a.length<Se?S*a.length:S*Se,itemCount:a.length,itemSize:S,width:f,children:({index:T,style:E})=>{var _;return p.jsx("div",{style:E,children:p.jsx(Ce,{closeLayer:g,section:a[T],selected:n&&a[T].type!==ie.HEADING&&Array.isArray(d)?d.some(t=>{var l;return t&&(t==null?void 0:t.value)===((l=a==null?void 0:a[T])==null?void 0:l.value)}):!Array.isArray(d)&&((_=a==null?void 0:a[T])==null?void 0:_.value)===(d==null?void 0:d.value),focused:v===T,onSelectOption:t=>c(t,a[T])})})}}):p.jsx("ul",{children:p.jsx("li",{children:p.jsx("div",{className:j.message,style:{width:f},children:"No matches"})})})})};Ae.__docgenInfo={description:"",methods:[],displayName:"Layer",props:{listRef:{required:!0,tsType:{name:"RefObject",elements:[{name:"any"}],raw:"RefObject<any>"},description:""},isMulti:{required:!1,tsType:{name:"boolean"},description:""},sections:{required:!0,tsType:{name:"Array",elements:[{name:"ISelectSection"}],raw:"ISelectSection[]"},description:""},selectedOptions:{required:!0,tsType:{name:"union",raw:"ISelectSelectedOption | ISelectSelectedOption[]",elements:[{name:"ISelectSelectedOption"},{name:"Array",elements:[{name:"ISelectSelectedOption"}],raw:"ISelectSelectedOption[]"}]},description:""},onSelectOption:{required:!0,tsType:{name:"signature",type:"function",raw:`(
35
+ event?: React.MouseEvent<HTMLDivElement, MouseEvent>,
36
+ section?: ISelectSection,
37
+ ) => void`,signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLDivElement, MouseEvent>",elements:[{name:"HTMLDivElement"},{name:"MouseEvent"}]},name:"event"},{type:{name:"ISelectSection"},name:"section"}],return:{name:"void"}}},description:""},focusedOptionIndex:{required:!1,tsType:{name:"number"},description:""},width:{required:!0,tsType:{name:"number"},description:""},small:{required:!1,tsType:{name:"boolean"},description:""},firstSelectedOptionIndex:{required:!1,tsType:{name:"number"},description:""},closeLayer:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},testId:{required:!1,tsType:{name:"string"},description:""}}};const Yn="_inputInTable_nec64_1",Bn="_error_nec64_7",Zn="_warning_nec64_7",Xn="_inputHover_nec64_13",Jn="_inputFocus_nec64_18",Qn="_inputError_nec64_25",et="_inputWarning_nec64_26",nt="_inputDisabled_nec64_61",tt="_hideScrollbars_nec64_67",rt="_trigger_nec64_77",at="_isInTable_nec64_93",it="_input_nec64_1",st="_isOpen_nec64_114",lt="_disabled_nec64_156",ot="_icons_nec64_162",ut="_clearAll_nec64_169",ct="_iconOpen_nec64_170",dt="_small_nec64_181",mt="_triggerInputContainer_nec64_189",pt="_right_nec64_198",ft="_multiOptions_nec64_211",gt="_multiOption_nec64_211",vt="_label_nec64_239",yt="_closeMultiOption_nec64_242",ht="_focus_nec64_253",St="_selectedSingleValue_nec64_257",bt="_placeHolder_nec64_258",_t="_groupOrderFirst_nec64_297",Tt="_groupOrderMiddle_nec64_298",Et="_groupOrderLast_nec64_302",It="_detailedLabel_nec64_307",N={inputInTable:Yn,error:Bn,warning:Zn,inputHover:Xn,inputFocus:Jn,inputError:Qn,inputWarning:et,inputDisabled:nt,hideScrollbars:tt,trigger:rt,isInTable:at,input:it,isOpen:st,disabled:lt,icons:ot,clearAll:ut,iconOpen:ct,small:dt,triggerInputContainer:mt,right:pt,multiOptions:ft,multiOption:gt,label:vt,closeMultiOption:yt,focus:ht,selectedSingleValue:St,placeHolder:bt,groupOrderFirst:_t,groupOrderMiddle:Tt,groupOrderLast:Et,detailedLabel:It},Fe=({selectedOptions:e,small:n,width:a,testId:d})=>{const c=Re(),[v,f]=q.useState([]),[s,o]=q.useState([]);return q.useEffect(()=>{let g=[],b=[],S=0;e.forEach((T,E)=>{S+=Kn(T,n,c),E===e.length-1&&S<a||S<a-24?g.push(T):b.push(T)}),f(g),o(b)},[e,c,a]),p.jsxs("div",{className:N.multiOptions,"data-testid":d&&`${d}-value`,children:[v.filter(g=>g&&g.label).map((g,b)=>p.jsx("span",{className:N.multiOption,onClick:S=>{S.stopPropagation()},children:g.label},b)),s.length>0&&p.jsx(me,{text:s.map((g,b)=>p.jsx("div",{children:g.label},b)),display:"inline-flex",children:p.jsx("span",{className:N.multiOption,children:v.length?`+${s.length}`:`${s.length} items`})})]})};Fe.__docgenInfo={description:"",methods:[],displayName:"MultiSelectedOptions",props:{selectedOptions:{required:!0,tsType:{name:"Array",elements:[{name:"ISelectSelectedOption"}],raw:"ISelectSelectedOption[]"},description:""},small:{required:!1,tsType:{name:"boolean"},description:""},width:{required:!0,tsType:{name:"number"},description:""},testId:{required:!1,tsType:{name:"string"},description:""}}};const je=({selectedOptions:e,searchable:n=!1,searchValue:a,onChange:d=()=>{},inputRef:c,error:v,placeholder:f="Select...",small:s,testId:o})=>{const g=q.useRef(null),b=Array.isArray(e),S=b?e.length>0:!!e,T=a?a.length+1:1,E=()=>{var l,i;const _=((l=g.current)==null?void 0:l.offsetWidth)||0,t=((i=c.current)==null?void 0:i.offsetWidth)||0;return _-t};return p.jsxs("div",{className:N.triggerInputContainer,ref:g,children:[S?b?p.jsx(Fe,{selectedOptions:e,small:s,width:E(),testId:o}):p.jsx("span",{className:N.selectedSingleValue,"data-testid":o&&`${o}-value`,children:a!=null&&a.length?"":e==null?void 0:e.label}):p.jsx("span",{className:N.placeHolder,children:a!=null&&a.length?"":f}),n?p.jsx("input",{tabIndex:-1,ref:c,size:T,className:U(N.input,v?N.error:""),value:a,onChange:_=>d(_.target.value),"data-testid":o&&`${o}-input`}):null]})};je.__docgenInfo={description:"",methods:[],displayName:"Input",props:{selectedOptions:{required:!1,tsType:{name:"union",raw:"ISelectSelectedOption | ISelectSelectedOption[]",elements:[{name:"ISelectSelectedOption"},{name:"Array",elements:[{name:"ISelectSelectedOption"}],raw:"ISelectSelectedOption[]"}]},description:""},searchable:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},searchValue:{required:!1,tsType:{name:"string"},description:""},inputRef:{required:!0,tsType:{name:"MutableRefObject",elements:[{name:"union",raw:"HTMLInputElement | null",elements:[{name:"HTMLInputElement"},{name:"null"}]}],raw:"MutableRefObject<HTMLInputElement | null>"},description:""},onChange:{required:!1,tsType:{name:"signature",type:"function",raw:"(value: string) => void",signature:{arguments:[{type:{name:"string"},name:"value"}],return:{name:"void"}}},description:"",defaultValue:{value:"() => {}",computed:!1}},error:{required:!1,tsType:{name:"union",raw:"string | ReactNode",elements:[{name:"string"},{name:"ReactNode"}]},description:""},placeholder:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:"",defaultValue:{value:"'Select...'",computed:!1}},small:{required:!1,tsType:{name:"boolean"},description:""},testId:{required:!1,tsType:{name:"string"},description:""}}};const He=({selectedOptions:e,searchValue:n,searchable:a,clearable:d,onClickTrigger:c,element:v,error:f,warning:s,tooltip:o,small:g,isInTable:b,disabled:S,onChangeSearch:T,onClickDeselect:E,onClickClear:_,tabIndex:t,isOpen:l,triggerRef:i,clearAllIsFocused:r,focusedSelectedOptionIndex:u,onFocus:m,onBlur:y,groupOrder:h,maxTooltipWidth:I,placeholder:L,right:R,testId:x})=>{var H;const[w,M]=we(),F=Array.isArray(e)?e.length>0&&((H=e[0])==null?void 0:H.value):e==null?void 0:e.value,A=d&&F,G=(()=>{if(h)switch(h){case ae.FIRST:return N.groupOrderFirst;case ae.LAST:return N.groupOrderLast;default:return N.groupOrderMiddle}return""})(),K=!Array.isArray(e)&&(e!=null&&e.details)?{...e,label:p.jsxs("div",{className:U(N.detailedLabel),children:[p.jsx(oe,{children:e.label}),p.jsx(oe,{muted:!0,children:e.details})]})}:e,$=p.jsxs(p.Fragment,{children:[v,p.jsxs("div",{ref:i,tabIndex:t,className:U(N.trigger,l?N.isOpen:"",f?N.error:s?N.warning:"",S?N.disabled:"",g?N.small:"",b?N.isInTable:"",R?N.right:"",G),onClick:P=>{P.stopPropagation(),typeof M=="function"&&M(),c(P)},onFocus:m,onBlur:y,"data-testid":x,children:[p.jsx(je,{selectedOptions:K,placeholder:L,searchable:a,searchValue:n,inputRef:w,onChange:T,error:f,small:g,testId:x}),p.jsx("span",{className:N.icons,children:A?p.jsx("span",{className:U(N.clearAll,r?N.focus:""),onClick:P=>{P.stopPropagation(),_&&_(P)},"data-testid":x&&`${x}-clear`,children:p.jsx(ue,{icon:Ee.CLOSE})}):p.jsx("span",{className:U(N.iconOpen),children:p.jsx(ue,{icon:"chevron down"})})})]})]});return p.jsx(p.Fragment,{children:p.jsx(me,{error:!!f,warning:!!s,text:o||f||s,enabled:o&&ne(o)||f&&ne(f)||s&&ne(s)||!1,maxWidth:I,placement:"bottom-center",children:$})})};He.__docgenInfo={description:"",methods:[],displayName:"Trigger",props:{selectedOptions:{required:!1,tsType:{name:"union",raw:"ISelectSelectedOption | ISelectSelectedOption[]",elements:[{name:"ISelectSelectedOption"},{name:"Array",elements:[{name:"ISelectSelectedOption"}],raw:"ISelectSelectedOption[]"}]},description:""},searchValue:{required:!1,tsType:{name:"string"},description:""},searchable:{required:!1,tsType:{name:"boolean"},description:""},clearable:{required:!1,tsType:{name:"boolean"},description:""},onClickTrigger:{required:!0,tsType:{name:"signature",type:"function",raw:"(evt: React.MouseEvent<HTMLDivElement, MouseEvent>) => void",signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLDivElement, MouseEvent>",elements:[{name:"HTMLDivElement"},{name:"MouseEvent"}]},name:"evt"}],return:{name:"void"}}},description:""},element:{required:!1,tsType:{name:"ReactNode"},description:""},error:{required:!1,tsType:{name:"union",raw:"string | ReactNode",elements:[{name:"string"},{name:"ReactNode"}]},description:""},warning:{required:!1,tsType:{name:"union",raw:"string | ReactNode",elements:[{name:"string"},{name:"ReactNode"}]},description:""},tooltip:{required:!1,tsType:{name:"union",raw:"string | ReactNode",elements:[{name:"string"},{name:"ReactNode"}]},description:""},small:{required:!1,tsType:{name:"boolean"},description:""},isInTable:{required:!1,tsType:{name:"boolean"},description:""},disabled:{required:!1,tsType:{name:"boolean"},description:""},onChangeSearch:{required:!1,tsType:{name:"signature",type:"function",raw:"(value: string) => void",signature:{arguments:[{type:{name:"string"},name:"value"}],return:{name:"void"}}},description:""},onClickDeselect:{required:!1,tsType:{name:"signature",type:"function",raw:"(evt: React.MouseEvent<HTMLDivElement, MouseEvent>) => void",signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLDivElement, MouseEvent>",elements:[{name:"HTMLDivElement"},{name:"MouseEvent"}]},name:"evt"}],return:{name:"void"}}},description:""},onClickClear:{required:!1,tsType:{name:"signature",type:"function",raw:"(evt: React.MouseEvent<HTMLSpanElement, MouseEvent>) => void",signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLSpanElement, MouseEvent>",elements:[{name:"HTMLSpanElement"},{name:"MouseEvent"}]},name:"evt"}],return:{name:"void"}}},description:""},tabIndex:{required:!1,tsType:{name:"number"},description:""},isOpen:{required:!1,tsType:{name:"boolean"},description:""},triggerRef:{required:!1,tsType:{name:"RefObject",elements:[{name:"HTMLDivElement"}],raw:"RefObject<HTMLDivElement>"},description:""},clearAllIsFocused:{required:!1,tsType:{name:"boolean"},description:""},focusedSelectedOptionIndex:{required:!1,tsType:{name:"number"},description:""},onFocus:{required:!1,tsType:{name:"signature",type:"function",raw:"(evt: React.FocusEvent<HTMLDivElement>) => void",signature:{arguments:[{type:{name:"ReactFocusEvent",raw:"React.FocusEvent<HTMLDivElement>",elements:[{name:"HTMLDivElement"}]},name:"evt"}],return:{name:"void"}}},description:""},onBlur:{required:!1,tsType:{name:"signature",type:"function",raw:"(evt: React.FocusEvent<HTMLDivElement>) => void",signature:{arguments:[{type:{name:"ReactFocusEvent",raw:"React.FocusEvent<HTMLDivElement>",elements:[{name:"HTMLDivElement"}]},name:"evt"}],return:{name:"void"}}},description:""},groupOrder:{required:!1,tsType:{name:"union",raw:"TGroupOrder | string",elements:[{name:"union",raw:"'first' | 'middle' | 'last'",elements:[{name:"literal",value:"'first'"},{name:"literal",value:"'middle'"},{name:"literal",value:"'last'"}]},{name:"string"}]},description:""},maxTooltipWidth:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""},placeholder:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:""},right:{required:!1,tsType:{name:"boolean"},description:""},testId:{required:!1,tsType:{name:"string"},description:""}}};var W=(e=>(e.SET_VISIBLE_OPTIONS="SET_VISIBLE_OPTIONS",e.RESET_LAYER_FOCUS="RESET_LAYER_FOCUS",e.CLEAR_SEARCH="CLEAR_SEARCH",e.ON_CHANGE_SEARCH="ON_CHANGE_SEARCH",e.FOCUS_TRIGGER_INPUTS="FOCUS_TRIGGER_INPUTS",e.BLUR_TRIGGER_INPUTS="BLUR_TRIGGER_INPUTS",e.FOCUS_LAYER_OPTIONS="FOCUS_LAYER_OPTIONS",e.OPEN_LAYER="OPEN_LAYER",e.CLOSE_LAYER="CLOSE_LAYER",e))(W||{});const Pe={options:["none","clearAll"],currentIndex:0,currentOption:!1,clearAll:!1},Ot=e=>e!==null?e+1:0,De=(e,n)=>{const a=["none",...e.map((c,v)=>c.type!==ie.HEADING?v:null).filter(c=>c!==null)],d=Ot(n);return{options:a,currentIndex:d,current:a[d]}},wt=(e,n)=>{const a=e==="up"?-1:1,d=n.currentIndex+a,c=(d<0?n.options.length-1:d)%n.options.length,v=n.options[c];return{...n,currentIndex:c,current:v}},Rt=(e,n,a)=>{const d=e==="left"?-1:1,c=n&&n.length?["none",...Array.from({length:n.length},(g,b)=>b),"clearAll"]:["none","clearAll"],v=a.currentIndex+d,f=(v<0?c.length-1:v)%c.length,s=c[f];return{options:c,currentIndex:f,currentOption:s,clearAll:s==="clearAll"}},_e=()=>Pe,Te=e=>({...e,currentIndex:0,current:"none"}),Lt=(e,n)=>{switch(n.type){case W.SET_VISIBLE_OPTIONS:return{...e,visibleOptions:n.options||[]};case W.RESET_LAYER_FOCUS:return{...e,layerFocus:De(n.options||[],n.firstSelectedOptionIndex||0)};case W.CLEAR_SEARCH:return{...e,visibleOptions:n.options||[],searchValue:""};case W.ON_CHANGE_SEARCH:{let d=[...(n.options||[]).filter(c=>(String(c.label)+(c.details?String(c.details):"")).toLowerCase().includes(String(n.value||"").toLowerCase()))];return n.createAble&&n.value&&n.value!==""&&d.push({label:`Create "${n.value}"`,value:n.value,createAble:!0}),{...e,searchValue:n.value,visibleOptions:d,layerFocus:Te(e.layerFocus)}}case W.FOCUS_TRIGGER_INPUTS:return{...e,triggerFocus:Rt(n.direction||"right",n.selectedOptions||[],e.triggerFocus),layerFocus:Te(e.layerFocus)};case W.BLUR_TRIGGER_INPUTS:return{...e,triggerFocus:_e()};case W.FOCUS_LAYER_OPTIONS:return n.nextLayerFocus?{...e,layerFocus:n.nextLayerFocus,triggerFocus:_e()}:e;case W.OPEN_LAYER:return{...e,isLayerOpen:!0};case W.CLOSE_LAYER:return{...e,isLayerOpen:!1};default:return e}},xt={auto:!0,possiblePlacements:["bottom-start","top-start"],placement:"bottom-start",preferX:"right",preferY:"bottom"};var D=(e=>(e.CLOSE_LAYER="CLOSE_LAYER",e.OPEN_LAYER="OPEN_LAYER",e.SET_VISIBLE_OPTIONS="SET_VISIBLE_OPTIONS",e.CLEAR_SEARCH="CLEAR_SEARCH",e.RESET_LAYER_FOCUS="RESET_LAYER_FOCUS",e.FOCUS_LAYER_OPTIONS="FOCUS_LAYER_OPTIONS",e.BLUR_TRIGGER_INPUTS="BLUR_TRIGGER_INPUTS",e.FOCUS_TRIGGER_INPUTS="FOCUS_TRIGGER_INPUTS",e.ON_CHANGE_SEARCH="ON_CHANGE_SEARCH",e))(D||{}),V=(e=>(e.RIGHT="right",e.LEFT="left",e.UP="up",e.DOWN="down",e.ENTER="enter",e.ESC="esc",e.TAB="tab",e))(V||{});const Ct=({state:e,dispatch:n,options:a,setTriggerFocus:d,disabled:c,disabledContext:v,onCreate:f,onChange:s,selectedOptions:o,width:g,small:b,isFontLoaded:S,placeholder:T,firstSelectedOptionIndex:E,createAble:_,listRef:t,autoLayerWidth:l})=>{const i=()=>{e.isLayerOpen&&n({type:D.CLOSE_LAYER}),d()},r=()=>n({type:D.OPEN_LAYER}),u=q.useRef(!0);q.useEffect(()=>{u.current?u.current=!1:n({type:D.SET_VISIBLE_OPTIONS,options:a})},[a]);const m=(O,C,Q)=>{if(!(c||v)){if(Q&&Q(),C){if(C.createAble&&f)f(C.value);else if(!C.disabled)if(Array.isArray(o))if(o.some(B=>B.label===C.label)){const B=o.filter(pe=>pe.label!==C.label);s&&s(O,B)}else{const B=[...o,C];s&&s(O,B)}else s&&s(O,C)}n({type:D.CLEAR_SEARCH,options:a}),d()}},y=q.useCallback(()=>g?g!=="auto"?g:be(a,b,S,T):"100%",[a,S]),h=q.useCallback(O=>l?Math.max(be(a,b,S,T),O==null?void 0:O.width):O==null?void 0:O.width,[a,S]),{renderLayer:I,layerProps:L,triggerProps:R,triggerBounds:x}=We({isOpen:(e==null?void 0:e.isLayerOpen)??!1,overflowContainer:!0,...xt,ResizeObserver,onOutsideClick:i,onParentClose:i}),w=()=>{if(!(c||v)){if(e.isLayerOpen){i();return}n({type:D.RESET_LAYER_FOCUS,options:a,firstSelectedOptionIndex:E}),r()}},M=q.useRef(!0);q.useEffect(()=>{M.current?M.current=!1:e.isLayerOpen||n({type:D.CLEAR_SEARCH,options:a})},[e.isLayerOpen]);const F=(O,C)=>{const Q=o instanceof Array?o.filter(Y=>Y.value!==C.value):null;s&&s(O,Q)},A=O=>{const C=o instanceof Array?[]:{value:null};s&&s(O,C)},G=O=>n({type:D.ON_CHANGE_SEARCH,options:a,value:O,createAble:_}),K=()=>{r(),n({type:D.BLUR_TRIGGER_INPUTS})},$=O=>{t.current&&Number.isInteger(O)&&t.current.scrollToItem(O)},H=O=>{const C=wt(O,e.layerFocus);n({type:D.FOCUS_LAYER_OPTIONS,nextLayerFocus:C}),$(C.current)},P=O=>{n({type:D.FOCUS_TRIGGER_INPUTS,ICustomSelectDirection:O,selectedOptions:o})},Z=O=>A(O),te=o&&o[e.triggerFocus.currentOption],re=O=>{F(O,o[e.triggerFocus.currentOption])},X=O=>{var C;m(O,(C=e==null?void 0:e.visibleOptions)==null?void 0:C[e.layerFocus.current],i)},k=e.triggerFocus.clearAll;return{getTriggerWidth:y,onKeyEvent:(O,C)=>{switch(O){case V.UP:{H(O);break}case V.DOWN:{e.isLayerOpen?H(O):K();break}case V.LEFT:case V.RIGHT:{P(O);break}case V.ENTER:{k?Z(C):te?re(C):X(C);break}case V.ESC:{i();break}}},clearAllIsFocused:k,triggerProps:R,onClickTrigger:w,onChangeSearch:G,onClickDeselectOption:F,onClickClearAll:A,renderLayer:I,layerProps:L,closeLayer:i,onSelectOption:m,getLayerWidth:h,triggerBounds:x}},ke=e=>{const{multi:n=!1,disabled:a=!1,error:d=null,warning:c=null,tooltip:v=null,options:f,selectedOptions:s,onCreate:o=null,placeholder:g="",small:b=!1,tabIndex:S=0,onFocus:T=()=>{},onBlur:E=()=>{},searchable:_=!0,clearable:t=!1,maxTooltipWidth:l,closeOnOptionActionClick:i,isInTable:r=!1,groupOrder:u,firstSelectedOptionIndex:m=0,right:y=!1,testId:h=void 0}=e,I=q.useContext(de),L=o!==null,R=q.useRef(null),[x,w]=we(),M=Re(),[F,A]=q.useReducer(Lt,{options:f,firstSelectedOptionIndex:m},({options:Y})=>({searchValue:"",visibleOptions:Y,layerFocus:De(Y,m??0),triggerFocus:Pe,isLayerOpen:!1})),{getTriggerWidth:G,onKeyEvent:K,clearAllIsFocused:$,triggerProps:H,onClickTrigger:P,onChangeSearch:Z,onClickDeselectOption:te,onClickClearAll:re,renderLayer:X,layerProps:k,closeLayer:J,onSelectOption:O,getLayerWidth:C,triggerBounds:Q}=Ct({...e,state:F,dispatch:A,setTriggerFocus:w,disabledContext:I,isFontLoaded:M,createAble:L,listRef:R});return p.jsx("div",{style:{width:G()},children:p.jsxs(fn,{handleKeys:Object.values(V),onKeyEvent:K,children:[p.jsx(He,{selectedOptions:s,searchValue:F.searchValue,isOpen:F.isLayerOpen,focusedSelectedOptionIndex:F.triggerFocus.currentOption,clearAllIsFocused:$,searchable:_,triggerRef:Ue(x,H.ref),error:d,warning:c,tooltip:v,small:b,isInTable:r,disabled:a||I,clearable:t,tabIndex:S,onClickTrigger:P,onChangeSearch:Z,onClickDeselect:te,onClickClear:re,onFocus:T,onBlur:E,groupOrder:u,maxTooltipWidth:l,placeholder:g,right:y,testId:h}),F.isLayerOpen&&X(p.jsx("div",{...k,className:j.layerContainer,children:p.jsx(Ae,{listRef:R,isMulti:n,sections:F.visibleOptions,selectedOptions:s,onSelectOption:(Y,B)=>{O(Y,B,n?void 0:J)},closeLayer:()=>{i&&J()},width:C(Q),small:b,focusedOptionIndex:F.layerFocus.current,firstSelectedOptionIndex:m??0,testId:h&&`${h}-layer`})}))]})})};ke.__docgenInfo={description:"",methods:[],displayName:"CustomSelect",props:{multi:{required:!1,tsType:{name:"boolean"},description:""},disabled:{required:!1,tsType:{name:"boolean"},description:""},error:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | ReactNode",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactNode"}]},description:""},warning:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | ReactNode",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactNode"}]},description:""},tooltip:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | ReactNode",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactNode"}]},description:""},options:{required:!0,tsType:{name:"Array",elements:[{name:"union",raw:"ISelectSelectedOption | Heading",elements:[{name:"ISelectSelectedOption"},{name:"Heading"}]}],raw:"TCustomSelectSelectOption[]"},description:""},selectedOptions:{required:!0,tsType:{name:"union",raw:"ISelectSelectedOption | ISelectSelectedOption[]",elements:[{name:"ISelectSelectedOption"},{name:"Array",elements:[{name:"ISelectSelectedOption"}],raw:"ISelectSelectedOption[]"}]},description:""},onChange:{required:!1,tsType:{name:"signature",type:"function",raw:`(
38
+ evt: ChangeEvent<HTMLInputElement>,
39
+ newSelectedOptions: ISelectSelectedOption,
40
+ ) => void`,signature:{arguments:[{type:{name:"ChangeEvent",elements:[{name:"HTMLInputElement"}],raw:"ChangeEvent<HTMLInputElement>"},name:"evt"},{type:{name:"ISelectSelectedOption"},name:"newSelectedOptions"}],return:{name:"void"}}},description:""},onCreate:{required:!1,tsType:{name:"signature",type:"function",raw:"(value: string) => void",signature:{arguments:[{type:{name:"string"},name:"value"}],return:{name:"void"}}},description:""},placeholder:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:""},small:{required:!1,tsType:{name:"boolean"},description:""},tabIndex:{required:!1,tsType:{name:"number"},description:""},width:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | null",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"null"}]},description:""},autoLayerWidth:{required:!1,tsType:{name:"boolean"},description:""},onFocus:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},onBlur:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},searchable:{required:!1,tsType:{name:"boolean"},description:""},clearable:{required:!1,tsType:{name:"boolean"},description:""},isInTable:{required:!1,tsType:{name:"boolean"},description:""},groupOrder:{required:!1,tsType:{name:"union",raw:"TGroupOrder | string",elements:[{name:"union",raw:"'first' | 'middle' | 'last'",elements:[{name:"literal",value:"'first'"},{name:"literal",value:"'middle'"},{name:"literal",value:"'last'"}]},{name:"string"}]},description:""},firstSelectedOptionIndex:{required:!0,tsType:{name:"union",raw:"number | null",elements:[{name:"number"},{name:"null"}]},description:""},right:{required:!1,tsType:{name:"boolean"},description:""},maxTooltipWidth:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""},closeOnOptionActionClick:{required:!1,tsType:{name:"boolean"},description:""},testId:{required:!1,tsType:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}]},description:""}}};const Mt=e=>{const{name:n="",options:a=[],value:d,native:c=!1,onChange:v=()=>{},deprecatedEventHandler:f=!1,autoScroll:s=!0,warning:o,error:g,checkNonExistentValues:b=!0,closeOnOptionActionClick:S=!0,testId:T,disabled:E}=e,_=!c&&s===!0,{multi:t,simpleInputs:l,options:i,selectedOptions:r,firstSelectedOptionIndex:u,hasNonExistentValue:m}=Ye(a,d,_,b),y=!t,h=c&&y;c&&!y&&console.warn("Native select does not support provided props (see stories)");const I="Value no longer available for re-selection",L=m&&!E?o?p.jsxs("div",{children:[p.jsx("div",{children:I}),p.jsx("div",{children:o})]}):I:o,R=m&&g&&!E?p.jsxs("div",{children:[p.jsx("div",{children:I}),p.jsx("div",{children:g})]}):g,x=(w,M)=>{if(f){const F=t?M.map(A=>l?A.value:A):l?M.value:M;v(F)}else{const F=!(w instanceof Event),A=t?M:M.value;F?(w.target.name=n,w.target.value=A,t||(w.target.label=M.label),v(w)):v({...w,target:{...w.target,name:n,value:A,...!t&&{label:M.label}}})}};return h?p.jsx(Ie,{...e,options:i,selectedOption:r,onChange:x,hasNonExistentValue:m,warning:L,error:R,testId:T}):p.jsx(ke,{...e,options:i,selectedOptions:r,onChange:x,multi:t,firstSelectedOptionIndex:u,warning:L,error:R,testId:T,closeOnOptionActionClick:S})};Mt.__docgenInfo={description:"",methods:[],displayName:"Select",props:{name:{required:!1,tsType:{name:"string"},description:""},multi:{required:!1,tsType:{name:"boolean"},description:""},options:{required:!1,tsType:{name:"Array",elements:[{name:"ISelectSelectedOption"}],raw:"ISelectSelectedOption[]"},description:""},value:{required:!1,tsType:{name:"any"},description:""},native:{required:!1,tsType:{name:"boolean"},description:""},onChange:{required:!1,tsType:{name:"signature",type:"function",raw:"(value: any) => void",signature:{arguments:[{type:{name:"any"},name:"value"}],return:{name:"void"}}},description:""},deprecatedEventHandler:{required:!1,tsType:{name:"boolean"},description:""},autoScroll:{required:!1,tsType:{name:"boolean"},description:""},warning:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | ReactNode",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactNode"}]},description:""},error:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | ReactNode",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactNode"}]},description:""},checkNonExistentValues:{required:!1,tsType:{name:"boolean"},description:""},closeOnOptionActionClick:{required:!1,tsType:{name:"boolean"},description:""},small:{required:!1,tsType:{name:"boolean"},description:""},width:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | null",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"null"}]},description:""},borderRadius:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""},onCreate:{required:!1,tsType:{name:"signature",type:"function",raw:"(evt: any) => any",signature:{arguments:[{type:{name:"any"},name:"evt"}],return:{name:"any"}}},description:""},disabled:{required:!1,tsType:{name:"boolean"},description:""},placeholder:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:""},isInTable:{required:!1,tsType:{name:"boolean"},description:""},clearable:{required:!1,tsType:{name:"boolean"},description:""},searchable:{required:!1,tsType:{name:"boolean"},description:""},maxTooltipWidth:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""},autoLayerWidth:{required:!1,tsType:{name:"boolean"},description:""},right:{required:!1,tsType:{name:"boolean"},description:""},tabIndex:{required:!1,tsType:{name:"number"},description:""},testId:{required:!1,tsType:{name:"string"},description:""}}};export{V as E,fn as K,Mt as S};