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