starti.app 1.2.21 → 1.2.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.d.ts +2 -0
- package/dist/app.js +5 -2
- package/dist/getIntegration.d.ts +2 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.js +5 -1
- package/dist/integrations/iap.d.ts +16 -0
- package/dist/integrations/iap.js +67 -0
- package/dist/{network.d.ts → integrations/network.d.ts} +1 -1
- package/dist/{network.js → integrations/network.js} +2 -2
- package/package.json +1 -1
- package/umd/main.js +1 -1
package/dist/app.d.ts
CHANGED
|
@@ -46,6 +46,8 @@ export interface IApp extends EventTargetMethods<AppEvents> {
|
|
|
46
46
|
addInternalDomain(domain: string): void;
|
|
47
47
|
/** Remove internal domain */
|
|
48
48
|
removeInternalDomain(domain: string): void;
|
|
49
|
+
/** Set app icon */
|
|
50
|
+
setAppIcon(iconName: string): void;
|
|
49
51
|
/** Add external domain(s) */
|
|
50
52
|
addExternalDomains(...domains: RegExp[]): void;
|
|
51
53
|
/** Remove external domain(s) */
|
package/dist/app.js
CHANGED
|
@@ -11,6 +11,9 @@ class AppClass extends EventHandlerWithTypes_1.EventTargetWithType {
|
|
|
11
11
|
get appIntegration() {
|
|
12
12
|
return (0, getIntegration_1.getIntegration)("AppIntegration");
|
|
13
13
|
}
|
|
14
|
+
get alternateIconsIntegration() {
|
|
15
|
+
return (0, getIntegration_1.getIntegration)("AlternateIconsIntegration");
|
|
16
|
+
}
|
|
14
17
|
setStartiappIsLoaded() {
|
|
15
18
|
this.startiappIsLoaded = true;
|
|
16
19
|
}
|
|
@@ -59,8 +62,8 @@ class AppClass extends EventHandlerWithTypes_1.EventTargetWithType {
|
|
|
59
62
|
removeInternalDomain(domain) {
|
|
60
63
|
this.appIntegration.removeInternalDomain(domain);
|
|
61
64
|
}
|
|
62
|
-
setAppIcon(
|
|
63
|
-
this.
|
|
65
|
+
setAppIcon(iconName) {
|
|
66
|
+
this.alternateIconsIntegration.setAppIcon(iconName);
|
|
64
67
|
}
|
|
65
68
|
showStatusBar() {
|
|
66
69
|
if (this.appIntegration.showStatusBar === undefined)
|
package/dist/getIntegration.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ declare type Integrations = {
|
|
|
8
8
|
"PushNotificationIntegration": typeof PushNotificationIntegration;
|
|
9
9
|
"ShareIntegration": typeof ShareIntegration;
|
|
10
10
|
"NetworkIntegration": typeof NetworkIntegration;
|
|
11
|
+
"AlternateIconsIntegration": typeof AlternateIconsIntegration;
|
|
12
|
+
"IapIntegration": typeof IapIntegration;
|
|
11
13
|
};
|
|
12
14
|
export declare function getIntegration<T extends keyof Integrations>(integration: T): Integrations[T];
|
|
13
15
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -9,20 +9,19 @@ declare class StartiappClass extends EventTarget {
|
|
|
9
9
|
webAppIsReady(): void;
|
|
10
10
|
setNavigationSpinner(options: NavigationSpinnerOptions): void;
|
|
11
11
|
showNavigationSpinner(options?: NavigationSpinnerOptions): void;
|
|
12
|
-
hideNavigationSpinner(): void;
|
|
12
|
+
hideNavigationSpinner(): void; /** Basic calls to the app. */
|
|
13
13
|
addExternalDomains(domains: ExternalDomain[]): void;
|
|
14
14
|
removeExternalDomains(domains: ExternalDomain[]): void;
|
|
15
15
|
getExternalDomains(): void;
|
|
16
16
|
disableScreenRotation(): void;
|
|
17
17
|
enableScreenRotation(): void;
|
|
18
|
-
/** The NFC scanning functionality. */
|
|
19
18
|
getInternalDomains(): void;
|
|
20
19
|
addInternalDomain(domain: string): void;
|
|
21
20
|
removeInternalDomain(domain: string): void;
|
|
22
21
|
setAppIcon(icon: string): void;
|
|
23
22
|
setSafeAreaBackgroundColor(color: string): void;
|
|
24
23
|
hideStatusBar(): void;
|
|
25
|
-
showStatusBar(): void;
|
|
24
|
+
showStatusBar(): void;
|
|
26
25
|
setStatusBar(options: AppIntegrationSetStatusBarOptions): void;
|
|
27
26
|
setCommonScript(script: string): void;
|
|
28
27
|
requestReview(): void;
|
|
@@ -51,9 +50,11 @@ declare class StartiappClass extends EventTarget {
|
|
|
51
50
|
/** The share functionality. */
|
|
52
51
|
Share: import("./integrations/share").IShare;
|
|
53
52
|
/** The network functionality. */
|
|
54
|
-
Network: import("./network").INetwork;
|
|
53
|
+
Network: import("./integrations/network").INetwork;
|
|
55
54
|
/** Trigger functionality */
|
|
56
55
|
Trigger: import("./integrations/trigger").ITrigger;
|
|
56
|
+
/** The In App Purchases functionality */
|
|
57
|
+
Iap: import("./integrations/iap").IIap;
|
|
57
58
|
/** Call this method to initialize the starti.app API integration. This method should be called AFTER all integrations are ready (see onIntegrationsAreReady). */
|
|
58
59
|
initialize(options?: InitializeParams): void;
|
|
59
60
|
/** Call this method to check if the app is running in the starti.app app. */
|
package/dist/index.js
CHANGED
|
@@ -20,11 +20,12 @@ const pushnotification_1 = require("./integrations/pushnotification");
|
|
|
20
20
|
const qrscanner_1 = require("./integrations/qrscanner");
|
|
21
21
|
const share_1 = require("./integrations/share");
|
|
22
22
|
const trigger_1 = require("./integrations/trigger");
|
|
23
|
+
const network_1 = require("./integrations/network");
|
|
24
|
+
const iap_1 = require("./integrations/iap");
|
|
23
25
|
const SmartBanner_1 = require("./lib/SmartBanner");
|
|
24
26
|
const TaskStepper_1 = require("./lib/TaskStepper");
|
|
25
27
|
const ViewportMetatag_1 = require("./lib/ViewportMetatag");
|
|
26
28
|
const ui_service_1 = require("./services/ui-service");
|
|
27
|
-
const network_1 = require("./network");
|
|
28
29
|
const utils_1 = require("./utils");
|
|
29
30
|
class StartiappClass extends EventTarget {
|
|
30
31
|
constructor() {
|
|
@@ -49,6 +50,8 @@ class StartiappClass extends EventTarget {
|
|
|
49
50
|
this.Network = network_1.Network;
|
|
50
51
|
/** Trigger functionality */
|
|
51
52
|
this.Trigger = trigger_1.Trigger;
|
|
53
|
+
/** The In App Purchases functionality */
|
|
54
|
+
this.Iap = iap_1.Iap;
|
|
52
55
|
}
|
|
53
56
|
get appIntegration() {
|
|
54
57
|
return (0, getIntegration_1.getIntegration)("AppIntegration");
|
|
@@ -99,6 +102,7 @@ else {
|
|
|
99
102
|
untypedWindow.startiappNFC = nfc_1.NFC;
|
|
100
103
|
untypedWindow.startiappShare = share_1.Share;
|
|
101
104
|
untypedWindow.startiappNetwork = network_1.Network;
|
|
105
|
+
untypedWindow.startiappIap = iap_1.Iap;
|
|
102
106
|
untypedWindow.startiappBiometric = biometrics_1.Biometrics;
|
|
103
107
|
untypedWindow.startiappTrigger = trigger_1.Trigger;
|
|
104
108
|
untypedWindow.appErrorEvent = (data) => {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EventTargetMethods } from "../@types/EventHandlerWithTypes";
|
|
2
|
+
export declare const Iap: IIap;
|
|
3
|
+
declare type IapEvents = {};
|
|
4
|
+
export interface IIap extends EventTargetMethods<IapEvents> {
|
|
5
|
+
/** Check if the device supports Iap */
|
|
6
|
+
isSupported(): Promise<boolean>;
|
|
7
|
+
/** Purchase item */
|
|
8
|
+
purchaseProduct(productId: string, purchaseType: IapPurchaseType, autoComplete: boolean): Promise<IapResponse<IapPurchaseProductResponse>>;
|
|
9
|
+
/** Finalize purchase */
|
|
10
|
+
finalizePurchase(transactionIdentifier: string): Promise<IapResponse<IapFinalizePurchaseResponse>>;
|
|
11
|
+
/** Consume purchase */
|
|
12
|
+
consumePurchase(productId: string, transactionIdentifier: string): Promise<IapResponse<IapConsumePurchaseResponse>>;
|
|
13
|
+
/** Get product */
|
|
14
|
+
getProduct(productId: string, purchaseType: IapPurchaseType): Promise<IapResponse<IapGetProductResponse>>;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Iap = void 0;
|
|
4
|
+
const EventHandlerWithTypes_1 = require("../@types/EventHandlerWithTypes");
|
|
5
|
+
const getIntegration_1 = require("../getIntegration");
|
|
6
|
+
class IapClass extends EventHandlerWithTypes_1.EventTargetWithType {
|
|
7
|
+
get IapIntegration() {
|
|
8
|
+
return (0, getIntegration_1.getIntegration)('IapIntegration');
|
|
9
|
+
}
|
|
10
|
+
isSupported() {
|
|
11
|
+
const promise = new Promise((resolve, reject) => {
|
|
12
|
+
this.resolveIsSupported = resolve;
|
|
13
|
+
this.IapIntegration.isSupported();
|
|
14
|
+
});
|
|
15
|
+
return promise;
|
|
16
|
+
}
|
|
17
|
+
purchaseProduct(productId, purchaseType, autoComplete) {
|
|
18
|
+
const promise = new Promise((resolve) => {
|
|
19
|
+
this.resolvePurchaseProduct = resolve;
|
|
20
|
+
this.IapIntegration.purchaseProduct(productId, purchaseType, autoComplete);
|
|
21
|
+
});
|
|
22
|
+
return promise;
|
|
23
|
+
}
|
|
24
|
+
finalizePurchase(transactionIdentifier) {
|
|
25
|
+
const promise = new Promise((resolve) => {
|
|
26
|
+
this.resolveFinalizePurchase = resolve;
|
|
27
|
+
this.IapIntegration.finalizePurchase(transactionIdentifier);
|
|
28
|
+
});
|
|
29
|
+
return promise;
|
|
30
|
+
}
|
|
31
|
+
consumePurchase(productId, transactionIdentifier) {
|
|
32
|
+
const promise = new Promise((resolve) => {
|
|
33
|
+
this.resolveConsumePurchase = resolve;
|
|
34
|
+
this.IapIntegration.consumePurchase(productId, transactionIdentifier);
|
|
35
|
+
});
|
|
36
|
+
return promise;
|
|
37
|
+
}
|
|
38
|
+
getProduct(productId, purchaseType) {
|
|
39
|
+
const promise = new Promise((resolve) => {
|
|
40
|
+
this.resolveGetProduct = resolve;
|
|
41
|
+
this.IapIntegration.getProduct(productId, purchaseType);
|
|
42
|
+
});
|
|
43
|
+
return promise;
|
|
44
|
+
}
|
|
45
|
+
isSupportedResult(result) {
|
|
46
|
+
this.resolveIsSupported(result);
|
|
47
|
+
this.resolveIsSupported = null;
|
|
48
|
+
}
|
|
49
|
+
purchaseProductResult(result) {
|
|
50
|
+
this.resolvePurchaseProduct(result);
|
|
51
|
+
this.resolvePurchaseProduct = null;
|
|
52
|
+
}
|
|
53
|
+
finalizePurchaseResult(result) {
|
|
54
|
+
this.resolveFinalizePurchase(result);
|
|
55
|
+
this.resolveFinalizePurchase = null;
|
|
56
|
+
}
|
|
57
|
+
consumePurchaseResult(result) {
|
|
58
|
+
this.resolveConsumePurchase(result);
|
|
59
|
+
this.resolveConsumePurchase = null;
|
|
60
|
+
}
|
|
61
|
+
getProductResult(result) {
|
|
62
|
+
this.resolveGetProduct(result);
|
|
63
|
+
this.resolveGetProduct = null;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
;
|
|
67
|
+
exports.Iap = new IapClass();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Network = void 0;
|
|
4
|
-
const EventHandlerWithTypes_1 = require("
|
|
5
|
-
const getIntegration_1 = require("
|
|
4
|
+
const EventHandlerWithTypes_1 = require("../@types/EventHandlerWithTypes");
|
|
5
|
+
const getIntegration_1 = require("../getIntegration");
|
|
6
6
|
class NetworkClass extends EventHandlerWithTypes_1.EventTargetWithType {
|
|
7
7
|
get networkIntegration() {
|
|
8
8
|
return (0, getIntegration_1.getIntegration)('NetworkIntegration');
|
package/package.json
CHANGED
package/umd/main.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see main.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(()=>{return e={466:function(e){e.exports=function(){"use strict";var e=Object.prototype.toString,t=Array.isArray||function(t){return"[object Array]"===e.call(t)};function n(e){return"function"==typeof e}function r(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function i(e,t){return null!=e&&"object"==typeof e&&t in e}var s=RegExp.prototype.test;var o=/\S/;function a(e){return!function(e,t){return s.call(e,t)}(o,e)}var c={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};var l=/\s*/,p=/\s+/,d=/\s*=/,u=/\s*\}/,h=/#|\^|\/|>|\{|&|=|!/;function g(e){this.string=e,this.tail=e,this.pos=0}function v(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function m(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}g.prototype.eos=function(){return""===this.tail},g.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},g.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},v.prototype.push=function(e){return new v(e,this)},v.prototype.lookup=function(e){var t,r,s,o=this.cache;if(o.hasOwnProperty(e))t=o[e];else{for(var a,c,l,p=this,d=!1;p;){if(e.indexOf(".")>0)for(a=p.view,c=e.split("."),l=0;null!=a&&l<c.length;)l===c.length-1&&(d=i(a,c[l])||(r=a,s=c[l],null!=r&&"object"!=typeof r&&r.hasOwnProperty&&r.hasOwnProperty(s))),a=a[c[l++]];else a=p.view[e],d=i(p.view,e);if(d){t=a;break}p=p.parent}o[e]=t}return n(t)&&(t=t.call(this.view)),t},m.prototype.clearCache=function(){void 0!==this.templateCache&&this.templateCache.clear()},m.prototype.parse=function(e,n){var i=this.templateCache,s=e+":"+(n||f.tags).join(":"),o=void 0!==i,c=o?i.get(s):void 0;return null==c&&(c=function(e,n){if(!e)return[];var i,s,o,c=!1,v=[],m=[],y=[],w=!1,S=!1,I="",b=0;function C(){if(w&&!S)for(;y.length;)delete m[y.pop()];else y=[];w=!1,S=!1}function P(e){if("string"==typeof e&&(e=e.split(p,2)),!t(e)||2!==e.length)throw new Error("Invalid tags: "+e);i=new RegExp(r(e[0])+"\\s*"),s=new RegExp("\\s*"+r(e[1])),o=new RegExp("\\s*"+r("}"+e[1]))}P(n||f.tags);for(var T,E,A,k,x,N,R=new g(e);!R.eos();){if(T=R.pos,A=R.scanUntil(i))for(var _=0,U=A.length;_<U;++_)a(k=A.charAt(_))?(y.push(m.length),I+=k):(S=!0,c=!0,I+=" "),m.push(["text",k,T,T+1]),T+=1,"\n"===k&&(C(),I="",b=0,c=!1);if(!R.scan(i))break;if(w=!0,E=R.scan(h)||"name",R.scan(l),"="===E?(A=R.scanUntil(d),R.scan(d),R.scanUntil(s)):"{"===E?(A=R.scanUntil(o),R.scan(u),R.scanUntil(s),E="&"):A=R.scanUntil(s),!R.scan(s))throw new Error("Unclosed tag at "+R.pos);if(x=">"==E?[E,A,T,R.pos,I,b,c]:[E,A,T,R.pos],b++,m.push(x),"#"===E||"^"===E)v.push(x);else if("/"===E){if(!(N=v.pop()))throw new Error('Unopened section "'+A+'" at '+T);if(N[1]!==A)throw new Error('Unclosed section "'+N[1]+'" at '+T)}else"name"===E||"{"===E||"&"===E?S=!0:"="===E&&P(A)}if(C(),N=v.pop())throw new Error('Unclosed section "'+N[1]+'" at '+R.pos);return function(e){for(var t,n=[],r=n,i=[],s=0,o=e.length;s<o;++s)switch((t=e[s])[0]){case"#":case"^":r.push(t),i.push(t),r=t[4]=[];break;case"/":i.pop()[5]=t[2],r=i.length>0?i[i.length-1][4]:n;break;default:r.push(t)}return n}(function(e){for(var t,n,r=[],i=0,s=e.length;i<s;++i)(t=e[i])&&("text"===t[0]&&n&&"text"===n[0]?(n[1]+=t[1],n[3]=t[3]):(r.push(t),n=t));return r}(m))}(e,n),o&&i.set(s,c)),c},m.prototype.render=function(e,t,n,r){var i=this.getConfigTags(r),s=this.parse(e,i),o=t instanceof v?t:new v(t,void 0);return this.renderTokens(s,o,n,e,r)},m.prototype.renderTokens=function(e,t,n,r,i){for(var s,o,a,c="",l=0,p=e.length;l<p;++l)a=void 0,"#"===(o=(s=e[l])[0])?a=this.renderSection(s,t,n,r,i):"^"===o?a=this.renderInverted(s,t,n,r,i):">"===o?a=this.renderPartial(s,t,n,i):"&"===o?a=this.unescapedValue(s,t):"name"===o?a=this.escapedValue(s,t,i):"text"===o&&(a=this.rawValue(s)),void 0!==a&&(c+=a);return c},m.prototype.renderSection=function(e,r,i,s,o){var a=this,c="",l=r.lookup(e[1]);if(l){if(t(l))for(var p=0,d=l.length;p<d;++p)c+=this.renderTokens(e[4],r.push(l[p]),i,s,o);else if("object"==typeof l||"string"==typeof l||"number"==typeof l)c+=this.renderTokens(e[4],r.push(l),i,s,o);else if(n(l)){if("string"!=typeof s)throw new Error("Cannot use higher-order sections without the original template");null!=(l=l.call(r.view,s.slice(e[3],e[5]),(function(e){return a.render(e,r,i,o)})))&&(c+=l)}else c+=this.renderTokens(e[4],r,i,s,o);return c}},m.prototype.renderInverted=function(e,n,r,i,s){var o=n.lookup(e[1]);if(!o||t(o)&&0===o.length)return this.renderTokens(e[4],n,r,i,s)},m.prototype.indentPartial=function(e,t,n){for(var r=t.replace(/[^ \t]/g,""),i=e.split("\n"),s=0;s<i.length;s++)i[s].length&&(s>0||!n)&&(i[s]=r+i[s]);return i.join("\n")},m.prototype.renderPartial=function(e,t,r,i){if(r){var s=this.getConfigTags(i),o=n(r)?r(e[1]):r[e[1]];if(null!=o){var a=e[6],c=e[5],l=e[4],p=o;0==c&&l&&(p=this.indentPartial(o,l,a));var d=this.parse(p,s);return this.renderTokens(d,t,r,p,i)}}},m.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(null!=n)return n},m.prototype.escapedValue=function(e,t,n){var r=this.getConfigEscape(n)||f.escape,i=t.lookup(e[1]);if(null!=i)return"number"==typeof i&&r===f.escape?String(i):r(i)},m.prototype.rawValue=function(e){return e[1]},m.prototype.getConfigTags=function(e){return t(e)?e:e&&"object"==typeof e?e.tags:void 0},m.prototype.getConfigEscape=function(e){return e&&"object"==typeof e&&!t(e)?e.escape:void 0};var f={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){y.templateCache=e},get templateCache(){return y.templateCache}},y=new m;return f.clearCache=function(){return y.clearCache()},f.parse=function(e,t){return y.parse(e,t)},f.render=function(e,n,r,i){if("string"!=typeof e)throw new TypeError('Invalid template! Template should be a "string" but "'+((t(s=e)?"array":typeof s)+'" was given as the first argument for mustache#render(template, view, partials)'));var s;return y.render(e,n,r,i)},f.escape=function(e){return String(e).replace(/[&<>"'`=\/]/g,(function(e){return c[e]}))},f.Scanner=g,f.Context=v,f.Writer=m,f}()},715:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventTargetWithType=void 0;class n extends EventTarget{addEventListener(e,t,n){super.addEventListener(e,t,n)}removeEventListener(e,t,n){super.removeEventListener(e,t,n)}}t.EventTargetWithType=n},752:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.App=void 0;const r=n(715),i=n(900);class s extends r.EventTargetWithType{constructor(){super(...arguments),this.startiappIsLoaded=!1}get appIntegration(){return(0,i.getIntegration)("AppIntegration")}setStartiappIsLoaded(){this.startiappIsLoaded=!0}isStartiappLoaded(){return this.startiappIsLoaded}setAppUrl(e){this.appIntegration.setAppUrl(e)}resetAppUrl(){this.appIntegration.resetAppUrl()}openExternalBrowser(e){this.appIntegration.openBrowser(e)}brandId(){return new Promise(((e,t)=>{this.resolveBrandId=e,this.appIntegration.brandId()}))}requestReview(){this.appIntegration.requestReview()}deviceId(){return new Promise(((e,t)=>{this.resolveDeviceId=e,this.appIntegration.deviceId()}))}version(){return new Promise(((e,t)=>{this.resolveVersion=e,this.appIntegration.version()}))}getInternalDomains(){return new Promise(((e,t)=>{this.resolveGetInternalDomains=e,this.appIntegration.getInternalDomains()}))}addInternalDomain(e){this.appIntegration.addInternalDomain(e)}removeInternalDomain(e){this.appIntegration.removeInternalDomain(e)}setAppIcon(e){this.appIntegration.setAppIcon(e)}showStatusBar(){if(void 0===this.appIntegration.showStatusBar)return console.warn("showStatusBar not implemented, please update your app to the latest version");this.appIntegration.showStatusBar()}hideStatusBar(){if(void 0===this.appIntegration.hideStatusBar)return console.warn("hideStatusBar not implemented, please update your app to the latest version");this.appIntegration.hideStatusBar()}setStatusBar(e){if(void 0===this.appIntegration.setStatusBar)return console.warn("setStatusBar not implemented, please update your app to the latest version");this.appIntegration.setStatusBar(e)}setSpinner(e){if(void 0===this.appIntegration.setNavigationSpinner)return console.warn("setNavigationSpinner not implemented, please update your app to the latest version");this.appIntegration.setNavigationSpinner({color:e.color,delay:e.afterMilliseconds,show:e.show,excludedDomains:e.excludedDomains})}hideSpinner(){if(!this.appIntegration.hideNavigationSpinner)return console.warn("hideNavigationSpinner not implemented, please update your app to the latest version");this.appIntegration.hideNavigationSpinner()}showSpinner(e){if(!this.appIntegration.showNavigationSpinner)return console.warn("showNavigationSpinner not implemented, please update your app to the latest version");this.appIntegration.showNavigationSpinner({color:null==e?void 0:e.color,delay:null==e?void 0:e.afterMilliseconds,show:null==e?void 0:e.show,excludedDomains:null==e?void 0:e.excludedDomains})}setCommonScript(e){this.appIntegration.setCommonScript(e)}setSafeAreaBackgroundColor(e){return new Promise(((t,n)=>{this.resolveSetSafeAreaBackgroundColor=t,this.appIntegration.setSafeAreaBackgroundColor(e)}))}disableScreenRotation(){this.appIntegration.disableScreenRotation()}enableScreenRotation(){this.appIntegration.enableScreenRotation()}addExternalDomains(...e){let t=e.map((e=>({pattern:e.source,flags:e.flags})));this.appIntegration.addExternalDomains(t)}removeExternalDomains(...e){let t=e.map((e=>({pattern:e.source,flags:e.flags})));this.appIntegration.removeExternalDomains(t)}getExternalDomains(){return new Promise(((e,t)=>{this.resolveExternalDomains=e,this.appIntegration.getExternalDomains()}))}getExternalDomainsResult(e){this.resolveExternalDomains(e),this.resolveExternalDomains=null}appInForegroundEventRecievedEvent(){this.dispatchEvent(new CustomEvent("appInForeground"))}brandIdResult(e){this.resolveBrandId(e),this.resolveBrandId=null}versionResult(e){this.resolveVersion(e),this.resolveVersion=null}deviceIdResult(e){this.resolveDeviceId(e),this.resolveDeviceId=null}setSafeAreaBackgroundColorResult(e){this.resolveSetSafeAreaBackgroundColor(e),this.resolveSetSafeAreaBackgroundColor=null}navigatingPageEvent(e){this.dispatchEvent(new CustomEvent("navigatingPage",{detail:e}))}getInternalDomainsResult(e){this.resolveGetInternalDomains(e),this.resolveGetInternalDomains=null}addDomainToHistoryExclusion(e){this.appIntegration.addExcludedFromHistoryDomain(e)}removeDomainFromHistoryExclusion(e){this.appIntegration.removeExcludedFromHistoryDomain(e)}addPatternToHistoryExclusion(e){this.appIntegration.addExcludedFromHistoryPattern({pattern:e.source,flags:e.flags})}removePatternFromHistoryExclusion(e){this.appIntegration.removeExcludedFromHistoryPattern({pattern:e.source,flags:e.flags})}}t.App=new s},495:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ClientUser=void 0;const i=n(715),s=n(913),o=n(607);class a extends i.EventTargetWithType{get userId(){return this._userId||localStorage.getItem("startiapp-clientUserId")||null}set userId(e){this._userId=e,localStorage.setItem("startiapp-clientUserId",e)}deleteUser(e){return r(this,void 0,void 0,(function*(){const t=this.userId;if(!t)throw new Error("No user ID");const n=(null==e?void 0:e.prompt)||"Er du sikker på, at du vil slette slette din bruger i appen?",r=(null==e?void 0:e.confirmation)||"Vi har registreret dit ønske og vender tilbage med en bekræftelse.";if(!confirm(n))return;const i={brandId:yield o.default.App.brandId(),userId:t},a=yield fetch(s.baseUrl+"/App-requestAccountDeletion",{body:JSON.stringify(i),headers:{"Content-Type":"application/json"},method:"POST"});if(!a.ok)throw console.warn("Failed to request user deletion",i),new Error(`Failed to request user deletion: Firebase returned statuscode ${a.status}`);alert(r)}))}registerId(e){return r(this,void 0,void 0,(function*(){this.userId=e;const[t,n,r]=yield Promise.all([o.default.App.brandId(),o.default.App.deviceId(),o.default.PushNotification.getToken()]);if(!r||0===r.length)throw console.warn("Failed to register logged in client user",e,"No FCM token"),new Error(`Failed to register logged in client user ${e}: No FCM token`);const i={brandId:t,clientUserId:e,deviceId:n,fcmToken:r},a=yield fetch(s.baseUrl+"/ClientUser-registerId",{body:JSON.stringify(i),headers:{"Content-Type":"application/json"},method:"POST"});if(!a.ok)throw console.warn("Failed to register logged in client user",e,i),new Error(`Failed to register logged in client user ${e}: Firebase returned statuscode ${a.status}`)}))}unregisterId(){return r(this,void 0,void 0,(function*(){this.userId="";const[e,t]=yield Promise.all([o.default.App.brandId(),o.default.App.deviceId()]),n={brandId:e,deviceId:t},r=yield fetch(s.baseUrl+"/ClientUser-unregisterId",{body:JSON.stringify(n),headers:{"Content-Type":"application/json"},method:"POST"});if(!r.ok)throw console.warn("Failed to unregister logged in client user",n),new Error(`Failed to unregister logged in client user: Firebase returned statuscode ${r.status}`)}))}}t.ClientUser=new a},913:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.googleStorageBucket=t.styleTagId=t.baseUrl=void 0,t.baseUrl="https://europe-west3-startiapp-admin-1fac2.cloudfunctions.net",t.styleTagId="startiapp-styling",t.googleStorageBucket="startiapp-admin-1fac2.appspot.com"},900:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIntegration=void 0;let n={};t.getIntegration=function(e){if(n[e])return n[e];let t=window[e],r=0;for(;!t&&r<5;)t=window.parent[e],r++;if(!t)throw new Error(`Could not find integration ${e}`);return n[e]=t,t}},607:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(752),s=n(495),o=n(900),a=n(154),c=n(807),l=n(725),p=n(720),d=n(133),u=n(415),h=n(803),g=n(491),v=n(666),m=n(236),f=n(240),y=n(716),w=n(984),S=n(593);class I extends EventTarget{constructor(){super(...arguments),this.App=i.App,this.Device=l.Device,this.Biometrics=c.Biometrics,this.User=s.ClientUser,this.NfcScanner=p.NFC,this.PushNotification=d.PushNotification,this.QrScanner=u.QrScanner,this.Share=h.Share,this.Network=w.Network,this.Trigger=g.Trigger}get appIntegration(){return(0,o.getIntegration)("AppIntegration")}initialize(e){this.isRunningInApp()&&("function"==typeof gtag&>ag("set","user_properties",{startiapp:"true"}),y.AppUI.setOptions(e),this.appIntegration.webAppIsReady())}isRunningInApp(){return(0,S.isRunningInApp)()}addEventListener(e,t,n){if("ready"==e&&i.App.isStartiappLoaded()){const e=new CustomEvent("ready");"handleEvent"in t?t.handleEvent(e):t(e)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){super.removeEventListener(e,t,n)}}let b=new I,C={};if("undefined"==typeof window)console.error("starti.app is only available client-side");else{if(C=window,C.appIntegrationsAreReady=()=>{i.App.setStartiappIsLoaded(),b.dispatchEvent(new CustomEvent("ready"))},C.startiappDevice=l.Device,C.startiappApp=i.App,C.startiappUser=s.ClientUser,C.startiappQrScanner=u.QrScanner,C.startiappPushNotification=d.PushNotification,C.startiappNFC=p.NFC,C.startiappShare=h.Share,C.startiappNetwork=w.Network,C.startiappBiometric=c.Biometrics,C.startiappTrigger=g.Trigger,C.appErrorEvent=e=>{b.dispatchEvent(new CustomEvent("error",{detail:e}))},document.body)P();else{const E=new MutationObserver((()=>P(E)));E.observe(document.documentElement,{childList:!0})}function P(e){if(!document.body)return;if((new v.SmartBanner).initialize(),b.isRunningInApp()?document.body.setAttribute("startiapp",""):document.body.removeAttribute("startiapp"),!document.head)return;const t=document.createElement("style");if(t.innerHTML="body:not([startiapp]) .startiapp-hide-in-browser,body:not([startiapp]) .startiapp-show-in-app,body[startiapp] .startiapp-hide-in-app,body[startiapp] .startiapp-show-in-browser{display:none!important}",document.head.appendChild(t),b.isRunningInApp()){const e={width:"device-width","viewport-fit":"cover"},t=document.querySelector("meta[name=viewport]");if(t){const n=(0,f.parseViewportMeta)(t.content);t.content=(0,f.serializeViewportMeta)(Object.assign(Object.assign({},n),e))}else{const t=document.createElement("meta");t.name="viewport",t.content=(0,f.serializeViewportMeta)(e),document.head.appendChild(t)}}e&&e.disconnect()}C.startiapp=b;const T=new m.TaskStepper;T.addTask(a.checkIfAppVersionIsClosed),b.addEventListener("ready",(()=>r(void 0,void 0,void 0,(function*(){yield T.start()}))))}t.default=b},154:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.checkIfAppVersionIsClosed=void 0;const i=n(752),s=n(900),o=new(n(718).ClosedVersionChecker);function a(){return r(this,void 0,void 0,(function*(){const e=yield o.getAvailableVersionsDocument();/iPad|iPhone|iPod/.test(navigator.userAgent)?window.location.href="https://apps.apple.com/lt/app/"+e.iosStoreId:i.App.openExternalBrowser("https://play.google.com/store/apps/details?id="+e.androidStoreId)}))}t.checkIfAppVersionIsClosed=function(e){return r(this,void 0,void 0,(function*(){if(!(yield o.isCurrentVersionClosed()))return e();yield function(){return r(this,void 0,void 0,(function*(){const e=yield function(){return r(this,void 0,void 0,(function*(){const e=document.createElement("div");e.style.height="100vh",e.style.maxWidth="100vw",e.style.paddingInline="10px",e.style.display="flex",e.style.justifyContent="center",e.style.alignItems="center",e.style.flexDirection="column";const t=document.createElement("h1");t.style.fontSize="18px",t.style.fontFamily="sans-serif",t.style.textAlign="center",t.textContent="Der er kommet en opgradering til appen, som er nødvendig for at fortsætte.";const n=document.createElement("button");return n.style.marginTop="15px",n.style.fontSize="18px",n.style.fontFamily="sans-serif",n.style.textAlign="center",n.style.padding="15px 30px",n.style.borderRadius="100vh",n.style.background="#444",n.style.color="white",n.style.border="none",n.textContent="Opgrader appen",n.onclick=a,e.appendChild(t),e.appendChild(n),e}))}();document.body.innerHTML="",document.body.appendChild(e),(0,s.getIntegration)("AppIntegration").webAppIsReady()}))}()}))}},807:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Biometrics=void 0;const r=n(715),i=n(900);class s extends r.EventTargetWithType{constructor(){super(...arguments),this.SECURED_CONTENT_KEY="STARTI_APP_BIOMETRIC_CONTENT",this.SECURED_LOGIN_KEY="STARTI_APP_BIOMETRIC_LOGIN_CONTENT",this.defaultScanTitle="Prove you have fingers!",this.defaultScanReason="Can't let you in if you don't."}get biometricIntegration(){return(0,i.getIntegration)("BiometricIntegration")}scan(e=this.defaultScanTitle,t=this.defaultScanReason){return new Promise(((n,r)=>{this.resolveScan=n,this.biometricIntegration.startScanning(e,t)}))}getAuthenticationType(){return new Promise(((e,t)=>{this.resolveAuthType=e,this.biometricIntegration.getAuthenticationType()}))}setSecuredContent(e){this.biometricIntegration.setSecuredContent(this.SECURED_CONTENT_KEY,JSON.stringify(e))}getSecuredContent(e=this.defaultScanTitle,t=this.defaultScanReason){return new Promise(((n,r)=>{this.resolveGetContent=n,this.biometricIntegration.getSecuredContent(this.SECURED_CONTENT_KEY,e,t)}))}hasSecuredContent(){return new Promise(((e,t)=>{this.resolveHasSecureContent=e,this.biometricIntegration.hasSecuredContent(this.SECURED_CONTENT_KEY)}))}removeSecuredContent(){this.biometricIntegration.removeSecuredContent(this.SECURED_CONTENT_KEY)}setUsernameAndPassword(e,t){this.biometricIntegration.setSecuredContent(this.SECURED_LOGIN_KEY,JSON.stringify({username:e,password:t}))}removeUsernameAndPassword(){this.biometricIntegration.removeSecuredContent(this.SECURED_LOGIN_KEY)}hasUsernameAndPassword(){return new Promise(((e,t)=>{this.resolveHasUsernameAndPassword=e,this.biometricIntegration.hasSecuredContent(this.SECURED_LOGIN_KEY)}))}getUsernameAndPassword(e=this.defaultScanTitle,t=this.defaultScanReason){return new Promise(((n,r)=>{this.resolveGetUsernamePassword=n,this.biometricIntegration.getSecuredContent(this.SECURED_LOGIN_KEY,e,t)}))}handleResolveGetUsernamePassword(e){try{const t=JSON.parse(e.result);this.resolveGetUsernamePassword(t)}catch(e){this.resolveGetUsernamePassword(null)}this.resolveGetUsernamePassword=null}hasSecuredContentResult({result:e,key:t}){if(t===this.SECURED_LOGIN_KEY)return this.resolveHasUsernameAndPassword(e),void(this.resolveHasUsernameAndPassword=null);this.resolveHasSecureContent(e),this.resolveHasSecureContent=null}getAuthenticationTypeResult(e){this.resolveAuthType(e),this.resolveAuthType=null}startScanningResult(e){this.resolveScan(e),this.resolveScan=null}getSecuredContentResult(e){if(e.key!==this.SECURED_LOGIN_KEY){try{const t=JSON.parse(e.result);this.resolveGetContent(t)}catch(t){this.resolveGetContent(e.result)}this.resolveGetContent=null}else this.handleResolveGetUsernamePassword(e)}}t.Biometrics=new s},725:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Device=void 0;const r=n(715),i=n(900);class s extends r.EventTargetWithType{get deviceIntegration(){return(0,i.getIntegration)("DeviceIntegration")}startAccelerometer(){this.deviceIntegration.startAccelerometer()}stopAccelerometer(){this.deviceIntegration.stopAccelerometer()}isAccelerometerStarted(){return new Promise(((e,t)=>{this.deviceIntegration.isAccelerometerStarted(),this.resolveIsAccelerometerStarted=e}))}isAccelerometerStartedResult(e){this.resolveIsAccelerometerStarted(e),this.resolveIsAccelerometerStarted=null}onShakeEvent(){this.dispatchEvent(new CustomEvent("shake"))}}t.Device=new s},720:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NFC=void 0;const r=n(715),i=n(900);class s extends r.EventTargetWithType{get NFCIntegration(){return(0,i.getIntegration)("NFCIntegration")}isNfcSupported(){return new Promise(((e,t)=>{this.resolveNFCSupported=e,this.NFCIntegration.isNFCSupported()}))}startNfcScanner(){return new Promise((e=>{this.resolveStartNFCReader=e,this.NFCIntegration.startListening()}))}stopNfcScanner(){return new Promise((e=>{this.resolveStopNFCReader=e,this.NFCIntegration.stopListening()}))}nfcTagScannedEvent(e){const t=new CustomEvent("nfcTagScanned",{detail:e});this.dispatchEvent(t)}stopListeningResult(e){this.resolveStopNFCReader(e),this.resolveStopNFCReader=null}isNFCSupportedResult(e){this.resolveNFCSupported(e),this.resolveNFCSupported=null}startListeningResult(e){this.resolveStartNFCReader(e),this.resolveStartNFCReader=null}}t.NFC=new s},133:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PushNotification=t.Topic=void 0;const i=n(466),s=n(715),o=n(913),a=n(900),c=n(607);class l extends s.EventTargetWithType{get pushNotificationIntegration(){return(0,a.getIntegration)("PushNotificationIntegration")}requestAccess(){return r(this,void 0,void 0,(function*(){return new Promise(((e,t)=>{this.resolveRequestAccess=e,this.pushNotificationIntegration.requestAccess()}))}))}getToken(){return new Promise(((e,t)=>{this.resolveFCMToken=e,this.pushNotificationIntegration.getFCMToken()}))}getTopics(){return r(this,void 0,void 0,(function*(){const e={brand:yield c.default.App.brandId()},t=yield fetch(o.baseUrl+"/Topics-getTopics",{body:JSON.stringify(e),method:"POST",headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error("Failed to get topics");const n=yield t.json(),r=this.getSubscribedTopics();return n.map((({name:e,topic:t})=>new p(t,e,r.includes(t))))}))}renderTopics(){return r(this,void 0,void 0,(function*(){const e=yield this.getTopics(),t=document.getElementById("startiapp-topics-template");if(!t||"SCRIPT"!==t.tagName)throw new Error("Template element not found");if("x-tmpl-mustache"!==t.type)throw new Error('Template element must have type="x-tmpl-mustache"');const n=document.getElementById("startiapp-topics-target");if(!n||"DIV"!==n.tagName)throw new Error("Template target element not found");const s=t.innerHTML,o=(0,i.render)(s,{topics:e});n.innerHTML=o,n.querySelectorAll('input[type="checkbox"]').forEach((e=>{e.dataset.startiappTopic&&e.addEventListener("change",(t=>r(this,void 0,void 0,(function*(){if(!(yield this.requestAccess()))return t.target.checked=!1,void t.preventDefault();e.checked?this.subscribeToTopics([e.dataset.startiappTopic]):this.unsubscribeFromTopics([e.dataset.startiappTopic])}))))}))}))}subscribeToTopics(e){return r(this,void 0,void 0,(function*(){if(!(yield c.default.PushNotification.requestAccess()))throw console.warn("Push notification permissions denied"),new Error("Push notification permissions denied");const[t,n,r]=yield Promise.all([c.default.PushNotification.getToken(),c.default.App.brandId(),c.default.App.deviceId()]),i=[];e.forEach((e=>{const s={brandId:n,topic:e,fcmToken:t,deviceId:r},a=fetch(o.baseUrl+"/Topics-subscribeToTopic",{body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json"}});i.push(a)})),(yield Promise.all(i)).forEach(((t,n)=>{t.ok?this.updateSubscribedTopics(e[n],!0):console.warn("Failed to sign up to topic",n,e[n])}))}))}unsubscribeFromTopics(e){return r(this,void 0,void 0,(function*(){const[t,n,r]=yield Promise.all([c.default.PushNotification.getToken(),c.default.App.brandId(),c.default.App.deviceId()]),i=[];e.forEach((e=>{const s={brandId:n,topic:e,fcmToken:t,deviceId:r},a=fetch(o.baseUrl+"/Topics-unsubscribeFromTopic",{body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json"}});i.push(a)})),(yield Promise.all(i)).forEach(((t,n)=>{t.ok?this.updateSubscribedTopics(e[n],!1):console.warn("Failed to unsubscribe from topic",n,e[n])}))}))}requestAccessResult(e){this.resolveRequestAccess(e),this.resolveRequestAccess=null}getFCMTokenResult(e){this.resolveFCMToken(e),this.resolveFCMToken=null}tokenReceivedEvent(e){this.dispatchEvent(new CustomEvent("tokenRefreshed",{detail:e}))}notificationReceivedEvent(e){this.dispatchEvent(new CustomEvent("notificationReceived",{detail:e}))}firebasePushNotificationTopicsUnsubscribeResult(e){}firebasePushNotificationSubscribeToTopicsResult(e){}updateSubscribedTopics(e,t){const n=localStorage.getItem("startiapp-subscribed-topics")?JSON.parse(localStorage.getItem("startiapp-subscribed-topics")):[];t?n.includes(e)||n.push(e):n.includes(e)&&n.splice(n.indexOf(e),1),localStorage.setItem("startiapp-subscribed-topics",JSON.stringify(n))}getSubscribedTopics(){return localStorage.getItem("startiapp-subscribed-topics")?JSON.parse(localStorage.getItem("startiapp-subscribed-topics")):[]}}class p{constructor(e,t,n=!1){this.topic=e,this.name=t,this.subscribed=n}toJSON(){return{topic:this.topic,name:this.name,subscribed:this.subscribed}}subscribe(){t.PushNotification.subscribeToTopics([this.topic])}unsubscribe(){t.PushNotification.unsubscribeFromTopics([this.topic])}}t.Topic=p,t.PushNotification=new l},415:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QrScanner=void 0;const r=n(715),i=n(900);class s extends r.EventTargetWithType{get qrScannerIntegration(){return(0,i.getIntegration)("QrScannerIntegration")}scan(){return new Promise(((e,t)=>{this.resolveScan=e,this.qrScannerIntegration.startQrCodeScanner()}))}isCameraAccessGranted(){return new Promise(((e,t)=>{this.resolveCameraAccessGranted=e,this.qrScannerIntegration.isCameraAccessGranted()}))}requestCameraAccess(){return new Promise(((e,t)=>{this.resolveRequestCameraAccess=e,this.qrScannerIntegration.requestCameraAccess()}))}requestCameraAccessResult(e){this.resolveRequestCameraAccess(e),this.resolveRequestCameraAccess=null}startQrCodeScannerResult(e){this.resolveScan(e),this.resolveScan=null}isCameraAccessGrantedResult(e){this.resolveCameraAccessGranted(e),this.resolveCameraAccessGranted=null}}t.QrScanner=new s},803:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Share=void 0;const r=n(715),i=n(900);class s extends r.EventTargetWithType{get shareIntegration(){return(0,i.getIntegration)("ShareIntegration")}shareFile(e,t){return new Promise(((n,r)=>{this.resolveShareFile=n,this.shareIntegration.shareFile(e,t)}))}shareText(e){return new Promise(((t,n)=>{this.resolveShareText=t,this.shareIntegration.shareText(e)}))}downloadFile(e,t){return new Promise(((n,r)=>{this.resolveDownloadText=n,this.shareIntegration.downloadFile(e,t)}))}shareFileResult(e){this.resolveShareFile(e),this.resolveShareFile=null}shareTextResult(e){this.resolveShareText(e),this.resolveShareText=null}downloadFileResult(e){this.resolveDownloadText(e),this.resolveDownloadText=null}}t.Share=new s},491:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Trigger=void 0;const i=n(607),s=n(715),o=n(913);class a extends s.EventTargetWithType{trackEvent(e,t){return r(this,void 0,void 0,(function*(){const n=yield i.default.App.brandId(),r=yield i.default.App.deviceId(),s={brandId:n,event:{id:e,customProperties:t},identifierType:"installationId",identifier:r};try{yield fetch(o.baseUrl+"/Trigger-trackEvent",{body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json"}})}catch(e){}}))}trackUserProperty(e,t){return r(this,void 0,void 0,(function*(){const n={[e]:t},r={brandId:yield i.default.App.brandId(),customFields:n,identifierType:"installationId",identifier:yield i.default.App.deviceId()};try{yield fetch(o.baseUrl+"/Trigger-trackUserProperty",{body:JSON.stringify(r),method:"POST",headers:{"Content-Type":"application/json"}})}catch(e){}}))}}t.Trigger=new a},718:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ClosedVersionChecker=void 0;const i=n(752),s=n(913),o=n(703);t.ClosedVersionChecker=class{constructor(){this.documentData=null}getAvailableVersionsUrl(){return r(this,void 0,void 0,(function*(){const e=yield i.App.brandId();return`https://storage.googleapis.com/${s.googleStorageBucket}/availableVersions/${encodeURIComponent(e)}.json`}))}getAvailableVersionsDocument(){return r(this,void 0,void 0,(function*(){if(null!=this.documentData)return this.documentData;const e=yield this.getAvailableVersionsUrl(),t=yield fetch(e),n=yield t.json();return this.documentData=n,n}))}getCurrentVersionSemver(){return r(this,void 0,void 0,(function*(){const e=yield i.App.version();return new o.SemVer(e)}))}getLatestVersionSemvar(e){return e.reduce(((e,t)=>t.isGreaterThan(e)?t:e),new o.SemVer("0.0.0"))}isCurrentVersionClosed(){return r(this,void 0,void 0,(function*(){const e=yield this.getCurrentVersionSemver(),t=yield this.getAvailableVersionsDocument();if(t.versions.includes(e.toString()))return!1;const n=t.versions.map((e=>new o.SemVer(e))),r=this.getLatestVersionSemvar(n);return!e.isGreaterThanOrEqualTo(r)}))}}},703:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemVer=void 0,t.SemVer=class{constructor(e){if(this.version=e,!this.isValidVersion(e))throw new Error(`Invalid version: ${e}`);const t=e.split(".");this.major=parseInt(t[0]),this.minor=parseInt(t[1]),this.patch=parseInt(t[2])}isValidVersion(e){const t=e.split(".");return!(t.length<3||isNaN(parseInt(t[0]))||isNaN(parseInt(t[1]))||isNaN(parseInt(t[2])))}isGreaterThan(e){return this.major>e.major||!(this.major<e.major)&&(this.minor>e.minor||!(this.minor<e.minor)&&(this.patch>e.patch||(this.patch,e.patch,!1)))}isGreaterThanOrEqualTo(e){return this.isGreaterThan(e)||this.isEqualTo(e)}isEqualTo(e){return this.major===e.major&&this.minor===e.minor&&this.patch===e.patch}toString(){return this.version}}},666:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SmartBanner=void 0;const i=n(913),s=n(593);t.SmartBanner=class{constructor(){this.marginTop="72px"}getHostDomain(){const e=window.location.host.split(".");return e.slice(e.length-2).join(".")}getSmartBannerDataUrl(){const e=this.getHostDomain();return`https://storage.googleapis.com/${i.googleStorageBucket}/smartbanner/${encodeURIComponent(e)}.json`}getSmartBannerData(){return r(this,void 0,void 0,(function*(){try{const e=yield fetch(this.getSmartBannerDataUrl());return yield e.json()}catch(e){return e instanceof SyntaxError||console.error("SmartBanner error",e),{enabled:!1,appName:"",appIcon:"",appleAppId:"",googlePlayAppId:"",backgroundColor:void 0,textColor:void 0}}}))}getSmartBannerClosed(){const e=localStorage.getItem("startiapp-smart-banner-closed-at");return!!(e&&Date.now()-parseInt(e)<6048e5)}setSmartBannerClosed(e=!1){localStorage.setItem("startiapp-smart-banner-closed-at",e?Date.now()+2592e6+"":Date.now().toString())}initialize(){var e,t;return r(this,void 0,void 0,(function*(){if((0,s.isRunningInApp)())return;const n=(()=>{const e=navigator.userAgent;return/android/i.test(e)?"Android":/iPad|iPhone|iPod/.test(e)?"iOS":"Other"})();if("Other"===n)return;const r=document.querySelector("html");if(!r)return;if(this.getSmartBannerClosed())return;const i=yield this.getSmartBannerData();if(!i.enabled)return;const o=null!==(e=i.backgroundColor)&&void 0!==e?e:"#f2f1f6",a=null!==(t=i.textColor)&&void 0!==t?t:"#000";r.style.setProperty("margin-top",this.marginTop,"important");const c=document.createElement("div");switch(c.id="startiapp-smart-banner-wrapper",c.style.setProperty("position","fixed","important"),c.style.setProperty("top","0","important"),c.style.setProperty("left","0","important"),c.style.setProperty("right","0","important"),c.style.setProperty("height",this.marginTop,"important"),c.style.setProperty("width","100%","important"),c.style.setProperty("background-color",o,"important"),c.style.setProperty("z-index","999999999","important"),c.style.setProperty("color",a,"important"),c.style.setProperty("stroke",a,"important"),n){case"iOS":yield this.createIosBannerContent(i,c);break;case"Android":yield this.createAndroidBannerContent(i,c);break;default:return void console.warn("Unknown platform",n)}document.body.appendChild(c)}))}createIosBannerContent(e,t){return r(this,void 0,void 0,(function*(){this.createContent(e,`https://apps.apple.com/us/app/id${e.appleAppId}`,"App Store",t)}))}createAndroidBannerContent(e,t){return r(this,void 0,void 0,(function*(){this.createContent(e,`market://details?id=${e.googlePlayAppId}`,"Play Store",t)}))}createContent(e,t,n,i){var s,o;return r(this,void 0,void 0,(function*(){0===(null===(s=e.appDetails)||void 0===s?void 0:s.length)&&(e.appDetails=void 0);const r=document.createElement("div");r.style.setProperty("display","grid","important"),r.id="startiapp-smart-banner-grid",r.style.setProperty("grid-template-columns","30px auto auto","important"),r.style.setProperty("height","100%","important"),r.style.setProperty("width","100%","important"),r.style.setProperty("font-family","sans-serif","important");const a=document.createElement("div");a.id="startiapp-smart-banner-close-button",a.style.setProperty("grid-column","1"),a.style.setProperty("grid-row","1"),a.style.setProperty("height","100%"),a.style.setProperty("width","100%"),a.style.setProperty("display","flex"),a.style.setProperty("justify-content","center"),a.style.setProperty("align-items","center"),a.onclick=()=>{var e,t;i.remove(),null===(e=document.querySelector("html"))||void 0===e||e.style.setProperty("transition","margin-top 0.3s ease-in-out"),null===(t=document.querySelector("html"))||void 0===t||t.style.removeProperty("margin-top"),this.setSmartBannerClosed()};const c=document.createElementNS("http://www.w3.org/2000/svg","svg");c.setAttribute("id","close-smart-banner"),c.setAttribute("style","height: 16px; width: 16px;"),c.setAttribute("viewBox","0 0 24 24"),c.setAttribute("fill","none"),c.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.style.setProperty("stroke","inherit"),c.innerHTML='\n\t\t\t<path d="M18 6L6 18" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n\t\t\t<path d="M6 6L18 18" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n\t\t',a.appendChild(c);const l=document.createElement("div");l.id="startiapp-smart-banner-image",l.style.setProperty("grid-column","2"),l.style.setProperty("grid-row","1"),l.style.setProperty("height","100%"),l.style.setProperty("width","100%"),l.style.setProperty("display","flex"),l.style.setProperty("justify-content","start"),l.style.setProperty("align-items","center");const p=document.createElement("img");p.id="startiapp-smart-banner-app-icon",p.src=e.appIcon,p.style.setProperty("height","54px"),p.style.setProperty("width","54px"),p.style.setProperty("object-fit","scale-down");const d=document.createElement("div");d.id="startiapp-smart-banner-app-name-container",d.style.setProperty("display","flex"),d.style.setProperty("flex-direction","column");const u=document.createElement("span");u.id="startiapp-smart-banner-app-name",u.style.setProperty("margin-left","8px"),u.style.setProperty("font-size","16px"),u.style.setProperty("font-weight","500"),u.textContent=e.appName;const h=document.createElement("span");h.id="startiapp-smart-banner-app-details",h.style.setProperty("margin-left","8px"),h.style.setProperty("font-size","16px"),h.style.setProperty("font-weight","500"),h.textContent=null!==(o=e.appDetails)&&void 0!==o?o:`GET — on the ${n}`,d.appendChild(u),d.appendChild(h),l.appendChild(p),l.appendChild(d);const g=document.createElement("div");g.style.setProperty("grid-column","3"),g.style.setProperty("grid-row","1"),g.style.setProperty("height","100%"),g.style.setProperty("width","100%"),g.style.setProperty("display","flex"),g.style.setProperty("justify-content","center"),g.style.setProperty("align-items","center");const v=document.createElement("a");v.href=t,v.target="_blank",v.textContent="Vis",v.style.setProperty("text-decoration","none"),v.style.setProperty("color","inherit"),v.style.setProperty("font-size","16px"),v.style.setProperty("font-weight","500"),g.appendChild(v),r.appendChild(a),r.appendChild(l),r.appendChild(g),i.appendChild(r)}))}}},236:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TaskStepper=void 0,t.TaskStepper=class{constructor(){this.tasks=[]}addTask(e){this.tasks.push(e)}start(){return n(this,void 0,void 0,(function*(){yield this.runTasks(this.tasks)}))}runTasks(e){return n(this,void 0,void 0,(function*(){if(0===e.length)return;const t=e.shift();if(null!=t)try{yield t((()=>this.runTasks(e)))}catch(t){this.runTasks(e)}}))}}},240:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeViewportMeta=t.parseViewportMeta=void 0,t.parseViewportMeta=function(e){const t={},n=e.split(",");for(const e of n){const[n,r]=e.trim().split("=");switch(n.trim()){case"width":case"height":case"initial-scale":case"minimum-scale":case"maximum-scale":case"user-scalable":case"viewport-fit":t[n.trim()]=r.trim()}}return t},t.serializeViewportMeta=function(e){const t=[];for(const[n,r]of Object.entries(e))r&&t.push(`${n}=${r}`);return t.join(", ")}},984:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Network=void 0;const r=n(715),i=n(900);class s extends r.EventTargetWithType{get networkIntegration(){return(0,i.getIntegration)("NetworkIntegration")}sendUdpBroadcast(e,t){return new Promise(((n,r)=>{this.resolveSendUdpBroadcast=n,this.networkIntegration.sendUdpBroadcast(e.toString(),t)}))}currentConnectionState(){return new Promise(((e,t)=>{this.resolveCurrentConnectionState=e,this.networkIntegration.currentConnectionState()}))}startListeningForUdpPackets(e){return new Promise(((t,n)=>{this.resolveStartListeningForUdpPackets=t,this.networkIntegration.startListeningForUdpPackets(e.toString())}))}stopListeningForUdpPackets(){return new Promise(((e,t)=>{this.resolveStopListeningForUdpPackets=e,this.networkIntegration.stopListeningForUdpPackets()}))}startListeningForConnectionChanges(){return new Promise(((e,t)=>{this.resolveStartListeningForConnectionChanges=e,this.networkIntegration.startListeningForConnectionChanges()}))}stopListeningForConnectionChanges(){return new Promise(((e,t)=>{this.resolveStopListeningForConnectionChanges=e,this.networkIntegration.stopListeningForConnectionChanges()}))}sendUdpBroadcastResult(e){this.resolveSendUdpBroadcast(e),this.resolveSendUdpBroadcast=null}currentConnectionStateResult(e){this.resolveCurrentConnectionState(e),this.resolveCurrentConnectionState=null}startListeningForUdpPacketsResult(e){this.resolveStartListeningForUdpPackets(e),this.resolveStartListeningForUdpPackets=null}stopListeningForUdpPacketsResult(e){this.resolveStopListeningForUdpPackets(e),this.resolveStopListeningForUdpPackets=null}startListeningForConnectionChangesResult(e){this.resolveStartListeningForConnectionChanges(e),this.resolveStartListeningForConnectionChanges=null}stopListeningForConnectionChangesResult(e){this.resolveStopListeningForConnectionChanges(e),this.resolveStopListeningForConnectionChanges=null}udpPacketReceivedEvent(e){const t=new CustomEvent("udpPacketReceived",{detail:e});this.dispatchEvent(t)}connectionStateChangedEvent(e){const t=new CustomEvent("connectionStateChanged",{detail:e});this.dispatchEvent(t)}}t.Network=new s},716:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppUI=void 0;const r=n(607),i=n(913),s=n(240);t.AppUI=new class{constructor(){this.options={allowDrag:!1,allowHighligt:!1,allowZoom:!1,allowScrollBounce:!1,allowRotation:!1,spinner:{show:!1},statusBar:{removeSafeArea:!0,hideText:!1,safeAreaBackgroundColor:"#000000",darkContent:!1}}}setOptions(e){this.options=Object.assign(Object.assign({},this.options),e),this.updateUI()}getOptions(){return this.options}updateViewportMeta(e){const t=document.querySelector("meta[name=viewport]");if(t){const n=(0,s.parseViewportMeta)(t.content);t.content=(0,s.serializeViewportMeta)(Object.assign(Object.assign({},n),e))}else{const t=document.createElement("meta");t.setAttribute("name","viewport"),t.setAttribute("content",(0,s.serializeViewportMeta)(e)),document.head.appendChild(t)}}updateUI(){this.styleString="";const e=document.getElementById(i.styleTagId);e&&e.remove();const t=Array.from(document.getElementsByTagName("img")),n=Array.from(document.getElementsByTagName("a"));this.options.allowDrag?[...t,...n].forEach((e=>{e.removeAttribute("draggable")})):[...t,...n].forEach((e=>{e.setAttribute("draggable","false")})),this.options.allowHighligt||(this.styleString+="\n body {\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -o-user-select: none;\n user-select: none;\n }\n "),this.options.allowScrollBounce||(this.styleString+="\n html {\n overscroll-behavior: none;\n }\n "),this.options.allowZoom||(this.styleString+="\n body {\n touch-action: pan-x pan-y;\n }\n ",this.updateViewportMeta({"user-scalable":"no"}));const s=document.createElement("style");s.textContent=this.styleString,s.setAttribute("id",i.styleTagId),document.body.appendChild(s),r.default.App.setStatusBar(this.options.statusBar),r.default.App.setSpinner(this.options.spinner),this.options.allowRotation?r.default.App.enableScreenRotation():r.default.App.disableScreenRotation()}}},593:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isRunningInApp=void 0,t.isRunningInApp=function(){return navigator.userAgent.toLowerCase().indexOf("starti.app")>-1}}},t={},function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}(607);var e,t}));
|
|
2
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(()=>{return e={466:function(e){e.exports=function(){"use strict";var e=Object.prototype.toString,t=Array.isArray||function(t){return"[object Array]"===e.call(t)};function n(e){return"function"==typeof e}function r(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function i(e,t){return null!=e&&"object"==typeof e&&t in e}var s=RegExp.prototype.test;var o=/\S/;function a(e){return!function(e,t){return s.call(e,t)}(o,e)}var c={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};var l=/\s*/,p=/\s+/,d=/\s*=/,u=/\s*\}/,h=/#|\^|\/|>|\{|&|=|!/;function g(e){this.string=e,this.tail=e,this.pos=0}function v(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function m(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}g.prototype.eos=function(){return""===this.tail},g.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},g.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},v.prototype.push=function(e){return new v(e,this)},v.prototype.lookup=function(e){var t,r,s,o=this.cache;if(o.hasOwnProperty(e))t=o[e];else{for(var a,c,l,p=this,d=!1;p;){if(e.indexOf(".")>0)for(a=p.view,c=e.split("."),l=0;null!=a&&l<c.length;)l===c.length-1&&(d=i(a,c[l])||(r=a,s=c[l],null!=r&&"object"!=typeof r&&r.hasOwnProperty&&r.hasOwnProperty(s))),a=a[c[l++]];else a=p.view[e],d=i(p.view,e);if(d){t=a;break}p=p.parent}o[e]=t}return n(t)&&(t=t.call(this.view)),t},m.prototype.clearCache=function(){void 0!==this.templateCache&&this.templateCache.clear()},m.prototype.parse=function(e,n){var i=this.templateCache,s=e+":"+(n||f.tags).join(":"),o=void 0!==i,c=o?i.get(s):void 0;return null==c&&(c=function(e,n){if(!e)return[];var i,s,o,c=!1,v=[],m=[],y=[],w=!1,I=!1,S="",b=0;function C(){if(w&&!I)for(;y.length;)delete m[y.pop()];else y=[];w=!1,I=!1}function P(e){if("string"==typeof e&&(e=e.split(p,2)),!t(e)||2!==e.length)throw new Error("Invalid tags: "+e);i=new RegExp(r(e[0])+"\\s*"),s=new RegExp("\\s*"+r(e[1])),o=new RegExp("\\s*"+r("}"+e[1]))}P(n||f.tags);for(var T,E,A,x,k,N,R=new g(e);!R.eos();){if(T=R.pos,A=R.scanUntil(i))for(var _=0,U=A.length;_<U;++_)a(x=A.charAt(_))?(y.push(m.length),S+=x):(I=!0,c=!0,S+=" "),m.push(["text",x,T,T+1]),T+=1,"\n"===x&&(C(),S="",b=0,c=!1);if(!R.scan(i))break;if(w=!0,E=R.scan(h)||"name",R.scan(l),"="===E?(A=R.scanUntil(d),R.scan(d),R.scanUntil(s)):"{"===E?(A=R.scanUntil(o),R.scan(u),R.scanUntil(s),E="&"):A=R.scanUntil(s),!R.scan(s))throw new Error("Unclosed tag at "+R.pos);if(k=">"==E?[E,A,T,R.pos,S,b,c]:[E,A,T,R.pos],b++,m.push(k),"#"===E||"^"===E)v.push(k);else if("/"===E){if(!(N=v.pop()))throw new Error('Unopened section "'+A+'" at '+T);if(N[1]!==A)throw new Error('Unclosed section "'+N[1]+'" at '+T)}else"name"===E||"{"===E||"&"===E?I=!0:"="===E&&P(A)}if(C(),N=v.pop())throw new Error('Unclosed section "'+N[1]+'" at '+R.pos);return function(e){for(var t,n=[],r=n,i=[],s=0,o=e.length;s<o;++s)switch((t=e[s])[0]){case"#":case"^":r.push(t),i.push(t),r=t[4]=[];break;case"/":i.pop()[5]=t[2],r=i.length>0?i[i.length-1][4]:n;break;default:r.push(t)}return n}(function(e){for(var t,n,r=[],i=0,s=e.length;i<s;++i)(t=e[i])&&("text"===t[0]&&n&&"text"===n[0]?(n[1]+=t[1],n[3]=t[3]):(r.push(t),n=t));return r}(m))}(e,n),o&&i.set(s,c)),c},m.prototype.render=function(e,t,n,r){var i=this.getConfigTags(r),s=this.parse(e,i),o=t instanceof v?t:new v(t,void 0);return this.renderTokens(s,o,n,e,r)},m.prototype.renderTokens=function(e,t,n,r,i){for(var s,o,a,c="",l=0,p=e.length;l<p;++l)a=void 0,"#"===(o=(s=e[l])[0])?a=this.renderSection(s,t,n,r,i):"^"===o?a=this.renderInverted(s,t,n,r,i):">"===o?a=this.renderPartial(s,t,n,i):"&"===o?a=this.unescapedValue(s,t):"name"===o?a=this.escapedValue(s,t,i):"text"===o&&(a=this.rawValue(s)),void 0!==a&&(c+=a);return c},m.prototype.renderSection=function(e,r,i,s,o){var a=this,c="",l=r.lookup(e[1]);if(l){if(t(l))for(var p=0,d=l.length;p<d;++p)c+=this.renderTokens(e[4],r.push(l[p]),i,s,o);else if("object"==typeof l||"string"==typeof l||"number"==typeof l)c+=this.renderTokens(e[4],r.push(l),i,s,o);else if(n(l)){if("string"!=typeof s)throw new Error("Cannot use higher-order sections without the original template");null!=(l=l.call(r.view,s.slice(e[3],e[5]),(function(e){return a.render(e,r,i,o)})))&&(c+=l)}else c+=this.renderTokens(e[4],r,i,s,o);return c}},m.prototype.renderInverted=function(e,n,r,i,s){var o=n.lookup(e[1]);if(!o||t(o)&&0===o.length)return this.renderTokens(e[4],n,r,i,s)},m.prototype.indentPartial=function(e,t,n){for(var r=t.replace(/[^ \t]/g,""),i=e.split("\n"),s=0;s<i.length;s++)i[s].length&&(s>0||!n)&&(i[s]=r+i[s]);return i.join("\n")},m.prototype.renderPartial=function(e,t,r,i){if(r){var s=this.getConfigTags(i),o=n(r)?r(e[1]):r[e[1]];if(null!=o){var a=e[6],c=e[5],l=e[4],p=o;0==c&&l&&(p=this.indentPartial(o,l,a));var d=this.parse(p,s);return this.renderTokens(d,t,r,p,i)}}},m.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(null!=n)return n},m.prototype.escapedValue=function(e,t,n){var r=this.getConfigEscape(n)||f.escape,i=t.lookup(e[1]);if(null!=i)return"number"==typeof i&&r===f.escape?String(i):r(i)},m.prototype.rawValue=function(e){return e[1]},m.prototype.getConfigTags=function(e){return t(e)?e:e&&"object"==typeof e?e.tags:void 0},m.prototype.getConfigEscape=function(e){return e&&"object"==typeof e&&!t(e)?e.escape:void 0};var f={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){y.templateCache=e},get templateCache(){return y.templateCache}},y=new m;return f.clearCache=function(){return y.clearCache()},f.parse=function(e,t){return y.parse(e,t)},f.render=function(e,n,r,i){if("string"!=typeof e)throw new TypeError('Invalid template! Template should be a "string" but "'+((t(s=e)?"array":typeof s)+'" was given as the first argument for mustache#render(template, view, partials)'));var s;return y.render(e,n,r,i)},f.escape=function(e){return String(e).replace(/[&<>"'`=\/]/g,(function(e){return c[e]}))},f.Scanner=g,f.Context=v,f.Writer=m,f}()},715:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventTargetWithType=void 0;class n extends EventTarget{addEventListener(e,t,n){super.addEventListener(e,t,n)}removeEventListener(e,t,n){super.removeEventListener(e,t,n)}}t.EventTargetWithType=n},752:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.App=void 0;const r=n(715),i=n(900);class s extends r.EventTargetWithType{constructor(){super(...arguments),this.startiappIsLoaded=!1}get appIntegration(){return(0,i.getIntegration)("AppIntegration")}get alternateIconsIntegration(){return(0,i.getIntegration)("AlternateIconsIntegration")}setStartiappIsLoaded(){this.startiappIsLoaded=!0}isStartiappLoaded(){return this.startiappIsLoaded}setAppUrl(e){this.appIntegration.setAppUrl(e)}resetAppUrl(){this.appIntegration.resetAppUrl()}openExternalBrowser(e){this.appIntegration.openBrowser(e)}brandId(){return new Promise(((e,t)=>{this.resolveBrandId=e,this.appIntegration.brandId()}))}requestReview(){this.appIntegration.requestReview()}deviceId(){return new Promise(((e,t)=>{this.resolveDeviceId=e,this.appIntegration.deviceId()}))}version(){return new Promise(((e,t)=>{this.resolveVersion=e,this.appIntegration.version()}))}getInternalDomains(){return new Promise(((e,t)=>{this.resolveGetInternalDomains=e,this.appIntegration.getInternalDomains()}))}addInternalDomain(e){this.appIntegration.addInternalDomain(e)}removeInternalDomain(e){this.appIntegration.removeInternalDomain(e)}setAppIcon(e){this.alternateIconsIntegration.setAppIcon(e)}showStatusBar(){if(void 0===this.appIntegration.showStatusBar)return console.warn("showStatusBar not implemented, please update your app to the latest version");this.appIntegration.showStatusBar()}hideStatusBar(){if(void 0===this.appIntegration.hideStatusBar)return console.warn("hideStatusBar not implemented, please update your app to the latest version");this.appIntegration.hideStatusBar()}setStatusBar(e){if(void 0===this.appIntegration.setStatusBar)return console.warn("setStatusBar not implemented, please update your app to the latest version");this.appIntegration.setStatusBar(e)}setSpinner(e){if(void 0===this.appIntegration.setNavigationSpinner)return console.warn("setNavigationSpinner not implemented, please update your app to the latest version");this.appIntegration.setNavigationSpinner({color:e.color,delay:e.afterMilliseconds,show:e.show,excludedDomains:e.excludedDomains})}hideSpinner(){if(!this.appIntegration.hideNavigationSpinner)return console.warn("hideNavigationSpinner not implemented, please update your app to the latest version");this.appIntegration.hideNavigationSpinner()}showSpinner(e){if(!this.appIntegration.showNavigationSpinner)return console.warn("showNavigationSpinner not implemented, please update your app to the latest version");this.appIntegration.showNavigationSpinner({color:null==e?void 0:e.color,delay:null==e?void 0:e.afterMilliseconds,show:null==e?void 0:e.show,excludedDomains:null==e?void 0:e.excludedDomains})}setCommonScript(e){this.appIntegration.setCommonScript(e)}setSafeAreaBackgroundColor(e){return new Promise(((t,n)=>{this.resolveSetSafeAreaBackgroundColor=t,this.appIntegration.setSafeAreaBackgroundColor(e)}))}disableScreenRotation(){this.appIntegration.disableScreenRotation()}enableScreenRotation(){this.appIntegration.enableScreenRotation()}addExternalDomains(...e){let t=e.map((e=>({pattern:e.source,flags:e.flags})));this.appIntegration.addExternalDomains(t)}removeExternalDomains(...e){let t=e.map((e=>({pattern:e.source,flags:e.flags})));this.appIntegration.removeExternalDomains(t)}getExternalDomains(){return new Promise(((e,t)=>{this.resolveExternalDomains=e,this.appIntegration.getExternalDomains()}))}getExternalDomainsResult(e){this.resolveExternalDomains(e),this.resolveExternalDomains=null}appInForegroundEventRecievedEvent(){this.dispatchEvent(new CustomEvent("appInForeground"))}brandIdResult(e){this.resolveBrandId(e),this.resolveBrandId=null}versionResult(e){this.resolveVersion(e),this.resolveVersion=null}deviceIdResult(e){this.resolveDeviceId(e),this.resolveDeviceId=null}setSafeAreaBackgroundColorResult(e){this.resolveSetSafeAreaBackgroundColor(e),this.resolveSetSafeAreaBackgroundColor=null}navigatingPageEvent(e){this.dispatchEvent(new CustomEvent("navigatingPage",{detail:e}))}getInternalDomainsResult(e){this.resolveGetInternalDomains(e),this.resolveGetInternalDomains=null}addDomainToHistoryExclusion(e){this.appIntegration.addExcludedFromHistoryDomain(e)}removeDomainFromHistoryExclusion(e){this.appIntegration.removeExcludedFromHistoryDomain(e)}addPatternToHistoryExclusion(e){this.appIntegration.addExcludedFromHistoryPattern({pattern:e.source,flags:e.flags})}removePatternFromHistoryExclusion(e){this.appIntegration.removeExcludedFromHistoryPattern({pattern:e.source,flags:e.flags})}}t.App=new s},495:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ClientUser=void 0;const i=n(715),s=n(913),o=n(607);class a extends i.EventTargetWithType{get userId(){return this._userId||localStorage.getItem("startiapp-clientUserId")||null}set userId(e){this._userId=e,localStorage.setItem("startiapp-clientUserId",e)}deleteUser(e){return r(this,void 0,void 0,(function*(){const t=this.userId;if(!t)throw new Error("No user ID");const n=(null==e?void 0:e.prompt)||"Er du sikker på, at du vil slette slette din bruger i appen?",r=(null==e?void 0:e.confirmation)||"Vi har registreret dit ønske og vender tilbage med en bekræftelse.";if(!confirm(n))return;const i={brandId:yield o.default.App.brandId(),userId:t},a=yield fetch(s.baseUrl+"/App-requestAccountDeletion",{body:JSON.stringify(i),headers:{"Content-Type":"application/json"},method:"POST"});if(!a.ok)throw console.warn("Failed to request user deletion",i),new Error(`Failed to request user deletion: Firebase returned statuscode ${a.status}`);alert(r)}))}registerId(e){return r(this,void 0,void 0,(function*(){this.userId=e;const[t,n,r]=yield Promise.all([o.default.App.brandId(),o.default.App.deviceId(),o.default.PushNotification.getToken()]);if(!r||0===r.length)throw console.warn("Failed to register logged in client user",e,"No FCM token"),new Error(`Failed to register logged in client user ${e}: No FCM token`);const i={brandId:t,clientUserId:e,deviceId:n,fcmToken:r},a=yield fetch(s.baseUrl+"/ClientUser-registerId",{body:JSON.stringify(i),headers:{"Content-Type":"application/json"},method:"POST"});if(!a.ok)throw console.warn("Failed to register logged in client user",e,i),new Error(`Failed to register logged in client user ${e}: Firebase returned statuscode ${a.status}`)}))}unregisterId(){return r(this,void 0,void 0,(function*(){this.userId="";const[e,t]=yield Promise.all([o.default.App.brandId(),o.default.App.deviceId()]),n={brandId:e,deviceId:t},r=yield fetch(s.baseUrl+"/ClientUser-unregisterId",{body:JSON.stringify(n),headers:{"Content-Type":"application/json"},method:"POST"});if(!r.ok)throw console.warn("Failed to unregister logged in client user",n),new Error(`Failed to unregister logged in client user: Firebase returned statuscode ${r.status}`)}))}}t.ClientUser=new a},913:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.googleStorageBucket=t.styleTagId=t.baseUrl=void 0,t.baseUrl="https://europe-west3-startiapp-admin-1fac2.cloudfunctions.net",t.styleTagId="startiapp-styling",t.googleStorageBucket="startiapp-admin-1fac2.appspot.com"},900:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIntegration=void 0;let n={};t.getIntegration=function(e){if(n[e])return n[e];let t=window[e],r=0;for(;!t&&r<5;)t=window.parent[e],r++;if(!t)throw new Error(`Could not find integration ${e}`);return n[e]=t,t}},607:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(752),s=n(495),o=n(900),a=n(154),c=n(807),l=n(725),p=n(720),d=n(133),u=n(415),h=n(803),g=n(491),v=n(867),m=n(179),f=n(666),y=n(236),w=n(240),I=n(716),S=n(593);class b extends EventTarget{constructor(){super(...arguments),this.App=i.App,this.Device=l.Device,this.Biometrics=c.Biometrics,this.User=s.ClientUser,this.NfcScanner=p.NFC,this.PushNotification=d.PushNotification,this.QrScanner=u.QrScanner,this.Share=h.Share,this.Network=v.Network,this.Trigger=g.Trigger,this.Iap=m.Iap}get appIntegration(){return(0,o.getIntegration)("AppIntegration")}initialize(e){this.isRunningInApp()&&("function"==typeof gtag&>ag("set","user_properties",{startiapp:"true"}),I.AppUI.setOptions(e),this.appIntegration.webAppIsReady())}isRunningInApp(){return(0,S.isRunningInApp)()}addEventListener(e,t,n){if("ready"==e&&i.App.isStartiappLoaded()){const e=new CustomEvent("ready");"handleEvent"in t?t.handleEvent(e):t(e)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){super.removeEventListener(e,t,n)}}let C=new b,P={};if("undefined"==typeof window)console.error("starti.app is only available client-side");else{if(P=window,P.appIntegrationsAreReady=()=>{i.App.setStartiappIsLoaded(),C.dispatchEvent(new CustomEvent("ready"))},P.startiappDevice=l.Device,P.startiappApp=i.App,P.startiappUser=s.ClientUser,P.startiappQrScanner=u.QrScanner,P.startiappPushNotification=d.PushNotification,P.startiappNFC=p.NFC,P.startiappShare=h.Share,P.startiappNetwork=v.Network,P.startiappIap=m.Iap,P.startiappBiometric=c.Biometrics,P.startiappTrigger=g.Trigger,P.appErrorEvent=e=>{C.dispatchEvent(new CustomEvent("error",{detail:e}))},document.body)T();else{const A=new MutationObserver((()=>T(A)));A.observe(document.documentElement,{childList:!0})}function T(e){if(!document.body)return;if((new f.SmartBanner).initialize(),C.isRunningInApp()?document.body.setAttribute("startiapp",""):document.body.removeAttribute("startiapp"),!document.head)return;const t=document.createElement("style");if(t.innerHTML="body:not([startiapp]) .startiapp-hide-in-browser,body:not([startiapp]) .startiapp-show-in-app,body[startiapp] .startiapp-hide-in-app,body[startiapp] .startiapp-show-in-browser{display:none!important}",document.head.appendChild(t),C.isRunningInApp()){const e={width:"device-width","viewport-fit":"cover"},t=document.querySelector("meta[name=viewport]");if(t){const n=(0,w.parseViewportMeta)(t.content);t.content=(0,w.serializeViewportMeta)(Object.assign(Object.assign({},n),e))}else{const t=document.createElement("meta");t.name="viewport",t.content=(0,w.serializeViewportMeta)(e),document.head.appendChild(t)}}e&&e.disconnect()}P.startiapp=C;const E=new y.TaskStepper;E.addTask(a.checkIfAppVersionIsClosed),C.addEventListener("ready",(()=>r(void 0,void 0,void 0,(function*(){yield E.start()}))))}t.default=C},154:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.checkIfAppVersionIsClosed=void 0;const i=n(752),s=n(900),o=new(n(718).ClosedVersionChecker);function a(){return r(this,void 0,void 0,(function*(){const e=yield o.getAvailableVersionsDocument();/iPad|iPhone|iPod/.test(navigator.userAgent)?window.location.href="https://apps.apple.com/lt/app/"+e.iosStoreId:i.App.openExternalBrowser("https://play.google.com/store/apps/details?id="+e.androidStoreId)}))}t.checkIfAppVersionIsClosed=function(e){return r(this,void 0,void 0,(function*(){if(!(yield o.isCurrentVersionClosed()))return e();yield function(){return r(this,void 0,void 0,(function*(){const e=yield function(){return r(this,void 0,void 0,(function*(){const e=document.createElement("div");e.style.height="100vh",e.style.maxWidth="100vw",e.style.paddingInline="10px",e.style.display="flex",e.style.justifyContent="center",e.style.alignItems="center",e.style.flexDirection="column";const t=document.createElement("h1");t.style.fontSize="18px",t.style.fontFamily="sans-serif",t.style.textAlign="center",t.textContent="Der er kommet en opgradering til appen, som er nødvendig for at fortsætte.";const n=document.createElement("button");return n.style.marginTop="15px",n.style.fontSize="18px",n.style.fontFamily="sans-serif",n.style.textAlign="center",n.style.padding="15px 30px",n.style.borderRadius="100vh",n.style.background="#444",n.style.color="white",n.style.border="none",n.textContent="Opgrader appen",n.onclick=a,e.appendChild(t),e.appendChild(n),e}))}();document.body.innerHTML="",document.body.appendChild(e),(0,s.getIntegration)("AppIntegration").webAppIsReady()}))}()}))}},807:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Biometrics=void 0;const r=n(715),i=n(900);class s extends r.EventTargetWithType{constructor(){super(...arguments),this.SECURED_CONTENT_KEY="STARTI_APP_BIOMETRIC_CONTENT",this.SECURED_LOGIN_KEY="STARTI_APP_BIOMETRIC_LOGIN_CONTENT",this.defaultScanTitle="Prove you have fingers!",this.defaultScanReason="Can't let you in if you don't."}get biometricIntegration(){return(0,i.getIntegration)("BiometricIntegration")}scan(e=this.defaultScanTitle,t=this.defaultScanReason){return new Promise(((n,r)=>{this.resolveScan=n,this.biometricIntegration.startScanning(e,t)}))}getAuthenticationType(){return new Promise(((e,t)=>{this.resolveAuthType=e,this.biometricIntegration.getAuthenticationType()}))}setSecuredContent(e){this.biometricIntegration.setSecuredContent(this.SECURED_CONTENT_KEY,JSON.stringify(e))}getSecuredContent(e=this.defaultScanTitle,t=this.defaultScanReason){return new Promise(((n,r)=>{this.resolveGetContent=n,this.biometricIntegration.getSecuredContent(this.SECURED_CONTENT_KEY,e,t)}))}hasSecuredContent(){return new Promise(((e,t)=>{this.resolveHasSecureContent=e,this.biometricIntegration.hasSecuredContent(this.SECURED_CONTENT_KEY)}))}removeSecuredContent(){this.biometricIntegration.removeSecuredContent(this.SECURED_CONTENT_KEY)}setUsernameAndPassword(e,t){this.biometricIntegration.setSecuredContent(this.SECURED_LOGIN_KEY,JSON.stringify({username:e,password:t}))}removeUsernameAndPassword(){this.biometricIntegration.removeSecuredContent(this.SECURED_LOGIN_KEY)}hasUsernameAndPassword(){return new Promise(((e,t)=>{this.resolveHasUsernameAndPassword=e,this.biometricIntegration.hasSecuredContent(this.SECURED_LOGIN_KEY)}))}getUsernameAndPassword(e=this.defaultScanTitle,t=this.defaultScanReason){return new Promise(((n,r)=>{this.resolveGetUsernamePassword=n,this.biometricIntegration.getSecuredContent(this.SECURED_LOGIN_KEY,e,t)}))}handleResolveGetUsernamePassword(e){try{const t=JSON.parse(e.result);this.resolveGetUsernamePassword(t)}catch(e){this.resolveGetUsernamePassword(null)}this.resolveGetUsernamePassword=null}hasSecuredContentResult({result:e,key:t}){if(t===this.SECURED_LOGIN_KEY)return this.resolveHasUsernameAndPassword(e),void(this.resolveHasUsernameAndPassword=null);this.resolveHasSecureContent(e),this.resolveHasSecureContent=null}getAuthenticationTypeResult(e){this.resolveAuthType(e),this.resolveAuthType=null}startScanningResult(e){this.resolveScan(e),this.resolveScan=null}getSecuredContentResult(e){if(e.key!==this.SECURED_LOGIN_KEY){try{const t=JSON.parse(e.result);this.resolveGetContent(t)}catch(t){this.resolveGetContent(e.result)}this.resolveGetContent=null}else this.handleResolveGetUsernamePassword(e)}}t.Biometrics=new s},725:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Device=void 0;const r=n(715),i=n(900);class s extends r.EventTargetWithType{get deviceIntegration(){return(0,i.getIntegration)("DeviceIntegration")}startAccelerometer(){this.deviceIntegration.startAccelerometer()}stopAccelerometer(){this.deviceIntegration.stopAccelerometer()}isAccelerometerStarted(){return new Promise(((e,t)=>{this.deviceIntegration.isAccelerometerStarted(),this.resolveIsAccelerometerStarted=e}))}isAccelerometerStartedResult(e){this.resolveIsAccelerometerStarted(e),this.resolveIsAccelerometerStarted=null}onShakeEvent(){this.dispatchEvent(new CustomEvent("shake"))}}t.Device=new s},179:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Iap=void 0;const r=n(715),i=n(900);class s extends r.EventTargetWithType{get IapIntegration(){return(0,i.getIntegration)("IapIntegration")}isSupported(){return new Promise(((e,t)=>{this.resolveIsSupported=e,this.IapIntegration.isSupported()}))}purchaseProduct(e,t,n){return new Promise((r=>{this.resolvePurchaseProduct=r,this.IapIntegration.purchaseProduct(e,t,n)}))}finalizePurchase(e){return new Promise((t=>{this.resolveFinalizePurchase=t,this.IapIntegration.finalizePurchase(e)}))}consumePurchase(e,t){return new Promise((n=>{this.resolveConsumePurchase=n,this.IapIntegration.consumePurchase(e,t)}))}getProduct(e,t){return new Promise((n=>{this.resolveGetProduct=n,this.IapIntegration.getProduct(e,t)}))}isSupportedResult(e){this.resolveIsSupported(e),this.resolveIsSupported=null}purchaseProductResult(e){this.resolvePurchaseProduct(e),this.resolvePurchaseProduct=null}finalizePurchaseResult(e){this.resolveFinalizePurchase(e),this.resolveFinalizePurchase=null}consumePurchaseResult(e){this.resolveConsumePurchase(e),this.resolveConsumePurchase=null}getProductResult(e){this.resolveGetProduct(e),this.resolveGetProduct=null}}t.Iap=new s},867:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Network=void 0;const r=n(715),i=n(900);class s extends r.EventTargetWithType{get networkIntegration(){return(0,i.getIntegration)("NetworkIntegration")}sendUdpBroadcast(e,t){return new Promise(((n,r)=>{this.resolveSendUdpBroadcast=n,this.networkIntegration.sendUdpBroadcast(e.toString(),t)}))}currentConnectionState(){return new Promise(((e,t)=>{this.resolveCurrentConnectionState=e,this.networkIntegration.currentConnectionState()}))}startListeningForUdpPackets(e){return new Promise(((t,n)=>{this.resolveStartListeningForUdpPackets=t,this.networkIntegration.startListeningForUdpPackets(e.toString())}))}stopListeningForUdpPackets(){return new Promise(((e,t)=>{this.resolveStopListeningForUdpPackets=e,this.networkIntegration.stopListeningForUdpPackets()}))}startListeningForConnectionChanges(){return new Promise(((e,t)=>{this.resolveStartListeningForConnectionChanges=e,this.networkIntegration.startListeningForConnectionChanges()}))}stopListeningForConnectionChanges(){return new Promise(((e,t)=>{this.resolveStopListeningForConnectionChanges=e,this.networkIntegration.stopListeningForConnectionChanges()}))}sendUdpBroadcastResult(e){this.resolveSendUdpBroadcast(e),this.resolveSendUdpBroadcast=null}currentConnectionStateResult(e){this.resolveCurrentConnectionState(e),this.resolveCurrentConnectionState=null}startListeningForUdpPacketsResult(e){this.resolveStartListeningForUdpPackets(e),this.resolveStartListeningForUdpPackets=null}stopListeningForUdpPacketsResult(e){this.resolveStopListeningForUdpPackets(e),this.resolveStopListeningForUdpPackets=null}startListeningForConnectionChangesResult(e){this.resolveStartListeningForConnectionChanges(e),this.resolveStartListeningForConnectionChanges=null}stopListeningForConnectionChangesResult(e){this.resolveStopListeningForConnectionChanges(e),this.resolveStopListeningForConnectionChanges=null}udpPacketReceivedEvent(e){const t=new CustomEvent("udpPacketReceived",{detail:e});this.dispatchEvent(t)}connectionStateChangedEvent(e){const t=new CustomEvent("connectionStateChanged",{detail:e});this.dispatchEvent(t)}}t.Network=new s},720:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NFC=void 0;const r=n(715),i=n(900);class s extends r.EventTargetWithType{get NFCIntegration(){return(0,i.getIntegration)("NFCIntegration")}isNfcSupported(){return new Promise(((e,t)=>{this.resolveNFCSupported=e,this.NFCIntegration.isNFCSupported()}))}startNfcScanner(){return new Promise((e=>{this.resolveStartNFCReader=e,this.NFCIntegration.startListening()}))}stopNfcScanner(){return new Promise((e=>{this.resolveStopNFCReader=e,this.NFCIntegration.stopListening()}))}nfcTagScannedEvent(e){const t=new CustomEvent("nfcTagScanned",{detail:e});this.dispatchEvent(t)}stopListeningResult(e){this.resolveStopNFCReader(e),this.resolveStopNFCReader=null}isNFCSupportedResult(e){this.resolveNFCSupported(e),this.resolveNFCSupported=null}startListeningResult(e){this.resolveStartNFCReader(e),this.resolveStartNFCReader=null}}t.NFC=new s},133:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PushNotification=t.Topic=void 0;const i=n(466),s=n(715),o=n(913),a=n(900),c=n(607);class l extends s.EventTargetWithType{get pushNotificationIntegration(){return(0,a.getIntegration)("PushNotificationIntegration")}requestAccess(){return r(this,void 0,void 0,(function*(){return new Promise(((e,t)=>{this.resolveRequestAccess=e,this.pushNotificationIntegration.requestAccess()}))}))}getToken(){return new Promise(((e,t)=>{this.resolveFCMToken=e,this.pushNotificationIntegration.getFCMToken()}))}getTopics(){return r(this,void 0,void 0,(function*(){const e={brand:yield c.default.App.brandId()},t=yield fetch(o.baseUrl+"/Topics-getTopics",{body:JSON.stringify(e),method:"POST",headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error("Failed to get topics");const n=yield t.json(),r=this.getSubscribedTopics();return n.map((({name:e,topic:t})=>new p(t,e,r.includes(t))))}))}renderTopics(){return r(this,void 0,void 0,(function*(){const e=yield this.getTopics(),t=document.getElementById("startiapp-topics-template");if(!t||"SCRIPT"!==t.tagName)throw new Error("Template element not found");if("x-tmpl-mustache"!==t.type)throw new Error('Template element must have type="x-tmpl-mustache"');const n=document.getElementById("startiapp-topics-target");if(!n||"DIV"!==n.tagName)throw new Error("Template target element not found");const s=t.innerHTML,o=(0,i.render)(s,{topics:e});n.innerHTML=o,n.querySelectorAll('input[type="checkbox"]').forEach((e=>{e.dataset.startiappTopic&&e.addEventListener("change",(t=>r(this,void 0,void 0,(function*(){if(!(yield this.requestAccess()))return t.target.checked=!1,void t.preventDefault();e.checked?this.subscribeToTopics([e.dataset.startiappTopic]):this.unsubscribeFromTopics([e.dataset.startiappTopic])}))))}))}))}subscribeToTopics(e){return r(this,void 0,void 0,(function*(){if(!(yield c.default.PushNotification.requestAccess()))throw console.warn("Push notification permissions denied"),new Error("Push notification permissions denied");const[t,n,r]=yield Promise.all([c.default.PushNotification.getToken(),c.default.App.brandId(),c.default.App.deviceId()]),i=[];e.forEach((e=>{const s={brandId:n,topic:e,fcmToken:t,deviceId:r},a=fetch(o.baseUrl+"/Topics-subscribeToTopic",{body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json"}});i.push(a)})),(yield Promise.all(i)).forEach(((t,n)=>{t.ok?this.updateSubscribedTopics(e[n],!0):console.warn("Failed to sign up to topic",n,e[n])}))}))}unsubscribeFromTopics(e){return r(this,void 0,void 0,(function*(){const[t,n,r]=yield Promise.all([c.default.PushNotification.getToken(),c.default.App.brandId(),c.default.App.deviceId()]),i=[];e.forEach((e=>{const s={brandId:n,topic:e,fcmToken:t,deviceId:r},a=fetch(o.baseUrl+"/Topics-unsubscribeFromTopic",{body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json"}});i.push(a)})),(yield Promise.all(i)).forEach(((t,n)=>{t.ok?this.updateSubscribedTopics(e[n],!1):console.warn("Failed to unsubscribe from topic",n,e[n])}))}))}requestAccessResult(e){this.resolveRequestAccess(e),this.resolveRequestAccess=null}getFCMTokenResult(e){this.resolveFCMToken(e),this.resolveFCMToken=null}tokenReceivedEvent(e){this.dispatchEvent(new CustomEvent("tokenRefreshed",{detail:e}))}notificationReceivedEvent(e){this.dispatchEvent(new CustomEvent("notificationReceived",{detail:e}))}firebasePushNotificationTopicsUnsubscribeResult(e){}firebasePushNotificationSubscribeToTopicsResult(e){}updateSubscribedTopics(e,t){const n=localStorage.getItem("startiapp-subscribed-topics")?JSON.parse(localStorage.getItem("startiapp-subscribed-topics")):[];t?n.includes(e)||n.push(e):n.includes(e)&&n.splice(n.indexOf(e),1),localStorage.setItem("startiapp-subscribed-topics",JSON.stringify(n))}getSubscribedTopics(){return localStorage.getItem("startiapp-subscribed-topics")?JSON.parse(localStorage.getItem("startiapp-subscribed-topics")):[]}}class p{constructor(e,t,n=!1){this.topic=e,this.name=t,this.subscribed=n}toJSON(){return{topic:this.topic,name:this.name,subscribed:this.subscribed}}subscribe(){t.PushNotification.subscribeToTopics([this.topic])}unsubscribe(){t.PushNotification.unsubscribeFromTopics([this.topic])}}t.Topic=p,t.PushNotification=new l},415:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QrScanner=void 0;const r=n(715),i=n(900);class s extends r.EventTargetWithType{get qrScannerIntegration(){return(0,i.getIntegration)("QrScannerIntegration")}scan(){return new Promise(((e,t)=>{this.resolveScan=e,this.qrScannerIntegration.startQrCodeScanner()}))}isCameraAccessGranted(){return new Promise(((e,t)=>{this.resolveCameraAccessGranted=e,this.qrScannerIntegration.isCameraAccessGranted()}))}requestCameraAccess(){return new Promise(((e,t)=>{this.resolveRequestCameraAccess=e,this.qrScannerIntegration.requestCameraAccess()}))}requestCameraAccessResult(e){this.resolveRequestCameraAccess(e),this.resolveRequestCameraAccess=null}startQrCodeScannerResult(e){this.resolveScan(e),this.resolveScan=null}isCameraAccessGrantedResult(e){this.resolveCameraAccessGranted(e),this.resolveCameraAccessGranted=null}}t.QrScanner=new s},803:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Share=void 0;const r=n(715),i=n(900);class s extends r.EventTargetWithType{get shareIntegration(){return(0,i.getIntegration)("ShareIntegration")}shareFile(e,t){return new Promise(((n,r)=>{this.resolveShareFile=n,this.shareIntegration.shareFile(e,t)}))}shareText(e){return new Promise(((t,n)=>{this.resolveShareText=t,this.shareIntegration.shareText(e)}))}downloadFile(e,t){return new Promise(((n,r)=>{this.resolveDownloadText=n,this.shareIntegration.downloadFile(e,t)}))}shareFileResult(e){this.resolveShareFile(e),this.resolveShareFile=null}shareTextResult(e){this.resolveShareText(e),this.resolveShareText=null}downloadFileResult(e){this.resolveDownloadText(e),this.resolveDownloadText=null}}t.Share=new s},491:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Trigger=void 0;const i=n(607),s=n(715),o=n(913);class a extends s.EventTargetWithType{trackEvent(e,t){return r(this,void 0,void 0,(function*(){const n=yield i.default.App.brandId(),r=yield i.default.App.deviceId(),s={brandId:n,event:{id:e,customProperties:t},identifierType:"installationId",identifier:r};try{yield fetch(o.baseUrl+"/Trigger-trackEvent",{body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json"}})}catch(e){}}))}trackUserProperty(e,t){return r(this,void 0,void 0,(function*(){const n={[e]:t},r={brandId:yield i.default.App.brandId(),customFields:n,identifierType:"installationId",identifier:yield i.default.App.deviceId()};try{yield fetch(o.baseUrl+"/Trigger-trackUserProperty",{body:JSON.stringify(r),method:"POST",headers:{"Content-Type":"application/json"}})}catch(e){}}))}}t.Trigger=new a},718:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ClosedVersionChecker=void 0;const i=n(752),s=n(913),o=n(703);t.ClosedVersionChecker=class{constructor(){this.documentData=null}getAvailableVersionsUrl(){return r(this,void 0,void 0,(function*(){const e=yield i.App.brandId();return`https://storage.googleapis.com/${s.googleStorageBucket}/availableVersions/${encodeURIComponent(e)}.json`}))}getAvailableVersionsDocument(){return r(this,void 0,void 0,(function*(){if(null!=this.documentData)return this.documentData;const e=yield this.getAvailableVersionsUrl(),t=yield fetch(e),n=yield t.json();return this.documentData=n,n}))}getCurrentVersionSemver(){return r(this,void 0,void 0,(function*(){const e=yield i.App.version();return new o.SemVer(e)}))}getLatestVersionSemvar(e){return e.reduce(((e,t)=>t.isGreaterThan(e)?t:e),new o.SemVer("0.0.0"))}isCurrentVersionClosed(){return r(this,void 0,void 0,(function*(){const e=yield this.getCurrentVersionSemver(),t=yield this.getAvailableVersionsDocument();if(t.versions.includes(e.toString()))return!1;const n=t.versions.map((e=>new o.SemVer(e))),r=this.getLatestVersionSemvar(n);return!e.isGreaterThanOrEqualTo(r)}))}}},703:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemVer=void 0,t.SemVer=class{constructor(e){if(this.version=e,!this.isValidVersion(e))throw new Error(`Invalid version: ${e}`);const t=e.split(".");this.major=parseInt(t[0]),this.minor=parseInt(t[1]),this.patch=parseInt(t[2])}isValidVersion(e){const t=e.split(".");return!(t.length<3||isNaN(parseInt(t[0]))||isNaN(parseInt(t[1]))||isNaN(parseInt(t[2])))}isGreaterThan(e){return this.major>e.major||!(this.major<e.major)&&(this.minor>e.minor||!(this.minor<e.minor)&&(this.patch>e.patch||(this.patch,e.patch,!1)))}isGreaterThanOrEqualTo(e){return this.isGreaterThan(e)||this.isEqualTo(e)}isEqualTo(e){return this.major===e.major&&this.minor===e.minor&&this.patch===e.patch}toString(){return this.version}}},666:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SmartBanner=void 0;const i=n(913),s=n(593);t.SmartBanner=class{constructor(){this.marginTop="72px"}getHostDomain(){const e=window.location.host.split(".");return e.slice(e.length-2).join(".")}getSmartBannerDataUrl(){const e=this.getHostDomain();return`https://storage.googleapis.com/${i.googleStorageBucket}/smartbanner/${encodeURIComponent(e)}.json`}getSmartBannerData(){return r(this,void 0,void 0,(function*(){try{const e=yield fetch(this.getSmartBannerDataUrl());return yield e.json()}catch(e){return e instanceof SyntaxError||console.error("SmartBanner error",e),{enabled:!1,appName:"",appIcon:"",appleAppId:"",googlePlayAppId:"",backgroundColor:void 0,textColor:void 0}}}))}getSmartBannerClosed(){const e=localStorage.getItem("startiapp-smart-banner-closed-at");return!!(e&&Date.now()-parseInt(e)<6048e5)}setSmartBannerClosed(e=!1){localStorage.setItem("startiapp-smart-banner-closed-at",e?Date.now()+2592e6+"":Date.now().toString())}initialize(){var e,t;return r(this,void 0,void 0,(function*(){if((0,s.isRunningInApp)())return;const n=(()=>{const e=navigator.userAgent;return/android/i.test(e)?"Android":/iPad|iPhone|iPod/.test(e)?"iOS":"Other"})();if("Other"===n)return;const r=document.querySelector("html");if(!r)return;if(this.getSmartBannerClosed())return;const i=yield this.getSmartBannerData();if(!i.enabled)return;const o=null!==(e=i.backgroundColor)&&void 0!==e?e:"#f2f1f6",a=null!==(t=i.textColor)&&void 0!==t?t:"#000";r.style.setProperty("margin-top",this.marginTop,"important");const c=document.createElement("div");switch(c.id="startiapp-smart-banner-wrapper",c.style.setProperty("position","fixed","important"),c.style.setProperty("top","0","important"),c.style.setProperty("left","0","important"),c.style.setProperty("right","0","important"),c.style.setProperty("height",this.marginTop,"important"),c.style.setProperty("width","100%","important"),c.style.setProperty("background-color",o,"important"),c.style.setProperty("z-index","999999999","important"),c.style.setProperty("color",a,"important"),c.style.setProperty("stroke",a,"important"),n){case"iOS":yield this.createIosBannerContent(i,c);break;case"Android":yield this.createAndroidBannerContent(i,c);break;default:return void console.warn("Unknown platform",n)}document.body.appendChild(c)}))}createIosBannerContent(e,t){return r(this,void 0,void 0,(function*(){this.createContent(e,`https://apps.apple.com/us/app/id${e.appleAppId}`,"App Store",t)}))}createAndroidBannerContent(e,t){return r(this,void 0,void 0,(function*(){this.createContent(e,`market://details?id=${e.googlePlayAppId}`,"Play Store",t)}))}createContent(e,t,n,i){var s,o;return r(this,void 0,void 0,(function*(){0===(null===(s=e.appDetails)||void 0===s?void 0:s.length)&&(e.appDetails=void 0);const r=document.createElement("div");r.style.setProperty("display","grid","important"),r.id="startiapp-smart-banner-grid",r.style.setProperty("grid-template-columns","30px auto auto","important"),r.style.setProperty("height","100%","important"),r.style.setProperty("width","100%","important"),r.style.setProperty("font-family","sans-serif","important");const a=document.createElement("div");a.id="startiapp-smart-banner-close-button",a.style.setProperty("grid-column","1"),a.style.setProperty("grid-row","1"),a.style.setProperty("height","100%"),a.style.setProperty("width","100%"),a.style.setProperty("display","flex"),a.style.setProperty("justify-content","center"),a.style.setProperty("align-items","center"),a.onclick=()=>{var e,t;i.remove(),null===(e=document.querySelector("html"))||void 0===e||e.style.setProperty("transition","margin-top 0.3s ease-in-out"),null===(t=document.querySelector("html"))||void 0===t||t.style.removeProperty("margin-top"),this.setSmartBannerClosed()};const c=document.createElementNS("http://www.w3.org/2000/svg","svg");c.setAttribute("id","close-smart-banner"),c.setAttribute("style","height: 16px; width: 16px;"),c.setAttribute("viewBox","0 0 24 24"),c.setAttribute("fill","none"),c.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.style.setProperty("stroke","inherit"),c.innerHTML='\n\t\t\t<path d="M18 6L6 18" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n\t\t\t<path d="M6 6L18 18" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n\t\t',a.appendChild(c);const l=document.createElement("div");l.id="startiapp-smart-banner-image",l.style.setProperty("grid-column","2"),l.style.setProperty("grid-row","1"),l.style.setProperty("height","100%"),l.style.setProperty("width","100%"),l.style.setProperty("display","flex"),l.style.setProperty("justify-content","start"),l.style.setProperty("align-items","center");const p=document.createElement("img");p.id="startiapp-smart-banner-app-icon",p.src=e.appIcon,p.style.setProperty("height","54px"),p.style.setProperty("width","54px"),p.style.setProperty("object-fit","scale-down");const d=document.createElement("div");d.id="startiapp-smart-banner-app-name-container",d.style.setProperty("display","flex"),d.style.setProperty("flex-direction","column");const u=document.createElement("span");u.id="startiapp-smart-banner-app-name",u.style.setProperty("margin-left","8px"),u.style.setProperty("font-size","16px"),u.style.setProperty("font-weight","500"),u.textContent=e.appName;const h=document.createElement("span");h.id="startiapp-smart-banner-app-details",h.style.setProperty("margin-left","8px"),h.style.setProperty("font-size","16px"),h.style.setProperty("font-weight","500"),h.textContent=null!==(o=e.appDetails)&&void 0!==o?o:`GET — on the ${n}`,d.appendChild(u),d.appendChild(h),l.appendChild(p),l.appendChild(d);const g=document.createElement("div");g.style.setProperty("grid-column","3"),g.style.setProperty("grid-row","1"),g.style.setProperty("height","100%"),g.style.setProperty("width","100%"),g.style.setProperty("display","flex"),g.style.setProperty("justify-content","center"),g.style.setProperty("align-items","center");const v=document.createElement("a");v.href=t,v.target="_blank",v.textContent="Vis",v.style.setProperty("text-decoration","none"),v.style.setProperty("color","inherit"),v.style.setProperty("font-size","16px"),v.style.setProperty("font-weight","500"),g.appendChild(v),r.appendChild(a),r.appendChild(l),r.appendChild(g),i.appendChild(r)}))}}},236:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TaskStepper=void 0,t.TaskStepper=class{constructor(){this.tasks=[]}addTask(e){this.tasks.push(e)}start(){return n(this,void 0,void 0,(function*(){yield this.runTasks(this.tasks)}))}runTasks(e){return n(this,void 0,void 0,(function*(){if(0===e.length)return;const t=e.shift();if(null!=t)try{yield t((()=>this.runTasks(e)))}catch(t){this.runTasks(e)}}))}}},240:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeViewportMeta=t.parseViewportMeta=void 0,t.parseViewportMeta=function(e){const t={},n=e.split(",");for(const e of n){const[n,r]=e.trim().split("=");switch(n.trim()){case"width":case"height":case"initial-scale":case"minimum-scale":case"maximum-scale":case"user-scalable":case"viewport-fit":t[n.trim()]=r.trim()}}return t},t.serializeViewportMeta=function(e){const t=[];for(const[n,r]of Object.entries(e))r&&t.push(`${n}=${r}`);return t.join(", ")}},716:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppUI=void 0;const r=n(607),i=n(913),s=n(240);t.AppUI=new class{constructor(){this.options={allowDrag:!1,allowHighligt:!1,allowZoom:!1,allowScrollBounce:!1,allowRotation:!1,spinner:{show:!1},statusBar:{removeSafeArea:!0,hideText:!1,safeAreaBackgroundColor:"#000000",darkContent:!1}}}setOptions(e){this.options=Object.assign(Object.assign({},this.options),e),this.updateUI()}getOptions(){return this.options}updateViewportMeta(e){const t=document.querySelector("meta[name=viewport]");if(t){const n=(0,s.parseViewportMeta)(t.content);t.content=(0,s.serializeViewportMeta)(Object.assign(Object.assign({},n),e))}else{const t=document.createElement("meta");t.setAttribute("name","viewport"),t.setAttribute("content",(0,s.serializeViewportMeta)(e)),document.head.appendChild(t)}}updateUI(){this.styleString="";const e=document.getElementById(i.styleTagId);e&&e.remove();const t=Array.from(document.getElementsByTagName("img")),n=Array.from(document.getElementsByTagName("a"));this.options.allowDrag?[...t,...n].forEach((e=>{e.removeAttribute("draggable")})):[...t,...n].forEach((e=>{e.setAttribute("draggable","false")})),this.options.allowHighligt||(this.styleString+="\n body {\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -o-user-select: none;\n user-select: none;\n }\n "),this.options.allowScrollBounce||(this.styleString+="\n html {\n overscroll-behavior: none;\n }\n "),this.options.allowZoom||(this.styleString+="\n body {\n touch-action: pan-x pan-y;\n }\n ",this.updateViewportMeta({"user-scalable":"no"}));const s=document.createElement("style");s.textContent=this.styleString,s.setAttribute("id",i.styleTagId),document.body.appendChild(s),r.default.App.setStatusBar(this.options.statusBar),r.default.App.setSpinner(this.options.spinner),this.options.allowRotation?r.default.App.enableScreenRotation():r.default.App.disableScreenRotation()}}},593:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isRunningInApp=void 0,t.isRunningInApp=function(){return navigator.userAgent.toLowerCase().indexOf("starti.app")>-1}}},t={},function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}(607);var e,t}));
|