cas-ds-web-components 1.2.45 → 1.2.47
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/build/cas-banners-cta.js +175 -0
- package/build/cas-booking-box.js +23 -26
- package/build/cas-ds-web-components.js +639 -642
- package/build/cas-header.js +536 -539
- package/package.json +1 -1
- package/build/cas-footer.js +0 -304
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
(function(g,v){typeof exports=="object"&&typeof module<"u"?v(exports):typeof define=="function"&&define.amd?define(["exports"],v):(g=typeof globalThis<"u"?globalThis:g||self,v(g["cas-banners-cta"]={}))})(this,function(g){"use strict";/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/const v=window,M=v.ShadowRoot&&(v.ShadyCSS===void 0||v.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,L=Symbol(),W=new WeakMap;class q{constructor(t,e,s){if(this._$cssResult$=!0,s!==L)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(M&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=W.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&W.set(e,t))}return t}toString(){return this.cssText}}const dt=n=>new q(typeof n=="string"?n:n+"",void 0,L),ct=(n,...t)=>{const e=n.length===1?n[0]:t.reduce((s,i,r)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+n[r+1],n[0]);return new q(e,n,L)},ut=(n,t)=>{M?n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const s=document.createElement("style"),i=v.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,n.appendChild(s)})},V=M?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return dt(e)})(n):n;/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2017 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
+
*/var j;const R=window,Z=R.trustedTypes,pt=Z?Z.emptyScript:"",J=R.reactiveElementPolyfillSupport,B={toAttribute(n,t){switch(t){case Boolean:n=n?pt:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},K=(n,t)=>t!==n&&(t==t||n==n),z={attribute:!0,type:String,converter:B,reflect:!1,hasChanged:K};class m extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,s)=>{const i=this._$Ep(s,e);i!==void 0&&(this._$Ev.set(i,s),t.push(i))}),t}static createProperty(t,e=z){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=typeof t=="symbol"?Symbol():"__"+t,i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(i){const r=this[t];this[e]=i,this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||z}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,s=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const i of s)this.createProperty(i,e[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(V(i))}else t!==void 0&&e.push(V(t));return e}static _$Ep(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,s;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)===null||s===void 0||s.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return ut(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostConnected)===null||s===void 0?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostDisconnected)===null||s===void 0?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e,s=z){var i;const r=this.constructor._$Ep(t,s);if(r!==void 0&&s.reflect===!0){const o=(((i=s.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?s.converter:B).toAttribute(e,s.type);this._$El=t,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}_$AK(t,e){var s;const i=this.constructor,r=i._$Ev.get(t);if(r!==void 0&&this._$El!==r){const o=i.getPropertyOptions(r),d=typeof o.converter=="function"?{fromAttribute:o.converter}:((s=o.converter)===null||s===void 0?void 0:s.fromAttribute)!==void 0?o.converter:B;this._$El=r,this[r]=d.fromAttribute(e,o.type),this._$El=null}}requestUpdate(t,e,s){let i=!0;t!==void 0&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||K)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,s))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((i,r)=>this[r]=i),this._$Ei=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),(t=this._$ES)===null||t===void 0||t.forEach(i=>{var r;return(r=i.hostUpdate)===null||r===void 0?void 0:r.call(i)}),this.update(s)):this._$Ek()}catch(i){throw e=!1,this._$Ek(),i}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(s=>{var i;return(i=s.hostUpdated)===null||i===void 0?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,s)=>this._$EO(s,this[s],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}m.finalized=!0,m.elementProperties=new Map,m.elementStyles=[],m.shadowRootOptions={mode:"open"},J?.({ReactiveElement:m}),((j=R.reactiveElementVersions)!==null&&j!==void 0?j:R.reactiveElementVersions=[]).push("1.4.2");/**
|
|
10
|
+
* @license
|
|
11
|
+
* Copyright 2017 Google LLC
|
|
12
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
+
*/var I;const T=window,y=T.trustedTypes,G=y?y.createPolicy("lit-html",{createHTML:n=>n}):void 0,_=`lit$${(Math.random()+"").slice(9)}$`,Q="?"+_,$t=`<${Q}>`,A=document,w=(n="")=>A.createComment(n),C=n=>n===null||typeof n!="object"&&typeof n!="function",X=Array.isArray,vt=n=>X(n)||typeof n?.[Symbol.iterator]=="function",P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Y=/-->/g,tt=/>/g,f=RegExp(`>|[
|
|
14
|
+
\f\r](?:([^\\s"'>=/]+)([
|
|
15
|
+
\f\r]*=[
|
|
16
|
+
\f\r]*(?:[^
|
|
17
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),et=/'/g,st=/"/g,it=/^(?:script|style|textarea|title)$/i,_t=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),ft=_t(1),b=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),nt=new WeakMap,x=A.createTreeWalker(A,129,null,!1),gt=(n,t)=>{const e=n.length-1,s=[];let i,r=t===2?"<svg>":"",o=P;for(let l=0;l<e;l++){const a=n[l];let p,h,c=-1,$=0;for(;$<a.length&&(o.lastIndex=$,h=o.exec(a),h!==null);)$=o.lastIndex,o===P?h[1]==="!--"?o=Y:h[1]!==void 0?o=tt:h[2]!==void 0?(it.test(h[2])&&(i=RegExp("</"+h[2],"g")),o=f):h[3]!==void 0&&(o=f):o===f?h[0]===">"?(o=i??P,c=-1):h[1]===void 0?c=-2:(c=o.lastIndex-h[2].length,p=h[1],o=h[3]===void 0?f:h[3]==='"'?st:et):o===st||o===et?o=f:o===Y||o===tt?o=P:(o=f,i=void 0);const O=o===f&&n[l+1].startsWith("/>")?" ":"";r+=o===P?a+$t:c>=0?(s.push(p),a.slice(0,c)+"$lit$"+a.slice(c)+_+O):a+_+(c===-2?(s.push(void 0),l):O)}const d=r+(n[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return[G!==void 0?G.createHTML(d):d,s]};class U{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,o=0;const d=t.length-1,l=this.parts,[a,p]=gt(t,e);if(this.el=U.createElement(a,s),x.currentNode=this.el.content,e===2){const h=this.el.content,c=h.firstChild;c.remove(),h.append(...c.childNodes)}for(;(i=x.nextNode())!==null&&l.length<d;){if(i.nodeType===1){if(i.hasAttributes()){const h=[];for(const c of i.getAttributeNames())if(c.endsWith("$lit$")||c.startsWith(_)){const $=p[o++];if(h.push(c),$!==void 0){const O=i.getAttribute($.toLowerCase()+"$lit$").split(_),N=/([.?@])?(.*)/.exec($);l.push({type:1,index:r,name:N[2],strings:O,ctor:N[1]==="."?yt:N[1]==="?"?bt:N[1]==="@"?xt:H})}else l.push({type:6,index:r})}for(const c of h)i.removeAttribute(c)}if(it.test(i.tagName)){const h=i.textContent.split(_),c=h.length-1;if(c>0){i.textContent=y?y.emptyScript:"";for(let $=0;$<c;$++)i.append(h[$],w()),x.nextNode(),l.push({type:2,index:++r});i.append(h[c],w())}}}else if(i.nodeType===8)if(i.data===Q)l.push({type:2,index:r});else{let h=-1;for(;(h=i.data.indexOf(_,h+1))!==-1;)l.push({type:7,index:r}),h+=_.length-1}r++}}static createElement(t,e){const s=A.createElement("template");return s.innerHTML=t,s}}function S(n,t,e=n,s){var i,r,o,d;if(t===b)return t;let l=s!==void 0?(i=e._$Co)===null||i===void 0?void 0:i[s]:e._$Cl;const a=C(t)?void 0:t._$litDirective$;return l?.constructor!==a&&((r=l?._$AO)===null||r===void 0||r.call(l,!1),a===void 0?l=void 0:(l=new a(n),l._$AT(n,e,s)),s!==void 0?((o=(d=e)._$Co)!==null&&o!==void 0?o:d._$Co=[])[s]=l:e._$Cl=l),l!==void 0&&(t=S(n,l._$AS(n,t.values),l,s)),t}class mt{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:s},parts:i}=this._$AD,r=((e=t?.creationScope)!==null&&e!==void 0?e:A).importNode(s,!0);x.currentNode=r;let o=x.nextNode(),d=0,l=0,a=i[0];for(;a!==void 0;){if(d===a.index){let p;a.type===2?p=new k(o,o.nextSibling,this,t):a.type===1?p=new a.ctor(o,a.name,a.strings,this,t):a.type===6&&(p=new St(o,this,t)),this.u.push(p),a=i[++l]}d!==a?.index&&(o=x.nextNode(),d++)}return r}p(t){let e=0;for(const s of this.u)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class k{constructor(t,e,s,i){var r;this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cm=(r=i?.isConnected)===null||r===void 0||r}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),C(t)?t===u||t==null||t===""?(this._$AH!==u&&this._$AR(),this._$AH=u):t!==this._$AH&&t!==b&&this.g(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):vt(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==u&&C(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){var e;const{values:s,_$litType$:i}=t,r=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=U.createElement(i.h,this.options)),i);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===r)this._$AH.p(s);else{const o=new mt(r,this),d=o.v(this.options);o.p(s),this.T(d),this._$AH=o}}_$AC(t){let e=nt.get(t.strings);return e===void 0&&nt.set(t.strings,e=new U(t)),e}k(t){X(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const r of t)i===e.length?e.push(s=new k(this.O(w()),this.O(w()),this,this.options)):s=e[i],s._$AI(r),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)===null||s===void 0||s.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cm=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class H{constructor(t,e,s,i,r){this.type=1,this._$AH=u,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=u}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,s,i){const r=this.strings;let o=!1;if(r===void 0)t=S(this,t,e,0),o=!C(t)||t!==this._$AH&&t!==b,o&&(this._$AH=t);else{const d=t;let l,a;for(t=r[0],l=0;l<r.length-1;l++)a=S(this,d[s+l],e,l),a===b&&(a=this._$AH[l]),o||(o=!C(a)||a!==this._$AH[l]),a===u?t=u:t!==u&&(t+=(a??"")+r[l+1]),this._$AH[l]=a}o&&!i&&this.j(t)}j(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class yt extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===u?void 0:t}}const At=y?y.emptyScript:"";class bt extends H{constructor(){super(...arguments),this.type=4}j(t){t&&t!==u?this.element.setAttribute(this.name,At):this.element.removeAttribute(this.name)}}class xt extends H{constructor(t,e,s,i,r){super(t,e,s,i,r),this.type=5}_$AI(t,e=this){var s;if((t=(s=S(this,t,e,0))!==null&&s!==void 0?s:u)===b)return;const i=this._$AH,r=t===u&&i!==u||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==u&&(i===u||r);r&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;typeof this._$AH=="function"?this._$AH.call((s=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&s!==void 0?s:this.element,t):this._$AH.handleEvent(t)}}class St{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}}const ot=T.litHtmlPolyfillSupport;ot?.(U,k),((I=T.litHtmlVersions)!==null&&I!==void 0?I:T.litHtmlVersions=[]).push("2.4.0");const Et=(n,t,e)=>{var s,i;const r=(s=e?.renderBefore)!==null&&s!==void 0?s:t;let o=r._$litPart$;if(o===void 0){const d=(i=e?.renderBefore)!==null&&i!==void 0?i:null;r._$litPart$=o=new k(t.insertBefore(w(),d),d,void 0,e??{})}return o._$AI(n),o};/**
|
|
18
|
+
* @license
|
|
19
|
+
* Copyright 2017 Google LLC
|
|
20
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
+
*/var D,F;class E extends m{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const s=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=s.firstChild),s}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Et(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return b}}E.finalized=!0,E._$litElement$=!0,(D=globalThis.litElementHydrateSupport)===null||D===void 0||D.call(globalThis,{LitElement:E});const rt=globalThis.litElementPolyfillSupport;rt?.({LitElement:E}),((F=globalThis.litElementVersions)!==null&&F!==void 0?F:globalThis.litElementVersions=[]).push("3.2.2");/**
|
|
22
|
+
* @license
|
|
23
|
+
* Copyright 2020 Google LLC
|
|
24
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
+
*/const wt=Symbol.for(""),Ct=n=>{if(n?.r===wt)return n?._$litStatic$},lt=new Map,Pt=n=>(t,...e)=>{const s=e.length;let i,r;const o=[],d=[];let l,a=0,p=!1;for(;a<s;){for(l=t[a];a<s&&(r=e[a],(i=Ct(r))!==void 0);)l+=i+t[++a],p=!0;d.push(r),o.push(l),a++}if(a===s&&o.push(t[s]),p){const h=o.join("$$lit$$");(t=lt.get(h))===void 0&&(o.raw=o,lt.set(h,t=o)),e=d}return n(t,...e)},at=Pt(ft);var Ut=ct`
|
|
26
|
+
.card {
|
|
27
|
+
scroll-snap-align: center;
|
|
28
|
+
display: grid;
|
|
29
|
+
grid-template-columns: 177px 1fr;
|
|
30
|
+
border-radius: 20px;
|
|
31
|
+
width: 487px;
|
|
32
|
+
min-width: 487px;
|
|
33
|
+
border: 1px solid var(--background-background-2, #F2F5F9);
|
|
34
|
+
background: var(--background-background, #FFF);
|
|
35
|
+
box-shadow: 0px 30px 40px 0px rgba(200, 200, 200, 0.25);
|
|
36
|
+
}
|
|
37
|
+
.card__image {
|
|
38
|
+
position: relative;
|
|
39
|
+
border-radius: 20px 0 0 20px;
|
|
40
|
+
height: 248px;
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
}
|
|
43
|
+
.card__image img {
|
|
44
|
+
width: 100%;
|
|
45
|
+
height: 100%;
|
|
46
|
+
object-fit: cover;
|
|
47
|
+
}
|
|
48
|
+
.card__content {
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
gap: 4px;
|
|
52
|
+
padding: 32px 24px;
|
|
53
|
+
color: #364855;
|
|
54
|
+
}
|
|
55
|
+
.card__link {
|
|
56
|
+
margin-top: 8px;
|
|
57
|
+
display: flex;
|
|
58
|
+
justify-content: start;
|
|
59
|
+
}
|
|
60
|
+
.card__link .button {
|
|
61
|
+
display: flex;
|
|
62
|
+
border-radius: 20px;
|
|
63
|
+
border: 1px solid var(--tertiary-tertiary-1, #203442);
|
|
64
|
+
background: var(--background-background, #FFF);
|
|
65
|
+
padding: 4px 16px;
|
|
66
|
+
}
|
|
67
|
+
a {
|
|
68
|
+
text-decoration: none;
|
|
69
|
+
color: currentColor;
|
|
70
|
+
}
|
|
71
|
+
.list {
|
|
72
|
+
display: flex;
|
|
73
|
+
gap: 16px;
|
|
74
|
+
padding: 32px 32px 86px;
|
|
75
|
+
|
|
76
|
+
overflow-x: auto;
|
|
77
|
+
scroll-snap-type: x mandatory;
|
|
78
|
+
scroll-behavior: smooth;
|
|
79
|
+
//width: calc(100vw - 32px);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.actions {
|
|
83
|
+
display: none;
|
|
84
|
+
justify-content: end;
|
|
85
|
+
gap: 12px;
|
|
86
|
+
padding: 0 16px;
|
|
87
|
+
margin-top: -64px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.actions button {
|
|
91
|
+
background-color: #4DBFB8;
|
|
92
|
+
width: 40px;
|
|
93
|
+
height: 40px;
|
|
94
|
+
border-radius: 50%;
|
|
95
|
+
border: none;
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
display: flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
justify-content: center;
|
|
100
|
+
--eloisa-ds-icon-color: currentColor;
|
|
101
|
+
color: #FFF;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.actions button:disabled {
|
|
105
|
+
background-color: #E9EBEC;
|
|
106
|
+
color: #909AA1;
|
|
107
|
+
cursor: initial;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@media (max-width: 768px) {
|
|
111
|
+
.list {
|
|
112
|
+
padding: 32px 16px;
|
|
113
|
+
}
|
|
114
|
+
.card {
|
|
115
|
+
display: flex;
|
|
116
|
+
width: 315px;
|
|
117
|
+
min-width: 315px;
|
|
118
|
+
flex-direction: column;
|
|
119
|
+
}
|
|
120
|
+
.card__image {
|
|
121
|
+
border-radius: 20px 20px 0 0;
|
|
122
|
+
height: 149px;
|
|
123
|
+
}
|
|
124
|
+
.card__content {
|
|
125
|
+
padding: 16px 16px 32px 16px;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
`;class ht extends E{static styles=Ut;static shadowRootOptions={...E.shadowRootOptions,mode:"open"};static properties={name:{type:String},value:{type:String},data:{type:Array}};constructor(){super(),this.name="",this.value="",this.data=[]}updated(t){if(t.has("data")){const e=this.shadowRoot.querySelector(".list"),s=this.shadowRoot.querySelector(".actions");e.scrollWidth>e.clientWidth&&(s.style.display="flex")}}firstUpdated(){this.data=this.data.map(i=>({subtitle:i.Subtitulo,title:i.Identifier,description:i.Bajada,images:{desktop:i.imagenes[0]?.imagen,mobile:i.imagenes[1]?.imagen},link_button:i.LinkBoton,name_button:i.TextoBoton})),this.requestUpdate();const t=this.shadowRoot.querySelector(".list"),e=this.shadowRoot.querySelector(".prev"),s=this.shadowRoot.querySelector(".next");t.addEventListener("scroll",i=>this.handleScroll(i,e,s)),e.addEventListener("click",this.handlePrev),s.addEventListener("click",this.handleNext)}handleScroll=(t,e,s)=>{const i=t.target.scrollLeft,r=t.target.scrollWidth,o=t.target.clientWidth,d=r-i-o;i>0?e.disabled=!1:e.disabled=!0,d>0?s.disabled=!1:s.disabled=!0};handlePrev=()=>{const t=this.shadowRoot.querySelector(".list");t.scrollLeft-=480};handleNext=()=>{const t=this.shadowRoot.querySelector(".list");t.scrollLeft+=480};render(){const t=({subtitle:e,title:s,description:i,images:r,name_button:o="Ver m\xE1s",link_button:d})=>{const l=({text:a,length:p=100})=>a?.length>p?`${a.substring(0,p)}...`:a;return at`
|
|
129
|
+
<article class="card">
|
|
130
|
+
<div class="card__image">
|
|
131
|
+
<picture>
|
|
132
|
+
<source media="(min-width: 600px)" srcset="${r?.desktop}">
|
|
133
|
+
<img src="${r?.mobile}" alt="${s}">
|
|
134
|
+
</picture>
|
|
135
|
+
</div>
|
|
136
|
+
<div class="card__content">
|
|
137
|
+
<cas-text variant="body2"
|
|
138
|
+
>${l({text:e,length:38})}</cas-text
|
|
139
|
+
>
|
|
140
|
+
<cas-text variant="headline2"
|
|
141
|
+
>${l({text:s,length:38})}</cas-text
|
|
142
|
+
>
|
|
143
|
+
<cas-text variant="caption2"
|
|
144
|
+
>${l({text:i,length:83})}</cas-text
|
|
145
|
+
>
|
|
146
|
+
<div class="card__link">
|
|
147
|
+
<a href="${d}" class="button">
|
|
148
|
+
<cas-text variant="footnote1">${o}</cas-text>
|
|
149
|
+
</a>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
</article>
|
|
153
|
+
`};return at`
|
|
154
|
+
<section class="container">
|
|
155
|
+
<div class="list">${this.data.map(e=>t(e))}</div>
|
|
156
|
+
<div class="actions">
|
|
157
|
+
<button class="prev" disabled>
|
|
158
|
+
<cas-icon
|
|
159
|
+
disabled
|
|
160
|
+
variant="flat"
|
|
161
|
+
name="flat-arrowLeft"
|
|
162
|
+
size="16"
|
|
163
|
+
></cas-icon>
|
|
164
|
+
</button>
|
|
165
|
+
<button class="next">
|
|
166
|
+
<cas-icon
|
|
167
|
+
disabled
|
|
168
|
+
variant="flat"
|
|
169
|
+
name="flat-arrowRight"
|
|
170
|
+
size="16"
|
|
171
|
+
></cas-icon>
|
|
172
|
+
</button>
|
|
173
|
+
</div>
|
|
174
|
+
</section>
|
|
175
|
+
`}}customElements.get("cas-banners-cta")||customElements.define("cas-banners-cta",ht),g.CasBannersCta=ht,Object.defineProperties(g,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/build/cas-booking-box.js
CHANGED
|
@@ -2,27 +2,27 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const v=window,
|
|
5
|
+
*/const v=window,D=v.ShadowRoot&&(v.ShadyCSS===void 0||v.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,B=Symbol(),W=new WeakMap;class K{constructor(t,e,i){if(this._$cssResult$=!0,i!==B)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(D&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=W.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&W.set(e,t))}return t}toString(){return this.cssText}}const pt=s=>new K(typeof s=="string"?s:s+"",void 0,B),ut=(s,...t)=>{const e=s.length===1?s[0]:t.reduce((i,o,n)=>i+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+s[n+1],s[0]);return new K(e,s,B)},mt=(s,t)=>{D?s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const i=document.createElement("style"),o=v.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=e.cssText,s.appendChild(i)})},Z=D?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return pt(e)})(s):s;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var N;const
|
|
9
|
+
*/var N;const U=window,J=U.trustedTypes,vt=J?J.emptyScript:"",X=U.reactiveElementPolyfillSupport,I={toAttribute(s,t){switch(t){case Boolean:s=s?vt:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},Q=(s,t)=>t!==s&&(t==t||s==s),z={attribute:!0,type:String,converter:I,reflect:!1,hasChanged:Q};class A extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,i)=>{const o=this._$Ep(i,e);o!==void 0&&(this._$Ev.set(o,i),t.push(o))}),t}static createProperty(t,e=z){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i=typeof t=="symbol"?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);o!==void 0&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const n=this[t];this[e]=o,this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||z}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,i=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const o of i)this.createProperty(o,e[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const o of i)e.unshift(Z(o))}else t!==void 0&&e.push(Z(t));return e}static _$Ep(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,i;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return mt(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostConnected)===null||i===void 0?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostDisconnected)===null||i===void 0?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=z){var o;const n=this.constructor._$Ep(t,i);if(n!==void 0&&i.reflect===!0){const a=(((o=i.converter)===null||o===void 0?void 0:o.toAttribute)!==void 0?i.converter:I).toAttribute(e,i.type);this._$El=t,a==null?this.removeAttribute(n):this.setAttribute(n,a),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,n=o._$Ev.get(t);if(n!==void 0&&this._$El!==n){const a=o.getPropertyOptions(n),h=typeof a.converter=="function"?{fromAttribute:a.converter}:((i=a.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?a.converter:I;this._$El=n,this[n]=h.fromAttribute(e,a.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||Q)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((o,n)=>this[n]=o),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$ES)===null||t===void 0||t.forEach(o=>{var n;return(n=o.hostUpdate)===null||n===void 0?void 0:n.call(o)}),this.update(i)):this._$Ek()}catch(o){throw e=!1,this._$Ek(),o}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(i=>{var o;return(o=i.hostUpdated)===null||o===void 0?void 0:o.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,i)=>this._$EO(i,this[i],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}A.finalized=!0,A.elementProperties=new Map,A.elementStyles=[],A.shadowRootOptions={mode:"open"},X?.({ReactiveElement:A}),((N=U.reactiveElementVersions)!==null&&N!==void 0?N:U.reactiveElementVersions=[]).push("1.4.2");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/var
|
|
13
|
+
*/var L;const R=window,x=R.trustedTypes,Y=x?x.createPolicy("lit-html",{createHTML:s=>s}):void 0,b=`lit$${(Math.random()+"").slice(9)}$`,G="?"+b,bt=`<${G}>`,y=document,E=(s="")=>y.createComment(s),S=s=>s===null||typeof s!="object"&&typeof s!="function",tt=Array.isArray,ft=s=>tt(s)||typeof s?.[Symbol.iterator]=="function",C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,et=/-->/g,it=/>/g,f=RegExp(`>|[
|
|
14
14
|
\f\r](?:([^\\s"'>=/]+)([
|
|
15
15
|
\f\r]*=[
|
|
16
16
|
\f\r]*(?:[^
|
|
17
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
17
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),ot=/'/g,st=/"/g,nt=/^(?:script|style|textarea|title)$/i,$t=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),gt=$t(1),$=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),at=new WeakMap,_=y.createTreeWalker(y,129,null,!1),At=(s,t)=>{const e=s.length-1,i=[];let o,n=t===2?"<svg>":"",a=C;for(let r=0;r<e;r++){const l=s[r];let u,d,c=-1,m=0;for(;m<l.length&&(a.lastIndex=m,d=a.exec(l),d!==null);)m=a.lastIndex,a===C?d[1]==="!--"?a=et:d[1]!==void 0?a=it:d[2]!==void 0?(nt.test(d[2])&&(o=RegExp("</"+d[2],"g")),a=f):d[3]!==void 0&&(a=f):a===f?d[0]===">"?(a=o??C,c=-1):d[1]===void 0?c=-2:(c=a.lastIndex-d[2].length,u=d[1],a=d[3]===void 0?f:d[3]==='"'?st:ot):a===st||a===ot?a=f:a===et||a===it?a=C:(a=f,o=void 0);const H=a===f&&s[r+1].startsWith("/>")?" ":"";n+=a===C?l+bt:c>=0?(i.push(u),l.slice(0,c)+"$lit$"+l.slice(c)+b+H):l+b+(c===-2?(i.push(void 0),r):H)}const h=n+(s[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Y!==void 0?Y.createHTML(h):h,i]};class T{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,a=0;const h=t.length-1,r=this.parts,[l,u]=At(t,e);if(this.el=T.createElement(l,i),_.currentNode=this.el.content,e===2){const d=this.el.content,c=d.firstChild;c.remove(),d.append(...c.childNodes)}for(;(o=_.nextNode())!==null&&r.length<h;){if(o.nodeType===1){if(o.hasAttributes()){const d=[];for(const c of o.getAttributeNames())if(c.endsWith("$lit$")||c.startsWith(b)){const m=u[a++];if(d.push(c),m!==void 0){const H=o.getAttribute(m.toLowerCase()+"$lit$").split(b),O=/([.?@])?(.*)/.exec(m);r.push({type:1,index:n,name:O[2],strings:H,ctor:O[1]==="."?yt:O[1]==="?"?wt:O[1]==="@"?kt:M})}else r.push({type:6,index:n})}for(const c of d)o.removeAttribute(c)}if(nt.test(o.tagName)){const d=o.textContent.split(b),c=d.length-1;if(c>0){o.textContent=x?x.emptyScript:"";for(let m=0;m<c;m++)o.append(d[m],E()),_.nextNode(),r.push({type:2,index:++n});o.append(d[c],E())}}}else if(o.nodeType===8)if(o.data===G)r.push({type:2,index:n});else{let d=-1;for(;(d=o.data.indexOf(b,d+1))!==-1;)r.push({type:7,index:n}),d+=b.length-1}n++}}static createElement(t,e){const i=y.createElement("template");return i.innerHTML=t,i}}function w(s,t,e=s,i){var o,n,a,h;if(t===$)return t;let r=i!==void 0?(o=e._$Co)===null||o===void 0?void 0:o[i]:e._$Cl;const l=S(t)?void 0:t._$litDirective$;return r?.constructor!==l&&((n=r?._$AO)===null||n===void 0||n.call(r,!1),l===void 0?r=void 0:(r=new l(s),r._$AT(s,e,i)),i!==void 0?((a=(h=e)._$Co)!==null&&a!==void 0?a:h._$Co=[])[i]=r:e._$Cl=r),r!==void 0&&(t=w(s,r._$AS(s,t.values),r,i)),t}class xt{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,n=((e=t?.creationScope)!==null&&e!==void 0?e:y).importNode(i,!0);_.currentNode=n;let a=_.nextNode(),h=0,r=0,l=o[0];for(;l!==void 0;){if(h===l.index){let u;l.type===2?u=new P(a,a.nextSibling,this,t):l.type===1?u=new l.ctor(a,l.name,l.strings,this,t):l.type===6&&(u=new Et(a,this,t)),this.u.push(u),l=o[++r]}h!==l?.index&&(a=_.nextNode(),h++)}return n}p(t){let e=0;for(const i of this.u)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class P{constructor(t,e,i,o){var n;this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=(n=o?.isConnected)===null||n===void 0||n}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=w(this,t,e),S(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==$&&this.g(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ft(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==p&&S(this._$AH)?this._$AA.nextSibling.data=t:this.T(y.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,n=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=T.createElement(o.h,this.options)),o);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===n)this._$AH.p(i);else{const a=new xt(n,this),h=a.v(this.options);a.p(i),this.T(h),this._$AH=a}}_$AC(t){let e=at.get(t.strings);return e===void 0&&at.set(t.strings,e=new T(t)),e}k(t){tt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const n of t)o===e.length?e.push(i=new P(this.O(E()),this.O(E()),this,this.options)):i=e[o],i._$AI(n),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,e);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){var e;this._$AM===void 0&&(this._$Cm=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class M{constructor(t,e,i,o,n){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=p}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const n=this.strings;let a=!1;if(n===void 0)t=w(this,t,e,0),a=!S(t)||t!==this._$AH&&t!==$,a&&(this._$AH=t);else{const h=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=w(this,h[i+r],e,r),l===$&&(l=this._$AH[r]),a||(a=!S(l)||l!==this._$AH[r]),l===p?t=p:t!==p&&(t+=(l??"")+n[r+1]),this._$AH[r]=l}a&&!o&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class yt extends M{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}}const _t=x?x.emptyScript:"";class wt extends M{constructor(){super(...arguments),this.type=4}j(t){t&&t!==p?this.element.setAttribute(this.name,_t):this.element.removeAttribute(this.name)}}class kt extends M{constructor(t,e,i,o,n){super(t,e,i,o,n),this.type=5}_$AI(t,e=this){var i;if((t=(i=w(this,t,e,0))!==null&&i!==void 0?i:p)===$)return;const o=this._$AH,n=t===p&&o!==p||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,a=t!==p&&(o===p||n);n&&this.element.removeEventListener(this.name,this,o),a&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}}class Et{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){w(this,t)}}const rt=R.litHtmlPolyfillSupport;rt?.(T,P),((L=R.litHtmlVersions)!==null&&L!==void 0?L:R.litHtmlVersions=[]).push("2.4.0");const St=(s,t,e)=>{var i,o;const n=(i=e?.renderBefore)!==null&&i!==void 0?i:t;let a=n._$litPart$;if(a===void 0){const h=(o=e?.renderBefore)!==null&&o!==void 0?o:null;n._$litPart$=a=new P(t.insertBefore(E(),h),h,void 0,e??{})}return a._$AI(s),a};/**
|
|
18
18
|
* @license
|
|
19
19
|
* Copyright 2017 Google LLC
|
|
20
20
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
-
*/var j,
|
|
21
|
+
*/var j,V;class k extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=St(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return $}}k.finalized=!0,k._$litElement$=!0,(j=globalThis.litElementHydrateSupport)===null||j===void 0||j.call(globalThis,{LitElement:k});const lt=globalThis.litElementPolyfillSupport;lt?.({LitElement:k}),((V=globalThis.litElementVersions)!==null&&V!==void 0?V:globalThis.litElementVersions=[]).push("3.2.2");/**
|
|
22
22
|
* @license
|
|
23
23
|
* Copyright 2020 Google LLC
|
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/const
|
|
25
|
+
*/const Ct=Symbol.for(""),Tt=s=>{if(s?.r===Ct)return s?._$litStatic$},dt=new Map,Pt=s=>(t,...e)=>{const i=e.length;let o,n;const a=[],h=[];let r,l=0,u=!1;for(;l<i;){for(r=t[l];l<i&&(n=e[l],(o=Tt(n))!==void 0);)r+=o+t[++l],u=!0;h.push(n),a.push(r),l++}if(l===i&&a.push(t[i]),u){const d=a.join("$$lit$$");(t=dt.get(d))===void 0&&(a.raw=a,dt.set(d,t=a)),e=h}return s(t,...e)},F=Pt(gt);var Ut=ut`
|
|
26
26
|
:host {
|
|
27
27
|
position: absolute;
|
|
28
28
|
width: 100%;
|
|
@@ -260,19 +260,20 @@
|
|
|
260
260
|
* @license
|
|
261
261
|
* Copyright 2017 Google LLC
|
|
262
262
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
263
|
-
*/const
|
|
263
|
+
*/const Rt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Mt=s=>(...t)=>({_$litDirective$:s,values:t});class Ht{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
|
|
264
264
|
* @license
|
|
265
265
|
* Copyright 2018 Google LLC
|
|
266
266
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
267
|
-
*/const
|
|
268
|
-
<div class
|
|
267
|
+
*/const ht=Mt(class extends Ht{constructor(s){var t;if(super(s),s.type!==Rt.ATTRIBUTE||s.name!=="class"||((t=s.strings)===null||t===void 0?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){var e,i;if(this.nt===void 0){this.nt=new Set,s.strings!==void 0&&(this.st=new Set(s.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in t)t[n]&&!(!((e=this.st)===null||e===void 0)&&e.has(n))&&this.nt.add(n);return this.render(t)}const o=s.element.classList;this.nt.forEach(n=>{n in t||(o.remove(n),this.nt.delete(n))});for(const n in t){const a=!!t[n];a===this.nt.has(n)||((i=this.st)===null||i===void 0?void 0:i.has(n))||(a?(o.add(n),this.nt.add(n)):(o.remove(n),this.nt.delete(n)))}return $}});var q=[{name:"Consulta m\xE9dica",items:[{name:"Presencial",link:"https://reserva.alemana.cl/reserva/portal/busqueda"},{name:"Teleconsulta",link:"https://agenda.clinicaalemana.cl/paciente"},{name:"TeleUrgencia",link:"https://www.clinicaalemana.cl/telemedicina/teleurgencia"},{name:"A domicilio",link:"https://www.clinicaalemana.cl/servicios-clinicos/servicios-a-domicilio"}]},{name:"Ex\xE1menes y procedimientos",items:[{name:"Presencial",link:"https://www.clinicaalemana.cl/examenes-y-procedimientos"},{name:"A domicilio",link:"https://www.clinicaalemana.cl/servicios-clinicos/servicios-a-domicilio/examenes-laboratorio-domicilio"}]},{name:"Vacunas",items:[{name:"Pedi\xE1trica",link:"https://www.alemana.cl/ReservaDeHoras/resultado-busqueda-area.aspx?idEmp=2&horario=todas&su=-1&idioma=todas&valorArea=Vacunas&Am=203,0&Ai=-1&CentrosSalud=-1¢roNombre=&CenAm=-1&CenAi=-1&d=19-12-2023&idAgenda=undefined&fp=19-12-2023&rp=&ipac=0&idreserva=&buscar-nombre=&dispositivo=2&cal=1&linkPortal="},{name:"Adulto",link:"https://www.alemana.cl/ReservaDeHoras/resultado-busqueda-area.aspx?idEmp=2&horario=todas&su=-1&idioma=todas&valorArea=Vacunas+Adulto&Am=229,0&Ai=-1&CentrosSalud=-1¢roNombre=&CenAm=-1&CenAi=-1&d=20-12-2023&idAgenda=undefined&fp=20-12-2023&rp=&ipac=0&idreserva=&buscar-nombre=&dispositivo=2&cal=1&linkPortal="},{name:"Covid-19",link:"https://www.clinicaalemana.cl/covid-19"},{name:"Influenza",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/influenza-2023"},{name:"Viajeros",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/reserva-vacuna-fiebre-amarilla"},{name:"TeleAsesor\xEDa pedi\xE1trica",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/asesoria-en-vacunacion-pediatrica"}]}];class ct extends k{static styles=Ut;static shadowRootOptions={...k.shadowRootOptions,mode:"open"};static properties={theme:{type:String},hidden:{type:Boolean},title:{type:String},tipoDeAtencion:{type:String},modalidad:{type:String},dataTipoDeAtencion:{type:Array},dataModalidad:{type:Array},focused:{type:Boolean},home:{type:Boolean},onlyView:{type:Boolean}};constructor(){super(),this.hidden=!1,this.tipoDeAtencion="",this.modalidad="",this.dataTipoDeAtencion=[],this.dataModalidad=[],this.focused=!1,this.refresh=!1,this.link=""}changeHandler(t){const e=t.target.name;if(this[e]=t.composedPath()[0].value,this.handleErrorTipoDeAtencion(!1),this.handleErrorModalidad(!1),e==="tipoDeAtencion"){this.modalidad="",this.refresh=!0,this.handleFocusModalidad(!0),this.handleFocusTipoDeAtencion(!1);const i=q.find(o=>o.name===this.tipoDeAtencion).items.map(o=>o.name);this.dataModalidad=[...i],this.requestUpdate(),setTimeout(()=>{this.refresh=!1,this.requestUpdate()},100)}e==="modalidad"&&this.handleFocusModalidad(!1),this.handleLink()}handleFocusTipoDeAtencion(t){this.shadowRoot.getElementById("tipoDeAtencion")?.setAttribute("active",t)}handleFocusModalidad(t){this.shadowRoot.getElementById("modalidad")?.setAttribute("active",t)}handleErrorTipoDeAtencion(t){const e=this.shadowRoot.getElementById("tipoDeAtencion");t?e?.setAttribute("isSelectError",!0):e?.removeAttribute("isSelectError")}handleErrorModalidad(t){const e=this.shadowRoot.getElementById("modalidad");t?e?.setAttribute("isSelectError",!0):e?.removeAttribute("isSelectError")}handleLink(){let t="";this.tipoDeAtencion!==""&&this.modalidad!==""&&(t=q.find(i=>i.name===this.tipoDeAtencion).items.find(i=>i.name===this.modalidad).link),this.link=t;const e=this.shadowRoot.querySelector(".btn-action");this.link!==""?e.setAttribute("href",this.link):e.removeAttribute("href")}submit(){this.link!==""?this.handleMark({category:"reservar_hora"}):this.tipoDeAtencion===""?(this.handleErrorTipoDeAtencion(!0),this.handleErrorModalidad(!0)):(this.handleFocusModalidad(!1),this.handleErrorModalidad(!0))}handleMark({category:t,action:e,label:i}){try{window.dataLayer.push({event:"evento-interactivo","evento-interactivo-categoria":t,"evento-interactivo-accion":e??this.tipoDeAtencion,"evento-interactivo-etiqueta":i??this.modalidad})}catch{console.log("event push failed")}}eventHandler(){this.removeAttribute("hidden");let t=this.shadowRoot.getElementById("backdrop");t.style.display="flex",this.hidden=!1,this.focused=!0,this.requestUpdate()}firstUpdated(){if(this.handleParameter(),this.onlyView||document.addEventListener("openBookingBox",()=>{this.eventHandler()}),window.innerWidth>1023){const t=this.shadowRoot.querySelector(".booking-box");let e=this.shadowRoot.getElementById("backdrop");t.addEventListener("focusin",()=>{this.focused=!0,e.style.display="flex",this.requestUpdate()})}}handleParameter(){new URLSearchParams(window.location.search).get("rsv")==="true"&&this.eventHandler()}closeHandler(){let t=this.shadowRoot.getElementById("backdrop");t.style.display="none",this.hidden=!1,this.focused=!1,this.requestUpdate()}handleOverrideTime(){this.handleMark({category:"anular_hora"})}render(){const t=ht({"booking-box":!0,hidden:this.hidden,home:this.home,focused:this.focused}),e=ht({backdrop:!0,hidden:this.hidden});return F`
|
|
268
|
+
<div class="${e}" id="backdrop" @click="${this.closeHandler}"></div>
|
|
269
269
|
<div class="booking-box-main-cont" id="booking-box-main-cont">
|
|
270
|
-
<div class
|
|
270
|
+
<div class="${t}" id="booking-box" tabindex="0">
|
|
271
271
|
<slot name="b-content"></slot>
|
|
272
272
|
<div class="booking-box-tab">
|
|
273
273
|
<cas-text variant="headline3">¿Qué necesitas agendar?</cas-text>
|
|
274
274
|
</div>
|
|
275
|
-
<a href="https://www.alemana.cl/ReservaDeHoras/resultado-modificar-anular.aspx"
|
|
275
|
+
<a href="https://www.alemana.cl/ReservaDeHoras/resultado-modificar-anular.aspx"
|
|
276
|
+
@click="${this.handleOverrideTime}" class="booking-box-tab-2">
|
|
276
277
|
<cas-text variant="headline5">Anular hora</cas-text>
|
|
277
278
|
</a>
|
|
278
279
|
<div class="option-box">
|
|
@@ -281,31 +282,27 @@
|
|
|
281
282
|
<cas-select
|
|
282
283
|
theme="${this.theme}"
|
|
283
284
|
label="Tipo de atención"
|
|
284
|
-
@change
|
|
285
|
+
@change="${this.changeHandler}"
|
|
285
286
|
fullWidth="true"
|
|
286
287
|
name="tipoDeAtencion"
|
|
287
288
|
id="tipoDeAtencion"
|
|
288
289
|
secondaryIcon="flat-doctor"
|
|
289
|
-
data=
|
|
290
|
+
.data="${q.map(i=>i.name)}"
|
|
290
291
|
></cas-select>
|
|
291
292
|
</div>
|
|
292
293
|
|
|
293
294
|
<div class="option-item">
|
|
294
295
|
<slot name="b-option-2"></slot>
|
|
295
|
-
${this.refresh?
|
|
296
|
-
<div class="skeleton-input">
|
|
297
|
-
|
|
298
|
-
</div>
|
|
299
|
-
`:V`
|
|
296
|
+
${this.refresh?F` <div class="skeleton-input"></div> `:F`
|
|
300
297
|
<cas-select
|
|
301
298
|
theme="${this.theme}"
|
|
302
|
-
label="Modalidad"
|
|
303
|
-
?disabled
|
|
304
|
-
.data
|
|
299
|
+
label="${this.tipoDeAtencion==="Vacunas"?"Tipo":"Modalidad"}"
|
|
300
|
+
?disabled="${this.tipoDeAtencion===""}"
|
|
301
|
+
.data="${this.dataModalidad}"
|
|
305
302
|
id="modalidad"
|
|
306
|
-
@change
|
|
303
|
+
@change="${this.changeHandler}"
|
|
307
304
|
fullWidth="true"
|
|
308
|
-
value
|
|
305
|
+
value="${this.modalidad}"
|
|
309
306
|
secondaryIcon="flat-hospital"
|
|
310
307
|
name="modalidad"
|
|
311
308
|
></cas-select>
|
|
@@ -315,7 +312,7 @@
|
|
|
315
312
|
<a class="btn-action">
|
|
316
313
|
<cas-button
|
|
317
314
|
name="submitAgendaButton"
|
|
318
|
-
@click
|
|
315
|
+
@click="${this.submit}"
|
|
319
316
|
fullWidth="true"
|
|
320
317
|
text="Reservar hora"
|
|
321
318
|
variant="${this.theme==="dark"?"text2":"primary1"}"
|
|
@@ -324,6 +321,6 @@
|
|
|
324
321
|
></cas-button>
|
|
325
322
|
</a>
|
|
326
323
|
</div>
|
|
327
|
-
</div>
|
|
328
324
|
</div>
|
|
329
|
-
</div
|
|
325
|
+
</div>
|
|
326
|
+
</div>`}}customElements.get("cas-booking-box")||customElements.define("cas-booking-box",ct),g.CasBookingBox=ct,Object.defineProperties(g,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|