onboard.triptease.io
Open in
urlscan Pro
2606:4700:10::6816:2fa8
Public Scan
Submitted URL: https://static.triptease.io/client-integrations/platform/ihotelierv2.js
Effective URL: https://onboard.triptease.io/bootstrap/v5231.54110/bootstrap.js
Submission: On January 30 via api from US — Scanned from DE
Effective URL: https://onboard.triptease.io/bootstrap/v5231.54110/bootstrap.js
Submission: On January 30 via api from US — Scanned from DE
Form analysis
0 forms found in the DOMText Content
(()=>{var ti=Object.create;var ae=Object.defineProperty,ri=Object.defineProperties,hr=Object.getOwnPropertyDescriptor,ni=Object.getOwnPropertyDescriptors,ii=Object.getOwnPropertyNames,br=Object.getOwnPropertySymbols,si=Object.getPrototypeOf,vr=Object.prototype.hasOwnProperty,oi=Object.prototype.propertyIsEnumerable;var wr=(t,e,r)=>e in t?ae(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,q=(t,e)=>{for(var r in e||(e={}))vr.call(e,r)&&wr(t,r,e[r]);if(br)for(var r of br(e))oi.call(e,r)&&wr(t,r,e[r]);return t},ce=(t,e)=>ri(t,ni(e)),ai=t=>ae(t,"__esModule",{value:!0});var W=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var ci=(t,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ii(e))!vr.call(t,n)&&n!=="default"&&ae(t,n,{get:()=>e[n],enumerable:!(r=hr(e,n))||r.enumerable});return t},_=t=>ci(ai(ae(t!=null?ti(si(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),B=(t,e,r,n)=>{for(var i=n>1?void 0:n?hr(e,r):e,o=t.length-1,a;o>=0;o--)(a=t[o])&&(i=(n?a(e,r,i):a(i))||i);return n&&i&&ae(e,r,i),i};var u=(t,e,r)=>new Promise((n,i)=>{var o=d=>{try{c(r.next(d))}catch(m){i(m)}},a=d=>{try{c(r.throw(d))}catch(m){i(m)}},c=d=>d.done?n(d.value):Promise.resolve(d.value).then(o,a);c((r=r.apply(t,e)).next())});var Ae=W((ro,Pe)=>{var xr,Sr,Or,kr,Pr,Ar,Tr,Rr,Cr,Oe,ct,Er,Ir,ee,Mr,Lr,Hr,Dr,jr,qr,_r,Br,ke;(function(t){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&undefined?define("tslib",["exports"],function(n){t(r(e,r(n)))}):typeof Pe=="object"&&typeof Pe.exports=="object"?t(r(e,r(Pe.exports))):t(r(e));function r(n,i){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(o,a){return n[o]=i?i(o,a):a}}})(function(t){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])};xr=function(n,i){e(n,i);function o(){this.constructor=n}n.prototype=i===null?Object.create(i):(o.prototype=i.prototype,new o)},Sr=Object.assign||function(n){for(var i,o=1,a=arguments.length;o<a;o++){i=arguments[o];for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(n[c]=i[c])}return n},Or=function(n,i){var o={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&i.indexOf(a)<0&&(o[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,a=Object.getOwnPropertySymbols(n);c<a.length;c++)i.indexOf(a[c])<0&&Object.prototype.propertyIsEnumerable.call(n,a[c])&&(o[a[c]]=n[a[c]]);return o},kr=function(n,i,o,a){var c=arguments.length,d=c<3?i:a===null?a=Object.getOwnPropertyDescriptor(i,o):a,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(n,i,o,a);else for(var h=n.length-1;h>=0;h--)(m=n[h])&&(d=(c<3?m(d):c>3?m(i,o,d):m(i,o))||d);return c>3&&d&&Object.defineProperty(i,o,d),d},Pr=function(n,i){return function(o,a){i(o,a,n)}},Ar=function(n,i){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,i)},Tr=function(n,i,o,a){function c(d){return d instanceof o?d:new o(function(m){m(d)})}return new(o||(o=Promise))(function(d,m){function h(L){try{b(a.next(L))}catch(X){m(X)}}function R(L){try{b(a.throw(L))}catch(X){m(X)}}function b(L){L.done?d(L.value):c(L.value).then(h,R)}b((a=a.apply(n,i||[])).next())})},Rr=function(n,i){var o={label:0,sent:function(){if(d[0]&1)throw d[1];return d[1]},trys:[],ops:[]},a,c,d,m;return m={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function h(b){return function(L){return R([b,L])}}function R(b){if(a)throw new TypeError("Generator is already executing.");for(;o;)try{if(a=1,c&&(d=b[0]&2?c.return:b[0]?c.throw||((d=c.return)&&d.call(c),0):c.next)&&!(d=d.call(c,b[1])).done)return d;switch(c=0,d&&(b=[b[0]&2,d.value]),b[0]){case 0:case 1:d=b;break;case 4:return o.label++,{value:b[1],done:!1};case 5:o.label++,c=b[1],b=[0];continue;case 7:b=o.ops.pop(),o.trys.pop();continue;default:if(d=o.trys,!(d=d.length>0&&d[d.length-1])&&(b[0]===6||b[0]===2)){o=0;continue}if(b[0]===3&&(!d||b[1]>d[0]&&b[1]<d[3])){o.label=b[1];break}if(b[0]===6&&o.label<d[1]){o.label=d[1],d=b;break}if(d&&o.label<d[2]){o.label=d[2],o.ops.push(b);break}d[2]&&o.ops.pop(),o.trys.pop();continue}b=i.call(n,o)}catch(L){b=[6,L],c=0}finally{a=d=0}if(b[0]&5)throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}},Cr=function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&ke(i,n,o)},ke=Object.create?function(n,i,o,a){a===void 0&&(a=o),Object.defineProperty(n,a,{enumerable:!0,get:function(){return i[o]}})}:function(n,i,o,a){a===void 0&&(a=o),n[a]=i[o]},Oe=function(n){var i=typeof Symbol=="function"&&Symbol.iterator,o=i&&n[i],a=0;if(o)return o.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&a>=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},ct=function(n,i){var o=typeof Symbol=="function"&&n[Symbol.iterator];if(!o)return n;var a=o.call(n),c,d=[],m;try{for(;(i===void 0||i-- >0)&&!(c=a.next()).done;)d.push(c.value)}catch(h){m={error:h}}finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(m)throw m.error}}return d},Er=function(){for(var n=[],i=0;i<arguments.length;i++)n=n.concat(ct(arguments[i]));return n},Ir=function(){for(var n=0,i=0,o=arguments.length;i<o;i++)n+=arguments[i].length;for(var a=Array(n),c=0,i=0;i<o;i++)for(var d=arguments[i],m=0,h=d.length;m<h;m++,c++)a[c]=d[m];return a},ee=function(n){return this instanceof ee?(this.v=n,this):new ee(n)},Mr=function(n,i,o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=o.apply(n,i||[]),c,d=[];return c={},m("next"),m("throw"),m("return"),c[Symbol.asyncIterator]=function(){return this},c;function m(O){a[O]&&(c[O]=function(Y){return new Promise(function(it,ei){d.push([O,Y,it,ei])>1||h(O,Y)})})}function h(O,Y){try{R(a[O](Y))}catch(it){X(d[0][3],it)}}function R(O){O.value instanceof ee?Promise.resolve(O.value.v).then(b,L):X(d[0][2],O)}function b(O){h("next",O)}function L(O){h("throw",O)}function X(O,Y){O(Y),d.shift(),d.length&&h(d[0][0],d[0][1])}},Lr=function(n){var i,o;return i={},a("next"),a("throw",function(c){throw c}),a("return"),i[Symbol.iterator]=function(){return this},i;function a(c,d){i[c]=n[c]?function(m){return(o=!o)?{value:ee(n[c](m)),done:c==="return"}:d?d(m):m}:d}},Hr=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=n[Symbol.asyncIterator],o;return i?i.call(n):(n=typeof Oe=="function"?Oe(n):n[Symbol.iterator](),o={},a("next"),a("throw"),a("return"),o[Symbol.asyncIterator]=function(){return this},o);function a(d){o[d]=n[d]&&function(m){return new Promise(function(h,R){m=n[d](m),c(h,R,m.done,m.value)})}}function c(d,m,h,R){Promise.resolve(R).then(function(b){d({value:b,done:h})},m)}},Dr=function(n,i){return Object.defineProperty?Object.defineProperty(n,"raw",{value:i}):n.raw=i,n};var r=Object.create?function(n,i){Object.defineProperty(n,"default",{enumerable:!0,value:i})}:function(n,i){n.default=i};jr=function(n){if(n&&n.__esModule)return n;var i={};if(n!=null)for(var o in n)o!=="default"&&Object.prototype.hasOwnProperty.call(n,o)&&ke(i,n,o);return r(i,n),i},qr=function(n){return n&&n.__esModule?n:{default:n}},_r=function(n,i){if(!i.has(n))throw new TypeError("attempted to get private field on non-instance");return i.get(n)},Br=function(n,i,o){if(!i.has(n))throw new TypeError("attempted to set private field on non-instance");return i.set(n,o),o},t("__extends",xr),t("__assign",Sr),t("__rest",Or),t("__decorate",kr),t("__param",Pr),t("__metadata",Ar),t("__awaiter",Tr),t("__generator",Rr),t("__exportStar",Cr),t("__createBinding",ke),t("__values",Oe),t("__read",ct),t("__spread",Er),t("__spreadArrays",Ir),t("__await",ee),t("__asyncGenerator",Mr),t("__asyncDelegator",Lr),t("__asyncValues",Hr),t("__makeTemplateObject",Dr),t("__importStar",jr),t("__importDefault",qr),t("__classPrivateFieldGet",_r),t("__classPrivateFieldSet",Br)})});var Gr=W(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.sum=G.subtract=G.add=G.increment=void 0;function li(t){return t+1}G.increment=li;function di(t,e){return e===void 0?r=>t+r:t+e}G.add=di;function ui(t,e){return e===void 0?r=>r-t:t-e}G.subtract=ui;G.sum=(t,e)=>t+e});var ft=W(E=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0});E.AsyncSequence=E.Sequence=E.sequence=E.range=E.repeat=E.iterate=void 0;var lt=Gr(),Fr=gt(),dt=le();function*Te(t,e){for(;;)yield e,e=t(e)}E.iterate=Te;function*pi(t){for(;;)yield t()}E.repeat=pi;function*fi(t,e,r=1){if(r===0)throw new Error("step can not be 0");if(e===void 0)yield*Te(lt.add(r),t);else{let n=Math.abs(r);e<t?yield*ut(Te(lt.subtract(n),t),Fr.takeWhile(i=>i>=e)):yield*ut(Te(lt.add(n),t),Fr.takeWhile(i=>i<=e))}}E.range=fi;function ut(t,...e){return dt.isIterable(t)?new Re(t,e):dt.isArrayLike(t)?new Re(dt.iterable(t),e):new pt(t,e)}E.sequence=ut;var Re=class{constructor(e,r){this.source=e,this.transducers=r}[Symbol.iterator](){return this.transducers.reduce((e,r)=>r.sync(e),this.source)[Symbol.iterator]()}};E.Sequence=Re;var pt=class{constructor(e,r){this.source=e,this.transducers=r}[Symbol.asyncIterator](){return this.transducers.reduce((e,r)=>r.async_(e),this.source)[Symbol.asyncIterator]()}};E.AsyncSequence=pt});var le=W(v=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0});v.AsyncIteratorHandler=v.single=v.by=v.toAsyncIterable=v.array=v.isArrayLike=v.asyncIterable=v.iterable=v.toIterable=v.isPromiseLike=v.isAsyncIterable=v.isIterable=v.value=v.key=v.comparators=v.descending=v.ascending=void 0;var V=Ae(),Ce=ft();function Ee(t,e){return t<e?-1:t>e?1:0}v.ascending=Ee;function gi(t,e){return t<e?1:t>e?-1:0}v.descending=gi;function mi(...t){return(e,r)=>{for(let n of t){let i=n(e,r);if(i!=0)return i}return 0}}v.comparators=mi;function yi(t){return Object.assign(e=>e[t],{name:t})}v.key=yi;function hi(t){return e=>e[t]}v.value=hi;function mt(t){return typeof t=="object"&&Symbol.iterator in t}v.isIterable=mt;function bi(t){return typeof t=="object"&&Symbol.asyncIterator in t}v.isAsyncIterable=bi;function vi(t){return typeof t=="object"&&"then"in t}v.isPromiseLike=vi;function wi(...t){return t}v.toIterable=wi;function*xi(t){for(let e=0;e<t.length;e++)yield t[e]}v.iterable=xi;function Si(t){return V.__asyncGenerator(this,arguments,function*(){for(let r of t)yield yield V.__await(r)})}v.asyncIterable=Si;function Wr(t){return typeof t=="object"&&typeof t.length=="number"}v.isArrayLike=Wr;function Oi(t,...e){return mt(t)||Wr(t)?ki(Ce.sequence(t,...e)):Pi(Ce.sequence(t,...e))}v.array=Oi;function ki(t){let e=[];for(let r of t)e.push(r);return e}function Pi(t){var e,r,n,i;return V.__awaiter(this,void 0,void 0,function*(){let o=[];try{for(e=V.__asyncValues(t);r=yield e.next(),!r.done;){let a=r.value;o.push(a)}}catch(a){n={error:a}}finally{try{r&&!r.done&&(i=e.return)&&(yield i.call(e))}finally{if(n)throw n.error}}return o})}function Ai(t){return V.__asyncGenerator(this,arguments,function*(){yield yield V.__await(t)})}v.toAsyncIterable=Ai;function Ti(t,e=Ee){return typeof t=="function"?Ci(t,e):Ri(t,e)}v.by=Ti;function Ri(t,e=Ee){return(r,n)=>e(r[t],n[t])}function Ci(t,e=Ee){return(r,n)=>e(t(r),t(n))}function Ei(t,...e){return mt(t)?Ii(Ce.sequence(t,...e)):Mi(Ce.sequence(t,...e))}v.single=Ei;function Ii(t){for(let e of t)return e;throw new Error("Expected a single value")}function Mi(t){var e,r,n,i;return V.__awaiter(this,void 0,void 0,function*(){try{for(e=V.__asyncValues(t);r=yield e.next(),!r.done;)return r.value}catch(o){n={error:o}}finally{try{r&&!r.done&&(i=e.return)&&(yield i.call(e))}finally{if(n)throw n.error}}throw new Error("Expected a single value")})}var Ur=class{constructor(){this.handlers=[],this.state=[]}value(e){this.newState({value:e,done:!1})}error(e){this.newState(e)}close(){this.newState({value:void 0,done:!0})}[Symbol.asyncIterator](){return this}next(){return new Promise((e,r)=>{this.newHandler([e,r])})}newState(e){let r=this.handlers.shift();if(typeof r=="undefined")return this.state.push(e);let n=this.state.shift();if(typeof n=="undefined")return this.consume(e,r);this.consume(n,r),this.newState(e)}newHandler(e){let r=this.state.shift();if(typeof r=="undefined")return this.handlers.push(e);let n=this.handlers.shift();if(typeof n=="undefined")return this.consume(r,e);this.consume(r,n),this.newHandler(e)}consume(e,[r,n]){e instanceof Error?n(e):r(e)}};v.AsyncIteratorHandler=Ur});var de=W(K=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});K.container=K.lazy=K.replace=void 0;function zr(t,e,r){return Object.defineProperty(t,e,{value:r})}K.replace=zr;function Vr(t,e,r){if(typeof r.get=="undefined")throw new Error("@lazy can only decorate getter methods");return Object.defineProperty(t,e,Object.assign(Object.assign({},r),{get(){return zr(this,e,r.get.call(this))[e]}}))}K.lazy=Vr;function Li(t){return Object.keys(t).reduce((e,r)=>Vr(e,r,{configurable:!0,get:()=>t[r](e)}),{})}K.container=Li});var Yr=W(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.AVLTree=void 0;var Kr=Ae(),Ie=le(),$r=de(),F=class{constructor(e){this.comparator=e}static empty(e=Ie.ascending){return new Jr(e)}static create(e,r,n=Ie.ascending){let i=F.empty(n);return new H(n,e,r,i,i)}static of(e,r=Ie.ascending){return F.preSorted(e.sort(Ie.by(0)),r,F.empty(r))}static preSorted(e,r,n){let i=e.length;switch(i){case 0:return n;case 1:{let[[o,a]]=e;return new H(r,o,a,n,n)}default:{let o=Math.floor(i/2),a=F.preSorted(e.slice(0,o),r,n),c=F.preSorted(e.slice(o+1),r,n),[d,m]=e[o];return new H(r,d,m,a,c)}}}};Me.AVLTree=F;var Jr=class extends F{constructor(e){super(e);this.isEmpty=!0,this.height=0,this.balance=0}insert(e,r){return new H(this.comparator,e,r,this,this)}contains(e){return!1}lookup(e){}delete(e){return{tree:this}}first(){}last(){}removeFirst(){return{tree:this}}removeLast(){return{tree:this}}toString(){return""}*keys(){}*values(){}*entries(){return[]}},H=class extends F{constructor(e,r,n,i,o){super(e);this.key=r,this.value=n,this.left=i,this.right=o,this.isEmpty=!1}insert(e,r){let n=this.comparator(e,this.key);return n===0?new H(this.comparator,e,r,this.left,this.right):n<0?this.replaceLeft(this.left.insert(e,r)):this.replaceRight(this.right.insert(e,r))}contains(e){let r=this.comparator(e,this.key);return r===0?!0:r<0?this.left.contains(e):this.right.contains(e)}lookup(e){let r=this.comparator(e,this.key);return r===0?this.value:r<0?this.left.lookup(e):this.right.lookup(e)}delete(e){let r=this.comparator(e,this.key);if(r===0){if(this.left.isEmpty)return{tree:this.right,key:this.key,value:this.value};if(this.right.isEmpty)return{tree:this.left,key:this.key,value:this.value};let{tree:a,key:c,value:d}=this.left.removeLast();return{tree:yt(new H(this.comparator,c,d,a,this.right)),key:this.key,value:this.value}}if(r<0){let{tree:a,key:c,value:d}=this.left.delete(e);return{tree:this.replaceLeft(a),key:c,value:d}}let{tree:n,key:i,value:o}=this.right.delete(e);return{tree:this.replaceRight(n),key:i,value:o}}first(){return this.left.isEmpty?this.value:this.left.first()}last(){return this.right.isEmpty?this.value:this.right.last()}removeFirst(){if(this.left.isEmpty)return{tree:this.right,key:this.key,value:this.value};let{tree:e,key:r,value:n}=this.left.removeFirst();return{tree:this.replaceLeft(e),key:r,value:n}}removeLast(){if(this.right.isEmpty)return{tree:this.left,key:this.key,value:this.value};let{tree:e,key:r,value:n}=this.right.removeLast();return{tree:this.replaceRight(e),key:r,value:n}}replaceLeft(e){return yt(new H(this.comparator,this.key,this.value,e,this.right))}replaceRight(e){return yt(new H(this.comparator,this.key,this.value,this.left,e))}toString(){return`(${this.left} ${this.key}=${this.value} ${this.right})`}get balance(){return this.left.height-this.right.height}get height(){return Math.max(this.left.height,this.right.height)+1}*keys(){yield*this.left.keys(),yield this.key,yield*this.right.keys()}*values(){yield*this.left.values(),yield this.value,yield*this.right.values()}*entries(){yield*this.left.entries(),yield[this.key,this.value],yield*this.right.entries()}};Kr.__decorate([$r.lazy],H.prototype,"balance",null);Kr.__decorate([$r.lazy],H.prototype,"height",null);function yt(t){let e=t.balance;return e==-2?Di(t):e==2?Hi(t):t}function Hi(t){let e=t.left.balance;return e==-1?ji(t):e==1?Nr(t):t}function Di(t){let e=t.right.balance;return e==1?qi(t):e==-1?Zr(t):t}function Nr(t){return Xr(t)}function ji(t){let e=Qr(t.left);return Nr(t.replaceLeft(e))}function Zr(t){return Qr(t)}function qi(t){let e=Xr(t.right);return Zr(t.replaceRight(e))}function Qr(t){let e=t.right,r=e.left,n=t.replaceRight(r);return e.replaceLeft(n)}function Xr(t){let e=t.left,r=e.right,n=t.replaceLeft(r);return e.replaceRight(n)}});var gt=W(g=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});g.WindowedTransducer=g.windowed=g.unique=g.UniqueTransducer=g.dedupe=g.DedupTransducer=g.sort=g.SortTransducer=g.takeWhile=g.TakeWhileTransducer=g.dropWhile=g.DropWhileTransducer=g.drop=g.DropTransducer=g.take=g.TakeTransducer=g.reduce=g.scan=g.ScanTransducer=g.decompose=g.compose=g.CompositeTransducer=g.find=g.reject=g.filter=g.FilterTransducer=g.flatMap=g.FlatMapTransducer=g.zipWithIndex=g.zip=g.ZipTransducer=g.map=g.MapTransducer=g.last=g.LastTransducer=g.first=g.FirstTransducer=g.transducer=g.identity=g.IdentityTransducer=void 0;var f=Ae(),J=le(),en=Yr(),_i=ft(),ht=class{async_(e){return e}sync(e){return e}};g.IdentityTransducer=ht;function tn(){return new ht}g.identity=tn;g.transducer=tn;var bt=class{async_(e){return f.__asyncGenerator(this,arguments,function*(){var n,i;try{for(var o=f.__asyncValues(e),a;a=yield f.__await(o.next()),!a.done;){let c=a.value;return yield f.__await(yield yield f.__await(c))}}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=o.return)&&(yield f.__await(i.call(o)))}finally{if(n)throw n.error}}})}*sync(e){for(let r of e)return yield r}};g.FirstTransducer=bt;function rn(){return new bt}g.first=rn;var vt=class{async_(e){return f.__asyncGenerator(this,arguments,function*(){var n,i;let o;try{for(var a=f.__asyncValues(e),c;c=yield f.__await(a.next()),!c.done;)o=c.value}catch(d){n={error:d}}finally{try{c&&!c.done&&(i=a.return)&&(yield f.__await(i.call(a)))}finally{if(n)throw n.error}}o!==void 0&&(yield yield f.__await(o))})}*sync(e){let r;for(r of e);r!==void 0&&(yield r)}};g.LastTransducer=vt;function nn(){return new vt}g.last=nn;var wt=class{constructor(e){this.mapper=e}async_(e){return f.__asyncGenerator(this,arguments,function*(){var n,i;try{for(var o=f.__asyncValues(e),a;a=yield f.__await(o.next()),!a.done;){let c=a.value;yield yield f.__await(this.mapper(c))}}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=o.return)&&(yield f.__await(i.call(o)))}finally{if(n)throw n.error}}})}*sync(e){for(let r of e)yield this.mapper(r)}};g.MapTransducer=wt;function Bi(t){return new wt(t)}g.map=Bi;var Le=class{constructor(e){this.other=e}async_(e){return f.__asyncGenerator(this,arguments,function*(){if(!J.isAsyncIterable(this.other))throw new Error("Unsupported operation exception");let n=e[Symbol.asyncIterator](),i=this.other[Symbol.asyncIterator]();for(;;){let[o,a]=yield f.__await(Promise.all([n.next(),i.next()]));if(o.done||a.done)return yield f.__await(void 0);yield yield f.__await([o.value,a.value])}})}*sync(e){if(!J.isIterable(this.other))throw new Error("Unsupported operation exception");let r=e[Symbol.iterator](),n=this.other[Symbol.iterator]();for(;;){let i=r.next(),o=n.next();if(i.done||o.done)return;yield[i.value,o.value]}}};g.ZipTransducer=Le;function Gi(t){return new Le(t)}g.zip=Gi;function Fi(){return new Le(_i.range(0))}g.zipWithIndex=Fi;var xt=class{constructor(e){this.mapper=e}async_(e){return f.__asyncGenerator(this,arguments,function*(){var n,i;try{for(var o=f.__asyncValues(e),a;a=yield f.__await(o.next()),!a.done;){let c=a.value;yield f.__await(yield*f.__asyncDelegator(f.__asyncValues(this.mapper(c))))}}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=o.return)&&(yield f.__await(i.call(o)))}finally{if(n)throw n.error}}})}*sync(e){for(let r of e)yield*this.mapper(r)}};g.FlatMapTransducer=xt;function Wi(t){return new xt(t)}g.flatMap=Wi;var He=class{constructor(e){this.predicate=e}async_(e){return f.__asyncGenerator(this,arguments,function*(){var n,i;try{for(var o=f.__asyncValues(e),a;a=yield f.__await(o.next()),!a.done;){let c=a.value;this.predicate(c)&&(yield yield f.__await(c))}}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=o.return)&&(yield f.__await(i.call(o)))}finally{if(n)throw n.error}}})}*sync(e){for(let r of e)this.predicate(r)&&(yield r)}};g.FilterTransducer=He;function sn(t){return new He(t)}g.filter=sn;function Ui(t){return new He(e=>!t(e))}g.reject=Ui;function zi(t){return St(sn(t),rn())}g.find=zi;var De=class{constructor(e,r){this.a=e,this.b=r}async_(e){return this.b.async_(this.a.async_(e))}sync(e){return this.b.sync(this.a.sync(e))}};g.CompositeTransducer=De;function St(t,e){return new De(t,e)}g.compose=St;function*Ot(t){t instanceof De?(yield*Ot(t.a),yield*Ot(t.b)):yield t}g.decompose=Ot;var kt=class{constructor(e,r){this.reducer=e,this.seed=r}async_(e){return f.__asyncGenerator(this,arguments,function*(){var n,i;let o=this.seed;yield yield f.__await(o);try{for(var a=f.__asyncValues(e),c;c=yield f.__await(a.next()),!c.done;){let d=c.value;yield yield f.__await(o=this.reducer(o,d))}}catch(d){n={error:d}}finally{try{c&&!c.done&&(i=a.return)&&(yield f.__await(i.call(a)))}finally{if(n)throw n.error}}})}*sync(e){let r=this.seed;yield r;for(let n of e)yield r=this.reducer(r,n)}};g.ScanTransducer=kt;function on(t,e){return new kt(t,e)}g.scan=on;function Vi(t,e){return St(on(t,e),nn())}g.reduce=Vi;var Pt=class{constructor(e){if(this.count=e,typeof e=="undefined")throw new Error("Count can not be undefined")}async_(e){return f.__asyncGenerator(this,arguments,function*(){var n,i;if(this.count<1)return yield f.__await(void 0);try{for(var o=f.__asyncValues(e),a;a=yield f.__await(o.next()),!a.done;){let c=a.value;if(yield yield f.__await(c),--this.count<1)return yield f.__await(void 0)}}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=o.return)&&(yield f.__await(i.call(o)))}finally{if(n)throw n.error}}})}*sync(e){if(!(this.count<1)){for(let r of e)if(yield r,--this.count<1)return}}};g.TakeTransducer=Pt;function Ki(t){return new Pt(t)}g.take=Ki;var At=class{constructor(e){if(this.count=e,typeof e=="undefined")throw new Error("Count can not be undefined")}async_(e){return f.__asyncGenerator(this,arguments,function*(){var n,i;try{for(var o=f.__asyncValues(e),a;a=yield f.__await(o.next()),!a.done;){let c=a.value;--this.count<0&&(yield yield f.__await(c))}}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=o.return)&&(yield f.__await(i.call(o)))}finally{if(n)throw n.error}}})}*sync(e){for(let r of e)--this.count<0&&(yield r)}};g.DropTransducer=At;function $i(t){return new At(t)}g.drop=$i;var Tt=class{constructor(e){this.predicate=e}async_(e){return f.__asyncGenerator(this,arguments,function*(){var n,i;let o=!0;try{for(var a=f.__asyncValues(e),c;c=yield f.__await(a.next()),!c.done;){let d=c.value;o&&(o=this.predicate(d)),o||(yield yield f.__await(d))}}catch(d){n={error:d}}finally{try{c&&!c.done&&(i=a.return)&&(yield f.__await(i.call(a)))}finally{if(n)throw n.error}}})}*sync(e){let r=!0;for(let n of e)r&&(r=this.predicate(n)),r||(yield n)}};g.DropWhileTransducer=Tt;function Ji(t){return new Tt(t)}g.dropWhile=Ji;var Rt=class{constructor(e){this.predicate=e}async_(e){return f.__asyncGenerator(this,arguments,function*(){var n,i;try{for(var o=f.__asyncValues(e),a;a=yield f.__await(o.next()),!a.done;){let c=a.value;if(this.predicate(c))yield yield f.__await(c);else return yield f.__await(void 0)}}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=o.return)&&(yield f.__await(i.call(o)))}finally{if(n)throw n.error}}})}*sync(e){for(let r of e)if(this.predicate(r))yield r;else return}};g.TakeWhileTransducer=Rt;function Ni(t){return new Rt(t)}g.takeWhile=Ni;var Ct=class{constructor(e){this.comparator=e}async_(e){return f.__asyncGenerator(this,arguments,function*(){let n=yield f.__await(J.array(e));n.sort(this.comparator),yield f.__await(yield*f.__asyncDelegator(f.__asyncValues(n)))})}*sync(e){let r=J.array(e);r.sort(this.comparator),yield*r}};g.SortTransducer=Ct;function Zi(t=J.ascending){return new Ct(t)}g.sort=Zi;var Et=class{constructor(e){this.comparator=e}async_(e){return f.__asyncGenerator(this,arguments,function*(){var n,i;let o;try{for(var a=f.__asyncValues(e),c;c=yield f.__await(a.next()),!c.done;){let d=c.value;typeof o=="undefined"?yield yield f.__await(d):this.comparator(d,o)!==0&&(yield yield f.__await(d)),o=d}}catch(d){n={error:d}}finally{try{c&&!c.done&&(i=a.return)&&(yield f.__await(i.call(a)))}finally{if(n)throw n.error}}})}*sync(e){let r;for(let n of e)typeof r=="undefined"?yield n:this.comparator(n,r)!==0&&(yield n),r=n}};g.DedupTransducer=Et;function Qi(t=J.ascending){return new Et(t)}g.dedupe=Qi;var It=class{constructor(e){this.comparator=e}async_(e){return f.__asyncGenerator(this,arguments,function*(){var n,i;let o=en.AVLTree.empty(this.comparator);try{for(var a=f.__asyncValues(e),c;c=yield f.__await(a.next()),!c.done;){let d=c.value;o.contains(d)||(o=o.insert(d,void 0),yield yield f.__await(d))}}catch(d){n={error:d}}finally{try{c&&!c.done&&(i=a.return)&&(yield f.__await(i.call(a)))}finally{if(n)throw n.error}}})}*sync(e){let r=en.AVLTree.empty(this.comparator);for(let n of e)r.contains(n)||(r=r.insert(n,void 0),yield n)}};g.UniqueTransducer=It;function Xi(t=J.ascending){return new It(t)}g.unique=Xi;function Yi(t,e=1,r=!1){return new Mt(t,e,r)}g.windowed=Yi;var Mt=class{constructor(e,r,n){this.size=e,this.step=r,this.remainder=n}async_(e){return f.__asyncGenerator(this,arguments,function*(){var n,i;let o=[],a=0;try{for(var c=f.__asyncValues(e),d;d=yield f.__await(c.next()),!d.done;){let m=d.value;if(a>0){a--;continue}o.push(m),o.length===this.size&&(yield yield f.__await([...o]),o=o.slice(this.step),this.step>this.size&&(a=this.step-this.size))}}catch(m){n={error:m}}finally{try{d&&!d.done&&(i=c.return)&&(yield f.__await(i.call(c)))}finally{if(n)throw n.error}}this.remainder&&(yield yield f.__await([...o]))})}*sync(e){let r=[],n=0;for(let i of e){if(n>0){n--;continue}r.push(i),r.length===this.size&&(yield[...r],r=r.slice(this.step),this.step>this.size&&(n=this.step-this.size))}this.remainder&&(yield[...r])}};g.WindowedTransducer=Mt});var qe=W(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.caching=te.cache=void 0;function ns(t,e,r){if(typeof r.value!="function")throw new Error("@cache can only decorate methods");let n=new WeakMap;function i(o){let a=n.get(o);if(a)return a;let c=new Map;return n.set(o,c),c}return Object.defineProperty(t,e,Object.assign(Object.assign({},r),{value:function(...o){let a=JSON.stringify(o),c=i(this),d=c.get(a);if(typeof d!="undefined"||c.has(a))return d;let m=r.value.call(this,...o);return c.set(a,m),m}}))}te.cache=ns;function is(t){let e=new Map;return function(...r){let n=JSON.stringify(r),i=e.get(n);if(typeof i!="undefined"||e.has(n))return i;let o=t(...r);return e.set(n,o),o}}te.caching=is});var _t=W(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.StoppedClock=ne.SystemClock=void 0;var Pn=class{now(){return new Date}};ne.SystemClock=Pn;var An=class{constructor(e){this.value=e}now(){return this.value}};ne.StoppedClock=An});var ot=class{constructor(e){let r=ot.RFC_3986.exec(e);if(!r)throw new Error(`Invalid Uri: ${e}`);let[,,n,,i,o,,a,,c]=r;this.scheme=n,this.authority=i?new st(i):void 0,this.path=o,this.query=a,this.fragment=c}toString(){let e=[];return typeof this.scheme!="undefined"&&e.push(this.scheme,":"),typeof this.authority!="undefined"&&e.push("//",this.authority.toString()),e.push(this.path),typeof this.query!="undefined"&&e.push("?",this.query),typeof this.fragment!="undefined"&&e.push("#",this.fragment),e.join("")}get host(){return this.authority&&this.authority.host}get port(){return this.authority&&this.authority.port}get userInfo(){return this.authority&&this.authority.userInfo}},C=ot;C.RFC_3986=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;var at=class{constructor(e){let r=at.RFC_3986.exec(e);if(!r)throw new Error(`Invalid Authority: ${e}`);let[,n,i,o]=r;this.userInfo=n,this.host=i,this.port=o}toString(){let e=[];return typeof this.userInfo!="undefined"&&e.push(this.userInfo,"@"),typeof this.host!="undefined"&&e.push(this.host),typeof this.port!="undefined"&&e.push(":",this.port),e.join("")}},st=at;st.RFC_3986=/(?:([^@]+)@)?([^:]+)(?::([\d]+))?/;var an=_(gt()),es=_(le());function ts(t){switch(typeof t){case"undefined":return!0;case"string":return t.trim()==="";case"number":return isNaN(t);case"object":{if(t==null)return!0;if(x.isObject(t))return Object.keys(t).length===0;if(Array.isArray(t))return t.length===0}}return!1}var U=class{static noWhitespace(e){return e&&typeof e=="string"?e.replace(/\s+/g,""):""}static startWith(e,r){return e?e.substring(0,r.length)===r:e===r}static endsWith(e,r){return e.substring(e.length-r.length,e.length)===r}static isEmpty(e){return e===void 0||e===null?!0:e.trim().length===0}static isLowerCase(e){return e===e.toLowerCase()&&e!==e.toUpperCase()}static isUpperCase(e){return e===e.toUpperCase()&&e!==e.toLowerCase()}static kebabCase(e){return U.delimiterCase(e,"-")}static snakeCase(e){return U.delimiterCase(e,"_")}static delimiterCase(e,r){return e.replace(/([A-Z][a-z]+|\d+)/gm,`${r}$1`).replace(new RegExp(`^${r}`),"").toLowerCase()}static titleCase(e){return e.replace(/\w\S*/g,r=>r.charAt(0).toUpperCase()+r.substr(1).toLowerCase())}},x=class{static isObject(e){return e&&typeof e=="object"&&(e.constructor===Object||/Object.*native/.test(e.constructor.toString()))}static keys(e){return Object.keys(e)}static values(e){return Object.keys(e).map(r=>e[r])}static entries(e){return Object.keys(e).map(r=>[r,e[r]])}static removeEmpty(e){return e&&(x.isObject(e)?Object.keys(e).reduce((r,n)=>{let i=x.removeEmpty(e[n]);return ts(i)||(r[n]=i),r},{}):e)}static sort(e){return e&&(Array.isArray(e)?e.map(x.sort):x.isObject(e)?Object.keys(e).sort().reduce((r,n)=>{let i=e[n];return r[n]=x.sort(i),r},{}):e)}static toLowerCase(e){return typeof e=="string"?e.toLowerCase():Array.isArray(e)?e.map(x.toLowerCase):p(()=>x.isObject(e))?Object.entries(e).reduce((r,[n,i])=>(r[n]=x.toLowerCase(i),r),{}):e}static filter(e,r){let n=x.keys(e).filter(r);return x.pick(e,...n)}static omit(e,...r){return r.reduce((n,i)=>(Reflect.deleteProperty(n,i),n),e)}static pick(e,...r){return r.reduce((n,i)=>(n[i]=e[i],n),{})}};var k=class{static from(e){return Array.from(e)}static find(e,r){if(e.find)return e.find(r);let[n]=e.filter(r);return n}static toObject(e){return e.reduce((r,n)=>(Object.keys(n).forEach(i=>{i in r||(r[i]=n[i])}),r),{})}static flatten(e){return e.reduce((r,n)=>r.concat(n),[])}static flatMap(e,r){return e.flatMap?e.flatMap(r):k.flatten(e.map(r))}static unique(e){return Array.from(new Set(e))}static clean(e){return e.filter(Boolean)}static trim(e){return e.map(r=>r.trim())}static includes(e,r){return"includes"in e?e.includes(r):e.indexOf(r)!==-1}static first(e){return e[0]}static last(e){return e[e.length-1]}static safeReverse(e){return e?e.slice().reverse():[]}};function p(t,e=void 0){try{let r=t();return typeof r=="undefined"?e:r}catch(r){return e}}function cn(t,e=void 0){return u(this,null,function*(){try{let r=yield t();return typeof r=="undefined"?e:r}catch(r){return e}})}function rs(t,e){let r=e.toLowerCase(),n=k.find(Object.keys(t),o=>o.toLowerCase()===r);if(!n)return;let i=t[n];return typeof i=="string"?i.trim():i}function je(t,...e){if(!t)return[];if(Array.isArray(t))return k.clean(k.flatten(t.map(r=>je(r,...e))));if(typeof t=="object"){let[r,...n]=e,i=rs(t,r);return typeof i=="object"?je(i,...n):n.length===0&&Boolean(i)?[i]:[]}return[]}var P=(()=>typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof module!="undefined"?module:Function("return this")())();function ln(t,e,r){let n=t[e];return typeof n=="undefined"?t[e]=r:Array.isArray(n)?n.indexOf(r)==-1&&n.push(r):t[e]=[n,r],t}var dn=_(qe()),un=_(de());function A(t=P){return t.triptease=t.triptease||{},t.triptease.onboard=t.triptease.onboard||{},{triptease:t.triptease,onboard:t.triptease.onboard}}var N;(function(n){n.Native="native",n.NonNative="non-native",n.NotImplemented="not-implemented"})(N||(N={}));function pn(t,e){return p(()=>e.split(".").reduce((r,n)=>r[n],t))}function ss(t){return t==null?N.NotImplemented:typeof t=="function"?t.toString().includes("native code")?N.Native:N.NonNative:N.Native}var _e=class{static exposeApi(){let e=A(P).triptease;e.native||(e.native=_e)}static getProperty(e){let r=pn(P,e);return ss(r)!==N.NonNative?r:pn(_e.window,e)}static get window(){let e=P;if(!e.document)return e;try{let r=e.document,n=r.querySelector("[name='triptease.native']");if(n)return n.contentWindow;let i=r.createElement("iframe");return i.style.display="none",i.setAttribute("title","blank"),i.setAttribute("aria-hidden","true"),i.setAttribute("name","triptease.native"),r.documentElement.appendChild(i),i.contentWindow}catch(r){return e}}},T=_e;B([dn.cache],T,"getProperty",1),B([un.lazy],T,"window",1);var os=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}\.\d{3}Z)?$/;function as(t){return Be(t,e=>typeof e=="string"&&os.test(e),e=>{let r=new Date(e);return isNaN(r.valueOf())?e:r})}function Be(t,e,r){if(e(t))return r(t);switch(typeof t){case"undefined":return;case"object":{if(t===null)return null;if(Array.isArray(t))return t.map(n=>Be(n,e,r));if(x.isObject(t))return x.keys(t).sort().reduce((n,i)=>{let o=t[i];return n[i]=Be(o,e,r),n},{})}}return t}var cs=T.getProperty("JSON.parse"),ls=T.getProperty("JSON.stringify"),ds=T.getProperty("Date.prototype.toISOString"),I=class{static parse(e){return cs(e)}static parseWithDates(e){return as(I.parse(e))}static stringify(e){return ls(this.clean(e))}static clean(e){return Be(e,r=>{let n=typeof r;switch(n){case"undefined":case"string":case"number":case"boolean":return!0;case"object":{if(r===null)return!0;if(Array.isArray(r)||x.isObject(r))return!1;if("toJSON"in r)return!0}}throw new Error(`Illegal JsonValue: ${n} ${r} `)},r=>r instanceof Date?ds.call(r):r)}},M=class{static same(e,r){return I.stringify(e)===I.stringify(r)}static isSuperset(e,r){return e===null||r===null?M.same(e,r):Array.isArray(e)&&Array.isArray(r)?e.length>r.length?!1:e.every(n=>r.some(i=>M.isSuperset(n,i))):p(()=>x.isObject(e))&&p(()=>x.isObject(r))?Object.keys(e).reduce((n,i)=>n&&M.isSuperset(e[i],r[i]),!0):M.same(e,r)}static compress(e){let r=M.groupValues(e);return this.compressGrouped(r)}static compressGrouped(e){return Object.entries(e).reduce(({shared:r,unique:n},[i,o])=>{if(p(()=>x.isObject(o))){let a=M.compressGrouped(o);Object.keys(a.shared).length>0&&(r[i]=a.shared),a.unique.forEach((c,d)=>{n[d]=n[d]||{},Object.keys(c).length>0&&(n[d][i]=c)})}return Array.isArray(o)&&o.forEach((a,c)=>{n[c]=n[c]||{},k.unique(o.map(d=>I.stringify(d))).length===1?r[i]=a:a!==void 0&&(n[c][i]=a)}),{shared:r,unique:n}},{shared:{},unique:[]})}static groupValues(e){let r=Array.from(e.reduce((a,c)=>Object.keys(c).reduce((d,m)=>d.add(m),a),new Set)),[n,i]=e.reduce((a,c)=>r.reduce(([d,m],h)=>{let R=c[h];return p(()=>x.isObject(R))?(m[h]=m[h]||[],m[h].push(R)):(d[h]=d[h]||[],d[h].push(R)),[d,m]},a),[{},{}]),o=Object.entries(i).reduce((a,[c,d])=>(a[c]=M.groupValues(d),a),{});return q(q({},n),o)}static decompress(e){return e.unique.map(r=>this.merge(e.shared,r))}static merge(e,r){return[...Object.keys(e),...Object.keys(r)].reduce((i,o)=>{let a=e[o],c=r[o];return p(()=>x.isObject(a))&&p(()=>x.isObject(c))?i[o]=M.merge(a,c):i[o]=c!=null?c:a,i},{})}};function z(t,e=!0){return t?(t.indexOf("?")==0&&(t=t.substring(1,t.length)),t.split("&").map(function(r){return r.split("=")}).reduce(function(r,n){let i=n[0],o=n[1];if(!i)return r;let a=fn(o),c=e?us(a):a;return ln(r,fn(i),c)},{})):{}}function fn(t){return p(()=>decodeURIComponent(t.replace(/\+/g,"%20")),t)}function us(t){try{return I.parse(t)}catch(e){return t}}function ps(t){return typeof t=="string"?t:JSON.stringify(t)}function gn(t,e=!0){return Object.keys(x.removeEmpty(t)).map(r=>{let n=t[r],i=e?ps(n):n;return`${r}=${encodeURIComponent(i)}`}).join("&")}var mn=T.getProperty("console.log"),fs=T.getProperty("console.error"),gs=T.getProperty("console.debug"),yn=class{constructor(e=mn,r=fs,n=gs||mn){this.log=e;this.error=r;this.debug=n}},hn=class{constructor(){this.log=()=>{};this.error=()=>{};this.debug=()=>{}}},Ge="triptease-debug",ms=256;function Fe(t,e=Ge){let r=p(()=>{var n;return z((n=t.location)==null?void 0:n.search,!1)[e]})||p(()=>{var n;return z(new C((n=t.location)==null?void 0:n.originalHref).query,!1)[e]})||p(()=>{var n,i;return(i=(n=t.process)==null?void 0:n.env)==null?void 0:i.DEBUG})||p(()=>{var n;return((n=t.localStorage)==null?void 0:n.getItem)&&t.localStorage.getItem(e)})||p(()=>{var n;return((n=t.sessionStorage)==null?void 0:n.getItem)&&t.sessionStorage.getItem(e)})||"";return p(()=>r.substring(0,ms),"")}function bn(t=P){let e=Fe(t,Ge);return U.isEmpty(e)?"":gn({[Ge]:e})}function ys(t){return Fe(t,Ge).split(",").map(e=>e.trim())}function vn(t){let e=t.replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp("^"+e+"$")}function hs(t,e=P){try{let r=ys(e),n=r.filter(i=>i[0]==="!").map(i=>i.substr(1));return n.length>0?!n.some(i=>vn(i).test(t)):r.some(i=>i==="true"||vn(i).test(t))}catch(r){return!1}}var wn=class{constructor(e){this.name=e;this.console=new yn}debug(e,...r){this.console.debug(`[${this.name}] ${e}`,...r)}log(e,...r){this.console.log(`[${this.name}] ${e}`,...r)}error(e,...r){this.console.error(`[${this.name}] ${e}`,...r)}};function w(t,e=P){return hs(t,e)?new wn(t):new hn}function bs(t){try{let{target:e,method:r}=Ht(t.type);if(e&&r)return!0}catch(e){}return!1}var Lt=class{constructor(e,r){this.name=e;this.trackingApi=r;this.logger=w(e)}debug(e,...r){this.logger.debug(e,...r)}error(e,...r){this.logger.error(e,...r);try{this.trackingApi.trackError({name:this.name,message:e,args:r.map(n=>ue(n)?xs(n):n)})}catch(n){this.logger.error("Failed to track error",n)}}log(e,...r){this.logger.log(e,...r)}};var re=class{constructor(e,r,n=vs,i=w("messaging")){this.listener=e;this.target=r;this.allowedOrigins=n;this.logger=i}addListener(e){this.listener&&this.listener.addEventListener("message",r=>{this.disallowedOrigin(r)||!bs(r.data)||e(r.data,new re(void 0,r.source||this.target))})}disallowedOrigin(e){return e.origin&&this.allowedOrigins.length>0&&this.allowedOrigins.indexOf(new C(e.origin).host)===-1}send(e){if(this.target)try{this.target.postMessage(e,"*")}catch(r){this.target.postMessage(JSON.parse(JSON.stringify(e)),"*")}}},vs=["onboard.triptease.io","localhost"],ws=/^(.*)\.([^.]+)$/;function Ht(t){let[,e,r]=t.match(ws)||[];return{target:e,method:r}}function Dt(t){let e={};return function(...r){let n=JSON.stringify(r),i=e[n];return typeof i!="undefined"?i:e[n]=t(...r)}}function ue(t){return t&&typeof t=="object"&&"name"in t&&typeof t.name=="string"&&"message"in t&&typeof t.message=="string"&&"stack"in t&&typeof t.stack=="string"}function xs(t){return{name:t.name,message:t.message,stack:t.stack}}function jt(t,e,r){return{name:t,message:e,stack:r!=null?r:""}}var Do=new Set(["Unknown","PossibleIdentifier"]),jo=new Set(["HotelName","HotelCode","ChainCode"]);var D;(function(c){c.Search="Search",c.RoomsAndRates="RoomsAndRates",c.Confirmation="Confirmation",c.Payment="Payment",c.Group="Group",c.Partial="Partial",c.Unknown="Unknown"})(D||(D={}));var qo=[D.Payment,D.Confirmation,D.RoomsAndRates,D.Search,D.Partial,D.Group,D.Unknown];var xn;(function(n){n.Singleton="Singleton",n.ApplicationHost="ApplicationHost",n.DataSource="DataSource"})(xn||(xn={}));var Sn="triptease.onboard.kernel";var Z=class{static get(){return p(()=>{let e="5231.54110";return e?"v"+e:"latest"})}};var qt=class{static application(e){let r=bn();return{name:Sn,url:`https://onboard.triptease.io/kernel/${Z.get()}/kernel-host.html?originHost=${e}${r?"&"+r:""}`,type:"iframe",startMessage:"triptease.onboard.kernel-host-started",enabled:!0}}};function We(r){return u(this,arguments,function*(t,e={credentials:!1}){if(typeof fetch!="undefined"){let n=yield fetch(t.url,{method:t.method,headers:t.headers,body:t.body,credentials:e.credentials?"include":"omit"});return{status:n.status,statusDescription:n.statusText,body:yield n.text()}}else{let n=new XMLHttpRequest;return n.open(t.method,t.url,!0),t.headers&&Object.keys(t.headers).forEach(i=>{n.setRequestHeader(i,t.headers[i])}),n.withCredentials=e.credentials,n.send(t.body),new Promise((i,o)=>{n.addEventListener("load",a=>{i({status:n.status,statusDescription:n.statusText,body:n.responseText})}),n.addEventListener("error",a=>{o(a)})})}})}var On=_(qe());var kn=class{constructor(e){this.logger=e;this.workers={}}createWorker(e,r){return u(this,null,function*(){let n=this.workers[e];return n||(this.workers[e]=yield this.create(r,{name:e}))})}create(e,r){return u(this,null,function*(){try{return new Worker(e,r)}catch(n){this.logger.debug("Failed to create Worker switching to Blob Worker because:",n.message);let i=`location.originalHref = "${e}"; `,a=(yield We({method:"GET",url:e})).body,c=new Blob([i,a],{type:"application/javascript"});return new Worker(URL.createObjectURL(c),r)}})}},ze=class{constructor(e,r=w("application-starter"),n=new kn(r),i=new Ue(e,r)){this.window=e;this.logging=r;this.workerFactory=n;this.waiter=i}start(e){return u(this,null,function*(){this.logging.debug(`ApplicationStarter starting app "${e.name}" (${e.type}), ${e.url}`);let r=this.window.document;if(e.type==="worker"){let o=yield this.workerFactory.createWorker(e.name,e.url);return e.startMessage&&(yield this.waiter.waitForMessage(e.startMessage,o)),this.logging.debug("ApplicationStarter returning worker"),o}let n=r.createElement(e.type);n.setAttribute("name",e.name),n.src=e.url;let i=ze.DefaultOptions[e.type]||{};return Object.keys(i).forEach(o=>{n.setAttribute(o.toLowerCase(),i[o])}),this.addElement(n),e.startMessage?yield this.waiter.waitForMessage(e.startMessage):e.type==="script"&&(yield this.waiter.waitForLoadEvent(n)),n})}addElement(e){(this.window.document.body||this.window.document.documentElement).appendChild(e)}static create(e){var n;let r=A(e).triptease.onboard;return r.applicationStarter=(n=r.applicationStarter)!=null?n:new ze(e)}},Q=ze;Q.DefaultOptions={script:{defer:"",async:"",crossOrigin:"anonymous"},iframe:{style:"display: none;",sandbox:"allow-scripts allow-same-origin",title:"blank","aria-hidden":"true"}},B([On.cache],Q.prototype,"start",1);var Ue=class{constructor(e,r){this.window=e;this.logging=r}waitForLoadEvent(e){return this.logging.debug("MessageWaiter waiting for load/error event for",e),new Promise((r,n)=>{e.addEventListener("load",r),e.addEventListener("error",i=>n({name:"ScriptError",message:i.message||`Failed to load script "${e.src}"`}))})}waitForMessage(e,r=this.window){return this.logging.debug("MessageWaiter waiting for message",e),new Promise(n=>{this.logging.debug("MessageWaiter creating handler");let i=o=>{try{let a=o.data&&o.data.type,c=a===e;this.logging.debug(`ApplicationStarter message received "${a}", expecting "${e}", matched: ${c}`),c&&(r.removeEventListener("message",i),n(o.data))}catch(a){this.logging.debug("ApplicationStarter error in parsing message",a,o)}};this.logging.debug("MessageWaiter adding listener"),r.addEventListener("message",i)})}};var Tn=_(_t());var pe=class{generate(e){return Cn(e)()}};function Bt(t){let e=new Error(t);return e.source="ulid",e}var Gt="0123456789ABCDEFGHJKMNPQRSTVWXYZ",fe=Gt.length,Rn=Math.pow(2,48)-1,Ve=10;function Ss(t){let e=Math.floor(t()*fe);return e===fe&&(e=fe-1),Gt.charAt(e)}function Os(t,e){if(isNaN(t))throw new Error(t+" must be a number");if(t>Rn)throw Bt("cannot encode time greater than "+Rn);if(t<0)throw Bt("time must be positive");if(!Number.isInteger(t))throw Bt("time must be an integer");let r,n="";for(;e>0;e--)r=t%fe,n=Gt.charAt(r)+n,t=(t-r)/fe;return n}function ks(t,e){let r="";for(;t>0;t--)r=Ss(e)+r;return r}var Ps=P;function As(t=Ps.crypto){return()=>{try{let e=new Uint8Array(1);return t.getRandomValues(e),e[0]/255}catch(e){return Math.random()}}}function Ts(t){if(t<Ve)throw new Error(`Length must be at least ${Ve} characters`);return t-Ve}function Cn(t=26,e=new Tn.SystemClock,r=As()){return function(i){return(i===void 0||isNaN(i))&&(i=e.now().getTime()),Os(i,Ve)+ks(Ts(t),r)}}var Yo=Cn();var En=_(_t());var Ft=class{constructor(e,r=new En.SystemClock,n=We,i=new pe){this.window=e;this.clock=r;this.httpClient=n;this.idGenerator=i;this.domainUserIdName="tt-domain-user-id"}getIdentity(){return u(this,null,function*(){let e=yield this.httpClient({url:"https://api.triptease.io/identity-service/identity",method:"GET"},{credentials:!0}),r=I.parseWithDates(e.body),n=p(()=>{let i=r.serverTime;return this.clock.now().getTime()-i.getTime()});return delete r.serverTime,ce(q({},r),{domainUserId:this.getDomainId(),timeOffset:n})})}getDomainId(){try{let r=this.window.localStorage.getItem(this.domainUserIdName);if(r)return r}catch(r){}let e=this.idGenerator.generate();try{this.window.localStorage.setItem(this.domainUserIdName,e)}catch(r){}return e}};var Ke,Rs=new Uint8Array(16);function Wt(){if(!Ke&&(Ke=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Ke))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ke(Rs)}var In=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Cs(t){return typeof t=="string"&&In.test(t)}var Mn=Cs;var S=[];for($e=0;$e<256;++$e)S.push(($e+256).toString(16).substr(1));var $e;function Es(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(S[t[e+0]]+S[t[e+1]]+S[t[e+2]]+S[t[e+3]]+"-"+S[t[e+4]]+S[t[e+5]]+"-"+S[t[e+6]]+S[t[e+7]]+"-"+S[t[e+8]]+S[t[e+9]]+"-"+S[t[e+10]]+S[t[e+11]]+S[t[e+12]]+S[t[e+13]]+S[t[e+14]]+S[t[e+15]]).toLowerCase();if(!Mn(r))throw TypeError("Stringified UUID is invalid");return r}var Ln=Es;function Is(t,e,r){t=t||{};var n=t.random||(t.rng||Wt)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(var i=0;i<16;++i)e[r+i]=n[i];return e}return Ln(n)}var Ut=Is;var ge=()=>p(()=>crypto.randomUUID())||Ut(),zt=class{generate(e){if(typeof e!="undefined")throw new Error("UuidGenerator does not support custom lengths");return ge().replace(/-/g,"")}};var Hn=class{constructor(e,r){this.messaging=e;this.idGenerator=r}get(e,r,n){return(...i)=>u(this,null,function*(){let o=this.idGenerator.generate(),{payload:a}=yield this.messaging.handle({type:"triptease.onboard.request",requestType:String(r),payload:i,correlationId:o});if(ue(a))throw a;return a})}};function ie(t,e=new zt){return new Proxy({},new Hn(t,e))}var Vt=class{constructor(e,r=ie(e)){this.proxy=r;this.applicationConfig=Dt(e=>u(this,null,function*(){return yield this.proxy.applicationConfig(e)}));this.generateConfig=Dt(e=>u(this,null,function*(){return yield this.proxy.generateConfig(e)}))}};var me=class{constructor(){this.scripts=[]}static create(e){let r=A(e).onboard,n=r.stackScriptFinder;return n||(r.stackScriptFinder=new me)}capture(){let e=Ls();!e||this.scripts.push(e)}get(){return this.scripts}},Ms=/(https?.*):\d+:\d+/;function Ls(){try{throw new Error}catch(t){if(!t.stack)return;let e=t.stack.match(Ms);if(!e)return;let r=e[1];return new C(r)}}var Hs=T.getProperty("Date"),Kt=class{now(){return new Hs}},ye=class{now(){return new Date}};function Dn({method:t="POST",url:e,body:r}){let n=I.stringify(r);if(typeof navigator.sendBeacon!="undefined"&&t==="POST")navigator.sendBeacon(e,n);else if(typeof fetch!="undefined")fetch(e,{method:t,body:n});else if(XMLHttpRequest){let i=new XMLHttpRequest;i.open(t,e,!0),i.send(n)}}var jn={name:"onboard",version:Z.get()},Ds="https://onboard.triptease.io";var $t=class{constructor(e,r,n=w("analytics"),i=50){this.window=e;this.clock=r;this.logger=n;this.batchSize=i;this.queued=[];setInterval(()=>u(this,null,function*(){return yield this.flush()}),1e3),this.window.addEventListener("unload",()=>u(this,null,function*(){return yield this.flush()}))}send(e){return u(this,null,function*(){this.queued.push(js(this.clock,e)),this.queued.length>this.batchSize&&(yield this.flush())})}flush(){return u(this,null,function*(){if(this.queued.length===0)return;let e=this.queued.splice(0,this.batchSize);this.logger.log(`Flushing batch of ${e.length}, remaining in queue ${this.queued.length}`);let r={type:"triptease.onboard.batch",sentAt:this.clock.now(),payload:e};Dn({url:`${Ds}/message/batch`,body:r})})}};function js(t,e){return q({messageId:ge(),createdAt:t.now()},e)}var qn=_(de());function qs(t){return{title:t.document.title,locale:t.document.documentElement.lang||t.document.documentElement.getAttribute("xml:lang")||"",url:t.location.href,urlParsed:_n(t.location.href),referrer:t.document.referrer,referrerParsed:_n(t.document.referrer),characterSet:t.document.characterSet,opener:p(()=>Boolean(t.opener),!1)}}function _n(t){if(!t)return{};let{scheme:e,host:r,path:n,query:i,fragment:o}=new C(t);return x.removeEmpty({scheme:e,host:r,path:n,query:i,queryParsed:z(i,!1),fragment:o})}var Je=class{constructor(e,r=new ye){this.window=e;this.clock=r}get timezone(){return p(()=>Intl.DateTimeFormat().resolvedOptions().timeZone,"")}buildMessage(e){return u(this,null,function*(){let r=p(()=>this.window.triptease.onboard.bootstrap.identity,{}),n=this.clock.now();return M.merge({createdAt:n,messageId:ge(),anonymousId:p(()=>r.anonymousId),userId:p(()=>r.userId),sessionId:p(()=>r.sessionId),domainUserId:p(()=>r.domainUserId),timeOffset:p(()=>r.timeOffset),context:{library:jn,userAgent:this.window.navigator.userAgent,locale:this.window.navigator.language,page:qs(this.window),screen:{width:this.window.screen.width,height:this.window.screen.height},timezone:this.timezone}},e)})}};B([qn.lazy],Je.prototype,"timezone",1);var Jt="triptease.onboard.response";function Nt(t){return t&&typeof t=="object"&&t.type==="triptease.onboard.request"&&typeof t.requestType=="string"&&typeof t.correlationId=="string"&&Array.isArray(t.payload)}function Ne(t){return t&&typeof t=="object"&&t.type==="triptease.onboard.response"&&typeof t.correlationId=="string"}function Ze(t,e){return{type:"triptease.onboard.response",correlationId:t,payload:e}}function Qe(t,e){return Ze(t,jt("NotFound","No handler found for "+e))}function Bn(t){return p(()=>t.payload.name==="NotFound",!1)}function Gn(t,e){return Ze(t,jt(e.name,e.message,e.stack))}var _s=w("messaging"),Zt=class{constructor(){this.handlers=new Map}register(e,r){return e.forEach(n=>{if(this.hasHandlerFor(n))throw new Error(`Method name "${n}" already registered to a handler`);this.handlers.set(n,r)}),this}handle(e){return u(this,null,function*(){let r=this.handlers.get(e.requestType);return r?(_s.debug("Matched message to handler",e,r),yield r.handle(e)):Qe(e.correlationId,e.requestType)})}hasHandlerFor(e){return this.handlers.has(e)}};var Qt=w("messaging"),se=class{constructor(e){this.target=e}handle(e){return u(this,null,function*(){let r=this.target[e.requestType];if(!r)return Qt.debug("No method found that matches method",e.requestType,this.target),Qe(e.correlationId,e.requestType);try{Qt.debug("Found method",e.requestType);let n=yield r.apply(this.target,e.payload);return Ze(e.correlationId,n)}catch(n){return Qt.debug("Error trying to in invoke method",e.requestType,n),Gn(e.correlationId,n)}})}};var Bs=Z.get();function Gs(t){return`https://onboard.triptease.io/integrations/${Bs}/${t}.js`}function Xt(t){return t.replace(/-/g,"").toLowerCase()}var l=class{constructor(e){this.name=e;if(!/[A-Za-z0-9]/.test(e))throw new Error("Only alpha numeric allowed");l.Lookup.set(Xt(e),this)}static values(){return Array.from(l.Lookup.values())}static parse(e){let r=l.Lookup.get(Xt(e));if(!r)throw new Error("Invalid booking engine name");return r}toString(){return this.name}get canonical(){return Xt(this.name)}get folder(){return this.isSelfIntegration()?l.Default.folder:U.kebabCase(this.name)}get script(){return Gs(this.folder)}isSelfIntegration(){return l.SelfIntegration.has(this)}},s=l;s.Lookup=new Map,s.AfricaAlbida=new l("AfricaAlbida"),s.Alaric=new l("Alaric"),s.Amadeus=new l("Amadeus"),s.Ascott=new l("Ascott"),s.ASIWebRes=new l("ASIWebRes"),s.Auberge=new l("Auberge"),s.AvailPro=new l("AvailPro"),s.Avvio=new l("Avvio"),s.AZDS=new l("AZDS"),s.Azimut=new l("Azimut"),s.BestWesternFrance=new l("BestWesternFrance"),s.BestWesternItaly=new l("BestWesternItaly"),s.BestWesternUk=new l("BestWesternUk"),s.Bode=new l("Bode"),s.BookAssist=new l("BookAssist"),s.BookEasy=new l("BookEasy"),s.BookOnlineNow=new l("BookOnlineNow"),s.BookVisit=new l("BookVisit"),s.Booking=new l("Booking"),s.Booking2Hotels=new l("Booking2Hotels"),s.BookingExpert=new l("BookingExpert"),s.BrochnerHotels=new l("BrochnerHotels"),s.BusyRooms=new l("BusyRooms"),s.BWHHotelGroup=new l("BWHHotelGroup"),s.CityExpress=new l("CityExpress"),s.ClaytonHotel=new l("ClaytonHotel"),s.Clock=new l("Clock"),s.CloudBeds=new l("CloudBeds"),s.CompuRez=new l("CompuRez"),s.Comwell=new l("Comwell"),s.ConstanceHotels=new l("ConstanceHotels"),s.Default=new l("Default"),s.DerqueBooking=new l("DerqueBooking"),s.DeutscheHospitality=new l("DeutscheHospitality"),s.DoyleCollection=new l("DoyleCollection"),s.EasyBooking=new l("EasyBooking"),s.EasyConsulting=new l("EasyConsulting"),s.EGds=new l("EGds"),s.Evancy=new l("Evancy"),s.Everly=new l("Everly"),s.ExtendedStayAmerica=new l("ExtendedStayAmerica"),s.Ezee=new l("Ezee"),s.FastBooking=new l("FastBooking"),s.Firmdale=new l("Firmdale"),s.FourSeasons=new l("FourSeasons"),s.Furama=new l("Furama"),s.Generic=new l("Generic"),s.GlenEagles=new l("GlenEagles"),s.GothiaTowers=new l("GothiaTowers"),s.GuestCentric=new l("GuestCentric"),s.GuestDesk=new l("GuestDesk"),s.GuestLine=new l("GuestLine"),s.Guild=new l("Guild"),s.HamiltonIsland=new l("HamiltonIsland"),s.HandPickedHotels=new l("HandPickedHotels"),s.Hart=new l("Hart"),s.HHotels=new l("HHotels"),s.HighLevelSoftware=new l("HighLevelSoftware"),s.Hipotels=new l("Hipotels"),s.Hoteliers=new l("Hoteliers"),s.HotelNetSolutions=new l("HotelNetSolutions"),s.Hotetec=new l("Hotetec"),s.Hotusa=new l("Hotusa"),s.Hoxton=new l("Hoxton"),s.HtiSystems=new l("HtiSystems"),s.Hyatt=new l("Hyatt"),s.Iberostar=new l("Iberostar"),s.InnQuest=new l("InnQuest"),s.InnRoad=new l("InnRoad"),s.InnStyle=new l("InnStyle"),s.Iperbooking=new l("Iperbooking"),s.IRM=new l("IRM"),s.Kasa=new l("Kasa"),s.Kempinski=new l("Kempinski"),s.Kognitiv=new l("Kognitiv"),s.LHW=new l("LHW"),s.Loews=new l("Loews"),s.Lotte=new l("Lotte"),s.Mews=new l("Mews"),s.Mirai=new l("Mirai"),s.NativePlaces=new l("NativePlaces"),s.NeoBookings=new l("NeoBookings"),s.NHCollection=new l("NHCollection"),s.NHHotels=new l("NHHotels"),s.OKU=new l("OKU"),s.Omnibees=new l("Omnibees"),s.OneHotels=new l("OneHotels"),s.Opera=new l("Opera"),s.Ovolo=new l("Ovolo"),s.PalaceResorts=new l("PalaceResorts"),s.Paraty=new l("Paraty"),s.Pegasus=new l("Pegasus"),s.Prestige=new l("Prestige"),s.ProfitRoom=new l("ProfitRoom"),s.Protel=new l("Protel"),s.PursuitCollection=new l("PursuitCollection"),s.RedPlanet=new l("RedPlanet"),s.RegalHotels=new l("RegalHotels"),s.ReserveHotel=new l("ReserveHotel"),s.ReserveOnline=new l("ReserveOnline"),s.Reservit=new l("Reservit"),s.Reztrip=new l("Reztrip"),s.RMSCloud=new l("RMSCloud"),s.RoomKey=new l("RoomKey"),s.RoomMaster=new l("RoomMaster"),s.Roiback=new l("Roiback"),s.Safestay=new l("Safestay"),s.SandsVegas=new l("SandsVegas"),s.Sbe=new l("Sbe"),s.Seekda=new l("Seekda"),s.Shr=new l("Shr"),s.SimpleBooking=new l("SimpleBooking"),s.SiteMinder=new l("SiteMinder"),s.StationCasinos=new l("StationCasinos"),s.Synxis=new l("Synxis"),s.SysHotelOnline=new l("SysHotelOnline"),s.Taj=new l("Taj"),s.Travelanium=new l("Travelanium"),s.TravelClick=new l("TravelClick"),s.Uibscrs=new l("Uibscrs"),s.VerticalBooking=new l("VerticalBooking"),s.Viato=new l("Viato"),s.Vinpearl=new l("Vinpearl"),s.WebRezPro=new l("WebRezPro"),s.Youngs=new l("Youngs"),s.Zafiro=new l("Zafiro"),s.SelfIntegration=new Set([l.Avvio,l.BestWesternItaly,l.ClaytonHotel,l.ExtendedStayAmerica,l.FourSeasons,l.HtiSystems,l.LHW,l.NHCollection,l.NHHotels]);function he(t,...e){let r=je(t,...e);if(!r)return;let[n]=[...r].reverse();return n}function Fs(t){let e=p(()=>t.host.toLowerCase(),""),r=t.toString().toLowerCase(),n=t.path.toLowerCase();if(e==="gc.synxis.com")return s.Synxis;if(e==="be.synxis.com")return s.Synxis;if(e.indexOf("travelclick")!==-1)return s.TravelClick;if(e.indexOf("bookingbutton")!==-1||e.indexOf("book-directonline")!==-1||e.indexOf("direct-book.com")!==-1)return s.SiteMinder;if(e.indexOf(".hyatt.")!==-1)return s.Hyatt;if(e.indexOf(".bookonthenet.")!==-1)return s.RoomKey;if(e.indexOf("firmdalehotels")!==-1)return s.Firmdale;if(e.indexOf("apxhotelsapartments")!==-1||e.indexOf("mews.li")!==-1)return s.Mews;if(e.indexOf("guestline.net")!==-1||e.indexOf("roomlynx.net")!==-1)return s.GuestLine;if(e.indexOf("book-onlinenow.net")!==-1)return s.BookOnlineNow;if(e.indexOf("windsurfercrs.com")!==-1)return s.Shr;if(e.indexOf("bestwestern.fr")!==-1)return s.BestWesternFrance;if(r.indexOf("webrez.com")!==-1||e.indexOf("worldweb.com")!==-1||e.indexOf("webrez.com/v")!==-1)return s.WebRezPro;if(e.indexOf("hoteliers.com")!==-1)return s.Hoteliers;if(e.indexOf("doylecollection")!==-1)return s.DoyleCollection;if(r.indexOf("/bookcore/")!==-1)return s.Roiback;if(e.indexOf("nativeplaces.com")!==-1)return s.NativePlaces;if(r.indexOf("/cgi-bin/lansaweb")!==-1)return s.StationCasinos;if(e==="www.palms.com")return s.StationCasinos;if(e.indexOf(".webhotel.")!==-1)return s.Opera;if(e.indexOf("constancehotels.com")!==-1)return s.ConstanceHotels;if(e.indexOf("online.bookvisit.")!==-1)return s.BookVisit;if(e.indexOf("direct-reservation")!==-1)return s.BusyRooms;if(e.indexOf("youngshotels")!==-1)return s.Youngs;if(e.indexOf("loewshotels")!==-1)return s.Loews;if(r.indexOf("bookings.hamiltonisland.com.au/")!==-1)return s.HamiltonIsland;if(e.indexOf("regalhotel")!==-1)return s.RegalHotels;if(e.indexOf("live.high-level-software")!==-1)return s.HighLevelSoftware;if(e.indexOf("premiereserve.com")!==-1||e.indexOf("teg-hotels.com")!==-1)return s.Everly;if(e.indexOf("simplebooking")!==-1||e.indexOf("booking.crimsonhotel")!==-1)return s.SimpleBooking;if(e.indexOf("bookassist.com")!==-1)return s.BookAssist;if(e.indexOf("booking.africaalbidatourism.com")!==-1)return s.AfricaAlbida;if(e.indexOf("onepagebooking.com")!==-1)return s.HotelNetSolutions;if(e.indexOf("reservhotel.com")!==-1)return s.ReserveHotel;if(r.indexOf("/irmng")!==-1)return s.IRM;if(e.indexOf("booking-channel.com")!==-1)return s.Hotusa;if(e.includes(".venetian.")||e.includes(".venetianlasvegas."))return s.SandsVegas;if(e.indexOf("clock-software.com")!==-1||e.indexOf("villasriomar.com")!==-1)return s.Clock;if(e.indexOf("tajinnercircle.com")!==-1||e.indexOf("tajhotels.com")!==-1)return s.Taj;if(e.indexOf("booking.iberostartheclub.com")!==-1)return s.Iberostar;if(e.indexOf("services.comwell.com")!==-1)return s.Comwell;if(e.indexOf(".profitroom.")!==-1)return s.ProfitRoom;if(e.indexOf("bookingexpert.it")!==-1)return s.BookingExpert;if(e.indexOf("cloud-reservations.net")!==-1)return s.Hart;if(e.indexOf("pr.palaceresorts.com")!==-1||e.indexOf("pr.moonpalace.com")!==-1||e.indexOf("pr.leblancsparesorts.com")!==-1||e.indexOf(".palaceelite.com")!==-1)return s.PalaceResorts;if(e.indexOf(".palaceresorts.com")!==-1||e.indexOf(".moonpalace.com")!==-1||e.indexOf(".leblancsparesorts.com")!==-1||e.indexOf(".beachviewbarbados.com")!==-1||e.indexOf(".oceantwobarbados.com")!==-1||e.indexOf(".sea-breeze.com")!==-1||e.indexOf(".southbeachbarbados.com")!==-1)return s.Kognitiv;if(e.indexOf(".iqwebbook.com")!==-1)return s.InnQuest;if(e.indexOf("theguild.co")!==-1)return s.Guild;if(e.indexOf(".innroad.com")!==-1)return s.InnRoad;if(e.indexOf(".furama.com")!==-1)return s.Furama;if(e.indexOf(".reztrip.com")!==-1)return s.Reztrip;if(e.indexOf("nisekoportfolio.com")!==-1)return s.BookEasy;if(e.indexOf("azimuthotels")!==-1&&e.indexOf("reservations")===-1)return s.Azimut;if(e.indexOf(".steigenberger.com")!==-1||e.indexOf(".intercityhotel.com")!==-1||e.indexOf(".maxxhotel.com")!==-1||e.indexOf(".jaz-hotel.com")!==-1)return s.DeutscheHospitality;if(e.indexOf(".cloudbeds.com")!==-1)return s.CloudBeds;if(e.indexOf("coasthotels.com")!==-1)return s.Amadeus;if(e.indexOf(".thehoxton.com")!==-1)return s.Hoxton;if(e.indexOf(".lottehotel.com")!==-1)return s.Lotte;if(e.indexOf("kempinski.com")!==-1)return s.Kempinski;if(e.indexOf("derquebooking")!==-1)return s.DerqueBooking;if(e.indexOf(".gfhoteles.")!==-1)return s.DerqueBooking;if(e.indexOf("ovolohotels.com")!==-1)return s.Ovolo;if(e.indexOf(".gleneagles.com")!==-1)return s.GlenEagles;if(e.indexOf(".redplanethotels.com")!==-1)return s.RedPlanet;if(e.indexOf(".banffjaspercollection.com")!==-1||e.indexOf(".glacierparkcollection.com")!==-1)return s.PursuitCollection;if(e.indexOf(".bestwestern.co.uk")!==-1)return s.BestWesternUk;if(e.indexOf(".sbe.com")!==-1)return s.Sbe;if(e.indexOf(".bode.co")!==-1)return s.Bode;if(e.indexOf(".reserve-online.net")!==-1)return s.ReserveOnline;if(e.indexOf("secure-hotel-booking.com")!==-1)return s.AvailPro;if(e.indexOf(".syshotelonline.it")!==-1)return s.SysHotelOnline;if(e.indexOf(".reservit.com")!==-1)return s.Reservit;if(e.indexOf(".vinpearl.com")!==-1)return s.Vinpearl;if(e.indexOf(".omnibees.com")!==-1)return s.Omnibees;if(e.indexOf(".hipotels.com")!==-1)return s.Hipotels;if(e.indexOf(".handpickedhotels.co.uk")!==-1)return s.HandPickedHotels;if(e.indexOf("bookings.zafirohotels.com")!==-1)return s.Zafiro;if(e.indexOf(".viatocrs.de")!==-1)return s.Viato;if(e.indexOf(".easy-booking.")!==-1)return s.EasyBooking;if(e.indexOf(".ipms247.")!==-1||e.indexOf("reservas.hotelkokai.com")!==-1)return s.Ezee;if(e.indexOf(".innstyle.")!==-1)return s.InnStyle;if(e.indexOf(".book-secure.")!==-1)return s.FastBooking;if(e.indexOf(".cityexpress.")!==-1)return s.CityExpress;if(e.indexOf(".hoteleasyreservations.")!==-1)return s.EasyConsulting;if(e.indexOf(".travelanium.")!==-1)return s.Travelanium;if(e.indexOf(".e-gds.")!==-1)return s.EGds;if(e.indexOf(".booking.com")!==-1)return s.Booking;if(e.indexOf(".iperbooking.")!==-1)return s.Iperbooking;if(e.indexOf(".okuhotels.")!==-1)return s.OKU;if(e.indexOf(".pegsbe.")!==-1)return s.Pegasus;if(e.indexOf(".the-ascott.")!==-1||e.indexOf(".discoverasr.")!==-1)return s.Ascott;if(e.indexOf("kasa.")!==-1)return s.Kasa;if(e.indexOf("aubergeresorts.")!==-1)return s.Auberge;if(e.indexOf("verticalbooking.")!==-1)return s.VerticalBooking;if(e.indexOf(".avvio.")!==-1)return s.Avvio;if(e.indexOf(".bestwestern.it")!==-1)return s.BestWesternItaly;if(e.indexOf("bookings.claytonhotel")!==-1)return s.ClaytonHotel;if(e.indexOf("extendedstayamerica.")!==-1)return s.ExtendedStayAmerica;if(e.indexOf(".fourseasons.")!==-1||e.indexOf(".fourseasonscountryclub.")!==-1)return s.FourSeasons;if(e.indexOf(".hti-systems.")!==-1)return s.HtiSystems;if(e.indexOf("lhw.")!==-1)return s.LHW;if(e.indexOf("nh-hotels.")!==-1||e.indexOf(".nh-hoteles.")!==-1)return s.NHHotels;if(e.indexOf("nh-collection.")!==-1)return s.NHCollection;if(e.indexOf(".h-hotels.")!==-1)return s.HHotels;if(e.indexOf(".gothiatowers.")!==-1||e.indexOf(".upperhouse.")!==-1)return s.GothiaTowers;if(e.indexOf(".1hotels.")!==-1)return s.OneHotels;if(e.indexOf(".asiwebres.")!==-1)return s.ASIWebRes;if(e.indexOf(".bwhhotelgroup.")!==-1)return s.BWHHotelGroup;if(e.indexOf(".safestay.")!==-1)return s.Safestay;if(e.indexOf(".evancy.")!==-1)return s.Evancy;if(e.indexOf(".brochner-hotels.")!==-1)return s.BrochnerHotels;if(e.indexOf(".welcome-anywhere.")!==-1)return s.RoomMaster}function Ws(t){if(t.document.querySelector('link[href*="be.synxis.com"]'))return s.Synxis;if(p(()=>Object.keys(t._GlobalTokens).length,0))return(Boolean(t.document.querySelector("#XbeViewPanel"))?1:2)===1?s.Synxis:s.Synxis;if(p(()=>t.process.env.APPLICATION_URL.indexOf("be.synxis.com")!==-1,!1))return s.Synxis;if(p(()=>t.apiUrl.indexOf("travelclick")!==-1,!1)||p(()=>!!he(t.dataLayer,"ihHotelID"),!1)||p(()=>!!k.find(k.from(t.document.querySelectorAll('script[type="text/javascript"]')).map(e=>e.textContent),e=>e.indexOf("travelclick")!==-1),!1))return s.TravelClick;if(p(()=>t.document.querySelector('link[href*="vendors~about~booking~cancellation~checkout~confirmation~contact~policies~reservation"]'))||p(()=>he(t.dataLayer,"booking_engine")==="Modern")||p(()=>he(t.dataLayer,"tbb_prefix"))||p(()=>he(t.dataLayer,"virtual_url"))||p(()=>t.document.querySelector('meta[name="occupancy-includes-infants"]'))||p(()=>!!t.digitalPartner.triptease))return s.SiteMinder;if(p(()=>t.dataLayer.some(e=>e.neobookings),!1))return s.NeoBookings;if(p(()=>he(t.dataLayer,"context.application")==="smart",!1))return s.AvailPro;if(t.document.querySelector('iframe.mews-distributor, script[src*="mews.li"]'))return s.Mews;if(p(()=>Boolean(t.WSMAIN),!1))return s.Shr;if(p(()=>t.document.querySelector("#clienId"),void 0))return s.RMSCloud;if(t.document.getElementById("bookingGadget")!==null)return s.GuestCentric;if(Boolean(t.document.querySelector('script[src*="UiBSJs"]')))return s.Uibscrs;if(p(()=>Boolean(t.Mirai),!1))return s.Mirai;if(t.MAIN_SITE==="paraty")return s.Paraty;if(!!t.document.querySelector('[href^="https://www.booking2hotels.com"]')||t.document.querySelector('.booking-engine img[src*="booking2hotels"]'))return s.Booking2Hotels;if(t.document.querySelector('script[src*="seekda"]'))return s.Seekda;if(t.document.querySelector('meta[name="author"][content*="alaric"]'))return s.Alaric;if(p(()=>t.top.location.hostname.toLowerCase().indexOf("hotel-llevant")!==-1,!1))return s.Prestige;if(p(()=>t.document.querySelector('meta[name="description"]').content.indexOf("reztrip")!==-1,!1))return s.Reztrip;if(p(()=>!!t.PROTELWBE5,!1))return s.Protel;if(p(()=>t.document.querySelector('link[href*="/bookvisit/"], meta[content*=".bookvisit."]')))return s.BookVisit;if(p(()=>t.document.querySelector('link[href*="webhotelier.net"]')))return s.ReserveOnline;if(p(()=>t.document.querySelector("#availpro-tracker")))return s.AvailPro;if(p(()=>t.document.querySelector("meta[name=Author][content*=RESERVIT]")))return s.Reservit;if(p(()=>t.document.querySelector("#eZee_BookingContainer, #eZee_BookingHeader, #eZee_BookingFilter, #eZ_BookingRooms")))return s.Ezee;if(p(()=>t.document.querySelector("img[src*=hotetec],a[href*=hotetec]")))return s.Hotetec;if(p(()=>t.document.querySelector("link[href*=cityexpress]")))return s.CityExpress;if(p(()=>t.document.querySelector("link[href*=travelanium]")))return s.Travelanium;if(p(()=>t.document.querySelector('a[href*=".e-gds."],img[src*=".e-gds."]')))return s.EGds;if(p(()=>t.document.querySelector('img[src*=".pegsbe."],img[src*=".bookingdirect."]')))return s.Pegasus;if(p(()=>t.document.querySelector("a[href*=verticalbooking], a[href*=VerticalBooking], script[src*=verticalbooking]")))return s.VerticalBooking;if(p(()=>t.document.querySelector("guestdesk")))return s.GuestDesk;if(t.document.querySelector("img[src*=booking-channel],div[style*=booking-channel]"))return s.Hotusa;if(t.document.querySelector('img[src*=".asiwebres."]'))return s.ASIWebRes;if(t.document.querySelector('[src*=".azds.com"],[href*=".azds.com"]'))return s.AZDS;if(t.document.querySelector('[href*="compurez"]')||p(()=>t.document.querySelector("#footer").textContent.includes("CompuRez")))return s.CompuRez;if(t.document.querySelector('img[src*=".roommaster."],div[style*=".roommaster."]'))return s.RoomMaster}function Us(t){let e=t.querySelector('script[src*="static.triptease.io/client-integrations/"]');if(!e)return;let[,r]=p(()=>e.src.match(/\/([^/]+).js$/))||[];if(!!r)return p(()=>s.parse(r))}function zs(t){return p(()=>{let r=t.querySelector('script[src*="onboard.triptease.io/bootstrap.js"]').src.match(/fallback=([a-zA-Z]+)/)[1];return s.parse(r)},s.Default)}function Fn(t){let e=p(()=>Fs(new C(t.location.href)));if(e)return e;let r=p(()=>Ws(t));if(r)return r;let n=Us(t.document);return n||zs(t.document)}var Wn=w("messaging"),Xe=class{constructor(e){this.messageHandler=e;this.promises=new Map;e&&e.addListener(r=>{if(Ne(r)){let{correlationId:n}=r,i=this.promises.get(n);i&&(Wn.debug("Sender matched response",r),i.resolve(r),this.promises.delete(n))}})}handle(e){return u(this,null,function*(){return Wn.debug("Sending request",e),this.messageHandler&&this.messageHandler.send(e),new Promise((r,n)=>{this.promises.set(e.correlationId,{resolve:r,reject:n})})})}};var Yt=class{constructor(e,r,n=w("messaging")){this.listen=e;this.router=r;this.logger=n;this.rules=[];e.addListener(this.handler.bind(this)),this.addRule(Nt,i=>i,i=>i),this.addRule(Ks,Js,Un)}registerAlias(e,r){if(!this.router.hasHandlerFor(r))throw new Error(`Illegal alias: Method "${r}" is not registered with router`);return this.addRule(Vs(e),$s(r),Un)}handler(e,r){return u(this,null,function*(){if(Ne(e))return;this.logger.debug("listenOn received request",e);let n=this.rules.find(a=>a.predicate(e));if(!n)return;let i=n.requestConverter(e),o=yield this.router.handle(i);if(Bn(o)){this.logger.debug(`Handler not found for request "${i.requestType}", potentially for another listener`);return}e.correlationId&&e.correlationId===o.correlationId&&(this.logger.debug("listenOn sending response to sender",o),r.send(n.responseConverter(o)))})}addRule(e,r,n){return this.rules.push({predicate:e,requestConverter:r,responseConverter:n}),this}};function Vs(t){return e=>e.type===t}function Ks(t){return!Nt(t)&&!!t.correlationId}function $s(t){return e=>({type:"triptease.onboard.request",requestType:String(t),payload:[e],correlationId:e.correlationId||"fire-and-forget"})}function Js(t){let{value:e,correlationId:r}=t,{method:n}=Ht(t.type);return{type:"triptease.onboard.request",requestType:n,payload:[e],correlationId:r}}function Un(t){return{type:"triptease.onboard.response",correlationId:t.correlationId,value:t.payload}}var er=class{static find(e){let n=["bootstrap.js","/paperboy/","/identity-service/confirm"].map(a=>`script[src*="${a}"][src*="triptease.io"]`);n.push('script[src*="triptease.net"]');let i=n.join(", ");return k.from(e.querySelectorAll(i)).map(a=>new C(a.src))}};function Ye(t){let e=Fe(t,"triptease-applications")||"auto";return p(()=>{let[r]=er.find(t.document),{applications:n}=z(r.query);return n},e).toLowerCase()}var be;(function(y){y.Config="triptease.config",y.Error="triptease.onboard.error",y.Message="triptease.onboard.message",y.PageDisplayedSearch="triptease.integration.page_displayed_search",y.PageDisplayedRoomsAndRates="triptease.integration.page_displayed_rooms-and-rates",y.PageDisplayedConfirmation="triptease.integration.page_displayed_confirmation",y.PageDisplayedUnknown="triptease.integration.page_displayed_unknown",y.PageDisplayedGroup="triptease.integration.page_displayed_group",y.PageDisplayedPartial="triptease.integration.page_displayed_partial",y.PageErroredRoomsAndRates="triptease.integration.page_errored_rooms-and-rates",y.PageErroredConfirmation="triptease.integration.page_errored_confirmation",y.IntegrationData="triptease.integration.integration_data",y.PartialConfirmationPageData="triptease.integration.partial_confirmation_data",y.InvalidConfirmationData="triptease.integration.invalid_confirmation_data",y.InvalidPage="triptease.integration.invalid_page",y.GenericScript="triptease.integration.generic_script",y.DataCapture="triptease.integration.data_capture",y.GenericAnalysisConfirmation="triptease.integration.generic_analysis_confirmation",y.EntityUpdate="triptease.entity.update",y.StatusChanged="triptease.onboard.status-changed"})(be||(be={}));var ve=class{constructor(e,r,n){this.window=e;this.messageBatcher=r;this.messageBuilder=n}static create(e,r,n){var o;let i=A(e).onboard;return i.trackingApi=(o=i.trackingApi)!=null?o:new ve(e,r,n)}get isEnabled(){return Ye(this.window)!=="none"}trackConfig(e){return u(this,null,function*(){!this.isEnabled||p(()=>e.payload.type===D.Payment)||(yield this.messageBatcher.send(x.removeEmpty(e)))})}trackEvent(e){return u(this,null,function*(){!this.isEnabled||(yield this.messageBatcher.send(e))})}trackError(e){return u(this,null,function*(){!this.isEnabled||(yield this.messageBatcher.send(yield this.messageBuilder.buildMessage({type:be.Error,errorType:ue(e)?"exception":"console",payload:e})))})}trackMessage(e){return u(this,null,function*(){!this.isEnabled||(yield this.messageBatcher.send(yield this.messageBuilder.buildMessage({type:be.Message,payload:e})))})}};function Ns(t){return t&&typeof t=="object"&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.enabled=="boolean"}function zn(t){return Ns(t)&&t.type!=="other"&&typeof t.url=="string"}var we=class{constructor(e,r,n=w("integration-executor"),i=Q.create(e)){this.window=e;this.kernel=r;this.logger=n;this.starter=i;n.debug("DefaultApplicationLoader constructor called")}loadApplications(e){return u(this,null,function*(){let r=Ye(this.window);if(r==="none")return this.logger.log('applications set to "none", skipping loading'),{};let{integrationId:n,clientKey:i,apiKey:o}=e,{applications:a}=yield this.kernel.applicationConfig({integrationId:n,clientKey:i,apiKey:o,includeDisabled:!0}),c=this.filterApplications(r,a);return(yield Promise.all(c.map(m=>u(this,null,function*(){try{if(zn(m)&&m.enabled)return yield this.starter.start(m),ce(q({},m),{started:!0})}catch(h){return ce(q({},m),{started:!1,error:h.message})}return m})))).reduce((m,h)=>(m[h.name]=x.removeEmpty({enabled:h.enabled,started:h.started,error:h.error}),m),{})})}filterApplications(e,r){return e==="auto"?r:r.filter(n=>n.name.toLowerCase()===e)}static create(e,r){var i;let n=A(e).triptease.onboard;return n.applicationLoader=(i=n.applicationLoader)!=null?i:new we(e,r)}};var et=class{static difference(e,r){return Array.from(e).reduce((n,i)=>r.has(i)?n:n.add(i),new Set)}};var $=w("events"),tr=class{constructor(e,r){this.timers=e;this.handle=r;this.finders=new Set;this.keepers=new Set;this.handleEvent=e=>u(this,null,function*(){try{$.debug("CreatedOrDeletedEvents: Checking for new created items");let r=new Set(Array.from(this.finders).flatMap(o=>o()));$.debug("CreatedOrDeletedEvents: found",r);let n=et.difference(r,this.keepers);$.debug("CreatedOrDeletedEvents: newItems",n);let i=et.difference(this.keepers,r);$.debug("CreatedOrDeletedEvents: deletedItems",i),this.keepers=r,(n.size>0||i.size>0)&&($.log(`CreatedOrDeletedEvents: ${n.size} created, ${i.size} deleted element detected - firing event`),yield this.handle(e))}catch(r){$.error("CreatedOrDeletedEvents.handleEvent threw while polling",r)}})}start(){return u(this,null,function*(){$.log("Start polling for created items"),this.id=this.timers.setInterval(this.handleEvent,1e3)})}stop(){return u(this,null,function*(){$.log("Stop polling for created items"),this.id&&(this.timers.clearInterval(this.id),this.id=void 0)})}watch(e){e().forEach(n=>this.keepers.add(n)),this.finders.add(e)}};function Vn(t){return new Promise(e=>{this.setTimeout(()=>{e()},t)})}var j=class{constructor(e=new ye){this.clock=e;this.delay=Vn.bind(this);this.delay=Vn}task(e){return u(this,null,function*(){return yield this.delay(0),e()})}setTimeout(e,r){return setTimeout(e,r)}clearTimeout(e){clearTimeout(e)}setInterval(e,r){return setInterval(e,r)}clearInterval(e){clearInterval(e)}requestIdleCallback(e,r){let n=r?r.timeout:1,i=this.clock.now().getTime()+n,o=this;return this.setTimeout(()=>{e({didTimeout:!1,timeRemaining(){return Math.max(0,50-(o.clock.now().getTime()-i))}})},n)}cancelIdleCallback(e){this.clearTimeout(e)}};var bl=new j;var Zs=w("events"),rr=class{constructor(e,r){this.window=e;this.delegate=r;this.first=!0;this.fire=e=>u(this,null,function*(){if(this.window.document.hidden&&!this.first){Zs.log("Document hidden - skipping",e);return}yield this.delegate.fire(),this.first=!1})}listen(e){return u(this,null,function*(){yield this.delegate.listen(e)})}removeListener(e){this.delegate.removeListener(e)}};var nr=w("events"),ir=class{constructor(e,r){this.delegate=e;this.running=r;this.fire=e=>u(this,null,function*(){if(this.running.value){nr.log("Already running - skipping",e);return}this.running.value=!0,yield this.delegate.fire(),this.running.value=!1})}listen(e){return u(this,null,function*(){if(yield this.delegate.listen(e),this.running.value){nr.log("Already running - firing immediately");try{yield e()}catch(r){nr.log(r)}}})}removeListener(e){this.delegate.removeListener(e)}};var Kn=w("events"),sr=class{constructor(){this.handlers=[];this.fire=e=>u(this,null,function*(){Kn.log(`Firing handlers(${this.handlers.length})`,e),yield Promise.all(this.handlers.map(r=>u(this,null,function*(){try{yield r()}catch(n){Kn.log("Error while firing handler",n)}})))})}listen(e){return u(this,null,function*(){this.handlers.push(e)})}removeListener(e){this.handlers=this.handlers.filter(r=>r!==e)}};var $n=w("events"),or=class{constructor(e,r){this.timers=e;this.delegate=r;this.timeoutMs=1e3;this.timerId=0;this.fire=e=>u(this,null,function*(){$n.log(`Event observed, waiting for ${this.timeoutMs} ms quiet`,e),this.timers.clearInterval(this.timerId),this.timerId=this.timers.setTimeout(()=>u(this,null,function*(){$n.log("Event quiet period ended, firing event",e),yield this.delegate(e)}),this.timeoutMs)})}};var Qs=w("events"),ar=class{constructor(e,r,n=.2,i=new j){this.handle=e;this.running=r;this.idleThreshold=n;this.timers=i;this.lastState=!1;this.busy=!1;this.average=new xe;this.idleHandler=e=>{let r=e.timeRemaining();this.running.value?this.busy=!1:r===0?this.busy=!0:(this.average=this.average.calculate(r),this.busy=this.average.percentage<-this.idleThreshold),this.busy?this.idleId=void 0:this.idleId=this.timers.requestIdleCallback(this.idleHandler,r===0?void 0:{timeout:r})};this.intervalHandler=()=>u(this,null,function*(){this.stateHasChanged()&&this.isIdle()&&(Qs.log("Browser idle"),yield this.handle("Idle")),this.average=new xe,this.lastState=this.busy,this.idleId||(this.idleId=this.timers.requestIdleCallback(this.idleHandler))})}start(){return u(this,null,function*(){this.intervalId=this.timers.setInterval(this.intervalHandler,1e3),this.idleId=this.timers.requestIdleCallback(this.idleHandler)})}stop(){return u(this,null,function*(){this.intervalId&&this.timers.clearInterval(this.intervalId),this.idleId&&this.timers.cancelIdleCallback(this.idleId)})}isIdle(){return!this.busy}stateHasChanged(){return this.lastState!==this.busy}},xe=class{constructor(e=0,r=0,n=0,i=0){this.value=e;this.count=r;this.difference=n;this.percentage=i}calculate(e){let r=this.count+1,n=e-this.value,i=n/this.value,o=this.value+n/r;return new xe(o,r,n,i)}};var cr=class{constructor(e,r){this.window=e;this.handle=r}start(){return u(this,null,function*(){this.window.addEventListener("visibilitychange",this.handle),this.window.addEventListener("popstate",this.handle),this.window.addEventListener("hashchange",this.handle),this.window.addEventListener("pageshow",this.handle),this.window.addEventListener("pagehide",this.handle),this.window.document.readyState!=="complete"?this.window.document.addEventListener("DOMContentLoaded",this.handle):yield this.handle("Document already loaded")})}stop(){return u(this,null,function*(){this.window.removeEventListener("visibilitychange",this.handle),this.window.removeEventListener("popstate",this.handle),this.window.removeEventListener("hashchange",this.handle),this.window.removeEventListener("pageshow",this.handle),this.window.removeEventListener("pagehide",this.handle),this.window.document.removeEventListener("DOMContentLoaded",this.handle)})}};var lr=class{constructor(){this.value=!1}};var Jn=class{constructor(e,r=new j){this.window=e;let n=new lr;this.sink=new rr(e,new ir(new sr,n)),this.fire=new or(r,this.sink.fire).fire,this.mutation=new Nn(this.fire),this.created=new tr(r,this.fire),this.sources=[new ar(this.fire,n),this.mutation,this.created,new cr(e,this.fire)]}watch(e){this.created.watch(e)}listen(e){return u(this,null,function*(){yield this.sink.listen(e)})}start(){return u(this,null,function*(){yield Promise.all(this.sources.map(e=>e.start()))})}stop(){return u(this,null,function*(){this.sources.forEach(e=>e.stop())})}removeListener(e){this.sink.removeListener(e)}};function dr(t){let e=A(t).triptease;return e.events=e.events||new Jn(t)}var Xs={characterData:!0,attributes:!0,childList:!0},Nn=class{constructor(e){this.handle=e;this.observer=new MutationObserver(this.handle)}start(){return u(this,null,function*(){})}stop(){return u(this,null,function*(){this.observer.disconnect()})}static observe(e,r=Xs){if(!("MutationObserver"in P))return e;let n=dr(P).mutation;return e instanceof HTMLInputElement||e instanceof HTMLSelectElement?e.addEventListener("change",n.handle):n.observer.observe(e,r),e}};var rd=w("messaging");var tt=w("identity"),ur="triptease-anonymous-id",rt=class{constructor(e){this.storage=e}getAnonymousIds(){return u(this,null,function*(){let e=this.storage.get(ur);return e?[e]:[]})}setAnonymousId(e){return u(this,null,function*(){let r=this.storage.get(ur);(r&&e<r||!r)&&this.storage.set(ur,e)})}},pr=class{constructor(e){this.storage=e;this.key="tt-domain-user-id";this.pattern=/[0-9A-Z]{26}/}getAnonymousIds(){return u(this,null,function*(){let e=this.storage[this.key]||"";return this.pattern.test(e)?[e]:[]})}setAnonymousId(e){return u(this,null,function*(){})}},oe=class{constructor(e){this.providers=e}static create(...e){return new oe(e)}getAnonymousIds(){return u(this,null,function*(){return k.unique(k.flatten(yield Promise.all(this.providers.map(e=>p(()=>e.getAnonymousIds(),[]))))).sort()})}setAnonymousId(e){return u(this,null,function*(){yield Promise.all(this.providers.map(r=>p(()=>r.setAnonymousId(e))))})}},fr=class{constructor(e,r=new pe){this.delegate=e;this.generator=r}getAnonymousIds(){return u(this,null,function*(){let r=(yield this.delegate.getAnonymousIds())[0]||this.generator.generate();return yield this.delegate.setAnonymousId(r),[r]})}setAnonymousId(e){return this.delegate.setAnonymousId(e)}};var nt=class{constructor(e,r,n=new j){this.delay=e;this.delegate=r;this.timers=n;this.raceCounter=0}getAnonymousIds(){let e=this.raceCounter++;return Promise.race([(()=>u(this,null,function*(){tt.debug("TimeoutIdentityProvider delegate.getAnonymousIds called",e);let r=yield this.delegate.getAnonymousIds();return tt.debug("TimeoutIdentityProvider delegate.getAnonymousIds returned",r,e),r}))(),this.wait(e)])}setAnonymousId(e){return u(this,null,function*(){tt.debug("TimeoutIdentityProvider delegate.setAnonymousId called",e),this.delegate.setAnonymousId(e)})}wait(e){return u(this,null,function*(){return yield this.timers.delay(this.delay),tt.debug(`TimeoutIdentityProvider waited for ${this.delay} ms`,e),[]})}};var gr=class{constructor(e){this.storage=e}get(e){let r=this.storage.getItem(e);if(r)return I.parseWithDates(r)}set(e,r){return this.storage.setItem(e,JSON.stringify(r)),this}clear(){this.storage.clear()}},mr=class{constructor(){this.data=new Map}get(e){return this.data.get(e)}set(e,r){return this.data.set(e,r)}clear(){this.data.clear()}};var Zn=_(de());var yr=class{constructor(e,r=60*1e3,n=new j){this.handler=e;this.timeout=r;this.timers=n}handle(e){return u(this,null,function*(){let r=yield Promise.race([this.handler.handle(e),this.timers.delay(this.timeout)]);return r||{type:Jt,payload:new Error(`Request ${e.requestType} timed out after ${this.timeout}`),correlationId:e.correlationId}})}};var Qn=_(qe()),Se=class{constructor(e,r=new Kt,n=dr(e),i=new Je(e),o=new $t(e,r),a=ve.create(e,o,i),c=new Lt("bootstrap",a),d=Q.create(e),m=new Ue(e,c),h=new Ft(e,r),R=me.create(e)){this.window=e;this.clock=r;this.events=n;this.messageBuilder=i;this.messageBatcher=o;this.trackingApi=a;this.logger=c;this.starter=d;this.waiter=m;this.identityHelper=h;this.stackScripts=R;this.integrate=()=>u(this,null,function*(){try{this.logger.log("Starting integrate()");let e=Fn(this.window);A(this.window).onboard.integrationName=e;let r=Ys(e);yield this.starter.start(r)}catch(e){this.logger.error("Bootstrap.integrate: unhandled exception",e)}});A(this.window).onboard.bootstrap=this}start(){return u(this,null,function*(){try{this.logger.debug("Bootstrap starting"),T.exposeApi(),this.stackScripts.capture();let[e,r]=yield Promise.all([this.identityHelper.getIdentity(),this.kernelFrame()]);this.identity=e;let n=r.contentWindow;if(!n){this.logger.log("Kernel frame did not generate a content window, aborting");return}let i=new re(this.window,n,[]),o=new yr(new Xe(i));this.kernel=new Vt(o),this.kernelHost=ie(o),new Yt(i,new Zt().register(["processEvent"],new se(this)).register(["getAnonymousIds","setAnonymousId"],new se(new oe(this.identityProviders))).register(["trackConfig","trackEvent","trackError","trackMessage"],new se(this.trackingApi))).registerAlias("triptease.event","processEvent").registerAlias("triptease.config","trackConfig"),we.create(this.window,this.kernel),cn(()=>u(this,null,function*(){let[a]=yield new fr(new oe([...this.identityProviders,new nt(100,this.kernelHost)])).getAnonymousIds();this.identity.anonymousId=a,this.logger.log("anonymousId",a)})),yield this.events.listen(this.integrate),yield this.events.start()}catch(e){this.logger.error("Bootstrap.start: unhandled exception",e)}})}get identityProviders(){let e=[new rt(new mr),p(()=>new rt(new gr(this.window.localStorage))),new pr(p(()=>this.window.localStorage,{}))];return this.window.opener&&e.push(new nt(1e3,ie(new Xe(new re(this.window,this.window.opener,[]))))),e}reload(){return u(this,null,function*(){yield this.start(),this.logger.debug("Bootstrap reloading"),this.stackScripts.capture(),yield this.integrate()})}kernelFrame(){return u(this,null,function*(){let e=qt.application(this.window.location.hostname);return yield this.starter.start(e)})}processEvent(e){return u(this,null,function*(){let r=yield this.kernelHost.getPageState(),n=yield this.messageBuilder.buildMessage(M.merge(e,r));yield this.trackingApi.trackEvent(n)})}};B([Qn.cache],Se.prototype,"start",1),B([Zn.lazy],Se.prototype,"identityProviders",1);function Ys(t){return{name:t.name,url:t.script,type:"script",enabled:!0}}var Xn=w("bootstrap"),Yn=p(()=>window.triptease.onboard.bootstrap);(()=>u(void 0,null,function*(){let{"triptease-bootstrap-version":t=""}=z(window.location.search);["none","noop"].includes(t.toLowerCase())||(Yn?(Xn.log("Bootstrap reloading"),yield Yn.reload()):(Xn.log("Creating new bootstrap"),yield new Se(window).start()))}))();})();