3 lines
62 KiB
JavaScript
3 lines
62 KiB
JavaScript
/*! DSFR v1.11.2 | SPDX-License-Identifier: MIT | License-Filename: LICENSE.md | restricted use (see terms and conditions) */
|
|
!function(){"use strict";var t="fr",e="dsfr",i=window[e],n=i.internals.ns.selector("accordion"),s=i.internals.ns.selector("collapse"),o={GROUP:i.internals.ns.selector("accordions-group"),ACCORDION:n,COLLAPSE:n+" > "+s+", "+n+" > *:not("+n+"):not("+s+") > "+s+", "+n+" > *:not("+n+"):not("+s+") > *:not("+n+"):not("+s+") > "+s,COLLAPSE_LEGACY:n+" "+s,BUTTON:n+"__btn"},r=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={collapsePrimary:{configurable:!0}},n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"Accordion"},i.collapsePrimary.get=function(){return this.element.children.map((function(t){return t.getInstance("CollapseButton")})).filter((function(t){return null!==t&&t.hasClass(o.BUTTON)}))[0]},Object.defineProperties(e.prototype,i),Object.defineProperties(e,n),e}(i.core.Instance),a=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"AccordionsGroup"},e.prototype.validate=function(e){var n=e.node.matches(i.internals.legacy.isLegacy?o.COLLAPSE_LEGACY:o.COLLAPSE);return t.prototype.validate.call(this,e)&&n},Object.defineProperties(e,n),e}(i.core.CollapsesGroup);i.accordion={Accordion:r,AccordionSelector:o,AccordionsGroup:a},i.internals.register(i.accordion.AccordionSelector.GROUP,i.accordion.AccordionsGroup),i.internals.register(i.accordion.AccordionSelector.ACCORDION,i.accordion.Accordion);var c={EQUISIZED_BUTTON:i.internals.ns.selector("btns-group--equisized")+" "+i.internals.ns.selector("btn"),EQUISIZED_GROUP:i.internals.ns.selector("btns-group--equisized")};i.button={ButtonSelector:c},i.internals.register(i.button.ButtonSelector.EQUISIZED_BUTTON,i.core.Equisized),i.internals.register(i.button.ButtonSelector.EQUISIZED_GROUP,i.core.EquisizedsGroup);var l=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"CardDownload"},e.prototype.init=function(){var t=this;this.addAscent(i.core.AssessEmission.UPDATE,(function(e){t.descend(i.core.AssessEmission.UPDATE,e)})),this.addAscent(i.core.AssessEmission.ADDED,(function(){t.descend(i.core.AssessEmission.ADDED)}))},Object.defineProperties(e,n),e}(i.core.Instance),p={DOWNLOAD:i.internals.ns.selector("card--download"),DOWNLOAD_DETAIL:i.internals.ns.selector("card--download")+" "+i.internals.ns.selector("card__end")+" "+i.internals.ns.selector("card__detail")};i.card={CardSelector:p,CardDownload:l},i.internals.register(i.card.CardSelector.DOWNLOAD,i.card.CardDownload),i.internals.register(i.card.CardSelector.DOWNLOAD_DETAIL,i.core.AssessDetail);var h={SEGMENTED:i.internals.ns.selector("segmented"),SEGMENTED_ELEMENTS:i.internals.ns.selector("segmented__elements"),SEGMENTED_ELEMENT:i.internals.ns.selector("segmented__element input"),SEGMENTED_LEGEND:i.internals.ns.selector("segmented__legend")},u={ADDED:i.internals.ns.emission("segmented","added"),REMOVED:i.internals.ns.emission("segmented","removed")},d=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"Segmented"},e.prototype.init=function(){this.elements=this.node.querySelector(h.SEGMENTED_ELEMENTS),this.legend=this.node.querySelector(h.SEGMENTED_LEGEND),this.addAscent(u.ADDED,this.resize.bind(this)),this.addAscent(u.REMOVED,this.resize.bind(this)),this._isLegendInline=this.legend&&this.legend.classList.contains(i.prefix+"-segmented__legend--inline"),this.isResizing=!0},e.prototype.resize=function(){var t=i.prefix+"-segmented--vertical",e=i.prefix+"-segmented__legend--inline";this.removeClass(t),this._isLegendInline&&(this.legend.classList.add(e),(this.node.offsetWidth>this.node.parentNode.offsetWidth||this.elements.scrollWidth+this.legend.offsetWidth+16>this.node.parentNode.offsetWidth)&&this.legend.classList.remove(e)),this.elements.offsetWidth>this.node.parentNode.offsetWidth||this.elements.scrollWidth>this.node.parentNode.offsetWidth?this.addClass(t):this.removeClass(t)},Object.defineProperties(e,n),e}(i.core.Instance),f=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"SegmentedElement"},e.prototype.init=function(){this.ascend(u.ADDED)},e.prototype.dispose=function(){this.ascend(u.REMOVED)},Object.defineProperties(e,i),e}(i.core.Instance);i.segmented={SegmentedSelector:h,SegmentedEmission:u,SegmentedElement:f,Segmented:d},i.internals.register(i.segmented.SegmentedSelector.SEGMENTED,i.segmented.Segmented),i.internals.register(i.segmented.SegmentedSelector.SEGMENTED_ELEMENT,i.segmented.SegmentedElement);var g={BREADCRUMB:i.internals.ns.selector("breadcrumb"),BUTTON:i.internals.ns.selector("breadcrumb__button")},_=function(t){function e(){t.call(this),this.count=0,this.focusing=this.focus.bind(this)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={proxy:{configurable:!0},links:{configurable:!0},collapse:{configurable:!0},collapsePrimary:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"Breadcrumb"},e.prototype.init=function(){this.getCollapse(),this.isResizing=!0},n.proxy.get=function(){var e=this;return Object.assign.call(this,t.prototype.proxy,{focus:e.focus.bind(e),disclose:e.collapse.disclose.bind(e.collapse)})},e.prototype.getCollapse=function(){var t=this.collapse;t?t.listen(i.core.DisclosureEvent.DISCLOSE,this.focusing):this.addAscent(i.core.DisclosureEmission.ADDED,this.getCollapse.bind(this))},e.prototype.resize=function(){var t=this.collapse,e=this.links;t&&e.length&&(this.isBreakpoint(i.core.Breakpoints.MD)?t.buttonHasFocus&&e[0].focus():e.indexOf(document.activeElement)>-1&&t.focus())},n.links.get=function(){return[].concat(this.querySelectorAll("a[href]"))},n.collapse.get=function(){return this.element.getDescendantInstances(i.core.Collapse.instanceClassName,null,!0)[0]},e.prototype.focus=function(){this.count=0,this._focus()},e.prototype._focus=function(){var t=this.links[0];t&&(t.focus(),this.request(this.verify.bind(this)))},e.prototype.verify=function(){if(this.count++,!(this.count>100)){var t=this.links[0];t&&document.activeElement!==t&&this._focus()}},n.collapsePrimary.get=function(){return this.element.children.map((function(t){return t.getInstance("CollapseButton")})).filter((function(t){return null!==t&&t.hasClass(g.BUTTON)}))[0]},Object.defineProperties(e.prototype,n),Object.defineProperties(e,s),e}(i.core.Instance);i.breadcrumb={BreadcrumbSelector:g,Breadcrumb:_},i.internals.register(i.breadcrumb.BreadcrumbSelector.BREADCRUMB,i.breadcrumb.Breadcrumb);var m={TOOLTIP:i.internals.ns.selector("tooltip"),SHOWN:i.internals.ns.selector("tooltip--shown"),BUTTON:i.internals.ns.selector("btn--tooltip")},y=1,b=2,E=function(t){function e(){t.call(this),this._state=0}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={state:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"TooltipReferent"},e.prototype.init=function(){if(t.prototype.init.call(this),this.listen("focusin",this.focusIn.bind(this)),this.listen("focusout",this.focusOut.bind(this)),!this.matches(m.BUTTON)){var e=this.mouseover.bind(this);this.listen("mouseover",e),this.placement.listen("mouseover",e);var n=this.mouseout.bind(this);this.listen("mouseout",n),this.placement.listen("mouseout",n)}this.addEmission(i.core.RootEmission.KEYDOWN,this._keydown.bind(this)),this.listen("click",this._click.bind(this)),this.addEmission(i.core.RootEmission.CLICK,this._clickOut.bind(this))},e.prototype._click=function(){this.focus()},e.prototype._clickOut=function(t){this.node.contains(t)||this.blur()},e.prototype._keydown=function(t){if(t===i.core.KeyCodes.ESCAPE)this.blur(),this.close()},e.prototype.close=function(){this.state=0},n.state.get=function(){return this._state},n.state.set=function(t){this._state!==t&&(this.isShown=t>0,this._state=t)},e.prototype.focusIn=function(){this.state|=y},e.prototype.focusOut=function(){this.state&=~y},e.prototype.mouseover=function(){this.state|=b},e.prototype.mouseout=function(){this.state&=~b},Object.defineProperties(e.prototype,n),Object.defineProperties(e,s),e}(i.core.PlacementReferent),v=function(e){return t+"-"+e};v.selector=function(t,e){return void 0===e&&(e="."),""+e+v(t)},(v.attr=function(t){return"data-"+v(t)}).selector=function(t,e){var i=v.attr(t);return void 0!==e&&(i+='="'+e+'"'),"["+i+"]"},v.event=function(t){return e+"."+t},v.emission=function(t,e){return"emission:"+t+"."+e};var S={SHOW:v.event("show"),HIDE:v.event("hide")},T="hidden",A="shown",O="hiding",N=function(t){function e(){t.call(this,i.core.PlacementMode.AUTO,[i.core.PlacementPosition.TOP,i.core.PlacementPosition.BOTTOM],[i.core.PlacementAlign.CENTER,i.core.PlacementAlign.START,i.core.PlacementAlign.END]),this.modifier="",this._state=T}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={isShown:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"Tooltip"},e.prototype.init=function(){t.prototype.init.call(this),this.register('[aria-describedby="'+this.id+'"]',E),this.listen("transitionend",this.transitionEnd.bind(this))},e.prototype.transitionEnd=function(){this._state===O&&(this._state=T,this.isShown=!1)},n.isShown.get=function(){return t.prototype.isShown},n.isShown.set=function(e){if(this.isEnabled)switch(!0){case e:this._state=A,this.addClass(m.SHOWN),this.dispatch(S.SHOW),t.prototype.isShown=!0;break;case this.isShown&&!e&&this._state===A:this._state=O,this.removeClass(m.SHOWN);break;case this.isShown&&!e&&this._state===T:this.dispatch(S.HIDE),t.prototype.isShown=!1}},e.prototype.render=function(){t.prototype.render.call(this);var e=this.referentRect.center-this.rect.center,i=.5*this.rect.width-8;e<-i&&(e=-i),e>i&&(e=i),this.setProperty("--arrow-x",e.toFixed(2)+"px")},Object.defineProperties(e.prototype,n),Object.defineProperties(e,s),e}(i.core.Placement);i.tooltip={Tooltip:N,TooltipSelector:m,TooltipEvent:S},i.internals.register(i.tooltip.TooltipSelector.TOOLTIP,i.tooltip.Tooltip);var C=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={isChecked:{configurable:!0}},n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"ToggleInput"},i.isChecked.get=function(){return this.node.checked},Object.defineProperties(e.prototype,i),Object.defineProperties(e,n),e}(i.core.Instance),P=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={proxy:{configurable:!0},input:{configurable:!0}},n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"ToggleStatusLabel"},e.prototype.init=function(){this.register('input[id="'+this.getAttribute("for")+'"]',C),this.update(),this.isSwappingFont=!0},i.proxy.get=function(){return Object.assign.call(this,t.prototype.proxy,{update:this.update.bind(this)})},i.input.get=function(){return this.getRegisteredInstances("ToggleInput")[0]},e.prototype.update=function(){this.node.style.removeProperty("--toggle-status-width");var t=this.input.isChecked,e=getComputedStyle(this.node,":before"),i=parseFloat(e.width);this.input.node.checked=!t;var n=getComputedStyle(this.node,":before"),s=parseFloat(n.width);s>i&&(i=s),this.input.node.checked=t,this.node.style.setProperty("--toggle-status-width",i/16+"rem")},e.prototype.swapFont=function(t){this.update()},Object.defineProperties(e.prototype,i),Object.defineProperties(e,n),e}(i.core.Instance),L={STATUS_LABEL:""+i.internals.ns.selector("toggle__label")+i.internals.ns.attr.selector("checked-label")+i.internals.ns.attr.selector("unchecked-label")};i.toggle={ToggleStatusLabel:P,ToggleSelector:L},i.internals.register(i.toggle.ToggleSelector.STATUS_LABEL,i.toggle.ToggleStatusLabel);var D=i.internals.ns.selector("sidemenu__item"),I=i.internals.ns.selector("collapse"),R={LIST:i.internals.ns.selector("sidemenu__list"),COLLAPSE:D+" > "+I+", "+D+" > *:not("+D+"):not("+I+") > "+I+", "+D+" > *:not("+D+"):not("+I+") > *:not("+D+"):not("+I+") > "+I,COLLAPSE_LEGACY:D+" "+I,ITEM:i.internals.ns.selector("sidemenu__item"),BUTTON:i.internals.ns.selector("sidemenu__btn")},w=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"SidemenuList"},e.prototype.validate=function(e){return t.prototype.validate.call(this,e)&&e.node.matches(i.internals.legacy.isLegacy?R.COLLAPSE_LEGACY:R.COLLAPSE)},Object.defineProperties(e,n),e}(i.core.CollapsesGroup),x=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={collapsePrimary:{configurable:!0}},n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"SidemenuItem"},i.collapsePrimary.get=function(){return this.element.children.map((function(t){return t.getInstance("CollapseButton")})).filter((function(t){return null!==t&&t.hasClass(R.BUTTON)}))[0]},Object.defineProperties(e.prototype,i),Object.defineProperties(e,n),e}(i.core.Instance);i.sidemenu={SidemenuList:w,SidemenuItem:x,SidemenuSelector:R},i.internals.register(i.sidemenu.SidemenuSelector.LIST,i.sidemenu.SidemenuList),i.internals.register(i.sidemenu.SidemenuSelector.ITEM,i.sidemenu.SidemenuItem);var k={MODAL:i.internals.ns.selector("modal"),SCROLL_DIVIDER:i.internals.ns.selector("scroll-divider"),BODY:i.internals.ns.selector("modal__body"),TITLE:i.internals.ns.selector("modal__title")},M=function(t){function e(){t.call(this,i.core.DisclosureType.OPENED)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"ModalButton"},Object.defineProperties(e,n),e}(i.core.DisclosureButton),j={CONCEALING_BACKDROP:i.internals.ns.attr("concealing-backdrop")},G=function(t){function e(){t.call(this,i.core.DisclosureType.OPENED,k.MODAL,M,"ModalsGroup"),this._isActive=!1,this.scrolling=this.resize.bind(this,!1),this.resizing=this.resize.bind(this,!0)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={body:{configurable:!0},isDialog:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"Modal"},e.prototype.init=function(){t.prototype.init.call(this),this._isDialog="DIALOG"===this.node.tagName,this.isScrolling=!1,this.listenClick(),this.addEmission(i.core.RootEmission.KEYDOWN,this._keydown.bind(this))},e.prototype._keydown=function(t){if(t===i.core.KeyCodes.ESCAPE)this._escape()},e.prototype._escape=function(){switch(document.activeElement?document.activeElement.tagName:void 0){case"INPUT":case"LABEL":case"TEXTAREA":case"SELECT":case"AUDIO":case"VIDEO":break;default:this.isDisclosed&&(this.conceal(),this.focus())}},e.prototype.retrieved=function(){this._ensureAccessibleName()},n.body.get=function(){return this.element.getDescendantInstances("ModalBody","Modal")[0]},e.prototype.handleClick=function(t){t.target===this.node&&"false"!==this.getAttribute(j.CONCEALING_BACKDROP)&&this.conceal()},e.prototype.disclose=function(e){return!!t.prototype.disclose.call(this,e)&&(this.body&&this.body.activate(),this.isScrollLocked=!0,this.setAttribute("aria-modal","true"),this.setAttribute("open","true"),this._isDialog||this.activateModal(),!0)},e.prototype.conceal=function(e,i){return!!t.prototype.conceal.call(this,e,i)&&(this.isScrollLocked=!1,this.removeAttribute("aria-modal"),this.removeAttribute("open"),this.body&&this.body.deactivate(),this._isDialog||this.deactivateModal(),!0)},n.isDialog.get=function(){return this._isDialog},n.isDialog.set=function(t){this._isDialog=t},e.prototype.activateModal=function(){this._isActive||(this._isActive=!0,this._hasDialogRole="dialog"===this.getAttribute("role"),this._hasDialogRole||this.setAttribute("role","dialog"))},e.prototype.deactivateModal=function(){this._isActive&&(this._isActive=!1,this._hasDialogRole||this.removeAttribute("role"))},e.prototype._setAccessibleName=function(t,e){var i=this.retrieveNodeId(t,e);this.warn("add reference to "+e+" for accessible name (aria-labelledby)"),this.setAttribute("aria-labelledby",i)},e.prototype._ensureAccessibleName=function(){if(!this.hasAttribute("aria-labelledby")&&!this.hasAttribute("aria-label")){this.warn("missing accessible name");var t=this.node.querySelector(k.TITLE),e=this.primaryButtons[0];switch(!0){case null!==t:this._setAccessibleName(t,"title");break;case void 0!==e:this.warn("missing required title, fallback to primary button"),this._setAccessibleName(e,"primary")}}},Object.defineProperties(e.prototype,n),Object.defineProperties(e,s),e}(i.core.Disclosure),H=['[tabindex="0"]',"a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details","iframe"].join(),U=['[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'].join(),B=function(t,e){if(!(t instanceof Element))return!1;var i=window.getComputedStyle(t);if(!i)return!1;if("hidden"===i.visibility)return!1;for(void 0===e&&(e=t);e.contains(t);){if("none"===i.display)return!1;t=t.parentElement}return!0},W=function(t,e){this.element=null,this.activeElement=null,this.onTrap=t,this.onUntrap=e,this.waiting=this.wait.bind(this),this.handling=this.handle.bind(this),this.focusing=this.maintainFocus.bind(this),this.current=null},F={trapped:{configurable:!0},focusables:{configurable:!0}};F.trapped.get=function(){return null!==this.element},W.prototype.trap=function(t){this.trapped&&this.untrap(),this.element=t,this.isTrapping=!0,this.wait(),this.onTrap&&this.onTrap()},W.prototype.wait=function(){B(this.element)?this.trapping():window.requestAnimationFrame(this.waiting)},W.prototype.trapping=function(){if(this.isTrapping){this.isTrapping=!1;var t=this.focusables;t.length&&-1===t.indexOf(document.activeElement)&&t[0].focus(),this.element.setAttribute("aria-modal",!0),window.addEventListener("keydown",this.handling),document.body.addEventListener("focus",this.focusing,!0)}},W.prototype.stun=function(t){for(var e=0,i=t.children;e<i.length;e+=1){var n=i[e];n!==this.element&&(n.contains(this.element)?this.stun(n):this.stunneds.push(new z(n)))}},W.prototype.maintainFocus=function(t){if(!this.element.contains(t.target)){var e=this.focusables;if(0===e.length)return;var i=e[0];t.preventDefault(),i.focus()}},W.prototype.handle=function(t){if(9===t.keyCode){var e=this.focusables;if(0!==e.length){var i=e[0],n=e[e.length-1],s=e.indexOf(document.activeElement);t.shiftKey?!this.element.contains(document.activeElement)||s<1?(t.preventDefault(),n.focus()):(document.activeElement.tabIndex>0||e[s-1].tabIndex>0)&&(t.preventDefault(),e[s-1].focus()):this.element.contains(document.activeElement)&&s!==e.length-1&&-1!==s?document.activeElement.tabIndex>0&&(t.preventDefault(),e[s+1].focus()):(t.preventDefault(),i.focus())}}},F.focusables.get=function(){var t=this,e=i.internals.dom.querySelectorAllArray(this.element,H),n=i.internals.dom.querySelectorAllArray(document.documentElement,'input[type="radio"]');if(n.length){for(var s={},o=0,r=n;o<r.length;o+=1){var a=r[o],c=a.getAttribute("name");void 0===s[c]&&(s[c]=new V(c)),s[c].push(a)}e=e.filter((function(t){if("input"!==t.tagName.toLowerCase()||"radio"!==t.getAttribute("type").toLowerCase())return!0;var e=t.getAttribute("name");return s[e].keep(t)}))}var l=i.internals.dom.querySelectorAllArray(this.element,U);l.sort((function(t,e){return t.tabIndex-e.tabIndex}));var p=e.filter((function(t){return-1===l.indexOf(t)}));return l.concat(p).filter((function(e){return"-1"!==e.tabIndex&&B(e,t.element)}))},W.prototype.untrap=function(){this.trapped&&(this.isTrapping=!1,this.element.removeAttribute("aria-modal"),window.removeEventListener("keydown",this.handling),document.body.removeEventListener("focus",this.focusing,!0),this.element=null,this.onUntrap&&this.onUntrap())},W.prototype.dispose=function(){this.untrap()},Object.defineProperties(W.prototype,F);var z=function(t){this.element=t,this.inert=t.getAttribute("inert"),this.element.setAttribute("inert","")};z.prototype.unstun=function(){null===this.inert?this.element.removeAttribute("inert"):this.element.setAttribute("inert",this.inert)};var V=function(t){this.name=t,this.buttons=[]};V.prototype.push=function(t){this.buttons.push(t),(t===document.activeElement||t.checked||void 0===this.selected)&&(this.selected=t)},V.prototype.keep=function(t){return this.selected===t};var q=function(t){function e(){t.call(this,"Modal",!1),this.focusTrap=new W}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"ModalsGroup"},e.prototype.apply=function(e,i){t.prototype.apply.call(this,e,i),null===this.current?this.focusTrap.untrap():this.focusTrap.trap(this.current.node)},Object.defineProperties(e,i),e}(i.core.DisclosuresGroup),K=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"ModalBody"},e.prototype.init=function(){this.listen("scroll",this.divide.bind(this))},e.prototype.activate=function(){this.isResizing=!0,this.resize()},e.prototype.deactivate=function(){this.isResizing=!1},e.prototype.divide=function(){this.node.scrollHeight>this.node.clientHeight?this.node.offsetHeight+this.node.scrollTop>=this.node.scrollHeight?this.removeClass(k.SCROLL_DIVIDER):this.addClass(k.SCROLL_DIVIDER):this.removeClass(k.SCROLL_DIVIDER)},e.prototype.resize=function(){this.adjust(),this.request(this.adjust.bind(this))},e.prototype.adjust=function(){var t=32*(this.isBreakpoint(i.core.Breakpoints.MD)?2:1);this.isLegacy?this.style.maxHeight=window.innerHeight-t+"px":this.style.setProperty("--modal-max-height",window.innerHeight-t+"px"),this.divide()},Object.defineProperties(e,n),e}(i.core.Instance);i.modal={Modal:G,ModalButton:M,ModalBody:K,ModalsGroup:q,ModalSelector:k},i.internals.register(i.modal.ModalSelector.MODAL,i.modal.Modal),i.internals.register(i.modal.ModalSelector.BODY,i.modal.ModalBody),i.internals.register(i.core.RootSelector.ROOT,i.modal.ModalsGroup);var X={TOGGLE:i.internals.ns.emission("password","toggle"),ADJUST:i.internals.ns.emission("password","adjust")},Y=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={width:{configurable:!0},isChecked:{configurable:!0}},n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"PasswordToggle"},e.prototype.init=function(){this.listenClick(),this.ascend(X.ADJUST,this.width),this.isSwappingFont=!0,this._isChecked=this.isChecked},i.width.get=function(){var t=getComputedStyle(this.node.parentNode);return parseInt(t.width)},i.isChecked.get=function(){return this.node.checked},i.isChecked.set=function(t){this._isChecked=t,this.ascend(X.TOGGLE,t)},e.prototype.handleClick=function(){this.isChecked=!this._isChecked},e.prototype.swapFont=function(t){this.ascend(X.ADJUST,this.width)},Object.defineProperties(e.prototype,i),Object.defineProperties(e,n),e}(i.core.Instance),J=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"Password"},e.prototype.init=function(){this.addAscent(X.TOGGLE,this.toggle.bind(this)),this.addAscent(X.ADJUST,this.adjust.bind(this))},e.prototype.toggle=function(t){this.descend(X.TOGGLE,t)},e.prototype.adjust=function(t){this.descend(X.ADJUST,t)},Object.defineProperties(e,i),e}(i.core.Instance),Q={PASSWORD:i.internals.ns.selector("password"),INPUT:i.internals.ns.selector("password__input"),LABEL:i.internals.ns.selector("password__label"),TOOGLE:i.internals.ns.selector("password__checkbox")+' input[type="checkbox"]'},Z=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={isRevealed:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"PasswordInput"},e.prototype.init=function(){this.addDescent(X.TOGGLE,this.toggle.bind(this)),this._isRevealed="password"===this.hasAttribute("type"),this.listen("keydown",this.capslock.bind(this)),this.listen("keyup",this.capslock.bind(this))},e.prototype.toggle=function(t){this.isRevealed=t,this.setAttribute("type",t?"text":"password")},n.isRevealed.get=function(){return this._isRevealed},e.prototype.capslock=function(t){t&&"function"!=typeof t.getModifierState||(t.getModifierState("CapsLock")?this.node.parentNode.setAttribute(i.internals.ns.attr("capslock"),""):this.node.parentNode.removeAttribute(i.internals.ns.attr("capslock")))},n.isRevealed.set=function(t){this._isRevealed=t,this.setAttribute("type",t?"text":"password")},Object.defineProperties(e.prototype,n),Object.defineProperties(e,s),e}(i.core.Instance),$=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"PasswordLabel"},e.prototype.init=function(){this.addDescent(X.ADJUST,this.adjust.bind(this))},e.prototype.adjust=function(t){var e=Math.ceil(t/16);this.node.style.paddingRight=e+"rem"},Object.defineProperties(e,i),e}(i.core.Instance);i.password={Password:J,PasswordToggle:Y,PasswordSelector:Q,PasswordInput:Z,PasswordLabel:$},i.internals.register(i.password.PasswordSelector.INPUT,i.password.PasswordInput),i.internals.register(i.password.PasswordSelector.PASSWORD,i.password.Password),i.internals.register(i.password.PasswordSelector.TOOGLE,i.password.PasswordToggle),i.internals.register(i.password.PasswordSelector.LABEL,i.password.PasswordLabel);var tt=i.internals.ns.selector("nav__item"),et=i.internals.ns.selector("collapse"),it={NAVIGATION:i.internals.ns.selector("nav"),COLLAPSE:tt+" > "+et+", "+tt+" > *:not("+tt+"):not("+et+") > "+et+", "+tt+" > *:not("+tt+"):not("+et+") > *:not("+tt+"):not("+et+") > "+et,COLLAPSE_LEGACY:tt+" "+et,ITEM:tt,ITEM_RIGHT:tt+"--align-right",MENU:i.internals.ns.selector("menu"),BUTTON:i.internals.ns.selector("nav__btn"),TRANSLATE_BUTTON:i.internals.ns.selector("translate__btn")},nt=function(t){function e(){t.call(this),this._isRightAligned=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={isRightAligned:{configurable:!0},collapsePrimary:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"NavigationItem"},e.prototype.init=function(){this.addAscent(i.core.DisclosureEmission.ADDED,this.calculate.bind(this)),this.addAscent(i.core.DisclosureEmission.REMOVED,this.calculate.bind(this)),this.isResizing=!0,this.calculate()},e.prototype.resize=function(){this.calculate()},e.prototype.calculate=function(){var t=this.element.getDescendantInstances(i.core.Collapse.instanceClassName,null,!0)[0];if(t&&this.isBreakpoint(i.core.Breakpoints.LG)&&t.element.node.matches(it.MENU)){var e=this.element.node.parentElement.getBoundingClientRect().right,n=t.element.node.getBoundingClientRect().width,s=this.element.node.getBoundingClientRect().left;this.isRightAligned=s+n>e}else this.isRightAligned=!1},n.isRightAligned.get=function(){return this._isRightAligned},n.isRightAligned.set=function(t){this._isRightAligned!==t&&(this._isRightAligned=t,t?i.internals.dom.addClass(this.element.node,it.ITEM_RIGHT):i.internals.dom.removeClass(this.element.node,it.ITEM_RIGHT))},n.collapsePrimary.get=function(){return this.element.children.map((function(t){return t.getInstance("CollapseButton")})).filter((function(t){return null!==t&&(t.hasClass(it.BUTTON)||t.hasClass(it.TRANSLATE_BUTTON))}))[0]},Object.defineProperties(e.prototype,n),Object.defineProperties(e,s),e}(i.core.Instance),st={NONE:-1,INSIDE:0,OUTSIDE:1},ot=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={index:{configurable:!0},canUngroup:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"Navigation"},e.prototype.init=function(){t.prototype.init.call(this),this.clicked=!1,this.out=!1,this.addEmission(i.core.RootEmission.CLICK,this._handleRootClick.bind(this)),this.listen("mousedown",this.handleMouseDown.bind(this)),this.listenClick({capture:!0}),this.isResizing=!0},e.prototype.validate=function(e){return t.prototype.validate.call(this,e)&&e.element.node.matches(i.internals.legacy.isLegacy?it.COLLAPSE_LEGACY:it.COLLAPSE)},e.prototype.handleMouseDown=function(t){this.isBreakpoint(i.core.Breakpoints.LG)&&-1!==this.index&&this.current&&(this.position=this.current.node.contains(t.target)?st.INSIDE:st.OUTSIDE,this.requestPosition())},e.prototype.handleClick=function(t){!t.target.matches("a, button")||t.target.matches("[aria-controls]")||t.target.matches(i.core.DisclosureSelector.PREVENT_CONCEAL)||(this.index=-1)},e.prototype._handleRootClick=function(t){this.isBreakpoint(i.core.Breakpoints.LG)&&(this.node.contains(t)||(this.out=!0,this.requestPosition()))},e.prototype.requestPosition=function(){this.isRequesting||(this.isRequesting=!0,this.request(this.getPosition.bind(this)))},e.prototype.getPosition=function(){if(this.out)switch(this.position){case st.OUTSIDE:this.index=-1;break;case st.INSIDE:this.current&&!this.current.node.contains(document.activeElement)&&this.current.focus();break;default:this.index>-1&&!this.current.hasFocus&&(this.index=-1)}this.request(this.requested.bind(this))},e.prototype.requested=function(){this.position=st.NONE,this.out=!1,this.isRequesting=!1},n.index.get=function(){return t.prototype.index},n.index.set=function(e){-1===e&&this.current&&this.current.hasFocus&&this.current.focus(),t.prototype.index=e},n.canUngroup.get=function(){return!this.isBreakpoint(i.core.Breakpoints.LG)},e.prototype.resize=function(){this.update()},Object.defineProperties(e.prototype,n),Object.defineProperties(e,s),e}(i.core.CollapsesGroup);i.navigation={Navigation:ot,NavigationItem:nt,NavigationMousePosition:st,NavigationSelector:it},i.internals.register(i.navigation.NavigationSelector.NAVIGATION,i.navigation.Navigation),i.internals.register(i.navigation.NavigationSelector.ITEM,i.navigation.NavigationItem);var rt=function(t){function e(){t.call(this,i.core.DisclosureType.SELECT)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={list:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"TabButton"},e.prototype.handleClick=function(e){t.prototype.handleClick.call(this,e),this.focus()},e.prototype.apply=function(e){t.prototype.apply.call(this,e),this.isPrimary&&(this.setAttribute("tabindex",e?"0":"-1"),e&&this.list&&this.list.focalize(this))},n.list.get=function(){return this.element.getAscendantInstance("TabsList","TabsGroup")},Object.defineProperties(e.prototype,n),Object.defineProperties(e,s),e}(i.core.DisclosureButton),at={TAB:i.internals.ns.selector("tabs__tab"),GROUP:i.internals.ns.selector("tabs"),PANEL:i.internals.ns.selector("tabs__panel"),LIST:i.internals.ns.selector("tabs__list"),SHADOW:i.internals.ns.selector("tabs__shadow"),SHADOW_LEFT:i.internals.ns.selector("tabs__shadow--left"),SHADOW_RIGHT:i.internals.ns.selector("tabs__shadow--right"),PANEL_START:i.internals.ns.selector("tabs__panel--direction-start"),PANEL_END:i.internals.ns.selector("tabs__panel--direction-end")},ct="direction-start",lt="direction-end",pt="none",ht=function(t){function e(){t.call(this,i.core.DisclosureType.SELECT,at.PANEL,rt,"TabsGroup"),this._direction=pt,this._isPreventingTransition=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={direction:{configurable:!0},isPreventingTransition:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"TabPanel"},n.direction.get=function(){return this._direction},n.direction.set=function(t){if(t!==this._direction){switch(this._direction){case ct:this.removeClass(at.PANEL_START);break;case lt:this.removeClass(at.PANEL_END);break;case pt:break;default:return}switch(this._direction=t,this._direction){case ct:this.addClass(at.PANEL_START);break;case lt:this.addClass(at.PANEL_END)}}},n.isPreventingTransition.get=function(){return this._isPreventingTransition},n.isPreventingTransition.set=function(t){this._isPreventingTransition!==t&&(t?this.addClass(i.internals.motion.TransitionSelector.NONE):this.removeClass(i.internals.motion.TransitionSelector.NONE),this._isPreventingTransition=!0===t)},e.prototype.translate=function(t,e){this.isPreventingTransition=e,this.direction=t},e.prototype.reset=function(){this.group&&this.group.retrieve(!0)},e.prototype._electPrimaries=function(e){var i=this;return this.group&&this.group.list?t.prototype._electPrimaries.call(this,e).filter((function(t){return i.group.list.node.contains(t.node)})):[]},Object.defineProperties(e.prototype,n),Object.defineProperties(e,s),e}(i.core.Disclosure),ut="tab_keys_left",dt="tab_keys_right",ft="tab_keys_home",gt="tab_keys_end",_t={PRESS_KEY:i.internals.ns.emission("tab","press_key"),LIST_HEIGHT:i.internals.ns.emission("tab","list_height")},mt=function(t){function e(){t.call(this,"TabPanel")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={list:{configurable:!0},buttonHasFocus:{configurable:!0},isPreventingTransition:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"TabsGroup"},e.prototype.init=function(){t.prototype.init.call(this),this.listen("transitionend",this.transitionend.bind(this)),this.addAscent(_t.PRESS_KEY,this.pressKey.bind(this)),this.addAscent(_t.LIST_HEIGHT,this.setListHeight.bind(this)),this.isRendering=!0},e.prototype.getIndex=function(e){void 0===e&&(e=0),t.prototype.getIndex.call(this,e)},n.list.get=function(){return this.element.getDescendantInstances("TabsList","TabsGroup",!0)[0]},e.prototype.setListHeight=function(t){this.listHeight=t},e.prototype.transitionend=function(t){this.isPreventingTransition=!0},n.buttonHasFocus.get=function(){return this.members.some((function(t){return t.buttonHasFocus}))},e.prototype.pressKey=function(t){switch(t){case ut:this.pressLeft();break;case dt:this.pressRight();break;case ft:this.pressHome();break;case gt:this.pressEnd()}},e.prototype.pressRight=function(){this.buttonHasFocus&&(this.index<this.length-1?this.index++:this.index=0,this.focus())},e.prototype.pressLeft=function(){this.buttonHasFocus&&(this.index>0?this.index--:this.index=this.length-1,this.focus())},e.prototype.pressHome=function(){this.buttonHasFocus&&(this.index=0,this.focus())},e.prototype.pressEnd=function(){this.buttonHasFocus&&(this.index=this.length-1,this.focus())},e.prototype.focus=function(){this.current&&this.current.focus()},e.prototype.apply=function(){for(var t=0;t<this._index;t++)this.members[t].translate(ct);this.current&&this.current.translate(pt);for(var e=this._index+1;e<this.length;e++)this.members[e].translate(lt);this.isPreventingTransition=!1},n.isPreventingTransition.get=function(){return this._isPreventingTransition},n.isPreventingTransition.set=function(t){this._isPreventingTransition!==t&&(t?this.addClass(i.internals.motion.TransitionSelector.NONE):this.removeClass(i.internals.motion.TransitionSelector.NONE),this._isPreventingTransition=!0===t)},e.prototype.render=function(){if(null!==this.current){this.node.scrollTop=0,this.node.scrollLeft=0;var t=Math.round(this.current.node.offsetHeight);this.panelHeight!==t&&(this.panelHeight=t,this.style.setProperty("--tabs-height",this.panelHeight+this.listHeight+"px"))}},Object.defineProperties(e.prototype,n),Object.defineProperties(e,s),e}(i.core.DisclosuresGroup),yt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={isScrolling:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"TabsList"},e.prototype.init=function(){this.listen("scroll",this.scroll.bind(this)),this.listenKey(i.core.KeyCodes.RIGHT,this.ascend.bind(this,_t.PRESS_KEY,dt),!0,!0),this.listenKey(i.core.KeyCodes.LEFT,this.ascend.bind(this,_t.PRESS_KEY,ut),!0,!0),this.listenKey(i.core.KeyCodes.HOME,this.ascend.bind(this,_t.PRESS_KEY,ft),!0,!0),this.listenKey(i.core.KeyCodes.END,this.ascend.bind(this,_t.PRESS_KEY,gt),!0,!0),this.isResizing=!0},e.prototype.focalize=function(t){var e=t.getRect(),i=this.getRect(),n=this.node.scrollLeft;e.left<i.left?this.node.scrollTo(n-i.left+e.left-16,0):e.right>i.right&&this.node.scrollTo(n-i.right+e.right+16,0)},n.isScrolling.get=function(){return this._isScrolling},n.isScrolling.set=function(t){this._isScrolling!==t&&(this._isScrolling=t,this.apply())},e.prototype.apply=function(){this._isScrolling?(this.addClass(at.SHADOW),this.scroll()):(this.removeClass(at.SHADOW_RIGHT),this.removeClass(at.SHADOW_LEFT),this.removeClass(at.SHADOW))},e.prototype.scroll=function(){var t=this.node.scrollLeft,e=t<=16,i=this.node.scrollWidth-this.node.clientWidth-16,n=Math.abs(t)>=i,s="rtl"===document.documentElement.getAttribute("dir"),o=s?at.SHADOW_RIGHT:at.SHADOW_LEFT,r=s?at.SHADOW_LEFT:at.SHADOW_RIGHT;e?this.removeClass(o):this.addClass(o),n?this.removeClass(r):this.addClass(r)},e.prototype.resize=function(){this.isScrolling=this.node.scrollWidth>this.node.clientWidth+16;var t=this.getRect().height;this.setProperty("--tabs-list-height",t+"px"),this.ascend(_t.LIST_HEIGHT,t)},e.prototype.dispose=function(){this.isScrolling=!1},Object.defineProperties(e.prototype,n),Object.defineProperties(e,s),e}(i.core.Instance);i.tab={TabPanel:ht,TabButton:rt,TabsGroup:mt,TabsList:yt,TabSelector:at,TabEmission:_t},i.internals.register(i.tab.TabSelector.PANEL,i.tab.TabPanel),i.internals.register(i.tab.TabSelector.GROUP,i.tab.TabsGroup),i.internals.register(i.tab.TabSelector.LIST,i.tab.TabsList);var bt={SCROLLABLE:i.internals.ns.emission("table","scrollable"),CHANGE:i.internals.ns.emission("table","change"),CAPTION_HEIGHT:i.internals.ns.emission("table","captionheight")},Et=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"Table"},e.prototype.init=function(){this.addAscent(bt.CAPTION_HEIGHT,this.setCaptionHeight.bind(this))},e.prototype.setCaptionHeight=function(t){this.setProperty("--table-offset","calc("+t+"px + 1rem)")},Object.defineProperties(e,i),e}(i.core.Instance),vt={TABLE:i.internals.ns.selector("table"),SHADOW:i.internals.ns.selector("table__shadow"),SHADOW_LEFT:i.internals.ns.selector("table__shadow--left"),SHADOW_RIGHT:i.internals.ns.selector("table__shadow--right"),ELEMENT:i.internals.ns.selector("table")+":not("+i.internals.ns.selector("table--no-scroll")+") table",CAPTION:i.internals.ns.selector("table")+" table caption"},St=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={isScrolling:{configurable:!0}},n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"TableElement"},e.prototype.init=function(){this.listen("scroll",this.scroll.bind(this)),this.content=this.querySelector("tbody"),this.isResizing=!0},i.isScrolling.get=function(){return this._isScrolling},i.isScrolling.set=function(t){this._isScrolling!==t&&(this._isScrolling=t,t?(this.addClass(vt.SHADOW),this.scroll()):(this.removeClass(vt.SHADOW),this.removeClass(vt.SHADOW_LEFT),this.removeClass(vt.SHADOW_RIGHT)))},e.prototype.scroll=function(){var t=this.node.scrollLeft<=8,e=this.content.offsetWidth-this.node.offsetWidth-8,i=Math.abs(this.node.scrollLeft)>=e,n="rtl"===document.documentElement.getAttribute("dir"),s=n?vt.SHADOW_RIGHT:vt.SHADOW_LEFT,o=n?vt.SHADOW_LEFT:vt.SHADOW_RIGHT;t?this.removeClass(s):this.addClass(s),i?this.removeClass(o):this.addClass(o)},e.prototype.resize=function(){this.isScrolling=this.content.offsetWidth>this.node.offsetWidth},e.prototype.dispose=function(){this.isScrolling=!1},Object.defineProperties(e.prototype,i),Object.defineProperties(e,n),e}(i.core.Instance),Tt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"TableCaption"},e.prototype.init=function(){this.height=0,this.isResizing=!0},e.prototype.resize=function(){var t=this.getRect().height;this.height!==t&&(this.height=t,this.ascend(bt.CAPTION_HEIGHT,t))},Object.defineProperties(e,i),e}(i.core.Instance);i.table={Table:Et,TableElement:St,TableCaption:Tt,TableSelector:vt},i.internals.register(i.table.TableSelector.TABLE,i.table.Table),i.internals.register(i.table.TableSelector.ELEMENT,i.table.TableElement),i.internals.register(i.table.TableSelector.CAPTION,i.table.TableCaption);var At={DISMISS:i.internals.ns.event("dismiss")},Ot=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"TagDismissible"},e.prototype.init=function(){this.listenClick()},e.prototype.handleClick=function(){switch(this.focusClosest(),i.mode){case i.Modes.ANGULAR:case i.Modes.REACT:case i.Modes.VUE:this.request(this.verify.bind(this));break;default:this.remove()}this.dispatch(At.DISMISS)},e.prototype.verify=function(){document.body.contains(this.node)&&this.warn("a TagDismissible has just been dismissed and should be removed from the dom. In "+i.mode+" mode, the api doesn't handle dom modification. An event "+At.DISMISS+" is dispatched by the element to trigger the removal")},Object.defineProperties(e,n),e}(i.core.Instance),Nt={PRESSABLE:i.internals.ns.selector("tag")+"[aria-pressed]",DISMISSIBLE:""+i.internals.ns.selector("tag--dismiss")};i.tag={TagDismissible:Ot,TagSelector:Nt,TagEvent:At},i.internals.register(i.tag.TagSelector.PRESSABLE,i.core.Toggle),i.internals.register(i.tag.TagSelector.DISMISSIBLE,i.tag.TagDismissible);var Ct=i.internals.ns.selector("transcription"),Pt={TRANSCRIPTION:Ct,BUTTON:Ct+"__btn"},Lt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={collapsePrimary:{configurable:!0}},n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"Transcription"},i.collapsePrimary.get=function(){return this.element.children.map((function(t){return t.getInstance("CollapseButton")})).filter((function(t){return null!==t&&t.hasClass(Pt.BUTTON)}))[0]},Object.defineProperties(e.prototype,i),Object.defineProperties(e,n),e}(i.core.Instance);i.transcription={Transcription:Lt,TranscriptionSelector:Pt},i.internals.register(i.transcription.TranscriptionSelector.TRANSCRIPTION,i.transcription.Transcription);var Dt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"TileDownload"},e.prototype.init=function(){var t=this;this.addAscent(i.core.AssessEmission.UPDATE,(function(e){t.descend(i.core.AssessEmission.UPDATE,e)})),this.addAscent(i.core.AssessEmission.ADDED,(function(){t.descend(i.core.AssessEmission.ADDED)}))},Object.defineProperties(e,n),e}(i.core.Instance),It={DOWNLOAD:i.internals.ns.selector("tile--download"),DOWNLOAD_DETAIL:i.internals.ns.selector("tile--download")+" "+i.internals.ns.selector("tile__detail")};i.tile={TileSelector:It,TileDownload:Dt},i.internals.register(i.tile.TileSelector.DOWNLOAD,i.tile.TileDownload),i.internals.register(i.tile.TileSelector.DOWNLOAD_DETAIL,i.core.AssessDetail);var Rt={RANGE:i.internals.ns.selector("range"),RANGE_SM:i.internals.ns.selector("range--sm"),RANGE_STEP:i.internals.ns.selector("range--step"),RANGE_DOUBLE:i.internals.ns.selector("range--double"),RANGE_DOUBLE_STEP:i.internals.ns.selector("range--double")+i.internals.ns.selector("range--step"),RANGE_INPUT:i.internals.ns.selector("range input[type=range]:nth-of-type(1)"),RANGE_INPUT2:i.internals.ns.selector("range--double")+" input[type=range]:nth-of-type(2)",RANGE_OUTPUT:i.internals.ns.selector("range__output"),RANGE_MIN:i.internals.ns.selector("range__min"),RANGE_MAX:i.internals.ns.selector("range__max"),RANGE_PREFIX:i.internals.ns.attr("prefix"),RANGE_SUFFIX:i.internals.ns.attr("suffix")},wt={VALUE:i.internals.ns.emission("range","value"),VALUE2:i.internals.ns.emission("range","value2"),OUTPUT:i.internals.ns.emission("range","output"),CONSTRAINTS:i.internals.ns.emission("range","constraints"),MIN:i.internals.ns.emission("range","min"),MAX:i.internals.ns.emission("range","max"),STEP:i.internals.ns.emission("range","step"),PREFIX:i.internals.ns.emission("range","prefix"),SUFFIX:i.internals.ns.emission("range","suffix"),DISABLED:i.internals.ns.emission("range","disabled"),ENABLE_POINTER:i.internals.ns.emission("range","enable_pointer")},xt=function(){this._width=0,this._min=0,this._max=0,this._value=0,this._thumbSize=24,this._innerWidth=0,this._prefix="",this._suffix="",this._background={}},kt={width:{configurable:!0},isSm:{configurable:!0},textValue:{configurable:!0},value:{configurable:!0},outputX:{configurable:!0},min:{configurable:!0},textMin:{configurable:!0},max:{configurable:!0},textMax:{configurable:!0},step:{configurable:!0},output:{configurable:!0},progress:{configurable:!0}};xt.prototype.configure=function(t){t&&(this._prefix=t._prefix,this._suffix=t._suffix,this._width=t.width,this.setConstraints(t._constraints),this.value=t.value,this.update())},xt.prototype.setPrefix=function(t){this._prefix=null!==t?t:""},xt.prototype.setSuffix=function(t){this._suffix=null!==t?t:""},xt.prototype._decorate=function(t){return""+this._prefix+t+this._suffix},kt.width.get=function(){return this._width},kt.width.set=function(t){this._width=t},kt.isSm.get=function(){return this._isSm},kt.isSm.set=function(t){this._isSm!==t&&(this._isSm=t,this.setThumbSize(t?16:24),this.update())},xt.prototype.setThumbSize=function(t,e){void 0===e&&(e=1),this._thumbSize=t,this._innerPadding=t*e},kt.textValue.get=function(){return this._decorate(this._value)},kt.value.get=function(){return this._value},kt.value.set=function(t){this._value=t},kt.outputX.get=function(){return this._outputX},xt.prototype.setConstraints=function(t){this._constraints=t,this._min=t.min,this._max=t.max,this._step=t.step,this._rangeWidth=t.rangeWidth},kt.min.get=function(){return this._min},kt.textMin.get=function(){return this._decorate(this._min)},kt.max.get=function(){return this._max},kt.textMax.get=function(){return this._decorate(this._max)},kt.step.get=function(){return this._step},kt.output.get=function(){return{text:this.textValue,transform:"translateX("+this._translateX+"px) translateX(-"+this._centerPercent+"%)"}},xt.prototype._getRatio=function(t){return(t-this._min)/this._rangeWidth},kt.progress.get=function(){return this._progress},xt.prototype.update=function(){this._update()},xt.prototype._update=function(){this._innerWidth=this._width-this._innerPadding;var t=this._getRatio(this._value);this._translateX=t*this._width,this._centerPercent=100*t,this._progress={right:(this._innerWidth*t+.5*this._innerPadding).toFixed(2)+"px"}},Object.defineProperties(xt.prototype,kt);var Mt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={stepWidth:{configurable:!0}};return i.stepWidth.get=function(){return this._stepWidth.toFixed(3)+"px"},e.prototype._update=function(){t.prototype._update.call(this);var e=this._rangeWidth/this._step;for(this._stepWidth=this._innerWidth/e;this._stepWidth<4;)this._stepWidth*=2},Object.defineProperties(e.prototype,i),e}(xt),jt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={value2:{configurable:!0},textValue:{configurable:!0}};return i.value2.get=function(){return this._value},i.value2.set=function(t){this._value2!==t&&(this._value2=t,this.update())},i.textValue.get=function(){return this._decorate(this._value)+" - "+this._decorate(this._value2)},e.prototype.setThumbSize=function(e){t.prototype.setThumbSize.call(this,e,2)},e.prototype._update=function(){t.prototype._update.call(this);var e=this._getRatio(.5*(this._value+this._value2));this._translateX=e*this._width,this._centerPercent=100*e;var i=this._getRatio(this._value),n=this._getRatio(this._value2);this._progress={left:(this._innerWidth*i+.25*this._innerPadding).toFixed(2)+"px",right:(this._innerWidth*n+.75*this._innerPadding).toFixed(2)+"px"}},Object.defineProperties(e.prototype,i),e}(xt),Gt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={stepWidth:{configurable:!0}};return i.stepWidth.get=function(){return this._stepWidth.toFixed(3)+"px"},e.prototype._update=function(){t.prototype._update.call(this);var e=this._rangeWidth/this._step;this._stepWidth=this._innerWidth/e,this._stepWidth<4&&(this._stepWidth*=Math.ceil(4/this._stepWidth))},Object.defineProperties(e.prototype,i),e}(jt),Ht="step",Ut="double",Bt="double-step",Wt="default",Ft=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={type:{configurable:!0}},n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"Range"},e.prototype.init=function(){this._retrieveType(),this._retrieveSize(),this.isLegacy?(this.isResizing=!0,this.isMouseMoving=!0):(this._observer=new ResizeObserver(this.resize.bind(this)),this._observer.observe(this.node)),this.addAscent(wt.CONSTRAINTS,this.setConstraints.bind(this)),this.addAscent(wt.VALUE,this.setValue.bind(this)),this.addAscent(wt.VALUE2,this.setValue2.bind(this)),this.getAttribute(Rt.RANGE_PREFIX)&&this.setPrefix(this.getAttribute(Rt.RANGE_PREFIX)),this.getAttribute(Rt.RANGE_SUFFIX)&&this.setSuffix(this.getAttribute(Rt.RANGE_SUFFIX)),this.update()},e.prototype._retrieveType=function(){switch(!0){case this.matches(Rt.RANGE_DOUBLE_STEP):case this.matches(Rt.RANGE_DOUBLE):this.type=Ut;break;case this.matches(Rt.RANGE_STEP):this.type=Ht;break;default:this.type=Wt}},i.type.set=function(t){if(this._type!==t){this._type=t;var e=this._model;switch(this._type){case Bt:this._model=new Gt;break;case Ut:this._model=new jt;break;case Ht:this._model=new Mt;break;default:this._model=new xt}this._model.configure(e)}},i.type.get=function(){return this._type},e.prototype._retrieveSize=function(){this._model.isSm=this.matches(Rt.RANGE_SM)},e.prototype.resize=function(){this._retrieveWidth(),this.update()},e.prototype._retrieveWidth=function(){this._model.width=this.getRect().width},e.prototype.setValue=function(t){switch(this._model.value=t,this._type){case Bt:case Ut:this.descend(wt.VALUE,t)}this.update()},e.prototype.setValue2=function(t){this._model.value2=t,this.descend(wt.VALUE2,t),this.update()},e.prototype.setConstraints=function(t){this._model.setConstraints(t),this.update(),this.descend(wt.CONSTRAINTS,t)},e.prototype.setPrefix=function(t){this._model.setPrefix(t),this.update()},e.prototype.setSuffix=function(t){this._model.setSuffix(t),this.update()},e.prototype.mutate=function(t){switch(!0){case t.includes("class"):this._retrieveType(),this._retrieveSize();break;case t.includes(Rt.RANGE_PREFIX):case t.includes(Rt.RANGE_SUFFIX):this._model.setPrefix(this.getAttribute(Rt.RANGE_PREFIX)),this._model.setSuffix(this.getAttribute(Rt.RANGE_SUFFIX)),this.update()}},e.prototype.update=function(){this._model.update(),this.descend(wt.OUTPUT,this._model.output),this.descend(wt.MIN,this._model.textMin),this.descend(wt.MAX,this._model.textMax);var t=this._model.progress;t.left?this.style.setProperty("--progress-left",t.left):this.style.removeProperty("--progress-left"),t.right?(this.style.setProperty("--progress-right",t.right),this.isLegacy&&t.left&&(this.style.setProperty("background-position-x",t.left),this.style.setProperty("background-size",parseFloat(t.right)-parseFloat(t.left)+"px "+(this._model.isSm?"8px":"12px")))):(this.style.removeProperty("--progress-right"),this.isLegacy&&(this.style.removeProperty("background-size"),this.style.removeProperty("background-position-x"))),this._model.stepWidth?this.style.setProperty("--step-width",this._model.stepWidth):this.style.removeProperty("--step-width")},e.prototype.mouseMove=function(t){if(this._type===Ut||this._type===Bt){var e=t.x-this.getRect().left;this.descend(wt.ENABLE_POINTER,(parseFloat(this._model.progress.right)-parseFloat(this._model.progress.left))/2+parseFloat(this._model.progress.left)<e?2:1)}},e.prototype.dispose=function(){this._observer.disconnect()},Object.defineProperties(e.prototype,i),Object.defineProperties(e,n),e}(i.core.Instance),zt=function(t){this._min=isNaN(t.min)?0:t.min,this._max=isNaN(t.max)?100:t.max,this._step=isNaN(t.step)?1:t.step,this._rangeWidth=this._max-this._min},Vt={min:{configurable:!0},max:{configurable:!0},step:{configurable:!0},rangeWidth:{configurable:!0}};Vt.min.get=function(){return this._min},Vt.max.get=function(){return this._max},Vt.step.get=function(){return this._step},Vt.rangeWidth.get=function(){return this._rangeWidth},zt.prototype.test=function(t,e,i){return this._min===t&&this._max===e&&this._step===i},Object.defineProperties(zt.prototype,Vt);var qt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"RangeInput"},e.prototype.init=function(){this._init(),this.node.value=this.getAttribute("value"),this._changing=this.change.bind(this),this._listenerType=this.isLegacy?"change":"input",this.listen(this._listenerType,this._changing),this.isLegacy&&this.addDescent(wt.ENABLE_POINTER,this._enablePointer.bind(this)),this.change()},e.prototype._init=function(){var t=this;this._pointerId=1,this.request((function(){t.hasAttribute("min")||t.setAttribute("min",0),t.ascend(wt.CONSTRAINTS,new zt(t.node)),t.ascend(wt.DISABLED,t.node.disabled)})),this.addDescent(wt.VALUE2,this.setValue.bind(this))},e.prototype._enablePointer=function(t){var e=t===this._pointerId;this._isPointerEnabled!==e&&(this._isPointerEnabled=e,e?this.style.removeProperty("pointer-events"):this.style.setProperty("pointer-events","none"))},e.prototype.setValue=function(t){parseFloat(this.node.value)>t&&(this.node.value=t,this.change())},e.prototype.change=function(){this.ascend(wt.VALUE,parseFloat(this.node.value))},e.prototype.mutate=function(t){t.includes("disabled")&&this.ascend(wt.DISABLED,this.node.disabled),(t.includes("min")||t.includes("max")||t.includes("step"))&&(this.ascend(wt.CONSTRAINTS,new zt(this.node)),this.change())},e.prototype.dispose=function(){this._listenerType&&this.unlisten(this._listenerType,this._changing)},Object.defineProperties(e,i),e}(i.core.Instance),Kt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"RangeInput2"},e.prototype._init=function(){this._pointerId=2,this.addDescent(wt.CONSTRAINTS,this.setConstraints.bind(this)),this.addDescent(wt.VALUE,this.setValue.bind(this))},e.prototype.setValue=function(t){parseFloat(this.node.value)<t&&(this.node.value=t,this.change())},e.prototype.change=function(){this.ascend(wt.VALUE2,parseFloat(this.node.value))},e.prototype.setConstraints=function(t){this.node.min=t.min,this.node.max=t.max,this.node.step=t.step,this.change()},e.prototype.mutate=function(t){},Object.defineProperties(e,i),e}(qt),Xt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"RangeOutput"},e.prototype.init=function(){this.addDescent(wt.OUTPUT,this.change.bind(this))},e.prototype.change=function(t){this.node.innerText=t.text,this.node.style.transform=t.transform},Object.defineProperties(e,i),e}(i.core.Instance),Yt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={instanceClassName:{configurable:!0}};return i.instanceClassName.get=function(){return"RangeLimit"},e.prototype.init=function(){switch(!0){case this.matches(Rt.RANGE_MIN):this.addDescent(wt.MIN,this.change.bind(this));break;case this.matches(Rt.RANGE_MAX):this.addDescent(wt.MAX,this.change.bind(this))}},e.prototype.change=function(t){this.node.innerText=t},Object.defineProperties(e,i),e}(i.core.Instance);i.range={Range:Ft,RangeInput:qt,RangeInput2:Kt,RangeOutput:Xt,RangeLimit:Yt,RangeEmission:wt,RangeSelector:Rt},i.internals.register(i.range.RangeSelector.RANGE,i.range.Range),i.internals.register(i.range.RangeSelector.RANGE_INPUT,i.range.RangeInput),i.internals.register(i.range.RangeSelector.RANGE_INPUT2,i.range.RangeInput2),i.internals.register(i.range.RangeSelector.RANGE_OUTPUT,i.range.RangeOutput),i.internals.register(i.range.RangeSelector.RANGE_MIN,i.range.RangeLimit),i.internals.register(i.range.RangeSelector.RANGE_MAX,i.range.RangeLimit);var Jt={HEADER:i.internals.ns.selector("header"),TOOLS_LINKS:i.internals.ns.selector("header__tools-links"),MENU_LINKS:i.internals.ns.selector("header__menu-links"),BUTTONS:i.internals.ns.selector("header__tools-links")+" "+i.internals.ns.selector("btns-group")+", "+i.internals.ns.selector("header__tools-links")+" "+i.internals.ns.selector("links-group"),MODALS:""+i.internals.ns.selector("header__search")+i.internals.ns.selector("modal")+", "+i.internals.ns.selector("header__menu")+i.internals.ns.selector("modal")},Qt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"HeaderLinks"},e.prototype.init=function(){var t=this.queryParentSelector(Jt.HEADER);this.toolsLinks=t.querySelector(Jt.TOOLS_LINKS),this.menuLinks=t.querySelector(Jt.MENU_LINKS);var e="-mobile",n=this.toolsLinks.innerHTML.replace(/ +/g," "),s=this.menuLinks.innerHTML.replace(/ +/g," "),o=n.match(/id="(.*?)"/gm)||[];o=o.map((function(t){return t.replace('id="',"").replace('"',"")}));var r=n.match(/aria-controls="(.*?)"/gm),a=n.replace(/id="(.*?)"/gm,'id="$1'+e+'"');if(r)for(var c=0,l=r;c<l.length;c+=1){var p=l[c].replace('aria-controls="',"").replace('"',"");o.includes(p)&&(a=a.replace('aria-controls="'+p+'"','aria-controls="'+(p+e)+'"'))}if(a!==s)switch(i.mode){case i.Modes.ANGULAR:case i.Modes.REACT:case i.Modes.VUE:this.warn("header__tools-links content is different from header__menu-links content.\nAs you're using a dynamic framework, you should handle duplication of this content yourself, please refer to documentation:\n"+i.header.doc);break;default:this.menuLinks.innerHTML=a}},Object.defineProperties(e,n),e}(i.core.Instance),Zt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"HeaderModal"},e.prototype.init=function(){this.isResizing=!0},e.prototype.resize=function(){this.isBreakpoint(i.core.Breakpoints.LG)?this.deactivateModal():this.activateModal()},e.prototype.activateModal=function(){var t=this.element.getInstance("Modal");t&&(t.isEnabled=!0,this.listenClick({capture:!0}))},e.prototype.deactivateModal=function(){var t=this.element.getInstance("Modal");t&&(t.conceal(),t.isEnabled=!1,this.unlistenClick({capture:!0}))},e.prototype.handleClick=function(t){!t.target.matches("a, button")||t.target.matches("[aria-controls]")||t.target.matches(i.core.DisclosureSelector.PREVENT_CONCEAL)||this.element.getInstance("Modal").conceal()},Object.defineProperties(e,n),e}(i.core.Instance);i.header={HeaderLinks:Qt,HeaderModal:Zt,HeaderSelector:Jt,doc:"https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/en-tete"},i.internals.register(i.header.HeaderSelector.TOOLS_LINKS,i.header.HeaderLinks),i.internals.register(i.header.HeaderSelector.MODALS,i.header.HeaderModal);var $t={DISPLAY:i.internals.ns.selector("display"),RADIO_BUTTONS:'input[name="'+i.internals.ns("radios-theme")+'"]',FIELDSET:i.internals.ns.selector("fieldset")},te=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={scheme:{configurable:!0}},s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"Display"},e.prototype.init=function(){if(this.radios=this.querySelectorAll($t.RADIO_BUTTONS),i.scheme){this.changing=this.change.bind(this);for(var t=0,e=this.radios;t<e.length;t+=1){e[t].addEventListener("change",this.changing)}this.addDescent(i.scheme.SchemeEmission.SCHEME,this.apply.bind(this)),this.ascend(i.scheme.SchemeEmission.ASK)}else this.querySelector($t.FIELDSET).setAttribute("disabled","")},n.scheme.get=function(){return this._scheme},n.scheme.set=function(t){if(this._scheme!==t&&i.scheme)switch(t){case i.scheme.SchemeValue.SYSTEM:case i.scheme.SchemeValue.LIGHT:case i.scheme.SchemeValue.DARK:this._scheme=t;for(var e=0,n=this.radios;e<n.length;e+=1){var s=n[e];s.checked=s.value===t}this.ascend(i.scheme.SchemeEmission.SCHEME,t)}},e.prototype.change=function(){for(var t=0,e=this.radios;t<e.length;t+=1){var i=e[t];if(i.checked)return void(this.scheme=i.value)}},e.prototype.apply=function(t){this.scheme=t},e.prototype.dispose=function(){for(var t=0,e=this.radios;t<e.length;t+=1){e[t].removeEventListener("change",this.changing)}},Object.defineProperties(e.prototype,n),Object.defineProperties(e,s),e}(i.core.Instance);i.display={Display:te,DisplaySelector:$t},i.internals.register(i.display.DisplaySelector.DISPLAY,i.display.Display)}();
|
|
//# sourceMappingURL=component.nomodule.min.js.map
|