@wiajs/core 0.1.15 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * wia core v0.1.15
2
+ * wia core v0.1.16
3
3
  * (c) 2021 Sibyl Yu
4
4
  * @license MIT
5
5
  */
@@ -118,7 +118,8 @@ function _createClass(Constructor, protoProps, staticProps) {
118
118
  function _inheritsLoose(subClass, superClass) {
119
119
  subClass.prototype = Object.create(superClass.prototype);
120
120
  subClass.prototype.constructor = subClass;
121
- subClass.__proto__ = superClass;
121
+
122
+ _setPrototypeOf(subClass, superClass);
122
123
  }
123
124
 
124
125
  function _setPrototypeOf(o, p) {
@@ -136,7 +137,7 @@ function _isNativeReflectConstruct() {
136
137
  if (typeof Proxy === "function") return true;
137
138
 
138
139
  try {
139
- Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
140
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
140
141
  return true;
141
142
  } catch (e) {
142
143
  return false;
@@ -1125,7 +1126,7 @@ function initClicks(app) {
1125
1126
  var $clickedEl = $(e.target);
1126
1127
  var $clickedLinkEl = $clickedEl.closest('a');
1127
1128
  var isLink = $clickedLinkEl.length > 0;
1128
- var url = isLink && $clickedLinkEl.attr('href'); // call Modules Clicks
1129
+ isLink && $clickedLinkEl.attr('href'); // call Modules Clicks
1129
1130
 
1130
1131
  Object.keys(app.modules).forEach(function (moduleName) {
1131
1132
  var moduleClicks = app.modules[moduleName].clicks;
@@ -1251,8 +1252,8 @@ var SW$1 = {
1251
1252
  }
1252
1253
  };
1253
1254
 
1254
- var Support = $.support;
1255
- var Device = $.device;
1255
+ var Support$1 = $.support;
1256
+ var Device$1 = $.device;
1256
1257
  /**
1257
1258
  * 应用类,每个wia应用从该类继承,由 首页加载创建或者路由创建
1258
1259
  */
@@ -1268,8 +1269,8 @@ var App = /*#__PURE__*/function (_Module) {
1268
1269
 
1269
1270
  var app = _assertThisInitialized(_this);
1270
1271
 
1271
- app.device = Device;
1272
- app.support = Support; // Default
1272
+ app.device = Device$1;
1273
+ app.support = Support$1; // Default
1273
1274
 
1274
1275
  var def = {
1275
1276
  version: '0.0.1',
@@ -1313,8 +1314,8 @@ var App = /*#__PURE__*/function (_Module) {
1313
1314
  // Theme
1314
1315
  theme: function getTheme() {
1315
1316
  if (app.params.theme === 'auto') {
1316
- if (Device.ios) return 'ios';
1317
- if (Device.desktop) return 'aurora';
1317
+ if (Device$1.ios) return 'ios';
1318
+ if (Device$1.desktop) return 'aurora';
1318
1319
  return 'md';
1319
1320
  }
1320
1321
 
@@ -1330,9 +1331,9 @@ var App = /*#__PURE__*/function (_Module) {
1330
1331
  }
1331
1332
 
1332
1333
  app.touchEvents = {
1333
- start: Support.touch ? 'touchstart' : Support.pointerEvents ? 'pointerdown' : 'mousedown',
1334
- move: Support.touch ? 'touchmove' : Support.pointerEvents ? 'pointermove' : 'mousemove',
1335
- end: Support.touch ? 'touchend' : Support.pointerEvents ? 'pointerup' : 'mouseup'
1334
+ start: Support$1.touch ? 'touchstart' : Support$1.pointerEvents ? 'pointerdown' : 'mousedown',
1335
+ move: Support$1.touch ? 'touchmove' : Support$1.pointerEvents ? 'pointermove' : 'mousemove',
1336
+ end: Support$1.touch ? 'touchend' : Support$1.pointerEvents ? 'pointerup' : 'mouseup'
1336
1337
  }; // 加载use插入的模块类,每个模块作为app的一个属性,合并到实例。
1337
1338
  // 模块包括相关属性及方法(如:create、get、destroy)
1338
1339
  // 调用每个模块的 create 方法
@@ -1369,7 +1370,7 @@ var App = /*#__PURE__*/function (_Module) {
1369
1370
 
1370
1371
 
1371
1372
  function init() {
1372
- if (Device.cordova && app.params.initOnDeviceReady) {
1373
+ if (Device$1.cordova && app.params.initOnDeviceReady) {
1373
1374
  $(document).on('deviceready', function () {
1374
1375
  app.init();
1375
1376
  });
@@ -1465,7 +1466,7 @@ var App = /*#__PURE__*/function (_Module) {
1465
1466
  if (app.initialized) return app;
1466
1467
  $.App = App;
1467
1468
 
1468
- if (Device.ios && Device.webView) {
1469
+ if (Device$1.ios && Device$1.webView) {
1469
1470
  // Strange hack required for iOS 8 webview to work on inputs
1470
1471
  window.addEventListener('touchstart', function () {});
1471
1472
  }
@@ -1497,11 +1498,11 @@ var App = /*#__PURE__*/function (_Module) {
1497
1498
 
1498
1499
  $('html').removeClass('ios md aurora').addClass(app.theme); // iOS Translucent
1499
1500
 
1500
- if (app.params.iosTranslucentBars && app.theme === 'ios' && Device.ios) {
1501
+ if (app.params.iosTranslucentBars && app.theme === 'ios' && Device$1.ios) {
1501
1502
  $('html').addClass('ios-translucent-bars');
1502
1503
  }
1503
1504
 
1504
- if (app.params.iosTranslucentModals && app.theme === 'ios' && Device.ios) {
1505
+ if (app.params.iosTranslucentModals && app.theme === 'ios' && Device$1.ios) {
1505
1506
  $('html').addClass('ios-translucent-modals');
1506
1507
  } // Init class
1507
1508
 
@@ -1579,24 +1580,24 @@ function initStyle() {
1579
1580
  var metaStatusbar = document.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]');
1580
1581
  if (!html) return;
1581
1582
 
1582
- if (Device.standalone && Device.ios && metaStatusbar && metaStatusbar.content === 'black-translucent') {
1583
+ if (Device$1.standalone && Device$1.ios && metaStatusbar && metaStatusbar.content === 'black-translucent') {
1583
1584
  classNames.push('device-full-viewport');
1584
1585
  } // Pixel Ratio
1585
1586
 
1586
1587
 
1587
- classNames.push("device-pixel-ratio-" + Math.floor(Device.pixelRatio)); // OS classes
1588
+ classNames.push("device-pixel-ratio-" + Math.floor(Device$1.pixelRatio)); // OS classes
1588
1589
 
1589
- if (Device.os && !Device.desktop) {
1590
- classNames.push("device-" + Device.os);
1591
- } else if (Device.desktop) {
1590
+ if (Device$1.os && !Device$1.desktop) {
1591
+ classNames.push("device-" + Device$1.os);
1592
+ } else if (Device$1.desktop) {
1592
1593
  classNames.push('device-desktop');
1593
1594
 
1594
- if (Device.os) {
1595
- classNames.push("device-" + Device.os);
1595
+ if (Device$1.os) {
1596
+ classNames.push("device-" + Device$1.os);
1596
1597
  }
1597
1598
  }
1598
1599
 
1599
- if (Device.cordova || Device.phonegap) {
1600
+ if (Device$1.cordova || Device$1.phonegap) {
1600
1601
  classNames.push('device-cordova');
1601
1602
  } // Add html classes
1602
1603
 
@@ -1619,8 +1620,8 @@ App.loadModules = function (modules) {
1619
1620
  }; // app 加载到 app实例的一些扩展模块
1620
1621
 
1621
1622
 
1622
- App.support = Support;
1623
- App.device = Device;
1623
+ App.support = Support$1;
1624
+ App.device = Device$1;
1624
1625
  App.utils = Utils; // 添加应用缺省模块
1625
1626
 
1626
1627
  App.use([Resize, // 控制屏幕大小
@@ -1899,15 +1900,43 @@ var Page = /*#__PURE__*/function (_Event) {
1899
1900
  // $.assign(this, {page, param, back});
1900
1901
  // $.assign(this.data, param);
1901
1902
  // 隐藏所有模板
1903
+ this.init();
1902
1904
  this.emit('local::ready pageReady', view, param, back);
1903
- view.qus('[name$=-tp]').hide();
1905
+ }
1906
+ /**
1907
+ * 对页面进行初始化处理,或页面内容动态变更时,对局部页面容器进行初始化
1908
+ * 具备name属性的dom节点直接赋值给页面view
1909
+ * 只挂载一个,多个同名name,最后一个起作用,因此一个页面内,name不要重复
1910
+ * 同节点多次调用不覆盖,同名不同dom节点,覆盖
1911
+ * 覆盖后,原直接节点属性的 bind 会失效,需真的新的$dom重新bind
1912
+ * @param {*} v dom 容器,默认为页面实例的view
1913
+ */
1914
+ ;
1915
+
1916
+ _proto.init = function init(v) {
1917
+ var view = this.view;
1918
+ v = v ? $(v) : view; // 页面上带name属性节点,直接作为page.view的属性,方便页面代码直接调用
1919
+
1920
+ var ns = v.qus('[name]');
1921
+ ns === null || ns === void 0 ? void 0 : ns.forEach(function (n) {
1922
+ var $n = $(n);
1923
+ var name = $n.attr('name');
1924
+ if (!view[name] || view[name].dom !== n) view[name] = $n;
1925
+ }); // 隐藏所有模板
1926
+
1927
+ v.qus('[name$=-tp]').hide(); // 防止空链接,刷新页面
1928
+
1929
+ v.qus('a[href=""]').attr('href', 'javascript:;');
1904
1930
  } // 显示已加载的页面
1905
1931
  // view:页面Dom层,param:参数
1906
1932
  ;
1907
1933
 
1908
1934
  _proto.show = function show(view, param) {
1909
- // 防止空链接,刷新页面
1910
- view.qus('a[href=""]').attr('href', 'javascript:;');
1935
+ // 隐藏所有模板
1936
+ view.qus('[name$=-tp]').hide(); // 防止空链接,刷新页面
1937
+
1938
+ view.qus('a[href=""]').attr('href', 'javascript:;'); // this.init();
1939
+
1911
1940
  if (this.reset) this.reset();
1912
1941
  this.emit('local::show pageShow', view, param);
1913
1942
  } // 回退显示已加载的页面
@@ -1915,7 +1944,9 @@ var Page = /*#__PURE__*/function (_Event) {
1915
1944
  ;
1916
1945
 
1917
1946
  _proto.back = function back(view, param) {
1918
- // 防止空链接,刷新页面
1947
+ // 隐藏所有模板
1948
+ view.qus('[name$=-tp]').hide(); // 防止空链接,刷新页面
1949
+
1919
1950
  view.qus('a[href=""]').attr('href', 'javascript:;');
1920
1951
  this.emit('local::back pageBack', view, param);
1921
1952
  };
@@ -2205,13 +2236,13 @@ function jsx(tag, props) {
2205
2236
 
2206
2237
  // export {default as Device} from './device';
2207
2238
 
2208
- var Support$1 = $.support;
2209
- var Device$1 = $.device;
2239
+ var Support = $.support;
2240
+ var Device = $.device;
2210
2241
 
2211
2242
  exports.Ajax = Ajax;
2212
2243
  exports.App = App;
2213
2244
  exports.Constructors = Constructors;
2214
- exports.Device = Device$1;
2245
+ exports.Device = Device;
2215
2246
  exports.Event = Event;
2216
2247
  exports.Lazy = Lazy;
2217
2248
  exports.Modal = Modal;
@@ -2220,7 +2251,7 @@ exports.Module = Module;
2220
2251
  exports.Page = Page;
2221
2252
  exports.Resize = Resize;
2222
2253
  exports.SW = SW$1;
2223
- exports.Support = Support$1;
2254
+ exports.Support = Support;
2224
2255
  exports.Utils = Utils;
2225
2256
  exports.jsx = jsx;
2226
2257
  exports.loadModule = loadModule;
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * wia core v0.1.15
2
+ * wia core v0.1.16
3
3
  * (c) 2021 Sibyl Yu
4
4
  * @license MIT
5
5
  */
6
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(){function e(){}var t=e.prototype;return t.post=function(e,t){return new Promise((function(n,o){var r=$.getXhr();r.onreadystatechange=function(){4===r.readyState&&(200===r.status?n(r.responseText):o(new Error(r.statusText),r.responseText))},r.open("POST",e,!0);var i=t;"object"==typeof t&&(i=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n+"="+e[n]);return t.sort().join("&")}(t)),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.send(i)}))},t.postForm=function(e,t){return new Promise((function(n,o){var r=$.getXhr();r.onreadystatechange=function(){4===r.readyState&&(200===r.status?n(null,r.responseText):o(new Error(r.status),r.responseText))},r.open("POST",e,!0),r.send(t)}))},t.get=function(e,t){return $.get(e,t)},e}();function t(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function n(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function a(e,t,n){return(a=i()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return n&&r(i,n.prototype),i}).apply(null,arguments)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var c=1,u={uniqueNumber:function(){return c+=1},id:function(e,t){return void 0===e&&(e="xxxxxxxxxx"),void 0===t&&(t="0123456789abcdef"),$.uid(e,t)},mdPreloaderContent:'\n <span class="preloader-inner">\n\t\t\t<svg viewBox="0 0 36 36">\n\t\t\t\t<circle cx="18" cy="18" r="16"></circle>\n\t\t\t</svg>\n </span>\n '.trim(),iosPreloaderContent:('\n <span class="preloader-inner">\n\t\t\t'+[0,1,2,3,4,5,6,7].map((function(){return'<span class="preloader-inner-line"></span>'})).join("")+"\n </span>\n ").trim(),auroraPreloaderContent:'\n <span class="preloader-inner">\n <span class="preloader-inner-circle"></span>\n </span>\n ',eventNameToColonCase:function(e){var t;return e.split("").map((function(e,n){return e.match(/[A-Z]/)&&0!==n&&!t?(t=!0,":"+e.toLowerCase()):e.toLowerCase()})).join("")},deleteProps:function(e){$.deleteProps(e)},nextTick:function(e,t){return void 0===t&&(t=0),setTimeout(e,t)},nextFrame:function(e){return $.nextFrame(e)},now:function(){return Date.now()},requestAnimationFrame:function(e){return $.requestAnimationFrame(e)},cancelAnimationFrame:function(e){return $.cancelAnimationFrame(e)},parseUrlQuery:function(e){return $.urlParam(e)},getTranslate:function(e,t){return void 0===t&&(t="x"),$.getTranslate(e,t)},serializeObject:function(e,t){if(void 0===t&&(t=[]),"string"==typeof e)return e;var n,o=[];function r(e){if(t.length>0){for(var n="",o=0;o<t.length;o+=1)n+=0===o?t[o]:"["+encodeURIComponent(t[o])+"]";return n+"["+encodeURIComponent(e)+"]"}return encodeURIComponent(e)}function i(e){return encodeURIComponent(e)}return Object.keys(e).forEach((function(a){var s;if(Array.isArray(e[a])){s=[];for(var c=0;c<e[a].length;c+=1)Array.isArray(e[a][c])||"object"!=typeof e[a][c]?s.push(r(a)+"[]="+i(e[a][c])):((n=t.slice()).push(a),n.push(String(c)),s.push(u.serializeObject(e[a][c],n)));s.length>0&&o.push(s.join("&"))}else null===e[a]||""===e[a]?o.push(r(a)+"="):"object"==typeof e[a]?((n=t.slice()).push(a),""!==(s=u.serializeObject(e[a],n))&&o.push(s)):void 0!==e[a]&&""!==e[a]?o.push(r(a)+"="+i(e[a])):""===e[a]&&o.push(r(a))})),o.join("&")},isObject:function(e){return"object"==typeof e&&null!==e&&e.constructor&&e.constructor===Object},merge:function(){var e;return(e=$).merge.apply(e,arguments)},extend:function(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];var r=n[0];return n.splice(0,1),(e=$).assign.apply(e,[r].concat(n))},bindMethods:function(e,t){var n=this;Object.keys(t).forEach((function(o){n.isObject(t[o])&&Object.keys(t[o]).forEach((function(n){"function"==typeof t[o][n]&&(t[o][n]=t[o][n].bind(e))})),e[o]=t[o]}))},colorHexToRgb:function(e){var t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,o){return t+t+n+n+o+o})),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return n?n.slice(1).map((function(e){return parseInt(e,16)})):null},colorRgbToHex:function(e,t,n){return"#"+[e,t,n].map((function(e){var t=e.toString(16);return 1===t.length?"0"+t:t})).join("")},colorRgbToHsl:function(e,t,n){e/=255,t/=255,n/=255;var o,r=Math.max(e,t,n),i=Math.min(e,t,n),a=r-i;0===a?o=0:r===e?o=(t-n)/a%6:r===t?o=(n-e)/a+2:r===n&&(o=(e-t)/a+4);var s=(i+r)/2;return o<0&&(o=6+o),[60*o,0===a?0:a/(1-Math.abs(2*s-1)),s]},colorHslToRgb:function(e,t,n){var o,r=(1-Math.abs(2*n-1))*t,i=e/60,a=r*(1-Math.abs(i%2-1));Number.isNaN(e)||void 0===e?o=[0,0,0]:i<=1?o=[r,a,0]:i<=2?o=[a,r,0]:i<=3?o=[0,r,a]:i<=4?o=[0,a,r]:i<=5?o=[a,0,r]:i<=6&&(o=[r,0,a]);var s=n-r/2;return o.map((function(e){return Math.max(0,Math.min(255,Math.round(255*(e+s))))}))},colorHsbToHsl:function(e,t,n){var o={h:e,s:0,l:0},r=t,i=n;return o.l=(2-r)*i/2,o.s=o.l&&o.l<1?r*i/(o.l<.5?2*o.l:2-2*o.l):o.s,[o.h,o.s,o.l]},colorHslToHsb:function(e,t,n){var o={h:e,s:0,b:0},r=n,i=t*(r<.5?r:1-r);return o.b=r+i,o.s=r>0?2*i/o.b:o.s,[o.h,o.s,o.b]},colorThemeCSSProperties:function(){for(var e,t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];if(1===o.length?(e=o[0],t=u.colorHexToRgb(e)):3===o.length&&(t=o,e=u.colorRgbToHex.apply(u,t)),!t)return{};var i=u.colorRgbToHsl.apply(u,t),a=[i[0],i[1],Math.max(0,i[2]-.08)],s=[i[0],i[1],Math.max(0,i[2]+.08)],c=u.colorRgbToHex.apply(u,u.colorHslToRgb.apply(u,a)),l=u.colorRgbToHex.apply(u,u.colorHslToRgb.apply(u,s));return{"--f7-theme-color":e,"--f7-theme-color-rgb":t.join(", "),"--f7-theme-color-shade":c,"--f7-theme-color-tint":l}}},l=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);var n=this;n.params=e,n.eventsParents=t,n.eventsListeners={},n.params&&n.params.on&&Object.keys(n.params.on).forEach((function(e){n.on(e,n.params.on[e])}))}var t=e.prototype;return t.on=function(e,t,n){var o=this;if("function"!=typeof t)return o;var r=n?"unshift":"push";return e.split(" ").forEach((function(e){o.eventsListeners[e]||(o.eventsListeners[e]=[]),o.eventsListeners[e][r](t)})),o},t.once=function(e,t,n){var o=this;if("function"!=typeof t)return o;function r(){o.off(e,r),r.proxy&&delete r.proxy;for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];t.apply(o,i)}return r.proxy=t,o.on(e,r,n)},t.off=function(e,t){var n=this;return n.eventsListeners?(e.split(" ").forEach((function(e){void 0===t?n.eventsListeners[e]=[]:n.eventsListeners[e]&&n.eventsListeners[e].forEach((function(o,r){(o===t||o.proxy&&o.proxy===t)&&n.eventsListeners[e].splice(r,1)}))})),n):n},t.emit=function(){var e,t,n,o,r=this;if(!r.eventsListeners)return r;for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];"string"==typeof a[0]||Array.isArray(a[0])?(e=a[0],t=a.slice(1,a.length),n=r,o=r.eventsParents):(e=a[0].events,t=a[0].data,n=a[0].context||r,o=a[0].local?[]:a[0].parents||r.eventsParents);var c=Array.isArray(e)?e:e.split(" "),u=c.map((function(e){return e.replace("local::","")})),l=c.filter((function(e){return e.indexOf("local::")<0}));return u.forEach((function(e){if(r.eventsListeners&&r.eventsListeners[e]){var o=[];r.eventsListeners[e].forEach((function(e){o.push(e)})),o.forEach((function(e){e.apply(n,t)}))}})),o&&o.length>0&&o.forEach((function(e){e.emit.apply(e,[l].concat(t))})),r},e}(),d=function(e){function t(t,n){return void 0===t&&(t={}),void 0===n&&(n=[]),e.call(this,t,n)||this}o(t,e);var r=t.prototype;return r.useModuleParams=function(e,t){if(e.params){var n={};Object.keys(e.params).forEach((function(e){void 0!==t[e]&&(n[e]=$.extend({},t[e]))})),$.extend(t,e.params),Object.keys(n).forEach((function(e){$.extend(t[e],n[e])}))}},r.useModulesParams=function(e){var t=this;t.modules&&Object.keys(t.modules).forEach((function(n){var o=t.modules[n];o.params&&$.extend(e,o.params)}))},r.useModule=function(e,t){void 0===e&&(e=""),void 0===t&&(t={});var n=this;if(n.modules){var o="string"==typeof e?n.modules[e]:e;o&&(o.instance&&Object.keys(o.instance).forEach((function(e){var t=o.instance[e];n[e]="function"==typeof t?t.bind(n):t})),o.on&&n.on&&Object.keys(o.on).forEach((function(e){n.on(e,o.on[e])})),o.vnode&&(n.vnodeHooks||(n.vnodeHooks={}),Object.keys(o.vnode).forEach((function(e){Object.keys(o.vnode[e]).forEach((function(t){var r=o.vnode[e][t];n.vnodeHooks[t]||(n.vnodeHooks[t]={}),n.vnodeHooks[t][e]||(n.vnodeHooks[t][e]=[]),n.vnodeHooks[t][e].push(r.bind(n))}))}))),o.create&&o.create.bind(n)(t))}},r.useModules=function(e){void 0===e&&(e={});var t=this;t.modules&&Object.keys(t.modules).forEach((function(n){var o=e[n]||{};t.useModule(n,o)}))},t.installModule=function(e){var t=this;t.prototype.modules||(t.prototype.modules={});var n=e.name||Object.keys(t.prototype.modules).length+"_"+$.now();if(t.prototype.modules[n]=e,e.proto&&Object.keys(e.proto).forEach((function(n){t.prototype[n]=e.proto[n]})),e.static&&Object.keys(e.static).forEach((function(n){t[n]=e.static[n]})),e.install){for(var o=arguments.length,r=new Array(o>1?o-1:0),i=1;i<o;i++)r[i-1]=arguments[i];e.install.apply(t,r)}return t},t.use=function(e){var t=this;if(Array.isArray(e))return e.forEach((function(e){return t.installModule(e)})),t;for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return t.installModule.apply(t,[e].concat(o))},n(t,null,[{key:"components",set:function(e){this.use&&this.use(e)}}]),t}(l);function p(e){void 0===e&&(e={});var t=e,n=t.defaultSelector,o=t.constructor,r=t.domProp,i=t.app,s=t.addMethods,c={create:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a(o,i?[i].concat(t):t)},get:function(e){if(void 0===e&&(e=n),e instanceof o)return e;var t=$(e);return 0!==t.length?t[0][r]:void 0},destroy:function(e){var t=c.get(e);if(t&&t.destroy)return t.destroy()}};return s&&Array.isArray(s)&&s.forEach((function(e){c[e]=function(t){void 0===t&&(t=n);for(var o=c.get(t),r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];if(o&&o[e])return o[e].apply(o,i)}})),c}function f(e){void 0===e&&(e={});var t=e,n=t.defaultSelector,o=t.constructor,r=t.app;return $.extend(p({defaultSelector:n,constructor:o,app:r,domProp:"f7Modal"}),{open:function(e,t){var n=$(e),i=n[0].f7Modal;return i||(i=new o(r,{el:n})),i.open(t)},close:function(e,t){void 0===e&&(e=n);var i=$(e);if(0!==i.length){var a=i[0].f7Modal;return a||(a=new o(r,{el:i})),a.close(t)}}})}var h=[];function m(e){var t=this;return new Promise((function(n,o){var r,i,a,s=t.instance;if(e){if("string"==typeof e){var c=e.match(/([a-z0-9-]*)/i);if(e.indexOf(".")<0&&c&&c[0].length===e.length){if(!s||s&&!s.params.lazyModulesPath)return void o(new Error('Wia: "lazyModulesPath" app parameter must be specified to fetch module by name'));r=s.params.lazyModulesPath+"/"+e+".js"}else r=e}else"function"==typeof e?a=e:i=e;if(a){var u=a(t,!1);if(!u)return void o(new Error("Wia: Can't find Wia component in specified component function"));if(t.prototype.modules&&t.prototype.modules[u.name])return void n();f(u),n()}if(i){var l=i;if(!l)return void o(new Error("Wia: Can't find Wia component in specified component"));if(t.prototype.modules&&t.prototype.modules[l.name])return void n();f(l),n()}if(r){if(h.indexOf(r)>=0)return void n();h.push(r);var d=new Promise((function(e,n){t.request.get(r,(function(o){var i="wia_component_loader_callback_"+$.id(),a=document.createElement("script");a.innerHTML="window."+i+" = function (Wia, WiaAutoInstallComponent) {return "+o.trim()+"}",$("head").append(a);var s=window[i];delete window[i],$(a).remove();var c=s(t,!1);c?(t.prototype.modules&&t.prototype.modules[c.name]||f(c),e()):n(new Error("Wia: Can't find Wia component in "+r+" file"))}),(function(e,t){n(e,t)}))})),p=new Promise((function(e){t.request.get(r.replace(".js",s.rtl?".rtl.css":".css"),(function(t){var n=document.createElement("style");n.innerHTML=t,$("head").append(n),e()}),(function(){e()}))}));Promise.all([d,p]).then((function(){n()})).catch((function(e){o(e)}))}}else o(new Error("Wia: Lazy module must be specified"));function f(e){t.use(e),s&&(s.useModuleParams(e,s.params),s.useModule(e))}}))}var v={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],n=t[0],o=t[1],r=t[2],i=t[3];return this.width=n,this.height=o,this.left=r,this.top=i,{width:n,height:o,left:r,top:i}}},on:{init:function(){var e=this;e.getSize(),window.addEventListener("resize",(function(){e.emit("resize")}),!1),window.addEventListener("orientationchange",(function(){e.emit("orientationchange")}))},orientationchange:function(){this.device.ipad&&(document.body.scrollLeft=0,setTimeout((function(){document.body.scrollLeft=0}),0))},resize:function(){this.getSize()}}};function y(e){var t,n,o;t=function(t){e.emit({events:"click",data:[t]})},$.support.touch?(document.addEventListener("touchstart",(function(e){n=e.changedTouches[0].clientX,o=e.changedTouches[0].clientY}),!0),document.addEventListener("touchend",(function(e){var r=Math.abs(e.changedTouches[0].clientX-n),i=Math.abs(e.changedTouches[0].clientY-o);r<=5&&i<=5&&t.call(this,e)}),!0)):document.addEventListener("click",t,!0),e.on("click",(function(t){var n=$(t.target),o=n.closest("a");o.length>0&&o.attr("href"),Object.keys(e.modules).forEach((function(o){var r=e.modules[o].clicks;r&&(t.preventF7Router||Object.keys(r).forEach((function(o){var i=n.closest(o).eq(0);i.length>0&&r[o].call(e,i,i.dataset(),t)})))}))}))}var g={name:"clicks",params:{clicks:{externalLinks:".ext"}},on:{init:function(){y(this)}}},w={registrations:[],register:function(e,t){var n=this;return"serviceWorker"in window.navigator&&n.serviceWorker.container?new Promise((function(o,r){n.serviceWorker.container.register(e,t?{scope:t}:{}).then((function(e){w.registrations.push(e),n.emit("serviceWorkerRegisterSuccess",e),o(e)})).catch((function(e){n.emit("serviceWorkerRegisterError",e),r(e)}))})):new Promise((function(e,t){t(new Error("Service worker is not supported"))}))},unregister:function(e){var t,n=this;return"serviceWorker"in window.navigator&&n.serviceWorker.container?(t=e?Array.isArray(e)?e:[e]:w.registrations,Promise.all(t.map((function(e){return new Promise((function(t,o){e.unregister().then((function(){w.registrations.indexOf(e)>=0&&w.registrations.splice(w.registrations.indexOf(e),1),n.emit("serviceWorkerUnregisterSuccess",e),t()})).catch((function(t){n.emit("serviceWorkerUnregisterError",e,t),o(t)}))}))})))):new Promise((function(e,t){t(new Error("Service worker is not supported"))}))}},b={name:"sw",params:{serviceWorker:{path:void 0,scope:void 0}},create:function(){$.extend(this,{serviceWorker:{container:"serviceWorker"in window.navigator?window.navigator.serviceWorker:void 0,registrations:w.registrations,register:w.register.bind(this),unregister:w.unregister.bind(this)}})},on:{init:function(){if("serviceWorker"in window.navigator){var e=this;if(e.serviceWorker.container){var t=e.params.serviceWorker.path,n=e.params.serviceWorker.scope;if(t&&(!Array.isArray(t)||t.length))(Array.isArray(t)?t:[t]).forEach((function(t){e.serviceWorker.register(t,n)}))}}}}},k=$.support,x=$.device,C=function(e){function t(t){var n;n=e.call(this,t)||this;var o=$.extend({},t),r=s(n);r.device=x,r.support=k;var i={version:"0.0.1",root:"body",theme:"auto",language:window.navigator.language,routes:[],lazyModulesPath:null,initOnDeviceReady:!0,autoDarkTheme:!1,iosTranslucentBars:!0,iosTranslucentModals:!0,component:void 0,componentUrl:void 0};r.useModulesParams(i),r.params=$.extend(i,t);var a=$(r.params.root);$.extend(r,{owner:r.params.owner,name:r.params.name,id:r.params.owner+"."+r.params.name,version:r.params.version,routes:r.params.routes,language:r.params.language,root:a,$el:a,cfg:r.params.cfg,api:r.params.api,rtl:"rtl"===a.css("direction"),theme:"auto"===r.params.theme?x.ios?"ios":x.desktop?"aurora":"md":r.params.theme,passedParams:o,online:window.navigator.onLine}),r.root&&r.root[0]&&(r.root[0].wia=r),r.touchEvents={start:k.touch?"touchstart":k.pointerEvents?"pointerdown":"mousedown",move:k.touch?"touchmove":k.pointerEvents?"pointermove":"mousemove",end:k.touch?"touchend":k.pointerEvents?"pointerup":"mouseup"},r.useModules(),r.initData();var c="(prefers-color-scheme: dark)",u="(prefers-color-scheme: light)";return r.mq={},window.matchMedia&&(r.mq.dark=window.matchMedia(c),r.mq.light=window.matchMedia(u)),r.colorSchemeListener=function(e){var t=e.matches,n=e.media;if(t){var o=document.querySelector("html");n===c?o.classList.add("theme-dark"):n===u&&o.classList.remove("theme-dark")}},r.params.init&&(x.cordova&&r.params.initOnDeviceReady?$(document).on("deviceready",(function(){r.init()})):r.init()),r||s(n)}o(t,e);var r=t.prototype;return r.load=function(e){this.emit("local::load appLoad",e)},r.show=function(e,t){this.emit("local::show appShow",e,t)},r.hide=function(){this.emit("local::hide appHide")},r.unload=function(){this.emit("local::unload appUnload")},r.initData=function(){var e=this;e.data={},e.params.data&&"function"==typeof e.params.data?$.extend(e.data,e.params.data.bind(e)()):e.params.data&&$.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]}))},r.enableAutoDarkTheme=function(){if(window.matchMedia){var e=this,t=document.querySelector("html");e.mq.dark&&e.mq.light&&(e.mq.dark.addListener(e.colorSchemeListener),e.mq.light.addListener(e.colorSchemeListener)),e.mq.dark&&e.mq.dark.matches?t.classList.add("theme-dark"):e.mq.light&&e.mq.light.matches&&t.classList.remove("theme-dark")}},r.disableAutoDarkTheme=function(){if(window.matchMedia){this.mq.dark&&this.mq.dark.removeListener(this.colorSchemeListener),this.mq.light&&this.mq.light.removeListener(this.colorSchemeListener)}},r.init=function(){var e=this;return e.initialized||($.App=t,x.ios&&x.webView&&window.addEventListener("touchstart",(function(){})),e.root.addClass("framework7-initializing"),e.rtl&&$("html").attr("dir","rtl"),e.params.autoDarkTheme&&e.enableAutoDarkTheme(),window.addEventListener("offline",(function(){e.online=!1,e.emit("offline"),e.emit("connection",!1)})),window.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&&x.ios&&$("html").addClass("ios-translucent-bars"),e.params.iosTranslucentModals&&"ios"===e.theme&&x.ios&&$("html").addClass("ios-translucent-modals"),$.nextFrame((function(){e.root.removeClass("framework7-initializing")})),function(){var e=[],t=document.querySelector("html"),n=document.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]');if(!t)return;x.standalone&&x.ios&&n&&"black-translucent"===n.content&&e.push("device-full-viewport");e.push("device-pixel-ratio-"+Math.floor(x.pixelRatio)),x.os&&!x.desktop?e.push("device-"+x.os):x.desktop&&(e.push("device-desktop"),x.os&&e.push("device-"+x.os));(x.cordova||x.phonegap)&&e.push("device-cordova");e.forEach((function(e){t.classList.add(e)}))}(),e.initialized=!0,e.emit("init")),e},r.loadModule=function(e){t.loadModule(e),this[e.name].init&&this[e.name].init()},r.loadModules=function(){return t.loadModules.apply(t,arguments)},r.getVnodeHooks=function(e,t){return this.vnodeHooks&&this.vnodeHooks[e]&&this.vnodeHooks[e][t]||[]},n(t,[{key:"$",get:function(){return $}}],[{key:"Dom",get:function(){return $}},{key:"$",get:function(){return $}},{key:"Module",get:function(){return d}},{key:"Event",get:function(){return l}}]),t}(d);C.apps={},C.ModalMethods=f,C.ConstructorMethods=p,C.loadModule=m,C.loadModules=function(e){return Promise.all(e.map((function(e){return C.loadModule(e)})))},C.support=k,C.device=x,C.utils=u,C.use([v,g,b]);var E,M,L,O,A={normal:"nor",retina:"ret",srcset:"set",threshold:0},j=window.innerHeight,T=S(),P=document.body.classList.contains("srcset")||"srcset"in document.createElement("img"),H=window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI,R=function(){function e(e){E=$.assign({},A,e)}var t=e.prototype;return t.start=function(e){return["scroll","resize"].forEach((function(t){return e.addEventListener(t,q)})),O=e,this},t.stop=function(){return["scroll","resize"].forEach((function(e){return O.removeEventListener(e,q)})),this},t.update=function(){setTimeout((function(){D(),z()}),1)},e}();function S(){return window.scrollY||window.pageYOffset}function q(){T=S(),M||(window.requestAnimationFrame((function(){return z()})),M=!0)}function W(e){var t=T,n=t+j,o=function(e){return e.getBoundingClientRect().top+T}(e),r=o+e.offsetHeight,i=E.threshold/100*j;return r>=t-i&&o<=n+i}function z(){if(L)return j=window.innerHeight,L.forEach((function(e){return W(e)&&function(e){if($.emit("lazy:src:before",e),P&&e.hasAttribute(E.srcset))e.setAttribute("srcset",e.getAttribute(E.srcset));else{var t=H>1&&e.getAttribute(E.retina)||e.getAttribute(E.normal);e.setAttribute("src",t),console.log("set src:"+t)}$.emit("lazy:src:after",e),[E.normal,E.retina,E.srcset].forEach((function(t){return e.removeAttribute(t)})),D()}(e)})),M=!1,this}function D(e){return L=e?Array.prototype.slice.call(e.querySelectorAll("["+E.normal+"]")):Array.prototype.slice.call(document.querySelectorAll("["+E.normal+"]")),this}var _=function(e){function t(t,n,o,r){var i;return(i=e.call(this,null,[t])||this).app=t,i.cfg=t.cfg,i.name=n,i.title=o,i.style=r||"./page/"+n+".css",i.path=""+n,i.view=null,i.el=null,i.$el=null,i.html="",i.css="",i.js="",i.data={},i.param={},i}o(t,e);var n=t.prototype;return n.load=function(e){this.emit("local::load pageLoad",e)},n.ready=function(e,t,n){this.emit("local::ready pageReady",e,t,n),e.qus("[name$=-tp]").hide()},n.show=function(e,t){e.qus('a[href=""]').attr("href","javascript:;"),this.reset&&this.reset(),this.emit("local::show pageShow",e,t)},n.back=function(e,t){e.qus('a[href=""]').attr("href","javascript:;"),this.emit("local::back pageBack",e,t)},n.hide=function(e){this.emit("local::hide pageHide",e)},t}(l),F=[],U=[];var B=function(e){function t(t,n){var o,r=s(o=e.call(this,n,[t])||this);return r.params=u.extend({},n),r.opened=!1,s(o)||s(o)}o(t,e);var n=t.prototype;return n.onOpen=function(){this.opened=!0,F.push(this),$("html").addClass("with-modal-"+this.type.toLowerCase()),this.$el.trigger("modal:open "+this.type.toLowerCase()+":open"),this.emit("local::open modalOpen "+this.type+"Open",this)},n.onOpened=function(){this.$el.trigger("modal:opened "+this.type.toLowerCase()+":opened"),this.emit("local::opened modalOpened "+this.type+"Opened",this)},n.onClose=function(){this.opened=!1,this.type&&this.$el&&(F.splice(F.indexOf(this),1),$("html").removeClass("with-modal-"+this.type.toLowerCase()),this.$el.trigger("modal:close "+this.type.toLowerCase()+":close"),this.emit("local::close modalClose "+this.type+"Close",this))},n.onClosed=function(){this.type&&this.$el&&(this.$el.removeClass("modal-out"),this.$el.hide(),this.$el.trigger("modal:closed "+this.type.toLowerCase()+":closed"),this.emit("local::closed modalClosed "+this.type+"Closed",this))},n.open=function(e){var t,n=this,o=n.app,r=n.$el,i=n.type,a=n.$backdropEl,s=n.params.moveToRoot,c=!0;if(void 0!==e?c=e:void 0!==n.params.animate&&(c=n.params.animate),!r||r.hasClass("modal-in"))return n;if("dialog"===i&&o.params.modal.queueDialogs&&($(".dialog.modal-in").length>0?t=!0:F.length>0&&F.forEach((function(e){"dialog"===e.type&&(t=!0)})),t))return U.push(n),n;var u=r.parent(),l=r.parents(document).length>0;function d(){r.hasClass("modal-out")?n.onClosed():r.hasClass("modal-in")&&n.onOpened()}return s&&o.params.modal.moveToRoot&&!u.is(o.root)&&(o.root.append(r),n.once(i+"Closed",(function(){l?u.append(r):r.remove()}))),r.show(),n._clientLeft=r[0].clientLeft,c?(a&&(a.removeClass("not-animated"),a.addClass("backdrop-in")),r.animationEnd((function(){d()})),r.transitionEnd((function(){d()})),r.removeClass("modal-out not-animated").addClass("modal-in"),n.onOpen()):(a&&a.addClass("backdrop-in not-animated"),r.removeClass("modal-out").addClass("modal-in not-animated"),n.onOpen(),n.onOpened()),n},n.close=function(e){var t=this,n=t.$el,o=t.$backdropEl,r=!0;if(void 0!==e?r=e:void 0!==t.params.animate&&(r=t.params.animate),!n||!n.hasClass("modal-in"))return U.indexOf(t)>=0&&U.splice(U.indexOf(t),1),t;if(o){var i=!0;"popup"===t.type&&t.$el.prevAll(".popup.modal-in").each((function(e,n){var o=n.f7Modal;o&&o.params.closeByBackdropClick&&o.params.backdrop&&o.backdropEl===t.backdropEl&&(i=!1)})),i&&(o[r?"removeClass":"addClass"]("not-animated"),o.removeClass("backdrop-in"))}function a(){n.hasClass("modal-out")?t.onClosed():n.hasClass("modal-in")&&t.onOpened()}return n[r?"removeClass":"addClass"]("not-animated"),r?(n.animationEnd((function(){a()})),n.transitionEnd((function(){a()})),n.removeClass("modal-in").addClass("modal-out"),t.onClose()):(n.addClass("not-animated").removeClass("modal-in").addClass("modal-out"),t.onClose(),t.onClosed()),"dialog"===t.type&&0!==U.length&&U.shift().open(),t},n.destroy=function(){this.destroyed||(this.emit("local::beforeDestroy modalBeforeDestroy "+this.type+"BeforeDestroy",this),this.$el&&(this.$el.trigger("modal:beforedestroy "+this.type.toLowerCase()+":beforedestroy"),this.$el.length&&this.$el[0].f7Modal&&delete this.$el[0].f7Modal),u.deleteProps(this),this.destroyed=!0)},t}(l);var I=$.support,X=$.device;exports.Ajax=e,exports.App=C,exports.Constructors=p,exports.Device=X,exports.Event=l,exports.Lazy=R,exports.Modal=B,exports.Modals=f,exports.Module=d,exports.Page=_,exports.Resize=v,exports.SW=b,exports.Support=I,exports.Utils=u,exports.jsx=function(e,t){for(var n=t||{},o=arguments.length,r=new Array(o>2?o-2:0),i=2;i<o;i++)r[i-2]=arguments[i];var a=r||[],s=Object.keys(n).map((function(e){return"_"===e[0]?n[e]?e.replace("_",""):"":e+'="'+n[e]+'"'})).filter((function(e){return!!e})).join(" ");if(["path","img","circle","polygon","line","input"].indexOf(e)>=0)return("<"+e+" "+s+" />").trim();var c=a.filter((function(e){return!!e})).map((function(e){return Array.isArray(e)?e.join(""):e})).join("");return("<"+e+" "+s+">"+c+"</"+e+">").trim()},exports.loadModule=m;
6
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(){function e(){}var t=e.prototype;return t.post=function(e,t){return new Promise((function(n,o){var r=$.getXhr();r.onreadystatechange=function(){4===r.readyState&&(200===r.status?n(r.responseText):o(new Error(r.statusText),r.responseText))},r.open("POST",e,!0);var a=t;"object"==typeof t&&(a=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n+"="+e[n]);return t.sort().join("&")}(t)),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.send(a)}))},t.postForm=function(e,t){return new Promise((function(n,o){var r=$.getXhr();r.onreadystatechange=function(){4===r.readyState&&(200===r.status?n(null,r.responseText):o(new Error(r.status),r.responseText))},r.open("POST",e,!0),r.send(t)}))},t.get=function(e,t){return $.get(e,t)},e}();function t(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function n(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function i(e,t,n){return i=a()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var a=new(Function.bind.apply(e,o));return n&&r(a,n.prototype),a},i.apply(null,arguments)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var c=1,u={uniqueNumber:function(){return c+=1},id:function(e,t){return void 0===e&&(e="xxxxxxxxxx"),void 0===t&&(t="0123456789abcdef"),$.uid(e,t)},mdPreloaderContent:'\n <span class="preloader-inner">\n\t\t\t<svg viewBox="0 0 36 36">\n\t\t\t\t<circle cx="18" cy="18" r="16"></circle>\n\t\t\t</svg>\n </span>\n '.trim(),iosPreloaderContent:('\n <span class="preloader-inner">\n\t\t\t'+[0,1,2,3,4,5,6,7].map((function(){return'<span class="preloader-inner-line"></span>'})).join("")+"\n </span>\n ").trim(),auroraPreloaderContent:'\n <span class="preloader-inner">\n <span class="preloader-inner-circle"></span>\n </span>\n ',eventNameToColonCase:function(e){var t;return e.split("").map((function(e,n){return e.match(/[A-Z]/)&&0!==n&&!t?(t=!0,":"+e.toLowerCase()):e.toLowerCase()})).join("")},deleteProps:function(e){$.deleteProps(e)},nextTick:function(e,t){return void 0===t&&(t=0),setTimeout(e,t)},nextFrame:function(e){return $.nextFrame(e)},now:function(){return Date.now()},requestAnimationFrame:function(e){return $.requestAnimationFrame(e)},cancelAnimationFrame:function(e){return $.cancelAnimationFrame(e)},parseUrlQuery:function(e){return $.urlParam(e)},getTranslate:function(e,t){return void 0===t&&(t="x"),$.getTranslate(e,t)},serializeObject:function(e,t){if(void 0===t&&(t=[]),"string"==typeof e)return e;var n,o=[];function r(e){if(t.length>0){for(var n="",o=0;o<t.length;o+=1)n+=0===o?t[o]:"["+encodeURIComponent(t[o])+"]";return n+"["+encodeURIComponent(e)+"]"}return encodeURIComponent(e)}function a(e){return encodeURIComponent(e)}return Object.keys(e).forEach((function(i){var s;if(Array.isArray(e[i])){s=[];for(var c=0;c<e[i].length;c+=1)Array.isArray(e[i][c])||"object"!=typeof e[i][c]?s.push(r(i)+"[]="+a(e[i][c])):((n=t.slice()).push(i),n.push(String(c)),s.push(u.serializeObject(e[i][c],n)));s.length>0&&o.push(s.join("&"))}else null===e[i]||""===e[i]?o.push(r(i)+"="):"object"==typeof e[i]?((n=t.slice()).push(i),""!==(s=u.serializeObject(e[i],n))&&o.push(s)):void 0!==e[i]&&""!==e[i]?o.push(r(i)+"="+a(e[i])):""===e[i]&&o.push(r(i))})),o.join("&")},isObject:function(e){return"object"==typeof e&&null!==e&&e.constructor&&e.constructor===Object},merge:function(){var e;return(e=$).merge.apply(e,arguments)},extend:function(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];var r=n[0];return n.splice(0,1),(e=$).assign.apply(e,[r].concat(n))},bindMethods:function(e,t){var n=this;Object.keys(t).forEach((function(o){n.isObject(t[o])&&Object.keys(t[o]).forEach((function(n){"function"==typeof t[o][n]&&(t[o][n]=t[o][n].bind(e))})),e[o]=t[o]}))},colorHexToRgb:function(e){var t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,o){return t+t+n+n+o+o})),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return n?n.slice(1).map((function(e){return parseInt(e,16)})):null},colorRgbToHex:function(e,t,n){return"#"+[e,t,n].map((function(e){var t=e.toString(16);return 1===t.length?"0"+t:t})).join("")},colorRgbToHsl:function(e,t,n){e/=255,t/=255,n/=255;var o,r=Math.max(e,t,n),a=Math.min(e,t,n),i=r-a;0===i?o=0:r===e?o=(t-n)/i%6:r===t?o=(n-e)/i+2:r===n&&(o=(e-t)/i+4);var s=(a+r)/2;return o<0&&(o=6+o),[60*o,0===i?0:i/(1-Math.abs(2*s-1)),s]},colorHslToRgb:function(e,t,n){var o,r=(1-Math.abs(2*n-1))*t,a=e/60,i=r*(1-Math.abs(a%2-1));Number.isNaN(e)||void 0===e?o=[0,0,0]:a<=1?o=[r,i,0]:a<=2?o=[i,r,0]:a<=3?o=[0,r,i]:a<=4?o=[0,i,r]:a<=5?o=[i,0,r]:a<=6&&(o=[r,0,i]);var s=n-r/2;return o.map((function(e){return Math.max(0,Math.min(255,Math.round(255*(e+s))))}))},colorHsbToHsl:function(e,t,n){var o={h:e,s:0,l:0},r=t,a=n;return o.l=(2-r)*a/2,o.s=o.l&&o.l<1?r*a/(o.l<.5?2*o.l:2-2*o.l):o.s,[o.h,o.s,o.l]},colorHslToHsb:function(e,t,n){var o={h:e,s:0,b:0},r=n,a=t*(r<.5?r:1-r);return o.b=r+a,o.s=r>0?2*a/o.b:o.s,[o.h,o.s,o.b]},colorThemeCSSProperties:function(){for(var e,t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];if(1===o.length?(e=o[0],t=u.colorHexToRgb(e)):3===o.length&&(t=o,e=u.colorRgbToHex.apply(u,t)),!t)return{};var a=u.colorRgbToHsl.apply(u,t),i=[a[0],a[1],Math.max(0,a[2]-.08)],s=[a[0],a[1],Math.max(0,a[2]+.08)],c=u.colorRgbToHex.apply(u,u.colorHslToRgb.apply(u,i)),l=u.colorRgbToHex.apply(u,u.colorHslToRgb.apply(u,s));return{"--f7-theme-color":e,"--f7-theme-color-rgb":t.join(", "),"--f7-theme-color-shade":c,"--f7-theme-color-tint":l}}},l=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);var n=this;n.params=e,n.eventsParents=t,n.eventsListeners={},n.params&&n.params.on&&Object.keys(n.params.on).forEach((function(e){n.on(e,n.params.on[e])}))}var t=e.prototype;return t.on=function(e,t,n){var o=this;if("function"!=typeof t)return o;var r=n?"unshift":"push";return e.split(" ").forEach((function(e){o.eventsListeners[e]||(o.eventsListeners[e]=[]),o.eventsListeners[e][r](t)})),o},t.once=function(e,t,n){var o=this;if("function"!=typeof t)return o;function r(){o.off(e,r),r.proxy&&delete r.proxy;for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];t.apply(o,a)}return r.proxy=t,o.on(e,r,n)},t.off=function(e,t){var n=this;return n.eventsListeners?(e.split(" ").forEach((function(e){void 0===t?n.eventsListeners[e]=[]:n.eventsListeners[e]&&n.eventsListeners[e].forEach((function(o,r){(o===t||o.proxy&&o.proxy===t)&&n.eventsListeners[e].splice(r,1)}))})),n):n},t.emit=function(){var e,t,n,o,r=this;if(!r.eventsListeners)return r;for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];"string"==typeof i[0]||Array.isArray(i[0])?(e=i[0],t=i.slice(1,i.length),n=r,o=r.eventsParents):(e=i[0].events,t=i[0].data,n=i[0].context||r,o=i[0].local?[]:i[0].parents||r.eventsParents);var c=Array.isArray(e)?e:e.split(" "),u=c.map((function(e){return e.replace("local::","")})),l=c.filter((function(e){return e.indexOf("local::")<0}));return u.forEach((function(e){if(r.eventsListeners&&r.eventsListeners[e]){var o=[];r.eventsListeners[e].forEach((function(e){o.push(e)})),o.forEach((function(e){e.apply(n,t)}))}})),o&&o.length>0&&o.forEach((function(e){e.emit.apply(e,[l].concat(t))})),r},e}(),d=function(e){function t(t,n){return void 0===t&&(t={}),void 0===n&&(n=[]),e.call(this,t,n)||this}o(t,e);var r=t.prototype;return r.useModuleParams=function(e,t){if(e.params){var n={};Object.keys(e.params).forEach((function(e){void 0!==t[e]&&(n[e]=$.extend({},t[e]))})),$.extend(t,e.params),Object.keys(n).forEach((function(e){$.extend(t[e],n[e])}))}},r.useModulesParams=function(e){var t=this;t.modules&&Object.keys(t.modules).forEach((function(n){var o=t.modules[n];o.params&&$.extend(e,o.params)}))},r.useModule=function(e,t){void 0===e&&(e=""),void 0===t&&(t={});var n=this;if(n.modules){var o="string"==typeof e?n.modules[e]:e;o&&(o.instance&&Object.keys(o.instance).forEach((function(e){var t=o.instance[e];n[e]="function"==typeof t?t.bind(n):t})),o.on&&n.on&&Object.keys(o.on).forEach((function(e){n.on(e,o.on[e])})),o.vnode&&(n.vnodeHooks||(n.vnodeHooks={}),Object.keys(o.vnode).forEach((function(e){Object.keys(o.vnode[e]).forEach((function(t){var r=o.vnode[e][t];n.vnodeHooks[t]||(n.vnodeHooks[t]={}),n.vnodeHooks[t][e]||(n.vnodeHooks[t][e]=[]),n.vnodeHooks[t][e].push(r.bind(n))}))}))),o.create&&o.create.bind(n)(t))}},r.useModules=function(e){void 0===e&&(e={});var t=this;t.modules&&Object.keys(t.modules).forEach((function(n){var o=e[n]||{};t.useModule(n,o)}))},t.installModule=function(e){var t=this;t.prototype.modules||(t.prototype.modules={});var n=e.name||Object.keys(t.prototype.modules).length+"_"+$.now();if(t.prototype.modules[n]=e,e.proto&&Object.keys(e.proto).forEach((function(n){t.prototype[n]=e.proto[n]})),e.static&&Object.keys(e.static).forEach((function(n){t[n]=e.static[n]})),e.install){for(var o=arguments.length,r=new Array(o>1?o-1:0),a=1;a<o;a++)r[a-1]=arguments[a];e.install.apply(t,r)}return t},t.use=function(e){var t=this;if(Array.isArray(e))return e.forEach((function(e){return t.installModule(e)})),t;for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return t.installModule.apply(t,[e].concat(o))},n(t,null,[{key:"components",set:function(e){this.use&&this.use(e)}}]),t}(l);function p(e){void 0===e&&(e={});var t=e,n=t.defaultSelector,o=t.constructor,r=t.domProp,a=t.app,s=t.addMethods,c={create:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(o,a?[a].concat(t):t)},get:function(e){if(void 0===e&&(e=n),e instanceof o)return e;var t=$(e);return 0!==t.length?t[0][r]:void 0},destroy:function(e){var t=c.get(e);if(t&&t.destroy)return t.destroy()}};return s&&Array.isArray(s)&&s.forEach((function(e){c[e]=function(t){void 0===t&&(t=n);for(var o=c.get(t),r=arguments.length,a=new Array(r>1?r-1:0),i=1;i<r;i++)a[i-1]=arguments[i];if(o&&o[e])return o[e].apply(o,a)}})),c}function f(e){void 0===e&&(e={});var t=e,n=t.defaultSelector,o=t.constructor,r=t.app;return $.extend(p({defaultSelector:n,constructor:o,app:r,domProp:"f7Modal"}),{open:function(e,t){var n=$(e),a=n[0].f7Modal;return a||(a=new o(r,{el:n})),a.open(t)},close:function(e,t){void 0===e&&(e=n);var a=$(e);if(0!==a.length){var i=a[0].f7Modal;return i||(i=new o(r,{el:a})),i.close(t)}}})}var m=[];function h(e){var t=this;return new Promise((function(n,o){var r,a,i,s=t.instance;if(e){if("string"==typeof e){var c=e.match(/([a-z0-9-]*)/i);if(e.indexOf(".")<0&&c&&c[0].length===e.length){if(!s||s&&!s.params.lazyModulesPath)return void o(new Error('Wia: "lazyModulesPath" app parameter must be specified to fetch module by name'));r=s.params.lazyModulesPath+"/"+e+".js"}else r=e}else"function"==typeof e?i=e:a=e;if(i){var u=i(t,!1);if(!u)return void o(new Error("Wia: Can't find Wia component in specified component function"));if(t.prototype.modules&&t.prototype.modules[u.name])return void n();f(u),n()}if(a){var l=a;if(!l)return void o(new Error("Wia: Can't find Wia component in specified component"));if(t.prototype.modules&&t.prototype.modules[l.name])return void n();f(l),n()}if(r){if(m.indexOf(r)>=0)return void n();m.push(r);var d=new Promise((function(e,n){t.request.get(r,(function(o){var a="wia_component_loader_callback_"+$.id(),i=document.createElement("script");i.innerHTML="window."+a+" = function (Wia, WiaAutoInstallComponent) {return "+o.trim()+"}",$("head").append(i);var s=window[a];delete window[a],$(i).remove();var c=s(t,!1);c?(t.prototype.modules&&t.prototype.modules[c.name]||f(c),e()):n(new Error("Wia: Can't find Wia component in "+r+" file"))}),(function(e,t){n(e,t)}))})),p=new Promise((function(e){t.request.get(r.replace(".js",s.rtl?".rtl.css":".css"),(function(t){var n=document.createElement("style");n.innerHTML=t,$("head").append(n),e()}),(function(){e()}))}));Promise.all([d,p]).then((function(){n()})).catch((function(e){o(e)}))}}else o(new Error("Wia: Lazy module must be specified"));function f(e){t.use(e),s&&(s.useModuleParams(e,s.params),s.useModule(e))}}))}var v={name:"resize",instance:{getSize:function(){var e=this;if(!e.root[0])return{width:0,height:0,left:0,top:0};var t=e.root.offset(),n=[e.root[0].offsetWidth,e.root[0].offsetHeight,t.left,t.top],o=n[0],r=n[1],a=n[2],i=n[3];return e.width=o,e.height=r,e.left=a,e.top=i,{width:o,height:r,left:a,top:i}}},on:{init:function(){var e=this;e.getSize(),window.addEventListener("resize",(function(){e.emit("resize")}),!1),window.addEventListener("orientationchange",(function(){e.emit("orientationchange")}))},orientationchange:function(){this.device.ipad&&(document.body.scrollLeft=0,setTimeout((function(){document.body.scrollLeft=0}),0))},resize:function(){this.getSize()}}};function y(e){var t,n,o;t=function(t){e.emit({events:"click",data:[t]})},$.support.touch?(document.addEventListener("touchstart",(function(e){n=e.changedTouches[0].clientX,o=e.changedTouches[0].clientY}),!0),document.addEventListener("touchend",(function(e){var r=Math.abs(e.changedTouches[0].clientX-n),a=Math.abs(e.changedTouches[0].clientY-o);r<=5&&a<=5&&t.call(this,e)}),!0)):document.addEventListener("click",t,!0),e.on("click",(function(t){var n=$(t.target),o=n.closest("a");o.length>0&&o.attr("href"),Object.keys(e.modules).forEach((function(o){var r=e.modules[o].clicks;r&&(t.preventF7Router||Object.keys(r).forEach((function(o){var a=n.closest(o).eq(0);a.length>0&&r[o].call(e,a,a.dataset(),t)})))}))}))}var g={name:"clicks",params:{clicks:{externalLinks:".ext"}},on:{init:function(){y(this)}}},w={registrations:[],register:function(e,t){var n=this;return"serviceWorker"in window.navigator&&n.serviceWorker.container?new Promise((function(o,r){n.serviceWorker.container.register(e,t?{scope:t}:{}).then((function(e){w.registrations.push(e),n.emit("serviceWorkerRegisterSuccess",e),o(e)})).catch((function(e){n.emit("serviceWorkerRegisterError",e),r(e)}))})):new Promise((function(e,t){t(new Error("Service worker is not supported"))}))},unregister:function(e){var t,n=this;return"serviceWorker"in window.navigator&&n.serviceWorker.container?(t=e?Array.isArray(e)?e:[e]:w.registrations,Promise.all(t.map((function(e){return new Promise((function(t,o){e.unregister().then((function(){w.registrations.indexOf(e)>=0&&w.registrations.splice(w.registrations.indexOf(e),1),n.emit("serviceWorkerUnregisterSuccess",e),t()})).catch((function(t){n.emit("serviceWorkerUnregisterError",e,t),o(t)}))}))})))):new Promise((function(e,t){t(new Error("Service worker is not supported"))}))}},b={name:"sw",params:{serviceWorker:{path:void 0,scope:void 0}},create:function(){var e=this;$.extend(e,{serviceWorker:{container:"serviceWorker"in window.navigator?window.navigator.serviceWorker:void 0,registrations:w.registrations,register:w.register.bind(e),unregister:w.unregister.bind(e)}})},on:{init:function(){if("serviceWorker"in window.navigator){var e=this;if(e.serviceWorker.container){var t=e.params.serviceWorker.path,n=e.params.serviceWorker.scope;if(t&&(!Array.isArray(t)||t.length))(Array.isArray(t)?t:[t]).forEach((function(t){e.serviceWorker.register(t,n)}))}}}}},k=$.support,x=$.device,C=function(e){function t(t){var n;n=e.call(this,t)||this;var o=$.extend({},t),r=s(n);r.device=x,r.support=k;var a={version:"0.0.1",root:"body",theme:"auto",language:window.navigator.language,routes:[],lazyModulesPath:null,initOnDeviceReady:!0,autoDarkTheme:!1,iosTranslucentBars:!0,iosTranslucentModals:!0,component:void 0,componentUrl:void 0};r.useModulesParams(a),r.params=$.extend(a,t);var i=$(r.params.root);$.extend(r,{owner:r.params.owner,name:r.params.name,id:r.params.owner+"."+r.params.name,version:r.params.version,routes:r.params.routes,language:r.params.language,root:i,$el:i,cfg:r.params.cfg,api:r.params.api,rtl:"rtl"===i.css("direction"),theme:"auto"===r.params.theme?x.ios?"ios":x.desktop?"aurora":"md":r.params.theme,passedParams:o,online:window.navigator.onLine}),r.root&&r.root[0]&&(r.root[0].wia=r),r.touchEvents={start:k.touch?"touchstart":k.pointerEvents?"pointerdown":"mousedown",move:k.touch?"touchmove":k.pointerEvents?"pointermove":"mousemove",end:k.touch?"touchend":k.pointerEvents?"pointerup":"mouseup"},r.useModules(),r.initData();var c="(prefers-color-scheme: dark)",u="(prefers-color-scheme: light)";return r.mq={},window.matchMedia&&(r.mq.dark=window.matchMedia(c),r.mq.light=window.matchMedia(u)),r.colorSchemeListener=function(e){var t=e.matches,n=e.media;if(t){var o=document.querySelector("html");n===c?o.classList.add("theme-dark"):n===u&&o.classList.remove("theme-dark")}},r.params.init&&(x.cordova&&r.params.initOnDeviceReady?$(document).on("deviceready",(function(){r.init()})):r.init()),r||s(n)}o(t,e);var r=t.prototype;return r.load=function(e){this.emit("local::load appLoad",e)},r.show=function(e,t){this.emit("local::show appShow",e,t)},r.hide=function(){this.emit("local::hide appHide")},r.unload=function(){this.emit("local::unload appUnload")},r.initData=function(){var e=this;e.data={},e.params.data&&"function"==typeof e.params.data?$.extend(e.data,e.params.data.bind(e)()):e.params.data&&$.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]}))},r.enableAutoDarkTheme=function(){if(window.matchMedia){var e=this,t=document.querySelector("html");e.mq.dark&&e.mq.light&&(e.mq.dark.addListener(e.colorSchemeListener),e.mq.light.addListener(e.colorSchemeListener)),e.mq.dark&&e.mq.dark.matches?t.classList.add("theme-dark"):e.mq.light&&e.mq.light.matches&&t.classList.remove("theme-dark")}},r.disableAutoDarkTheme=function(){if(window.matchMedia){var e=this;e.mq.dark&&e.mq.dark.removeListener(e.colorSchemeListener),e.mq.light&&e.mq.light.removeListener(e.colorSchemeListener)}},r.init=function(){var e=this;return e.initialized||($.App=t,x.ios&&x.webView&&window.addEventListener("touchstart",(function(){})),e.root.addClass("framework7-initializing"),e.rtl&&$("html").attr("dir","rtl"),e.params.autoDarkTheme&&e.enableAutoDarkTheme(),window.addEventListener("offline",(function(){e.online=!1,e.emit("offline"),e.emit("connection",!1)})),window.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&&x.ios&&$("html").addClass("ios-translucent-bars"),e.params.iosTranslucentModals&&"ios"===e.theme&&x.ios&&$("html").addClass("ios-translucent-modals"),$.nextFrame((function(){e.root.removeClass("framework7-initializing")})),function(){var e=[],t=document.querySelector("html"),n=document.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]');if(!t)return;x.standalone&&x.ios&&n&&"black-translucent"===n.content&&e.push("device-full-viewport");e.push("device-pixel-ratio-"+Math.floor(x.pixelRatio)),x.os&&!x.desktop?e.push("device-"+x.os):x.desktop&&(e.push("device-desktop"),x.os&&e.push("device-"+x.os));(x.cordova||x.phonegap)&&e.push("device-cordova");e.forEach((function(e){t.classList.add(e)}))}(),e.initialized=!0,e.emit("init")),e},r.loadModule=function(e){t.loadModule(e),this[e.name].init&&this[e.name].init()},r.loadModules=function(){return t.loadModules.apply(t,arguments)},r.getVnodeHooks=function(e,t){var n=this;return n.vnodeHooks&&n.vnodeHooks[e]&&n.vnodeHooks[e][t]||[]},n(t,[{key:"$",get:function(){return $}}],[{key:"Dom",get:function(){return $}},{key:"$",get:function(){return $}},{key:"Module",get:function(){return d}},{key:"Event",get:function(){return l}}]),t}(d);C.apps={},C.ModalMethods=f,C.ConstructorMethods=p,C.loadModule=h,C.loadModules=function(e){return Promise.all(e.map((function(e){return C.loadModule(e)})))},C.support=k,C.device=x,C.utils=u,C.use([v,g,b]);var E,M,L,O,A={normal:"nor",retina:"ret",srcset:"set",threshold:0},j=window.innerHeight,T=R(),P=document.body.classList.contains("srcset")||"srcset"in document.createElement("img"),q=window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI,H=function(){function e(e){E=$.assign({},A,e)}var t=e.prototype;return t.start=function(e){return["scroll","resize"].forEach((function(t){return e.addEventListener(t,S)})),O=e,this},t.stop=function(){return["scroll","resize"].forEach((function(e){return O.removeEventListener(e,S)})),this},t.update=function(){setTimeout((function(){D(),z()}),1)},e}();function R(){return window.scrollY||window.pageYOffset}function S(){T=R(),M||(window.requestAnimationFrame((function(){return z()})),M=!0)}function W(e){var t=T,n=t+j,o=function(e){return e.getBoundingClientRect().top+T}(e),r=o+e.offsetHeight,a=E.threshold/100*j;return r>=t-a&&o<=n+a}function z(){if(L)return j=window.innerHeight,L.forEach((function(e){return W(e)&&function(e){if($.emit("lazy:src:before",e),P&&e.hasAttribute(E.srcset))e.setAttribute("srcset",e.getAttribute(E.srcset));else{var t=q>1&&e.getAttribute(E.retina)||e.getAttribute(E.normal);e.setAttribute("src",t),console.log("set src:"+t)}$.emit("lazy:src:after",e),[E.normal,E.retina,E.srcset].forEach((function(t){return e.removeAttribute(t)})),D()}(e)})),M=!1,this}function D(e){return L=e?Array.prototype.slice.call(e.querySelectorAll("["+E.normal+"]")):Array.prototype.slice.call(document.querySelectorAll("["+E.normal+"]")),this}var _=function(e){function t(t,n,o,r){var a;return(a=e.call(this,null,[t])||this).app=t,a.cfg=t.cfg,a.name=n,a.title=o,a.style=r||"./page/"+n+".css",a.path=""+n,a.view=null,a.el=null,a.$el=null,a.html="",a.css="",a.js="",a.data={},a.param={},a}o(t,e);var n=t.prototype;return n.load=function(e){this.emit("local::load pageLoad",e)},n.ready=function(e,t,n){this.init(),this.emit("local::ready pageReady",e,t,n)},n.init=function(e){var t=this.view,n=(e=e?$(e):t).qus("[name]");null==n||n.forEach((function(e){var n=$(e),o=n.attr("name");t[o]&&t[o].dom===e||(t[o]=n)})),e.qus("[name$=-tp]").hide(),e.qus('a[href=""]').attr("href","javascript:;")},n.show=function(e,t){e.qus("[name$=-tp]").hide(),e.qus('a[href=""]').attr("href","javascript:;"),this.reset&&this.reset(),this.emit("local::show pageShow",e,t)},n.back=function(e,t){e.qus("[name$=-tp]").hide(),e.qus('a[href=""]').attr("href","javascript:;"),this.emit("local::back pageBack",e,t)},n.hide=function(e){this.emit("local::hide pageHide",e)},t}(l),B=[],F=[];var U=function(e){function t(t,n){var o,r=s(o=e.call(this,n,[t])||this);return r.params=u.extend({},n),r.opened=!1,s(o)||s(o)}o(t,e);var n=t.prototype;return n.onOpen=function(){var e=this;e.opened=!0,B.push(e),$("html").addClass("with-modal-"+e.type.toLowerCase()),e.$el.trigger("modal:open "+e.type.toLowerCase()+":open"),e.emit("local::open modalOpen "+e.type+"Open",e)},n.onOpened=function(){var e=this;e.$el.trigger("modal:opened "+e.type.toLowerCase()+":opened"),e.emit("local::opened modalOpened "+e.type+"Opened",e)},n.onClose=function(){var e=this;e.opened=!1,e.type&&e.$el&&(B.splice(B.indexOf(e),1),$("html").removeClass("with-modal-"+e.type.toLowerCase()),e.$el.trigger("modal:close "+e.type.toLowerCase()+":close"),e.emit("local::close modalClose "+e.type+"Close",e))},n.onClosed=function(){var e=this;e.type&&e.$el&&(e.$el.removeClass("modal-out"),e.$el.hide(),e.$el.trigger("modal:closed "+e.type.toLowerCase()+":closed"),e.emit("local::closed modalClosed "+e.type+"Closed",e))},n.open=function(e){var t,n=this,o=n.app,r=n.$el,a=n.type,i=n.$backdropEl,s=n.params.moveToRoot,c=!0;if(void 0!==e?c=e:void 0!==n.params.animate&&(c=n.params.animate),!r||r.hasClass("modal-in"))return n;if("dialog"===a&&o.params.modal.queueDialogs&&($(".dialog.modal-in").length>0?t=!0:B.length>0&&B.forEach((function(e){"dialog"===e.type&&(t=!0)})),t))return F.push(n),n;var u=r.parent(),l=r.parents(document).length>0;function d(){r.hasClass("modal-out")?n.onClosed():r.hasClass("modal-in")&&n.onOpened()}return s&&o.params.modal.moveToRoot&&!u.is(o.root)&&(o.root.append(r),n.once(a+"Closed",(function(){l?u.append(r):r.remove()}))),r.show(),n._clientLeft=r[0].clientLeft,c?(i&&(i.removeClass("not-animated"),i.addClass("backdrop-in")),r.animationEnd((function(){d()})),r.transitionEnd((function(){d()})),r.removeClass("modal-out not-animated").addClass("modal-in"),n.onOpen()):(i&&i.addClass("backdrop-in not-animated"),r.removeClass("modal-out").addClass("modal-in not-animated"),n.onOpen(),n.onOpened()),n},n.close=function(e){var t=this,n=t.$el,o=t.$backdropEl,r=!0;if(void 0!==e?r=e:void 0!==t.params.animate&&(r=t.params.animate),!n||!n.hasClass("modal-in"))return F.indexOf(t)>=0&&F.splice(F.indexOf(t),1),t;if(o){var a=!0;"popup"===t.type&&t.$el.prevAll(".popup.modal-in").each((function(e,n){var o=n.f7Modal;o&&o.params.closeByBackdropClick&&o.params.backdrop&&o.backdropEl===t.backdropEl&&(a=!1)})),a&&(o[r?"removeClass":"addClass"]("not-animated"),o.removeClass("backdrop-in"))}function i(){n.hasClass("modal-out")?t.onClosed():n.hasClass("modal-in")&&t.onOpened()}return n[r?"removeClass":"addClass"]("not-animated"),r?(n.animationEnd((function(){i()})),n.transitionEnd((function(){i()})),n.removeClass("modal-in").addClass("modal-out"),t.onClose()):(n.addClass("not-animated").removeClass("modal-in").addClass("modal-out"),t.onClose(),t.onClosed()),"dialog"===t.type&&0!==F.length&&F.shift().open(),t},n.destroy=function(){var e=this;e.destroyed||(e.emit("local::beforeDestroy modalBeforeDestroy "+e.type+"BeforeDestroy",e),e.$el&&(e.$el.trigger("modal:beforedestroy "+e.type.toLowerCase()+":beforedestroy"),e.$el.length&&e.$el[0].f7Modal&&delete e.$el[0].f7Modal),u.deleteProps(e),e.destroyed=!0)},t}(l);var I=$.support,X=$.device;exports.Ajax=e,exports.App=C,exports.Constructors=p,exports.Device=X,exports.Event=l,exports.Lazy=H,exports.Modal=U,exports.Modals=f,exports.Module=d,exports.Page=_,exports.Resize=v,exports.SW=b,exports.Support=I,exports.Utils=u,exports.jsx=function(e,t){for(var n=t||{},o=arguments.length,r=new Array(o>2?o-2:0),a=2;a<o;a++)r[a-2]=arguments[a];var i=r||[],s=Object.keys(n).map((function(e){return"_"===e[0]?n[e]?e.replace("_",""):"":e+'="'+n[e]+'"'})).filter((function(e){return!!e})).join(" ");if(["path","img","circle","polygon","line","input"].indexOf(e)>=0)return("<"+e+" "+s+" />").trim();var c=i.filter((function(e){return!!e})).map((function(e){return Array.isArray(e)?e.join(""):e})).join("");return("<"+e+" "+s+">"+c+"</"+e+">").trim()},exports.loadModule=h;
package/dist/core.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * wia core v0.1.15
2
+ * wia core v0.1.16
3
3
  * (c) 2021 Sibyl Yu
4
4
  * @license MIT
5
5
  */
@@ -114,7 +114,8 @@ function _createClass(Constructor, protoProps, staticProps) {
114
114
  function _inheritsLoose(subClass, superClass) {
115
115
  subClass.prototype = Object.create(superClass.prototype);
116
116
  subClass.prototype.constructor = subClass;
117
- subClass.__proto__ = superClass;
117
+
118
+ _setPrototypeOf(subClass, superClass);
118
119
  }
119
120
 
120
121
  function _setPrototypeOf(o, p) {
@@ -132,7 +133,7 @@ function _isNativeReflectConstruct() {
132
133
  if (typeof Proxy === "function") return true;
133
134
 
134
135
  try {
135
- Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
136
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
136
137
  return true;
137
138
  } catch (e) {
138
139
  return false;
@@ -1121,7 +1122,7 @@ function initClicks(app) {
1121
1122
  var $clickedEl = $(e.target);
1122
1123
  var $clickedLinkEl = $clickedEl.closest('a');
1123
1124
  var isLink = $clickedLinkEl.length > 0;
1124
- var url = isLink && $clickedLinkEl.attr('href'); // call Modules Clicks
1125
+ isLink && $clickedLinkEl.attr('href'); // call Modules Clicks
1125
1126
 
1126
1127
  Object.keys(app.modules).forEach(function (moduleName) {
1127
1128
  var moduleClicks = app.modules[moduleName].clicks;
@@ -1247,8 +1248,8 @@ var SW$1 = {
1247
1248
  }
1248
1249
  };
1249
1250
 
1250
- var Support = $.support;
1251
- var Device = $.device;
1251
+ var Support$1 = $.support;
1252
+ var Device$1 = $.device;
1252
1253
  /**
1253
1254
  * 应用类,每个wia应用从该类继承,由 首页加载创建或者路由创建
1254
1255
  */
@@ -1264,8 +1265,8 @@ var App = /*#__PURE__*/function (_Module) {
1264
1265
 
1265
1266
  var app = _assertThisInitialized(_this);
1266
1267
 
1267
- app.device = Device;
1268
- app.support = Support; // Default
1268
+ app.device = Device$1;
1269
+ app.support = Support$1; // Default
1269
1270
 
1270
1271
  var def = {
1271
1272
  version: '0.0.1',
@@ -1309,8 +1310,8 @@ var App = /*#__PURE__*/function (_Module) {
1309
1310
  // Theme
1310
1311
  theme: function getTheme() {
1311
1312
  if (app.params.theme === 'auto') {
1312
- if (Device.ios) return 'ios';
1313
- if (Device.desktop) return 'aurora';
1313
+ if (Device$1.ios) return 'ios';
1314
+ if (Device$1.desktop) return 'aurora';
1314
1315
  return 'md';
1315
1316
  }
1316
1317
 
@@ -1326,9 +1327,9 @@ var App = /*#__PURE__*/function (_Module) {
1326
1327
  }
1327
1328
 
1328
1329
  app.touchEvents = {
1329
- start: Support.touch ? 'touchstart' : Support.pointerEvents ? 'pointerdown' : 'mousedown',
1330
- move: Support.touch ? 'touchmove' : Support.pointerEvents ? 'pointermove' : 'mousemove',
1331
- end: Support.touch ? 'touchend' : Support.pointerEvents ? 'pointerup' : 'mouseup'
1330
+ start: Support$1.touch ? 'touchstart' : Support$1.pointerEvents ? 'pointerdown' : 'mousedown',
1331
+ move: Support$1.touch ? 'touchmove' : Support$1.pointerEvents ? 'pointermove' : 'mousemove',
1332
+ end: Support$1.touch ? 'touchend' : Support$1.pointerEvents ? 'pointerup' : 'mouseup'
1332
1333
  }; // 加载use插入的模块类,每个模块作为app的一个属性,合并到实例。
1333
1334
  // 模块包括相关属性及方法(如:create、get、destroy)
1334
1335
  // 调用每个模块的 create 方法
@@ -1365,7 +1366,7 @@ var App = /*#__PURE__*/function (_Module) {
1365
1366
 
1366
1367
 
1367
1368
  function init() {
1368
- if (Device.cordova && app.params.initOnDeviceReady) {
1369
+ if (Device$1.cordova && app.params.initOnDeviceReady) {
1369
1370
  $(document).on('deviceready', function () {
1370
1371
  app.init();
1371
1372
  });
@@ -1461,7 +1462,7 @@ var App = /*#__PURE__*/function (_Module) {
1461
1462
  if (app.initialized) return app;
1462
1463
  $.App = App;
1463
1464
 
1464
- if (Device.ios && Device.webView) {
1465
+ if (Device$1.ios && Device$1.webView) {
1465
1466
  // Strange hack required for iOS 8 webview to work on inputs
1466
1467
  window.addEventListener('touchstart', function () {});
1467
1468
  }
@@ -1493,11 +1494,11 @@ var App = /*#__PURE__*/function (_Module) {
1493
1494
 
1494
1495
  $('html').removeClass('ios md aurora').addClass(app.theme); // iOS Translucent
1495
1496
 
1496
- if (app.params.iosTranslucentBars && app.theme === 'ios' && Device.ios) {
1497
+ if (app.params.iosTranslucentBars && app.theme === 'ios' && Device$1.ios) {
1497
1498
  $('html').addClass('ios-translucent-bars');
1498
1499
  }
1499
1500
 
1500
- if (app.params.iosTranslucentModals && app.theme === 'ios' && Device.ios) {
1501
+ if (app.params.iosTranslucentModals && app.theme === 'ios' && Device$1.ios) {
1501
1502
  $('html').addClass('ios-translucent-modals');
1502
1503
  } // Init class
1503
1504
 
@@ -1575,24 +1576,24 @@ function initStyle() {
1575
1576
  var metaStatusbar = document.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]');
1576
1577
  if (!html) return;
1577
1578
 
1578
- if (Device.standalone && Device.ios && metaStatusbar && metaStatusbar.content === 'black-translucent') {
1579
+ if (Device$1.standalone && Device$1.ios && metaStatusbar && metaStatusbar.content === 'black-translucent') {
1579
1580
  classNames.push('device-full-viewport');
1580
1581
  } // Pixel Ratio
1581
1582
 
1582
1583
 
1583
- classNames.push("device-pixel-ratio-" + Math.floor(Device.pixelRatio)); // OS classes
1584
+ classNames.push("device-pixel-ratio-" + Math.floor(Device$1.pixelRatio)); // OS classes
1584
1585
 
1585
- if (Device.os && !Device.desktop) {
1586
- classNames.push("device-" + Device.os);
1587
- } else if (Device.desktop) {
1586
+ if (Device$1.os && !Device$1.desktop) {
1587
+ classNames.push("device-" + Device$1.os);
1588
+ } else if (Device$1.desktop) {
1588
1589
  classNames.push('device-desktop');
1589
1590
 
1590
- if (Device.os) {
1591
- classNames.push("device-" + Device.os);
1591
+ if (Device$1.os) {
1592
+ classNames.push("device-" + Device$1.os);
1592
1593
  }
1593
1594
  }
1594
1595
 
1595
- if (Device.cordova || Device.phonegap) {
1596
+ if (Device$1.cordova || Device$1.phonegap) {
1596
1597
  classNames.push('device-cordova');
1597
1598
  } // Add html classes
1598
1599
 
@@ -1615,8 +1616,8 @@ App.loadModules = function (modules) {
1615
1616
  }; // app 加载到 app实例的一些扩展模块
1616
1617
 
1617
1618
 
1618
- App.support = Support;
1619
- App.device = Device;
1619
+ App.support = Support$1;
1620
+ App.device = Device$1;
1620
1621
  App.utils = Utils; // 添加应用缺省模块
1621
1622
 
1622
1623
  App.use([Resize, // 控制屏幕大小
@@ -1895,15 +1896,43 @@ var Page = /*#__PURE__*/function (_Event) {
1895
1896
  // $.assign(this, {page, param, back});
1896
1897
  // $.assign(this.data, param);
1897
1898
  // 隐藏所有模板
1899
+ this.init();
1898
1900
  this.emit('local::ready pageReady', view, param, back);
1899
- view.qus('[name$=-tp]').hide();
1901
+ }
1902
+ /**
1903
+ * 对页面进行初始化处理,或页面内容动态变更时,对局部页面容器进行初始化
1904
+ * 具备name属性的dom节点直接赋值给页面view
1905
+ * 只挂载一个,多个同名name,最后一个起作用,因此一个页面内,name不要重复
1906
+ * 同节点多次调用不覆盖,同名不同dom节点,覆盖
1907
+ * 覆盖后,原直接节点属性的 bind 会失效,需真的新的$dom重新bind
1908
+ * @param {*} v dom 容器,默认为页面实例的view
1909
+ */
1910
+ ;
1911
+
1912
+ _proto.init = function init(v) {
1913
+ var view = this.view;
1914
+ v = v ? $(v) : view; // 页面上带name属性节点,直接作为page.view的属性,方便页面代码直接调用
1915
+
1916
+ var ns = v.qus('[name]');
1917
+ ns === null || ns === void 0 ? void 0 : ns.forEach(function (n) {
1918
+ var $n = $(n);
1919
+ var name = $n.attr('name');
1920
+ if (!view[name] || view[name].dom !== n) view[name] = $n;
1921
+ }); // 隐藏所有模板
1922
+
1923
+ v.qus('[name$=-tp]').hide(); // 防止空链接,刷新页面
1924
+
1925
+ v.qus('a[href=""]').attr('href', 'javascript:;');
1900
1926
  } // 显示已加载的页面
1901
1927
  // view:页面Dom层,param:参数
1902
1928
  ;
1903
1929
 
1904
1930
  _proto.show = function show(view, param) {
1905
- // 防止空链接,刷新页面
1906
- view.qus('a[href=""]').attr('href', 'javascript:;');
1931
+ // 隐藏所有模板
1932
+ view.qus('[name$=-tp]').hide(); // 防止空链接,刷新页面
1933
+
1934
+ view.qus('a[href=""]').attr('href', 'javascript:;'); // this.init();
1935
+
1907
1936
  if (this.reset) this.reset();
1908
1937
  this.emit('local::show pageShow', view, param);
1909
1938
  } // 回退显示已加载的页面
@@ -1911,7 +1940,9 @@ var Page = /*#__PURE__*/function (_Event) {
1911
1940
  ;
1912
1941
 
1913
1942
  _proto.back = function back(view, param) {
1914
- // 防止空链接,刷新页面
1943
+ // 隐藏所有模板
1944
+ view.qus('[name$=-tp]').hide(); // 防止空链接,刷新页面
1945
+
1915
1946
  view.qus('a[href=""]').attr('href', 'javascript:;');
1916
1947
  this.emit('local::back pageBack', view, param);
1917
1948
  };
@@ -2201,7 +2232,7 @@ function jsx(tag, props) {
2201
2232
 
2202
2233
  // export {default as Device} from './device';
2203
2234
 
2204
- var Support$1 = $.support;
2205
- var Device$1 = $.device;
2235
+ var Support = $.support;
2236
+ var Device = $.device;
2206
2237
 
2207
- export { Ajax, App, Constructors, Device$1 as Device, Event, Lazy, Modal, Modals, Module, Page, Resize, SW$1 as SW, Support$1 as Support, Utils, jsx, loadModule };
2238
+ export { Ajax, App, Constructors, Device, Event, Lazy, Modal, Modals, Module, Page, Resize, SW$1 as SW, Support, Utils, jsx, loadModule };
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * wia core v0.1.15
2
+ * wia core v0.1.16
3
3
  * (c) 2021 Sibyl Yu
4
4
  * @license MIT
5
5
  */
6
- var e=function(){function e(){}var t=e.prototype;return t.post=function(e,t){return new Promise((function(n,o){var r=$.getXhr();r.onreadystatechange=function(){4===r.readyState&&(200===r.status?n(r.responseText):o(new Error(r.statusText),r.responseText))},r.open("POST",e,!0);var i=t;"object"==typeof t&&(i=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n+"="+e[n]);return t.sort().join("&")}(t)),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.send(i)}))},t.postForm=function(e,t){return new Promise((function(n,o){var r=$.getXhr();r.onreadystatechange=function(){4===r.readyState&&(200===r.status?n(null,r.responseText):o(new Error(r.status),r.responseText))},r.open("POST",e,!0),r.send(t)}))},t.get=function(e,t){return $.get(e,t)},e}();function t(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function n(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function a(e,t,n){return(a=i()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return n&&r(i,n.prototype),i}).apply(null,arguments)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var c=1,u={uniqueNumber:function(){return c+=1},id:function(e,t){return void 0===e&&(e="xxxxxxxxxx"),void 0===t&&(t="0123456789abcdef"),$.uid(e,t)},mdPreloaderContent:'\n <span class="preloader-inner">\n\t\t\t<svg viewBox="0 0 36 36">\n\t\t\t\t<circle cx="18" cy="18" r="16"></circle>\n\t\t\t</svg>\n </span>\n '.trim(),iosPreloaderContent:('\n <span class="preloader-inner">\n\t\t\t'+[0,1,2,3,4,5,6,7].map((function(){return'<span class="preloader-inner-line"></span>'})).join("")+"\n </span>\n ").trim(),auroraPreloaderContent:'\n <span class="preloader-inner">\n <span class="preloader-inner-circle"></span>\n </span>\n ',eventNameToColonCase:function(e){var t;return e.split("").map((function(e,n){return e.match(/[A-Z]/)&&0!==n&&!t?(t=!0,":"+e.toLowerCase()):e.toLowerCase()})).join("")},deleteProps:function(e){$.deleteProps(e)},nextTick:function(e,t){return void 0===t&&(t=0),setTimeout(e,t)},nextFrame:function(e){return $.nextFrame(e)},now:function(){return Date.now()},requestAnimationFrame:function(e){return $.requestAnimationFrame(e)},cancelAnimationFrame:function(e){return $.cancelAnimationFrame(e)},parseUrlQuery:function(e){return $.urlParam(e)},getTranslate:function(e,t){return void 0===t&&(t="x"),$.getTranslate(e,t)},serializeObject:function(e,t){if(void 0===t&&(t=[]),"string"==typeof e)return e;var n,o=[];function r(e){if(t.length>0){for(var n="",o=0;o<t.length;o+=1)n+=0===o?t[o]:"["+encodeURIComponent(t[o])+"]";return n+"["+encodeURIComponent(e)+"]"}return encodeURIComponent(e)}function i(e){return encodeURIComponent(e)}return Object.keys(e).forEach((function(a){var s;if(Array.isArray(e[a])){s=[];for(var c=0;c<e[a].length;c+=1)Array.isArray(e[a][c])||"object"!=typeof e[a][c]?s.push(r(a)+"[]="+i(e[a][c])):((n=t.slice()).push(a),n.push(String(c)),s.push(u.serializeObject(e[a][c],n)));s.length>0&&o.push(s.join("&"))}else null===e[a]||""===e[a]?o.push(r(a)+"="):"object"==typeof e[a]?((n=t.slice()).push(a),""!==(s=u.serializeObject(e[a],n))&&o.push(s)):void 0!==e[a]&&""!==e[a]?o.push(r(a)+"="+i(e[a])):""===e[a]&&o.push(r(a))})),o.join("&")},isObject:function(e){return"object"==typeof e&&null!==e&&e.constructor&&e.constructor===Object},merge:function(){var e;return(e=$).merge.apply(e,arguments)},extend:function(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];var r=n[0];return n.splice(0,1),(e=$).assign.apply(e,[r].concat(n))},bindMethods:function(e,t){var n=this;Object.keys(t).forEach((function(o){n.isObject(t[o])&&Object.keys(t[o]).forEach((function(n){"function"==typeof t[o][n]&&(t[o][n]=t[o][n].bind(e))})),e[o]=t[o]}))},colorHexToRgb:function(e){var t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,o){return t+t+n+n+o+o})),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return n?n.slice(1).map((function(e){return parseInt(e,16)})):null},colorRgbToHex:function(e,t,n){return"#"+[e,t,n].map((function(e){var t=e.toString(16);return 1===t.length?"0"+t:t})).join("")},colorRgbToHsl:function(e,t,n){e/=255,t/=255,n/=255;var o,r=Math.max(e,t,n),i=Math.min(e,t,n),a=r-i;0===a?o=0:r===e?o=(t-n)/a%6:r===t?o=(n-e)/a+2:r===n&&(o=(e-t)/a+4);var s=(i+r)/2;return o<0&&(o=6+o),[60*o,0===a?0:a/(1-Math.abs(2*s-1)),s]},colorHslToRgb:function(e,t,n){var o,r=(1-Math.abs(2*n-1))*t,i=e/60,a=r*(1-Math.abs(i%2-1));Number.isNaN(e)||void 0===e?o=[0,0,0]:i<=1?o=[r,a,0]:i<=2?o=[a,r,0]:i<=3?o=[0,r,a]:i<=4?o=[0,a,r]:i<=5?o=[a,0,r]:i<=6&&(o=[r,0,a]);var s=n-r/2;return o.map((function(e){return Math.max(0,Math.min(255,Math.round(255*(e+s))))}))},colorHsbToHsl:function(e,t,n){var o={h:e,s:0,l:0},r=t,i=n;return o.l=(2-r)*i/2,o.s=o.l&&o.l<1?r*i/(o.l<.5?2*o.l:2-2*o.l):o.s,[o.h,o.s,o.l]},colorHslToHsb:function(e,t,n){var o={h:e,s:0,b:0},r=n,i=t*(r<.5?r:1-r);return o.b=r+i,o.s=r>0?2*i/o.b:o.s,[o.h,o.s,o.b]},colorThemeCSSProperties:function(){for(var e,t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];if(1===o.length?(e=o[0],t=u.colorHexToRgb(e)):3===o.length&&(t=o,e=u.colorRgbToHex.apply(u,t)),!t)return{};var i=u.colorRgbToHsl.apply(u,t),a=[i[0],i[1],Math.max(0,i[2]-.08)],s=[i[0],i[1],Math.max(0,i[2]+.08)],c=u.colorRgbToHex.apply(u,u.colorHslToRgb.apply(u,a)),l=u.colorRgbToHex.apply(u,u.colorHslToRgb.apply(u,s));return{"--f7-theme-color":e,"--f7-theme-color-rgb":t.join(", "),"--f7-theme-color-shade":c,"--f7-theme-color-tint":l}}},l=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);var n=this;n.params=e,n.eventsParents=t,n.eventsListeners={},n.params&&n.params.on&&Object.keys(n.params.on).forEach((function(e){n.on(e,n.params.on[e])}))}var t=e.prototype;return t.on=function(e,t,n){var o=this;if("function"!=typeof t)return o;var r=n?"unshift":"push";return e.split(" ").forEach((function(e){o.eventsListeners[e]||(o.eventsListeners[e]=[]),o.eventsListeners[e][r](t)})),o},t.once=function(e,t,n){var o=this;if("function"!=typeof t)return o;function r(){o.off(e,r),r.proxy&&delete r.proxy;for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];t.apply(o,i)}return r.proxy=t,o.on(e,r,n)},t.off=function(e,t){var n=this;return n.eventsListeners?(e.split(" ").forEach((function(e){void 0===t?n.eventsListeners[e]=[]:n.eventsListeners[e]&&n.eventsListeners[e].forEach((function(o,r){(o===t||o.proxy&&o.proxy===t)&&n.eventsListeners[e].splice(r,1)}))})),n):n},t.emit=function(){var e,t,n,o,r=this;if(!r.eventsListeners)return r;for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];"string"==typeof a[0]||Array.isArray(a[0])?(e=a[0],t=a.slice(1,a.length),n=r,o=r.eventsParents):(e=a[0].events,t=a[0].data,n=a[0].context||r,o=a[0].local?[]:a[0].parents||r.eventsParents);var c=Array.isArray(e)?e:e.split(" "),u=c.map((function(e){return e.replace("local::","")})),l=c.filter((function(e){return e.indexOf("local::")<0}));return u.forEach((function(e){if(r.eventsListeners&&r.eventsListeners[e]){var o=[];r.eventsListeners[e].forEach((function(e){o.push(e)})),o.forEach((function(e){e.apply(n,t)}))}})),o&&o.length>0&&o.forEach((function(e){e.emit.apply(e,[l].concat(t))})),r},e}(),d=function(e){function t(t,n){return void 0===t&&(t={}),void 0===n&&(n=[]),e.call(this,t,n)||this}o(t,e);var r=t.prototype;return r.useModuleParams=function(e,t){if(e.params){var n={};Object.keys(e.params).forEach((function(e){void 0!==t[e]&&(n[e]=$.extend({},t[e]))})),$.extend(t,e.params),Object.keys(n).forEach((function(e){$.extend(t[e],n[e])}))}},r.useModulesParams=function(e){var t=this;t.modules&&Object.keys(t.modules).forEach((function(n){var o=t.modules[n];o.params&&$.extend(e,o.params)}))},r.useModule=function(e,t){void 0===e&&(e=""),void 0===t&&(t={});var n=this;if(n.modules){var o="string"==typeof e?n.modules[e]:e;o&&(o.instance&&Object.keys(o.instance).forEach((function(e){var t=o.instance[e];n[e]="function"==typeof t?t.bind(n):t})),o.on&&n.on&&Object.keys(o.on).forEach((function(e){n.on(e,o.on[e])})),o.vnode&&(n.vnodeHooks||(n.vnodeHooks={}),Object.keys(o.vnode).forEach((function(e){Object.keys(o.vnode[e]).forEach((function(t){var r=o.vnode[e][t];n.vnodeHooks[t]||(n.vnodeHooks[t]={}),n.vnodeHooks[t][e]||(n.vnodeHooks[t][e]=[]),n.vnodeHooks[t][e].push(r.bind(n))}))}))),o.create&&o.create.bind(n)(t))}},r.useModules=function(e){void 0===e&&(e={});var t=this;t.modules&&Object.keys(t.modules).forEach((function(n){var o=e[n]||{};t.useModule(n,o)}))},t.installModule=function(e){var t=this;t.prototype.modules||(t.prototype.modules={});var n=e.name||Object.keys(t.prototype.modules).length+"_"+$.now();if(t.prototype.modules[n]=e,e.proto&&Object.keys(e.proto).forEach((function(n){t.prototype[n]=e.proto[n]})),e.static&&Object.keys(e.static).forEach((function(n){t[n]=e.static[n]})),e.install){for(var o=arguments.length,r=new Array(o>1?o-1:0),i=1;i<o;i++)r[i-1]=arguments[i];e.install.apply(t,r)}return t},t.use=function(e){var t=this;if(Array.isArray(e))return e.forEach((function(e){return t.installModule(e)})),t;for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return t.installModule.apply(t,[e].concat(o))},n(t,null,[{key:"components",set:function(e){this.use&&this.use(e)}}]),t}(l);function f(e){void 0===e&&(e={});var t=e,n=t.defaultSelector,o=t.constructor,r=t.domProp,i=t.app,s=t.addMethods,c={create:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a(o,i?[i].concat(t):t)},get:function(e){if(void 0===e&&(e=n),e instanceof o)return e;var t=$(e);return 0!==t.length?t[0][r]:void 0},destroy:function(e){var t=c.get(e);if(t&&t.destroy)return t.destroy()}};return s&&Array.isArray(s)&&s.forEach((function(e){c[e]=function(t){void 0===t&&(t=n);for(var o=c.get(t),r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];if(o&&o[e])return o[e].apply(o,i)}})),c}function p(e){void 0===e&&(e={});var t=e,n=t.defaultSelector,o=t.constructor,r=t.app;return $.extend(f({defaultSelector:n,constructor:o,app:r,domProp:"f7Modal"}),{open:function(e,t){var n=$(e),i=n[0].f7Modal;return i||(i=new o(r,{el:n})),i.open(t)},close:function(e,t){void 0===e&&(e=n);var i=$(e);if(0!==i.length){var a=i[0].f7Modal;return a||(a=new o(r,{el:i})),a.close(t)}}})}var h=[];function m(e){var t=this;return new Promise((function(n,o){var r,i,a,s=t.instance;if(e){if("string"==typeof e){var c=e.match(/([a-z0-9-]*)/i);if(e.indexOf(".")<0&&c&&c[0].length===e.length){if(!s||s&&!s.params.lazyModulesPath)return void o(new Error('Wia: "lazyModulesPath" app parameter must be specified to fetch module by name'));r=s.params.lazyModulesPath+"/"+e+".js"}else r=e}else"function"==typeof e?a=e:i=e;if(a){var u=a(t,!1);if(!u)return void o(new Error("Wia: Can't find Wia component in specified component function"));if(t.prototype.modules&&t.prototype.modules[u.name])return void n();p(u),n()}if(i){var l=i;if(!l)return void o(new Error("Wia: Can't find Wia component in specified component"));if(t.prototype.modules&&t.prototype.modules[l.name])return void n();p(l),n()}if(r){if(h.indexOf(r)>=0)return void n();h.push(r);var d=new Promise((function(e,n){t.request.get(r,(function(o){var i="wia_component_loader_callback_"+$.id(),a=document.createElement("script");a.innerHTML="window."+i+" = function (Wia, WiaAutoInstallComponent) {return "+o.trim()+"}",$("head").append(a);var s=window[i];delete window[i],$(a).remove();var c=s(t,!1);c?(t.prototype.modules&&t.prototype.modules[c.name]||p(c),e()):n(new Error("Wia: Can't find Wia component in "+r+" file"))}),(function(e,t){n(e,t)}))})),f=new Promise((function(e){t.request.get(r.replace(".js",s.rtl?".rtl.css":".css"),(function(t){var n=document.createElement("style");n.innerHTML=t,$("head").append(n),e()}),(function(){e()}))}));Promise.all([d,f]).then((function(){n()})).catch((function(e){o(e)}))}}else o(new Error("Wia: Lazy module must be specified"));function p(e){t.use(e),s&&(s.useModuleParams(e,s.params),s.useModule(e))}}))}var v={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],n=t[0],o=t[1],r=t[2],i=t[3];return this.width=n,this.height=o,this.left=r,this.top=i,{width:n,height:o,left:r,top:i}}},on:{init:function(){var e=this;e.getSize(),window.addEventListener("resize",(function(){e.emit("resize")}),!1),window.addEventListener("orientationchange",(function(){e.emit("orientationchange")}))},orientationchange:function(){this.device.ipad&&(document.body.scrollLeft=0,setTimeout((function(){document.body.scrollLeft=0}),0))},resize:function(){this.getSize()}}};function y(e){var t,n,o;t=function(t){e.emit({events:"click",data:[t]})},$.support.touch?(document.addEventListener("touchstart",(function(e){n=e.changedTouches[0].clientX,o=e.changedTouches[0].clientY}),!0),document.addEventListener("touchend",(function(e){var r=Math.abs(e.changedTouches[0].clientX-n),i=Math.abs(e.changedTouches[0].clientY-o);r<=5&&i<=5&&t.call(this,e)}),!0)):document.addEventListener("click",t,!0),e.on("click",(function(t){var n=$(t.target),o=n.closest("a");o.length>0&&o.attr("href"),Object.keys(e.modules).forEach((function(o){var r=e.modules[o].clicks;r&&(t.preventF7Router||Object.keys(r).forEach((function(o){var i=n.closest(o).eq(0);i.length>0&&r[o].call(e,i,i.dataset(),t)})))}))}))}var g={name:"clicks",params:{clicks:{externalLinks:".ext"}},on:{init:function(){y(this)}}},w={registrations:[],register:function(e,t){var n=this;return"serviceWorker"in window.navigator&&n.serviceWorker.container?new Promise((function(o,r){n.serviceWorker.container.register(e,t?{scope:t}:{}).then((function(e){w.registrations.push(e),n.emit("serviceWorkerRegisterSuccess",e),o(e)})).catch((function(e){n.emit("serviceWorkerRegisterError",e),r(e)}))})):new Promise((function(e,t){t(new Error("Service worker is not supported"))}))},unregister:function(e){var t,n=this;return"serviceWorker"in window.navigator&&n.serviceWorker.container?(t=e?Array.isArray(e)?e:[e]:w.registrations,Promise.all(t.map((function(e){return new Promise((function(t,o){e.unregister().then((function(){w.registrations.indexOf(e)>=0&&w.registrations.splice(w.registrations.indexOf(e),1),n.emit("serviceWorkerUnregisterSuccess",e),t()})).catch((function(t){n.emit("serviceWorkerUnregisterError",e,t),o(t)}))}))})))):new Promise((function(e,t){t(new Error("Service worker is not supported"))}))}},b={name:"sw",params:{serviceWorker:{path:void 0,scope:void 0}},create:function(){$.extend(this,{serviceWorker:{container:"serviceWorker"in window.navigator?window.navigator.serviceWorker:void 0,registrations:w.registrations,register:w.register.bind(this),unregister:w.unregister.bind(this)}})},on:{init:function(){if("serviceWorker"in window.navigator){var e=this;if(e.serviceWorker.container){var t=e.params.serviceWorker.path,n=e.params.serviceWorker.scope;if(t&&(!Array.isArray(t)||t.length))(Array.isArray(t)?t:[t]).forEach((function(t){e.serviceWorker.register(t,n)}))}}}}},k=$.support,C=$.device,E=function(e){function t(t){var n;n=e.call(this,t)||this;var o=$.extend({},t),r=s(n);r.device=C,r.support=k;var i={version:"0.0.1",root:"body",theme:"auto",language:window.navigator.language,routes:[],lazyModulesPath:null,initOnDeviceReady:!0,autoDarkTheme:!1,iosTranslucentBars:!0,iosTranslucentModals:!0,component:void 0,componentUrl:void 0};r.useModulesParams(i),r.params=$.extend(i,t);var a=$(r.params.root);$.extend(r,{owner:r.params.owner,name:r.params.name,id:r.params.owner+"."+r.params.name,version:r.params.version,routes:r.params.routes,language:r.params.language,root:a,$el:a,cfg:r.params.cfg,api:r.params.api,rtl:"rtl"===a.css("direction"),theme:"auto"===r.params.theme?C.ios?"ios":C.desktop?"aurora":"md":r.params.theme,passedParams:o,online:window.navigator.onLine}),r.root&&r.root[0]&&(r.root[0].wia=r),r.touchEvents={start:k.touch?"touchstart":k.pointerEvents?"pointerdown":"mousedown",move:k.touch?"touchmove":k.pointerEvents?"pointermove":"mousemove",end:k.touch?"touchend":k.pointerEvents?"pointerup":"mouseup"},r.useModules(),r.initData();var c="(prefers-color-scheme: dark)",u="(prefers-color-scheme: light)";return r.mq={},window.matchMedia&&(r.mq.dark=window.matchMedia(c),r.mq.light=window.matchMedia(u)),r.colorSchemeListener=function(e){var t=e.matches,n=e.media;if(t){var o=document.querySelector("html");n===c?o.classList.add("theme-dark"):n===u&&o.classList.remove("theme-dark")}},r.params.init&&(C.cordova&&r.params.initOnDeviceReady?$(document).on("deviceready",(function(){r.init()})):r.init()),r||s(n)}o(t,e);var r=t.prototype;return r.load=function(e){this.emit("local::load appLoad",e)},r.show=function(e,t){this.emit("local::show appShow",e,t)},r.hide=function(){this.emit("local::hide appHide")},r.unload=function(){this.emit("local::unload appUnload")},r.initData=function(){var e=this;e.data={},e.params.data&&"function"==typeof e.params.data?$.extend(e.data,e.params.data.bind(e)()):e.params.data&&$.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]}))},r.enableAutoDarkTheme=function(){if(window.matchMedia){var e=this,t=document.querySelector("html");e.mq.dark&&e.mq.light&&(e.mq.dark.addListener(e.colorSchemeListener),e.mq.light.addListener(e.colorSchemeListener)),e.mq.dark&&e.mq.dark.matches?t.classList.add("theme-dark"):e.mq.light&&e.mq.light.matches&&t.classList.remove("theme-dark")}},r.disableAutoDarkTheme=function(){if(window.matchMedia){this.mq.dark&&this.mq.dark.removeListener(this.colorSchemeListener),this.mq.light&&this.mq.light.removeListener(this.colorSchemeListener)}},r.init=function(){var e=this;return e.initialized||($.App=t,C.ios&&C.webView&&window.addEventListener("touchstart",(function(){})),e.root.addClass("framework7-initializing"),e.rtl&&$("html").attr("dir","rtl"),e.params.autoDarkTheme&&e.enableAutoDarkTheme(),window.addEventListener("offline",(function(){e.online=!1,e.emit("offline"),e.emit("connection",!1)})),window.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&&C.ios&&$("html").addClass("ios-translucent-bars"),e.params.iosTranslucentModals&&"ios"===e.theme&&C.ios&&$("html").addClass("ios-translucent-modals"),$.nextFrame((function(){e.root.removeClass("framework7-initializing")})),function(){var e=[],t=document.querySelector("html"),n=document.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]');if(!t)return;C.standalone&&C.ios&&n&&"black-translucent"===n.content&&e.push("device-full-viewport");e.push("device-pixel-ratio-"+Math.floor(C.pixelRatio)),C.os&&!C.desktop?e.push("device-"+C.os):C.desktop&&(e.push("device-desktop"),C.os&&e.push("device-"+C.os));(C.cordova||C.phonegap)&&e.push("device-cordova");e.forEach((function(e){t.classList.add(e)}))}(),e.initialized=!0,e.emit("init")),e},r.loadModule=function(e){t.loadModule(e),this[e.name].init&&this[e.name].init()},r.loadModules=function(){return t.loadModules.apply(t,arguments)},r.getVnodeHooks=function(e,t){return this.vnodeHooks&&this.vnodeHooks[e]&&this.vnodeHooks[e][t]||[]},n(t,[{key:"$",get:function(){return $}}],[{key:"Dom",get:function(){return $}},{key:"$",get:function(){return $}},{key:"Module",get:function(){return d}},{key:"Event",get:function(){return l}}]),t}(d);E.apps={},E.ModalMethods=p,E.ConstructorMethods=f,E.loadModule=m,E.loadModules=function(e){return Promise.all(e.map((function(e){return E.loadModule(e)})))},E.support=k,E.device=C,E.utils=u,E.use([v,g,b]);var x,L,M,O,A={normal:"nor",retina:"ret",srcset:"set",threshold:0},j=window.innerHeight,T=q(),P=document.body.classList.contains("srcset")||"srcset"in document.createElement("img"),H=window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI,S=function(){function e(e){x=$.assign({},A,e)}var t=e.prototype;return t.start=function(e){return["scroll","resize"].forEach((function(t){return e.addEventListener(t,R)})),O=e,this},t.stop=function(){return["scroll","resize"].forEach((function(e){return O.removeEventListener(e,R)})),this},t.update=function(){setTimeout((function(){D(),z()}),1)},e}();function q(){return window.scrollY||window.pageYOffset}function R(){T=q(),L||(window.requestAnimationFrame((function(){return z()})),L=!0)}function W(e){var t=T,n=t+j,o=function(e){return e.getBoundingClientRect().top+T}(e),r=o+e.offsetHeight,i=x.threshold/100*j;return r>=t-i&&o<=n+i}function z(){if(M)return j=window.innerHeight,M.forEach((function(e){return W(e)&&function(e){if($.emit("lazy:src:before",e),P&&e.hasAttribute(x.srcset))e.setAttribute("srcset",e.getAttribute(x.srcset));else{var t=H>1&&e.getAttribute(x.retina)||e.getAttribute(x.normal);e.setAttribute("src",t),console.log("set src:"+t)}$.emit("lazy:src:after",e),[x.normal,x.retina,x.srcset].forEach((function(t){return e.removeAttribute(t)})),D()}(e)})),L=!1,this}function D(e){return M=e?Array.prototype.slice.call(e.querySelectorAll("["+x.normal+"]")):Array.prototype.slice.call(document.querySelectorAll("["+x.normal+"]")),this}var _=function(e){function t(t,n,o,r){var i;return(i=e.call(this,null,[t])||this).app=t,i.cfg=t.cfg,i.name=n,i.title=o,i.style=r||"./page/"+n+".css",i.path=""+n,i.view=null,i.el=null,i.$el=null,i.html="",i.css="",i.js="",i.data={},i.param={},i}o(t,e);var n=t.prototype;return n.load=function(e){this.emit("local::load pageLoad",e)},n.ready=function(e,t,n){this.emit("local::ready pageReady",e,t,n),e.qus("[name$=-tp]").hide()},n.show=function(e,t){e.qus('a[href=""]').attr("href","javascript:;"),this.reset&&this.reset(),this.emit("local::show pageShow",e,t)},n.back=function(e,t){e.qus('a[href=""]').attr("href","javascript:;"),this.emit("local::back pageBack",e,t)},n.hide=function(e){this.emit("local::hide pageHide",e)},t}(l),F=[],B=[];var U=function(e){function t(t,n){var o,r=s(o=e.call(this,n,[t])||this);return r.params=u.extend({},n),r.opened=!1,s(o)||s(o)}o(t,e);var n=t.prototype;return n.onOpen=function(){this.opened=!0,F.push(this),$("html").addClass("with-modal-"+this.type.toLowerCase()),this.$el.trigger("modal:open "+this.type.toLowerCase()+":open"),this.emit("local::open modalOpen "+this.type+"Open",this)},n.onOpened=function(){this.$el.trigger("modal:opened "+this.type.toLowerCase()+":opened"),this.emit("local::opened modalOpened "+this.type+"Opened",this)},n.onClose=function(){this.opened=!1,this.type&&this.$el&&(F.splice(F.indexOf(this),1),$("html").removeClass("with-modal-"+this.type.toLowerCase()),this.$el.trigger("modal:close "+this.type.toLowerCase()+":close"),this.emit("local::close modalClose "+this.type+"Close",this))},n.onClosed=function(){this.type&&this.$el&&(this.$el.removeClass("modal-out"),this.$el.hide(),this.$el.trigger("modal:closed "+this.type.toLowerCase()+":closed"),this.emit("local::closed modalClosed "+this.type+"Closed",this))},n.open=function(e){var t,n=this,o=n.app,r=n.$el,i=n.type,a=n.$backdropEl,s=n.params.moveToRoot,c=!0;if(void 0!==e?c=e:void 0!==n.params.animate&&(c=n.params.animate),!r||r.hasClass("modal-in"))return n;if("dialog"===i&&o.params.modal.queueDialogs&&($(".dialog.modal-in").length>0?t=!0:F.length>0&&F.forEach((function(e){"dialog"===e.type&&(t=!0)})),t))return B.push(n),n;var u=r.parent(),l=r.parents(document).length>0;function d(){r.hasClass("modal-out")?n.onClosed():r.hasClass("modal-in")&&n.onOpened()}return s&&o.params.modal.moveToRoot&&!u.is(o.root)&&(o.root.append(r),n.once(i+"Closed",(function(){l?u.append(r):r.remove()}))),r.show(),n._clientLeft=r[0].clientLeft,c?(a&&(a.removeClass("not-animated"),a.addClass("backdrop-in")),r.animationEnd((function(){d()})),r.transitionEnd((function(){d()})),r.removeClass("modal-out not-animated").addClass("modal-in"),n.onOpen()):(a&&a.addClass("backdrop-in not-animated"),r.removeClass("modal-out").addClass("modal-in not-animated"),n.onOpen(),n.onOpened()),n},n.close=function(e){var t=this,n=t.$el,o=t.$backdropEl,r=!0;if(void 0!==e?r=e:void 0!==t.params.animate&&(r=t.params.animate),!n||!n.hasClass("modal-in"))return B.indexOf(t)>=0&&B.splice(B.indexOf(t),1),t;if(o){var i=!0;"popup"===t.type&&t.$el.prevAll(".popup.modal-in").each((function(e,n){var o=n.f7Modal;o&&o.params.closeByBackdropClick&&o.params.backdrop&&o.backdropEl===t.backdropEl&&(i=!1)})),i&&(o[r?"removeClass":"addClass"]("not-animated"),o.removeClass("backdrop-in"))}function a(){n.hasClass("modal-out")?t.onClosed():n.hasClass("modal-in")&&t.onOpened()}return n[r?"removeClass":"addClass"]("not-animated"),r?(n.animationEnd((function(){a()})),n.transitionEnd((function(){a()})),n.removeClass("modal-in").addClass("modal-out"),t.onClose()):(n.addClass("not-animated").removeClass("modal-in").addClass("modal-out"),t.onClose(),t.onClosed()),"dialog"===t.type&&0!==B.length&&B.shift().open(),t},n.destroy=function(){this.destroyed||(this.emit("local::beforeDestroy modalBeforeDestroy "+this.type+"BeforeDestroy",this),this.$el&&(this.$el.trigger("modal:beforedestroy "+this.type.toLowerCase()+":beforedestroy"),this.$el.length&&this.$el[0].f7Modal&&delete this.$el[0].f7Modal),u.deleteProps(this),this.destroyed=!0)},t}(l);function I(e,t){for(var n=t||{},o=arguments.length,r=new Array(o>2?o-2:0),i=2;i<o;i++)r[i-2]=arguments[i];var a=r||[],s=Object.keys(n).map((function(e){return"_"===e[0]?n[e]?e.replace("_",""):"":e+'="'+n[e]+'"'})).filter((function(e){return!!e})).join(" ");if(["path","img","circle","polygon","line","input"].indexOf(e)>=0)return("<"+e+" "+s+" />").trim();var c=a.filter((function(e){return!!e})).map((function(e){return Array.isArray(e)?e.join(""):e})).join("");return("<"+e+" "+s+">"+c+"</"+e+">").trim()}var X=$.support,N=$.device;export{e as Ajax,E as App,f as Constructors,N as Device,l as Event,S as Lazy,U as Modal,p as Modals,d as Module,_ as Page,v as Resize,b as SW,X as Support,u as Utils,I as jsx,m as loadModule};
6
+ var e=function(){function e(){}var t=e.prototype;return t.post=function(e,t){return new Promise((function(n,o){var r=$.getXhr();r.onreadystatechange=function(){4===r.readyState&&(200===r.status?n(r.responseText):o(new Error(r.statusText),r.responseText))},r.open("POST",e,!0);var a=t;"object"==typeof t&&(a=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n+"="+e[n]);return t.sort().join("&")}(t)),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.send(a)}))},t.postForm=function(e,t){return new Promise((function(n,o){var r=$.getXhr();r.onreadystatechange=function(){4===r.readyState&&(200===r.status?n(null,r.responseText):o(new Error(r.status),r.responseText))},r.open("POST",e,!0),r.send(t)}))},t.get=function(e,t){return $.get(e,t)},e}();function t(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function n(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function i(e,t,n){return i=a()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var a=new(Function.bind.apply(e,o));return n&&r(a,n.prototype),a},i.apply(null,arguments)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var c=1,u={uniqueNumber:function(){return c+=1},id:function(e,t){return void 0===e&&(e="xxxxxxxxxx"),void 0===t&&(t="0123456789abcdef"),$.uid(e,t)},mdPreloaderContent:'\n <span class="preloader-inner">\n\t\t\t<svg viewBox="0 0 36 36">\n\t\t\t\t<circle cx="18" cy="18" r="16"></circle>\n\t\t\t</svg>\n </span>\n '.trim(),iosPreloaderContent:('\n <span class="preloader-inner">\n\t\t\t'+[0,1,2,3,4,5,6,7].map((function(){return'<span class="preloader-inner-line"></span>'})).join("")+"\n </span>\n ").trim(),auroraPreloaderContent:'\n <span class="preloader-inner">\n <span class="preloader-inner-circle"></span>\n </span>\n ',eventNameToColonCase:function(e){var t;return e.split("").map((function(e,n){return e.match(/[A-Z]/)&&0!==n&&!t?(t=!0,":"+e.toLowerCase()):e.toLowerCase()})).join("")},deleteProps:function(e){$.deleteProps(e)},nextTick:function(e,t){return void 0===t&&(t=0),setTimeout(e,t)},nextFrame:function(e){return $.nextFrame(e)},now:function(){return Date.now()},requestAnimationFrame:function(e){return $.requestAnimationFrame(e)},cancelAnimationFrame:function(e){return $.cancelAnimationFrame(e)},parseUrlQuery:function(e){return $.urlParam(e)},getTranslate:function(e,t){return void 0===t&&(t="x"),$.getTranslate(e,t)},serializeObject:function(e,t){if(void 0===t&&(t=[]),"string"==typeof e)return e;var n,o=[];function r(e){if(t.length>0){for(var n="",o=0;o<t.length;o+=1)n+=0===o?t[o]:"["+encodeURIComponent(t[o])+"]";return n+"["+encodeURIComponent(e)+"]"}return encodeURIComponent(e)}function a(e){return encodeURIComponent(e)}return Object.keys(e).forEach((function(i){var s;if(Array.isArray(e[i])){s=[];for(var c=0;c<e[i].length;c+=1)Array.isArray(e[i][c])||"object"!=typeof e[i][c]?s.push(r(i)+"[]="+a(e[i][c])):((n=t.slice()).push(i),n.push(String(c)),s.push(u.serializeObject(e[i][c],n)));s.length>0&&o.push(s.join("&"))}else null===e[i]||""===e[i]?o.push(r(i)+"="):"object"==typeof e[i]?((n=t.slice()).push(i),""!==(s=u.serializeObject(e[i],n))&&o.push(s)):void 0!==e[i]&&""!==e[i]?o.push(r(i)+"="+a(e[i])):""===e[i]&&o.push(r(i))})),o.join("&")},isObject:function(e){return"object"==typeof e&&null!==e&&e.constructor&&e.constructor===Object},merge:function(){var e;return(e=$).merge.apply(e,arguments)},extend:function(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];var r=n[0];return n.splice(0,1),(e=$).assign.apply(e,[r].concat(n))},bindMethods:function(e,t){var n=this;Object.keys(t).forEach((function(o){n.isObject(t[o])&&Object.keys(t[o]).forEach((function(n){"function"==typeof t[o][n]&&(t[o][n]=t[o][n].bind(e))})),e[o]=t[o]}))},colorHexToRgb:function(e){var t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,o){return t+t+n+n+o+o})),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return n?n.slice(1).map((function(e){return parseInt(e,16)})):null},colorRgbToHex:function(e,t,n){return"#"+[e,t,n].map((function(e){var t=e.toString(16);return 1===t.length?"0"+t:t})).join("")},colorRgbToHsl:function(e,t,n){e/=255,t/=255,n/=255;var o,r=Math.max(e,t,n),a=Math.min(e,t,n),i=r-a;0===i?o=0:r===e?o=(t-n)/i%6:r===t?o=(n-e)/i+2:r===n&&(o=(e-t)/i+4);var s=(a+r)/2;return o<0&&(o=6+o),[60*o,0===i?0:i/(1-Math.abs(2*s-1)),s]},colorHslToRgb:function(e,t,n){var o,r=(1-Math.abs(2*n-1))*t,a=e/60,i=r*(1-Math.abs(a%2-1));Number.isNaN(e)||void 0===e?o=[0,0,0]:a<=1?o=[r,i,0]:a<=2?o=[i,r,0]:a<=3?o=[0,r,i]:a<=4?o=[0,i,r]:a<=5?o=[i,0,r]:a<=6&&(o=[r,0,i]);var s=n-r/2;return o.map((function(e){return Math.max(0,Math.min(255,Math.round(255*(e+s))))}))},colorHsbToHsl:function(e,t,n){var o={h:e,s:0,l:0},r=t,a=n;return o.l=(2-r)*a/2,o.s=o.l&&o.l<1?r*a/(o.l<.5?2*o.l:2-2*o.l):o.s,[o.h,o.s,o.l]},colorHslToHsb:function(e,t,n){var o={h:e,s:0,b:0},r=n,a=t*(r<.5?r:1-r);return o.b=r+a,o.s=r>0?2*a/o.b:o.s,[o.h,o.s,o.b]},colorThemeCSSProperties:function(){for(var e,t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];if(1===o.length?(e=o[0],t=u.colorHexToRgb(e)):3===o.length&&(t=o,e=u.colorRgbToHex.apply(u,t)),!t)return{};var a=u.colorRgbToHsl.apply(u,t),i=[a[0],a[1],Math.max(0,a[2]-.08)],s=[a[0],a[1],Math.max(0,a[2]+.08)],c=u.colorRgbToHex.apply(u,u.colorHslToRgb.apply(u,i)),l=u.colorRgbToHex.apply(u,u.colorHslToRgb.apply(u,s));return{"--f7-theme-color":e,"--f7-theme-color-rgb":t.join(", "),"--f7-theme-color-shade":c,"--f7-theme-color-tint":l}}},l=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);var n=this;n.params=e,n.eventsParents=t,n.eventsListeners={},n.params&&n.params.on&&Object.keys(n.params.on).forEach((function(e){n.on(e,n.params.on[e])}))}var t=e.prototype;return t.on=function(e,t,n){var o=this;if("function"!=typeof t)return o;var r=n?"unshift":"push";return e.split(" ").forEach((function(e){o.eventsListeners[e]||(o.eventsListeners[e]=[]),o.eventsListeners[e][r](t)})),o},t.once=function(e,t,n){var o=this;if("function"!=typeof t)return o;function r(){o.off(e,r),r.proxy&&delete r.proxy;for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];t.apply(o,a)}return r.proxy=t,o.on(e,r,n)},t.off=function(e,t){var n=this;return n.eventsListeners?(e.split(" ").forEach((function(e){void 0===t?n.eventsListeners[e]=[]:n.eventsListeners[e]&&n.eventsListeners[e].forEach((function(o,r){(o===t||o.proxy&&o.proxy===t)&&n.eventsListeners[e].splice(r,1)}))})),n):n},t.emit=function(){var e,t,n,o,r=this;if(!r.eventsListeners)return r;for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];"string"==typeof i[0]||Array.isArray(i[0])?(e=i[0],t=i.slice(1,i.length),n=r,o=r.eventsParents):(e=i[0].events,t=i[0].data,n=i[0].context||r,o=i[0].local?[]:i[0].parents||r.eventsParents);var c=Array.isArray(e)?e:e.split(" "),u=c.map((function(e){return e.replace("local::","")})),l=c.filter((function(e){return e.indexOf("local::")<0}));return u.forEach((function(e){if(r.eventsListeners&&r.eventsListeners[e]){var o=[];r.eventsListeners[e].forEach((function(e){o.push(e)})),o.forEach((function(e){e.apply(n,t)}))}})),o&&o.length>0&&o.forEach((function(e){e.emit.apply(e,[l].concat(t))})),r},e}(),d=function(e){function t(t,n){return void 0===t&&(t={}),void 0===n&&(n=[]),e.call(this,t,n)||this}o(t,e);var r=t.prototype;return r.useModuleParams=function(e,t){if(e.params){var n={};Object.keys(e.params).forEach((function(e){void 0!==t[e]&&(n[e]=$.extend({},t[e]))})),$.extend(t,e.params),Object.keys(n).forEach((function(e){$.extend(t[e],n[e])}))}},r.useModulesParams=function(e){var t=this;t.modules&&Object.keys(t.modules).forEach((function(n){var o=t.modules[n];o.params&&$.extend(e,o.params)}))},r.useModule=function(e,t){void 0===e&&(e=""),void 0===t&&(t={});var n=this;if(n.modules){var o="string"==typeof e?n.modules[e]:e;o&&(o.instance&&Object.keys(o.instance).forEach((function(e){var t=o.instance[e];n[e]="function"==typeof t?t.bind(n):t})),o.on&&n.on&&Object.keys(o.on).forEach((function(e){n.on(e,o.on[e])})),o.vnode&&(n.vnodeHooks||(n.vnodeHooks={}),Object.keys(o.vnode).forEach((function(e){Object.keys(o.vnode[e]).forEach((function(t){var r=o.vnode[e][t];n.vnodeHooks[t]||(n.vnodeHooks[t]={}),n.vnodeHooks[t][e]||(n.vnodeHooks[t][e]=[]),n.vnodeHooks[t][e].push(r.bind(n))}))}))),o.create&&o.create.bind(n)(t))}},r.useModules=function(e){void 0===e&&(e={});var t=this;t.modules&&Object.keys(t.modules).forEach((function(n){var o=e[n]||{};t.useModule(n,o)}))},t.installModule=function(e){var t=this;t.prototype.modules||(t.prototype.modules={});var n=e.name||Object.keys(t.prototype.modules).length+"_"+$.now();if(t.prototype.modules[n]=e,e.proto&&Object.keys(e.proto).forEach((function(n){t.prototype[n]=e.proto[n]})),e.static&&Object.keys(e.static).forEach((function(n){t[n]=e.static[n]})),e.install){for(var o=arguments.length,r=new Array(o>1?o-1:0),a=1;a<o;a++)r[a-1]=arguments[a];e.install.apply(t,r)}return t},t.use=function(e){var t=this;if(Array.isArray(e))return e.forEach((function(e){return t.installModule(e)})),t;for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return t.installModule.apply(t,[e].concat(o))},n(t,null,[{key:"components",set:function(e){this.use&&this.use(e)}}]),t}(l);function f(e){void 0===e&&(e={});var t=e,n=t.defaultSelector,o=t.constructor,r=t.domProp,a=t.app,s=t.addMethods,c={create:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(o,a?[a].concat(t):t)},get:function(e){if(void 0===e&&(e=n),e instanceof o)return e;var t=$(e);return 0!==t.length?t[0][r]:void 0},destroy:function(e){var t=c.get(e);if(t&&t.destroy)return t.destroy()}};return s&&Array.isArray(s)&&s.forEach((function(e){c[e]=function(t){void 0===t&&(t=n);for(var o=c.get(t),r=arguments.length,a=new Array(r>1?r-1:0),i=1;i<r;i++)a[i-1]=arguments[i];if(o&&o[e])return o[e].apply(o,a)}})),c}function p(e){void 0===e&&(e={});var t=e,n=t.defaultSelector,o=t.constructor,r=t.app;return $.extend(f({defaultSelector:n,constructor:o,app:r,domProp:"f7Modal"}),{open:function(e,t){var n=$(e),a=n[0].f7Modal;return a||(a=new o(r,{el:n})),a.open(t)},close:function(e,t){void 0===e&&(e=n);var a=$(e);if(0!==a.length){var i=a[0].f7Modal;return i||(i=new o(r,{el:a})),i.close(t)}}})}var m=[];function h(e){var t=this;return new Promise((function(n,o){var r,a,i,s=t.instance;if(e){if("string"==typeof e){var c=e.match(/([a-z0-9-]*)/i);if(e.indexOf(".")<0&&c&&c[0].length===e.length){if(!s||s&&!s.params.lazyModulesPath)return void o(new Error('Wia: "lazyModulesPath" app parameter must be specified to fetch module by name'));r=s.params.lazyModulesPath+"/"+e+".js"}else r=e}else"function"==typeof e?i=e:a=e;if(i){var u=i(t,!1);if(!u)return void o(new Error("Wia: Can't find Wia component in specified component function"));if(t.prototype.modules&&t.prototype.modules[u.name])return void n();p(u),n()}if(a){var l=a;if(!l)return void o(new Error("Wia: Can't find Wia component in specified component"));if(t.prototype.modules&&t.prototype.modules[l.name])return void n();p(l),n()}if(r){if(m.indexOf(r)>=0)return void n();m.push(r);var d=new Promise((function(e,n){t.request.get(r,(function(o){var a="wia_component_loader_callback_"+$.id(),i=document.createElement("script");i.innerHTML="window."+a+" = function (Wia, WiaAutoInstallComponent) {return "+o.trim()+"}",$("head").append(i);var s=window[a];delete window[a],$(i).remove();var c=s(t,!1);c?(t.prototype.modules&&t.prototype.modules[c.name]||p(c),e()):n(new Error("Wia: Can't find Wia component in "+r+" file"))}),(function(e,t){n(e,t)}))})),f=new Promise((function(e){t.request.get(r.replace(".js",s.rtl?".rtl.css":".css"),(function(t){var n=document.createElement("style");n.innerHTML=t,$("head").append(n),e()}),(function(){e()}))}));Promise.all([d,f]).then((function(){n()})).catch((function(e){o(e)}))}}else o(new Error("Wia: Lazy module must be specified"));function p(e){t.use(e),s&&(s.useModuleParams(e,s.params),s.useModule(e))}}))}var v={name:"resize",instance:{getSize:function(){var e=this;if(!e.root[0])return{width:0,height:0,left:0,top:0};var t=e.root.offset(),n=[e.root[0].offsetWidth,e.root[0].offsetHeight,t.left,t.top],o=n[0],r=n[1],a=n[2],i=n[3];return e.width=o,e.height=r,e.left=a,e.top=i,{width:o,height:r,left:a,top:i}}},on:{init:function(){var e=this;e.getSize(),window.addEventListener("resize",(function(){e.emit("resize")}),!1),window.addEventListener("orientationchange",(function(){e.emit("orientationchange")}))},orientationchange:function(){this.device.ipad&&(document.body.scrollLeft=0,setTimeout((function(){document.body.scrollLeft=0}),0))},resize:function(){this.getSize()}}};function y(e){var t,n,o;t=function(t){e.emit({events:"click",data:[t]})},$.support.touch?(document.addEventListener("touchstart",(function(e){n=e.changedTouches[0].clientX,o=e.changedTouches[0].clientY}),!0),document.addEventListener("touchend",(function(e){var r=Math.abs(e.changedTouches[0].clientX-n),a=Math.abs(e.changedTouches[0].clientY-o);r<=5&&a<=5&&t.call(this,e)}),!0)):document.addEventListener("click",t,!0),e.on("click",(function(t){var n=$(t.target),o=n.closest("a");o.length>0&&o.attr("href"),Object.keys(e.modules).forEach((function(o){var r=e.modules[o].clicks;r&&(t.preventF7Router||Object.keys(r).forEach((function(o){var a=n.closest(o).eq(0);a.length>0&&r[o].call(e,a,a.dataset(),t)})))}))}))}var g={name:"clicks",params:{clicks:{externalLinks:".ext"}},on:{init:function(){y(this)}}},w={registrations:[],register:function(e,t){var n=this;return"serviceWorker"in window.navigator&&n.serviceWorker.container?new Promise((function(o,r){n.serviceWorker.container.register(e,t?{scope:t}:{}).then((function(e){w.registrations.push(e),n.emit("serviceWorkerRegisterSuccess",e),o(e)})).catch((function(e){n.emit("serviceWorkerRegisterError",e),r(e)}))})):new Promise((function(e,t){t(new Error("Service worker is not supported"))}))},unregister:function(e){var t,n=this;return"serviceWorker"in window.navigator&&n.serviceWorker.container?(t=e?Array.isArray(e)?e:[e]:w.registrations,Promise.all(t.map((function(e){return new Promise((function(t,o){e.unregister().then((function(){w.registrations.indexOf(e)>=0&&w.registrations.splice(w.registrations.indexOf(e),1),n.emit("serviceWorkerUnregisterSuccess",e),t()})).catch((function(t){n.emit("serviceWorkerUnregisterError",e,t),o(t)}))}))})))):new Promise((function(e,t){t(new Error("Service worker is not supported"))}))}},b={name:"sw",params:{serviceWorker:{path:void 0,scope:void 0}},create:function(){var e=this;$.extend(e,{serviceWorker:{container:"serviceWorker"in window.navigator?window.navigator.serviceWorker:void 0,registrations:w.registrations,register:w.register.bind(e),unregister:w.unregister.bind(e)}})},on:{init:function(){if("serviceWorker"in window.navigator){var e=this;if(e.serviceWorker.container){var t=e.params.serviceWorker.path,n=e.params.serviceWorker.scope;if(t&&(!Array.isArray(t)||t.length))(Array.isArray(t)?t:[t]).forEach((function(t){e.serviceWorker.register(t,n)}))}}}}},k=$.support,C=$.device,E=function(e){function t(t){var n;n=e.call(this,t)||this;var o=$.extend({},t),r=s(n);r.device=C,r.support=k;var a={version:"0.0.1",root:"body",theme:"auto",language:window.navigator.language,routes:[],lazyModulesPath:null,initOnDeviceReady:!0,autoDarkTheme:!1,iosTranslucentBars:!0,iosTranslucentModals:!0,component:void 0,componentUrl:void 0};r.useModulesParams(a),r.params=$.extend(a,t);var i=$(r.params.root);$.extend(r,{owner:r.params.owner,name:r.params.name,id:r.params.owner+"."+r.params.name,version:r.params.version,routes:r.params.routes,language:r.params.language,root:i,$el:i,cfg:r.params.cfg,api:r.params.api,rtl:"rtl"===i.css("direction"),theme:"auto"===r.params.theme?C.ios?"ios":C.desktop?"aurora":"md":r.params.theme,passedParams:o,online:window.navigator.onLine}),r.root&&r.root[0]&&(r.root[0].wia=r),r.touchEvents={start:k.touch?"touchstart":k.pointerEvents?"pointerdown":"mousedown",move:k.touch?"touchmove":k.pointerEvents?"pointermove":"mousemove",end:k.touch?"touchend":k.pointerEvents?"pointerup":"mouseup"},r.useModules(),r.initData();var c="(prefers-color-scheme: dark)",u="(prefers-color-scheme: light)";return r.mq={},window.matchMedia&&(r.mq.dark=window.matchMedia(c),r.mq.light=window.matchMedia(u)),r.colorSchemeListener=function(e){var t=e.matches,n=e.media;if(t){var o=document.querySelector("html");n===c?o.classList.add("theme-dark"):n===u&&o.classList.remove("theme-dark")}},r.params.init&&(C.cordova&&r.params.initOnDeviceReady?$(document).on("deviceready",(function(){r.init()})):r.init()),r||s(n)}o(t,e);var r=t.prototype;return r.load=function(e){this.emit("local::load appLoad",e)},r.show=function(e,t){this.emit("local::show appShow",e,t)},r.hide=function(){this.emit("local::hide appHide")},r.unload=function(){this.emit("local::unload appUnload")},r.initData=function(){var e=this;e.data={},e.params.data&&"function"==typeof e.params.data?$.extend(e.data,e.params.data.bind(e)()):e.params.data&&$.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]}))},r.enableAutoDarkTheme=function(){if(window.matchMedia){var e=this,t=document.querySelector("html");e.mq.dark&&e.mq.light&&(e.mq.dark.addListener(e.colorSchemeListener),e.mq.light.addListener(e.colorSchemeListener)),e.mq.dark&&e.mq.dark.matches?t.classList.add("theme-dark"):e.mq.light&&e.mq.light.matches&&t.classList.remove("theme-dark")}},r.disableAutoDarkTheme=function(){if(window.matchMedia){var e=this;e.mq.dark&&e.mq.dark.removeListener(e.colorSchemeListener),e.mq.light&&e.mq.light.removeListener(e.colorSchemeListener)}},r.init=function(){var e=this;return e.initialized||($.App=t,C.ios&&C.webView&&window.addEventListener("touchstart",(function(){})),e.root.addClass("framework7-initializing"),e.rtl&&$("html").attr("dir","rtl"),e.params.autoDarkTheme&&e.enableAutoDarkTheme(),window.addEventListener("offline",(function(){e.online=!1,e.emit("offline"),e.emit("connection",!1)})),window.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&&C.ios&&$("html").addClass("ios-translucent-bars"),e.params.iosTranslucentModals&&"ios"===e.theme&&C.ios&&$("html").addClass("ios-translucent-modals"),$.nextFrame((function(){e.root.removeClass("framework7-initializing")})),function(){var e=[],t=document.querySelector("html"),n=document.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]');if(!t)return;C.standalone&&C.ios&&n&&"black-translucent"===n.content&&e.push("device-full-viewport");e.push("device-pixel-ratio-"+Math.floor(C.pixelRatio)),C.os&&!C.desktop?e.push("device-"+C.os):C.desktop&&(e.push("device-desktop"),C.os&&e.push("device-"+C.os));(C.cordova||C.phonegap)&&e.push("device-cordova");e.forEach((function(e){t.classList.add(e)}))}(),e.initialized=!0,e.emit("init")),e},r.loadModule=function(e){t.loadModule(e),this[e.name].init&&this[e.name].init()},r.loadModules=function(){return t.loadModules.apply(t,arguments)},r.getVnodeHooks=function(e,t){var n=this;return n.vnodeHooks&&n.vnodeHooks[e]&&n.vnodeHooks[e][t]||[]},n(t,[{key:"$",get:function(){return $}}],[{key:"Dom",get:function(){return $}},{key:"$",get:function(){return $}},{key:"Module",get:function(){return d}},{key:"Event",get:function(){return l}}]),t}(d);E.apps={},E.ModalMethods=p,E.ConstructorMethods=f,E.loadModule=h,E.loadModules=function(e){return Promise.all(e.map((function(e){return E.loadModule(e)})))},E.support=k,E.device=C,E.utils=u,E.use([v,g,b]);var x,L,M,O,A={normal:"nor",retina:"ret",srcset:"set",threshold:0},j=window.innerHeight,T=R(),P=document.body.classList.contains("srcset")||"srcset"in document.createElement("img"),q=window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI,H=function(){function e(e){x=$.assign({},A,e)}var t=e.prototype;return t.start=function(e){return["scroll","resize"].forEach((function(t){return e.addEventListener(t,S)})),O=e,this},t.stop=function(){return["scroll","resize"].forEach((function(e){return O.removeEventListener(e,S)})),this},t.update=function(){setTimeout((function(){D(),z()}),1)},e}();function R(){return window.scrollY||window.pageYOffset}function S(){T=R(),L||(window.requestAnimationFrame((function(){return z()})),L=!0)}function W(e){var t=T,n=t+j,o=function(e){return e.getBoundingClientRect().top+T}(e),r=o+e.offsetHeight,a=x.threshold/100*j;return r>=t-a&&o<=n+a}function z(){if(M)return j=window.innerHeight,M.forEach((function(e){return W(e)&&function(e){if($.emit("lazy:src:before",e),P&&e.hasAttribute(x.srcset))e.setAttribute("srcset",e.getAttribute(x.srcset));else{var t=q>1&&e.getAttribute(x.retina)||e.getAttribute(x.normal);e.setAttribute("src",t),console.log("set src:"+t)}$.emit("lazy:src:after",e),[x.normal,x.retina,x.srcset].forEach((function(t){return e.removeAttribute(t)})),D()}(e)})),L=!1,this}function D(e){return M=e?Array.prototype.slice.call(e.querySelectorAll("["+x.normal+"]")):Array.prototype.slice.call(document.querySelectorAll("["+x.normal+"]")),this}var _=function(e){function t(t,n,o,r){var a;return(a=e.call(this,null,[t])||this).app=t,a.cfg=t.cfg,a.name=n,a.title=o,a.style=r||"./page/"+n+".css",a.path=""+n,a.view=null,a.el=null,a.$el=null,a.html="",a.css="",a.js="",a.data={},a.param={},a}o(t,e);var n=t.prototype;return n.load=function(e){this.emit("local::load pageLoad",e)},n.ready=function(e,t,n){this.init(),this.emit("local::ready pageReady",e,t,n)},n.init=function(e){var t=this.view,n=(e=e?$(e):t).qus("[name]");null==n||n.forEach((function(e){var n=$(e),o=n.attr("name");t[o]&&t[o].dom===e||(t[o]=n)})),e.qus("[name$=-tp]").hide(),e.qus('a[href=""]').attr("href","javascript:;")},n.show=function(e,t){e.qus("[name$=-tp]").hide(),e.qus('a[href=""]').attr("href","javascript:;"),this.reset&&this.reset(),this.emit("local::show pageShow",e,t)},n.back=function(e,t){e.qus("[name$=-tp]").hide(),e.qus('a[href=""]').attr("href","javascript:;"),this.emit("local::back pageBack",e,t)},n.hide=function(e){this.emit("local::hide pageHide",e)},t}(l),B=[],F=[];var U=function(e){function t(t,n){var o,r=s(o=e.call(this,n,[t])||this);return r.params=u.extend({},n),r.opened=!1,s(o)||s(o)}o(t,e);var n=t.prototype;return n.onOpen=function(){var e=this;e.opened=!0,B.push(e),$("html").addClass("with-modal-"+e.type.toLowerCase()),e.$el.trigger("modal:open "+e.type.toLowerCase()+":open"),e.emit("local::open modalOpen "+e.type+"Open",e)},n.onOpened=function(){var e=this;e.$el.trigger("modal:opened "+e.type.toLowerCase()+":opened"),e.emit("local::opened modalOpened "+e.type+"Opened",e)},n.onClose=function(){var e=this;e.opened=!1,e.type&&e.$el&&(B.splice(B.indexOf(e),1),$("html").removeClass("with-modal-"+e.type.toLowerCase()),e.$el.trigger("modal:close "+e.type.toLowerCase()+":close"),e.emit("local::close modalClose "+e.type+"Close",e))},n.onClosed=function(){var e=this;e.type&&e.$el&&(e.$el.removeClass("modal-out"),e.$el.hide(),e.$el.trigger("modal:closed "+e.type.toLowerCase()+":closed"),e.emit("local::closed modalClosed "+e.type+"Closed",e))},n.open=function(e){var t,n=this,o=n.app,r=n.$el,a=n.type,i=n.$backdropEl,s=n.params.moveToRoot,c=!0;if(void 0!==e?c=e:void 0!==n.params.animate&&(c=n.params.animate),!r||r.hasClass("modal-in"))return n;if("dialog"===a&&o.params.modal.queueDialogs&&($(".dialog.modal-in").length>0?t=!0:B.length>0&&B.forEach((function(e){"dialog"===e.type&&(t=!0)})),t))return F.push(n),n;var u=r.parent(),l=r.parents(document).length>0;function d(){r.hasClass("modal-out")?n.onClosed():r.hasClass("modal-in")&&n.onOpened()}return s&&o.params.modal.moveToRoot&&!u.is(o.root)&&(o.root.append(r),n.once(a+"Closed",(function(){l?u.append(r):r.remove()}))),r.show(),n._clientLeft=r[0].clientLeft,c?(i&&(i.removeClass("not-animated"),i.addClass("backdrop-in")),r.animationEnd((function(){d()})),r.transitionEnd((function(){d()})),r.removeClass("modal-out not-animated").addClass("modal-in"),n.onOpen()):(i&&i.addClass("backdrop-in not-animated"),r.removeClass("modal-out").addClass("modal-in not-animated"),n.onOpen(),n.onOpened()),n},n.close=function(e){var t=this,n=t.$el,o=t.$backdropEl,r=!0;if(void 0!==e?r=e:void 0!==t.params.animate&&(r=t.params.animate),!n||!n.hasClass("modal-in"))return F.indexOf(t)>=0&&F.splice(F.indexOf(t),1),t;if(o){var a=!0;"popup"===t.type&&t.$el.prevAll(".popup.modal-in").each((function(e,n){var o=n.f7Modal;o&&o.params.closeByBackdropClick&&o.params.backdrop&&o.backdropEl===t.backdropEl&&(a=!1)})),a&&(o[r?"removeClass":"addClass"]("not-animated"),o.removeClass("backdrop-in"))}function i(){n.hasClass("modal-out")?t.onClosed():n.hasClass("modal-in")&&t.onOpened()}return n[r?"removeClass":"addClass"]("not-animated"),r?(n.animationEnd((function(){i()})),n.transitionEnd((function(){i()})),n.removeClass("modal-in").addClass("modal-out"),t.onClose()):(n.addClass("not-animated").removeClass("modal-in").addClass("modal-out"),t.onClose(),t.onClosed()),"dialog"===t.type&&0!==F.length&&F.shift().open(),t},n.destroy=function(){var e=this;e.destroyed||(e.emit("local::beforeDestroy modalBeforeDestroy "+e.type+"BeforeDestroy",e),e.$el&&(e.$el.trigger("modal:beforedestroy "+e.type.toLowerCase()+":beforedestroy"),e.$el.length&&e.$el[0].f7Modal&&delete e.$el[0].f7Modal),u.deleteProps(e),e.destroyed=!0)},t}(l);function I(e,t){for(var n=t||{},o=arguments.length,r=new Array(o>2?o-2:0),a=2;a<o;a++)r[a-2]=arguments[a];var i=r||[],s=Object.keys(n).map((function(e){return"_"===e[0]?n[e]?e.replace("_",""):"":e+'="'+n[e]+'"'})).filter((function(e){return!!e})).join(" ");if(["path","img","circle","polygon","line","input"].indexOf(e)>=0)return("<"+e+" "+s+" />").trim();var c=i.filter((function(e){return!!e})).map((function(e){return Array.isArray(e)?e.join(""):e})).join("");return("<"+e+" "+s+">"+c+"</"+e+">").trim()}var X=$.support,N=$.device;export{e as Ajax,E as App,f as Constructors,N as Device,l as Event,H as Lazy,U as Modal,p as Modals,d as Module,_ as Page,v as Resize,b as SW,X as Support,u as Utils,I as jsx,h as loadModule};
package/dist/core.js CHANGED
@@ -1,13 +1,13 @@
1
1
  /*!
2
- * wia core v0.1.15
2
+ * wia core v0.1.16
3
3
  * (c) 2021 Sibyl Yu
4
4
  * @license MIT
5
5
  */
6
6
  (function (global, factory) {
7
7
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
8
8
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
9
- (global = global || self, factory(global['@wiajs/Core'] = {}));
10
- }(this, function (exports) { 'use strict';
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@wiajs/Core"] = {}));
10
+ })(this, (function (exports) { 'use strict';
11
11
 
12
12
  /**
13
13
  * promise version ajax get、post
@@ -120,7 +120,8 @@
120
120
  function _inheritsLoose(subClass, superClass) {
121
121
  subClass.prototype = Object.create(superClass.prototype);
122
122
  subClass.prototype.constructor = subClass;
123
- subClass.__proto__ = superClass;
123
+
124
+ _setPrototypeOf(subClass, superClass);
124
125
  }
125
126
 
126
127
  function _setPrototypeOf(o, p) {
@@ -138,7 +139,7 @@
138
139
  if (typeof Proxy === "function") return true;
139
140
 
140
141
  try {
141
- Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
142
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
142
143
  return true;
143
144
  } catch (e) {
144
145
  return false;
@@ -1127,7 +1128,7 @@
1127
1128
  var $clickedEl = $(e.target);
1128
1129
  var $clickedLinkEl = $clickedEl.closest('a');
1129
1130
  var isLink = $clickedLinkEl.length > 0;
1130
- var url = isLink && $clickedLinkEl.attr('href'); // call Modules Clicks
1131
+ isLink && $clickedLinkEl.attr('href'); // call Modules Clicks
1131
1132
 
1132
1133
  Object.keys(app.modules).forEach(function (moduleName) {
1133
1134
  var moduleClicks = app.modules[moduleName].clicks;
@@ -1253,8 +1254,8 @@
1253
1254
  }
1254
1255
  };
1255
1256
 
1256
- var Support = $.support;
1257
- var Device = $.device;
1257
+ var Support$1 = $.support;
1258
+ var Device$1 = $.device;
1258
1259
  /**
1259
1260
  * 应用类,每个wia应用从该类继承,由 首页加载创建或者路由创建
1260
1261
  */
@@ -1270,8 +1271,8 @@
1270
1271
 
1271
1272
  var app = _assertThisInitialized(_this);
1272
1273
 
1273
- app.device = Device;
1274
- app.support = Support; // Default
1274
+ app.device = Device$1;
1275
+ app.support = Support$1; // Default
1275
1276
 
1276
1277
  var def = {
1277
1278
  version: '0.0.1',
@@ -1315,8 +1316,8 @@
1315
1316
  // Theme
1316
1317
  theme: function getTheme() {
1317
1318
  if (app.params.theme === 'auto') {
1318
- if (Device.ios) return 'ios';
1319
- if (Device.desktop) return 'aurora';
1319
+ if (Device$1.ios) return 'ios';
1320
+ if (Device$1.desktop) return 'aurora';
1320
1321
  return 'md';
1321
1322
  }
1322
1323
 
@@ -1332,9 +1333,9 @@
1332
1333
  }
1333
1334
 
1334
1335
  app.touchEvents = {
1335
- start: Support.touch ? 'touchstart' : Support.pointerEvents ? 'pointerdown' : 'mousedown',
1336
- move: Support.touch ? 'touchmove' : Support.pointerEvents ? 'pointermove' : 'mousemove',
1337
- end: Support.touch ? 'touchend' : Support.pointerEvents ? 'pointerup' : 'mouseup'
1336
+ start: Support$1.touch ? 'touchstart' : Support$1.pointerEvents ? 'pointerdown' : 'mousedown',
1337
+ move: Support$1.touch ? 'touchmove' : Support$1.pointerEvents ? 'pointermove' : 'mousemove',
1338
+ end: Support$1.touch ? 'touchend' : Support$1.pointerEvents ? 'pointerup' : 'mouseup'
1338
1339
  }; // 加载use插入的模块类,每个模块作为app的一个属性,合并到实例。
1339
1340
  // 模块包括相关属性及方法(如:create、get、destroy)
1340
1341
  // 调用每个模块的 create 方法
@@ -1371,7 +1372,7 @@
1371
1372
 
1372
1373
 
1373
1374
  function init() {
1374
- if (Device.cordova && app.params.initOnDeviceReady) {
1375
+ if (Device$1.cordova && app.params.initOnDeviceReady) {
1375
1376
  $(document).on('deviceready', function () {
1376
1377
  app.init();
1377
1378
  });
@@ -1467,7 +1468,7 @@
1467
1468
  if (app.initialized) return app;
1468
1469
  $.App = App;
1469
1470
 
1470
- if (Device.ios && Device.webView) {
1471
+ if (Device$1.ios && Device$1.webView) {
1471
1472
  // Strange hack required for iOS 8 webview to work on inputs
1472
1473
  window.addEventListener('touchstart', function () {});
1473
1474
  }
@@ -1499,11 +1500,11 @@
1499
1500
 
1500
1501
  $('html').removeClass('ios md aurora').addClass(app.theme); // iOS Translucent
1501
1502
 
1502
- if (app.params.iosTranslucentBars && app.theme === 'ios' && Device.ios) {
1503
+ if (app.params.iosTranslucentBars && app.theme === 'ios' && Device$1.ios) {
1503
1504
  $('html').addClass('ios-translucent-bars');
1504
1505
  }
1505
1506
 
1506
- if (app.params.iosTranslucentModals && app.theme === 'ios' && Device.ios) {
1507
+ if (app.params.iosTranslucentModals && app.theme === 'ios' && Device$1.ios) {
1507
1508
  $('html').addClass('ios-translucent-modals');
1508
1509
  } // Init class
1509
1510
 
@@ -1581,24 +1582,24 @@
1581
1582
  var metaStatusbar = document.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]');
1582
1583
  if (!html) return;
1583
1584
 
1584
- if (Device.standalone && Device.ios && metaStatusbar && metaStatusbar.content === 'black-translucent') {
1585
+ if (Device$1.standalone && Device$1.ios && metaStatusbar && metaStatusbar.content === 'black-translucent') {
1585
1586
  classNames.push('device-full-viewport');
1586
1587
  } // Pixel Ratio
1587
1588
 
1588
1589
 
1589
- classNames.push("device-pixel-ratio-" + Math.floor(Device.pixelRatio)); // OS classes
1590
+ classNames.push("device-pixel-ratio-" + Math.floor(Device$1.pixelRatio)); // OS classes
1590
1591
 
1591
- if (Device.os && !Device.desktop) {
1592
- classNames.push("device-" + Device.os);
1593
- } else if (Device.desktop) {
1592
+ if (Device$1.os && !Device$1.desktop) {
1593
+ classNames.push("device-" + Device$1.os);
1594
+ } else if (Device$1.desktop) {
1594
1595
  classNames.push('device-desktop');
1595
1596
 
1596
- if (Device.os) {
1597
- classNames.push("device-" + Device.os);
1597
+ if (Device$1.os) {
1598
+ classNames.push("device-" + Device$1.os);
1598
1599
  }
1599
1600
  }
1600
1601
 
1601
- if (Device.cordova || Device.phonegap) {
1602
+ if (Device$1.cordova || Device$1.phonegap) {
1602
1603
  classNames.push('device-cordova');
1603
1604
  } // Add html classes
1604
1605
 
@@ -1621,8 +1622,8 @@
1621
1622
  }; // app 加载到 app实例的一些扩展模块
1622
1623
 
1623
1624
 
1624
- App.support = Support;
1625
- App.device = Device;
1625
+ App.support = Support$1;
1626
+ App.device = Device$1;
1626
1627
  App.utils = Utils; // 添加应用缺省模块
1627
1628
 
1628
1629
  App.use([Resize, // 控制屏幕大小
@@ -1901,15 +1902,43 @@
1901
1902
  // $.assign(this, {page, param, back});
1902
1903
  // $.assign(this.data, param);
1903
1904
  // 隐藏所有模板
1905
+ this.init();
1904
1906
  this.emit('local::ready pageReady', view, param, back);
1905
- view.qus('[name$=-tp]').hide();
1907
+ }
1908
+ /**
1909
+ * 对页面进行初始化处理,或页面内容动态变更时,对局部页面容器进行初始化
1910
+ * 具备name属性的dom节点直接赋值给页面view
1911
+ * 只挂载一个,多个同名name,最后一个起作用,因此一个页面内,name不要重复
1912
+ * 同节点多次调用不覆盖,同名不同dom节点,覆盖
1913
+ * 覆盖后,原直接节点属性的 bind 会失效,需真的新的$dom重新bind
1914
+ * @param {*} v dom 容器,默认为页面实例的view
1915
+ */
1916
+ ;
1917
+
1918
+ _proto.init = function init(v) {
1919
+ var view = this.view;
1920
+ v = v ? $(v) : view; // 页面上带name属性节点,直接作为page.view的属性,方便页面代码直接调用
1921
+
1922
+ var ns = v.qus('[name]');
1923
+ ns === null || ns === void 0 ? void 0 : ns.forEach(function (n) {
1924
+ var $n = $(n);
1925
+ var name = $n.attr('name');
1926
+ if (!view[name] || view[name].dom !== n) view[name] = $n;
1927
+ }); // 隐藏所有模板
1928
+
1929
+ v.qus('[name$=-tp]').hide(); // 防止空链接,刷新页面
1930
+
1931
+ v.qus('a[href=""]').attr('href', 'javascript:;');
1906
1932
  } // 显示已加载的页面
1907
1933
  // view:页面Dom层,param:参数
1908
1934
  ;
1909
1935
 
1910
1936
  _proto.show = function show(view, param) {
1911
- // 防止空链接,刷新页面
1912
- view.qus('a[href=""]').attr('href', 'javascript:;');
1937
+ // 隐藏所有模板
1938
+ view.qus('[name$=-tp]').hide(); // 防止空链接,刷新页面
1939
+
1940
+ view.qus('a[href=""]').attr('href', 'javascript:;'); // this.init();
1941
+
1913
1942
  if (this.reset) this.reset();
1914
1943
  this.emit('local::show pageShow', view, param);
1915
1944
  } // 回退显示已加载的页面
@@ -1917,7 +1946,9 @@
1917
1946
  ;
1918
1947
 
1919
1948
  _proto.back = function back(view, param) {
1920
- // 防止空链接,刷新页面
1949
+ // 隐藏所有模板
1950
+ view.qus('[name$=-tp]').hide(); // 防止空链接,刷新页面
1951
+
1921
1952
  view.qus('a[href=""]').attr('href', 'javascript:;');
1922
1953
  this.emit('local::back pageBack', view, param);
1923
1954
  };
@@ -2207,13 +2238,13 @@
2207
2238
 
2208
2239
  // export {default as Device} from './device';
2209
2240
 
2210
- var Support$1 = $.support;
2211
- var Device$1 = $.device;
2241
+ var Support = $.support;
2242
+ var Device = $.device;
2212
2243
 
2213
2244
  exports.Ajax = Ajax;
2214
2245
  exports.App = App;
2215
2246
  exports.Constructors = Constructors;
2216
- exports.Device = Device$1;
2247
+ exports.Device = Device;
2217
2248
  exports.Event = Event;
2218
2249
  exports.Lazy = Lazy;
2219
2250
  exports.Modal = Modal;
@@ -2222,7 +2253,7 @@
2222
2253
  exports.Page = Page;
2223
2254
  exports.Resize = Resize;
2224
2255
  exports.SW = SW$1;
2225
- exports.Support = Support$1;
2256
+ exports.Support = Support;
2226
2257
  exports.Utils = Utils;
2227
2258
  exports.jsx = jsx;
2228
2259
  exports.loadModule = loadModule;
package/dist/core.min.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * wia core v0.1.15
2
+ * wia core v0.1.16
3
3
  * (c) 2021 Sibyl Yu
4
4
  * @license MIT
5
5
  */
6
- var e,t;e=this,t=function(e){"use strict";var t=function(){function e(){}var t=e.prototype;return t.post=function(e,t){return new Promise((function(n,o){var r=$.getXhr();r.onreadystatechange=function(){4===r.readyState&&(200===r.status?n(r.responseText):o(new Error(r.statusText),r.responseText))},r.open("POST",e,!0);var i=t;"object"==typeof t&&(i=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n+"="+e[n]);return t.sort().join("&")}(t)),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.send(i)}))},t.postForm=function(e,t){return new Promise((function(n,o){var r=$.getXhr();r.onreadystatechange=function(){4===r.readyState&&(200===r.status?n(null,r.responseText):o(new Error(r.status),r.responseText))},r.open("POST",e,!0),r.send(t)}))},t.get=function(e,t){return $.get(e,t)},e}();function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function o(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e}function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function s(e,t,n){return(s=a()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var r=new(Function.bind.apply(e,o));return n&&i(r,n.prototype),r}).apply(null,arguments)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var u=1,l={uniqueNumber:function(){return u+=1},id:function(e,t){return void 0===e&&(e="xxxxxxxxxx"),void 0===t&&(t="0123456789abcdef"),$.uid(e,t)},mdPreloaderContent:'\n <span class="preloader-inner">\n\t\t\t<svg viewBox="0 0 36 36">\n\t\t\t\t<circle cx="18" cy="18" r="16"></circle>\n\t\t\t</svg>\n </span>\n '.trim(),iosPreloaderContent:('\n <span class="preloader-inner">\n\t\t\t'+[0,1,2,3,4,5,6,7].map((function(){return'<span class="preloader-inner-line"></span>'})).join("")+"\n </span>\n ").trim(),auroraPreloaderContent:'\n <span class="preloader-inner">\n <span class="preloader-inner-circle"></span>\n </span>\n ',eventNameToColonCase:function(e){var t;return e.split("").map((function(e,n){return e.match(/[A-Z]/)&&0!==n&&!t?(t=!0,":"+e.toLowerCase()):e.toLowerCase()})).join("")},deleteProps:function(e){$.deleteProps(e)},nextTick:function(e,t){return void 0===t&&(t=0),setTimeout(e,t)},nextFrame:function(e){return $.nextFrame(e)},now:function(){return Date.now()},requestAnimationFrame:function(e){return $.requestAnimationFrame(e)},cancelAnimationFrame:function(e){return $.cancelAnimationFrame(e)},parseUrlQuery:function(e){return $.urlParam(e)},getTranslate:function(e,t){return void 0===t&&(t="x"),$.getTranslate(e,t)},serializeObject:function(e,t){if(void 0===t&&(t=[]),"string"==typeof e)return e;var n,o=[];function r(e){if(t.length>0){for(var n="",o=0;o<t.length;o+=1)n+=0===o?t[o]:"["+encodeURIComponent(t[o])+"]";return n+"["+encodeURIComponent(e)+"]"}return encodeURIComponent(e)}function i(e){return encodeURIComponent(e)}return Object.keys(e).forEach((function(a){var s;if(Array.isArray(e[a])){s=[];for(var c=0;c<e[a].length;c+=1)Array.isArray(e[a][c])||"object"!=typeof e[a][c]?s.push(r(a)+"[]="+i(e[a][c])):((n=t.slice()).push(a),n.push(String(c)),s.push(l.serializeObject(e[a][c],n)));s.length>0&&o.push(s.join("&"))}else null===e[a]||""===e[a]?o.push(r(a)+"="):"object"==typeof e[a]?((n=t.slice()).push(a),""!==(s=l.serializeObject(e[a],n))&&o.push(s)):void 0!==e[a]&&""!==e[a]?o.push(r(a)+"="+i(e[a])):""===e[a]&&o.push(r(a))})),o.join("&")},isObject:function(e){return"object"==typeof e&&null!==e&&e.constructor&&e.constructor===Object},merge:function(){var e;return(e=$).merge.apply(e,arguments)},extend:function(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];var r=n[0];return n.splice(0,1),(e=$).assign.apply(e,[r].concat(n))},bindMethods:function(e,t){var n=this;Object.keys(t).forEach((function(o){n.isObject(t[o])&&Object.keys(t[o]).forEach((function(n){"function"==typeof t[o][n]&&(t[o][n]=t[o][n].bind(e))})),e[o]=t[o]}))},colorHexToRgb:function(e){var t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,o){return t+t+n+n+o+o})),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return n?n.slice(1).map((function(e){return parseInt(e,16)})):null},colorRgbToHex:function(e,t,n){return"#"+[e,t,n].map((function(e){var t=e.toString(16);return 1===t.length?"0"+t:t})).join("")},colorRgbToHsl:function(e,t,n){e/=255,t/=255,n/=255;var o,r=Math.max(e,t,n),i=Math.min(e,t,n),a=r-i;0===a?o=0:r===e?o=(t-n)/a%6:r===t?o=(n-e)/a+2:r===n&&(o=(e-t)/a+4);var s=(i+r)/2;return o<0&&(o=6+o),[60*o,0===a?0:a/(1-Math.abs(2*s-1)),s]},colorHslToRgb:function(e,t,n){var o,r=(1-Math.abs(2*n-1))*t,i=e/60,a=r*(1-Math.abs(i%2-1));Number.isNaN(e)||void 0===e?o=[0,0,0]:i<=1?o=[r,a,0]:i<=2?o=[a,r,0]:i<=3?o=[0,r,a]:i<=4?o=[0,a,r]:i<=5?o=[a,0,r]:i<=6&&(o=[r,0,a]);var s=n-r/2;return o.map((function(e){return Math.max(0,Math.min(255,Math.round(255*(e+s))))}))},colorHsbToHsl:function(e,t,n){var o={h:e,s:0,l:0},r=t,i=n;return o.l=(2-r)*i/2,o.s=o.l&&o.l<1?r*i/(o.l<.5?2*o.l:2-2*o.l):o.s,[o.h,o.s,o.l]},colorHslToHsb:function(e,t,n){var o={h:e,s:0,b:0},r=n,i=t*(r<.5?r:1-r);return o.b=r+i,o.s=r>0?2*i/o.b:o.s,[o.h,o.s,o.b]},colorThemeCSSProperties:function(){for(var e,t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];if(1===o.length?(e=o[0],t=l.colorHexToRgb(e)):3===o.length&&(t=o,e=l.colorRgbToHex.apply(l,t)),!t)return{};var i=l.colorRgbToHsl.apply(l,t),a=[i[0],i[1],Math.max(0,i[2]-.08)],s=[i[0],i[1],Math.max(0,i[2]+.08)],c=l.colorRgbToHex.apply(l,l.colorHslToRgb.apply(l,a)),u=l.colorRgbToHex.apply(l,l.colorHslToRgb.apply(l,s));return{"--f7-theme-color":e,"--f7-theme-color-rgb":t.join(", "),"--f7-theme-color-shade":c,"--f7-theme-color-tint":u}}},d=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);var n=this;n.params=e,n.eventsParents=t,n.eventsListeners={},n.params&&n.params.on&&Object.keys(n.params.on).forEach((function(e){n.on(e,n.params.on[e])}))}var t=e.prototype;return t.on=function(e,t,n){var o=this;if("function"!=typeof t)return o;var r=n?"unshift":"push";return e.split(" ").forEach((function(e){o.eventsListeners[e]||(o.eventsListeners[e]=[]),o.eventsListeners[e][r](t)})),o},t.once=function(e,t,n){var o=this;if("function"!=typeof t)return o;function r(){o.off(e,r),r.proxy&&delete r.proxy;for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];t.apply(o,i)}return r.proxy=t,o.on(e,r,n)},t.off=function(e,t){var n=this;return n.eventsListeners?(e.split(" ").forEach((function(e){void 0===t?n.eventsListeners[e]=[]:n.eventsListeners[e]&&n.eventsListeners[e].forEach((function(o,r){(o===t||o.proxy&&o.proxy===t)&&n.eventsListeners[e].splice(r,1)}))})),n):n},t.emit=function(){var e,t,n,o,r=this;if(!r.eventsListeners)return r;for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];"string"==typeof a[0]||Array.isArray(a[0])?(e=a[0],t=a.slice(1,a.length),n=r,o=r.eventsParents):(e=a[0].events,t=a[0].data,n=a[0].context||r,o=a[0].local?[]:a[0].parents||r.eventsParents);var c=Array.isArray(e)?e:e.split(" "),u=c.map((function(e){return e.replace("local::","")})),l=c.filter((function(e){return e.indexOf("local::")<0}));return u.forEach((function(e){if(r.eventsListeners&&r.eventsListeners[e]){var o=[];r.eventsListeners[e].forEach((function(e){o.push(e)})),o.forEach((function(e){e.apply(n,t)}))}})),o&&o.length>0&&o.forEach((function(e){e.emit.apply(e,[l].concat(t))})),r},e}(),p=function(e){function t(t,n){return void 0===t&&(t={}),void 0===n&&(n=[]),e.call(this,t,n)||this}r(t,e);var n=t.prototype;return n.useModuleParams=function(e,t){if(e.params){var n={};Object.keys(e.params).forEach((function(e){void 0!==t[e]&&(n[e]=$.extend({},t[e]))})),$.extend(t,e.params),Object.keys(n).forEach((function(e){$.extend(t[e],n[e])}))}},n.useModulesParams=function(e){var t=this;t.modules&&Object.keys(t.modules).forEach((function(n){var o=t.modules[n];o.params&&$.extend(e,o.params)}))},n.useModule=function(e,t){void 0===e&&(e=""),void 0===t&&(t={});var n=this;if(n.modules){var o="string"==typeof e?n.modules[e]:e;o&&(o.instance&&Object.keys(o.instance).forEach((function(e){var t=o.instance[e];n[e]="function"==typeof t?t.bind(n):t})),o.on&&n.on&&Object.keys(o.on).forEach((function(e){n.on(e,o.on[e])})),o.vnode&&(n.vnodeHooks||(n.vnodeHooks={}),Object.keys(o.vnode).forEach((function(e){Object.keys(o.vnode[e]).forEach((function(t){var r=o.vnode[e][t];n.vnodeHooks[t]||(n.vnodeHooks[t]={}),n.vnodeHooks[t][e]||(n.vnodeHooks[t][e]=[]),n.vnodeHooks[t][e].push(r.bind(n))}))}))),o.create&&o.create.bind(n)(t))}},n.useModules=function(e){void 0===e&&(e={});var t=this;t.modules&&Object.keys(t.modules).forEach((function(n){var o=e[n]||{};t.useModule(n,o)}))},t.installModule=function(e){var t=this;t.prototype.modules||(t.prototype.modules={});var n=e.name||Object.keys(t.prototype.modules).length+"_"+$.now();if(t.prototype.modules[n]=e,e.proto&&Object.keys(e.proto).forEach((function(n){t.prototype[n]=e.proto[n]})),e.static&&Object.keys(e.static).forEach((function(n){t[n]=e.static[n]})),e.install){for(var o=arguments.length,r=new Array(o>1?o-1:0),i=1;i<o;i++)r[i-1]=arguments[i];e.install.apply(t,r)}return t},t.use=function(e){var t=this;if(Array.isArray(e))return e.forEach((function(e){return t.installModule(e)})),t;for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return t.installModule.apply(t,[e].concat(o))},o(t,null,[{key:"components",set:function(e){this.use&&this.use(e)}}]),t}(d);function f(e){void 0===e&&(e={});var t=e,n=t.defaultSelector,o=t.constructor,r=t.domProp,i=t.app,a=t.addMethods,c={create:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(o,i?[i].concat(t):t)},get:function(e){if(void 0===e&&(e=n),e instanceof o)return e;var t=$(e);return 0!==t.length?t[0][r]:void 0},destroy:function(e){var t=c.get(e);if(t&&t.destroy)return t.destroy()}};return a&&Array.isArray(a)&&a.forEach((function(e){c[e]=function(t){void 0===t&&(t=n);for(var o=c.get(t),r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];if(o&&o[e])return o[e].apply(o,i)}})),c}function h(e){void 0===e&&(e={});var t=e,n=t.defaultSelector,o=t.constructor,r=t.app;return $.extend(f({defaultSelector:n,constructor:o,app:r,domProp:"f7Modal"}),{open:function(e,t){var n=$(e),i=n[0].f7Modal;return i||(i=new o(r,{el:n})),i.open(t)},close:function(e,t){void 0===e&&(e=n);var i=$(e);if(0!==i.length){var a=i[0].f7Modal;return a||(a=new o(r,{el:i})),a.close(t)}}})}var m=[];function v(e){var t=this;return new Promise((function(n,o){var r,i,a,s=t.instance;if(e){if("string"==typeof e){var c=e.match(/([a-z0-9-]*)/i);if(e.indexOf(".")<0&&c&&c[0].length===e.length){if(!s||s&&!s.params.lazyModulesPath)return void o(new Error('Wia: "lazyModulesPath" app parameter must be specified to fetch module by name'));r=s.params.lazyModulesPath+"/"+e+".js"}else r=e}else"function"==typeof e?a=e:i=e;if(a){var u=a(t,!1);if(!u)return void o(new Error("Wia: Can't find Wia component in specified component function"));if(t.prototype.modules&&t.prototype.modules[u.name])return void n();f(u),n()}if(i){var l=i;if(!l)return void o(new Error("Wia: Can't find Wia component in specified component"));if(t.prototype.modules&&t.prototype.modules[l.name])return void n();f(l),n()}if(r){if(m.indexOf(r)>=0)return void n();m.push(r);var d=new Promise((function(e,n){t.request.get(r,(function(o){var i="wia_component_loader_callback_"+$.id(),a=document.createElement("script");a.innerHTML="window."+i+" = function (Wia, WiaAutoInstallComponent) {return "+o.trim()+"}",$("head").append(a);var s=window[i];delete window[i],$(a).remove();var c=s(t,!1);c?(t.prototype.modules&&t.prototype.modules[c.name]||f(c),e()):n(new Error("Wia: Can't find Wia component in "+r+" file"))}),(function(e,t){n(e,t)}))})),p=new Promise((function(e){t.request.get(r.replace(".js",s.rtl?".rtl.css":".css"),(function(t){var n=document.createElement("style");n.innerHTML=t,$("head").append(n),e()}),(function(){e()}))}));Promise.all([d,p]).then((function(){n()})).catch((function(e){o(e)}))}}else o(new Error("Wia: Lazy module must be specified"));function f(e){t.use(e),s&&(s.useModuleParams(e,s.params),s.useModule(e))}}))}var y={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],n=t[0],o=t[1],r=t[2],i=t[3];return this.width=n,this.height=o,this.left=r,this.top=i,{width:n,height:o,left:r,top:i}}},on:{init:function(){var e=this;e.getSize(),window.addEventListener("resize",(function(){e.emit("resize")}),!1),window.addEventListener("orientationchange",(function(){e.emit("orientationchange")}))},orientationchange:function(){this.device.ipad&&(document.body.scrollLeft=0,setTimeout((function(){document.body.scrollLeft=0}),0))},resize:function(){this.getSize()}}};function g(e){var t,n,o;t=function(t){e.emit({events:"click",data:[t]})},$.support.touch?(document.addEventListener("touchstart",(function(e){n=e.changedTouches[0].clientX,o=e.changedTouches[0].clientY}),!0),document.addEventListener("touchend",(function(e){var r=Math.abs(e.changedTouches[0].clientX-n),i=Math.abs(e.changedTouches[0].clientY-o);r<=5&&i<=5&&t.call(this,e)}),!0)):document.addEventListener("click",t,!0),e.on("click",(function(t){var n=$(t.target),o=n.closest("a");o.length>0&&o.attr("href"),Object.keys(e.modules).forEach((function(o){var r=e.modules[o].clicks;r&&(t.preventF7Router||Object.keys(r).forEach((function(o){var i=n.closest(o).eq(0);i.length>0&&r[o].call(e,i,i.dataset(),t)})))}))}))}var w={name:"clicks",params:{clicks:{externalLinks:".ext"}},on:{init:function(){g(this)}}},b={registrations:[],register:function(e,t){var n=this;return"serviceWorker"in window.navigator&&n.serviceWorker.container?new Promise((function(o,r){n.serviceWorker.container.register(e,t?{scope:t}:{}).then((function(e){b.registrations.push(e),n.emit("serviceWorkerRegisterSuccess",e),o(e)})).catch((function(e){n.emit("serviceWorkerRegisterError",e),r(e)}))})):new Promise((function(e,t){t(new Error("Service worker is not supported"))}))},unregister:function(e){var t,n=this;return"serviceWorker"in window.navigator&&n.serviceWorker.container?(t=e?Array.isArray(e)?e:[e]:b.registrations,Promise.all(t.map((function(e){return new Promise((function(t,o){e.unregister().then((function(){b.registrations.indexOf(e)>=0&&b.registrations.splice(b.registrations.indexOf(e),1),n.emit("serviceWorkerUnregisterSuccess",e),t()})).catch((function(t){n.emit("serviceWorkerUnregisterError",e,t),o(t)}))}))})))):new Promise((function(e,t){t(new Error("Service worker is not supported"))}))}},k={name:"sw",params:{serviceWorker:{path:void 0,scope:void 0}},create:function(){$.extend(this,{serviceWorker:{container:"serviceWorker"in window.navigator?window.navigator.serviceWorker:void 0,registrations:b.registrations,register:b.register.bind(this),unregister:b.unregister.bind(this)}})},on:{init:function(){if("serviceWorker"in window.navigator){var e=this;if(e.serviceWorker.container){var t=e.params.serviceWorker.path,n=e.params.serviceWorker.scope;!t||Array.isArray(t)&&!t.length||(Array.isArray(t)?t:[t]).forEach((function(t){e.serviceWorker.register(t,n)}))}}}}},C=$.support,x=$.device,E=function(e){function t(t){var n;n=e.call(this,t)||this;var o=$.extend({},t),r=c(n);r.device=x,r.support=C;var i={version:"0.0.1",root:"body",theme:"auto",language:window.navigator.language,routes:[],lazyModulesPath:null,initOnDeviceReady:!0,autoDarkTheme:!1,iosTranslucentBars:!0,iosTranslucentModals:!0,component:void 0,componentUrl:void 0};r.useModulesParams(i),r.params=$.extend(i,t);var a=$(r.params.root);$.extend(r,{owner:r.params.owner,name:r.params.name,id:r.params.owner+"."+r.params.name,version:r.params.version,routes:r.params.routes,language:r.params.language,root:a,$el:a,cfg:r.params.cfg,api:r.params.api,rtl:"rtl"===a.css("direction"),theme:"auto"===r.params.theme?x.ios?"ios":x.desktop?"aurora":"md":r.params.theme,passedParams:o,online:window.navigator.onLine}),r.root&&r.root[0]&&(r.root[0].wia=r),r.touchEvents={start:C.touch?"touchstart":C.pointerEvents?"pointerdown":"mousedown",move:C.touch?"touchmove":C.pointerEvents?"pointermove":"mousemove",end:C.touch?"touchend":C.pointerEvents?"pointerup":"mouseup"},r.useModules(),r.initData();var s="(prefers-color-scheme: dark)",u="(prefers-color-scheme: light)";return r.mq={},window.matchMedia&&(r.mq.dark=window.matchMedia(s),r.mq.light=window.matchMedia(u)),r.colorSchemeListener=function(e){var t=e.matches,n=e.media;if(t){var o=document.querySelector("html");n===s?o.classList.add("theme-dark"):n===u&&o.classList.remove("theme-dark")}},r.params.init&&(x.cordova&&r.params.initOnDeviceReady?$(document).on("deviceready",(function(){r.init()})):r.init()),r||c(n)}r(t,e);var n=t.prototype;return n.load=function(e){this.emit("local::load appLoad",e)},n.show=function(e,t){this.emit("local::show appShow",e,t)},n.hide=function(){this.emit("local::hide appHide")},n.unload=function(){this.emit("local::unload appUnload")},n.initData=function(){var e=this;e.data={},e.params.data&&"function"==typeof e.params.data?$.extend(e.data,e.params.data.bind(e)()):e.params.data&&$.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]}))},n.enableAutoDarkTheme=function(){if(window.matchMedia){var e=this,t=document.querySelector("html");e.mq.dark&&e.mq.light&&(e.mq.dark.addListener(e.colorSchemeListener),e.mq.light.addListener(e.colorSchemeListener)),e.mq.dark&&e.mq.dark.matches?t.classList.add("theme-dark"):e.mq.light&&e.mq.light.matches&&t.classList.remove("theme-dark")}},n.disableAutoDarkTheme=function(){window.matchMedia&&(this.mq.dark&&this.mq.dark.removeListener(this.colorSchemeListener),this.mq.light&&this.mq.light.removeListener(this.colorSchemeListener))},n.init=function(){var e,n,o,r=this;return r.initialized||($.App=t,x.ios&&x.webView&&window.addEventListener("touchstart",(function(){})),r.root.addClass("framework7-initializing"),r.rtl&&$("html").attr("dir","rtl"),r.params.autoDarkTheme&&r.enableAutoDarkTheme(),window.addEventListener("offline",(function(){r.online=!1,r.emit("offline"),r.emit("connection",!1)})),window.addEventListener("online",(function(){r.online=!0,r.emit("online"),r.emit("connection",!0)})),r.root.addClass("framework7-root"),$("html").removeClass("ios md aurora").addClass(r.theme),r.params.iosTranslucentBars&&"ios"===r.theme&&x.ios&&$("html").addClass("ios-translucent-bars"),r.params.iosTranslucentModals&&"ios"===r.theme&&x.ios&&$("html").addClass("ios-translucent-modals"),$.nextFrame((function(){r.root.removeClass("framework7-initializing")})),e=[],n=document.querySelector("html"),o=document.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]'),n&&(x.standalone&&x.ios&&o&&"black-translucent"===o.content&&e.push("device-full-viewport"),e.push("device-pixel-ratio-"+Math.floor(x.pixelRatio)),x.os&&!x.desktop?e.push("device-"+x.os):x.desktop&&(e.push("device-desktop"),x.os&&e.push("device-"+x.os)),(x.cordova||x.phonegap)&&e.push("device-cordova"),e.forEach((function(e){n.classList.add(e)}))),r.initialized=!0,r.emit("init")),r},n.loadModule=function(e){t.loadModule(e),this[e.name].init&&this[e.name].init()},n.loadModules=function(){return t.loadModules.apply(t,arguments)},n.getVnodeHooks=function(e,t){return this.vnodeHooks&&this.vnodeHooks[e]&&this.vnodeHooks[e][t]||[]},o(t,[{key:"$",get:function(){return $}}],[{key:"Dom",get:function(){return $}},{key:"$",get:function(){return $}},{key:"Module",get:function(){return p}},{key:"Event",get:function(){return d}}]),t}(p);E.apps={},E.ModalMethods=h,E.ConstructorMethods=f,E.loadModule=v,E.loadModules=function(e){return Promise.all(e.map((function(e){return E.loadModule(e)})))},E.support=C,E.device=x,E.utils=l,E.use([y,w,k]);var M,L,O,A,j={normal:"nor",retina:"ret",srcset:"set",threshold:0},T=window.innerHeight,P=q(),H=document.body.classList.contains("srcset")||"srcset"in document.createElement("img"),R=window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI,S=function(){function e(e){M=$.assign({},j,e)}var t=e.prototype;return t.start=function(e){return["scroll","resize"].forEach((function(t){return e.addEventListener(t,W)})),A=e,this},t.stop=function(){return["scroll","resize"].forEach((function(e){return A.removeEventListener(e,W)})),this},t.update=function(){setTimeout((function(){_(),D()}),1)},e}();function q(){return window.scrollY||window.pageYOffset}function W(){P=q(),L||(window.requestAnimationFrame((function(){return D()})),L=!0)}function z(e){var t=P,n=t+T,o=function(e){return e.getBoundingClientRect().top+P}(e),r=o+e.offsetHeight,i=M.threshold/100*T;return r>=t-i&&o<=n+i}function D(){if(O)return T=window.innerHeight,O.forEach((function(e){return z(e)&&function(e){if($.emit("lazy:src:before",e),H&&e.hasAttribute(M.srcset))e.setAttribute("srcset",e.getAttribute(M.srcset));else{var t=R>1&&e.getAttribute(M.retina)||e.getAttribute(M.normal);e.setAttribute("src",t),console.log("set src:"+t)}$.emit("lazy:src:after",e),[M.normal,M.retina,M.srcset].forEach((function(t){return e.removeAttribute(t)})),_()}(e)})),L=!1,this}function _(e){return O=e?Array.prototype.slice.call(e.querySelectorAll("["+M.normal+"]")):Array.prototype.slice.call(document.querySelectorAll("["+M.normal+"]")),this}var F=function(e){function t(t,n,o,r){var i;return(i=e.call(this,null,[t])||this).app=t,i.cfg=t.cfg,i.name=n,i.title=o,i.style=r||"./page/"+n+".css",i.path=""+n,i.view=null,i.el=null,i.$el=null,i.html="",i.css="",i.js="",i.data={},i.param={},i}r(t,e);var n=t.prototype;return n.load=function(e){this.emit("local::load pageLoad",e)},n.ready=function(e,t,n){this.emit("local::ready pageReady",e,t,n),e.qus("[name$=-tp]").hide()},n.show=function(e,t){e.qus('a[href=""]').attr("href","javascript:;"),this.reset&&this.reset(),this.emit("local::show pageShow",e,t)},n.back=function(e,t){e.qus('a[href=""]').attr("href","javascript:;"),this.emit("local::back pageBack",e,t)},n.hide=function(e){this.emit("local::hide pageHide",e)},t}(d),U=[],B=[],I=function(e){function t(t,n){var o,r=c(o=e.call(this,n,[t])||this);return r.params=l.extend({},n),r.opened=!1,c(o)||c(o)}r(t,e);var n=t.prototype;return n.onOpen=function(){this.opened=!0,U.push(this),$("html").addClass("with-modal-"+this.type.toLowerCase()),this.$el.trigger("modal:open "+this.type.toLowerCase()+":open"),this.emit("local::open modalOpen "+this.type+"Open",this)},n.onOpened=function(){this.$el.trigger("modal:opened "+this.type.toLowerCase()+":opened"),this.emit("local::opened modalOpened "+this.type+"Opened",this)},n.onClose=function(){this.opened=!1,this.type&&this.$el&&(U.splice(U.indexOf(this),1),$("html").removeClass("with-modal-"+this.type.toLowerCase()),this.$el.trigger("modal:close "+this.type.toLowerCase()+":close"),this.emit("local::close modalClose "+this.type+"Close",this))},n.onClosed=function(){this.type&&this.$el&&(this.$el.removeClass("modal-out"),this.$el.hide(),this.$el.trigger("modal:closed "+this.type.toLowerCase()+":closed"),this.emit("local::closed modalClosed "+this.type+"Closed",this))},n.open=function(e){var t,n=this,o=n.app,r=n.$el,i=n.type,a=n.$backdropEl,s=n.params.moveToRoot,c=!0;if(void 0!==e?c=e:void 0!==n.params.animate&&(c=n.params.animate),!r||r.hasClass("modal-in"))return n;if("dialog"===i&&o.params.modal.queueDialogs&&($(".dialog.modal-in").length>0?t=!0:U.length>0&&U.forEach((function(e){"dialog"===e.type&&(t=!0)})),t))return B.push(n),n;var u=r.parent(),l=r.parents(document).length>0;function d(){r.hasClass("modal-out")?n.onClosed():r.hasClass("modal-in")&&n.onOpened()}return s&&o.params.modal.moveToRoot&&!u.is(o.root)&&(o.root.append(r),n.once(i+"Closed",(function(){l?u.append(r):r.remove()}))),r.show(),n._clientLeft=r[0].clientLeft,c?(a&&(a.removeClass("not-animated"),a.addClass("backdrop-in")),r.animationEnd((function(){d()})),r.transitionEnd((function(){d()})),r.removeClass("modal-out not-animated").addClass("modal-in"),n.onOpen()):(a&&a.addClass("backdrop-in not-animated"),r.removeClass("modal-out").addClass("modal-in not-animated"),n.onOpen(),n.onOpened()),n},n.close=function(e){var t=this,n=t.$el,o=t.$backdropEl,r=!0;if(void 0!==e?r=e:void 0!==t.params.animate&&(r=t.params.animate),!n||!n.hasClass("modal-in"))return B.indexOf(t)>=0&&B.splice(B.indexOf(t),1),t;if(o){var i=!0;"popup"===t.type&&t.$el.prevAll(".popup.modal-in").each((function(e,n){var o=n.f7Modal;o&&o.params.closeByBackdropClick&&o.params.backdrop&&o.backdropEl===t.backdropEl&&(i=!1)})),i&&(o[r?"removeClass":"addClass"]("not-animated"),o.removeClass("backdrop-in"))}function a(){n.hasClass("modal-out")?t.onClosed():n.hasClass("modal-in")&&t.onOpened()}return n[r?"removeClass":"addClass"]("not-animated"),r?(n.animationEnd((function(){a()})),n.transitionEnd((function(){a()})),n.removeClass("modal-in").addClass("modal-out"),t.onClose()):(n.addClass("not-animated").removeClass("modal-in").addClass("modal-out"),t.onClose(),t.onClosed()),"dialog"===t.type&&0!==B.length&&B.shift().open(),t},n.destroy=function(){this.destroyed||(this.emit("local::beforeDestroy modalBeforeDestroy "+this.type+"BeforeDestroy",this),this.$el&&(this.$el.trigger("modal:beforedestroy "+this.type.toLowerCase()+":beforedestroy"),this.$el.length&&this.$el[0].f7Modal&&delete this.$el[0].f7Modal),l.deleteProps(this),this.destroyed=!0)},t}(d),X=$.support,N=$.device;e.Ajax=t,e.App=E,e.Constructors=f,e.Device=N,e.Event=d,e.Lazy=S,e.Modal=I,e.Modals=h,e.Module=p,e.Page=F,e.Resize=y,e.SW=k,e.Support=X,e.Utils=l,e.jsx=function(e,t){for(var n=t||{},o=arguments.length,r=new Array(o>2?o-2:0),i=2;i<o;i++)r[i-2]=arguments[i];var a=r||[],s=Object.keys(n).map((function(e){return"_"===e[0]?n[e]?e.replace("_",""):"":e+'="'+n[e]+'"'})).filter((function(e){return!!e})).join(" ");if(["path","img","circle","polygon","line","input"].indexOf(e)>=0)return("<"+e+" "+s+" />").trim();var c=a.filter((function(e){return!!e})).map((function(e){return Array.isArray(e)?e.join(""):e})).join("");return("<"+e+" "+s+">"+c+"</"+e+">").trim()},e.loadModule=v,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self)["@wiajs/Core"]={});
6
+ var e,t;e=this,t=function(e){"use strict";var t=function(){function e(){}var t=e.prototype;return t.post=function(e,t){return new Promise((function(n,o){var r=$.getXhr();r.onreadystatechange=function(){4===r.readyState&&(200===r.status?n(r.responseText):o(new Error(r.statusText),r.responseText))},r.open("POST",e,!0);var a=t;"object"==typeof t&&(a=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n+"="+e[n]);return t.sort().join("&")}(t)),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.send(a)}))},t.postForm=function(e,t){return new Promise((function(n,o){var r=$.getXhr();r.onreadystatechange=function(){4===r.readyState&&(200===r.status?n(null,r.responseText):o(new Error(r.status),r.responseText))},r.open("POST",e,!0),r.send(t)}))},t.get=function(e,t){return $.get(e,t)},e}();function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function o(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e}function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,a(e,t)}function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function s(e,t,n){return s=i()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var r=new(Function.bind.apply(e,o));return n&&a(r,n.prototype),r},s.apply(null,arguments)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var u=1,l={uniqueNumber:function(){return u+=1},id:function(e,t){return void 0===e&&(e="xxxxxxxxxx"),void 0===t&&(t="0123456789abcdef"),$.uid(e,t)},mdPreloaderContent:'\n <span class="preloader-inner">\n\t\t\t<svg viewBox="0 0 36 36">\n\t\t\t\t<circle cx="18" cy="18" r="16"></circle>\n\t\t\t</svg>\n </span>\n '.trim(),iosPreloaderContent:('\n <span class="preloader-inner">\n\t\t\t'+[0,1,2,3,4,5,6,7].map((function(){return'<span class="preloader-inner-line"></span>'})).join("")+"\n </span>\n ").trim(),auroraPreloaderContent:'\n <span class="preloader-inner">\n <span class="preloader-inner-circle"></span>\n </span>\n ',eventNameToColonCase:function(e){var t;return e.split("").map((function(e,n){return e.match(/[A-Z]/)&&0!==n&&!t?(t=!0,":"+e.toLowerCase()):e.toLowerCase()})).join("")},deleteProps:function(e){$.deleteProps(e)},nextTick:function(e,t){return void 0===t&&(t=0),setTimeout(e,t)},nextFrame:function(e){return $.nextFrame(e)},now:function(){return Date.now()},requestAnimationFrame:function(e){return $.requestAnimationFrame(e)},cancelAnimationFrame:function(e){return $.cancelAnimationFrame(e)},parseUrlQuery:function(e){return $.urlParam(e)},getTranslate:function(e,t){return void 0===t&&(t="x"),$.getTranslate(e,t)},serializeObject:function(e,t){if(void 0===t&&(t=[]),"string"==typeof e)return e;var n,o=[];function r(e){if(t.length>0){for(var n="",o=0;o<t.length;o+=1)n+=0===o?t[o]:"["+encodeURIComponent(t[o])+"]";return n+"["+encodeURIComponent(e)+"]"}return encodeURIComponent(e)}function a(e){return encodeURIComponent(e)}return Object.keys(e).forEach((function(i){var s;if(Array.isArray(e[i])){s=[];for(var c=0;c<e[i].length;c+=1)Array.isArray(e[i][c])||"object"!=typeof e[i][c]?s.push(r(i)+"[]="+a(e[i][c])):((n=t.slice()).push(i),n.push(String(c)),s.push(l.serializeObject(e[i][c],n)));s.length>0&&o.push(s.join("&"))}else null===e[i]||""===e[i]?o.push(r(i)+"="):"object"==typeof e[i]?((n=t.slice()).push(i),""!==(s=l.serializeObject(e[i],n))&&o.push(s)):void 0!==e[i]&&""!==e[i]?o.push(r(i)+"="+a(e[i])):""===e[i]&&o.push(r(i))})),o.join("&")},isObject:function(e){return"object"==typeof e&&null!==e&&e.constructor&&e.constructor===Object},merge:function(){var e;return(e=$).merge.apply(e,arguments)},extend:function(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];var r=n[0];return n.splice(0,1),(e=$).assign.apply(e,[r].concat(n))},bindMethods:function(e,t){var n=this;Object.keys(t).forEach((function(o){n.isObject(t[o])&&Object.keys(t[o]).forEach((function(n){"function"==typeof t[o][n]&&(t[o][n]=t[o][n].bind(e))})),e[o]=t[o]}))},colorHexToRgb:function(e){var t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,o){return t+t+n+n+o+o})),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return n?n.slice(1).map((function(e){return parseInt(e,16)})):null},colorRgbToHex:function(e,t,n){return"#"+[e,t,n].map((function(e){var t=e.toString(16);return 1===t.length?"0"+t:t})).join("")},colorRgbToHsl:function(e,t,n){e/=255,t/=255,n/=255;var o,r=Math.max(e,t,n),a=Math.min(e,t,n),i=r-a;0===i?o=0:r===e?o=(t-n)/i%6:r===t?o=(n-e)/i+2:r===n&&(o=(e-t)/i+4);var s=(a+r)/2;return o<0&&(o=6+o),[60*o,0===i?0:i/(1-Math.abs(2*s-1)),s]},colorHslToRgb:function(e,t,n){var o,r=(1-Math.abs(2*n-1))*t,a=e/60,i=r*(1-Math.abs(a%2-1));Number.isNaN(e)||void 0===e?o=[0,0,0]:a<=1?o=[r,i,0]:a<=2?o=[i,r,0]:a<=3?o=[0,r,i]:a<=4?o=[0,i,r]:a<=5?o=[i,0,r]:a<=6&&(o=[r,0,i]);var s=n-r/2;return o.map((function(e){return Math.max(0,Math.min(255,Math.round(255*(e+s))))}))},colorHsbToHsl:function(e,t,n){var o={h:e,s:0,l:0},r=t,a=n;return o.l=(2-r)*a/2,o.s=o.l&&o.l<1?r*a/(o.l<.5?2*o.l:2-2*o.l):o.s,[o.h,o.s,o.l]},colorHslToHsb:function(e,t,n){var o={h:e,s:0,b:0},r=n,a=t*(r<.5?r:1-r);return o.b=r+a,o.s=r>0?2*a/o.b:o.s,[o.h,o.s,o.b]},colorThemeCSSProperties:function(){for(var e,t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];if(1===o.length?(e=o[0],t=l.colorHexToRgb(e)):3===o.length&&(t=o,e=l.colorRgbToHex.apply(l,t)),!t)return{};var a=l.colorRgbToHsl.apply(l,t),i=[a[0],a[1],Math.max(0,a[2]-.08)],s=[a[0],a[1],Math.max(0,a[2]+.08)],c=l.colorRgbToHex.apply(l,l.colorHslToRgb.apply(l,i)),u=l.colorRgbToHex.apply(l,l.colorHslToRgb.apply(l,s));return{"--f7-theme-color":e,"--f7-theme-color-rgb":t.join(", "),"--f7-theme-color-shade":c,"--f7-theme-color-tint":u}}},d=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);var n=this;n.params=e,n.eventsParents=t,n.eventsListeners={},n.params&&n.params.on&&Object.keys(n.params.on).forEach((function(e){n.on(e,n.params.on[e])}))}var t=e.prototype;return t.on=function(e,t,n){var o=this;if("function"!=typeof t)return o;var r=n?"unshift":"push";return e.split(" ").forEach((function(e){o.eventsListeners[e]||(o.eventsListeners[e]=[]),o.eventsListeners[e][r](t)})),o},t.once=function(e,t,n){var o=this;if("function"!=typeof t)return o;function r(){o.off(e,r),r.proxy&&delete r.proxy;for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];t.apply(o,a)}return r.proxy=t,o.on(e,r,n)},t.off=function(e,t){var n=this;return n.eventsListeners?(e.split(" ").forEach((function(e){void 0===t?n.eventsListeners[e]=[]:n.eventsListeners[e]&&n.eventsListeners[e].forEach((function(o,r){(o===t||o.proxy&&o.proxy===t)&&n.eventsListeners[e].splice(r,1)}))})),n):n},t.emit=function(){var e,t,n,o,r=this;if(!r.eventsListeners)return r;for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];"string"==typeof i[0]||Array.isArray(i[0])?(e=i[0],t=i.slice(1,i.length),n=r,o=r.eventsParents):(e=i[0].events,t=i[0].data,n=i[0].context||r,o=i[0].local?[]:i[0].parents||r.eventsParents);var c=Array.isArray(e)?e:e.split(" "),u=c.map((function(e){return e.replace("local::","")})),l=c.filter((function(e){return e.indexOf("local::")<0}));return u.forEach((function(e){if(r.eventsListeners&&r.eventsListeners[e]){var o=[];r.eventsListeners[e].forEach((function(e){o.push(e)})),o.forEach((function(e){e.apply(n,t)}))}})),o&&o.length>0&&o.forEach((function(e){e.emit.apply(e,[l].concat(t))})),r},e}(),f=function(e){function t(t,n){return void 0===t&&(t={}),void 0===n&&(n=[]),e.call(this,t,n)||this}r(t,e);var n=t.prototype;return n.useModuleParams=function(e,t){if(e.params){var n={};Object.keys(e.params).forEach((function(e){void 0!==t[e]&&(n[e]=$.extend({},t[e]))})),$.extend(t,e.params),Object.keys(n).forEach((function(e){$.extend(t[e],n[e])}))}},n.useModulesParams=function(e){var t=this;t.modules&&Object.keys(t.modules).forEach((function(n){var o=t.modules[n];o.params&&$.extend(e,o.params)}))},n.useModule=function(e,t){void 0===e&&(e=""),void 0===t&&(t={});var n=this;if(n.modules){var o="string"==typeof e?n.modules[e]:e;o&&(o.instance&&Object.keys(o.instance).forEach((function(e){var t=o.instance[e];n[e]="function"==typeof t?t.bind(n):t})),o.on&&n.on&&Object.keys(o.on).forEach((function(e){n.on(e,o.on[e])})),o.vnode&&(n.vnodeHooks||(n.vnodeHooks={}),Object.keys(o.vnode).forEach((function(e){Object.keys(o.vnode[e]).forEach((function(t){var r=o.vnode[e][t];n.vnodeHooks[t]||(n.vnodeHooks[t]={}),n.vnodeHooks[t][e]||(n.vnodeHooks[t][e]=[]),n.vnodeHooks[t][e].push(r.bind(n))}))}))),o.create&&o.create.bind(n)(t))}},n.useModules=function(e){void 0===e&&(e={});var t=this;t.modules&&Object.keys(t.modules).forEach((function(n){var o=e[n]||{};t.useModule(n,o)}))},t.installModule=function(e){var t=this;t.prototype.modules||(t.prototype.modules={});var n=e.name||Object.keys(t.prototype.modules).length+"_"+$.now();if(t.prototype.modules[n]=e,e.proto&&Object.keys(e.proto).forEach((function(n){t.prototype[n]=e.proto[n]})),e.static&&Object.keys(e.static).forEach((function(n){t[n]=e.static[n]})),e.install){for(var o=arguments.length,r=new Array(o>1?o-1:0),a=1;a<o;a++)r[a-1]=arguments[a];e.install.apply(t,r)}return t},t.use=function(e){var t=this;if(Array.isArray(e))return e.forEach((function(e){return t.installModule(e)})),t;for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return t.installModule.apply(t,[e].concat(o))},o(t,null,[{key:"components",set:function(e){this.use&&this.use(e)}}]),t}(d);function p(e){void 0===e&&(e={});var t=e,n=t.defaultSelector,o=t.constructor,r=t.domProp,a=t.app,i=t.addMethods,c={create:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(o,a?[a].concat(t):t)},get:function(e){if(void 0===e&&(e=n),e instanceof o)return e;var t=$(e);return 0!==t.length?t[0][r]:void 0},destroy:function(e){var t=c.get(e);if(t&&t.destroy)return t.destroy()}};return i&&Array.isArray(i)&&i.forEach((function(e){c[e]=function(t){void 0===t&&(t=n);for(var o=c.get(t),r=arguments.length,a=new Array(r>1?r-1:0),i=1;i<r;i++)a[i-1]=arguments[i];if(o&&o[e])return o[e].apply(o,a)}})),c}function m(e){void 0===e&&(e={});var t=e,n=t.defaultSelector,o=t.constructor,r=t.app;return $.extend(p({defaultSelector:n,constructor:o,app:r,domProp:"f7Modal"}),{open:function(e,t){var n=$(e),a=n[0].f7Modal;return a||(a=new o(r,{el:n})),a.open(t)},close:function(e,t){void 0===e&&(e=n);var a=$(e);if(0!==a.length){var i=a[0].f7Modal;return i||(i=new o(r,{el:a})),i.close(t)}}})}var h=[];function v(e){var t=this;return new Promise((function(n,o){var r,a,i,s=t.instance;if(e){if("string"==typeof e){var c=e.match(/([a-z0-9-]*)/i);if(e.indexOf(".")<0&&c&&c[0].length===e.length){if(!s||s&&!s.params.lazyModulesPath)return void o(new Error('Wia: "lazyModulesPath" app parameter must be specified to fetch module by name'));r=s.params.lazyModulesPath+"/"+e+".js"}else r=e}else"function"==typeof e?i=e:a=e;if(i){var u=i(t,!1);if(!u)return void o(new Error("Wia: Can't find Wia component in specified component function"));if(t.prototype.modules&&t.prototype.modules[u.name])return void n();p(u),n()}if(a){var l=a;if(!l)return void o(new Error("Wia: Can't find Wia component in specified component"));if(t.prototype.modules&&t.prototype.modules[l.name])return void n();p(l),n()}if(r){if(h.indexOf(r)>=0)return void n();h.push(r);var d=new Promise((function(e,n){t.request.get(r,(function(o){var a="wia_component_loader_callback_"+$.id(),i=document.createElement("script");i.innerHTML="window."+a+" = function (Wia, WiaAutoInstallComponent) {return "+o.trim()+"}",$("head").append(i);var s=window[a];delete window[a],$(i).remove();var c=s(t,!1);c?(t.prototype.modules&&t.prototype.modules[c.name]||p(c),e()):n(new Error("Wia: Can't find Wia component in "+r+" file"))}),(function(e,t){n(e,t)}))})),f=new Promise((function(e){t.request.get(r.replace(".js",s.rtl?".rtl.css":".css"),(function(t){var n=document.createElement("style");n.innerHTML=t,$("head").append(n),e()}),(function(){e()}))}));Promise.all([d,f]).then((function(){n()})).catch((function(e){o(e)}))}}else o(new Error("Wia: Lazy module must be specified"));function p(e){t.use(e),s&&(s.useModuleParams(e,s.params),s.useModule(e))}}))}var y={name:"resize",instance:{getSize:function(){var e=this;if(!e.root[0])return{width:0,height:0,left:0,top:0};var t=e.root.offset(),n=[e.root[0].offsetWidth,e.root[0].offsetHeight,t.left,t.top],o=n[0],r=n[1],a=n[2],i=n[3];return e.width=o,e.height=r,e.left=a,e.top=i,{width:o,height:r,left:a,top:i}}},on:{init:function(){var e=this;e.getSize(),window.addEventListener("resize",(function(){e.emit("resize")}),!1),window.addEventListener("orientationchange",(function(){e.emit("orientationchange")}))},orientationchange:function(){this.device.ipad&&(document.body.scrollLeft=0,setTimeout((function(){document.body.scrollLeft=0}),0))},resize:function(){this.getSize()}}};function g(e){var t,n,o;t=function(t){e.emit({events:"click",data:[t]})},$.support.touch?(document.addEventListener("touchstart",(function(e){n=e.changedTouches[0].clientX,o=e.changedTouches[0].clientY}),!0),document.addEventListener("touchend",(function(e){var r=Math.abs(e.changedTouches[0].clientX-n),a=Math.abs(e.changedTouches[0].clientY-o);r<=5&&a<=5&&t.call(this,e)}),!0)):document.addEventListener("click",t,!0),e.on("click",(function(t){var n=$(t.target),o=n.closest("a");o.length>0&&o.attr("href"),Object.keys(e.modules).forEach((function(o){var r=e.modules[o].clicks;r&&(t.preventF7Router||Object.keys(r).forEach((function(o){var a=n.closest(o).eq(0);a.length>0&&r[o].call(e,a,a.dataset(),t)})))}))}))}var w={name:"clicks",params:{clicks:{externalLinks:".ext"}},on:{init:function(){g(this)}}},b={registrations:[],register:function(e,t){var n=this;return"serviceWorker"in window.navigator&&n.serviceWorker.container?new Promise((function(o,r){n.serviceWorker.container.register(e,t?{scope:t}:{}).then((function(e){b.registrations.push(e),n.emit("serviceWorkerRegisterSuccess",e),o(e)})).catch((function(e){n.emit("serviceWorkerRegisterError",e),r(e)}))})):new Promise((function(e,t){t(new Error("Service worker is not supported"))}))},unregister:function(e){var t,n=this;return"serviceWorker"in window.navigator&&n.serviceWorker.container?(t=e?Array.isArray(e)?e:[e]:b.registrations,Promise.all(t.map((function(e){return new Promise((function(t,o){e.unregister().then((function(){b.registrations.indexOf(e)>=0&&b.registrations.splice(b.registrations.indexOf(e),1),n.emit("serviceWorkerUnregisterSuccess",e),t()})).catch((function(t){n.emit("serviceWorkerUnregisterError",e,t),o(t)}))}))})))):new Promise((function(e,t){t(new Error("Service worker is not supported"))}))}},k={name:"sw",params:{serviceWorker:{path:void 0,scope:void 0}},create:function(){var e=this;$.extend(e,{serviceWorker:{container:"serviceWorker"in window.navigator?window.navigator.serviceWorker:void 0,registrations:b.registrations,register:b.register.bind(e),unregister:b.unregister.bind(e)}})},on:{init:function(){if("serviceWorker"in window.navigator){var e=this;if(e.serviceWorker.container){var t=e.params.serviceWorker.path,n=e.params.serviceWorker.scope;!t||Array.isArray(t)&&!t.length||(Array.isArray(t)?t:[t]).forEach((function(t){e.serviceWorker.register(t,n)}))}}}}},C=$.support,x=$.device,E=function(e){function t(t){var n;n=e.call(this,t)||this;var o=$.extend({},t),r=c(n);r.device=x,r.support=C;var a={version:"0.0.1",root:"body",theme:"auto",language:window.navigator.language,routes:[],lazyModulesPath:null,initOnDeviceReady:!0,autoDarkTheme:!1,iosTranslucentBars:!0,iosTranslucentModals:!0,component:void 0,componentUrl:void 0};r.useModulesParams(a),r.params=$.extend(a,t);var i=$(r.params.root);$.extend(r,{owner:r.params.owner,name:r.params.name,id:r.params.owner+"."+r.params.name,version:r.params.version,routes:r.params.routes,language:r.params.language,root:i,$el:i,cfg:r.params.cfg,api:r.params.api,rtl:"rtl"===i.css("direction"),theme:"auto"===r.params.theme?x.ios?"ios":x.desktop?"aurora":"md":r.params.theme,passedParams:o,online:window.navigator.onLine}),r.root&&r.root[0]&&(r.root[0].wia=r),r.touchEvents={start:C.touch?"touchstart":C.pointerEvents?"pointerdown":"mousedown",move:C.touch?"touchmove":C.pointerEvents?"pointermove":"mousemove",end:C.touch?"touchend":C.pointerEvents?"pointerup":"mouseup"},r.useModules(),r.initData();var s="(prefers-color-scheme: dark)",u="(prefers-color-scheme: light)";return r.mq={},window.matchMedia&&(r.mq.dark=window.matchMedia(s),r.mq.light=window.matchMedia(u)),r.colorSchemeListener=function(e){var t=e.matches,n=e.media;if(t){var o=document.querySelector("html");n===s?o.classList.add("theme-dark"):n===u&&o.classList.remove("theme-dark")}},r.params.init&&(x.cordova&&r.params.initOnDeviceReady?$(document).on("deviceready",(function(){r.init()})):r.init()),r||c(n)}r(t,e);var n=t.prototype;return n.load=function(e){this.emit("local::load appLoad",e)},n.show=function(e,t){this.emit("local::show appShow",e,t)},n.hide=function(){this.emit("local::hide appHide")},n.unload=function(){this.emit("local::unload appUnload")},n.initData=function(){var e=this;e.data={},e.params.data&&"function"==typeof e.params.data?$.extend(e.data,e.params.data.bind(e)()):e.params.data&&$.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]}))},n.enableAutoDarkTheme=function(){if(window.matchMedia){var e=this,t=document.querySelector("html");e.mq.dark&&e.mq.light&&(e.mq.dark.addListener(e.colorSchemeListener),e.mq.light.addListener(e.colorSchemeListener)),e.mq.dark&&e.mq.dark.matches?t.classList.add("theme-dark"):e.mq.light&&e.mq.light.matches&&t.classList.remove("theme-dark")}},n.disableAutoDarkTheme=function(){if(window.matchMedia){var e=this;e.mq.dark&&e.mq.dark.removeListener(e.colorSchemeListener),e.mq.light&&e.mq.light.removeListener(e.colorSchemeListener)}},n.init=function(){var e,n,o,r=this;return r.initialized||($.App=t,x.ios&&x.webView&&window.addEventListener("touchstart",(function(){})),r.root.addClass("framework7-initializing"),r.rtl&&$("html").attr("dir","rtl"),r.params.autoDarkTheme&&r.enableAutoDarkTheme(),window.addEventListener("offline",(function(){r.online=!1,r.emit("offline"),r.emit("connection",!1)})),window.addEventListener("online",(function(){r.online=!0,r.emit("online"),r.emit("connection",!0)})),r.root.addClass("framework7-root"),$("html").removeClass("ios md aurora").addClass(r.theme),r.params.iosTranslucentBars&&"ios"===r.theme&&x.ios&&$("html").addClass("ios-translucent-bars"),r.params.iosTranslucentModals&&"ios"===r.theme&&x.ios&&$("html").addClass("ios-translucent-modals"),$.nextFrame((function(){r.root.removeClass("framework7-initializing")})),e=[],n=document.querySelector("html"),o=document.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]'),n&&(x.standalone&&x.ios&&o&&"black-translucent"===o.content&&e.push("device-full-viewport"),e.push("device-pixel-ratio-"+Math.floor(x.pixelRatio)),x.os&&!x.desktop?e.push("device-"+x.os):x.desktop&&(e.push("device-desktop"),x.os&&e.push("device-"+x.os)),(x.cordova||x.phonegap)&&e.push("device-cordova"),e.forEach((function(e){n.classList.add(e)}))),r.initialized=!0,r.emit("init")),r},n.loadModule=function(e){t.loadModule(e),this[e.name].init&&this[e.name].init()},n.loadModules=function(){return t.loadModules.apply(t,arguments)},n.getVnodeHooks=function(e,t){var n=this;return n.vnodeHooks&&n.vnodeHooks[e]&&n.vnodeHooks[e][t]||[]},o(t,[{key:"$",get:function(){return $}}],[{key:"Dom",get:function(){return $}},{key:"$",get:function(){return $}},{key:"Module",get:function(){return f}},{key:"Event",get:function(){return d}}]),t}(f);E.apps={},E.ModalMethods=m,E.ConstructorMethods=p,E.loadModule=v,E.loadModules=function(e){return Promise.all(e.map((function(e){return E.loadModule(e)})))},E.support=C,E.device=x,E.utils=l,E.use([y,w,k]);var M,L,O,A,j={normal:"nor",retina:"ret",srcset:"set",threshold:0},T=window.innerHeight,P=S(),q=document.body.classList.contains("srcset")||"srcset"in document.createElement("img"),H=window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI,R=function(){function e(e){M=$.assign({},j,e)}var t=e.prototype;return t.start=function(e){return["scroll","resize"].forEach((function(t){return e.addEventListener(t,W)})),A=e,this},t.stop=function(){return["scroll","resize"].forEach((function(e){return A.removeEventListener(e,W)})),this},t.update=function(){setTimeout((function(){_(),D()}),1)},e}();function S(){return window.scrollY||window.pageYOffset}function W(){P=S(),L||(window.requestAnimationFrame((function(){return D()})),L=!0)}function z(e){var t=P,n=t+T,o=function(e){return e.getBoundingClientRect().top+P}(e),r=o+e.offsetHeight,a=M.threshold/100*T;return r>=t-a&&o<=n+a}function D(){if(O)return T=window.innerHeight,O.forEach((function(e){return z(e)&&function(e){if($.emit("lazy:src:before",e),q&&e.hasAttribute(M.srcset))e.setAttribute("srcset",e.getAttribute(M.srcset));else{var t=H>1&&e.getAttribute(M.retina)||e.getAttribute(M.normal);e.setAttribute("src",t),console.log("set src:"+t)}$.emit("lazy:src:after",e),[M.normal,M.retina,M.srcset].forEach((function(t){return e.removeAttribute(t)})),_()}(e)})),L=!1,this}function _(e){return O=e?Array.prototype.slice.call(e.querySelectorAll("["+M.normal+"]")):Array.prototype.slice.call(document.querySelectorAll("["+M.normal+"]")),this}var B=function(e){function t(t,n,o,r){var a;return(a=e.call(this,null,[t])||this).app=t,a.cfg=t.cfg,a.name=n,a.title=o,a.style=r||"./page/"+n+".css",a.path=""+n,a.view=null,a.el=null,a.$el=null,a.html="",a.css="",a.js="",a.data={},a.param={},a}r(t,e);var n=t.prototype;return n.load=function(e){this.emit("local::load pageLoad",e)},n.ready=function(e,t,n){this.init(),this.emit("local::ready pageReady",e,t,n)},n.init=function(e){var t=this.view,n=(e=e?$(e):t).qus("[name]");null==n||n.forEach((function(e){var n=$(e),o=n.attr("name");t[o]&&t[o].dom===e||(t[o]=n)})),e.qus("[name$=-tp]").hide(),e.qus('a[href=""]').attr("href","javascript:;")},n.show=function(e,t){e.qus("[name$=-tp]").hide(),e.qus('a[href=""]').attr("href","javascript:;"),this.reset&&this.reset(),this.emit("local::show pageShow",e,t)},n.back=function(e,t){e.qus("[name$=-tp]").hide(),e.qus('a[href=""]').attr("href","javascript:;"),this.emit("local::back pageBack",e,t)},n.hide=function(e){this.emit("local::hide pageHide",e)},t}(d),F=[],U=[],I=function(e){function t(t,n){var o,r=c(o=e.call(this,n,[t])||this);return r.params=l.extend({},n),r.opened=!1,c(o)||c(o)}r(t,e);var n=t.prototype;return n.onOpen=function(){var e=this;e.opened=!0,F.push(e),$("html").addClass("with-modal-"+e.type.toLowerCase()),e.$el.trigger("modal:open "+e.type.toLowerCase()+":open"),e.emit("local::open modalOpen "+e.type+"Open",e)},n.onOpened=function(){var e=this;e.$el.trigger("modal:opened "+e.type.toLowerCase()+":opened"),e.emit("local::opened modalOpened "+e.type+"Opened",e)},n.onClose=function(){var e=this;e.opened=!1,e.type&&e.$el&&(F.splice(F.indexOf(e),1),$("html").removeClass("with-modal-"+e.type.toLowerCase()),e.$el.trigger("modal:close "+e.type.toLowerCase()+":close"),e.emit("local::close modalClose "+e.type+"Close",e))},n.onClosed=function(){var e=this;e.type&&e.$el&&(e.$el.removeClass("modal-out"),e.$el.hide(),e.$el.trigger("modal:closed "+e.type.toLowerCase()+":closed"),e.emit("local::closed modalClosed "+e.type+"Closed",e))},n.open=function(e){var t,n=this,o=n.app,r=n.$el,a=n.type,i=n.$backdropEl,s=n.params.moveToRoot,c=!0;if(void 0!==e?c=e:void 0!==n.params.animate&&(c=n.params.animate),!r||r.hasClass("modal-in"))return n;if("dialog"===a&&o.params.modal.queueDialogs&&($(".dialog.modal-in").length>0?t=!0:F.length>0&&F.forEach((function(e){"dialog"===e.type&&(t=!0)})),t))return U.push(n),n;var u=r.parent(),l=r.parents(document).length>0;function d(){r.hasClass("modal-out")?n.onClosed():r.hasClass("modal-in")&&n.onOpened()}return s&&o.params.modal.moveToRoot&&!u.is(o.root)&&(o.root.append(r),n.once(a+"Closed",(function(){l?u.append(r):r.remove()}))),r.show(),n._clientLeft=r[0].clientLeft,c?(i&&(i.removeClass("not-animated"),i.addClass("backdrop-in")),r.animationEnd((function(){d()})),r.transitionEnd((function(){d()})),r.removeClass("modal-out not-animated").addClass("modal-in"),n.onOpen()):(i&&i.addClass("backdrop-in not-animated"),r.removeClass("modal-out").addClass("modal-in not-animated"),n.onOpen(),n.onOpened()),n},n.close=function(e){var t=this,n=t.$el,o=t.$backdropEl,r=!0;if(void 0!==e?r=e:void 0!==t.params.animate&&(r=t.params.animate),!n||!n.hasClass("modal-in"))return U.indexOf(t)>=0&&U.splice(U.indexOf(t),1),t;if(o){var a=!0;"popup"===t.type&&t.$el.prevAll(".popup.modal-in").each((function(e,n){var o=n.f7Modal;o&&o.params.closeByBackdropClick&&o.params.backdrop&&o.backdropEl===t.backdropEl&&(a=!1)})),a&&(o[r?"removeClass":"addClass"]("not-animated"),o.removeClass("backdrop-in"))}function i(){n.hasClass("modal-out")?t.onClosed():n.hasClass("modal-in")&&t.onOpened()}return n[r?"removeClass":"addClass"]("not-animated"),r?(n.animationEnd((function(){i()})),n.transitionEnd((function(){i()})),n.removeClass("modal-in").addClass("modal-out"),t.onClose()):(n.addClass("not-animated").removeClass("modal-in").addClass("modal-out"),t.onClose(),t.onClosed()),"dialog"===t.type&&0!==U.length&&U.shift().open(),t},n.destroy=function(){var e=this;e.destroyed||(e.emit("local::beforeDestroy modalBeforeDestroy "+e.type+"BeforeDestroy",e),e.$el&&(e.$el.trigger("modal:beforedestroy "+e.type.toLowerCase()+":beforedestroy"),e.$el.length&&e.$el[0].f7Modal&&delete e.$el[0].f7Modal),l.deleteProps(e),e.destroyed=!0)},t}(d),X=$.support,N=$.device;e.Ajax=t,e.App=E,e.Constructors=p,e.Device=N,e.Event=d,e.Lazy=R,e.Modal=I,e.Modals=m,e.Module=f,e.Page=B,e.Resize=y,e.SW=k,e.Support=X,e.Utils=l,e.jsx=function(e,t){for(var n=t||{},o=arguments.length,r=new Array(o>2?o-2:0),a=2;a<o;a++)r[a-2]=arguments[a];var i=r||[],s=Object.keys(n).map((function(e){return"_"===e[0]?n[e]?e.replace("_",""):"":e+'="'+n[e]+'"'})).filter((function(e){return!!e})).join(" ");if(["path","img","circle","polygon","line","input"].indexOf(e)>=0)return("<"+e+" "+s+" />").trim();var c=i.filter((function(e){return!!e})).map((function(e){return Array.isArray(e)?e.join(""):e})).join("");return("<"+e+" "+s+">"+c+"</"+e+">").trim()},e.loadModule=v,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@wiajs/Core"]={});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wiajs/core",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "description": "wia app core package. Part of the code is borrowed Framework7.",
5
5
  "main": "index.js",
6
6
  "types": "dist/core.d.ts",
package/util/tool.js CHANGED
@@ -130,29 +130,36 @@ function newFileName(len) {
130
130
 
131
131
  /**
132
132
  * 比较方法,用于对象数组排序,常用于数据表排序
133
- * @param {*} p 属性
133
+ * @param {*} k 对象属性key
134
134
  * @param {*} asc 升序、降序,默认升序
135
+ * @param {*} type 类型auto, number、datetime、string,缺省 auto
135
136
  */
136
- function compareObj(p, desc) {
137
+ function compareObj(k, desc, type) {
137
138
  return function (o1, o2) {
138
139
  let R = 0;
139
- let v1 = o1[p];
140
- let v2 = o2[p];
140
+ let v1 = o1[k];
141
+ let v2 = o2[k];
141
142
  // 数字、日期字符串,按数字、日期排序
142
143
  if ($.isStr(v1) || $.isStr(v2)) {
143
- if ($.isDateStr(v1) && $.isDateStr(v2)) {
144
- v1 = Date.parse(v1);
145
- v2 = Date.parse(v2);
146
- } else if ($.isNumStr(v1) && $.isNumStr(v2)) {
147
- v1 = Number(v1);
148
- v2 = Number(v2);
149
- }
150
- }
144
+ // 金额可能有千字分隔符,需替换
145
+ if (type.toLowerCase() === 'number') {
146
+ v1 = v1.replace(',', '');
147
+ v2 = v2.replace(',', '');
148
+ }
149
+
150
+ if ($.isDateStr(v1) && $.isDateStr(v2)) {
151
+ v1 = Date.parse(v1);
152
+ v2 = Date.parse(v2);
153
+ } else if ($.isNumStr(v1) && $.isNumStr(v2)) {
154
+ v1 = Number(v1);
155
+ v2 = Number(v2);
156
+ }
157
+ }
151
158
 
152
159
  if (v1 < v2) {
153
- R = desc ? 1: -1;
160
+ R = desc ? 1 : -1;
154
161
  } else if (v1 > v2) {
155
- R = desc ? -1: 1;
162
+ R = desc ? -1 : 1;
156
163
  }
157
164
 
158
165
  return R;