@fox-js/fox 2.1.7 → 2.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/libs/index.js +1 -1
  2. package/package.json +2 -2
package/libs/index.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.fox=t():e.fox=t()}(self,(function(){return function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:function(){return mo}}),Symbol("rk");var n,r=Symbol("crk"),o=Symbol("vd"),i=Symbol("rv"),a=Symbol("rvi"),l=Symbol("pv"),s=Symbol("pvi"),u=Symbol("valueKey");function c(e){if(n){var t={};return n.util.defineReactive(t,"value",e),t}var r={};return Reflect.defineProperty(r,"value",{get:function(){return r[u]},set:function(e){return r[u]=e}}),r}var f=Symbol("pvds"),h=Symbol("sk");function v(e,t,n,r){var o=e[f];if(o||(o=e[f]=new Map),r){var i=o.get(r);i||(i=new Map,o.set(r,i)),i.set(t,n)}else o.set(t,n)}function y(e,t,n){for(var r=e.$vnode?e.$vnode.data:{},o=r[h],i=e.$parent;i&&i._routerRoot!==i;){var a=i[f];if(a){if(o){var l=a.get(o);if(l&&l.has(t))return l.get(t)}if(a.has(t))return a.get(t)}var s=(r=i.$vnode?i.$vnode.data:{})[h];void 0!==s&&(o=s),i=i.$parent}return n}function p(e,t){if(t){var n=e[f];n&&n&&n.has(t)&&n.delete(t)}else Reflect.deleteProperty(e,f)}function d(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[l=n+1])throw new TypeError('Pattern cannot start with "?" at '+l);for(;l<e.length;)if("\\"!==e[l]){if(")"===e[l]){if(0==--o){l++;break}}else if("("===e[l]&&(o++,"?"!==e[l+1]))throw new TypeError("Capturing groups are not allowed at "+l);i+=e[l++]}else i+=e[l++]+e[l++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);t.push({type:"PATTERN",index:n,value:i}),n=l}else{for(var a="",l=n+1;l<e.length;){var s=e.charCodeAt(l);if(!(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||95===s))break;a+=e[l++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=l}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,o=void 0===r?"./":r,i="[^"+m(t.delimiter||"/#?")+"]+?",a=[],l=0,s=0,u="",c=function(e){if(s<n.length&&n[s].type===e)return n[s++].value},f=function(e){var t=c(e);if(void 0!==t)return t;var r=n[s],o=r.type,i=r.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},h=function(){for(var e,t="";e=c("CHAR")||c("ESCAPED_CHAR");)t+=e;return t};s<n.length;){var v=c("CHAR"),y=c("NAME"),p=c("PATTERN");if(y||p){var d=v||"";-1===o.indexOf(d)&&(u+=d,d=""),u&&(a.push(u),u=""),a.push({name:y||l++,prefix:d,suffix:"",pattern:p||i,modifier:c("MODIFIER")||""})}else{var g=v||c("ESCAPED_CHAR");if(g)u+=g;else if(u&&(a.push(u),u=""),c("OPEN")){d=h();var b=c("NAME")||"",w=c("PATTERN")||"",S=h();f("CLOSE"),a.push({name:b||(w?l++:""),pattern:b&&!w?i:w,prefix:d,suffix:S,modifier:c("MODIFIER")||""})}else f("END")}}return a}function g(e,t){var n=[];return function(e,t,n){void 0===n&&(n={});var r=n.decode,o=void 0===r?function(e){return e}:r;return function(n){var r=e.exec(n);if(!r)return!1;for(var i=r[0],a=r.index,l=Object.create(null),s=function(e){if(void 0===r[e])return"continue";var n=t[e-1];"*"===n.modifier||"+"===n.modifier?l[n.name]=r[e].split(n.prefix+n.suffix).map((function(e){return o(e,n)})):l[n.name]=o(r[e],n)},u=1;u<r.length;u++)s(u);return{path:i,index:a,params:l}}}(w(e,n,t),n,t)}function m(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function b(e){return e&&e.sensitive?"":"i"}function w(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,o=n.exec(e.source);o;)t.push({name:o[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),o=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var r=e.map((function(e){return w(e,t,n).source}));return new RegExp("(?:"+r.join("|")+")",b(n))}(e,t,n):function(e,t,n){return function(e,t,n){void 0===n&&(n={});for(var r=n.strict,o=void 0!==r&&r,i=n.start,a=void 0===i||i,l=n.end,s=void 0===l||l,u=n.encode,c=void 0===u?function(e){return e}:u,f="["+m(n.endsWith||"")+"]|$",h="["+m(n.delimiter||"/#?")+"]",v=a?"^":"",y=0,p=e;y<p.length;y++){var d=p[y];if("string"==typeof d)v+=m(c(d));else{var g=m(c(d.prefix)),w=m(c(d.suffix));if(d.pattern)if(t&&t.push(d),g||w)if("+"===d.modifier||"*"===d.modifier){var S="*"===d.modifier?"?":"";v+="(?:"+g+"((?:"+d.pattern+")(?:"+w+g+"(?:"+d.pattern+"))*)"+w+")"+S}else v+="(?:"+g+"("+d.pattern+")"+w+")"+d.modifier;else v+="("+d.pattern+")"+d.modifier;else v+="(?:"+g+w+")"+d.modifier}}if(s)o||(v+=h+"?"),v+=n.endsWith?"(?="+f+")":"$";else{var x=e[e.length-1],k="string"==typeof x?h.indexOf(x[x.length-1])>-1:void 0===x;o||(v+="(?:"+h+"(?="+f+"))?"),k||(v+="(?="+h+"|"+f+")")}return new RegExp(v,b(n))}(d(e,n),t,n)}(e,t,n)}function S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function x(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function A(e){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var j=Array.isArray,O=function(e){return"function"==typeof e},R=Object.prototype.toString,P=function(e){return"[object Object]"===function(e){return R.call(e)}(e)},E="function"==typeof Symbol&&"symbol"===A(Symbol.toStringTag);function C(e){return e.__esModule||E&&"Module"===e[Symbol.toStringTag]}var T="undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]");function _(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o=void 0!==t[0]&&null!==t[0]?t[0]:{},i=1,a=t.length,l=!1;for("boolean"==typeof o&&(l=o,o=null!==(r=t[i])&&void 0!==r?r:{},i++),"object"!==A(o)&&(o={});i<a;i++)if(null!==t[i]&&void 0!==t[i]){var s=t[i];for(var u in s){var c=o[u],f=s[u];if(c!==f)if(!0===l&&f&&"object"===A(f)){var h=void 0;h=Array.isArray(f)?c&&Array.isArray(c)?c:[]:c&&"object"===A(c)?c:{},o[u]=_(l,h,f)}else void 0!==f&&(o[u]=f)}}return o}function q(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(n){if("object"!==A(t))return{};for(var r in"object"!==A(e)&&(e={}),t){var o=e[r],i=t[r];if(o!==i)if("object"===A(i)){if(!Array.isArray(i)&&!P(i))continue;o=q(o,i,n),e[r]=o}else{if("function"==typeof i)continue;e[r]=i}}var a,l=Object.getOwnPropertySymbols(t),s=x(l);try{for(s.s();!(a=s.n()).done;){var u=a.value,c=e[u],f=t[u];if(c!==f)if("object"===A(f)){if(!Array.isArray(f)&&!P(f))continue;c=q(c,f,n),e[u]=c}else{if("function"==typeof f)continue;e[u]=f}}}catch(e){s.e(e)}finally{s.f()}}else _(!0,e,t);return e}var M,N,I,K=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,n=[{key:"get",value:function(){var t=++e.seed;return t>=Number.MAX_VALUE&&(e.seed=0),t}}],null&&S(t.prototype,null),n&&S(t,n),e}();M=K,N="seed",I=(new Date).getTime(),N in M?Object.defineProperty(M,N,{value:I,enumerable:!0,configurable:!0,writable:!0}):M.seed=I;var F=T?Promise.resolve():null;function D(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];null!==F?n&&n.length>0?F.then((function(){e(n)})):F.then(e):n&&n.length>0?setTimeout((function(){e(n)})):setTimeout(e)}function $(e){return null!=e&&("boolean"==typeof e?e:"string"==typeof e?"true"===e.toLocaleLowerCase():Boolean(e))}var L={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Object]":"object"};function U(e){var t=Object.prototype.toString.call(e);return null==e?String(e):L[t]||"object"}function H(e){return e&&"object"===A(e)&&"setInterval"in e}function B(e){var t=!!e&&"length"in e&&e.length,n=U(e);return"function"!==n&&!H(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function W(e,t){for(var n=+t.length,r=0,o=e.length;r<n;r++)e[o++]=t[r];return e.length=o,e}function J(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=t;return null!=e&&(B(Object(e))?W(n,"string"==typeof e?[e]:e):n.push(e)),n}function z(e,t,n){if(B(e))Reflect.apply([].forEach,e,[t]);else for(var r in e)if(n&&e.hasOwnProperty(r)){if(!1===Reflect.apply(t,e,[e[r]]))break}else if(!1===Reflect.apply(t,e,[e[r]]))break;return e}function V(e,t){if(e==t)return!0;if(void 0===e||void 0===t)return!1;var n=U(e);if(n!==U(t))return!1;if("object"===n){var r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(var i=0;i<r.length;i++){var a=r[i];if(!V(e[a],t[a]))return!1}return!0}if("array"===n){if(e.length!==t.length)return!1;for(var l=0;l<e.length;l++)if(!V(e[l],t[l]))return!1;return!0}return!1}var G="default",X=Symbol("sync"),Y=Symbol("resolveRoute");function Q(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Reflect.apply(e,{},r)}}}function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function te(e,t,n){return t&&ee(e.prototype,t),n&&ee(e,n),e}function ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oe,ie,ae=function e(t,n,r,o){ne(this,e),re(this,"rootIndex",0),this.name=t,this.level=n,this.rootName=r,this.rootIndex=o},le=function(){function e(t,n){ne(this,e),re(this,"data",{}),this.to=t,this.from=n}return te(e,null,[{key:"from",value:function(t){var n,r=new e(t.to,t.from),o=null!==(n=t.data)&&void 0!==n?n:{};return _(!0,r.data,o),r}}]),e}(),se=function(){function e(){ne(this,e)}return te(e,[{key:"fullPath",get:function(){var e,t,n=null!==(e=this.path)&&void 0!==e?e:"/".concat(this.name);return"".concat(null!==(t=this.root)&&void 0!==t?t:G,"!").concat(n)}}],[{key:"clone",value:function(t,n){var r=new e;return q(r,t,n),r}},{key:"isSame",value:function(e,t){return!(e!==t&&(null==e||null==t||e.path&&e.path!==t.path||e.name&&e.name!==t.name||e.root!==t.root||e.index!==t.index))}},{key:"isSameForRouteModel",value:function(e,t){return!(e!==t&&(null==e||null==t||e.path&&e.path!=t.path||e.name&&e.name!=t.name))}},{key:"from",value:function(t){var n=new e;if(null==t)return n;var r=n;for(var o in t){var i=t[o];r[o]=i}var a=Object.getOwnPropertySymbols(t);if(Array.isArray(a)&&a.length>0){var l,s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Z(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(a);try{for(s.s();!(l=s.n()).done;){var u=l.value;r[u]=t[u]}}catch(e){s.e(e)}finally{s.f()}}return n}}]),e}(),ue=function(){function e(t,n,r,o){ne(this,e),this.id=K.get(),this.name=t,this.src=n,"function"!=typeof n&&(this.component=n),this.props=r,this.meta=o}return te(e,[{key:"isResolved",get:function(){return void 0!==this.component}},{key:"resolve",value:function(){return t=(e=this).src,new Promise((function(n,r){var o,i=Q((function(t){C(t)&&(t=t.default),e.component=t,n()})),a=Q((function(e){var t="failed to resolve async component ".concat(e);r(t)}));try{o=t(i,a)}catch(e){a(e)}if(o)if("function"==typeof o.then)o.then(i,a);else{var l=o.component;l&&"function"==typeof l.then&&l.then(i,a)}}));var e,t}}]),e}(),ce=function e(){ne(this,e),re(this,"models",[])},fe=function e(){ne(this,e),re(this,"layers",[])};function he(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ve(e,t,n){return t&&he(e.prototype,t),n&&he(e,n),e}function ye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e[e.Push=0]="Push",e[e.Replace=1]="Replace",e[e.Put=2]="Put",e[e.Append=3]="Append",e[e.Open=4]="Open"}(oe||(oe={})),function(e){e[e.Part=0]="Part",e[e.All=1]="All"}(ie||(ie={}));var de=Symbol("rootKey"),ge=Symbol("rootNodeKey"),me=Symbol("parentNodeKey"),be=Symbol("nameKey"),we=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];ye(this,e),pe(this,"active",!0),pe(this,"index",0),this.route=t,this.model=n,this.index=r,this.active=o},Se=function(){function e(t,n,r){ye(this,e),pe(this,ge,null),pe(this,me,null),this[be]=t,this[de]=n,r&&(this[ge]=r)}return ve(e,[{key:"slots",get:function(){return null==this._slots&&(this._slots=function(e){if(n){var t={};return n.util.defineReactive(t,"value",[],void 0,!0),t}var r={};return Reflect.defineProperty(r,"value",{get:function(){return r[u]},set:function(e){return r[u]=e}}),r}()),this._slots}},{key:"empty",get:function(){return null==this._slots||0==this._slots.value.length}},{key:"name",get:function(){return this[be]}}]),e}(),xe=function(){function e(t,n,r){ye(this,e),this.view=t,this.index=n,this.level=r}return ve(e,null,[{key:"include",value:function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.view===t.view&&(-1==t.index||r.index===t.index)&&r.level===t.level)return!0}return!1}}]),e}(),ke=function e(){ye(this,e),pe(this,"views",[])},Ae=function e(){ye(this,e),pe(this,"layers",[])};function je(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Pe=function e(){Re(this,e)},Ee=function(){function e(){Re(this,e),Oe(this,"forbidTime",300),Oe(this,"submitRecorder",new Pe)}var t,n;return t=e,(n=[{key:"isSameRoute",value:function(e,t){return null!=e&&null!=t&&e.name===t.name&&e.path===t.path&&e.root===t.root}},{key:"acquire",value:function(e){var t=(new Date).getTime();if(!(this.isSameRoute(e,this.submitRecorder.route)&&this.submitRecorder.time&&t-this.submitRecorder.time<=this.forbidTime))return this.submitRecorder.route=e,this.submitRecorder.time=t,t;this.submitRecorder.time=t}},{key:"release",value:function(e){this.submitRecorder.time===e&&(this.submitRecorder.route=void 0)}}])&&je(t.prototype,n),e}(),Ce=function(){return window};function Te(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on".concat(t),n):e["on".concat(t)]=n}function _e(e,t,n){e.removeEventListener?e.removeEventListener(t,n):e.detachEvent?e.detachEvent("on".concat(t),n):e["on".concat(t)]=null}var qe,Me,Ne,Ie,Ke=(Ne=Ce().location,Ie="".concat(Ne.protocol,"//").concat(Ne.host),Ie+=((Me=(qe=Ne.pathname).lastIndexOf("/"))>0&&Me<qe.length-1?qe=qe.substring(0,Me+1):0===Me&&-1!==qe.indexOf(".")?qe="/":-1===Me&&(qe=-1==qe.indexOf(".")?"/".concat(qe,"/"):"/"),0!==qe.indexOf("/")&&(qe="/".concat(qe)),qe));function Fe(e){return(Fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var De={type:"GET",async:!0,contentType:"application/x-www-form-urlencoded",dataType:"string",cache:!1,timeout:3e4,processData:!0};function $e(e){var t=new XMLHttpRequest,n={};if(_(!0,n,De),_(!0,n,e),(e=n).async)try{t.responseType=e.dataType,t.timeout=e.timeout,t.ontimeout=function(){"function"==typeof e.ontimeout?e.ontimeout(t,t.status):"function"==typeof e.error&&e.error(t,t.status)}}catch(e){console.error(e.message,e)}t.onabort=function(){"function"==typeof e.onabort?e.onabort(t,t.status):"function"==typeof e.error&&e.error(t,t.status)},t.onerror=function(){"function"==typeof e.error&&e.error(t,t.status)},t.onloadend=function(){"function"==typeof e.complete&&e.complete(t,t.status)},t.onprogress=function(){"function"==typeof e.loading&&e.loading(t)},t.onload=function(){if(0==t.status||t.status>=200&&t.status<300||304==t.status){var n,r=null!==(n=t.response)&&void 0!==n?n:"";if(0==r.length&&0==t.status)return;try{o=r,"json"===e.dataType&&"string"==typeof o&&(o=JSON.parse(o)),r=o}catch(e){console.error(e.message,e)}"function"==typeof e.success&&e.success(r,t.status,t)}else"function"==typeof e.error&&e.error(t,t.status);var o};try{var r=e.url;if(e.type&&"GET"===e.type.toUpperCase()&&(r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"text";if(null==t)return e;var r="";if(0===(n=n.trim().toLowerCase()).indexOf("application/x-www-form-urlencoded")||0===n.indexOf("application/json"))if("object"===Fe(t))for(var o in t){var i=t[o];if(Array.isArray(i))for(var a=0;a<i.length;a++){var l="".concat(encodeURIComponent(o),"=").concat(encodeURIComponent(i[a]));r.length>0&&(r+="&"),r+=l}else{var s="".concat(encodeURIComponent(o),"=").concat(encodeURIComponent(i));r.length>0&&(r+="&"),r+=s}}else r=t;else r=t;return r.length>0&&(e=-1===e.indexOf("?")?"".concat(e,"?").concat(r):"".concat(e,"&").concat(r)),e}(e.url,e.data,e.contentType)),t.open(e.type,r,e.async),e.contentType&&t.setRequestHeader("Content-Type",e.contentType),"function"==typeof e.beforeSend){var o={};_(!0,o,e),Reflect.apply(e.beforeSend,e,[t,o])}if(e.cache||t.setRequestHeader("Cache-Control","no-cache"),e.type&&"POST"===e.type.toUpperCase()){var i=e.processData?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text",n="";if(0===(t=t.trim().toLowerCase()).indexOf("application/x-www-form-urlencoded"))if("object"===Fe(e))for(var r in e){var o=e[r];if(Array.isArray(o))for(var i=0;i<o.length;i++){var a="".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(o[i]));n.length>0&&(n+="&"),n+=a}else{var l="".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(o));n.length>0&&(n+="&"),n+=l}}else n=e;else n=0===t.indexOf("text")?"object"===Fe(e)?JSON.stringify(e):e:0===t.indexOf("application/json")&&"object"===Fe(e)?JSON.stringify(e):e;return n}(e.data,e.contentType):e.data;t.send(i)}else t.send()}catch(n){"function"==typeof e.error&&e.error(t,n.message),"function"==typeof e.complete&&e.complete(t,n.message)}return t}function Le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Ue,He=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"cache",new Map)}var t,n;return t=e,(n=[{key:"get",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return new Promise((function(r,o){if(t.cache.has(e)){var i=t.cache.get(e);r(i)}else $e({url:e,type:"GET",cache:!1,data:{},timeout:n,async:!0,success:function(n,o,i){t.cache.set(e,n),r(n)},error:function(e,t){o(t)}})}))}},{key:"remove",value:function(e){this.cache.delete(e)}}])&&Le(t.prototype,n),e}());function Be(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function We(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}!function(e){e[e.Loading=0]="Loading",e[e.Loaded=1]="Loaded",e[e.Defining=2]="Defining",e[e.Defined=3]="Defined"}(Ue||(Ue={}));var Je,ze=function e(){We(this,e)},Ve=function(){function e(){We(this,e),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"register",new Map)}var t,n;return t=e,(n=[{key:"get",value:function(e){return this.register.get(e)}},{key:"put",value:function(e,t){this.register.set(e,t)}},{key:"remove",value:function(e){var t=this.register.get(e);return this.register.delete(e),t}},{key:"contains",value:function(e){return this.register.has(e)}},{key:"clear",value:function(){this.register.clear()}}])&&Be(t.prototype,n),e}();function Ge(e){return(Ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xe(e){return function(e){if(Array.isArray(e))return Ye(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ye(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ye(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ze(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.Busy="Busy",e.Free="Free",e.Reject="Reject",e.Exception="Exception",e.Finished="Finished"}(Je||(Je={}));var tt=Symbol("chainKey"),nt=Symbol("cursorKey"),rt=Symbol("$persistentModeKey"),ot=Symbol("statusKey"),it=Symbol("argsKey"),at=Symbol("exArgsKey"),lt=Symbol("successFnsKey"),st=Symbol("errorFnsKey"),ut=Symbol("sessionKey"),ct=Symbol("_go"),ft=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Qe(this,e),et(this,tt,[]),et(this,nt,0),et(this,rt,!1),et(this,ot,Je.Free),et(this,it,[]),et(this,at,[]),et(this,lt,[]),et(this,st,[]),this[ut]=t,this[rt]=n}var t,n;return t=e,(n=[{key:"session",get:function(){return this[ut]}},{key:ct,value:function(e){var t=this,n=this[ot];this[ot]=Je.Busy,this[nt]+=e,this[nt]<0&&(this[nt]=0);for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];if(this[it]=o,n===Je.Exception||n===Je.Reject){var a=function(){for(var e=[{session:t[ut]}].concat(Xe(t[at]));t[st].length>0;)try{!function(){var n=t[st].shift();"function"==typeof n&&D((function(){Reflect.apply(n,{},e)}))}()}catch(e){console.error(e.message,e)}return t[ot]=n,t[tt]=[],t[nt]=0,{v:t}}();if("object"===Ge(a))return a.v}else if(n===Je.Finished||this[nt]>=this[tt].length){var l=function(){for(var e=[{session:t[ut]}].concat(Xe(t[it])),n=function(){var n=t[lt].shift();"function"==typeof n&&D((function(){Reflect.apply(n,{},e)}))};t[lt].length>0;)n();return t[ot]=Je.Free,{v:t}}();if("object"===Ge(l))return l.v}if(this[nt]>=this[tt].length)return this[ot]=Je.Free,this;var s=this[tt][this[nt]];this[rt]||(this[tt].splice(0,this[nt]+1),this[nt]=-1);var u=this[nt]+1;try{var c=!1,f={go:function(e){if(!c){c=!0;for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];Reflect.apply(t[ct],t,[e].concat(r))}},resolve:function(){if(!c){c=!0;for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];Reflect.apply(t[ct],t,[1].concat(n))}},reject:function(){if(!c){c=!0;for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];Reflect.apply(t.reject,t,[].concat(n))}},insert:function(e){c||(t[tt].splice(u,0,e),u++)},session:this[ut]};D((function(){Reflect.apply(s,{},[f].concat(Xe(t[it])))}))}catch(e){this.throw(e)}return this}},{key:"go",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Reflect.apply(this[ct],this,[e].concat(n))}},{key:"finish",value:function(){this[ot]=Je.Finished;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this[it]=t,Reflect.apply(this[ct],this,[0])}},{key:"reject",value:function(){this[ot]=Je.Reject;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this[at]=t,Reflect.apply(this[ct],this,[0])}},{key:"throw",value:function(){this[ot]=Je.Exception;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this[at]=t,Reflect.apply(this[ct],this,[0])}},{key:"reset",value:function(){var e=this;this[ot]=Je.Busy;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];this[it]=n,this[tt]=[],this[nt]=0;for(var o={session:this[ut]},i=[o].concat(Xe(this[it])),a=function(){var t=e[lt].shift();D((function(){Reflect.apply(t,e,i)}))};this[lt].length>0;)a();return this[ot]=Je.Free,this}},{key:"post",value:function(e){return this[ot]===Je.Reject||this[ot]===Je.Exception||(Array.isArray(e)?this[tt]=[].concat(Xe(this[tt]),Xe(e)):this[tt].push(e),this[ot]===Je.Busy||Reflect.apply(this[ct],this,[0].concat(Xe(this[it])))),this}},{key:"wait",value:function(e,t){return e&&"function"==typeof e&&this[lt].push(e),t&&"function"==typeof t&&this[st].push(t),this[ot]===Je.Busy||Reflect.apply(this[ct],this,[0].concat(Xe(this[it]))),this}},{key:"exception",value:function(e){return e&&"function"==typeof e&&this[st].push(e),this[ot]===Je.Busy?this:Reflect.apply(this[ct],this,[0].concat(Xe(this[it])))}},{key:"isFinish",value:function(){return this[ot]==Je.Reject||this[ot]==Je.Free&&this[nt]>=this[tt].length}}])&&Ze(t.prototype,n),e}();function ht(e){return(ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pt(e,t,n){return t&&yt(e.prototype,t),n&&yt(e,n),e}function dt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};vt(this,e),dt(this,"moduleManager",new Ve),this.head=this.dom.head||this.dom.getElementsByTagName("head")[0]||this.dom.documentElement,this.isOldWebKit=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/(\d+).*/,"$1")<536,this.options=t,this.options.paths||(this.options.paths={}),this.options.alias||(this.options.alias={})}return pt(e,[{key:"query",get:function(){return this._query},set:function(e){this._query=e}},{key:"dom",get:function(){return window.document}},{key:"ensure",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o=[],i=t.length-1,a={};"object"===ht(t[i])&&(Object.assign(a,t[i]),i--),"function"==typeof t[i]&&(r=t[i],i--);for(var l=0;l<=i;l++)if(Array.isArray(t[l]))for(var s=t[l],u=0;u<s.length;u++)void 0!==s[u]&&o.push(this.resolvePath(s[u]));else for(var c=t[l].split(","),f=0;f<c.length;f++)void 0!==c[f]&&o.push(this.resolvePath(c[f]));for(var h=new bt(o.length,(function(e,t){if(h.isOK())try{"function"==typeof r&&Reflect.apply(r,{},t)}catch(e){console.error(e.message,e)}else try{console.error(e),"function"==typeof r&&Reflect.apply(r,{},[])}catch(e){console.error(e.message,e)}})),v=new ft,y=0;y<o.length;y++){var p=new wt(y,o[y],a,h);this.mount(v,p)}return this}},{key:"remove",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=[],i=n.length-1,a={};"object"===ht(n[i])&&(Object.assign(a,n[i]),i--);var l=null;"function"==typeof n[i]&&(l=n[i],i--);for(var s=0;s<=i;s++)if(Array.isArray(n[s]))for(var u=n[s],c=0;c<u.length;c++)void 0!==u[c]&&o.push(this.resolvePath(u[c]));else for(var f=n[s].split(","),h=0;h<f.length;h++)void 0!==f[h]&&o.push(this.resolvePath(f[h]));return o.forEach((function(t){e.unmount(t,a)})),"function"==typeof l&&Reflect.apply(l,{},[]),this}},{key:"mount",value:function(e,t){if(this.isNaturePath(t.src,"js")){var n=t.params.jsPoint;return null==n&&(n=this.head),void this.mountJS(e,t,n)}if(this.isNaturePath(t.src,"css")){var r=t.params.cssPoint;return null==r&&(r=this.head),void this.mountCSS(e,t,r)}if(this.isNaturePath(t.src,"html")){var o=t.params.htmlPoint;return null==o&&(o=this.dom.body),void this.mountHTML(e,t,o)}var i=this.getFileNamePostfix(t.src);if("js"===i||0===i.length){var a=t.params.jsPoint;return null==a&&(a=this.head),void this.mountJS(e,t,a)}if("css"===i){var l=t.params.cssPoint;return null==l&&(l=this.head),void this.mountCSS(e,t,l)}var s=t.params.htmlPoint;return null==s&&(s=this.dom.body),void this.mountHTML(e,t,s)}},{key:"mountHTML",value:function(e,t,n){var r=this;e.post((function(e){var o=t.params.timeout||r.options.timeout||3e4,i=t.src;He.get(i,o).then((function(r){n.innerHTML=r,t.progress.work(!0,t.index,r),e.resolve()}),(function(n){console.error(n),t.progress.work(!1,t.index,null),e.reject()}))}))}},{key:"mountCSS",value:function(e,t,n){var r=this;e.post((function(e){var o=t.src,i=r.dom.createElement("link"),a="onload"in i;if(r.isOldWebKit||!a){var l={timeout:r.options.time||3e3,time:0,isOldWebKit:r.isOldWebKit,success:function(){t.progress.work(!0,t.index,t.src),e.resolve()},error:function(){try{n.removeChild(i)}catch(e){console.error(e.message,e)}t.progress.work(!1,t.index,null),e.resolve()}};setTimeout((function(){mt(i,l)}),1)}else i.onload=function(){i.onload=i.onerror=null,t.progress.work(!0,t.index,t.src),e.resolve()},i.onerror=function(){try{n.removeChild(i)}catch(e){console.error(e.message,e)}i.onload=i.onerror=null,t.progress.work(!1,t.index,null),e.reject()};var s=r.dom.getElementById(o);s&&s.parentNode&&s.parentNode.removeChild(s),i.rel="stylesheet",i.type="text/css",i.id=o,i.href=o,n.appendChild(i)}))}},{key:"mountJS",value:function(e,t,n){var r=this;e.post((function(e){var o=t.src,i=r.moduleManager.get(o);if(i&&(i.status==Ue.Defined||i.status==Ue.Loaded)){if(i.exports)return t.progress.work(!0,t.index,i.exports),void e.resolve();if(r.dom.querySelector("script[src='".concat(o)))return t.progress.work(!0,t.index,i.exports),void e.resolve()}(i=new ze).id=o,i.src=o,i.status=Ue.Loading,r.moduleManager.put(o,i);var a=r.dom.createElement("script");if("onload"in a)a.onload=function(){a.onload=a.onerror=null,i.status==Ue.Loading&&(i.status=Ue.Loaded,t.progress.work(!0,t.index,o)),e.resolve()},a.onerror=function(){try{n.removeChild(a)}catch(e){console.error(e.message,e)}a.onload=a.onerror=null,t.progress.work(!1,t.index,null),e.reject()};else{var l=a;l.onreadystatechange=function(){/loaded|complete/.test(l.readyState)&&(l.onreadystatechange=null,i.status==Ue.Loading&&(i.status=Ue.Loaded,t.progress.work(!0,t.index,o)),e.resolve())}}a.defer=!0,a.src=o,Ce().define=r.createDefine(i,t),n.appendChild(a)}))}},{key:"unmount",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getFileNamePostfix(e);if("js"===n||0===n.length){var r=this.dom.querySelector('script[src="'.concat(e,'"]'));return r&&r.parentNode&&r.parentNode.removeChild(r),void this.moduleManager.remove(e)}if("css"!==n){He.remove(e);var o=t.htmlPoint;return o||(o=this.dom.body),void(o.innerHTML="")}var i=this.dom.querySelector('style[href="'.concat(e,'"]'));i&&i.parentNode&&i.parentNode.removeChild(i)}},{key:"trimEmptyElement",value:function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n].trim();0!==r.length&&t.push(r)}return t}},{key:"createDefine",value:function(e,t){var n=this,r=function(){var r,o,i;e.status=Ue.Defining;var a=arguments.length;1===a?(i=arguments.length<=0?void 0:arguments[0],r=void 0):2===a?(i=arguments.length<=1?void 0:arguments[1],Array.isArray(arguments.length<=0?void 0:arguments[0])?(o=n.trimEmptyElement(arguments.length<=0?void 0:arguments[0]),r=void 0):o=void 0):(r=arguments.length<=0?void 0:arguments[0],o=n.trimEmptyElement(arguments.length<=1?void 0:arguments[1]),i=arguments.length<=2?void 0:arguments[2]),r&&(e.id=r,n.options.alias[r]=e.src),o&&o.length>0?n.ensure(o,(function(){if("function"==typeof i){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.exports=Reflect.apply(i,e,r)}else e.exports=i;e.status=Ue.Defined,t.progress.work(!0,t.index,e.exports)})):(e.exports="function"==typeof i?Reflect.apply(i,e,[]):i,e.status=Ue.Defined,t.progress.work(!0,t.index,e.exports))};return r.amd=!0,r}},{key:"resolvePath",value:function(e){try{if(this.isNaturePath(e,"all"))return e;e=this.parserPath(e,!0);var t=this.getFileNamePostfix(e);t=t.toLowerCase();var n=this.createSearch(this.query);return-1==e.indexOf("?")?("js"!==t&&"css"!==t&&"html"!==t&&(e+=".js"),n.length>0&&(e+="?".concat(n))):n.length>0&&(e+="&".concat(n)),e}catch(t){throw console.error("resolve path[".concat(e,"] fail"),t),t}}},{key:"createSearch",value:function(e){var t="";if(e){for(var n in e){var r="".concat(e[n]);t+="".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(r),"&")}t.length>0&&(t=t.substring(0,t.length-1))}return t}},{key:"getFileNamePostfix",value:function(e){var t=e.lastIndexOf("?");-1==t&&(t=e.length);var n=e.lastIndexOf(".",t);return-1==n?"":e.substring(n+1,t)}},{key:"isNaturePath",value:function(e,t){if(null==this.options.nature)return!1;if("all"===t||"js"===t){var n=this.options.nature.js;if(void 0!==n)for(var r=0;r<n.length;r++){var o=n[r];if(0===e.indexOf(o))return!0}}if("all"===t||"css"===t){var i=this.options.nature.css;if(void 0!==i)for(var a=0;a<i.length;a++){var l=i[a];if(0===e.indexOf(l))return!0}}if("all"===t||"html"===t){var s=this.options.nature.html;if(void 0!==s)for(var u=0;u<s.length;u++){var c=s[u];if(0===e.indexOf(c))return!0}}return!1}},{key:"parserPath",value:function(e,t){if(0==e.indexOf("http://"))return e;if(0==e.indexOf("https://"))return e;if(0==e.indexOf("file:///"))return e;if(0==e.indexOf("/"))return Ke+e.slice(1);if(0==e.indexOf("./"))return Ke+e.slice(2);if(t){var n=this.options.alias[e];if(!n){var r=e.indexOf("/");if(-1==r)n=e;else{var o=e.slice(0,r),i=this.options.paths[o];n=i?i+e.slice(r):e}}return this.parserPath(n,!1)}return Ke+e}}]),e}();function mt(e,t){var n=e.sheet,r=!1;if(t.isOldWebKit)n&&(r=!0);else if(n)try{n.cssRules&&(r=!0)}catch(e){"NS_ERROR_DOM_SECURITY_ERR"===e.name&&(r=!0)}setTimeout((function(){t.time+=20,r?t.success():t.time>t.timeout?t.error():mt(e,t)}),20)}var bt=function(){function e(t,n){vt(this,e),this.size=t,this.callback=n,this.status=!0,this.values=[],this.lastIndex=-1}return pt(e,[{key:"work",value:function(e,t,n){if(this.status=e,!0===this.status&&(this.lastIndex!==t&&this.size--,this.lastIndex=t,this.values.push(n)),0===this.size||!1===this.status)try{Reflect.apply(this.callback,this,[this.status,this.values])}catch(e){console.error(e.message,e)}}},{key:"isOK",value:function(){return this.status}}]),e}(),wt=function e(t,n,r,o){vt(this,e),this.index=t,this.src=n,this.params=r,this.progress=o},St=Symbol("_notifyChange"),xt=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.currentRoute=t,this.routes=n};function kt(e){return(kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function At(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ot(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Rt=Symbol("ignoreHistoryChangeOnceKey"),Pt=Symbol("_navigateFirstRoute"),Et=Symbol("_getRouteMark"),Ct=Symbol("_getUrlSearch"),Tt=Symbol("_generateLocation"),_t=Symbol("_setRouteMarkRecorder"),qt="Symbol(_fox_restore_point)";function Mt(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Reflect.apply(e,null,[].concat(n))}return e}var Nt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"hash",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],l=arguments.length>6?arguments[6]:void 0;At(this,e),Ot(this,"firstNavigate",!0),Ot(this,"traceless",!1),Ot(this,Rt,!1),this.mode=t,this.base=n,this.query=r,this.firstNavigate=o,this.historyMonitor=i,this.traceless=a,this.storage=null!=l?l:Ce().sessionStorage}var t,n;return t=e,(n=[{key:"init",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=Ce();return"function"!=typeof this.historyChange&&(this.historyChange=function(){if(e[Rt])e[Rt]=!1;else if(Mt(e.historyMonitor)){var t=n.history.state;e[St](t);try{var r;if(r="string"==typeof t?JSON.parse(t):t,Array.isArray(r)&&r.length>0){var o,i=null!==(o=e[Et]())&&void 0!==o?o:"/";e[_t](i,r)}}catch(e){}}}),Te(n,"popstate",this.historyChange),this.firstNavigate&&t&&this[Pt](),Promise.resolve()}},{key:"destroy",value:function(){this.historyChange&&_e(Ce(),"popstate",this.historyChange)}},{key:Pt,value:function(){var e,t=null!==(e=this[Et]())&&void 0!==e?e:"/",n=this.storage.getItem(qt);if(n)try{var r=JSON.parse(n);if(r.mark===t)return void this[St](r.routes)}catch(e){}var o,i=t.indexOf("!");o=-1!=i?t.substring(i+1):t;var a=new se;a.path=o,a.query=this[Ct](),this[St]([a])}},{key:_t,value:function(e,t){try{var n={mark:e,routes:t},r=JSON.stringify(n);this.storage.setItem(qt,r)}catch(e){console.error(e.message,e)}}},{key:"setRestorePoint",value:function(e){var t,n=null!==(t=this[Et]())&&void 0!==t?t:"/";this[_t](n,e)}},{key:St,value:function(e){"function"==typeof this.changeHandler&&this.changeHandler(e)}},{key:Et,value:function(){var e=Ce();if("path"===this.mode){var t=e.location.pathname;return this.base&&0===t.indexOf(this.base)&&(t=t.substring(this.base.length)),t}var n=e.location.hash,r=n.indexOf("#");return-1!=r?n.substring(r+1):null}},{key:Ct,value:function(){return Ce().location.search}},{key:"listen",value:function(e){this.changeHandler=e}},{key:"go",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=Ce();this[Rt]=!t,n.history.go(e)}},{key:"push",value:function(e){var t=this[Tt](e.currentRoute);Mt(this.traceless,e.currentRoute)||Ce().history.pushState(e.routes,"",t),this[_t](e.currentRoute.fullPath,e.routes)}},{key:"replace",value:function(e){var t=this[Tt](e.currentRoute);Mt(this.traceless,e.currentRoute)||Ce().history.replaceState(e.routes,"",t),this[_t](e.currentRoute.fullPath,e.routes)}},{key:Tt,value:function(e){var t,n=Ce();if(e.query){var r="";if("object"===kt(e.query))for(var o in e.query){var i=encodeURIComponent(e.query[o]),a="".concat(encodeURIComponent(o),"=").concat(i);r.length>0&&(r+="&"),r+=a}else r=e.query;this.query?"?"!==(t="".concat(this.query,"&").concat(r)).charAt(0)&&(t="?".concat(t)):t="?".concat(r)}var l,s=n.location,u=e.fullPath;return u.startsWith(G)&&(u=u.substring(G.length+2)),l=t?"path"==this.mode?"".concat(this.base,"/").concat(u).concat(t):"".concat(s.pathname).concat(t,"#").concat(u):"path"==this.mode?"".concat(this.base,"/").concat(u):"".concat(s.pathname,"#").concat(u),"".concat(s.origin).concat(l)}}])&&jt(t.prototype,n),e}();function It(){var e,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=arguments.length>5?arguments[5]:void 0;return null!==n&&(n=Ce().location.pathname),n&&n.endsWith("/")&&(n=n.substring(0,n.length-1)),new Nt("path",null!==(e=n)&&void 0!==e?e:"",r,t,o,i,a)}function Kt(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;return new Nt("hash","",t,e,n,r,o)}function Ft(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Lt=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;Ft(this,e),$t(this,"maxSize",50),$t(this,"cursor",-1),$t(this,"queue",[]),$t(this,"historyMonitor",!1),$t(this,"traceless",!1),this.base=t,this.maxSize=n}var t,n;return t=e,(n=[{key:"init",value:function(){return Promise.resolve()}},{key:"destroy",value:function(){this.queue=[]}},{key:"listen",value:function(e){this.changeHandler=e}},{key:St,value:function(e){"function"==typeof this.changeHandler&&this.changeHandler(e)}},{key:"go",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(0!=this.queue.length&&!(this.cursor<=0||this.cursor>=this.queue.length-1)){var n=this.cursor+e;if(n<0?n=0:n>this.queue.length-1&&(n=this.queue.length-1),n!=this.cursor&&(this.cursor=n,t)){var r=this.queue[n];this[St](r.routes)}}}},{key:"push",value:function(e){this.queue.length>=this.maxSize&&this.queue.splice(0,1),this.queue.push(e),this.cursor=this.queue.length-1}},{key:"replace",value:function(e){var t=this.queue.length-this.cursor;this.queue.splice(this.cursor,t),this.queue[this.cursor]=e}},{key:"setRestorePoint",value:function(e){}}])&&Dt(t.prototype,n),e}();function Ut(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return new Lt(e,t)}var Ht="undefined"!=typeof window;function Bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bt(Object(n),!0).forEach((function(t){Yt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Jt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Vt(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function zt(e){return function(e){if(Array.isArray(e))return Gt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Vt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vt(e,t){if(e){if("string"==typeof e)return Gt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gt(e,t):void 0}}function Gt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qt(e){return(Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Zt=Symbol("_constructRouteModel"),en=Symbol("_findRouteModel"),tn=Symbol("_findRootView"),nn=Symbol("_getFirstView"),rn=Symbol("_removeView"),on=Symbol("_buildPage"),an=Symbol("_resolveComponent"),ln=Symbol("_update"),sn=Symbol("_merge"),un=Symbol("_handleHistoryChange"),cn=Symbol("_handleRouteUpdated"),fn=Symbol("routeUpdatedCallback"),hn=Symbol("currentRoutes"),vn=Symbol("current"),yn=Symbol("_addRouteRecorder"),pn=Symbol("_removeRouteRecorder"),dn=Symbol("_cloneRouteRecorder"),gn=Symbol("_handleError"),mn=Symbol("errorCallback"),bn=Symbol("registerKey"),wn=Symbol("notFoundKey"),Sn=Symbol("notFoundPathKey"),xn=Symbol("forestKey"),kn=Symbol("historyKey"),An=Symbol("beforeFiltersKey"),jn=Symbol("afterFiltersKey"),On=Symbol("destroyFiltersKey"),Rn=Symbol("mainDispatcherKey"),Pn=Symbol("initKey"),En=Symbol("requireKey"),Cn=Symbol("readyKey"),Tn=Symbol("readyHandlersKey"),_n=Symbol("_markReady"),qn=Symbol("_createNextFn"),Mn=Symbol("_start"),Nn=Symbol("_before"),In=Symbol("_after"),Kn=Symbol("_destroy"),Fn=Symbol("_load"),Dn=Symbol("_unload"),$n=Symbol("_loadDependency"),Ln=Symbol("resolvedModulesKey"),Un=Symbol("resolveDependencyKey"),Hn=Symbol("routerGuardKey");Symbol.for("loadViewModel");var Bn,Wn=function(){function e(t){var n,r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Yt(this,bn,new Array),Yt(this,Sn,"*"),Yt(this,Cn,!1),Yt(this,Tn,[]),Yt(this,xn,new Ae),Yt(this,hn,new Array),Yt(this,mn,null),Yt(this,fn,null),Yt(this,An,new Array),Yt(this,jn,new Array),Yt(this,On,new Array),Yt(this,Rn,new ft),Yt(this,Ln,new Map),Yt(this,Hn,new Ee),Yt(this,Pn,!1),Yt(this,vn,c(null)),Yt(this,En,null),this.options=null!=t?t:{},this.options.notFoundPath&&this.setNotFoundPath(this.options.notFoundPath);var o=this.options.routes||[];this.addRoutes(o),this.options.notFound&&this.setNotFoundRoute(this.options.notFound),t.history?this[kn]=t.history:this[kn]=Ht?Kt():Ut(),null===(n=this[kn])||void 0===n||n.listen((function(e){var t=null;if("string"==typeof e){var n=r[Y](e);n&&(t=r[un]([n]))}else t=r[un](e);t&&t.then((function(){!1===r[Cn]&&r[_n](!0)})).catch((function(){!1===r[Cn]&&r[_n](!1)}))}))}var t,n;return t=e,(n=[{key:"require",get:function(){return Ht?(this[En]||(this[En]=new gt),this[En]):null}},{key:"current",get:function(){return this[vn].value}},{key:"setHistoryMode",value:function(e){var t,n=this;if(!this[Cn]){if(this[kn])try{this[kn].destroy()}catch(e){console.error(e.message,e)}for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];this[kn]="path"===e?Reflect.apply(It,null,[].concat(o)):"memory"===e?Reflect.apply(Ut,null,[].concat(o)):Reflect.apply(Kt,null,[].concat(o)),null===(t=this[kn])||void 0===t||t.listen((function(e){var t=null;if("string"==typeof e){var r=n[Y](e);r&&(t=n[un]([r]))}else t=n[un](e);t&&t.then((function(){!1===n[Cn]&&n[_n](!0)})).catch((function(){!1===n[Cn]&&n[_n](!1)}))}))}}},{key:gn,value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"error",t=arguments.length>1?arguments[1]:void 0;if(t&&"function"==typeof t.error)try{t.error(e)}catch(e){}if(this[mn])try{this[mn](e,t)}catch(e){}console.error(e)}},{key:"init",value:function(){var e;!0!==this[Pn]&&(null===(e=this[kn])||void 0===e||e.init(!this[Cn]),this[Pn]=!0)}},{key:"isReady",value:function(){var e=this;return this[Cn]?Promise.resolve():new Promise((function(t,n){e[Tn].push([t,n])}))}},{key:_n,value:function(e){this[Cn]=!0,this[Tn].forEach((function(t){var n,r,o=(r=2,function(e){if(Array.isArray(e))return e}(n=t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(n,r)||Vt(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],a=o[1];try{e?i():a()}catch(e){console.error(e.message,e)}}))}},{key:un,value:function(e){try{if(!e){var t=zt(this[hn]).reverse();return this[Dn](t),Ht&&Ce().location.reload(),Promise.resolve()}for(var n=null,r=[],o=[],i=0;i<e.length&&i<this[hn].length&&se.isSame(e[i],this[hn][i]);i++)e[i].opsType===oe.Open&&!0===e[i].active&&e[i].active!==this[hn][i].active&&(n=e[i]);if(i<e.length&&(r=e.slice(i)),i<this[hn].length&&(o=this[hn].slice(i).reverse()),0==o.length&&0==r.length){if(null!==n)return this.restore([n])}else{if(!(o.length>0))return this.restore(r);if(this[Dn](o)){if(r.length>0)return this.restore(r);if(null!==n)return this.restore([n])}}}catch(e){this[gn](e)}return Promise.resolve()}},{key:cn,value:function(e){if(e)this[vn].value=e;else{var t=this[hn].length;this[vn].value=t>0?this[hn][t-1]:null}if("function"==typeof this[fn])try{this[fn](this[vn].value)}catch(e){}}},{key:yn,value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;t<0||t>=this[hn].length?this[hn].push(e):this[hn].splice(t,0,e)}},{key:dn,value:function(){var e,t=[],n=Jt(this[hn]);try{for(n.s();!(e=n.n()).done;){var r=e.value,o=se.clone(r,!0);t.push(o)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:pn,value:function(e){if(null!=this[hn]){for(var t=-1,n=0;n<this[hn].length;n++)if(se.isSame(this[hn][n],e)){t=n;break}if(-1!=t){var r=this[hn][t];this[hn].splice(t,1),this[Kn](r,r.session)}}}},{key:"historyMonitor",set:function(e){this[kn]&&(this[kn].historyMonitor=e)}},{key:"historyMonitor",get:function(){return!!this[kn]&&this[kn].historyMonitor}},{key:"traceless",set:function(e){this[kn]&&(this[kn].traceless=e)}},{key:"traceless",get:function(){return!!this[kn]&&this[kn].traceless}},{key:"setRestorePoint",value:function(){var e,t=this[dn]();null===(e=this[kn])||void 0===e||e.setRestorePoint(t)}},{key:"onRouteUpdated",value:function(e){this[fn]=e}},{key:"onError",value:function(e){this[mn]=e}},{key:"beforeEach",value:function(e){this[An].push(e)}},{key:"afterEach",value:function(e){this[jn].push(e)}},{key:"destroyEach",value:function(e){this[On].push(e)}},{key:"setResolveDependency",value:function(e){this[Un]=e}},{key:"addRoutes",value:function(e){var t,n=Jt(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.addRoute(r)}}catch(e){n.e(e)}finally{n.f()}}},{key:"addRoute",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(e.path!==this[Sn]){var n=this[Zt](e);if(-1==t)this[bn]=[].concat(zt(this[bn]),zt(n));else for(var r=n.length-1;r>=0;r--)this[bn].splice(t,0,n[r])}else this.setNotFoundRoute(e)}},{key:"removeRoute",value:function(e){var t=this[Y](e);if(null===t)return console.warn("route格式错误",e),!1;for(var n=0;n<this[bn].length;n++){var r=this[bn][n];if(null!=t&&t.path&&r.path===t.path)return this[bn].splice(n,1),!0;if(null!=t&&t.name&&r.name===t.name)return this[bn].splice(n,1),!0}return!1}},{key:"hasRoute",value:function(e){var t=this[Y](e);return null===t?(console.warn("route格式错误",e),!1):-1!==this[bn].findIndex((function(e){return!(null==t||!t.path||e.path!==t.path)||!(null==t||!t.name||e.name!==t.name)||void 0}))}},{key:"setNotFoundPath",value:function(e){this[Sn]=e}},{key:"setNotFoundRoute",value:function(e){var t=this[Zt](e);this[wn]=t[0]}},{key:"getRoutes",value:function(){return zt(this[bn])}},{key:Zt,value:function(e){var t,n=null!==(t=e.path)&&void 0!==t?t:"";n.length>0&&"/"!==n.charAt(0)&&(n="/".concat(n));var r=e.components||e.component&&{"":e.component};if(null==r){var o=new fe;return o.path=n,o.redirect=e.redirect,[o]}var i=[];for(var a in r){var l=r[a];0===a.length&&(a=G);var s=new ue(a,l,e.props,e.meta);i.push(s)}var u=!1,c=[];if(e.children){var f,h=Jt(e.children);try{for(h.s();!(f=h.n()).done;){var v,y=f.value,p=Jt(this[Zt](y));try{for(p.s();!(v=p.n()).done;){var d=v.value,g=new fe;g.name=d.name,d.path&&d.path.length>0?g.path="".concat(n).concat(d.path):(u=!0,g.path=n);var m=new ce;m.models=[].concat(i),g.layers=[m].concat(zt(d.layers)),c.push(g)}}catch(e){p.e(e)}finally{p.f()}}}catch(e){h.e(e)}finally{h.f()}}if(!u){var b=new ce;b.models=i;var w=new fe;w.name=e.name,w.path=n,w.layers=[b],c.splice(0,0,w)}return c}},{key:en,value:function(e){var t,n=e.route;try{var r,o=Jt(this[bn]);try{for(o.s();!(r=o.n()).done;){var i=r.value;if(n.path&&i.path){var a,l=i.match;l||(l=i.match=g(i.path));var s=l(n.path);if(!s)continue;if(i.redirect){var u=new se;_(!0,u,n),u.path=i.redirect;var c={route:u,find:void 0};return!!this[en](c)&&(e.route=c.route,e.find=c.find,!0)}if(n.params=null!==(a=n.params)&&void 0!==a?a:{},_(!0,n.params,s.params),n.query){var f=n.query;if("string"==typeof f){var h,v={},y=Jt(f.split("&"));try{for(y.s();!(h=y.n()).done;){var p=h.value.split("=");if(2===p.length){var m=decodeURIComponent(p[0].trim()),w=decodeURIComponent(p[1].trim());v[m]=w}}}catch(e){y.e(e)}finally{y.f()}_(!0,n.params,v)}else"object"===Qt(f)&&_(!0,n.params,f)}return e.find=i,!0}if(n.name===i.name){var S;n.params=null!==(S=n.params)&&void 0!==S?S:{};var x=function(e,t){void 0===t&&(t={});var n=b(t),r=t.encode,o=void 0===r?function(e){return e}:r,i=t.validate,a=void 0===i||i,l=e.map((function(e){if("object"==typeof e)return new RegExp("^(?:"+e.pattern+")$",n)}));return function(t){for(var n="",r=0;r<e.length;r++){var i=e[r];if("string"!=typeof i){var s=t?t[i.name]:void 0,u="?"===i.modifier||"*"===i.modifier,c="*"===i.modifier||"+"===i.modifier;if(Array.isArray(s)){if(!c)throw new TypeError('Expected "'+i.name+'" to not repeat, but got an array');if(0===s.length){if(u)continue;throw new TypeError('Expected "'+i.name+'" to not be empty')}for(var f=0;f<s.length;f++){var h=o(s[f],i);if(a&&!l[r].test(h))throw new TypeError('Expected all "'+i.name+'" to match "'+i.pattern+'", but got "'+h+'"');n+=i.prefix+h+i.suffix}}else if("string"!=typeof s&&"number"!=typeof s){if(!u){var v=c?"an array":"a string";throw new TypeError('Expected "'+i.name+'" to be '+v)}}else{if(h=o(String(s),i),a&&!l[r].test(h))throw new TypeError('Expected "'+i.name+'" to match "'+i.pattern+'", but got "'+h+'"');n+=i.prefix+h+i.suffix}}else n+=i}return n}}(d(i.path,t=void 0),t);return n.path=x(n.params),e.find=i,!0}}}catch(e){o.e(e)}finally{o.f()}}catch(e){console.error(e.message,e),"function"==typeof n.error&&n.error(e.message)}return!1}},{key:Y,value:function(e){var t=null;if(Array.isArray(e))if(t=new se,"object"===Qt(e[0]))t=se.from(e[0]);else for(var n=0;n<e.length;n++)0===n?"/"===e[n].charAt(0)?t.path=e[n]:t.name=e[n]:1===n?t.params=e[n]:2===n?t.root=e[n]:3===n&&_(!1,t,e[n]);else"object"===Qt(e)?t=se.from(e):"string"==typeof e&&(t=new se,"/"==e.charAt(0)?t.path=e:t.name=e);if(t){var r,o,i;if(t.path){var a=t.path.indexOf("?");-1!==a&&a<t.path.length-1&&(t.query=t.path.substring(a+1),t.path=t.path.substring(0,a))}t.root=null!==(r=t.root)&&void 0!==r?r:G,t.opsType=null!==(o=null!==(i=t.opsType)&&void 0!==i?i:this.options.defaultOperationType)&&void 0!==o?o:oe.Push}return t}},{key:"push",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this[Y](t);return r?(r.opsType=r.opsType||oe.Push,this.to(r)):(this[gn]("resolve route fail",r),this)}},{key:"put",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this[Y](t);return r?(r.opsType=oe.Put,this.to(r)):(this[gn]("resolve route fail",r),this)}},{key:"replace",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this[Y](t);return r?(r.opsType=oe.Replace,this.to(r)):(this[gn]("resolve route fail",r),this)}},{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this[Y](t);return r?(r.opsType=oe.Append,this.to(r)):(this[gn]("resolve route fail",r),this)}},{key:"remove",value:function(e){var t=this;return new Promise((function(n){t[Rn].post((function(r){try{if(0===t[hn].length)return r.resolve(),void n(!1);var o,i=[];if(e){var a;if(o=e.root?e.root:null!==(a=t[hn][0].root)&&void 0!==a?a:G,e.all)for(var l=t[hn].length-1;l>0;l--){var s=t[hn][l];s.opsType===oe.Append&&s.root===o&&i.splice(0,0,s)}else if(e.until)for(var u=t[hn].length-1;u>0;u--){var c=t[hn][u];if(c.opsType===oe.Append&&c.root===o){if("/"===e.until.charAt(0)&&e.until===c.path)break;if(e.until===c.name)break;i.splice(0,0,c)}}}else{o=G;var f=t[nn](t[xn]);f&&(o=f.name);for(var h=t[hn].length-1;h>0;h--){var v=t[hn][h];if(v.opsType===oe.Append&&v.root===o){i.push(v);break}}}if(0===i.length){var y="can not find route";return console.warn(y),r.resolve(y),void n(!1)}var p=0;if(t[hn].forEach((function(e){e.opsType!==oe.Put&&p++})),t[Dn](i)){var d,g=0;t[hn].forEach((function(e){e.opsType!==oe.Put&&g++}));var m=g-p;null===(d=t[kn])||void 0===d||d.go(m,!1),r.resolve(),n(!0)}}catch(e){t[gn](e),r.resolve(),n(!1)}}))}))}},{key:"open",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this[Y](t);return r?(r.opsType=oe.Open,this.to(r)):(this[gn]("resolve route fail",r),this)}},{key:"close",value:function(e){var t=this;return this[Rn].post((function(n){try{var r=t[Y](e);if(!r)return void n.reject("resolve route fail");for(var o=[],i=0;i<t[hn].length;i++){var a=t[hn][i];if(a.root===r.root){if(r.path&&r.path===a.path){o.push(a);break}if(r.name&&r.name===a.name){o.push(a);break}}}if(0===o.length)return void n.resolve();if(t[Dn](o)){var l,s=se.clone(r,!0),u=new xt(s,t[dn]());null===(l=t[kn])||void 0===l||l.replace(u),t[cn]()}n.resolve()}catch(e){n.resolve(),t[gn](e.message)}})),this}},{key:"to",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=this[Y](n);if(!o)return this[gn]("resolve route fail",o),this;console.debug("route to",o.path,o.root);var i=this[Hn].acquire(o);return null==i?(this[gn]("route forbid",o),this):(this[Rn].post((function(t){try{var n,r=e[Mn](o);e[Nn](r),null!==(n=r.session)&&void 0!==n&&n.routeModel||!e[Un]||e[$n](r),e[Fn](r),e[In](r),r.wait((function(n,r){var a=n.session.to;try{var l,s,u=se.clone(a,!0),c=new xt(u,e[dn]());a.opsType===oe.Replace?null===(l=e[kn])||void 0===l||l.replace(c):null===(s=e[kn])||void 0===s||s.push(c)}catch(e){console.error(e.message,e)}if(e[Hn].release(i),e[cn](a),"function"==typeof o.success)try{Reflect.apply(o.success,{},[])}catch(e){console.error(e.message,e)}!1===e[Cn]&&e[_n](!0),t.resolve()}),(function(n,r){e[Hn].release(i),null!==r&&e[gn](r,o),!1===e[Cn]&&e[_n](!1),t.resolve()}))}catch(n){e[Hn].release(i),e[gn](n,o),t.resolve()}})),this)}},{key:"back",value:function(e){var t;null===(t=this[kn])||void 0===t||t.go(-e)}},{key:qn,value:function(e){var t=this;return function(n,r){if("boolean"==typeof n)n?e.resolve():e.reject(null!=r?r:null);else if(n){var o=t[Y](n);if(o){var i=e.session.to;o.success=i.success,o.error=i.error,e.session.to=o,e.session.routeModel=null,e.resolve()}else e.reject("route resolve fail")}else e.resolve()}}},{key:Mn,value:function(e){var t,n=this[hn].length>0?this[hn][0]:void 0,r=new le(e,n),o={route:e,find:null};return this[en](o),o.find&&(r.routeModel=o.find,e.matched=(t=[],o.find.layers.forEach((function(e){null!=e.models&&null!=e.models&&e.models.forEach((function(e){if(null!=e&&null!=e)if("object"===Qt(e.meta)){var n=_(!0,{},e.meta);t.push(n)}else e.meta&&t.push(e.meta)}))})),t),Array.isArray(e.matched)&&e.matched.length>0&&(e.meta=o.find.layers[0].models[0].meta)),new ft(r)}},{key:Nn,value:function(e){var t,n=this,r=Jt(this[An]);try{var o=function(){var r=t.value;e.post((function(e){var t=n[qn](e);Reflect.apply(r,{},[e.session.to,e.session.from,t,e.session])}))};for(r.s();!(t=r.n()).done;)o()}catch(e){r.e(e)}finally{r.f()}}},{key:In,value:function(e){var t=this;e.post((function(e){var n,r=Jt(t[jn]);try{for(r.s();!(n=r.n()).done;){var o=n.value;try{Reflect.apply(o,{},[e.session.to,e.session.from,e.session])}catch(e){console.error(e.message,e)}}}catch(e){r.e(e)}finally{r.f()}e.resolve()}))}},{key:Kn,value:function(e,t){var n,r=Jt(this[On]);try{for(r.s();!(n=r.n()).done;){var o=n.value;try{Reflect.apply(o,{},[e,t])}catch(e){console.error(e.message,e)}}}catch(e){r.e(e)}finally{r.f()}"function"==typeof e.destroy&&Reflect.apply(e.destroy,e,[])}},{key:$n,value:function(e){var t=this,n=e.session,r=Reflect.apply(this[Un],this,[null==n?void 0:n.to]);if(null!=r&&null!=r){Array.isArray(r)||(r=[r]);var o,i=[],a=Jt(r);try{for(a.s();!(o=a.n()).done;){var l=o.value;this[Ln].has(l)||i.push(l)}}catch(e){a.e(e)}finally{a.f()}0!==i.length&&e.post((function(e){t[En].ensure(i,(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];if(r){for(var a=0,l=r;a<l.length;a++){var s=l[a];if(s){var u=void 0;u=C(s)?s.default:s,Array.isArray(u)&&t.addRoutes(u)}}var c,f=Jt(i);try{for(f.s();!(c=f.n()).done;){var h=c.value;t[Ln].set(h,!0)}}catch(e){f.e(e)}finally{f.f()}e.resolve()}else e.reject()}))}))}}},{key:Fn,value:function(e){var t=this;e.post((function(e){var n=e.session.to,r=e.session.routeModel;if(null==r){var o={route:n,find:null};if(t[en](o))r=o.find,e.session.routeModel=r;else{if(!t[wn])return void e.reject("not find route model");r=t[wn]}}var i=le.from(e.session);t[on](n,r,i).then((function(n){t[xn],e.resolve()}),(function(t){e.reject(t)}))}))}},{key:Dn,value:function(e){if(0==e.length)return!0;var t,n=this[xn],r=[],o=Jt(e);try{for(o.s();!(t=o.n()).done;){var i=t.value,a=this[tn](n,i);null!=a&&r.push(Wt(Wt({},a),{},{route:i}))}}catch(e){o.e(e)}finally{o.f()}if(0==r.length)return this[gn]("can not find view index"),!1;var l,s=Jt(r.reverse());try{for(s.s();!(l=s.n()).done;){var u,c=l.value;this[rn](n,{x:c.x,y:c.y},[null!==(u=c.route.index)&&void 0!==u?u:0],!0)}}catch(e){s.e(e)}finally{s.f()}return!0}},{key:tn,value:function(e,t){for(var n,r=null!==(n=t.root)&&void 0!==n?n:G,o=0;o<e.layers.length;o++)for(var i=e.layers[o],a=i.views.length-1;a>=0;a--){var l=i.views[a];if(l[de]&&l[be]===r)return{x:a,y:o}}return null}},{key:nn,value:function(e){return e.layers.length>0&&e.layers[0].views.length>0?e.layers[0].views[0]:null}},{key:rn,value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!(t.y>=e.layers.length||t.x>=e.layers[t.y].views.length)){for(var o=e.layers[t.y].views[t.x],i=!1,a=[],l=!1,s=o.slots.value,u=s.length-1;u>=0;u--){var c=s[u];null!=n&&-1==n.indexOf(c.index)||(c.route&&o[de]&&(this[pn](c.route),!0===c.active&&c.route.opsType==oe.Append&&(l=!0)),a.push(new xe(o,c.index,t.y)),s.splice(u,1))}if(0==s.length)r?o.slots.value=zt(s):e.layers[t.y].views.splice(t.x,1);else{if(l){var f=s.length-1,h=s[f];h.active=!0,h.route&&(h.route.active=h.active)}o.slots.value=zt(s)}0==e.layers[t.y].views.length&&(i=!0);for(var v=t.y+1;v<e.layers.length;v++){for(var y=e.layers[v].views,p=[],d=y.length-1;(i||a.length>0)&&d>=0;d--){var g=y[d];if(g[me]&&(i||xe.include(a,g[me]))){for(var m=g.slots.value,b=m.length-1;b>=0;b--){var w=m[b];w.route&&g[de]&&this[pn](w.route),p.push(new xe(g,w.index,v)),m.splice(b,1)}e.layers[v].views.splice(d,1)}}a=p,0==e.layers[v].views.length&&(i=!0)}}}},{key:"restore",value:function(e){var t=this;if(e&&0!=this[bn].length)return new Promise((function(n,r){for(var o=function(n){var r=e[n];t[Rn].post((function(e){var n,o=t[Mn](r);t[Nn](o),null!==(n=o.session)&&void 0!==n&&n.routeModel||!t[Un]||t[$n](o),t[Fn](o),t[In](o),o.wait((function(t,n){e.resolve()}),(function(n,r){null!==r&&t[gn](r),e.resolve()}))}))},i=0;i<e.length;i++)o(i);t[Rn].post((function(e){e.resolve(),n()}))}));var n=this[xn];if(n.layers.length>0){var r=n.layers[0].views;r.length>0&&(r[0].slots.value=[])}return this[hn]=[],this[cn](),Promise.resolve()}},{key:on,value:function(e,t,n){var r,o=this,i=null!==(r=e.updateType)&&void 0!==r?r:ie.Part;return this[an](t).then((function(){o[ln](t,e,n,i)}))}},{key:an,value:function(e){for(var t=[],n=0;n<e.layers.length;n++)for(var r=e.layers[n],o=0;o<r.models.length;o++){var i=r.models[o];i.isResolved||t.push(i.resolve())}return t.length>0?Promise.all(t):Promise.resolve()}},{key:ln,value:function(e,t,n,r){var o;if(1!==e.layers[0].models.length)return Promise.reject("illegal route structure(multi root node)");var i,a,l,s=e.layers[0].models[0],u=this[xn],c=function(e){return 0==e.layers.length||0==e.layers[0].views.length}(u),f=null!==(o=t.root)&&void 0!==o?o:G;if(c||r!=ie.Part||(i=this[tn](u,t)),null==i||null==i)if(c||r===ie.All){if(0==u.layers[0].views.length){var h,v=null!==(h=t.root)&&void 0!==h?h:G;a=new Se(v,!0,null),u.layers[0].views=[a]}else a=u.layers[0].views[0];i={x:0,y:0}}else{var y=t.slot;if(!y)return Promise.reject("can not rebuild view(because not route slot)");var p,d=y.level;if(d>u.layers.length)return Promise.reject("can not insert view(override level)");if(y.rootName){var g,m=Jt(u.layers[d-1].views);try{for(m.s();!(g=m.n()).done;){var b=g.value;if(b[de]&&b.name===y.rootName){var w;p=new xe(b,null!==(w=y.rootIndex)&&void 0!==w?w:0,d-1);break}if(b[ge]&&b[ge].view.name===y.rootName&&b[ge].index===y.rootIndex){p=b[ge];break}}}catch(e){m.e(e)}finally{m.f()}}if(!p)return Promise.reject("can not insert view(not find root node ref)");a=new Se(f,!0,p),u.layers[d].views.push(a),i={x:u.layers[d].views.length-1,y:d}}else a=u.layers[i.y].views[i.x];if(l=i.y,a[de]=!0,t.opsType===oe.Append){t.index=K.get();var S=a.slots.value;if(S.length>0){var x=S[S.length-1];x.active=!1,x.route&&(x.route.active=x.active)}var k=new we(t,s,t.index,!0);a.slots.value=[].concat(zt(S),[k]);var A=l+1,j=new xe(a,t.index,l);this[sn](u,A,e,1,j)}else if(t.opsType===oe.Open){var O,R=a.slots.value,P=!1,E=Jt(R);try{for(E.s();!(O=E.n()).done;){var C=O.value;if(null!==C.route&&se.isSameForRouteModel(C.route,t)){if(1==C.active)return t.index=C.index,t.active=C.active,C.route=t,Promise.resolve();C.active=!0,P=!0,t.index=C.index,t.active=C.active,C.route=t,this[pn](C.route)}else C.active=!1;C.route&&(C.route.active=C.active)}}catch(e){E.e(e)}finally{E.f()}if(!P){t.index=K.get(),t.active=!0;var T=new we(t,s,t.index,!0);R.push(T);var _=l+1,q=new xe(a,t.index,l);this[sn](u,_,e,1,q)}a.slots.value=zt(R)}else{var M=a.slots.value;if(0==M.length){t.index=K.get(),a.slots.value=[new we(t,s,t.index)];var N=l+1,I=new xe(a,t.index,l);this[sn](u,N,e,1,I)}else{var F=M[0];if(F.model!==s){this[rn](u,i,null,!0),t.index=K.get(),a.slots.value=[new we(t,s,t.index)];var D=l+1,$=new xe(a,t.index,l);this[sn](u,D,e,1,$)}else{null!==F.route&&this[pn](F.route);for(var L=[],U=1;U<M.length;U++)L.push(M[U].index);L.length>0&&this[rn](u,i,L,!0),t.index=F.index,F.route=t;for(var H=[new xe(a,t.index,l)],B=l+1,W=1,J=new xe(a,t.index,l);H.length>0&&B<u.layers.length&&W<e.layers.length;B++,W++){for(var z=[],V=0;V<u.layers[B].views.length;V++){var X=u.layers[B].views[V];X[me]&&xe.include(H,X[me])&&z.unshift(V)}for(var Y=[],Q=0,Z=z;Q<Z.length;Q++){for(var ee=Z[Q],te=u.layers[B].views[ee],ne=e.layers[W].models,re=void 0,le=0;le<ne.length;le++)if(te.name===ne[le].name){re=ne[le];break}if(re){var ue=te.slots.value;if(0==ue.length){te.slots.value=[new we(null,re,0)];var ce=B+1,fe=W+1;this[sn](u,ce,e,fe,J)}else{var he=ue[0];if(he.model!==re){this[rn](u,{x:ee,y:B},null,!0),te.slots.value=[new we(null,re,0)];var ve=B+1,ye=W+1;this[sn](u,ve,e,ye,J)}else{te[de]&&null!==he.route&&this[pn](he.route);for(var pe=[],be=1;be<ue.length;be++)pe.push(ue[be].index);pe.length>0&&this[rn](u,{x:ee,y:B},pe,!0),Y.push(new xe(te,he.index,B))}}te[de]=!1}else this[rn](u,{x:ee,y:B},null,!1)}H=Y}this[sn](u,B,e,W,J)}}}if(a&&a[ge]){var ke,Ae=a[ge];Ae&&(t.slot=new ae(f,l,null==Ae?void 0:Ae.view.name,null!==(ke=null==Ae?void 0:Ae.index)&&void 0!==ke?ke:0))}n.to=null,n.routeModel=null,t.session=n,this[yn](t)}},{key:sn,value:function(e,t,n,r,o){for(var i=r,a=t;a<e.layers.length&&i<n.layers.length;a++,i++){var l,s=e.layers[a].views,u=Jt(n.layers[i].models);try{for(u.s();!(l=u.n()).done;){var c=l.value,f=new Se(c.name,!1,o),h=new we(null,c);f.slots.value=[h],s.push(f)}}catch(e){u.e(e)}finally{u.f()}}for(;i<n.layers.length;i++){var v=new ke;v.views=[];var y,p=Jt(n.layers[i].models);try{for(p.s();!(y=p.n()).done;){var d=y.value,g=new Se(d.name,!1,o),m=new we(null,d);g.slots.value=[m],v.views.push(g)}}catch(e){p.e(e)}finally{p.f()}e.layers.push(v)}}},{key:X,value:function(e,t,n,r,o,i){if(t<0||t>this[xn].layers.length)return null;if(t<this[xn].layers.length){var a,l=null,s=Jt(this[xn].layers[t].views);try{for(s.s();!(a=s.n()).done;){var u,c,f=a.value,h=!1;if(null!==n?(h=f.name===e&&(null===(u=f[ge])||void 0===u?void 0:u.view)===n)&&-1!==r&&(h=(null===(c=f[ge])||void 0===c?void 0:c.index)===r):h=f.name===e,h){null!==o&&(f[me]={view:o,index:i,level:t-1}),l=f;break}}}catch(e){s.e(e)}finally{s.f()}if(null!==l)return l}var v=null,y=null;null!==o&&(v=o[de]?{view:o,index:i,level:t-1}:o[ge],y={view:o,index:i,level:t-1});var p=new Se(e,!0,v);if(p[me]=y,t==this[xn].layers.length){var d=new ke;d.views=[p],this[xn].layers.push(d)}else this[xn].layers[t].views.push(p);return p}}])&&Xt(t.prototype,n),e}(),Jn="fox-router-view";function zn(e){return(zn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.showClass)&&void 0!==t?t:e.enterClass)||((r=e.transitionName)?"".concat(r,n?"-show":"-enter"):null)}function Gn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.showActiveClass)&&void 0!==t?t:e.enterActiveClass)||((r=e.transitionName)?"".concat(r,n?"-show-active":"-enter-active"):null)}function Xn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.showToClass)&&void 0!==t?t:e.enterToClass)||((r=e.transitionName)?"".concat(r,n?"-show-to":"-enter-to"):null)}function Yn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.hideClass)&&void 0!==t?t:e.leaveClass)||((r=e.transitionName)?"".concat(r,n?"-hide":"-leave"):null)}function Qn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.hideActiveClass)&&void 0!==t?t:e.leaveActiveClass)||((r=e.transitionName)?"".concat(r,n?"-hide-active":"-leave-active"):null)}function Zn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.hideToClass)&&void 0!==t?t:e.leaveToClass)||((r=e.transitionName)?"".concat(r,n?"-hide-to":"-leave-to"):null)}function er(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onBeforeShow)&&void 0!==t?t:e.onBeforeEnter}function tr(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onShow)&&void 0!==t?t:e.onEnter}function nr(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onAfterShow)&&void 0!==t?t:e.onAfterEnter}function rr(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onShowCancelled)&&void 0!==t?t:e.onEnterCancelled}function or(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onHide)&&void 0!==t?t:e.onLeave}function ir(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onAfterHide)&&void 0!==t?t:e.onAfterLeave}function ar(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onHideCancelled)&&void 0!==t?t:e.onLeaveCancelled}function lr(e){var t,n,r,o,i,a=e.duration;return"object"==zn(a)?t={enter:null!==(n=a.enter)&&void 0!==n?n:-1,leave:null!==(r=a.leave)&&void 0!==r?r:-1,show:null!==(o=a.show)&&void 0!==o?o:-1,hide:null!==(i=a.hide)&&void 0!==i?i:-1}:("string"==typeof a&&(a=0==a.length?-1:Number(a)),t={enter:a,leave:a,show:a,hide:a}),t}function sr(e,t){e.classList.contains(t)||e.classList.add(t)}function ur(e,t){e.classList.remove(t)}if(Ht){var cr=Ce();Bn=cr.requestAnimationFrame.bind(cr)}else Bn=setTimeout;function fr(e){Bn(e)}function hr(e,t){if(O(t)){null==e&&(e={});for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];Reflect.apply(t,e,r)}}function vr(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0;if(O(i)){if(void 0!==o&&o>=0)return void setTimeout((function(){Reflect.apply(i,e,[t,n,r]),O(l)&&Reflect.apply(l,e,[])}),o);var s=["animationend","transitionend"],u=function o(a){s.forEach((function(e){_e(t,e,o)})),Reflect.apply(i,e,[t,n,r]),l&&Reflect.apply(l,e,[])};s.forEach((function(e){Te(t,e,u)}))}if(O(a)){var c="animationcancel",f=function o(i){Reflect.apply(a,e,[t,n,r]),_e(t,c,o)};Te(t,c,f)}}function yr(e){return null!==e&&(e.opsType===oe.Append||e.opsType===oe.Open)}function pr(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:-1;if(t&&(n||yr(i))){var l=Vn(o,n);l&&sr(r,l);var s=Gn(o,n);s&&sr(r,s)}else{var u=er(o,n);hr(e,u,[r,i,a])}}function dr(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,s=arguments.length>8?arguments[8]:void 0;if(yr(a)||n)if(t){var u=Vn(o,n),c=Gn(o,n),f=Xn(o,n);fr(f?function(){vr(e,r,a,l,i,(function(){c&&ur(r,c),f&&ur(r,f),O(s)&&s(r)})),u&&ur(r,u),f&&sr(r,f)}:function(){u&&ur(r,u),c&&ur(r,c),O(s)&&s(r)})}else{var h=tr(o,n),v=nr(o,n),y=rr(o,n),p=function(t){!t&&O(v)?hr(e,v,[r,a,l]):O(y)&&hr(e,y,[r,a,l]),O(s)&&s(r)};O(h)?hr(e,h,[r,p,a,l]):p()}else O(s)&&s(r)}function gr(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,s=arguments.length>8?arguments[8]:void 0,u=arguments.length>9?arguments[9]:void 0;if(yr(l)||n||!n&&O(a)&&a(),t){var c=Yn(o,n),f=Qn(o,n),h=Zn(o,n);c&&sr(r,c),f&&sr(r,f),fr(h?function(){vr(e,r,l,s,i,(function(){f&&ur(r,f),h&&ur(r,h),O(u)&&u(r),!n&&O(a)&&a()})),c&&ur(r,c),h&&sr(r,h)}:function(){c&&ur(r,c),f&&ur(r,f),O(u)&&u(r),!n&&O(a)&&a()})}else{var v=or(o,n),y=ir(o,n),p=ar(o,n),d=function(t){!t&&O(y)?(hr(e,y,[r,l,s]),O(u)&&u(r),!n&&O(a)&&a()):O(p)&&(hr(e,p,[r,l,s]),O(u)&&u(r))};O(v)?hr(e,v,[r,d,l,s]):d()}}function mr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=$(t.css),i=lr(t),a={create:function(e,a){var l=br(a);pr(e,o,!1,l,t,n,r),dr(e,o,!1,l,t,i.enter,n,r)},activate:function(e,a){var l=br(a);pr(e,o,!1,l,t,n,r),dr(e,o,!1,l,t,i.enter,n,r)},remove:function(e,a){var l=br(e);gr(e,o,!1,l,t,i.leave,a,n,r)}};return a}function br(e){return e.elm}function wr(e){return(wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xr(e){return function(e){if(Array.isArray(e))return Ar(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||kr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kr(e,t){if(e){if("string"==typeof e)return Ar(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ar(e,t):void 0}}function Ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var jr=Symbol("ruvc"),Or=Symbol("cvs");function Rr(e,t,n){return"function"==typeof e?Reflect.apply(e,{},[t,n]):e}function Pr(e,t){if(e.componentOptions&&e.componentOptions.Ctor&&e.componentOptions.Ctor.extendOptions){var n=e.componentInstance||e,r=[];if(e.fnOptions&&e.fnOptions[t]){var o=e.fnOptions[t];Array.isArray(o)?r=xr(o):"function"==typeof o&&(r=[o])}if(e.componentOptions.Ctor&&e.componentOptions.Ctor.extendOptions){var i=e.componentOptions.Ctor.extendOptions[t];Array.isArray(i)?r=[].concat(xr(r),xr(i)):"function"==typeof i&&(r=[].concat(xr(r),[i]))}return function(e){r.forEach((function(e){Reflect.apply(e,n,[])}))}}return function(){}}var Er=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Sr(this,"node",void 0),Sr(this,"state",void 0),this.node=t,this.state=n},Cr={functional:!0,props:{name:{type:String,required:!1,default:"default"},passProps:{type:Object,required:!1},modelSlot:{type:[Object],required:!1},multi:{type:Boolean,default:!1},transition:{type:[Boolean,String],required:!1},css:{type:[Boolean,String],required:!1,default:!0},tag:{type:[String],required:!1,default:"div"},viewTag:{type:[String,Function],required:!1,default:"div"},viewTagProps:{type:[Object,Function],required:!1,default:function(){return{}}},viewTagAttrs:{type:[Object,Function],required:!1,default:function(){return{}}},viewClass:{type:[String,Function],required:!1},viewActiveClass:{type:[String,Function],required:!1},viewDeactiveClass:{type:[String,Function],required:!1},transitionName:{type:String,required:!1},enterClass:{type:String,required:!1},enterActiveClass:{type:String,required:!1},enterToClass:{type:String,required:!1},leaveClass:{type:String,required:!1},leaveActiveClass:{type:String,required:!1},leaveToClass:{type:String,required:!1},showClass:{type:String,required:!1},showActiveClass:{type:String,required:!1},showToClass:{type:String,required:!1},hideClass:{type:String,required:!1},hideActiveClass:{type:String,required:!1},hideToClass:{type:String,required:!1},duration:{type:[Number,Object],required:!1}},render:function(e,t){var n,u=t,c=t.parent.$createElement,f=t.parent.$router,d=t.props,g=d.name,m=d.multi,b=t.data,w=(n=t.parent)[jr]||(n[jr]={}),S=y(t.parent,o,0),x=y(t.parent,i,null),k=y(t.parent,a,-1),A=d.modelSlot;if(A){var j=g;v(t.parent,o,S+1,j),v(t.parent,a,A.index,j),v(t.parent,s,A.index,j);var R=A.route;R&&v(t.parent,r,R,j);var P,E=Sr({attrs:{}},h,j);if(A.model.props)if("object"===wr(A.model.props))Object.assign(E.attrs,A.model.props);else if(!0===A.model.props&&"object"===wr(null===(P=A.route)||void 0===P?void 0:P.params)){var C;Object.assign(E.attrs,null===(C=A.route)||void 0===C?void 0:C.params)}return c(A.model.component,E,t.children)}if(null==f)return console.error("router is not been register"),c();var T=y(t.parent,l,null),_=y(t.parent,s,0),q=f[X](g,S,x,k,T,_);if(null===q)return p(t.parent),c();if(v(t.parent,l,q),!0===q[de]&&v(t.parent,i,q),m){var M=function(){var e,n=$(null===(e=d.transition)||void 0===e||e),r=w[Or];r||(r=w[Or]=new Map);for(var o=new Map,i=[],a=q.slots.value,l=[],s=function(e){var t=a[e],s="".concat(d.name,"-").concat(t.index),f=c(Jn,{props:{name:s,modelSlot:t}}),h={},v=Rr(d.viewClass,t.route,e);"string"==typeof v&&v.length>0&&(h[v]=!0);var y=Rr(d.viewActiveClass,t.route,e),p=Rr(d.viewDeactiveClass,t.route,e),g=r.get(s);if("string"==typeof y&&y.length>0&&(h[y]=t.active),"string"==typeof p&&p.length>0&&(h[p]=!t.active),g&&t.active!==g.state){var m=g.node;if(t.active){var b=null;m&&m.children&&m.children.length>0&&(b=Pr(m.children[0],"activated")),l.unshift((function(){!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=br(t);if(null!=l)if(i){var s=$(n.css),u=lr(n);pr(e,s,!0,l,n,r,o),dr(e,s,!0,l,n,u.show,r,o,(function(e){O(a)&&a("from enter")}))}else O(a)&&a();else O(a)&&a()}(u,m,d,t.route,e,n,b)}))}else{if(m&&m.children&&m.children.length>0){var w=Pr(m.children[0],"deactivated");try{D(w)}catch(e){console.error(e)}}l.push((function(){!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=br(t);null!=l&&i?gr(e,$(n.css),!0,l,n,lr(n).hide,null,r,o,(function(e){O(a)&&a("from leave")})):O(a)&&a()}(u,m,d,t.route,e,n)}))}}var S={class:h,key:s},x=Rr(d.viewTagProps,t.route,e);null!==x&&"object"===wr(x)&&(S.props=x);var k=Rr(d.viewTagAttrs,t.route,e);null!==k&&"object"===wr(k)&&(S.attrs=k),t.route.viewTagAttrs&&"object"===wr(t.route.viewTagAttrs)&&(S.attrs?Object.assign(S.attrs,t.route.viewTagAttrs):S.attrs=t.route.viewTagAttrs);var A=Rr(d.viewTag,t.route,e),j=c(A,S,[f]);if(o.set(s,new Er(j,t.active)),n){var R=mr(u,d,t.route,e);j.data.hook=R}i.push(j)},f=0;f<a.length;f++)s(f);var h,v=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=kr(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(r.keys());try{for(v.s();!(h=v.n()).done;){var y=h.value;o.has(y)||p(t.parent,y)}}catch(e){v.e(e)}finally{v.f()}w[Or]=o,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};fr((function(){for(var n=function(n){D((function(){Reflect.apply(e[n],t,[])}))},r=0;r<e.length;r++)n(r)}))}(l,u);var g=Rr(d.tag,null,-1),m={};for(var S in b)"props"!==S&&(m[S]=b[S]);return{v:c(g,m,i)}}();if("object"===wr(M))return M.v}else{var N,I=$(null!==(N=d.transition)&&void 0!==N&&N);v(t.parent,a,-1),v(t.parent,o,S+1),v(t.parent,s,-1);var K=q.slots.value;if(K.length>0){var F=K[0],L=F.route;L&&v(t.parent,r,L);var U=Sr({},h,"");for(var H in b)"props"!==H&&(U[H]=b[H]);null!==U.attrs&&"object"===wr(U.attrs)||(U.attrs={});var B,W=F.model;if(W.props)if("object"===wr(W.props))Object.assign(U.attrs,W.props);else if(!0===W.props&&"object"===wr(null===(B=F.route)||void 0===B?void 0:B.params)){var J;Object.assign(U.attrs,null===(J=F.route)||void 0===J?void 0:J.params)}null!==d.passProps&&"object"===wr(d.passProps)&&Object.assign(U.attrs,d.passProps);var z=c(W.component,U,[]);if(I){var V=mr(u,d,F.route,-1);viewTagNode.data.hook=V}return z}}}};function Tr(e){return(Tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var _r,qr={name:"RouterLink",props:{tag:{type:[String],default:"a"},to:{type:[String,Object],required:!0},activeClass:String,exact:Boolean,exactActiveClass:String,event:{type:[String,Array],default:"click"}},render:function(e){var t=this.$router,n=this.$route,r={},o=t.options.linkActiveClass,i=t.options.linkExactActiveClass,a=null==o?"fox-router-link-active":o,l=null==i?"fox-router-link-exact-active":i,s=null==this.activeClass?a:this.activeClass,u=null==this.exactActiveClass?l:this.exactActiveClass;r[u]=function(e,t){return!!e&&("object"===Tr(t)?t.path?e.path===t.path:e.name===t.name:"/"===t.charAt(0)?e.path===t:e.name===t)}(n,this.to),r[s]=this.exact?r[u]:function(e,t){return!!e&&("object"===Tr(t)?t.path?0===e.path.indexOf(t.path):e.name===t.name:"/"===t.charAt(0)?0===e.path.indexOf(t):e.name===t)}(n,this.to);var c=t[Y](this.to),f=function(e){Mr(e)&&t.to(c)},h={click:Mr};Array.isArray(this.event)?this.event.forEach((function(e){h[e]=f})):h[this.event]=f;var v={class:r},y="#".concat(c.path);if("a"===this.tag)v.on=h,v.attrs={href:y};else{var p=Nr(this.$slots.default);if(p){p.isStatic=!1;var d=p.data=extend({},p.data);for(var g in d.on=d.on||{},d.on){var m=d.on[g];g in h&&(d.on[g]=Array.isArray(m)?m:[m])}for(var b in h)b in d.on?d.on[b].push(h[b]):d.on[b]=f;(p.data.attrs=extend({},p.data.attrs)).href=y}else v.on=h}return e(this.tag,v,this.$slots.default)}};function Mr(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||e.defaultPrevented||void 0!==e.button&&0!==e.button)){if(e.currentTarget&&e.currentTarget.getAttribute){var t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Nr(e){if(e)for(var t,n=0;n<e.length;n++){if("a"===(t=e[n]).tag)return t;if(t.children&&(t=Nr(t.children)))return t}}function Ir(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}!function(e){e[e.limitless=0]="limitless",e[e.once=1]="once"}(_r||(_r={}));var Fr=Symbol("registerKey"),Dr=function e(t,n){Kr(this,e),this.callback=t,this.policy=n},$r=function(){function e(){Kr(this,e),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,Fr,new Map)}var t,n;return t=e,(n=[{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this[Fr].get(e);r||(r=new Array,this[Fr].set(e,r));var o=!0===n?_r.once:_r.limitless,i=new Dr(t,o);return r.push(i),this}},{key:"off",value:function(e,t){if(!t)return this[Fr].delete(e),this;var n=this[Fr].get(e);if(n)for(var r=0;r<n.length;r++)if(n[r].callback===t){n.splice(r,1);break}return this}},{key:"bind",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.on(e,t,n)}},{key:"unbind",value:function(e,t){return this.off(e,t)}},{key:"once",value:function(e,t){return this.on(e,t,!0)}},{key:"all",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n.length;if(o<1)return this;var i=n[o-1];if("function"!=typeof i)return console.error("callback can not benn empty"),this;for(var a=o-1,l=new Array(a),s=[].splice.call(n,0,a),u=function(t){e.once(s[t],(function(e){l[t]=e,0==(a-=1)&&Reflect.apply(i,{},l)}))},c=0;c<s.length;c++)u(c);return this}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=this[Fr].get(e);if(!o)return this;for(var i=function(e){var t=o[e];if(t.policy==_r.once?o.splice(e,1):e++,"function"==typeof t.callback)try{D((function(){Reflect.apply(t.callback,{},n)}))}catch(e){console.error(e.message,e)}a=e},a=0;a<o.length;)i(a);return this}},{key:"trigger",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Reflect.apply(this.emit,this,[e].concat(n))}}])&&Ir(t.prototype,n),e}();function Lr(e){return(Lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ur(e,t){return(Ur=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hr(e,t){if(t&&("object"===Lr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Br(e){return(Br=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Wr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jr(e,t,n){return t&&Wr(e.prototype,t),n&&Wr(e,n),e}function zr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Gr=Symbol("idKey"),Xr=Symbol("valueKey"),Yr=Symbol("childrenKey"),Qr=Symbol("growKey"),Zr=function e(t){zr(this,e),Vr(this,Qr,!0),Vr(this,Xr,c()),Vr(this,Yr,new Map),this[Gr]=t},eo=function(){function e(){zr(this,e)}return Jr(e,[{key:"get",value:function(e,t){if("value"==t)return e[Xr].value;if("grow"===t)return e[Qr];var n=e[Yr].get(t);return n?ro(n):e[Qr]?((n=no(t))[Qr]=e[Qr],e[Yr].set(t,n),ro(n)):void 0}},{key:"set",value:function(e,t,n){return"value"==t?(e[Xr].value=n,!0):"grow"===t?(e[Qr]=$(n),!0):null==n?(e[Yr].delete(t),!0):(console.error("illegal property:".concat(t)),!1)}},{key:"deleteProperty",value:function(e,t){return"value"===t||"grow"==t?(console.error("can not delete property:".concat(String(t))),!1):(e[Yr].delete(t),!0)}}]),e}(),to="__proxy__";function no(e){var t=new Zr(e);return Reflect.set(t,to,new Proxy(t,new eo)),t}function ro(e){return Reflect.get(e,to)}var oo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ur(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Br(t);if(n){var o=Br(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Hr(this,e)});function o(){return zr(this,o),r.call(this,"__root__")}return Jr(o,[{key:"put",value:function(){var e=arguments.length;if(e<2)return console.error("参数至少包括一个(key, value)"),!1;for(var t=this,n=0;n<e-1;n++){var r=n<0||arguments.length<=n?void 0:arguments[n],o=void 0;t[Yr].has(r)?o=t[Yr].get(r):(o=no(r),t[Yr].set(r,o)),t=o}return t[Xr].value=e-1<0||arguments.length<=e-1?void 0:arguments[e-1],!0}},{key:"get",value:function(){var e=arguments.length;if(0!==e){for(var t=this,n=0;n<e;n++){var r=n<0||arguments.length<=n?void 0:arguments[n];if(!t[Yr].has(r))return;t=t[Yr].get(r)}return t[Xr].value}}},{key:"remove",value:function(){var e=arguments.length;if(0==e)return!1;for(var t=this,n=0;n<e-1;n++){var r=n<0||arguments.length<=n?void 0:arguments[n];if(!t[Yr].has(r))return!1;t=t[Yr].get(r)}var o=e-1<0||arguments.length<=e-1?void 0:arguments[e-1];return!!t[Yr].has(o)&&(t[Yr].delete(o),!0)}},{key:"contains",value:function(){var e=arguments.length;if(0==e)return!1;for(var t=this,n=0;n<e-1;n++){var r=n<0||arguments.length<=n?void 0:arguments[n];if(!t[Yr].has(r))return!1;t=t[Yr].get(r)}var o=e-1<0||arguments.length<=e-1?void 0:arguments[e-1];return t[Yr].has(o)}},{key:"clear",value:function(){this[Yr].clear()}}]),o}(Zr),io=(Symbol("treeKey"),["put","get","contains","remove","clear"]);function ao(e){return io.includes(e)}var lo=function(){function e(){zr(this,e)}return Jr(e,[{key:"get",value:function(e,t){if("value"==t)return e[Xr].value;if("grow"===t)return e[Qr];if(t===Yr)return e[Yr];if("string"==typeof t&&ao(t))return e[t];var n=String(t),r=e[Yr].get(n);return r?ro(r):e[Qr]?((r=no(n))[Qr]=e[Qr],e[Yr].set(n,r),ro(r)):void 0}},{key:"set",value:function(e,t,n){return"value"==t?(e[Xr].value=n,!0):"grow"===t?(e[Qr]=$(n),!0):!ao(t)&&(null==n?(e[Yr].delete(t),!0):(console.error("illegal property:".concat(t)),!1))}},{key:"deleteProperty",value:function(e,t){return"value"===t||"grow"==t?(console.error("can not delete property:".concat(String(t))),!1):(e[Yr].delete(t),!0)}}]),e}(),so=new Proxy(oo,{construct:function(e){return ro((t=new oo,n=new lo,r=new Proxy(t,n),o={put:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Reflect.apply(t.put,t,n)},get:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Reflect.apply(t.get,t,n)},remove:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Reflect.apply(t.remove,t,n)},contains:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Reflect.apply(t.contains,t,n)},clear:function(){return Reflect.apply(t.clear,t,[])}},Object.assign(o,r),Reflect.set(t,to,r),t));var t,n,r,o}}),uo={get each(){return z},get type(){return U},get isFunction(){return O},get isArray(){return j},get isArrayLike(){return B},get makeArray(){return J},get merge(){return W},get isWindow(){return H},get isPlainObject(){return P},get isEqual(){return V},get isESModule(){return C}};function co(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?co(Object(n),!0).forEach((function(t){ho(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):co(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ho(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Symbol("fk");var vo=new Wn({}),yo=new so,po=new $r,go=!1,mo=fo(fo({},uo),{},{get router(){return vo},get bus(){return yo},get Bus(){return so},get eventproxy(){return po},get EventProxy(){return $r},get EventChain(){return ft},get require(){return vo.require},get ajax(){return $e},get extend(){return _},get clone(){return q},install:function(e){go||(go=!0,function(e){n=e}(e),e.component(Jn,Cr),e.component("fox-router-link",qr),Object.defineProperty(e.prototype,"$fox",{get:function(){return this._routerRoot._fox}}),Object.defineProperty(e.prototype,"$router",{get:function(){return this._routerRoot._router}}),Reflect.defineProperty(e.prototype,"$route",{get:function(){return y(this,r,null)}}),Reflect.defineProperty(e.prototype,"$bus",{get:function(){return this._routerRoot._fox.bus}}),e.prototype.$fox_on=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];po.on(e,t,n)},e.prototype.$fox_off=function(e,t){po.off(e,t)},e.prototype.$fox_once=function(e,t){po.once(e,t)},e.prototype.$fox_all=function(){for(var e=po,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];Reflect.apply(e.all,e,n)},e.prototype.$fox_trigger=function(e){for(var t=po,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];Reflect.apply(t.trigger,t,[e].concat(r))},e.prototype.$fox_emit=function(e){for(var t=po,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];Reflect.apply(t.trigger,t,[e].concat(r))},e.mixin({beforeCreate:function(){this.$options.fox?(this._routerRoot=this,this._fox=this.$options.fox,this._router=this._fox.router,this._router.init()):this._routerRoot=this.$parent&&this.$parent._routerRoot||this},mounted:function(){},destroyed:function(){}}))}});return t}()}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.fox=t():e.fox=t()}(self,(function(){return function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:function(){return mo}}),Symbol("rk");var n,r=Symbol("crk"),o=Symbol("vd"),i=Symbol("rv"),a=Symbol("rvi"),l=Symbol("pv"),s=Symbol("pvi"),u=Symbol("valueKey");function c(e){if(n){var t={};return n.util.defineReactive(t,"value",e),t}var r={};return Reflect.defineProperty(r,"value",{get:function(){return r[u]},set:function(e){return r[u]=e}}),r}var f=Symbol("pvds"),h=Symbol("sk");function v(e,t,n,r){var o=e[f];if(o||(o=e[f]=new Map),r){var i=o.get(r);i||(i=new Map,o.set(r,i)),i.set(t,n)}else o.set(t,n)}function y(e,t,n){for(var r=e.$vnode?e.$vnode.data:{},o=r[h],i=e.$parent;i&&i._routerRoot!==i;){var a=i[f];if(a){if(o){var l=a.get(o);if(l&&l.has(t))return l.get(t)}if(a.has(t))return a.get(t)}var s=(r=i.$vnode?i.$vnode.data:{})[h];void 0!==s&&(o=s),i=i.$parent}return n}function p(e,t){if(t){var n=e[f];n&&n&&n.has(t)&&n.delete(t)}else Reflect.deleteProperty(e,f)}function d(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[l=n+1])throw new TypeError('Pattern cannot start with "?" at '+l);for(;l<e.length;)if("\\"!==e[l]){if(")"===e[l]){if(0==--o){l++;break}}else if("("===e[l]&&(o++,"?"!==e[l+1]))throw new TypeError("Capturing groups are not allowed at "+l);i+=e[l++]}else i+=e[l++]+e[l++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);t.push({type:"PATTERN",index:n,value:i}),n=l}else{for(var a="",l=n+1;l<e.length;){var s=e.charCodeAt(l);if(!(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||95===s))break;a+=e[l++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=l}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,o=void 0===r?"./":r,i="[^"+m(t.delimiter||"/#?")+"]+?",a=[],l=0,s=0,u="",c=function(e){if(s<n.length&&n[s].type===e)return n[s++].value},f=function(e){var t=c(e);if(void 0!==t)return t;var r=n[s],o=r.type,i=r.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},h=function(){for(var e,t="";e=c("CHAR")||c("ESCAPED_CHAR");)t+=e;return t};s<n.length;){var v=c("CHAR"),y=c("NAME"),p=c("PATTERN");if(y||p){var d=v||"";-1===o.indexOf(d)&&(u+=d,d=""),u&&(a.push(u),u=""),a.push({name:y||l++,prefix:d,suffix:"",pattern:p||i,modifier:c("MODIFIER")||""})}else{var g=v||c("ESCAPED_CHAR");if(g)u+=g;else if(u&&(a.push(u),u=""),c("OPEN")){d=h();var b=c("NAME")||"",w=c("PATTERN")||"",S=h();f("CLOSE"),a.push({name:b||(w?l++:""),pattern:b&&!w?i:w,prefix:d,suffix:S,modifier:c("MODIFIER")||""})}else f("END")}}return a}function g(e,t){var n=[];return function(e,t,n){void 0===n&&(n={});var r=n.decode,o=void 0===r?function(e){return e}:r;return function(n){var r=e.exec(n);if(!r)return!1;for(var i=r[0],a=r.index,l=Object.create(null),s=function(e){if(void 0===r[e])return"continue";var n=t[e-1];"*"===n.modifier||"+"===n.modifier?l[n.name]=r[e].split(n.prefix+n.suffix).map((function(e){return o(e,n)})):l[n.name]=o(r[e],n)},u=1;u<r.length;u++)s(u);return{path:i,index:a,params:l}}}(w(e,n,t),n,t)}function m(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function b(e){return e&&e.sensitive?"":"i"}function w(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,o=n.exec(e.source);o;)t.push({name:o[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),o=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var r=e.map((function(e){return w(e,t,n).source}));return new RegExp("(?:"+r.join("|")+")",b(n))}(e,t,n):function(e,t,n){return function(e,t,n){void 0===n&&(n={});for(var r=n.strict,o=void 0!==r&&r,i=n.start,a=void 0===i||i,l=n.end,s=void 0===l||l,u=n.encode,c=void 0===u?function(e){return e}:u,f="["+m(n.endsWith||"")+"]|$",h="["+m(n.delimiter||"/#?")+"]",v=a?"^":"",y=0,p=e;y<p.length;y++){var d=p[y];if("string"==typeof d)v+=m(c(d));else{var g=m(c(d.prefix)),w=m(c(d.suffix));if(d.pattern)if(t&&t.push(d),g||w)if("+"===d.modifier||"*"===d.modifier){var S="*"===d.modifier?"?":"";v+="(?:"+g+"((?:"+d.pattern+")(?:"+w+g+"(?:"+d.pattern+"))*)"+w+")"+S}else v+="(?:"+g+"("+d.pattern+")"+w+")"+d.modifier;else v+="("+d.pattern+")"+d.modifier;else v+="(?:"+g+w+")"+d.modifier}}if(s)o||(v+=h+"?"),v+=n.endsWith?"(?="+f+")":"$";else{var x=e[e.length-1],k="string"==typeof x?h.indexOf(x[x.length-1])>-1:void 0===x;o||(v+="(?:"+h+"(?="+f+"))?"),k||(v+="(?="+h+"|"+f+")")}return new RegExp(v,b(n))}(d(e,n),t,n)}(e,t,n)}function S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function x(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function A(e){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var j=Array.isArray,O=function(e){return"function"==typeof e},R=Object.prototype.toString,P=function(e){return"[object Object]"===function(e){return R.call(e)}(e)},E="function"==typeof Symbol&&"symbol"===A(Symbol.toStringTag);function C(e){return e.__esModule||E&&"Module"===e[Symbol.toStringTag]}var T="undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]");function _(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o=void 0!==t[0]&&null!==t[0]?t[0]:{},i=1,a=t.length,l=!1;for("boolean"==typeof o&&(l=o,o=null!==(r=t[i])&&void 0!==r?r:{},i++),"object"!==A(o)&&(o={});i<a;i++)if(null!==t[i]&&void 0!==t[i]){var s=t[i];for(var u in s){var c=o[u],f=s[u];if(c!==f)if(!0===l&&f&&"object"===A(f)){var h=void 0;h=Array.isArray(f)?c&&Array.isArray(c)?c:[]:c&&"object"===A(c)?c:{},o[u]=_(l,h,f)}else void 0!==f&&(o[u]=f)}}return o}function q(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(n){if("object"!==A(t))return{};for(var r in"object"!==A(e)&&(e={}),t){var o=e[r],i=t[r];if(o!==i)if("object"===A(i)){if(!Array.isArray(i)&&!P(i))continue;o=q(o,i,n),e[r]=o}else{if("function"==typeof i)continue;e[r]=i}}var a,l=Object.getOwnPropertySymbols(t),s=x(l);try{for(s.s();!(a=s.n()).done;){var u=a.value,c=e[u],f=t[u];if(c!==f)if("object"===A(f)){if(!Array.isArray(f)&&!P(f))continue;c=q(c,f,n),e[u]=c}else{if("function"==typeof f)continue;e[u]=f}}}catch(e){s.e(e)}finally{s.f()}}else _(!0,e,t);return e}var M,N,I,K=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,n=[{key:"get",value:function(){var t=++e.seed;return t>=Number.MAX_VALUE&&(e.seed=0),t}}],null&&S(t.prototype,null),n&&S(t,n),e}();M=K,N="seed",I=(new Date).getTime(),N in M?Object.defineProperty(M,N,{value:I,enumerable:!0,configurable:!0,writable:!0}):M.seed=I;var F=T?Promise.resolve():null;function D(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];null!==F?n&&n.length>0?F.then((function(){e(n)})):F.then(e):n&&n.length>0?setTimeout((function(){e(n)})):setTimeout(e)}function $(e){return null!=e&&("boolean"==typeof e?e:"string"==typeof e?"true"===e.toLocaleLowerCase():Boolean(e))}var L={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Object]":"object"};function U(e){var t=Object.prototype.toString.call(e);return null==e?String(e):L[t]||"object"}function H(e){return e&&"object"===A(e)&&"setInterval"in e}function B(e){var t=!!e&&"length"in e&&e.length,n=U(e);return"function"!==n&&!H(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function W(e,t){for(var n=+t.length,r=0,o=e.length;r<n;r++)e[o++]=t[r];return e.length=o,e}function J(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=t;return null!=e&&(B(Object(e))?W(n,"string"==typeof e?[e]:e):n.push(e)),n}function z(e,t,n){if(B(e))Reflect.apply([].forEach,e,[t]);else for(var r in e)if(n&&e.hasOwnProperty(r)){if(!1===Reflect.apply(t,e,[e[r]]))break}else if(!1===Reflect.apply(t,e,[e[r]]))break;return e}function V(e,t){if(e==t)return!0;if(void 0===e||void 0===t)return!1;var n=U(e);if(n!==U(t))return!1;if("object"===n){var r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(var i=0;i<r.length;i++){var a=r[i];if(!V(e[a],t[a]))return!1}return!0}if("array"===n){if(e.length!==t.length)return!1;for(var l=0;l<e.length;l++)if(!V(e[l],t[l]))return!1;return!0}return!1}var G="default",X=Symbol("sync"),Y=Symbol("resolveRoute");function Q(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Reflect.apply(e,{},r)}}}function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function te(e,t,n){return t&&ee(e.prototype,t),n&&ee(e,n),e}function ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oe,ie,ae=function e(t,n,r,o){ne(this,e),re(this,"rootIndex",0),this.name=t,this.level=n,this.rootName=r,this.rootIndex=o},le=function(){function e(t,n){ne(this,e),re(this,"data",{}),this.to=t,this.from=n}return te(e,null,[{key:"from",value:function(t){var n,r=new e(t.to,t.from),o=null!==(n=t.data)&&void 0!==n?n:{};return _(!0,r.data,o),r}}]),e}(),se=function(){function e(){ne(this,e)}return te(e,[{key:"fullPath",get:function(){var e,t,n=null!==(e=this.path)&&void 0!==e?e:"/".concat(this.name);return"".concat(null!==(t=this.root)&&void 0!==t?t:G,"!").concat(n)}}],[{key:"clone",value:function(t,n){var r=new e;return q(r,t,n),r}},{key:"isSame",value:function(e,t){return!(e!==t&&(null==e||null==t||e.path&&e.path!==t.path||e.name&&e.name!==t.name||e.root!==t.root||e.index!==t.index))}},{key:"isSameForRouteModel",value:function(e,t){return!(e!==t&&(null==e||null==t||e.path&&e.path!=t.path||e.name&&e.name!=t.name))}},{key:"from",value:function(t){var n=new e;if(null==t)return n;var r=n;for(var o in t){var i=t[o];r[o]=i}var a=Object.getOwnPropertySymbols(t);if(Array.isArray(a)&&a.length>0){var l,s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Z(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(a);try{for(s.s();!(l=s.n()).done;){var u=l.value;r[u]=t[u]}}catch(e){s.e(e)}finally{s.f()}}return n}}]),e}(),ue=function(){function e(t,n,r,o){ne(this,e),this.id=K.get(),this.name=t,this.src=n,"function"!=typeof n&&(this.component=n),this.props=r,this.meta=o}return te(e,[{key:"isResolved",get:function(){return void 0!==this.component}},{key:"resolve",value:function(){return t=(e=this).src,new Promise((function(n,r){var o,i=Q((function(t){C(t)&&(t=t.default),e.component=t,n()})),a=Q((function(e){var t="failed to resolve async component ".concat(e);r(t)}));try{o=t(i,a)}catch(e){a(e)}if(o)if("function"==typeof o.then)o.then(i,a);else{var l=o.component;l&&"function"==typeof l.then&&l.then(i,a)}}));var e,t}}]),e}(),ce=function e(){ne(this,e),re(this,"models",[])},fe=function e(){ne(this,e),re(this,"layers",[])};function he(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ve(e,t,n){return t&&he(e.prototype,t),n&&he(e,n),e}function ye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e[e.Push=0]="Push",e[e.Replace=1]="Replace",e[e.Put=2]="Put",e[e.Append=3]="Append",e[e.Open=4]="Open"}(oe||(oe={})),function(e){e[e.Part=0]="Part",e[e.All=1]="All"}(ie||(ie={}));var de=Symbol("rootKey"),ge=Symbol("rootNodeKey"),me=Symbol("parentNodeKey"),be=Symbol("nameKey"),we=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];ye(this,e),pe(this,"active",!0),pe(this,"index",0),this.route=t,this.model=n,this.index=r,this.active=o},Se=function(){function e(t,n,r){ye(this,e),pe(this,ge,null),pe(this,me,null),this[be]=t,this[de]=n,r&&(this[ge]=r)}return ve(e,[{key:"slots",get:function(){return null==this._slots&&(this._slots=function(e){if(n){var t={};return n.util.defineReactive(t,"value",[],void 0,!0),t}var r={};return Reflect.defineProperty(r,"value",{get:function(){return r[u]},set:function(e){return r[u]=e}}),r}()),this._slots}},{key:"empty",get:function(){return null==this._slots||0==this._slots.value.length}},{key:"name",get:function(){return this[be]}}]),e}(),xe=function(){function e(t,n,r){ye(this,e),this.view=t,this.index=n,this.level=r}return ve(e,null,[{key:"include",value:function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.view===t.view&&(-1==t.index||r.index===t.index)&&r.level===t.level)return!0}return!1}}]),e}(),ke=function e(){ye(this,e),pe(this,"views",[])},Ae=function e(){ye(this,e),pe(this,"layers",[])};function je(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Pe=function e(){Re(this,e)},Ee=function(){function e(){Re(this,e),Oe(this,"forbidTime",300),Oe(this,"submitRecorder",new Pe)}var t,n;return t=e,(n=[{key:"isSameRoute",value:function(e,t){return null!=e&&null!=t&&e.name===t.name&&e.path===t.path&&e.root===t.root}},{key:"acquire",value:function(e){var t=(new Date).getTime();if(!(this.isSameRoute(e,this.submitRecorder.route)&&this.submitRecorder.time&&t-this.submitRecorder.time<=this.forbidTime))return this.submitRecorder.route=e,this.submitRecorder.time=t,t;this.submitRecorder.time=t}},{key:"release",value:function(e){this.submitRecorder.time===e&&(this.submitRecorder.route=void 0)}}])&&je(t.prototype,n),e}(),Ce=function(){return window};function Te(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on".concat(t),n):e["on".concat(t)]=n}function _e(e,t,n){e.removeEventListener?e.removeEventListener(t,n):e.detachEvent?e.detachEvent("on".concat(t),n):e["on".concat(t)]=null}var qe,Me,Ne,Ie,Ke=(Ne=Ce().location,Ie="".concat(Ne.protocol,"//").concat(Ne.host),Ie+=((Me=(qe=Ne.pathname).lastIndexOf("/"))>0&&Me<qe.length-1?qe=qe.substring(0,Me+1):0===Me&&-1!==qe.indexOf(".")?qe="/":-1===Me&&(qe=-1==qe.indexOf(".")?"/".concat(qe,"/"):"/"),0!==qe.indexOf("/")&&(qe="/".concat(qe)),qe));function Fe(e){return(Fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var De={type:"GET",async:!0,contentType:"application/x-www-form-urlencoded",dataType:"string",cache:!1,timeout:3e4,processData:!0};function $e(e){var t=new XMLHttpRequest,n={};if(_(!0,n,De),_(!0,n,e),(e=n).async)try{t.responseType=e.dataType,t.timeout=e.timeout,t.ontimeout=function(){"function"==typeof e.ontimeout?e.ontimeout(t,t.status):"function"==typeof e.error&&e.error(t,t.status)}}catch(e){console.error(e.message,e)}t.onabort=function(){"function"==typeof e.onabort?e.onabort(t,t.status):"function"==typeof e.error&&e.error(t,t.status)},t.onerror=function(){"function"==typeof e.error&&e.error(t,t.status)},t.onloadend=function(){"function"==typeof e.complete&&e.complete(t,t.status)},t.onprogress=function(){"function"==typeof e.loading&&e.loading(t)},t.onload=function(){if(0==t.status||t.status>=200&&t.status<300||304==t.status){var n,r=null!==(n=t.response)&&void 0!==n?n:"";if(0==r.length&&0==t.status)return;try{o=r,"json"===e.dataType&&"string"==typeof o&&(o=JSON.parse(o)),r=o}catch(e){console.error(e.message,e)}"function"==typeof e.success&&e.success(r,t.status,t)}else"function"==typeof e.error&&e.error(t,t.status);var o};try{var r=e.url;if(e.type&&"GET"===e.type.toUpperCase()&&(r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"text";if(null==t)return e;var r="";if(0===(n=n.trim().toLowerCase()).indexOf("application/x-www-form-urlencoded")||0===n.indexOf("application/json"))if("object"===Fe(t))for(var o in t){var i=t[o];if(Array.isArray(i))for(var a=0;a<i.length;a++){var l="".concat(encodeURIComponent(o),"=").concat(encodeURIComponent(i[a]));r.length>0&&(r+="&"),r+=l}else{var s="".concat(encodeURIComponent(o),"=").concat(encodeURIComponent(i));r.length>0&&(r+="&"),r+=s}}else r=t;else r=t;return r.length>0&&(e=-1===e.indexOf("?")?"".concat(e,"?").concat(r):"".concat(e,"&").concat(r)),e}(e.url,e.data,e.contentType)),t.open(e.type,r,e.async),e.contentType&&t.setRequestHeader("Content-Type",e.contentType),"function"==typeof e.beforeSend){var o={};_(!0,o,e),Reflect.apply(e.beforeSend,e,[t,o])}if(e.cache||t.setRequestHeader("Cache-Control","no-cache"),e.type&&"POST"===e.type.toUpperCase()){var i=e.processData?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text",n="";if(0===(t=t.trim().toLowerCase()).indexOf("application/x-www-form-urlencoded"))if("object"===Fe(e))for(var r in e){var o=e[r];if(Array.isArray(o))for(var i=0;i<o.length;i++){var a="".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(o[i]));n.length>0&&(n+="&"),n+=a}else{var l="".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(o));n.length>0&&(n+="&"),n+=l}}else n=e;else n=0===t.indexOf("text")?"object"===Fe(e)?JSON.stringify(e):e:0===t.indexOf("application/json")&&"object"===Fe(e)?JSON.stringify(e):e;return n}(e.data,e.contentType):e.data;t.send(i)}else t.send()}catch(n){"function"==typeof e.error&&e.error(t,n.message),"function"==typeof e.complete&&e.complete(t,n.message)}return t}function Le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Ue,He=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"cache",new Map)}var t,n;return t=e,(n=[{key:"get",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return new Promise((function(r,o){if(t.cache.has(e)){var i=t.cache.get(e);r(i)}else $e({url:e,type:"GET",cache:!1,data:{},timeout:n,async:!0,success:function(n,o,i){t.cache.set(e,n),r(n)},error:function(e,t){o(t)}})}))}},{key:"remove",value:function(e){this.cache.delete(e)}}])&&Le(t.prototype,n),e}());function Be(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function We(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}!function(e){e[e.Loading=0]="Loading",e[e.Loaded=1]="Loaded",e[e.Defining=2]="Defining",e[e.Defined=3]="Defined"}(Ue||(Ue={}));var Je,ze=function e(){We(this,e)},Ve=function(){function e(){We(this,e),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"register",new Map)}var t,n;return t=e,(n=[{key:"get",value:function(e){return this.register.get(e)}},{key:"put",value:function(e,t){this.register.set(e,t)}},{key:"remove",value:function(e){var t=this.register.get(e);return this.register.delete(e),t}},{key:"contains",value:function(e){return this.register.has(e)}},{key:"clear",value:function(){this.register.clear()}}])&&Be(t.prototype,n),e}();function Ge(e){return(Ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xe(e){return function(e){if(Array.isArray(e))return Ye(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ye(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ye(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ze(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.Busy="Busy",e.Free="Free",e.Reject="Reject",e.Exception="Exception",e.Finished="Finished"}(Je||(Je={}));var tt=Symbol("chainKey"),nt=Symbol("cursorKey"),rt=Symbol("$persistentModeKey"),ot=Symbol("statusKey"),it=Symbol("argsKey"),at=Symbol("exArgsKey"),lt=Symbol("successFnsKey"),st=Symbol("errorFnsKey"),ut=Symbol("sessionKey"),ct=Symbol("_go"),ft=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Qe(this,e),et(this,tt,[]),et(this,nt,0),et(this,rt,!1),et(this,ot,Je.Free),et(this,it,[]),et(this,at,[]),et(this,lt,[]),et(this,st,[]),this[ut]=t,this[rt]=n}var t,n;return t=e,(n=[{key:"session",get:function(){return this[ut]}},{key:ct,value:function(e){var t=this,n=this[ot];this[ot]=Je.Busy,this[nt]+=e,this[nt]<0&&(this[nt]=0);for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];if(this[it]=o,n===Je.Exception||n===Je.Reject){var a=function(){for(var e=[{session:t[ut]}].concat(Xe(t[at]));t[st].length>0;)try{!function(){var n=t[st].shift();"function"==typeof n&&D((function(){Reflect.apply(n,{},e)}))}()}catch(e){console.error(e.message,e)}return t[ot]=n,t[tt]=[],t[nt]=0,{v:t}}();if("object"===Ge(a))return a.v}else if(n===Je.Finished||this[nt]>=this[tt].length){var l=function(){for(var e=[{session:t[ut]}].concat(Xe(t[it])),n=function(){var n=t[lt].shift();"function"==typeof n&&D((function(){Reflect.apply(n,{},e)}))};t[lt].length>0;)n();return t[ot]=Je.Free,{v:t}}();if("object"===Ge(l))return l.v}if(this[nt]>=this[tt].length)return this[ot]=Je.Free,this;var s=this[tt][this[nt]];this[rt]||(this[tt].splice(0,this[nt]+1),this[nt]=-1);var u=this[nt]+1;try{var c=!1,f={go:function(e){if(!c){c=!0;for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];Reflect.apply(t[ct],t,[e].concat(r))}},resolve:function(){if(!c){c=!0;for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];Reflect.apply(t[ct],t,[1].concat(n))}},reject:function(){if(!c){c=!0;for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];Reflect.apply(t.reject,t,[].concat(n))}},insert:function(e){c||(t[tt].splice(u,0,e),u++)},session:this[ut]};D((function(){Reflect.apply(s,{},[f].concat(Xe(t[it])))}))}catch(e){this.throw(e)}return this}},{key:"go",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Reflect.apply(this[ct],this,[e].concat(n))}},{key:"finish",value:function(){this[ot]=Je.Finished;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this[it]=t,Reflect.apply(this[ct],this,[0])}},{key:"reject",value:function(){this[ot]=Je.Reject;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this[at]=t,Reflect.apply(this[ct],this,[0])}},{key:"throw",value:function(){this[ot]=Je.Exception;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this[at]=t,Reflect.apply(this[ct],this,[0])}},{key:"reset",value:function(){var e=this;this[ot]=Je.Busy;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];this[it]=n,this[tt]=[],this[nt]=0;for(var o={session:this[ut]},i=[o].concat(Xe(this[it])),a=function(){var t=e[lt].shift();D((function(){Reflect.apply(t,e,i)}))};this[lt].length>0;)a();return this[ot]=Je.Free,this}},{key:"post",value:function(e){return this[ot]===Je.Reject||this[ot]===Je.Exception||(Array.isArray(e)?this[tt]=[].concat(Xe(this[tt]),Xe(e)):this[tt].push(e),this[ot]===Je.Busy||Reflect.apply(this[ct],this,[0].concat(Xe(this[it])))),this}},{key:"wait",value:function(e,t){return e&&"function"==typeof e&&this[lt].push(e),t&&"function"==typeof t&&this[st].push(t),this[ot]===Je.Busy||Reflect.apply(this[ct],this,[0].concat(Xe(this[it]))),this}},{key:"exception",value:function(e){return e&&"function"==typeof e&&this[st].push(e),this[ot]===Je.Busy?this:Reflect.apply(this[ct],this,[0].concat(Xe(this[it])))}},{key:"isFinish",value:function(){return this[ot]==Je.Reject||this[ot]==Je.Free&&this[nt]>=this[tt].length}}])&&Ze(t.prototype,n),e}();function ht(e){return(ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pt(e,t,n){return t&&yt(e.prototype,t),n&&yt(e,n),e}function dt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};vt(this,e),dt(this,"moduleManager",new Ve),this.head=this.dom.head||this.dom.getElementsByTagName("head")[0]||this.dom.documentElement,this.isOldWebKit=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/(\d+).*/,"$1")<536,this.options=t,this.options.paths||(this.options.paths={}),this.options.alias||(this.options.alias={})}return pt(e,[{key:"query",get:function(){return this._query},set:function(e){this._query=e}},{key:"dom",get:function(){return window.document}},{key:"ensure",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o=[],i=t.length-1,a={};"object"===ht(t[i])&&(Object.assign(a,t[i]),i--),"function"==typeof t[i]&&(r=t[i],i--);for(var l=0;l<=i;l++)if(Array.isArray(t[l]))for(var s=t[l],u=0;u<s.length;u++)void 0!==s[u]&&o.push(this.resolvePath(s[u]));else for(var c=t[l].split(","),f=0;f<c.length;f++)void 0!==c[f]&&o.push(this.resolvePath(c[f]));for(var h=new bt(o.length,(function(e,t){if(h.isOK())try{"function"==typeof r&&Reflect.apply(r,{},t)}catch(e){console.error(e.message,e)}else try{console.error(e),"function"==typeof r&&Reflect.apply(r,{},[])}catch(e){console.error(e.message,e)}})),v=new ft,y=0;y<o.length;y++){var p=new wt(y,o[y],a,h);this.mount(v,p)}return this}},{key:"remove",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=[],i=n.length-1,a={};"object"===ht(n[i])&&(Object.assign(a,n[i]),i--);var l=null;"function"==typeof n[i]&&(l=n[i],i--);for(var s=0;s<=i;s++)if(Array.isArray(n[s]))for(var u=n[s],c=0;c<u.length;c++)void 0!==u[c]&&o.push(this.resolvePath(u[c]));else for(var f=n[s].split(","),h=0;h<f.length;h++)void 0!==f[h]&&o.push(this.resolvePath(f[h]));return o.forEach((function(t){e.unmount(t,a)})),"function"==typeof l&&Reflect.apply(l,{},[]),this}},{key:"mount",value:function(e,t){if(this.isNaturePath(t.src,"js")){var n=t.params.jsPoint;return null==n&&(n=this.head),void this.mountJS(e,t,n)}if(this.isNaturePath(t.src,"css")){var r=t.params.cssPoint;return null==r&&(r=this.head),void this.mountCSS(e,t,r)}if(this.isNaturePath(t.src,"html")){var o=t.params.htmlPoint;return null==o&&(o=this.dom.body),void this.mountHTML(e,t,o)}var i=this.getFileNamePostfix(t.src);if("js"===i||0===i.length){var a=t.params.jsPoint;return null==a&&(a=this.head),void this.mountJS(e,t,a)}if("css"===i){var l=t.params.cssPoint;return null==l&&(l=this.head),void this.mountCSS(e,t,l)}var s=t.params.htmlPoint;return null==s&&(s=this.dom.body),void this.mountHTML(e,t,s)}},{key:"mountHTML",value:function(e,t,n){var r=this;e.post((function(e){var o=t.params.timeout||r.options.timeout||3e4,i=t.src;He.get(i,o).then((function(r){n.innerHTML=r,t.progress.work(!0,t.index,r),e.resolve()}),(function(n){console.error(n),t.progress.work(!1,t.index,null),e.reject()}))}))}},{key:"mountCSS",value:function(e,t,n){var r=this;e.post((function(e){var o=t.src,i=r.dom.createElement("link"),a="onload"in i;if(r.isOldWebKit||!a){var l={timeout:r.options.time||3e3,time:0,isOldWebKit:r.isOldWebKit,success:function(){t.progress.work(!0,t.index,t.src),e.resolve()},error:function(){try{n.removeChild(i)}catch(e){console.error(e.message,e)}t.progress.work(!1,t.index,null),e.resolve()}};setTimeout((function(){mt(i,l)}),1)}else i.onload=function(){i.onload=i.onerror=null,t.progress.work(!0,t.index,t.src),e.resolve()},i.onerror=function(){try{n.removeChild(i)}catch(e){console.error(e.message,e)}i.onload=i.onerror=null,t.progress.work(!1,t.index,null),e.reject()};var s=r.dom.getElementById(o);s&&s.parentNode&&s.parentNode.removeChild(s),i.rel="stylesheet",i.type="text/css",i.id=o,i.href=o,n.appendChild(i)}))}},{key:"mountJS",value:function(e,t,n){var r=this;e.post((function(e){var o=t.src,i=r.moduleManager.get(o);if(i&&(i.status==Ue.Defined||i.status==Ue.Loaded)){if(i.exports)return t.progress.work(!0,t.index,i.exports),void e.resolve();if(r.dom.querySelector("script[src='".concat(o)))return t.progress.work(!0,t.index,i.exports),void e.resolve()}(i=new ze).id=o,i.src=o,i.status=Ue.Loading,r.moduleManager.put(o,i);var a=r.dom.createElement("script");if("onload"in a)a.onload=function(){a.onload=a.onerror=null,i.status==Ue.Loading&&(i.status=Ue.Loaded,t.progress.work(!0,t.index,o)),e.resolve()},a.onerror=function(){try{n.removeChild(a)}catch(e){console.error(e.message,e)}a.onload=a.onerror=null,t.progress.work(!1,t.index,null),e.reject()};else{var l=a;l.onreadystatechange=function(){/loaded|complete/.test(l.readyState)&&(l.onreadystatechange=null,i.status==Ue.Loading&&(i.status=Ue.Loaded,t.progress.work(!0,t.index,o)),e.resolve())}}a.defer=!0,a.src=o,Ce().define=r.createDefine(i,t),n.appendChild(a)}))}},{key:"unmount",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getFileNamePostfix(e);if("js"===n||0===n.length){var r=this.dom.querySelector('script[src="'.concat(e,'"]'));return r&&r.parentNode&&r.parentNode.removeChild(r),void this.moduleManager.remove(e)}if("css"!==n){He.remove(e);var o=t.htmlPoint;return o||(o=this.dom.body),void(o.innerHTML="")}var i=this.dom.querySelector('style[href="'.concat(e,'"]'));i&&i.parentNode&&i.parentNode.removeChild(i)}},{key:"trimEmptyElement",value:function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n].trim();0!==r.length&&t.push(r)}return t}},{key:"createDefine",value:function(e,t){var n=this,r=function(){var r,o,i;e.status=Ue.Defining;var a=arguments.length;1===a?(i=arguments.length<=0?void 0:arguments[0],r=void 0):2===a?(i=arguments.length<=1?void 0:arguments[1],Array.isArray(arguments.length<=0?void 0:arguments[0])?(o=n.trimEmptyElement(arguments.length<=0?void 0:arguments[0]),r=void 0):o=void 0):(r=arguments.length<=0?void 0:arguments[0],o=n.trimEmptyElement(arguments.length<=1?void 0:arguments[1]),i=arguments.length<=2?void 0:arguments[2]),r&&(e.id=r,n.options.alias[r]=e.src),o&&o.length>0?n.ensure(o,(function(){if("function"==typeof i){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.exports=Reflect.apply(i,e,r)}else e.exports=i;e.status=Ue.Defined,t.progress.work(!0,t.index,e.exports)})):(e.exports="function"==typeof i?Reflect.apply(i,e,[]):i,e.status=Ue.Defined,t.progress.work(!0,t.index,e.exports))};return r.amd=!0,r}},{key:"resolvePath",value:function(e){try{if(this.isNaturePath(e,"all"))return e;e=this.parserPath(e,!0);var t=this.getFileNamePostfix(e);t=t.toLowerCase();var n=this.createSearch(this.query);return-1==e.indexOf("?")?("js"!==t&&"css"!==t&&"html"!==t&&(e+=".js"),n.length>0&&(e+="?".concat(n))):n.length>0&&(e+="&".concat(n)),e}catch(t){throw console.error("resolve path[".concat(e,"] fail"),t),t}}},{key:"createSearch",value:function(e){var t="";if(e){for(var n in e){var r="".concat(e[n]);t+="".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(r),"&")}t.length>0&&(t=t.substring(0,t.length-1))}return t}},{key:"getFileNamePostfix",value:function(e){var t=e.lastIndexOf("?");-1==t&&(t=e.length);var n=e.lastIndexOf(".",t);return-1==n?"":e.substring(n+1,t)}},{key:"isNaturePath",value:function(e,t){if(null==this.options.nature)return!1;if("all"===t||"js"===t){var n=this.options.nature.js;if(void 0!==n)for(var r=0;r<n.length;r++){var o=n[r];if(0===e.indexOf(o))return!0}}if("all"===t||"css"===t){var i=this.options.nature.css;if(void 0!==i)for(var a=0;a<i.length;a++){var l=i[a];if(0===e.indexOf(l))return!0}}if("all"===t||"html"===t){var s=this.options.nature.html;if(void 0!==s)for(var u=0;u<s.length;u++){var c=s[u];if(0===e.indexOf(c))return!0}}return!1}},{key:"parserPath",value:function(e,t){if(0==e.indexOf("http://"))return e;if(0==e.indexOf("https://"))return e;if(0==e.indexOf("file:///"))return e;if(0==e.indexOf("/"))return Ke+e.slice(1);if(0==e.indexOf("./"))return Ke+e.slice(2);if(t){var n=this.options.alias[e];if(!n){var r=e.indexOf("/");if(-1==r)n=e;else{var o=e.slice(0,r),i=this.options.paths[o];n=i?i+e.slice(r):e}}return this.parserPath(n,!1)}return Ke+e}}]),e}();function mt(e,t){var n=e.sheet,r=!1;if(t.isOldWebKit)n&&(r=!0);else if(n)try{n.cssRules&&(r=!0)}catch(e){"NS_ERROR_DOM_SECURITY_ERR"===e.name&&(r=!0)}setTimeout((function(){t.time+=20,r?t.success():t.time>t.timeout?t.error():mt(e,t)}),20)}var bt=function(){function e(t,n){vt(this,e),this.size=t,this.callback=n,this.status=!0,this.values=[],this.lastIndex=-1}return pt(e,[{key:"work",value:function(e,t,n){if(this.status=e,!0===this.status&&(this.lastIndex!==t&&this.size--,this.lastIndex=t,this.values.push(n)),0===this.size||!1===this.status)try{Reflect.apply(this.callback,this,[this.status,this.values])}catch(e){console.error(e.message,e)}}},{key:"isOK",value:function(){return this.status}}]),e}(),wt=function e(t,n,r,o){vt(this,e),this.index=t,this.src=n,this.params=r,this.progress=o},St=Symbol("_notifyChange"),xt=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.currentRoute=t,this.routes=n};function kt(e){return(kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function At(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ot(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Rt=Symbol("ignoreHistoryChangeOnceKey"),Pt=Symbol("_navigateFirstRoute"),Et=Symbol("_getRouteMark"),Ct=Symbol("_getUrlSearch"),Tt=Symbol("_generateLocation"),_t=Symbol("_setRouteMarkRecorder"),qt="Symbol(_fox_restore_point)";function Mt(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Reflect.apply(e,null,[].concat(n))}return e}var Nt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"hash",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],l=arguments.length>6?arguments[6]:void 0;At(this,e),Ot(this,"firstNavigate",!0),Ot(this,"traceless",!1),Ot(this,Rt,!1),this.mode=t,this.base=n,this.query=r,this.firstNavigate=o,this.historyMonitor=i,this.traceless=a,this.storage=null!=l?l:Ce().sessionStorage}var t,n;return t=e,(n=[{key:"init",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=Ce();return"function"!=typeof this.historyChange&&(this.historyChange=function(){if(e[Rt])e[Rt]=!1;else if(Mt(e.historyMonitor)){var t=n.history.state;e[St](t);try{var r;if(r="string"==typeof t?JSON.parse(t):t,Array.isArray(r)&&r.length>0){var o,i=null!==(o=e[Et]())&&void 0!==o?o:"/";e[_t](i,r)}}catch(e){}}}),Te(n,"popstate",this.historyChange),this.firstNavigate&&t&&this[Pt](),Promise.resolve()}},{key:"destroy",value:function(){this.historyChange&&_e(Ce(),"popstate",this.historyChange)}},{key:Pt,value:function(){var e,t=null!==(e=this[Et]())&&void 0!==e?e:"/",n=this.storage.getItem(qt);if(n)try{var r=JSON.parse(n);if(r.mark===t)return void this[St](r.routes)}catch(e){}var o,i=t.indexOf("!");o=-1!=i?t.substring(i+1):t;var a=new se;a.path=o,a.query=this[Ct](),this[St]([a])}},{key:_t,value:function(e,t){try{var n={mark:e,routes:t},r=JSON.stringify(n);this.storage.setItem(qt,r)}catch(e){console.error(e.message,e)}}},{key:"setRestorePoint",value:function(e){var t,n=null!==(t=this[Et]())&&void 0!==t?t:"/";this[_t](n,e)}},{key:St,value:function(e){"function"==typeof this.changeHandler&&this.changeHandler(e)}},{key:Et,value:function(){var e=Ce();if("path"===this.mode){var t=e.location.pathname;return this.base&&0===t.indexOf(this.base)&&(t=t.substring(this.base.length)),t}var n=e.location.hash,r=n.indexOf("#");return-1!=r?n.substring(r+1):null}},{key:Ct,value:function(){return Ce().location.search}},{key:"listen",value:function(e){this.changeHandler=e}},{key:"go",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=Ce();this[Rt]=!t,n.history.go(e)}},{key:"push",value:function(e){var t=this[Tt](e.currentRoute);Mt(this.traceless,e.currentRoute)||Ce().history.pushState(e.routes,"",t),this[_t](e.currentRoute.fullPath,e.routes)}},{key:"replace",value:function(e){var t=this[Tt](e.currentRoute);Mt(this.traceless,e.currentRoute)||Ce().history.replaceState(e.routes,"",t),this[_t](e.currentRoute.fullPath,e.routes)}},{key:Tt,value:function(e){var t,n=Ce();if(e.query){var r="";if("object"===kt(e.query))for(var o in e.query){var i=encodeURIComponent(e.query[o]),a="".concat(encodeURIComponent(o),"=").concat(i);r.length>0&&(r+="&"),r+=a}else r=e.query;this.query?"?"!==(t="".concat(this.query,"&").concat(r)).charAt(0)&&(t="?".concat(t)):t="?".concat(r)}var l,s=n.location,u=e.fullPath;return u.startsWith(G)&&(u=u.substring(G.length+1)),l=t?"path"==this.mode?"".concat(this.base,"/").concat(u).concat(t):"".concat(s.pathname).concat(t,"#").concat(u):"path"==this.mode?"".concat(this.base,"/").concat(u):"".concat(s.pathname,"#").concat(u),"".concat(s.origin).concat(l)}}])&&jt(t.prototype,n),e}();function It(){var e,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=arguments.length>5?arguments[5]:void 0;return null!==n&&(n=Ce().location.pathname),n&&n.endsWith("/")&&(n=n.substring(0,n.length-1)),new Nt("path",null!==(e=n)&&void 0!==e?e:"",r,t,o,i,a)}function Kt(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;return new Nt("hash","",t,e,n,r,o)}function Ft(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Lt=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;Ft(this,e),$t(this,"maxSize",50),$t(this,"cursor",-1),$t(this,"queue",[]),$t(this,"historyMonitor",!1),$t(this,"traceless",!1),this.base=t,this.maxSize=n}var t,n;return t=e,(n=[{key:"init",value:function(){return Promise.resolve()}},{key:"destroy",value:function(){this.queue=[]}},{key:"listen",value:function(e){this.changeHandler=e}},{key:St,value:function(e){"function"==typeof this.changeHandler&&this.changeHandler(e)}},{key:"go",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(0!=this.queue.length&&!(this.cursor<=0||this.cursor>=this.queue.length-1)){var n=this.cursor+e;if(n<0?n=0:n>this.queue.length-1&&(n=this.queue.length-1),n!=this.cursor&&(this.cursor=n,t)){var r=this.queue[n];this[St](r.routes)}}}},{key:"push",value:function(e){this.queue.length>=this.maxSize&&this.queue.splice(0,1),this.queue.push(e),this.cursor=this.queue.length-1}},{key:"replace",value:function(e){var t=this.queue.length-this.cursor;this.queue.splice(this.cursor,t),this.queue[this.cursor]=e}},{key:"setRestorePoint",value:function(e){}}])&&Dt(t.prototype,n),e}();function Ut(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return new Lt(e,t)}var Ht="undefined"!=typeof window;function Bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bt(Object(n),!0).forEach((function(t){Yt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Jt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Vt(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function zt(e){return function(e){if(Array.isArray(e))return Gt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Vt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vt(e,t){if(e){if("string"==typeof e)return Gt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gt(e,t):void 0}}function Gt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qt(e){return(Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Zt=Symbol("_constructRouteModel"),en=Symbol("_findRouteModel"),tn=Symbol("_findRootView"),nn=Symbol("_getFirstView"),rn=Symbol("_removeView"),on=Symbol("_buildPage"),an=Symbol("_resolveComponent"),ln=Symbol("_update"),sn=Symbol("_merge"),un=Symbol("_handleHistoryChange"),cn=Symbol("_handleRouteUpdated"),fn=Symbol("routeUpdatedCallback"),hn=Symbol("currentRoutes"),vn=Symbol("current"),yn=Symbol("_addRouteRecorder"),pn=Symbol("_removeRouteRecorder"),dn=Symbol("_cloneRouteRecorder"),gn=Symbol("_handleError"),mn=Symbol("errorCallback"),bn=Symbol("registerKey"),wn=Symbol("notFoundKey"),Sn=Symbol("notFoundPathKey"),xn=Symbol("forestKey"),kn=Symbol("historyKey"),An=Symbol("beforeFiltersKey"),jn=Symbol("afterFiltersKey"),On=Symbol("destroyFiltersKey"),Rn=Symbol("mainDispatcherKey"),Pn=Symbol("initKey"),En=Symbol("requireKey"),Cn=Symbol("readyKey"),Tn=Symbol("readyHandlersKey"),_n=Symbol("_markReady"),qn=Symbol("_createNextFn"),Mn=Symbol("_start"),Nn=Symbol("_before"),In=Symbol("_after"),Kn=Symbol("_destroy"),Fn=Symbol("_load"),Dn=Symbol("_unload"),$n=Symbol("_loadDependency"),Ln=Symbol("resolvedModulesKey"),Un=Symbol("resolveDependencyKey"),Hn=Symbol("routerGuardKey");Symbol.for("loadViewModel");var Bn,Wn=function(){function e(t){var n,r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Yt(this,bn,new Array),Yt(this,Sn,"*"),Yt(this,Cn,!1),Yt(this,Tn,[]),Yt(this,xn,new Ae),Yt(this,hn,new Array),Yt(this,mn,null),Yt(this,fn,null),Yt(this,An,new Array),Yt(this,jn,new Array),Yt(this,On,new Array),Yt(this,Rn,new ft),Yt(this,Ln,new Map),Yt(this,Hn,new Ee),Yt(this,Pn,!1),Yt(this,vn,c(null)),Yt(this,En,null),this.options=null!=t?t:{},this.options.notFoundPath&&this.setNotFoundPath(this.options.notFoundPath);var o=this.options.routes||[];this.addRoutes(o),this.options.notFound&&this.setNotFoundRoute(this.options.notFound),t.history?this[kn]=t.history:this[kn]=Ht?Kt():Ut(),null===(n=this[kn])||void 0===n||n.listen((function(e){var t=null;if("string"==typeof e){var n=r[Y](e);n&&(t=r[un]([n]))}else t=r[un](e);t&&t.then((function(){!1===r[Cn]&&r[_n](!0)})).catch((function(){!1===r[Cn]&&r[_n](!1)}))}))}var t,n;return t=e,(n=[{key:"require",get:function(){return Ht?(this[En]||(this[En]=new gt),this[En]):null}},{key:"current",get:function(){return this[vn].value}},{key:"setHistoryMode",value:function(e){var t,n=this;if(!this[Cn]){if(this[kn])try{this[kn].destroy()}catch(e){console.error(e.message,e)}for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];this[kn]="path"===e?Reflect.apply(It,null,[].concat(o)):"memory"===e?Reflect.apply(Ut,null,[].concat(o)):Reflect.apply(Kt,null,[].concat(o)),null===(t=this[kn])||void 0===t||t.listen((function(e){var t=null;if("string"==typeof e){var r=n[Y](e);r&&(t=n[un]([r]))}else t=n[un](e);t&&t.then((function(){!1===n[Cn]&&n[_n](!0)})).catch((function(){!1===n[Cn]&&n[_n](!1)}))}))}}},{key:gn,value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"error",t=arguments.length>1?arguments[1]:void 0;if(t&&"function"==typeof t.error)try{t.error(e)}catch(e){}if(this[mn])try{this[mn](e,t)}catch(e){}console.error(e)}},{key:"init",value:function(){var e;!0!==this[Pn]&&(null===(e=this[kn])||void 0===e||e.init(!this[Cn]),this[Pn]=!0)}},{key:"isReady",value:function(){var e=this;return this[Cn]?Promise.resolve():new Promise((function(t,n){e[Tn].push([t,n])}))}},{key:_n,value:function(e){this[Cn]=!0,this[Tn].forEach((function(t){var n,r,o=(r=2,function(e){if(Array.isArray(e))return e}(n=t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(n,r)||Vt(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],a=o[1];try{e?i():a()}catch(e){console.error(e.message,e)}}))}},{key:un,value:function(e){try{if(!e){var t=zt(this[hn]).reverse();return this[Dn](t),Ht&&Ce().location.reload(),Promise.resolve()}for(var n=null,r=[],o=[],i=0;i<e.length&&i<this[hn].length&&se.isSame(e[i],this[hn][i]);i++)e[i].opsType===oe.Open&&!0===e[i].active&&e[i].active!==this[hn][i].active&&(n=e[i]);if(i<e.length&&(r=e.slice(i)),i<this[hn].length&&(o=this[hn].slice(i).reverse()),0==o.length&&0==r.length){if(null!==n)return this.restore([n])}else{if(!(o.length>0))return this.restore(r);if(this[Dn](o)){if(r.length>0)return this.restore(r);if(null!==n)return this.restore([n])}}}catch(e){this[gn](e)}return Promise.resolve()}},{key:cn,value:function(e){if(e)this[vn].value=e;else{var t=this[hn].length;this[vn].value=t>0?this[hn][t-1]:null}if("function"==typeof this[fn])try{this[fn](this[vn].value)}catch(e){}}},{key:yn,value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;t<0||t>=this[hn].length?this[hn].push(e):this[hn].splice(t,0,e)}},{key:dn,value:function(){var e,t=[],n=Jt(this[hn]);try{for(n.s();!(e=n.n()).done;){var r=e.value,o=se.clone(r,!0);t.push(o)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:pn,value:function(e){if(null!=this[hn]){for(var t=-1,n=0;n<this[hn].length;n++)if(se.isSame(this[hn][n],e)){t=n;break}if(-1!=t){var r=this[hn][t];this[hn].splice(t,1),this[Kn](r,r.session)}}}},{key:"historyMonitor",set:function(e){this[kn]&&(this[kn].historyMonitor=e)}},{key:"historyMonitor",get:function(){return!!this[kn]&&this[kn].historyMonitor}},{key:"traceless",set:function(e){this[kn]&&(this[kn].traceless=e)}},{key:"traceless",get:function(){return!!this[kn]&&this[kn].traceless}},{key:"setRestorePoint",value:function(){var e,t=this[dn]();null===(e=this[kn])||void 0===e||e.setRestorePoint(t)}},{key:"onRouteUpdated",value:function(e){this[fn]=e}},{key:"onError",value:function(e){this[mn]=e}},{key:"beforeEach",value:function(e){this[An].push(e)}},{key:"afterEach",value:function(e){this[jn].push(e)}},{key:"destroyEach",value:function(e){this[On].push(e)}},{key:"setResolveDependency",value:function(e){this[Un]=e}},{key:"addRoutes",value:function(e){var t,n=Jt(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.addRoute(r)}}catch(e){n.e(e)}finally{n.f()}}},{key:"addRoute",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(e.path!==this[Sn]){var n=this[Zt](e);if(-1==t)this[bn]=[].concat(zt(this[bn]),zt(n));else for(var r=n.length-1;r>=0;r--)this[bn].splice(t,0,n[r])}else this.setNotFoundRoute(e)}},{key:"removeRoute",value:function(e){var t=this[Y](e);if(null===t)return console.warn("route格式错误",e),!1;for(var n=0;n<this[bn].length;n++){var r=this[bn][n];if(null!=t&&t.path&&r.path===t.path)return this[bn].splice(n,1),!0;if(null!=t&&t.name&&r.name===t.name)return this[bn].splice(n,1),!0}return!1}},{key:"hasRoute",value:function(e){var t=this[Y](e);return null===t?(console.warn("route格式错误",e),!1):-1!==this[bn].findIndex((function(e){return!(null==t||!t.path||e.path!==t.path)||!(null==t||!t.name||e.name!==t.name)||void 0}))}},{key:"setNotFoundPath",value:function(e){this[Sn]=e}},{key:"setNotFoundRoute",value:function(e){var t=this[Zt](e);this[wn]=t[0]}},{key:"getRoutes",value:function(){return zt(this[bn])}},{key:Zt,value:function(e){var t,n=null!==(t=e.path)&&void 0!==t?t:"";n.length>0&&"/"!==n.charAt(0)&&(n="/".concat(n));var r=e.components||e.component&&{"":e.component};if(null==r){var o=new fe;return o.path=n,o.redirect=e.redirect,[o]}var i=[];for(var a in r){var l=r[a];0===a.length&&(a=G);var s=new ue(a,l,e.props,e.meta);i.push(s)}var u=!1,c=[];if(e.children){var f,h=Jt(e.children);try{for(h.s();!(f=h.n()).done;){var v,y=f.value,p=Jt(this[Zt](y));try{for(p.s();!(v=p.n()).done;){var d=v.value,g=new fe;g.name=d.name,d.path&&d.path.length>0?g.path="".concat(n).concat(d.path):(u=!0,g.path=n);var m=new ce;m.models=[].concat(i),g.layers=[m].concat(zt(d.layers)),c.push(g)}}catch(e){p.e(e)}finally{p.f()}}}catch(e){h.e(e)}finally{h.f()}}if(!u){var b=new ce;b.models=i;var w=new fe;w.name=e.name,w.path=n,w.layers=[b],c.splice(0,0,w)}return c}},{key:en,value:function(e){var t,n=e.route;try{var r,o=Jt(this[bn]);try{for(o.s();!(r=o.n()).done;){var i=r.value;if(n.path&&i.path){var a,l=i.match;l||(l=i.match=g(i.path));var s=l(n.path);if(!s)continue;if(i.redirect){var u=new se;_(!0,u,n),u.path=i.redirect;var c={route:u,find:void 0};return!!this[en](c)&&(e.route=c.route,e.find=c.find,!0)}if(n.params=null!==(a=n.params)&&void 0!==a?a:{},_(!0,n.params,s.params),n.query){var f=n.query;if("string"==typeof f){var h,v={},y=Jt(f.split("&"));try{for(y.s();!(h=y.n()).done;){var p=h.value.split("=");if(2===p.length){var m=decodeURIComponent(p[0].trim()),w=decodeURIComponent(p[1].trim());v[m]=w}}}catch(e){y.e(e)}finally{y.f()}_(!0,n.params,v)}else"object"===Qt(f)&&_(!0,n.params,f)}return e.find=i,!0}if(n.name===i.name){var S;n.params=null!==(S=n.params)&&void 0!==S?S:{};var x=function(e,t){void 0===t&&(t={});var n=b(t),r=t.encode,o=void 0===r?function(e){return e}:r,i=t.validate,a=void 0===i||i,l=e.map((function(e){if("object"==typeof e)return new RegExp("^(?:"+e.pattern+")$",n)}));return function(t){for(var n="",r=0;r<e.length;r++){var i=e[r];if("string"!=typeof i){var s=t?t[i.name]:void 0,u="?"===i.modifier||"*"===i.modifier,c="*"===i.modifier||"+"===i.modifier;if(Array.isArray(s)){if(!c)throw new TypeError('Expected "'+i.name+'" to not repeat, but got an array');if(0===s.length){if(u)continue;throw new TypeError('Expected "'+i.name+'" to not be empty')}for(var f=0;f<s.length;f++){var h=o(s[f],i);if(a&&!l[r].test(h))throw new TypeError('Expected all "'+i.name+'" to match "'+i.pattern+'", but got "'+h+'"');n+=i.prefix+h+i.suffix}}else if("string"!=typeof s&&"number"!=typeof s){if(!u){var v=c?"an array":"a string";throw new TypeError('Expected "'+i.name+'" to be '+v)}}else{if(h=o(String(s),i),a&&!l[r].test(h))throw new TypeError('Expected "'+i.name+'" to match "'+i.pattern+'", but got "'+h+'"');n+=i.prefix+h+i.suffix}}else n+=i}return n}}(d(i.path,t=void 0),t);return n.path=x(n.params),e.find=i,!0}}}catch(e){o.e(e)}finally{o.f()}}catch(e){console.error(e.message,e),"function"==typeof n.error&&n.error(e.message)}return!1}},{key:Y,value:function(e){var t=null;if(Array.isArray(e))if(t=new se,"object"===Qt(e[0]))t=se.from(e[0]);else for(var n=0;n<e.length;n++)0===n?"/"===e[n].charAt(0)?t.path=e[n]:t.name=e[n]:1===n?t.params=e[n]:2===n?t.root=e[n]:3===n&&_(!1,t,e[n]);else"object"===Qt(e)?t=se.from(e):"string"==typeof e&&(t=new se,"/"==e.charAt(0)?t.path=e:t.name=e);if(t){var r,o,i;if(t.path){var a=t.path.indexOf("?");-1!==a&&a<t.path.length-1&&(t.query=t.path.substring(a+1),t.path=t.path.substring(0,a))}t.root=null!==(r=t.root)&&void 0!==r?r:G,t.opsType=null!==(o=null!==(i=t.opsType)&&void 0!==i?i:this.options.defaultOperationType)&&void 0!==o?o:oe.Push}return t}},{key:"push",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this[Y](t);return r?(r.opsType=r.opsType||oe.Push,this.to(r)):(this[gn]("resolve route fail",r),this)}},{key:"put",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this[Y](t);return r?(r.opsType=oe.Put,this.to(r)):(this[gn]("resolve route fail",r),this)}},{key:"replace",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this[Y](t);return r?(r.opsType=oe.Replace,this.to(r)):(this[gn]("resolve route fail",r),this)}},{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this[Y](t);return r?(r.opsType=oe.Append,this.to(r)):(this[gn]("resolve route fail",r),this)}},{key:"remove",value:function(e){var t=this;return new Promise((function(n){t[Rn].post((function(r){try{if(0===t[hn].length)return r.resolve(),void n(!1);var o,i=[];if(e){var a;if(o=e.root?e.root:null!==(a=t[hn][0].root)&&void 0!==a?a:G,e.all)for(var l=t[hn].length-1;l>0;l--){var s=t[hn][l];s.opsType===oe.Append&&s.root===o&&i.splice(0,0,s)}else if(e.until)for(var u=t[hn].length-1;u>0;u--){var c=t[hn][u];if(c.opsType===oe.Append&&c.root===o){if("/"===e.until.charAt(0)&&e.until===c.path)break;if(e.until===c.name)break;i.splice(0,0,c)}}}else{o=G;var f=t[nn](t[xn]);f&&(o=f.name);for(var h=t[hn].length-1;h>0;h--){var v=t[hn][h];if(v.opsType===oe.Append&&v.root===o){i.push(v);break}}}if(0===i.length){var y="can not find route";return console.warn(y),r.resolve(y),void n(!1)}var p=0;if(t[hn].forEach((function(e){e.opsType!==oe.Put&&p++})),t[Dn](i)){var d,g=0;t[hn].forEach((function(e){e.opsType!==oe.Put&&g++}));var m=g-p;null===(d=t[kn])||void 0===d||d.go(m,!1),r.resolve(),n(!0)}}catch(e){t[gn](e),r.resolve(),n(!1)}}))}))}},{key:"open",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=this[Y](t);return r?(r.opsType=oe.Open,this.to(r)):(this[gn]("resolve route fail",r),this)}},{key:"close",value:function(e){var t=this;return this[Rn].post((function(n){try{var r=t[Y](e);if(!r)return void n.reject("resolve route fail");for(var o=[],i=0;i<t[hn].length;i++){var a=t[hn][i];if(a.root===r.root)if(r.path||r.name){if(r.path&&r.path===a.path){o.push(a);break}if(r.name&&r.name===a.name){o.push(a);break}}else o.push(a)}if(0===o.length)return void n.resolve();t[Dn](o)&&t[cn](),n.resolve()}catch(e){n.resolve(),t[gn](e.message)}})),this}},{key:"to",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=this[Y](n);if(!o)return this[gn]("resolve route fail",o),this;console.debug("route to",o.path,o.root);var i=this[Hn].acquire(o);return null==i?(this[gn]("route forbid",o),this):(this[Rn].post((function(t){try{var n,r=e[Mn](o);e[Nn](r),null!==(n=r.session)&&void 0!==n&&n.routeModel||!e[Un]||e[$n](r),e[Fn](r),e[In](r),r.wait((function(n,r){var a=n.session.to;try{var l,s,u=se.clone(a,!0),c=new xt(u,e[dn]());a.opsType===oe.Replace?null===(l=e[kn])||void 0===l||l.replace(c):null===(s=e[kn])||void 0===s||s.push(c)}catch(e){console.error(e.message,e)}if(e[Hn].release(i),e[cn](a),"function"==typeof o.success)try{Reflect.apply(o.success,{},[])}catch(e){console.error(e.message,e)}!1===e[Cn]&&e[_n](!0),t.resolve()}),(function(n,r){e[Hn].release(i),null!==r&&e[gn](r,o),!1===e[Cn]&&e[_n](!1),t.resolve()}))}catch(n){e[Hn].release(i),e[gn](n,o),t.resolve()}})),this)}},{key:"back",value:function(e){var t;null===(t=this[kn])||void 0===t||t.go(-e)}},{key:qn,value:function(e){var t=this;return function(n,r){if("boolean"==typeof n)n?e.resolve():e.reject(null!=r?r:null);else if(n){var o=t[Y](n);if(o){var i=e.session.to;o.success=i.success,o.error=i.error,e.session.to=o,e.session.routeModel=null,e.resolve()}else e.reject("route resolve fail")}else e.resolve()}}},{key:Mn,value:function(e){var t,n=this[hn].length>0?this[hn][0]:void 0,r=new le(e,n),o={route:e,find:null};return this[en](o),o.find&&(r.routeModel=o.find,e.matched=(t=[],o.find.layers.forEach((function(e){null!=e.models&&null!=e.models&&e.models.forEach((function(e){if(null!=e&&null!=e)if("object"===Qt(e.meta)){var n=_(!0,{},e.meta);t.push(n)}else e.meta&&t.push(e.meta)}))})),t),Array.isArray(e.matched)&&e.matched.length>0&&(e.meta=o.find.layers[0].models[0].meta)),new ft(r)}},{key:Nn,value:function(e){var t,n=this,r=Jt(this[An]);try{var o=function(){var r=t.value;e.post((function(e){var t=n[qn](e);Reflect.apply(r,{},[e.session.to,e.session.from,t,e.session])}))};for(r.s();!(t=r.n()).done;)o()}catch(e){r.e(e)}finally{r.f()}}},{key:In,value:function(e){var t=this;e.post((function(e){var n,r=Jt(t[jn]);try{for(r.s();!(n=r.n()).done;){var o=n.value;try{Reflect.apply(o,{},[e.session.to,e.session.from,e.session])}catch(e){console.error(e.message,e)}}}catch(e){r.e(e)}finally{r.f()}e.resolve()}))}},{key:Kn,value:function(e,t){var n,r=Jt(this[On]);try{for(r.s();!(n=r.n()).done;){var o=n.value;try{Reflect.apply(o,{},[e,t])}catch(e){console.error(e.message,e)}}}catch(e){r.e(e)}finally{r.f()}"function"==typeof e.destroy&&Reflect.apply(e.destroy,e,[])}},{key:$n,value:function(e){var t=this,n=e.session,r=Reflect.apply(this[Un],this,[null==n?void 0:n.to]);if(null!=r&&null!=r){Array.isArray(r)||(r=[r]);var o,i=[],a=Jt(r);try{for(a.s();!(o=a.n()).done;){var l=o.value;this[Ln].has(l)||i.push(l)}}catch(e){a.e(e)}finally{a.f()}0!==i.length&&e.post((function(e){t[En].ensure(i,(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];if(r){for(var a=0,l=r;a<l.length;a++){var s=l[a];if(s){var u=void 0;u=C(s)?s.default:s,Array.isArray(u)&&t.addRoutes(u)}}var c,f=Jt(i);try{for(f.s();!(c=f.n()).done;){var h=c.value;t[Ln].set(h,!0)}}catch(e){f.e(e)}finally{f.f()}e.resolve()}else e.reject()}))}))}}},{key:Fn,value:function(e){var t=this;e.post((function(e){var n=e.session.to,r=e.session.routeModel;if(null==r){var o={route:n,find:null};if(t[en](o))r=o.find,e.session.routeModel=r;else{if(!t[wn])return void e.reject("not find route model");r=t[wn]}}var i=le.from(e.session);t[on](n,r,i).then((function(n){t[xn],e.resolve()}),(function(t){e.reject(t)}))}))}},{key:Dn,value:function(e){if(0==e.length)return!0;var t,n=this[xn],r=[],o=Jt(e);try{for(o.s();!(t=o.n()).done;){var i=t.value,a=this[tn](n,i);null!=a&&r.push(Wt(Wt({},a),{},{route:i}))}}catch(e){o.e(e)}finally{o.f()}if(0==r.length)return this[gn]("can not find view index"),!1;var l,s=Jt(r.reverse());try{for(s.s();!(l=s.n()).done;){var u,c=l.value;this[rn](n,{x:c.x,y:c.y},[null!==(u=c.route.index)&&void 0!==u?u:0],!0)}}catch(e){s.e(e)}finally{s.f()}return!0}},{key:tn,value:function(e,t){for(var n,r=null!==(n=t.root)&&void 0!==n?n:G,o=0;o<e.layers.length;o++)for(var i=e.layers[o],a=i.views.length-1;a>=0;a--){var l=i.views[a];if(l[de]&&l[be]===r)return{x:a,y:o}}return null}},{key:nn,value:function(e){return e.layers.length>0&&e.layers[0].views.length>0?e.layers[0].views[0]:null}},{key:rn,value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!(t.y>=e.layers.length||t.x>=e.layers[t.y].views.length)){for(var o=e.layers[t.y].views[t.x],i=!1,a=[],l=!1,s=o.slots.value,u=s.length-1;u>=0;u--){var c=s[u];null!=n&&-1==n.indexOf(c.index)||(c.route&&o[de]&&(this[pn](c.route),!0===c.active&&c.route.opsType==oe.Append&&(l=!0)),a.push(new xe(o,c.index,t.y)),s.splice(u,1))}if(0==s.length)r?o.slots.value=zt(s):e.layers[t.y].views.splice(t.x,1);else{if(l){var f=s.length-1,h=s[f];h.active=!0,h.route&&(h.route.active=h.active)}o.slots.value=zt(s)}0==e.layers[t.y].views.length&&(i=!0);for(var v=t.y+1;v<e.layers.length;v++){for(var y=e.layers[v].views,p=[],d=y.length-1;(i||a.length>0)&&d>=0;d--){var g=y[d];if(g[me]&&(i||xe.include(a,g[me]))){for(var m=g.slots.value,b=m.length-1;b>=0;b--){var w=m[b];w.route&&g[de]&&this[pn](w.route),p.push(new xe(g,w.index,v)),m.splice(b,1)}e.layers[v].views.splice(d,1)}}a=p,0==e.layers[v].views.length&&(i=!0)}}}},{key:"restore",value:function(e){var t=this;if(e&&0!=this[bn].length)return new Promise((function(n,r){for(var o=function(n){var r=e[n];t[Rn].post((function(e){var n,o=t[Mn](r);t[Nn](o),null!==(n=o.session)&&void 0!==n&&n.routeModel||!t[Un]||t[$n](o),t[Fn](o),t[In](o),o.wait((function(t,n){e.resolve()}),(function(n,r){null!==r&&t[gn](r),e.resolve()}))}))},i=0;i<e.length;i++)o(i);t[Rn].post((function(e){e.resolve(),n()}))}));var n=this[xn];if(n.layers.length>0){var r=n.layers[0].views;r.length>0&&(r[0].slots.value=[])}return this[hn]=[],this[cn](),Promise.resolve()}},{key:on,value:function(e,t,n){var r,o=this,i=null!==(r=e.updateType)&&void 0!==r?r:ie.Part;return this[an](t).then((function(){o[ln](t,e,n,i)}))}},{key:an,value:function(e){for(var t=[],n=0;n<e.layers.length;n++)for(var r=e.layers[n],o=0;o<r.models.length;o++){var i=r.models[o];i.isResolved||t.push(i.resolve())}return t.length>0?Promise.all(t):Promise.resolve()}},{key:ln,value:function(e,t,n,r){var o;if(1!==e.layers[0].models.length)return Promise.reject("illegal route structure(multi root node)");var i,a,l,s=e.layers[0].models[0],u=this[xn],c=function(e){return 0==e.layers.length||0==e.layers[0].views.length}(u),f=null!==(o=t.root)&&void 0!==o?o:G;if(c||r!=ie.Part||(i=this[tn](u,t)),null==i||null==i)if(c||r===ie.All){if(0==u.layers[0].views.length){var h,v=null!==(h=t.root)&&void 0!==h?h:G;a=new Se(v,!0,null),u.layers[0].views=[a]}else a=u.layers[0].views[0];i={x:0,y:0}}else{var y=t.slot;if(!y)return Promise.reject("can not rebuild view(because not route slot)");var p,d=y.level;if(d>u.layers.length)return Promise.reject("can not insert view(override level)");if(y.rootName){var g,m=Jt(u.layers[d-1].views);try{for(m.s();!(g=m.n()).done;){var b=g.value;if(b[de]&&b.name===y.rootName){var w;p=new xe(b,null!==(w=y.rootIndex)&&void 0!==w?w:0,d-1);break}if(b[ge]&&b[ge].view.name===y.rootName&&b[ge].index===y.rootIndex){p=b[ge];break}}}catch(e){m.e(e)}finally{m.f()}}if(!p)return Promise.reject("can not insert view(not find root node ref)");a=new Se(f,!0,p),u.layers[d].views.push(a),i={x:u.layers[d].views.length-1,y:d}}else a=u.layers[i.y].views[i.x];if(l=i.y,a[de]=!0,t.opsType===oe.Append){t.index=K.get();var S=a.slots.value;if(S.length>0){var x=S[S.length-1];x.active=!1,x.route&&(x.route.active=x.active)}var k=new we(t,s,t.index,!0);a.slots.value=[].concat(zt(S),[k]);var A=l+1,j=new xe(a,t.index,l);this[sn](u,A,e,1,j)}else if(t.opsType===oe.Open){var O,R=a.slots.value,P=!1,E=Jt(R);try{for(E.s();!(O=E.n()).done;){var C=O.value;if(null!==C.route&&se.isSameForRouteModel(C.route,t)){if(1==C.active)return t.index=C.index,t.active=C.active,C.route=t,Promise.resolve();C.active=!0,P=!0,t.index=C.index,t.active=C.active,C.route=t,this[pn](C.route)}else C.active=!1;C.route&&(C.route.active=C.active)}}catch(e){E.e(e)}finally{E.f()}if(!P){t.index=K.get(),t.active=!0;var T=new we(t,s,t.index,!0);R.push(T);var _=l+1,q=new xe(a,t.index,l);this[sn](u,_,e,1,q)}a.slots.value=zt(R)}else{var M=a.slots.value;if(0==M.length){t.index=K.get(),a.slots.value=[new we(t,s,t.index)];var N=l+1,I=new xe(a,t.index,l);this[sn](u,N,e,1,I)}else{var F=M[0];if(F.model!==s){this[rn](u,i,null,!0),t.index=K.get(),a.slots.value=[new we(t,s,t.index)];var D=l+1,$=new xe(a,t.index,l);this[sn](u,D,e,1,$)}else{null!==F.route&&this[pn](F.route);for(var L=[],U=1;U<M.length;U++)L.push(M[U].index);L.length>0&&this[rn](u,i,L,!0),t.index=F.index,F.route=t;for(var H=[new xe(a,t.index,l)],B=l+1,W=1,J=new xe(a,t.index,l);H.length>0&&B<u.layers.length&&W<e.layers.length;B++,W++){for(var z=[],V=0;V<u.layers[B].views.length;V++){var X=u.layers[B].views[V];X[me]&&xe.include(H,X[me])&&z.unshift(V)}for(var Y=[],Q=0,Z=z;Q<Z.length;Q++){for(var ee=Z[Q],te=u.layers[B].views[ee],ne=e.layers[W].models,re=void 0,le=0;le<ne.length;le++)if(te.name===ne[le].name){re=ne[le];break}if(re){var ue=te.slots.value;if(0==ue.length){te.slots.value=[new we(null,re,0)];var ce=B+1,fe=W+1;this[sn](u,ce,e,fe,J)}else{var he=ue[0];if(he.model!==re){this[rn](u,{x:ee,y:B},null,!0),te.slots.value=[new we(null,re,0)];var ve=B+1,ye=W+1;this[sn](u,ve,e,ye,J)}else{te[de]&&null!==he.route&&this[pn](he.route);for(var pe=[],be=1;be<ue.length;be++)pe.push(ue[be].index);pe.length>0&&this[rn](u,{x:ee,y:B},pe,!0),Y.push(new xe(te,he.index,B))}}te[de]=!1}else this[rn](u,{x:ee,y:B},null,!1)}H=Y}this[sn](u,B,e,W,J)}}}if(a&&a[ge]){var ke,Ae=a[ge];Ae&&(t.slot=new ae(f,l,null==Ae?void 0:Ae.view.name,null!==(ke=null==Ae?void 0:Ae.index)&&void 0!==ke?ke:0))}n.to=null,n.routeModel=null,t.session=n,this[yn](t)}},{key:sn,value:function(e,t,n,r,o){for(var i=r,a=t;a<e.layers.length&&i<n.layers.length;a++,i++){var l,s=e.layers[a].views,u=Jt(n.layers[i].models);try{for(u.s();!(l=u.n()).done;){var c=l.value,f=new Se(c.name,!1,o),h=new we(null,c);f.slots.value=[h],s.push(f)}}catch(e){u.e(e)}finally{u.f()}}for(;i<n.layers.length;i++){var v=new ke;v.views=[];var y,p=Jt(n.layers[i].models);try{for(p.s();!(y=p.n()).done;){var d=y.value,g=new Se(d.name,!1,o),m=new we(null,d);g.slots.value=[m],v.views.push(g)}}catch(e){p.e(e)}finally{p.f()}e.layers.push(v)}}},{key:X,value:function(e,t,n,r,o,i){if(t<0||t>this[xn].layers.length)return null;if(t<this[xn].layers.length){var a,l=null,s=Jt(this[xn].layers[t].views);try{for(s.s();!(a=s.n()).done;){var u,c,f=a.value,h=!1;if(null!==n?(h=f.name===e&&(null===(u=f[ge])||void 0===u?void 0:u.view)===n)&&-1!==r&&(h=(null===(c=f[ge])||void 0===c?void 0:c.index)===r):h=f.name===e,h){null!==o&&(f[me]={view:o,index:i,level:t-1}),l=f;break}}}catch(e){s.e(e)}finally{s.f()}if(null!==l)return l}var v=null,y=null;null!==o&&(v=o[de]?{view:o,index:i,level:t-1}:o[ge],y={view:o,index:i,level:t-1});var p=new Se(e,!0,v);if(p[me]=y,t==this[xn].layers.length){var d=new ke;d.views=[p],this[xn].layers.push(d)}else this[xn].layers[t].views.push(p);return p}}])&&Xt(t.prototype,n),e}(),Jn="fox-router-view";function zn(e){return(zn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.showClass)&&void 0!==t?t:e.enterClass)||((r=e.transitionName)?"".concat(r,n?"-show":"-enter"):null)}function Gn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.showActiveClass)&&void 0!==t?t:e.enterActiveClass)||((r=e.transitionName)?"".concat(r,n?"-show-active":"-enter-active"):null)}function Xn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.showToClass)&&void 0!==t?t:e.enterToClass)||((r=e.transitionName)?"".concat(r,n?"-show-to":"-enter-to"):null)}function Yn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.hideClass)&&void 0!==t?t:e.leaveClass)||((r=e.transitionName)?"".concat(r,n?"-hide":"-leave"):null)}function Qn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.hideActiveClass)&&void 0!==t?t:e.leaveActiveClass)||((r=e.transitionName)?"".concat(r,n?"-hide-active":"-leave-active"):null)}function Zn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;return(r=n&&null!==(t=e.hideToClass)&&void 0!==t?t:e.leaveToClass)||((r=e.transitionName)?"".concat(r,n?"-hide-to":"-leave-to"):null)}function er(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onBeforeShow)&&void 0!==t?t:e.onBeforeEnter}function tr(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onShow)&&void 0!==t?t:e.onEnter}function nr(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onAfterShow)&&void 0!==t?t:e.onAfterEnter}function rr(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onShowCancelled)&&void 0!==t?t:e.onEnterCancelled}function or(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onHide)&&void 0!==t?t:e.onLeave}function ir(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onAfterHide)&&void 0!==t?t:e.onAfterLeave}function ar(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.onHideCancelled)&&void 0!==t?t:e.onLeaveCancelled}function lr(e){var t,n,r,o,i,a=e.duration;return"object"==zn(a)?t={enter:null!==(n=a.enter)&&void 0!==n?n:-1,leave:null!==(r=a.leave)&&void 0!==r?r:-1,show:null!==(o=a.show)&&void 0!==o?o:-1,hide:null!==(i=a.hide)&&void 0!==i?i:-1}:("string"==typeof a&&(a=0==a.length?-1:Number(a)),t={enter:a,leave:a,show:a,hide:a}),t}function sr(e,t){e.classList.contains(t)||e.classList.add(t)}function ur(e,t){e.classList.remove(t)}if(Ht){var cr=Ce();Bn=cr.requestAnimationFrame.bind(cr)}else Bn=setTimeout;function fr(e){Bn(e)}function hr(e,t){if(O(t)){null==e&&(e={});for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];Reflect.apply(t,e,r)}}function vr(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0;if(O(i)){if(void 0!==o&&o>=0)return void setTimeout((function(){Reflect.apply(i,e,[t,n,r]),O(l)&&Reflect.apply(l,e,[])}),o);var s=["animationend","transitionend"],u=function o(a){s.forEach((function(e){_e(t,e,o)})),Reflect.apply(i,e,[t,n,r]),l&&Reflect.apply(l,e,[])};s.forEach((function(e){Te(t,e,u)}))}if(O(a)){var c="animationcancel",f=function o(i){Reflect.apply(a,e,[t,n,r]),_e(t,c,o)};Te(t,c,f)}}function yr(e){return null!==e&&(e.opsType===oe.Append||e.opsType===oe.Open)}function pr(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:-1;if(t&&(n||yr(i))){var l=Vn(o,n);l&&sr(r,l);var s=Gn(o,n);s&&sr(r,s)}else{var u=er(o,n);hr(e,u,[r,i,a])}}function dr(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,s=arguments.length>8?arguments[8]:void 0;if(yr(a)||n)if(t){var u=Vn(o,n),c=Gn(o,n),f=Xn(o,n);fr(f?function(){vr(e,r,a,l,i,(function(){c&&ur(r,c),f&&ur(r,f),O(s)&&s(r)})),u&&ur(r,u),f&&sr(r,f)}:function(){u&&ur(r,u),c&&ur(r,c),O(s)&&s(r)})}else{var h=tr(o,n),v=nr(o,n),y=rr(o,n),p=function(t){!t&&O(v)?hr(e,v,[r,a,l]):O(y)&&hr(e,y,[r,a,l]),O(s)&&s(r)};O(h)?hr(e,h,[r,p,a,l]):p()}else O(s)&&s(r)}function gr(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,s=arguments.length>8?arguments[8]:void 0,u=arguments.length>9?arguments[9]:void 0;if(yr(l)||n||!n&&O(a)&&a(),t){var c=Yn(o,n),f=Qn(o,n),h=Zn(o,n);c&&sr(r,c),f&&sr(r,f),fr(h?function(){vr(e,r,l,s,i,(function(){f&&ur(r,f),h&&ur(r,h),O(u)&&u(r),!n&&O(a)&&a()})),c&&ur(r,c),h&&sr(r,h)}:function(){c&&ur(r,c),f&&ur(r,f),O(u)&&u(r),!n&&O(a)&&a()})}else{var v=or(o,n),y=ir(o,n),p=ar(o,n),d=function(t){!t&&O(y)?(hr(e,y,[r,l,s]),O(u)&&u(r),!n&&O(a)&&a()):O(p)&&(hr(e,p,[r,l,s]),O(u)&&u(r))};O(v)?hr(e,v,[r,d,l,s]):d()}}function mr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=$(t.css),i=lr(t),a={create:function(e,a){var l=br(a);pr(e,o,!1,l,t,n,r),dr(e,o,!1,l,t,i.enter,n,r)},activate:function(e,a){var l=br(a);pr(e,o,!1,l,t,n,r),dr(e,o,!1,l,t,i.enter,n,r)},remove:function(e,a){var l=br(e);gr(e,o,!1,l,t,i.leave,a,n,r)}};return a}function br(e){return e.elm}function wr(e){return(wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xr(e){return function(e){if(Array.isArray(e))return Ar(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||kr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kr(e,t){if(e){if("string"==typeof e)return Ar(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ar(e,t):void 0}}function Ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var jr=Symbol("ruvc"),Or=Symbol("cvs");function Rr(e,t,n){return"function"==typeof e?Reflect.apply(e,{},[t,n]):e}function Pr(e,t){if(e.componentOptions&&e.componentOptions.Ctor&&e.componentOptions.Ctor.extendOptions){var n=e.componentInstance||e,r=[];if(e.fnOptions&&e.fnOptions[t]){var o=e.fnOptions[t];Array.isArray(o)?r=xr(o):"function"==typeof o&&(r=[o])}if(e.componentOptions.Ctor&&e.componentOptions.Ctor.extendOptions){var i=e.componentOptions.Ctor.extendOptions[t];Array.isArray(i)?r=[].concat(xr(r),xr(i)):"function"==typeof i&&(r=[].concat(xr(r),[i]))}return function(e){r.forEach((function(e){Reflect.apply(e,n,[])}))}}return function(){}}var Er=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Sr(this,"node",void 0),Sr(this,"state",void 0),this.node=t,this.state=n},Cr={functional:!0,props:{name:{type:String,required:!1,default:"default"},passProps:{type:Object,required:!1},modelSlot:{type:[Object],required:!1},multi:{type:Boolean,default:!1},transition:{type:[Boolean,String],required:!1},css:{type:[Boolean,String],required:!1,default:!0},tag:{type:[String],required:!1,default:"div"},viewTag:{type:[String,Function],required:!1,default:"div"},viewTagProps:{type:[Object,Function],required:!1,default:function(){return{}}},viewTagAttrs:{type:[Object,Function],required:!1,default:function(){return{}}},viewClass:{type:[String,Function],required:!1},viewActiveClass:{type:[String,Function],required:!1},viewDeactiveClass:{type:[String,Function],required:!1},transitionName:{type:String,required:!1},enterClass:{type:String,required:!1},enterActiveClass:{type:String,required:!1},enterToClass:{type:String,required:!1},leaveClass:{type:String,required:!1},leaveActiveClass:{type:String,required:!1},leaveToClass:{type:String,required:!1},showClass:{type:String,required:!1},showActiveClass:{type:String,required:!1},showToClass:{type:String,required:!1},hideClass:{type:String,required:!1},hideActiveClass:{type:String,required:!1},hideToClass:{type:String,required:!1},duration:{type:[Number,Object],required:!1}},render:function(e,t){var n,u=t,c=t.parent.$createElement,f=t.parent.$router,d=t.props,g=d.name,m=d.multi,b=t.data,w=(n=t.parent)[jr]||(n[jr]={}),S=y(t.parent,o,0),x=y(t.parent,i,null),k=y(t.parent,a,-1),A=d.modelSlot;if(A){var j=g;v(t.parent,o,S+1,j),v(t.parent,a,A.index,j),v(t.parent,s,A.index,j);var R=A.route;R&&v(t.parent,r,R,j);var P,E=Sr({attrs:{}},h,j);if(A.model.props)if("object"===wr(A.model.props))Object.assign(E.attrs,A.model.props);else if(!0===A.model.props&&"object"===wr(null===(P=A.route)||void 0===P?void 0:P.params)){var C;Object.assign(E.attrs,null===(C=A.route)||void 0===C?void 0:C.params)}return c(A.model.component,E,t.children)}if(null==f)return console.error("router is not been register"),c();var T=y(t.parent,l,null),_=y(t.parent,s,0),q=f[X](g,S,x,k,T,_);if(null===q)return p(t.parent),c();if(v(t.parent,l,q),!0===q[de]&&v(t.parent,i,q),m){var M=function(){var e,n=$(null===(e=d.transition)||void 0===e||e),r=w[Or];r||(r=w[Or]=new Map);for(var o=new Map,i=[],a=q.slots.value,l=[],s=function(e){var t=a[e],s="".concat(d.name,"-").concat(t.index),f=c(Jn,{props:{name:s,modelSlot:t}}),h={},v=Rr(d.viewClass,t.route,e);"string"==typeof v&&v.length>0&&(h[v]=!0);var y=Rr(d.viewActiveClass,t.route,e),p=Rr(d.viewDeactiveClass,t.route,e),g=r.get(s);if("string"==typeof y&&y.length>0&&(h[y]=t.active),"string"==typeof p&&p.length>0&&(h[p]=!t.active),g&&t.active!==g.state){var m=g.node;if(t.active){var b=null;m&&m.children&&m.children.length>0&&(b=Pr(m.children[0],"activated")),l.unshift((function(){!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=br(t);if(null!=l)if(i){var s=$(n.css),u=lr(n);pr(e,s,!0,l,n,r,o),dr(e,s,!0,l,n,u.show,r,o,(function(e){O(a)&&a("from enter")}))}else O(a)&&a();else O(a)&&a()}(u,m,d,t.route,e,n,b)}))}else{if(m&&m.children&&m.children.length>0){var w=Pr(m.children[0],"deactivated");try{D(w)}catch(e){console.error(e)}}l.push((function(){!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=br(t);null!=l&&i?gr(e,$(n.css),!0,l,n,lr(n).hide,null,r,o,(function(e){O(a)&&a("from leave")})):O(a)&&a()}(u,m,d,t.route,e,n)}))}}var S={class:h,key:s},x=Rr(d.viewTagProps,t.route,e);null!==x&&"object"===wr(x)&&(S.props=x);var k=Rr(d.viewTagAttrs,t.route,e);null!==k&&"object"===wr(k)&&(S.attrs=k),t.route.viewTagAttrs&&"object"===wr(t.route.viewTagAttrs)&&(S.attrs?Object.assign(S.attrs,t.route.viewTagAttrs):S.attrs=t.route.viewTagAttrs);var A=Rr(d.viewTag,t.route,e),j=c(A,S,[f]);if(o.set(s,new Er(j,t.active)),n){var R=mr(u,d,t.route,e);j.data.hook=R}i.push(j)},f=0;f<a.length;f++)s(f);var h,v=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=kr(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(r.keys());try{for(v.s();!(h=v.n()).done;){var y=h.value;o.has(y)||p(t.parent,y)}}catch(e){v.e(e)}finally{v.f()}w[Or]=o,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};fr((function(){for(var n=function(n){D((function(){Reflect.apply(e[n],t,[])}))},r=0;r<e.length;r++)n(r)}))}(l,u);var g=Rr(d.tag,null,-1),m={};for(var S in b)"props"!==S&&(m[S]=b[S]);return{v:c(g,m,i)}}();if("object"===wr(M))return M.v}else{var N,I=$(null!==(N=d.transition)&&void 0!==N&&N);v(t.parent,a,-1),v(t.parent,o,S+1),v(t.parent,s,-1);var K=q.slots.value;if(K.length>0){var F=K[0],L=F.route;L&&v(t.parent,r,L);var U=Sr({},h,"");for(var H in b)"props"!==H&&(U[H]=b[H]);null!==U.attrs&&"object"===wr(U.attrs)||(U.attrs={});var B,W=F.model;if(W.props)if("object"===wr(W.props))Object.assign(U.attrs,W.props);else if(!0===W.props&&"object"===wr(null===(B=F.route)||void 0===B?void 0:B.params)){var J;Object.assign(U.attrs,null===(J=F.route)||void 0===J?void 0:J.params)}null!==d.passProps&&"object"===wr(d.passProps)&&Object.assign(U.attrs,d.passProps);var z=c(W.component,U,[]);if(I){var V=mr(u,d,F.route,-1);viewTagNode.data.hook=V}return z}}}};function Tr(e){return(Tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var _r,qr={name:"RouterLink",props:{tag:{type:[String],default:"a"},to:{type:[String,Object],required:!0},activeClass:String,exact:Boolean,exactActiveClass:String,event:{type:[String,Array],default:"click"}},render:function(e){var t=this.$router,n=this.$route,r={},o=t.options.linkActiveClass,i=t.options.linkExactActiveClass,a=null==o?"fox-router-link-active":o,l=null==i?"fox-router-link-exact-active":i,s=null==this.activeClass?a:this.activeClass,u=null==this.exactActiveClass?l:this.exactActiveClass;r[u]=function(e,t){return!!e&&("object"===Tr(t)?t.path?e.path===t.path:e.name===t.name:"/"===t.charAt(0)?e.path===t:e.name===t)}(n,this.to),r[s]=this.exact?r[u]:function(e,t){return!!e&&("object"===Tr(t)?t.path?0===e.path.indexOf(t.path):e.name===t.name:"/"===t.charAt(0)?0===e.path.indexOf(t):e.name===t)}(n,this.to);var c=t[Y](this.to),f=function(e){Mr(e)&&t.to(c)},h={click:Mr};Array.isArray(this.event)?this.event.forEach((function(e){h[e]=f})):h[this.event]=f;var v={class:r},y="#".concat(c.path);if("a"===this.tag)v.on=h,v.attrs={href:y};else{var p=Nr(this.$slots.default);if(p){p.isStatic=!1;var d=p.data=extend({},p.data);for(var g in d.on=d.on||{},d.on){var m=d.on[g];g in h&&(d.on[g]=Array.isArray(m)?m:[m])}for(var b in h)b in d.on?d.on[b].push(h[b]):d.on[b]=f;(p.data.attrs=extend({},p.data.attrs)).href=y}else v.on=h}return e(this.tag,v,this.$slots.default)}};function Mr(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||e.defaultPrevented||void 0!==e.button&&0!==e.button)){if(e.currentTarget&&e.currentTarget.getAttribute){var t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Nr(e){if(e)for(var t,n=0;n<e.length;n++){if("a"===(t=e[n]).tag)return t;if(t.children&&(t=Nr(t.children)))return t}}function Ir(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}!function(e){e[e.limitless=0]="limitless",e[e.once=1]="once"}(_r||(_r={}));var Fr=Symbol("registerKey"),Dr=function e(t,n){Kr(this,e),this.callback=t,this.policy=n},$r=function(){function e(){Kr(this,e),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,Fr,new Map)}var t,n;return t=e,(n=[{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this[Fr].get(e);r||(r=new Array,this[Fr].set(e,r));var o=!0===n?_r.once:_r.limitless,i=new Dr(t,o);return r.push(i),this}},{key:"off",value:function(e,t){if(!t)return this[Fr].delete(e),this;var n=this[Fr].get(e);if(n)for(var r=0;r<n.length;r++)if(n[r].callback===t){n.splice(r,1);break}return this}},{key:"bind",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.on(e,t,n)}},{key:"unbind",value:function(e,t){return this.off(e,t)}},{key:"once",value:function(e,t){return this.on(e,t,!0)}},{key:"all",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n.length;if(o<1)return this;var i=n[o-1];if("function"!=typeof i)return console.error("callback can not benn empty"),this;for(var a=o-1,l=new Array(a),s=[].splice.call(n,0,a),u=function(t){e.once(s[t],(function(e){l[t]=e,0==(a-=1)&&Reflect.apply(i,{},l)}))},c=0;c<s.length;c++)u(c);return this}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=this[Fr].get(e);if(!o)return this;for(var i=function(e){var t=o[e];if(t.policy==_r.once?o.splice(e,1):e++,"function"==typeof t.callback)try{D((function(){Reflect.apply(t.callback,{},n)}))}catch(e){console.error(e.message,e)}a=e},a=0;a<o.length;)i(a);return this}},{key:"trigger",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Reflect.apply(this.emit,this,[e].concat(n))}}])&&Ir(t.prototype,n),e}();function Lr(e){return(Lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ur(e,t){return(Ur=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hr(e,t){if(t&&("object"===Lr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Br(e){return(Br=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Wr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jr(e,t,n){return t&&Wr(e.prototype,t),n&&Wr(e,n),e}function zr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Gr=Symbol("idKey"),Xr=Symbol("valueKey"),Yr=Symbol("childrenKey"),Qr=Symbol("growKey"),Zr=function e(t){zr(this,e),Vr(this,Qr,!0),Vr(this,Xr,c()),Vr(this,Yr,new Map),this[Gr]=t},eo=function(){function e(){zr(this,e)}return Jr(e,[{key:"get",value:function(e,t){if("value"==t)return e[Xr].value;if("grow"===t)return e[Qr];var n=e[Yr].get(t);return n?ro(n):e[Qr]?((n=no(t))[Qr]=e[Qr],e[Yr].set(t,n),ro(n)):void 0}},{key:"set",value:function(e,t,n){return"value"==t?(e[Xr].value=n,!0):"grow"===t?(e[Qr]=$(n),!0):null==n?(e[Yr].delete(t),!0):(console.error("illegal property:".concat(t)),!1)}},{key:"deleteProperty",value:function(e,t){return"value"===t||"grow"==t?(console.error("can not delete property:".concat(String(t))),!1):(e[Yr].delete(t),!0)}}]),e}(),to="__proxy__";function no(e){var t=new Zr(e);return Reflect.set(t,to,new Proxy(t,new eo)),t}function ro(e){return Reflect.get(e,to)}var oo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ur(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Br(t);if(n){var o=Br(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Hr(this,e)});function o(){return zr(this,o),r.call(this,"__root__")}return Jr(o,[{key:"put",value:function(){var e=arguments.length;if(e<2)return console.error("参数至少包括一个(key, value)"),!1;for(var t=this,n=0;n<e-1;n++){var r=n<0||arguments.length<=n?void 0:arguments[n],o=void 0;t[Yr].has(r)?o=t[Yr].get(r):(o=no(r),t[Yr].set(r,o)),t=o}return t[Xr].value=e-1<0||arguments.length<=e-1?void 0:arguments[e-1],!0}},{key:"get",value:function(){var e=arguments.length;if(0!==e){for(var t=this,n=0;n<e;n++){var r=n<0||arguments.length<=n?void 0:arguments[n];if(!t[Yr].has(r))return;t=t[Yr].get(r)}return t[Xr].value}}},{key:"remove",value:function(){var e=arguments.length;if(0==e)return!1;for(var t=this,n=0;n<e-1;n++){var r=n<0||arguments.length<=n?void 0:arguments[n];if(!t[Yr].has(r))return!1;t=t[Yr].get(r)}var o=e-1<0||arguments.length<=e-1?void 0:arguments[e-1];return!!t[Yr].has(o)&&(t[Yr].delete(o),!0)}},{key:"contains",value:function(){var e=arguments.length;if(0==e)return!1;for(var t=this,n=0;n<e-1;n++){var r=n<0||arguments.length<=n?void 0:arguments[n];if(!t[Yr].has(r))return!1;t=t[Yr].get(r)}var o=e-1<0||arguments.length<=e-1?void 0:arguments[e-1];return t[Yr].has(o)}},{key:"clear",value:function(){this[Yr].clear()}}]),o}(Zr),io=(Symbol("treeKey"),["put","get","contains","remove","clear"]);function ao(e){return io.includes(e)}var lo=function(){function e(){zr(this,e)}return Jr(e,[{key:"get",value:function(e,t){if("value"==t)return e[Xr].value;if("grow"===t)return e[Qr];if(t===Yr)return e[Yr];if("string"==typeof t&&ao(t))return e[t];var n=String(t),r=e[Yr].get(n);return r?ro(r):e[Qr]?((r=no(n))[Qr]=e[Qr],e[Yr].set(n,r),ro(r)):void 0}},{key:"set",value:function(e,t,n){return"value"==t?(e[Xr].value=n,!0):"grow"===t?(e[Qr]=$(n),!0):!ao(t)&&(null==n?(e[Yr].delete(t),!0):(console.error("illegal property:".concat(t)),!1))}},{key:"deleteProperty",value:function(e,t){return"value"===t||"grow"==t?(console.error("can not delete property:".concat(String(t))),!1):(e[Yr].delete(t),!0)}}]),e}(),so=new Proxy(oo,{construct:function(e){return ro((t=new oo,n=new lo,r=new Proxy(t,n),o={put:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Reflect.apply(t.put,t,n)},get:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Reflect.apply(t.get,t,n)},remove:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Reflect.apply(t.remove,t,n)},contains:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Reflect.apply(t.contains,t,n)},clear:function(){return Reflect.apply(t.clear,t,[])}},Object.assign(o,r),Reflect.set(t,to,r),t));var t,n,r,o}}),uo={get each(){return z},get type(){return U},get isFunction(){return O},get isArray(){return j},get isArrayLike(){return B},get makeArray(){return J},get merge(){return W},get isWindow(){return H},get isPlainObject(){return P},get isEqual(){return V},get isESModule(){return C}};function co(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?co(Object(n),!0).forEach((function(t){ho(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):co(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ho(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Symbol("fk");var vo=new Wn({}),yo=new so,po=new $r,go=!1,mo=fo(fo({},uo),{},{get router(){return vo},get bus(){return yo},get Bus(){return so},get eventproxy(){return po},get EventProxy(){return $r},get EventChain(){return ft},get require(){return vo.require},get ajax(){return $e},get extend(){return _},get clone(){return q},install:function(e){go||(go=!0,function(e){n=e}(e),e.component(Jn,Cr),e.component("fox-router-link",qr),Object.defineProperty(e.prototype,"$fox",{get:function(){return this._routerRoot._fox}}),Object.defineProperty(e.prototype,"$router",{get:function(){return this._routerRoot._router}}),Reflect.defineProperty(e.prototype,"$route",{get:function(){return y(this,r,null)}}),Reflect.defineProperty(e.prototype,"$bus",{get:function(){return this._routerRoot._fox.bus}}),e.prototype.$fox_on=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];po.on(e,t,n)},e.prototype.$fox_off=function(e,t){po.off(e,t)},e.prototype.$fox_once=function(e,t){po.once(e,t)},e.prototype.$fox_all=function(){for(var e=po,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];Reflect.apply(e.all,e,n)},e.prototype.$fox_trigger=function(e){for(var t=po,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];Reflect.apply(t.trigger,t,[e].concat(r))},e.prototype.$fox_emit=function(e){for(var t=po,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];Reflect.apply(t.trigger,t,[e].concat(r))},e.mixin({beforeCreate:function(){this.$options.fox?(this._routerRoot=this,this._fox=this.$options.fox,this._router=this._fox.router,this._router.init()):this._routerRoot=this.$parent&&this.$parent._routerRoot||this},mounted:function(){},destroyed:function(){}}))}});return t}()}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fox-js/fox",
3
- "version": "2.1.7",
3
+ "version": "2.1.9",
4
4
  "keywords": [
5
5
  "Router",
6
6
  "Vue2",
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "scripts": {
17
17
  "publish:beta": "npm version prerelease & npm publish --tag beta",
18
- "publish:legacy": "npm version prerelease & npm publish --tag legacy",
18
+ "publish:legacy": "npm version patch & npm publish --tag legacy",
19
19
  "publish:latest": "npm version patch & npm publish"
20
20
  },
21
21
  "dependencies": {},