app.5ee35f39.js 12 KB

12
  1. (function(){"use strict";var __webpack_modules__={8271:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{S:function(){return Formula}});var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(7658),core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);class Formula{constructor(e){this.formula="",this.watchers=[],this.ast=[],this.formula=e,this.compile()}compile(){const e=this.formula.split(/([\+\-\*\/\(\)])/);this.ast=e.filter((e=>""!==e)),this.ast.forEach((e=>{this.isSymbol(e)||this.isStatic(e)||this.watchers.push(e.split(/[\.\[]/)[0])}))}isSymbol(e){return/^[\+\-\*\/\(\)]{1}$/g.test(e)}isStatic(e){return/[\"\']/.test(e)||/^\d+$/.test(e)}shouldUpdate(e){return this.watchers.includes(e)}result(_context){const ast=this.ast.map((e=>this.isSymbol(e)||this.isStatic(e)?e:e.replace(/(^[\.\[]*)/,"_context.$1")));return eval(ast.join(""))}destroy(){this.formula="",this.watchers=[],this.ast=[]}}},8822:function(e,t,r){r.d(t,{Si:function(){return i.S},jz:function(){return l},WQ:function(){return a}});class n{constructor(e){"session"===e?this.storage=window.sessionStorage:"local"===e&&(this.storage=window.localStorage)}setItem(e,t){return this.storage.setItem(e,JSON.stringify(t))}getItem(e){const t=this.storage.getItem(e);if(t)try{return JSON.parse(t)}catch(r){return t}return null}removeItem(e){return this.storage.removeItem(e)}getStorage(){return this.storage}get length(){return this.storage.length}clear(){return this.storage.clear()}key(e){return this.storage.key(e)}}function a(e){const t=document.documentElement,r=window.devicePixelRatio||1;function n(){let r=t.clientWidth;e.minWidth&&(r=Math.max(r,e.minWidth));const n=r/10;t.style.fontSize=n+"px"}if(n(),window.addEventListener("resize",n),window.addEventListener("pageshow",(function(e){e.persisted&&n()})),r>=2){const e=document.createElement("body"),r=document.createElement("div");r.style.border=".5px solid transparent",e.appendChild(r),t.appendChild(e),1===r.offsetHeight&&t.classList.add("hairlines"),t.removeChild(e)}}n.session=new n("session"),n.local=new n("local");var i=r(8271);r(7658);let o,s=!1;function _(e){return Array.from(e).map((e=>e[0]))}function u(){s=!0;const e=_(l.threadMap).sort(((e,t)=>t-e)),t=e[0],r=l.threadMap.get(t);r.forEach((e=>{e.samePriorityLength=r.length;let t=e.taskUnit;e.start();while(t&&!e.shouldYield&&!e.isEmpty)t=e.taskUnit=e.exec();void 0===t?e.destroy():e.pause(),e.pause()})),l.isAllEmpty()?s=!1:c(u)}function c(e){window.MessageChannel?(o||(o=new MessageChannel,o.port1.onmessage=e),o.port2.postMessage("notify")):setTimeout(e,0)}class l{static create(e,t=void 0,r){const n=new l(e,t,r);l.threads.push(n);const a=n.options.priority,i=l.threadMap.get(a);return i?i.push(n):l.threadMap.set(a,[n]),n}static isAllEmpty(){return!l.threads.find((e=>!e.isEmpty))}constructor(e,t,r){this.runner=void 0,this.taskUnit=void 0,this.options={priority:0},this.status="normal",this.samePriorityLength=0,this.startTime=0,this.runner=e,this.taskUnit=t,this.options=Object.assign(this.options,r)}start(){this.startTime=Date.now(),s||u()}pause(){this.startTime=0}exec(){return this.runner(this.taskUnit)}destroy(){l.threads.splice(l.threads.findIndex((e=>e===this)),1);const e=l.threadMap.get(this.options.priority);e.splice(e.findIndex((e=>e===this)),1),0===e.length&&l.threadMap.delete(this.options.priority),this.runner=void 0,this.options=void 0,this.taskUnit=void 0}get shouldYield(){return Date.now()>this.startTime+this.yieldInterval}get isEmpty(){return void 0===this.taskUnit}get yieldInterval(){return l.yieldInterval/this.samePriorityLength}}l.threads=[],l.threadMap=new Map,l.yieldInterval=5},8331:function(e,t,r){var n=r(9242),a=r(3396);const i={id:"app"},o={class:"wrap"},s={class:"right"};function _(e,t,r,n,_,u){const c=(0,a.up)("nav-bar"),l=(0,a.up)("left-aside"),d=(0,a.up)("router-view");return(0,a.wg)(),(0,a.iD)("div",i,[(0,a.Wm)(c),(0,a._)("div",o,[(0,a.Wm)(l,{class:"menu"}),(0,a._)("div",s,[(0,a.Wm)(d)])])])}const u=e=>((0,a.dD)("data-v-34642d2a"),e=e(),(0,a.Cn)(),e),c={class:"nav-bar"},l=u((()=>(0,a._)("div",{class:"logo"},[(0,a._)("h1",null,"Ludash")],-1))),d={class:"menu"};function p(e,t){const r=(0,a.up)("RouterLink");return(0,a.wg)(),(0,a.iD)("div",c,[l,(0,a._)("div",d,[(0,a.Wm)(r,{to:"/sdk"},{default:(0,a.w5)((()=>[(0,a.Uk)("SDK")])),_:1}),(0,a.Wm)(r,{to:"/install"},{default:(0,a.w5)((()=>[(0,a.Uk)("安装")])),_:1})])])}var h=r(89);const m={},f=(0,h.Z)(m,[["render",p],["__scopeId","data-v-34642d2a"]]);var b=f,w=r(7139);const k={class:"left-aside"};function v(e,t,r,n,i,o){const s=(0,a.up)("RouterLink");return(0,a.wg)(),(0,a.iD)("ul",k,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(n.subRoutes,(e=>((0,a.wg)(),(0,a.iD)("li",{key:e.name},[(0,a.Wm)(s,{to:e.name},{default:(0,a.w5)((()=>[(0,a.Uk)((0,w.zw)(e.name),1)])),_:2},1032,["to"])])))),128))])}var g=r(2483),y={name:"LeftAside",setup(){const e=(0,g.yj)(),t=(0,a.Fl)((()=>{const t=e.matched[e.matched.length-2]||e.matched[0];return e.matched,t?t.children.filter((e=>!["","/:pathMatch(.*)"].includes(e.path))):[]}));return{subRoutes:t}}};const q=(0,h.Z)(y,[["render",v],["__scopeId","data-v-0a577028"]]);var E=q,x={components:{NavBar:b,LeftAside:E},setup(){}};const S=(0,h.Z)(x,[["render",_],["__scopeId","data-v-ae22fa96"]]);var P=S;const C=[{path:"/",name:"home",redirect:{name:"sdk"}},{path:"/install",name:"install",component:(0,a.aZ)({name:"DynamicComponent",render(){return(0,a.Wm)((0,a.up)("router-view"),null,null)}}),children:[{path:"",name:"install",component:()=>Promise.all([r.e(489),r.e(965)]).then(r.bind(r,3199))}]},{path:"/sdk",name:"sdk",component:(0,a.aZ)({name:"DynamicComponent",render(){return(0,a.Wm)((0,a.up)("router-view"),null,null)}}),children:[{path:"queue",name:"queue",component:()=>Promise.all([r.e(489),r.e(618)]).then(r.bind(r,2021))},{path:"async",name:"async",component:()=>Promise.all([r.e(489),r.e(931)]).then(r.bind(r,4359))},{path:"storage",name:"storage",component:()=>Promise.all([r.e(489),r.e(851)]).then(r.bind(r,668))},{path:"flexible",name:"flexible",component:()=>Promise.all([r.e(489),r.e(76)]).then(r.bind(r,6469))},{path:"http",name:"http",component:()=>Promise.all([r.e(489),r.e(981)]).then(r.bind(r,9947))},{path:"formula",name:"formula",component:()=>Promise.all([r.e(489),r.e(183)]).then(r.bind(r,8061))},{path:"thread",name:"thread",component:()=>Promise.all([r.e(489),r.e(834)]).then(r.bind(r,3092))},{path:"",redirect:{name:"queue"}},{path:"/:pathMatch(.*)",redirect:{name:"queue"}}]}],M=(0,g.p7)({history:(0,g.r5)(),routes:C});var O=M,j=r(65),D=(0,j.MT)({state:{},getters:{},mutations:{},actions:{},modules:{}}),I=r(8822);(0,I.WQ)({minWidth:700}),(0,n.ri)(P).use(D).use(O).mount("#app")}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.m=__webpack_modules__,function(){var e=[];__webpack_require__.O=function(t,r,n,a){if(!r){var i=1/0;for(u=0;u<e.length;u++){r=e[u][0],n=e[u][1],a=e[u][2];for(var o=!0,s=0;s<r.length;s++)(!1&a||i>=a)&&Object.keys(__webpack_require__.O).every((function(e){return __webpack_require__.O[e](r[s])}))?r.splice(s--,1):(o=!1,a<i&&(i=a));if(o){e.splice(u--,1);var _=n();void 0!==_&&(t=_)}}return t}a=a||0;for(var u=e.length;u>0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[r,n,a]}}(),function(){__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return __webpack_require__.d(t,{a:t}),t}}(),function(){__webpack_require__.d=function(e,t){for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}}(),function(){__webpack_require__.f={},__webpack_require__.e=function(e){return Promise.all(Object.keys(__webpack_require__.f).reduce((function(t,r){return __webpack_require__.f[r](e,t),t}),[]))}}(),function(){__webpack_require__.u=function(e){return"js/"+({76:"flexible",183:"formula",618:"queue",834:"thread",851:"storage",931:"async",965:"install",981:"http"}[e]||e)+"."+{76:"50684a5c",183:"c37d7fda",489:"d4989f1f",618:"c4f2e9d0",834:"052acdfd",851:"5628a043",931:"b809d808",965:"c65971f4",981:"c91124fe"}[e]+".js"}}(),function(){__webpack_require__.miniCssF=function(e){return"css/"+{76:"flexible",183:"formula",618:"queue",834:"thread",851:"storage",931:"async",965:"install",981:"http"}[e]+"."+{76:"956728ca",183:"956728ca",618:"956728ca",834:"956728ca",851:"956728ca",931:"956728ca",965:"956728ca",981:"956728ca"}[e]+".css"}}(),function(){__webpack_require__.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){var e={},t="ludash:";__webpack_require__.l=function(r,n,a,i){if(e[r])e[r].push(n);else{var o,s;if(void 0!==a)for(var _=document.getElementsByTagName("script"),u=0;u<_.length;u++){var c=_[u];if(c.getAttribute("src")==r||c.getAttribute("data-webpack")==t+a){o=c;break}}o||(s=!0,o=document.createElement("script"),o.charset="utf-8",o.timeout=120,__webpack_require__.nc&&o.setAttribute("nonce",__webpack_require__.nc),o.setAttribute("data-webpack",t+a),o.src=r),e[r]=[n];var l=function(t,n){o.onerror=o.onload=null,clearTimeout(d);var a=e[r];if(delete e[r],o.parentNode&&o.parentNode.removeChild(o),a&&a.forEach((function(e){return e(n)})),t)return t(n)},d=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),s&&document.head.appendChild(o)}}}(),function(){__webpack_require__.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){__webpack_require__.p="/ludash/"}(),function(){if("undefined"!==typeof document){var e=function(e,t,r,n,a){var i=document.createElement("link");i.rel="stylesheet",i.type="text/css";var o=function(r){if(i.onerror=i.onload=null,"load"===r.type)n();else{var o=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.href||t,_=new Error("Loading CSS chunk "+e+" failed.\n("+s+")");_.code="CSS_CHUNK_LOAD_FAILED",_.type=o,_.request=s,i.parentNode&&i.parentNode.removeChild(i),a(_)}};return i.onerror=i.onload=o,i.href=t,r?r.parentNode.insertBefore(i,r.nextSibling):document.head.appendChild(i),i},t=function(e,t){for(var r=document.getElementsByTagName("link"),n=0;n<r.length;n++){var a=r[n],i=a.getAttribute("data-href")||a.getAttribute("href");if("stylesheet"===a.rel&&(i===e||i===t))return a}var o=document.getElementsByTagName("style");for(n=0;n<o.length;n++){a=o[n],i=a.getAttribute("data-href");if(i===e||i===t)return a}},r=function(r){return new Promise((function(n,a){var i=__webpack_require__.miniCssF(r),o=__webpack_require__.p+i;if(t(i,o))return n();e(r,o,null,n,a)}))},n={143:0};__webpack_require__.f.miniCss=function(e,t){var a={76:1,183:1,618:1,834:1,851:1,931:1,965:1,981:1};n[e]?t.push(n[e]):0!==n[e]&&a[e]&&t.push(n[e]=r(e).then((function(){n[e]=0}),(function(t){throw delete n[e],t})))}}}(),function(){var e={143:0};__webpack_require__.f.j=function(t,r){var n=__webpack_require__.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var a=new Promise((function(r,a){n=e[t]=[r,a]}));r.push(n[2]=a);var i=__webpack_require__.p+__webpack_require__.u(t),o=new Error,s=function(r){if(__webpack_require__.o(e,t)&&(n=e[t],0!==n&&(e[t]=void 0),n)){var a=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;o.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",o.name="ChunkLoadError",o.type=a,o.request=i,n[1](o)}};__webpack_require__.l(i,s,"chunk-"+t,t)}},__webpack_require__.O.j=function(t){return 0===e[t]};var t=function(t,r){var n,a,i=r[0],o=r[1],s=r[2],_=0;if(i.some((function(t){return 0!==e[t]}))){for(n in o)__webpack_require__.o(o,n)&&(__webpack_require__.m[n]=o[n]);if(s)var u=s(__webpack_require__)}for(t&&t(r);_<i.length;_++)a=i[_],__webpack_require__.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return __webpack_require__.O(u)},r=self["webpackChunkludash"]=self["webpackChunkludash"]||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}();var __webpack_exports__=__webpack_require__.O(void 0,[998],(function(){return __webpack_require__(8331)}));__webpack_exports__=__webpack_require__.O(__webpack_exports__)})();
  2. //# sourceMappingURL=app.5ee35f39.js.map