@cfpb/cfpb-design-system 3.8.0 → 3.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.md +28 -1
  2. package/dist/base/index.css +1 -1
  3. package/dist/base/index.css.map +2 -2
  4. package/dist/base/index.js +1 -1
  5. package/dist/base/index.js.map +1 -1
  6. package/dist/components/cfpb-buttons/index.css +1 -1
  7. package/dist/components/cfpb-buttons/index.css.map +2 -2
  8. package/dist/components/cfpb-buttons/index.js.map +1 -1
  9. package/dist/components/cfpb-expandables/index.css +1 -1
  10. package/dist/components/cfpb-expandables/index.css.map +2 -2
  11. package/dist/components/cfpb-expandables/index.js +1 -1
  12. package/dist/components/cfpb-expandables/index.js.map +1 -1
  13. package/dist/components/cfpb-forms/index.css +1 -1
  14. package/dist/components/cfpb-forms/index.css.map +2 -2
  15. package/dist/components/cfpb-forms/index.js +1 -1
  16. package/dist/components/cfpb-forms/index.js.map +1 -1
  17. package/dist/components/cfpb-layout/index.css +1 -1
  18. package/dist/components/cfpb-layout/index.css.map +2 -2
  19. package/dist/components/cfpb-layout/index.js +1 -1
  20. package/dist/components/cfpb-layout/index.js.map +1 -1
  21. package/dist/components/cfpb-notifications/index.css +1 -1
  22. package/dist/components/cfpb-notifications/index.css.map +2 -2
  23. package/dist/components/cfpb-notifications/index.js.map +1 -1
  24. package/dist/components/cfpb-pagination/index.css +1 -1
  25. package/dist/components/cfpb-pagination/index.css.map +2 -2
  26. package/dist/components/cfpb-pagination/index.js.map +1 -1
  27. package/dist/components/cfpb-tables/index.css +1 -1
  28. package/dist/components/cfpb-tables/index.css.map +2 -2
  29. package/dist/components/cfpb-tables/index.js.map +1 -1
  30. package/dist/components/cfpb-tooltips/index.css +1 -1
  31. package/dist/components/cfpb-tooltips/index.css.map +2 -2
  32. package/dist/components/cfpb-tooltips/index.js.map +1 -1
  33. package/dist/components/cfpb-typography/index.css +1 -1
  34. package/dist/components/cfpb-typography/index.css.map +2 -2
  35. package/dist/components/cfpb-typography/index.js +1 -1
  36. package/dist/components/cfpb-typography/index.js.map +1 -1
  37. package/dist/index.css +1 -1
  38. package/dist/index.css.map +2 -2
  39. package/dist/index.js +1 -1
  40. package/dist/index.js.map +1 -1
  41. package/dist/utilities/index.css +1 -1
  42. package/dist/utilities/index.css.map +2 -2
  43. package/dist/utilities/index.js +1 -1
  44. package/dist/utilities/index.js.map +1 -1
  45. package/package.json +1 -1
  46. package/src/abstracts/media-queries.scss +3 -12
  47. package/src/base/normalize.scss +4 -0
  48. package/src/components/cfpb-buttons/button.scss +0 -1
  49. package/src/components/cfpb-expandables/expandable-group.scss +1 -1
  50. package/src/components/cfpb-expandables/expandable.scss +1 -1
  51. package/src/components/cfpb-expandables/summary.scss +5 -1
  52. package/src/components/cfpb-forms/tag.scss +2 -2
  53. package/src/components/cfpb-typography/list.scss +0 -11
  54. package/src/components/cfpb-typography/mixins.scss +5 -0
