iris-messenger/dist/sw-esm.js
2021-08-04 14:48:39 +03:00

2 lines
121 KiB
JavaScript

!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(e){return t[e]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s="9/Ks")}({"2Gk3":function(){"use strict";try{self["workbox:cacheable-response:6.1.5"]&&_()}catch(t){}},"5IsQ":function(t){function e(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function r(t){if(c===setTimeout)return setTimeout(t,0);if((c===e||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function o(){d&&l&&(d=!1,l.length?h=l.concat(h):p=-1,h.length&&i())}function i(){if(!d){var t=r(o);d=!0;for(var e=h.length;e;){for(l=h,h=[];++p<e;)l&&l[p].run();p=-1,e=h.length}l=null,d=!1,function(t){if(s===clearTimeout)return clearTimeout(t);if((s===n||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(t);try{s(t)}catch(e){try{return s.call(null,t)}catch(e){return s.call(this,t)}}}(t)}}function a(t,e){this.fun=t,this.array=e}function u(){}var c,s,f=t.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:e}catch(t){c=e}try{s="function"==typeof clearTimeout?clearTimeout:n}catch(t){s=n}}();var l,h=[],d=!1,p=-1;f.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];h.push(new a(t,e)),1!==h.length||d||r(i)},a.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.prependListener=u,f.prependOnceListener=u,f.listeners=function(){return[]},f.binding=function(){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},"9/Ks":function(t,e,n){"use strict";function r(t){var e="function"==typeof Map?new Map:void 0;return(r=function(t){function n(){return o(t,arguments,u(this).constructor)}if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),a(n,t)})(t)}function o(){return(o=i()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&a(o,n.prototype),o}).apply(null,arguments)}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(t){return!1}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function l(){return(l=h()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&d(o,n.prototype),o}).apply(null,arguments)}function h(){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(t){return!1}}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function v(t,e,n){var r;if("string"==typeof t){var o=new URL(t,location.href);r=new ht((function(t){return t.url.href===o.href}),e,n)}else if(t instanceof RegExp)r=new dt(t,e,n);else if("function"==typeof t)r=new ht(t,e,n);else{if(!(t instanceof ht))throw new ft("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});r=t}return yt().registerRoute(r),r}function y(t,e){var n=e();return t.waitUntil(n),n}function m(t){if(!t)throw new ft("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){var e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}var n=t.revision,r=t.url;if(!r)throw new ft("add-to-cache-list-unexpected-type",{entry:t});if(!n){var o=new URL(r,location.href);return{cacheKey:o.href,url:o.href}}var i=new URL(r,location.href),a=new URL(r,location.href);return i.searchParams.set("__WB_REVISION__",n),{cacheKey:i.href,url:a.href}}function g(t,e){return new Promise((function(n,r){var o,i,a,u;return o=null,t.url&&(o=new URL(t.url).origin),o!==self.location.origin?r(new ft("cross-origin-copy-response",{origin:o})):(i=t.clone(),a={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},u=e?e(a):a,Promise.resolve(new Promise((function(t,e){return function(){if(void 0===ot){var t=new Response("");if("body"in t)try{new Response(t.body),ot=!0}catch(t){ot=!1}ot=!1}return ot}()?t(i.body):Promise.resolve(i.blob()).then(t,e)}))).then((function(t){try{return n(new Response(t,u))}catch(t){return r(t)}}),r))}))}function b(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function w(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?b(Object(n),!0).forEach((function(e){_(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function _(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function k(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return j(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function j(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function S(t,e){for(var n,r=new URL(t),o=k(e);!(n=o()).done;){r.searchParams.delete(n.value)}return r.href}function x(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return P(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function P(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function O(t){return new Promise((function(e){return setTimeout(e,t)}))}function T(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function I(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?T(Object(n),!0).forEach((function(e){A(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function A(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function R(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return E(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function D(){return(D=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function N(t){return"string"==typeof t?new Request(t):t}function C(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return $(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function $(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function U(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return M(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function M(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function L(t,e){return(L=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function q(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function B(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function K(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return F(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return F(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function F(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function G(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function W(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return H(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return H(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function H(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function J(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return z(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function z(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Q(t,e){return(Q=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function X(t){return Dt().getCacheKeyForURL(t)}function V(t,e){!function(t){Dt().precache(t)}(t),function(t){var e=Dt();v(new Nt(e,t))}(e)}function Y(t,e){return(Y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Z(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return tt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tt(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function tt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function et(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function nt(t){return new Promise((function(e){t.waitUntil(clients.matchAll({type:"window",includeUncontrolled:!0}).then((function(t){for(var n=0;n<t.length;n++){var r=t[n];if(r.url===zt&&"focus"in r)return e(r)}e(null)})))}))}n.r(e);var rt,ot,it=n("GLQ6"),at=n.n(it),ut=n("XgYJ"),ct=n.n(ut),st=(n("xgXd"),function(t){for(var e=t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.length>0&&(e+=" :: "+JSON.stringify(r)),e}),ft=function(t){function e(e,n){var r,o=st(e,n);return(r=t.call(this,o)||this).name=e,r.details=n,r}var n,r;return r=t,(n=e).prototype=Object.create(r.prototype),n.prototype.constructor=n,a(n,r),e}(r(Error)),lt=(n("I3Xu"),function(t){return t&&"object"==typeof t?t:{handle:t}}),ht=function(){function t(t,e,n){void 0===n&&(n="GET"),this.handler=lt(e),this.match=t,this.method=n}return t.prototype.setCatchHandler=function(t){this.catchHandler=lt(t)},t}(),dt=function(t){function e(e,n,r){return t.call(this,(function(t){var n=t.url,r=e.exec(n.href);if(r&&(n.origin===location.origin||0===r.index))return r.slice(1)}),n,r)||this}var n,r;return r=t,(n=e).prototype=Object.create(r.prototype),n.prototype.constructor=n,c(n,r),e}(ht),pt=function(t){return new URL(String(t),location.href).href.replace(new RegExp("^"+location.origin),"")},vt=function(){function t(){this._routes=new Map,this._defaultHandlerMap=new Map}var e,n,r,o=t.prototype;return o.addFetchListener=function(){var t=this;self.addEventListener("fetch",(function(e){var n=t.handleRequest({request:e.request,event:e});n&&e.respondWith(n)}))},o.addCacheListener=function(){var t=this;self.addEventListener("message",(function(e){if(e.data&&"CACHE_URLS"===e.data.type){0;var n=Promise.all(e.data.payload.urlsToCache.map((function(n){"string"==typeof n&&(n=[n]);var r=l(Request,n);return t.handleRequest({request:r,event:e})})));e.waitUntil(n),e.ports&&e.ports[0]&&n.then((function(){return e.ports[0].postMessage(!0)}))}}))},o.handleRequest=function(t){var e=this,n=t.request,r=t.event;var o=new URL(n.url,location.href);if(o.protocol.startsWith("http")){var i=o.origin===location.origin,a=this.findMatchingRoute({event:r,request:n,sameOrigin:i,url:o}),u=a.params,c=a.route,s=c&&c.handler;0;var f=n.method;if(!s&&this._defaultHandlerMap.has(f)&&(s=this._defaultHandlerMap.get(f)),s){var l;0;try{l=s.handle({url:o,request:n,event:r,params:u})}catch(t){l=Promise.reject(t)}var h=c&&c.catchHandler;return l instanceof Promise&&(this._catchHandler||h)&&(l=l.catch((function(t){return new Promise((function(i,a){function c(){return e._catchHandler?i(e._catchHandler.handle({url:o,request:n,event:r})):a(t)}if(h){0;var s=function(){try{return c.call(this)}catch(t){return a(t)}}.bind(this),f=function(e){try{return t=e,s()}catch(t){return a(t)}};try{return Promise.resolve(h.handle({url:o,request:n,event:r,params:u})).then(i,f)}catch(t){f(t)}}return c.call(this)}))}))),l}}},o.findMatchingRoute=function(t){for(var e,n=t.url,r=t.sameOrigin,o=t.request,i=t.event,a=s(this._routes.get(o.method)||[]);!(e=a()).done;){var u=e.value,c=void 0,f=u.match({url:n,sameOrigin:r,request:o,event:i});if(f)return c=f,(Array.isArray(f)&&0===f.length||f.constructor===Object&&0===Object.keys(f).length||"boolean"==typeof f)&&(c=void 0),{route:u,params:c}}return{}},o.setDefaultHandler=function(t,e){void 0===e&&(e="GET"),this._defaultHandlerMap.set(e,lt(t))},o.setCatchHandler=function(t){this._catchHandler=lt(t)},o.registerRoute=function(t){this._routes.has(t.method)||this._routes.set(t.method,[]),this._routes.get(t.method).push(t)},o.unregisterRoute=function(t){if(!this._routes.has(t.method))throw new ft("unregister-route-but-not-found-with-method",{method:t.method});var e=this._routes.get(t.method).indexOf(t);if(!(e>-1))throw new ft("unregister-route-route-not-registered");this._routes.get(t.method).splice(e,1)},e=t,(n=[{key:"routes",get:function(){return this._routes}}])&&p(e.prototype,n),r&&p(e,r),t}(),yt=function(){return rt||((rt=new vt).addFetchListener(),rt.addCacheListener()),rt},mt={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},gt=function(t){return[mt.prefix,t,mt.suffix].filter((function(t){return t&&t.length>0})).join("-")},bt=function(t){return t||gt(mt.googleAnalytics)},wt=function(t){return t||gt(mt.precache)},_t=function(){return mt.prefix},kt=function(t){return t||gt(mt.runtime)},jt=function(){return mt.suffix},St=(n("Gpc1"),function(){var t=this;this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=function(t){return new Promise((function(e){var n=t.state;return n&&(n.originalRequest=t.request),e()}))},this.cachedResponseWillBeUsed=function(e){return new Promise((function(n){var r=e.cachedResponse;if("install"===e.event.type){var o=e.state.originalRequest.url;r?t.notUpdatedURLs.push(o):t.updatedURLs.push(o)}return n(r)}))}}),xt=function(t){var e=this,n=t.precacheController;this.cacheKeyWillBeUsed=function(t){return new Promise((function(n){var r=t.request,o=t.params,i=o&&o.cacheKey||e._precacheController.getCacheKeyForURL(r.url);return n(i?new Request(i):r)}))},this._precacheController=n},Pt=function(){var t=this;this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))},Ot=new Set,Tt=(n("myed"),function(){function t(t,e){this._cacheKeys={},D(this,e),this.event=e.event,this._strategy=t,this._handlerDeferred=new Pt,this._extendLifetimePromises=[],this._plugins=[].concat(t.plugins),this._pluginStateMap=new Map;for(var n,r=R(this._plugins);!(n=r()).done;){this._pluginStateMap.set(n.value,{})}this.event.waitUntil(this._handlerDeferred.promise)}var e=t.prototype;return e.fetch=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){return new Promise(function(e,n){function r(){u=this.hasCallback("fetchDidFail")?i.clone():null;var t=function(){try{f=i.clone();var t=function(t){try{if(u)return Promise.resolve(this.runCallbacks("fetchDidFail",{error:t,event:o,originalRequest:u.clone(),request:f.clone()})).then(function(){try{return e.call(this)}catch(t){return n(t)}}.bind(this),n);function e(){throw t}return e.call(this)}catch(t){return n(t)}}.bind(this);try{return Promise.resolve(fetch(i,"navigate"===i.mode?void 0:this._strategy.fetchOptions)).then(function(n){try{{var r;function i(){return(d=h()).done?[1]:Promise.resolve((0,d.value)({event:o,request:f,response:l})).then((function(e){try{return l=e,i}catch(e){return t(e)}}),t)}return l=n,h=R(this.iterateCallbacks("fetchDidSucceed")),(r=function(e){for(;e;){if(e.then)return void e.then(r,t);try{if(e.pop){if(e.length)return e.pop()?a.call(this):e;e=i}else e=e.call(this)}catch(e){return t(e)}}}.bind(this))(i);function a(){return e(l)}}}catch(e){return t(e)}}.bind(this),t)}catch(e){t(e)}}catch(t){return n(t)}}.bind(this),r=function(t){try{throw new ft("plugin-error-request-will-fetch",{thrownError:t})}catch(t){return n(t)}};try{var a;function e(){return(s=c()).done?[1]:Promise.resolve((0,s.value)({request:i.clone(),event:o})).then((function(t){try{return i=t,e}catch(t){return r(t)}}),r)}return c=R(this.iterateCallbacks("requestWillFetch")),(a=function(t){for(;t;){if(t.then)return void t.then(a,r);try{if(t.pop){if(t.length)return t.pop()?n.call(this):t;t=e}else t=t.call(this)}catch(t){return r(t)}}}.bind(this))(e);function n(){return t()}}catch(t){r(t)}}var o,i,a,u,c,s,f,l,h,d;return o=this.event,"navigate"===(i=N(t)).mode&&o instanceof FetchEvent&&o.preloadResponse?Promise.resolve(o.preloadResponse).then(function(t){try{return(a=t)?e(a):r.call(this)}catch(t){return n(t)}}.bind(this),n):r.call(this)}.bind(this))})),e.fetchAndCachePut=function(t){return new Promise(function(e,n){var r,o;return Promise.resolve(this.fetch(t)).then(function(i){try{return o=(r=i).clone(),this.waitUntil(this.cachePut(t,o)),e(r)}catch(t){return n(t)}}.bind(this),n)}.bind(this))},e.cacheMatch=function(t){return new Promise(function(e,n){var r,o,i,a,u,c,s,f,l;return r=N(t),a=(i=this._strategy).cacheName,u=i.matchOptions,Promise.resolve(this.getCacheKey(r,"read")).then(function(t){try{return c=t,s=I(I({},u),{cacheName:a}),Promise.resolve(caches.match(c,s)).then(function(t){try{{var r;function i(){return(l=f()).done?[1]:Promise.resolve((0,l.value)({cacheName:a,matchOptions:u,cachedResponse:o,request:c,event:this.event})).then((function(t){try{return o=t||void 0,i}catch(t){return n(t)}}),n)}return o=t,f=R(this.iterateCallbacks("cachedResponseWillBeUsed")),(r=function(t){for(;t;){if(t.then)return void t.then(r,n);try{if(t.pop){if(t.length)return t.pop()?s.call(this):t;t=i}else t=t.call(this)}catch(t){return n(t)}}}.bind(this))(i);function s(){return e(o)}}}catch(t){return n(t)}}.bind(this),n)}catch(t){return n(t)}}.bind(this),n)}.bind(this))},e.cachePut=function(t,e){return new Promise(function(n,r){var o,i,a,u,c,s,f,l,h,d,p;return o=N(t),Promise.resolve(O(0)).then(function(){try{return Promise.resolve(this.getCacheKey(o,"write")).then(function(t){try{return i=t,e?Promise.resolve(this._ensureResponseSafeToCache(e)).then(function(t){try{return(a=t)?(c=(u=this._strategy).cacheName,s=u.matchOptions,Promise.resolve(self.caches.open(c)).then(function(t){try{return f=t,l=this.hasCallback("cacheDidUpdate"),Promise.resolve(new Promise((function(t,e){return l?Promise.resolve(function(t,e,n,r){return new Promise((function(o,i){var a,u,c,s,f,l;return a=S(e.url,n),e.url===a?o(t.match(e,r)):(u=w(w({},r),{},{ignoreSearch:!0}),Promise.resolve(t.keys(e,u)).then((function(e){try{for(c=k(e);!(s=c()).done;)if(l=S((f=s.value).url,n),a===l)return o(t.match(f,r));return o()}catch(t){return i(t)}}),i))}))}(f,i.clone(),["__WB_REVISION__"],s)).then(t,e):t(null)}))).then(function(t){try{h=t;var e=function(){try{var t;function e(){return(p=d()).done?[1]:Promise.resolve((0,p.value)({cacheName:c,oldResponse:h,newResponse:a.clone(),request:i,event:this.event})).then((function(){try{return e}catch(t){return r(t)}}),r)}return d=R(this.iterateCallbacks("cacheDidUpdate")),(t=function(n){for(;n;){if(n.then)return void n.then(t,r);try{if(n.pop){if(n.length)return n.pop()?o.call(this):n;n=e}else n=n.call(this)}catch(t){return r(t)}}}.bind(this))(e);function o(){return n(!0)}}catch(t){return r(t)}}.bind(this),o=function(t){try{if("QuotaExceededError"===t.name)return Promise.resolve(new Promise((function(t,e){function n(){return(i=o()).done?[1]:Promise.resolve((0,i.value)()).then((function(){try{return n}catch(t){return e(t)}}),e)}function r(){return t()}var o,i,a;return o=x(Ot),(a=function(t){for(;t;){if(t.then)return void t.then(a,e);try{if(t.pop){if(t.length)return t.pop()?r.call(this):t;t=n}else t=t.call(this)}catch(t){return e(t)}}}.bind(this))(n)}))).then(function(){try{return e.call(this)}catch(t){return r(t)}}.bind(this),r);function e(){throw t}return e.call(this)}catch(t){return r(t)}}.bind(this);try{return Promise.resolve(f.put(i,l?a.clone():a)).then((function(){try{return e()}catch(t){return o(t)}}),o)}catch(t){o(t)}}catch(t){return r(t)}}.bind(this),r)}catch(t){return r(t)}}.bind(this),r)):n(!1)}catch(t){return r(t)}}.bind(this),r):r(new ft("cache-put-with-no-response",{url:pt(i.url)}))}catch(t){return r(t)}}.bind(this),r)}catch(t){return r(t)}}.bind(this),r)}.bind(this))},e.getCacheKey=function(t,e){return new Promise(function(n,r){function o(){return n(this._cacheKeys[e])}var i,a,u;if(!this._cacheKeys[e]){var c;function n(){return(u=a()).done?[1]:Promise.resolve((0,u.value)({mode:e,request:i,event:this.event,params:this.params})).then((function(t){try{return i=N(t),n}catch(t){return r(t)}}),r)}return i=t,a=R(this.iterateCallbacks("cacheKeyWillBeUsed")),(c=function(t){for(;t;){if(t.then)return void t.then(c,r);try{if(t.pop){if(t.length)return t.pop()?s.call(this):t;t=n}else t=t.call(this)}catch(t){return r(t)}}}.bind(this))(n);function s(){return this._cacheKeys[e]=i,o.call(this)}}return o.call(this)}.bind(this))},e.hasCallback=function(t){for(var e,n=R(this._strategy.plugins);!(e=n()).done;){if(t in e.value)return!0}return!1},e.runCallbacks=function(t,e){return new Promise(function(n,r){function o(){return(u=a()).done?[1]:Promise.resolve((0,u.value)(e)).then((function(){try{return o}catch(t){return r(t)}}),r)}function i(){return n()}var a,u,c;return a=R(this.iterateCallbacks(t)),(c=function(t){for(;t;){if(t.then)return void t.then(c,r);try{if(t.pop){if(t.length)return t.pop()?i.call(this):t;t=o}else t=t.call(this)}catch(t){return r(t)}}}.bind(this))(o)}.bind(this))},e.iterateCallbacks=function*(t){for(var e,n=this,r=function*(){var r=e.value;if("function"==typeof r[t]){var o=n._pluginStateMap.get(r);yield function(e){var n=I(I({},e),{},{state:o});return r[t](n)}}},o=R(this._strategy.plugins);!(e=o()).done;)yield*r()},e.waitUntil=function(t){return this._extendLifetimePromises.push(t),t},e.doneWaiting=function(){return new Promise(function(t,e){function n(){return(o=this._extendLifetimePromises.shift())?Promise.resolve(o).then((function(){try{return n}catch(t){return e(t)}}),e):[1]}function r(){return t()}var o,i;return(i=function(t){for(;t;){if(t.then)return void t.then(i,e);try{if(t.pop){if(t.length)return t.pop()?r.call(this):t;t=n}else t=t.call(this)}catch(t){return e(t)}}}.bind(this))(n)}.bind(this))},e.destroy=function(){this._handlerDeferred.resolve()},e._ensureResponseSafeToCache=function(t){return new Promise(function(e,n){function r(){return(c=u()).done?[1]:Promise.resolve((0,c.value)({request:this.request,response:i,event:this.event})).then((function(t){try{return a=!0,(i=t||void 0)?r:[1]}catch(t){return n(t)}}),n)}function o(){return a||i&&200!==i.status&&(i=void 0),e(i)}var i,a,u,c,s;return i=t,a=!1,u=R(this.iterateCallbacks("cacheWillUpdate")),(s=function(t){for(;t;){if(t.then)return void t.then(s,n);try{if(t.pop){if(t.length)return t.pop()?o.call(this):t;t=r}else t=t.call(this)}catch(t){return n(t)}}}.bind(this))(r)}.bind(this))},t}()),It=function(){function t(t){void 0===t&&(t={}),this.cacheName=kt(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}var e=t.prototype;return e.handle=function(t){return this.handleAll(t)[0]},e.handleAll=function(t){t instanceof FetchEvent&&(t={event:t,request:t.request});var e=t.event,n="string"==typeof t.request?new Request(t.request):t.request,r=new Tt(this,{event:e,request:n,params:"params"in t?t.params:void 0}),o=this._getResponse(r,n,e);return[o,this._awaitComplete(o,r,n,e)]},e._getResponse=function(t,e,n){return new Promise(function(r,o){var i,a,u,c,s;return Promise.resolve(t.runCallbacks("handlerWillStart",{event:n,request:e})).then(function(){try{i=void 0;var f=function(){try{var a;function u(){return(s=c()).done?[1]:Promise.resolve((0,s.value)({event:n,request:e,response:i})).then((function(t){try{return i=t,u}catch(t){return o(t)}}),o)}return c=C(t.iterateCallbacks("handlerWillRespond")),(a=function(t){for(;t;){if(t.then)return void t.then(a,o);try{if(t.pop){if(t.length)return t.pop()?f.call(this):t;t=u}else t=t.call(this)}catch(t){return o(t)}}}.bind(this))(u);function f(){return r(i)}}catch(t){return o(t)}},l=function(r){try{{var c;function s(){return(u=a()).done?[1]:Promise.resolve((0,u.value)({error:r,event:n,request:e})).then((function(t){try{return(i=t)?[1]:s}catch(t){return o(t)}}),o)}return a=C(t.iterateCallbacks("handlerDidError")),(c=function(t){for(;t;){if(t.then)return void t.then(c,o);try{if(t.pop){if(t.length)return t.pop()?l.call(this):t;t=s}else t=t.call(this)}catch(t){return o(t)}}}.bind(this))(s);function l(){if(!i)throw r;return f()}}}catch(t){return o(t)}}.bind(this);try{return Promise.resolve(this._handle(e,t)).then((function(t){try{if(!(i=t)||"error"===i.type)throw new ft("no-response",{url:e.url});return f()}catch(t){return l(t)}}),l)}catch(t){l(t)}}catch(t){return o(t)}}.bind(this),o)}.bind(this))},e._awaitComplete=function(t,e,n,r){return new Promise((function(o,i){var a,u,c=function(){try{var t=function(){try{return Promise.resolve(e.runCallbacks("handlerDidComplete",{event:r,request:n,response:a,error:u})).then((function(){try{return e.destroy(),u?i(u):o()}catch(t){return i(t)}}),i)}catch(t){return i(t)}},c=function(e){try{return u=e,t()}catch(t){return i(t)}};try{return Promise.resolve(e.runCallbacks("handlerDidRespond",{event:r,request:n,response:a})).then((function(){try{return Promise.resolve(e.doneWaiting()).then((function(){try{return t()}catch(t){return c(t)}}),c)}catch(t){return c(t)}}),c)}catch(t){c(t)}}catch(t){return i(t)}},s=function(){try{return c()}catch(t){return i(t)}};try{return Promise.resolve(t).then((function(t){try{return a=t,c()}catch(t){return s()}}),s)}catch(u){s()}}))},t}(),At=function(t){function e(n){var r;return void 0===n&&(n={}),n.cacheName=wt(n.cacheName),(r=t.call(this,n)||this)._fallbackToNetwork=!1!==n.fallbackToNetwork,r.plugins.push(e.copyRedirectedCacheableResponsesPlugin),r}var n,r;r=t,(n=e).prototype=Object.create(r.prototype),n.prototype.constructor=n,L(n,r);var o=e.prototype;return o._handle=function(t,e){return new Promise(function(n,r){var o;return Promise.resolve(e.cacheMatch(t)).then(function(i){try{return(o=i)?n(o):e.event&&"install"===e.event.type?Promise.resolve(this._handleInstall(t,e)).then(n,r):Promise.resolve(this._handleFetch(t,e)).then(n,r)}catch(t){return r(t)}}.bind(this),r)}.bind(this))},o._handleFetch=function(t,e){return new Promise(function(n,r){function o(){return function(){return n(i)}.call(this)}var i;return this._fallbackToNetwork?Promise.resolve(e.fetch(t)).then(function(t){try{return i=t,o.call(this)}catch(t){return r(t)}}.bind(this),r):r(new ft("missing-precache-entry",{cacheName:this.cacheName,url:t.url}))}.bind(this))},o._handleInstall=function(t,e){return new Promise(function(n,r){var o;return this._useDefaultCacheabilityPluginIfNeeded(),Promise.resolve(e.fetch(t)).then((function(i){try{return o=i,Promise.resolve(e.cachePut(t,o.clone())).then((function(e){try{return e?n(o):r(new ft("bad-precaching-response",{url:t.url,status:o.status}))}catch(t){return r(t)}}),r)}catch(t){return r(t)}}),r)}.bind(this))},o._useDefaultCacheabilityPluginIfNeeded=function(){for(var t,n=null,r=0,o=U(this.plugins.entries());!(t=o()).done;){var i=t.value,a=i[1];a!==e.copyRedirectedCacheableResponsesPlugin&&(a===e.defaultPrecacheCacheabilityPlugin&&(n=i[0]),a.cacheWillUpdate&&r++)}0===r?this.plugins.push(e.defaultPrecacheCacheabilityPlugin):r>1&&null!==n&&this.plugins.splice(n,1)},e}(It);At.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:function(t){return new Promise((function(e){var n=t.response;return e(!n||n.status>=400?null:n)}))}},At.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:function(t){return new Promise((function(e,n){var r;return r=t.response,Promise.resolve(new Promise((function(t,e){return r.redirected?Promise.resolve(g(r)).then(t,e):t(r)}))).then(e,n)}))}};var Rt,Et=function(){function t(t){var e=void 0===t?{}:t,n=e.cacheName,r=e.plugins,o=void 0===r?[]:r,i=e.fallbackToNetwork,a=void 0===i||i;this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new At({cacheName:wt(n),plugins:[].concat(o,[new xt({precacheController:this})]),fallbackToNetwork:a}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}var e,n,r,o=t.prototype;return o.precache=function(t){this.addToCacheList(t),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)},o.addToCacheList=function(t){for(var e,n=[],r=K(t);!(e=r()).done;){var o=e.value;"string"==typeof o?n.push(o):o&&void 0===o.revision&&n.push(o.url);var i=m(o),a=i.cacheKey,u=i.url,c="string"!=typeof o&&o.revision?"reload":"default";if(this._urlsToCacheKeys.has(u)&&this._urlsToCacheKeys.get(u)!==a)throw new ft("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(u),secondEntry:a});if("string"!=typeof o&&o.integrity){if(this._cacheKeysToIntegrities.has(a)&&this._cacheKeysToIntegrities.get(a)!==o.integrity)throw new ft("add-to-cache-list-conflicting-integrities",{url:u});this._cacheKeysToIntegrities.set(a,o.integrity)}if(this._urlsToCacheKeys.set(u,a),this._urlsToCacheModes.set(u,c),n.length>0){var s="Workbox is precaching URLs without revision info: "+n.join(", ")+"\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache";console.warn(s)}}},o.install=function(t){var e=this;return y(t,(function(){return new Promise((function(n,r){function o(){return(c=u()).done?[1]:(f=(s=c.value)[0],h=e._cacheKeysToIntegrities.get(l=s[1]),d=e._urlsToCacheModes.get(f),p=new Request(f,{integrity:h,cache:d,credentials:"same-origin"}),Promise.resolve(Promise.all(e.strategy.handleAll({params:{cacheKey:l},request:p,event:t}))).then((function(){try{return o}catch(t){return r(t)}}),r))}function i(){return n({updatedURLs:a.updatedURLs,notUpdatedURLs:a.notUpdatedURLs})}var a,u,c,s,f,l,h,d,p,v;return a=new St,e.strategy.plugins.push(a),u=K(e._urlsToCacheKeys),(v=function(t){for(;t;){if(t.then)return void t.then(v,r);try{if(t.pop){if(t.length)return t.pop()?i.call(this):t;t=o}else t=t.call(this)}catch(t){return r(t)}}}.bind(this))(o)}))}))},o.activate=function(t){var e=this;return y(t,(function(){return new Promise((function(t,n){var r,o,i,a,u,c,s;return Promise.resolve(self.caches.open(e.strategy.cacheName)).then(function(f){try{return r=f,Promise.resolve(r.keys()).then(function(f){try{{var l;function h(){if((c=u()).done)return[1];{if(!i.has((s=c.value).url))return Promise.resolve(r.delete(s)).then(function(){try{return a.push(s.url),t.call(this)}catch(t){return n(t)}}.bind(this),n);function t(){return h}return t.call(this)}}return o=f,i=new Set(e._urlsToCacheKeys.values()),a=[],u=K(o),(l=function(t){for(;t;){if(t.then)return void t.then(l,n);try{if(t.pop){if(t.length)return t.pop()?d.call(this):t;t=h}else t=t.call(this)}catch(t){return n(t)}}}.bind(this))(h);function d(){return t({deletedURLs:a})}}}catch(t){return n(t)}}.bind(this),n)}catch(t){return n(t)}}.bind(this),n)}))}))},o.getURLsToCacheKeys=function(){return this._urlsToCacheKeys},o.getCachedURLs=function(){return[].concat(this._urlsToCacheKeys.keys())},o.getCacheKeyForURL=function(t){var e=new URL(t,location.href);return this._urlsToCacheKeys.get(e.href)},o.matchPrecache=function(t){return new Promise(function(e,n){var r,o;return r=t instanceof Request?t.url:t,(o=this.getCacheKeyForURL(r))?Promise.resolve(self.caches.open(this.strategy.cacheName)).then((function(t){try{return e(t.match(o))}catch(t){return n(t)}}),n):e(void 0)}.bind(this))},o.createHandlerBoundToURL=function(t){var e=this,n=this.getCacheKeyForURL(t);if(!n)throw new ft("non-precached-url",{url:t});return function(r){return r.request=new Request(t),r.params=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?q(Object(n),!0).forEach((function(e){B(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({cacheKey:n},r.params),e.strategy.handle(r)}},e=t,(n=[{key:"strategy",get:function(){return this._strategy}}])&&G(e.prototype,n),r&&G(e,r),t}(),Dt=function(){return Rt||(Rt=new Et),Rt},Nt=function(t){function e(e,n){return t.call(this,(function(t){for(var r,o=t.request,i=e.getURLsToCacheKeys(),a=J(function*(t,e){var n=void 0===e?{}:e,r=n.ignoreURLParametersMatching,o=void 0===r?[/^utm_/,/^fbclid$/]:r,i=n.directoryIndex,a=void 0===i?"index.html":i,u=n.cleanURLs,c=void 0===u||u,s=n.urlManipulation,f=new URL(t,location.href);f.hash="",yield f.href;var l=function(t,e){void 0===e&&(e=[]);for(var n=function(){var n=o[r];e.some((function(t){return t.test(n)}))&&t.searchParams.delete(n)},r=0,o=[].concat(t.searchParams.keys());r<o.length;r++)n();return t}(f,o);if(yield l.href,a&&l.pathname.endsWith("/")){var h=new URL(l.href);h.pathname+=a,yield h.href}if(c){var d=new URL(l.href);d.pathname+=".html",yield d.href}if(s)for(var p,v=W(s({url:f}));!(p=v()).done;){var y=p.value;yield y.href}}(o.url,n));!(r=a()).done;){var u=i.get(r.value);if(u)return{cacheKey:u}}}),e.strategy)||this}var n,r;return r=t,(n=e).prototype=Object.create(r.prototype),n.prototype.constructor=n,Q(n,r),e}(ht),Ct=function(t){return"navigate"===t.request.mode},$t={cacheWillUpdate:function(t){return new Promise((function(e){var n=t.response;return e(200===n.status||0===n.status?n:null)}))}},Ut=function(t){function e(e){var n;return void 0===e&&(e={}),(n=t.call(this,e)||this).plugins.some((function(t){return"cacheWillUpdate"in t}))||n.plugins.unshift($t),n._networkTimeoutSeconds=e.networkTimeoutSeconds||0,n}var n,r;r=t,(n=e).prototype=Object.create(r.prototype),n.prototype.constructor=n,Y(n,r);var o=e.prototype;return o._handle=function(t,e){return new Promise(function(n,r){var o,i,a,u,c,s;return o=[],i=[],this._networkTimeoutSeconds&&(a=(u=this._getTimeoutPromise({request:t,logs:o,handler:e})).id,i.push(u.promise)),c=this._getNetworkPromise({timeoutId:a,request:t,logs:o,handler:e}),i.push(c),Promise.resolve(e.waitUntil(new Promise((function(t,n){return Promise.resolve(new Promise((function(t,n){var r;return Promise.resolve(e.waitUntil(Promise.race(i))).then(function(e){try{if(!(r=e))return Promise.resolve(c).then(function(t){try{return r=t,o.call(this)}catch(t){return n(t)}}.bind(this),n);function o(){return t(r)}return o.call(this)}catch(t){return n(t)}}.bind(this),n)}))).then(t,n)})))).then(function(e){try{return(s=e)?n(s):r(new ft("no-response",{url:t.url}))}catch(t){return r(t)}}.bind(this),r)}.bind(this))},o._getTimeoutPromise=function(t){var e,n=this,r=t.request,o=t.handler;return{promise:new Promise((function(t){e=setTimeout((function(){return new Promise((function(e,n){return Promise.resolve(o.cacheMatch(r)).then((function(r){try{return t(r),e()}catch(t){return n(t)}}),n)}))}),1e3*n._networkTimeoutSeconds)})),id:e}},o._getNetworkPromise=function(t){return new Promise(function(e,n){var r,o,i,a,u;r=t.timeoutId,o=t.request,i=t.handler;var c=function(){try{if(r&&clearTimeout(r),a||!u)return Promise.resolve(i.cacheMatch(o)).then(function(e){try{return u=e,t.call(this)}catch(t){return n(t)}}.bind(this),n);function t(){return e(u)}return t.call(this)}catch(t){return n(t)}}.bind(this),s=function(t){try{return a=t,c()}catch(t){return n(t)}};try{return Promise.resolve(i.fetchAndCachePut(o)).then((function(t){try{return u=t,c()}catch(t){return s(t)}}),s)}catch(t){s(t)}}.bind(this))},e}(It),Mt=function(){function t(t,e,n){var r=this,o=void 0===n?{}:n,i=o.onupgradeneeded,a=o.onversionchange;this._db=null,this._name=t,this._version=e,this._onupgradeneeded=i,this._onversionchange=a||function(){return r.close()}}var e,n,r,o=t.prototype;return o.open=function(){return new Promise(function(t,e){var n;return n=this,this._db?t():Promise.resolve(new Promise((function(t,e){var r=!1;setTimeout((function(){r=!0,e(new Error("The open request was blocked and timed out"))}),n.OPEN_TIMEOUT);var o=indexedDB.open(n._name,n._version);o.onerror=function(){return e(o.error)},o.onupgradeneeded=function(t){r?(o.transaction.abort(),o.result.close()):"function"==typeof n._onupgradeneeded&&n._onupgradeneeded(t)},o.onsuccess=function(){var e=o.result;r?e.close():(e.onversionchange=n._onversionchange.bind(n),t(e))}}))).then(function(n){try{return this._db=n,t(this)}catch(t){return e(t)}}.bind(this),e)}.bind(this))},o.getKey=function(t,e){return new Promise(function(n,r){return Promise.resolve(this.getAllKeys(t,e,1)).then((function(t){try{return n(t[0])}catch(t){return r(t)}}),r)}.bind(this))},o.getAll=function(t,e,n){return new Promise(function(r,o){return Promise.resolve(this.getAllMatching(t,{query:e,count:n})).then(r,o)}.bind(this))},o.getAllKeys=function(t,e,n){return new Promise(function(r,o){return Promise.resolve(this.getAllMatching(t,{query:e,count:n,includeKeys:!0})).then((function(t){try{return r(t.map((function(t){return t.key})))}catch(t){return o(t)}}),o)}.bind(this))},o.getAllMatching=function(t,e){return new Promise(function(n,r){var o,i,a,u,c,s,f,l,h;return i=(o=void 0===e?{}:e).index,u=void 0===(a=o.query)?null:a,s=void 0===(c=o.direction)?"next":c,f=o.count,h=void 0!==(l=o.includeKeys)&&l,Promise.resolve(this.transaction([t],"readonly",(function(e,n){var r=e.objectStore(t),o=i?r.index(i):r,a=[],c=o.openCursor(u,s);c.onsuccess=function(){var t=c.result;t?(a.push(h?t:t.value),f&&a.length>=f?n(a):t.continue()):n(a)}}))).then(n,r)}.bind(this))},o.transaction=function(t,e,n){return new Promise(function(r,o){var i;return i=this,Promise.resolve(this.open()).then((function(){try{return Promise.resolve(new Promise((function(r,o){var a=i._db.transaction(t,e);a.onabort=function(){return o(a.error)},a.oncomplete=function(){return r()},n(a,(function(t){return r(t)}))}))).then(r,o)}catch(t){return o(t)}}),o)}.bind(this))},o._call=function(t,e,n){var r=arguments;return new Promise(function(o,i){var a,u,c;for(a=r.length,u=new Array(a>3?a-3:0),c=3;c<a;c++)u[c-3]=r[c];return Promise.resolve(this.transaction([e],n,(function(n,r){var o=n.objectStore(e),i=o[t].apply(o,u);i.onsuccess=function(){return r(i.result)}}))).then(o,i)}.bind(this))},o.close=function(){this._db&&(this._db.close(),this._db=null)},e=t,(n=[{key:"db",get:function(){return this._db}}])&&et(e.prototype,n),r&&et(e,r),t}();Mt.prototype.OPEN_TIMEOUT=2e3;for(var Lt=function(){for(var t,e=Bt[qt],n=e[0],r=function(){var e=t.value;e in IDBObjectStore.prototype&&(Mt.prototype[e]=function(t){var r=arguments;return new Promise(function(o,i){var a,u,c;for(a=r.length,u=new Array(a>1?a-1:0),c=1;c<a;c++)u[c-1]=r[c];return Promise.resolve(this._call.apply(this,[e,t,n].concat(u))).then(o,i)}.bind(this))})},o=Z(e[1]);!(t=o()).done;)r()},qt=0,Bt=Object.entries({readonly:["get","count","getKey","getAll","getAllKeys"],readwrite:["add","put","clear","delete"]});qt<Bt.length;qt++)Lt();var Kt,Ft={get googleAnalytics(){return bt()},get precache(){return wt()},get prefix(){return _t()},get runtime(){return kt()},get suffix(){return jt()}},Gt=(n("2Gk3"),function(){function t(t){void 0===t&&(t={}),this._statuses=t.statuses,this._headers=t.headers}return t.prototype.isResponseCacheable=function(t){var e=this;var n=!0;return this._statuses&&(n=this._statuses.includes(t.status)),this._headers&&n&&(n=Object.keys(this._headers).some((function(n){return t.headers.get(n)===e._headers[n]}))),n},t}()),Wt={};v((function(t){return Ct(t.event)}),new Ut({cacheName:Ft.precache,networkTimeoutSeconds:5,plugins:[new function(t){var e=this;this.cacheWillUpdate=function(t){return new Promise((function(n){var r=t.response;return e._cacheableResponse.isResponseCacheable(r)?n(r):n(null)}))},this._cacheableResponse=new Gt(t)}({statuses:[200]})]})),Kt=function(t){return Ct(t.event)?caches.match(X("/200.html")||X("/index.html")):Response.error()},yt().setCatchHandler(Kt);var Ht,Jt=[{'revision':null,'url':'/0ef6bdf1ff66ba40ba6acdb026204411.png'},{'revision':null,'url':'/2.chunk.ac5fb.esm.js'},{'revision':'27fbe7c8125daa524b2c2516cb882ac3','url':'/200.html'},{'revision':null,'url':'/3.chunk.afcc3.esm.js'},{'revision':null,'url':'/4.chunk.f7b9f.esm.js'},{'revision':null,'url':'/5.chunk.c181e.esm.js'},{'revision':null,'url':'/a9b1d572b53dff4551a471d250aa184f.png'},{'revision':null,'url':'/adab34a6dd3339da5b071602cfc4b5a2.png'},{'revision':'76c48652876007696530bde424447a6a','url':'/assets/css/cropper.min.css'},{'revision':'ee6f29faf0adc4cb0aea1f740b820552','url':'/assets/css/dark.css'},{'revision':'fd90058d9174285d57b65c10e6959541','url':'/assets/css/light.css'},{'revision':'d8581e946c04d2ee9103d094bbead70d','url':'/assets/css/style.css'},{'revision':'81591bbbfce9b84cf3c9fe21c5f79208','url':'/assets/img/android-chrome-192x192.png'},{'revision':'af2927f8b058d52fa1635d716e8ae420','url':'/assets/img/android-chrome-512x512.png'},{'revision':'c40589ed6337ecf1ed8621a22645898b','url':'/assets/img/apple-touch-icon.png'},{'revision':'deb2b1970c7c43f466d6aa39595cee92','url':'/assets/img/cover.jpg'},{'revision':'dea1871d1e6f2a016d1f79a64596fb38','url':'/assets/img/favicon-16x16.png'},{'revision':'b8479c64bc692cfbb0105fbafedd4b6c','url':'/assets/img/favicon-32x32.png'},{'revision':'5df75c3f1ea3575cc2d8e0175c3894c2','url':'/assets/img/gun-48x48.png'},{'revision':'412c0cd4676de5dc3da76dcd1f520901','url':'/assets/img/gun-chat.jpg'},{'revision':'30eb44025c5db825c99420258966dc12','url':'/assets/img/gun-og-image.png'},{'revision':'21ec1dc8e61ee5184d615dc3aef05ea2','url':'/assets/img/heart.png'},{'revision':'cd4b639792aff1dda21074a87526e54f','url':'/assets/img/herokubutton.svg'},{'revision':'ce7555ff5af74e41c9f3c4e245327e6a','url':'/assets/img/icon128.png'},{'revision':'83bfc4212755bd706f819a25dc3da438','url':'/assets/img/iris_logotype.png'},{'revision':'db98a109715d43f009658d5d38ca3332','url':'/assets/img/mstile-150x150.png'},{'revision':'92dd9d4897e9e99528f95edaab0424a5','url':'/assets/img/safari-pinned-tab.svg'},{'revision':'bfaeb12da15414139b27bd376a8b81c3','url':'/assets/img/screenshot.png'},{'revision':'76e0ec7ef106385808d1aea76f8f1618','url':'/assets/img/space-game.jpg'},{'revision':null,'url':'/bundle.61bf3.css'},{'revision':null,'url':'/bundle.b73e7.esm.js'},{'revision':null,'url':'/polyfills.d3031.esm.js'}];V(Jt,Ht||Wt);var zt=new URL("/",self.location.origin).href;self.onmessage=function(t){t.data.hasOwnProperty("key")&&(self.irisKey=t.data.key,ct.a.setItem("swIrisKey",self.irisKey))},self.addEventListener("push",(function(t){return new Promise((function(e,n){var r,o,i;return Promise.resolve(nt(t)).then(function(a){try{if((r=a)&&"visible"===r.visibilityState)return e();if(!self.irisKey)return Promise.resolve(new Promise((function(t,e){var n=function(){try{return t(self.irisKey)}catch(t){return e(t)}},r=function(t){try{return console.error("error loading iris key",t),n()}catch(t){return e(t)}};try{return Promise.resolve(ct.a.getItem("swIrisKey")).then((function(t){try{return self.irisKey=t,n()}catch(t){return r(t)}}),r)}catch(t){r(t)}}))).then(function(){try{return u.call(this)}catch(t){return n(t)}}.bind(this),n);function u(){function r(){return o.title&&0===o.title.indexOf("SEA{")&&(o.title="",o.body="Encrypted message"),self.registration.showNotification(o.title||"No title",{body:o.body||"No text",icon:"./img/icon128.png"}),e()}return(o=t.data.json()).title&&o.body||console.log("what?",o),self.irisKey&&o.from&&o.from.epub?Promise.resolve(at.a.SEA.secret(o.from.epub,self.irisKey)).then(function(t){try{return i=t,Promise.resolve(at.a.SEA.decrypt(o.title,i)).then(function(t){try{return o.title=t,Promise.resolve(at.a.SEA.decrypt(o.body,i)).then(function(t){try{return o.body=t,r.call(this)}catch(t){return n(t)}}.bind(this),n)}catch(t){return n(t)}}.bind(this),n)}catch(t){return n(t)}}.bind(this),n):r.call(this)}return u.call(this)}catch(t){return n(t)}}.bind(this),n)}))})),self.addEventListener("notificationclick",(function(t){return new Promise((function(e,n){var r;return t.notification.close(),Promise.resolve(nt(t)).then((function(t){try{return(r=t)?r.focus():clients.openWindow&&clients.openWindow(zt),e()}catch(t){return n(t)}}),n)}))}))},FWJg:function(t){function e(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}e.keys=function(){return[]},e.resolve=e,t.exports=e,e.id="FWJg"},GLQ6:function(t,e,n){t.exports=n("K/f/")},Gpc1:function(){"use strict";try{self["workbox:precaching:6.1.5"]&&_()}catch(t){}},I3Xu:function(){"use strict";try{self["workbox:routing:6.1.5"]&&_()}catch(t){}},"K/f/":function(t,e,n){(function(t,e,r){!function(){function o(t,e){function r(t){return t.split("/").slice(-1).toString().replace(".js","")}return e?n("FWJg")(t):t.slice?o[r(t)]:function(e,n){t(e={exports:{}}),o[r(n)]=e.exports}}var i=t;o((function(t){var e={fn:{is:function(t){return!!t&&"function"==typeof t}}};e.bi={is:function(t){return t instanceof Boolean||"boolean"==typeof t}},e.num={is:function(t){return!n(t)&&(t-parseFloat(t)+1>=0||1/0===t||-1/0===t)}},e.text={is:function(t){return"string"==typeof t}},e.text.ify=function(t){return e.text.is(t)?t:"undefined"!=typeof JSON?JSON.stringify(t):t&&t.toString?t.toString():t},e.text.random=function(t,e){var n="";for(t=t||24,e=e||"0123456789ABCDEFGHIJKLMNOPQRSTUVWXZabcdefghijklmnopqrstuvwxyz";t>0;)n+=e.charAt(Math.floor(Math.random()*e.length)),t--;return n},e.text.match=function(t,e){var n,r;return"string"==typeof t&&("string"==typeof e&&(e={"=":e}),t===(n=(e=e||{})["="]||e["*"]||e[">"]||e["<"])||r===e["="]&&(t.slice(0,((n=e["*"]||e[">"]||e["<"])||"").length)===n||r===e["*"]&&(r!==e[">"]&&r!==e["<"]?t>=e[">"]&&t<=e["<"]:r!==e[">"]&&t>=e[">"]||r!==e["<"]&&t<=e["<"])))},e.text.hash=function(t,e){if("string"==typeof t){if(e=e||0,!t.length)return e;for(var n=0,r=t.length;n<r;++n)e=(e<<5)-e+t.charCodeAt(n),e|=0;return e}},e.list={is:function(t){return t instanceof Array}},e.list.slit=Array.prototype.slice,e.list.sort=function(t){return function(e,n){return e&&n?(e=e[t])<(n=n[t])?-1:e>n?1:0:0}},e.list.map=function(t,e,n){return a(t,e,n)},e.list.index=1,e.obj={is:function(t){return!!t&&(t instanceof Object&&t.constructor===Object||"Object"===Object.prototype.toString.call(t).match(/^\[object (\w+)\]$/)[1])}},e.obj.put=function(t,e,n){return(t||{})[e]=n,t},e.obj.has=function(t,e){return t&&Object.prototype.hasOwnProperty.call(t,e)},e.obj.del=function(t,e){if(t)return t[e]=null,delete t[e],t},e.obj.as=function(t,e,n,r){return t[e]=t[e]||(r===n?{}:n)},e.obj.ify=function(t){if(o(t))return t;try{t=JSON.parse(t)}catch(e){t={}}return t},function(){function t(t,e){i(this,e)&&undefined!==this[e]||(this[e]=t)}e.obj.to=function(e,n){return a(e,t,n=n||{}),n}}(),e.obj.copy=function(t){return t?JSON.parse(JSON.stringify(t)):t},function(){function t(t,e){var n=this.n;if(!n||!(e===n||o(n)&&i(n,e)))return undefined!==e||void 0}e.obj.empty=function(e,n){return!e||!a(e,t,{n:n})}}(),function(){function t(e,n){2!==arguments.length?(t.r=t.r||[]).push(e):(t.r=t.r||{})[e]=n}var r,a=Object.keys;Object.keys=Object.keys||function(t){return r(t,(function(t,e,n){n(e)}))},e.obj.map=r=function(r,u,c){var s,f,l,h,d,p=0,v="function"==typeof u;if(t.r=s,a&&o(r)&&(h=a(r),d=!0),c=c||{},n(r)||h)for(f=(h||r).length;p<f;p++){var y=p+e.list.index;if(v){if((l=d?u.call(c,r[h[p]],h[p],t):u.call(c,r[p],y,t))!==s)return l}else if(u===r[d?h[p]:p])return h?h[p]:y}else for(p in r)if(v){if(i(r,p)&&(l=c?u.call(c,r[p],p,t):u(r[p],p,t))!==s)return l}else if(u===r[p])return p;return v?t.r:e.list.index?0:-1}}(),e.time={},e.time.is=function(t){return t?t instanceof Date:+(new Date).getTime()};var n=e.list.is,r=e.obj,o=r.is,i=r.has,a=r.map;t.exports=e}))(o,"./type"),o((function(t){t.exports=function t(e,n,r){if(!e)return{to:t};e=(this.tag||(this.tag={}))[e]||(this.tag[e]={tag:e,to:t._={next:function(t){var e;(e=this.to)&&e.next(t)}}});if("function"==typeof n){var o={off:t.off||(t.off=function(){if(this.next===t._.next)return!0;this===this.the.last&&(this.the.last=this.back),this.to.back=this.back,this.next=t._.next,this.back.to=this.to,this.the.last===this.the&&delete this.on.tag[this.the.tag]}),to:t._,next:n,the:e,on:this,as:r};return(o.back=e.last||e).to=o,e.last=o}return(e=e.to)&&undefined!==n&&e.next(n),e}}))(o,"./onto"),o((function(t){var n=void 0!==e?e:setTimeout,r=[];t.exports=setTimeout.puff=function(t){r.length?r.push(t):(r=[t],n((function t(e){e=e||+new Date;for(var o,i=0;i<9&&(o=r[i++]);)o();if(console.STAT&&console.STAT(e,+new Date-e,"puff"),o&&!(+new Date-e))return t(e);(r=r.slice(i)).length&&n(t,0)}),0))}}))(o,"./puff"),o((function(t){if("undefined"==typeof JSON)throw new Error("JSON is not included in this browser. Please load it first: ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js");var e=JSON.stringify;t.exports=function(t,n,r,o,i){if(t<n)return{defer:!0};if(n<r)return{historical:!0};if(r<n)return{converge:!0,incoming:!0};if(n===r){if((o=e(o)||"")===(i=e(i)||""))return{state:!0};if(o<i)return{converge:!0,current:!0};if(i<o)return{converge:!0,incoming:!0}}return{err:"Invalid CRDT Data: "+o+" to "+i+" at "+n+" to "+r+"!"}}}))(o,"./HAM"),o((function(t){var e=o("./type"),n={is:function(t){return undefined!==t&&(null===t||t!==1/0&&(!!(u(t)||i(t)||a(t))||(n.link.is(t)||!1)))}};n.link=n.rel={_:"#"},function(){function t(t,e){var n=this;return n.id?n.id=!1:e==r&&u(t)?void(n.id=t):n.id=!1}n.link.is=function(e){if(e&&e[r]&&!e._&&s(e)){var n={};if(l(e,t,n),n.id)return n.id}return!1}}(),n.link.ify=function(t){return f({},r,t)},e.obj.has._=".";var r=n.link._,i=e.bi.is,a=e.num.is,u=e.text.is,c=e.obj,s=c.is,f=c.put,l=c.map;t.exports=n}))(o,"./val"),o((function(t){var e=o("./type"),n=o("./val"),r={_:"_",soul:function(t,e){return t&&t._&&t._[e||f]}};r.soul.ify=function(t,e){return e="string"==typeof e?{soul:e}:e||{},(t=t||{})._=t._||{},t._[f]=e.soul||t._[f]||s(),t},r.soul._=n.link._,function(){function t(t,e){if(e!==r._)return!n.is(t)||void(this.cb&&this.cb.call(this.as,t,e,this.n,this.s))}r.is=function(e,n,o){var i;return!!a(e)&&(!!(i=r.soul(e))&&!c(e,t,{as:o,cb:n,s:i,n:e}))}}(),function(){function t(t,e){var r,o=this.o;o.map?undefined===(r=o.map.call(this.as,t,""+e,o.node))?u(o.node,e):o.node&&(o.node[e]=r):n.is(t)&&(o.node[e]=t)}r.ify=function(e,n,o){return n?"string"==typeof n?n={soul:n}:"function"==typeof n&&(n={map:n}):n={},n.map&&(n.node=n.map.call(o,e,undefined,n.node||{})),(n.node=r.soul.ify(n.node||{},n))&&c(e,t,{o:n,as:o}),n.node}}();var i=e.obj,a=i.is,u=i.del,c=i.map,s=e.text.random,f=r.soul._;t.exports=r}))(o,"./node"),o((function(t){function e(){var t;return t=+new Date,i<t?(a=0,i=t+e.drift):i=t+(a+=1)/u+e.drift}var n=o("./type"),r=o("./node"),i=-1/0,a=0,u=1e3,c="undefined"!=typeof performance&&(performance.timing&&performance),s=(c&&c.timing&&c.timing.navigationStart||(c=!1),e._=">");e.drift=0,e.is=function(t,e,n){var r=e&&t&&t[b]&&t[b][s]||n;if(r)return m(r=r[e])?r:-1/0},e.lex=function(){return e().toString(36).replace(".","")},e.ify=function(t,e,n,o,i){if(!t||!t[b]){if(!i)return;t=r.soul.ify(t,i)}var a=h(t[b],s);return f!==e&&e!==b&&(m(n)&&(a[e]=n),f!==o&&(t[e]=o)),t},e.to=function(t,n,o){var i=(t||{})[n];return p(i)&&(i=y(i)),e.ify(o,n,e.is(t,n),i,r.soul(t))},function(){function t(t,n){b!==n&&e.ify(this.o,n,this.s)}e.map=function(n,r,o){var i,a=p(a=n||r)?a:null;return n=g(n=n||r)?n:null,a&&!n?(r=m(r)?r:e(),a[b]=a[b]||{},v(a,t,{o:a,s:r}),a):(o=o||p(r)?r:i,r=m(r)?r:e(),function(e,a,u,c){if(!n)return t.call({o:u,s:r},e,a),e;n.call(o||this||{},e,a,u,c),d(u,a)&&i===u[a]||t.call({o:u,s:r},e,a)})}}();var f,l=n.obj,h=l.as,d=l.has,p=l.is,v=l.map,y=l.copy,m=n.num.is,g=n.fn.is,b=r._;t.exports=e}))(o,"./state"),o((function(t){var e=o("./type"),n=o("./val"),r=o("./node"),i={};!function(){function t(t,n){if(!t||n!==r.soul(t)||!r.is(t,this.fn,this.as))return!0;this.cb&&(e.n=t,this.cb.call(e.as=this.as,t,n,e))}function e(t){t&&r.is(e.n,t,e.as)}i.is=function(e,n,r,o){return!(!e||!c(e)||l(e))&&!d(e,t,{cb:n,fn:r,as:o})}}(),function(){function t(t,e){var i;return(i=function(t,e){var n,r=t.seen,o=r.length;for(;o--;)if(e.obj===(n=r[o]).obj)return n;r.push(e)}(t,e))?i:(e.env=t,e.soul=u,r.ify(e.obj,o,e)&&(e.link=e.link||n.link.ify(r.soul(e.node)),e.obj!==t.shell&&(t.graph[n.link.is(e.link)]=e.node)),e)}function o(e,o,i){var u,c,h=this,d=h.env;if(r._===o&&f(e,n.link._))return i._;if(u=l(e,o,i,h,d)){if(o||(h.node=h.node||i||{},f(e,r._)&&r.soul(e)&&(h.node._=p(e._)),h.node=r.soul.ify(h.node,n.link.is(h.link)),h.link=h.link||n.link.ify(r.soul(h.node))),(c=d.map)&&(c.call(d.as||{},e,o,i,h),f(i,o))){if(a===(e=i[o]))return void s(i,o);if(!(u=l(e,o,i,h,d)))return}if(!o)return h.node;if(!0===u)return e;if((c=t(d,{obj:e,path:h.path.concat(o)})).node)return c.link}}function u(t){var e=this,o=n.link.is(e.link),i=e.env.graph;e.link=e.link||n.link.ify(t),e.link[n.link._]=t,e.node&&e.node[r._]&&(e.node[r._][n.link._]=t),f(i,o)&&(i[t]=i[o],s(i,o))}function l(t,r,o,i,a){var u;return!!n.is(t)||(c(t)?1:(u=a.invalid)?l(t=u.call(a.as||{},t,r,o),r,o,i,a):(a.err="Invalid value at '"+i.path.concat(r).join(".")+"'!",void(e.list.is(t)&&(a.err+=" Use `.set(item)` instead of an Array."))))}i.ify=function(e,r,o){var i={path:[],obj:e};return r?"string"==typeof r?r={soul:r}:"function"==typeof r&&(r.map=r):r={},"string"==typeof o&&(r.soul=r.soul||o,o=a),r.soul&&(i.link=n.link.ify(r.soul)),r.shell=(o||{}).shell,r.graph=r.graph||{},r.seen=r.seen||[],r.as=r.as||o,t(r,i),r.root=i.node,r.graph}}(),i.node=function(t){var e=r.soul(t);if(e)return h({},e,t)},function(){function t(t,e){var o,a;if(r._!==e)this.obj[e]=(o=n.link.is(t))?(a=this.opt.seen[o])?a:this.opt.seen[o]=i.to(this.graph,o,this.opt):t;else{if(l(t,n.link._))return;this.obj[e]=p(t)}}i.to=function(e,n,r){if(e){var o={};return d(e[n],t,{obj:o,graph:e,opt:r=r||{seen:{}}}),o}}}();var a,u=e.obj,c=u.is,s=u.del,f=u.has,l=u.empty,h=u.put,d=u.map,p=u.copy;t.exports=i}))(o,"./graph"),o((function(t){o("./onto"),t.exports=function(t,e){if(this.on){if("function"!=typeof t){if(!t||!e)return;var n=(this.tag||"")[r=t["#"]||t];if(!n)return;return n=this.on(r,e),clearTimeout(n.err),!0}var r=e&&e["#"]||Math.random().toString(36).slice(2);if(!t)return r;var o=this.on(r,t,e);return o.err=o.err||setTimeout((function(){o.next({err:"Error: No ACK yet.",lack:!0}),o.off()}),(this.opt||{}).lack||9e3),r}}}))(o,"./ask"),o((function(t){var e=o("./type");t.exports=function(t){var n={s:{}},r=n.s;t=t||{max:1e3,age:27e3},n.check=function(t){return!!r[t]&&o(t)};var o=n.track=function(e){var o=r[e]||(r[e]={});return o.was=+new Date,n.to||(n.to=setTimeout(n.drop,t.age+9)),o};return n.drop=function(o){var i=+new Date;e.obj.map(r,(function(e,n){e&&(o||t.age)>i-e.was||delete r[n]})),n.to=null,console.STAT&&(o=+new Date-i)>9&&console.STAT(i,o,"dup drop")},n}}))(o,"./dup"),o((function(t){function e(t){return t instanceof e?(this._={$:this}).$:this instanceof e?e.create(this._={$:this,opt:t}):new e(t)}e.is=function(t){return t instanceof e||t&&t._&&t===t._.$||!1},e.version=.202,(e.chain=e.prototype).toJSON=function(){};var n=o("./type");n.obj.to(n,e),e.HAM=o("./HAM"),e.val=o("./val"),e.node=o("./node"),e.state=o("./state"),e.graph=o("./graph"),e.on=o("./onto"),e.ask=o("./ask"),e.dup=o("./dup"),e.puff=o("./puff"),function(){function t(r){if(r)if(r.out!==t){var o,i=this.as,a=i.at||i,u=a.$,c=a.dup,s=r.DBG;(o=r["#"])||(o=r["#"]=f(9)),c.check(o)||(c.track(o),r._="function"==typeof(o=r._)?o:function(){},r.$&&r.$===(r.$._||"").$||(r.$=u),a.ask(r["@"],r)||(s&&(s.u=+new Date),r.get&&e.on._get(r,u),!r.put)?(s&&(s.uc=+new Date),this.to.next(r),s&&(s.ua=+new Date),r.out=t,a.on("out",r),s&&(s.ue=+new Date)):n(r))}else this.to.next(r)}function n(t){if(t){var n,i,s=t._||"",f=s.root=((s.$=t.$||"")._||"").root,l=t.put,h=t["#"],d=s.DBG=t.DBG;if(l["#"]&&l["."])f.on("put",t);else{s.out=t,s.lot={s:0,more:1};var p=+new Date;for(var v in d&&(d.p=p),l){var y,m=l[v];if(!m){n=u+c(v)+"no node.";break}if(!(i=m._)){n=u+c(v)+"no meta.";break}if(v!==i[g]){n=u+c(v)+"soul not same.";break}if(!(y=i[k])){n=u+c(v)+"no state.";break}for(var b in m)if(w!==b){var j=m[b],S=y[b];if(r===S){n=u+c(b)+"on"+c(v)+"no state.";break}if(!_(j)){n=u+c(b)+"on"+c(v)+"bad "+typeof j+c(j);break}o(j,b,v,S,t)}if(n)break}d&&(d.pe=+new Date),console.STAT&&(console.STAT(p,+new Date-p,"mix"),console.STAT(p,s.lot.s,"mix #")),(s.err=n)?f.on("in",{"@":h,err:e.log(n)}):(--s.lot.more||a(s),s.stun||t["@"]||f.on("in",{"@":h,ok:-1}))}}}function o(t,e,n,r,i){var a,u=i._||"",c=u.root,f=c.graph[n]||j,d=m(f,e,1),p=f[e],v=h(),y=s(v,r,d,t,p);if(!y.incoming){if(y.defer){var g=r-v;return setTimeout((function(){o(t,e,n,r,i)}),g>l?l:g),u.to||c.on("in",{"@":i["#"],err:g}),u.to=1,g}if(!u.miss)return}(a=u.lot||"").s++,a.more++,(u.stun||(u.stun={}))[n+e]=1;var b=u.DBG;b&&(b.ph=b.ph||+new Date),c.on("put",{"#":i["#"],"@":i["@"],put:{"#":n,".":e,":":t,">":r},_:u})}function i(t){var e;(e=(t._||"").DBG)&&(e.pa=+new Date,e.pm=e.pm||+new Date);var n,o=this.as.graph,i=t._,u=t.put,c=u["#"],s=u["."],f=u[":"],l=u[">"];o[c]=y(o[c],s,l,f,c),function(t,e,n,r,o){var i,a,u=t.root;if((u.opt||"").super&&u.$.get(e),!(u&&(a=u.next)&&(a=a[e])&&a.$))return;(i=t.put||(t.put={}))[e]=y(i[e],n,o,r,e),a.put=y(a.put,n,o,r,e)}(i,c,s,r!==(n=u["="])?n:f,l),(n=i.out)&&(n=n.put)&&(n[c]=y(n[c],s,l,f,c)),--i.lot.more||a(i),this.to.next(t)}function a(e){if(!e.err){var n,r={},o=((e.$||"")._||"").root,i=(o||"").next||"",a=e.put,u=+new Date;for(var c in a){var s=a[c];(n=i[c])&&n.$&&(o.stop=r,n.on("in",{$:n.$,get:c,put:s}),o.stop=null)}console.STAT&&console.STAT(u,+new Date-u,"fire"),e.DBG&&(e.DBG.f=+new Date),(n=e.out)&&(n.out=t,o.on("out",n))}}e.create=function(n){n.root=n.root||n,n.graph=n.graph||{},n.on=n.on||e.on,n.ask=n.ask||e.ask,n.dup=n.dup||e.dup();var r=n.$.opt(n.opt);return n.once||(n.on("in",t,n),n.on("out",t,n),n.on("put",i,n),e.on("create",n),n.on("create",n)),n.once=1,r},e.on.put=n;var u="Error: Invalid graph!",c=function(t){return" '"+(""+t).slice(0,9)+"...' "},s=e.HAM,l=2147483647,h=e.state}(),function(){function t(t,n,r,o){var i=this,a=e.state.is(r,n);if(!a)return i.err="Error: No state on '"+n+"' in node '"+o+"'!";var u=i.graph[o]||j,c=e.state.is(u,n,!0),s=e.HAM(i.machine,a,c,t,u[n]);s.incoming?(i.put[o]=e.state.to(r,n,i.put[o]),(i.diff||(i.diff={}))[o]=e.state.to(r,n,i.diff[o]),i.souls[o]=!0):s.defer&&(i.defer=a<(i.defer||1/0)?a:i.defer)}function n(t,e){var n=this,r=n.$._,u=(r.next||j)[e];if(!u){if(!(r.opt||j).super)return void(n.souls[e]=!1);u=n.$.get(e)._}var c=n.map[e]={put:t,get:e,$:u.$},s={ctx:n,msg:c};n.async=!!r.tag.node,n.ack&&(c["@"]=n.ack),v(t,o,s),n.async&&(n.and||r.on("node",(function(t){this.to.next(t),t===n.map[t.get]&&(n.souls[t.get]=!1,v(t.put,i,t),v(n.souls,(function(t){if(t)return t}))||n.c||(n.c=1,this.off(),v(n.map,a,n)))})),n.and=!0,r.on("node",c))}function o(t,n){var r=this.ctx,o=r.graph,i=this.msg,a=i.get,u=i.put,c=i.$._;o[a]=e.state.to(u,n,o[a]),r.async||(c.put=e.state.to(u,n,c.put))}function i(t,n){var r=this.$._;r.put=e.state.to(this.put,n,r.put)}function a(t){t.$&&(this.cat.stop=this.stop,t.$._.on("in",t),this.cat.stop=null)}function u(t,e){if(t!==this.graph[e])return!0}e.on._put=function(o,i){var c=i._,s={$:i,graph:c.graph,put:{},map:{},souls:{},machine:e.state(),ack:o["@"],cat:c,stop:{}};if(e.obj.map(o.put,u,s)){if(e.graph.is(o.put,null,t,s)||(s.err="Error: Invalid graph!"),s.err)return c.on("in",{"@":o["#"],err:e.log(s.err)});if(v(s.put,n,s),s.async||v(s.map,a,s),r!==s.defer){var f=s.defer-s.machine;setTimeout((function(){e.on._put(o,i)}),f>MD?MD:f)}s.diff&&c.on("put",p(o,{put:s.diff}))}},e.on._get=function(t,n){var r=n._,o=t.get,i=o[g],a=r.graph[i],u=o[b],c=(r.next||(r.next={}))[i],s=(t._||"").DBG=t.DBG;if(s&&(s.g=+new Date),!a)return r.on("get",t);if(u){if("string"!=typeof u||!d(a,u))return r.on("get",t);a=e.state.to(a,u)}else a=e.window?e.obj.copy(a):a;a=e.graph.node(a);var f=function(){};f.ram=f.faith=!0,f.$=t.$,s&&(s.ga=+new Date),r.on("in",{"@":t["#"],put:a,ram:1,$:n,_:f}),s&&(s.gm=+new Date),r.on("get",t),s&&(s.gd=+new Date)}}(),e.chain.opt=function(t){var n=this._,r=(t=t||{}).peers||t;return h(t)||(t={}),h(n.opt)||(n.opt=t),s(r)&&(r=[r]),u(r)&&(r=v(r,(function(t,e,n){(e={}).id=e.url=t,n(t,e)})),h(n.opt.peers)||(n.opt.peers={}),n.opt.peers=p(r,n.opt.peers)),n.opt.peers=n.opt.peers||{},v(t,(function t(e,n){!d(this,n)||c.is(e)||l.empty(e)?this[n]=e:e&&e.constructor!==Object&&!u(e)||v(e,t,this[n])}),n.opt),e.on("opt",n),e.obj.native(),this},e.obj.native=function(){var t=Object.prototype;for(var e in t)console.log("Native Object.prototype polluted, reverting",e),delete t[e]};var r,a,u=e.list.is,c=e.text,s=c.is,f=c.random,l=e.obj,h=l.is,d=l.has,p=l.to,v=l.map,y=e.state.ify,m=e.state.is,g=e.val.link._,b=".",w=e.node._,_=e.val.is,k=e.state._,j={};(e.log=function(){return!e.log.off&&a.log.apply(a,arguments),[].slice.call(arguments).join(" ")}).once=function(t,n,r){return(r=e.log.once)[t]=r[t]||0,r[t]++||e.log(n)},"undefined"!=typeof window&&((window.GUN=window.Gun=e).window=window);try{void 0!==i&&(i.exports=e)}catch(t){}t.exports=e,(e.window||"").console=(e.window||"").console||{log:function(){}},(a=console).only=function(t,e){return a.only.i&&t===a.only.i&&a.only.i++&&(a.log.apply(a,arguments)||e)},e.log.once("welcome","Hello wonderful person! :) Thanks for using GUN, please ask for help on http://chat.gun.eco if anything takes you longer than 5min to figure out!")}))(o,"./root"),o((function(){var t=o("./root");t.chain.back=function(r,o){if(-1===(r=r||1)||1/0===r)return this._.root.$;if(1===r)return(this._.back||this._).$;var i=this._;if("string"==typeof r&&(r=r.split(".")),r instanceof Array){for(var a=0,u=r.length,c=i;a<u;a++)c=(c||n)[r[a]];return e!==c?o?this:c:(c=i.back)?c.$.back(r,o):void 0}if("function"==typeof r){var s;for(c={back:i};(c=c.back)&&e===(s=r(c,o)););return s}return t.num.is(r)?(i.back||i).$.back(r-1):this};var e,n={}}))(o,"./back"),o((function(){function t(t){var e,n,r=this.as,o=r.back,i=r.root;if(t.$||(t.$=r.$),this.to.next(t),e=t.get){if(r.lex&&(t.get=v(r.lex,t.get)),e["#"]||r.soul){if(e["#"]=e["#"]||r.soul,t["#"]||(t["#"]=m(9)),o=i.$.get(e["#"])._,e=e["."]){if(d(o.put,e)){if((n=(a=o.$.get(e)._).ack)||(a.ack=-1),o.on("in",{$:o.$,put:s.state.to(o.put,e),get:o.get}),n)return}else if("string"!=typeof e){var a={},u=(o.put||{})._;if(s.obj.map(o.put,(function(t,n){s.text.match(n,e)&&(a[n]=t)})),s.obj.empty(a)||(a._=u,o.on("in",{$:o.$,put:a,get:o.get})),n=r.lex){if(n=n._||(n._=function(){}),o.ack<n.ask&&(n.ask=o.ack),n.ask)return;n.ask=1}}}else{if((n=o.ack)||(o.ack=-1),d(o,"put")&&o.on("in",o),n&&f!==o.put)return;t.$=o.$}return i.ask(c,t),i.on("in",t)}if(i.now&&(i.now[r.id]=i.now[r.id]||!0,r.pass={}),e["."])return r.get?(t={get:{".":r.get},$:r.$},o.ask||(o.ask={}),o.ask[r.get]=t.$._,o.on("out",t)):o.on("out",t={get:{},$:r.$});if(r.ack=r.ack||-1,r.get)return t.$=r.$,e["."]=r.get,(o.ask||(o.ask={}))[r.get]=t.$._,o.on("out",t)}return o.on("out",t)}function e(t){var e,o,i=this,c=i.as,h=c.root,m=(t.$||l)._||l,g=t.put;if(c.get&&t.get!==c.get&&(t=v(t,{get:c.get})),c.has&&m!==c&&(t=v(t,{$:c.$}),m.ack&&(c.ack=m.ack)),f===g){if(o=m.put,i.to.next(t),c.soul)return;if(f===o&&f!==m.put)return;return r(c,t,i),c.has&&u(c,t),p(m.echo,c.id),void p(c.map,m.id)}if(c.soul)return i.to.next(t),r(c,t,i),void(c.next&&y(g,a,{msg:t,cat:c}));if(!(e=s.val.link.is(g)))return s.val.is(g)?(c.has||c.soul?u(c,t):(m.has||m.soul)&&((m.echo||(m.echo={}))[c.id]=m.echo[m.id]||c,(c.map||(c.map={}))[m.id]=c.map[m.id]||{at:m}),i.to.next(t),void r(c,t,i)):(c.has&&m!==c&&d(m,"put")&&(c.put=m.put),(e=s.node.soul(g))&&m.has&&(m.put=c.root.$.get(e)._.put),o=(h.stop||{})[m.id],i.to.next(t),n(c,t,m,e),r(c,t,i),void(c.next&&y(g,a,{msg:t,cat:c})));(o=(o=h.stop||{})[m.id]||(o[m.id]={})).is=o.is||m.put,o[c.id]=m.put||!0,i.to.next(t),n(c,t,m,e),r(c,t,i)}function n(t,e,r,o){if(o&&g!==t.get){var i=t.root.$.get(o)._;t.has?r=i:r.has&&n(r,e,r,o),r!==t&&(r.$||(r={}),(r.echo||(r.echo={}))[t.id]=r.echo[t.id]||t,t.has&&!(t.map||l)[r.id]&&u(t,e),(o!==(i=r.id?(t.map||(t.map={}))[r.id]=t.map[r.id]||{at:r}:{}).link||i.pass||t.pass)&&(t.pass&&(s.obj.map(t.map,(function(t){t.pass=!0})),p(t,"pass")),i.pass&&p(i,"pass"),t.has&&(t.link=o),function(t,e){var n=t.root.$.get(e)._,r=t.lex;if((t.ack||r)&&((r=r||{})["#"]=e,n.on("out",{get:r}),!t.ask))return;n=t.ask,s.obj.del(t,"ask"),y(n||t.next,(function(t,n){var r=t.lex||{};r["#"]=e,r["."]=r["."]||n,t.on("out",{get:r})})),s.obj.del(t,"ask")}(t,i.link=o)))}}function r(t,e){t.echo&&y(t.echo,i,e)}function i(t){t&&t.on&&t.on("in",this)}function a(t,e){var n,r,o,i=this.cat.next||l,a=this.msg;(g!==e||i[e])&&(r=i[e])&&(r.has?(f!==r.put&&s.val.link.is(t)||(r.put=t),n=r.$):(o=a.$)&&(o=(n=a.$.get(e))._,f!==o.put&&s.val.link.is(t)||(o.put=t)),r.on("in",{put:t,get:e,$:n,via:a}))}function u(t,e){if(t.has||t.soul){var n=t.map;t.map=null,t.has&&(t.dub&&t.root.stop&&(t.dub=null),t.link=null),(t.pass||e["@"]||null!==n)&&(f===n&&s.val.link.is(t.put)||(y(n,(function(e){(e=e.at)&&p(e.echo,t.id)})),n=t.put,y(t.next,(function(e,r){if(f===n&&f!==t.put)return!0;e.put=f,e.ack&&(e.ack=-1),e.on("in",{get:r,$:e.$,put:f})}))))}}function c(t){var e=this.as,n=e.get||"",r=e.$._,o=(t.put||"")[n["#"]];if(r.ack&&(r.ack=r.ack+1||1),t.put&&("string"!=typeof n["."]||d(o,r.get)))g!=n["."]?(r.$===(t._||"").$&&(t._.miss=r.put===f),s.on.put(t)):r.on("in",{get:r.get,put:s.val.link.ify(n["#"]),$:r.$,"@":t["@"]});else{if(r.put!==f)return;r.on("in",{get:r.get,put:r.put=f,$:r.$,"@":t["@"]})}}var s=o("./root");s.chain.chain=function(n){var r,o=this,i=o._,a=new(n||o).constructor(o),u=a._;return u.root=r=i.root,u.id=++r.once,u.back=o._,u.on=s.on,u.on("in",e,u),u.on("out",t,u),a};var f,l={},h=s.obj,d=h.has,p=h.del,v=h.to,y=h.map,m=s.text.random,g=s.node._}))(o,"./chain"),o((function(){function t(t){var e,o=this,i=o.as,u=i.at.root,s=(t.$||{})._||{},f=t.put||s.put;if((e=u.now)&&o!==e[i.now])return o.to.next(t);if(o.seen&&s.id&&o.seen[s.id])return o.to.next(t);if((e=f)&&e[c._]&&(e=c.is(e))&&(e=(t.$$=s.root.$.get(e))._,r!==e.put&&(t=a(t,{put:f=e.put}))),(e=u.mum)&&s.id){var l=s.id+(o.id||(o.id=n.text.random(9)));if(e[l])return;r===f||c.is(f)||(e[l]=!0)}i.use(t,o),o.stun?o.stun=null:o.to.next(t)}function e(t){var e=this.on;if(!t||e.soul||e.has)return this.off();if(t=(t=(t=t.$||t)._||t).id){var n;if((n=this.seen||(this.seen={}))[t])return!0;n[t]=!0}}var n=o("./root");n.chain.get=function(o,a,l){var h;if("string"!=typeof o){if("function"==typeof o){if(!0===a)return function(t,e,n,o){var i,a=t._,u=0;(i=a.soul||a.link||a.dub)?e(i,o,a):a.jam?a.jam.push([e,o]):(a.jam=[[e,o]],t.get((function(t,e){if(!(r===t.put&&!a.root.opt.super&&(i=Object.keys(a.root.opt.peers).length)&&++u<=i)){e.rid(t);var n,o=(o=t.$)&&o._||{},f=0;for(i=a.jam,delete a.jam;n=i[f++];){var l=n[0];n=n[1],l&&l(o.link||o.soul||c.is(t.put)||s(t.put)||o.dub,n,t,e)}}}),{out:{get:{".":!0}}}))}(this,o,0,l),this;var d,p=(h=this)._,v=p.root,y=v.now;(l=a||{}).at=p,l.use=o,l.out=l.out||{},l.out.get=l.out.get||{},(d=p.on("in",t,l)).rid=e,(v.now={$:1})[l.now=p.id]=d;var m=v.mum;return v.mum={},p.on("out",l.out),v.mum=m,v.now=y,h}return u(o)?this.get(""+o,a,l):(y=c.is(o))?this.get(y,a,l):i.is(o)?(h=this,(y=((y=o["#"])||f)["="]||y)&&(h=h.get(y)),h._.lex=o,h):((l=this.chain())._.err={err:n.log("Invalid get request!",o)},a&&a.call(l,l._.err),l)}if(0==o.length)return(l=this.chain())._.err={err:n.log("Invalid zero length string key!",o)},null;return(h=(this._.next||f)[o])||(h=function(t,e){var n=e._,r=n.next,o=e.chain()._;return r||(r=n.next={}),r[o.get=t]=o,e===n.root.$?o.soul=t:(n.soul||n.has)&&(o.has=t),o}(o,this)),h=h.$,(y=this._.stun)&&(h._.stun=h._.stun||y),a&&"function"==typeof a&&h.get(a,l),h};var r,i=n.obj,a=n.obj.to,u=n.num.is,c=n.val.link,s=n.node.soul,f={}}))(o,"./get"),o((function(){function t(t){t&&t()}function e(){var t=this;t.graph&&l(t.stun)&&(t.res=t.res||function(t){t&&t()},t.res((function(){delete t.via._.stun;var e=t.$.back(-1)._,n=e.ask((function(n){e.root.on("ack",n),n.err&&u.log(n),++r>(t.acks||0)&&this.off(),t.ack&&t.ack(n,this)}),t.opt),r=0,o=e.root.now;c.del(e.root,"now");var i=e.root.mum;e.root.mum={},t.ref._.on("out",{$:t.ref,put:t.out=t.env.graph,opt:t.opt,"#":n}),e.root.mum=i?c.to(i,e.root.mum):i,e.root.now=o,t.via._.on("res",{}),delete t.via._.tag.res}),t),t.res&&t.res())}function n(t,e,n,o){var i=this,a=u.is(t);!e&&o.path.length&&(i.res||p)((function(){for(var e=o.path,n=i.ref,c=0,s=e.length;c<s;c++)n=n.get(e[c]);a&&(n=t);var f=n._.dub;if(f||(f=u.node.soul(o.obj)))return n.back(-1).get(f),void o.soul(f);(i.stun=i.stun||{})[e]=1,n.get(r,!0,{as:{at:o,as:i,p:e,ref:n}})}),{as:i,at:o})}function r(t,e,n,r){e=e.as;var o,a=e.ref,c=e.at,s=[];e=e.as,a.back((function(t){if(o=t.soul||t.link||t.dub)return o;s.push(t.has||t.get)})),s=[o||e.soul].concat(s.reverse());var f=((n||{}).$||{})._||{};t=f.dub=f.dub||t||u.node.soul(c.obj)||u.node.soul(n.put||f.put)||u.val.link.is(n.put||f.put)||s.join("/"),r&&(r.stun=!0),t?i(f,f.dub=t,c,e):e.via.back("opt.uuid")((function(t,n){if(t)return u.log(t);i(f,f.dub=f.dub||n,c,e)}))}function i(t,e,n,r){t.$.back(-1).get(e),n.soul(e),delete r.stun[n.path],r.batch()}function a(t,e,n,r){if(e=e.as,n.$&&n.$._)if(n.err)u.log("Please report this as an issue! Put.any.err");else{var o,i=n.$._,a=i.put,c=e.opt||{};if(!(o=e.ref)||!o._.now){if(r&&(r.stun=!0),e.ref!==e.$){if(!(o=e.$._.get||i.get))return delete e.via._.stun,void u.log("Please report this as an issue! Put.no.get");e.data=f({},o,e.data),o=null}if(undefined===a){if(!i.get)return void delete e.via._.stun;t||(o=i.$.back((function(t){if(t.link||t.soul)return t.link||t.soul;e.data=f({},t.get,e.data)})),e.not=!0),i=(o=o||i.soul||i.link||i.dub)?i.root.$.get(o)._:i,e.soul=o,a=e.data}e.not||(e.soul=e.soul||t)||(e.path&&s(e.data)?e.soul=(c.uuid||e.via.back("opt.uuid")||u.text.random)():(v==i.get&&(e.soul=(i.put||h)["#"]||i.dub),e.soul=e.soul||i.soul||i.link||(c.uuid||e.via.back("opt.uuid")||u.text.random)()),e.soul)?e.ref.put(e.data,e.soul,e):e.via.back("opt.uuid")((function(t,n){if(t)return delete e.via._.stun,u.log(t);e.ref.put(e.data,e.soul=n,e)}))}}}var u=o("./root");u.chain.put=function(r,o,i){var c,l=this,h=l._,p=h.root.$;return(i=i||{}).data=r,i.via=i.$=i.via||i.$||l,"string"==typeof o?i.soul=o:i.ack=i.ack||o,h.soul&&(i.soul=h.soul),i.soul||p===l?s(i.data)?(i.soul=i.soul||(i.not=u.node.soul(i.data)||(i.via.back("opt.uuid")||u.text.random)()),i.via._.stun={},i.soul?(i.$=p.get(i.soul),i.ref=i.$,function(t){t.batch=e;var r=t.env=u.state.map(n,(t.opt||{}).state);if(r.soul=t.soul,t.graph=u.graph.ify(t.data,r,t),r.err)return(t.ack||d).call(t,t.out={err:u.log(r.err)}),void(t.res&&t.res());t.batch()}(i),l):(i.via.back("opt.uuid")((function(t,e){if(t)return u.log(t);(i.ref||i.$).put(i.data,i.soul=e,i)})),l)):((i.ack||d).call(i,i.out={err:u.log("Data saved to the root level of the graph must be a node (an object), not a",typeof i.data,'of "'+i.data+'"!')}),i.res&&i.res(),l):(i.via._.stun={},u.is(r)?(r.get((function(t,e,n){if(!t)return delete i.via._.stun,u.log("The reference you are saving is a",typeof n.put,'"'+n.put+'", not a node (object)!');l.put(u.val.link.ify(t),o,i)}),!0),l):(h.has&&(c=u.val.link.is(r))&&(h.dub=c),i.ref=i.ref||p._===(c=h.back)?l:c.$,i.ref._.soul&&u.val.is(i.data)&&h.get?(i.data=f({},h.get,i.data),i.ref.put(i.data,i.soul,i),l):(i.ref.get(a,!0,{as:i}),i.out||(i.res=i.res||t,i.$._.stun=i.ref._.stun),l)))};String.fromCharCode(31);var c=u.obj,s=c.is,f=c.put,l=c.empty,h={},d=function(){},p=function(t,e){t.call(e||h)},v=u.node._}))(o,"./put"),o((function(t){var e=o("./root");o("./chain"),o("./back"),o("./put"),o("./get"),t.exports=e}))(o,"./index"),o((function(){function t(t,e){var n,o=this,i=t.$,a=((i||{})._||{}).put||t.put;if(r!==a){if(n=t.$$){if(r===(n=t.$$._).put)return;a=n.put}o.change&&(a=t.put),o.as?o.ok.call(o.as,t,e):o.ok.call(i,a,t.get,t,e)}}function e(t,o,i){if(t.$){var a,u,s=this.as,f=t.$,l=f._,h=l.put||t.put;(u=t.$$)&&(a=u=t.$$._,r!==a.put&&(h=a.put)),(u=o.wait)&&(u=u[l.id])&&clearTimeout(u),o.ack=(o.ack||0)+1,!i&&r===h&&!l.root.opt.super&&o.ack<=(s.acks||Object.keys(l.root.opt.peers).length)||(!i&&(r===h||l.soul||l.link||a&&!(0<a.ack))||r===h&&!l.root.opt.super&&(u=Object.keys(l.root.opt.peers).length)&&!i&&(a||l).ack<u?u=(o.wait={})[l.id]=setTimeout((function(){e.call({as:s},t,o,u||1)}),s.wait||99):(a&&r===a.put&&(u=c.is(h))&&(h=n.node.ify({},u)),o.rid?o.rid(t):o.off(),s.ok.call(f||s.$,h,t.get)))}else o.off()}var n=o("./index");n.chain.on=function(e,n,r,o){var i,a=this,u=a._;if("string"==typeof e)return n?(i=u.on(e,n,r||u,o),r&&r.$&&(r.subs||(r.subs=[])).push(i),a):u.on(e);var c=n;return(c=!0===c?{change:!0}:c||{}).at=u,c.ok=e,a.get(t,c),a},n.chain.val=function(t,e){return n.log.once("onceval","Future Breaking API Change: .val -> .once, apologies unexpected."),this.once(t,e)},n.chain.once=function(t,o){var i=this,a=i._,u=a.put;if(0<a.ack&&r!==u)return(t||s).call(i,u,a.get),i;if(!t){n.log.once("valonce","Chainable val is experimental, its behavior and API may change moving forward. Please play with it and report bugs and ideas on how to improve it.");var c=i.chain();return c._.nix=i.once((function(){c._.on("in",i._)})),c}return(o=o||{}).ok=t,o.at=a,o.out={"#":n.text.random(9)},i.get(e,{as:o}),o.async=!0,i},n.chain.off=function(){var t,e=this._,n=e.back;if(n)return e.ack=0,(t=n.next)&&t[e.get]&&u(t,e.get),(t=n.ask)&&u(t,e.get),(t=n.put)&&u(t,e.get),(t=e.soul)&&u(n.root.graph,t),(t=e.map)&&a(t,(function(t){t.link&&n.root.$.get(t.link).off()})),(t=e.next)&&a(t,(function(t){t.$.off()})),e.on("off",{}),this};var r,i=n.obj,a=i.map,u=i.del,c=n.val.link,s=function(){}}))(o,"./on"),o((function(){function t(t){if(!t.put||n.val.is(t.put))return this.to.next(t);this.as.nix&&this.off(),r(t.put,e,{at:this.as,msg:t}),this.to.next(t)}function e(t,e){if(a!==e){var r=this.msg.$,o=this.at,i=r._.lex;i&&!n.text.match(e,i["."]||i["#"]||i)||(((i=r.get(e)._).echo||(i.echo={}))[o.id]=i.echo[o.id]||o)}}var n=o("./index");n.chain.map=function(e){var r,o=this,a=o._;return e?(n.log.once("mapfn","Map functions are experimental, their behavior and API may change moving forward. Please play with it and report bugs and ideas on how to improve it."),r=o.chain(),o.map().on((function(t,o,a,u){var c=(e||i).call(this,t,o,a,u);if(undefined!==c)return t===c?r._.on("in",a):n.is(c)?r._.on("in",c._):void r._.on("in",{get:o,put:c})})),r):((r=a.each)||(a.each=r=o.chain(),r._.nix=o.back("nix"),o.on("in",t,r._)),r)};var r=n.obj.map,i=function(){},a=n.node._}))(o,"./map"),o((function(){function t(){return e.state.lex()+e.text.random(7)}var e=o("./index");e.chain.set=function(n,r,o){var i,a=this;return r=r||function(){},(o=o||{}).item=o.item||n,(i=e.node.soul(n))&&(n=e.obj.put({},i,e.val.link.ify(i))),e.is(n)?(n.get((function(t,i,u){if(t||!n._.stun)return t?void a.put(e.obj.put({},t,e.val.link.ify(t)),r,o):r.call(a,{err:e.log('Only a node can be linked! Not "'+u.put+'"!')});n._.on("res",(function(){this.off(),a.set(n,r,o)}))}),!0),n):(e.obj.is(n)&&(i=i||e.node.soul(n)||t()),a.get(i||t()).put(n,r,o))}}))(o,"./set"),o((function(){if("undefined"!=typeof Gun){var t;try{t=(Gun.window||function(){}).localStorage}catch(t){}t||(Gun.log("Warning: No localStorage exists to persist data to!"),t={setItem:function(t,e){this[t]=e},removeItem:function(t){delete this[t]},getItem:function(t){return this[t]}}),Gun.on("create",(function(e){function n(t){if(!t.err&&t.ok){var e=t["@"];setTimeout((function(){Gun.obj.map(u,(function(t,n){Gun.obj.map(t,(function(n,r){e===n&&delete t[r]})),c(t)&&delete u[n]})),h()}),o.wait||1)}}var r=this.to,o=e.opt;if(e.once)return r.next(e);if(!1===o.localStorage)return r.next(e);o.prefix=o.file||"gun/";var i,a,u=Gun.obj.ify(t.getItem("gap/"+o.prefix))||{},c=Gun.obj.empty;if(!c(u)){var s=Gun.obj.ify(t.getItem(o.prefix))||{},f={};Gun.obj.map(u,(function(t,e){Gun.obj.map(t,(function(t,n){f[e]=Gun.state.to(s[e],n,f[e])}))})),setTimeout((function(){e.on("out",{put:f,"#":e.ask(n)})}),1)}e.on("out",(function(t){t.lS||(Gun.is(t.$)&&t.put&&!t["@"]&&(i=t["#"],Gun.graph.is(t.put,null,l),a||(a=setTimeout(h,o.wait||1))),this.to.next(t))})),e.on("ack",n),r.next(e);var l=function(t,e,n,r){(u[r]||(u[r]={}))[e]=i},h=function(){clearTimeout(a),a=!1;try{t.setItem("gap/"+o.prefix,JSON.stringify(u))}catch(t){Gun.log(err=t||"localStorage failure")}}})),Gun.on("create",(function(e){this.to.next(e);var n=e.opt;if(!e.once&&!1!==n.localStorage){n.prefix=n.file||"gun/";var r,o={},i=0,a=Gun.obj.ify(t.getItem(n.prefix))||{};e.on("localStorage",a),e.on("put",(function(t){this.to.next(t);var e,c=t.put,s=c["#"];if(a[s]=Gun.state.ify(a[s],c["."],c[">"],c[":"],s),t["@"]||((o[t["#"]]=e=(t._||"").lot||{}).lS=(e.lS||0)+1),(i+=1)>=(n.batch||1e3))return u();r||(r=setTimeout(u,n.wait||1))})),e.on("get",(function(t){function n(){if(i&&(r=i["#"])){var n=i["."];(o=a[r]||undefined)&&n&&(o=Gun.state.to(o,n)),e.on("in",{"@":t["#"],put:Gun.graph.node(o),lS:1})}}this.to.next(t);var r,o,i=t.get;Gun.debug?setTimeout(n,1):n()}));var u=function u(c){var s;i=0,clearTimeout(r),r=!1;var f=o;o={},c&&(a=c);try{t.setItem(n.prefix,JSON.stringify(a))}catch(t){Gun.log(s=(t||"localStorage failure")+" Consider using GUN's IndexedDB plugin for RAD for more storage space, https://gun.eco/docs/RAD#install"),e.on("localStorage:error",{err:s,file:n.prefix,flush:a,retry:u})}(s||Gun.obj.empty(n.peers))&&Gun.obj.map(f,(function(t,n){if(t){if(t.more)return void(o[n]=t);t.s!==t.lS&&(s="localStorage batch not same.")}e.on("in",{"@":n,err:s,ok:0})}))}}}))}}))(o,"./adapters/localStorage"),o((function(t){var e=o("../type");!function(){function t(t,r){var o;if(!(r instanceof Object))return r;var i=+new Date;return e.obj.map(Object.keys(r).sort(),n,{to:o={},on:r}),console.STAT&&console.STAT(i,+new Date-i,"sort"),o}function n(t){this.to[t]=this.on[t]}var r=JSON.stringify;e.obj.hash=function(n,o){if(o||undefined!==(n=r(n,t)))return e.text.hash(o||n||"")},e.obj.hash.sort=t}();var n=e.obj.is;try{t.exports=function(t){function r(t){var e=t.batch,n="string"==typeof e;if(n&&(e+="]"),t.batch=t.tail=null,e&&!(n?3>e.length:!e.length)){if(!n)try{e=1===e.length?e[0]:JSON.stringify(e)}catch(t){return a.log("DAM JSON stringify error",t)}e&&o(e,t)}}function o(t,e){try{var n=e.wire;e.say?e.say(t):n.send&&n.send(t),i.say.d+=t.length||0,++i.say.c}catch(n){(e.queue=e.queue||[]).push(t)}}var i=function(){},a=t.opt||{};a.log=a.log||console.log,a.gap=a.gap||a.wait||0,a.pack=a.pack||.3*(a.memory?1e3*a.memory*1e3:1399e6),a.puff=a.puff||9;var u,c,s,f=setTimeout.puff||setTimeout,l=t.dup,h=l.check,d=l.track,p=i.hear=function(o,u){if(o){if(a.pack<=o.length)return i.say({dam:"!",err:"Message too big!"},u);var c,s,l,v=o[0];if(i===this&&(p.d+=o.length||0,++p.c),"["!==v){if("{"===v||(o["#"]||n(o))&&(c=o)){try{c=c||JSON.parse(o)}catch(t){return a.log("DAM JSON parse error",t)}if(!c)return;if(c.DBG&&(c.DBG=l={DBG:c.DBG}),l&&(l.hp=+new Date),(s=c["#"])||(s=c["#"]=e.text.random(9)),v=h(s))return;if((c._=function(){}).via=i.leap=u,v=c.dam)return(v=i.hear[v])&&v(c,u,t),void d(s);var y,m=+new Date;l&&(l.is=m),t.on("in",c),l&&(l.hd=+new Date),console.STAT&&(y=+new Date-m)>9&&console.STAT(m,y,"msg"),d(s).via=u,i.leap=null}}else{try{c=JSON.parse(o)}catch(t){a.log("DAM JSON parse error",t)}if(o="",!c)return;console.STAT&&console.STAT(+new Date,c.length,"# on hear batch");var g=a.puff;!function t(){for(var e,n=+new Date,o=0;o<g&&(e=c[o++]);)p(e,u);c=c.slice(o),console.STAT&&console.STAT(n,+new Date-n,"hear loop"),r(u),c.length&&f(t,0)}()}}};p.c=p.d=0,c=0,s=i.say=function(t,n){var h,p,v;if((h=this)&&(h=h.to)&&h.next&&h.next(t),!t)return!1;var y=t.DBG;n||(b=+new Date,y&&(y.y=b));var m=t._||(t._=function(){});if((p=t["#"])||(p=t["#"]=e.text.random(9)),(v=m.raw)||(v=i.raw(t)),b&&console.STAT&&console.STAT(b,+new Date-b,"say prep"),!u&&d(p),!n&&(h=t["@"])&&(n=(h=l.s[h])&&(h.via||(h=h.it)&&(h=h._)&&h.via)||i.leap),!n&&t["@"])return console.STAT&&console.STAT(+new Date,++c,"total no peer to ack to"),!1;if(!n&&i.way)return i.way(t);if(n&&n.id){if(!n.wire&&i.wire&&i.wire(n),p!==n.last){if(n.last=p,n===m.via)return!1;if((h=m.to)&&(h[n.url]||h[n.pid]||h[n.id]))return!1;if(n.batch){if(n.tail=(h=n.tail||0)+v.length,n.tail<=a.pack)return void(n.batch+=(h?",":"")+v);r(n)}n.batch="[";var g,b=+new Date;setTimeout((function(){console.STAT&&(g=+new Date-b)>9&&console.STAT(b,g,"0ms TO",p,n.id),r(n)}),a.gap),o(v,n)}}else{if(!e.obj.is(n||a.peers))return!1;var w=a.peers,_=Object.keys(n||a.peers||{});!function e(){var n=+new Date;u=1;var r=m.raw;m.raw=v;for(var o,i=0;i<9&&(o=(_||"")[i++]);)(o=w[o])&&s(t,o);m.raw=r,u=0,_=_.slice(i),console.STAT&&console.STAT(n,+new Date-n,"say loop"),_.length&&(f(e,0),d(t["@"]))}()}},i.say.c=i.say.d=0,function(){i.raw=function(e){if(!e)return"";var n,r=e._||{};if(n=r.raw)return n;if("string"==typeof e)return e;var o=t(e);return r&&(o||"").length<1e5&&(r.raw=o),o};var t=JSON.stringify}(),i.hi=function(n){var r=n.wire||{};n.id?a.peers[n.url||n.id]=n:(r=n.id=n.id||e.text.random(9),i.say({dam:"?",pid:t.opt.pid},a.peers[r]=n),delete l.s[n.last]),n.met=n.met||+new Date,r.hied||t.on(r.hied="hi",n),r=n.queue,n.queue=[],e.obj.map(r,(function(t){o(t,n)})),e.obj.native&&e.obj.native()},i.bye=function(e){t.on("bye",e);var n=+new Date;n-=e.met||n,i.bye.time=((i.bye.time||n)+n)/2},i.hear["!"]=function(t){a.log("Error:",t.err)},i.hear["?"]=function(t,e){t.pid&&(e.pid||(e.pid=t.pid),t["@"])||(i.say({dam:"?",pid:a.pid,"@":t["#"]},e),delete l.s[e.last])},t.on("create",(function(t){t.opt.pid=t.opt.pid||e.text.random(9),this.to.next(t),t.on("out",i.say)})),t.on("bye",(function(t,n){this.to.next(t=a.peers[t.id||t]||t),t.bye?t.bye():(n=t.wire)&&n.close&&n.close(),e.obj.del(a.peers,t.id),t.wire=null}));var v={};return t.on("bye",(function(t,e){this.to.next(t),(e=t.url)&&(v[e]=!0,setTimeout((function(){delete v[e]}),a.lack||9e3))})),t.on("hi",(function(n,r){this.to.next(n),(r=n.url)&&v[r]&&(delete v[r],a.super||e.obj.map(t.next,(function(o,a){(r={})[a]=t.graph[a],i.say({"##":e.obj.hash(r),get:{"#":a}},n)})))})),i}}catch(t){}}))(o,"./adapters/mesh"),o((function(){var t=o("../index");t.Mesh=o("./mesh"),t.on("opt",(function(e){function n(t){try{if(!t||!t.url)return n&&n(t);var e=t.url.replace(/^http/,"ws"),n=t.wire=new i.WebSocket(e);return n.onclose=function(){i.mesh.bye(t),o(t)},n.onerror=function(){o(t)},n.onopen=function(){i.mesh.hi(t)},n.onmessage=function(e){e&&i.mesh.hear(e.data||e,t)},n}catch(t){}}function o(t){clearTimeout(t.defer),s&&t.retry<=0||(t.retry=(t.retry||i.retry||60)-1,t.defer=setTimeout((function e(){if(s&&s.hidden)return setTimeout(e,2e3);n(t)}),2e3))}this.to.next(e);var i=e.opt;if(!e.once&&!1!==i.WebSocket){var a;"undefined"!=typeof window&&(a=window),void 0!==r&&(a=r),a=a||{};var u=i.WebSocket||a.WebSocket||a.webkitWebSocket||a.mozWebSocket;if(u){i.WebSocket=u;var c=i.mesh=i.mesh||t.Mesh(e);c.wire=i.wire=n,setTimeout((function(){e.on("out",{dam:"hi"})}),1);var s="undefined"!=typeof document&&document}}}))}))(o,"./adapters/websocket")}()}).call(this,n("RoC8")(t),n("oPUo").setImmediate,n("pCvA"))},RoC8:function(t){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},XgYJ:function(t,e,n){(function(e){t.exports=function t(e,n,r){function o(a){if(!n[a]){if(!e[a]){if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};e[a][0].call(c.exports,(function(t){return o(e[a][1][t]||t)}),c,c.exports,t,e,n,r)}return n[a].exports}for(var i=!1,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(t,n){(function(t){"use strict";function e(){f=!0;for(var t,e,n=l.length;n;){for(e=l,l=[],t=-1;++t<n;)e[t]();n=l.length}f=!1}function r(t){1!==l.push(t)||f||o()}var o,i=t.MutationObserver||t.WebKitMutationObserver;if(i){var a=0,u=new i(e),c=t.document.createTextNode("");u.observe(c,{characterData:!0}),o=function(){c.data=a=++a%2}}else if(t.setImmediate||void 0===t.MessageChannel)o="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var n=t.document.createElement("script");n.onreadystatechange=function(){e(),n.onreadystatechange=null,n.parentNode.removeChild(n),n=null},t.document.documentElement.appendChild(n)}:function(){setTimeout(e,0)};else{var s=new t.MessageChannel;s.port1.onmessage=e,o=function(){s.port2.postMessage(0)}}var f,l=[];n.exports=r}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e){"use strict";function n(){}function r(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=m,this.queue=[],this.outcome=void 0,t!==n&&u(this,t)}function o(t,e,n){this.promise=t,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function i(t,e,n){d((function(){var r;try{r=e(n)}catch(e){return p.reject(t,e)}r===t?p.reject(t,new TypeError("Cannot resolve promise with itself")):p.resolve(t,r)}))}function a(t){var e=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof e)return function(){e.apply(t,arguments)}}function u(t,e){function n(e){i||(i=!0,p.reject(t,e))}function r(e){i||(i=!0,p.resolve(t,e))}function o(){e(r,n)}var i=!1,a=c(o);"error"===a.status&&n(a.value)}function c(t,e){var n={};try{n.value=t(e),n.status="success"}catch(t){n.status="error",n.value=t}return n}function s(t){return t instanceof this?t:p.resolve(new this(n),t)}function f(t){var e=new this(n);return p.reject(e,t)}function l(t){function e(t,e){function n(t){a[e]=t,++u!==o||i||(i=!0,p.resolve(s,a))}r.resolve(t).then(n,(function(t){i||(i=!0,p.reject(s,t))}))}var r=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var o=t.length,i=!1;if(!o)return this.resolve([]);for(var a=new Array(o),u=0,c=-1,s=new this(n);++c<o;)e(t[c],c);return s}function h(t){function e(t){r.resolve(t).then((function(t){i||(i=!0,p.resolve(u,t))}),(function(t){i||(i=!0,p.reject(u,t))}))}var r=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var o=t.length,i=!1;if(!o)return this.resolve([]);for(var a=-1,u=new this(n);++a<o;)e(t[a]);return u}var d=t(1),p={},v=["REJECTED"],y=["FULFILLED"],m=["PENDING"];e.exports=r,r.prototype.catch=function(t){return this.then(null,t)},r.prototype.then=function(t,e){if("function"!=typeof t&&this.state===y||"function"!=typeof e&&this.state===v)return this;var r=new this.constructor(n);return this.state!==m?i(r,this.state===y?t:e,this.outcome):this.queue.push(new o(r,t,e)),r},o.prototype.callFulfilled=function(t){p.resolve(this.promise,t)},o.prototype.otherCallFulfilled=function(t){i(this.promise,this.onFulfilled,t)},o.prototype.callRejected=function(t){p.reject(this.promise,t)},o.prototype.otherCallRejected=function(t){i(this.promise,this.onRejected,t)},p.resolve=function(t,e){var n=c(a,e);if("error"===n.status)return p.reject(t,n.value);var r=n.value;if(r)u(t,r);else{t.state=y,t.outcome=e;for(var o=-1,i=t.queue.length;++o<i;)t.queue[o].callFulfilled(e)}return t},p.reject=function(t,e){t.state=v,t.outcome=e;for(var n=-1,r=t.queue.length;++n<r;)t.queue[n].callRejected(e);return t},r.resolve=s,r.reject=f,r.all=l,r.race=h},{1:1}],3:[function(t){(function(e){"use strict";"function"!=typeof e.Promise&&(e.Promise=t(2))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(t){return}}function o(){try{if(!bt||!bt.open)return!1;var t="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),e="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!t||e)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(t){return!1}}function i(t,e){t=t||[],e=e||{};try{return new Blob(t,e)}catch(o){if("TypeError"!==o.name)throw o;for(var n=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),r=0;r<t.length;r+=1)n.append(t[r]);return n.getBlob(e.type)}}function a(t,e){e&&t.then((function(t){e(null,t)}),(function(t){e(t)}))}function u(t,e,n){"function"==typeof e&&t.then(e),"function"==typeof n&&t.catch(n)}function c(t){return"string"!=typeof t&&(console.warn(t+" used as a key, but it is not a string."),t=String(t)),t}function s(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}function f(t){for(var e=t.length,n=new ArrayBuffer(e),r=new Uint8Array(n),o=0;o<e;o++)r[o]=t.charCodeAt(o);return n}function l(t){return new wt((function(e){var n=t.transaction(_t,Pt),r=i([""]);n.objectStore(_t).put(r,"key"),n.onabort=function(t){t.preventDefault(),t.stopPropagation(),e(!1)},n.oncomplete=function(){var t=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);e(n||!t||parseInt(t[1],10)>=43)}})).catch((function(){return!1}))}function h(t){return"boolean"==typeof kt?wt.resolve(kt):l(t).then((function(t){return kt=t}))}function d(t){var e=jt[t.name],n={};n.promise=new wt((function(t,e){n.resolve=t,n.reject=e})),e.deferredOperations.push(n),e.dbReady=e.dbReady?e.dbReady.then((function(){return n.promise})):n.promise}function p(t){var e=jt[t.name].deferredOperations.pop();if(e)return e.resolve(),e.promise}function v(t,e){var n=jt[t.name].deferredOperations.pop();if(n)return n.reject(e),n.promise}function y(t,e){return new wt((function(n,r){if(jt[t.name]=jt[t.name]||P(),t.db){if(!e)return n(t.db);d(t),t.db.close()}var o=[t.name];e&&o.push(t.version);var i=bt.open.apply(bt,o);e&&(i.onupgradeneeded=function(e){var n=i.result;try{n.createObjectStore(t.storeName),e.oldVersion<=1&&n.createObjectStore(_t)}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+t.name+'" has been upgraded from version '+e.oldVersion+" to version "+e.newVersion+', but the storage "'+t.storeName+'" already exists.')}}),i.onerror=function(t){t.preventDefault(),r(i.error)},i.onsuccess=function(){n(i.result),p(t)}}))}function m(t){return y(t,!1)}function g(t){return y(t,!0)}function b(t,e){if(!t.db)return!0;var n=!t.db.objectStoreNames.contains(t.storeName),r=t.version>t.db.version;if(t.version<t.db.version&&(t.version!==e&&console.warn('The database "'+t.name+"\" can't be downgraded from version "+t.db.version+" to version "+t.version+"."),t.version=t.db.version),r||n){if(n){var o=t.db.version+1;o>t.version&&(t.version=o)}return!0}return!1}function w(t){return new wt((function(e,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){var r=btoa(n.target.result||"");e({__local_forage_encoded_blob:!0,data:r,type:t.type})},r.readAsBinaryString(t)}))}function _(t){return i([f(atob(t.data))],{type:t.type})}function k(t){return t&&t.__local_forage_encoded_blob}function j(t){var e=this,n=e._initReady().then((function(){var t=jt[e._dbInfo.name];if(t&&t.dbReady)return t.dbReady}));return u(n,t,t),n}function S(t){d(t);for(var e=jt[t.name],n=e.forages,r=0;r<n.length;r++){var o=n[r];o._dbInfo.db&&(o._dbInfo.db.close(),o._dbInfo.db=null)}return t.db=null,m(t).then((function(e){return t.db=e,b(t)?g(t):e})).then((function(r){t.db=e.db=r;for(var o=0;o<n.length;o++)n[o]._dbInfo.db=r})).catch((function(e){throw v(t,e),e}))}function x(t,e,n,r){void 0===r&&(r=1);try{var o=t.db.transaction(t.storeName,e);n(null,o)}catch(o){if(r>0&&(!t.db||"InvalidStateError"===o.name||"NotFoundError"===o.name))return wt.resolve().then((function(){if(!t.db||"NotFoundError"===o.name&&!t.db.objectStoreNames.contains(t.storeName)&&t.version<=t.db.version)return t.db&&(t.version=t.db.version+1),g(t)})).then((function(){return S(t).then((function(){x(t,e,n,r-1)}))})).catch(n);n(o)}}function P(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function O(t){function e(){return wt.resolve()}var n=this,r={db:null};if(t)for(var o in t)r[o]=t[o];var i=jt[r.name];i||(i=P(),jt[r.name]=i),i.forages.push(n),n._initReady||(n._initReady=n.ready,n.ready=j);for(var a=[],u=0;u<i.forages.length;u++){var c=i.forages[u];c!==n&&a.push(c._initReady().catch(e))}var s=i.forages.slice(0);return wt.all(a).then((function(){return r.db=i.db,m(r)})).then((function(t){return r.db=t,b(r,n._defaultConfig.version)?g(r):t})).then((function(t){r.db=i.db=t,n._dbInfo=r;for(var e=0;e<s.length;e++){var o=s[e];o!==n&&(o._dbInfo.db=r.db,o._dbInfo.version=r.version)}}))}function T(t,e){var n=this;t=c(t);var r=new wt((function(e,r){n.ready().then((function(){x(n._dbInfo,xt,(function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName).get(t);a.onsuccess=function(){var t=a.result;void 0===t&&(t=null),k(t)&&(t=_(t)),e(t)},a.onerror=function(){r(a.error)}}catch(t){r(t)}}))})).catch(r)}));return a(r,e),r}function I(t,e){var n=this,r=new wt((function(e,r){n.ready().then((function(){x(n._dbInfo,xt,(function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName).openCursor(),u=1;a.onsuccess=function(){var n=a.result;if(n){var r=n.value;k(r)&&(r=_(r));var o=t(r,n.key,u++);void 0!==o?e(o):n.continue()}else e()},a.onerror=function(){r(a.error)}}catch(t){r(t)}}))})).catch(r)}));return a(r,e),r}function A(t,e,n){var r=this;t=c(t);var o=new wt((function(n,o){var i;r.ready().then((function(){return i=r._dbInfo,"[object Blob]"===St.call(e)?h(i.db).then((function(t){return t?e:w(e)})):e})).then((function(e){x(r._dbInfo,Pt,(function(i,a){if(i)return o(i);try{var u=a.objectStore(r._dbInfo.storeName);null===e&&(e=void 0);var c=u.put(e,t);a.oncomplete=function(){void 0===e&&(e=null),n(e)},a.onabort=a.onerror=function(){o(c.error?c.error:c.transaction.error)}}catch(t){o(t)}}))})).catch(o)}));return a(o,n),o}function R(t,e){var n=this;t=c(t);var r=new wt((function(e,r){n.ready().then((function(){x(n._dbInfo,Pt,(function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName).delete(t);i.oncomplete=function(){e()},i.onerror=function(){r(a.error)},i.onabort=function(){r(a.error?a.error:a.transaction.error)}}catch(t){r(t)}}))})).catch(r)}));return a(r,e),r}function E(t){var e=this,n=new wt((function(t,n){e.ready().then((function(){x(e._dbInfo,Pt,(function(r,o){if(r)return n(r);try{var i=o.objectStore(e._dbInfo.storeName).clear();o.oncomplete=function(){t()},o.onabort=o.onerror=function(){n(i.error?i.error:i.transaction.error)}}catch(t){n(t)}}))})).catch(n)}));return a(n,t),n}function D(t){var e=this,n=new wt((function(t,n){e.ready().then((function(){x(e._dbInfo,xt,(function(r,o){if(r)return n(r);try{var i=o.objectStore(e._dbInfo.storeName).count();i.onsuccess=function(){t(i.result)},i.onerror=function(){n(i.error)}}catch(t){n(t)}}))})).catch(n)}));return a(n,t),n}function N(t,e){var n=this,r=new wt((function(e,r){t<0?e(null):n.ready().then((function(){x(n._dbInfo,xt,(function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName),u=!1,c=a.openKeyCursor();c.onsuccess=function(){var n=c.result;n?0===t||u?e(n.key):(u=!0,n.advance(t)):e(null)},c.onerror=function(){r(c.error)}}catch(t){r(t)}}))})).catch(r)}));return a(r,e),r}function C(t){var e=this,n=new wt((function(t,n){e.ready().then((function(){x(e._dbInfo,xt,(function(r,o){if(r)return n(r);try{var i=o.objectStore(e._dbInfo.storeName).openKeyCursor(),a=[];i.onsuccess=function(){var e=i.result;e?(a.push(e.key),e.continue()):t(a)},i.onerror=function(){n(i.error)}}catch(t){n(t)}}))})).catch(n)}));return a(n,t),n}function $(t,e){e=s.apply(this,arguments);var n=this.config();(t="function"!=typeof t&&t||{}).name||(t.name=t.name||n.name,t.storeName=t.storeName||n.storeName);var r,o=this;if(t.name){var i=t.name===n.name&&o._dbInfo.db?wt.resolve(o._dbInfo.db):m(t).then((function(e){var n=jt[t.name],r=n.forages;n.db=e;for(var o=0;o<r.length;o++)r[o]._dbInfo.db=e;return e}));r=i.then(t.storeName?function(e){if(e.objectStoreNames.contains(t.storeName)){var n=e.version+1;d(t);var r=jt[t.name],o=r.forages;e.close();for(var i=0;i<o.length;i++){var a=o[i];a._dbInfo.db=null,a._dbInfo.version=n}return new wt((function(e,r){var o=bt.open(t.name,n);o.onerror=function(t){o.result.close(),r(t)},o.onupgradeneeded=function(){o.result.deleteObjectStore(t.storeName)},o.onsuccess=function(){var t=o.result;t.close(),e(t)}})).then((function(t){r.db=t;for(var e=0;e<o.length;e++){var n=o[e];n._dbInfo.db=t,p(n._dbInfo)}})).catch((function(e){throw(v(t,e)||wt.resolve()).catch((function(){})),e}))}}:function(e){d(t);var n=jt[t.name],r=n.forages;e.close();for(var o=0;o<r.length;o++)r[o]._dbInfo.db=null;return new wt((function(e,n){var r=bt.deleteDatabase(t.name);r.onerror=r.onblocked=function(t){var e=r.result;e&&e.close(),n(t)},r.onsuccess=function(){var t=r.result;t&&t.close(),e(t)}})).then((function(t){n.db=t;for(var e=0;e<r.length;e++)p(r[e]._dbInfo)})).catch((function(e){throw(v(t,e)||wt.resolve()).catch((function(){})),e}))})}else r=wt.reject("Invalid arguments");return a(r,e),r}function U(){return"function"==typeof openDatabase}function M(t){var e,n,r,o,i,a=.75*t.length,u=t.length,c=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var s=new ArrayBuffer(a),f=new Uint8Array(s);for(e=0;e<u;e+=4)n=Tt.indexOf(t[e]),r=Tt.indexOf(t[e+1]),o=Tt.indexOf(t[e+2]),i=Tt.indexOf(t[e+3]),f[c++]=n<<2|r>>4,f[c++]=(15&r)<<4|o>>2,f[c++]=(3&o)<<6|63&i;return s}function L(t){var e,n=new Uint8Array(t),r="";for(e=0;e<n.length;e+=3)r+=Tt[n[e]>>2],r+=Tt[(3&n[e])<<4|n[e+1]>>4],r+=Tt[(15&n[e+1])<<2|n[e+2]>>6],r+=Tt[63&n[e+2]];return n.length%3==2?r=r.substring(0,r.length-1)+"=":n.length%3==1&&(r=r.substring(0,r.length-2)+"=="),r}function q(t,e){var n="";if(t&&(n=Wt.call(t)),t&&("[object ArrayBuffer]"===n||t.buffer&&"[object ArrayBuffer]"===Wt.call(t.buffer))){var r,o=Rt;t instanceof ArrayBuffer?(r=t,o+=Dt):(r=t.buffer,"[object Int8Array]"===n?o+=Ct:"[object Uint8Array]"===n?o+=$t:"[object Uint8ClampedArray]"===n?o+=Ut:"[object Int16Array]"===n?o+=Mt:"[object Uint16Array]"===n?o+=qt:"[object Int32Array]"===n?o+=Lt:"[object Uint32Array]"===n?o+=Bt:"[object Float32Array]"===n?o+=Kt:"[object Float64Array]"===n?o+=Ft:e(new Error("Failed to get type for BinaryArray"))),e(o+L(r))}else if("[object Blob]"===n){var i=new FileReader;i.onload=function(){var n=It+t.type+"~"+L(this.result);e(Rt+Nt+n)},i.readAsArrayBuffer(t)}else try{e(JSON.stringify(t))}catch(n){console.error("Couldn't convert value into a JSON string: ",t),e(null,n)}}function B(t){if(t.substring(0,Et)!==Rt)return JSON.parse(t);var e,n=t.substring(Gt),r=t.substring(Et,Gt);if(r===Nt&&At.test(n)){var o=n.match(At);e=o[1],n=n.substring(o[0].length)}var a=M(n);switch(r){case Dt:return a;case Nt:return i([a],{type:e});case Ct:return new Int8Array(a);case $t:return new Uint8Array(a);case Ut:return new Uint8ClampedArray(a);case Mt:return new Int16Array(a);case qt:return new Uint16Array(a);case Lt:return new Int32Array(a);case Bt:return new Uint32Array(a);case Kt:return new Float32Array(a);case Ft:return new Float64Array(a);default:throw new Error("Unkown type: "+r)}}function K(t,e,n,r){t.executeSql("CREATE TABLE IF NOT EXISTS "+e.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function F(t){var e=this,n={db:null};if(t)for(var r in t)n[r]="string"!=typeof t[r]?t[r].toString():t[r];var o=new wt((function(t,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(t){return r(t)}n.db.transaction((function(o){K(o,n,(function(){e._dbInfo=n,t()}),(function(t,e){r(e)}))}),r)}));return n.serializer=Ht,o}function G(t,e,n,r,o,i){t.executeSql(n,r,o,(function(t,a){a.code===a.SYNTAX_ERR?t.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[e.storeName],(function(t,u){u.rows.length?i(t,a):K(t,e,(function(){t.executeSql(n,r,o,i)}),i)}),i):i(t,a)}),i)}function W(t,e){var n=this;t=c(t);var r=new wt((function(e,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){G(n,o,"SELECT * FROM "+o.storeName+" WHERE key = ? LIMIT 1",[t],(function(t,n){var r=n.rows.length?n.rows.item(0).value:null;r&&(r=o.serializer.deserialize(r)),e(r)}),(function(t,e){r(e)}))}))})).catch(r)}));return a(r,e),r}function H(t,e){var n=this,r=new wt((function(e,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){G(n,o,"SELECT * FROM "+o.storeName,[],(function(n,r){for(var i=r.rows,a=i.length,u=0;u<a;u++){var c=i.item(u),s=c.value;if(s&&(s=o.serializer.deserialize(s)),void 0!==(s=t(s,c.key,u+1)))return void e(s)}e()}),(function(t,e){r(e)}))}))})).catch(r)}));return a(r,e),r}function J(t,e,n,r){var o=this;t=c(t);var i=new wt((function(i,a){o.ready().then((function(){void 0===e&&(e=null);var u=e,c=o._dbInfo;c.serializer.serialize(e,(function(e,s){s?a(s):c.db.transaction((function(n){G(n,c,"INSERT OR REPLACE INTO "+c.storeName+" (key, value) VALUES (?, ?)",[t,e],(function(){i(u)}),(function(t,e){a(e)}))}),(function(e){if(e.code===e.QUOTA_ERR){if(r>0)return void i(J.apply(o,[t,u,n,r-1]));a(e)}}))}))})).catch(a)}));return a(i,n),i}function z(t,e,n){return J.apply(this,[t,e,n,1])}function Q(t,e){var n=this;t=c(t);var r=new wt((function(e,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){G(n,o,"DELETE FROM "+o.storeName+" WHERE key = ?",[t],(function(){e()}),(function(t,e){r(e)}))}))})).catch(r)}));return a(r,e),r}function X(t){var e=this,n=new wt((function(t,n){e.ready().then((function(){var r=e._dbInfo;r.db.transaction((function(e){G(e,r,"DELETE FROM "+r.storeName,[],(function(){t()}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,t),n}function V(t){var e=this,n=new wt((function(t,n){e.ready().then((function(){var r=e._dbInfo;r.db.transaction((function(e){G(e,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],(function(e,n){var r=n.rows.item(0).c;t(r)}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,t),n}function Y(t,e){var n=this,r=new wt((function(e,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){G(n,o,"SELECT key FROM "+o.storeName+" WHERE id = ? LIMIT 1",[t+1],(function(t,n){var r=n.rows.length?n.rows.item(0).key:null;e(r)}),(function(t,e){r(e)}))}))})).catch(r)}));return a(r,e),r}function Z(t){var e=this,n=new wt((function(t,n){e.ready().then((function(){var r=e._dbInfo;r.db.transaction((function(e){G(e,r,"SELECT key FROM "+r.storeName,[],(function(e,n){for(var r=[],o=0;o<n.rows.length;o++)r.push(n.rows.item(o).key);t(r)}),(function(t,e){n(e)}))}))})).catch(n)}));return a(n,t),n}function tt(t){return new wt((function(e,n){t.transaction((function(r){r.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(n,r){for(var o=[],i=0;i<r.rows.length;i++)o.push(r.rows.item(i).name);e({db:t,storeNames:o})}),(function(t,e){n(e)}))}),(function(t){n(t)}))}))}function et(t,e){e=s.apply(this,arguments);var n=this.config();(t="function"!=typeof t&&t||{}).name||(t.name=t.name||n.name,t.storeName=t.storeName||n.storeName);var r,o=this;return a(r=t.name?new wt((function(e){var r;r=t.name===n.name?o._dbInfo.db:openDatabase(t.name,"","",0),e(t.storeName?{db:r,storeNames:[t.storeName]}:tt(r))})).then((function(t){return new wt((function(e,n){t.db.transaction((function(r){function o(t){return new wt((function(e,n){r.executeSql("DROP TABLE IF EXISTS "+t,[],(function(){e()}),(function(t,e){n(e)}))}))}for(var i=[],a=0,u=t.storeNames.length;a<u;a++)i.push(o(t.storeNames[a]));wt.all(i).then((function(){e()})).catch((function(t){n(t)}))}),(function(t){n(t)}))}))})):wt.reject("Invalid arguments"),e),r}function nt(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(t){return!1}}function rt(t,e){var n=t.name+"/";return t.storeName!==e.storeName&&(n+=t.storeName+"/"),n}function ot(){var t="_localforage_support_test";try{return localStorage.setItem(t,!0),localStorage.removeItem(t),!1}catch(t){return!0}}function it(){return!ot()||localStorage.length>0}function at(t){var e=this,n={};if(t)for(var r in t)n[r]=t[r];return n.keyPrefix=rt(t,e._defaultConfig),it()?(e._dbInfo=n,n.serializer=Ht,wt.resolve()):wt.reject()}function ut(t){var e=this,n=e.ready().then((function(){for(var t=e._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);0===r.indexOf(t)&&localStorage.removeItem(r)}}));return a(n,t),n}function ct(t,e){var n=this;t=c(t);var r=n.ready().then((function(){var e=n._dbInfo,r=localStorage.getItem(e.keyPrefix+t);return r&&(r=e.serializer.deserialize(r)),r}));return a(r,e),r}function st(t,e){var n=this,r=n.ready().then((function(){for(var e=n._dbInfo,r=e.keyPrefix,o=r.length,i=localStorage.length,a=1,u=0;u<i;u++){var c=localStorage.key(u);if(0===c.indexOf(r)){var s=localStorage.getItem(c);if(s&&(s=e.serializer.deserialize(s)),void 0!==(s=t(s,c.substring(o),a++)))return s}}}));return a(r,e),r}function ft(t,e){var n=this,r=n.ready().then((function(){var e,r=n._dbInfo;try{e=localStorage.key(t)}catch(t){e=null}return e&&(e=e.substring(r.keyPrefix.length)),e}));return a(r,e),r}function lt(t){var e=this,n=e.ready().then((function(){for(var t=e._dbInfo,n=localStorage.length,r=[],o=0;o<n;o++){var i=localStorage.key(o);0===i.indexOf(t.keyPrefix)&&r.push(i.substring(t.keyPrefix.length))}return r}));return a(n,t),n}function ht(t){var e=this.keys().then((function(t){return t.length}));return a(e,t),e}function dt(t,e){var n=this;t=c(t);var r=n.ready().then((function(){localStorage.removeItem(n._dbInfo.keyPrefix+t)}));return a(r,e),r}function pt(t,e,n){var r=this;t=c(t);var o=r.ready().then((function(){void 0===e&&(e=null);var n=e;return new wt((function(o,i){var a=r._dbInfo;a.serializer.serialize(e,(function(e,r){if(r)i(r);else try{localStorage.setItem(a.keyPrefix+t,e),o(n)}catch(t){"QuotaExceededError"!==t.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==t.name||i(t),i(t)}}))}))}));return a(o,n),o}function vt(t,e){if(e=s.apply(this,arguments),!(t="function"!=typeof t&&t||{}).name){var n=this.config();t.name=t.name||n.name,t.storeName=t.storeName||n.storeName}var r,o=this;return a(r=t.name?new wt((function(e){e(t.storeName?rt(t,o._defaultConfig):t.name+"/")})).then((function(t){for(var e=localStorage.length-1;e>=0;e--){var n=localStorage.key(e);0===n.indexOf(t)&&localStorage.removeItem(n)}})):wt.reject("Invalid arguments"),e),r}function yt(t,e){t[e]=function(){var n=arguments;return t.ready().then((function(){return t[e].apply(t,n)}))}}function mt(){for(var t=1;t<arguments.length;t++){var e=arguments[t];if(e)for(var n in e)e.hasOwnProperty(n)&&(arguments[0][n]=Vt(e[n])?e[n].slice():e[n])}return arguments[0]}var gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bt=r();"undefined"==typeof Promise&&t(3);var wt=Promise,_t="local-forage-detect-blob-support",kt=void 0,jt={},St=Object.prototype.toString,xt="readonly",Pt="readwrite",Ot={_driver:"asyncStorage",_initStorage:O,_support:o(),iterate:I,getItem:T,setItem:A,removeItem:R,clear:E,length:D,key:N,keys:C,dropInstance:$},Tt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",It="~~local_forage_type~",At=/^~~local_forage_type~([^~]+)~/,Rt="__lfsc__:",Et=Rt.length,Dt="arbf",Nt="blob",Ct="si08",$t="ui08",Ut="uic8",Mt="si16",Lt="si32",qt="ur16",Bt="ui32",Kt="fl32",Ft="fl64",Gt=Et+Dt.length,Wt=Object.prototype.toString,Ht={serialize:q,deserialize:B,stringToBuffer:M,bufferToString:L},Jt={_driver:"webSQLStorage",_initStorage:F,_support:U(),iterate:H,getItem:W,setItem:z,removeItem:Q,clear:X,length:V,key:Y,keys:Z,dropInstance:et},zt={_driver:"localStorageWrapper",_initStorage:at,_support:nt(),iterate:st,getItem:ct,setItem:pt,removeItem:dt,clear:ut,length:ht,key:ft,keys:lt,dropInstance:vt},Qt=function(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)},Xt=function(t,e){for(var n=t.length,r=0;r<n;){if(Qt(t[r],e))return!0;r++}return!1},Vt=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},Yt={},Zt={},te={INDEXEDDB:Ot,WEBSQL:Jt,LOCALSTORAGE:zt},ee=[te.INDEXEDDB._driver,te.WEBSQL._driver,te.LOCALSTORAGE._driver],ne=["dropInstance"],re=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ne),oe={description:"",driver:ee.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1},ie=new(function(){function t(e){for(var r in n(this,t),te)if(te.hasOwnProperty(r)){var o=te[r],i=o._driver;this[r]=i,Yt[i]||this.defineDriver(o)}this._defaultConfig=mt({},oe),this._config=mt({},this._defaultConfig,e),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return t.prototype.config=function(t){if("object"===(void 0===t?"undefined":gt(t))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var e in t){if("storeName"===e&&(t[e]=t[e].replace(/\W/g,"_")),"version"===e&&"number"!=typeof t[e])return new Error("Database version must be a number.");this._config[e]=t[e]}return!("driver"in t&&t.driver)||this.setDriver(this._config.driver)}return"string"==typeof t?this._config[t]:this._config},t.prototype.defineDriver=function(t,e,n){var r=new wt((function(e,n){try{var r=t._driver,o=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!t._driver)return void n(o);for(var i=re.concat("_initStorage"),u=0,c=i.length;u<c;u++){var s=i[u];if((!Xt(ne,s)||t[s])&&"function"!=typeof t[s])return void n(o)}!function(){for(var e=function(t){return function(){var e=new Error("Method "+t+" is not implemented by the current driver"),n=wt.reject(e);return a(n,arguments[arguments.length-1]),n}},n=0,r=ne.length;n<r;n++){var o=ne[n];t[o]||(t[o]=e(o))}}();var f=function(n){Yt[r]&&console.info("Redefining LocalForage driver: "+r),Yt[r]=t,Zt[r]=n,e()};"_support"in t?t._support&&"function"==typeof t._support?t._support().then(f,n):f(!!t._support):f(!0)}catch(t){n(t)}}));return u(r,e,n),r},t.prototype.driver=function(){return this._driver||null},t.prototype.getDriver=function(t,e,n){var r=Yt[t]?wt.resolve(Yt[t]):wt.reject(new Error("Driver not found."));return u(r,e,n),r},t.prototype.getSerializer=function(t){var e=wt.resolve(Ht);return u(e,t),e},t.prototype.ready=function(t){var e=this,n=e._driverSet.then((function(){return null===e._ready&&(e._ready=e._initDriver()),e._ready}));return u(n,t,t),n},t.prototype.setDriver=function(t,e,n){function r(){a._config.driver=a.driver()}function o(t){return a._extend(t),r(),a._ready=a._initStorage(a._config),a._ready}function i(t){return function(){function e(){for(;n<t.length;){var i=t[n];return n++,a._dbInfo=null,a._ready=null,a.getDriver(i).then(o).catch(e)}r();var u=new Error("No available storage method found.");return a._driverSet=wt.reject(u),a._driverSet}var n=0;return e()}}var a=this;Vt(t)||(t=[t]);var c=this._getSupportedDrivers(t),s=null!==this._driverSet?this._driverSet.catch((function(){return wt.resolve()})):wt.resolve();return this._driverSet=s.then((function(){var t=c[0];return a._dbInfo=null,a._ready=null,a.getDriver(t).then((function(t){a._driver=t._driver,r(),a._wrapLibraryMethodsWithReady(),a._initDriver=i(c)}))})).catch((function(){r();var t=new Error("No available storage method found.");return a._driverSet=wt.reject(t),a._driverSet})),u(this._driverSet,e,n),this._driverSet},t.prototype.supports=function(t){return!!Zt[t]},t.prototype._extend=function(t){mt(this,t)},t.prototype._getSupportedDrivers=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var o=t[n];this.supports(o)&&e.push(o)}return e},t.prototype._wrapLibraryMethodsWithReady=function(){for(var t=0,e=re.length;t<e;t++)yt(this,re[t])},t.prototype.createInstance=function(e){return new t(e)},t}());e.exports=ie},{3:3}]},{},[4])(4)}).call(this,n("pCvA"))},heVN:function(t,e,n){(function(t,e){!function(t){"use strict";function n(t){delete f[t]}function r(t){if(l)setTimeout(r,0,t);else{var e=f[t];if(e){l=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(void 0,n)}}(e)}finally{n(t),l=!1}}}}if(!t.setImmediate){var o,i,a,u,c,s=1,f={},l=!1,h=t.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(t);d=d&&d.setTimeout?d:t,"[object process]"==={}.toString.call(t.process)?o=function(t){e.nextTick((function(){r(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((a=new MessageChannel).port1.onmessage=function(t){r(t.data)},o=function(t){a.port2.postMessage(t)}):h&&"onreadystatechange"in h.createElement("script")?(i=h.documentElement,o=function(t){var e=h.createElement("script");e.onreadystatechange=function(){r(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):o=function(t){setTimeout(r,0,t)}:(u="setImmediate$"+Math.random()+"$",c=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(u)&&r(+e.data.slice(u.length))},t.addEventListener?t.addEventListener("message",c,!1):t.attachEvent("onmessage",c),o=function(e){t.postMessage(u+e,"*")}),d.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var r={callback:t,args:e};return f[s]=r,o(s),s++},d.clearImmediate=n}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n("pCvA"),n("5IsQ"))},myed:function(){"use strict";try{self["workbox:strategies:6.1.5"]&&_()}catch(t){}},oPUo:function(t,e,n){(function(t){function r(t,e){this._id=t,this._clearFn=e}var o=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;e.setTimeout=function(){return new r(i.call(setTimeout,o,arguments),clearTimeout)},e.setInterval=function(){return new r(i.call(setInterval,o,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(o,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n("heVN"),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n("pCvA"))},pCvA:function(t){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},xgXd:function(){"use strict";try{self["workbox:core:6.1.5"]&&_()}catch(t){}}});
//# sourceMappingURL=sw-esm.js.map