@fox-js/fox 2.1.15 → 2.1.18
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.
- package/libs/index.js +1 -1
- package/package.json +1 -1
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 ho}}),Symbol("rk");var n,r=Symbol("crk"),o=Symbol("vd"),i=Symbol("rv"),a=Symbol("rvi"),l=Symbol("pv"),u=Symbol("pvi"),s=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[s]},set:function(e){return r[s]=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 u=(r=i.$vnode?i.$vnode.data:{})[h];void 0!==u&&(o=u),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 u=e.charCodeAt(l);if(!(u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||95===u))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,u=0,s="",c=function(e){if(u<n.length&&n[u].type===e)return n[u++].value},f=function(e){var t=c(e);if(void 0!==t)return t;var r=n[u],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};u<n.length;){var v=c("CHAR"),y=c("NAME"),p=c("PATTERN");if(y||p){var d=v||"";-1===o.indexOf(d)&&(s+=d,d=""),s&&(a.push(s),s=""),a.push({name:y||l++,prefix:d,suffix:"",pattern:p||i,modifier:c("MODIFIER")||""})}else{var g=v||c("ESCAPED_CHAR");if(g)s+=g;else if(s&&(a.push(s),s=""),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),u=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)},s=1;s<r.length;s++)u(s);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,u=void 0===l||l,s=n.encode,c=void 0===s?function(e){return e}:s,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(u)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)},C="function"==typeof Symbol&&"symbol"===A(Symbol.toStringTag);function E(e){return e.__esModule||C&&"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 u=t[i];for(var s in u){var c=o[s],f=u[s];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[s]=_(l,h,f)}else void 0!==f&&(o[s]=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),u=x(l);try{for(u.s();!(a=u.n()).done;){var s=a.value,c=e[s],f=t[s];if(c!==f)if("object"===A(f)){if(!Array.isArray(f)&&!P(f))continue;c=q(c,f,n),e[s]=c}else{if("function"==typeof f)continue;e[s]=f}}}catch(e){u.e(e)}finally{u.f()}}else _(!0,e,t);return e}var F,M,I,N=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}();F=N,M="seed",I=(new Date).getTime(),M in F?Object.defineProperty(F,M,{value:I,enumerable:!0,configurable:!0,writable:!0}):F.seed=I;var D=T?Promise.resolve():null;function K(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!==D?n&&n.length>0?D.then((function(){e(n)})):D.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 J(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 z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=t;return null!=e&&(B(Object(e))?J(n,"string"==typeof e?[e]:e):n.push(e)),n}function W(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}(),ue=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,u=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(u.s();!(l=u.n()).done;){var s=l.value;r[s]=t[s]}}catch(e){u.e(e)}finally{u.f()}}return n}}]),e}(),se=function(){function e(t,n,r,o){ne(this,e),this.id=N.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){E(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[s]},set:function(e){return r[s]=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,Ce,Ee=function e(){Re(this,e)},Te=function(){function e(){Re(this,e),Oe(this,"forbidTime",300),Oe(this,"submitRecorder",new Ee)}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}(),_e="undefined"!=typeof window,qe=function(){return window},Fe=function(){return window.document};function Me(){if(!_e)return"/";var e,t,n=qe().location;return"".concat(n.protocol,"//").concat(n.host)+((t=(e=n.pathname).lastIndexOf("/"))>0&&t<e.length-1?e=e.substring(0,t+1):0===t&&-1!==e.indexOf(".")?e="/":-1===t&&(e=-1==e.indexOf(".")?"/".concat(e,"/"):"/"),0!==e.indexOf("/")&&(e="/".concat(e)),e)}function Ie(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on".concat(t),n):e["on".concat(t)]=n}function Ne(e,t,n){e.removeEventListener?e.removeEventListener(t,n):e.detachEvent?e.detachEvent("on".concat(t),n):e["on".concat(t)]=null}function De(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)}}Me(),function(e){e[e.Loading=0]="Loading",e[e.Loaded=1]="Loaded",e[e.Defining=2]="Defining",e[e.Defined=3]="Defined"}(Pe||(Pe={})),function(e){e[e.normal=0]="normal",e[e.factory=1]="factory"}(Ce||(Ce={}));var Ke,$e=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,"register",new Map)}var t,n;return t=e,(n=[{key:"get",value:function(e){var t;return null!==(t=this.register.get(e))&&void 0!==t?t:null}},{key:"set",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),null!=t?t:null}},{key:"has",value:function(e){return this.register.has(e)}},{key:"clear",value:function(){this.register.clear()}}])&&De(t.prototype,n),e}();function Le(e){return(Le="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 Ue(e){return function(e){if(Array.isArray(e))return He(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 He(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)?He(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 He(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 Be(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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 ze(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"}(Ke||(Ke={}));var We=Symbol("chainKey"),Ve=Symbol("cursorKey"),Ge=Symbol("$persistentModeKey"),Xe=Symbol("statusKey"),Ye=Symbol("argsKey"),Qe=Symbol("exArgsKey"),Ze=Symbol("successFnsKey"),et=Symbol("errorFnsKey"),tt=Symbol("sessionKey"),nt=Symbol("_go"),rt=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Be(this,e),ze(this,We,[]),ze(this,Ve,0),ze(this,Ge,!1),ze(this,Xe,Ke.Free),ze(this,Ye,[]),ze(this,Qe,[]),ze(this,Ze,[]),ze(this,et,[]),this[tt]=t,this[Ge]=n}var t,n;return t=e,(n=[{key:"session",get:function(){return this[tt]}},{key:nt,value:function(e){var t=this,n=this[Xe];this[Xe]=Ke.Busy,this[Ve]+=e,this[Ve]<0&&(this[Ve]=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[Ye]=o,n===Ke.Exception||n===Ke.Reject){var a=function(){for(var e=[{session:t[tt]}].concat(Ue(t[Qe]));t[et].length>0;)try{!function(){var n=t[et].shift();"function"==typeof n&&K((function(){Reflect.apply(n,{},e)}))}()}catch(e){console.error(e.message,e)}return t[Xe]=n,t[We]=[],t[Ve]=0,{v:t}}();if("object"===Le(a))return a.v}else if(n===Ke.Finished||this[Ve]>=this[We].length){var l=function(){for(var e=[{session:t[tt]}].concat(Ue(t[Ye])),n=function(){var n=t[Ze].shift();"function"==typeof n&&K((function(){Reflect.apply(n,{},e)}))};t[Ze].length>0;)n();return t[Xe]=Ke.Free,{v:t}}();if("object"===Le(l))return l.v}if(this[Ve]>=this[We].length)return this[Xe]=Ke.Free,this;var u=this[We][this[Ve]];this[Ge]||(this[We].splice(0,this[Ve]+1),this[Ve]=-1);var s=this[Ve]+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[nt],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[nt],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[We].splice(s,0,e),s++)},session:this[tt]};K((function(){Reflect.apply(u,{},[f].concat(Ue(t[Ye])))}))}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[nt],this,[e].concat(n))}},{key:"finish",value:function(){this[Xe]=Ke.Finished;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this[Ye]=t,Reflect.apply(this[nt],this,[0])}},{key:"reject",value:function(){this[Xe]=Ke.Reject;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this[Qe]=t,Reflect.apply(this[nt],this,[0])}},{key:"throw",value:function(){this[Xe]=Ke.Exception;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this[Qe]=t,Reflect.apply(this[nt],this,[0])}},{key:"reset",value:function(){var e=this;this[Xe]=Ke.Busy;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];this[Ye]=n,this[We]=[],this[Ve]=0;for(var o={session:this[tt]},i=[o].concat(Ue(this[Ye])),a=function(){var t=e[Ze].shift();K((function(){Reflect.apply(t,e,i)}))};this[Ze].length>0;)a();return this[Xe]=Ke.Free,this}},{key:"post",value:function(e){return this[Xe]===Ke.Reject||this[Xe]===Ke.Exception||(Array.isArray(e)?this[We]=[].concat(Ue(this[We]),Ue(e)):this[We].push(e),this[Xe]===Ke.Busy||Reflect.apply(this[nt],this,[0].concat(Ue(this[Ye])))),this}},{key:"wait",value:function(e,t){return e&&"function"==typeof e&&this[Ze].push(e),t&&"function"==typeof t&&this[et].push(t),this[Xe]===Ke.Busy||Reflect.apply(this[nt],this,[0].concat(Ue(this[Ye]))),this}},{key:"exception",value:function(e){return e&&"function"==typeof e&&this[et].push(e),this[Xe]===Ke.Busy?this:Reflect.apply(this[nt],this,[0].concat(Ue(this[Ye])))}},{key:"isFinish",value:function(){return this[Xe]==Ke.Reject||this[Xe]==Ke.Free&&this[Ve]>=this[We].length}}])&&Je(t.prototype,n),e}();function ot(e){return(ot="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 it(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function at(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 lt(e,t,n){return t&&at(e.prototype,t),n&&at(e,n),e}function ut(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var st=function(){function e(){it(this,e),ut(this,"moduleManager",new $e),ut(this,"options",{paths:{},alias:{},nature:[],timeout:3e3})}return lt(e,[{key:"paths",get:function(){return this.options.paths},set:function(e){this.options.paths=e}},{key:"alias",get:function(){return this.options.alias},set:function(e){this.options.alias=e}},{key:"naturePaths",get:function(){return this.options.nature},set:function(e){this.options.nature=e}},{key:"timeout",get:function(){return this.options.timeout},set:function(e){this.options.timeout=e}},{key:"query",get:function(){return this._query},set:function(e){this._query=e}},{key:"head",get:function(){return Fe().head}},{key:"setModule",value:function(e,t){var n={id:e,src:"",status:Pe.Defined};"function"==typeof t?(n.exports=t,n.type=Ce.factory):n.exports=t,this.moduleManager.set(e,n)}},{key:"removeModule",value:function(e){this.moduleManager.remove(e)}},{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=t.length-1,i={};"object"===ot(t[o])&&(Object.assign(i,t[o]),o--);var a=null;"function"==typeof t[o]&&(a=t[o],o--);for(var l=0;l<=o;l++)if(Array.isArray(t[l]))for(var u=t[l],s=0;s<u.length;s++)u[s]&&r.push(this.resolvePath(u[s]));else if("string"==typeof t[l])for(var c=t[l].split(","),f=0;f<c.length;f++)c[f]&&r.push(this.resolvePath(c[f]));for(var h=new ft(r.length,(function(e,t){if(h.isOK())try{"function"==typeof a&&Reflect.apply(a,{},t)}catch(e){console.error(e.message,e)}else try{console.error(e),"function"==typeof a&&Reflect.apply(a,{},[])}catch(e){console.error(e.message,e)}})),v=new rt,y=0;y<r.length;y++){var p=new ht(y,r[y],i,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"===ot(n[i])&&(Object.assign(a,n[i]),i--);var l=null;"function"==typeof n[i]&&(l=n[i],i--);for(var u=0;u<=i;u++)if(Array.isArray(n[u]))for(var s=n[u],c=0;c<s.length;c++)s[c]&&o.push(this.resolvePath(s[c]));else for(var f=n[u].split(","),h=0;h<f.length;h++)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("exports"!==t.src)if("module"!==t.src){if(this.isNaturePath(t.src)){var n=t.params.jsPoint;return n||(n=this.head),void this.mountJS(e,t,n)}if(this.isNaturePath(t.src)){var r=t.params.cssPoint;return r||(r=this.head),void this.mountCSS(e,t,r)}var o=this.getFileNamePostfix(t.src);if("js"===o||0===o.length){var i=t.params.jsPoint;return i||(i=this.head),void this.mountJS(e,t,i)}if("css"===o){var a=t.params.cssPoint;return a||(a=this.head),void this.mountCSS(e,t,a)}}else e.post((function(e){t.progress.work(!0,t.index,"module"),e.resolve()}));else e.post((function(e){t.progress.work(!0,t.index,"exports"),e.resolve()}))}},{key:"mountCSS",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==Pe.Defined||i.status==Pe.Loaded)&&i.exports)return i.type===Ce.factory&&"function"==typeof i.exports?t.progress.work(!0,t.index,i.exports()):t.progress.work(!0,t.index,i.exports),void e.resolve();var a=Fe(),l=a.createElement("link");if(Reflect.has(l,"onload"))l.onload=function(){l.onload=null,l.onerror=null,t.progress.work(!0,t.index,t.src),e.resolve()},l.onerror=function(){try{n.removeChild(l)}catch(e){console.error(e.message,e)}l.onload=null,l.onerror=null,t.progress.work(!1,t.index,null),e.reject()};else{var u,s={timeout:null!==(u=r.options.timeout)&&void 0!==u?u:3e3,time:0,success:function(){t.progress.work(!0,t.index,t.src),e.resolve()},error:function(){try{n.removeChild(l)}catch(e){console.error(e.message,e)}t.progress.work(!1,t.index,null),e.resolve()}};setTimeout((function(){ct(l,s)}),1)}var c=a.getElementById(o);c&&c.parentNode&&c.parentNode.removeChild(c),l.rel="stylesheet",l.type="text/css",l.id=o,l.href=o,n.appendChild(l)}))}},{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==Pe.Defined||i.status==Pe.Loaded)){if(i.exports)return i.type===Ce.factory&&"function"==typeof i.exports?t.progress.work(!0,t.index,i.exports()):t.progress.work(!0,t.index,i.exports),void e.resolve();if(document.querySelector("script[src='".concat(o)))return t.progress.work(!0,t.index,i.exports),void e.resolve()}i={id:o,src:o,status:Pe.Loading},r.moduleManager.set(o,i);var a=Fe().createElement("script");if("onload"in a)a.onload=function(){a.onload=null,a.onerror=null,i.status==Pe.Loading&&(i.status=Pe.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=null,a.onerror=null,r.moduleManager.remove(o),t.progress.work(!1,t.index,null),e.resolve()};else{var l=a;l.onreadystatechange=function(){/loaded|complete/.test(l.readyState)&&(l.onreadystatechange=null,i.status==Pe.Loading&&(i.status=Pe.Loaded,t.progress.work(!0,t.index,o)),e.resolve())}}a.defer=!0,a.src=o,qe().define=r.createDefine(i,t),n.appendChild(a)}))}},{key:"unmount",value:function(e){var t=Fe(),n=this.getFileNamePostfix(e);if("js"===n||0===n.length){var r=t.querySelector('script[src="'.concat(e,'"]'));return r&&r.parentNode&&r.parentNode.removeChild(r),void this.moduleManager.remove(e)}if("css"!==n);else{var o=t.querySelector('style[href="'.concat(e,'"]'));o&&o.parentNode&&o.parentNode.removeChild(o)}}},{key:"trimEmptyElement",value:function(e){for(var t=[],n=0;n<e.length;n++)if(void 0!==e[n]&&null!==e[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=Pe.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(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var a=r.map((function(t){return"exports"===t?(e.exports&&"object"===ot(e.exports)||(e.exports={}),e.exports):"module"===t?e:t}));if("function"==typeof i){var l=Reflect.apply(i,e,a);l&&"object"===ot(l)&&(e.exports=l)}else e.exports=i;e.status=Pe.Defined,t.progress.work(!0,t.index,e.exports)})):(e.exports="function"==typeof i?Reflect.apply(i,e,[]):i,e.status=Pe.Defined,t.progress.work(!0,t.index,e.exports))};return r.amd=!0,r}},{key:"resolvePath",value:function(e){try{if("exports"===e||"module"===e)return e;if(this.isNaturePath(e))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&&(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){if(!this.options.nature)return!1;if("function"==typeof this.options.nature)return this.options.nature(e);var t=this.options.nature;if(t&&Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(0===e.indexOf(r))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"".concat(Me()).concat(e.slice(1));if(0==e.indexOf("./"))return"".concat(Me()).concat(e.slice(2));if(0==e.indexOf("//")){var n=qe();return"".concat(n.location.protocol).concat(e)}if(t){var r=this.options.alias[e];if(!r){var o=e.indexOf("/");if(-1==o)r=e;else{var i=e.slice(0,o),a=this.options.paths[i];r=a?a+e.slice(o):e}}return this.parserPath(r,!1)}return"".concat(Me()).concat(e)}}]),e}();function ct(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.timeout>t.timeout?t.error():ct(e,t)}),20)}var ft=function(){function e(t,n){it(this,e),this.size=t,this.callback=n,this.status=!0,this.values=[],this.lastIndex=-1}return lt(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}(),ht=function e(t,n,r,o){it(this,e),this.index=t,this.src=n,this.params=r,this.progress=o},vt=Symbol("_notifyChange"),yt=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 pt(e){return(pt="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 dt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gt(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 mt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var bt=Symbol("ignoreHistoryChangeOnceKey"),wt=Symbol("_navigateFirstRoute"),St=Symbol("_getRouteMark"),xt=Symbol("_getUrlSearch"),kt=Symbol("_generateLocation"),At=Symbol("_setRouteMarkRecorder"),jt="Symbol(_fox_restore_point)";function Ot(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 Rt=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;dt(this,e),mt(this,"firstNavigate",!0),mt(this,"traceless",!1),mt(this,bt,!1),this.mode=t,this.base=n,this.query=r,this.firstNavigate=o,this.historyMonitor=i,this.traceless=a,this.storage=null!=l?l:qe().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=qe();return"function"!=typeof this.historyChange&&(this.historyChange=function(){if(e[bt])e[bt]=!1;else if(Ot(e.historyMonitor)){var t=n.history.state;e[vt](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[St]())&&void 0!==o?o:"/";e[At](i,r)}}catch(e){}}}),Ie(n,"popstate",this.historyChange),this.firstNavigate&&t&&this[wt](),Promise.resolve()}},{key:"destroy",value:function(){this.historyChange&&Ne(qe(),"popstate",this.historyChange)}},{key:wt,value:function(){var e,t=null!==(e=this[St]())&&void 0!==e?e:"/",n=this.storage.getItem(jt);if(n)try{var r=JSON.parse(n);if(r.mark===t)return void this[vt](r.routes)}catch(e){}var o,i=t.indexOf("!");o=-1!=i?t.substring(i+1):t;var a=new ue;a.path=o,a.query=this[xt](),this[vt]([a])}},{key:At,value:function(e,t){try{var n={mark:e,routes:t},r=JSON.stringify(n);this.storage.setItem(jt,r)}catch(e){console.error(e.message,e)}}},{key:"setRestorePoint",value:function(e){var t,n=null!==(t=this[St]())&&void 0!==t?t:"/";this[At](n,e)}},{key:vt,value:function(e){"function"==typeof this.changeHandler&&this.changeHandler(e)}},{key:St,value:function(){var e=qe();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:xt,value:function(){return qe().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=qe();this[bt]=!t,n.history.go(e)}},{key:"push",value:function(e){var t=this[kt](e.currentRoute);Ot(this.traceless,e.currentRoute)||qe().history.pushState(e.routes,"",t),this[At](e.currentRoute.fullPath,e.routes)}},{key:"replace",value:function(e){var t=this[kt](e.currentRoute);Ot(this.traceless,e.currentRoute)||qe().history.replaceState(e.routes,"",t),this[At](e.currentRoute.fullPath,e.routes)}},{key:kt,value:function(e){var t,n=qe();if(e.query){var r="";if("object"===pt(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,u=n.location,s=e.fullPath;return s.startsWith(G)&&(s=s.substring(G.length+1)),l=t?"path"==this.mode?0===s.indexOf("/")?"".concat(this.base).concat(s).concat(t):"".concat(this.base,"/").concat(s).concat(t):"".concat(u.pathname).concat(t,"#").concat(s):"path"==this.mode?0===s.indexOf("/")?"".concat(this.base).concat(s):"".concat(this.base,"/").concat(s):"".concat(u.pathname,"#").concat(s),"".concat(u.origin).concat(l)}}])&>(t.prototype,n),e}();function Pt(){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=qe().location.pathname),n&&n.endsWith("/")&&(n=n.substring(0,n.length-1)),new Rt("path",null!==(e=n)&&void 0!==e?e:"",r,t,o,i,a)}function Ct(){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 Rt("hash","",t,e,n,r,o)}function Et(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tt(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 qt=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;Et(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:vt,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[vt](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){}}])&&Tt(t.prototype,n),e}();function Ft(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return new qt(e,t)}function Mt(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 It(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mt(Object(n),!0).forEach((function(t){Ut(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Nt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Kt(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 Dt(e){return function(e){if(Array.isArray(e))return $t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Kt(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 Kt(e,t){if(e){if("string"==typeof e)return $t(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)?$t(e,t):void 0}}function $t(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 Lt(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 Ut(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=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)}var Bt=Symbol("_constructRouteModel"),Jt=Symbol("_findRouteModel"),zt=Symbol("_findRootView"),Wt=Symbol("_getFirstView"),Vt=Symbol("_removeView"),Gt=Symbol("_buildPage"),Xt=Symbol("_resolveComponent"),Yt=Symbol("_update"),Qt=Symbol("_merge"),Zt=Symbol("_handleHistoryChange"),en=Symbol("_handleRouteUpdated"),tn=Symbol("routeUpdatedCallback"),nn=Symbol("currentRoutes"),rn=Symbol("current"),on=Symbol("_addRouteRecorder"),an=Symbol("_removeRouteRecorder"),ln=Symbol("_cloneRouteRecorder"),un=Symbol("_handleError"),sn=Symbol("errorCallback"),cn=Symbol("registerKey"),fn=Symbol("notFoundKey"),hn=Symbol("notFoundPathKey"),vn=Symbol("forestKey"),yn=Symbol("historyKey"),pn=Symbol("beforeFiltersKey"),dn=Symbol("afterFiltersKey"),gn=Symbol("destroyFiltersKey"),mn=Symbol("beforeRestoreFiltersKey"),bn=Symbol("mainDispatcherKey"),wn=Symbol("initKey"),Sn=Symbol("requireKey"),xn=Symbol("readyKey"),kn=Symbol("readyHandlersKey"),An=Symbol("_markReady"),jn=Symbol("_createNextFn"),On=Symbol("_start"),Rn=Symbol("_before"),Pn=Symbol("_after"),Cn=Symbol("_destroy"),En=Symbol("_beforeRestore"),Tn=Symbol("_load"),_n=Symbol("_unload"),qn=Symbol("_loadDependency"),Fn=Symbol("resolvedModulesKey"),Mn=Symbol("resolveDependencyKey"),In=Symbol("routerGuardKey");Symbol.for("loadViewModel");var Nn,Dn=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),Ut(this,cn,new Array),Ut(this,hn,"*"),Ut(this,xn,!1),Ut(this,kn,[]),Ut(this,vn,new Ae),Ut(this,nn,new Array),Ut(this,sn,null),Ut(this,tn,null),Ut(this,pn,new Array),Ut(this,dn,new Array),Ut(this,gn,new Array),Ut(this,mn,new Array),Ut(this,bn,new rt),Ut(this,Fn,new Map),Ut(this,In,new Te),Ut(this,wn,!1),Ut(this,rn,c(null)),Ut(this,Sn,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[yn]=t.history:this[yn]=_e?Ct():Ft(),null===(n=this[yn])||void 0===n||n.listen((function(e){var t=null;if("string"==typeof e){var n=r[Y](e);n&&(t=r[Zt]([n]))}else t=r[Zt](e);t&&t.then((function(){!1===r[xn]&&r[An](!0)})).catch((function(){!1===r[xn]&&r[An](!1)}))}))}var t,n;return t=e,(n=[{key:"require",get:function(){return _e?(this[Sn]||(this[Sn]=new st),this[Sn]):null}},{key:"current",get:function(){return this[rn].value}},{key:"setHistoryMode",value:function(e){var t,n=this;if(!this[xn]){if(this[yn])try{this[yn].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[yn]="path"===e?Reflect.apply(Pt,null,[].concat(o)):"memory"===e?Reflect.apply(Ft,null,[].concat(o)):Reflect.apply(Ct,null,[].concat(o)),null===(t=this[yn])||void 0===t||t.listen((function(e){var t=null;if("string"==typeof e){var r=n[Y](e);r&&(t=n[Zt]([r]))}else t=n[Zt](e);t&&t.then((function(){!1===n[xn]&&n[An](!0)})).catch((function(){!1===n[xn]&&n[An](!1)}))}))}}},{key:un,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[sn])try{this[sn](e,t)}catch(e){}console.error(e)}},{key:"init",value:function(){var e;!0!==this[wn]&&(null===(e=this[yn])||void 0===e||e.init(!this[xn]),this[wn]=!0)}},{key:"isReady",value:function(){var e=this;return this[xn]?Promise.resolve():new Promise((function(t,n){e[kn].push([t,n])}))}},{key:An,value:function(e){this[xn]=!0,this[kn].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)||Kt(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:Zt,value:function(e){try{if(!e){var t=Dt(this[nn]).reverse();return this[_n](t),_e&&qe().location.reload(),Promise.resolve()}for(var n=null,r=[],o=[],i=0;i<e.length&&i<this[nn].length&&ue.isSame(e[i],this[nn][i]);i++)e[i].opsType===oe.Open&&!0===e[i].active&&e[i].active!==this[nn][i].active&&(n=e[i]);if(i<e.length&&(r=e.slice(i)),i<this[nn].length&&(o=this[nn].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[_n](o)){if(r.length>0)return this.restore(r);if(null!==n)return this.restore([n])}}}catch(e){this[un](e)}return Promise.resolve()}},{key:en,value:function(e){if(e)this[rn].value=e;else{var t=this[nn].length;this[rn].value=t>0?this[nn][t-1]:null}if("function"==typeof this[tn])try{this[tn](this[rn].value)}catch(e){}}},{key:on,value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;t<0||t>=this[nn].length?this[nn].push(e):this[nn].splice(t,0,e)}},{key:ln,value:function(){var e,t=[],n=Nt(this[nn]);try{for(n.s();!(e=n.n()).done;){var r=e.value,o=ue.clone(r,!0);t.push(o)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:an,value:function(e){if(null!=this[nn]){for(var t=-1,n=0;n<this[nn].length;n++)if(ue.isSame(this[nn][n],e)){t=n;break}if(-1!=t){var r=this[nn][t];this[nn].splice(t,1),this[Cn](r,r.session)}}}},{key:"historyMonitor",set:function(e){this[yn]&&(this[yn].historyMonitor=e)}},{key:"historyMonitor",get:function(){return!!this[yn]&&this[yn].historyMonitor}},{key:"traceless",set:function(e){this[yn]&&(this[yn].traceless=e)}},{key:"traceless",get:function(){return!!this[yn]&&this[yn].traceless}},{key:"setRestorePoint",value:function(){var e,t=this[ln]();null===(e=this[yn])||void 0===e||e.setRestorePoint(t)}},{key:"onRouteUpdated",value:function(e){this[tn]=e}},{key:"onError",value:function(e){this[sn]=e}},{key:"beforeEach",value:function(e){this[pn].push(e)}},{key:"afterEach",value:function(e){this[dn].push(e)}},{key:"destroyEach",value:function(e){this[gn].push(e)}},{key:"beforeRestoreEach",value:function(e){this[mn].push(e)}},{key:"removeBeforeRestoreEach",value:function(e){var t=this[mn].indexOf(e);return-1!==t&&(this[mn].splice(t,1),!0)}},{key:"setResolveDependency",value:function(e){this[Mn]=e}},{key:"addRoutes",value:function(e){var t,n=Nt(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[hn]){var n=this[Bt](e);if(-1==t)this[cn]=[].concat(Dt(this[cn]),Dt(n));else for(var r=n.length-1;r>=0;r--)this[cn].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[cn].length;n++){var r=this[cn][n];if(null!=t&&t.path&&r.path===t.path)return this[cn].splice(n,1),!0;if(null!=t&&t.name&&r.name===t.name)return this[cn].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[cn].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[hn]=e}},{key:"setNotFoundRoute",value:function(e){var t=this[Bt](e);this[fn]=t[0]}},{key:"getRoutes",value:function(){return Dt(this[cn])}},{key:Bt,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 u=new se(a,l,e.props,e.meta);i.push(u)}var s=!1,c=[];if(e.children){var f,h=Nt(e.children);try{for(h.s();!(f=h.n()).done;){var v,y=f.value,p=Nt(this[Bt](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):(s=!0,g.path=n);var m=new ce;m.models=[].concat(i),g.layers=[m].concat(Dt(d.layers)),c.push(g)}}catch(e){p.e(e)}finally{p.f()}}}catch(e){h.e(e)}finally{h.f()}}if(!s){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:Jt,value:function(e){var t,n=e.route;try{var r,o=Nt(this[cn]);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 u=l(n.path);if(!u)continue;if(i.redirect){var s=new ue;_(!0,s,n),s.path=i.redirect;var c={route:s,find:void 0};return!!this[Jt](c)&&(e.route=c.route,e.find=c.find,!0)}if(n.params=null!==(a=n.params)&&void 0!==a?a:{},_(!0,n.params,u.params),n.query){var f=n.query;if("string"==typeof f){var h,v={},y=Nt(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"===Ht(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 u=t?t[i.name]:void 0,s="?"===i.modifier||"*"===i.modifier,c="*"===i.modifier||"+"===i.modifier;if(Array.isArray(u)){if(!c)throw new TypeError('Expected "'+i.name+'" to not repeat, but got an array');if(0===u.length){if(s)continue;throw new TypeError('Expected "'+i.name+'" to not be empty')}for(var f=0;f<u.length;f++){var h=o(u[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 u&&"number"!=typeof u){if(!s){var v=c?"an array":"a string";throw new TypeError('Expected "'+i.name+'" to be '+v)}}else{if(h=o(String(u),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 ue,"object"===Ht(e[0]))t=ue.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"===Ht(e)?t=ue.from(e):"string"==typeof e&&(t=new ue,"/"==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[un]("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[un]("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[un]("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[un]("resolve route fail",r),this)}},{key:"remove",value:function(e){var t=this;return new Promise((function(n){t[bn].post((function(r){try{if(0===t[nn].length)return r.resolve(),void n(!1);var o,i=[];if(e){var a;if(o=e.root?e.root:null!==(a=t[nn][0].root)&&void 0!==a?a:G,e.all)for(var l=t[nn].length-1;l>0;l--){var u=t[nn][l];u.opsType===oe.Append&&u.root===o&&i.splice(0,0,u)}else if(e.until)for(var s=t[nn].length-1;s>0;s--){var c=t[nn][s];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[Wt](t[vn]);f&&(o=f.name);for(var h=t[nn].length-1;h>0;h--){var v=t[nn][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[nn].forEach((function(e){e.opsType!==oe.Put&&p++})),t[_n](i)){var d,g=0;t[nn].forEach((function(e){e.opsType!==oe.Put&&g++}));var m=g-p;null===(d=t[yn])||void 0===d||d.go(m,!1),r.resolve(),n(!0)}}catch(e){t[un](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[un]("resolve route fail",r),this)}},{key:"close",value:function(e){var t=this;return this[bn].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[nn].length;i++){var a=t[nn][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[_n](o)&&t[en](),n.resolve()}catch(e){n.resolve(),t[un](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[un]("resolve route fail",o),this;console.debug("route to",o.path,o.root);var i=this[In].acquire(o);return null==i?(this[un]("route forbid",o),this):(this[bn].post((function(t){try{var n,r=e[On](o);e[Rn](r),null!==(n=r.session)&&void 0!==n&&n.routeModel||!e[Mn]||e[qn](r),e[Tn](r),e[Pn](r),r.wait((function(n,r){var a=n.session.to;try{var l,u,s=ue.clone(a,!0),c=new yt(s,e[ln]());a.opsType===oe.Replace?null===(l=e[yn])||void 0===l||l.replace(c):null===(u=e[yn])||void 0===u||u.push(c)}catch(e){console.error(e.message,e)}if(e[In].release(i),e[en](a),"function"==typeof o.success)try{Reflect.apply(o.success,{},[])}catch(e){console.error(e.message,e)}!1===e[xn]&&e[An](!0),t.resolve()}),(function(n,r){e[In].release(i),null!==r&&e[un](r,o),!1===e[xn]&&e[An](!1),t.resolve()}))}catch(n){e[In].release(i),e[un](n,o),t.resolve()}})),this)}},{key:"back",value:function(e){var t;null===(t=this[yn])||void 0===t||t.go(-e)}},{key:jn,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:En,value:function(e){var t,n=Nt(this[mn]);try{for(n.s();!(t=n.n()).done;){var r=t.value;try{var o=Reflect.apply(r,{},[e]);if(!1===o)return o}catch(e){console.error(e.message,e)}}}catch(e){n.e(e)}finally{n.f()}return!0}},{key:On,value:function(e){var t,n=this[nn].length>0?this[nn][0]:void 0,r=new le(e,n),o={route:e,find:null};return this[Jt](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"===Ht(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 rt(r)}},{key:Rn,value:function(e){var t,n=this,r=Nt(this[pn]);try{var o=function(){var r=t.value;e.post((function(e){var t=n[jn](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:Pn,value:function(e){var t=this;e.post((function(e){var n,r=Nt(t[dn]);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:Cn,value:function(e,t){var n,r=Nt(this[gn]);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:qn,value:function(e){var t=this,n=e.session,r=Reflect.apply(this[Mn],this,[null==n?void 0:n.to]);if(null!=r&&null!=r){Array.isArray(r)||(r=[r]);var o,i=[],a=Nt(r);try{for(a.s();!(o=a.n()).done;){var l=o.value;this[Fn].has(l)||i.push(l)}}catch(e){a.e(e)}finally{a.f()}0!==i.length&&e.post((function(e){t[Sn].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 u=l[a];if(u){var s=void 0;s=E(u)?u.default:u,Array.isArray(s)&&t.addRoutes(s)}}var c,f=Nt(i);try{for(f.s();!(c=f.n()).done;){var h=c.value;t[Fn].set(h,!0)}}catch(e){f.e(e)}finally{f.f()}e.resolve()}else e.reject()}))}))}}},{key:Tn,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[Jt](o))r=o.find,e.session.routeModel=r;else{if(!t[fn])return void e.reject("not find route model");r=t[fn]}}var i=le.from(e.session);t[Gt](n,r,i).then((function(n){t[vn],e.resolve()}),(function(t){e.reject(t)}))}))}},{key:_n,value:function(e){if(0==e.length)return!0;var t,n=this[vn],r=[],o=Nt(e);try{for(o.s();!(t=o.n()).done;){var i=t.value,a=this[zt](n,i);null!=a&&r.push(It(It({},a),{},{route:i}))}}catch(e){o.e(e)}finally{o.f()}if(0==r.length)return this[un]("can not find view index"),!1;var l,u=Nt(r.reverse());try{for(u.s();!(l=u.n()).done;){var s,c=l.value;this[Vt](n,{x:c.x,y:c.y},[null!==(s=c.route.index)&&void 0!==s?s:0],!0)}}catch(e){u.e(e)}finally{u.f()}return!0}},{key:zt,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:Wt,value:function(e){return e.layers.length>0&&e.layers[0].views.length>0?e.layers[0].views[0]:null}},{key:Vt,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,u=o.slots.value,s=u.length-1;s>=0;s--){var c=u[s];null!=n&&-1==n.indexOf(c.index)||(c.route&&o[de]&&(this[an](c.route),!0===c.active&&c.route.opsType==oe.Append&&(l=!0)),a.push(new xe(o,c.index,t.y)),u.splice(s,1))}if(0==u.length)r?o.slots.value=Dt(u):e.layers[t.y].views.splice(t.x,1);else{if(l){var f=u.length-1,h=u[f];h.active=!0,h.route&&(h.route.active=h.active)}o.slots.value=Dt(u)}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[an](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[cn].length)return new Promise((function(n,r){for(var o=function(n){var r=e[n];if(!t[En](r))return"continue";t[bn].post((function(e){var n,o=t[On](r);t[Rn](o),null!==(n=o.session)&&void 0!==n&&n.routeModel||!t[Mn]||t[qn](o),t[Tn](o),t[Pn](o),o.wait((function(t,n){e.resolve()}),(function(n,r){null!==r&&t[un](r),e.resolve()}))}))},i=0;i<e.length;i++)o(i);t[bn].post((function(e){e.resolve(),n()}))}));var n=this[vn];if(n.layers.length>0){var r=n.layers[0].views;r.length>0&&(r[0].slots.value=[])}return this[nn]=[],this[en](),Promise.resolve()}},{key:Gt,value:function(e,t,n){var r,o=this,i=null!==(r=e.updateType)&&void 0!==r?r:ie.Part;return this[Xt](t).then((function(){o[Yt](t,e,n,i)}))}},{key:Xt,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:Yt,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,u=e.layers[0].models[0],s=this[vn],c=function(e){return 0==e.layers.length||0==e.layers[0].views.length}(s),f=null!==(o=t.root)&&void 0!==o?o:G;if(c||r!=ie.Part||(i=this[zt](s,t)),null==i||null==i)if(c||r===ie.All){if(0==s.layers[0].views.length){var h,v=null!==(h=t.root)&&void 0!==h?h:G;a=new Se(v,!0,null),s.layers[0].views=[a]}else a=s.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>s.layers.length)return Promise.reject("can not insert view(override level)");if(y.rootName){var g,m=Nt(s.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),s.layers[d].views.push(a),i={x:s.layers[d].views.length-1,y:d}}else a=s.layers[i.y].views[i.x];if(l=i.y,a[de]=!0,t.opsType===oe.Append){t.index=N.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,u,t.index,!0);a.slots.value=[].concat(Dt(S),[k]);var A=l+1,j=new xe(a,t.index,l);this[Qt](s,A,e,1,j)}else if(t.opsType===oe.Open){var O,R=a.slots.value,P=!1,C=Nt(R);try{for(C.s();!(O=C.n()).done;){var E=O.value;if(null!==E.route&&ue.isSameForRouteModel(E.route,t)){if(1==E.active)return t.index=E.index,t.active=E.active,E.route=t,Promise.resolve();E.active=!0,P=!0,t.index=E.index,t.active=E.active,E.route=t,this[an](E.route)}else E.active=!1;E.route&&(E.route.active=E.active)}}catch(e){C.e(e)}finally{C.f()}if(!P){t.index=N.get(),t.active=!0;var T=new we(t,u,t.index,!0);R.push(T);var _=l+1,q=new xe(a,t.index,l);this[Qt](s,_,e,1,q)}a.slots.value=Dt(R)}else{var F=a.slots.value;if(0==F.length){t.index=N.get(),a.slots.value=[new we(t,u,t.index)];var M=l+1,I=new xe(a,t.index,l);this[Qt](s,M,e,1,I)}else{var D=F[0];if(D.model!==u){this[Vt](s,i,null,!0),t.index=N.get(),a.slots.value=[new we(t,u,t.index)];var K=l+1,$=new xe(a,t.index,l);this[Qt](s,K,e,1,$)}else{null!==D.route&&this[an](D.route);for(var L=[],U=1;U<F.length;U++)L.push(F[U].index);L.length>0&&this[Vt](s,i,L,!0),t.index=D.index,D.route=t;for(var H=[new xe(a,t.index,l)],B=l+1,J=1,z=new xe(a,t.index,l);H.length>0&&B<s.layers.length&&J<e.layers.length;B++,J++){for(var W=[],V=0;V<s.layers[B].views.length;V++){var X=s.layers[B].views[V];X[me]&&xe.include(H,X[me])&&W.unshift(V)}for(var Y=[],Q=0,Z=W;Q<Z.length;Q++){for(var ee=Z[Q],te=s.layers[B].views[ee],ne=e.layers[J].models,re=void 0,le=0;le<ne.length;le++)if(te.name===ne[le].name){re=ne[le];break}if(re){var se=te.slots.value;if(0==se.length){te.slots.value=[new we(null,re,0)];var ce=B+1,fe=J+1;this[Qt](s,ce,e,fe,z)}else{var he=se[0];if(he.model!==re){this[Vt](s,{x:ee,y:B},null,!0),te.slots.value=[new we(null,re,0)];var ve=B+1,ye=J+1;this[Qt](s,ve,e,ye,z)}else{te[de]&&null!==he.route&&this[an](he.route);for(var pe=[],be=1;be<se.length;be++)pe.push(se[be].index);pe.length>0&&this[Vt](s,{x:ee,y:B},pe,!0),Y.push(new xe(te,he.index,B))}}te[de]=!1}else this[Vt](s,{x:ee,y:B},null,!1)}H=Y}this[Qt](s,B,e,J,z)}}}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[on](t)}},{key:Qt,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,u=e.layers[a].views,s=Nt(n.layers[i].models);try{for(s.s();!(l=s.n()).done;){var c=l.value,f=new Se(c.name,!1,o),h=new we(null,c);f.slots.value=[h],u.push(f)}}catch(e){s.e(e)}finally{s.f()}}for(;i<n.layers.length;i++){var v=new ke;v.views=[];var y,p=Nt(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[vn].layers.length)return null;if(t<this[vn].layers.length){var a,l=null,u=Nt(this[vn].layers[t].views);try{for(u.s();!(a=u.n()).done;){var s,c,f=a.value,h=!1;if(null!==n?(h=f.name===e&&(null===(s=f[ge])||void 0===s?void 0:s.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){u.e(e)}finally{u.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[vn].layers.length){var d=new ke;d.views=[p],this[vn].layers.push(d)}else this[vn].layers[t].views.push(p);return p}}])&&Lt(t.prototype,n),e}(),Kn="fox-router-view";function $n(e){return($n="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 Ln(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 Un(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 Hn(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 Bn(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 Jn(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 Wn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.beforeShow)&&void 0!==t?t:e.beforeEnter}function Vn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.show)&&void 0!==t?t:e.enter}function Gn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.afterShow)&&void 0!==t?t:e.afterEnter}function Xn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.showCancelled)&&void 0!==t?t:e.enterCancelled}function Yn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.hide)&&void 0!==t?t:e.leave}function Qn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.afterHide)&&void 0!==t?t:e.afterLeave}function Zn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.hideCancelled)&&void 0!==t?t:e.leaveCancelled}function er(e){var t,n,r,o,i,a=e.duration;return"object"==$n(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 tr(e,t){e.classList.contains(t)||e.classList.add(t)}function nr(e,t){e.classList.remove(t)}if(_e){var rr=qe();Nn=rr.requestAnimationFrame.bind(rr)}else Nn=setTimeout;function or(e){Nn(e)}function ir(e,t,n){O(t)&&(null==e&&(e={}),Reflect.apply(t,e,n))}function ar(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 u=["animationend","transitionend"],s=function o(a){u.forEach((function(e){Ne(t,e,o)})),Reflect.apply(i,e,[t,n,r]),l&&Reflect.apply(l,e,[])};u.forEach((function(e){Ie(t,e,s)}))}if(O(a)){var c="animationcancel",f=function o(i){Reflect.apply(a,e,[t,n,r]),Ne(t,c,o)};Ie(t,c,f)}}function lr(e){return null!==e&&(e.opsType===oe.Append||e.opsType===oe.Open)}function ur(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:-1;if(t||lr(o)){var a=Ln(r,t);a&&tr(n,a);var l=Un(r,t);l&&tr(n,l);var u=Wn(r,t);ir(e,u,[n,t,o,i])}}function sr(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},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(lr(i)||t){var u=Ln(r,t),s=Un(r,t),c=Hn(r,t),f=Vn(r,t),h=Gn(r,t),v=Xn(r,t);or((function(){ar(e,n,i,a,o,(function(){s&&nr(n,s),c&&nr(n,c),O(h)&&ir(e,h,[n,t,i,a]),O(l)&&l(e,l,[n])}),(function(){O(v)&&ir(e,v,[n,t,i,a])})),u&&nr(n,u),c&&tr(n,c),O(f)&&ir(e,f,[n,t,i,a])}))}else O(l)&&l(e,l,[n])}function cr(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},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,u=arguments.length>8?arguments[8]:void 0;if(lr(a)||t){var s=Bn(r,t),c=Jn(r,t),f=zn(r,t),h=Yn(r,t),v=Qn(r,t),y=Zn(r,t);s&&tr(n,s),c&&tr(n,c),O(h)&&ir(e,h,[n,t,a,l]),or((function(){ar(e,n,a,l,o,(function(){c&&nr(n,c),f&&nr(n,f),O(v)&&ir(e,v,[n,t,a,l]),O(u)&&ir(e,u,[n]),!t&&O(i)&&i()}),(function(){O(y)&&ir(e,y,[n,t,a,l]),O(u)&&ir(e,u,[n]),!t&&O(i)&&i()})),s&&nr(n,s),f&&tr(n,f)}))}else!t&&O(i)&&i()}function fr(e){return e.elm}function hr(e){return(hr="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 vr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yr(e){return function(e){if(Array.isArray(e))return dr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||pr(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 pr(e,t){if(e){if("string"==typeof e)return dr(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)?dr(e,t):void 0}}function dr(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 gr=Symbol("ruvc"),mr=Symbol("cvs");function br(e,t,n){return"function"==typeof e?Reflect.apply(e,{},[t,n]):e}function wr(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=yr(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(yr(r),yr(i)):"function"==typeof i&&(r=[].concat(yr(r),[i]))}return function(e){r.forEach((function(e){Reflect.apply(e,n,[])}))}}return function(){}}var Sr=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),vr(this,"node",void 0),vr(this,"state",void 0),this.node=t,this.state=n},xr={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,Function],required:!1},tag:{type:[String,Function,Object],required:!1,default:"div"},tagProps:{type:[Object,Function],required:!1,default:function(){return{}}},viewTag:{type:[String,Function,Object],required:!1,default:"div"},viewTagData:{type:[Object,Function],required:!1,default:function(){return{}}},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},viewInactiveClass:{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},beforeEnter:{type:Function,required:!1},enter:{type:Function,required:!1},afterEnter:{type:Function,required:!1},enterCancelled:{type:Function,required:!1},beforeLeave:{type:Function,required:!1},leave:{type:Function,required:!1},afterLeave:{type:Function,required:!1},leaveCancelled:{type:Function,required:!1},beforeShow:{type:Function,required:!1},show:{type:Function,required:!1},afterShow:{type:Function,required:!1},showCancelled:{type:Function,required:!1},beforeHide:{type:Function,required:!1},hide:{type:Function,required:!1},afterHide:{type:Function,required:!1},hideCancelled:{type:Function,required:!1},duration:{type:[Number,Object],required:!1}},render:function(e,t){var n,s=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)[gr]||(n[gr]={}),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,u,A.index,j);var R=A.route;R&&v(t.parent,r,R,j);var P,C=vr({attrs:{}},h,j);if(A.model.props)if("object"===hr(A.model.props))Object.assign(C.attrs,A.model.props);else if(!0===A.model.props&&"object"===hr(null===(P=A.route)||void 0===P?void 0:P.params)){var E;Object.assign(C.attrs,null===(E=A.route)||void 0===E?void 0:E.params)}return c(A.model.component,C,t.children)}if(null==f)return console.error("router is not been register"),c();var T=y(t.parent,l,null),_=y(t.parent,u,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 F=w[mr];F||(F=w[mr]=new Map);for(var M=new Map,I=[],N=q.slots.value,D=[],$=function(e){var t,n,r,o=N[e],i="".concat(d.name,"-").concat(o.index),a=null===(t=br(d.transition,o.route,e))||void 0===t||t,l=c(Kn,{props:{name:i,modelSlot:o}}),u={},f=br(d.viewClass,o.route,e);"string"==typeof f&&f.length>0&&(u[f]=!0);var h=br(d.viewActiveClass,o.route,e),v=br(null!==(n=d.viewInactiveClass)&&void 0!==n?n:d.viewDeactiveClass,o.route,e),y=F.get(i);if("string"==typeof h&&h.length>0&&(u[h]=o.active),"string"==typeof v&&v.length>0&&(u[v]=!o.active),y&&o.active!==y.state){var p=y.node;if(o.active){var g=null;p&&p.children&&p.children.length>0&&(g=wr(p.children[0],"activated")),D.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=fr(t);if(null!=l)if(i){var u=er(n);ur(e,!0,l,n,r,o),sr(e,!0,l,n,u.show,r,o,(function(e){O(a)&&a("from enter")}))}else O(a)&&a();else O(a)&&a()}(s,p,d,o.route,e,a,g)}))}else{if(p&&p.children&&p.children.length>0){var m=wr(p.children[0],"deactivated");try{K(m)}catch(e){console.error(e)}}D.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=fr(t);null!=l&&i?cr(e,!0,l,n,er(n).hide,null,r,o,(function(e){O(a)&&a("from leave")})):O(a)&&a()}(s,p,d,o.route,e,a)}))}}var b={class:u,key:i},w=null!==(r=br(d.viewTagData,o.route,e))&&void 0!==r?r:{};null!==w&&"object"===hr(w)&&Object.assign(b,w);var S=br(d.viewTagProps,o.route,e);null!==S&&"object"===hr(S)&&(b.props=S);var x=br(d.viewTagAttrs,o.route,e);null!==x&&"object"===hr(x)&&(b.attrs=x),o.route.viewTagAttrs&&"object"===hr(o.route.viewTagAttrs)&&(b.attrs?Object.assign(b.attrs,o.route.viewTagAttrs):b.attrs=o.route.viewTagAttrs);var k=br(d.viewTag,o.route,e),A=c(k,b,[l]);if(M.set(i,new Sr(A,o.active)),a){var j=function(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=er(t);return{create:function(e,i){var a=fr(i);ur(e,!1,a,t,n,r),sr(e,!1,a,t,o.enter,n,r)},activate:function(e,i){var a=fr(i);ur(e,!1,a,t,n,r),sr(e,!1,a,t,o.enter,n,r)},remove:function(e,i){cr(e,!1,fr(e),t,o.leave,i,n,r)}}}(s,d,o.route,e);A.data.hook=j}I.push(A)},L=0;L<N.length;L++)$(L);var U,H=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=pr(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}}}}(F.keys());try{for(H.s();!(U=H.n()).done;){var B=U.value;M.has(B)||p(t.parent,B)}}catch(e){H.e(e)}finally{H.f()}w[mr]=M,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};or((function(){for(var n=function(n){K((function(){Reflect.apply(e[n],t,[])}))},r=0;r<e.length;r++)n(r)}))}(D,s);var J=br(d.tag,null,-1),z={};for(var W in b)"props"!==W&&(z[W]=b[W]);var V=br(d.tagProps,null,-1);return null!==V&&"object"===hr(V)&&(z.props=V),c(J,z,I)}v(t.parent,a,-1),v(t.parent,o,S+1),v(t.parent,u,-1);var G=q.slots.value;if(G.length>0){var Y=G[0],Q=Y.route;console.info("---------- single view route",Q,x),Q?v(t.parent,r,Q):x&&x.slots.value.length>0&&(Q=x.slots.value[0].route,v(t.parent,r,Q));var Z=vr({},h,"");for(var ee in b)"props"!==ee&&(Z[ee]=b[ee]);null!==Z.attrs&&"object"===hr(Z.attrs)||(Z.attrs={});var te,ne=Y.model;if(ne.props)if("object"===hr(ne.props))Object.assign(Z.attrs,ne.props);else if(!0===ne.props&&"object"===hr(null===(te=Y.route)||void 0===te?void 0:te.params)){var re;Object.assign(Z.attrs,null===(re=Y.route)||void 0===re?void 0:re.params)}return null!==d.passProps&&"object"===hr(d.passProps)&&Object.assign(Z.attrs,d.passProps),c(ne.component,Z,[])}}};function kr(e){return(kr="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 Ar,jr={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,n,r=this.$router,o=this.$route,i={},a=r.options.linkActiveClass,l=r.options.linkExactActiveClass,u=null==a?"fox-router-link-active":a,s=null==l?"fox-router-link-exact-active":l,c=null==this.activeClass?u:this.activeClass,f=null==this.exactActiveClass?s:this.exactActiveClass;i[f]=(t=o,n=this.to,!!t&&("object"===kr(n)?n.path?t.path===n.path:t.name===n.name:"/"===n.charAt(0)?t.path===n:t.name===n)),i[c]=this.exact?i[f]:function(e,t){return!!e&&("object"===kr(t)?t.path?0===e.path.indexOf(t.path):e.name===t.name:"/"===t.charAt(0)?0===e.path.indexOf(t):e.name===t)}(o,this.to);var h=r[Y](this.to),v=function(e){Or(e)&&r.to(h)},y={click:Or};Array.isArray(this.event)?this.event.forEach((function(e){y[e]=v})):y[this.event]=v;var p={class:i},d="#".concat(h.path);if("a"===this.tag)p.on=y,p.attrs={href:d};else{var g=Rr(this.$slots.default);if(g){g.isStatic=!1;var m=g.data=extend({},g.data);for(var b in m.on=m.on||{},m.on){var w=m.on[b];b in y&&(m.on[b]=Array.isArray(w)?w:[w])}for(var S in y)S in m.on?m.on[S].push(y[S]):m.on[S]=v;(g.data.attrs=extend({},g.data.attrs)).href=d}else p.on=y}return e(this.tag,p,this.$slots.default)}};function Or(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 Rr(e){if(e)for(var t,n=0;n<e.length;n++){if("a"===(t=e[n]).tag)return t;if(t.children&&(t=Rr(t.children)))return t}}function Pr(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 Cr(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"}(Ar||(Ar={}));var Er=Symbol("registerKey"),Tr=function e(t,n){Cr(this,e),this.callback=t,this.policy=n},_r=function(){function e(){Cr(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,Er,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[Er].get(e);r||(r=new Array,this[Er].set(e,r));var o=!0===n?Ar.once:Ar.limitless,i=new Tr(t,o);return r.push(i),this}},{key:"off",value:function(e,t){if(!t)return this[Er].delete(e),this;var n=this[Er].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),u=[].splice.call(n,0,a),s=function(t){e.once(u[t],(function(e){l[t]=e,0==(a-=1)&&Reflect.apply(i,{},l)}))},c=0;c<u.length;c++)s(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[Er].get(e);if(!o)return this;for(var i=function(e){var t=o[e];if(t.policy==Ar.once?o.splice(e,1):e++,"function"==typeof t.callback)try{K((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))}}])&&Pr(t.prototype,n),e}();function qr(e){return(qr="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 Fr={type:"GET",async:!0,contentType:"application/x-www-form-urlencoded",dataType:"string",cache:!1,timeout:3e4,processData:!0};function Mr(e){var t=new XMLHttpRequest,n={};if(_(!0,n,Fr),_(!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"===qr(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 u="".concat(encodeURIComponent(o),"=").concat(encodeURIComponent(i));r.length>0&&(r+="&"),r+=u}}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"===qr(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"===qr(e)?JSON.stringify(e):e:0===t.indexOf("application/json")&&"object"===qr(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 Ir(e){return(Ir="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 Nr(e,t){return(Nr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dr(e,t){if(t&&("object"===Ir(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 Kr(e){return(Kr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $r(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 Lr(e,t,n){return t&&$r(e.prototype,t),n&&$r(e,n),e}function Ur(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Br=Symbol("idKey"),Jr=Symbol("valueKey"),zr=Symbol("childrenKey"),Wr=Symbol("growKey"),Vr=function e(t){Ur(this,e),Hr(this,Wr,!0),Hr(this,Jr,c()),Hr(this,zr,new Map),this[Br]=t},Gr=function(){function e(){Ur(this,e)}return Lr(e,[{key:"get",value:function(e,t){if("value"==t)return e[Jr].value;if("grow"===t)return e[Wr];var n=e[zr].get(t);return n?Qr(n):e[Wr]?((n=Yr(t))[Wr]=e[Wr],e[zr].set(t,n),Qr(n)):void 0}},{key:"set",value:function(e,t,n){return"value"==t?(e[Jr].value=n,!0):"grow"===t?(e[Wr]=$(n),!0):null==n?(e[zr].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[zr].delete(t),!0)}}]),e}(),Xr="__proxy__";function Yr(e){var t=new Vr(e);return Reflect.set(t,Xr,new Proxy(t,new Gr)),t}function Qr(e){return Reflect.get(e,Xr)}var Zr=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&&Nr(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=Kr(t);if(n){var o=Kr(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Dr(this,e)});function o(){return Ur(this,o),r.call(this,"__root__")}return Lr(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[zr].has(r)?o=t[zr].get(r):(o=Yr(r),t[zr].set(r,o)),t=o}return t[Jr].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[zr].has(r))return;t=t[zr].get(r)}return t[Jr].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[zr].has(r))return!1;t=t[zr].get(r)}var o=e-1<0||arguments.length<=e-1?void 0:arguments[e-1];return!!t[zr].has(o)&&(t[zr].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[zr].has(r))return!1;t=t[zr].get(r)}var o=e-1<0||arguments.length<=e-1?void 0:arguments[e-1];return t[zr].has(o)}},{key:"clear",value:function(){this[zr].clear()}}]),o}(Vr),eo=(Symbol("treeKey"),["put","get","contains","remove","clear"]);function to(e){return eo.includes(e)}var no=function(){function e(){Ur(this,e)}return Lr(e,[{key:"get",value:function(e,t){if("value"==t)return e[Jr].value;if("grow"===t)return e[Wr];if(t===zr)return e[zr];if("string"==typeof t&&to(t))return e[t];var n=String(t),r=e[zr].get(n);return r?Qr(r):e[Wr]?((r=Yr(n))[Wr]=e[Wr],e[zr].set(n,r),Qr(r)):void 0}},{key:"set",value:function(e,t,n){return"value"==t?(e[Jr].value=n,!0):"grow"===t?(e[Wr]=$(n),!0):!to(t)&&(null==n?(e[zr].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[zr].delete(t),!0)}}]),e}(),ro=new Proxy(Zr,{construct:function(e){return Qr((t=new Zr,n=new no,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,Xr,r),t));var t,n,r,o}}),oo={get each(){return W},get type(){return U},get isFunction(){return O},get isArray(){return j},get isArrayLike(){return B},get makeArray(){return z},get merge(){return J},get isWindow(){return H},get isPlainObject(){return P},get isEqual(){return V},get isESModule(){return E}};function io(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 ao(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?io(Object(n),!0).forEach((function(t){lo(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):io(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function lo(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 uo=new Dn({}),so=new ro,co=new _r,fo=!1,ho=ao(ao({},oo),{},{get router(){return uo},get bus(){return so},get Bus(){return ro},get eventproxy(){return co},get EventProxy(){return _r},get EventChain(){return rt},get require(){return uo.require},get ajax(){return Mr},get extend(){return _},get clone(){return q},install:function(e){fo||(fo=!0,function(e){n=e}(e),e.component(Kn,xr),e.component("fox-router-link",jr),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];co.on(e,t,n)},e.prototype.$fox_off=function(e,t){co.off(e,t)},e.prototype.$fox_once=function(e,t){co.once(e,t)},e.prototype.$fox_all=function(){for(var e=co,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=co,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=co,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 yo}}),Symbol("rk");var n,r=Symbol("crk"),o=Symbol("vd"),i=Symbol("rv"),a=Symbol("rvi"),l=Symbol("pv"),u=Symbol("pvi"),s=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[s]},set:function(e){return r[s]=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 u=(r=i.$vnode?i.$vnode.data:{})[h];void 0!==u&&(o=u),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 u=e.charCodeAt(l);if(!(u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||95===u))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,u=0,s="",c=function(e){if(u<n.length&&n[u].type===e)return n[u++].value},f=function(e){var t=c(e);if(void 0!==t)return t;var r=n[u],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};u<n.length;){var v=c("CHAR"),y=c("NAME"),p=c("PATTERN");if(y||p){var d=v||"";-1===o.indexOf(d)&&(s+=d,d=""),s&&(a.push(s),s=""),a.push({name:y||l++,prefix:d,suffix:"",pattern:p||i,modifier:c("MODIFIER")||""})}else{var g=v||c("ESCAPED_CHAR");if(g)s+=g;else if(s&&(a.push(s),s=""),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),u=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)},s=1;s<r.length;s++)u(s);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,u=void 0===l||l,s=n.encode,c=void 0===s?function(e){return e}:s,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(u)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 R=Array.isArray,j=function(e){return"function"==typeof e},O=Object.prototype.toString,P=function(e){return"[object Object]"===function(e){return O.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 u=t[i];for(var s in u){var c=o[s],f=u[s];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[s]=_(l,h,f)}else void 0!==f&&(o[s]=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),u=x(l);try{for(u.s();!(a=u.n()).done;){var s=a.value,c=e[s],f=t[s];if(c!==f)if("object"===A(f)){if(!Array.isArray(f)&&!P(f))continue;c=q(c,f,n),e[s]=c}else{if("function"==typeof f)continue;e[s]=f}}}catch(e){u.e(e)}finally{u.f()}}else _(!0,e,t);return e}var F,M,I,N=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}();F=N,M="seed",I=(new Date).getTime(),M in F?Object.defineProperty(F,M,{value:I,enumerable:!0,configurable:!0,writable:!0}):F.seed=I;var K=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!==K?n&&n.length>0?K.then((function(){e(n)})):K.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 J(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 z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=t;return null!=e&&(B(Object(e))?J(n,"string"==typeof e?[e]:e):n.push(e)),n}function W(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}(),ue=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,u=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(u.s();!(l=u.n()).done;){var s=l.value;r[s]=t[s]}}catch(e){u.e(e)}finally{u.f()}}return n}}]),e}(),se=function(){function e(t,n,r,o){ne(this,e),this.id=N.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[s]},set:function(e){return r[s]=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 Re(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 je(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Pe,Ee,Ce=function e(){Oe(this,e)},Te=function(){function e(){Oe(this,e),je(this,"forbidTime",300),je(this,"submitRecorder",new Ce)}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)}}])&&Re(t.prototype,n),e}(),_e="undefined"!=typeof window,qe=function(){return window},Fe=function(){return window.document};function Me(){if(!_e)return"/";var e,t,n=qe().location;return"".concat(n.protocol,"//").concat(n.host)+((t=(e=n.pathname).lastIndexOf("/"))>0&&t<e.length-1?e=e.substring(0,t+1):0===t&&-1!==e.indexOf(".")?e="/":-1===t&&(e=-1==e.indexOf(".")?"/".concat(e,"/"):"/"),0!==e.indexOf("/")&&(e="/".concat(e)),e)}function Ie(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on".concat(t),n):e["on".concat(t)]=n}function Ne(e,t,n){e.removeEventListener?e.removeEventListener(t,n):e.detachEvent?e.detachEvent("on".concat(t),n):e["on".concat(t)]=null}function Ke(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)}}Me(),function(e){e[e.Loading=0]="Loading",e[e.Loaded=1]="Loaded",e[e.Defining=2]="Defining",e[e.Defined=3]="Defined"}(Pe||(Pe={})),function(e){e[e.normal=0]="normal",e[e.factory=1]="factory"}(Ee||(Ee={}));var De,$e=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,"register",new Map)}var t,n;return t=e,(n=[{key:"get",value:function(e){var t;return null!==(t=this.register.get(e))&&void 0!==t?t:null}},{key:"set",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),null!=t?t:null}},{key:"has",value:function(e){return this.register.has(e)}},{key:"clear",value:function(){this.register.clear()}}])&&Ke(t.prototype,n),e}();function Le(e){return(Le="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 Ue(e){return function(e){if(Array.isArray(e))return He(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 He(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)?He(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 He(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 Be(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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 ze(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"}(De||(De={}));var We=Symbol("chainKey"),Ve=Symbol("cursorKey"),Ge=Symbol("$persistentModeKey"),Xe=Symbol("statusKey"),Ye=Symbol("argsKey"),Qe=Symbol("exArgsKey"),Ze=Symbol("successFnsKey"),et=Symbol("errorFnsKey"),tt=Symbol("sessionKey"),nt=Symbol("_go"),rt=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Be(this,e),ze(this,We,[]),ze(this,Ve,0),ze(this,Ge,!1),ze(this,Xe,De.Free),ze(this,Ye,[]),ze(this,Qe,[]),ze(this,Ze,[]),ze(this,et,[]),this[tt]=t,this[Ge]=n}var t,n;return t=e,(n=[{key:"session",get:function(){return this[tt]}},{key:nt,value:function(e){var t=this,n=this[Xe];this[Xe]=De.Busy,this[Ve]+=e,this[Ve]<0&&(this[Ve]=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[Ye]=o,n===De.Exception||n===De.Reject){var a=function(){for(var e=[{session:t[tt]}].concat(Ue(t[Qe]));t[et].length>0;)try{!function(){var n=t[et].shift();"function"==typeof n&&D((function(){Reflect.apply(n,{},e)}))}()}catch(e){console.error(e.message,e)}return t[Xe]=n,t[We]=[],t[Ve]=0,{v:t}}();if("object"===Le(a))return a.v}else if(n===De.Finished||this[Ve]>=this[We].length){var l=function(){for(var e=[{session:t[tt]}].concat(Ue(t[Ye])),n=function(){var n=t[Ze].shift();"function"==typeof n&&D((function(){Reflect.apply(n,{},e)}))};t[Ze].length>0;)n();return t[Xe]=De.Free,{v:t}}();if("object"===Le(l))return l.v}if(this[Ve]>=this[We].length)return this[Xe]=De.Free,this;var u=this[We][this[Ve]];this[Ge]||(this[We].splice(0,this[Ve]+1),this[Ve]=-1);var s=this[Ve]+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[nt],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[nt],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[We].splice(s,0,e),s++)},session:this[tt]};D((function(){Reflect.apply(u,{},[f].concat(Ue(t[Ye])))}))}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[nt],this,[e].concat(n))}},{key:"finish",value:function(){this[Xe]=De.Finished;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this[Ye]=t,Reflect.apply(this[nt],this,[0])}},{key:"reject",value:function(){this[Xe]=De.Reject;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this[Qe]=t,Reflect.apply(this[nt],this,[0])}},{key:"throw",value:function(){this[Xe]=De.Exception;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this[Qe]=t,Reflect.apply(this[nt],this,[0])}},{key:"reset",value:function(){var e=this;this[Xe]=De.Busy;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];this[Ye]=n,this[We]=[],this[Ve]=0;for(var o={session:this[tt]},i=[o].concat(Ue(this[Ye])),a=function(){var t=e[Ze].shift();D((function(){Reflect.apply(t,e,i)}))};this[Ze].length>0;)a();return this[Xe]=De.Free,this}},{key:"post",value:function(e){return this[Xe]===De.Reject||this[Xe]===De.Exception||(Array.isArray(e)?this[We]=[].concat(Ue(this[We]),Ue(e)):this[We].push(e),this[Xe]===De.Busy||Reflect.apply(this[nt],this,[0].concat(Ue(this[Ye])))),this}},{key:"wait",value:function(e,t){return e&&"function"==typeof e&&this[Ze].push(e),t&&"function"==typeof t&&this[et].push(t),this[Xe]===De.Busy||Reflect.apply(this[nt],this,[0].concat(Ue(this[Ye]))),this}},{key:"exception",value:function(e){return e&&"function"==typeof e&&this[et].push(e),this[Xe]===De.Busy?this:Reflect.apply(this[nt],this,[0].concat(Ue(this[Ye])))}},{key:"isFinish",value:function(){return this[Xe]==De.Reject||this[Xe]==De.Free&&this[Ve]>=this[We].length}}])&&Je(t.prototype,n),e}();function ot(e){return(ot="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 it(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function at(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 lt(e,t,n){return t&&at(e.prototype,t),n&&at(e,n),e}function ut(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var st=function(){function e(){it(this,e),ut(this,"moduleManager",new $e),ut(this,"options",{paths:{},alias:{},nature:[],timeout:3e3})}return lt(e,[{key:"paths",get:function(){return this.options.paths},set:function(e){this.options.paths=e}},{key:"alias",get:function(){return this.options.alias},set:function(e){this.options.alias=e}},{key:"naturePaths",get:function(){return this.options.nature},set:function(e){this.options.nature=e}},{key:"timeout",get:function(){return this.options.timeout},set:function(e){this.options.timeout=e}},{key:"query",get:function(){return this._query},set:function(e){this._query=e}},{key:"head",get:function(){return Fe().head}},{key:"setModule",value:function(e,t){var n={id:e,src:"",status:Pe.Defined};"function"==typeof t?(n.exports=t,n.type=Ee.factory):n.exports=t,this.moduleManager.set(e,n)}},{key:"removeModule",value:function(e){this.moduleManager.remove(e)}},{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=t.length-1,i={};"object"===ot(t[o])&&(Object.assign(i,t[o]),o--);var a=null;"function"==typeof t[o]&&(a=t[o],o--);for(var l=0;l<=o;l++)if(Array.isArray(t[l]))for(var u=t[l],s=0;s<u.length;s++)u[s]&&r.push(this.resolvePath(u[s]));else if("string"==typeof t[l])for(var c=t[l].split(","),f=0;f<c.length;f++)c[f]&&r.push(this.resolvePath(c[f]));for(var h=new ft(r.length,(function(e,t){if(h.isOK())try{"function"==typeof a&&Reflect.apply(a,{},t)}catch(e){console.error(e.message,e)}else try{console.error(e),"function"==typeof a&&Reflect.apply(a,{},[])}catch(e){console.error(e.message,e)}})),v=new rt,y=0;y<r.length;y++){var p=new ht(y,r[y],i,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"===ot(n[i])&&(Object.assign(a,n[i]),i--);var l=null;"function"==typeof n[i]&&(l=n[i],i--);for(var u=0;u<=i;u++)if(Array.isArray(n[u]))for(var s=n[u],c=0;c<s.length;c++)s[c]&&o.push(this.resolvePath(s[c]));else for(var f=n[u].split(","),h=0;h<f.length;h++)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("exports"!==t.src)if("module"!==t.src){if(this.isNaturePath(t.src)){var n=t.params.jsPoint;return n||(n=this.head),void this.mountJS(e,t,n)}if(this.isNaturePath(t.src)){var r=t.params.cssPoint;return r||(r=this.head),void this.mountCSS(e,t,r)}var o=this.getFileNamePostfix(t.src);if("js"===o||0===o.length){var i=t.params.jsPoint;return i||(i=this.head),void this.mountJS(e,t,i)}if("css"===o){var a=t.params.cssPoint;return a||(a=this.head),void this.mountCSS(e,t,a)}}else e.post((function(e){t.progress.work(!0,t.index,"module"),e.resolve()}));else e.post((function(e){t.progress.work(!0,t.index,"exports"),e.resolve()}))}},{key:"mountCSS",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==Pe.Defined||i.status==Pe.Loaded)&&i.exports)return i.type===Ee.factory&&"function"==typeof i.exports?t.progress.work(!0,t.index,i.exports()):t.progress.work(!0,t.index,i.exports),void e.resolve();var a=Fe(),l=a.createElement("link");if(Reflect.has(l,"onload"))l.onload=function(){l.onload=null,l.onerror=null,t.progress.work(!0,t.index,t.src),e.resolve()},l.onerror=function(){try{n.removeChild(l)}catch(e){console.error(e.message,e)}l.onload=null,l.onerror=null,t.progress.work(!1,t.index,null),e.reject()};else{var u,s={timeout:null!==(u=r.options.timeout)&&void 0!==u?u:3e3,time:0,success:function(){t.progress.work(!0,t.index,t.src),e.resolve()},error:function(){try{n.removeChild(l)}catch(e){console.error(e.message,e)}t.progress.work(!1,t.index,null),e.resolve()}};setTimeout((function(){ct(l,s)}),1)}var c=a.getElementById(o);c&&c.parentNode&&c.parentNode.removeChild(c),l.rel="stylesheet",l.type="text/css",l.id=o,l.href=o,n.appendChild(l)}))}},{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==Pe.Defined||i.status==Pe.Loaded)){if(i.exports)return i.type===Ee.factory&&"function"==typeof i.exports?t.progress.work(!0,t.index,i.exports()):t.progress.work(!0,t.index,i.exports),void e.resolve();if(document.querySelector("script[src='".concat(o)))return t.progress.work(!0,t.index,i.exports),void e.resolve()}i={id:o,src:o,status:Pe.Loading},r.moduleManager.set(o,i);var a=Fe().createElement("script");if("onload"in a)a.onload=function(){a.onload=null,a.onerror=null,i.status==Pe.Loading&&(i.status=Pe.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=null,a.onerror=null,r.moduleManager.remove(o),t.progress.work(!1,t.index,null),e.resolve()};else{var l=a;l.onreadystatechange=function(){/loaded|complete/.test(l.readyState)&&(l.onreadystatechange=null,i.status==Pe.Loading&&(i.status=Pe.Loaded,t.progress.work(!0,t.index,o)),e.resolve())}}a.defer=!0,a.src=o,qe().define=r.createDefine(i,t),n.appendChild(a)}))}},{key:"unmount",value:function(e){var t=Fe(),n=this.getFileNamePostfix(e);if("js"===n||0===n.length){var r=t.querySelector('script[src="'.concat(e,'"]'));return r&&r.parentNode&&r.parentNode.removeChild(r),void this.moduleManager.remove(e)}if("css"!==n);else{var o=t.querySelector('style[href="'.concat(e,'"]'));o&&o.parentNode&&o.parentNode.removeChild(o)}}},{key:"trimEmptyElement",value:function(e){for(var t=[],n=0;n<e.length;n++)if(void 0!==e[n]&&null!==e[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=Pe.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(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var a=r.map((function(t){return"exports"===t?(e.exports&&"object"===ot(e.exports)||(e.exports={}),e.exports):"module"===t?e:t}));if("function"==typeof i){var l=Reflect.apply(i,e,a);l&&"object"===ot(l)&&(e.exports=l)}else e.exports=i;e.status=Pe.Defined,t.progress.work(!0,t.index,e.exports)})):(e.exports="function"==typeof i?Reflect.apply(i,e,[]):i,e.status=Pe.Defined,t.progress.work(!0,t.index,e.exports))};return r.amd=!0,r}},{key:"resolvePath",value:function(e){try{if("exports"===e||"module"===e)return e;if(this.isNaturePath(e))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&&(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){if(!this.options.nature)return!1;if("function"==typeof this.options.nature)return this.options.nature(e);var t=this.options.nature;if(t&&Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(0===e.indexOf(r))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"".concat(Me()).concat(e.slice(1));if(0==e.indexOf("./"))return"".concat(Me()).concat(e.slice(2));if(0==e.indexOf("//")){var n=qe();return"".concat(n.location.protocol).concat(e)}if(t){var r=this.options.alias[e];if(!r){var o=e.indexOf("/");if(-1==o)r=e;else{var i=e.slice(0,o),a=this.options.paths[i];r=a?a+e.slice(o):e}}return this.parserPath(r,!1)}return"".concat(Me()).concat(e)}}]),e}();function ct(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.timeout>t.timeout?t.error():ct(e,t)}),20)}var ft=function(){function e(t,n){it(this,e),this.size=t,this.callback=n,this.status=!0,this.values=[],this.lastIndex=-1}return lt(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}(),ht=function e(t,n,r,o){it(this,e),this.index=t,this.src=n,this.params=r,this.progress=o},vt=Symbol("_notifyChange"),yt=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 pt(e){return(pt="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 dt(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 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}}(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 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 mt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bt(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 wt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var St=Symbol("ignoreHistoryChangeOnceKey"),xt=Symbol("_navigateFirstRoute"),kt=Symbol("_getRouteMark"),At=Symbol("_getUrlSearch"),Rt=Symbol("_generateLocation"),jt=Symbol("_setRouteMarkRecorder"),Ot=Symbol("beforeRestoreFiltersKey"),Pt=Symbol("_beforeRestore"),Et="Symbol(_fox_restore_point)";function Ct(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 Tt=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;mt(this,e),wt(this,"firstNavigate",!0),wt(this,"traceless",!1),wt(this,St,!1),wt(this,Ot,new Array),this.mode=t,this.base=n,this.query=r,this.firstNavigate=o,this.historyMonitor=i,this.traceless=a,this.storage=null!=l?l:qe().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=qe();return"function"!=typeof this.historyChange&&(this.historyChange=function(){if(e[St])e[St]=!1;else if(Ct(e.historyMonitor)){var t=n.history.state;e[vt](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[kt]())&&void 0!==o?o:"/";e[jt](i,r)}}catch(e){}}}),Ie(n,"popstate",this.historyChange),this.firstNavigate&&t&&this[xt](),Promise.resolve()}},{key:"destroy",value:function(){this.historyChange&&Ne(qe(),"popstate",this.historyChange)}},{key:Pt,value:function(e,t){var n,r=dt(this[Ot]);try{for(r.s();!(n=r.n()).done;){var o=n.value;try{var i=Reflect.apply(o,{},[e,t]);if(!1===i)return i}catch(e){console.error(e.message,e)}}}catch(e){r.e(e)}finally{r.f()}return!0}},{key:"beforeRestoreEach",value:function(e){this[Ot].push(e)}},{key:"removeBeforeRestoreEach",value:function(e){var t=this[Ot].indexOf(e);return-1!==t&&(this[Ot].splice(t,1),!0)}},{key:xt,value:function(){var e,t=this,n=null!==(e=this[kt]())&&void 0!==e?e:"/",r=this.storage.getItem(Et);if(r)try{var o=JSON.parse(r);if(o.mark===n&&Array.isArray(o.routes)&&o.routes.length>0&&o.routes.filter((function(e){return t[Pt](e,n)})).length>0)return void this[vt](o.routes)}catch(e){}var i,a=n.indexOf("!");i=-1!=a?n.substring(a+1):n;var l=new ue;l.path=i,l.query=this[At](),this[vt]([l])}},{key:jt,value:function(e,t){try{var n={mark:e,routes:t},r=JSON.stringify(n);this.storage.setItem(Et,r)}catch(e){console.error(e.message,e)}}},{key:"setRestorePoint",value:function(e){var t,n=null!==(t=this[kt]())&&void 0!==t?t:"/";this[jt](n,e)}},{key:vt,value:function(e){"function"==typeof this.changeHandler&&this.changeHandler(e)}},{key:kt,value:function(){var e=qe();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:At,value:function(){var e=qe().location.search;return e.length>0&&0===e.indexOf("?")&&(e=e.substring(1)),e}},{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=qe();this[St]=!t,n.history.go(e)}},{key:"push",value:function(e){var t=this[Rt](e.currentRoute);Ct(this.traceless,e.currentRoute)||qe().history.pushState(e.routes,"",t);var n=e.currentRoute.fullPath;this[jt](n,e.routes)}},{key:"replace",value:function(e){var t=this[Rt](e.currentRoute);Ct(this.traceless,e.currentRoute)||qe().history.replaceState(e.routes,"",t);var n=e.currentRoute.fullPath;this[jt](n,e.routes)}},{key:Rt,value:function(e){var t,n=qe(),r="";if(e.query){var o="";if("object"===pt(e.query)){var i,a=dt(Reflect.ownKeys(e.query));try{for(a.s();!(i=a.n()).done;){var l=i.value,u=encodeURIComponent(e.query[l]),s="".concat(encodeURIComponent(String(l)),"=").concat(u);o.length>0&&(o+="&"),o+=s}}catch(e){a.e(e)}finally{a.f()}}else o=e.query;this.query?(r=o.length>0?"".concat(this.query,"&").concat(o):this.query).length>0&&"?"!==r.charAt(0)&&(r="?".concat(r)):o.length>0&&(r="?".concat(o))}var c,f=n.location,h=null!==(t=e.alias)&&void 0!==t?t:e.fullPath;return h.startsWith(G)&&(h=h.substring(G.length+1)),c=r?"path"==this.mode?0===h.indexOf("/")?"".concat(this.base).concat(h).concat(r):"".concat(this.base,"/").concat(h).concat(r):"".concat(f.pathname).concat(r,"#").concat(h):"path"==this.mode?0===h.indexOf("/")?"".concat(this.base).concat(h):"".concat(this.base,"/").concat(h):"".concat(f.pathname,"#").concat(h),"".concat(f.origin).concat(c)}}])&&bt(t.prototype,n),e}();function _t(){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=qe().location.pathname),n&&n.endsWith("/")&&(n=n.substring(0,n.length-1)),new Tt("path",null!==(e=n)&&void 0!==e?e:"",r,t,o,i,a)}function qt(){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 Tt("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 Mt(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 It(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Nt=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;Ft(this,e),It(this,"maxSize",50),It(this,"cursor",-1),It(this,"queue",[]),It(this,"historyMonitor",!1),It(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:"beforeRestoreEach",value:function(e){}},{key:"removeBeforeRestoreEach",value:function(e){return!1}},{key:"listen",value:function(e){this.changeHandler=e}},{key:vt,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[vt](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){}}])&&Mt(t.prototype,n),e}();function Kt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return new Nt(e,t)}function Dt(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 $t(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dt(Object(n),!0).forEach((function(t){zt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Lt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ht(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 Ut(e){return function(e){if(Array.isArray(e))return Bt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ht(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 Ht(e,t){if(e){if("string"==typeof e)return Bt(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)?Bt(e,t):void 0}}function Bt(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 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 zt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wt(e){return(Wt="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 Vt=Symbol("_constructRouteModel"),Gt=Symbol("_findRouteModel"),Xt=Symbol("_findRootView"),Yt=Symbol("_getFirstView"),Qt=Symbol("_removeView"),Zt=Symbol("_buildPage"),en=Symbol("_resolveComponent"),tn=Symbol("_update"),nn=Symbol("_merge"),rn=Symbol("_handleHistoryChange"),on=Symbol("_handleRouteUpdated"),an=Symbol("routeUpdatedCallback"),ln=Symbol("currentRoutes"),un=Symbol("current"),sn=Symbol("_addRouteRecorder"),cn=Symbol("_removeRouteRecorder"),fn=Symbol("_cloneRouteRecorder"),hn=Symbol("_handleError"),vn=Symbol("errorCallback"),yn=Symbol("registerKey"),pn=Symbol("notFoundKey"),dn=Symbol("notFoundPathKey"),gn=Symbol("forestKey"),mn=Symbol("historyKey"),bn=Symbol("beforeFiltersKey"),wn=Symbol("afterFiltersKey"),Sn=Symbol("destroyFiltersKey"),xn=Symbol("mainDispatcherKey"),kn=Symbol("initKey"),An=Symbol("requireKey"),Rn=Symbol("readyKey"),jn=Symbol("readyHandlersKey"),On=Symbol("_markReady"),Pn=Symbol("_createNextFn"),En=Symbol("_start"),Cn=Symbol("_before"),Tn=Symbol("_after"),_n=Symbol("_destroy"),qn=Symbol("_load"),Fn=Symbol("_unload"),Mn=Symbol("_loadDependency"),In=Symbol("resolvedModulesKey"),Nn=Symbol("resolveDependencyKey"),Kn=Symbol("routerGuardKey");Symbol.for("loadViewModel");var Dn,$n=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),zt(this,yn,new Array),zt(this,dn,"*"),zt(this,Rn,!1),zt(this,jn,[]),zt(this,gn,new Ae),zt(this,ln,new Array),zt(this,vn,null),zt(this,an,null),zt(this,bn,new Array),zt(this,wn,new Array),zt(this,Sn,new Array),zt(this,xn,new rt),zt(this,In,new Map),zt(this,Kn,new Te),zt(this,kn,!1),zt(this,un,c(null)),zt(this,An,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[mn]=t.history:this[mn]=_e?qt():Kt(),null===(n=this[mn])||void 0===n||n.listen((function(e){var t=null;if("string"==typeof e){var n=r[Y](e);n&&(t=r[rn]([n]))}else t=r[rn](e);t&&t.then((function(){!1===r[Rn]&&r[On](!0)})).catch((function(){!1===r[Rn]&&r[On](!1)}))}))}var t,n;return t=e,(n=[{key:"require",get:function(){return _e?(this[An]||(this[An]=new st),this[An]):null}},{key:"current",get:function(){return this[un].value}},{key:"setHistoryMode",value:function(e){var t,n=this;if(!this[Rn]){if(this[mn])try{this[mn].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[mn]="path"===e?Reflect.apply(_t,null,[].concat(o)):"memory"===e?Reflect.apply(Kt,null,[].concat(o)):Reflect.apply(qt,null,[].concat(o)),null===(t=this[mn])||void 0===t||t.listen((function(e){var t=null;if("string"==typeof e){var r=n[Y](e);r&&(t=n[rn]([r]))}else t=n[rn](e);t&&t.then((function(){!1===n[Rn]&&n[On](!0)})).catch((function(){!1===n[Rn]&&n[On](!1)}))}))}}},{key:hn,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[vn])try{this[vn](e,t)}catch(e){}console.error(e)}},{key:"init",value:function(){var e;!0!==this[kn]&&(null===(e=this[mn])||void 0===e||e.init(!this[Rn]),this[kn]=!0)}},{key:"isReady",value:function(){var e=this;return this[Rn]?Promise.resolve():new Promise((function(t,n){e[jn].push([t,n])}))}},{key:On,value:function(e){this[Rn]=!0,this[jn].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)||Ht(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:rn,value:function(e){try{if(!e){var t=Ut(this[ln]).reverse();return this[Fn](t),_e&&qe().location.reload(),Promise.resolve()}for(var n=null,r=[],o=[],i=0;i<e.length&&i<this[ln].length&&ue.isSame(e[i],this[ln][i]);i++)!0===e[i].active&&e[i].active!==this[ln][i].active&&(n=e[i]);if(i<e.length&&(r=e.slice(i)),i<this[ln].length&&(o=this[ln].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[Fn](o)){if(r.length>0)return this.restore(r);if(null!==n)return this.restore([n])}}}catch(e){this[hn](e)}return Promise.resolve()}},{key:on,value:function(e){if(e)this[un].value=e;else{var t=this[ln].length;this[un].value=t>0?this[ln][t-1]:null}if("function"==typeof this[an])try{this[an](this[un].value)}catch(e){}}},{key:sn,value:function(e){if(e.opsType===oe.Open){for(var t=!1,n=this[ln].length-1;n>=0;n--){var r=this[ln][n];e.root==r.root&&(e.path!==r.path?e.active&&(r.active=!1):(this[ln].splice(n,1,e),t=!0))}t||this[ln].push(e)}else this[ln].push(e)}},{key:fn,value:function(){var e,t=[],n=Lt(this[ln]);try{for(n.s();!(e=n.n()).done;){var r=e.value,o=ue.clone(r,!0);t.push(o)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:cn,value:function(e){if(null!=this[ln]){for(var t=-1,n=0;n<this[ln].length;n++)if(ue.isSame(this[ln][n],e)){t=n;break}if(-1!=t){var r=this[ln][t];this[ln].splice(t,1),this[_n](r,r.session)}}}},{key:"historyMonitor",set:function(e){this[mn]&&(this[mn].historyMonitor=e)}},{key:"historyMonitor",get:function(){return!!this[mn]&&this[mn].historyMonitor}},{key:"traceless",set:function(e){this[mn]&&(this[mn].traceless=e)}},{key:"traceless",get:function(){return!!this[mn]&&this[mn].traceless}},{key:"setRestorePoint",value:function(){var e,t=this[fn]();null===(e=this[mn])||void 0===e||e.setRestorePoint(t)}},{key:"onRouteUpdated",value:function(e){this[an]=e}},{key:"onError",value:function(e){this[vn]=e}},{key:"beforeEach",value:function(e){this[bn].push(e)}},{key:"afterEach",value:function(e){this[wn].push(e)}},{key:"destroyEach",value:function(e){this[Sn].push(e)}},{key:"beforeRestoreEach",value:function(e){this[mn].beforeRestoreEach(e)}},{key:"removeBeforeRestoreEach",value:function(e){return this[mn].removeBeforeRestoreEach(e)}},{key:"setResolveDependency",value:function(e){this[Nn]=e}},{key:"addRoutes",value:function(e){var t,n=Lt(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[dn]){var n=this[Vt](e);if(-1==t)this[yn]=[].concat(Ut(this[yn]),Ut(n));else for(var r=n.length-1;r>=0;r--)this[yn].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[yn].length;n++){var r=this[yn][n];if(null!=t&&t.path&&r.path===t.path)return this[yn].splice(n,1),!0;if(null!=t&&t.name&&r.name===t.name)return this[yn].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[yn].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[dn]=e}},{key:"setNotFoundRoute",value:function(e){var t=this[Vt](e);this[pn]=t[0]}},{key:"getRoutes",value:function(){return Ut(this[yn])}},{key:Vt,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 u=new se(a,l,e.props,e.meta);i.push(u)}var s=!1,c=[];if(e.children){var f,h=Lt(e.children);try{for(h.s();!(f=h.n()).done;){var v,y=f.value,p=Lt(this[Vt](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):(s=!0,g.path=n);var m=new ce;m.models=[].concat(i),g.layers=[m].concat(Ut(d.layers)),c.push(g)}}catch(e){p.e(e)}finally{p.f()}}}catch(e){h.e(e)}finally{h.f()}}if(!s){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:Gt,value:function(e){var t,n=e.route;try{var r,o=Lt(this[yn]);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 u=l(n.path);if(!u)continue;if(i.redirect){var s=new ue;_(!0,s,n),s.path=i.redirect;var c={route:s,find:void 0};return!!this[Gt](c)&&(e.route=c.route,e.find=c.find,!0)}if(n.params=null!==(a=n.params)&&void 0!==a?a:{},_(!0,n.params,u.params),n.query){var f=n.query;if("string"==typeof f){var h,v={},y=Lt(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"===Wt(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 u=t?t[i.name]:void 0,s="?"===i.modifier||"*"===i.modifier,c="*"===i.modifier||"+"===i.modifier;if(Array.isArray(u)){if(!c)throw new TypeError('Expected "'+i.name+'" to not repeat, but got an array');if(0===u.length){if(s)continue;throw new TypeError('Expected "'+i.name+'" to not be empty')}for(var f=0;f<u.length;f++){var h=o(u[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 u&&"number"!=typeof u){if(!s){var v=c?"an array":"a string";throw new TypeError('Expected "'+i.name+'" to be '+v)}}else{if(h=o(String(u),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 ue,"object"===Wt(e[0]))t=ue.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"===Wt(e)?t=ue.from(e):"string"==typeof e&&(t=new ue,"/"==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[hn]("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[hn]("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[hn]("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[hn]("resolve route fail",r),this)}},{key:"remove",value:function(e){var t=this;return new Promise((function(n){t[xn].post((function(r){try{if(0===t[ln].length)return r.resolve(),void n(!1);var o,i=[];if(e){var a;if(o=e.root?e.root:null!==(a=t[ln][0].root)&&void 0!==a?a:G,e.all)for(var l=t[ln].length-1;l>0;l--){var u=t[ln][l];u.opsType===oe.Append&&u.root===o&&i.splice(0,0,u)}else if(e.until)for(var s=t[ln].length-1;s>0;s--){var c=t[ln][s];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[Yt](t[gn]);f&&(o=f.name);for(var h=t[ln].length-1;h>0;h--){var v=t[ln][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[ln].forEach((function(e){e.opsType!==oe.Put&&p++})),t[Fn](i)){var d,g=0;t[ln].forEach((function(e){e.opsType!==oe.Put&&g++}));var m=g-p;null===(d=t[mn])||void 0===d||d.go(m,!1),r.resolve(),n(!0)}}catch(e){t[hn](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[hn]("resolve route fail",r),this)}},{key:"close",value:function(e){var t=this;return this[xn].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[ln].length;i++){var a=t[ln][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[Fn](o)&&t[on](),n.resolve()}catch(e){n.resolve(),t[hn](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[hn]("resolve route fail",o),this;console.debug("route to",o.path,o.root);var i=this[Kn].acquire(o);return null==i?(this[hn]("route forbid",o),this):(this[xn].post((function(t){try{var n,r=e[En](o);e[Cn](r),null!==(n=r.session)&&void 0!==n&&n.routeModel||!e[Nn]||e[Mn](r),e[qn](r),e[Tn](r),r.wait((function(n,r){var a=n.session.to;try{var l,u,s=ue.clone(a,!0),c=new yt(s,e[fn]());a.opsType===oe.Replace?null===(l=e[mn])||void 0===l||l.replace(c):null===(u=e[mn])||void 0===u||u.push(c)}catch(e){console.error(e.message,e)}if(e[Kn].release(i),e[on](a),"function"==typeof o.success)try{Reflect.apply(o.success,{},[])}catch(e){console.error(e.message,e)}!1===e[Rn]&&e[On](!0),t.resolve()}),(function(n,r){e[Kn].release(i),null!==r&&e[hn](r,o),!1===e[Rn]&&e[On](!1),t.resolve()}))}catch(n){e[Kn].release(i),e[hn](n,o),t.resolve()}})),this)}},{key:"back",value:function(e){var t;null===(t=this[mn])||void 0===t||t.go(-e)}},{key:Pn,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:En,value:function(e){var t,n=this[ln].length>0?this[ln][0]:void 0,r=new le(e,n),o={route:e,find:null};return this[Gt](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"===Wt(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 rt(r)}},{key:Cn,value:function(e){var t,n=this,r=Lt(this[bn]);try{var o=function(){var r=t.value;e.post((function(e){var t=n[Pn](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:Tn,value:function(e){var t=this;e.post((function(e){var n,r=Lt(t[wn]);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:_n,value:function(e,t){var n,r=Lt(this[Sn]);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:Mn,value:function(e){var t=this,n=e.session,r=Reflect.apply(this[Nn],this,[null==n?void 0:n.to]);if(null!=r&&null!=r){Array.isArray(r)||(r=[r]);var o,i=[],a=Lt(r);try{for(a.s();!(o=a.n()).done;){var l=o.value;this[In].has(l)||i.push(l)}}catch(e){a.e(e)}finally{a.f()}0!==i.length&&e.post((function(e){t[An].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 u=l[a];if(u){var s=void 0;s=C(u)?u.default:u,Array.isArray(s)&&t.addRoutes(s)}}var c,f=Lt(i);try{for(f.s();!(c=f.n()).done;){var h=c.value;t[In].set(h,!0)}}catch(e){f.e(e)}finally{f.f()}e.resolve()}else e.reject()}))}))}}},{key:qn,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[Gt](o))r=o.find,e.session.routeModel=r;else{if(!t[pn])return void e.reject("not find route model");r=t[pn]}}var i=le.from(e.session);t[Zt](n,r,i).then((function(n){t[gn],e.resolve()}),(function(t){e.reject(t)}))}))}},{key:Fn,value:function(e){if(0==e.length)return!0;var t,n=this[gn],r=[],o=Lt(e);try{for(o.s();!(t=o.n()).done;){var i=t.value,a=this[Xt](n,i);null!=a&&r.push($t($t({},a),{},{route:i}))}}catch(e){o.e(e)}finally{o.f()}if(0==r.length)return this[hn]("can not find view index"),!1;var l,u=Lt(r.reverse());try{for(u.s();!(l=u.n()).done;){var s,c=l.value;this[Qt](n,{x:c.x,y:c.y},[null!==(s=c.route.index)&&void 0!==s?s:0],!0)}}catch(e){u.e(e)}finally{u.f()}return!0}},{key:Xt,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:Yt,value:function(e){return e.layers.length>0&&e.layers[0].views.length>0?e.layers[0].views[0]:null}},{key:Qt,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,u=o.slots.value,s=u.length-1;s>=0;s--){var c=u[s];null!=n&&-1==n.indexOf(c.index)||(c.route&&o[de]&&(this[cn](c.route),!0===c.active&&c.route.opsType==oe.Append&&(l=!0)),a.push(new xe(o,c.index,t.y)),u.splice(s,1))}if(0==u.length)r?o.slots.value=Ut(u):e.layers[t.y].views.splice(t.x,1);else{if(l){var f=u.length-1,h=u[f];h.active=!0,h.route&&(h.route.active=h.active)}o.slots.value=Ut(u)}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[cn](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[yn].length)return new Promise((function(n,r){for(var o=function(n){var r=e[n];t[xn].post((function(e){var n,o=t[En](r);t[Cn](o),null!==(n=o.session)&&void 0!==n&&n.routeModel||!t[Nn]||t[Mn](o),t[qn](o),t[Tn](o),o.wait((function(t,n){e.resolve()}),(function(n,r){null!==r&&t[hn](r),e.resolve()}))}))},i=0;i<e.length;i++)o(i);t[xn].post((function(e){e.resolve(),n()}))}));var n=this[gn];if(n.layers.length>0){var r=n.layers[0].views;r.length>0&&(r[0].slots.value=[])}return this[ln]=[],this[on](),Promise.resolve()}},{key:Zt,value:function(e,t,n){var r,o=this,i=null!==(r=e.updateType)&&void 0!==r?r:ie.Part;return this[en](t).then((function(){o[tn](t,e,n,i)}))}},{key:en,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:tn,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,u=e.layers[0].models[0],s=this[gn],c=function(e){return 0==e.layers.length||0==e.layers[0].views.length}(s),f=null!==(o=t.root)&&void 0!==o?o:G;if(c||r!=ie.Part||(i=this[Xt](s,t)),null==i||null==i)if(c||r===ie.All){if(0==s.layers.length&&(s.layers[0]=new ke),0==s.layers[0].views.length){var h,v=null!==(h=t.root)&&void 0!==h?h:G;a=new Se(v,!0,null),s.layers[0].views=[a]}else a=s.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>s.layers.length)return Promise.reject("can not insert view(override level)");if(y.rootName){var g,m=Lt(s.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),s.layers[d].views.push(a),i={x:s.layers[d].views.length-1,y:d}}else a=s.layers[i.y].views[i.x];if(l=i.y,a[de]=!0,t.opsType===oe.Append){t.index=N.get(),t.active=!0;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,u,t.index,!0);a.slots.value=[].concat(Ut(S),[k]);var A=l+1,R=new xe(a,t.index,l);this[nn](s,A,e,1,R)}else if(t.opsType===oe.Open){var j,O,P=a.slots.value,E=null===(j=t.active)||void 0===j||j,C=!1,T=Lt(P);try{for(T.s();!(O=T.n()).done;){var _=O.value;if(null!==_.route&&ue.isSameForRouteModel(_.route,t)){if(_.active===E)return t.index=_.index,t.active=E,_.route=t,Promise.resolve();_.active=E,C=!0,t.index=_.index,t.active=E,_.route=t}else E&&(_.active=!1);_.route&&(_.route.active=_.active)}}catch(e){T.e(e)}finally{T.f()}if(!C){t.index=N.get(),t.active=E;var q=new we(t,u,t.index,E);P.push(q);var F=l+1,M=new xe(a,t.index,l);this[nn](s,F,e,1,M)}a.slots.value=Ut(P)}else{var I=a.slots.value;if(0==I.length){t.index=N.get(),t.active=!0,a.slots.value=[new we(t,u,t.index)];var K=l+1,D=new xe(a,t.index,l);this[nn](s,K,e,1,D)}else{var $=I[0];if($.model!==u){this[Qt](s,i,null,!0),t.index=N.get(),t.active=!0,a.slots.value=[new we(t,u,t.index)];var L=l+1,U=new xe(a,t.index,l);this[nn](s,L,e,1,U)}else{var H;null!==$.route&&this[cn]($.route);var B=!1,J=null===(H=t.active)||void 0===H||H;$.active!==J&&($.active=J,B=!0),t.active=J,t.index=$.index,$.route=t;for(var z=[],W=1;W<I.length;W++)z.push(I[W].index);z.length>0?this[Qt](s,i,z,!0):B&&(a.slots.value=Ut(I));for(var V=[new xe(a,t.index,l)],X=l+1,Y=1,Q=new xe(a,t.index,l);V.length>0&&X<s.layers.length&&Y<e.layers.length;X++,Y++){for(var Z=[],ee=0;ee<s.layers[X].views.length;ee++){var te=s.layers[X].views[ee];te[me]&&xe.include(V,te[me])&&Z.unshift(ee)}for(var ne=[],re=0,le=Z;re<le.length;re++){for(var se=le[re],ce=s.layers[X].views[se],fe=e.layers[Y].models,he=void 0,ve=0;ve<fe.length;ve++)if(ce.name===fe[ve].name){he=fe[ve];break}if(he){var ye=ce.slots.value;if(0==ye.length){ce.slots.value=[new we(null,he,0)];var pe=X+1,be=Y+1;this[nn](s,pe,e,be,Q)}else{var Ae=ye[0];if(Ae.model!==he){this[Qt](s,{x:se,y:X},null,!0),ce.slots.value=[new we(null,he,0)];var Re=X+1,je=Y+1;this[nn](s,Re,e,je,Q)}else{ce[de]&&null!==Ae.route&&this[cn](Ae.route);for(var Oe=[],Pe=1;Pe<ye.length;Pe++)Oe.push(ye[Pe].index);Oe.length>0&&this[Qt](s,{x:se,y:X},Oe,!0),ne.push(new xe(ce,Ae.index,X))}}ce[de]=!1}else this[Qt](s,{x:se,y:X},null,!1)}V=ne}this[nn](s,X,e,Y,Q)}}}if(a&&a[ge]){var Ee,Ce=a[ge];Ce&&(t.slot=new ae(f,l,null==Ce?void 0:Ce.view.name,null!==(Ee=null==Ce?void 0:Ce.index)&&void 0!==Ee?Ee:0))}n.to=void 0,n.routeModel=void 0,t.session=n,this[sn](t)}},{key:nn,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,u=e.layers[a].views,s=Lt(n.layers[i].models);try{for(s.s();!(l=s.n()).done;){var c=l.value,f=new Se(c.name,!1,o),h=new we(null,c);f.slots.value=[h],u.push(f)}}catch(e){s.e(e)}finally{s.f()}}for(;i<n.layers.length;i++){var v=new ke;v.views=[];var y,p=Lt(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[gn].layers.length)return null;if(t<this[gn].layers.length){var a,l=null,u=Lt(this[gn].layers[t].views);try{for(u.s();!(a=u.n()).done;){var s,c,f=a.value,h=!1;if(null!==n?(h=f.name===e&&(null===(s=f[ge])||void 0===s?void 0:s.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){u.e(e)}finally{u.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[gn].layers.length){var d=new ke;d.views=[p],this[gn].layers.push(d)}else this[gn].layers[t].views.push(p);return p}}])&&Jt(t.prototype,n),e}(),Ln="fox-router-view";function Un(e){return(Un="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 Hn(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 Bn(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 Jn(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 zn(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 Wn(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 Vn(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 Gn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.beforeShow)&&void 0!==t?t:e.beforeEnter}function Xn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.show)&&void 0!==t?t:e.enter}function Yn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.afterShow)&&void 0!==t?t:e.afterEnter}function Qn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.showCancelled)&&void 0!==t?t:e.enterCancelled}function Zn(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.hide)&&void 0!==t?t:e.leave}function er(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.afterHide)&&void 0!==t?t:e.afterLeave}function tr(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&null!==(t=e.hideCancelled)&&void 0!==t?t:e.leaveCancelled}function nr(e){var t,n,r,o,i,a=e.duration;return"object"==Un(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 rr(e,t){e.classList.contains(t)||e.classList.add(t)}function or(e,t){e.classList.remove(t)}if(_e){var ir=qe();Dn=ir.requestAnimationFrame.bind(ir)}else Dn=setTimeout;function ar(e){Dn(e)}function lr(e,t,n){j(t)&&(null==e&&(e={}),Reflect.apply(t,e,n))}function ur(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(j(i)){if(void 0!==o&&o>=0)return void setTimeout((function(){Reflect.apply(i,e,[t,n,r]),j(l)&&Reflect.apply(l,e,[])}),o);var u=["animationend","transitionend"],s=function o(a){u.forEach((function(e){Ne(t,e,o)})),Reflect.apply(i,e,[t,n,r]),l&&Reflect.apply(l,e,[])};u.forEach((function(e){Ie(t,e,s)}))}if(j(a)){var c="animationcancel",f=function o(i){Reflect.apply(a,e,[t,n,r]),Ne(t,c,o)};Ie(t,c,f)}}function sr(e){return null!==e&&(e.opsType===oe.Append||e.opsType===oe.Open)}function cr(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:-1;if(t||sr(o)){var a=Hn(r,t);a&&rr(n,a);var l=Bn(r,t);l&&rr(n,l);var u=Gn(r,t);lr(e,u,[n,t,o,i])}}function fr(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},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(sr(i)||t){var u=Hn(r,t),s=Bn(r,t),c=Jn(r,t),f=Xn(r,t),h=Yn(r,t),v=Qn(r,t);ar((function(){ur(e,n,i,a,o,(function(){s&&or(n,s),c&&or(n,c),j(h)&&lr(e,h,[n,t,i,a]),j(l)&&l(e,l,[n])}),(function(){j(v)&&lr(e,v,[n,t,i,a])})),u&&or(n,u),c&&rr(n,c),j(f)&&lr(e,f,[n,t,i,a])}))}else j(l)&&l(e,l,[n])}function hr(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},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,u=arguments.length>8?arguments[8]:void 0;if(sr(a)||t){var s=zn(r,t),c=Wn(r,t),f=Vn(r,t),h=Zn(r,t),v=er(r,t),y=tr(r,t);s&&rr(n,s),c&&rr(n,c),j(h)&&lr(e,h,[n,t,a,l]),ar((function(){ur(e,n,a,l,o,(function(){c&&or(n,c),f&&or(n,f),j(v)&&lr(e,v,[n,t,a,l]),j(u)&&lr(e,u,[n]),!t&&j(i)&&i()}),(function(){j(y)&&lr(e,y,[n,t,a,l]),j(u)&&lr(e,u,[n]),!t&&j(i)&&i()})),s&&or(n,s),f&&rr(n,f)}))}else!t&&j(i)&&i()}function vr(e){return e.elm}function yr(e){return(yr="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 pr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dr(e){return function(e){if(Array.isArray(e))return mr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||gr(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 gr(e,t){if(e){if("string"==typeof e)return mr(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)?mr(e,t):void 0}}function mr(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 br=Symbol("ruvc"),wr=Symbol("cvs");function Sr(e,t,n){return"function"==typeof e?Reflect.apply(e,{},[t,n]):e}function xr(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=dr(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(dr(r),dr(i)):"function"==typeof i&&(r=[].concat(dr(r),[i]))}return function(e){r.forEach((function(e){Reflect.apply(e,n,[])}))}}return function(){}}var kr=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),pr(this,"node",void 0),pr(this,"state",void 0),this.node=t,this.state=n},Ar={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,Function],required:!1},tag:{type:[String,Function,Object],required:!1,default:"div"},tagProps:{type:[Object,Function],required:!1,default:function(){return{}}},viewTag:{type:[String,Function,Object],required:!1,default:"div"},viewTagData:{type:[Object,Function],required:!1,default:function(){return{}}},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},viewInactiveClass:{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},beforeEnter:{type:Function,required:!1},enter:{type:Function,required:!1},afterEnter:{type:Function,required:!1},enterCancelled:{type:Function,required:!1},beforeLeave:{type:Function,required:!1},leave:{type:Function,required:!1},afterLeave:{type:Function,required:!1},leaveCancelled:{type:Function,required:!1},beforeShow:{type:Function,required:!1},show:{type:Function,required:!1},afterShow:{type:Function,required:!1},showCancelled:{type:Function,required:!1},beforeHide:{type:Function,required:!1},hide:{type:Function,required:!1},afterHide:{type:Function,required:!1},hideCancelled:{type:Function,required:!1},duration:{type:[Number,Object],required:!1}},render:function(e,t){var n,s=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)[br]||(n[br]={}),S=y(t.parent,o,0),x=y(t.parent,i,null),k=y(t.parent,a,-1),A=d.modelSlot;if(A){var R=g;v(t.parent,o,S+1,R),v(t.parent,a,A.index,R),v(t.parent,u,A.index,R);var O=A.route;O&&v(t.parent,r,O,R);var P,E=pr({attrs:{}},h,R);if(A.model.props)if("object"===yr(A.model.props))Object.assign(E.attrs,A.model.props);else if(!0===A.model.props&&"object"===yr(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,u,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 F=w[wr];F||(F=w[wr]=new Map);for(var M=new Map,I=[],N=q.slots.value,K=[],$=function(e){var t,n,r,o=N[e],i="".concat(d.name,"-").concat(o.index),a=null===(t=Sr(d.transition,o.route,e))||void 0===t||t,l=c(Ln,{props:{name:i,modelSlot:o}}),u={},f=Sr(d.viewClass,o.route,e);"string"==typeof f&&f.length>0&&(u[f]=!0);var h=Sr(d.viewActiveClass,o.route,e),v=Sr(null!==(n=d.viewInactiveClass)&&void 0!==n?n:d.viewDeactiveClass,o.route,e),y=F.get(i);if("string"==typeof h&&h.length>0&&(u[h]=o.active),"string"==typeof v&&v.length>0&&(u[v]=!o.active),y&&o.active!==y.state){var p=y.node;if(o.active){var g=null;p&&p.children&&p.children.length>0&&(g=xr(p.children[0],"activated")),K.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=vr(t);if(null!=l)if(i){var u=nr(n);cr(e,!0,l,n,r,o),fr(e,!0,l,n,u.show,r,o,(function(e){j(a)&&a("from enter")}))}else j(a)&&a();else j(a)&&a()}(s,p,d,o.route,e,a,g)}))}else{if(p&&p.children&&p.children.length>0){var m=xr(p.children[0],"deactivated");try{D(m)}catch(e){console.error(e)}}K.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=vr(t);null!=l&&i?hr(e,!0,l,n,nr(n).hide,null,r,o,(function(e){j(a)&&a("from leave")})):j(a)&&a()}(s,p,d,o.route,e,a)}))}}var b={class:u,key:i},w=null!==(r=Sr(d.viewTagData,o.route,e))&&void 0!==r?r:{};null!==w&&"object"===yr(w)&&Object.assign(b,w);var S=Sr(d.viewTagProps,o.route,e);null!==S&&"object"===yr(S)&&(b.props=S);var x=Sr(d.viewTagAttrs,o.route,e);null!==x&&"object"===yr(x)&&(b.attrs=x),o.route.viewTagAttrs&&"object"===yr(o.route.viewTagAttrs)&&(b.attrs?Object.assign(b.attrs,o.route.viewTagAttrs):b.attrs=o.route.viewTagAttrs);var k=Sr(d.viewTag,o.route,e),A=c(k,b,[l]);if(M.set(i,new kr(A,o.active)),a){var R=function(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=nr(t);return{create:function(e,i){var a=vr(i);cr(e,!1,a,t,n,r),fr(e,!1,a,t,o.enter,n,r)},activate:function(e,i){var a=vr(i);cr(e,!1,a,t,n,r),fr(e,!1,a,t,o.enter,n,r)},remove:function(e,i){hr(e,!1,vr(e),t,o.leave,i,n,r)}}}(s,d,o.route,e);A.data.hook=R}I.push(A)},L=0;L<N.length;L++)$(L);var U,H=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=gr(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}}}}(F.keys());try{for(H.s();!(U=H.n()).done;){var B=U.value;M.has(B)||p(t.parent,B)}}catch(e){H.e(e)}finally{H.f()}w[wr]=M,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ar((function(){for(var n=function(n){D((function(){Reflect.apply(e[n],t,[])}))},r=0;r<e.length;r++)n(r)}))}(K,s);var J=Sr(d.tag,null,-1),z={};for(var W in b)"props"!==W&&(z[W]=b[W]);var V=Sr(d.tagProps,null,-1);return null!==V&&"object"===yr(V)&&(z.props=V),c(J,z,I)}v(t.parent,a,-1),v(t.parent,o,S+1),v(t.parent,u,-1);var G=q.slots.value;if(G.length>0){var Y=G[0],Q=Y.route;Q?v(t.parent,r,Q):x&&x.slots.value.length>0&&(Q=x.slots.value[0].route,v(t.parent,r,Q));var Z=pr({},h,"");for(var ee in b)"props"!==ee&&(Z[ee]=b[ee]);null!==Z.attrs&&"object"===yr(Z.attrs)||(Z.attrs={});var te,ne=Y.model;if(ne.props)if("object"===yr(ne.props))Object.assign(Z.attrs,ne.props);else if(!0===ne.props&&"object"===yr(null===(te=Y.route)||void 0===te?void 0:te.params)){var re;Object.assign(Z.attrs,null===(re=Y.route)||void 0===re?void 0:re.params)}return null!==d.passProps&&"object"===yr(d.passProps)&&Object.assign(Z.attrs,d.passProps),c(ne.component,Z,[])}}};function Rr(e){return(Rr="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 jr,Or={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,n,r=this.$router,o=this.$route,i={},a=r.options.linkActiveClass,l=r.options.linkExactActiveClass,u=null==a?"fox-router-link-active":a,s=null==l?"fox-router-link-exact-active":l,c=null==this.activeClass?u:this.activeClass,f=null==this.exactActiveClass?s:this.exactActiveClass;i[f]=(t=o,n=this.to,!!t&&("object"===Rr(n)?n.path?t.path===n.path:t.name===n.name:"/"===n.charAt(0)?t.path===n:t.name===n)),i[c]=this.exact?i[f]:function(e,t){return!!e&&("object"===Rr(t)?t.path?0===e.path.indexOf(t.path):e.name===t.name:"/"===t.charAt(0)?0===e.path.indexOf(t):e.name===t)}(o,this.to);var h=r[Y](this.to),v=function(e){Pr(e)&&r.to(h)},y={click:Pr};Array.isArray(this.event)?this.event.forEach((function(e){y[e]=v})):y[this.event]=v;var p={class:i},d="#".concat(h.path);if("a"===this.tag)p.on=y,p.attrs={href:d};else{var g=Er(this.$slots.default);if(g){g.isStatic=!1;var m=g.data=extend({},g.data);for(var b in m.on=m.on||{},m.on){var w=m.on[b];b in y&&(m.on[b]=Array.isArray(w)?w:[w])}for(var S in y)S in m.on?m.on[S].push(y[S]):m.on[S]=v;(g.data.attrs=extend({},g.data.attrs)).href=d}else p.on=y}return e(this.tag,p,this.$slots.default)}};function Pr(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 Er(e){if(e)for(var t,n=0;n<e.length;n++){if("a"===(t=e[n]).tag)return t;if(t.children&&(t=Er(t.children)))return t}}function Cr(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 Tr(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"}(jr||(jr={}));var _r=Symbol("registerKey"),qr=function e(t,n){Tr(this,e),this.callback=t,this.policy=n},Fr=function(){function e(){Tr(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,_r,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[_r].get(e);r||(r=new Array,this[_r].set(e,r));var o=!0===n?jr.once:jr.limitless,i=new qr(t,o);return r.push(i),this}},{key:"off",value:function(e,t){if(!t)return this[_r].delete(e),this;var n=this[_r].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),u=[].splice.call(n,0,a),s=function(t){e.once(u[t],(function(e){l[t]=e,0==(a-=1)&&Reflect.apply(i,{},l)}))},c=0;c<u.length;c++)s(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[_r].get(e);if(!o)return this;for(var i=function(e){var t=o[e];if(t.policy==jr.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))}}])&&Cr(t.prototype,n),e}();function Mr(e){return(Mr="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 Ir={type:"GET",async:!0,contentType:"application/x-www-form-urlencoded",dataType:"string",cache:!1,timeout:3e4,processData:!0};function Nr(e){var t=new XMLHttpRequest,n={};if(_(!0,n,Ir),_(!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"===Mr(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 u="".concat(encodeURIComponent(o),"=").concat(encodeURIComponent(i));r.length>0&&(r+="&"),r+=u}}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"===Mr(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"===Mr(e)?JSON.stringify(e):e:0===t.indexOf("application/json")&&"object"===Mr(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 Kr(e){return(Kr="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 Dr(e,t){return(Dr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $r(e,t){if(t&&("object"===Kr(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 Lr(e){return(Lr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ur(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 Hr(e,t,n){return t&&Ur(e.prototype,t),n&&Ur(e,n),e}function Br(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zr=Symbol("idKey"),Wr=Symbol("valueKey"),Vr=Symbol("childrenKey"),Gr=Symbol("growKey"),Xr=function e(t){Br(this,e),Jr(this,Gr,!0),Jr(this,Wr,c()),Jr(this,Vr,new Map),this[zr]=t},Yr=function(){function e(){Br(this,e)}return Hr(e,[{key:"get",value:function(e,t){if("value"==t)return e[Wr].value;if("grow"===t)return e[Gr];var n=e[Vr].get(t);return n?eo(n):e[Gr]?((n=Zr(t))[Gr]=e[Gr],e[Vr].set(t,n),eo(n)):void 0}},{key:"set",value:function(e,t,n){return"value"==t?(e[Wr].value=n,!0):"grow"===t?(e[Gr]=$(n),!0):null==n?(e[Vr].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[Vr].delete(t),!0)}}]),e}(),Qr="__proxy__";function Zr(e){var t=new Xr(e);return Reflect.set(t,Qr,new Proxy(t,new Yr)),t}function eo(e){return Reflect.get(e,Qr)}var to=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&&Dr(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=Lr(t);if(n){var o=Lr(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return $r(this,e)});function o(){return Br(this,o),r.call(this,"__root__")}return Hr(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[Vr].has(r)?o=t[Vr].get(r):(o=Zr(r),t[Vr].set(r,o)),t=o}return t[Wr].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[Vr].has(r))return;t=t[Vr].get(r)}return t[Wr].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[Vr].has(r))return!1;t=t[Vr].get(r)}var o=e-1<0||arguments.length<=e-1?void 0:arguments[e-1];return!!t[Vr].has(o)&&(t[Vr].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[Vr].has(r))return!1;t=t[Vr].get(r)}var o=e-1<0||arguments.length<=e-1?void 0:arguments[e-1];return t[Vr].has(o)}},{key:"clear",value:function(){this[Vr].clear()}}]),o}(Xr),no=(Symbol("treeKey"),["put","get","contains","remove","clear"]);function ro(e){return no.includes(e)}var oo=function(){function e(){Br(this,e)}return Hr(e,[{key:"get",value:function(e,t){if("value"==t)return e[Wr].value;if("grow"===t)return e[Gr];if(t===Vr)return e[Vr];if("string"==typeof t&&ro(t))return e[t];var n=String(t),r=e[Vr].get(n);return r?eo(r):e[Gr]?((r=Zr(n))[Gr]=e[Gr],e[Vr].set(n,r),eo(r)):void 0}},{key:"set",value:function(e,t,n){return"value"==t?(e[Wr].value=n,!0):"grow"===t?(e[Gr]=$(n),!0):!ro(t)&&(null==n?(e[Vr].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[Vr].delete(t),!0)}}]),e}(),io=new Proxy(to,{construct:function(e){return eo((t=new to,n=new oo,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,Qr,r),t));var t,n,r,o}}),ao={get each(){return W},get type(){return U},get isFunction(){return j},get isArray(){return R},get isArrayLike(){return B},get makeArray(){return z},get merge(){return J},get isWindow(){return H},get isPlainObject(){return P},get isEqual(){return V},get isESModule(){return C}};function lo(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 uo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lo(Object(n),!0).forEach((function(t){so(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function so(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 co=new $n({}),fo=new io,ho=new Fr,vo=!1,yo=uo(uo({},ao),{},{get router(){return co},get bus(){return fo},get Bus(){return io},get eventproxy(){return ho},get EventProxy(){return Fr},get EventChain(){return rt},get require(){return co.require},get ajax(){return Nr},get extend(){return _},get clone(){return q},install:function(e){vo||(vo=!0,function(e){n=e}(e),e.component(Ln,Ar),e.component("fox-router-link",Or),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];ho.on(e,t,n)},e.prototype.$fox_off=function(e,t){ho.off(e,t)},e.prototype.$fox_once=function(e,t){ho.once(e,t)},e.prototype.$fox_all=function(){for(var e=ho,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=ho,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=ho,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}()}));
|