flightkit 2.0.0-beta.0 → 2.0.0-beta.1

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/flightkit.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // @author Justin Lam
2
- // @version 2.0.0-beta.0:Detached: a0a8cd90514b5e0ac93ad40fb0cff27e330e3653:a0a8cd9
3
- const t=globalThis,r=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),a=new WeakMap;let l=class n{constructor(t,e,r){if(this._$cssResult$=!0,r!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(r&&void 0===t){const r=void 0!==e&&1===e.length;r&&(t=a.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&a.set(e,t))}return t}toString(){return this.cssText}};const c=(t,...e)=>{const r=1===t.length?t[0]:e.reduce(((e,r,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[o+1]),t[0]);return new l(r,t,o)},h=r?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const r of t.cssRules)e+=r.cssText;return(t=>new l("string"==typeof t?t:t+"",void 0,o))(e)})(t):t,{is:d,defineProperty:p,getOwnPropertyDescriptor:u,getOwnPropertyNames:f,getOwnPropertySymbols:y,getPrototypeOf:g}=Object,m=globalThis,v=m.trustedTypes,$=v?v.emptyScript:"",_=m.reactiveElementPolyfillSupport,A=(t,e)=>t,E={toAttribute(t,e){switch(e){case Boolean:t=t?$:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=null!==t;break;case Number:r=null===t?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch(t){r=null}}return r}},w=(t,e)=>!d(t,e),C={attribute:!0,type:String,converter:E,reflect:!1,hasChanged:w};Symbol.metadata??=Symbol("metadata"),m.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=C){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const r=Symbol(),o=this.getPropertyDescriptor(t,r,e);void 0!==o&&p(this.prototype,t,o)}}static getPropertyDescriptor(t,e,r){const{get:o,set:a}=u(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return o?.call(this)},set(e){const l=o?.call(this);a.call(this,e),this.requestUpdate(t,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??C}static _$Ei(){if(this.hasOwnProperty(A("elementProperties")))return;const t=g(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(A("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(A("properties"))){const t=this.properties,e=[...f(t),...y(t)];for(const r of e)this.createProperty(r,t[r])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,r]of e)this.elementProperties.set(t,r)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const r=this._$Eu(t,e);void 0!==r&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const t of r)e.unshift(h(t))}else void 0!==t&&e.push(h(t));return e}static _$Eu(t,e){const r=e.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,o)=>{if(r)e.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const r of o){const o=document.createElement("style"),a=t.litNonce;void 0!==a&&o.setAttribute("nonce",a),o.textContent=r.cssText,e.appendChild(o)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$EC(t,e){const r=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,r);if(void 0!==o&&!0===r.reflect){const a=(void 0!==r.converter?.toAttribute?r.converter:E).toAttribute(e,r.type);this._$Em=t,null==a?this.removeAttribute(o):this.setAttribute(o,a),this._$Em=null}}_$AK(t,e){const r=this.constructor,o=r._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=r.getPropertyOptions(o),a="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:E;this._$Em=o,this[o]=a.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,r){if(void 0!==t){if(r??=this.constructor.getPropertyOptions(t),!(r.hasChanged??w)(this[t],e))return;this.P(t,e,r)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,r){this._$AL.has(t)||this._$AL.set(t,e),!0===r.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,r]of t)!0!==r.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],r)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[A("elementProperties")]=new Map,b[A("finalized")]=new Map,_?.({ReactiveElement:b}),(m.reactiveElementVersions??=[]).push("2.0.4");const O=globalThis,x=O.trustedTypes,D=x?x.createPolicy("lit-html",{createHTML:t=>t}):void 0,P="$lit$",U=`lit$${(Math.random()+"").slice(9)}$`,F="?"+U,T=`<${F}>`,N=document,j=()=>N.createComment(""),z=t=>null===t||"object"!=typeof t&&"function"!=typeof t,B=Array.isArray,Z="[ \t\n\f\r]",W=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,G=/-->/g,q=/>/g,J=RegExp(`>|${Z}(?:([^\\s"'>=/]+)(${Z}*=${Z}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),K=/'/g,Y=/"/g,X=/^(?:script|style|textarea|title)$/i,Q=(t=>(e,...r)=>({_$litType$:t,strings:e,values:r}))(1),tt=Symbol.for("lit-noChange"),et=Symbol.for("lit-nothing"),it=new WeakMap,st=N.createTreeWalker(N,129);function nt(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==D?D.createHTML(e):e}const rt=(t,e)=>{const r=t.length-1,o=[];let a,l=2===e?"<svg>":"",c=W;for(let e=0;e<r;e++){const r=t[e];let h,d,p=-1,u=0;for(;u<r.length&&(c.lastIndex=u,d=c.exec(r),null!==d);)u=c.lastIndex,c===W?"!--"===d[1]?c=G:void 0!==d[1]?c=q:void 0!==d[2]?(X.test(d[2])&&(a=RegExp("</"+d[2],"g")),c=J):void 0!==d[3]&&(c=J):c===J?">"===d[0]?(c=a??W,p=-1):void 0===d[1]?p=-2:(p=c.lastIndex-d[2].length,h=d[1],c=void 0===d[3]?J:'"'===d[3]?Y:K):c===Y||c===K?c=J:c===G||c===q?c=W:(c=J,a=void 0);const f=c===J&&t[e+1].startsWith("/>")?" ":"";l+=c===W?r+T:p>=0?(o.push(h),r.slice(0,p)+P+r.slice(p)+U+f):r+U+(-2===p?e:f)}return[nt(t,l+(t[r]||"<?>")+(2===e?"</svg>":"")),o]};class V{constructor({strings:t,_$litType$:e},r){let o;this.parts=[];let a=0,l=0;const c=t.length-1,h=this.parts,[d,p]=rt(t,e);if(this.el=V.createElement(d,r),st.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(o=st.nextNode())&&h.length<c;){if(1===o.nodeType){if(o.hasAttributes())for(const t of o.getAttributeNames())if(t.endsWith(P)){const e=p[l++],r=o.getAttribute(t).split(U),c=/([.?@])?(.*)/.exec(e);h.push({type:1,index:a,name:c[2],strings:r,ctor:"."===c[1]?k:"?"===c[1]?H:"@"===c[1]?I:R}),o.removeAttribute(t)}else t.startsWith(U)&&(h.push({type:6,index:a}),o.removeAttribute(t));if(X.test(o.tagName)){const t=o.textContent.split(U),e=t.length-1;if(e>0){o.textContent=x?x.emptyScript:"";for(let r=0;r<e;r++)o.append(t[r],j()),st.nextNode(),h.push({type:2,index:++a});o.append(t[e],j())}}}else if(8===o.nodeType)if(o.data===F)h.push({type:2,index:a});else{let t=-1;for(;-1!==(t=o.data.indexOf(U,t+1));)h.push({type:7,index:a}),t+=U.length-1}a++}}static createElement(t,e){const r=N.createElement("template");return r.innerHTML=t,r}}function ot(t,e,r=t,o){if(e===tt)return e;let a=void 0!==o?r._$Co?.[o]:r._$Cl;const l=z(e)?void 0:e._$litDirective$;return a?.constructor!==l&&(a?._$AO?.(!1),void 0===l?a=void 0:(a=new l(t),a._$AT(t,r,o)),void 0!==o?(r._$Co??=[])[o]=a:r._$Cl=a),void 0!==a&&(e=ot(t,a._$AS(t,e.values),a,o)),e}class S{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:r}=this._$AD,o=(t?.creationScope??N).importNode(e,!0);st.currentNode=o;let a=st.nextNode(),l=0,c=0,h=r[0];for(;void 0!==h;){if(l===h.index){let e;2===h.type?e=new M(a,a.nextSibling,this,t):1===h.type?e=new h.ctor(a,h.name,h.strings,this,t):6===h.type&&(e=new L(a,this,t)),this._$AV.push(e),h=r[++c]}l!==h?.index&&(a=st.nextNode(),l++)}return st.currentNode=N,o}p(t){let e=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}}class M{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,o){this.type=2,this._$AH=et,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=ot(this,t,e),z(t)?t===et||null==t||""===t?(this._$AH!==et&&this._$AR(),this._$AH=et):t!==this._$AH&&t!==tt&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>B(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==et&&z(this._$AH)?this._$AA.nextSibling.data=t:this.T(N.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:r}=t,o="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=V.createElement(nt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(e);else{const t=new S(o,this),r=t.u(this.options);t.p(e),this.T(r),this._$AH=t}}_$AC(t){let e=it.get(t.strings);return void 0===e&&it.set(t.strings,e=new V(t)),e}k(t){B(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,o=0;for(const a of t)o===e.length?e.push(r=new M(this.S(j()),this.S(j()),this,this.options)):r=e[o],r._$AI(a),o++;o<e.length&&(this._$AR(r&&r._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class R{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,o,a){this.type=1,this._$AH=et,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=a,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=et}_$AI(t,e=this,r,o){const a=this.strings;let l=!1;if(void 0===a)t=ot(this,t,e,0),l=!z(t)||t!==this._$AH&&t!==tt,l&&(this._$AH=t);else{const o=t;let c,h;for(t=a[0],c=0;c<a.length-1;c++)h=ot(this,o[r+c],e,c),h===tt&&(h=this._$AH[c]),l||=!z(h)||h!==this._$AH[c],h===et?t=et:t!==et&&(t+=(h??"")+a[c+1]),this._$AH[c]=h}l&&!o&&this.j(t)}j(t){t===et?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class k extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===et?void 0:t}}class H extends R{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==et)}}class I extends R{constructor(t,e,r,o,a){super(t,e,r,o,a),this.type=5}_$AI(t,e=this){if((t=ot(this,t,e,0)??et)===tt)return;const r=this._$AH,o=t===et&&r!==et||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,a=t!==et&&(r===et||o);o&&this.element.removeEventListener(this.name,this,r),a&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class L{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){ot(this,t)}}const at=O.litHtmlPolyfillSupport;at?.(V,M),(O.litHtmlVersions??=[]).push("3.1.2");class s extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,r)=>{const o=r?.renderBefore??e;let a=o._$litPart$;if(void 0===a){const t=r?.renderBefore??null;o._$litPart$=a=new M(e.insertBefore(j(),t),t,void 0,r??{})}return a._$AI(t),a})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return tt}}s._$litElement$=!0,s.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:s});const lt=globalThis.litElementPolyfillSupport;lt?.({LitElement:s}),(globalThis.litElementVersions??=[]).push("4.0.4");const ct=1;class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this._$Ct=t,this._$AM=e,this._$Ci=r}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const ht=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends i{constructor(t){if(super(t),t.type!==ct||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const r=t.element.classList;for(const t of this.st)t in e||(r.remove(t),this.st.delete(t));for(const t in e){const o=!!e[t];o===this.st.has(t)||this.nt?.has(t)||(o?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)))}return tt}});var dt="https://static-files-concierge.development.flybits.com/latest/zone.html",pt=2e3,ut="2.0.0-beta.0",ft=function(){var t=this;this.promise=new Promise((function(e,r){t.resolve=e,t.reject=r})),this.then=this.promise.then.bind(this.promise),this.catch=this.promise.catch.bind(this.promise)},yt=function(t,e){e=e||window.location.href,t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var r=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);return null===r?"":r[1]};class ActionLink{static protocol={DETAILS:"details",INAPPBROWSER:"web",BROWSER:"browser",HTTPS:"https",PHONE:"phone",APP:"app",CONCIERGE:"concierge",UNIVERSAL:"universalLink",MAIL:"mail",CUSTOM:"custom"};static PROTOCOLDEFS={details:{contentId:{type:String},overlay:{type:Boolean,default:!1}},web:{url:{type:String}},browser:{url:{type:String}},https:{},phone:{phoneNumber:{type:String}},app:{name:{type:String}},concierge:{container:{type:String},zoneReferenceId:{type:String},filter:{type:String},style:{type:String},overlay:{type:Boolean,default:!1}},universalLink:{ios:{type:String},android:{type:String}},mail:{sendTo:{type:String},subject:{type:String},body:{type:String},cc:{type:String},bcc:{type:String}},custom:{}};constructor(t){this.rawStr="",this.protocol="",this.value="",this.params={},this.data={},this.fromLink(t)}fromLink(t){this.rawStr=t;var e=t.split("://")[0]||"";e=e.toLowerCase();var r=t.indexOf("://")>-1?t.substring(t.indexOf("://")+3):t,o=JSON.parse(JSON.stringify(ActionLink.PROTOCOLDEFS.custom));if(ActionLink.PROTOCOLDEFS[e]?o=JSON.parse(JSON.stringify(ActionLink.PROTOCOLDEFS[e])):(e="custom",r=t),this.protocol=e,this.value=r,o&&Object.keys(o).length){var a={};Object.keys(o).forEach((function(e){const r=yt(e,t);r?o[e].type===Boolean?a[e]="true"===r?.toLowerCase():o[e].type===Number?a[e]=+r:a[e]=r:o[e].hasOwnProperty("default")&&(a[e]=o[e].default)})),this.params=a}}toJSON(){return{rawStr:this.rawStr,protocol:this.protocol,value:this.value,params:this.params,data:this.data}}static parse(t){return new ActionLink(t)}}var gt=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)},mt={guid:function(t){var e="";if(t&&t>0){for(var r=0;r<t;r++)e+=""!==e?"-"+gt():gt();return e}return gt()+gt()+"-"+gt()+"-"+gt()+"-"+gt()+"-"+gt()+gt()+gt()},getByStr:function(t,e){for(var r=(e=(e=e.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),o=0,a=r.length;o<a;++o){var l=r[o];if(!(l in t))return;t=t[l]}return t},setByStr:function(t,e,r){for(var o=(e=(e=e.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),a=0,l=o.length;a<l;a++){var c=o[a];if(c in t&&a+1<l)t=t[c];else{if(c in t||!(a+1<l))return t[c]=r,r;t[c]={},t=t[c]}}},removeObject:function(t,e,r){var o=t.indexOf(e);if(r){var a=t.filter(r);a.length>0&&(o=t.indexOf(a[0]))}return o>=0?t.splice(o,1):t},debounce:function(t,e,r){var o;return function(){var a=this,l=arguments,c=r&&!o;clearTimeout(o),o=setTimeout((function(){o=null,r||t.apply(a,l)}),e),c&&t.apply(a,l)}}};mt.extend=function(){function t(t){return t&&"object"==typeof t&&"[object RegExp]"!==Object.prototype.toString.call(t)&&"[object Date]"!==Object.prototype.toString.call(t)}function e(e,r){var a;return r&&!0===r.clone&&t(e)?o((a=e,Array.isArray(a)?[]:{}),e,r):e}function r(r,a,l){var c=r.slice();return a.forEach((function(a,h){void 0===c[h]?c[h]=e(a,l):t(a)?c[h]=o(r[h],a,l):-1===r.indexOf(a)&&c.push(e(a,l))})),c}function o(a,l,c){var h=Array.isArray(l),d=(c||{arrayMerge:r}).arrayMerge||r;return h?Array.isArray(a)?d(a,l,c):e(l,c):function(r,a,l){var c={};return t(r)&&Object.keys(r).forEach((function(t){c[t]=e(r[t],l)})),Object.keys(a).forEach((function(h){t(a[h])&&r[h]?c[h]=o(r[h],a[h],l):c[h]=e(a[h],l)})),c}(a,l,c)}return o.all=function(t,e){if(!Array.isArray(t)||t.length<2)throw new Error("first argument should be an array with at least two elements");return t.reduce((function(t,r){return o(t,r,e)}))},o}();var vt=function(t){Object.keys(t).forEach((function(e){if("localizations"===e){var r=t.localizations&&t.localizations.en?t.localizations.en:null;r&&Object.assign(t,r)}else"object"!=typeof t[e]||Array.isArray(t[e])?Array.isArray(t[e])&&"object"==typeof t[e][0]&&t[e].forEach((function(t){vt(t)})):vt(t[e])}))},bt=function(t,e){var r=t.data.result&&Array.isArray(t.data.result)?t.data.result[0].toJSON():t.data;vt(r);var o={id:t.id,data:r,uiTemplate:"",style:"",styleStr:"",contentInfo:{id:t.id}},a=e&&"details"===e?t.detailsUI:t.defaultUI||{};return o.uiTemplate=a.layoutHTML||"\x3c!-- --\x3e",o.style=a.styleCSSURL,o.styleStr=a.styleCSS,o},$t={cachedContent:{},getCachedContentDetails:function(t){return this.cachedContent[t]?bt(this.cachedContent[t],"details"):null},getContentDetails:function(t){const e=new ft;var r=this;return Flybits.api.Content.get(t).then((function(t){r.cachedContent[t.result.id]=t.result,e.resolve(bt(t.result,"details"))})).catch((function(t){e.reject(t)})),e.promise},getZoneContent:function(t){const e=new ft;var r=this.cachedContent;return Flybits.api.Zones.getByReferenceId(t).then((function(t){t.zone.modules.forEach((function(t){t.content.forEach((function(t){r[t.id]=t}))})),e.resolve(t.zone)})).catch((function(t){e.reject(t)})),e.promise}};class Zone{static generateOverlayPayload(t){return{id:mt.guid(2),refID:"overlay",name:"Overlay",containers:[{id:mt.guid(),cacheKey:mt.guid(1),layout:"overlay",content:[t]}]}}static generateDetailsPayload(t){return{id:mt.guid(2),refID:"details",name:"Content Details",containers:[{id:mt.guid(),cacheKey:mt.guid(1),layout:"vertical",content:[t]}]}}}var _t={_deferredCtxInit:!1,autoInitCtxManager:function(){this._deferredCtxInit||(this._deferredCtxInit=!0,Flybits.Session.ready.then((function(){"object"!=typeof window.Flybits||Flybits.context.Manager.isReporting||(Flybits.context.Manager.reportDelay=pt,Flybits.context.Manager.initialize())})))},handleContextPayload:function(t){Array.isArray(t)?Flybits.context.Manager.ready.then((function(){t.forEach((function(e){if(e.pluginId&&e.values){var r={};Object.keys(e.values).forEach((function(t){var o=t.replaceAll("query.","");r[o]=e.values[t]})),Flybits.context.Manager.reportCtx(e.pluginId,r)}else console.error("[flightkit] malformed ctx payload object",t)}))})):console.error("[flightkit] malformed ctx payload",t)},handleAnalyticsPayload:function(t){t?.contentInfo?.id?"viewed"!==t.type&&"engaged"!==t.type||t.component?"engaged"!==t.type&&"content_component_event"!==t.type||!t.component?console.error("[flightkit] unsupported analytics event",t):Flybits.context.Manager.ready.then((function(){Flybits.analytics.Manager.reportContentID(t.contentInfo.id,Flybits.analytics.Manager.actions.COMPONENTENGAGED,{name:t.component.name,compID:t.component.compId,type:t.component.id})})):Flybits.context.Manager.ready.then((function(){Flybits.analytics.Manager.reportContentID(t.contentInfo.id,t.type)})):console.error("[flightkit] missing content id in analytics event")}};class FlybitsSlot extends s{static get VERSION(){return ut}static get modes(){return{FIXEDHEIGHT:"fixedheight",FULLHEIGHT:"fullheight",DYNAMICHEIGHT:"dynamicheight"}}static properties={host:{type:String},projectID:{type:String,attribute:"project-id"},renderURL:{type:String,attribute:"render-url"},refID:{type:String,attribute:"ref-id"},pollingEnabled:{type:Boolean,attribute:"polling-enabled"},pollingInterval:{type:Number,attribute:"polling-interval"},renderMode:{type:String,attribute:"render-mode"},overlayOutlet:{type:String|HTMLElement,attribute:"overlay-outlet"},overrideOverlay:{type:Boolean,attribute:"override-overlay"},overrideURLs:{type:Boolean,attribute:"override-urls"},overrideActions:{type:Boolean,attribute:"override-actions"},overlayDismissUI:{type:Boolean,attribute:"overlay-dismiss-ui"},isLoadingOpen:{type:Boolean,attribute:"show-loading"},isErrorOpen:{type:Boolean,attribute:"show-error"},hasLoadingSlot:{type:Boolean},hasErrorSlot:{type:Boolean}};static styles=c`
2
+ // @version 2.0.0-beta.1:Detached: 7df6e2e281734416651dc4e8757368f9fb848218:7df6e2e
3
+ const t=globalThis,r=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),a=new WeakMap;let l=class n{constructor(t,e,r){if(this._$cssResult$=!0,r!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(r&&void 0===t){const r=void 0!==e&&1===e.length;r&&(t=a.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&a.set(e,t))}return t}toString(){return this.cssText}};const c=(t,...e)=>{const r=1===t.length?t[0]:e.reduce(((e,r,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[o+1]),t[0]);return new l(r,t,o)},h=r?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const r of t.cssRules)e+=r.cssText;return(t=>new l("string"==typeof t?t:t+"",void 0,o))(e)})(t):t,{is:d,defineProperty:p,getOwnPropertyDescriptor:u,getOwnPropertyNames:f,getOwnPropertySymbols:y,getPrototypeOf:g}=Object,m=globalThis,v=m.trustedTypes,$=v?v.emptyScript:"",_=m.reactiveElementPolyfillSupport,A=(t,e)=>t,E={toAttribute(t,e){switch(e){case Boolean:t=t?$:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=null!==t;break;case Number:r=null===t?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch(t){r=null}}return r}},w=(t,e)=>!d(t,e),C={attribute:!0,type:String,converter:E,reflect:!1,hasChanged:w};Symbol.metadata??=Symbol("metadata"),m.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=C){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const r=Symbol(),o=this.getPropertyDescriptor(t,r,e);void 0!==o&&p(this.prototype,t,o)}}static getPropertyDescriptor(t,e,r){const{get:o,set:a}=u(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return o?.call(this)},set(e){const l=o?.call(this);a.call(this,e),this.requestUpdate(t,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??C}static _$Ei(){if(this.hasOwnProperty(A("elementProperties")))return;const t=g(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(A("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(A("properties"))){const t=this.properties,e=[...f(t),...y(t)];for(const r of e)this.createProperty(r,t[r])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,r]of e)this.elementProperties.set(t,r)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const r=this._$Eu(t,e);void 0!==r&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const t of r)e.unshift(h(t))}else void 0!==t&&e.push(h(t));return e}static _$Eu(t,e){const r=e.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,o)=>{if(r)e.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const r of o){const o=document.createElement("style"),a=t.litNonce;void 0!==a&&o.setAttribute("nonce",a),o.textContent=r.cssText,e.appendChild(o)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$EC(t,e){const r=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,r);if(void 0!==o&&!0===r.reflect){const a=(void 0!==r.converter?.toAttribute?r.converter:E).toAttribute(e,r.type);this._$Em=t,null==a?this.removeAttribute(o):this.setAttribute(o,a),this._$Em=null}}_$AK(t,e){const r=this.constructor,o=r._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=r.getPropertyOptions(o),a="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:E;this._$Em=o,this[o]=a.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,r){if(void 0!==t){if(r??=this.constructor.getPropertyOptions(t),!(r.hasChanged??w)(this[t],e))return;this.P(t,e,r)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,r){this._$AL.has(t)||this._$AL.set(t,e),!0===r.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,r]of t)!0!==r.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],r)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[A("elementProperties")]=new Map,b[A("finalized")]=new Map,_?.({ReactiveElement:b}),(m.reactiveElementVersions??=[]).push("2.0.4");const O=globalThis,x=O.trustedTypes,D=x?x.createPolicy("lit-html",{createHTML:t=>t}):void 0,P="$lit$",U=`lit$${(Math.random()+"").slice(9)}$`,F="?"+U,T=`<${F}>`,N=document,j=()=>N.createComment(""),z=t=>null===t||"object"!=typeof t&&"function"!=typeof t,B=Array.isArray,Z="[ \t\n\f\r]",W=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,G=/-->/g,q=/>/g,J=RegExp(`>|${Z}(?:([^\\s"'>=/]+)(${Z}*=${Z}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),K=/'/g,Y=/"/g,X=/^(?:script|style|textarea|title)$/i,Q=(t=>(e,...r)=>({_$litType$:t,strings:e,values:r}))(1),tt=Symbol.for("lit-noChange"),et=Symbol.for("lit-nothing"),it=new WeakMap,st=N.createTreeWalker(N,129);function nt(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==D?D.createHTML(e):e}const rt=(t,e)=>{const r=t.length-1,o=[];let a,l=2===e?"<svg>":"",c=W;for(let e=0;e<r;e++){const r=t[e];let h,d,p=-1,u=0;for(;u<r.length&&(c.lastIndex=u,d=c.exec(r),null!==d);)u=c.lastIndex,c===W?"!--"===d[1]?c=G:void 0!==d[1]?c=q:void 0!==d[2]?(X.test(d[2])&&(a=RegExp("</"+d[2],"g")),c=J):void 0!==d[3]&&(c=J):c===J?">"===d[0]?(c=a??W,p=-1):void 0===d[1]?p=-2:(p=c.lastIndex-d[2].length,h=d[1],c=void 0===d[3]?J:'"'===d[3]?Y:K):c===Y||c===K?c=J:c===G||c===q?c=W:(c=J,a=void 0);const f=c===J&&t[e+1].startsWith("/>")?" ":"";l+=c===W?r+T:p>=0?(o.push(h),r.slice(0,p)+P+r.slice(p)+U+f):r+U+(-2===p?e:f)}return[nt(t,l+(t[r]||"<?>")+(2===e?"</svg>":"")),o]};class V{constructor({strings:t,_$litType$:e},r){let o;this.parts=[];let a=0,l=0;const c=t.length-1,h=this.parts,[d,p]=rt(t,e);if(this.el=V.createElement(d,r),st.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(o=st.nextNode())&&h.length<c;){if(1===o.nodeType){if(o.hasAttributes())for(const t of o.getAttributeNames())if(t.endsWith(P)){const e=p[l++],r=o.getAttribute(t).split(U),c=/([.?@])?(.*)/.exec(e);h.push({type:1,index:a,name:c[2],strings:r,ctor:"."===c[1]?k:"?"===c[1]?H:"@"===c[1]?I:R}),o.removeAttribute(t)}else t.startsWith(U)&&(h.push({type:6,index:a}),o.removeAttribute(t));if(X.test(o.tagName)){const t=o.textContent.split(U),e=t.length-1;if(e>0){o.textContent=x?x.emptyScript:"";for(let r=0;r<e;r++)o.append(t[r],j()),st.nextNode(),h.push({type:2,index:++a});o.append(t[e],j())}}}else if(8===o.nodeType)if(o.data===F)h.push({type:2,index:a});else{let t=-1;for(;-1!==(t=o.data.indexOf(U,t+1));)h.push({type:7,index:a}),t+=U.length-1}a++}}static createElement(t,e){const r=N.createElement("template");return r.innerHTML=t,r}}function ot(t,e,r=t,o){if(e===tt)return e;let a=void 0!==o?r._$Co?.[o]:r._$Cl;const l=z(e)?void 0:e._$litDirective$;return a?.constructor!==l&&(a?._$AO?.(!1),void 0===l?a=void 0:(a=new l(t),a._$AT(t,r,o)),void 0!==o?(r._$Co??=[])[o]=a:r._$Cl=a),void 0!==a&&(e=ot(t,a._$AS(t,e.values),a,o)),e}class S{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:r}=this._$AD,o=(t?.creationScope??N).importNode(e,!0);st.currentNode=o;let a=st.nextNode(),l=0,c=0,h=r[0];for(;void 0!==h;){if(l===h.index){let e;2===h.type?e=new M(a,a.nextSibling,this,t):1===h.type?e=new h.ctor(a,h.name,h.strings,this,t):6===h.type&&(e=new L(a,this,t)),this._$AV.push(e),h=r[++c]}l!==h?.index&&(a=st.nextNode(),l++)}return st.currentNode=N,o}p(t){let e=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}}class M{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,o){this.type=2,this._$AH=et,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=ot(this,t,e),z(t)?t===et||null==t||""===t?(this._$AH!==et&&this._$AR(),this._$AH=et):t!==this._$AH&&t!==tt&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>B(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==et&&z(this._$AH)?this._$AA.nextSibling.data=t:this.T(N.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:r}=t,o="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=V.createElement(nt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(e);else{const t=new S(o,this),r=t.u(this.options);t.p(e),this.T(r),this._$AH=t}}_$AC(t){let e=it.get(t.strings);return void 0===e&&it.set(t.strings,e=new V(t)),e}k(t){B(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,o=0;for(const a of t)o===e.length?e.push(r=new M(this.S(j()),this.S(j()),this,this.options)):r=e[o],r._$AI(a),o++;o<e.length&&(this._$AR(r&&r._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class R{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,o,a){this.type=1,this._$AH=et,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=a,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=et}_$AI(t,e=this,r,o){const a=this.strings;let l=!1;if(void 0===a)t=ot(this,t,e,0),l=!z(t)||t!==this._$AH&&t!==tt,l&&(this._$AH=t);else{const o=t;let c,h;for(t=a[0],c=0;c<a.length-1;c++)h=ot(this,o[r+c],e,c),h===tt&&(h=this._$AH[c]),l||=!z(h)||h!==this._$AH[c],h===et?t=et:t!==et&&(t+=(h??"")+a[c+1]),this._$AH[c]=h}l&&!o&&this.j(t)}j(t){t===et?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class k extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===et?void 0:t}}class H extends R{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==et)}}class I extends R{constructor(t,e,r,o,a){super(t,e,r,o,a),this.type=5}_$AI(t,e=this){if((t=ot(this,t,e,0)??et)===tt)return;const r=this._$AH,o=t===et&&r!==et||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,a=t!==et&&(r===et||o);o&&this.element.removeEventListener(this.name,this,r),a&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class L{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){ot(this,t)}}const at=O.litHtmlPolyfillSupport;at?.(V,M),(O.litHtmlVersions??=[]).push("3.1.2");class s extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,r)=>{const o=r?.renderBefore??e;let a=o._$litPart$;if(void 0===a){const t=r?.renderBefore??null;o._$litPart$=a=new M(e.insertBefore(j(),t),t,void 0,r??{})}return a._$AI(t),a})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return tt}}s._$litElement$=!0,s.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:s});const lt=globalThis.litElementPolyfillSupport;lt?.({LitElement:s}),(globalThis.litElementVersions??=[]).push("4.0.4");const ct=1;class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this._$Ct=t,this._$AM=e,this._$Ci=r}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const ht=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends i{constructor(t){if(super(t),t.type!==ct||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const r=t.element.classList;for(const t of this.st)t in e||(r.remove(t),this.st.delete(t));for(const t in e){const o=!!e[t];o===this.st.has(t)||this.nt?.has(t)||(o?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)))}return tt}});var dt="https://static-files-concierge.development.flybits.com/latest/zone.html",pt=2e3,ut="2.0.0-beta.1",ft=function(){var t=this;this.promise=new Promise((function(e,r){t.resolve=e,t.reject=r})),this.then=this.promise.then.bind(this.promise),this.catch=this.promise.catch.bind(this.promise)},yt=function(t,e){e=e||window.location.href,t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var r=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);return null===r?"":r[1]};class ActionLink{static protocol={DETAILS:"details",INAPPBROWSER:"web",BROWSER:"browser",HTTPS:"https",PHONE:"phone",APP:"app",CONCIERGE:"concierge",UNIVERSAL:"universalLink",MAIL:"mail",CUSTOM:"custom"};static PROTOCOLDEFS={details:{contentId:{type:String},overlay:{type:Boolean,default:!1}},web:{url:{type:String}},browser:{url:{type:String}},https:{},phone:{phoneNumber:{type:String}},app:{name:{type:String}},concierge:{container:{type:String},zoneReferenceId:{type:String},filter:{type:String},style:{type:String},overlay:{type:Boolean,default:!1}},universalLink:{ios:{type:String},android:{type:String}},mail:{sendTo:{type:String},subject:{type:String},body:{type:String},cc:{type:String},bcc:{type:String}},custom:{}};constructor(t){this.rawStr="",this.protocol="",this.value="",this.params={},this.data={},this.fromLink(t)}fromLink(t){this.rawStr=t;var e=t.split("://")[0]||"";e=e.toLowerCase();var r=t.indexOf("://")>-1?t.substring(t.indexOf("://")+3):t,o=JSON.parse(JSON.stringify(ActionLink.PROTOCOLDEFS.custom));if(ActionLink.PROTOCOLDEFS[e]?o=JSON.parse(JSON.stringify(ActionLink.PROTOCOLDEFS[e])):(e="custom",r=t),this.protocol=e,this.value=r,o&&Object.keys(o).length){var a={};Object.keys(o).forEach((function(e){const r=yt(e,t);r?o[e].type===Boolean?a[e]="true"===r?.toLowerCase():o[e].type===Number?a[e]=+r:a[e]=r:o[e].hasOwnProperty("default")&&(a[e]=o[e].default)})),this.params=a}}toJSON(){return{rawStr:this.rawStr,protocol:this.protocol,value:this.value,params:this.params,data:this.data}}static parse(t){return new ActionLink(t)}}var gt=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)},mt={guid:function(t){var e="";if(t&&t>0){for(var r=0;r<t;r++)e+=""!==e?"-"+gt():gt();return e}return gt()+gt()+"-"+gt()+"-"+gt()+"-"+gt()+"-"+gt()+gt()+gt()},getByStr:function(t,e){for(var r=(e=(e=e.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),o=0,a=r.length;o<a;++o){var l=r[o];if(!(l in t))return;t=t[l]}return t},setByStr:function(t,e,r){for(var o=(e=(e=e.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),a=0,l=o.length;a<l;a++){var c=o[a];if(c in t&&a+1<l)t=t[c];else{if(c in t||!(a+1<l))return t[c]=r,r;t[c]={},t=t[c]}}},removeObject:function(t,e,r){var o=t.indexOf(e);if(r){var a=t.filter(r);a.length>0&&(o=t.indexOf(a[0]))}return o>=0?t.splice(o,1):t},debounce:function(t,e,r){var o;return function(){var a=this,l=arguments,c=r&&!o;clearTimeout(o),o=setTimeout((function(){o=null,r||t.apply(a,l)}),e),c&&t.apply(a,l)}}};mt.extend=function(){function t(t){return t&&"object"==typeof t&&"[object RegExp]"!==Object.prototype.toString.call(t)&&"[object Date]"!==Object.prototype.toString.call(t)}function e(e,r){var a;return r&&!0===r.clone&&t(e)?o((a=e,Array.isArray(a)?[]:{}),e,r):e}function r(r,a,l){var c=r.slice();return a.forEach((function(a,h){void 0===c[h]?c[h]=e(a,l):t(a)?c[h]=o(r[h],a,l):-1===r.indexOf(a)&&c.push(e(a,l))})),c}function o(a,l,c){var h=Array.isArray(l),d=(c||{arrayMerge:r}).arrayMerge||r;return h?Array.isArray(a)?d(a,l,c):e(l,c):function(r,a,l){var c={};return t(r)&&Object.keys(r).forEach((function(t){c[t]=e(r[t],l)})),Object.keys(a).forEach((function(h){t(a[h])&&r[h]?c[h]=o(r[h],a[h],l):c[h]=e(a[h],l)})),c}(a,l,c)}return o.all=function(t,e){if(!Array.isArray(t)||t.length<2)throw new Error("first argument should be an array with at least two elements");return t.reduce((function(t,r){return o(t,r,e)}))},o}();var vt=function(t){Object.keys(t).forEach((function(e){if("localizations"===e){var r=t.localizations&&t.localizations.en?t.localizations.en:null;r&&Object.assign(t,r)}else"object"!=typeof t[e]||Array.isArray(t[e])?Array.isArray(t[e])&&"object"==typeof t[e][0]&&t[e].forEach((function(t){vt(t)})):vt(t[e])}))},bt=function(t,e){var r=t.data.result&&Array.isArray(t.data.result)?t.data.result[0].toJSON():t.data;vt(r);var o={id:t.id,data:r,uiTemplate:"",style:"",styleStr:"",contentInfo:{id:t.id}},a=e&&"details"===e?t.detailsUI:t.defaultUI||{};return o.uiTemplate=a.layoutHTML||"\x3c!-- --\x3e",o.style=a.styleCSSURL,o.styleStr=a.styleCSS,o},$t={cachedContent:{},getCachedContentDetails:function(t){return this.cachedContent[t]?bt(this.cachedContent[t],"details"):null},getContentDetails:function(t){const e=new ft;var r=this;return Flybits.api.Content.get(t).then((function(t){r.cachedContent[t.result.id]=t.result,e.resolve(bt(t.result,"details"))})).catch((function(t){e.reject(t)})),e.promise},getZoneContent:function(t){const e=new ft;var r=this.cachedContent;return Flybits.api.Zones.getByReferenceId(t).then((function(t){t.zone.modules.forEach((function(t){t.content.forEach((function(t){r[t.id]=t}))})),e.resolve(t.zone)})).catch((function(t){e.reject(t)})),e.promise}};class Zone{static generateOverlayPayload(t){return{id:mt.guid(2),refID:"overlay",name:"Overlay",containers:[{id:mt.guid(),cacheKey:mt.guid(1),layout:"overlay",content:[t]}]}}static generateDetailsPayload(t){return{id:mt.guid(2),refID:"details",name:"Content Details",containers:[{id:mt.guid(),cacheKey:mt.guid(1),layout:"vertical",content:[t]}]}}}var _t={_deferredCtxInit:!1,autoInitCtxManager:function(){this._deferredCtxInit||(this._deferredCtxInit=!0,Flybits.Session.ready.then((function(){"object"!=typeof window.Flybits||Flybits.context.Manager.isReporting||(Flybits.context.Manager.reportDelay=pt,Flybits.context.Manager.initialize())})))},handleContextPayload:function(t){Array.isArray(t)?Flybits.context.Manager.ready.then((function(){t.forEach((function(e){if(e.pluginId&&e.values){var r={};Object.keys(e.values).forEach((function(t){var o=t.replaceAll("query.","");r[o]=e.values[t]})),Flybits.context.Manager.reportCtx(e.pluginId,r)}else console.error("[flightkit] malformed ctx payload object",t)}))})):console.error("[flightkit] malformed ctx payload",t)},handleAnalyticsPayload:function(t){t?.contentInfo?.id?"viewed"!==t.type&&"engaged"!==t.type||t.component?"engaged"!==t.type&&"content_component_event"!==t.type||!t.component?console.error("[flightkit] unsupported analytics event",t):Flybits.context.Manager.ready.then((function(){Flybits.analytics.Manager.reportContentID(t.contentInfo.id,Flybits.analytics.Manager.actions.COMPONENTENGAGED,{name:t.component.name,compID:t.component.compId,type:t.component.id})})):Flybits.context.Manager.ready.then((function(){Flybits.analytics.Manager.reportContentID(t.contentInfo.id,t.type)})):console.error("[flightkit] missing content id in analytics event")}};class FlybitsSlot extends s{static get VERSION(){return ut}static get modes(){return{FIXEDHEIGHT:"fixedheight",FULLHEIGHT:"fullheight",DYNAMICHEIGHT:"dynamicheight"}}static properties={host:{type:String},projectID:{type:String,attribute:"project-id"},renderURL:{type:String,attribute:"render-url"},refID:{type:String,attribute:"ref-id"},pollingEnabled:{type:Boolean,attribute:"polling-enabled"},pollingInterval:{type:Number,attribute:"polling-interval"},renderMode:{type:String,attribute:"render-mode"},overlayOutlet:{type:String|HTMLElement,attribute:"overlay-outlet"},overrideOverlay:{type:Boolean,attribute:"override-overlay"},overrideURLs:{type:Boolean,attribute:"override-urls"},overrideActions:{type:Boolean,attribute:"override-actions"},overlayDismissUI:{type:Boolean,attribute:"overlay-dismiss-ui"},isLoadingOpen:{type:Boolean,attribute:"show-loading"},isErrorOpen:{type:Boolean,attribute:"show-error"},hasLoadingSlot:{type:Boolean},hasErrorSlot:{type:Boolean}};static styles=c`
4
4
  :host {
5
5
  position: relative;
6
6
  display: block;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "flightkit",
3
- "version": "2.0.0-beta.0",
3
+ "version": "2.0.0-beta.1",
4
4
  "description": "",
5
- "main": "index.js",
5
+ "main": "dist/flightkit.js",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1",
8
8
  "document": "gulp jsdoc",