@v-miniapp/ui-react 1.0.59 → 1.0.60

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 (127) hide show
  1. package/dist/external/styles.css +1 -1
  2. package/dist/styles.css +1 -1
  3. package/dist-storybook/assets/{App-Dp1UG-xp.js → App-CJxOxRXd.js} +1 -1
  4. package/dist-storybook/assets/{Color-AVL7NMMY-XA8cFKdV.js → Color-AVL7NMMY-DwohVA43.js} +1 -1
  5. package/dist-storybook/assets/{DEEPLINK-cjgFMuRJ.js → DEEPLINK-B5vUshJ4.js} +1 -1
  6. package/dist-storybook/assets/{DocsRenderer-PQXLIZUC-D10-0Yfb.js → DocsRenderer-PQXLIZUC-vNsl3A7z.js} +2 -2
  7. package/dist-storybook/assets/{EVENTS-BY66PjI7.js → EVENTS-DIl-sE2t.js} +1 -1
  8. package/dist-storybook/assets/{GETTING_STARTED-BiQMvjvo.js → GETTING_STARTED-CR4dG_o7.js} +1 -1
  9. package/dist-storybook/assets/{GETTING_STARTED-CIVMqKZW.js → GETTING_STARTED-CS2BpDsP.js} +1 -1
  10. package/dist-storybook/assets/{GETTING_STARTED-580o-9Mx.js → GETTING_STARTED-CtonLhRi.js} +1 -1
  11. package/dist-storybook/assets/{INFINITE_SCROLL-BbeR5HeP.js → INFINITE_SCROLL-BerukJIr.js} +1 -1
  12. package/dist-storybook/assets/{LocalesProvider-CMlmwAyY.js → LocalesProvider-CehS9yzW.js} +1 -1
  13. package/dist-storybook/assets/{MIGRATE_DARKMODE_TO_THEME-CBDyZyg2.js → MIGRATE_DARKMODE_TO_THEME-CRf-7Wcz.js} +1 -1
  14. package/dist-storybook/assets/{MIGRATION_GUIDE-FZyRWI-B.js → MIGRATION_GUIDE-CRIHuXpT.js} +1 -1
  15. package/dist-storybook/assets/{OVERVIEW-C9_6gX5Q.js → OVERVIEW-DayETux4.js} +1 -1
  16. package/dist-storybook/assets/{Router-B5U8bubH.js → Router-CGsO5Wd_.js} +1 -1
  17. package/dist-storybook/assets/{TAILWIND_INTEGRATION-BJdy5DAv.js → TAILWIND_INTEGRATION-RPvFP-GI.js} +1 -1
  18. package/dist-storybook/assets/{THEME-CRbvH7KT.js → THEME-C-pA_uq_.js} +1 -1
  19. package/dist-storybook/assets/{_baseClone-DQVxEhny.js → _baseClone-4nOrhHpR.js} +1 -1
  20. package/dist-storybook/assets/{alert-CKwsuaPI.js → alert-D3VdqAYm.js} +1 -1
  21. package/dist-storybook/assets/{alert.stories-D0X5wUHk.js → alert.stories-CFBhdabd.js} +1 -1
  22. package/dist-storybook/assets/{app-CTv8lFU3.js → app-B__CxZQv.js} +1 -1
  23. package/dist-storybook/assets/{avatar-rWcYGe6j.js → avatar-BVV1WSnD.js} +1 -1
  24. package/dist-storybook/assets/{avatar.stories-8lrbhMma.js → avatar.stories-D0RA2Mhh.js} +1 -1
  25. package/dist-storybook/assets/{axe-BHGdSCoA.js → axe-Cj9fkEY9.js} +1 -1
  26. package/dist-storybook/assets/{badge-VcjGVEum.js → badge-DLt8CmDs.js} +1 -1
  27. package/dist-storybook/assets/{badge.stories-BEFNaUA1.js → badge.stories-DhVKBE64.js} +1 -1
  28. package/dist-storybook/assets/{blocks-DKR3P4qW.js → blocks-D4qvS4eZ.js} +3 -3
  29. package/dist-storybook/assets/{bottom-tab-bar-B6IAoRwz.js → bottom-tab-bar-UaYvPAic.js} +1 -1
  30. package/dist-storybook/assets/{bottom-tab-bar.stories-DXzLlO5o.js → bottom-tab-bar.stories--7Qh-68J.js} +1 -1
  31. package/dist-storybook/assets/{button-DJH3RlJl.js → button-CbLEqALK.js} +1 -1
  32. package/dist-storybook/assets/{button.stories-DgYDJ6x7.js → button.stories-DgRH6oVV.js} +1 -1
  33. package/dist-storybook/assets/{calendar-C4Xe_TW2.js → calendar-C7tiySn0.js} +1 -1
  34. package/dist-storybook/assets/{calendar.stories-IVvRAjWN.js → calendar.stories-B0K_T9ak.js} +1 -1
  35. package/dist-storybook/assets/{carousel-DJlgMyS5.js → carousel-C1nQGnJZ.js} +1 -1
  36. package/dist-storybook/assets/{carousel.stories-3rA3nxdL.js → carousel.stories-C5d6yLzd.js} +1 -1
  37. package/dist-storybook/assets/{checkbox-JOxcmyCZ.js → checkbox-Bs8ghsWP.js} +1 -1
  38. package/dist-storybook/assets/{checkbox.stories-ge3pgfBb.js → checkbox.stories-CG74gIlt.js} +1 -1
  39. package/dist-storybook/assets/{chip-Crt60rph.js → chip-D4_ukvFv.js} +1 -1
  40. package/dist-storybook/assets/{chip.stories-D7E6fdiV.js → chip.stories-D0908ZyT.js} +1 -1
  41. package/dist-storybook/assets/{date-B3PFMb6s.js → date-C1W0DfQy.js} +1 -1
  42. package/dist-storybook/assets/{date-field-range-B-sv9nbW.js → date-field-range-DSAQp9qR.js} +1 -1
  43. package/dist-storybook/assets/{date-field.stories-B9G2heHt.js → date-field.stories-Dx6-qeWT.js} +1 -1
  44. package/dist-storybook/assets/{date-picker-BPzKPdhO.js → date-picker--PiU9sOL.js} +1 -1
  45. package/dist-storybook/assets/{date-picker.stories-CIFgk4q_.js → date-picker.stories-Bahq3f1W.js} +1 -1
  46. package/dist-storybook/assets/{dialog-BAfGQzk5.js → dialog-8K5u-kre.js} +1 -1
  47. package/dist-storybook/assets/{dialog.stories-vDMKz9Tw.js → dialog.stories-BxYc78Eo.js} +1 -1
  48. package/dist-storybook/assets/{dropdown-Dtomaqpw.js → dropdown-BeoO7m-R.js} +1 -1
  49. package/dist-storybook/assets/{dropdown.stories-Cj0HM0VI.js → dropdown.stories-Bfhg63tZ.js} +1 -1
  50. package/dist-storybook/assets/{embla-carousel-react.esm-5D5fs7OQ.js → embla-carousel-react.esm-Pp2OIUrN.js} +1 -1
  51. package/dist-storybook/assets/{icon-CdiFzFyf.js → icon-CgGksgRS.js} +1 -1
  52. package/dist-storybook/assets/{icon.stories-DWwbUUY-.js → icon.stories-qg8UAHBM.js} +1 -1
  53. package/dist-storybook/assets/iframe-BKfReaAn.css +1 -0
  54. package/dist-storybook/assets/{iframe-DfPay7Zl.js → iframe-C0PGuV5s.js} +3 -3
  55. package/dist-storybook/assets/{image-CMKb-R3x.js → image-BdsCB1je.js} +1 -1
  56. package/dist-storybook/assets/{image.stories-BhZU057W.js → image.stories-sQtCaoL2.js} +1 -1
  57. package/dist-storybook/assets/{index-cMNObl2z.js → index-1AHvPexM.js} +1 -1
  58. package/dist-storybook/assets/{index-BWpuenI4.js → index-BLzgbpm2.js} +1 -1
  59. package/dist-storybook/assets/{index-EGt7xBnA.js → index-DWjPAWoJ.js} +1 -1
  60. package/dist-storybook/assets/{index-DqZh6B0b.js → index-SzFZQQjs.js} +1 -1
  61. package/dist-storybook/assets/{input-wrapper-CgaUwbbE.js → input-wrapper-DkEl0Eih.js} +1 -1
  62. package/dist-storybook/assets/{label-D44azUgi.js → label-CHVpMhb5.js} +1 -1
  63. package/dist-storybook/assets/{label.stories-CXJjdYf_.js → label.stories-CCtGPDrS.js} +1 -1
  64. package/dist-storybook/assets/{navigation-bar-DK3TxcTu.js → navigation-bar-TpF0DSXB.js} +1 -1
  65. package/dist-storybook/assets/{navigation-bar.stories-CB3Kg-sH.js → navigation-bar.stories-CNXAxMYL.js} +1 -1
  66. package/dist-storybook/assets/{number-field-Bz7su9S1.js → number-field-CvCF5adO.js} +1 -1
  67. package/dist-storybook/assets/{number-field.stories-DSxPSzLv.js → number-field.stories-Dsb_eChm.js} +1 -1
  68. package/dist-storybook/assets/{omit-BWHsnDSR.js → omit-D04qL5V_.js} +1 -1
  69. package/dist-storybook/assets/{option-item-CpeNcb5w.js → option-item-Bmby544G.js} +1 -1
  70. package/dist-storybook/assets/{option-item.stories-BvXoc8WX.js → option-item.stories-ClUj8qVT.js} +1 -1
  71. package/dist-storybook/assets/{pagination-Cp-DHO4Q.js → pagination-MBP1YLhT.js} +1 -1
  72. package/dist-storybook/assets/{pagination.stories-_5qj2nTS.js → pagination.stories-C9j6mE5z.js} +1 -1
  73. package/dist-storybook/assets/{proxy-B4G9nIBd.js → proxy-edvPwIiD.js} +1 -1
  74. package/dist-storybook/assets/{radio-D0aV0RIg.js → radio-DRPO7cjx.js} +1 -1
  75. package/dist-storybook/assets/{radio.stories-BNR-wwuw.js → radio.stories-D8_YUTw1.js} +1 -1
  76. package/dist-storybook/assets/{rating-D2e8RTGl.js → rating-CTv8C1tH.js} +1 -1
  77. package/dist-storybook/assets/{rating.stories-CI0LG0Qq.js → rating.stories-BIftLeu2.js} +1 -1
  78. package/dist-storybook/assets/{react-18-C7pDmBBf.js → react-18-CacBUmwb.js} +1 -1
  79. package/dist-storybook/assets/{react-I9jCW2VV.js → react-zqqxT5R_.js} +1 -1
  80. package/dist-storybook/assets/{search-field-DINESW8Y.js → search-field-CophTGGH.js} +1 -1
  81. package/dist-storybook/assets/{search-field.stories-CKXC6-Za.js → search-field.stories-D1okdN8e.js} +1 -1
  82. package/dist-storybook/assets/{section-content-D49PabBW.js → section-content-dVOJuOaN.js} +1 -1
  83. package/dist-storybook/assets/{section.stories-9vd48AgB.js → section.stories-Cq5CY978.js} +1 -1
  84. package/dist-storybook/assets/{sheet-footer-nEdxsYan.js → sheet-footer-BL2JAvmb.js} +1 -1
  85. package/dist-storybook/assets/{sheet.stories-C3gLIQsn.js → sheet.stories-DPcC0I5i.js} +1 -1
  86. package/dist-storybook/assets/{skeleton-B12XbNAJ.js → skeleton-CmGRbWqE.js} +1 -1
  87. package/dist-storybook/assets/{skeleton.stories-C0y1o1Y_.js → skeleton.stories-CD3J1XrJ.js} +1 -1
  88. package/dist-storybook/assets/{store-Ce3Ikv5g.js → store-BmYgrUro.js} +1 -1
  89. package/dist-storybook/assets/{switch-D0Z9tWin.js → switch-Cc-NvT4X.js} +1 -1
  90. package/dist-storybook/assets/{switch.stories-BdWFln-M.js → switch.stories-C5SDbdGL.js} +1 -1
  91. package/dist-storybook/assets/{tab-bar-kExoGg5P.js → tab-bar-DTyg7tFP.js} +1 -1
  92. package/dist-storybook/assets/{tab-bar.stories-BgDXX0of.js → tab-bar.stories-zKrihgXo.js} +1 -1
  93. package/dist-storybook/assets/{text-area-GKy5HL12.js → text-area-WRb8Dkvn.js} +1 -1
  94. package/dist-storybook/assets/{text-area.stories-DCt3RB3A.js → text-area.stories-3Z574UAD.js} +1 -1
  95. package/dist-storybook/assets/{text-field-CGWNqitB.js → text-field-DrODy0yz.js} +1 -1
  96. package/dist-storybook/assets/{text-field.stories-Bqv7f948.js → text-field.stories-DzjpcKin.js} +1 -1
  97. package/dist-storybook/assets/{toast-provider-DKSrfhJD.js → toast-provider-ChNGFQlt.js} +1 -1
  98. package/dist-storybook/assets/{toast.stories-CcFzS6QI.js → toast.stories-Zj4qfKO_.js} +1 -1
  99. package/dist-storybook/assets/{tooltip-B9rDI6z9.js → tooltip-CrxOWTXS.js} +1 -1
  100. package/dist-storybook/assets/{tooltip.stories-DDdsuU3U.js → tooltip.stories-DEnYdL1d.js} +1 -1
  101. package/dist-storybook/assets/{typography-CB8hPDyK.js → typography-BcLxefPi.js} +1 -1
  102. package/dist-storybook/assets/{typography.stories-BzCxaZQU.js → typography.stories-DWxFgTz3.js} +1 -1
  103. package/dist-storybook/assets/{uploader.stories-izVumFqZ.js → uploader.stories-DQN8yjt-.js} +1 -1
  104. package/dist-storybook/assets/{use-app-pause-ClsUnndr.js → use-app-pause-CyjeIEPG.js} +1 -1
  105. package/dist-storybook/assets/{use-app-resume-D_EcIvMd.js → use-app-resume-DntO6Rkm.js} +1 -1
  106. package/dist-storybook/assets/{use-bottom-tab-bar-BC1cz2uE.js → use-bottom-tab-bar-Da7gjw6y.js} +1 -1
  107. package/dist-storybook/assets/{use-custom-icon-event-cUk4Md0Y.js → use-custom-icon-event-BEYPYrKY.js} +1 -1
  108. package/dist-storybook/assets/{use-did-hide-BmABiaUE.js → use-did-hide-Do-KOSzV.js} +1 -1
  109. package/dist-storybook/assets/{use-did-show-CQuySkkT.js → use-did-show-Bv9k7DdG.js} +1 -1
  110. package/dist-storybook/assets/{use-histories-CBm09Lno.js → use-histories-Ci1HfRe-.js} +1 -1
  111. package/dist-storybook/assets/{use-history-7yguNz6O.js → use-history-CkVE1jRy.js} +1 -1
  112. package/dist-storybook/assets/{use-language-DPyWMce2.js → use-language-Bg-LzpzQ.js} +1 -1
  113. package/dist-storybook/assets/{use-load-more-KlDJZhj2.js → use-load-more-eaC8W6Cc.js} +1 -1
  114. package/dist-storybook/assets/{use-location-C7kE1yla.js → use-location-BMrQnhPi.js} +1 -1
  115. package/dist-storybook/assets/{use-navigate-BpIyvtwc.js → use-navigate-BwwmhToy.js} +1 -1
  116. package/dist-storybook/assets/{use-navigation-bar-guzwhM_u.js → use-navigation-bar-DzgWeTpM.js} +1 -1
  117. package/dist-storybook/assets/{use-navigation-type-DOndDqQH.js → use-navigation-type-DNvXTqYH.js} +1 -1
  118. package/dist-storybook/assets/{use-page-layout-dO6ylI1b.js → use-page-layout-BA2HvjAQ.js} +1 -1
  119. package/dist-storybook/assets/{use-page-scroll-CCG2d2Gb.js → use-page-scroll-D_gjlV-S.js} +1 -1
  120. package/dist-storybook/assets/{use-pull-to-refresh-lhumDu1H.js → use-pull-to-refresh-SZfswIA6.js} +1 -1
  121. package/dist-storybook/assets/{use-settings-changed-Bt58DJ-c.js → use-settings-changed-D2gdx5rD.js} +1 -1
  122. package/dist-storybook/assets/{use-translate-Jhz6jTXo.js → use-translate-BTC2AQ0k.js} +1 -1
  123. package/dist-storybook/assets/{visibility-sensor-Jf-Nmil6.js → visibility-sensor-FN9n9CLs.js} +1 -1
  124. package/dist-storybook/iframe.html +2 -2
  125. package/dist-storybook/project.json +1 -1
  126. package/package.json +1 -1
  127. package/dist-storybook/assets/iframe-BHaCv4dM.css +0 -1
