UNPKG

@codegouvfr/react-dsfr

Version:

French State Design System React integration library

4 lines (3 loc) 47.1 kB
/*! DSFR v1.8.5 | SPDX-License-Identifier: MIT | License-Filename: LICENSE.md | restricted use (see terms and conditions) */ !function(){"use strict";var t=function(){this.modules={}},e={isActive:{configurable:!0},isLegacy:{configurable:!0}};t.prototype.create=function(t){var e=new t;this.modules[e.type]=e},t.prototype.getModule=function(t){return this.modules[t]},t.prototype.add=function(t,e){this.modules[t].add(e)},t.prototype.remove=function(t,e){this.modules[t].remove(e)},e.isActive.get=function(){return this._isActive},e.isActive.set=function(t){var e=this;if(t!==this._isActive){this._isActive=t;var i=Object.keys(this.modules).map((function(t){return e.modules[t]}));if(t)for(var n=0,s=i;n<s.length;n+=1){s[n].activate()}else for(var o=0,r=i;o<r.length;o+=1){r[o].deactivate()}}},e.isLegacy.get=function(){return this._isLegacy},e.isLegacy.set=function(t){t!==this._isLegacy&&(this._isLegacy=t)},Object.defineProperties(t.prototype,e);var i=new t,n="fr",s="dsfr",o="1.8.5",r=function(t,e,i,n){switch(this.level=t,this.light=e,this.dark=i,n){case"warn":this.logger=console.warn;break;case"error":this.logger=console.error;break;default:this.logger=console.log}},c={color:{configurable:!0}};r.prototype.log=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var i=new a(s),n=0,o=t;n<o.length;n+=1){var r=o[n];i.add(r)}this.print(i)},r.prototype.print=function(t){t.setColor(this.color),this.logger.apply(console,t.getMessage())},c.color.get=function(){return window.matchMedia("(prefers-color-scheme: dark)").matches?this.dark:this.light},Object.defineProperties(r.prototype,c);var a=function(t){this.inputs=["%c"],this.styles=["font-family:Marianne","line-height: 1.5"],this.objects=[],t&&this.add(t+" :")};a.prototype.add=function(t){switch(typeof t){case"object":case"function":this.inputs.push("%o "),this.objects.push(t);break;default:this.inputs.push(t+" ")}},a.prototype.setColor=function(t){this.styles.push("color:"+t)},a.prototype.getMessage=function(){return[this.inputs.join(""),this.styles.join(";")].concat(this.objects)};var u={trace:new r(0,"#616161","#989898"),debug:new r(1,"#000091","#8B8BFF"),info:new r(2,"#007c3b","#00ed70"),warn:new r(3,"#ba4500","#fa5c00","warn"),error:new r(4,"#D80600","#FF4641","error")},p=function(){var t=this;this.level=2;var e=function(e){var i=u[e];t[e]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];t.level<=i.level&&i.log.apply(i,e)},t[e].print=i.print.bind(i)};for(var i in u)e(i)};p.prototype.state=function(){var t=new a;t.add(i),this.trace.print(t)},p.prototype.tree=function(){var t=i.getModule("stage");if(t){var e=new a;this._branch(t.root,0,e),this.trace.print(e)}},p.prototype._branch=function(t,e,i){var n="";if(e>0){for(var s="",o=0;o<e;o++)s+=" ";n+=s+"└─ "}n+="["+t.id+"] "+t.html,i.add(n),i.add({"@":t}),i.add("\n");for(var r=0,c=t.children;r<c.length;r+=1){var a=c[r];n+=this._branch(a,e+1,i)}};var h=new p,l=function(t){"loading"!==document.readyState?window.requestAnimationFrame(t):document.addEventListener("DOMContentLoaded",t)},d={AUTO:"auto",MANUAL:"manual",RUNTIME:"runtime",LOADED:"loaded",VUE:"vue",ANGULAR:"angular",REACT:"react"},f=function(){this._mode=d.AUTO,this.isStarted=!1,this.starting=this.start.bind(this),this.preventManipulation=!1},g={mode:{configurable:!0}};f.prototype.configure=function(t,e){void 0===t&&(t={}),this.startCallback=e,!0===t.verbose&&(h.level=0),this.mode=t.mode||d.AUTO},g.mode.set=function(t){switch(t){case d.AUTO:this.preventManipulation=!1,e=this.starting,l(e);break;case d.LOADED:this.preventManipulation=!1,l(this.starting);break;case d.RUNTIME:this.preventManipulation=!1,this.start();break;case d.MANUAL:this.preventManipulation=!1;break;case d.VUE:case d.ANGULAR:case d.REACT:this.preventManipulation=!0;break;default:return void h.error("Illegal mode")}var e;this._mode=t,h.info("mode set to "+t)},g.mode.get=function(){return this._mode},f.prototype.start=function(){h.info("start"),this.startCallback()},Object.defineProperties(f.prototype,g);var y=new f,m=function(){this._collection=[]},v={length:{configurable:!0},collection:{configurable:!0}};m.prototype.forEach=function(t){this._collection.forEach(t)},m.prototype.map=function(t){return this._collection.map(t)},v.length.get=function(){return this._collection.length},m.prototype.add=function(t){return!(this._collection.indexOf(t)>-1)&&(this._collection.push(t),this.onAdd&&this.onAdd(),this.onPopulate&&1===this._collection.length&&this.onPopulate(),!0)},m.prototype.remove=function(t){var e=this._collection.indexOf(t);if(-1===e)return!1;this._collection.splice(e,1),this.onRemove&&this.onRemove(),this.onEmpty&&0===this._collection.length&&this.onEmpty()},m.prototype.execute=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var i=0,n=this._collection;i<n.length;i+=1){var s=n[i];s&&s.apply(null,t)}},m.prototype.clear=function(){this._collection.length=0},m.prototype.clone=function(){var t=new m;return t._collection=this._collection.slice(),t},v.collection.get=function(){return this._collection},Object.defineProperties(m.prototype,v);var _=function(t){function e(e){t.call(this),this.type=e,this.isActive=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.activate=function(){},e.prototype.deactivate=function(){},e}(m),b=function(t){return n+"-"+t};b.selector=function(t,e){return void 0===e&&(e="."),""+e+b(t)},(b.attr=function(t){return"data-"+b(t)}).selector=function(t,e){var i=b.attr(t);return void 0!==e&&(i+='="'+e+'"'),"["+i+"]"},b.event=function(t){return s+"."+t},b.emission=function(t,e){return"emission:"+t+"."+e};var C=function(t,e){return Array.prototype.slice.call(t.querySelectorAll(e))},O=function(t,e){var i=t.parentElement;return i.matches(e)?i:i===document.documentElement?null:O(i,e)},x=function(t,e,i){this.selector=t,this.InstanceClass=e,this.creator=i,this.instances=new m,this.isIntroduced=!1,this._instanceClassName=this.InstanceClass.instanceClassName,this._instanceClassNames=this.getInstanceClassNames(this.InstanceClass),this._property=this._instanceClassName.substring(0,1).toLowerCase()+this._instanceClassName.substring(1);var n=this._instanceClassName.replace(/[^a-zA-Z0-9]+/g,"-").replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([0-9])([^0-9])/g,"$1-$2").replace(/([^0-9])([0-9])/g,"$1-$2").toLowerCase();this._attribute=b.attr("js-"+n)},w={instanceClassName:{configurable:!0},instanceClassNames:{configurable:!0},property:{configurable:!0},attribute:{configurable:!0}};x.prototype.getInstanceClassNames=function(t){var e=Object.getPrototypeOf(t);return e&&"Instance"!==e.instanceClassName?this.getInstanceClassNames(e).concat([t.instanceClassName]):[t.instanceClassName]},x.prototype.hasInstanceClassName=function(t){return this._instanceClassNames.indexOf(t)>-1},x.prototype.introduce=function(){this.isIntroduced||(this.isIntroduced=!0,i.getModule("stage").parse(document.documentElement,this))},x.prototype.parse=function(t,e){var i=[];return t.matches&&t.matches(this.selector)&&i.push(t),!e&&t.querySelectorAll&&t.querySelector(this.selector)&&i.push.apply(i,C(t,this.selector)),i},x.prototype.create=function(t){if(t.node.matches(this.selector)){var e=new this.InstanceClass;return this.instances.add(e),e}},x.prototype.remove=function(t){this.instances.remove(t)},x.prototype.dispose=function(){for(var t=this.instances.collection,e=t.length-1;e>-1;e--)t[e]._dispose();this.creator=null},w.instanceClassName.get=function(){return this._instanceClassName},w.instanceClassNames.get=function(){return this._instanceClassNames},w.property.get=function(){return this._property},w.attribute.get=function(){return this._attribute},Object.defineProperties(x.prototype,w);var N=function(t){function e(){t.call(this,"register")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e,n){var s=new x(t,e,n);return this.add(s),i.isActive&&s.introduce(),s},e.prototype.activate=function(){for(var t=0,e=this.collection;t<e.length;t+=1){e[t].introduce()}},e.prototype.remove=function(e){e.dispose(),t.prototype.remove.call(this,e)},e}(_),A=0,E=function(t,e){e?this.id=e:(A++,this.id=A),this.node=t,this.attributeNames=[],this.instances=[],this._children=[],this._parent=null,this._projects=[]},L={proxy:{configurable:!0},html:{configurable:!0},parent:{configurable:!0},ascendants:{configurable:!0},children:{configurable:!0},descendants:{configurable:!0}};L.proxy.get=function(){var t=this;if(!this._proxy){this._proxy={id:this.id,get parent(){return t.parent?t.parent.proxy:null},get children(){return t.children.map((function(t){return t.proxy}))}};for(var e=0,i=this.instances;e<i.length;e+=1){var n=i[e];this._proxy[n.registration.property]=n.proxy}}return this._proxy},L.html.get=function(){if(!this.node||!this.node.outerHTML)return"";var t=this.node.outerHTML.indexOf(">");return this.node.outerHTML.substring(0,t+1)},E.prototype.project=function(t){-1===this._projects.indexOf(t)&&this._projects.push(t)},E.prototype.populate=function(){var t=this._projects.slice();this._projects.length=0;for(var e=0,i=t;e<i.length;e+=1){var n=i[e];this.create(n)}},E.prototype.create=function(t){if(!this.hasInstance(t.instanceClassName)){h.debug("create instance of "+t.instanceClassName+" on element ["+this.id+"]");var e=t.create(this);this.instances.push(e),e._config(this,t),this._proxy&&(this._proxy[t.property]=e.proxy)}},E.prototype.remove=function(t){var e=this.instances.indexOf(t);e>-1&&this.instances.splice(e,1),this._proxy&&delete this._proxy[t.registration.property]},L.parent.get=function(){return this._parent},L.ascendants.get=function(){return[this.parent].concat(this.parent.ascendants)},L.children.get=function(){return this._children},L.descendants.get=function(){var t=[].concat(this._children);return this._children.forEach((function(e){return t.push.apply(t,e.descendants)})),t},E.prototype.addChild=function(t,e){return this._children.indexOf(t)>-1?null:(t._parent=this,!isNaN(e)&&e>-1&&e<this._children.length?this._children.splice(e,0,t):this._children.push(t),t)},E.prototype.removeChild=function(t){var e=this._children.indexOf(t);if(-1===e)return null;t._parent=null,this._children.splice(e,1)},E.prototype.emit=function(t,e){for(var n=[],s=0,o=i.getModule("stage").collection;s<o.length;s+=1){var r=o[s];n.push.apply(n,r._emit(t,e))}return n},E.prototype._emit=function(t,e){for(var i=[],n=0,s=this.instances;n<s.length;n+=1){var o=s[n];i.push.apply(i,o._emitter.emit(t,e))}return i},E.prototype.ascend=function(t,e){return this._parent?this._parent._ascend(t,e):[]},E.prototype._ascend=function(t,e){for(var i=[],n=0,s=this.instances;n<s.length;n+=1){var o=s[n];i.push.apply(i,o._ascent.emit(t,e))}return this._parent&&i.push.apply(i,this._parent._ascend(t,e)),i},E.prototype.descend=function(t,e){for(var i=[],n=0,s=this._children;n<s.length;n+=1){var o=s[n];i.push.apply(i,o._descend(t,e))}return i},E.prototype._descend=function(t,e){for(var i=[],n=0,s=this.instances;n<s.length;n+=1){var o=s[n];i.push.apply(i,o._descent.emit(t,e))}for(var r=0,c=this._children;r<c.length;r+=1){var a=c[r];i.push.apply(i,a._descend(t,e))}return i},E.prototype.getInstance=function(t){for(var e=0,i=this.instances;e<i.length;e+=1){var n=i[e];if(n.registration.hasInstanceClassName(t))return n}return null},E.prototype.hasInstance=function(t){return null!==this.getInstance(t)},E.prototype.getDescendantInstances=function(t,e,i){if(!t)return[];for(var n=[],s=0,o=this._children;s<o.length;s+=1){var r=o[s],c=r.getInstance(t);c&&(n.push(c),i)||(e&&r.hasInstance(e)||!r.children.length||n.push.apply(n,r.getDescendantInstances(t,e,i)))}return n},E.prototype.getAscendantInstance=function(t,e){if(!t||!this._parent)return null;var i=this._parent.getInstance(t);return i||(e&&this._parent.hasInstance(e)?null:this._parent.getAscendantInstance(t,e))},E.prototype.dispose=function(){for(var t=0,e=this.instances;t<e.length;t+=1){e[t]._dispose()}this.instances.length=0,i.remove("stage",this),this.parent.removeChild(this),this._children.length=0,h.debug("remove element ["+this.id+"] "+this.html)},E.prototype.prepare=function(t){-1===this.attributeNames.indexOf(t)&&this.attributeNames.push(t)},E.prototype.examine=function(){var t=this.attributeNames.slice();this.attributeNames.length=0;for(var e=this.instances.length-1;e>-1;e--)this.instances[e].examine(t)},Object.defineProperties(E.prototype,L);var j=function(t){function e(){t.call(this,document.documentElement,"root"),this.node.setAttribute(b.attr("js"),!0)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(E),P=function(t){function e(){t.call(this,"stage"),this.root=new j,t.prototype.add.call(this,this.root),this.observer=new MutationObserver(this.mutate.bind(this)),this.modifications=[],this.willModify=!1,this.modifying=this.modify.bind(this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hasElement=function(t){for(var e=0,i=this.collection;e<i.length;e+=1){if(i[e].node===t)return!0}return!1},e.prototype.getElement=function(t){for(var e=0,i=this.collection;e<i.length;e+=1){var n=i[e];if(n.node===t)return n}var s=new E(t);return this.add(s),h.debug("add element ["+s.id+"] "+s.html),s},e.prototype.getProxy=function(t){return this.hasElement(t)?this.getElement(t).proxy:null},e.prototype.add=function(e){t.prototype.add.call(this,e),this.put(e,this.root)},e.prototype.put=function(t,e){for(var i=0,n=e.children.length-1;n>-1;n--){var s=e.children[n],o=t.node.compareDocumentPosition(s.node);if(o&Node.DOCUMENT_POSITION_CONTAINS)return void this.put(t,s);if(o&Node.DOCUMENT_POSITION_CONTAINED_BY)e.removeChild(s),t.addChild(s,0);else if(o&Node.DOCUMENT_POSITION_PRECEDING){i=n+1;break}}e.addChild(t,i)},e.prototype.activate=function(){this.observer.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0})},e.prototype.deactivate=function(){this.observer.disconnect()},e.prototype.mutate=function(t){var e=this,i=[];t.forEach((function(t){switch(t.type){case"childList":t.removedNodes.forEach((function(t){return e.dispose(t)})),t.addedNodes.forEach((function(t){return e.parse(t)}));break;case"attributes":if(e.hasElement(t.target)){var n=e.getElement(t.target);n.prepare(t.attributeName),-1===i.indexOf(n)&&i.push(n);for(var s=0,o=n.descendants;s<o.length;s+=1){var r=o[s];-1===i.indexOf(r)&&i.push(r)}}-1===e.modifications.indexOf(t.target)&&e.modifications.push(t.target)}})),i.forEach((function(t){return t.examine()})),this.modifications.length&&!this.willModify&&(this.willModify=!0,window.requestAnimationFrame(this.modifying))},e.prototype.modify=function(){this.willModify=!1;var t=this.modifications.slice();this.modifications.length=0;for(var e=0,i=t;e<i.length;e+=1){var n=i[e];document.documentElement.contains(n)&&this.parse(n)}},e.prototype.dispose=function(t){var e=[];this.forEach((function(i){t.contains(i.node)&&e.push(i)}));for(var i=0,n=e;i<n.length;i+=1){var s=n[i];s.dispose(),this.remove(s)}},e.prototype.parse=function(t,e,n){for(var s=[],o=0,r=e?[e]:i.getModule("register").collection;o<r.length;o+=1)for(var c=r[o],a=0,u=c.parse(t,n);a<u.length;a+=1){var p=u[a],h=this.getElement(p);h.project(c),-1===s.indexOf(h)&&s.push(h)}for(var l=0,d=s;l<d.length;l+=1){d[l].populate()}},e}(_),S=function(t){function e(){t.call(this,"render"),this.rendering=this.render.bind(this),this.nexts=new m}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.activate=function(){window.requestAnimationFrame(this.rendering)},e.prototype.request=function(t){this.nexts.add(t)},e.prototype.render=function(){if(i.isActive&&(window.requestAnimationFrame(this.rendering),this.forEach((function(t){return t.render()})),this.nexts.length)){var t=this.nexts.clone();this.nexts.clear(),t.forEach((function(t){return t.next()}))}},e}(_),M=function(t){function e(){t.call(this,"resize"),this.requireResize=!1,this.resizing=this.resize.bind(this);var e=this.request.bind(this);document.fonts&&document.fonts.ready.then(e),window.addEventListener("resize",e),window.addEventListener("orientationchange",e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.activate=function(){this.request()},e.prototype.request=function(){this.requireResize||(this.requireResize=!0,window.requestAnimationFrame(this.resizing))},e.prototype.resize=function(){this.requireResize&&(this.forEach((function(t){return t.resize()})),this.requireResize=!1)},e}(_),k=function(t){function e(){t.call(this,"lock"),this._isLocked=!1,this._scrollY=0,this.onPopulate=this.lock.bind(this),this.onEmpty=this.unlock.bind(this)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={isLocked:{configurable:!0}};return i.isLocked.get=function(){return this._isLocked},e.prototype.lock=function(){this._isLocked||(this._isLocked=!0,this._scrollY=window.scrollY,this.isLegacy?document.body.style.top=-1*this._scrollY+"px":document.body.style.setProperty("--scroll-top",-1*this._scrollY+"px"),document.documentElement.setAttribute(b.attr("scrolling"),"false"))},e.prototype.unlock=function(){this._isLocked&&(this._isLocked=!1,document.documentElement.removeAttribute(b.attr("scrolling")),this.isLegacy?document.body.style.top="":document.body.style.removeProperty("--scroll-top"),window.scroll(0,this._scrollY))},Object.defineProperties(e.prototype,i),e}(_),I=function(t){function e(){t.call(this,"load"),this.loading=this.load.bind(this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.activate=function(){window.addEventListener("load",this.loading)},e.prototype.load=function(){this.forEach((function(t){return t.load()}))},e}(_),R=["Marianne","Spectral"],D=function(t){function e(){t.call(this,"font-swap"),this.swapping=this.swap.bind(this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.activate=function(){document.fonts&&document.fonts.addEventListener("loadingdone",this.swapping)},e.prototype.swap=function(){var t=R.filter((function(t){return document.fonts.check("16px "+t)}));this.forEach((function(e){return e.swapFont(t)}))},e}(_),q=function(t){function e(){t.call(this,"mouse-move"),this.requireMove=!1,this._isMoving=!1,this.moving=this.move.bind(this),this.requesting=this.request.bind(this),this.onPopulate=this.listen.bind(this),this.onEmpty=this.unlisten.bind(this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.listen=function(){this._isMoving||(this._isMoving=!0,this.requireMove=!1,document.documentElement.addEventListener("mousemove",this.requesting))},e.prototype.unlisten=function(){this._isMoving&&(this._isMoving=!1,this.requireMove=!1,document.documentElement.removeEventListener("mousemove",this.requesting))},e.prototype.request=function(t){this._isMoving&&(this.point={x:t.clientX,y:t.clientY},this.requireMove||(this.requireMove=!0,window.requestAnimationFrame(this.moving)))},e.prototype.move=function(){var t=this;this.requireMove&&(this.forEach((function(e){return e.mouseMove(t.point)})),this.requireMove=!1)},e}(_),T=function(){i.create(N),i.create(P),i.create(S),i.create(M),i.create(k),i.create(I),i.create(D),i.create(q);var t=i.getModule("register");this.register=t.register.bind(t)},z={isActive:{configurable:!0}};z.isActive.get=function(){return i.isActive},T.prototype.start=function(){h.debug("START"),i.isActive=!0},T.prototype.stop=function(){h.debug("STOP"),i.isActive=!1},Object.defineProperties(T.prototype,z);var G=new T,F=function(){};F.prototype.getColor=function(t,e,i,n){void 0===n&&(n={});var s="--"+t+"-"+e+"-"+i+U(n);return getComputedStyle(document.documentElement).getPropertyValue(s).trim()||null};var U=function(t){switch(!0){case t.hover:return"-hover";case t.active:return"-active";default:return""}},H=new F,B=function(t){return"."===t.charAt(0)?t.substr(1):t},K=function(t){return t.className?t.className.split(" "):[]},V=function(t,e,i){e=B(e);var n=K(t),s=n.indexOf(e);!0===i?s>-1&&n.splice(s,1):-1===s&&n.push(e),t.className=n.join(" ")},W=function(t,e){return V(t,e)},Y=function(t,e){return V(t,e,!0)},$=function(t,e){return K(t).indexOf(B(e))>-1},X=['[tabindex]:not([tabindex="-1"])',"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(),Z=function(t){return t.querySelectorAll(X)},J={};J.addClass=W,J.hasClass=$,J.removeClass=Y,J.queryParentSelector=O,J.querySelectorAllArray=C,J.queryActions=Z;var Q={supportLocalStorage:function(){try{return"localStorage"in window&&null!==window.localStorage}catch(t){return!1}},supportAspectRatio:function(){return!!window.CSS&&CSS.supports("aspect-ratio: 16 / 9")}},tt={NONE:b.selector("transition-none")},et={};et.TransitionSelector=tt;var it=function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];return e.forEach((function(e){var i=Object.keys(e).reduce((function(t,i){return t[i]=Object.getOwnPropertyDescriptor(e,i),t}),{});Object.getOwnPropertySymbols(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);n.enumerable&&(i[t]=n)})),Object.defineProperties(t,i)})),t},nt={};nt.completeAssign=it;var st={},ot={};Object.defineProperty(ot,"isLegacy",{get:function(){return i.isLegacy}}),ot.setLegacy=function(){i.isLegacy=!0},st.legacy=ot,st.dom=J,st.support=Q,st.motion=et,st.property=nt,st.ns=b,st.register=G.register,st.state=i,Object.defineProperty(st,"preventManipulation",{get:function(){return y.preventManipulation}}),Object.defineProperty(st,"stage",{get:function(){return i.getModule("stage")}}),h.info("version "+o);var rt=function(t){return i.getModule("stage").getProxy(t)};rt.Modes=d,Object.defineProperty(rt,"mode",{set:function(t){y.mode=t},get:function(){return y.mode}}),rt.internals=st,rt.start=G.start,rt.stop=G.stop,rt.inspector=h,rt.colors=H,y.configure(window[s],rt.start),window[s]=rt;var ct=function(){this.emissions={}};ct.prototype.add=function(t,e){if("function"!=typeof e)throw new Error("closure must be a function");this.emissions[t]||(this.emissions[t]=[]),this.emissions[t].push(e)},ct.prototype.remove=function(t,e){if(this.emissions[t])if(e){var i=this.emissions[t].indexOf(e);i>-1&&this.emissions[t].splice(i)}else delete this.emissions[t]},ct.prototype.emit=function(t,e){if(!this.emissions[t])return[];for(var i=[],n=0,s=this.emissions[t];n<s.length;n+=1){var o=s[n];o&&i.push(o(e))}return i},ct.prototype.dispose=function(){this.emissions=null};var at=function(t,e){this.id=t,this.minWidth=e};at.prototype.test=function(){return window.matchMedia("(min-width: "+this.minWidth+"em)").matches};var ut={XS:new at("xs",0),SM:new at("sm",36),MD:new at("md",48),LG:new at("lg",62),XL:new at("xl",78)},pt=function(t){void 0===t&&(t=!0),this.jsAttribute=t,this._isRendering=!1,this._isResizing=!1,this._isScrollLocked=!1,this._isLoading=!1,this._isSwappingFont=!1,this._listeners={},this._keyListenerTypes=[],this._keys=[],this.handlingKey=this.handleKey.bind(this),this._emitter=new ct,this._ascent=new ct,this._descent=new ct,this._registrations=[],this._nexts=[]},ht={proxy:{configurable:!0},isRendering:{configurable:!0},isResizing:{configurable:!0},isScrollLocked:{configurable:!0},isLoading:{configurable:!0},isSwappingFont:{configurable:!0},isMouseMoving:{configurable:!0},style:{configurable:!0},classNames:{configurable:!0},hasFocus:{configurable:!0},isLegacy:{configurable:!0}},lt={instanceClassName:{configurable:!0}};lt.instanceClassName.get=function(){return"Instance"},pt.prototype._config=function(t,e){this.element=t,this.registration=e,this.node=t.node,this.id=t.node.id,this.jsAttribute&&this.setAttribute(e.attribute,!0),this.init()},pt.prototype.init=function(){},ht.proxy.get=function(){var t=this;return{render:function(){return t.render()},resize:function(){return t.resize()}}},pt.prototype.register=function(t,e){var n=i.getModule("register").register(t,e,this);this._registrations.push(n)},pt.prototype.getRegisteredInstances=function(t){for(var e=0,i=this._registrations;e<i.length;e+=1){var n=i[e];if(n.hasInstanceClassName(t))return n.instances.collection}return[]},pt.prototype.dispatch=function(t,e,i,n){var s=new CustomEvent(t,{detail:e,bubble:!0===i,cancelable:!0===n});this.node.dispatchEvent(s)},pt.prototype.listen=function(t,e,i){this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].indexOf(e)>-1||(this._listeners[t].push(e),this.node.addEventListener(t,e,i))},pt.prototype.unlisten=function(t,e){if(t)if(e){if(!this._listeners[t])return;var i=this._listeners[t].indexOf(e);i>-1&&this._listeners[t].splice(i,1),this.node.removeEventListener(t,e)}else{if(!this._listeners[t])return;for(var n=0,s=this._listeners[t];n<s.length;n+=1){var o=s[n];this.node.removeEventListener(t,o)}this._listeners[t].length=0}else for(var r in this._listeners)this.unlisten(r)},pt.prototype.listenKey=function(t,e,i,n,s){void 0===i&&(i=!1),void 0===n&&(n=!1),void 0===s&&(s="down"),-1===this._keyListenerTypes.indexOf(s)&&(this.listen("key"+s,this.handlingKey),this._keyListenerTypes.push(s)),this._keys.push(new dt(s,t,e,i,n))},pt.prototype.unlistenKey=function(t,e){var i=this;this._keys=this._keys.filter((function(i){return i.code!==t||i.closure!==e})),this._keyListenerTypes.forEach((function(t){i._keys.some((function(e){return e.type===t}))||i.unlisten("key"+t,i.handlingKey)}))},pt.prototype.handleKey=function(t){for(var e=0,i=this._keys;e<i.length;e+=1){i[e].handle(t)}},ht.isRendering.get=function(){return this._isRendering},ht.isRendering.set=function(t){this._isRendering!==t&&(t?i.add("render",this):i.remove("render",this),this._isRendering=t)},pt.prototype.render=function(){},pt.prototype.request=function(t){this._nexts.push(t),i.getModule("render").request(this)},pt.prototype.next=function(){var t=this._nexts.slice();this._nexts.length=0;for(var e=0,i=t;e<i.length;e+=1){var n=i[e];n&&n()}},ht.isResizing.get=function(){return this._isResizing},ht.isResizing.set=function(t){this._isResizing!==t&&(t?(i.add("resize",this),this.resize()):i.remove("resize",this),this._isResizing=t)},pt.prototype.resize=function(){},pt.prototype.isBreakpoint=function(t){return!0==("string"==typeof t)?ut[t.toUpperCase()].test():t.test()},ht.isScrollLocked.get=function(){return this._isScrollLocked},ht.isScrollLocked.set=function(t){this._isScrollLocked!==t&&(t?i.add("lock",this):i.remove("lock",this),this._isScrollLocked=t)},ht.isLoading.get=function(){return this._isLoading},ht.isLoading.set=function(t){this._isLoading!==t&&(t?i.add("load",this):i.remove("load",this),this._isLoading=t)},pt.prototype.load=function(){},ht.isSwappingFont.get=function(){return this._isSwappingFont},ht.isSwappingFont.set=function(t){this._isSwappingFont!==t&&(t?i.add("font-swap",this):i.remove("font-swap",this),this._isSwappingFont=t)},pt.prototype.swapFont=function(){},ht.isMouseMoving.get=function(){return this._isMouseMoving},ht.isMouseMoving.set=function(t){this._isMouseMoving!==t&&(t?i.add("mouse-move",this):i.remove("mouse-move",this),this._isMouseMoving=t)},pt.prototype.mouseMove=function(t){},pt.prototype.examine=function(t){this.node.matches(this.registration.selector)?this.mutate(t):this._dispose()},pt.prototype.mutate=function(t){},pt.prototype._dispose=function(){h.debug("dispose instance of "+this.registration.instanceClassName+" on element ["+this.element.id+"]"),this.removeAttribute(this.registration.attribute),this.unlisten(),this._keys=null,this.isRendering=!1,this.isResizing=!1,this._nexts=null,i.getModule("render").nexts.remove(this),this.isScrollLocked=!1,this.isLoading=!1,this.isSwappingFont=!1,this._emitter.dispose(),this._emitter=null,this._ascent.dispose(),this._ascent=null,this._descent.dispose(),this._descent=null,this.element.remove(this);for(var t=0,e=this._registrations;t<e.length;t+=1){var n=e[t];i.remove("register",n)}this._registrations=null,this.registration.remove(this),this.dispose()},pt.prototype.dispose=function(){},pt.prototype.emit=function(t,e){return this.element.emit(t,e)},pt.prototype.addEmission=function(t,e){this._emitter.add(t,e)},pt.prototype.removeEmission=function(t,e){this._emitter.remove(t,e)},pt.prototype.ascend=function(t,e){return this.element.ascend(t,e)},pt.prototype.addAscent=function(t,e){this._ascent.add(t,e)},pt.prototype.removeAscent=function(t,e){this._ascent.remove(t,e)},pt.prototype.descend=function(t,e){return this.element.descend(t,e)},pt.prototype.addDescent=function(t,e){this._descent.add(t,e)},pt.prototype.removeDescent=function(t,e){this._descent.remove(t,e)},ht.style.get=function(){return this.node.style},pt.prototype.addClass=function(t){W(this.node,t)},pt.prototype.removeClass=function(t){Y(this.node,t)},pt.prototype.hasClass=function(t){return $(this.node,t)},ht.classNames.get=function(){return K(this.node)},pt.prototype.remove=function(){this.node.parentNode.removeChild(this.node)},pt.prototype.setAttribute=function(t,e){this.node.setAttribute(t,e)},pt.prototype.getAttribute=function(t){return this.node.getAttribute(t)},pt.prototype.hasAttribute=function(t){return this.node.hasAttribute(t)},pt.prototype.removeAttribute=function(t){this.node.removeAttribute(t)},pt.prototype.setProperty=function(t,e){this.node.style.setProperty(t,e)},pt.prototype.removeProperty=function(t){this.node.style.removeProperty(t)},pt.prototype.focus=function(){this.node.focus()},pt.prototype.focusClosest=function(){var t=this._focusClosest(this.node.parentNode);t&&t.focus()},pt.prototype._focusClosest=function(t){if(!t)return null;var e=[].concat(Z(t));if(e.length<=1)return this._focusClosest(t.parentNode);var i=e.indexOf(this.node);return e[i+(i<e.length-1?1:-1)]},ht.hasFocus.get=function(){return this.node===document.activeElement},pt.prototype.matches=function(t){return this.node.matches(t)},pt.prototype.querySelector=function(t){return this.node.querySelector(t)},pt.prototype.querySelectorAll=function(t){return C(this.node,t)},pt.prototype.queryParentSelector=function(t){return O(this.node,t)},pt.prototype.getRect=function(){return this.node.getBoundingClientRect()},ht.isLegacy.get=function(){return i.isLegacy},Object.defineProperties(pt.prototype,ht),Object.defineProperties(pt,lt);var dt=function(t,e,i,n,s){this.type=t,this.eventType="key"+t,this.code=e,this.closure=i,this.preventDefault=!0===n,this.stopPropagation=!0===s};dt.prototype.handle=function(t){t.type===this.eventType&&t.keyCode===this.code&&(this.closure(t),this.preventDefault&&t.preventDefault(),this.stopPropagation&&t.stopPropagation())};var ft={DISCLOSE:b.event("disclose"),CONCEAL:b.event("conceal")},gt={RESET:b.emission("disclosure","reset"),ADDED:b.emission("disclosure","added"),REMOVED:b.emission("disclosure","removed"),GROUP:b.emission("disclosure","group"),UNGROUP:b.emission("disclosure","ungroup")},yt=function(t){function e(e,i,n,s){t.call(this),this.type=e,this._selector=i,this.DisclosureButtonInstanceClass=n,this.disclosuresGroupInstanceClassName=s,this.modifier=this._selector+"--"+this.type.id,this.pristine=!0}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={proxy:{configurable:!0},buttons:{configurable:!0},group:{configurable:!0},disclosed:{configurable:!0},buttonHasFocus:{configurable:!0},hasFocus:{configurable:!0}},n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"Disclosure"},e.prototype.init=function(){this.addDescent(gt.RESET,this.reset.bind(this)),this.addDescent(gt.GROUP,this.update.bind(this)),this.addDescent(gt.UNGROUP,this.update.bind(this)),this.register('[aria-controls="'+this.id+'"]',this.DisclosureButtonInstanceClass),this.ascend(gt.ADDED),this.update()},i.proxy.get=function(){var e=this,i=Object.assign.call(this,t.prototype.proxy,{disclose:e.disclose.bind(e),focus:e.focus.bind(e)});return this.type.canConceal&&(i.conceal=e.conceal.bind(e)),it(i,{get buttons(){return e.buttons.map((function(t){return t.proxy}))},get group(){var t=e.group;return t?t.proxy:null}})},i.buttons.get=function(){return this.getRegisteredInstances(this.DisclosureButtonInstanceClass.instanceClassName)},e.prototype.update=function(){this.getGroup()},e.prototype.getGroup=function(){if(this.disclosuresGroupInstanceClassName){var t=this.element.getAscendantInstance(this.disclosuresGroupInstanceClassName,this.constructor.instanceClassName);t&&t.validate(this)?this._group=t:this._group=null}else this._group=null},i.group.get=function(){return this._group},e.prototype.disclose=function(t){return!this.disclosed&&(this.pristine=!1,this.disclosed=!0,!t&&this.group&&(this.group.current=this),!0)},e.prototype.conceal=function(t,e){return!!this.disclosed&&(!(!this.type.canConceal&&this.group&&this.group.current===this)&&(this.pristine=!1,this.disclosed=!1,!t&&this.group&&this.group.current===this&&(this.group.current=null),e||this.focus(),this.descend(gt.RESET),!0))},i.disclosed.get=function(){return this._disclosed},i.disclosed.set=function(t){if(this._disclosed!==t){this.dispatch(t?ft.DISCLOSE:ft.CONCEAL,this.type),this._disclosed=t,t?this.addClass(this.modifier):this.removeClass(this.modifier);for(var e=0;e<this.buttons.length;e++)this.buttons[e].apply(t)}},e.prototype.reset=function(){},e.prototype.toggle=function(t){if(this.type.canConceal)switch(!0){case!t:case this.disclosed:this.conceal();break;default:this.disclose()}else this.disclose()},i.buttonHasFocus.get=function(){return!!this.buttons.some((function(t){return t.hasFocus}))},i.hasFocus.get=function(){return!!t.prototype.hasFocus||(!!this.buttonHasFocus||this.querySelectorAll(":focus").length>0)},e.prototype.focus=function(){for(var t=0;t<this.buttons.length;t++){var e=this.buttons[t];if(e.isPrimary)return void e.focus()}},e.prototype.dispose=function(){this._group=null,t.prototype.dispose.call(this),this.ascend(gt.REMOVED)},Object.defineProperties(e.prototype,i),Object.defineProperties(e,n),e}(pt),mt=function(t){function e(e){t.call(this),this.type=e,this.attributeName=e.ariaState?"aria-"+e.id:b.attr(e.id)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={proxy:{configurable:!0},disclosed:{configurable:!0}},n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"DisclosureButton"},e.prototype.init=function(){this.controlsId=this.getAttribute("aria-controls"),this.isPrimary=this.hasAttribute(this.attributeName),this.isPrimary&&this.disclosed&&this.registration.creator.pristine&&this.registration.creator.disclose(),this.listen("click",this.click.bind(this))},i.proxy.get=function(){return Object.assign.call(this,t.prototype.proxy,{focus:this.focus.bind(this)})},e.prototype.click=function(t){this.registration.creator&&this.registration.creator.toggle(this.isPrimary)},e.prototype.mutate=function(t){this.isPrimary&&t.indexOf(this.attributeName)>-1&&this.registration.creator&&(this.disclosed?this.registration.creator.disclose():this.type.canConceal&&this.registration.creator.conceal())},e.prototype.apply=function(t){this.isPrimary&&this.setAttribute(this.attributeName,t)},i.disclosed.get=function(){return"true"===this.getAttribute(this.attributeName)},Object.defineProperties(e.prototype,i),Object.defineProperties(e,n),e}(pt),vt=function(t){function e(e,i){t.call(this,i),this.disclosureInstanceClassName=e,this._index=-1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={proxy:{configurable:!0},members:{configurable:!0},length:{configurable:!0},index:{configurable:!0},current:{configurable:!0},hasFocus:{configurable:!0}},n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"DisclosuresGroup"},e.prototype.init=function(){this.addAscent(gt.ADDED,this.update.bind(this)),this.addAscent(gt.REMOVED,this.update.bind(this)),this.descend(gt.GROUP),this.update()},i.proxy.get=function(){var e=this,i={set index(t){e.index=t},get index(){return e.index},get length(){return e.length},get current(){var t=e.current;return t?t.proxy:null},get members(){return e.members.map((function(t){return t.proxy}))},get hasFocus(){return e.hasFocus}};return it.call(this,t.prototype.proxy,i)},e.prototype.validate=function(t){return!0},e.prototype.getMembers=function(){var t=this.element.getDescendantInstances(this.disclosureInstanceClassName,this.constructor.instanceClassName,!0);this._members=t.filter(this.validate.bind(this))},e.prototype.update=function(){this.getMembers(),this.getIndex()},i.members.get=function(){return this._members},i.length.get=function(){return this.members?this.members.length:0},e.prototype.getIndex=function(){this._index=-1;for(var t=0;t<this.length;t++)this.index>-1?this.members[t].conceal(!0,!0):this.members[t].disclosed&&(this.index=t)},i.index.get=function(){return this._index},i.index.set=function(t){if(!(t<-1||t>=this.length||t===this._index)){this._index=t;for(var e=0;e<this.length;e++){var i=this.members[e];t===e?i.disclose(!0):i.conceal(!0,!0)}this.apply()}},i.current.get=function(){return-1===this._index?null:this.members[this._index]},i.current.set=function(t){this.index=this.members.indexOf(t)},i.hasFocus.get=function(){var t=this.current;return!!t&&t.hasFocus},e.prototype.apply=function(){},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.descend(gt.UNGROUP),this._members=null},Object.defineProperties(e.prototype,i),Object.defineProperties(e,n),e}(pt),_t={EXPAND:{id:"expanded",ariaState:!0,ariaControls:!0,canConceal:!0},SELECT:{id:"selected",ariaState:!0,ariaControls:!0,canConceal:!1},OPENED:{id:"opened",ariaState:!1,ariaControls:!0,canConceal:!0}},bt=function(t){function e(){t.call(this,_t.EXPAND)}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"CollapseButton"},Object.defineProperties(e,i),e}(mt),Ct={COLLAPSE:b.selector("collapse"),COLLAPSING:b.selector("collapsing")},Ot=function(t){function e(){t.call(this,_t.EXPAND,Ct.COLLAPSE,bt,"CollapsesGroup")}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"Collapse"},e.prototype.init=function(){t.prototype.init.call(this),this.listen("transitionend",this.transitionend.bind(this))},e.prototype.transitionend=function(t){this.removeClass(Ct.COLLAPSING),this.disclosed||(this.isLegacy?this.style.maxHeight="":this.style.removeProperty("--collapse-max-height"))},e.prototype.unbound=function(){this.isLegacy?this.style.maxHeight="none":this.style.setProperty("--collapse-max-height","none")},e.prototype.disclose=function(e){var i=this;this.disclosed||(this.unbound(),this.request((function(){i.addClass(Ct.COLLAPSING),i.adjust(),i.request((function(){t.prototype.disclose.call(i,e)}))})))},e.prototype.conceal=function(e,i){var n=this;this.disclosed&&this.request((function(){n.addClass(Ct.COLLAPSING),n.adjust(),n.request((function(){t.prototype.conceal.call(n,e,i)}))}))},e.prototype.adjust=function(){this.setProperty("--collapser","none");var t=this.node.offsetHeight;this.setProperty("--collapse",-t+"px"),this.setProperty("--collapser","")},e.prototype.reset=function(){this.pristine||(this.disclosed=!1)},Object.defineProperties(e,i),e}(yt),xt=function(t){function e(){t.call(this,"Collapse")}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"CollapsesGroup"},Object.defineProperties(e,i),e}(vt),wt={CHANGE:b("equisized")},Nt=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"Equisized"},e.prototype.init=function(){this.ascend(wt.CHANGE)},e.prototype.measure=function(){return this.isLegacy&&(this.style.width="auto"),this.getRect().width},e.prototype.adjust=function(t){this.isLegacy&&(this.style.width=t+"px")},e.prototype.dispose=function(){this.ascend(wt.CHANGE)},Object.defineProperties(e,i),e}(pt),At=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"EquisizedsGroup"},e.prototype.init=function(){this.isResizing=!0,this.isLoading=!0,this.addAscent(wt.CHANGE,this.resize.bind(this))},e.prototype.load=function(){this.resize()},e.prototype.resize=function(){var t=this.element.getDescendantInstances("Equisized");this.isLegacy||this.style.setProperty("--equisized-width","auto");var e=Math.max.apply(Math,t.map((function(t){return t.measure()})));this.isLegacy?t.forEach((function(t){return t.adjust(e)})):this.style.setProperty("--equisized-width",e+"px")},Object.defineProperties(e,i),e}(pt),Et={TOGGLE:b.event("toggle")},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={pressed:{configurable:!0},proxy:{configurable:!0}},n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"Toggle"},e.prototype.init=function(){this.pressed="true"===this.pressed,this.listen("click",this.toggle.bind(this))},e.prototype.toggle=function(){this.pressed="true"!==this.pressed},i.pressed.get=function(){return this.getAttribute("aria-pressed")},i.pressed.set=function(t){this.setAttribute("aria-pressed",t?"true":"false"),this.dispatch(Et.TOGGLE,t)},i.proxy.get=function(){var e=this,i=Object.assign.call(this,t.prototype.proxy,{toggle:e.toggle.bind(e)});return it(i,{get pressed(){return e.pressed},set pressed(t){e.pressed=t}})},Object.defineProperties(e.prototype,i),Object.defineProperties(e,n),e}(pt),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={proxy:{configurable:!0}},n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"InjectSvg"},e.prototype.init=function(){this.node&&(this.img=this.node.querySelector("img")),this.isLegacy||this.replace()},i.proxy.get=function(){var e=this;return Object.assign.call(this,t.prototype.proxy,{replace:e.replace.bind(e),restore:e.restore.bind(e)})},e.prototype.fetch=function(){var t=this;this.img&&(this.imgID=this.img.getAttribute("id"),this.imgClass=this.img.getAttribute("class"),this.imgURL=this.img.getAttribute("src"),fetch(this.imgURL).then((function(t){return t.text()})).then((function(e){var i=(new DOMParser).parseFromString(e,"text/html");t.svg=i.querySelector("svg"),t.svg&&t.replace()})))},e.prototype.replace=function(){if(this.svg){this.imgID&&void 0!==this.imgID&&this.svg.setAttribute("id",this.imgID);var t=this.imgURL.match(/[ \w-]+\./)[0];t&&(t=t.slice(0,-1),["dark","light","system"].includes(t)&&(this.svg.innerHTML=this.svg.innerHTML.replaceAll('id="artwork-','id="'+t+"-artwork-"),this.svg.innerHTML=this.svg.innerHTML.replaceAll('"#artwork-','"#'+t+"-artwork-"))),this.imgClass&&void 0!==this.imgClass&&this.svg.setAttribute("class",this.imgClass),this.svg.hasAttribute("xmlns:a")&&this.svg.removeAttribute("xmlns:a"),this.node.setAttribute("data-fr-inject-svg",!0);var e,i;e=this.svg,i={"aria-hidden":!0,focusable:!1},Object.keys(i).forEach((function(t){return e.setAttribute(t,i[t])})),this.node.replaceChild(this.svg,this.img)}else this.fetch()},e.prototype.restore=function(){this.img&&this.svg&&(this.node.setAttribute("data-fr-inject-svg",!1),this.node.replaceChild(this.img,this.svg))},Object.defineProperties(e.prototype,i),Object.defineProperties(e,n),e}(pt),Pt={INJECT_SVG:"["+b.attr("inject-svg")+"]"},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={proxy:{configurable:!0}},n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"Artwork"},e.prototype.init=function(){this.isLegacy&&this.replace()},i.proxy.get=function(){return Object.assign.call(this,t.prototype.proxy,{replace:this.replace.bind(this)})},e.prototype.fetch=function(){var t=this;this.xlink=this.node.getAttribute("xlink:href");var e=this.xlink.split("#");this.svgUrl=e[0],this.svgName=e[1];var i=new XMLHttpRequest;i.onload=function(){var e=(new DOMParser).parseFromString(i.responseText,"text/html");t.realSvgContent=e.getElementById(t.svgName),t.realSvgContent&&(t.realSvgContent.classList.add(t.node.classList),t.replace())},i.open("GET",this.svgUrl),i.send()},e.prototype.replace=function(){this.realSvgContent?this.node.parentNode.replaceChild(this.realSvgContent,this.node):this.fetch()},Object.defineProperties(e.prototype,i),Object.defineProperties(e,n),e}(pt),Mt={ARTWORK_USE:b.selector("artwork")+" use"},kt=["32x9","16x9","3x2","4x3","1x1","3x4","2x3"],It=function(t,e){return e.map((function(e){return b.selector(t+"--"+e)})).join(",")},Rt=b.selector("responsive-img")+", "+It("responsive-img",kt)+", "+b.selector("responsive-vid")+", "+It("responsive-vid",["16x9","4x3","1x1"]),Dt={RATIO:b.selector("ratio")+", "+It("ratio",kt)+", "+Rt},qt=window[s],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"Ratio"},e.prototype.init=function(){if(!qt.internals.support.supportAspectRatio()){for(var t in this.ratio=16/9,this.classNames)if(this.registration.selector.indexOf(this.classNames[t])>0){var e=this.classNames[t].split("ratio-");e[1]&&(this.ratio=e[1].split("x")[0]/e[1].split("x")[1])}this.isRendering=!0,this.update()}},e.prototype.render=function(){this.getRect().width!==this.currentWidth&&this.update()},e.prototype.update=function(){this.currentWidth=this.getRect().width,this.style.height=this.currentWidth/this.ratio+"px"},Object.defineProperties(e,i),e}(pt);rt.core={Instance:pt,Breakpoints:ut,KeyCodes:{TAB:9,ESCAPE:27,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40},Disclosure:yt,DisclosureButton:mt,DisclosuresGroup:vt,DisclosureType:_t,DisclosureEvent:ft,DisclosureEmission:gt,Collapse:Ot,CollapseButton:bt,CollapsesGroup:xt,CollapseSelector:Ct,RootSelector:{ROOT:":root"},Equisized:Nt,EquisizedEmission:wt,Toggle:Lt,EquisizedsGroup:At,InjectSvg:jt,InjectSvgSelector:Pt,Artwork:St,ArtworkSelector:Mt,Ratio:Tt,RatioSelector:Dt},rt.internals.register(rt.core.CollapseSelector.COLLAPSE,rt.core.Collapse),rt.internals.register(rt.core.InjectSvgSelector.INJECT_SVG,rt.core.InjectSvg),rt.internals.register(rt.core.RatioSelector.RATIO,rt.core.Ratio),rt.internals.legacy.setLegacy(),rt.internals.register(rt.core.ArtworkSelector.ARTWORK_USE,rt.core.Artwork)}(); //# sourceMappingURL=core.nomodule.min.js.map