diff --git a/components/apps/DevTools/useEruda.ts b/components/apps/DevTools/useEruda.ts index 7e68b7b4..d748667f 100644 --- a/components/apps/DevTools/useEruda.ts +++ b/components/apps/DevTools/useEruda.ts @@ -7,6 +7,7 @@ import { loadFiles, viewWidth } from "utils/functions"; declare global { interface Window { eruda?: typeof Eruda; + erudaMonitor: Parameters<(typeof Eruda)["add"]>[0]; } } @@ -20,7 +21,8 @@ const config: InitOptions = { useShadowDom: false, }; -const FULL_TOOLBAR_WIDTH = 395; +const FULL_TOOLBAR_WIDTH = 455; +const SOURCES_BUTTON_WIDTH = 62; const RESOURCES_BUTTON_WIDTH = 74; const useEruda = ({ @@ -42,19 +44,37 @@ const useEruda = ({ const vw = viewWidth(); if (container) { + const tool = ["console", "elements", "network"]; + + if (vw >= FULL_TOOLBAR_WIDTH - RESOURCES_BUTTON_WIDTH) { + tool.push("resources"); + } + + if (vw >= FULL_TOOLBAR_WIDTH) { + tool.push("sources"); + } + window.eruda.init({ ...config, container, + tool, }); - window.eruda.remove("info"); - window.eruda.remove("snippets"); - if (vw < FULL_TOOLBAR_WIDTH) { - window.eruda.remove("resources"); - } - if (vw < FULL_TOOLBAR_WIDTH - RESOURCES_BUTTON_WIDTH) { - window.eruda.remove("sources"); + + if ( + vw > + FULL_TOOLBAR_WIDTH - RESOURCES_BUTTON_WIDTH - SOURCES_BUTTON_WIDTH + ) { + window.eruda.add(window.erudaMonitor); } + window.eruda.show(); + + const firstFileEntry = document.querySelector("main > ol > li"); + + if (firstFileEntry instanceof HTMLLIElement) { + window.eruda.get("elements").select(firstFileEntry); + } + setLoading(false); } } diff --git a/contexts/process/directory.ts b/contexts/process/directory.ts index 6bbb8180..62ac938a 100644 --- a/contexts/process/directory.ts +++ b/contexts/process/directory.ts @@ -60,7 +60,10 @@ const directory: Processes = { width: 545, }, icon: "/System/Icons/eruda.webp", - libs: ["/Program Files/Eruda/eruda.js"], + libs: [ + "/Program Files/Eruda/eruda.js", + "/Program Files/Eruda/eruda-monitor.js", + ], singleton: true, title: "DevTools", }, diff --git a/public/Program Files/Eruda/eruda-monitor.js b/public/Program Files/Eruda/eruda-monitor.js new file mode 100644 index 00000000..15a94188 --- /dev/null +++ b/public/Program Files/Eruda/eruda-monitor.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.erudaMonitor=e():t.erudaMonitor=e()}(self,(function(){return function(){var t={4201:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t){var e=function(t,e){if("object"!=o(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==o(e)?e:e+""}function s(t,e){for(var n=0;n]*>/g.test(t))try{var e=S().parse(t);return E(e,(function(t){t.attrs&&t.attrs.class&&(t.attrs.class=n(t.attrs.class))})),S().stringify(e)}catch(e){return n(t)}return n(t)}}function E(t,e){for(var n=0,r=t.length;n2&&void 0!==arguments[2]?arguments[2]:{}).theme,h=void 0===p?"light":p;return r(this,e),i=this,s=c(s=e),(o=a(i,U()?Reflect.construct(s,u||[],c(i).constructor):s.apply(i,u))).subComponents=[],o.compName=l,o.c=P(l),o.options={},o.container=t,o.$container=m()(t),o.$container.addClass(["luna-".concat(l),o.c("platform-".concat((f=C()(),"os x"===f?"mac":f)))]),o.on("optionChange",(function(t,e,n){var r=o.c;"theme"===t&&(o.$container.rmClass(r("theme-".concat(n))).addClass(r("theme-".concat(e))),N()(o.subComponents,(function(t){return t.setOption("theme",e)})))})),o.setOption("theme",h),o}return p(e,t),u(e,[{key:"destroy",value:function(){var t=this;this.destroySubComponents();var e=this.$container,n=e.attr("class");N()(n.split(/\s+/),(function(n){$()(n,"luna-".concat(t.compName))&&e.rmClass(n)})),e.html(""),this.emit("destroy"),this.removeAllListeners()}},{key:"setOption",value:function(t,e){var n=this,r=this.options,o={};"string"==typeof t?o[t]=e:o=t,N()(o,(function(t,e){var o=r[e];r[e]=t,n.emit("optionChange",e,t,o)}))}},{key:"getOption",value:function(t){return this.options[t]}},{key:"addSubComponent",value:function(t){t.setOption("theme",this.options.theme),this.subComponents.push(t)}},{key:"removeSubComponent",value:function(t){B()(this.subComponents,(function(e){return e===t}))}},{key:"destroySubComponents",value:function(){N()(this.subComponents,(function(t){return t.destroy()})),this.subComponents=[]}},{key:"initOptions",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};L()(t,e),D()(this.options,t)}},{key:"find",value:function(t){return this.$container.find(this.c(t))}}])}(d()),W=n(2228),G=n.n(W),J=n(5820),q=n.n(J),V=n(3497),Y=n.n(V),X=n(4095),K=n.n(X),Q=n(5865),tt=n.n(Q),et=n(3981),nt=n.n(et),rt=n(7030),ot=n.n(rt),it=n(8734),st=n.n(it),ut=n(587),at=n.n(ut);function ct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ct=function(){return!!t})()}t=n.hmd(t);var ft=500,lt=.01,pt=function(t){function e(t,n){var o,i,s,u;r(this,e),i=this,u=[t,{compName:"performance-monitor"},n],s=c(s=e),(o=a(i,ct()?Reflect.construct(s,u||[],c(i).constructor):s.apply(i,u))).width=0,o.height=0,o.curMax=0,o.fillColor="",o.metricBuffer=[],o.poll=function(){var t=o.metricBuffer,e=o.options.data();o.metricBuffer.push({timestamp:q()(),value:e});var n=o.width/lt,r=Math.ceil(n/ft*2);o.metricBuffer.length>2*r&&t.splice(0,t.length-r),o.$value.text(e+o.options.unit)},o.onResize=function(){if(!z()(o.container)){var t=o.canvas;o.width=t.offsetWidth,t.width=Math.round(o.width*window.devicePixelRatio),o.height=100,t.height=o.height*window.devicePixelRatio}},o.initOptions(n,{smooth:!0,unit:"",color:"#1a73e8",max:0}),o.initTpl(),o.$value=o.find(".value"),o.updateColor();var f=document.createElement("canvas");return m()(f).addClass(o.c("chart")),o.$container.append(f),o.canvas=f,o.ctx=f.getContext("2d"),o.resizeSensor=new(K())(t),o.bindEvent(),o}return p(e,t),u(e,[{key:"destroy",value:function(){var t,n,r,o,i;this.stop(),this.resizeSensor.destroy(),(t=e,n="destroy",r=this,i=f(c(1&(o=3)?t.prototype:t),n,r),2&o&&"function"==typeof i?function(t){return i.apply(r,t)}:i)([]),this.metricBuffer=[]}},{key:"start",value:function(){var t=this;this.pollTimer=setInterval(this.poll,ft),this.poll(),this.onResize();var e=function(){t.draw(),t.animationId=G().call(window,e)};e()}},{key:"stop",value:function(){clearInterval(this.pollTimer),G().cancel.call(window,this.animationId)}},{key:"updateColor",value:function(){var t=this.options.color;this.fillColor=function(t,e){var n=new(st())(t),r=n.toRgb(),o=st().parse(r);return o.val[3]=e,new(st())(o).toRgb()}(t,.2),this.$value.css("color",t)}},{key:"gridColor",get:function(){return"dark"===this.options.theme?"rgb(255 255 255 / 8%)":"rgb(0 0 0 / 8%)"}},{key:"bindEvent",value:function(){var t=this;this.resizeSensor.addListener(tt()((function(){return t.onResize()}),16)),this.on("optionChange",(function(e){"color"===e&&t.updateColor()}))}},{key:"draw",value:function(){var t=this.ctx,e=this.width,n=this.height;t.save(),t.scale(window.devicePixelRatio,window.devicePixelRatio),t.clearRect(0,0,e,n),this.drawChart(),this.drawHorizontalGrid(),t.restore()}},{key:"drawChart",value:function(){var t=this.ctx,e=this.options.color,n=1.05*this.calcMax(),r=this.buildMetricPath(n);t.save(),t.fillStyle=this.fillColor,t.fill(r),t.strokeStyle=e,t.lineWidth=.5,t.stroke(r),t.restore(),this.drawVerticalGrid(n)}},{key:"buildMetricPath",value:function(t){var e=this.width,n=this.height,r=this.metricBuffer,o=this.options.smooth,i=new Path2D,s=n-18,u=q()()-ft-e/lt,a=0,c=0,f=0;r.length&&(a=(r[0].timestamp-u)*lt,i.moveTo(a,m(0)),i.lineTo(e+5,m(0)),c=m(Y()(r).value),f=e+5,i.lineTo(f,c));for(var l=r.length-1;l>=0;--l){var p=r[l],h=p.timestamp,d=m(p.value);if(a=(h-u)*lt,o){var v=(f+a)/2;i.bezierCurveTo(v,c,v,d,a,d)}else i.lineTo(a,c),i.lineTo(a,d);if(f=a,c=d,h=0;--o){var i=e[o],s=i.value;if(r=Math.max(r,s),i.timestamp=0&&o%10==0&&t.fillText(ot()(new Date(1e3*o),"HH:MM:ss"),i+4,12),t.strokeStyle=o%10?n:this.gridColor,t.stroke()}}},{key:"drawVerticalGrid",value:function(t){var e=this.ctx,n=this.height,r=this.options,o=r.unit,i=r.theme,s=Math.pow(10,Math.floor(Math.log10(t))),u=Math.floor(t/s);1!==u&&u%2==1&&(s*=2);var a=Math.floor(t/s)*s,c=n-18;e.fillStyle="dark"===i?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.5)",e.strokeStyle=this.gridColor,e.beginPath();for(var f=0;f<2;++f){var l=h(a),p=at()(a)+o;e.moveTo(0,l),e.lineTo(4,l),e.moveTo(e.measureText(p).width+12,l),e.lineTo(this.width,l),e.fillText(p,8,h(a)+3),a/=2}function h(e){return Math.round(n-c*e/t)+.5}e.stroke(),e.beginPath(),e.moveTo(0,n+.5),e.lineTo(this.width,n+.5),e.strokeStyle="dark"===i?"rgba(255, 255, 255, 0.2)":"rgba(0, 0, 0, 0.2)",e.stroke()}},{key:"initTpl",value:function(){var t=this.options.title;this.$container.html(this.c('
'.concat(t,'
')))}}])}(Z);(function(t,e){try{t.exports=e,t.exports.default=e}catch(t){}})(t,pt)},6954:function(t,e,n){var r=n(7383),o=n(4579),i=n(8452),s=n(3072),u=n(2395),a=n(9511),c=n(3693);function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(f=function(){return!!t})()}function l(t,e,n,r){var o=u(s(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}var p=n(2228),h=n(4201).A,d=n(3981);t.exports=function(t){var e=t.util.evalCss;return new(function(u){"use strict";function v(){var t,o,u,a;return r(this,v),o=this,u=s(u=v),t=i(o,f()?Reflect.construct(u,a||[],s(o).constructor):u.apply(o,a)),c(t,"_onThemeChange",(function(e){var n=t._fpsMonitor,r=t._memoryMonitor;if("theme"===e){var o=t._getTheme();n.setOption({color:t._getColor(),theme:o}),r&&r.setOption({color:t._getColor(),theme:o})}})),t.name="monitor",t._style=e(n(3254)+n(7800)),t}return a(v,u),o(v,[{key:"init",value:function(e,n){l(v,"init",this,3)([e,n]),e.html('
'),this._initFps(e.find(".eruda-fps").get(0)),performance.memory&&this._initMemory(e.find(".eruda-memory").get(0)),this._initDomNodes(e.find(".eruda-dom-nodes").get(0)),t.get().config.on("change",this._onThemeChange)}},{key:"show",value:function(){l(v,"show",this,3)([]),this._fpsMonitor.start(),this._memoryMonitor&&this._memoryMonitor.start(),this._domNodesMonitor.start()}},{key:"hide",value:function(){l(v,"hide",this,3)([]),this._fpsMonitor.stop(),this._memoryMonitor&&this._memoryMonitor.stop(),this._domNodesMonitor.stop()}},{key:"destroy",value:function(){t.get().config.off("change",this._onThemeChange),this._fpsMonitor.destroy(),this._memoryMonitor&&this._memoryMonitor.destroy(),l(v,"destroy",this,3)([]),e.remove(this._style)}},{key:"_getColor",value:function(){return t.util.evalCss.getCurTheme().accent}},{key:"_getTheme",value:function(){return t.util.isDarkTheme()?"dark":"light"}},{key:"_initFps",value:function(t){var e,n=0,r=0,o=0;!function t(){n++;var i=d();i>r+1e3&&(o=Math.round(1e3*n/(i-r)),r=i,n=0),e=p(t)}();var i=new h(t,{title:"FPS",color:this._getColor(),smooth:!1,theme:this._getTheme(),data:function(){return o}});i.on("destroy",(function(){return p.cancel.call(window,e)})),this._fpsMonitor=i}},{key:"_initMemory",value:function(t){var e=new h(t,{title:"Used JS heap size",unit:"MB",color:this._getColor(),smooth:!1,theme:this._getTheme(),data:function(){return(performance.memory.usedJSHeapSize/1024/1024).toFixed(1)}});this._memoryMonitor=e}},{key:"_initDomNodes",value:function(t){var e=new h(t,{title:"DOM Nodes",color:this._getColor(),smooth:!1,theme:this._getTheme(),data:function(){return document.body.getElementsByTagName("*").length}});this._domNodesMonitor=e}}])}(t.Tool))}},7800:function(t,e,n){(e=n(6314)(!1)).push([t.id,'.eruda-dev-tools .eruda-tools .luna-performance-monitor{color:rgba(0,0,0,.88);background-color:#fff;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:14px;border:1px solid #d9d9d9;width:100%;padding:5px}.eruda-dev-tools .eruda-tools .luna-performance-monitor.luna-performance-monitor-platform-windows{font-family:"Segoe UI",Tahoma,sans-serif}.eruda-dev-tools .eruda-tools .luna-performance-monitor.luna-performance-monitor-platform-linux{font-family:Roboto,Ubuntu,Arial,sans-serif}.eruda-dev-tools .eruda-tools .luna-performance-monitor .luna-performance-monitor-hidden,.eruda-dev-tools .eruda-tools .luna-performance-monitor.luna-performance-monitor-hidden{display:none}.eruda-dev-tools .eruda-tools .luna-performance-monitor .luna-performance-monitor-invisible,.eruda-dev-tools .eruda-tools .luna-performance-monitor.luna-performance-monitor-invisible{visibility:hidden}.eruda-dev-tools .eruda-tools .luna-performance-monitor *{box-sizing:border-box}.eruda-dev-tools .eruda-tools .luna-performance-monitor.luna-performance-monitor-theme-dark{color-scheme:dark;color:rgba(255,255,255,.85);background-color:#141414}.eruda-dev-tools .eruda-tools .luna-performance-monitor-title{font-size:14px;margin-bottom:5px;color:rgba(0,0,0,.88)}.eruda-dev-tools .eruda-tools .luna-performance-monitor-value{float:right}.eruda-dev-tools .eruda-tools .luna-performance-monitor-chart{box-sizing:border-box;border:1px solid #d9d9d9;width:100%;height:100px}.eruda-dev-tools .eruda-tools .luna-performance-monitor-theme-dark{border-color:#424242}.eruda-dev-tools .eruda-tools .luna-performance-monitor-theme-dark .luna-performance-monitor-title{color:rgba(255,255,255,.85)}.eruda-dev-tools .eruda-tools .luna-performance-monitor-theme-dark .luna-performance-monitor-chart{border-color:#424242}',""]),t.exports=e},3254:function(t,e,n){(e=n(6314)(!1)).push([t.id,".eruda-dev-tools .eruda-tools .eruda-monitor{padding:10px;overflow-y:auto;-webkit-overflow-scrolling:touch}.eruda-dev-tools .eruda-tools .eruda-monitor .eruda-memory,.eruda-dev-tools .eruda-tools .eruda-monitor .eruda-dom-nodes{margin:10px 0}.eruda-dev-tools .eruda-tools .eruda-monitor .luna-performance-monitor{border-color:var(--border) !important}",""]),t.exports=e},6314:function(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var o=(s=r,u=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),a="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(u),"/*# ".concat(a," */")),i=r.sources.map((function(t){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(t," */")}));return[n].concat(i).concat([o]).join("\n")}var s,u,a;return[n].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,r){"string"==typeof t&&(t=[[null,t,""]]);var o={};if(r)for(var i=0;i-1&&n[t].splice(r,1),this}},once:function(t,e){return this.on(t,u(e)),this},emit:function(t){var e=this;if(o(this._events,t)){var n=s(arguments,1),r=a(this._events[t]);return i(r,(function(t){return t.apply(e,n)}),this),this}},removeAllListeners:function(t){return t?delete this._events[t]:this._events={},this}},{mixin:function(t){i(["on","off","once","emit","removeAllListeners"],(function(n){t[n]=e.prototype[n]})),t._events=t._events||{}}}),t.exports=e},4095:function(t,e,n){var r=n(1023),o=n(5241),i=n(3793),s=n(6866),u=n(3249),a=n(8105),c=n(5169);e=c.ResizeObserver?r.extend({initialize:function(t){var e=this;if(t._resizeSensor)return t._resizeSensor;this.callSuper(r,"initialize");var n=new c.ResizeObserver((function(){return e.emit()}));n.observe(t),t._resizeSensor=this,this._resizeObserver=n,this._el=t},destroy:function(){var t=this._el;t._resizeSensor&&(this.rmAllListeners(),delete t._resizeSensor,this._resizeObserver.unobserve(t))}}):r.extend({initialize:function(t){if(t._resizeSensor)return t._resizeSensor;this.callSuper(r,"initialize"),this._el=t,t._resizeSensor=this,u(["absolute","relative","fixed","sticky"],s(t,"position"))||s(t,"position","relative"),this._appendResizeSensor(),this._bindEvent()},destroy:function(){var t=this._el;t._resizeSensor&&(this.rmAllListeners(),delete t._resizeSensor,t.removeChild(this._resizeSensorEl))},_appendResizeSensor:function(){var t=this._el,e={pointerEvents:"none",position:"absolute",left:"0px",top:"0px",right:"0px",bottom:"0px",overflow:"hidden",zIndex:"-1",visibility:"hidden",maxWidth:"100%"},n={position:"absolute",left:"0px",top:"0px",transition:"0s"},r=o("div",{style:n}),i=o("div.resize-sensor-expand",{style:e},r),s=o("div.resize-sensor-shrink",{style:e},o("div",{style:a({width:"200%",height:"200%"},n)})),u=o("div.resize-sensor",{dir:"ltr",style:e},i,s);this._expandEl=i,this._expandChildEl=r,this._shrinkEl=s,this._resizeSensorEl=u,t.appendChild(u),this._resetExpandShrink()},_bindEvent:function(){var t=this;i.on(this._expandEl,"scroll",(function(){return t._onScroll()})),i.on(this._shrinkEl,"scroll",(function(){return t._onScroll()}))},_onScroll:function(){this.emit(),this._resetExpandShrink()},_resetExpandShrink:function(){var t=this._el,e=t.offsetWidth,n=t.offsetHeight;s(this._expandChildEl,{width:e+10,height:n+10}),a(this._expandEl,{scrollLeft:e+10,scrollTop:n+10}),a(this._shrinkEl,{scrollLeft:e+10,scrollTop:n+10})}}),t.exports=e},21:function(t,e,n){var r=n(2717),o=n(1738),i=n(9100),s=n(8178),u=new(e=r({className:"Select",initialize:function(t){return this.length=0,t?o(t)?u.find(t):void(t.nodeType&&(this[0]=t,this.length=1)):this},find:function(t){var n=new e;return this.each((function(){s(n,this.querySelectorAll(t))})),n},each:function(t){return i(this,(function(e,n){t.call(e,n,e)})),this}}))(document);t.exports=e},1023:function(t,e,n){var r=n(2717),o=n(8420),i=n(9100),s=n(769);e=r({initialize:function(){this._listeners=[]},addListener:function(t){this._listeners.push(t)},rmListener:function(t){var e=this._listeners.indexOf(t);e>-1&&this._listeners.splice(e,1)},rmAllListeners:function(){this._listeners=[]},emit:function(){var t=this,e=s(arguments),n=o(this._listeners);i(n,(function(n){return n.apply(t,e)}),this)}},{mixin:function(t){i(["addListener","rmListener","emit","rmAllListeners"],(function(n){t[n]=e.prototype[n]})),t._listeners=t._listeners||[]}}),t.exports=e},7005:function(t,e,n){var r=n(2717),o=n(5395);e=r({initialize:function(){this.clear()},clear:function(){this._items=[],this.size=0},push:function(t){return this._items.push(t),++this.size},pop:function(){if(this.size)return this.size--,this._items.pop()},peek:function(){return this._items[this.size-1]},forEach:function(t,e){e=arguments.length>1?e:this;for(var n=this._items,r=this.size-1,o=0;r>=0;r--,o++)t.call(e,n[r],o,this)},toArr:function(){return o(this._items)}}),t.exports=e},7514:function(t,e,n){var r=n(3145),o=n(5427),i=n(438),s=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols;e=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.prototype,a=void 0===n||n,c=e.unenumerable,f=void 0!==c&&c,l=e.symbol,p=void 0!==l&&l,h=[];if((f||p)&&s){var d=r;f&&s&&(d=s);do{h=h.concat(d(t)),p&&u&&(h=h.concat(u(t)))}while(a&&(t=o(t))&&t!==Object.prototype);h=i(h)}else if(a)for(var v in t)h.push(v);else h=r(t);return h},t.exports=e},1849:function(t,e,n){var r=n(9100),o=n(8971),i=n(3957);e=function(t,e){o(e)&&(e=!0);var n=i(e),s={};return r(t,(function(t){s[t]=n?e(t):e})),s},t.exports=e},7542:function(t,e){e=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},t.exports=e},387:function(t,e,n){var r=n(6833);function o(t,e){this[e]=t.replace(/\w/,(function(t){return t.toUpperCase()}))}e=function(t){var e=r(t),n=e[0];return e.shift(),e.forEach(o,e),n+=e.join("")},t.exports=e},6949:function(t,e,n){var r=n(365),o=n(6214);e=function(t,e){if(o(t))return t;if(e&&r(e,t))return[t];var n=[];return t.replace(i,(function(t,e,r,o){n.push(r?o.replace(s,"$1"):e||t)})),n};var i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g;t.exports=e},6026:function(t,e,n){var r=n(8971);e=function(t,e,n){return r(n)&&(n=e,e=void 0),!r(e)&&tn?n:t},t.exports=e},8420:function(t,e,n){var r=n(9760),o=n(6214),i=n(8105);e=function(t){return r(t)?o(t)?t.slice():i({},t):t},t.exports=e},3249:function(t,e,n){var r=n(7375),o=n(1738),i=n(5793),s=n(5119);e=function(t,e){return o(t)?t.indexOf(e)>-1:(i(t)||(t=s(t)),r(t,e)>=0)},t.exports=e},6513:function(t,e,n){var r=n(9760);e=function(t){if(!r(t))return{};if(o)return o(t);function e(){}return e.prototype=t,new e};var o=Object.create;t.exports=e},6307:function(t,e,n){var r=n(8971),o=n(9100);e=function(t,e){return function(n){return o(arguments,(function(i,s){if(0!==s){var u=t(i);o(u,(function(t){e&&!r(n[t])||(n[t]=i[t])}))}})),n}},t.exports=e},7030:function(t,e,n){var r=n(1738),o=n(2517),i=n(2561),s=n(6392);e=function(t,n,s,p){1===arguments.length&&r(t)&&!f.test(t)&&(n=t,t=void 0),t=t||new Date,o(t)||(t=new Date(t));var h=(n=i(e.masks[n]||n||e.masks.default)).slice(0,4);"UTC:"!==h&&"GMT:"!==h||(n=n.slice(4),s=!0,"GMT:"===h&&(p=!0));var d=s?"getUTC":"get",v=t[d+"Date"](),m=t[d+"Day"](),y=t[d+"Month"](),g=t[d+"FullYear"](),x=t[d+"Hours"](),b=t[d+"Minutes"](),w=t[d+"Seconds"](),_=t[d+"Milliseconds"](),M=s?0:t.getTimezoneOffset(),S={d:v,dd:u(v),ddd:e.i18n.dayNames[m],dddd:e.i18n.dayNames[m+7],m:y+1,mm:u(y+1),mmm:e.i18n.monthNames[y],mmmm:e.i18n.monthNames[y+12],yy:i(g).slice(2),yyyy:g,h:x%12||12,hh:u(x%12||12),H:x,HH:u(x),M:b,MM:u(b),s:w,ss:u(w),l:u(_,3),L:u(Math.round(_/10)),t:x<12?"a":"p",tt:x<12?"am":"pm",T:x<12?"A":"P",TT:x<12?"AM":"PM",Z:p?"GMT":s?"UTC":(i(t).match(c)||[""]).pop().replace(l,""),o:(M>0?"-":"+")+u(100*Math.floor(Math.abs(M)/60)+Math.abs(M)%60,4),S:["th","st","nd","rd"][v%10>3?0:(v%100-v%10!=10)*v%10]};return n.replace(a,(function(t){return t in S?S[t]:t.slice(1,t.length-1)}))};var u=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return s(i(t),e,"0")},a=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|"[^"]*"|'[^']*'/g,c=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,f=/\d/,l=/[^-+\dA-Z]/g;e.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},e.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]},t.exports=e},4534:function(t,e){e=function(t,e,n){var r;return function(){var o=this,i=arguments;n||clearTimeout(r),n&&r||(r=setTimeout((function(){r=null,t.apply(o,i)}),e))}},t.exports=e},5651:function(t,e,n){e=n(6307)(n(7514),!0),t.exports=e},8966:function(t,e,n){var r=n(2717),o=n(3249);function i(){return!0}function s(){return!1}function u(t){var n,r=this.events[t.type],o=a.call(this,t,r);t=new e.Event(t);for(var i,s,u=0;(s=o[u++])&&!t.isPropagationStopped();)for(t.curTarget=s.el,i=0;(n=s.handlers[i++])&&!t.isImmediatePropagationStopped();)!1===n.handler.apply(s.el,[t])&&(t.preventDefault(),t.stopPropagation())}function a(t,e){var n,r,i,s,u=t.target,a=[],c=e.delegateCount;if(u.nodeType)for(;u!==this;u=u.parentNode||this){for(r=[],s=0;s-1}if(!t&&r&&(t=navigator.userAgent),t){if(t=t.toLowerCase(),e("windows phone"))return"windows phone";if(e("win"))return"windows";if(e("android"))return"android";if(e("ipad")||e("iphone")||e("ipod"))return"ios";if(e("mac"))return"os x";if(e("linux"))return"linux"}else if(o){var n=process,i=n.platform,s=n.env;if("win32"===i||"cygwin"===s.OSTYPE||"msys"===s.OSTYPE)return"windows";if("darwin"===i)return"os x";if("linux"===i)return"linux"}return"unknown"},t.exports=e},9100:function(t,e,n){var r=n(5793),o=n(3145),i=n(6459);e=function(t,e,n){var s,u;if(e=i(e,n),r(t))for(s=0,u=t.length;s2?n-2:0),l=2;l>>4).toString(16)),e.push((15&o).toString(16))}return e.join("")},decode:function(t){var e=[],n=t.length;r(n)&&n--;for(var o=0;o1&&r--,o=6*r<1?c+6*(e-c)*r:2*r<1?e:3*r<2?c+(e-c)*(2/3-r)*6:c,a[f]=n(255*o);return a};var n=Math.round;t.exports=e},9548:function(t,e,n){var r=n(383),o=n(7005),i=n(6214),s=n(9100),u=n(1738),a=n(5154);var c=function(t){return t.replace(/"/g,'"')},f=function(t){return t.replace(/"/g,""")};e={parse:function(t){var e=[],n=new o;return r(t,{start:function(t,e){e=a(e,(function(t){return c(t)})),n.push({tag:t,attrs:e})},end:function(){var t=n.pop();if(n.size){var r=n.peek();i(r.content)||(r.content=[]),r.content.push(t)}else e.push(t)},comment:function(t){var r="\x3c!--".concat(t,"--\x3e"),o=n.peek();o?(o.content||(o.content=[]),o.content.push(r)):e.push(r)},text:function(t){var r=n.peek();r?(r.content||(r.content=[]),r.content.push(t)):e.push(t)}}),e},stringify:function t(e){var n="";return i(e)?s(e,(function(e){return n+=t(e)})):u(e)?n=e:(n+="<".concat(e.tag),s(e.attrs,(function(t,e){return n+=" ".concat(e,'="').concat(f(t),'"')})),n+=">",e.content&&(n+=t(e.content)),n+="")),n}},t.exports=e},2455:function(t,e){e=function(t){return t},t.exports=e},7375:function(t,e){e=function(t,e,n){return Array.prototype.indexOf.call(t,e,n)},t.exports=e},8009:function(t,e,n){var r=n(6513);e=function(t,e){t.prototype=r(e.prototype)},t.exports=e},6214:function(t,e,n){var r=n(3974);e=Array.isArray?Array.isArray:function(t){return"[object Array]"===r(t)},t.exports=e},5793:function(t,e,n){var r=n(6097),o=n(3957),i=Math.pow(2,53)-1;e=function(t){if(!t)return!1;var e=t.length;return r(e)&&e>=0&&e<=i&&!o(t)},t.exports=e},1909:function(t,e){e="object"==typeof window&&"object"==typeof document&&9===document.nodeType,t.exports=e},2517:function(t,e,n){var r=n(3974);e=function(t){return"[object Date]"===r(t)},t.exports=e},2708:function(t,e){e=function(t){return!(!t||1!==t.nodeType)},t.exports=e},3957:function(t,e,n){var r=n(3974);e=function(t){var e=r(t);return"[object Function]"===e||"[object GeneratorFunction]"===e||"[object AsyncFunction]"===e},t.exports=e},8609:function(t,e,n){var r=n(5169),o=r.getComputedStyle,i=r.document;function s(t,e){return t.righte.right||t.bottome.bottom}e=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.display,r=void 0===n||n,u=e.visibility,a=void 0!==u&&u,c=e.opacity,f=void 0!==c&&c,l=e.size,p=void 0!==l&&l,h=e.viewport,d=void 0!==h&&h,v=e.overflow,m=void 0!==v&&v,y=o(t);if(r){var g=t.tagName;if("BODY"===g||"HTML"===g||"fixed"===y.position){if("none"===y.display)return!0;for(var x=t;x=x.parentElement;){if("none"===o(x).display)return!0}}else if(null===t.offsetParent)return!0}if(a&&"hidden"===y.visibility)return!0;if(f){if("0"===y.opacity)return!0;for(var b=t;b=b.parentElement;){if("0"===o(b).opacity)return!0}}var w=t.getBoundingClientRect();if(p&&(0===w.width||0===w.height))return!0;if(d)return s(w,{top:0,left:0,right:i.documentElement.clientWidth,bottom:i.documentElement.clientHeight});if(m)for(var _=t;_=_.parentElement;){var M=o(_).overflow;if("scroll"===M||"hidden"===M)if(s(w,_.getBoundingClientRect()))return!0}return!1},t.exports=e},2884:function(t,e,n){var r=n(6097);e=function(t){return r(t)&&t%1==0},t.exports=e},7468:function(t,e,n){var r=n(3145);e=function(t,e){var n=r(e),o=n.length;if(null==t)return!o;t=Object(t);for(var i=0;i=s?"":t.substr(i,s)},t.exports=e},3915:function(t,e,n){var r=n(5693),o=n(3145),i=n(5793);e=function(t,e,n){e=r(e,n);for(var s=!i(t)&&o(t),u=(s||t).length,a=Array(u),c=0;c]*>")).exec(t);if(h){var d=t.substring(0,h.index);t=t.substring(h.index+h[0].length),d&&e.text&&e.text(d)}_("",r(o))}else{if(i(t,"\x3c!--")){var v=t.indexOf("--\x3e");v>=0&&(e.comment&&e.comment(t.substring(4,v)),t=t.substring(v+3),n=!1)}else if(i(t,"=0&&o[r]!==n;r--);else r=0;if(r>=0){for(var i=o.length-1;i>=r;i--)e.end&&e.end(o[i]);o.length=r}}_()};var u=/^\s]+))?)*)\s*(\/?)>/i,a=/^<\/([-A-Za-z0-9_]+)[^>]*>/,c=/^<([-A-Za-z0-9_]+)((?:\s+[-A-Za-z0-9_:@.]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/i,f=/([-A-Za-z0-9_:@.]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,l=o("script,style".split(","));t.exports=e},3752:function(t,e,n){var r=n(2510),o=n(769);e=r((function(t,e){return function(){var n=[];return n=(n=n.concat(e)).concat(o(arguments)),t.apply(this,n)}})),t.exports=e},5820:function(t,e,n){var r,o=n(3981),i=n(5169),s=i.performance,u=i.process;if(s&&s.now)e=function(){return s.now()};else if(u&&u.hrtime){var a=function(){var t=u.hrtime();return 1e9*t[0]+t[1]};r=a()-1e9*u.uptime(),e=function(){return(a()-r)/1e6}}else r=o(),e=function(){return o()-r};t.exports=e},6969:function(t,e,n){var r=n(5869),o=n(387),i=n(9931),s=n(365),u=n(7604);(e=r((function(t){if(t=t.replace(c,""),t=o(t),s(f,t))return t;for(var e=a.length;e--;){var n=a[e]+i(t);if(s(f,n))return n}return t}))).dash=r((function(t){var n=e(t);return(c.test(n)?"-":"")+u(n)}));var a=["O","ms","Moz","Webkit"],c=/^(O)|(ms)|(Moz)|(Webkit)|(-o-)|(-ms-)|(-moz-)|(-webkit-)/g,f=document.createElement("p").style;t.exports=e},500:function(t,e,n){var r=n(6214),o=n(6186);e=function(t){return r(t)?function(e){return o(e,t)}:(e=t,function(t){return null==t?void 0:t[e]});var e},t.exports=e},2228:function(t,e,n){var r,o,i=n(3981),s=n(1909),u=0;if(s){r=window.requestAnimationFrame,o=window.cancelAnimationFrame;for(var a=["ms","moz","webkit","o"],c=0,f=a.length;c0;)1&e&&(n+=t),e>>=1,t+=t;return n},t.exports=e},2510:function(t,e){e=function(t,e){return e=null==e?t.length-1:+e,function(){var n,r=Math.max(arguments.length-e,0),o=new Array(r);for(n=0;n=0;)for(s=!1,n=-1,r=t.charAt(o);++n=0?t.substring(0,o+1):""},t.exports=e},5693:function(t,e,n){var r=n(3957),o=n(9760),i=n(6214),s=n(6459),u=n(199),a=n(2455),c=n(500);e=function(t,e,n){return null==t?a:r(t)?s(t,e,n):o(t)&&!i(t)?u(t):c(t)},t.exports=e},6186:function(t,e,n){var r=n(8971),o=n(6949);e=function(t,e){var n;for(n=(e=o(e,t)).shift();!r(n);){if(null==(t=t[n]))return;n=e.shift()}return t},t.exports=e},4951:function(t,e){e=function(t,e,n){var r=t.length;e=null==e?0:e<0?Math.max(r+e,0):Math.min(e,r),n=null==n?r:n<0?Math.max(r+n,0):Math.min(n,r);for(var o=[];e1&&void 0!==arguments[1]?arguments[1]:12;return parseFloat(t.toPrecision(e))},t.exports=e},5865:function(t,e,n){var r=n(4534);e=function(t,e){return r(t,e,!0)},t.exports=e},769:function(t,e,n){var r=n(5793),o=n(3915),i=n(6214),s=n(1738);e=function(t){return t?i(t)?t:r(t)&&!s(t)?o(t):[t]:[]},t.exports=e},6030:function(t,e,n){var r=n(6097),o=n(9760),i=n(3957),s=n(1738);e=function(t){if(r(t))return t;if(o(t)){var e=i(t.valueOf)?t.valueOf():t;t=o(e)?e+"":e}return s(t)?+t:0===t?t:+t},t.exports=e},2561:function(t,e){e=function(t){return null==t?"":t.toString()},t.exports=e},9405:function(t,e,n){var r=n(5333),o=n(9651);e=function(t,e){return null==e&&t.trim?t.trim():r(o(t,e),e)},t.exports=e},438:function(t,e,n){var r=n(2571);function o(t,e){return t===e}e=function(t,e){return e=e||o,r(t,(function(t,n,r){for(var o=r.length;++n