This repository has been archived by the owner on Dec 19, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
/
ko-component-router.min.js
2 lines (2 loc) · 31.4 KB
/
ko-component-router.min.js
1
2
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):"object"==typeof exports?exports["ko-component-router"]=e():t["ko-component-router"]=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){var n,o,i;n=r(17),o=r(18),i=function(t,e,i){var u,c,a,s,f;return null==i&&(i={}),u=null!=(s=i.HTML5)?s:!1,a=null!=(f=i.basePath)?f:"",c=u?o:n,t.router=new c(t,e,a),t.components.register("ko-component-router",r(16)(t))},t.exports={start:i}},function(t){function e(t){return"number"==typeof t&&t>-1&&t%1==0&&r>=t}var r=Math.pow(2,53)-1;t.exports=e},function(t,e,r){function n(t){return null==t?!1:f.call(t)==u?p.test(s.call(t)):i(t)&&c.test(t)||!1}var o=r(48),i=r(3),u="[object Function]",c=/^\[object .+?Constructor\]$/,a=Object.prototype,s=Function.prototype.toString,f=a.toString,p=RegExp("^"+o(f).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=n},function(t){function e(t){return t&&"object"==typeof t||!1}t.exports=e},function(t){function e(t){var e=typeof t;return"function"==e||t&&"object"==e||!1}t.exports=e},function(t,e,r){var n=r(1),o=r(2),i=r(3),u="[object Array]",c=Object.prototype,a=c.toString,s=o(s=Array.isArray)&&s,f=s||function(t){return i(t)&&n(t.length)&&a.call(t)==u||!1};t.exports=f},function(t,e,r){var n=r(1),o=r(2),i=r(4),u=r(43),c=o(c=Object.keys)&&c,a=c?function(t){if(t)var e=t.constructor,r=t.length;return"function"==typeof e&&e.prototype===t||"function"!=typeof t&&r&&n(r)?u(t):i(t)?c(t):[]}:u;t.exports=a},function(t,e,r){var n=n||{};!function(){"use strict";function t(t,e){for(var r=0,n=t.length-1;n>=0;n--){var o=t[n];"."===o?t.splice(n,1):".."===o?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}var o="win32"===n.platform,i=r(56);if(o){var u=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,c=/^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/,a=function(t){var e=u.exec(t),r=(e[1]||"")+(e[2]||""),n=e[3]||"",o=c.exec(n),i=o[1],a=o[2],s=o[3];return[r,i,a,s]},s=function(t){return"\\\\"+t.replace(/^[\\\/]+/,"").replace(/[\\\/]+/g,"\\")};e.resolve=function(){function r(t){return!!t}for(var o="",c="",a=!1,f=arguments.length-1;f>=-1;f--){var p;if(f>=0?p=arguments[f]:o?(p=n.env["="+o],p&&p.substr(0,3).toLowerCase()===o.toLowerCase()+"\\"||(p=o+"\\")):p=n.cwd(),!i.isString(p))throw new TypeError("Arguments to path.resolve must be strings");if(p){var l=u.exec(p),h=l[1]||"",y=h&&":"!==h.charAt(1),g=e.isAbsolute(p),v=l[3];if((!h||!o||h.toLowerCase()===o.toLowerCase())&&(o||(o=h),a||(c=v+"\\"+c,a=g),o&&a))break}}return y&&(o=s(o)),c=t(c.split(/[\\\/]+/).filter(r),!a).join("\\"),o+(a?"\\":"")+c||"."},e.normalize=function(r){var n=u.exec(r),o=n[1]||"",i=o&&":"!==o.charAt(1),c=e.isAbsolute(r),a=n[3],f=/[\\\/]$/.test(a);return o&&":"===o.charAt(1)&&(o=o[0].toLowerCase()+o.substr(1)),a=t(a.split(/[\\\/]+/).filter(function(t){return!!t}),!c).join("\\"),a||c||(a="."),a&&f&&(a+="\\"),i&&(o=s(o)),o+(c?"\\":"")+a},e.isAbsolute=function(t){var e=u.exec(t),r=e[1]||"",n=!!r&&":"!==r.charAt(1);return!!e[2]||n},e.join=function(){function t(t){if(!i.isString(t))throw new TypeError("Arguments to path.join must be strings");return t}var r=Array.prototype.filter.call(arguments,t),n=r.join("\\");return/^[\\\/]{2}[^\\\/]/.test(r[0])||(n=n.replace(/^[\\\/]{2,}/,"\\")),e.normalize(n)},e.relative=function(t,r){function n(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r+1)}t=e.resolve(t),r=e.resolve(r);for(var o=t.toLowerCase(),i=r.toLowerCase(),u=n(r.split("\\")),c=n(o.split("\\")),a=n(i.split("\\")),s=Math.min(c.length,a.length),f=s,p=0;s>p;p++)if(c[p]!==a[p]){f=p;break}if(0==f)return r;for(var l=[],p=f;p<c.length;p++)l.push("..");return l=l.concat(u.slice(f)),l.join("\\")},e.sep="\\",e.delimiter=";"}else{var f=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a=function(t){return f.exec(t).slice(1)};e.resolve=function(){for(var e="",r=!1,o=arguments.length-1;o>=-1&&!r;o--){var u=o>=0?arguments[o]:n.cwd();if(!i.isString(u))throw new TypeError("Arguments to path.resolve must be strings");u&&(e=u+"/"+e,r="/"===u.charAt(0))}return e=t(e.split("/").filter(function(t){return!!t}),!r).join("/"),(r?"/":"")+e||"."},e.normalize=function(r){for(var n=e.isAbsolute(r),o="/"===r[r.length-1],i=r.split("/"),u=[],c=0;c<i.length;c++)i[c]&&u.push(i[c]);return r=t(u,!n).join("/"),r||n||(r="."),r&&o&&(r+="/"),(n?"/":"")+r},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){for(var t="",r=0;r<arguments.length;r++){var n=arguments[r];if(!i.isString(n))throw new TypeError("Arguments to path.join must be strings");n&&(t+=t?"/"+n:n)}return e.normalize(t)},e.relative=function(t,r){function n(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r+1)}t=e.resolve(t).substr(1),r=e.resolve(r).substr(1);for(var o=n(t.split("/")),i=n(r.split("/")),u=Math.min(o.length,i.length),c=u,a=0;u>a;a++)if(o[a]!==i[a]){c=a;break}for(var s=[],a=c;a<o.length;a++)s.push("..");return s=s.concat(i.slice(c)),s.join("/")},e.sep="/",e.delimiter=":"}e.dirname=function(t){var e=a(t),r=e[0],n=e[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},e.basename=function(t,e){var r=a(t)[2];return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},e.extname=function(t){return a(t)[3]},e.exists=i.deprecate(function(t,e){r(14).exists(t,e)},"path.exists is now called `fs.exists`."),e.existsSync=i.deprecate(function(t){return r(14).existsSync(t)},"path.existsSync is now called `fs.existsSync`."),e._makeLong=o?function(t){if(!i.isString(t))return t;if(!t)return"";var r=e.resolve(t);return/^[a-zA-Z]\:\\/.test(r)?"\\\\?\\"+r:/^\\\\[^?.]/.test(r)?"\\\\?\\UNC\\"+r.substring(2):t}:function(t){return t}}()},function(t,e,r){var n,o,i,u,c,a,s,f,p=function(t,e){return function(){return t.apply(e,arguments)}};a=r(7),c=null!=(s=null!=(f=window.history)?f.location:void 0)?s:window.location,o=r(19),i=r(20),u=null,n=function(){function t(t,e){this._onContextMenu=p(this._onContextMenu,this),this._onClick=p(this._onClick,this),this._onStateChange=p(this._onStateChange,this);var r,n;this.state=new i(t),this._routes=[];for(n in e)r=e[n],this._routes.push(new o(n,r));this.current=t.observable({}),window.addEventListener("click",this._onClick),window.addEventListener("contextmenu",this._onContextMenu),u=this.state.subscribe(this._onStateChange),n=this._getPathFromUrl(),this.redirect(n)}return t.prototype.show=function(t){return this._changePage(t)?(this._pushState(t),!0):!1},t.prototype.redirect=function(t){return this._changePage(t)?(this._replaceState(t),!0):!1},t.prototype._stop=function(){return window.removeEventListener("click",this._onClick),window.removeEventListener("contextmenu",this._onContextMenu),u.dispose()},t.prototype._onStateChange=function(){var t;return t=this._getPathFromUrl(),this.redirect(t)},t.prototype._onClick=function(t){var e,r,n;return e=this._getParentAnchor(t.target),this._ignoreClick(t,e)?void 0:(r=this._getPathFromAnchor(e),t.metaKey||t.ctrlKey||t.shiftKey?(t.preventDefault(),n=t.metaKey||t.ctrlKey?null:"_blank",void window.open(this._basePath+r,n)):this.show(r)?t.preventDefault():void 0)},t.prototype._changePage=function(t){var e,r,n,o,i,u,c,a,s,f,p,l,h;for(p={},s=[],l=this._routes,i=0,c=l.length;c>i;i++)h=l[i],h.matches(t)&&s.push(h);if(0===s.length)return!1;for(n=1/0,r=null,p=null,o=u=0,a=s.length;a>u&&(h=s[o],e=h.params(t),f=Object.keys(e).length,!(n>f&&(n=f,r=h.component,p=e,0===f)));o=++u);return this.current({path:t,routeParams:p,component:r}),!0},t.prototype._pushState=function(t){return history.pushState({},document.title,this._basePath+t)},t.prototype._replaceState=function(t){return history.replaceState({},document.title,this._basePath+t)},t.prototype._ignoreClick=function(t,e){var r,n;return n=t.detail,r=t.defaultPrevented,2===n||r||!this._isLink(e)||e.getAttribute("download")||"external"===e.getAttribute("rel")||e.pathname===this.current().path||e.getAttribute("href").indexOf("mailto:")>-1||e.target||!this._sameOrigin(e.href)},t.prototype._getParentAnchor=function(t){for(;t&&"A"!==t.nodeName;)t=t.parentNode;return t},t.prototype._isLink=function(t){return t=this._getParentAnchor(t),t&&"A"===t.nodeName},t.prototype._getPathFromUrl=function(){return c.pathname+c.search+c.hash},t.prototype._getPathFromAnchor=function(t){var e,r;return e=t.getAttribute("href"),r=function(){switch(!1){case"/"!==e[0]:return t.pathname;case".."!==e:return a.resolve(this.current().path,e);default:return a.resolve(this.current().path,"../"+e)}}.call(this),r+t.search+(t.hash||""),r.replace(this._basePath,"")},t.prototype._sameOrigin=function(t){var e;return e=c.protocol+"//"+c.hostname,c.port&&(e+=":"+c.port),t&&0===t.indexOf(e)},t.prototype._onContextMenu=function(t){var e;return e=this._getParentAnchor(t.target),!t.defaultPrevented&&this._isLink(e)?this._patchContextMenu(e):void 0},t.prototype._patchContextMenu=function(t){var e,r,n,o;if(!t.hasAttribute("data-orig-href"))return e=t.getAttribute("href"),r=this._getPathFromAnchor(t),o=this._basePath+r,t.setAttribute("data-orig-href",e),t.setAttribute("href",o),n=this._revertContextMenuPatch.bind(this,t),window.addEventListener("click",n)},t.prototype._revertContextMenuPatch=function(t){var e;return e=t.getAttribute("data-orig-href"),t.setAttribute("href",e),t.removeAttribute("data-orig-href"),window.removeEventListener("click",this._revertContextMenuPatch)},t}(),t.exports=n},function(t,e,r){function n(t,e,r){for(var n=-1,i=o(t),u=r(t),c=u.length;++n<c;){var a=u[n];if(e(i[a],a,i)===!1)break}return t}var o=r(44);t.exports=n},function(t){function e(t,e){return t=+t,e=null==e?r:e,t>-1&&t%1==0&&e>t}var r=Math.pow(2,53)-1;t.exports=e},function(t,e,r){function n(t){var e=i(t)?t.length:void 0;return o(e)&&a.call(t)==u||!1}var o=r(1),i=r(3),u="[object Arguments]",c=Object.prototype,a=c.toString;t.exports=n},function(t,e,r){function n(t){if(null==t)return[];a(t)||(t=Object(t));var e=t.length;e=e&&c(e)&&(i(t)||s.nonEnumArgs&&o(t))&&e||0;for(var r=t.constructor,n=-1,f="function"==typeof r&&r.prototype===t,l=Array(e),h=e>0;++n<e;)l[n]=n+"";for(var y in t)h&&u(y,e)||"constructor"==y&&(f||!p.call(t,y))||l.push(y);return l}var o=r(11),i=r(5),u=r(10),c=r(1),a=r(4),s=r(13),f=Object.prototype,p=f.hasOwnProperty;t.exports=n},function(t,e,r){(function(e){var n=r(2),o=/\bthis\b/,i=Object.prototype,u=(u=e.window)&&u.document,c=i.propertyIsEnumerable,a={};!function(){a.funcDecomp=!n(e.WinRTError)&&o.test(function(){return this}),a.funcNames="string"==typeof Function.name;try{a.dom=11===u.createDocumentFragment().nodeType}catch(t){a.dom=!1}try{a.nonEnumArgs=!c.call(arguments,1)}catch(t){a.nonEnumArgs=!0}}(0,0),t.exports=a}).call(e,function(){return this}())},function(){},function(t){var e;e=function(){function t(t){this._router=t.router,this.component=t.observable(this._router.current().component),this.routeParams=t.observable(this._router.current().routeParams),this._pageChangeSubscription=this._router.current.subscribe(function(t){return function(e){return e.component!==t.component()?(t.routeParams(e.routeParams),t.component(e.component)):void 0}}(this))}return t.prototype.dispose=function(){return this._pageChangeSubscription.dispose(),this._router._stop()},t}(),t.exports=e},function(t,e,r){var n;n=function(t){return{template:r(21),viewModel:r(15).bind(null,t),synchronous:!0}},t.exports=n},function(t,e,r){var n,o,i,u,c,a,s=function(t,e){function r(){this.constructor=t}for(var n in e)f.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},f={}.hasOwnProperty;u=r(7),i=null!=(c=null!=(a=window.history)?a.location:void 0)?c:window.location,o=window.history,n=function(t){function e(t,r,n){var c,a;this._basePath=n,this._basePath=u.join("/",i.pathname,"/#!"),c=i.hash.replace("#!","")+i.search||"/",a=u.join(this._basePath,c),i.href.indexOf(a)<0&&(o.emulate?i.replace(a):o.replaceState(o.state,document.title,a)),e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype._pushState=function(t){return o.emulate?o.pushState({},document.title,t):e.__super__._pushState.apply(this,arguments)},e.prototype._replaceState=function(t){return o.emulate?o.replaceState(o.state,document.title,t):e.__super__._replaceState.apply(this,arguments)},e.prototype._getPathFromUrl=function(){var t;return t=e.__super__._getPathFromUrl.apply(this,arguments),t.split("#!")[1]||"/"},e}(r(8)),t.exports=n},function(t,e,r){var n,o,i,u,c,a,s=function(t,e){function r(){this.constructor=t}for(var n in e)f.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},f={}.hasOwnProperty;u=r(7),i=null!=(c=null!=(a=window.history)?a.location:void 0)?c:window.location,o=window.history,n=function(t){function e(t,r,n){this._basePath=null!=n?n:"",""!==this._basePath&&(this._basePath=u.join("/",this._basePath).replace("/$","")),e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype._getPathFromUrl=function(){var t,r;return t=e.__super__._getPathFromUrl.apply(this,arguments),""!==this._basePath&&null!=(r=t.split(this._basePath)[1])?r:t},e}(r(8)),t.exports=n},function(t,e,r){var n,o,i=[].slice;o=r(51),n=function(){function t(t,e){this.component=e,this.paramKeys=[],this.regExp=o(t,this.paramKeys)}return t.prototype.matches=function(t){return t=t.split("?")[0],null!=this.regExp.exec(t)},t.prototype.params=function(t){var e,r,n,o,u,c,a,s,f;for(t=t.split("?")[0],c={},s=this.regExp.exec(t),e=s[0],a=2<=s.length?i.call(s,1):[],r=n=0,u=a.length;u>n;r=++n)f=a[r],null!=f&&(f=decodeURIComponent(f))&&(o=this.paramKeys[r].name)&&(c[o]=f);return c},t}(),t.exports=n},function(t,e,r){var n,o,i,u,c,a,s,f,p,l,h,y,g,v,b;l=r(45),h=r(46),g=r(50),y=null!=(v=null!=(b=window.history)?b.location:void 0)?v:window.location,u=!1,f=null,o="",a=function(){return history._nativePushState=history.pushState,history.pushState=function(t,e,r){var n,i,u;return null==t&&(t={}),u=!g(t)(null!=(i=f())?i:{}),n=o!==r,history._nativePushState.apply(this,arguments),(u||n)&&f(t),o=r},history._nativeReplaceState=history.replaceState,history.replaceState=function(t,e,r){var n,i,u;return null==t&&(t={}),u=!g(t)(null!=(i=f())?i:{}),n=o!==r,history._nativeReplaceState.apply(this,arguments),(u||n)&&f(t),o=r}},c=function(){return window.addEventListener("popstate",function(){return f(history.state)})},s=function(t){var e,r,n;r={};for(e in t)switch(n=t[e],!1){case!l(n):continue;case!h(n):r[e]=s(n);break;default:r[e]=n}return r},p=function(t){var e,r;return r=y.pathname+y.search+y.hash,e=document.title,history.replaceState(s(t),e,r)},i=function(){var t;return null!=(t=f())?t:{}},n=function(){function t(t){var e;return f=t.observable(history.state),u||(a(),c(),u=!0),e=t.pureComputed({read:i,write:p})}return t}(),t.exports=n},function(t){t.exports='<div data-bind="component: {\n\n name: component,\n params: routeParams\n\n}"></div>'},function(t){function e(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}t.exports=e},function(t){function e(t,e){for(var r=-1,n=t.length;++r<n&&e(t[r],r,t)!==!1;);return t}t.exports=e},function(t,e,r){function n(t,e,r,g,v,b,m){var j;if(r&&(j=v?r(t,g,v):r(t)),"undefined"!=typeof j)return j;if(!l(t))return t;var x=p(t);if(x){if(j=a(t),!e)return o(t,j)}else{var w=N.call(t),A=w==d;if(w!=_&&w!=y&&(!A||v))return D[w]?s(t,w,e):v?t:{};if(j=f(A?{}:t),!e)return u(t,j,h(t))}b||(b=[]),m||(m=[]);for(var S=b.length;S--;)if(b[S]==t)return m[S];return b.push(t),m.push(j),(x?i:c)(t,function(o,i){j[i]=n(o,e,r,i,t,b,m)}),j}var o=r(22),i=r(23),u=r(25),c=r(27),a=r(38),s=r(39),f=r(40),p=r(5),l=r(4),h=r(6),y="[object Arguments]",g="[object Array]",v="[object Boolean]",b="[object Date]",m="[object Error]",d="[object Function]",j="[object Map]",x="[object Number]",_="[object Object]",w="[object RegExp]",A="[object Set]",S="[object String]",O="[object WeakMap]",P="[object ArrayBuffer]",E="[object Float32Array]",C="[object Float64Array]",k="[object Int8Array]",U="[object Int16Array]",F="[object Int32Array]",z="[object Uint8Array]",M="[object Uint8ClampedArray]",L="[object Uint16Array]",$="[object Uint32Array]",D={};D[y]=D[g]=D[P]=D[v]=D[b]=D[E]=D[C]=D[k]=D[U]=D[F]=D[x]=D[_]=D[w]=D[S]=D[z]=D[M]=D[L]=D[$]=!0,D[m]=D[d]=D[j]=D[A]=D[O]=!1;var R=Object.prototype,N=R.toString;t.exports=n},function(t){function e(t,e,r){r||(r=e,e={});for(var n=-1,o=r.length;++n<o;){var i=r[n];e[i]=t[i]}return e}t.exports=e},function(t,e,r){function n(t,e){return o(t,e,i)}var o=r(9),i=r(12);t.exports=n},function(t,e,r){function n(t,e){return o(t,e,i)}var o=r(9),i=r(6);t.exports=n},function(t,e,r){function n(t,e,r,i,u,c){if(t===e)return 0!==t||1/t==1/e;var a=typeof t,s=typeof e;return"function"!=a&&"object"!=a&&"function"!=s&&"object"!=s||null==t||null==e?t!==t&&e!==e:o(t,e,n,r,i,u,c)}var o=r(29);t.exports=n},function(t,e,r){function n(t,e,r,n,l,g,v){var b=c(t),m=c(e),d=f,j=f;b||(d=y.call(t),d==s?d=p:d!=p&&(b=a(t))),m||(j=y.call(e),j==s?j=p:j!=p&&(m=a(e)));var x=d==p,_=j==p,w=d==j;if(w&&!b&&!x)return i(t,e,d);var A=x&&h.call(t,"__wrapped__"),S=_&&h.call(e,"__wrapped__");if(A||S)return r(A?t.value():t,S?e.value():e,n,l,g,v);if(!w)return!1;g||(g=[]),v||(v=[]);for(var O=g.length;O--;)if(g[O]==t)return v[O]==e;g.push(t),v.push(e);var P=(b?o:u)(t,e,r,n,l,g,v);return g.pop(),v.pop(),P}var o=r(35),i=r(36),u=r(37),c=r(5),a=r(47),s="[object Arguments]",f="[object Array]",p="[object Object]",l=Object.prototype,h=l.hasOwnProperty,y=l.toString;t.exports=n},function(t){function e(t){return"function"==typeof t||!1}t.exports=e},function(t,e,r){function n(t,e,r,n,i){var c=e.length;if(null==t)return!c;for(var a=-1,s=!i;++a<c;)if(s&&n[a]?r[a]!==t[e[a]]:!u.call(t,e[a]))return!1;for(a=-1;++a<c;){var f=e[a];if(s&&n[a])var p=u.call(t,f);else{var l=t[f],h=r[a];p=i?i(l,h,f):void 0,"undefined"==typeof p&&(p=o(h,l,i,!0))}if(!p)return!1}return!0}var o=r(28),i=Object.prototype,u=i.hasOwnProperty;t.exports=n},function(t,e,r){function n(t){var e=u(t),r=e.length;if(1==r){var n=e[0],c=t[n];if(i(c))return function(t){return null!=t&&t[n]===c&&a.call(t,n)}}for(var s=Array(r),f=Array(r);r--;)c=t[e[r]],s[r]=c,f[r]=i(c);return function(t){return o(t,e,s,f)}}var o=r(31),i=r(41),u=r(6),c=Object.prototype,a=c.hasOwnProperty;t.exports=n},function(t){function e(t){return"string"==typeof t?t:null==t?"":t+""}t.exports=e},function(t,e,r){(function(e){function n(t){return c.call(t,0)}var o=r(49),i=r(2),u=i(u=e.ArrayBuffer)&&u,c=i(c=u&&new u(0).slice)&&c,a=Math.floor,s=i(s=e.Uint8Array)&&s,f=function(){try{var t=i(t=e.Float64Array)&&t,r=new t(new u(10),0,1)&&t}catch(n){}return r}(),p=f?f.BYTES_PER_ELEMENT:0;c||(n=u&&s?function(t){var e=t.byteLength,r=f?a(e/p):0,n=r*p,o=new u(e);if(r){var i=new f(o,0,r);i.set(new f(t,0,r))}return e!=n&&(i=new s(o,n),i.set(new s(t,n))),o}:o(null)),t.exports=n}).call(e,function(){return this}())},function(t){function e(t,e,r,n,o,i,u){var c=-1,a=t.length,s=e.length,f=!0;if(a!=s&&!(o&&s>a))return!1;for(;f&&++c<a;){var p=t[c],l=e[c];if(f=void 0,n&&(f=o?n(l,p,c):n(p,l,c)),"undefined"==typeof f)if(o)for(var h=s;h--&&(l=e[h],!(f=p&&p===l||r(p,l,n,o,i,u))););else f=p&&p===l||r(p,l,n,o,i,u)}return!!f}t.exports=e},function(t){function e(t,e,a){switch(a){case r:case n:return+t==+e;case o:return t.name==e.name&&t.message==e.message;case i:return t!=+t?e!=+e:0==t?1/t==1/e:t==+e;case u:case c:return t==e+""}return!1}var r="[object Boolean]",n="[object Date]",o="[object Error]",i="[object Number]",u="[object RegExp]",c="[object String]";t.exports=e},function(t,e,r){function n(t,e,r,n,i,c,a){var s=o(t),f=s.length,p=o(e),l=p.length;if(f!=l&&!i)return!1;for(var h,y=-1;++y<f;){var g=s[y],v=u.call(e,g);if(v){var b=t[g],m=e[g];v=void 0,n&&(v=i?n(m,b,g):n(b,m,g)),"undefined"==typeof v&&(v=b&&b===m||r(b,m,n,i,c,a))}if(!v)return!1;h||(h="constructor"==g)}if(!h){var d=t.constructor,j=e.constructor;if(d!=j&&"constructor"in t&&"constructor"in e&&!("function"==typeof d&&d instanceof d&&"function"==typeof j&&j instanceof j))return!1}return!0}var o=r(6),i=Object.prototype,u=i.hasOwnProperty;t.exports=n},function(t){function e(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&n.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var r=Object.prototype,n=r.hasOwnProperty;t.exports=e},function(t,e,r){function n(t,e,r){var n=t.constructor;switch(e){case f:return o(t);case i:case u:return new n(+t);case p:case l:case h:case y:case g:case v:case b:case m:case d:var x=t.buffer;return new n(r?o(x):x,t.byteOffset,t.length);case c:case s:return new n(t);case a:var _=new n(t.source,j.exec(t));_.lastIndex=t.lastIndex}return _}var o=r(34),i="[object Boolean]",u="[object Date]",c="[object Number]",a="[object RegExp]",s="[object String]",f="[object ArrayBuffer]",p="[object Float32Array]",l="[object Float64Array]",h="[object Int8Array]",y="[object Int16Array]",g="[object Int32Array]",v="[object Uint8Array]",b="[object Uint8ClampedArray]",m="[object Uint16Array]",d="[object Uint32Array]",j=/\w*$/;t.exports=n},function(t){function e(t){var e=t.constructor;return"function"==typeof e&&e instanceof e||(e=Object),new e}t.exports=e},function(t,e,r){function n(t){return t===t&&(0===t?1/t>0:!o(t))}var o=r(4);t.exports=n},function(t,e,r){function n(t){var e;if(!i(t)||s.call(t)!=u||!a.call(t,"constructor")&&(e=t.constructor,"function"==typeof e&&!(e instanceof e)))return!1;var r;return o(t,function(t,e){r=e}),"undefined"==typeof r||a.call(t,r)}var o=r(26),i=r(3),u="[object Object]",c=Object.prototype,a=c.hasOwnProperty,s=c.toString;t.exports=n},function(t,e,r){function n(t){for(var e=a(t),r=e.length,n=r&&t.length,f=n&&c(n)&&(i(t)||s.nonEnumArgs&&o(t)),l=-1,h=[];++l<r;){var y=e[l];(f&&u(y,n)||p.call(t,y))&&h.push(y)}return h}var o=r(11),i=r(5),u=r(10),c=r(1),a=r(12),s=r(13),f=Object.prototype,p=f.hasOwnProperty;t.exports=n},function(t,e,r){function n(t){return o(t)?t:Object(t)}var o=r(4);t.exports=n},function(t,e,r){(function(e){var n=r(30),o=r(2),i="[object Function]",u=Object.prototype,c=u.toString,a=o(a=e.Uint8Array)&&a,s=n(/x/)||a&&!n(a)?function(t){return c.call(t)==i}:n;t.exports=s}).call(e,function(){return this}())},function(t,e,r){var n=r(2),o=r(42),i="[object Object]",u=Object.prototype,c=u.toString,a=n(a=Object.getPrototypeOf)&&a,s=a?function(t){if(!t||c.call(t)!=i)return!1;var e=t.valueOf,r=n(e)&&(r=a(e))&&a(r);return r?t==r||a(t)==r:o(t)}:o;t.exports=s},function(t,e,r){function n(t){return i(t)&&o(t.length)&&C[U.call(t)]||!1}var o=r(1),i=r(3),u="[object Arguments]",c="[object Array]",a="[object Boolean]",s="[object Date]",f="[object Error]",p="[object Function]",l="[object Map]",h="[object Number]",y="[object Object]",g="[object RegExp]",v="[object Set]",b="[object String]",m="[object WeakMap]",d="[object ArrayBuffer]",j="[object Float32Array]",x="[object Float64Array]",_="[object Int8Array]",w="[object Int16Array]",A="[object Int32Array]",S="[object Uint8Array]",O="[object Uint8ClampedArray]",P="[object Uint16Array]",E="[object Uint32Array]",C={};C[j]=C[x]=C[_]=C[w]=C[A]=C[S]=C[O]=C[P]=C[E]=!0,C[u]=C[c]=C[d]=C[a]=C[s]=C[f]=C[p]=C[l]=C[h]=C[y]=C[g]=C[v]=C[b]=C[m]=!1;var k=Object.prototype,U=k.toString;t.exports=n},function(t,e,r){function n(t){return t=o(t),t&&u.test(t)?t.replace(i,"\\$&"):t}var o=r(33),i=/[.*+?^${}()|[\]\/\\]/g,u=RegExp(i.source);t.exports=n},function(t){function e(t){return function(){return t}}t.exports=e},function(t,e,r){function n(t){return i(o(t,!0))}var o=r(24),i=r(32);t.exports=n},function(t,e,r){function n(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function o(t,e){return t.keys=e,t}function i(t){return t.sensitive?"":"i"}function u(t,e){var r=t.source.match(/\((?!\?)/g);if(r)for(var n=0;n<r.length;n++)e.push({name:n,delimiter:null,optional:!1,repeat:!1});return o(t,e)}function c(t,e,r){for(var n=[],u=0;u<t.length;u++)n.push(s(t[u],e,r).source);var c=new RegExp("(?:"+n.join("|")+")",i(r));return o(c,e)}function a(t,e){function r(t,r,i,u,c,a,s,f){if(r)return r;if(f)return"\\"+f;var p="+"===s||"*"===s,l="?"===s||"*"===s;return e.push({name:u||o++,delimiter:i||"/",optional:l,repeat:p}),i=i?"\\"+i:"",c=n(c||a||"[^"+(i||"\\/")+"]+?"),p&&(c=c+"(?:"+i+c+")*"),l?"(?:"+i+"("+c+"))?":i+"("+c+")"}var o=0;return t.replace(p,r)}function s(t,e,r){if(e=e||[],f(e)?r||(r={}):(r=e,e=[]),t instanceof RegExp)return u(t,e,r);if(f(t))return c(t,e,r);var n=r.strict,s=r.end!==!1,p=a(t,e),l="/"===t.charAt(t.length-1);return n||(p=(l?p.slice(0,-2):p)+"(?:\\/(?=$))?"),p+=s?"$":n&&l?"":"(?=\\/|$)",o(new RegExp("^"+p,i(r)),e)}var f=r(52);t.exports=s;var p=new RegExp(["(\\\\.)","([\\/.])?(?:\\:(\\w+)(?:\\(((?:\\\\.|[^)])*)\\))?|\\(((?:\\\\.|[^)])*)\\))([+*?])?","([.+*?=^!:${}()[\\]|\\/])"].join("|"),"g")},function(t){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t){function e(){if(!i){i=!0;for(var t,e=o.length;e;){t=o,o=[];for(var r=-1;++r<e;)t[r]();e=o.length}i=!1}}function r(){}var n=t.exports={},o=[],i=!1;n.nextTick=function(t){o.push(t),i||setTimeout(e,0)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=r,n.addListener=r,n.once=r,n.off=r,n.removeListener=r,n.removeAllListeners=r,n.emit=r,n.binding=function(){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},function(t){t.exports="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e,r){(function(t,n){function o(t,r){var n={seen:[],stylize:u};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&e._extend(n,r),x(n.showHidden)&&(n.showHidden=!1),x(n.depth)&&(n.depth=2),x(n.colors)&&(n.colors=!1),x(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=i),a(n,t,n.depth)}function i(t,e){var r=o.styles[e];return r?"["+o.colors[r][0]+"m"+t+"["+o.colors[r][1]+"m":t}function u(t){return t}function c(t){var e={};return t.forEach(function(t){e[t]=!0}),e}function a(t,r,n){if(t.customInspect&&r&&O(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,t);return d(o)||(o=a(t,o,n)),o}var i=s(t,r);if(i)return i;var u=Object.keys(r),g=c(u);if(t.showHidden&&(u=Object.getOwnPropertyNames(r)),S(r)&&(u.indexOf("message")>=0||u.indexOf("description")>=0))return f(r);if(0===u.length){if(O(r)){var v=r.name?": "+r.name:"";return t.stylize("[Function"+v+"]","special")}if(_(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(A(r))return t.stylize(Date.prototype.toString.call(r),"date");if(S(r))return f(r)}var b="",m=!1,j=["{","}"];if(y(r)&&(m=!0,j=["[","]"]),O(r)){var x=r.name?": "+r.name:"";b=" [Function"+x+"]"}if(_(r)&&(b=" "+RegExp.prototype.toString.call(r)),A(r)&&(b=" "+Date.prototype.toUTCString.call(r)),S(r)&&(b=" "+f(r)),0===u.length&&(!m||0==r.length))return j[0]+b+j[1];if(0>n)return _(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var w;return w=m?p(t,r,n,g,u):u.map(function(e){return l(t,r,n,g,e,m)}),t.seen.pop(),h(w,b,j)}function s(t,e){if(x(e))return t.stylize("undefined","undefined");if(d(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return m(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):v(e)?t.stylize("null","null"):void 0}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,r,n,o){for(var i=[],u=0,c=e.length;c>u;++u)i.push(U(e,String(u))?l(t,e,r,n,String(u),!0):"");return o.forEach(function(o){o.match(/^\d+$/)||i.push(l(t,e,r,n,o,!0))}),i}function l(t,e,r,n,o,i){var u,c,s;if(s=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]},s.get?c=s.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):s.set&&(c=t.stylize("[Setter]","special")),U(n,o)||(u="["+o+"]"),c||(t.seen.indexOf(s.value)<0?(c=v(r)?a(t,s.value,null):a(t,s.value,r-1),c.indexOf("\n")>-1&&(c=i?c.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+c.split("\n").map(function(t){return" "+t}).join("\n"))):c=t.stylize("[Circular]","special")),x(u)){if(i&&o.match(/^\d+$/))return c;u=JSON.stringify(""+o),u.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=t.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=t.stylize(u,"string"))}return u+": "+c}function h(t,e,r){var n=0,o=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function y(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function v(t){return null===t}function b(t){return null==t}function m(t){return"number"==typeof t}function d(t){return"string"==typeof t}function j(t){return"symbol"==typeof t}function x(t){return void 0===t}function _(t){return w(t)&&"[object RegExp]"===E(t)}function w(t){return"object"==typeof t&&null!==t}function A(t){return w(t)&&"[object Date]"===E(t)}function S(t){return w(t)&&("[object Error]"===E(t)||t instanceof Error)}function O(t){return"function"==typeof t}function P(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function E(t){return Object.prototype.toString.call(t)}function C(t){return 10>t?"0"+t.toString(10):t.toString(10)}function k(){var t=new Date,e=[C(t.getHours()),C(t.getMinutes()),C(t.getSeconds())].join(":");return[t.getDate(),L[t.getMonth()],e].join(" ")}function U(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var F=/%[sdj%]/g;e.format=function(t){if(!d(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(o(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,i=n.length,u=String(t).replace(F,function(t){if("%%"===t)return"%";if(r>=i)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return t}}),c=n[r];i>r;c=n[++r])u+=v(c)||!w(c)?" "+c:" "+o(c);return u},e.deprecate=function(r,o){function i(){if(!u){if(n.throwDeprecation)throw new Error(o);n.traceDeprecation?console.trace(o):console.error(o),u=!0}return r.apply(this,arguments)}if(x(t.process))return function(){return e.deprecate(r,o).apply(this,arguments)};if(n.noDeprecation===!0)return r;var u=!1;return i};var z,M={};e.debuglog=function(t){if(x(z)&&(z=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!M[t])if(new RegExp("\\b"+t+"\\b","i").test(z)){var r=n.pid;M[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else M[t]=function(){};return M[t]},e.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=y,e.isBoolean=g,e.isNull=v,e.isNullOrUndefined=b,e.isNumber=m,e.isString=d,e.isSymbol=j,e.isUndefined=x,e.isRegExp=_,e.isObject=w,e.isDate=A,e.isError=S,e.isFunction=O,e.isPrimitive=P,e.isBuffer=r(55);var L=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",k(),e.format.apply(e,arguments))},e.inherits=r(54),e._extend=function(t,e){if(!e||!w(e))return t;
for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(53))}])});