TP_JO2024/home/dist/dsfr/dsfr.nomodule.min.js

4 lines
258 KiB
JavaScript
Raw Permalink Normal View History

2024-03-27 17:19:37 +01:00
/*! DSFR v1.11.2 | 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 r=Object.keys(this.modules).map((function(t){return e.modules[t]}));if(t)for(var n=0,i=r;n<i.length;n+=1){i[n].activate()}else for(var o=0,s=r;o<s.length;o+=1){s[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 r=new t,n="fr",i="dsfr",o="@gouvfr",s="1.11.2",a=function(t,e,r,n){switch(this.level=t,this.light=e,this.dark=r,n){case"warn":this.logger=console.warn;break;case"error":this.logger=console.error;break;default:this.logger=console.log}},c={color:{configurable:!0}};a.prototype.log=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var r=new l(i),n=0,o=t;n<o.length;n+=1){var s=o[n];r.add(s)}this.print(r)},a.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(a.prototype,c);var l=function(t){this.inputs=["%c"],this.styles=["font-family:Marianne","line-height: 1.5"],this.objects=[],t&&this.add(t+" :")};l.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+" ")}},l.prototype.setColor=function(t){this.styles.push("color:"+t)},l.prototype.getMessage=function(){return[this.inputs.join(""),this.styles.join(";")].concat(this.objects)};var u={log:new a(0,"#616161","#989898"),debug:new a(1,"#000091","#8B8BFF"),info:new a(2,"#007c3b","#00ed70"),warn:new a(3,"#ba4500","#fa5c00","warn"),error:new a(4,"#D80600","#FF4641","error")},p=function(){var t=this;this.level=2;var e=function(e){var r=u[e];t[e]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];t.level<=r.level&&r.log.apply(r,e)},t[e].print=r.print.bind(r)};for(var r in u)e(r)};p.prototype.state=function(){var t=new l;t.add(r),this.log.print(t)},p.prototype.tree=function(){var t=r.getModule("stage");if(t){var e=new l;this._branch(t.root,0,e),this.log.print(e)}},p.prototype._branch=function(t,e,r){var n="";if(e>0){for(var i="",o=0;o<e;o++)i+=" ";n+=i+"└─ "}n+="["+t.id+"] "+t.html,r.add(n),r.add({"@":t}),r.add("\n");for(var s=0,a=t.children;s<a.length;s+=1){var c=a[s];n+=this._branch(c,e+1,r)}};var h=new p,f=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"},y=function(){this._mode=d.AUTO,this.isStarted=!1,this.starting=this.start.bind(this),this.preventManipulation=!1},b={mode:{configurable:!0}};y.prototype.configure=function(t,e,r){void 0===t&&(t={}),this.startCallback=e;var n=t.production&&(!r||"false"!==r.production);switch(!0){case r&&!isNaN(r.level):h.level=Number(r.level);break;case r&&r.verbose&&("true"===r.verbose||1===r.verbose):h.level=0;break;case n:h.level=999;break;case t.verbose:h.level=0}h.info("version "+s),this.mode=t.mode||d.AUTO},b.mode.set=function(t){switch(t){case d.AUTO:this.preventManipulation=!1,e=this.starting,f(e);break;case d.LOADED:this.preventManipulation=!1,f(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)},b.mode.get=function(){return this._mode},y.prototype.start=function(){h.info("start"),this.startCallback()},Ob
//# sourceMappingURL=dsfr.nomodule.min.js.map