cas-ds-web-components 1.2.25 → 1.2.28
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 +74 -19
- package/build/cas-booking-box.js +6 -6
- package/build/cas-ds-web-components.js +513 -508
- package/build/cas-header.js +408 -403
- package/build/cas-select.js +29 -24
- package/package.json +1 -1
package/build/cas-banners-cta.js
CHANGED
|
@@ -2,28 +2,29 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
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,
|
|
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 ht=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 ht(e)})(n):n;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var
|
|
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),h=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]=h.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
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/var I;const T=window,y=T.trustedTypes,G=y?y.createPolicy("lit-html",{createHTML:
|
|
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",U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Y=/-->/g,tt=/>/g,f=RegExp(`>|[
|
|
14
14
|
\f\r](?:([^\\s"'>=/]+)([
|
|
15
15
|
\f\r]*=[
|
|
16
16
|
\f\r]*(?:[^
|
|
17
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),et=/'/g,
|
|
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=U;for(let l=0;l<e;l++){const a=n[l];let p,d,c=-1,$=0;for(;$<a.length&&(o.lastIndex=$,d=o.exec(a),d!==null);)$=o.lastIndex,o===U?d[1]==="!--"?o=Y:d[1]!==void 0?o=tt:d[2]!==void 0?(it.test(d[2])&&(i=RegExp("</"+d[2],"g")),o=f):d[3]!==void 0&&(o=f):o===f?d[0]===">"?(o=i??U,c=-1):d[1]===void 0?c=-2:(c=o.lastIndex-d[2].length,p=d[1],o=d[3]===void 0?f:d[3]==='"'?st:et):o===st||o===et?o=f:o===Y||o===tt?o=U:(o=f,i=void 0);const O=o===f&&n[l+1].startsWith("/>")?" ":"";r+=o===U?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 h=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(h):h,s]};class P{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,o=0;const h=t.length-1,l=this.parts,[a,p]=gt(t,e);if(this.el=P.createElement(a,s),x.currentNode=this.el.content,e===2){const d=this.el.content,c=d.firstChild;c.remove(),d.append(...c.childNodes)}for(;(i=x.nextNode())!==null&&l.length<h;){if(i.nodeType===1){if(i.hasAttributes()){const d=[];for(const c of i.getAttributeNames())if(c.endsWith("$lit$")||c.startsWith(_)){const $=p[o++];if(d.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 d)i.removeAttribute(c)}if(it.test(i.tagName)){const d=i.textContent.split(_),c=d.length-1;if(c>0){i.textContent=y?y.emptyScript:"";for(let $=0;$<c;$++)i.append(d[$],w()),x.nextNode(),l.push({type:2,index:++r});i.append(d[c],w())}}}else if(i.nodeType===8)if(i.data===Q)l.push({type:2,index:r});else{let d=-1;for(;(d=i.data.indexOf(_,d+1))!==-1;)l.push({type:7,index:r}),d+=_.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,h;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=(h=e)._$Co)!==null&&o!==void 0?o:h._$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(),h=0,l=0,a=i[0];for(;a!==void 0;){if(h===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]}h!==a?.index&&(o=x.nextNode(),h++)}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=P.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),h=o.v(this.options);o.p(s),this.T(h),this._$AH=o}}_$AC(t){let e=nt.get(t.strings);return e===void 0&&nt.set(t.strings,e=new P(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 h=t;let l,a;for(t=r[0],l=0;l<r.length-1;l++)a=S(this,h[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?.(P,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 h=(i=e?.renderBefore)!==null&&i!==void 0?i:null;r._$litPart$=o=new k(t.insertBefore(w(),h),h,void 0,e??{})}return o._$AI(n),o};/**
|
|
18
18
|
* @license
|
|
19
19
|
* Copyright 2017 Google LLC
|
|
20
20
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
-
*/var D,F;class E extends
|
|
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
22
|
* @license
|
|
23
23
|
* Copyright 2020 Google LLC
|
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/const
|
|
25
|
+
*/const wt=Symbol.for(""),Ct=n=>{if(n?.r===wt)return n?._$litStatic$},lt=new Map,Ut=n=>(t,...e)=>{const s=e.length;let i,r;const o=[],h=[];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;h.push(r),o.push(l),a++}if(a===s&&o.push(t[s]),p){const d=o.join("$$lit$$");(t=lt.get(d))===void 0&&(o.raw=o,lt.set(d,t=o)),e=h}return n(t,...e)},at=Ut(ft);var Pt=ct`
|
|
26
26
|
.card {
|
|
27
|
+
scroll-snap-align: center;
|
|
27
28
|
display: grid;
|
|
28
29
|
grid-template-columns: 177px 1fr;
|
|
29
30
|
border-radius: 20px;
|
|
@@ -69,9 +70,41 @@
|
|
|
69
70
|
}
|
|
70
71
|
.list {
|
|
71
72
|
display: flex;
|
|
72
|
-
overflow-x: auto;
|
|
73
73
|
gap: 16px;
|
|
74
|
-
padding:
|
|
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;
|
|
75
108
|
}
|
|
76
109
|
|
|
77
110
|
@media (max-width: 768px) {
|
|
@@ -92,29 +125,51 @@
|
|
|
92
125
|
padding: 16px 16px 32px 16px;
|
|
93
126
|
}
|
|
94
127
|
}
|
|
95
|
-
`;class dt extends E{static styles=
|
|
128
|
+
`;class dt extends E{static styles=Pt;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(){console.log("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,h=r-i-o;i>0?e.disabled=!1:e.disabled=!0,h>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:h})=>{const l=({text:a,length:p=100})=>a?.length>p?`${a.substring(0,p)}...`:a;return at`
|
|
96
129
|
<article class="card">
|
|
97
130
|
<div class="card__image">
|
|
98
|
-
<
|
|
131
|
+
<picture>
|
|
132
|
+
<source media="(min-width: 600px)" srcset="${r?.desktop}">
|
|
133
|
+
<img src="${r?.mobile}" alt="${s}">
|
|
134
|
+
</picture>
|
|
99
135
|
</div>
|
|
100
136
|
<div class="card__content">
|
|
101
|
-
<cas-text variant="body2"
|
|
102
|
-
|
|
103
|
-
|
|
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
|
+
>
|
|
104
146
|
<div class="card__link">
|
|
105
|
-
<a href="${
|
|
106
|
-
<cas-text variant="footnote1">${
|
|
147
|
+
<a href="${h}" class="button">
|
|
148
|
+
<cas-text variant="footnote1">${o}</cas-text>
|
|
107
149
|
</a>
|
|
108
150
|
</div>
|
|
109
151
|
</div>
|
|
110
152
|
</article>
|
|
111
153
|
`};return at`
|
|
112
154
|
<section class="container">
|
|
113
|
-
<div class="list">
|
|
114
|
-
${[{subtitle:"Cuidado de la piel",title:"Cuidado de la piel Cuidado de la piel",description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, diam, sed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, diam, sed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, diam, sed.",image:"https://images.pexels.com/photos/13203904/pexels-photo-13203904.jpeg?auto=compress&cs=tinysrgb&w=400&lazy=load",link:"#"},{subtitle:"Cuidado de la piel",title:"Cuidado de la piel",description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, diam, sed.",image:"https://images.pexels.com/photos/13203904/pexels-photo-13203904.jpeg?auto=compress&cs=tinysrgb&w=400&lazy=load",link:"#"},{subtitle:"Cuidado de la piel",title:"Cuidado de la piel",description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, diam, sed.",image:"https://images.pexels.com/photos/13203904/pexels-photo-13203904.jpeg?auto=compress&cs=tinysrgb&w=400&lazy=load",link:"#"},{subtitle:"Cuidado de la piel",title:"Cuidado de la piel",description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, diam, sed.",image:"https://images.pexels.com/photos/13203904/pexels-photo-13203904.jpeg?auto=compress&cs=tinysrgb&w=400&lazy=load",link:"#"}].map(i=>t(i))}
|
|
115
|
-
</div>
|
|
155
|
+
<div class="list">${this.data.map(e=>t(e))}</div>
|
|
116
156
|
<div class="actions">
|
|
117
|
-
|
|
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>
|
|
118
173
|
</div>
|
|
119
174
|
</section>
|
|
120
175
|
`}}customElements.get("cas-banners-cta")||customElements.define("cas-banners-cta",dt),g.CasBannersCta=dt,Object.defineProperties(g,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/build/cas-booking-box.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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,O=v.ShadowRoot&&(v.ShadyCSS===void 0||v.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,B=Symbol(),V=new WeakMap;class W{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(O&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=V.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&V.set(e,t))}return t}toString(){return this.cssText}}const ht=s=>new W(typeof s=="string"?s:s+"",void 0,B),ct=(s,...t)=>{const e=s.length===1?s[0]:t.reduce((i,o,n)=>i+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+s[n+1],s[0]);return new W(e,s,B)},pt=(s,t)=>{O?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)})},q=O?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return ht(e)})(s):s;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/var L;const
|
|
13
|
+
*/var L;const R=window,A=R.trustedTypes,Q=A?A.createPolicy("lit-html",{createHTML:s=>s}):void 0,f=`lit$${(Math.random()+"").slice(9)}$`,Y="?"+f,mt=`<${Y}>`,_=document,k=(s="")=>_.createComment(s),S=s=>s===null||typeof s!="object"&&typeof s!="function",G=Array.isArray,vt=s=>G(s)||typeof s?.[Symbol.iterator]=="function",C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,X=/-->/g,tt=/>/g,b=RegExp(`>|[
|
|
14
14
|
\f\r](?:([^\\s"'>=/]+)([
|
|
15
15
|
\f\r]*=[
|
|
16
16
|
\f\r]*(?:[^
|
|
17
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),et=/'/g,it=/"/g,ot=/^(?:script|style|textarea|title)$/i,ft=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),bt=ft(1),$=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),st=new WeakMap,y=
|
|
17
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),et=/'/g,it=/"/g,ot=/^(?:script|style|textarea|title)$/i,ft=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),bt=ft(1),$=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),st=new WeakMap,y=_.createTreeWalker(_,129,null,!1),$t=(s,t)=>{const e=s.length-1,i=[];let o,n=t===2?"<svg>":"",r=C;for(let a=0;a<e;a++){const l=s[a];let u,d,c=-1,m=0;for(;m<l.length&&(r.lastIndex=m,d=r.exec(l),d!==null);)m=r.lastIndex,r===C?d[1]==="!--"?r=X:d[1]!==void 0?r=tt:d[2]!==void 0?(ot.test(d[2])&&(o=RegExp("</"+d[2],"g")),r=b):d[3]!==void 0&&(r=b):r===b?d[0]===">"?(r=o??C,c=-1):d[1]===void 0?c=-2:(c=r.lastIndex-d[2].length,u=d[1],r=d[3]===void 0?b:d[3]==='"'?it:et):r===it||r===et?r=b:r===X||r===tt?r=C:(r=b,o=void 0);const M=r===b&&s[a+1].startsWith("/>")?" ":"";n+=r===C?l+mt:c>=0?(i.push(u),l.slice(0,c)+"$lit$"+l.slice(c)+f+M):l+f+(c===-2?(i.push(void 0),a):M)}const h=n+(s[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Q!==void 0?Q.createHTML(h):h,i]};class T{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,r=0;const h=t.length-1,a=this.parts,[l,u]=$t(t,e);if(this.el=T.createElement(l,i),y.currentNode=this.el.content,e===2){const d=this.el.content,c=d.firstChild;c.remove(),d.append(...c.childNodes)}for(;(o=y.nextNode())!==null&&a.length<h;){if(o.nodeType===1){if(o.hasAttributes()){const d=[];for(const c of o.getAttributeNames())if(c.endsWith("$lit$")||c.startsWith(f)){const m=u[r++];if(d.push(c),m!==void 0){const M=o.getAttribute(m.toLowerCase()+"$lit$").split(f),D=/([.?@])?(.*)/.exec(m);a.push({type:1,index:n,name:D[2],strings:M,ctor:D[1]==="."?xt:D[1]==="?"?_t:D[1]==="@"?yt:H})}else a.push({type:6,index:n})}for(const c of d)o.removeAttribute(c)}if(ot.test(o.tagName)){const d=o.textContent.split(f),c=d.length-1;if(c>0){o.textContent=A?A.emptyScript:"";for(let m=0;m<c;m++)o.append(d[m],k()),y.nextNode(),a.push({type:2,index:++n});o.append(d[c],k())}}}else if(o.nodeType===8)if(o.data===Y)a.push({type:2,index:n});else{let d=-1;for(;(d=o.data.indexOf(f,d+1))!==-1;)a.push({type:7,index:n}),d+=f.length-1}n++}}static createElement(t,e){const i=_.createElement("template");return i.innerHTML=t,i}}function E(s,t,e=s,i){var o,n,r,h;if(t===$)return t;let a=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 a?.constructor!==l&&((n=a?._$AO)===null||n===void 0||n.call(a,!1),l===void 0?a=void 0:(a=new l(s),a._$AT(s,e,i)),i!==void 0?((r=(h=e)._$Co)!==null&&r!==void 0?r:h._$Co=[])[i]=a:e._$Cl=a),a!==void 0&&(t=E(s,a._$AS(s,t.values),a,i)),t}class gt{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:_).importNode(i,!0);y.currentNode=n;let r=y.nextNode(),h=0,a=0,l=o[0];for(;l!==void 0;){if(h===l.index){let u;l.type===2?u=new P(r,r.nextSibling,this,t):l.type===1?u=new l.ctor(r,l.name,l.strings,this,t):l.type===6&&(u=new Et(r,this,t)),this.u.push(u),l=o[++a]}h!==l?.index&&(r=y.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=E(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):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!==p&&S(this._$AH)?this._$AA.nextSibling.data=t:this.T(_.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 r=new gt(n,this),h=r.v(this.options);r.p(i),this.T(h),this._$AH=r}}_$AC(t){let e=st.get(t.strings);return e===void 0&&st.set(t.strings,e=new T(t)),e}k(t){G(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(k()),this.O(k()),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 H{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 r=!1;if(n===void 0)t=E(this,t,e,0),r=!S(t)||t!==this._$AH&&t!==$,r&&(this._$AH=t);else{const h=t;let a,l;for(t=n[0],a=0;a<n.length-1;a++)l=E(this,h[i+a],e,a),l===$&&(l=this._$AH[a]),r||(r=!S(l)||l!==this._$AH[a]),l===p?t=p:t!==p&&(t+=(l??"")+n[a+1]),this._$AH[a]=l}r&&!o&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class xt extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}}const At=A?A.emptyScript:"";class _t extends H{constructor(){super(...arguments),this.type=4}j(t){t&&t!==p?this.element.setAttribute(this.name,At):this.element.removeAttribute(this.name)}}class yt extends H{constructor(t,e,i,o,n){super(t,e,i,o,n),this.type=5}_$AI(t,e=this){var i;if((t=(i=E(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,r=t!==p&&(o===p||n);n&&this.element.removeEventListener(this.name,this,o),r&&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){E(this,t)}}const nt=R.litHtmlPolyfillSupport;nt?.(T,P),((L=R.litHtmlVersions)!==null&&L!==void 0?L:R.litHtmlVersions=[]).push("2.4.0");const wt=(s,t,e)=>{var i,o;const n=(i=e?.renderBefore)!==null&&i!==void 0?i:t;let r=n._$litPart$;if(r===void 0){const h=(o=e?.renderBefore)!==null&&o!==void 0?o:null;n._$litPart$=r=new P(t.insertBefore(k(),h),h,void 0,e??{})}return r._$AI(s),r};/**
|
|
18
18
|
* @license
|
|
19
19
|
* Copyright 2017 Google LLC
|
|
20
20
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
-
*/var j,F;class
|
|
21
|
+
*/var j,F;class w extends x{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=wt(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 $}}w.finalized=!0,w._$litElement$=!0,(j=globalThis.litElementHydrateSupport)===null||j===void 0||j.call(globalThis,{LitElement:w});const rt=globalThis.litElementPolyfillSupport;rt?.({LitElement:w}),((F=globalThis.litElementVersions)!==null&&F!==void 0?F:globalThis.litElementVersions=[]).push("3.2.2");/**
|
|
22
22
|
* @license
|
|
23
23
|
* Copyright 2020 Google LLC
|
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -220,11 +220,11 @@
|
|
|
220
220
|
* @license
|
|
221
221
|
* Copyright 2017 Google LLC
|
|
222
222
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
223
|
-
*/const Ut={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},
|
|
223
|
+
*/const Ut={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Rt=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)}}/**
|
|
224
224
|
* @license
|
|
225
225
|
* Copyright 2018 Google LLC
|
|
226
226
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
227
|
-
*/const lt=
|
|
227
|
+
*/const lt=Rt(class extends Ht{constructor(s){var t;if(super(s),s.type!==Ut.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 r=!!t[n];r===this.nt.has(n)||((i=this.st)===null||i===void 0?void 0:i.has(n))||(r?(o.add(n),this.nt.add(n)):(o.remove(n),this.nt.delete(n)))}return $}});class dt extends w{static styles=Pt;static shadowRootOptions={...w.shadowRootOptions,mode:"open"};constructor(){super(),this.hidden=!1,this.tipoDeAtencion="",this.modalidad="",this.focused=!1}static properties={theme:{type:String},hidden:{type:Boolean},title:{type:String},tipoDeAtencion:{type:String},modalidad:{type:String},focused:{type:Boolean},home:{type:Boolean},onlyView:{type:Boolean}};changeHandler(t){const e=t.target.name;this[e]=t.composedPath()[0].value,this.handleErrorTipoDeAtencion(!1),this.handleErrorModalidad(!1),e==="tipoDeAtencion"&&(this.modalidad="",this.handleFocusModalidad(!0),this.handleFocusTipoDeAtencion(!1)),e==="modalidad"&&this.handleFocusModalidad(!1)}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")}submit(){let t;this.tipoDeAtencion!==""&&(this.tipoDeAtencion==="Consulta pedi\xE1trica"&&(t="https://www.clinicaalemana.cl/especialidades/pediatria/consulta-pediatrica"),this.modalidad!=="Modalidad"&&(this.tipoDeAtencion==="Consulta m\xE9dica"&&this.modalidad==="Presencial"&&(t="https://reserva.alemana.cl/reserva/portal/busqueda"),this.tipoDeAtencion==="Consulta m\xE9dica"&&this.modalidad==="Teleconsulta"&&(t="https://agenda.clinicaalemana.cl/paciente"),this.tipoDeAtencion==="Consulta m\xE9dica"&&this.modalidad==="TeleUrgencia"&&(t="https://www.clinicaalemana.cl/telemedicina/teleurgencia"),this.tipoDeAtencion==="Consulta m\xE9dica"&&this.modalidad==="A domicilio"&&(t="https://www.clinicaalemana.cl/servicios-clinicos/servicios-a-domicilio"),this.tipoDeAtencion==="Ex\xE1menes y procedimientos"&&this.modalidad==="Presencial"&&(t="https://www.clinicaalemana.cl/examenes-y-procedimientos"),this.tipoDeAtencion==="Ex\xE1menes y procedimientos"&&this.modalidad==="A domicilio"&&(t="https://www.clinicaalemana.cl/servicios-clinicos/servicios-a-domicilio/examenes-laboratorio-domicilio"))),t!==void 0?(window.location.href=t,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=lt({"booking-box":!0,hidden:this.hidden,home:this.home,focused:this.focused}),e=lt({backdrop:!0,hidden:this.hidden});return Tt`
|
|
228
228
|
<div class=${e} id="backdrop" @click=${this.closeHandler}></div>
|
|
229
229
|
<div class="booking-box-main-cont" id="booking-box-main-cont">
|
|
230
230
|
<div class=${t} id="booking-box" tabindex="0">
|