@@ -1,2 +1,2 @@
1
- (()=>{var ct=Object.defineProperty;var lt=Object.getOwnPropertySymbols;var St=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable;var dt=(a,e,t)=>e in a?ct(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,ve=(a,e)=>{for(var t in e||(e={}))St.call(e,t)&&dt(a,t,e[t]);if(lt)for(var t of lt(e))Et.call(e,t)&&dt(a,t,e[t]);return a};var g=(a,e)=>{for(var t in e)ct(a,t,{get:e[t],enumerable:!0})};var we={};g(we,{default:()=>Dt});var Dt={};var ke={};g(ke,{default:()=>jt});var jt={};var Se={};g(Se,{default:()=>Ot});var Ot={};var Ee={};g(Ee,{default:()=>It});var It={};var Le={};g(Le,{default:()=>Mt});var Mt={};var De={};g(De,{default:()=>qt});var qt={};var Ae={};g(Ae,{default:()=>$t});var $t={};var je={};g(je,{default:()=>Ht});var Ht={};var Te={};g(Te,{default:()=>Gt});var Gt={};var Oe={};g(Oe,{default:()=>Ut});var Ut={};var re={bpXS:{min:0,max:600},bpSM:{min:601,max:900},bpMED:{min:901,max:1020},bpLG:{min:1021,max:1200},bpXL:{min:1201}};function ne(){let a=getComputedStyle(document.body).fontSize;return a=a===""?-1:a,parseFloat(a)}function Pt(a,e){let t=a.min,r=a.max;ne()>0&&ne()!==16&&(t=t/16*ne(),r=r/16*ne());let o=t||0,s=r||Number.POSITIVE_INFINITY;return o<=e&&e<=s}function Xt(a){let e={};a=a||window.innerWidth;let t;for(t in re)e[t]=Pt(re[t],a);return e}var se="mobile",Kt="tablet",Jt="desktop";function ze(a){let e=!1,t=Xt();return(a===se&&t.bpXS||a===Kt&&t.bpSM||a===Jt&&(t.bpMED||t.bpLG||t.bpXL))&&(e=!0),e}var B="data-js-hook",le="behavior_",Ie="state_";function D(){let a={};function e(i,o){return{}.hasOwnProperty.call(a,i)?a[i].push(o):a[i]=[o],this}function t(i,o){if(!{}.hasOwnProperty.call(a,i))return this;let s=a[i].indexOf(o);return s!==-1&&a[i].splice(s,1),this}function r(i,o){if(!{}.hasOwnProperty.call(a,i))return this;o=o||{};let s=a[i];for(let d=0,c=s.length;d<c;d++)s[d].call(this,o);return this}return this.addEventListener=e,this.removeEventListener=t,this.dispatchEvent=r,this.getRegisteredEvents=()=>a,this}function Y(a,e){if(!a)return!1;let t=a.getAttribute(B);return t?(t=t.split(" "),t.indexOf(e)>-1):!1}function A(a,e){if(Y(a,e))return e;if(e.indexOf(" ")!==-1){let r=B+" values cannot contain spaces!";throw new Error(r)}let t=a.getAttribute(B);return t!==null&&(e=t+" "+e),a.setAttribute(B,e),e}var Be=Ie+"atomic_init";function Yt(a,e){if(!a||!a.classList){let t=a+' is not valid. Check that element is a DOM node with class "'+e+'"';throw new Error(t)}return a}function Wt(a,e){let t=a.classList.contains(e)?a:a.querySelector("."+e);if(!t){let r=e+" not found on or in passed DOM node.";throw new Error(r)}return t}function q(a,e){return Yt(a,e),Wt(a,e)}function M(a){return Y(a,Be)?!1:(A(a,Be),!0)}function C(a,e,t,r={}){let o=(t||document).querySelectorAll(a),s=[],d,c;for(let p=0,m=o.length;p<m;p++)c=o[p],Y(c,Be)===!1&&(d=new e(c),d.init(r),s.push(d));return s}var Me={};g(Me,{default:()=>Qt});var Qt={};var Ne={};g(Ne,{default:()=>ta});var ta={};var qe={};g(qe,{default:()=>oa});var oa={};var Ce={};g(Ce,{default:()=>ra});var ra={};var $e={};g($e,{default:()=>sa});var sa={};var Z="o-expandable";function P(a){let e=q(a,Z),t,r,i,o,s;function d(){if(!M(e))return this;t=e.querySelector(`.${Z}__header`),r=e.querySelector(`.${Z}__content`),i=e.querySelector(`.${Z}__label`);let m=e.classList.contains(`${Z}--onload-open`);A(e,"behavior_flyout-menu"),A(t,"behavior_flyout-menu_trigger"),A(r,"behavior_flyout-menu_content");let f=m?I.CLASSES.MH_DEFAULT:I.CLASSES.MH_ZERO;return o=new I(r).init(f),s=new X(e),s.setTransition(o,o.maxHeightZero,o.maxHeightDefault),s.init(m),s.addEventListener("expandbegin",()=>{r.classList.remove("u-hidden"),this.dispatchEvent("expandbegin",{target:this})}),s.addEventListener("collapseend",()=>{r.classList.add("u-hidden")}),this}function c(){return i.textContent.trim()}this.init=d,this.expand=()=>s.expand(),this.collapse=()=>s.collapse(),this.isExpanded=()=>s.isExpanded(),this.refresh=()=>s.getTransition().refresh(),this.getLabelText=c;let p=new D;return this.addEventListener=p.addEventListener,this.removeEventListener=p.removeEventListener,this.dispatchEvent=p.dispatchEvent,this}P.BASE_CLASS=Z;P.init=a=>C(`.${P.BASE_CLASS}`,P,a);var de="o-expandable-group";function ce(a){let e=q(a,de),t=e.classList.contains(`${de}--accordion`),r,i;function o(d){let c=d.target;i&&i!==c&&i.collapse(),i=c}function s(d){return M(e)?(t&&(r=d,r.forEach(c=>{c.addEventListener("expandbegin",o)})),this):this}return this.init=s,this}ce.BASE_CLASS=de;ce.init=a=>{(a||document).querySelectorAll(`.${de}`).forEach(r=>{let i=C(`.${P.BASE_CLASS}`,P,r);new ce(r).init(i)})};var Q="o-summary";function me(a){let e=q(a,Q),t=e.classList.contains(`${Q}--mobile`),r=e.querySelector(`.${Q}__content`),i=e.querySelector(`.${Q}__btn`),o,s,d;function c(){return M(e)?(window.addEventListener("load",p),this):this}function p(){window.removeEventListener("load",p),d=!y(),A(e,"behavior_flyout-menu"),A(r,"behavior_flyout-menu_content"),A(i,"behavior_flyout-menu_trigger"),s=new X(e,!1),o=new I(r),o.init(d?I.CLASSES.MH_SUMMARY:I.CLASSES.MH_DEFAULT),s.setTransition(o,o.maxHeightSummary,o.maxHeightDefault),s.addEventListener("triggerclick",j),s.init(),x(),window.addEventListener("resize",x),"onorientationchange"in window&&window.addEventListener("orientationchange",x),e.addEventListener("focusin",m),r.addEventListener("click",f)}function m(b){!d&&b.target!==i&&(i.click(),e.removeEventListener("focusin",m))}function f(b){b.target.tagName!=="A"&&s.isExpanded()&&o.refresh()}function x(){y()?G():H()}function y(){return t&&!ze(se)||r.scrollHeight<=88}function j(){s.addEventListener("expandend",S)}function S(){T(),window.removeEventListener("resize",x),window.removeEventListener("orientationchange",x),s.removeEventListener("expandend",S),s.suspend(),o.remove()}function E(){i.classList.remove("u-hidden")}function T(){i.classList.add("u-hidden")}function H(){return d&&(s.collapse(),o.animateOn(),E(),d=!1),!d}function G(){return d||(o.animateOff(),s.expand(),T(),d=!0),d}let z=new D;return this.addEventListener=z.addEventListener,this.removeEventListener=z.removeEventListener,this.dispatchEvent=z.dispatchEvent,this.init=c,this}me.BASE_CLASS=Q;me.init=a=>C(`.${Q}`,me,a);var ee="o-summary-minimal";function he(a){let e=q(a,ee),t=e.querySelector(`.${ee}__content`),r=e.querySelector(`.${ee}__btn`),i,o;function s(){return M(e)?(A(e,"behavior_flyout-menu"),A(t,"behavior_flyout-menu_content"),A(r,"behavior_flyout-menu_trigger"),window.addEventListener("load",d),this):this}function d(){window.removeEventListener("load",d),o=new X(e,!1),i=new I(t),i.init(I.CLASSES.MH_SUMMARY),o.setTransition(i,i.maxHeightSummary,i.maxHeightDefault),o.init(),e.addEventListener("focusin",c),t.addEventListener("click",p),o.collapse(),i.animateOn()}function c(f){f.target!==r&&(r.click(),e.removeEventListener("focusin",c))}function p(f){f.target.tagName!=="A"&&o.isExpanded()&&i.refresh()}let m=new D;return this.addEventListener=m.addEventListener,this.removeEventListener=m.removeEventListener,this.dispatchEvent=m.dispatchEvent,this.init=s,this}he.BASE_CLASS=ee;he.init=a=>C(`.${ee}`,he,a);var Fe={};g(Fe,{default:()=>ca});var ca={};var He={};g(He,{default:()=>ha});var ha={};var Ve={};g(Ve,{default:()=>ua});var ua={};var Ge={};g(Ge,{default:()=>ga});var ga={};var Re={};g(Re,{default:()=>xa});var xa={};var Ue={};g(Ue,{default:()=>ya});var ya={};var Pe={};g(Pe,{default:()=>wa});var wa={};var Xe={};g(Xe,{default:()=>Sa});var Sa={};var Ke={};g(Ke,{default:()=>La});var La={};var Je={};g(Je,{default:()=>Aa});var Aa={};var Ye={};g(Ye,{default:()=>Ta});var Ta={};var We={};g(We,{default:()=>za});var za={};var Ze={};g(Ze,{default:()=>Ba});var Ba={};var Qe={};g(Qe,{default:()=>Na});var Na={};var et={};g(et,{default:()=>Ca});var Ca={};var tt={};g(tt,{default:()=>Fa});var Fa={};var at={};g(at,{default:()=>Va});var Va={};var ot={};g(ot,{default:()=>Ra});var Ra={};var it={};g(it,{default:()=>Pa});var Pa={};var rt={};g(rt,{default:()=>Ka});var Ka={};function pe(a,e){let t;if(Y(a,e))return t=a,t;if(a){let r="["+B+"="+e+"]";t=a.querySelector(r)}if(!t){let r=e+" behavior not found on passed DOM node!";throw new Error(r)}return t}var Ja=Object.prototype.toString;var Ya=Array.isArray||function(e){return Ja.call(e)==="[object Array]"};function nt(){return!!new RegExp(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i).test(navigator.userAgent)}var te=le+"flyout-menu",Wa="["+B+"="+te;function X(a,e=!0){let t=pe(a,te),r=H(a),i=pe(a,te+"_content"),o=0,s=0,d=1,c=2,p=3,m,f,x,y=W.bind(this),j=R.bind(this),S,E=!0,T=!1;function H(n){let l=[],h=n.querySelectorAll(`${Wa}_trigger]`),u,k,U;for(let V=h.length>>>0;V--;){for(U=!1,u=h[V],k=u.parentElement;k!==n;)k.getAttribute(B)&&k.getAttribute(B).split(" ").indexOf(te)!==-1?(U=!0,k=n):k=k.parentElement;U||l.unshift(h[V])}return l}function G(n=!1){return o=n?p:s,r.forEach(l=>{z("expanded",l,n),l.addEventListener("click",_.bind(this)),l.addEventListener("touchstart",b,{passive:!0}),l.addEventListener("mouseover",w.bind(this)),l.addEventListener("mouseout",L.bind(this))}),i.setAttribute("data-open",n?"true":"false"),e&&!n&&i.setAttribute("hidden",""),ie(),this}function z(n,l,h){let u=String(h);return l.setAttribute("aria-"+n,u),u}function b(){T=!0}function w(n){E||(T||this.dispatchEvent("triggerover",{target:this,trigger:n.target,type:"triggerover"}),T=!1)}function L(n){E||this.dispatchEvent("triggerout",{target:this,trigger:n.target,type:"triggerout"})}function _(n){if(!E)switch(this.dispatchEvent("triggerclick",{target:this,trigger:n.target,type:"triggerclick"}),n.preventDefault(),o){case s:case d:this.expand();break;case c:case p:this.collapse();break}}function O(){if(m==null||m.halt(),o===c||o===p)return this;if(o=c,e&&i.removeAttribute("hidden"),this.dispatchEvent("expandbegin",{target:this,type:"expandbegin"}),!f||!x)return j(),this;let n=m==null?void 0:m.isAnimated();return n&&m.addEventListener(v.END_EVENT,j),f(),n||j(),this}function N(){if(m==null||m.halt(),o===d||o===s)return this;for(let l=0,h=r.length;l<h;l++)z("expanded",r[l],!1);if(i.setAttribute("data-open","false"),o=d,this.dispatchEvent("collapsebegin",{target:this,type:"collapsebegin"}),!x||!f)return y(),this;let n=m==null?void 0:m.isAnimated();return n&&m.addEventListener(v.END_EVENT,y),x(),n||y(),this}function R(){o=p,i.setAttribute("data-open","true"),m&&m.removeEventListener(v.END_EVENT,j),this.dispatchEvent("expandend",{target:this,type:"expandend"});for(let n=0,l=r.length;n<l;n++)z("expanded",r[n],!0)}function W(){o=s,e&&i.setAttribute("hidden",""),m&&m.removeEventListener(v.END_EVENT,y),this.dispatchEvent("collapseend",{target:this,type:"collapseend"})}function oe(n,l,h){m=n,l&&l!==x&&(x=l),h&&h!==f&&(f=h)}function fe(){m&&m.remove();let n;m=n,f=n,x=n}function xe(){return{container:t,content:i,trigger:r}}function ie(){return E&&(E=!1),!E}function _e(){return E||(E=!0),E}function ye(n){return S=n,this}let J=new D;return this.addEventListener=J.addEventListener,this.removeEventListener=J.removeEventListener,this.dispatchEvent=J.dispatchEvent,this.init=G,this.expand=O,this.collapse=N,this.setTransition=oe,this.clearTransition=fe,this.getData=()=>S,this.getTransition=()=>m,this.getDom=xe,this.isAnimating=()=>o===c||o===d,this.isExpanded=()=>o===p,this.resume=ie,this.setData=ye,this.suspend=_e,X.BASE_CLASS=te,this}var ue={CSS_PROPERTY:"opacity",BASE_CLASS:"u-alpha-transition",ALPHA_100:"u-alpha-100",ALPHA_0:"u-alpha-0"};function ut(a){let e=new D,t=new v(a,ue,this);function r(s){return t.init(s),this}function i(){return t.applyClass(ue.ALPHA_100),this}function o(){return t.applyClass(ue.ALPHA_0),this}return this.addEventListener=e.addEventListener,this.dispatchEvent=e.dispatchEvent,this.removeEventListener=e.removeEventListener,this.animateOff=t.animateOff,this.animateOn=t.animateOn,this.halt=t.halt,this.isAnimated=t.isAnimated,this.remove=t.remove,this.setElement=t.setElement,this.fadeIn=i,this.fadeOut=o,this.init=r,this}ut.CLASSES=ue;function v(a,e,t){let r=e,i=a;if(!t)throw new Error("Child transition argument must be defined!");let o=t,s,d,c,p=!1,m=!1,f=!1;if(typeof r.CSS_PROPERTY=="undefined"||typeof r.BASE_CLASS=="undefined")throw new Error("Transitions require CSS_PROPERTY and BASE_CLASS to be passed into BaseTransition.");function x(){d&&p?(i.addEventListener(d,c),o.dispatchEvent(v.BEGIN_EVENT,{target:o,type:v.BEGIN_EVENT}),i.classList.add(v.ANIMATING_CLASS),m=!0):(o.dispatchEvent(v.BEGIN_EVENT,{target:o,type:v.BEGIN_EVENT}),c())}function y(){i.removeEventListener(d,c)}function j(_){return _&&_.propertyName!==r.CSS_PROPERTY?!1:(y(),i.classList.remove(v.ANIMATING_CLASS),o.dispatchEvent(v.END_EVENT,{target:o,type:v.END_EVENT}),m=!1,!0)}function S(){let _;for(_ in r)({}).hasOwnProperty.call(r,_)&&r[_]!==r.BASE_CLASS&&i.classList.contains(r[_])&&i.classList.remove(r[_])}function E(){m&&(i.style.webkitTransitionDuration="0",i.style.mozTransitionDuration="0",i.style.oTransitionDuration="0",i.style.transitionDuration="0",i.removeEventListener(d,c),c(),i.style.webkitTransitionDuration="",i.style.mozTransitionDuration="",i.style.oTransitionDuration="",i.style.transitionDuration="")}function T(){E(),S(),i.classList.remove(r.BASE_CLASS)}function H(){i.classList.remove(v.NO_ANIMATION_CLASS),p=!0}function G(){i.classList.add(v.NO_ANIMATION_CLASS),p=!1}function z(_){if(!_){let W="Element does not have TransitionEnd event. It may be null!";throw new Error(W)}let O,N={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},R;for(R in N)if({}.hasOwnProperty.call(N,R)&&typeof _.style[R]!="undefined"){O=N[R];break}return O}function b(_){T(),H(),i=_,i.classList.add(r.BASE_CLASS),d=z(i)}function w(_){if(p=!i.classList.contains(v.NO_ANIMATION_CLASS),c=j.bind(this),b(i),!_)throw new Error("Transition needs to be passed an initial CSS class on initialization!");return i.classList.add(_),this}function L(_){return f||(S(),f=!0),i.classList.contains(_)?!1:(y(),i.classList.remove(s),s=_,x(),i.classList.add(s),!0)}return this.animateOff=G,this.animateOn=H,this.applyClass=L,this.halt=E,this.init=w,this.isAnimated=()=>p,this.remove=T,this.setElement=b,this}v.BEGIN_EVENT="transitionbegin";v.END_EVENT="transitionend";v.NO_ANIMATION_CLASS="u-no-animation";v.ANIMATING_CLASS="u-is-animating";var ae={CSS_PROPERTY:"max-height",BASE_CLASS:"u-max-height-transition",MH_DEFAULT:"u-max-height-default",MH_SUMMARY:"u-max-height-summary",MH_ZERO:"u-max-height-zero"};function I(a){let e=new D,t=new v(a,ae,this),r=0;function i(){let x=a.scrollHeight+"px";a.style.maxHeight=x}function o(){window.removeEventListener("load",o),i()}function s(f){return t.init(f),window.addEventListener("load",o),window.addEventListener("resize",()=>{i()}),this}function d(){return i(),t.applyClass(ae.MH_DEFAULT),(!r||a.scrollHeight>r)&&(r=a.scrollHeight),this}function c(){return t.applyClass(ae.MH_SUMMARY),r=a.scrollHeight,this}function p(){return t.applyClass(ae.MH_ZERO),r=a.scrollHeight,this}function m(){return a.style.maxHeight="",t.remove()}return this.addEventListener=e.addEventListener,this.dispatchEvent=e.dispatchEvent,this.removeEventListener=e.removeEventListener,this.animateOff=t.animateOff,this.animateOn=t.animateOn,this.halt=t.halt,this.isAnimated=t.isAnimated,this.setElement=t.setElement,this.refresh=i,this.remove=m,this.init=s,this.maxHeightDefault=d,this.maxHeightSummary=c,this.maxHeightZero=p,this}I.CLASSES=ae;var K={CSS_PROPERTY:"transform",BASE_CLASS:"u-move-transition",MOVE_TO_ORIGIN:"u-move-to-origin",MOVE_LEFT:"u-move-left",MOVE_LEFT_2X:"u-move-left-2x",MOVE_LEFT_3X:"u-move-left-3x",MOVE_RIGHT:"u-move-right",MOVE_UP:"u-move-up"};function bt(a){let e=new D,t=new v(a,K,this);function r(c){return t.init(c),this}function i(){return t.applyClass(K.MOVE_TO_ORIGIN),this}function o(c){c=c||1;let p=[K.MOVE_LEFT,K.MOVE_LEFT_2X,K.MOVE_LEFT_3X];return t.applyClass(p[c-1]),this}function s(){return t.applyClass(K.MOVE_RIGHT),this}function d(){return t.applyClass(K.MOVE_UP),this}return this.addEventListener=e.addEventListener,this.dispatchEvent=e.dispatchEvent,this.removeEventListener=e.removeEventListener,this.animateOff=t.animateOff,this.animateOn=t.animateOn,this.halt=t.halt,this.isAnimated=t.isAnimated,this.setElement=t.setElement,this.remove=t.remove,this.init=r,this.moveLeft=()=>o(1),this.moveLeft2=()=>o(2),this.moveLeft3=()=>o(3),this.moveRight=s,this.moveToOrigin=i,this.moveUp=d,this}bt.CLASSES=K;var Qa;function eo(a){return a.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}function to(a,e){return RegExp(eo(e.trim()),"i").test(a)}function ao(a,e,t){let r=a,i=e,o=(t==null?void 0:t.maxSelections)||5,s=[],d=[],c=[],p=[],m=-1;function f(b){return i+"-"+b.value.trim().replace(/\s+/g,"-").toLowerCase()}function x(){return d.length>=o}function y(b){let w,L=[],_=!1;for(let O=0,N=b.length;O<N;O++)w=b[O],_=x()?!1:w.defaultSelected,L.push({id:f(w),value:w.value,text:w.text,checked:_}),_&&d.push(O);return L}function j(){return s=y(r),this}function S(b){return s[b].checked=!s[b].checked,d.length<o&&s[b].checked?(d.push(b),d.sort(),!0):(s[b].checked=!1,d=d.filter(function(w){return w!==b}),!1)}function E(b,w,L,_){return to(w.text,_)&&b.push(L),b}function T(b){return Object.prototype.toString.call(b)!=="[object String]"&&(b=""),p=c,s.length>0&&(c=s.reduce(function(w,L,_){return E(w,L,_,b)},[])),m=-1,c}function H(b){return s[b]}function G(b){let w=c.length,L=w===0?s.length:w;b<0?m=-1:b>=L?m=L-1:m=b}function z(){return m}return this.init=j,this.toggleOption=S,this.getSelectedIndices=function(){return d},this.isAtMaxSelections=x,this.filterIndices=T,this.clearFilter=function(){return c=p=[],Qa},this.getFilterIndices=function(){return c},this.getLastFilterIndices=function(){return p},this.getIndex=z,this.setIndex=G,this.resetIndex=function(){return m=-1,m},this.getOption=H,this}var gt=ao;function $(a,e,t){let r=document.createElement(a);return Object.keys(t).forEach(i=>{let o=t[i];i in r?r[i]=o:r.setAttribute(i,o)}),e&&e.appendChild(r),r}var ft='<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" class="cf-icon-svg cf-icon-svg--error" viewBox="0 0 12 19"><path d="M11.383 13.644A1.03 1.03 0 0 1 9.928 15.1L6 11.172 2.072 15.1a1.03 1.03 0 1 1-1.455-1.456l3.928-3.928L.617 5.79a1.03 1.03 0 1 1 1.455-1.456L6 8.261l3.928-3.928a1.03 1.03 0 0 1 1.455 1.456L7.455 9.716z"/></svg>';var so=ft,F="o-multiselect",lo="a-checkbox",co="a-text-input",xt="prev",be="next",st="Enter",mo=" ",_t="Escape",ho="ArrowUp",yt="ArrowDown",vt="Tab",wt={renderTags:!0,maxSelections:5};function ge(a){a.classList.add(F);let e=q(a,F),t=!1,r,i,o,s,d,c,p,m,f,x,y,j=[],S;function E(){y.classList.remove("u-no-results"),y.classList.add("u-filtered");let n=o.getLastFilterIndices();for(let l=0,h=n.length;l<h;l++)j[n[l]].classList.remove("u-filter-match");n=o.getFilterIndices();for(let l=0,h=n.length;l<h;l++)j[n[l]].classList.add("u-filter-match")}function T(){y.classList.remove("u-filtered","u-no-results");for(let n=0,l=y.children.length;n<l;n++)y.children[n].classList.remove("u-filter-match");o.clearFilter()}function H(){y.classList.add("u-no-results"),y.classList.remove("u-filtered")}function G(n){return n.length>0?(E(),!0):(H(),!1)}function z(n){T(),o.resetIndex();let l=o.filterIndices(n);G(l)}function b(){return c.classList.add("u-active"),x.classList.remove("u-invisible"),x.setAttribute("aria-hidden",!1),S.dispatchEvent("expandbegin",{target:S}),S}function w(){return c.classList.remove("u-active"),x.classList.add("u-invisible"),x.setAttribute("aria-hidden",!0),o.resetIndex(),S.dispatchEvent("collapsebegin",{target:S}),S}function L(n){n===be?o.setIndex(o.getIndex()+1):n===xt&&o.setIndex(o.getIndex()-1);let l=o.getIndex();if(l>-1){let h=l,u=o.getFilterIndices();u.length>0&&(h=u[l]);let U=o.getOption(h).value,kt=y.querySelector('[data-option="'+U+'"]').querySelector("input");t=!0,kt.focus()}else t=!1,f.focus()}function _(){f.value="",T()}function O(n){let l=n.target;l.tagName==="BUTTON"&&(n.preventDefault(),l.removeEventListener("click",O),l.querySelector("label").click())}function N(n){if(n.key===mo||n.key===st){let l=n.target.querySelector("label");y.querySelector("#"+l.getAttribute("for")).click()}}function R(n){return r+"-"+n.value.trim().replace(/[^\w]/g,"-").toLowerCase()}function W(n,l){let h=R(l),u=$("li",null,{"data-option":l.value}),k=$("button",u,{type:"button",class:"a-tag-filter",innerHTML:"<label for="+h+">"+l.text+so+"</label>"});n.appendChild(u),k.addEventListener("click",O),k.addEventListener("keydown",N)}function oe(n){let l=o.getOption(n)||o.getOption(o.getIndex());if(l){if(l.checked){y.classList.contains("u-max-selections")&&y.classList.remove("u-max-selections");let h='[data-option="'+l.value+'"]',u=p.querySelector(h);typeof u!="undefined"&&u&&(p==null||p.removeChild(u))}else d!=null&&d.renderTags&&p&&W(p,l);o.toggleOption(n),o.isAtMaxSelections()&&y.classList.add("u-max-selections"),S.dispatchEvent("selectionsupdated",{target:S})}o.resetIndex(),t=!1,x.getAttribute("aria-hidden")==="false"&&f.focus()}function fe(n){oe(Number(n.target.getAttribute("data-index"))),_()}function xe(){m.addEventListener("mousemove",function(h){let u=h.target;h.offsetX>u.offsetWidth-35?u.style.cursor="pointer":u.style.cursor="auto"}),m.addEventListener("mouseup",function(h){let u=h.target;h.offsetX>u.offsetWidth-35&&x.offsetHeight===140&&f.blur()}),f.addEventListener("input",function(){z(this.value)}),f.addEventListener("focus",function(){x.getAttribute("aria-hidden")==="true"&&b()}),f.addEventListener("blur",function(){!t&&x.getAttribute("aria-hidden")==="false"&&w()}),f.addEventListener("keydown",function(h){let u=h.key;x.getAttribute("aria-hidden")==="true"&&u!==vt&&b(),u===st?(h.preventDefault(),L(be)):u===_t?(_(),w()):u===yt?L(be):u===vt&&!h.shiftKey&&x.getAttribute("aria-hidden")==="false"&&w()}),y.addEventListener("mousedown",function(){t=!0}),y.addEventListener("keydown",function(h){let u=h.key,k=h.target,U=k.checked;if(u===st){h.preventDefault(),k.checked=!U;let V=new Event("change",{bubbles:!1,cancelable:!0});k.dispatchEvent(V)}else u===_t?(f.focus(),w()):u===ho?L(xt):u===yt&&L(be)}),x.addEventListener("mousedown",function(h){h.target.tagName==="LABEL"&&(t=!0)});let n=y.querySelectorAll("input");for(let h=0,u=n.length;h<u;h++)n[h].addEventListener("change",fe);let l=p.querySelectorAll("button");for(let h=0,u=l.length;h<u;h++)l[h].addEventListener("click",O),l[h].addEventListener("keydown",N)}function ie(){c=document.createElement("div"),c.className=F,p=$("ul",null,{className:"m-tag-group"}),m=$("header",c,{className:F+"__header"}),f=$("input",m,{className:F+"__search "+co,type:"text",placeholder:i||"Select up to five",id:e.id,autocomplete:"off"}),x=$("fieldset",c,{className:F+"__fieldset u-invisible","aria-hidden":"true"});let n=F+"__options";o.isAtMaxSelections()&&(n+=" u-max-selections"),y=$("ul",x,{className:n});let l,h,u;for(let k=0,U=s.length;k<U;k++){l=s[k],h=R(l),u=o.getOption(k).checked;let V=$("li",y,{"data-option":l.value,"data-cy":"multiselect-option",class:"m-form-field m-form-field--checkbox"});$("input",V,{id:h,type:"checkbox",value:l.value,name:r,class:lo+" "+F+"__checkbox",checked:u,"data-index":k}),$("label",V,{for:h,textContent:l.text,className:F+"__label a-label"}),j.push(V),u&&(d!=null&&d.renderTags)&&W(p,l)}return c.insertBefore(p,m),e.parentNode.insertBefore(c,e),c.appendChild(e),c}function _e(n=wt){if(!M(e))return this;if(nt())return this;if(S=this,r=e.name||e.id,i=e.getAttribute("placeholder"),s=e.options||[],d=ve(ve({},wt),n),s.length>0){o=new gt(s,r,d).init();let l=ie();e.parentNode.removeChild(e),e=l,M(e),xe()}return this}function ye(){return o}this.init=_e,this.expand=b,this.collapse=w;let J=new D;return this.addEventListener=J.addEventListener,this.removeEventListener=J.removeEventListener,this.dispatchEvent=J.dispatchEvent,this.getModel=ye,this.updateSelections=oe,this.selectionClickHandler=O,this.selectionKeyDownHandler=N,this}ge.BASE_CLASS=F;ge.init=a=>C(`.${F}`,ge,void 0,a);})();
1
+ (()=>{var ct=Object.defineProperty;var lt=Object.getOwnPropertySymbols;var St=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable;var dt=(a,e,t)=>e in a?ct(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,ve=(a,e)=>{for(var t in e||(e={}))St.call(e,t)&&dt(a,t,e[t]);if(lt)for(var t of lt(e))Et.call(e,t)&&dt(a,t,e[t]);return a};var g=(a,e)=>{for(var t in e)ct(a,t,{get:e[t],enumerable:!0})};var we={};g(we,{default:()=>Dt});var Dt={};var ke={};g(ke,{default:()=>jt});var jt={};var Se={};g(Se,{default:()=>Ot});var Ot={};var Ee={};g(Ee,{default:()=>It});var It={};var Le={};g(Le,{default:()=>Mt});var Mt={};var De={};g(De,{default:()=>qt});var qt={};var Ae={};g(Ae,{default:()=>$t});var $t={};var je={};g(je,{default:()=>Ht});var Ht={};var Te={};g(Te,{default:()=>Gt});var Gt={};var Oe={};g(Oe,{default:()=>Ut});var Ut={};var re={bpXS:{min:0,max:600},bpSM:{min:601,max:900},bpMED:{min:901,max:1020},bpLG:{min:1021,max:1200},bpXL:{min:1201}};function ne(){let a=getComputedStyle(document.body).fontSize;return a=a===""?-1:a,parseFloat(a)}function Pt(a,e){let t=a.min,r=a.max;ne()>0&&ne()!==16&&(t=t/16*ne(),r=r/16*ne());let o=t||0,s=r||Number.POSITIVE_INFINITY;return o<=e&&e<=s}function Xt(a){let e={};a=a||window.innerWidth;let t;for(t in re)e[t]=Pt(re[t],a);return e}var se="mobile",Kt="tablet",Jt="desktop";function ze(a){let e=!1,t=Xt();return(a===se&&t.bpXS||a===Kt&&t.bpSM||a===Jt&&(t.bpMED||t.bpLG||t.bpXL))&&(e=!0),e}var B="data-js-hook",le="behavior_",Ie="state_";function D(){let a={};function e(i,o){return{}.hasOwnProperty.call(a,i)?a[i].push(o):a[i]=[o],this}function t(i,o){if(!{}.hasOwnProperty.call(a,i))return this;let s=a[i].indexOf(o);return s!==-1&&a[i].splice(s,1),this}function r(i,o){if(!{}.hasOwnProperty.call(a,i))return this;o=o||{};let s=a[i];for(let d=0,c=s.length;d<c;d++)s[d].call(this,o);return this}return this.addEventListener=e,this.removeEventListener=t,this.dispatchEvent=r,this.getRegisteredEvents=()=>a,this}function Y(a,e){if(!a)return!1;let t=a.getAttribute(B);return t?(t=t.split(" "),t.indexOf(e)>-1):!1}function A(a,e){if(Y(a,e))return e;if(e.indexOf(" ")!==-1){let r=B+" values cannot contain spaces!";throw new Error(r)}let t=a.getAttribute(B);return t!==null&&(e=t+" "+e),a.setAttribute(B,e),e}var Be=Ie+"atomic_init";function Yt(a,e){if(!a||!a.classList){let t=a+' is not valid. Check that element is a DOM node with class "'+e+'"';throw new Error(t)}return a}function Wt(a,e){let t=a.classList.contains(e)?a:a.querySelector("."+e);if(!t){let r=e+" not found on or in passed DOM node.";throw new Error(r)}return t}function q(a,e){return Yt(a,e),Wt(a,e)}function M(a){return Y(a,Be)?!1:(A(a,Be),!0)}function C(a,e,t,r={}){let o=(t||document).querySelectorAll(a),s=[],d,c;for(let p=0,m=o.length;p<m;p++)c=o[p],Y(c,Be)===!1&&(d=new e(c),d.init(r),s.push(d));return s}var Me={};g(Me,{default:()=>Qt});var Qt={};var Ne={};g(Ne,{default:()=>ta});var ta={};var qe={};g(qe,{default:()=>oa});var oa={};var Ce={};g(Ce,{default:()=>ra});var ra={};var $e={};g($e,{default:()=>sa});var sa={};var Z="o-expandable";function P(a){let e=q(a,Z),t,r,i,o,s;function d(){if(!M(e))return this;t=e.querySelector(`.${Z}__header`),r=e.querySelector(`.${Z}__content`),i=e.querySelector(`.${Z}__label`);let m=e.classList.contains(`${Z}--onload-open`);A(e,"behavior_flyout-menu"),A(t,"behavior_flyout-menu_trigger"),A(r,"behavior_flyout-menu_content");let f=m?I.CLASSES.MH_DEFAULT:I.CLASSES.MH_ZERO;return o=new I(r).init(f),s=new X(e),s.setTransition(o,o.maxHeightZero,o.maxHeightDefault),s.init(m),s.addEventListener("expandbegin",()=>{r.classList.remove("u-hidden"),this.dispatchEvent("expandbegin",{target:this})}),s.addEventListener("collapseend",()=>{r.classList.add("u-hidden")}),this}function c(){return i.textContent.trim()}this.init=d,this.expand=()=>s.expand(),this.collapse=()=>s.collapse(),this.isExpanded=()=>s.isExpanded(),this.refresh=()=>s.getTransition().refresh(),this.getLabelText=c;let p=new D;return this.addEventListener=p.addEventListener,this.removeEventListener=p.removeEventListener,this.dispatchEvent=p.dispatchEvent,this}P.BASE_CLASS=Z;P.init=a=>C(`.${P.BASE_CLASS}`,P,a);var de="o-expandable-group";function ce(a){let e=q(a,de),t=e.classList.contains(`${de}--accordion`),r,i;function o(d){let c=d.target;i&&i!==c&&i.collapse(),i=c}function s(d){return M(e)?(t&&(r=d,r.forEach(c=>{c.addEventListener("expandbegin",o)})),this):this}return this.init=s,this}ce.BASE_CLASS=de;ce.init=a=>{(a||document).querySelectorAll(`.${de}`).forEach(r=>{let i=C(`.${P.BASE_CLASS}`,P,r);new ce(r).init(i)})};var Q="o-summary";function me(a){let e=q(a,Q),t=e.classList.contains(`${Q}--mobile`),r=e.querySelector(`.${Q}__content`),i=e.querySelector(`.${Q}__btn`),o,s,d;function c(){return M(e)?(window.addEventListener("load",p),this):this}function p(){window.removeEventListener("load",p),d=!_(),A(e,"behavior_flyout-menu"),A(r,"behavior_flyout-menu_content"),A(i,"behavior_flyout-menu_trigger"),s=new X(e,!1),o=new I(r),o.init(d?I.CLASSES.MH_SUMMARY:I.CLASSES.MH_DEFAULT),s.setTransition(o,o.maxHeightSummary,o.maxHeightDefault),s.addEventListener("triggerclick",j),s.init(),x(),window.addEventListener("resize",x),"onorientationchange"in window&&window.addEventListener("orientationchange",x),e.addEventListener("focusin",m),r.addEventListener("click",f)}function m(b){!d&&b.target!==i&&(i.click(),e.removeEventListener("focusin",m))}function f(b){b.target.tagName!=="A"&&s.isExpanded()&&o.refresh()}function x(){_()?G():H()}function _(){return t&&!ze(se)||r.scrollHeight<=88}function j(){s.addEventListener("expandend",S)}function S(){T(),window.removeEventListener("resize",x),window.removeEventListener("orientationchange",x),s.removeEventListener("expandend",S),s.suspend(),o.remove()}function E(){i.classList.remove("u-hidden")}function T(){i.classList.add("u-hidden")}function H(){return d&&(s.collapse(),o.animateOn(),E(),d=!1),!d}function G(){return d||(o.animateOff(),s.expand(),T(),d=!0),d}let z=new D;return this.addEventListener=z.addEventListener,this.removeEventListener=z.removeEventListener,this.dispatchEvent=z.dispatchEvent,this.init=c,this}me.BASE_CLASS=Q;me.init=a=>C(`.${Q}`,me,a);var ee="o-summary-minimal";function he(a){let e=q(a,ee),t=e.querySelector(`.${ee}__content`),r=e.querySelector(`.${ee}__btn`),i,o;function s(){return M(e)?(A(e,"behavior_flyout-menu"),A(t,"behavior_flyout-menu_content"),A(r,"behavior_flyout-menu_trigger"),window.addEventListener("load",d),this):this}function d(){window.removeEventListener("load",d),o=new X(e,!1),i=new I(t),i.init(I.CLASSES.MH_SUMMARY),o.setTransition(i,i.maxHeightSummary,i.maxHeightDefault),o.init(),e.addEventListener("focusin",c),t.addEventListener("click",p),o.collapse(),i.animateOn()}function c(f){f.target!==r&&(r.click(),e.removeEventListener("focusin",c))}function p(f){f.target.tagName!=="A"&&o.isExpanded()&&i.refresh()}let m=new D;return this.addEventListener=m.addEventListener,this.removeEventListener=m.removeEventListener,this.dispatchEvent=m.dispatchEvent,this.init=s,this}he.BASE_CLASS=ee;he.init=a=>C(`.${ee}`,he,a);var Fe={};g(Fe,{default:()=>ca});var ca={};var He={};g(He,{default:()=>ha});var ha={};var Ve={};g(Ve,{default:()=>ua});var ua={};var Ge={};g(Ge,{default:()=>ga});var ga={};var Re={};g(Re,{default:()=>xa});var xa={};var Ue={};g(Ue,{default:()=>_a});var _a={};var Pe={};g(Pe,{default:()=>wa});var wa={};var Xe={};g(Xe,{default:()=>Sa});var Sa={};var Ke={};g(Ke,{default:()=>La});var La={};var Je={};g(Je,{default:()=>Aa});var Aa={};var Ye={};g(Ye,{default:()=>Ta});var Ta={};var We={};g(We,{default:()=>za});var za={};var Ze={};g(Ze,{default:()=>Ba});var Ba={};var Qe={};g(Qe,{default:()=>Na});var Na={};var et={};g(et,{default:()=>Ca});var Ca={};var tt={};g(tt,{default:()=>Fa});var Fa={};var at={};g(at,{default:()=>Va});var Va={};var ot={};g(ot,{default:()=>Ra});var Ra={};var it={};g(it,{default:()=>Pa});var Pa={};var rt={};g(rt,{default:()=>Ka});var Ka={};function pe(a,e){let t;if(Y(a,e))return t=a,t;if(a){let r="["+B+"="+e+"]";t=a.querySelector(r)}if(!t){let r=e+" behavior not found on passed DOM node!";throw new Error(r)}return t}var Ja=Object.prototype.toString;var Ya=Array.isArray||function(e){return Ja.call(e)==="[object Array]"};function nt(){return!!new RegExp(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i).test(navigator.userAgent)}var te=le+"flyout-menu",Wa="["+B+"="+te;function X(a,e=!0){let t=pe(a,te),r=H(a),i=pe(a,te+"_content"),o=0,s=0,d=1,c=2,p=3,m,f,x,_=W.bind(this),j=R.bind(this),S,E=!0,T=!1;function H(n){let l=[],h=n.querySelectorAll(`${Wa}_trigger]`),u,k,U;for(let V=h.length>>>0;V--;){for(U=!1,u=h[V],k=u.parentElement;k!==n;)k.getAttribute(B)&&k.getAttribute(B).split(" ").indexOf(te)!==-1?(U=!0,k=n):k=k.parentElement;U||l.unshift(h[V])}return l}function G(n=!1){return o=n?p:s,r.forEach(l=>{z("expanded",l,n),l.addEventListener("click",y.bind(this)),l.addEventListener("touchstart",b,{passive:!0}),l.addEventListener("mouseover",w.bind(this)),l.addEventListener("mouseout",L.bind(this))}),i.setAttribute("data-open",n?"true":"false"),e&&!n&&i.setAttribute("hidden",""),ie(),this}function z(n,l,h){let u=String(h);return l.setAttribute("aria-"+n,u),u}function b(){T=!0}function w(n){E||(T||this.dispatchEvent("triggerover",{target:this,trigger:n.target,type:"triggerover"}),T=!1)}function L(n){E||this.dispatchEvent("triggerout",{target:this,trigger:n.target,type:"triggerout"})}function y(n){if(!E)switch(this.dispatchEvent("triggerclick",{target:this,trigger:n.target,type:"triggerclick"}),n.preventDefault(),o){case s:case d:this.expand();break;case c:case p:this.collapse();break}}function O(){if(m==null||m.halt(),o===c||o===p)return this;if(o=c,e&&i.removeAttribute("hidden"),this.dispatchEvent("expandbegin",{target:this,type:"expandbegin"}),!f||!x)return j(),this;let n=m==null?void 0:m.isAnimated();return n&&m.addEventListener(v.END_EVENT,j),f(),n||j(),this}function N(){if(m==null||m.halt(),o===d||o===s)return this;for(let l=0,h=r.length;l<h;l++)z("expanded",r[l],!1);if(i.setAttribute("data-open","false"),o=d,this.dispatchEvent("collapsebegin",{target:this,type:"collapsebegin"}),!x||!f)return _(),this;let n=m==null?void 0:m.isAnimated();return n&&m.addEventListener(v.END_EVENT,_),x(),n||_(),this}function R(){o=p,i.setAttribute("data-open","true"),m&&m.removeEventListener(v.END_EVENT,j),this.dispatchEvent("expandend",{target:this,type:"expandend"});for(let n=0,l=r.length;n<l;n++)z("expanded",r[n],!0)}function W(){o=s,e&&i.setAttribute("hidden",""),m&&m.removeEventListener(v.END_EVENT,_),this.dispatchEvent("collapseend",{target:this,type:"collapseend"})}function oe(n,l,h){m=n,l&&l!==x&&(x=l),h&&h!==f&&(f=h)}function fe(){m&&m.remove();let n;m=n,f=n,x=n}function xe(){return{container:t,content:i,trigger:r}}function ie(){return E&&(E=!1),!E}function ye(){return E||(E=!0),E}function _e(n){return S=n,this}let J=new D;return this.addEventListener=J.addEventListener,this.removeEventListener=J.removeEventListener,this.dispatchEvent=J.dispatchEvent,this.init=G,this.expand=O,this.collapse=N,this.setTransition=oe,this.clearTransition=fe,this.getData=()=>S,this.getTransition=()=>m,this.getDom=xe,this.isAnimating=()=>o===c||o===d,this.isExpanded=()=>o===p,this.resume=ie,this.setData=_e,this.suspend=ye,X.BASE_CLASS=te,this}var ue={CSS_PROPERTY:"opacity",BASE_CLASS:"u-alpha-transition",ALPHA_100:"u-alpha-100",ALPHA_0:"u-alpha-0"};function ut(a){let e=new D,t=new v(a,ue,this);function r(s){return t.init(s),this}function i(){return t.applyClass(ue.ALPHA_100),this}function o(){return t.applyClass(ue.ALPHA_0),this}return this.addEventListener=e.addEventListener,this.dispatchEvent=e.dispatchEvent,this.removeEventListener=e.removeEventListener,this.animateOff=t.animateOff,this.animateOn=t.animateOn,this.halt=t.halt,this.isAnimated=t.isAnimated,this.remove=t.remove,this.setElement=t.setElement,this.fadeIn=i,this.fadeOut=o,this.init=r,this}ut.CLASSES=ue;function v(a,e,t){let r=e,i=a;if(!t)throw new Error("Child transition argument must be defined!");let o=t,s,d,c,p=!1,m=!1,f=!1;if(typeof r.CSS_PROPERTY=="undefined"||typeof r.BASE_CLASS=="undefined")throw new Error("Transitions require CSS_PROPERTY and BASE_CLASS to be passed into BaseTransition.");function x(){d&&p?(i.addEventListener(d,c),o.dispatchEvent(v.BEGIN_EVENT,{target:o,type:v.BEGIN_EVENT}),i.classList.add(v.ANIMATING_CLASS),m=!0):(o.dispatchEvent(v.BEGIN_EVENT,{target:o,type:v.BEGIN_EVENT}),c())}function _(){i.removeEventListener(d,c)}function j(y){return y&&y.propertyName!==r.CSS_PROPERTY?!1:(_(),i.classList.remove(v.ANIMATING_CLASS),o.dispatchEvent(v.END_EVENT,{target:o,type:v.END_EVENT}),m=!1,!0)}function S(){let y;for(y in r)({}).hasOwnProperty.call(r,y)&&r[y]!==r.BASE_CLASS&&i.classList.contains(r[y])&&i.classList.remove(r[y])}function E(){m&&(i.style.webkitTransitionDuration="0",i.style.mozTransitionDuration="0",i.style.oTransitionDuration="0",i.style.transitionDuration="0",i.removeEventListener(d,c),c(),i.style.webkitTransitionDuration="",i.style.mozTransitionDuration="",i.style.oTransitionDuration="",i.style.transitionDuration="")}function T(){E(),S(),i.classList.remove(r.BASE_CLASS)}function H(){i.classList.remove(v.NO_ANIMATION_CLASS),p=!0}function G(){i.classList.add(v.NO_ANIMATION_CLASS),p=!1}function z(y){if(!y){let W="Element does not have TransitionEnd event. It may be null!";throw new Error(W)}let O,N={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},R;for(R in N)if({}.hasOwnProperty.call(N,R)&&typeof y.style[R]!="undefined"){O=N[R];break}return O}function b(y){T(),H(),i=y,i.classList.add(r.BASE_CLASS),d=z(i)}function w(y){if(p=!i.classList.contains(v.NO_ANIMATION_CLASS),c=j.bind(this),b(i),!y)throw new Error("Transition needs to be passed an initial CSS class on initialization!");return i.classList.add(y),this}function L(y){return f||(S(),f=!0),i.classList.contains(y)?!1:(_(),i.classList.remove(s),s=y,x(),i.classList.add(s),!0)}return this.animateOff=G,this.animateOn=H,this.applyClass=L,this.halt=E,this.init=w,this.isAnimated=()=>p,this.remove=T,this.setElement=b,this}v.BEGIN_EVENT="transitionbegin";v.END_EVENT="transitionend";v.NO_ANIMATION_CLASS="u-no-animation";v.ANIMATING_CLASS="u-is-animating";var ae={CSS_PROPERTY:"max-height",BASE_CLASS:"u-max-height-transition",MH_DEFAULT:"u-max-height-default",MH_SUMMARY:"u-max-height-summary",MH_ZERO:"u-max-height-zero"};function I(a){let e=new D,t=new v(a,ae,this),r=0;function i(){let x=a.scrollHeight+"px";a.style.maxHeight=x}function o(){window.removeEventListener("load",o),i()}function s(f){return t.init(f),window.addEventListener("load",o),window.addEventListener("resize",()=>{i()}),this}function d(){return i(),t.applyClass(ae.MH_DEFAULT),(!r||a.scrollHeight>r)&&(r=a.scrollHeight),this}function c(){return t.applyClass(ae.MH_SUMMARY),r=a.scrollHeight,this}function p(){return t.applyClass(ae.MH_ZERO),r=a.scrollHeight,this}function m(){return a.style.maxHeight="",t.remove()}return this.addEventListener=e.addEventListener,this.dispatchEvent=e.dispatchEvent,this.removeEventListener=e.removeEventListener,this.animateOff=t.animateOff,this.animateOn=t.animateOn,this.halt=t.halt,this.isAnimated=t.isAnimated,this.setElement=t.setElement,this.refresh=i,this.remove=m,this.init=s,this.maxHeightDefault=d,this.maxHeightSummary=c,this.maxHeightZero=p,this}I.CLASSES=ae;var K={CSS_PROPERTY:"transform",BASE_CLASS:"u-move-transition",MOVE_TO_ORIGIN:"u-move-to-origin",MOVE_LEFT:"u-move-left",MOVE_LEFT_2X:"u-move-left-2x",MOVE_LEFT_3X:"u-move-left-3x",MOVE_RIGHT:"u-move-right",MOVE_UP:"u-move-up"};function bt(a){let e=new D,t=new v(a,K,this);function r(c){return t.init(c),this}function i(){return t.applyClass(K.MOVE_TO_ORIGIN),this}function o(c){c=c||1;let p=[K.MOVE_LEFT,K.MOVE_LEFT_2X,K.MOVE_LEFT_3X];return t.applyClass(p[c-1]),this}function s(){return t.applyClass(K.MOVE_RIGHT),this}function d(){return t.applyClass(K.MOVE_UP),this}return this.addEventListener=e.addEventListener,this.dispatchEvent=e.dispatchEvent,this.removeEventListener=e.removeEventListener,this.animateOff=t.animateOff,this.animateOn=t.animateOn,this.halt=t.halt,this.isAnimated=t.isAnimated,this.setElement=t.setElement,this.remove=t.remove,this.init=r,this.moveLeft=()=>o(1),this.moveLeft2=()=>o(2),this.moveLeft3=()=>o(3),this.moveRight=s,this.moveToOrigin=i,this.moveUp=d,this}bt.CLASSES=K;var Qa;function eo(a){return a.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}function to(a,e){return RegExp(eo(e.trim()),"i").test(a)}function ao(a,e,t){let r=a,i=e,o=(t==null?void 0:t.maxSelections)||5,s=[],d=[],c=[],p=[],m=-1;function f(b){return i+"-"+b.value.trim().replace(/\s+/g,"-").toLowerCase()}function x(){return d.length>=o}function _(b){let w,L=[],y=!1;for(let O=0,N=b.length;O<N;O++)w=b[O],y=x()?!1:w.defaultSelected,L.push({id:f(w),value:w.value,text:w.text,checked:y}),y&&d.push(O);return L}function j(){return s=_(r),this}function S(b){return s[b].checked=!s[b].checked,d.length<o&&s[b].checked?(d.push(b),d.sort(),!0):(s[b].checked=!1,d=d.filter(function(w){return w!==b}),!1)}function E(b,w,L,y){return to(w.text,y)&&b.push(L),b}function T(b){return Object.prototype.toString.call(b)!=="[object String]"&&(b=""),p=c,s.length>0&&(c=s.reduce(function(w,L,y){return E(w,L,y,b)},[])),m=-1,c}function H(b){return s[b]}function G(b){let w=c.length,L=w===0?s.length:w;b<0?m=-1:b>=L?m=L-1:m=b}function z(){return m}return this.init=j,this.toggleOption=S,this.getSelectedIndices=function(){return d},this.isAtMaxSelections=x,this.filterIndices=T,this.clearFilter=function(){return c=p=[],Qa},this.getFilterIndices=function(){return c},this.getLastFilterIndices=function(){return p},this.getIndex=z,this.setIndex=G,this.resetIndex=function(){return m=-1,m},this.getOption=H,this}var gt=ao;function $(a,e,t){let r=document.createElement(a);return Object.keys(t).forEach(i=>{let o=t[i];i in r?r[i]=o:r.setAttribute(i,o)}),e&&e.appendChild(r),r}var ft='<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" class="cf-icon-svg cf-icon-svg--error" viewBox="0 0 12 19"><path d="M11.383 13.644A1.03 1.03 0 0 1 9.928 15.1L6 11.172 2.072 15.1a1.03 1.03 0 1 1-1.455-1.456l3.928-3.928L.617 5.79a1.03 1.03 0 1 1 1.455-1.456L6 8.261l3.928-3.928a1.03 1.03 0 0 1 1.455 1.456L7.455 9.716z"/></svg>';var so=ft,F="o-multiselect",lo="a-checkbox",co="a-text-input",xt="prev",be="next",st="Enter",mo=" ",yt="Escape",ho="ArrowUp",_t="ArrowDown",vt="Tab",wt={renderTags:!0,maxSelections:5};function ge(a){a.classList.add(F);let e=q(a,F),t=!1,r,i,o,s,d,c,p,m,f,x,_,j=[],S;function E(){_.classList.remove("u-no-results"),_.classList.add("u-filtered");let n=o.getLastFilterIndices();for(let l=0,h=n.length;l<h;l++)j[n[l]].classList.remove("u-filter-match");n=o.getFilterIndices();for(let l=0,h=n.length;l<h;l++)j[n[l]].classList.add("u-filter-match")}function T(){_.classList.remove("u-filtered","u-no-results");for(let n=0,l=_.children.length;n<l;n++)_.children[n].classList.remove("u-filter-match");o.clearFilter()}function H(){_.classList.add("u-no-results"),_.classList.remove("u-filtered")}function G(n){return n.length>0?(E(),!0):(H(),!1)}function z(n){T(),o.resetIndex();let l=o.filterIndices(n);G(l)}function b(){return c.classList.add("u-active"),x.classList.remove("u-invisible"),x.setAttribute("aria-hidden",!1),S.dispatchEvent("expandbegin",{target:S}),S}function w(){return c.classList.remove("u-active"),x.classList.add("u-invisible"),x.setAttribute("aria-hidden",!0),o.resetIndex(),S.dispatchEvent("collapsebegin",{target:S}),S}function L(n){n===be?o.setIndex(o.getIndex()+1):n===xt&&o.setIndex(o.getIndex()-1);let l=o.getIndex();if(l>-1){let h=l,u=o.getFilterIndices();u.length>0&&(h=u[l]);let U=o.getOption(h).value,kt=_.querySelector('[data-option="'+U+'"]').querySelector("input");t=!0,kt.focus()}else t=!1,f.focus()}function y(){f.value="",T()}function O(n){let l=n.target;l.tagName==="BUTTON"&&(n.preventDefault(),l.removeEventListener("click",O),l.querySelector("label").click())}function N(n){if(n.key===mo||n.key===st){let l=n.target.querySelector("label");_.querySelector("#"+l.getAttribute("for")).click()}}function R(n){return r+"-"+n.value.trim().replace(/[^\w]/g,"-").toLowerCase()}function W(n,l){let h=R(l),u=$("li",null,{"data-option":l.value}),k=$("button",u,{type:"button",class:"a-tag-filter",innerHTML:"<label for="+h+">"+l.text+so+"</label>"});n.appendChild(u),k.addEventListener("click",O),k.addEventListener("keydown",N)}function oe(n){let l=o.getOption(n)||o.getOption(o.getIndex());if(l){if(l.checked){_.classList.contains("u-max-selections")&&_.classList.remove("u-max-selections");let h='[data-option="'+l.value+'"]',u=p.querySelector(h);typeof u!="undefined"&&u&&(p==null||p.removeChild(u))}else d!=null&&d.renderTags&&p&&W(p,l);o.toggleOption(n),o.isAtMaxSelections()&&_.classList.add("u-max-selections"),S.dispatchEvent("selectionsupdated",{target:S})}o.resetIndex(),t=!1,x.getAttribute("aria-hidden")==="false"&&f.focus()}function fe(n){oe(Number(n.target.getAttribute("data-index"))),y()}function xe(){m.addEventListener("mousemove",function(h){let u=h.target;h.offsetX>u.offsetWidth-35?u.style.cursor="pointer":u.style.cursor="auto"}),m.addEventListener("mouseup",function(h){let u=h.target;h.offsetX>u.offsetWidth-35&&x.offsetHeight===140&&f.blur()}),f.addEventListener("input",function(){z(this.value)}),f.addEventListener("focus",function(){x.getAttribute("aria-hidden")==="true"&&b()}),f.addEventListener("blur",function(){!t&&x.getAttribute("aria-hidden")==="false"&&w()}),f.addEventListener("keydown",function(h){let u=h.key;x.getAttribute("aria-hidden")==="true"&&u!==vt&&b(),u===st?(h.preventDefault(),L(be)):u===yt?(y(),w()):u===_t?L(be):u===vt&&!h.shiftKey&&x.getAttribute("aria-hidden")==="false"&&w()}),_.addEventListener("mousedown",function(){t=!0}),_.addEventListener("keydown",function(h){let u=h.key,k=h.target,U=k.checked;if(u===st){h.preventDefault(),k.checked=!U;let V=new Event("change",{bubbles:!1,cancelable:!0});k.dispatchEvent(V)}else u===yt?(f.focus(),w()):u===ho?L(xt):u===_t&&L(be)}),x.addEventListener("mousedown",function(h){h.target.tagName==="LABEL"&&(t=!0)});let n=_.querySelectorAll("input");for(let h=0,u=n.length;h<u;h++)n[h].addEventListener("change",fe);let l=p.querySelectorAll("button");for(let h=0,u=l.length;h<u;h++)l[h].addEventListener("click",O),l[h].addEventListener("keydown",N)}function ie(){c=document.createElement("div"),c.className=F,p=$("ul",null,{className:"m-tag-group"}),m=$("header",c,{className:F+"__header"}),f=$("input",m,{className:F+"__search "+co,type:"text",placeholder:i||"Select up to five",id:e.id,autocomplete:"off"}),x=$("fieldset",c,{className:F+"__fieldset u-invisible","aria-hidden":"true"});let n=F+"__options";o.isAtMaxSelections()&&(n+=" u-max-selections"),_=$("ul",x,{className:n});let l,h,u;for(let k=0,U=s.length;k<U;k++){l=s[k],h=R(l),u=o.getOption(k).checked;let V=$("li",_,{"data-option":l.value,"data-cy":"multiselect-option",class:"m-form-field m-form-field--checkbox"});$("input",V,{id:h,type:"checkbox",value:l.value,name:r,class:lo+" "+F+"__checkbox",checked:u,"data-index":k}),$("label",V,{for:h,textContent:l.text,className:F+"__label a-label"}),j.push(V),u&&(d!=null&&d.renderTags)&&W(p,l)}return c.insertBefore(p,m),e.parentNode.insertBefore(c,e),c.appendChild(e),c}function ye(n=wt){if(!M(e))return this;if(nt())return this;if(S=this,r=e.name||e.id,i=e.getAttribute("placeholder"),s=e.options||[],d=ve(ve({},wt),n),s.length>0){o=new gt(s,r,d).init();let l=ie();e.parentNode.removeChild(e),e=l,M(e),xe()}return this}function _e(){return o}this.init=ye,this.expand=b,this.collapse=w;let J=new D;return this.addEventListener=J.addEventListener,this.removeEventListener=J.removeEventListener,this.dispatchEvent=J.dispatchEvent,this.getModel=_e,this.updateSelections=oe,this.selectionClickHandler=O,this.selectionKeyDownHandler=N,this}ge.BASE_CLASS=F;ge.init=a=>C(`.${F}`,ge,void 0,a);})();
2
2
  //# sourceMappingURL=index.js.map