@feathery/react 2.31.0 → 2.32.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/cjs/Form/grid/Element/index.d.ts.map +1 -1
  2. package/cjs/Form/index.d.ts.map +1 -1
  3. package/cjs/assistant/index.d.ts +4 -8
  4. package/cjs/assistant/index.d.ts.map +1 -1
  5. package/cjs/assistant/utils.d.ts +23 -0
  6. package/cjs/assistant/utils.d.ts.map +1 -0
  7. package/cjs/elements/basic/TableElement/Actions.d.ts +1 -3
  8. package/cjs/elements/basic/TableElement/Actions.d.ts.map +1 -1
  9. package/cjs/elements/basic/TableElement/Search.d.ts.map +1 -1
  10. package/cjs/elements/basic/TableElement/index.d.ts +1 -1
  11. package/cjs/elements/basic/TableElement/index.d.ts.map +1 -1
  12. package/cjs/elements/basic/TableElement/styles.d.ts +4 -221
  13. package/cjs/elements/basic/TableElement/styles.d.ts.map +1 -1
  14. package/cjs/elements/basic/TableElement/useTableData.d.ts +1 -6
  15. package/cjs/elements/basic/TableElement/useTableData.d.ts.map +1 -1
  16. package/cjs/elements/components/icons/index.d.ts +1 -2
  17. package/cjs/elements/components/icons/index.d.ts.map +1 -1
  18. package/cjs/{fthry_FormControl.WIYoX7l6.js → fthry_FormControl.DurQlaqU.js} +1 -1
  19. package/cjs/{fthry_InlineTooltip.C6Kf0Ff-.js → fthry_InlineTooltip.BXWfZzL2.js} +2 -2
  20. package/cjs/{fthry_Overlay.JRkHffzB.js → fthry_Overlay.CioCMhlq.js} +1 -1
  21. package/cjs/{fthry_PaymentMethodField.DvPj_Lup.js → fthry_PaymentMethodField.DhSkUuU-.js} +4 -4
  22. package/cjs/{fthry_Placeholder.luXrF_m_.js → fthry_Placeholder.CX7qc-Cl.js} +1 -1
  23. package/cjs/{fthry_ShowEyeIcon.cWxfPj5A.js → fthry_ShowEyeIcon.80VHzelN.js} +1 -1
  24. package/cjs/{fthry_index.B_WCqLEf.js → fthry_index.9yf8TiBa.js} +2 -2
  25. package/cjs/{fthry_index.Bxz6SYIg.js → fthry_index.B8tZZXUF.js} +6 -6
  26. package/cjs/{fthry_index.BT0N_ojJ.js → fthry_index.BnYce3sm.js} +5 -5
  27. package/cjs/{fthry_index.DtcJ5ShY.js → fthry_index.Br877QRA.js} +3 -3
  28. package/cjs/{fthry_index.Be2Fs97T.js → fthry_index.BrWW45H5.js} +5 -5
  29. package/cjs/{fthry_index.Ax4XuQ-W.js → fthry_index.C05KVXV6.js} +1 -1
  30. package/cjs/{fthry_index.CmAB9Ar7.js → fthry_index.C5QUdS7L.js} +1 -1
  31. package/cjs/{fthry_index.BS2jEY70.js → fthry_index.CANZBm-k.js} +5 -5
  32. package/cjs/{fthry_index.DWS39de6.js → fthry_index.CLPl9dPm.js} +1 -1
  33. package/cjs/{fthry_index.CcK_Svsf.js → fthry_index.CY58pJ5G.js} +6 -6
  34. package/cjs/{fthry_index.DdSDwu2Z.js → fthry_index.Cgn2gw_g.js} +1 -1
  35. package/cjs/{fthry_index.7lPT7adc.js → fthry_index.Cm-Al4PR.js} +4 -4
  36. package/cjs/{fthry_index.DtiRdy95.js → fthry_index.CwZL5tZB.js} +3 -3
  37. package/cjs/{fthry_index.W-9IfXEV.js → fthry_index.D3P96Nnw.js} +4 -4
  38. package/cjs/{fthry_index.D_RuNzwI.js → fthry_index.DALbyltA.js} +8 -8
  39. package/cjs/{fthry_index.C51tqyoq.js → fthry_index.DPXTa2dj.js} +1 -1
  40. package/cjs/{fthry_index.IHqwZyC3.js → fthry_index.DQL_RNQ5.js} +361 -54
  41. package/cjs/{fthry_index.CfElaaWV.js → fthry_index.DXol9L5L.js} +6 -6
  42. package/cjs/{fthry_index.B1gH_Pb_.js → fthry_index.Dofn1W06.js} +4 -4
  43. package/cjs/{fthry_index.C4a2Ic12.js → fthry_index.DpeEqUaO.js} +1 -1
  44. package/cjs/{fthry_index.Io4u55nU.js → fthry_index.NnMUv723.js} +47 -527
  45. package/cjs/{fthry_index.TgxeIOKY.js → fthry_index.Oufk9PK1.js} +2 -2
  46. package/cjs/{fthry_index.Caau3hdX.js → fthry_index.RkgEXvkN.js} +5 -5
  47. package/cjs/{fthry_index.BAf-75T4.js → fthry_index.cjyiNFQz.js} +1 -1
  48. package/cjs/{fthry_input.QMSUSm2J.js → fthry_input.Ek-TePLo.js} +1 -1
  49. package/cjs/{fthry_script.Bnnc8FZ3.js → fthry_script.D4I5wEAM.js} +1 -1
  50. package/cjs/{fthry_styles.MX1EKxvQ.js → fthry_styles.BAOkmtNa.js} +1 -1
  51. package/cjs/{fthry_useElementSize.Dup4Oq53.js → fthry_useElementSize.DxiZSHps.js} +1 -1
  52. package/cjs/{fthry_useSalesforceSync.D0kLb1UT.js → fthry_useSalesforceSync.0Po-_R2K.js} +1 -1
  53. package/cjs/{fthry_webfontloader.C-AsnAPa.js → fthry_webfontloader.Dpbr76nZ.js} +1 -1
  54. package/cjs/index.d.ts +0 -1
  55. package/cjs/index.d.ts.map +1 -1
  56. package/cjs/index.js +1 -1
  57. package/dist/Form/grid/Element/index.d.ts.map +1 -1
  58. package/dist/Form/index.d.ts.map +1 -1
  59. package/dist/assistant/index.d.ts +4 -8
  60. package/dist/assistant/index.d.ts.map +1 -1
  61. package/dist/assistant/utils.d.ts +23 -0
  62. package/dist/assistant/utils.d.ts.map +1 -0
  63. package/dist/elements/basic/TableElement/Actions.d.ts +1 -3
  64. package/dist/elements/basic/TableElement/Actions.d.ts.map +1 -1
  65. package/dist/elements/basic/TableElement/Search.d.ts.map +1 -1
  66. package/dist/elements/basic/TableElement/index.d.ts +1 -1
  67. package/dist/elements/basic/TableElement/index.d.ts.map +1 -1
  68. package/dist/elements/basic/TableElement/styles.d.ts +4 -221
  69. package/dist/elements/basic/TableElement/styles.d.ts.map +1 -1
  70. package/dist/elements/basic/TableElement/useTableData.d.ts +1 -6
  71. package/dist/elements/basic/TableElement/useTableData.d.ts.map +1 -1
  72. package/dist/elements/components/icons/index.d.ts +1 -2
  73. package/dist/elements/components/icons/index.d.ts.map +1 -1
  74. package/dist/{fthry_FormControl.DEleJ-Vj.js → fthry_FormControl.CxJVENhU.js} +1 -1
  75. package/dist/{fthry_InlineTooltip.DeG1g5MU.js → fthry_InlineTooltip.CqD5dxb4.js} +2 -2
  76. package/dist/{fthry_Overlay.CtQBdlg7.js → fthry_Overlay.C-S2P_RR.js} +1 -1
  77. package/dist/{fthry_PaymentMethodField.CryiQIpT.js → fthry_PaymentMethodField.QXLEi8jw.js} +4 -4
  78. package/dist/{fthry_Placeholder.Bel7e4T4.js → fthry_Placeholder.DdvJyqsu.js} +1 -1
  79. package/dist/{fthry_ShowEyeIcon.BeXoEyvh.js → fthry_ShowEyeIcon.CZus1erN.js} +1 -1
  80. package/dist/{fthry_index.BNi8VaMz.js → fthry_index.4JG7sxtp.js} +2 -2
  81. package/dist/{fthry_index.CUF2y3Aa.js → fthry_index.9VAfgoMl.js} +1 -1
  82. package/dist/{fthry_index.Dkg3j5xH.js → fthry_index.B3B8bEEX.js} +2 -2
  83. package/dist/{fthry_index.y9utv2Db.js → fthry_index.BJVuZZ2J.js} +1 -1
  84. package/dist/{fthry_index.DR8HsKVo.js → fthry_index.BL5rEBAF.js} +4 -4
  85. package/dist/{fthry_index.D7lNVIgD.js → fthry_index.BT7cSNXV.js} +1 -1
  86. package/dist/{fthry_index.DtrV_j07.js → fthry_index.BV8FC0Yc.js} +1 -1
  87. package/dist/{fthry_index.Bi8oY0jk.js → fthry_index.B_7ywejL.js} +5 -5
  88. package/dist/{fthry_index.CMh4cU_z.js → fthry_index.Bk7-v1ou.js} +362 -55
  89. package/dist/{fthry_index.DSS7GFbG.js → fthry_index.BmrKBP2b.js} +4 -4
  90. package/dist/{fthry_index.By9Va7yz.js → fthry_index.Bn5hHeFA.js} +6 -6
  91. package/dist/{fthry_index.DclrMlf2.js → fthry_index.BpZ7gZfF.js} +5 -5
  92. package/dist/{fthry_index.ClSefCHf.js → fthry_index.BsCv8dPB.js} +1 -1
  93. package/dist/{fthry_index.F3kjcuAK.js → fthry_index.C5ZHl-kt.js} +48 -528
  94. package/dist/{fthry_index.D9GA9x4P.js → fthry_index.C6CFRFmj.js} +3 -3
  95. package/dist/{fthry_index.0A10yDWO.js → fthry_index.CNIO-M5G.js} +1 -1
  96. package/dist/{fthry_index.CVQd320z.js → fthry_index.Cr2SZgDK.js} +8 -8
  97. package/dist/{fthry_index.Bk-p0axS.js → fthry_index.CsSJubdr.js} +6 -6
  98. package/dist/{fthry_index.Bb9yC_Hb.js → fthry_index.Cv8JZvnf.js} +3 -3
  99. package/dist/{fthry_index.D_JQEcg-.js → fthry_index.DUhZfNzg.js} +4 -4
  100. package/dist/{fthry_index.sWxp-JjY.js → fthry_index.DVRFkK73.js} +5 -5
  101. package/dist/{fthry_index.DKiSNQ6p.js → fthry_index.DmqZnhoE.js} +1 -1
  102. package/dist/{fthry_index.C9r-2T-9.js → fthry_index.p64tvQaa.js} +6 -6
  103. package/dist/{fthry_index.Dxpjw81y.js → fthry_index.wqVaa2JI.js} +5 -5
  104. package/dist/{fthry_input.DlZicl10.js → fthry_input.aOsdUSPt.js} +1 -1
  105. package/dist/{fthry_script.BjtIkib6.js → fthry_script.HcN-guNp.js} +1 -1
  106. package/dist/{fthry_styles.Dxs0EByz.js → fthry_styles.BLq5f5E_.js} +1 -1
  107. package/dist/{fthry_useElementSize.BeQYF72J.js → fthry_useElementSize.ZyD83Wr1.js} +1 -1
  108. package/dist/{fthry_useSalesforceSync.DcCcNLS2.js → fthry_useSalesforceSync.Ddbp4SYp.js} +1 -1
  109. package/dist/{fthry_webfontloader.B7FGEMJA.js → fthry_webfontloader.C3IotuWt.js} +1 -1
  110. package/dist/index.d.ts +0 -1
  111. package/dist/index.d.ts.map +1 -1
  112. package/dist/index.js +1 -1
  113. package/package.json +1 -1
  114. package/umd/{277.87e6ca5c1cf2a7477992.js → 277.d9907ecd5dc2117c9171.js} +1 -1
  115. package/umd/{509.bca2ff43c66b1dba064f.js → 509.a863f8749c28540476bb.js} +2 -2
  116. package/umd/{AddressField.2d777eda22a67a0ed3a3.js → AddressField.ec97334fe233830bc05b.js} +1 -1
  117. package/umd/{DateSelectorField.54afc978d2fd9d10b106.js → DateSelectorField.00f321e0b1972feb9d69.js} +1 -1
  118. package/umd/{FileUploadField.7a5028fb6035d09b3e81.js → FileUploadField.ea0067dd62b0454b7c2e.js} +1 -1
  119. package/umd/{PasswordField.7585ef588333cb4181f7.js → PasswordField.1358356d6fbc6880f12a.js} +1 -1
  120. package/umd/{PaymentMethodField.d08bcfa1efb56084572d.js → PaymentMethodField.9a8e934f7450eb141217.js} +1 -1
  121. package/umd/{PhoneField.19c987f04cfcb60ab07c.js → PhoneField.c526085aaa5ccd25e982.js} +1 -1
  122. package/umd/{SignatureField.0e7d60fa2fafcb6be554.js → SignatureField.d710930ca89642eb651c.js} +1 -1
  123. package/umd/TableElement.ee77e0f53a9ccac846ab.js +1 -0
  124. package/umd/{TextArea.7cca0d69e618846660c5.js → TextArea.f566845d458d4c00e0e7.js} +1 -1
  125. package/umd/{TextField.f5cc4a03e69d5872027b.js → TextField.5a5296fe3ea60c4459f2.js} +1 -1
  126. package/umd/index.js +1 -1
  127. package/cjs/elements/basic/TableElement/DeleteConfirm.d.ts +0 -11
  128. package/cjs/elements/basic/TableElement/DeleteConfirm.d.ts.map +0 -1
  129. package/cjs/elements/basic/TableElement/EditableCell.d.ts +0 -10
  130. package/cjs/elements/basic/TableElement/EditableCell.d.ts.map +0 -1
  131. package/cjs/elements/basic/TableElement/useColumnWidths.d.ts +0 -7
  132. package/cjs/elements/basic/TableElement/useColumnWidths.d.ts.map +0 -1
  133. package/cjs/elements/basic/TableElement/useTableMutations.d.ts +0 -23
  134. package/cjs/elements/basic/TableElement/useTableMutations.d.ts.map +0 -1
  135. package/cjs/elements/components/icons/TrashIcon.d.ts +0 -3
  136. package/cjs/elements/components/icons/TrashIcon.d.ts.map +0 -1
  137. package/dist/elements/basic/TableElement/DeleteConfirm.d.ts +0 -11
  138. package/dist/elements/basic/TableElement/DeleteConfirm.d.ts.map +0 -1
  139. package/dist/elements/basic/TableElement/EditableCell.d.ts +0 -10
  140. package/dist/elements/basic/TableElement/EditableCell.d.ts.map +0 -1
  141. package/dist/elements/basic/TableElement/useColumnWidths.d.ts +0 -7
  142. package/dist/elements/basic/TableElement/useColumnWidths.d.ts.map +0 -1
  143. package/dist/elements/basic/TableElement/useTableMutations.d.ts +0 -23
  144. package/dist/elements/basic/TableElement/useTableMutations.d.ts.map +0 -1
  145. package/dist/elements/components/icons/TrashIcon.d.ts +0 -3
  146. package/dist/elements/components/icons/TrashIcon.d.ts.map +0 -1
  147. package/umd/TableElement.b9bb3cedf1a75fd2ea01.js +0 -1
  148. /package/umd/{509.bca2ff43c66b1dba064f.js.LICENSE.txt → 509.a863f8749c28540476bb.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[985],{1587:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(5944),o=r(7294),i=r(8776),l=r(5096),a=r(2988),c=r(4665),u=r(7449),s=r(9479),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,y=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),m=y[0],b=y[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:m,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}))}))]})}},7449:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(5944),o=r(7294),i=r(3935),l=r(9479),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,y=void 0===g?1e3:g,m=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],E=w[1],O=(0,o.useCallback)((function(){return(null==m?void 0:m.current)||(0,l.me)().body}),[m]),S=(0,o.useCallback)((function(){var e;if(t&&r.current&&b.current){var n=(0,l.Kv)(),o=O();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,y=h+a.width,m=d>=0&&g<=n.innerHeight,w=h>=0&&y<=n.innerWidth;if(!m||!w){var x=u(p,!m,!w);x!==p&&(d=(e=s(x,i,a,v)).top,h=e.left)}var S=o===(0,l.me)().body,k=S?d+n.scrollY:d-c.top,C=S?h+n.scrollX:h-c.left;E((function(e){return e&&e.top===k&&e.left===C?e:{top:k,left:C}}))}}}),[t,p,v,O,r]),k=(0,o.useCallback)((function(){var e=!1;return function(){e||(e=!0,requestAnimationFrame((function(){S(),e=!1})))}}),[S])();if((0,o.useLayoutEffect)((function(){t&&S()}),[t,S]),(0,o.useEffect)((function(){if(t){var e=(0,l.Kv)(),n=O();if(n){e.addEventListener("resize",k),e.addEventListener("scroll",k,!0),n!==(0,l.me)().body&&n.addEventListener("scroll",k);var o=new ResizeObserver((function(){return k()}));return r.current&&o.observe(r.current),n!==(0,l.me)().body&&o.observe(n),function(){e.removeEventListener("resize",k),e.removeEventListener("scroll",k,!0),n!==(0,l.me)().body&&n.removeEventListener("scroll",k),o.disconnect()}}}}),[t,k,O,r]),(0,o.useEffect)((function(){if(t){var e=function(e){"Escape"===e.key&&(E(null),null==f||f())},n=function(e){var t=e.target;b.current&&!b.current.contains(t)&&r.current&&!r.current.contains(t)&&(E(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 C=O();return C?(0,i.createPortal)((0,n.tZ)("div",a({ref:b,style:a(a({position:"absolute"},x||{top:-9999,left:-9999}),{zIndex:y})},{children:c})),C):(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}}}},8776:(e,t,r)=>{r.d(t,{u:()=>l});var n=r(5944),o=r(2988),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}))}))}},4023:(e,t,r)=>{r.r(t),r.d(t,{default:()=>y});var n=r(5944),o=r(7294),i=r(6664),l=r(8678),a=r(426),c=r(1587),u=r(1211),s=r(6867),f=r(9479),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)},p=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},h=["backgroundColor","color","fontFamily","fontSize","fontSmoothing","fontStyle","fontVariant","fontWeight","iconColor","lineHeight","letterSpacing","textAlign","padding","textDecoration","textShadow","textTransform"],v=function(e){return d(d({},e),{fontFamily:"sans-serif"})},g=function(e){var t=e.element,r=e.responsiveStyles,l=e.fieldLabel,f=e.elementProps,g=void 0===f?{}:f,y=e.setCardElement,m=void 0===y?function(){}:y,b=e.setFieldError,w=void 0===b?function(){}:b,x=e.onChange,E=void 0===x?function(){}:x,O=e.autoFocus,S=void 0!==O&&O,k=e.editMode,C=e.inlineError,Z=e.children,j=p((0,o.useState)(!1),2),R=j[0],I=j[1],L=(0,s.Z)({element:t,error:C,breakpoint:r.getMobileBreakpoint()}),B=L.borderStyles,F=L.customBorder,P=(0,o.useRef)(null),T=(0,i.useStripe)(),z=(0,i.useElements)(),M=p((0,o.useState)(""),2),Y=M[0],H=M[1];(0,o.useEffect)((function(){if(T&&z){var e=z.getElement(i.CardElement);S&&(null==e||e.on("ready",(function(){return e.focus()}))),m(t.servar.key,e)}}),[T,t.servar.key,z]);var X={style:{base:d(d({textDecoration:"none"},(0,a.Yp)(v(r.getTarget("field")),h)),{"::placeholder":d({textDecoration:"none"},(0,a.Yp)(v(r.getTarget("placeholder")),h)),":hover":(0,a.Yp)(v(r.getTarget("hoverFont")),h),":focus":(0,a.Yp)(v(r.getTarget("activeFont")),h)}),complete:v(r.getTarget("completedFont")),invalid:{color:u.xb,iconColor:u.xb}},classes:{base:t.servar.key}};return(0,n.BX)("div",d({ref:P,css:d({maxWidth:"100%",width:"100%",height:"100%",position:"relative",pointerEvents:k?"none":"auto"},r.getTarget("fc"))},g,{children:[Z,l,(0,n.BX)("div",d({css:d(d({position:"relative",width:"100%",whiteSpace:"nowrap",padding:"0 2px",display:"flex",alignItems:"center"},r.getTarget("sub-fc")),{"&:hover":d(d({},r.getTarget("hover")),B.hover),"&&":R?d(d({},r.getTarget("active")),B.active):{}})},{children:[F,(0,n.BX)("div",d({css:{width:"100%",position:"relative"}},{children:[(0,n.tZ)("input",{id:t.servar.key,name:t.servar.key,css:{width:"100%",height:0,border:"none",opacity:0,"&:focus":{outline:"none"}},tabIndex:"-1"}),(0,n.tZ)(i.CardElement,{css:{position:"absolute",top:0,left:5,right:5,width:"100%"},options:X,onChange:function(e){var t,r,n=null!==(r=null===(t=e.error)||void 0===t?void 0:t.message)&&void 0!==r?r:"";Y!==n&&(H(n),w(n)),E(e.complete?{complete:!0,card_data:{brand:e.brand}}:"")},onFocus:function(){return I(!0)},onBlur:function(){return I(!1)}})]})),(0,n.tZ)(c.Z,{containerRef:P,id:t.id,text:t.properties.tooltipText,responsiveStyles:r,repeat:t.repeat})]}))]}))};const y=(0,o.memo)((function(e){var t=e.editMode,r=e.children,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,["editMode","children"]),c=(0,l.d2)();return(0,o.useEffect)((function(){t&&(0,f.me)().dispatchEvent(new CustomEvent("stripe_key_loaded",{detail:{key:"any-key-does-not-matter-what"}}))}),[t]),(0,n.BX)(i.Elements,d({stripe:c},{children:[r,(0,n.tZ)(g,d({editMode:t},a))]}))}))}}]);
