/** * Framework7 5.1.1 * Full featured mobile HTML framework for building iOS & Android apps * http://framework7.io/ * * Copyright 2014-2019 Vladimir Kharlampidi * * Released under the MIT License * * Released on: November 3, 2019 */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Framework7=t()}(this,(function(){"use strict";var t7ctx;t7ctx="undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0;var Template7Context=t7ctx,Template7Utils={quoteSingleRexExp:new RegExp("'","g"),quoteDoubleRexExp:new RegExp('"',"g"),isFunction:function(e){return"function"==typeof e},escape:function(e){return void 0===e&&(e=""),e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},helperToSlices:function(e){var t,a,r,n=Template7Utils.quoteDoubleRexExp,i=Template7Utils.quoteSingleRexExp,s=e.replace(/[{}#}]/g,"").trim().split(" "),o=[];for(a=0;a=0){t=r,o.push(l);break}t&&(a=t)}else if(l.indexOf("=")>0){var d=l.split("="),u=d[0],h=d[1];if(p||(p=0===h.indexOf('"')?n:i,c=0===h.indexOf('"')?'"':"'"),2!==h.match(p).length){for(t=0,r=a+1;r=0){t=r;break}t&&(a=t)}var f=[u,h.replace(p,"")];o.push(f)}else o.push(l)}return o},stringToBlocks:function(e){var t,a,r=[];if(!e)return[];var n=e.split(/({{[^{^}]*}})/);for(t=0;t=0)continue;if((i=i.replace(/{{([#/])*([ ])*/,"{{$1").replace(/([ ])*}}/,"}}")).indexOf("{#")<0&&i.indexOf(" ")<0&&i.indexOf("else")<0){r.push({type:"variable",contextName:i.replace(/[{}]/g,"")});continue}var s=Template7Utils.helperToSlices(i),o=s[0],l=">"===o,p=[],c={};for(a=1;a=0){var u="",h="",f=0,m=void 0,v=!1,g=!1,b=0;for(a=t+1;a=0&&(b+=1),n[a].indexOf("{{/")>=0&&(b-=1),n[a].indexOf("{{#"+o)>=0)u+=n[a],g&&(h+=n[a]),f+=1;else if(n[a].indexOf("{{/"+o)>=0){if(!(f>0)){m=a,v=!0;break}f-=1,u+=n[a],g&&(h+=n[a])}else n[a].indexOf("else")>=0&&0===b?g=!0:(g||(u+=n[a]),g&&(h+=n[a]));v&&(m&&(t=m),"raw"===o?r.push({type:"plain",content:u}):r.push({type:"helper",helperName:o,contextName:p,content:u,inverseContent:h,hash:c}))}else i.indexOf(" ")>0&&(l&&(o="_partial",p[0]&&(0===p[0].indexOf("[")?p[0]=p[0].replace(/[[\]]/g,""):p[0]='"'+p[0].replace(/"|'/g,"")+'"')),r.push({type:"helper",helperName:o,contextName:p,hash:c}))}}return r},parseJsVariable:function(e,t,a){return e.split(/([+ \-*/^()&=|<>!%:?])/g).reduce((function(e,r){if(!r)return e;if(r.indexOf(t)<0)return e.push(r),e;if(!a)return e.push(JSON.stringify("")),e;var n=a;return r.indexOf(t+".")>=0&&r.split(t+".")[1].split(".").forEach((function(e){n=e in n?n[e]:void 0})),("string"==typeof n||Array.isArray(n)||n.constructor&&n.constructor===Object)&&(n=JSON.stringify(n)),void 0===n&&(n="undefined"),e.push(n),e}),[]).join("")},parseJsParents:function(e,t){return e.split(/([+ \-*^()&=|<>!%:?])/g).reduce((function(e,a){if(!a)return e;if(a.indexOf("../")<0)return e.push(a),e;if(!t||0===t.length)return e.push(JSON.stringify("")),e;var r=a.split("../").length-1,n=r>t.length?t[t.length-1]:t[r-1];return a.replace(/..\//g,"").split(".").forEach((function(e){n=void 0!==n[e]?n[e]:"undefined"})),!1===n||!0===n?(e.push(JSON.stringify(n)),e):null===n||"undefined"===n?(e.push(JSON.stringify("")),e):(e.push(JSON.stringify(n)),e)}),[]).join("")},getCompileVar:function(e,t,a){void 0===a&&(a="data_1");var r,n,i=t,s=0;0===e.indexOf("../")?(s=e.split("../").length-1,n=i.split("_")[1]-s,i="ctx_"+(n>=1?n:1),r=e.split("../")[s].split(".")):0===e.indexOf("@global")?(i="Template7.global",r=e.split("@global.")[1].split(".")):0===e.indexOf("@root")?(i="root",r=e.split("@root.")[1].split(".")):r=e.split(".");for(var o=0;o0&&(p=n),o>0?i+="[(data_"+p+" && data_"+p+"."+l.replace("@","")+")]":i="(data_"+p+" && data_"+p+"."+l.replace("@","")+")"}else(Number.isFinite?Number.isFinite(l):Template7Context.isFinite(l))?i+="["+l+"]":"this"===l||l.indexOf("this.")>=0||l.indexOf("this[")>=0||l.indexOf("this(")>=0?i=l.replace("this",t):i+="."+l}return i},getCompiledArguments:function(e,t,a){for(var r=[],n=0;n0?r:t.inverse(this)},with:function(e,t){var a=e;return Template7Utils.isFunction(a)&&(a=e.call(this)),t.fn(a)},join:function(e,t){var a=e;return Template7Utils.isFunction(a)&&(a=a.call(this)),a.join(t.hash.delimiter||t.hash.delimeter)},js:function js(expression,options){var data=options.data,func,execute=expression;return"index first last key".split(" ").forEach((function(e){if(void 0!==data[e]){var t=new RegExp("this.@"+e,"g"),a=new RegExp("@"+e,"g");execute=execute.replace(t,JSON.stringify(data[e])).replace(a,JSON.stringify(data[e]))}})),options.root&&execute.indexOf("@root")>=0&&(execute=Template7Utils.parseJsVariable(execute,"@root",options.root)),execute.indexOf("@global")>=0&&(execute=Template7Utils.parseJsVariable(execute,"@global",Template7Context.Template7.global)),execute.indexOf("../")>=0&&(execute=Template7Utils.parseJsParents(execute,options.parents)),func=execute.indexOf("return")>=0?"(function(){"+execute+"})":"(function(){return ("+execute+")})",eval(func).call(this)},js_if:function js_if(expression,options){var data=options.data,func,execute=expression;"index first last key".split(" ").forEach((function(e){if(void 0!==data[e]){var t=new RegExp("this.@"+e,"g"),a=new RegExp("@"+e,"g");execute=execute.replace(t,JSON.stringify(data[e])).replace(a,JSON.stringify(data[e]))}})),options.root&&execute.indexOf("@root")>=0&&(execute=Template7Utils.parseJsVariable(execute,"@root",options.root)),execute.indexOf("@global")>=0&&(execute=Template7Utils.parseJsVariable(execute,"@global",Template7Context.Template7.global)),execute.indexOf("../")>=0&&(execute=Template7Utils.parseJsParents(execute,options.parents)),func=execute.indexOf("return")>=0?"(function(){"+execute+"})":"(function(){return ("+execute+")})";var condition=eval(func).call(this);return condition?options.fn(this,options.data):options.inverse(this,options.data)}};Template7Helpers.js_compare=Template7Helpers.js_if;var Template7Options={},Template7Partials={},Template7Class=function(e){this.template=e},staticAccessors={options:{configurable:!0},partials:{configurable:!0},helpers:{configurable:!0}};function Template7(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var a=e[0],r=e[1];if(2===e.length){var n=new Template7Class(a),i=n.compile()(r);return n=null,i}return new Template7Class(a)}Template7Class.prototype.compile=function compile(template,depth){void 0===template&&(template=this.template),void 0===depth&&(depth=1);var t=this;if(t.compiled)return t.compiled;if("string"!=typeof template)throw new Error("Template7: Template must be a string");var stringToBlocks=Template7Utils.stringToBlocks,getCompileVar=Template7Utils.getCompileVar,getCompiledArguments=Template7Utils.getCompiledArguments,blocks=stringToBlocks(template),ctx="ctx_"+depth,data="data_"+depth;if(0===blocks.length)return function(){return""};function getCompileFn(e,a){return e.content?t.compile(e.content,a):function(){return""}}function getCompileInverse(e,a){return e.inverseContent?t.compile(e.inverseContent,a):function(){return""}}var resultString="",i;for(resultString+=1===depth?"(function ("+ctx+", "+data+", root) {\n":"(function ("+ctx+", "+data+") {\n",1===depth&&(resultString+="function isArray(arr){return Array.isArray(arr);}\n",resultString+="function isFunction(func){return (typeof func === 'function');}\n",resultString+='function c(val, ctx) {if (typeof val !== "undefined" && val !== null) {if (isFunction(val)) {return val.call(ctx);} else return val;} else return "";}\n',resultString+="root = root || ctx_1 || {};\n"),resultString+="var r = '';\n",i=0;i=1;j-=1)parentsString+=", ctx_"+j;parents="["+parentsString+"]"}else parents="["+ctx+"]";var dynamicHelper=void 0;if(0===block.helperName.indexOf("[")&&(block.helperName=getCompileVar(block.helperName.replace(/[[\]]/g,""),ctx,data),dynamicHelper=!0),dynamicHelper||block.helperName in Template7Helpers)compiledArguments=getCompiledArguments(block.contextName,ctx,data),resultString+="r += (Template7Helpers"+(dynamicHelper?"["+block.helperName+"]":"."+block.helperName)+").call("+ctx+", "+(compiledArguments&&compiledArguments+", ")+"{hash:"+JSON.stringify(block.hash)+", data: "+data+" || {}, fn: "+getCompileFn(block,depth+1)+", inverse: "+getCompileInverse(block,depth+1)+", root: root, parents: "+parents+"});";else{if(block.contextName.length>0)throw new Error('Template7: Missing helper: "'+block.helperName+'"');variable=getCompileVar(block.helperName,ctx,data),resultString+="if ("+variable+") {",resultString+="if (isArray("+variable+")) {",resultString+="r += (Template7Helpers.each).call("+ctx+", "+variable+", {hash:"+JSON.stringify(block.hash)+", data: "+data+" || {}, fn: "+getCompileFn(block,depth+1)+", inverse: "+getCompileInverse(block,depth+1)+", root: root, parents: "+parents+"});",resultString+="}else {",resultString+="r += (Template7Helpers.with).call("+ctx+", "+variable+", {hash:"+JSON.stringify(block.hash)+", data: "+data+" || {}, fn: "+getCompileFn(block,depth+1)+", inverse: "+getCompileInverse(block,depth+1)+", root: root, parents: "+parents+"});",resultString+="}}"}}}else resultString+="r +='"+block.content.replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/'/g,"\\'")+"';"}return resultString+="\nreturn r;})",1===depth?(t.compiled=eval(resultString),t.compiled):resultString},staticAccessors.options.get=function(){return Template7Options},staticAccessors.partials.get=function(){return Template7Partials},staticAccessors.helpers.get=function(){return Template7Helpers},Object.defineProperties(Template7Class,staticAccessors),Template7.registerHelper=function(e,t){Template7Class.helpers[e]=t},Template7.unregisterHelper=function(e){Template7Class.helpers[e]=void 0,delete Template7Class.helpers[e]},Template7.registerPartial=function(e,t){Template7Class.partials[e]={template:t}},Template7.unregisterPartial=function(e){Template7Class.partials[e]&&(Template7Class.partials[e]=void 0,delete Template7Class.partials[e])},Template7.compile=function(e,t){return new Template7Class(e,t).compile()},Template7.options=Template7Class.options,Template7.helpers=Template7Class.helpers,Template7.partials=Template7Class.partials;var doc="undefined"==typeof document?{body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},location:{hash:""}}:document,win="undefined"==typeof window?{document:doc,navigator:{userAgent:""},location:{},history:{},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){}}:window,Dom7=function(e){for(var t=0;t=0&&s.indexOf(">")>=0){var o="div";for(0===s.indexOf(":~]/)?(t||doc).querySelectorAll(e.trim()):[doc.getElementById(e.trim().split("#")[1])],r=0;r0&&e[0].nodeType)for(r=0;r=0&&(t[toCamelCase(n.name.split("data-")[1])]=n.value)}for(var i in t)"false"===t[i]?t[i]=!1:"true"===t[i]?t[i]=!0:parseFloat(t[i])===1*t[i]&&(t[i]*=1);return t}}function val(e){if(void 0!==e){for(var t=0;t=0;else a.value=e}return this}if(this[0]){if(this[0].multiple&&"select"===this[0].nodeName.toLowerCase()){for(var n=[],i=0;i=0;h-=1){var f=u[h];i&&f.listener===i?(d.removeEventListener(p,f.proxyListener,s),u.splice(h,1)):i&&f.listener&&f.listener.dom7proxy&&f.listener.dom7proxy===i?(d.removeEventListener(p,f.proxyListener,s),u.splice(h,1)):i||(d.removeEventListener(p,f.proxyListener,s),u.splice(h,1))}}return this}function once(){for(var e,t=[],a=arguments.length;a--;)t[a]=arguments[a];var r=this,n=t[0],i=t[1],s=t[2],o=t[3];function l(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];s.apply(this,e),r.off(n,i,l,o),l.dom7proxy&&delete l.dom7proxy}return"function"==typeof t[1]&&(n=(e=t)[0],s=e[1],o=e[2],i=void 0),l.dom7proxy=s,r.on(n,i,l,o)}function trigger(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var a=e[0].split(" "),r=e[1],n=0;n0})),o.dispatchEvent(l),o.dom7EventData=[],delete o.dom7EventData}return this}function transitionEnd(e){var t,a=["webkitTransitionEnd","transitionend"],r=this;function n(i){if(i.target===this)for(e.call(this,i),t=0;t0?parseFloat(this.css("width")):null}function outerWidth(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null}function height(){return this[0]===win?win.innerHeight:this.length>0?parseFloat(this.css("height")):null}function outerHeight(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null}function offset(){if(this.length>0){var e=this[0],t=e.getBoundingClientRect(),a=doc.body,r=e.clientTop||a.clientTop||0,n=e.clientLeft||a.clientLeft||0,i=e===win?win.scrollY:e.scrollTop,s=e===win?win.scrollX:e.scrollLeft;return{top:t.top+i-r,left:t.left+s-n}}return null}function hide(){for(var e=0;ea-1?[]:e<0?(t=a+e)<0?[]:[this[t]]:[this[e]])}function append(){for(var e,t=[],a=arguments.length;a--;)t[a]=arguments[a];for(var r=0;r=0;a-=1)this[t].insertBefore(r.childNodes[a],this[t].childNodes[0])}else if(e instanceof Dom7)for(a=0;a1)for(var r=0;r1)for(var r=0;r0?e?this[0].nextElementSibling&&$(this[0].nextElementSibling).is(e)?new Dom7([this[0].nextElementSibling]):new Dom7([]):this[0].nextElementSibling?new Dom7([this[0].nextElementSibling]):new Dom7([]):new Dom7([])}function nextAll(e){var t=[],a=this[0];if(!a)return new Dom7([]);for(;a.nextElementSibling;){var r=a.nextElementSibling;e?$(r).is(e)&&t.push(r):t.push(r),a=r}return new Dom7(t)}function prev(e){if(this.length>0){var t=this[0];return e?t.previousElementSibling&&$(t.previousElementSibling).is(e)?new Dom7([t.previousElementSibling]):new Dom7([]):t.previousElementSibling?new Dom7([t.previousElementSibling]):new Dom7([])}return new Dom7([])}function prevAll(e){var t=[],a=this[0];if(!a)return new Dom7([]);for(;a.previousElementSibling;){var r=a.previousElementSibling;e?$(r).is(e)&&t.push(r):t.push(r),a=r}return new Dom7(t)}function siblings(e){return this.nextAll(e).add(this.prevAll(e))}function parent(e){for(var t=[],a=0;a0||0===n,m=r>0||0===r;if(void 0===s&&(s="swing"),f&&(e=h.scrollTop,i||(h.scrollTop=n)),m&&(t=h.scrollLeft,i||(h.scrollLeft=r)),i){f&&(a=h.scrollHeight-h.offsetHeight,p=Math.max(Math.min(n,a),0)),m&&(l=h.scrollWidth-h.offsetWidth,c=Math.max(Math.min(r,l),0));var v=null;f&&p===e&&(f=!1),m&&c===t&&(m=!1),requestAnimationFrame((function a(r){void 0===r&&(r=(new Date).getTime()),null===v&&(v=r);var n,l=Math.max(Math.min((r-v)/i,1),0),g="linear"===s?l:.5-Math.cos(l*Math.PI)/2;f&&(d=e+g*(p-e)),m&&(u=t+g*(c-t)),f&&p>e&&d>=p&&(h.scrollTop=p,n=!0),f&&pt&&u>=c&&(h.scrollLeft=c,n=!0),m&&c0?this[0].scrollTop:null:this.scrollTo(void 0,r,n,i,s)}function scrollLeft(){for(var e,t=[],a=arguments.length;a--;)t[a]=arguments[a];var r=t[0],n=t[1],i=t[2],s=t[3];3===t.length&&"function"==typeof i&&(r=(e=t)[0],n=e[1],s=e[2],i=e[3]);return void 0===r?this.length>0?this[0].scrollLeft:null:this.scrollTo(r,void 0,n,i,s)}var Scroll=Object.freeze({scrollTo:scrollTo,scrollTop:scrollTop,scrollLeft:scrollLeft});function animate(e,t){var a,r=this,n={props:Object.assign({},e),params:Object.assign({duration:300,easing:"swing"},t),elements:r,animating:!1,que:[],easingProgress:function(e,t){return"swing"===e?.5-Math.cos(t*Math.PI)/2:"function"==typeof e?e(t):t},stop:function(){n.frameId&&cancelAnimationFrame(n.frameId),n.animating=!1,n.elements.each((function(e,t){delete t.dom7AnimateInstance})),n.que=[]},done:function(e){if(n.animating=!1,n.elements.each((function(e,t){delete t.dom7AnimateInstance})),e&&e(r),n.que.length>0){var t=n.que.shift();n.animate(t[0],t[1])}},animate:function(e,t){if(n.animating)return n.que.push([e,t]),n;var a=[];n.elements.each((function(t,r){var i,s,o,l,p;r.dom7AnimateInstance||(n.elements[t].dom7AnimateInstance=n),a[t]={container:r},Object.keys(e).forEach((function(n){i=win.getComputedStyle(r,null).getPropertyValue(n).replace(",","."),s=parseFloat(i),o=i.replace(s,""),l=parseFloat(e[n]),p=e[n]+o,a[t][n]={initialFullValue:i,initialValue:s,unit:o,finalValue:l,finalFullValue:p,currentValue:s}}))}));var i,s,o=null,l=0,p=0,c=!1;return n.animating=!0,n.frameId=requestAnimationFrame((function d(){var u,h;i=(new Date).getTime(),c||(c=!0,t.begin&&t.begin(r)),null===o&&(o=i),t.progress&&t.progress(r,Math.max(Math.min((i-o)/t.duration,1),0),o+t.duration-i<0?0:o+t.duration-i,o),a.forEach((function(r){var c=r;s||c.done||Object.keys(e).forEach((function(r){if(!s&&!c.done){u=Math.max(Math.min((i-o)/t.duration,1),0),h=n.easingProgress(t.easing,u);var d=c[r],f=d.initialValue,m=d.finalValue,v=d.unit;c[r].currentValue=f+h*(m-f);var g=c[r].currentValue;(m>f&&g>=m||m0;)a[r]=arguments[r+1];if(void 0===a[0]){for(var n=0;n\n \n \n \n \n \n \n \n \n '.trim(),iosPreloaderContent:('\n \n '+[0,1,2,3,4,5,6,7,8,9,10,11].map((function(){return''})).join("")+"\n \n ").trim(),auroraPreloaderContent:'\n \n \n \n ',eventNameToColonCase:function(e){var t;return e.split("").map((function(e,a){return e.match(/[A-Z]/)&&0!==a&&!t?(t=!0,":"+e.toLowerCase()):e.toLowerCase()})).join("")},deleteProps:function(e){var t=e;Object.keys(t).forEach((function(e){try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}}))},nextTick:function(e,t){return void 0===t&&(t=0),setTimeout(e,t)},nextFrame:function(e){return Utils.requestAnimationFrame((function(){Utils.requestAnimationFrame(e)}))},now:function(){return Date.now()},requestAnimationFrame:function(e){return win.requestAnimationFrame(e)},cancelAnimationFrame:function(e){return win.cancelAnimationFrame(e)},removeDiacritics:function(e){return e.replace(/[^\u0000-\u007E]/g,(function(e){return diacriticsMap[e]||e}))},parseUrlQuery:function(e){var t,a,r,n,i={},s=e||win.location.href;if("string"==typeof s&&s.length)for(n=(a=(s=s.indexOf("?")>-1?s.replace(/\S*\?/,""):"").split("&").filter((function(e){return""!==e}))).length,t=0;t6&&(r=r.split(", ").map((function(e){return e.replace(",",".")})).join(", ")),n=new win.WebKitCSSMatrix("none"===r?"":r)):a=(n=i.MozTransform||i.OTransform||i.MsTransform||i.msTransform||i.transform||i.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===t&&(r=win.WebKitCSSMatrix?n.m41:16===a.length?parseFloat(a[12]):parseFloat(a[4])),"y"===t&&(r=win.WebKitCSSMatrix?n.m42:16===a.length?parseFloat(a[13]):parseFloat(a[5])),r||0},serializeObject:function(e,t){if(void 0===t&&(t=[]),"string"==typeof e)return e;var a,r=[];function n(e){if(t.length>0){for(var a="",r=0;r0?2*i/r.b:r.s,[r.h,r.s,r.b]},colorThemeCSSProperties:function(){for(var e,t,a=[],r=arguments.length;r--;)a[r]=arguments[r];if(1===a.length?(e=a[0],t=Utils.colorHexToRgb(e)):3===a.length&&(t=a,e=Utils.colorRgbToHex.apply(Utils,t)),!t)return{};var n=Utils.colorRgbToHsl.apply(Utils,t),i=[n[0],n[1],Math.max(0,n[2]-.08)],s=[n[0],n[1],Math.max(0,n[2]+.08)],o=Utils.colorRgbToHex.apply(Utils,Utils.colorHslToRgb.apply(Utils,i)),l=Utils.colorRgbToHex.apply(Utils,Utils.colorHslToRgb.apply(Utils,s));return{"--f7-theme-color":e,"--f7-theme-color-rgb":t.join(", "),"--f7-theme-color-shade":o,"--f7-theme-color-tint":l}}},Support={touch:!!(win.navigator.maxTouchPoints>0||"ontouchstart"in win||win.DocumentTouch&&doc instanceof win.DocumentTouch),pointerEvents:!!win.PointerEvent&&"maxTouchPoints"in win.navigator&&win.navigator.maxTouchPoints>0,observer:"MutationObserver"in win||"WebkitMutationObserver"in win,passiveListener:function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});win.addEventListener("testPassiveListener",null,t)}catch(e){}return e}(),gestures:"ongesturestart"in win,intersectionObserver:"IntersectionObserver"in win},Device=function(){var e=win.navigator.platform,t=win.navigator.userAgent,a={ios:!1,android:!1,androidChrome:!1,desktop:!1,iphone:!1,ipod:!1,ipad:!1,edge:!1,ie:!1,firefox:!1,macos:!1,windows:!1,cordova:!(!win.cordova&&!win.phonegap),phonegap:!(!win.cordova&&!win.phonegap),electron:!1},r=win.screen.width,n=win.screen.height,i=t.match(/(Android);?[\s\/]+([\d.]+)?/),s=t.match(/(iPad).*OS\s([\d_]+)/),o=t.match(/(iPod)(.*OS\s([\d_]+))?/),l=!s&&t.match(/(iPhone\sOS|iOS)\s([\d_]+)/),p=t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0,c=t.indexOf("Edge/")>=0,d=t.indexOf("Gecko/")>=0&&t.indexOf("Firefox/")>=0,u="Win32"===e,h=t.toLowerCase().indexOf("electron")>=0,f="MacIntel"===e;!s&&f&&Support.touch&&(1024===r&&1366===n||834===r&&1194===n||834===r&&1112===n||768===r&&1024===n)&&(s=t.match(/(Version)\/([\d.]+)/),f=!1),a.ie=p,a.edge=c,a.firefox=d,i&&!u&&(a.os="android",a.osVersion=i[2],a.android=!0,a.androidChrome=t.toLowerCase().indexOf("chrome")>=0),(s||l||o)&&(a.os="ios",a.ios=!0),l&&!o&&(a.osVersion=l[2].replace(/_/g,"."),a.iphone=!0),s&&(a.osVersion=s[2].replace(/_/g,"."),a.ipad=!0),o&&(a.osVersion=o[3]?o[3].replace(/_/g,"."):null,a.ipod=!0),a.ios&&a.osVersion&&t.indexOf("Version/")>=0&&"10"===a.osVersion.split(".")[0]&&(a.osVersion=t.toLowerCase().split("version/")[1].split(" ")[0]),a.webView=!(!(l||s||o)||!t.match(/.*AppleWebKit(?!.*Safari)/i)&&!win.navigator.standalone)||win.matchMedia&&win.matchMedia("(display-mode: standalone)").matches,a.webview=a.webView,a.standalone=a.webView,a.desktop=!(a.ios||a.android)||h,a.desktop&&(a.electron=h,a.macos=f,a.windows=u,a.macos&&(a.os="macos"),a.windows&&(a.os="windows")),a.pixelRatio=win.devicePixelRatio||1;return a.prefersColorScheme=function(){var e;return win.matchMedia&&win.matchMedia("(prefers-color-scheme: light)").matches&&(e="light"),win.matchMedia&&win.matchMedia("(prefers-color-scheme: dark)").matches&&(e="dark"),e},a}(),EventsClass=function(e){void 0===e&&(e=[]);this.eventsParents=e,this.eventsListeners={}};EventsClass.prototype.on=function(e,t,a){var r=this;if("function"!=typeof t)return r;var n=a?"unshift":"push";return e.split(" ").forEach((function(e){r.eventsListeners[e]||(r.eventsListeners[e]=[]),r.eventsListeners[e][n](t)})),r},EventsClass.prototype.once=function(e,t,a){var r=this;if("function"!=typeof t)return r;function n(){for(var a=[],i=arguments.length;i--;)a[i]=arguments[i];t.apply(r,a),r.off(e,n),n.f7proxy&&delete n.f7proxy}return n.f7proxy=t,r.on(e,n,a)},EventsClass.prototype.off=function(e,t){var a=this;return a.eventsListeners?(e.split(" ").forEach((function(e){void 0===t?a.eventsListeners[e]=[]:a.eventsListeners[e]&&a.eventsListeners[e].forEach((function(r,n){(r===t||r.f7proxy&&r.f7proxy===t)&&a.eventsListeners[e].splice(n,1)}))})),a):a},EventsClass.prototype.emit=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var a,r,n,i,s=this;if(!s.eventsListeners)return s;"string"==typeof e[0]||Array.isArray(e[0])?(a=e[0],r=e.slice(1,e.length),n=s,i=s.eventsParents):(a=e[0].events,r=e[0].data,n=e[0].context||s,i=e[0].local?[]:e[0].parents||s.eventsParents);var o=Array.isArray(a)?a:a.split(" "),l=o.map((function(e){return e.replace("local::","")})),p=o.filter((function(e){return e.indexOf("local::")<0}));return l.forEach((function(e){if(s.eventsListeners&&s.eventsListeners[e]){var t=[];s.eventsListeners[e].forEach((function(e){t.push(e)})),t.forEach((function(e){e.apply(n,r)}))}})),i&&i.length>0&&i.forEach((function(e){e.emit.apply(e,[p].concat(r))})),s};var Framework7Class=function(e){function t(t,a){void 0===t&&(t={}),void 0===a&&(a=[]),e.call(this,a);var r=this;r.params=t,r.params&&r.params.on&&Object.keys(r.params.on).forEach((function(e){r.on(e,r.params.on[e])}))}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var a={components:{configurable:!0}};return t.prototype.useModuleParams=function(e,t){if(e.params){var a={};Object.keys(e.params).forEach((function(e){void 0!==t[e]&&(a[e]=Utils.extend({},t[e]))})),Utils.extend(t,e.params),Object.keys(a).forEach((function(e){Utils.extend(t[e],a[e])}))}},t.prototype.useModulesParams=function(e){var t=this;t.modules&&Object.keys(t.modules).forEach((function(a){var r=t.modules[a];r.params&&Utils.extend(e,r.params)}))},t.prototype.useModule=function(e,t){void 0===e&&(e=""),void 0===t&&(t={});var a=this;if(a.modules){var r="string"==typeof e?a.modules[e]:e;r&&(r.instance&&Object.keys(r.instance).forEach((function(e){var t=r.instance[e];a[e]="function"==typeof t?t.bind(a):t})),r.on&&a.on&&Object.keys(r.on).forEach((function(e){a.on(e,r.on[e])})),r.vnode&&(a.vnodeHooks||(a.vnodeHooks={}),Object.keys(r.vnode).forEach((function(e){Object.keys(r.vnode[e]).forEach((function(t){var n=r.vnode[e][t];a.vnodeHooks[t]||(a.vnodeHooks[t]={}),a.vnodeHooks[t][e]||(a.vnodeHooks[t][e]=[]),a.vnodeHooks[t][e].push(n.bind(a))}))}))),r.create&&r.create.bind(a)(t))}},t.prototype.useModules=function(e){void 0===e&&(e={});var t=this;t.modules&&Object.keys(t.modules).forEach((function(a){var r=e[a]||{};t.useModule(a,r)}))},a.components.set=function(e){this.use&&this.use(e)},t.installModule=function(e){for(var t=[],a=arguments.length-1;a-- >0;)t[a]=arguments[a+1];var r=this;r.prototype.modules||(r.prototype.modules={});var n=e.name||Object.keys(r.prototype.modules).length+"_"+Utils.now();return r.prototype.modules[n]=e,e.proto&&Object.keys(e.proto).forEach((function(t){r.prototype[t]=e.proto[t]})),e.static&&Object.keys(e.static).forEach((function(t){r[t]=e.static[t]})),e.install&&e.install.apply(r,t),r},t.use=function(e){for(var t=[],a=arguments.length-1;a-- >0;)t[a]=arguments[a+1];var r=this;return Array.isArray(e)?(e.forEach((function(e){return r.installModule(e)})),r):r.installModule.apply(r,[e].concat(t))},Object.defineProperties(t,a),t}(EventsClass);function ConstructorMethods(e){void 0===e&&(e={});var t=e.defaultSelector,a=e.constructor,r=e.domProp,n=e.app,i=e.addMethods,s={create:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return n?new(Function.prototype.bind.apply(a,[null].concat([n],e))):new(Function.prototype.bind.apply(a,[null].concat(e)))},get:function(e){if(void 0===e&&(e=t),e instanceof a)return e;var n=$(e);return 0!==n.length?n[0][r]:void 0},destroy:function(e){var t=s.get(e);if(t&&t.destroy)return t.destroy()}};return i&&Array.isArray(i)&&i.forEach((function(e){s[e]=function(a){void 0===a&&(a=t);for(var r=[],n=arguments.length-1;n-- >0;)r[n]=arguments[n+1];var i=s.get(a);if(i&&i[e])return i[e].apply(i,r)}})),s}function ModalMethods(e){void 0===e&&(e={});var t=e.defaultSelector,a=e.constructor,r=e.app;return Utils.extend(ConstructorMethods({defaultSelector:t,constructor:a,app:r,domProp:"f7Modal"}),{open:function(e,t){var n=$(e),i=n[0].f7Modal;return i||(i=new a(r,{el:n})),i.open(t)},close:function(e,n){void 0===e&&(e=t);var i=$(e);if(0!==i.length){var s=i[0].f7Modal;return s||(s=new a(r,{el:i})),s.close(n)}}})}var fetchedModules=[];function loadModule(e){var t=this;return new Promise((function(a,r){var n,i,s,o=t.instance;if(e){if("string"==typeof e){var l=e.match(/([a-z0-9-]*)/i);if(e.indexOf(".")<0&&l&&l[0].length===e.length){if(!o||o&&!o.params.lazyModulesPath)return void r(new Error('Framework7: "lazyModulesPath" app parameter must be specified to fetch module by name'));n=o.params.lazyModulesPath+"/"+e+".js"}else n=e}else"function"==typeof e?s=e:i=e;if(s){var p=s(t,!1);if(!p)return void r(new Error("Framework7: Can't find Framework7 component in specified component function"));if(t.prototype.modules&&t.prototype.modules[p.name])return void a();h(p),a()}if(i){var c=i;if(!c)return void r(new Error("Framework7: Can't find Framework7 component in specified component"));if(t.prototype.modules&&t.prototype.modules[c.name])return void a();h(c),a()}if(n){if(fetchedModules.indexOf(n)>=0)return void a();fetchedModules.push(n);var d=new Promise((function(e,a){t.request.get(n,(function(r){var i="f7_component_loader_callback_"+Utils.id(),s=document.createElement("script");s.innerHTML="window."+i+" = function (Framework7, Framework7AutoInstallComponent) {return "+r.trim()+"}",$("head").append(s);var o=window[i];delete window[i],$(s).remove();var l=o(t,!1);l?t.prototype.modules&&t.prototype.modules[l.name]?e():(h(l),e()):a(new Error("Framework7: Can't find Framework7 component in "+n+" file"))}),(function(e,t){a(e,t)}))})),u=new Promise((function(e){t.request.get(n.replace(".js",o.rtl?".rtl.css":".css"),(function(t){var a=document.createElement("style");a.innerHTML=t,$("head").append(a),e()}),(function(){e()}))}));Promise.all([d,u]).then((function(){a()})).catch((function(e){r(e)}))}}else r(new Error("Framework7: Lazy module must be specified"));function h(e){t.use(e),o&&(o.useModuleParams(e,o.params),o.useModule(e))}}))}var Framework7=function(e){function t(a){if(e.call(this,a),t.instance)throw new Error("Framework7 is already initialized and can't be initialized more than once");var r=Utils.extend({},a),n=this;t.instance=n;var i={version:"1.0.0",id:"io.framework7.testapp",root:"body",theme:"auto",language:win.navigator.language,routes:[],name:"Framework7",lazyModulesPath:null,initOnDeviceReady:!0,init:!0,autoDarkTheme:!1,iosTranslucentBars:!0,iosTranslucentModals:!0};n.useModulesParams(i),n.params=Utils.extend(i,a);var s=$(n.params.root);Utils.extend(n,{id:n.params.id,name:n.params.name,version:n.params.version,routes:n.params.routes,language:n.params.language,root:s,rtl:"rtl"===s.css("direction"),theme:"auto"===n.params.theme?Device.ios?"ios":Device.desktop&&Device.electron?"aurora":"md":n.params.theme,passedParams:r,online:win.navigator.onLine}),n.root&&n.root[0]&&(n.root[0].f7=n),n.useModules(),n.initData();var o="(prefers-color-scheme: dark)",l="(prefers-color-scheme: light)";return n.mq={},win.matchMedia&&(n.mq.dark=win.matchMedia(o),n.mq.light=win.matchMedia(l)),n.colorSchemeListener=function(e){var t=e.matches,a=e.media;if(t){var r=doc.querySelector("html");a===o?r.classList.add("theme-dark"):a===l&&r.classList.remove("theme-dark")}},n.params.init&&(Device.cordova&&n.params.initOnDeviceReady?$(doc).on("deviceready",(function(){n.init()})):n.init()),n}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var a={$:{configurable:!0},t7:{configurable:!0}},r={Dom7:{configurable:!0},$:{configurable:!0},Template7:{configurable:!0},Class:{configurable:!0},Events:{configurable:!0}};return t.prototype.initData=function(){var e=this;e.data={},e.params.data&&"function"==typeof e.params.data?Utils.extend(e.data,e.params.data.bind(e)()):e.params.data&&Utils.extend(e.data,e.params.data),e.methods={},e.params.methods&&Object.keys(e.params.methods).forEach((function(t){"function"==typeof e.params.methods[t]?e.methods[t]=e.params.methods[t].bind(e):e.methods[t]=e.params.methods[t]}))},t.prototype.enableAutoDarkTheme=function(){if(win.matchMedia){var e=this,t=doc.querySelector("html");e.mq.dark&&e.mq.light&&(e.mq.dark.addListener(e.colorSchemeListener),e.mq.light.addListener(e.colorSchemeListener)),e.mq.dark&&e.mq.dark.matches?t.classList.add("theme-dark"):e.mq.light&&e.mq.light.matches&&t.classList.remove("theme-dark")}},t.prototype.disableAutoDarkTheme=function(){if(win.matchMedia){this.mq.dark&&this.mq.dark.removeListener(this.colorSchemeListener),this.mq.light&&this.mq.light.removeListener(this.colorSchemeListener)}},t.prototype.init=function(){var e=this;return e.initialized?e:(e.root.addClass("framework7-initializing"),e.rtl&&$("html").attr("dir","rtl"),e.params.autoDarkTheme&&e.enableAutoDarkTheme(),win.addEventListener("offline",(function(){e.online=!1,e.emit("offline"),e.emit("connection",!1)})),win.addEventListener("online",(function(){e.online=!0,e.emit("online"),e.emit("connection",!0)})),e.root.addClass("framework7-root"),$("html").removeClass("ios md aurora").addClass(e.theme),e.params.iosTranslucentBars&&"ios"===e.theme&&Device.ios&&$("html").addClass("ios-translucent-bars"),e.params.iosTranslucentModals&&"ios"===e.theme&&Device.ios&&$("html").addClass("ios-translucent-modals"),Utils.nextFrame((function(){e.root.removeClass("framework7-initializing")})),e.initialized=!0,e.emit("init"),e)},t.prototype.loadModule=function(){for(var e=[],a=arguments.length;a--;)e[a]=arguments[a];return t.loadModule.apply(t,e)},t.prototype.loadModules=function(){for(var e=[],a=arguments.length;a--;)e[a]=arguments[a];return t.loadModules.apply(t,e)},t.prototype.getVnodeHooks=function(e,t){return this.vnodeHooks&&this.vnodeHooks[e]&&this.vnodeHooks[e][t]||[]},a.$.get=function(){return $},a.t7.get=function(){return Template7},r.Dom7.get=function(){return $},r.$.get=function(){return $},r.Template7.get=function(){return Template7},r.Class.get=function(){return e},r.Events.get=function(){return EventsClass},Object.defineProperties(t.prototype,a),Object.defineProperties(t,r),t}(Framework7Class);Framework7.ModalMethods=ModalMethods,Framework7.ConstructorMethods=ConstructorMethods,Framework7.loadModule=loadModule,Framework7.loadModules=function(e){return Promise.all(e.map((function(e){return Framework7.loadModule(e)})))};var DeviceModule={name:"device",proto:{device:Device},static:{device:Device},on:{init:function(){var e=[],t=doc.querySelector("html"),a=doc.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]');t&&(Device.standalone&&Device.ios&&a&&"black-translucent"===a.content&&e.push("device-full-viewport"),e.push("device-pixel-ratio-"+Math.floor(Device.pixelRatio)),Device.os&&!Device.desktop?e.push("device-"+Device.os):Device.desktop&&(e.push("device-desktop"),Device.os&&e.push("device-"+Device.os)),(Device.cordova||Device.phonegap)&&e.push("device-cordova"),e.forEach((function(e){t.classList.add(e)})))}}},SupportModule={name:"support",proto:{support:Support},static:{support:Support}},UtilsModule={name:"utils",proto:{utils:Utils},static:{utils:Utils}},ResizeModule={name:"resize",instance:{getSize:function(){if(!this.root[0])return{width:0,height:0,left:0,top:0};var e=this.root.offset(),t=[this.root[0].offsetWidth,this.root[0].offsetHeight,e.left,e.top],a=t[0],r=t[1],n=t[2],i=t[3];return this.width=a,this.height=r,this.left=n,this.top=i,{width:a,height:r,left:n,top:i}}},on:{init:function(){var e=this;e.getSize(),win.addEventListener("resize",(function(){e.emit("resize")}),!1),win.addEventListener("orientationchange",(function(){e.emit("orientationchange")}))},orientationchange:function(){this.device.ipad&&(doc.body.scrollLeft=0,setTimeout((function(){doc.body.scrollLeft=0}),0))},resize:function(){this.getSize()}}},globals={},jsonpRequests=0;function Request(e){var t=Utils.extend({},globals);"beforeCreate beforeOpen beforeSend error complete success statusCode".split(" ").forEach((function(e){delete t[e]}));var a=Utils.extend({url:win.location.toString(),method:"GET",data:!1,async:!0,cache:!0,user:"",password:"",headers:{},xhrFields:{},statusCode:{},processData:!0,dataType:"text",contentType:"application/x-www-form-urlencoded",timeout:0},t),r=Utils.extend({},a,e);function n(e){for(var t,a,n=[],i=arguments.length-1;i-- >0;)n[i]=arguments[i+1];return globals[e]&&(t=globals[e].apply(globals,n)),r[e]&&(a=r[e].apply(r,n)),"boolean"!=typeof t&&(t=!0),"boolean"!=typeof a&&(a=!0),t&&a}if(!1!==n("beforeCreate",r)){r.type&&(r.method=r.type);var i,s=r.url.indexOf("?")>=0?"&":"?",o=r.method.toUpperCase();if(("GET"===o||"HEAD"===o||"OPTIONS"===o||"DELETE"===o)&&r.data)(i="string"==typeof r.data?r.data.indexOf("?")>=0?r.data.split("?")[1]:r.data:Utils.serializeObject(r.data)).length&&(r.url+=s+i,"?"===s&&(s="&"));if("json"===r.dataType&&r.url.indexOf("callback=")>=0){var l,p="f7jsonp_"+(Date.now()+(jsonpRequests+=1)),c=r.url.split("callback="),d=c[0]+"callback="+p;if(c[1].indexOf("&")>=0){var u=c[1].split("&").filter((function(e){return e.indexOf("=")>0})).join("&");u.length>0&&(d+="&"+u)}var h=doc.createElement("script");return h.type="text/javascript",h.onerror=function(){clearTimeout(l),n("error",null,"scripterror","scripterror"),n("complete",null,"scripterror")},h.src=d,win[p]=function(e){clearTimeout(l),n("success",e),h.parentNode.removeChild(h),h=null,delete win[p]},doc.querySelector("head").appendChild(h),void(r.timeout>0&&(l=setTimeout((function(){h.parentNode.removeChild(h),h=null,n("error",null,"timeout","timeout")}),r.timeout)))}"GET"!==o&&"HEAD"!==o&&"OPTIONS"!==o&&"DELETE"!==o||!1===r.cache&&(r.url+=s+"_nocache"+Date.now());var f=new XMLHttpRequest;if(f.requestUrl=r.url,f.requestParameters=r,!1===n("beforeOpen",f,r))return f;f.open(o,r.url,r.async,r.user,r.password);var m,v=null;if(("POST"===o||"PUT"===o||"PATCH"===o)&&r.data)if(r.processData)if([ArrayBuffer,Blob,Document,FormData].indexOf(r.data.constructor)>=0)v=r.data;else{var g="---------------------------"+Date.now().toString(16);"multipart/form-data"===r.contentType?f.setRequestHeader("Content-Type","multipart/form-data; boundary="+g):f.setRequestHeader("Content-Type",r.contentType),v="";var b=Utils.serializeObject(r.data);if("multipart/form-data"===r.contentType){b=b.split("&");for(var y=[],w=0;w=200&&f.status<300||0===f.status)if("json"===r.dataType){var t;try{e=JSON.parse(f.responseText)}catch(e){t=!0}t?n("error",f,"parseerror","parseerror"):n("success",e,f.status,f)}else n("success",e="text"===f.responseType||""===f.responseType?f.responseText:f.response,f.status,f);else n("error",f,f.status,f.statusText);r.statusCode&&(globals.statusCode&&globals.statusCode[f.status]&&globals.statusCode[f.status](f),r.statusCode[f.status]&&r.statusCode[f.status](f)),n("complete",f,f.status)},f.onerror=function(){m&&clearTimeout(m),n("error",f,f.status,f.status),n("complete",f,"error")},r.timeout>0&&(f.onabort=function(){m&&clearTimeout(m)},m=setTimeout((function(){f.abort(),n("error",f,"timeout","timeout"),n("complete",f,"timeout")}),r.timeout)),!1===n("beforeSend",f,r)?f:(f.send(v),f)}}function RequestShortcut(e){for(var t,a,r=[],n=arguments.length-1;n-- >0;)r[n]=arguments[n+1];var i=[],s=i[0],o=i[1],l=i[2],p=i[3],c=i[4];"function"==typeof r[1]?(s=(t=r)[0],l=t[1],p=t[2],c=t[3]):(s=(a=r)[0],o=a[1],l=a[2],p=a[3],c=a[4]),[l,p].forEach((function(e){"string"==typeof e&&(c=e,e===l?l=void 0:p=void 0)}));var d={url:s,method:"post"===e||"postJSON"===e?"POST":"GET",data:o,success:l,error:p,dataType:c=c||("json"===e||"postJSON"===e?"json":void 0)};return"postJSON"===e&&Utils.extend(d,{contentType:"application/json",processData:!1,crossDomain:!0,data:"string"==typeof o?o:JSON.stringify(o)}),Request(d)}function RequestShortcutPromise(e){for(var t=[],a=arguments.length-1;a-- >0;)t[a]=arguments[a+1];var r=t[0],n=t[1],i=t[2];return new Promise((function(t,a){RequestShortcut(e,r,n,(function(e,a,r){t({data:e,status:a,xhr:r})}),(function(e,t,r){a({xhr:e,status:t,message:r})}),i)}))}Object.assign(Request,{get:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return RequestShortcut.apply(void 0,["get"].concat(e))},post:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return RequestShortcut.apply(void 0,["post"].concat(e))},json:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return RequestShortcut.apply(void 0,["json"].concat(e))},getJSON:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return RequestShortcut.apply(void 0,["json"].concat(e))},postJSON:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return RequestShortcut.apply(void 0,["postJSON"].concat(e))}}),Request.promise=function(e){return new Promise((function(t,a){Request(Object.assign(e,{success:function(e,a,r){t({data:e,status:a,xhr:r})},error:function(e,t,r){a({xhr:e,status:t,message:r})}}))}))},Object.assign(Request.promise,{get:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return RequestShortcutPromise.apply(void 0,["get"].concat(e))},post:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return RequestShortcutPromise.apply(void 0,["post"].concat(e))},json:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return RequestShortcutPromise.apply(void 0,["json"].concat(e))},getJSON:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return RequestShortcutPromise.apply(void 0,["json"].concat(e))},postJSON:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return RequestShortcutPromise.apply(void 0,["postJSON"].concat(e))}}),Request.setup=function(e){e.type&&!e.method&&Utils.extend(e,{method:e.type}),Utils.extend(globals,e)};var RequestModule={name:"request",proto:{request:Request},static:{request:Request}};function initTouch(){var e,t,a,r,n,i,s,o,l,p,c,d,u=this,h=u.params.touch,f=h[u.theme+"TouchRipple"];function m(e){var t,a=$(e),r=a.parents(h.activeStateElements);if(a.closest(".no-active-state").length)return null;if(a.is(h.activeStateElements)&&(t=a),r.length>0&&(t=t?t.add(r):r),t&&t.length>1){for(var n,i=[],s=0;s0}function g(){o&&o.addClass("active-state")}function b(){o&&(o.removeClass("active-state"),o=null)}function y(e,t,a){e&&(p=u.touchRipple.create(e,t,a))}function w(){p&&(p.remove(),p=void 0,c=void 0)}function x(a){(c=function(e){var t=h.touchRippleElements,a=$(e);if(a.is(t))return!a.hasClass("no-ripple")&&a;if(a.parents(t).length>0){var r=a.parents(t).eq(0);return!r.hasClass("no-ripple")&&r}return!1}(a))&&0!==c.length?v(c)?(clearTimeout(d),d=setTimeout((function(){w(),y(c,e,t)}),80)):(w(),y(c,e,t)):c=void 0}function C(){clearTimeout(d),w()}function k(){p||!c||r?w():(clearTimeout(d),y(c,e,t),setTimeout(w,0))}function E(e,t){u.emit({events:e,data:[t]})}function T(e){E("touchstart touchstart:active",e)}function S(e){E("touchmove touchmove:active",e)}function M(e){E("touchend touchend:active",e)}function P(e){E("touchstart:passive",e)}function O(e){E("touchmove:passive",e)}function D(e){E("touchend:passive",e)}function B(e){E(e.type+" "+e.type+":active",e)}function I(e){E(e.type+":passive",e)}Device.ios&&Device.webView&&win.addEventListener("touchstart",(function(){}));var R=!!Support.passiveListener&&{passive:!0},L=!!Support.passiveListener&&{passive:!1};doc.addEventListener("click",(function(e){E("click",e)}),!0),Support.passiveListener?(doc.addEventListener(u.touchEvents.start,T,L),doc.addEventListener(u.touchEvents.move,S,L),doc.addEventListener(u.touchEvents.end,M,L),doc.addEventListener(u.touchEvents.start,P,R),doc.addEventListener(u.touchEvents.move,O,R),doc.addEventListener(u.touchEvents.end,D,R),Support.touch&&Support.gestures&&(doc.addEventListener("gesturestart",B,L),doc.addEventListener("gesturechange",B,L),doc.addEventListener("gestureend",B,L),doc.addEventListener("gesturestart",I,R),doc.addEventListener("gesturechange",I,R),doc.addEventListener("gestureend",I,R))):(doc.addEventListener(u.touchEvents.start,(function(e){T(e),P(e)}),!1),doc.addEventListener(u.touchEvents.move,(function(e){S(e),O(e)}),!1),doc.addEventListener(u.touchEvents.end,(function(e){M(e),D(e)}),!1),Support.touch&&Support.gestures&&(doc.addEventListener("gesturestart",(function(e){B(e),I(e)}),!1),doc.addEventListener("gesturechange",(function(e){B(e),I(e)}),!1),doc.addEventListener("gestureend",(function(e){B(e),I(e)}),!1))),Support.touch?(u.on("click",(function(e){var t=e&&e.detail&&"f7Overswipe"===e.detail,r=s;return a&&e.target!==a&&(r=!t),h.tapHold&&h.tapHoldPreventClicks&&n&&(r=!0),r&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault()),h.tapHold&&(i=setTimeout((function(){n=!1}),Device.ios||Device.androidChrome?100:400)),s=!1,a=null,!r})),u.on("touchstart",(function(p){return r=!1,n=!1,s=!1,p.targetTouches.length>1?(o&&b(),!0):(p.touches.length>1&&o&&b(),h.tapHold&&(i&&clearTimeout(i),i=setTimeout((function(){p&&p.touches&&p.touches.length>1||(n=!0,p.preventDefault(),s=!0,$(p.target).trigger("taphold",p),u.emit("taphold",p))}),h.tapHoldDelay)),a=p.target,e=p.targetTouches[0].pageX,t=p.targetTouches[0].pageY,h.activeState&&((o=m(a))&&!v(o)?g():o&&(l=setTimeout(g,80))),f&&x(a),!0)})),u.on("touchmove",(function(a){var n,o;if("touchmove"===a.type&&(n=a.targetTouches[0],o=h.touchClicksDistanceThreshold),o&&n){var p=n.pageX,c=n.pageY;(Math.abs(p-e)>o||Math.abs(c-t)>o)&&(r=!0)}else r=!0;r&&(s=!0,h.tapHold&&clearTimeout(i),h.activeState&&(clearTimeout(l),b()),f&&C())})),u.on("touchend",(function(e){return clearTimeout(l),clearTimeout(i),doc.activeElement===e.target?(h.activeState&&b(),f&&k(),!0):(h.activeState&&(g(),setTimeout(b,0)),f&&k(),!(h.tapHoldPreventClicks&&n||s)||(e.cancelable&&e.preventDefault(),s=!0,!1))})),doc.addEventListener("touchcancel",(function(){a=null,clearTimeout(l),clearTimeout(i),h.activeState&&b(),f&&k()}),{passive:!0})):h.activeState&&(u.on("touchstart",(function(a){var r=m(a.target);r&&(r.addClass("active-state"),"which"in a&&3===a.which&&setTimeout((function(){$(".active-state").removeClass("active-state")}),0)),f&&(e=a.pageX,t=a.pageY,x(a.target,a.pageX,a.pageY))})),u.on("touchmove",(function(){$(".active-state").removeClass("active-state"),f&&C()})),u.on("touchend",(function(){$(".active-state").removeClass("active-state"),f&&k()}))),doc.addEventListener("contextmenu",(function(e){h.disableContextMenu&&(Device.ios||Device.android||Device.cordova)&&e.preventDefault(),f&&(o&&b(),k())}))}var TouchModule={name:"touch",params:{touch:{touchClicksDistanceThreshold:5,disableContextMenu:!1,tapHold:!1,tapHoldDelay:750,tapHoldPreventClicks:!0,activeState:!0,activeStateElements:"a, button, label, span, .actions-button, .stepper-button, .stepper-button-plus, .stepper-button-minus, .card-expandable, .menu-item, .link, .item-link",mdTouchRipple:!0,iosTouchRipple:!1,auroraTouchRipple:!1,touchRippleElements:".ripple, .link, .item-link, .list-button, .links-list a, .button, button, .input-clear-button, .dialog-button, .tab-link, .item-radio, .item-checkbox, .actions-button, .searchbar-disable-button, .fab a, .checkbox, .radio, .data-table .sortable-cell:not(.input-cell), .notification-close-button, .stepper-button, .stepper-button-minus, .stepper-button-plus, .menu-item-content"}},instance:{touchEvents:{start:Support.touch?"touchstart":Support.pointerEvents?"pointerdown":"mousedown",move:Support.touch?"touchmove":Support.pointerEvents?"pointermove":"mousemove",end:Support.touch?"touchend":Support.pointerEvents?"pointerup":"mouseup"}},on:{init:initTouch}},pathToRegexp_1=pathToRegexp,parse_1=parse,compile_1=compile,tokensToFunction_1=tokensToFunction,tokensToRegExp_1=tokensToRegExp,DEFAULT_DELIMITER="/",PATH_REGEXP=new RegExp(["(\\\\.)","(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?"].join("|"),"g");function parse(e,t){for(var a,r=[],n=0,i=0,s="",o=t&&t.delimiter||DEFAULT_DELIMITER,l=t&&t.whitelist||void 0,p=!1;null!==(a=PATH_REGEXP.exec(e));){var c=a[0],d=a[1],u=a.index;if(s+=e.slice(i,u),i=u+c.length,d)s+=d[1],p=!0;else{var h="",f=a[2],m=a[3],v=a[4],g=a[5];if(!p&&s.length){var b=s.length-1,y=s[b];(!l||l.indexOf(y)>-1)&&(h=y,s=s.slice(0,b))}s&&(r.push(s),s="",p=!1);var w="+"===g||"*"===g,x="?"===g||"*"===g,C=m||v,$=h||o;r.push({name:f||n++,prefix:h,delimiter:$,optional:x,repeat:w,pattern:C?escapeGroup(C):"[^"+escapeString($===o?$:$+o)+"]+?"})}}return(s||i=0?a.allowPageChange?a.back({animate:i,pushState:!1}):History.routerQueue.push({action:"back",router:a}):a.allowPageChange?a.navigate(n,{animate:i,pushState:!1}):History.routerQueue.unshift({action:"load",stateUrl:n,router:a}))}}))}},initViewState:function(e,t){var a,r=Utils.extend({},History.state||{},((a={})[e]=t,a));History.state=r,win.history.replaceState(r,"")},push:function(e,t,a){var r;if(History.allowChange){History.previousState=History.state;var n=Utils.extend({},History.previousState||{},((r={})[e]=t,r));History.state=n,win.history.pushState(n,"",a)}else History.queue.push((function(){History.push(e,t,a)}))},replace:function(e,t,a){var r;if(History.allowChange){History.previousState=History.state;var n=Utils.extend({},History.previousState||{},((r={})[e]=t,r));History.state=n,win.history.replaceState(n,"",a)}else History.queue.push((function(){History.replace(e,t,a)}))},go:function(e){History.allowChange=!1,win.history.go(e)},back:function(){History.allowChange=!1,win.history.back()},allowChange:!0,previousState:{},state:win.history.state,blockPopstate:!0,init:function(e){$(win).on("load",(function(){setTimeout((function(){History.blockPopstate=!1}),0)})),doc.readyState&&"complete"===doc.readyState&&(History.blockPopstate=!1),$(win).on("popstate",History.handle.bind(e))}};function SwipeBack(e){var t,a,r,n,i,s,o,l,p,c=e,d=c.$el,u=c.$navbarsEl,h=c.app,f=c.params,m=!1,v=!1,g={},b=[],y=[],w=!0,x=[],C=[],k=f[h.theme+"SwipeBackAnimateShadow"],E=f[h.theme+"SwipeBackAnimateOpacity"],T=f[h.theme+"SwipeBackActiveArea"],S=f[h.theme+"SwipeBackThreshold"],M=h.rtl?"right center":"left center",P=h.rtl?"calc(100% - var(--f7-navbar-large-title-padding-left) - var(--f7-safe-area-left)) center":"calc(var(--f7-navbar-large-title-padding-left) + var(--f7-safe-area-left)) center";function O(e){void 0===e&&(e={});for(var t=e.progress,a=e.reset,r=e.transition,n=["overflow","transform","transform-origin","opacity"],i=0;i0||$(e.target).closest(".page-master, .page-master-detail").length>0&&f.masterDetailBreakpoint>0&&h.width>=f.masterDetailBreakpoint||(v=!1,m=!0,t=void 0,g.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,g.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY,n=Utils.now(),i=c.dynamicNavbar)}function B(e){if(m){var n="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,p="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY;if(void 0===t&&(t=!!(t||Math.abs(p-g.y)>Math.abs(n-g.x))||ng.x&&h.rtl),t||e.f7PreventSwipeBack||h.preventSwipeBack)m=!1;else{if(!v){var w=!1,D=$(e.target),B=D.closest(".swipeout");B.length>0&&(!h.rtl&&B.find(".swipeout-actions-left").length>0&&(w=!0),h.rtl&&B.find(".swipeout-actions-right").length>0&&(w=!0)),((b=D.closest(".page")).hasClass("no-swipeback")||D.closest(".no-swipeback, .card-opened").length>0)&&(w=!0),(y=d.find(".page-previous:not(.stacked)")).length>1&&(y=y.eq(y.length-1));g.x,d.offset().left;if(a=d.width(),(h.rtl?g.xT)&&(w=!0),0!==y.length&&0!==b.length||(w=!0),w)return void(m=!1);k&&0===(s=b.find(".page-shadow-effect")).length&&(s=$('
'),b.append(s)),E&&0===(o=y.find(".page-opacity-effect")).length&&(o=$('
'),y.append(o)),i&&(x=u.find(".navbar-current:not(.stacked)"),(C=u.find(".navbar-previous:not(.stacked)")).length>1&&(C=C.eq(C.length-1)),l=function(){var e,t,a=[],r=h.rtl?-1:1,n=x.hasClass("navbar-large"),i=x.hasClass("navbar-large-collapsed"),s=x.hasClass("navbar-large-transparent"),o=C.hasClass("navbar-large"),l=C.hasClass("navbar-large-collapsed"),p=C.hasClass("navbar-large-transparent"),c=n&&!i,d=o&&!l,u=x.find(".left, .title, .right, .subnavbar, .fading, .title-large, .navbar-bg"),m=C.find(".left, .title, .right, .subnavbar, .fading, .title-large, .navbar-bg");return f.iosAnimateNavbarBackIcon&&(e=x.hasClass("sliding")||x.find(".navbar-inner.sliding").length?x.find(".left").find(".back .icon + span").eq(0):x.find(".left.sliding").find(".back .icon + span").eq(0),t=C.hasClass("sliding")||C.find(".navbar-inner.sliding").length?C.find(".left").find(".back .icon + span").eq(0):C.find(".left.sliding").find(".back .icon + span").eq(0),e.length&&m.each((function(t,a){$(a).hasClass("title")&&(a.f7NavbarLeftOffset+=e.prev(".icon")[0].offsetWidth)}))),u.each((function(t,o){var l=$(o),p=l.hasClass("subnavbar"),u=l.hasClass("left"),h=l.hasClass("title"),m=l.hasClass("navbar-bg");if(c||!l.hasClass(".title-large")){var v={el:o};if(c){if(h)return;if(l.hasClass("title-large"))return a.indexOf(v)<0&&a.push(v),v.overflow="visible",void l.find(".title-large-text").each((function(e,t){a.push({el:t,transform:function(e){return"translateX("+100*e*r+"%)"}})}))}if(d&&(c||l.hasClass("title-large")&&(a.indexOf(v)<0&&a.push(v),v.opacity=0),u))return a.indexOf(v)<0&&a.push(v),v.opacity=function(e){return 1-Math.pow(e,.33)},void l.find(".back span").each((function(e,t){a.push({el:t,"transform-origin":M,transform:function(e){return"translateX(calc("+e+" * (var(--f7-navbarTitleLargeOffset) - var(--f7-navbarLeftTextOffset)))) translateY(calc("+e+" * (var(--f7-navbar-large-title-height) - var(--f7-navbar-large-title-padding-vertical) / 2))) scale("+(1+1*e)+")"}})}));if(m)return a.indexOf(v)<0&&a.push(v),c||d||(i?(s&&(v.className="ios-swipeback-navbar-bg-large"),v.transform=function(e){return"translateX("+100*e*r+"%) translateY(calc(-1 * var(--f7-navbar-large-title-height)))"}):v.transform=function(e){return"translateX("+100*e*r+"%)"}),!c&&d&&(v.className="ios-swipeback-navbar-bg-large",v.transform=function(e){return"translateX("+100*e*r+"%) translateY(calc(-1 * "+(1-e)+" * var(--f7-navbar-large-title-height)))"}),c&&d&&(v.transform=function(e){return"translateX("+100*e*r+"%)"}),void(c&&!d&&(v.transform=function(e){return"translateX("+100*e*r+"%) translateY(calc(-"+e+" * var(--f7-navbar-large-title-height)))"}));if(!l.hasClass("title-large")){var g=l.hasClass("sliding")||l.parents(".navbar-inner.sliding").length;if(a.indexOf(v)<0&&a.push(v),(!p||p&&!g)&&(v.opacity=function(e){return 1-Math.pow(e,.33)}),g){var b=v;if(u&&e.length&&f.iosAnimateNavbarBackIcon){var y={el:e[0]};b=y,a.push(y)}b.transform=function(e){var t=e*b.el.f7NavbarRightOffset;return 1===Device.pixelRatio&&(t=Math.round(t)),p&&n?"translate3d("+t+"px, calc(-1 * var(--f7-navbar-large-collapse-progress) * var(--f7-navbar-large-title-height)), 0)":"translate3d("+t+"px,0,0)"}}}}})),m.each((function(e,n){var i=$(n),s=i.hasClass("subnavbar"),u=i.hasClass("left"),h=i.hasClass("title"),m=i.hasClass("navbar-bg"),v={el:n};if(d){if(h)return;if(a.indexOf(v)<0&&a.push(v),i.hasClass("title-large"))return v.opacity=1,v.overflow="visible",void i.find(".title-large-text").each((function(e,t){a.push({el:t,"transform-origin":P,opacity:function(e){return Math.pow(e,3)},transform:function(e){return"translateX(calc("+(1-e)+" * (var(--f7-navbarLeftTextOffset) - var(--f7-navbarTitleLargeOffset)))) translateY(calc("+(e-1)+" * var(--f7-navbar-large-title-height) + "+(1-e)+" * var(--f7-navbar-large-title-padding-vertical))) scale("+(.5+.5*e)+")"}})}))}if(m)return a.indexOf(v)<0&&a.push(v),c||d||(l?(p&&(v.className="ios-swipeback-navbar-bg-large"),v.transform=function(e){return"translateX("+(100*e-100)*r+"%) translateY(calc(-1 * var(--f7-navbar-large-title-height)))"}):v.transform=function(e){return"translateX("+(100*e-100)*r+"%)"}),!c&&d&&(v.transform=function(e){return"translateX("+(100*e-100)*r+"%) translateY(calc(-1 * "+(1-e)+" * var(--f7-navbar-large-title-height)))"}),c&&!d&&(v.className="ios-swipeback-navbar-bg-large",v.transform=function(e){return"translateX("+(100*e-100)*r+"%) translateY(calc(-"+e+" * var(--f7-navbar-large-title-height)))"}),void(c&&d&&(v.transform=function(e){return"translateX("+(100*e-100)*r+"%)"}));if(!i.hasClass("title-large")){var g=i.hasClass("sliding")||C.children(".navbar-inner.sliding").length;if(a.indexOf(v)<0&&a.push(v),(!s||s&&!g)&&(v.opacity=function(e){return Math.pow(e,3)}),g){var b=v;if(u&&t.length&&f.iosAnimateNavbarBackIcon){var y={el:t[0]};b=y,a.push(y)}b.transform=function(e){var t=b.el.f7NavbarLeftOffset*(1-e);return 1===Device.pixelRatio&&(t=Math.round(t)),s&&o?"translate3d("+t+"px, calc(-1 * var(--f7-navbar-large-collapse-progress) * var(--f7-navbar-large-title-height)), 0)":"translate3d("+t+"px,0,0)"}}}})),a}()),$(".sheet.modal-in").length>0&&h.sheet&&h.sheet.close($(".sheet.modal-in"))}e.f7PreventSwipePanel=!0,v=!0,h.preventSwipePanelBySwipeBack=!0,e.preventDefault();var I=h.rtl?-1:1;(r=(n-g.x-S)*I)<0&&(r=0);var R=Math.min(Math.max(r/a,0),1),L={percentage:R,progress:R,currentPageEl:b[0],previousPageEl:y[0],currentNavbarEl:x[0],previousNavbarEl:C[0]};d.trigger("swipeback:move",L),c.emit("swipebackMove",L);var z=r*I,A=(r/5-a/5)*I;h.rtl?(z=Math.max(z,-a),A=Math.max(A,0)):(z=Math.min(z,a),A=Math.min(A,0)),1===Device.pixelRatio&&(z=Math.round(z),A=Math.round(A)),c.swipeBackActive=!0,$([b[0],y[0]]).addClass("page-swipeback-active"),b.transform("translate3d("+z+"px,0,0)"),k&&(s[0].style.opacity=1-1*R),"ios"===h.theme&&y.transform("translate3d("+A+"px,0,0)"),E&&(o[0].style.opacity=1-1*R),i&&O({progress:R})}}}function I(){if(h.preventSwipePanelBySwipeBack=!1,!m||!v)return m=!1,void(v=!1);if(m=!1,v=!1,c.swipeBackActive=!1,$([b[0],y[0]]).removeClass("page-swipeback-active"),0===r)return $([b[0],y[0]]).transform(""),s&&s.length>0&&s.remove(),o&&o.length>0&&o.remove(),void(i&&O({reset:!0}));var e=Utils.now()-n,t=!1;(e<300&&r>10||e>=300&&r>a/2)&&(b.removeClass("page-current").addClass("page-next"+("ios"!==h.theme?" page-next-on-right":"")),y.removeClass("page-previous").addClass("page-current").removeAttr("aria-hidden"),s&&(s[0].style.opacity=""),o&&(o[0].style.opacity=""),i&&(x.removeClass("navbar-current").addClass("navbar-next"),C.removeClass("navbar-previous").addClass("navbar-current").removeAttr("aria-hidden")),t=!0),$([b[0],y[0]]).addClass("page-transitioning page-transitioning-swipeback").transform(""),i&&O({progress:t?1:0,transition:!0}),w=!1,c.allowPageChange=!1;var l={currentPageEl:b[0],previousPageEl:y[0],currentNavbarEl:x[0],previousNavbarEl:C[0]};t?(c.currentRoute=y[0].f7Page.route,c.currentPage=y[0],c.pageCallback("beforeOut",b,x,"current","next",{route:b[0].f7Page.route,swipeBack:!0}),c.pageCallback("beforeIn",y,C,"previous","current",{route:y[0].f7Page.route,swipeBack:!0},b[0]),d.trigger("swipeback:beforechange",l),c.emit("swipebackBeforeChange",l)):(d.trigger("swipeback:beforereset",l),c.emit("swipebackBeforeReset",l)),b.transitionEnd((function(){$([b[0],y[0]]).removeClass("page-transitioning page-transitioning-swipeback"),i&&O({reset:!0,transition:!1}),w=!0,c.allowPageChange=!0,t?(1===c.history.length&&c.history.unshift(c.url),c.history.pop(),c.saveHistory(),f.pushState&&History.back(),c.pageCallback("afterOut",b,x,"current","next",{route:b[0].f7Page.route,swipeBack:!0}),c.pageCallback("afterIn",y,C,"previous","current",{route:y[0].f7Page.route,swipeBack:!0}),f.stackPages&&c.initialPages.indexOf(b[0])>=0?(b.addClass("stacked"),i&&x.addClass("stacked")):(c.pageCallback("beforeRemove",b,x,"next",{swipeBack:!0}),c.removePage(b),i&&c.removeNavbar(x)),d.trigger("swipeback:afterchange",l),c.emit("swipebackAfterChange",l),c.emit("routeChanged",c.currentRoute,c.previousRoute,c),f.preloadPreviousPage&&c.back(c.history[c.history.length-2],{preload:!0})):(d.trigger("swipeback:afterreset",l),c.emit("swipebackAfterReset",l)),s&&s.length>0&&s.remove(),o&&o.length>0&&o.remove()}))}p=!("touchstart"!==h.touchEvents.start||!Support.passiveListener)&&{passive:!0,capture:!1},d.on(h.touchEvents.start,D,p),h.on("touchmove:active",B),h.on("touchend:passive",I),c.on("routerDestroy",(function(){var e=!("touchstart"!==h.touchEvents.start||!Support.passiveListener)&&{passive:!0,capture:!1};d.off(h.touchEvents.start,D,e),h.off("touchmove:active",B),h.off("touchend:passive",I)}))}function redirect(e,t,a){var r=this,n=t.route.redirect;if(a.initial&&r.params.pushState&&(a.replaceState=!0,a.history=!0),"function"==typeof n){r.allowPageChange=!1;var i=n.call(r,t,(function(t,n){void 0===n&&(n={}),r.allowPageChange=!0,r[e](t,Utils.extend({},a,n))}),(function(){r.allowPageChange=!0}));return i&&"string"==typeof i?(r.allowPageChange=!0,r[e](i,a)):r}return r[e](n,a)}function processQueue(e,t,a,r,n,i,s){var o=[];Array.isArray(a)?o.push.apply(o,a):a&&"function"==typeof a&&o.push(a),t&&(Array.isArray(t)?o.push.apply(o,t):o.push(t)),function t(){0!==o.length?o.shift().call(e,r,n,(function(){t()}),(function(){s()})):i()}()}function processRouteQueue(e,t,a,r){var n=this;function i(){e&&e.route&&(n.params.routesBeforeEnter||e.route.beforeEnter)?(n.allowPageChange=!1,processQueue(n,n.params.routesBeforeEnter,e.route.beforeEnter,e,t,(function(){n.allowPageChange=!0,a()}),(function(){r()}))):a()}t&&t.route&&(n.params.routesBeforeLeave||t.route.beforeLeave)?(n.allowPageChange=!1,processQueue(n,n.params.routesBeforeLeave,t.route.beforeLeave,e,t,(function(){n.allowPageChange=!0,i()}),(function(){r()}))):i()}function appRouterCheck(e,t){if(!e.view)throw new Error("Framework7: it is not allowed to use router methods on global app router. Use router methods only on related View, e.g. app.views.main.router."+t+"(...)")}function asyncComponent(e,t,a,r){function n(e){e.then((function(e){a({component:e.default||e._default||e})})).catch((function(e){throw r(),new Error(e)}))}if(t instanceof Promise)n(t);else{var i=t.call(e);i instanceof Promise?n(i):a({component:i})}}function refreshPage(){return appRouterCheck(this,"refreshPage"),this.navigate(this.currentRoute.url,{ignoreCache:!0,reloadCurrent:!0})}function forward(e,t){void 0===t&&(t={});var a,r,n,i=this,s=$(e),o=i.app,l=i.view,p=Utils.extend(!1,{animate:i.params.animate,pushState:!0,replaceState:!1,history:!0,reloadCurrent:i.params.reloadPages,reloadPrevious:!1,reloadAll:!1,clearPreviousHistory:!1,reloadDetail:i.params.reloadDetail,on:{}},t),c=i.params.masterDetailBreakpoint>0,d=c&&p.route&&p.route.route&&!0===p.route.route.master,u=i.currentRoute.modal;if(u||"popup popover sheet loginScreen actions customModal panel".split(" ").forEach((function(e){i.currentRoute&&i.currentRoute.route&&i.currentRoute.route[e]&&(u=!0,n=e)})),u){var h=i.currentRoute.modal||i.currentRoute.route.modalInstance||o[n].get(),f=i.history[i.history.length-2],m=i.findMatchingRoute(f);!m&&f&&(m={url:f,path:f.split("?")[0],query:Utils.parseUrlQuery(f),route:{path:f.split("?")[0],url:f}}),i.modalRemove(h)}var v,g,b,y,w=i.dynamicNavbar,x=i.$el,C=s,k=p.reloadPrevious||p.reloadCurrent||p.reloadAll;if(i.allowPageChange=!1,0===C.length)return i.allowPageChange=!0,i;C.length&&i.removeThemeElements(C),w&&(b=C.children(".navbar"),g=i.$navbarsEl,0===b.length&&C[0]&&C[0].f7Page&&(b=C[0].f7Page.$navbarEl)),p.route&&p.route.route&&p.route.route.keepAlive&&!p.route.route.keepAliveData&&(p.route.route.keepAliveData={pageEl:s[0]});var E,T,S,M,P=x.children(".page:not(.stacked)").filter((function(e,t){return t!==C[0]}));if(w&&(E=g.children(".navbar:not(.stacked)").filter((function(e,t){return t!==b[0]}))),p.reloadPrevious&&P.length<2)return i.allowPageChange=!0,i;if(c&&!p.reloadAll){for(var O=0;O=i.params.masterDetailBreakpoint&&a}T&&(M=!r||S||p.reloadAll||p.reloadCurrent);var B="next";if(p.reloadCurrent||p.reloadAll||S?B="current":p.reloadPrevious&&(B="previous"),C.removeClass("page-previous page-current page-next").addClass("page-"+B+(d?" page-master":"")+(T?" page-master-detail":"")+(M?" page-master-detail-root":"")).removeClass("stacked").trigger("page:unstack").trigger("page:position",{position:B}),i.emit("pageUnstack",C[0]),i.emit("pagePosition",C[0],B),(d||T)&&(C.trigger("page:role",{role:d?"master":"detail",root:!!M}),i.emit("pageRole",C[0],{role:d?"master":"detail",detailRoot:!!M})),w&&b.length&&b.removeClass("navbar-previous navbar-current navbar-next").addClass("navbar-"+B+(d?" navbar-master":"")+(T?" navbar-master-detail":"")+(M?" navbar-master-detail-root":"")).removeClass("stacked"),p.reloadCurrent||S)v=P.eq(P.length-1),w&&(y=$(o.navbar.getElByPage(v)));else if(p.reloadPrevious)v=P.eq(P.length-2),w&&(y=$(o.navbar.getElByPage(v)));else if(p.reloadAll)v=P.filter((function(e,t){return t!==C[0]})),w&&(y=E.filter((function(e,t){return t!==b[0]})));else{if(P.length>1){var I=0;for(I=0;I1||S)&&(v=v.filter((function(e,t){return!t.classList.contains("page-master")}))),y&&(y.length>1||S)&&(y=y.filter((function(e,t){return!t.classList.contains("navbar-master")})))),i.params.pushState&&(p.pushState||p.replaceState)&&!p.reloadPrevious){var L=i.params.pushStateRoot||"";History[p.reloadCurrent||S&&r||p.reloadAll||p.replaceState?"replace":"push"](l.id,{url:p.route.url},L+i.params.pushStateSeparator+p.route.url)}p.reloadPrevious||(i.currentPageEl=C[0],w&&b.length?i.currentNavbarEl=b[0]:delete i.currentNavbarEl,i.currentRoute=p.route);var z=p.route.url;p.history&&(((p.reloadCurrent||S&&r)&&i.history.length)>0||p.replaceState?i.history[i.history.length-(p.reloadPrevious?2:1)]=z:p.reloadPrevious?i.history[i.history.length-2]=z:p.reloadAll?i.history=[z]:i.history.push(z)),i.saveHistory();var A=C.parents(doc).length>0,H=C[0].f7Component;if(p.reloadPrevious?(H&&!A?H.$mount((function(e){$(e).insertBefore(v)})):C.insertBefore(v),w&&b.length&&(b.find(".title-large").length&&b.addClass("navbar-large"),y.length?b.insertBefore(y):(i.$navbarsEl.parents(doc).length||i.$el.prepend(i.$navbarsEl),g.append(b)))):(v.next(".page")[0]!==C[0]&&(H&&!A?H.$mount((function(e){x.append(e)})):x.append(C[0])),w&&b.length&&(b.find(".title-large").length&&b.addClass("navbar-large"),i.$navbarsEl.parents(doc).length||i.$el.prepend(i.$navbarsEl),g.append(b[0]))),A?p.route&&p.route.route&&p.route.route.keepAlive&&!C[0].f7PageMounted&&(C[0].f7PageMounted=!0,i.pageCallback("mounted",C,b,B,k?B:"current",p,v)):i.pageCallback("mounted",C,b,B,k?B:"current",p,v),(p.reloadCurrent||S)&&v.length>0?i.params.stackPages&&i.initialPages.indexOf(v[0])>=0?(v.addClass("stacked"),v.trigger("page:stack"),i.emit("pageStack",v[0]),w&&y.addClass("stacked")):(i.pageCallback("beforeOut",v,y,"current",void 0,p),i.pageCallback("afterOut",v,y,"current",void 0,p),i.pageCallback("beforeRemove",v,y,"current",void 0,p),i.removePage(v),w&&y&&y.length&&i.removeNavbar(y)):p.reloadAll?v.each((function(e,t){var a=$(t),r=$(o.navbar.getElByPage(a));i.params.stackPages&&i.initialPages.indexOf(a[0])>=0?(a.addClass("stacked"),a.trigger("page:stack"),i.emit("pageStack",a[0]),w&&r.addClass("stacked")):(a.hasClass("page-current")&&(i.pageCallback("beforeOut",v,y,"current",void 0,p),i.pageCallback("afterOut",v,y,"current",void 0,p)),i.pageCallback("beforeRemove",a,y&&y.eq(e),"previous",void 0,p),i.removePage(a),w&&r.length&&i.removeNavbar(r))})):p.reloadPrevious&&(i.params.stackPages&&i.initialPages.indexOf(v[0])>=0?(v.addClass("stacked"),v.trigger("page:stack"),i.emit("pageStack",v[0]),w&&y.addClass("stacked")):(i.pageCallback("beforeRemove",v,y,"previous",void 0,p),i.removePage(v),w&&y&&y.length&&i.removeNavbar(y))),p.route.route.tab&&i.tabLoad(p.route.route.tab,Utils.extend({},p,{history:!1,pushState:!1})),c&&l.checkMasterDetailBreakpoint(),i.pageCallback("init",C,b,B,k?B:"current",p,v),p.reloadCurrent||p.reloadAll||S)return i.allowPageChange=!0,i.pageCallback("beforeIn",C,b,B,"current",p),C.removeAttr("aria-hidden"),w&&b&&b.removeAttr("aria-hidden"),i.pageCallback("afterIn",C,b,B,"current",p),p.reloadCurrent&&p.clearPreviousHistory&&i.clearPreviousHistory(),S&&(a.classList.add("page-previous"),a.classList.remove("page-current"),$(a).trigger("page:position",{position:"previous"}),i.emit("pagePosition",a,"previous"),a.f7Page&&a.f7Page.navbarEl&&(a.f7Page.navbarEl.classList.add("navbar-previous"),a.f7Page.navbarEl.classList.remove("navbar-current"))),i;if(p.reloadPrevious)return i.allowPageChange=!0,i;function U(){var e="page-previous page-current page-next",t="navbar-previous navbar-current navbar-next";C.removeClass(e).addClass("page-current").removeAttr("aria-hidden").trigger("page:position",{position:"current"}),i.emit("pagePosition",C[0],"current"),v.removeClass(e).addClass("page-previous").trigger("page:position",{position:"previous"}),i.emit("pagePosition",v[0],"previous"),v.hasClass("page-master")||v.attr("aria-hidden","true"),w&&(b.removeClass(t).addClass("navbar-current").removeAttr("aria-hidden"),y.removeClass(t).addClass("navbar-previous"),y.hasClass("navbar-master")||y.attr("aria-hidden","true")),i.allowPageChange=!0,i.pageCallback("afterOut",v,y,"current","previous",p),i.pageCallback("afterIn",C,b,"next","current",p);var a=(i.params.preloadPreviousPage||i.params[o.theme+"SwipeBack"])&&!d;a||(C.hasClass("smart-select-page")||C.hasClass("photo-browser-page")||C.hasClass("autocomplete-page")||C.hasClass("color-picker-page"))&&(a=!0),a||(i.params.stackPages?(v.addClass("stacked"),v.trigger("page:stack"),i.emit("pageStack",v[0]),w&&y.addClass("stacked")):C.attr("data-name")&&"smart-select-page"===C.attr("data-name")||(i.pageCallback("beforeRemove",v,y,"previous",void 0,p),i.removePage(v),w&&y.length&&i.removeNavbar(y))),p.clearPreviousHistory&&i.clearPreviousHistory(),i.emit("routeChanged",i.currentRoute,i.previousRoute,i),i.params.pushState&&History.clearRouterQueue()}function N(){var e="page-previous page-current page-next",t="navbar-previous navbar-current navbar-next";v.removeClass(e).addClass("page-current").removeAttr("aria-hidden").trigger("page:position",{position:"current"}),i.emit("pagePosition",v[0],"current"),C.removeClass(e).addClass("page-next").removeAttr("aria-hidden").trigger("page:position",{position:"next"}),i.emit("pagePosition",C[0],"next"),w&&(y.removeClass(t).addClass("navbar-current").removeAttr("aria-hidden"),b.removeClass(t).addClass("navbar-next").removeAttr("aria-hidden"))}if(i.pageCallback("beforeOut",v,y,"current","previous",p),i.pageCallback("beforeIn",C,b,"next","current",p),!p.animate||d&&o.width>=i.params.masterDetailBreakpoint)U();else{var F=i.params[i.app.theme+"PageLoadDelay"],V=i.params.transition;p.transition&&(V=p.transition),!V&&i.currentRoute&&i.currentRoute.route&&(V=i.currentRoute.route.transition),!V&&i.currentRoute&&i.currentRoute.route.options&&(V=i.currentRoute.route.options.transition),V&&(C[0].f7PageTransition=V),F?setTimeout((function(){N(),i.animate(v,C,y,b,"forward",V,(function(){U()}))}),F):(N(),i.animate(v,C,y,b,"forward",V,(function(){U()})))}return i}function load(e,t,a){void 0===e&&(e={}),void 0===t&&(t={});var r=this;if(!r.allowPageChange&&!a)return r;var n=e,i=t,s=n.url,o=n.content,l=n.el,p=n.pageName,c=n.template,d=n.templateUrl,u=n.component,h=n.componentUrl;if(!i.reloadCurrent&&i.route&&i.route.route&&i.route.route.parentPath&&r.currentRoute.route&&r.currentRoute.route.parentPath===i.route.route.parentPath){if(i.route.url===r.url)return r.allowPageChange=!0,!1;var f=Object.keys(i.route.params).length===Object.keys(r.currentRoute.params).length;if(f&&Object.keys(i.route.params).forEach((function(e){e in r.currentRoute.params&&r.currentRoute.params[e]===i.route.params[e]||(f=!1)})),f)return!!i.route.route.tab&&r.tabLoad(i.route.route.tab,i);if(!f&&i.route.route.tab&&r.currentRoute.route.tab&&r.currentRoute.parentPath===i.route.parentPath)return r.tabLoad(i.route.route.tab,i)}if(i.route&&i.route.url&&r.url===i.route.url&&!i.reloadCurrent&&!i.reloadPrevious&&!r.params.allowDuplicateUrls)return r.allowPageChange=!0,!1;function m(e,t){return r.forward(e,Utils.extend(i,t))}function v(){return r.allowPageChange=!0,r}if(!i.route&&s&&(i.route=r.parseRouteUrl(s),Utils.extend(i.route,{route:{url:s,path:s}})),(s||d||h)&&(r.allowPageChange=!1),o)r.forward(r.getPageEl(o),i);else if(c||d)try{r.pageTemplateLoader(c,d,i,m,v)}catch(e){throw r.allowPageChange=!0,e}else if(l)r.forward(r.getPageEl(l),i);else if(p)r.forward(r.$el.children('.page[data-name="'+p+'"]').eq(0),i);else if(u||h)try{r.pageComponentLoader(r.el,u,h,i,m,v)}catch(e){throw r.allowPageChange=!0,e}else s&&(r.xhr&&(r.xhr.abort(),r.xhr=!1),r.xhrRequest(s,i).then((function(e){r.forward(r.getPageEl(e),i)})).catch((function(){r.allowPageChange=!0})));return r}function navigate(e,t){void 0===t&&(t={});var a,r,n,i,s,o,l=this;if(l.swipeBackActive)return l;if("string"==typeof e?a=e:(a=e.url,r=e.route,n=e.name,i=e.query,s=e.params),n){if(!(o=l.findRouteByKey("name",n)))throw new Error('Framework7: route with name "'+n+'" not found');if(a=l.constructRouteUrl(o,{params:s,query:i}))return l.navigate(a,t);throw new Error("Framework7: can't construct URL for route with name \""+n+'"')}var p=l.app;if(appRouterCheck(l,"navigate"),"#"===a||""===a)return l;var c=a.replace("./","");if("/"!==c[0]&&0!==c.indexOf("#")){var d=l.currentRoute.parentPath||l.currentRoute.path;c=((d?d+"/":"/")+c).replace("///","/").replace("//","/")}if(!(o=r?Utils.extend(l.parseRouteUrl(c),{route:Utils.extend({},r)}):l.findMatchingRoute(c)))return l;if(o.route&&o.route.viewName){var u=o.route.viewName,h=p.views[u];if(!h)throw new Error('Framework7: There is no View with "'+u+'" name that was specified in this route');if(h!==l.view)return h.router.navigate(e,t)}if(o.route.redirect)return redirect.call(l,"navigate",o,t);var f={};function m(){var e=!1;function t(e,t){l.allowPageChange=!1;var a=!1;t&&t.context&&(o.context?o.context=Utils.extend({},o.context,t.context):o.context=t.context,f.route.context=o.context),"popup popover sheet loginScreen actions customModal panel".split(" ").forEach((function(r){if(e[r]){a=!0;var n=Utils.extend({},o,{route:e});l.allowPageChange=!0,l.modalLoad(r,n,Utils.extend(f,t))}})),a||l.load(e,Utils.extend(f,t),!0)}function a(){l.allowPageChange=!0}"popup popover sheet loginScreen actions customModal panel".split(" ").forEach((function(t){o.route[t]&&!e&&(e=!0,l.modalLoad(t,o,f))})),o.route.keepAlive&&o.route.keepAliveData&&(l.load({el:o.route.keepAliveData.pageEl},f,!1),e=!0),"url content component pageName el componentUrl template templateUrl".split(" ").forEach((function(t){var a;o.route[t]&&!e&&(e=!0,l.load(((a={})[t]=o.route[t],a),f,!1))})),e||(o.route.async&&(l.allowPageChange=!1,o.route.async.call(l,f.route,l.currentRoute,t,a)),o.route.asyncComponent&&asyncComponent(l,o.route.asyncComponent,t,a))}function v(){l.allowPageChange=!0}if(o.route.options?Utils.extend(f,o.route.options,t):Utils.extend(f,t),f.route=o,f&&f.context&&(o.context=f.context,f.route.context=f.context),l.params.masterDetailBreakpoint>0&&o.route.masterRoute){var g=!0,b=!1;if(l.currentRoute&&l.currentRoute.route&&(!l.currentRoute.route.master||l.currentRoute.route!==o.route.masterRoute&&l.currentRoute.route.path!==o.route.masterRoute.path||(g=!1),!l.currentRoute.route.masterRoute||l.currentRoute.route.masterRoute!==o.route.masterRoute&&l.currentRoute.route.masterRoute.path!==o.route.masterRoute.path||(g=!1,b=!0)),g||b&&t.reloadAll)return l.navigate(o.route.masterRoute.path,{animate:!1,reloadAll:t.reloadAll,reloadCurrent:t.reloadCurrent,reloadPrevious:t.reloadPrevious,pushState:!t.initial,history:!t.initial,once:{pageAfterIn:function(){l.navigate(e,Utils.extend({},t,{animate:!1,reloadAll:!1,reloadCurrent:!1,reloadPrevious:!1,history:!t.initial,pushState:!t.initial}))}}}),l}return processRouteQueue.call(l,o,l.currentRoute,(function(){o.route.modules?p.loadModules(Array.isArray(o.route.modules)?o.route.modules:[o.route.modules]).then((function(){m()})).catch((function(){v()})):m()}),(function(){v()})),l}function tabLoad(e,t){void 0===t&&(t={});var a,r,n=this,i=Utils.extend({animate:n.params.animate,pushState:!0,history:!0,parentPageEl:null,preload:!1,on:{}},t);i.route&&(i.preload||i.route===n.currentRoute||(r=n.previousRoute,n.currentRoute=i.route),i.preload?(a=i.route,r=n.currentRoute):(a=n.currentRoute,r||(r=n.previousRoute)),n.params.pushState&&i.pushState&&!i.reloadPrevious&&History.replace(n.view.id,{url:i.route.url},(n.params.pushStateRoot||"")+n.params.pushStateSeparator+i.route.url),i.history&&(n.history[Math.max(n.history.length-1,0)]=i.route.url,n.saveHistory()));var s,o=$(i.parentPageEl||n.currentPageEl);s=o.length&&o.find("#"+e.id).length?o.find("#"+e.id).eq(0):n.view.selector?n.view.selector+" #"+e.id:"#"+e.id;var l,p=n.app.tab.show({tabEl:s,animate:i.animate,tabRoute:i.route}),c=p.$newTabEl,d=p.$oldTabEl,u=p.animated,h=p.onTabsChanged;if(c&&c.parents(".page").length>0&&i.route){var f=c.parents(".page")[0].f7Page;f&&i.route&&(f.route=i.route)}if(c[0].f7RouterTabLoaded)return d&&d.length?(u?h((function(){n.emit("routeChanged",n.currentRoute,n.previousRoute,n)})):n.emit("routeChanged",n.currentRoute,n.previousRoute,n),n):n;function m(t,a){var r=t.url,i=t.content,s=t.el,o=t.template,l=t.templateUrl,p=t.component,f=t.componentUrl;function m(t){n.allowPageChange=!0,t&&("string"==typeof t?c.html(t):(c.html(""),t.f7Component?t.f7Component.$mount((function(e){c.append(e)})):c.append(t)),c[0].f7RouterTabLoaded=!0,function(t){n.removeThemeElements(c);var a=c;"string"!=typeof t&&(a=$(t)),a.trigger("tab:init tab:mounted",e),n.emit("tabInit tabMounted",c[0],e),d&&d.length&&(u?h((function(){n.emit("routeChanged",n.currentRoute,n.previousRoute,n),n.params.unloadTabContent&&n.tabRemove(d,c,e)})):(n.emit("routeChanged",n.currentRoute,n.previousRoute,n),n.params.unloadTabContent&&n.tabRemove(d,c,e)))}(t))}function v(){return n.allowPageChange=!0,n}if(i)m(i);else if(o||l)try{n.tabTemplateLoader(o,l,a,m,v)}catch(e){throw n.allowPageChange=!0,e}else if(s)m(s);else if(p||f)try{n.tabComponentLoader(c[0],p,f,a,m,v)}catch(e){throw n.allowPageChange=!0,e}else r&&(n.xhr&&(n.xhr.abort(),n.xhr=!1),n.xhrRequest(r,a).then((function(e){m(e)})).catch((function(){n.allowPageChange=!0})))}function v(e,t){m(e,Utils.extend(i,t))}function g(){n.allowPageChange=!0}return"url content component el componentUrl template templateUrl".split(" ").forEach((function(t){var a;e[t]&&(l=!0,m(((a={})[t]=e[t],a),i))})),e.async?e.async.call(n,a,r,v,g):e.asyncComponent?asyncComponent(n,e.asyncComponent,v,g):l||(n.allowPageChange=!0),n}function tabRemove(e,t,a){var r;e[0]&&(e[0].f7RouterTabLoaded=!1,delete e[0].f7RouterTabLoaded),e.children().each((function(e,t){t.f7Component&&(r=!0,$(t).trigger("tab:beforeremove",a),t.f7Component.$destroy())})),r||e.trigger("tab:beforeremove",a),this.emit("tabBeforeRemove",e[0],t[0],a),this.removeTabContent(e[0],a)}function modalLoad(e,t,a){void 0===a&&(a={});var r,n=this,i=n.app,s="panel"===e,o=s?"panel":"modal",l=Utils.extend({animate:n.params.animate,pushState:!0,history:!0,on:{}},a),p=Utils.extend({},t.route[e]),c=t.route;function d(){var a=i[e].create(p);c.modalInstance=a;var r=a.el;function d(){a.close()}a.on(o+"Open",(function(){r||(n.removeThemeElements(a.el),a.$el.trigger(e.toLowerCase()+":init "+e.toLowerCase()+":mounted",t,a),n.emit((s?"":"modalInit")+" "+e+"Init "+e+"Mounted",a.el,t,a)),n.once("swipeBackMove",d)})),a.on(o+"Close",(function(){n.off("swipeBackMove",d),a.closeByRouter||n.back()})),a.on(o+"Closed",(function(){a.$el.trigger(e.toLowerCase()+":beforeremove",t,a),a.emit((s?"":"modalBeforeRemove ")+e+"BeforeRemove",a.el,t,a);var r=a.el.f7Component;r&&r.$destroy(),Utils.nextTick((function(){(r||p.component)&&n.removeModal(a.el),a.destroy(),delete a.route,delete c.modalInstance}))})),l.route&&(n.params.pushState&&l.pushState&&History.push(n.view.id,{url:l.route.url,modal:e},(n.params.pushStateRoot||"")+n.params.pushStateSeparator+l.route.url),l.route!==n.currentRoute&&(a.route=Utils.extend(l.route,{modal:a}),n.currentRoute=a.route),l.history&&(n.history.push(l.route.url),n.saveHistory())),r&&(n.removeThemeElements(a.el),a.$el.trigger(e.toLowerCase()+":init "+e.toLowerCase()+":mounted",t,a),n.emit(o+"Init "+e+"Init "+e+"Mounted",a.el,t,a)),a.open()}function u(e,t){var a=e.url,r=e.content,s=e.template,o=e.templateUrl,l=e.component,c=e.componentUrl;function u(e){e&&("string"==typeof e?p.content=e:e.f7Component?e.f7Component.$mount((function(e){p.el=e,i.root.append(e)})):p.el=e,d())}function h(){return n.allowPageChange=!0,n}if(r)u(r);else if(s||o)try{n.modalTemplateLoader(s,o,t,u,h)}catch(e){throw n.allowPageChange=!0,e}else if(l||c)try{n.modalComponentLoader(i.root[0],l,c,t,u,h)}catch(e){throw n.allowPageChange=!0,e}else a?(n.xhr&&(n.xhr.abort(),n.xhr=!1),n.xhrRequest(a,t).then((function(e){p.content=e,d()})).catch((function(){n.allowPageChange=!0}))):d()}function h(e,t){u(e,Utils.extend(l,t))}function f(){n.allowPageChange=!0}return"url content component el componentUrl template templateUrl".split(" ").forEach((function(e){var t;p[e]&&!r&&(r=!0,u(((t={})[e]=p[e],t),l))})),r||"actions"!==e||d(),p.async&&p.async.call(n,l.route,n.currentRoute,h,f),p.asyncComponent&&asyncComponent(n,p.asyncComponent,h,f),n}function modalRemove(e){Utils.extend(e,{closeByRouter:!0}),e.close()}function backward(e,t){var a,r,n,i,s,o,l,p,c=this,d=$(e),u=c.app,h=c.view,f=Utils.extend({animate:c.params.animate,pushState:!0,replaceState:!1},t),m=c.params.masterDetailBreakpoint>0,v=m&&f.route&&f.route.route&&!0===f.route.route.master,g=c.dynamicNavbar,b=d,y=c.$el.children(".page-current"),w=m&&y.hasClass("page-master");if(b.length&&c.removeThemeElements(b),g&&(i=b.children(".navbar"),n=c.$navbarsEl,0===i.length&&b[0]&&b[0].f7Page&&(i=b[0].f7Page.$navbarEl),s=n.find(".navbar-current")),c.allowPageChange=!1,0===b.length||0===y.length)return c.allowPageChange=!0,c;if(c.removeThemeElements(b),f.route&&f.route.route&&f.route.route.keepAlive&&!f.route.route.keepAliveData&&(f.route.route.keepAliveData={pageEl:d[0]}),m){for(var x=c.$el.children(".page:not(.stacked)").filter((function(e,t){return t!==b[0]})),C=0;Cc.history.indexOf(a.f7Page.route.url))&&!v&&a&&a.f7Page&&f.route.route.masterRoute&&(o=f.route.route.masterRoute.path===a.f7Page.route.route.path)}if(o&&a&&a.f7Page&&(l=c.history.indexOf(f.route.url)-c.history.indexOf(a.f7Page.route.url)==1),b.addClass("page-previous"+(v?" page-master":"")+(o?" page-master-detail":"")+(l?" page-master-detail-root":"")).removeClass("stacked").removeAttr("aria-hidden").trigger("page:unstack").trigger("page:position",{position:"previous"}),c.emit("pageUnstack",b[0]),c.emit("pagePosition",b[0],"previous"),(v||o)&&(b.trigger("page:role",{role:v?"master":"detail",root:!!l}),c.emit("pageRole",b[0],{role:v?"master":"detail",detailRoot:!!l})),g&&i.length>0&&i.addClass("navbar-previous"+(v?" navbar-master":"")+(o?" navbar-master-detail":"")+(l?" navbar-master-detail-root":"")).removeClass("stacked").removeAttr("aria-hidden"),f.force&&(y.prev(".page-previous:not(.stacked)").length>0||0===y.prev(".page-previous").length))if(c.history.indexOf(f.route.url)>=0?(p=c.history.length-c.history.indexOf(f.route.url)-1,c.history=c.history.slice(0,c.history.indexOf(f.route.url)+2),h.history=c.history):c.history[[c.history.length-2]]?c.history[c.history.length-2]=f.route.url:c.history.unshift(c.url),p&&c.params.stackPages)y.prevAll(".page-previous").each((function(e,t){var n,i=$(t);g&&(n=$(u.navbar.getElByPage(i))),i[0]!==b[0]&&i.index()>b.index()&&(c.initialPages.indexOf(i[0])>=0?(i.addClass("stacked"),i.trigger("page:stack"),c.emit("pageStack",i[0]),g&&n.addClass("stacked")):(c.pageCallback("beforeRemove",i,n,"previous",void 0,f),i[0]===a&&(r=!0),c.removePage(i),g&&n.length>0&&c.removeNavbar(n)))}));else{var k,E=y.prev(".page-previous:not(.stacked)");g&&(k=$(u.navbar.getElByPage(E))),c.params.stackPages&&c.initialPages.indexOf(E[0])>=0?(E.addClass("stacked"),E.trigger("page:stack"),c.emit("pageStack",E[0]),k.addClass("stacked")):E.length>0&&(c.pageCallback("beforeRemove",E,k,"previous",void 0,f),E[0]===a&&(r=!0),c.removePage(E),g&&k.length&&c.removeNavbar(k))}var T,S,M=b.parents(doc).length>0,P=b[0].f7Component;function O(){0===b.next(y).length&&(!M&&P?P.$mount((function(e){$(e).insertBefore(y)})):b.insertBefore(y)),g&&i.length&&(i.find(".title-large").length&&i.addClass("navbar-large"),i.insertBefore(s),s.length>0?i.insertBefore(s):(c.$navbarsEl.parents(doc).length||c.$el.prepend(c.$navbarsEl),n.append(i))),M?f.route&&f.route.route&&f.route.route.keepAlive&&!b[0].f7PageMounted&&(b[0].f7PageMounted=!0,c.pageCallback("mounted",b,i,"previous","current",f,y)):c.pageCallback("mounted",b,i,"previous","current",f,y)}if(f.preload){O(),f.route.route.tab&&c.tabLoad(f.route.route.tab,Utils.extend({},f,{history:!1,pushState:!1,preload:!0})),v&&(b.removeClass("page-master-stacked").trigger("page:masterunstack"),c.emit("pageMasterUnstack",b[0]),g&&$(u.navbar.getElByPage(b)).removeClass("navbar-master-stacked")),c.pageCallback("init",b,i,"previous","current",f,y);var D=b.prevAll(".page-previous:not(.stacked):not(.page-master)");return D.length>0&&D.each((function(e,t){var a,r=$(t);g&&(a=$(u.navbar.getElByPage(r))),c.params.stackPages&&c.initialPages.indexOf(t)>=0?(r.addClass("stacked"),r.trigger("page:stack"),c.emit("pageStack",r[0]),g&&a.addClass("stacked")):(c.pageCallback("beforeRemove",r,a,"previous",void 0),c.removePage(r),g&&a.length&&c.removeNavbar(a))})),c.allowPageChange=!0,c}if(!(Device.ie||Device.edge||Device.firefox&&!Device.ios)&&c.params.pushState&&f.pushState)if(f.replaceState){var B=c.params.pushStateRoot||"";History.replace(h.id,{url:f.route.url},B+c.params.pushStateSeparator+f.route.url)}else p?History.go(-p):History.back();if(f.replaceState?c.history[c.history.length-1]=f.route.url:(1===c.history.length&&c.history.unshift(c.url),c.history.pop()),c.saveHistory(),c.currentPageEl=b[0],g&&i.length?c.currentNavbarEl=i[0]:delete c.currentNavbarEl,c.currentRoute=f.route,(Device.ie||Device.edge||Device.firefox&&!Device.ios)&&c.params.pushState&&f.pushState)if(f.replaceState){var I=c.params.pushStateRoot||"";History.replace(h.id,{url:f.route.url},I+c.params.pushStateSeparator+f.route.url)}else p?History.go(-p):History.back();function R(){var e="page-previous page-current page-next",t="navbar-previous navbar-current navbar-next";b.removeClass(e).addClass("page-current").removeAttr("aria-hidden").trigger("page:position",{position:"current"}),c.emit("pagePosition",b[0],"current"),y.removeClass(e).addClass("page-next").attr("aria-hidden","true").trigger("page:position",{position:"next"}),c.emit("pagePosition",y[0],"next"),g&&(i.removeClass(t).addClass("navbar-current").removeAttr("aria-hidden"),s.removeClass(t).addClass("navbar-next").attr("aria-hidden","true")),c.pageCallback("afterOut",y,s,"current","next",f),c.pageCallback("afterIn",b,i,"previous","current",f),c.params.stackPages&&c.initialPages.indexOf(y[0])>=0?(y.addClass("stacked"),y.trigger("page:stack"),c.emit("pageStack",y[0]),g&&s.addClass("stacked")):(c.pageCallback("beforeRemove",y,s,"next",void 0,f),c.removePage(y),g&&s.length&&c.removeNavbar(s)),c.allowPageChange=!0,c.emit("routeChanged",c.currentRoute,c.previousRoute,c),(c.params.preloadPreviousPage||c.params[u.theme+"SwipeBack"])&&c.history[c.history.length-2]&&!v&&c.back(c.history[c.history.length-2],{preload:!0}),c.params.pushState&&History.clearRouterQueue()}if(O(),f.route.route.tab&&c.tabLoad(f.route.route.tab,Utils.extend({},f,{history:!1,pushState:!1})),m&&(w||r)&&h.checkMasterDetailBreakpoint(!1),c.pageCallback("init",b,i,"previous","current",f,y),c.pageCallback("beforeOut",y,s,"current","next",f),c.pageCallback("beforeIn",b,i,"previous","current",f),!f.animate||w&&u.width>=c.params.masterDetailBreakpoint)R();else{var L=c.params.transition;y[0]&&y[0].f7PageTransition&&(L=y[0].f7PageTransition,delete y[0].f7PageTransition),f.transition&&(L=f.transition),!L&&c.previousRoute&&c.previousRoute.route&&(L=c.previousRoute.route.transition),!L&&c.previousRoute&&c.previousRoute.route&&c.previousRoute.route.options&&(L=c.previousRoute.route.options.transition),T="page-previous page-current page-next",S="navbar-previous navbar-current navbar-next",y.removeClass(T).addClass("page-current").trigger("page:position",{position:"current"}),c.emit("pagePosition",y[0],"current"),b.removeClass(T).addClass("page-previous").removeAttr("aria-hidden").trigger("page:position",{position:"previous"}),c.emit("pagePosition",b[0],"previous"),g&&(s.removeClass(S).addClass("navbar-current"),i.removeClass(S).addClass("navbar-previous").removeAttr("aria-hidden")),c.animate(y,b,s,i,"backward",L,(function(){R()}))}return c}function loadBack(e,t,a){var r=this;if(!r.allowPageChange&&!a)return r;var n=e,i=t,s=n.url,o=n.content,l=n.el,p=n.pageName,c=n.template,d=n.templateUrl,u=n.component,h=n.componentUrl;if(i.route.url&&r.url===i.route.url&&!i.reloadCurrent&&!i.reloadPrevious&&!r.params.allowDuplicateUrls)return!1;function f(e,t){return r.backward(e,Utils.extend(i,t))}function m(){return r.allowPageChange=!0,r}if(!i.route&&s&&(i.route=r.parseRouteUrl(s)),(s||d||h)&&(r.allowPageChange=!1),o)r.backward(r.getPageEl(o),i);else if(c||d)try{r.pageTemplateLoader(c,d,i,f,m)}catch(e){throw r.allowPageChange=!0,e}else if(l)r.backward(r.getPageEl(l),i);else if(p)r.backward(r.$el.children('.page[data-name="'+p+'"]').eq(0),i);else if(u||h)try{r.pageComponentLoader(r.el,u,h,i,f,m)}catch(e){throw r.allowPageChange=!0,e}else s&&(r.xhr&&(r.xhr.abort(),r.xhr=!1),r.xhrRequest(s,i).then((function(e){r.backward(r.getPageEl(e),i)})).catch((function(){r.allowPageChange=!0})));return r}function back(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var a,r,n,i=this;if(i.swipeBackActive)return i;"object"==typeof e[0]?r=e[0]||{}:(a=e[0],r=e[1]||{});var s=r.name,o=r.params,l=r.query;if(s){if(!(n=i.findRouteByKey("name",s)))throw new Error('Framework7: route with name "'+s+'" not found');if(a=i.constructRouteUrl(n,{params:o,query:l}))return i.back(a,Utils.extend({},r,{name:null,params:null,query:null}));throw new Error("Framework7: can't construct URL for route with name \""+s+'"')}var p=i.app;appRouterCheck(i,"back");var c,d=i.currentRoute.modal;if(d||"popup popover sheet loginScreen actions customModal panel".split(" ").forEach((function(e){i.currentRoute.route[e]&&(d=!0,c=e)})),d){var u,h=i.currentRoute.modal||i.currentRoute.route.modalInstance||p[c].get(),f=i.history[i.history.length-2];if(h&&h.$el){var m=h.$el.prevAll(".modal-in");m.length&&m[0].f7Modal&&(u=m[0].f7Modal.route)}if(u||(u=i.findMatchingRoute(f)),!u&&f&&(u={url:f,path:f.split("?")[0],query:Utils.parseUrlQuery(f),route:{path:f.split("?")[0],url:f}}),!(a&&0!==a.replace(/[# ]/g,"").trim().length||u&&h))return i;var v=r.force&&u&&a;if(u&&h){var g=Device.ie||Device.edge||Device.firefox&&!Device.ios,b=i.params.pushState&&!1!==r.pushState;b&&!g&&History.back(),i.currentRoute=u,i.history.pop(),i.saveHistory(),b&&g&&History.back(),i.modalRemove(h),v&&i.navigate(a,{reloadCurrent:!0})}else h&&(i.modalRemove(h),a&&i.navigate(a,{reloadCurrent:!0}));return i}var y,w=i.$el.children(".page-current").prevAll(".page-previous:not(.page-master)").eq(0);if(i.params.masterDetailBreakpoint>0){var x=i.$el.children(".page-current").prevAll(".page-master").eq(0);if(x.length){var C=i.history[i.history.length-2],$=i.findMatchingRoute(C);$&&$.route===x[0].f7Page.route.route&&(w=x,r.preload||(y=p.width>=i.params.masterDetailBreakpoint))}}if(!r.force&&w.length&&!y){if(i.params.pushState&&w[0].f7Page&&i.history[i.history.length-2]!==w[0].f7Page.route.url)return i.back(i.history[i.history.length-2],Utils.extend(r,{force:!0})),i;var k=w[0].f7Page.route;return processRouteQueue.call(i,k,i.currentRoute,(function(){i.loadBack({el:w},Utils.extend(r,{route:k}))}),(function(){})),i}if("#"===a&&(a=void 0),a&&"/"!==a[0]&&0!==a.indexOf("#")&&(a=((i.path||"/")+a).replace("//","/")),!a&&i.history.length>1&&(a=i.history[i.history.length-2]),y&&!r.force&&i.history[i.history.length-3])return i.back(i.history[i.history.length-3],Utils.extend({},r||{},{force:!0,animate:!1}));if(y&&!r.force)return i;if((n=i.findMatchingRoute(a))||a&&(n={url:a,path:a.split("?")[0],query:Utils.parseUrlQuery(a),route:{path:a.split("?")[0],url:a}}),!n)return i;if(n.route.redirect)return redirect.call(i,"back",n,r);var E,T={};if(n.route.options?Utils.extend(T,n.route.options,r):Utils.extend(T,r),T.route=n,T&&T.context&&(n.context=T.context,T.route.context=T.context),T.force&&i.params.stackPages&&(i.$el.children(".page-previous.stacked").each((function(e,t){t.f7Page&&t.f7Page.route&&t.f7Page.route.url===n.url&&(E=!0,i.loadBack({el:t},T))})),E))return i;function S(){var e=!1;function t(e,t){i.allowPageChange=!1,t&&t.context&&(n.context?n.context=Utils.extend({},n.context,t.context):n.context=t.context,T.route.context=n.context),i.loadBack(e,Utils.extend(T,t),!0)}function a(){i.allowPageChange=!0}n.route.keepAlive&&n.route.keepAliveData&&(i.loadBack({el:n.route.keepAliveData.pageEl},T),e=!0),"url content component pageName el componentUrl template templateUrl".split(" ").forEach((function(t){var a;n.route[t]&&!e&&(e=!0,i.loadBack(((a={})[t]=n.route[t],a),T))})),e||(n.route.async&&(i.allowPageChange=!1,n.route.async.call(i,n,i.currentRoute,t,a)),n.route.asyncComponent&&asyncComponent(i,n.route.asyncComponent,t,a))}function M(){i.allowPageChange=!0}return T.preload?S():processRouteQueue.call(i,n,i.currentRoute,(function(){n.route.modules?p.loadModules(Array.isArray(n.route.modules)?n.route.modules:[n.route.modules]).then((function(){S()})).catch((function(){M()})):S()}),(function(){M()})),i}function clearPreviousPages(e){appRouterCheck(e,"clearPreviousPages");var t=e.app,a=e.dynamicNavbar;e.$el.children(".page").filter((function(t,a){return!(!e.currentRoute||!e.currentRoute.modal&&!e.currentRoute.panel)||a!==e.currentPageEl})).each((function(r,n){var i=$(n),s=$(t.navbar.getElByPage(i));e.params.stackPages&&e.initialPages.indexOf(i[0])>=0?(i.addClass("stacked"),a&&s.addClass("stacked")):(e.pageCallback("beforeRemove",i,s,"previous",void 0,{}),e.removePage(i),a&&s.length&&e.removeNavbar(s))}))}function clearPreviousHistory(){appRouterCheck(this,"clearPreviousHistory");var e=this.history[this.history.length-1];clearPreviousPages(this),this.history=[e],this.view.history=[e],this.saveHistory()}var Router=function(e){function t(t,a){e.call(this,{},[void 0===a?t:a]);var r=this;r.isAppRouter=void 0===a,r.isAppRouter?Utils.extend(!1,r,{app:t,params:t.params.view,routes:t.routes||[],cache:t.cache}):Utils.extend(!1,r,{app:t,view:a,viewId:a.id,params:a.params,routes:a.routes,$el:a.$el,el:a.el,$navbarsEl:a.$navbarsEl,navbarsEl:a.navbarsEl,history:a.history,scrollHistory:a.scrollHistory,cache:t.cache,dynamicNavbar:"ios"===t.theme&&a.params.iosDynamicNavbar,initialPages:[],initialNavbars:[]}),r.useModules(),r.tempDom=doc.createElement("div"),r.allowPageChange=!0;var n={},i={};return Object.defineProperty(r,"currentRoute",{enumerable:!0,configurable:!0,set:function(e){void 0===e&&(e={}),i=Utils.extend({},n),(n=e)&&(r.url=n.url,r.emit("routeChange",e,i,r))},get:function(){return n}}),Object.defineProperty(r,"previousRoute",{enumerable:!0,configurable:!0,get:function(){return i},set:function(e){i=e}}),r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.animatableNavElements=function(e,t,a,r,n){var i,s,o=this.dynamicNavbar,l=this.params.iosAnimateNavbarBackIcon;function p(e,t){var a,r=e.hasClass("sliding")||t.hasClass("sliding"),n=e.hasClass("subnavbar"),i=!r||!n,s=e.find(".back .icon");return r&&l&&e.hasClass("left")&&s.length>0&&s.next("span").length&&(e=s.next("span"),a=!0),{$el:e,isIconLabel:a,leftOffset:e[0].f7NavbarLeftOffset,rightOffset:e[0].f7NavbarRightOffset,isSliding:r,isSubnavbar:n,needsOpacityTransition:i}}return o&&(i=[],s=[],e.children(".navbar-inner").children(".left, .right, .title, .subnavbar").each((function(t,s){var o=$(s);o.hasClass("left")&&r&&"forward"===n||o.hasClass("title")&&a||i.push(p(o,e.children(".navbar-inner")))})),t.hasClass("navbar-master")&&this.params.masterDetailBreakpoint>0&&this.app.width>=this.params.masterDetailBreakpoint||t.children(".navbar-inner").children(".left, .right, .title, .subnavbar").each((function(e,i){var o=$(i);o.hasClass("left")&&a&&!r&&"forward"===n||o.hasClass("left")&&a&&"backward"===n||o.hasClass("title")&&r||s.push(p(o,t.children(".navbar-inner")))})),[s,i].forEach((function(e){e.forEach((function(t){var a=t,r=t.isSliding,n=t.$el,o=e===s?i:s;r&&n.hasClass("title")&&o&&o.forEach((function(e){if(e.isIconLabel){var t=e.$el[0];a.leftOffset+=t&&t.offsetLeft||0}}))}))}))),{newNavEls:i,oldNavEls:s}},t.prototype.animate=function(e,t,a,r,n,i,s){var o=this;if(o.params.animateCustom)o.params.animateCustom.apply(o,[e,t,a,r,n,s]);else{var l=o.dynamicNavbar,p="ios"===o.app.theme;if(i){var c="router-transition-custom router-transition-"+i+"-"+n;return("forward"===n?t:e).animationEnd((function(){o.$el.removeClass(c),l&&o.$navbarsEl.length&&(r&&o.$navbarsEl.prepend(r),a&&o.$navbarsEl.prepend(a)),s&&s()})),l&&(r&&t&&(r.removeClass("navbar-next navbar-previous navbar-current"),t.prepend(r)),a&&e&&(a.removeClass("navbar-next navbar-previous navbar-current"),e.prepend(a))),void o.$el.addClass(c)}var d,u,h,f,m,v,g="router-transition-"+n+" router-transition";if(p&&l){o.params.masterDetailBreakpoint>0&&o.app.width>=o.params.masterDetailBreakpoint&&(a.hasClass("navbar-master")&&r.hasClass("navbar-master-detail")||a.hasClass("navbar-master-detail")&&r.hasClass("navbar-master"))||(m=a&&a.hasClass("navbar-large"),v=r&&r.hasClass("navbar-large"),h=m&&!a.hasClass("navbar-large-collapsed"),f=v&&!r.hasClass("navbar-large-collapsed"));var b=o.animatableNavElements(r,a,f,h,n);d=b.newNavEls,u=b.oldNavEls}("forward"===n?t:e).animationEnd((function(){o.dynamicNavbar&&(r&&(r.removeClass("router-navbar-transition-to-large router-navbar-transition-from-large"),r.addClass("navbar-no-title-large-transition"),Utils.nextFrame((function(){r.removeClass("navbar-no-title-large-transition")}))),a&&a.removeClass("router-navbar-transition-to-large router-navbar-transition-from-large"),r.hasClass("sliding")?r.find(".title, .left, .right, .left .icon, .subnavbar").transform(""):r.find(".sliding").transform(""),a.hasClass("sliding")?a.find(".title, .left, .right, .left .icon, .subnavbar").transform(""):a.find(".sliding").transform("")),o.$el.removeClass(g),s&&s()})),l?(y(0),Utils.nextFrame((function(){y(1),o.$el.addClass(g)}))):o.$el.addClass(g)}function y(e){p&&l&&(1===e&&(f&&(r.addClass("router-navbar-transition-to-large"),a.addClass("router-navbar-transition-to-large")),h&&(r.addClass("router-navbar-transition-from-large"),a.addClass("router-navbar-transition-from-large"))),d.forEach((function(t){var a=t.$el,r="forward"===n?t.rightOffset:t.leftOffset;t.isSliding&&(t.isSubnavbar&&v?a[0].style.setProperty("transform","translate3d("+r*(1-e)+"px, calc(-1 * var(--f7-navbar-large-collapse-progress) * var(--f7-navbar-large-title-height)), 0)","important"):a.transform("translate3d("+r*(1-e)+"px,0,0)"))})),u.forEach((function(t){var a=t.$el,r="forward"===n?t.leftOffset:t.rightOffset;t.isSliding&&(t.isSubnavbar&&m?a.transform("translate3d("+r*e+"px, calc(-1 * var(--f7-navbar-large-collapse-progress) * var(--f7-navbar-large-title-height)), 0)"):a.transform("translate3d("+r*e+"px,0,0)"))})))}},t.prototype.removeModal=function(e){this.removeEl(e)},t.prototype.removeTabContent=function(e){$(e).html("")},t.prototype.removeNavbar=function(e){this.removeEl(e)},t.prototype.removePage=function(e){var t=$(e),a=t&&t[0]&&t[0].f7Page;a&&a.route&&a.route.route&&a.route.route.keepAlive?t.remove():this.removeEl(e)},t.prototype.removeEl=function(e){if(e){var t=$(e);0!==t.length&&(t.find(".tab").each((function(e,t){$(t).children().each((function(e,t){t.f7Component&&($(t).trigger("tab:beforeremove"),t.f7Component.$destroy())}))})),t[0].f7Component&&t[0].f7Component.$destroy&&t[0].f7Component.$destroy(),this.params.removeElements&&(this.params.removeElementsWithTimeout?setTimeout((function(){t.remove()}),this.params.removeElementsTimeout):t.remove()))}},t.prototype.getPageEl=function(e){if("string"==typeof e)this.tempDom.innerHTML=e;else{if($(e).hasClass("page"))return e;this.tempDom.innerHTML="",$(this.tempDom).append(e)}return this.findElement(".page",this.tempDom)},t.prototype.findElement=function(e,t,a){var r=this.view,n=this.app,i=$(t),s=e;a&&(s+=":not(.stacked)");var o=i.find(s).filter((function(e,t){return 0===$(t).parents(".popup, .dialog, .popover, .actions-modal, .sheet-modal, .login-screen, .page").length}));return o.length>1&&("string"==typeof r.selector&&(o=i.find(r.selector+" "+s)),o.length>1&&(o=i.find("."+n.params.viewMainClass+" "+s))),1===o.length?o:(a||(o=this.findElement(s,i,!0)),o&&1===o.length?o:o&&o.length>1?$(o[0]):void 0)},t.prototype.flattenRoutes=function(e){void 0===e&&(e=this.routes);var t=this,a=[];return e.forEach((function(e){var r=!1;if("tabs"in e&&e.tabs){var n=e.tabs.map((function(t){var a=Utils.extend({},e,{path:(e.path+"/"+t.path).replace("///","/").replace("//","/"),parentPath:e.path,tab:t});return delete a.tabs,delete a.routes,a}));r=!0,a=a.concat(t.flattenRoutes(n))}if("detailRoutes"in e){var i=e.detailRoutes.map((function(t){var a=Utils.extend({},t);return a.masterRoute=e,a.masterRoutePath=e.path,a}));a=a.concat(e,t.flattenRoutes(i))}if("routes"in e){var s=e.routes.map((function(t){var a=Utils.extend({},t);return a.path=(e.path+"/"+a.path).replace("///","/").replace("//","/"),a}));a=r?a.concat(t.flattenRoutes(s)):a.concat(e,t.flattenRoutes(s))}"routes"in e||"tabs"in e&&e.tabs||"detailRoutes"in e||a.push(e)})),a},t.prototype.parseRouteUrl=function(e){if(!e)return{};var t=Utils.parseUrlQuery(e),a=e.split("#")[1],r=e.split("#")[0].split("?")[0];return{query:t,hash:a,params:{},url:e,path:r}},t.prototype.constructRouteUrl=function(e,t){void 0===t&&(t={});var a,r=t.params,n=t.query,i=e.path,s=pathToRegexp_1.compile(i);try{a=s(r||{})}catch(e){throw new Error("Framework7: error constructing route URL from passed params:\nRoute: "+i+"\n"+e.toString())}return n&&(a+="string"==typeof n?"?"+n:"?"+Utils.serializeObject(n)),a},t.prototype.findTabRoute=function(e){var t,a=$(e),r=this.currentRoute.route.parentPath,n=a.attr("id");return this.flattenRoutes(this.routes).forEach((function(e){e.parentPath===r&&e.tab&&e.tab.id===n&&(t=e)})),t},t.prototype.findRouteByKey=function(e,t){var a,r=this.routes;return this.flattenRoutes(r).forEach((function(r){a||r[e]===t&&(a=r)})),a},t.prototype.findMatchingRoute=function(e){if(e){var t,a=this.routes,r=this.flattenRoutes(a),n=this.parseRouteUrl(e),i=n.path,s=n.query,o=n.hash,l=n.params;return r.forEach((function(a){if(!t){var r,n,p=[],c=[a.path];if(a.alias&&("string"==typeof a.alias?c.push(a.alias):Array.isArray(a.alias)&&a.alias.forEach((function(e){c.push(e)}))),c.forEach((function(e){r||(r=pathToRegexp_1(e,p).exec(i))})),r)p.forEach((function(e,t){if("number"!=typeof e.name){var a=r[t+1];l[e.name]=null==a?a:decodeURIComponent(a)}})),a.parentPath&&(n=i.split("/").slice(0,a.parentPath.split("/").length-1).join("/")),t={query:s,hash:o,params:l,url:e,path:i,parentPath:n,route:a,name:a.name}}})),t}},t.prototype.replaceRequestUrlParams=function(e,t){void 0===e&&(e=""),void 0===t&&(t={});var a=e;return"string"==typeof a&&a.indexOf("{{")>=0&&t&&t.route&&t.route.params&&Object.keys(t.route.params).length&&Object.keys(t.route.params).forEach((function(e){var r=new RegExp("{{"+e+"}}","g");a=a.replace(r,t.route.params[e]||"")})),a},t.prototype.removeFromXhrCache=function(e){for(var t=this.cache.xhr,a=!1,r=0;r=0;return r.passRouteQueryToRequest&&t&&t.route&&t.route.query&&Object.keys(t.route.query).length&&(i+=(s?"&":"?")+Utils.serializeObject(t.route.query),s=!0),r.passRouteParamsToRequest&&t&&t.route&&t.route.params&&Object.keys(t.route.params).length&&(i+=(s?"&":"?")+Utils.serializeObject(t.route.params),s=!0),i.indexOf("{{")>=0&&(i=a.replaceRequestUrlParams(i,t)),r.xhrCacheIgnoreGetParameters&&i.indexOf("?")>=0&&(i=i.split("?")[0]),new Promise((function(e,s){if(r.xhrCache&&!n&&i.indexOf("nocache")<0&&r.xhrCacheIgnore.indexOf(i)<0)for(var o=0;o=200&&n.status<300||0===n.status?(r.xhrCache&&""!==n.responseText&&(a.removeFromXhrCache(i),a.cache.xhr.push({url:i,time:Utils.now(),content:n.responseText})),a.emit("routerAjaxSuccess",n,t),e(n.responseText)):(a.emit("routerAjaxError",n,t),s(n))},error:function(e){a.emit("routerAjaxError",e,t),s(e)}})}))},t.prototype.removeThemeElements=function(e){var t,a=this.app.theme;"ios"===a?t=".md-only, .aurora-only, .if-md, .if-aurora, .if-not-ios, .not-ios":"md"===a?t=".ios-only, .aurora-only, .if-ios, .if-aurora, .if-not-md, .not-md":"aurora"===a&&(t=".ios-only, .md-only, .if-ios, .if-md, .if-not-aurora, .not-aurora"),$(e).find(t).remove()},t.prototype.getPageData=function(e,t,a,r,n,i){void 0===n&&(n={});var s,o,l=$(e).eq(0),p=$(t).eq(0),c=l[0].f7Page||{};if(("next"===a&&"current"===r||"current"===a&&"previous"===r)&&(s="forward"),("current"===a&&"next"===r||"previous"===a&&"current"===r)&&(s="backward"),c&&!c.fromPage){var d=$(i);d.length&&(o=d[0].f7Page)}(o=c.pageFrom||o)&&o.pageFrom&&(o.pageFrom=null);var u={app:this.app,view:this.view,router:this,$el:l,el:l[0],$pageEl:l,pageEl:l[0],$navbarEl:p,navbarEl:p[0],name:l.attr("data-name"),position:a,from:a,to:r,direction:s,route:c.route?c.route:n,pageFrom:o};return l[0].f7Page=u,u},t.prototype.pageCallback=function(e,t,a,r,n,i,s){if(void 0===i&&(i={}),t){var o=this,l=$(t);if(l.length){var p=$(a),c=i.route,d=o.params.restoreScrollTopOnBack&&!(o.params.masterDetailBreakpoint>0&&l.hasClass("page-master")&&o.app.width>=o.params.masterDetailBreakpoint),u=l[0].f7Page&&l[0].f7Page.route&&l[0].f7Page.route.route&&l[0].f7Page.route.route.keepAlive;"beforeRemove"===e&&u&&(e="beforeUnmount");var h="page"+(e[0].toUpperCase()+e.slice(1,e.length)),f="page:"+e.toLowerCase(),m={};(m="beforeRemove"===e&&l[0].f7Page?Utils.extend(l[0].f7Page,{from:r,to:n,position:r}):o.getPageData(l[0],p[0],r,n,c,s)).swipeBack=!!i.swipeBack;var v=i.route?i.route.route:{},g=v.on;void 0===g&&(g={});var b=v.once;if(void 0===b&&(b={}),i.on&&Utils.extend(g,i.on),i.once&&Utils.extend(b,i.once),"mounted"===e&&x(),"init"===e){if(d&&("previous"===r||!r)&&"current"===n&&o.scrollHistory[m.route.url]&&!l.hasClass("no-restore-scroll")){var y=l.find(".page-content");y.length>0&&(y=y.filter((function(e,t){return 0===$(t).parents(".tab:not(.tab-active)").length&&!$(t).is(".tab:not(.tab-active)")}))),y.scrollTop(o.scrollHistory[m.route.url])}if(x(),l[0].f7PageInitialized)return l.trigger("page:reinit",m),void o.emit("pageReinit",m);l[0].f7PageInitialized=!0}if(d&&"beforeOut"===e&&"current"===r&&"previous"===n){var w=l.find(".page-content");w.length>0&&(w=w.filter((function(e,t){return 0===$(t).parents(".tab:not(.tab-active)").length&&!$(t).is(".tab:not(.tab-active)")}))),o.scrollHistory[m.route.url]=w.scrollTop()}d&&"beforeOut"===e&&"current"===r&&"next"===n&&delete o.scrollHistory[m.route.url],l.trigger(f,m),o.emit(h,m),"beforeRemove"!==e&&"beforeUnmount"!==e||(l[0].f7RouteEventsAttached&&(l[0].f7RouteEventsOn&&Object.keys(l[0].f7RouteEventsOn).forEach((function(e){l.off(Utils.eventNameToColonCase(e),l[0].f7RouteEventsOn[e])})),l[0].f7RouteEventsOnce&&Object.keys(l[0].f7RouteEventsOnce).forEach((function(e){l.off(Utils.eventNameToColonCase(e),l[0].f7RouteEventsOnce[e])})),l[0].f7RouteEventsAttached=null,l[0].f7RouteEventsOn=null,l[0].f7RouteEventsOnce=null,delete l[0].f7RouteEventsAttached,delete l[0].f7RouteEventsOn,delete l[0].f7RouteEventsOnce),u||(l[0].f7Page&&l[0].f7Page.navbarEl&&delete l[0].f7Page.navbarEl.f7Page,l[0].f7Page=null))}}function x(){l[0].f7RouteEventsAttached||(l[0].f7RouteEventsAttached=!0,g&&Object.keys(g).length>0&&(l[0].f7RouteEventsOn=g,Object.keys(g).forEach((function(e){g[e]=g[e].bind(o),l.on(Utils.eventNameToColonCase(e),g[e])}))),b&&Object.keys(b).length>0&&(l[0].f7RouteEventsOnce=b,Object.keys(b).forEach((function(e){b[e]=b[e].bind(o),l.once(Utils.eventNameToColonCase(e),b[e])}))))}},t.prototype.saveHistory=function(){this.view.history=this.history,this.params.pushState&&(win.localStorage["f7router-"+this.view.id+"-history"]=JSON.stringify(this.history))},t.prototype.restoreHistory=function(){this.params.pushState&&win.localStorage["f7router-"+this.view.id+"-history"]&&(this.history=JSON.parse(win.localStorage["f7router-"+this.view.id+"-history"]),this.view.history=this.history)},t.prototype.clearHistory=function(){this.history=[],this.view&&(this.view.history=[]),this.saveHistory()},t.prototype.updateCurrentUrl=function(e){appRouterCheck(this,"updateCurrentUrl"),this.history.length?this.history[this.history.length-1]=e:this.history.push(e);var t=this.parseRouteUrl(e),a=t.query,r=t.hash,n=t.params,i=t.url,s=t.path;if(this.currentRoute&&Utils.extend(this.currentRoute,{query:a,hash:r,params:n,url:i,path:s}),this.params.pushState){var o=this.params.pushStateRoot||"";History.replace(this.view.id,{url:e},o+this.params.pushStateSeparator+e)}this.saveHistory(),this.emit("routeUrlUpdate",this.currentRoute,this)},t.prototype.init=function(){var e=this,t=e.app,a=e.view;(a&&e.params.iosSwipeBack&&"ios"===t.theme||a&&e.params.mdSwipeBack&&"md"===t.theme||a&&e.params.auroraSwipeBack&&"aurora"===t.theme)&&SwipeBack(e);var r,n,i=e.params.url,s=doc.location.href.split(doc.location.origin)[1],o=e.params,l=o.pushState,p=o.pushStateOnLoad,c=o.pushStateSeparator,d=o.pushStateAnimateOnLoad,u=e.params.pushStateRoot;if(win.cordova&&l&&!c&&!u&&doc.location.pathname.indexOf("index.html")&&(console.warn("Framework7: wrong or not complete pushState configuration, trying to guess pushStateRoot"),u=doc.location.pathname.split("index.html")[0]),l&&p?(u&&s.indexOf(u)>=0&&""===(s=s.split(u)[1])&&(s="/"),i=c.length>0&&s.indexOf(c)>=0?s.split(c)[1]:s,e.restoreHistory(),e.history.indexOf(i)>=0?e.history=e.history.slice(0,e.history.indexOf(i)+1):e.params.url===i?e.history=[i]:History.state&&History.state[a.id]&&History.state[a.id].url===e.history[e.history.length-1]?i=e.history[e.history.length-1]:e.history=[s.split(c)[0]||"/",i],e.history.length>1?r=!0:e.history=[],e.saveHistory()):(i||(i=s),doc.location.search&&i.indexOf("?")<0&&(i+=doc.location.search),doc.location.hash&&i.indexOf("#")<0&&(i+=doc.location.hash)),e.history.length>1?(n=e.findMatchingRoute(e.history[0]))||(n=Utils.extend(e.parseRouteUrl(e.history[0]),{route:{url:e.history[0],path:e.history[0].split("?")[0]}})):(n=e.findMatchingRoute(i))||(n=Utils.extend(e.parseRouteUrl(i),{route:{url:i,path:i.split("?")[0]}})),e.params.stackPages&&e.$el.children(".page").each((function(t,a){var r=$(a);e.initialPages.push(r[0]),e.dynamicNavbar&&r.children(".navbar").length>0&&e.initialNavbars.push(r.children(".navbar")[0])})),0===e.$el.children(".page:not(.stacked)").length&&i&&e.params.loadInitialPage)e.navigate(i,{initial:!0,reloadCurrent:!0,pushState:!1});else if(e.$el.children(".page:not(.stacked)").length){var h;e.currentRoute=n,e.$el.children(".page:not(.stacked)").each((function(t,r){var n,i=$(r);i.addClass("page-current"),e.dynamicNavbar&&((n=i.children(".navbar")).length>0?(e.$navbarsEl.parents(doc).length||e.$el.prepend(e.$navbarsEl),n.addClass("navbar-current"),e.$navbarsEl.append(n),n.children(".title-large").length&&n.addClass("navbar-large"),i.children(".navbar").remove()):(e.$navbarsEl.addClass("navbar-hidden"),n.children(".title-large").length&&e.$navbarsEl.addClass("navbar-hidden navbar-large-hidden"))),e.currentRoute&&e.currentRoute.route&&e.currentRoute.route.master&&e.params.masterDetailBreakpoint>0&&(i.addClass("page-master"),i.trigger("page:role",{role:"master"}),n&&n.length&&n.addClass("navbar-master"),a.checkMasterDetailBreakpoint());var s={route:e.currentRoute};e.currentRoute&&e.currentRoute.route&&e.currentRoute.route.options&&Utils.extend(s,e.currentRoute.route.options),e.currentPageEl=i[0],e.dynamicNavbar&&n.length&&(e.currentNavbarEl=n[0]),e.removeThemeElements(i),e.dynamicNavbar&&n.length&&e.removeThemeElements(n),s.route.route.tab&&(h=!0,e.tabLoad(s.route.route.tab,Utils.extend({},s))),e.pageCallback("init",i,n,"current",void 0,s)})),r&&e.navigate(i,{initial:!0,pushState:!1,history:!1,animate:d,once:{pageAfterIn:function(){(e.params.preloadPreviousPage||e.params[t.theme+"SwipeBack"])&&e.history.length>2&&e.back({preload:!0})}}}),r||h||(e.history.push(i),e.saveHistory())}!(i&&l&&p)||History.state&&History.state[a.id]||History.initViewState(a.id,{url:i}),e.emit("local::init routerInit",e)},t.prototype.destroy=function(){var e=this;e.emit("local::destroy routerDestroy",e),Object.keys(e).forEach((function(t){e[t]=null,delete e[t]})),e=null},t}(Framework7Class);Router.prototype.forward=forward,Router.prototype.load=load,Router.prototype.navigate=navigate,Router.prototype.refreshPage=refreshPage,Router.prototype.tabLoad=tabLoad,Router.prototype.tabRemove=tabRemove,Router.prototype.modalLoad=modalLoad,Router.prototype.modalRemove=modalRemove,Router.prototype.backward=backward,Router.prototype.loadBack=loadBack,Router.prototype.back=back,Router.prototype.clearPreviousHistory=clearPreviousHistory;var RouterModule={name:"router",static:{Router:Router},instance:{cache:{xhr:[],templates:[],components:[]}},create:function(){this.app?this.params.router&&(this.router=new Router(this.app,this)):this.router=new Router(this)}},View=function(e){function t(t,a,r){void 0===r&&(r={}),e.call(this,r,[t]);var n,i,s,o=t,l=$(a),p=this;return p.params=Utils.extend({routes:[],routesAdd:[]},o.params.view,r),p.params.routes.length>0?p.routes=p.params.routes:p.routes=[].concat(o.routes,p.params.routesAdd),n="string"==typeof a?a:(l.attr("id")?"#"+l.attr("id"):"")+(l.attr("class")?"."+l.attr("class").replace(/ /g,".").replace(".active",""):""),"ios"===o.theme&&p.params.iosDynamicNavbar&&0===(i=l.children(".navbars").eq(0)).length&&(i=$('')),Utils.extend(!1,p,{app:o,$el:l,el:l[0],name:p.params.name,main:p.params.main||l.hasClass("view-main"),$navbarsEl:i,navbarsEl:i?i[0]:void 0,selector:n,history:[],scrollHistory:{}}),l[0].f7View=p,p.useModules(),o.views.push(p),p.main&&(o.views.main=p),p.name&&(o.views[p.name]=p),p.index=o.views.indexOf(p),s=p.name?"view_"+p.name:p.main?"view_main":"view_"+p.index,p.id=s,o.initialized?p.init():o.on("init",(function(){p.init()})),p}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.destroy=function(){var e=this,t=e.app;e.$el.trigger("view:beforedestroy"),e.emit("local::beforeDestroy viewBeforeDestroy",e),t.off("resize",e.checkMasterDetailBreakpoint),e.main?(t.views.main=null,delete t.views.main):e.name&&(t.views[e.name]=null,delete t.views[e.name]),e.$el[0].f7View=null,delete e.$el[0].f7View,t.views.splice(t.views.indexOf(e),1),e.params.router&&e.router&&e.router.destroy(),e.emit("local::destroy viewDestroy",e),Object.keys(e).forEach((function(t){e[t]=null,delete e[t]})),e=null},t.prototype.checkMasterDetailBreakpoint=function(e){var t=this.app,a=this.$el.hasClass("view-master-detail"),r=t.width>=this.params.masterDetailBreakpoint&&this.$el.children(".page-master").length;void 0===e&&r||!0===e?(this.$el.addClass("view-master-detail"),a||(this.emit("local::masterDetailBreakpoint viewMasterDetailBreakpoint",this),this.$el.trigger("view:masterDetailBreakpoint"))):(this.$el.removeClass("view-master-detail"),a&&(this.emit("local::masterDetailBreakpoint viewMasterDetailBreakpoint",this),this.$el.trigger("view:masterDetailBreakpoint")))},t.prototype.initMasterDetail=function(){var e=this.app;this.checkMasterDetailBreakpoint=this.checkMasterDetailBreakpoint.bind(this),this.checkMasterDetailBreakpoint(),e.on("resize",this.checkMasterDetailBreakpoint)},t.prototype.init=function(){this.params.router&&(this.params.masterDetailBreakpoint>0&&this.initMasterDetail(),this.router.init(),this.$el.trigger("view:init"),this.emit("local::init viewInit",this))},t}(Framework7Class);function initClicks(e){e.on("click",(function(t){var a=$(t.target),r=a.closest("a"),n=r.length>0,i=n&&r.attr("href");if(n&&(r.is(e.params.clicks.externalLinks)||i&&i.indexOf("javascript:")>=0)){var s=r.attr("target");i&&win.cordova&&win.cordova.InAppBrowser&&("_system"===s||"_blank"===s)&&(t.preventDefault(),win.cordova.InAppBrowser.open(i,s))}else{Object.keys(e.modules).forEach((function(r){var n=e.modules[r].clicks;n&&(t.preventF7Router||Object.keys(n).forEach((function(r){var i=a.closest(r).eq(0);i.length>0&&n[r].call(e,i,i.dataset(),t)})))}));var o={};if(n&&(t.preventDefault(),o=r.dataset()),!t.preventF7Router)if(!r.hasClass("prevent-router")&&!r.hasClass("router-prevent"))if(i&&i.length>0&&"#"!==i[0]||r.hasClass("back")){var l;if(o.view&&"current"===o.view?l=e.views.current:o.view?l=$(o.view)[0].f7View:(l=a.parents(".view")[0]&&a.parents(".view")[0].f7View,!r.hasClass("back")&&l&&l.params.linksView&&("string"==typeof l.params.linksView?l=$(l.params.linksView)[0].f7View:l.params.linksView instanceof View&&(l=l.params.linksView))),l||e.views.main&&(l=e.views.main),!l||!l.router)return;if(o.context&&"string"==typeof o.context)try{o.context=JSON.parse(o.context)}catch(e){}r[0].f7RouteProps&&(o.props=r[0].f7RouteProps),r.hasClass("back")?l.router.back(i,o):l.router.navigate(i,o)}}}))}View.use(RouterModule);var ClicksModule={name:"clicks",params:{clicks:{externalLinks:".external"}},on:{init:function(){initClicks(this)}}},RouterTemplateLoaderModule={name:"routerTemplateLoader",proto:{templateLoader:function(e,t,a,r,n){var i=this;function s(e){var t,s;try{if("function"==typeof(s=a.context||{}))s=s.call(i);else if("string"==typeof s)try{s=JSON.parse(s)}catch(e){throw n(),e}t="function"==typeof e?e(s):Template7.compile(e)(Utils.extend({},s||{},{$app:i.app,$root:Utils.extend({},i.app.data,i.app.methods),$route:a.route,$f7route:a.route,$router:i,$f7router:i,$theme:{ios:"ios"===i.app.theme,md:"md"===i.app.theme,aurora:"aurora"===i.app.theme}}))}catch(e){throw n(),e}r(t,{context:s})}t?(i.xhr&&(i.xhr.abort(),i.xhr=!1),i.xhrRequest(t,a).then((function(e){s(e)})).catch((function(){n()}))):s(e)},modalTemplateLoader:function(e,t,a,r,n){return this.templateLoader(e,t,a,(function(e){r(e)}),n)},tabTemplateLoader:function(e,t,a,r,n){return this.templateLoader(e,t,a,(function(e){r(e)}),n)},pageTemplateLoader:function(e,t,a,r,n){var i=this;return i.templateLoader(e,t,a,(function(e,t){void 0===t&&(t={}),r(i.getPageEl(e),t)}),n)}}},RouterComponentLoaderModule={name:"routerComponentLoader",proto:{componentLoader:function(e,t,a,r,n){void 0===a&&(a={});var i,s=this,o=s.app,l="string"==typeof e?e:t,p=s.replaceRequestUrlParams(l,a);function c(e){var t=a.context||{};if("function"==typeof t)t=t.call(s);else if("string"==typeof t)try{t=JSON.parse(t)}catch(e){throw n(),e}var i=Utils.merge({},t,{$route:a.route,$f7route:a.route,$router:s,$f7router:s,$theme:{ios:"ios"===o.theme,md:"md"===o.theme,aurora:"aurora"===o.theme}});o.component.create(e,i).then((function(e){r(e.el)})).catch((function(e){throw n(),new Error(e)}))}p&&s.params.componentCache&&s.cache.components.forEach((function(e){e.url===p&&(i=e.component)})),p&&i?c(i):p&&!i?(s.xhr&&(s.xhr.abort(),s.xhr=!1),s.xhrRequest(l,a).then((function(e){var t=o.component.parse(e);s.params.componentCache&&s.cache.components.push({url:p,component:t}),c(t)})).catch((function(e){throw n(),e}))):c(e)},modalComponentLoader:function(e,t,a,r,n,i){this.componentLoader(t,a,r,(function(e){n(e)}),i)},tabComponentLoader:function(e,t,a,r,n,i){this.componentLoader(t,a,r,(function(e){n(e)}),i)},pageComponentLoader:function(e,t,a,r,n,i){this.componentLoader(t,a,r,(function(e,t){void 0===t&&(t={}),n(e,t)}),i)}}};function vnode(e,t,a,r,n){return{sel:e,data:t,children:a,text:r,elm:n,key:void 0===t?void 0:t.key}}var array=Array.isArray;function primitive(e){return"string"==typeof e||"number"==typeof e}function addNS(e,t,a){if(e.ns="http://www.w3.org/2000/svg","foreignObject"!==a&&void 0!==t)for(var r=0;r0&&customComponents[n];if(d&&(s.push((function(a){(a.sel===n||c)&&createCustomComponent({app:t,vnode:a,tagName:n,data:e})})),o.push((function(e){destroyCustomComponent(e)})),l.push((function(e,t){updateCustomComponent(t)}))),!d){if(!e||!e.attrs||!e.attrs.class)return i;e.attrs.class.split(" ").forEach((function(e){a||s.push.apply(s,t.getVnodeHooks("insert",e)),o.push.apply(o,t.getVnodeHooks("destroy",e)),l.push.apply(l,t.getVnodeHooks("update",e)),p.push.apply(p,t.getVnodeHooks("postpatch",e))}))}return r&&!a&&p.push((function(e,t){var a=t||e;a&&a.data&&a.data.context&&a.data.context.$options.updated&&a.data.context.$hook("updated")})),0===s.length&&0===o.length&&0===l.length&&0===p.length?i:(s.length&&(i.insert=function(e){s.forEach((function(t){return t(e)}))}),o.length&&(i.destroy=function(e){o.forEach((function(t){return t(e)}))}),l.length&&(i.update=function(e,t){l.forEach((function(a){return a(e,t)}))}),p.length&&(i.postpatch=function(e,t){p.forEach((function(a){return a(e,t)}))}),i)}function getEventHandler(e,t,a){void 0===a&&(a={});var r,n,i=a.stop,s=a.prevent,o=a.once,l=!1,p=[],c=!0;if((r=e.indexOf("(")<0?e:e.split("(")[0]).indexOf(".")>=0)r.split(".").forEach((function(e,a){if(0!==a||"this"!==e){if(0===a&&"window"===e)return n=win,void(c=!1);if(n||(n=t),!n[e])throw new Error("Framework7: Component doesn't have method \""+r.split(".").slice(0,a+1).join(".")+'"');n=n[e]}}));else{if(!t[r])throw new Error("Framework7: Component doesn't have method \""+r+'"');n=t[r]}return c&&(n=n.bind(t)),function(){for(var a=[],r=arguments.length;r--;)a[r]=arguments[r];var c=a[0];if(!o||!l){if(i&&c.stopPropagation(),s&&c.preventDefault(),l=!0,e.indexOf("(")<0)p=a;else e.split("(")[1].split(")")[0].replace(/'[^']*'|"[^"]*"/g,(function(e){return e.replace(/,/g,"<_comma_>")})).split(",").map((function(e){return e.replace(/<_comma_>/g,",")})).forEach((function(e){var a=e.trim();if(isNaN(a))if("true"===a)a=!0;else if("false"===a)a=!1;else if("null"===a)a=null;else if("undefined"===a)a=void 0;else if('"'===a[0])a=a.replace(/"/g,"");else if("'"===a[0])a=a.replace(/'/g,"");else if(a.indexOf(".")>0){var r;a.split(".").forEach((function(e){r||(r=t),r=r[e]})),a=r}else a=t[a];else a=parseFloat(a);p.push(a)}));n.apply(void 0,p)}}}function getData(e,t,a,r,n,i){var s={context:t},o=e.attributes;Array.prototype.forEach.call(o,(function(e){var a=e.name,r=e.value;if(propsAttrs.indexOf(a)>=0)s.props||(s.props={}),"readonly"===a&&(a="readOnly"),booleanProps.indexOf(a)>=0?s.props[a]=!1!==r:s.props[a]=r;else if("key"===a)s.key=r;else if(0===a.indexOf("@")){s.on||(s.on={});var i=a.substr(1),o=!1,l=!1,p=!1;i.indexOf(".")>=0&&i.split(".").forEach((function(e,t){0===t?i=e:("stop"===e&&(o=!0),"prevent"===e&&(l=!0),"once"===e&&(p=!0))})),s.on[i]=getEventHandler(r,t,{stop:o,prevent:l,once:p})}else if("style"===a)if(r.indexOf("{")>=0&&r.indexOf("}")>=0)try{s.style=JSON.parse(r)}catch(e){s.attrs||(s.attrs={}),s.attrs.style=r}else s.attrs||(s.attrs={}),s.attrs.style=r;else s.attrs||(s.attrs={}),s.attrs[a]=r,"id"!==a||s.key||n||(s.key=r)})),n&&t&&t.$id&&t.$style&&t.$styleScoped&&(s.attrs||(s.attrs={}),s.attrs["data-f7-"+t.$id]="");var l=getHooks(s,a,r,n,i);return l.prepatch=function(e,t){e&&t&&e&&e.data&&e.data.props&&Object.keys(e.data.props).forEach((function(a){booleanProps.indexOf(a)<0||(t.data||(t.data={}),t.data.props||(t.data.props={}),!0!==e.data.props[a]||a in t.data.props||(t.data.props[a]=!1))}))},l&&(s.hook=l),s}function getChildren(e,t,a,r){for(var n=[],i=e.childNodes,s=0;s=0?[]:getChildren(e,t,a,r))}function vdom(e,t,a){void 0===e&&(e="");var r,n=e.trim(),i=tempDomDIV;0===n.indexOf("0?l:o.length,u=c>0?c:o.length,h=-1!==l||-1!==c?o.slice(0,Math.min(d,u)):o,f=e.elm=isDef(r)&&isDef(a=r.ns)?i.createElementNS(a,h):i.createElement(h);for(d0&&f.setAttribute("class",o.slice(u+1).replace(/\./g," ")),a=0;af?c(e,null==a[g+1]?null:a[g+1].elm,a,d,g,r):u(e,t,l,f))}(o,l,d,a):isDef(d)?(isDef(e.text)&&i.setTextContent(o,""),c(o,null,d,0,d.length-1,a)):isDef(l)?u(o,l,0,l.length-1):isDef(e.text)&&i.setTextContent(o,""):e.text!==t.text&&i.setTextContent(o,t.text),isDef(s)&&isDef(r=s.postpatch)&&r(e,t)}}return function(e,t){var a,r,s,l=[];for(a=0;a0;)a[r]=arguments[r+1];handleEvent(t,a,e.vnode)}}function updateEvents(e,t){var a=e.data.on,r=e.listener,n=e.elm,i=t&&t.data.on,s=t&&t.elm;if(a!==i&&(a&&r&&(i?Object.keys(a).forEach((function(e){i[e]||$(n).off(e,r)})):Object.keys(a).forEach((function(e){$(n).off(e,r)}))),i)){var o=e.listener||createListener();t.listener=o,o.vnode=t,a?Object.keys(i).forEach((function(e){a[e]||$(s).on(e,o)})):Object.keys(i).forEach((function(e){$(s).on(e,o)}))}}var eventListenersModule={create:updateEvents,update:updateEvents,destroy:updateEvents},patch=init([attributesModule,propsModule,styleModule,eventListenersModule]),componentMixins={},Component=function(e,t,a,r){void 0===t&&(t={}),void 0===a&&(a={});var n=Utils.id(),i=this;Utils.merge(i,{$props:{}},a,{$:$,$$:$,$dom7:$,$app:e,$f7:e,$options:Utils.extend({id:n},t),$id:t.isClassComponent?i.constructor.id:t.id||n,$mixins:t.isClassComponent?i.constructor.mixins:t.mixins,$children:r||[]});var s=i.$options;if(i.$mixins&&i.$mixins.length)for(var o=i.$mixins.length-1;o>=0;o-=1){var l=i.$mixins[o];"string"==typeof l&&(componentMixins[l]?i.$mixins[o]=componentMixins[l]:i.$mixins.splice(o,1))}Object.defineProperty(i,"$slots",{enumerable:!0,configurable:!0,get:function(){var e={};return i.$children.forEach((function(t){var a="default";t.data&&(a=t.data.attrs&&t.data.attrs.slot||"default"),e[a]||(e[a]=[]),e[a].push(t)})),e}}),Object.defineProperty(i,"$root",{enumerable:!0,configurable:!0,get:function(){var t=Utils.merge({},e.data,e.methods);return win&&win.Proxy&&(t=new win.Proxy(t,{set:function(t,a,r){e.data[a]=r},deleteProperty:function(t,a){delete e.data[a],delete e.methods[a]},has:function(t,a){return a in e.data||a in e.methods}})),t},set:function(){}}),s.render&&(s.render=s.render.bind(i));var p={};return i.$mixins&&i.$mixins.length&&i.$mixins.forEach((function(e){e.methods&&Object.assign(p,e.methods)})),s.methods&&Object.assign(p,s.methods),Object.keys(p).forEach((function(e){i[e]=p[e].bind(i)})),s.on&&Object.keys(s.on).forEach((function(e){s.on[e]=s.on[e].bind(i)})),s.once&&Object.keys(s.once).forEach((function(e){s.once[e]=s.once[e].bind(i)})),i.$style=s.isClassComponent?i.constructor.style:s.style,i.$styleScoped=s.isClassComponent?i.constructor.styleScoped:s.styleScoped,i.__updateQueue=[],new Promise((function(e,t){i.$hook("data",!0).then((function(t){var a={};t.forEach((function(e){Object.assign(a,e||{})})),Utils.extend(i,a),i.$hook("beforeCreate");var r=i.$render();if(i.$options.el)return r=r.trim(),i.$vnode=vdom(r,i,!0),i.$style&&(i.$styleEl=doc.createElement("style"),i.$styleEl.innerHTML=i.$style),i.el=i.$options.el,patch(i.el,i.$vnode),i.el=i.$vnode.elm,i.$el=$(i.el),i.$attachEvents(),i.el.f7Component=i,i.$hook("created"),i.$mount(),void e(i);r&&"string"==typeof r?(r=r.trim(),i.$vnode=vdom(r,i,!0),i.el=doc.createElement(i.$vnode.sel||"div"),patch(i.el,i.$vnode),i.$el=$(i.el)):r&&(i.el=r,i.$el=$(i.el)),i.$style&&(i.$styleEl=doc.createElement("style"),i.$styleEl.innerHTML=i.$style),i.$attachEvents(),i.el&&(i.el.f7Component=i),i.$hook("created"),e(i)})).catch((function(e){t(e)}))}))};function parseComponent(e){var t,a=Utils.id(),r="f7_component_create_callback_"+a,n="f7_component_render_callback_"+a,i=e.match(//),s=i[2]||"t7";i&&(t=e.split(//).filter((function(e,t){return t>0})).join("").filter((function(e,t,a){return t").replace(/{{#raw}}([ \n]*)