@@ -1 +1 @@
1
- import{r as x,j as e}from"./iframe-DfPay7Zl.js";import{c,g as _e}from"./store-Ce3Ikv5g.js";import{d as k}from"./date-B3PFMb6s.js";import{I as A}from"./icon-CdiFzFyf.js";import{B as F}from"./button-DJH3RlJl.js";import{T as m}from"./typography-CB8hPDyK.js";import{u as ye}from"./index-EGt7xBnA.js";import{s as oe,p as ke,g as pe}from"./index-BWpuenI4.js";class we{getNumDaysInMonth(t,i){return new Date(i,t+1,0).getDate()}isSame(t,i){return k(t).isSame(k(i),"day")}isBefore(t,i){return k(t).isBefore(k(i),"day")}isAfter(t,i){return k(t).isAfter(k(i),"day")}isSameOrBefore(t,i){return k(t).isSameOrBefore(k(i),"day")}isSameOrAfter(t,i){return k(t).isSameOrAfter(k(i),"day")}}const g=new we,Ce=n=>({date:t=>t.getDate(),headerLabel:(t,i)=>oe("calendar.headerLabel",{month:oe(`calendar.monthLabel[${t}]`,void 0,n),year:i},n),weekday:t=>oe(`calendar.weekdayLabel[${t}]`,void 0,n)}),ge=(n,t)=>({...t,...Ce(n==="en"?"en":"vi")}),xe=_e("calendar"),l=xe+"-single-picker",Se=new Date(1900,0,1),ze=new Date(2099,11,31),Ie=n=>{const t={};return n.defaultValue!==void 0&&(t.defaultValue=n.defaultValue),n.value!==void 0&&(t.value=n.value),n.onChange!==void 0&&(t.onChange=n.onChange),t},be=n=>{const{className:t,renderText:i,lang:p,navigationMode:w="month-year",defaultValue:Ne,onChange:Me,value:C,minDate:V=Se,maxDate:R=ze,...W}=n,[z,U]=ye(Ie(n)),ee=ge(p,i),{date:v,dateSubText:h,headerLabel:b,weekday:T}=ee,O=new Date,[d,I]=x.useState(()=>z?z.getMonth():O.getMonth()),[o,S]=x.useState(()=>z?z.getFullYear():O.getFullYear()),Y=(new Date(o,d,1).getDay()+6)%7,f=g.getNumDaysInMonth(d,o),K=Y+f,u=Math.ceil(K/7),P=R.getMonth(),N=R.getFullYear(),q=V.getMonth(),G=V.getFullYear(),Q=o<N||o===N&&d<P,H=o>G||o===G&&d>q,L=o<N||o+1===N&&d<=P,X=o>G||o-1===G&&d>=q,j=x.useMemo(()=>{if(!H)return null;let y=o,s=d-1;return s<0&&(y--,s=11),{month:s,year:y}},[d,H,o]),M=x.useMemo(()=>{if(!Q)return null;let y=o,s=d+1;return s>11&&(y++,s=0),{month:s,year:y}},[d,Q,o]),J=x.useMemo(()=>j?g.getNumDaysInMonth(j.month,j.year):null,[j]),te=x.useMemo(()=>M?g.getNumDaysInMonth(M.month,M.year):null,[M]),ne=y=>{const s=new Date(o,d,y);return g.isSameOrAfter(s,V)&&g.isSameOrBefore(s,R)};return e.jsxs("div",{className:c(xe,l,t),...W,children:[e.jsxs("div",{className:`${l}__header`,children:[w==="month-year"&&e.jsx(F,{type:"ghost",theme:"neutral",disabled:!X,onClick:()=>{X&&S(o-1)},children:e.jsx(A,{size:20,name:"double-chevron-left"})}),w!=="time-only"&&e.jsx(F,{type:"ghost",theme:"neutral",disabled:!H,onClick:()=>{j&&(I(j.month),S(j.year))},children:e.jsx(A,{size:20,name:"chevron-left"})}),e.jsx(m,{className:`${l}__header-label`,children:typeof b=="function"?b?.(d,o):b}),w!=="time-only"&&e.jsx(F,{type:"ghost",theme:"neutral",disabled:!Q,onClick:()=>{M&&(I(M.month),S(M.year))},children:e.jsx(A,{size:20,name:"chevron-right"})}),w==="month-year"&&e.jsx(F,{type:"ghost",theme:"neutral",disabled:!L,onClick:()=>{L&&S(o+1)},children:e.jsx(A,{size:20,name:"double-chevron-right"})})]}),e.jsx("div",{children:e.jsxs("div",{className:`${l}__grid`,children:[Array.from({length:7},(y,s)=>{const B=(s+1)%7;return e.jsx("div",{className:c(`${l}__cell-container`),children:e.jsx("div",{className:c(`${l}__cell`,`${l}__cell-week`),children:e.jsx(m,{color:"alias-object-secondary",children:typeof T=="function"?T(B):T})})})}),Array.from({length:u*7},(y,s)=>{if(s<Y){if(!J)return e.jsx("div",{className:c(`${l}__cell-container`),children:e.jsx(m,{size:"base",role:"button",className:c(`${l}__cell`,`${l}__cell-day`,`${l}__cell-day-filler`),children:"null"})},s);const $=J-Y+s+1,r=new Date(o,d,$);return e.jsx("div",{className:c(`${l}__cell-container`),children:e.jsxs(m,{size:"base",role:"button",className:c(`${l}__cell`,`${l}__cell-day`,`${l}__cell-day-filler`),children:[typeof v=="function"?v(r):v,e.jsx(m,{size:"2x-small",className:`${l}__cell-day-sub-title`,children:typeof h=="function"?h(r):h})]})},s)}if(s>=Y+f){if(!te)return e.jsx("div",{className:c(`${l}__cell-container`),children:e.jsx(m,{size:"base",role:"button",className:c(`${l}__cell`,`${l}__cell-day`,`${l}__cell-day-filler`),children:"null"})},s);const $=s-(Y+f)+1,r=new Date(o,d,$);return e.jsx("div",{className:c(`${l}__cell-container`),children:e.jsxs(m,{size:"base",role:"button",className:c(`${l}__cell`,`${l}__cell-day`,`${l}__cell-day-filler`),children:[typeof v=="function"?v(r):v,e.jsx(m,{size:"2x-small",className:`${l}__cell-day-sub-title`,children:typeof h=="function"?h(r):h})]})},s)}const B=s-Y+1,E=new Date(o,d,B),ae=!ne(B);return e.jsx("div",{className:c(`${l}__cell-container`),children:e.jsxs(m,{size:"base",role:"button",onClick:()=>{!E||ae||U(E)},className:c(`${l}__cell`,`${l}__cell-day`,{[`${l}__cell-day--disabled`]:ae,[`${l}__cell-day--today`]:g.isSame(E,O),[`${l}__cell-day--selected`]:z&&g.isSame(E,z)}),children:[typeof v=="function"?v(E):v,e.jsx(m,{size:"2x-small",className:`${l}__cell-day-sub-title`,children:typeof h=="function"?h(E):h})]})},s)})]})})]})};be.__docgenInfo={description:"",methods:[],displayName:"SinglePicker"};const $e=_e("calendar"),a=$e+"-range-picker",Ye=new Date(1900,0,1),Pe=new Date(2099,11,31),Ee=n=>{const t={};return(n.defaultValue!==void 0||n.defaultValue===null)&&(t.defaultValue=n.defaultValue),(n.value!==void 0||n.value===null)&&(t.value=n.value),n.onChange!==void 0&&(t.onChange=n.onChange),t},ue=n=>{const t=new Date;if(n){const[i,p]=n;return i?i.getMonth():p?p.getMonth():t.getMonth()}return t.getMonth()},me=n=>{const t=new Date;if(n){const[i,p]=n;return i?i.getFullYear():p?p.getFullYear():t.getFullYear()}return t.getFullYear()},he=n=>{if(!n)return null;const[t]=n;return t},fe=n=>{if(!n)return null;const[,t]=n;return t},je=n=>{const{className:t,renderText:i,lang:p,navigationMode:w="month-year",defaultValue:Ne,onChange:Me,value:C,minDate:V=Ye,maxDate:R=Pe,onPick:W,...z}=n,[U,ee]=ye(Ee(n)),v=ge(p,i),{date:h,dateSubText:b,headerLabel:T,weekday:O}=v,[d,I]=x.useState(he(U)),[o,S]=x.useState(fe(U)),Y=new Date,[f,K]=x.useState(ue(U)),[u,P]=x.useState(me(U)),N=(new Date(u,f,1).getDay()+6)%7,q=g.getNumDaysInMonth(f,u),G=N+q,Q=Math.ceil(G/7),H=R.getMonth(),L=R.getFullYear(),X=V.getMonth(),j=V.getFullYear(),M=u<L||u===L&&f<H,J=u>j||u===j&&f>X,te=u<L||u+1===L&&f<=H,ne=u>j||u-1===j&&f>=X,y=x.useMemo(()=>{if(!J)return null;let $=u,r=f-1;return r<0&&($--,r=11),{month:r,year:$}},[f,J,u]),s=x.useMemo(()=>{if(!M)return null;let $=u,r=f+1;return r>11&&($++,r=0),{month:r,year:$}},[f,M,u]),B=x.useMemo(()=>y?g.getNumDaysInMonth(y.month,y.year):null,[y]),E=x.useMemo(()=>s?g.getNumDaysInMonth(s.month,s.year):null,[s]),ae=$=>{const r=new Date(u,f,$);return g.isSameOrAfter(r,V)&&g.isSameOrBefore(r,R)};return x.useEffect(()=>{C!=null&&(K(ue(C)),P(me(C)))},[C?.[0]?.getTime()]),x.useEffect(()=>{C!=null&&(I(he(C)),S(fe(C)))},[C]),e.jsxs("div",{className:c($e,a,t),...z,children:[e.jsxs("div",{className:`${a}__header`,children:[w==="month-year"&&e.jsx(F,{type:"ghost",theme:"neutral",disabled:!ne,onClick:()=>{ne&&P(u-1)},children:e.jsx(A,{size:20,name:"double-chevron-left"})}),w!=="time-only"&&e.jsx(F,{type:"ghost",theme:"neutral",disabled:!J,onClick:()=>{y&&(K(y.month),P(y.year))},children:e.jsx(A,{size:20,name:"chevron-left"})}),e.jsx(m,{className:`${a}__header-label`,children:typeof T=="function"?T?.(f,u):T}),w!=="time-only"&&e.jsx(F,{type:"ghost",theme:"neutral",disabled:!M,onClick:()=>{s&&(K(s.month),P(s.year))},children:e.jsx(A,{size:20,name:"chevron-right"})}),w==="month-year"&&e.jsx(F,{type:"ghost",theme:"neutral",disabled:!te,onClick:()=>{te&&P(u+1)},children:e.jsx(A,{size:20,name:"double-chevron-right"})})]}),e.jsx("div",{children:e.jsxs("div",{className:`${a}__grid`,children:[Array.from({length:7},($,r)=>{const le=(r+1)%7;return e.jsx("div",{className:c(`${a}__cell-container`),children:e.jsx("div",{className:c(`${a}__cell`,`${a}__cell-week`),children:e.jsx(m,{color:"alias-object-secondary",children:typeof O=="function"?O(le):O})})})}),Array.from({length:Q*7},($,r)=>{if(r<N){if(!B)return e.jsx("div",{className:c(`${a}__cell-container`),children:e.jsx(m,{size:"base",role:"button",className:c(`${a}__cell`,`${a}__cell-day`,`${a}__cell-day-filler`),children:"null"})},r);const D=B-N+r+1,Z=new Date(u,f,D);return e.jsx("div",{className:c(`${a}__cell-container`),children:e.jsxs(m,{size:"base",role:"button",className:c(`${a}__cell`,`${a}__cell-day`,`${a}__cell-day-filler`),children:[typeof h=="function"?h(Z):h,e.jsx(m,{size:"2x-small",className:`${a}__cell-day-sub-title`,children:typeof b=="function"?b(Z):b})]})},r)}if(r>=N+q){if(!E)return e.jsx("div",{className:c(`${a}__cell-container`),children:e.jsx(m,{size:"base",role:"button",className:c(`${a}__cell`,`${a}__cell-day`,`${a}__cell-day-filler`),children:"null"})},r);const D=r-(N+q)+1,Z=new Date(u,f,D);return e.jsx("div",{className:c(`${a}__cell-container`),children:e.jsxs(m,{size:"base",role:"button",className:c(`${a}__cell`,`${a}__cell-day`,`${a}__cell-day-filler`),children:[typeof h=="function"?h(Z):h,e.jsx(m,{size:"2x-small",className:`${a}__cell-day-sub-title`,children:typeof b=="function"?b(Z):b})]})},r)}const le=r%7===6,De=r%7===0,ce=r-N+1,_=new Date(u,f,ce),ie=!ae(ce),se=d&&g.isSame(_,d),re=o&&g.isSame(_,o),de=(function(){return d&&o?g.isSameOrAfter(_,d)&&g.isSameOrBefore(_,o):!1})();return e.jsxs("div",{className:c(`${a}__cell-container`),children:[de&&e.jsx("div",{className:c(`${a}__cell-range-background`,{[`${a}__cell-range-background-start`]:se,[`${a}__cell-range-background-end`]:re,[`${a}__cell-range-background-start-end-row`]:se&&le,[`${a}__cell-range-background-end-start-row`]:re&&De})}),e.jsxs(m,{size:"base",role:"button",onClick:()=>{if(ie)return;if(d&&o){I(_),S(null),W?.([_,null]);return}if(!d&&!o){I(_),W?.([_,null]);return}const D=d||o;if(_<D){I(_),S(D),ee?.([_,D]),W?.([_,D]);return}I(D),S(_),ee?.([D,_]),W?.([D,_])},className:c(`${a}__cell`,`${a}__cell-day`,{[`${a}__cell-day--disabled`]:ie,[`${a}__cell-day--today`]:g.isSame(_,Y),[`${a}__cell-day--in-range-picker`]:de,[`${a}__cell-day--selected`]:se||re}),children:[typeof h=="function"?h(_):h,e.jsx(m,{size:"2x-small",className:`${a}__cell-day-sub-title`,children:typeof b=="function"?b(_):b})]})]},r)})]})})]})};je.__docgenInfo={description:"",methods:[],displayName:"RangePicker"};const ve=({type:n="single",...t})=>n==="single"?e.jsx(be,{...t}):e.jsx(je,{...t}),Ae=({lang:n,...t})=>{const{language:i}=pe();return e.jsx(ve,{lang:n||i,...t})},Fe=n=>ke()?e.jsx(ve,{...n}):e.jsx(Ae,{...n});Fe.__docgenInfo={description:"",methods:[],displayName:"Calendar"};export{Fe as C};
1
+ import{r as x,j as e}from"./iframe-C0PGuV5s.js";import{c,g as _e}from"./store-BmYgrUro.js";import{d as k}from"./date-C1W0DfQy.js";import{I as A}from"./icon-CgGksgRS.js";import{B as F}from"./button-CbLEqALK.js";import{T as m}from"./typography-BcLxefPi.js";import{u as ye}from"./index-DWjPAWoJ.js";import{s as oe,p as ke,g as pe}from"./index-BLzgbpm2.js";class we{getNumDaysInMonth(t,i){return new Date(i,t+1,0).getDate()}isSame(t,i){return k(t).isSame(k(i),"day")}isBefore(t,i){return k(t).isBefore(k(i),"day")}isAfter(t,i){return k(t).isAfter(k(i),"day")}isSameOrBefore(t,i){return k(t).isSameOrBefore(k(i),"day")}isSameOrAfter(t,i){return k(t).isSameOrAfter(k(i),"day")}}const g=new we,Ce=n=>({date:t=>t.getDate(),headerLabel:(t,i)=>oe("calendar.headerLabel",{month:oe(`calendar.monthLabel[${t}]`,void 0,n),year:i},n),weekday:t=>oe(`calendar.weekdayLabel[${t}]`,void 0,n)}),ge=(n,t)=>({...t,...Ce(n==="en"?"en":"vi")}),xe=_e("calendar"),l=xe+"-single-picker",Se=new Date(1900,0,1),ze=new Date(2099,11,31),Ie=n=>{const t={};return n.defaultValue!==void 0&&(t.defaultValue=n.defaultValue),n.value!==void 0&&(t.value=n.value),n.onChange!==void 0&&(t.onChange=n.onChange),t},be=n=>{const{className:t,renderText:i,lang:p,navigationMode:w="month-year",defaultValue:Ne,onChange:Me,value:C,minDate:V=Se,maxDate:R=ze,...W}=n,[z,U]=ye(Ie(n)),ee=ge(p,i),{date:v,dateSubText:h,headerLabel:b,weekday:T}=ee,O=new Date,[d,I]=x.useState(()=>z?z.getMonth():O.getMonth()),[o,S]=x.useState(()=>z?z.getFullYear():O.getFullYear()),Y=(new Date(o,d,1).getDay()+6)%7,f=g.getNumDaysInMonth(d,o),K=Y+f,u=Math.ceil(K/7),P=R.getMonth(),N=R.getFullYear(),q=V.getMonth(),G=V.getFullYear(),Q=o<N||o===N&&d<P,H=o>G||o===G&&d>q,L=o<N||o+1===N&&d<=P,X=o>G||o-1===G&&d>=q,j=x.useMemo(()=>{if(!H)return null;let y=o,s=d-1;return s<0&&(y--,s=11),{month:s,year:y}},[d,H,o]),M=x.useMemo(()=>{if(!Q)return null;let y=o,s=d+1;return s>11&&(y++,s=0),{month:s,year:y}},[d,Q,o]),J=x.useMemo(()=>j?g.getNumDaysInMonth(j.month,j.year):null,[j]),te=x.useMemo(()=>M?g.getNumDaysInMonth(M.month,M.year):null,[M]),ne=y=>{const s=new Date(o,d,y);return g.isSameOrAfter(s,V)&&g.isSameOrBefore(s,R)};return e.jsxs("div",{className:c(xe,l,t),...W,children:[e.jsxs("div",{className:`${l}__header`,children:[w==="month-year"&&e.jsx(F,{type:"ghost",theme:"neutral",disabled:!X,onClick:()=>{X&&S(o-1)},children:e.jsx(A,{size:20,name:"double-chevron-left"})}),w!=="time-only"&&e.jsx(F,{type:"ghost",theme:"neutral",disabled:!H,onClick:()=>{j&&(I(j.month),S(j.year))},children:e.jsx(A,{size:20,name:"chevron-left"})}),e.jsx(m,{className:`${l}__header-label`,children:typeof b=="function"?b?.(d,o):b}),w!=="time-only"&&e.jsx(F,{type:"ghost",theme:"neutral",disabled:!Q,onClick:()=>{M&&(I(M.month),S(M.year))},children:e.jsx(A,{size:20,name:"chevron-right"})}),w==="month-year"&&e.jsx(F,{type:"ghost",theme:"neutral",disabled:!L,onClick:()=>{L&&S(o+1)},children:e.jsx(A,{size:20,name:"double-chevron-right"})})]}),e.jsx("div",{children:e.jsxs("div",{className:`${l}__grid`,children:[Array.from({length:7},(y,s)=>{const B=(s+1)%7;return e.jsx("div",{className:c(`${l}__cell-container`),children:e.jsx("div",{className:c(`${l}__cell`,`${l}__cell-week`),children:e.jsx(m,{color:"alias-object-secondary",children:typeof T=="function"?T(B):T})})})}),Array.from({length:u*7},(y,s)=>{if(s<Y){if(!J)return e.jsx("div",{className:c(`${l}__cell-container`),children:e.jsx(m,{size:"base",role:"button",className:c(`${l}__cell`,`${l}__cell-day`,`${l}__cell-day-filler`),children:"null"})},s);const $=J-Y+s+1,r=new Date(o,d,$);return e.jsx("div",{className:c(`${l}__cell-container`),children:e.jsxs(m,{size:"base",role:"button",className:c(`${l}__cell`,`${l}__cell-day`,`${l}__cell-day-filler`),children:[typeof v=="function"?v(r):v,e.jsx(m,{size:"2x-small",className:`${l}__cell-day-sub-title`,children:typeof h=="function"?h(r):h})]})},s)}if(s>=Y+f){if(!te)return e.jsx("div",{className:c(`${l}__cell-container`),children:e.jsx(m,{size:"base",role:"button",className:c(`${l}__cell`,`${l}__cell-day`,`${l}__cell-day-filler`),children:"null"})},s);const $=s-(Y+f)+1,r=new Date(o,d,$);return e.jsx("div",{className:c(`${l}__cell-container`),children:e.jsxs(m,{size:"base",role:"button",className:c(`${l}__cell`,`${l}__cell-day`,`${l}__cell-day-filler`),children:[typeof v=="function"?v(r):v,e.jsx(m,{size:"2x-small",className:`${l}__cell-day-sub-title`,children:typeof h=="function"?h(r):h})]})},s)}const B=s-Y+1,E=new Date(o,d,B),ae=!ne(B);return e.jsx("div",{className:c(`${l}__cell-container`),children:e.jsxs(m,{size:"base",role:"button",onClick:()=>{!E||ae||U(E)},className:c(`${l}__cell`,`${l}__cell-day`,{[`${l}__cell-day--disabled`]:ae,[`${l}__cell-day--today`]:g.isSame(E,O),[`${l}__cell-day--selected`]:z&&g.isSame(E,z)}),children:[typeof v=="function"?v(E):v,e.jsx(m,{size:"2x-small",className:`${l}__cell-day-sub-title`,children:typeof h=="function"?h(E):h})]})},s)})]})})]})};be.__docgenInfo={description:"",methods:[],displayName:"SinglePicker"};const $e=_e("calendar"),a=$e+"-range-picker",Ye=new Date(1900,0,1),Pe=new Date(2099,11,31),Ee=n=>{const t={};return(n.defaultValue!==void 0||n.defaultValue===null)&&(t.defaultValue=n.defaultValue),(n.value!==void 0||n.value===null)&&(t.value=n.value),n.onChange!==void 0&&(t.onChange=n.onChange),t},ue=n=>{const t=new Date;if(n){const[i,p]=n;return i?i.getMonth():p?p.getMonth():t.getMonth()}return t.getMonth()},me=n=>{const t=new Date;if(n){const[i,p]=n;return i?i.getFullYear():p?p.getFullYear():t.getFullYear()}return t.getFullYear()},he=n=>{if(!n)return null;const[t]=n;return t},fe=n=>{if(!n)return null;const[,t]=n;return t},je=n=>{const{className:t,renderText:i,lang:p,navigationMode:w="month-year",defaultValue:Ne,onChange:Me,value:C,minDate:V=Ye,maxDate:R=Pe,onPick:W,...z}=n,[U,ee]=ye(Ee(n)),v=ge(p,i),{date:h,dateSubText:b,headerLabel:T,weekday:O}=v,[d,I]=x.useState(he(U)),[o,S]=x.useState(fe(U)),Y=new Date,[f,K]=x.useState(ue(U)),[u,P]=x.useState(me(U)),N=(new Date(u,f,1).getDay()+6)%7,q=g.getNumDaysInMonth(f,u),G=N+q,Q=Math.ceil(G/7),H=R.getMonth(),L=R.getFullYear(),X=V.getMonth(),j=V.getFullYear(),M=u<L||u===L&&f<H,J=u>j||u===j&&f>X,te=u<L||u+1===L&&f<=H,ne=u>j||u-1===j&&f>=X,y=x.useMemo(()=>{if(!J)return null;let $=u,r=f-1;return r<0&&($--,r=11),{month:r,year:$}},[f,J,u]),s=x.useMemo(()=>{if(!M)return null;let $=u,r=f+1;return r>11&&($++,r=0),{month:r,year:$}},[f,M,u]),B=x.useMemo(()=>y?g.getNumDaysInMonth(y.month,y.year):null,[y]),E=x.useMemo(()=>s?g.getNumDaysInMonth(s.month,s.year):null,[s]),ae=$=>{const r=new Date(u,f,$);return g.isSameOrAfter(r,V)&&g.isSameOrBefore(r,R)};return x.useEffect(()=>{C!=null&&(K(ue(C)),P(me(C)))},[C?.[0]?.getTime()]),x.useEffect(()=>{C!=null&&(I(he(C)),S(fe(C)))},[C]),e.jsxs("div",{className:c($e,a,t),...z,children:[e.jsxs("div",{className:`${a}__header`,children:[w==="month-year"&&e.jsx(F,{type:"ghost",theme:"neutral",disabled:!ne,onClick:()=>{ne&&P(u-1)},children:e.jsx(A,{size:20,name:"double-chevron-left"})}),w!=="time-only"&&e.jsx(F,{type:"ghost",theme:"neutral",disabled:!J,onClick:()=>{y&&(K(y.month),P(y.year))},children:e.jsx(A,{size:20,name:"chevron-left"})}),e.jsx(m,{className:`${a}__header-label`,children:typeof T=="function"?T?.(f,u):T}),w!=="time-only"&&e.jsx(F,{type:"ghost",theme:"neutral",disabled:!M,onClick:()=>{s&&(K(s.month),P(s.year))},children:e.jsx(A,{size:20,name:"chevron-right"})}),w==="month-year"&&e.jsx(F,{type:"ghost",theme:"neutral",disabled:!te,onClick:()=>{te&&P(u+1)},children:e.jsx(A,{size:20,name:"double-chevron-right"})})]}),e.jsx("div",{children:e.jsxs("div",{className:`${a}__grid`,children:[Array.from({length:7},($,r)=>{const le=(r+1)%7;return e.jsx("div",{className:c(`${a}__cell-container`),children:e.jsx("div",{className:c(`${a}__cell`,`${a}__cell-week`),children:e.jsx(m,{color:"alias-object-secondary",children:typeof O=="function"?O(le):O})})})}),Array.from({length:Q*7},($,r)=>{if(r<N){if(!B)return e.jsx("div",{className:c(`${a}__cell-container`),children:e.jsx(m,{size:"base",role:"button",className:c(`${a}__cell`,`${a}__cell-day`,`${a}__cell-day-filler`),children:"null"})},r);const D=B-N+r+1,Z=new Date(u,f,D);return e.jsx("div",{className:c(`${a}__cell-container`),children:e.jsxs(m,{size:"base",role:"button",className:c(`${a}__cell`,`${a}__cell-day`,`${a}__cell-day-filler`),children:[typeof h=="function"?h(Z):h,e.jsx(m,{size:"2x-small",className:`${a}__cell-day-sub-title`,children:typeof b=="function"?b(Z):b})]})},r)}if(r>=N+q){if(!E)return e.jsx("div",{className:c(`${a}__cell-container`),children:e.jsx(m,{size:"base",role:"button",className:c(`${a}__cell`,`${a}__cell-day`,`${a}__cell-day-filler`),children:"null"})},r);const D=r-(N+q)+1,Z=new Date(u,f,D);return e.jsx("div",{className:c(`${a}__cell-container`),children:e.jsxs(m,{size:"base",role:"button",className:c(`${a}__cell`,`${a}__cell-day`,`${a}__cell-day-filler`),children:[typeof h=="function"?h(Z):h,e.jsx(m,{size:"2x-small",className:`${a}__cell-day-sub-title`,children:typeof b=="function"?b(Z):b})]})},r)}const le=r%7===6,De=r%7===0,ce=r-N+1,_=new Date(u,f,ce),ie=!ae(ce),se=d&&g.isSame(_,d),re=o&&g.isSame(_,o),de=(function(){return d&&o?g.isSameOrAfter(_,d)&&g.isSameOrBefore(_,o):!1})();return e.jsxs("div",{className:c(`${a}__cell-container`),children:[de&&e.jsx("div",{className:c(`${a}__cell-range-background`,{[`${a}__cell-range-background-start`]:se,[`${a}__cell-range-background-end`]:re,[`${a}__cell-range-background-start-end-row`]:se&&le,[`${a}__cell-range-background-end-start-row`]:re&&De})}),e.jsxs(m,{size:"base",role:"button",onClick:()=>{if(ie)return;if(d&&o){I(_),S(null),W?.([_,null]);return}if(!d&&!o){I(_),W?.([_,null]);return}const D=d||o;if(_<D){I(_),S(D),ee?.([_,D]),W?.([_,D]);return}I(D),S(_),ee?.([D,_]),W?.([D,_])},className:c(`${a}__cell`,`${a}__cell-day`,{[`${a}__cell-day--disabled`]:ie,[`${a}__cell-day--today`]:g.isSame(_,Y),[`${a}__cell-day--in-range-picker`]:de,[`${a}__cell-day--selected`]:se||re}),children:[typeof h=="function"?h(_):h,e.jsx(m,{size:"2x-small",className:`${a}__cell-day-sub-title`,children:typeof b=="function"?b(_):b})]})]},r)})]})})]})};je.__docgenInfo={description:"",methods:[],displayName:"RangePicker"};const ve=({type:n="single",...t})=>n==="single"?e.jsx(be,{...t}):e.jsx(je,{...t}),Ae=({lang:n,...t})=>{const{language:i}=pe();return e.jsx(ve,{lang:n||i,...t})},Fe=n=>ke()?e.jsx(ve,{...n}):e.jsx(Ae,{...n});Fe.__docgenInfo={description:"",methods:[],displayName:"Calendar"};export{Fe as C};
@@ -1,4 +1,4 @@
1
- import{j as t,r as D}from"./iframe-DfPay7Zl.js";import{C as r}from"./calendar-C4Xe_TW2.js";import{t as e}from"./store-Ce3Ikv5g.js";import{T as f,S as w,M as b,P as S,a as C}from"./blocks-DKR3P4qW.js";import"./preload-helper-PPVm8Dsz.js";import"./date-B3PFMb6s.js";import"./icon-CdiFzFyf.js";import"./colors-_6nFGM3e.js";import"./button-DJH3RlJl.js";import"./typography-CB8hPDyK.js";import"./index-EGt7xBnA.js";import"./index-B-Ksafg0.js";import"./index-BWpuenI4.js";import"./react-I9jCW2VV.js";import"./index-cMNObl2z.js";const c=new Date;c.setDate(c.getDate()+1);const x=new Date;x.setDate(x.getDate()+4);const N=()=>{const n=`
1
+ import{j as t,r as D}from"./iframe-C0PGuV5s.js";import{C as r}from"./calendar-C7tiySn0.js";import{t as e}from"./store-BmYgrUro.js";import{T as f,S as w,M as b,P as S,a as C}from"./blocks-D4qvS4eZ.js";import"./preload-helper-PPVm8Dsz.js";import"./date-C1W0DfQy.js";import"./icon-CgGksgRS.js";import"./colors-_6nFGM3e.js";import"./button-CbLEqALK.js";import"./typography-BcLxefPi.js";import"./index-DWjPAWoJ.js";import"./index-B-Ksafg0.js";import"./index-BLzgbpm2.js";import"./react-zqqxT5R_.js";import"./index-1AHvPexM.js";const c=new Date;c.setDate(c.getDate()+1);const x=new Date;x.setDate(x.getDate()+4);const N=()=>{const n=`
2
2
  ## ${e("common.table.title")}
3
3
 
4
4
  | ${e("common.table.name")} | ${e("common.table.type")} | ${e("common.table.required")} | ${e("common.table.description")} |
@@ -1,4 +1,4 @@
1
- import{r as u,j as I}from"./iframe-DfPay7Zl.js";import{c as R,g as z}from"./store-Ce3Ikv5g.js";import{u as B}from"./embla-carousel-react.esm-5D5fs7OQ.js";import{P as G}from"./pagination-Cp-DHO4Q.js";const J={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function K(a,e){const n=a.scrollSnapList();return typeof e=="number"?n.map(()=>e):e(n,a)}function Q(a,e){const n=a.rootNode();return e&&e(n)||n}function H(a={}){let e,n,s,f,p=null,l=0,o=!1,g=!1,t=!1,i=!1;function y(r,x){n=r;const{mergeOptions:q,optionsAtMedia:D}=x,U=q(J,H.globalOptions),$=q(U,a);if(e=D($),n.scrollSnapList().length<=1)return;i=e.jump,s=!1,f=K(n,e.delay);const{eventStore:C,ownerDocument:W}=n.internalEngine(),_=!!n.internalEngine().options.watchDrag,L=Q(n,e.rootNode);C.add(W,"visibilitychange",j),_&&n.on("pointerDown",w),_&&!e.stopOnInteraction&&n.on("pointerUp",S),e.stopOnMouseEnter&&C.add(L,"mouseenter",E),e.stopOnMouseEnter&&!e.stopOnInteraction&&C.add(L,"mouseleave",T),e.stopOnFocusIn&&n.on("slideFocusStart",d),e.stopOnFocusIn&&!e.stopOnInteraction&&C.add(n.containerNode(),"focusout",m),e.playOnInit&&m()}function c(){n.off("pointerDown",w).off("pointerUp",S).off("slideFocusStart",d),d(),s=!0,o=!1}function O(){const{ownerWindow:r}=n.internalEngine();r.clearTimeout(l),l=r.setTimeout(F,f[n.selectedScrollSnap()]),p=new Date().getTime(),n.emit("autoplay:timerset")}function h(){const{ownerWindow:r}=n.internalEngine();r.clearTimeout(l),l=0,p=null,n.emit("autoplay:timerstopped")}function m(){if(!s){if(k()){t=!0;return}o||n.emit("autoplay:play"),O(),o=!0}}function d(){s||(o&&n.emit("autoplay:stop"),h(),o=!1)}function j(){if(k())return t=o,d();t&&m()}function k(){const{ownerDocument:r}=n.internalEngine();return r.visibilityState==="hidden"}function w(){g||d()}function S(){g||m()}function E(){g=!0,d()}function T(){g=!1,m()}function A(r){typeof r<"u"&&(i=r),m()}function b(){o&&d()}function v(){o&&m()}function P(){return o}function F(){const{index:r}=n.internalEngine(),x=r.clone().add(1).get(),q=n.scrollSnapList().length-1,D=e.stopOnLastSnap&&x===q;if(n.canScrollNext()?n.scrollNext(i):n.scrollTo(0,i),n.emit("autoplay:select"),D)return d();m()}function M(){if(!p)return null;const r=f[n.selectedScrollSnap()],x=new Date().getTime()-p;return r-x}return{name:"autoplay",options:a,init:y,destroy:c,play:A,stop:b,reset:v,isPlaying:P,timeUntilNext:M}}H.globalOptions=void 0;function V(a={}){let e,n=[];const s=["select","slideFocus"];function f(t){e=t;const{options:{axis:i},slideRects:y}=e.internalEngine();i!=="y"&&(n=y.map(c=>c.height),s.forEach(c=>e.on(c,o)),o())}function p(){s.forEach(i=>e.off(i,o));const t=e.containerNode();t.style.height="",t.getAttribute("style")||t.removeAttribute("style")}function l(){const{slideRegistry:t}=e.internalEngine(),i=t[e.selectedScrollSnap()];return i?i.map(y=>n[y]).reduce((y,c)=>Math.max(y,c),0):null}function o(){l()!==null&&(e.containerNode().style.height=`${l()}px`)}return{name:"autoHeight",options:a,init:f,destroy:p}}V.globalOptions=void 0;const X=(a={})=>{const{align:e="center",initialIndex:n=0,autoplay:s=!1,delay:f=3e3,duration:p=25,loop:l,autoHeight:o=!0}=a,[g,t]=B({axis:"x",align:e,startIndex:n,duration:p,loop:l},[H({playOnInit:!0,delay:f,active:s}),V({active:o})]),i=t?.scrollNext,y=u.useCallback(v=>i?.(v.jump),[i]),c=t?.scrollPrev,O=u.useCallback(v=>c?.(v.jump),[c]),h=t?.scrollTo,m=u.useCallback((v,P)=>h?.(v,P.jump),[h]),[d,j]=u.useState(!1),[k,w]=u.useState(!1),[S,E]=u.useState(0),[T,A]=u.useState([]),b=u.useCallback(()=>{t&&(w(!!t?.canScrollPrev()),j(!!t?.canScrollNext()),A(t.scrollSnapList()),E(t.selectedScrollSnap()))},[t]);return u.useEffect(()=>{t&&(b(),t.on("reInit",b).on("select",b))},[t,b]),{ref:g,next:y,prev:O,toSlide:m,activeIndex:S,canNext:d,canPrev:k,snaps:T,options:a}},N=z("carousel"),Y=u.forwardRef(({className:a,carousel:e,options:n,pagination:s=!0,children:f},p)=>{const l=X(n);return e=e||l,u.useImperativeHandle(p,()=>e),I.jsxs("div",{className:R(N,a),style:{"--carousel-gap":typeof e.options.gap=="number"?e.options.gap+"px":"8px"},children:[I.jsx("div",{className:`${N}__viewport`,ref:e.ref,children:I.jsx("div",{className:`${N}__tracks`,children:f})}),!!s&&I.jsx(G,{total:e.snaps.length,activeIndex:e.activeIndex})]})}),Z=({children:a,className:e,...n})=>I.jsx("div",{className:R(`${N}__item`,e),...n,children:a});Y.__docgenInfo={description:"",methods:[],displayName:"Carousel",props:{className:{required:!1,tsType:{name:"string"},description:""},children:{required:!0,tsType:{name:"ReactNode"},description:""},carousel:{required:!1,tsType:{name:"signature",type:"object",raw:`{
1
+ import{r as u,j as I}from"./iframe-C0PGuV5s.js";import{c as R,g as z}from"./store-BmYgrUro.js";import{u as B}from"./embla-carousel-react.esm-Pp2OIUrN.js";import{P as G}from"./pagination-MBP1YLhT.js";const J={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function K(a,e){const n=a.scrollSnapList();return typeof e=="number"?n.map(()=>e):e(n,a)}function Q(a,e){const n=a.rootNode();return e&&e(n)||n}function H(a={}){let e,n,s,f,p=null,l=0,o=!1,g=!1,t=!1,i=!1;function y(r,x){n=r;const{mergeOptions:q,optionsAtMedia:D}=x,U=q(J,H.globalOptions),$=q(U,a);if(e=D($),n.scrollSnapList().length<=1)return;i=e.jump,s=!1,f=K(n,e.delay);const{eventStore:C,ownerDocument:W}=n.internalEngine(),_=!!n.internalEngine().options.watchDrag,L=Q(n,e.rootNode);C.add(W,"visibilitychange",j),_&&n.on("pointerDown",w),_&&!e.stopOnInteraction&&n.on("pointerUp",S),e.stopOnMouseEnter&&C.add(L,"mouseenter",E),e.stopOnMouseEnter&&!e.stopOnInteraction&&C.add(L,"mouseleave",T),e.stopOnFocusIn&&n.on("slideFocusStart",d),e.stopOnFocusIn&&!e.stopOnInteraction&&C.add(n.containerNode(),"focusout",m),e.playOnInit&&m()}function c(){n.off("pointerDown",w).off("pointerUp",S).off("slideFocusStart",d),d(),s=!0,o=!1}function O(){const{ownerWindow:r}=n.internalEngine();r.clearTimeout(l),l=r.setTimeout(F,f[n.selectedScrollSnap()]),p=new Date().getTime(),n.emit("autoplay:timerset")}function h(){const{ownerWindow:r}=n.internalEngine();r.clearTimeout(l),l=0,p=null,n.emit("autoplay:timerstopped")}function m(){if(!s){if(k()){t=!0;return}o||n.emit("autoplay:play"),O(),o=!0}}function d(){s||(o&&n.emit("autoplay:stop"),h(),o=!1)}function j(){if(k())return t=o,d();t&&m()}function k(){const{ownerDocument:r}=n.internalEngine();return r.visibilityState==="hidden"}function w(){g||d()}function S(){g||m()}function E(){g=!0,d()}function T(){g=!1,m()}function A(r){typeof r<"u"&&(i=r),m()}function b(){o&&d()}function v(){o&&m()}function P(){return o}function F(){const{index:r}=n.internalEngine(),x=r.clone().add(1).get(),q=n.scrollSnapList().length-1,D=e.stopOnLastSnap&&x===q;if(n.canScrollNext()?n.scrollNext(i):n.scrollTo(0,i),n.emit("autoplay:select"),D)return d();m()}function M(){if(!p)return null;const r=f[n.selectedScrollSnap()],x=new Date().getTime()-p;return r-x}return{name:"autoplay",options:a,init:y,destroy:c,play:A,stop:b,reset:v,isPlaying:P,timeUntilNext:M}}H.globalOptions=void 0;function V(a={}){let e,n=[];const s=["select","slideFocus"];function f(t){e=t;const{options:{axis:i},slideRects:y}=e.internalEngine();i!=="y"&&(n=y.map(c=>c.height),s.forEach(c=>e.on(c,o)),o())}function p(){s.forEach(i=>e.off(i,o));const t=e.containerNode();t.style.height="",t.getAttribute("style")||t.removeAttribute("style")}function l(){const{slideRegistry:t}=e.internalEngine(),i=t[e.selectedScrollSnap()];return i?i.map(y=>n[y]).reduce((y,c)=>Math.max(y,c),0):null}function o(){l()!==null&&(e.containerNode().style.height=`${l()}px`)}return{name:"autoHeight",options:a,init:f,destroy:p}}V.globalOptions=void 0;const X=(a={})=>{const{align:e="center",initialIndex:n=0,autoplay:s=!1,delay:f=3e3,duration:p=25,loop:l,autoHeight:o=!0}=a,[g,t]=B({axis:"x",align:e,startIndex:n,duration:p,loop:l},[H({playOnInit:!0,delay:f,active:s}),V({active:o})]),i=t?.scrollNext,y=u.useCallback(v=>i?.(v.jump),[i]),c=t?.scrollPrev,O=u.useCallback(v=>c?.(v.jump),[c]),h=t?.scrollTo,m=u.useCallback((v,P)=>h?.(v,P.jump),[h]),[d,j]=u.useState(!1),[k,w]=u.useState(!1),[S,E]=u.useState(0),[T,A]=u.useState([]),b=u.useCallback(()=>{t&&(w(!!t?.canScrollPrev()),j(!!t?.canScrollNext()),A(t.scrollSnapList()),E(t.selectedScrollSnap()))},[t]);return u.useEffect(()=>{t&&(b(),t.on("reInit",b).on("select",b))},[t,b]),{ref:g,next:y,prev:O,toSlide:m,activeIndex:S,canNext:d,canPrev:k,snaps:T,options:a}},N=z("carousel"),Y=u.forwardRef(({className:a,carousel:e,options:n,pagination:s=!0,children:f},p)=>{const l=X(n);return e=e||l,u.useImperativeHandle(p,()=>e),I.jsxs("div",{className:R(N,a),style:{"--carousel-gap":typeof e.options.gap=="number"?e.options.gap+"px":"8px"},children:[I.jsx("div",{className:`${N}__viewport`,ref:e.ref,children:I.jsx("div",{className:`${N}__tracks`,children:f})}),!!s&&I.jsx(G,{total:e.snaps.length,activeIndex:e.activeIndex})]})}),Z=({children:a,className:e,...n})=>I.jsx("div",{className:R(`${N}__item`,e),...n,children:a});Y.__docgenInfo={description:"",methods:[],displayName:"Carousel",props:{className:{required:!1,tsType:{name:"string"},description:""},children:{required:!0,tsType:{name:"ReactNode"},description:""},carousel:{required:!1,tsType:{name:"signature",type:"object",raw:`{
2
2
  ref: ICarouselViewPortRef
3
3
  next: (options: ICarouselToOptions) => void
4
4
  prev: (options: ICarouselToOptions) => void
@@ -1,4 +1,4 @@
1
- import{j as e,r as j}from"./iframe-DfPay7Zl.js";import{C as a,a as n,u as f}from"./carousel-DJlgMyS5.js";import{B as r}from"./button-DJH3RlJl.js";import{t as o}from"./store-Ce3Ikv5g.js";import{T as F,S as b,M as h,P as $,a as v}from"./blocks-DKR3P4qW.js";import"./preload-helper-PPVm8Dsz.js";import"./embla-carousel-react.esm-5D5fs7OQ.js";import"./pagination-Cp-DHO4Q.js";import"./icon-CdiFzFyf.js";import"./colors-_6nFGM3e.js";import"./typography-CB8hPDyK.js";import"./index-cMNObl2z.js";const N=()=>{const s=`
1
+ import{j as e,r as j}from"./iframe-C0PGuV5s.js";import{C as a,a as n,u as f}from"./carousel-C1nQGnJZ.js";import{B as r}from"./button-CbLEqALK.js";import{t as o}from"./store-BmYgrUro.js";import{T as F,S as b,M as h,P as $,a as v}from"./blocks-D4qvS4eZ.js";import"./preload-helper-PPVm8Dsz.js";import"./embla-carousel-react.esm-Pp2OIUrN.js";import"./pagination-MBP1YLhT.js";import"./icon-CgGksgRS.js";import"./colors-_6nFGM3e.js";import"./typography-BcLxefPi.js";import"./index-1AHvPexM.js";const N=()=>{const s=`
2
2
  ## ${o("common.table.title")}
3
3
 
4
4
  | ${o("common.table.name")} | ${o("common.table.type")} | ${o("common.table.required")} | ${o("common.table.description")} |
@@ -1 +1 @@
1
- import{j as t,r as d}from"./iframe-DfPay7Zl.js";import{c as B,g as F}from"./store-Ce3Ikv5g.js";import{u as p}from"./index-EGt7xBnA.js";import{T as b}from"./typography-CB8hPDyK.js";const g=({fill:n="white",...l})=>t.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...l,children:t.jsx("path",{d:"M5.11112 12.4445H5.10934C4.90756 12.4445 4.71645 12.352 4.59112 12.1947L1.03556 7.75026C0.805341 7.46226 0.851563 7.04359 1.13956 6.81337C1.42845 6.58315 1.84712 6.63026 2.07645 6.91737L5.11467 10.7147L12.1485 2.02492C12.3805 1.7387 12.7991 1.69337 13.0862 1.92626C13.3725 2.15826 13.4169 2.57781 13.1849 2.86403L5.62934 12.1974C5.50223 12.3538 5.31201 12.4445 5.11112 12.4445Z",fill:n})});g.__docgenInfo={description:"",methods:[],displayName:"CheckIcon",props:{fill:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"'white'",computed:!1}}}};const x=({fill:n="white",...l})=>t.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...l,children:t.jsx("rect",{x:"2",y:"6.5",width:"11",height:"2",rx:"1",fill:n})});x.__docgenInfo={description:"",methods:[],displayName:"IndeterminateIcon",props:{fill:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"'white'",computed:!1}}}};const a=F("checkbox"),S=d.forwardRef((n,l)=>{const{disabled:r=!1,theme:C="brand",variant:s="default",className:N,style:k,checked:V,defaultChecked:L,onChange:R,number:T,defaultNumber:q,onNumberChange:z,children:m,typography:_,...h}=n,v=C||"brand",u=d.useRef(null),[w,i]=d.useState(!1),[f,j]=p(n,{valuePropName:"checked",defaultValuePropName:"defaultChecked",trigger:"onChange"}),[o,y]=p(n,{valuePropName:"number",defaultValuePropName:"defaultNumber",trigger:"onNumberChange"}),c=o!==void 0?!0:f;d.useImperativeHandle(l,()=>({focus:()=>u.current?.focus?.(),blur:()=>u.current?.blur?.()}));const $=e=>{if(e.preventDefault(),r)return;const P=o===void 0?1:o+1;y(P)},I=()=>s==="number"?t.jsx("input",{...h,type:"text",inputMode:"numeric",value:o??"",disabled:r,readOnly:!0,ref:u,className:`${a}__input`,onClick:e=>e.stopPropagation(),onFocus:e=>{i(!0),n.onFocus?.(e)},onBlur:e=>{i(!1),n.onBlur?.(e)}}):t.jsx("input",{...h,type:"checkbox",checked:f,disabled:r,onChange:e=>j(e.target.checked),ref:u,className:`${a}__input`,onFocus:e=>{i(!0),n.onFocus?.(e)},onBlur:e=>{i(!1),n.onBlur?.(e)}});return t.jsxs("label",{className:B(a,{[`${a}--checked`]:c,[`${a}--unchecked`]:!c,[`${a}--disabled`]:r,[`${a}--focus`]:w,[`${a}--theme-${v}`]:!0,[`${a}--variant-${s}`]:s!=="default"},N),style:k,onClick:s==="number"?$:void 0,children:[t.jsxs("span",{className:`${a}__button`,children:[t.jsx("span",{className:`${a}__overlay`}),c&&s==="number"&&o!==void 0?t.jsx(b,{component:"span",size:"x-small",weight:700,color:r?"alias-border-disabled":"alias-object-on-brand",className:`${a}__number`,children:o}):c&&s==="indeterminate"?t.jsx(x,{fill:r?"var(--color-alias-border-disabled, rgba(10, 10, 10, 0.25))":"white"}):c?t.jsx(g,{fill:r?"var(--color-alias-border-disabled, rgba(10, 10, 10, 0.25))":"white"}):null,I()]}),m&&t.jsx(b,{component:"span",..._,size:"base",children:m})]})});S.__docgenInfo={description:"",methods:[{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"blur",docblock:null,modifiers:[],params:[],returns:null}],displayName:"Checkbox"};export{S as C};
1
+ import{j as t,r as d}from"./iframe-C0PGuV5s.js";import{c as B,g as F}from"./store-BmYgrUro.js";import{u as p}from"./index-DWjPAWoJ.js";import{T as b}from"./typography-BcLxefPi.js";const g=({fill:n="white",...l})=>t.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...l,children:t.jsx("path",{d:"M5.11112 12.4445H5.10934C4.90756 12.4445 4.71645 12.352 4.59112 12.1947L1.03556 7.75026C0.805341 7.46226 0.851563 7.04359 1.13956 6.81337C1.42845 6.58315 1.84712 6.63026 2.07645 6.91737L5.11467 10.7147L12.1485 2.02492C12.3805 1.7387 12.7991 1.69337 13.0862 1.92626C13.3725 2.15826 13.4169 2.57781 13.1849 2.86403L5.62934 12.1974C5.50223 12.3538 5.31201 12.4445 5.11112 12.4445Z",fill:n})});g.__docgenInfo={description:"",methods:[],displayName:"CheckIcon",props:{fill:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"'white'",computed:!1}}}};const x=({fill:n="white",...l})=>t.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...l,children:t.jsx("rect",{x:"2",y:"6.5",width:"11",height:"2",rx:"1",fill:n})});x.__docgenInfo={description:"",methods:[],displayName:"IndeterminateIcon",props:{fill:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"'white'",computed:!1}}}};const a=F("checkbox"),S=d.forwardRef((n,l)=>{const{disabled:r=!1,theme:C="brand",variant:s="default",className:N,style:k,checked:V,defaultChecked:L,onChange:R,number:T,defaultNumber:q,onNumberChange:z,children:m,typography:_,...h}=n,v=C||"brand",u=d.useRef(null),[w,i]=d.useState(!1),[f,j]=p(n,{valuePropName:"checked",defaultValuePropName:"defaultChecked",trigger:"onChange"}),[o,y]=p(n,{valuePropName:"number",defaultValuePropName:"defaultNumber",trigger:"onNumberChange"}),c=o!==void 0?!0:f;d.useImperativeHandle(l,()=>({focus:()=>u.current?.focus?.(),blur:()=>u.current?.blur?.()}));const $=e=>{if(e.preventDefault(),r)return;const P=o===void 0?1:o+1;y(P)},I=()=>s==="number"?t.jsx("input",{...h,type:"text",inputMode:"numeric",value:o??"",disabled:r,readOnly:!0,ref:u,className:`${a}__input`,onClick:e=>e.stopPropagation(),onFocus:e=>{i(!0),n.onFocus?.(e)},onBlur:e=>{i(!1),n.onBlur?.(e)}}):t.jsx("input",{...h,type:"checkbox",checked:f,disabled:r,onChange:e=>j(e.target.checked),ref:u,className:`${a}__input`,onFocus:e=>{i(!0),n.onFocus?.(e)},onBlur:e=>{i(!1),n.onBlur?.(e)}});return t.jsxs("label",{className:B(a,{[`${a}--checked`]:c,[`${a}--unchecked`]:!c,[`${a}--disabled`]:r,[`${a}--focus`]:w,[`${a}--theme-${v}`]:!0,[`${a}--variant-${s}`]:s!=="default"},N),style:k,onClick:s==="number"?$:void 0,children:[t.jsxs("span",{className:`${a}__button`,children:[t.jsx("span",{className:`${a}__overlay`}),c&&s==="number"&&o!==void 0?t.jsx(b,{component:"span",size:"x-small",weight:700,color:r?"alias-border-disabled":"alias-object-on-brand",className:`${a}__number`,children:o}):c&&s==="indeterminate"?t.jsx(x,{fill:r?"var(--color-alias-border-disabled, rgba(10, 10, 10, 0.25))":"white"}):c?t.jsx(g,{fill:r?"var(--color-alias-border-disabled, rgba(10, 10, 10, 0.25))":"white"}):null,I()]}),m&&t.jsx(b,{component:"span",..._,size:"base",children:m})]})});S.__docgenInfo={description:"",methods:[{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"blur",docblock:null,modifiers:[],params:[],returns:null}],displayName:"Checkbox"};export{S as C};
@@ -1,4 +1,4 @@
1
- import{j as o,r as i}from"./iframe-DfPay7Zl.js";import{T as g,S as v,M as f,P as j,a as N}from"./blocks-DKR3P4qW.js";import{C as n}from"./checkbox-JOxcmyCZ.js";import{B as D}from"./button-DJH3RlJl.js";import{t as e}from"./store-Ce3Ikv5g.js";import"./preload-helper-PPVm8Dsz.js";import"./index-cMNObl2z.js";import"./index-EGt7xBnA.js";import"./index-B-Ksafg0.js";import"./typography-CB8hPDyK.js";import"./colors-_6nFGM3e.js";import"./icon-CdiFzFyf.js";const S=()=>{const t=`
1
+ import{j as o,r as i}from"./iframe-C0PGuV5s.js";import{T as g,S as v,M as f,P as j,a as N}from"./blocks-D4qvS4eZ.js";import{C as n}from"./checkbox-Bs8ghsWP.js";import{B as D}from"./button-CbLEqALK.js";import{t as e}from"./store-BmYgrUro.js";import"./preload-helper-PPVm8Dsz.js";import"./index-1AHvPexM.js";import"./index-DWjPAWoJ.js";import"./index-B-Ksafg0.js";import"./typography-BcLxefPi.js";import"./colors-_6nFGM3e.js";import"./icon-CgGksgRS.js";const S=()=>{const t=`
2
2
  ## ${e("common.table.title")}
3
3
 
4
4
  | ${e("common.table.name")} | ${e("common.table.type")} | ${e("common.table.required")} | ${e("common.table.description")} |
@@ -1 +1 @@
1
- import{r as $,j as i}from"./iframe-DfPay7Zl.js";import{c as x,g as w}from"./store-Ce3Ikv5g.js";import{I as N,r as y}from"./icon-CdiFzFyf.js";import"./app-CTv8lFU3.js";import"./navigation-bar-DK3TxcTu.js";import{T as C}from"./typography-CB8hPDyK.js";import"./button-DJH3RlJl.js";import"./bottom-tab-bar-B6IAoRwz.js";import"./carousel-DJlgMyS5.js";import"./pagination-Cp-DHO4Q.js";import"./sheet-footer-nEdxsYan.js";import"./dialog-BAfGQzk5.js";import"./section-content-D49PabBW.js";import"./option-item-CpeNcb5w.js";import{I}from"./image-CMKb-R3x.js";import"./visibility-sensor-Jf-Nmil6.js";import"./alert-CKwsuaPI.js";import"./skeleton-B12XbNAJ.js";import"./label-D44azUgi.js";import"./input-wrapper-CgaUwbbE.js";import"./text-field-CGWNqitB.js";import"./number-field-Bz7su9S1.js";import"./checkbox-JOxcmyCZ.js";import"./radio-D0aV0RIg.js";import"./date-field-range-B-sv9nbW.js";import"./search-field-DINESW8Y.js";import"./text-area-GKy5HL12.js";import"./dropdown-Dtomaqpw.js";import"./date-picker-BPzKPdhO.js";import"./avatar-rWcYGe6j.js";import{B as b}from"./badge-VcjGVEum.js";import"./switch-D0Z9tWin.js";import"./tab-bar-kExoGg5P.js";import"./rating-D2e8RTGl.js";import"./tooltip-B9rDI6z9.js";import"./calendar-C4Xe_TW2.js";import"./toast-provider-DKSrfhJD.js";import{u as F}from"./index-EGt7xBnA.js";const k=(e={})=>new Promise((r,a)=>{vsf.chooseImage({...e,success:s=>{r(s)},fail:s=>{a(s)}})});async function D(e){try{const{count:r=1}=e||{},a=await k({count:r,includeBase64:!0}),s=[];return(a.tempFiles||[]).forEach(m=>{if(!m.data)return;const f={tempFile:m};s.push(f)}),s}catch(r){return console.error("Failed to upload image",r),[]}}const d=w("uploader"),T=({limit:e,disabled:r,showPreview:a,className:s,includeBase64:c,value:m,onChange:f,...g})=>{const[h,n]=F({...m!==void 0&&{value:m},...f!==void 0&&{onChange:f}},{defaultValue:[],trigger:"onChange"}),_=$.useCallback(async()=>{if(r||e&&(h??[]).length>=e)return;const l=await D({includeBase64:c});n(u=>{const o=[...u??[]];return l.forEach(v=>{e&&o.length>=e||o.unshift(v)}),o})},[e,r,c,h,n]),p=$.useCallback(l=>{n(u=>{const o=[...u];return o.splice(l,1),o})},[n]);return i.jsxs("div",{...g,className:x(d,{[`${d}--disabled`]:r},s),children:[i.jsx("div",{className:`${d}__trigger`,onClick:_,children:i.jsx(N,{name:"plus",type:"outline",size:40,color:r?"alias-object-disabled":"global-neutral-neutral-50"})}),a&&i.jsx("div",{className:`${d}__preview-list`,children:[...h??[]].reverse().map((l,u)=>i.jsx(j,{previewSrc:l.tempFile.data,onDelete:()=>p(u)},l.tempFile.path))})]})},j=({previewSrc:e,onDelete:r})=>i.jsxs("div",{className:`${d}__preview-item`,children:[i.jsx(I,{className:`${d}__preview-image`,fit:"cover",src:e}),i.jsx("div",{className:`${d}__delete-button`,onClick:r,children:i.jsx(N,{name:"xmark",size:16,color:"white"})})]});T.__docgenInfo={description:"",methods:[],displayName:"Uploader"};j.__docgenInfo={description:"",methods:[],displayName:"FilePreview",props:{previewSrc:{required:!1,tsType:{name:"string"},description:""},onDelete:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""}}};const t=w("chip"),q=({theme:e="default",type:r="selection",leadingIcon:a,trailingIcon:s,selected:c,label:m,style:f,className:g,disabled:h,count:n,..._})=>{e=e==="default"?"brand":e;const p=(o,v)=>o?i.jsx("span",{className:x(`${t}__icon`,v),children:y(o)}):null,l=()=>{if(a)return p(a,`${t}__icon--leading`);switch(r){case"selection":return c?p({name:"circle-check",type:"fill"},`${t}__icon--leading`):null;default:return null}},u=()=>{if(s)return p(s,`${t}__icon--trailing`);switch(r){case"dropdown":return p({name:"chevron-down"},`${t}__icon--trailing`);case"input":return c?p({name:"xmark"},`${t}__icon--trailing`):null;case"action":return n==null?null:i.jsx(b,{outline:!0,className:`${t}__badge`,children:n});default:return null}};return i.jsxs("div",{className:x(t,{[`${t}--${c?"selected":""}`]:!0,[`${t}--theme-${e}`]:!0,[`${t}--type-${r}`]:!0,[`${t}--disabled`]:h},g),onClick:_.onClick,..._,children:[i.jsx("span",{className:`${t}__overlay`}),l(),i.jsx(C,{component:"span",size:"base",weight:400,className:`${t}__label`,children:m||_.children}),u()]})};q.__docgenInfo={description:"",methods:[],displayName:"Chip",props:{theme:{defaultValue:{value:"'default'",computed:!1},required:!1},type:{defaultValue:{value:"'selection'",computed:!1},required:!1}}};export{q as C,T as U};
1
+ import{r as $,j as i}from"./iframe-C0PGuV5s.js";import{c as x,g as w}from"./store-BmYgrUro.js";import{I as N,r as y}from"./icon-CgGksgRS.js";import"./app-B__CxZQv.js";import"./navigation-bar-TpF0DSXB.js";import{T as C}from"./typography-BcLxefPi.js";import"./button-CbLEqALK.js";import"./bottom-tab-bar-UaYvPAic.js";import"./carousel-C1nQGnJZ.js";import"./pagination-MBP1YLhT.js";import"./sheet-footer-BL2JAvmb.js";import"./dialog-8K5u-kre.js";import"./section-content-dVOJuOaN.js";import"./option-item-Bmby544G.js";import{I}from"./image-BdsCB1je.js";import"./visibility-sensor-FN9n9CLs.js";import"./alert-D3VdqAYm.js";import"./skeleton-CmGRbWqE.js";import"./label-CHVpMhb5.js";import"./input-wrapper-DkEl0Eih.js";import"./text-field-DrODy0yz.js";import"./number-field-CvCF5adO.js";import"./checkbox-Bs8ghsWP.js";import"./radio-DRPO7cjx.js";import"./date-field-range-DSAQp9qR.js";import"./search-field-CophTGGH.js";import"./text-area-WRb8Dkvn.js";import"./dropdown-BeoO7m-R.js";import"./date-picker--PiU9sOL.js";import"./avatar-BVV1WSnD.js";import{B as b}from"./badge-DLt8CmDs.js";import"./switch-Cc-NvT4X.js";import"./tab-bar-DTyg7tFP.js";import"./rating-CTv8C1tH.js";import"./tooltip-CrxOWTXS.js";import"./calendar-C7tiySn0.js";import"./toast-provider-ChNGFQlt.js";import{u as F}from"./index-DWjPAWoJ.js";const k=(e={})=>new Promise((r,a)=>{vsf.chooseImage({...e,success:s=>{r(s)},fail:s=>{a(s)}})});async function D(e){try{const{count:r=1}=e||{},a=await k({count:r,includeBase64:!0}),s=[];return(a.tempFiles||[]).forEach(m=>{if(!m.data)return;const f={tempFile:m};s.push(f)}),s}catch(r){return console.error("Failed to upload image",r),[]}}const d=w("uploader"),T=({limit:e,disabled:r,showPreview:a,className:s,includeBase64:c,value:m,onChange:f,...g})=>{const[h,n]=F({...m!==void 0&&{value:m},...f!==void 0&&{onChange:f}},{defaultValue:[],trigger:"onChange"}),_=$.useCallback(async()=>{if(r||e&&(h??[]).length>=e)return;const l=await D({includeBase64:c});n(u=>{const o=[...u??[]];return l.forEach(v=>{e&&o.length>=e||o.unshift(v)}),o})},[e,r,c,h,n]),p=$.useCallback(l=>{n(u=>{const o=[...u];return o.splice(l,1),o})},[n]);return i.jsxs("div",{...g,className:x(d,{[`${d}--disabled`]:r},s),children:[i.jsx("div",{className:`${d}__trigger`,onClick:_,children:i.jsx(N,{name:"plus",type:"outline",size:40,color:r?"alias-object-disabled":"global-neutral-neutral-50"})}),a&&i.jsx("div",{className:`${d}__preview-list`,children:[...h??[]].reverse().map((l,u)=>i.jsx(j,{previewSrc:l.tempFile.data,onDelete:()=>p(u)},l.tempFile.path))})]})},j=({previewSrc:e,onDelete:r})=>i.jsxs("div",{className:`${d}__preview-item`,children:[i.jsx(I,{className:`${d}__preview-image`,fit:"cover",src:e}),i.jsx("div",{className:`${d}__delete-button`,onClick:r,children:i.jsx(N,{name:"xmark",size:16,color:"white"})})]});T.__docgenInfo={description:"",methods:[],displayName:"Uploader"};j.__docgenInfo={description:"",methods:[],displayName:"FilePreview",props:{previewSrc:{required:!1,tsType:{name:"string"},description:""},onDelete:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""}}};const t=w("chip"),q=({theme:e="default",type:r="selection",leadingIcon:a,trailingIcon:s,selected:c,label:m,style:f,className:g,disabled:h,count:n,..._})=>{e=e==="default"?"brand":e;const p=(o,v)=>o?i.jsx("span",{className:x(`${t}__icon`,v),children:y(o)}):null,l=()=>{if(a)return p(a,`${t}__icon--leading`);switch(r){case"selection":return c?p({name:"circle-check",type:"fill"},`${t}__icon--leading`):null;default:return null}},u=()=>{if(s)return p(s,`${t}__icon--trailing`);switch(r){case"dropdown":return p({name:"chevron-down"},`${t}__icon--trailing`);case"input":return c?p({name:"xmark"},`${t}__icon--trailing`):null;case"action":return n==null?null:i.jsx(b,{outline:!0,className:`${t}__badge`,children:n});default:return null}};return i.jsxs("div",{className:x(t,{[`${t}--${c?"selected":""}`]:!0,[`${t}--theme-${e}`]:!0,[`${t}--type-${r}`]:!0,[`${t}--disabled`]:h},g),onClick:_.onClick,..._,children:[i.jsx("span",{className:`${t}__overlay`}),l(),i.jsx(C,{component:"span",size:"base",weight:400,className:`${t}__label`,children:m||_.children}),u()]})};q.__docgenInfo={description:"",methods:[],displayName:"Chip",props:{theme:{defaultValue:{value:"'default'",computed:!1},required:!1},type:{defaultValue:{value:"'selection'",computed:!1},required:!1}}};export{q as C,T as U};
@@ -1,4 +1,4 @@
1
- import{j as t,r as g}from"./iframe-DfPay7Zl.js";import{T as j,S as b,M as u,P as w,a as I}from"./blocks-DKR3P4qW.js";import{C as s}from"./chip-Crt60rph.js";import{t as e}from"./store-Ce3Ikv5g.js";import"./preload-helper-PPVm8Dsz.js";import"./index-cMNObl2z.js";import"./icon-CdiFzFyf.js";import"./colors-_6nFGM3e.js";import"./app-CTv8lFU3.js";import"./index-BWpuenI4.js";import"./react-I9jCW2VV.js";import"./button-DJH3RlJl.js";import"./typography-CB8hPDyK.js";import"./image-CMKb-R3x.js";import"./visibility-sensor-Jf-Nmil6.js";import"./index-B-Ksafg0.js";import"./toast-provider-DKSrfhJD.js";import"./proxy-B4G9nIBd.js";import"./navigation-bar-DK3TxcTu.js";import"./_baseClone-DQVxEhny.js";import"./bottom-tab-bar-B6IAoRwz.js";import"./carousel-DJlgMyS5.js";import"./embla-carousel-react.esm-5D5fs7OQ.js";import"./pagination-Cp-DHO4Q.js";import"./sheet-footer-nEdxsYan.js";import"./dialog-BAfGQzk5.js";import"./section-content-D49PabBW.js";import"./option-item-CpeNcb5w.js";import"./index-EGt7xBnA.js";import"./alert-CKwsuaPI.js";import"./skeleton-B12XbNAJ.js";import"./label-D44azUgi.js";import"./input-wrapper-CgaUwbbE.js";import"./omit-BWHsnDSR.js";import"./text-field-CGWNqitB.js";import"./number-field-Bz7su9S1.js";import"./checkbox-JOxcmyCZ.js";import"./radio-D0aV0RIg.js";import"./date-field-range-B-sv9nbW.js";import"./calendar-C4Xe_TW2.js";import"./date-B3PFMb6s.js";import"./date-picker-BPzKPdhO.js";import"./search-field-DINESW8Y.js";import"./text-area-GKy5HL12.js";import"./dropdown-Dtomaqpw.js";import"./avatar-rWcYGe6j.js";import"./badge-VcjGVEum.js";import"./switch-D0Z9tWin.js";import"./tab-bar-kExoGg5P.js";import"./rating-D2e8RTGl.js";import"./tooltip-B9rDI6z9.js";const S=()=>{const i=`
1
+ import{j as t,r as g}from"./iframe-C0PGuV5s.js";import{T as j,S as b,M as u,P as w,a as I}from"./blocks-D4qvS4eZ.js";import{C as s}from"./chip-D4_ukvFv.js";import{t as e}from"./store-BmYgrUro.js";import"./preload-helper-PPVm8Dsz.js";import"./index-1AHvPexM.js";import"./icon-CgGksgRS.js";import"./colors-_6nFGM3e.js";import"./app-B__CxZQv.js";import"./index-BLzgbpm2.js";import"./react-zqqxT5R_.js";import"./button-CbLEqALK.js";import"./typography-BcLxefPi.js";import"./image-BdsCB1je.js";import"./visibility-sensor-FN9n9CLs.js";import"./index-B-Ksafg0.js";import"./toast-provider-ChNGFQlt.js";import"./proxy-edvPwIiD.js";import"./navigation-bar-TpF0DSXB.js";import"./_baseClone-4nOrhHpR.js";import"./bottom-tab-bar-UaYvPAic.js";import"./carousel-C1nQGnJZ.js";import"./embla-carousel-react.esm-Pp2OIUrN.js";import"./pagination-MBP1YLhT.js";import"./sheet-footer-BL2JAvmb.js";import"./dialog-8K5u-kre.js";import"./section-content-dVOJuOaN.js";import"./option-item-Bmby544G.js";import"./index-DWjPAWoJ.js";import"./alert-D3VdqAYm.js";import"./skeleton-CmGRbWqE.js";import"./label-CHVpMhb5.js";import"./input-wrapper-DkEl0Eih.js";import"./omit-D04qL5V_.js";import"./text-field-DrODy0yz.js";import"./number-field-CvCF5adO.js";import"./checkbox-Bs8ghsWP.js";import"./radio-DRPO7cjx.js";import"./date-field-range-DSAQp9qR.js";import"./calendar-C7tiySn0.js";import"./date-C1W0DfQy.js";import"./date-picker--PiU9sOL.js";import"./search-field-CophTGGH.js";import"./text-area-WRb8Dkvn.js";import"./dropdown-BeoO7m-R.js";import"./avatar-BVV1WSnD.js";import"./badge-DLt8CmDs.js";import"./switch-Cc-NvT4X.js";import"./tab-bar-DTyg7tFP.js";import"./rating-CTv8C1tH.js";import"./tooltip-CrxOWTXS.js";const S=()=>{const i=`
2
2
  ## ${e("common.table.title")}
3
3
 
4
4
  | ${e("common.table.name")} | ${e("common.table.type")} | ${e("common.table.required")} | ${e("common.table.description")} |
@@ -1 +1 @@
1
- import{g as J}from"./iframe-DfPay7Zl.js";var q={exports:{}},st=q.exports,Q;function it(){return Q||(Q=1,(function(j,Z){(function(g,l){j.exports=l()})(st,(function(){var g=1e3,l=6e4,S=36e5,v="millisecond",_="second",b="minute",k="hour",y="day",B="week",p="month",z="quarter",M="year",A="date",R="Invalid Date",tt=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,et=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,rt={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(s){var r=["th","st","nd","rd"],t=s%100;return"["+s+(r[(t-20)%10]||r[t]||r[0])+"]"}},N=function(s,r,t){var n=String(s);return!n||n.length>=r?s:""+Array(r+1-n.length).join(t)+s},nt={s:N,z:function(s){var r=-s.utcOffset(),t=Math.abs(r),n=Math.floor(t/60),e=t%60;return(r<=0?"+":"-")+N(n,2,"0")+":"+N(e,2,"0")},m:function s(r,t){if(r.date()<t.date())return-s(t,r);var n=12*(t.year()-r.year())+(t.month()-r.month()),e=r.clone().add(n,p),i=t-e<0,u=r.clone().add(n+(i?-1:1),p);return+(-(n+(t-e)/(i?e-u:u-e))||0)},a:function(s){return s<0?Math.ceil(s)||0:Math.floor(s)},p:function(s){return{M:p,y:M,w:B,d:y,D:A,h:k,m:b,s:_,ms:v,Q:z}[s]||String(s||"").toLowerCase().replace(/s$/,"")},u:function(s){return s===void 0}},H="en",O={};O[H]=rt;var V="$isDayjsObject",U=function(s){return s instanceof L||!(!s||!s[V])},C=function s(r,t,n){var e;if(!r)return H;if(typeof r=="string"){var i=r.toLowerCase();O[i]&&(e=i),t&&(O[i]=t,e=i);var u=r.split("-");if(!e&&u.length>1)return s(u[0])}else{var o=r.name;O[o]=r,e=o}return!n&&e&&(H=e),e||!n&&H},f=function(s,r){if(U(s))return s.clone();var t=typeof r=="object"?r:{};return t.date=s,t.args=arguments,new L(t)},a=nt;a.l=C,a.i=U,a.w=function(s,r){return f(s,{locale:r.$L,utc:r.$u,x:r.$x,$offset:r.$offset})};var L=(function(){function s(t){this.$L=C(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[V]=!0}var r=s.prototype;return r.parse=function(t){this.$d=(function(n){var e=n.date,i=n.utc;if(e===null)return new Date(NaN);if(a.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var u=e.match(tt);if(u){var o=u[2]-1||0,c=(u[7]||"0").substring(0,3);return i?new Date(Date.UTC(u[1],o,u[3]||1,u[4]||0,u[5]||0,u[6]||0,c)):new Date(u[1],o,u[3]||1,u[4]||0,u[5]||0,u[6]||0,c)}}return new Date(e)})(t),this.init()},r.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},r.$utils=function(){return a},r.isValid=function(){return this.$d.toString()!==R},r.isSame=function(t,n){var e=f(t);return this.startOf(n)<=e&&e<=this.endOf(n)},r.isAfter=function(t,n){return f(t)<this.startOf(n)},r.isBefore=function(t,n){return this.endOf(n)<f(t)},r.$g=function(t,n,e){return a.u(t)?this[n]:this.set(e,t)},r.unix=function(){return Math.floor(this.valueOf()/1e3)},r.valueOf=function(){return this.$d.getTime()},r.startOf=function(t,n){var e=this,i=!!a.u(n)||n,u=a.p(t),o=function(w,$){var D=a.w(e.$u?Date.UTC(e.$y,$,w):new Date(e.$y,$,w),e);return i?D:D.endOf(y)},c=function(w,$){return a.w(e.toDate()[w].apply(e.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice($)),e)},h=this.$W,d=this.$M,m=this.$D,Y="set"+(this.$u?"UTC":"");switch(u){case M:return i?o(1,0):o(31,11);case p:return i?o(1,d):o(0,d+1);case B:var x=this.$locale().weekStart||0,T=(h<x?h+7:h)-x;return o(i?m-T:m+(6-T),d);case y:case A:return c(Y+"Hours",0);case k:return c(Y+"Minutes",1);case b:return c(Y+"Seconds",2);case _:return c(Y+"Milliseconds",3);default:return this.clone()}},r.endOf=function(t){return this.startOf(t,!1)},r.$set=function(t,n){var e,i=a.p(t),u="set"+(this.$u?"UTC":""),o=(e={},e[y]=u+"Date",e[A]=u+"Date",e[p]=u+"Month",e[M]=u+"FullYear",e[k]=u+"Hours",e[b]=u+"Minutes",e[_]=u+"Seconds",e[v]=u+"Milliseconds",e)[i],c=i===y?this.$D+(n-this.$W):n;if(i===p||i===M){var h=this.clone().set(A,1);h.$d[o](c),h.init(),this.$d=h.set(A,Math.min(this.$D,h.daysInMonth())).$d}else o&&this.$d[o](c);return this.init(),this},r.set=function(t,n){return this.clone().$set(t,n)},r.get=function(t){return this[a.p(t)]()},r.add=function(t,n){var e,i=this;t=Number(t);var u=a.p(n),o=function(d){var m=f(i);return a.w(m.date(m.date()+Math.round(d*t)),i)};if(u===p)return this.set(p,this.$M+t);if(u===M)return this.set(M,this.$y+t);if(u===y)return o(1);if(u===B)return o(7);var c=(e={},e[b]=l,e[k]=S,e[_]=g,e)[u]||1,h=this.$d.getTime()+t*c;return a.w(h,this)},r.subtract=function(t,n){return this.add(-1*t,n)},r.format=function(t){var n=this,e=this.$locale();if(!this.isValid())return e.invalidDate||R;var i=t||"YYYY-MM-DDTHH:mm:ssZ",u=a.z(this),o=this.$H,c=this.$m,h=this.$M,d=e.weekdays,m=e.months,Y=e.meridiem,x=function($,D,I,W){return $&&($[D]||$(n,i))||I[D].slice(0,W)},T=function($){return a.s(o%12||12,$,"0")},w=Y||function($,D,I){var W=$<12?"AM":"PM";return I?W.toLowerCase():W};return i.replace(et,(function($,D){return D||(function(I){switch(I){case"YY":return String(n.$y).slice(-2);case"YYYY":return a.s(n.$y,4,"0");case"M":return h+1;case"MM":return a.s(h+1,2,"0");case"MMM":return x(e.monthsShort,h,m,3);case"MMMM":return x(m,h);case"D":return n.$D;case"DD":return a.s(n.$D,2,"0");case"d":return String(n.$W);case"dd":return x(e.weekdaysMin,n.$W,d,2);case"ddd":return x(e.weekdaysShort,n.$W,d,3);case"dddd":return d[n.$W];case"H":return String(o);case"HH":return a.s(o,2,"0");case"h":return T(1);case"hh":return T(2);case"a":return w(o,c,!0);case"A":return w(o,c,!1);case"m":return String(c);case"mm":return a.s(c,2,"0");case"s":return String(n.$s);case"ss":return a.s(n.$s,2,"0");case"SSS":return a.s(n.$ms,3,"0");case"Z":return u}return null})($)||u.replace(":","")}))},r.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},r.diff=function(t,n,e){var i,u=this,o=a.p(n),c=f(t),h=(c.utcOffset()-this.utcOffset())*l,d=this-c,m=function(){return a.m(u,c)};switch(o){case M:i=m()/12;break;case p:i=m();break;case z:i=m()/3;break;case B:i=(d-h)/6048e5;break;case y:i=(d-h)/864e5;break;case k:i=d/S;break;case b:i=d/l;break;case _:i=d/g;break;default:i=d}return e?i:a.a(i)},r.daysInMonth=function(){return this.endOf(p).$D},r.$locale=function(){return O[this.$L]},r.locale=function(t,n){if(!t)return this.$L;var e=this.clone(),i=C(t,n,!0);return i&&(e.$L=i),e},r.clone=function(){return a.w(this.$d,this)},r.toDate=function(){return new Date(this.valueOf())},r.toJSON=function(){return this.isValid()?this.toISOString():null},r.toISOString=function(){return this.$d.toISOString()},r.toString=function(){return this.$d.toUTCString()},s})(),P=L.prototype;return f.prototype=P,[["$ms",v],["$s",_],["$m",b],["$H",k],["$W",y],["$M",p],["$y",M],["$D",A]].forEach((function(s){P[s[1]]=function(r){return this.$g(r,s[0],s[1])}})),f.extend=function(s,r){return s.$i||(s(r,L,f),s.$i=!0),f},f.locale=C,f.isDayjs=U,f.unix=function(s){return f(1e3*s)},f.en=O[H],f.Ls=O,f.p={},f}))})(q)),q.exports}var ut=it();const X=J(ut);var E={exports:{}},at=E.exports,G;function ot(){return G||(G=1,(function(j,Z){(function(g,l){j.exports=l()})(at,(function(){return function(g,l){l.prototype.isSameOrAfter=function(S,v){return this.isSame(S,v)||this.isAfter(S,v)}}}))})(E)),E.exports}var ct=ot();const ft=J(ct);var F={exports:{}},ht=F.exports,K;function dt(){return K||(K=1,(function(j,Z){(function(g,l){j.exports=l()})(ht,(function(){return function(g,l){l.prototype.isSameOrBefore=function(S,v){return this.isSame(S,v)||this.isBefore(S,v)}}}))})(F)),F.exports}var $t=dt();const lt=J($t);X.extend(ft);X.extend(lt);export{X as d};
1
+ import{g as J}from"./iframe-C0PGuV5s.js";var q={exports:{}},st=q.exports,Q;function it(){return Q||(Q=1,(function(j,Z){(function(g,l){j.exports=l()})(st,(function(){var g=1e3,l=6e4,S=36e5,v="millisecond",_="second",b="minute",k="hour",y="day",B="week",p="month",z="quarter",M="year",A="date",R="Invalid Date",tt=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,et=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,rt={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(s){var r=["th","st","nd","rd"],t=s%100;return"["+s+(r[(t-20)%10]||r[t]||r[0])+"]"}},N=function(s,r,t){var n=String(s);return!n||n.length>=r?s:""+Array(r+1-n.length).join(t)+s},nt={s:N,z:function(s){var r=-s.utcOffset(),t=Math.abs(r),n=Math.floor(t/60),e=t%60;return(r<=0?"+":"-")+N(n,2,"0")+":"+N(e,2,"0")},m:function s(r,t){if(r.date()<t.date())return-s(t,r);var n=12*(t.year()-r.year())+(t.month()-r.month()),e=r.clone().add(n,p),i=t-e<0,u=r.clone().add(n+(i?-1:1),p);return+(-(n+(t-e)/(i?e-u:u-e))||0)},a:function(s){return s<0?Math.ceil(s)||0:Math.floor(s)},p:function(s){return{M:p,y:M,w:B,d:y,D:A,h:k,m:b,s:_,ms:v,Q:z}[s]||String(s||"").toLowerCase().replace(/s$/,"")},u:function(s){return s===void 0}},H="en",O={};O[H]=rt;var V="$isDayjsObject",U=function(s){return s instanceof L||!(!s||!s[V])},C=function s(r,t,n){var e;if(!r)return H;if(typeof r=="string"){var i=r.toLowerCase();O[i]&&(e=i),t&&(O[i]=t,e=i);var u=r.split("-");if(!e&&u.length>1)return s(u[0])}else{var o=r.name;O[o]=r,e=o}return!n&&e&&(H=e),e||!n&&H},f=function(s,r){if(U(s))return s.clone();var t=typeof r=="object"?r:{};return t.date=s,t.args=arguments,new L(t)},a=nt;a.l=C,a.i=U,a.w=function(s,r){return f(s,{locale:r.$L,utc:r.$u,x:r.$x,$offset:r.$offset})};var L=(function(){function s(t){this.$L=C(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[V]=!0}var r=s.prototype;return r.parse=function(t){this.$d=(function(n){var e=n.date,i=n.utc;if(e===null)return new Date(NaN);if(a.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var u=e.match(tt);if(u){var o=u[2]-1||0,c=(u[7]||"0").substring(0,3);return i?new Date(Date.UTC(u[1],o,u[3]||1,u[4]||0,u[5]||0,u[6]||0,c)):new Date(u[1],o,u[3]||1,u[4]||0,u[5]||0,u[6]||0,c)}}return new Date(e)})(t),this.init()},r.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},r.$utils=function(){return a},r.isValid=function(){return this.$d.toString()!==R},r.isSame=function(t,n){var e=f(t);return this.startOf(n)<=e&&e<=this.endOf(n)},r.isAfter=function(t,n){return f(t)<this.startOf(n)},r.isBefore=function(t,n){return this.endOf(n)<f(t)},r.$g=function(t,n,e){return a.u(t)?this[n]:this.set(e,t)},r.unix=function(){return Math.floor(this.valueOf()/1e3)},r.valueOf=function(){return this.$d.getTime()},r.startOf=function(t,n){var e=this,i=!!a.u(n)||n,u=a.p(t),o=function(w,$){var D=a.w(e.$u?Date.UTC(e.$y,$,w):new Date(e.$y,$,w),e);return i?D:D.endOf(y)},c=function(w,$){return a.w(e.toDate()[w].apply(e.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice($)),e)},h=this.$W,d=this.$M,m=this.$D,Y="set"+(this.$u?"UTC":"");switch(u){case M:return i?o(1,0):o(31,11);case p:return i?o(1,d):o(0,d+1);case B:var x=this.$locale().weekStart||0,T=(h<x?h+7:h)-x;return o(i?m-T:m+(6-T),d);case y:case A:return c(Y+"Hours",0);case k:return c(Y+"Minutes",1);case b:return c(Y+"Seconds",2);case _:return c(Y+"Milliseconds",3);default:return this.clone()}},r.endOf=function(t){return this.startOf(t,!1)},r.$set=function(t,n){var e,i=a.p(t),u="set"+(this.$u?"UTC":""),o=(e={},e[y]=u+"Date",e[A]=u+"Date",e[p]=u+"Month",e[M]=u+"FullYear",e[k]=u+"Hours",e[b]=u+"Minutes",e[_]=u+"Seconds",e[v]=u+"Milliseconds",e)[i],c=i===y?this.$D+(n-this.$W):n;if(i===p||i===M){var h=this.clone().set(A,1);h.$d[o](c),h.init(),this.$d=h.set(A,Math.min(this.$D,h.daysInMonth())).$d}else o&&this.$d[o](c);return this.init(),this},r.set=function(t,n){return this.clone().$set(t,n)},r.get=function(t){return this[a.p(t)]()},r.add=function(t,n){var e,i=this;t=Number(t);var u=a.p(n),o=function(d){var m=f(i);return a.w(m.date(m.date()+Math.round(d*t)),i)};if(u===p)return this.set(p,this.$M+t);if(u===M)return this.set(M,this.$y+t);if(u===y)return o(1);if(u===B)return o(7);var c=(e={},e[b]=l,e[k]=S,e[_]=g,e)[u]||1,h=this.$d.getTime()+t*c;return a.w(h,this)},r.subtract=function(t,n){return this.add(-1*t,n)},r.format=function(t){var n=this,e=this.$locale();if(!this.isValid())return e.invalidDate||R;var i=t||"YYYY-MM-DDTHH:mm:ssZ",u=a.z(this),o=this.$H,c=this.$m,h=this.$M,d=e.weekdays,m=e.months,Y=e.meridiem,x=function($,D,I,W){return $&&($[D]||$(n,i))||I[D].slice(0,W)},T=function($){return a.s(o%12||12,$,"0")},w=Y||function($,D,I){var W=$<12?"AM":"PM";return I?W.toLowerCase():W};return i.replace(et,(function($,D){return D||(function(I){switch(I){case"YY":return String(n.$y).slice(-2);case"YYYY":return a.s(n.$y,4,"0");case"M":return h+1;case"MM":return a.s(h+1,2,"0");case"MMM":return x(e.monthsShort,h,m,3);case"MMMM":return x(m,h);case"D":return n.$D;case"DD":return a.s(n.$D,2,"0");case"d":return String(n.$W);case"dd":return x(e.weekdaysMin,n.$W,d,2);case"ddd":return x(e.weekdaysShort,n.$W,d,3);case"dddd":return d[n.$W];case"H":return String(o);case"HH":return a.s(o,2,"0");case"h":return T(1);case"hh":return T(2);case"a":return w(o,c,!0);case"A":return w(o,c,!1);case"m":return String(c);case"mm":return a.s(c,2,"0");case"s":return String(n.$s);case"ss":return a.s(n.$s,2,"0");case"SSS":return a.s(n.$ms,3,"0");case"Z":return u}return null})($)||u.replace(":","")}))},r.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},r.diff=function(t,n,e){var i,u=this,o=a.p(n),c=f(t),h=(c.utcOffset()-this.utcOffset())*l,d=this-c,m=function(){return a.m(u,c)};switch(o){case M:i=m()/12;break;case p:i=m();break;case z:i=m()/3;break;case B:i=(d-h)/6048e5;break;case y:i=(d-h)/864e5;break;case k:i=d/S;break;case b:i=d/l;break;case _:i=d/g;break;default:i=d}return e?i:a.a(i)},r.daysInMonth=function(){return this.endOf(p).$D},r.$locale=function(){return O[this.$L]},r.locale=function(t,n){if(!t)return this.$L;var e=this.clone(),i=C(t,n,!0);return i&&(e.$L=i),e},r.clone=function(){return a.w(this.$d,this)},r.toDate=function(){return new Date(this.valueOf())},r.toJSON=function(){return this.isValid()?this.toISOString():null},r.toISOString=function(){return this.$d.toISOString()},r.toString=function(){return this.$d.toUTCString()},s})(),P=L.prototype;return f.prototype=P,[["$ms",v],["$s",_],["$m",b],["$H",k],["$W",y],["$M",p],["$y",M],["$D",A]].forEach((function(s){P[s[1]]=function(r){return this.$g(r,s[0],s[1])}})),f.extend=function(s,r){return s.$i||(s(r,L,f),s.$i=!0),f},f.locale=C,f.isDayjs=U,f.unix=function(s){return f(1e3*s)},f.en=O[H],f.Ls=O,f.p={},f}))})(q)),q.exports}var ut=it();const X=J(ut);var E={exports:{}},at=E.exports,G;function ot(){return G||(G=1,(function(j,Z){(function(g,l){j.exports=l()})(at,(function(){return function(g,l){l.prototype.isSameOrAfter=function(S,v){return this.isSame(S,v)||this.isAfter(S,v)}}}))})(E)),E.exports}var ct=ot();const ft=J(ct);var F={exports:{}},ht=F.exports,K;function dt(){return K||(K=1,(function(j,Z){(function(g,l){j.exports=l()})(ht,(function(){return function(g,l){l.prototype.isSameOrBefore=function(S,v){return this.isSame(S,v)||this.isBefore(S,v)}}}))})(F)),F.exports}var $t=dt();const lt=J($t);X.extend(ft);X.extend(lt);export{X as d};
@@ -1 +1 @@
1
- import{r,j as e}from"./iframe-DfPay7Zl.js";import{g as K,I as L}from"./input-wrapper-CgaUwbbE.js";import{c as y,g as k}from"./store-Ce3Ikv5g.js";import{S as N}from"./skeleton-B12XbNAJ.js";import{B as I}from"./button-DJH3RlJl.js";import{S as _,a as F,b as D,c as R}from"./sheet-footer-nEdxsYan.js";import{C as v}from"./calendar-C4Xe_TW2.js";import{u as z}from"./index-EGt7xBnA.js";import{d as H}from"./date-B3PFMb6s.js";import{I as X}from"./icon-CdiFzFyf.js";import{D as A}from"./date-picker-BPzKPdhO.js";import{o as w}from"./omit-BWHsnDSR.js";const W=k("date-field-input"),b=r.forwardRef((c,p)=>{const{value:l,onChange:n,onCompleted:a,defaultValue:i,...C}=c,h=l!==void 0,[x,u]=r.useState(()=>l?j(l):c.defaultValue?j(c.defaultValue):""),t=r.useRef(null),o=r.useRef("");return r.useImperativeHandle(p,()=>t.current),r.useEffect(()=>{l!==void 0&&u(j(l))},[l?.getTime()]),e.jsx("input",{inputMode:"numeric",...C,className:y(W,c.className),value:x,onChange:d=>{let f=d.target.selectionEnd||0;const g=P(d.target.value),s=o.current.length>d.target.value.length;if(o.current=g,s||[2,3,5,6].includes(f)&&(f+=1),u(g),setTimeout(()=>{d.target.setSelectionRange(f,f)}),g.length===10){const m=T(g);m&&a?.(m,f)}},onBlur:d=>{const f=P(d.target.value),g=T(f);h?(u(l?j(l):""),o.current="",n?.(g)):H(g).isValid()?(u(j(g)),n?.(g)):(u(""),o.current="",l!==null&&n?.(null)),c.onBlur?.(d)},ref:t})}),P=c=>{const p=c.replace(/\D/g,""),l=p.slice(0,2),n=p.slice(2,4),a=p.slice(4,8);let i="";return l&&(i+=l+(l.length===2?"/":"")),n&&(i+=n+(n.length===2?"/":"")),a&&(i+=a),i},j=c=>c?H(c).format("DD/MM/YYYY"):"",T=c=>{if(!c||c.length!==10)return null;const[p,l,n]=c.split("/");try{return new Date(parseInt(n),parseInt(l)-1,parseInt(p))}catch{return null}};b.__docgenInfo={description:"",methods:[],displayName:"Input"};const S=({title:c,confirmButton:p,open:l,onCancel:n,value:a,defaultValue:i,onSelect:C,...h})=>{const x=a!==void 0,[u,t]=r.useState(a||i||new Date),o=r.useCallback(()=>{x&&u.getTime()!==a?.getTime()&&t(a||new Date)},[x,u,a]);return r.useEffect(()=>{a===null&&t(new Date),a&&t(a)},[a?.getTime()]),e.jsxs(_,{open:l,children:[e.jsx(F,{title:c,closeIcon:!0,onCloseClick:()=>{n?.(),o()}}),e.jsx(D,{children:l&&e.jsx(A,{...h,value:u,onChange:t})}),e.jsx(R,{children:e.jsx(I,{size:"large",children:"Xác nhận",theme:"neutral",...p,onClick:()=>{C?.(u),o()}})})]})};S.__docgenInfo={description:"",methods:[],displayName:"DatePickerSheet"};const B=k("calendar-sheet"),O=({title:c,confirmButton:p,open:l,onCancel:n,value:a,defaultValue:i,onSelect:C,className:h,...x})=>{const u=a!==void 0,[t,o]=r.useState(a||i||null),d=r.useCallback(()=>{u&&t?.getTime()!==a?.getTime()&&o(a||null)},[u,t,a]);return r.useEffect(()=>{a===null&&o(null),a&&o(a)},[a?.getTime()]),e.jsxs(_,{open:l,className:y(B,h),children:[e.jsx(F,{title:c,closeIcon:!0,onCloseClick:()=>{n?.(),d()}}),e.jsx(D,{className:`${B}__body`,children:l&&e.jsx(v,{type:"single",...x,onChange:o,value:t})}),e.jsx(R,{children:e.jsx(I,{size:"large",children:"Xác nhận",theme:"neutral",...p,disabled:!t,onClick:()=>{t&&(C?.(t),d())}})})]})};O.__docgenInfo={description:"",methods:[],displayName:"CalendarSingleSheet"};const V=k("date-field"),q=r.forwardRef((c,p)=>{const{wrapper:l,props:n}=K(c),{picker:a="date-picker",onChange:i,value:C,defaultValue:h,pickerProps:x}=n,[u,t]=r.useState(n.autoFocus),[o,d]=z(n,{trigger:"onChange",valuePropName:"value",defaultValuePropName:"defaultValue",defaultValue:null}),f=r.useRef(null),[g,s]=r.useState(!1);return r.useImperativeHandle(p,()=>({focus:()=>f.current?.focus?.(),blur:()=>f.current?.blur?.()})),e.jsxs(e.Fragment,{children:[e.jsx(L,{trailingIcon:{name:"calendar",color:"alias-object-secondary"},onTrailingIconClick:m=>{m.stopPropagation(),s(!0)},...l,className:l.className,isFocus:u,onClick:()=>f.current?.focus(),loadingNode:n.loading&&e.jsxs("div",{className:`${V}__loading`,children:[e.jsxs("div",{className:`${V}__loading__left`,children:[e.jsx(N,{width:40,height:13,shape:"pill"}),e.jsx(N,{width:128,height:13,shape:"pill"})]}),e.jsx(N,{width:40,height:13,shape:"pill"})]}),children:e.jsx(b,{...n,value:o,onChange:d,disabled:l.disabled,onFocus:m=>{t(!0),n.onFocus?.(m)},onBlur:m=>{t(!1),n.onBlur?.(m)},ref:f,className:y(V,n.inputClassName)})}),a==="date-picker"&&e.jsx(S,{open:g,value:o,onSelect:m=>{s(!1),d(m)},onCancel:()=>s(!1),title:l.label?.text,...x}),a==="calendar"&&e.jsx(O,{open:g,value:o,onSelect:m=>{s(!1),d(m)},onCancel:()=>s(!1),title:l.label?.text,...x})]})});q.__docgenInfo={description:"",methods:[{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"blur",docblock:null,modifiers:[],params:[],returns:null}],displayName:"DateField"};const $=k("calendar-sheet"),Y=({className:c,title:p,confirmButton:l,open:n,onCancel:a,value:i,defaultValue:C,onSelect:h,...x})=>{const u=i!==void 0,[t,o]=r.useState(i||C||[null,null]),d=r.useCallback(()=>{u&&o(i||[null,null])},[u,i]);return r.useEffect(()=>{i===null&&o([null,null]),i&&o(i)},[i]),e.jsxs(_,{open:n,className:y($,c),children:[e.jsx(F,{title:p,closeIcon:!0,onCloseClick:()=>{a?.(),d()}}),e.jsx(D,{className:`${$}__body`,children:n&&e.jsx(v,{type:"range",...x,value:t,onPick:o})}),e.jsx(R,{children:e.jsx(I,{size:"large",children:"Xác nhận",theme:"neutral",...l,disabled:!t||t[0]===null||t[1]===null,onClick:()=>{h?.(t),d()}})})]})};Y.__docgenInfo={description:"",methods:[],displayName:"CalendarRangeSheet"};const E=k("date-field-range"),G=r.forwardRef((c,p)=>{const{wrapper:l,props:n}=K(c),{picker:a="date-picker",pickerProps:i}=n,[C,h]=r.useState(-1),[x,u]=r.useState(n.autoFocus),[t,o]=z(n,{trigger:"onChange",valuePropName:"value",defaultValuePropName:"defaultValue",defaultValue:{from:null,to:null}}),d=r.useRef(null),f=r.useRef(null),g=()=>{x||(t?.from?f.current?.focus?.():d.current?.focus?.())};return r.useImperativeHandle(p,()=>({focus:g,blur:()=>{d.current?.blur?.(),f.current?.blur?.()}})),e.jsxs(e.Fragment,{children:[e.jsx(L,{trailingIcon:{name:"calendar",color:"alias-object-secondary"},onTrailingIconClick:s=>{s.stopPropagation(),h(0)},...l,className:l.className,isFocus:x,onClick:()=>g(),loadingNode:n.loading&&e.jsxs("div",{className:`${E}__loading`,children:[e.jsx(N,{width:128,height:13,shape:"pill"}),e.jsx(N,{width:128,height:13,shape:"pill"})]}),children:e.jsxs("div",{className:E,children:[e.jsx(b,{...w(n,["value","onChange","defaultValue"]),placeholder:n.placeholder?.from,value:t?.from,onChange:s=>o({...t,from:s}),onCompleted:(s,m)=>{m<10||(f.current?.focus?.(),f.current?.setSelectionRange(0,0))},disabled:l.disabled,onKeyDown:s=>{const m=s.key==="ArrowRight";d.current?.selectionStart===10&&m&&(f.current?.focus(),f.current?.setSelectionRange(0,0)),n.onKeyDown?.(s)},onFocus:s=>{u(!0),n.onFocus?.(s)},onBlur:s=>{u(!1),n.onBlur?.(s)},ref:d,className:n.inputClassName}),e.jsx(X,{name:"arrow-right",color:l.error?"alias-support-negative":l.success?"alias-support-positive":"alias-object-secondary",size:16}),e.jsx(b,{...w(n,["value","onChange","defaultValue"]),placeholder:n.placeholder?.to,value:t?.to,onChange:s=>o({...t,to:s}),disabled:l.disabled,onKeyDown:s=>{const m=s.key==="Delete",M=s.key==="ArrowLeft";f.current?.selectionStart===0&&(m||M)&&d.current?.focus(),n.onKeyDown?.(s)},onFocus:s=>{u(!0),n.onFocus?.(s)},onBlur:s=>{u(!1),n.onBlur?.(s)},ref:f,className:n.inputClassName})]})}),a==="date-picker"&&e.jsxs(e.Fragment,{children:[e.jsx(S,{open:C===0,value:t?.from,onSelect:s=>{h(1),o({...t,from:s})},onCancel:()=>h(-1),title:e.jsxs(e.Fragment,{children:[l.label?.text," từ ngày"]}),...i?.[0]}),e.jsx(S,{open:C===1,value:t?.to,onSelect:s=>{h(-1),o({...t,to:s})},min:t?.from,onCancel:()=>h(-1),title:e.jsxs(e.Fragment,{children:[l.label?.text," đến ngày"]}),...i?.[1]})]}),a==="calendar"&&e.jsx(Y,{open:C===0,value:[t?.from||null,t?.to||null],onSelect:s=>{h(-1),o({from:s[0],to:s[1]})},onCancel:()=>h(-1),title:e.jsx(e.Fragment,{children:l.label?.text}),...i})]})});G.__docgenInfo={description:"",methods:[{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"blur",docblock:null,modifiers:[],params:[],returns:null}],displayName:"DateFieldRange"};export{q as D,G as a};
1
+ import{r,j as e}from"./iframe-C0PGuV5s.js";import{g as K,I as L}from"./input-wrapper-DkEl0Eih.js";import{c as y,g as k}from"./store-BmYgrUro.js";import{S as N}from"./skeleton-CmGRbWqE.js";import{B as I}from"./button-CbLEqALK.js";import{S as _,a as F,b as D,c as R}from"./sheet-footer-BL2JAvmb.js";import{C as v}from"./calendar-C7tiySn0.js";import{u as z}from"./index-DWjPAWoJ.js";import{d as H}from"./date-C1W0DfQy.js";import{I as X}from"./icon-CgGksgRS.js";import{D as A}from"./date-picker--PiU9sOL.js";import{o as w}from"./omit-D04qL5V_.js";const W=k("date-field-input"),b=r.forwardRef((c,p)=>{const{value:l,onChange:n,onCompleted:a,defaultValue:i,...C}=c,h=l!==void 0,[x,u]=r.useState(()=>l?j(l):c.defaultValue?j(c.defaultValue):""),t=r.useRef(null),o=r.useRef("");return r.useImperativeHandle(p,()=>t.current),r.useEffect(()=>{l!==void 0&&u(j(l))},[l?.getTime()]),e.jsx("input",{inputMode:"numeric",...C,className:y(W,c.className),value:x,onChange:d=>{let f=d.target.selectionEnd||0;const g=P(d.target.value),s=o.current.length>d.target.value.length;if(o.current=g,s||[2,3,5,6].includes(f)&&(f+=1),u(g),setTimeout(()=>{d.target.setSelectionRange(f,f)}),g.length===10){const m=T(g);m&&a?.(m,f)}},onBlur:d=>{const f=P(d.target.value),g=T(f);h?(u(l?j(l):""),o.current="",n?.(g)):H(g).isValid()?(u(j(g)),n?.(g)):(u(""),o.current="",l!==null&&n?.(null)),c.onBlur?.(d)},ref:t})}),P=c=>{const p=c.replace(/\D/g,""),l=p.slice(0,2),n=p.slice(2,4),a=p.slice(4,8);let i="";return l&&(i+=l+(l.length===2?"/":"")),n&&(i+=n+(n.length===2?"/":"")),a&&(i+=a),i},j=c=>c?H(c).format("DD/MM/YYYY"):"",T=c=>{if(!c||c.length!==10)return null;const[p,l,n]=c.split("/");try{return new Date(parseInt(n),parseInt(l)-1,parseInt(p))}catch{return null}};b.__docgenInfo={description:"",methods:[],displayName:"Input"};const S=({title:c,confirmButton:p,open:l,onCancel:n,value:a,defaultValue:i,onSelect:C,...h})=>{const x=a!==void 0,[u,t]=r.useState(a||i||new Date),o=r.useCallback(()=>{x&&u.getTime()!==a?.getTime()&&t(a||new Date)},[x,u,a]);return r.useEffect(()=>{a===null&&t(new Date),a&&t(a)},[a?.getTime()]),e.jsxs(_,{open:l,children:[e.jsx(F,{title:c,closeIcon:!0,onCloseClick:()=>{n?.(),o()}}),e.jsx(D,{children:l&&e.jsx(A,{...h,value:u,onChange:t})}),e.jsx(R,{children:e.jsx(I,{size:"large",children:"Xác nhận",theme:"neutral",...p,onClick:()=>{C?.(u),o()}})})]})};S.__docgenInfo={description:"",methods:[],displayName:"DatePickerSheet"};const B=k("calendar-sheet"),O=({title:c,confirmButton:p,open:l,onCancel:n,value:a,defaultValue:i,onSelect:C,className:h,...x})=>{const u=a!==void 0,[t,o]=r.useState(a||i||null),d=r.useCallback(()=>{u&&t?.getTime()!==a?.getTime()&&o(a||null)},[u,t,a]);return r.useEffect(()=>{a===null&&o(null),a&&o(a)},[a?.getTime()]),e.jsxs(_,{open:l,className:y(B,h),children:[e.jsx(F,{title:c,closeIcon:!0,onCloseClick:()=>{n?.(),d()}}),e.jsx(D,{className:`${B}__body`,children:l&&e.jsx(v,{type:"single",...x,onChange:o,value:t})}),e.jsx(R,{children:e.jsx(I,{size:"large",children:"Xác nhận",theme:"neutral",...p,disabled:!t,onClick:()=>{t&&(C?.(t),d())}})})]})};O.__docgenInfo={description:"",methods:[],displayName:"CalendarSingleSheet"};const V=k("date-field"),q=r.forwardRef((c,p)=>{const{wrapper:l,props:n}=K(c),{picker:a="date-picker",onChange:i,value:C,defaultValue:h,pickerProps:x}=n,[u,t]=r.useState(n.autoFocus),[o,d]=z(n,{trigger:"onChange",valuePropName:"value",defaultValuePropName:"defaultValue",defaultValue:null}),f=r.useRef(null),[g,s]=r.useState(!1);return r.useImperativeHandle(p,()=>({focus:()=>f.current?.focus?.(),blur:()=>f.current?.blur?.()})),e.jsxs(e.Fragment,{children:[e.jsx(L,{trailingIcon:{name:"calendar",color:"alias-object-secondary"},onTrailingIconClick:m=>{m.stopPropagation(),s(!0)},...l,className:l.className,isFocus:u,onClick:()=>f.current?.focus(),loadingNode:n.loading&&e.jsxs("div",{className:`${V}__loading`,children:[e.jsxs("div",{className:`${V}__loading__left`,children:[e.jsx(N,{width:40,height:13,shape:"pill"}),e.jsx(N,{width:128,height:13,shape:"pill"})]}),e.jsx(N,{width:40,height:13,shape:"pill"})]}),children:e.jsx(b,{...n,value:o,onChange:d,disabled:l.disabled,onFocus:m=>{t(!0),n.onFocus?.(m)},onBlur:m=>{t(!1),n.onBlur?.(m)},ref:f,className:y(V,n.inputClassName)})}),a==="date-picker"&&e.jsx(S,{open:g,value:o,onSelect:m=>{s(!1),d(m)},onCancel:()=>s(!1),title:l.label?.text,...x}),a==="calendar"&&e.jsx(O,{open:g,value:o,onSelect:m=>{s(!1),d(m)},onCancel:()=>s(!1),title:l.label?.text,...x})]})});q.__docgenInfo={description:"",methods:[{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"blur",docblock:null,modifiers:[],params:[],returns:null}],displayName:"DateField"};const $=k("calendar-sheet"),Y=({className:c,title:p,confirmButton:l,open:n,onCancel:a,value:i,defaultValue:C,onSelect:h,...x})=>{const u=i!==void 0,[t,o]=r.useState(i||C||[null,null]),d=r.useCallback(()=>{u&&o(i||[null,null])},[u,i]);return r.useEffect(()=>{i===null&&o([null,null]),i&&o(i)},[i]),e.jsxs(_,{open:n,className:y($,c),children:[e.jsx(F,{title:p,closeIcon:!0,onCloseClick:()=>{a?.(),d()}}),e.jsx(D,{className:`${$}__body`,children:n&&e.jsx(v,{type:"range",...x,value:t,onPick:o})}),e.jsx(R,{children:e.jsx(I,{size:"large",children:"Xác nhận",theme:"neutral",...l,disabled:!t||t[0]===null||t[1]===null,onClick:()=>{h?.(t),d()}})})]})};Y.__docgenInfo={description:"",methods:[],displayName:"CalendarRangeSheet"};const E=k("date-field-range"),G=r.forwardRef((c,p)=>{const{wrapper:l,props:n}=K(c),{picker:a="date-picker",pickerProps:i}=n,[C,h]=r.useState(-1),[x,u]=r.useState(n.autoFocus),[t,o]=z(n,{trigger:"onChange",valuePropName:"value",defaultValuePropName:"defaultValue",defaultValue:{from:null,to:null}}),d=r.useRef(null),f=r.useRef(null),g=()=>{x||(t?.from?f.current?.focus?.():d.current?.focus?.())};return r.useImperativeHandle(p,()=>({focus:g,blur:()=>{d.current?.blur?.(),f.current?.blur?.()}})),e.jsxs(e.Fragment,{children:[e.jsx(L,{trailingIcon:{name:"calendar",color:"alias-object-secondary"},onTrailingIconClick:s=>{s.stopPropagation(),h(0)},...l,className:l.className,isFocus:x,onClick:()=>g(),loadingNode:n.loading&&e.jsxs("div",{className:`${E}__loading`,children:[e.jsx(N,{width:128,height:13,shape:"pill"}),e.jsx(N,{width:128,height:13,shape:"pill"})]}),children:e.jsxs("div",{className:E,children:[e.jsx(b,{...w(n,["value","onChange","defaultValue"]),placeholder:n.placeholder?.from,value:t?.from,onChange:s=>o({...t,from:s}),onCompleted:(s,m)=>{m<10||(f.current?.focus?.(),f.current?.setSelectionRange(0,0))},disabled:l.disabled,onKeyDown:s=>{const m=s.key==="ArrowRight";d.current?.selectionStart===10&&m&&(f.current?.focus(),f.current?.setSelectionRange(0,0)),n.onKeyDown?.(s)},onFocus:s=>{u(!0),n.onFocus?.(s)},onBlur:s=>{u(!1),n.onBlur?.(s)},ref:d,className:n.inputClassName}),e.jsx(X,{name:"arrow-right",color:l.error?"alias-support-negative":l.success?"alias-support-positive":"alias-object-secondary",size:16}),e.jsx(b,{...w(n,["value","onChange","defaultValue"]),placeholder:n.placeholder?.to,value:t?.to,onChange:s=>o({...t,to:s}),disabled:l.disabled,onKeyDown:s=>{const m=s.key==="Delete",M=s.key==="ArrowLeft";f.current?.selectionStart===0&&(m||M)&&d.current?.focus(),n.onKeyDown?.(s)},onFocus:s=>{u(!0),n.onFocus?.(s)},onBlur:s=>{u(!1),n.onBlur?.(s)},ref:f,className:n.inputClassName})]})}),a==="date-picker"&&e.jsxs(e.Fragment,{children:[e.jsx(S,{open:C===0,value:t?.from,onSelect:s=>{h(1),o({...t,from:s})},onCancel:()=>h(-1),title:e.jsxs(e.Fragment,{children:[l.label?.text," từ ngày"]}),...i?.[0]}),e.jsx(S,{open:C===1,value:t?.to,onSelect:s=>{h(-1),o({...t,to:s})},min:t?.from,onCancel:()=>h(-1),title:e.jsxs(e.Fragment,{children:[l.label?.text," đến ngày"]}),...i?.[1]})]}),a==="calendar"&&e.jsx(Y,{open:C===0,value:[t?.from||null,t?.to||null],onSelect:s=>{h(-1),o({from:s[0],to:s[1]})},onCancel:()=>h(-1),title:e.jsx(e.Fragment,{children:l.label?.text}),...i})]})});G.__docgenInfo={description:"",methods:[{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"blur",docblock:null,modifiers:[],params:[],returns:null}],displayName:"DateFieldRange"};export{q as D,G as a};
@@ -1,4 +1,4 @@
1
- import{j as t,r as h}from"./iframe-DfPay7Zl.js";import{T as g,S as D,M as u,P as b,a as f}from"./blocks-DKR3P4qW.js";import{D as a,a as l}from"./date-field-range-B-sv9nbW.js";import{t as e}from"./store-Ce3Ikv5g.js";import"./preload-helper-PPVm8Dsz.js";import"./index-cMNObl2z.js";import"./input-wrapper-CgaUwbbE.js";import"./icon-CdiFzFyf.js";import"./colors-_6nFGM3e.js";import"./label-D44azUgi.js";import"./typography-CB8hPDyK.js";import"./skeleton-B12XbNAJ.js";import"./omit-BWHsnDSR.js";import"./_baseClone-DQVxEhny.js";import"./button-DJH3RlJl.js";import"./sheet-footer-nEdxsYan.js";import"./navigation-bar-DK3TxcTu.js";import"./proxy-B4G9nIBd.js";import"./visibility-sensor-Jf-Nmil6.js";import"./index-B-Ksafg0.js";import"./index-BWpuenI4.js";import"./react-I9jCW2VV.js";import"./app-CTv8lFU3.js";import"./image-CMKb-R3x.js";import"./toast-provider-DKSrfhJD.js";import"./bottom-tab-bar-B6IAoRwz.js";import"./calendar-C4Xe_TW2.js";import"./date-B3PFMb6s.js";import"./index-EGt7xBnA.js";import"./date-picker-BPzKPdhO.js";import"./embla-carousel-react.esm-5D5fs7OQ.js";const x=()=>{const o=`
1
+ import{j as t,r as h}from"./iframe-C0PGuV5s.js";import{T as g,S as D,M as u,P as b,a as f}from"./blocks-D4qvS4eZ.js";import{D as a,a as l}from"./date-field-range-DSAQp9qR.js";import{t as e}from"./store-BmYgrUro.js";import"./preload-helper-PPVm8Dsz.js";import"./index-1AHvPexM.js";import"./input-wrapper-DkEl0Eih.js";import"./icon-CgGksgRS.js";import"./colors-_6nFGM3e.js";import"./label-CHVpMhb5.js";import"./typography-BcLxefPi.js";import"./skeleton-CmGRbWqE.js";import"./omit-D04qL5V_.js";import"./_baseClone-4nOrhHpR.js";import"./button-CbLEqALK.js";import"./sheet-footer-BL2JAvmb.js";import"./navigation-bar-TpF0DSXB.js";import"./proxy-edvPwIiD.js";import"./visibility-sensor-FN9n9CLs.js";import"./index-B-Ksafg0.js";import"./index-BLzgbpm2.js";import"./react-zqqxT5R_.js";import"./app-B__CxZQv.js";import"./image-BdsCB1je.js";import"./toast-provider-ChNGFQlt.js";import"./bottom-tab-bar-UaYvPAic.js";import"./calendar-C7tiySn0.js";import"./date-C1W0DfQy.js";import"./index-DWjPAWoJ.js";import"./date-picker--PiU9sOL.js";import"./embla-carousel-react.esm-Pp2OIUrN.js";const x=()=>{const o=`
2
2
  ## ${e("common.table.title")}
3
3
 
4
4
  | ${e("common.table.name")} | ${e("common.table.type")} | ${e("common.table.required")} | ${e("common.table.description")} |
@@ -1 +1 @@
1
- import{r as n,j as p}from"./iframe-DfPay7Zl.js";import{u as Y}from"./index-EGt7xBnA.js";import{o as ae}from"./omit-BWHsnDSR.js";import{g as se,c as A}from"./store-Ce3Ikv5g.js";import{u as ne}from"./embla-carousel-react.esm-5D5fs7OQ.js";import{T as oe}from"./typography-CB8hPDyK.js";import{d as E}from"./date-B3PFMb6s.js";const F=se("date-picker"),re={CIRCLE_DEGREES:360,WHEEL_ITEM_SIZE:24,WHEEL_ITEM_COUNT:80,WHEEL_ITEMS_IN_VIEW:4},T=`${F}-item`,{CIRCLE_DEGREES:$,WHEEL_ITEM_COUNT:U,WHEEL_ITEMS_IN_VIEW:le,WHEEL_ITEM_SIZE:q}=re,L=$/U,ce=L*le,Z=Math.round(q/2/Math.tan(Math.PI/U)),R=(e,o)=>Math.abs(e-o)<ce,ie=(e,o,a,r,s)=>{const f=e.slideNodes()[o],l=e.scrollProgress()*s,i=e.scrollSnapList()[o]*s,t=i+s,u=i-s;let O=!1,d=o*-L;if(R(l,i)&&(O=!0),R(l,u)&&(O=!0,d=-$+(r-o)*L),R(l,t)&&(O=!0,d=-(s%$)-o*L),O){const c=Math.abs(l-i)<L/2;f.style.opacity=c?"1":"0.25",f.style.transform=`translateY(-${o*100}%) rotateX(${d}deg) translateZ(${Z}px)`}else f.style.opacity="0",f.style.transform="none"},ue=(e,o)=>{e.containerNode().style.transform=`translateZ(${Z}px) rotateX(${o}deg)`},k=e=>{const{className:o,items:a,activeIndex:r=0,renderLabel:s,onChange:f}=e,l=!0,[i,t]=ne({loop:l,axis:"y",dragFree:!0,containScroll:!1,watchSlides:!1,startIndex:r}),u=a.length,O=n.useRef(null),d=u*L,c=0,g=n.useCallback(h=>{if(!h)return;const{translate:y,slideLooper:I}=h.internalEngine();y.clear(),y.toggleActive(!1),I.loopPoints.forEach(({translate:M})=>{M.clear(),M.toggleActive(!1)})},[]),C=n.useCallback(h=>{const I=(u*L-c)*h.scrollProgress();ue(h,I),h.slideNodes().forEach((M,D)=>{ie(h,D,l,u,d)})},[u,c,d,l]);return n.useEffect(()=>{if(!t)return;t.on("pointerUp",y=>{const{scrollTo:I,target:M,location:D}=y.internalEngine(),j=M.get()-D.get(),H=Math.abs(j)<q/2.5?10:.1,x=j*H;I.distance(x,!0)}),t.on("scroll",C),t.on("reInit",y=>{g(y),C(y)}),g(t),C(t);const h=()=>{f&&f(t.selectedScrollSnap())};return t.on("select",h),()=>{t.off("select",h)}},[t,g,C,f]),p.jsx("div",{className:A(T,o),children:p.jsx("div",{className:`${T}__scene`,ref:O,children:p.jsx("div",{className:`${T}__viewport`,ref:i,children:p.jsx("div",{className:`${T}__container`,children:a.map(h=>p.jsx("div",{className:`${T}__slide`,children:p.jsx(oe,{size:"base",weight:"600",children:s?.(h)||h})},h))})})})})};k.__docgenInfo={description:"",methods:[],displayName:"DatePickerItem"};const de=e=>{const{type:o,value:a,max:r,min:s,hasHour:f,renderLabels:l}=e;let i,t,u;switch(o){case"day":{u=l?.days||ge,i=r&&E(r).startOf("month").valueOf()===E(a).startOf("month").valueOf()?r.getDate():void 0,t=s&&E(s).startOf("month").valueOf()===E(a).startOf("month").valueOf()?s.getDate():void 0;break}case"month":{u=l?.months||(f?ye:he),i=r&&E(r).startOf("year").valueOf()===E(a).startOf("year").valueOf()?r.getMonth():void 0,t=s&&E(s).startOf("year").valueOf()===E(a).startOf("year").valueOf()?s.getMonth():void 0;break}case"year":{u=l?.years||ve,i=r?r.getFullYear():void 0,t=s?s.getFullYear():void 0;break}case"hour":{u=l?.hours||me,i=r&&E(r).startOf("day").valueOf()===E(a).startOf("day").valueOf()?r.getHours():void 0,t=s&&E(s).startOf("day").valueOf()===E(a).startOf("day").valueOf()?s.getHours():void 0;break}case"minute":{u=l?.minutes||fe,i=r&&E(r).startOf("hour").valueOf()===E(a).startOf("hour").valueOf()?r.getMinutes():void 0,t=s&&E(s).startOf("hour").valueOf()===E(a).startOf("hour").valueOf()?s.getMinutes():void 0;break}case"dayOfWeek":{u=l?.dayOfWeeks||Ee;break}}return{renderLabel:u,max:i,min:t}},W=(e,o,a)=>Array.from({length:Math.floor((o-e+1)/a)},(r,s)=>e+s*a),w=(e,o)=>{let a=0;for(;a<e.length;a++){if(e[a]===o)return a;if(e[a]>o)return Math.max(a,0)}return a-1},me=e=>e.toString().padStart(2,"0"),fe=e=>e.toString().padStart(2,"0"),ge=e=>e.toString().padStart(2,"0"),he=e=>"tháng "+(e+1).toString().padStart(2,"0"),ye=e=>"thg "+(e+1).toString().padStart(2,"0"),ve=e=>e.toString().padStart(4,"0"),Ee=e=>["chủ nhật","thứ 2","thứ 3","thứ 4","thứ 5","thứ 6","thứ 7"][e%7],B=({className:e,hour:o,day:a,month:r,year:s,minutesProps:f,hoursProps:l,daysProps:i,monthsProps:t,yearsProps:u,dayOfWeeksProps:O,...d})=>{const[c,g]=Y(d,{trigger:"onChange",valuePropName:"value",defaultValue:{years:new Date().getFullYear(),minutes:new Date().getMinutes(),hours:new Date().getHours(),days:new Date().getDate(),months:new Date().getMonth(),dayOfWeeks:new Date().getDay()}});let C=!1;a=a||o&&(r||s),r=r||(o||a)&&s,a&&!o&&!r&&!s&&(C=!0,a=!1);const h=o,y=n.useMemo(()=>W(0,59,f?.step||1),[f?.step]),I=n.useMemo(()=>w(y,c.minutes),[y,c.minutes]),M=n.useCallback(v=>{g(m=>({...m,minutes:y[v%y.length]}))},[y,g]),D=n.useMemo(()=>W(0,23,l?.step||1),[l?.step]),j=n.useMemo(()=>w(D,c.hours),[D,c.hours]),H=n.useCallback(v=>{g(m=>({...m,hours:D[v%D.length]}))},[D,g]),x=n.useMemo(()=>{const v=new Date(c.years,c.months+1,0).getDate();return W(1,v,i?.step||1)},[i?.step,c.months,c.years]),G=n.useMemo(()=>w(x,c.days),[x,c.days]),X=n.useCallback(v=>{g(m=>({...m,days:x[v%x.length],dayOfWeeks:new Date(m.years,m.months,x[v%x.length]).getDay()}))},[x,g]),b=n.useMemo(()=>W(0,11,t?.step||1),[t?.step]),z=n.useMemo(()=>w(b,c.months),[b,c.months]),J=n.useCallback(v=>{g(m=>({...m,months:b[v%b.length],dayOfWeeks:new Date(m.years,b[v%b.length],m.days).getDay()}))},[b,g]),_=n.useMemo(()=>W(1900,2300,u?.step||1),[u?.step]),K=n.useMemo(()=>w(_,c.years),[_,c.years]),Q=n.useCallback(v=>{g(m=>({...m,years:_[v%_.length],dayOfWeeks:new Date(_[v%_.length],m.months,m.days).getDay()}))},[_,g]),S=n.useMemo(()=>W(0,59,O?.step||1),[O?.step]),P=n.useMemo(()=>w(S,c.dayOfWeeks),[S,c.dayOfWeeks]),ee=n.useCallback(v=>{g(m=>{const N=new Date(m.years,m.months,m.days),V=S[v%S.length],te=N.getDay()-V;return N.setDate(N.getDate()-te),{...m,years:N.getFullYear(),months:N.getMonth(),days:N.getDate(),dayOfWeeks:V}})},[S,g]);return p.jsxs("div",{className:A(`${F}-base`,e),children:[a&&p.jsx(k,{items:x,activeIndex:G,onChange:X,renderLabel:i.renderLabel,min:i.min,max:i.max},x.length),r&&p.jsx(k,{items:b,activeIndex:z,onChange:J,renderLabel:t.renderLabel,min:t.min,max:t.max}),s&&p.jsx(k,{items:_,activeIndex:K,onChange:Q,renderLabel:u.renderLabel,min:u.min,max:u.max}),C&&p.jsx(k,{items:S,activeIndex:P,onChange:ee,renderLabel:O.renderLabel,min:O.min,max:O.max}),o&&p.jsx(k,{items:D,activeIndex:j,onChange:H,renderLabel:l.renderLabel,min:l.min,max:l.max}),h&&p.jsx(k,{items:y,activeIndex:I,onChange:M,renderLabel:f.renderLabel,min:f.min,max:f.max})]})};B.__docgenInfo={description:"",methods:[],displayName:"DatePickerBase"};const Me=({min:e,max:o,renderLabels:a,year:r=!0,month:s=!0,day:f=!0,hour:l=!1,...i})=>{const[t,u]=Y(i,{trigger:"onChange",valuePropName:"value",defaultValue:new Date}),O=n.useMemo(()=>({years:t.getFullYear(),months:t.getMonth(),days:t.getDate(),dayOfWeeks:t.getDay(),hours:t.getHours(),minutes:t.getMinutes()}),[t]),d=n.useCallback(M=>de({type:M,value:t,max:o,min:e,hasHour:l,renderLabels:a}),[t,o,e,l,a]),c=n.useMemo(()=>d("year"),[d]),g=n.useMemo(()=>d("month"),[d]),C=n.useMemo(()=>d("day"),[d]),h=n.useMemo(()=>d("hour"),[d]),y=n.useMemo(()=>d("minute"),[d]),I=n.useMemo(()=>d("dayOfWeek"),[d]);return p.jsx(B,{...ae(i,["value","onChange"]),year:r,month:s,day:f,hour:l,yearsProps:c,monthsProps:g,daysProps:C,hoursProps:h,minutesProps:y,dayOfWeeksProps:I,value:O,onChange:M=>{u(new Date(M.years,M.months,M.days,M.hours,M.minutes))}})};Me.__docgenInfo={description:"",methods:[],displayName:"DatePicker",props:{year:{defaultValue:{value:"true",computed:!1},required:!1},month:{defaultValue:{value:"true",computed:!1},required:!1},day:{defaultValue:{value:"true",computed:!1},required:!1},hour:{defaultValue:{value:"false",computed:!1},required:!1}}};export{Me as D};
1
+ import{r as n,j as p}from"./iframe-C0PGuV5s.js";import{u as Y}from"./index-DWjPAWoJ.js";import{o as ae}from"./omit-D04qL5V_.js";import{g as se,c as A}from"./store-BmYgrUro.js";import{u as ne}from"./embla-carousel-react.esm-Pp2OIUrN.js";import{T as oe}from"./typography-BcLxefPi.js";import{d as E}from"./date-C1W0DfQy.js";const F=se("date-picker"),re={CIRCLE_DEGREES:360,WHEEL_ITEM_SIZE:24,WHEEL_ITEM_COUNT:80,WHEEL_ITEMS_IN_VIEW:4},T=`${F}-item`,{CIRCLE_DEGREES:$,WHEEL_ITEM_COUNT:U,WHEEL_ITEMS_IN_VIEW:le,WHEEL_ITEM_SIZE:q}=re,L=$/U,ce=L*le,Z=Math.round(q/2/Math.tan(Math.PI/U)),R=(e,o)=>Math.abs(e-o)<ce,ie=(e,o,a,r,s)=>{const f=e.slideNodes()[o],l=e.scrollProgress()*s,i=e.scrollSnapList()[o]*s,t=i+s,u=i-s;let O=!1,d=o*-L;if(R(l,i)&&(O=!0),R(l,u)&&(O=!0,d=-$+(r-o)*L),R(l,t)&&(O=!0,d=-(s%$)-o*L),O){const c=Math.abs(l-i)<L/2;f.style.opacity=c?"1":"0.25",f.style.transform=`translateY(-${o*100}%) rotateX(${d}deg) translateZ(${Z}px)`}else f.style.opacity="0",f.style.transform="none"},ue=(e,o)=>{e.containerNode().style.transform=`translateZ(${Z}px) rotateX(${o}deg)`},k=e=>{const{className:o,items:a,activeIndex:r=0,renderLabel:s,onChange:f}=e,l=!0,[i,t]=ne({loop:l,axis:"y",dragFree:!0,containScroll:!1,watchSlides:!1,startIndex:r}),u=a.length,O=n.useRef(null),d=u*L,c=0,g=n.useCallback(h=>{if(!h)return;const{translate:y,slideLooper:I}=h.internalEngine();y.clear(),y.toggleActive(!1),I.loopPoints.forEach(({translate:M})=>{M.clear(),M.toggleActive(!1)})},[]),C=n.useCallback(h=>{const I=(u*L-c)*h.scrollProgress();ue(h,I),h.slideNodes().forEach((M,D)=>{ie(h,D,l,u,d)})},[u,c,d,l]);return n.useEffect(()=>{if(!t)return;t.on("pointerUp",y=>{const{scrollTo:I,target:M,location:D}=y.internalEngine(),j=M.get()-D.get(),H=Math.abs(j)<q/2.5?10:.1,x=j*H;I.distance(x,!0)}),t.on("scroll",C),t.on("reInit",y=>{g(y),C(y)}),g(t),C(t);const h=()=>{f&&f(t.selectedScrollSnap())};return t.on("select",h),()=>{t.off("select",h)}},[t,g,C,f]),p.jsx("div",{className:A(T,o),children:p.jsx("div",{className:`${T}__scene`,ref:O,children:p.jsx("div",{className:`${T}__viewport`,ref:i,children:p.jsx("div",{className:`${T}__container`,children:a.map(h=>p.jsx("div",{className:`${T}__slide`,children:p.jsx(oe,{size:"base",weight:"600",children:s?.(h)||h})},h))})})})})};k.__docgenInfo={description:"",methods:[],displayName:"DatePickerItem"};const de=e=>{const{type:o,value:a,max:r,min:s,hasHour:f,renderLabels:l}=e;let i,t,u;switch(o){case"day":{u=l?.days||ge,i=r&&E(r).startOf("month").valueOf()===E(a).startOf("month").valueOf()?r.getDate():void 0,t=s&&E(s).startOf("month").valueOf()===E(a).startOf("month").valueOf()?s.getDate():void 0;break}case"month":{u=l?.months||(f?ye:he),i=r&&E(r).startOf("year").valueOf()===E(a).startOf("year").valueOf()?r.getMonth():void 0,t=s&&E(s).startOf("year").valueOf()===E(a).startOf("year").valueOf()?s.getMonth():void 0;break}case"year":{u=l?.years||ve,i=r?r.getFullYear():void 0,t=s?s.getFullYear():void 0;break}case"hour":{u=l?.hours||me,i=r&&E(r).startOf("day").valueOf()===E(a).startOf("day").valueOf()?r.getHours():void 0,t=s&&E(s).startOf("day").valueOf()===E(a).startOf("day").valueOf()?s.getHours():void 0;break}case"minute":{u=l?.minutes||fe,i=r&&E(r).startOf("hour").valueOf()===E(a).startOf("hour").valueOf()?r.getMinutes():void 0,t=s&&E(s).startOf("hour").valueOf()===E(a).startOf("hour").valueOf()?s.getMinutes():void 0;break}case"dayOfWeek":{u=l?.dayOfWeeks||Ee;break}}return{renderLabel:u,max:i,min:t}},W=(e,o,a)=>Array.from({length:Math.floor((o-e+1)/a)},(r,s)=>e+s*a),w=(e,o)=>{let a=0;for(;a<e.length;a++){if(e[a]===o)return a;if(e[a]>o)return Math.max(a,0)}return a-1},me=e=>e.toString().padStart(2,"0"),fe=e=>e.toString().padStart(2,"0"),ge=e=>e.toString().padStart(2,"0"),he=e=>"tháng "+(e+1).toString().padStart(2,"0"),ye=e=>"thg "+(e+1).toString().padStart(2,"0"),ve=e=>e.toString().padStart(4,"0"),Ee=e=>["chủ nhật","thứ 2","thứ 3","thứ 4","thứ 5","thứ 6","thứ 7"][e%7],B=({className:e,hour:o,day:a,month:r,year:s,minutesProps:f,hoursProps:l,daysProps:i,monthsProps:t,yearsProps:u,dayOfWeeksProps:O,...d})=>{const[c,g]=Y(d,{trigger:"onChange",valuePropName:"value",defaultValue:{years:new Date().getFullYear(),minutes:new Date().getMinutes(),hours:new Date().getHours(),days:new Date().getDate(),months:new Date().getMonth(),dayOfWeeks:new Date().getDay()}});let C=!1;a=a||o&&(r||s),r=r||(o||a)&&s,a&&!o&&!r&&!s&&(C=!0,a=!1);const h=o,y=n.useMemo(()=>W(0,59,f?.step||1),[f?.step]),I=n.useMemo(()=>w(y,c.minutes),[y,c.minutes]),M=n.useCallback(v=>{g(m=>({...m,minutes:y[v%y.length]}))},[y,g]),D=n.useMemo(()=>W(0,23,l?.step||1),[l?.step]),j=n.useMemo(()=>w(D,c.hours),[D,c.hours]),H=n.useCallback(v=>{g(m=>({...m,hours:D[v%D.length]}))},[D,g]),x=n.useMemo(()=>{const v=new Date(c.years,c.months+1,0).getDate();return W(1,v,i?.step||1)},[i?.step,c.months,c.years]),G=n.useMemo(()=>w(x,c.days),[x,c.days]),X=n.useCallback(v=>{g(m=>({...m,days:x[v%x.length],dayOfWeeks:new Date(m.years,m.months,x[v%x.length]).getDay()}))},[x,g]),b=n.useMemo(()=>W(0,11,t?.step||1),[t?.step]),z=n.useMemo(()=>w(b,c.months),[b,c.months]),J=n.useCallback(v=>{g(m=>({...m,months:b[v%b.length],dayOfWeeks:new Date(m.years,b[v%b.length],m.days).getDay()}))},[b,g]),_=n.useMemo(()=>W(1900,2300,u?.step||1),[u?.step]),K=n.useMemo(()=>w(_,c.years),[_,c.years]),Q=n.useCallback(v=>{g(m=>({...m,years:_[v%_.length],dayOfWeeks:new Date(_[v%_.length],m.months,m.days).getDay()}))},[_,g]),S=n.useMemo(()=>W(0,59,O?.step||1),[O?.step]),P=n.useMemo(()=>w(S,c.dayOfWeeks),[S,c.dayOfWeeks]),ee=n.useCallback(v=>{g(m=>{const N=new Date(m.years,m.months,m.days),V=S[v%S.length],te=N.getDay()-V;return N.setDate(N.getDate()-te),{...m,years:N.getFullYear(),months:N.getMonth(),days:N.getDate(),dayOfWeeks:V}})},[S,g]);return p.jsxs("div",{className:A(`${F}-base`,e),children:[a&&p.jsx(k,{items:x,activeIndex:G,onChange:X,renderLabel:i.renderLabel,min:i.min,max:i.max},x.length),r&&p.jsx(k,{items:b,activeIndex:z,onChange:J,renderLabel:t.renderLabel,min:t.min,max:t.max}),s&&p.jsx(k,{items:_,activeIndex:K,onChange:Q,renderLabel:u.renderLabel,min:u.min,max:u.max}),C&&p.jsx(k,{items:S,activeIndex:P,onChange:ee,renderLabel:O.renderLabel,min:O.min,max:O.max}),o&&p.jsx(k,{items:D,activeIndex:j,onChange:H,renderLabel:l.renderLabel,min:l.min,max:l.max}),h&&p.jsx(k,{items:y,activeIndex:I,onChange:M,renderLabel:f.renderLabel,min:f.min,max:f.max})]})};B.__docgenInfo={description:"",methods:[],displayName:"DatePickerBase"};const Me=({min:e,max:o,renderLabels:a,year:r=!0,month:s=!0,day:f=!0,hour:l=!1,...i})=>{const[t,u]=Y(i,{trigger:"onChange",valuePropName:"value",defaultValue:new Date}),O=n.useMemo(()=>({years:t.getFullYear(),months:t.getMonth(),days:t.getDate(),dayOfWeeks:t.getDay(),hours:t.getHours(),minutes:t.getMinutes()}),[t]),d=n.useCallback(M=>de({type:M,value:t,max:o,min:e,hasHour:l,renderLabels:a}),[t,o,e,l,a]),c=n.useMemo(()=>d("year"),[d]),g=n.useMemo(()=>d("month"),[d]),C=n.useMemo(()=>d("day"),[d]),h=n.useMemo(()=>d("hour"),[d]),y=n.useMemo(()=>d("minute"),[d]),I=n.useMemo(()=>d("dayOfWeek"),[d]);return p.jsx(B,{...ae(i,["value","onChange"]),year:r,month:s,day:f,hour:l,yearsProps:c,monthsProps:g,daysProps:C,hoursProps:h,minutesProps:y,dayOfWeeksProps:I,value:O,onChange:M=>{u(new Date(M.years,M.months,M.days,M.hours,M.minutes))}})};Me.__docgenInfo={description:"",methods:[],displayName:"DatePicker",props:{year:{defaultValue:{value:"true",computed:!1},required:!1},month:{defaultValue:{value:"true",computed:!1},required:!1},day:{defaultValue:{value:"true",computed:!1},required:!1},hour:{defaultValue:{value:"false",computed:!1},required:!1}}};export{Me as D};
@@ -1,4 +1,4 @@
1
- import{j as t,r as y}from"./iframe-DfPay7Zl.js";import{T as D,S as g,M as u,P,a as k}from"./blocks-DKR3P4qW.js";import{D as l}from"./date-picker-BPzKPdhO.js";import{t as e}from"./store-Ce3Ikv5g.js";import"./preload-helper-PPVm8Dsz.js";import"./index-cMNObl2z.js";import"./index-EGt7xBnA.js";import"./index-B-Ksafg0.js";import"./omit-BWHsnDSR.js";import"./_baseClone-DQVxEhny.js";import"./embla-carousel-react.esm-5D5fs7OQ.js";import"./typography-CB8hPDyK.js";import"./colors-_6nFGM3e.js";import"./date-B3PFMb6s.js";const h=()=>{const o=`
1
+ import{j as t,r as y}from"./iframe-C0PGuV5s.js";import{T as D,S as g,M as u,P,a as k}from"./blocks-D4qvS4eZ.js";import{D as l}from"./date-picker--PiU9sOL.js";import{t as e}from"./store-BmYgrUro.js";import"./preload-helper-PPVm8Dsz.js";import"./index-1AHvPexM.js";import"./index-DWjPAWoJ.js";import"./index-B-Ksafg0.js";import"./omit-D04qL5V_.js";import"./_baseClone-4nOrhHpR.js";import"./embla-carousel-react.esm-Pp2OIUrN.js";import"./typography-BcLxefPi.js";import"./colors-_6nFGM3e.js";import"./date-C1W0DfQy.js";const h=()=>{const o=`
2
2
  ## ${e("common.table.title")}
3
3
 
4
4
  | ${e("common.table.name")} | ${e("common.table.type")} | ${e("common.table.required")} | ${e("common.table.description")} |
@@ -1 +1 @@
1
- import{j as s,r as i}from"./iframe-DfPay7Zl.js";import{c,g as N}from"./store-Ce3Ikv5g.js";import{I as $}from"./image-CMKb-R3x.js";import{T as d}from"./typography-CB8hPDyK.js";import{B as v}from"./button-DJH3RlJl.js";import{r as p}from"./blocks-DKR3P4qW.js";import{j as E,I as D}from"./navigation-bar-DK3TxcTu.js";import{A as n}from"./app-CTv8lFU3.js";const r=N("dialog"),u=i.forwardRef(({topImageUrl:e,top:l,title:a,description:t,children:o,closeAction:m,footer:f,open:x,onBackdropClick:g,onCloseClick:_,overlay:j="default",className:h,...y},b)=>s.jsxs("div",{ref:b,className:c(r,{[`${r}--open`]:x},h),...y,children:[s.jsx("div",{className:c(`${r}__overlay`,{[`${r}__overlay--blur`]:j==="blur"}),onClick:g}),!!m&&s.jsx(v,{className:`${r}__close`,leadingIcon:{name:"xmark"},size:"large",theme:"neutral",type:"outline",shape:"pill",onClick:_}),s.jsxs("div",{className:c(`${r}__box`,!!m&&`${r}__box--close`),children:[e&&s.jsx($,{src:e,className:`${r}__image`}),l,(!!a||!!t)&&s.jsxs("div",{className:`${r}__title-group`,children:[!!a&&s.jsx(d,{size:"large",weight:600,children:a}),!!t&&s.jsx(d,{size:"base",weight:400,children:t})]}),!!o&&s.jsx("div",{className:`${r}__body`,children:o}),!!f&&s.jsx("div",{className:`${r}__footer`,children:f})]})]})),R=({open:e,...l})=>{const[a,t]=i.useState(e),o=i.useRef(null);return E(()=>{e&&t(e)}),D(()=>{t(!1)}),i.useEffect(()=>{t(e)},[e]),i.useEffect(()=>{a&&o.current&&document.body.appendChild(o.current)},[a]),p.createPortal(s.jsx(u,{ref:o,open:a,...l}),document.body)},C=({open:e,...l})=>{const[a,t]=i.useState(e),o=i.useRef(null);return i.useEffect(()=>()=>{t(!1)},[]),i.useEffect(()=>{t(e)},[e]),i.useEffect(()=>{a&&o.current&&document.body.appendChild(o.current)},[a]),p.createPortal(s.jsx(u,{ref:o,open:a,...l}),document.body)},I=({portal:e=!0,...l})=>e&&n.isUsingApp&&n.isUsingRouter?s.jsx(R,{...l}):e&&(!n.isUsingApp||!n.isUsingRouter)?s.jsx(C,{...l}):s.jsx(u,{...l});I.__docgenInfo={description:"",methods:[],displayName:"Dialog",props:{portal:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}}}};export{I as D};
1
+ import{j as s,r as i}from"./iframe-C0PGuV5s.js";import{c,g as N}from"./store-BmYgrUro.js";import{I as $}from"./image-BdsCB1je.js";import{T as d}from"./typography-BcLxefPi.js";import{B as v}from"./button-CbLEqALK.js";import{r as p}from"./blocks-D4qvS4eZ.js";import{j as E,I as D}from"./navigation-bar-TpF0DSXB.js";import{A as n}from"./app-B__CxZQv.js";const r=N("dialog"),u=i.forwardRef(({topImageUrl:e,top:l,title:a,description:t,children:o,closeAction:m,footer:f,open:x,onBackdropClick:g,onCloseClick:_,overlay:j="default",className:h,...y},b)=>s.jsxs("div",{ref:b,className:c(r,{[`${r}--open`]:x},h),...y,children:[s.jsx("div",{className:c(`${r}__overlay`,{[`${r}__overlay--blur`]:j==="blur"}),onClick:g}),!!m&&s.jsx(v,{className:`${r}__close`,leadingIcon:{name:"xmark"},size:"large",theme:"neutral",type:"outline",shape:"pill",onClick:_}),s.jsxs("div",{className:c(`${r}__box`,!!m&&`${r}__box--close`),children:[e&&s.jsx($,{src:e,className:`${r}__image`}),l,(!!a||!!t)&&s.jsxs("div",{className:`${r}__title-group`,children:[!!a&&s.jsx(d,{size:"large",weight:600,children:a}),!!t&&s.jsx(d,{size:"base",weight:400,children:t})]}),!!o&&s.jsx("div",{className:`${r}__body`,children:o}),!!f&&s.jsx("div",{className:`${r}__footer`,children:f})]})]})),R=({open:e,...l})=>{const[a,t]=i.useState(e),o=i.useRef(null);return E(()=>{e&&t(e)}),D(()=>{t(!1)}),i.useEffect(()=>{t(e)},[e]),i.useEffect(()=>{a&&o.current&&document.body.appendChild(o.current)},[a]),p.createPortal(s.jsx(u,{ref:o,open:a,...l}),document.body)},C=({open:e,...l})=>{const[a,t]=i.useState(e),o=i.useRef(null);return i.useEffect(()=>()=>{t(!1)},[]),i.useEffect(()=>{t(e)},[e]),i.useEffect(()=>{a&&o.current&&document.body.appendChild(o.current)},[a]),p.createPortal(s.jsx(u,{ref:o,open:a,...l}),document.body)},I=({portal:e=!0,...l})=>e&&n.isUsingApp&&n.isUsingRouter?s.jsx(R,{...l}):e&&(!n.isUsingApp||!n.isUsingRouter)?s.jsx(C,{...l}):s.jsx(u,{...l});I.__docgenInfo={description:"",methods:[],displayName:"Dialog",props:{portal:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}}}};export{I as D};
@@ -1,4 +1,4 @@
1
- import{j as t,r}from"./iframe-DfPay7Zl.js";import{T as y,S as B,M as x,P as T,a as b}from"./blocks-DKR3P4qW.js";import{D as i}from"./dialog-BAfGQzk5.js";import{B as s}from"./button-DJH3RlJl.js";import{t as e}from"./store-Ce3Ikv5g.js";import"./preload-helper-PPVm8Dsz.js";import"./index-cMNObl2z.js";import"./image-CMKb-R3x.js";import"./visibility-sensor-Jf-Nmil6.js";import"./index-B-Ksafg0.js";import"./icon-CdiFzFyf.js";import"./colors-_6nFGM3e.js";import"./typography-CB8hPDyK.js";import"./navigation-bar-DK3TxcTu.js";import"./proxy-B4G9nIBd.js";import"./index-BWpuenI4.js";import"./react-I9jCW2VV.js";import"./_baseClone-DQVxEhny.js";import"./app-CTv8lFU3.js";import"./toast-provider-DKSrfhJD.js";import"./bottom-tab-bar-B6IAoRwz.js";const O=()=>{const n=`
1
+ import{j as t,r}from"./iframe-C0PGuV5s.js";import{T as y,S as B,M as x,P as T,a as b}from"./blocks-D4qvS4eZ.js";import{D as i}from"./dialog-8K5u-kre.js";import{B as s}from"./button-CbLEqALK.js";import{t as e}from"./store-BmYgrUro.js";import"./preload-helper-PPVm8Dsz.js";import"./index-1AHvPexM.js";import"./image-BdsCB1je.js";import"./visibility-sensor-FN9n9CLs.js";import"./index-B-Ksafg0.js";import"./icon-CgGksgRS.js";import"./colors-_6nFGM3e.js";import"./typography-BcLxefPi.js";import"./navigation-bar-TpF0DSXB.js";import"./proxy-edvPwIiD.js";import"./index-BLzgbpm2.js";import"./react-zqqxT5R_.js";import"./_baseClone-4nOrhHpR.js";import"./app-B__CxZQv.js";import"./toast-provider-ChNGFQlt.js";import"./bottom-tab-bar-UaYvPAic.js";const O=()=>{const n=`
2
2
  ## ${e("common.table.title")}
3
3
 
4
4
  | ${e("common.table.name")} | ${e("common.table.type")} | ${e("common.table.required")} | ${e("common.table.description")} |
@@ -1,4 +1,4 @@
1
- import{r as a,j as l}from"./iframe-DfPay7Zl.js";import{g as O,c as V}from"./store-Ce3Ikv5g.js";import{g as L,I as H}from"./input-wrapper-CgaUwbbE.js";import{S}from"./search-field-DINESW8Y.js";import{T as k}from"./typography-CB8hPDyK.js";import{u as A}from"./index-EGt7xBnA.js";import{S as _,a as W,b as F}from"./sheet-footer-nEdxsYan.js";import{I as B}from"./icon-CdiFzFyf.js";import{S as q}from"./skeleton-B12XbNAJ.js";import{O as $}from"./option-item-CpeNcb5w.js";const m=O("dropdown"),G=a.forwardRef((o,v)=>{const{wrapper:u,props:i}=L(o),[b,t]=a.useState(!1),[n,R]=A(i,{trigger:"onChange",valuePropName:"value"}),[s,h]=a.useState(""),{options:d,searchFilter:w=K,emptyText:N="Không tìm thấy",searchProps:j,allowSearch:C,placeholder:T,sheetTitle:M=u.label?.text||u.label?.children,renderLabel:f=e=>e.label,renderItem:x=(e,r)=>l.jsx($,{theme:"neutral",divider:r.index<r.options.length-1,selected:e.value===r.value,children:f(e,n)}),children:g}=i,c=d.find(e=>e.value===n),I=a.useMemo(()=>d.filter(e=>w(e,s)),[d,s,w]),z=typeof n>"u"||n===null,E=()=>c?i.renderValue?i.renderValue(c):f(c,n):n;a.useEffect(()=>{b||h("")},[b]),a.useImperativeHandle(v,()=>({open:()=>t(!0),close:()=>t(!1)}));const y=()=>{u.disabled||i.loading||t(!0)},D=()=>{if(g){if(a.isValidElement(g)){const e=g,r=e.props.onClick;return a.cloneElement(e,{onClick:(p,...P)=>{r?.(p,...P),y()}})}return l.jsx("div",{onClick:y,children:g})}return l.jsxs(H,{trailingIcon:{name:"chevron-down",color:"alias-object-secondary",size:20},...u,className:V(m,u.className),isFocus:b,onClick:y,loadingNode:i.loading&&l.jsxs("div",{className:`${m}__loading`,children:[l.jsx(q,{width:128,height:13,shape:"pill"}),l.jsx(q,{width:24,height:24,shape:"pill"})]}),children:[z&&l.jsx(k,{size:"base",weight:400,color:"alias-object-placeholder",children:T||" "}),!z&&l.jsx(k,{size:"base",weight:400,color:"alias-object-primary",children:E()})]})};return l.jsxs(l.Fragment,{children:[D(),l.jsxs(_,{open:b,onBackdropClick:()=>t(!1),className:`${m}__sheet`,children:[l.jsx(W,{closeIcon:!0,title:M,onCloseClick:()=>t(!1)}),C&&l.jsx("div",{className:`${m}__sheet__search`,children:l.jsx(S,{placeholder:"Tìm kiếm",...j,value:s,onChange:h})}),l.jsxs(F,{horizontalSpace:!1,children:[I.map((e,r,p)=>l.jsx("div",{onClick:()=>{R(e.value),t(!1)},children:x(e,{options:p,value:n,index:r})},e.value)),!I.length&&l.jsxs("div",{className:`${m}__sheet__empty`,children:[l.jsx(B,{name:"newspaper",size:40,color:"alias-object-placeholder"}),l.jsx(k,{size:"small",color:"alias-object-placeholder",children:N})]})]})]})]})}),K=(o,v)=>v?typeof o.label=="string"||typeof o.label=="number"?o.label.toString().toLowerCase().includes(v.toLowerCase()):!1:!0;G.__docgenInfo={description:"",methods:[{name:"open",docblock:null,modifiers:[],params:[],returns:null},{name:"close",docblock:null,modifiers:[],params:[],returns:null}],displayName:"Dropdown",props:{shape:{required:!1,tsType:{name:"union",raw:"'rounded' | 'pill'",elements:[{name:"literal",value:"'rounded'"},{name:"literal",value:"'pill'"}]},description:""},disabled:{required:!1,tsType:{name:"boolean"},description:""},success:{required:!1,tsType:{name:"boolean"},description:""},successMessage:{required:!1,tsType:{name:"ReactNode"},description:""},error:{required:!1,tsType:{name:"boolean"},description:""},errorMessage:{required:!1,tsType:{name:"ReactNode"},description:""},label:{required:!1,tsType:{name:"intersection",raw:`ComponentPropsWithRef<'label'> & {
1
+ import{r as a,j as l}from"./iframe-C0PGuV5s.js";import{g as O,c as V}from"./store-BmYgrUro.js";import{g as L,I as H}from"./input-wrapper-DkEl0Eih.js";import{S}from"./search-field-CophTGGH.js";import{T as k}from"./typography-BcLxefPi.js";import{u as A}from"./index-DWjPAWoJ.js";import{S as _,a as W,b as F}from"./sheet-footer-BL2JAvmb.js";import{I as B}from"./icon-CgGksgRS.js";import{S as q}from"./skeleton-CmGRbWqE.js";import{O as $}from"./option-item-Bmby544G.js";const m=O("dropdown"),G=a.forwardRef((o,v)=>{const{wrapper:u,props:i}=L(o),[b,t]=a.useState(!1),[n,R]=A(i,{trigger:"onChange",valuePropName:"value"}),[s,h]=a.useState(""),{options:d,searchFilter:w=K,emptyText:N="Không tìm thấy",searchProps:j,allowSearch:C,placeholder:T,sheetTitle:M=u.label?.text||u.label?.children,renderLabel:f=e=>e.label,renderItem:x=(e,r)=>l.jsx($,{theme:"neutral",divider:r.index<r.options.length-1,selected:e.value===r.value,children:f(e,n)}),children:g}=i,c=d.find(e=>e.value===n),I=a.useMemo(()=>d.filter(e=>w(e,s)),[d,s,w]),z=typeof n>"u"||n===null,E=()=>c?i.renderValue?i.renderValue(c):f(c,n):n;a.useEffect(()=>{b||h("")},[b]),a.useImperativeHandle(v,()=>({open:()=>t(!0),close:()=>t(!1)}));const y=()=>{u.disabled||i.loading||t(!0)},D=()=>{if(g){if(a.isValidElement(g)){const e=g,r=e.props.onClick;return a.cloneElement(e,{onClick:(p,...P)=>{r?.(p,...P),y()}})}return l.jsx("div",{onClick:y,children:g})}return l.jsxs(H,{trailingIcon:{name:"chevron-down",color:"alias-object-secondary",size:20},...u,className:V(m,u.className),isFocus:b,onClick:y,loadingNode:i.loading&&l.jsxs("div",{className:`${m}__loading`,children:[l.jsx(q,{width:128,height:13,shape:"pill"}),l.jsx(q,{width:24,height:24,shape:"pill"})]}),children:[z&&l.jsx(k,{size:"base",weight:400,color:"alias-object-placeholder",children:T||" "}),!z&&l.jsx(k,{size:"base",weight:400,color:"alias-object-primary",children:E()})]})};return l.jsxs(l.Fragment,{children:[D(),l.jsxs(_,{open:b,onBackdropClick:()=>t(!1),className:`${m}__sheet`,children:[l.jsx(W,{closeIcon:!0,title:M,onCloseClick:()=>t(!1)}),C&&l.jsx("div",{className:`${m}__sheet__search`,children:l.jsx(S,{placeholder:"Tìm kiếm",...j,value:s,onChange:h})}),l.jsxs(F,{horizontalSpace:!1,children:[I.map((e,r,p)=>l.jsx("div",{onClick:()=>{R(e.value),t(!1)},children:x(e,{options:p,value:n,index:r})},e.value)),!I.length&&l.jsxs("div",{className:`${m}__sheet__empty`,children:[l.jsx(B,{name:"newspaper",size:40,color:"alias-object-placeholder"}),l.jsx(k,{size:"small",color:"alias-object-placeholder",children:N})]})]})]})]})}),K=(o,v)=>v?typeof o.label=="string"||typeof o.label=="number"?o.label.toString().toLowerCase().includes(v.toLowerCase()):!1:!0;G.__docgenInfo={description:"",methods:[{name:"open",docblock:null,modifiers:[],params:[],returns:null},{name:"close",docblock:null,modifiers:[],params:[],returns:null}],displayName:"Dropdown",props:{shape:{required:!1,tsType:{name:"union",raw:"'rounded' | 'pill'",elements:[{name:"literal",value:"'rounded'"},{name:"literal",value:"'pill'"}]},description:""},disabled:{required:!1,tsType:{name:"boolean"},description:""},success:{required:!1,tsType:{name:"boolean"},description:""},successMessage:{required:!1,tsType:{name:"ReactNode"},description:""},error:{required:!1,tsType:{name:"boolean"},description:""},errorMessage:{required:!1,tsType:{name:"ReactNode"},description:""},label:{required:!1,tsType:{name:"intersection",raw:`ComponentPropsWithRef<'label'> & {
2
2
  disabled?: boolean
3
3
  required?: boolean
4
4
  icon?: IIconProps | ReactNode
@@ -1,4 +1,4 @@
1
- import{j as n,r as u}from"./iframe-DfPay7Zl.js";import{T as w,S as b,M as c,P as h,a as v}from"./blocks-DKR3P4qW.js";import{D as e}from"./dropdown-Dtomaqpw.js";import{t as o}from"./store-Ce3Ikv5g.js";import"./preload-helper-PPVm8Dsz.js";import"./index-cMNObl2z.js";import"./input-wrapper-CgaUwbbE.js";import"./icon-CdiFzFyf.js";import"./colors-_6nFGM3e.js";import"./label-D44azUgi.js";import"./typography-CB8hPDyK.js";import"./skeleton-B12XbNAJ.js";import"./omit-BWHsnDSR.js";import"./_baseClone-DQVxEhny.js";import"./search-field-DINESW8Y.js";import"./text-field-CGWNqitB.js";import"./index-EGt7xBnA.js";import"./index-B-Ksafg0.js";import"./sheet-footer-nEdxsYan.js";import"./navigation-bar-DK3TxcTu.js";import"./proxy-B4G9nIBd.js";import"./visibility-sensor-Jf-Nmil6.js";import"./index-BWpuenI4.js";import"./react-I9jCW2VV.js";import"./app-CTv8lFU3.js";import"./button-DJH3RlJl.js";import"./image-CMKb-R3x.js";import"./toast-provider-DKSrfhJD.js";import"./bottom-tab-bar-B6IAoRwz.js";import"./option-item-CpeNcb5w.js";const y=()=>{const d=`
1
+ import{j as n,r as u}from"./iframe-C0PGuV5s.js";import{T as w,S as b,M as c,P as h,a as v}from"./blocks-D4qvS4eZ.js";import{D as e}from"./dropdown-BeoO7m-R.js";import{t as o}from"./store-BmYgrUro.js";import"./preload-helper-PPVm8Dsz.js";import"./index-1AHvPexM.js";import"./input-wrapper-DkEl0Eih.js";import"./icon-CgGksgRS.js";import"./colors-_6nFGM3e.js";import"./label-CHVpMhb5.js";import"./typography-BcLxefPi.js";import"./skeleton-CmGRbWqE.js";import"./omit-D04qL5V_.js";import"./_baseClone-4nOrhHpR.js";import"./search-field-CophTGGH.js";import"./text-field-DrODy0yz.js";import"./index-DWjPAWoJ.js";import"./index-B-Ksafg0.js";import"./sheet-footer-BL2JAvmb.js";import"./navigation-bar-TpF0DSXB.js";import"./proxy-edvPwIiD.js";import"./visibility-sensor-FN9n9CLs.js";import"./index-BLzgbpm2.js";import"./react-zqqxT5R_.js";import"./app-B__CxZQv.js";import"./button-CbLEqALK.js";import"./image-BdsCB1je.js";import"./toast-provider-ChNGFQlt.js";import"./bottom-tab-bar-UaYvPAic.js";import"./option-item-Bmby544G.js";const y=()=>{const d=`
2
2
  ## ${o("common.table.title")}
3
3
 
4
4
  | ${o("common.table.name")} | ${o("common.table.type")} | ${o("common.table.required")} | ${o("common.table.description")} |
@@ -1 +1 @@
1
- import{r as _}from"./iframe-DfPay7Zl.js";function en(t){return Object.prototype.toString.call(t)==="[object Object]"}function zt(t){return en(t)||Array.isArray(t)}function on(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function vt(t,n){const o=Object.keys(t),s=Object.keys(n);if(o.length!==s.length)return!1;const c=JSON.stringify(Object.keys(t.breakpoints||{})),r=JSON.stringify(Object.keys(n.breakpoints||{}));return c!==r?!1:o.every(e=>{const f=t[e],i=n[e];return typeof f=="function"?`${f}`==`${i}`:!zt(f)||!zt(i)?f===i:vt(f,i)})}function jt(t){return t.concat().sort((n,o)=>n.name>o.name?1:-1).map(n=>n.options)}function rn(t,n){if(t.length!==n.length)return!1;const o=jt(t),s=jt(n);return o.every((c,r)=>{const e=s[r];return vt(c,e)})}function At(t){return typeof t=="number"}function It(t){return typeof t=="string"}function St(t){return typeof t=="boolean"}function Gt(t){return Object.prototype.toString.call(t)==="[object Object]"}function w(t){return Math.abs(t)}function Ot(t){return Math.sign(t)}function at(t,n){return w(t-n)}function sn(t,n){if(t===0||n===0||w(t)<=w(n))return 0;const o=at(w(t),w(n));return w(o/t)}function cn(t){return Math.round(t*100)/100}function lt(t){return dt(t).map(Number)}function z(t){return t[mt(t)]}function mt(t){return Math.max(0,t.length-1)}function Dt(t,n){return n===mt(t)}function Ht(t,n=0){return Array.from(Array(t),(o,s)=>n+s)}function dt(t){return Object.keys(t)}function Rt(t,n){return[t,n].reduce((o,s)=>(dt(s).forEach(c=>{const r=o[c],e=s[c],f=Gt(r)&&Gt(e);o[c]=f?Rt(r,e):e}),o),{})}function Tt(t,n){return typeof n.MouseEvent<"u"&&t instanceof n.MouseEvent}function un(t,n){const o={start:s,center:c,end:r};function s(){return 0}function c(i){return r(i)/2}function r(i){return n-i}function e(i,u){return It(t)?o[t](i):t(n,i,u)}return{measure:e}}function pt(){let t=[];function n(c,r,e,f={passive:!0}){let i;if("addEventListener"in c)c.addEventListener(r,e,f),i=()=>c.removeEventListener(r,e,f);else{const u=c;u.addListener(e),i=()=>u.removeListener(e)}return t.push(i),s}function o(){t=t.filter(c=>c())}const s={add:n,clear:o};return s}function fn(t,n,o,s){const c=pt(),r=1e3/60;let e=null,f=0,i=0;function u(){c.add(t,"visibilitychange",()=>{t.hidden&&l()})}function h(){b(),c.clear()}function d(g){if(!i)return;e||(e=g,o(),o());const a=g-e;for(e=g,f+=a;f>=r;)o(),f-=r;const S=f/r;s(S),i&&(i=n.requestAnimationFrame(d))}function p(){i||(i=n.requestAnimationFrame(d))}function b(){n.cancelAnimationFrame(i),e=null,f=0,i=0}function l(){e=null,f=0}return{init:u,destroy:h,start:p,stop:b,update:o,render:s}}function an(t,n){const o=n==="rtl",s=t==="y",c=s?"y":"x",r=s?"x":"y",e=!s&&o?-1:1,f=h(),i=d();function u(l){const{height:m,width:g}=l;return s?m:g}function h(){return s?"top":o?"right":"left"}function d(){return s?"bottom":o?"left":"right"}function p(l){return l*e}return{scroll:c,cross:r,startEdge:f,endEdge:i,measureSize:u,direction:p}}function nt(t=0,n=0){const o=w(t-n);function s(u){return u<t}function c(u){return u>n}function r(u){return s(u)||c(u)}function e(u){return r(u)?s(u)?t:n:u}function f(u){return o?u-o*Math.ceil((u-n)/o):u}return{length:o,max:n,min:t,constrain:e,reachedAny:r,reachedMax:c,reachedMin:s,removeOffset:f}}function qt(t,n,o){const{constrain:s}=nt(0,t),c=t+1;let r=e(n);function e(p){return o?w((c+p)%c):s(p)}function f(){return r}function i(p){return r=e(p),d}function u(p){return h().set(f()+p)}function h(){return qt(t,f(),o)}const d={get:f,set:i,add:u,clone:h};return d}function ln(t,n,o,s,c,r,e,f,i,u,h,d,p,b,l,m,g,a,S){const{cross:x,direction:I}=t,D=["INPUT","SELECT","TEXTAREA"],T={passive:!1},E=pt(),L=pt(),v=nt(50,225).constrain(b.measure(20)),P={mouse:300,touch:400},A={mouse:500,touch:600},N=l?43:25;let j=!1,G=0,H=0,Z=!1,X=!1,$=!1,U=!1;function st(y){if(!S)return;function O(k){(St(S)||S(y,k))&&ct(k)}const F=n;E.add(F,"dragstart",k=>k.preventDefault(),T).add(F,"touchmove",()=>{},T).add(F,"touchend",()=>{}).add(F,"touchstart",O).add(F,"mousedown",O).add(F,"touchcancel",C).add(F,"contextmenu",C).add(F,"click",Q,!0)}function R(){E.clear(),L.clear()}function et(){const y=U?o:n;L.add(y,"touchmove",B,T).add(y,"touchend",C).add(y,"mousemove",B,T).add(y,"mouseup",C)}function ot(y){const O=y.nodeName||"";return D.includes(O)}function K(){return(l?A:P)[U?"mouse":"touch"]}function it(y,O){const F=d.add(Ot(y)*-1),k=h.byDistance(y,!l).distance;return l||w(y)<v?k:g&&O?k*.5:h.byIndex(F.get(),0).distance}function ct(y){const O=Tt(y,s);U=O,$=l&&O&&!y.buttons&&j,j=at(c.get(),e.get())>=2,!(O&&y.button!==0)&&(ot(y.target)||(Z=!0,r.pointerDown(y),u.useFriction(0).useDuration(0),c.set(e),et(),G=r.readPoint(y),H=r.readPoint(y,x),p.emit("pointerDown")))}function B(y){if(!Tt(y,s)&&y.touches.length>=2)return C(y);const F=r.readPoint(y),k=r.readPoint(y,x),q=at(F,G),J=at(k,H);if(!X&&!U&&(!y.cancelable||(X=q>J,!X)))return C(y);const W=r.pointerMove(y);q>m&&($=!0),u.useFriction(.3).useDuration(.75),f.start(),c.add(I(W)),y.preventDefault()}function C(y){const F=h.byDistance(0,!1).index!==d.get(),k=r.pointerUp(y)*K(),q=it(I(k),F),J=sn(k,q),W=N-10*J,Y=a+J/50;X=!1,Z=!1,L.clear(),u.useDuration(W).useFriction(Y),i.distance(q,!l),U=!1,p.emit("pointerUp")}function Q(y){$&&(y.stopPropagation(),y.preventDefault(),$=!1)}function V(){return Z}return{init:st,destroy:R,pointerDown:V}}function dn(t,n){let s,c;function r(d){return d.timeStamp}function e(d,p){const l=`client${(p||t.scroll)==="x"?"X":"Y"}`;return(Tt(d,n)?d:d.touches[0])[l]}function f(d){return s=d,c=d,e(d)}function i(d){const p=e(d)-e(c),b=r(d)-r(s)>170;return c=d,b&&(s=d),p}function u(d){if(!s||!c)return 0;const p=e(c)-e(s),b=r(d)-r(s),l=r(d)-r(c)>170,m=p/b;return b&&!l&&w(m)>.1?m:0}return{pointerDown:f,pointerMove:i,pointerUp:u,readPoint:e}}function pn(){function t(o){const{offsetTop:s,offsetLeft:c,offsetWidth:r,offsetHeight:e}=o;return{top:s,right:c+r,bottom:s+e,left:c,width:r,height:e}}return{measure:t}}function mn(t){function n(s){return t*(s/100)}return{measure:n}}function gn(t,n,o,s,c,r,e){const f=[t].concat(s);let i,u,h=[],d=!1;function p(g){return c.measureSize(e.measure(g))}function b(g){if(!r)return;u=p(t),h=s.map(p);function a(S){for(const x of S){if(d)return;const I=x.target===t,D=s.indexOf(x.target),T=I?u:h[D],E=p(I?t:s[D]);if(w(E-T)>=.5){g.reInit(),n.emit("resize");break}}}i=new ResizeObserver(S=>{(St(r)||r(g,S))&&a(S)}),o.requestAnimationFrame(()=>{f.forEach(S=>i.observe(S))})}function l(){d=!0,i&&i.disconnect()}return{init:b,destroy:l}}function hn(t,n,o,s,c,r){let e=0,f=0,i=c,u=r,h=t.get(),d=0;function p(){const T=s.get()-t.get(),E=!i;let L=0;return E?(e=0,o.set(s),t.set(s),L=T):(o.set(t),e+=T/i,e*=u,h+=e,t.add(e),L=h-d),f=Ot(L),d=h,D}function b(){const T=s.get()-n.get();return w(T)<.001}function l(){return i}function m(){return f}function g(){return e}function a(){return x(c)}function S(){return I(r)}function x(T){return i=T,D}function I(T){return u=T,D}const D={direction:m,duration:l,velocity:g,seek:p,settled:b,useBaseFriction:S,useBaseDuration:a,useFriction:I,useDuration:x};return D}function Sn(t,n,o,s,c){const r=c.measure(10),e=c.measure(50),f=nt(.1,.99);let i=!1;function u(){return!(i||!t.reachedAny(o.get())||!t.reachedAny(n.get()))}function h(b){if(!u())return;const l=t.reachedMin(n.get())?"min":"max",m=w(t[l]-n.get()),g=o.get()-n.get(),a=f.constrain(m/e);o.subtract(g*a),!b&&w(g)<r&&(o.set(t.constrain(o.get())),s.useDuration(25).useBaseFriction())}function d(b){i=!b}return{shouldConstrain:u,constrain:h,toggleActive:d}}function yn(t,n,o,s,c){const r=nt(-n+t,0),e=d(),f=h(),i=p();function u(l,m){return at(l,m)<=1}function h(){const l=e[0],m=z(e),g=e.lastIndexOf(l),a=e.indexOf(m)+1;return nt(g,a)}function d(){return o.map((l,m)=>{const{min:g,max:a}=r,S=r.constrain(l),x=!m,I=Dt(o,m);return x?a:I||u(g,S)?g:u(a,S)?a:S}).map(l=>parseFloat(l.toFixed(3)))}function p(){if(n<=t+c)return[r.max];if(s==="keepSnaps")return e;const{min:l,max:m}=f;return e.slice(l,m)}return{snapsContained:i,scrollContainLimit:f}}function bn(t,n,o){const s=n[0],c=o?s-t:z(n);return{limit:nt(c,s)}}function xn(t,n,o,s){const r=n.min+.1,e=n.max+.1,{reachedMin:f,reachedMax:i}=nt(r,e);function u(p){return p===1?i(o.get()):p===-1?f(o.get()):!1}function h(p){if(!u(p))return;const b=t*(p*-1);s.forEach(l=>l.add(b))}return{loop:h}}function En(t){const{max:n,length:o}=t;function s(r){const e=r-n;return o?e/-o:0}return{get:s}}function Ln(t,n,o,s,c){const{startEdge:r,endEdge:e}=t,{groupSlides:f}=c,i=d().map(n.measure),u=p(),h=b();function d(){return f(s).map(m=>z(m)[e]-m[0][r]).map(w)}function p(){return s.map(m=>o[r]-m[r]).map(m=>-w(m))}function b(){return f(u).map(m=>m[0]).map((m,g)=>m+i[g])}return{snaps:u,snapsAligned:h}}function In(t,n,o,s,c,r){const{groupSlides:e}=c,{min:f,max:i}=s,u=h();function h(){const p=e(r),b=!t||n==="keepSnaps";return o.length===1?[r]:b?p:p.slice(f,i).map((l,m,g)=>{const a=!m,S=Dt(g,m);if(a){const x=z(g[0])+1;return Ht(x)}if(S){const x=mt(r)-z(g)[0]+1;return Ht(x,z(g)[0])}return l})}return{slideRegistry:u}}function Tn(t,n,o,s,c){const{reachedAny:r,removeOffset:e,constrain:f}=s;function i(l){return l.concat().sort((m,g)=>w(m)-w(g))[0]}function u(l){const m=t?e(l):f(l),g=n.map((S,x)=>({diff:h(S-m,0),index:x})).sort((S,x)=>w(S.diff)-w(x.diff)),{index:a}=g[0];return{index:a,distance:m}}function h(l,m){const g=[l,l+o,l-o];if(!t)return l;if(!m)return i(g);const a=g.filter(S=>Ot(S)===m);return a.length?i(a):z(g)-o}function d(l,m){const g=n[l]-c.get(),a=h(g,m);return{index:l,distance:a}}function p(l,m){const g=c.get()+l,{index:a,distance:S}=u(g),x=!t&&r(g);if(!m||x)return{index:a,distance:l};const I=n[a]-S,D=l+h(I,0);return{index:a,distance:D}}return{byDistance:p,byIndex:d,shortcut:h}}function vn(t,n,o,s,c,r,e){function f(d){const p=d.distance,b=d.index!==n.get();r.add(p),p&&(s.duration()?t.start():(t.update(),t.render(1),t.update())),b&&(o.set(n.get()),n.set(d.index),e.emit("select"))}function i(d,p){const b=c.byDistance(d,p);f(b)}function u(d,p){const b=n.clone().set(d),l=c.byIndex(b.get(),p);f(l)}return{distance:i,index:u}}function An(t,n,o,s,c,r,e,f){const i={passive:!0,capture:!0};let u=0;function h(b){if(!f)return;function l(m){if(new Date().getTime()-u>10)return;e.emit("slideFocusStart"),t.scrollLeft=0;const S=o.findIndex(x=>x.includes(m));At(S)&&(c.useDuration(0),s.index(S,0),e.emit("slideFocus"))}r.add(document,"keydown",d,!1),n.forEach((m,g)=>{r.add(m,"focus",a=>{(St(f)||f(b,a))&&l(g)},i)})}function d(b){b.code==="Tab"&&(u=new Date().getTime())}return{init:h}}function ft(t){let n=t;function o(){return n}function s(i){n=e(i)}function c(i){n+=e(i)}function r(i){n-=e(i)}function e(i){return At(i)?i:i.get()}return{get:o,set:s,add:c,subtract:r}}function $t(t,n){const o=t.scroll==="x"?e:f,s=n.style;let c=null,r=!1;function e(p){return`translate3d(${p}px,0px,0px)`}function f(p){return`translate3d(0px,${p}px,0px)`}function i(p){if(r)return;const b=cn(t.direction(p));b!==c&&(s.transform=o(b),c=b)}function u(p){r=!p}function h(){r||(s.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:h,to:i,toggleActive:u}}function On(t,n,o,s,c,r,e,f,i){const h=lt(c),d=lt(c).reverse(),p=a().concat(S());function b(E,L){return E.reduce((v,P)=>v-c[P],L)}function l(E,L){return E.reduce((v,P)=>b(v,L)>0?v.concat([P]):v,[])}function m(E){return r.map((L,v)=>({start:L-s[v]+.5+E,end:L+n-.5+E}))}function g(E,L,v){const P=m(L);return E.map(A=>{const N=v?0:-o,j=v?o:0,G=v?"end":"start",H=P[A][G];return{index:A,loopPoint:H,slideLocation:ft(-1),translate:$t(t,i[A]),target:()=>f.get()>H?N:j}})}function a(){const E=e[0],L=l(d,E);return g(L,o,!1)}function S(){const E=n-e[0]-1,L=l(h,E);return g(L,-o,!0)}function x(){return p.every(({index:E})=>{const L=h.filter(v=>v!==E);return b(L,n)<=.1})}function I(){p.forEach(E=>{const{target:L,translate:v,slideLocation:P}=E,A=L();A!==P.get()&&(v.to(A),P.set(A))})}function D(){p.forEach(E=>E.translate.clear())}return{canLoop:x,clear:D,loop:I,loopPoints:p}}function Dn(t,n,o){let s,c=!1;function r(i){if(!o)return;function u(h){for(const d of h)if(d.type==="childList"){i.reInit(),n.emit("slidesChanged");break}}s=new MutationObserver(h=>{c||(St(o)||o(i,h))&&u(h)}),s.observe(t,{childList:!0})}function e(){s&&s.disconnect(),c=!0}return{init:r,destroy:e}}function Mn(t,n,o,s){const c={};let r=null,e=null,f,i=!1;function u(){f=new IntersectionObserver(l=>{i||(l.forEach(m=>{const g=n.indexOf(m.target);c[g]=m}),r=null,e=null,o.emit("slidesInView"))},{root:t.parentElement,threshold:s}),n.forEach(l=>f.observe(l))}function h(){f&&f.disconnect(),i=!0}function d(l){return dt(c).reduce((m,g)=>{const a=parseInt(g),{isIntersecting:S}=c[a];return(l&&S||!l&&!S)&&m.push(a),m},[])}function p(l=!0){if(l&&r)return r;if(!l&&e)return e;const m=d(l);return l&&(r=m),l||(e=m),m}return{init:u,destroy:h,get:p}}function wn(t,n,o,s,c,r){const{measureSize:e,startEdge:f,endEdge:i}=t,u=o[0]&&c,h=l(),d=m(),p=o.map(e),b=g();function l(){if(!u)return 0;const S=o[0];return w(n[f]-S[f])}function m(){if(!u)return 0;const S=r.getComputedStyle(z(s));return parseFloat(S.getPropertyValue(`margin-${i}`))}function g(){return o.map((S,x,I)=>{const D=!x,T=Dt(I,x);return D?p[x]+h:T?p[x]+d:I[x+1][f]-S[f]}).map(w)}return{slideSizes:p,slideSizesWithGaps:b,startGap:h,endGap:d}}function Pn(t,n,o,s,c,r,e,f,i){const{startEdge:u,endEdge:h,direction:d}=t,p=At(o);function b(a,S){return lt(a).filter(x=>x%S===0).map(x=>a.slice(x,x+S))}function l(a){return a.length?lt(a).reduce((S,x,I)=>{const D=z(S)||0,T=D===0,E=x===mt(a),L=c[u]-r[D][u],v=c[u]-r[x][h],P=!s&&T?d(e):0,A=!s&&E?d(f):0,N=w(v-A-(L+P));return I&&N>n+i&&S.push(x),E&&S.push(a.length),S},[]).map((S,x,I)=>{const D=Math.max(I[x-1]||0);return a.slice(D,S)}):[]}function m(a){return p?b(a,o):l(a)}return{groupSlides:m}}function Fn(t,n,o,s,c,r,e){const{align:f,axis:i,direction:u,startIndex:h,loop:d,duration:p,dragFree:b,dragThreshold:l,inViewThreshold:m,slidesToScroll:g,skipSnaps:a,containScroll:S,watchResize:x,watchSlides:I,watchDrag:D,watchFocus:T}=r,E=2,L=pn(),v=L.measure(n),P=o.map(L.measure),A=an(i,u),N=A.measureSize(v),j=mn(N),G=un(f,N),H=!d&&!!S,Z=d||!!S,{slideSizes:X,slideSizesWithGaps:$,startGap:U,endGap:st}=wn(A,v,P,o,Z,c),R=Pn(A,N,g,d,v,P,U,st,E),{snaps:et,snapsAligned:ot}=Ln(A,G,v,P,R),K=-z(et)+z($),{snapsContained:it,scrollContainLimit:ct}=yn(N,K,ot,S,E),B=H?it:ot,{limit:C}=bn(K,B,d),Q=qt(mt(B),h,d),V=Q.clone(),M=lt(o),y=({dragHandler:rt,scrollBody:Et,scrollBounds:Lt,options:{loop:gt}})=>{gt||Lt.constrain(rt.pointerDown()),Et.seek()},O=({scrollBody:rt,translate:Et,location:Lt,offsetLocation:gt,previousLocation:Jt,scrollLooper:Xt,slideLooper:Yt,dragHandler:_t,animation:Zt,eventHandler:Ft,scrollBounds:Wt,options:{loop:Ct}},kt)=>{const Nt=rt.settled(),tn=!Wt.shouldConstrain(),Bt=Ct?Nt:Nt&&tn,Vt=Bt&&!_t.pointerDown();Vt&&Zt.stop();const nn=Lt.get()*kt+Jt.get()*(1-kt);gt.set(nn),Ct&&(Xt.loop(rt.direction()),Yt.loop()),Et.to(gt.get()),Vt&&Ft.emit("settle"),Bt||Ft.emit("scroll")},F=fn(s,c,()=>y(xt),rt=>O(xt,rt)),k=.68,q=B[Q.get()],J=ft(q),W=ft(q),Y=ft(q),tt=ft(q),ut=hn(J,Y,W,tt,p,k),yt=Tn(d,B,K,C,tt),bt=vn(F,Q,V,ut,yt,tt,e),Mt=En(C),wt=pt(),Kt=Mn(n,o,e,m),{slideRegistry:Pt}=In(H,S,B,ct,R,M),Qt=An(t,o,Pt,bt,ut,wt,e,T),xt={ownerDocument:s,ownerWindow:c,eventHandler:e,containerRect:v,slideRects:P,animation:F,axis:A,dragHandler:ln(A,t,s,c,tt,dn(A,c),J,F,bt,ut,yt,Q,e,j,b,l,a,k,D),eventStore:wt,percentOfView:j,index:Q,indexPrevious:V,limit:C,location:J,offsetLocation:Y,previousLocation:W,options:r,resizeHandler:gn(n,e,c,o,A,x,L),scrollBody:ut,scrollBounds:Sn(C,Y,tt,ut,j),scrollLooper:xn(K,C,Y,[J,Y,W,tt]),scrollProgress:Mt,scrollSnapList:B.map(Mt.get),scrollSnaps:B,scrollTarget:yt,scrollTo:bt,slideLooper:On(A,N,K,X,$,et,B,Y,o),slideFocus:Qt,slidesHandler:Dn(n,e,I),slidesInView:Kt,slideIndexes:M,slideRegistry:Pt,slidesToScroll:R,target:tt,translate:$t(A,n)};return xt}function Cn(){let t={},n;function o(u){n=u}function s(u){return t[u]||[]}function c(u){return s(u).forEach(h=>h(n,u)),i}function r(u,h){return t[u]=s(u).concat([h]),i}function e(u,h){return t[u]=s(u).filter(d=>d!==h),i}function f(){t={}}const i={init:o,emit:c,off:e,on:r,clear:f};return i}const kn={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function Nn(t){function n(r,e){return Rt(r,e||{})}function o(r){const e=r.breakpoints||{},f=dt(e).filter(i=>t.matchMedia(i).matches).map(i=>e[i]).reduce((i,u)=>n(i,u),{});return n(r,f)}function s(r){return r.map(e=>dt(e.breakpoints||{})).reduce((e,f)=>e.concat(f),[]).map(t.matchMedia)}return{mergeOptions:n,optionsAtMedia:o,optionsMediaQueries:s}}function Bn(t){let n=[];function o(r,e){return n=e.filter(({options:f})=>t.optionsAtMedia(f).active!==!1),n.forEach(f=>f.init(r,t)),e.reduce((f,i)=>Object.assign(f,{[i.name]:i}),{})}function s(){n=n.filter(r=>r.destroy())}return{init:o,destroy:s}}function ht(t,n,o){const s=t.ownerDocument,c=s.defaultView,r=Nn(c),e=Bn(r),f=pt(),i=Cn(),{mergeOptions:u,optionsAtMedia:h,optionsMediaQueries:d}=r,{on:p,off:b,emit:l}=i,m=A;let g=!1,a,S=u(kn,ht.globalOptions),x=u(S),I=[],D,T,E;function L(){const{container:M,slides:y}=x;T=(It(M)?t.querySelector(M):M)||t.children[0];const F=It(y)?T.querySelectorAll(y):y;E=[].slice.call(F||T.children)}function v(M){const y=Fn(t,T,E,s,c,M,i);if(M.loop&&!y.slideLooper.canLoop()){const O=Object.assign({},M,{loop:!1});return v(O)}return y}function P(M,y){g||(S=u(S,M),x=h(S),I=y||I,L(),a=v(x),d([S,...I.map(({options:O})=>O)]).forEach(O=>f.add(O,"change",A)),x.active&&(a.translate.to(a.location.get()),a.animation.init(),a.slidesInView.init(),a.slideFocus.init(V),a.eventHandler.init(V),a.resizeHandler.init(V),a.slidesHandler.init(V),a.options.loop&&a.slideLooper.loop(),T.offsetParent&&E.length&&a.dragHandler.init(V),D=e.init(V,I)))}function A(M,y){const O=R();N(),P(u({startIndex:O},M),y),i.emit("reInit")}function N(){a.dragHandler.destroy(),a.eventStore.clear(),a.translate.clear(),a.slideLooper.clear(),a.resizeHandler.destroy(),a.slidesHandler.destroy(),a.slidesInView.destroy(),a.animation.destroy(),e.destroy(),f.clear()}function j(){g||(g=!0,f.clear(),N(),i.emit("destroy"),i.clear())}function G(M,y,O){!x.active||g||(a.scrollBody.useBaseFriction().useDuration(y===!0?0:x.duration),a.scrollTo.index(M,O||0))}function H(M){const y=a.index.add(1).get();G(y,M,-1)}function Z(M){const y=a.index.add(-1).get();G(y,M,1)}function X(){return a.index.add(1).get()!==R()}function $(){return a.index.add(-1).get()!==R()}function U(){return a.scrollSnapList}function st(){return a.scrollProgress.get(a.offsetLocation.get())}function R(){return a.index.get()}function et(){return a.indexPrevious.get()}function ot(){return a.slidesInView.get()}function K(){return a.slidesInView.get(!1)}function it(){return D}function ct(){return a}function B(){return t}function C(){return T}function Q(){return E}const V={canScrollNext:X,canScrollPrev:$,containerNode:C,internalEngine:ct,destroy:j,off:b,on:p,emit:l,plugins:it,previousScrollSnap:et,reInit:m,rootNode:B,scrollNext:H,scrollPrev:Z,scrollProgress:st,scrollSnapList:U,scrollTo:G,selectedScrollSnap:R,slideNodes:Q,slidesInView:ot,slidesNotInView:K};return P(n,o),setTimeout(()=>i.emit("init"),0),V}ht.globalOptions=void 0;function Ut(t={},n=[]){const o=_.useRef(t),s=_.useRef(n),[c,r]=_.useState(),[e,f]=_.useState(),i=_.useCallback(()=>{c&&c.reInit(o.current,s.current)},[c]);return _.useEffect(()=>{vt(o.current,t)||(o.current=t,i())},[t,i]),_.useEffect(()=>{rn(s.current,n)||(s.current=n,i())},[n,i]),_.useEffect(()=>{if(on()&&e){ht.globalOptions=Ut.globalOptions;const u=ht(e,o.current,s.current);return r(u),()=>u.destroy()}else r(void 0)},[e,r]),[f,c]}Ut.globalOptions=void 0;export{Ut as u};
1
+ import{r as _}from"./iframe-C0PGuV5s.js";function en(t){return Object.prototype.toString.call(t)==="[object Object]"}function zt(t){return en(t)||Array.isArray(t)}function on(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function vt(t,n){const o=Object.keys(t),s=Object.keys(n);if(o.length!==s.length)return!1;const c=JSON.stringify(Object.keys(t.breakpoints||{})),r=JSON.stringify(Object.keys(n.breakpoints||{}));return c!==r?!1:o.every(e=>{const f=t[e],i=n[e];return typeof f=="function"?`${f}`==`${i}`:!zt(f)||!zt(i)?f===i:vt(f,i)})}function jt(t){return t.concat().sort((n,o)=>n.name>o.name?1:-1).map(n=>n.options)}function rn(t,n){if(t.length!==n.length)return!1;const o=jt(t),s=jt(n);return o.every((c,r)=>{const e=s[r];return vt(c,e)})}function At(t){return typeof t=="number"}function It(t){return typeof t=="string"}function St(t){return typeof t=="boolean"}function Gt(t){return Object.prototype.toString.call(t)==="[object Object]"}function w(t){return Math.abs(t)}function Ot(t){return Math.sign(t)}function at(t,n){return w(t-n)}function sn(t,n){if(t===0||n===0||w(t)<=w(n))return 0;const o=at(w(t),w(n));return w(o/t)}function cn(t){return Math.round(t*100)/100}function lt(t){return dt(t).map(Number)}function z(t){return t[mt(t)]}function mt(t){return Math.max(0,t.length-1)}function Dt(t,n){return n===mt(t)}function Ht(t,n=0){return Array.from(Array(t),(o,s)=>n+s)}function dt(t){return Object.keys(t)}function Rt(t,n){return[t,n].reduce((o,s)=>(dt(s).forEach(c=>{const r=o[c],e=s[c],f=Gt(r)&&Gt(e);o[c]=f?Rt(r,e):e}),o),{})}function Tt(t,n){return typeof n.MouseEvent<"u"&&t instanceof n.MouseEvent}function un(t,n){const o={start:s,center:c,end:r};function s(){return 0}function c(i){return r(i)/2}function r(i){return n-i}function e(i,u){return It(t)?o[t](i):t(n,i,u)}return{measure:e}}function pt(){let t=[];function n(c,r,e,f={passive:!0}){let i;if("addEventListener"in c)c.addEventListener(r,e,f),i=()=>c.removeEventListener(r,e,f);else{const u=c;u.addListener(e),i=()=>u.removeListener(e)}return t.push(i),s}function o(){t=t.filter(c=>c())}const s={add:n,clear:o};return s}function fn(t,n,o,s){const c=pt(),r=1e3/60;let e=null,f=0,i=0;function u(){c.add(t,"visibilitychange",()=>{t.hidden&&l()})}function h(){b(),c.clear()}function d(g){if(!i)return;e||(e=g,o(),o());const a=g-e;for(e=g,f+=a;f>=r;)o(),f-=r;const S=f/r;s(S),i&&(i=n.requestAnimationFrame(d))}function p(){i||(i=n.requestAnimationFrame(d))}function b(){n.cancelAnimationFrame(i),e=null,f=0,i=0}function l(){e=null,f=0}return{init:u,destroy:h,start:p,stop:b,update:o,render:s}}function an(t,n){const o=n==="rtl",s=t==="y",c=s?"y":"x",r=s?"x":"y",e=!s&&o?-1:1,f=h(),i=d();function u(l){const{height:m,width:g}=l;return s?m:g}function h(){return s?"top":o?"right":"left"}function d(){return s?"bottom":o?"left":"right"}function p(l){return l*e}return{scroll:c,cross:r,startEdge:f,endEdge:i,measureSize:u,direction:p}}function nt(t=0,n=0){const o=w(t-n);function s(u){return u<t}function c(u){return u>n}function r(u){return s(u)||c(u)}function e(u){return r(u)?s(u)?t:n:u}function f(u){return o?u-o*Math.ceil((u-n)/o):u}return{length:o,max:n,min:t,constrain:e,reachedAny:r,reachedMax:c,reachedMin:s,removeOffset:f}}function qt(t,n,o){const{constrain:s}=nt(0,t),c=t+1;let r=e(n);function e(p){return o?w((c+p)%c):s(p)}function f(){return r}function i(p){return r=e(p),d}function u(p){return h().set(f()+p)}function h(){return qt(t,f(),o)}const d={get:f,set:i,add:u,clone:h};return d}function ln(t,n,o,s,c,r,e,f,i,u,h,d,p,b,l,m,g,a,S){const{cross:x,direction:I}=t,D=["INPUT","SELECT","TEXTAREA"],T={passive:!1},E=pt(),L=pt(),v=nt(50,225).constrain(b.measure(20)),P={mouse:300,touch:400},A={mouse:500,touch:600},N=l?43:25;let j=!1,G=0,H=0,Z=!1,X=!1,$=!1,U=!1;function st(y){if(!S)return;function O(k){(St(S)||S(y,k))&&ct(k)}const F=n;E.add(F,"dragstart",k=>k.preventDefault(),T).add(F,"touchmove",()=>{},T).add(F,"touchend",()=>{}).add(F,"touchstart",O).add(F,"mousedown",O).add(F,"touchcancel",C).add(F,"contextmenu",C).add(F,"click",Q,!0)}function R(){E.clear(),L.clear()}function et(){const y=U?o:n;L.add(y,"touchmove",B,T).add(y,"touchend",C).add(y,"mousemove",B,T).add(y,"mouseup",C)}function ot(y){const O=y.nodeName||"";return D.includes(O)}function K(){return(l?A:P)[U?"mouse":"touch"]}function it(y,O){const F=d.add(Ot(y)*-1),k=h.byDistance(y,!l).distance;return l||w(y)<v?k:g&&O?k*.5:h.byIndex(F.get(),0).distance}function ct(y){const O=Tt(y,s);U=O,$=l&&O&&!y.buttons&&j,j=at(c.get(),e.get())>=2,!(O&&y.button!==0)&&(ot(y.target)||(Z=!0,r.pointerDown(y),u.useFriction(0).useDuration(0),c.set(e),et(),G=r.readPoint(y),H=r.readPoint(y,x),p.emit("pointerDown")))}function B(y){if(!Tt(y,s)&&y.touches.length>=2)return C(y);const F=r.readPoint(y),k=r.readPoint(y,x),q=at(F,G),J=at(k,H);if(!X&&!U&&(!y.cancelable||(X=q>J,!X)))return C(y);const W=r.pointerMove(y);q>m&&($=!0),u.useFriction(.3).useDuration(.75),f.start(),c.add(I(W)),y.preventDefault()}function C(y){const F=h.byDistance(0,!1).index!==d.get(),k=r.pointerUp(y)*K(),q=it(I(k),F),J=sn(k,q),W=N-10*J,Y=a+J/50;X=!1,Z=!1,L.clear(),u.useDuration(W).useFriction(Y),i.distance(q,!l),U=!1,p.emit("pointerUp")}function Q(y){$&&(y.stopPropagation(),y.preventDefault(),$=!1)}function V(){return Z}return{init:st,destroy:R,pointerDown:V}}function dn(t,n){let s,c;function r(d){return d.timeStamp}function e(d,p){const l=`client${(p||t.scroll)==="x"?"X":"Y"}`;return(Tt(d,n)?d:d.touches[0])[l]}function f(d){return s=d,c=d,e(d)}function i(d){const p=e(d)-e(c),b=r(d)-r(s)>170;return c=d,b&&(s=d),p}function u(d){if(!s||!c)return 0;const p=e(c)-e(s),b=r(d)-r(s),l=r(d)-r(c)>170,m=p/b;return b&&!l&&w(m)>.1?m:0}return{pointerDown:f,pointerMove:i,pointerUp:u,readPoint:e}}function pn(){function t(o){const{offsetTop:s,offsetLeft:c,offsetWidth:r,offsetHeight:e}=o;return{top:s,right:c+r,bottom:s+e,left:c,width:r,height:e}}return{measure:t}}function mn(t){function n(s){return t*(s/100)}return{measure:n}}function gn(t,n,o,s,c,r,e){const f=[t].concat(s);let i,u,h=[],d=!1;function p(g){return c.measureSize(e.measure(g))}function b(g){if(!r)return;u=p(t),h=s.map(p);function a(S){for(const x of S){if(d)return;const I=x.target===t,D=s.indexOf(x.target),T=I?u:h[D],E=p(I?t:s[D]);if(w(E-T)>=.5){g.reInit(),n.emit("resize");break}}}i=new ResizeObserver(S=>{(St(r)||r(g,S))&&a(S)}),o.requestAnimationFrame(()=>{f.forEach(S=>i.observe(S))})}function l(){d=!0,i&&i.disconnect()}return{init:b,destroy:l}}function hn(t,n,o,s,c,r){let e=0,f=0,i=c,u=r,h=t.get(),d=0;function p(){const T=s.get()-t.get(),E=!i;let L=0;return E?(e=0,o.set(s),t.set(s),L=T):(o.set(t),e+=T/i,e*=u,h+=e,t.add(e),L=h-d),f=Ot(L),d=h,D}function b(){const T=s.get()-n.get();return w(T)<.001}function l(){return i}function m(){return f}function g(){return e}function a(){return x(c)}function S(){return I(r)}function x(T){return i=T,D}function I(T){return u=T,D}const D={direction:m,duration:l,velocity:g,seek:p,settled:b,useBaseFriction:S,useBaseDuration:a,useFriction:I,useDuration:x};return D}function Sn(t,n,o,s,c){const r=c.measure(10),e=c.measure(50),f=nt(.1,.99);let i=!1;function u(){return!(i||!t.reachedAny(o.get())||!t.reachedAny(n.get()))}function h(b){if(!u())return;const l=t.reachedMin(n.get())?"min":"max",m=w(t[l]-n.get()),g=o.get()-n.get(),a=f.constrain(m/e);o.subtract(g*a),!b&&w(g)<r&&(o.set(t.constrain(o.get())),s.useDuration(25).useBaseFriction())}function d(b){i=!b}return{shouldConstrain:u,constrain:h,toggleActive:d}}function yn(t,n,o,s,c){const r=nt(-n+t,0),e=d(),f=h(),i=p();function u(l,m){return at(l,m)<=1}function h(){const l=e[0],m=z(e),g=e.lastIndexOf(l),a=e.indexOf(m)+1;return nt(g,a)}function d(){return o.map((l,m)=>{const{min:g,max:a}=r,S=r.constrain(l),x=!m,I=Dt(o,m);return x?a:I||u(g,S)?g:u(a,S)?a:S}).map(l=>parseFloat(l.toFixed(3)))}function p(){if(n<=t+c)return[r.max];if(s==="keepSnaps")return e;const{min:l,max:m}=f;return e.slice(l,m)}return{snapsContained:i,scrollContainLimit:f}}function bn(t,n,o){const s=n[0],c=o?s-t:z(n);return{limit:nt(c,s)}}function xn(t,n,o,s){const r=n.min+.1,e=n.max+.1,{reachedMin:f,reachedMax:i}=nt(r,e);function u(p){return p===1?i(o.get()):p===-1?f(o.get()):!1}function h(p){if(!u(p))return;const b=t*(p*-1);s.forEach(l=>l.add(b))}return{loop:h}}function En(t){const{max:n,length:o}=t;function s(r){const e=r-n;return o?e/-o:0}return{get:s}}function Ln(t,n,o,s,c){const{startEdge:r,endEdge:e}=t,{groupSlides:f}=c,i=d().map(n.measure),u=p(),h=b();function d(){return f(s).map(m=>z(m)[e]-m[0][r]).map(w)}function p(){return s.map(m=>o[r]-m[r]).map(m=>-w(m))}function b(){return f(u).map(m=>m[0]).map((m,g)=>m+i[g])}return{snaps:u,snapsAligned:h}}function In(t,n,o,s,c,r){const{groupSlides:e}=c,{min:f,max:i}=s,u=h();function h(){const p=e(r),b=!t||n==="keepSnaps";return o.length===1?[r]:b?p:p.slice(f,i).map((l,m,g)=>{const a=!m,S=Dt(g,m);if(a){const x=z(g[0])+1;return Ht(x)}if(S){const x=mt(r)-z(g)[0]+1;return Ht(x,z(g)[0])}return l})}return{slideRegistry:u}}function Tn(t,n,o,s,c){const{reachedAny:r,removeOffset:e,constrain:f}=s;function i(l){return l.concat().sort((m,g)=>w(m)-w(g))[0]}function u(l){const m=t?e(l):f(l),g=n.map((S,x)=>({diff:h(S-m,0),index:x})).sort((S,x)=>w(S.diff)-w(x.diff)),{index:a}=g[0];return{index:a,distance:m}}function h(l,m){const g=[l,l+o,l-o];if(!t)return l;if(!m)return i(g);const a=g.filter(S=>Ot(S)===m);return a.length?i(a):z(g)-o}function d(l,m){const g=n[l]-c.get(),a=h(g,m);return{index:l,distance:a}}function p(l,m){const g=c.get()+l,{index:a,distance:S}=u(g),x=!t&&r(g);if(!m||x)return{index:a,distance:l};const I=n[a]-S,D=l+h(I,0);return{index:a,distance:D}}return{byDistance:p,byIndex:d,shortcut:h}}function vn(t,n,o,s,c,r,e){function f(d){const p=d.distance,b=d.index!==n.get();r.add(p),p&&(s.duration()?t.start():(t.update(),t.render(1),t.update())),b&&(o.set(n.get()),n.set(d.index),e.emit("select"))}function i(d,p){const b=c.byDistance(d,p);f(b)}function u(d,p){const b=n.clone().set(d),l=c.byIndex(b.get(),p);f(l)}return{distance:i,index:u}}function An(t,n,o,s,c,r,e,f){const i={passive:!0,capture:!0};let u=0;function h(b){if(!f)return;function l(m){if(new Date().getTime()-u>10)return;e.emit("slideFocusStart"),t.scrollLeft=0;const S=o.findIndex(x=>x.includes(m));At(S)&&(c.useDuration(0),s.index(S,0),e.emit("slideFocus"))}r.add(document,"keydown",d,!1),n.forEach((m,g)=>{r.add(m,"focus",a=>{(St(f)||f(b,a))&&l(g)},i)})}function d(b){b.code==="Tab"&&(u=new Date().getTime())}return{init:h}}function ft(t){let n=t;function o(){return n}function s(i){n=e(i)}function c(i){n+=e(i)}function r(i){n-=e(i)}function e(i){return At(i)?i:i.get()}return{get:o,set:s,add:c,subtract:r}}function $t(t,n){const o=t.scroll==="x"?e:f,s=n.style;let c=null,r=!1;function e(p){return`translate3d(${p}px,0px,0px)`}function f(p){return`translate3d(0px,${p}px,0px)`}function i(p){if(r)return;const b=cn(t.direction(p));b!==c&&(s.transform=o(b),c=b)}function u(p){r=!p}function h(){r||(s.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:h,to:i,toggleActive:u}}function On(t,n,o,s,c,r,e,f,i){const h=lt(c),d=lt(c).reverse(),p=a().concat(S());function b(E,L){return E.reduce((v,P)=>v-c[P],L)}function l(E,L){return E.reduce((v,P)=>b(v,L)>0?v.concat([P]):v,[])}function m(E){return r.map((L,v)=>({start:L-s[v]+.5+E,end:L+n-.5+E}))}function g(E,L,v){const P=m(L);return E.map(A=>{const N=v?0:-o,j=v?o:0,G=v?"end":"start",H=P[A][G];return{index:A,loopPoint:H,slideLocation:ft(-1),translate:$t(t,i[A]),target:()=>f.get()>H?N:j}})}function a(){const E=e[0],L=l(d,E);return g(L,o,!1)}function S(){const E=n-e[0]-1,L=l(h,E);return g(L,-o,!0)}function x(){return p.every(({index:E})=>{const L=h.filter(v=>v!==E);return b(L,n)<=.1})}function I(){p.forEach(E=>{const{target:L,translate:v,slideLocation:P}=E,A=L();A!==P.get()&&(v.to(A),P.set(A))})}function D(){p.forEach(E=>E.translate.clear())}return{canLoop:x,clear:D,loop:I,loopPoints:p}}function Dn(t,n,o){let s,c=!1;function r(i){if(!o)return;function u(h){for(const d of h)if(d.type==="childList"){i.reInit(),n.emit("slidesChanged");break}}s=new MutationObserver(h=>{c||(St(o)||o(i,h))&&u(h)}),s.observe(t,{childList:!0})}function e(){s&&s.disconnect(),c=!0}return{init:r,destroy:e}}function Mn(t,n,o,s){const c={};let r=null,e=null,f,i=!1;function u(){f=new IntersectionObserver(l=>{i||(l.forEach(m=>{const g=n.indexOf(m.target);c[g]=m}),r=null,e=null,o.emit("slidesInView"))},{root:t.parentElement,threshold:s}),n.forEach(l=>f.observe(l))}function h(){f&&f.disconnect(),i=!0}function d(l){return dt(c).reduce((m,g)=>{const a=parseInt(g),{isIntersecting:S}=c[a];return(l&&S||!l&&!S)&&m.push(a),m},[])}function p(l=!0){if(l&&r)return r;if(!l&&e)return e;const m=d(l);return l&&(r=m),l||(e=m),m}return{init:u,destroy:h,get:p}}function wn(t,n,o,s,c,r){const{measureSize:e,startEdge:f,endEdge:i}=t,u=o[0]&&c,h=l(),d=m(),p=o.map(e),b=g();function l(){if(!u)return 0;const S=o[0];return w(n[f]-S[f])}function m(){if(!u)return 0;const S=r.getComputedStyle(z(s));return parseFloat(S.getPropertyValue(`margin-${i}`))}function g(){return o.map((S,x,I)=>{const D=!x,T=Dt(I,x);return D?p[x]+h:T?p[x]+d:I[x+1][f]-S[f]}).map(w)}return{slideSizes:p,slideSizesWithGaps:b,startGap:h,endGap:d}}function Pn(t,n,o,s,c,r,e,f,i){const{startEdge:u,endEdge:h,direction:d}=t,p=At(o);function b(a,S){return lt(a).filter(x=>x%S===0).map(x=>a.slice(x,x+S))}function l(a){return a.length?lt(a).reduce((S,x,I)=>{const D=z(S)||0,T=D===0,E=x===mt(a),L=c[u]-r[D][u],v=c[u]-r[x][h],P=!s&&T?d(e):0,A=!s&&E?d(f):0,N=w(v-A-(L+P));return I&&N>n+i&&S.push(x),E&&S.push(a.length),S},[]).map((S,x,I)=>{const D=Math.max(I[x-1]||0);return a.slice(D,S)}):[]}function m(a){return p?b(a,o):l(a)}return{groupSlides:m}}function Fn(t,n,o,s,c,r,e){const{align:f,axis:i,direction:u,startIndex:h,loop:d,duration:p,dragFree:b,dragThreshold:l,inViewThreshold:m,slidesToScroll:g,skipSnaps:a,containScroll:S,watchResize:x,watchSlides:I,watchDrag:D,watchFocus:T}=r,E=2,L=pn(),v=L.measure(n),P=o.map(L.measure),A=an(i,u),N=A.measureSize(v),j=mn(N),G=un(f,N),H=!d&&!!S,Z=d||!!S,{slideSizes:X,slideSizesWithGaps:$,startGap:U,endGap:st}=wn(A,v,P,o,Z,c),R=Pn(A,N,g,d,v,P,U,st,E),{snaps:et,snapsAligned:ot}=Ln(A,G,v,P,R),K=-z(et)+z($),{snapsContained:it,scrollContainLimit:ct}=yn(N,K,ot,S,E),B=H?it:ot,{limit:C}=bn(K,B,d),Q=qt(mt(B),h,d),V=Q.clone(),M=lt(o),y=({dragHandler:rt,scrollBody:Et,scrollBounds:Lt,options:{loop:gt}})=>{gt||Lt.constrain(rt.pointerDown()),Et.seek()},O=({scrollBody:rt,translate:Et,location:Lt,offsetLocation:gt,previousLocation:Jt,scrollLooper:Xt,slideLooper:Yt,dragHandler:_t,animation:Zt,eventHandler:Ft,scrollBounds:Wt,options:{loop:Ct}},kt)=>{const Nt=rt.settled(),tn=!Wt.shouldConstrain(),Bt=Ct?Nt:Nt&&tn,Vt=Bt&&!_t.pointerDown();Vt&&Zt.stop();const nn=Lt.get()*kt+Jt.get()*(1-kt);gt.set(nn),Ct&&(Xt.loop(rt.direction()),Yt.loop()),Et.to(gt.get()),Vt&&Ft.emit("settle"),Bt||Ft.emit("scroll")},F=fn(s,c,()=>y(xt),rt=>O(xt,rt)),k=.68,q=B[Q.get()],J=ft(q),W=ft(q),Y=ft(q),tt=ft(q),ut=hn(J,Y,W,tt,p,k),yt=Tn(d,B,K,C,tt),bt=vn(F,Q,V,ut,yt,tt,e),Mt=En(C),wt=pt(),Kt=Mn(n,o,e,m),{slideRegistry:Pt}=In(H,S,B,ct,R,M),Qt=An(t,o,Pt,bt,ut,wt,e,T),xt={ownerDocument:s,ownerWindow:c,eventHandler:e,containerRect:v,slideRects:P,animation:F,axis:A,dragHandler:ln(A,t,s,c,tt,dn(A,c),J,F,bt,ut,yt,Q,e,j,b,l,a,k,D),eventStore:wt,percentOfView:j,index:Q,indexPrevious:V,limit:C,location:J,offsetLocation:Y,previousLocation:W,options:r,resizeHandler:gn(n,e,c,o,A,x,L),scrollBody:ut,scrollBounds:Sn(C,Y,tt,ut,j),scrollLooper:xn(K,C,Y,[J,Y,W,tt]),scrollProgress:Mt,scrollSnapList:B.map(Mt.get),scrollSnaps:B,scrollTarget:yt,scrollTo:bt,slideLooper:On(A,N,K,X,$,et,B,Y,o),slideFocus:Qt,slidesHandler:Dn(n,e,I),slidesInView:Kt,slideIndexes:M,slideRegistry:Pt,slidesToScroll:R,target:tt,translate:$t(A,n)};return xt}function Cn(){let t={},n;function o(u){n=u}function s(u){return t[u]||[]}function c(u){return s(u).forEach(h=>h(n,u)),i}function r(u,h){return t[u]=s(u).concat([h]),i}function e(u,h){return t[u]=s(u).filter(d=>d!==h),i}function f(){t={}}const i={init:o,emit:c,off:e,on:r,clear:f};return i}const kn={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function Nn(t){function n(r,e){return Rt(r,e||{})}function o(r){const e=r.breakpoints||{},f=dt(e).filter(i=>t.matchMedia(i).matches).map(i=>e[i]).reduce((i,u)=>n(i,u),{});return n(r,f)}function s(r){return r.map(e=>dt(e.breakpoints||{})).reduce((e,f)=>e.concat(f),[]).map(t.matchMedia)}return{mergeOptions:n,optionsAtMedia:o,optionsMediaQueries:s}}function Bn(t){let n=[];function o(r,e){return n=e.filter(({options:f})=>t.optionsAtMedia(f).active!==!1),n.forEach(f=>f.init(r,t)),e.reduce((f,i)=>Object.assign(f,{[i.name]:i}),{})}function s(){n=n.filter(r=>r.destroy())}return{init:o,destroy:s}}function ht(t,n,o){const s=t.ownerDocument,c=s.defaultView,r=Nn(c),e=Bn(r),f=pt(),i=Cn(),{mergeOptions:u,optionsAtMedia:h,optionsMediaQueries:d}=r,{on:p,off:b,emit:l}=i,m=A;let g=!1,a,S=u(kn,ht.globalOptions),x=u(S),I=[],D,T,E;function L(){const{container:M,slides:y}=x;T=(It(M)?t.querySelector(M):M)||t.children[0];const F=It(y)?T.querySelectorAll(y):y;E=[].slice.call(F||T.children)}function v(M){const y=Fn(t,T,E,s,c,M,i);if(M.loop&&!y.slideLooper.canLoop()){const O=Object.assign({},M,{loop:!1});return v(O)}return y}function P(M,y){g||(S=u(S,M),x=h(S),I=y||I,L(),a=v(x),d([S,...I.map(({options:O})=>O)]).forEach(O=>f.add(O,"change",A)),x.active&&(a.translate.to(a.location.get()),a.animation.init(),a.slidesInView.init(),a.slideFocus.init(V),a.eventHandler.init(V),a.resizeHandler.init(V),a.slidesHandler.init(V),a.options.loop&&a.slideLooper.loop(),T.offsetParent&&E.length&&a.dragHandler.init(V),D=e.init(V,I)))}function A(M,y){const O=R();N(),P(u({startIndex:O},M),y),i.emit("reInit")}function N(){a.dragHandler.destroy(),a.eventStore.clear(),a.translate.clear(),a.slideLooper.clear(),a.resizeHandler.destroy(),a.slidesHandler.destroy(),a.slidesInView.destroy(),a.animation.destroy(),e.destroy(),f.clear()}function j(){g||(g=!0,f.clear(),N(),i.emit("destroy"),i.clear())}function G(M,y,O){!x.active||g||(a.scrollBody.useBaseFriction().useDuration(y===!0?0:x.duration),a.scrollTo.index(M,O||0))}function H(M){const y=a.index.add(1).get();G(y,M,-1)}function Z(M){const y=a.index.add(-1).get();G(y,M,1)}function X(){return a.index.add(1).get()!==R()}function $(){return a.index.add(-1).get()!==R()}function U(){return a.scrollSnapList}function st(){return a.scrollProgress.get(a.offsetLocation.get())}function R(){return a.index.get()}function et(){return a.indexPrevious.get()}function ot(){return a.slidesInView.get()}function K(){return a.slidesInView.get(!1)}function it(){return D}function ct(){return a}function B(){return t}function C(){return T}function Q(){return E}const V={canScrollNext:X,canScrollPrev:$,containerNode:C,internalEngine:ct,destroy:j,off:b,on:p,emit:l,plugins:it,previousScrollSnap:et,reInit:m,rootNode:B,scrollNext:H,scrollPrev:Z,scrollProgress:st,scrollSnapList:U,scrollTo:G,selectedScrollSnap:R,slideNodes:Q,slidesInView:ot,slidesNotInView:K};return P(n,o),setTimeout(()=>i.emit("init"),0),V}ht.globalOptions=void 0;function Ut(t={},n=[]){const o=_.useRef(t),s=_.useRef(n),[c,r]=_.useState(),[e,f]=_.useState(),i=_.useCallback(()=>{c&&c.reInit(o.current,s.current)},[c]);return _.useEffect(()=>{vt(o.current,t)||(o.current=t,i())},[t,i]),_.useEffect(()=>{rn(s.current,n)||(s.current=n,i())},[n,i]),_.useEffect(()=>{if(on()&&e){ht.globalOptions=Ut.globalOptions;const u=ht(e,o.current,s.current);return r(u),()=>u.destroy()}else r(void 0)},[e,r]),[f,c]}Ut.globalOptions=void 0;export{Ut as u};