!function(e){var t={}
function n(i){if(t[i])return t[i].exports
var r=t[i]={i:i,l:!1,exports:{}}
return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e
if(4&t&&"object"==typeof e&&e&&e.__esModule)return e
var i=Object.create(null)
if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r))
return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e}
return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=10)}([function(e,t,n){"use strict"
n.r(t),n.d(t,"__extends",function(){return r}),n.d(t,"__assign",function(){return o}),n.d(t,"__rest",function(){return a}),n.d(t,"__decorate",function(){return s}),n.d(t,"__param",function(){return c}),n.d(t,"__metadata",function(){return u}),n.d(t,"__awaiter",function(){return l}),n.d(t,"__generator",function(){return d}),n.d(t,"__exportStar",function(){return h}),n.d(t,"__values",function(){return f}),n.d(t,"__read",function(){return p}),n.d(t,"__spread",function(){return g}),n.d(t,"__await",function(){return b}),n.d(t,"__asyncGenerator",function(){return _}),n.d(t,"__asyncDelegator",function(){return v}),n.d(t,"__asyncValues",function(){return m}),n.d(t,"__makeTemplateObject",function(){return y}),n.d(t,"__importStar",function(){return k}),n.d(t,"__importDefault",function(){return w})
var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)}
function r(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])
return e}).apply(this,arguments)}
function a(e,t){var n={}
for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i])
if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0
for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&(n[i[r]]=e[i[r]])}return n}function s(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i
if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i)
else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a)
return o>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,i){t(n,i,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,i){return new(n||(n=Promise))(function(r,o){function a(e){try{c(i.next(e))}catch(e){o(e)}}function s(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){e.done?r(e.value):new n(function(t){t(e.value)}).then(a,s)}c((i=i.apply(e,t||[])).next())})}function d(e,t){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1]
return r[1]},trys:[],ops:[]}
return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o
function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.")
for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r
switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o
break
case 4:return a.label++,{value:o[1],done:!1}
case 5:a.label++,i=o[1],o=[0]
continue
case 7:o=a.ops.pop(),a.trys.pop()
continue
default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){a=0
continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1]
break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o
break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o)
break}r[2]&&a.ops.pop(),a.trys.pop()
continue}o=t.call(e,a)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1]
return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function h(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function f(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0
return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function p(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator]
if(!n)return e
var i,r,o=n.call(e),a=[]
try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(p(arguments[t]))
return e}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function _(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.")
var i,r=n.apply(e,t||[]),o=[]
return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i
function a(e){r[e]&&(i[e]=function(t){return new Promise(function(n,i){o.push([e,t,n,i])>1||s(e,t)})})}function s(e,t){try{(n=r[e](t)).value instanceof b?Promise.resolve(n.value.v).then(c,u):l(o[0][2],n)}catch(e){l(o[0][3],e)}var n}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function v(e){var t,n
return t={},i("next"),i("throw",function(e){throw e}),i("return"),t[Symbol.iterator]=function(){return this},t
function i(i,r){t[i]=e[i]?function(t){return(n=!n)?{value:b(e[i](t)),done:"return"===i}:r?r(t):t}:r}}function m(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.")
var t,n=e[Symbol.asyncIterator]
return n?n.call(e):(e=f(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t)
function i(n){t[n]=e[n]&&function(t){return new Promise(function(i,r){(function(e,t,n,i){Promise.resolve(i).then(function(t){e({value:t,done:n})},t)})(i,r,(t=e[n](t)).done,t.value)})}}}function y(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function k(e){if(e&&e.__esModule)return e
var t={}
if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n])
return t.default=e,t}function w(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict"
Object.defineProperty(t,"__esModule",{value:!0})
var i,r=n(0),o=n(2),a=n(4),s=((i={})["no-app"]="No Firebase App '{$name}' has been created - call Firebase App.initializeApp()",i["bad-app-name"]="Illegal App name: '{$name}",i["duplicate-app"]="Firebase App named '{$name}' already exists",i["app-deleted"]="Firebase App named '{$name}' already deleted",i["duplicate-service"]="Firebase service named '{$name}' already registered",i["invalid-app-argument"]="firebase.{$name}() takes either no argument or a Firebase App instance.",i),c=new o.ErrorFactory("app","Firebase",s),u="[DEFAULT]",l=[],d=function(){function e(e,t,n){this.firebase_=n,this.isDeleted_=!1,this.services_={},this.name_=t.name,this.automaticDataCollectionEnabled_=t.automaticDataCollectionEnabled||!1,this.options_=o.deepCopy(e),this.INTERNAL={getUid:function(){return null},getToken:function(){return Promise.resolve(null)},addAuthTokenListener:function(e){l.push(e),setTimeout(function(){return e(null)},0)},removeAuthTokenListener:function(e){l=l.filter(function(t){return t!==e})}}}return Object.defineProperty(e.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this.automaticDataCollectionEnabled_},set:function(e){this.checkDestroyed_(),this.automaticDataCollectionEnabled_=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!0,configurable:!0}),e.prototype.delete=function(){var e=this
return new Promise(function(t){e.checkDestroyed_(),t()}).then(function(){e.firebase_.INTERNAL.removeApp(e.name_)
for(var t=[],n=0,i=Object.keys(e.services_);n<i.length;n++)for(var r=i[n],o=0,a=Object.keys(e.services_[r]);o<a.length;o++){var s=a[o]
t.push(e.services_[r][s])}return Promise.all(t.filter(function(e){return"INTERNAL"in e}).map(function(e){return e.INTERNAL.delete()}))}).then(function(){e.isDeleted_=!0,e.services_={}})},e.prototype._getService=function(e,t){if(void 0===t&&(t=u),this.checkDestroyed_(),this.services_[e]||(this.services_[e]={}),!this.services_[e][t]){var n=t!==u?t:void 0,i=this.firebase_.INTERNAL.factories[e](this,this.extendApp.bind(this),n)
this.services_[e][t]=i}return this.services_[e][t]},e.prototype.extendApp=function(e){var t=this
o.deepExtend(this,e),e.INTERNAL&&e.INTERNAL.addAuthTokenListener&&(l.forEach(function(e){t.INTERNAL.addAuthTokenListener(e)}),l=[])},e.prototype.checkDestroyed_=function(){if(this.isDeleted_)throw c.create("app-deleted",{name:this.name_})},e}()
d.prototype.name&&d.prototype.options||d.prototype.delete||console.log("dc")
var h="6.2.0"
var f=new a.Logger("@firebase/app")
if(o.isBrowser()&&"firebase"in self){f.warn("\n    Warning: Firebase is already defined in the global scope. Please make sure\n    Firebase library is only loaded once.\n  ")
var p=self.firebase.SDK_VERSION
p&&p.indexOf("LITE")>=0&&f.warn("\n    Warning: You are trying to load Firebase while using Firebase Performance standalone script.\n    You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.\n    ")}var g=function e(){var t=function(e){var t={},n={},i={},r={__esModule:!0,initializeApp:function(n,i){if(void 0===i&&(i={}),"object"!=typeof i||null===i){var a=i
i={name:a}}var s=i
void 0===s.name&&(s.name=u)
var d=s.name
if("string"!=typeof d||!d)throw c.create("bad-app-name",{name:String(d)})
if(o.contains(t,d))throw c.create("duplicate-app",{name:d})
var h=new e(n,s,r)
return t[d]=h,l(h,"create"),h},app:a,apps:null,SDK_VERSION:h,INTERNAL:{registerService:function(t,u,l,d,h){if(void 0===h&&(h=!1),n[t])throw c.create("duplicate-service",{name:t})
function f(e){if(void 0===e&&(e=a()),"function"!=typeof e[t])throw c.create("invalid-app-argument",{name:t})
return e[t]()}return n[t]=u,d&&(i[t]=d,s().forEach(function(e){d("create",e)})),void 0!==l&&o.deepExtend(f,l),r[t]=f,e.prototype[t]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n]
return this._getService.bind(this,t).apply(this,h?e:[])},f},removeApp:function(e){l(t[e],"delete"),delete t[e]},factories:n,useAsService:d}}
function a(e){if(e=e||u,!o.contains(t,e))throw c.create("no-app",{name:e})
return t[e]}function s(){return Object.keys(t).map(function(e){return t[e]})}function l(e,t){for(var r=0,o=Object.keys(n);r<o.length;r++){var a=d(0,o[r])
if(null===a)return
i[a]&&i[a](t,e)}}function d(e,t){return"serverAuth"===t?null:t}return r.default=r,Object.defineProperty(r,"apps",{get:s}),a.App=e,r}(d)
return t.INTERNAL=r.__assign({},t.INTERNAL,{createFirebaseNamespace:e,extendNamespace:function(e){o.deepExtend(t,e)},createSubscribe:o.createSubscribe,ErrorFactory:o.ErrorFactory,deepExtend:o.deepExtend}),t}(),b=g.initializeApp
g.initializeApp=function(){return o.isNode()&&f.warn('\n      Warning: This is a browser-targeted Firebase bundle but it appears it is being\n      run in a Node environment.  If running in a Node environment, make sure you\n      are using the bundle specified by the "main" field in package.json.\n      \n      If you are using Webpack, you can specify "main" as the first item in\n      "resolve.mainFields":\n      https://webpack.js.org/configuration/resolve/#resolvemainfields\n      \n      If using Rollup, use the rollup-plugin-node-resolve plugin and set "module"\n      to false and "main" to true:\n      https://github.com/rollup/rollup-plugin-node-resolve\n      '),b.apply(void 0,arguments)}
var _=g
t.default=_,t.firebase=_},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0})
var i=n(0),r={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},o=function(e,t){if(!e)throw a(t)},a=function(e){return new Error("Firebase Database ("+r.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},s=function(e){for(var t=[],n=0,i=0;i<e.length;i++){var r=e.charCodeAt(i)
r<128?t[n++]=r:r<2048?(t[n++]=r>>6|192,t[n++]=63&r|128):55296==(64512&r)&&i+1<e.length&&56320==(64512&e.charCodeAt(i+1))?(r=65536+((1023&r)<<10)+(1023&e.charCodeAt(++i)),t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=63&r|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=63&r|128)}return t},c={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray:function(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter")
this.init_()
for(var n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,i=[],r=0;r<e.length;r+=3){var o=e[r],a=r+1<e.length,s=a?e[r+1]:0,c=r+2<e.length,u=c?e[r+2]:0,l=o>>2,d=(3&o)<<4|s>>4,h=(15&s)<<2|u>>6,f=63&u
c||(f=64,a||(h=64)),i.push(n[l],n[d],n[h],n[f])}return i.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(s(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){for(var t=[],n=0,i=0;n<e.length;){var r=e[n++]
if(r<128)t[i++]=String.fromCharCode(r)
else if(r>191&&r<224){var o=e[n++]
t[i++]=String.fromCharCode((31&r)<<6|63&o)}else if(r>239&&r<365){var a=((7&r)<<18|(63&(o=e[n++]))<<12|(63&(s=e[n++]))<<6|63&e[n++])-65536
t[i++]=String.fromCharCode(55296+(a>>10)),t[i++]=String.fromCharCode(56320+(1023&a))}else{o=e[n++]
var s=e[n++]
t[i++]=String.fromCharCode((15&r)<<12|(63&o)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_()
for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,i=[],r=0;r<e.length;){var o=n[e.charAt(r++)],a=r<e.length?n[e.charAt(r)]:0,s=++r<e.length?n[e.charAt(r)]:64,c=++r<e.length?n[e.charAt(r)]:64
if(++r,null==o||null==a||null==s||null==c)throw Error()
var u=o<<2|a>>4
if(i.push(u),64!==s){var l=a<<4&240|s>>2
if(i.push(l),64!==c){var d=s<<6&192|c
i.push(d)}}}return i},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={}
for(var e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},u=function(e){try{return c.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null}
function l(e,t){if(!(t instanceof Object))return t
switch(t.constructor){case Date:return new Date(t.getTime())
case Object:void 0===e&&(e={})
break
case Array:e=[]
break
default:return t}for(var n in t)t.hasOwnProperty(n)&&(e[n]=l(e[n],t[n]))
return e}var d=function(){function e(){var e=this
this.promise=new Promise(function(t,n){e.resolve=t,e.reject=n})}return e.prototype.wrapCallback=function(e){var t=this
return function(n,i){n?t.reject(n):t.resolve(i),"function"==typeof e&&(t.promise.catch(function(){}),1===e.length?e(n):e(n,i))}},e}()
function h(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}var f="FirebaseError",p=function(e){function t(n,i){var r=e.call(this,i)||this
return r.code=n,r.name=f,Object.setPrototypeOf(r,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(r,g.prototype.create),r}return i.__extends(t,e),t}(Error),g=function(){function e(e,t,n){this.service=e,this.serviceName=t,this.errors=n}return e.prototype.create=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]
for(var i=t[0]||{},r=this.service+"/"+e,o=this.errors[e],a=o?function(e,t){return e.replace(b,function(e,n){var i=t[n]
return null!=i?i.toString():"<"+n+"?>"})}(o,i):"Error",s=this.serviceName+": "+a+" ("+r+").",c=new p(r,s),u=0,l=Object.keys(i);u<l.length;u++){var d=l[u]
"_"!==d.slice(-1)&&(d in c&&console.warn('Overwriting FirebaseError base field "'+d+'" can cause unexpected behavior.'),c[d]=i[d])}return c},e}()
var b=/\{\$([^}]+)}/g
function _(e){return JSON.parse(e)}var v=function(e){var t={},n={},i={},r=""
try{var o=e.split(".")
t=_(u(o[0])||""),n=_(u(o[1])||""),r=o[2],i=n.d||{},delete n.d}catch(e){}return{header:t,claims:n,data:i,signature:r}},m=function(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])},y=function(e,t){return m(t,function(t,n){e[t]=n}),e},k=function(e,t,n){for(var i in e)if(t.call(n,e[i],i,e))return i},w=function(){function e(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128
for(var e=1;e<this.blockSize;++e)this.pad_[e]=0
this.reset()}return e.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},e.prototype.compress_=function(e,t){t||(t=0)
var n=this.W_
if("string"==typeof e)for(var i=0;i<16;i++)n[i]=e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3),t+=4
else for(i=0;i<16;i++)n[i]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],t+=4
for(i=16;i<80;i++){var r=n[i-3]^n[i-8]^n[i-14]^n[i-16]
n[i]=4294967295&(r<<1|r>>>31)}var o,a,s=this.chain_[0],c=this.chain_[1],u=this.chain_[2],l=this.chain_[3],d=this.chain_[4]
for(i=0;i<80;i++){i<40?i<20?(o=l^c&(u^l),a=1518500249):(o=c^u^l,a=1859775393):i<60?(o=c&u|l&(c|u),a=2400959708):(o=c^u^l,a=3395469782)
r=(s<<5|s>>>27)+o+d+a+n[i]&4294967295
d=l,l=u,u=4294967295&(c<<30|c>>>2),c=s,s=r}this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+c&4294967295,this.chain_[2]=this.chain_[2]+u&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+d&4294967295},e.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length)
for(var n=t-this.blockSize,i=0,r=this.buf_,o=this.inbuf_;i<t;){if(0===o)for(;i<=n;)this.compress_(e,i),i+=this.blockSize
if("string"==typeof e){for(;i<t;)if(r[o]=e.charCodeAt(i),++i,++o===this.blockSize){this.compress_(r),o=0
break}}else for(;i<t;)if(r[o]=e[i],++i,++o===this.blockSize){this.compress_(r),o=0
break}}this.inbuf_=o,this.total_+=t}},e.prototype.digest=function(){var e=[],t=8*this.total_
this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56))
for(var n=this.blockSize-1;n>=56;n--)this.buf_[n]=255&t,t/=256
this.compress_(this.buf_)
var i=0
for(n=0;n<5;n++)for(var r=24;r>=0;r-=8)e[i]=this.chain_[n]>>r&255,++i
return e},e}()
var S=function(){function e(e,t){var n=this
this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(function(){e(n)}).catch(function(e){n.error(e)})}return e.prototype.next=function(e){this.forEachObserver(function(t){t.next(e)})},e.prototype.error=function(e){this.forEachObserver(function(t){t.error(e)}),this.close(e)},e.prototype.complete=function(){this.forEachObserver(function(e){e.complete()}),this.close()},e.prototype.subscribe=function(e,t,n){var i,r=this
if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.")
void 0===(i=function(e,t){if("object"!=typeof e||null===e)return!1
for(var n=0,i=t;n<i.length;n++){var r=i[n]
if(r in e&&"function"==typeof e[r])return!0}return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n}).next&&(i.next=x),void 0===i.error&&(i.error=x),void 0===i.complete&&(i.complete=x)
var o=this.unsubscribeOne.bind(this,this.observers.length)
return this.finalized&&this.task.then(function(){try{r.finalError?i.error(r.finalError):i.complete()}catch(e){}}),this.observers.push(i),o},e.prototype.unsubscribeOne=function(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},e.prototype.forEachObserver=function(e){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,e)},e.prototype.sendOne=function(e,t){var n=this
this.task.then(function(){if(void 0!==n.observers&&void 0!==n.observers[e])try{t(n.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}})},e.prototype.close=function(e){var t=this
this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(function(){t.observers=void 0,t.onNoObservers=void 0}))},e}()
function x(){}function T(e,t,n){var i=""
switch(t){case 1:i=n?"first":"First"
break
case 2:i=n?"second":"Second"
break
case 3:i=n?"third":"Third"
break
case 4:i=n?"fourth":"Fourth"
break
default:throw new Error("errorPrefix called with argumentNumber > 4.  Need to update it?")}var r=e+" failed: "
return r+=i+" argument "}t.CONSTANTS=r,t.Deferred=d,t.ErrorFactory=g,t.FirebaseError=p,t.Sha1=w,t.assert=o,t.assertionError=a,t.async=function(e,t){return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i]
Promise.resolve(!0).then(function(){e.apply(void 0,n)}).catch(function(e){t&&t(e)})}},t.base64=c,t.base64Decode=u,t.base64Encode=function(e){var t=s(e)
return c.encodeByteArray(t,!0)},t.clone=function(e){return y({},e)},t.contains=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.createSubscribe=function(e,t){var n=new S(e,t)
return n.subscribe.bind(n)},t.decode=v,t.deepCopy=function(e){return l(void 0,e)},t.deepExtend=l,t.errorPrefix=T,t.every=function(e,t){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&!t(n,e[n]))return!1
return!0},t.extend=y,t.findKey=k,t.findValue=function(e,t,n){var i=k(e,t,n)
return i&&e[i]},t.forEach=m,t.getAnyKey=function(e){for(var t in e)return t},t.getCount=function(e){var t=0
for(var n in e)t++
return t},t.getUA=h,t.getValues=function(e){var t=[],n=0
for(var i in e)t[n++]=e[i]
return t},t.isAdmin=function(e){var t=v(e).claims
return"object"==typeof t&&!0===t.admin},t.isBrowser=function(){return"object"==typeof self&&self.self===self},t.isEmpty=function(e){for(var t in e)return!1
return!0},t.isMobileCordova=function(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(h())},t.isNode=function(){try{return"[object process]"===Object.prototype.toString.call(e.process)}catch(e){return!1}},t.isNodeSdk=function(){return!0===r.NODE_CLIENT||!0===r.NODE_ADMIN},t.isNonNullObject=function(e){return"object"==typeof e&&null!==e},t.isReactNative=function(){return"object"==typeof navigator&&"ReactNative"===navigator.product},t.isValidFormat=function(e){var t=v(e).claims
return!!t&&"object"==typeof t&&t.hasOwnProperty("iat")},t.isValidTimestamp=function(e){var t,n,i=v(e).claims,r=Math.floor((new Date).getTime()/1e3)
return"object"==typeof i&&(i.hasOwnProperty("nbf")?t=i.nbf:i.hasOwnProperty("iat")&&(t=i.iat),n=i.hasOwnProperty("exp")?i.exp:t+86400),r&&t&&n&&r>=t&&r<=n},t.issuedAtTime=function(e){var t=v(e).claims
return"object"==typeof t&&t.hasOwnProperty("iat")?t.iat:null},t.jsonEval=_,t.map=function(e,t,n){var i={}
for(var r in e)i[r]=t.call(n,e[r],r,e)
return i},t.querystring=function(e){var t=[]
return m(e,function(e,n){Array.isArray(n)?n.forEach(function(n){t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}):t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}),t.length?"&"+t.join("&"):""},t.querystringDecode=function(e){var t={}
return e.replace(/^\?/,"").split("&").forEach(function(e){if(e){var n=e.split("=")
t[n[0]]=n[1]}}),t},t.safeGet=function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]},t.stringLength=function(e){for(var t=0,n=0;n<e.length;n++){var i=e.charCodeAt(n)
i<128?t++:i<2048?t+=2:i>=55296&&i<=56319?(t+=4,n++):t+=3}return t},t.stringToByteArray=function(e){for(var t=[],n=0,i=0;i<e.length;i++){var r=e.charCodeAt(i)
if(r>=55296&&r<=56319){var a=r-55296
o(++i<e.length,"Surrogate pair missing trail surrogate."),r=65536+(a<<10)+(e.charCodeAt(i)-56320)}r<128?t[n++]=r:r<2048?(t[n++]=r>>6|192,t[n++]=63&r|128):r<65536?(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=63&r|128):(t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=63&r|128)}return t},t.stringify=function(e){return JSON.stringify(e)},t.validateArgCount=function(e,t,n,i){var r
if(i<t?r="at least "+t:i>n&&(r=0===n?"none":"no more than "+n),r)throw new Error(e+" failed: Was called with "+i+(1===i?" argument.":" arguments.")+" Expects "+r+".")},t.validateCallback=function(e,t,n,i){if((!i||n)&&"function"!=typeof n)throw new Error(T(e,t,i)+"must be a valid function.")},t.validateContextObject=function(e,t,n,i){if((!i||n)&&("object"!=typeof n||null===n))throw new Error(T(e,t,i)+"must be a valid context object.")},t.validateNamespace=function(e,t,n,i){if((!i||n)&&"string"!=typeof n)throw new Error(T(e,t,i)+"must be a valid firebase namespace.")}}).call(this,n(3))},function(e,t){var n
n=function(){return this}()
try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict"
n.r(t),n.d(t,"LogLevel",function(){return i}),n.d(t,"Logger",function(){return s}),n.d(t,"setLogLevel",function(){return c})
var i,r=[]
!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(i||(i={}))
var o=i.INFO,a=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r]
if(!(t<e.logLevel)){var o=(new Date).toISOString()
switch(t){case i.DEBUG:case i.VERBOSE:console.log.apply(console,["["+o+"]  "+e.name+":"].concat(n))
break
case i.INFO:console.info.apply(console,["["+o+"]  "+e.name+":"].concat(n))
break
case i.WARN:console.warn.apply(console,["["+o+"]  "+e.name+":"].concat(n))
break
case i.ERROR:console.error.apply(console,["["+o+"]  "+e.name+":"].concat(n))
break
default:throw new Error("Attempted to log a message with an invalid logType (value: "+t+")")}}},s=function(){function e(e){this.name=e,this._logLevel=o,this._logHandler=a,r.push(this)}return Object.defineProperty(e.prototype,"logLevel",{get:function(){return this._logLevel},set:function(e){if(!(e in i))throw new TypeError("Invalid value assigned to `logLevel`")
this._logLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"logHandler",{get:function(){return this._logHandler},set:function(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function")
this._logHandler=e},enumerable:!0,configurable:!0}),e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]
this._logHandler.apply(this,[this,i.DEBUG].concat(e))},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]
this._logHandler.apply(this,[this,i.VERBOSE].concat(e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]
this._logHandler.apply(this,[this,i.INFO].concat(e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]
this._logHandler.apply(this,[this,i.WARN].concat(e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]
this._logHandler.apply(this,[this,i.ERROR].concat(e))},e}()
function c(e){r.forEach(function(t){t.logLevel=e})}},function(e,t,n){var i=n(6)
"string"==typeof i&&(i=[[e.i,i,""]])
var r={hmr:!0,transform:void 0,insertInto:void 0}
n(8)(i,r)
i.locals&&(e.exports=i.locals)},function(e,t,n){(e.exports=n(7)(!1)).push([e.i,'.ethinking-push__modalbody__picture {\n  width: 60%; }\n  .ethinking-push__modalbody__picture img {\n    width: 80px;\n    height: 80px; }\n    @media screen and (max-width: 720px) {\n      .ethinking-push__modalbody__picture img {\n        width: 50px;\n        height: 50px; } }\n\n.ethinking-push__tab__close {\n  font-size: 14px;\n  padding: 10px;\n  color: #aaa;\n  cursor: pointer;\n  text-align: right;\n  background: #fff; }\n\n.ethinking-push {\n  box-sizing: border-box;\n  line-height: 1; }\n\n.ethinking-push__sidebarsettings__list input[type="checkbox"] {\n  background-color: initial;\n  display: inline-block;\n  margin-right: 4px;\n  vertical-align: baseline;\n  -webkit-appearance: checkbox; }\n\n.check-label {\n  cursor: pointer; }\n\n.ethinking-push__denied {\n  background: #fff;\n  border: 1px solid #ccc;\n  box-shadow: rgba(0, 0, 0, 0.4) 0 2px 24px 0;\n  display: flex;\n  flex-direction: column;\n  font-size: 12px;\n  padding: 20px;\n  width: 450px;\n  max-width: calc(100% - 25px);\n  bottom: 80px;\n  margin-left: 25px;\n  position: fixed;\n  z-index: 1001; }\n  .ethinking-push__denied.hide {\n    display: none; }\n\n.ethinking-push__modal {\n  background: #fff;\n  border: 1px solid #ccc;\n  box-shadow: rgba(0, 0, 0, 0.4) 0 2px 24px 0;\n  display: flex;\n  flex-direction: column;\n  font-size: 12px;\n  margin: auto;\n  padding: 20px;\n  width: 450px;\n  max-width: 100%;\n  position: fixed;\n  top: 55px;\n  left: 0;\n  right: 0;\n  z-index: 99999; }\n\n.ethinking-push__modalbody {\n  display: flex;\n  flex-direction: row; }\n\n.ethinking-push__modalbody__content {\n  letter-spacing: -.1px; }\n  @media screen and (max-width: 720px) {\n    .ethinking-push__modalbody__content {\n      padding-left: 5px; } }\n\n.ethinking-push__modalbody__title {\n  font-size: 15px;\n  font-weight: 700; }\n\n.ethinking-push__modalbody__text {\n  font-size: 16px;\n  line-height: 1.5;\n  margin: 0; }\n\n.ethinking-push__modalbody__list {\n  line-height: 1.4;\n  list-style: none;\n  padding-left: 0;\n  margin-bottom: 20px; }\n\n.ethinking-push__modalbody__list li {\n  margin-bottom: 6px; }\n\n.ethinking-push__modalfooter {\n  display: flex;\n  justify-content: center; }\n  @media screen and (max-width: 720px) {\n    .ethinking-push__modalfooter {\n      margin-top: 5px; } }\n\n.ethinking-push__modalfooter__branding {\n  color: #ccc;\n  font-size: 11px;\n  height: 32px;\n  line-height: 32px;\n  margin: 0;\n  width: 130px; }\n\n.ethinking-push__modalfooter__confirm-buttons {\n  display: flex;\n  justify-content: center;\n  max-height: 32px;\n  width: calc(100% - 130px); }\n\n.ethinking-push__modalfooter__allow, .ethinking-push__modalfooter__deny {\n  border-radius: 4px;\n  border: 1px solid;\n  padding: 12px 18px;\n  line-height: 1.5px; }\n\n.ethinking-push__modalfooter__allow {\n  background: #1781e3;\n  border: 1px solid #1781e3;\n  color: #fff;\n  font-size: 14px;\n  margin-left: 15px; }\n\n.ethinking-push__modalfooter__allow:hover, .ethinking-push__sidebarsettings__save:hover {\n  background: #0851da;\n  border-color: #0851da; }\n\n.ethinking-push__modalfooter__deny {\n  border: 1px solid #ccc;\n  font-size: 14px;\n  padding: 9px; }\n\n.ethinking-push__bell {\n  bottom: 20px;\n  display: none;\n  left: 30px;\n  position: fixed;\n  z-index: 1039; }\n  @media screen and (max-width: 720px) {\n    .ethinking-push__bell {\n      left: 20px; } }\n\n.ethinking-push__bell:hover {\n  transition: width 1s ease-in-out; }\n  .ethinking-push__bell:hover .ethinking-push__bell__info {\n    display: flex; }\n\n.ethinking-push__bell__button {\n  background-size: 40px;\n  background-repeat: no-repeat;\n  background-position: center;\n  background-color: #fff;\n  border-radius: 99px;\n  box-shadow: 1px 1px 3px 0 rgba(0, 0, 0, 0.4);\n  cursor: pointer;\n  height: 40px;\n  transition: width .2s, height .2s;\n  width: 40px;\n  white-space: nowrap; }\n\n.ethinking-push__bell__button.active:hover {\n  height: 40px;\n  width: 40px; }\n\n.ethinking-push__bell__info {\n  display: none;\n  padding-left: 10px; }\n  .ethinking-push__bell__info.active {\n    display: flex; }\n\n.ethinking-push__bell__info--triangle {\n  width: 0;\n  height: 0;\n  border-style: solid;\n  align-self: center;\n  border-width: 6px 6px 6px 0;\n  border-color: transparent #000 transparent transparent; }\n\n.ethinking-push__bell__info--text {\n  align-self: center;\n  background: #000;\n  border-radius: 4px;\n  color: #fff;\n  font-size: 11px;\n  height: 34px;\n  line-height: 34px;\n  padding: 0 10px; }\n\n.ethinking-push__sidebar {\n  background: #f5f5f5;\n  display: none;\n  flex-direction: column;\n  height: 100%;\n  border-right: 1px solid #ccc;\n  padding: 0;\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 300px;\n  z-index: 99998; }\n  .ethinking-push__sidebar.collapsed {\n    display: flex; }\n\n.ethinking-push__sidebar li {\n  list-style: none;\n  padding-left: 0; }\n\n.ethinking-push__sidebar__navigation {\n  display: flex;\n  margin: 0;\n  padding: 10px 0 0 0;\n  background: #fff; }\n\n.ethinking-push__sidebar__navigation li {\n  cursor: pointer;\n  flex-grow: 1;\n  font-size: 18px;\n  padding-bottom: 4px;\n  text-align: center;\n  border-bottom: 3px solid transparent;\n  font-weight: 700; }\n\n.ethinking-push__sidebar__navigation li.active {\n  border-bottom-color: #333;\n  margin-bottom: auto; }\n\n.no-notifications {\n  font-size: 16px;\n  padding: 20px; }\n\n.ethinking-push__sidebarmessages {\n  display: none;\n  font-size: 12px;\n  padding: 0;\n  overflow-y: scroll;\n  margin: 0; }\n\n.ethinking-push::-webkit-scrollbar {\n  display: none; }\n\n.ethinking-push__sidebarmessages li {\n  padding: 20px; }\n\n.ethinking-push__sidebarsettings {\n  padding: 0 10px; }\n\n.ethinking-push__sidebarsettings__title {\n  font-size: 18px;\n  letter-spacing: -.1px;\n  margin-top: 40px; }\n\n.ethinking-push__sidebarsettings__list {\n  font-size: 16px;\n  margin: 20px 0 30px;\n  height: calc(100vh - 440px);\n  overflow-y: scroll;\n  padding-left: 0;\n  box-sizing: content-box;\n  min-height: 50px;\n  -webkit-overflow-scrolling: touch;\n  -ms-overflow-style: none;\n  scrollbar-width: none; }\n  .ethinking-push__sidebarsettings__list::-webkit-scrollbar {\n    display: none; }\n\n.ethinking-push__sidebarsettings__cancel {\n  border: none;\n  margin: 10px auto;\n  display: block;\n  font-size: 14px;\n  color: #1781e3;\n  background: transparent; }\n\n.ethinking-push__sidebarsettings__save {\n  background: #1781DE;\n  border-color: #1781e3;\n  color: #fff;\n  border-radius: 4px;\n  cursor: pointer;\n  display: block;\n  font-size: 16px;\n  line-height: 1;\n  margin: auto;\n  padding: 9px; }\n\n.ethinking-push__open_sidebar {\n  text-decoration: underline;\n  color: blue;\n  cursor: pointer; }\n\n.ethinking-push__denied__close {\n  position: absolute;\n  right: 20px;\n  display: inline-block;\n  width: 15px;\n  height: 15px;\n  overflow: hidden;\n  background: #fff; }\n\n.ethinking-push__denied__close::before, .ethinking-push__denied__close::after {\n  content: "";\n  position: absolute;\n  height: 2px;\n  width: 100%;\n  top: 50%;\n  left: 0;\n  margin-top: -1px;\n  background: #000; }\n\n.ethinking-push__denied__close::before {\n  transform: rotate(45deg); }\n\n.ethinking-push__denied__close::after {\n  transform: rotate(-45deg); }\n\n.ethinking-push__image img {\n  width: 315px; }\n\n.ethinking-push__sidebarsettings_language {\n  margin-top: 20px;\n  font-size: 18px; }\n\n.ethinking-push__sidebarsettings_language ul {\n  padding: 10px 0;\n  margin: 0;\n  justify-content: start;\n  display: flex; }\n\n.ethinking-push__sidebarsettings_language ul li {\n  cursor: pointer;\n  display: inline-block;\n  width: 80px;\n  text-align: center;\n  font-size: 14px;\n  letter-spacing: -.1px;\n  padding: 5px 0;\n  margin-right: 5px;\n  border-radius: 5px;\n  border: 1px solid #ccc;\n  background: white; }\n\n.ethinking-push__sidebarsettings_language ul li.active, .ethinking-push__sidebarsettings_language ul li:hover {\n  background-color: #ececec; }\n\n.notification-date {\n  display: inline-block;\n  font-size: 12px; }\n\n.notification-text {\n  font-size: 14px;\n  line-height: 1.43; }\n\n.ethinking__push_notification li {\n  border-bottom: 1px solid; }\n\n.ethinking__push_notification strong {\n  font-size: 16px; }\n\n.ethinking__push_notification {\n  border-bottom: 1px solid grey; }\n\n.ethinking__push_notification a {\n  text-decoration: none;\n  color: #000; }\n\n.ethinking__push_notification p {\n  margin-bottom: 0; }\n\n.ethinking-push {\n  box-sizing: border-box;\n  line-height: 1; }\n  .ethinking-push h1, .ethinking-push h2, .ethinking-push h3 {\n    font-weight: 100; }\n  .ethinking-push__notification {\n    background: white;\n    bottom: 100px;\n    box-shadow: rgba(0, 0, 0, 0.4) 0 2px 24px 0;\n    display: flex;\n    flex-direction: row;\n    position: fixed; }\n    @media screen and (min-width: 720px) {\n      .ethinking-push__notification {\n        width: 350px;\n        margin-left: 20px; } }\n    .ethinking-push__notification--icon {\n      align-self: center;\n      height: 50px;\n      margin: 10px;\n      width: 50px; }\n    .ethinking-push__notification--title, .ethinking-push__notification--date, .ethinking-push__notification--content {\n      padding: 5px 0; }\n    .ethinking-push__notification--content {\n      display: flex;\n      flex-direction: column;\n      align-self: center;\n      width: calc(100% - 80px); }\n      .ethinking-push__notification--content a {\n        text-decoration: none;\n        color: black; }\n    .ethinking-push__notification--title {\n      font-weight: bold;\n      padding-top: 10px;\n      overflow: hidden;\n      text-overflow: ellipsis; }\n    .ethinking-push__notification--text {\n      font-size: 14px;\n      line-height: 1.43; }\n    .ethinking-push__notification--date {\n      font-size: 12px;\n      list-style: none;\n      text-align: right; }\n',""])},function(e,t,n){"use strict"
e.exports=function(e){var t=[]
return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",i=e[3]
if(!i)return n
if(t&&"function"==typeof btoa){var r=(a=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),o=i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"})
return[n].concat(o).concat([r]).join("\n")}var a
return[n].join("\n")}(t,e)
return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]])
for(var i={},r=0;r<this.length;r++){var o=this[r][0]
null!=o&&(i[o]=!0)}for(r=0;r<e.length;r++){var a=e[r]
null!=a[0]&&i[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t,n){var i,r,o={},a=(i=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=i.apply(this,arguments)),r}),s=function(e){var t={}
return function(e,n){if("function"==typeof e)return e()
if(void 0===t[e]){var i=function(e,t){return t?t.querySelector(e):document.querySelector(e)}.call(this,e,n)
if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}}(),c=null,u=0,l=[],d=n(9)
function h(e,t){for(var n=0;n<e.length;n++){var i=e[n],r=o[i.id]
if(r){r.refs++
for(var a=0;a<r.parts.length;a++)r.parts[a](i.parts[a])
for(;a<i.parts.length;a++)r.parts.push(v(i.parts[a],t))}else{var s=[]
for(a=0;a<i.parts.length;a++)s.push(v(i.parts[a],t))
o[i.id]={id:i.id,refs:1,parts:s}}}}function f(e,t){for(var n=[],i={},r=0;r<e.length;r++){var o=e[r],a=t.base?o[0]+t.base:o[0],s={css:o[1],media:o[2],sourceMap:o[3]}
i[a]?i[a].parts.push(s):n.push(i[a]={id:a,parts:[s]})}return n}function p(e,t){var n=s(e.insertInto)
if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.")
var i=l[l.length-1]
if("top"===e.insertAt)i?i.nextSibling?n.insertBefore(t,i.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),l.push(t)
else if("bottom"===e.insertAt)n.appendChild(t)
else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n")
var r=s(e.insertAt.before,n)
n.insertBefore(t,r)}}function g(e){if(null===e.parentNode)return!1
e.parentNode.removeChild(e)
var t=l.indexOf(e)
t>=0&&l.splice(t,1)}function b(e){var t=document.createElement("style")
if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var i=function(){0
return n.nc}()
i&&(e.attrs.nonce=i)}return _(t,e.attrs),p(e,t),t}function _(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function v(e,t){var n,i,r,o
if(t.transform&&e.css){if(!(o="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){}
e.css=o}if(t.singleton){var a=u++
n=c||(c=b(t)),i=k.bind(null,n,a,!1),r=k.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link")
return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",_(t,e.attrs),p(e,t),t}(t),i=function(e,t,n){var i=n.css,r=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||o)&&(i=d(i))
r&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */")
var a=new Blob([i],{type:"text/css"}),s=e.href
e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),r=function(){g(n),n.href&&URL.revokeObjectURL(n.href)}):(n=b(t),i=function(e,t){var n=t.css,i=t.media
i&&e.setAttribute("media",i)
if(e.styleSheet)e.styleSheet.cssText=n
else{for(;e.firstChild;)e.removeChild(e.firstChild)
e.appendChild(document.createTextNode(n))}}.bind(null,n),r=function(){g(n)})
return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return
i(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom")
var n=f(e,t)
return h(n,t),function(e){for(var i=[],r=0;r<n.length;r++){var a=n[r];(s=o[a.id]).refs--,i.push(s)}e&&h(f(e,t),t)
for(r=0;r<i.length;r++){var s
if(0===(s=i[r]).refs){for(var c=0;c<s.parts.length;c++)s.parts[c]()
delete o[s.id]}}}}
var m,y=(m=[],function(e,t){return m[e]=t,m.filter(Boolean).join("\n")})
function k(e,t,n,i){var r=n?"":i.css
if(e.styleSheet)e.styleSheet.cssText=y(t,r)
else{var o=document.createTextNode(r),a=e.childNodes
a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location
if(!t)throw new Error("fixUrls requires window.location")
if(!e||"string"!=typeof e)return e
var n=t.protocol+"//"+t.host,i=n+t.pathname.replace(/\/[^\/]*$/,"/")
return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var r,o=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t})
return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?e:(r=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:i+o.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")})}},function(e,t,n){"use strict"
n.r(t)
var i,r,o,a=n(1),s=n.n(a),c=n(0),u=n(2),l=((i={})["only-available-in-window"]="This method is available in a Window context.",i["only-available-in-sw"]="This method is available in a service worker context.",i["should-be-overriden"]="This method should be overriden by extended classes.",i["bad-sender-id"]="Please ensure that 'messagingSenderId' is set correctly in the options passed into firebase.initializeApp().",i["permission-default"]="The required permissions were not granted and dismissed instead.",i["permission-blocked"]="The required permissions were not granted and blocked instead.",i["unsupported-browser"]="This browser doesn't support the API's required to use the firebase SDK.",i["notifications-blocked"]="Notifications have been blocked.",i["failed-serviceworker-registration"]="We are unable to register the default service worker. {$browserErrorMessage}",i["sw-registration-expected"]="A service worker registration was the expected input.",i["get-subscription-failed"]="There was an error when trying to get any existing Push Subscriptions.",i["invalid-saved-token"]="Unable to access details of the saved token.",i["sw-reg-redundant"]="The service worker being used for push was made redundant.",i["token-subscribe-failed"]="A problem occured while subscribing the user to FCM: {$errorInfo}",i["token-subscribe-no-token"]="FCM returned no token when subscribing the user to push.",i["token-subscribe-no-push-set"]="FCM returned an invalid response when getting an FCM token.",i["token-unsubscribe-failed"]="A problem occured while unsubscribing the user from FCM: {$errorInfo}",i["token-update-failed"]="A problem occured while updating the user from FCM: {$errorInfo}",i["token-update-no-token"]="FCM returned no token when updating the user to push.",i["use-sw-before-get-token"]="The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.",i["invalid-delete-token"]="You must pass a valid token into deleteToken(), i.e. the token from getToken().",i["delete-token-not-found"]="The deletion attempt for token could not be performed as the token was not found.",i["delete-scope-not-found"]="The deletion attempt for service worker scope could not be performed as the scope was not found.",i["bg-handler-function-expected"]="The input to setBackgroundMessageHandler() must be a function.",i["no-window-client-to-msg"]="An attempt was made to message a non-existant window client.",i["unable-to-resubscribe"]="There was an error while re-subscribing the FCM token for push messaging. Will have to resubscribe the user on next visit. {$errorInfo}",i["no-fcm-token-for-resubscribe"]="Could not find an FCM token and as a result, unable to resubscribe. Will have to resubscribe the user on next visit.",i["failed-to-delete-token"]="Unable to delete the currently saved token.",i["no-sw-in-reg"]="Even though the service worker registration was successful, there was a problem accessing the service worker itself.",i["incorrect-gcm-sender-id"]="Please change your web app manifest's 'gcm_sender_id' value to '103953800507' to use Firebase messaging.",i["bad-scope"]="The service worker scope must be a string with at least one character.",i["bad-vapid-key"]="The public VAPID key is not a Uint8Array with 65 bytes.",i["bad-subscription"]="The subscription must be a valid PushSubscription.",i["bad-token"]="The FCM Token used for storage / lookup was not a valid token string.",i["bad-push-set"]="The FCM push set used for storage / lookup was not not a valid push set string.",i["failed-delete-vapid-key"]="The VAPID key could not be deleted.",i["invalid-public-vapid-key"]="The public VAPID key must be a string.",i["use-public-key-before-get-token"]="The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used.",i["public-vapid-key-decryption-failed"]="The public VAPID key did not equal 65 bytes when decrypted.",i),d=new u.ErrorFactory("messaging","Messaging",l),h=new Uint8Array([4,51,148,247,223,161,235,177,220,3,162,94,21,113,219,72,211,46,237,237,178,52,219,183,71,58,12,143,196,204,225,111,60,140,132,223,171,182,102,62,242,12,212,139,254,227,249,118,47,20,28,99,8,106,111,45,177,26,149,176,206,55,192,156,110]),f="https://fcm.googleapis.com"
function p(e,t){if(null==e||null==t)return!1
if(e===t)return!0
if(e.byteLength!==t.byteLength)return!1
for(var n=new DataView(e),i=new DataView(t),r=0;r<e.byteLength;r++)if(n.getUint8(r)!==i.getUint8(r))return!1
return!0}function g(e){return function(e){var t=new Uint8Array(e)
return btoa(String.fromCharCode.apply(String,Object(c.__spread)(t)))}(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}!function(e){e.TYPE_OF_MSG="firebase-messaging-msg-type",e.DATA="firebase-messaging-msg-data"}(r||(r={})),function(e){e.PUSH_MSG_RECEIVED="push-msg-received",e.NOTIFICATION_CLICKED="notification-clicked"}(o||(o={}))
var b=function(){function e(){}return e.prototype.getToken=function(e,t,n){return Object(c.__awaiter)(this,void 0,void 0,function(){var i,r,o,a,s,u,l,b,_
return Object(c.__generator)(this,function(c){switch(c.label){case 0:i=g(t.getKey("p256dh")),r=g(t.getKey("auth")),o="authorized_entity="+e+"&endpoint="+t.endpoint+"&encryption_key="+i+"&encryption_auth="+r,p(n.buffer,h.buffer)||(a=g(n),o+="&application_pub_key="+a),(s=new Headers).append("Content-Type","application/x-www-form-urlencoded"),u={method:"POST",headers:s,body:o},c.label=1
case 1:return c.trys.push([1,4,,5]),[4,fetch(f+"/fcm/connect/subscribe",u)]
case 2:return[4,c.sent().json()]
case 3:return l=c.sent(),[3,5]
case 4:throw b=c.sent(),d.create("token-subscribe-failed",{errorInfo:b})
case 5:if(l.error)throw _=l.error.message,d.create("token-subscribe-failed",{errorInfo:_})
if(!l.token)throw d.create("token-subscribe-no-token")
if(!l.pushSet)throw d.create("token-subscribe-no-push-set")
return[2,{token:l.token,pushSet:l.pushSet}]}})})},e.prototype.updateToken=function(e,t,n,i,r){return Object(c.__awaiter)(this,void 0,void 0,function(){var o,a,s,u,l,b,_,v,m
return Object(c.__generator)(this,function(c){switch(c.label){case 0:o=g(i.getKey("p256dh")),a=g(i.getKey("auth")),s="push_set="+n+"&token="+t+"&authorized_entity="+e+"&endpoint="+i.endpoint+"&encryption_key="+o+"&encryption_auth="+a,p(r.buffer,h.buffer)||(u=g(r),s+="&application_pub_key="+u),(l=new Headers).append("Content-Type","application/x-www-form-urlencoded"),b={method:"POST",headers:l,body:s},c.label=1
case 1:return c.trys.push([1,4,,5]),[4,fetch(f+"/fcm/connect/subscribe",b)]
case 2:return[4,c.sent().json()]
case 3:return _=c.sent(),[3,5]
case 4:throw v=c.sent(),d.create("token-update-failed",{errorInfo:v})
case 5:if(_.error)throw m=_.error.message,d.create("token-update-failed",{errorInfo:m})
if(!_.token)throw d.create("token-update-no-token")
return[2,_.token]}})})},e.prototype.deleteToken=function(e,t,n){return Object(c.__awaiter)(this,void 0,void 0,function(){var i,r,o,a,s,u
return Object(c.__generator)(this,function(c){switch(c.label){case 0:i="authorized_entity="+e+"&token="+t+"&pushSet="+n,(r=new Headers).append("Content-Type","application/x-www-form-urlencoded"),o={method:"POST",headers:r,body:i},c.label=1
case 1:return c.trys.push([1,4,,5]),[4,fetch(f+"/fcm/connect/unsubscribe",o)]
case 2:return[4,c.sent().json()]
case 3:if((a=c.sent()).error)throw s=a.error.message,d.create("token-unsubscribe-failed",{errorInfo:s})
return[3,5]
case 4:throw u=c.sent(),d.create("token-unsubscribe-failed",{errorInfo:u})
case 5:return[2]}})})},e}()
function _(e){for(var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(t),i=new Uint8Array(n.length),r=0;r<n.length;++r)i[r]=n.charCodeAt(r)
return i}var v="undefined",m="fcm_token_object_Store"
function y(){var e=indexedDB.open(v)
e.onerror=function(e){},e.onsuccess=function(t){!function(e){if(e.objectStoreNames.contains(m)){var t=e.transaction(m).objectStore(m),n=new b,i=t.openCursor()
i.onerror=function(e){console.warn("Unable to cleanup old IDB.",e)},i.onsuccess=function(){var t=i.result
if(t){var r=t.value
n.deleteToken(r.fcmSenderId,r.fcmToken,r.fcmPushSet),t.continue()}else e.close(),indexedDB.deleteDatabase(v)}}}(e.result)}}var k=function(){function e(){this.dbPromise=null}return e.prototype.get=function(e){return this.createTransaction(function(t){return t.get(e)})},e.prototype.getIndex=function(e,t){return this.createTransaction(function(n){return n.index(e).get(t)})},e.prototype.put=function(e){return this.createTransaction(function(t){return t.put(e)},"readwrite")},e.prototype.delete=function(e){return this.createTransaction(function(t){return t.delete(e)},"readwrite")},e.prototype.closeDatabase=function(){return Object(c.__awaiter)(this,void 0,void 0,function(){return Object(c.__generator)(this,function(e){switch(e.label){case 0:return this.dbPromise?[4,this.dbPromise]:[3,2]
case 1:e.sent().close(),this.dbPromise=null,e.label=2
case 2:return[2]}})})},e.prototype.createTransaction=function(e,t){return void 0===t&&(t="readonly"),Object(c.__awaiter)(this,void 0,void 0,function(){var n,i,r,o
return Object(c.__generator)(this,function(a){switch(a.label){case 0:return[4,this.getDb()]
case 1:return n=a.sent(),i=n.transaction(this.objectStoreName,t),r=i.objectStore(this.objectStoreName),[4,w(e(r))]
case 2:return o=a.sent(),[2,new Promise(function(e,t){i.oncomplete=function(){e(o)},i.onerror=function(){t(i.error)}})]}})})},e.prototype.getDb=function(){var e=this
return this.dbPromise||(this.dbPromise=new Promise(function(t,n){var i=indexedDB.open(e.dbName,e.dbVersion)
i.onsuccess=function(){t(i.result)},i.onerror=function(){e.dbPromise=null,n(i.error)},i.onupgradeneeded=function(t){return e.onDbUpgrade(i,t)}})),this.dbPromise},e}()
function w(e){return new Promise(function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)}})}var S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this
return t.dbName="fcm_token_details_db",t.dbVersion=3,t.objectStoreName="fcm_token_object_Store",t}return Object(c.__extends)(t,e),t.prototype.onDbUpgrade=function(e,t){var n=e.result
switch(t.oldVersion){case 0:(i=n.createObjectStore(this.objectStoreName,{keyPath:"swScope"})).createIndex("fcmSenderId","fcmSenderId",{unique:!1}),i.createIndex("fcmToken","fcmToken",{unique:!0})
case 1:y()
case 2:var i,r=(i=e.transaction.objectStore(this.objectStoreName)).openCursor()
r.onsuccess=function(){var e=r.result
if(e){var t=e.value,n=Object(c.__assign)({},t)
t.createTime||(n.createTime=Date.now()),"string"==typeof t.vapidKey&&(n.vapidKey=_(t.vapidKey)),"string"==typeof t.auth&&(n.auth=_(t.auth).buffer),"string"==typeof t.auth&&(n.p256dh=_(t.p256dh).buffer),e.update(n),e.continue()}}}},t.prototype.getTokenDetailsFromToken=function(e){return Object(c.__awaiter)(this,void 0,void 0,function(){return Object(c.__generator)(this,function(t){if(!e)throw d.create("bad-token")
return x({fcmToken:e}),[2,this.getIndex("fcmToken",e)]})})},t.prototype.getTokenDetailsFromSWScope=function(e){return Object(c.__awaiter)(this,void 0,void 0,function(){return Object(c.__generator)(this,function(t){if(!e)throw d.create("bad-scope")
return x({swScope:e}),[2,this.get(e)]})})},t.prototype.saveTokenDetails=function(e){return Object(c.__awaiter)(this,void 0,void 0,function(){return Object(c.__generator)(this,function(t){if(!e.swScope)throw d.create("bad-scope")
if(!e.vapidKey)throw d.create("bad-vapid-key")
if(!e.endpoint||!e.auth||!e.p256dh)throw d.create("bad-subscription")
if(!e.fcmSenderId)throw d.create("bad-sender-id")
if(!e.fcmToken)throw d.create("bad-token")
if(!e.fcmPushSet)throw d.create("bad-push-set")
return x(e),[2,this.put(e)]})})},t.prototype.deleteToken=function(e){return Object(c.__awaiter)(this,void 0,void 0,function(){var t
return Object(c.__generator)(this,function(n){switch(n.label){case 0:return"string"!=typeof e||0===e.length?[2,Promise.reject(d.create("invalid-delete-token"))]:[4,this.getTokenDetailsFromToken(e)]
case 1:if(!(t=n.sent()))throw d.create("delete-token-not-found")
return[4,this.delete(t.swScope)]
case 2:return n.sent(),[2,t]}})})},t}(k)
function x(e){if(e.fcmToken&&("string"!=typeof e.fcmToken||0===e.fcmToken.length))throw d.create("bad-token")
if(e.swScope&&("string"!=typeof e.swScope||0===e.swScope.length))throw d.create("bad-scope")
if(e.vapidKey&&(!(e.vapidKey instanceof Uint8Array)||65!==e.vapidKey.length))throw d.create("bad-vapid-key")
if(e.endpoint&&("string"!=typeof e.endpoint||0===e.endpoint.length))throw d.create("bad-subscription")
if(e.auth&&!(e.auth instanceof ArrayBuffer))throw d.create("bad-subscription")
if(e.p256dh&&!(e.p256dh instanceof ArrayBuffer))throw d.create("bad-subscription")
if(e.fcmSenderId&&("string"!=typeof e.fcmSenderId||0===e.fcmSenderId.length))throw d.create("bad-sender-id")
if(e.fcmPushSet&&("string"!=typeof e.fcmPushSet||0===e.fcmPushSet.length))throw d.create("bad-push-set")}var T=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this
return t.dbName="fcm_vapid_details_db",t.dbVersion=1,t.objectStoreName="fcm_vapid_object_Store",t}return Object(c.__extends)(t,e),t.prototype.onDbUpgrade=function(e){e.result.createObjectStore(this.objectStoreName,{keyPath:"swScope"})},t.prototype.getVapidFromSWScope=function(e){return Object(c.__awaiter)(this,void 0,void 0,function(){var t
return Object(c.__generator)(this,function(n){switch(n.label){case 0:if("string"!=typeof e||0===e.length)throw d.create("bad-scope")
return[4,this.get(e)]
case 1:return[2,(t=n.sent())?t.vapidKey:void 0]}})})},t.prototype.saveVapidDetails=function(e,t){return Object(c.__awaiter)(this,void 0,void 0,function(){var n
return Object(c.__generator)(this,function(i){if("string"!=typeof e||0===e.length)throw d.create("bad-scope")
if(null===t||65!==t.length)throw d.create("bad-vapid-key")
return n={swScope:e,vapidKey:t},[2,this.put(n)]})})},t.prototype.deleteVapidDetails=function(e){return Object(c.__awaiter)(this,void 0,void 0,function(){var t
return Object(c.__generator)(this,function(n){switch(n.label){case 0:return[4,this.getVapidFromSWScope(e)]
case 1:if(!(t=n.sent()))throw d.create("delete-scope-not-found")
return[4,this.delete(e)]
case 2:return n.sent(),[2,t]}})})},t}(k),E="messagingSenderId",O=function(){function e(e){var t=this
if(!e.options[E]||"string"!=typeof e.options[E])throw d.create("bad-sender-id")
this.messagingSenderId=e.options[E],this.tokenDetailsModel=new S,this.vapidDetailsModel=new T,this.iidModel=new b,this.app=e,this.INTERNAL={delete:function(){return t.delete()}}}return e.prototype.getToken=function(){return Object(c.__awaiter)(this,void 0,void 0,function(){var e,t,n,i,r
return Object(c.__generator)(this,function(o){switch(o.label){case 0:if("denied"===(e=this.getNotificationPermission_()))throw d.create("notifications-blocked")
return"granted"!==e?[2,null]:[4,this.getSWRegistration_()]
case 1:return t=o.sent(),[4,this.getPublicVapidKey_()]
case 2:return n=o.sent(),[4,this.getPushSubscription(t,n)]
case 3:return i=o.sent(),[4,this.tokenDetailsModel.getTokenDetailsFromSWScope(t.scope)]
case 4:return(r=o.sent())?[2,this.manageExistingToken(t,i,n,r)]:[2,this.getNewToken(t,i,n)]}})})},e.prototype.manageExistingToken=function(e,t,n,i){return Object(c.__awaiter)(this,void 0,void 0,function(){return Object(c.__generator)(this,function(r){switch(r.label){case 0:return function(e,t,n){if(!n.vapidKey||!p(t.buffer,n.vapidKey.buffer))return!1
var i=e.endpoint===n.endpoint,r=p(e.getKey("auth"),n.auth),o=p(e.getKey("p256dh"),n.p256dh)
return i&&r&&o}(t,n,i)?Date.now()<i.createTime+6048e5?[2,i.fcmToken]:[2,this.updateToken(e,t,n,i)]:[4,this.deleteTokenFromDB(i.fcmToken)]
case 1:return r.sent(),[2,this.getNewToken(e,t,n)]}})})},e.prototype.updateToken=function(e,t,n,i){return Object(c.__awaiter)(this,void 0,void 0,function(){var r,o,a
return Object(c.__generator)(this,function(s){switch(s.label){case 0:return s.trys.push([0,4,,6]),[4,this.iidModel.updateToken(this.messagingSenderId,i.fcmToken,i.fcmPushSet,t,n)]
case 1:return r=s.sent(),o={swScope:e.scope,vapidKey:n,fcmSenderId:this.messagingSenderId,fcmToken:r,fcmPushSet:i.fcmPushSet,createTime:Date.now(),endpoint:t.endpoint,auth:t.getKey("auth"),p256dh:t.getKey("p256dh")},[4,this.tokenDetailsModel.saveTokenDetails(o)]
case 2:return s.sent(),[4,this.vapidDetailsModel.saveVapidDetails(e.scope,n)]
case 3:return s.sent(),[2,r]
case 4:return a=s.sent(),[4,this.deleteToken(i.fcmToken)]
case 5:throw s.sent(),a
case 6:return[2]}})})},e.prototype.getNewToken=function(e,t,n){return Object(c.__awaiter)(this,void 0,void 0,function(){var i,r
return Object(c.__generator)(this,function(o){switch(o.label){case 0:return[4,this.iidModel.getToken(this.messagingSenderId,t,n)]
case 1:return i=o.sent(),r={swScope:e.scope,vapidKey:n,fcmSenderId:this.messagingSenderId,fcmToken:i.token,fcmPushSet:i.pushSet,createTime:Date.now(),endpoint:t.endpoint,auth:t.getKey("auth"),p256dh:t.getKey("p256dh")},[4,this.tokenDetailsModel.saveTokenDetails(r)]
case 2:return o.sent(),[4,this.vapidDetailsModel.saveVapidDetails(e.scope,n)]
case 3:return o.sent(),[2,i.token]}})})},e.prototype.deleteToken=function(e){return Object(c.__awaiter)(this,void 0,void 0,function(){var t,n
return Object(c.__generator)(this,function(i){switch(i.label){case 0:return[4,this.deleteTokenFromDB(e)]
case 1:return i.sent(),[4,this.getSWRegistration_()]
case 2:return(t=i.sent())?[4,t.pushManager.getSubscription()]:[3,4]
case 3:if(n=i.sent())return[2,n.unsubscribe()]
i.label=4
case 4:return[2,!0]}})})},e.prototype.deleteTokenFromDB=function(e){return Object(c.__awaiter)(this,void 0,void 0,function(){var t
return Object(c.__generator)(this,function(n){switch(n.label){case 0:return[4,this.tokenDetailsModel.deleteToken(e)]
case 1:return t=n.sent(),[4,this.iidModel.deleteToken(t.fcmSenderId,t.fcmToken,t.fcmPushSet)]
case 2:return n.sent(),[2]}})})},e.prototype.getPushSubscription=function(e,t){return e.pushManager.getSubscription().then(function(n){return n||e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t})})},e.prototype.requestPermission=function(){throw d.create("only-available-in-window")},e.prototype.useServiceWorker=function(e){throw d.create("only-available-in-window")},e.prototype.usePublicVapidKey=function(e){throw d.create("only-available-in-window")},e.prototype.onMessage=function(e,t,n){throw d.create("only-available-in-window")},e.prototype.onTokenRefresh=function(e,t,n){throw d.create("only-available-in-window")},e.prototype.setBackgroundMessageHandler=function(e){throw d.create("only-available-in-sw")},e.prototype.delete=function(){return Object(c.__awaiter)(this,void 0,void 0,function(){return Object(c.__generator)(this,function(e){switch(e.label){case 0:return[4,Promise.all([this.tokenDetailsModel.closeDatabase(),this.vapidDetailsModel.closeDatabase()])]
case 1:return e.sent(),[2]}})})},e.prototype.getNotificationPermission_=function(){return Notification.permission},e.prototype.getTokenDetailsModel=function(){return this.tokenDetailsModel},e.prototype.getVapidDetailsModel=function(){return this.vapidDetailsModel},e.prototype.getIidModel=function(){return this.iidModel},e}()
var I=function(e){function t(t){var n=e.call(this,t)||this
return n.bgMessageHandler=null,self.addEventListener("push",function(e){n.onPush(e)}),self.addEventListener("pushsubscriptionchange",function(e){n.onSubChange(e)}),self.addEventListener("notificationclick",function(e){n.onNotificationClick(e)}),n}return Object(c.__extends)(t,e),t.prototype.onPush=function(e){e.waitUntil(this.onPush_(e))},t.prototype.onSubChange=function(e){e.waitUntil(this.onSubChange_(e))},t.prototype.onNotificationClick=function(e){e.waitUntil(this.onNotificationClick_(e))},t.prototype.onPush_=function(e){return Object(c.__awaiter)(this,void 0,void 0,function(){var t,n,i,r,o,a
return Object(c.__generator)(this,function(s){switch(s.label){case 0:if(!e.data)return[2]
try{t=e.data.json()}catch(e){return[2]}return[4,this.hasVisibleClients_()]
case 1:return s.sent()?[2,this.sendMessageToWindowClients_(t)]:(n=this.getNotificationData_(t))?(i=n.title||"",[4,this.getSWRegistration_()]):[3,3]
case 2:return r=s.sent(),o=n.actions,a=Notification.maxActions,o&&a&&o.length>a&&console.warn("This browser only supports "+a+" actions.The remaining actions will not be displayed."),[2,r.showNotification(i,n)]
case 3:return this.bgMessageHandler?[4,this.bgMessageHandler(t)]:[3,5]
case 4:return s.sent(),[2]
case 5:return[2]}})})},t.prototype.onSubChange_=function(e){return Object(c.__awaiter)(this,void 0,void 0,function(){var e,t,n,i
return Object(c.__generator)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getSWRegistration_()]
case 1:return e=r.sent(),[3,3]
case 2:throw t=r.sent(),d.create("unable-to-resubscribe",{errorInfo:t})
case 3:return r.trys.push([3,5,,8]),[4,e.pushManager.getSubscription()]
case 4:return r.sent(),[3,8]
case 5:return n=r.sent(),[4,this.getTokenDetailsModel().getTokenDetailsFromSWScope(e.scope)]
case 6:if(!(i=r.sent()))throw n
return[4,this.deleteToken(i.fcmToken)]
case 7:throw r.sent(),n
case 8:return[2]}})})},t.prototype.onNotificationClick_=function(e){return Object(c.__awaiter)(this,void 0,void 0,function(){var t,n,i,r
return Object(c.__generator)(this,function(a){switch(a.label){case 0:return e.notification&&e.notification.data&&e.notification.data.FCM_MSG?e.action?[2]:(e.stopImmediatePropagation(),e.notification.close(),(t=e.notification.data.FCM_MSG).notification&&(n=t.fcmOptions&&t.fcmOptions.link||t.notification.click_action)?[4,this.getWindowClient_(n)]:[2]):[2]
case 1:return(i=a.sent())?[3,3]:[4,self.clients.openWindow(n)]
case 2:return i=a.sent(),[3,5]
case 3:return[4,i.focus()]
case 4:i=a.sent(),a.label=5
case 5:return i?(delete t.notification,delete t.fcmOptions,r=A(o.NOTIFICATION_CLICKED,t),[2,this.attemptToMessageClient_(i,r)]):[2]}})})},t.prototype.getNotificationData_=function(e){var t
if(e&&"object"==typeof e.notification){var n=Object(c.__assign)({},e.notification)
return n.data=Object(c.__assign)({},e.notification.data,((t={}).FCM_MSG=e,t)),n}},t.prototype.setBackgroundMessageHandler=function(e){if(!e||"function"!=typeof e)throw d.create("bg-handler-function-expected")
this.bgMessageHandler=e},t.prototype.getWindowClient_=function(e){return Object(c.__awaiter)(this,void 0,void 0,function(){var t,n,i,r
return Object(c.__generator)(this,function(o){switch(o.label){case 0:return t=new URL(e,self.location.href).href,[4,j()]
case 1:for(n=o.sent(),i=null,r=0;r<n.length;r++)if(new URL(n[r].url,self.location.href).href===t){i=n[r]
break}return[2,i]}})})},t.prototype.attemptToMessageClient_=function(e,t){return Object(c.__awaiter)(this,void 0,void 0,function(){return Object(c.__generator)(this,function(n){if(!e)throw d.create("no-window-client-to-msg")
return e.postMessage(t),[2]})})},t.prototype.hasVisibleClients_=function(){return Object(c.__awaiter)(this,void 0,void 0,function(){return Object(c.__generator)(this,function(e){switch(e.label){case 0:return[4,j()]
case 1:return[2,e.sent().some(function(e){return"visible"===e.visibilityState&&!e.url.startsWith("chrome-extension://")})]}})})},t.prototype.sendMessageToWindowClients_=function(e){return Object(c.__awaiter)(this,void 0,void 0,function(){var t,n,i=this
return Object(c.__generator)(this,function(r){switch(r.label){case 0:return[4,j()]
case 1:return t=r.sent(),n=A(o.PUSH_MSG_RECEIVED,e),[4,Promise.all(t.map(function(e){return i.attemptToMessageClient_(e,n)}))]
case 2:return r.sent(),[2]}})})},t.prototype.getSWRegistration_=function(){return Object(c.__awaiter)(this,void 0,void 0,function(){return Object(c.__generator)(this,function(e){return[2,self.registration]})})},t.prototype.getPublicVapidKey_=function(){return Object(c.__awaiter)(this,void 0,void 0,function(){var e,t
return Object(c.__generator)(this,function(n){switch(n.label){case 0:return[4,this.getSWRegistration_()]
case 1:if(!(e=n.sent()))throw d.create("sw-registration-expected")
return[4,this.getVapidDetailsModel().getVapidFromSWScope(e.scope)]
case 2:return null==(t=n.sent())?[2,h]:[2,t]}})})},t}(O)
function j(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function A(e,t){var n
return(n={})[r.TYPE_OF_MSG]=e,n[r.DATA]=t,n}var D,N,C=function(e){function t(t){var n=e.call(this,t)||this
return n.registrationToUse=null,n.publicVapidKeyToUse=null,n.manifestCheckPromise=null,n.messageObserver=null,n.tokenRefreshObserver=null,n.onMessageInternal=Object(u.createSubscribe)(function(e){n.messageObserver=e}),n.onTokenRefreshInternal=Object(u.createSubscribe)(function(e){n.tokenRefreshObserver=e}),n.setupSWMessageListener_(),n}return Object(c.__extends)(t,e),t.prototype.getToken=function(){return Object(c.__awaiter)(this,void 0,void 0,function(){return Object(c.__generator)(this,function(t){switch(t.label){case 0:return this.manifestCheckPromise||(this.manifestCheckPromise=function(){return Object(c.__awaiter)(this,void 0,void 0,function(){var e,t
return Object(c.__generator)(this,function(n){switch(n.label){case 0:if(!(e=document.querySelector('link[rel="manifest"]')))return[2]
n.label=1
case 1:return n.trys.push([1,4,,5]),[4,fetch(e.href)]
case 2:return[4,n.sent().json()]
case 3:return t=n.sent(),[3,5]
case 4:return n.sent(),[2]
case 5:if(!t||!t.gcm_sender_id)return[2]
if("103953800507"!==t.gcm_sender_id)throw d.create("incorrect-gcm-sender-id")
return[2]}})})}()),[4,this.manifestCheckPromise]
case 1:return t.sent(),[2,e.prototype.getToken.call(this)]}})})},t.prototype.requestPermission=function(){return Object(c.__awaiter)(this,void 0,void 0,function(){var e
return Object(c.__generator)(this,function(t){switch(t.label){case 0:return"granted"===this.getNotificationPermission_()?[2]:[4,Notification.requestPermission()]
case 1:if("granted"===(e=t.sent()))return[2]
throw"denied"===e?d.create("permission-blocked"):d.create("permission-default")}})})},t.prototype.useServiceWorker=function(e){if(!(e instanceof ServiceWorkerRegistration))throw d.create("sw-registration-expected")
if(null!=this.registrationToUse)throw d.create("use-sw-before-get-token")
this.registrationToUse=e},t.prototype.usePublicVapidKey=function(e){if("string"!=typeof e)throw d.create("invalid-public-vapid-key")
if(null!=this.publicVapidKeyToUse)throw d.create("use-public-key-before-get-token")
var t=_(e)
if(65!==t.length)throw d.create("public-vapid-key-decryption-failed")
this.publicVapidKeyToUse=t},t.prototype.onMessage=function(e,t,n){return"function"==typeof e?this.onMessageInternal(e,t,n):this.onMessageInternal(e)},t.prototype.onTokenRefresh=function(e,t,n){return"function"==typeof e?this.onTokenRefreshInternal(e,t,n):this.onTokenRefreshInternal(e)},t.prototype.waitForRegistrationToActivate_=function(e){var t=e.installing||e.waiting||e.active
return new Promise(function(n,i){if(t)if("activated"!==t.state)if("redundant"!==t.state){var r=function(){if("activated"===t.state)n(e)
else{if("redundant"!==t.state)return
i(d.create("sw-reg-redundant"))}t.removeEventListener("statechange",r)}
t.addEventListener("statechange",r)}else i(d.create("sw-reg-redundant"))
else n(e)
else i(d.create("no-sw-in-reg"))})},t.prototype.getSWRegistration_=function(){var e=this
return this.registrationToUse?this.waitForRegistrationToActivate_(this.registrationToUse):(this.registrationToUse=null,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"}).catch(function(e){throw d.create("failed-serviceworker-registration",{browserErrorMessage:e.message})}).then(function(t){return e.waitForRegistrationToActivate_(t).then(function(){return e.registrationToUse=t,t.update(),t})}))},t.prototype.getPublicVapidKey_=function(){return Object(c.__awaiter)(this,void 0,void 0,function(){return Object(c.__generator)(this,function(e){return this.publicVapidKeyToUse?[2,this.publicVapidKeyToUse]:[2,h]})})},t.prototype.setupSWMessageListener_=function(){var e=this
navigator.serviceWorker.addEventListener("message",function(t){if(t.data&&t.data[r.TYPE_OF_MSG]){var n=t.data
switch(n[r.TYPE_OF_MSG]){case o.PUSH_MSG_RECEIVED:case o.NOTIFICATION_CLICKED:var i=n[r.DATA]
e.messageObserver&&e.messageObserver.next(i)}}},!1)},t}(O)
function P(){return self&&"ServiceWorkerGlobalScope"in self?"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey"):navigator.cookieEnabled&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}D=s.a,N={isSupported:P},D.INTERNAL.registerService("messaging",function(e){if(!P())throw d.create("unsupported-browser")
return self&&"ServiceWorkerGlobalScope"in self?new I(e):new C(e)},N)
var M,L={settings:{baseUrlAdmin:"https://swisscom.push.delivery/push-admin-api",customerId:"SWISSCOM",translation:{useTranslations:!0,languages:["French","German","Italian"]},useSidebar:!0,infoModal:{showModal:!1,afterDelay:"5000"},alwaysBrowserNotification:!1},app:{api:{appId:"218",platformId:"7",userId:"api-SWISSCOM-218",password:"bk3PwK7YZqpLoFEj",baseUrl:"https://swisscom.push.delivery/push-api"},template:{modal:{logo:"https://push.delivery.ethinking.de/bluewin/images/bluewin-logo.jpg"},bell:{image:"https://push.delivery.ethinking.de/bluewin/images/bluewin-wheel.svg"}}}},B=null,R=new Date,F=new Date(R.getFullYear(),R.getMonth(),R.getDate())/1e3,U=document.documentElement.lang,V=!1,W={status:{isSubscribed:!1,hasDenied:!1,lastVisit:F,requestedPermission:!1,firstTime:!0},api:{deviceId:"",key:"",auth:"",endpoint:""}}
function z(e){localStorage.setItem("ethinkingCustomer",JSON.stringify(e))}function K(){M=Notification.permission}function H(){var e=[]
B.status.isSubscribed&&(console.log("refreshToken"),We({appId:Pe,platformId:Me,deviceId:B.api.deviceId},"/list").then(function(t){t.forEach(function(t){e.push(t.id)}),B.status.isSubscribed=!1,B.api.deviceId="",B.api.auth="",B.api.key="",B.api.endpoint="",z(B),function(e){console.log("refresh Token",e,B.api.deviceId),e&&e.length>0&&Ge("ureg",e)
Ae.getToken().then(function(t){console.log("refresh",t),B.status.isSubscribed=!0,B.api.deviceId=t,B.api.auth="auth"+t,B.api.key="key"+t,B.api.endpoint=B.api.key+B.api.auth,z(B),e&&e.length>0&&Ge("reg",e)})}(e)}))}function q(e,t){t=t||"block","none"===e.style.display?e.style.display=t:e.style.display="none"}function G(){var e=document.getElementById("bell_info")
e.classList.toggle("active"),setTimeout(function(){e.classList.toggle("active")},2e3)}function $(){var e=document.querySelectorAll(".ethinking-push__checkbox")
e&&Array.from(e).forEach(function(e){V||e.addEventListener("change",function(e){console.log(e.target.checked,e.target.value),Ge(e.target.checked?"reg":"ureg",e.target.value),V=!0})})}function J(){var e=document.getElementById("ethinking-push__side"),t=document.getElementById("ethinking-push__content--modal")
$(),e&&e.classList.toggle("collapsed"),t&&q(t)}function Y(e,t){for(var n=document.getElementsByClassName(e),i=0;i<n.length;i++)n[i].style.display=t}function X(e,t,n){e.classList.contains("active")||(e.classList.add("active"),t.classList.remove("active"),n.classList.remove("active"))}function Z(){var e=document.getElementById("ethinking-push__denied--modal")
document.getElementById("ethinking-push__denied--modal-close").addEventListener("click",function(){e.classList.toggle("hide")})}function Q(e){for(var t=0,n=["ethinking-push__tab__msg","ethinking-push__tab__settings"];t<n.length;t++){var i=n[t]
document.querySelector(".".concat(i)).classList.remove("active"),document.querySelector("#".concat(i)).style.display="none"}document.querySelector("#".concat(e.target.className)).style.display="block",document.querySelector(".".concat(e.target.className)).classList.add("active")}localStorage.getItem("ethinkingCustomer")?B=function(){try{return JSON.parse(localStorage.getItem("ethinkingCustomer"))}catch(e){console.warn("no customer available",e)}}():z(B=W),"Notification"in window?(M=String(Notification.permission),console.log(M,"notification Status")):console.warn("Notification are not supported by  browser")
var ee,te,ne,ie,re,oe,ae,se={bell:{subscribed:"Sie sind für Benachrichtigungen angemeldet.",blocked:"Bitte Benachrichtigungen im Browser erlauben",signup:"Für Benachrichtigungen anmelden"},sidebar:{list:"Keine Benachrichtigungen vorhanden.",notification:"Meldungen",settings:"Einstellungen",language:"Sprache wählen:",description:"Sie erhalten Benachrichtigungen für:",theme:"Themenbereich wählen",saveBtn:"Speichern",unsubscribeBtn:"Von allen Benachrichtigungen abmelden",german:"Deutsch",french:"Französisch",italian:"Italienisch",close:"Schliessen"},modal:{description:"Möchten Sie künftig direkt per Browser-Benachrichtigung über die wichtigsten Nachrichten informiert werden?",confirmBtn:"Ja",denyBtn:"Nein"},confirm:{text:"Sind Sie sich sicher?"},denied:{title:"Blockierung jetzt aufheben",description:"So können Sie die Blockierung schnell und einfach aufheben. Danach laden Sie die Seite bitte neu."}},ce={bell:{subscribed:"Avete attivato le notifiche",blocked:"Autorizzare le notifiche sul browser",signup:"Attivare le notifiche"},sidebar:{list:"Nessuna notifica disponibile.",notification:"Notifiche",settings:"Impostazioni",language:"Selezionare la lingua",description:"",theme:"Selezionare un tema",saveBtn:"Salvare",unsubscribeBtn:"Annullare l'abbonamento a tutte le notifiche",german:"Tedesco",french:"Francese",italian:"Italiano",close:"Chiudere"},modal:{description:"In futuro, volete essere informati delle principali novità attraverso le notifiche sul vostro browser?",confirmBtn:"Sì",denyBtn:"No"},confirm:{text:"È sicuro?"},denied:{title:"Sbloccare ora",description:"Ecco come annullare il blocco rapidamente e facilmente. Aggiorna la pagina."}},ue={bell:{subscribed:"Vous avez activé les notifications",blocked:"Merci d'autoriser les notifications du navigateur",signup:"Activer les notifications"},sidebar:{list:"Aucune notification disponible.",notification:"Notifications",settings:"Paramètres",language:"Sélectionner la langue",description:"",theme:"Sélectionner un thème",saveBtn:"Sauvegarder",unsubscribeBtn:"Se désabonner de toutes les notifications",german:"Allemand",french:"Français",italian:"Italien",close:"Fermer"},modal:{description:"À l'avenir, souhaitez-vous être informé des principales actualités par notification de votre navigateur?",confirmBtn:"Oui",denyBtn:"Non"},confirm:{text:"Êtes-vous sûr?"},denied:{title:"Débloquer maintenant",description:"Voici comment annuler rapidement et facilement le blocage. Rafraîchir ensuite la page."}},le=document.documentElement.lang,de=L.app,he=(re={chrome:{deniedImageDE:"https://push.delivery.ethinking.de/bluewin/images/chrome-notification-german.png",deniedImageFR:"https://push.delivery.ethinking.de/bluewin/images/chrome-notification-french.png",deniedImageIT:"https://push.delivery.ethinking.de/bluewin/images/chrome-notification-italian.png"},firefox:{deniedImageDE:"https://push.delivery.ethinking.de/bluewin/images/firefox-notification-german.png",deniedImageFR:"https://push.delivery.ethinking.de/bluewin/images/firefox-notification-french.png",deniedImageIT:"https://push.delivery.ethinking.de/bluewin/images/firefox-notification-italian.png"}},(ae=navigator.userAgent).indexOf("Chrome")>-1?oe=re.chrome:ae.indexOf("Firefox")>-1?oe=re.firefox:ae.indexOf("Safari")>-1&&console.log("safari"),oe)
"de"===le?(te=se,ne=he.deniedImageDE,"german",ie="Keine Benachrichtigungen vorhanden."):"fr"===le?(te=ue,ne=he.deniedImageFR,"french",ie="Aucune notification disponible."):"it"===le&&(te=ce,ne=he.deniedImageIT,"italian",ie="Nessuna notifica disponibile.")
var fe,pe=B,ge=de.template.modal,be=de.template.bell,_e=te.bell,ve=te.sidebar,me=te.modal,ye=te.denied,ke=L.settings
function we(){var e=document.createElement("div"),t=_e.signup
e.setAttribute("id","bellBtn"),e.classList.add("ethinking-push__bell"),e.style.display="none",t=pe.status.isSubscribed?_e.subscribed:"denied"===Notification.permission?_e.blocked:_e.signup
var n,i=be.hasOwnProperty("color")?be.color:"transparent",r=be.hasOwnProperty("image")?be.image:""
e.innerHTML='\n    <div class="ethinking-push__bell__button" style="background-image: url(\''.concat(r,"'); background-color: ").concat(i,';"></div>\n    <div class="ethinking-push__bell__info" id="bell_info">\n    <div class="ethinking-push__bell__info--triangle"></div>\n      <div class="ethinking-push__bell__info--text">').concat(t,"</div>\n    </div>\n  "),n=document.getElementById("bell-button"),document.body.contains(n)||document.body.appendChild(e)}function Se(e){var t=document.getElementById("bellBtn"),n=document.querySelector(".ethinking-push__bell__info--text"),i=""
i=pe.status.isSubscribed?_e.subscribed:"denied"===Notification.permission?_e.blocked:_e.signup,t&&(t.classList[e]("active"),n.textContent=i)}function xe(e){var t=ee,n=document.createElement("div")
ke.useSidebar?(n.classList.add("ethinking-push__sidebar"),n.setAttribute("id","ethinking-push__side")):(n.classList.add("ethinking-push","ethinking-push__content--modal"),n.setAttribute("id","ethinking-push__content--modal")),ke.translation.useTranslations?n.innerHTML='<div class="ethinking-push__tab__close" id="ethinking-push__sidebar--close">'.concat(ve.close,' X</div>\n    <ul class="ethinking-push__sidebar__navigation">\n      <li class="ethinking-push__tab__msg">').concat(ve.notification,'</li>\n      <li class="ethinking-push__tab__settings active"> ').concat(ve.settings,'</li>\n    </ul>\n    \n    <ul id="ethinking-push__tab__msg" class="ethinking-push__sidebarmessages">\n      ').concat(t,'\n    </ul>\n    \n    <div id="ethinking-push__tab__settings" class="ethinking-push__sidebarsettings">\n    <div class="ethinking-push__sidebarsettings_language">\n    ').concat(ve.language,'\n    <ul>\n    <li class="language-switch-de">').concat(ve.german,'</li>\n    <li class="language-switch-fr">').concat(ve.french,'</li>\n    <li class="language-switch-it">').concat(ve.italian,'</li>\n    </ul> \n  </div>\n      <h3 class="ethinking-push__sidebarsettings__title">\n        ').concat(ve.theme,'\n      </h3>\n      <ul class="ethinking-push__sidebarsettings__list"> ').concat(e,'</ul>\n     \n      <div class="ethinking-push__sidebarsettings__footer">\n       <button class="ethinking-push__sidebarsettings__save" id="ethinking-push__sidebarsettings__save">').concat(ve.saveBtn,'</button>\n        <button class="ethinking-push__sidebarsettings__cancel" id="ethinking-push__siderbar_cancel">').concat(ve.unsubscribeBtn,"</button>\n      </div>\n    </div>"):n.innerHTML='<div class="ethinking-push__tab__close" id="ethinking-push__sidebar--close">'.concat(ve.close,' X</div>\n    <ul class="ethinking-push__sidebar__navigation">\n      <li class="ethinking-push__tab__msg">').concat(ve.notification,'</li>\n      <li class="ethinking-push__tab__settings active"> ').concat(ve.settings,'</li>\n    </ul>\n    \n    <ul id="ethinking-push__tab__msg" class="ethinking-push__sidebarmessages">\n      ').concat(t,'\n    </ul>\n    \n    <div id="ethinking-push__tab__settings" class="ethinking-push__sidebarsettings">\n      <h3 class="ethinking-push__sidebarsettings__title">\n        ').concat(ve.theme,'\n      </h3>\n      <ul class="ethinking-push__sidebarsettings__list"> ').concat(e,'</ul>\n     \n      <div class="ethinking-push__sidebarsettings__footer">\n       <button class="ethinking-push__sidebarsettings__save" id="ethinking-push__sidebarsettings__save">').concat(ve.saveBtn,'</button>\n        <button class="ethinking-push__sidebarsettings__cancel" id="ethinking-push__siderbar_cancel">').concat(ve.unsubscribeBtn,"</button>\n      </div>\n    </div>"),document.getElementById("ethinking-push__side")||document.body.appendChild(n),function(){if(ke.translation.useTranslations){var e=document.querySelector(".language-switch-fr"),t=document.querySelector(".language-switch-de"),n=document.querySelector(".language-switch-it")
"fr"===U?(X(e,t,n),Y("browser_french","list-item"),Y("browser_german","none"),Y("browser_italian","none")):"it"===U?(X(n,e,t),Y("browser_italian","list-item"),Y("browser_french","none"),Y("browser_german","none")):(X(t,e,n),Y("browser_german","list-item"),Y("browser_french","none"),Y("browser_italian","none")),t.addEventListener("click",function(i){i.stopPropagation(),X(t,e,n),Y("browser_german","list-item"),Y("browser_french","none"),Y("browser_italian","none")}),e.addEventListener("click",function(i){i.stopPropagation(),X(e,t,n),Y("browser_french","list-item"),Y("browser_german","none"),Y("browser_italian","none")}),n.addEventListener("click",function(i){i.stopPropagation(),X(n,t,e),Y("browser_italian","list-item"),Y("browser_french","none"),Y("browser_german","none")})}document.querySelector(".ethinking-push__tab__msg").addEventListener("click",function(e){e.stopPropagation(),Q(e)}),document.querySelector(".ethinking-push__tab__settings").addEventListener("click",function(e){e.stopPropagation(),Q(e)})}(),Ke()}var Te=[]
function Ee(e){if(!("indexedDB"in window&&e))return!1
try{e.onupgradeneeded=function(){(fe=e.result).objectStoreNames.contains("notification")||fe.createObjectStore("notification",{keyPath:"text"}).createIndex("date","date",{unique:!1})},function(e){B,e.onsuccess=function(){fe=e.result,!0,setTimeout(function(){!function(){try{var e=[]
Te&&Te.length>0&&Te.forEach(function(t){e.push(t.date)})
var t=fe.transaction("notification").objectStore("notification")
t.openCursor().onsuccess=function(t){var n=t.target.result
n&&(e.includes(n.value.date)||Te.push({title:n.value.title,message:n.value.text,date:n.value.date,url:n.value.url}),n.continue()),function(){var e=""
if(Te&&Te.length>0){Te.sort(function(e,t){return t.date-e.date})
var t=!0,n=!1,i=void 0
try{for(var r,o=Te[Symbol.iterator]();!(t=(r=o.next()).done);t=!0){var a=r.value,s=new Date(a.date),c=s.toLocaleDateString("de-DE",{day:"numeric",month:"long",year:"numeric"}),u=s.getHours(),l="0"+s.getMinutes(),d="0"+s.getSeconds()
e+='<li class="ethinking__push_notification"><a href="'.concat(a.url,'" target="_blank">\n        <strong>').concat(a.title,'</strong><p class="notification-text">').concat(a.message,'</p><p class="notification-date">').concat(c,", ").concat(u,":").concat(l.substr(-2),":").concat(d.substr(-2),"</p></a></li>")}}catch(e){n=!0,i=e}finally{try{t||null==o.return||o.return()}finally{if(n)throw i}}}else e='<li class="no-notifications">'+ie+"</li>"
ee=e}()},t.complete=function(){fe.close()}}catch(e){console.log("Could not read",e)}}()},1e3)},e.onerror=function(){!1}}(e)}catch(e){console.log("error",e)}}function Oe(e,t){return{date:t,text:e.message||e.body,url:e.url||window.location.href,title:e.title?e.title:"Bluewin"}}n(5)
n.d(t,"messaging",function(){return Ae}),n.d(t,"configData",function(){return Ne}),n.d(t,"appId",function(){return Pe}),n.d(t,"platformId",function(){return Me}),n.d(t,"headers",function(){return Ie}),n.d(t,"tagsSubscribed",function(){return Le}),n.d(t,"request",function(){return je}),n.d(t,"postData",function(){return We}),n.d(t,"initiateSidebarButtons",function(){return Ke}),n.d(t,"updateSubscription",function(){return Ge}),s.a.initializeApp({messagingSenderId:"1073932710355"})
var Ie,je,Ae=s.a.messaging(),De=null,Ne=L.app,Ce=ke,Pe=Ne.api.appId,Me=Ne.api.platformId,Le=[],Be=B,Re=M,Fe=!1
function Ue(e){e?Be.api.deviceId?(He(),Be.status.isSubscribed=!0,z(Be),Se("add"),G()):Ae.getToken().then(function(e){He(),Be.status.isSubscribed=!0,Be.status.hasDenied=!1,Be.api.deviceId=e,Be.api.key="key"+e,Be.api.auth="auth"+e,Be.api.endpoint=Be.api.key+Be.api.auth,z(Be),Se("add"),G(),qe()}):"denied"===Re?Ve():Notification.requestPermission().then(function(){return Ae.getToken()}).then(function(e){Be.status.isSubscribed=!0,Be.api.deviceId=e,Be.api.key="key"+e,Be.api.auth="auth"+e,Be.api.endpoint=Be.api.key+Be.api.auth,Be.status.requestedPermission=!0,Re=String(Notification.permission),z(Be),Se("add"),G(),He(),qe()
var t=document.getElementById("ethinking-push__denied--modal")
"granted"===Re&&t&&t.remove()}).catch(function(e){"messaging/permission-blocked"===e.code&&Ve()})}function Ve(){var e,t=document.getElementById("optIn_Modal"),n=document.getElementById("ethinking-push__denied--modal")
K(),"denied"!==Re&&"default"!==Re||(t&&t.remove(),n||((e=document.createElement("div")).classList.add("ethinking-push__denied"),e.setAttribute("id","ethinking-push__denied--modal"),e.innerHTML='\n   <div class="ethinking-push__modalbody">\n    <div class="ethinking-push__modalbody__picture">\n      <img src="'.concat(ge.logo,'" alt="Logo">\n    </div>\n    <div class="ethinking-push__modalbody__content">\n      <h3 class="ethinking-push__modalbody__title">').concat(ye.title,'</h3>\n      <p class="ethinking-push__modalbody__text">\n        ').concat(ye.description,'\n    </p>     \n    <div class="ethinking-push__image">\n    <img src="').concat(ne,'" alt="Bild vom Browser">\n</div>\n    </div>\n    <div id="ethinking-push__denied--modal-close" class="ethinking-push__denied__close">\n</div>\n  </div>\n  '),document.getElementById("ethinking-push__denied--modal")||document.body.appendChild(e),Z()))}function We(e,t){return fetch(L.app.api.baseUrl+t,{method:"POST",headers:Ie,body:JSON.stringify(e)}).then(function(e){return e.clone().json().catch(function(){return e.text()})}).catch(function(e){return console.log("Error:",e)})}function ze(e,t){Le=t
var n=[],i=[]
if(null!==t&&t.forEach(function(e){i.push(e.id)}),ke.translation.useTranslations){if(e.length>0){var r=[]
e.forEach(function(e){var o,a=[]
e.groups&&e.groups.forEach(function(e){e.sourceId&&e.sourceId.startsWith("browser")&&(e.sourceId.length>0&&(o=e.sourceId),e.tags.forEach(function(e){null!==t&&i.length>0?i.forEach(function(t){t===e.id?(e.checked="checked",r.push(e.id)):e.checked=""}):Be.status.firstTime&&(e.sourceId.indexOf(le)>-1?(e.checked="checked",r.push(e.id)):e.checked=""),a.push(e)}),n.push({name:o,tags:a}))})}),Ge("reg",r),Be.status.firstTime=!1,z(Be)}}else if(e.length>0){var o=[]
e.forEach(function(e){var t=[]
e.tags.forEach(function(e){null!==i&&i.length>0?i.forEach(function(t){t===e.id?(e.checked="checked",o.push(e.id)):e.checked=""}):Be.status.firstTime&&(e.checked="checked",o.push(e.id)),t.push(e)}),n.push({name:"",tags:t})}),Ge("reg",o),Be.status.firstTime=!1,z(Be)}var a=document.getElementById("ethinking-push__side"),s=document.getElementById("ethinking-push__content--modal")
a&&s&&(a||s)||(ke.translation.useTranslations?xe(function(e,t){e=e||[],t=t||[]
var n,i="",r=[]
if(ke.translation.useTranslations&&(r="it"===le&&e[2].name?e.filter(function(e){return"browser_italian"===e.name}):"fr"===le&&e[1].name?e.filter(function(e){return"browser_french"===e.name}):e.filter(function(e){return"browser_german"===e.name})),pe.status.isSubscribed)if(t.length){var o=!0,a=!1,s=void 0
try{for(var c,u=e[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){var l=c.value,d=!0,h=!1,f=void 0
try{for(var p,g=l.tags[Symbol.iterator]();!(d=(p=g.next()).done);d=!0){var b=p.value,_=!0,v=!1,m=void 0
try{for(var y,k=t[Symbol.iterator]();!(_=(y=k.next()).done);_=!0){var w=y.value
b.id===w.id&&(b.checked="checked")}}catch(e){v=!0,m=e}finally{try{_||null==k.return||k.return()}finally{if(v)throw m}}}}catch(e){h=!0,f=e}finally{try{d||null==g.return||g.return()}finally{if(h)throw f}}}}catch(e){a=!0,s=e}finally{try{o||null==u.return||u.return()}finally{if(a)throw s}}}else{var S=!0,x=!1,T=void 0
try{for(var E,O=e[Symbol.iterator]();!(S=(E=O.next()).done);S=!0)E.value.checked=""}catch(e){x=!0,T=e}finally{try{S||null==O.return||O.return()}finally{if(x)throw T}}}else{var I=!0,j=!1,A=void 0
try{for(var D,N=r[Symbol.iterator]();!(I=(D=N.next()).done);I=!0){var C=D.value.tags,P=!0,M=!1,L=void 0
try{for(var B,R=C[Symbol.iterator]();!(P=(B=R.next()).done);P=!0)B.value.checked="checked"}catch(e){M=!0,L=e}finally{try{P||null==R.return||R.return()}finally{if(M)throw L}}}}catch(e){j=!0,A=e}finally{try{I||null==N.return||N.return()}finally{if(j)throw A}}}return e.forEach(function(e){e.tags.forEach(function(e){e.sourceId.startsWith("browser_de")?(n='\n                      <li class="browser_german">\n                      <label class="check-label">\n                          <input type="checkbox" class="ethinking-push__checkbox" id="'.concat(e.name.toLowerCase(),'" data-id="DE-de" value="').concat(e.id,'" ').concat(e.checked,">").concat(e.name,"\n                      </label>\n                      </li>\n                      "),i+=n):e.sourceId.startsWith("browser_fr")?(n='\n                      <li class="browser_french">\n                        <label class="check-label">\n                          <input type="checkbox" class="ethinking-push__checkbox" id="'.concat(e.name.toLowerCase(),'" data-id="FR-fr" value="').concat(e.id,'" ').concat(e.checked,">").concat(e.name,"\n                      </label>\n                        </li>\n                      "),i+=n):e.sourceId.startsWith("browser_it")&&(n='\n                      <li class="browser_italian">\n                          <label class="check-label">\n                          <input type="checkbox" class="ethinking-push__checkbox" id="'.concat(e.name.toLowerCase(),'" data-id="IT-it" value="').concat(e.id,'" ').concat(e.checked,">").concat(e.name,"\n                      </label>\n                        </li>\n                      "),i+=n)})}),i}(n,t)):xe(function(e,t){console.log("creatEList",e,t),e=e||[],t=t||[]
var n,i=""
if(pe.status.isSubscribed)if(t.length){var r=!0,o=!1,a=void 0
try{for(var s,c=e[Symbol.iterator]();!(r=(s=c.next()).done);r=!0){var u=s.value,l=!0,d=!1,h=void 0
try{for(var f,p=u.tags[Symbol.iterator]();!(l=(f=p.next()).done);l=!0){var g=f.value,b=!0,_=!1,v=void 0
try{for(var m,y=t[Symbol.iterator]();!(b=(m=y.next()).done);b=!0){var k=m.value
g.id===k.id&&(g.checked="checked")}}catch(e){_=!0,v=e}finally{try{b||null==y.return||y.return()}finally{if(_)throw v}}}}catch(e){d=!0,h=e}finally{try{l||null==p.return||p.return()}finally{if(d)throw h}}}}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}}else{var w=!0,S=!1,x=void 0
try{for(var T,E=e[Symbol.iterator]();!(w=(T=E.next()).done);w=!0)T.value.checked=""}catch(e){S=!0,x=e}finally{try{w||null==E.return||E.return()}finally{if(S)throw x}}}else{var O=!0,I=!1,j=void 0
try{for(var A,D=e[Symbol.iterator]();!(O=(A=D.next()).done);O=!0){var N=A.value.tags,C=!0,P=!1,M=void 0
try{for(var L,B=N[Symbol.iterator]();!(C=(L=B.next()).done);C=!0)L.value.checked="checked"}catch(e){P=!0,M=e}finally{try{C||null==B.return||B.return()}finally{if(P)throw M}}}}catch(e){I=!0,j=e}finally{try{O||null==D.return||D.return()}finally{if(I)throw j}}}return e[0].tags.forEach(function(e){n='\n                      <li>\n                      <label class="check-label">\n                          <input type="checkbox" class="ethinking-push__checkbox" id="'.concat(e.name.toLowerCase(),'" value="').concat(e.id,'" ').concat(e.checked,">").concat(e.name,"\n                      </label>\n                      </li>\n                      "),i+=n}),i}(n,t))),$()}function Ke(){!function(){var e=document.getElementById("ethinking-push__side"),t=document.getElementById("ethinking-push__siderbar_cancel")
document.getElementById("ethinking-push__sidebarsettings__save").addEventListener("click",function(){e.classList.toggle("collapsed")}),t.addEventListener("click",function(){var e,n=(e=te.confirm.text,window.confirm(e))
Be.status.isSubscribed||(t.style.display="none"),n&&$e()})}()
var e=document.getElementById("ethinking-push__sidebar--close"),t=document.getElementById("ethinking-push__side")
e.addEventListener("click",function(){t.classList.toggle("collapsed")})}function He(){Promise.all([We({appId:Pe,platformId:Me},"/tags"),We({appId:Pe,platformId:Me,deviceId:Be.api.deviceId},"/list")]).then(function(e){ze(e[0],e[1])}).catch(function(e){console.error("Could not get user tags",e)})}function qe(){Ae.onMessage(function(e){var t=e.data,n=t.title,i={body:t.body||t.message,silent:!0,icon:e.data.icon,data:e.data},r=Ne.template.modal.logo||e.data.icon
if(function(e){try{var t=indexedDB.open("ethinking-notification",1),n=Oe(e.data,new Date(Date.now()))
t.onsuccess=function(){var e=t.result.transaction("notification","readwrite").objectStore("notification")
console.log("[Service Worker] note",n),e.put(n)},t.onerror=function(e){console.warn("[Service Worker] idb error",e)}}catch(e){}}(e),e.data.url!==window.location.href)if(L.settings.alwaysBrowserNotification){var o=new Notification(n,i)
o.onclick=function(t){t.preventDefault(),window.open(e.data.url,"_blank"),o.close()}}else!function(e){e.url=e.url||window.location.href,e.title=e.title||"Push Nachricht"
var t=new Date(e.date),n=t.toLocaleDateString("de-DE",{day:"numeric",month:"long",year:"numeric"}),i=t.getHours(),r="0"+t.getMinutes(),o="0"+t.getSeconds(),a=document.createElement("div")
a.classList.add("ethinking-push","ethinking-push__notification"),a.setAttribute("id","ethinking-push__notification--modal"),a.innerHTML='\n  <div class="ethinking-push__notification--icon">\n  <a href="'.concat(e.link,'">\n  <img src="').concat(e.icon,'" width="100%" height="100%" alt="Firmen Icon"></div>\n  <div class="ethinking-push__notification--content">\n  <div class="ethinking-push__notification--title">').concat(e.title,'</div>\n  <div class="ethinking-push__notification--text">').concat(e.text,'</div>\n  <li class="ethinking-push__notification--date">').concat(n,", ").concat(i,":").concat(r.substr(-2),":").concat(o.substr(-2),"</li>\n  </a>\n  </div>\n  "),document.body.appendChild(a)
var s=document.getElementById("ethinking-push__notification--modal")
setTimeout(function(){s.remove()},5e3)}({icon:r,title:e.data.title,text:e.data.message||e.data.body,date:(new Date).getTime(),link:e.data.url})})}function Ge(e,t){if(!Be.status.isSubscribed)return!1
We({tagId:t,appId:Pe,platformId:Me,deviceId:Be.api.deviceId},"/"+e).then(function(){return console.warn("update successful")})}function $e(){if(!Be.status.isSubscribed)return!1
var e=function(e,t){var n=[],i=document.querySelectorAll(".ethinking-push__checkbox")
if("unsub"===t)i.forEach(function(e){e.checked="",n.push(e.value)})
else if(i){console.log("toggleAll")
var r=!0,o=!1,a=void 0
try{for(var s,c=i[Symbol.iterator]();!(r=(s=c.next()).done);r=!0){var u=s.value
e?(console.log("toggleAll translation",u),u.id.indexOf(U)>-1&&(u.checked=t)):u.checked=t,u.checked&&!n.includes(u.value)&&n.push(u.value)}}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}}return n}(Ce.useTranslations,"unsub")
e.length>0&&Ge("ureg",e),document.getElementById("ethinking-push__side").remove(),Be.status.isSubscribed=!1,Be.status.firstTime=!0,z(Be),Se("remove")}window.addEventListener("load",function(){if(!navigator.userAgent.match("Edge")&&(navigator.userAgent.match("Chrome")||navigator.userAgent.match("Firefox"))){if(!Be.api.deviceId&&!Fe&&ke.infoModal.showModal){var e=ke.infoModal.afterDelay||"10000"
setTimeout(function(){var e;(e=document.createElement("div")).classList.add("ethinking-push","ethinking-push__modal--info"),e.setAttribute("id","ethinking-info-modal"),e.innerHTML='\n  <div class="ethinking-push__modalbody">\n   Klicke hier, um dich für unsere Benachrichtigungen anzumelden.\n</div>\n  ',document.body.appendChild(e),setTimeout(function(){document.getElementById("ethinking-info-modal").remove()},5e3)},e)}Ee(je=indexedDB.open("ethinking-notification",1)),Ie={Authorization:"Basic "+btoa(Ne.api.userId+":"+Ne.api.password),"Content-Type":"application/json"},we(),De=document.getElementById("bellBtn"),"serviceWorker"in navigator?(navigator.serviceWorker.register("/service-worker-v2.js",{updateViaCache:"none"}).then(function(e){Ae.useServiceWorker(e),function(){setTimeout(function(){Be.api.device&&(Be.api.deviceId.includes("android")||Be.api.deviceId.includes("mozilla"))&&(H(),void 0===Be.status.firstTime&&(Be.status.firstTime=Be.status.isSubscribed?Be.status.isSubscribed:!Be.isSubscribed,z(Be)))},1e3),Be.status.isSubscribed?(setTimeout(function(){He(),q(De,"flex")},1e3),Be.api.deviceId&&Ae.getToken().then(function(e){e!==Be.api.deviceId&&H()})):q(De,"flex")
De.addEventListener("click",function(){Fe=!0,K()
var e,t,n,i,r=document.getElementById("ethinking-push__denied--modal"),o=document.getElementById("ethinking-push__side"),a=document.getElementById("ethinking-push__content--modal"),s=document.getElementById("ethinking-info-modal"),c=document.getElementById("optIn_Modal")
s&&s.remove(),"denied"===Re||"denied"===Notification.permission||"default"===Re&&navigator.userAgent.match("Firefox")&&(Be.status.hasDenied||Be.api.deviceId)?r?(r.classList.toggle("hide"),Z()):Ue(!1):Be.status.isSubscribed?"granted"===Re?(r&&r.remove(),(o||a)&&J()):($e(),o&&o.remove()):(!Be.api.deviceId||Be.status.hasDenied?c||((i=document.createElement("div")).classList.add("ethinking-push","ethinking-push__modal"),i.setAttribute("id","optIn_Modal"),i.innerHTML='\n   <div class="ethinking-push__modalbody">\n    <div class="ethinking-push__modalbody__picture">\n      <img src="'.concat(ge.logo,'" alt="">\n    </div>\n    <div class="ethinking-push__modalbody__content">\n      <p class="ethinking-push__modalbody__text">\n         ').concat(me.description,'\n    </p>     \n    </div>\n  </div>\n  <div class="ethinking-push__modalfooter">\n    <div class="ethinking-push__modalfooter__confirm-buttons">\n      <button id="modal_deny" class="ethinking-push__modalfooter__deny"">').concat(me.denyBtn,'</button>\n      <button id="modal_allow" class="ethinking-push__modalfooter__allow"">').concat(me.confirmBtn,"</button>\n    </div>\n  </div>\n  "),document.body.appendChild(i),e=document.getElementById("optIn_Modal"),t=document.getElementById("modal_allow"),n=document.getElementById("modal_deny"),t.addEventListener("click",function(){Se("add"),Be.status.hasDenied=!1,Ue("granted"===Re),z(Be),e.remove()}),n.addEventListener("click",function(){Se("remove"),Be.status.hasDenied=!0,z(Be),e.remove()})):Ue("granted"===Re),Ee(je))})}(),e.update()}),Be.status.isSubscribed&&Be.api.deviceId&&qe()):(De&&(De.style.display="none"),console.log("Serviceworker and Push not supported"))}})}])
