@feathery/react 2.48.1 → 2.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/cjs/Form/grid/Container/index.d.ts.map +1 -1
  2. package/cjs/Form/grid/StyledContainer/utils.d.ts.map +1 -1
  3. package/cjs/elements/basic/ButtonElement.d.ts.map +1 -1
  4. package/cjs/elements/basic/TableElement/EditableCell.d.ts +5 -2
  5. package/cjs/elements/basic/TableElement/EditableCell.d.ts.map +1 -1
  6. package/cjs/elements/basic/TableElement/index.d.ts.map +1 -1
  7. package/cjs/elements/basic/TableElement/styles.d.ts +0 -23
  8. package/cjs/elements/basic/TableElement/styles.d.ts.map +1 -1
  9. package/cjs/elements/basic/TableElement/types.d.ts +4 -0
  10. package/cjs/elements/basic/TableElement/types.d.ts.map +1 -1
  11. package/cjs/elements/basic/TableElement/useTableMutations.d.ts +0 -1
  12. package/cjs/elements/basic/TableElement/useTableMutations.d.ts.map +1 -1
  13. package/cjs/elements/basic/TableElement/utils.d.ts +14 -0
  14. package/cjs/elements/basic/TableElement/utils.d.ts.map +1 -1
  15. package/cjs/elements/components/HoverTooltip.d.ts +24 -0
  16. package/cjs/elements/components/HoverTooltip.d.ts.map +1 -0
  17. package/cjs/elements/components/InlineTooltip.d.ts.map +1 -1
  18. package/cjs/elements/components/Overlay.d.ts +1 -1
  19. package/cjs/elements/components/Overlay.d.ts.map +1 -1
  20. package/cjs/elements/components/QuikFormViewer.d.ts.map +1 -1
  21. package/cjs/elements/components/TextHoverTooltip.d.ts.map +1 -1
  22. package/cjs/elements/components/Tooltip.d.ts +2 -1
  23. package/cjs/elements/components/Tooltip.d.ts.map +1 -1
  24. package/cjs/{fthry_AssistantChat.BjyKdtNo.js → fthry_AssistantChat.BT32wDG3.js} +4 -4
  25. package/cjs/{fthry_FormControl.Bjj4gcfs.js → fthry_FormControl.D4ekieUI.js} +1 -1
  26. package/cjs/{fthry_InlineTooltip.D5tgdB4g.js → fthry_InlineTooltip.D5NfxKVo.js} +2 -16
  27. package/cjs/{fthry_PaymentMethodField.Cx5IV_Aw.js → fthry_PaymentMethodField.vpxb_M9_.js} +3 -4
  28. package/cjs/{fthry_Placeholder.BeZ9F1hP.js → fthry_Placeholder.hq6Cgqjd.js} +1 -1
  29. package/cjs/{fthry_ShowEyeIcon.DO1SzK0H.js → fthry_ShowEyeIcon.C-wsnI6q.js} +1 -1
  30. package/cjs/{fthry_TabsElement.C1KUbyBb.js → fthry_TabsElement.BHVCgyd9.js} +1 -1
  31. package/cjs/{fthry_auto-track.CJBR_dw-.js → fthry_auto-track.g9k-T7sJ.js} +2 -2
  32. package/cjs/{fthry_highlighted-body-TPN3WLV5.BdAGVyam.js → fthry_highlighted-body-TPN3WLV5.CaePR3vZ.js} +3 -3
  33. package/cjs/{fthry_index.C0KW8hya.js → fthry_index.B5pgafIl.js} +2 -2
  34. package/cjs/{fthry_index.BpZi8dM4.js → fthry_index.BDV7qf2C.js} +5 -6
  35. package/cjs/{fthry_index.BhoKqCQO.js → fthry_index.BLKRQSHw.js} +2 -2
  36. package/cjs/{fthry_index.BWAq_scB.js → fthry_index.BcQE05aQ.js} +2 -2
  37. package/cjs/{fthry_index.C78x3b5O.js → fthry_index.BdAvU9aA.js} +5 -6
  38. package/cjs/{fthry_index.6SblfScs.js → fthry_index.BdOfkVzz.js} +2 -2
  39. package/cjs/{fthry_index.CjM_QMbB.js → fthry_index.BfD3esIa.js} +2 -2
  40. package/cjs/{fthry_index.BvriCG1q.js → fthry_index.BiCUy3Q2.js} +1 -1
  41. package/cjs/{fthry_index.CwpWkape.js → fthry_index.BldM4IKR.js} +343 -52
  42. package/cjs/{fthry_index.DRA1vbTd.js → fthry_index.ByQJ8Db5.js} +10 -10
  43. package/cjs/{fthry_index.97eysi95.js → fthry_index.C6YeHjI_.js} +5 -6
  44. package/cjs/{fthry_index.CqC7Lj7F.js → fthry_index.CNXv_44w.js} +5 -6
  45. package/cjs/{fthry_index.BOexWQ2G.js → fthry_index.COg3w9c8.js} +1 -1
  46. package/cjs/{fthry_index.CU2qYyyW.js → fthry_index.CSq9ML1V.js} +2 -2
  47. package/cjs/{fthry_index.B1e00tAu.js → fthry_index.CW8fXwgP.js} +6 -7
  48. package/cjs/{fthry_index.CeWHxiu2.js → fthry_index.CX5Tx1di.js} +3 -4
  49. package/cjs/{fthry_index.CGzU2RS3.js → fthry_index.Cb-o7T3I.js} +1 -1
  50. package/cjs/{fthry_index.DghgxDID.js → fthry_index.ClbpUjqu.js} +8 -9
  51. package/cjs/{fthry_index.DyPl9RTy.js → fthry_index.Cn-052XC.js} +1 -1
  52. package/cjs/{fthry_index.Bkg_JW4Z.js → fthry_index.D3svtoqj.js} +4 -5
  53. package/cjs/{fthry_index.BbZu0dS9.js → fthry_index.D42pyZzz.js} +3 -4
  54. package/cjs/{fthry_index.WdgJ-r5S.js → fthry_index.DAY5VW01.js} +5 -6
  55. package/cjs/{fthry_index.SMUP75Ic.js → fthry_index.DgVU5DPg.js} +3 -3
  56. package/cjs/{fthry_index.O5z58cdJ.js → fthry_index.DjKuHZML.js} +4 -5
  57. package/cjs/{fthry_index.duLdHjUv.js → fthry_index.DpQfBE8n.js} +151 -141
  58. package/cjs/{fthry_index.B3VA122M.js → fthry_index.DqCigvUs.js} +1 -1
  59. package/cjs/{fthry_index.foJzYyYX.js → fthry_index.QAttsABq.js} +1 -1
  60. package/cjs/{fthry_index.CeKZIDEV.js → fthry_index.QRzfI0b4.js} +3 -18
  61. package/cjs/{fthry_index.ycfNh9WZ.js → fthry_index.m_XKSVM8.js} +1 -1
  62. package/cjs/{fthry_index.Dhp1zjHK.js → fthry_index.s2Ah9v4O.js} +1 -1
  63. package/cjs/{fthry_index.CRXRQpkJ.js → fthry_index.u0sKUa7-.js} +1 -1
  64. package/cjs/{fthry_index.umd.B7oz9tEv.js → fthry_index.umd.Cl6yVNEY.js} +1 -1
  65. package/cjs/{fthry_input.BFEJqFg2.js → fthry_input.CzTMRvUa.js} +1 -1
  66. package/cjs/{fthry_mermaid-O7DHMXV3.-sm2XLZv.js → fthry_mermaid-O7DHMXV3.1Tp00mbG.js} +3 -3
  67. package/cjs/{fthry_script.CrJCYCaD.js → fthry_script.B2r1qN9_.js} +1 -1
  68. package/cjs/{fthry_styles.CBI9OfcR.js → fthry_styles.BcMEcBUF.js} +1 -1
  69. package/cjs/{fthry_useElementSize.Dq3fkD_k.js → fthry_useElementSize.91AcUxkY.js} +1 -1
  70. package/cjs/{fthry_useSalesforceSync.DkO47B4_.js → fthry_useSalesforceSync.BQORLqHu.js} +1 -1
  71. package/cjs/{fthry_webfontloader.BbP2ET0j.js → fthry_webfontloader.DbJc3-T2.js} +1 -1
  72. package/cjs/index.js +1 -1
  73. package/cjs/thumbnail-renderer.js +1 -1
  74. package/cjs/types/Form.d.ts +3 -0
  75. package/cjs/types/Form.d.ts.map +1 -1
  76. package/cjs/utils/featheryClient/index.d.ts.map +1 -1
  77. package/dist/Form/grid/Container/index.d.ts.map +1 -1
  78. package/dist/Form/grid/StyledContainer/utils.d.ts.map +1 -1
  79. package/dist/elements/basic/ButtonElement.d.ts.map +1 -1
  80. package/dist/elements/basic/TableElement/EditableCell.d.ts +5 -2
  81. package/dist/elements/basic/TableElement/EditableCell.d.ts.map +1 -1
  82. package/dist/elements/basic/TableElement/index.d.ts.map +1 -1
  83. package/dist/elements/basic/TableElement/styles.d.ts +0 -23
  84. package/dist/elements/basic/TableElement/styles.d.ts.map +1 -1
  85. package/dist/elements/basic/TableElement/tests/EditableCell.spec.d.ts +2 -0
  86. package/dist/elements/basic/TableElement/tests/EditableCell.spec.d.ts.map +1 -0
  87. package/dist/elements/basic/TableElement/tests/TableElement.spec.d.ts +2 -0
  88. package/dist/elements/basic/TableElement/tests/TableElement.spec.d.ts.map +1 -0
  89. package/dist/elements/basic/TableElement/tests/tabNavigation.spec.d.ts +2 -0
  90. package/dist/elements/basic/TableElement/tests/tabNavigation.spec.d.ts.map +1 -0
  91. package/dist/elements/basic/TableElement/types.d.ts +4 -0
  92. package/dist/elements/basic/TableElement/types.d.ts.map +1 -1
  93. package/dist/elements/basic/TableElement/useTableMutations.d.ts +0 -1
  94. package/dist/elements/basic/TableElement/useTableMutations.d.ts.map +1 -1
  95. package/dist/elements/basic/TableElement/utils.d.ts +14 -0
  96. package/dist/elements/basic/TableElement/utils.d.ts.map +1 -1
  97. package/dist/elements/components/HoverTooltip.d.ts +24 -0
  98. package/dist/elements/components/HoverTooltip.d.ts.map +1 -0
  99. package/dist/elements/components/InlineTooltip.d.ts.map +1 -1
  100. package/dist/elements/components/Overlay.d.ts +1 -1
  101. package/dist/elements/components/Overlay.d.ts.map +1 -1
  102. package/dist/elements/components/QuikFormViewer.d.ts.map +1 -1
  103. package/dist/elements/components/TextHoverTooltip.d.ts.map +1 -1
  104. package/dist/elements/components/Tooltip.d.ts +2 -1
  105. package/dist/elements/components/Tooltip.d.ts.map +1 -1
  106. package/dist/{fthry_AssistantChat.h6NTcnjr.js → fthry_AssistantChat.BxCe9PjE.js} +4 -4
  107. package/dist/{fthry_FormControl.DQP6LlCL.js → fthry_FormControl.BpMXWUv6.js} +1 -1
  108. package/dist/{fthry_InlineTooltip.DUtqoLti.js → fthry_InlineTooltip.Brp4oi0p.js} +2 -16
  109. package/dist/{fthry_PaymentMethodField.DoX9prJ2.js → fthry_PaymentMethodField.0oIU1B6N.js} +3 -4
  110. package/dist/{fthry_Placeholder.DIKXUrCe.js → fthry_Placeholder.CEPxPTLL.js} +1 -1
  111. package/dist/{fthry_ShowEyeIcon.BsDiRWJb.js → fthry_ShowEyeIcon.BWU3OOxh.js} +1 -1
  112. package/dist/{fthry_TabsElement.JCYNaBSd.js → fthry_TabsElement.DFuHUYUv.js} +1 -1
  113. package/dist/{fthry_auto-track.CZcLqilZ.js → fthry_auto-track.CizHo0k5.js} +2 -2
  114. package/dist/{fthry_highlighted-body-TPN3WLV5.DwNcoR0j.js → fthry_highlighted-body-TPN3WLV5.DDCKzqBt.js} +3 -3
  115. package/dist/{fthry_index.BD5OtLZc.js → fthry_index.-GpsDCwK.js} +3 -4
  116. package/dist/{fthry_index.mEvi-eyb.js → fthry_index.6wMTFMTj.js} +152 -142
  117. package/dist/{fthry_index.BKjEGHR_.js → fthry_index.BDSy9TBV.js} +4 -5
  118. package/dist/{fthry_index.BXqHrLYx.js → fthry_index.BeEYTrUw.js} +2 -2
  119. package/dist/{fthry_index.D48zqV-m.js → fthry_index.Bmr2qAQ9.js} +1 -1
  120. package/dist/{fthry_index.INdwJAsd.js → fthry_index.Bn_DZ8s-.js} +2 -2
  121. package/dist/{fthry_index.k3Hq7wKG.js → fthry_index.Bs0b7fF8.js} +1 -1
  122. package/dist/{fthry_index.C9bj3Amt.js → fthry_index.ByfmNWHm.js} +2 -2
  123. package/dist/{fthry_index.BFPFVaWv.js → fthry_index.C-3BwV3D.js} +1 -1
  124. package/dist/{fthry_index.dmme1I7g.js → fthry_index.CEFYX7Cb.js} +1 -1
  125. package/dist/{fthry_index.D9kooW59.js → fthry_index.CKyEKNhB.js} +3 -4
  126. package/dist/{fthry_index.BkzGvVg2.js → fthry_index.CV6KaQP2.js} +3 -18
  127. package/dist/{fthry_index.KFRNwcZ_.js → fthry_index.CXvBwACd.js} +1 -1
  128. package/dist/{fthry_index.CHb07pX6.js → fthry_index.CgeOgf6v.js} +7 -8
  129. package/dist/{fthry_index.C2QdbMzv.js → fthry_index.Cl0vinm2.js} +2 -2
  130. package/dist/{fthry_index.BgCJlRTN.js → fthry_index.DD4JAsd0.js} +3 -3
  131. package/dist/{fthry_index.DHIhJeBb.js → fthry_index.DF33pFg0.js} +2 -2
  132. package/dist/{fthry_index.CPrLJ4J-.js → fthry_index.DZYRCGrF.js} +5 -6
  133. package/dist/{fthry_index.CuFf_oA3.js → fthry_index.DjeCrTPA.js} +1 -1
  134. package/dist/{fthry_index.Bl_YFFMi.js → fthry_index.DkB3n_gE.js} +4 -5
  135. package/dist/{fthry_index.Bfo0vjcQ.js → fthry_index.DtEJ8UnC.js} +4 -5
  136. package/dist/{fthry_index.DW4ZEycb.js → fthry_index.DuFXqlIh.js} +4 -5
  137. package/dist/{fthry_index.CCyrVDsN.js → fthry_index.Gk4XHc2v.js} +4 -5
  138. package/dist/{fthry_index.DNmwwxoZ.js → fthry_index.HfY_xMXi.js} +10 -10
  139. package/dist/{fthry_index.DZPtLmTA.js → fthry_index.Tz4wWr5G.js} +5 -6
  140. package/dist/{fthry_index.B21PnTei.js → fthry_index.UaQC1EFo.js} +341 -53
  141. package/dist/{fthry_index.B4uTV15J.js → fthry_index.UqBNOqYF.js} +1 -1
  142. package/dist/{fthry_index.C75qxU8Z.js → fthry_index.X-5RnKbv.js} +1 -1
  143. package/dist/{fthry_index.By9XI2Se.js → fthry_index.caHStIvy.js} +1 -1
  144. package/dist/{fthry_index.Br_wsbaD.js → fthry_index.l3GNavsZ.js} +5 -6
  145. package/dist/{fthry_index.umd.CNiEdJLO.js → fthry_index.umd.zD2ytPrK.js} +1 -1
  146. package/dist/{fthry_index.B03qg4WP.js → fthry_index.wOe1Wv1J.js} +2 -2
  147. package/dist/{fthry_input.C13Hy41e.js → fthry_input.vNAUHsdE.js} +1 -1
  148. package/dist/fthry_mermaid-O7DHMXV3.C6znNgyC.js +8 -0
  149. package/dist/{fthry_script.DG-h2qqu.js → fthry_script.ClnRFan9.js} +1 -1
  150. package/dist/{fthry_styles.BbfFntw_.js → fthry_styles.NzBPYPQ9.js} +1 -1
  151. package/dist/{fthry_useElementSize.Bvu4QN6c.js → fthry_useElementSize.CGVQMCbV.js} +1 -1
  152. package/dist/{fthry_useSalesforceSync.DxPyrYOH.js → fthry_useSalesforceSync.DDPGKOl4.js} +1 -1
  153. package/dist/{fthry_webfontloader.BZH4UrSE.js → fthry_webfontloader.BY0qufCl.js} +1 -1
  154. package/dist/index.js +2 -2
  155. package/dist/thumbnail-renderer.js +1 -1
  156. package/dist/types/Form.d.ts +3 -0
  157. package/dist/types/Form.d.ts.map +1 -1
  158. package/dist/utils/featheryClient/index.d.ts.map +1 -1
  159. package/package.json +1 -1
  160. package/umd/AddressField.4a4788a40afba5fc22d2.js +1 -0
  161. package/umd/ButtonGroupField.fcf087a9664e14da7fc5.js +1 -0
  162. package/umd/CheckboxGroupField.7b055043cbd1ef8b3787.js +1 -0
  163. package/umd/DateSelectorField.b87988253da02a40c6f7.js +1 -0
  164. package/umd/DropdownField.459ba798e2ff6a8518c2.js +1 -0
  165. package/umd/DropdownMultiField.ad59b04c5e3c1ad1a6e8.js +1 -0
  166. package/umd/MatrixField.6541a0f9570b2c56e336.js +1 -0
  167. package/umd/PasswordField.fb8f587107389274112e.js +1 -0
  168. package/umd/PaymentMethodField.f6820da8252bb2eed6b1.js +1 -0
  169. package/umd/PhoneField.a161db93d8f815ced395.js +1 -0
  170. package/umd/RadioButtonGroupField.9a43334b87129e33afd2.js +1 -0
  171. package/umd/TableElement.f51ba6d3b0a6c7835187.js +1 -0
  172. package/umd/TextArea.8341b3d302383a53175d.js +1 -0
  173. package/umd/TextField.fa9f11c4b1fab1747ae1.js +1 -0
  174. package/umd/index.js +1 -1
  175. package/cjs/fthry_Overlay.DLteVVAy.js +0 -231
  176. package/dist/fthry_Overlay.DjQfEgir.js +0 -228
  177. package/dist/fthry_mermaid-O7DHMXV3.rQggAcUJ.js +0 -8
  178. package/umd/277.1a33ea06f86326613fcb.js +0 -1
  179. package/umd/664.4a3ec465094a3d59c184.js +0 -1
  180. package/umd/AddressField.648b3da916171008dc9f.js +0 -1
  181. package/umd/ButtonGroupField.d39ac976a6dee9ef593a.js +0 -1
  182. package/umd/CheckboxGroupField.e495eb152c4faa000d4b.js +0 -1
  183. package/umd/DateSelectorField.e702b3e6b0a5b498c824.js +0 -1
  184. package/umd/DropdownField.d1a234d236d9989bbf20.js +0 -1
  185. package/umd/DropdownMultiField.5b4e24025035f1678c83.js +0 -1
  186. package/umd/MatrixField.bcd6f58ea1896f386988.js +0 -1
  187. package/umd/PasswordField.593d7b7d3d954634fa30.js +0 -1
  188. package/umd/PaymentMethodField.8e4fd6353793eaaa2b5b.js +0 -1
  189. package/umd/PhoneField.861b99c7e81b4b9c8648.js +0 -1
  190. package/umd/RadioButtonGroupField.7a333a6f7e578a181a98.js +0 -1
  191. package/umd/TableElement.8c0bec8400517f135fe6.js +0 -1
  192. package/umd/TextArea.04335be4f0f0d6c0cc1a.js +0 -1
  193. package/umd/TextField.749931ebb258bf38e007.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[844],{5983:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ct});var n=r(35944),o=r(67294),a=r(20426),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},l="#ffffff",c="#f9fafb",s="#f3f4f6",u="#e5e7eb",d="#d1d5db",f="#9ca3af",p="#4b5563",h="#111827",g="#1d4ed8",v="#ef4444",b="#dc2626",y={width:"16px",height:"16px",color:"#6b7280"},m={display:"flex",flexDirection:"column",gap:"2px","& svg":{marginInlineStart:"4px",width:"20px",height:"20px"}},x={width:"12px",height:"12px",color:f,opacity:.3,'&[data-active="true"]':{color:g,opacity:1}},w={display:"flex",alignItems:"center",gap:"8px"},C={position:"relative",overflowX:"auto",overflowY:"auto",backgroundColor:l,boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",borderRadius:"8px",border:"1px solid ".concat(u),minWidth:"100%",maxWidth:"100%",height:"100%",boxSizing:"border-box"},k={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"64px 24px",textAlign:"center"},S={color:p,fontSize:"16px",fontWeight:"500",margin:0},Z={position:"relative",flex:1},R={position:"absolute",top:0,bottom:0,left:0,display:"flex",alignItems:"center",paddingLeft:"12px",pointerEvents:"none"},P={display:"block",width:"100%",maxWidth:"384px",paddingLeft:"36px",paddingRight:"12px",paddingTop:"10px",paddingBottom:"10px",backgroundColor:c,border:"1px solid ".concat(u),color:h,fontSize:"14px",borderRadius:"8px",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",boxSizing:"border-box"},_={width:"100%",maxWidth:"100%",fontSize:"14px",textAlign:"left",color:p,textIndent:0,borderColor:"inherit",borderCollapse:"collapse"},B={fontSize:"14px",color:p,backgroundColor:c,borderBottom:"1px solid ".concat(u)},I={padding:"12px 24px",fontWeight:"500",userSelect:"none",whiteSpace:"nowrap"},L={backgroundColor:l,borderBottom:"1px solid ".concat(u),transition:"background-color 0.2s"},N={padding:"16px 24px",wordBreak:"break-word",overflowWrap:"anywhere"},A={display:"flex",alignItems:"center",flexWrap:"wrap",justifyContent:"space-between",padding:"16px",gap:"8px"},E={fontSize:"14px",fontWeight:"normal",color:p},D={fontWeight:"600",color:h},M={display:"flex",marginLeft:"-1px",fontSize:"14px",listStyle:"none",padding:0,margin:0},j={display:"flex",alignItems:"center",justifyContent:"center",color:p,backgroundColor:c,boxSizing:"border-box",border:"1px solid ".concat(u),fontWeight:"500",fontSize:"14px",textDecoration:"none",cursor:"pointer",height:"36px",wordBreak:"keep-all",overflowWrap:"normal","&:hover":{backgroundColor:s,color:h},"&:disabled:hover":{color:p,backgroundColor:c,cursor:"auto"}},T=i(i({},j),{borderRadius:"4px",paddingInline:"8px",paddingBlock:"4px",width:"auto",height:"auto",minHeight:"28px",position:"relative"}),X={width:"16px",height:"16px",color:p},O={position:"fixed",backgroundColor:l,border:"1px solid ".concat(d),borderRadius:"4px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)",zIndex:9999,minWidth:"120px"},W={display:"block",width:"100%",textAlign:"left",paddingLeft:"12px",paddingRight:"12px",paddingTop:"8px",paddingBottom:"8px",fontSize:"14px",color:"#374151",backgroundColor:"transparent",border:"none",cursor:"pointer",whiteSpace:"nowrap",position:"relative","&:hover":{backgroundColor:s},"&:disabled:hover":{backgroundColor:"transparent",cursor:"auto"},"&:first-of-type":{borderTopLeftRadius:"4px",borderTopRightRadius:"4px"},"&:last-of-type":{borderBottomLeftRadius:"4px",borderBottomRightRadius:"4px"}},F={borderTop:"1px solid ".concat(u),margin:"4px 0"},z=i(i({},W),{color:v,"&:hover":{backgroundColor:s,color:b}}),V=i(i({},T),{aspectRatio:1,paddingLeft:0,paddingRight:0}),Q={display:"flex",gap:"8px",justifyContent:"flex-end"},K=i(i({},j),{width:"36px",borderRightWidth:0}),H=i(i({},K),{borderTopLeftRadius:"8px",borderBottomLeftRadius:"8px",paddingLeft:"12px",paddingRight:"12px",width:"auto"}),Y=i(i({},K),{borderTopRightRadius:"8px",borderBottomRightRadius:"8px",paddingLeft:"12px",paddingRight:"12px",width:"auto",borderRightWidth:1}),$=i(i({},K),{color:g,backgroundColor:"#eff6ff",border:"1px solid ".concat(u)}),q={opacity:.8,cursor:"default",color:f,"&:hover":{backgroundColor:c,color:f}},G=i(i({},K),{appearance:"none",WebkitAppearance:"none",cursor:"pointer",paddingLeft:"8px",paddingRight:"8px",width:"36px",textAlign:"center",outline:"none","&:hover":{backgroundColor:s,color:h},"&:focus":{outline:"none"}}),J={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px",borderBottom:"1px solid ".concat(u),gap:"12px"},U=i(i({},j),{borderRadius:"8px",paddingLeft:"12px",paddingRight:"12px",whiteSpace:"nowrap"}),ee={color:f,cursor:"pointer",userSelect:"none",fontSize:"14px"},te={display:"block",width:"100%",minWidth:0,maxWidth:"100%",padding:"4px 8px",border:"1px solid ".concat(g),borderRadius:"4px",fontSize:"14px",color:h,outline:"none",boxSizing:"border-box",resize:"none",overflowY:"auto",fontFamily:"inherit",lineHeight:1.5},re={display:"flex",alignItems:"flex-start",gap:"8px"},ne={flex:1,minWidth:0,whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-word",lineHeight:1.5},oe={flex:1,minWidth:0,position:"relative",alignSelf:"stretch"},ae=i(i({},te),{whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-word",visibility:"hidden",pointerEvents:"none"}),ie={position:"absolute",inset:0,height:"100%"},le={display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",borderRadius:"4px",border:"none",backgroundColor:"transparent",color:f,cursor:"pointer",opacity:0,transition:"opacity 0.15s",flexShrink:0,padding:0,'tr:hover &, &[aria-expanded="true"]':{opacity:1},"&:hover":{backgroundColor:s,color:p}},ce={width:"40px",padding:"0 8px"},se={display:"flex",alignItems:"center",justifyContent:"center",width:"28px",height:"28px",borderRadius:"4px",border:"none",backgroundColor:"transparent",color:f,cursor:"pointer",opacity:0,transition:"opacity 0.15s",padding:0,"tr:hover &":{opacity:1},"&:hover":{backgroundColor:s,color:v}},ue={position:"fixed",backgroundColor:l,border:"1px solid ".concat(d),borderRadius:"8px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)",zIndex:9999,padding:"12px 16px"},de={margin:"0 0 12px 0",fontSize:"14px",fontWeight:"500",color:h},fe={display:"flex",gap:"8px",justifyContent:"flex-end"},pe=i(i({},j),{borderRadius:"6px",paddingLeft:"12px",paddingRight:"12px",height:"32px"}),he=i(i({},j),{borderRadius:"6px",paddingLeft:"12px",paddingRight:"12px",height:"32px",backgroundColor:v,color:l,border:"1px solid ".concat(v),"&:hover":{backgroundColor:b,color:l}}),ge="feathery-table-header-cell",ve="feathery-table-row",be="feathery-table-cell",ye="feathery-table-editable-cell",me="feathery-table-action-menu-item",xe="feathery-table-page-button",we=function(){return we=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},we.apply(this,arguments)};function Ce(){return(0,n.tZ)("svg",we({css:y,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2},{children:(0,n.tZ)("path",{strokeLinecap:"round",d:"M21 21l-3.5-3.5M17 10a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z"})}))}function ke(e){var t=e.searchQuery,r=e.onSearchChange;return(0,n.BX)("div",we({className:"feathery-table-search",css:Z},{children:[(0,n.tZ)("div",we({css:R},{children:(0,n.tZ)(Ce,{})})),(0,n.tZ)("input",{type:"text",className:"feathery-table-search-input",css:P,placeholder:"Search",value:t,onChange:function(e){return r(e.target.value)},onKeyDown:function(e){"Enter"===e.key&&e.preventDefault()}})]}))}var Se=function(){return Se=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Se.apply(this,arguments)};function Ze(e){var t=e.isSorted,r=e.sortDirection;return(0,n.BX)("svg",Se({xmlns:"http://www.w3.org/2000/svg",className:"feathery-table-sort-icon",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},{children:[(0,n.tZ)("path",{css:x,stroke:"currentColor","data-active":t&&"asc"===r||void 0,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m8 9 4-4 4 4"}),(0,n.tZ)("path",{css:x,stroke:"currentColor","data-active":t&&"desc"===r||void 0,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m8 15 4 4 4-4"})]}))}function Re(e){var t=e.columns,r=e.enableSort,a=e.sortColumn,i=e.sortDirection,l=e.onSort,c=e.styles;return(0,n.tZ)(o.Fragment,{children:t.map((function(e,t){var o=r,s=a===e.name,u=0===t;return(0,n.tZ)("th",Se({scope:"col",className:ge,"data-feathery-field":e.field_key,onClick:function(){return o&&l(e.name)},css:Se(Se(Se(Se({},I),u?{}:{paddingLeft:0}),c.getTarget("th")),o?{cursor:"pointer"}:{})},{children:(0,n.BX)("div",Se({css:w},{children:[(0,n.tZ)("span",{children:e.name}),o&&(0,n.tZ)("span",Se({css:m},{children:(0,n.tZ)(Ze,{isSorted:s,sortDirection:i})}))]}))}),t)}))})}var Pe=function(){return Pe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Pe.apply(this,arguments)};function _e(e){var t=e.currentPage,r=e.totalItems,o=e.rowsPerPage;return(0,n.BX)("span",Pe({css:E},{children:["Showing"," ",(0,n.BX)("span",Pe({css:D},{children:[t*o+1,"-",Math.min((t+1)*o,r)]}))," ","of ",(0,n.tZ)("span",Pe({css:D},{children:r}))]}))}function Be(e){var t=e.disabled,r=e.onClick;return(0,n.tZ)("button",Pe({type:"button",onClick:r,disabled:t,className:xe,css:Pe(Pe({},H),t?q:{})},{children:"Previous"}))}function Ie(e){var t=e.disabled,r=e.onClick;return(0,n.tZ)("button",Pe({type:"button",onClick:r,disabled:t,className:xe,css:Pe(Pe({},Y),t?q:{})},{children:"Next"}))}function Le(e){var t=e.pages,r=e.onPageChange;return(0,n.BX)("select",Pe({value:"",onChange:function(e){r(Number(e.target.value))},"aria-label":"Go to page",className:"feathery-table-page-select",css:G},{children:[(0,n.tZ)("option",Pe({value:"",disabled:!0,hidden:!0},{children:"..."})),t.map((function(e){return(0,n.tZ)("option",Pe({value:e},{children:e+1}),e)}))]}))}function Ne(e){var t=e.currentPage,r=e.totalPages,a=e.onPageChange,i=new Set;i.add(0),i.add(r-1);for(var l=Math.max(0,t-1);l<=Math.min(r-1,t+1);l++)i.add(l);var c=[],s=Array.from(i).sort((function(e,t){return e-t}));for(l=0;l<s.length;l++){var u=s[l],d=l>0?s[l-1]:-1;if(u-d>1){for(var f=[],p=d+1;p<u;p++)f.push(p);c.push({type:"overflow",pages:f})}c.push({type:"page",page:u})}return(0,n.tZ)(o.Fragment,{children:c.map((function(e,r){if("overflow"===e.type)return 1===e.pages.length?(0,n.tZ)("li",{children:(0,n.tZ)("button",Pe({type:"button",onClick:function(){return a(e.pages[0])},className:xe,css:K},{children:e.pages[0]+1}))},"overflow-".concat(r)):(0,n.tZ)("li",{children:(0,n.tZ)(Le,{pages:e.pages,onPageChange:a})},"overflow-".concat(r));var o=e.page===t;return(0,n.tZ)("li",{children:(0,n.tZ)("button",Pe({type:"button",onClick:function(){return a(e.page)},"aria-current":o?"page":void 0,className:xe,css:o?$:K},{children:e.page+1}))},e.page)}))})}function Ae(e){var t=e.currentPage,r=e.totalPages,o=e.totalItems,a=e.rowsPerPage,i=e.onPageChange;return r<=1?null:(0,n.BX)("nav",Pe({className:"feathery-table-pagination",css:A,"aria-label":"Table navigation"},{children:[(0,n.tZ)(_e,{currentPage:t,totalItems:o,rowsPerPage:a}),(0,n.BX)("ul",Pe({css:M},{children:[(0,n.tZ)("li",{children:(0,n.tZ)(Be,{disabled:0===t,onClick:function(){return i(Math.max(0,t-1))}})}),(0,n.tZ)(Ne,{currentPage:t,totalPages:r,onPageChange:i}),(0,n.tZ)("li",{children:(0,n.tZ)(Ie,{disabled:t>=r-1,onClick:function(){i(Math.min(r-1,t+1))}})})]}))]}))}var Ee=r(73935),De=r(95710),Me=r(39479),je=function(){return je=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},je.apply(this,arguments)},Te=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i};function Xe(){return(0,n.BX)("svg",je({css:X,fill:"currentColor",viewBox:"0 0 24 24"},{children:[(0,n.tZ)("circle",{cx:"12",cy:"5",r:"2"}),(0,n.tZ)("circle",{cx:"12",cy:"12",r:"2"}),(0,n.tZ)("circle",{cx:"12",cy:"19",r:"2"})]}))}function Oe(e){var t,r,a,i=e.actions,l=e.rowIndex,c=e.columnData,s=e.fieldValues,u=e.onClick,d=e.forceInlineButtons,f=void 0!==d&&d,p=e.tableId,h=void 0===p?"":p,g=e.buttonLoaders,v=void 0===g?{}:g,b=e.canDeleteRows,y=void 0!==b&&b,m=e.onDeleteRow;if(0===i.length)return null;var x=Te((0,o.useState)(!1),2),w=x[0],C=x[1],k=Te((0,o.useState)({top:0,left:0}),2),S=k[0],Z=k[1],R=(0,o.useRef)(null),P=(0,o.useRef)(null),_=(0,o.useRef)(null),B=!f&&i.length>1;(0,o.useEffect)((function(){if(w){var e=function(e){P.current&&!P.current.contains(e.target)&&_.current&&!_.current.contains(e.target)&&C(!1)},t=function(){C(!1)},r=(0,Me.me)();return r.addEventListener("mousedown",e),r.addEventListener("scroll",t,!0),function(){r.removeEventListener("mousedown",e),r.removeEventListener("scroll",t,!0)}}}),[w]);var I=function(e){C(!1);var t=s||De.u4,r={};c.forEach((function(e){var n=t[e.field_key],o=Array.isArray(n)?n[l]:n;r[e.name]=o})),u({action:e.label,rowIndex:l,rowData:r})},L=null!==(a=null===(r=v["".concat(h,"_").concat(l,"_").concat(null===(t=i.find((function(e){var t,r="".concat(h,"_").concat(l,"_").concat(e.label);return null===(t=v[r])||void 0===t?void 0:t.loader})))||void 0===t?void 0:t.label)])||void 0===r?void 0:r.loader)&&void 0!==a?a:null;return(0,n.tZ)("div",je({ref:R,css:Q},{children:B?(0,n.BX)(o.Fragment,{children:[(0,n.tZ)("button",je({ref:_,type:"button",disabled:L,onClick:function(e){e.stopPropagation(),function(){if(!w&&_.current){var e=_.current.getBoundingClientRect();Z({top:e.bottom+4,left:e.right})}C(!w)}()},className:"feathery-table-action-menu-button",css:V},{children:L?(0,n.tZ)("div",je({style:{height:"16px",width:"16px",display:"flex",alignItems:"center",justifyContent:"center"}},{children:L})):(0,n.tZ)(Xe,{})})),w&&(0,Ee.createPortal)((0,n.BX)("div",je({ref:P,className:"feathery-table-action-menu",css:je(je({},O),{top:"".concat(S.top,"px"),left:"".concat(S.left,"px"),transform:"translateX(-100%)"})},{children:[i.map((function(e,t){var r=Object.keys(v).length>0;return(0,n.tZ)("button",je({type:"button",onClick:function(t){t.stopPropagation(),I(e)},className:me,css:W,disabled:r},{children:e.label}),t)})),y&&m&&(0,n.BX)(n.HY,{children:[(0,n.tZ)("div",{css:F}),(0,n.tZ)("button",je({type:"button",onClick:function(e){e.stopPropagation(),C(!1),m(l)},className:me,css:z},{children:"Delete"}))]})]})),(0,Me.me)().body)]}):i.map((function(e,t){var r,o="".concat(h,"_").concat(l,"_").concat(e.label),a=null===(r=v[o])||void 0===r?void 0:r.loader,i=Object.keys(v).length>0;return(0,n.BX)("button",je({type:"button",onClick:function(t){t.stopPropagation(),I(e)},className:"feathery-table-action-button",css:T,disabled:i},{children:[(0,n.tZ)("span",je({style:{visibility:a?"hidden":"visible"}},{children:e.label})),a&&(0,n.tZ)("div",je({style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",height:"16px",width:"16px"}},{children:a}))]}),t)}))}))}var We=function(){return We=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},We.apply(this,arguments)};function Fe(e){var t=e.hasSearchQuery;return(0,n.BX)("div",We({className:"feathery-table-empty",css:k},{children:[t&&(0,n.tZ)("svg",We({css:{width:"48px",height:"48px",color:"#9ca3af",marginBottom:"16px"},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5},{children:(0,n.tZ)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})})),(0,n.tZ)("p",We({css:S},{children:t?"No results found":"No data available"})),t&&(0,n.tZ)("p",We({css:We(We({},S),{fontSize:"14px",marginTop:"8px"})},{children:"Try adjusting your search query"}))]}))}var ze=function(){return ze=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ze.apply(this,arguments)};function Ve(e){var t=e.anchorEl,r=e.onConfirm,a=e.onCancel,i=e.message,l=void 0===i?"Delete this row?":i,c=e.confirmLabel,s=void 0===c?"Delete":c,u=(0,o.useRef)(null);if(!t)return null;var d=t.getBoundingClientRect(),f=d.bottom+4,p=d.right;return(0,o.useEffect)((function(){var e=function(e){u.current&&!u.current.contains(e.target)&&t&&!t.contains(e.target)&&a()},r=function(){return a()},n=function(e){"Escape"===e.key&&a()},o=(0,Me.me)();return o.addEventListener("mousedown",e),o.addEventListener("scroll",r,!0),o.addEventListener("keydown",n),function(){o.removeEventListener("mousedown",e),o.removeEventListener("scroll",r,!0),o.removeEventListener("keydown",n)}}),[a,t]),(0,Ee.createPortal)((0,n.BX)("div",ze({ref:u,role:"alertdialog","aria-label":l,className:"feathery-table-delete-confirm",css:ze(ze({},ue),{top:"".concat(f,"px"),left:"".concat(p,"px"),transform:"translateX(-100%)"})},{children:[(0,n.tZ)("p",ze({css:de},{children:l})),(0,n.BX)("div",ze({css:fe},{children:[(0,n.tZ)("button",ze({type:"button",css:pe,onClick:function(e){e.stopPropagation(),a()}},{children:"Cancel"})),(0,n.tZ)("button",ze({type:"button",css:he,onClick:function(e){e.stopPropagation(),r()}},{children:s}))]}))]})),(0,Me.me)().body)}var Qe=function(){return Qe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Qe.apply(this,arguments)},Ke=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i};function He(){return(0,n.BX)("svg",Qe({width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24"},{children:[(0,n.tZ)("circle",{cx:"12",cy:"5",r:"2"}),(0,n.tZ)("circle",{cx:"12",cy:"12",r:"2"}),(0,n.tZ)("circle",{cx:"12",cy:"19",r:"2"})]}))}function Ye(e){var t,r=e.value,i=e.fieldKey,l=e.rowIndex,c=e.onEdit,s=e.onClear,u=Ke((0,o.useState)(!1),2),d=u[0],f=u[1],p=Ke((0,o.useState)(""),2),h=p[0],g=p[1],v=Ke((0,o.useState)(!1),2),b=v[0],y=v[1],m=Ke((0,o.useState)(!1),2),x=m[0],w=m[1],C=Ke((0,o.useState)({top:0,left:0}),2),k=C[0],S=C[1],Z=(0,o.useRef)(null),R=(0,o.useRef)(null),P=(0,o.useRef)(null),_=(0,o.useRef)(!0),B=(0,o.useCallback)((function(){return w(!1)}),[]),I=null!==(t=(0,a.e7)(r))&&void 0!==t?t:"",L=""===I;(0,o.useEffect)((function(){d&&Z.current&&Z.current.focus()}),[d]),(0,o.useEffect)((function(){if(b){var e=function(e){P.current&&!P.current.contains(e.target)&&R.current&&!R.current.contains(e.target)&&y(!1)},t=function(){return y(!1)},r=(0,Me.me)();return r.addEventListener("mousedown",e),r.addEventListener("scroll",t,!0),function(){r.removeEventListener("mousedown",e),r.removeEventListener("scroll",t,!0)}}}),[b]);var N=function(){g(I),f(!0),y(!1)},A=function(){h!==I&&c(i,l,h),f(!1)};return d?(0,n.BX)("div",Qe({className:ye,css:oe},{children:[(0,n.tZ)("div",Qe({css:ae},{children:"".concat(h,"​")})),(0,n.tZ)("textarea",{ref:Z,value:h,onChange:function(e){return g(e.target.value)},onBlur:function(){_.current&&A(),_.current=!0},onKeyDown:function(e){(e.metaKey||e.ctrlKey)&&"Enter"===e.key?(e.preventDefault(),_.current=!1,A()):"Escape"===e.key?(e.preventDefault(),_.current=!1,f(!1)):"Tab"===e.key&&(_.current=!1,A())},className:"feathery-table-cell-input",css:Qe(Qe({},te),ie),onClick:function(e){return e.stopPropagation()}})]})):L?(0,n.tZ)("span",Qe({className:ye,css:ee,onClick:N},{children:"Click to edit"})):(0,n.BX)("div",Qe({className:ye,css:re},{children:[(0,n.tZ)("span",Qe({css:ne},{children:I})),(0,n.tZ)("button",Qe({ref:R,type:"button","aria-expanded":b,"aria-haspopup":"menu",css:le,onClick:function(e){if(e.stopPropagation(),!b&&R.current){var t=R.current.getBoundingClientRect();S({top:t.bottom+4,left:t.right})}y(!b)}},{children:(0,n.tZ)(He,{})})),b&&(0,Ee.createPortal)((0,n.BX)("div",Qe({ref:P,role:"menu",css:Qe(Qe({},O),{top:"".concat(k.top,"px"),left:"".concat(k.left,"px"),transform:"translateX(-100%)"})},{children:[(0,n.tZ)("button",Qe({type:"button",role:"menuitem",css:W,onClick:function(e){e.stopPropagation(),N()}},{children:"Edit Value"})),(0,n.tZ)("button",Qe({type:"button",role:"menuitem",css:W,onClick:function(e){e.stopPropagation(),y(!1),w(!0)}},{children:"Clear Field"}))]})),(0,Me.me)().body),x&&(0,n.tZ)(Ve,{anchorEl:R.current,message:"Clear this field?",confirmLabel:"Clear",onConfirm:function(){B(),s(i,l)},onCancel:B})]}))}var $e=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i};function qe(e){var t,r=function(e){if(null==e||""===e)return null;var t=String(e).trim().replace(/[$€£¥]/g,"").replace(/[,%]/g,"").replace(/\s/g,""),r=parseFloat(t);return isNaN(r)?null:r}(e),n=function(e){var t,r,n,o;if(null==e||""===e)return null;var a=String(e).trim(),i=new Date(a);if(!isNaN(i.getTime()))return i;try{for(var l=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}([/^(\d{1,2})[/-](\d{1,2})[/-](\d{2,4})$/,/^(\d{4})[/-](\d{1,2})[/-](\d{1,2})$/]),c=l.next();!c.done;c=l.next()){var s=c.value,u=a.match(s);if(u){var d=void 0,f=void 0,p=void 0;4===u[1].length?(d=(n=$e(u,4))[1],f=n[2],p=n[3]):(f=(o=$e(u,4))[1],p=o[2],d=o[3]),2===d.length&&(d=parseInt(d)<50?"20".concat(d):"19".concat(d));var h=new Date(parseInt(d),parseInt(f)-1,parseInt(p));if(!isNaN(h.getTime()))return h}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(t)throw t.error}}return null}(e);return{original:e,asNumber:r,asDate:n,asString:null!==(t=(0,a.e7)(e))&&void 0!==t?t:""}}function Ge(e,t){return null!==e.asNumber&&null!==t.asNumber?e.asNumber-t.asNumber:null!==e.asDate&&null!==t.asDate?e.asDate.getTime()-t.asDate.getTime():e.asString.localeCompare(t.asString)}var Je=function(){return Je=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Je.apply(this,arguments)},Ue=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},et=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i},tt=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};function rt(e){return"".concat("__feathery_table_page_").concat(e)}var nt=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i},ot=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},at=r(65096),it=function(){return it=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},it.apply(this,arguments)},lt=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i};const ct=function(e){var t=e.element,r=e.responsiveStyles,i=e.onClick,l=void 0===i?function(){}:i,c=e.updateFieldValues,s=void 0===c?function(){}:c,u=e.submitCustom,d=void 0===u?function(){}:u,f=e.editMode,p=void 0!==f&&f,h=e.buttonLoaders,g=void 0===h?{}:h,v=e.assistantClient,b=(0,o.useMemo)((function(){return function(e){return e.addTargets("table","thead","tbody","th","td","tr"),e}(r)}),[r]),y=lt((0,o.useState)(0),2),x=y[0],k=y[1],S=(0,o.useCallback)((function(){return k((function(e){return e+1}))}),[]),Z=function(e){var t,r,n,i,l,c,s,u,d,f,p,h,g,v,b=e.element,y=e.editMode,m=void 0!==y&&y,x=e.dataVersion,w=void 0===x?0:x,C=(null===(t=b.properties)||void 0===t?void 0:t.columns)||[],k=((null===(r=b.properties)||void 0===r?void 0:r.actions)||[]).filter((function(e){return e.label&&""!==e.label.trim()})),S=null!==(i=null===(n=b.properties)||void 0===n?void 0:n.search)&&void 0!==i&&i,Z=null!==(c=null===(l=b.properties)||void 0===l?void 0:l.sort)&&void 0!==c&&c,R=null!==(u=null===(s=b.properties)||void 0===s?void 0:s.transpose)&&void 0!==u&&u,P=null!==(f=null===(d=b.properties)||void 0===d?void 0:d.enable_editing)&&void 0!==f&&f,_=null!==(h=null===(p=b.properties)||void 0===p?void 0:p.add_delete_rows)&&void 0!==h&&h,B=null!==(v=null===(g=b.properties)||void 0===g?void 0:g.pagination)&&void 0!==v?v:0,I="number"==typeof B&&B>0?Math.floor(B):0,L=I>0,N=(0,o.useMemo)((function(){var e=C;return m&&(e=e.map((function(e,t){return Je(Je({},e),{field_key:"example_column_".concat(t)})}))),e}),[m,C]),A=(0,o.useMemo)((function(){return m?function(e,t){void 0===t&&(t=2);var r={};return e.forEach((function(e){r[e.field_key]=Array(t).fill("Sample")})),r}(N):Je({},De.u4)}),[m,N,w]),E=et((0,o.useState)(""),2),D=E[0],M=E[1],j=et((0,o.useState)(null),2),T=j[0],X=j[1],O=et((0,o.useState)("asc"),2),W=O[0],F=O[1],z=et((0,o.useState)((function(){return function(e){var t=rt(e),r=sessionStorage.getItem(t);if(!r)return 0;var n=parseInt(r,10);return Number.isInteger(n)&&n>=0?n:0}(b.id)})),2),V=z[0],Q=z[1],K=(0,o.useMemo)((function(){return N.reduce((function(e,t){var r=A[t.field_key];return Array.isArray(r)?Math.max(e,r.length):e}),0)}),[N,A]),H=(0,o.useMemo)((function(){return Array.from({length:K},(function(e,t){return t}))}),[K]),Y=(0,o.useMemo)((function(){return R&&S&&D.trim()?H.filter((function(e){return N.some((function(t){var r,n=A[t.field_key],o=Array.isArray(n)?n[e]:n;return(null!==(r=(0,a.e7)(o))&&void 0!==r?r:"").toLowerCase().includes(D.toLowerCase().trim())}))})):H}),[R,H,N,D,S,A]),$=et((0,o.useState)(null),2),q=$[0],G=$[1],J=(0,o.useMemo)((function(){if(!R||!Z||null===q)return Y;var e=N[q];return e?tt([],et(Y),!1).sort((function(t,r){var n=A[e.field_key],o=Array.isArray(n)?n[t]:n,a=Array.isArray(n)?n[r]:n,i=Ge(qe(o),qe(a));return"asc"===W?i:-i})):Y}),[R,Y,q,W,N,A,Z]),U=(0,o.useMemo)((function(){if(!R||!L)return J;var e=V*I,t=e+I;return J.slice(e,t)}),[R,J,V,I,L]),ee=(0,o.useMemo)((function(){if(!R||0===K)return{columns:N,activeFieldValues:A,transposedRowIndices:[]};var e=function(e,t,r,n){var o,a,i,l,c,s,u=n||Array.from({length:r},(function(e,t){return t})),d=[{name:"",field_id:"_transpose_field_name",field_type:"text",field_key:"_transpose_field_name"}];try{for(var f=Ue(u),p=f.next();!p.done;p=f.next()){var h=p.value;d.push({name:"",field_id:"_transpose_row_".concat(h),field_type:"text",field_key:"_transpose_row_".concat(h),originalRowIndex:h})}}catch(e){o={error:e}}finally{try{p&&!p.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}var g={_transpose_field_name:e.map((function(e){return e.name}))};try{for(var v=Ue(u),b=v.next();!b.done;b=v.next()){h=b.value;var y=[];try{for(var m=(c=void 0,Ue(e)),x=m.next();!x.done;x=m.next()){var w=t[x.value.field_key],C=Array.isArray(w)?w[h]:w;y.push(C)}}catch(e){c={error:e}}finally{try{x&&!x.done&&(s=m.return)&&s.call(m)}finally{if(c)throw c.error}}g["_transpose_row_".concat(h)]=y}}catch(e){i={error:e}}finally{try{b&&!b.done&&(l=v.return)&&l.call(v)}finally{if(i)throw i.error}}return{transposedColumns:d,transposedFieldValues:g,includedRowIndices:u}}(N,A,K,U);return{columns:e.transposedColumns,activeFieldValues:e.transposedFieldValues,transposedRowIndices:e.includedRowIndices}}),[R,N,A,K,U]),te=ee.columns,re=ee.activeFieldValues,ne=ee.transposedRowIndices,oe=(0,o.useMemo)((function(){return te.reduce((function(e,t){var r=re[t.field_key];return Array.isArray(r)?Math.max(e,r.length):e}),0)}),[te,re]),ae=(0,o.useMemo)((function(){return Array.from({length:oe},(function(e,t){return t}))}),[oe]),ie=(0,o.useMemo)((function(){return R?ae:S&&D.trim()?ae.filter((function(e){return te.some((function(t){var r,n=re[t.field_key],o=Array.isArray(n)?n[e]:n;return(null!==(r=(0,a.e7)(o))&&void 0!==r?r:"").toLowerCase().includes(D.toLowerCase().trim())}))})):ae}),[R,ae,te,D,S,re]),le=(0,o.useMemo)((function(){if(R)return ie;if(!Z||!T)return ie;var e=te.find((function(e){return e.name===T}));return e?tt([],et(ie),!1).sort((function(t,r){var n=re[e.field_key],o=Array.isArray(n)?n[t]:n,a=Array.isArray(n)?n[r]:n,i=Ge(qe(o),qe(a));return"asc"===W?i:-i})):ie}),[R,ie,T,W,te,Z,re]),ce=(0,o.useMemo)((function(){if(R)return ae;if(!L)return le;var e=V*I,t=e+I;return le.slice(e,t)}),[R,ae,le,V,I,L]),se=(0,o.useRef)({initialMount:!0,search:"",sortColumn:"",sortDirection:""});(0,o.useEffect)((function(){var e=se.current;if(e.initialMount)return e.initialMount=!1,e.search=D,e.sortColumn=T,void(e.sortDirection=W);D===e.search&&T===e.sortColumn&&W===e.sortDirection||(Q(0),e.search=D,e.sortColumn=T,e.sortDirection=W)}),[D,T,W]);var ue=R?J.length:le.length,de=L?Math.ceil(ue/I):1;(0,o.useEffect)((function(){var e,t,r;b.id&&(e=b.id,t=V,r=rt(e),sessionStorage.setItem(r,t.toString()))}),[b.id,V]),(0,o.useEffect)((function(){de>0&&V>=de&&Q(de-1)}),[de]);var fe=oe>0,pe=R?Y.length>0:ie.length>0;return{enableSearch:S,searchQuery:D,hasSearchResults:pe,setSearchQuery:M,enableSort:Z,sortColumn:T,sortDirection:W,sortedColumnIndex:q,handleSort:function(e){Z&&(T===e?"asc"===W?F("desc"):(X(null),F("asc")):(X(e),F("asc")))},handleTransposedSort:function(e){Z&&R&&(q===e?"asc"===W?F("desc"):(G(null),F("asc")):(G(e),F("asc")))},enablePagination:L,currentPage:V,paginatedRowIndices:ce,rowsPerPage:I,setCurrentPage:Q,columns:te,actions:k,isTransposed:R&&K>0,transposedRowIndices:ne,enableEditing:P,enableAddDeleteRows:_,totalRows:ue,totalPages:de,hasData:fe,activeFieldValues:re,baseColumns:N,baseFieldValues:A}}({element:t,editMode:p,dataVersion:x}),R=Z.enableSearch,P=Z.searchQuery,A=Z.setSearchQuery,E=Z.enableSort,D=Z.sortColumn,M=Z.sortDirection,j=Z.sortedColumnIndex,T=Z.handleSort,X=Z.handleTransposedSort,O=Z.enablePagination,W=Z.currentPage,F=Z.setCurrentPage,z=Z.paginatedRowIndices,V=Z.rowsPerPage,Q=Z.enableEditing,K=Z.enableAddDeleteRows,H=Z.columns,Y=Z.actions,$=Z.isTransposed,q=Z.transposedRowIndices,G=Z.totalRows,ee=Z.totalPages,te=Z.hasData,re=Z.hasSearchResults,ne=Z.activeFieldValues,oe=Z.baseColumns,ae=Z.baseFieldValues,ie=function(e){var t=e.columns,r=e.updateFieldValues,n=e.submitCustom,a=e.editMode,i=e.editModeFieldValues,l=e.enablePagination,c=e.setCurrentPage,s=e.setSearchQuery,u=e.searchQuery,d=e.onMutate,f=(0,o.useRef)(i);f.current=i;var p=(0,o.useCallback)((function(e){var t=(a?f.current:De.u4)[e];return Array.isArray(t)?t:[]}),[a]),h=(0,o.useCallback)((function(){var e={};t.forEach((function(t){var r=p(t.field_key);e[t.field_key]=ot([""],nt(r),!1)})),u&&s(""),r(e),d(),l&&c(0)}),[t,p,r,d,l,c,s,u]),g=(0,o.useCallback)((function(e){var r={};return t.forEach((function(t){var n=p(t.field_key);r[t.field_key]=n.filter((function(t,r){return r!==e}))})),r}),[t,p]),v=(0,o.useCallback)((function(e){var t=g(e);r(t),a||n(t),d()}),[g,r,n,a,d]),b=(0,o.useCallback)((function(e){var t=g(e);r(t),d()}),[g,r,d]),y=(0,o.useCallback)((function(e,t,o){var i,l=p(e),c=ot([],nt(l),!1);c[t]=o;var s=((i={})[e]=c,i);r(s),a||n(s),d()}),[p,r,n,a,d]),m=(0,o.useCallback)((function(e,t){y(e,t,"")}),[y]);return{handleAddRow:h,handleDeleteRow:v,handleRemoveRowLocal:b,handleCellEdit:y,handleCellClear:m}}({columns:oe,updateFieldValues:s,submitCustom:d,editMode:p,editModeFieldValues:ne,enablePagination:O,setCurrentPage:F,setSearchQuery:A,searchQuery:P,onMutate:S}),le=ie.handleAddRow,ue=ie.handleDeleteRow,de=ie.handleCellEdit,fe=ie.handleCellClear,pe=null==t?void 0:t.id,he=Q&&!$,ye=he&&K,me=he&&K,xe=Y.length>1,we=me&&!xe,Ce=lt((0,o.useState)(new Set),2),Se=Ce[0],Pe=Ce[1],_e=(0,o.useRef)(Se);_e.current=Se;var Be=(0,o.useCallback)((function(e,t,r){_e.current.has(t)&&Pe((function(e){var r=new Set(e);return r.delete(t),r})),de(e,t,r)}),[de]),Ie=lt((0,o.useState)(null),2),Le=Ie[0],Ne=Ie[1],Ee=(0,o.useRef)(W);Ee.current!==W&&(Ee.current=W,Ne(null));var Me=(0,o.useCallback)((function(){return Ne(null)}),[]),je=(0,o.useRef)(new Map),Te=(0,o.useRef)(new Map),Xe=(0,o.useCallback)((function(){Ne(null),le(),Pe((function(e){var t=new Set;return t.add(0),e.forEach((function(e){return t.add(e+1)})),t}))}),[le]),We=(0,o.useCallback)((function(e){ue(e),Ne(null)}),[ue]);(0,o.useEffect)((function(){if(v&&pe)return v.registerTable(pe,{handleCellEdit:Be,handleAddRow:Xe,handleDeleteRow:We}),function(){return v.unregisterTable(pe)}}),[v,pe,Be,Xe,We]);var ze=!te||!re,Qe=R||ye;return(0,n.BX)("div",it({className:"feathery-table-container",css:it(it({},C),b.getTarget("container"))},{children:[Qe&&(0,n.BX)("div",it({className:"feathery-table-toolbar",css:J},{children:[R?(0,n.tZ)(ke,{searchQuery:P,onSearchChange:A}):(0,n.tZ)("div",{}),ye&&(0,n.tZ)("button",it({type:"button",className:"feathery-table-add-row-button",css:U,onClick:Xe},{children:"+ Add Row"}))]})),ze?(0,n.tZ)(Fe,{hasSearchQuery:P.trim().length>0}):(0,n.tZ)("div",it({css:{overflowX:"auto"}},{children:(0,n.BX)("table",it({className:"feathery-table",css:it(it({},_),b.getTarget("table"))},{children:[!$&&(0,n.tZ)("thead",it({className:"feathery-table-header",css:B},{children:(0,n.BX)("tr",{children:[(0,n.tZ)(Re,{columns:H,enableSort:E,sortColumn:D,sortDirection:M,onSort:T,styles:b}),Y.length>0&&(0,n.tZ)("th",{scope:"col",className:ge,css:it(it(it({},I),{paddingLeft:0}),b.getTarget("th"))}),we&&(0,n.tZ)("th",{scope:"col",className:ge,css:it(it(it({},I),ce),b.getTarget("th"))})]})})),(0,n.BX)("tbody",it({className:"feathery-table-body",css:b.getTarget("tbody")},{children:[z.map((function(e){var r,o,i={};return $||H.forEach((function(t){var r=ne[t.field_key],n=Array.isArray(r)?r[e]:r;i[t.name]=n})),(0,n.BX)("tr",it({className:ve,css:it(it({},L),b.getTarget("tr")),onClick:function(){$||he||l({rowIndex:e,rowData:i})}},{children:[H.map((function(t,r){var o,i,c,s=ne[t.field_key],u=Array.isArray(s)?s[e]:s,d=$&&0===r,f=d&&E,p=j===e,h=0===r,g=1===r,v=$&&!d?t.originalRowIndex:void 0,y=d?it(it(it(it({},I),{backgroundColor:"#f9fafb",borderRight:"1px solid #e5e7eb",width:"1px",whiteSpace:"nowrap"}),b.getTarget("th")),f?{cursor:"pointer"}:{}):it(it(it(it({},N),$?g?{}:{paddingLeft:0}:h?{}:{paddingLeft:0}),$&&!d?{cursor:"pointer"}:{}),b.getTarget("td")),x=d?"th":"td",C=$?null===(o=oe[e])||void 0===o?void 0:o.field_key:t.field_key;return(0,n.tZ)(x,it({className:d?ge:be,"data-feathery-field":C,css:y,onClick:function(t){if(f)X(e);else if($&&void 0!==v){t.stopPropagation();var r={};oe.forEach((function(e){var t=ae[e.field_key],n=Array.isArray(t)?t[v]:t;r[e.name]=n})),l({rowIndex:v,rowData:r})}}},d?{scope:"row"}:{},{children:d&&f?(0,n.BX)("div",it({css:it(it({},w),{justifyContent:"space-between"})},{children:[(0,n.tZ)("span",{children:null!==(i=(0,a.e7)(u))&&void 0!==i?i:""}),(0,n.tZ)("span",it({css:m},{children:(0,n.tZ)(Ze,{isSorted:p,sortDirection:M})}))]})):he?(0,n.tZ)(Ye,{value:u,fieldKey:t.field_key,rowIndex:e,onEdit:Be,onClear:fe}):null!==(c=(0,a.e7)(u))&&void 0!==c?c:""}),r)})),!$&&Y.length>0&&(0,n.BX)("td",it({ref:function(t){t?Te.current.set(e,t):Te.current.delete(e)},className:be,css:it(it(it({},N),{paddingLeft:0}),b.getTarget("td"))},{children:[(0,n.tZ)(Oe,{actions:Y,rowIndex:e,columnData:oe,fieldValues:ae,onClick:l,tableId:t.id,buttonLoaders:g,canDeleteRows:me&&xe,onDeleteRow:function(e){return Ne(e)}}),xe&&me&&Le===e&&(0,n.tZ)(Ve,{anchorEl:null!==(r=Te.current.get(e))&&void 0!==r?r:null,onConfirm:function(){return We(e)},onCancel:Me})]})),we&&(0,n.BX)("td",it({className:be,css:it(it({},ce),b.getTarget("td"))},{children:[(0,n.tZ)("button",it({type:"button",ref:function(t){t?je.current.set(e,t):je.current.delete(e)},className:"feathery-table-delete-button",css:it(it({},se),Le===e&&{opacity:1}),onClick:function(t){t.stopPropagation(),Ne(Le===e?null:e)}},{children:(0,n.tZ)(at.XH,{})})),Le===e&&(0,n.tZ)(Ve,{anchorEl:null!==(o=je.current.get(e))&&void 0!==o?o:null,onConfirm:function(){return We(e)},onCancel:Me})]}))]}),e)})),$&&Y.length>0&&(0,n.BX)("tr",it({className:ve,css:it(it({},L),b.getTarget("tr"))},{children:[(0,n.tZ)("th",{scope:"row",className:ge,css:it(it(it({},I),{backgroundColor:"#f9fafb",borderRight:"1px solid #e5e7eb",width:"1px",whiteSpace:"nowrap"}),b.getTarget("th"))}),q.map((function(e,r){return(0,n.tZ)("td",it({className:be,css:it(it(it({},N),0===r?{}:{paddingLeft:0}),b.getTarget("td"))},{children:(0,n.tZ)("div",it({css:{display:"flex",justifyContent:"flex-start"}},{children:(0,n.tZ)(Oe,{actions:Y,rowIndex:e,columnData:oe,fieldValues:ae,onClick:l,forceInlineButtons:!0,tableId:t.id,buttonLoaders:g})}))}),e)}))]}))]}))]}))})),!ze&&O&&(0,n.tZ)(Ae,{currentPage:W,totalPages:ee,totalItems:G,rowsPerPage:V,onPageChange:F})]}))}}}]);
@@ -1 +0,0 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[798],{11587:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(35944),o=r(67294),i=r(18776),l=r(65096),a=r(52988),c=r(54665),u=r(47449),s=r(39479),f=function(){return f=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},f.apply(this,arguments)};function d(e){var t=e.id,r=e.text,d=e.responsiveStyles,p=e.absolute,h=void 0===p||p,v=e.containerRef,g=e.repeat,m=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),l=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)l.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return l}((0,o.useState)(!1),2),y=m[0],b=m[1],w=(0,o.useRef)(null);if(!(r=(0,c.xf)(r,g)))return null;var x=(0,s.tq)();return(0,n.BX)(n.HY,{children:[(0,n.tZ)("div",f({ref:w,onMouseEnter:x?void 0:function(){return b(!0)},onMouseLeave:x?void 0:function(){return b(!1)},onFocus:function(){return b(!0)},onBlur:function(){return b(!1)},onClick:function(){return b((function(e){return!e}))},css:h?{position:"absolute",insetInlineEnd:"10px",top:0,bottom:0,zIndex:a.rM,margin:"auto",cursor:"pointer",height:"100%",display:"flex"}:{position:"relative",marginInlineStart:"8px",display:"flex",alignItems:"center"}},{children:(0,n.tZ)(l.by,{cssStyles:d.getTarget("tooltipIcon")})})),(0,n.tZ)(u.Z,f({show:y,targetRef:w,containerRef:v,placement:"left",onHide:function(){return b(!1)},offset:8},{children:(0,n.tZ)(i.u,f({id:"tooltip-".concat(t),css:{zIndex:a.rM+1,padding:".4rem 0",transition:"opacity .10s linear",".tooltip-inner":{maxWidth:"200px",padding:".25rem .5rem",color:"#fff",textAlign:"center",backgroundColor:"#000",borderRadius:".25rem",fontSize:"smaller"}}},{children:r}))}))]})}},47449:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(35944),o=r(67294),i=r(73935),l=r(39479),a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};const c=function(e){var t=e.show,r=e.targetRef,c=e.children,f=e.onHide,d=e.placement,p=void 0===d?"bottom-start":d,h=e.offset,v=void 0===h?0:h,g=e.zIndex,m=void 0===g?1e3:g,y=e.containerRef,b=(0,o.useRef)(null),w=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),l=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)l.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return l}((0,o.useState)(null),2),x=w[0],O=w[1],S=(0,o.useCallback)((function(){return(null==y?void 0:y.current)||(0,l.me)().body}),[y]),E=(0,o.useCallback)((function(){var e;if(t&&r.current&&b.current){var n=(0,l.Kv)(),o=S();if(o){var i=r.current.getBoundingClientRect(),a=b.current.getBoundingClientRect(),c=o.getBoundingClientRect(),f=s(p,i,a,v),d=f.top,h=f.left,g=d+a.height,m=h+a.width,y=d>=0&&g<=n.innerHeight,w=h>=0&&m<=n.innerWidth;if(!y||!w){var x=u(p,!y,!w);x!==p&&(d=(e=s(x,i,a,v)).top,h=e.left)}var E=o===(0,l.me)().body,Z=E?d+n.scrollY:d-c.top,k=E?h+n.scrollX:h-c.left;O((function(e){return e&&e.top===Z&&e.left===k?e:{top:Z,left:k}}))}}}),[t,p,v,S,r]),Z=(0,o.useCallback)((function(){var e=!1;return function(){e||(e=!0,requestAnimationFrame((function(){E(),e=!1})))}}),[E])();if((0,o.useLayoutEffect)((function(){t&&E()}),[t,E]),(0,o.useEffect)((function(){if(t){var e=(0,l.Kv)(),n=S();if(n){e.addEventListener("resize",Z),e.addEventListener("scroll",Z,!0),n!==(0,l.me)().body&&n.addEventListener("scroll",Z);var o=new ResizeObserver((function(){return Z()}));return r.current&&o.observe(r.current),n!==(0,l.me)().body&&o.observe(n),function(){e.removeEventListener("resize",Z),e.removeEventListener("scroll",Z,!0),n!==(0,l.me)().body&&n.removeEventListener("scroll",Z),o.disconnect()}}}}),[t,Z,S,r]),(0,o.useEffect)((function(){if(t){var e=function(e){"Escape"===e.key&&(O(null),null==f||f())},n=function(e){var t=e.target;b.current&&!b.current.contains(t)&&r.current&&!r.current.contains(t)&&(O(null),null==f||f())},o=(0,l.me)();return o.addEventListener("mousedown",n),o.addEventListener("keydown",e),function(){o.removeEventListener("mousedown",n),o.removeEventListener("keydown",e)}}}),[t,f,r]),!t)return null;var k=S();return k?(0,i.createPortal)((0,n.tZ)("div",a({ref:b,style:a(a({position:"absolute"},x||{top:-9999,left:-9999}),{zIndex:m})},{children:c})),k):(0,n.tZ)(n.HY,{children:c})};var u=function(e,t,r){if(t){if(e.includes("top"))return e.replace("top","bottom");if(e.includes("bottom"))return e.replace("bottom","top")}if(r){if(e.includes("left"))return e.replace("left","right");if(e.includes("right"))return e.replace("right","left")}return e},s=function(e,t,r,n){switch(void 0===n&&(n=0),e){case"top":return{top:t.top-r.height-n,left:t.left+(t.width-r.width)/2};case"top-start":return{top:t.top-r.height-n,left:t.left};case"top-end":return{top:t.top-r.height-n,left:t.right-r.width};case"left":return{top:t.top+(t.height-r.height)/2,left:t.left-r.width-n};case"left-start":return{top:t.top,left:t.left-r.width-n};case"left-end":return{top:t.bottom-r.height,left:t.left-r.width-n};case"bottom":default:return{top:t.bottom+n,left:t.left+(t.width-r.width)/2};case"bottom-start":return{top:t.bottom+n,left:t.left};case"bottom-end":return{top:t.bottom+n,left:t.right-r.width};case"right":return{top:t.top+(t.height-r.height)/2,left:t.right+n};case"right-start":return{top:t.top,left:t.right+n};case"right-end":return{top:t.bottom-r.height,left:t.right+n}}}},29069:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(35944),o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)};function i(e){var t,r,i,l=e.value,a=e.element,c=e.responsiveStyles,u=e.type,s=void 0===u?"input":u,f=e.inputFocused,d=void 0!==f&&f,p=e.repeatIndex,h=void 0===p?null:p,v=a.properties,g=null!==(i=(null!==(r=v.repeat_placeholder)&&void 0!==r?r:[])[null!=h?h:0])&&void 0!==i?i:v.placeholder||"",m=o(o({},c.getTarget("placeholderFocus")),c.getTarget("placeholderActive"));return(0,n.tZ)("span",o({css:o(o(o(o({position:"absolute",pointerEvents:"none",insetInlineStart:"0.75rem",transition:"0.2s ease all",top:"input"===s?"50%":"0.6rem"},c.getTarget("placeholder")),l?c.getTarget("placeholderFocus"):{}),d?m:{}),(t={},t["".concat(s,":focus ~ &")]=m,t))},{children:g}))}},18776:(e,t,r)=>{r.d(t,{u:()=>l});var n=r(35944),o=r(52988),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},l=function(e){var t=e.children,r=e.css,l=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["children","css"]);return(0,n.tZ)("div",i({css:i({zIndex:o.rM+1,padding:".4rem 0",transition:"opacity .10s linear",".tooltip-inner":{maxWidth:"200px",padding:".25rem .5rem",color:"#fff",textAlign:"center",backgroundColor:"#000",borderRadius:".25rem",fontSize:"smaller"}},r)},l,{children:(0,n.tZ)("div",i({className:"tooltip-inner"},{children:t}))}))}},39594:(e,t,r)=>{r.r(t),r.d(t,{default:()=>f});var n=r(35944),o=r(67294),i=r(29069),l=r(11587),a=r(1211),c=r(6867),u=r(39479),s=function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)};const f=(0,o.memo)((function(e){var t=e.element,r=e.responsiveStyles,f=e.fieldLabel,d=e.elementProps,p=void 0===d?{}:d,h=e.required,v=void 0!==h&&h,g=e.disabled,m=void 0!==g&&g,y=e.editMode,b=e.onChange,w=void 0===b?function(){}:b,x=e.setRef,O=void 0===x?function(){}:x,S=e.rawValue,E=void 0===S?"":S,Z=e.inlineError,k=e.repeatIndex,L=void 0===k?null:k,R=e.children,j=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),l=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)l.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return l}((0,o.useState)(!1),2),C=j[0],I=j[1],T=(0,o.useRef)(null),z=(0,c.Z)({element:t,error:Z,breakpoint:r.getMobileBreakpoint()}),B=z.borderStyles,P=z.customBorder,F=t.servar;return(0,n.BX)("div",s({ref:T,css:s({maxWidth:"100%",position:"relative",pointerEvents:y?"none":"auto",width:"100%",height:"100%"},r.getTarget("fc"))},p,{children:[R,f,(0,n.BX)("div",s({css:s(s(s({position:"relative",width:"100%",overflowX:"clip"},r.getTarget("sub-fc")),m?r.getTarget("disabled"):{}),{"&:hover":(0,u.wL)(m?{}:s(s({},r.getTarget("hover")),B.hover)),"&&":C?s(s({},r.getTarget("active")),B.active):{}})},{children:[P,(0,n.tZ)("textarea",{id:F.key,css:s(s(s(s({position:"relative",height:"100%",width:"100%",border:"none",margin:0,backgroundColor:"transparent",resize:"none"},a.ET),{padding:"0.5rem 0.75rem"}),r.getTarget("field")),C||E||!t.properties.placeholder?{}:{color:"transparent !important"}),"aria-label":t.properties.aria_label,maxLength:F.max_length||4096,minLength:F.min_length,required:v,onChange:w,onFocus:function(){return I(!0)},onBlur:function(){return I(!1)},placeholder:"",disabled:m,value:E,rows:t.styles.num_rows,ref:O}),(0,n.tZ)(i.Z,{value:E,element:t,responsiveStyles:r,type:"textarea",repeatIndex:L}),(0,n.tZ)(l.Z,{containerRef:T,id:t.id,text:t.properties.tooltipText,responsiveStyles:r,repeat:t.repeat})]}))]}))}))}}]);
@@ -1 +0,0 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[707],{11587:(e,t,r)=>{r.d(t,{Z:()=>f});var n=r(35944),o=r(67294),i=r(18776),a=r(65096),l=r(52988),u=r(54665),c=r(47449),s=r(39479),d=function(){return d=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},d.apply(this,arguments)};function f(e){var t=e.id,r=e.text,f=e.responsiveStyles,p=e.absolute,v=void 0===p||p,h=e.containerRef,m=e.repeat,g=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}((0,o.useState)(!1),2),y=g[0],b=g[1],w=(0,o.useRef)(null);if(!(r=(0,u.xf)(r,m)))return null;var x=(0,s.tq)();return(0,n.BX)(n.HY,{children:[(0,n.tZ)("div",d({ref:w,onMouseEnter:x?void 0:function(){return b(!0)},onMouseLeave:x?void 0:function(){return b(!1)},onFocus:function(){return b(!0)},onBlur:function(){return b(!1)},onClick:function(){return b((function(e){return!e}))},css:v?{position:"absolute",insetInlineEnd:"10px",top:0,bottom:0,zIndex:l.rM,margin:"auto",cursor:"pointer",height:"100%",display:"flex"}:{position:"relative",marginInlineStart:"8px",display:"flex",alignItems:"center"}},{children:(0,n.tZ)(a.by,{cssStyles:f.getTarget("tooltipIcon")})})),(0,n.tZ)(c.Z,d({show:y,targetRef:w,containerRef:h,placement:"left",onHide:function(){return b(!1)},offset:8},{children:(0,n.tZ)(i.u,d({id:"tooltip-".concat(t),css:{zIndex:l.rM+1,padding:".4rem 0",transition:"opacity .10s linear",".tooltip-inner":{maxWidth:"200px",padding:".25rem .5rem",color:"#fff",textAlign:"center",backgroundColor:"#000",borderRadius:".25rem",fontSize:"smaller"}}},{children:r}))}))]})}},47449:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(35944),o=r(67294),i=r(73935),a=r(39479),l=function(){return l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};const u=function(e){var t=e.show,r=e.targetRef,u=e.children,d=e.onHide,f=e.placement,p=void 0===f?"bottom-start":f,v=e.offset,h=void 0===v?0:v,m=e.zIndex,g=void 0===m?1e3:m,y=e.containerRef,b=(0,o.useRef)(null),w=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}((0,o.useState)(null),2),x=w[0],k=w[1],S=(0,o.useCallback)((function(){return(null==y?void 0:y.current)||(0,a.me)().body}),[y]),O=(0,o.useCallback)((function(){var e;if(t&&r.current&&b.current){var n=(0,a.Kv)(),o=S();if(o){var i=r.current.getBoundingClientRect(),l=b.current.getBoundingClientRect(),u=o.getBoundingClientRect(),d=s(p,i,l,h),f=d.top,v=d.left,m=f+l.height,g=v+l.width,y=f>=0&&m<=n.innerHeight,w=v>=0&&g<=n.innerWidth;if(!y||!w){var x=c(p,!y,!w);x!==p&&(f=(e=s(x,i,l,h)).top,v=e.left)}var O=o===(0,a.me)().body,E=O?f+n.scrollY:f-u.top,R=O?v+n.scrollX:v-u.left;k((function(e){return e&&e.top===E&&e.left===R?e:{top:E,left:R}}))}}}),[t,p,h,S,r]),E=(0,o.useCallback)((function(){var e=!1;return function(){e||(e=!0,requestAnimationFrame((function(){O(),e=!1})))}}),[O])();if((0,o.useLayoutEffect)((function(){t&&O()}),[t,O]),(0,o.useEffect)((function(){if(t){var e=(0,a.Kv)(),n=S();if(n){e.addEventListener("resize",E),e.addEventListener("scroll",E,!0),n!==(0,a.me)().body&&n.addEventListener("scroll",E);var o=new ResizeObserver((function(){return E()}));return r.current&&o.observe(r.current),n!==(0,a.me)().body&&o.observe(n),function(){e.removeEventListener("resize",E),e.removeEventListener("scroll",E,!0),n!==(0,a.me)().body&&n.removeEventListener("scroll",E),o.disconnect()}}}}),[t,E,S,r]),(0,o.useEffect)((function(){if(t){var e=function(e){"Escape"===e.key&&(k(null),null==d||d())},n=function(e){var t=e.target;b.current&&!b.current.contains(t)&&r.current&&!r.current.contains(t)&&(k(null),null==d||d())},o=(0,a.me)();return o.addEventListener("mousedown",n),o.addEventListener("keydown",e),function(){o.removeEventListener("mousedown",n),o.removeEventListener("keydown",e)}}}),[t,d,r]),!t)return null;var R=S();return R?(0,i.createPortal)((0,n.tZ)("div",l({ref:b,style:l(l({position:"absolute"},x||{top:-9999,left:-9999}),{zIndex:g})},{children:u})),R):(0,n.tZ)(n.HY,{children:u})};var c=function(e,t,r){if(t){if(e.includes("top"))return e.replace("top","bottom");if(e.includes("bottom"))return e.replace("bottom","top")}if(r){if(e.includes("left"))return e.replace("left","right");if(e.includes("right"))return e.replace("right","left")}return e},s=function(e,t,r,n){switch(void 0===n&&(n=0),e){case"top":return{top:t.top-r.height-n,left:t.left+(t.width-r.width)/2};case"top-start":return{top:t.top-r.height-n,left:t.left};case"top-end":return{top:t.top-r.height-n,left:t.right-r.width};case"left":return{top:t.top+(t.height-r.height)/2,left:t.left-r.width-n};case"left-start":return{top:t.top,left:t.left-r.width-n};case"left-end":return{top:t.bottom-r.height,left:t.left-r.width-n};case"bottom":default:return{top:t.bottom+n,left:t.left+(t.width-r.width)/2};case"bottom-start":return{top:t.bottom+n,left:t.left};case"bottom-end":return{top:t.bottom+n,left:t.right-r.width};case"right":return{top:t.top+(t.height-r.height)/2,left:t.right+n};case"right-start":return{top:t.top,left:t.right+n};case"right-end":return{top:t.bottom-r.height,left:t.right+n}}}},29069:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(35944),o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)};function i(e){var t,r,i,a=e.value,l=e.element,u=e.responsiveStyles,c=e.type,s=void 0===c?"input":c,d=e.inputFocused,f=void 0!==d&&d,p=e.repeatIndex,v=void 0===p?null:p,h=l.properties,m=null!==(i=(null!==(r=h.repeat_placeholder)&&void 0!==r?r:[])[null!=v?v:0])&&void 0!==i?i:h.placeholder||"",g=o(o({},u.getTarget("placeholderFocus")),u.getTarget("placeholderActive"));return(0,n.tZ)("span",o({css:o(o(o(o({position:"absolute",pointerEvents:"none",insetInlineStart:"0.75rem",transition:"0.2s ease all",top:"input"===s?"50%":"0.6rem"},u.getTarget("placeholder")),a?u.getTarget("placeholderFocus"):{}),f?g:{}),(t={},t["".concat(s,":focus ~ &")]=g,t))},{children:m}))}},18776:(e,t,r)=>{r.d(t,{u:()=>a});var n=r(35944),o=r(52988),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=function(e){var t=e.children,r=e.css,a=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["children","css"]);return(0,n.tZ)("div",i({css:i({zIndex:o.rM+1,padding:".4rem 0",transition:"opacity .10s linear",".tooltip-inner":{maxWidth:"200px",padding:".25rem .5rem",color:"#fff",textAlign:"center",backgroundColor:"#000",borderRadius:".25rem",fontSize:"smaller"}},r)},a,{children:(0,n.tZ)("div",i({className:"tooltip-inner"},{children:t}))}))}},46529:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Z});var n=r(35944),o=r(67294),i=r(29069),a=r(11587),l=r(1211),u=r(99234),c=r(6867),s=r(71275),d=r(47449),f=r(45398),p=function(){return p=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},p.apply(this,arguments)};const v=(0,o.memo)((function(e){var t=e.allOptions,r=void 0===t?[]:t,i=e.showOptions,a=e.onSelect,l=void 0===a?function(){}:a,u=e.onHide,c=void 0===u?function(){}:u,v=e.onInputFocus,h=void 0===v?function(){}:v,m=e.value,g=void 0===m?"":m,y=e.containerRef,b=e.responsiveStyles,w=e.listItemRef,x=e.children,k=r.filter((function(e){return e.toLowerCase().includes(g.toLowerCase())})),S=(0,o.useRef)(null),O=(0,f.Z)(S).width;return 0===r.length?x:(0,n.BX)("div",p({ref:S,css:{height:"100%",width:"100%"}},{children:[x,k.length>0&&i&&(0,n.tZ)(d.Z,p({targetRef:S,containerRef:y,show:!0,placement:"bottom-start",onHide:c},{children:(0,n.tZ)("ul",p({css:p({zIndex:s.m6,listStyleType:"none",padding:0,margin:0,maxHeight:"210px",overflowY:"scroll",overflowX:"auto",width:void 0!==O?"".concat(O,"px"):"100%",backgroundColor:"white",cursor:"pointer",boxShadow:"0 0 4px rgb(0 0 0 / 15%)"},b.getTarget("dropdown"))},{children:k.map((function(e,t){return(0,n.tZ)("li",p({css:{padding:"8px 14px",transition:"0.1s ease all","&:hover":{backgroundColor:"#e6e6e633"},"&:focus-visible":{outline:"none",backgroundColor:"#e6e6e644"}},tabIndex:0,ref:function(e){w.current[t]=e},onClick:function(){return l(e)},onKeyDown:function(r){var n,o,i=function(){r.preventDefault(),r.stopPropagation()};"Enter"===r.key?(i(),l(e)):["ArrowDown","ArrowRight"].includes(r.key)?(i(),null===(n=w.current[t].nextSibling)||void 0===n||n.focus()):["ArrowUp","ArrowLeft"].includes(r.key)&&(i(),0===t?h():null===(o=w.current[t].previousSibling)||void 0===o||o.focus())},onBlur:function(e){e.relatedTarget&&w.current.some((function(t){return t===e.relatedTarget}))||c()}},{children:e}),"".concat(e,"-").concat(t))}))}))}))]}))}));var h=r(7193),m=r(20426),g=r(52988),y=r(39479),b=r(65096),w=r(33466),x=function(){return x=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},x.apply(this,arguments)},k=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},S={text_area:16384,url:256,gmap_zip:10},O=function(e){var t;return null!==(t=S[e])&&void 0!==t?t:1024};function E(e){return(null!=e?e:"").replaceAll("0","\\0").replaceAll("a","\\a").replaceAll("b","\\b").replaceAll("*","\\*")}function R(e){var t=e.metadata,r=E(t.prefix),n=E(t.suffix),o="";if(t.mask)o=t.mask;else{var i=t.allowed_characters;"gmap_zip"!==e.type||i||(i="alphaspace");var a=function(e){switch(e){case"letters":return"a";case"alphanumeric":return"b";case"alphaspace":return"c";case"digits":return"0";default:return"*"}}(i),l=O(e.type)-r.length-n.length;e.max_length&&(l=Math.min(e.max_length,l)),o="[".concat(a.repeat(l),"]")}return"".concat(r).concat(o).concat(n)}function C(e,t,r){var n,o,i,a,l=null!==(n=e.max_length)&&void 0!==n?n:O(e.type);switch(e.type){case"integer_field":a={mask:"num",blocks:{num:{mask:Number,radix:".",thousandsSeparator:",",scale:2,max:null!==(o=e.max_length)&&void 0!==o?o:Number.MAX_SAFE_INTEGER,min:Math.max(0,null!==(i=e.min_length)&&void 0!==i?i:0)}},value:t.toString()},"currency"===e.format&&(a.mask="$num");break;case"ssn":a={mask:e.metadata.last_four_digits?"∗∗∗ - ∗∗ - 0000":"000 - 00 - 0000",displayChar:r?void 0:"∗",placeholderChar:e.metadata.last_four_digits?" ":void 0,lazy:!e.metadata.last_four_digits};break;case"email":case"text_area":case"url":a={mask:new RegExp("^.{0,".concat(l,"}$")),maxLength:l};break;default:e.metadata.mask&&(l=void 0),a={mask:R(e),definitions:{b:/[a-zA-Z0-9]/,c:/[a-zA-Z0-9 ]/},maxLength:l}}return x({lazy:!1,unmask:!e.metadata.save_mask},a)}function L(e,t,r){var n,o={minLength:e.min_length},i=null!==(n=e.max_length)&&void 0!==n?n:O(e.type);t.length>0&&(o.autoComplete="off");var a=e.metadata;switch(e.type){case"integer_field":return{inputMode:"decimal"};case"email":return r&&!o.autoComplete&&(o.autoComplete="email"),x({type:"email",pattern:u.Z1,maxLength:i},o);case"gmap_zip":return r&&!o.autoComplete&&(o.autoComplete="postal-code"),x(x({},o),{maxLength:i,inputMode:"digits"===a.allowed_characters?"numeric":"text"});case"url":return r&&!o.autoComplete&&(o.autoComplete="url",o.maxLength=i),o;case"ssn":return x({inputMode:"numeric"},o);default:return o.maxLength=i,a.custom_autocomplete&&!o.autoComplete&&(o.autoComplete=a.custom_autocomplete),a.number_keypad||"digits"===a.allowed_characters?x({inputMode:"numeric"},o):o}}const Z=(0,o.memo)((function(e){var t,r,u=e.element,s=e.responsiveStyles,d=e.fieldLabel,f=e.elementProps,p=void 0===f?{}:f,S=e.required,O=void 0!==S&&S,E=e.disabled,R=void 0!==E&&E,Z=e.autoComplete,_=e.editMode,I=e.onAccept,T=void 0===I?function(){}:I,z=e.onEnter,A=void 0===z?function(){}:z,j=e.setRef,M=void 0===j?function(){}:j,B=e.inlineError,F=e.repeatIndex,P=void 0===F?null:F,H=e.children,X=k((0,o.useState)(!1),2),D=X[0],K=X[1],N=k((0,o.useState)(!1),2),q=N[0],W=N[1],Y=(0,c.Z)({element:u,error:B,breakpoint:s.getMobileBreakpoint()}),U=Y.borderStyles,$=Y.customBorder,G=Y.borderId,J=(0,o.useRef)(null),Q=(0,o.useRef)([]),V=(0,o.useRef)(null),ee=(0,h.OL)(u).value,te=(0,m.e7)(ee),re=u.servar,ne=(null!==(r=re.metadata.options)&&void 0!==r?r:[]).filter((function(e){return e})),oe=u.properties.tooltipText?30:8;return(0,n.BX)("div",x({ref:J,css:x({maxWidth:"100%",width:"100%",height:"100%",position:"relative",pointerEvents:_?"none":"auto"},s.getTarget("fc"))},p,{children:[H,d,(0,n.BX)("div",x({css:x(x(x({position:"relative",width:"100%",whiteSpace:"nowrap",overflowX:"clip"},s.getTarget("sub-fc")),R?s.getTarget("disabled"):{}),{"&:focus-within":x(x({},s.getTarget("active")),U.active),"&:hover":(0,y.wL)(R?{}:x(x({},s.getTarget("hover")),U.hover))})},{children:[(0,n.tZ)(v,x({allOptions:ne,value:te,showOptions:D,onSelect:function(e){var t,r,n;T(e,{}),K(!1),null===(n=null===(r=null===(t=V.current)||void 0===t?void 0:t.element)||void 0===r?void 0:r.focus)||void 0===n||n.call(r)},responsiveStyles:s,containerRef:J,listItemRef:Q,onHide:function(){return K(!1)},onInputFocus:function(){var e,t,r;return null===(r=null===(t=null===(e=V.current)||void 0===e?void 0:e.element)||void 0===t?void 0:t.focus)||void 0===r?void 0:r.call(t)}},{children:(0,n.tZ)(w.oc,x({id:re.key,name:re.key,ref:V,css:x(x(x({position:"relative",zIndex:g.rM,height:"100%",width:"100%",border:"none",margin:0,backgroundColor:"transparent"},l.ET),s.getTarget("field")),(t={"&:focus":s.getTarget("field")["&:focus"]},t["&:focus ~ #".concat(G)]=Object.values(U.active)[0],t["&:not(:focus)"]=te||!u.properties.placeholder?{}:{color:"transparent !important"},t)),required:O,disabled:R,placeholder:"",value:te,"aria-label":u.properties.aria_label,onKeyDown:function(e){if("Enter"===e.key)A(e);else if(ne.length){if(!te&&["Backspace","Delete"].includes(e.key))return;if(["ArrowUp","ArrowLeft","ArrowRight"].includes(e.key))return;K("Escape"!==e.key),"ArrowDown"===e.key&&setTimeout((function(){var e;return null===(e=Q.current[0])||void 0===e?void 0:e.focus({preventScroll:!0})}),0)}},onBlur:function(e){e.relatedTarget&&Q.current.some((function(t){return t===e.relatedTarget}))||ne.length>0&&setTimeout((function(){return K(!1)}),200)},onFocus:y.ms,inputRef:M},L(re,ne,"on"===Z),C(re,te,q),{onAccept:T}))})),"ssn"===re.type&&te&&(0,n.tZ)("div",x({css:{position:"absolute",cursor:"pointer",insetInlineEnd:"".concat(oe,"px"),top:"calc(50% - 12px)",zIndex:g.rM},onClick:function(){return W((function(e){return!e}))},"aria-label":"Toggle SSN visibility"},{children:q?(0,n.tZ)(b.uL,{}):(0,n.tZ)(b.FX,{})})),$,(0,n.tZ)(i.Z,{value:te,element:u,responsiveStyles:s,repeatIndex:P}),(0,n.tZ)(a.Z,{containerRef:J,id:u.id,text:u.properties.tooltipText,responsiveStyles:s,repeat:u.repeat})]}))]}))}))},45398:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(67294),o=r(39479);function i(e){var t=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}((0,n.useState)({width:void 0,height:void 0}),2),r=t[0],i=t[1];return(0,n.useLayoutEffect)((function(){var t=function(){var t=e.current;if(t){var r=t.getBoundingClientRect(),n=r.width,o=r.height;i({width:n>0?n:void 0,height:o>0?o:void 0})}},r=e.current;if(r){if("undefined"==typeof ResizeObserver){var n=(0,o.Kv)();return n&&"function"==typeof n.addEventListener&&"function"==typeof n.removeEventListener?(n.addEventListener("resize",t),t(),function(){return n.removeEventListener("resize",t)}):void t()}var a=new ResizeObserver((function(){return t()}));try{a.observe(r,{box:"border-box"})}catch(e){a.observe(r)}return t(),function(){return a.disconnect()}}}),[e]),r}}}]);