1
+ "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[985],{1587:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(5944),o=r(7294),i=r(8776),l=r(5467),a=r(2988),c=r(4665),u=r(7449),s=r(9479),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,y=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),m=y[0],b=y[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:m,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}))}))]})}},7449:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(5944),o=r(7294),i=r(3935),l=r(9479),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,y=void 0===g?1e3:g,m=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],E=w[1],O=(0,o.useCallback)((function(){return(null==m?void 0:m.current)||(0,l.me)().body}),[m]),S=(0,o.useCallback)((function(){var e;if(t&&r.current&&b.current){var n=(0,l.Kv)(),o=O();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,y=h+a.width,m=d>=0&&g<=n.innerHeight,w=h>=0&&y<=n.innerWidth;if(!m||!w){var x=u(p,!m,!w);x!==p&&(d=(e=s(x,i,a,v)).top,h=e.left)}var S=o===(0,l.me)().body,k=S?d+n.scrollY:d-c.top,C=S?h+n.scrollX:h-c.left;E((function(e){return e&&e.top===k&&e.left===C?e:{top:k,left:C}}))}}}),[t,p,v,O,r]),k=(0,o.useCallback)((function(){var e=!1;return function(){e||(e=!0,requestAnimationFrame((function(){S(),e=!1})))}}),[S])();if((0,o.useLayoutEffect)((function(){t&&S()}),[t,S]),(0,o.useEffect)((function(){if(t){var e=(0,l.Kv)(),n=O();if(n){e.addEventListener("resize",k),e.addEventListener("scroll",k,!0),n!==(0,l.me)().body&&n.addEventListener("scroll",k);var o=new ResizeObserver((function(){return k()}));return r.current&&o.observe(r.current),n!==(0,l.me)().body&&o.observe(n),function(){e.removeEventListener("resize",k),e.removeEventListener("scroll",k,!0),n!==(0,l.me)().body&&n.removeEventListener("scroll",k),o.disconnect()}}}}),[t,k,O,r]),(0,o.useEffect)((function(){if(t){var e=function(e){"Escape"===e.key&&(E(null),null==f||f())},n=function(e){var t=e.target;b.current&&!b.current.contains(t)&&r.current&&!r.current.contains(t)&&(E(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 C=O();return C?(0,i.createPortal)((0,n.tZ)("div",a({ref:b,style:a(a({position:"absolute"},x||{top:-9999,left:-9999}),{zIndex:y})},{children:c})),C):(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}}}},8776:(e,t,r)=>{r.d(t,{u:()=>l});var n=r(5944),o=r(2988),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}))}))}},4023:(e,t,r)=>{r.r(t),r.d(t,{default:()=>y});var n=r(5944),o=r(7294),i=r(6664),l=r(8678),a=r(426),c=r(1587),u=r(1211),s=r(6867),f=r(9479),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)},p=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},h=["backgroundColor","color","fontFamily","fontSize","fontSmoothing","fontStyle","fontVariant","fontWeight","iconColor","lineHeight","letterSpacing","textAlign","padding","textDecoration","textShadow","textTransform"],v=function(e){return d(d({},e),{fontFamily:"sans-serif"})},g=function(e){var t=e.element,r=e.responsiveStyles,l=e.fieldLabel,f=e.elementProps,g=void 0===f?{}:f,y=e.setCardElement,m=void 0===y?function(){}:y,b=e.setFieldError,w=void 0===b?function(){}:b,x=e.onChange,E=void 0===x?function(){}:x,O=e.autoFocus,S=void 0!==O&&O,k=e.editMode,C=e.inlineError,Z=e.children,j=p((0,o.useState)(!1),2),R=j[0],I=j[1],L=(0,s.Z)({element:t,error:C,breakpoint:r.getMobileBreakpoint()}),B=L.borderStyles,F=L.customBorder,P=(0,o.useRef)(null),T=(0,i.useStripe)(),z=(0,i.useElements)(),M=p((0,o.useState)(""),2),Y=M[0],H=M[1];(0,o.useEffect)((function(){if(T&&z){var e=z.getElement(i.CardElement);S&&(null==e||e.on("ready",(function(){return e.focus()}))),m(t.servar.key,e)}}),[T,t.servar.key,z]);var X={style:{base:d(d({textDecoration:"none"},(0,a.Yp)(v(r.getTarget("field")),h)),{"::placeholder":d({textDecoration:"none"},(0,a.Yp)(v(r.getTarget("placeholder")),h)),":hover":(0,a.Yp)(v(r.getTarget("hoverFont")),h),":focus":(0,a.Yp)(v(r.getTarget("activeFont")),h)}),complete:v(r.getTarget("completedFont")),invalid:{color:u.xb,iconColor:u.xb}},classes:{base:t.servar.key}};return(0,n.BX)("div",d({ref:P,css:d({maxWidth:"100%",width:"100%",height:"100%",position:"relative",pointerEvents:k?"none":"auto"},r.getTarget("fc"))},g,{children:[Z,l,(0,n.BX)("div",d({css:d(d({position:"relative",width:"100%",whiteSpace:"nowrap",padding:"0 2px",display:"flex",alignItems:"center"},r.getTarget("sub-fc")),{"&:hover":d(d({},r.getTarget("hover")),B.hover),"&&":R?d(d({},r.getTarget("active")),B.active):{}})},{children:[F,(0,n.BX)("div",d({css:{width:"100%",position:"relative"}},{children:[(0,n.tZ)("input",{id:t.servar.key,name:t.servar.key,css:{width:"100%",height:0,border:"none",opacity:0,"&:focus":{outline:"none"}},tabIndex:"-1"}),(0,n.tZ)(i.CardElement,{css:{position:"absolute",top:0,left:5,right:5,width:"100%"},options:X,onChange:function(e){var t,r,n=null!==(r=null===(t=e.error)||void 0===t?void 0:t.message)&&void 0!==r?r:"";Y!==n&&(H(n),w(n)),E(e.complete?{complete:!0,card_data:{brand:e.brand}}:"")},onFocus:function(){return I(!0)},onBlur:function(){return I(!1)}})]})),(0,n.tZ)(c.Z,{containerRef:P,id:t.id,text:t.properties.tooltipText,responsiveStyles:r,repeat:t.repeat})]}))]}))};const y=(0,o.memo)((function(e){var t=e.editMode,r=e.children,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,["editMode","children"]),c=(0,l.d2)();return(0,o.useEffect)((function(){t&&(0,f.me)().dispatchEvent(new CustomEvent("stripe_key_loaded",{detail:{key:"any-key-does-not-matter-what"}}))}),[t]),(0,n.BX)(i.Elements,d({stripe:c},{children:[r,(0,n.tZ)(g,d({editMode:t},a))]}))}))}}]);
@@ -1 +1 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[213],{1587:(e,a,r)=>{r.d(a,{Z:()=>f});var i=r(5944),c=r(7294),t=r(8776),n=r(5096),o=r(2988),u=r(4665),l=r(7449),s=r(9479),A=function(){return A=Object.assign||function(e){for(var a,r=1,i=arguments.length;r<i;r++)for(var c in a=arguments[r])Object.prototype.hasOwnProperty.call(a,c)&&(e[c]=a[c]);return e},A.apply(this,arguments)};function f(e){var a=e.id,r=e.text,f=e.responsiveStyles,d=e.absolute,m=void 0===d||d,p=e.containerRef,h=e.repeat,g=function(e,a){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,c,t=r.call(e),n=[];try{for(;(void 0===a||a-- >0)&&!(i=t.next()).done;)n.push(i.value)}catch(e){c={error:e}}finally{try{i&&!i.done&&(r=t.return)&&r.call(t)}finally{if(c)throw c.error}}return n}((0,c.useState)(!1),2),v=g[0],S=g[1],y=(0,c.useRef)(null);if(!(r=(0,u.xf)(r,h)))return null;var C=(0,s.tq)();return(0,i.BX)(i.HY,{children:[(0,i.tZ)("div",A({ref:y,onMouseEnter:C?void 0:function(){return S(!0)},onMouseLeave:C?void 0:function(){return S(!1)},onFocus:function(){return S(!0)},onBlur:function(){return S(!1)},onClick:function(){return S((function(e){return!e}))},css:m?{position:"absolute",insetInlineEnd:"10px",top:0,bottom:0,zIndex:o.rM,margin:"auto",cursor:"pointer",height:"100%",display:"flex"}:{position:"relative",marginInlineStart:"8px",display:"flex",alignItems:"center"}},{children:(0,i.tZ)(n.by,{cssStyles:f.getTarget("tooltipIcon")})})),(0,i.tZ)(l.Z,A({show:v,targetRef:y,containerRef:p,placement:"left",onHide:function(){return S(!1)},offset:8},{children:(0,i.tZ)(t.u,A({id:"tooltip-".concat(a),css:{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"}}},{children:r}))}))]})}},7449:(e,a,r)=>{r.d(a,{Z:()=>u});var i=r(5944),c=r(7294),t=r(3935),n=r(9479),o=function(){return o=Object.assign||function(e){for(var a,r=1,i=arguments.length;r<i;r++)for(var c in a=arguments[r])Object.prototype.hasOwnProperty.call(a,c)&&(e[c]=a[c]);return e},o.apply(this,arguments)};const u=function(e){var a=e.show,r=e.targetRef,u=e.children,A=e.onHide,f=e.placement,d=void 0===f?"bottom-start":f,m=e.offset,p=void 0===m?0:m,h=e.zIndex,g=void 0===h?1e3:h,v=e.containerRef,S=(0,c.useRef)(null),y=function(e,a){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,c,t=r.call(e),n=[];try{for(;(void 0===a||a-- >0)&&!(i=t.next()).done;)n.push(i.value)}catch(e){c={error:e}}finally{try{i&&!i.done&&(r=t.return)&&r.call(t)}finally{if(c)throw c.error}}return n}((0,c.useState)(null),2),C=y[0],M=y[1],E=(0,c.useCallback)((function(){return(null==v?void 0:v.current)||(0,n.me)().body}),[v]),b=(0,c.useCallback)((function(){var e;if(a&&r.current&&S.current){var i=(0,n.Kv)(),c=E();if(c){var t=r.current.getBoundingClientRect(),o=S.current.getBoundingClientRect(),u=c.getBoundingClientRect(),A=s(d,t,o,p),f=A.top,m=A.left,h=f+o.height,g=m+o.width,v=f>=0&&h<=i.innerHeight,y=m>=0&&g<=i.innerWidth;if(!v||!y){var C=l(d,!v,!y);C!==d&&(f=(e=s(C,t,o,p)).top,m=e.left)}var b=c===(0,n.me)().body,R=b?f+i.scrollY:f-u.top,U=b?m+i.scrollX:m-u.left;M((function(e){return e&&e.top===R&&e.left===U?e:{top:R,left:U}}))}}}),[a,d,p,E,r]),R=(0,c.useCallback)((function(){var e=!1;return function(){e||(e=!0,requestAnimationFrame((function(){b(),e=!1})))}}),[b])();if((0,c.useLayoutEffect)((function(){a&&b()}),[a,b]),(0,c.useEffect)((function(){if(a){var e=(0,n.Kv)(),i=E();if(i){e.addEventListener("resize",R),e.addEventListener("scroll",R,!0),i!==(0,n.me)().body&&i.addEventListener("scroll",R);var c=new ResizeObserver((function(){return R()}));return r.current&&c.observe(r.current),i!==(0,n.me)().body&&c.observe(i),function(){e.removeEventListener("resize",R),e.removeEventListener("scroll",R,!0),i!==(0,n.me)().body&&i.removeEventListener("scroll",R),c.disconnect()}}}}),[a,R,E,r]),(0,c.useEffect)((function(){if(a){var e=function(e){"Escape"===e.key&&(M(null),null==A||A())},i=function(e){var a=e.target;S.current&&!S.current.contains(a)&&r.current&&!r.current.contains(a)&&(M(null),null==A||A())},c=(0,n.me)();return c.addEventListener("mousedown",i),c.addEventListener("keydown",e),function(){c.removeEventListener("mousedown",i),c.removeEventListener("keydown",e)}}}),[a,A,r]),!a)return null;var U=E();return U?(0,t.createPortal)((0,i.tZ)("div",o({ref:S,style:o(o({position:"absolute"},C||{top:-9999,left:-9999}),{zIndex:g})},{children:u})),U):(0,i.tZ)(i.HY,{children:u})};var l=function(e,a,r){if(a){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,a,r,i){switch(void 0===i&&(i=0),e){case"top":return{top:a.top-r.height-i,left:a.left+(a.width-r.width)/2};case"top-start":return{top:a.top-r.height-i,left:a.left};case"top-end":return{top:a.top-r.height-i,left:a.right-r.width};case"left":return{top:a.top+(a.height-r.height)/2,left:a.left-r.width-i};case"left-start":return{top:a.top,left:a.left-r.width-i};case"left-end":return{top:a.bottom-r.height,left:a.left-r.width-i};case"bottom":default:return{top:a.bottom+i,left:a.left+(a.width-r.width)/2};case"bottom-start":return{top:a.bottom+i,left:a.left};case"bottom-end":return{top:a.bottom+i,left:a.right-r.width};case"right":return{top:a.top+(a.height-r.height)/2,left:a.right+i};case"right-start":return{top:a.top,left:a.right+i};case"right-end":return{top:a.bottom-r.height,left:a.right+i}}}},9069:(e,a,r)=>{r.d(a,{Z:()=>t});var i=r(5944),c=function(){return c=Object.assign||function(e){for(var a,r=1,i=arguments.length;r<i;r++)for(var c in a=arguments[r])Object.prototype.hasOwnProperty.call(a,c)&&(e[c]=a[c]);return e},c.apply(this,arguments)};function t(e){var a,r,t,n=e.value,o=e.element,u=e.responsiveStyles,l=e.type,s=void 0===l?"input":l,A=e.inputFocused,f=void 0!==A&&A,d=e.repeatIndex,m=void 0===d?null:d,p=o.properties,h=null!==(t=(null!==(r=p.repeat_placeholder)&&void 0!==r?r:[])[null!=m?m:0])&&void 0!==t?t:p.placeholder||"",g=c(c({},u.getTarget("placeholderFocus")),u.getTarget("placeholderActive"));return(0,i.tZ)("span",c({css:c(c(c(c({position:"absolute",pointerEvents:"none",insetInlineStart:"0.75rem",transition:"0.2s ease all",top:"input"===s?"50%":"0.6rem"},u.getTarget("placeholder")),n?u.getTarget("placeholderFocus"):{}),f?g:{}),(a={},a["".concat(s,":focus ~ &")]=g,a))},{children:h}))}},8776:(e,a,r)=>{r.d(a,{u:()=>n});var i=r(5944),c=r(2988),t=function(){return t=Object.assign||function(e){for(var a,r=1,i=arguments.length;r<i;r++)for(var c in a=arguments[r])Object.prototype.hasOwnProperty.call(a,c)&&(e[c]=a[c]);return e},t.apply(this,arguments)},n=function(e){var a=e.children,r=e.css,n=function(e,a){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&a.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var c=0;for(i=Object.getOwnPropertySymbols(e);c<i.length;c++)a.indexOf(i[c])<0&&Object.prototype.propertyIsEnumerable.call(e,i[c])&&(r[i[c]]=e[i[c]])}return r}(e,["children","css"]);return(0,i.tZ)("div",t({css:t({zIndex:c.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)},n,{children:(0,i.tZ)("div",t({className:"tooltip-inner"},{children:a}))}))}},6067:(e,a,r)=>{r.r(a),r.d(a,{default:()=>P});var i=r(5944),c=r(7294);function t(e,a,r){return e.clearRect(0,0,100,100),e.fillStyle=r,e.fillText(a,0,0),e.getImageData(0,0,1,1).data.join(",")}function n(e){const a=function(){const e=document.createElement("canvas");e.width=e.height=1;const a=e.getContext("2d",{willReadFrequently:!0});return a.textBaseline="top",a.font='100px "Twemoji Mozilla","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji","EmojiOne Color","Android Emoji",sans-serif',a.scale(.01,.01),a}(),r=t(a,e,"#fff"),i=t(a,e,"#000");return i===r&&!i.startsWith("0,0,0,")}const o={"Africa/Abidjan":{c:["CI","BF","GH","GM","GN","ML","MR","SH","SL","SN","TG"]},"Africa/Accra":{c:["GH"]},"Africa/Addis_Ababa":{c:["ET"]},"Africa/Algiers":{c:["DZ"]},"Africa/Asmara":{c:["ER"]},"Africa/Asmera":{c:["ER"]},"Africa/Bamako":{c:["ML"]},"Africa/Bangui":{c:["CF"]},"Africa/Banjul":{c:["GM"]},"Africa/Bissau":{c:["GW"]},"Africa/Blantyre":{c:["MW"]},"Africa/Brazzaville":{c:["CG"]},"Africa/Bujumbura":{c:["BI"]},"Africa/Cairo":{c:["EG"]},"Africa/Casablanca":{c:["MA"]},"Africa/Ceuta":{c:["ES"]},"Africa/Conakry":{c:["GN"]},"Africa/Dakar":{c:["SN"]},"Africa/Dar_es_Salaam":{c:["TZ"]},"Africa/Djibouti":{c:["DJ"]},"Africa/Douala":{c:["CM"]},"Africa/El_Aaiun":{c:["EH"]},"Africa/Freetown":{c:["SL"]},"Africa/Gaborone":{c:["BW"]},"Africa/Harare":{c:["ZW"]},"Africa/Johannesburg":{c:["ZA","LS","SZ"]},"Africa/Juba":{c:["SS"]},"Africa/Kampala":{c:["UG"]},"Africa/Khartoum":{c:["SD"]},"Africa/Kigali":{c:["RW"]},"Africa/Kinshasa":{c:["CD"]},"Africa/Lagos":{c:["NG","AO","BJ","CD","CF","CG","CM","GA","GQ","NE"]},"Africa/Libreville":{c:["GA"]},"Africa/Lome":{c:["TG"]},"Africa/Luanda":{c:["AO"]},"Africa/Lubumbashi":{c:["CD"]},"Africa/Lusaka":{c:["ZM"]},"Africa/Malabo":{c:["GQ"]},"Africa/Maputo":{c:["MZ","BI","BW","CD","MW","RW","ZM","ZW"]},"Africa/Maseru":{c:["LS"]},"Africa/Mbabane":{c:["SZ"]},"Africa/Mogadishu":{c:["SO"]},"Africa/Monrovia":{c:["LR"]},"Africa/Nairobi":{c:["KE","DJ","ER","ET","KM","MG","SO","TZ","UG","YT"]},"Africa/Ndjamena":{c:["TD"]},"Africa/Niamey":{c:["NE"]},"Africa/Nouakchott":{c:["MR"]},"Africa/Ouagadougou":{c:["BF"]},"Africa/Porto-Novo":{c:["BJ"]},"Africa/Sao_Tome":{c:["ST"]},"Africa/Timbuktu":{c:["ML"]},"Africa/Tripoli":{c:["LY"]},"Africa/Tunis":{c:["TN"]},"Africa/Windhoek":{c:["NA"]},"America/Adak":{c:["US"]},"America/Anchorage":{c:["US"]},"America/Anguilla":{c:["AI"]},"America/Antigua":{c:["AG"]},"America/Araguaina":{c:["BR"]},"America/Argentina/Buenos_Aires":{c:["AR"]},"America/Argentina/Catamarca":{c:["AR"]},"America/Argentina/Cordoba":{c:["AR"]},"America/Argentina/Jujuy":{c:["AR"]},"America/Argentina/La_Rioja":{c:["AR"]},"America/Argentina/Mendoza":{c:["AR"]},"America/Argentina/Rio_Gallegos":{c:["AR"]},"America/Argentina/Salta":{c:["AR"]},"America/Argentina/San_Juan":{c:["AR"]},"America/Argentina/San_Luis":{c:["AR"]},"America/Argentina/Tucuman":{c:["AR"]},"America/Argentina/Ushuaia":{c:["AR"]},"America/Aruba":{c:["AW"]},"America/Asuncion":{c:["PY"]},"America/Atikokan":{c:["CA"]},"America/Bahia":{c:["BR"]},"America/Bahia_Banderas":{c:["MX"]},"America/Barbados":{c:["BB"]},"America/Belem":{c:["BR"]},"America/Belize":{c:["BZ"]},"America/Blanc-Sablon":{c:["CA"]},"America/Boa_Vista":{c:["BR"]},"America/Bogota":{c:["CO"]},"America/Boise":{c:["US"]},"America/Cambridge_Bay":{c:["CA"]},"America/Campo_Grande":{c:["BR"]},"America/Cancun":{c:["MX"]},"America/Caracas":{c:["VE"]},"America/Cayenne":{c:["GF"]},"America/Cayman":{c:["KY"]},"America/Chicago":{c:["US"]},"America/Chihuahua":{c:["MX"]},"America/Coral_Harbour":{c:["CA"]},"America/Costa_Rica":{c:["CR"]},"America/Creston":{c:["CA"]},"America/Cuiaba":{c:["BR"]},"America/Curacao":{c:["CW"]},"America/Danmarkshavn":{c:["GL"]},"America/Dawson":{c:["CA"]},"America/Dawson_Creek":{c:["CA"]},"America/Denver":{c:["US"]},"America/Detroit":{c:["US"]},"America/Dominica":{c:["DM"]},"America/Edmonton":{c:["CA"]},"America/Eirunepe":{c:["BR"]},"America/El_Salvador":{c:["SV"]},"America/Fort_Nelson":{c:["CA"]},"America/Fortaleza":{c:["BR"]},"America/Glace_Bay":{c:["CA"]},"America/Goose_Bay":{c:["CA"]},"America/Grand_Turk":{c:["TC"]},"America/Grenada":{c:["GD"]},"America/Guadeloupe":{c:["GP"]},"America/Guatemala":{c:["GT"]},"America/Guayaquil":{c:["EC"]},"America/Guyana":{c:["GY"]},"America/Halifax":{c:["CA"]},"America/Havana":{c:["CU"]},"America/Hermosillo":{c:["MX"]},"America/Indiana/Indianapolis":{c:["US"]},"America/Indiana/Knox":{c:["US"]},"America/Indiana/Marengo":{c:["US"]},"America/Indiana/Petersburg":{c:["US"]},"America/Indiana/Tell_City":{c:["US"]},"America/Indiana/Vevay":{c:["US"]},"America/Indiana/Vincennes":{c:["US"]},"America/Indiana/Winamac":{c:["US"]},"America/Inuvik":{c:["CA"]},"America/Iqaluit":{c:["CA"]},"America/Jamaica":{c:["JM"]},"America/Juneau":{c:["US"]},"America/Kentucky/Louisville":{c:["US"]},"America/Kentucky/Monticello":{c:["US"]},"America/Kralendijk":{c:["BQ"]},"America/La_Paz":{c:["BO"]},"America/Lima":{c:["PE"]},"America/Los_Angeles":{c:["US"]},"America/Lower_Princes":{c:["SX"]},"America/Maceio":{c:["BR"]},"America/Managua":{c:["NI"]},"America/Manaus":{c:["BR"]},"America/Marigot":{c:["MF"]},"America/Martinique":{c:["MQ"]},"America/Matamoros":{c:["MX"]},"America/Mazatlan":{c:["MX"]},"America/Menominee":{c:["US"]},"America/Merida":{c:["MX"]},"America/Metlakatla":{c:["US"]},"America/Mexico_City":{c:["MX"]},"America/Miquelon":{c:["PM"]},"America/Moncton":{c:["CA"]},"America/Monterrey":{c:["MX"]},"America/Montevideo":{c:["UY"]},"America/Montreal":{c:["CA"]},"America/Montserrat":{c:["MS"]},"America/Nassau":{c:["BS"]},"America/New_York":{c:["US"]},"America/Nipigon":{c:["CA"]},"America/Nome":{c:["US"]},"America/Noronha":{c:["BR"]},"America/North_Dakota/Beulah":{c:["US"]},"America/North_Dakota/Center":{c:["US"]},"America/North_Dakota/New_Salem":{c:["US"]},"America/Nuuk":{c:["GL"]},"America/Ojinaga":{c:["MX"]},"America/Panama":{c:["PA","CA","KY"]},"America/Pangnirtung":{c:["CA"]},"America/Paramaribo":{c:["SR"]},"America/Phoenix":{c:["US","CA"]},"America/Port-au-Prince":{c:["HT"]},"America/Port_of_Spain":{c:["TT"]},"America/Porto_Velho":{c:["BR"]},"America/Puerto_Rico":{c:["PR","AG","CA","AI","AW","BL","BQ","CW","DM","GD","GP","KN","LC","MF","MS","SX","TT","VC","VG","VI"]},"America/Punta_Arenas":{c:["CL"]},"America/Rainy_River":{c:["CA"]},"America/Rankin_Inlet":{c:["CA"]},"America/Recife":{c:["BR"]},"America/Regina":{c:["CA"]},"America/Resolute":{c:["CA"]},"America/Rio_Branco":{c:["BR"]},"America/Santarem":{c:["BR"]},"America/Santiago":{c:["CL"]},"America/Santo_Domingo":{c:["DO"]},"America/Sao_Paulo":{c:["BR"]},"America/Scoresbysund":{c:["GL"]},"America/Sitka":{c:["US"]},"America/St_Barthelemy":{c:["BL"]},"America/St_Johns":{c:["CA"]},"America/St_Kitts":{c:["KN"]},"America/St_Lucia":{c:["LC"]},"America/St_Thomas":{c:["VI"]},"America/St_Vincent":{c:["VC"]},"America/Swift_Current":{c:["CA"]},"America/Tegucigalpa":{c:["HN"]},"America/Thule":{c:["GL"]},"America/Thunder_Bay":{c:["CA"]},"America/Tijuana":{c:["MX"]},"America/Toronto":{c:["CA","BS"]},"America/Tortola":{c:["VG"]},"America/Vancouver":{c:["CA"]},"America/Virgin":{c:["VI"]},"America/Whitehorse":{c:["CA"]},"America/Winnipeg":{c:["CA"]},"America/Yakutat":{c:["US"]},"America/Yellowknife":{c:["CA"]},"Antarctica/Casey":{c:["AQ"]},"Antarctica/Davis":{c:["AQ"]},"Antarctica/DumontDUrville":{c:["AQ"]},"Antarctica/Macquarie":{c:["AU"]},"Antarctica/Mawson":{c:["AQ"]},"Antarctica/McMurdo":{c:["AQ"]},"Antarctica/Palmer":{c:["AQ"]},"Antarctica/Rothera":{c:["AQ"]},"Antarctica/South_Pole":{c:["AQ"]},"Antarctica/Syowa":{c:["AQ"]},"Antarctica/Troll":{c:["AQ"]},"Antarctica/Vostok":{c:["AQ"]},"Arctic/Longyearbyen":{c:["SJ"]},"Asia/Aden":{c:["YE"]},"Asia/Almaty":{c:["KZ"]},"Asia/Amman":{c:["JO"]},"Asia/Anadyr":{c:["RU"]},"Asia/Aqtau":{c:["KZ"]},"Asia/Aqtobe":{c:["KZ"]},"Asia/Ashgabat":{c:["TM"]},"Asia/Atyrau":{c:["KZ"]},"Asia/Baghdad":{c:["IQ"]},"Asia/Bahrain":{c:["BH"]},"Asia/Baku":{c:["AZ"]},"Asia/Bangkok":{c:["TH","KH","LA","VN"]},"Asia/Barnaul":{c:["RU"]},"Asia/Beirut":{c:["LB"]},"Asia/Bishkek":{c:["KG"]},"Asia/Brunei":{c:["BN"]},"Asia/Calcutta":{c:["IN"]},"Asia/Chita":{c:["RU"]},"Asia/Choibalsan":{c:["MN"]},"Asia/Colombo":{c:["LK"]},"Asia/Damascus":{c:["SY"]},"Asia/Dhaka":{c:["BD"]},"Asia/Dili":{c:["TL"]},"Asia/Dubai":{c:["AE","OM"]},"Asia/Dushanbe":{c:["TJ"]},"Asia/Famagusta":{c:["CY"]},"Asia/Gaza":{c:["PS"]},"Asia/Hebron":{c:["PS"]},"Asia/Ho_Chi_Minh":{c:["VN"]},"Asia/Hong_Kong":{c:["HK"]},"Asia/Hovd":{c:["MN"]},"Asia/Irkutsk":{c:["RU"]},"Asia/Jakarta":{c:["ID"]},"Asia/Jayapura":{c:["ID"]},"Asia/Jerusalem":{c:["IL"]},"Asia/Kabul":{c:["AF"]},"Asia/Kamchatka":{c:["RU"]},"Asia/Karachi":{c:["PK"]},"Asia/Kathmandu":{c:["NP"]},"Asia/Khandyga":{c:["RU"]},"Asia/Kolkata":{c:["IN"]},"Asia/Krasnoyarsk":{c:["RU"]},"Asia/Kuala_Lumpur":{c:["MY"]},"Asia/Kuching":{c:["MY"]},"Asia/Kuwait":{c:["KW"]},"Asia/Macau":{c:["MO"]},"Asia/Magadan":{c:["RU"]},"Asia/Makassar":{c:["ID"]},"Asia/Manila":{c:["PH"]},"Asia/Muscat":{c:["OM"]},"Asia/Nicosia":{c:["CY"]},"Asia/Novokuznetsk":{c:["RU"]},"Asia/Novosibirsk":{c:["RU"]},"Asia/Omsk":{c:["RU"]},"Asia/Oral":{c:["KZ"]},"Asia/Phnom_Penh":{c:["KH"]},"Asia/Pontianak":{c:["ID"]},"Asia/Pyongyang":{c:["KP"]},"Asia/Qatar":{c:["QA","BH"]},"Asia/Qostanay":{c:["KZ"]},"Asia/Qyzylorda":{c:["KZ"]},"Asia/Riyadh":{c:["SA","AQ","KW","YE"]},"Asia/Sakhalin":{c:["RU"]},"Asia/Samarkand":{c:["UZ"]},"Asia/Seoul":{c:["KR"]},"Asia/Shanghai":{c:["CN"]},"Asia/Singapore":{c:["SG","MY"]},"Asia/Srednekolymsk":{c:["RU"]},"Asia/Taipei":{c:["TW"]},"Asia/Tashkent":{c:["UZ"]},"Asia/Tbilisi":{c:["GE"]},"Asia/Tehran":{c:["IR"]},"Asia/Thimphu":{c:["BT"]},"Asia/Tokyo":{c:["JP"]},"Asia/Tomsk":{c:["RU"]},"Asia/Ulaanbaatar":{c:["MN"]},"Asia/Urumqi":{c:["CN"]},"Asia/Ust-Nera":{c:["RU"]},"Asia/Vientiane":{c:["LA"]},"Asia/Vladivostok":{c:["RU"]},"Asia/Yakutsk":{c:["RU"]},"Asia/Yangon":{c:["MM"]},"Asia/Yekaterinburg":{c:["RU"]},"Asia/Yerevan":{c:["AM"]},"Atlantic/Azores":{c:["PT"]},"Atlantic/Bermuda":{c:["BM"]},"Atlantic/Canary":{c:["ES"]},"Atlantic/Cape_Verde":{c:["CV"]},"Atlantic/Faroe":{c:["FO"]},"Atlantic/Jan_Mayen":{c:["SJ"]},"Atlantic/Madeira":{c:["PT"]},"Atlantic/Reykjavik":{c:["IS"]},"Atlantic/South_Georgia":{c:["GS"]},"Atlantic/St_Helena":{c:["SH"]},"Atlantic/Stanley":{c:["FK"]},"Australia/Adelaide":{c:["AU"]},"Australia/Brisbane":{c:["AU"]},"Australia/Broken_Hill":{c:["AU"]},"Australia/Darwin":{c:["AU"]},"Australia/Eucla":{c:["AU"]},"Australia/Hobart":{c:["AU"]},"Australia/Lindeman":{c:["AU"]},"Australia/Lord_Howe":{c:["AU"]},"Australia/Melbourne":{c:["AU"]},"Australia/Perth":{c:["AU"]},"Australia/Sydney":{c:["AU"]},"Canada/Eastern":{c:["CA"]},"Europe/Amsterdam":{c:["NL"]},"Europe/Andorra":{c:["AD"]},"Europe/Astrakhan":{c:["RU"]},"Europe/Athens":{c:["GR"]},"Europe/Belfast":{c:["GB"]},"Europe/Belgrade":{c:["RS","BA","HR","ME","MK","SI"]},"Europe/Berlin":{c:["DE"]},"Europe/Bratislava":{c:["SK"]},"Europe/Brussels":{c:["BE"]},"Europe/Bucharest":{c:["RO"]},"Europe/Budapest":{c:["HU"]},"Europe/Busingen":{c:["DE"]},"Europe/Chisinau":{c:["MD"]},"Europe/Copenhagen":{c:["DK"]},"Europe/Dublin":{c:["IE"]},"Europe/Gibraltar":{c:["GI"]},"Europe/Guernsey":{c:["GG"]},"Europe/Helsinki":{c:["FI","AX"]},"Europe/Isle_of_Man":{c:["IM"]},"Europe/Istanbul":{c:["TR"]},"Europe/Jersey":{c:["JE"]},"Europe/Kaliningrad":{c:["RU"]},"Europe/Kiev":{c:["UA"]},"Europe/Kirov":{c:["RU"]},"Europe/Lisbon":{c:["PT"]},"Europe/Ljubljana":{c:["SI"]},"Europe/London":{c:["GB","GG","IM","JE"]},"Europe/Luxembourg":{c:["LU"]},"Europe/Madrid":{c:["ES"]},"Europe/Malta":{c:["MT"]},"Europe/Mariehamn":{c:["AX"]},"Europe/Minsk":{c:["BY"]},"Europe/Monaco":{c:["MC"]},"Europe/Moscow":{c:["RU"]},"Europe/Oslo":{c:["NO","SJ","BV"]},"Europe/Paris":{c:["FR"]},"Europe/Podgorica":{c:["ME"]},"Europe/Prague":{c:["CZ","SK"]},"Europe/Riga":{c:["LV"]},"Europe/Rome":{c:["IT","SM","VA"]},"Europe/Samara":{c:["RU"]},"Europe/San_Marino":{c:["SM"]},"Europe/Sarajevo":{c:["BA"]},"Europe/Saratov":{c:["RU"]},"Europe/Simferopol":{c:["RU","UA"]},"Europe/Skopje":{c:["MK"]},"Europe/Sofia":{c:["BG"]},"Europe/Stockholm":{c:["SE"]},"Europe/Tallinn":{c:["EE"]},"Europe/Tirane":{c:["AL"]},"Europe/Ulyanovsk":{c:["RU"]},"Europe/Uzhgorod":{c:["UA"]},"Europe/Vaduz":{c:["LI"]},"Europe/Vatican":{c:["VA"]},"Europe/Vienna":{c:["AT"]},"Europe/Vilnius":{c:["LT"]},"Europe/Volgograd":{c:["RU"]},"Europe/Warsaw":{c:["PL"]},"Europe/Zagreb":{c:["HR"]},"Europe/Zaporozhye":{c:["UA"]},"Europe/Zurich":{c:["CH","DE","LI"]},GB:{c:["GB"]},"GB-Eire":{c:["GB"]},"Indian/Antananarivo":{c:["MG"]},"Indian/Chagos":{c:["IO"]},"Indian/Christmas":{c:["CX"]},"Indian/Cocos":{c:["CC"]},"Indian/Comoro":{c:["KM"]},"Indian/Kerguelen":{c:["TF","HM"]},"Indian/Mahe":{c:["SC"]},"Indian/Maldives":{c:["MV"]},"Indian/Mauritius":{c:["MU"]},"Indian/Mayotte":{c:["YT"]},"Indian/Reunion":{c:["RE","TF"]},NZ:{c:["NZ"]},"Pacific/Apia":{c:["WS"]},"Pacific/Auckland":{c:["NZ","AQ"]},"Pacific/Bougainville":{c:["PG"]},"Pacific/Chatham":{c:["NZ"]},"Pacific/Chuuk":{c:["FM"]},"Pacific/Easter":{c:["CL"]},"Pacific/Efate":{c:["VU"]},"Pacific/Fakaofo":{c:["TK"]},"Pacific/Fiji":{c:["FJ"]},"Pacific/Funafuti":{c:["TV"]},"Pacific/Galapagos":{c:["EC"]},"Pacific/Gambier":{c:["PF"]},"Pacific/Guadalcanal":{c:["SB"]},"Pacific/Guam":{c:["GU","MP"]},"Pacific/Honolulu":{c:["US","UM"]},"Pacific/Johnston":{c:["UM"]},"Pacific/Kanton":{c:["KI"]},"Pacific/Kiritimati":{c:["KI"]},"Pacific/Kosrae":{c:["FM"]},"Pacific/Kwajalein":{c:["MH"]},"Pacific/Majuro":{c:["MH"]},"Pacific/Marquesas":{c:["PF"]},"Pacific/Midway":{c:["UM"]},"Pacific/Nauru":{c:["NR"]},"Pacific/Niue":{c:["NU"]},"Pacific/Norfolk":{c:["NF"]},"Pacific/Noumea":{c:["NC"]},"Pacific/Pago_Pago":{c:["AS","UM"]},"Pacific/Palau":{c:["PW"]},"Pacific/Pitcairn":{c:["PN"]},"Pacific/Pohnpei":{c:["FM"]},"Pacific/Port_Moresby":{c:["PG","AQ"]},"Pacific/Rarotonga":{c:["CK"]},"Pacific/Saipan":{c:["MP"]},"Pacific/Samoa":{c:["WS"]},"Pacific/Tahiti":{c:["PF"]},"Pacific/Tarawa":{c:["KI"]},"Pacific/Tongatapu":{c:["TO"]},"Pacific/Wake":{c:["UM"]},"Pacific/Wallis":{c:["WF"]},Singapore:{c:["SG"]},"US/Alaska":{c:["US"]},"US/Aleutian":{c:["US"]},"US/Arizona":{c:["US"]},"US/Central":{c:["US"]},"US/East-Indiana":{c:["US"]},"US/Eastern":{c:["US"]},"US/Hawaii":{c:["US"]},"US/Indiana-Starke":{c:["US"]},"US/Michigan":{c:["US"]},"US/Mountain":{c:["US"]},"US/Pacific":{c:["US"]},"US/Samoa":{c:["WS"]}};var u=r(9069),l=r(1587),s=r(1211),A=r(5198);const f={AC:"40123",AD:"312345",AE:"501234567",AF:"701234567",AG:"2684641234",AI:"2642351234",AL:"672123456",AM:"77123456",AO:"923123456",AR:"91123456789",AS:"6847331234",AT:"664123456",AU:"412345678",AW:"5601234",AX:"412345678",AZ:"401234567",BA:"61123456",BB:"2462501234",BD:"1812345678",BE:"470123456",BF:"70123456",BG:"43012345",BH:"36001234",BI:"79561234",BJ:"90011234",BL:"690001234",BM:"4413701234",BN:"7123456",BO:"71234567",BQ:"3181234",BR:"11961234567",BS:"2423591234",BT:"17123456",BW:"71123456",BY:"294911911",BZ:"6221234",CA:"5062345678",CC:"412345678",CD:"991234567",CF:"70012345",CG:"061234567",CH:"781234567",CI:"0123456789",CK:"71234",CL:"221234567",CM:"671234567",CN:"13123456789",CO:"3211234567",CR:"83123456",CU:"51234567",CV:"9911234",CW:"95181234",CX:"412345678",CY:"96123456",CZ:"601123456",DE:"15123456789",DJ:"77831001",DK:"32123456",DM:"7672251234",DO:"8092345678",DZ:"551234567",EC:"991234567",EE:"51234567",EG:"1001234567",EH:"650123456",ER:"7123456",ES:"612345678",ET:"911234567",FI:"412345678",FJ:"7012345",FK:"51234",FM:"3501234",FO:"211234",FR:"612345678",GA:"06031234",GB:"7400123456",GD:"4734031234",GE:"555123456",GF:"694201234",GG:"7781123456",GH:"231234567",GI:"57123456",GL:"221234",GM:"3012345",GN:"601123456",GP:"690001234",GQ:"222123456",GR:"6912345678",GT:"51234567",GU:"6713001234",GW:"955012345",GY:"6091234",HK:"51234567",HN:"91234567",HR:"921234567",HT:"34101234",HU:"201234567",ID:"812345678",IE:"850123456",IL:"502345678",IM:"7924123456",IN:"8123456789",IO:"3801234",IQ:"7912345678",IR:"9123456789",IS:"6111234",IT:"3123456789",JE:"7797712345",JM:"8762101234",JO:"790123456",JP:"9012345678",KE:"712123456",KG:"700123456",KH:"91234567",KI:"72001234",KM:"3212345",KN:"8697652917",KP:"1921234567",KR:"1020000000",KW:"50012345",KY:"3453231234",KZ:"7710009998",LA:"2023123456",LB:"71123456",LC:"7582845678",LI:"660234567",LK:"712345678",LR:"770123456",LS:"50123456",LT:"61234567",LU:"628123456",LV:"21234567",LY:"912345678",MA:"650123456",MC:"612345678",MD:"62112345",ME:"67622901",MF:"690001234",MG:"321234567",MH:"2351234",MK:"72345678",ML:"65012345",MM:"92123456",MN:"88123456",MO:"66123456",MP:"6702345678",MQ:"696201234",MR:"22123456",MS:"6644923456",MT:"96961234",MU:"52512345",MV:"7712345",MW:"991234567",MX:"12221234567",MY:"123456789",MZ:"821234567",NA:"811234567",NC:"751234",NE:"93123456",NF:"381234",NG:"8021234567",NI:"81234567",NL:"612345678",NO:"40612345",NP:"9841234567",NR:"5551234",NU:"8884012",NZ:"211234567",OM:"92123456",PA:"61234567",PE:"912345678",PF:"87123456",PG:"70123456",PH:"9051234567",PK:"3012345678",PL:"512345678",PM:"551234",PR:"7872345678",PS:"599123456",PT:"912345678",PW:"6201234",PY:"961456789",QA:"33123456",RE:"692123456",RO:"712034567",RS:"601234567",RU:"9123456789",RW:"720123456",SA:"512345678",SB:"7421234",SC:"2510123",SD:"911231234",SE:"701234567",SG:"81234567",SH:"51234",SI:"31234567",SJ:"41234567",SK:"912123456",SL:"25123456",SM:"66661212",SN:"701234567",SO:"71123456",SR:"7412345",SS:"977123456",ST:"9812345",SV:"70123456",SX:"7215205678",SY:"944567890",SZ:"76123456",TA:"8999",TC:"6492311234",TD:"63012345",TG:"90112345",TH:"812345678",TJ:"917123456",TK:"7290",TL:"77212345",TM:"66123456",TN:"20123456",TO:"7715123",TR:"5012345678",TT:"8682911234",TV:"901234",TW:"912345678",TZ:"621234567",UA:"501234567",UG:"712345678",US:"2015550123",UY:"94231234",UZ:"912345678",VA:"3123456789",VC:"7844301234",VE:"4121234567",VG:"2843001234",VI:"3406421234",VN:"912345678",VU:"5912345",WF:"821234",WS:"7212345",XK:"43201234",YE:"712345678",YT:"639012345",ZA:"711234567",ZM:"955123456",ZW:"712345678"};var d=r(426),m=r(9234),p=r(5200),h=r(1275),g=function(){return g=Object.assign||function(e){for(var a,r=1,i=arguments.length;r<i;r++)for(var c in a=arguments[r])Object.prototype.hasOwnProperty.call(a,c)&&(e[c]=a[c]);return e},g.apply(this,arguments)};const v=(0,c.forwardRef)((function(e,a){var r=e.show,t=e.itemOnClick,n=e.responsiveStyles,o=e.dropdownWidth,u=function(e,a){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&a.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var c=0;for(i=Object.getOwnPropertySymbols(e);c<i.length;c++)a.indexOf(i[c])<0&&Object.prototype.propertyIsEnumerable.call(e,i[c])&&(r[i[c]]=e[i[c]])}return r}(e,["show","itemOnClick","responsiveStyles","dropdownWidth"]),l=(0,c.useRef)({}),s=function(e,a){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,c,t=r.call(e),n=[];try{for(;(void 0===a||a-- >0)&&!(i=t.next()).done;)n.push(i.value)}catch(e){c={error:e}}finally{try{i&&!i.done&&(r=t.return)&&r.call(t)}finally{if(c)throw c.error}}return n}((0,c.useState)(""),2),f=s[0],d=s[1],v=(0,c.useRef)(null);(0,c.useEffect)((function(){r?v.current&&setTimeout((function(){var e;null===(e=v.current)||void 0===e||e.focus()}),50):d("")}),[r]);var S=(0,c.useMemo)((function(){var e=A.ZP.filter((function(e){var a,r=e.countryCode,i=e.countryName,c=e.phoneCode;return!(!(null===(a=m.BZ)||void 0===a?void 0:a.isSupportedCountry(r))||p.fD.client&&!A.lC.has(r))&&(!f||r.toLowerCase().includes(f)||i.toLowerCase().includes(f)||"+".concat(c).includes(f))}));return(0,i.BX)(i.HY,{children:[(0,i.tZ)("input",{ref:v,placeholder:"Search",css:{width:"100%",height:"30px",outline:"none",border:"none",borderBottom:"1px solid grey",padding:"5px 10px",fontSize:"14px"},onKeyDown:function(a){var r=function(){a.preventDefault(),a.stopPropagation()};if("ArrowDown"===a.key){r();var i=e[0];i&&l.current[i.countryCode].focus()}else"Enter"===a.key&&r()},onChange:function(e){return d(e.target.value.toLowerCase())},tabIndex:0}),e.map((function(e){var a=e.flag,r=e.countryCode,c=e.countryName,n=e.phoneCode;return(0,i.BX)("li",g({ref:function(e){l.current[r]=e},css:{padding:"2px 10px",display:"flex",alignItems:"center",transition:"0.1s ease all",fontSize:"14px","&:hover":{backgroundColor:"#e6e6e644"},"&:focus-visible":{outline:"none",backgroundColor:"#e6e6e644"}},tabIndex:0,onKeyDown:function(e){var a,i,c=function(){e.preventDefault(),e.stopPropagation()};"Enter"===e.key?(c(),t(r,n)):["ArrowDown","ArrowRight"].includes(e.key)?(c(),null===(a=l.current[r].nextSibling)||void 0===a||a.focus()):["ArrowUp","ArrowLeft"].includes(e.key)&&(c(),null===(i=l.current[r].previousSibling)||void 0===i||i.focus())},onClick:function(){return t(r,n)}},{children:[(0,i.tZ)("span",g({css:{fontSize:"24px",marginRight:"7px",lineHeight:"33px",fontFamily:'"Twemoji Country Flags", sans-serif'}},{children:a})),c,(0,i.BX)("span",g({css:{marginLeft:"7px",color:"grey"}},{children:["+",n]}))]}),r)}))]})}),[f]),y=void 0!==o?"".concat(o,"px"):"100%";return(0,i.tZ)("ul",g({css:g({zIndex:h.m,listStyleType:"none",padding:0,margin:0,backgroundColor:"white",cursor:"pointer",boxShadow:"0 0 4px rgb(0 0 0 / 15%)",maxHeight:"210px",overflowY:"scroll",overflowX:"hidden",boxSizing:"border-box",width:y},n.getTarget("dropdown")),ref:a},u,{children:S}))}));var S=r(6867),y=r(9479),C={IN:12,SG:10},M=r(7449),E=r(5398),b=function(){return b=Object.assign||function(e){for(var a,r=1,i=arguments.length;r<i;r++)for(var c in a=arguments[r])Object.prototype.hasOwnProperty.call(a,c)&&(e[c]=a[c]);return e},b.apply(this,arguments)},R=function(e,a){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,c,t=r.call(e),n=[];try{for(;(void 0===a||a-- >0)&&!(i=t.next()).done;)n.push(i.value)}catch(e){c={error:e}}finally{try{i&&!i.done&&(r=t.return)&&r.call(t)}finally{if(c)throw c.error}}return n},U="US",B=A.ZP.reduce((function(e,a){var r=a.flag,i=a.countryCode,c=a.phoneCode;return e[i]={flag:r,phoneCode:c},e}),{});const P=(0,c.memo)((function(e){var a=e.element,r=e.responsiveStyles,t=e.fieldLabel,A=e.fullNumber,p=e.elementProps,h=void 0===p?{}:p,g=e.required,P=void 0!==g&&g,T=e.disabled,w=void 0!==T&&T,G=e.repeatIndex,k=void 0===G?null:G,I=e.autoComplete,L=e.editMode,N=e.onComplete,K=void 0===N?function(){}:N,O=e.setRef,D=void 0===O?function(){}:O,Z=e.inlineError,_=e.rightToLeft,x=e.onEnter,F=e.children,H=(0,c.useRef)(null),j=(0,c.useRef)(null),W=(0,c.useRef)(null),V=(0,c.useRef)(null),Y=(0,c.useRef)(null),J=R((0,c.useState)(null),2),z=J[0],X=J[1],Q=R((0,c.useState)(0),2),q=Q[0],$=Q[1],ee=R((0,c.useState)(!1),2),ae=ee[0],re=ee[1],ie=R((0,c.useState)(""),2),ce=ie[0],te=ie[1],ne=a.servar,oe=(0,c.useMemo)((function(){if("auto"===ne.metadata.default_country){var e=Intl.DateTimeFormat().resolvedOptions().timeZone;if(!e)return U;var a=o[e];if(!a)return U;var r=a.c[0];return r in B?r:U}return ne.metadata.default_country||U}),[ne.metadata.default_country]),ue=R((0,c.useState)(oe),2),le=ue[0],se=ue[1];(0,c.useEffect)((function(){return se(oe)}),[oe]),(0,c.useEffect)((function(){try{!function(e="Twemoji Country Flags",a="https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2"){if(typeof window<"u"&&n("😊")&&!n("🇨🇭")){const r=document.createElement("style");r.textContent=`@font-face {\n font-family: "${e}";\n unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067,\n U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;\n src: url('${a}') format('woff2');\n font-display: swap;\n }`,document.head.appendChild(r)}}()}catch(e){}}),[]);var Ae=B[le].phoneCode,fe=R((0,c.useState)(""),2),de=fe[0],me=fe[1],pe=R((0,c.useState)(a.properties.placeholder),2),he=pe[0],ge=pe[1],ve=R((0,c.useState)(!1),2),Se=ve[0],ye=ve[1],Ce=(0,E.Z)(W).width,Me=(0,S.Z)({element:a,error:Z,breakpoint:r.getMobileBreakpoint()}),Ee=Me.borderStyles,be=Me.customBorder,Re=function(e){return e.length+(e.length>3?2:1)},Ue=function(e){X(e),$((function(e){return e+1}))},Be=function(e){Ue(Re(e))};(0,c.useEffect)((function(){var e=Y.current;e&&null!==z&&e.setSelectionRange(z,z)}),[q]),(0,c.useEffect)((function(){A===ce||L||m.hV.then((function(e){var a,r;if(e){var i=new e.AsYouType;i.input("+".concat(A));var c=null!==(a=i.getNumber())&&void 0!==a?a:"";te(A),me(A),c&&se(null!==(r=c.country)&&void 0!==r?r:le)}}))}),[A]);var Pe=(0,c.useMemo)((function(){var e=m.BZ;if(!e)return"+".concat(de);if(""===de)return"";var a=new e.AsYouType(le),r=e.parseDigits(de,le);return a.input("+".concat(r))}),[le,de]);(0,c.useEffect)((function(){var e,r=null!==(e=a.properties.placeholder)&&void 0!==e?e:"";if(L||r)ge(r);else{var i=f[le];m.hV.then((function(e){e&&ge(e.parsePhoneNumber(i,le).formatInternational())}))}}),[le,a]);var Te=function(e){(A||e)&&e!==A&&(te(e),K(e))},we=!ne.metadata.disable_other_countries,Ge=we?{cursor:"pointer","&:hover":(0,y.wL)({backgroundColor:"#e6e6e633"})}:{};return(0,i.BX)("div",b({ref:j,css:b({maxWidth:"100%",width:"100%",height:"100%",position:"relative",pointerEvents:L?"none":"auto"},r.getTarget("fc"))},h,{children:[F,t,(0,i.BX)("div",b({ref:W,css:b(b(b({display:"flex",position:"relative"},r.getTarget("sub-fc")),w?r.getTarget("disabled"):{}),{"&:hover":(0,y.wL)(w?{}:b(b({},r.getTarget("hover")),Ee.hover)),"&&":Se?b(b({},r.getTarget("active")),Ee.active):{}})},{children:[be,(0,i.tZ)("div",b({"data-testid":"country-trigger",css:b(b({transition:"0.2s ease all",display:"flex",alignItems:"center",justifyContent:"center",padding:"0 6px",position:"relative",cursor:"default",fontFamily:'"Twemoji Country Flags", sans-serif'},r.getTarget("fieldToggle")),Ge),ref:H,onClick:function(){we&&!w&&re(!ae)}},{children:B[le].flag})),(0,i.tZ)(M.Z,b({show:ae,onHide:function(){return re(!1)},targetRef:H,containerRef:j,placement:"bottom-start",offset:0},{children:(0,i.tZ)(v,{itemOnClick:function(e,a){se(e),me(a),Be(a),re(!1),Te(a),Y.current.focus()},responsiveStyles:r,dropdownWidth:Ce,ref:function(e){V.current=e},show:ae})}),"overlay-".concat(le)),(0,i.BX)("div",b({css:{position:"relative",width:"100%",whiteSpace:"nowrap",overflowX:"clip"}},{children:[(0,i.tZ)("input",{id:ne.key,name:ne.key,css:b(b(b(b({backgroundColor:"transparent",height:"100%",width:"100%",border:"none",margin:0},_?{textAlign:"right"}:{}),s.ET),r.getTarget("field")),Se||Pe||!he?{}:{color:"transparent !important"}),required:P,disabled:w,placeholder:"","aria-label":a.properties.aria_label,value:Pe,ref:function(e){Y.current=e,D(e)},type:"tel",autoComplete:"on"===I?"tel":"new-password",dir:"ltr",onFocus:function(e){(0,y.ms)(e),me((function(e){return""===e?(Be(Ae),Ae):e})),ye(!0)},onClick:function(e){!function(e){var a;if(e){var r=Re(Ae),i=null!==(a=e.selectionStart)&&void 0!==a?a:r;if(i>=r)X(i);else{var c=de.length>Ae.length?e.value.length:r;e.setSelectionRange(c,c),X(c)}}}(e.currentTarget)},onBlur:function(){var e=de;Ae.startsWith(de)&&(X(null),me(e="")),Te(e),ye(!1)},onKeyDown:function(e){"Enter"===e.key?(Te(de),x(e)):"+"===e.key&&re(!0)},onChange:function(e){var a,r=e.target.selectionStart,i=e.target.value;if(i){var c=m.BZ;if(!c)return;if((i.match(/\+/g)||[]).length>1){var t=i.lastIndexOf("+");i=i.slice(t)}if((i=i.replace(/\s/g,"")).includes("+")||(i=c.validatePhoneNumberLength(i,le)&&i.startsWith(Ae)?"+".concat(i):"+".concat(Ae).concat(i)),!i.startsWith("+".concat(Ae)))return;if(i.startsWith("+11"))return;var n=c.parseDigits(i,le);if("TOO_LONG"===c.validatePhoneNumberLength(n,le)||(a=le)in C&&n.length>C[a])return;var o=new c.AsYouType(le).input("+".concat(n)),u=c.parseDigits(Pe.slice(0,null!=z?z:0)).length;me(n);var l=c.parseDigits(o,le).length-c.parseDigits(Pe,le).length;if(r&&l>0)for(;r<=o.length&&!(0,d.e9)(o[r])||c.parseDigits(o.slice(0,r)).length<=u;)r++}else me(Ae),r=Re(Ae);Ue(null!=r?r:0)}}),(0,i.tZ)(u.Z,{value:Pe,element:{properties:{placeholder:he}},responsiveStyles:r,repeatIndex:k}),(0,i.tZ)(l.Z,{containerRef:j,id:a.id,text:a.properties.tooltipText,responsiveStyles:r,repeat:a.repeat})]}))]}))]}))}))},5398:(e,a,r)=>{r.d(a,{Z:()=>t});var i=r(7294),c=r(9479);function t(e){var a=function(e,a){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,c,t=r.call(e),n=[];try{for(;(void 0===a||a-- >0)&&!(i=t.next()).done;)n.push(i.value)}catch(e){c={error:e}}finally{try{i&&!i.done&&(r=t.return)&&r.call(t)}finally{if(c)throw c.error}}return n}((0,i.useState)({width:void 0,height:void 0}),2),r=a[0],t=a[1];return(0,i.useLayoutEffect)((function(){var a=function(){var a=e.current;if(a){var r=a.getBoundingClientRect(),i=r.width,c=r.height;t({width:i>0?i:void 0,height:c>0?c:void 0})}},r=e.current;if(r){if("undefined"==typeof ResizeObserver){var i=(0,c.Kv)();return i&&"function"==typeof i.addEventListener&&"function"==typeof i.removeEventListener?(i.addEventListener("resize",a),a(),function(){return i.removeEventListener("resize",a)}):void a()}var n=new ResizeObserver((function(){return a()}));try{n.observe(r,{box:"border-box"})}catch(e){n.observe(r)}return a(),function(){return n.disconnect()}}}),[e]),r}}}]);
1
+ "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[213],{1587:(e,a,r)=>{r.d(a,{Z:()=>f});var i=r(5944),c=r(7294),t=r(8776),n=r(5467),o=r(2988),u=r(4665),l=r(7449),s=r(9479),A=function(){return A=Object.assign||function(e){for(var a,r=1,i=arguments.length;r<i;r++)for(var c in a=arguments[r])Object.prototype.hasOwnProperty.call(a,c)&&(e[c]=a[c]);return e},A.apply(this,arguments)};function f(e){var a=e.id,r=e.text,f=e.responsiveStyles,d=e.absolute,m=void 0===d||d,p=e.containerRef,h=e.repeat,g=function(e,a){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,c,t=r.call(e),n=[];try{for(;(void 0===a||a-- >0)&&!(i=t.next()).done;)n.push(i.value)}catch(e){c={error:e}}finally{try{i&&!i.done&&(r=t.return)&&r.call(t)}finally{if(c)throw c.error}}return n}((0,c.useState)(!1),2),v=g[0],S=g[1],y=(0,c.useRef)(null);if(!(r=(0,u.xf)(r,h)))return null;var C=(0,s.tq)();return(0,i.BX)(i.HY,{children:[(0,i.tZ)("div",A({ref:y,onMouseEnter:C?void 0:function(){return S(!0)},onMouseLeave:C?void 0:function(){return S(!1)},onFocus:function(){return S(!0)},onBlur:function(){return S(!1)},onClick:function(){return S((function(e){return!e}))},css:m?{position:"absolute",insetInlineEnd:"10px",top:0,bottom:0,zIndex:o.rM,margin:"auto",cursor:"pointer",height:"100%",display:"flex"}:{position:"relative",marginInlineStart:"8px",display:"flex",alignItems:"center"}},{children:(0,i.tZ)(n.by,{cssStyles:f.getTarget("tooltipIcon")})})),(0,i.tZ)(l.Z,A({show:v,targetRef:y,containerRef:p,placement:"left",onHide:function(){return S(!1)},offset:8},{children:(0,i.tZ)(t.u,A({id:"tooltip-".concat(a),css:{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"}}},{children:r}))}))]})}},7449:(e,a,r)=>{r.d(a,{Z:()=>u});var i=r(5944),c=r(7294),t=r(3935),n=r(9479),o=function(){return o=Object.assign||function(e){for(var a,r=1,i=arguments.length;r<i;r++)for(var c in a=arguments[r])Object.prototype.hasOwnProperty.call(a,c)&&(e[c]=a[c]);return e},o.apply(this,arguments)};const u=function(e){var a=e.show,r=e.targetRef,u=e.children,A=e.onHide,f=e.placement,d=void 0===f?"bottom-start":f,m=e.offset,p=void 0===m?0:m,h=e.zIndex,g=void 0===h?1e3:h,v=e.containerRef,S=(0,c.useRef)(null),y=function(e,a){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,c,t=r.call(e),n=[];try{for(;(void 0===a||a-- >0)&&!(i=t.next()).done;)n.push(i.value)}catch(e){c={error:e}}finally{try{i&&!i.done&&(r=t.return)&&r.call(t)}finally{if(c)throw c.error}}return n}((0,c.useState)(null),2),C=y[0],M=y[1],E=(0,c.useCallback)((function(){return(null==v?void 0:v.current)||(0,n.me)().body}),[v]),b=(0,c.useCallback)((function(){var e;if(a&&r.current&&S.current){var i=(0,n.Kv)(),c=E();if(c){var t=r.current.getBoundingClientRect(),o=S.current.getBoundingClientRect(),u=c.getBoundingClientRect(),A=s(d,t,o,p),f=A.top,m=A.left,h=f+o.height,g=m+o.width,v=f>=0&&h<=i.innerHeight,y=m>=0&&g<=i.innerWidth;if(!v||!y){var C=l(d,!v,!y);C!==d&&(f=(e=s(C,t,o,p)).top,m=e.left)}var b=c===(0,n.me)().body,R=b?f+i.scrollY:f-u.top,U=b?m+i.scrollX:m-u.left;M((function(e){return e&&e.top===R&&e.left===U?e:{top:R,left:U}}))}}}),[a,d,p,E,r]),R=(0,c.useCallback)((function(){var e=!1;return function(){e||(e=!0,requestAnimationFrame((function(){b(),e=!1})))}}),[b])();if((0,c.useLayoutEffect)((function(){a&&b()}),[a,b]),(0,c.useEffect)((function(){if(a){var e=(0,n.Kv)(),i=E();if(i){e.addEventListener("resize",R),e.addEventListener("scroll",R,!0),i!==(0,n.me)().body&&i.addEventListener("scroll",R);var c=new ResizeObserver((function(){return R()}));return r.current&&c.observe(r.current),i!==(0,n.me)().body&&c.observe(i),function(){e.removeEventListener("resize",R),e.removeEventListener("scroll",R,!0),i!==(0,n.me)().body&&i.removeEventListener("scroll",R),c.disconnect()}}}}),[a,R,E,r]),(0,c.useEffect)((function(){if(a){var e=function(e){"Escape"===e.key&&(M(null),null==A||A())},i=function(e){var a=e.target;S.current&&!S.current.contains(a)&&r.current&&!r.current.contains(a)&&(M(null),null==A||A())},c=(0,n.me)();return c.addEventListener("mousedown",i),c.addEventListener("keydown",e),function(){c.removeEventListener("mousedown",i),c.removeEventListener("keydown",e)}}}),[a,A,r]),!a)return null;var U=E();return U?(0,t.createPortal)((0,i.tZ)("div",o({ref:S,style:o(o({position:"absolute"},C||{top:-9999,left:-9999}),{zIndex:g})},{children:u})),U):(0,i.tZ)(i.HY,{children:u})};var l=function(e,a,r){if(a){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,a,r,i){switch(void 0===i&&(i=0),e){case"top":return{top:a.top-r.height-i,left:a.left+(a.width-r.width)/2};case"top-start":return{top:a.top-r.height-i,left:a.left};case"top-end":return{top:a.top-r.height-i,left:a.right-r.width};case"left":return{top:a.top+(a.height-r.height)/2,left:a.left-r.width-i};case"left-start":return{top:a.top,left:a.left-r.width-i};case"left-end":return{top:a.bottom-r.height,left:a.left-r.width-i};case"bottom":default:return{top:a.bottom+i,left:a.left+(a.width-r.width)/2};case"bottom-start":return{top:a.bottom+i,left:a.left};case"bottom-end":return{top:a.bottom+i,left:a.right-r.width};case"right":return{top:a.top+(a.height-r.height)/2,left:a.right+i};case"right-start":return{top:a.top,left:a.right+i};case"right-end":return{top:a.bottom-r.height,left:a.right+i}}}},9069:(e,a,r)=>{r.d(a,{Z:()=>t});var i=r(5944),c=function(){return c=Object.assign||function(e){for(var a,r=1,i=arguments.length;r<i;r++)for(var c in a=arguments[r])Object.prototype.hasOwnProperty.call(a,c)&&(e[c]=a[c]);return e},c.apply(this,arguments)};function t(e){var a,r,t,n=e.value,o=e.element,u=e.responsiveStyles,l=e.type,s=void 0===l?"input":l,A=e.inputFocused,f=void 0!==A&&A,d=e.repeatIndex,m=void 0===d?null:d,p=o.properties,h=null!==(t=(null!==(r=p.repeat_placeholder)&&void 0!==r?r:[])[null!=m?m:0])&&void 0!==t?t:p.placeholder||"",g=c(c({},u.getTarget("placeholderFocus")),u.getTarget("placeholderActive"));return(0,i.tZ)("span",c({css:c(c(c(c({position:"absolute",pointerEvents:"none",insetInlineStart:"0.75rem",transition:"0.2s ease all",top:"input"===s?"50%":"0.6rem"},u.getTarget("placeholder")),n?u.getTarget("placeholderFocus"):{}),f?g:{}),(a={},a["".concat(s,":focus ~ &")]=g,a))},{children:h}))}},8776:(e,a,r)=>{r.d(a,{u:()=>n});var i=r(5944),c=r(2988),t=function(){return t=Object.assign||function(e){for(var a,r=1,i=arguments.length;r<i;r++)for(var c in a=arguments[r])Object.prototype.hasOwnProperty.call(a,c)&&(e[c]=a[c]);return e},t.apply(this,arguments)},n=function(e){var a=e.children,r=e.css,n=function(e,a){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&a.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var c=0;for(i=Object.getOwnPropertySymbols(e);c<i.length;c++)a.indexOf(i[c])<0&&Object.prototype.propertyIsEnumerable.call(e,i[c])&&(r[i[c]]=e[i[c]])}return r}(e,["children","css"]);return(0,i.tZ)("div",t({css:t({zIndex:c.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)},n,{children:(0,i.tZ)("div",t({className:"tooltip-inner"},{children:a}))}))}},6067:(e,a,r)=>{r.r(a),r.d(a,{default:()=>P});var i=r(5944),c=r(7294);function t(e,a,r){return e.clearRect(0,0,100,100),e.fillStyle=r,e.fillText(a,0,0),e.getImageData(0,0,1,1).data.join(",")}function n(e){const a=function(){const e=document.createElement("canvas");e.width=e.height=1;const a=e.getContext("2d",{willReadFrequently:!0});return a.textBaseline="top",a.font='100px "Twemoji Mozilla","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji","EmojiOne Color","Android Emoji",sans-serif',a.scale(.01,.01),a}(),r=t(a,e,"#fff"),i=t(a,e,"#000");return i===r&&!i.startsWith("0,0,0,")}const o={"Africa/Abidjan":{c:["CI","BF","GH","GM","GN","ML","MR","SH","SL","SN","TG"]},"Africa/Accra":{c:["GH"]},"Africa/Addis_Ababa":{c:["ET"]},"Africa/Algiers":{c:["DZ"]},"Africa/Asmara":{c:["ER"]},"Africa/Asmera":{c:["ER"]},"Africa/Bamako":{c:["ML"]},"Africa/Bangui":{c:["CF"]},"Africa/Banjul":{c:["GM"]},"Africa/Bissau":{c:["GW"]},"Africa/Blantyre":{c:["MW"]},"Africa/Brazzaville":{c:["CG"]},"Africa/Bujumbura":{c:["BI"]},"Africa/Cairo":{c:["EG"]},"Africa/Casablanca":{c:["MA"]},"Africa/Ceuta":{c:["ES"]},"Africa/Conakry":{c:["GN"]},"Africa/Dakar":{c:["SN"]},"Africa/Dar_es_Salaam":{c:["TZ"]},"Africa/Djibouti":{c:["DJ"]},"Africa/Douala":{c:["CM"]},"Africa/El_Aaiun":{c:["EH"]},"Africa/Freetown":{c:["SL"]},"Africa/Gaborone":{c:["BW"]},"Africa/Harare":{c:["ZW"]},"Africa/Johannesburg":{c:["ZA","LS","SZ"]},"Africa/Juba":{c:["SS"]},"Africa/Kampala":{c:["UG"]},"Africa/Khartoum":{c:["SD"]},"Africa/Kigali":{c:["RW"]},"Africa/Kinshasa":{c:["CD"]},"Africa/Lagos":{c:["NG","AO","BJ","CD","CF","CG","CM","GA","GQ","NE"]},"Africa/Libreville":{c:["GA"]},"Africa/Lome":{c:["TG"]},"Africa/Luanda":{c:["AO"]},"Africa/Lubumbashi":{c:["CD"]},"Africa/Lusaka":{c:["ZM"]},"Africa/Malabo":{c:["GQ"]},"Africa/Maputo":{c:["MZ","BI","BW","CD","MW","RW","ZM","ZW"]},"Africa/Maseru":{c:["LS"]},"Africa/Mbabane":{c:["SZ"]},"Africa/Mogadishu":{c:["SO"]},"Africa/Monrovia":{c:["LR"]},"Africa/Nairobi":{c:["KE","DJ","ER","ET","KM","MG","SO","TZ","UG","YT"]},"Africa/Ndjamena":{c:["TD"]},"Africa/Niamey":{c:["NE"]},"Africa/Nouakchott":{c:["MR"]},"Africa/Ouagadougou":{c:["BF"]},"Africa/Porto-Novo":{c:["BJ"]},"Africa/Sao_Tome":{c:["ST"]},"Africa/Timbuktu":{c:["ML"]},"Africa/Tripoli":{c:["LY"]},"Africa/Tunis":{c:["TN"]},"Africa/Windhoek":{c:["NA"]},"America/Adak":{c:["US"]},"America/Anchorage":{c:["US"]},"America/Anguilla":{c:["AI"]},"America/Antigua":{c:["AG"]},"America/Araguaina":{c:["BR"]},"America/Argentina/Buenos_Aires":{c:["AR"]},"America/Argentina/Catamarca":{c:["AR"]},"America/Argentina/Cordoba":{c:["AR"]},"America/Argentina/Jujuy":{c:["AR"]},"America/Argentina/La_Rioja":{c:["AR"]},"America/Argentina/Mendoza":{c:["AR"]},"America/Argentina/Rio_Gallegos":{c:["AR"]},"America/Argentina/Salta":{c:["AR"]},"America/Argentina/San_Juan":{c:["AR"]},"America/Argentina/San_Luis":{c:["AR"]},"America/Argentina/Tucuman":{c:["AR"]},"America/Argentina/Ushuaia":{c:["AR"]},"America/Aruba":{c:["AW"]},"America/Asuncion":{c:["PY"]},"America/Atikokan":{c:["CA"]},"America/Bahia":{c:["BR"]},"America/Bahia_Banderas":{c:["MX"]},"America/Barbados":{c:["BB"]},"America/Belem":{c:["BR"]},"America/Belize":{c:["BZ"]},"America/Blanc-Sablon":{c:["CA"]},"America/Boa_Vista":{c:["BR"]},"America/Bogota":{c:["CO"]},"America/Boise":{c:["US"]},"America/Cambridge_Bay":{c:["CA"]},"America/Campo_Grande":{c:["BR"]},"America/Cancun":{c:["MX"]},"America/Caracas":{c:["VE"]},"America/Cayenne":{c:["GF"]},"America/Cayman":{c:["KY"]},"America/Chicago":{c:["US"]},"America/Chihuahua":{c:["MX"]},"America/Coral_Harbour":{c:["CA"]},"America/Costa_Rica":{c:["CR"]},"America/Creston":{c:["CA"]},"America/Cuiaba":{c:["BR"]},"America/Curacao":{c:["CW"]},"America/Danmarkshavn":{c:["GL"]},"America/Dawson":{c:["CA"]},"America/Dawson_Creek":{c:["CA"]},"America/Denver":{c:["US"]},"America/Detroit":{c:["US"]},"America/Dominica":{c:["DM"]},"America/Edmonton":{c:["CA"]},"America/Eirunepe":{c:["BR"]},"America/El_Salvador":{c:["SV"]},"America/Fort_Nelson":{c:["CA"]},"America/Fortaleza":{c:["BR"]},"America/Glace_Bay":{c:["CA"]},"America/Goose_Bay":{c:["CA"]},"America/Grand_Turk":{c:["TC"]},"America/Grenada":{c:["GD"]},"America/Guadeloupe":{c:["GP"]},"America/Guatemala":{c:["GT"]},"America/Guayaquil":{c:["EC"]},"America/Guyana":{c:["GY"]},"America/Halifax":{c:["CA"]},"America/Havana":{c:["CU"]},"America/Hermosillo":{c:["MX"]},"America/Indiana/Indianapolis":{c:["US"]},"America/Indiana/Knox":{c:["US"]},"America/Indiana/Marengo":{c:["US"]},"America/Indiana/Petersburg":{c:["US"]},"America/Indiana/Tell_City":{c:["US"]},"America/Indiana/Vevay":{c:["US"]},"America/Indiana/Vincennes":{c:["US"]},"America/Indiana/Winamac":{c:["US"]},"America/Inuvik":{c:["CA"]},"America/Iqaluit":{c:["CA"]},"America/Jamaica":{c:["JM"]},"America/Juneau":{c:["US"]},"America/Kentucky/Louisville":{c:["US"]},"America/Kentucky/Monticello":{c:["US"]},"America/Kralendijk":{c:["BQ"]},"America/La_Paz":{c:["BO"]},"America/Lima":{c:["PE"]},"America/Los_Angeles":{c:["US"]},"America/Lower_Princes":{c:["SX"]},"America/Maceio":{c:["BR"]},"America/Managua":{c:["NI"]},"America/Manaus":{c:["BR"]},"America/Marigot":{c:["MF"]},"America/Martinique":{c:["MQ"]},"America/Matamoros":{c:["MX"]},"America/Mazatlan":{c:["MX"]},"America/Menominee":{c:["US"]},"America/Merida":{c:["MX"]},"America/Metlakatla":{c:["US"]},"America/Mexico_City":{c:["MX"]},"America/Miquelon":{c:["PM"]},"America/Moncton":{c:["CA"]},"America/Monterrey":{c:["MX"]},"America/Montevideo":{c:["UY"]},"America/Montreal":{c:["CA"]},"America/Montserrat":{c:["MS"]},"America/Nassau":{c:["BS"]},"America/New_York":{c:["US"]},"America/Nipigon":{c:["CA"]},"America/Nome":{c:["US"]},"America/Noronha":{c:["BR"]},"America/North_Dakota/Beulah":{c:["US"]},"America/North_Dakota/Center":{c:["US"]},"America/North_Dakota/New_Salem":{c:["US"]},"America/Nuuk":{c:["GL"]},"America/Ojinaga":{c:["MX"]},"America/Panama":{c:["PA","CA","KY"]},"America/Pangnirtung":{c:["CA"]},"America/Paramaribo":{c:["SR"]},"America/Phoenix":{c:["US","CA"]},"America/Port-au-Prince":{c:["HT"]},"America/Port_of_Spain":{c:["TT"]},"America/Porto_Velho":{c:["BR"]},"America/Puerto_Rico":{c:["PR","AG","CA","AI","AW","BL","BQ","CW","DM","GD","GP","KN","LC","MF","MS","SX","TT","VC","VG","VI"]},"America/Punta_Arenas":{c:["CL"]},"America/Rainy_River":{c:["CA"]},"America/Rankin_Inlet":{c:["CA"]},"America/Recife":{c:["BR"]},"America/Regina":{c:["CA"]},"America/Resolute":{c:["CA"]},"America/Rio_Branco":{c:["BR"]},"America/Santarem":{c:["BR"]},"America/Santiago":{c:["CL"]},"America/Santo_Domingo":{c:["DO"]},"America/Sao_Paulo":{c:["BR"]},"America/Scoresbysund":{c:["GL"]},"America/Sitka":{c:["US"]},"America/St_Barthelemy":{c:["BL"]},"America/St_Johns":{c:["CA"]},"America/St_Kitts":{c:["KN"]},"America/St_Lucia":{c:["LC"]},"America/St_Thomas":{c:["VI"]},"America/St_Vincent":{c:["VC"]},"America/Swift_Current":{c:["CA"]},"America/Tegucigalpa":{c:["HN"]},"America/Thule":{c:["GL"]},"America/Thunder_Bay":{c:["CA"]},"America/Tijuana":{c:["MX"]},"America/Toronto":{c:["CA","BS"]},"America/Tortola":{c:["VG"]},"America/Vancouver":{c:["CA"]},"America/Virgin":{c:["VI"]},"America/Whitehorse":{c:["CA"]},"America/Winnipeg":{c:["CA"]},"America/Yakutat":{c:["US"]},"America/Yellowknife":{c:["CA"]},"Antarctica/Casey":{c:["AQ"]},"Antarctica/Davis":{c:["AQ"]},"Antarctica/DumontDUrville":{c:["AQ"]},"Antarctica/Macquarie":{c:["AU"]},"Antarctica/Mawson":{c:["AQ"]},"Antarctica/McMurdo":{c:["AQ"]},"Antarctica/Palmer":{c:["AQ"]},"Antarctica/Rothera":{c:["AQ"]},"Antarctica/South_Pole":{c:["AQ"]},"Antarctica/Syowa":{c:["AQ"]},"Antarctica/Troll":{c:["AQ"]},"Antarctica/Vostok":{c:["AQ"]},"Arctic/Longyearbyen":{c:["SJ"]},"Asia/Aden":{c:["YE"]},"Asia/Almaty":{c:["KZ"]},"Asia/Amman":{c:["JO"]},"Asia/Anadyr":{c:["RU"]},"Asia/Aqtau":{c:["KZ"]},"Asia/Aqtobe":{c:["KZ"]},"Asia/Ashgabat":{c:["TM"]},"Asia/Atyrau":{c:["KZ"]},"Asia/Baghdad":{c:["IQ"]},"Asia/Bahrain":{c:["BH"]},"Asia/Baku":{c:["AZ"]},"Asia/Bangkok":{c:["TH","KH","LA","VN"]},"Asia/Barnaul":{c:["RU"]},"Asia/Beirut":{c:["LB"]},"Asia/Bishkek":{c:["KG"]},"Asia/Brunei":{c:["BN"]},"Asia/Calcutta":{c:["IN"]},"Asia/Chita":{c:["RU"]},"Asia/Choibalsan":{c:["MN"]},"Asia/Colombo":{c:["LK"]},"Asia/Damascus":{c:["SY"]},"Asia/Dhaka":{c:["BD"]},"Asia/Dili":{c:["TL"]},"Asia/Dubai":{c:["AE","OM"]},"Asia/Dushanbe":{c:["TJ"]},"Asia/Famagusta":{c:["CY"]},"Asia/Gaza":{c:["PS"]},"Asia/Hebron":{c:["PS"]},"Asia/Ho_Chi_Minh":{c:["VN"]},"Asia/Hong_Kong":{c:["HK"]},"Asia/Hovd":{c:["MN"]},"Asia/Irkutsk":{c:["RU"]},"Asia/Jakarta":{c:["ID"]},"Asia/Jayapura":{c:["ID"]},"Asia/Jerusalem":{c:["IL"]},"Asia/Kabul":{c:["AF"]},"Asia/Kamchatka":{c:["RU"]},"Asia/Karachi":{c:["PK"]},"Asia/Kathmandu":{c:["NP"]},"Asia/Khandyga":{c:["RU"]},"Asia/Kolkata":{c:["IN"]},"Asia/Krasnoyarsk":{c:["RU"]},"Asia/Kuala_Lumpur":{c:["MY"]},"Asia/Kuching":{c:["MY"]},"Asia/Kuwait":{c:["KW"]},"Asia/Macau":{c:["MO"]},"Asia/Magadan":{c:["RU"]},"Asia/Makassar":{c:["ID"]},"Asia/Manila":{c:["PH"]},"Asia/Muscat":{c:["OM"]},"Asia/Nicosia":{c:["CY"]},"Asia/Novokuznetsk":{c:["RU"]},"Asia/Novosibirsk":{c:["RU"]},"Asia/Omsk":{c:["RU"]},"Asia/Oral":{c:["KZ"]},"Asia/Phnom_Penh":{c:["KH"]},"Asia/Pontianak":{c:["ID"]},"Asia/Pyongyang":{c:["KP"]},"Asia/Qatar":{c:["QA","BH"]},"Asia/Qostanay":{c:["KZ"]},"Asia/Qyzylorda":{c:["KZ"]},"Asia/Riyadh":{c:["SA","AQ","KW","YE"]},"Asia/Sakhalin":{c:["RU"]},"Asia/Samarkand":{c:["UZ"]},"Asia/Seoul":{c:["KR"]},"Asia/Shanghai":{c:["CN"]},"Asia/Singapore":{c:["SG","MY"]},"Asia/Srednekolymsk":{c:["RU"]},"Asia/Taipei":{c:["TW"]},"Asia/Tashkent":{c:["UZ"]},"Asia/Tbilisi":{c:["GE"]},"Asia/Tehran":{c:["IR"]},"Asia/Thimphu":{c:["BT"]},"Asia/Tokyo":{c:["JP"]},"Asia/Tomsk":{c:["RU"]},"Asia/Ulaanbaatar":{c:["MN"]},"Asia/Urumqi":{c:["CN"]},"Asia/Ust-Nera":{c:["RU"]},"Asia/Vientiane":{c:["LA"]},"Asia/Vladivostok":{c:["RU"]},"Asia/Yakutsk":{c:["RU"]},"Asia/Yangon":{c:["MM"]},"Asia/Yekaterinburg":{c:["RU"]},"Asia/Yerevan":{c:["AM"]},"Atlantic/Azores":{c:["PT"]},"Atlantic/Bermuda":{c:["BM"]},"Atlantic/Canary":{c:["ES"]},"Atlantic/Cape_Verde":{c:["CV"]},"Atlantic/Faroe":{c:["FO"]},"Atlantic/Jan_Mayen":{c:["SJ"]},"Atlantic/Madeira":{c:["PT"]},"Atlantic/Reykjavik":{c:["IS"]},"Atlantic/South_Georgia":{c:["GS"]},"Atlantic/St_Helena":{c:["SH"]},"Atlantic/Stanley":{c:["FK"]},"Australia/Adelaide":{c:["AU"]},"Australia/Brisbane":{c:["AU"]},"Australia/Broken_Hill":{c:["AU"]},"Australia/Darwin":{c:["AU"]},"Australia/Eucla":{c:["AU"]},"Australia/Hobart":{c:["AU"]},"Australia/Lindeman":{c:["AU"]},"Australia/Lord_Howe":{c:["AU"]},"Australia/Melbourne":{c:["AU"]},"Australia/Perth":{c:["AU"]},"Australia/Sydney":{c:["AU"]},"Canada/Eastern":{c:["CA"]},"Europe/Amsterdam":{c:["NL"]},"Europe/Andorra":{c:["AD"]},"Europe/Astrakhan":{c:["RU"]},"Europe/Athens":{c:["GR"]},"Europe/Belfast":{c:["GB"]},"Europe/Belgrade":{c:["RS","BA","HR","ME","MK","SI"]},"Europe/Berlin":{c:["DE"]},"Europe/Bratislava":{c:["SK"]},"Europe/Brussels":{c:["BE"]},"Europe/Bucharest":{c:["RO"]},"Europe/Budapest":{c:["HU"]},"Europe/Busingen":{c:["DE"]},"Europe/Chisinau":{c:["MD"]},"Europe/Copenhagen":{c:["DK"]},"Europe/Dublin":{c:["IE"]},"Europe/Gibraltar":{c:["GI"]},"Europe/Guernsey":{c:["GG"]},"Europe/Helsinki":{c:["FI","AX"]},"Europe/Isle_of_Man":{c:["IM"]},"Europe/Istanbul":{c:["TR"]},"Europe/Jersey":{c:["JE"]},"Europe/Kaliningrad":{c:["RU"]},"Europe/Kiev":{c:["UA"]},"Europe/Kirov":{c:["RU"]},"Europe/Lisbon":{c:["PT"]},"Europe/Ljubljana":{c:["SI"]},"Europe/London":{c:["GB","GG","IM","JE"]},"Europe/Luxembourg":{c:["LU"]},"Europe/Madrid":{c:["ES"]},"Europe/Malta":{c:["MT"]},"Europe/Mariehamn":{c:["AX"]},"Europe/Minsk":{c:["BY"]},"Europe/Monaco":{c:["MC"]},"Europe/Moscow":{c:["RU"]},"Europe/Oslo":{c:["NO","SJ","BV"]},"Europe/Paris":{c:["FR"]},"Europe/Podgorica":{c:["ME"]},"Europe/Prague":{c:["CZ","SK"]},"Europe/Riga":{c:["LV"]},"Europe/Rome":{c:["IT","SM","VA"]},"Europe/Samara":{c:["RU"]},"Europe/San_Marino":{c:["SM"]},"Europe/Sarajevo":{c:["BA"]},"Europe/Saratov":{c:["RU"]},"Europe/Simferopol":{c:["RU","UA"]},"Europe/Skopje":{c:["MK"]},"Europe/Sofia":{c:["BG"]},"Europe/Stockholm":{c:["SE"]},"Europe/Tallinn":{c:["EE"]},"Europe/Tirane":{c:["AL"]},"Europe/Ulyanovsk":{c:["RU"]},"Europe/Uzhgorod":{c:["UA"]},"Europe/Vaduz":{c:["LI"]},"Europe/Vatican":{c:["VA"]},"Europe/Vienna":{c:["AT"]},"Europe/Vilnius":{c:["LT"]},"Europe/Volgograd":{c:["RU"]},"Europe/Warsaw":{c:["PL"]},"Europe/Zagreb":{c:["HR"]},"Europe/Zaporozhye":{c:["UA"]},"Europe/Zurich":{c:["CH","DE","LI"]},GB:{c:["GB"]},"GB-Eire":{c:["GB"]},"Indian/Antananarivo":{c:["MG"]},"Indian/Chagos":{c:["IO"]},"Indian/Christmas":{c:["CX"]},"Indian/Cocos":{c:["CC"]},"Indian/Comoro":{c:["KM"]},"Indian/Kerguelen":{c:["TF","HM"]},"Indian/Mahe":{c:["SC"]},"Indian/Maldives":{c:["MV"]},"Indian/Mauritius":{c:["MU"]},"Indian/Mayotte":{c:["YT"]},"Indian/Reunion":{c:["RE","TF"]},NZ:{c:["NZ"]},"Pacific/Apia":{c:["WS"]},"Pacific/Auckland":{c:["NZ","AQ"]},"Pacific/Bougainville":{c:["PG"]},"Pacific/Chatham":{c:["NZ"]},"Pacific/Chuuk":{c:["FM"]},"Pacific/Easter":{c:["CL"]},"Pacific/Efate":{c:["VU"]},"Pacific/Fakaofo":{c:["TK"]},"Pacific/Fiji":{c:["FJ"]},"Pacific/Funafuti":{c:["TV"]},"Pacific/Galapagos":{c:["EC"]},"Pacific/Gambier":{c:["PF"]},"Pacific/Guadalcanal":{c:["SB"]},"Pacific/Guam":{c:["GU","MP"]},"Pacific/Honolulu":{c:["US","UM"]},"Pacific/Johnston":{c:["UM"]},"Pacific/Kanton":{c:["KI"]},"Pacific/Kiritimati":{c:["KI"]},"Pacific/Kosrae":{c:["FM"]},"Pacific/Kwajalein":{c:["MH"]},"Pacific/Majuro":{c:["MH"]},"Pacific/Marquesas":{c:["PF"]},"Pacific/Midway":{c:["UM"]},"Pacific/Nauru":{c:["NR"]},"Pacific/Niue":{c:["NU"]},"Pacific/Norfolk":{c:["NF"]},"Pacific/Noumea":{c:["NC"]},"Pacific/Pago_Pago":{c:["AS","UM"]},"Pacific/Palau":{c:["PW"]},"Pacific/Pitcairn":{c:["PN"]},"Pacific/Pohnpei":{c:["FM"]},"Pacific/Port_Moresby":{c:["PG","AQ"]},"Pacific/Rarotonga":{c:["CK"]},"Pacific/Saipan":{c:["MP"]},"Pacific/Samoa":{c:["WS"]},"Pacific/Tahiti":{c:["PF"]},"Pacific/Tarawa":{c:["KI"]},"Pacific/Tongatapu":{c:["TO"]},"Pacific/Wake":{c:["UM"]},"Pacific/Wallis":{c:["WF"]},Singapore:{c:["SG"]},"US/Alaska":{c:["US"]},"US/Aleutian":{c:["US"]},"US/Arizona":{c:["US"]},"US/Central":{c:["US"]},"US/East-Indiana":{c:["US"]},"US/Eastern":{c:["US"]},"US/Hawaii":{c:["US"]},"US/Indiana-Starke":{c:["US"]},"US/Michigan":{c:["US"]},"US/Mountain":{c:["US"]},"US/Pacific":{c:["US"]},"US/Samoa":{c:["WS"]}};var u=r(9069),l=r(1587),s=r(1211),A=r(5198);const f={AC:"40123",AD:"312345",AE:"501234567",AF:"701234567",AG:"2684641234",AI:"2642351234",AL:"672123456",AM:"77123456",AO:"923123456",AR:"91123456789",AS:"6847331234",AT:"664123456",AU:"412345678",AW:"5601234",AX:"412345678",AZ:"401234567",BA:"61123456",BB:"2462501234",BD:"1812345678",BE:"470123456",BF:"70123456",BG:"43012345",BH:"36001234",BI:"79561234",BJ:"90011234",BL:"690001234",BM:"4413701234",BN:"7123456",BO:"71234567",BQ:"3181234",BR:"11961234567",BS:"2423591234",BT:"17123456",BW:"71123456",BY:"294911911",BZ:"6221234",CA:"5062345678",CC:"412345678",CD:"991234567",CF:"70012345",CG:"061234567",CH:"781234567",CI:"0123456789",CK:"71234",CL:"221234567",CM:"671234567",CN:"13123456789",CO:"3211234567",CR:"83123456",CU:"51234567",CV:"9911234",CW:"95181234",CX:"412345678",CY:"96123456",CZ:"601123456",DE:"15123456789",DJ:"77831001",DK:"32123456",DM:"7672251234",DO:"8092345678",DZ:"551234567",EC:"991234567",EE:"51234567",EG:"1001234567",EH:"650123456",ER:"7123456",ES:"612345678",ET:"911234567",FI:"412345678",FJ:"7012345",FK:"51234",FM:"3501234",FO:"211234",FR:"612345678",GA:"06031234",GB:"7400123456",GD:"4734031234",GE:"555123456",GF:"694201234",GG:"7781123456",GH:"231234567",GI:"57123456",GL:"221234",GM:"3012345",GN:"601123456",GP:"690001234",GQ:"222123456",GR:"6912345678",GT:"51234567",GU:"6713001234",GW:"955012345",GY:"6091234",HK:"51234567",HN:"91234567",HR:"921234567",HT:"34101234",HU:"201234567",ID:"812345678",IE:"850123456",IL:"502345678",IM:"7924123456",IN:"8123456789",IO:"3801234",IQ:"7912345678",IR:"9123456789",IS:"6111234",IT:"3123456789",JE:"7797712345",JM:"8762101234",JO:"790123456",JP:"9012345678",KE:"712123456",KG:"700123456",KH:"91234567",KI:"72001234",KM:"3212345",KN:"8697652917",KP:"1921234567",KR:"1020000000",KW:"50012345",KY:"3453231234",KZ:"7710009998",LA:"2023123456",LB:"71123456",LC:"7582845678",LI:"660234567",LK:"712345678",LR:"770123456",LS:"50123456",LT:"61234567",LU:"628123456",LV:"21234567",LY:"912345678",MA:"650123456",MC:"612345678",MD:"62112345",ME:"67622901",MF:"690001234",MG:"321234567",MH:"2351234",MK:"72345678",ML:"65012345",MM:"92123456",MN:"88123456",MO:"66123456",MP:"6702345678",MQ:"696201234",MR:"22123456",MS:"6644923456",MT:"96961234",MU:"52512345",MV:"7712345",MW:"991234567",MX:"12221234567",MY:"123456789",MZ:"821234567",NA:"811234567",NC:"751234",NE:"93123456",NF:"381234",NG:"8021234567",NI:"81234567",NL:"612345678",NO:"40612345",NP:"9841234567",NR:"5551234",NU:"8884012",NZ:"211234567",OM:"92123456",PA:"61234567",PE:"912345678",PF:"87123456",PG:"70123456",PH:"9051234567",PK:"3012345678",PL:"512345678",PM:"551234",PR:"7872345678",PS:"599123456",PT:"912345678",PW:"6201234",PY:"961456789",QA:"33123456",RE:"692123456",RO:"712034567",RS:"601234567",RU:"9123456789",RW:"720123456",SA:"512345678",SB:"7421234",SC:"2510123",SD:"911231234",SE:"701234567",SG:"81234567",SH:"51234",SI:"31234567",SJ:"41234567",SK:"912123456",SL:"25123456",SM:"66661212",SN:"701234567",SO:"71123456",SR:"7412345",SS:"977123456",ST:"9812345",SV:"70123456",SX:"7215205678",SY:"944567890",SZ:"76123456",TA:"8999",TC:"6492311234",TD:"63012345",TG:"90112345",TH:"812345678",TJ:"917123456",TK:"7290",TL:"77212345",TM:"66123456",TN:"20123456",TO:"7715123",TR:"5012345678",TT:"8682911234",TV:"901234",TW:"912345678",TZ:"621234567",UA:"501234567",UG:"712345678",US:"2015550123",UY:"94231234",UZ:"912345678",VA:"3123456789",VC:"7844301234",VE:"4121234567",VG:"2843001234",VI:"3406421234",VN:"912345678",VU:"5912345",WF:"821234",WS:"7212345",XK:"43201234",YE:"712345678",YT:"639012345",ZA:"711234567",ZM:"955123456",ZW:"712345678"};var d=r(426),m=r(9234),p=r(5200),h=r(1275),g=function(){return g=Object.assign||function(e){for(var a,r=1,i=arguments.length;r<i;r++)for(var c in a=arguments[r])Object.prototype.hasOwnProperty.call(a,c)&&(e[c]=a[c]);return e},g.apply(this,arguments)};const v=(0,c.forwardRef)((function(e,a){var r=e.show,t=e.itemOnClick,n=e.responsiveStyles,o=e.dropdownWidth,u=function(e,a){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&a.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var c=0;for(i=Object.getOwnPropertySymbols(e);c<i.length;c++)a.indexOf(i[c])<0&&Object.prototype.propertyIsEnumerable.call(e,i[c])&&(r[i[c]]=e[i[c]])}return r}(e,["show","itemOnClick","responsiveStyles","dropdownWidth"]),l=(0,c.useRef)({}),s=function(e,a){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,c,t=r.call(e),n=[];try{for(;(void 0===a||a-- >0)&&!(i=t.next()).done;)n.push(i.value)}catch(e){c={error:e}}finally{try{i&&!i.done&&(r=t.return)&&r.call(t)}finally{if(c)throw c.error}}return n}((0,c.useState)(""),2),f=s[0],d=s[1],v=(0,c.useRef)(null);(0,c.useEffect)((function(){r?v.current&&setTimeout((function(){var e;null===(e=v.current)||void 0===e||e.focus()}),50):d("")}),[r]);var S=(0,c.useMemo)((function(){var e=A.ZP.filter((function(e){var a,r=e.countryCode,i=e.countryName,c=e.phoneCode;return!(!(null===(a=m.BZ)||void 0===a?void 0:a.isSupportedCountry(r))||p.fD.client&&!A.lC.has(r))&&(!f||r.toLowerCase().includes(f)||i.toLowerCase().includes(f)||"+".concat(c).includes(f))}));return(0,i.BX)(i.HY,{children:[(0,i.tZ)("input",{ref:v,placeholder:"Search",css:{width:"100%",height:"30px",outline:"none",border:"none",borderBottom:"1px solid grey",padding:"5px 10px",fontSize:"14px"},onKeyDown:function(a){var r=function(){a.preventDefault(),a.stopPropagation()};if("ArrowDown"===a.key){r();var i=e[0];i&&l.current[i.countryCode].focus()}else"Enter"===a.key&&r()},onChange:function(e){return d(e.target.value.toLowerCase())},tabIndex:0}),e.map((function(e){var a=e.flag,r=e.countryCode,c=e.countryName,n=e.phoneCode;return(0,i.BX)("li",g({ref:function(e){l.current[r]=e},css:{padding:"2px 10px",display:"flex",alignItems:"center",transition:"0.1s ease all",fontSize:"14px","&:hover":{backgroundColor:"#e6e6e644"},"&:focus-visible":{outline:"none",backgroundColor:"#e6e6e644"}},tabIndex:0,onKeyDown:function(e){var a,i,c=function(){e.preventDefault(),e.stopPropagation()};"Enter"===e.key?(c(),t(r,n)):["ArrowDown","ArrowRight"].includes(e.key)?(c(),null===(a=l.current[r].nextSibling)||void 0===a||a.focus()):["ArrowUp","ArrowLeft"].includes(e.key)&&(c(),null===(i=l.current[r].previousSibling)||void 0===i||i.focus())},onClick:function(){return t(r,n)}},{children:[(0,i.tZ)("span",g({css:{fontSize:"24px",marginRight:"7px",lineHeight:"33px",fontFamily:'"Twemoji Country Flags", sans-serif'}},{children:a})),c,(0,i.BX)("span",g({css:{marginLeft:"7px",color:"grey"}},{children:["+",n]}))]}),r)}))]})}),[f]),y=void 0!==o?"".concat(o,"px"):"100%";return(0,i.tZ)("ul",g({css:g({zIndex:h.m,listStyleType:"none",padding:0,margin:0,backgroundColor:"white",cursor:"pointer",boxShadow:"0 0 4px rgb(0 0 0 / 15%)",maxHeight:"210px",overflowY:"scroll",overflowX:"hidden",boxSizing:"border-box",width:y},n.getTarget("dropdown")),ref:a},u,{children:S}))}));var S=r(6867),y=r(9479),C={IN:12,SG:10},M=r(7449),E=r(5398),b=function(){return b=Object.assign||function(e){for(var a,r=1,i=arguments.length;r<i;r++)for(var c in a=arguments[r])Object.prototype.hasOwnProperty.call(a,c)&&(e[c]=a[c]);return e},b.apply(this,arguments)},R=function(e,a){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,c,t=r.call(e),n=[];try{for(;(void 0===a||a-- >0)&&!(i=t.next()).done;)n.push(i.value)}catch(e){c={error:e}}finally{try{i&&!i.done&&(r=t.return)&&r.call(t)}finally{if(c)throw c.error}}return n},U="US",B=A.ZP.reduce((function(e,a){var r=a.flag,i=a.countryCode,c=a.phoneCode;return e[i]={flag:r,phoneCode:c},e}),{});const P=(0,c.memo)((function(e){var a=e.element,r=e.responsiveStyles,t=e.fieldLabel,A=e.fullNumber,p=e.elementProps,h=void 0===p?{}:p,g=e.required,P=void 0!==g&&g,T=e.disabled,w=void 0!==T&&T,G=e.repeatIndex,k=void 0===G?null:G,I=e.autoComplete,L=e.editMode,N=e.onComplete,K=void 0===N?function(){}:N,O=e.setRef,D=void 0===O?function(){}:O,Z=e.inlineError,_=e.rightToLeft,x=e.onEnter,F=e.children,H=(0,c.useRef)(null),j=(0,c.useRef)(null),W=(0,c.useRef)(null),V=(0,c.useRef)(null),Y=(0,c.useRef)(null),J=R((0,c.useState)(null),2),z=J[0],X=J[1],Q=R((0,c.useState)(0),2),q=Q[0],$=Q[1],ee=R((0,c.useState)(!1),2),ae=ee[0],re=ee[1],ie=R((0,c.useState)(""),2),ce=ie[0],te=ie[1],ne=a.servar,oe=(0,c.useMemo)((function(){if("auto"===ne.metadata.default_country){var e=Intl.DateTimeFormat().resolvedOptions().timeZone;if(!e)return U;var a=o[e];if(!a)return U;var r=a.c[0];return r in B?r:U}return ne.metadata.default_country||U}),[ne.metadata.default_country]),ue=R((0,c.useState)(oe),2),le=ue[0],se=ue[1];(0,c.useEffect)((function(){return se(oe)}),[oe]),(0,c.useEffect)((function(){try{!function(e="Twemoji Country Flags",a="https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2"){if(typeof window<"u"&&n("😊")&&!n("🇨🇭")){const r=document.createElement("style");r.textContent=`@font-face {\n font-family: "${e}";\n unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067,\n U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;\n src: url('${a}') format('woff2');\n font-display: swap;\n }`,document.head.appendChild(r)}}()}catch(e){}}),[]);var Ae=B[le].phoneCode,fe=R((0,c.useState)(""),2),de=fe[0],me=fe[1],pe=R((0,c.useState)(a.properties.placeholder),2),he=pe[0],ge=pe[1],ve=R((0,c.useState)(!1),2),Se=ve[0],ye=ve[1],Ce=(0,E.Z)(W).width,Me=(0,S.Z)({element:a,error:Z,breakpoint:r.getMobileBreakpoint()}),Ee=Me.borderStyles,be=Me.customBorder,Re=function(e){return e.length+(e.length>3?2:1)},Ue=function(e){X(e),$((function(e){return e+1}))},Be=function(e){Ue(Re(e))};(0,c.useEffect)((function(){var e=Y.current;e&&null!==z&&e.setSelectionRange(z,z)}),[q]),(0,c.useEffect)((function(){A===ce||L||m.hV.then((function(e){var a,r;if(e){var i=new e.AsYouType;i.input("+".concat(A));var c=null!==(a=i.getNumber())&&void 0!==a?a:"";te(A),me(A),c&&se(null!==(r=c.country)&&void 0!==r?r:le)}}))}),[A]);var Pe=(0,c.useMemo)((function(){var e=m.BZ;if(!e)return"+".concat(de);if(""===de)return"";var a=new e.AsYouType(le),r=e.parseDigits(de,le);return a.input("+".concat(r))}),[le,de]);(0,c.useEffect)((function(){var e,r=null!==(e=a.properties.placeholder)&&void 0!==e?e:"";if(L||r)ge(r);else{var i=f[le];m.hV.then((function(e){e&&ge(e.parsePhoneNumber(i,le).formatInternational())}))}}),[le,a]);var Te=function(e){(A||e)&&e!==A&&(te(e),K(e))},we=!ne.metadata.disable_other_countries,Ge=we?{cursor:"pointer","&:hover":(0,y.wL)({backgroundColor:"#e6e6e633"})}:{};return(0,i.BX)("div",b({ref:j,css:b({maxWidth:"100%",width:"100%",height:"100%",position:"relative",pointerEvents:L?"none":"auto"},r.getTarget("fc"))},h,{children:[F,t,(0,i.BX)("div",b({ref:W,css:b(b(b({display:"flex",position:"relative"},r.getTarget("sub-fc")),w?r.getTarget("disabled"):{}),{"&:hover":(0,y.wL)(w?{}:b(b({},r.getTarget("hover")),Ee.hover)),"&&":Se?b(b({},r.getTarget("active")),Ee.active):{}})},{children:[be,(0,i.tZ)("div",b({"data-testid":"country-trigger",css:b(b({transition:"0.2s ease all",display:"flex",alignItems:"center",justifyContent:"center",padding:"0 6px",position:"relative",cursor:"default",fontFamily:'"Twemoji Country Flags", sans-serif'},r.getTarget("fieldToggle")),Ge),ref:H,onClick:function(){we&&!w&&re(!ae)}},{children:B[le].flag})),(0,i.tZ)(M.Z,b({show:ae,onHide:function(){return re(!1)},targetRef:H,containerRef:j,placement:"bottom-start",offset:0},{children:(0,i.tZ)(v,{itemOnClick:function(e,a){se(e),me(a),Be(a),re(!1),Te(a),Y.current.focus()},responsiveStyles:r,dropdownWidth:Ce,ref:function(e){V.current=e},show:ae})}),"overlay-".concat(le)),(0,i.BX)("div",b({css:{position:"relative",width:"100%",whiteSpace:"nowrap",overflowX:"clip"}},{children:[(0,i.tZ)("input",{id:ne.key,name:ne.key,css:b(b(b(b({backgroundColor:"transparent",height:"100%",width:"100%",border:"none",margin:0},_?{textAlign:"right"}:{}),s.ET),r.getTarget("field")),Se||Pe||!he?{}:{color:"transparent !important"}),required:P,disabled:w,placeholder:"","aria-label":a.properties.aria_label,value:Pe,ref:function(e){Y.current=e,D(e)},type:"tel",autoComplete:"on"===I?"tel":"new-password",dir:"ltr",onFocus:function(e){(0,y.ms)(e),me((function(e){return""===e?(Be(Ae),Ae):e})),ye(!0)},onClick:function(e){!function(e){var a;if(e){var r=Re(Ae),i=null!==(a=e.selectionStart)&&void 0!==a?a:r;if(i>=r)X(i);else{var c=de.length>Ae.length?e.value.length:r;e.setSelectionRange(c,c),X(c)}}}(e.currentTarget)},onBlur:function(){var e=de;Ae.startsWith(de)&&(X(null),me(e="")),Te(e),ye(!1)},onKeyDown:function(e){"Enter"===e.key?(Te(de),x(e)):"+"===e.key&&re(!0)},onChange:function(e){var a,r=e.target.selectionStart,i=e.target.value;if(i){var c=m.BZ;if(!c)return;if((i.match(/\+/g)||[]).length>1){var t=i.lastIndexOf("+");i=i.slice(t)}if((i=i.replace(/\s/g,"")).includes("+")||(i=c.validatePhoneNumberLength(i,le)&&i.startsWith(Ae)?"+".concat(i):"+".concat(Ae).concat(i)),!i.startsWith("+".concat(Ae)))return;if(i.startsWith("+11"))return;var n=c.parseDigits(i,le);if("TOO_LONG"===c.validatePhoneNumberLength(n,le)||(a=le)in C&&n.length>C[a])return;var o=new c.AsYouType(le).input("+".concat(n)),u=c.parseDigits(Pe.slice(0,null!=z?z:0)).length;me(n);var l=c.parseDigits(o,le).length-c.parseDigits(Pe,le).length;if(r&&l>0)for(;r<=o.length&&!(0,d.e9)(o[r])||c.parseDigits(o.slice(0,r)).length<=u;)r++}else me(Ae),r=Re(Ae);Ue(null!=r?r:0)}}),(0,i.tZ)(u.Z,{value:Pe,element:{properties:{placeholder:he}},responsiveStyles:r,repeatIndex:k}),(0,i.tZ)(l.Z,{containerRef:j,id:a.id,text:a.properties.tooltipText,responsiveStyles:r,repeat:a.repeat})]}))]}))]}))}))},5398:(e,a,r)=>{r.d(a,{Z:()=>t});var i=r(7294),c=r(9479);function t(e){var a=function(e,a){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,c,t=r.call(e),n=[];try{for(;(void 0===a||a-- >0)&&!(i=t.next()).done;)n.push(i.value)}catch(e){c={error:e}}finally{try{i&&!i.done&&(r=t.return)&&r.call(t)}finally{if(c)throw c.error}}return n}((0,i.useState)({width:void 0,height:void 0}),2),r=a[0],t=a[1];return(0,i.useLayoutEffect)((function(){var a=function(){var a=e.current;if(a){var r=a.getBoundingClientRect(),i=r.width,c=r.height;t({width:i>0?i:void 0,height:c>0?c:void 0})}},r=e.current;if(r){if("undefined"==typeof ResizeObserver){var i=(0,c.Kv)();return i&&"function"==typeof i.addEventListener&&"function"==typeof i.removeEventListener?(i.addEventListener("resize",a),a(),function(){return i.removeEventListener("resize",a)}):void a()}var n=new ResizeObserver((function(){return a()}));try{n.observe(r,{box:"border-box"})}catch(e){n.observe(r)}return a(),function(){return n.disconnect()}}}),[e]),r}}}]);
@@ -1 +1 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[371],{8610:(e,t,n)=>{n.r(t),n.d(t,{default:()=>k});var i=n(5944),r=n(7294),o=n(2943),a=n(9479);function l(e){var t=e.getContext("2d");if(!t)throw new Error("Could not get 2d context from canvas");var n=e.width,i=e.height,r=t.getImageData(0,0,n,i).data,o=d(!0,n,i,r),a=d(!1,n,i,r),l=c(!0,n,i,r),s=c(!1,n,i,r);if(null===o||null===a||null===l||null===s)return e;var u=s-l+1,f=a-o+1,h=t.getImageData(l,o,u,f);return e.width=u,e.height=f,t.clearRect(0,0,u,f),t.putImageData(h,0,0),e}function s(e,t,n,i){return function(e,t,n,i){return{red:i[4*(n*t+e)],green:i[4*(n*t+e)+1],blue:i[4*(n*t+e)+2],alpha:i[4*(n*t+e)+3]}}(e,t,n,i).alpha}function d(e,t,n,i){for(var r=e?1:-1,o=e?0:n-1;e?o<n:o>-1;o+=r)for(var a=0;a<t;a++)if(s(a,o,t,i))return o;return null}function c(e,t,n,i){for(var r=e?1:-1,o=e?0:t-1;e?o<t:o>-1;o+=r)for(var a=0;a<n;a++)if(s(o,a,t,i))return o;return null}var u=n(3598),f=function(){return f=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},f.apply(this,arguments)};const h=(0,r.forwardRef)((function(e,t){var n=e.fieldKey,l=e.repeatIndex,s=e.responsiveStyles,d=e.defaultValue,c=void 0===d?null:d,h=e.disabled,p=void 0!==h&&h,g=e.showClear,v=void 0===g||g,y=e.onClear,b=void 0===y?function(){}:y,m=e.onEnd,x=void 0===m?function(){}:m,w=e.translation,_=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}((0,r.useState)(null!==c),2),C=_[0],k=_[1],S=(0,r.useRef)(void 0),Z=s.getTarget("field",!0);return(0,r.useImperativeHandle)(t,(function(){return{clear:function(){var e;null===(e=S.current)||void 0===e||e.clear()},isEmpty:function(){var e;return null===(e=S.current)||void 0===e?void 0:e.isEmpty()},getTrimmedCanvas:function(){var e;return null===(e=S.current)||void 0===e?void 0:e.getTrimmedCanvas()},getCanvas:function(){var e;return null===(e=S.current)||void 0===e?void 0:e.getCanvas()},fromDataURL:function(e,t){var n;return null===(n=S.current)||void 0===n?void 0:n.fromDataURL(e,t)}}})),(0,r.useEffect)((function(){!function(){var e,t,n,i,r;t=this,n=void 0,r=function(){var t,n,i,r,l;return function(e,t){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}(this,(function(s){switch(s.label){case 0:return(t=null===(e=S.current)||void 0===e?void 0:e.getCanvas())&&null===c?(t.getContext("2d").clearRect(0,0,t.width,t.height),[2]):[4,c];case 1:return(n=s.sent())?[4,(0,o.s3)(n)]:[3,3];case 2:return r=s.sent(),[3,4];case 3:r="",s.label=4;case 4:return i=r,(l=new Image).onload=function(){if(t){var e,n,r,o=t.offsetWidth/l.width,s=t.offsetHeight/l.height,d=Math.min(o,s,1.5),c=l.width*d,u=l.height*d,f=t.offsetHeight-u;t.getContext("2d").clearRect(0,0,t.width,t.height),e=t,n=i,void 0===(r={width:c,height:u,xOffset:0,yOffset:f})&&(r={}),new Promise((function(t,i){var o=e.getContext("2d"),l=new Image,s=r.ratio||(0,a.KL)(),d=r.width||e.width/s,c=r.height||e.height/s,u=r.xOffset||0,f=r.yOffset||0;l.onload=function(){null==o||o.drawImage(l,u,f,d,c),t()},l.onerror=function(e){i(e)},l.crossOrigin="anonymous",l.src=n}))}},l.src=i,[2]}}))},new((i=void 0)||(i=Promise))((function(e,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function l(e){try{s(r.throw(e))}catch(e){o(e)}}function s(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(a,l)}s((r=r.apply(t,n||[])).next())}))}()}),[c]),(0,i.BX)(i.HY,{children:[v&&C&&(0,i.tZ)("div",f({css:f(f({background:"#ffffff",position:"absolute",bottom:"5px",right:"5px",borderRadius:"6px",display:"flex",cursor:"pointer",color:"rgb(173, 173, 173)",fontSize:"14px",transition:"0.15s ease-in-out all"},p?s.getTarget("disabled"):{}),{"&:hover":{color:"black"}}),onClick:function(){S.current.clear(),b(),k(!1)}},{children:w.clear})),(0,i.tZ)(u.Z,{penColor:"black",dotSize:4,minWidth:1.5,maxWidth:3,clearOnResize:!1,canvasProps:{id:"canvas_".concat(n).concat(null!=l?l:""),style:f(f({},Z),{width:"100%",height:"100%",boxSizing:"border-box",paddingLeft:"5px"})},ref:S,onEnd:function(){x(),k(!S.current.isEmpty())}})]})}));var p=n(5096),g=n(2988),v=n(1296),y=n.n(v),b=function(){return b=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},b.apply(this,arguments)},m=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a};const x=function(e){var t,n,s=e.show,d=void 0!==s&&s,c=e.setShow,u=void 0===c?function(){}:c,f=e.fieldKey,v=e.repeatIndex,x=e.defaultValue,w=e.responsiveStyles,_=e.onClear,C=void 0===_?function(){}:_,k=e.onEnd,S=void 0===k?function(){}:k,Z=e.signMethods,I=void 0===Z?"":Z,B=e.isInitials,R=void 0!==B&&B,E=e.onSignAll,D=e.translation,X="type"===I,T="draw"===I,O=m((0,r.useState)(T),2),j=O[0],z=O[1],A=m((0,r.useState)(""),2),P=A[0],L=A[1],H=m((0,r.useState)(!1),2),K=H[0],F=H[1],Y=m((0,r.useState)(),2),V=Y[0],W=Y[1],G=m((0,r.useState)(""),2),M=G[0],U=G[1],N=(0,r.useRef)(P),$=(0,r.useRef)(null),q=R?"feathery-signer-initials":"feathery-signer-name",J=function(){return sessionStorage.getItem(q)||""};(0,r.useEffect)((function(){if(d){var e=J();L(e)}}),[d]),(0,r.useEffect)((function(){N.current=P,""!==P?(F(!0),ee()):(U(""),W(void 0),F(!1))}),[P]);var Q=function(){W(void 0),U(""),L(""),T||z(!1)},ee=(0,r.useCallback)(y()((function(){var e=N.current;if(!e)return U(""),W(void 0),void F(!1);try{var t=function(e,t,n){void 0===t&&(t="La Belle Aurore"),void 0===n&&(n="1.5em");var i=(0,a.me)().createElement("canvas"),r=i.getContext("2d");if(r){i.width=2240,i.height=400,r.clearRect(0,0,i.width,i.height),r.scale(4,4),r.font="".concat(n," ").concat(t),r.fillStyle="#000",r.textBaseline="middle";var o=r.measureText(e).width,l=1.5*parseInt(n);return r.scale(1/4,1/4),i.width=4*o+160,i.height=4*l+160,r.clearRect(0,0,i.width,i.height),r.scale(4,4),r.font="".concat(n," ").concat(t),r.fillStyle="#000",r.textBaseline="middle",r.fillText(e,20,i.height/2/4),i}}(e);if(!t)throw new Error("Could not find signature canvas");var n=l(t).toDataURL("image/png",1),i=(0,o.KG)(n,"".concat(f,".png"));U(n),W(i),F(!1)}catch(e){console.error("Error generating signature:",e),F(!1)}}),1e3),[]),te=function(){u(!1),Q()};return d?(0,i.BX)("div",b({css:{position:"fixed",display:"flex",top:0,left:0,width:"100vw",height:"100vh",background:"rgba(0, 0, 0, 0.2)",zIndex:g.y$,alignItems:"center",justifyContent:"center",fontSize:"16px",fontFamily:null!==(n=null===(t=null==w?void 0:w.getTarget("fc"))||void 0===t?void 0:t.fontFamily)&&void 0!==n?n:"sans-serif"}},{children:[(0,i.tZ)("div",{onClick:function(){return te()},css:{position:"fixed",top:0,left:0,width:"100%",height:"100%"}}),(0,i.BX)("div",b({className:"feathery-modal",css:{position:"relative",backgroundColor:"#fff",borderRadius:"14px",width:"100%",maxWidth:"600px"}},{children:[(0,i.BX)("div",b({css:{position:"relative",display:"flex",padding:"20px",borderBottom:"1px solid #e9e9e9"}},{children:[(0,i.tZ)("h3",b({css:{padding:0,margin:0,flex:"1"}},{children:R?D.initials_title:D.title})),(0,i.tZ)(p.Tw,{onClick:function(){return te()},css:{"&:hover":{cursor:"pointer"}}})]})),(0,i.BX)("div",b({css:{position:"relative",padding:"20px 20px 30px 20px","& h3":{fontSize:"1em",margin:0,padding:0}}},{children:[!j&&!T&&(0,i.BX)(i.HY,{children:[(0,i.BX)("div",b({css:{display:"flex",gap:"15px",flexDirection:"column",paddingBottom:"30px"}},{children:[(0,i.tZ)("h3",{children:R?D.initials_type_option:D.type_option}),(0,i.tZ)("input",{defaultValue:J(),onChange:function(e){var t=e.target.value.trim();L(t)},placeholder:R?D.initials_type_placeholder:D.type_placeholder,css:{padding:"8px 10px",borderRadius:"4px",border:"1px solid #e9e9e9","&:focus,&:focus-visible":{border:"1px solid #5e5e5e",outline:"none"}}}),(0,i.BX)("div",b({css:{position:"relative",width:"100%",height:"100px",backgroundColor:"#f6f6f6",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"2em",fontFamily:"La Belle Aurore"}},{children:[K&&(0,i.tZ)("div",b({css:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundColor:"#f6f6f6",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"sans-serif",fontSize:".9rem",borderRadius:"4px"}},{children:R?D.initials_type_loading:D.type_loading})),M?(0,i.tZ)("img",{src:M,alt:"Signature",css:{maxHeight:"100%",maxWidth:"100%"}}):R?D.initials_type_example:D.type_example]}))]})),!X&&(0,i.BX)(i.HY,{children:[(0,i.tZ)("div",b({css:{height:"1px",display:"flex",alignItems:"center",justifyContent:"center",borderBottom:"1px solid #e9e9e9"}},{children:(0,i.tZ)("div",b({css:{backgroundColor:"#fff",padding:"10px",color:"#5e5e5e"}},{children:D.or_label}))})),(0,i.tZ)("div",b({css:{paddingTop:"30px"}},{children:(0,i.BX)("div",b({onClick:function(){return z(!0)},css:{padding:"20px",borderRadius:"4px",border:"1px solid #e9e9e9","& h3":{padding:0,margin:0,marginBottom:"10px"},"& p":{margin:0,padding:0},"&:hover":{border:"1px solid #5e5e5e",cursor:"pointer"}}},{children:[(0,i.tZ)("h3",{children:R?D.initials_draw_option:D.draw_option}),(0,i.tZ)("p",{children:R?D.initials_draw_subtitle:D.draw_subtitle})]}))}))]})]}),j&&(0,i.BX)("div",b({css:{display:"flex",flexDirection:"column",gap:"15px"}},{children:[(0,i.tZ)("p",b({css:{margin:0,padding:0}},{children:R?D.initials_draw_instructions:D.draw_instructions})),(0,i.tZ)("div",b({css:{position:"relative",width:"100%",height:"200px"}},{children:(0,i.tZ)(h,{ref:$,fieldKey:f,repeatIndex:v,responsiveStyles:w,onClear:C,onEnd:function(){try{var e=(i=$.current.getCanvas(),s=(r=(0,a.me)().createElement("canvas")).getContext("2d"),r.width=i.width,r.height=i.height,s&&s.drawImage(i,0,0),r);if(!e)throw new Error("Could not find signature canvas");var t=l(e).toDataURL("image/png",1),n=(0,o.KG)(t,"".concat(f,".png"));U(t),W(n)}catch(e){console.error("Error generating signature:",e)}var i,r,s},showClear:!1,translation:D})}))]}))]})),(0,i.BX)("div",b({css:{position:"relative",display:"flex",padding:"20px 20px",borderTop:"1px solid #e9e9e9",justifyContent:"space-between","& button":{padding:"12px 0px",width:"120px",borderRadius:"4px",outline:"none",border:"none",fontSize:"1rem",transition:"background-color ease-in-out 0.1s","&:hover":{cursor:"pointer"}}}},{children:[T||!j?(0,i.tZ)("button",b({onClick:function(){return te()},css:{"&:hover":{backgroundColor:"#e1e1e1"}}},{children:D.cancel})):(0,i.tZ)("button",b({onClick:function(e){e.preventDefault(),z(!1),W(void 0)},css:{"&:hover":{backgroundColor:"#e1e1e1"}}},{children:D.back})),(0,i.BX)("div",{children:[x&&(0,i.tZ)("button",b({onClick:function(e){e.preventDefault(),C()},css:{marginRight:"10px","&:hover":{backgroundColor:"#e1e1e1"}}},{children:D.clear})),E&&(0,i.tZ)("button",b({onClick:function(){K||V&&E&&(E(V),sessionStorage.setItem(q,P),u(!1),Q())},disabled:K||!V,css:{marginRight:"10px",backgroundColor:"#535353",color:"#fff","&:hover":{backgroundColor:"#3a3a3a"},"&:disabled":{"&:hover":{cursor:"not-allowed"}}}},{children:R?D.initials_confirm_all:D.confirm_all})),(0,i.tZ)("button",b({onClick:function(){K||V&&(S(V),sessionStorage.setItem(q,P),u(!1),Q())},disabled:K||!V,css:{backgroundColor:"#535353",color:"#fff","&:hover":{backgroundColor:"#3a3a3a"},"&:disabled":{"&:hover":{cursor:"not-allowed"}}}},{children:R?D.initials_confirm:D.confirm}))]})]}))]}))]})):null};var w={label:"Sign here",title:"Add your signature",type_option:"Type your signature",type_placeholder:"Your full name",type_example:"Full Name",type_loading:"Generating signature",or_label:"or",draw_option:"Draw your signature",draw_subtitle:"Draw your signature here using your mouse or trackpad",draw_instructions:"Draw your signature in the box below",confirm:"Sign",confirm_all:"Sign All",cancel:"Cancel",back:"Back",clear:"Clear",initials_label:"Initial here",initials_title:"Add your initials",initials_type_option:"Type your initials",initials_type_placeholder:"Your initials",initials_type_example:"A.B.",initials_type_loading:"Generating initials",initials_draw_option:"Draw your initials",initials_draw_subtitle:"Draw your initials here using your mouse or trackpad",initials_draw_instructions:"Draw your initials in the box below",initials_confirm:"Initial",initials_confirm_all:"Initial All"},_=n(4416),C=function(){return C=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},C.apply(this,arguments)};const k=function(e){var t,o,a,l,s,d=e.element,c=e.responsiveStyles,u=e.defaultValue,f=void 0===u?null:u,p=e.editMode,v=e.repeatIndex,y=e.elementProps,b=void 0===y?{}:y,m=e.disabled,k=void 0!==m&&m,S=e.onEnd,Z=void 0===S?function(){}:S,I=e.onClear,B=void 0===I?function(){}:I,R=e.onSignAll,E=e.ReactPortal,D=void 0===E?null:E,X=e.children,T=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}((0,r.useState)(!1),2),O=T[0],j=T[1],z=null!=D?D:function(e){var t=e.children;return(0,i.tZ)(i.HY,{children:t})},A=null!==(t=d.servar)&&void 0!==t?t:{},P=null!==(o=A.key)&&void 0!==o?o:d.key,L="initials"===(null===(a=A.metadata)||void 0===a?void 0:a.sign_type),H=C(C({},w),d.properties.translate);return(0,r.useEffect)((function(){n.g.webfontloaderPromise||(n.g.webfontloaderPromise=n.e(461).then(n.t.bind(n,5933,23))),n.g.webfontloaderPromise.then((function(e){e.load({google:{families:["La Belle Aurore"]}})}))}),[]),(0,i.BX)(i.HY,{children:[(0,i.tZ)(z,{children:(0,i.tZ)(x,{show:O,setShow:j,defaultValue:f,fieldKey:P,repeatIndex:v,responsiveStyles:c,onClear:B,onEnd:Z,signMethods:null!==(s=null===(l=A.metadata)||void 0===l?void 0:l.sign_methods)&&void 0!==s?s:"",isInitials:L,onSignAll:R,translation:H})}),(0,i.BX)("div",C({css:C(C({maxWidth:"100%",width:"100%",height:"100%"},c.getTarget("fc")),{position:"relative",pointerEvents:p||k?"none":"auto"})},b,{children:[X,(0,i.BX)("div",C({css:C({position:"relative"},c.getTarget("sub-fc"))},{children:[(0,i.BX)(r.Suspense,C({fallback:(0,i.tZ)("div",{css:C(C({},c.getTarget("field",!0)),{width:"100%",height:"100%",boxSizing:"border-box",paddingLeft:"5px"})})},{children:[(0,i.tZ)("div",C({onClick:function(){k||j(!0)},css:C(C({position:"absolute",display:"flex",top:0,left:0,width:"100%",height:"100%",zIndex:g.rM,alignItems:"center",justifyContent:"center"},k?{backgroundColor:"rgb(229, 229, 229)"}:{}),{"&:hover":{cursor:"pointer"}})},{children:!f&&!k&&(A.name||(L?H.initials_label:H.label))})),(0,i.tZ)(h,{fieldKey:P,repeatIndex:v,responsiveStyles:c,defaultValue:f,disabled:k,showClear:!1,translation:H})]})),(0,i.tZ)(_.Z,{id:A.key,"aria-label":d.properties.aria_label})]}))]}))]})}}}]);
1
+ "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[371],{8610:(e,t,n)=>{n.r(t),n.d(t,{default:()=>k});var i=n(5944),r=n(7294),o=n(2943),a=n(9479);function l(e){var t=e.getContext("2d");if(!t)throw new Error("Could not get 2d context from canvas");var n=e.width,i=e.height,r=t.getImageData(0,0,n,i).data,o=d(!0,n,i,r),a=d(!1,n,i,r),l=c(!0,n,i,r),s=c(!1,n,i,r);if(null===o||null===a||null===l||null===s)return e;var u=s-l+1,f=a-o+1,h=t.getImageData(l,o,u,f);return e.width=u,e.height=f,t.clearRect(0,0,u,f),t.putImageData(h,0,0),e}function s(e,t,n,i){return function(e,t,n,i){return{red:i[4*(n*t+e)],green:i[4*(n*t+e)+1],blue:i[4*(n*t+e)+2],alpha:i[4*(n*t+e)+3]}}(e,t,n,i).alpha}function d(e,t,n,i){for(var r=e?1:-1,o=e?0:n-1;e?o<n:o>-1;o+=r)for(var a=0;a<t;a++)if(s(a,o,t,i))return o;return null}function c(e,t,n,i){for(var r=e?1:-1,o=e?0:t-1;e?o<t:o>-1;o+=r)for(var a=0;a<n;a++)if(s(o,a,t,i))return o;return null}var u=n(3598),f=function(){return f=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},f.apply(this,arguments)};const h=(0,r.forwardRef)((function(e,t){var n=e.fieldKey,l=e.repeatIndex,s=e.responsiveStyles,d=e.defaultValue,c=void 0===d?null:d,h=e.disabled,p=void 0!==h&&h,g=e.showClear,v=void 0===g||g,y=e.onClear,b=void 0===y?function(){}:y,m=e.onEnd,x=void 0===m?function(){}:m,w=e.translation,_=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}((0,r.useState)(null!==c),2),C=_[0],k=_[1],S=(0,r.useRef)(void 0),Z=s.getTarget("field",!0);return(0,r.useImperativeHandle)(t,(function(){return{clear:function(){var e;null===(e=S.current)||void 0===e||e.clear()},isEmpty:function(){var e;return null===(e=S.current)||void 0===e?void 0:e.isEmpty()},getTrimmedCanvas:function(){var e;return null===(e=S.current)||void 0===e?void 0:e.getTrimmedCanvas()},getCanvas:function(){var e;return null===(e=S.current)||void 0===e?void 0:e.getCanvas()},fromDataURL:function(e,t){var n;return null===(n=S.current)||void 0===n?void 0:n.fromDataURL(e,t)}}})),(0,r.useEffect)((function(){!function(){var e,t,n,i,r;t=this,n=void 0,r=function(){var t,n,i,r,l;return function(e,t){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}(this,(function(s){switch(s.label){case 0:return(t=null===(e=S.current)||void 0===e?void 0:e.getCanvas())&&null===c?(t.getContext("2d").clearRect(0,0,t.width,t.height),[2]):[4,c];case 1:return(n=s.sent())?[4,(0,o.s3)(n)]:[3,3];case 2:return r=s.sent(),[3,4];case 3:r="",s.label=4;case 4:return i=r,(l=new Image).onload=function(){if(t){var e,n,r,o=t.offsetWidth/l.width,s=t.offsetHeight/l.height,d=Math.min(o,s,1.5),c=l.width*d,u=l.height*d,f=t.offsetHeight-u;t.getContext("2d").clearRect(0,0,t.width,t.height),e=t,n=i,void 0===(r={width:c,height:u,xOffset:0,yOffset:f})&&(r={}),new Promise((function(t,i){var o=e.getContext("2d"),l=new Image,s=r.ratio||(0,a.KL)(),d=r.width||e.width/s,c=r.height||e.height/s,u=r.xOffset||0,f=r.yOffset||0;l.onload=function(){null==o||o.drawImage(l,u,f,d,c),t()},l.onerror=function(e){i(e)},l.crossOrigin="anonymous",l.src=n}))}},l.src=i,[2]}}))},new((i=void 0)||(i=Promise))((function(e,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function l(e){try{s(r.throw(e))}catch(e){o(e)}}function s(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(a,l)}s((r=r.apply(t,n||[])).next())}))}()}),[c]),(0,i.BX)(i.HY,{children:[v&&C&&(0,i.tZ)("div",f({css:f(f({background:"#ffffff",position:"absolute",bottom:"5px",right:"5px",borderRadius:"6px",display:"flex",cursor:"pointer",color:"rgb(173, 173, 173)",fontSize:"14px",transition:"0.15s ease-in-out all"},p?s.getTarget("disabled"):{}),{"&:hover":{color:"black"}}),onClick:function(){S.current.clear(),b(),k(!1)}},{children:w.clear})),(0,i.tZ)(u.Z,{penColor:"black",dotSize:4,minWidth:1.5,maxWidth:3,clearOnResize:!1,canvasProps:{id:"canvas_".concat(n).concat(null!=l?l:""),style:f(f({},Z),{width:"100%",height:"100%",boxSizing:"border-box",paddingLeft:"5px"})},ref:S,onEnd:function(){x(),k(!S.current.isEmpty())}})]})}));var p=n(5467),g=n(2988),v=n(1296),y=n.n(v),b=function(){return b=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},b.apply(this,arguments)},m=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a};const x=function(e){var t,n,s=e.show,d=void 0!==s&&s,c=e.setShow,u=void 0===c?function(){}:c,f=e.fieldKey,v=e.repeatIndex,x=e.defaultValue,w=e.responsiveStyles,_=e.onClear,C=void 0===_?function(){}:_,k=e.onEnd,S=void 0===k?function(){}:k,Z=e.signMethods,I=void 0===Z?"":Z,B=e.isInitials,R=void 0!==B&&B,E=e.onSignAll,D=e.translation,X="type"===I,T="draw"===I,O=m((0,r.useState)(T),2),j=O[0],z=O[1],A=m((0,r.useState)(""),2),P=A[0],L=A[1],H=m((0,r.useState)(!1),2),K=H[0],F=H[1],Y=m((0,r.useState)(),2),V=Y[0],W=Y[1],G=m((0,r.useState)(""),2),M=G[0],U=G[1],N=(0,r.useRef)(P),$=(0,r.useRef)(null),q=R?"feathery-signer-initials":"feathery-signer-name",J=function(){return sessionStorage.getItem(q)||""};(0,r.useEffect)((function(){if(d){var e=J();L(e)}}),[d]),(0,r.useEffect)((function(){N.current=P,""!==P?(F(!0),ee()):(U(""),W(void 0),F(!1))}),[P]);var Q=function(){W(void 0),U(""),L(""),T||z(!1)},ee=(0,r.useCallback)(y()((function(){var e=N.current;if(!e)return U(""),W(void 0),void F(!1);try{var t=function(e,t,n){void 0===t&&(t="La Belle Aurore"),void 0===n&&(n="1.5em");var i=(0,a.me)().createElement("canvas"),r=i.getContext("2d");if(r){i.width=2240,i.height=400,r.clearRect(0,0,i.width,i.height),r.scale(4,4),r.font="".concat(n," ").concat(t),r.fillStyle="#000",r.textBaseline="middle";var o=r.measureText(e).width,l=1.5*parseInt(n);return r.scale(1/4,1/4),i.width=4*o+160,i.height=4*l+160,r.clearRect(0,0,i.width,i.height),r.scale(4,4),r.font="".concat(n," ").concat(t),r.fillStyle="#000",r.textBaseline="middle",r.fillText(e,20,i.height/2/4),i}}(e);if(!t)throw new Error("Could not find signature canvas");var n=l(t).toDataURL("image/png",1),i=(0,o.KG)(n,"".concat(f,".png"));U(n),W(i),F(!1)}catch(e){console.error("Error generating signature:",e),F(!1)}}),1e3),[]),te=function(){u(!1),Q()};return d?(0,i.BX)("div",b({css:{position:"fixed",display:"flex",top:0,left:0,width:"100vw",height:"100vh",background:"rgba(0, 0, 0, 0.2)",zIndex:g.y$,alignItems:"center",justifyContent:"center",fontSize:"16px",fontFamily:null!==(n=null===(t=null==w?void 0:w.getTarget("fc"))||void 0===t?void 0:t.fontFamily)&&void 0!==n?n:"sans-serif"}},{children:[(0,i.tZ)("div",{onClick:function(){return te()},css:{position:"fixed",top:0,left:0,width:"100%",height:"100%"}}),(0,i.BX)("div",b({className:"feathery-modal",css:{position:"relative",backgroundColor:"#fff",borderRadius:"14px",width:"100%",maxWidth:"600px"}},{children:[(0,i.BX)("div",b({css:{position:"relative",display:"flex",padding:"20px",borderBottom:"1px solid #e9e9e9"}},{children:[(0,i.tZ)("h3",b({css:{padding:0,margin:0,flex:"1"}},{children:R?D.initials_title:D.title})),(0,i.tZ)(p.Tw,{onClick:function(){return te()},css:{"&:hover":{cursor:"pointer"}}})]})),(0,i.BX)("div",b({css:{position:"relative",padding:"20px 20px 30px 20px","& h3":{fontSize:"1em",margin:0,padding:0}}},{children:[!j&&!T&&(0,i.BX)(i.HY,{children:[(0,i.BX)("div",b({css:{display:"flex",gap:"15px",flexDirection:"column",paddingBottom:"30px"}},{children:[(0,i.tZ)("h3",{children:R?D.initials_type_option:D.type_option}),(0,i.tZ)("input",{defaultValue:J(),onChange:function(e){var t=e.target.value.trim();L(t)},placeholder:R?D.initials_type_placeholder:D.type_placeholder,css:{padding:"8px 10px",borderRadius:"4px",border:"1px solid #e9e9e9","&:focus,&:focus-visible":{border:"1px solid #5e5e5e",outline:"none"}}}),(0,i.BX)("div",b({css:{position:"relative",width:"100%",height:"100px",backgroundColor:"#f6f6f6",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"2em",fontFamily:"La Belle Aurore"}},{children:[K&&(0,i.tZ)("div",b({css:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundColor:"#f6f6f6",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"sans-serif",fontSize:".9rem",borderRadius:"4px"}},{children:R?D.initials_type_loading:D.type_loading})),M?(0,i.tZ)("img",{src:M,alt:"Signature",css:{maxHeight:"100%",maxWidth:"100%"}}):R?D.initials_type_example:D.type_example]}))]})),!X&&(0,i.BX)(i.HY,{children:[(0,i.tZ)("div",b({css:{height:"1px",display:"flex",alignItems:"center",justifyContent:"center",borderBottom:"1px solid #e9e9e9"}},{children:(0,i.tZ)("div",b({css:{backgroundColor:"#fff",padding:"10px",color:"#5e5e5e"}},{children:D.or_label}))})),(0,i.tZ)("div",b({css:{paddingTop:"30px"}},{children:(0,i.BX)("div",b({onClick:function(){return z(!0)},css:{padding:"20px",borderRadius:"4px",border:"1px solid #e9e9e9","& h3":{padding:0,margin:0,marginBottom:"10px"},"& p":{margin:0,padding:0},"&:hover":{border:"1px solid #5e5e5e",cursor:"pointer"}}},{children:[(0,i.tZ)("h3",{children:R?D.initials_draw_option:D.draw_option}),(0,i.tZ)("p",{children:R?D.initials_draw_subtitle:D.draw_subtitle})]}))}))]})]}),j&&(0,i.BX)("div",b({css:{display:"flex",flexDirection:"column",gap:"15px"}},{children:[(0,i.tZ)("p",b({css:{margin:0,padding:0}},{children:R?D.initials_draw_instructions:D.draw_instructions})),(0,i.tZ)("div",b({css:{position:"relative",width:"100%",height:"200px"}},{children:(0,i.tZ)(h,{ref:$,fieldKey:f,repeatIndex:v,responsiveStyles:w,onClear:C,onEnd:function(){try{var e=(i=$.current.getCanvas(),s=(r=(0,a.me)().createElement("canvas")).getContext("2d"),r.width=i.width,r.height=i.height,s&&s.drawImage(i,0,0),r);if(!e)throw new Error("Could not find signature canvas");var t=l(e).toDataURL("image/png",1),n=(0,o.KG)(t,"".concat(f,".png"));U(t),W(n)}catch(e){console.error("Error generating signature:",e)}var i,r,s},showClear:!1,translation:D})}))]}))]})),(0,i.BX)("div",b({css:{position:"relative",display:"flex",padding:"20px 20px",borderTop:"1px solid #e9e9e9",justifyContent:"space-between","& button":{padding:"12px 0px",width:"120px",borderRadius:"4px",outline:"none",border:"none",fontSize:"1rem",transition:"background-color ease-in-out 0.1s","&:hover":{cursor:"pointer"}}}},{children:[T||!j?(0,i.tZ)("button",b({onClick:function(){return te()},css:{"&:hover":{backgroundColor:"#e1e1e1"}}},{children:D.cancel})):(0,i.tZ)("button",b({onClick:function(e){e.preventDefault(),z(!1),W(void 0)},css:{"&:hover":{backgroundColor:"#e1e1e1"}}},{children:D.back})),(0,i.BX)("div",{children:[x&&(0,i.tZ)("button",b({onClick:function(e){e.preventDefault(),C()},css:{marginRight:"10px","&:hover":{backgroundColor:"#e1e1e1"}}},{children:D.clear})),E&&(0,i.tZ)("button",b({onClick:function(){K||V&&E&&(E(V),sessionStorage.setItem(q,P),u(!1),Q())},disabled:K||!V,css:{marginRight:"10px",backgroundColor:"#535353",color:"#fff","&:hover":{backgroundColor:"#3a3a3a"},"&:disabled":{"&:hover":{cursor:"not-allowed"}}}},{children:R?D.initials_confirm_all:D.confirm_all})),(0,i.tZ)("button",b({onClick:function(){K||V&&(S(V),sessionStorage.setItem(q,P),u(!1),Q())},disabled:K||!V,css:{backgroundColor:"#535353",color:"#fff","&:hover":{backgroundColor:"#3a3a3a"},"&:disabled":{"&:hover":{cursor:"not-allowed"}}}},{children:R?D.initials_confirm:D.confirm}))]})]}))]}))]})):null};var w={label:"Sign here",title:"Add your signature",type_option:"Type your signature",type_placeholder:"Your full name",type_example:"Full Name",type_loading:"Generating signature",or_label:"or",draw_option:"Draw your signature",draw_subtitle:"Draw your signature here using your mouse or trackpad",draw_instructions:"Draw your signature in the box below",confirm:"Sign",confirm_all:"Sign All",cancel:"Cancel",back:"Back",clear:"Clear",initials_label:"Initial here",initials_title:"Add your initials",initials_type_option:"Type your initials",initials_type_placeholder:"Your initials",initials_type_example:"A.B.",initials_type_loading:"Generating initials",initials_draw_option:"Draw your initials",initials_draw_subtitle:"Draw your initials here using your mouse or trackpad",initials_draw_instructions:"Draw your initials in the box below",initials_confirm:"Initial",initials_confirm_all:"Initial All"},_=n(4416),C=function(){return C=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},C.apply(this,arguments)};const k=function(e){var t,o,a,l,s,d=e.element,c=e.responsiveStyles,u=e.defaultValue,f=void 0===u?null:u,p=e.editMode,v=e.repeatIndex,y=e.elementProps,b=void 0===y?{}:y,m=e.disabled,k=void 0!==m&&m,S=e.onEnd,Z=void 0===S?function(){}:S,I=e.onClear,B=void 0===I?function(){}:I,R=e.onSignAll,E=e.ReactPortal,D=void 0===E?null:E,X=e.children,T=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}((0,r.useState)(!1),2),O=T[0],j=T[1],z=null!=D?D:function(e){var t=e.children;return(0,i.tZ)(i.HY,{children:t})},A=null!==(t=d.servar)&&void 0!==t?t:{},P=null!==(o=A.key)&&void 0!==o?o:d.key,L="initials"===(null===(a=A.metadata)||void 0===a?void 0:a.sign_type),H=C(C({},w),d.properties.translate);return(0,r.useEffect)((function(){n.g.webfontloaderPromise||(n.g.webfontloaderPromise=n.e(461).then(n.t.bind(n,5933,23))),n.g.webfontloaderPromise.then((function(e){e.load({google:{families:["La Belle Aurore"]}})}))}),[]),(0,i.BX)(i.HY,{children:[(0,i.tZ)(z,{children:(0,i.tZ)(x,{show:O,setShow:j,defaultValue:f,fieldKey:P,repeatIndex:v,responsiveStyles:c,onClear:B,onEnd:Z,signMethods:null!==(s=null===(l=A.metadata)||void 0===l?void 0:l.sign_methods)&&void 0!==s?s:"",isInitials:L,onSignAll:R,translation:H})}),(0,i.BX)("div",C({css:C(C({maxWidth:"100%",width:"100%",height:"100%"},c.getTarget("fc")),{position:"relative",pointerEvents:p||k?"none":"auto"})},b,{children:[X,(0,i.BX)("div",C({css:C({position:"relative"},c.getTarget("sub-fc"))},{children:[(0,i.BX)(r.Suspense,C({fallback:(0,i.tZ)("div",{css:C(C({},c.getTarget("field",!0)),{width:"100%",height:"100%",boxSizing:"border-box",paddingLeft:"5px"})})},{children:[(0,i.tZ)("div",C({onClick:function(){k||j(!0)},css:C(C({position:"absolute",display:"flex",top:0,left:0,width:"100%",height:"100%",zIndex:g.rM,alignItems:"center",justifyContent:"center"},k?{backgroundColor:"rgb(229, 229, 229)"}:{}),{"&:hover":{cursor:"pointer"}})},{children:!f&&!k&&(A.name||(L?H.initials_label:H.label))})),(0,i.tZ)(h,{fieldKey:P,repeatIndex:v,responsiveStyles:c,defaultValue:f,disabled:k,showClear:!1,translation:H})]})),(0,i.tZ)(_.Z,{id:A.key,"aria-label":d.properties.aria_label})]}))]}))]})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[844],{6056:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ze});var n=r(5944),o=r(7294),a=r(426),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="#9ca3af",p="#4b5563",f="#111827",h="#1d4ed8",g={width:"16px",height:"16px",color:"#6b7280"},v={display:"flex",flexDirection:"column",gap:"2px","& svg":{marginInlineStart:"4px",width:"20px",height:"20px"}},y={width:"12px",height:"12px",color:d,opacity:.3,'&[data-active="true"]':{color:h,opacity:1}},b={display:"flex",alignItems:"center",gap:"8px"},m={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"},x={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"64px 24px",textAlign:"center"},w={color:p,fontSize:"16px",fontWeight:"500",margin:0},C={padding:"16px",borderBottom:"1px solid ".concat(u)},k={position:"relative"},S={position:"absolute",top:0,bottom:0,left:0,display:"flex",alignItems:"center",paddingLeft:"12px",pointerEvents:"none"},Z={display:"block",width:"100%",maxWidth:"384px",paddingLeft:"36px",paddingRight:"12px",paddingTop:"10px",paddingBottom:"10px",backgroundColor:c,border:"1px solid ".concat(u),color:f,fontSize:"14px",borderRadius:"8px",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",boxSizing:"border-box"},P={width:"100%",maxWidth:"100%",fontSize:"14px",textAlign:"left",color:p,textIndent:0,borderColor:"inherit",borderCollapse:"collapse"},_={fontSize:"14px",color:p,backgroundColor:c,borderBottom:"1px solid ".concat(u)},R={padding:"12px 24px",fontWeight:"500",userSelect:"none"},I={backgroundColor:l,borderBottom:"1px solid ".concat(u),transition:"background-color 0.2s"},A={padding:"16px 24px",wordBreak:"break-word",overflowWrap:"anywhere"},B={display:"flex",alignItems:"center",flexWrap:"wrap",justifyContent:"space-between",padding:"16px",gap:"8px"},L={fontSize:"14px",fontWeight:"normal",color:p},M={fontWeight:"600",color:f},T={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:f},"&:disabled:hover":{color:p,backgroundColor:c,cursor:"auto"}},D=i(i({},j),{borderRadius:"4px",paddingInline:"8px",paddingBlock:"4px",width:"auto",height:"auto",minHeight:"28px",position:"relative"}),O={width:"16px",height:"16px",color:p},W={position:"fixed",backgroundColor:l,border:"1px solid ".concat("#d1d5db"),borderRadius:"4px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)",zIndex:9999,minWidth:"120px"},X={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"}},E=i(i({},D),{aspectRatio:1,paddingLeft:0,paddingRight:0}),N={display:"flex",gap:"8px",justifyContent:"flex-end"},z=i(i({},j),{width:"36px",borderRightWidth:0}),F=i(i({},z),{borderTopLeftRadius:"8px",borderBottomLeftRadius:"8px",paddingLeft:"12px",paddingRight:"12px",width:"auto"}),V=i(i({},z),{borderTopRightRadius:"8px",borderBottomRightRadius:"8px",paddingLeft:"12px",paddingRight:"12px",width:"auto",borderRightWidth:1}),Q=i(i({},z),{color:h,backgroundColor:"#eff6ff",border:"1px solid ".concat(u)}),H={opacity:.8,cursor:"default",color:d,"&:hover":{backgroundColor:c,color:d}},Y=i(i({},z),{appearance:"none",WebkitAppearance:"none",cursor:"pointer",paddingLeft:"8px",paddingRight:"8px",width:"36px",textAlign:"center",outline:"none","&:hover":{backgroundColor:s,color:f},"&:focus":{outline:"none"}}),$=function(){return $=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},$.apply(this,arguments)};function q(){return(0,n.tZ)("svg",$({css:g,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 G(e){var t=e.searchQuery,r=e.onSearchChange;return(0,n.tZ)("div",$({css:C},{children:(0,n.BX)("div",$({css:k},{children:[(0,n.tZ)("div",$({css:S},{children:(0,n.tZ)(q,{})})),(0,n.tZ)("input",{type:"text",css:Z,placeholder:"Search",value:t,onChange:function(e){return r(e.target.value)},onKeyDown:function(e){"Enter"===e.key&&e.preventDefault()}})]}))}))}var K=function(){return K=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},K.apply(this,arguments)};function J(e){var t=e.isSorted,r=e.sortDirection;return(0,n.BX)("svg",K({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},{children:[(0,n.tZ)("path",{css:y,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:y,stroke:"currentColor","data-active":t&&"desc"===r||void 0,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m8 15 4 4 4-4"})]}))}function U(e){var t=e.columns,r=e.enableSort,o=e.sortColumn,a=e.sortDirection,i=e.onSort,l=e.styles;return(0,n.tZ)(n.HY,{children:t.map((function(e,t){var c=r,s=o===e.name,u=0===t;return(0,n.tZ)("th",K({scope:"col",onClick:function(){return c&&i(e.name)},css:K(K(K(K({},R),u?{}:{paddingLeft:0}),l.getTarget("th")),c?{cursor:"pointer"}:{})},{children:(0,n.BX)("div",K({css:b},{children:[(0,n.tZ)("span",{children:e.name}),c&&(0,n.tZ)("span",K({css:v},{children:(0,n.tZ)(J,{isSorted:s,sortDirection:a})}))]}))}),t)}))})}var ee=function(){return ee=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},ee.apply(this,arguments)};function te(e){var t=e.currentPage,r=e.totalItems,o=e.rowsPerPage;return(0,n.BX)("span",ee({css:L},{children:["Showing"," ",(0,n.BX)("span",ee({css:M},{children:[t*o+1,"-",Math.min((t+1)*o,r)]}))," ","of ",(0,n.tZ)("span",ee({css:M},{children:r}))]}))}function re(e){var t=e.disabled,r=e.onClick;return(0,n.tZ)("button",ee({type:"button",onClick:r,disabled:t,css:ee(ee({},F),t?H:{})},{children:"Previous"}))}function ne(e){var t=e.disabled,r=e.onClick;return(0,n.tZ)("button",ee({type:"button",onClick:r,disabled:t,css:ee(ee({},V),t?H:{})},{children:"Next"}))}function oe(e){var t=e.pages,r=e.onPageChange;return(0,n.BX)("select",ee({value:"",onChange:function(e){r(Number(e.target.value))},"aria-label":"Go to page",css:Y},{children:[(0,n.tZ)("option",ee({value:"",disabled:!0,hidden:!0},{children:"..."})),t.map((function(e){return(0,n.tZ)("option",ee({value:e},{children:e+1}),e)}))]}))}function ae(e){var t=e.currentPage,r=e.totalPages,o=e.onPageChange,a=new Set;a.add(0),a.add(r-1);for(var i=Math.max(0,t-1);i<=Math.min(r-1,t+1);i++)a.add(i);var l=[],c=Array.from(a).sort((function(e,t){return e-t}));for(i=0;i<c.length;i++){var s=c[i],u=i>0?c[i-1]:-1;if(s-u>1){for(var d=[],p=u+1;p<s;p++)d.push(p);l.push({type:"overflow",pages:d})}l.push({type:"page",page:s})}return(0,n.tZ)(n.HY,{children:l.map((function(e,r){if("overflow"===e.type)return 1===e.pages.length?(0,n.tZ)("li",{children:(0,n.tZ)("button",ee({type:"button",onClick:function(){return o(e.pages[0])},css:z},{children:e.pages[0]+1}))},"overflow-".concat(r)):(0,n.tZ)("li",{children:(0,n.tZ)(oe,{pages:e.pages,onPageChange:o})},"overflow-".concat(r));var a=e.page===t;return(0,n.tZ)("li",{children:(0,n.tZ)("button",ee({type:"button",onClick:function(){return o(e.page)},"aria-current":a?"page":void 0,css:a?Q:z},{children:e.page+1}))},e.page)}))})}function ie(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",ee({css:B,"aria-label":"Table navigation"},{children:[(0,n.tZ)(te,{currentPage:t,totalItems:o,rowsPerPage:a}),(0,n.BX)("ul",ee({css:T},{children:[(0,n.tZ)("li",{children:(0,n.tZ)(re,{disabled:0===t,onClick:function(){return i(Math.max(0,t-1))}})}),(0,n.tZ)(ae,{currentPage:t,totalPages:r,onPageChange:i}),(0,n.tZ)("li",{children:(0,n.tZ)(ne,{disabled:t>=r-1,onClick:function(){i(Math.min(r-1,t+1))}})})]}))]}))}var le=r(3935),ce=r(1142),se=r(9479),ue=function(){return ue=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},ue.apply(this,arguments)},de=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 pe(){return(0,n.BX)("svg",ue({css:O,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 fe(e){var t,r,a,i=e.actions,l=e.rowIndex,c=e.columnData,s=e.fieldValues,u=e.onClick,d=e.forceInlineButtons,p=void 0!==d&&d,f=e.tableId,h=void 0===f?"":f,g=e.buttonLoaders,v=void 0===g?{}:g;if(0===i.length)return null;var y=de((0,o.useState)(!1),2),b=y[0],m=y[1],x=de((0,o.useState)({top:0,left:0}),2),w=x[0],C=x[1],k=(0,o.useRef)(null),S=(0,o.useRef)(null),Z=(0,o.useRef)(null),P=!p&&i.length>1;(0,o.useEffect)((function(){if(b){var e=function(e){S.current&&!S.current.contains(e.target)&&Z.current&&!Z.current.contains(e.target)&&m(!1)},t=function(){m(!1)},r=(0,se.me)();return r.addEventListener("mousedown",e),r.addEventListener("scroll",t,!0),function(){r.removeEventListener("mousedown",e),r.removeEventListener("scroll",t,!0)}}}),[b]);var _=function(e){m(!1);var t=s||ce.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})},R=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",ue({ref:k,css:N},{children:P?(0,n.BX)(n.HY,{children:[(0,n.tZ)("button",ue({ref:Z,type:"button",disabled:R,onClick:function(e){e.stopPropagation(),function(){if(!b&&Z.current){var e=Z.current.getBoundingClientRect();C({top:e.bottom+4,left:e.right})}m(!b)}()},css:E},{children:R?(0,n.tZ)("div",ue({style:{height:"16px",width:"16px",display:"flex",alignItems:"center",justifyContent:"center"}},{children:R})):(0,n.tZ)(pe,{})})),b&&(0,le.createPortal)((0,n.tZ)("div",ue({ref:S,css:ue(ue({},W),{top:"".concat(w.top,"px"),left:"".concat(w.left,"px"),transform:"translateX(-100%)"})},{children:i.map((function(e,t){var r=Object.keys(v).length>0;return(0,n.tZ)("button",ue({type:"button",onClick:function(t){t.stopPropagation(),_(e)},css:X,disabled:r},{children:e.label}),t)}))})),(0,se.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",ue({type:"button",onClick:function(t){t.stopPropagation(),_(e)},css:D,disabled:i},{children:[(0,n.tZ)("span",ue({style:{visibility:a?"hidden":"visible"}},{children:e.label})),a&&(0,n.tZ)("div",ue({style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",height:"16px",width:"16px"}},{children:a}))]}),t)}))}))}var he=function(){return he=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},he.apply(this,arguments)};function ge(e){var t=e.hasSearchQuery;return(0,n.BX)("div",he({css:x},{children:[t&&(0,n.tZ)("svg",he({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",he({css:w},{children:t?"No results found":"No data available"})),t&&(0,n.tZ)("p",he({css:he(he({},w),{fontSize:"14px",marginTop:"8px"})},{children:"Try adjusting your search query"}))]}))}var ve=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 ye(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,p=void 0,f=void 0;4===u[1].length?(d=(n=ve(u,4))[1],p=n[2],f=n[3]):(p=(o=ve(u,4))[1],f=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(p)-1,parseInt(f));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 be(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 me=function(){return me=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},me.apply(this,arguments)},xe=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.")},we=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},Ce=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 ke(e){return"".concat("__feathery_table_page_").concat(e)}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)};const Ze=function(e){var t=e.element,r=e.responsiveStyles,i=e.onClick,l=void 0===i?function(){}:i,c=e.editMode,s=void 0!==c&&c,u=e.buttonLoaders,d=void 0===u?{}:u,p=(0,o.useMemo)((function(){return function(e){return e.addTargets("table","thead","tbody","th","td","tr"),e}(r)}),[r]),f=function(e){var t,r,n,i,l,c,s,u,d,p,f=e.element,h=e.editMode,g=void 0!==h&&h,v=(null===(t=f.properties)||void 0===t?void 0:t.columns)||[],y=((null===(r=f.properties)||void 0===r?void 0:r.actions)||[]).filter((function(e){return e.label&&""!==e.label.trim()})),b=null!==(i=null===(n=f.properties)||void 0===n?void 0:n.search)&&void 0!==i&&i,m=null!==(c=null===(l=f.properties)||void 0===l?void 0:l.sort)&&void 0!==c&&c,x=null!==(u=null===(s=f.properties)||void 0===s?void 0:s.transpose)&&void 0!==u&&u,w=null!==(p=null===(d=f.properties)||void 0===d?void 0:d.pagination)&&void 0!==p?p:0,C="number"==typeof w&&w>0?Math.floor(w):0,k=C>0,S=(0,o.useMemo)((function(){var e=v;return g&&(e=e.map((function(e,t){return me(me({},e),{field_key:"example_column_".concat(t)})}))),e}),[g,v]),Z=(0,o.useMemo)((function(){return g?function(e,t){void 0===t&&(t=2);var r={};return e.forEach((function(e){r[e.field_key]=Array(t).fill("Sample")})),r}(S):ce.u4}),[g,S,v.length]),P=we((0,o.useState)(""),2),_=P[0],R=P[1],I=we((0,o.useState)(null),2),A=I[0],B=I[1],L=we((0,o.useState)("asc"),2),M=L[0],T=L[1],j=we((0,o.useState)((function(){return function(e){var t=ke(e),r=sessionStorage.getItem(t);if(!r)return 0;var n=parseInt(r,10);return Number.isInteger(n)&&n>=0?n:0}(f.id)})),2),D=j[0],O=j[1],W=(0,o.useMemo)((function(){return S.reduce((function(e,t){var r=Z[t.field_key];return Array.isArray(r)?Math.max(e,r.length):e}),0)}),[S,Z]),X=(0,o.useMemo)((function(){return Array.from({length:W},(function(e,t){return t}))}),[W]),E=(0,o.useMemo)((function(){return x&&b&&_.trim()?X.filter((function(e){return S.some((function(t){var r,n=Z[t.field_key],o=Array.isArray(n)?n[e]:n;return(null!==(r=(0,a.e7)(o))&&void 0!==r?r:"").toLowerCase().includes(_.toLowerCase().trim())}))})):X}),[x,X,S,_,b,Z]),N=we((0,o.useState)(null),2),z=N[0],F=N[1],V=(0,o.useMemo)((function(){if(!x||!m||null===z)return E;var e=S[z];return e?Ce([],we(E),!1).sort((function(t,r){var n=Z[e.field_key],o=Array.isArray(n)?n[t]:n,a=Array.isArray(n)?n[r]:n,i=be(ye(o),ye(a));return"asc"===M?i:-i})):E}),[x,E,z,M,S,Z,m]),Q=(0,o.useMemo)((function(){if(!x||!k)return V;var e=D*C,t=e+C;return V.slice(e,t)}),[x,V,D,C,k]),H=(0,o.useMemo)((function(){if(!x||0===W)return{columns:S,activeFieldValues:Z,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 p=xe(u),f=p.next();!f.done;f=p.next()){var h=f.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{f&&!f.done&&(a=p.return)&&a.call(p)}finally{if(o)throw o.error}}var g={_transpose_field_name:e.map((function(e){return e.name}))};try{for(var v=xe(u),y=v.next();!y.done;y=v.next()){h=y.value;var b=[];try{for(var m=(c=void 0,xe(e)),x=m.next();!x.done;x=m.next()){var w=t[x.value.field_key],C=Array.isArray(w)?w[h]:w;b.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)]=b}}catch(e){i={error:e}}finally{try{y&&!y.done&&(l=v.return)&&l.call(v)}finally{if(i)throw i.error}}return{transposedColumns:d,transposedFieldValues:g,includedRowIndices:u}}(S,Z,W,Q);return{columns:e.transposedColumns,activeFieldValues:e.transposedFieldValues,transposedRowIndices:e.includedRowIndices}}),[x,S,Z,W,Q]),Y=H.columns,$=H.activeFieldValues,q=H.transposedRowIndices,G=(0,o.useMemo)((function(){return Y.reduce((function(e,t){var r=$[t.field_key];return Array.isArray(r)?Math.max(e,r.length):e}),0)}),[Y,$]),K=(0,o.useMemo)((function(){return Array.from({length:G},(function(e,t){return t}))}),[G]),J=(0,o.useMemo)((function(){return x?K:b&&_.trim()?K.filter((function(e){return Y.some((function(t){var r,n=$[t.field_key],o=Array.isArray(n)?n[e]:n;return(null!==(r=(0,a.e7)(o))&&void 0!==r?r:"").toLowerCase().includes(_.toLowerCase().trim())}))})):K}),[x,K,Y,_,b,$]),U=(0,o.useMemo)((function(){if(x)return J;if(!m||!A)return J;var e=Y.find((function(e){return e.name===A}));return e?Ce([],we(J),!1).sort((function(t,r){var n=$[e.field_key],o=Array.isArray(n)?n[t]:n,a=Array.isArray(n)?n[r]:n,i=be(ye(o),ye(a));return"asc"===M?i:-i})):J}),[x,J,A,M,Y,m,$]),ee=(0,o.useMemo)((function(){if(x)return K;if(!k)return U;var e=D*C,t=e+C;return U.slice(e,t)}),[x,K,U,D,C,k]),te=(0,o.useRef)({initialMount:!0,search:"",sortColumn:"",sortDirection:""});(0,o.useEffect)((function(){var e=te.current;if(e.initialMount)return e.initialMount=!1,e.search=_,e.sortColumn=A,void(e.sortDirection=M);_===e.search&&A===e.sortColumn&&M===e.sortDirection||(O(0),e.search=_,e.sortColumn=A,e.sortDirection=M)}),[_,A,M]);var re=x?V.length:U.length,ne=k?Math.ceil(re/C):1;(0,o.useEffect)((function(){var e,t,r;f.id&&(e=f.id,t=D,r=ke(e),sessionStorage.setItem(r,t.toString()))}),[f.id,D]),(0,o.useEffect)((function(){ne>0&&D>=ne&&O(ne-1)}),[ne]);var oe=G>0,ae=x?E.length>0:J.length>0;return{enableSearch:b,searchQuery:_,hasSearchResults:ae,setSearchQuery:R,enableSort:m,sortColumn:A,sortDirection:M,sortedColumnIndex:z,handleSort:function(e){m&&(A===e?"asc"===M?T("desc"):(B(null),T("asc")):(B(e),T("asc")))},handleTransposedSort:function(e){m&&x&&(z===e?"asc"===M?T("desc"):(F(null),T("asc")):(F(e),T("asc")))},enablePagination:k,currentPage:D,paginatedRowIndices:ee,rowsPerPage:C,setCurrentPage:O,columns:Y,actions:y,isTransposed:x&&W>0,transposedRowIndices:q,totalRows:re,totalPages:ne,hasData:oe,activeFieldValues:$,baseColumns:S,baseFieldValues:Z}}({element:t,editMode:s}),h=f.enableSearch,g=f.searchQuery,y=f.setSearchQuery,x=f.enableSort,w=f.sortColumn,C=f.sortDirection,k=f.sortedColumnIndex,S=f.handleSort,Z=f.handleTransposedSort,B=f.enablePagination,L=f.currentPage,M=f.setCurrentPage,T=f.paginatedRowIndices,j=f.rowsPerPage,D=f.columns,O=f.actions,W=f.isTransposed,X=f.transposedRowIndices,E=f.totalRows,N=f.totalPages,z=f.hasData,F=f.hasSearchResults,V=f.activeFieldValues,Q=f.baseColumns,H=f.baseFieldValues,Y=!z||z&&!F;return(0,n.tZ)("div",Se({css:Se(Se({},m),p.getTarget("container"))},{children:(0,n.BX)("div",Se({css:{minWidth:"fit-content"}},{children:[h&&(0,n.tZ)(G,{searchQuery:g,onSearchChange:y}),Y?(0,n.tZ)(ge,{hasSearchQuery:g.trim().length>0}):(0,n.BX)("table",Se({css:Se(Se({},P),p.getTarget("table"))},{children:[!W&&(0,n.tZ)("thead",Se({css:_},{children:(0,n.BX)("tr",{children:[(0,n.tZ)(U,{columns:D,enableSort:x,sortColumn:w,sortDirection:C,onSort:S,styles:p}),O.length>0&&(0,n.tZ)("th",{scope:"col",css:Se(Se(Se({},R),{paddingLeft:0}),p.getTarget("th"))})]})})),(0,n.BX)("tbody",Se({css:p.getTarget("tbody")},{children:[T.map((function(e){var r={};return W||D.forEach((function(t){var n=V[t.field_key],o=Array.isArray(n)?n[e]:n;r[t.name]=o})),(0,n.BX)("tr",Se({css:Se(Se({},I),p.getTarget("tr")),onClick:function(){W||l({rowIndex:e,rowData:r})}},{children:[D.map((function(t,r){var o,i,c=V[t.field_key],s=Array.isArray(c)?c[e]:c,u=W&&0===r,d=u&&x,f=k===e,h=0===r,g=1===r,y=W&&!u?t.originalRowIndex:void 0,m=u?Se(Se(Se(Se({},R),{backgroundColor:"#f9fafb",borderRight:"1px solid #e5e7eb",width:"1px",whiteSpace:"nowrap"}),p.getTarget("th")),d?{cursor:"pointer"}:{}):Se(Se(Se(Se({},A),W?g?{}:{paddingLeft:0}:h?{}:{paddingLeft:0}),W&&!u?{cursor:"pointer"}:{}),p.getTarget("td")),w=u?"th":"td";return(0,n.tZ)(w,Se({css:m,onClick:function(t){if(d)Z(e);else if(W&&void 0!==y){t.stopPropagation();var r={};Q.forEach((function(e){var t=H[e.field_key],n=Array.isArray(t)?t[y]:t;r[e.name]=n})),l({rowIndex:y,rowData:r})}}},u?{scope:"row"}:{},{children:u&&d?(0,n.BX)("div",Se({css:Se(Se({},b),{justifyContent:"space-between"})},{children:[(0,n.tZ)("span",{children:null!==(o=(0,a.e7)(s))&&void 0!==o?o:""}),(0,n.tZ)("span",Se({css:v},{children:(0,n.tZ)(J,{isSorted:f,sortDirection:C})}))]})):null!==(i=(0,a.e7)(s))&&void 0!==i?i:""}),r)})),!W&&O.length>0&&(0,n.tZ)("td",Se({css:Se(Se(Se({},A),{paddingLeft:0}),p.getTarget("td"))},{children:(0,n.tZ)(fe,{actions:O,rowIndex:e,columnData:Q,fieldValues:H,onClick:l,tableId:t.id,buttonLoaders:d})}))]}),e)})),W&&O.length>0&&(0,n.BX)("tr",Se({css:Se(Se({},I),p.getTarget("tr"))},{children:[(0,n.tZ)("th",{scope:"row",css:Se(Se(Se({},R),{backgroundColor:"#f9fafb",borderRight:"1px solid #e5e7eb",width:"1px",whiteSpace:"nowrap"}),p.getTarget("th"))}),X.map((function(e,r){return(0,n.tZ)("td",Se({css:Se(Se(Se({},A),0===r?{}:{paddingLeft:0}),p.getTarget("td"))},{children:(0,n.tZ)("div",Se({css:{display:"flex",justifyContent:"flex-start"}},{children:(0,n.tZ)(fe,{actions:O,rowIndex:e,columnData:Q,fieldValues:H,onClick:l,forceInlineButtons:!0,tableId:t.id,buttonLoaders:d})}))}),e)}))]}))]}))]})),!Y&&B&&(0,n.tZ)(ie,{currentPage:L,totalPages:N,totalItems:E,rowsPerPage:j,onPageChange:M})]}))}))}}}]);
@@ -1 +1 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[798],{1587:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(5944),o=r(7294),i=r(8776),l=r(5096),a=r(2988),c=r(4665),u=r(7449),s=r(9479),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}))}))]})}},7449:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(5944),o=r(7294),i=r(3935),l=r(9479),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}}}},9069:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(5944),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}))}},8776:(e,t,r)=>{r.d(t,{u:()=>l});var n=r(5944),o=r(2988),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}))}))}},9594:(e,t,r)=>{r.r(t),r.d(t,{default:()=>f});var n=r(5944),o=r(7294),i=r(9069),l=r(1587),a=r(1211),c=r(6867),u=r(9479),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
+ "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[798],{1587:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(5944),o=r(7294),i=r(8776),l=r(5467),a=r(2988),c=r(4665),u=r(7449),s=r(9479),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}))}))]})}},7449:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(5944),o=r(7294),i=r(3935),l=r(9479),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}}}},9069:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(5944),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}))}},8776:(e,t,r)=>{r.d(t,{u:()=>l});var n=r(5944),o=r(2988),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}))}))}},9594:(e,t,r)=>{r.r(t),r.d(t,{default:()=>f});var n=r(5944),o=r(7294),i=r(9069),l=r(1587),a=r(1211),c=r(6867),u=r(9479),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})]}))]}))}))}}]);