@navette-js/panels 0.0.0-stage → 1.0.0-beta.2

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 (207) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +8 -2
  3. package/THIRD-PARTY-NOTICES.md +12 -0
  4. package/dist/FILAMENT-LICENSE.md +21 -0
  5. package/dist/filament/css/filament/filament/app.css +2 -0
  6. package/dist/filament/fonts/INTER-LICENSE.txt +92 -0
  7. package/dist/filament/fonts/filament/filament/inter/index.css +1 -0
  8. package/dist/filament/fonts/filament/filament/inter/inter-cyrillic-ext-wght-normal-SP7Z6XGK.woff2 +0 -0
  9. package/dist/filament/fonts/filament/filament/inter/inter-cyrillic-wght-normal-DR6K5BQD.woff2 +0 -0
  10. package/dist/filament/fonts/filament/filament/inter/inter-greek-ext-wght-normal-A2J6H3EX.woff2 +0 -0
  11. package/dist/filament/fonts/filament/filament/inter/inter-greek-wght-normal-ZABHMKQG.woff2 +0 -0
  12. package/dist/filament/fonts/filament/filament/inter/inter-latin-ext-wght-normal-ZIT2UBIY.woff2 +0 -0
  13. package/dist/filament/fonts/filament/filament/inter/inter-latin-wght-normal-DIHYUR35.woff2 +0 -0
  14. package/dist/filament/fonts/filament/filament/inter/inter-vietnamese-wght-normal-VWEHJHBA.woff2 +0 -0
  15. package/dist/filament/js/filament/actions/actions.js +1 -0
  16. package/dist/filament/js/filament/filament/app.js +1 -0
  17. package/dist/filament/js/filament/filament/echo.js +13 -0
  18. package/dist/filament/js/filament/forms/components/builder.js +1 -0
  19. package/dist/filament/js/filament/forms/components/checkbox-list.js +1 -0
  20. package/dist/filament/js/filament/forms/components/code-editor.js +38 -0
  21. package/dist/filament/js/filament/forms/components/color-picker.js +1 -0
  22. package/dist/filament/js/filament/forms/components/date-time-picker.js +1 -0
  23. package/dist/filament/js/filament/forms/components/file-upload.js +116 -0
  24. package/dist/filament/js/filament/forms/components/js-field.js +1 -0
  25. package/dist/filament/js/filament/forms/components/key-value.js +1 -0
  26. package/dist/filament/js/filament/forms/components/markdown-editor.js +51 -0
  27. package/dist/filament/js/filament/forms/components/repeater.js +1 -0
  28. package/dist/filament/js/filament/forms/components/rich-editor.js +161 -0
  29. package/dist/filament/js/filament/forms/components/select.js +11 -0
  30. package/dist/filament/js/filament/forms/components/slider.js +1 -0
  31. package/dist/filament/js/filament/forms/components/tags-input.js +1 -0
  32. package/dist/filament/js/filament/forms/components/text-input/password-reveal.js +1 -0
  33. package/dist/filament/js/filament/forms/components/textarea.js +1 -0
  34. package/dist/filament/js/filament/forms/components/toggle-buttons.js +1 -0
  35. package/dist/filament/js/filament/notifications/notifications.js +1 -0
  36. package/dist/filament/js/filament/schemas/components/actions.js +1 -0
  37. package/dist/filament/js/filament/schemas/components/js-component.js +1 -0
  38. package/dist/filament/js/filament/schemas/components/tabs.js +1 -0
  39. package/dist/filament/js/filament/schemas/components/wizard.js +1 -0
  40. package/dist/filament/js/filament/schemas/schemas.js +1 -0
  41. package/dist/filament/js/filament/support/support.js +46 -0
  42. package/dist/filament/js/filament/tables/components/columns/checkbox.js +1 -0
  43. package/dist/filament/js/filament/tables/components/columns/select.js +11 -0
  44. package/dist/filament/js/filament/tables/components/columns/text-input.js +1 -0
  45. package/dist/filament/js/filament/tables/components/columns/toggle.js +1 -0
  46. package/dist/filament/js/filament/tables/tables.js +1 -0
  47. package/dist/filament/js/filament/widgets/components/chart.js +31 -0
  48. package/dist/filament/js/filament/widgets/components/js-widget.js +1 -0
  49. package/dist/filament/js/filament/widgets/components/stats-overview/stat/chart.js +20 -0
  50. package/dist/navette/navette/calendar.css +108 -0
  51. package/dist/navette/navette/motion.css +101 -0
  52. package/dist/navette/navette/motion.js +49 -0
  53. package/lib/auth.d.ts +61 -0
  54. package/lib/auth.js +140 -0
  55. package/lib/calendar.d.ts +82 -0
  56. package/lib/calendar.js +107 -0
  57. package/lib/index.d.ts +1624 -0
  58. package/lib/index.js +3532 -0
  59. package/lib/notifications.d.ts +76 -0
  60. package/lib/notifications.js +112 -0
  61. package/lib/topbar.d.ts +90 -0
  62. package/lib/topbar.js +240 -0
  63. package/package.json +58 -4
  64. package/resources/filament/LICENSE.md +21 -0
  65. package/resources/filament/README.md +2 -0
  66. package/resources/filament/packages/actions/resources/css/actions.css +30 -0
  67. package/resources/filament/packages/actions/resources/css/index.css +1 -0
  68. package/resources/filament/packages/forms/dist/index.css +1 -0
  69. package/resources/filament/packages/forms/resources/css/components/builder.css +206 -0
  70. package/resources/filament/packages/forms/resources/css/components/checkbox-list.css +55 -0
  71. package/resources/filament/packages/forms/resources/css/components/code-editor.css +79 -0
  72. package/resources/filament/packages/forms/resources/css/components/color-picker.css +17 -0
  73. package/resources/filament/packages/forms/resources/css/components/date-time-picker.css +127 -0
  74. package/resources/filament/packages/forms/resources/css/components/field.css +88 -0
  75. package/resources/filament/packages/forms/resources/css/components/file-upload/filepond-plugin-media-preview.css +104 -0
  76. package/resources/filament/packages/forms/resources/css/components/file-upload.css +199 -0
  77. package/resources/filament/packages/forms/resources/css/components/key-value.css +57 -0
  78. package/resources/filament/packages/forms/resources/css/components/markdown-editor.css +343 -0
  79. package/resources/filament/packages/forms/resources/css/components/modal-table-select.css +17 -0
  80. package/resources/filament/packages/forms/resources/css/components/radio.css +41 -0
  81. package/resources/filament/packages/forms/resources/css/components/repeater.css +401 -0
  82. package/resources/filament/packages/forms/resources/css/components/rich-editor.css +666 -0
  83. package/resources/filament/packages/forms/resources/css/components/select.css +13 -0
  84. package/resources/filament/packages/forms/resources/css/components/slider.css +54 -0
  85. package/resources/filament/packages/forms/resources/css/components/tags-input.css +33 -0
  86. package/resources/filament/packages/forms/resources/css/components/text-input.css +20 -0
  87. package/resources/filament/packages/forms/resources/css/components/textarea.css +26 -0
  88. package/resources/filament/packages/forms/resources/css/components/toggle-buttons.css +49 -0
  89. package/resources/filament/packages/forms/resources/css/index.css +32 -0
  90. package/resources/filament/packages/infolists/resources/css/components/code.css +21 -0
  91. package/resources/filament/packages/infolists/resources/css/components/color.css +34 -0
  92. package/resources/filament/packages/infolists/resources/css/components/entry.css +68 -0
  93. package/resources/filament/packages/infolists/resources/css/components/icon.css +39 -0
  94. package/resources/filament/packages/infolists/resources/css/components/image.css +161 -0
  95. package/resources/filament/packages/infolists/resources/css/components/key-value.css +24 -0
  96. package/resources/filament/packages/infolists/resources/css/components/repeatable.css +136 -0
  97. package/resources/filament/packages/infolists/resources/css/components/text.css +234 -0
  98. package/resources/filament/packages/infolists/resources/css/index.css +14 -0
  99. package/resources/filament/packages/notifications/resources/css/database-notifications.css +56 -0
  100. package/resources/filament/packages/notifications/resources/css/index.css +3 -0
  101. package/resources/filament/packages/notifications/resources/css/notification.css +109 -0
  102. package/resources/filament/packages/notifications/resources/css/notifications.css +29 -0
  103. package/resources/filament/packages/panels/resources/css/base.css +13 -0
  104. package/resources/filament/packages/panels/resources/css/components/global-search.css +93 -0
  105. package/resources/filament/packages/panels/resources/css/components/header.css +56 -0
  106. package/resources/filament/packages/panels/resources/css/components/layout.css +182 -0
  107. package/resources/filament/packages/panels/resources/css/components/logo.css +11 -0
  108. package/resources/filament/packages/panels/resources/css/components/page.css +60 -0
  109. package/resources/filament/packages/panels/resources/css/components/sidebar.css +311 -0
  110. package/resources/filament/packages/panels/resources/css/components/tenant-menu.css +49 -0
  111. package/resources/filament/packages/panels/resources/css/components/theme-switcher.css +15 -0
  112. package/resources/filament/packages/panels/resources/css/components/topbar.css +89 -0
  113. package/resources/filament/packages/panels/resources/css/components/user-menu.css +46 -0
  114. package/resources/filament/packages/panels/resources/css/index.css +40 -0
  115. package/resources/filament/packages/panels/resources/css/theme.css +2 -0
  116. package/resources/filament/packages/panels/resources/css/utilities.css +3 -0
  117. package/resources/filament/packages/panels/resources/css/widgets/account-widget.css +21 -0
  118. package/resources/filament/packages/panels/resources/css/widgets/filament-info-widget.css +21 -0
  119. package/resources/filament/packages/schemas/resources/css/components/actions.css +29 -0
  120. package/resources/filament/packages/schemas/resources/css/components/flex.css +106 -0
  121. package/resources/filament/packages/schemas/resources/css/components/form.css +7 -0
  122. package/resources/filament/packages/schemas/resources/css/components/fused-group.css +337 -0
  123. package/resources/filament/packages/schemas/resources/css/components/icon.css +11 -0
  124. package/resources/filament/packages/schemas/resources/css/components/image.css +12 -0
  125. package/resources/filament/packages/schemas/resources/css/components/section.css +24 -0
  126. package/resources/filament/packages/schemas/resources/css/components/tabs.css +77 -0
  127. package/resources/filament/packages/schemas/resources/css/components/text.css +77 -0
  128. package/resources/filament/packages/schemas/resources/css/components/unordered-list.css +15 -0
  129. package/resources/filament/packages/schemas/resources/css/components/wizard.css +177 -0
  130. package/resources/filament/packages/schemas/resources/css/index.css +12 -0
  131. package/resources/filament/packages/schemas/resources/css/schema.css +132 -0
  132. package/resources/filament/packages/support/dist/index.css +1 -0
  133. package/resources/filament/packages/support/resources/css/base.css +23 -0
  134. package/resources/filament/packages/support/resources/css/components/avatar.css +15 -0
  135. package/resources/filament/packages/support/resources/css/components/badge.css +90 -0
  136. package/resources/filament/packages/support/resources/css/components/breadcrumbs.css +25 -0
  137. package/resources/filament/packages/support/resources/css/components/button.css +214 -0
  138. package/resources/filament/packages/support/resources/css/components/callout.css +57 -0
  139. package/resources/filament/packages/support/resources/css/components/dropdown/header.css +21 -0
  140. package/resources/filament/packages/support/resources/css/components/dropdown/index.css +79 -0
  141. package/resources/filament/packages/support/resources/css/components/dropdown/list/index.css +7 -0
  142. package/resources/filament/packages/support/resources/css/components/dropdown/list/item.css +74 -0
  143. package/resources/filament/packages/support/resources/css/components/empty-state.css +67 -0
  144. package/resources/filament/packages/support/resources/css/components/fieldset.css +23 -0
  145. package/resources/filament/packages/support/resources/css/components/grid.css +511 -0
  146. package/resources/filament/packages/support/resources/css/components/icon-button.css +124 -0
  147. package/resources/filament/packages/support/resources/css/components/icon.css +31 -0
  148. package/resources/filament/packages/support/resources/css/components/input/checkbox.css +32 -0
  149. package/resources/filament/packages/support/resources/css/components/input/index.css +55 -0
  150. package/resources/filament/packages/support/resources/css/components/input/one-time-code.css +7 -0
  151. package/resources/filament/packages/support/resources/css/components/input/radio.css +11 -0
  152. package/resources/filament/packages/support/resources/css/components/input/select.css +154 -0
  153. package/resources/filament/packages/support/resources/css/components/input/wrapper.css +107 -0
  154. package/resources/filament/packages/support/resources/css/components/link.css +90 -0
  155. package/resources/filament/packages/support/resources/css/components/loading-indicator.css +3 -0
  156. package/resources/filament/packages/support/resources/css/components/loading-section.css +3 -0
  157. package/resources/filament/packages/support/resources/css/components/modal.css +494 -0
  158. package/resources/filament/packages/support/resources/css/components/pagination.css +160 -0
  159. package/resources/filament/packages/support/resources/css/components/section.css +234 -0
  160. package/resources/filament/packages/support/resources/css/components/tabs.css +70 -0
  161. package/resources/filament/packages/support/resources/css/components/toggle.css +60 -0
  162. package/resources/filament/packages/support/resources/css/components/tooltip.css +36 -0
  163. package/resources/filament/packages/support/resources/css/index.css +133 -0
  164. package/resources/filament/packages/support/resources/css/sortable.css +3 -0
  165. package/resources/filament/packages/support/resources/css/utilities.css +897 -0
  166. package/resources/filament/packages/tables/resources/css/actions.css +51 -0
  167. package/resources/filament/packages/tables/resources/css/cell.css +139 -0
  168. package/resources/filament/packages/tables/resources/css/column-manager.css +48 -0
  169. package/resources/filament/packages/tables/resources/css/columns/checkbox.css +54 -0
  170. package/resources/filament/packages/tables/resources/css/columns/color.css +76 -0
  171. package/resources/filament/packages/tables/resources/css/columns/icon.css +81 -0
  172. package/resources/filament/packages/tables/resources/css/columns/image.css +207 -0
  173. package/resources/filament/packages/tables/resources/css/columns/layout/grid.css +49 -0
  174. package/resources/filament/packages/tables/resources/css/columns/layout/panel.css +3 -0
  175. package/resources/filament/packages/tables/resources/css/columns/layout/split.css +35 -0
  176. package/resources/filament/packages/tables/resources/css/columns/layout/stack.css +29 -0
  177. package/resources/filament/packages/tables/resources/css/columns/select.css +36 -0
  178. package/resources/filament/packages/tables/resources/css/columns/summaries/icon-count.css +43 -0
  179. package/resources/filament/packages/tables/resources/css/columns/summaries/range.css +27 -0
  180. package/resources/filament/packages/tables/resources/css/columns/summaries/text.css +29 -0
  181. package/resources/filament/packages/tables/resources/css/columns/summaries/values.css +33 -0
  182. package/resources/filament/packages/tables/resources/css/columns/text-input.css +36 -0
  183. package/resources/filament/packages/tables/resources/css/columns/text.css +319 -0
  184. package/resources/filament/packages/tables/resources/css/columns/toggle.css +54 -0
  185. package/resources/filament/packages/tables/resources/css/container.css +311 -0
  186. package/resources/filament/packages/tables/resources/css/content.css +342 -0
  187. package/resources/filament/packages/tables/resources/css/empty-state.css +31 -0
  188. package/resources/filament/packages/tables/resources/css/group-header.css +54 -0
  189. package/resources/filament/packages/tables/resources/css/header-cell.css +224 -0
  190. package/resources/filament/packages/tables/resources/css/index.css +26 -0
  191. package/resources/filament/packages/tables/resources/css/row.css +47 -0
  192. package/resources/filament/packages/tables/resources/css/table.css +394 -0
  193. package/resources/filament/packages/widgets/resources/css/chart-widget.css +88 -0
  194. package/resources/filament/packages/widgets/resources/css/index.css +3 -0
  195. package/resources/filament/packages/widgets/resources/css/stats-overview-widget.css +67 -0
  196. package/resources/filament/packages/widgets/resources/css/widget.css +3 -0
  197. package/theme.css +17 -0
  198. package/views/components/logo.ejs +9 -0
  199. package/views/components/tenant-menu.ejs +13 -0
  200. package/views/components/user-menu.ejs +82 -0
  201. package/views/layout/base.ejs +129 -0
  202. package/views/layout/index.ejs +41 -0
  203. package/views/layout/simple.ejs +19 -0
  204. package/views/livewire/sidebar.ejs +123 -0
  205. package/views/livewire/topbar.ejs +47 -0
  206. package/views/pages/page.ejs +143 -0
  207. package/views/pages/simple.ejs +32 -0
