/** * Framework7 5.7.14 * Full featured mobile HTML framework for building iOS & Android apps * https://framework7.io/ * * Copyright 2014-2020 Vladimir Kharlampidi * * Released under the MIT License * * Released on: November 9, 2020 */ !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,r,a,n=Template7Utils.quoteDoubleRexExp,o=Template7Utils.quoteSingleRexExp,i=e.replace(/[{}#}]/g,"").trim().split(" "),s=[];for(r=0;r=0){t=a,s.push(l);break}t&&(r=t)}else if(l.indexOf("=")>0){var p=l.split("="),d=p[0],h=p[1];if(c||(c=0===h.indexOf('"')?n:o,u=0===h.indexOf('"')?'"':"'"),2!==h.match(c).length){for(t=0,a=r+1;a=0){t=a;break}t&&(r=t)}var f=[d,h.replace(c,"")];s.push(f)}else s.push(l)}return s},stringToBlocks:function(e){var t,r,a=[];if(!e)return[];var n=e.split(/({{[^{^}]*}})/);for(t=0;t=0)continue;if((o=o.replace(/{{([#/])*([ ])*/,"{{$1").replace(/([ ])*}}/,"}}")).indexOf("{#")<0&&o.indexOf(" ")<0&&o.indexOf("else")<0){a.push({type:"variable",contextName:o.replace(/[{}]/g,"")});continue}var i=Template7Utils.helperToSlices(o),s=i[0],l=">"===s,c=[],u={};for(r=1;r=0){var d="",h="",f=0,v=void 0,m=!1,g=!1,b=0;for(r=t+1;r=0&&(b+=1),n[r].indexOf("{{/")>=0&&(b-=1),n[r].indexOf("{{#"+s)>=0)d+=n[r],g&&(h+=n[r]),f+=1;else if(n[r].indexOf("{{/"+s)>=0){if(!(f>0)){v=r,m=!0;break}f-=1,d+=n[r],g&&(h+=n[r])}else n[r].indexOf("else")>=0&&0===b?g=!0:(g||(d+=n[r]),g&&(h+=n[r]));m&&(v&&(t=v),"raw"===s?a.push({type:"plain",content:d}):a.push({type:"helper",helperName:s,contextName:c,content:d,inverseContent:h,hash:u}))}else o.indexOf(" ")>0&&(l&&(s="_partial",c[0]&&(0===c[0].indexOf("[")?c[0]=c[0].replace(/[[\]]/g,""):c[0]='"'+c[0].replace(/"|'/g,"")+'"')),a.push({type:"helper",helperName:s,contextName:c,hash:u}))}}return a},parseJsVariable:function(e,t,r){return e.split(/([+ \-*/^()&=|<>!%:?])/g).reduce((function(e,a){if(!a)return e;if(a.indexOf(t)<0)return e.push(a),e;if(!r)return e.push(JSON.stringify("")),e;var n=r;return a.indexOf(t+".")>=0&&a.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,r){if(!r)return e;if(r.indexOf("../")<0)return e.push(r),e;if(!t||0===t.length)return e.push(JSON.stringify("")),e;var a=r.split("../").length-1,n=a>t.length?t[t.length-1]:t[a-1];return r.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,r){void 0===r&&(r="data_1");var a,n,o=t,i=0;0===e.indexOf("../")?(i=e.split("../").length-1,n=o.split("_")[1]-i,o="ctx_"+(n>=1?n:1),a=e.split("../")[i].split(".")):0===e.indexOf("@global")?(o="Template7.global",a=e.split("@global.")[1].split(".")):0===e.indexOf("@root")?(o="root",a=e.split("@root.")[1].split(".")):a=e.split(".");for(var s=0;s0&&(c=n),s>0?o+="[(data_"+c+" && data_"+c+"."+l.replace("@","")+")]":o="(data_"+c+" && data_"+c+"."+l.replace("@","")+")"}else(Number.isFinite?Number.isFinite(l):Template7Context.isFinite(l))?o+="["+l+"]":"this"===l||l.indexOf("this.")>=0||l.indexOf("this[")>=0||l.indexOf("this(")>=0?o=l.replace("this",t):o+="."+l}return o},getCompiledArguments:function(e,t,r){for(var a=[],n=0;n0?a:t.inverse(this)},with:function(e,t){var r=e;return Template7Utils.isFunction(r)&&(r=e.call(this)),t.fn(r)},join:function(e,t){var r=e;return Template7Utils.isFunction(r)&&(r=r.call(this)),r.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"),r=new RegExp("@"+e,"g");execute=execute.replace(t,JSON.stringify(data[e])).replace(r,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"),r=new RegExp("@"+e,"g");execute=execute.replace(t,JSON.stringify(data[e])).replace(r,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 r=e[0],a=e[1];if(2===e.length){var n=new Template7Class(r),o=n.compile()(a);return n=null,o}return new Template7Class(r)}function isObject(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function extend(e,t){void 0===e&&(e={}),void 0===t&&(t={}),Object.keys(t).forEach((function(r){void 0===e[r]?e[r]=t[r]:isObject(t[r])&&isObject(e[r])&&Object.keys(t[r]).length>0&&extend(e[r],t[r])}))}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,r){return e.content?t.compile(e.content,r):function(){return""}}function getCompileInverse(e,r){return e.inverseContent?t.compile(e.inverseContent,r):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?document:{},ssrDocument={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[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};extend(doc,ssrDocument);var win="undefined"!=typeof window?window:{},ssrWindow={document:ssrDocument,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}}};extend(win,ssrWindow);var Dom7=function(e){for(var t=0;t=0&&i.indexOf(">")>=0){var s="div";for(0===i.indexOf(":~]/)?(t||doc).querySelectorAll(e.trim()):[doc.getElementById(e.trim().split("#")[1])],a=0;a0&&e[0].nodeType)for(a=0;a=0&&(t[toCamelCase(n.name.split("data-")[1])]=n.value)}for(var o in t)"false"===t[o]?t[o]=!1:"true"===t[o]?t[o]=!0:parseFloat(t[o])===1*t[o]&&(t[o]*=1);return t}}function val(e){if(void 0!==e){for(var t=0;t=0;else r.value=e}return this}if(this[0]){if(this[0].multiple&&"select"===this[0].nodeName.toLowerCase()){for(var n=[],o=0;o=0;h-=1){var f=d[h];o&&f.listener===o||o&&f.listener&&f.listener.dom7proxy&&f.listener.dom7proxy===o?(p.removeEventListener(c,f.proxyListener,i),d.splice(h,1)):o||(p.removeEventListener(c,f.proxyListener,i),d.splice(h,1))}}return this}function once(){for(var e,t=[],r=arguments.length;r--;)t[r]=arguments[r];var a=this,n=t[0],o=t[1],i=t[2],s=t[3];function l(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];i.apply(this,e),a.off(n,o,l,s),l.dom7proxy&&delete l.dom7proxy}return"function"==typeof t[1]&&(n=(e=t)[0],i=e[1],s=e[2],o=void 0),l.dom7proxy=i,a.on(n,o,l,s)}function trigger(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var r=e[0].split(" "),a=e[1],n=0;n0})),s.dispatchEvent(l),s.dom7EventData=[],delete s.dom7EventData}return this}function transitionEnd(e){var t,r=["webkitTransitionEnd","transitionend"],a=this;function n(o){if(o.target===this)for(e.call(this,o),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(),r=doc.body,a=e.clientTop||r.clientTop||0,n=e.clientLeft||r.clientLeft||0,o=e===win?win.scrollY:e.scrollTop,i=e===win?win.scrollX:e.scrollLeft;return{top:t.top+o-a,left:t.left+i-n}}return null}function hide(){for(var e=0;er-1?[]:e<0?(t=r+e)<0?[]:[this[t]]:[this[e]])}function append(){for(var e,t=[],r=arguments.length;r--;)t[r]=arguments[r];for(var a=0;a=0;r-=1)this[t].insertBefore(a.childNodes[r],this[t].childNodes[0])}else if(e instanceof Dom7)for(r=0;r1)for(var a=0;a1)for(var a=0;a0?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=[],r=this[0];if(!r)return new Dom7([]);for(;r.nextElementSibling;){var a=r.nextElementSibling;e?$(a).is(e)&&t.push(a):t.push(a),r=a}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=[],r=this[0];if(!r)return new Dom7([]);for(;r.previousElementSibling;){var a=r.previousElementSibling;e?$(a).is(e)&&t.push(a):t.push(a),r=a}return new Dom7(t)}function siblings(e){return this.nextAll(e).add(this.prevAll(e))}function parent(e){for(var t=[],r=0;r0||0===n,v=a>0||0===a;if(void 0===i&&(i="swing"),f&&(e=h.scrollTop,o||(h.scrollTop=n)),v&&(t=h.scrollLeft,o||(h.scrollLeft=a)),o){f&&(r=h.scrollHeight-h.offsetHeight,c=Math.max(Math.min(n,r),0)),v&&(l=h.scrollWidth-h.offsetWidth,u=Math.max(Math.min(a,l),0));var m=null;f&&c===e&&(f=!1),v&&u===t&&(v=!1),requestAnimationFrame((function r(a){void 0===a&&(a=(new Date).getTime()),null===m&&(m=a);var n,l=Math.max(Math.min((a-m)/o,1),0),g="linear"===i?l:.5-Math.cos(l*Math.PI)/2;f&&(p=e+g*(c-e)),v&&(d=t+g*(u-t)),f&&c>e&&p>=c&&(h.scrollTop=c,n=!0),f&&ct&&d>=u&&(h.scrollLeft=u,n=!0),v&&u0?s[0].scrollTop:null:s.scrollTo(void 0,a,n,o,i)}function scrollLeft(){for(var e,t=[],r=arguments.length;r--;)t[r]=arguments[r];var a=t[0],n=t[1],o=t[2],i=t[3];3===t.length&&"function"==typeof o&&(a=(e=t)[0],n=e[1],i=e[2],o=e[3]);var s=this;return void 0===a?s.length>0?s[0].scrollLeft:null:s.scrollTo(a,void 0,n,o,i)}var Scroll=Object.freeze({scrollTo:scrollTo,scrollTop:scrollTop,scrollLeft:scrollLeft});function animate(e,t){var r,a=this,n={props:Object.assign({},e),params:Object.assign({duration:300,easing:"swing"},t),elements:a,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(a),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 r=[];n.elements.each((function(t,a){var o,i,s,l,c;a.dom7AnimateInstance||(n.elements[t].dom7AnimateInstance=n),r[t]={container:a},Object.keys(e).forEach((function(n){o=win.getComputedStyle(a,null).getPropertyValue(n).replace(",","."),i=parseFloat(o),s=o.replace(i,""),l=parseFloat(e[n]),c=e[n]+s,r[t][n]={initialFullValue:o,initialValue:i,unit:s,finalValue:l,finalFullValue:c,currentValue:i}}))}));var o,i,s=null,l=0,c=0,u=!1;return n.animating=!0,n.frameId=requestAnimationFrame((function p(){var d,h;o=(new Date).getTime(),u||(u=!0,t.begin&&t.begin(a)),null===s&&(s=o),t.progress&&t.progress(a,Math.max(Math.min((o-s)/t.duration,1),0),s+t.duration-o<0?0:s+t.duration-o,s),r.forEach((function(a){var u=a;i||u.done||Object.keys(e).forEach((function(a){if(!i&&!u.done){d=Math.max(Math.min((o-s)/t.duration,1),0),h=n.easingProgress(t.easing,d);var p=u[a],f=p.initialValue,v=p.finalValue,m=p.unit;u[a].currentValue=f+h*(v-f);var g=u[a].currentValue;(v>f&&g>=v||v0;)r[a]=arguments[a+1];if(void 0===r[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,r){return e.match(/[A-Z]/)&&0!==r&&!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,r,a,n,o={},i=e||win.location.href;if("string"==typeof i&&i.length)for(n=(r=(i=i.indexOf("?")>-1?i.replace(/\S*\?/,""):"").split("&").filter((function(e){return""!==e}))).length,t=0;t6&&(a=a.split(", ").map((function(e){return e.replace(",",".")})).join(", ")),n=new win.WebKitCSSMatrix("none"===a?"":a)):r=(n=o.MozTransform||o.OTransform||o.MsTransform||o.msTransform||o.transform||o.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===t&&(a=win.WebKitCSSMatrix?n.m41:16===r.length?parseFloat(r[12]):parseFloat(r[4])),"y"===t&&(a=win.WebKitCSSMatrix?n.m42:16===r.length?parseFloat(r[13]):parseFloat(r[5])),a||0},serializeObject:function(e,t){if(void 0===t&&(t=[]),"string"==typeof e)return e;var r,a=[];function n(e){if(t.length>0){for(var r="",a=0;a0?2*o/a.b:a.s,[a.h,a.s,a.b]},colorThemeCSSProperties:function(){for(var e,t,r=[],a=arguments.length;a--;)r[a]=arguments[a];if(1===r.length?(e=r[0],t=Utils.colorHexToRgb(e)):3===r.length&&(t=r,e=Utils.colorRgbToHex.apply(Utils,t)),!t)return{};var n=Utils.colorRgbToHsl.apply(Utils,t),o=[n[0],n[1],Math.max(0,n[2]-.08)],i=[n[0],n[1],Math.max(0,n[2]+.08)],s=Utils.colorRgbToHex.apply(Utils,Utils.colorHslToRgb.apply(Utils,o)),l=Utils.colorRgbToHex.apply(Utils,Utils.colorHslToRgb.apply(Utils,i));return{"--f7-theme-color":e,"--f7-theme-color-rgb":t.join(", "),"--f7-theme-color-shade":s,"--f7-theme-color-tint":l}}},Support={touch:!!("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,r={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,nwjs:!1},a=win.screen.width,n=win.screen.height,o=t.match(/(Android);?[\s\/]+([\d.]+)?/),i=t.match(/(iPad).*OS\s([\d_]+)/),s=t.match(/(iPod)(.*OS\s([\d_]+))?/),l=!i&&t.match(/(iPhone\sOS|iOS)\s([\d_]+)/),c=t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0,u=t.indexOf("Edge/")>=0,p=t.indexOf("Gecko/")>=0&&t.indexOf("Firefox/")>=0,d="Win32"===e,h=t.toLowerCase().indexOf("electron")>=0,f="undefined"!=typeof nw&&"undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.nw,v="MacIntel"===e;!i&&v&&Support.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(a+"x"+n)>=0&&((i=t.match(/(Version)\/([\d.]+)/))||(i=[0,1,"13_0_0"]),v=!1),r.ie=c,r.edge=u,r.firefox=p,o&&!d&&(r.os="android",r.osVersion=o[2],r.android=!0,r.androidChrome=t.toLowerCase().indexOf("chrome")>=0),(i||l||s)&&(r.os="ios",r.ios=!0),l&&!s&&(r.osVersion=l[2].replace(/_/g,"."),r.iphone=!0),i&&(r.osVersion=i[2].replace(/_/g,"."),r.ipad=!0),s&&(r.osVersion=s[3]?s[3].replace(/_/g,"."):null,r.ipod=!0),r.ios&&r.osVersion&&t.indexOf("Version/")>=0&&"10"===r.osVersion.split(".")[0]&&(r.osVersion=t.toLowerCase().split("version/")[1].split(" ")[0]),r.webView=!(!(l||i||s)||!t.match(/.*AppleWebKit(?!.*Safari)/i)&&!win.navigator.standalone)||win.matchMedia&&win.matchMedia("(display-mode: standalone)").matches,r.webview=r.webView,r.standalone=r.webView,r.desktop=!(r.ios||r.android)||h||f,r.desktop&&(r.electron=h,r.nwjs=f,r.macos=v,r.windows=d,r.macos&&(r.os="macos"),r.windows&&(r.os="windows")),r.pixelRatio=win.devicePixelRatio||1;return r.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},r}(),EventsClass=function(e){void 0===e&&(e=[]);this.eventsParents=e,this.eventsListeners={}};EventsClass.prototype.on=function(e,t,r){var a=this;if("function"!=typeof t)return a;var n=r?"unshift":"push";return e.split(" ").forEach((function(e){a.eventsListeners[e]||(a.eventsListeners[e]=[]),a.eventsListeners[e][n](t)})),a},EventsClass.prototype.once=function(e,t,r){var a=this;if("function"!=typeof t)return a;function n(){for(var r=[],o=arguments.length;o--;)r[o]=arguments[o];a.off(e,n),n.f7proxy&&delete n.f7proxy,t.apply(a,r)}return n.f7proxy=t,a.on(e,n,r)},EventsClass.prototype.off=function(e,t){var r=this;return r.eventsListeners?(e.split(" ").forEach((function(e){void 0===t?r.eventsListeners[e]=[]:r.eventsListeners[e]&&r.eventsListeners[e].forEach((function(a,n){(a===t||a.f7proxy&&a.f7proxy===t)&&r.eventsListeners[e].splice(n,1)}))})),r):r},EventsClass.prototype.emit=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,a,n,o,i=this;if(!i.eventsListeners)return i;"string"==typeof e[0]||Array.isArray(e[0])?(r=e[0],a=e.slice(1,e.length),n=i,o=i.eventsParents):(r=e[0].events,a=e[0].data,n=e[0].context||i,o=e[0].local?[]:e[0].parents||i.eventsParents);var s=Array.isArray(r)?r:r.split(" "),l=s.map((function(e){return e.replace("local::","")})),c=s.filter((function(e){return e.indexOf("local::")<0}));return l.forEach((function(e){if(i.eventsListeners&&i.eventsListeners[e]){var t=[];i.eventsListeners[e].forEach((function(e){t.push(e)})),t.forEach((function(e){e.apply(n,a)}))}})),o&&o.length>0&&o.forEach((function(e){e.emit.apply(e,[c].concat(a))})),i};var Framework7Class=function(e){function t(t,r){void 0===t&&(t={}),void 0===r&&(r=[]),e.call(this,r);var a=this;a.params=t,a.params&&a.params.on&&Object.keys(a.params.on).forEach((function(e){a.on(e,a.params.on[e])}))}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={components:{configurable:!0}};return t.prototype.useModuleParams=function(e,t){if(e.params){var r={};Object.keys(e.params).forEach((function(e){void 0!==t[e]&&(r[e]=Utils.extend({},t[e]))})),Utils.extend(t,e.params),Object.keys(r).forEach((function(e){Utils.extend(t[e],r[e])}))}},t.prototype.useModulesParams=function(e){var t=this;t.modules&&Object.keys(t.modules).forEach((function(r){var a=t.modules[r];a.params&&Utils.extend(e,a.params)}))},t.prototype.useModule=function(e,t){void 0===e&&(e=""),void 0===t&&(t={});var r=this;if(r.modules){var a="string"==typeof e?r.modules[e]:e;a&&(a.instance&&Object.keys(a.instance).forEach((function(e){var t=a.instance[e];r[e]="function"==typeof t?t.bind(r):t})),a.on&&r.on&&Object.keys(a.on).forEach((function(e){r.on(e,a.on[e])})),a.vnode&&(r.vnodeHooks||(r.vnodeHooks={}),Object.keys(a.vnode).forEach((function(e){Object.keys(a.vnode[e]).forEach((function(t){var n=a.vnode[e][t];r.vnodeHooks[t]||(r.vnodeHooks[t]={}),r.vnodeHooks[t][e]||(r.vnodeHooks[t][e]=[]),r.vnodeHooks[t][e].push(n.bind(r))}))}))),a.create&&a.create.bind(r)(t))}},t.prototype.useModules=function(e){void 0===e&&(e={});var t=this;t.modules&&Object.keys(t.modules).forEach((function(r){var a=e[r]||{};t.useModule(r,a)}))},r.components.set=function(e){this.use&&this.use(e)},t.installModule=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var a=this;a.prototype.modules||(a.prototype.modules={});var n=e.name||Object.keys(a.prototype.modules).length+"_"+Utils.now();return a.prototype.modules[n]=e,e.proto&&Object.keys(e.proto).forEach((function(t){a.prototype[t]=e.proto[t]})),e.static&&Object.keys(e.static).forEach((function(t){a[t]=e.static[t]})),e.install&&e.install.apply(a,t),a},t.use=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var a=this;return Array.isArray(e)?(e.forEach((function(e){return a.installModule(e)})),a):a.installModule.apply(a,[e].concat(t))},Object.defineProperties(t,r),t}(EventsClass);function ConstructorMethods(e){void 0===e&&(e={});var t=e.defaultSelector,r=e.constructor,a=e.domProp,n=e.app,o=e.addMethods,i={create:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return n?new(Function.prototype.bind.apply(r,[null].concat([n],e))):new(Function.prototype.bind.apply(r,[null].concat(e)))},get:function(e){if(void 0===e&&(e=t),e instanceof r)return e;var n=$(e);return 0!==n.length?n[0][a]:void 0},destroy:function(e){var t=i.get(e);if(t&&t.destroy)return t.destroy()}};return o&&Array.isArray(o)&&o.forEach((function(e){i[e]=function(r){void 0===r&&(r=t);for(var a=[],n=arguments.length-1;n-- >0;)a[n]=arguments[n+1];var o=i.get(r);if(o&&o[e])return o[e].apply(o,a)}})),i}function ModalMethods(e){void 0===e&&(e={});var t=e.defaultSelector,r=e.constructor,a=e.app;return Utils.extend(ConstructorMethods({defaultSelector:t,constructor:r,app:a,domProp:"f7Modal"}),{open:function(e,t,n){var o=$(e);if(o.length>1&&n){var i=$(n).parents(".page");i.length&&o.each((function(e,t){var r=$(t);r.parents(i)[0]===i[0]&&(o=r)}))}if(o.length>1&&(o=o.eq(o.length-1)),o.length){var s=o[0].f7Modal;if(!s){var l=o.dataset();s=new r(a,Object.assign({},{el:o},l))}return s.open(t)}},close:function(e,n,o){void 0===e&&(e=t);var i=$(e);if(i.length){if(i.length>1){var s;if(o){var l=$(o);l.length&&(s=l.parents(i))}i=s&&s.length>0?s:i.eq(i.length-1)}var c=i[0].f7Modal;if(!c){var u=i.dataset();c=new r(a,Object.assign({},{el:i},u))}return c.close(n)}}})}var fetchedModules=[];function loadModule(e){var t=this;return new Promise((function(r,a){var n,o,i,s=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(!s||s&&!s.params.lazyModulesPath)return void a(new Error('Framework7: "lazyModulesPath" app parameter must be specified to fetch module by name'));n=s.params.lazyModulesPath+"/"+e+".js"}else n=e}else"function"==typeof e?i=e:o=e;if(i){var c=i(t,!1);if(!c)return void a(new Error("Framework7: Can't find Framework7 component in specified component function"));if(t.prototype.modules&&t.prototype.modules[c.name])return void r();h(c),r()}if(o){var u=o;if(!u)return void a(new Error("Framework7: Can't find Framework7 component in specified component"));if(t.prototype.modules&&t.prototype.modules[u.name])return void r();h(u),r()}if(n){if(fetchedModules.indexOf(n)>=0)return void r();fetchedModules.push(n);var p=new Promise((function(e,r){t.request.get(n,(function(a){var o="f7_component_loader_callback_"+Utils.id(),i=doc.createElement("script");i.innerHTML="window."+o+" = function (Framework7, Framework7AutoInstallComponent) {return "+a.trim()+"}",$("head").append(i);var s=win[o];delete win[o],$(i).remove();var l=s(t,!1);l?(t.prototype.modules&&t.prototype.modules[l.name]||h(l),e()):r(new Error("Framework7: Can't find Framework7 component in "+n+" file"))}),(function(e,t){r(e,t)}))})),d=new Promise((function(e){t.request.get(n.replace(".js",s.rtl?".rtl.css":".css"),(function(t){var r=doc.createElement("style");r.innerHTML=t,$("head").append(r),e()}),(function(){e()}))}));Promise.all([p,d]).then((function(){r()})).catch((function(e){a(e)}))}}else a(new Error("Framework7: Lazy module must be specified"));function h(e){t.use(e),s&&(s.useModuleParams(e,s.params),s.useModule(e))}}))}var Framework7=function(e){function t(r){if(e.call(this,r),t.instance)throw new Error("Framework7 is already initialized and can't be initialized more than once");var a=Utils.extend({},r),n=this;t.instance=n;var o={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,component:void 0,componentUrl:void 0};n.useModulesParams(o),n.params=Utils.extend(o,r);var i=$(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:i,rtl:"rtl"===i.css("direction"),theme:"auto"===n.params.theme?Device.ios?"ios":Device.desktop&&Device.electron?"aurora":"md":n.params.theme,passedParams:a,online:win.navigator.onLine}),n.root&&n.root[0]&&(n.root[0].f7=n),n.useModules(),n.initData();var s="(prefers-color-scheme: dark)",l="(prefers-color-scheme: light)";return n.mq={},win.matchMedia&&(n.mq.dark=win.matchMedia(s),n.mq.light=win.matchMedia(l)),n.colorSchemeListener=function(e){var t=e.matches,r=e.media;if(t){var a=doc.querySelector("html");r===s?(a.classList.add("theme-dark"),n.darkTheme=!0,n.emit("darkThemeChange",!0)):r===l&&(a.classList.remove("theme-dark"),n.darkTheme=!1,n.emit("darkThemeChange",!1))}},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 r={$:{configurable:!0},t7:{configurable:!0}},a={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.darkTheme=!0,e.emit("darkThemeChange",!0)):e.mq.light&&e.mq.light.matches&&(t.classList.remove("theme-dark"),e.darkTheme=!1,e.emit("darkThemeChange",!1))}},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.initAppComponent=function(e){var t=this;t.router.componentLoader(t.params.component,t.params.componentUrl,{componentOptions:{el:t.root[0],root:!0}},(function(r){t.root=$(r),t.root[0].f7=t,t.rootComponent=r.f7Component,e&&e()}),(function(){}))},t.prototype._init=function(){var e=this;return e.initialized||(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.init=function(){var e=this;e.params.component||e.params.componentUrl?e.initAppComponent((function(){e._init()})):e._init()},t.prototype.loadModule=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return t.loadModule.apply(t,e)},t.prototype.loadModules=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return t.loadModules.apply(t,e)},t.prototype.getVnodeHooks=function(e,t){return this.vnodeHooks&&this.vnodeHooks[e]&&this.vnodeHooks[e][t]||[]},r.$.get=function(){return $},r.t7.get=function(){return Template7},a.Dom7.get=function(){return $},a.$.get=function(){return $},a.Template7.get=function(){return Template7},a.Class.get=function(){return e},a.Events.get=function(){return EventsClass},Object.defineProperties(t.prototype,r),Object.defineProperties(t,a),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"),r=doc.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]');t&&(Device.standalone&&Device.ios&&r&&"black-translucent"===r.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],r=t[0],a=t[1],n=t[2],o=t[3];return this.width=r,this.height=a,this.left=n,this.top=o,{width:r,height:a,left:n,top:o}}},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 r=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),a=Utils.extend({},r,e);function n(e){for(var t,r,n=[],o=arguments.length-1;o-- >0;)n[o]=arguments[o+1];return globals[e]&&(t=globals[e].apply(globals,n)),a[e]&&(r=a[e].apply(a,n)),"boolean"!=typeof t&&(t=!0),"boolean"!=typeof r&&(r=!0),t&&r}if(!1!==n("beforeCreate",a)){a.type&&(a.method=a.type);var o,i=a.url.indexOf("?")>=0?"&":"?",s=a.method.toUpperCase();if(("GET"===s||"HEAD"===s||"OPTIONS"===s||"DELETE"===s)&&a.data)(o="string"==typeof a.data?a.data.indexOf("?")>=0?a.data.split("?")[1]:a.data:Utils.serializeObject(a.data)).length&&(a.url+=i+o,"?"===i&&(i="&"));if("json"===a.dataType&&a.url.indexOf("callback=")>=0){var l,c="f7jsonp_"+(Date.now()+(jsonpRequests+=1)),u=a.url.split("callback="),p=u[0]+"callback="+c;if(u[1].indexOf("&")>=0){var d=u[1].split("&").filter((function(e){return e.indexOf("=")>0})).join("&");d.length>0&&(p+="&"+d)}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=p,win[c]=function(e){clearTimeout(l),n("success",e),h.parentNode.removeChild(h),h=null,delete win[c]},doc.querySelector("head").appendChild(h),void(a.timeout>0&&(l=setTimeout((function(){h.parentNode.removeChild(h),h=null,n("error",null,"timeout","timeout")}),a.timeout)))}"GET"!==s&&"HEAD"!==s&&"OPTIONS"!==s&&"DELETE"!==s||!1===a.cache&&(a.url+=i+"_nocache"+Date.now());var f=new XMLHttpRequest;if(f.requestUrl=a.url,f.requestParameters=a,!1===n("beforeOpen",f,a))return f;f.open(s,a.url,a.async,a.user,a.password);var v=null;if(("POST"===s||"PUT"===s||"PATCH"===s)&&a.data)if(a.processData)if([ArrayBuffer,Blob,Document,FormData].indexOf(a.data.constructor)>=0)v=a.data;else{var m="---------------------------"+Date.now().toString(16);"multipart/form-data"===a.contentType?f.setRequestHeader("Content-Type","multipart/form-data; boundary="+m):f.setRequestHeader("Content-Type",a.contentType),v="";var g=Utils.serializeObject(a.data);if("multipart/form-data"===a.contentType){g=g.split("&");for(var b=[],y=0;y=200&&f.status<300||0===f.status)if("json"===a.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);a.statusCode&&(globals.statusCode&&globals.statusCode[f.status]&&globals.statusCode[f.status](f),a.statusCode[f.status]&&a.statusCode[f.status](f)),n("complete",f,f.status)},f.onerror=function(){n("error",f,f.status,f.status),n("complete",f,"error")},a.timeout>0&&(f.timeout=a.timeout,f.ontimeout=function(){n("error",f,"timeout","timeout"),n("complete",f,"timeout")}),!1===n("beforeSend",f,a)?f:(f.send(v),f)}}function RequestShortcut(e){for(var t,r,a=[],n=arguments.length-1;n-- >0;)a[n]=arguments[n+1];var o=[],i=o[0],s=o[1],l=o[2],c=o[3],u=o[4];"function"==typeof a[1]?(i=(t=a)[0],l=t[1],c=t[2],u=t[3]):(i=(r=a)[0],s=r[1],l=r[2],c=r[3],u=r[4]),[l,c].forEach((function(e){"string"==typeof e&&(u=e,e===l?l=void 0:c=void 0)}));var p={url:i,method:"post"===e||"postJSON"===e?"POST":"GET",data:s,success:l,error:c,dataType:u=u||("json"===e||"postJSON"===e?"json":void 0)};return"postJSON"===e&&Utils.extend(p,{contentType:"application/json",processData:!1,crossDomain:!0,data:"string"==typeof s?s:JSON.stringify(s)}),Request(p)}function RequestShortcutPromise(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var a=t[0],n=t[1],o=t[2];return new Promise((function(t,r){RequestShortcut(e,a,n,(function(e,r,a){t({data:e,status:r,xhr:a})}),(function(e,t,a){r({xhr:e,status:t,message:a})}),o)}))}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,r){Request(Object.assign(e,{success:function(e,r,a){t({data:e,status:r,xhr:a})},error:function(e,t,a){r({xhr:e,status:t,message:a})}}))}))},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,r,a,n,o,i,s,l,c,u,p,d=this,h=d.params.touch,f=h[d.theme+"TouchRipple"];function v(e){var t,r=$(e),a=r.parents(h.activeStateElements);if(r.closest(".no-active-state").length)return null;if(r.is(h.activeStateElements)&&(t=r),a.length>0&&(t=t?t.add(a):a),t&&t.length>1){for(var n,o=[],i=0;i0}function g(){s&&s.addClass("active-state")}function b(){s&&(s.removeClass("active-state"),s=null)}function y(e,t,r){e&&(c=d.touchRipple.create(e,t,r))}function w(){c&&(c.remove(),c=void 0,u=void 0)}function C(r){(u=function(e){var t=h.touchRippleElements,r=$(e);if(r.is(t))return!r.hasClass("no-ripple")&&r;if(r.parents(t).length>0){var a=r.parents(t).eq(0);return!a.hasClass("no-ripple")&&a}return!1}(r))&&0!==u.length?m(u)?(clearTimeout(p),p=setTimeout((function(){w(),y(u,e,t)}),80)):(w(),y(u,e,t)):u=void 0}function x(){clearTimeout(p),w()}function k(){c||!u||a?w():(clearTimeout(p),y(u,e,t),setTimeout(w,0))}function E(){$(".active-state").removeClass("active-state"),f&&k()}function S(e,t){d.emit({events:e,data:[t]})}function T(e){S("touchstart touchstart:active",e)}function O(e){S("touchmove touchmove:active",e)}function P(e){S("touchend touchend:active",e)}function R(e){S("touchstart:passive",e)}function N(e){S("touchmove:passive",e)}function D(e){S("touchend:passive",e)}function L(e){S(e.type+" "+e.type+":active",e)}function M(e){S(e.type+":passive",e)}Device.ios&&Device.webView&&win.addEventListener("touchstart",(function(){}));var A=!!Support.passiveListener&&{passive:!0},U=!Support.passiveListener||{passive:!0,capture:!0},B=!!Support.passiveListener&&{passive:!1},H=!Support.passiveListener||{passive:!1,capture:!0};doc.addEventListener("click",(function(e){S("click",e)}),!0),Support.passiveListener?(doc.addEventListener(d.touchEvents.start,T,H),doc.addEventListener(d.touchEvents.move,O,B),doc.addEventListener(d.touchEvents.end,P,B),doc.addEventListener(d.touchEvents.start,R,U),doc.addEventListener(d.touchEvents.move,N,A),doc.addEventListener(d.touchEvents.end,D,A),Support.touch&&Support.gestures&&(doc.addEventListener("gesturestart",L,B),doc.addEventListener("gesturechange",L,B),doc.addEventListener("gestureend",L,B),doc.addEventListener("gesturestart",M,A),doc.addEventListener("gesturechange",M,A),doc.addEventListener("gestureend",M,A))):(doc.addEventListener(d.touchEvents.start,(function(e){T(e),R(e)}),!0),doc.addEventListener(d.touchEvents.move,(function(e){O(e),N(e)}),!1),doc.addEventListener(d.touchEvents.end,(function(e){P(e),D(e)}),!1),Support.touch&&Support.gestures&&(doc.addEventListener("gesturestart",(function(e){L(e),M(e)}),!1),doc.addEventListener("gesturechange",(function(e){L(e),M(e)}),!1),doc.addEventListener("gestureend",(function(e){L(e),M(e)}),!1))),Support.touch?(d.on("click",(function(e){var t=e&&e.detail&&"f7Overswipe"===e.detail,a=i;return r&&e.target!==r&&(a=!t),h.tapHold&&h.tapHoldPreventClicks&&n&&(a=!0),a&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault()),h.tapHold&&(o=setTimeout((function(){n=!1}),Device.ios||Device.androidChrome?100:400)),i=!1,r=null,!a})),d.on("touchstart",(function(c){return a=!1,n=!1,i=!1,c.targetTouches.length>1?(s&&b(),!0):(c.touches.length>1&&s&&b(),h.tapHold&&(o&&clearTimeout(o),o=setTimeout((function(){c&&c.touches&&c.touches.length>1||(n=!0,c.preventDefault(),i=!0,$(c.target).trigger("taphold",c),d.emit("taphold",c))}),h.tapHoldDelay)),r=c.target,e=c.targetTouches[0].pageX,t=c.targetTouches[0].pageY,h.activeState&&((s=v(r))&&!m(s)?g():s&&(l=setTimeout(g,80))),f&&C(r),!0)})),d.on("touchmove",(function(r){var n,s;if("touchmove"===r.type&&(n=r.targetTouches[0],s=h.touchClicksDistanceThreshold),s&&n){var c=n.pageX,u=n.pageY;(Math.abs(c-e)>s||Math.abs(u-t)>s)&&(a=!0)}else a=!0;a&&(i=!0,h.tapHold&&clearTimeout(o),h.activeState&&(clearTimeout(l),b()),f&&x())})),d.on("touchend",(function(e){return clearTimeout(l),clearTimeout(o),doc.activeElement===e.target?(h.activeState&&b(),f&&k(),!0):(h.activeState&&(g(),setTimeout(b,0)),f&&k(),!(h.tapHoldPreventClicks&&n||i)||(e.cancelable&&e.preventDefault(),i=!0,!1))})),doc.addEventListener("touchcancel",(function(){r=null,clearTimeout(l),clearTimeout(o),h.activeState&&b(),f&&k()}),{passive:!0})):h.activeState&&(d.on("touchstart",(function(r){var a=v(r.target);a&&(a.addClass("active-state"),"which"in r&&3===r.which&&setTimeout((function(){$(".active-state").removeClass("active-state")}),0)),f&&(e=r.pageX,t=r.pageY,C(r.target,r.pageX,r.pageY))})),d.on("touchmove",(function(){h.activeStateOnMouseMove||$(".active-state").removeClass("active-state"),f&&x()})),d.on("touchend",E),doc.addEventListener("pointercancel",E,{passive:!0})),doc.addEventListener("contextmenu",(function(e){h.disableContextMenu&&(Device.ios||Device.android||Device.cordova)&&e.preventDefault(),f&&(s&&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, .accordion-item-toggle",activeStateOnMouseMove:!1,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, .list.accordion-list .accordion-item-toggle"}},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}};function lexer(e){for(var t=[],r=0;r=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;i+=e[s++]}if(!i)throw new TypeError("Missing parameter name at "+r);t.push({type:"NAME",index:r,value:i}),r=s}else t.push({type:"CLOSE",index:r,value:e[r++]});else t.push({type:"OPEN",index:r,value:e[r++]});else t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});else t.push({type:"MODIFIER",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}function parse(e,t){void 0===t&&(t={});for(var r=lexer(e),a=t.prefixes,n=void 0===a?"./":a,o="[^"+escapeString(t.delimiter||"/#?")+"]+?",i=[],s=0,l=0,c="",u=function(e){if(l-1:void 0===w;n||(h+="(?:"+d+"(?="+p+"))?"),C||(h+="(?="+d+"|"+p+")")}return new RegExp(h,flags(r))}function pathToRegexp(e,t,r){return e instanceof RegExp?regexpToRegexp(e,t):Array.isArray(e)?arrayToRegexp(e,t,r):stringToRegexp(e,t,r)}var History={queue:[],clearQueue:function(){0!==History.queue.length&&History.queue.shift()()},routerQueue:[],clearRouterQueue:function(){if(0!==History.routerQueue.length){var e=History.routerQueue.pop(),t=e.router,r=e.stateUrl,a=e.action,n=t.params.animate;!1===t.params.pushStateAnimate&&(n=!1),"back"===a&&t.back({animate:n,pushState:!1}),"load"===a&&t.navigate(r,{animate:n,pushState:!1})}},handle:function(e){if(!History.blockPopstate){var t=e.state;History.previousState=History.state,History.state=t,History.allowChange=!0,History.clearQueue(),(t=History.state)||(t={}),this.views.forEach((function(e){var r=e.router,a=t[e.id];if(!a&&e.params.pushState&&(a={url:e.router.history[0]}),a){var n=a.url||void 0,o=r.params.animate;!1===r.params.pushStateAnimate&&(o=!1),n!==r.url&&(r.history.indexOf(n)>=0?r.allowPageChange?r.back({animate:o,pushState:!1}):History.routerQueue.push({action:"back",router:r}):r.allowPageChange?r.navigate(n,{animate:o,pushState:!1}):History.routerQueue.unshift({action:"load",stateUrl:n,router:r}))}}))}},initViewState:function(e,t){var r,a=Utils.extend({},History.state||{},((r={})[e]=t,r));History.state=a,win.history.replaceState(a,"")},push:function(e,t,r){var a;if(History.allowChange){History.previousState=History.state;var n=Utils.extend({},History.previousState||{},((a={})[e]=t,a));History.state=n,win.history.pushState(n,"",r)}else History.queue.push((function(){History.push(e,t,r)}))},replace:function(e,t,r){var a;if(History.allowChange){History.previousState=History.state;var n=Utils.extend({},History.previousState||{},((a={})[e]=t,a));History.state=n,win.history.replaceState(n,"",r)}else History.queue.push((function(){History.replace(e,t,r)}))},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,r,a,n,o,i,s,l,c,u=e,p=u.$el,d=u.$navbarsEl,h=u.app,f=u.params,v=!1,m=!1,g={},b=[],y=[],w=!0,C=[],x=[],k=f[h.theme+"SwipeBackAnimateShadow"],E=f[h.theme+"SwipeBackAnimateOpacity"],S=f[h.theme+"SwipeBackActiveArea"],T=f[h.theme+"SwipeBackThreshold"],O=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 R(e){void 0===e&&(e={});var t=e.progress,r=e.reset,a=e.transition,n=e.reflow,o=["overflow","transform","transform-origin","opacity"];if(!0===a||!1===a)for(var i=0;i0||$(e.target).closest(".page-master, .page-master-detail").length>0&&f.masterDetailBreakpoint>0&&h.width>=f.masterDetailBreakpoint||(m=!1,v=!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(),o=u.dynamicNavbar)}function D(e){if(v){var n="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,c="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY;if(void 0===t&&(t=!!(t||Math.abs(c-g.y)>Math.abs(n-g.x))||ng.x&&h.rtl),t||e.f7PreventSwipeBack||h.preventSwipeBack)v=!1;else{if(!m){var w=!1,N=$(e.target),D=N.closest(".swipeout");D.length>0&&(!h.rtl&&D.find(".swipeout-actions-left").length>0&&(w=!0),h.rtl&&D.find(".swipeout-actions-right").length>0&&(w=!0)),((b=N.closest(".page")).hasClass("no-swipeback")||N.closest(".no-swipeback, .card-opened").length>0)&&(w=!0),(y=p.find(".page-previous:not(.stacked)")).length>1&&(y=y.eq(y.length-1));g.x,p.offset().left;if(r=p.width(),(h.rtl?g.xS)&&(w=!0),0!==y.length&&0!==b.length||(w=!0),w)return void(v=!1);k&&0===(i=b.find(".page-shadow-effect")).length&&(i=$('
'),b.append(i)),E&&0===(s=y.find(".page-opacity-effect")).length&&(s=$('
'),y.append(s)),o&&(C=d.find(".navbar-current:not(.stacked)"),(x=d.find(".navbar-previous:not(.stacked)")).length>1&&(x=x.eq(x.length-1)),l=function(){var e,t,r=[],a=h.rtl?-1:1,n=C.hasClass("navbar-transparent")&&!C.hasClass("navbar-large")&&!C.hasClass("navbar-transparent-visible"),o=C.hasClass("navbar-large"),i=C.hasClass("navbar-large-collapsed"),s=C.hasClass("navbar-large-transparent")||C.hasClass("navbar-large")&&C.hasClass("navbar-transparent"),l=x.hasClass("navbar-transparent")&&!x.hasClass("navbar-large")&&!x.hasClass("navbar-transparent-visible"),c=x.hasClass("navbar-large"),u=x.hasClass("navbar-large-collapsed"),p=x.hasClass("navbar-large-transparent")||x.hasClass("navbar-large")&&x.hasClass("navbar-transparent"),d=o&&!i,v=c&&!u,m=C.find(".left, .title, .right, .subnavbar, .fading, .title-large, .navbar-bg"),g=x.find(".left, .title, .right, .subnavbar, .fading, .title-large, .navbar-bg");return f.iosAnimateNavbarBackIcon&&(e=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),t=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),e.length&&g.each((function(t,r){$(r).hasClass("title")&&(r.f7NavbarLeftOffset+=e.prev(".icon")[0].offsetWidth)}))),m.each((function(t,l){var c=$(l),u=c.hasClass("subnavbar"),p=c.hasClass("left"),h=c.hasClass("title"),m=c.hasClass("navbar-bg");if((!h&&!m||!n)&&(d||!c.hasClass(".title-large"))){var g={el:l};if(d){if(h)return;if(c.hasClass("title-large"))return r.indexOf(g)<0&&r.push(g),g.overflow="visible",void c.find(".title-large-text").each((function(e,t){r.push({el:t,transform:function(e){return"translateX("+100*e*a+"%)"}})}))}if(v&&(d||c.hasClass("title-large")&&(r.indexOf(g)<0&&r.push(g),g.opacity=0),p))return r.indexOf(g)<0&&r.push(g),g.opacity=function(e){return 1-Math.pow(e,.33)},void c.find(".back span").each((function(e,t){r.push({el:t,"transform-origin":O,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 r.indexOf(g)<0&&r.push(g),d||v||(i?(s&&(g.className="ios-swipeback-navbar-bg-large"),g.transform=function(e){return"translateX("+100*e*a+"%) translateY(calc(-1 * var(--f7-navbar-large-title-height)))"}):g.transform=function(e){return"translateX("+100*e*a+"%)"}),!d&&v&&(g.className="ios-swipeback-navbar-bg-large",g.transform=function(e){return"translateX("+100*e*a+"%) translateY(calc(-1 * "+(1-e)+" * var(--f7-navbar-large-title-height)))"}),d&&v&&(g.transform=function(e){return"translateX("+100*e*a+"%)"}),void(d&&!v&&(g.transform=function(e){return"translateX("+100*e*a+"%) translateY(calc(-"+e+" * var(--f7-navbar-large-title-height)))"}));if(!c.hasClass("title-large")){var b=c.hasClass("sliding")||c.parents(".navbar-inner.sliding").length;if(r.indexOf(g)<0&&r.push(g),(!u||u&&!b)&&(g.opacity=function(e){return 1-Math.pow(e,.33)}),b){var y=g;if(p&&e.length&&f.iosAnimateNavbarBackIcon){var w={el:e[0]};y=w,r.push(w)}y.transform=function(e){var t=e*y.el.f7NavbarRightOffset;return 1===Device.pixelRatio&&(t=Math.round(t)),u&&o?"translate3d("+t+"px, calc(-1 * var(--f7-navbar-large-collapse-progress) * var(--f7-navbar-large-title-height)), 0)":"translate3d("+t+"px,0,0)"}}}}})),g.each((function(e,n){var o=$(n),i=o.hasClass("subnavbar"),s=o.hasClass("left"),h=o.hasClass("title"),m=o.hasClass("navbar-bg");if(!h&&!m||!l){var g={el:n};if(v){if(h)return;if(r.indexOf(g)<0&&r.push(g),o.hasClass("title-large"))return g.opacity=1,g.overflow="visible",void o.find(".title-large-text").each((function(e,t){r.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 r.indexOf(g)<0&&r.push(g),d||v||(u?(p&&(g.className="ios-swipeback-navbar-bg-large"),g.transform=function(e){return"translateX("+(100*e-100)*a+"%) translateY(calc(-1 * var(--f7-navbar-large-title-height)))"}):g.transform=function(e){return"translateX("+(100*e-100)*a+"%)"}),!d&&v&&(g.transform=function(e){return"translateX("+(100*e-100)*a+"%) translateY(calc(-1 * "+(1-e)+" * var(--f7-navbar-large-title-height)))"}),d&&!v&&(g.className="ios-swipeback-navbar-bg-large",g.transform=function(e){return"translateX("+(100*e-100)*a+"%) translateY(calc(-"+e+" * var(--f7-navbar-large-title-height)))"}),void(d&&v&&(g.transform=function(e){return"translateX("+(100*e-100)*a+"%)"}));if(!o.hasClass("title-large")){var b=o.hasClass("sliding")||x.children(".navbar-inner.sliding").length;if(r.indexOf(g)<0&&r.push(g),(!i||i&&!b)&&(g.opacity=function(e){return Math.pow(e,3)}),b){var y=g;if(s&&t.length&&f.iosAnimateNavbarBackIcon){var w={el:t[0]};y=w,r.push(w)}y.transform=function(e){var t=y.el.f7NavbarLeftOffset*(1-e);return 1===Device.pixelRatio&&(t=Math.round(t)),i&&c?"translate3d("+t+"px, calc(-1 * var(--f7-navbar-large-collapse-progress) * var(--f7-navbar-large-title-height)), 0)":"translate3d("+t+"px,0,0)"}}}}})),r}()),$(".sheet.modal-in").length>0&&h.sheet&&h.sheet.close($(".sheet.modal-in"))}e.f7PreventSwipePanel=!0,m=!0,h.preventSwipePanelBySwipeBack=!0,e.preventDefault();var L=h.rtl?-1:1;(a=(n-g.x-T)*L)<0&&(a=0);var M=Math.min(Math.max(a/r,0),1),A={percentage:M,progress:M,currentPageEl:b[0],previousPageEl:y[0],currentNavbarEl:C[0],previousNavbarEl:x[0]};p.trigger("swipeback:move",A),u.emit("swipebackMove",A);var U=a*L,B=(a/5-r/5)*L;h.rtl?(U=Math.max(U,-r),B=Math.max(B,0)):(U=Math.min(U,r),B=Math.min(B,0)),1===Device.pixelRatio&&(U=Math.round(U),B=Math.round(B)),u.swipeBackActive=!0,$([b[0],y[0]]).addClass("page-swipeback-active"),b.transform("translate3d("+U+"px,0,0)"),k&&(i[0].style.opacity=1-1*M),"ios"===h.theme&&y.transform("translate3d("+B+"px,0,0)"),E&&(s[0].style.opacity=1-1*M),o&&R({progress:M})}}}function L(){if(h.preventSwipePanelBySwipeBack=!1,!v||!m)return v=!1,void(m=!1);v=!1,m=!1,u.swipeBackActive=!1;var e=$([b[0],y[0]]);if(e.removeClass("page-swipeback-active"),0===a)return e.transform(""),i&&i.length>0&&i.remove(),s&&s.length>0&&s.remove(),void(o&&R({reset:!0}));var t=Utils.now()-n,l=!1;(t<300&&a>10||t>=300&&a>r/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"),i&&(i[0].style.opacity=""),s&&(s[0].style.opacity=""),o&&(u.setNavbarPosition(C,"next"),u.setNavbarPosition(x,"current",!1)),l=!0),e.addClass("page-transitioning page-transitioning-swipeback"),l||(b[0]._clientLeft=b[0].clientLeft),e.transform(""),o&&R({progress:l?1:0,transition:!0,reflow:!l}),w=!1,u.allowPageChange=!1;var c={currentPageEl:b[0],previousPageEl:y[0],currentNavbarEl:C[0],previousNavbarEl:x[0]};l?(u.currentRoute=y[0].f7Page.route,u.currentPage=y[0],u.pageCallback("beforeOut",b,C,"current","next",{route:b[0].f7Page.route,swipeBack:!0}),u.pageCallback("beforeIn",y,x,"previous","current",{route:y[0].f7Page.route,swipeBack:!0},b[0]),p.trigger("swipeback:beforechange",c),u.emit("swipebackBeforeChange",c)):(p.trigger("swipeback:beforereset",c),u.emit("swipebackBeforeReset",c)),b.transitionEnd((function(){e.removeClass("page-transitioning page-transitioning-swipeback"),o&&R({reset:!0,transition:!1}),w=!0,u.allowPageChange=!0,l?(1===u.history.length&&u.history.unshift(u.url),u.history.pop(),u.saveHistory(),f.pushState&&History.back(),u.pageCallback("afterOut",b,C,"current","next",{route:b[0].f7Page.route,swipeBack:!0}),u.pageCallback("afterIn",y,x,"previous","current",{route:y[0].f7Page.route,swipeBack:!0}),f.stackPages&&u.initialPages.indexOf(b[0])>=0?(b.addClass("stacked"),o&&C.addClass("stacked")):(u.pageCallback("beforeRemove",b,C,"next",{swipeBack:!0}),u.removePage(b),o&&u.removeNavbar(C)),p.trigger("swipeback:afterchange",c),u.emit("swipebackAfterChange",c),u.emit("routeChanged",u.currentRoute,u.previousRoute,u),f.preloadPreviousPage&&u.back(u.history[u.history.length-2],{preload:!0})):(p.trigger("swipeback:afterreset",c),u.emit("swipebackAfterReset",c)),i&&i.length>0&&i.remove(),s&&s.length>0&&s.remove()}))}c=!("touchstart"!==h.touchEvents.start||!Support.passiveListener)&&{passive:!0,capture:!1},p.on(h.touchEvents.start,N,c),h.on("touchmove:active",D),h.on("touchend:passive",L),u.on("routerDestroy",(function(){var e=!("touchstart"!==h.touchEvents.start||!Support.passiveListener)&&{passive:!0,capture:!1};p.off(h.touchEvents.start,N,e),h.off("touchmove:active",D),h.off("touchend:passive",L)}))}function redirect(e,t,r){var a=this,n=t.route.redirect;if(r.initial&&a.params.pushState&&(r.replaceState=!0,r.history=!0),"function"==typeof n){a.allowPageChange=!1;var o=n.call(a,t,(function(t,n){void 0===n&&(n={}),a.allowPageChange=!0,a[e](t,Utils.extend({},r,n))}),(function(){a.allowPageChange=!0}));return o&&"string"==typeof o?(a.allowPageChange=!0,a[e](o,r)):a}return a[e](n,r)}function processQueue(e,t,r,a,n,o,i){var s=[];Array.isArray(r)?s.push.apply(s,r):r&&"function"==typeof r&&s.push(r),t&&(Array.isArray(t)?s.push.apply(s,t):s.push(t)),function t(){0!==s.length?s.shift().call(e,a,n,(function(){t()}),(function(){i()})):o()}()}function processRouteQueue(e,t,r,a){var n=this;function o(){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,r()}),(function(){a()}))):r()}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,o()}),(function(){a()}))):o()}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,r,a){function n(e){e.then((function(e){r({component:e.default||e._default||e})})).catch((function(e){throw a(),new Error(e)}))}if(t instanceof Promise)n(t);else{var o=t.call(e);o instanceof Promise?n(o):r({component:o})}}function refreshPage(){return appRouterCheck(this,"refreshPage"),this.navigate(this.currentRoute.url,{ignoreCache:!0,reloadCurrent:!0})}function forward(e,t){void 0===t&&(t={});var r,a,n,o=this,i=$(e),s=o.app,l=o.view,c=Utils.extend(!1,{animate:o.params.animate,pushState:!0,replaceState:!1,history:!0,reloadCurrent:o.params.reloadPages,reloadPrevious:!1,reloadAll:!1,clearPreviousHistory:!1,reloadDetail:o.params.reloadDetail,on:{}},t),u=o.params.masterDetailBreakpoint>0,p=u&&c.route&&c.route.route&&!0===c.route.route.master,d=o.currentRoute.modal;if(d||"popup popover sheet loginScreen actions customModal panel".split(" ").forEach((function(e){o.currentRoute&&o.currentRoute.route&&o.currentRoute.route[e]&&(d=!0,n=e)})),d){var h=o.currentRoute.modal||o.currentRoute.route.modalInstance||s[n].get(),f=o.history[o.history.length-2],v=o.findMatchingRoute(f);!v&&f&&(v={url:f,path:f.split("?")[0],query:Utils.parseUrlQuery(f),route:{path:f.split("?")[0],url:f}}),o.modalRemove(h)}var m,g,b,y,w=o.dynamicNavbar,C=o.$el,x=i,k=c.reloadPrevious||c.reloadCurrent||c.reloadAll;if(o.allowPageChange=!1,0===x.length)return o.allowPageChange=!0,o;x.length&&o.removeThemeElements(x),w&&(b=x.children(".navbar"),g=o.$navbarsEl,0===b.length&&x[0]&&x[0].f7Page&&(b=x[0].f7Page.$navbarEl)),c.route&&c.route.route&&c.route.route.keepAlive&&!c.route.route.keepAliveData&&(c.route.route.keepAliveData={pageEl:i[0]});var E,S,T,O,P=C.children(".page:not(.stacked)").filter((function(e,t){return t!==x[0]}));if(w&&(E=g.children(".navbar:not(.stacked)").filter((function(e,t){return t!==b[0]}))),c.reloadPrevious&&P.length<2)return o.allowPageChange=!0,o;if(u&&!c.reloadAll){for(var R=0;R=o.params.masterDetailBreakpoint&&r}S&&(O=!a||T||c.reloadAll||c.reloadCurrent);var D="next";if(c.reloadCurrent||c.reloadAll||T?D="current":c.reloadPrevious&&(D="previous"),x.removeClass("page-previous page-current page-next").addClass("page-"+D+(p?" page-master":"")+(S?" page-master-detail":"")+(O?" page-master-detail-root":"")).removeClass("stacked").trigger("page:unstack").trigger("page:position",{position:D}),o.emit("pageUnstack",x[0]),o.emit("pagePosition",x[0],D),(p||S)&&(x.trigger("page:role",{role:p?"master":"detail",root:!!O}),o.emit("pageRole",x[0],{role:p?"master":"detail",detailRoot:!!O})),w&&b.length&&(b.removeClass("navbar-previous navbar-current navbar-next").addClass("navbar-"+D+(p?" navbar-master":"")+(S?" navbar-master-detail":"")+(O?" navbar-master-detail-root":"")).removeClass("stacked"),b.trigger("navbar:position",{position:D}),o.emit("navbarPosition",b[0],D),(p||S)&&o.emit("navbarRole",b[0],{role:p?"master":"detail",detailRoot:!!O})),c.reloadCurrent||T)m=P.eq(P.length-1),w&&(y=$(s.navbar.getElByPage(m)));else if(c.reloadPrevious)m=P.eq(P.length-2),w&&(y=$(s.navbar.getElByPage(m)));else if(c.reloadAll)m=P.filter((function(e,t){return t!==x[0]})),w&&(y=E.filter((function(e,t){return t!==b[0]})));else{var L=[],M=[];if(P.length>1){var A=0;for(A=0;A1||T)&&(m=m.filter((function(e,t){return!t.classList.contains("page-master")}))),y&&(y.length>1||T)&&(y=y.filter((function(e,t){return!t.classList.contains("navbar-master")})))),o.params.pushState&&(c.pushState||c.replaceState)&&!c.reloadPrevious){var B=o.params.pushStateRoot||"";History[c.reloadCurrent||T&&a||c.reloadAll||c.replaceState?"replace":"push"](l.id,{url:c.route.url},B+o.params.pushStateSeparator+c.route.url)}c.reloadPrevious||(o.currentPageEl=x[0],w&&b.length?o.currentNavbarEl=b[0]:delete o.currentNavbarEl,o.currentRoute=c.route);var H=c.route.url;c.history&&(((c.reloadCurrent||T&&a)&&o.history.length)>0||c.replaceState?o.history[o.history.length-(c.reloadPrevious?2:1)]=H:c.reloadPrevious?o.history[o.history.length-2]=H:c.reloadAll?o.history=[H]:o.history.push(H)),o.saveHistory();var j=x.parents(doc).length>0,q=x[0].f7Component;if(c.reloadPrevious?(q&&!j?q.$mount((function(e){$(e).insertBefore(m)})):x.insertBefore(m),w&&b.length&&(b.find(".title-large").length&&b.addClass("navbar-large"),y.length?b.insertBefore(y):(o.$navbarsEl.parents(doc).length||o.$el.prepend(o.$navbarsEl),g.append(b)))):(m.next(".page")[0]!==x[0]&&(q&&!j?q.$mount((function(e){C.append(e)})):C.append(x[0])),w&&b.length&&(b.find(".title-large").length&&b.addClass("navbar-large"),o.$navbarsEl.parents(doc).length||o.$el.prepend(o.$navbarsEl),g.append(b[0]))),j?c.route&&c.route.route&&c.route.route.keepAlive&&!x[0].f7PageMounted&&(x[0].f7PageMounted=!0,o.pageCallback("mounted",x,b,D,k?D:"current",c,m)):o.pageCallback("mounted",x,b,D,k?D:"current",c,m),(c.reloadCurrent||T)&&m.length>0?o.params.stackPages&&o.initialPages.indexOf(m[0])>=0?(m.addClass("stacked"),m.trigger("page:stack"),o.emit("pageStack",m[0]),w&&y.addClass("stacked")):(o.pageCallback("beforeOut",m,y,"current",void 0,c),o.pageCallback("afterOut",m,y,"current",void 0,c),o.pageCallback("beforeRemove",m,y,"current",void 0,c),o.removePage(m),w&&y&&y.length&&o.removeNavbar(y)):c.reloadAll?m.each((function(e,t){var r=$(t),a=$(s.navbar.getElByPage(r));o.params.stackPages&&o.initialPages.indexOf(r[0])>=0?(r.addClass("stacked"),r.trigger("page:stack"),o.emit("pageStack",r[0]),w&&a.addClass("stacked")):(r.hasClass("page-current")&&(o.pageCallback("beforeOut",m,y,"current",void 0,c),o.pageCallback("afterOut",m,y,"current",void 0,c)),o.pageCallback("beforeRemove",r,y&&y.eq(e),"previous",void 0,c),o.removePage(r),w&&a.length&&o.removeNavbar(a))})):c.reloadPrevious&&(o.params.stackPages&&o.initialPages.indexOf(m[0])>=0?(m.addClass("stacked"),m.trigger("page:stack"),o.emit("pageStack",m[0]),w&&y.addClass("stacked")):(o.pageCallback("beforeRemove",m,y,"previous",void 0,c),o.removePage(m),w&&y&&y.length&&o.removeNavbar(y))),c.route.route.tab&&o.tabLoad(c.route.route.tab,Utils.extend({},c,{history:!1,pushState:!1})),u&&l.checkMasterDetailBreakpoint(),o.pageCallback("init",x,b,D,k?D:"current",c,m),c.reloadCurrent||c.reloadAll||T)return o.allowPageChange=!0,o.pageCallback("beforeIn",x,b,D,"current",c),x.removeAttr("aria-hidden"),w&&b&&b.removeAttr("aria-hidden"),o.pageCallback("afterIn",x,b,D,"current",c),c.reloadCurrent&&c.clearPreviousHistory&&o.clearPreviousHistory(),T&&(o.setPagePosition($(r),"previous"),r.f7Page&&r.f7Page.navbarEl&&o.setNavbarPosition($(r.f7Page.navbarEl),"previous")),o;if(c.reloadPrevious)return o.allowPageChange=!0,o;function _(){o.setPagePosition(x,"current",!1),o.setPagePosition(m,"previous",!m.hasClass("page-master")),w&&(o.setNavbarPosition(b,"current",!1),o.setNavbarPosition(y,"previous",!y.hasClass("navbar-master"))),o.allowPageChange=!0,o.pageCallback("afterOut",m,y,"current","previous",c),o.pageCallback("afterIn",x,b,"next","current",c);var e=(o.params.preloadPreviousPage||o.params[s.theme+"SwipeBack"])&&!p;e||(x.hasClass("smart-select-page")||x.hasClass("photo-browser-page")||x.hasClass("autocomplete-page")||x.hasClass("color-picker-page"))&&(e=!0),e||(o.params.stackPages?(m.addClass("stacked"),m.trigger("page:stack"),o.emit("pageStack",m[0]),w&&y.addClass("stacked")):x.attr("data-name")&&"smart-select-page"===x.attr("data-name")||(o.pageCallback("beforeRemove",m,y,"previous",void 0,c),o.removePage(m),w&&y.length&&o.removeNavbar(y))),c.clearPreviousHistory&&o.clearPreviousHistory(),o.emit("routeChanged",o.currentRoute,o.previousRoute,o),o.params.pushState&&History.clearRouterQueue()}function F(){o.setPagePosition(m,"current",!1),o.setPagePosition(x,"next",!1),w&&(o.setNavbarPosition(y,"current",!1),o.setNavbarPosition(b,"next",!1))}if(o.pageCallback("beforeOut",m,y,"current","previous",c),o.pageCallback("beforeIn",x,b,"next","current",c),!c.animate||p&&s.width>=o.params.masterDetailBreakpoint)_();else{var V=o.params[o.app.theme+"PageLoadDelay"],I=o.params.transition;c.transition&&(I=c.transition),!I&&o.currentRoute&&o.currentRoute.route&&(I=o.currentRoute.route.transition),!I&&o.currentRoute&&o.currentRoute.route.options&&(I=o.currentRoute.route.options.transition),I&&(x[0].f7PageTransition=I),V?setTimeout((function(){F(),o.animate(m,x,y,b,"forward",I,(function(){_()}))}),V):(F(),o.animate(m,x,y,b,"forward",I,(function(){_()})))}return o}function load(e,t,r){void 0===e&&(e={}),void 0===t&&(t={});var a=this;if(!a.allowPageChange&&!r)return a;var n=e,o=t,i=n.url,s=n.content,l=n.el,c=n.pageName,u=n.template,p=n.templateUrl,d=n.component,h=n.componentUrl;if(!o.reloadCurrent&&o.route&&o.route.route&&o.route.route.parentPath&&a.currentRoute.route&&a.currentRoute.route.parentPath===o.route.route.parentPath){if(o.route.url===a.url)return a.allowPageChange=!0,!1;var f=Object.keys(o.route.params).length===Object.keys(a.currentRoute.params).length;if(f&&Object.keys(o.route.params).forEach((function(e){e in a.currentRoute.params&&a.currentRoute.params[e]===o.route.params[e]||(f=!1)})),f)return!!o.route.route.tab&&a.tabLoad(o.route.route.tab,o);if(!f&&o.route.route.tab&&a.currentRoute.route.tab&&a.currentRoute.parentPath===o.route.parentPath)return a.tabLoad(o.route.route.tab,o)}if(o.route&&o.route.url&&a.url===o.route.url&&!o.reloadCurrent&&!o.reloadPrevious&&!a.params.allowDuplicateUrls)return a.allowPageChange=!0,!1;function v(e,t){return a.forward(e,Utils.extend(o,t))}function m(){return a.allowPageChange=!0,a}if(!o.route&&i&&(o.route=a.parseRouteUrl(i),Utils.extend(o.route,{route:{url:i,path:i}})),(i||p||h||d)&&(a.allowPageChange=!1),s)a.forward(a.getPageEl(s),o);else if(u||p)try{a.pageTemplateLoader(u,p,o,v,m)}catch(e){throw a.allowPageChange=!0,e}else if(l)a.forward(a.getPageEl(l),o);else if(c)a.forward(a.$el.children('.page[data-name="'+c+'"]').eq(0),o);else if(d||h)try{a.pageComponentLoader(a.el,d,h,o,v,m)}catch(e){throw a.allowPageChange=!0,e}else i&&(a.xhr&&(a.xhr.abort(),a.xhr=!1),a.xhrRequest(i,o).then((function(e){a.forward(a.getPageEl(e),o)})).catch((function(){a.allowPageChange=!0})));return a}function navigate(e,t){void 0===t&&(t={});var r,a,n,o,i,s,l,c=this;if(c.swipeBackActive)return c;if("string"==typeof e?r=e:(r=e.url,a=e.route,n=e.name,o=e.path,i=e.query,s=e.params),n||o)return(r=c.generateUrl({path:o,name:n,params:s,query:i}))?c.navigate(r,t):c;var u=c.app;if(appRouterCheck(c,"navigate"),"#"===r||""===r)return c;var p=r.replace("./","");if("/"!==p[0]&&0!==p.indexOf("#")){var d=c.currentRoute.parentPath||c.currentRoute.path;p=((d?d+"/":"/")+p).replace("///","/").replace("//","/")}if(!(l=a?Utils.extend(c.parseRouteUrl(p),{route:Utils.extend({},a)}):c.findMatchingRoute(p)))return c;if(l.route&&l.route.viewName){var h=l.route.viewName,f=u.views[h];if(!f)throw new Error('Framework7: There is no View with "'+h+'" name that was specified in this route');if(f!==c.view)return f.router.navigate(e,t)}if(l.route.redirect)return redirect.call(c,"navigate",l,t);var v={};function m(){var e=!1;function t(e,t){c.allowPageChange=!1;var r=!1;t&&t.context&&(l.context?l.context=Utils.extend({},l.context,t.context):l.context=t.context,v.route.context=l.context),"popup popover sheet loginScreen actions customModal panel".split(" ").forEach((function(a){if(e[a]){r=!0;var n=Utils.extend({},l,{route:e});c.allowPageChange=!0,c.modalLoad(a,n,Utils.extend(v,t))}})),r||c.load(e,Utils.extend(v,t),!0)}function r(){c.allowPageChange=!0}"popup popover sheet loginScreen actions customModal panel".split(" ").forEach((function(t){l.route[t]&&!e&&(e=!0,c.modalLoad(t,l,v))})),l.route.keepAlive&&l.route.keepAliveData&&(c.load({el:l.route.keepAliveData.pageEl},v,!1),e=!0),"url content component pageName el componentUrl template templateUrl".split(" ").forEach((function(t){var r;l.route[t]&&!e&&(e=!0,c.load(((r={})[t]=l.route[t],r),v,!1))})),e||(l.route.async&&(c.allowPageChange=!1,l.route.async.call(c,v.route,c.currentRoute,t,r)),l.route.asyncComponent&&asyncComponent(c,l.route.asyncComponent,t,r))}function g(){c.allowPageChange=!0}if(l.route.options?Utils.extend(v,l.route.options,t):Utils.extend(v,t),v.route=l,v&&v.context&&(l.context=v.context,v.route.context=v.context),c.params.masterDetailBreakpoint>0&&l.route.masterRoute){var b=!0,y=!1;if(c.currentRoute&&c.currentRoute.route&&(!c.currentRoute.route.master||c.currentRoute.route!==l.route.masterRoute&&c.currentRoute.route.path!==l.route.masterRoute.path||(b=!1),!c.currentRoute.route.masterRoute||c.currentRoute.route.masterRoute!==l.route.masterRoute&&c.currentRoute.route.masterRoute.path!==l.route.masterRoute.path||(b=!1,y=!0)),b||y&&t.reloadAll)return c.navigate({path:l.route.masterRoute.path,params:l.params||{}},{animate:!1,reloadAll:t.reloadAll,reloadCurrent:t.reloadCurrent,reloadPrevious:t.reloadPrevious,pushState:!t.initial,history:!t.initial,once:{pageAfterIn:function(){c.navigate(e,Utils.extend({},t,{animate:!1,reloadAll:!1,reloadCurrent:!1,reloadPrevious:!1,history:!t.initial,pushState:!t.initial}))}}}),c}return processRouteQueue.call(c,l,c.currentRoute,(function(){l.route.modules?u.loadModules(Array.isArray(l.route.modules)?l.route.modules:[l.route.modules]).then((function(){m()})).catch((function(){g()})):m()}),(function(){g()})),c}function tabLoad(e,t){void 0===t&&(t={});var r,a,n=this,o=Utils.extend({animate:n.params.animate,pushState:!0,history:!0,parentPageEl:null,preload:!1,on:{}},t);o.route&&(o.preload||o.route===n.currentRoute||(a=n.previousRoute,n.currentRoute=o.route),o.preload?(r=o.route,a=n.currentRoute):(r=n.currentRoute,a||(a=n.previousRoute)),n.params.pushState&&o.pushState&&!o.reloadPrevious&&History.replace(n.view.id,{url:o.route.url},(n.params.pushStateRoot||"")+n.params.pushStateSeparator+o.route.url),o.history&&(n.history[Math.max(n.history.length-1,0)]=o.route.url,n.saveHistory()));var i,s=$(o.parentPageEl||n.currentPageEl);i=s.length&&s.find("#"+e.id).length?s.find("#"+e.id).eq(0):n.view.selector?n.view.selector+" #"+e.id:"#"+e.id;var l,c=n.app.tab.show({tabEl:i,animate:o.animate,tabRoute:o.route}),u=c.$newTabEl,p=c.$oldTabEl,d=c.animated,h=c.onTabsChanged;if(u&&u.parents(".page").length>0&&o.route){var f=u.parents(".page")[0].f7Page;f&&o.route&&(f.route=o.route)}if(u[0].f7RouterTabLoaded)return p&&p.length?(d?h((function(){n.emit("routeChanged",n.currentRoute,n.previousRoute,n)})):n.emit("routeChanged",n.currentRoute,n.previousRoute,n),n):n;function v(t,r){var a=t.url,o=t.content,i=t.el,s=t.template,l=t.templateUrl,c=t.component,f=t.componentUrl;function v(t){n.allowPageChange=!0,t&&("string"==typeof t?u.html(t):(u.html(""),t.f7Component?t.f7Component.$mount((function(e){u.append(e)})):u.append(t)),u[0].f7RouterTabLoaded=!0,function(t){n.removeThemeElements(u);var r=u;"string"!=typeof t&&(r=$(t)),r.trigger("tab:init tab:mounted",e),n.emit("tabInit tabMounted",u[0],e),p&&p.length&&(d?h((function(){n.emit("routeChanged",n.currentRoute,n.previousRoute,n),n.params.unloadTabContent&&n.tabRemove(p,u,e)})):(n.emit("routeChanged",n.currentRoute,n.previousRoute,n),n.params.unloadTabContent&&n.tabRemove(p,u,e)))}(t))}function m(){return n.allowPageChange=!0,n}if(o)v(o);else if(s||l)try{n.tabTemplateLoader(s,l,r,v,m)}catch(e){throw n.allowPageChange=!0,e}else if(i)v(i);else if(c||f)try{n.tabComponentLoader(u[0],c,f,r,v,m)}catch(e){throw n.allowPageChange=!0,e}else a&&(n.xhr&&(n.xhr.abort(),n.xhr=!1),n.xhrRequest(a,r).then((function(e){v(e)})).catch((function(){n.allowPageChange=!0})))}function m(e,t){v(e,Utils.extend(o,t))}function g(){n.allowPageChange=!0}return"url content component el componentUrl template templateUrl".split(" ").forEach((function(t){var r;e[t]&&(l=!0,v(((r={})[t]=e[t],r),o))})),e.async?e.async.call(n,r,a,m,g):e.asyncComponent?asyncComponent(n,e.asyncComponent,m,g):l||(n.allowPageChange=!0),n}function tabRemove(e,t,r){var a;e[0]&&(e[0].f7RouterTabLoaded=!1,delete e[0].f7RouterTabLoaded),e.children().each((function(e,t){t.f7Component&&(a=!0,$(t).trigger("tab:beforeremove",r),t.f7Component.$destroy())})),a||e.trigger("tab:beforeremove",r),this.emit("tabBeforeRemove",e[0],t[0],r),this.removeTabContent(e[0],r)}function modalLoad(e,t,r){void 0===r&&(r={});var a,n=this,o=n.app,i="panel"===e,s=i?"panel":"modal",l=Utils.extend({animate:n.params.animate,pushState:!0,history:!0,on:{}},r),c=Utils.extend({},t.route[e]),u=t.route;function p(){var r=o[e].create(c);u.modalInstance=r;var a=r.el;function p(){r.close()}r.on(s+"Open",(function(){a||(n.removeThemeElements(r.el),r.$el.trigger(e.toLowerCase()+":init "+e.toLowerCase()+":mounted",t,r),n.emit((i?"":"modalInit")+" "+e+"Init "+e+"Mounted",r.el,t,r)),n.once("swipeBackMove",p)})),r.on(s+"Close",(function(){n.off("swipeBackMove",p),r.closeByRouter||n.back()})),r.on(s+"Closed",(function(){r.$el.trigger(e.toLowerCase()+":beforeremove",t,r),r.emit((i?"":"modalBeforeRemove ")+e+"BeforeRemove",r.el,t,r);var a=r.el.f7Component;a&&a.$destroy(),Utils.nextTick((function(){(a||c.component)&&n.removeModal(r.el),r.destroy(),delete r.route,delete u.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&&(r.route=Utils.extend(l.route,{modal:r}),n.currentRoute=r.route),l.history&&(n.history.push(l.route.url),n.saveHistory())),a&&(n.removeThemeElements(r.el),r.$el.trigger(e.toLowerCase()+":init "+e.toLowerCase()+":mounted",t,r),n.emit(s+"Init "+e+"Init "+e+"Mounted",r.el,t,r)),r.open()}function d(e,t){var r=e.url,a=e.content,i=e.template,s=e.templateUrl,l=e.component,u=e.componentUrl;function d(e){e&&("string"==typeof e?c.content=e:e.f7Component?e.f7Component.$mount((function(e){c.el=e,o.root.append(e)})):c.el=e,p())}function h(){return n.allowPageChange=!0,n}if(a)d(a);else if(i||s)try{n.modalTemplateLoader(i,s,t,d,h)}catch(e){throw n.allowPageChange=!0,e}else if(l||u)try{n.modalComponentLoader(o.root[0],l,u,t,d,h)}catch(e){throw n.allowPageChange=!0,e}else r?(n.xhr&&(n.xhr.abort(),n.xhr=!1),n.xhrRequest(r,t).then((function(e){c.content=e,p()})).catch((function(){n.allowPageChange=!0}))):p()}function h(e,t){d(e,Utils.extend(l,t))}function f(){n.allowPageChange=!0}return"url content component el componentUrl template templateUrl".split(" ").forEach((function(e){var t;c[e]&&!a&&(a=!0,d(((t={})[e]=c[e],t),l))})),a||"actions"!==e||p(),c.async&&c.async.call(n,l.route,n.currentRoute,h,f),c.asyncComponent&&asyncComponent(n,c.asyncComponent,h,f),n}function modalRemove(e){Utils.extend(e,{closeByRouter:!0}),e.close()}function backward(e,t){var r,a,n,o,i,s,l,c,u=this,p=$(e),d=u.app,h=u.view,f=Utils.extend({animate:u.params.animate,pushState:!0,replaceState:!1},t),v=u.params.masterDetailBreakpoint>0,m=v&&f.route&&f.route.route&&!0===f.route.route.master,g=u.dynamicNavbar,b=p,y=u.$el.children(".page-current"),w=v&&y.hasClass("page-master");if(b.length&&u.removeThemeElements(b),g&&(o=b.children(".navbar"),n=u.$navbarsEl,0===o.length&&b[0]&&b[0].f7Page&&(o=b[0].f7Page.$navbarEl),i=n.find(".navbar-current")),u.allowPageChange=!1,0===b.length||0===y.length)return u.allowPageChange=!0,u;if(u.removeThemeElements(b),f.route&&f.route.route&&f.route.route.keepAlive&&!f.route.route.keepAliveData&&(f.route.route.keepAliveData={pageEl:p[0]}),v){for(var C=u.$el.children(".page:not(.stacked)").filter((function(e,t){return t!==b[0]})),x=0;xu.history.indexOf(r.f7Page.route.url))&&!m&&r&&r.f7Page&&f.route.route.masterRoute&&(s=f.route.route.masterRoute.path===r.f7Page.route.route.path)}if(s&&r&&r.f7Page&&(l=u.history.indexOf(f.route.url)-u.history.indexOf(r.f7Page.route.url)==1),b.addClass("page-previous"+(m?" page-master":"")+(s?" page-master-detail":"")+(l?" page-master-detail-root":"")).removeClass("stacked").removeAttr("aria-hidden").trigger("page:unstack").trigger("page:position",{position:"previous"}),u.emit("pageUnstack",b[0]),u.emit("pagePosition",b[0],"previous"),(m||s)&&(b.trigger("page:role",{role:m?"master":"detail",root:!!l}),u.emit("pageRole",b[0],{role:m?"master":"detail",detailRoot:!!l})),g&&o.length>0&&(o.addClass("navbar-previous"+(m?" navbar-master":"")+(s?" navbar-master-detail":"")+(l?" navbar-master-detail-root":"")).removeClass("stacked").removeAttr("aria-hidden"),o.trigger("navbar:position",{position:"previous"}),u.emit("navbarPosition",o[0],"previous"),(m||l)&&u.emit("navbarRole",o[0],{role:m?"master":"detail",detailRoot:!!l})),f.force&&(y.prev(".page-previous:not(.stacked)").length>0||0===y.prev(".page-previous").length))if(u.history.indexOf(f.route.url)>=0?(c=u.history.length-u.history.indexOf(f.route.url)-1,u.history=u.history.slice(0,u.history.indexOf(f.route.url)+2),h.history=u.history):u.history[[u.history.length-2]]?u.history[u.history.length-2]=f.route.url:u.history.unshift(u.url),c&&u.params.stackPages)y.prevAll(".page-previous").each((function(e,t){var n,o=$(t);g&&(n=$(d.navbar.getElByPage(o))),o[0]!==b[0]&&o.index()>b.index()&&(u.initialPages.indexOf(o[0])>=0?(o.addClass("stacked"),o.trigger("page:stack"),u.emit("pageStack",o[0]),g&&n.addClass("stacked")):(u.pageCallback("beforeRemove",o,n,"previous",void 0,f),o[0]===r&&(a=!0),u.removePage(o),g&&n.length>0&&u.removeNavbar(n)))}));else{var k,E=y.prev(".page-previous:not(.stacked)");g&&(k=$(d.navbar.getElByPage(E))),u.params.stackPages&&u.initialPages.indexOf(E[0])>=0?(E.addClass("stacked"),E.trigger("page:stack"),u.emit("pageStack",E[0]),k.addClass("stacked")):E.length>0&&(u.pageCallback("beforeRemove",E,k,"previous",void 0,f),E[0]===r&&(a=!0),u.removePage(E),g&&k.length&&u.removeNavbar(k))}var S=b.parents(doc).length>0,T=b[0].f7Component;function O(){0===b.next(y).length&&(!S&&T?T.$mount((function(e){$(e).insertBefore(y)})):b.insertBefore(y)),g&&o.length&&(o.find(".title-large").length&&o.addClass("navbar-large"),o.insertBefore(i),i.length>0?o.insertBefore(i):(u.$navbarsEl.parents(doc).length||u.$el.prepend(u.$navbarsEl),n.append(o))),S?f.route&&f.route.route&&f.route.route.keepAlive&&!b[0].f7PageMounted&&(b[0].f7PageMounted=!0,u.pageCallback("mounted",b,o,"previous","current",f,y)):u.pageCallback("mounted",b,o,"previous","current",f,y)}if(f.preload){O(),f.route.route.tab&&u.tabLoad(f.route.route.tab,Utils.extend({},f,{history:!1,pushState:!1,preload:!0})),m&&(b.removeClass("page-master-stacked").trigger("page:masterunstack"),u.emit("pageMasterUnstack",b[0]),g&&($(d.navbar.getElByPage(b)).removeClass("navbar-master-stacked"),u.emit("navbarMasterUnstack",d.navbar.getElByPage(b)))),u.pageCallback("init",b,o,"previous","current",f,y);var P=b.prevAll(".page-previous:not(.stacked):not(.page-master)");return P.length>0&&P.each((function(e,t){var r,a=$(t);g&&(r=$(d.navbar.getElByPage(a))),u.params.stackPages&&u.initialPages.indexOf(t)>=0?(a.addClass("stacked"),a.trigger("page:stack"),u.emit("pageStack",a[0]),g&&r.addClass("stacked")):(u.pageCallback("beforeRemove",a,r,"previous",void 0),u.removePage(a),g&&r.length&&u.removeNavbar(r))})),u.allowPageChange=!0,u}if(!(Device.ie||Device.edge||Device.firefox&&!Device.ios)&&u.params.pushState&&f.pushState)if(f.replaceState){var R=u.params.pushStateRoot||"";History.replace(h.id,{url:f.route.url},R+u.params.pushStateSeparator+f.route.url)}else c?History.go(-c):History.back();if(f.replaceState?u.history[u.history.length-1]=f.route.url:(1===u.history.length&&u.history.unshift(u.url),u.history.pop()),u.saveHistory(),u.currentPageEl=b[0],g&&o.length?u.currentNavbarEl=o[0]:delete u.currentNavbarEl,u.currentRoute=f.route,(Device.ie||Device.edge||Device.firefox&&!Device.ios)&&u.params.pushState&&f.pushState)if(f.replaceState){var N=u.params.pushStateRoot||"";History.replace(h.id,{url:f.route.url},N+u.params.pushStateSeparator+f.route.url)}else c?History.go(-c):History.back();function D(){u.setPagePosition(b,"current",!1),u.setPagePosition(y,"next",!0),g&&(u.setNavbarPosition(o,"current",!1),u.setNavbarPosition(i,"next",!0)),u.pageCallback("afterOut",y,i,"current","next",f),u.pageCallback("afterIn",b,o,"previous","current",f),u.params.stackPages&&u.initialPages.indexOf(y[0])>=0?(y.addClass("stacked"),y.trigger("page:stack"),u.emit("pageStack",y[0]),g&&i.addClass("stacked")):(u.pageCallback("beforeRemove",y,i,"next",void 0,f),u.removePage(y),g&&i.length&&u.removeNavbar(i)),u.allowPageChange=!0,u.emit("routeChanged",u.currentRoute,u.previousRoute,u),(u.params.preloadPreviousPage||u.params[d.theme+"SwipeBack"])&&u.history[u.history.length-2]&&!m&&u.back(u.history[u.history.length-2],{preload:!0}),u.params.pushState&&History.clearRouterQueue()}if(O(),f.route.route.tab&&u.tabLoad(f.route.route.tab,Utils.extend({},f,{history:!1,pushState:!1})),v&&(w||a)&&h.checkMasterDetailBreakpoint(!1),u.pageCallback("init",b,o,"previous","current",f,y),u.pageCallback("beforeOut",y,i,"current","next",f),u.pageCallback("beforeIn",b,o,"previous","current",f),!f.animate||w&&d.width>=u.params.masterDetailBreakpoint)D();else{var L=u.params.transition;y[0]&&y[0].f7PageTransition&&(L=y[0].f7PageTransition,delete y[0].f7PageTransition),f.transition&&(L=f.transition),!L&&u.previousRoute&&u.previousRoute.route&&(L=u.previousRoute.route.transition),!L&&u.previousRoute&&u.previousRoute.route&&u.previousRoute.route.options&&(L=u.previousRoute.route.options.transition),u.setPagePosition(y,"current"),u.setPagePosition(b,"previous",!1),g&&(u.setNavbarPosition(i,"current"),u.setNavbarPosition(o,"previous",!1)),u.animate(y,b,i,o,"backward",L,(function(){D()}))}return u}function loadBack(e,t,r){var a=this;if(!a.allowPageChange&&!r)return a;var n=e,o=t,i=n.url,s=n.content,l=n.el,c=n.pageName,u=n.template,p=n.templateUrl,d=n.component,h=n.componentUrl;if(o.route.url&&a.url===o.route.url&&!o.reloadCurrent&&!o.reloadPrevious&&!a.params.allowDuplicateUrls)return!1;function f(e,t){return a.backward(e,Utils.extend(o,t))}function v(){return a.allowPageChange=!0,a}if(!o.route&&i&&(o.route=a.parseRouteUrl(i)),(i||p||h||d)&&(a.allowPageChange=!1),s)a.backward(a.getPageEl(s),o);else if(u||p)try{a.pageTemplateLoader(u,p,o,f,v)}catch(e){throw a.allowPageChange=!0,e}else if(l)a.backward(a.getPageEl(l),o);else if(c)a.backward(a.$el.children('.page[data-name="'+c+'"]').eq(0),o);else if(d||h)try{a.pageComponentLoader(a.el,d,h,o,f,v)}catch(e){throw a.allowPageChange=!0,e}else i&&(a.xhr&&(a.xhr.abort(),a.xhr=!1),a.xhrRequest(i,o).then((function(e){a.backward(a.getPageEl(e),o)})).catch((function(){a.allowPageChange=!0})));return a}function back(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,a,n,o=this;if(o.swipeBackActive)return o;"object"==typeof e[0]?a=e[0]||{}:(r=e[0],a=e[1]||{});var i=a.name,s=a.params,l=a.query;if(i)return(r=o.generateUrl({name:i,params:s,query:l}))?o.back(r,Utils.extend({},a,{name:null,params:null,query:null})):o;var c=o.app;appRouterCheck(o,"back");var u,p=o.currentRoute.modal;if(p||"popup popover sheet loginScreen actions customModal panel".split(" ").forEach((function(e){o.currentRoute.route[e]&&(p=!0,u=e)})),p){var d,h=o.currentRoute.modal||o.currentRoute.route.modalInstance||c[u].get(),f=o.history[o.history.length-2];if(h&&h.$el){var v=h.$el.prevAll(".modal-in");if(v.length&&v[0].f7Modal){var m=v[0];o.$el.parents(m).length||(d=m.f7Modal.route)}}if(d||(d=o.findMatchingRoute(f)),!d&&f&&(d={url:f,path:f.split("?")[0],query:Utils.parseUrlQuery(f),route:{path:f.split("?")[0],url:f}}),!(r&&0!==r.replace(/[# ]/g,"").trim().length||d&&h))return o;var g=a.force&&d&&r;if(d&&h){var b=Device.ie||Device.edge||Device.firefox&&!Device.ios,y=o.params.pushState&&!1!==a.pushState,w=o.currentRoute&&o.currentRoute.route&&o.currentRoute.route.options&&!1===o.currentRoute.route.options.pushState;!y||b||w||History.back(),o.currentRoute=d,o.history.pop(),o.saveHistory(),y&&b&&!w&&History.back(),o.modalRemove(h),g&&o.navigate(r,{reloadCurrent:!0})}else h&&(o.modalRemove(h),r&&o.navigate(r,{reloadCurrent:!0}));return o}var C,x=o.$el.children(".page-current").prevAll(".page-previous:not(.page-master)").eq(0);if(o.params.masterDetailBreakpoint>0){var k=[];o.$el.children(".page").each((function(e,t){k.push(t.className)}));var E=o.$el.children(".page-current").prevAll(".page-master").eq(0);if(E.length){var $=o.history[o.history.length-2],S=o.findMatchingRoute($);S&&E[0].f7Page&&S.route===E[0].f7Page.route.route&&(x=E,a.preload||(C=c.width>=o.params.masterDetailBreakpoint))}}if(!a.force&&x.length&&!C){if(o.params.pushState&&x[0].f7Page&&o.history[o.history.length-2]!==x[0].f7Page.route.url)return o.back(o.history[o.history.length-2],Utils.extend(a,{force:!0})),o;var T=x[0].f7Page.route;return processRouteQueue.call(o,T,o.currentRoute,(function(){o.loadBack({el:x},Utils.extend(a,{route:T}))}),(function(){})),o}if("#"===r&&(r=void 0),r&&"/"!==r[0]&&0!==r.indexOf("#")&&(r=((o.path||"/")+r).replace("//","/")),!r&&o.history.length>1&&(r=o.history[o.history.length-2]),C&&!a.force&&o.history[o.history.length-3])return o.back(o.history[o.history.length-3],Utils.extend({},a||{},{force:!0,animate:!1}));if(C&&!a.force)return o;if((n=o.findMatchingRoute(r))||r&&(n={url:r,path:r.split("?")[0],query:Utils.parseUrlQuery(r),route:{path:r.split("?")[0],url:r}}),!n)return o;if(n.route.redirect)return redirect.call(o,"back",n,a);var O,P={};if(n.route.options?Utils.extend(P,n.route.options,a):Utils.extend(P,a),P.route=n,P&&P.context&&(n.context=P.context,P.route.context=P.context),P.force&&o.params.stackPages&&(o.$el.children(".page-previous.stacked").each((function(e,t){t.f7Page&&t.f7Page.route&&t.f7Page.route.url===n.url&&(O=!0,o.loadBack({el:t},P))})),O))return o;function R(){var e=!1;function t(e,t){o.allowPageChange=!1,t&&t.context&&(n.context?n.context=Utils.extend({},n.context,t.context):n.context=t.context,P.route.context=n.context),o.loadBack(e,Utils.extend(P,t),!0)}function r(){o.allowPageChange=!0}n.route.keepAlive&&n.route.keepAliveData&&(o.loadBack({el:n.route.keepAliveData.pageEl},P),e=!0),"url content component pageName el componentUrl template templateUrl".split(" ").forEach((function(t){var r;n.route[t]&&!e&&(e=!0,o.loadBack(((r={})[t]=n.route[t],r),P))})),e||(n.route.async&&(o.allowPageChange=!1,n.route.async.call(o,n,o.currentRoute,t,r)),n.route.asyncComponent&&asyncComponent(o,n.route.asyncComponent,t,r))}function N(){o.allowPageChange=!0}return P.preload?R():processRouteQueue.call(o,n,o.currentRoute,(function(){n.route.modules?c.loadModules(Array.isArray(n.route.modules)?n.route.modules:[n.route.modules]).then((function(){R()})).catch((function(){N()})):R()}),(function(){N()})),o}function clearPreviousPages(e){appRouterCheck(e,"clearPreviousPages");var t=e.app,r=e.dynamicNavbar;e.$el.children(".page").filter((function(t,r){return!(!e.currentRoute||!e.currentRoute.modal&&!e.currentRoute.panel)||r!==e.currentPageEl})).each((function(a,n){var o=$(n),i=$(t.navbar.getElByPage(o));e.params.stackPages&&e.initialPages.indexOf(o[0])>=0?(o.addClass("stacked"),r&&i.addClass("stacked")):(e.pageCallback("beforeRemove",o,i,"previous",void 0,{}),e.removePage(o),r&&i.length&&e.removeNavbar(i))}))}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,r){e.call(this,{},[void 0===r?t:r]);var a=this;a.isAppRouter=void 0===r,a.isAppRouter?Utils.extend(!1,a,{app:t,params:t.params.view,routes:t.routes||[],cache:t.cache}):Utils.extend(!1,a,{app:t,view:r,viewId:r.id,params:r.params,routes:r.routes,$el:r.$el,el:r.el,$navbarsEl:r.$navbarsEl,navbarsEl:r.navbarsEl,history:r.history,scrollHistory:r.scrollHistory,cache:t.cache,dynamicNavbar:"ios"===t.theme&&r.params.iosDynamicNavbar,initialPages:[],initialNavbars:[]}),a.useModules(),a.tempDom=doc.createElement("div"),a.allowPageChange=!0;var n={},o={};return Object.defineProperty(a,"currentRoute",{enumerable:!0,configurable:!0,set:function(e){void 0===e&&(e={}),o=Utils.extend({},n),(n=e)&&(a.url=n.url,a.emit("routeChange",e,o,a))},get:function(){return n}}),Object.defineProperty(a,"previousRoute",{enumerable:!0,configurable:!0,get:function(){return o},set:function(e){o=e}}),a}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.animatableNavElements=function(e,t,r,a,n){var o,i,s=this.dynamicNavbar,l=this.params.iosAnimateNavbarBackIcon;function c(e,t){var r,a=e.hasClass("sliding")||t.hasClass("sliding"),n=e.hasClass("subnavbar"),o=!a||!n,i=e.find(".back .icon");return a&&l&&e.hasClass("left")&&i.length>0&&i.next("span").length&&(e=i.next("span"),r=!0),{$el:e,isIconLabel:r,leftOffset:e[0].f7NavbarLeftOffset,rightOffset:e[0].f7NavbarRightOffset,isSliding:a,isSubnavbar:n,needsOpacityTransition:o}}return s&&(o=[],i=[],e.children(".navbar-inner").children(".left, .right, .title, .subnavbar").each((function(t,i){var s=$(i);s.hasClass("left")&&a&&"forward"===n||s.hasClass("title")&&r||o.push(c(s,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,o){var s=$(o);s.hasClass("left")&&r&&!a&&"forward"===n||s.hasClass("left")&&r&&"backward"===n||s.hasClass("title")&&a||i.push(c(s,t.children(".navbar-inner")))})),[i,o].forEach((function(e){e.forEach((function(t){var r=t,a=t.isSliding,n=t.$el,s=e===i?o:i;a&&n.hasClass("title")&&s&&s.forEach((function(e){if(e.isIconLabel){var t=e.$el[0];r.leftOffset+=t&&t.offsetLeft||0}}))}))}))),{newNavEls:o,oldNavEls:i}},t.prototype.animate=function(e,t,r,a,n,o,i){var s=this;if(s.params.animateCustom)s.params.animateCustom.apply(s,[e,t,r,a,n,i]);else{var l=s.dynamicNavbar,c="ios"===s.app.theme;if(o){var u="router-transition-custom router-transition-"+o+"-"+n;return("forward"===n?t:e).animationEnd((function(){s.$el.removeClass(u),l&&s.$navbarsEl.length&&(a&&s.$navbarsEl.prepend(a),r&&s.$navbarsEl.prepend(r)),i&&i()})),l&&(a&&t&&(s.setNavbarPosition(a,""),a.removeClass("navbar-next navbar-previous navbar-current"),t.prepend(a)),r&&e&&(s.setNavbarPosition(r,""),r.removeClass("navbar-next navbar-previous navbar-current"),e.prepend(r))),void s.$el.addClass(u)}var p,d,h,f,v,m,g="router-transition-"+n+" router-transition";if(c&&l){s.params.masterDetailBreakpoint>0&&s.app.width>=s.params.masterDetailBreakpoint&&(r.hasClass("navbar-master")&&a.hasClass("navbar-master-detail")||r.hasClass("navbar-master-detail")&&a.hasClass("navbar-master"))||(v=r&&r.hasClass("navbar-large"),m=a&&a.hasClass("navbar-large"),h=v&&!r.hasClass("navbar-large-collapsed"),f=m&&!a.hasClass("navbar-large-collapsed"));var b=s.animatableNavElements(a,r,f,h,n);p=b.newNavEls,d=b.oldNavEls}("forward"===n?t:e).animationEnd((function(){s.dynamicNavbar&&(a&&(a.removeClass("router-navbar-transition-to-large router-navbar-transition-from-large"),a.addClass("navbar-no-title-large-transition"),Utils.nextFrame((function(){a.removeClass("navbar-no-title-large-transition")}))),r&&r.removeClass("router-navbar-transition-to-large router-navbar-transition-from-large"),a.hasClass("sliding")||a.children(".navbar-inner.sliding").length?a.find(".title, .left, .right, .left .icon, .subnavbar").transform(""):a.find(".sliding").transform(""),r.hasClass("sliding")||r.children(".navbar-inner.sliding").length?r.find(".title, .left, .right, .left .icon, .subnavbar").transform(""):r.find(".sliding").transform("")),s.$el.removeClass(g),i&&i()})),l?(y(0),Utils.nextFrame((function(){y(1),s.$el.addClass(g)}))):s.$el.addClass(g)}function y(e){c&&l&&(1===e&&(f&&(a.addClass("router-navbar-transition-to-large"),r.addClass("router-navbar-transition-to-large")),h&&(a.addClass("router-navbar-transition-from-large"),r.addClass("router-navbar-transition-from-large"))),p.forEach((function(t){var r=t.$el,a="forward"===n?t.rightOffset:t.leftOffset;t.isSliding&&(t.isSubnavbar&&m?r[0].style.setProperty("transform","translate3d("+a*(1-e)+"px, calc(-1 * var(--f7-navbar-large-collapse-progress) * var(--f7-navbar-large-title-height)), 0)","important"):r.transform("translate3d("+a*(1-e)+"px,0,0)"))})),d.forEach((function(t){var r=t.$el,a="forward"===n?t.leftOffset:t.rightOffset;t.isSliding&&(t.isSubnavbar&&v?r.transform("translate3d("+a*e+"px, calc(-1 * var(--f7-navbar-large-collapse-progress) * var(--f7-navbar-large-title-height)), 0)"):r.transform("translate3d("+a*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),r=t&&t[0]&&t[0].f7Page;r&&r.route&&r.route.route&&r.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,r){var a=this.view,n=this.app,o=$(t),i=e;r&&(i+=":not(.stacked)");var s=o.find(i).filter((function(e,t){return 0===$(t).parents(".popup, .dialog, .popover, .actions-modal, .sheet-modal, .login-screen, .page").length}));return s.length>1&&("string"==typeof a.selector&&(s=o.find(a.selector+" "+i)),s.length>1&&(s=o.find("."+n.params.viewMainClass+" "+i))),1===s.length?s:(r||(s=this.findElement(i,o,!0)),s&&1===s.length?s:s&&s.length>1?$(s[0]):void 0)},t.prototype.flattenRoutes=function(e){void 0===e&&(e=this.routes);var t=this,r=[];return e.forEach((function(e){var a=!1;if("tabs"in e&&e.tabs){var n=e.tabs.map((function(t){var r=Utils.extend({},e,{path:(e.path+"/"+t.path).replace("///","/").replace("//","/"),parentPath:e.path,tab:t});return delete r.tabs,delete r.routes,r}));a=!0,r=r.concat(t.flattenRoutes(n))}if("detailRoutes"in e){var o=e.detailRoutes.map((function(t){var r=Utils.extend({},t);return r.masterRoute=e,r.masterRoutePath=e.path,r}));r=r.concat(e,t.flattenRoutes(o))}if("routes"in e){var i=e.routes.map((function(t){var r=Utils.extend({},t);return r.path=(e.path+"/"+r.path).replace("///","/").replace("//","/"),r}));r=a?r.concat(t.flattenRoutes(i)):r.concat(e,t.flattenRoutes(i))}"routes"in e||"tabs"in e&&e.tabs||"detailRoutes"in e||r.push(e)})),r},t.prototype.parseRouteUrl=function(e){if(!e)return{};var t=Utils.parseUrlQuery(e),r=e.split("#")[1],a=e.split("#")[0].split("?")[0];return{query:t,hash:r,params:{},url:e,path:a}},t.prototype.generateUrl=function(e){if(void 0===e&&(e={}),"string"==typeof e)return e;var t=e.name,r=e.path,a=e.params,n=e.query;if(!t&&!r)throw new Error('Framework7: "name" or "path" parameter is required');var o=t?this.findRouteByKey("name",t):this.findRouteByKey("path",r);if(!o)throw t?new Error('Framework7: route with name "'+t+'" not found'):new Error('Framework7: route with path "'+r+'" not found');var i=this.constructRouteUrl(o,{params:a,query:n});if(!i)throw new Error("Framework7: can't construct URL for route with name \""+t+'"');return i},t.prototype.constructRouteUrl=function(e,t){void 0===t&&(t={});var r,a=t.params,n=t.query,o=e.path,i=compile(o);try{r=i(a||{})}catch(e){throw new Error("Framework7: error constructing route URL from passed params:\nRoute: "+o+"\n"+e.toString())}return n&&(r+="string"==typeof n?"?"+n:"?"+Utils.serializeObject(n)),r},t.prototype.findTabRoute=function(e){var t,r=$(e),a=this.currentRoute.route.parentPath,n=r.attr("id");return this.flattenRoutes(this.routes).forEach((function(e){e.parentPath===a&&e.tab&&e.tab.id===n&&(t=e)})),t},t.prototype.findRouteByKey=function(e,t){var r,a=this.routes;return this.flattenRoutes(a).forEach((function(a){r||a[e]===t&&(r=a)})),r},t.prototype.findMatchingRoute=function(e){if(e){var t,r=this.routes,a=this.flattenRoutes(r),n=this.parseRouteUrl(e),o=n.path,i=n.query,s=n.hash,l=n.params;return a.forEach((function(r){if(!t){var a,n,c=[],u=[r.path];if(r.alias&&("string"==typeof r.alias?u.push(r.alias):Array.isArray(r.alias)&&r.alias.forEach((function(e){u.push(e)}))),u.forEach((function(e){a||(a=pathToRegexp(e,c).exec(o))})),a)c.forEach((function(e,t){if("number"!=typeof e.name){var r=a[t+1];l[e.name]=null==r?r:decodeURIComponent(r)}})),r.parentPath&&(n=o.split("/").slice(0,r.parentPath.split("/").length-1).join("/")),t={query:i,hash:s,params:l,url:e,path:o,parentPath:n,route:r,name:r.name}}})),t}},t.prototype.replaceRequestUrlParams=function(e,t){void 0===e&&(e=""),void 0===t&&(t={});var r=e;return"string"==typeof r&&r.indexOf("{{")>=0&&t&&t.route&&t.route.params&&Object.keys(t.route.params).length&&Object.keys(t.route.params).forEach((function(e){var a=new RegExp("{{"+e+"}}","g");r=r.replace(a,t.route.params[e]||"")})),r},t.prototype.removeFromXhrCache=function(e){for(var t=this.cache.xhr,r=!1,a=0;a=0;return a.passRouteQueryToRequest&&t&&t.route&&t.route.query&&Object.keys(t.route.query).length&&(o+=(i?"&":"?")+Utils.serializeObject(t.route.query),i=!0),a.passRouteParamsToRequest&&t&&t.route&&t.route.params&&Object.keys(t.route.params).length&&(o+=(i?"&":"?")+Utils.serializeObject(t.route.params),i=!0),o.indexOf("{{")>=0&&(o=r.replaceRequestUrlParams(o,t)),a.xhrCacheIgnoreGetParameters&&o.indexOf("?")>=0&&(o=o.split("?")[0]),new Promise((function(e,i){if(a.xhrCache&&!n&&o.indexOf("nocache")<0&&a.xhrCacheIgnore.indexOf(o)<0)for(var s=0;s=200&&n.status<300||0===n.status?(a.xhrCache&&""!==n.responseText&&(r.removeFromXhrCache(o),r.cache.xhr.push({url:o,time:Utils.now(),content:n.responseText})),r.emit("routerAjaxSuccess",n,t),e(n.responseText)):(r.emit("routerAjaxError",n,t),i(n))},error:function(e){r.emit("routerAjaxError",e,t),i(e)}})}))},t.prototype.setNavbarPosition=function(e,t,r){e.removeClass("navbar-previous navbar-current navbar-next"),t&&e.addClass("navbar-"+t),!1===r?e.removeAttr("aria-hidden"):!0===r&&e.attr("aria-hidden","true"),e.trigger("navbar:position",{position:t}),this.emit("navbarPosition",e[0],t)},t.prototype.setPagePosition=function(e,t,r){e.removeClass("page-previous page-current page-next"),e.addClass("page-"+t),!1===r?e.removeAttr("aria-hidden"):!0===r&&e.attr("aria-hidden","true"),e.trigger("page:position",{position:t}),this.emit("pagePosition",e[0],t)},t.prototype.removeThemeElements=function(e){var t,r=this.app.theme;"ios"===r?t=".md-only, .aurora-only, .if-md, .if-aurora, .if-not-ios, .not-ios":"md"===r?t=".ios-only, .aurora-only, .if-ios, .if-aurora, .if-not-md, .not-md":"aurora"===r&&(t=".ios-only, .md-only, .if-ios, .if-md, .if-not-aurora, .not-aurora"),$(e).find(t).remove()},t.prototype.getPageData=function(e,t,r,a,n,o){void 0===n&&(n={});var i,s,l=$(e).eq(0),c=$(t).eq(0),u=l[0].f7Page||{};if(("next"===r&&"current"===a||"current"===r&&"previous"===a)&&(i="forward"),("current"===r&&"next"===a||"previous"===r&&"current"===a)&&(i="backward"),u&&!u.fromPage){var p=$(o);p.length&&(s=p[0].f7Page)}(s=u.pageFrom||s)&&s.pageFrom&&(s.pageFrom=null);var d={app:this.app,view:this.view,router:this,$el:l,el:l[0],$pageEl:l,pageEl:l[0],$navbarEl:c,navbarEl:c[0],name:l.attr("data-name"),position:r,from:r,to:a,direction:i,route:u.route?u.route:n,pageFrom:s};return l[0].f7Page=d,d},t.prototype.pageCallback=function(e,t,r,a,n,o,i){if(void 0===o&&(o={}),t){var s=this,l=$(t);if(l.length){var c=$(r),u=o.route,p=s.params.restoreScrollTopOnBack&&!(s.params.masterDetailBreakpoint>0&&l.hasClass("page-master")&&s.app.width>=s.params.masterDetailBreakpoint),d=l[0].f7Page&&l[0].f7Page.route&&l[0].f7Page.route.route&&l[0].f7Page.route.route.keepAlive;"beforeRemove"===e&&d&&(e="beforeUnmount");var h="page"+(e[0].toUpperCase()+e.slice(1,e.length)),f="page:"+e.toLowerCase(),v={};(v="beforeRemove"===e&&l[0].f7Page?Utils.extend(l[0].f7Page,{from:a,to:n,position:a}):s.getPageData(l[0],c[0],a,n,u,i)).swipeBack=!!o.swipeBack;var m=o.route?o.route.route:{},g=m.on;void 0===g&&(g={});var b=m.once;if(void 0===b&&(b={}),o.on&&Utils.extend(g,o.on),o.once&&Utils.extend(b,o.once),"mounted"===e&&C(),"init"===e){if(p&&("previous"===a||!a)&&"current"===n&&s.scrollHistory[v.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(s.scrollHistory[v.route.url])}if(C(),l[0].f7PageInitialized)return l.trigger("page:reinit",v),void s.emit("pageReinit",v);l[0].f7PageInitialized=!0}if(p&&"beforeOut"===e&&"current"===a&&"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)")}))),s.scrollHistory[v.route.url]=w.scrollTop()}p&&"beforeOut"===e&&"current"===a&&"next"===n&&delete s.scrollHistory[v.route.url],l.trigger(f,v),s.emit(h,v),"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),d||(l[0].f7Page&&l[0].f7Page.navbarEl&&delete l[0].f7Page.navbarEl.f7Page,l[0].f7Page=null))}}function C(){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(s),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(s),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),r=t.query,a=t.hash,n=t.params,o=t.url,i=t.path;if(this.currentRoute&&Utils.extend(this.currentRoute,{query:r,hash:a,params:n,url:o,path:i}),this.params.pushState){var s=this.params.pushStateRoot||"";History.replace(this.view.id,{url:e},s+this.params.pushStateSeparator+e)}this.saveHistory(),this.emit("routeUrlUpdate",this.currentRoute,this)},t.prototype.init=function(){var e=this,t=e.app,r=e.view;(r&&e.params.iosSwipeBack&&"ios"===t.theme||r&&e.params.mdSwipeBack&&"md"===t.theme||r&&e.params.auroraSwipeBack&&"aurora"===t.theme)&&SwipeBack(e);var a,n,o=e.params.url,i=doc.location.href.split(doc.location.origin)[1],s=e.params,l=s.pushState,c=s.pushStateOnLoad,u=s.pushStateSeparator,p=s.pushStateAnimateOnLoad,d=e.params.pushStateRoot;if(win.cordova&&l&&!u&&!d&&doc.location.pathname.indexOf("index.html")&&(console.warn("Framework7: wrong or not complete pushState configuration, trying to guess pushStateRoot"),d=doc.location.pathname.split("index.html")[0]),l&&c?(d&&i.indexOf(d)>=0&&""===(i=i.split(d)[1])&&(i="/"),o=u.length>0&&i.indexOf(u)>=0?i.split(u)[1]:i,e.restoreHistory(),e.history.indexOf(o)>=0?e.history=e.history.slice(0,e.history.indexOf(o)+1):e.params.url===o?e.history=[o]:History.state&&History.state[r.id]&&History.state[r.id].url===e.history[e.history.length-1]?o=e.history[e.history.length-1]:e.history=[i.split(u)[0]||"/",o],e.history.length>1?a=!0:e.history=[],e.saveHistory()):(o||(o=i),doc.location.search&&o.indexOf("?")<0&&(o+=doc.location.search),doc.location.hash&&o.indexOf("#")<0&&(o+=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(o))||(n=Utils.extend(e.parseRouteUrl(o),{route:{url:o,path:o.split("?")[0]}})),e.params.stackPages&&e.$el.children(".page").each((function(t,r){var a=$(r);e.initialPages.push(a[0]),e.dynamicNavbar&&a.children(".navbar").length>0&&e.initialNavbars.push(a.children(".navbar")[0])})),0===e.$el.children(".page:not(.stacked)").length&&o&&e.params.loadInitialPage)e.navigate(o,{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,a){var n,o=$(a);e.setPagePosition(o,"current"),e.dynamicNavbar&&((n=o.children(".navbar")).length>0?(e.$navbarsEl.parents(doc).length||e.$el.prepend(e.$navbarsEl),e.setNavbarPosition(n,"current"),e.$navbarsEl.append(n),n.children(".title-large").length&&n.addClass("navbar-large"),o.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&&(o.addClass("page-master"),o.trigger("page:role",{role:"master"}),n&&n.length&&n.addClass("navbar-master"),r.checkMasterDetailBreakpoint());var i={route:e.currentRoute};e.currentRoute&&e.currentRoute.route&&e.currentRoute.route.options&&Utils.extend(i,e.currentRoute.route.options),e.currentPageEl=o[0],e.dynamicNavbar&&n.length&&(e.currentNavbarEl=n[0]),e.removeThemeElements(o),e.dynamicNavbar&&n.length&&e.removeThemeElements(n),i.route.route.tab&&(h=!0,e.tabLoad(i.route.route.tab,Utils.extend({},i))),e.pageCallback("init",o,n,"current",void 0,i)})),a&&e.navigate(o,{initial:!0,pushState:!1,history:!1,animate:p,once:{pageAfterIn:function(){(e.params.preloadPreviousPage||e.params[t.theme+"SwipeBack"])&&e.history.length>2&&e.back({preload:!0})}}}),a||h||(e.history.push(o),e.saveHistory())}!(o&&l&&c)||History.state&&History.state[r.id]||History.initViewState(r.id,{url:o}),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)}};function resizableView(e){var t=e.app;if(!e.resizableInitialized){Utils.extend(e,{resizable:!0,resizableWidth:null,resizableInitialized:!0});var r=$("html"),a=e.$el;if(a){var n,o,i,s,l,c,u,p={};(n=e.$el.children(".view-resize-handler")).length||(e.$el.append('
'),n=e.$el.children(".view-resize-handler")),e.$resizeHandlerEl=n,a.addClass("view-resizable");var d=!!Support.passiveListener&&{passive:!0};e.$el.on(t.touchEvents.start,".view-resize-handler",f,d),t.on("touchmove:active",v),t.on("touchend:passive",m),t.on("resize",g),e.on("beforeOpen",g),e.once("viewDestroy",(function(){a.removeClass("view-resizable"),e.$resizeHandlerEl.remove(),e.$el.off(t.touchEvents.start,".view-resize-handler",f,d),t.off("touchmove:active",v),t.off("touchend:passive",m),t.off("resize",g),e.off("beforeOpen",g)}))}}function h(e){if(!e)return null;if(e.indexOf("%")>=0||e.indexOf("vw")>=0)return parseInt(e,10)/100*t.width;var r=parseInt(e,10);return Number.isNaN(r)?null:r}function f(t){if(e.resizable&&a.hasClass("view-resizable")&&a.hasClass("view-master-detail")){p.x="touchstart"===t.type?t.targetTouches[0].pageX:t.pageX,p.y="touchstart"===t.type?t.targetTouches[0].pageY:t.pageY,i=!1,o=!0;var r=a.children(".page-master");c=h(r.css("min-width")),u=h(r.css("max-width"))}}function v(d){if(o){d.f7PreventSwipePanel=!0;var h="touchmove"===d.type?d.targetTouches[0].pageX:d.pageX;i||(l=n[0].offsetLeft+n[0].offsetWidth,a.addClass("view-resizing"),r.css("cursor","col-resize")),i=!0,d.preventDefault(),s=h-p.x;var f=l+s;c&&!Number.isNaN(c)&&(f=Math.max(f,c)),u&&!Number.isNaN(u)&&(f=Math.min(f,u)),f=Math.min(Math.max(f,0),t.width),e.resizableWidth=f,r[0].style.setProperty("--f7-page-master-width",f+"px"),a.trigger("view:resize",f),e.emit("local::resize viewResize",e,f)}}function m(){if($("html").css("cursor",""),!o||!i)return o=!1,void(i=!1);o=!1,i=!1,r[0].style.setProperty("--f7-page-master-width",e.resizableWidth+"px"),a.removeClass("view-resizing")}function g(){e.resizableWidth&&(c=h(n.css("min-width")),u=h(n.css("max-width")),c&&!Number.isNaN(c)&&e.resizableWidthu&&(e.resizableWidth=Math.min(e.resizableWidth,u)),e.resizableWidth=Math.min(Math.max(e.resizableWidth,0),t.width),r[0].style.setProperty("--f7-page-master-width",e.resizableWidth+"px"))}}var View=function(e){function t(t,r,a){void 0===a&&(a={}),e.call(this,a,[t]);var n,o,i,s=t,l=$(r),c=this;if(0===l.length){var u="Framework7: can't create a View instance because ";throw new Error(u+="string"==typeof r?'the selector "'+r+"\" didn't match any element":"el must be an HTMLElement or Dom7 object")}return c.params=Utils.extend({routes:[],routesAdd:[]},s.params.view,a),c.params.routes.length>0?c.routes=c.params.routes:c.routes=[].concat(s.routes,c.params.routesAdd),n="string"==typeof r?r:(l.attr("id")?"#"+l.attr("id"):"")+(l.attr("class")?"."+l.attr("class").replace(/ /g,".").replace(".active",""):""),"ios"===s.theme&&c.params.iosDynamicNavbar&&0===(o=l.children(".navbars").eq(0)).length&&(o=$('')),Utils.extend(!1,c,{app:s,$el:l,el:l[0],name:c.params.name,main:c.params.main||l.hasClass("view-main"),$navbarsEl:o,navbarsEl:o?o[0]:void 0,selector:n,history:[],scrollHistory:{}}),l[0].f7View=c,c.useModules(),s.views.push(c),c.main&&(s.views.main=c),c.name&&(s.views[c.name]=c),c.index=s.views.indexOf(c),i=c.name?"view_"+c.name:c.main?"view_main":"view_"+c.index,c.id=i,s.initialized?c.init():s.on("init",(function(){c.init()})),c}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,r=this.$el.hasClass("view-master-detail"),a=t.width>=this.params.masterDetailBreakpoint&&this.$el.children(".page-master").length;void 0===e&&a||!0===e?(this.$el.addClass("view-master-detail"),r||(this.emit("local::masterDetailBreakpoint viewMasterDetailBreakpoint",this),this.$el.trigger("view:masterDetailBreakpoint"))):(this.$el.removeClass("view-master-detail"),r&&(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(),this.params.masterDetailResizable&&resizableView(this),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 r=$(t.target),a=r.closest("a"),n=a.length>0,o=n&&a.attr("href");if(n&&(a.is(e.params.clicks.externalLinks)||o&&o.indexOf("javascript:")>=0)){var i=a.attr("target");o&&win.cordova&&win.cordova.InAppBrowser&&("_system"===i||"_blank"===i)&&(t.preventDefault(),win.cordova.InAppBrowser.open(o,i))}else{Object.keys(e.modules).forEach((function(a){var n=e.modules[a].clicks;n&&(t.preventF7Router||Object.keys(n).forEach((function(a){var o=r.closest(a).eq(0);o.length>0&&n[a].call(e,o,o.dataset(),t)})))}));var s={};if(n&&(t.preventDefault(),s=a.dataset()),!t.preventF7Router)if(!a.hasClass("prevent-router")&&!a.hasClass("router-prevent"))if(o&&o.length>0&&"#"!==o[0]||a.hasClass("back")){var l;if(s.view&&"current"===s.view?l=e.views.current:s.view?l=$(s.view)[0].f7View:(l=r.parents(".view")[0]&&r.parents(".view")[0].f7View,!a.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(s.context&&"string"==typeof s.context)try{s.context=JSON.parse(s.context)}catch(e){}a[0].f7RouteProps&&(s.props=a[0].f7RouteProps),a.hasClass("back")?l.router.back(o,s):l.router.navigate(o,s)}}}))}View.use(RouterModule);var ClicksModule={name:"clicks",params:{clicks:{externalLinks:".external"}},on:{init:function(){initClicks(this)}}},RouterTemplateLoaderModule={name:"routerTemplateLoader",proto:{templateLoader:function(e,t,r,a,n){var o=this;function i(e){var t,i;try{if("function"==typeof(i=r.context||{}))i=i.call(o);else if("string"==typeof i)try{i=JSON.parse(i)}catch(e){throw n(),e}t="function"==typeof e?e(i):Template7.compile(e)(Utils.extend({},i||{},{$app:o.app,$root:Utils.extend({},o.app.data,o.app.methods),$route:r.route,$f7route:r.route,$router:o,$f7router:o,$theme:{ios:"ios"===o.app.theme,md:"md"===o.app.theme,aurora:"aurora"===o.app.theme}}))}catch(e){throw n(),e}a(t,{context:i})}t?(o.xhr&&(o.xhr.abort(),o.xhr=!1),o.xhrRequest(t,r).then((function(e){i(e)})).catch((function(){n()}))):i(e)},modalTemplateLoader:function(e,t,r,a,n){return this.templateLoader(e,t,r,(function(e){a(e)}),n)},tabTemplateLoader:function(e,t,r,a,n){return this.templateLoader(e,t,r,(function(e){a(e)}),n)},pageTemplateLoader:function(e,t,r,a,n){var o=this;return o.templateLoader(e,t,r,(function(e,t){void 0===t&&(t={}),a(o.getPageEl(e),t)}),n)}}},RouterComponentLoaderModule={name:"routerComponentLoader",proto:{componentLoader:function(e,t,r,a,n){void 0===r&&(r={});var o,i=this,s=i.app,l="string"==typeof e?e:t,c=i.replaceRequestUrlParams(l,r);function u(e){var t=r.context||{};if("function"==typeof t)t=t.call(i);else if("string"==typeof t)try{t=JSON.parse(t)}catch(e){throw n(e),e}var o=Utils.merge({},t,{$route:r.route,$f7route:r.route,$router:i,$f7router:i,$theme:{ios:"ios"===s.theme,md:"md"===s.theme,aurora:"aurora"===s.theme}});r.componentOptions&&r.componentOptions.el&&(e.el=r.componentOptions.el),r.componentOptions&&r.componentOptions.root&&(e.root=r.componentOptions.root),s.component.create(e,o).then((function(e){a(e.el)})).catch((function(e){throw n(e),new Error(e)}))}c&&i.params.componentCache&&i.cache.components.forEach((function(e){e.url===c&&(o=e.component)})),c&&o?u(o):c&&!o?(i.xhr&&(i.xhr.abort(),i.xhr=!1),i.xhrRequest(l,r).then((function(e){var t=s.component.parse(e);i.params.componentCache&&i.cache.components.push({url:c,component:t}),u(t)})).catch((function(e){throw n(),e}))):u(e)},modalComponentLoader:function(e,t,r,a,n,o){this.componentLoader(t,r,a,(function(e){n(e)}),o)},tabComponentLoader:function(e,t,r,a,n,o){this.componentLoader(t,r,a,(function(e){n(e)}),o)},pageComponentLoader:function(e,t,r,a,n,o){this.componentLoader(t,r,a,(function(e,t){void 0===t&&(t={}),n(e,t)}),o)}}};function vnode(e,t,r,a,n){return{sel:e,data:t,children:r,text:a,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,r){if(e.ns="http://www.w3.org/2000/svg","foreignObject"!==r&&void 0!==t)for(var a=0;a0&&customComponents[n];if(p&&(i.push((function(r){(r.sel===n||u)&&createCustomComponent({app:t,vnode:r,tagName:n,data:e})})),s.push((function(e){destroyCustomComponent(e)})),l.push((function(e,t){updateCustomComponent(t)}))),!p){if(!e||!e.attrs||!e.attrs.class)return o;e.attrs.class.split(" ").forEach((function(e){r||i.push.apply(i,t.getVnodeHooks("insert",e)),s.push.apply(s,t.getVnodeHooks("destroy",e)),l.push.apply(l,t.getVnodeHooks("update",e)),c.push.apply(c,t.getVnodeHooks("postpatch",e))}))}return a&&!r&&c.push((function(e,t){var r=t||e;r&&r.data&&r.data.context&&r.data.context.$options.updated&&r.data.context.$hook("updated")})),0===i.length&&0===s.length&&0===l.length&&0===c.length||(i.length&&(o.insert=function(e){i.forEach((function(t){return t(e)}))}),s.length&&(o.destroy=function(e){s.forEach((function(t){return t(e)}))}),l.length&&(o.update=function(e,t){l.forEach((function(r){return r(e,t)}))}),c.length&&(o.postpatch=function(e,t){c.forEach((function(r){return r(e,t)}))})),o}function getEventHandler(e,t,r){void 0===r&&(r={});var a,n,o=r.stop,i=r.prevent,s=r.once,l=!1,c=!0;if((a=e.indexOf("(")<0?e:e.split("(")[0]).indexOf(".")>=0)a.split(".").forEach((function(e,r){if(0!==r||"this"!==e){if(0===r&&"window"===e)return n=win,void(c=!1);if(n||(n=t),!n[e])throw new Error("Framework7: Component doesn't have method \""+a.split(".").slice(0,r+1).join(".")+'"');n=n[e]}}));else{if(!t[a])throw new Error("Framework7: Component doesn't have method \""+a+'"');n=t[a]}return c&&(n=n.bind(t)),function(){for(var r=[],a=arguments.length;a--;)r[a]=arguments[a];var c=r[0],u=[];if(!s||!l){if(o&&c.stopPropagation(),i&&c.preventDefault(),l=!0,e.indexOf("(")<0)u=r;else{var p=e.split("(")[1].split(")")[0].replace(/'[^']*'|"[^"]*"/g,(function(e){return e.replace(/,/g,"<_comma_>")})).split(",").map((function(e){return e.replace(/<_comma_>/g,",")}));p.forEach((function(e){var r=e.trim();if(isNaN(r))if("true"===r)r=!0;else if("false"===r)r=!1;else if("null"===r)r=null;else if("undefined"===r)r=void 0;else if('"'===r[0])r=r.replace(/"/g,"");else if("'"===r[0])r=r.replace(/'/g,"");else if(r.indexOf(".")>0){var a;r.split(".").forEach((function(e){a||(a=t),a=a[e]})),r=a}else r=t[r];else r=parseFloat(r);u.push(r)}))}n.apply(void 0,u)}}}function getData(e,t,r,a,n,o){var i={context:t},s=e.attributes;Array.prototype.forEach.call(s,(function(e){var r=e.name,a=e.value;if(propsAttrs.indexOf(r)>=0)i.props||(i.props={}),"readonly"===r&&(r="readOnly"),"option"===o&&"value"===r&&(i.attrs||(i.attrs={}),i.attrs.value=a),booleanProps.indexOf(r)>=0?i.props[r]=!1!==a:i.props[r]=a;else if("key"===r)i.key=a;else if(0===r.indexOf("@")){i.on||(i.on={});var s=r.substr(1),l=!1,c=!1,u=!1;s.indexOf(".")>=0&&s.split(".").forEach((function(e,t){0===t?s=e:("stop"===e&&(l=!0),"prevent"===e&&(c=!0),"once"===e&&(u=!0))})),i.on[s]=getEventHandler(a,t,{stop:l,prevent:c,once:u})}else if("style"===r)if(a.indexOf("{")>=0&&a.indexOf("}")>=0)try{i.style=JSON.parse(a)}catch(e){i.attrs||(i.attrs={}),i.attrs.style=a}else i.attrs||(i.attrs={}),i.attrs.style=a;else i.attrs||(i.attrs={}),i.attrs[r]=a,"id"!==r||i.key||n||(i.key=a)})),n&&t&&t.$id&&t.$style&&t.$styleScoped&&(i.attrs||(i.attrs={}),i.attrs["data-f7-"+t.$id]="");var l=getHooks(i,r,a,n,o);return l.prepatch=function(e,t){e&&t&&e&&e.data&&e.data.props&&Object.keys(e.data.props).forEach((function(r){booleanProps.indexOf(r)<0||(t.data||(t.data={}),t.data.props||(t.data.props={}),!0!==e.data.props[r]||r in t.data.props||(t.data.props[r]=!1))}))},l&&(i.hook=l),i}function getChildren(e,t,r,a){for(var n=[],o=e.childNodes,i=0;i=0?[]:getChildren(e,t,r,a))}function vdom(e,t,r){void 0===e&&(e="");var a,n=e.trim(),o=tempDomDIV;0===n.indexOf("0?l:s.length,d=u>0?u:s.length,h=-1!==l||-1!==u?s.slice(0,Math.min(p,d)):s,f=e.elm=isDef(a)&&isDef(r=a.ns)?o.createElementNS(r,h):o.createElement(h);for(p0&&f.setAttribute("class",s.slice(d+1).replace(/\./g," ")),r=0;rf?u(e,null==r[g+1]?null:r[g+1].elm,r,p,g,a):d(e,t,l,f))}(s,l,p,r):isDef(p)?(isDef(e.text)&&o.setTextContent(s,""),u(s,null,p,0,p.length-1,r)):isDef(l)?d(s,l,0,l.length-1):isDef(e.text)&&o.setTextContent(s,""):e.text!==t.text&&o.setTextContent(s,t.text),isDef(i)&&isDef(a=i.postpatch)&&a(e,t)}}return function(e,t){var r,a,i,l=[];for(r=0;r0;)r[a]=arguments[a+1];handleEvent(t,r,e.vnode)}}function updateEvents(e,t){var r=e.data.on,a=e.listener,n=e.elm,o=t&&t.data.on,i=t&&t.elm;if(r!==o&&(r&&a&&(o?Object.keys(r).forEach((function(e){o[e]||$(n).off(e,a)})):Object.keys(r).forEach((function(e){$(n).off(e,a)}))),o)){var s=e.listener||createListener();t.listener=s,s.vnode=t,r?Object.keys(o).forEach((function(e){r[e]||$(i).on(e,s)})):Object.keys(o).forEach((function(e){$(i).on(e,s)}))}}var eventListenersModule={create:updateEvents,update:updateEvents,destroy:updateEvents},patch=init([attributesModule,propsModule,styleModule,eventListenersModule]),componentMixins={},Component=function(e,t,r,a){void 0===t&&(t={}),void 0===r&&(r={});var n=Utils.id(),o=this;Utils.merge(o,{$props:{}},r,{$:$,$$:$,$dom7:$,$app:e,$f7:e,$options:Utils.extend({id:n},t),$id:t.isClassComponent?o.constructor.id:t.id||n,$mixins:t.isClassComponent?o.constructor.mixins:t.mixins,$children:a||[],$isRootComponent:!!t.root});var i=o.$options;if(o.$mixins&&o.$mixins.length)for(var s=o.$mixins.length-1;s>=0;s-=1){var l=o.$mixins[s];"string"==typeof l&&(componentMixins[l]?o.$mixins[s]=componentMixins[l]:o.$mixins.splice(s,1))}Object.defineProperty(o,"$slots",{enumerable:!0,configurable:!0,get:function(){var e={};return o.$children.forEach((function(t){var r="default";t.data&&(r=t.data.attrs&&t.data.attrs.slot||"default"),e[r]||(e[r]=[]),e[r].push(t)})),e}}),Object.defineProperty(o,"$root",{enumerable:!0,configurable:!0,get:function(){if(o.$isRootComponent)return o;if(e.rootComponent)return o.$onRootUpdated||(o.$onRootUpdated=function(){return o.$update()},e.on("rootComponentUpdated",o.$onRootUpdated)),e.rootComponent;var t=Utils.merge({},e.data,e.methods);return win&&win.Proxy&&(t=new win.Proxy(t,{set:function(t,r,a){e.data[r]=a},deleteProperty:function(t,r){delete e.data[r],delete e.methods[r]},has:function(t,r){return r in e.data||r in e.methods}})),t},set:function(){}}),i.render&&(i.render=i.render.bind(o));var c={};return o.$mixins&&o.$mixins.length&&o.$mixins.forEach((function(e){e.methods&&Object.assign(c,e.methods)})),i.methods&&Object.assign(c,i.methods),Object.keys(c).forEach((function(e){o[e]=c[e].bind(o)})),i.on&&Object.keys(i.on).forEach((function(e){i.on[e]=i.on[e].bind(o)})),i.once&&Object.keys(i.once).forEach((function(e){i.once[e]=i.once[e].bind(o)})),o.$style=i.isClassComponent?o.constructor.style:i.style,o.$styleScoped=i.isClassComponent?o.constructor.styleScoped:i.styleScoped,o.__updateQueue=[],new Promise((function(e,t){o.$hook("data",!0).then((function(t){var r={};t.forEach((function(e){Object.assign(r,e||{})})),Utils.extend(o,r),o.$hook("beforeCreate");var a=o.$render();if(o.$options.el)return a=a.trim(),o.$vnode=vdom(a,o,!0),o.$style&&(o.$styleEl=doc.createElement("style"),o.$styleEl.innerHTML=o.$style),o.el=o.$options.el,patch(o.el,o.$vnode),o.el=o.$vnode.elm,o.$el=$(o.el),o.$attachEvents(),o.el.f7Component=o,o.$hook("created"),o.$mount(),void e(o);a&&"string"==typeof a?(a=a.trim(),o.$vnode=vdom(a,o,!0),o.el=doc.createElement(o.$vnode.sel||"div"),patch(o.el,o.$vnode),o.$el=$(o.el)):a&&(o.el=a,o.$el=$(o.el)),o.$style&&(o.$styleEl=doc.createElement("style"),o.$styleEl.innerHTML=o.$style),o.$attachEvents(),o.el&&(o.el.f7Component=o),o.$hook("created"),e(o)})).catch((function(e){t(e)}))}))};function parseComponent(e){var t,r=Utils.id(),a="f7_component_create_callback_"+r,n="f7_component_render_callback_"+r,o=e.match(//),i=o[2]||"t7";o&&(t=e.split(//).filter((function(e,t){return t>0})).join("").filter((function(e,t,r){return t").replace(/{{#raw}}([ \n]*)