@stackoverflow/stacks 1.6.2 → 1.6.3

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.
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Stacks=t():e.Stacks=t()}(globalThis,(()=>(()=>{"use strict";var e={492:(e,t,n)=>{n.r(t),n.d(t,{afterMain:()=>O,afterRead:()=>g,afterWrite:()=>P,applyStyles:()=>M,arrow:()=>$,auto:()=>a,basePlacements:()=>c,beforeMain:()=>w,beforeRead:()=>y,beforeWrite:()=>A,bottom:()=>o,clippingParents:()=>p,computeStyles:()=>ne,createPopper:()=>Le,createPopperBase:()=>_e,createPopperLite:()=>Me,detectOverflow:()=>ye,end:()=>l,eventListeners:()=>oe,flip:()=>be,hide:()=>Ee,left:()=>s,main:()=>E,modifierPhases:()=>x,offset:()=>Oe,placements:()=>v,popper:()=>d,popperGenerator:()=>ke,popperOffsets:()=>Ae,preventOverflow:()=>Te,read:()=>b,reference:()=>h,right:()=>i,start:()=>u,top:()=>r,variationPlacements:()=>m,viewport:()=>f,write:()=>T});var r="top",o="bottom",i="right",s="left",a="auto",c=[r,o,i,s],u="start",l="end",p="clippingParents",f="viewport",d="popper",h="reference",m=c.reduce((function(e,t){return e.concat([t+"-"+u,t+"-"+l])}),[]),v=[].concat(c,[a]).reduce((function(e,t){return e.concat([t,t+"-"+u,t+"-"+l])}),[]),y="beforeRead",b="read",g="afterRead",w="beforeMain",E="main",O="afterMain",A="beforeWrite",T="write",P="afterWrite",x=[y,b,g,w,E,O,A,T,P];function j(e){return e?(e.nodeName||"").toLowerCase():null}function C(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function k(e){return e instanceof C(e).Element||e instanceof Element}function _(e){return e instanceof C(e).HTMLElement||e instanceof HTMLElement}function L(e){return"undefined"!=typeof ShadowRoot&&(e instanceof C(e).ShadowRoot||e instanceof ShadowRoot)}const M={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];_(o)&&j(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});_(r)&&j(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function S(e){return e.split("-")[0]}var B=Math.max,D=Math.min,F=Math.round;function N(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function I(){return!/^((?!chrome|android).)*safari/i.test(N())}function V(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&_(e)&&(o=e.offsetWidth>0&&F(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&F(r.height)/e.offsetHeight||1);var s=(k(e)?C(e):window).visualViewport,a=!I()&&n,c=(r.left+(a&&s?s.offsetLeft:0))/o,u=(r.top+(a&&s?s.offsetTop:0))/i,l=r.width/o,p=r.height/i;return{width:l,height:p,top:u,right:c+l,bottom:u+p,left:c,x:c,y:u}}function H(e){var t=V(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function K(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&L(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function R(e){return C(e).getComputedStyle(e)}function U(e){return["table","td","th"].indexOf(j(e))>=0}function W(e){return((k(e)?e.ownerDocument:e.document)||window.document).documentElement}function q(e){return"html"===j(e)?e:e.assignedSlot||e.parentNode||(L(e)?e.host:null)||W(e)}function z(e){return _(e)&&"fixed"!==R(e).position?e.offsetParent:null}function X(e){for(var t=C(e),n=z(e);n&&U(n)&&"static"===R(n).position;)n=z(n);return n&&("html"===j(n)||"body"===j(n)&&"static"===R(n).position)?t:n||function(e){var t=/firefox/i.test(N());if(/Trident/i.test(N())&&_(e)&&"fixed"===R(e).position)return null;var n=q(e);for(L(n)&&(n=n.host);_(n)&&["html","body"].indexOf(j(n))<0;){var r=R(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function Y(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function J(e,t,n){return B(e,D(t,n))}function Z(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function G(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}const $={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,a=e.name,u=e.options,l=n.elements.arrow,p=n.modifiersData.popperOffsets,f=S(n.placement),d=Y(f),h=[s,i].indexOf(f)>=0?"height":"width";if(l&&p){var m=function(e,t){return Z("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:G(e,c))}(u.padding,n),v=H(l),y="y"===d?r:s,b="y"===d?o:i,g=n.rects.reference[h]+n.rects.reference[d]-p[d]-n.rects.popper[h],w=p[d]-n.rects.reference[d],E=X(l),O=E?"y"===d?E.clientHeight||0:E.clientWidth||0:0,A=g/2-w/2,T=m[y],P=O-v[h]-m[b],x=O/2-v[h]/2+A,j=J(T,x,P),C=d;n.modifiersData[a]=((t={})[C]=j,t.centerOffset=j-x,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&K(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Q(e){return e.split("-")[1]}var ee={top:"auto",right:"auto",bottom:"auto",left:"auto"};function te(e){var t,n=e.popper,a=e.popperRect,c=e.placement,u=e.variation,p=e.offsets,f=e.position,d=e.gpuAcceleration,h=e.adaptive,m=e.roundOffsets,v=e.isFixed,y=p.x,b=void 0===y?0:y,g=p.y,w=void 0===g?0:g,E="function"==typeof m?m({x:b,y:w}):{x:b,y:w};b=E.x,w=E.y;var O=p.hasOwnProperty("x"),A=p.hasOwnProperty("y"),T=s,P=r,x=window;if(h){var j=X(n),k="clientHeight",_="clientWidth";j===C(n)&&"static"!==R(j=W(n)).position&&"absolute"===f&&(k="scrollHeight",_="scrollWidth"),(c===r||(c===s||c===i)&&u===l)&&(P=o,w-=(v&&j===x&&x.visualViewport?x.visualViewport.height:j[k])-a.height,w*=d?1:-1),c!==s&&(c!==r&&c!==o||u!==l)||(T=i,b-=(v&&j===x&&x.visualViewport?x.visualViewport.width:j[_])-a.width,b*=d?1:-1)}var L,M=Object.assign({position:f},h&&ee),S=!0===m?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:F(t*r)/r||0,y:F(n*r)/r||0}}({x:b,y:w}):{x:b,y:w};return b=S.x,w=S.y,d?Object.assign({},M,((L={})[P]=A?"0":"",L[T]=O?"0":"",L.transform=(x.devicePixelRatio||1)<=1?"translate("+b+"px, "+w+"px)":"translate3d("+b+"px, "+w+"px, 0)",L)):Object.assign({},M,((t={})[P]=A?w+"px":"",t[T]=O?b+"px":"",t.transform="",t))}const ne={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,s=void 0===i||i,a=n.roundOffsets,c=void 0===a||a,u={placement:S(t.placement),variation:Q(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,te(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,te(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var re={passive:!0};const oe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,s=r.resize,a=void 0===s||s,c=C(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach((function(e){e.addEventListener("scroll",n.update,re)})),a&&c.addEventListener("resize",n.update,re),function(){i&&u.forEach((function(e){e.removeEventListener("scroll",n.update,re)})),a&&c.removeEventListener("resize",n.update,re)}},data:{}};var ie={left:"right",right:"left",bottom:"top",top:"bottom"};function se(e){return e.replace(/left|right|bottom|top/g,(function(e){return ie[e]}))}var ae={start:"end",end:"start"};function ce(e){return e.replace(/start|end/g,(function(e){return ae[e]}))}function ue(e){var t=C(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function le(e){return V(W(e)).left+ue(e).scrollLeft}function pe(e){var t=R(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function fe(e){return["html","body","#document"].indexOf(j(e))>=0?e.ownerDocument.body:_(e)&&pe(e)?e:fe(q(e))}function de(e,t){var n;void 0===t&&(t=[]);var r=fe(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=C(r),s=o?[i].concat(i.visualViewport||[],pe(r)?r:[]):r,a=t.concat(s);return o?a:a.concat(de(q(s)))}function he(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function me(e,t,n){return t===f?he(function(e,t){var n=C(e),r=W(e),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,c=0;if(o){i=o.width,s=o.height;var u=I();(u||!u&&"fixed"===t)&&(a=o.offsetLeft,c=o.offsetTop)}return{width:i,height:s,x:a+le(e),y:c}}(e,n)):k(t)?function(e,t){var n=V(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):he(function(e){var t,n=W(e),r=ue(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=B(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=B(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+le(e),c=-r.scrollTop;return"rtl"===R(o||n).direction&&(a+=B(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:c}}(W(e)))}function ve(e){var t,n=e.reference,a=e.element,c=e.placement,p=c?S(c):null,f=c?Q(c):null,d=n.x+n.width/2-a.width/2,h=n.y+n.height/2-a.height/2;switch(p){case r:t={x:d,y:n.y-a.height};break;case o:t={x:d,y:n.y+n.height};break;case i:t={x:n.x+n.width,y:h};break;case s:t={x:n.x-a.width,y:h};break;default:t={x:n.x,y:n.y}}var m=p?Y(p):null;if(null!=m){var v="y"===m?"height":"width";switch(f){case u:t[m]=t[m]-(n[v]/2-a[v]/2);break;case l:t[m]=t[m]+(n[v]/2-a[v]/2)}}return t}function ye(e,t){void 0===t&&(t={});var n=t,s=n.placement,a=void 0===s?e.placement:s,u=n.strategy,l=void 0===u?e.strategy:u,m=n.boundary,v=void 0===m?p:m,y=n.rootBoundary,b=void 0===y?f:y,g=n.elementContext,w=void 0===g?d:g,E=n.altBoundary,O=void 0!==E&&E,A=n.padding,T=void 0===A?0:A,P=Z("number"!=typeof T?T:G(T,c)),x=w===d?h:d,C=e.rects.popper,L=e.elements[O?x:w],M=function(e,t,n,r){var o="clippingParents"===t?function(e){var t=de(q(e)),n=["absolute","fixed"].indexOf(R(e).position)>=0&&_(e)?X(e):e;return k(n)?t.filter((function(e){return k(e)&&K(e,n)&&"body"!==j(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),s=i[0],a=i.reduce((function(t,n){var o=me(e,n,r);return t.top=B(o.top,t.top),t.right=D(o.right,t.right),t.bottom=D(o.bottom,t.bottom),t.left=B(o.left,t.left),t}),me(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(k(L)?L:L.contextElement||W(e.elements.popper),v,b,l),S=V(e.elements.reference),F=ve({reference:S,element:C,strategy:"absolute",placement:a}),N=he(Object.assign({},C,F)),I=w===d?N:S,H={top:M.top-I.top+P.top,bottom:I.bottom-M.bottom+P.bottom,left:M.left-I.left+P.left,right:I.right-M.right+P.right},U=e.modifiersData.offset;if(w===d&&U){var z=U[a];Object.keys(H).forEach((function(e){var t=[i,o].indexOf(e)>=0?1:-1,n=[r,o].indexOf(e)>=0?"y":"x";H[e]+=z[n]*t}))}return H}const be={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,l=e.name;if(!t.modifiersData[l]._skip){for(var p=n.mainAxis,f=void 0===p||p,d=n.altAxis,h=void 0===d||d,y=n.fallbackPlacements,b=n.padding,g=n.boundary,w=n.rootBoundary,E=n.altBoundary,O=n.flipVariations,A=void 0===O||O,T=n.allowedAutoPlacements,P=t.options.placement,x=S(P),j=y||(x!==P&&A?function(e){if(S(e)===a)return[];var t=se(e);return[ce(e),t,ce(t)]}(P):[se(P)]),C=[P].concat(j).reduce((function(e,n){return e.concat(S(n)===a?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,a=n.flipVariations,u=n.allowedAutoPlacements,l=void 0===u?v:u,p=Q(r),f=p?a?m:m.filter((function(e){return Q(e)===p})):c,d=f.filter((function(e){return l.indexOf(e)>=0}));0===d.length&&(d=f);var h=d.reduce((function(t,n){return t[n]=ye(e,{placement:n,boundary:o,rootBoundary:i,padding:s})[S(n)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}(t,{placement:n,boundary:g,rootBoundary:w,padding:b,flipVariations:A,allowedAutoPlacements:T}):n)}),[]),k=t.rects.reference,_=t.rects.popper,L=new Map,M=!0,B=C[0],D=0;D<C.length;D++){var F=C[D],N=S(F),I=Q(F)===u,V=[r,o].indexOf(N)>=0,H=V?"width":"height",K=ye(t,{placement:F,boundary:g,rootBoundary:w,altBoundary:E,padding:b}),R=V?I?i:s:I?o:r;k[H]>_[H]&&(R=se(R));var U=se(R),W=[];if(f&&W.push(K[N]<=0),h&&W.push(K[R]<=0,K[U]<=0),W.every((function(e){return e}))){B=F,M=!1;break}L.set(F,W)}if(M)for(var q=function(e){var t=C.find((function(t){var n=L.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return B=t,"break"},z=A?3:1;z>0&&"break"!==q(z);z--);t.placement!==B&&(t.modifiersData[l]._skip=!0,t.placement=B,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ge(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function we(e){return[r,i,o,s].some((function(t){return e[t]>=0}))}const Ee={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,s=ye(t,{elementContext:"reference"}),a=ye(t,{altBoundary:!0}),c=ge(s,r),u=ge(a,o,i),l=we(c),p=we(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:l,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":p})}},Oe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,o=e.name,a=n.offset,c=void 0===a?[0,0]:a,u=v.reduce((function(e,n){return e[n]=function(e,t,n){var o=S(e),a=[s,r].indexOf(o)>=0?-1:1,c="function"==typeof n?n(Object.assign({},t,{placement:e})):n,u=c[0],l=c[1];return u=u||0,l=(l||0)*a,[s,i].indexOf(o)>=0?{x:l,y:u}:{x:u,y:l}}(n,t.rects,c),e}),{}),l=u[t.placement],p=l.x,f=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=p,t.modifiersData.popperOffsets.y+=f),t.modifiersData[o]=u}},Ae={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ve({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},Te={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,a=e.name,c=n.mainAxis,l=void 0===c||c,p=n.altAxis,f=void 0!==p&&p,d=n.boundary,h=n.rootBoundary,m=n.altBoundary,v=n.padding,y=n.tether,b=void 0===y||y,g=n.tetherOffset,w=void 0===g?0:g,E=ye(t,{boundary:d,rootBoundary:h,padding:v,altBoundary:m}),O=S(t.placement),A=Q(t.placement),T=!A,P=Y(O),x="x"===P?"y":"x",j=t.modifiersData.popperOffsets,C=t.rects.reference,k=t.rects.popper,_="function"==typeof w?w(Object.assign({},t.rects,{placement:t.placement})):w,L="number"==typeof _?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),M=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(j){if(l){var N,I="y"===P?r:s,V="y"===P?o:i,K="y"===P?"height":"width",R=j[P],U=R+E[I],W=R-E[V],q=b?-k[K]/2:0,z=A===u?C[K]:k[K],Z=A===u?-k[K]:-C[K],G=t.elements.arrow,$=b&&G?H(G):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[I],ne=ee[V],re=J(0,C[K],$[K]),oe=T?C[K]/2-q-re-te-L.mainAxis:z-re-te-L.mainAxis,ie=T?-C[K]/2+q+re+ne+L.mainAxis:Z+re+ne+L.mainAxis,se=t.elements.arrow&&X(t.elements.arrow),ae=se?"y"===P?se.clientTop||0:se.clientLeft||0:0,ce=null!=(N=null==M?void 0:M[P])?N:0,ue=R+ie-ce,le=J(b?D(U,R+oe-ce-ae):U,R,b?B(W,ue):W);j[P]=le,F[P]=le-R}if(f){var pe,fe="x"===P?r:s,de="x"===P?o:i,he=j[x],me="y"===x?"height":"width",ve=he+E[fe],be=he-E[de],ge=-1!==[r,s].indexOf(O),we=null!=(pe=null==M?void 0:M[x])?pe:0,Ee=ge?ve:he-C[me]-k[me]-we+L.altAxis,Oe=ge?he+C[me]+k[me]-we-L.altAxis:be,Ae=b&&ge?function(e,t,n){var r=J(e,t,n);return r>n?n:r}(Ee,he,Oe):J(b?Ee:ve,he,b?Oe:be);j[x]=Ae,F[x]=Ae-he}t.modifiersData[a]=F}},requiresIfExists:["offset"]};function Pe(e,t,n){void 0===n&&(n=!1);var r,o,i=_(t),s=_(t)&&function(e){var t=e.getBoundingClientRect(),n=F(t.width)/e.offsetWidth||1,r=F(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),a=W(t),c=V(e,s,n),u={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&(("body"!==j(t)||pe(a))&&(u=(r=t)!==C(r)&&_(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:ue(r)),_(t)?((l=V(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=le(a))),{x:c.left+u.scrollLeft-l.x,y:c.top+u.scrollTop-l.y,width:c.width,height:c.height}}function xe(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var je={placement:"bottom",modifiers:[],strategy:"absolute"};function Ce(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function ke(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?je:o;return function(e,t,n){void 0===n&&(n=i);var o,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},je,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],u=!1,l={state:a,setOptions:function(n){var o="function"==typeof n?n(a.options):n;p(),a.options=Object.assign({},i,a.options,o),a.scrollParents={reference:k(e)?de(e):e.contextElement?de(e.contextElement):[],popper:de(t)};var s,u,f=function(e){var t=xe(e);return x.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((s=[].concat(r,a.options.modifiers),u=s.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(u).map((function(e){return u[e]}))));return a.orderedModifiers=f.filter((function(e){return e.enabled})),a.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:a,name:t,instance:l,options:r});c.push(i||function(){})}})),l.update()},forceUpdate:function(){if(!u){var e=a.elements,t=e.reference,n=e.popper;if(Ce(t,n)){a.rects={reference:Pe(t,X(n),"fixed"===a.options.strategy),popper:H(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(e){return a.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<a.orderedModifiers.length;r++)if(!0!==a.reset){var o=a.orderedModifiers[r],i=o.fn,s=o.options,c=void 0===s?{}:s,p=o.name;"function"==typeof i&&(a=i({state:a,options:c,name:p,instance:l})||a)}else a.reset=!1,r=-1}}},update:(o=function(){return new Promise((function(e){l.forceUpdate(),e(a)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(o())}))}))),s}),destroy:function(){p(),u=!0}};if(!Ce(e,t))return l;function p(){c.forEach((function(e){return e()})),c=[]}return l.setOptions(n).then((function(e){!u&&n.onFirstUpdate&&n.onFirstUpdate(e)})),l}}var _e=ke(),Le=ke({defaultModifiers:[oe,Ae,ne,M,Oe,be,Te,$,Ee]}),Me=ke({defaultModifiers:[oe,Ae,ne,M]})},708:(e,t,n)=>{n.r(t)},931:(e,t,n)=>{n.r(t),n.d(t,{Application:()=>U,Context:()=>A,Controller:()=>$,defaultSchema:()=>K});var r=function(){function e(e,t,n){this.eventTarget=e,this.eventName=t,this.eventOptions=n,this.unorderedBindings=new Set}return e.prototype.connect=function(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)},e.prototype.disconnect=function(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)},e.prototype.bindingConnected=function(e){this.unorderedBindings.add(e)},e.prototype.bindingDisconnected=function(e){this.unorderedBindings.delete(e)},e.prototype.handleEvent=function(e){for(var t=function(e){if("immediatePropagationStopped"in e)return e;var t=e.stopImmediatePropagation;return Object.assign(e,{immediatePropagationStopped:!1,stopImmediatePropagation:function(){this.immediatePropagationStopped=!0,t.call(this)}})}(e),n=0,r=this.bindings;n<r.length;n++){var o=r[n];if(t.immediatePropagationStopped)break;o.handleEvent(t)}},Object.defineProperty(e.prototype,"bindings",{get:function(){return Array.from(this.unorderedBindings).sort((function(e,t){var n=e.index,r=t.index;return n<r?-1:n>r?1:0}))},enumerable:!1,configurable:!0}),e}(),o=function(){function e(e){this.application=e,this.eventListenerMaps=new Map,this.started=!1}return e.prototype.start=function(){this.started||(this.started=!0,this.eventListeners.forEach((function(e){return e.connect()})))},e.prototype.stop=function(){this.started&&(this.started=!1,this.eventListeners.forEach((function(e){return e.disconnect()})))},Object.defineProperty(e.prototype,"eventListeners",{get:function(){return Array.from(this.eventListenerMaps.values()).reduce((function(e,t){return e.concat(Array.from(t.values()))}),[])},enumerable:!1,configurable:!0}),e.prototype.bindingConnected=function(e){this.fetchEventListenerForBinding(e).bindingConnected(e)},e.prototype.bindingDisconnected=function(e){this.fetchEventListenerForBinding(e).bindingDisconnected(e)},e.prototype.handleError=function(e,t,n){void 0===n&&(n={}),this.application.handleError(e,"Error "+t,n)},e.prototype.fetchEventListenerForBinding=function(e){var t=e.eventTarget,n=e.eventName,r=e.eventOptions;return this.fetchEventListener(t,n,r)},e.prototype.fetchEventListener=function(e,t,n){var r=this.fetchEventListenerMapForEventTarget(e),o=this.cacheKey(t,n),i=r.get(o);return i||(i=this.createEventListener(e,t,n),r.set(o,i)),i},e.prototype.createEventListener=function(e,t,n){var o=new r(e,t,n);return this.started&&o.connect(),o},e.prototype.fetchEventListenerMapForEventTarget=function(e){var t=this.eventListenerMaps.get(e);return t||(t=new Map,this.eventListenerMaps.set(e,t)),t},e.prototype.cacheKey=function(e,t){var n=[e];return Object.keys(t).sort().forEach((function(e){n.push((t[e]?"":"!")+e)})),n.join(":")},e}(),i=/^((.+?)(@(window|document))?->)?(.+?)(#([^:]+?))(:(.+))?$/;var s=function(){function e(e,t,n){this.element=e,this.index=t,this.eventTarget=n.eventTarget||e,this.eventName=n.eventName||function(e){var t=e.tagName.toLowerCase();if(t in a)return a[t](e)}(e)||c("missing event name"),this.eventOptions=n.eventOptions||{},this.identifier=n.identifier||c("missing identifier"),this.methodName=n.methodName||c("missing method name")}return e.forToken=function(e){return new this(e.element,e.index,(n=e.content,{eventTarget:(t=(o=n.trim().match(i)||[])[4],"window"==t?window:"document"==t?document:void 0),eventName:o[2],eventOptions:o[9]?(r=o[9],r.split(":").reduce((function(e,t){var n;return Object.assign(e,((n={})[t.replace(/^!/,"")]=!/^!/.test(t),n))}),{})):{},identifier:o[5],methodName:o[7]}));var t,n,r,o},e.prototype.toString=function(){var e=this.eventTargetName?"@"+this.eventTargetName:"";return""+this.eventName+e+"->"+this.identifier+"#"+this.methodName},Object.defineProperty(e.prototype,"eventTargetName",{get:function(){return(e=this.eventTarget)==window?"window":e==document?"document":void 0;var e},enumerable:!1,configurable:!0}),e}(),a={a:function(e){return"click"},button:function(e){return"click"},form:function(e){return"submit"},input:function(e){return"submit"==e.getAttribute("type")?"click":"input"},select:function(e){return"change"},textarea:function(e){return"input"}};function c(e){throw new Error(e)}var u=function(){function e(e,t){this.context=e,this.action=t}return Object.defineProperty(e.prototype,"index",{get:function(){return this.action.index},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"eventTarget",{get:function(){return this.action.eventTarget},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"eventOptions",{get:function(){return this.action.eventOptions},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.context.identifier},enumerable:!1,configurable:!0}),e.prototype.handleEvent=function(e){this.willBeInvokedByEvent(e)&&this.invokeWithEvent(e)},Object.defineProperty(e.prototype,"eventName",{get:function(){return this.action.eventName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"method",{get:function(){var e=this.controller[this.methodName];if("function"==typeof e)return e;throw new Error('Action "'+this.action+'" references undefined method "'+this.methodName+'"')},enumerable:!1,configurable:!0}),e.prototype.invokeWithEvent=function(e){try{this.method.call(this.controller,e)}catch(r){var t=this,n={identifier:t.identifier,controller:t.controller,element:t.element,index:t.index,event:e};this.context.handleError(r,'invoking action "'+this.action+'"',n)}},e.prototype.willBeInvokedByEvent=function(e){var t=e.target;return this.element===t||(t instanceof Element&&this.element.contains(t)?this.scope.containsElement(t):this.scope.containsElement(this.action.element))},Object.defineProperty(e.prototype,"controller",{get:function(){return this.context.controller},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"methodName",{get:function(){return this.action.methodName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.scope.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scope",{get:function(){return this.context.scope},enumerable:!1,configurable:!0}),e}(),l=function(){function e(e,t){var n=this;this.element=e,this.started=!1,this.delegate=t,this.elements=new Set,this.mutationObserver=new MutationObserver((function(e){return n.processMutations(e)}))}return e.prototype.start=function(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,childList:!0,subtree:!0}),this.refresh())},e.prototype.stop=function(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)},e.prototype.refresh=function(){if(this.started){for(var e=new Set(this.matchElementsInTree()),t=0,n=Array.from(this.elements);t<n.length;t++){var r=n[t];e.has(r)||this.removeElement(r)}for(var o=0,i=Array.from(e);o<i.length;o++)r=i[o],this.addElement(r)}},e.prototype.processMutations=function(e){if(this.started)for(var t=0,n=e;t<n.length;t++){var r=n[t];this.processMutation(r)}},e.prototype.processMutation=function(e){"attributes"==e.type?this.processAttributeChange(e.target,e.attributeName):"childList"==e.type&&(this.processRemovedNodes(e.removedNodes),this.processAddedNodes(e.addedNodes))},e.prototype.processAttributeChange=function(e,t){var n=e;this.elements.has(n)?this.delegate.elementAttributeChanged&&this.matchElement(n)?this.delegate.elementAttributeChanged(n,t):this.removeElement(n):this.matchElement(n)&&this.addElement(n)},e.prototype.processRemovedNodes=function(e){for(var t=0,n=Array.from(e);t<n.length;t++){var r=n[t],o=this.elementFromNode(r);o&&this.processTree(o,this.removeElement)}},e.prototype.processAddedNodes=function(e){for(var t=0,n=Array.from(e);t<n.length;t++){var r=n[t],o=this.elementFromNode(r);o&&this.elementIsActive(o)&&this.processTree(o,this.addElement)}},e.prototype.matchElement=function(e){return this.delegate.matchElement(e)},e.prototype.matchElementsInTree=function(e){return void 0===e&&(e=this.element),this.delegate.matchElementsInTree(e)},e.prototype.processTree=function(e,t){for(var n=0,r=this.matchElementsInTree(e);n<r.length;n++){var o=r[n];t.call(this,o)}},e.prototype.elementFromNode=function(e){if(e.nodeType==Node.ELEMENT_NODE)return e},e.prototype.elementIsActive=function(e){return e.isConnected==this.element.isConnected&&this.element.contains(e)},e.prototype.addElement=function(e){this.elements.has(e)||this.elementIsActive(e)&&(this.elements.add(e),this.delegate.elementMatched&&this.delegate.elementMatched(e))},e.prototype.removeElement=function(e){this.elements.has(e)&&(this.elements.delete(e),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(e))},e}(),p=function(){function e(e,t,n){this.attributeName=t,this.delegate=n,this.elementObserver=new l(e,this)}return Object.defineProperty(e.prototype,"element",{get:function(){return this.elementObserver.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selector",{get:function(){return"["+this.attributeName+"]"},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.elementObserver.start()},e.prototype.stop=function(){this.elementObserver.stop()},e.prototype.refresh=function(){this.elementObserver.refresh()},Object.defineProperty(e.prototype,"started",{get:function(){return this.elementObserver.started},enumerable:!1,configurable:!0}),e.prototype.matchElement=function(e){return e.hasAttribute(this.attributeName)},e.prototype.matchElementsInTree=function(e){var t=this.matchElement(e)?[e]:[],n=Array.from(e.querySelectorAll(this.selector));return t.concat(n)},e.prototype.elementMatched=function(e){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(e,this.attributeName)},e.prototype.elementUnmatched=function(e){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(e,this.attributeName)},e.prototype.elementAttributeChanged=function(e,t){this.delegate.elementAttributeValueChanged&&this.attributeName==t&&this.delegate.elementAttributeValueChanged(e,t)},e}(),f=function(){function e(e,t){var n=this;this.element=e,this.delegate=t,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver((function(e){return n.processMutations(e)}))}return e.prototype.start=function(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0}),this.refresh())},e.prototype.stop=function(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)},e.prototype.refresh=function(){if(this.started)for(var e=0,t=this.knownAttributeNames;e<t.length;e++){var n=t[e];this.refreshAttribute(n)}},e.prototype.processMutations=function(e){if(this.started)for(var t=0,n=e;t<n.length;t++){var r=n[t];this.processMutation(r)}},e.prototype.processMutation=function(e){var t=e.attributeName;t&&this.refreshAttribute(t)},e.prototype.refreshAttribute=function(e){var t=this.delegate.getStringMapKeyForAttribute(e);if(null!=t){this.stringMap.has(e)||this.stringMapKeyAdded(t,e);var n=this.element.getAttribute(e);this.stringMap.get(e)!=n&&this.stringMapValueChanged(n,t),null==n?(this.stringMap.delete(e),this.stringMapKeyRemoved(t,e)):this.stringMap.set(e,n)}},e.prototype.stringMapKeyAdded=function(e,t){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(e,t)},e.prototype.stringMapValueChanged=function(e,t){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(e,t)},e.prototype.stringMapKeyRemoved=function(e,t){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(e,t)},Object.defineProperty(e.prototype,"knownAttributeNames",{get:function(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentAttributeNames",{get:function(){return Array.from(this.element.attributes).map((function(e){return e.name}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"recordedAttributeNames",{get:function(){return Array.from(this.stringMap.keys())},enumerable:!1,configurable:!0}),e}();function d(e,t,n){m(e,t).add(n)}function h(e,t,n){m(e,t).delete(n),function(e,t){var n=e.get(t);null!=n&&0==n.size&&e.delete(t)}(e,t)}function m(e,t){var n=e.get(t);return n||(n=new Set,e.set(t,n)),n}var v,y=function(){function e(){this.valuesByKey=new Map}return Object.defineProperty(e.prototype,"values",{get:function(){return Array.from(this.valuesByKey.values()).reduce((function(e,t){return e.concat(Array.from(t))}),[])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return Array.from(this.valuesByKey.values()).reduce((function(e,t){return e+t.size}),0)},enumerable:!1,configurable:!0}),e.prototype.add=function(e,t){d(this.valuesByKey,e,t)},e.prototype.delete=function(e,t){h(this.valuesByKey,e,t)},e.prototype.has=function(e,t){var n=this.valuesByKey.get(e);return null!=n&&n.has(t)},e.prototype.hasKey=function(e){return this.valuesByKey.has(e)},e.prototype.hasValue=function(e){return Array.from(this.valuesByKey.values()).some((function(t){return t.has(e)}))},e.prototype.getValuesForKey=function(e){var t=this.valuesByKey.get(e);return t?Array.from(t):[]},e.prototype.getKeysForValue=function(e){return Array.from(this.valuesByKey).filter((function(t){return t[0],t[1].has(e)})).map((function(e){var t=e[0];return e[1],t}))},e}(),b=(v=function(e,t){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},v(e,t)},function(e,t){function n(){this.constructor=e}v(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),g=(function(e){function t(){var t=e.call(this)||this;return t.keysByValue=new Map,t}b(t,e),Object.defineProperty(t.prototype,"values",{get:function(){return Array.from(this.keysByValue.keys())},enumerable:!1,configurable:!0}),t.prototype.add=function(t,n){e.prototype.add.call(this,t,n),d(this.keysByValue,n,t)},t.prototype.delete=function(t,n){e.prototype.delete.call(this,t,n),h(this.keysByValue,n,t)},t.prototype.hasValue=function(e){return this.keysByValue.has(e)},t.prototype.getKeysForValue=function(e){var t=this.keysByValue.get(e);return t?Array.from(t):[]}}(y),function(){function e(e,t,n){this.attributeObserver=new p(e,t,this),this.delegate=n,this.tokensByElement=new y}return Object.defineProperty(e.prototype,"started",{get:function(){return this.attributeObserver.started},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.attributeObserver.start()},e.prototype.stop=function(){this.attributeObserver.stop()},e.prototype.refresh=function(){this.attributeObserver.refresh()},Object.defineProperty(e.prototype,"element",{get:function(){return this.attributeObserver.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributeName",{get:function(){return this.attributeObserver.attributeName},enumerable:!1,configurable:!0}),e.prototype.elementMatchedAttribute=function(e){this.tokensMatched(this.readTokensForElement(e))},e.prototype.elementAttributeValueChanged=function(e){var t=this.refreshTokensForElement(e),n=t[0],r=t[1];this.tokensUnmatched(n),this.tokensMatched(r)},e.prototype.elementUnmatchedAttribute=function(e){this.tokensUnmatched(this.tokensByElement.getValuesForKey(e))},e.prototype.tokensMatched=function(e){var t=this;e.forEach((function(e){return t.tokenMatched(e)}))},e.prototype.tokensUnmatched=function(e){var t=this;e.forEach((function(e){return t.tokenUnmatched(e)}))},e.prototype.tokenMatched=function(e){this.delegate.tokenMatched(e),this.tokensByElement.add(e.element,e)},e.prototype.tokenUnmatched=function(e){this.delegate.tokenUnmatched(e),this.tokensByElement.delete(e.element,e)},e.prototype.refreshTokensForElement=function(e){var t,n,r,o=this.tokensByElement.getValuesForKey(e),i=this.readTokensForElement(e),s=(t=o,n=i,r=Math.max(t.length,n.length),Array.from({length:r},(function(e,r){return[t[r],n[r]]}))).findIndex((function(e){return!function(e,t){return e&&t&&e.index==t.index&&e.content==t.content}(e[0],e[1])}));return-1==s?[[],[]]:[o.slice(s),i.slice(s)]},e.prototype.readTokensForElement=function(e){var t=this.attributeName;return function(e,t,n){return e.trim().split(/\s+/).filter((function(e){return e.length})).map((function(e,r){return{element:t,attributeName:n,content:e,index:r}}))}(e.getAttribute(t)||"",e,t)},e}()),w=function(){function e(e,t,n){this.tokenListObserver=new g(e,t,this),this.delegate=n,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}return Object.defineProperty(e.prototype,"started",{get:function(){return this.tokenListObserver.started},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.tokenListObserver.start()},e.prototype.stop=function(){this.tokenListObserver.stop()},e.prototype.refresh=function(){this.tokenListObserver.refresh()},Object.defineProperty(e.prototype,"element",{get:function(){return this.tokenListObserver.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributeName",{get:function(){return this.tokenListObserver.attributeName},enumerable:!1,configurable:!0}),e.prototype.tokenMatched=function(e){var t=e.element,n=this.fetchParseResultForToken(e).value;n&&(this.fetchValuesByTokenForElement(t).set(e,n),this.delegate.elementMatchedValue(t,n))},e.prototype.tokenUnmatched=function(e){var t=e.element,n=this.fetchParseResultForToken(e).value;n&&(this.fetchValuesByTokenForElement(t).delete(e),this.delegate.elementUnmatchedValue(t,n))},e.prototype.fetchParseResultForToken=function(e){var t=this.parseResultsByToken.get(e);return t||(t=this.parseToken(e),this.parseResultsByToken.set(e,t)),t},e.prototype.fetchValuesByTokenForElement=function(e){var t=this.valuesByTokenByElement.get(e);return t||(t=new Map,this.valuesByTokenByElement.set(e,t)),t},e.prototype.parseToken=function(e){try{return{value:this.delegate.parseValueForToken(e)}}catch(e){return{error:e}}},e}(),E=function(){function e(e,t){this.context=e,this.delegate=t,this.bindingsByAction=new Map}return e.prototype.start=function(){this.valueListObserver||(this.valueListObserver=new w(this.element,this.actionAttribute,this),this.valueListObserver.start())},e.prototype.stop=function(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())},Object.defineProperty(e.prototype,"element",{get:function(){return this.context.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.context.identifier},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"actionAttribute",{get:function(){return this.schema.actionAttribute},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return this.context.schema},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bindings",{get:function(){return Array.from(this.bindingsByAction.values())},enumerable:!1,configurable:!0}),e.prototype.connectAction=function(e){var t=new u(this.context,e);this.bindingsByAction.set(e,t),this.delegate.bindingConnected(t)},e.prototype.disconnectAction=function(e){var t=this.bindingsByAction.get(e);t&&(this.bindingsByAction.delete(e),this.delegate.bindingDisconnected(t))},e.prototype.disconnectAllActions=function(){var e=this;this.bindings.forEach((function(t){return e.delegate.bindingDisconnected(t)})),this.bindingsByAction.clear()},e.prototype.parseValueForToken=function(e){var t=s.forToken(e);if(t.identifier==this.identifier)return t},e.prototype.elementMatchedValue=function(e,t){this.connectAction(t)},e.prototype.elementUnmatchedValue=function(e,t){this.disconnectAction(t)},e}(),O=function(){function e(e,t){this.context=e,this.receiver=t,this.stringMapObserver=new f(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap,this.invokeChangedCallbacksForDefaultValues()}return e.prototype.start=function(){this.stringMapObserver.start()},e.prototype.stop=function(){this.stringMapObserver.stop()},Object.defineProperty(e.prototype,"element",{get:function(){return this.context.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controller",{get:function(){return this.context.controller},enumerable:!1,configurable:!0}),e.prototype.getStringMapKeyForAttribute=function(e){if(e in this.valueDescriptorMap)return this.valueDescriptorMap[e].name},e.prototype.stringMapValueChanged=function(e,t){this.invokeChangedCallbackForValue(t)},e.prototype.invokeChangedCallbacksForDefaultValues=function(){for(var e=0,t=this.valueDescriptors;e<t.length;e++){var n=t[e],r=n.key,o=n.name;null==n.defaultValue||this.controller.data.has(r)||this.invokeChangedCallbackForValue(o)}},e.prototype.invokeChangedCallbackForValue=function(e){var t=e+"Changed",n=this.receiver[t];if("function"==typeof n){var r=this.receiver[e];n.call(this.receiver,r)}},Object.defineProperty(e.prototype,"valueDescriptors",{get:function(){var e=this.valueDescriptorMap;return Object.keys(e).map((function(t){return e[t]}))},enumerable:!1,configurable:!0}),e}(),A=function(){function e(e,t){this.module=e,this.scope=t,this.controller=new e.controllerConstructor(this),this.bindingObserver=new E(this,this.dispatcher),this.valueObserver=new O(this,this.controller);try{this.controller.initialize()}catch(e){this.handleError(e,"initializing controller")}}return e.prototype.connect=function(){this.bindingObserver.start(),this.valueObserver.start();try{this.controller.connect()}catch(e){this.handleError(e,"connecting controller")}},e.prototype.disconnect=function(){try{this.controller.disconnect()}catch(e){this.handleError(e,"disconnecting controller")}this.valueObserver.stop(),this.bindingObserver.stop()},Object.defineProperty(e.prototype,"application",{get:function(){return this.module.application},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.module.identifier},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return this.application.schema},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dispatcher",{get:function(){return this.application.dispatcher},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.scope.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return this.element.parentElement},enumerable:!1,configurable:!0}),e.prototype.handleError=function(e,t,n){void 0===n&&(n={});var r=this,o=r.identifier,i=r.controller,s=r.element;n=Object.assign({identifier:o,controller:i,element:s},n),this.application.handleError(e,"Error "+t,n)},e}();function T(e,t){var n=P(e);return Array.from(n.reduce((function(e,n){return function(e,t){var n=e[t];return Array.isArray(n)?n:[]}(n,t).forEach((function(t){return e.add(t)})),e}),new Set))}function P(e){for(var t=[];e;)t.push(e),e=Object.getPrototypeOf(e);return t.reverse()}var x=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();var j="function"==typeof Object.getOwnPropertySymbols?function(e){return function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r}(Object.getOwnPropertyNames(e),Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,C=function(){function e(e){function t(){var n=this&&this instanceof t?this.constructor:void 0;return Reflect.construct(e,arguments,n)}return t.prototype=Object.create(e.prototype,{constructor:{value:t}}),Reflect.setPrototypeOf(t,e),t}try{return(t=e((function(){this.a.call(this)}))).prototype.a=function(){},new t,e}catch(e){return function(e){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return x(t,e),t}(e)}}var t}(),k=function(){function e(e,t){this.application=e,this.definition=function(e){return{identifier:e.identifier,controllerConstructor:(t=e.controllerConstructor,function(e,t){var n=C(e),r=function(e,t){return j(t).reduce((function(n,r){var o,i=function(e,t,n){var r=Object.getOwnPropertyDescriptor(e,n);if(!r||!("value"in r)){var o=Object.getOwnPropertyDescriptor(t,n).value;return r&&(o.get=r.get||o.get,o.set=r.set||o.set),o}}(e,t,r);return i&&Object.assign(n,((o={})[r]=i,o)),n}),{})}(e.prototype,t);return Object.defineProperties(n.prototype,r),n}(t,function(e){return T(e,"blessings").reduce((function(t,n){var r=n(e);for(var o in r){var i=t[o]||{};t[o]=Object.assign(i,r[o])}return t}),{})}(t)))};var t}(t),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}return Object.defineProperty(e.prototype,"identifier",{get:function(){return this.definition.identifier},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controllerConstructor",{get:function(){return this.definition.controllerConstructor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"contexts",{get:function(){return Array.from(this.connectedContexts)},enumerable:!1,configurable:!0}),e.prototype.connectContextForScope=function(e){var t=this.fetchContextForScope(e);this.connectedContexts.add(t),t.connect()},e.prototype.disconnectContextForScope=function(e){var t=this.contextsByScope.get(e);t&&(this.connectedContexts.delete(t),t.disconnect())},e.prototype.fetchContextForScope=function(e){var t=this.contextsByScope.get(e);return t||(t=new A(this,e),this.contextsByScope.set(e,t)),t},e}(),_=function(){function e(e){this.scope=e}return e.prototype.has=function(e){return this.data.has(this.getDataKey(e))},e.prototype.get=function(e){return this.data.get(this.getDataKey(e))},e.prototype.getAttributeName=function(e){return this.data.getAttributeNameForKey(this.getDataKey(e))},e.prototype.getDataKey=function(e){return e+"-class"},Object.defineProperty(e.prototype,"data",{get:function(){return this.scope.data},enumerable:!1,configurable:!0}),e}();function L(e){return e.charAt(0).toUpperCase()+e.slice(1)}function M(e){return e.replace(/([A-Z])/g,(function(e,t){return"-"+t.toLowerCase()}))}var S=function(){function e(e){this.scope=e}return Object.defineProperty(e.prototype,"element",{get:function(){return this.scope.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.scope.identifier},enumerable:!1,configurable:!0}),e.prototype.get=function(e){var t=this.getAttributeNameForKey(e);return this.element.getAttribute(t)},e.prototype.set=function(e,t){var n=this.getAttributeNameForKey(e);return this.element.setAttribute(n,t),this.get(e)},e.prototype.has=function(e){var t=this.getAttributeNameForKey(e);return this.element.hasAttribute(t)},e.prototype.delete=function(e){if(this.has(e)){var t=this.getAttributeNameForKey(e);return this.element.removeAttribute(t),!0}return!1},e.prototype.getAttributeNameForKey=function(e){return"data-"+this.identifier+"-"+M(e)},e}(),B=function(){function e(e){this.warnedKeysByObject=new WeakMap,this.logger=e}return e.prototype.warn=function(e,t,n){var r=this.warnedKeysByObject.get(e);r||(r=new Set,this.warnedKeysByObject.set(e,r)),r.has(t)||(r.add(t),this.logger.warn(n,e))},e}();function D(e,t){return"["+e+'~="'+t+'"]'}var F=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r},N=function(){function e(e){this.scope=e}return Object.defineProperty(e.prototype,"element",{get:function(){return this.scope.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.scope.identifier},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return this.scope.schema},enumerable:!1,configurable:!0}),e.prototype.has=function(e){return null!=this.find(e)},e.prototype.find=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.reduce((function(t,n){return t||e.findTarget(n)||e.findLegacyTarget(n)}),void 0)},e.prototype.findAll=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.reduce((function(t,n){return F(t,e.findAllTargets(n),e.findAllLegacyTargets(n))}),[])},e.prototype.findTarget=function(e){var t=this.getSelectorForTargetName(e);return this.scope.findElement(t)},e.prototype.findAllTargets=function(e){var t=this.getSelectorForTargetName(e);return this.scope.findAllElements(t)},e.prototype.getSelectorForTargetName=function(e){return D("data-"+this.identifier+"-target",e)},e.prototype.findLegacyTarget=function(e){var t=this.getLegacySelectorForTargetName(e);return this.deprecate(this.scope.findElement(t),e)},e.prototype.findAllLegacyTargets=function(e){var t=this,n=this.getLegacySelectorForTargetName(e);return this.scope.findAllElements(n).map((function(n){return t.deprecate(n,e)}))},e.prototype.getLegacySelectorForTargetName=function(e){var t=this.identifier+"."+e;return D(this.schema.targetAttribute,t)},e.prototype.deprecate=function(e,t){if(e){var n=this.identifier,r=this.schema.targetAttribute;this.guide.warn(e,"target:"+t,"Please replace "+r+'="'+n+"."+t+'" with data-'+n+'-target="'+t+'". The '+r+" attribute is deprecated and will be removed in a future version of Stimulus.")}return e},Object.defineProperty(e.prototype,"guide",{get:function(){return this.scope.guide},enumerable:!1,configurable:!0}),e}(),I=function(){function e(e,t,n,r){var o=this;this.targets=new N(this),this.classes=new _(this),this.data=new S(this),this.containsElement=function(e){return e.closest(o.controllerSelector)===o.element},this.schema=e,this.element=t,this.identifier=n,this.guide=new B(r)}return e.prototype.findElement=function(e){return this.element.matches(e)?this.element:this.queryElements(e).find(this.containsElement)},e.prototype.findAllElements=function(e){return function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r}(this.element.matches(e)?[this.element]:[],this.queryElements(e).filter(this.containsElement))},e.prototype.queryElements=function(e){return Array.from(this.element.querySelectorAll(e))},Object.defineProperty(e.prototype,"controllerSelector",{get:function(){return D(this.schema.controllerAttribute,this.identifier)},enumerable:!1,configurable:!0}),e}(),V=function(){function e(e,t,n){this.element=e,this.schema=t,this.delegate=n,this.valueListObserver=new w(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}return e.prototype.start=function(){this.valueListObserver.start()},e.prototype.stop=function(){this.valueListObserver.stop()},Object.defineProperty(e.prototype,"controllerAttribute",{get:function(){return this.schema.controllerAttribute},enumerable:!1,configurable:!0}),e.prototype.parseValueForToken=function(e){var t=e.element,n=e.content,r=this.fetchScopesByIdentifierForElement(t),o=r.get(n);return o||(o=this.delegate.createScopeForElementAndIdentifier(t,n),r.set(n,o)),o},e.prototype.elementMatchedValue=function(e,t){var n=(this.scopeReferenceCounts.get(t)||0)+1;this.scopeReferenceCounts.set(t,n),1==n&&this.delegate.scopeConnected(t)},e.prototype.elementUnmatchedValue=function(e,t){var n=this.scopeReferenceCounts.get(t);n&&(this.scopeReferenceCounts.set(t,n-1),1==n&&this.delegate.scopeDisconnected(t))},e.prototype.fetchScopesByIdentifierForElement=function(e){var t=this.scopesByIdentifierByElement.get(e);return t||(t=new Map,this.scopesByIdentifierByElement.set(e,t)),t},e}(),H=function(){function e(e){this.application=e,this.scopeObserver=new V(this.element,this.schema,this),this.scopesByIdentifier=new y,this.modulesByIdentifier=new Map}return Object.defineProperty(e.prototype,"element",{get:function(){return this.application.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return this.application.schema},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logger",{get:function(){return this.application.logger},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controllerAttribute",{get:function(){return this.schema.controllerAttribute},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modules",{get:function(){return Array.from(this.modulesByIdentifier.values())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"contexts",{get:function(){return this.modules.reduce((function(e,t){return e.concat(t.contexts)}),[])},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.scopeObserver.start()},e.prototype.stop=function(){this.scopeObserver.stop()},e.prototype.loadDefinition=function(e){this.unloadIdentifier(e.identifier);var t=new k(this.application,e);this.connectModule(t)},e.prototype.unloadIdentifier=function(e){var t=this.modulesByIdentifier.get(e);t&&this.disconnectModule(t)},e.prototype.getContextForElementAndIdentifier=function(e,t){var n=this.modulesByIdentifier.get(t);if(n)return n.contexts.find((function(t){return t.element==e}))},e.prototype.handleError=function(e,t,n){this.application.handleError(e,t,n)},e.prototype.createScopeForElementAndIdentifier=function(e,t){return new I(this.schema,e,t,this.logger)},e.prototype.scopeConnected=function(e){this.scopesByIdentifier.add(e.identifier,e);var t=this.modulesByIdentifier.get(e.identifier);t&&t.connectContextForScope(e)},e.prototype.scopeDisconnected=function(e){this.scopesByIdentifier.delete(e.identifier,e);var t=this.modulesByIdentifier.get(e.identifier);t&&t.disconnectContextForScope(e)},e.prototype.connectModule=function(e){this.modulesByIdentifier.set(e.identifier,e),this.scopesByIdentifier.getValuesForKey(e.identifier).forEach((function(t){return e.connectContextForScope(t)}))},e.prototype.disconnectModule=function(e){this.modulesByIdentifier.delete(e.identifier),this.scopesByIdentifier.getValuesForKey(e.identifier).forEach((function(t){return e.disconnectContextForScope(t)}))},e}(),K={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target"},R=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r},U=function(){function e(e,t){void 0===e&&(e=document.documentElement),void 0===t&&(t=K),this.logger=console,this.element=e,this.schema=t,this.dispatcher=new o(this),this.router=new H(this)}return e.start=function(t,n){var r=new e(t,n);return r.start(),r},e.prototype.start=function(){return e=this,t=void 0,r=function(){return function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}(this,(function(e){switch(e.label){case 0:return[4,new Promise((function(e){"loading"==document.readyState?document.addEventListener("DOMContentLoaded",e):e()}))];case 1:return e.sent(),this.dispatcher.start(),this.router.start(),[2]}}))},new((n=void 0)||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}));var e,t,n,r},e.prototype.stop=function(){this.dispatcher.stop(),this.router.stop()},e.prototype.register=function(e,t){this.load({identifier:e,controllerConstructor:t})},e.prototype.load=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=Array.isArray(e)?e:R([e],n);o.forEach((function(e){return t.router.loadDefinition(e)}))},e.prototype.unload=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=Array.isArray(e)?e:R([e],n);o.forEach((function(e){return t.router.unloadIdentifier(e)}))},Object.defineProperty(e.prototype,"controllers",{get:function(){return this.router.contexts.map((function(e){return e.controller}))},enumerable:!1,configurable:!0}),e.prototype.getControllerForElementAndIdentifier=function(e,t){var n=this.router.getContextForElementAndIdentifier(e,t);return n?n.controller:null},e.prototype.handleError=function(e,t,n){this.logger.error("%s\n\n%o\n\n%o",t,e,n)},e}();function W(e){return T(e,"classes").reduce((function(e,t){return Object.assign(e,((r={})[o=(n=t)+"Class"]={get:function(){var e=this.classes;if(e.has(n))return e.get(n);var t=e.getAttributeName(n);throw new Error('Missing attribute "'+t+'"')}},r["has"+L(o)]={get:function(){return this.classes.has(n)}},r));var n,r,o}),{})}function q(e){return T(e,"targets").reduce((function(e,t){return Object.assign(e,((r={})[(n=t)+"Target"]={get:function(){var e=this.targets.find(n);if(e)return e;throw new Error('Missing target element "'+this.identifier+"."+n+'"')}},r[n+"Targets"]={get:function(){return this.targets.findAll(n)}},r["has"+L(n)+"Target"]={get:function(){return this.targets.has(n)}},r));var n,r}),{})}function z(e){var t=function(e,t){return P(e).reduce((function(e,n){return e.push.apply(e,function(e,t){var n=e[t];return n?Object.keys(n).map((function(e){return[e,n[e]]})):[]}(n,t)),e}),[])}(e,"values"),n={valueDescriptorMap:{get:function(){var e=this;return t.reduce((function(t,n){var r,o=X(n),i=e.data.getAttributeNameForKey(o.key);return Object.assign(t,((r={})[i]=o,r))}),{})}}};return t.reduce((function(e,t){return Object.assign(e,function(e){var t,n=X(e),r=n.type,o=n.key,i=n.name,s=J[r],a=Z[r]||Z.default;return(t={})[i]={get:function(){var e=this.data.get(o);return null!==e?s(e):n.defaultValue},set:function(e){void 0===e?this.data.delete(o):this.data.set(o,a(e))}},t["has"+L(i)]={get:function(){return this.data.has(o)}},t}(t))}),n)}function X(e){return function(e,t){var n,r=M(e)+"-value";return{type:t,key:r,name:(n=r,n.replace(/(?:[_-])([a-z0-9])/g,(function(e,t){return t.toUpperCase()}))),get defaultValue(){return Y[t]}}}(e[0],function(e){switch(e){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}throw new Error('Unknown value type constant "'+e+'"')}(e[1]))}var Y={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},J={array:function(e){var t=JSON.parse(e);if(!Array.isArray(t))throw new TypeError("Expected array");return t},boolean:function(e){return!("0"==e||"false"==e)},number:function(e){return parseFloat(e)},object:function(e){var t=JSON.parse(e);if(null===t||"object"!=typeof t||Array.isArray(t))throw new TypeError("Expected object");return t},string:function(e){return e}},Z={default:function(e){return""+e},array:G,object:G};function G(e){return JSON.stringify(e)}var $=function(){function e(e){this.context=e}return Object.defineProperty(e.prototype,"application",{get:function(){return this.context.application},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scope",{get:function(){return this.context.scope},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.scope.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.scope.identifier},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targets",{get:function(){return this.scope.targets},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classes",{get:function(){return this.scope.classes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.scope.data},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){},e.prototype.connect=function(){},e.prototype.disconnect=function(){},e.blessings=[W,q,z],e.targets=[],e.values={},e}()},470:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UploaderController=t.TooltipController=t.setTooltipText=t.setTooltipHtml=t.TableController=t.showPopover=t.PopoverController=t.BasePopoverController=t.hidePopover=t.detachPopover=t.attachPopover=t.TabListController=t.showModal=t.ModalController=t.hideModal=t.ExpandableController=void 0;var r=n(601);Object.defineProperty(t,"ExpandableController",{enumerable:!0,get:function(){return r.ExpandableController}});var o=n(181);Object.defineProperty(t,"hideModal",{enumerable:!0,get:function(){return o.hideModal}}),Object.defineProperty(t,"ModalController",{enumerable:!0,get:function(){return o.ModalController}}),Object.defineProperty(t,"showModal",{enumerable:!0,get:function(){return o.showModal}});var i=n(642);Object.defineProperty(t,"TabListController",{enumerable:!0,get:function(){return i.TabListController}});var s=n(388);Object.defineProperty(t,"attachPopover",{enumerable:!0,get:function(){return s.attachPopover}}),Object.defineProperty(t,"detachPopover",{enumerable:!0,get:function(){return s.detachPopover}}),Object.defineProperty(t,"hidePopover",{enumerable:!0,get:function(){return s.hidePopover}}),Object.defineProperty(t,"BasePopoverController",{enumerable:!0,get:function(){return s.BasePopoverController}}),Object.defineProperty(t,"PopoverController",{enumerable:!0,get:function(){return s.PopoverController}}),Object.defineProperty(t,"showPopover",{enumerable:!0,get:function(){return s.showPopover}});var a=n(753);Object.defineProperty(t,"TableController",{enumerable:!0,get:function(){return a.TableController}});var c=n(355);Object.defineProperty(t,"setTooltipHtml",{enumerable:!0,get:function(){return c.setTooltipHtml}}),Object.defineProperty(t,"setTooltipText",{enumerable:!0,get:function(){return c.setTooltipText}}),Object.defineProperty(t,"TooltipController",{enumerable:!0,get:function(){return c.TooltipController}});var u=n(637);Object.defineProperty(t,"UploaderController",{enumerable:!0,get:function(){return u.UploaderController}})},601:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ExpandableController=void 0;var i=n(36),s="s-expandable-control:radio-off";function a(e){var t=e.target;t instanceof HTMLInputElement&&"INPUT"===t.nodeName&&"radio"===t.type&&document.querySelectorAll('input[type="radio"][name="'+t.name+'"]').forEach((function(t){if(t!==e.target){var n;try{n=new Event(s)}catch(e){(n=document.createEvent("Event")).initEvent(s,!0,!0)}t.dispatchEvent(n)}}))}var c=0;function u(e){e?1==++c&&document.body.addEventListener("change",a):0==--c&&document.body.removeEventListener("change",a)}var l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lastKeydownClickTimestamp=0,t}return o(t,e),t.prototype.initialize=function(){"INPUT"===this.element.nodeName&&["radio","checkbox"].indexOf(this.element.type)>=0?(this.isCollapsed=this._isCollapsedForCheckable.bind(this),this.events=["change",s],this.isCheckable=!0,this.isRadio="radio"===this.element.type):(this.isCollapsed=this._isCollapsedForClickable.bind(this),this.events=["click","keydown"]),this.listener=this.listener.bind(this)},t.prototype._isCollapsedForClickable=function(){var e=this.controlledExpandables;return e.length>0?!e.every((function(e){return e.classList.contains("is-expanded")})):"false"===this.element.getAttribute("aria-expanded")},t.prototype._isCollapsedForCheckable=function(){return!this.element.checked},Object.defineProperty(t.prototype,"controlledExpandables",{get:function(){var e=this.element.getAttribute("aria-controls");if(!e)throw'[aria-controls="targetId1 ... targetIdN"] attribute required';var t=e.split(/\s+/g).map((function(e){return document.getElementById(e)})).filter((function(e){return!!e}));if(!t.length)throw"couldn't find controls";return t},enumerable:!1,configurable:!0}),t.prototype._dispatchShowHideEvent=function(e){this.triggerEvent(e?"show":"hide")},t.prototype._toggleClass=function(e){if(this.data.has("toggle-class")){var t=this.element.classList,n=this.data.get("toggle-class");if(!n)throw"couldn't find toggle class";n.split(/\s+/).forEach((function(n){t.toggle(n,!!e)}))}},t.prototype.listener=function(e){var t;if(this.isCheckable)t=!this.element.checked;else{if("keydown"==e.type&&e instanceof KeyboardEvent&&13!=e.keyCode&&32!=e.keyCode)return;if(e.target!==e.currentTarget&&["A","BUTTON"].indexOf(e.target.nodeName)>=0)return;if(e.preventDefault(),"keydown"==e.type)this.lastKeydownClickTimestamp=Date.now();else if("click"==e.type&&Date.now()-this.lastKeydownClickTimestamp<300)return;t="true"===this.element.getAttribute("aria-expanded"),"click"===e.type&&this.element.blur()}this.element.setAttribute("aria-expanded",t?"false":"true");for(var n=0,r=this.controlledExpandables;n<r.length;n++)r[n].classList.toggle("is-expanded",!t);this._dispatchShowHideEvent(!t),this._toggleClass(!t)},t.prototype.connect=function(){var e=this;if(this.events.forEach((function(t){e.element.addEventListener(t,e.listener.bind(e))}),this),this.isRadio&&u(!0),this.isRadio||this.element.setAttribute("aria-expanded",this.isCollapsed()?"false":"true"),this.isCheckable){var t=this.controlledExpandables;if(t.length){var n=!this.isCollapsed();if(t.some((function(e){return e.classList.contains("is-expanded")!==n}))){for(var r=0,o=this.controlledExpandables;r<o.length;r++)o[r].classList.toggle("is-expanded",n);this._dispatchShowHideEvent(n),this._toggleClass(n)}}}},t.prototype.disconnect=function(){var e=this;this.events.forEach((function(t){e.element.removeEventListener(t,e.listener.bind(e))}),this),this.isRadio&&u(!1)},t}(i.StacksController);t.ExpandableController=l},181:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.hideModal=t.showModal=t.ModalController=void 0;var s=n(36),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.connect=function(){this.validate()},t.prototype.disconnect=function(){this.unbindDocumentEvents()},t.prototype.toggle=function(e){void 0===e&&(e=null),this._toggle(void 0,e)},t.prototype.show=function(e){void 0===e&&(e=null),this._toggle(!0,e)},t.prototype.hide=function(e){void 0===e&&(e=null),this._toggle(!1,e)},t.prototype.validate=function(){var e=this.data.get("return-element");if(e&&(this.returnElement=document.querySelector(e),!this.returnElement))throw"Unable to find element by return-element selector: "+e},t.prototype._toggle=function(e,t){var n=this;void 0===t&&(t=null);var r=e,o="false"===this.modalTarget.getAttribute("aria-hidden");if(void 0===r&&(r=!o),!(r&&o||!r&&!o)){var i=this.getDispatcher(t),s=this.triggerEvent(r?"show":"hide",{returnElement:this.returnElement,dispatcher:this.getDispatcher(i)},this.modalTarget);s.defaultPrevented||(this.returnElement=s.detail.returnElement,this.modalTarget.setAttribute("aria-hidden",r?"false":"true"),r?(this.bindDocumentEvents(),this.focusInsideModal()):(this.unbindDocumentEvents(),this.focusReturnElement(),this.removeModalOnHide()),void 0!==this.modalTarget.ontransitionend?this.modalTarget.addEventListener("transitionend",(function(){n.triggerEvent(r?"shown":"hidden",{dispatcher:i},n.modalTarget)}),{once:!0}):this.triggerEvent(r?"shown":"hidden",{dispatcher:i},this.modalTarget))}},t.prototype.focusReturnElement=function(){var e=this;this.returnElement&&this.modalTarget.addEventListener("s-modal:hidden",(function(){e.returnElement&&document.body.contains(e.returnElement)&&e.returnElement.focus()}),{once:!0})},t.prototype.removeModalOnHide=function(){var e=this;"true"===this.data.get("remove-when-hidden")&&this.modalTarget.addEventListener("s-modal:hidden",(function(){e.element.remove()}),{once:!0})},t.prototype.getAllTabbables=function(){return Array.from(this.modalTarget.querySelectorAll("[href], input, select, textarea, button, [tabindex]")).filter((function(e){return e.matches(":not([disabled]):not([tabindex='-1'])")}))},t.prototype.firstVisible=function(e){return e.find((function(e){return null!==e.offsetParent}))},t.prototype.lastVisible=function(e){return this.firstVisible(i([],e,!0).reverse())},t.prototype.focusInsideModal=function(){var e=this;this.modalTarget.addEventListener("s-modal:shown",(function(){var t,n=null!==(t=e.firstVisible(e.initialFocusTargets))&&void 0!==t?t:e.firstVisible(e.getAllTabbables());null==n||n.focus()}),{once:!0})},t.prototype.keepFocusWithinModal=function(e){if(this.modalTarget.contains(e.target)){if("Tab"===e.key){var t=this.getAllTabbables(),n=this.firstVisible(t),r=this.lastVisible(t);n&&r&&(n===r?(e.preventDefault(),n.focus()):e.shiftKey&&e.target===n?(e.preventDefault(),r.focus()):e.shiftKey||e.target!==r||(e.preventDefault(),n.focus()))}}else{var o=this.firstVisible(this.getAllTabbables());o&&(e.preventDefault(),o.focus())}},t.prototype.bindDocumentEvents=function(){this._boundClickFn=this._boundClickFn||this.hideOnOutsideClick.bind(this),this._boundKeypressFn=this._boundKeypressFn||this.hideOnEscapePress.bind(this),this._boundTabTrap=this._boundTabTrap||this.keepFocusWithinModal.bind(this),document.addEventListener("mousedown",this._boundClickFn),document.addEventListener("keyup",this._boundKeypressFn),document.addEventListener("keydown",this._boundTabTrap)},t.prototype.unbindDocumentEvents=function(){document.removeEventListener("mousedown",this._boundClickFn),document.removeEventListener("keyup",this._boundKeypressFn),document.removeEventListener("keydown",this._boundTabTrap)},t.prototype.hideOnOutsideClick=function(e){var t=e.target;!this.modalTarget.querySelector(".s-modal--dialog").contains(t)&&document.body.contains(t)&&this._toggle(!1,e)},t.prototype.hideOnEscapePress=function(e){27===e.which&&"true"!==this.modalTarget.getAttribute("aria-hidden")&&this._toggle(!1,e)},t.prototype.getDispatcher=function(e){return void 0===e&&(e=null),e instanceof Event?e.target:e instanceof Element?e:this.element},t.targets=["modal","initialFocus"],t}(s.StacksController);function c(e,t){var n=s.application.getControllerForElementAndIdentifier(e,"s-modal");if(!n)throw"Unable to get s-modal controller from element";t?n.show():n.hide()}t.ModalController=a,t.showModal=function(e){c(e,!0)},t.hideModal=function(e){c(e,!1)}},642:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TabListController=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.connect=function(){e.prototype.connect.call(this),this.boundSelectTab=this.selectTab.bind(this),this.boundHandleKeydown=this.handleKeydown.bind(this);for(var t=0,n=this.tabTargets;t<n.length;t++){var r=n[t];r.addEventListener("click",this.boundSelectTab),r.addEventListener("keydown",this.boundHandleKeydown)}},t.prototype.disconnect=function(){e.prototype.disconnect.call(this);for(var t=0,n=this.tabTargets;t<n.length;t++){var r=n[t];r.removeEventListener("click",this.boundSelectTab),r.removeEventListener("keydown",this.boundHandleKeydown)}},Object.defineProperty(t.prototype,"tabTargets",{get:function(){return Array.from(this.element.querySelectorAll("[role=tab]"))},enumerable:!1,configurable:!0}),t.prototype.selectTab=function(e){this.switchToTab(e.currentTarget)},t.prototype.handleKeydown=function(e){var t,n=e.currentTarget,r=this.tabTargets,o=r.indexOf(n);if("ArrowRight"===e.key)o++;else{if("ArrowLeft"!==e.key)return;o--}o<0&&(o=r.length-1),o>=r.length&&(o=0),n=r[o],this.switchToTab(n),null===(t=this.selectedTab)||void 0===t||t.focus()},t.prototype.switchToTab=function(e){var t=this.selectedTab;t!==e&&(this.triggerEvent("select",{oldTab:t,newTab:e}).defaultPrevented||(this.selectedTab=e,this.triggerEvent("selected",{oldTab:t,newTab:e})))},Object.defineProperty(t.prototype,"selectedTab",{get:function(){return this.tabTargets.find((function(e){return"true"===e.getAttribute("aria-selected")}))||null},set:function(e){for(var t=0,n=this.tabTargets;t<n.length;t++){var r=n[t],o=r.getAttribute("aria-controls"),i=o?document.getElementById(o):null;r===e?(r.classList.add("is-selected"),r.setAttribute("aria-selected","true"),r.removeAttribute("tabindex"),null==i||i.classList.remove("d-none")):(r.classList.remove("is-selected"),r.setAttribute("aria-selected","false"),r.setAttribute("tabindex","-1"),null==i||i.classList.add("d-none"))}},enumerable:!1,configurable:!0}),t}(n(36).StacksController);t.TabListController=i},388:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.detachPopover=t.attachPopover=t.hidePopover=t.showPopover=t.PopoverController=t.BasePopoverController=void 0;var i=n(492),s=n(36),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"isVisible",{get:function(){var e=this.popoverElement;return!!e&&e.classList.contains("is-visible")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isInViewport",{get:function(){var e=this.popoverElement;if(!this.isVisible||!e)return!1;var t=e.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight),r=Math.max(document.documentElement.clientWidth,window.innerWidth);return t.bottom>0&&t.top<n&&t.right>0&&t.left<r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shouldHideOnOutsideClick",{get:function(){switch(this.data.get("hide-on-outside-click")){case"after-dismissal":case"never":return!1;case"if-in-viewport":return this.isInViewport;default:return!0}},enumerable:!1,configurable:!0}),t.prototype.connect=function(){e.prototype.connect.call(this),this.validate(),this.isVisible?this.initializePopper():"true"===this.data.get("auto-show")&&this.show(null),this.data.delete("auto-show")},t.prototype.disconnect=function(){this.hide(),this.popper&&(this.popper.destroy(),delete this.popper),e.prototype.disconnect.call(this)},t.prototype.toggle=function(e){void 0===e&&(e=null),this.isVisible?this.hide(e):this.show(e)},t.prototype.show=function(e){if(void 0===e&&(e=null),!this.isVisible){var t=this.getDispatcher(e);this.triggerEvent("show",{dispatcher:t}).defaultPrevented||(this.popper||this.initializePopper(),this.popoverElement.classList.add("is-visible"),this.scheduleUpdate(),this.shown(t))}},t.prototype.hide=function(e){if(void 0===e&&(e=null),this.isVisible){var t=this.getDispatcher(e);this.triggerEvent("hide",{dispatcher:t}).defaultPrevented||(this.popoverElement.classList.remove("is-visible"),this.popper&&(this.popper.destroy(),delete this.popper),"after-dismissal"===this.data.get("hide-on-outside-click")&&this.data.delete("hide-on-outside-click"),this.hidden(t))}},t.prototype.shown=function(e){void 0===e&&(e=null),this.bindDocumentEvents(),this.triggerEvent("shown",{dispatcher:e})},t.prototype.hidden=function(e){void 0===e&&(e=null),this.unbindDocumentEvents(),this.triggerEvent("hidden",{dispatcher:e})},t.prototype.generatePopover=function(){return null},t.prototype.initializePopper=function(){this.popper=(0,i.createPopper)(this.referenceElement,this.popoverElement,{placement:this.data.get("placement")||"bottom",modifiers:[{name:"offset",options:{offset:[0,10]}},{name:"arrow",options:{element:".s-popover--arrow"}}]})},t.prototype.validate=function(){var e=this.data.get("reference-selector");if(this.referenceElement=this.element,e&&(this.referenceElement=this.element.querySelector(e),!this.referenceElement))throw"Unable to find element by reference selector: "+e;var t=this.referenceElement.getAttribute(this.popoverSelectorAttribute),n=null;if(t){if(!(n=document.getElementById(t)))throw"[".concat(this.popoverSelectorAttribute,'="{POPOVER_ID}"] required')}else n=this.generatePopover();if(!n)throw"unable to find or generate popover element";this.popoverElement=n},t.prototype.getDispatcher=function(e){return void 0===e&&(e=null),e instanceof Event?e.target:e instanceof Element?e:this.element},t.prototype.scheduleUpdate=function(){this.popper&&this.isVisible&&this.popper.update()},t}(s.StacksController);t.BasePopoverController=a;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.popoverSelectorAttribute="aria-controls",t}return o(t,e),t.prototype.shown=function(t){void 0===t&&(t=null),this.toggleOptionalClasses(!0),this.toggleAccessibilityAttributes(!0),e.prototype.shown.call(this,t)},t.prototype.hidden=function(t){void 0===t&&(t=null),this.toggleOptionalClasses(!1),this.toggleAccessibilityAttributes(!1),e.prototype.hidden.call(this,t)},t.prototype.connect=function(){e.prototype.connect.call(this),this.toggleAccessibilityAttributes()},t.prototype.bindDocumentEvents=function(){this.boundHideOnOutsideClick=this.boundHideOnOutsideClick||this.hideOnOutsideClick.bind(this),this.boundHideOnEscapePress=this.boundHideOnEscapePress||this.hideOnEscapePress.bind(this),document.addEventListener("mousedown",this.boundHideOnOutsideClick),document.addEventListener("keyup",this.boundHideOnEscapePress)},t.prototype.unbindDocumentEvents=function(){document.removeEventListener("mousedown",this.boundHideOnOutsideClick),document.removeEventListener("keyup",this.boundHideOnEscapePress)},t.prototype.hideOnOutsideClick=function(e){var t=e.target;this.shouldHideOnOutsideClick&&!this.referenceElement.contains(t)&&!this.popoverElement.contains(t)&&document.body.contains(t)&&this.hide(e)},t.prototype.hideOnEscapePress=function(e){27===e.which&&this.isVisible&&(this.popoverElement.contains(e.target)&&this.referenceElement.focus(),this.hide(e))},t.prototype.toggleOptionalClasses=function(e){if(this.data.has("toggle-class")){var t=this.data.get("toggle-class")||"",n=this.referenceElement.classList;t.split(/\s+/).forEach((function(t){n.toggle(t,e)}))}},t.prototype.toggleAccessibilityAttributes=function(e){var t=(null==e?void 0:e.toString())||this.referenceElement.ariaExpanded||"false";this.referenceElement.ariaExpanded=t,this.referenceElement.setAttribute("aria-expanded",t)},t.targets=[],t}(a);function u(e){var t,n=(null===(t=e.getAttribute("data-controller"))||void 0===t?void 0:t.includes("s-popover"))||!1,r=s.application.getControllerForElementAndIdentifier(e,"s-popover"),o=e.getAttribute("data-s-popover-reference-selector"),i=o?e.querySelector(o):e,a=i?i.getAttribute("aria-controls"):null;return{isPopover:n,controller:r,referenceElement:i,popover:a?document.getElementById(a):null}}function l(e,t,n){var r,o=new Set(null===(r=e.getAttribute("data-controller"))||void 0===r?void 0:r.split(/\s+/));n?o.add(t):o.delete(t),e.setAttribute("data-controller",Array.from(o).join(" "))}t.PopoverController=c,t.showPopover=function(e){var t=u(e),n=t.isPopover,r=t.controller;if(r)r.show();else{if(!n)throw'element does not have data-controller="s-popover"';e.setAttribute("data-s-popover-auto-show","true")}},t.hidePopover=function(e){var t=u(e),n=t.isPopover,r=t.controller,o=t.popover;if(r)r.hide();else{if(!n)throw'element does not have data-controller="s-popover"';e.removeAttribute("data-s-popover-auto-show"),o&&o.classList.remove("is-visible")}},t.attachPopover=function(e,t,n){var r=u(e),o=r.referenceElement,i=r.popover;if(i)throw'element already has popover with id="'.concat(i.id,'"');if(!o)throw"element has invalid data-s-popover-reference-selector attribute";if("string"==typeof t){var s=document.createRange().createContextualFragment(t).children;if(1!==s.length)throw"popover should contain a single element";t=s[0]}var a=o.getAttribute("aria-controls"),c=t.id;if(!t.classList.contains("s-popover"))throw'popover should have the "s-popover" class but had class="'.concat(t.className,'"');if(a&&a!==c)throw'element has aria-controls="'.concat(a,'" but popover has id="').concat(c,'"');c||(c="--stacks-s-popover-"+Math.random().toString(36).substring(2,10),t.id=c),a||o.setAttribute("aria-controls",c),!t.parentElement&&e.parentElement&&o.insertAdjacentElement("afterend",t),l(e,"s-popover",!0),n&&(n.toggleOnClick&&o.setAttribute("data-action","click->s-popover#toggle"),n.placement&&e.setAttribute("data-s-popover-placement",n.placement),n.autoShow&&e.setAttribute("data-s-popover-auto-show","true"))},t.detachPopover=function(e){var t=u(e),n=t.isPopover,r=t.controller,o=t.referenceElement,i=t.popover;return null==r||r.hide(),null==i||i.remove(),n&&(l(e,"s-popover",!1),o&&o.removeAttribute("aria-controls")),i}},753:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TableController=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.setCurrentSort=function(e,t){if(["asc","desc","none"].indexOf(t)<0)throw"direction must be one of asc, desc, or none";var n=this;this.columnTargets.forEach((function(r){var o=r===e;r.classList.toggle("is-sorted",o&&"none"!==t),r.querySelectorAll(".js-sorting-indicator").forEach((function(e){var n=o?t:"none";e.classList.toggle("d-none",!e.classList.contains("js-sorting-indicator-"+n))})),o&&"none"!==t?n.setElementData(r,"sort-direction",t):n.removeElementData(r,"sort-direction")}))},t.prototype.sort=function(e){var t=this,n=e.currentTarget;if(!(n instanceof HTMLTableCellElement))throw"invalid event target";var r=this.element,o=r.tBodies[0],i=function(e){if(!(e.parentElement&&e.parentElement.parentElement instanceof HTMLTableSectionElement))throw"invalid table";var t=s(e.parentElement.parentElement,e);if("number"!=typeof t)throw"shouldn't happen";return t}(n);if(!(i<0)){var a,c=function(e){var t=s(e);if(!(t instanceof Array))throw"shouldn't happen";return t}(o),u="asc"===this.getElementData(n,"sort-direction")?-1:1,l=Array.from(r.tBodies[0].rows),p=!1,f=[];l.forEach((function(e,n){var r=t.getElementData(e,"sort-to");if("top"!==r)if("bottom"!==r){var o=c[n][i];if(o){var s=t.getElementData(o,"sort-val"),u="string"==typeof s?s:o.textContent.trim();""!==u&&"".concat(parseInt(u,10))!==u&&(p=!0),f.push([u,n])}else f.push(["",n])}else a||(a=e)})),p||f.forEach((function(e){e[0]=""===e[0]?Number.MIN_VALUE:parseInt(e[0],10)})),f.sort((function(e,t){return e[0]>t[0]?1*u:e[0]<t[0]?-1*u:e[1]>t[1]?1:-1})),f.forEach((function(e){var t=l[e[1]];t.parentElement.removeChild(t),a?o.insertBefore(t,a):o.appendChild(t)})),this.setCurrentSort(n,1===u?"asc":"desc")}},t.targets=["column"],t}(n(36).StacksController);function s(e,t){for(var n=[],r=e.children[0],o=[],i=[];r||i.some((function(e){return 0!==e}));){var s=[];n.push(s);var a=0;if(r)for(var c=0;c<r.children.length;c++){for(;i[a];)i[a]--,s[a]=o[a],a++;var u=r.children[c];if(!(u instanceof HTMLTableCellElement))throw"invalid table";if("none"!==getComputedStyle(u).display){if(u===t)return a;for(var l=a+u.colSpan;a<l;a++)i[a]=u.rowSpan-1,o[a]=u,s[a]=u}}for(;a<o.length;)i[a]&&(i[a]--,s[a]=o[a]),a++;r&&(r=r.nextElementSibling)}return t?-1:n}t.TableController=i},355:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.setTooltipText=t.setTooltipHtml=t.TooltipController=void 0;var i=n(36),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.popoverSelectorAttribute="aria-describedby",t}return o(t,e),t.prototype.connect=function(){e.prototype.connect.call(this),window.matchMedia("(hover: hover)").matches&&this.bindMouseEvents(),this.bindKeyboardEvents()},t.prototype.disconnect=function(){this.unbindKeyboardEvents(),this.unbindMouseEvents(),e.prototype.disconnect.call(this)},t.prototype.show=function(t){void 0===t&&(t=null);var n=i.application.getControllerForElementAndIdentifier(this.element,"s-popover");n&&n.isVisible||e.prototype.show.call(this,t)},t.prototype.scheduleShow=function(e){var t=this;void 0===e&&(e=null),window.clearTimeout(this.activeTimeout),this.activeTimeout=window.setTimeout((function(){return t.show(e)}),300)},t.prototype.scheduleHide=function(t){var n=this;void 0===t&&(t=null),window.clearTimeout(this.activeTimeout),this.activeTimeout=window.setTimeout((function(){return e.prototype.hide.call(n,t)}),100)},t.prototype.clearActiveTimeout=function(){clearTimeout(this.activeTimeout)},t.prototype.applyTitleAttributes=function(){var e,n=this.data.get("html-title");if(n)e=document.createRange().createContextualFragment(n);else{var r=this.element.getAttribute("title");if(!r)return null;e=document.createTextNode(r)}this.data.delete("html-title"),this.element.removeAttribute("title");var o=this.element.getAttribute("aria-describedby");o||(o=t.generateId(),this.element.setAttribute("aria-describedby",o));var i=document.getElementById(o);if(!i){(i=document.createElement("div")).id=o,i.className="s-popover s-popover__tooltip",i.setAttribute("role","tooltip");var s=this.element.parentNode;s?s.insertBefore(i,this.element.nextSibling):document.body.appendChild(i)}var a=i.querySelector(".s-popover--arrow");return i.innerHTML="",i.appendChild(e),a?i.appendChild(a):i.insertAdjacentHTML("beforeend",'<div class="s-popover--arrow"></div>'),this.scheduleUpdate(),i},t.prototype.bindDocumentEvents=function(){this.boundHideIfWithin=this.boundHideIfWithin||this.hideIfWithin.bind(this),document.addEventListener("s-popover:shown",this.boundHideIfWithin)},t.prototype.unbindDocumentEvents=function(){document.removeEventListener("s-popover:shown",this.boundHideIfWithin)},t.prototype.generatePopover=function(){return this.applyTitleAttributes()},t.prototype.hideIfWithin=function(e){e.target.contains(this.referenceElement)&&this.scheduleHide()},t.prototype.hideOnEscapeKeyEvent=function(e){"Escape"===e.key&&this.scheduleHide()},t.prototype.bindKeyboardEvents=function(){this.boundScheduleShow=this.boundScheduleShow||this.scheduleShow.bind(this),this.boundHide=this.boundHide||this.scheduleHide.bind(this),this.boundHideOnEscapeKeyEvent=this.boundHideOnEscapeKeyEvent||this.hideOnEscapeKeyEvent.bind(this),this.referenceElement.addEventListener("focus",this.boundScheduleShow),this.referenceElement.addEventListener("blur",this.boundHide),document.addEventListener("keyup",this.boundHideOnEscapeKeyEvent)},t.prototype.unbindKeyboardEvents=function(){this.referenceElement.removeEventListener("focus",this.boundScheduleShow),this.referenceElement.removeEventListener("blur",this.boundHide),document.removeEventListener("keyup",this.boundHideOnEscapeKeyEvent)},t.prototype.bindMouseEvents=function(){this.boundScheduleShow=this.boundScheduleShow||this.scheduleShow.bind(this),this.boundHide=this.boundHide||this.scheduleHide.bind(this),this.boundClearActiveTimeout=this.boundClearActiveTimeout||this.clearActiveTimeout.bind(this),this.referenceElement.addEventListener("mouseover",this.boundScheduleShow),this.referenceElement.addEventListener("mouseout",this.boundHide),this.popoverElement.addEventListener("mouseover",this.boundClearActiveTimeout),this.popoverElement.addEventListener("mouseout",this.boundHide)},t.prototype.unbindMouseEvents=function(){this.referenceElement.removeEventListener("mouseover",this.boundScheduleShow),this.referenceElement.removeEventListener("mouseout",this.boundHide),this.referenceElement.removeEventListener("focus",this.boundScheduleShow),this.referenceElement.removeEventListener("blur",this.boundHide),this.popoverElement.removeEventListener("mouseover",this.boundClearActiveTimeout),this.popoverElement.removeEventListener("mouseout",this.boundHide)},t.generateId=function(){return"--stacks-s-tooltip-"+Math.random().toString(36).substring(2,10)},t.targets=[],t}(n(388).BasePopoverController);function a(e,t){t&&t.placement&&e.setAttribute("data-s-tooltip-placement",t.placement);var n=i.application.getControllerForElementAndIdentifier(e,"s-tooltip");if(n)n.applyTitleAttributes();else{var r=e.getAttribute("data-controller");e.setAttribute("data-controller","".concat(r||""," s-tooltip"))}}t.TooltipController=s,t.setTooltipHtml=function(e,t,n){e.setAttribute("data-s-tooltip-html-title",t),e.removeAttribute("title"),a(e,n)},t.setTooltipText=function(e,t,n){e.setAttribute("title",t),e.removeAttribute("data-s-tooltip-html-title"),a(e,n)}},637:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.UploaderController=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.connect=function(){e.prototype.connect.call(this),this.boundDragEnter=this.handleUploaderActive.bind(this,!0),this.boundDragLeave=this.handleUploaderActive.bind(this,!1),this.inputTarget.addEventListener("dragenter",this.boundDragEnter),this.inputTarget.addEventListener("dragleave",this.boundDragLeave)},t.prototype.disconnect=function(){this.inputTarget.removeEventListener("dragenter",this.boundDragEnter),this.inputTarget.removeEventListener("dragleave",this.boundDragLeave),e.prototype.disconnect.call(this)},t.prototype.handleInput=function(){var e=this;if(this.previewsTarget.innerHTML="",this.inputTarget.files){var n=this.inputTarget.files.length;this.getDataURLs(this.inputTarget.files,t.FILE_DISPLAY_LIMIT).then((function(t){if(e.handleVisible(!0),t.length>1){var r=document.createElement("div");r.classList.add("s-uploader--previews-heading"),r.innerText=t.length<n?"Showing ".concat(t.length," of ").concat(n," files"):"".concat(n," items"),e.previewsTarget.appendChild(r),e.previewsTarget.classList.add("has-multiple")}else e.previewsTarget.classList.remove("has-multiple");t.forEach((function(t){return e.addFilePreview(t)})),e.handleUploaderActive(!0)})).catch((function(){return null}))}},t.prototype.reset=function(){this.inputTarget.value="",this.previewsTarget.innerHTML="",this.handleVisible(!1)},t.prototype.handleVisible=function(e){var t=this.targets.scope,n=t.findAllElements("[data-s-uploader-hide-on-input]"),r=t.findAllElements("[data-s-uploader-show-on-input]"),o=t.findAllElements("[data-s-uploader-enable-on-input]");e?(n.forEach((function(e){e.classList.add("d-none")})),r.forEach((function(e){e.classList.remove("d-none")})),o.forEach((function(e){e.removeAttribute("disabled")}))):(n.forEach((function(e){e.classList.remove("d-none")})),r.forEach((function(e){e.classList.add("d-none")})),o.forEach((function(e){e.setAttribute("disabled","true")})),this.handleUploaderActive(!1))},t.prototype.addFilePreview=function(e){if(e){var t,n=document.createElement("div");e.type.match("image/*")&&e.data?((t=document.createElement("img")).src=e.data.toString(),t.alt=e.name):(t=document.createElement("div")).innerText=e.name,t.classList.add("s-uploader--preview-thumbnail"),n.appendChild(t),n.classList.add("s-uploader--preview"),n.setAttribute("data-filename",e.name),this.previewsTarget.appendChild(n)}},t.prototype.handleUploaderActive=function(e){this.uploaderTarget.classList.toggle("is-active",e)},t.prototype.fileToDataURL=function(e){var n=new FileReader,r=e.name,o=e.size,i=e.type;return o<t.MAX_FILE_SIZE&&i.indexOf("image")>-1?new Promise((function(t,o){n.onload=function(e){var n,s=null===(n=null==e?void 0:e.target)||void 0===n?void 0:n.result;s?t({data:s,name:r,type:i}):o()},n.readAsDataURL(e)})):Promise.resolve({name:r,type:i})},t.prototype.getDataURLs=function(e,t){var n=this,r=Array.from(e).slice(0,Math.min(t,e.length)).map((function(e){return n.fileToDataURL(e)}));return Promise.all(r)},t.targets=["input","previews","uploader"],t.FILE_DISPLAY_LIMIT=10,t.MAX_FILE_SIZE=10485760,t}(n(36).StacksController);t.UploaderController=i},603:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),n(708);var i=n(470),s=n(36);s.application.register("s-expandable-control",i.ExpandableController),s.application.register("s-modal",i.ModalController),s.application.register("s-navigation-tablist",i.TabListController),s.application.register("s-popover",i.PopoverController),s.application.register("s-table",i.TableController),s.application.register("s-tooltip",i.TooltipController),s.application.register("s-uploader",i.UploaderController),s.StacksApplication.finalize(),o(n(470),t),o(n(36),t)},36:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.addController=t.createController=t.StacksController=t.application=t.StacksApplication=void 0;var s=n(931),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.load=function(n){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];for(var s=Array.isArray(n)?n:i([n],r,!0),a=0,c=s;a<c.length;a++){var u=c[a],l=/^s-/.test(u.identifier);if(t._initializing&&!l)throw'Stacks-created Stimulus controller names must start with "s-".';if(!t._initializing&&l)throw'The "s-" prefix on Stimulus controller names is reserved for Stacks-created controllers.'}e.prototype.load.call(this,s)},t.start=function(e,n){var r=new t(e,n);return r.start(),r},t.finalize=function(){t._initializing=!1},t._initializing=!0,t}(s.Application);t.StacksApplication=a,t.application=a.start();var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getElementData=function(e,t){return e.getAttribute("data-"+this.identifier+"-"+t)},t.prototype.setElementData=function(e,t,n){e.setAttribute("data-"+this.identifier+"-"+t,n)},t.prototype.removeElementData=function(e,t){e.removeAttribute("data-"+this.identifier+"-"+t)},t.prototype.triggerEvent=function(e,t,n){var r,o=this.identifier+":"+e;try{r=new CustomEvent(o,{bubbles:!0,cancelable:!0,detail:t})}catch(e){(r=document.createEvent("CustomEvent")).initCustomEvent(o,!0,!0,t)}return(n||this.element).dispatchEvent(r),r},t}(s.Controller);function u(e){var t,n=e.hasOwnProperty("targets")?(t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(c),t.targets=e.targets,t):function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(c);for(var r in e)"targets"!==r&&e.hasOwnProperty(r)&&Object.defineProperty(n.prototype,r,Object.getOwnPropertyDescriptor(e,r));return n}t.StacksController=c,t.createController=u,t.addController=function(e,n){t.application.register(e,u(n))}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}return n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(603)})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Stacks=t():e.Stacks=t()}(globalThis,(()=>(()=>{"use strict";var e={492:(e,t,n)=>{n.r(t),n.d(t,{afterMain:()=>O,afterRead:()=>g,afterWrite:()=>P,applyStyles:()=>M,arrow:()=>$,auto:()=>a,basePlacements:()=>c,beforeMain:()=>w,beforeRead:()=>y,beforeWrite:()=>A,bottom:()=>o,clippingParents:()=>p,computeStyles:()=>ne,createPopper:()=>Le,createPopperBase:()=>_e,createPopperLite:()=>Me,detectOverflow:()=>ye,end:()=>l,eventListeners:()=>oe,flip:()=>be,hide:()=>Ee,left:()=>s,main:()=>E,modifierPhases:()=>x,offset:()=>Oe,placements:()=>v,popper:()=>f,popperGenerator:()=>ke,popperOffsets:()=>Ae,preventOverflow:()=>Te,read:()=>b,reference:()=>h,right:()=>i,start:()=>u,top:()=>r,variationPlacements:()=>m,viewport:()=>d,write:()=>T});var r="top",o="bottom",i="right",s="left",a="auto",c=[r,o,i,s],u="start",l="end",p="clippingParents",d="viewport",f="popper",h="reference",m=c.reduce((function(e,t){return e.concat([t+"-"+u,t+"-"+l])}),[]),v=[].concat(c,[a]).reduce((function(e,t){return e.concat([t,t+"-"+u,t+"-"+l])}),[]),y="beforeRead",b="read",g="afterRead",w="beforeMain",E="main",O="afterMain",A="beforeWrite",T="write",P="afterWrite",x=[y,b,g,w,E,O,A,T,P];function j(e){return e?(e.nodeName||"").toLowerCase():null}function C(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function k(e){return e instanceof C(e).Element||e instanceof Element}function _(e){return e instanceof C(e).HTMLElement||e instanceof HTMLElement}function L(e){return"undefined"!=typeof ShadowRoot&&(e instanceof C(e).ShadowRoot||e instanceof ShadowRoot)}const M={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];_(o)&&j(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});_(r)&&j(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function S(e){return e.split("-")[0]}var B=Math.max,D=Math.min,F=Math.round;function N(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function I(){return!/^((?!chrome|android).)*safari/i.test(N())}function V(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&_(e)&&(o=e.offsetWidth>0&&F(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&F(r.height)/e.offsetHeight||1);var s=(k(e)?C(e):window).visualViewport,a=!I()&&n,c=(r.left+(a&&s?s.offsetLeft:0))/o,u=(r.top+(a&&s?s.offsetTop:0))/i,l=r.width/o,p=r.height/i;return{width:l,height:p,top:u,right:c+l,bottom:u+p,left:c,x:c,y:u}}function H(e){var t=V(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function K(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&L(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function R(e){return C(e).getComputedStyle(e)}function U(e){return["table","td","th"].indexOf(j(e))>=0}function W(e){return((k(e)?e.ownerDocument:e.document)||window.document).documentElement}function q(e){return"html"===j(e)?e:e.assignedSlot||e.parentNode||(L(e)?e.host:null)||W(e)}function z(e){return _(e)&&"fixed"!==R(e).position?e.offsetParent:null}function X(e){for(var t=C(e),n=z(e);n&&U(n)&&"static"===R(n).position;)n=z(n);return n&&("html"===j(n)||"body"===j(n)&&"static"===R(n).position)?t:n||function(e){var t=/firefox/i.test(N());if(/Trident/i.test(N())&&_(e)&&"fixed"===R(e).position)return null;var n=q(e);for(L(n)&&(n=n.host);_(n)&&["html","body"].indexOf(j(n))<0;){var r=R(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function Y(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function J(e,t,n){return B(e,D(t,n))}function Z(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function G(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}const $={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,a=e.name,u=e.options,l=n.elements.arrow,p=n.modifiersData.popperOffsets,d=S(n.placement),f=Y(d),h=[s,i].indexOf(d)>=0?"height":"width";if(l&&p){var m=function(e,t){return Z("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:G(e,c))}(u.padding,n),v=H(l),y="y"===f?r:s,b="y"===f?o:i,g=n.rects.reference[h]+n.rects.reference[f]-p[f]-n.rects.popper[h],w=p[f]-n.rects.reference[f],E=X(l),O=E?"y"===f?E.clientHeight||0:E.clientWidth||0:0,A=g/2-w/2,T=m[y],P=O-v[h]-m[b],x=O/2-v[h]/2+A,j=J(T,x,P),C=f;n.modifiersData[a]=((t={})[C]=j,t.centerOffset=j-x,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&K(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Q(e){return e.split("-")[1]}var ee={top:"auto",right:"auto",bottom:"auto",left:"auto"};function te(e){var t,n=e.popper,a=e.popperRect,c=e.placement,u=e.variation,p=e.offsets,d=e.position,f=e.gpuAcceleration,h=e.adaptive,m=e.roundOffsets,v=e.isFixed,y=p.x,b=void 0===y?0:y,g=p.y,w=void 0===g?0:g,E="function"==typeof m?m({x:b,y:w}):{x:b,y:w};b=E.x,w=E.y;var O=p.hasOwnProperty("x"),A=p.hasOwnProperty("y"),T=s,P=r,x=window;if(h){var j=X(n),k="clientHeight",_="clientWidth";j===C(n)&&"static"!==R(j=W(n)).position&&"absolute"===d&&(k="scrollHeight",_="scrollWidth"),(c===r||(c===s||c===i)&&u===l)&&(P=o,w-=(v&&j===x&&x.visualViewport?x.visualViewport.height:j[k])-a.height,w*=f?1:-1),c!==s&&(c!==r&&c!==o||u!==l)||(T=i,b-=(v&&j===x&&x.visualViewport?x.visualViewport.width:j[_])-a.width,b*=f?1:-1)}var L,M=Object.assign({position:d},h&&ee),S=!0===m?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:F(t*r)/r||0,y:F(n*r)/r||0}}({x:b,y:w}):{x:b,y:w};return b=S.x,w=S.y,f?Object.assign({},M,((L={})[P]=A?"0":"",L[T]=O?"0":"",L.transform=(x.devicePixelRatio||1)<=1?"translate("+b+"px, "+w+"px)":"translate3d("+b+"px, "+w+"px, 0)",L)):Object.assign({},M,((t={})[P]=A?w+"px":"",t[T]=O?b+"px":"",t.transform="",t))}const ne={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,s=void 0===i||i,a=n.roundOffsets,c=void 0===a||a,u={placement:S(t.placement),variation:Q(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,te(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,te(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var re={passive:!0};const oe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,s=r.resize,a=void 0===s||s,c=C(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach((function(e){e.addEventListener("scroll",n.update,re)})),a&&c.addEventListener("resize",n.update,re),function(){i&&u.forEach((function(e){e.removeEventListener("scroll",n.update,re)})),a&&c.removeEventListener("resize",n.update,re)}},data:{}};var ie={left:"right",right:"left",bottom:"top",top:"bottom"};function se(e){return e.replace(/left|right|bottom|top/g,(function(e){return ie[e]}))}var ae={start:"end",end:"start"};function ce(e){return e.replace(/start|end/g,(function(e){return ae[e]}))}function ue(e){var t=C(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function le(e){return V(W(e)).left+ue(e).scrollLeft}function pe(e){var t=R(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function de(e){return["html","body","#document"].indexOf(j(e))>=0?e.ownerDocument.body:_(e)&&pe(e)?e:de(q(e))}function fe(e,t){var n;void 0===t&&(t=[]);var r=de(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=C(r),s=o?[i].concat(i.visualViewport||[],pe(r)?r:[]):r,a=t.concat(s);return o?a:a.concat(fe(q(s)))}function he(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function me(e,t,n){return t===d?he(function(e,t){var n=C(e),r=W(e),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,c=0;if(o){i=o.width,s=o.height;var u=I();(u||!u&&"fixed"===t)&&(a=o.offsetLeft,c=o.offsetTop)}return{width:i,height:s,x:a+le(e),y:c}}(e,n)):k(t)?function(e,t){var n=V(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):he(function(e){var t,n=W(e),r=ue(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=B(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=B(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+le(e),c=-r.scrollTop;return"rtl"===R(o||n).direction&&(a+=B(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:c}}(W(e)))}function ve(e){var t,n=e.reference,a=e.element,c=e.placement,p=c?S(c):null,d=c?Q(c):null,f=n.x+n.width/2-a.width/2,h=n.y+n.height/2-a.height/2;switch(p){case r:t={x:f,y:n.y-a.height};break;case o:t={x:f,y:n.y+n.height};break;case i:t={x:n.x+n.width,y:h};break;case s:t={x:n.x-a.width,y:h};break;default:t={x:n.x,y:n.y}}var m=p?Y(p):null;if(null!=m){var v="y"===m?"height":"width";switch(d){case u:t[m]=t[m]-(n[v]/2-a[v]/2);break;case l:t[m]=t[m]+(n[v]/2-a[v]/2)}}return t}function ye(e,t){void 0===t&&(t={});var n=t,s=n.placement,a=void 0===s?e.placement:s,u=n.strategy,l=void 0===u?e.strategy:u,m=n.boundary,v=void 0===m?p:m,y=n.rootBoundary,b=void 0===y?d:y,g=n.elementContext,w=void 0===g?f:g,E=n.altBoundary,O=void 0!==E&&E,A=n.padding,T=void 0===A?0:A,P=Z("number"!=typeof T?T:G(T,c)),x=w===f?h:f,C=e.rects.popper,L=e.elements[O?x:w],M=function(e,t,n,r){var o="clippingParents"===t?function(e){var t=fe(q(e)),n=["absolute","fixed"].indexOf(R(e).position)>=0&&_(e)?X(e):e;return k(n)?t.filter((function(e){return k(e)&&K(e,n)&&"body"!==j(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),s=i[0],a=i.reduce((function(t,n){var o=me(e,n,r);return t.top=B(o.top,t.top),t.right=D(o.right,t.right),t.bottom=D(o.bottom,t.bottom),t.left=B(o.left,t.left),t}),me(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(k(L)?L:L.contextElement||W(e.elements.popper),v,b,l),S=V(e.elements.reference),F=ve({reference:S,element:C,strategy:"absolute",placement:a}),N=he(Object.assign({},C,F)),I=w===f?N:S,H={top:M.top-I.top+P.top,bottom:I.bottom-M.bottom+P.bottom,left:M.left-I.left+P.left,right:I.right-M.right+P.right},U=e.modifiersData.offset;if(w===f&&U){var z=U[a];Object.keys(H).forEach((function(e){var t=[i,o].indexOf(e)>=0?1:-1,n=[r,o].indexOf(e)>=0?"y":"x";H[e]+=z[n]*t}))}return H}const be={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,l=e.name;if(!t.modifiersData[l]._skip){for(var p=n.mainAxis,d=void 0===p||p,f=n.altAxis,h=void 0===f||f,y=n.fallbackPlacements,b=n.padding,g=n.boundary,w=n.rootBoundary,E=n.altBoundary,O=n.flipVariations,A=void 0===O||O,T=n.allowedAutoPlacements,P=t.options.placement,x=S(P),j=y||(x!==P&&A?function(e){if(S(e)===a)return[];var t=se(e);return[ce(e),t,ce(t)]}(P):[se(P)]),C=[P].concat(j).reduce((function(e,n){return e.concat(S(n)===a?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,a=n.flipVariations,u=n.allowedAutoPlacements,l=void 0===u?v:u,p=Q(r),d=p?a?m:m.filter((function(e){return Q(e)===p})):c,f=d.filter((function(e){return l.indexOf(e)>=0}));0===f.length&&(f=d);var h=f.reduce((function(t,n){return t[n]=ye(e,{placement:n,boundary:o,rootBoundary:i,padding:s})[S(n)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}(t,{placement:n,boundary:g,rootBoundary:w,padding:b,flipVariations:A,allowedAutoPlacements:T}):n)}),[]),k=t.rects.reference,_=t.rects.popper,L=new Map,M=!0,B=C[0],D=0;D<C.length;D++){var F=C[D],N=S(F),I=Q(F)===u,V=[r,o].indexOf(N)>=0,H=V?"width":"height",K=ye(t,{placement:F,boundary:g,rootBoundary:w,altBoundary:E,padding:b}),R=V?I?i:s:I?o:r;k[H]>_[H]&&(R=se(R));var U=se(R),W=[];if(d&&W.push(K[N]<=0),h&&W.push(K[R]<=0,K[U]<=0),W.every((function(e){return e}))){B=F,M=!1;break}L.set(F,W)}if(M)for(var q=function(e){var t=C.find((function(t){var n=L.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return B=t,"break"},z=A?3:1;z>0&&"break"!==q(z);z--);t.placement!==B&&(t.modifiersData[l]._skip=!0,t.placement=B,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ge(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function we(e){return[r,i,o,s].some((function(t){return e[t]>=0}))}const Ee={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,s=ye(t,{elementContext:"reference"}),a=ye(t,{altBoundary:!0}),c=ge(s,r),u=ge(a,o,i),l=we(c),p=we(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:l,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":p})}},Oe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,o=e.name,a=n.offset,c=void 0===a?[0,0]:a,u=v.reduce((function(e,n){return e[n]=function(e,t,n){var o=S(e),a=[s,r].indexOf(o)>=0?-1:1,c="function"==typeof n?n(Object.assign({},t,{placement:e})):n,u=c[0],l=c[1];return u=u||0,l=(l||0)*a,[s,i].indexOf(o)>=0?{x:l,y:u}:{x:u,y:l}}(n,t.rects,c),e}),{}),l=u[t.placement],p=l.x,d=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=p,t.modifiersData.popperOffsets.y+=d),t.modifiersData[o]=u}},Ae={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ve({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},Te={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,a=e.name,c=n.mainAxis,l=void 0===c||c,p=n.altAxis,d=void 0!==p&&p,f=n.boundary,h=n.rootBoundary,m=n.altBoundary,v=n.padding,y=n.tether,b=void 0===y||y,g=n.tetherOffset,w=void 0===g?0:g,E=ye(t,{boundary:f,rootBoundary:h,padding:v,altBoundary:m}),O=S(t.placement),A=Q(t.placement),T=!A,P=Y(O),x="x"===P?"y":"x",j=t.modifiersData.popperOffsets,C=t.rects.reference,k=t.rects.popper,_="function"==typeof w?w(Object.assign({},t.rects,{placement:t.placement})):w,L="number"==typeof _?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),M=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(j){if(l){var N,I="y"===P?r:s,V="y"===P?o:i,K="y"===P?"height":"width",R=j[P],U=R+E[I],W=R-E[V],q=b?-k[K]/2:0,z=A===u?C[K]:k[K],Z=A===u?-k[K]:-C[K],G=t.elements.arrow,$=b&&G?H(G):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[I],ne=ee[V],re=J(0,C[K],$[K]),oe=T?C[K]/2-q-re-te-L.mainAxis:z-re-te-L.mainAxis,ie=T?-C[K]/2+q+re+ne+L.mainAxis:Z+re+ne+L.mainAxis,se=t.elements.arrow&&X(t.elements.arrow),ae=se?"y"===P?se.clientTop||0:se.clientLeft||0:0,ce=null!=(N=null==M?void 0:M[P])?N:0,ue=R+ie-ce,le=J(b?D(U,R+oe-ce-ae):U,R,b?B(W,ue):W);j[P]=le,F[P]=le-R}if(d){var pe,de="x"===P?r:s,fe="x"===P?o:i,he=j[x],me="y"===x?"height":"width",ve=he+E[de],be=he-E[fe],ge=-1!==[r,s].indexOf(O),we=null!=(pe=null==M?void 0:M[x])?pe:0,Ee=ge?ve:he-C[me]-k[me]-we+L.altAxis,Oe=ge?he+C[me]+k[me]-we-L.altAxis:be,Ae=b&&ge?function(e,t,n){var r=J(e,t,n);return r>n?n:r}(Ee,he,Oe):J(b?Ee:ve,he,b?Oe:be);j[x]=Ae,F[x]=Ae-he}t.modifiersData[a]=F}},requiresIfExists:["offset"]};function Pe(e,t,n){void 0===n&&(n=!1);var r,o,i=_(t),s=_(t)&&function(e){var t=e.getBoundingClientRect(),n=F(t.width)/e.offsetWidth||1,r=F(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),a=W(t),c=V(e,s,n),u={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&(("body"!==j(t)||pe(a))&&(u=(r=t)!==C(r)&&_(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:ue(r)),_(t)?((l=V(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=le(a))),{x:c.left+u.scrollLeft-l.x,y:c.top+u.scrollTop-l.y,width:c.width,height:c.height}}function xe(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var je={placement:"bottom",modifiers:[],strategy:"absolute"};function Ce(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function ke(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?je:o;return function(e,t,n){void 0===n&&(n=i);var o,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},je,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],u=!1,l={state:a,setOptions:function(n){var o="function"==typeof n?n(a.options):n;p(),a.options=Object.assign({},i,a.options,o),a.scrollParents={reference:k(e)?fe(e):e.contextElement?fe(e.contextElement):[],popper:fe(t)};var s,u,d=function(e){var t=xe(e);return x.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((s=[].concat(r,a.options.modifiers),u=s.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(u).map((function(e){return u[e]}))));return a.orderedModifiers=d.filter((function(e){return e.enabled})),a.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:a,name:t,instance:l,options:r});c.push(i||function(){})}})),l.update()},forceUpdate:function(){if(!u){var e=a.elements,t=e.reference,n=e.popper;if(Ce(t,n)){a.rects={reference:Pe(t,X(n),"fixed"===a.options.strategy),popper:H(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(e){return a.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<a.orderedModifiers.length;r++)if(!0!==a.reset){var o=a.orderedModifiers[r],i=o.fn,s=o.options,c=void 0===s?{}:s,p=o.name;"function"==typeof i&&(a=i({state:a,options:c,name:p,instance:l})||a)}else a.reset=!1,r=-1}}},update:(o=function(){return new Promise((function(e){l.forceUpdate(),e(a)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(o())}))}))),s}),destroy:function(){p(),u=!0}};if(!Ce(e,t))return l;function p(){c.forEach((function(e){return e()})),c=[]}return l.setOptions(n).then((function(e){!u&&n.onFirstUpdate&&n.onFirstUpdate(e)})),l}}var _e=ke(),Le=ke({defaultModifiers:[oe,Ae,ne,M,Oe,be,Te,$,Ee]}),Me=ke({defaultModifiers:[oe,Ae,ne,M]})},708:(e,t,n)=>{n.r(t)},931:(e,t,n)=>{n.r(t),n.d(t,{Application:()=>U,Context:()=>A,Controller:()=>$,defaultSchema:()=>K});var r=function(){function e(e,t,n){this.eventTarget=e,this.eventName=t,this.eventOptions=n,this.unorderedBindings=new Set}return e.prototype.connect=function(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)},e.prototype.disconnect=function(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)},e.prototype.bindingConnected=function(e){this.unorderedBindings.add(e)},e.prototype.bindingDisconnected=function(e){this.unorderedBindings.delete(e)},e.prototype.handleEvent=function(e){for(var t=function(e){if("immediatePropagationStopped"in e)return e;var t=e.stopImmediatePropagation;return Object.assign(e,{immediatePropagationStopped:!1,stopImmediatePropagation:function(){this.immediatePropagationStopped=!0,t.call(this)}})}(e),n=0,r=this.bindings;n<r.length;n++){var o=r[n];if(t.immediatePropagationStopped)break;o.handleEvent(t)}},Object.defineProperty(e.prototype,"bindings",{get:function(){return Array.from(this.unorderedBindings).sort((function(e,t){var n=e.index,r=t.index;return n<r?-1:n>r?1:0}))},enumerable:!1,configurable:!0}),e}(),o=function(){function e(e){this.application=e,this.eventListenerMaps=new Map,this.started=!1}return e.prototype.start=function(){this.started||(this.started=!0,this.eventListeners.forEach((function(e){return e.connect()})))},e.prototype.stop=function(){this.started&&(this.started=!1,this.eventListeners.forEach((function(e){return e.disconnect()})))},Object.defineProperty(e.prototype,"eventListeners",{get:function(){return Array.from(this.eventListenerMaps.values()).reduce((function(e,t){return e.concat(Array.from(t.values()))}),[])},enumerable:!1,configurable:!0}),e.prototype.bindingConnected=function(e){this.fetchEventListenerForBinding(e).bindingConnected(e)},e.prototype.bindingDisconnected=function(e){this.fetchEventListenerForBinding(e).bindingDisconnected(e)},e.prototype.handleError=function(e,t,n){void 0===n&&(n={}),this.application.handleError(e,"Error "+t,n)},e.prototype.fetchEventListenerForBinding=function(e){var t=e.eventTarget,n=e.eventName,r=e.eventOptions;return this.fetchEventListener(t,n,r)},e.prototype.fetchEventListener=function(e,t,n){var r=this.fetchEventListenerMapForEventTarget(e),o=this.cacheKey(t,n),i=r.get(o);return i||(i=this.createEventListener(e,t,n),r.set(o,i)),i},e.prototype.createEventListener=function(e,t,n){var o=new r(e,t,n);return this.started&&o.connect(),o},e.prototype.fetchEventListenerMapForEventTarget=function(e){var t=this.eventListenerMaps.get(e);return t||(t=new Map,this.eventListenerMaps.set(e,t)),t},e.prototype.cacheKey=function(e,t){var n=[e];return Object.keys(t).sort().forEach((function(e){n.push((t[e]?"":"!")+e)})),n.join(":")},e}(),i=/^((.+?)(@(window|document))?->)?(.+?)(#([^:]+?))(:(.+))?$/;var s=function(){function e(e,t,n){this.element=e,this.index=t,this.eventTarget=n.eventTarget||e,this.eventName=n.eventName||function(e){var t=e.tagName.toLowerCase();if(t in a)return a[t](e)}(e)||c("missing event name"),this.eventOptions=n.eventOptions||{},this.identifier=n.identifier||c("missing identifier"),this.methodName=n.methodName||c("missing method name")}return e.forToken=function(e){return new this(e.element,e.index,(n=e.content,{eventTarget:(t=(o=n.trim().match(i)||[])[4],"window"==t?window:"document"==t?document:void 0),eventName:o[2],eventOptions:o[9]?(r=o[9],r.split(":").reduce((function(e,t){var n;return Object.assign(e,((n={})[t.replace(/^!/,"")]=!/^!/.test(t),n))}),{})):{},identifier:o[5],methodName:o[7]}));var t,n,r,o},e.prototype.toString=function(){var e=this.eventTargetName?"@"+this.eventTargetName:"";return""+this.eventName+e+"->"+this.identifier+"#"+this.methodName},Object.defineProperty(e.prototype,"eventTargetName",{get:function(){return(e=this.eventTarget)==window?"window":e==document?"document":void 0;var e},enumerable:!1,configurable:!0}),e}(),a={a:function(e){return"click"},button:function(e){return"click"},form:function(e){return"submit"},input:function(e){return"submit"==e.getAttribute("type")?"click":"input"},select:function(e){return"change"},textarea:function(e){return"input"}};function c(e){throw new Error(e)}var u=function(){function e(e,t){this.context=e,this.action=t}return Object.defineProperty(e.prototype,"index",{get:function(){return this.action.index},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"eventTarget",{get:function(){return this.action.eventTarget},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"eventOptions",{get:function(){return this.action.eventOptions},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.context.identifier},enumerable:!1,configurable:!0}),e.prototype.handleEvent=function(e){this.willBeInvokedByEvent(e)&&this.invokeWithEvent(e)},Object.defineProperty(e.prototype,"eventName",{get:function(){return this.action.eventName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"method",{get:function(){var e=this.controller[this.methodName];if("function"==typeof e)return e;throw new Error('Action "'+this.action+'" references undefined method "'+this.methodName+'"')},enumerable:!1,configurable:!0}),e.prototype.invokeWithEvent=function(e){try{this.method.call(this.controller,e)}catch(r){var t=this,n={identifier:t.identifier,controller:t.controller,element:t.element,index:t.index,event:e};this.context.handleError(r,'invoking action "'+this.action+'"',n)}},e.prototype.willBeInvokedByEvent=function(e){var t=e.target;return this.element===t||(t instanceof Element&&this.element.contains(t)?this.scope.containsElement(t):this.scope.containsElement(this.action.element))},Object.defineProperty(e.prototype,"controller",{get:function(){return this.context.controller},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"methodName",{get:function(){return this.action.methodName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.scope.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scope",{get:function(){return this.context.scope},enumerable:!1,configurable:!0}),e}(),l=function(){function e(e,t){var n=this;this.element=e,this.started=!1,this.delegate=t,this.elements=new Set,this.mutationObserver=new MutationObserver((function(e){return n.processMutations(e)}))}return e.prototype.start=function(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,childList:!0,subtree:!0}),this.refresh())},e.prototype.stop=function(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)},e.prototype.refresh=function(){if(this.started){for(var e=new Set(this.matchElementsInTree()),t=0,n=Array.from(this.elements);t<n.length;t++){var r=n[t];e.has(r)||this.removeElement(r)}for(var o=0,i=Array.from(e);o<i.length;o++)r=i[o],this.addElement(r)}},e.prototype.processMutations=function(e){if(this.started)for(var t=0,n=e;t<n.length;t++){var r=n[t];this.processMutation(r)}},e.prototype.processMutation=function(e){"attributes"==e.type?this.processAttributeChange(e.target,e.attributeName):"childList"==e.type&&(this.processRemovedNodes(e.removedNodes),this.processAddedNodes(e.addedNodes))},e.prototype.processAttributeChange=function(e,t){var n=e;this.elements.has(n)?this.delegate.elementAttributeChanged&&this.matchElement(n)?this.delegate.elementAttributeChanged(n,t):this.removeElement(n):this.matchElement(n)&&this.addElement(n)},e.prototype.processRemovedNodes=function(e){for(var t=0,n=Array.from(e);t<n.length;t++){var r=n[t],o=this.elementFromNode(r);o&&this.processTree(o,this.removeElement)}},e.prototype.processAddedNodes=function(e){for(var t=0,n=Array.from(e);t<n.length;t++){var r=n[t],o=this.elementFromNode(r);o&&this.elementIsActive(o)&&this.processTree(o,this.addElement)}},e.prototype.matchElement=function(e){return this.delegate.matchElement(e)},e.prototype.matchElementsInTree=function(e){return void 0===e&&(e=this.element),this.delegate.matchElementsInTree(e)},e.prototype.processTree=function(e,t){for(var n=0,r=this.matchElementsInTree(e);n<r.length;n++){var o=r[n];t.call(this,o)}},e.prototype.elementFromNode=function(e){if(e.nodeType==Node.ELEMENT_NODE)return e},e.prototype.elementIsActive=function(e){return e.isConnected==this.element.isConnected&&this.element.contains(e)},e.prototype.addElement=function(e){this.elements.has(e)||this.elementIsActive(e)&&(this.elements.add(e),this.delegate.elementMatched&&this.delegate.elementMatched(e))},e.prototype.removeElement=function(e){this.elements.has(e)&&(this.elements.delete(e),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(e))},e}(),p=function(){function e(e,t,n){this.attributeName=t,this.delegate=n,this.elementObserver=new l(e,this)}return Object.defineProperty(e.prototype,"element",{get:function(){return this.elementObserver.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selector",{get:function(){return"["+this.attributeName+"]"},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.elementObserver.start()},e.prototype.stop=function(){this.elementObserver.stop()},e.prototype.refresh=function(){this.elementObserver.refresh()},Object.defineProperty(e.prototype,"started",{get:function(){return this.elementObserver.started},enumerable:!1,configurable:!0}),e.prototype.matchElement=function(e){return e.hasAttribute(this.attributeName)},e.prototype.matchElementsInTree=function(e){var t=this.matchElement(e)?[e]:[],n=Array.from(e.querySelectorAll(this.selector));return t.concat(n)},e.prototype.elementMatched=function(e){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(e,this.attributeName)},e.prototype.elementUnmatched=function(e){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(e,this.attributeName)},e.prototype.elementAttributeChanged=function(e,t){this.delegate.elementAttributeValueChanged&&this.attributeName==t&&this.delegate.elementAttributeValueChanged(e,t)},e}(),d=function(){function e(e,t){var n=this;this.element=e,this.delegate=t,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver((function(e){return n.processMutations(e)}))}return e.prototype.start=function(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0}),this.refresh())},e.prototype.stop=function(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)},e.prototype.refresh=function(){if(this.started)for(var e=0,t=this.knownAttributeNames;e<t.length;e++){var n=t[e];this.refreshAttribute(n)}},e.prototype.processMutations=function(e){if(this.started)for(var t=0,n=e;t<n.length;t++){var r=n[t];this.processMutation(r)}},e.prototype.processMutation=function(e){var t=e.attributeName;t&&this.refreshAttribute(t)},e.prototype.refreshAttribute=function(e){var t=this.delegate.getStringMapKeyForAttribute(e);if(null!=t){this.stringMap.has(e)||this.stringMapKeyAdded(t,e);var n=this.element.getAttribute(e);this.stringMap.get(e)!=n&&this.stringMapValueChanged(n,t),null==n?(this.stringMap.delete(e),this.stringMapKeyRemoved(t,e)):this.stringMap.set(e,n)}},e.prototype.stringMapKeyAdded=function(e,t){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(e,t)},e.prototype.stringMapValueChanged=function(e,t){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(e,t)},e.prototype.stringMapKeyRemoved=function(e,t){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(e,t)},Object.defineProperty(e.prototype,"knownAttributeNames",{get:function(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentAttributeNames",{get:function(){return Array.from(this.element.attributes).map((function(e){return e.name}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"recordedAttributeNames",{get:function(){return Array.from(this.stringMap.keys())},enumerable:!1,configurable:!0}),e}();function f(e,t,n){m(e,t).add(n)}function h(e,t,n){m(e,t).delete(n),function(e,t){var n=e.get(t);null!=n&&0==n.size&&e.delete(t)}(e,t)}function m(e,t){var n=e.get(t);return n||(n=new Set,e.set(t,n)),n}var v,y=function(){function e(){this.valuesByKey=new Map}return Object.defineProperty(e.prototype,"values",{get:function(){return Array.from(this.valuesByKey.values()).reduce((function(e,t){return e.concat(Array.from(t))}),[])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return Array.from(this.valuesByKey.values()).reduce((function(e,t){return e+t.size}),0)},enumerable:!1,configurable:!0}),e.prototype.add=function(e,t){f(this.valuesByKey,e,t)},e.prototype.delete=function(e,t){h(this.valuesByKey,e,t)},e.prototype.has=function(e,t){var n=this.valuesByKey.get(e);return null!=n&&n.has(t)},e.prototype.hasKey=function(e){return this.valuesByKey.has(e)},e.prototype.hasValue=function(e){return Array.from(this.valuesByKey.values()).some((function(t){return t.has(e)}))},e.prototype.getValuesForKey=function(e){var t=this.valuesByKey.get(e);return t?Array.from(t):[]},e.prototype.getKeysForValue=function(e){return Array.from(this.valuesByKey).filter((function(t){return t[0],t[1].has(e)})).map((function(e){var t=e[0];return e[1],t}))},e}(),b=(v=function(e,t){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},v(e,t)},function(e,t){function n(){this.constructor=e}v(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),g=(function(e){function t(){var t=e.call(this)||this;return t.keysByValue=new Map,t}b(t,e),Object.defineProperty(t.prototype,"values",{get:function(){return Array.from(this.keysByValue.keys())},enumerable:!1,configurable:!0}),t.prototype.add=function(t,n){e.prototype.add.call(this,t,n),f(this.keysByValue,n,t)},t.prototype.delete=function(t,n){e.prototype.delete.call(this,t,n),h(this.keysByValue,n,t)},t.prototype.hasValue=function(e){return this.keysByValue.has(e)},t.prototype.getKeysForValue=function(e){var t=this.keysByValue.get(e);return t?Array.from(t):[]}}(y),function(){function e(e,t,n){this.attributeObserver=new p(e,t,this),this.delegate=n,this.tokensByElement=new y}return Object.defineProperty(e.prototype,"started",{get:function(){return this.attributeObserver.started},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.attributeObserver.start()},e.prototype.stop=function(){this.attributeObserver.stop()},e.prototype.refresh=function(){this.attributeObserver.refresh()},Object.defineProperty(e.prototype,"element",{get:function(){return this.attributeObserver.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributeName",{get:function(){return this.attributeObserver.attributeName},enumerable:!1,configurable:!0}),e.prototype.elementMatchedAttribute=function(e){this.tokensMatched(this.readTokensForElement(e))},e.prototype.elementAttributeValueChanged=function(e){var t=this.refreshTokensForElement(e),n=t[0],r=t[1];this.tokensUnmatched(n),this.tokensMatched(r)},e.prototype.elementUnmatchedAttribute=function(e){this.tokensUnmatched(this.tokensByElement.getValuesForKey(e))},e.prototype.tokensMatched=function(e){var t=this;e.forEach((function(e){return t.tokenMatched(e)}))},e.prototype.tokensUnmatched=function(e){var t=this;e.forEach((function(e){return t.tokenUnmatched(e)}))},e.prototype.tokenMatched=function(e){this.delegate.tokenMatched(e),this.tokensByElement.add(e.element,e)},e.prototype.tokenUnmatched=function(e){this.delegate.tokenUnmatched(e),this.tokensByElement.delete(e.element,e)},e.prototype.refreshTokensForElement=function(e){var t,n,r,o=this.tokensByElement.getValuesForKey(e),i=this.readTokensForElement(e),s=(t=o,n=i,r=Math.max(t.length,n.length),Array.from({length:r},(function(e,r){return[t[r],n[r]]}))).findIndex((function(e){return!function(e,t){return e&&t&&e.index==t.index&&e.content==t.content}(e[0],e[1])}));return-1==s?[[],[]]:[o.slice(s),i.slice(s)]},e.prototype.readTokensForElement=function(e){var t=this.attributeName;return function(e,t,n){return e.trim().split(/\s+/).filter((function(e){return e.length})).map((function(e,r){return{element:t,attributeName:n,content:e,index:r}}))}(e.getAttribute(t)||"",e,t)},e}()),w=function(){function e(e,t,n){this.tokenListObserver=new g(e,t,this),this.delegate=n,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}return Object.defineProperty(e.prototype,"started",{get:function(){return this.tokenListObserver.started},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.tokenListObserver.start()},e.prototype.stop=function(){this.tokenListObserver.stop()},e.prototype.refresh=function(){this.tokenListObserver.refresh()},Object.defineProperty(e.prototype,"element",{get:function(){return this.tokenListObserver.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributeName",{get:function(){return this.tokenListObserver.attributeName},enumerable:!1,configurable:!0}),e.prototype.tokenMatched=function(e){var t=e.element,n=this.fetchParseResultForToken(e).value;n&&(this.fetchValuesByTokenForElement(t).set(e,n),this.delegate.elementMatchedValue(t,n))},e.prototype.tokenUnmatched=function(e){var t=e.element,n=this.fetchParseResultForToken(e).value;n&&(this.fetchValuesByTokenForElement(t).delete(e),this.delegate.elementUnmatchedValue(t,n))},e.prototype.fetchParseResultForToken=function(e){var t=this.parseResultsByToken.get(e);return t||(t=this.parseToken(e),this.parseResultsByToken.set(e,t)),t},e.prototype.fetchValuesByTokenForElement=function(e){var t=this.valuesByTokenByElement.get(e);return t||(t=new Map,this.valuesByTokenByElement.set(e,t)),t},e.prototype.parseToken=function(e){try{return{value:this.delegate.parseValueForToken(e)}}catch(e){return{error:e}}},e}(),E=function(){function e(e,t){this.context=e,this.delegate=t,this.bindingsByAction=new Map}return e.prototype.start=function(){this.valueListObserver||(this.valueListObserver=new w(this.element,this.actionAttribute,this),this.valueListObserver.start())},e.prototype.stop=function(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())},Object.defineProperty(e.prototype,"element",{get:function(){return this.context.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.context.identifier},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"actionAttribute",{get:function(){return this.schema.actionAttribute},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return this.context.schema},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bindings",{get:function(){return Array.from(this.bindingsByAction.values())},enumerable:!1,configurable:!0}),e.prototype.connectAction=function(e){var t=new u(this.context,e);this.bindingsByAction.set(e,t),this.delegate.bindingConnected(t)},e.prototype.disconnectAction=function(e){var t=this.bindingsByAction.get(e);t&&(this.bindingsByAction.delete(e),this.delegate.bindingDisconnected(t))},e.prototype.disconnectAllActions=function(){var e=this;this.bindings.forEach((function(t){return e.delegate.bindingDisconnected(t)})),this.bindingsByAction.clear()},e.prototype.parseValueForToken=function(e){var t=s.forToken(e);if(t.identifier==this.identifier)return t},e.prototype.elementMatchedValue=function(e,t){this.connectAction(t)},e.prototype.elementUnmatchedValue=function(e,t){this.disconnectAction(t)},e}(),O=function(){function e(e,t){this.context=e,this.receiver=t,this.stringMapObserver=new d(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap,this.invokeChangedCallbacksForDefaultValues()}return e.prototype.start=function(){this.stringMapObserver.start()},e.prototype.stop=function(){this.stringMapObserver.stop()},Object.defineProperty(e.prototype,"element",{get:function(){return this.context.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controller",{get:function(){return this.context.controller},enumerable:!1,configurable:!0}),e.prototype.getStringMapKeyForAttribute=function(e){if(e in this.valueDescriptorMap)return this.valueDescriptorMap[e].name},e.prototype.stringMapValueChanged=function(e,t){this.invokeChangedCallbackForValue(t)},e.prototype.invokeChangedCallbacksForDefaultValues=function(){for(var e=0,t=this.valueDescriptors;e<t.length;e++){var n=t[e],r=n.key,o=n.name;null==n.defaultValue||this.controller.data.has(r)||this.invokeChangedCallbackForValue(o)}},e.prototype.invokeChangedCallbackForValue=function(e){var t=e+"Changed",n=this.receiver[t];if("function"==typeof n){var r=this.receiver[e];n.call(this.receiver,r)}},Object.defineProperty(e.prototype,"valueDescriptors",{get:function(){var e=this.valueDescriptorMap;return Object.keys(e).map((function(t){return e[t]}))},enumerable:!1,configurable:!0}),e}(),A=function(){function e(e,t){this.module=e,this.scope=t,this.controller=new e.controllerConstructor(this),this.bindingObserver=new E(this,this.dispatcher),this.valueObserver=new O(this,this.controller);try{this.controller.initialize()}catch(e){this.handleError(e,"initializing controller")}}return e.prototype.connect=function(){this.bindingObserver.start(),this.valueObserver.start();try{this.controller.connect()}catch(e){this.handleError(e,"connecting controller")}},e.prototype.disconnect=function(){try{this.controller.disconnect()}catch(e){this.handleError(e,"disconnecting controller")}this.valueObserver.stop(),this.bindingObserver.stop()},Object.defineProperty(e.prototype,"application",{get:function(){return this.module.application},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.module.identifier},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return this.application.schema},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dispatcher",{get:function(){return this.application.dispatcher},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.scope.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return this.element.parentElement},enumerable:!1,configurable:!0}),e.prototype.handleError=function(e,t,n){void 0===n&&(n={});var r=this,o=r.identifier,i=r.controller,s=r.element;n=Object.assign({identifier:o,controller:i,element:s},n),this.application.handleError(e,"Error "+t,n)},e}();function T(e,t){var n=P(e);return Array.from(n.reduce((function(e,n){return function(e,t){var n=e[t];return Array.isArray(n)?n:[]}(n,t).forEach((function(t){return e.add(t)})),e}),new Set))}function P(e){for(var t=[];e;)t.push(e),e=Object.getPrototypeOf(e);return t.reverse()}var x=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();var j="function"==typeof Object.getOwnPropertySymbols?function(e){return function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r}(Object.getOwnPropertyNames(e),Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,C=function(){function e(e){function t(){var n=this&&this instanceof t?this.constructor:void 0;return Reflect.construct(e,arguments,n)}return t.prototype=Object.create(e.prototype,{constructor:{value:t}}),Reflect.setPrototypeOf(t,e),t}try{return(t=e((function(){this.a.call(this)}))).prototype.a=function(){},new t,e}catch(e){return function(e){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return x(t,e),t}(e)}}var t}(),k=function(){function e(e,t){this.application=e,this.definition=function(e){return{identifier:e.identifier,controllerConstructor:(t=e.controllerConstructor,function(e,t){var n=C(e),r=function(e,t){return j(t).reduce((function(n,r){var o,i=function(e,t,n){var r=Object.getOwnPropertyDescriptor(e,n);if(!r||!("value"in r)){var o=Object.getOwnPropertyDescriptor(t,n).value;return r&&(o.get=r.get||o.get,o.set=r.set||o.set),o}}(e,t,r);return i&&Object.assign(n,((o={})[r]=i,o)),n}),{})}(e.prototype,t);return Object.defineProperties(n.prototype,r),n}(t,function(e){return T(e,"blessings").reduce((function(t,n){var r=n(e);for(var o in r){var i=t[o]||{};t[o]=Object.assign(i,r[o])}return t}),{})}(t)))};var t}(t),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}return Object.defineProperty(e.prototype,"identifier",{get:function(){return this.definition.identifier},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controllerConstructor",{get:function(){return this.definition.controllerConstructor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"contexts",{get:function(){return Array.from(this.connectedContexts)},enumerable:!1,configurable:!0}),e.prototype.connectContextForScope=function(e){var t=this.fetchContextForScope(e);this.connectedContexts.add(t),t.connect()},e.prototype.disconnectContextForScope=function(e){var t=this.contextsByScope.get(e);t&&(this.connectedContexts.delete(t),t.disconnect())},e.prototype.fetchContextForScope=function(e){var t=this.contextsByScope.get(e);return t||(t=new A(this,e),this.contextsByScope.set(e,t)),t},e}(),_=function(){function e(e){this.scope=e}return e.prototype.has=function(e){return this.data.has(this.getDataKey(e))},e.prototype.get=function(e){return this.data.get(this.getDataKey(e))},e.prototype.getAttributeName=function(e){return this.data.getAttributeNameForKey(this.getDataKey(e))},e.prototype.getDataKey=function(e){return e+"-class"},Object.defineProperty(e.prototype,"data",{get:function(){return this.scope.data},enumerable:!1,configurable:!0}),e}();function L(e){return e.charAt(0).toUpperCase()+e.slice(1)}function M(e){return e.replace(/([A-Z])/g,(function(e,t){return"-"+t.toLowerCase()}))}var S=function(){function e(e){this.scope=e}return Object.defineProperty(e.prototype,"element",{get:function(){return this.scope.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.scope.identifier},enumerable:!1,configurable:!0}),e.prototype.get=function(e){var t=this.getAttributeNameForKey(e);return this.element.getAttribute(t)},e.prototype.set=function(e,t){var n=this.getAttributeNameForKey(e);return this.element.setAttribute(n,t),this.get(e)},e.prototype.has=function(e){var t=this.getAttributeNameForKey(e);return this.element.hasAttribute(t)},e.prototype.delete=function(e){if(this.has(e)){var t=this.getAttributeNameForKey(e);return this.element.removeAttribute(t),!0}return!1},e.prototype.getAttributeNameForKey=function(e){return"data-"+this.identifier+"-"+M(e)},e}(),B=function(){function e(e){this.warnedKeysByObject=new WeakMap,this.logger=e}return e.prototype.warn=function(e,t,n){var r=this.warnedKeysByObject.get(e);r||(r=new Set,this.warnedKeysByObject.set(e,r)),r.has(t)||(r.add(t),this.logger.warn(n,e))},e}();function D(e,t){return"["+e+'~="'+t+'"]'}var F=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r},N=function(){function e(e){this.scope=e}return Object.defineProperty(e.prototype,"element",{get:function(){return this.scope.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.scope.identifier},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return this.scope.schema},enumerable:!1,configurable:!0}),e.prototype.has=function(e){return null!=this.find(e)},e.prototype.find=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.reduce((function(t,n){return t||e.findTarget(n)||e.findLegacyTarget(n)}),void 0)},e.prototype.findAll=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.reduce((function(t,n){return F(t,e.findAllTargets(n),e.findAllLegacyTargets(n))}),[])},e.prototype.findTarget=function(e){var t=this.getSelectorForTargetName(e);return this.scope.findElement(t)},e.prototype.findAllTargets=function(e){var t=this.getSelectorForTargetName(e);return this.scope.findAllElements(t)},e.prototype.getSelectorForTargetName=function(e){return D("data-"+this.identifier+"-target",e)},e.prototype.findLegacyTarget=function(e){var t=this.getLegacySelectorForTargetName(e);return this.deprecate(this.scope.findElement(t),e)},e.prototype.findAllLegacyTargets=function(e){var t=this,n=this.getLegacySelectorForTargetName(e);return this.scope.findAllElements(n).map((function(n){return t.deprecate(n,e)}))},e.prototype.getLegacySelectorForTargetName=function(e){var t=this.identifier+"."+e;return D(this.schema.targetAttribute,t)},e.prototype.deprecate=function(e,t){if(e){var n=this.identifier,r=this.schema.targetAttribute;this.guide.warn(e,"target:"+t,"Please replace "+r+'="'+n+"."+t+'" with data-'+n+'-target="'+t+'". The '+r+" attribute is deprecated and will be removed in a future version of Stimulus.")}return e},Object.defineProperty(e.prototype,"guide",{get:function(){return this.scope.guide},enumerable:!1,configurable:!0}),e}(),I=function(){function e(e,t,n,r){var o=this;this.targets=new N(this),this.classes=new _(this),this.data=new S(this),this.containsElement=function(e){return e.closest(o.controllerSelector)===o.element},this.schema=e,this.element=t,this.identifier=n,this.guide=new B(r)}return e.prototype.findElement=function(e){return this.element.matches(e)?this.element:this.queryElements(e).find(this.containsElement)},e.prototype.findAllElements=function(e){return function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r}(this.element.matches(e)?[this.element]:[],this.queryElements(e).filter(this.containsElement))},e.prototype.queryElements=function(e){return Array.from(this.element.querySelectorAll(e))},Object.defineProperty(e.prototype,"controllerSelector",{get:function(){return D(this.schema.controllerAttribute,this.identifier)},enumerable:!1,configurable:!0}),e}(),V=function(){function e(e,t,n){this.element=e,this.schema=t,this.delegate=n,this.valueListObserver=new w(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}return e.prototype.start=function(){this.valueListObserver.start()},e.prototype.stop=function(){this.valueListObserver.stop()},Object.defineProperty(e.prototype,"controllerAttribute",{get:function(){return this.schema.controllerAttribute},enumerable:!1,configurable:!0}),e.prototype.parseValueForToken=function(e){var t=e.element,n=e.content,r=this.fetchScopesByIdentifierForElement(t),o=r.get(n);return o||(o=this.delegate.createScopeForElementAndIdentifier(t,n),r.set(n,o)),o},e.prototype.elementMatchedValue=function(e,t){var n=(this.scopeReferenceCounts.get(t)||0)+1;this.scopeReferenceCounts.set(t,n),1==n&&this.delegate.scopeConnected(t)},e.prototype.elementUnmatchedValue=function(e,t){var n=this.scopeReferenceCounts.get(t);n&&(this.scopeReferenceCounts.set(t,n-1),1==n&&this.delegate.scopeDisconnected(t))},e.prototype.fetchScopesByIdentifierForElement=function(e){var t=this.scopesByIdentifierByElement.get(e);return t||(t=new Map,this.scopesByIdentifierByElement.set(e,t)),t},e}(),H=function(){function e(e){this.application=e,this.scopeObserver=new V(this.element,this.schema,this),this.scopesByIdentifier=new y,this.modulesByIdentifier=new Map}return Object.defineProperty(e.prototype,"element",{get:function(){return this.application.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return this.application.schema},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logger",{get:function(){return this.application.logger},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controllerAttribute",{get:function(){return this.schema.controllerAttribute},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modules",{get:function(){return Array.from(this.modulesByIdentifier.values())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"contexts",{get:function(){return this.modules.reduce((function(e,t){return e.concat(t.contexts)}),[])},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.scopeObserver.start()},e.prototype.stop=function(){this.scopeObserver.stop()},e.prototype.loadDefinition=function(e){this.unloadIdentifier(e.identifier);var t=new k(this.application,e);this.connectModule(t)},e.prototype.unloadIdentifier=function(e){var t=this.modulesByIdentifier.get(e);t&&this.disconnectModule(t)},e.prototype.getContextForElementAndIdentifier=function(e,t){var n=this.modulesByIdentifier.get(t);if(n)return n.contexts.find((function(t){return t.element==e}))},e.prototype.handleError=function(e,t,n){this.application.handleError(e,t,n)},e.prototype.createScopeForElementAndIdentifier=function(e,t){return new I(this.schema,e,t,this.logger)},e.prototype.scopeConnected=function(e){this.scopesByIdentifier.add(e.identifier,e);var t=this.modulesByIdentifier.get(e.identifier);t&&t.connectContextForScope(e)},e.prototype.scopeDisconnected=function(e){this.scopesByIdentifier.delete(e.identifier,e);var t=this.modulesByIdentifier.get(e.identifier);t&&t.disconnectContextForScope(e)},e.prototype.connectModule=function(e){this.modulesByIdentifier.set(e.identifier,e),this.scopesByIdentifier.getValuesForKey(e.identifier).forEach((function(t){return e.connectContextForScope(t)}))},e.prototype.disconnectModule=function(e){this.modulesByIdentifier.delete(e.identifier),this.scopesByIdentifier.getValuesForKey(e.identifier).forEach((function(t){return e.disconnectContextForScope(t)}))},e}(),K={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target"},R=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r},U=function(){function e(e,t){void 0===e&&(e=document.documentElement),void 0===t&&(t=K),this.logger=console,this.element=e,this.schema=t,this.dispatcher=new o(this),this.router=new H(this)}return e.start=function(t,n){var r=new e(t,n);return r.start(),r},e.prototype.start=function(){return e=this,t=void 0,r=function(){return function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}(this,(function(e){switch(e.label){case 0:return[4,new Promise((function(e){"loading"==document.readyState?document.addEventListener("DOMContentLoaded",e):e()}))];case 1:return e.sent(),this.dispatcher.start(),this.router.start(),[2]}}))},new((n=void 0)||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}));var e,t,n,r},e.prototype.stop=function(){this.dispatcher.stop(),this.router.stop()},e.prototype.register=function(e,t){this.load({identifier:e,controllerConstructor:t})},e.prototype.load=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=Array.isArray(e)?e:R([e],n);o.forEach((function(e){return t.router.loadDefinition(e)}))},e.prototype.unload=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=Array.isArray(e)?e:R([e],n);o.forEach((function(e){return t.router.unloadIdentifier(e)}))},Object.defineProperty(e.prototype,"controllers",{get:function(){return this.router.contexts.map((function(e){return e.controller}))},enumerable:!1,configurable:!0}),e.prototype.getControllerForElementAndIdentifier=function(e,t){var n=this.router.getContextForElementAndIdentifier(e,t);return n?n.controller:null},e.prototype.handleError=function(e,t,n){this.logger.error("%s\n\n%o\n\n%o",t,e,n)},e}();function W(e){return T(e,"classes").reduce((function(e,t){return Object.assign(e,((r={})[o=(n=t)+"Class"]={get:function(){var e=this.classes;if(e.has(n))return e.get(n);var t=e.getAttributeName(n);throw new Error('Missing attribute "'+t+'"')}},r["has"+L(o)]={get:function(){return this.classes.has(n)}},r));var n,r,o}),{})}function q(e){return T(e,"targets").reduce((function(e,t){return Object.assign(e,((r={})[(n=t)+"Target"]={get:function(){var e=this.targets.find(n);if(e)return e;throw new Error('Missing target element "'+this.identifier+"."+n+'"')}},r[n+"Targets"]={get:function(){return this.targets.findAll(n)}},r["has"+L(n)+"Target"]={get:function(){return this.targets.has(n)}},r));var n,r}),{})}function z(e){var t=function(e,t){return P(e).reduce((function(e,n){return e.push.apply(e,function(e,t){var n=e[t];return n?Object.keys(n).map((function(e){return[e,n[e]]})):[]}(n,t)),e}),[])}(e,"values"),n={valueDescriptorMap:{get:function(){var e=this;return t.reduce((function(t,n){var r,o=X(n),i=e.data.getAttributeNameForKey(o.key);return Object.assign(t,((r={})[i]=o,r))}),{})}}};return t.reduce((function(e,t){return Object.assign(e,function(e){var t,n=X(e),r=n.type,o=n.key,i=n.name,s=J[r],a=Z[r]||Z.default;return(t={})[i]={get:function(){var e=this.data.get(o);return null!==e?s(e):n.defaultValue},set:function(e){void 0===e?this.data.delete(o):this.data.set(o,a(e))}},t["has"+L(i)]={get:function(){return this.data.has(o)}},t}(t))}),n)}function X(e){return function(e,t){var n,r=M(e)+"-value";return{type:t,key:r,name:(n=r,n.replace(/(?:[_-])([a-z0-9])/g,(function(e,t){return t.toUpperCase()}))),get defaultValue(){return Y[t]}}}(e[0],function(e){switch(e){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}throw new Error('Unknown value type constant "'+e+'"')}(e[1]))}var Y={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},J={array:function(e){var t=JSON.parse(e);if(!Array.isArray(t))throw new TypeError("Expected array");return t},boolean:function(e){return!("0"==e||"false"==e)},number:function(e){return parseFloat(e)},object:function(e){var t=JSON.parse(e);if(null===t||"object"!=typeof t||Array.isArray(t))throw new TypeError("Expected object");return t},string:function(e){return e}},Z={default:function(e){return""+e},array:G,object:G};function G(e){return JSON.stringify(e)}var $=function(){function e(e){this.context=e}return Object.defineProperty(e.prototype,"application",{get:function(){return this.context.application},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scope",{get:function(){return this.context.scope},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.scope.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.scope.identifier},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targets",{get:function(){return this.scope.targets},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classes",{get:function(){return this.scope.classes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.scope.data},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){},e.prototype.connect=function(){},e.prototype.disconnect=function(){},e.blessings=[W,q,z],e.targets=[],e.values={},e}()},470:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UploaderController=t.TooltipController=t.setTooltipText=t.setTooltipHtml=t.TableController=t.showPopover=t.PopoverController=t.BasePopoverController=t.hidePopover=t.detachPopover=t.attachPopover=t.TabListController=t.showModal=t.ModalController=t.hideModal=t.ExpandableController=void 0;var r=n(601);Object.defineProperty(t,"ExpandableController",{enumerable:!0,get:function(){return r.ExpandableController}});var o=n(181);Object.defineProperty(t,"hideModal",{enumerable:!0,get:function(){return o.hideModal}}),Object.defineProperty(t,"ModalController",{enumerable:!0,get:function(){return o.ModalController}}),Object.defineProperty(t,"showModal",{enumerable:!0,get:function(){return o.showModal}});var i=n(642);Object.defineProperty(t,"TabListController",{enumerable:!0,get:function(){return i.TabListController}});var s=n(388);Object.defineProperty(t,"attachPopover",{enumerable:!0,get:function(){return s.attachPopover}}),Object.defineProperty(t,"detachPopover",{enumerable:!0,get:function(){return s.detachPopover}}),Object.defineProperty(t,"hidePopover",{enumerable:!0,get:function(){return s.hidePopover}}),Object.defineProperty(t,"BasePopoverController",{enumerable:!0,get:function(){return s.BasePopoverController}}),Object.defineProperty(t,"PopoverController",{enumerable:!0,get:function(){return s.PopoverController}}),Object.defineProperty(t,"showPopover",{enumerable:!0,get:function(){return s.showPopover}});var a=n(753);Object.defineProperty(t,"TableController",{enumerable:!0,get:function(){return a.TableController}});var c=n(355);Object.defineProperty(t,"setTooltipHtml",{enumerable:!0,get:function(){return c.setTooltipHtml}}),Object.defineProperty(t,"setTooltipText",{enumerable:!0,get:function(){return c.setTooltipText}}),Object.defineProperty(t,"TooltipController",{enumerable:!0,get:function(){return c.TooltipController}});var u=n(637);Object.defineProperty(t,"UploaderController",{enumerable:!0,get:function(){return u.UploaderController}})},601:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ExpandableController=void 0;var i=n(36),s="s-expandable-control:radio-off";function a(e){var t=e.target;t instanceof HTMLInputElement&&"INPUT"===t.nodeName&&"radio"===t.type&&document.querySelectorAll('input[type="radio"][name="'+t.name+'"]').forEach((function(t){if(t!==e.target){var n;try{n=new Event(s)}catch(e){(n=document.createEvent("Event")).initEvent(s,!0,!0)}t.dispatchEvent(n)}}))}var c=0;function u(e){e?1==++c&&document.body.addEventListener("change",a):0==--c&&document.body.removeEventListener("change",a)}var l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lastKeydownClickTimestamp=0,t}return o(t,e),t.prototype.initialize=function(){"INPUT"===this.element.nodeName&&["radio","checkbox"].indexOf(this.element.type)>=0?(this.isCollapsed=this._isCollapsedForCheckable.bind(this),this.events=["change",s],this.isCheckable=!0,this.isRadio="radio"===this.element.type):(this.isCollapsed=this._isCollapsedForClickable.bind(this),this.events=["click","keydown"]),this.listener=this.listener.bind(this)},t.prototype._isCollapsedForClickable=function(){var e=this.controlledExpandables;return e.length>0?!e.every((function(e){return e.classList.contains("is-expanded")})):"false"===this.element.getAttribute("aria-expanded")},t.prototype._isCollapsedForCheckable=function(){return!this.element.checked},Object.defineProperty(t.prototype,"controlledExpandables",{get:function(){var e=this.element.getAttribute("aria-controls");if(!e)throw'[aria-controls="targetId1 ... targetIdN"] attribute required';var t=e.split(/\s+/g).map((function(e){return document.getElementById(e)})).filter((function(e){return!!e}));if(!t.length)throw"couldn't find controls";return t},enumerable:!1,configurable:!0}),t.prototype._dispatchShowHideEvent=function(e){this.triggerEvent(e?"show":"hide")},t.prototype._toggleClass=function(e){if(this.data.has("toggle-class")){var t=this.element.classList,n=this.data.get("toggle-class");if(!n)throw"couldn't find toggle class";n.split(/\s+/).forEach((function(n){t.toggle(n,!!e)}))}},t.prototype.listener=function(e){var t;if(this.isCheckable)t=!this.element.checked;else{if("keydown"==e.type&&e instanceof KeyboardEvent&&13!=e.keyCode&&32!=e.keyCode)return;if(e.target!==e.currentTarget&&["A","BUTTON"].indexOf(e.target.nodeName)>=0)return;if(e.preventDefault(),"keydown"==e.type)this.lastKeydownClickTimestamp=Date.now();else if("click"==e.type&&Date.now()-this.lastKeydownClickTimestamp<300)return;t="true"===this.element.getAttribute("aria-expanded"),"click"===e.type&&this.element.blur()}this.element.setAttribute("aria-expanded",t?"false":"true");for(var n=0,r=this.controlledExpandables;n<r.length;n++)r[n].classList.toggle("is-expanded",!t);this._dispatchShowHideEvent(!t),this._toggleClass(!t)},t.prototype.connect=function(){var e=this;if(this.events.forEach((function(t){e.element.addEventListener(t,e.listener.bind(e))}),this),this.isRadio&&u(!0),this.isRadio||this.element.setAttribute("aria-expanded",this.isCollapsed()?"false":"true"),this.isCheckable){var t=this.controlledExpandables;if(t.length){var n=!this.isCollapsed();if(t.some((function(e){return e.classList.contains("is-expanded")!==n}))){for(var r=0,o=this.controlledExpandables;r<o.length;r++)o[r].classList.toggle("is-expanded",n);this._dispatchShowHideEvent(n),this._toggleClass(n)}}}},t.prototype.disconnect=function(){var e=this;this.events.forEach((function(t){e.element.removeEventListener(t,e.listener.bind(e))}),this),this.isRadio&&u(!1)},t}(i.StacksController);t.ExpandableController=l},181:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.hideModal=t.showModal=t.ModalController=void 0;var s=n(36),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.connect=function(){this.validate()},t.prototype.disconnect=function(){this.unbindDocumentEvents()},t.prototype.toggle=function(e){void 0===e&&(e=null),this._toggle(void 0,e)},t.prototype.show=function(e){void 0===e&&(e=null),this._toggle(!0,e)},t.prototype.hide=function(e){void 0===e&&(e=null),this._toggle(!1,e)},t.prototype.validate=function(){var e=this.data.get("return-element");if(e&&(this.returnElement=document.querySelector(e),!this.returnElement))throw"Unable to find element by return-element selector: "+e},t.prototype._toggle=function(e,t){var n=this;void 0===t&&(t=null);var r=e,o="false"===this.modalTarget.getAttribute("aria-hidden");if(void 0===r&&(r=!o),!(r&&o||!r&&!o)){var i=this.getDispatcher(t),s=this.triggerEvent(r?"show":"hide",{returnElement:this.returnElement,dispatcher:this.getDispatcher(i)},this.modalTarget);s.defaultPrevented||(this.returnElement=s.detail.returnElement,this.modalTarget.setAttribute("aria-hidden",r?"false":"true"),r?(this.bindDocumentEvents(),this.focusInsideModal()):(this.unbindDocumentEvents(),this.focusReturnElement(),this.removeModalOnHide()),void 0!==this.modalTarget.ontransitionend?this.modalTarget.addEventListener("transitionend",(function(){n.triggerEvent(r?"shown":"hidden",{dispatcher:i},n.modalTarget)}),{once:!0}):this.triggerEvent(r?"shown":"hidden",{dispatcher:i},this.modalTarget))}},t.prototype.focusReturnElement=function(){var e=this;this.returnElement&&this.modalTarget.addEventListener("s-modal:hidden",(function(){e.returnElement&&document.body.contains(e.returnElement)&&e.returnElement.focus()}),{once:!0})},t.prototype.removeModalOnHide=function(){var e=this;"true"===this.data.get("remove-when-hidden")&&this.modalTarget.addEventListener("s-modal:hidden",(function(){e.element.remove()}),{once:!0})},t.prototype.getAllTabbables=function(){return Array.from(this.modalTarget.querySelectorAll("[href], input, select, textarea, button, [tabindex]")).filter((function(e){return e.matches(":not([disabled]):not([tabindex='-1'])")}))},t.prototype.firstVisible=function(e){return e.find((function(e){return null!==e.offsetParent}))},t.prototype.lastVisible=function(e){return this.firstVisible(i([],e,!0).reverse())},t.prototype.focusInsideModal=function(){var e=this;this.modalTarget.addEventListener("s-modal:shown",(function(){var t,n=null!==(t=e.firstVisible(e.initialFocusTargets))&&void 0!==t?t:e.firstVisible(e.getAllTabbables());null==n||n.focus()}),{once:!0})},t.prototype.keepFocusWithinModal=function(e){if(this.modalTarget.contains(e.target)){if("Tab"===e.key){var t=this.getAllTabbables(),n=this.firstVisible(t),r=this.lastVisible(t);n&&r&&(n===r?(e.preventDefault(),n.focus()):e.shiftKey&&e.target===n?(e.preventDefault(),r.focus()):e.shiftKey||e.target!==r||(e.preventDefault(),n.focus()))}}else{var o=this.firstVisible(this.getAllTabbables());o&&(e.preventDefault(),o.focus())}},t.prototype.bindDocumentEvents=function(){this._boundClickFn=this._boundClickFn||this.hideOnOutsideClick.bind(this),this._boundKeypressFn=this._boundKeypressFn||this.hideOnEscapePress.bind(this),this._boundTabTrap=this._boundTabTrap||this.keepFocusWithinModal.bind(this),document.addEventListener("mousedown",this._boundClickFn),document.addEventListener("keyup",this._boundKeypressFn),document.addEventListener("keydown",this._boundTabTrap)},t.prototype.unbindDocumentEvents=function(){document.removeEventListener("mousedown",this._boundClickFn),document.removeEventListener("keyup",this._boundKeypressFn),document.removeEventListener("keydown",this._boundTabTrap)},t.prototype.hideOnOutsideClick=function(e){var t,n=e.target;!(null===(t=this.modalTarget.querySelector(".s-modal--dialog"))||void 0===t?void 0:t.contains(n))&&document.body.contains(n)&&this._toggle(!1,e)},t.prototype.hideOnEscapePress=function(e){27===e.which&&"true"!==this.modalTarget.getAttribute("aria-hidden")&&this._toggle(!1,e)},t.prototype.getDispatcher=function(e){return void 0===e&&(e=null),e instanceof Event?e.target:e instanceof Element?e:this.element},t.targets=["modal","initialFocus"],t}(s.StacksController);function c(e,t){var n=s.application.getControllerForElementAndIdentifier(e,"s-modal");if(!n)throw"Unable to get s-modal controller from element";t?n.show():n.hide()}t.ModalController=a,t.showModal=function(e){c(e,!0)},t.hideModal=function(e){c(e,!1)}},642:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TabListController=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.connect=function(){e.prototype.connect.call(this),this.boundSelectTab=this.selectTab.bind(this),this.boundHandleKeydown=this.handleKeydown.bind(this);for(var t=0,n=this.tabTargets;t<n.length;t++){var r=n[t];r.addEventListener("click",this.boundSelectTab),r.addEventListener("keydown",this.boundHandleKeydown)}},t.prototype.disconnect=function(){e.prototype.disconnect.call(this);for(var t=0,n=this.tabTargets;t<n.length;t++){var r=n[t];r.removeEventListener("click",this.boundSelectTab),r.removeEventListener("keydown",this.boundHandleKeydown)}},Object.defineProperty(t.prototype,"tabTargets",{get:function(){return Array.from(this.element.querySelectorAll("[role=tab]"))},enumerable:!1,configurable:!0}),t.prototype.selectTab=function(e){this.switchToTab(e.currentTarget)},t.prototype.handleKeydown=function(e){var t,n=e.currentTarget,r=this.tabTargets,o=r.indexOf(n);if("ArrowRight"===e.key)o++;else{if("ArrowLeft"!==e.key)return;o--}o<0&&(o=r.length-1),o>=r.length&&(o=0),n=r[o],this.switchToTab(n),null===(t=this.selectedTab)||void 0===t||t.focus()},t.prototype.switchToTab=function(e){var t=this.selectedTab;t!==e&&(this.triggerEvent("select",{oldTab:t,newTab:e}).defaultPrevented||(this.selectedTab=e,this.triggerEvent("selected",{oldTab:t,newTab:e})))},Object.defineProperty(t.prototype,"selectedTab",{get:function(){return this.tabTargets.find((function(e){return"true"===e.getAttribute("aria-selected")}))||null},set:function(e){for(var t=0,n=this.tabTargets;t<n.length;t++){var r=n[t],o=r.getAttribute("aria-controls"),i=o?document.getElementById(o):null;r===e?(r.classList.add("is-selected"),r.setAttribute("aria-selected","true"),r.removeAttribute("tabindex"),null==i||i.classList.remove("d-none")):(r.classList.remove("is-selected"),r.setAttribute("aria-selected","false"),r.setAttribute("tabindex","-1"),null==i||i.classList.add("d-none"))}},enumerable:!1,configurable:!0}),t}(n(36).StacksController);t.TabListController=i},388:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.detachPopover=t.attachPopover=t.hidePopover=t.showPopover=t.PopoverController=t.BasePopoverController=void 0;var i=n(492),s=n(36),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"isVisible",{get:function(){var e=this.popoverElement;return!!e&&e.classList.contains("is-visible")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isInViewport",{get:function(){var e=this.popoverElement;if(!this.isVisible||!e)return!1;var t=e.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight),r=Math.max(document.documentElement.clientWidth,window.innerWidth);return t.bottom>0&&t.top<n&&t.right>0&&t.left<r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shouldHideOnOutsideClick",{get:function(){switch(this.data.get("hide-on-outside-click")){case"after-dismissal":case"never":return!1;case"if-in-viewport":return this.isInViewport;default:return!0}},enumerable:!1,configurable:!0}),t.prototype.connect=function(){e.prototype.connect.call(this),this.validate(),this.isVisible?this.initializePopper():"true"===this.data.get("auto-show")&&this.show(null),this.data.delete("auto-show")},t.prototype.disconnect=function(){this.hide(),this.popper&&(this.popper.destroy(),delete this.popper),e.prototype.disconnect.call(this)},t.prototype.toggle=function(e){void 0===e&&(e=null),this.isVisible?this.hide(e):this.show(e)},t.prototype.show=function(e){if(void 0===e&&(e=null),!this.isVisible){var t=this.getDispatcher(e);this.triggerEvent("show",{dispatcher:t}).defaultPrevented||(this.popper||this.initializePopper(),this.popoverElement.classList.add("is-visible"),this.scheduleUpdate(),this.shown(t))}},t.prototype.hide=function(e){if(void 0===e&&(e=null),this.isVisible){var t=this.getDispatcher(e);this.triggerEvent("hide",{dispatcher:t}).defaultPrevented||(this.popoverElement.classList.remove("is-visible"),this.popper&&(this.popper.destroy(),delete this.popper),"after-dismissal"===this.data.get("hide-on-outside-click")&&this.data.delete("hide-on-outside-click"),this.hidden(t))}},t.prototype.shown=function(e){void 0===e&&(e=null),this.bindDocumentEvents(),this.triggerEvent("shown",{dispatcher:e})},t.prototype.hidden=function(e){void 0===e&&(e=null),this.unbindDocumentEvents(),this.triggerEvent("hidden",{dispatcher:e})},t.prototype.generatePopover=function(){return null},t.prototype.initializePopper=function(){this.popper=(0,i.createPopper)(this.referenceElement,this.popoverElement,{placement:this.data.get("placement")||"bottom",modifiers:[{name:"offset",options:{offset:[0,10]}},{name:"arrow",options:{element:".s-popover--arrow"}}]})},t.prototype.validate=function(){var e=this.data.get("reference-selector");if(this.referenceElement=this.element,e&&(this.referenceElement=this.element.querySelector(e),!this.referenceElement))throw"Unable to find element by reference selector: "+e;var t=this.referenceElement.getAttribute(this.popoverSelectorAttribute),n=null;if(t){if(!(n=document.getElementById(t)))throw"[".concat(this.popoverSelectorAttribute,'="{POPOVER_ID}"] required')}else n=this.generatePopover();if(!n)throw"unable to find or generate popover element";this.popoverElement=n},t.prototype.getDispatcher=function(e){return void 0===e&&(e=null),e instanceof Event?e.target:e instanceof Element?e:this.element},t.prototype.scheduleUpdate=function(){this.popper&&this.isVisible&&this.popper.update()},t}(s.StacksController);t.BasePopoverController=a;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.popoverSelectorAttribute="aria-controls",t}return o(t,e),t.prototype.shown=function(t){void 0===t&&(t=null),this.toggleOptionalClasses(!0),this.toggleAccessibilityAttributes(!0),e.prototype.shown.call(this,t)},t.prototype.hidden=function(t){void 0===t&&(t=null),this.toggleOptionalClasses(!1),this.toggleAccessibilityAttributes(!1),e.prototype.hidden.call(this,t)},t.prototype.connect=function(){e.prototype.connect.call(this),this.toggleAccessibilityAttributes()},t.prototype.bindDocumentEvents=function(){this.boundHideOnOutsideClick=this.boundHideOnOutsideClick||this.hideOnOutsideClick.bind(this),this.boundHideOnEscapePress=this.boundHideOnEscapePress||this.hideOnEscapePress.bind(this),document.addEventListener("mousedown",this.boundHideOnOutsideClick),document.addEventListener("keyup",this.boundHideOnEscapePress)},t.prototype.unbindDocumentEvents=function(){document.removeEventListener("mousedown",this.boundHideOnOutsideClick),document.removeEventListener("keyup",this.boundHideOnEscapePress)},t.prototype.hideOnOutsideClick=function(e){var t=e.target;this.shouldHideOnOutsideClick&&!this.referenceElement.contains(t)&&!this.popoverElement.contains(t)&&document.body.contains(t)&&this.hide(e)},t.prototype.hideOnEscapePress=function(e){27===e.which&&this.isVisible&&(this.popoverElement.contains(e.target)&&this.referenceElement.focus(),this.hide(e))},t.prototype.toggleOptionalClasses=function(e){if(this.data.has("toggle-class")){var t=this.data.get("toggle-class")||"",n=this.referenceElement.classList;t.split(/\s+/).forEach((function(t){n.toggle(t,e)}))}},t.prototype.toggleAccessibilityAttributes=function(e){var t=(null==e?void 0:e.toString())||this.referenceElement.ariaExpanded||"false";this.referenceElement.ariaExpanded=t,this.referenceElement.setAttribute("aria-expanded",t)},t.targets=[],t}(a);function u(e){var t,n=(null===(t=e.getAttribute("data-controller"))||void 0===t?void 0:t.includes("s-popover"))||!1,r=s.application.getControllerForElementAndIdentifier(e,"s-popover"),o=e.getAttribute("data-s-popover-reference-selector"),i=o?e.querySelector(o):e,a=i?i.getAttribute("aria-controls"):null;return{isPopover:n,controller:r,referenceElement:i,popover:a?document.getElementById(a):null}}function l(e,t,n){var r,o=new Set(null===(r=e.getAttribute("data-controller"))||void 0===r?void 0:r.split(/\s+/));n?o.add(t):o.delete(t),e.setAttribute("data-controller",Array.from(o).join(" "))}t.PopoverController=c,t.showPopover=function(e){var t=u(e),n=t.isPopover,r=t.controller;if(r)r.show();else{if(!n)throw'element does not have data-controller="s-popover"';e.setAttribute("data-s-popover-auto-show","true")}},t.hidePopover=function(e){var t=u(e),n=t.isPopover,r=t.controller,o=t.popover;if(r)r.hide();else{if(!n)throw'element does not have data-controller="s-popover"';e.removeAttribute("data-s-popover-auto-show"),o&&o.classList.remove("is-visible")}},t.attachPopover=function(e,t,n){var r=u(e),o=r.referenceElement,i=r.popover;if(i)throw'element already has popover with id="'.concat(i.id,'"');if(!o)throw"element has invalid data-s-popover-reference-selector attribute";if("string"==typeof t){var s=document.createRange().createContextualFragment(t).children;if(1!==s.length)throw"popover should contain a single element";t=s[0]}var a=o.getAttribute("aria-controls"),c=t.id;if(!t.classList.contains("s-popover"))throw'popover should have the "s-popover" class but had class="'.concat(t.className,'"');if(a&&a!==c)throw'element has aria-controls="'.concat(a,'" but popover has id="').concat(c,'"');c||(c="--stacks-s-popover-"+Math.random().toString(36).substring(2,10),t.id=c),a||o.setAttribute("aria-controls",c),!t.parentElement&&e.parentElement&&o.insertAdjacentElement("afterend",t),l(e,"s-popover",!0),n&&(n.toggleOnClick&&o.setAttribute("data-action","click->s-popover#toggle"),n.placement&&e.setAttribute("data-s-popover-placement",n.placement),n.autoShow&&e.setAttribute("data-s-popover-auto-show","true"))},t.detachPopover=function(e){var t=u(e),n=t.isPopover,r=t.controller,o=t.referenceElement,i=t.popover;return null==r||r.hide(),null==i||i.remove(),n&&(l(e,"s-popover",!1),o&&o.removeAttribute("aria-controls")),i}},753:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TableController=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.setCurrentSort=function(e,t){if(["asc","desc","none"].indexOf(t)<0)throw"direction must be one of asc, desc, or none";var n=this;this.columnTargets.forEach((function(r){var o=r===e;r.classList.toggle("is-sorted",o&&"none"!==t),r.querySelectorAll(".js-sorting-indicator").forEach((function(e){var n=o?t:"none";e.classList.toggle("d-none",!e.classList.contains("js-sorting-indicator-"+n))})),o&&"none"!==t?n.setElementData(r,"sort-direction",t):n.removeElementData(r,"sort-direction")}))},t.prototype.sort=function(e){var t=this,n=e.currentTarget;if(!(n instanceof HTMLTableCellElement))throw"invalid event target";var r=this.element,o=r.tBodies[0],i=function(e){if(!(e.parentElement&&e.parentElement.parentElement instanceof HTMLTableSectionElement))throw"invalid table";var t=s(e.parentElement.parentElement,e);if("number"!=typeof t)throw"shouldn't happen";return t}(n);if(!(i<0)){var a,c=function(e){var t=s(e);if(!(t instanceof Array))throw"shouldn't happen";return t}(o),u="asc"===this.getElementData(n,"sort-direction")?-1:1,l=Array.from(r.tBodies[0].rows),p=!1,d=[];l.forEach((function(e,n){var r,o,s=t.getElementData(e,"sort-to");if("top"!==s)if("bottom"!==s){var u=c[n][i];if(u){var l=t.getElementData(u,"sort-val"),f="string"==typeof l?l:null!==(o=null===(r=u.textContent)||void 0===r?void 0:r.trim())&&void 0!==o?o:"";""!==f&&"".concat(parseInt(f,10))!==f&&(p=!0),d.push([f,n])}else d.push(["",n])}else a||(a=e)})),p||d.forEach((function(e){e[0]=""===e[0]?Number.MIN_VALUE:parseInt(e[0],10)})),d.sort((function(e,t){return e[0]>t[0]?1*u:e[0]<t[0]?-1*u:e[1]>t[1]?1:-1})),d.forEach((function(e){var t,n=l[e[1]];null===(t=n.parentElement)||void 0===t||t.removeChild(n),a?o.insertBefore(n,a):o.appendChild(n)})),this.setCurrentSort(n,1===u?"asc":"desc")}},t.targets=["column"],t}(n(36).StacksController);function s(e,t){for(var n=[],r=e.children[0],o=[],i=[];r||i.some((function(e){return 0!==e}));){var s=[];n.push(s);var a=0;if(r)for(var c=0;c<r.children.length;c++){for(;i[a];)i[a]--,s[a]=o[a],a++;var u=r.children[c];if(!(u instanceof HTMLTableCellElement))throw"invalid table";if("none"!==getComputedStyle(u).display){if(u===t)return a;for(var l=a+u.colSpan;a<l;a++)i[a]=u.rowSpan-1,o[a]=u,s[a]=u}}for(;a<o.length;)i[a]&&(i[a]--,s[a]=o[a]),a++;r&&(r=r.nextElementSibling)}return t?-1:n}t.TableController=i},355:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.setTooltipText=t.setTooltipHtml=t.TooltipController=void 0;var i=n(36),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.popoverSelectorAttribute="aria-describedby",t}return o(t,e),t.prototype.connect=function(){e.prototype.connect.call(this),window.matchMedia("(hover: hover)").matches&&this.bindMouseEvents(),this.bindKeyboardEvents()},t.prototype.disconnect=function(){this.unbindKeyboardEvents(),this.unbindMouseEvents(),e.prototype.disconnect.call(this)},t.prototype.show=function(t){void 0===t&&(t=null);var n=i.application.getControllerForElementAndIdentifier(this.element,"s-popover");n&&n.isVisible||e.prototype.show.call(this,t)},t.prototype.scheduleShow=function(e){var t=this;void 0===e&&(e=null),window.clearTimeout(this.activeTimeout),this.activeTimeout=window.setTimeout((function(){return t.show(e)}),300)},t.prototype.scheduleHide=function(t){var n=this;void 0===t&&(t=null),window.clearTimeout(this.activeTimeout),this.activeTimeout=window.setTimeout((function(){return e.prototype.hide.call(n,t)}),100)},t.prototype.clearActiveTimeout=function(){clearTimeout(this.activeTimeout)},t.prototype.applyTitleAttributes=function(){var e,n=this.data.get("html-title");if(n)e=document.createRange().createContextualFragment(n);else{var r=this.element.getAttribute("title");if(!r)return null;e=document.createTextNode(r)}this.data.delete("html-title"),this.element.removeAttribute("title");var o=this.element.getAttribute("aria-describedby");o||(o=t.generateId(),this.element.setAttribute("aria-describedby",o));var i=document.getElementById(o);if(!i){(i=document.createElement("div")).id=o,i.className="s-popover s-popover__tooltip",i.setAttribute("role","tooltip");var s=this.element.parentNode;s?s.insertBefore(i,this.element.nextSibling):document.body.appendChild(i)}var a=i.querySelector(".s-popover--arrow");return i.innerHTML="",i.appendChild(e),a?i.appendChild(a):i.insertAdjacentHTML("beforeend",'<div class="s-popover--arrow"></div>'),this.scheduleUpdate(),i},t.prototype.bindDocumentEvents=function(){this.boundHideIfWithin=this.boundHideIfWithin||this.hideIfWithin.bind(this),document.addEventListener("s-popover:shown",this.boundHideIfWithin)},t.prototype.unbindDocumentEvents=function(){document.removeEventListener("s-popover:shown",this.boundHideIfWithin)},t.prototype.generatePopover=function(){return this.applyTitleAttributes()},t.prototype.hideIfWithin=function(e){e.target.contains(this.referenceElement)&&this.scheduleHide()},t.prototype.hideOnEscapeKeyEvent=function(e){"Escape"===e.key&&this.scheduleHide()},t.prototype.bindKeyboardEvents=function(){this.boundScheduleShow=this.boundScheduleShow||this.scheduleShow.bind(this),this.boundHide=this.boundHide||this.scheduleHide.bind(this),this.boundHideOnEscapeKeyEvent=this.boundHideOnEscapeKeyEvent||this.hideOnEscapeKeyEvent.bind(this),this.referenceElement.addEventListener("focus",this.boundScheduleShow),this.referenceElement.addEventListener("blur",this.boundHide),document.addEventListener("keyup",this.boundHideOnEscapeKeyEvent)},t.prototype.unbindKeyboardEvents=function(){this.referenceElement.removeEventListener("focus",this.boundScheduleShow),this.referenceElement.removeEventListener("blur",this.boundHide),document.removeEventListener("keyup",this.boundHideOnEscapeKeyEvent)},t.prototype.bindMouseEvents=function(){this.boundScheduleShow=this.boundScheduleShow||this.scheduleShow.bind(this),this.boundHide=this.boundHide||this.scheduleHide.bind(this),this.boundClearActiveTimeout=this.boundClearActiveTimeout||this.clearActiveTimeout.bind(this),this.referenceElement.addEventListener("mouseover",this.boundScheduleShow),this.referenceElement.addEventListener("mouseout",this.boundHide),this.popoverElement.addEventListener("mouseover",this.boundClearActiveTimeout),this.popoverElement.addEventListener("mouseout",this.boundHide)},t.prototype.unbindMouseEvents=function(){this.referenceElement.removeEventListener("mouseover",this.boundScheduleShow),this.referenceElement.removeEventListener("mouseout",this.boundHide),this.referenceElement.removeEventListener("focus",this.boundScheduleShow),this.referenceElement.removeEventListener("blur",this.boundHide),this.popoverElement.removeEventListener("mouseover",this.boundClearActiveTimeout),this.popoverElement.removeEventListener("mouseout",this.boundHide)},t.generateId=function(){return"--stacks-s-tooltip-"+Math.random().toString(36).substring(2,10)},t.targets=[],t}(n(388).BasePopoverController);function a(e,t){t&&t.placement&&e.setAttribute("data-s-tooltip-placement",t.placement);var n=i.application.getControllerForElementAndIdentifier(e,"s-tooltip");if(n)n.applyTitleAttributes();else{var r=e.getAttribute("data-controller");e.setAttribute("data-controller","".concat(r||""," s-tooltip"))}}t.TooltipController=s,t.setTooltipHtml=function(e,t,n){e.setAttribute("data-s-tooltip-html-title",t),e.removeAttribute("title"),a(e,n)},t.setTooltipText=function(e,t,n){e.setAttribute("title",t),e.removeAttribute("data-s-tooltip-html-title"),a(e,n)}},637:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.UploaderController=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.connect=function(){e.prototype.connect.call(this),this.boundDragEnter=this.handleUploaderActive.bind(this,!0),this.boundDragLeave=this.handleUploaderActive.bind(this,!1),this.inputTarget.addEventListener("dragenter",this.boundDragEnter),this.inputTarget.addEventListener("dragleave",this.boundDragLeave)},t.prototype.disconnect=function(){this.inputTarget.removeEventListener("dragenter",this.boundDragEnter),this.inputTarget.removeEventListener("dragleave",this.boundDragLeave),e.prototype.disconnect.call(this)},t.prototype.handleInput=function(){var e=this;if(this.previewsTarget.innerHTML="",this.inputTarget.files){var n=this.inputTarget.files.length;this.getDataURLs(this.inputTarget.files,t.FILE_DISPLAY_LIMIT).then((function(t){if(e.handleVisible(!0),t.length>1){var r=document.createElement("div");r.classList.add("s-uploader--previews-heading"),r.innerText=t.length<n?"Showing ".concat(t.length," of ").concat(n," files"):"".concat(n," items"),e.previewsTarget.appendChild(r),e.previewsTarget.classList.add("has-multiple")}else e.previewsTarget.classList.remove("has-multiple");t.forEach((function(t){return e.addFilePreview(t)})),e.handleUploaderActive(!0)})).catch((function(){return null}))}},t.prototype.reset=function(){this.inputTarget.value="",this.previewsTarget.innerHTML="",this.handleVisible(!1)},t.prototype.handleVisible=function(e){var t=this.targets.scope,n=t.findAllElements("[data-s-uploader-hide-on-input]"),r=t.findAllElements("[data-s-uploader-show-on-input]"),o=t.findAllElements("[data-s-uploader-enable-on-input]");e?(n.forEach((function(e){e.classList.add("d-none")})),r.forEach((function(e){e.classList.remove("d-none")})),o.forEach((function(e){e.removeAttribute("disabled")}))):(n.forEach((function(e){e.classList.remove("d-none")})),r.forEach((function(e){e.classList.add("d-none")})),o.forEach((function(e){e.setAttribute("disabled","true")})),this.handleUploaderActive(!1))},t.prototype.addFilePreview=function(e){if(e){var t,n=document.createElement("div");e.type.match("image/*")&&e.data?((t=document.createElement("img")).src=e.data.toString(),t.alt=e.name):(t=document.createElement("div")).innerText=e.name,t.classList.add("s-uploader--preview-thumbnail"),n.appendChild(t),n.classList.add("s-uploader--preview"),n.setAttribute("data-filename",e.name),this.previewsTarget.appendChild(n)}},t.prototype.handleUploaderActive=function(e){this.uploaderTarget.classList.toggle("is-active",e)},t.prototype.fileToDataURL=function(e){var n=new FileReader,r=e.name,o=e.size,i=e.type;return o<t.MAX_FILE_SIZE&&i.indexOf("image")>-1?new Promise((function(t,o){n.onload=function(e){var n,s=null===(n=null==e?void 0:e.target)||void 0===n?void 0:n.result;s?t({data:s,name:r,type:i}):o()},n.readAsDataURL(e)})):Promise.resolve({name:r,type:i})},t.prototype.getDataURLs=function(e,t){var n=this,r=Array.from(e).slice(0,Math.min(t,e.length)).map((function(e){return n.fileToDataURL(e)}));return Promise.all(r)},t.targets=["input","previews","uploader"],t.FILE_DISPLAY_LIMIT=10,t.MAX_FILE_SIZE=10485760,t}(n(36).StacksController);t.UploaderController=i},603:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),n(708);var i=n(470),s=n(36);s.application.register("s-expandable-control",i.ExpandableController),s.application.register("s-modal",i.ModalController),s.application.register("s-navigation-tablist",i.TabListController),s.application.register("s-popover",i.PopoverController),s.application.register("s-table",i.TableController),s.application.register("s-tooltip",i.TooltipController),s.application.register("s-uploader",i.UploaderController),s.StacksApplication.finalize(),o(n(470),t),o(n(36),t)},36:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.addController=t.createController=t.StacksController=t.application=t.StacksApplication=void 0;var s=n(931),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.load=function(n){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];for(var s=Array.isArray(n)?n:i([n],r,!0),a=0,c=s;a<c.length;a++){var u=c[a],l=/^s-/.test(u.identifier);if(t._initializing&&!l)throw'Stacks-created Stimulus controller names must start with "s-".';if(!t._initializing&&l)throw'The "s-" prefix on Stimulus controller names is reserved for Stacks-created controllers.'}e.prototype.load.call(this,s)},t.start=function(e,n){var r=new t(e,n);return r.start(),r},t.finalize=function(){t._initializing=!1},t._initializing=!0,t}(s.Application);t.StacksApplication=a,t.application=a.start();var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getElementData=function(e,t){return e.getAttribute("data-"+this.identifier+"-"+t)},t.prototype.setElementData=function(e,t,n){e.setAttribute("data-"+this.identifier+"-"+t,n)},t.prototype.removeElementData=function(e,t){e.removeAttribute("data-"+this.identifier+"-"+t)},t.prototype.triggerEvent=function(e,t,n){var r,o=this.identifier+":"+e;try{r=new CustomEvent(o,{bubbles:!0,cancelable:!0,detail:t})}catch(e){(r=document.createEvent("CustomEvent")).initCustomEvent(o,!0,!0,t)}return(n||this.element).dispatchEvent(r),r},t}(s.Controller);function u(e){var t,n,r=e.hasOwnProperty("targets")?(n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(c),n.targets=null!==(t=e.targets)&&void 0!==t?t:[],n):function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(c);for(var i in e){var s=e.hasOwnProperty(i)&&Object.getOwnPropertyDescriptor(e,i);"targets"!==i&&s&&Object.defineProperty(r.prototype,i,s)}return r}t.StacksController=c,t.createController=u,t.addController=function(e,n){t.application.register(e,u(n))}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}return n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(603)})()));
package/dist/stacks.d.ts CHANGED
@@ -14,7 +14,7 @@ export declare class StacksController extends Stimulus.Controller {
14
14
  protected triggerEvent<T>(eventName: string, detail?: T, optionalElement?: Element): CustomEvent<T>;
15
15
  }
16
16
  export interface ControllerDefinition {
17
- [name: string]: any;
17
+ [name: string]: unknown;
18
18
  targets?: string[];
19
19
  }
20
20
  export declare function createController(controllerDefinition: ControllerDefinition): typeof StacksController;
@@ -40,5 +40,5 @@
40
40
  .gx0, .gx1, .gx2, .gx4, .gx6, .gx8, .gx12, .gx16, .gx24, .gx32, .gx48, .gx64,
41
41
  .gy0, .gy1, .gy2, .gy4, .gy6, .gy8, .gy12, .gy16, .gy24, .gy32, .gy48, .gy64,
42
42
  .g0, .g1, .g2, .g4, .g6, .g8, .g12, .g16, .g24, .g32, .g48, .g64 {
43
- gap: var(--_gap-y, 0) var(--_gap-x, 0);
43
+ gap: var(--_gap-y, 0) var(--_gap-x, 0);
44
44
  }
@@ -4,7 +4,7 @@
4
4
  --_bu-bc: transparent;
5
5
  --_bu-bg: transparent;
6
6
  --_bu-br: var(--br-sm);
7
- --_bu-bs: inset 0 var(--su-static1) 0 0 hsla(0, 0, 100%, 0.7);
7
+ --_bu-bs: none;
8
8
  --_bu-fc: var(--theme-button-color);
9
9
  --_bu-focus-ring: 0 0 0 var(--su-static4) var(--focus-ring);
10
10
  --_bu-fs: var(--fs-body1);
@@ -111,6 +111,8 @@
111
111
 
112
112
  // MODIFIERS
113
113
  &&__filled {
114
+ --_bu-bs: inset 0 var(--su-static1) 0 0 hsla(0, 0, 100%, 0.7);
115
+
114
116
  border-color: var(--_bu-filled-bc);
115
117
  background-color: var(--_bu-filled-bg);
116
118
  color: var(--_bu-filled-fc);
@@ -11,7 +11,7 @@
11
11
  --_ca-bc: var(--bc-light);
12
12
 
13
13
  // Dim only the first child card content
14
- > * {
14
+ > * {
15
15
  opacity: 0.65;
16
16
  }
17
17
  }
@@ -111,4 +111,4 @@
111
111
  -webkit-clip-path: var(--_ex-clip-path);
112
112
  clip-path: var(--_ex-clip-path);
113
113
  transition: clip-path 0s var(--_ex-transition-duration), -webkit-clip-path 0s var(--_ex-transition-duration);
114
- }
114
+ }