UNPKG

tulipan

Version:

Tulipan.js is a simple minimalistic and progressive JavaScript Framework for building Single Page Applications on the web

1 lines 133 kB
!function(b,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define(a):b.Navigo=a()}(this,function(){"use strict";var f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function g(){return!!("undefined"!=typeof window&&window.history&&window.history.pushState)}function a(b,a,c){this.root=null,this._routes=[],this._useHash=a,this._hash=void 0===c?"#":c,this._paused=!1,this._destroyed=!1,this._lastRouteResolved=null,this._notFoundHandler=null,this._defaultHandler=null,this._usePushState=!a&&g(),this._onLocationChange=this._onLocationChange.bind(this),this._genericHooks=null,this._historyAPIUpdateMethod="pushState",b?this.root=a?b.replace(/\/$/,"/"+this._hash):b.replace(/\/$/,""):a&&(this.root=this._cLoc().split(this._hash)[0].replace(/\/$/,"/"+this._hash)),this._listen(),this.updatePageLinks()}function b(a){return a instanceof RegExp?a:a.replace(/\/+$/,"").replace(/^\/+/,"^/")}function h(a){return a.replace(/\/$/,"").split("/").length}function i(a,b){return h(b)-h(a)}function c(c,d){return function(d){var c=arguments.length>1&& void 0!==arguments[1]?arguments[1]:[];return c.map(function(g){var c,h,e,j,i=(c=b(g.route),h=[],{regexp:c instanceof RegExp?c:new RegExp(c.replace(a.PARAMETER_REGEXP,function(c,d,b){return h.push(b),a.REPLACE_VARIABLE_REGEXP}).replace(a.WILDCARD_REGEXP,a.REPLACE_WILDCARD)+a.FOLLOWED_BY_SLASH_REGEXP,a.MATCH_REGEXP_FLAGS),paramNames:h}),k=i.regexp,l=i.paramNames,f=d.replace(/^\/+/,"/").match(k),m=(e=f,0!==(j=l).length&&e?e.slice(1,e.length).reduce(function(a,b,c){return null===a&&(a={}),a[j[c]]=decodeURIComponent(b),a},null):null);return!!f&&{match:f,route:g,params:m}}).filter(function(a){return a})}(c,d)[0]||!1}function d(c,d){var a=d.map(function(a){return""===a.route||"*"===a.route?c:c.split(new RegExp(a.route+"($|/)"))[0]}),e=b(c);return a.length>1?a.reduce(function(a,b){return a.length>b.length&&(a=b),a},a[0]):1===a.length?a[0]:e}function e(c,e,a){var b,d=function(a){return a.split(/\?(.*)?$/)[0]};return void 0===a&&(a="#"),g()&&!e?d(c).split(a)[0]:d((b=c.split(a)).length>1?b[1]:b[0])}function j(b,a,c){if(a&&(void 0===a?"undefined":f(a))==="object"){if(a.before){a.before(function(){var d=!(arguments.length>0)|| void 0===arguments[0]||arguments[0];d&&(b(),a.after&&a.after(c))},c);return}if(a.after){b(),a.after&&a.after(c);return}}b()}return a.prototype={helpers:{match:c,root:d,clean:b,getOnlyURL:e},navigate:function(a,c){var b;return a=a||"",this._usePushState?(b=(b=(c?"":this._getRoot()+"/")+a.replace(/^\/+/,"/")).replace(/([^:])(\/{2,})/g,"$1/"),history[this._historyAPIUpdateMethod]({},"",b),this.resolve()):"undefined"!=typeof window&&(a=a.replace(new RegExp("^"+this._hash),""),window.location.href=window.location.href.replace(/#$/,"").replace(new RegExp(this._hash+".*$"),"")+this._hash+a),this},on:function(){for(var e=this,c=arguments.length,a=Array(c),b=0;b<c;b++)a[b]=arguments[b];if("function"==typeof a[0])this._defaultHandler={handler:a[0],hooks:a[1]};else if(a.length>=2){if("/"===a[0]){var d=a[1];"object"===f(a[1])&&(d=a[1].uses),this._defaultHandler={handler:d,hooks:a[2]}}else this._add(a[0],a[1],a[2])}else"object"===f(a[0])&&Object.keys(a[0]).sort(i).forEach(function(b){e.on(b,a[0][b])});return this},off:function(a){return null!==this._defaultHandler&&a===this._defaultHandler.handler?this._defaultHandler=null:null!==this._notFoundHandler&&a===this._notFoundHandler.handler&&(this._notFoundHandler=null),this._routes=this._routes.reduce(function(b,c){return c.handler!==a&&b.push(c),b},[]),this},notFound:function(a,b){return this._notFoundHandler={handler:a,hooks:b},this},resolve:function(f){var i,a,k,l=this,d=(f||this._cLoc()).replace(this._getRoot(),"");this._useHash&&(d=d.replace(new RegExp("^/"+this._hash),"/"));var h=(f||this._cLoc()).split(/\?(.*)?$/).slice(1).join(""),b=e(d,this._useHash,this._hash);return!this._paused&&(this._lastRouteResolved&&b===this._lastRouteResolved.url&&h===this._lastRouteResolved.query?(this._lastRouteResolved.hooks&&this._lastRouteResolved.hooks.already&&this._lastRouteResolved.hooks.already(this._lastRouteResolved.params),!1):(a=c(b,this._routes))?(this._callLeave(),this._lastRouteResolved={url:b,query:h,hooks:a.route.hooks,params:a.params,name:a.route.name},i=a.route.handler,j(function(){j(function(){a.route.route instanceof RegExp?i.apply(void 0,a.match.slice(1,a.match.length)):i(a.params,h)},a.route.hooks,a.params,l._genericHooks)},this._genericHooks,a.params),a):this._defaultHandler&&(""===b||"/"===b||b===this._hash||function(a,d,b){if(g()&&!d||!a.match(b))return!1;var c=a.split(b);return c.length<2||""===c[1]}(b,this._useHash,this._hash))?(j(function(){j(function(){l._callLeave(),l._lastRouteResolved={url:b,query:h,hooks:l._defaultHandler.hooks},l._defaultHandler.handler(h)},l._defaultHandler.hooks)},this._genericHooks),!0):(this._notFoundHandler&&j(function(){j(function(){l._callLeave(),l._lastRouteResolved={url:b,query:h,hooks:l._notFoundHandler.hooks},l._notFoundHandler.handler(h)},l._notFoundHandler.hooks)},this._genericHooks),!1))},destroy:function(){this._routes=[],this._destroyed=!0,this._lastRouteResolved=null,this._genericHooks=null,clearTimeout(this._listeningInterval),"undefined"!=typeof window&&(window.removeEventListener("popstate",this._onLocationChange),window.removeEventListener("hashchange",this._onLocationChange))},updatePageLinks:function(){var a=this;"undefined"!=typeof document&&this._findLinks().forEach(function(b){b.hasListenerAttached||(b.addEventListener("click",function(c){if((c.ctrlKey||c.metaKey)&&"a"==c.target.tagName.toLowerCase())return!1;var d=a.getLinkPath(b);a._destroyed||(c.preventDefault(),a.navigate(d.replace(/\/+$/,"").replace(/^\/+/,"/")))}),b.hasListenerAttached=!0)})},generate:function(b){var c=arguments.length>1&& void 0!==arguments[1]?arguments[1]:{},a=this._routes.reduce(function(a,e){var d;if(e.name===b)for(d in a=e.route,c)a=a.toString().replace(":"+d,c[d]);return a},"");return this._useHash?this._hash+a:a},link:function(a){return this._getRoot()+a},pause:function(){var a=!(arguments.length>0)|| void 0===arguments[0]||arguments[0];this._paused=a,a?this._historyAPIUpdateMethod="replaceState":this._historyAPIUpdateMethod="pushState"},resume:function(){this.pause(!1)},historyAPIUpdateMethod:function(a){return void 0===a?this._historyAPIUpdateMethod:(this._historyAPIUpdateMethod=a,a)},disableIfAPINotAvailable:function(){g()||this.destroy()},lastRouteResolved:function(){return this._lastRouteResolved},getLinkPath:function(a){return a.getAttribute("href")},hooks:function(a){this._genericHooks=a},_add:function(b){var a=arguments.length>1&& void 0!==arguments[1]?arguments[1]:null,c=arguments.length>2&& void 0!==arguments[2]?arguments[2]:null;return"string"==typeof b&&(b=encodeURI(b)),this._routes.push((void 0===a?"undefined":f(a))==="object"?{route:b,handler:a.uses,name:a.as,hooks:c||a.hooks}:{route:b,handler:a,hooks:c}),this._add},_getRoot:function(){return null!==this.root||(this.root=d(this._cLoc().split("?")[0],this._routes)),this.root},_listen:function(){var b=this;if(this._usePushState)window.addEventListener("popstate",this._onLocationChange);else if("undefined"!=typeof window&&"onhashchange"in window)window.addEventListener("hashchange",this._onLocationChange);else{var c=this._cLoc(),d=void 0,a=void 0;(a=function(){c!==(d=b._cLoc())&&(c=d,b.resolve()),b._listeningInterval=setTimeout(a,200)})()}},_cLoc:function(){return"undefined"!=typeof window?void 0!==window.__NAVIGO_WINDOW_LOCATION_MOCK__?window.__NAVIGO_WINDOW_LOCATION_MOCK__:b(window.location.href):""},_findLinks:function(){return[].slice.call(document.querySelectorAll("[data-navigo]"))},_onLocationChange:function(){this.resolve()},_callLeave:function(){var a=this._lastRouteResolved;a&&a.hooks&&a.hooks.leave&&a.hooks.leave(a.params)}},a.PARAMETER_REGEXP=/([:*])(\w+)/g,a.WILDCARD_REGEXP=/\*/g,a.REPLACE_VARIABLE_REGEXP="([^/]+)",a.REPLACE_WILDCARD="(?:.*)",a.FOLLOWED_BY_SLASH_REGEXP="(?:/$|$)",a.MATCH_REGEXP_FLAGS="",a}),function(b,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define(a):b.store=a()}(this,function(){"use strict";var e,a={},f="undefined"!=typeof window?window:global,d=f.document,h="localStorage",g="script";if(a.disabled=!1,a.version="1.3.20",a.set=function(a,b){},a.get=function(a,b){},a.has=function(b){return void 0!==a.get(b)},a.remove=function(a){},a.clear=function(){},a.transact=function(d,b,c){null==c&&(c=b,b=null),null==b&&(b={});var e=a.get(d,b);c(e),a.set(d,e)},a.getAll=function(){},a.forEach=function(){},a.serialize=function(a){return JSON.stringify(a)},a.deserialize=function(a){if("string"==typeof a)try{return JSON.parse(a)}catch(b){return a||void 0}},function(){try{return h in f&&f[h]}catch(a){return!1}}())e=f[h],a.set=function(c,b){return void 0===b?a.remove(c):(e.setItem(c,a.serialize(b)),b)},a.get=function(c,d){var b=a.deserialize(e.getItem(c));return void 0===b?d:b},a.remove=function(a){e.removeItem(a)},a.clear=function(){e.clear()},a.getAll=function(){var b={};return a.forEach(function(a,c){b[a]=c}),b},a.forEach=function(d){for(var b=0;b<e.length;b++){var c=e.key(b);d(c,a.get(c))}};else if(d&&d.documentElement.addBehavior){try{(k=new ActiveXObject("htmlfile")).open(),k.write("<"+g+">document.w=window</"+g+'><iframe src="/favicon.ico"></iframe>'),k.close(),e=(j=k.w.frames[0].document).createElement("div")}catch(i){e=d.createElement("div"),j=d.body}var j,k,b=function(b){return function(){var c=Array.prototype.slice.call(arguments,0);c.unshift(e),j.appendChild(e),e.addBehavior("#default#userData"),e.load(h);var d=b.apply(a,c);return j.removeChild(e),d}},l=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g"),m=function(a){return a.replace(/^d/,"___$&").replace(l,"___")};a.set=b(function(d,b,c){return(b=m(b),void 0===c)?a.remove(b):(d.setAttribute(b,a.serialize(c)),d.save(h),c)}),a.get=b(function(d,b,e){b=m(b);var c=a.deserialize(d.getAttribute(b));return void 0===c?e:c}),a.remove=b(function(b,a){a=m(a),b.removeAttribute(a),b.save(h)}),a.clear=b(function(a){var c=a.XMLDocument.documentElement.attributes;a.load(h);for(var b=c.length-1;b>=0;b--)a.removeAttribute(c[b].name);a.save(h)}),a.getAll=function(c){var b={};return a.forEach(function(a,c){b[a]=c}),b},a.forEach=b(function(c,e){for(var b,f=c.XMLDocument.documentElement.attributes,d=0;b=f[d];++d)e(b.name,a.deserialize(c.getAttribute(b.name)))})}try{var c="__storejs__";a.set(c,c),a.get(c)!=c&&(a.disabled=!0),a.remove(c)}catch(n){a.disabled=!0}return a.enabled=!a.disabled,a}),function(c,a){var d,b;"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define("underscore",a):(d=c._,b=a(),c._=b,b.noConflict=function(){return c._=d,b})}(this,function(){var c="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},o=Array.prototype,p=Object.prototype,aS="undefined"!=typeof Symbol?Symbol.prototype:null,aT=o.push,aU=o.slice,aV=p.toString,aW=p.hasOwnProperty,Q=Array.isArray,aX=Object.keys,aY=Object.create,aZ=c.isNaN,a$=c.isFinite,a_=function(){};function _(a){return a instanceof _?a:this instanceof _?void(this._wrapped=a):new _(a)}var R=_.VERSION="1.10.2";function a0(b,c,a){if(void 0===c)return b;switch(null==a?3:a){case 1:return function(a){return b.call(c,a)};case 3:return function(a,d,e){return b.call(c,a,d,e)};case 4:return function(a,d,e,f){return b.call(c,a,d,e,f)}}return function(){return b.apply(c,arguments)}}function a1(a,b,c){return null==a?aK:L(a)?a0(a,b,c):aw(a)&&!av(a)?M(a):aL(a)}function q(a,b){return a1(a,b,1/0)}function a2(a,b,c){return _.iteratee!==q?_.iteratee(a,b):a1(a,b,c)}function b(b,a){return a=null==a?b.length-1:+a,function(){for(var f=Math.max(arguments.length-a,0),d=Array(f),c=0;c<f;c++)d[c]=arguments[c+a];switch(a){case 0:return b.call(this,d);case 1:return b.call(this,arguments[0],d);case 2:return b.call(this,arguments[0],arguments[1],d)}var e=Array(a+1);for(c=0;c<a;c++)e[c]=arguments[c];return e[a]=d,b.apply(this,e)}}function a3(a){if(!aw(a))return{};if(aY)return aY(a);a_.prototype=a;var b=new a_;return a_.prototype=null,b}function S(a){return function(b){return null==b?void 0:b[a]}}function a4(a,b){return null!=a&&aW.call(a,b)}function a5(a,c){for(var d=c.length,b=0;b<d;b++){if(null==a)return;a=a[c[b]]}return d?a:void 0}_.iteratee=q;var a6=9007199254740991,a7=S("length");function a8(b){var a=a7(b);return"number"==typeof a&&a>=0&&a<=a6}function d(a,c,f){if(c=a0(c,f),a8(a))for(b=0,e=a.length;b<e;b++)c(a[b],b,a);else{var b,e,d=H(a);for(b=0,e=d.length;b<e;b++)c(a[d[b]],d[b],a)}return a}function r(a,c,h){c=a2(c,h);for(var d=!a8(a)&&H(a),e=(d||a).length,f=Array(e),b=0;b<e;b++){var g=d?d[b]:b;f[b]=c(a[g],g,a)}return f}function s(a){var b=function(c,h,e,i){var d=!a8(c)&&H(c),f=(d||c).length,b=a>0?0:f-1;for(i||(e=c[d?d[b]:b],b+=a);b>=0&&b<f;b+=a){var g=d?d[b]:b;e=h(e,c[g],g,c)}return e};return function(a,c,d,e){var f=arguments.length>=3;return b(a,a0(c,e,4),d,f)}}var g=s(1),t=s(-1);function u(a,c,d){var b=(a8(a)?B:ao)(a,c,d);if(void 0!==b&& -1!==b)return a[b]}function v(b,a,c){var e=[];return a=a2(a,c),d(b,function(b,c,d){a(b,c,d)&&e.push(b)}),e}function w(a,c,f){c=a2(c,f);for(var d=!a8(a)&&H(a),g=(d||a).length,b=0;b<g;b++){var e=d?d[b]:b;if(!c(a[e],e,a))return!1}return!0}function x(a,c,f){c=a2(c,f);for(var d=!a8(a)&&H(a),g=(d||a).length,b=0;b<g;b++){var e=d?d[b]:b;if(c(a[e],e,a))return!0}return!1}function h(a,c,b,d){return a8(a)||(a=am(a)),("number"!=typeof b||d)&&(b=0),af(a,c,b)>=0}var T=b(function(b,a,e){var c,d;return L(a)?d=a:av(a)&&(c=a.slice(0,-1),a=a[a.length-1]),r(b,function(b){var f=d;if(!f){if(c&&c.length&&(b=a5(b,c)),null==b)return;f=b[a]}return null==f?f:f.apply(b,e)})});function U(a,b){return r(a,aL(b))}function V(a,b,g){var c,i,e=-1/0,j=-1/0;if(null==b||"number"==typeof b&&"object"!=typeof a[0]&&null!=a){a=a8(a)?a:am(a);for(var f=0,h=a.length;f<h;f++)null!=(c=a[f])&&c>e&&(e=c)}else b=a2(b,g),d(a,function(a,c,d){((i=b(a,c,d))>j||i=== -1/0&&e=== -1/0)&&(e=a,j=i)});return e}function W(a,c,g){if(null==c||g)return a8(a)||(a=am(a)),a[aM(a.length-1)];var b=a8(a)?as(a):am(a),e=a7(b);c=Math.max(Math.min(c,e),0);for(var h=e-1,d=0;d<c;d++){var f=aM(d,h),i=b[d];b[d]=b[f],b[f]=i}return b.slice(0,c)}function e(a,b){return function(e,c,f){var g=b?[[],[]]:{};return c=a2(c,f),d(e,function(b,d){var f=c(b,d,e);a(g,b,f)}),g}}var X=e(function(a,c,b){a4(a,b)?a[b].push(c):a[b]=[c]}),Y=e(function(a,b,c){a[c]=b}),Z=e(function(a,c,b){a4(a,b)?a[b]++:a[b]=1}),a9=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g,$=e(function(a,b,c){a[c?0:1].push(b)},!0);function i(a,b,c){return null==a||a.length<1?null==b?void 0:[]:null==b||c?a[0]:aa(a,a.length-b)}function aa(a,b,c){return aU.call(a,0,Math.max(0,a.length-(null==b||c?1:b)))}function j(b,a,c){return aU.call(b,null==a||c?1:a)}function ba(e,f,g,a){for(var c=(a=a||[]).length,d=0,i=a7(e);d<i;d++){var b=e[d];if(a8(b)&&(av(b)||m(b))){if(f)for(var h=0,j=b.length;h<j;)a[c++]=b[h++];else ba(b,f,g,a),c=a.length}else g||(a[c++]=b)}return a}var ab=b(function(a,b){return ad(a,b)});function y(i,e,a,j){aJ(e)||(j=a,a=e,e=!1),null!=a&&(a=a2(a,j));for(var c=[],f=[],d=0,k=a7(i);d<k;d++){var b=i[d],g=a?a(b,d,i):b;e&&!a?(d&&f===g||c.push(b),f=g):a?h(f,g)||(f.push(g),c.push(b)):h(c,b)||c.push(b)}return c}var ac=b(function(a){return y(ba(a,!0,!0))}),ad=b(function(b,a){return a=ba(a,!0,!0),v(b,function(b){return!h(a,b)})});function z(b){for(var c=b&&V(b,a7).length||0,d=Array(c),a=0;a<c;a++)d[a]=U(b,a);return d}var ae=b(z);function A(a){return function(c,d,f){d=a2(d,f);for(var e=a7(c),b=a>0?0:e-1;b>=0&&b<e;b+=a)if(d(c[b],b,c))return b;return -1}}var B=A(1),C=A(-1);function D(e,f,b,g){for(var h=(b=a2(b,g,1))(f),a=0,c=a7(e);a<c;){var d=Math.floor((a+c)/2);b(e[d])<h?a=d+1:c=d}return a}function E(a,b,c){return function(f,g,d){var h=0,e=a7(f);if("number"==typeof d)a>0?h=d>=0?d:Math.max(d+e,h):e=d>=0?Math.min(d+1,e):d+e+1;else if(c&&d&&e)return d=c(f,g),f[d]===g?d:-1;if(g!=g)return(d=b(aU.call(f,h,e),aI))>=0?d+h:-1;for(d=a>0?h:e-1;d>=0&&d<e;d+=a)if(f[d]===g)return d;return -1}}var af=E(1,B,D),ag=E(-1,C);function bb(a,e,f,g,b){if(!(g instanceof e))return a.apply(f,b);var c=a3(a.prototype),d=a.apply(c,b);return aw(d)?d:c}var ah=b(function(a,d,e){if(!L(a))throw new TypeError("Bind must be called on a function");var c=b(function(b){return bb(a,c,d,this,e.concat(b))});return c}),f=b(function(b,c){var d=f.placeholder,a=function(){for(var f=0,h=c.length,g=Array(h),e=0;e<h;e++)g[e]=c[e]===d?arguments[f++]:c[e];for(;f<arguments.length;)g.push(arguments[f++]);return bb(b,a,this,this,g)};return a});f.placeholder=_;var ai=b(function(a,b){var c=(b=ba(b,!1,!1)).length;if(c<1)throw new Error("bindAll must be passed function names");for(;c--;){var d=b[c];a[d]=ah(a[d],a)}}),F=b(function(b,a,c){return setTimeout(function(){return b.apply(null,c)},a)}),aj=f(F,_,1);function ak(a){return function(){return!a.apply(this,arguments)}}function G(a,b){var c;return function(){return--a>0&&(c=b.apply(this,arguments)),a<=1&&(b=null),c}}var al=f(G,2),bc=!({toString:null}).propertyIsEnumerable("toString"),bd=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];function be(b,c){var d=bd.length,e=b.constructor,f=L(e)&&e.prototype||p,a="constructor";for(a4(b,a)&&!h(c,a)&&c.push(a);d--;)(a=bd[d])in b&&b[a]!==f[a]&&!h(c,a)&&c.push(a)}function H(a){if(!aw(a))return[];if(aX)return aX(a);var b=[];for(var c in a)a4(a,c)&&b.push(c);return bc&&be(a,b),b}function k(a){if(!aw(a))return[];var b=[];for(var c in a)b.push(c);return bc&&be(a,b),b}function am(b){for(var c=H(b),d=c.length,e=Array(d),a=0;a<d;a++)e[a]=b[c[a]];return e}function I(c){for(var d={},b=H(c),a=0,e=b.length;a<e;a++)d[c[b[a]]]=b[a];return d}function J(a){var b=[];for(var c in a)L(a[c])&&b.push(c);return b.sort()}function l(a,b){return function(c){var g=arguments.length;if(b&&(c=Object(c)),g<2||null==c)return c;for(var d=1;d<g;d++)for(var h=arguments[d],i=a(h),j=i.length,e=0;e<j;e++){var f=i[e];b&& void 0!==c[f]||(c[f]=h[f])}return c}}var an=l(k),K=l(H);function ao(a,b,f){b=a2(b,f);for(var c,e=H(a),d=0,g=e.length;d<g;d++)if(b(a[c=e[d]],c,a))return c}function bf(c,a,b){return a in b}var ap=b(function(b,a){var d={},c=a[0];if(null==b)return d;L(c)?(a.length>1&&(c=a0(c,a[1])),a=k(b)):(c=bf,a=ba(a,!1,!1),b=Object(b));for(var e=0,h=a.length;e<h;e++){var f=a[e],g=b[f];c(g,f,b)&&(d[f]=g)}return d}),aq=b(function(d,a){var c,b=a[0];return L(b)?(b=ak(b),a.length>1&&(c=a[1])):(a=r(ba(a,!1,!1),String),b=function(c,b){return!h(a,b)}),ap(d,b,c)}),ar=l(k,!0);function as(a){return aw(a)?av(a)?a.slice():an({},a):a}function at(a,b){return b(a),a}function au(c,d){var e=H(d),f=e.length;if(null==c)return!f;for(var g=Object(c),a=0;a<f;a++){var b=e[a];if(d[b]!==g[b]||!(b in g))return!1}return!0}function bg(a,b,d,e){if(a===b)return 0!==a||1/a==1/b;if(null==a||null==b)return!1;if(a!=a)return b!=b;var c=typeof a;return("function"===c||"object"===c||"object"==typeof b)&&bh(a,b,d,e)}function bh(a,b,d,e){a instanceof _&&(a=a._wrapped),b instanceof _&&(b=b._wrapped);var h=aV.call(a);if(h!==aV.call(b))return!1;switch(h){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":if(+a!= +a)return+b!= +b;return 0== +a?1/+a==1/b:+a== +b;case"[object Date]":case"[object Boolean]":return+a== +b;case"[object Symbol]":return aS.valueOf.call(a)===aS.valueOf.call(b)}var j="[object Array]"===h;if(!j){if("object"!=typeof a||"object"!=typeof b)return!1;var f=a.constructor,g=b.constructor;if(f!==g&&!(L(f)&&f instanceof f&&L(g)&&g instanceof g)&&"constructor"in a&&"constructor"in b)return!1}e=e||[];for(var c=(d=d||[]).length;c--;)if(d[c]===a)return e[c]===b;if(d.push(a),e.push(b),j){if((c=a.length)!==b.length)return!1;for(;c--;)if(!bg(a[c],b[c],d,e))return!1}else{var i,k=H(a);if(c=k.length,H(b).length!==c)return!1;for(;c--;)if(!(a4(b,i=k[c])&&bg(a[i],b[i],d,e)))return!1}return d.pop(),e.pop(),!0}function a(a){return function(b){return aV.call(b)==="[object "+a+"]"}}var av=Q||a("Array");function aw(a){var b=typeof a;return"function"===b||"object"===b&&!!a}var m=a("Arguments"),L=a("Function"),ax=a("String"),ay=a("Number"),az=a("Date"),aA=a("RegExp"),aB=a("Error"),aC=a("Symbol"),aD=a("Map"),aE=a("WeakMap"),aF=a("Set"),aG=a("WeakSet");m(arguments)||(m=function(a){return a4(a,"callee")});var aH=c.document&&c.document.childNodes;function aI(a){return ay(a)&&aZ(a)}function aJ(a){return!0===a|| !1===a||"[object Boolean]"===aV.call(a)}function aK(a){return a}function aL(a){return av(a)?function(b){return a5(b,a)}:S(a)}function M(a){return a=K({},a),function(b){return au(b,a)}}function aM(a,b){return null==b&&(b=a,a=0),a+Math.floor(Math.random()*(b-a+1))}"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof aH&&(L=function(a){return"function"==typeof a});var aN=Date.now||function(){return new Date().getTime()},N={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},aO=I(N);function O(b){var c=function(a){return b[a]},a="(?:"+H(b).join("|")+")",d=RegExp(a),e=RegExp(a,"g");return function(a){return a=null==a?"":""+a,d.test(a)?a.replace(e,c):a}}var aP=O(N),aQ=O(aO),bi=0,aR=_.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},bj=/(.)^/,bk={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},bl=/\\|'|\r|\n|\u2028|\u2029/g,bm=function(a){return"\\"+bk[a]};function bn(b,a){return b._chain?_(a).chain():a}function P(a){return d(J(a),function(b){var c=_[b]=a[b];_.prototype[b]=function(){var a=[this._wrapped];return aT.apply(a,arguments),bn(this,c.apply(_,a))}}),_}d(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=o[a];_.prototype[a]=function(){var c=this._wrapped;return b.apply(c,arguments),("shift"===a||"splice"===a)&&0===c.length&&delete c[0],bn(this,c)}}),d(["concat","join","slice"],function(a){var b=o[a];_.prototype[a]=function(){return bn(this,b.apply(this._wrapped,arguments))}}),_.prototype.value=function(){return this._wrapped},_.prototype.valueOf=_.prototype.toJSON=_.prototype.value,_.prototype.toString=function(){return String(this._wrapped)};var n=P({default:_,VERSION:R,iteratee:q,restArguments:b,each:d,forEach:d,map:r,collect:r,reduce:g,foldl:g,inject:g,reduceRight:t,foldr:t,find:u,detect:u,filter:v,select:v,reject:function(a,b,c){return v(a,ak(a2(b)),c)},every:w,all:w,some:x,any:x,contains:h,includes:h,include:h,invoke:T,pluck:U,where:function(a,b){return v(a,M(b))},findWhere:function(a,b){return u(a,M(b))},max:V,min:function(a,b,g){var c,i,e=1/0,j=1/0;if(null==b||"number"==typeof b&&"object"!=typeof a[0]&&null!=a){a=a8(a)?a:am(a);for(var f=0,h=a.length;f<h;f++)null!=(c=a[f])&&c<e&&(e=c)}else b=a2(b,g),d(a,function(a,c,d){((i=b(a,c,d))<j||i===1/0&&e===1/0)&&(e=a,j=i)});return e},shuffle:function(a){return W(a,1/0)},sample:W,sortBy:function(b,a,c){var d=0;return a=a2(a,c),U(r(b,function(b,c,e){return{value:b,index:d++,criteria:a(b,c,e)}}).sort(function(c,d){var a=c.criteria,b=d.criteria;if(a!==b){if(a>b|| void 0===a)return 1;if(a<b|| void 0===b)return -1}return c.index-d.index}),"value")},groupBy:X,indexBy:Y,countBy:Z,toArray:function(a){return a?av(a)?aU.call(a):ax(a)?a.match(a9):a8(a)?r(a,aK):am(a):[]},size:function(a){return null==a?0:a8(a)?a.length:H(a).length},partition:$,first:i,head:i,take:i,initial:aa,last:function(a,b,c){return null==a||a.length<1?null==b?void 0:[]:null==b||c?a[a.length-1]:j(a,Math.max(0,a.length-b))},rest:j,tail:j,drop:j,compact:function(a){return v(a,Boolean)},flatten:function(a,b){return ba(a,b,!1)},without:ab,uniq:y,unique:y,union:ac,intersection:function(e){for(var b=[],f=arguments.length,c=0,g=a7(e);c<g;c++){var a,d=e[c];if(!h(b,d)){for(a=1;a<f&&h(arguments[a],d);a++);a===f&&b.push(d)}}return b},difference:ad,unzip:z,zip:ae,object:function(b,d){for(var c={},a=0,e=a7(b);a<e;a++)d?c[b[a]]=d[a]:c[b[a][0]]=b[a][1];return c},findIndex:B,findLastIndex:C,sortedIndex:D,indexOf:af,lastIndexOf:ag,range:function(a,b,c){null==b&&(b=a||0,a=0),c||(c=b<a?-1:1);for(var e=Math.max(Math.ceil((b-a)/c),0),f=Array(e),d=0;d<e;d++,a+=c)f[d]=a;return f},chunk:function(c,a){if(null==a||a<1)return[];for(var d=[],b=0,e=c.length;b<e;)d.push(aU.call(c,b,b+=a));return d},bind:ah,partial:f,bindAll:ai,memoize:function(b,c){var a=function(f){var d=a.cache,e=""+(c?c.apply(this,arguments):f);return a4(d,e)||(d[e]=b.apply(this,arguments)),d[e]};return a.cache={},a},delay:F,defer:aj,throttle:function(c,d,a){var e,f,g,h,i=0;a||(a={});var j=function(){i=!1===a.leading?0:aN(),e=null,h=c.apply(f,g),e||(f=g=null)},b=function(){var b=aN();i|| !1!==a.leading||(i=b);var k=d-(b-i);return f=this,g=arguments,k<=0||k>d?(e&&(clearTimeout(e),e=null),i=b,h=c.apply(f,g),e||(f=g=null)):e|| !1===a.trailing||(e=setTimeout(j,k)),h};return b.cancel=function(){clearTimeout(e),i=0,e=f=g=null},b},debounce:function(c,d,e){var f,g,h=function(b,a){f=null,a&&(g=c.apply(b,a))},a=b(function(a){if(f&&clearTimeout(f),e){var b=!f;f=setTimeout(h,d),b&&(g=c.apply(this,a))}else f=F(h,d,this,a);return g});return a.cancel=function(){clearTimeout(f),f=null},a},wrap:function(a,b){return f(b,a)},negate:ak,compose:function(){var a=arguments,b=a.length-1;return function(){for(var d=b,c=a[b].apply(this,arguments);d--;)c=a[d].call(this,c);return c}},after:function(a,b){return function(){if(--a<1)return b.apply(this,arguments)}},before:G,once:al,keys:H,allKeys:k,values:am,mapObject:function(a,b,g){b=a2(b,g);for(var e=H(a),h=e.length,f={},c=0;c<h;c++){var d=e[c];f[d]=b(a[d],d,a)}return f},pairs:function(c){for(var b=H(c),d=b.length,e=Array(d),a=0;a<d;a++)e[a]=[b[a],c[b[a]]];return e},invert:I,functions:J,methods:J,extend:an,extendOwn:K,assign:K,findKey:ao,pick:ap,omit:aq,defaults:ar,create:function(c,a){var b=a3(c);return a&&K(b,a),b},clone:as,tap:at,isMatch:au,isEqual:function(a,b){return bg(a,b)},isEmpty:function(a){return null==a||(a8(a)&&(av(a)||ax(a)||m(a))?0===a.length:0===H(a).length)},isElement:function(a){return!!(a&&1===a.nodeType)},isArray:av,isObject:aw,isArguments:m,isFunction:L,isString:ax,isNumber:ay,isDate:az,isRegExp:aA,isError:aB,isSymbol:aC,isMap:aD,isWeakMap:aE,isSet:aF,isWeakSet:aG,isFinite:function(a){return!aC(a)&&a$(a)&&!aZ(parseFloat(a))},isNaN:aI,isBoolean:aJ,isNull:function(a){return null===a},isUndefined:function(a){return void 0===a},has:function(a,b){if(!av(b))return a4(a,b);for(var d=b.length,c=0;c<d;c++){var e=b[c];if(null==a||!aW.call(a,e))return!1;a=a[e]}return!!d},identity:aK,constant:function(a){return function(){return a}},noop:function(){},property:aL,propertyOf:function(a){return null==a?function(){}:function(b){return av(b)?a5(a,b):a[b]}},matcher:M,matches:M,times:function(c,b,e){var d=Array(Math.max(0,c));b=a0(b,e,1);for(var a=0;a<c;a++)d[a]=b(a);return d},random:aM,now:aN,escape:aP,unescape:aQ,result:function(a,b,d){av(b)||(b=[b]);var f=b.length;if(!f)return L(d)?d.call(a):d;for(var e=0;e<f;e++){var c=null==a?void 0:a[b[e]];void 0===c&&(c=d,e=f),a=L(c)?c.call(a):c}return a},uniqueId:function(a){var b=++bi+"";return a?a+b:b},templateSettings:aR,template:function(f,a,c){!a&&c&&(a=c),a=ar({},a,_.templateSettings);var g,h=RegExp([(a.escape||bj).source,(a.interpolate||bj).source,(a.evaluate||bj).source].join("|")+"|$","g"),j=0,b="__p+='";f.replace(h,function(a,c,d,e,g){return b+=f.slice(j,g).replace(bl,bm),j=g+a.length,c?b+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'":d?b+="'+\n((__t=("+d+"))==null?'':__t)+\n'":e&&(b+="';\n"+e+"\n__p+='"),a}),b+="';\n",a.variable||(b="with(obj||{}){\n"+b+"}\n"),b="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+b+"return __p;\n";try{g=new Function(a.variable||"obj","_",b)}catch(d){throw d.source=b,d}var e=function(a){return g.call(this,a,_)},i=a.variable||"obj";return e.source="function("+i+"){\n"+b+"}",e},chain:function(b){var a=_(b);return a._chain=!0,a},mixin:P});return n._=n,n}),function(b,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define(a):b.TurpialCore=a()}(this,function(){"use strict";function x(a,b,d){if(L(a,b)){a[b]=d;return}if(a._isTurpialCore){x(a._data,b,d);return}var c=a.__ob__;if(!c){a[b]=d;return}if(c.convert(b,d),c.dep.notify(),c.vms)for(var e=c.vms.length;e--;){var f=c.vms[e];f._proxy(b),f._digest()}return d}function y(a,c){if(L(a,c)){delete a[c];var b=a.__ob__;if(!b){a._isTurpialCore&&(delete a._data[c],a._digest());return}if(b.dep.notify(),b.vms)for(var d=b.vms.length;d--;){var e=b.vms[d];e._unproxy(c),e._digest()}}}var bs,k,z,bt,bu,bv,bw,bx,by,K,bz=Object.prototype.hasOwnProperty;function L(a,b){return bz.call(a,b)}var bA=/^\s?(true|false|-?[\d\.]+|'[^']*'|"[^"]*")\s?$/;function M(a){return bA.test(a)}function N(b){var a=(b+"").charCodeAt(0);return 36===a||95===a}function O(a){return null==a?"":a.toString()}function P(a){if("string"!=typeof a)return a;var b=Number(a);return isNaN(b)?a:b}function Q(a){return"true"===a||"false"!==a&&a}function R(a){var b=a.charCodeAt(0);return b===a.charCodeAt(a.length-1)&&(34===b||39===b)?a.slice(1,-1):a}var bB=/-(\w)/g;function S(a){return a.replace(bB,bC)}function bC(_,a){return a?a.toUpperCase():""}var bD=/([^-])([A-Z])/g;function T(a){return a.replace(bD,"$1-$2").replace(bD,"$1-$2").toLowerCase()}var bE=/(?:^|[-_\/])(\w)/g;function U(a){return a.replace(bE,bC)}function V(a,b){return function(d){var c=arguments.length;return c?c>1?a.apply(b,arguments):a.call(b,d):a.call(b)}}function W(c,a){a=a||0;for(var b=c.length-a,d=new Array(b);b--;)d[b]=c[b+a];return d}function A(c,d){for(var a=Object.keys(d),b=a.length;b--;)c[a[b]]=d[a[b]];return c}function X(a){return null!==a&&"object"==typeof a}var bF=Object.prototype.toString;function Y(a){return"[object Object]"===bF.call(a)}var Z=Array.isArray;function q(a,b,c,d){Object.defineProperty(a,b,{value:c,enumerable:!!d,writable:!0,configurable:!0})}function $(a,b){var c,d,e,f,g,h=function i(){var h=Date.now()-f;h<b&&h>=0?c=setTimeout(i,b-h):(c=null,g=a.apply(e,d),c||(e=d=null))};return function(){return e=this,d=arguments,f=Date.now(),c||(c=setTimeout(h,b)),g}}function aa(b,c){for(var a=b.length;a--;)if(b[a]===c)return a;return -1}function ab(b){var a=function a(){if(!a.cancelled)return b.apply(this,arguments)};return a.cancel=function(){a.cancelled=!0},a}function ac(a,b){return a==b|| !!(X(a)&&X(b))&&JSON.stringify(a)===JSON.stringify(b)}var ad="__proto__"in{},n="undefined"!=typeof window&&"[object Object]"!==Object.prototype.toString.call(window),ae=n&&window.__TurpialCore_DEVTOOLS_GLOBAL_HOOK__,g=n&&window.navigator.userAgent.toLowerCase(),af=g&&g.indexOf("trident")>0,B=g&&g.indexOf("msie 9.0")>0,ag=g&&g.indexOf("android")>0,ah=g&&/iphone|ipad|ipod|ios/.test(g),r=void 0,C=void 0,s=void 0,D=void 0;if(n&&!B){var E=void 0===window.ontransitionend&& void 0!==window.onwebkittransitionend,F=void 0===window.onanimationend&& void 0!==window.onwebkitanimationend;r=E?"WebkitTransition":"transition",C=E?"webkitTransitionEnd":"transitionend",s=F?"WebkitAnimation":"animation",D=F?"webkitAnimationEnd":"animationend"}function ai(a){return/native code/.test(a.toString())}var G=function(){var f=[],g=!1,a=void 0;function b(){g=!1;var b=f.slice(0);f.length=0;for(var a=0;a<b.length;a++)b[a]()}if("undefined"!=typeof Promise&&ai(Promise)){var h=Promise.resolve(),i=function(){};a=function(){h.then(b),ah&&setTimeout(i)}}else if("undefined"!=typeof MutationObserver){var c=1,d=new MutationObserver(b),e=document.createTextNode(String(c));d.observe(e,{characterData:!0}),a=function(){c=(c+1)%2,e.data=String(c)}}else a=setTimeout;return function(c,d){f.push(d?function(){c.call(d)}:c),g||(g=!0,a(b,0))}}(),l=void 0;function i(a){this.size=0,this.limit=a,this.head=this.tail=void 0,this._keymap=Object.create(null)}"undefined"!=typeof Set&&ai(Set)?l=Set:((l=function(){this.set=Object.create(null)}).prototype.has=function(a){return void 0!==this.set[a]},l.prototype.add=function(a){this.set[a]=1},l.prototype.clear=function(){this.set=Object.create(null)});var t=i.prototype;t.put=function(b,d){var c,a=this.get(b,!0);return!a&&(this.size===this.limit&&(c=this.shift()),a={key:b},this._keymap[b]=a,this.tail?(this.tail.newer=a,a.older=this.tail):this.head=a,this.tail=a,this.size++),a.value=d,c},t.shift=function(){var a=this.head;return a&&(this.head=this.head.newer,this.head.older=void 0,a.newer=a.older=void 0,this._keymap[a.key]=void 0,this.size--),a},t.get=function(b,c){var a=this._keymap[b];if(void 0!==a)return a===this.tail||(a.newer&&(a===this.head&&(this.head=a.newer),a.newer.older=a.older),a.older&&(a.older.newer=a.newer),a.newer=void 0,a.older=this.tail,this.tail&&(this.tail.newer=a),this.tail=a),c?a:a.value};var bG=new i(1e3),bH=/^in$|^-?\d+/,bI={91:1,123:1,40:1},bJ={91:93,123:125,40:41};function bK(){return bt.charCodeAt(bw+1)}function bL(){return bt.charCodeAt(++bw)}function bM(){return bw>=bv}function bN(){for(;32===bK();)bL()}function bO(a){return 34===a||39===a}function bP(a){return bI[a]}function bQ(a,b){return bJ[a]===b}function bR(){for(var a,b=bL();!bM();)if(92===(a=bL()))bL();else if(a===b)break}function bS(a){for(var b=0,c=a;!bM();){if(bO(a=bK())){bR();continue}if(c===a&&b++,bQ(c,a)&&b--,bL(),0===b)break}}function bT(){for(var a=bw;!bM();)if(bO(bx=bK()))bR();else if(bP(bx))bS(bx);else if(124===bx){if(bL(),124===(bx=bK()))bL();else{(0===by||3===by)&&(by=1);break}}else if(32===bx&&(2===by||3===by)){bN();break}else 1===by&&(by=2),bL();return bt.slice(a+1,bw)||null}function bU(){var b,a={};return by=1,a.name=bT().trim(),by=3,(b=bV()).length&&(a.args=b),a}function bV(){for(var a=[];!bM()&&1!==by;){var b=bT();if(!b)break;a.push(bW(b))}return a}function bW(a){if(bH.test(a))return{value:P(a),dynamic:!1};var b=R(a),c=b===a;return{value:c?a:b,dynamic:c}}function aj(a){var b,c;return bG.get(a)||(bu={},bv=(bt=a).length,bw=-1,bx="",by=0,0>bt.indexOf("|")?bu.expression=bt.trim():(bu.expression=bT().trim(),(b=function(){for(var a=[];!bM();)a.push(bU());return a}()).length&&(bu.filters=b)),bG.put(a,bu),bu)}var ak=Object.freeze({parseDirective:aj}),bX=/[-.*+?^${}()|[\]\/\\]/g,bY=void 0,bZ=void 0,b$=void 0;function b_(a){return a.replace(bX,"\\$&")}function al(){var c=b_(m.delimiters[0]),d=b_(m.delimiters[1]),a=b_(m.unsafeDelimiters[0]),b=b_(m.unsafeDelimiters[1]);bZ=new RegExp(a+"((?:.|\\n)+?)"+b+"|"+c+"((?:.|\\n)+?)"+d,"g"),b$=new RegExp("^"+a+"((?:.|\\n)+?)"+b+"$"),bY=new i(1e3)}function am(a){bY||al();var b,f,g,c,h,i=bY.get(a);if(i)return i;if(!bZ.test(a))return null;for(var d=[],e=bZ.lastIndex=0;b=bZ.exec(a);)(f=b.index)>e&&d.push({value:a.slice(e,f)}),c=(h=42===(c=(g=b$.test(b[0]))?b[1]:b[2]).charCodeAt(0))?c.slice(1):c,d.push({tag:!0,value:c.trim(),html:g,oneTime:h}),e=f+b[0].length;return e<a.length&&d.push({value:a.slice(e)}),bY.put(a,d),d}function an(a,b){return a.length>1?a.map(function(a){return b0(a,b)}).join("+"):b0(a[0],b,!0)}function b0(a,b,c){return a.tag?a.oneTime&&b?'"'+b.$eval(a.value)+'"':b2(a.value,c):'"'+a.value+'"'}var b1=/[^|]\|[^|]/;function b2(a,c){if(!b1.test(a))return c?a:"("+a+")";var b=aj(a);return b.filters?"this._applyFilters("+b.expression+",null,"+JSON.stringify(b.filters)+",false)":"("+a+")"}var ao,ap=Object.freeze({compileRegex:al,parseText:am,tokensToExp:an}),b3=["{{","}}"],b4=["{{{","}}}"],m=Object.defineProperties({debug:!1,silent:!1,async:!0,warnExpressionErrors:!0,devtools:!0,_delimitersChanged:!0,_assetTypes:["component","directive","elementDirective","filter","transition","partial"],_propBindingModes:{ONE_WAY:0,TWO_WAY:1,ONE_TIME:2},_maxUpdateCount:100},{delimiters:{get:function(){return b3},set:function(a){b3=a,al()},configurable:!0,enumerable:!0},unsafeDelimiters:{get:function(){return b4},set:function(a){b4=a,al()},configurable:!0,enumerable:!0}}),H=void 0,aq=void 0;function ar(a,d,b,c){au(a,1,function(){d.appendChild(a)},b,c)}function as(a,d,b,c){au(a,1,function(){aB(a,d)},b,c)}function at(a,b,c){au(a,-1,function(){aD(a)},b,c)}function au(e,f,d,a,b){var c=e.__v_trans;if(!c|| !c.hooks&&!C||!a._isCompiled||a.$parent&&!a.$parent._isCompiled){d(),b&&b();return}c[f>0?"enter":"leave"](d,b)}ao="undefined"!=typeof console,H=function(b,a){ao&&!m.silent&&console.error("[TurpialCore warn]: "+b+(a?aq(a):""))},aq=function(a){var b=a._isTurpialCore?a.$options.name:a.name;return b?" (found in component: <"+T(b)+">)":""};var av=Object.freeze({appendWithTransition:ar,beforeWithTransition:as,removeWithTransition:at,applyTransition:au});function aw(a){if("string"==typeof a){var b=a;(a=document.querySelector(a))||H("Cannot find element: "+b)}return a}function ax(a){if(!a)return!1;var c=a.ownerDocument.documentElement,b=a.parentNode;return c===a||c===b||!!(b&&1===b.nodeType&&c.contains(b))}function ay(a,b){var c=a.getAttribute(b);return null!==c&&a.removeAttribute(b),c}function az(b,c){var a=ay(b,":"+c);return null===a&&(a=ay(b,"tp-bind:"+c)),a}function aA(a,b){return a.hasAttribute(b)||a.hasAttribute(":"+b)||a.hasAttribute("tp-bind:"+b)}function aB(b,a){a.parentNode.insertBefore(b,a)}function aC(b,a){a.nextSibling?aB(b,a.nextSibling):a.parentNode.appendChild(b)}function aD(a){a.parentNode.removeChild(a)}function aE(b,a){a.firstChild?aB(b,a.firstChild):a.appendChild(b)}function aF(a,c){var b=a.parentNode;b&&b.replaceChild(c,a)}function aG(a,b,c,d){a.addEventListener(b,c,d)}function aH(a,b,c){a.removeEventListener(b,c)}function b5(b){var a=b.className;return"object"==typeof a&&(a=a.baseVal||""),a}function aI(a,b){B&&!/svg$/.test(a.namespaceURI)?a.className=b:a.setAttribute("class",b)}function aJ(a,b){if(a.classList)a.classList.add(b);else{var c=" "+b5(a)+" ";0>c.indexOf(" "+b+" ")&&aI(a,(c+b).trim())}}function aK(a,c){if(a.classList)a.classList.remove(c);else{for(var b=" "+b5(a)+" ",d=" "+c+" ";b.indexOf(d)>=0;)b=b.replace(d," ");aI(a,b.trim())}a.className||a.removeAttribute("class")}function aL(a,d){var c,b;if(aN(a)&&aS(a.content)&&(a=a.content),a.hasChildNodes())for(aM(a),b=d?document.createDocumentFragment():document.createElement("div");c=a.firstChild;)b.appendChild(c);return b}function aM(a){for(var b;b6(b=a.firstChild);)a.removeChild(b);for(;b6(b=a.lastChild);)a.removeChild(b)}function b6(a){return a&&(3===a.nodeType&&!a.data.trim()||8===a.nodeType)}function aN(a){return a.tagName&&"template"===a.tagName.toLowerCase()}function aO(b,c){var a=m.debug?document.createComment(b):document.createTextNode(c?" ":"");return a.__v_anchor=!0,a}var b7=/^tp-ref:/;function aP(b){if(b.hasAttributes())for(var c=b.attributes,a=0,e=c.length;a<e;a++){var d=c[a].name;if(b7.test(d))return S(d.replace(b7,""))}}function aQ(a,b,c){for(var d;a!==b;)d=a.nextSibling,c(a),a=d;c(b)}function aR(a,b,c,d,e){var f=!1,g=0,h=[];function i(){if(g++,f&&g>=h.length){for(var a=0;a<h.length;a++)d.appendChild(h[a]);e&&e()}}aQ(a,b,function(a){a===b&&(f=!0),h.push(a),at(a,c,i)})}function aS(a){return a&&11===a.nodeType}function aT(a){if(a.outerHTML)return a.outerHTML;var b=document.createElement("div");return b.appendChild(a.cloneNode(!0)),b.innerHTML}var aU=/^(div|p|span|img|a|b|i|br|ul|ol|li|h1|h2|h3|h4|h5|h6|code|pre|table|th|td|tr|form|label|input|select|option|nav|article|section|header|footer)$/i,aV=/^(slot|partial|component)$/i,aW=void 0;function aX(b,c){var a=b.tagName.toLowerCase(),d=b.hasAttributes();if(aU.test(a)||aV.test(a)){if(d)return b8(b,c)}else{if(aZ(c,"components",a))return{id:a};var e=d&&b8(b,c);if(e)return e;var f=c._componentNameMap&&c._componentNameMap[a];f?H("Unknown custom element: <"+a+"> - did you mean <"+f+">? HTML is case-insensitive, remember to use kebab-case in templates."):aW(b,a)&&H("Unknown custom element: <"+a+'> - did you register the component correctly? For recursive components, make sure to provide the "name" option.')}}function b8(b,c){var a=b.getAttribute("is");if(null!=a){if(aZ(c,"components",a))return b.removeAttribute("is"),{id:a}}else if(null!=(a=az(b,"is")))return{id:a,dynamic:!0}}aW=function(a,b){return b.indexOf("-")> -1?a.constructor===window.HTMLUnknownElement||a.constructor===window.HTMLElement:/HTMLUnknownElement/.test(a.toString())&&!/^(data|time|rtc|rb|details|dialog|summary)$/.test(b)};var b=m.optionMergeStrategies=Object.create(null);function b9(b,e){var a,d,c;for(a in e)d=b[a],c=e[a],L(b,a)?X(d)&&X(c)&&b9(d,c):x(b,a,c);return b}function ca(c,a){var b=Object.create(c||null);return a?A(b,cb(a)):b}function cb(b){if(Z(b)){for(var a,c={},d=b.length;d--;){var e="function"==typeof(a=b[d])?a.options&&a.options.name||a.id:a.name||a.id;e?c[e]=a:H('Array-syntax assets must provide a "name" or "id" field.')}return c}return b}function aY(c,a,f){(function(b){if(b.components)for(var f,c=b.components=cb(b.components),g=Object.keys(c),h=b._componentNameMap={},e=0,i=g.length;e<i;e++){var a=g[e];if(aU.test(a)||aV.test(a)){H("Do not use built-in or reserved HTML elements as component id: "+a);continue}h[a.replace(/-/g,"").toLowerCase()]=T(a),Y(f=c[a])&&(c[a]=d.extend(f))}})(a),function(d){var a,b,c=d.props;if(Z(c))for(d.props={},a=c.length;a--;)"string"==typeof(b=c[a])?d.props[b]=null:b.name&&(d.props[b.name]=b);else if(Y(c)){var e=Object.keys(c);for(a=e.length;a--;)"function"==typeof(b=c[e[a]])&&(c[e[a]]={type:b})}}(a),a.propsData&&!f&&H("propsData can only be used as an instantiation option.");var e,i={};if(a.extends&&(c="function"==typeof a.extends?aY(c,a.extends.options,f):aY(c,a.extends,f)),a.mixins)for(var g=0,j=a.mixins.length;g<j;g++){var h=a.mixins[g];c=aY(c,h.prototype instanceof d?h.options:h,f)}for(e in c)k(e);for(e in a)L(c,e)||k(e);function k(d){var e=b[d]||function(b,a){return void 0===a?b:a};i[d]=e(c[d],a[d],f,d)}return i}function aZ(d,e,a,g){if("string"==typeof a){var b,c=d[e],f=c[a]||c[b=S(a)]||c[b.charAt(0).toUpperCase()+b.slice(1)];return g&&!f&&H("Failed to resolve "+e.slice(0,-1)+": "+a,d),f}}b.data=function(a,b,c){return c?a||b?function(){var d="function"==typeof b?b.call(c):b,e="function"==typeof a?a.call(c):void 0;return d?b9(d,e):e}:void 0:b?"function"!=typeof b?(H('The "data" option should be a function that returns a per-instance value in component definitions.',c),a):a?function(){return b9(b.call(this),a.call(this))}:b:a},b.el=function(d,b,a){if(!a&&b&&"function"!=typeof b){H('The "el" option should be a function that returns a per-instance value in component definitions.',a);return}var c=b||d;return a&&"function"==typeof c?c.call(a):c},b.init=b.created=b.ready=b.attached=b.detached=b.beforeCompile=b.compiled=b.beforeDestroy=b.destroyed=b.activate=function(b,a){return a?b?b.concat(a):Z(a)?a:[a]:b},m._assetTypes.forEach(function(a){b[a+"s"]=ca}),b.watch=b.events=function(d,b){if(!b)return d;if(!d)return b;var c={};for(var e in A(c,d),b){var a=c[e],f=b[e];a&&!Z(a)&&(a=[a]),c[e]=a?a.concat(f):[f]}return c},b.props=b.methods=b.computed=function(a,b){if(!b)return a;if(!a)return b;var c=Object.create(null);return A(c,a),A(c,b),c};var cc=0;function o(){this.id=cc++,this.subs=[]}o.target=null,o.prototype.addSub=function(a){this.subs.push(a)},o.prototype.removeSub=function(a){this.subs.$remove(a)},o.prototype.depend=function(){o.target.addDep(this)},o.prototype.notify=function(){for(var b=W(this.subs),a=0,c=b.length;a<c;a++)b[a].update()};var u=Array.prototype,a$=Object.create(u);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(a){var b=u[a];q(a$,a,function(){for(var c,d=arguments.length,e=new Array(d);d--;)e[d]=arguments[d];var g=b.apply(this,e),f=this.__ob__;switch(a){case"push":case"unshift":c=e;break;case"splice":c=e.slice(2)}return c&&f.observeArray(c),f.dep.notify(),g})}),q(u,"$set",function(a,b){return a>=this.length&&(this.length=Number(a)+1),this.splice(a,1,b)[0]}),q(u,"$remove",function(b){if(this.length){var a=aa(this,b);if(a> -1)return this.splice(a,1)}});var cd=Object.getOwnPropertyNames(a$),ce=!0;function cf(a){ce=!1,a(),ce=!0}function p(a){(this.value=a,this.dep=new o,q(a,"__ob__",this),Z(a))?((ad?cg:ch)(a,a$,cd),this.observeArray(a)):this.walk(a)}function cg(a,b){a.__proto__=b}function ch(d,e,b){for(var a=0,f=b.length;a<f;a++){var c=b[a];q(d,c,e[c])}}function ci(a,c){var b;if(a&&"object"==typeof a)return L(a,"__ob__")&&a.__ob__ instanceof p?b=a.__ob__:ce&&(Z(a)||Y(a))&&Object.isExtensible(a)&&!a._isTurpialCore&&(b=new p(a)),b&&c&&b.addVm(c),b}function a_(b,c,d){var e=new o,a=Object.getOwnPropertyDescriptor(b,c);if(!a|| !1!==a.configurable){var f=a&&a.get,g=a&&a.set,h=ci(d);Object.defineProperty(b,c,{enumerable:!0,configurable:!0,get:function(){var a=f?f.call(b):d;if(o.target&&(e.depend(),h&&h.dep.depend(),Z(a)))for(var c,g=0,i=a.length;g<i;g++)(c=a[g])&&c.__ob__&&c.__ob__.dep.depend();return a},set:function(a){var c=f?f.call(b):d;a!==c&&(g?g.call(b,a):d=a,h=ci(a),e.notify())}})}}p.prototype.walk=function(c){for(var b=Object.keys(c),a=0,d=b.length;a<d;a++)this.convert(b[a],c[b[a]])},p.prototype.observeArray=function(b){for(var a=0,c=b.length;a<c;a++)ci(b[a])},p.prototype.convert=function(a,b){a_(this.value,a,b)},p.prototype.addVm=function(a){(this.vms||(this.vms=[])).push(a)},p.prototype.removeVm=function(a){this.vms.$remove(a)};var a0=Object.freeze({defineReactive:a_,set:x,del:y,hasOwn:L,isLiteral:M,isReserved:N,_toString:O,toNumber:P,toBoolean:Q,stripQuotes:R,camelize:S,hyphenate:T,classify:U,bind:V,toArray:W,extend:A,isObject:X,isPlainObject:Y,def:q,debounce:$,indexOf:aa,cancellable:ab,looseEqual:ac,isArray:Z,hasProto:ad,inBrowser:n,devtools:ae,isIE:af,isIE9:B,isAndroid:ag,isIOS:ah,get transitionProp(){return r},get transitionEndEvent(){return C},get animationProp(){return s},get animationEndEvent(){return D},nextTick:G,get _Set(){return l},query:aw,inDoc:ax,getAttr:ay,getBindAttr:az,hasBindAttr:aA,before:aB,after:aC,remove:aD,prepend:aE,replace:aF,on:aG,off:aH,setClass:aI,addClass:aJ,removeClass:aK,extractContent:aL,trimNode:aM,isTemplate:aN,createAnchor:aO,findRef:aP,mapNodeRange:aQ,removeNodeRange:aR,isFragment:aS,getOuterHTML:aT,mergeOptions:aY,resolveAsset:aZ,checkComponentAttr:aX,commonTagRE:aU,reservedTagRE:aV,get warn(){return H}}),cj=0,ck=new i(1e3),j=[];function cl(b){if(void 0===b)return"eof";var a=b.charCodeAt(0);switch(a){case 91:case 93:case 46:case 34:case 39:case 48:return b;case 95:case 36:return"ident";case 32:case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"ws"}return a>=97&&a<=122||a>=65&&a<=90?"ident":a>=49&&a<=57?"number":"else"}function cm(g){var d,e,n,h,b,f,i,k=[],l=-1,c=0,o=0,a=[];function m(){var b=g[l+1];if(5===c&&"'"===b||6===c&&'"'===b)return l++,e="\\"+b,a[0](),!0}for(a[1]=function(){void 0!==n&&(k.push(n),n=void 0)},a[0]=function(){void 0===n?n=e:n+=e},a[2]=function(){a[0](),o++},a[3]=function(){if(o>0)o--,c=4,a[0]();else{var d,b;if(o=0,!1===(n=(b=(d=n).trim(),!("0"===d.charAt(0)&&isNaN(d))&&(M(b)?R(b):"*"+b))))return!1;a[1]()}};null!=c;)if(!("\\"===(d=g[++l])&&m())){if(h=cl(d),8===(b=(i=j[c])[h]||i.else||8)||(c=b[0],f=a[b[1]],f&&(e=void 0===(e=b[2])?d:e,!1===f())))return;if(7===c)return k.raw=g,k}}function a1(b){var a=ck.get(b);return!a&&(a=cm(b))&&ck.put(b,a),a}function a2(a,b){return a5(b).get(a)}function a3(a,c,f){var d,b,g=a;if("string"==typeof c&&(c=cm(c)),!c||!X(a))return!1;for(var e=0,h=c.length;e<h;e++)d=a,"*"===(b=c[e]).charAt(0)&&(b=a5(b.slice(1)).get.call(g,g)),e<h-1?X(a=a[b])||(a={},d._isTurpialCore&&K(c,d),x(d,b,a)):Z(a)?a.$set(b,f):b in a?a[b]=f:(a._isTurpialCore&&K(c,a),x(a,b,f));return!0}j[0]={ws:[0],ident:[3,0],"[":[4],eof:[7]},j[1]={ws:[1],".":[2],"[":[4],eof:[7]},j[2]={ws:[2],ident:[3,0]},j[3]={ident:[3,0],"0":[3,0],number:[3,0],ws:[1,1],".":[2,1],"[":[4,1],eof:[7,1]},j[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],eof:8,else:[4,0]},j[5]={"'":[4,0],eof:8,else:[5,0]},j[6]={'"':[4,0],eof:8,else:[6,0]},K=function(a,b){H('You are setting a non-existent path "'+a.raw+'" on a vm instance. Consider pre-initializing the property with the "data" option for more reliable reactivity and better performance.',b)};var a4=Object.freeze({parsePath:a1,getPath:a2,setPath:a3}),cn=new i(1e3),co=new RegExp("^("+"Math,Date,this,true,false,null,undefined,Infinity,NaN,isNaN,isFinite,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,parseInt,parseFloat".replace(/,/g,"\\b|")+"\\b)"),cp=new RegExp("^("+"break,case,class,catch,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,in,instanceof,let,return,super,switch,throw,try,var,while,with,yield,enum,await,implements,package,protected,static,interface,private,public".replace(/,/g,"\\b|")+"\\b)"),cq=/\s/g,cr=/\n/g,cs=/[\{,]\s*[\w\$_]+\s*:|('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\"']|\\.)*`|`(?:[^`\\]|\\.)*`)|new |typeof |void /g,ct=/"(\d+)"/g,cu=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['.*?'\]|\[".*?"\]|\[\d+\]|\[[A-Za-z_$][\w$]*\])*$/,cv=/[^\w$\.](?:[A-Za-z_$][\w$]*)/g,cw=/^(?:true|false|null|undefined|Infinity|NaN)$/;function cx(){}var cy=[];function cz(a,c){var b=cy.length;return cy[b]=c?a.replace(cr,"\\n"):a,'"'+b+'"'}function cA(b){var c=b.charAt(0),a=b.slice(1);return co.test(a)?b:(a=a.indexOf('"')> -1?a.replace(ct,cB):a,c+"scope."+a)}function cB(b,a){return cy[a]}function cC(a){try{return new Function("scope","return "+a+";")}catch(b){return b.toString().match(/unsafe-eval|CSP/)?H("It seems you are using the default build of TurpialCore.js in an environment with Content Security Policy that prohibits unsafe-eval. Use the CSP-compliant build instead: http://TurpialCorejs.org/guide/installation.html#CSP-compliant-build"):H("Invalid expression. Generated function body: "+a),cx}}function cD(a){var b=a1(a);if(b)return function(a,c){a3(a,b,c)};H("Invalid setter expression: "+a)}function a5(a,f){a=a.trim();var b=cn.get(a);if(b)return f&&!b.set&&(b.set=cD(b.exp)),b;var c,e,d={exp:a};return d.get=a6(a)&&0>a.indexOf("[")?cC("scope."+a):(c=a,cp.test(c)&&H("Avoid using reserved keywords in expression: "+c),cy.length=0,e=(" "+(e=c.replace(cs,cz).replace(cq,""))).replace(cv,cA).replace(ct,cB),cC(e)),f&&(d.set=cD(a)),cn.put(a,d),d}function a6(a){return cu.test(a)&&!cw.test(a)&&"Math."!==a.slice(0,5)}var a7=Object.freeze({parseExpression