cas-ds-web-components 1.2.36 → 1.2.37

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.
@@ -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"}})});