@@ -0,0 +1,11 @@
1
+ var Wt=Math.min,yt=Math.max,$t=Math.round;var rt=i=>({x:i,y:i}),sn={left:"right",right:"left",bottom:"top",top:"bottom"};function Le(i,t,e){return yt(i,Wt(t,e))}function zt(i,t){return typeof i=="function"?i(t):i}function wt(i){return i.split("-")[0]}function Xt(i){return i.split("-")[1]}function Te(i){return i==="x"?"y":"x"}function Ie(i){return i==="y"?"height":"width"}function pt(i){let t=i[0];return t==="t"||t==="b"?"y":"x"}function Re(i){return Te(pt(i))}function ti(i,t,e){e===void 0&&(e=!1);let n=Xt(i),s=Re(i),o=Ie(s),r=s==="x"?n===(e?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(r=Vt(r)),[r,Vt(r)]}function ei(i){let t=Vt(i);return[oe(i),t,oe(t)]}function oe(i){return i.includes("start")?i.replace("start","end"):i.replace("end","start")}var Qe=["left","right"],Ze=["right","left"],on=["top","bottom"],rn=["bottom","top"];function an(i,t,e){switch(i){case"top":case"bottom":return e?t?Ze:Qe:t?Qe:Ze;case"left":case"right":return t?on:rn;default:return[]}}function ii(i,t,e,n){let s=Xt(i),o=an(wt(i),e==="start",n);return s&&(o=o.map(r=>r+"-"+s),t&&(o=o.concat(o.map(oe)))),o}function Vt(i){let t=wt(i);return sn[t]+i.slice(t.length)}function ln(i){return{top:0,right:0,bottom:0,left:0,...i}}function ni(i){return typeof i!="number"?ln(i):{top:i,right:i,bottom:i,left:i}}function Dt(i){let{x:t,y:e,width:n,height:s}=i;return{width:n,height:s,top:e,left:t,right:t+n,bottom:e+s,x:t,y:e}}function si(i,t,e){let{reference:n,floating:s}=i,o=pt(t),r=Re(t),a=Ie(r),l=wt(t),c=o==="y",h=n.x+n.width/2-s.width/2,u=n.y+n.height/2-s.height/2,f=n[a]/2-s[a]/2,p;switch(l){case"top":p={x:h,y:n.y-s.height};break;case"bottom":p={x:h,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:u};break;case"left":p={x:n.x-s.width,y:u};break;default:p={x:n.x,y:n.y}}switch(Xt(t)){case"start":p[r]-=f*(e&&c?-1:1);break;case"end":p[r]+=f*(e&&c?-1:1);break}return p}async function oi(i,t){var e;t===void 0&&(t={});let{x:n,y:s,platform:o,rects:r,elements:a,strategy:l}=i,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:u="floating",altBoundary:f=!1,padding:p=0}=zt(t,i),m=ni(p),O=a[f?u==="floating"?"reference":"floating":u],x=Dt(await o.getClippingRect({element:(e=await(o.isElement==null?void 0:o.isElement(O)))==null||e?O:O.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),w=u==="floating"?{x:n,y:s,width:r.floating.width,height:r.floating.height}:r.reference,A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),D=await(o.isElement==null?void 0:o.isElement(A))?await(o.getScale==null?void 0:o.getScale(A))||{x:1,y:1}:{x:1,y:1},M=Dt(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:A,strategy:l}):w);return{top:(x.top-M.top+m.top)/D.y,bottom:(M.bottom-x.bottom+m.bottom)/D.y,left:(x.left-M.left+m.left)/D.x,right:(M.right-x.right+m.right)/D.x}}var cn=50,ri=async(i,t,e)=>{let{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:oi},l=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:i,floating:t,strategy:s}),{x:h,y:u}=si(c,n,l),f=n,p=0,m={};for(let g=0;g<o.length;g++){let O=o[g];if(!O)continue;let{name:x,fn:w}=O,{x:A,y:D,data:M,reset:C}=await w({x:h,y:u,initialPlacement:n,placement:f,strategy:s,middlewareData:m,rects:c,platform:a,elements:{reference:i,floating:t}});h=A??h,u=D??u,m[x]={...m[x],...M},C&&p<cn&&(p++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(c=C.rects===!0?await r.getElementRects({reference:i,floating:t,strategy:s}):C.rects),{x:h,y:u}=si(c,f,l)),g=-1)}return{x:h,y:u,placement:f,strategy:s,middlewareData:m}};var ai=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(t){var e,n;let{placement:s,middlewareData:o,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:h=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...O}=zt(i,t);if((e=o.arrow)!=null&&e.alignmentOffset)return{};let x=wt(s),w=pt(a),A=wt(a)===a,D=await(l.isRTL==null?void 0:l.isRTL(c.floating)),M=f||(A||!g?[Vt(a)]:ei(a)),C=m!=="none";!f&&C&&M.push(...ii(a,g,m,D));let J=[a,...M],Q=await l.detectOverflow(t,O),I=[],V=((n=o.flip)==null?void 0:n.overflows)||[];if(h&&I.push(Q[x]),u){let B=ti(s,r,D);I.push(Q[B[0]],Q[B[1]])}if(V=[...V,{placement:s,overflows:I}],!I.every(B=>B<=0)){var Y,it;let B=(((Y=o.flip)==null?void 0:Y.index)||0)+1,Z=J[B];if(Z&&(!(u==="alignment"?w!==pt(Z):!1)||V.every(_=>pt(_.placement)===w?_.overflows[0]>0:!0)))return{data:{index:B,overflows:V},reset:{placement:Z}};let k=(it=V.filter($=>$.overflows[0]<=0).sort(($,_)=>$.overflows[1]-_.overflows[1])[0])==null?void 0:it.placement;if(!k)switch(p){case"bestFit":{var W;let $=(W=V.filter(_=>{if(C){let z=pt(_.placement);return z===w||z==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(z=>z>0).reduce((z,j)=>z+j,0)]).sort((_,z)=>_[1]-z[1])[0])==null?void 0:W[0];$&&(k=$);break}case"initialPlacement":k=a;break}if(s!==k)return{reset:{placement:k}}}return{}}}};var un=new Set(["left","top"]);async function hn(i,t){let{placement:e,platform:n,elements:s}=i,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),r=wt(e),a=Xt(e),l=pt(e)==="y",c=un.has(r)?-1:1,h=o&&l?-1:1,u=zt(t,i),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),l?{x:p*h,y:f*c}:{x:f*c,y:p*h}}var li=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(t){var e,n;let{x:s,y:o,placement:r,middlewareData:a}=t,l=await hn(t,i);return r===((e=a.offset)==null?void 0:e.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:r}}}}},ci=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(t){let{x:e,y:n,placement:s,platform:o}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:l={fn:x=>{let{x:w,y:A}=x;return{x:w,y:A}}},...c}=zt(i,t),h={x:e,y:n},u=await o.detectOverflow(t,c),f=pt(wt(s)),p=Te(f),m=h[p],g=h[f];if(r){let x=p==="y"?"top":"left",w=p==="y"?"bottom":"right",A=m+u[x],D=m-u[w];m=Le(A,m,D)}if(a){let x=f==="y"?"top":"left",w=f==="y"?"bottom":"right",A=g+u[x],D=g-u[w];g=Le(A,g,D)}let O=l.fn({...t,[p]:m,[f]:g});return{...O,data:{x:O.x-e,y:O.y-n,enabled:{[p]:r,[f]:a}}}}}};function ae(){return typeof window<"u"}function At(i){return hi(i)?(i.nodeName||"").toLowerCase():"#document"}function U(i){var t;return(i==null||(t=i.ownerDocument)==null?void 0:t.defaultView)||window}function ct(i){var t;return(t=(hi(i)?i.ownerDocument:i.document)||window.document)==null?void 0:t.documentElement}function hi(i){return ae()?i instanceof Node||i instanceof U(i).Node:!1}function nt(i){return ae()?i instanceof Element||i instanceof U(i).Element:!1}function ut(i){return ae()?i instanceof HTMLElement||i instanceof U(i).HTMLElement:!1}function ui(i){return!ae()||typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof U(i).ShadowRoot}function Rt(i){let{overflow:t,overflowX:e,overflowY:n,display:s}=st(i);return/auto|scroll|overlay|hidden|clip/.test(t+n+e)&&s!=="inline"&&s!=="contents"}function di(i){return/^(table|td|th)$/.test(At(i))}function Yt(i){try{if(i.matches(":popover-open"))return!0}catch{}try{return i.matches(":modal")}catch{return!1}}var dn=/transform|translate|scale|rotate|perspective|filter/,fn=/paint|layout|strict|content/,xt=i=>!!i&&i!=="none",Me;function le(i){let t=nt(i)?st(i):i;return xt(t.transform)||xt(t.translate)||xt(t.scale)||xt(t.rotate)||xt(t.perspective)||!ce()&&(xt(t.backdropFilter)||xt(t.filter))||dn.test(t.willChange||"")||fn.test(t.contain||"")}function fi(i){let t=mt(i);for(;ut(t)&&!Ct(t);){if(le(t))return t;if(Yt(t))return null;t=mt(t)}return null}function ce(){return Me==null&&(Me=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Me}function Ct(i){return/^(html|body|#document)$/.test(At(i))}function st(i){return U(i).getComputedStyle(i)}function Kt(i){return nt(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.scrollX,scrollTop:i.scrollY}}function mt(i){if(At(i)==="html")return i;let t=i.assignedSlot||i.parentNode||ui(i)&&i.host||ct(i);return ui(t)?t.host:t}function pi(i){let t=mt(i);return Ct(t)?i.ownerDocument?i.ownerDocument.body:i.body:ut(t)&&Rt(t)?t:pi(t)}function re(i,t,e){var n;t===void 0&&(t=[]),e===void 0&&(e=!0);let s=pi(i),o=s===((n=i.ownerDocument)==null?void 0:n.body),r=U(s);if(o){let a=ue(r);return t.concat(r,r.visualViewport||[],Rt(s)?s:[],a&&e?re(a):[])}else return t.concat(s,re(s,[],e))}function ue(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function vi(i){let t=st(i),e=parseFloat(t.width)||0,n=parseFloat(t.height)||0,s=ut(i),o=s?i.offsetWidth:e,r=s?i.offsetHeight:n,a=$t(e)!==o||$t(n)!==r;return a&&(e=o,n=r),{width:e,height:n,$:a}}function yi(i){return nt(i)?i:i.contextElement}function Mt(i){let t=yi(i);if(!ut(t))return rt(1);let e=t.getBoundingClientRect(),{width:n,height:s,$:o}=vi(t),r=(o?$t(e.width):e.width)/n,a=(o?$t(e.height):e.height)/s;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}var pn=rt(0);function wi(i){let t=U(i);return!ce()||!t.visualViewport?pn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function mn(i,t,e){return t===void 0&&(t=!1),!e||t&&e!==U(i)?!1:t}function jt(i,t,e,n){t===void 0&&(t=!1),e===void 0&&(e=!1);let s=i.getBoundingClientRect(),o=yi(i),r=rt(1);t&&(n?nt(n)&&(r=Mt(n)):r=Mt(i));let a=mn(o,e,n)?wi(o):rt(0),l=(s.left+a.x)/r.x,c=(s.top+a.y)/r.y,h=s.width/r.x,u=s.height/r.y;if(o){let f=U(o),p=n&&nt(n)?U(n):n,m=f,g=ue(m);for(;g&&n&&p!==m;){let O=Mt(g),x=g.getBoundingClientRect(),w=st(g),A=x.left+(g.clientLeft+parseFloat(w.paddingLeft))*O.x,D=x.top+(g.clientTop+parseFloat(w.paddingTop))*O.y;l*=O.x,c*=O.y,h*=O.x,u*=O.y,l+=A,c+=D,m=U(g),g=ue(m)}}return Dt({width:h,height:u,x:l,y:c})}function he(i,t){let e=Kt(i).scrollLeft;return t?t.left+e:jt(ct(i)).left+e}function Si(i,t){let e=i.getBoundingClientRect(),n=e.left+t.scrollLeft-he(i,e),s=e.top+t.scrollTop;return{x:n,y:s}}function gn(i){let{elements:t,rect:e,offsetParent:n,strategy:s}=i,o=s==="fixed",r=ct(n),a=t?Yt(t.floating):!1;if(n===r||a&&o)return e;let l={scrollLeft:0,scrollTop:0},c=rt(1),h=rt(0),u=ut(n);if((u||!u&&!o)&&((At(n)!=="body"||Rt(r))&&(l=Kt(n)),u)){let p=jt(n);c=Mt(n),h.x=p.x+n.clientLeft,h.y=p.y+n.clientTop}let f=r&&!u&&!o?Si(r,l):rt(0);return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-l.scrollLeft*c.x+h.x+f.x,y:e.y*c.y-l.scrollTop*c.y+h.y+f.y}}function bn(i){return Array.from(i.getClientRects())}function vn(i){let t=ct(i),e=Kt(i),n=i.ownerDocument.body,s=yt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=yt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),r=-e.scrollLeft+he(i),a=-e.scrollTop;return st(n).direction==="rtl"&&(r+=yt(t.clientWidth,n.clientWidth)-s),{width:s,height:o,x:r,y:a}}var mi=25;function yn(i,t){let e=U(i),n=ct(i),s=e.visualViewport,o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;let h=ce();(!h||h&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}let c=he(n);if(c<=0){let h=n.ownerDocument,u=h.body,f=getComputedStyle(u),p=h.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,m=Math.abs(n.clientWidth-u.clientWidth-p);m<=mi&&(o-=m)}else c<=mi&&(o+=c);return{width:o,height:r,x:a,y:l}}function wn(i,t){let e=jt(i,!0,t==="fixed"),n=e.top+i.clientTop,s=e.left+i.clientLeft,o=ut(i)?Mt(i):rt(1),r=i.clientWidth*o.x,a=i.clientHeight*o.y,l=s*o.x,c=n*o.y;return{width:r,height:a,x:l,y:c}}function gi(i,t,e){let n;if(t==="viewport")n=yn(i,e);else if(t==="document")n=vn(ct(i));else if(nt(t))n=wn(t,e);else{let s=wi(i);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Dt(n)}function Oi(i,t){let e=mt(i);return e===t||!nt(e)||Ct(e)?!1:st(e).position==="fixed"||Oi(e,t)}function Sn(i,t){let e=t.get(i);if(e)return e;let n=re(i,[],!1).filter(a=>nt(a)&&At(a)!=="body"),s=null,o=st(i).position==="fixed",r=o?mt(i):i;for(;nt(r)&&!Ct(r);){let a=st(r),l=le(r);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||Rt(r)&&!l&&Oi(i,r))?n=n.filter(h=>h!==r):s=a,r=mt(r)}return t.set(i,n),n}function On(i){let{element:t,boundary:e,rootBoundary:n,strategy:s}=i,r=[...e==="clippingAncestors"?Yt(t)?[]:Sn(t,this._c):[].concat(e),n],a=gi(t,r[0],s),l=a.top,c=a.right,h=a.bottom,u=a.left;for(let f=1;f<r.length;f++){let p=gi(t,r[f],s);l=yt(p.top,l),c=Wt(p.right,c),h=Wt(p.bottom,h),u=yt(p.left,u)}return{width:c-u,height:h-l,x:u,y:l}}function En(i){let{width:t,height:e}=vi(i);return{width:t,height:e}}function Dn(i,t,e){let n=ut(t),s=ct(t),o=e==="fixed",r=jt(i,!0,o,t),a={scrollLeft:0,scrollTop:0},l=rt(0);function c(){l.x=he(s)}if(n||!n&&!o)if((At(t)!=="body"||Rt(s))&&(a=Kt(t)),n){let p=jt(t,!0,o,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else s&&c();o&&!n&&s&&c();let h=s&&!n&&!o?Si(s,a):rt(0),u=r.left+a.scrollLeft-l.x-h.x,f=r.top+a.scrollTop-l.y-h.y;return{x:u,y:f,width:r.width,height:r.height}}function _e(i){return st(i).position==="static"}function bi(i,t){if(!ut(i)||st(i).position==="fixed")return null;if(t)return t(i);let e=i.offsetParent;return ct(i)===e&&(e=e.ownerDocument.body),e}function Ei(i,t){let e=U(i);if(Yt(i))return e;if(!ut(i)){let s=mt(i);for(;s&&!Ct(s);){if(nt(s)&&!_e(s))return s;s=mt(s)}return e}let n=bi(i,t);for(;n&&di(n)&&_e(n);)n=bi(n,t);return n&&Ct(n)&&_e(n)&&!le(n)?e:n||fi(i)||e}var xn=async function(i){let t=this.getOffsetParent||Ei,e=this.getDimensions,n=await e(i.floating);return{reference:Dn(i.reference,await t(i.floating),i.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function An(i){return st(i).direction==="rtl"}var Cn={convertOffsetParentRelativeRectToViewportRelativeRect:gn,getDocumentElement:ct,getClippingRect:On,getOffsetParent:Ei,getElementRects:xn,getClientRects:bn,getDimensions:En,getScale:Mt,isElement:nt,isRTL:An};var Di=li;var xi=ci,Ai=ai;var Ci=(i,t,e)=>{let n=new Map,s={platform:Cn,...e},o={...s.platform,_c:n};return ri(i,t,{...s,platform:o})};function Ln(i,t,e){return(t=Mn(t))in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}function bt(){return bt=Object.assign?Object.assign.bind():function(i){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)({}).hasOwnProperty.call(e,n)&&(i[n]=e[n])}return i},bt.apply(null,arguments)}function Li(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})),e.push.apply(e,n)}return e}function dt(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?Li(Object(e),!0).forEach(function(n){Ln(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):Li(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}function Tn(i,t){if(i==null)return{};var e,n,s=In(i,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(i);for(n=0;n<o.length;n++)e=o[n],t.indexOf(e)===-1&&{}.propertyIsEnumerable.call(i,e)&&(s[e]=i[e])}return s}function In(i,t){if(i==null)return{};var e={};for(var n in i)if({}.hasOwnProperty.call(i,n)){if(t.indexOf(n)!==-1)continue;e[n]=i[n]}return e}function Rn(i,t){if(typeof i!="object"||!i)return i;var e=i[Symbol.toPrimitive];if(e!==void 0){var n=e.call(i,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(i)}function Mn(i){var t=Rn(i,"string");return typeof t=="symbol"?t:t+""}function ze(i){"@babel/helpers - typeof";return ze=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ze(i)}var _n="1.15.7";function gt(i){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(i)}var vt=gt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ie=gt(/Edge/i),Ti=gt(/firefox/i),Jt=gt(/safari/i)&&!gt(/chrome/i)&&!gt(/android/i),Ue=gt(/iP(ad|od|hone)/i),ki=gt(/chrome/i)&&gt(/android/i),Fi={capture:!1,passive:!1};function E(i,t,e){i.addEventListener(t,e,!vt&&Fi)}function S(i,t,e){i.removeEventListener(t,e,!vt&&Fi)}function we(i,t){if(t){if(t[0]===">"&&(t=t.substring(1)),i)try{if(i.matches)return i.matches(t);if(i.msMatchesSelector)return i.msMatchesSelector(t);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(t)}catch{return!1}return!1}}function Hi(i){return i.host&&i!==document&&i.host.nodeType&&i.host!==i?i.host:i.parentNode}function lt(i,t,e,n){if(i){e=e||document;do{if(t!=null&&(t[0]===">"?i.parentNode===e&&we(i,t):we(i,t))||n&&i===e)return i;if(i===e)break}while(i=Hi(i))}return null}var Ii=/\s+/g;function tt(i,t,e){if(i&&t)if(i.classList)i.classList[e?"add":"remove"](t);else{var n=(" "+i.className+" ").replace(Ii," ").replace(" "+t+" "," ");i.className=(n+(e?" "+t:"")).replace(Ii," ")}}function b(i,t,e){var n=i&&i.style;if(n){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(i,""):i.currentStyle&&(e=i.currentStyle),t===void 0?e:e[t];!(t in n)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),n[t]=e+(typeof e=="string"?"":"px")}}function kt(i,t){var e="";if(typeof i=="string")e=i;else do{var n=b(i,"transform");n&&n!=="none"&&(e=n+" "+e)}while(!t&&(i=i.parentNode));var s=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return s&&new s(e)}function Vi(i,t,e){if(i){var n=i.getElementsByTagName(t),s=0,o=n.length;if(e)for(;s<o;s++)e(n[s],s);return n}return[]}function ht(){var i=document.scrollingElement;return i||document.documentElement}function N(i,t,e,n,s){if(!(!i.getBoundingClientRect&&i!==window)){var o,r,a,l,c,h,u;if(i!==window&&i.parentNode&&i!==ht()?(o=i.getBoundingClientRect(),r=o.top,a=o.left,l=o.bottom,c=o.right,h=o.height,u=o.width):(r=0,a=0,l=window.innerHeight,c=window.innerWidth,h=window.innerHeight,u=window.innerWidth),(t||e)&&i!==window&&(s=s||i.parentNode,!vt))do if(s&&s.getBoundingClientRect&&(b(s,"transform")!=="none"||e&&b(s,"position")!=="static")){var f=s.getBoundingClientRect();r-=f.top+parseInt(b(s,"border-top-width")),a-=f.left+parseInt(b(s,"border-left-width")),l=r+o.height,c=a+o.width;break}while(s=s.parentNode);if(n&&i!==window){var p=kt(s||i),m=p&&p.a,g=p&&p.d;p&&(r/=g,a/=m,u/=m,h/=g,l=r+h,c=a+u)}return{top:r,left:a,bottom:l,right:c,width:u,height:h}}}function Ri(i,t,e){for(var n=Et(i,!0),s=N(i)[t];n;){var o=N(n)[e],r=void 0;if(e==="top"||e==="left"?r=s>=o:r=s<=o,!r)return n;if(n===ht())break;n=Et(n,!1)}return!1}function Ft(i,t,e,n){for(var s=0,o=0,r=i.children;o<r.length;){if(r[o].style.display!=="none"&&r[o]!==v.ghost&&(n||r[o]!==v.dragged)&&lt(r[o],e.draggable,i,!1)){if(s===t)return r[o];s++}o++}return null}function Ge(i,t){for(var e=i.lastElementChild;e&&(e===v.ghost||b(e,"display")==="none"||t&&!we(e,t));)e=e.previousElementSibling;return e||null}function ot(i,t){var e=0;if(!i||!i.parentNode)return-1;for(;i=i.previousElementSibling;)i.nodeName.toUpperCase()!=="TEMPLATE"&&i!==v.clone&&(!t||we(i,t))&&e++;return e}function Mi(i){var t=0,e=0,n=ht();if(i)do{var s=kt(i),o=s.a,r=s.d;t+=i.scrollLeft*o,e+=i.scrollTop*r}while(i!==n&&(i=i.parentNode));return[t,e]}function Pn(i,t){for(var e in i)if(i.hasOwnProperty(e)){for(var n in t)if(t.hasOwnProperty(n)&&t[n]===i[e][n])return Number(e)}return-1}function Et(i,t){if(!i||!i.getBoundingClientRect)return ht();var e=i,n=!1;do if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var s=b(e);if(e.clientWidth<e.scrollWidth&&(s.overflowX=="auto"||s.overflowX=="scroll")||e.clientHeight<e.scrollHeight&&(s.overflowY=="auto"||s.overflowY=="scroll")){if(!e.getBoundingClientRect||e===document.body)return ht();if(n||t)return e;n=!0}}while(e=e.parentNode);return ht()}function Nn(i,t){if(i&&t)for(var e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function Pe(i,t){return Math.round(i.top)===Math.round(t.top)&&Math.round(i.left)===Math.round(t.left)&&Math.round(i.height)===Math.round(t.height)&&Math.round(i.width)===Math.round(t.width)}var Qt;function Wi(i,t){return function(){if(!Qt){var e=arguments,n=this;e.length===1?i.call(n,e[0]):i.apply(n,e),Qt=setTimeout(function(){Qt=void 0},t)}}}function Bn(){clearTimeout(Qt),Qt=void 0}function $i(i,t,e){i.scrollLeft+=t,i.scrollTop+=e}function zi(i){var t=window.Polymer,e=window.jQuery||window.Zepto;return t&&t.dom?t.dom(i).cloneNode(!0):e?e(i).clone(!0)[0]:i.cloneNode(!0)}function Xi(i,t,e){var n={};return Array.from(i.children).forEach(function(s){var o,r,a,l;if(!(!lt(s,t.draggable,i,!1)||s.animated||s===e)){var c=N(s);n.left=Math.min((o=n.left)!==null&&o!==void 0?o:1/0,c.left),n.top=Math.min((r=n.top)!==null&&r!==void 0?r:1/0,c.top),n.right=Math.max((a=n.right)!==null&&a!==void 0?a:-1/0,c.right),n.bottom=Math.max((l=n.bottom)!==null&&l!==void 0?l:-1/0,c.bottom)}}),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var q="Sortable"+new Date().getTime();function kn(){var i=[],t;return{captureAnimationState:function(){if(i=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(s){if(!(b(s,"display")==="none"||s===v.ghost)){i.push({target:s,rect:N(s)});var o=dt({},i[i.length-1].rect);if(s.thisAnimationDuration){var r=kt(s,!0);r&&(o.top-=r.f,o.left-=r.e)}s.fromRect=o}})}},addAnimationState:function(n){i.push(n)},removeAnimationState:function(n){i.splice(Pn(i,{target:n}),1)},animateAll:function(n){var s=this;if(!this.options.animation){clearTimeout(t),typeof n=="function"&&n();return}var o=!1,r=0;i.forEach(function(a){var l=0,c=a.target,h=c.fromRect,u=N(c),f=c.prevFromRect,p=c.prevToRect,m=a.rect,g=kt(c,!0);g&&(u.top-=g.f,u.left-=g.e),c.toRect=u,c.thisAnimationDuration&&Pe(f,u)&&!Pe(h,u)&&(m.top-u.top)/(m.left-u.left)===(h.top-u.top)/(h.left-u.left)&&(l=Hn(m,f,p,s.options)),Pe(u,h)||(c.prevFromRect=h,c.prevToRect=u,l||(l=s.options.animation),s.animate(c,m,u,l)),l&&(o=!0,r=Math.max(r,l),clearTimeout(c.animationResetTimer),c.animationResetTimer=setTimeout(function(){c.animationTime=0,c.prevFromRect=null,c.fromRect=null,c.prevToRect=null,c.thisAnimationDuration=null},l),c.thisAnimationDuration=l)}),clearTimeout(t),o?t=setTimeout(function(){typeof n=="function"&&n()},r):typeof n=="function"&&n(),i=[]},animate:function(n,s,o,r){if(r){b(n,"transition",""),b(n,"transform","");var a=kt(this.el),l=a&&a.a,c=a&&a.d,h=(s.left-o.left)/(l||1),u=(s.top-o.top)/(c||1);n.animatingX=!!h,n.animatingY=!!u,b(n,"transform","translate3d("+h+"px,"+u+"px,0)"),this.forRepaintDummy=Fn(n),b(n,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),b(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){b(n,"transition",""),b(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},r)}}}}function Fn(i){return i.offsetWidth}function Hn(i,t,e,n){return Math.sqrt(Math.pow(t.top-i.top,2)+Math.pow(t.left-i.left,2))/Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))*n.animation}var _t=[],Ne={initializeByDefault:!0},ne={mount:function(t){for(var e in Ne)Ne.hasOwnProperty(e)&&!(e in t)&&(t[e]=Ne[e]);_t.forEach(function(n){if(n.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),_t.push(t)},pluginEvent:function(t,e,n){var s=this;this.eventCanceled=!1,n.cancel=function(){s.eventCanceled=!0};var o=t+"Global";_t.forEach(function(r){e[r.pluginName]&&(e[r.pluginName][o]&&e[r.pluginName][o](dt({sortable:e},n)),e.options[r.pluginName]&&e[r.pluginName][t]&&e[r.pluginName][t](dt({sortable:e},n)))})},initializePlugins:function(t,e,n,s){_t.forEach(function(a){var l=a.pluginName;if(!(!t.options[l]&&!a.initializeByDefault)){var c=new a(t,e,t.options);c.sortable=t,c.options=t.options,t[l]=c,bt(n,c.defaults)}});for(var o in t.options)if(t.options.hasOwnProperty(o)){var r=this.modifyOption(t,o,t.options[o]);typeof r<"u"&&(t.options[o]=r)}},getEventProperties:function(t,e){var n={};return _t.forEach(function(s){typeof s.eventProperties=="function"&&bt(n,s.eventProperties.call(e[s.pluginName],t))}),n},modifyOption:function(t,e,n){var s;return _t.forEach(function(o){t[o.pluginName]&&o.optionListeners&&typeof o.optionListeners[e]=="function"&&(s=o.optionListeners[e].call(t[o.pluginName],n))}),s}};function Vn(i){var t=i.sortable,e=i.rootEl,n=i.name,s=i.targetEl,o=i.cloneEl,r=i.toEl,a=i.fromEl,l=i.oldIndex,c=i.newIndex,h=i.oldDraggableIndex,u=i.newDraggableIndex,f=i.originalEvent,p=i.putSortable,m=i.extraEventProperties;if(t=t||e&&e[q],!!t){var g,O=t.options,x="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!vt&&!ie?g=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(g=document.createEvent("Event"),g.initEvent(n,!0,!0)),g.to=r||e,g.from=a||e,g.item=s||e,g.clone=o,g.oldIndex=l,g.newIndex=c,g.oldDraggableIndex=h,g.newDraggableIndex=u,g.originalEvent=f,g.pullMode=p?p.lastPutMode:void 0;var w=dt(dt({},m),ne.getEventProperties(n,t));for(var A in w)g[A]=w[A];e&&e.dispatchEvent(g),O[x]&&O[x].call(t,g)}}var Wn=["evt"],G=function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=n.evt,o=Tn(n,Wn);ne.pluginEvent.bind(v)(t,e,dt({dragEl:d,parentEl:R,ghostEl:y,rootEl:L,nextEl:It,lastDownEl:ge,cloneEl:T,cloneHidden:Ot,dragStarted:Ut,putSortable:H,activeSortable:v.active,originalEvent:s,oldIndex:Bt,oldDraggableIndex:Zt,newIndex:et,newDraggableIndex:St,hideGhostForTarget:Ui,unhideGhostForTarget:Gi,cloneNowHidden:function(){Ot=!0},cloneNowShown:function(){Ot=!1},dispatchSortableEvent:function(a){K({sortable:e,name:a,originalEvent:s})}},o))};function K(i){Vn(dt({putSortable:H,cloneEl:T,targetEl:d,rootEl:L,oldIndex:Bt,oldDraggableIndex:Zt,newIndex:et,newDraggableIndex:St},i))}var d,R,y,L,It,ge,T,Ot,Bt,et,Zt,St,de,H,Nt=!1,Se=!1,Oe=[],Lt,at,Be,ke,_i,Pi,Ut,Pt,te,ee=!1,fe=!1,be,X,Fe=[],Xe=!1,Ee=[],xe=typeof document<"u",pe=Ue,Ni=ie||vt?"cssFloat":"float",$n=xe&&!ki&&!Ue&&"draggable"in document.createElement("div"),Yi=(function(){if(xe){if(vt)return!1;var i=document.createElement("x");return i.style.cssText="pointer-events:auto",i.style.pointerEvents==="auto"}})(),Ki=function(t,e){var n=b(t),s=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=Ft(t,0,e),r=Ft(t,1,e),a=o&&b(o),l=r&&b(r),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+N(o).width,h=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+N(r).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&a.float!=="none"){var u=a.float==="left"?"left":"right";return r&&(l.clear==="both"||l.clear===u)?"vertical":"horizontal"}return o&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||c>=s&&n[Ni]==="none"||r&&n[Ni]==="none"&&c+h>s)?"vertical":"horizontal"},zn=function(t,e,n){var s=n?t.left:t.top,o=n?t.right:t.bottom,r=n?t.width:t.height,a=n?e.left:e.top,l=n?e.right:e.bottom,c=n?e.width:e.height;return s===a||o===l||s+r/2===a+c/2},Xn=function(t,e){var n;return Oe.some(function(s){var o=s[q].options.emptyInsertThreshold;if(!(!o||Ge(s))){var r=N(s),a=t>=r.left-o&&t<=r.right+o,l=e>=r.top-o&&e<=r.bottom+o;if(a&&l)return n=s}}),n},ji=function(t){function e(o,r){return function(a,l,c,h){var u=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(o==null&&(r||u))return!0;if(o==null||o===!1)return!1;if(r&&o==="clone")return o;if(typeof o=="function")return e(o(a,l,c,h),r)(a,l,c,h);var f=(r?a:l).options.group.name;return o===!0||typeof o=="string"&&o===f||o.join&&o.indexOf(f)>-1}}var n={},s=t.group;(!s||ze(s)!="object")&&(s={name:s}),n.name=s.name,n.checkPull=e(s.pull,!0),n.checkPut=e(s.put),n.revertClone=s.revertClone,t.group=n},Ui=function(){!Yi&&y&&b(y,"display","none")},Gi=function(){!Yi&&y&&b(y,"display","")};xe&&!ki&&document.addEventListener("click",function(i){if(Se)return i.preventDefault(),i.stopPropagation&&i.stopPropagation(),i.stopImmediatePropagation&&i.stopImmediatePropagation(),Se=!1,!1},!0);var Tt=function(t){if(d){t=t.touches?t.touches[0]:t;var e=Xn(t.clientX,t.clientY);if(e){var n={};for(var s in t)t.hasOwnProperty(s)&&(n[s]=t[s]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[q]._onDragOver(n)}}},Yn=function(t){d&&d.parentNode[q]._isOutsideThisEl(t.target)};function v(i,t){if(!(i&&i.nodeType&&i.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(i));this.el=i,this.options=t=bt({},t),i[q]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(i.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ki(i,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(r,a){r.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:v.supportPointer!==!1&&"PointerEvent"in window&&(!Jt||Ue),emptyInsertThreshold:5};ne.initializePlugins(this,i,e);for(var n in e)!(n in t)&&(t[n]=e[n]);ji(t);for(var s in this)s.charAt(0)==="_"&&typeof this[s]=="function"&&(this[s]=this[s].bind(this));this.nativeDraggable=t.forceFallback?!1:$n,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?E(i,"pointerdown",this._onTapStart):(E(i,"mousedown",this._onTapStart),E(i,"touchstart",this._onTapStart)),this.nativeDraggable&&(E(i,"dragover",this),E(i,"dragenter",this)),Oe.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),bt(this,kn())}v.prototype={constructor:v,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Pt=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,d):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,s=this.options,o=s.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,h=s.filter;if(Zn(n),!d&&!(/mousedown|pointerdown/.test(r)&&t.button!==0||s.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&Jt&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=lt(l,s.draggable,n,!1),!(l&&l.animated)&&ge!==l)){if(Bt=ot(l),Zt=ot(l,s.draggable),typeof h=="function"){if(h.call(this,t,l,this)){K({sortable:e,rootEl:c,name:"filter",targetEl:l,toEl:n,fromEl:n}),G("filter",e,{evt:t}),o&&t.preventDefault();return}}else if(h&&(h=h.split(",").some(function(u){if(u=lt(c,u.trim(),n,!1),u)return K({sortable:e,rootEl:u,name:"filter",targetEl:l,fromEl:n,toEl:n}),G("filter",e,{evt:t}),!0}),h)){o&&t.preventDefault();return}s.handle&&!lt(c,s.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var s=this,o=s.el,r=s.options,a=o.ownerDocument,l;if(n&&!d&&n.parentNode===o){var c=N(n);if(L=o,d=n,R=d.parentNode,It=d.nextSibling,ge=n,de=r.group,v.dragged=d,Lt={target:d,clientX:(e||t).clientX,clientY:(e||t).clientY},_i=Lt.clientX-c.left,Pi=Lt.clientY-c.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,d.style["will-change"]="all",l=function(){if(G("delayEnded",s,{evt:t}),v.eventCanceled){s._onDrop();return}s._disableDelayedDragEvents(),!Ti&&s.nativeDraggable&&(d.draggable=!0),s._triggerDragStart(t,e),K({sortable:s,name:"choose",originalEvent:t}),tt(d,r.chosenClass,!0)},r.ignore.split(",").forEach(function(h){Vi(d,h.trim(),He)}),E(a,"dragover",Tt),E(a,"mousemove",Tt),E(a,"touchmove",Tt),r.supportPointer?(E(a,"pointerup",s._onDrop),!this.nativeDraggable&&E(a,"pointercancel",s._onDrop)):(E(a,"mouseup",s._onDrop),E(a,"touchend",s._onDrop),E(a,"touchcancel",s._onDrop)),Ti&&this.nativeDraggable&&(this.options.touchStartThreshold=4,d.draggable=!0),G("delayStart",this,{evt:t}),r.delay&&(!r.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(ie||vt))){if(v.eventCanceled){this._onDrop();return}r.supportPointer?(E(a,"pointerup",s._disableDelayedDrag),E(a,"pointercancel",s._disableDelayedDrag)):(E(a,"mouseup",s._disableDelayedDrag),E(a,"touchend",s._disableDelayedDrag),E(a,"touchcancel",s._disableDelayedDrag)),E(a,"mousemove",s._delayedDragTouchMoveHandler),E(a,"touchmove",s._delayedDragTouchMoveHandler),r.supportPointer&&E(a,"pointermove",s._delayedDragTouchMoveHandler),s._dragStartTimer=setTimeout(l,r.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){d&&He(d),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;S(t,"mouseup",this._disableDelayedDrag),S(t,"touchend",this._disableDelayedDrag),S(t,"touchcancel",this._disableDelayedDrag),S(t,"pointerup",this._disableDelayedDrag),S(t,"pointercancel",this._disableDelayedDrag),S(t,"mousemove",this._delayedDragTouchMoveHandler),S(t,"touchmove",this._delayedDragTouchMoveHandler),S(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?E(document,"pointermove",this._onTouchMove):e?E(document,"touchmove",this._onTouchMove):E(document,"mousemove",this._onTouchMove):(E(d,"dragend",this),E(L,"dragstart",this._onDragStart));try{document.selection?ve(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(Nt=!1,L&&d){G("dragStarted",this,{evt:e}),this.nativeDraggable&&E(document,"dragover",Yn);var n=this.options;!t&&tt(d,n.dragClass,!1),tt(d,n.ghostClass,!0),v.active=this,t&&this._appendGhost(),K({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(at){this._lastX=at.clientX,this._lastY=at.clientY,Ui();for(var t=document.elementFromPoint(at.clientX,at.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(at.clientX,at.clientY),t!==e);)e=t;if(d.parentNode[q]._isOutsideThisEl(t),e)do{if(e[q]){var n=void 0;if(n=e[q]._onDragOver({clientX:at.clientX,clientY:at.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=Hi(e));Gi()}},_onTouchMove:function(t){if(Lt){var e=this.options,n=e.fallbackTolerance,s=e.fallbackOffset,o=t.touches?t.touches[0]:t,r=y&&kt(y,!0),a=y&&r&&r.a,l=y&&r&&r.d,c=pe&&X&&Mi(X),h=(o.clientX-Lt.clientX+s.x)/(a||1)+(c?c[0]-Fe[0]:0)/(a||1),u=(o.clientY-Lt.clientY+s.y)/(l||1)+(c?c[1]-Fe[1]:0)/(l||1);if(!v.active&&!Nt){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(y){r?(r.e+=h-(Be||0),r.f+=u-(ke||0)):r={a:1,b:0,c:0,d:1,e:h,f:u};var f="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");b(y,"webkitTransform",f),b(y,"mozTransform",f),b(y,"msTransform",f),b(y,"transform",f),Be=h,ke=u,at=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!y){var t=this.options.fallbackOnBody?document.body:L,e=N(d,!0,pe,!0,t),n=this.options;if(pe){for(X=t;b(X,"position")==="static"&&b(X,"transform")==="none"&&X!==document;)X=X.parentNode;X!==document.body&&X!==document.documentElement?(X===document&&(X=ht()),e.top+=X.scrollTop,e.left+=X.scrollLeft):X=ht(),Fe=Mi(X)}y=d.cloneNode(!0),tt(y,n.ghostClass,!1),tt(y,n.fallbackClass,!0),tt(y,n.dragClass,!0),b(y,"transition",""),b(y,"transform",""),b(y,"box-sizing","border-box"),b(y,"margin",0),b(y,"top",e.top),b(y,"left",e.left),b(y,"width",e.width),b(y,"height",e.height),b(y,"opacity","0.8"),b(y,"position",pe?"absolute":"fixed"),b(y,"zIndex","100000"),b(y,"pointerEvents","none"),v.ghost=y,t.appendChild(y),b(y,"transform-origin",_i/parseInt(y.style.width)*100+"% "+Pi/parseInt(y.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,s=t.dataTransfer,o=n.options;if(G("dragStart",this,{evt:t}),v.eventCanceled){this._onDrop();return}G("setupClone",this),v.eventCanceled||(T=zi(d),T.removeAttribute("id"),T.draggable=!1,T.style["will-change"]="",this._hideClone(),tt(T,this.options.chosenClass,!1),v.clone=T),n.cloneId=ve(function(){G("clone",n),!v.eventCanceled&&(n.options.removeCloneOnHide||L.insertBefore(T,d),n._hideClone(),K({sortable:n,name:"clone"}))}),!e&&tt(d,o.dragClass,!0),e?(Se=!0,n._loopId=setInterval(n._emulateDragOver,50)):(S(document,"mouseup",n._onDrop),S(document,"touchend",n._onDrop),S(document,"touchcancel",n._onDrop),s&&(s.effectAllowed="move",o.setData&&o.setData.call(n,s,d)),E(document,"drop",n),b(d,"transform","translateZ(0)")),Nt=!0,n._dragStartId=ve(n._dragStarted.bind(n,e,t)),E(document,"selectstart",n),Ut=!0,window.getSelection().removeAllRanges(),Jt&&b(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,n=t.target,s,o,r,a=this.options,l=a.group,c=v.active,h=de===l,u=a.sort,f=H||c,p,m=this,g=!1;if(Xe)return;function O(_,z){G(_,m,dt({evt:t,isOwner:h,axis:p?"vertical":"horizontal",revert:r,dragRect:s,targetRect:o,canSort:u,fromSortable:f,target:n,completed:w,onMove:function(Ht,Ce){return me(L,e,d,s,Ht,N(Ht),t,Ce)},changed:A},z))}function x(){O("dragOverAnimationCapture"),m.captureAnimationState(),m!==f&&f.captureAnimationState()}function w(_){return O("dragOverCompleted",{insertion:_}),_&&(h?c._hideClone():c._showClone(m),m!==f&&(tt(d,H?H.options.ghostClass:c.options.ghostClass,!1),tt(d,a.ghostClass,!0)),H!==m&&m!==v.active?H=m:m===v.active&&H&&(H=null),f===m&&(m._ignoreWhileAnimating=n),m.animateAll(function(){O("dragOverAnimationComplete"),m._ignoreWhileAnimating=null}),m!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(n===d&&!d.animated||n===e&&!n.animated)&&(Pt=null),!a.dragoverBubble&&!t.rootEl&&n!==document&&(d.parentNode[q]._isOutsideThisEl(t.target),!_&&Tt(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function A(){et=ot(d),St=ot(d,a.draggable),K({sortable:m,name:"change",toEl:e,newIndex:et,newDraggableIndex:St,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),n=lt(n,a.draggable,e,!0),O("dragOver"),v.eventCanceled)return g;if(d.contains(t.target)||n.animated&&n.animatingX&&n.animatingY||m._ignoreWhileAnimating===n)return w(!1);if(Se=!1,c&&!a.disabled&&(h?u||(r=R!==L):H===this||(this.lastPutMode=de.checkPull(this,c,d,t))&&l.checkPut(this,c,d,t))){if(p=this._getDirection(t,n)==="vertical",s=N(d),O("dragOverValid"),v.eventCanceled)return g;if(r)return R=L,x(),this._hideClone(),O("revert"),v.eventCanceled||(It?L.insertBefore(d,It):L.appendChild(d)),w(!0);var D=Ge(e,a.draggable);if(!D||Gn(t,p,this)&&!D.animated){if(D===d)return w(!1);if(D&&e===t.target&&(n=D),n&&(o=N(n)),me(L,e,d,s,n,o,t,!!n)!==!1)return x(),D&&D.nextSibling?e.insertBefore(d,D.nextSibling):e.appendChild(d),R=e,A(),w(!0)}else if(D&&Un(t,p,this)){var M=Ft(e,0,a,!0);if(M===d)return w(!1);if(n=M,o=N(n),me(L,e,d,s,n,o,t,!1)!==!1)return x(),e.insertBefore(d,M),R=e,A(),w(!0)}else if(n.parentNode===e){o=N(n);var C=0,J,Q=d.parentNode!==e,I=!zn(d.animated&&d.toRect||s,n.animated&&n.toRect||o,p),V=p?"top":"left",Y=Ri(n,"top","top")||Ri(d,"top","top"),it=Y?Y.scrollTop:void 0;Pt!==n&&(J=o[V],ee=!1,fe=!I&&a.invertSwap||Q),C=qn(t,n,o,p,I?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,fe,Pt===n);var W;if(C!==0){var B=ot(d);do B-=C,W=R.children[B];while(W&&(b(W,"display")==="none"||W===y))}if(C===0||W===n)return w(!1);Pt=n,te=C;var Z=n.nextElementSibling,k=!1;k=C===1;var $=me(L,e,d,s,n,o,t,k);if($!==!1)return($===1||$===-1)&&(k=$===1),Xe=!0,setTimeout(jn,30),x(),k&&!Z?e.appendChild(d):n.parentNode.insertBefore(d,k?Z:n),Y&&$i(Y,0,it-Y.scrollTop),R=d.parentNode,J!==void 0&&!fe&&(be=Math.abs(J-N(n)[V])),A(),w(!0)}if(e.contains(d))return w(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){S(document,"mousemove",this._onTouchMove),S(document,"touchmove",this._onTouchMove),S(document,"pointermove",this._onTouchMove),S(document,"dragover",Tt),S(document,"mousemove",Tt),S(document,"touchmove",Tt)},_offUpEvents:function(){var t=this.el.ownerDocument;S(t,"mouseup",this._onDrop),S(t,"touchend",this._onDrop),S(t,"pointerup",this._onDrop),S(t,"pointercancel",this._onDrop),S(t,"touchcancel",this._onDrop),S(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;if(et=ot(d),St=ot(d,n.draggable),G("drop",this,{evt:t}),R=d&&d.parentNode,et=ot(d),St=ot(d,n.draggable),v.eventCanceled){this._nulling();return}Nt=!1,fe=!1,ee=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ye(this.cloneId),Ye(this._dragStartId),this.nativeDraggable&&(S(document,"drop",this),S(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Jt&&b(document.body,"user-select",""),b(d,"transform",""),t&&(Ut&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),y&&y.parentNode&&y.parentNode.removeChild(y),(L===R||H&&H.lastPutMode!=="clone")&&T&&T.parentNode&&T.parentNode.removeChild(T),d&&(this.nativeDraggable&&S(d,"dragend",this),He(d),d.style["will-change"]="",Ut&&!Nt&&tt(d,H?H.options.ghostClass:this.options.ghostClass,!1),tt(d,this.options.chosenClass,!1),K({sortable:this,name:"unchoose",toEl:R,newIndex:null,newDraggableIndex:null,originalEvent:t}),L!==R?(et>=0&&(K({rootEl:R,name:"add",toEl:R,fromEl:L,originalEvent:t}),K({sortable:this,name:"remove",toEl:R,originalEvent:t}),K({rootEl:R,name:"sort",toEl:R,fromEl:L,originalEvent:t}),K({sortable:this,name:"sort",toEl:R,originalEvent:t})),H&&H.save()):et!==Bt&&et>=0&&(K({sortable:this,name:"update",toEl:R,originalEvent:t}),K({sortable:this,name:"sort",toEl:R,originalEvent:t})),v.active&&((et==null||et===-1)&&(et=Bt,St=Zt),K({sortable:this,name:"end",toEl:R,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){G("nulling",this),L=d=R=y=It=T=ge=Ot=Lt=at=Ut=et=St=Bt=Zt=Pt=te=H=de=v.dragged=v.ghost=v.clone=v.active=null;var t=this.el;Ee.forEach(function(e){t.contains(e)&&(e.checked=!0)}),Ee.length=Be=ke=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":d&&(this._onDragOver(t),Kn(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,n=this.el.children,s=0,o=n.length,r=this.options;s<o;s++)e=n[s],lt(e,r.draggable,this.el,!1)&&t.push(e.getAttribute(r.dataIdAttr)||Qn(e));return t},sort:function(t,e){var n={},s=this.el;this.toArray().forEach(function(o,r){var a=s.children[r];lt(a,this.options.draggable,s,!1)&&(n[o]=a)},this),e&&this.captureAnimationState(),t.forEach(function(o){n[o]&&(s.removeChild(n[o]),s.appendChild(n[o]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return lt(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(e===void 0)return n[t];var s=ne.modifyOption(this,t,e);typeof s<"u"?n[t]=s:n[t]=e,t==="group"&&ji(n)},destroy:function(){G("destroy",this);var t=this.el;t[q]=null,S(t,"mousedown",this._onTapStart),S(t,"touchstart",this._onTapStart),S(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(S(t,"dragover",this),S(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Oe.splice(Oe.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Ot){if(G("hideClone",this),v.eventCanceled)return;b(T,"display","none"),this.options.removeCloneOnHide&&T.parentNode&&T.parentNode.removeChild(T),Ot=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(Ot){if(G("showClone",this),v.eventCanceled)return;d.parentNode==L&&!this.options.group.revertClone?L.insertBefore(T,d):It?L.insertBefore(T,It):L.appendChild(T),this.options.group.revertClone&&this.animate(d,T),b(T,"display",""),Ot=!1}}};function Kn(i){i.dataTransfer&&(i.dataTransfer.dropEffect="move"),i.cancelable&&i.preventDefault()}function me(i,t,e,n,s,o,r,a){var l,c=i[q],h=c.options.onMove,u;return window.CustomEvent&&!vt&&!ie?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=i,l.dragged=e,l.draggedRect=n,l.related=s||t,l.relatedRect=o||N(t),l.willInsertAfter=a,l.originalEvent=r,i.dispatchEvent(l),h&&(u=h.call(c,l,r)),u}function He(i){i.draggable=!1}function jn(){Xe=!1}function Un(i,t,e){var n=N(Ft(e.el,0,e.options,!0)),s=Xi(e.el,e.options,y),o=10;return t?i.clientX<s.left-o||i.clientY<n.top&&i.clientX<n.right:i.clientY<s.top-o||i.clientY<n.bottom&&i.clientX<n.left}function Gn(i,t,e){var n=N(Ge(e.el,e.options.draggable)),s=Xi(e.el,e.options,y),o=10;return t?i.clientX>s.right+o||i.clientY>n.bottom&&i.clientX>n.left:i.clientY>s.bottom+o||i.clientX>n.right&&i.clientY>n.top}function qn(i,t,e,n,s,o,r,a){var l=n?i.clientY:i.clientX,c=n?e.height:e.width,h=n?e.top:e.left,u=n?e.bottom:e.right,f=!1;if(!r){if(a&&be<c*s){if(!ee&&(te===1?l>h+c*o/2:l<u-c*o/2)&&(ee=!0),ee)f=!0;else if(te===1?l<h+be:l>u-be)return-te}else if(l>h+c*(1-s)/2&&l<u-c*(1-s)/2)return Jn(t)}return f=f||r,f&&(l<h+c*o/2||l>u-c*o/2)?l>h+c/2?1:-1:0}function Jn(i){return ot(d)<ot(i)?1:-1}function Qn(i){for(var t=i.tagName+i.className+i.src+i.href+i.textContent,e=t.length,n=0;e--;)n+=t.charCodeAt(e);return n.toString(36)}function Zn(i){Ee.length=0;for(var t=i.getElementsByTagName("input"),e=t.length;e--;){var n=t[e];n.checked&&Ee.push(n)}}function ve(i){return setTimeout(i,0)}function Ye(i){return clearTimeout(i)}xe&&E(document,"touchmove",function(i){(v.active||Nt)&&i.cancelable&&i.preventDefault()});v.utils={on:E,off:S,css:b,find:Vi,is:function(t,e){return!!lt(t,e,t,!1)},extend:Nn,throttle:Wi,closest:lt,toggleClass:tt,clone:zi,index:ot,nextTick:ve,cancelNextTick:Ye,detectDirection:Ki,getChild:Ft,expando:q};v.get=function(i){return i[q]};v.mount=function(){for(var i=arguments.length,t=new Array(i),e=0;e<i;e++)t[e]=arguments[e];t[0].constructor===Array&&(t=t[0]),t.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(v.utils=dt(dt({},v.utils),n.utils)),ne.mount(n)})};v.create=function(i,t){return new v(i,t)};v.version=_n;var P=[],Gt,Ke,je=!1,Ve,We,De,qt;function ts(){function i(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return i.prototype={dragStarted:function(e){var n=e.originalEvent;this.sortable.nativeDraggable?E(document,"dragover",this._handleAutoScroll):this.options.supportPointer?E(document,"pointermove",this._handleFallbackAutoScroll):n.touches?E(document,"touchmove",this._handleFallbackAutoScroll):E(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var n=e.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?S(document,"dragover",this._handleAutoScroll):(S(document,"pointermove",this._handleFallbackAutoScroll),S(document,"touchmove",this._handleFallbackAutoScroll),S(document,"mousemove",this._handleFallbackAutoScroll)),Bi(),ye(),Bn()},nulling:function(){De=Ke=Gt=je=qt=Ve=We=null,P.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,n){var s=this,o=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,a=document.elementFromPoint(o,r);if(De=e,n||this.options.forceAutoScrollFallback||ie||vt||Jt){$e(e,this.options,a,n);var l=Et(a,!0);je&&(!qt||o!==Ve||r!==We)&&(qt&&Bi(),qt=setInterval(function(){var c=Et(document.elementFromPoint(o,r),!0);c!==l&&(l=c,ye()),$e(e,s.options,c,n)},10),Ve=o,We=r)}else{if(!this.options.bubbleScroll||Et(a,!0)===ht()){ye();return}$e(e,this.options,Et(a,!1),!1)}}},bt(i,{pluginName:"scroll",initializeByDefault:!0})}function ye(){P.forEach(function(i){clearInterval(i.pid)}),P=[]}function Bi(){clearInterval(qt)}var $e=Wi(function(i,t,e,n){if(t.scroll){var s=(i.touches?i.touches[0]:i).clientX,o=(i.touches?i.touches[0]:i).clientY,r=t.scrollSensitivity,a=t.scrollSpeed,l=ht(),c=!1,h;Ke!==e&&(Ke=e,ye(),Gt=t.scroll,h=t.scrollFn,Gt===!0&&(Gt=Et(e,!0)));var u=0,f=Gt;do{var p=f,m=N(p),g=m.top,O=m.bottom,x=m.left,w=m.right,A=m.width,D=m.height,M=void 0,C=void 0,J=p.scrollWidth,Q=p.scrollHeight,I=b(p),V=p.scrollLeft,Y=p.scrollTop;p===l?(M=A<J&&(I.overflowX==="auto"||I.overflowX==="scroll"||I.overflowX==="visible"),C=D<Q&&(I.overflowY==="auto"||I.overflowY==="scroll"||I.overflowY==="visible")):(M=A<J&&(I.overflowX==="auto"||I.overflowX==="scroll"),C=D<Q&&(I.overflowY==="auto"||I.overflowY==="scroll"));var it=M&&(Math.abs(w-s)<=r&&V+A<J)-(Math.abs(x-s)<=r&&!!V),W=C&&(Math.abs(O-o)<=r&&Y+D<Q)-(Math.abs(g-o)<=r&&!!Y);if(!P[u])for(var B=0;B<=u;B++)P[B]||(P[B]={});(P[u].vx!=it||P[u].vy!=W||P[u].el!==p)&&(P[u].el=p,P[u].vx=it,P[u].vy=W,clearInterval(P[u].pid),(it!=0||W!=0)&&(c=!0,P[u].pid=setInterval(function(){n&&this.layer===0&&v.active._onTouchMove(De);var Z=P[this.layer].vy?P[this.layer].vy*a:0,k=P[this.layer].vx?P[this.layer].vx*a:0;typeof h=="function"&&h.call(v.dragged.parentNode[q],k,Z,i,De,P[this.layer].el)!=="continue"||$i(P[this.layer].el,k,Z)}.bind({layer:u}),24))),u++}while(t.bubbleScroll&&f!==l&&(f=Et(f,!1)));je=c}},30),qi=function(t){var e=t.originalEvent,n=t.putSortable,s=t.dragEl,o=t.activeSortable,r=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var c=n||o;a();var h=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(h.clientX,h.clientY);l(),c&&!c.el.contains(u)&&(r("spill"),this.onSpill({dragEl:s,putSortable:n}))}};function qe(){}qe.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var s=Ft(this.sortable.el,this.startIndex,this.options);s?this.sortable.el.insertBefore(e,s):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:qi};bt(qe,{pluginName:"revertOnSpill"});function Je(){}Je.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable,s=n||this.sortable;s.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),s.animateAll()},drop:qi};bt(Je,{pluginName:"removeOnSpill"});v.mount(new ts);v.mount(Je,qe);var Ji=v;function ft(i){return i.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}function se(i){return i==null||i===""||typeof i=="string"&&i.trim()===""}function F(i){return!se(i)}var Ae=class{constructor({accessibilityAttributes:t={},ariaLabel:e=null,canOptionLabelsWrap:n=!0,canSelectPlaceholder:s=!0,clearButtonLabel:o="Clear selection",element:r,errorMessage:a="The options could not be loaded. Please try again.",getOptionLabelUsing:l=null,getOptionLabelsUsing:c=null,getOptionsUsing:h=null,getSearchResultsUsing:u=null,hasDynamicOptions:f=!1,hasDynamicSearchResults:p=!0,hasInitialNoOptionsMessage:m=!1,id:g=null,initialOptionLabel:O=null,initialOptionLabels:x=null,initialState:w=null,isAutofocused:A=!1,isDisabled:D=!1,isHtmlAllowed:M=!1,isMultiple:C=!1,isReorderable:J=!1,isSearchable:Q=!1,livewireId:I=null,loadingMessage:V="Loading...",maxItems:Y=null,maxItemsMessage:it="Maximum number of items selected",noOptionsMessage:W="No options available",noSearchResultsMessage:B="No results found",onStateChange:Z=()=>{},options:k,optionsLimit:$=null,placeholder:_,position:z=null,removeButtonLabel:j="Remove :label",searchableOptionFields:Ht=["label"],searchDebounce:Ce=1e3,searchingMessage:Qi="Searching...",searchLabel:Zi="Search",searchPrompt:tn="Search...",state:en,statePath:nn=null}){this.accessibilityAttributes=t,this.ariaLabel=e,this.canOptionLabelsWrap=n,this.canSelectPlaceholder=s,this.clearButtonLabel=o,this.element=r,this.errorMessage=a,this.getOptionLabelUsing=l,this.getOptionLabelsUsing=c,this.getOptionsUsing=h,this.getSearchResultsUsing=u,this.hasDynamicOptions=f,this.hasDynamicSearchResults=p&&typeof u=="function",this.hasInitialNoOptionsMessage=m,this.id=g,this.initialOptionLabel=O,this.initialOptionLabels=x,this.initialState=w,this.isAutofocused=A,this.isDisabled=D,this.isHtmlAllowed=M,this.isMultiple=C,this.isReorderable=J,this.isSearchable=Q,this.livewireId=I,this.loadingMessage=V,this.maxItems=Y,this.maxItemsMessage=it,this.noOptionsMessage=W,this.noSearchResultsMessage=B,this.onStateChange=Z,this.options=k,this.optionsLimit=$,this.originalOptions=JSON.parse(JSON.stringify(k)),this.placeholder=_,this.position=z,this.removeButtonLabel=j,this.searchableOptionFields=Array.isArray(Ht)?Ht:["label"],this.searchDebounce=Ce,this.searchingMessage=Qi,this.searchLabel=Zi,this.searchPrompt=tn,this.state=en,this.statePath=nn,this.activeSearchId=0,this.openId=0,this.isDestroyed=!1,this.labelRepository={},this.isOpen=!1,this.activeValue=null,this.typeahead="",this.typeaheadTime=0,this.searchQuery="",this.searchTimeout=null,this.isSearching=!1,this.isLoadingOptions=!1,this.hasOptionsError=!1,this.maxItemsMessageElement=null,this.badgesSortable=null,this.selectedDisplayVersion=0,this.render(),this.setUpEventListeners(),this.isAutofocused&&this.selectButton.focus()}populateLabelRepositoryFromOptions(t){if(!(!t||!Array.isArray(t)))for(let e of t)e.options&&Array.isArray(e.options)?this.populateLabelRepositoryFromOptions(e.options):e.value!==void 0&&e.label!==void 0&&(this.labelRepository[e.value]=e.label)}render(){this.populateLabelRepositoryFromOptions(this.options),this.container=document.createElement("div"),this.container.className="fi-select-input-ctn",this.canOptionLabelsWrap||this.container.classList.add("fi-select-input-ctn-option-labels-not-wrapped"),this.selectButton=document.createElement("button"),this.selectButton.className="fi-select-input-btn",this.selectButton.type="button",this.isSearchable||this.selectButton.setAttribute("role","combobox"),this.selectButton.setAttribute("aria-haspopup","listbox"),this.selectButton.setAttribute("aria-expanded","false"),F(this.id)&&(this.selectButton.id=this.id),F(this.ariaLabel)&&this.selectButton.setAttribute("aria-label",this.ariaLabel),this.selectedDisplay=document.createElement("div"),this.selectedDisplay.className="fi-select-input-value-ctn",this.isMultiple?(this.container.classList.add("fi-select-input-ctn-multiple"),this.isReorderable&&this.container.classList.add("fi-select-input-ctn-reorderable"),this.selectionSummary=document.createElement("span"),this.selectionSummary.className="fi-sr-only",this.selectButton.appendChild(this.selectionSummary)):this.selectButton.appendChild(this.selectedDisplay),this.dropdown=document.createElement("div"),this.dropdown.className="fi-dropdown-panel fi-scrollable",this.dropdown.style.display="none",this.dropdownId=`fi-select-input-dropdown-${Math.random().toString(36).substring(2,11)}`,this.selectButton.setAttribute("aria-controls",this.dropdownId),this.selectionSummary||(this.selectionSummary=document.createElement("span"),this.selectionSummary.className="fi-sr-only",this.container.appendChild(this.selectionSummary)),this.selectionSummary.id=`${this.dropdownId}-value`,this.isSearchable&&(this.searchContainer=document.createElement("div"),this.searchContainer.className="fi-select-input-search-ctn",this.searchInput=document.createElement("input"),this.searchInput.className="fi-input",this.searchInput.type="text",this.searchInput.placeholder=this.searchPrompt,this.searchInput.setAttribute("role","combobox"),this.searchInput.setAttribute("aria-autocomplete","list"),this.searchInput.setAttribute("aria-expanded","false"),this.searchInput.setAttribute("aria-controls",this.dropdownId),this.searchContainer.appendChild(this.searchInput),this.dropdown.appendChild(this.searchContainer),this.searchInput.addEventListener("input",t=>{this.isDisabled||this.handleSearch(t)})),this.optionsList=document.createElement("ul"),this.optionsList.id=this.dropdownId,this.optionsList.setAttribute("role","listbox"),this.isMultiple&&this.optionsList.setAttribute("aria-multiselectable","true"),this.optionsList.addEventListener("mousedown",t=>t.preventDefault()),this.dropdown.addEventListener("mousedown",t=>{t.target===this.dropdown&&t.preventDefault()}),this.statusRegion=document.createElement("div"),this.statusRegion.className="fi-sr-only",this.statusRegion.setAttribute("role","status"),this.statusRegion.setAttribute("aria-live","polite"),this.statusRegion.setAttribute("aria-atomic","true"),this.renderOptions(),this.container.appendChild(this.selectButton),this.isMultiple&&this.container.appendChild(this.selectedDisplay),this.container.appendChild(this.dropdown),this.container.appendChild(this.statusRegion),this.element.appendChild(this.container),this.setAccessibilityAttributes(this.accessibilityAttributes),this.updateSelectedDisplay(),this.applyDisabledState()}renderOptions(){if(this.isSearching||this.hasOptionsError||this.isLoadingOptions&&(!this.searchQuery||!this.hasDynamicSearchResults))return;let t=this.activeValue;this.setActiveOption(null),this.optionsList.innerHTML="";let e=0,n=this.options,s=0,o=!1;this.options.forEach(l=>{l.options&&Array.isArray(l.options)?(s+=l.options.length,o=!0):s++}),o?this.optionsList.className="fi-select-input-options-ctn":s>0&&(this.optionsList.className="fi-dropdown-list");let r=o?null:this.optionsList,a=0;for(let l of n){if(this.optionsLimit>0&&a>=this.optionsLimit)break;if(l.options&&Array.isArray(l.options)){let c=l.options;if(this.isMultiple&&Array.isArray(this.state)&&this.state.length>0&&(c=l.options.filter(h=>!this.state.includes(h.value))),c.length>0){if(this.optionsLimit>0){let h=this.optionsLimit-a;h<c.length&&(c=c.slice(0,h))}this.renderOptionGroup(l.label,c),r=null,a+=c.length,e+=c.length}}else{if(this.isMultiple&&Array.isArray(this.state)&&this.state.includes(l.value))continue;!r&&o&&(r=document.createElement("ul"),r.className="fi-dropdown-list",r.setAttribute("role","presentation"),this.optionsList.appendChild(r));let c=this.createOptionElement(l.value,l);r.appendChild(c),a++,e++}}if(e===0?(this.searchQuery?this.showNoResultsMessage():(this.hasInitialNoOptionsMessage||this.hasDynamicOptions)&&this.showNoOptionsMessage(),this.optionsList.hidden=!0):(this.optionsList.hidden=!1,this.hideLoadingState(),this.optionsList.parentNode!==this.dropdown&&this.dropdown.appendChild(this.optionsList)),this.optionsList.parentNode!==this.dropdown&&this.dropdown.appendChild(this.optionsList),this.isOpen){let l=this.getEnabledOptions();this.setActiveOption(l.find(c=>c.dataset.value===t)??(t!==null||!this.isSearchable?l.find(c=>this.typeahead&&ft(c.textContent.trim()).startsWith(this.typeahead))??l.find(c=>c.dataset.value===this.state)??l[0]:null))}}renderOptionGroup(t,e){if(e.length===0)return;let n=document.createElement("li");n.className="fi-select-input-option-group",n.setAttribute("role","presentation");let s=document.createElement("div");s.className="fi-dropdown-header",s.textContent=t;let o=document.createElement("ul");o.className="fi-dropdown-list",o.setAttribute("role","group"),o.setAttribute("aria-label",t),e.forEach(r=>{let a=this.createOptionElement(r.value,r);o.appendChild(a)}),n.appendChild(s),n.appendChild(o),this.optionsList.appendChild(n)}createOptionElement(t,e){let n=t,s=e,o=!1;typeof e=="object"&&e!==null&&"label"in e&&"value"in e&&(n=e.value,s=e.label,o=e.isDisabled||!1);let r=document.createElement("li");r.className="fi-dropdown-list-item fi-select-input-option",o&&r.classList.add("fi-disabled");let a=`fi-select-input-option-${Math.random().toString(36).substring(2,11)}`;if(r.id=a,r.setAttribute("role","option"),r.setAttribute("data-value",n),o&&r.setAttribute("aria-disabled","true"),this.isHtmlAllowed&&typeof s=="string"){let h=document.createElement("div");h.innerHTML=s;let u=h.textContent||h.innerText||s;r.setAttribute("aria-label",u)}let l=this.isMultiple?Array.isArray(this.state)&&this.state.includes(n):this.state===n;r.setAttribute("aria-selected",l?"true":"false");let c=document.createElement("span");return this.isHtmlAllowed?c.innerHTML=s:c.textContent=s,r.appendChild(c),o||r.addEventListener("click",h=>{h.preventDefault(),h.stopPropagation(),this.selectOption(n)}),r}async updateSelectedDisplay(){if(this.isDestroyed)return;this.selectedDisplayVersion=this.selectedDisplayVersion+1;let t=this.selectedDisplayVersion,e=document.createDocumentFragment();if(this.isMultiple){if(!Array.isArray(this.state)||this.state.length===0){let s=document.createElement("span");s.textContent=this.placeholder,s.classList.add("fi-select-input-placeholder"),e.appendChild(s)}else{let s=await this.getLabelsForMultipleSelection();if(t!==this.selectedDisplayVersion)return;this.addBadgesForSelectedOptions(s,e)}t===this.selectedDisplayVersion&&(e.querySelector(".fi-select-input-value-badges-ctn")||this.destroyBadgesSortable(),this.commitSelectedDisplay(e),this.isOpen&&this.deferPositionDropdown());return}if(this.state===null||this.state===""){let s=document.createElement("span");if(s.textContent=this.placeholder,s.classList.add("fi-select-input-placeholder"),e.appendChild(s),t===this.selectedDisplayVersion){this.destroyBadgesSortable(),this.commitSelectedDisplay(e);let o=this.container.querySelector(".fi-select-input-value-remove-btn");o&&o.remove(),this.container.classList.remove("fi-select-input-ctn-clearable")}return}let n=await this.getLabelForSingleSelection();t===this.selectedDisplayVersion&&(this.addSingleSelectionDisplay(n,e),t===this.selectedDisplayVersion&&(this.destroyBadgesSortable(),this.commitSelectedDisplay(e)))}commitSelectedDisplay(t){let e=this.selectedDisplay.contains(document.activeElement)?document.activeElement:null,n=e?.closest("[data-value]")?.dataset.value;this.selectedDisplay.replaceChildren(t),this.updateSelectionSummary(),e&&(this.isOpen?this.getFocusOwner():this.selectedDisplay.querySelector(`[data-value="${CSS.escape(n??"")}"] button`)??this.selectButton).focus()}updateSelectionSummary(){this.selectionSummary.textContent=Array.from(this.selectedDisplay.querySelectorAll(".fi-badge-label, .fi-select-input-value-label, .fi-select-input-placeholder"),t=>t.textContent).join(", ")}async getLabelsForMultipleSelection(){let t=this.selectedDisplayVersion,e=this.getSelectedOptionLabels(),n=[];if(Array.isArray(this.state)){for(let o of this.state)if(!F(this.labelRepository[o])){if(F(e[o])){this.labelRepository[o]=e[o];continue}n.push(o.toString())}}if(n.length>0&&F(this.initialOptionLabels)&&JSON.stringify(this.state)===JSON.stringify(this.initialState)){if(Array.isArray(this.initialOptionLabels))for(let o of this.initialOptionLabels)F(o)&&o.value!==void 0&&o.label!==void 0&&n.includes(o.value)&&(this.labelRepository[o.value]=o.label)}else if(n.length>0&&this.getOptionLabelsUsing)try{let o=await this.getOptionLabelsUsing();if(this.isDestroyed||t!==this.selectedDisplayVersion)return[];for(let r of o)F(r)&&r.value!==void 0&&r.label!==void 0&&(this.labelRepository[r.value]=r.label)}catch(o){console.error("Error fetching option labels:",o)}let s=[];if(Array.isArray(this.state))for(let o of this.state)F(this.labelRepository[o])?s.push(this.labelRepository[o]):F(e[o])?s.push(e[o]):s.push(o);return s}createBadgeElement(t,e){let n=document.createElement("span");n.className="fi-badge fi-size-md fi-color fi-color-primary fi-text-color-700 dark:fi-text-color-200",F(t)&&n.setAttribute("data-value",t);let s=document.createElement("span");s.className="fi-badge-label-ctn";let o=document.createElement("span");o.className="fi-badge-label",this.canOptionLabelsWrap&&o.classList.add("fi-wrapped"),this.isHtmlAllowed?o.innerHTML=e:o.textContent=e,s.appendChild(o),n.appendChild(s);let r=this.createRemoveButton(t,e);return n.appendChild(r),n}createRemoveButton(t,e){let n=document.createElement("button");n.type="button",n.className="fi-badge-delete-btn",n.setAttribute("aria-label",this.removeButtonLabel.replace(":label",this.isHtmlAllowed?e.replace(/<[^>]*>/g,""):e));let s=document.createElement("span");return s.className="fi-badge-delete-btn-icon",s.setAttribute("aria-hidden","true"),n.appendChild(s),this.isDisabled&&(n.setAttribute("disabled","disabled"),n.classList.add("fi-disabled")),n.addEventListener("click",o=>{if(o.stopPropagation(),F(t)){let r=Array.from(this.selectedDisplay.querySelectorAll(".fi-badge-delete-btn")),a=r.indexOf(n),l=this.isOpen?this.getFocusOwner():r[a+1]??r[a-1]??this.selectButton;this.selectOption(t),this.isDisabled||l.focus()}}),n.addEventListener("keydown",o=>{(o.key===" "||o.key==="Enter")&&(o.preventDefault(),o.stopPropagation(),n.click())}),n}addBadgesForSelectedOptions(t,e=this.selectedDisplay){let n=document.createElement("div");n.className="fi-select-input-value-badges-ctn",t.forEach((s,o)=>{let r=Array.isArray(this.state)?this.state[o]:null,a=this.createBadgeElement(r,s);n.appendChild(a)}),e.appendChild(n),this.isReorderable&&(n.addEventListener("click",s=>{s.stopPropagation()}),n.addEventListener("mousedown",s=>{s.stopPropagation()}),this.destroyBadgesSortable(),this.badgesSortable=new Ji(n,{animation:150,disabled:this.isDisabled,onEnd:()=>{let s=[];n.querySelectorAll("[data-value]").forEach(o=>{s.push(o.getAttribute("data-value"))}),this.state=s,this.updateSelectionSummary(),this.onStateChange(this.state)}}))}destroyBadgesSortable(){this.badgesSortable?.destroy(),this.badgesSortable=null}async getLabelForSingleSelection(){let t=this.state,e=this.selectedDisplayVersion,n=this.labelRepository[this.state];if(se(n)&&(n=this.getSelectedOptionLabel(this.state)),se(n)&&F(this.initialOptionLabel)&&this.state===this.initialState)n=this.initialOptionLabel,F(this.state)&&(this.labelRepository[this.state]=n);else if(se(n)&&this.getOptionLabelUsing)try{if(n=await this.getOptionLabelUsing(),this.isDestroyed||e!==this.selectedDisplayVersion||t!==this.state)return null;F(n)&&F(this.state)&&(this.labelRepository[t]=n)}catch(s){console.error("Error fetching option label:",s),n=this.state}else se(n)&&(n=this.state);return n}addSingleSelectionDisplay(t,e=this.selectedDisplay){let n=document.createElement("span");if(n.className="fi-select-input-value-label",this.isHtmlAllowed?n.innerHTML=t:n.textContent=t,e.appendChild(n),!this.canSelectPlaceholder||this.container.querySelector(".fi-select-input-value-remove-btn"))return;let s=document.createElement("button");s.type="button",s.className="fi-select-input-value-remove-btn",s.setAttribute("aria-label",this.clearButtonLabel),this.isDisabled&&(s.setAttribute("disabled","disabled"),s.classList.add("fi-disabled")),s.addEventListener("click",o=>{o.stopPropagation(),this.selectOption("")}),s.addEventListener("keydown",o=>{(o.key===" "||o.key==="Enter")&&(o.preventDefault(),o.stopPropagation(),this.selectOption(""))}),this.container.appendChild(s),this.container.classList.add("fi-select-input-ctn-clearable")}getSelectedOptionLabel(t){if(F(this.labelRepository[t]))return this.labelRepository[t];let e="";for(let n of this.options)if(n.options&&Array.isArray(n.options)){for(let s of n.options)if(s.value===t){e=s.label,this.labelRepository[t]=e;break}}else if(n.value===t){e=n.label,this.labelRepository[t]=e;break}return e}setUpEventListeners(){this.buttonClickListener=()=>{this.toggleDropdown()},this.documentClickListener=t=>{!this.container.contains(t.target)&&this.isOpen&&this.closeDropdown()},this.buttonKeydownListener=t=>{this.isDisabled||this.handleSelectButtonKeydown(t)},this.dropdownKeydownListener=t=>{this.isDisabled||this.handleDropdownKeydown(t)},this.focusinListener=()=>this.syncActiveDescendant(),this.focusoutListener=t=>{this.selectButton.removeAttribute("aria-activedescendant"),this.searchInput?.removeAttribute("aria-activedescendant"),queueMicrotask(()=>{this.isDestroyed||!this.isOpen||(this.isTabbing||!this.container.contains(t.relatedTarget))&&(this.isTabbing=!1,this.closeDropdown())})},this.dropdownEscapeListener=t=>{this.isOpen&&(this.closeDropdown(),this.selectButton.focus(),t.preventDefault(),t.stopPropagation())},this.selectButton.addEventListener("click",this.buttonClickListener),document.addEventListener("click",this.documentClickListener),this.selectButton.addEventListener("keydown",this.buttonKeydownListener),this.dropdown.addEventListener("keydown",this.dropdownKeydownListener),this.container.addEventListener("focusin",this.focusinListener),this.container.addEventListener("focusout",this.focusoutListener),this.element.addEventListener("dropdown-escape",this.dropdownEscapeListener),!this.isMultiple&&this.livewireId&&this.statePath&&this.getOptionLabelUsing&&(this.refreshOptionLabelListener=async t=>{if(t.detail.livewireId===this.livewireId&&t.detail.statePath===this.statePath&&F(this.state))try{let e=this.state,n=++this.selectedDisplayVersion;delete this.labelRepository[this.state];let s=await this.getOptionLabelUsing();if(this.isDestroyed||e!==this.state||n!==this.selectedDisplayVersion)return;this.updateOptionLabelInList(this.state,s),this.updateSelectedDisplay()}catch(e){console.error("Error refreshing option label:",e)}},window.addEventListener("filament-forms::select.refreshSelectedOptionLabel",this.refreshOptionLabelListener))}updateOptionLabelInList(t,e){this.labelRepository[t]=e;let n=this.getVisibleOptions();for(let s of n)if(s.getAttribute("data-value")===String(t)){if(s.innerHTML="",this.isHtmlAllowed){let o=document.createElement("span");o.innerHTML=e,s.appendChild(o),s.setAttribute("aria-label",o.textContent||o.innerText||e)}else s.appendChild(document.createTextNode(e));break}for(let s of this.options)if(s.options&&Array.isArray(s.options)){for(let o of s.options)if(o.value===t){o.label=e;break}}else if(s.value===t){s.label=e;break}for(let s of this.originalOptions)if(s.options&&Array.isArray(s.options)){for(let o of s.options)if(o.value===t){o.label=e;break}}else if(s.value===t){s.label=e;break}}handleSelectButtonKeydown(t){if(!(t.isComposing||t.keyCode===229)){if((!this.isOpen||this.isSearchable)&&["Enter"," ","ArrowDown","ArrowUp"].includes(t.key)){t.preventDefault(),t.stopPropagation(),this.openDropdown();return}this.handleDropdownKeydown(t)}}handleDropdownKeydown(t){if(t.isComposing||t.keyCode===229)return;let e=t.target===this.searchInput,n=this.getEnabledOptions();switch(t.key){case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.focusNextOption();break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),this.focusPreviousOption();break;case" ":if(e)return;case"Enter":if(!this.isOpen)return;t.preventDefault(),t.stopPropagation();let s=n.find(o=>o.dataset.value===this.activeValue)??(e?n[0]:null);s&&this.selectOption(s.dataset.value);break;case"Escape":if(!this.isOpen)return;t.preventDefault(),t.stopPropagation(),this.closeDropdown(),this.selectButton.focus();break;case"Tab":this.isTabbing=this.isOpen;break;case"Home":case"End":if(e||!this.isOpen)return;t.preventDefault(),t.stopPropagation(),this.setActiveOption(t.key==="Home"?n[0]:n.at(-1));break;default:if(!e&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&typeof t.key=="string"&&t.key.length===1)if(t.preventDefault(),this.isOpen||this.openDropdown(),this.isSearchable)this.searchInput.value=(this.searchInput.value||"")+t.key,this.searchInput.dispatchEvent(new Event("input",{bubbles:!0}));else{let o=Date.now();this.typeahead=(o-this.typeaheadTime<1e3?this.typeahead:"")+ft(t.key),this.typeaheadTime=o;let r=this.getEnabledOptions().find(a=>ft(a.textContent.trim()).startsWith(this.typeahead));r&&this.setActiveOption(r)}break}}toggleDropdown(){if(!this.isDisabled){if(this.isOpen){this.closeDropdown();return}this.openDropdown()}}async openDropdown(){if(this.isDestroyed||this.isDisabled)return;if(this.isOpen){this.getFocusOwner().focus();return}let t=++this.openId,e=++this.activeSearchId;this.typeahead="",this.hasOptionsError=!1;let n=`${this.selectButton.offsetWidth}px`;this.dropdown.style.display="block",this.dropdown.style.opacity="0";let s=this.selectButton.closest(".fi-fixed-positioning-context")!==null&&this.selectButton.closest(".fi-absolute-positioning-context")===null;if(this.dropdown.style.position=s?"fixed":"absolute",this.dropdown.style.width=n,this.selectButton.setAttribute("aria-expanded","true"),this.searchInput?.setAttribute("aria-expanded","true"),this.isOpen=!0,this.isTabbing=!1,this.getFocusOwner().focus(),this.positionDropdown(),this.resizeListener||(this.resizeListener=()=>{this.dropdown.style.width=`${this.selectButton.offsetWidth}px`,this.positionDropdown()},window.addEventListener("resize",this.resizeListener)),this.scrollListener||(this.scrollListener=()=>this.positionDropdown(),window.addEventListener("scroll",this.scrollListener,!0)),this.dropdown.style.opacity="1",this.isSearchable&&this.searchInput&&(this.searchInput.value="",this.searchQuery=""),this.hasDynamicOptions||(this.options=JSON.parse(JSON.stringify(this.originalOptions)),this.renderOptions()),this.hasDynamicOptions&&this.getOptionsUsing){this.isLoadingOptions=!0,this.showLoadingState(!1);try{let o=await this.getOptionsUsing();if(this.isDestroyed||!this.isOpen||t!==this.openId)return;this.isLoadingOptions=!1;let r=Array.isArray(o)?o:o&&Array.isArray(o.options)?o.options:[];this.originalOptions=JSON.parse(JSON.stringify(r)),(!this.searchQuery||!this.hasDynamicSearchResults)&&(this.populateLabelRepositoryFromOptions(r),this.searchQuery?this.filterOptions(this.searchQuery):(this.options=r,this.renderOptions(),this.positionDropdown()))}catch(o){if(this.isDestroyed||!this.isOpen||t!==this.openId||(this.isLoadingOptions=!1,this.searchQuery&&this.hasDynamicSearchResults&&e!==this.activeSearchId))return;console.error("Error fetching options:",o),this.showErrorMessage()}}else(!this.hasInitialNoOptionsMessage||this.searchQuery)&&this.hideLoadingState()}positionDropdown(){if(this.isDestroyed||!this.isOpen)return;let t=this.openId,e=this.position==="top"?"top-start":"bottom-start",n=[Di(4),xi({padding:5})];this.position!=="top"&&this.position!=="bottom"&&n.push(Ai());let s=this.selectButton.closest(".fi-fixed-positioning-context")!==null&&this.selectButton.closest(".fi-absolute-positioning-context")===null;Ci(this.selectButton,this.dropdown,{placement:e,middleware:n,strategy:s?"fixed":"absolute"}).then(({x:o,y:r})=>{this.isDestroyed||!this.isOpen||t!==this.openId||Object.assign(this.dropdown.style,{left:`${o}px`,top:`${r}px`})})}deferPositionDropdown(){this.isOpen&&(this.positioningRequestAnimationFrame&&(cancelAnimationFrame(this.positioningRequestAnimationFrame),this.positioningRequestAnimationFrame=null),this.positioningRequestAnimationFrame=requestAnimationFrame(()=>{this.positionDropdown(),this.positioningRequestAnimationFrame=null}))}closeDropdown(){this.dropdown.style.display="none",this.selectButton.setAttribute("aria-expanded","false"),this.searchInput?.setAttribute("aria-expanded","false"),this.isOpen=!1,this.openId++,this.searchTimeout&&(clearTimeout(this.searchTimeout),this.searchTimeout=null),this.activeSearchId++,this.isSearching=!1,this.isLoadingOptions=!1,this.hideLoadingState(),this.hideMaxItemsMessage(),this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null),this.scrollListener&&(window.removeEventListener("scroll",this.scrollListener,!0),this.scrollListener=null),this.setActiveOption(null)}focusNextOption(){let t=this.getEnabledOptions();if(t.length===0)return;let e=t.findIndex(n=>n.dataset.value===this.activeValue);this.setActiveOption(t[Math.min(e+1,t.length-1)])}focusPreviousOption(){let t=this.getEnabledOptions();if(t.length===0)return;let e=t.findIndex(n=>n.dataset.value===this.activeValue);this.setActiveOption(t[e<0?t.length-1:Math.max(e-1,0)])}scrollOptionIntoView(t){if(!t)return;let e=this.dropdown.getBoundingClientRect(),n=t.getBoundingClientRect();n.bottom>e.bottom?this.dropdown.scrollTop+=n.bottom-e.bottom:n.top<e.top&&(this.dropdown.scrollTop-=e.top-n.top)}getVisibleOptions(){return Array.from(this.optionsList.querySelectorAll('[role="option"]'))}getEnabledOptions(){return this.isSearching||this.optionsList.hidden||!this.optionsList.isConnected?[]:this.getVisibleOptions().filter(t=>t.getAttribute("aria-disabled")!=="true")}getFocusOwner(){return this.searchInput??this.selectButton}setActiveOption(t){this.activeValue=t?.dataset.value??null,this.getVisibleOptions().forEach(e=>e.classList.toggle("fi-selected",e===t)),this.syncActiveDescendant(),t&&this.isOpen&&this.scrollOptionIntoView(t)}syncActiveDescendant(){this.selectButton.removeAttribute("aria-activedescendant"),this.searchInput?.removeAttribute("aria-activedescendant");let t=this.getFocusOwner();if(!this.isOpen||document.activeElement!==t)return;let e=this.getEnabledOptions().find(n=>n.dataset.value===this.activeValue);e&&t.setAttribute("aria-activedescendant",e.id)}setAccessibilityAttributes(t){this.accessibilityAttributes=t;for(let s of["aria-label","aria-labelledby","aria-describedby","aria-invalid","aria-busy","aria-required"]){let o=t[s];for(let r of[this.selectButton,this.searchInput].filter(Boolean))F(o)?r.setAttribute(s,o):r.removeAttribute(s)}!this.selectButton.hasAttribute("aria-label")&&!this.selectButton.hasAttribute("aria-labelledby")&&F(this.ariaLabel)&&this.selectButton.setAttribute("aria-label",this.ariaLabel);let e=(this.selectButton.getAttribute("aria-labelledby")??"").split(/\s+/).map(s=>document.getElementById(s)?.textContent??"").join(" ").trim()||this.selectButton.getAttribute("aria-label")||Array.from(this.selectButton.labels??[],s=>s.textContent).join(" ").trim();this.optionsList.setAttribute("aria-label",e),this.isSearchable&&(this.searchInput.removeAttribute("aria-labelledby"),this.searchInput.setAttribute("aria-label",`${e}: ${this.searchLabel}`),this.selectButton.removeAttribute("aria-required"));let n=[t["aria-describedby"],this.selectionSummary.id].filter(Boolean).join(" ").split(/\s+/);this.selectButton.setAttribute("aria-describedby",[...new Set(n)].join(" "))}getSelectedOptionLabels(){if(!Array.isArray(this.state)||this.state.length===0)return{};let t={};for(let e of this.state){let n=!1;for(let s of this.options)if(s.options&&Array.isArray(s.options)){for(let o of s.options)if(o.value===e){t[e]=o.label,n=!0;break}if(n)break}else if(s.value===e){t[e]=s.label;break}}return t}handleSearch(t){if(this.isDestroyed||!this.isOpen)return;let e=t.target.value.trim();this.searchQuery=e,this.hasOptionsError=!1;let n=++this.activeSearchId;if(this.setActiveOption(null),this.searchTimeout&&clearTimeout(this.searchTimeout),e===""){if(this.isSearching=!1,this.isLoadingOptions){this.showLoadingState();return}this.hideLoadingState(),this.options=JSON.parse(JSON.stringify(this.originalOptions)),this.renderOptions(),this.positionDropdown();return}if(!this.getSearchResultsUsing||typeof this.getSearchResultsUsing!="function"||!this.hasDynamicSearchResults){this.isSearching=!1,this.filterOptions(e);return}this.isSearching=!0,this.showLoadingState(!0),this.searchTimeout=setTimeout(async()=>{this.searchTimeout=null;try{let s=await this.getSearchResultsUsing(e);if(this.isDestroyed||n!==this.activeSearchId||!this.isOpen)return;let o=Array.isArray(s)?s:s&&Array.isArray(s.options)?s.options:[];this.options=o,this.populateLabelRepositoryFromOptions(o),this.isSearching=!1,this.hideLoadingState(),this.renderOptions(),this.isOpen&&this.deferPositionDropdown(),this.options.length===0&&this.showNoResultsMessage()}catch(s){!this.isDestroyed&&this.isOpen&&n===this.activeSearchId&&(console.error("Error fetching search results:",s),this.showErrorMessage())}finally{n===this.activeSearchId&&(this.isSearching=!1)}},this.searchDebounce)}showLoadingState(t=!1){this.setActiveOption(null),this.optionsList.hidden=!0,this.hideLoadingState(),this.optionsList.setAttribute("aria-busy","true");let e=document.createElement("div");e.className="fi-select-input-message",e.textContent=t?this.searchingMessage:this.loadingMessage,this.dropdown.appendChild(e),this.isOpen&&(this.deferPositionDropdown(),this.statusRegion.textContent=e.textContent),this.positionDropdown()}hideLoadingState(){this.optionsList.removeAttribute("aria-busy");let t=this.dropdown.querySelector(".fi-select-input-message");t&&(t.remove(),this.statusRegion.textContent="")}showNoOptionsMessage(){this.setActiveOption(null),this.optionsList.hidden=!0,this.hideLoadingState();let t=document.createElement("div");t.className="fi-select-input-message",t.textContent=this.noOptionsMessage,this.dropdown.appendChild(t),this.isOpen&&(this.deferPositionDropdown(),this.statusRegion.textContent=this.noOptionsMessage)}showNoResultsMessage(){this.setActiveOption(null),this.optionsList.hidden=!0,this.hideLoadingState();let t=document.createElement("div");t.className="fi-select-input-message",t.textContent=this.noSearchResultsMessage,this.dropdown.appendChild(t),this.isOpen&&(this.deferPositionDropdown(),this.statusRegion.textContent=this.noSearchResultsMessage)}showErrorMessage(){this.hasOptionsError=!0,this.showLoadingState(),this.optionsList.removeAttribute("aria-busy"),this.dropdown.querySelector(".fi-select-input-message").textContent=this.errorMessage,this.statusRegion.textContent=this.errorMessage,this.positionDropdown()}showMaxItemsMessage(){this.hideMaxItemsMessage(),this.maxItemsMessageElement=document.createElement("div"),this.maxItemsMessageElement.className="fi-select-input-max-items-message",this.maxItemsMessageElement.textContent=this.maxItemsMessage,this.optionsList.parentNode===this.dropdown?this.dropdown.insertBefore(this.maxItemsMessageElement,this.optionsList):this.dropdown.appendChild(this.maxItemsMessageElement),this.deferPositionDropdown(),this.statusRegion.textContent=this.maxItemsMessage}hideMaxItemsMessage(){this.maxItemsMessageElement&&(this.maxItemsMessageElement.remove(),this.maxItemsMessageElement=null,this.statusRegion.textContent===this.maxItemsMessage&&(this.statusRegion.textContent=""))}filterOptions(t){let e=this.searchableOptionFields.includes("label"),n=this.searchableOptionFields.includes("value");t=ft(t);let s=[];for(let o of this.originalOptions)if(o.options&&Array.isArray(o.options)){let r=o.options.filter(a=>e&&ft(a.label).includes(t)||n&&ft(String(a.value)).includes(t));r.length>0&&s.push({label:o.label,options:r})}else(e&&ft(o.label).includes(t)||n&&ft(String(o.value)).includes(t))&&s.push(o);this.options=s,this.renderOptions(),this.isOpen&&this.positionDropdown()}selectOption(t){if(this.isDisabled)return;if(!this.isMultiple){let n=this.container.contains(document.activeElement);this.state=t,this.updateSelectedDisplay(),this.renderOptions(),this.closeDropdown(),n&&this.selectButton.focus(),this.onStateChange(this.state);return}let e=Array.isArray(this.state)?[...this.state]:[];if(e.includes(t)){this.state=e.filter(n=>n!==t),this.updateSelectedDisplay(),this.hideMaxItemsMessage(),this.renderOptions(),this.isOpen&&this.deferPositionDropdown(),this.maintainFocusInMultipleMode(),this.updateSelectionSummary(),this.onStateChange(this.state);return}if(this.maxItems&&e.length>=this.maxItems){this.maxItemsMessage&&this.showMaxItemsMessage();return}this.hideMaxItemsMessage(),e.push(t),this.state=e,this.updateSelectedDisplay(),this.renderOptions(),this.isOpen&&this.deferPositionDropdown(),this.maintainFocusInMultipleMode(),this.onStateChange(this.state)}maintainFocusInMultipleMode(){this.isOpen&&this.container.contains(document.activeElement)&&this.getFocusOwner().focus()}disable(){this.isDisabled||(this.isDisabled=!0,this.applyDisabledState(),this.isOpen&&this.closeDropdown())}enable(){this.isDisabled&&(this.isDisabled=!1,this.applyDisabledState())}applyDisabledState(){if(this.badgesSortable?.option("disabled",this.isDisabled),this.isDisabled){if(this.selectButton.setAttribute("disabled","disabled"),this.selectButton.setAttribute("aria-disabled","true"),this.selectButton.classList.add("fi-disabled"),this.isMultiple&&this.container.querySelectorAll(".fi-badge-delete-btn").forEach(e=>{e.setAttribute("disabled","disabled"),e.classList.add("fi-disabled")}),!this.isMultiple&&this.canSelectPlaceholder){let t=this.container.querySelector(".fi-select-input-value-remove-btn");t&&(t.setAttribute("disabled","disabled"),t.classList.add("fi-disabled"))}this.isSearchable&&this.searchInput&&(this.searchInput.setAttribute("disabled","disabled"),this.searchInput.classList.add("fi-disabled"))}else{if(this.selectButton.removeAttribute("disabled"),this.selectButton.removeAttribute("aria-disabled"),this.selectButton.classList.remove("fi-disabled"),this.isMultiple&&this.container.querySelectorAll(".fi-badge-delete-btn").forEach(e=>{e.removeAttribute("disabled"),e.classList.remove("fi-disabled")}),!this.isMultiple&&this.canSelectPlaceholder){let t=this.container.querySelector(".fi-select-input-value-remove-btn");t&&(t.removeAttribute("disabled"),t.classList.remove("fi-disabled"))}this.isSearchable&&this.searchInput&&(this.searchInput.removeAttribute("disabled"),this.searchInput.classList.remove("fi-disabled"))}}destroy(){this.isDestroyed=!0,this.openId++,this.activeSearchId++,this.selectedDisplayVersion++,this.destroyBadgesSortable(),this.selectButton&&this.buttonClickListener&&this.selectButton.removeEventListener("click",this.buttonClickListener),this.documentClickListener&&document.removeEventListener("click",this.documentClickListener),this.selectButton&&this.buttonKeydownListener&&this.selectButton.removeEventListener("keydown",this.buttonKeydownListener),this.dropdown&&this.dropdownKeydownListener&&this.dropdown.removeEventListener("keydown",this.dropdownKeydownListener),this.dropdownEscapeListener&&this.element.removeEventListener("dropdown-escape",this.dropdownEscapeListener),this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null),this.scrollListener&&(window.removeEventListener("scroll",this.scrollListener,!0),this.scrollListener=null),this.refreshOptionLabelListener&&window.removeEventListener("filament-forms::select.refreshSelectedOptionLabel",this.refreshOptionLabelListener),this.isOpen&&this.closeDropdown(),this.searchTimeout&&(clearTimeout(this.searchTimeout),this.searchTimeout=null),this.container&&this.container.remove()}};function es({canOptionLabelsWrap:i,canSelectPlaceholder:t,clearButtonLabel:e,errorMessage:n,hasDynamicOptions:s,hasDynamicSearchResults:o,hasInitialNoOptionsMessage:r,id:a,initialOptionLabel:l,initialOptionLabels:c,initialState:h,isAutofocused:u,isDisabled:f,isHtmlAllowed:p,isMultiple:m,isReorderable:g,isSearchable:O,livewireId:x,loadingMessage:w,maxItems:A,maxItemsMessage:D,noOptionsMessage:M,noSearchResultsMessage:C,options:J,optionsLimit:Q,placeholder:I,position:V,removeButtonLabel:Y,searchDebounce:it,searchingMessage:W,searchLabel:B,searchPrompt:Z,searchableOptionFields:k,state:$,statePath:_}){return{select:null,accessibilityObserver:null,state:$,init(){this.select=new Ae({canOptionLabelsWrap:i,canSelectPlaceholder:t,clearButtonLabel:e,element:this.$refs.select,errorMessage:n,getOptionLabelUsing:()=>this.$callSchemaComponentMethod("getOptionLabel",{},{async:!0}),getOptionLabelsUsing:()=>this.$callSchemaComponentMethod("getOptionLabelsForJs",{},{async:!0}),getOptionsUsing:()=>this.$callSchemaComponentMethod("getOptionsForJs",{},{async:!0}),getSearchResultsUsing:j=>this.$callSchemaComponentMethod("getSearchResultsForJs",{search:j},{async:!0}),hasDynamicOptions:s,hasDynamicSearchResults:o,hasInitialNoOptionsMessage:r,id:a,initialOptionLabel:l,initialOptionLabels:c,initialState:h,isAutofocused:u,isDisabled:f,isHtmlAllowed:p,isMultiple:m,isReorderable:g,isSearchable:O,livewireId:x,loadingMessage:w,maxItems:A,maxItemsMessage:D,noOptionsMessage:M,noSearchResultsMessage:C,onStateChange:j=>{this.state=j},options:J,optionsLimit:Q,placeholder:I,position:V,removeButtonLabel:Y,searchableOptionFields:k,searchDebounce:it,searchingMessage:W,searchLabel:B,searchPrompt:Z,state:this.state,statePath:_});let z=this.$el.previousElementSibling;if(z?.hasAttribute("data-select-accessibility")){let j=()=>this.select?.setAccessibilityAttributes(JSON.parse(z.dataset.selectAccessibility));j(),this.accessibilityObserver=new MutationObserver(j),this.accessibilityObserver.observe(z,{attributes:!0,attributeFilter:["data-select-accessibility"]})}this.$watch("state",j=>{this.$nextTick(()=>{this.select&&this.select.state!==j&&(this.select.state=j,this.select.updateSelectedDisplay(),this.select.renderOptions())})})},destroy(){this.accessibilityObserver?.disconnect(),this.select&&(this.select.destroy(),this.select=null)}}}export{es as default};
2
+ /*! Bundled license information:
3
+
4
+ sortablejs/modular/sortable.esm.js:
5
+ (**!
6
+ * Sortable 1.15.7
7
+ * @author RubaXa <trash@rubaxa.org>
8
+ * @author owenm <owen23355@gmail.com>
9
+ * @license MIT
10
+ *)
11
+ */
@@ -0,0 +1 @@
1
+ var K;(function(r){r.Range="range",r.Steps="steps",r.Positions="positions",r.Count="count",r.Values="values"})(K||(K={}));var H;(function(r){r[r.None=-1]="None",r[r.NoValue=0]="NoValue",r[r.LargeValue=1]="LargeValue",r[r.SmallValue=2]="SmallValue"})(H||(H={}));function Ce(r){return rt(r)&&typeof r.from=="function"}function rt(r){return typeof r=="object"&&typeof r.to=="function"}function zt(r){r.parentElement.removeChild(r)}function bt(r){return r!=null}function jt(r){r.preventDefault()}function Ae(r){return r.filter(function(t){return this[t]?!1:this[t]=!0},{})}function ye(r,t){return Math.round(r/t)*t}function Pe(r,t){var s=r.getBoundingClientRect(),u=r.ownerDocument,f=u.documentElement,v=qt(u);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(v.x=0),t?s.top+v.y-f.clientTop:s.left+v.x-f.clientLeft}function j(r){return typeof r=="number"&&!isNaN(r)&&isFinite(r)}function Rt(r,t,s){s>0&&(L(r,t),setTimeout(function(){et(r,t)},s))}function Nt(r){return Math.max(Math.min(r,100),0)}function it(r){return Array.isArray(r)?r:[r]}function Ve(r){r=String(r);var t=r.split(".");return t.length>1?t[1].length:0}function L(r,t){r.classList&&!/\s/.test(t)?r.classList.add(t):r.className+=" "+t}function et(r,t){r.classList&&!/\s/.test(t)?r.classList.remove(t):r.className=r.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function De(r,t){return r.classList?r.classList.contains(t):new RegExp("\\b"+t+"\\b").test(r.className)}function qt(r){var t=window.pageXOffset!==void 0,s=(r.compatMode||"")==="CSS1Compat",u=t?window.pageXOffset:s?r.documentElement.scrollLeft:r.body.scrollLeft,f=t?window.pageYOffset:s?r.documentElement.scrollTop:r.body.scrollTop;return{x:u,y:f}}function ke(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function Ue(){var r=!1;try{var t=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("test",null,t)}catch{}return r}function Me(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function wt(r,t){return 100/(t-r)}function xt(r,t,s){return t*100/(r[s+1]-r[s])}function Oe(r,t){return xt(r,r[0]<0?t+Math.abs(r[0]):t-r[0],0)}function _e(r,t){return t*(r[1]-r[0])/100+r[0]}function J(r,t){for(var s=1;r>=t[s];)s+=1;return s}function Le(r,t,s){if(s>=r.slice(-1)[0])return 100;var u=J(s,r),f=r[u-1],v=r[u],d=t[u-1],w=t[u];return d+Oe([f,v],s)/wt(d,w)}function He(r,t,s){if(s>=100)return r.slice(-1)[0];var u=J(s,t),f=r[u-1],v=r[u],d=t[u-1],w=t[u];return _e([f,v],(s-d)*wt(d,w))}function Fe(r,t,s,u){if(u===100)return u;var f=J(u,r),v=r[f-1],d=r[f];return s?u-v>(d-v)/2?d:v:t[f-1]?r[f-1]+ye(u-r[f-1],t[f-1]):u}var Kt=(function(){function r(t,s,u){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[u||!1],this.xNumSteps=[!1],this.snap=s;var f,v=[];for(Object.keys(t).forEach(function(d){v.push([it(t[d]),d])}),v.sort(function(d,w){return d[0][0]-w[0][0]}),f=0;f<v.length;f++)this.handleEntryPoint(v[f][1],v[f][0]);for(this.xNumSteps=this.xSteps.slice(0),f=0;f<this.xNumSteps.length;f++)this.handleStepPoint(f,this.xNumSteps[f])}return r.prototype.getDistance=function(t){for(var s=[],u=0;u<this.xNumSteps.length-1;u++)s[u]=xt(this.xVal,t,u);return s},r.prototype.getAbsoluteDistance=function(t,s,u){var f=0;if(t<this.xPct[this.xPct.length-1])for(;t>this.xPct[f+1];)f++;else t===this.xPct[this.xPct.length-1]&&(f=this.xPct.length-2);!u&&t===this.xPct[f+1]&&f++,s===null&&(s=[]);var v,d=1,w=s[f],E=0,p=0,V=0,D=0;for(u?v=(t-this.xPct[f])/(this.xPct[f+1]-this.xPct[f]):v=(this.xPct[f+1]-t)/(this.xPct[f+1]-this.xPct[f]);w>0;)E=this.xPct[f+1+D]-this.xPct[f+D],s[f+D]*d+100-v*100>100?(p=E*v,d=(w-100*v)/s[f+D],v=1):(p=s[f+D]*E/100*d,d=0),u?(V=V-p,this.xPct.length+D>=1&&D--):(V=V+p,this.xPct.length-D>=1&&D++),w=s[f+D]*d;return t+V},r.prototype.toStepping=function(t){return t=Le(this.xVal,this.xPct,t),t},r.prototype.fromStepping=function(t){return He(this.xVal,this.xPct,t)},r.prototype.getStep=function(t){return t=Fe(this.xPct,this.xSteps,this.snap,t),t},r.prototype.getDefaultStep=function(t,s,u){var f=J(t,this.xPct);return(t===100||s&&t===this.xPct[f-1])&&(f=Math.max(f-1,1)),(this.xVal[f]-this.xVal[f-1])/u},r.prototype.getNearbySteps=function(t){var s=J(t,this.xPct);return{stepBefore:{startValue:this.xVal[s-2],step:this.xNumSteps[s-2],highestStep:this.xHighestCompleteStep[s-2]},thisStep:{startValue:this.xVal[s-1],step:this.xNumSteps[s-1],highestStep:this.xHighestCompleteStep[s-1]},stepAfter:{startValue:this.xVal[s],step:this.xNumSteps[s],highestStep:this.xHighestCompleteStep[s]}}},r.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(Ve);return Math.max.apply(null,t)},r.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},r.prototype.convert=function(t){return this.getStep(this.toStepping(t))},r.prototype.handleEntryPoint=function(t,s){var u;if(t==="min"?u=0:t==="max"?u=100:u=parseFloat(t),!j(u)||!j(s[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(u),this.xVal.push(s[0]);var f=Number(s[1]);u?this.xSteps.push(isNaN(f)?!1:f):isNaN(f)||(this.xSteps[0]=f),this.xHighestCompleteStep.push(0)},r.prototype.handleStepPoint=function(t,s){if(s){if(this.xVal[t]===this.xVal[t+1]){this.xSteps[t]=this.xHighestCompleteStep[t]=this.xVal[t];return}this.xSteps[t]=xt([this.xVal[t],this.xVal[t+1]],s,0)/wt(this.xPct[t],this.xPct[t+1]);var u=(this.xVal[t+1]-this.xVal[t])/this.xNumSteps[t],f=Math.ceil(Number(u.toFixed(3))-1),v=this.xVal[t]+this.xNumSteps[t]*f;this.xHighestCompleteStep[t]=v}},r})(),Bt={to:function(r){return r===void 0?"":r.toFixed(2)},from:Number},$t={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},q={tooltips:".__tooltips",aria:".__aria"};function ze(r,t){if(!j(t))throw new Error("noUiSlider: 'step' is not numeric.");r.singleStep=t}function je(r,t){if(!j(t))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");r.keyboardPageMultiplier=t}function Re(r,t){if(!j(t))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");r.keyboardMultiplier=t}function Ne(r,t){if(!j(t))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");r.keyboardDefaultStep=t}function Be(r,t){if(typeof t!="object"||Array.isArray(t))throw new Error("noUiSlider: 'range' is not an object.");if(t.min===void 0||t.max===void 0)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");r.spectrum=new Kt(t,r.snap||!1,r.singleStep)}function qe(r,t){if(t=it(t),!Array.isArray(t)||!t.length)throw new Error("noUiSlider: 'start' option is incorrect.");r.handles=t.length,r.start=t}function Ke(r,t){if(typeof t!="boolean")throw new Error("noUiSlider: 'snap' option must be a boolean.");r.snap=t}function $e(r,t){if(typeof t!="boolean")throw new Error("noUiSlider: 'animate' option must be a boolean.");r.animate=t}function Ie(r,t){if(typeof t!="number")throw new Error("noUiSlider: 'animationDuration' option must be a number.");r.animationDuration=t}function It(r,t){var s=[!1],u;if(t==="lower"?t=[!0,!1]:t==="upper"&&(t=[!1,!0]),t===!0||t===!1){for(u=1;u<r.handles;u++)s.push(t);s.push(!1)}else{if(!Array.isArray(t)||!t.length||t.length!==r.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");s=t}r.connect=s}function Te(r,t){switch(t){case"horizontal":r.ort=0;break;case"vertical":r.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function Tt(r,t){if(!j(t))throw new Error("noUiSlider: 'margin' option must be numeric.");t!==0&&(r.margin=r.spectrum.getDistance(t))}function Xe(r,t){if(!j(t))throw new Error("noUiSlider: 'limit' option must be numeric.");if(r.limit=r.spectrum.getDistance(t),!r.limit||r.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function Ye(r,t){var s;if(!j(t)&&!Array.isArray(t))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(t)&&!(t.length===2||j(t[0])||j(t[1])))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(t!==0){for(Array.isArray(t)||(t=[t,t]),r.padding=[r.spectrum.getDistance(t[0]),r.spectrum.getDistance(t[1])],s=0;s<r.spectrum.xNumSteps.length-1;s++)if(r.padding[0][s]<0||r.padding[1][s]<0)throw new Error("noUiSlider: 'padding' option must be a positive number(s).");var u=t[0]+t[1],f=r.spectrum.xVal[0],v=r.spectrum.xVal[r.spectrum.xVal.length-1];if(u/(v-f)>1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function We(r,t){switch(t){case"ltr":r.dir=0;break;case"rtl":r.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function Ge(r,t){if(typeof t!="string")throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var s=t.indexOf("tap")>=0,u=t.indexOf("drag")>=0,f=t.indexOf("fixed")>=0,v=t.indexOf("snap")>=0,d=t.indexOf("hover")>=0,w=t.indexOf("unconstrained")>=0,E=t.indexOf("invert-connects")>=0,p=t.indexOf("drag-all")>=0,V=t.indexOf("smooth-steps")>=0;if(f){if(r.handles!==2)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");Tt(r,r.start[1]-r.start[0])}if(E&&r.handles!==2)throw new Error("noUiSlider: 'invert-connects' behaviour must be used with 2 handles");if(w&&(r.margin||r.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");r.events={tap:s||v,drag:u,dragAll:p,smoothSteps:V,fixed:f,snap:v,hover:d,unconstrained:w,invertConnects:E}}function Je(r,t){if(t!==!1)if(t===!0||rt(t)){r.tooltips=[];for(var s=0;s<r.handles;s++)r.tooltips.push(t)}else{if(t=it(t),t.length!==r.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");t.forEach(function(u){if(typeof u!="boolean"&&!rt(u))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")}),r.tooltips=t}}function Ze(r,t){if(t.length!==r.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");r.handleAttributes=t}function Qe(r,t){if(!rt(t))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");r.ariaFormat=t}function tr(r,t){if(!Ce(t))throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");r.format=t}function er(r,t){if(typeof t!="boolean")throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");r.keyboardSupport=t}function rr(r,t){r.documentElement=t}function ir(r,t){if(typeof t!="string"&&t!==!1)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");r.cssPrefix=t}function ar(r,t){if(typeof t!="object")throw new Error("noUiSlider: 'cssClasses' must be an object.");typeof r.cssPrefix=="string"?(r.cssClasses={},Object.keys(t).forEach(function(s){r.cssClasses[s]=r.cssPrefix+t[s]})):r.cssClasses=t}function Xt(r){var t={margin:null,limit:null,padding:null,animate:!0,animationDuration:300,ariaFormat:Bt,format:Bt},s={step:{r:!1,t:ze},keyboardPageMultiplier:{r:!1,t:je},keyboardMultiplier:{r:!1,t:Re},keyboardDefaultStep:{r:!1,t:Ne},start:{r:!0,t:qe},connect:{r:!0,t:It},direction:{r:!0,t:We},snap:{r:!1,t:Ke},animate:{r:!1,t:$e},animationDuration:{r:!1,t:Ie},range:{r:!0,t:Be},orientation:{r:!1,t:Te},margin:{r:!1,t:Tt},limit:{r:!1,t:Xe},padding:{r:!1,t:Ye},behaviour:{r:!0,t:Ge},ariaFormat:{r:!1,t:Qe},format:{r:!1,t:tr},tooltips:{r:!1,t:Je},keyboardSupport:{r:!0,t:er},documentElement:{r:!1,t:rr},cssPrefix:{r:!0,t:ir},cssClasses:{r:!0,t:ar},handleAttributes:{r:!1,t:Ze}},u={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:$t,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};r.format&&!r.ariaFormat&&(r.ariaFormat=r.format),Object.keys(s).forEach(function(E){if(!bt(r[E])&&u[E]===void 0){if(s[E].r)throw new Error("noUiSlider: '"+E+"' is required.");return}s[E].t(t,bt(r[E])?r[E]:u[E])}),t.pips=r.pips;var f=document.createElement("div"),v=f.style.msTransform!==void 0,d=f.style.transform!==void 0;t.transformRule=d?"transform":v?"msTransform":"webkitTransform";var w=[["left","top"],["right","bottom"]];return t.style=w[t.dir][t.ort],t}function sr(r,t,s){var u=ke(),f=Me(),v=f&&Ue(),d=r,w,E,p,V,D,R,m=t.spectrum,F=[],x=[],O=[],Y=0,z={},$=!1,B=r.ownerDocument,X=t.documentElement||B.documentElement,U=B.body,at=B.dir==="rtl"||t.ort===1?0:100;function N(e,i){var a=B.createElement("div");return i&&L(a,i),e.appendChild(a),a}function Jt(e,i){var a=N(e,t.cssClasses.origin),n=N(a,t.cssClasses.handle);if(N(n,t.cssClasses.touchArea),n.setAttribute("data-handle",String(i)),t.keyboardSupport&&(n.setAttribute("tabindex","0"),n.addEventListener("keydown",function(l){return de(l,i)})),t.handleAttributes!==void 0){var o=t.handleAttributes[i];Object.keys(o).forEach(function(l){n.setAttribute(l,o[l])})}return n.setAttribute("role","slider"),n.setAttribute("aria-orientation",t.ort?"vertical":"horizontal"),i===0?L(n,t.cssClasses.handleLower):i===t.handles-1&&L(n,t.cssClasses.handleUpper),a.handle=n,a}function st(e,i){return i?N(e,t.cssClasses.connect):!1}function Zt(e,i){E=N(i,t.cssClasses.connects),p=[],V=[],V.push(st(E,e[0]));for(var a=0;a<t.handles;a++)p.push(Jt(i,a)),O[a]=a,V.push(st(E,e[a+1]))}function Qt(e){L(e,t.cssClasses.target),t.dir===0?L(e,t.cssClasses.ltr):L(e,t.cssClasses.rtl),t.ort===0?L(e,t.cssClasses.horizontal):L(e,t.cssClasses.vertical);var i=getComputedStyle(e).direction;return i==="rtl"?L(e,t.cssClasses.textDirectionRtl):L(e,t.cssClasses.textDirectionLtr),N(e,t.cssClasses.base)}function te(e,i){return!t.tooltips||!t.tooltips[i]?!1:N(e.firstChild,t.cssClasses.tooltip)}function Et(){return d.hasAttribute("disabled")}function nt(e){var i=p[e];return i.hasAttribute("disabled")}function ee(e){e!=null?(p[e].setAttribute("disabled",""),p[e].handle.removeAttribute("tabindex")):(d.setAttribute("disabled",""),p.forEach(function(i){i.handle.removeAttribute("tabindex")}))}function re(e){e!=null?(p[e].removeAttribute("disabled"),p[e].handle.setAttribute("tabindex","0")):(d.removeAttribute("disabled"),p.forEach(function(i){i.removeAttribute("disabled"),i.handle.setAttribute("tabindex","0")}))}function ot(){R&&(W("update"+q.tooltips),R.forEach(function(e){e&&zt(e)}),R=null)}function Ct(){ot(),R=p.map(te),ht("update"+q.tooltips,function(e,i,a){if(!(!R||!t.tooltips)&&R[i]!==!1){var n=e[i];t.tooltips[i]!==!0&&(n=t.tooltips[i].to(a[i])),R[i].innerHTML=n}})}function ie(){W("update"+q.aria),ht("update"+q.aria,function(e,i,a,n,o){O.forEach(function(l){var h=p[l],c=Z(x,l,0,!0,!0,!0),S=Z(x,l,100,!0,!0,!0),b=o[l],C=String(t.ariaFormat.to(a[l]));c=m.fromStepping(c).toFixed(1),S=m.fromStepping(S).toFixed(1),b=m.fromStepping(b).toFixed(1),h.children[0].setAttribute("aria-valuemin",c),h.children[0].setAttribute("aria-valuemax",S),h.children[0].setAttribute("aria-valuenow",b),h.children[0].setAttribute("aria-valuetext",C)})})}function ae(e){if(e.mode===K.Range||e.mode===K.Steps)return m.xVal;if(e.mode===K.Count){if(e.values<2)throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");for(var i=e.values-1,a=100/i,n=[];i--;)n[i]=i*a;return n.push(100),At(n,e.stepped)}return e.mode===K.Positions?At(e.values,e.stepped):e.mode===K.Values?e.stepped?e.values.map(function(o){return m.fromStepping(m.getStep(m.toStepping(o)))}):e.values:[]}function At(e,i){return e.map(function(a){return m.fromStepping(i?m.getStep(a):a)})}function se(e){function i(b,C){return Number((b+C).toFixed(7))}var a=ae(e),n={},o=m.xVal[0],l=m.xVal[m.xVal.length-1],h=!1,c=!1,S=0;return a=Ae(a.slice().sort(function(b,C){return b-C})),a[0]!==o&&(a.unshift(o),h=!0),a[a.length-1]!==l&&(a.push(l),c=!0),a.forEach(function(b,C){var A,g,P,_=b,k=a[C+1],M,pt,mt,gt,Lt,St,Ht,Ft=e.mode===K.Steps;for(Ft&&(A=m.xNumSteps[C]),A||(A=k-_),k===void 0&&(k=_),A=Math.max(A,1e-7),g=_;g<=k;g=i(g,A)){for(M=m.toStepping(g),pt=M-S,Lt=pt/(e.density||1),St=Math.round(Lt),Ht=pt/St,P=1;P<=St;P+=1)mt=S+P*Ht,n[mt.toFixed(5)]=[m.fromStepping(mt),0];gt=a.indexOf(g)>-1?H.LargeValue:Ft?H.SmallValue:H.NoValue,!C&&h&&g!==k&&(gt=0),g===k&&c||(n[M.toFixed(5)]=[g,gt]),S=M}}),n}function ne(e,i,a){var n,o,l=B.createElement("div"),h=(n={},n[H.None]="",n[H.NoValue]=t.cssClasses.valueNormal,n[H.LargeValue]=t.cssClasses.valueLarge,n[H.SmallValue]=t.cssClasses.valueSub,n),c=(o={},o[H.None]="",o[H.NoValue]=t.cssClasses.markerNormal,o[H.LargeValue]=t.cssClasses.markerLarge,o[H.SmallValue]=t.cssClasses.markerSub,o),S=[t.cssClasses.valueHorizontal,t.cssClasses.valueVertical],b=[t.cssClasses.markerHorizontal,t.cssClasses.markerVertical];L(l,t.cssClasses.pips),L(l,t.ort===0?t.cssClasses.pipsHorizontal:t.cssClasses.pipsVertical);function C(g,P){var _=P===t.cssClasses.value,k=_?S:b,M=_?h:c;return P+" "+k[t.ort]+" "+M[g]}function A(g,P,_){if(_=i?i(P,_):_,_!==H.None){var k=N(l,!1);k.className=C(_,t.cssClasses.marker),k.style[t.style]=g+"%",_>H.NoValue&&(k=N(l,!1),k.className=C(_,t.cssClasses.value),k.setAttribute("data-value",String(P)),k.style[t.style]=g+"%",k.innerHTML=String(a.to(P)))}}return Object.keys(e).forEach(function(g){A(g,e[g][0],e[g][1])}),l}function lt(){D&&(zt(D),D=null)}function ut(e){lt();var i=se(e),a=e.filter,n=e.format||{to:function(o){return String(Math.round(o))}};return D=d.appendChild(ne(i,a,n)),D}function yt(){var e=w.getBoundingClientRect(),i="offset"+["Width","Height"][t.ort];return t.ort===0?e.width||w[i]:e.height||w[i]}function I(e,i,a,n){var o=function(h){var c=oe(h,n.pageOffset,n.target||i);if(!c||Et()&&!n.doNotReject||De(d,t.cssClasses.tap)&&!n.doNotReject||e===u.start&&c.buttons!==void 0&&c.buttons>1||n.hover&&c.buttons)return!1;v||c.preventDefault(),c.calcPoint=c.points[t.ort],a(c,n)},l=[];return e.split(" ").forEach(function(h){i.addEventListener(h,o,v?{passive:!0}:!1),l.push([h,o])}),l}function oe(e,i,a){var n=e.type.indexOf("touch")===0,o=e.type.indexOf("mouse")===0,l=e.type.indexOf("pointer")===0,h=0,c=0;if(e.type.indexOf("MSPointer")===0&&(l=!0),e.type==="mousedown"&&!e.buttons&&!e.touches)return!1;if(n){var S=function(A){var g=A.target;return g===a||a.contains(g)||e.composed&&e.composedPath().shift()===a};if(e.type==="touchstart"){var b=Array.prototype.filter.call(e.touches,S);if(b.length>1)return!1;h=b[0].pageX,c=b[0].pageY}else{var C=Array.prototype.find.call(e.changedTouches,S);if(!C)return!1;h=C.pageX,c=C.pageY}}return i=i||qt(B),(o||l)&&(h=e.clientX+i.x,c=e.clientY+i.y),e.pageOffset=i,e.points=[h,c],e.cursor=o||l,e}function Pt(e){var i=e-Pe(w,t.ort),a=i*100/yt();return a=Nt(a),t.dir?100-a:a}function le(e){var i=100,a=!1;return p.forEach(function(n,o){if(!nt(o)){var l=x[o],h=Math.abs(l-e),c=h===100&&i===100,S=h<i,b=h<=i&&e>l;(S||b||c)&&(a=o,i=h)}}),a}function ue(e,i){e.type==="mouseout"&&e.target.nodeName==="HTML"&&e.relatedTarget===null&&ft(e,i)}function fe(e,i){if(navigator.appVersion.indexOf("MSIE 9")===-1&&e.buttons===0&&i.buttonsProperty!==0)return ft(e,i);var a=(t.dir?-1:1)*(e.calcPoint-i.startCalcPoint),n=a*100/i.baseSize;Dt(a>0,n,i.locations,i.handleNumbers,i.connect)}function ft(e,i){i.handle&&(et(i.handle,t.cssClasses.active),Y-=1),i.listeners.forEach(function(a){X.removeEventListener(a[0],a[1])}),Y===0&&(et(d,t.cssClasses.drag),vt(),e.cursor&&(U.style.cursor="",U.removeEventListener("selectstart",jt))),t.events.smoothSteps&&(i.handleNumbers.forEach(function(a){T(a,x[a],!0,!0,!1,!1)}),i.handleNumbers.forEach(function(a){y("update",a)})),i.handleNumbers.forEach(function(a){y("change",a),y("set",a),y("end",a)})}function ct(e,i){if(!i.handleNumbers.some(nt)){var a;if(i.handleNumbers.length===1){var n=p[i.handleNumbers[0]];a=n.children[0],Y+=1,L(a,t.cssClasses.active)}e.stopPropagation();var o=[],l=I(u.move,X,fe,{target:e.target,handle:a,connect:i.connect,listeners:o,startCalcPoint:e.calcPoint,baseSize:yt(),pageOffset:e.pageOffset,handleNumbers:i.handleNumbers,buttonsProperty:e.buttons,locations:x.slice()}),h=I(u.end,X,ft,{target:e.target,handle:a,listeners:o,doNotReject:!0,handleNumbers:i.handleNumbers}),c=I("mouseout",X,ue,{target:e.target,handle:a,listeners:o,doNotReject:!0,handleNumbers:i.handleNumbers});o.push.apply(o,l.concat(h,c)),e.cursor&&(U.style.cursor=getComputedStyle(e.target).cursor,p.length>1&&L(d,t.cssClasses.drag),U.addEventListener("selectstart",jt,!1)),i.handleNumbers.forEach(function(S){y("start",S)})}}function ce(e){e.stopPropagation();var i=Pt(e.calcPoint),a=le(i);a!==!1&&(t.events.snap||Rt(d,t.cssClasses.tap,t.animationDuration),T(a,i,!0,!0),vt(),y("slide",a,!0),y("update",a,!0),t.events.snap?ct(e,{handleNumbers:[a]}):(y("change",a,!0),y("set",a,!0)))}function he(e){var i=Pt(e.calcPoint),a=m.getStep(i),n=m.fromStepping(a);Object.keys(z).forEach(function(o){o.split(".")[0]==="hover"&&z[o].forEach(function(l){l.call(tt,n)})})}function de(e,i){if(Et()||nt(i))return!1;var a=["Left","Right"],n=["Down","Up"],o=["PageDown","PageUp"],l=["Home","End"];t.dir&&!t.ort?a.reverse():t.ort&&!t.dir&&(n.reverse(),o.reverse());var h=e.key.replace("Arrow",""),c=h===o[0],S=h===o[1],b=h===n[0]||h===a[0]||c,C=h===n[1]||h===a[1]||S,A=h===l[0],g=h===l[1];if(!b&&!C&&!A&&!g)return!0;e.preventDefault();var P;if(C||b){var _=b?0:1,k=Ot(i),M=k[_];if(M===null)return!1;M===!1&&(M=m.getDefaultStep(x[i],b,t.keyboardDefaultStep)),S||c?M*=t.keyboardPageMultiplier:M*=t.keyboardMultiplier,M=Math.max(M,1e-7),M=(b?-1:1)*M,P=F[i]+M}else g?P=t.spectrum.xVal[t.spectrum.xVal.length-1]:P=t.spectrum.xVal[0];return T(i,m.toStepping(P),!0,!0),y("slide",i),y("update",i),y("change",i),y("set",i),!1}function Vt(e){e.fixed||p.forEach(function(i,a){I(u.start,i.children[0],ct,{handleNumbers:[a]})}),e.tap&&I(u.start,w,ce,{}),e.hover&&I(u.move,w,he,{hover:!0}),e.drag&&V.forEach(function(i,a){if(!(i===!1||a===0||a===V.length-1)){var n=p[a-1],o=p[a],l=[i],h=[n,o],c=[a-1,a];L(i,t.cssClasses.draggable),e.fixed&&(l.push(n.children[0]),l.push(o.children[0])),e.dragAll&&(h=p,c=O),l.forEach(function(S){I(u.start,S,ct,{handles:h,handleNumbers:c,connect:i})})}})}function ht(e,i){z[e]=z[e]||[],z[e].push(i),e.split(".")[0]==="update"&&p.forEach(function(a,n){y("update",n)})}function ve(e){return e===q.aria||e===q.tooltips}function W(e){var i=e&&e.split(".")[0],a=i?e.substring(i.length):e;Object.keys(z).forEach(function(n){var o=n.split(".")[0],l=n.substring(o.length);(!i||i===o)&&(!a||a===l)&&(!ve(l)||a===l)&&delete z[n]})}function y(e,i,a){Object.keys(z).forEach(function(n){var o=n.split(".")[0];e===o&&z[n].forEach(function(l){l.call(tt,F.map(t.format.to),i,F.slice(),a||!1,x.slice(),tt)})})}function Z(e,i,a,n,o,l,h){var c;return p.length>1&&!t.events.unconstrained&&(n&&i>0&&(c=m.getAbsoluteDistance(e[i-1],t.margin,!1),a=Math.max(a,c)),o&&i<p.length-1&&(c=m.getAbsoluteDistance(e[i+1],t.margin,!0),a=Math.min(a,c))),p.length>1&&t.limit&&(n&&i>0&&(c=m.getAbsoluteDistance(e[i-1],t.limit,!1),a=Math.min(a,c)),o&&i<p.length-1&&(c=m.getAbsoluteDistance(e[i+1],t.limit,!0),a=Math.max(a,c))),t.padding&&(i===0&&(c=m.getAbsoluteDistance(0,t.padding[0],!1),a=Math.max(a,c)),i===p.length-1&&(c=m.getAbsoluteDistance(100,t.padding[1],!0),a=Math.min(a,c))),h||(a=m.getStep(a)),a=Nt(a),a===e[i]&&!l?!1:a}function dt(e,i){var a=t.ort;return(a?i:e)+", "+(a?e:i)}function Dt(e,i,a,n,o){var l=a.slice(),h=n[0],c=t.events.smoothSteps,S=[!e,e],b=[e,!e];n=n.slice(),e&&n.reverse(),n.length>1?n.forEach(function(A,g){var P=Z(l,A,l[A]+i,S[g],b[g],!1,c);P===!1?i=0:(i=P-l[A],l[A]=P)}):S=b=[!0];var C=!1;n.forEach(function(A,g){C=T(A,a[A]+i,S[g],b[g],!1,c)||C}),C&&(n.forEach(function(A){y("update",A),y("slide",A)}),o!=null&&y("drag",h))}function kt(e,i){return t.dir?100-e-i:e}function pe(e,i){x[e]=i,F[e]=m.fromStepping(i);var a=kt(i,0)-at,n="translate("+dt(a+"%","0")+")";if(p[e].style[t.transformRule]=n,t.events.invertConnects&&x.length>1){var o=x.every(function(l,h,c){return h===0||l>=c[h-1]});if($!==!o){we();return}}G(e),G(e+1),$&&(G(e-1),G(e+2))}function vt(){O.forEach(function(e){var i=x[e]>50?-1:1,a=3+(p.length+i*e);p[e].style.zIndex=String(a)})}function T(e,i,a,n,o,l){return o||(i=Z(x,e,i,a,n,!1,l)),i===!1?!1:(pe(e,i),!0)}function G(e){if(V[e]){var i=x.slice();$&&i.sort(function(c,S){return c-S});var a=0,n=100;e!==0&&(a=i[e-1]),e!==V.length-1&&(n=i[e]);var o=n-a,l="translate("+dt(kt(a,o)+"%","0")+")",h="scale("+dt(o/100,"1")+")";V[e].style[t.transformRule]=l+" "+h}}function Ut(e,i){return e===null||e===!1||e===void 0||(typeof e=="number"&&(e=String(e)),e=t.format.from(e),e!==!1&&(e=m.toStepping(e)),e===!1||isNaN(e))?x[i]:e}function Q(e,i,a){var n=it(e),o=x[0]===void 0;i=i===void 0?!0:i,t.animate&&!o&&Rt(d,t.cssClasses.tap,t.animationDuration),O.forEach(function(c){T(c,Ut(n[c],c),!0,!1,a)});var l=O.length===1?0:1;if(o&&m.hasNoSize()&&(a=!0,x[0]=0,O.length>1)){var h=100/(O.length-1);O.forEach(function(c){x[c]=c*h})}for(;l<O.length;++l)O.forEach(function(c){T(c,x[c],!0,!0,a)});vt(),O.forEach(function(c){y("update",c),n[c]!==null&&i&&y("set",c)})}function me(e){Q(t.start,e)}function ge(e,i,a,n){if(e=Number(e),!(e>=0&&e<O.length))throw new Error("noUiSlider: invalid handle number, got: "+e);T(e,Ut(i,e),!0,!0,n),y("update",e),a&&y("set",e)}function Mt(e){if(e===void 0&&(e=!1),e)return F.length===1?F[0]:F.slice(0);var i=F.map(t.format.to);return i.length===1?i[0]:i}function Se(){for(W(q.aria),W(q.tooltips),Object.keys(t.cssClasses).forEach(function(e){et(d,t.cssClasses[e])});d.firstChild;)d.removeChild(d.firstChild);delete d.noUiSlider}function Ot(e){var i=x[e],a=m.getNearbySteps(i),n=F[e],o=a.thisStep.step,l=null;if(t.snap)return[n-a.stepBefore.startValue||null,a.stepAfter.startValue-n||null];o!==!1&&n+o>a.stepAfter.startValue&&(o=a.stepAfter.startValue-n),n>a.thisStep.startValue?l=a.thisStep.step:a.stepBefore.step===!1?l=!1:l=n-a.stepBefore.highestStep,i===100?o=null:i===0&&(l=null);var h=m.countStepDecimals();return o!==null&&o!==!1&&(o=Number(o.toFixed(h))),l!==null&&l!==!1&&(l=Number(l.toFixed(h))),[l,o]}function be(){return O.map(Ot)}function xe(e,i){var a=Mt(),n=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips","connect"];n.forEach(function(l){e[l]!==void 0&&(s[l]=e[l])});var o=Xt(s);n.forEach(function(l){e[l]!==void 0&&(t[l]=o[l])}),m=o.spectrum,t.margin=o.margin,t.limit=o.limit,t.padding=o.padding,t.pips?ut(t.pips):lt(),t.tooltips?Ct():ot(),x=[],Q(bt(e.start)?e.start:a,i),e.connect&&_t()}function _t(){for(;E.firstChild;)E.removeChild(E.firstChild);for(var e=0;e<=t.handles;e++)V[e]=st(E,t.connect[e]),G(e);Vt({drag:t.events.drag,fixed:!0})}function we(){$=!$,It(t,t.connect.map(function(e){return!e})),_t()}function Ee(){w=Qt(d),Zt(t.connect,w),Vt(t.events),Q(t.start),t.pips&&ut(t.pips),t.tooltips&&Ct(),ie()}Ee();var tt={destroy:Se,steps:be,on:ht,off:W,get:Mt,set:Q,setHandle:ge,reset:me,disable:ee,enable:re,__moveHandles:function(e,i,a){Dt(e,i,x,a)},options:s,updateOptions:xe,target:d,removePips:lt,removeTooltips:ot,getPositions:function(){return x.slice()},getTooltips:function(){return R},getOrigins:function(){return p},pips:ut};return tt}function nr(r,t){if(!r||!r.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+r);if(r.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var s=Xt(t),u=sr(r,s,t);return r.noUiSlider=u,u}var Yt={__spectrum:Kt,cssClasses:$t,create:nr};function Wt(r,t){let s=r.previousElementSibling;if(!s?.hasAttribute("data-field-accessibility"))return null;let u=()=>t({"aria-describedby":s.getAttribute("aria-describedby"),"aria-invalid":s.getAttribute("aria-invalid")},s);u();let f=new MutationObserver(u);return f.observe(s,{attributes:!0,attributeFilter:["aria-describedby","aria-invalid","data-preserve-filepond-description"]}),f}function Gt(r,t){if(r)for(let[s,u]of Object.entries(t))u==null||u===!1?r.removeAttribute(s):r.setAttribute(s,u)}function or({arePipsStepped:r,behavior:t,decimalPlaces:s,fillTrack:u,isDisabled:f,isRtl:v,isVertical:d,maxDifference:w,minDifference:E,maxValue:p,minValue:V,nonLinearPoints:D,pipsDensity:R,pipsFilter:m,pipsFormatter:F,pipsMode:x,pipsValues:O,rangePadding:Y,state:z,step:$,tooltips:B}){return{state:z,slider:null,accessibilityObserver:null,init(){this.slider=Yt.create(this.$el,{behaviour:t,direction:v?"rtl":"ltr",connect:u,format:{from:U=>+U,to:U=>s!==null?+U.toFixed(s):U},limit:w,margin:E,orientation:d?"vertical":"horizontal",padding:Y,pips:x?{density:R??10,filter:m,format:F,mode:x,stepped:r,values:O}:null,range:{min:V,...D??{},max:p},start:Alpine.raw(this.state),step:$,tooltips:B}),this.$el.id&&this.$el.querySelectorAll(".noUi-handle").forEach(U=>U.setAttribute("aria-labelledby",`${this.$el.id}-label`));let X=this.$el.querySelectorAll(".noUi-handle");this.accessibilityObserver=Wt(this.$el,U=>{X.forEach(at=>Gt(at,U))}),f&&this.slider.disable(),this.slider.on("change",U=>{this.state=U.length>1?U:U[0]}),this.$watch("state",()=>{this.slider.set(Alpine.raw(this.state))})},destroy(){this.accessibilityObserver?.disconnect(),this.slider.destroy(),this.slider=null}}}export{or as default};
@@ -0,0 +1 @@
1
+ function r({state:n,splitKeys:i,tagAddedMessage:a,tagRemovedMessage:s}){return{newTag:"",state:n,liveRegionClearTimeout:null,announce(e){let t=this.$refs.liveRegion;t&&(this.liveRegionClearTimeout!==null&&clearTimeout(this.liveRegionClearTimeout),t.textContent=e,this.liveRegionClearTimeout=setTimeout(()=>{t.textContent="",this.liveRegionClearTimeout=null},3e3))},createTag(){if(this.newTag=this.newTag.trim(),this.newTag!==""){if(this.state.includes(this.newTag)){this.newTag="";return}this.state.push(this.newTag),this.announce(a?.replace(":tag",()=>this.newTag)),this.newTag=""}},deleteTag(e){this.state=this.state.filter(t=>t!==e),this.announce(s?.replace(":tag",()=>e))},reorderTags(e){let t=this.state.splice(e.oldIndex,1)[0];this.state.splice(e.newIndex,0,t),this.state=[...this.state]},input:{"x-on:blur":"createTag()","x-model":"newTag","x-on:keydown"(e){e.isComposing||e.keyCode===229||["Enter",...i].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),this.createTag())},"x-on:paste"(){this.$nextTick(()=>{if(i.length===0){this.createTag();return}let e=i.map(t=>t.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")).join("|");this.newTag.split(new RegExp(e,"g")).forEach(t=>{this.newTag=t,this.createTag()})})}}}}export{r as default};
@@ -0,0 +1 @@
1
+ function u(){return{isPasswordRevealed:!1,passwordRevealFocusRequest:0,destroy(){this.passwordRevealFocusRequest++},setPasswordRevealed(s){let e=this.$root.querySelector("input.fi-input"),t=++this.passwordRevealFocusRequest,r=e.selectionStart,i=e.selectionEnd,c=e.selectionDirection;this.isPasswordRevealed=s,this.$nextTick(()=>{t===this.passwordRevealFocusRequest&&requestAnimationFrame(()=>{if(t!==this.passwordRevealFocusRequest)return;let a=s?"hidePasswordAction":"showPasswordAction",o=Array.from(this.$root.querySelectorAll(`[x-ref="${a}"]`)).find(n=>n.isConnected&&n.getClientRects().length);o&&(o.focus(),e.setSelectionRange(r,i,c))})})}}}export{u as default};
@@ -0,0 +1 @@
1
+ function n({initialHeight:e,shouldAutosize:s,state:i}){return{state:i,resizeObserver:null,wrapperEl:null,init(){this.wrapperEl=this.$el.parentNode,this.setInitialHeight(),s?this.$watch("state",()=>{this.resize()}):this.setUpResizeObserver()},setInitialHeight(){this.$el.scrollHeight<=0||(this.wrapperEl.style.height=e+"rem")},resize(){if(this.$el.scrollHeight<=0)return;let r=this.$el.style.height;this.$el.style.height="0px";let h=this.$el.scrollHeight;this.$el.style.height=r;let l=parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize),t=Math.max(h,l)+"px";this.wrapperEl.style.height!==t&&(this.wrapperEl.style.height=t)},setUpResizeObserver(){this.resizeObserver=new ResizeObserver(()=>{this.wrapperEl.style.height=this.$el.style.height}),this.resizeObserver.observe(this.$el)},destroy(){this.resizeObserver?.disconnect()}}}export{n as default};
@@ -0,0 +1 @@
1
+ function l({state:r,stateBindingModifiers:e}){let t=!1,o,n=e.includes("blur"),u=e.some(s=>["live","lazy","change"].includes(s)),c=e.includes("debounce"),i=String(e[e.indexOf("debounce")+1]??250),b=i.endsWith("s")&&!i.endsWith("ms")?Number.parseFloat(i)*1e3:Number.parseFloat(i);return{state:r,submissionLocked:!1,submissionLockObserver:null,init(){this.submissionLocked=this.$refs.submissionLock.disabled,this.submissionLockObserver=new MutationObserver(()=>{this.submissionLocked=this.$refs.submissionLock.disabled}),this.submissionLockObserver.observe(this.$refs.submissionLock,{attributes:!0,attributeFilter:["disabled"]})},isSelected(s){return["string","number"].includes(typeof this.state)&&String(this.state)===s},select(s){this.$refs.submissionLock.disabled||(this.state=this.isSelected(s)?null:s,u&&!n&&this.$nextTick(()=>{t||(c?(clearTimeout(o),o=setTimeout(()=>{t||this.$wire.$commit()},b)):this.$wire.$commit())}))},blur(){n&&this.$wire.$commit()},destroy(){t=!0,clearTimeout(o),this.submissionLockObserver?.disconnect()}}}export{l as default};
@@ -0,0 +1 @@
1
+ (()=>{function x(i,t=()=>{}){let e=!1;return function(){e?t.apply(this,arguments):(e=!0,i.apply(this,arguments))}}function T({notification:i}){return{isShown:!1,computedStyle:null,transitionDuration:null,transitionEasing:null,closeTimeout:null,durationTimeout:null,remainingDuration:null,durationStartedAt:null,isHovered:!1,isFocusedWithin:!1,isClosing:!1,focusOrigin:null,unsubscribeLivewireHook:null,transitionEffect:null,isDestroyed:!1,init(){this.$el.classList.contains("fi-inline")?this.isShown=!0:(this.computedStyle=window.getComputedStyle(this.$el),this.transitionDuration=parseFloat(this.computedStyle.transitionDuration)*1e3,this.transitionEasing=this.computedStyle.transitionTimingFunction),this.configureTransitions(),this.configureAnimations(),i.duration&&i.duration!=="persistent"&&(this.$root.classList.contains("fi-inline")?this.durationTimeout=setTimeout(()=>{if(!this.$el.matches(":hover")){this.close();return}this.$el.addEventListener("mouseleave",()=>this.close())},i.duration):(this.remainingDuration=i.duration,this.isHovered=this.$el.matches(":hover"),this.isFocusedWithin=this.$el.contains(document.activeElement),!this.isHovered&&!this.isFocusedWithin&&this.resumeDuration())),this.isShown=!0},pauseDuration(t){if(this.isClosing)return;let e=this.isHovered||this.isFocusedWithin;t==="hover"?this.isHovered=!0:this.isFocusedWithin=!0,!(e||!this.durationTimeout)&&(this.remainingDuration=Math.max(0,this.remainingDuration-(performance.now()-this.durationStartedAt)),clearTimeout(this.durationTimeout),this.durationTimeout=null,this.durationStartedAt=null)},resumeDuration(t=null){t==="hover"?this.isHovered=!1:t==="focus"&&(this.isFocusedWithin=!1),!(this.isClosing||this.isHovered||this.isFocusedWithin||this.remainingDuration===null||this.durationTimeout)&&(this.durationStartedAt=performance.now(),this.durationTimeout=setTimeout(()=>{this.durationTimeout=null,this.durationStartedAt=null,this.remainingDuration=0,this.close()},this.remainingDuration))},handleFocusIn(t){this.$el.contains(t.relatedTarget)||(this.focusOrigin=t.relatedTarget instanceof HTMLElement?t.relatedTarget:null),this.pauseDuration("focus")},handleFocusOut(t){this.$el.contains(t.relatedTarget)||this.resumeDuration("focus")},handleEscape(t){this.$el.contains(document.activeElement)&&(t.preventDefault(),t.stopImmediatePropagation(),this.dismiss())},configureTransitions(){if(this.$el.classList.contains("fi-inline")){let o=this.$el.style.getPropertyValue("display"),r=this.$el.style.getPropertyPriority("display");this.transitionEffect=Alpine.effect(()=>{if(this.isDestroyed)return;let l=this.isShown;Alpine.mutateDom(()=>{l?(this.$el.style.setProperty("display",o,r),this.$el.style.setProperty("visibility","visible")):this.$el.style.setProperty("display","none","important")}),this.$el._x_isShown=l});return}let t=this.computedStyle.display,e=()=>{Alpine.mutateDom(()=>{this.$el.style.setProperty("display",t),this.$el.style.setProperty("visibility","visible")}),this.$el._x_isShown=!0},s=()=>{Alpine.mutateDom(()=>{this.$el._x_isShown?this.$el.style.setProperty("visibility","hidden"):this.$el.style.setProperty("display","none")})},n=x(o=>o?e():s(),o=>{this.$el._x_toggleAndCascadeWithTransitions(this.$el,o,e,s)});this.transitionEffect=Alpine.effect(()=>{this.isDestroyed||n(this.isShown)})},configureAnimations(){this.$el.classList.contains("fi-inline")||(this.unsubscribeLivewireHook=Livewire.interceptMessage(({message:t,onSuccess:e})=>{t.component.snapshot.data.isFilamentNotificationsComponent&&requestAnimationFrame(()=>{if(this.isDestroyed)return;let s=()=>this.$el.getBoundingClientRect().top,n=s();e(({onRender:o})=>{this.isDestroyed||o(()=>{if(this.isDestroyed||!this.isShown)return;this.$el.getAnimations().forEach(l=>l.finish());let r=s();n!==r&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches||this.$el.animate([{transform:`translateY(${n-r}px)`},{transform:"translateY(0px)"}],{duration:this.transitionDuration,easing:this.transitionEasing}))})})})}))},close(t=!1){if(this.isClosing)return;this.isClosing=!0,clearTimeout(this.closeTimeout),clearTimeout(this.durationTimeout),this.durationTimeout=null,this.durationStartedAt=null;let e=()=>window.dispatchEvent(new CustomEvent("notificationClosed",{detail:{id:i.id}}));if(t===!0){this.isShown=!1,e();return}if(this.$root.classList.contains("fi-inline")){e();return}let s=this.$el.closest("[wire\\:id]");this.isShown=!1,this.closeTimeout=setTimeout(()=>{s&&!s.isConnected||e()},this.transitionDuration)},dismiss(){let t=this.focusOrigin;this.focusOrigin=null,this.$el.contains(document.activeElement)&&t instanceof HTMLElement&&t.isConnected&&!this.$el.contains(t)&&t.focus({preventScroll:!0}),this.close()},markAsRead(){window.dispatchEvent(new CustomEvent("markedNotificationAsRead",{detail:{id:i.id}}))},markAsUnread(){window.dispatchEvent(new CustomEvent("markedNotificationAsUnread",{detail:{id:i.id}}))},destroy(){this.isDestroyed=!0,clearTimeout(this.durationTimeout),this.durationTimeout=null,this.unsubscribeLivewireHook?.(),this.unsubscribeLivewireHook=null,Alpine.release(this.transitionEffect)}}}var S=new Set,h=new Map,D=new WeakMap,A="filament.notifications.redirect",O=/^[a-f0-9]{40}$/,u=0,C=!1,$=!1,b=!1,p=0,E=0,c=null;try{let i=JSON.parse(sessionStorage.getItem(A)??"[]");Array.isArray(i)&&i.filter(t=>typeof t=="string"&&O.test(t)).slice(-50).forEach(t=>h.set(t,{redirect:!0,ready:!0}))}catch{}function L(){try{let i=[...h].filter(([,t])=>t.redirect).map(([t])=>t);i.length?sessionStorage.setItem(A,JSON.stringify(i)):sessionStorage.removeItem(A)}catch{}}function F(i,t){for(h.set(i,t);h.size>50;)h.delete(h.keys().next().value);L()}function m(i){c===i&&(i.batches.forEach(t=>h.delete(t)),E=Math.max(E,i.wake),c=null,L(),w())}function w(){if(b)return;b=!0;let i=u;window.Alpine.nextTick(()=>{if(b=!1,C||c)return;if(i!==u){w();return}let t=[...S].find(n=>n.$el.isConnected);if(!t)return;let e=[...h].filter(([,n])=>n.ready&&(n.redirect||n.generation===u)).map(([n])=>n);if(!e.length&&p===E)return;let s={host:t,batches:e,wake:p};c=s;try{t.$wire.pullNotifications(e).then(()=>m(s),()=>m(s))}catch(n){throw m(s),n}})}function N(i){if(!D.has(i)){let t,e=new Promise(s=>t=s);D.set(i,{promise:e,finish:t,redirected:!1})}return D.get(i)}function H({request:i,onResponse:t,onSuccess:e,onError:s,onFailure:n}){let o=u,r=null,l=(a,g)=>{o!==u||!O.test(a??"")||(r=a,g&&F(r,{redirect:!0,ready:!1}))},d=()=>{r&&(h.delete(r),L())};for(let a of i.messages)N(a).promise.then(()=>{i.hasAllCancelledMessages()&&d()});t(({response:a})=>{!a.ok||a.redirected||o!==u||l(a.headers.get("X-Filament-Notifications"),a.headers.get("X-Filament-Notifications-Redirect")==="true")}),e(({json:a})=>{l(a.filamentNotificationBatch,a.components.some(f=>f.effects?.redirect));let g=[...i.getActiveMessages()].map(N);Promise.all(g.map(f=>f.promise)).then(()=>{if(i.hasAllCancelledMessages()){d();return}g.some(f=>f.redirected)||(d(),o===u&&(r&&F(r,{generation:o,redirect:!1,ready:!0}),a.filamentNotifications&&(p++,w())))})}),s(d),n(d)}function k(){Livewire.interceptRequest(H),Livewire.interceptMessage(({message:i,onSuccess:t,onFinish:e})=>{let s=N(i);t(({payload:n,onEffect:o})=>{o(()=>{s.redirected=!!n.effects?.redirect})}),e(s.finish)}),document.addEventListener("livewire:navigating",()=>{C=!0,u++;for(let[i,t]of h)t.redirect||h.delete(i);c&&m(c)}),document.addEventListener("livewire:navigated",()=>{$&&p++,$=!0,C=!1;for(let i of h.values())i.redirect&&(i.ready=!0);w()})}function P(){let i;return{init(){i=this,S.add(i),($||this.$el.dataset.filamentNotifications!=="mounted")&&p++,w()},destroy(){S.delete(i),c?.host===i&&m(c)}}}var v=class{constructor(){return this.id(crypto.randomUUID?.()??"10000000-1000-4000-8000-100000000000".replace(/[018]/g,t=>(+t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+t/4).toString(16))),this}id(t){return this._id=t,this}title(t){return this._title=t,this}body(t){return this._body=t,this}actions(t){return this._actions=t,this}status(t){return this._status=t,this}color(t){return this._color=t,this}icon(t){return this._icon=t,this}iconColor(t){return this._iconColor=t,this}duration(t){return this._duration=t,this}seconds(t){return this.duration(t*1e3),this}persistent(){return this.duration("persistent"),this}danger(){return this.status("danger"),this}info(){return this.status("info"),this}success(){return this.status("success"),this}warning(){return this.status("warning"),this}view(t){return this._view=t,this}viewData(t){return this._viewData=t,this}toJSON(){return{id:this._id,title:this._title,body:this._body,actions:this._actions?.map(t=>t.toJSON()),status:this._status,color:this._color,icon:this._icon,iconColor:this._iconColor,duration:this._duration,view:this._view,viewData:this._viewData}}send(){return window.dispatchEvent(new CustomEvent("notificationSent",{detail:{notification:this.toJSON()}})),this}},_=class{constructor(t){return this.name(t),this}name(t){return this._name=t,this}color(t){return this._color=t,this}dispatch(t,e){return this.event(t),this.eventData(e),this}dispatchSelf(t,e){return this.dispatch(t,e),this._dispatchDirection="self",this}dispatchTo(t,e,s){return this.dispatch(e,s),this._dispatchDirection="to",this._dispatchToComponent=t,this}emit(t,e){return this.dispatch(t,e),this}emitSelf(t,e){return this.dispatchSelf(t,e),this}emitTo(t,e,s){return this.dispatchTo(t,e,s),this}dispatchDirection(t){return this._dispatchDirection=t,this}dispatchToComponent(t){return this._dispatchToComponent=t,this}event(t){return this._event=t,this}eventData(t){return this._eventData=t,this}extraAttributes(t){return this._extraAttributes=t,this}icon(t){return this._icon=t,this}iconPosition(t){return this._iconPosition=t,this}outlined(t=!0){return this._isOutlined=t,this}disabled(t=!0){return this._isDisabled=t,this}label(t){return this._label=t,this}close(t=!0){return this._shouldClose=t,this}openUrlInNewTab(t=!0){return this._shouldOpenUrlInNewTab=t,this}size(t){return this._size=t,this}url(t){return this._url=t,this}view(t){return this._view=t,this}button(){return this.view("filament::components.button.index"),this}grouped(){return this.view("filament::components.dropdown.list.item"),this}iconButton(){return this.view("filament::components.icon-button"),this}link(){return this.view("filament::components.link"),this}toJSON(){return{name:this._name,color:this._color,event:this._event,eventData:this._eventData,dispatchDirection:this._dispatchDirection,dispatchToComponent:this._dispatchToComponent,extraAttributes:this._extraAttributes,icon:this._icon,iconPosition:this._iconPosition,isOutlined:this._isOutlined,isDisabled:this._isDisabled,label:this._label,shouldClose:this._shouldClose,shouldOpenUrlInNewTab:this._shouldOpenUrlInNewTab,size:this._size,url:this._url,view:this._view}}},y=class{constructor(t){return this.actions(t),this}actions(t){return this._actions=t.map(e=>e.grouped()),this}color(t){return this._color=t,this}icon(t){return this._icon=t,this}iconPosition(t){return this._iconPosition=t,this}label(t){return this._label=t,this}tooltip(t){return this._tooltip=t,this}toJSON(){return{actions:this._actions?.map(t=>t.toJSON()),color:this._color,icon:this._icon,iconPosition:this._iconPosition,label:this._label,tooltip:this._tooltip}}};window.setUpFilamentBroadcastNotifications=({$wire:i,broadcastChannel:t,event:e,onNotification:s})=>{let n,o=!1,r=d=>{setTimeout(()=>{o||s(d)},500)},l=()=>{n||o||(n=window.Echo.private(t),n.listen(e,r))};window.addEventListener("EchoLoaded",l),i.__instance.addCleanup(()=>{o=!0,window.removeEventListener("EchoLoaded",l),n?.stopListening(e,r)}),window.Echo&&l()};window.FilamentNotificationAction=_;window.FilamentNotificationActionGroup=y;window.FilamentNotification=v;document.addEventListener("alpine:init",()=>{window.Alpine.data("notificationComponent",T),window.Alpine.data("notificationsComponent",P)});document.addEventListener("livewire:init",k);})();
@@ -0,0 +1 @@
1
+ var i=()=>({isSticky:!1,width:0,resizeObserver:null,boundUpdateWidth:null,init(){let e=this.$el.parentElement;e&&(this.updateWidth(),this.resizeObserver=new ResizeObserver(()=>this.updateWidth()),this.resizeObserver.observe(e),this.boundUpdateWidth=this.updateWidth.bind(this),window.addEventListener("resize",this.boundUpdateWidth))},enableSticky(){this.isSticky=this.$el.getBoundingClientRect().top>0},disableSticky(){this.isSticky=!1},updateWidth(){let e=this.$el.parentElement;if(!e)return;let t=getComputedStyle(this.$root.querySelector(".fi-ac"));this.width=e.offsetWidth+parseInt(t.marginInlineStart,10)*-1+parseInt(t.marginInlineEnd,10)*-1},destroy(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.boundUpdateWidth&&(window.removeEventListener("resize",this.boundUpdateWidth),this.boundUpdateWidth=null)}});export{i as default};
@@ -0,0 +1 @@
1
+ var l=o=>JSON.parse(JSON.stringify(o));function m({renderer:o,getBaseUrl:c,getContext:f,getProps:a,onError:i,onFailure:u,onDestroy:p=()=>{}}){let r,s=!1,h=t=>{try{Promise.resolve(t?.destroy()).catch(e=>i("cleanup",e))}catch(e){i("cleanup",e)}},$=()=>{if(s)return;s=!0,p();let t=r;r=void 0,h(t)},d=(t,e)=>{if(s)return;s=!0,p(),i(t,e);let n=r;r=void 0,h(n),u()},y=()=>{if(!(s||!r))try{let t=a();if(t===void 0)return;Promise.resolve(r.update(t)).catch(e=>d("update",e))}catch(t){d("update",t)}};return{async init(){let t=typeof o=="string"?"import":"mount";try{if(!o)return;let e=typeof o=="string"?(await import(new URL(o,c()).href)).default:o;if(s)return;if(typeof e!="function")throw new TypeError("The renderer module must default-export a mount function.");t="mount";let n=await e(f());if(typeof n?.update!="function"||typeof n?.destroy!="function")throw typeof n?.destroy=="function"&&h(n),new TypeError("The renderer must return update() and destroy() methods.");if(s){h(n);return}r=n,y()}catch(e){d(t,e)}},update:y,destroy:$}}function g({renderer:o,rendererConfiguration:c={},componentConfiguration:f}){let a,i=()=>({...f,configuration:l(c)});return{hasError:!1,updateRendererConfiguration(u){c=l(u),a?.update()},init(){let u=this;return a=m({renderer:o,getBaseUrl:()=>this.$el.ownerDocument.baseURI,getProps:i,getContext:()=>({host:this.$refs.host,props:i(),utilities:{...this.$schemaComponentMethods,get $wire(){return u.$wire},$callSchemaComponentMethod:this.$callSchemaComponentMethod,$get:this.$get,$set:this.$set,$statePath:this.$statePath,get $state(){return u.$state}}}),onError:(p,r)=>{console.error(`JS schema component ${p} failed:`,{statePath:this.$statePath,renderer:o},r)},onFailure:()=>{this.$refs.host.replaceChildren(),this.hasError=!0}}),a.init()},destroy(){a?.destroy()}}}export{g as default};
@@ -0,0 +1 @@
1
+ var _=Math.min,R=Math.max,nt=Math.round,ot=Math.floor,H=t=>({x:t,y:t}),ee={left:"right",right:"left",bottom:"top",top:"bottom"};function mt(t,e,o){return R(t,_(e,o))}function X(t,e){return typeof t=="function"?t(e):t}function $(t){return t.split("-")[0]}function G(t){return t.split("-")[1]}function gt(t){return t==="x"?"y":"x"}function pt(t){return t==="y"?"height":"width"}function V(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function bt(t){return gt(V(t))}function Rt(t,e,o){o===void 0&&(o=!1);let n=G(t),r=bt(t),a=pt(r),c=r==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(c=it(c)),[c,it(c)]}function St(t){let e=it(t);return[lt(t),e,lt(e)]}function lt(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var At=["left","right"],Et=["right","left"],ie=["top","bottom"],ne=["bottom","top"];function oe(t,e,o){switch(t){case"top":case"bottom":return o?e?Et:At:e?At:Et;case"left":case"right":return e?ie:ne;default:return[]}}function Ft(t,e,o,n){let r=G(t),a=oe($(t),o==="start",n);return r&&(a=a.map(c=>c+"-"+r),e&&(a=a.concat(a.map(lt)))),a}function it(t){let e=$(t);return ee[e]+t.slice(e.length)}function se(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ct(t){return typeof t!="number"?se(t):{top:t,right:t,bottom:t,left:t}}function I(t){let{x:e,y:o,width:n,height:r}=t;return{width:n,height:r,top:o,left:e,right:e+n,bottom:o+r,x:e,y:o}}function Lt(t,e,o){let{reference:n,floating:r}=t,a=V(e),c=bt(e),f=pt(c),m=$(e),g=a==="y",h=n.x+n.width/2-r.width/2,i=n.y+n.height/2-r.height/2,l=n[f]/2-r[f]/2,s;switch(m){case"top":s={x:h,y:n.y-r.height};break;case"bottom":s={x:h,y:n.y+n.height};break;case"right":s={x:n.x+n.width,y:i};break;case"left":s={x:n.x-r.width,y:i};break;default:s={x:n.x,y:n.y}}switch(G(e)){case"start":s[c]-=l*(o&&g?-1:1);break;case"end":s[c]+=l*(o&&g?-1:1);break}return s}async function Pt(t,e){var o;e===void 0&&(e={});let{x:n,y:r,platform:a,rects:c,elements:f,strategy:m}=t,{boundary:g="clippingAncestors",rootBoundary:h="viewport",elementContext:i="floating",altBoundary:l=!1,padding:s=0}=X(e,t),u=Ct(s),y=f[l?i==="floating"?"reference":"floating":i],b=I(await a.getClippingRect({element:(o=await(a.isElement==null?void 0:a.isElement(y)))==null||o?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(f.floating)),boundary:g,rootBoundary:h,strategy:m})),v=i==="floating"?{x:n,y:r,width:c.floating.width,height:c.floating.height}:c.reference,d=await(a.getOffsetParent==null?void 0:a.getOffsetParent(f.floating)),w=await(a.isElement==null?void 0:a.isElement(d))?await(a.getScale==null?void 0:a.getScale(d))||{x:1,y:1}:{x:1,y:1},O=I(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:v,offsetParent:d,strategy:m}):v);return{top:(b.top-O.top+u.top)/w.y,bottom:(O.bottom-b.bottom+u.bottom)/w.y,left:(b.left-O.left+u.left)/w.x,right:(O.right-b.right+u.right)/w.x}}var re=50,Dt=async(t,e,o)=>{let{placement:n="bottom",strategy:r="absolute",middleware:a=[],platform:c}=o,f=c.detectOverflow?c:{...c,detectOverflow:Pt},m=await(c.isRTL==null?void 0:c.isRTL(e)),g=await c.getElementRects({reference:t,floating:e,strategy:r}),{x:h,y:i}=Lt(g,n,m),l=n,s=0,u={};for(let p=0;p<a.length;p++){let y=a[p];if(!y)continue;let{name:b,fn:v}=y,{x:d,y:w,data:O,reset:T}=await v({x:h,y:i,initialPlacement:n,placement:l,strategy:r,middlewareData:u,rects:g,platform:f,elements:{reference:t,floating:e}});h=d??h,i=w??i,u[b]={...u[b],...O},T&&s<re&&(s++,typeof T=="object"&&(T.placement&&(l=T.placement),T.rects&&(g=T.rects===!0?await c.getElementRects({reference:t,floating:e,strategy:r}):T.rects),{x:h,y:i}=Lt(g,l,m)),p=-1)}return{x:h,y:i,placement:l,strategy:r,middlewareData:u}};var Mt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var o,n;let{placement:r,middlewareData:a,rects:c,initialPlacement:f,platform:m,elements:g}=e,{mainAxis:h=!0,crossAxis:i=!0,fallbackPlacements:l,fallbackStrategy:s="bestFit",fallbackAxisSideDirection:u="none",flipAlignment:p=!0,...y}=X(t,e);if((o=a.arrow)!=null&&o.alignmentOffset)return{};let b=$(r),v=V(f),d=$(f)===f,w=await(m.isRTL==null?void 0:m.isRTL(g.floating)),O=l||(d||!p?[it(f)]:St(f)),T=u!=="none";!l&&T&&O.push(...Ft(f,p,u,w));let x=[f,...O],S=await m.detectOverflow(e,y),A=[],E=((n=a.flip)==null?void 0:n.overflows)||[];if(h&&A.push(S[b]),i){let K=Rt(r,c,w);A.push(S[K[0]],S[K[1]])}if(E=[...E,{placement:r,overflows:A}],!A.every(K=>K<=0)){var C,L;let K=(((C=a.flip)==null?void 0:C.index)||0)+1,ht=x[K];if(ht&&(!(i==="alignment"?v!==V(ht):!1)||E.every(M=>V(M.placement)===v?M.overflows[0]>0:!0)))return{data:{index:K,overflows:E},reset:{placement:ht}};let et=(L=E.filter(z=>z.overflows[0]<=0).sort((z,M)=>z.overflows[1]-M.overflows[1])[0])==null?void 0:L.placement;if(!et)switch(s){case"bestFit":{var tt;let z=(tt=E.filter(M=>{if(T){let N=V(M.placement);return N===v||N==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(N=>N>0).reduce((N,te)=>N+te,0)]).sort((M,N)=>M[1]-N[1])[0])==null?void 0:tt[0];z&&(et=z);break}case"initialPlacement":et=f;break}if(r!==et)return{reset:{placement:et}}}return{}}}};var le=new Set(["left","top"]);async function ce(t,e){let{placement:o,platform:n,elements:r}=t,a=await(n.isRTL==null?void 0:n.isRTL(r.floating)),c=$(o),f=G(o),m=V(o)==="y",g=le.has(c)?-1:1,h=a&&m?-1:1,i=X(e,t),{mainAxis:l,crossAxis:s,alignmentAxis:u}=typeof i=="number"?{mainAxis:i,crossAxis:0,alignmentAxis:null}:{mainAxis:i.mainAxis||0,crossAxis:i.crossAxis||0,alignmentAxis:i.alignmentAxis};return f&&typeof u=="number"&&(s=f==="end"?u*-1:u),m?{x:s*h,y:l*g}:{x:l*g,y:s*h}}var Ht=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var o,n;let{x:r,y:a,placement:c,middlewareData:f}=e,m=await ce(e,t);return c===((o=f.offset)==null?void 0:o.placement)&&(n=f.arrow)!=null&&n.alignmentOffset?{}:{x:r+m.x,y:a+m.y,data:{...m,placement:c}}}}},kt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:o,y:n,placement:r,platform:a}=e,{mainAxis:c=!0,crossAxis:f=!1,limiter:m={fn:b=>{let{x:v,y:d}=b;return{x:v,y:d}}},...g}=X(t,e),h={x:o,y:n},i=await a.detectOverflow(e,g),l=V($(r)),s=gt(l),u=h[s],p=h[l];if(c){let b=s==="y"?"top":"left",v=s==="y"?"bottom":"right",d=u+i[b],w=u-i[v];u=mt(d,u,w)}if(f){let b=l==="y"?"top":"left",v=l==="y"?"bottom":"right",d=p+i[b],w=p-i[v];p=mt(d,p,w)}let y=m.fn({...e,[s]:u,[l]:p});return{...y,data:{x:y.x-o,y:y.y-n,enabled:{[s]:c,[l]:f}}}}}};var Vt=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var o,n;let{placement:r,rects:a,platform:c,elements:f}=e,{apply:m=()=>{},...g}=X(t,e),h=await c.detectOverflow(e,g),i=$(r),l=G(r),s=V(r)==="y",{width:u,height:p}=a.floating,y,b;i==="top"||i==="bottom"?(y=i,b=l===(await(c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(b=i,y=l==="end"?"top":"bottom");let v=p-h.top-h.bottom,d=u-h.left-h.right,w=_(p-h[y],v),O=_(u-h[b],d),T=!e.middlewareData.shift,x=w,S=O;if((o=e.middlewareData.shift)!=null&&o.enabled.x&&(S=d),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(x=v),T&&!l){let E=R(h.left,0),C=R(h.right,0),L=R(h.top,0),tt=R(h.bottom,0);s?S=u-2*(E!==0||C!==0?E+C:R(h.left,h.right)):x=p-2*(L!==0||tt!==0?L+tt:R(h.top,h.bottom))}await m({...e,availableWidth:S,availableHeight:x});let A=await c.getDimensions(f.floating);return u!==A.width||p!==A.height?{reset:{rects:!0}}:{}}}};function ct(){return typeof window<"u"}function Y(t){return $t(t)?(t.nodeName||"").toLowerCase():"#document"}function F(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function k(t){var e;return(e=($t(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function $t(t){return ct()?t instanceof Node||t instanceof F(t).Node:!1}function P(t){return ct()?t instanceof Element||t instanceof F(t).Element:!1}function W(t){return ct()?t instanceof HTMLElement||t instanceof F(t).HTMLElement:!1}function Wt(t){return!ct()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof F(t).ShadowRoot}function Z(t){let{overflow:e,overflowX:o,overflowY:n,display:r}=D(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&r!=="inline"&&r!=="contents"}function Bt(t){return/^(table|td|th)$/.test(Y(t))}function st(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var ae=/transform|translate|scale|rotate|perspective|filter/,fe=/paint|layout|strict|content/,U=t=>!!t&&t!=="none",wt;function at(t){let e=P(t)?D(t):t;return U(e.transform)||U(e.translate)||U(e.scale)||U(e.rotate)||U(e.perspective)||!ft()&&(U(e.backdropFilter)||U(e.filter))||ae.test(e.willChange||"")||fe.test(e.contain||"")}function Nt(t){let e=B(t);for(;W(e)&&!q(e);){if(at(e))return e;if(st(e))return null;e=B(e)}return null}function ft(){return wt==null&&(wt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),wt}function q(t){return/^(html|body|#document)$/.test(Y(t))}function D(t){return F(t).getComputedStyle(t)}function rt(t){return P(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function B(t){if(Y(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Wt(t)&&t.host||k(t);return Wt(e)?e.host:e}function _t(t){let e=B(t);return q(e)?t.ownerDocument?t.ownerDocument.body:t.body:W(e)&&Z(e)?e:_t(e)}function J(t,e,o){var n;e===void 0&&(e=[]),o===void 0&&(o=!0);let r=_t(t),a=r===((n=t.ownerDocument)==null?void 0:n.body),c=F(r);if(a){let f=ut(c);return e.concat(c,c.visualViewport||[],Z(r)?r:[],f&&o?J(f):[])}else return e.concat(r,J(r,[],o))}function ut(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Ut(t){let e=D(t),o=parseFloat(e.width)||0,n=parseFloat(e.height)||0,r=W(t),a=r?t.offsetWidth:o,c=r?t.offsetHeight:n,f=nt(o)!==a||nt(n)!==c;return f&&(o=a,n=c),{width:o,height:n,$:f}}function yt(t){return P(t)?t:t.contextElement}function Q(t){let e=yt(t);if(!W(e))return H(1);let o=e.getBoundingClientRect(),{width:n,height:r,$:a}=Ut(e),c=(a?nt(o.width):o.width)/n,f=(a?nt(o.height):o.height)/r;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}var ue=H(0);function Yt(t){let e=F(t);return!ft()||!e.visualViewport?ue:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function de(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==F(t)?!1:e}function j(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);let r=t.getBoundingClientRect(),a=yt(t),c=H(1);e&&(n?P(n)&&(c=Q(n)):c=Q(t));let f=de(a,o,n)?Yt(a):H(0),m=(r.left+f.x)/c.x,g=(r.top+f.y)/c.y,h=r.width/c.x,i=r.height/c.y;if(a){let l=F(a),s=n&&P(n)?F(n):n,u=l,p=ut(u);for(;p&&n&&s!==u;){let y=Q(p),b=p.getBoundingClientRect(),v=D(p),d=b.left+(p.clientLeft+parseFloat(v.paddingLeft))*y.x,w=b.top+(p.clientTop+parseFloat(v.paddingTop))*y.y;m*=y.x,g*=y.y,h*=y.x,i*=y.y,m+=d,g+=w,u=F(p),p=ut(u)}}return I({width:h,height:i,x:m,y:g})}function dt(t,e){let o=rt(t).scrollLeft;return e?e.left+o:j(k(t)).left+o}function qt(t,e){let o=t.getBoundingClientRect(),n=o.left+e.scrollLeft-dt(t,o),r=o.top+e.scrollTop;return{x:n,y:r}}function he(t){let{elements:e,rect:o,offsetParent:n,strategy:r}=t,a=r==="fixed",c=k(n),f=e?st(e.floating):!1;if(n===c||f&&a)return o;let m={scrollLeft:0,scrollTop:0},g=H(1),h=H(0),i=W(n);if((i||!i&&!a)&&((Y(n)!=="body"||Z(c))&&(m=rt(n)),i)){let s=j(n);g=Q(n),h.x=s.x+n.clientLeft,h.y=s.y+n.clientTop}let l=c&&!i&&!a?qt(c,m):H(0);return{width:o.width*g.x,height:o.height*g.y,x:o.x*g.x-m.scrollLeft*g.x+h.x+l.x,y:o.y*g.y-m.scrollTop*g.y+h.y+l.y}}function me(t){return Array.from(t.getClientRects())}function ge(t){let e=k(t),o=rt(t),n=t.ownerDocument.body,r=R(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=R(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),c=-o.scrollLeft+dt(t),f=-o.scrollTop;return D(n).direction==="rtl"&&(c+=R(e.clientWidth,n.clientWidth)-r),{width:r,height:a,x:c,y:f}}var Kt=25;function pe(t,e){let o=F(t),n=k(t),r=o.visualViewport,a=n.clientWidth,c=n.clientHeight,f=0,m=0;if(r){a=r.width,c=r.height;let h=ft();(!h||h&&e==="fixed")&&(f=r.offsetLeft,m=r.offsetTop)}let g=dt(n);if(g<=0){let h=n.ownerDocument,i=h.body,l=getComputedStyle(i),s=h.compatMode==="CSS1Compat"&&parseFloat(l.marginLeft)+parseFloat(l.marginRight)||0,u=Math.abs(n.clientWidth-i.clientWidth-s);u<=Kt&&(a-=u)}else g<=Kt&&(a+=g);return{width:a,height:c,x:f,y:m}}function be(t,e){let o=j(t,!0,e==="fixed"),n=o.top+t.clientTop,r=o.left+t.clientLeft,a=W(t)?Q(t):H(1),c=t.clientWidth*a.x,f=t.clientHeight*a.y,m=r*a.x,g=n*a.y;return{width:c,height:f,x:m,y:g}}function zt(t,e,o){let n;if(e==="viewport")n=pe(t,o);else if(e==="document")n=ge(k(t));else if(P(e))n=be(e,o);else{let r=Yt(t);n={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return I(n)}function jt(t,e){let o=B(t);return o===e||!P(o)||q(o)?!1:D(o).position==="fixed"||jt(o,e)}function we(t,e){let o=e.get(t);if(o)return o;let n=J(t,[],!1).filter(f=>P(f)&&Y(f)!=="body"),r=null,a=D(t).position==="fixed",c=a?B(t):t;for(;P(c)&&!q(c);){let f=D(c),m=at(c);!m&&f.position==="fixed"&&(r=null),(a?!m&&!r:!m&&f.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||Z(c)&&!m&&jt(t,c))?n=n.filter(h=>h!==c):r=f,c=B(c)}return e.set(t,n),n}function ve(t){let{element:e,boundary:o,rootBoundary:n,strategy:r}=t,c=[...o==="clippingAncestors"?st(e)?[]:we(e,this._c):[].concat(o),n],f=zt(e,c[0],r),m=f.top,g=f.right,h=f.bottom,i=f.left;for(let l=1;l<c.length;l++){let s=zt(e,c[l],r);m=R(s.top,m),g=_(s.right,g),h=_(s.bottom,h),i=R(s.left,i)}return{width:g-i,height:h-m,x:i,y:m}}function ye(t){let{width:e,height:o}=Ut(t);return{width:e,height:o}}function xe(t,e,o){let n=W(e),r=k(e),a=o==="fixed",c=j(t,!0,a,e),f={scrollLeft:0,scrollTop:0},m=H(0);function g(){m.x=dt(r)}if(n||!n&&!a)if((Y(e)!=="body"||Z(r))&&(f=rt(e)),n){let s=j(e,!0,a,e);m.x=s.x+e.clientLeft,m.y=s.y+e.clientTop}else r&&g();a&&!n&&r&&g();let h=r&&!n&&!a?qt(r,f):H(0),i=c.left+f.scrollLeft-m.x-h.x,l=c.top+f.scrollTop-m.y-h.y;return{x:i,y:l,width:c.width,height:c.height}}function vt(t){return D(t).position==="static"}function It(t,e){if(!W(t)||D(t).position==="fixed")return null;if(e)return e(t);let o=t.offsetParent;return k(t)===o&&(o=o.ownerDocument.body),o}function Xt(t,e){let o=F(t);if(st(t))return o;if(!W(t)){let r=B(t);for(;r&&!q(r);){if(P(r)&&!vt(r))return r;r=B(r)}return o}let n=It(t,e);for(;n&&Bt(n)&&vt(n);)n=It(n,e);return n&&q(n)&&vt(n)&&!at(n)?o:n||Nt(t)||o}var Oe=async function(t){let e=this.getOffsetParent||Xt,o=this.getDimensions,n=await o(t.floating);return{reference:xe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Te(t){return D(t).direction==="rtl"}var Ae={convertOffsetParentRelativeRectToViewportRelativeRect:he,getDocumentElement:k,getClippingRect:ve,getOffsetParent:Xt,getElementRects:Oe,getClientRects:me,getDimensions:ye,getScale:Q,isElement:P,isRTL:Te};function Gt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ee(t,e){let o=null,n,r=k(t);function a(){var f;clearTimeout(n),(f=o)==null||f.disconnect(),o=null}function c(f,m){f===void 0&&(f=!1),m===void 0&&(m=1),a();let g=t.getBoundingClientRect(),{left:h,top:i,width:l,height:s}=g;if(f||e(),!l||!s)return;let u=ot(i),p=ot(r.clientWidth-(h+l)),y=ot(r.clientHeight-(i+s)),b=ot(h),d={rootMargin:-u+"px "+-p+"px "+-y+"px "+-b+"px",threshold:R(0,_(1,m))||1},w=!0;function O(T){let x=T[0].intersectionRatio;if(x!==m){if(!w)return c();x?c(!1,x):n=setTimeout(()=>{c(!1,1e-7)},1e3)}x===1&&!Gt(g,t.getBoundingClientRect())&&c(),w=!1}try{o=new IntersectionObserver(O,{...d,root:r.ownerDocument})}catch{o=new IntersectionObserver(O,d)}o.observe(t)}return c(!0),a}function Jt(t,e,o,n){n===void 0&&(n={});let{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:m=!1}=n,g=yt(t),h=r||a?[...g?J(g):[],...e?J(e):[]]:[];h.forEach(b=>{r&&b.addEventListener("scroll",o,{passive:!0}),a&&b.addEventListener("resize",o)});let i=g&&f?Ee(g,o):null,l=-1,s=null;c&&(s=new ResizeObserver(b=>{let[v]=b;v&&v.target===g&&s&&e&&(s.unobserve(e),cancelAnimationFrame(l),l=requestAnimationFrame(()=>{var d;(d=s)==null||d.observe(e)})),o()}),g&&!m&&s.observe(g),e&&s.observe(e));let u,p=m?j(t):null;m&&y();function y(){let b=j(t);p&&!Gt(p,b)&&o(),p=b,u=requestAnimationFrame(y)}return o(),()=>{var b;h.forEach(v=>{r&&v.removeEventListener("scroll",o),a&&v.removeEventListener("resize",o)}),i?.(),(b=s)==null||b.disconnect(),s=null,m&&cancelAnimationFrame(u)}}var xt=Ht;var Zt=kt,Qt=Mt,Ot=Vt;var Tt=(t,e,o)=>{let n=new Map,r={platform:Ae,...o},a={...r.platform,_c:n};return Dt(t,e,{...r,platform:a})};function Re({activeTab:t,hasTabPanels:e=!0,isScrollable:o,isTabPersisted:n,isTabPersistedInQueryString:r,isVertical:a=!1,livewireId:c,livewireProperty:f=null,schemaKey:m,tab:g,tabQueryStringKey:h}){return{tab:g,focusedTab:null,availableTabs:[],overflowTabs:[],overflowReady:!1,isOverflowOpen:!1,overflowReference:null,cleanupOverflowPosition:null,overflowPositionVersion:0,pendingOverflowFocus:null,overflowTouchY:null,hasVisibleTabHeaders:!0,shouldMeasureOverflow:!0,root:null,lastFocusedElement:null,lastFocusedTabset:null,lastFocusedPanel:null,selectionFocus:null,shouldAutofocusAfterUpdate:!1,pendingServerTab:null,observer:null,resizeObserver:null,animationFrame:null,unsubscribeLivewireHook:null,boundResetHandler:null,boundFocusHandler:null,isDestroyed:!1,init(){this.root=this.$el;let i=this.getTabs();this.availableTabs=i;let l=new URLSearchParams(window.location.search);!f&&r&&i.includes(l.get(h))&&(this.tab=l.get(h)),!f&&!i.includes(this.tab)&&(this.tab=this.getDefaultTab()),this.$watch("tab",()=>{this.updateQueryString(),this.scheduleUpdate()}),this.boundFocusHandler=s=>{if(!this.root.contains(s.target)||s.target.closest(".fi-modal")!==this.root.closest(".fi-modal")){this.closeOverflow(),this.lastFocusedElement=null,this.lastFocusedTabset=null,this.lastFocusedPanel=null,this.focusedTab=null,this.selectionFocus=null;return}if(this.lastFocusedElement=s.target,this.lastFocusedTabset=s.target.closest(".fi-sc-tabs"),this.lastFocusedPanel=Array.from(this.root.children).find(u=>u.classList.contains("fi-sc-tabs-tab")&&u.contains(s.target)),this.lastFocusedTabset!==this.root){this.closeOverflow(),this.focusedTab=null,this.selectionFocus=null;return}this.getTabElements().includes(s.target)?(this.focusedTab=s.target.dataset.tabKey,e&&(this.overflowTabs.includes(this.focusedTab)?(this.pendingOverflowFocus=s.target,this.openOverflow()):this.closeOverflow())):(this.focusedTab=null,this.closeOverflow())},document.addEventListener("focusin",this.boundFocusHandler),this.observer=new MutationObserver(s=>this.scheduleUpdate(s.some(u=>u.attributeName!=="style"&&this.getHeaderElement().querySelector(":scope > [x-ref=tablist]").contains(u.target)))),this.observer.observe(this.root,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["data-tab-available","data-active-tab","disabled","aria-disabled"]}),o||(this.observer.observe(this.getHeaderElement(),{attributeFilter:["style"],subtree:!0}),this.resizeObserver=new ResizeObserver(()=>this.scheduleUpdate(!0)),this.resizeObserver.observe(this.getHeaderElement())),this.unsubscribeLivewireHook=Livewire.interceptMessage(({message:s,onSuccess:u})=>{s.component.id===c&&u(({onMorphed:p})=>p(()=>this.scheduleUpdate()))}),this.boundResetHandler=s=>{f||s.detail.livewireId!==c||s.detail.schemaKey!==m||n||r||this.$nextTick(()=>{this.isDestroyed||(this.tab=this.getDefaultTab(),this.shouldAutofocusAfterUpdate=!0,this.scheduleUpdate())})},window.addEventListener("reset-schema-component-state",this.boundResetHandler),this.$nextTick(()=>{this.isDestroyed||(this.update(),this.autofocusFields(!0))})},getHeaderElement(){return this.root.querySelector(":scope > [x-ref=tabsHeader]")},getOverflowPanel(){return this.getHeaderElement().querySelector(":scope > .fi-dropdown > [x-ref=overflowPanel]")},getTabElements(){return Array.from(this.getHeaderElement().querySelectorAll(":scope > [x-ref=tablist] > [data-tab-key]"))},isAvailable(i){return i.dataset.tabAvailable!=="false"&&!i.disabled&&i.getAttribute("aria-disabled")!=="true"},getTabs(){return this.getTabElements().filter(i=>this.isAvailable(i)).map(i=>i.dataset.tabKey)},getDefaultTab(){let i=this.getTabElements()[t-1];return i&&this.isAvailable(i)?i.dataset.tabKey:this.getTabs()[0]??null},isTabSelected(i){return this.tab===i&&this.availableTabs.includes(i)},getVisibleTabs(){return this.getTabElements().filter(i=>this.isAvailable(i)&&i.checkVisibility())},getOverflowTrigger(){return Array.from(this.getHeaderElement().querySelectorAll("[data-tabs-overflow-trigger]")).find(i=>i.checkVisibility())},getTabFocusTarget(i){return e?this.getTabElements().find(l=>l.dataset.tabKey===i&&this.isAvailable(l)):this.getVisibleTabs().find(l=>l.dataset.tabKey===i)??this.getOverflowTrigger()},getTabIndex(i){if(!e)return 0;let l=this.availableTabs,s=l.includes(this.focusedTab)?this.focusedTab:l.includes(this.tab)?this.tab:l[0];return i===s?0:-1},handleKeydown(i){if(!e||!this.getTabElements().includes(i.target))return;if(i.key==="Escape"&&this.isOverflowOpen){i.preventDefault(),i.stopPropagation(),this.dismissOverflow();return}let l=this.getTabElements().filter(v=>this.isAvailable(v)),s=l.indexOf(i.target),u=getComputedStyle(i.target.parentElement).direction==="rtl",p=a?"ArrowUp":u?"ArrowRight":"ArrowLeft",y=a?"ArrowDown":u?"ArrowLeft":"ArrowRight",b;if(i.key===p)b=(s-1+l.length)%l.length;else if(i.key===y)b=(s+1)%l.length;else if(i.key==="Home")b=0;else if(i.key==="End")b=l.length-1;else return;i.preventDefault(),this.focusTab(l[b]?.dataset.tabKey)},focusTab(i){let l=this.getTabFocusTarget(i);if(l){if(e&&this.overflowTabs.includes(i)){this.pendingOverflowFocus=l,this.openOverflow();return}this.closeOverflow(),l.focus({preventScroll:!0}),l.scrollIntoView({block:"nearest",inline:"nearest"})}},toggleOverflow(){if(this.isOverflowOpen){this.dismissOverflow();return}this.focusTab(this.overflowTabs.includes(this.tab)&&this.availableTabs.includes(this.tab)?this.tab:this.overflowTabs.find(i=>this.availableTabs.includes(i)))},openOverflow(){!e||o||this.isDestroyed||(this.isOverflowOpen=!0,this.$nextTick(()=>{!this.isDestroyed&&this.isOverflowOpen&&this.syncOverflowPosition()}))},closeOverflow(){this.isOverflowOpen=!1,this.pendingOverflowFocus=null,this.overflowTouchY=null,this.overflowPositionVersion++,this.cleanupOverflowPosition?.(),this.cleanupOverflowPosition=null,this.overflowReference=null},dismissOverflow(){if(!this.isOverflowOpen)return;let i=this.getVisibleTabs().filter(s=>!this.overflowTabs.includes(s.dataset.tabKey));(i.find(s=>s.dataset.tabKey===this.tab)??i.at(-1)??Array.from(this.root.children).find(s=>s.getAttribute("role")==="tabpanel"&&s.checkVisibility()))?.focus({preventScroll:!0}),this.closeOverflow()},scrollOverflow(i){if(!this.isOverflowOpen||i.type==="wheel"&&i.ctrlKey||!this.overflowTabs.includes(i.target.closest("[data-tab-key]")?.dataset.tabKey))return;let l=this.getOverflowPanel();if(i.type!=="wheel"&&i.touches.length!==1){this.overflowTouchY=null;return}if(i.type==="touchstart"||i.type==="touchmove"&&this.overflowTouchY===null){this.overflowTouchY=i.touches[0].clientY;return}let s=1;if(i.type==="wheel")if(i.deltaMode===WheelEvent.DOM_DELTA_LINE){let p=getComputedStyle(i.target.closest("[data-tab-key]"));s=parseFloat(p.lineHeight)||parseFloat(p.fontSize)*1.2}else i.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(s=l.clientHeight);let u=i.type==="wheel"?i.deltaY*s:this.overflowTouchY-i.touches[0].clientY;i.type==="touchmove"&&(this.overflowTouchY=i.touches[0].clientY),(u>0&&l.scrollTop+l.clientHeight<l.scrollHeight||u<0&&l.scrollTop>0)&&(i.preventDefault(),l.scrollTop+=u)},syncOverflowPosition(){let i=this.getOverflowTrigger();if(!i||!this.overflowTabs.some(l=>this.availableTabs.includes(l))){this.closeOverflow();return}this.overflowReference!==i?(this.cleanupOverflowPosition?.(),this.overflowReference=i,this.cleanupOverflowPosition=Jt(i,this.getOverflowPanel(),()=>this.positionOverflow())):this.positionOverflow()},async positionOverflow(){let i=++this.overflowPositionVersion,l=this.getOverflowPanel(),s=this.overflowReference;if(!this.isOverflowOpen||!s||!l?.checkVisibility())return;let u=await Tt(s,l,{strategy:"fixed",placement:getComputedStyle(s).direction==="rtl"?"bottom-end":"bottom-start",middleware:[xt(8),Qt(),Zt({padding:8,crossAxis:!0}),Ot({padding:8,apply:({availableHeight:d})=>{let w=`${Math.max(0,d)}px`;l.style.maxHeight!==w&&(l.style.maxHeight=w)}})]});if(this.isDestroyed||!this.isOverflowOpen||!l.checkVisibility()||i!==this.overflowPositionVersion)return;for(let[d,w]of Object.entries({left:u.x,top:u.y})){let O=`${w}px`;l.style[d]!==O&&(l.style[d]=O)}let p=new Map(Array.from(l.querySelectorAll("[data-tab-menu-key]"),d=>[d.dataset.tabMenuKey,d])),y=p.get(this.pendingOverflowFocus?.dataset.tabKey),b=l.getBoundingClientRect();if(y){let d=y.getBoundingClientRect(),w=b.height/l.offsetHeight;d.top<b.top?l.scrollTop+=(d.top-b.top)/w:d.bottom>b.bottom&&(l.scrollTop+=(d.bottom-b.bottom)/w)}for(let d of this.getTabElements()){if(!this.overflowTabs.includes(d.dataset.tabKey))continue;let w=p.get(d.dataset.tabKey);if(!w?.checkVisibility())continue;let O=w.getBoundingClientRect(),T=await Tt(w,d,{strategy:"fixed",placement:"bottom-start",middleware:[xt(({rects:A})=>-A.reference.height),Ot({apply:({rects:A})=>{for(let E of["width","height"]){let C=`--tab-overflow-${E}`,L=`${A.reference[E]}px`;d.style.getPropertyValue(C)!==L&&d.style.setProperty(C,L)}}})]});if(this.isDestroyed||!this.isOverflowOpen||i!==this.overflowPositionVersion)return;for(let[A,E]of Object.entries({left:T.x,top:T.y})){let C=`--tab-overflow-${A}`,L=`${E}px`;d.style.getPropertyValue(C)!==L&&d.style.setProperty(C,L)}let x=O.height/parseFloat(d.style.getPropertyValue("--tab-overflow-height")),S=`inset(${Math.max(0,b.top-O.top)/x}px 0 ${Math.max(0,O.bottom-b.bottom)/x}px 0)`;d.style.getPropertyValue("--tab-overflow-clip-path")!==S&&d.style.setProperty("--tab-overflow-clip-path",S)}let v=this.pendingOverflowFocus;this.pendingOverflowFocus=null,v?.isConnected&&this.isAvailable(v)&&v.focus({preventScroll:!0})},selectTab(i,l=null,s=!1){if(!this.getTabs().includes(i))return!1;let u=this.getTabElements().find(p=>p.dataset.tabKey===i);return this.selectionFocus={key:i,element:s?this.getOverflowTrigger():u,autofocus:!s&&!this.overflowTabs.includes(i)&&l?.detail>0,returnToHeader:s||l?.detail===0},f||(this.tab=i),this.scheduleUpdate(),!0},finishSelection(){let i=this.selectionFocus;!i||i.key!==this.tab||(this.selectionFocus=null,!(document.activeElement!==i.element&&!(document.activeElement===document.body&&!i.element?.checkVisibility()))&&(i.autofocus?this.autofocusFields(!1,i.element):i.returnToHeader&&this.focusTab(i.key)))},scheduleUpdate(i=!1){this.shouldMeasureOverflow||(this.shouldMeasureOverflow=i),!(this.isDestroyed||this.animationFrame!==null)&&(this.animationFrame=requestAnimationFrame(()=>{this.animationFrame=null,this.isDestroyed||this.update()}))},update(){if(f){let s=this.$refs.tabsData.dataset.activeTab;this.tab!==s&&(this.tab=s),this.pendingServerTab===s&&(this.pendingServerTab=null)}let i=this.getTabs();this.availableTabs=i;let l=this.tab;if(e&&!i.includes(this.tab)&&i.length){let s=this.getDefaultTab();l=s,this.selectionFocus=null,f?this.pendingServerTab!==s&&(this.pendingServerTab=s,this.$wire.$set(f,s===""?null:s)):this.tab=s}this.shouldMeasureOverflow&&(e&&this.isOverflowOpen&&!this.pendingOverflowFocus&&this.getTabElements().includes(document.activeElement)&&(this.pendingOverflowFocus=document.activeElement),this.shouldMeasureOverflow=!1,this.updateOverflow()),this.hasVisibleTabHeaders=this.getTabElements().some(s=>s.dataset.tabAvailable!=="false"&&(e||!this.overflowTabs.includes(s.dataset.tabKey))),this.$nextTick(()=>{if(this.isDestroyed)return;e&&!this.isOverflowOpen&&this.getTabElements().includes(document.activeElement)&&this.isAvailable(document.activeElement)&&this.overflowTabs.includes(document.activeElement.dataset.tabKey)&&(this.pendingOverflowFocus=document.activeElement,this.openOverflow()),this.isOverflowOpen&&this.syncOverflowPosition(),this.finishSelection();let s=this.lastFocusedElement;if(s&&(this.lastFocusedTabset===this.root||this.lastFocusedPanel&&!this.lastFocusedPanel.checkVisibility())&&(!s.checkVisibility()||this.getTabElements().includes(s)&&!this.isAvailable(s))&&(document.activeElement===s||document.activeElement===document.body)){this.lastFocusedElement=null;let u=!e&&this.overflowTabs.includes(s.dataset.tabKey)?this.getOverflowTrigger():this.getTabFocusTarget(l);e?this.focusTab(u?.dataset.tabKey??this.availableTabs[0]):(u??this.getVisibleTabs()[0])?.focus()}this.shouldAutofocusAfterUpdate&&(this.shouldAutofocusAfterUpdate=!1,this.autofocusFields())})},updateOverflow(){if(o||this.isDestroyed)return;let i=this.getHeaderElement(),l=i.querySelector("[data-tabs-overflow-ellipsis]"),s=this.getTabElements(),u=Array.from(i.querySelectorAll("[data-tabs-overflow-trigger]")),p=[...s,...u],y=p.map(d=>d.style.display),b=s.map(d=>[d.classList.contains("fi-sc-tabs-header-overflow"),d.classList.contains("fi-sc-tabs-header-overflow-open")]);s.forEach(d=>d.classList.remove("fi-sc-tabs-header-overflow","fi-sc-tabs-header-overflow-open")),s.forEach(d=>d.style.display=""),u.forEach(d=>d.style.display=d===l?"":"none"),i.offsetHeight;let v=s.length?this.findOverflowIndex(i,s,l):-1;p.forEach((d,w)=>d.style.display=y[w]),s.forEach((d,w)=>{d.classList.toggle("fi-sc-tabs-header-overflow",b[w][0]),d.classList.toggle("fi-sc-tabs-header-overflow-open",b[w][1])}),this.overflowTabs=v===-1?[]:s.slice(v).map(d=>d.dataset.tabKey),this.overflowReady=!0,this.overflowTabs.length||(e?this.closeOverflow():Alpine.$data(l.closest(".fi-dropdown")).close())},findOverflowIndex(i,l,s){let u=getComputedStyle(i),p=getComputedStyle(l[0]),y=Math.floor(i.clientWidth)-Math.ceil(parseFloat(u.paddingLeft))*2,b=Math.ceil(parseFloat(u.columnGap)),v=Math.ceil(s.querySelector(".fi-icon").clientWidth),d=Math.ceil(parseFloat(p.columnGap)||8),w=Math.ceil(parseFloat(p.paddingLeft))+Math.ceil(parseFloat(p.paddingRight)),O=l.map(x=>Math.ceil(x.clientWidth)),T=l.map(x=>{let S=Math.ceil(x.querySelector(".fi-tabs-item-label").clientWidth),A=x.querySelector(".fi-badge"),E=A?Math.ceil(A.clientWidth):0;return S+(E>0?d+E:0)});for(let x=0;x<l.length;x++){let S=O.slice(0,x+1).reduce((C,L)=>C+L,0),A=T.slice(x+1),E=A.length?w+Math.max(...A)+d+v+b:0;if(S+x*b+E>y)return x}return-1},updateQueryString(){if(!r||!this.getTabs().includes(this.tab))return;let i=new URL(window.location.href);i.searchParams.set(h,this.tab),history.replaceState(null,document.title,i.toString())},autofocusFields(i=!1,l=null){this.$nextTick(()=>{if(this.isDestroyed||l&&document.activeElement!==l||i&&document.activeElement&&document.activeElement!==document.body&&(this.root.contains(document.activeElement)||this.root.compareDocumentPosition(document.activeElement)&Node.DOCUMENT_POSITION_PRECEDING))return;let s=Array.from(this.root.querySelectorAll(".fi-sc-tabs-tab.fi-active")).filter(u=>u.closest(".fi-sc-tabs")===this.root&&u.checkVisibility());for(let u of s.flatMap(p=>Array.from(p.querySelectorAll("[autofocus]"))))if(u.focus(),document.activeElement===u)break})},revealTab(i){this.selectionFocus=null,f||(this.tab=i),this.autofocusFields()},destroy(){this.isDestroyed=!0,this.closeOverflow(),this.observer?.disconnect(),this.resizeObserver?.disconnect(),this.unsubscribeLivewireHook?.(),cancelAnimationFrame(this.animationFrame),document.removeEventListener("focusin",this.boundFocusHandler),window.removeEventListener("reset-schema-component-state",this.boundResetHandler)}}}export{Re as default};
@@ -0,0 +1 @@
1
+ function u({isSkippable:r,isStepPersistedInQueryString:n,livewireId:d,schemaKey:c,startStep:o,stepQueryStringKey:h}){let l;return{boundResetHandler:null,step:null,init(){l=this.$nextStep;let t=this.getSteps(),e=new URLSearchParams(window.location.search).get(h);this.step=n&&t.includes(e)?e:t.at(o-1),this.$watch("step",()=>{this.updateQueryString(),this.autofocusFields()}),this.autofocusFields(!0),this.boundResetHandler=s=>{s.detail.livewireId!==d||s.detail.schemaKey!==c||n||this.$nextTick(()=>{this.step=this.getSteps().at(o-1)??this.step})},window.addEventListener("reset-schema-component-state",this.boundResetHandler)},async requestNextStep(){await l({currentStepIndex:this.getStepIndex(this.step),currentStepKey:this.step})},goToNextStep(t=null,e=null){if(!(e!==null&&this.step!==e)){if(t===null){let s=this.getStepIndex(this.step);if(s===-1)return;t=this.getSteps()[s+1]}this.getSteps().includes(t)&&(this.step=t,this.scroll())}},goToPreviousStep(){let t=this.getStepIndex(this.step)-1;t<0||(this.step=this.getSteps()[t],this.scroll())},goToStep(t){let e=this.getStepIndex(t);e<=-1||!r&&e>this.getStepIndex(this.step)||(this.step=t,this.scroll())},scroll(){this.$nextTick(()=>{this.$refs.header?.children[this.getStepIndex(this.step)].scrollIntoView({behavior:"smooth",block:"start"})})},autofocusFields(t=!1){this.$nextTick(()=>{let e=this.$el.closest(".fi-sc-wizard");if(t&&document.activeElement&&document.activeElement!==document.body&&e.compareDocumentPosition(document.activeElement)&Node.DOCUMENT_POSITION_PRECEDING)return;let s=Array.from(e.children).find(i=>i.getAttribute("x-ref")===`step-${this.step}`)?.querySelectorAll("[autofocus]")??[];for(let i of s)if(i.focus(),document.activeElement===i)break})},getStepIndex(t){return this.getSteps().findIndex(e=>e===t)},getSteps(){return JSON.parse(this.$refs.stepsData.value)},isFirstStep(){return this.getStepIndex(this.step)<=0},isLastStep(){return this.getStepIndex(this.step)+1>=this.getSteps().length},isStepAccessible(t){return this.getStepIndex(t)!==-1&&(r||this.getStepIndex(this.step)>this.getStepIndex(t))},updateQueryString(){if(!n)return;let t=new URL(window.location.href);t.searchParams.set(h,this.step),history.replaceState(null,document.title,t.toString())},destroy(){this.boundResetHandler&&window.removeEventListener("reset-schema-component-state",this.boundResetHandler)}}}export{u as default};
@@ -0,0 +1 @@
1
+ (()=>{var f=()=>({isSticky:!1,width:0,resizeObserver:null,boundUpdateWidth:null,init(){let i=this.$el.parentElement;i&&(this.updateWidth(),this.resizeObserver=new ResizeObserver(()=>this.updateWidth()),this.resizeObserver.observe(i),this.boundUpdateWidth=this.updateWidth.bind(this),window.addEventListener("resize",this.boundUpdateWidth))},enableSticky(){this.isSticky=this.$el.getBoundingClientRect().top>0},disableSticky(){this.isSticky=!1},updateWidth(){let i=this.$el.parentElement;if(!i)return;let e=getComputedStyle(this.$root.querySelector(".fi-ac"));this.width=i.offsetWidth+parseInt(e.marginInlineStart,10)*-1+parseInt(e.marginInlineEnd,10)*-1},destroy(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.boundUpdateWidth&&(window.removeEventListener("resize",this.boundUpdateWidth),this.boundUpdateWidth=null)}});var u=function(i,e,r){let t=i;if(e.startsWith("/")&&(r=!0,e=e.slice(1)),r)return e;for(;e.startsWith("../");)t=t.includes(".")?t.slice(0,t.lastIndexOf(".")):null,e=e.slice(3);return["",null,void 0].includes(t)?e:["",null,void 0].includes(e)?t:`${t}.${e}`},p=new Set(["$el","$refs","$store","$watch","$dispatch","$nextTick","$root","$data","$id","$event","$focus","$persist","$tooltip","$js","$anchor","$queryString","$wire","$get","$set","$state","$statePath","$callSchemaComponentMethod","$schemaComponentMethods"]);function c({key:i,exposedMethods:e=[],path:r,containerPath:t}){let n=this.$wire,s=(o,a={},d={})=>Livewire.fireAction(n.__instance,"callSchemaComponentMethod",[i,o,a],d),l=Object.fromEntries(e.filter(o=>!p.has(`$${o}`)).map(o=>[`$${o}`,(a={})=>s(o,a)]));return{...l,$schemaComponentMethods:l,$callSchemaComponentMethod:s,$statePath:r,$get:(o,a)=>n.$get(u(t,o,a)),$set:(o,a,d,m=!1)=>n.$set(u(t,o,d),a,m),get $state(){return n.$get(r)}}}var $=i=>{let e=Alpine.findClosest(i,r=>r.__livewire);if(!e)throw"Could not find Livewire component in DOM tree.";return e.__livewire},h=!1;document.addEventListener("invalid",i=>{let e=i.target;if(!e.closest("[data-field-wrapper]")||e.offsetParent!==null&&getComputedStyle(e).visibility!=="hidden"||(i.preventDefault(),h)||Array.from(e.form?.elements??[]).some(t=>t.willValidate&&!t.validity.valid&&t.offsetParent!==null&&getComputedStyle(t).visibility!=="hidden"))return;h=!0;let r=e;for(;r;)r.dispatchEvent(new CustomEvent("expand")),r=r.parentNode;requestAnimationFrame(()=>requestAnimationFrame(()=>{e.form?.reportValidity(),setTimeout(()=>h=!1,100)}))},!0);document.addEventListener("alpine:init",()=>{window.Alpine.data("filamentSchema",({livewireId:i,schemaKey:e,isLoadingDeferred:r=!1})=>({intersectionObserver:null,isLoadingDeferredSchema:!1,init(){r&&(this.intersectionObserver=new IntersectionObserver(async t=>{if(!(!t[0]?.isIntersecting||this.isLoadingDeferredSchema)){this.isLoadingDeferredSchema=!0;try{await this.$wire.loadDeferredSchema(e),this.intersectionObserver?.disconnect()}catch{}finally{this.isLoadingDeferredSchema=!1}}}),this.intersectionObserver.observe(this.$el))},handleFormValidationError(t){t.detail.livewireId===i&&this.$nextTick(()=>{let n=this.$el.querySelector("[data-validation-error]");if(!n)return;let s=n;for(;s;)s.dispatchEvent(new CustomEvent("expand")),s=s.parentNode;setTimeout(()=>{n.isConnected&&n.closest("[data-field-wrapper]")?.scrollIntoView({behavior:"smooth",block:"start",inline:"start"})},200)})},handleClientSideStateReset(t){t.detail.livewireId!==i||t.detail.schemaKey!==e||this.$nextTick(()=>{let n=this.$el.querySelectorAll("[autofocus]");for(let s of n)if(s.offsetParent!==null&&(s.focus(),document.activeElement===s))break})},isStateChanged(t,n){if(t===void 0)return!1;try{return JSON.stringify(t)!==JSON.stringify(n)}catch{return t!==n}},destroy(){this.intersectionObserver?.disconnect()}})),window.Alpine.data("filamentSchemaComponent",c),window.Alpine.data("filamentActionsSchemaComponent",f),Livewire.interceptMessage(({message:i,onSuccess:e})=>{e(({payload:r})=>{let t=i.component;t.el.isConnected&&r.effects?.dispatches?.forEach(n=>{if(!n.params?.awaitSchemaComponent)return;let s=Array.from(i.component.el.querySelectorAll(`[wire\\:partial="schema-component::${n.params.awaitSchemaComponent}"]`)).filter(a=>$(a)===i.component);if(s.length===1)return;if(s.length>1)throw`Multiple schema components found with key [${n.params.awaitSchemaComponent}].`;let l=`schema-component-${t.id}-${n.params.awaitSchemaComponent}-loaded`,o=()=>{window.dispatchEvent(new CustomEvent(n.name,{detail:n.params}))};window.addEventListener(l,o,{once:!0}),t.addCleanup(()=>window.removeEventListener(l,o))})})})});})();