@cfpb/cfpb-design-system 3.4.5 → 3.4.7
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.
- package/CHANGELOG.md +24 -1
- package/dist/components/cfpb-buttons/index.css +1 -1
- package/dist/components/cfpb-buttons/index.css.map +2 -2
- package/dist/components/cfpb-buttons/index.js +1 -1
- package/dist/components/cfpb-buttons/index.js.map +1 -1
- package/dist/components/cfpb-expandables/index.css +1 -1
- package/dist/components/cfpb-expandables/index.css.map +2 -2
- package/dist/components/cfpb-expandables/index.js +1 -1
- package/dist/components/cfpb-expandables/index.js.map +1 -1
- package/dist/components/cfpb-forms/index.css +1 -1
- package/dist/components/cfpb-forms/index.css.map +2 -2
- package/dist/components/cfpb-forms/index.js +1 -1
- package/dist/components/cfpb-forms/index.js.map +1 -1
- package/dist/components/cfpb-notifications/index.css.map +2 -2
- package/dist/components/cfpb-notifications/index.js +1 -1
- package/dist/components/cfpb-notifications/index.js.map +1 -1
- package/dist/components/cfpb-typography/index.css.map +2 -2
- package/dist/components/cfpb-typography/index.js +1 -1
- package/dist/components/cfpb-typography/index.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/utilities/index.css +1 -1
- package/dist/utilities/index.css.map +2 -2
- package/dist/utilities/index.js +1 -1
- package/dist/utilities/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/cfpb-buttons/button-group.scss +1 -0
- package/src/components/cfpb-buttons/button-link.scss +71 -82
- package/src/components/cfpb-buttons/button.scss +25 -21
- package/src/utilities/utilities.scss +15 -0
package/dist/utilities/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{var mt=Object.defineProperty;var dt=Object.getOwnPropertySymbols;var jt=Object.prototype.hasOwnProperty,Tt=Object.prototype.propertyIsEnumerable;var ct=(e,t,a)=>t in e?mt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,we=(e,t)=>{for(var a in t||(t={}))jt.call(t,a)&&ct(e,a,t[a]);if(dt)for(var a of dt(t))Tt.call(t,a)&&ct(e,a,t[a]);return e};var g=(e,t)=>{for(var a in t)mt(e,a,{get:t[a],enumerable:!0})};var ke={};g(ke,{default:()=>Ot});var Ot={};var se={bpXS:{min:0,max:600},bpSM:{min:601,max:900},bpMED:{min:901,max:1020},bpLG:{min:1021,max:1200},bpXL:{min:1201}};function le(){let e=getComputedStyle(document.body).fontSize;return e=e===""?-1:e,parseFloat(e)}function It(e,t){let a=e.min,r=e.max;le()>0&&le()!==16&&(a=a/16*le(),r=r/16*le());let o=a||0,s=r||Number.POSITIVE_INFINITY;return o<=t&&t<=s}function Bt(e){let t={};e=e||window.innerWidth;let a;for(a in se)t[a]=It(se[a],e);return t}var de="mobile",Mt="tablet",Nt="desktop";function Se(e){let t=!1,a=Bt();return(e===de&&a.bpXS||e===Mt&&a.bpSM||e===Nt&&(a.bpMED||a.bpLG||a.bpXL))&&(t=!0),t}var I="data-js-hook",Z="behavior_",Ee="state_";function A(){let e={};function t(i,o){return{}.hasOwnProperty.call(e,i)?e[i].push(o):e[i]=[o],this}function a(i,o){if(!{}.hasOwnProperty.call(e,i))return this;let s=e[i].indexOf(o);return s!==-1&&e[i].splice(s,1),this}function r(i,o){if(!{}.hasOwnProperty.call(e,i))return this;o=o||{};let s=e[i];for(let d=0,c=s.length;d<c;d++)s[d].call(this,o);return this}return this.addEventListener=t,this.removeEventListener=a,this.dispatchEvent=r,this.getRegisteredEvents=()=>e,this}function $(e,t){if(!e)return!1;let a=e.getAttribute(I);return a?(a=a.split(" "),a.indexOf(t)>-1):!1}function L(e,t){if($(e,t))return t;if(t.indexOf(" ")!==-1){let r=I+" values cannot contain spaces!";throw new Error(r)}let a=e.getAttribute(I);return a!==null&&(t=a+" "+t),e.setAttribute(I,t),t}var De=Ee+"atomic_init";function qt(e,t){if(!e||!e.classList){let a=e+' is not valid. Check that element is a DOM node with class "'+t+'"';throw new Error(a)}return e}function Ct(e,t){let a=e.classList.contains(t)?e:e.querySelector("."+t);if(!a){let r=t+" not found on or in passed DOM node.";throw new Error(r)}return a}function q(e,t){return qt(e,t),Ct(e,t)}function M(e){return $(e,De)?!1:(L(e,De),!0)}function C(e,t,a,r={}){let o=(a||document).querySelectorAll(e),s=[],d,c;for(let p=0,m=o.length;p<m;p++)c=o[p],$(c,De)===!1&&(d=new t(c),d.init(r),s.push(d));return s}var Ae={};g(Ae,{default:()=>Ht});var Ht={};var Le={};g(Le,{default:()=>Gt});var Gt={};var je={};g(je,{default:()=>Ut});var Ut={};var Te={};g(Te,{default:()=>Xt});var Xt={};var ze={};g(ze,{default:()=>Jt});var Jt={};var Q="o-expandable";function X(e){let t=q(e,Q),a,r,i,o,s;function d(){if(!M(t))return this;a=t.querySelector(`.${Q}__header`),r=t.querySelector(`.${Q}__content`),i=t.querySelector(`.${Q}__label`);let m=t.classList.contains(`${Q}--onload-open`);L(t,"behavior_flyout-menu"),L(a,"behavior_flyout-menu_trigger"),L(r,"behavior_flyout-menu_content");let f=m?B.CLASSES.MH_DEFAULT:B.CLASSES.MH_ZERO;return o=new B(r).init(f),s=new K(t),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 A;return this.addEventListener=p.addEventListener,this.removeEventListener=p.removeEventListener,this.dispatchEvent=p.dispatchEvent,this}X.BASE_CLASS=Q;X.init=e=>C(`.${X.BASE_CLASS}`,X,e);var ce="o-expandable-group";function me(e){let t=q(e,ce),a=t.classList.contains(`${ce}--accordion`),r,i;function o(d){let c=d.target;i&&i!==c&&i.collapse(),i=c}function s(d){return M(t)?(a&&(r=d,r.forEach(c=>{c.addEventListener("expandbegin",o)})),this):this}return this.init=s,this}me.BASE_CLASS=ce;me.init=e=>{(e||document).querySelectorAll(`.${ce}`).forEach(r=>{let i=C(`.${X.BASE_CLASS}`,X,r);new me(r).init(i)})};var ee="o-summary";function he(e){let t=q(e,ee),a=t.classList.contains(`${ee}--mobile`),r=t.querySelector(`.${ee}__content`),i=t.querySelector(`.${ee}__btn`),o,s,d;function c(){return M(t)?(window.addEventListener("load",p),this):this}function p(){window.removeEventListener("load",p),d=!y(),L(t,"behavior_flyout-menu"),L(r,"behavior_flyout-menu_content"),L(i,"behavior_flyout-menu_trigger"),s=new K(t,!1),o=new B(r),o.init(d?B.CLASSES.MH_SUMMARY:B.CLASSES.MH_DEFAULT),s.setTransition(o,o.maxHeightSummary,o.maxHeightDefault),s.addEventListener("triggerclick",j),s.init(),_(),window.addEventListener("resize",_),"onorientationchange"in window&&window.addEventListener("orientationchange",_),t.addEventListener("focusin",m),r.addEventListener("click",f)}function m(b){!d&&b.target!==i&&(i.click(),t.removeEventListener("focusin",m))}function f(b){b.target.tagName!=="A"&&s.isExpanded()&&o.refresh()}function _(){y()?R():V()}function y(){return a&&!Se(de)||r.scrollHeight<=88}function j(){s.addEventListener("expandend",S)}function S(){T(),window.removeEventListener("resize",_),window.removeEventListener("orientationchange",_),s.removeEventListener("expandend",S),s.suspend(),o.remove()}function E(){i.classList.remove("u-hidden")}function T(){i.classList.add("u-hidden")}function V(){return d&&(s.collapse(),o.animateOn(),E(),d=!1),!d}function R(){return d||(o.animateOff(),s.expand(),T(),d=!0),d}let O=new A;return this.addEventListener=O.addEventListener,this.removeEventListener=O.removeEventListener,this.dispatchEvent=O.dispatchEvent,this.init=c,this}he.BASE_CLASS=ee;he.init=e=>C(`.${ee}`,he,e);var te="o-summary-minimal";function pe(e){let t=q(e,te),a=t.querySelector(`.${te}__content`),r=t.querySelector(`.${te}__btn`),i,o;function s(){return M(t)?(L(t,"behavior_flyout-menu"),L(a,"behavior_flyout-menu_content"),L(r,"behavior_flyout-menu_trigger"),window.addEventListener("load",d),this):this}function d(){window.removeEventListener("load",d),o=new K(t,!1),i=new B(a),i.init(B.CLASSES.MH_SUMMARY),o.setTransition(i,i.maxHeightSummary,i.maxHeightDefault),o.init(),t.addEventListener("focusin",c),a.addEventListener("click",p),o.collapse(),i.animateOn()}function c(f){f.target!==r&&(r.click(),t.removeEventListener("focusin",c))}function p(f){f.target.tagName!=="A"&&o.isExpanded()&&i.refresh()}let m=new A;return this.addEventListener=m.addEventListener,this.removeEventListener=m.removeEventListener,this.dispatchEvent=m.dispatchEvent,this.init=s,this}pe.BASE_CLASS=te;pe.init=e=>C(`.${te}`,pe,e);var Oe={};g(Oe,{default:()=>Wt});var Wt={};var Ie={};g(Ie,{default:()=>Qt});var Qt={};var Be={};g(Be,{default:()=>ta});var ta={};var Me={};g(Me,{default:()=>oa});var oa={};var Ne={};g(Ne,{default:()=>ra});var ra={};var qe={};g(qe,{default:()=>sa});var sa={};var Ce={};g(Ce,{default:()=>da});var da={};var Fe={};g(Fe,{default:()=>ma});var ma={};var He={};g(He,{default:()=>pa});var pa={};var ua;function ba(e){return e.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}function ga(e,t){return RegExp(ba(t.trim()),"i").test(e)}function fa(e,t,a){let r=e,i=t,o=(a==null?void 0:a.maxSelections)||5,s=[],d=[],c=[],p=[],m=-1;function f(b){return i+"-"+b.value.trim().replace(/\s+/g,"-").toLowerCase()}function _(){return d.length>=o}function y(b){let w,D=[],x=!1;for(let z=0,N=b.length;z<N;z++)w=b[z],x=_()?!1:w.defaultSelected,D.push({id:f(w),value:w.value,text:w.text,checked:x}),x&&d.push(z);return D}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,D,x){return ga(w.text,x)&&b.push(D),b}function T(b){return Object.prototype.toString.call(b)!=="[object String]"&&(b=""),p=c,s.length>0&&(c=s.reduce(function(w,D,x){return E(w,D,x,b)},[])),m=-1,c}function V(b){return s[b]}function R(b){let w=c.length,D=w===0?s.length:w;b<0?m=-1:b>=D?m=D-1:m=b}function O(){return m}return this.init=j,this.toggleOption=S,this.getSelectedIndices=function(){return d},this.isAtMaxSelections=_,this.filterIndices=T,this.clearFilter=function(){return c=p=[],ua},this.getFilterIndices=function(){return c},this.getLastFilterIndices=function(){return p},this.getIndex=O,this.setIndex=R,this.resetIndex=function(){return m=-1,m},this.getOption=V,this}var bt=fa;function F(e,t,a){let r=document.createElement(e);return Object.keys(a).forEach(i=>{let o=a[i];i in r?r[i]=o:r.setAttribute(i,o)}),t&&t.appendChild(r),r}var gt='<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 wa=gt,H="o-multiselect",ka="a-checkbox",Sa="a-text-input",ft="prev",ue="next",Ve="Enter",Ea=" ",_t="Escape",Da="ArrowUp",xt="ArrowDown",yt="Tab",vt={renderTags:!0,maxSelections:5};function be(e){e.classList.add(H);let t=q(e,H),a=!1,r,i,o,s,d,c,p,m,f,_,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 V(){y.classList.add("u-no-results"),y.classList.remove("u-filtered")}function R(n){return n.length>0?(E(),!0):(V(),!1)}function O(n){T(),o.resetIndex();let l=o.filterIndices(n);R(l)}function b(){return c.classList.add("u-active"),_.classList.remove("u-invisible"),_.setAttribute("aria-hidden",!1),S.dispatchEvent("expandbegin",{target:S}),S}function w(){return c.classList.remove("u-active"),_.classList.add("u-invisible"),_.setAttribute("aria-hidden",!0),o.resetIndex(),S.dispatchEvent("collapsebegin",{target:S}),S}function D(n){n===ue?o.setIndex(o.getIndex()+1):n===ft&&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 P=o.getOption(h).value,Lt=y.querySelector('[data-option="'+P+'"]').querySelector("input");a=!0,Lt.focus()}else a=!1,f.focus()}function x(){f.value="",T()}function z(n){let l=n.target;l.tagName==="BUTTON"&&(n.preventDefault(),l.removeEventListener("click",z),l.querySelector("label").click())}function N(n){if(n.key===Ea||n.key===Ve){let l=n.target.querySelector("label");y.querySelector("#"+l.getAttribute("for")).click()}}function U(n){return r+"-"+n.value.trim().replace(/[^\w]/g,"-").toLowerCase()}function W(n,l){let h=U(l),u=F("li",null,{"data-option":l.value}),k=F("button",u,{type:"button",class:"a-tag-filter",innerHTML:"<label for="+h+">"+l.text+wa+"</label>"});n.appendChild(u),k.addEventListener("click",z),k.addEventListener("keydown",N)}function re(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(),a=!1,_.getAttribute("aria-hidden")==="false"&&f.focus()}function _e(n){re(Number(n.target.getAttribute("data-index"))),x()}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&&_.offsetHeight===140&&f.blur()}),f.addEventListener("input",function(){O(this.value)}),f.addEventListener("focus",function(){_.getAttribute("aria-hidden")==="true"&&b()}),f.addEventListener("blur",function(){!a&&_.getAttribute("aria-hidden")==="false"&&w()}),f.addEventListener("keydown",function(h){let u=h.key;_.getAttribute("aria-hidden")==="true"&&u!==yt&&b(),u===Ve?(h.preventDefault(),D(ue)):u===_t?(x(),w()):u===xt?D(ue):u===yt&&!h.shiftKey&&_.getAttribute("aria-hidden")==="false"&&w()}),y.addEventListener("mousedown",function(){a=!0}),y.addEventListener("keydown",function(h){let u=h.key,k=h.target,P=k.checked;if(u===Ve){h.preventDefault(),k.checked=!P;let G=new Event("change",{bubbles:!1,cancelable:!0});k.dispatchEvent(G)}else u===_t?(f.focus(),w()):u===Da?D(ft):u===xt&&D(ue)}),_.addEventListener("mousedown",function(h){h.target.tagName==="LABEL"&&(a=!0)});let n=y.querySelectorAll("input");for(let h=0,u=n.length;h<u;h++)n[h].addEventListener("change",_e);let l=p.querySelectorAll("button");for(let h=0,u=l.length;h<u;h++)l[h].addEventListener("click",z),l[h].addEventListener("keydown",N)}function ne(){c=document.createElement("div"),c.className=H,p=F("ul",null,{className:"m-tag-group"}),m=F("header",c,{className:H+"__header"}),f=F("input",m,{className:H+"__search "+Sa,type:"text",placeholder:i||"Select up to five",id:t.id,autocomplete:"off"}),_=F("fieldset",c,{className:H+"__fieldset u-invisible","aria-hidden":"true"});let n=H+"__options";o.isAtMaxSelections()&&(n+=" u-max-selections"),y=F("ul",_,{className:n});let l,h,u;for(let k=0,P=s.length;k<P;k++){l=s[k],h=U(l),u=o.getOption(k).checked;let G=F("li",y,{"data-option":l.value,"data-cy":"multiselect-option",class:"m-form-field m-form-field--checkbox"});F("input",G,{id:h,type:"checkbox",value:l.value,name:r,class:ka+" "+H+"__checkbox",checked:u,"data-index":k}),F("label",G,{for:h,textContent:l.text,className:H+"__label a-label"}),j.push(G),u&&(d!=null&&d.renderTags)&&W(p,l)}return c.insertBefore(p,m),t.parentNode.insertBefore(c,t),c.appendChild(t),c}function ye(n=vt){if(!M(t))return this;if(Ge())return this;if(S=this,r=t.name||t.id,i=t.getAttribute("placeholder"),s=t.options||[],d=we(we({},vt),n),s.length>0){o=new bt(s,r,d).init();let l=ne();t.parentNode.removeChild(t),t=l,M(t),xe()}return this}function ve(){return o}this.init=ye,this.expand=b,this.collapse=w;let Y=new A;return this.addEventListener=Y.addEventListener,this.removeEventListener=Y.removeEventListener,this.dispatchEvent=Y.dispatchEvent,this.getModel=ve,this.updateSelections=re,this.selectionClickHandler=z,this.selectionKeyDownHandler=N,this}be.BASE_CLASS=H;be.init=e=>C(`.${H}`,be,void 0,e);var Re={};g(Re,{default:()=>La});var La={};var Ue={};g(Ue,{default:()=>Ta});var Ta={};var Pe={};g(Pe,{default:()=>Oa});var Oa={};var Xe={};g(Xe,{default:()=>Ba});var Ba={};var Ke={};g(Ke,{default:()=>Na});var Na={};var Je={};g(Je,{default:()=>Ca});var Ca={};var Ye={};g(Ye,{default:()=>Ha});var Ha={};var $e={};g($e,{default:()=>Ga});var Ga={};var We={};g(We,{default:()=>Ua});var Ua={};var Ze={};g(Ze,{default:()=>Xa});var Xa={};var Qe={};g(Qe,{default:()=>Ja});var Ja={};var et={};g(et,{default:()=>$a});var $a={};var tt={};g(tt,{default:()=>Za});var Za={};var at={};g(at,{default:()=>eo});var eo={};var ot={};g(ot,{default:()=>ao});var ao={};var it={};g(it,{default:()=>io});var io={};var rt={};g(rt,{default:()=>no});var no={};var nt={};g(nt,{default:()=>lo});var lo={};var st={};g(st,{default:()=>mo});var mo={};var lt={};g(lt,{default:()=>po});var po={};function wt(e,t){t=t||document;let a=[];try{a=t.querySelectorAll(e)}catch(r){let i=`${e} not found in DOM! ${r}`;throw new Error(i)}return a.length===0&&e.indexOf(Z)===-1&&(a=kt(e,t)),a}function uo(e,t,a,r){let i=[];e instanceof NodeList?i=e:e instanceof Node?i=[e]:typeof e=="string"&&(i=wt(e,r));for(let o=0,s=i.length;o<s;o++)i[o].addEventListener(t,a,!1);return i}function ge(e,t){let a;if($(e,t))return a=e,a;if(e){let r="["+I+"="+t+"]";a=e.querySelector(r)}if(!a){let r=t+" behavior not found on passed DOM node!";throw new Error(r)}return a}function kt(e,t){return e=I+"*="+Z+e,e="["+e+"]",wt(e,t)}var ae=Object.prototype.toString;function St(e){return typeof e=="undefined"}function bo(e){return typeof e!="undefined"}function go(e){return e!==null&&typeof e=="object"}function Et(e){return ae.call(e)==="[object String]"}function fo(e){return ae.call(e)==="[object Number]"}function _o(e){return ae.call(e)==="[object Date]"}var xo=Array.isArray||function(t){return ae.call(t)==="[object Array]"};function yo(e){return ae.call(e)==="[object Function]"}function vo(e){return St(e)||e===null||Et(e)&&e.length<=0||/^\s*$/.test(e)}function Ge(){return!!new RegExp(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i).test(navigator.userAgent)}var oe=Z+"flyout-menu",wo="["+I+"="+oe;function K(e,t=!0){let a=ge(e,oe),r=V(e),i=ge(e,oe+"_content"),o=0,s=0,d=1,c=2,p=3,m,f,_,y=W.bind(this),j=U.bind(this),S,E=!0,T=!1;function V(n){let l=[],h=n.querySelectorAll(`${wo}_trigger]`),u,k,P;for(let G=h.length>>>0;G--;){for(P=!1,u=h[G],k=u.parentElement;k!==n;)k.getAttribute(I)&&k.getAttribute(I).split(" ").indexOf(oe)!==-1?(P=!0,k=n):k=k.parentElement;P||l.unshift(h[G])}return l}function R(n=!1){return o=n?p:s,r.forEach(l=>{O("expanded",l,n),l.addEventListener("click",x.bind(this)),l.addEventListener("touchstart",b,{passive:!0}),l.addEventListener("mouseover",w.bind(this)),l.addEventListener("mouseout",D.bind(this))}),i.setAttribute("data-open",n?"true":"false"),t&&!n&&i.setAttribute("hidden",""),ne(),this}function O(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 D(n){E||this.dispatchEvent("triggerout",{target:this,trigger:n.target,type:"triggerout"})}function x(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 z(){if(m==null||m.halt(),o===c||o===p)return this;if(o=c,t&&i.removeAttribute("hidden"),this.dispatchEvent("expandbegin",{target:this,type:"expandbegin"}),!f||!_)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++)O("expanded",r[l],!1);if(i.setAttribute("data-open","false"),o=d,this.dispatchEvent("collapsebegin",{target:this,type:"collapsebegin"}),!_||!f)return y(),this;let n=m==null?void 0:m.isAnimated();return n&&m.addEventListener(v.END_EVENT,y),_(),n||y(),this}function U(){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++)O("expanded",r[n],!0)}function W(){o=s,t&&i.setAttribute("hidden",""),m&&m.removeEventListener(v.END_EVENT,y),this.dispatchEvent("collapseend",{target:this,type:"collapseend"})}function re(n,l,h){m=n,l&&l!==_&&(_=l),h&&h!==f&&(f=h)}function _e(){m&&m.remove();let n;m=n,f=n,_=n}function xe(){return{container:a,content:i,trigger:r}}function ne(){return E&&(E=!1),!E}function ye(){return E||(E=!0),E}function ve(n){return S=n,this}let Y=new A;return this.addEventListener=Y.addEventListener,this.removeEventListener=Y.removeEventListener,this.dispatchEvent=Y.dispatchEvent,this.init=R,this.expand=z,this.collapse=N,this.setTransition=re,this.clearTransition=_e,this.getData=()=>S,this.getTransition=()=>m,this.getDom=xe,this.isAnimating=()=>o===c||o===d,this.isExpanded=()=>o===p,this.resume=ne,this.setData=ve,this.suspend=ye,K.BASE_CLASS=oe,this}var fe={CSS_PROPERTY:"opacity",BASE_CLASS:"u-alpha-transition",ALPHA_100:"u-alpha-100",ALPHA_0:"u-alpha-0"};function Dt(e){let t=new A,a=new v(e,fe,this);function r(s){return a.init(s),this}function i(){return a.applyClass(fe.ALPHA_100),this}function o(){return a.applyClass(fe.ALPHA_0),this}return this.addEventListener=t.addEventListener,this.dispatchEvent=t.dispatchEvent,this.removeEventListener=t.removeEventListener,this.animateOff=a.animateOff,this.animateOn=a.animateOn,this.halt=a.halt,this.isAnimated=a.isAnimated,this.remove=a.remove,this.setElement=a.setElement,this.fadeIn=i,this.fadeOut=o,this.init=r,this}Dt.CLASSES=fe;function v(e,t,a){let r=t,i=e;if(!a)throw new Error("Child transition argument must be defined!");let o=a,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 _(){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(x){return x&&x.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 x;for(x in r)({}).hasOwnProperty.call(r,x)&&r[x]!==r.BASE_CLASS&&i.classList.contains(r[x])&&i.classList.remove(r[x])}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 V(){i.classList.remove(v.NO_ANIMATION_CLASS),p=!0}function R(){i.classList.add(v.NO_ANIMATION_CLASS),p=!1}function O(x){if(!x){let W="Element does not have TransitionEnd event. It may be null!";throw new Error(W)}let z,N={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},U;for(U in N)if({}.hasOwnProperty.call(N,U)&&typeof x.style[U]!="undefined"){z=N[U];break}return z}function b(x){T(),V(),i=x,i.classList.add(r.BASE_CLASS),d=O(i)}function w(x){if(p=!i.classList.contains(v.NO_ANIMATION_CLASS),c=j.bind(this),b(i),!x)throw new Error("Transition needs to be passed an initial CSS class on initialization!");return i.classList.add(x),this}function D(x){return f||(S(),f=!0),i.classList.contains(x)?!1:(y(),i.classList.remove(s),s=x,_(),i.classList.add(s),!0)}return this.animateOff=R,this.animateOn=V,this.applyClass=D,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 ie={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 B(e){let t=new A,a=new v(e,ie,this),r=0;function i(){let _=e.scrollHeight+"px";e.style.maxHeight=_}function o(){window.removeEventListener("load",o),i()}function s(f){return a.init(f),window.addEventListener("load",o),window.addEventListener("resize",()=>{i()}),this}function d(){return i(),a.applyClass(ie.MH_DEFAULT),(!r||e.scrollHeight>r)&&(r=e.scrollHeight),this}function c(){return a.applyClass(ie.MH_SUMMARY),r=e.scrollHeight,this}function p(){return a.applyClass(ie.MH_ZERO),r=e.scrollHeight,this}function m(){return e.style.maxHeight="",a.remove()}return this.addEventListener=t.addEventListener,this.dispatchEvent=t.dispatchEvent,this.removeEventListener=t.removeEventListener,this.animateOff=a.animateOff,this.animateOn=a.animateOn,this.halt=a.halt,this.isAnimated=a.isAnimated,this.setElement=a.setElement,this.refresh=i,this.remove=m,this.init=s,this.maxHeightDefault=d,this.maxHeightSummary=c,this.maxHeightZero=p,this}B.CLASSES=ie;var J={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 At(e){let t=new A,a=new v(e,J,this);function r(c){return a.init(c),this}function i(){return a.applyClass(J.MOVE_TO_ORIGIN),this}function o(c){c=c||1;let p=[J.MOVE_LEFT,J.MOVE_LEFT_2X,J.MOVE_LEFT_3X];return a.applyClass(p[c-1]),this}function s(){return a.applyClass(J.MOVE_RIGHT),this}function d(){return a.applyClass(J.MOVE_UP),this}return this.addEventListener=t.addEventListener,this.dispatchEvent=t.dispatchEvent,this.removeEventListener=t.removeEventListener,this.animateOff=a.animateOff,this.animateOn=a.animateOn,this.halt=a.halt,this.isAnimated=a.isAnimated,this.setElement=a.setElement,this.remove=a.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}At.CLASSES=J;})();
|
|
1
|
+
(()=>{var mt=Object.defineProperty;var dt=Object.getOwnPropertySymbols;var jt=Object.prototype.hasOwnProperty,Tt=Object.prototype.propertyIsEnumerable;var ct=(e,t,a)=>t in e?mt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,we=(e,t)=>{for(var a in t||(t={}))jt.call(t,a)&&ct(e,a,t[a]);if(dt)for(var a of dt(t))Tt.call(t,a)&&ct(e,a,t[a]);return e};var g=(e,t)=>{for(var a in t)mt(e,a,{get:t[a],enumerable:!0})};var ke={};g(ke,{default:()=>Ot});var Ot={};var le={bpXS:{min:0,max:600},bpSM:{min:601,max:900},bpMED:{min:901,max:1020},bpLG:{min:1021,max:1200},bpXL:{min:1201}};function se(){let e=getComputedStyle(document.body).fontSize;return e=e===""?-1:e,parseFloat(e)}function It(e,t){let a=e.min,r=e.max;se()>0&&se()!==16&&(a=a/16*se(),r=r/16*se());let o=a||0,l=r||Number.POSITIVE_INFINITY;return o<=t&&t<=l}function Bt(e){let t={};e=e||window.innerWidth;let a;for(a in le)t[a]=It(le[a],e);return t}var de="mobile",Mt="tablet",Nt="desktop";function Se(e){let t=!1,a=Bt();return(e===de&&a.bpXS||e===Mt&&a.bpSM||e===Nt&&(a.bpMED||a.bpLG||a.bpXL))&&(t=!0),t}var I="data-js-hook",Z="behavior_",Ee="state_";function D(){let e={};function t(i,o){return{}.hasOwnProperty.call(e,i)?e[i].push(o):e[i]=[o],this}function a(i,o){if(!{}.hasOwnProperty.call(e,i))return this;let l=e[i].indexOf(o);return l!==-1&&e[i].splice(l,1),this}function r(i,o){if(!{}.hasOwnProperty.call(e,i))return this;o=o||{};let l=e[i];for(let d=0,c=l.length;d<c;d++)l[d].call(this,o);return this}return this.addEventListener=t,this.removeEventListener=a,this.dispatchEvent=r,this.getRegisteredEvents=()=>e,this}function Y(e,t){if(!e)return!1;let a=e.getAttribute(I);return a?(a=a.split(" "),a.indexOf(t)>-1):!1}function A(e,t){if(Y(e,t))return t;if(t.indexOf(" ")!==-1){let r=I+" values cannot contain spaces!";throw new Error(r)}let a=e.getAttribute(I);return a!==null&&(t=a+" "+t),e.setAttribute(I,t),t}var Le=Ee+"atomic_init";function qt(e,t){if(!e||!e.classList){let a=e+' is not valid. Check that element is a DOM node with class "'+t+'"';throw new Error(a)}return e}function Ct(e,t){let a=e.classList.contains(t)?e:e.querySelector("."+t);if(!a){let r=t+" not found on or in passed DOM node.";throw new Error(r)}return a}function q(e,t){return qt(e,t),Ct(e,t)}function M(e){return Y(e,Le)?!1:(A(e,Le),!0)}function C(e,t,a,r={}){let o=(a||document).querySelectorAll(e),l=[],d,c;for(let p=0,m=o.length;p<m;p++)c=o[p],Y(c,Le)===!1&&(d=new t(c),d.init(r),l.push(d));return l}var De={};g(De,{default:()=>Ft});var Ft={};var Ae={};g(Ae,{default:()=>Vt});var Vt={};var je={};g(je,{default:()=>Rt});var Rt={};var Te={};g(Te,{default:()=>Pt});var Pt={};var ze={};g(ze,{default:()=>Kt});var Kt={};var Q="o-expandable";function P(e){let t=q(e,Q),a,r,i,o,l;function d(){if(!M(t))return this;a=t.querySelector(`.${Q}__header`),r=t.querySelector(`.${Q}__content`),i=t.querySelector(`.${Q}__label`);let m=t.classList.contains(`${Q}--onload-open`);A(t,"behavior_flyout-menu"),A(a,"behavior_flyout-menu_trigger"),A(r,"behavior_flyout-menu_content");let f=m?B.CLASSES.MH_DEFAULT:B.CLASSES.MH_ZERO;return o=new B(r).init(f),l=new X(t),l.setTransition(o,o.maxHeightZero,o.maxHeightDefault),l.init(m),l.addEventListener("expandbegin",()=>{r.classList.remove("u-hidden"),this.dispatchEvent("expandbegin",{target:this})}),l.addEventListener("collapseend",()=>{r.classList.add("u-hidden")}),this}function c(){return i.textContent.trim()}this.init=d,this.expand=()=>l.expand(),this.collapse=()=>l.collapse(),this.isExpanded=()=>l.isExpanded(),this.refresh=()=>l.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=Q;P.init=e=>C(`.${P.BASE_CLASS}`,P,e);var ce="o-expandable-group";function me(e){let t=q(e,ce),a=t.classList.contains(`${ce}--accordion`),r,i;function o(d){let c=d.target;i&&i!==c&&i.collapse(),i=c}function l(d){return M(t)?(a&&(r=d,r.forEach(c=>{c.addEventListener("expandbegin",o)})),this):this}return this.init=l,this}me.BASE_CLASS=ce;me.init=e=>{(e||document).querySelectorAll(`.${ce}`).forEach(r=>{let i=C(`.${P.BASE_CLASS}`,P,r);new me(r).init(i)})};var ee="o-summary";function he(e){let t=q(e,ee),a=t.classList.contains(`${ee}--mobile`),r=t.querySelector(`.${ee}__content`),i=t.querySelector(`.${ee}__btn`),o,l,d;function c(){return M(t)?(window.addEventListener("load",p),this):this}function p(){window.removeEventListener("load",p),d=!_(),A(t,"behavior_flyout-menu"),A(r,"behavior_flyout-menu_content"),A(i,"behavior_flyout-menu_trigger"),l=new X(t,!1),o=new B(r),o.init(d?B.CLASSES.MH_SUMMARY:B.CLASSES.MH_DEFAULT),l.setTransition(o,o.maxHeightSummary,o.maxHeightDefault),l.addEventListener("triggerclick",j),l.init(),x(),window.addEventListener("resize",x),"onorientationchange"in window&&window.addEventListener("orientationchange",x),t.addEventListener("focusin",m),r.addEventListener("click",f)}function m(b){!d&&b.target!==i&&(i.click(),t.removeEventListener("focusin",m))}function f(b){b.target.tagName!=="A"&&l.isExpanded()&&o.refresh()}function x(){_()?G():H()}function _(){return a&&!Se(de)||r.scrollHeight<=88}function j(){l.addEventListener("expandend",S)}function S(){T(),window.removeEventListener("resize",x),window.removeEventListener("orientationchange",x),l.removeEventListener("expandend",S),l.suspend(),o.remove()}function E(){i.classList.remove("u-hidden")}function T(){i.classList.add("u-hidden")}function H(){return d&&(l.collapse(),o.animateOn(),E(),d=!1),!d}function G(){return d||(o.animateOff(),l.expand(),T(),d=!0),d}let O=new D;return this.addEventListener=O.addEventListener,this.removeEventListener=O.removeEventListener,this.dispatchEvent=O.dispatchEvent,this.init=c,this}he.BASE_CLASS=ee;he.init=e=>C(`.${ee}`,he,e);var te="o-summary-minimal";function pe(e){let t=q(e,te),a=t.querySelector(`.${te}__content`),r=t.querySelector(`.${te}__btn`),i,o;function l(){return M(t)?(A(t,"behavior_flyout-menu"),A(a,"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(t,!1),i=new B(a),i.init(B.CLASSES.MH_SUMMARY),o.setTransition(i,i.maxHeightSummary,i.maxHeightDefault),o.init(),t.addEventListener("focusin",c),a.addEventListener("click",p),o.collapse(),i.animateOn()}function c(f){f.target!==r&&(r.click(),t.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=l,this}pe.BASE_CLASS=te;pe.init=e=>C(`.${te}`,pe,e);var Oe={};g(Oe,{default:()=>Wt});var Wt={};var Ie={};g(Ie,{default:()=>Qt});var Qt={};var Be={};g(Be,{default:()=>ta});var ta={};var Me={};g(Me,{default:()=>oa});var oa={};var Ne={};g(Ne,{default:()=>ra});var ra={};var qe={};g(qe,{default:()=>la});var la={};var Ce={};g(Ce,{default:()=>da});var da={};var $e={};g($e,{default:()=>ma});var ma={};var Fe={};g(Fe,{default:()=>pa});var pa={};var ua;function ba(e){return e.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}function ga(e,t){return RegExp(ba(t.trim()),"i").test(e)}function fa(e,t,a){let r=e,i=t,o=(a==null?void 0:a.maxSelections)||5,l=[],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 z=0,N=b.length;z<N;z++)w=b[z],y=x()?!1:w.defaultSelected,L.push({id:f(w),value:w.value,text:w.text,checked:y}),y&&d.push(z);return L}function j(){return l=_(r),this}function S(b){return l[b].checked=!l[b].checked,d.length<o&&l[b].checked?(d.push(b),d.sort(),!0):(l[b].checked=!1,d=d.filter(function(w){return w!==b}),!1)}function E(b,w,L,y){return ga(w.text,y)&&b.push(L),b}function T(b){return Object.prototype.toString.call(b)!=="[object String]"&&(b=""),p=c,l.length>0&&(c=l.reduce(function(w,L,y){return E(w,L,y,b)},[])),m=-1,c}function H(b){return l[b]}function G(b){let w=c.length,L=w===0?l.length:w;b<0?m=-1:b>=L?m=L-1:m=b}function O(){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=[],ua},this.getFilterIndices=function(){return c},this.getLastFilterIndices=function(){return p},this.getIndex=O,this.setIndex=G,this.resetIndex=function(){return m=-1,m},this.getOption=H,this}var bt=fa;function $(e,t,a){let r=document.createElement(e);return Object.keys(a).forEach(i=>{let o=a[i];i in r?r[i]=o:r.setAttribute(i,o)}),t&&t.appendChild(r),r}var gt='<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 wa=gt,F="o-multiselect",ka="a-checkbox",Sa="a-text-input",ft="prev",ue="next",He="Enter",Ea=" ",xt="Escape",La="ArrowUp",yt="ArrowDown",_t="Tab",vt={renderTags:!0,maxSelections:5};function be(e){e.classList.add(F);let t=q(e,F),a=!1,r,i,o,l,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 s=0,h=n.length;s<h;s++)j[n[s]].classList.remove("u-filter-match");n=o.getFilterIndices();for(let s=0,h=n.length;s<h;s++)j[n[s]].classList.add("u-filter-match")}function T(){_.classList.remove("u-filtered","u-no-results");for(let n=0,s=_.children.length;n<s;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 O(n){T(),o.resetIndex();let s=o.filterIndices(n);G(s)}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===ue?o.setIndex(o.getIndex()+1):n===ft&&o.setIndex(o.getIndex()-1);let s=o.getIndex();if(s>-1){let h=s,u=o.getFilterIndices();u.length>0&&(h=u[s]);let U=o.getOption(h).value,At=_.querySelector('[data-option="'+U+'"]').querySelector("input");a=!0,At.focus()}else a=!1,f.focus()}function y(){f.value="",T()}function z(n){let s=n.target;s.tagName==="BUTTON"&&(n.preventDefault(),s.removeEventListener("click",z),s.querySelector("label").click())}function N(n){if(n.key===Ea||n.key===He){let s=n.target.querySelector("label");_.querySelector("#"+s.getAttribute("for")).click()}}function R(n){return r+"-"+n.value.trim().replace(/[^\w]/g,"-").toLowerCase()}function W(n,s){let h=R(s),u=$("li",null,{"data-option":s.value}),k=$("button",u,{type:"button",class:"a-tag-filter",innerHTML:"<label for="+h+">"+s.text+wa+"</label>"});n.appendChild(u),k.addEventListener("click",z),k.addEventListener("keydown",N)}function re(n){let s=o.getOption(n)||o.getOption(o.getIndex());if(s){if(s.checked){_.classList.contains("u-max-selections")&&_.classList.remove("u-max-selections");let h='[data-option="'+s.value+'"]',u=p.querySelector(h);typeof u!="undefined"&&u&&(p==null||p.removeChild(u))}else d!=null&&d.renderTags&&p&&W(p,s);o.toggleOption(n),o.isAtMaxSelections()&&_.classList.add("u-max-selections"),S.dispatchEvent("selectionsupdated",{target:S})}o.resetIndex(),a=!1,x.getAttribute("aria-hidden")==="false"&&f.focus()}function xe(n){re(Number(n.target.getAttribute("data-index"))),y()}function ye(){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(){O(this.value)}),f.addEventListener("focus",function(){x.getAttribute("aria-hidden")==="true"&&b()}),f.addEventListener("blur",function(){!a&&x.getAttribute("aria-hidden")==="false"&&w()}),f.addEventListener("keydown",function(h){let u=h.key;x.getAttribute("aria-hidden")==="true"&&u!==_t&&b(),u===He?(h.preventDefault(),L(ue)):u===xt?(y(),w()):u===yt?L(ue):u===_t&&!h.shiftKey&&x.getAttribute("aria-hidden")==="false"&&w()}),_.addEventListener("mousedown",function(){a=!0}),_.addEventListener("keydown",function(h){let u=h.key,k=h.target,U=k.checked;if(u===He){h.preventDefault(),k.checked=!U;let V=new Event("change",{bubbles:!1,cancelable:!0});k.dispatchEvent(V)}else u===xt?(f.focus(),w()):u===La?L(ft):u===yt&&L(ue)}),x.addEventListener("mousedown",function(h){h.target.tagName==="LABEL"&&(a=!0)});let n=_.querySelectorAll("input");for(let h=0,u=n.length;h<u;h++)n[h].addEventListener("change",xe);let s=p.querySelectorAll("button");for(let h=0,u=s.length;h<u;h++)s[h].addEventListener("click",z),s[h].addEventListener("keydown",N)}function ne(){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 "+Sa,type:"text",placeholder:i||"Select up to five",id:t.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 s,h,u;for(let k=0,U=l.length;k<U;k++){s=l[k],h=R(s),u=o.getOption(k).checked;let V=$("li",_,{"data-option":s.value,"data-cy":"multiselect-option",class:"m-form-field m-form-field--checkbox"});$("input",V,{id:h,type:"checkbox",value:s.value,name:r,class:ka+" "+F+"__checkbox",checked:u,"data-index":k}),$("label",V,{for:h,textContent:s.text,className:F+"__label a-label"}),j.push(V),u&&(d!=null&&d.renderTags)&&W(p,s)}return c.insertBefore(p,m),t.parentNode.insertBefore(c,t),c.appendChild(t),c}function _e(n=vt){if(!M(t))return this;if(Ve())return this;if(S=this,r=t.name||t.id,i=t.getAttribute("placeholder"),l=t.options||[],d=we(we({},vt),n),l.length>0){o=new bt(l,r,d).init();let s=ne();t.parentNode.removeChild(t),t=s,M(t),ye()}return this}function ve(){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=ve,this.updateSelections=re,this.selectionClickHandler=z,this.selectionKeyDownHandler=N,this}be.BASE_CLASS=F;be.init=e=>C(`.${F}`,be,void 0,e);var Ge={};g(Ge,{default:()=>Aa});var Aa={};var Re={};g(Re,{default:()=>Ta});var Ta={};var Ue={};g(Ue,{default:()=>Oa});var Oa={};var Pe={};g(Pe,{default:()=>Ba});var Ba={};var Xe={};g(Xe,{default:()=>Na});var Na={};var Ke={};g(Ke,{default:()=>Ca});var Ca={};var Je={};g(Je,{default:()=>Fa});var Fa={};var Ye={};g(Ye,{default:()=>Va});var Va={};var We={};g(We,{default:()=>Ra});var Ra={};var Ze={};g(Ze,{default:()=>Pa});var Pa={};var Qe={};g(Qe,{default:()=>Ka});var Ka={};var et={};g(et,{default:()=>Ya});var Ya={};var tt={};g(tt,{default:()=>Za});var Za={};var at={};g(at,{default:()=>eo});var eo={};var ot={};g(ot,{default:()=>ao});var ao={};var it={};g(it,{default:()=>io});var io={};var rt={};g(rt,{default:()=>no});var no={};var nt={};g(nt,{default:()=>so});var so={};var lt={};g(lt,{default:()=>mo});var mo={};var st={};g(st,{default:()=>po});var po={};function wt(e,t){t=t||document;let a=[];try{a=t.querySelectorAll(e)}catch(r){let i=`${e} not found in DOM! ${r}`;throw new Error(i)}return a.length===0&&e.indexOf(Z)===-1&&(a=kt(e,t)),a}function uo(e,t,a,r){let i=[];e instanceof NodeList?i=e:e instanceof Node?i=[e]:typeof e=="string"&&(i=wt(e,r));for(let o=0,l=i.length;o<l;o++)i[o].addEventListener(t,a,!1);return i}function ge(e,t){let a;if(Y(e,t))return a=e,a;if(e){let r="["+I+"="+t+"]";a=e.querySelector(r)}if(!a){let r=t+" behavior not found on passed DOM node!";throw new Error(r)}return a}function kt(e,t){return e=I+"*="+Z+e,e="["+e+"]",wt(e,t)}var ae=Object.prototype.toString;function St(e){return typeof e=="undefined"}function bo(e){return typeof e!="undefined"}function go(e){return e!==null&&typeof e=="object"}function Et(e){return ae.call(e)==="[object String]"}function fo(e){return ae.call(e)==="[object Number]"}function xo(e){return ae.call(e)==="[object Date]"}var yo=Array.isArray||function(t){return ae.call(t)==="[object Array]"};function _o(e){return ae.call(e)==="[object Function]"}function vo(e){return St(e)||e===null||Et(e)&&e.length<=0||/^\s*$/.test(e)}function Ve(){return!!new RegExp(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i).test(navigator.userAgent)}var oe=Z+"flyout-menu",wo="["+I+"="+oe;function X(e,t=!0){let a=ge(e,oe),r=H(e),i=ge(e,oe+"_content"),o=0,l=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 s=[],h=n.querySelectorAll(`${wo}_trigger]`),u,k,U;for(let V=h.length>>>0;V--;){for(U=!1,u=h[V],k=u.parentElement;k!==n;)k.getAttribute(I)&&k.getAttribute(I).split(" ").indexOf(oe)!==-1?(U=!0,k=n):k=k.parentElement;U||s.unshift(h[V])}return s}function G(n=!1){return o=n?p:l,r.forEach(s=>{O("expanded",s,n),s.addEventListener("click",y.bind(this)),s.addEventListener("touchstart",b,{passive:!0}),s.addEventListener("mouseover",w.bind(this)),s.addEventListener("mouseout",L.bind(this))}),i.setAttribute("data-open",n?"true":"false"),t&&!n&&i.setAttribute("hidden",""),ne(),this}function O(n,s,h){let u=String(h);return s.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 l:case d:this.expand();break;case c:case p:this.collapse();break}}function z(){if(m==null||m.halt(),o===c||o===p)return this;if(o=c,t&&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===l)return this;for(let s=0,h=r.length;s<h;s++)O("expanded",r[s],!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,s=r.length;n<s;n++)O("expanded",r[n],!0)}function W(){o=l,t&&i.setAttribute("hidden",""),m&&m.removeEventListener(v.END_EVENT,_),this.dispatchEvent("collapseend",{target:this,type:"collapseend"})}function re(n,s,h){m=n,s&&s!==x&&(x=s),h&&h!==f&&(f=h)}function xe(){m&&m.remove();let n;m=n,f=n,x=n}function ye(){return{container:a,content:i,trigger:r}}function ne(){return E&&(E=!1),!E}function _e(){return E||(E=!0),E}function ve(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=z,this.collapse=N,this.setTransition=re,this.clearTransition=xe,this.getData=()=>S,this.getTransition=()=>m,this.getDom=ye,this.isAnimating=()=>o===c||o===d,this.isExpanded=()=>o===p,this.resume=ne,this.setData=ve,this.suspend=_e,X.BASE_CLASS=oe,this}var fe={CSS_PROPERTY:"opacity",BASE_CLASS:"u-alpha-transition",ALPHA_100:"u-alpha-100",ALPHA_0:"u-alpha-0"};function Lt(e){let t=new D,a=new v(e,fe,this);function r(l){return a.init(l),this}function i(){return a.applyClass(fe.ALPHA_100),this}function o(){return a.applyClass(fe.ALPHA_0),this}return this.addEventListener=t.addEventListener,this.dispatchEvent=t.dispatchEvent,this.removeEventListener=t.removeEventListener,this.animateOff=a.animateOff,this.animateOn=a.animateOn,this.halt=a.halt,this.isAnimated=a.isAnimated,this.remove=a.remove,this.setElement=a.setElement,this.fadeIn=i,this.fadeOut=o,this.init=r,this}Lt.CLASSES=fe;function v(e,t,a){let r=t,i=e;if(!a)throw new Error("Child transition argument must be defined!");let o=a,l,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 O(y){if(!y){let W="Element does not have TransitionEnd event. It may be null!";throw new Error(W)}let z,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"){z=N[R];break}return z}function b(y){T(),H(),i=y,i.classList.add(r.BASE_CLASS),d=O(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(l),l=y,x(),i.classList.add(l),!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 ie={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 B(e){let t=new D,a=new v(e,ie,this),r=0;function i(){let x=e.scrollHeight+"px";e.style.maxHeight=x}function o(){window.removeEventListener("load",o),i()}function l(f){return a.init(f),window.addEventListener("load",o),window.addEventListener("resize",()=>{i()}),this}function d(){return i(),a.applyClass(ie.MH_DEFAULT),(!r||e.scrollHeight>r)&&(r=e.scrollHeight),this}function c(){return a.applyClass(ie.MH_SUMMARY),r=e.scrollHeight,this}function p(){return a.applyClass(ie.MH_ZERO),r=e.scrollHeight,this}function m(){return e.style.maxHeight="",a.remove()}return this.addEventListener=t.addEventListener,this.dispatchEvent=t.dispatchEvent,this.removeEventListener=t.removeEventListener,this.animateOff=a.animateOff,this.animateOn=a.animateOn,this.halt=a.halt,this.isAnimated=a.isAnimated,this.setElement=a.setElement,this.refresh=i,this.remove=m,this.init=l,this.maxHeightDefault=d,this.maxHeightSummary=c,this.maxHeightZero=p,this}B.CLASSES=ie;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 Dt(e){let t=new D,a=new v(e,K,this);function r(c){return a.init(c),this}function i(){return a.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 a.applyClass(p[c-1]),this}function l(){return a.applyClass(K.MOVE_RIGHT),this}function d(){return a.applyClass(K.MOVE_UP),this}return this.addEventListener=t.addEventListener,this.dispatchEvent=t.dispatchEvent,this.removeEventListener=t.removeEventListener,this.animateOff=a.animateOff,this.animateOn=a.animateOn,this.halt=a.halt,this.isAnimated=a.isAnimated,this.setElement=a.setElement,this.remove=a.remove,this.init=r,this.moveLeft=()=>o(1),this.moveLeft2=()=>o(2),this.moveLeft3=()=>o(3),this.moveRight=l,this.moveToOrigin=i,this.moveUp=d,this}Dt.CLASSES=K;})();
|
|
2
2
|
//# sourceMappingURL=index.js.map
|