@divkitframework/divkit 23.5.0 → 23.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/client-devtool.js +1 -1
- package/dist/browser/client-devtool.js.map +1 -1
- package/dist/browser/client-hydratable.js +1 -1
- package/dist/browser/client-hydratable.js.map +1 -1
- package/dist/browser/client.js +1 -1
- package/dist/browser/client.js.map +1 -1
- package/dist/client-devtool.js +1 -1
- package/dist/client-devtool.js.map +1 -1
- package/dist/client-hydratable.js +1 -1
- package/dist/client-hydratable.js.map +1 -1
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/esm/client-devtool.mjs +1 -1
- package/dist/esm/client-devtool.mjs.map +1 -1
- package/dist/esm/client-hydratable.mjs +1 -1
- package/dist/esm/client-hydratable.mjs.map +1 -1
- package/dist/esm/client.mjs +1 -1
- package/dist/esm/client.mjs.map +1 -1
- package/dist/esm/server.mjs +1 -1
- package/dist/esm/server.mjs.map +1 -1
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function n(){}t.d(e,{M:()=>Za,Os:()=>Wi,sY:()=>ll});const r=t=>t;function i(t,e){for(const n in e)t[n]=e[n];return t}function o(t){return t()}function a(){return Object.create(null)}function l(t){t.forEach(o)}function s(t){return"function"==typeof t}let c;function d(t,e){return c||(c=document.createElement("a")),c.href=e,t===c.href}function u(t,e){return t!=t?e==e:t!==e}function h(t){return 0===Object.keys(t).length}function p(t,...e){if(null==t)return n;const r=t.subscribe(...e);return r.unsubscribe?()=>r.unsubscribe():r}function f(t,e,n){t.$$.on_destroy.push(p(e,n))}function g(t,e,n,r){if(t){const i=m(t,e,n,r);return t[0](i)}}function m(t,e,n,r){return t[1]&&r?i(n.ctx.slice(),t[1](r(e))):n.ctx}function v(t,e,n,r){if(t[2]&&r){const i=t[2](r(n));if(void 0===e.dirty)return i;if("object"==typeof i){const t=[],n=Math.max(e.dirty.length,i.length);for(let r=0;r<n;r+=1)t[r]=e.dirty[r]|i[r];return t}return e.dirty|i}return e.dirty}function y(t,e,n,r,i,o){if(i){const a=m(e,n,r,o);t.p(a,i)}}function $(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let t=0;t<n;t++)e[t]=-1;return e}return-1}function _(t){return t&&s(t.destroy)?t.destroy:n}const b="undefined"!=typeof window;let w=b?()=>window.performance.now():()=>Date.now(),x=b?t=>requestAnimationFrame(t):n;const k=new Set;function E(t){k.forEach((e=>{e.c(t)||(k.delete(e),e.f())})),0!==k.size&&x(E)}let C=!1;function A(t,e,n,r){for(;t<e;){const i=t+(e-t>>1);n(i)<=r?t=i+1:e=i}return t}function V(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function j(t){const e=I("style");return function(t,e){!function(t,e){t.appendChild(e)}(t.head||t,e)}(V(t),e),e.sheet}function D(t,e){if(C){for(function(t){if(t.hydrate_init)return;t.hydrate_init=!0;let e=t.childNodes;if("HEAD"===t.nodeName){const t=[];for(let n=0;n<e.length;n++){const r=e[n];void 0!==r.claim_order&&t.push(r)}e=t}const n=new Int32Array(e.length+1),r=new Int32Array(e.length);n[0]=-1;let i=0;for(let t=0;t<e.length;t++){const o=e[t].claim_order,a=(i>0&&e[n[i]].claim_order<=o?i+1:A(1,i,(t=>e[n[t]].claim_order),o))-1;r[t]=n[a]+1;const l=a+1;n[l]=t,i=Math.max(l,i)}const o=[],a=[];let l=e.length-1;for(let t=n[i]+1;0!=t;t=r[t-1]){for(o.push(e[t-1]);l>=t;l--)a.push(e[l]);l--}for(;l>=0;l--)a.push(e[l]);o.reverse(),a.sort(((t,e)=>t.claim_order-e.claim_order));for(let e=0,n=0;e<a.length;e++){for(;n<o.length&&a[e].claim_order>=o[n].claim_order;)n++;const r=n<o.length?o[n]:null;t.insertBefore(a[e],r)}}(t),(void 0===t.actual_end_child||null!==t.actual_end_child&&t.actual_end_child.parentElement!==t)&&(t.actual_end_child=t.firstChild);null!==t.actual_end_child&&void 0===t.actual_end_child.claim_order;)t.actual_end_child=t.actual_end_child.nextSibling;e!==t.actual_end_child?void 0===e.claim_order&&e.parentNode===t||t.insertBefore(e,t.actual_end_child):t.actual_end_child=e.nextSibling}else e.parentNode===t&&null===e.nextSibling||t.appendChild(e)}function P(t,e,n){C&&!n?D(t,e):e.parentNode===t&&e.nextSibling==n||t.insertBefore(e,n||null)}function S(t){t.parentNode.removeChild(t)}function F(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function I(t){return document.createElement(t)}function z(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function T(t){return document.createTextNode(t)}function M(){return T(" ")}function N(){return T("")}function J(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function O(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function B(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const r in e)null==e[r]?t.removeAttribute(r):"style"===r?t.style.cssText=e[r]:"__value"===r?t.value=t[r]=e[r]:n[r]&&n[r].set?t[r]=e[r]:O(t,r,e[r])}function R(t){return Array.from(t.childNodes)}function U(t,e,n,r,i=!1){!function(t){void 0===t.claim_info&&(t.claim_info={last_index:0,total_claimed:0})}(t);const o=(()=>{for(let r=t.claim_info.last_index;r<t.length;r++){const o=t[r];if(e(o)){const e=n(o);return void 0===e?t.splice(r,1):t[r]=e,i||(t.claim_info.last_index=r),o}}for(let r=t.claim_info.last_index-1;r>=0;r--){const o=t[r];if(e(o)){const e=n(o);return void 0===e?t.splice(r,1):t[r]=e,i?void 0===e&&t.claim_info.last_index--:t.claim_info.last_index=r,o}}return r()})();return o.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1,o}function W(t,e,n,r){return U(t,(t=>t.nodeName===e),(t=>{const e=[];for(let r=0;r<t.attributes.length;r++){const i=t.attributes[r];n[i.name]||e.push(i.name)}e.forEach((e=>t.removeAttribute(e)))}),(()=>r(e)))}function L(t,e,n){return W(t,e,n,I)}function q(t,e,n){return W(t,e,n,z)}function H(t,e){return U(t,(t=>3===t.nodeType),(t=>{const n=""+e;if(t.data.startsWith(n)){if(t.data.length!==n.length)return t.splitText(n.length)}else t.data=n}),(()=>T(e)),!0)}function G(t){return H(t," ")}function K(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function Y(t,e,n,r){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}const X=new Map;let Z,Q=0;function tt(t,e){const n=(t.style.animation||"").split(", "),r=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),i=n.length-r.length;i&&(t.style.animation=r.join(", "),Q-=i,Q||x((()=>{Q||(X.forEach((t=>{const{stylesheet:e}=t;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.rules={}})),X.clear())})))}function et(t){Z=t}function nt(){if(!Z)throw new Error("Function called outside component initialization");return Z}function rt(t){nt().$$.on_mount.push(t)}function it(t){nt().$$.on_destroy.push(t)}function ot(t,e){return nt().$$.context.set(t,e),e}function at(t){return nt().$$.context.get(t)}function lt(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const st=[],ct=[],dt=[],ut=[],ht=Promise.resolve();let pt=!1;function ft(){pt||(pt=!0,ht.then(_t))}function gt(){return ft(),ht}function mt(t){dt.push(t)}const vt=new Set;let yt,$t=0;function _t(){const t=Z;do{for(;$t<st.length;){const t=st[$t];$t++,et(t),bt(t.$$)}for(et(null),st.length=0,$t=0;ct.length;)ct.pop()();for(let t=0;t<dt.length;t+=1){const e=dt[t];vt.has(e)||(vt.add(e),e())}dt.length=0}while(st.length);for(;ut.length;)ut.pop()();pt=!1,vt.clear(),et(t)}function bt(t){if(null!==t.fragment){t.update(),l(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(mt)}}function wt(t,e,n){t.dispatchEvent(function(t,e,{bubbles:n=!1,cancelable:r=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(t,n,r,e),i}(`${e?"intro":"outro"}${n}`))}const xt=new Set;let kt;function Et(){kt={r:0,c:[],p:kt}}function Ct(){kt.r||l(kt.c),kt=kt.p}function At(t,e){t&&t.i&&(xt.delete(t),t.i(e))}function Vt(t,e,n,r){if(t&&t.o){if(xt.has(t))return;xt.add(t),kt.c.push((()=>{xt.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}const jt={duration:0};function Dt(t,e,i){let o,a,l=e(t,i),c=!1,d=0;function u(){o&&tt(t,o)}function h(){const{delay:e=0,duration:i=300,easing:s=r,tick:h=n,css:p}=l||jt;p&&(o=function(t,e,n,r,i,o,a,l=0){const s=16.666/r;let c="{\n";for(let t=0;t<=1;t+=s){const r=e+(n-e)*o(t);c+=100*t+`%{${a(r,1-r)}}\n`}const d=c+`100% {${a(n,1-n)}}\n}`,u=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(d)}_${l}`,h=V(t),{stylesheet:p,rules:f}=X.get(h)||function(t,e){const n={stylesheet:j(e),rules:{}};return X.set(t,n),n}(h,t);f[u]||(f[u]=!0,p.insertRule(`@keyframes ${u} ${d}`,p.cssRules.length));const g=t.style.animation||"";return t.style.animation=`${g?`${g}, `:""}${u} ${r}ms linear ${i}ms 1 both`,Q+=1,u}(t,0,1,i,e,s,p,d++)),h(0,1);const f=w()+e,g=f+i;a&&a.abort(),c=!0,mt((()=>wt(t,!0,"start"))),a=function(t){let e;return 0===k.size&&x(E),{promise:new Promise((n=>{k.add(e={c:t,f:n})})),abort(){k.delete(e)}}}((e=>{if(c){if(e>=g)return h(1,0),wt(t,!0,"end"),u(),c=!1;if(e>=f){const t=s((e-f)/i);h(t,1-t)}}return c}))}let p=!1;return{start(){p||(p=!0,tt(t),s(l)?(l=l(),(yt||(yt=Promise.resolve(),yt.then((()=>{yt=null}))),yt).then(h)):h())},invalidate(){p=!1},end(){c&&(u(),c=!1)}}}const Pt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function St(t,e){Vt(t,1,1,(()=>{e.delete(t.key)}))}function Ft(t,e){const n={},r={},i={$$scope:1};let o=t.length;for(;o--;){const a=t[o],l=e[o];if(l){for(const t in a)t in l||(r[t]=1);for(const t in l)i[t]||(n[t]=l[t],i[t]=1);t[o]=l}else for(const t in a)i[t]=1}for(const t in r)t in n||(n[t]=void 0);return n}let It;function zt(t){t&&t.c()}function Tt(t,e){t&&t.l(e)}function Mt(t,e,n,r){const{fragment:i,on_mount:a,on_destroy:c,after_update:d}=t.$$;i&&i.m(e,n),r||mt((()=>{const e=a.map(o).filter(s);c?c.push(...e):l(e),t.$$.on_mount=[]})),d.forEach(mt)}function Nt(t,e){const n=t.$$;null!==n.fragment&&(l(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Jt(t,e,r,i,o,s,c,d=[-1]){const u=Z;et(t);const h=t.$$={fragment:null,ctx:null,props:s,update:n,not_equal:o,bound:a(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:a(),dirty:d,skip_bound:!1,root:e.target||u.$$.root};c&&c(h.root);let p=!1;if(h.ctx=r?r(t,e.props||{},((e,n,...r)=>{const i=r.length?r[0]:n;return h.ctx&&o(h.ctx[e],h.ctx[e]=i)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](i),p&&function(t,e){-1===t.$$.dirty[0]&&(st.push(t),ft(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],h.update(),p=!0,l(h.before_update),h.fragment=!!i&&i(h.ctx),e.target){if(e.hydrate){C=!0;const t=R(e.target);h.fragment&&h.fragment.l(t),t.forEach(S)}else h.fragment&&h.fragment.c();e.intro&&At(t.$$.fragment),Mt(t,e.target,e.anchor,e.customElement),C=!1,_t()}et(u)}new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),"function"==typeof HTMLElement&&(It=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(o).filter(s);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){l(this.$$.on_disconnect)}$destroy(){Nt(this,1),this.$destroy=n}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!h(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});class Ot{$destroy(){Nt(this,1),this.$destroy=n}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!h(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Bt=[];function Rt(t,e=n){let r;const i=new Set;function o(e){if(o=e,((n=t)!=n?o==o:n!==o||n&&"object"==typeof n||"function"==typeof n)&&(t=e,r)){const e=!Bt.length;for(const e of i)e[1](),Bt.push(e,t);if(e){for(let t=0;t<Bt.length;t+=2)Bt[t][0](Bt[t+1]);Bt.length=0}}var n,o}return{set:o,update:function(e){o(e(t))},subscribe:function(a,l=n){const s=[a,l];return i.add(s),1===i.size&&(r=e(o)||n),a(t),()=>{i.delete(s),0===i.size&&(r(),r=null)}}}}function Ut(t,e,r){const i=!Array.isArray(t),o=i?[t]:t,a=e.length<2;return{subscribe:Rt(r,(t=>{let r=!1;const c=[];let d=0,u=n;const h=()=>{if(d)return;u();const r=e(i?c[0]:c,t);a?t(r):u=s(r)?r:n},f=o.map(((t,e)=>p(t,(t=>{c[e]=t,d&=~(1<<e),r&&h()}),(()=>{d|=1<<e}))));return r=!0,h(),function(){l(f),u()}})).subscribe}}const Wt=Symbol("root");function Lt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t;return n.level=e.level||"error",e.additional&&(n.additional=e.additional),n}const qt={text:"divkit-d9b0e",text_halign_left:"divkit-a4cb7",text_halign_center:"divkit-e1659",text_halign_right:"divkit-ea280",text_valign_top:"divkit-d8ce0",text_valign_center:"divkit-ef58e",text_valign_bottom:"divkit-fe8ed",text_valign_baseline:"divkit-e0c6c",text__inner:"divkit-b8528",text_singleline:"divkit-ef11c",text_truncate_none:"divkit-c6ea1",text_multiline:"divkit-ee8e3",text__inner_gradient:"divkit-cb8e0",text__image:"divkit-bf6e2",text__image_hidden:"divkit-f1002"},Ht={outer:"divkit-d65a7","outer_hide-on-transition-in":"divkit-a6d12","outer_halign-self_start":"divkit-cc452","outer_halign-self_center":"divkit-b8331","outer_halign-self_end":"divkit-c573c","outer_halign-self_stretch":"divkit-dcc74","outer_valign-self_start":"divkit-e8077","outer_valign-self_center":"divkit-d40a7","outer_valign-self_end":"divkit-e9f84","outer_valign-self_stretch":"divkit-b7aa3","outer_parent-flex_vertical":"divkit-c143f","outer_parent-flex_horizontal":"divkit-ef302","outer_valign-self_baseline":"divkit-e72b5",outer_width_content:"divkit-b8f4d",outer_height_content:"divkit-faa66","outer_width-constrained":"divkit-d3211","outer_parent-grid":"divkit-ff439","outer_height-constrained":"divkit-a5256","outer_parent-overlap":"divkit-dab2d","outer_parent-overlap-absolute":"divkit-d43fb","outer_scroll-snap_center":"divkit-d9e38","outer_scroll-snap_start":"divkit-efd1e",outer__border:"divkit-d4056",outer_visibility_invisible:"divkit-f018b",outer_visibility_gone:"divkit-e784b","outer_has-action-animation":"divkit-f4980"};function Gt(t){if(!t)return;let e="";for(const n in t)if(t.hasOwnProperty(n)){if(!t[n]&&0!==t[n])continue;e&&(e+=";"),e+=n+":"+String(t[n])}return e||void 0}function Kt(t){if("number"!=typeof t&&"string"!=typeof t||!t)return"0";const e=Number(t);return isNaN(e)?"0":Math.ceil(1e3*e)/1e4+"em"}function Yt(t){let e=Kt(t);return"0"===e&&(e+="em"),e}function Xt(t,e){for(;t.length<e;)t="0"+t;return t}function Zt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"transparent";if("#"!==(t=(t||"").toLowerCase()).charAt(0))return n;const r=te(t);return r?(r.a*=e,Qt(r)):n}function Qt(t){return 255===t.a?"#".concat([t.r,t.g,t.b].map((t=>Xt(Math.round(t).toString(16),2))).join("")):"rgba(".concat(t.r,",").concat(t.g,",").concat(t.b,",").concat((t.a/255).toFixed(2),")")}function te(t){const e=t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||t.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])$/i)||t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||t.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i);if(e){if(5===e.length){const[t,n,r,i,o]=e,a=2===r.length?r:r+r,l=2===i.length?i:i+i,s=2===o.length?o:o+o,c=2===n.length?n:n+n;return{a:parseInt(c,16),r:parseInt(a,16),g:parseInt(l,16),b:parseInt(s,16)}}const[t,n,r,i]=e,o=2===n.length?n:n+n,a=2===r.length?r:r+r,l=2===i.length?i:i+i;return{a:255,r:parseInt(o,16),g:parseInt(a,16),b:parseInt(l,16)}}return null}function ee(t){let e=String(t);return e.indexOf("&")>-1&&(e=e.replace(/&/g,"&")),e.indexOf("<")>-1&&(e=e.replace(/</g,"<")),e.indexOf(">")>-1&&(e=e.replace(/>/g,">")),e.indexOf('"')>-1&&(e=e.replace(/"/g,""")),e}const ne=Boolean;function re(t){if(1===t.length&&"solid"===t[0].type)return{color:Zt(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=Zt(t.bg.color||"transparent");return{size:void 0,pos:void 0,image:"linear-gradient(to bottom,".concat(e,",").concat(e,")")}}({bg:t}):"gradient"===t.type?function(t){var e;if(!Array.isArray(null===(e=t.bg)||void 0===e?void 0:e.colors))return;const n=t.bg.colors.filter(ne);return n.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+n.map((t=>Zt(t))).join(",")+")"}:void 0}({bg:t}):"image"===t.type?function(t){var e;const n=null===(e=t.bg)||void 0===e?void 0:e.image_url;if(n)return{size:ae(t.bg.scale),pos:le(t.bg),image:'url("'+ee(n)+'")'}}({bg:t}):"radial_gradient"===t.type?function(t){var e;if(!Array.isArray(null===(e=t.bg)||void 0===e?void 0:e.colors))return;const n=t.bg.colors.filter(ne);if(!n.length)return;const r=t.bg.radius;let i;r&&"object"==typeof r&&"type"in r&&void 0!==r.value&&("fixed"===r.type?i=Yt(r.value):"relative"===r.type&&(i=ie[r.value]));const o=oe(t.bg.center_x),a=oe(t.bg.center_y);return{size:void 0,pos:void 0,image:"radial-gradient("+"circle ".concat(i||"farthest-corner"," at ").concat(o," ").concat(a)+","+n.map((t=>Zt(t))).join(",")+")"}}({bg:t}):void 0)).filter(ne).reverse().reduce((function(t,e){return t.image.push(e.image),t.size.push(e.size||"auto"),t.position.push(e.pos||"50% 50%"),t}),{image:[],size:[],position:[]});return{image:e.image.join(","),size:e.size.join(","),position:e.position.join(",")}}const ie={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function oe(t){if(t&&"object"==typeof t&&"type"in t&&void 0!==t.value){if("fixed"===t.type)return Yt(t.value);if("relative"===t.type)return"".concat(100*Number(t.value),"%")}return"50%"}function ae(t){return"fill"!==t&&t?"fit"===t?"contain":void 0:"cover"}function le(t){let e,n;return e="left"===t.content_alignment_horizontal?"0%":"right"===t.content_alignment_horizontal?"100%":"50%",n="top"===t.content_alignment_vertical?"0%":"bottom"===t.content_alignment_vertical?"100%":"50%",e+" "+n}function se(t){const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}function ce(t,e){return e.has(t)}function de(t,e){e&&t.push(e)}function ue(t,e,n){const r=[];de(r,e[t]);for(const i in n)if(n.hasOwnProperty(i)){const o=n[i];o&&de(r,e["".concat(t,"_").concat(i)+("string"==typeof o?"_".concat(o):"")])}return r.join(" ")}const he=Symbol("state");function pe(t){return Kt(t.top||0)+" "+Kt(t.right||0)+" "+Kt(t.bottom||0)+" "+Kt(t.left||0)}function fe(t){if("number"!=typeof t&&"string"!=typeof t)return!1;const e=Number(t);return!isNaN(e)}function ge(t){return fe(t)&&t>=0}function me(t,e){if(!t)return e;const n=[t.top,t.right,t.bottom,t.left];for(let t=0;t<n.length;++t)if(n[t]&&!ge(n[t]))return e;return pe(t)}function ve(t,e){const n=Number(t);return isNaN(n)||n<0?e:n}const ye=Object.prototype.hasOwnProperty;function $e(t,e){if(Object.is(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return Object.is(t,e);const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++){const i=n[r];if(!ye.call(e,i)||!$e(t[i],e[i]))return!1}return!0}function _e(t,e){return $e(t,e)?e:t}function be(t,e){return"linear"===t||"ease"===t||"ease_in_out"===t||"ease_in"===t||"ease_out"===t?t:e}function we(t,e){const n=Number(t);return isNaN(n)?e:n}function xe(t){const e=[];return"set"===t.name?(t.items||[]).forEach((t=>{e.push(...xe(t))})):e.push(t),e}function ke(t,e){if(!t||"object"!=typeof t)return e;const n=["top","right","bottom","left"];for(let r=0;r<n.length;++r)if(t[n[r]]&&!ge(t[n[r]]))return e;return t}function Ee(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]].map((t=>Kt((t||e)/n*10))).join(" ")}function Ce(){}const Ae=Symbol("action");function Ve(t){const e=t.touches[0];return{x:e.clientX||e.pageX,y:e.clientY||e.pageY}}function je(t){var e;let n,r,o,a,c,d,u,h;const p=t[19].default,f=g(p,t,t[18],null);let m=[{class:r=t[2]+(t[9]?" ".concat(t[6]?"divkit-bd259":"divkit-d9099"," ").concat("divkit-c016b"):"")+" "+(null!==(e=t[1])&&void 0!==e&&e.length?"divkit-f0cba":"")},{style:t[3]},{role:o=t[9]?"button":null},{tabindex:a=t[9]?0:null},t[4]],b={};for(let t=0;t<m.length;t+=1)b=i(b,m[t]);return{c(){n=I("span"),f&&f.c(),this.h()},l(t){n=L(t,"SPAN",{class:!0,style:!0,role:!0,tabindex:!0});var e=R(n);f&&f.l(e),e.forEach(S),this.h()},h(){B(n,b)},m(e,r){P(e,n,r),f&&f.m(n,null),d=!0,u||(h=[_(c=t[5].call(null,n)),J(n,"click",(function(){s(t[9]?t[10]:null)&&(t[9]?t[10]:null).apply(this,arguments)})),J(n,"click",t[21]),J(n,"dblclick",(function(){var e,n;s(null!==(e=t[0])&&void 0!==e&&e.length?t[11]:null)&&(null!==(n=t[0])&&void 0!==n&&n.length?t[11]:null).apply(this,arguments)})),J(n,"touchstart",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[12]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[12]:null).apply(this,arguments)})),J(n,"touchmove",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[13]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[13]:null).apply(this,arguments)})),J(n,"touchend",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),J(n,"touchcancel",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),J(n,"keydown",t[15])],u=!0)},p(e,i){var l;t=e,f&&f.p&&(!d||262144&i)&&y(f,p,t,t[18],d?v(p,t[18],i,null):$(t[18]),null),B(n,b=Ft(m,[(!d||582&i&&r!==(r=t[2]+(t[9]?" ".concat(t[6]?"divkit-bd259":"divkit-d9099"," ").concat("divkit-c016b"):"")+" "+(null!==(l=t[1])&&void 0!==l&&l.length?"divkit-f0cba":"")))&&{class:r},(!d||8&i)&&{style:t[3]},(!d||512&i&&o!==(o=t[9]?"button":null))&&{role:o},(!d||512&i&&a!==(a=t[9]?0:null))&&{tabindex:a},16&i&&t[4]]))},i(t){d||(At(f,t),d=!0)},o(t){Vt(f,t),d=!1},d(t){t&&S(n),f&&f.d(t),u=!1,l(h)}}}function De(t){var e;let n,r,o,a,c,d;const u=t[19].default,h=g(u,t,t[18],null);let p=[{href:t[7]},{target:t[8]},{style:t[3]},{class:r=t[2]+" "+(t[6]?"divkit-bd259":"divkit-d9099")+" "+(null!==(e=t[1])&&void 0!==e&&e.length?"divkit-f0cba":"")},t[4]],f={};for(let t=0;t<p.length;t+=1)f=i(f,p[t]);return{c(){n=I("a"),h&&h.c(),this.h()},l(t){n=L(t,"A",{href:!0,target:!0,style:!0,class:!0});var e=R(n);h&&h.l(e),e.forEach(S),this.h()},h(){B(n,f)},m(e,r){P(e,n,r),h&&h.m(n,null),a=!0,c||(d=[_(o=t[5].call(null,n)),J(n,"click",t[10]),J(n,"click",t[20]),J(n,"dblclick",(function(){var e,n;s(null!==(e=t[0])&&void 0!==e&&e.length?t[11]:null)&&(null!==(n=t[0])&&void 0!==n&&n.length?t[11]:null).apply(this,arguments)})),J(n,"touchstart",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[12]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[12]:null).apply(this,arguments)})),J(n,"touchmove",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[13]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[13]:null).apply(this,arguments)})),J(n,"touchend",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),J(n,"touchcancel",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),J(n,"keydown",t[15])],c=!0)},p(e,i){var o;t=e,h&&h.p&&(!a||262144&i)&&y(h,u,t,t[18],a?v(u,t[18],i,null):$(t[18]),null),B(n,f=Ft(p,[(!a||128&i)&&{href:t[7]},(!a||256&i)&&{target:t[8]},(!a||8&i)&&{style:t[3]},(!a||70&i&&r!==(r=t[2]+" "+(t[6]?"divkit-bd259":"divkit-d9099")+" "+(null!==(o=t[1])&&void 0!==o&&o.length?"divkit-f0cba":"")))&&{class:r},16&i&&t[4]]))},i(t){a||(At(h,t),a=!0)},o(t){Vt(h,t),a=!1},d(t){t&&S(n),h&&h.d(t),c=!1,l(d)}}}function Pe(t){let e,n,r,i;const o=[De,je],a=[];function l(t,e){return t[7]?0:1}return e=l(t),n=a[e]=o[e](t),{c(){n.c(),r=N()},l(t){n.l(t),r=N()},m(t,n){a[e].m(t,n),P(t,r,n),i=!0},p(t,i){let[s]=i,c=e;e=l(t),e===c?a[e].p(t,s):(Et(),Vt(a[c],1,1,(()=>{a[c]=null})),Ct(),n=a[e],n?n.p(t,s):(n=a[e]=o[e](t),n.c()),At(n,1),n.m(r.parentNode,r))},i(t){i||(At(n),i=!0)},o(t){Vt(n),i=!1},d(t){a[e].d(t),t&&S(r)}}}function Se(t,e,n){let{$$slots:r={},$$scope:i}=e,{actions:o}=e,{doubleTapActions:a}=e,{longTapActions:l}=e,{cls:s=""}=e,{style:c=null}=e,{attrs:d}=e,{use:u=Ce}=e,{customAction:h=null}=e,{isNativeActionAnimation:p=!0}=e;const f=at(Wt),g=at(Ae);ot(Ae,{hasAction:()=>Boolean(g.hasAction()||(null==o?void 0:o.length))});let m,v="",y=-1,$=null,_=!1;if(Array.isArray(o)&&(null==o?void 0:o.length))for(let t=0;t<o.length;++t){const e=o[t].url;if(e){v=e,m=o[t].target||void 0;break}}Array.isArray(o)&&(null==o?void 0:o.length)&&g.hasAction()&&(v="",f.logError(Lt(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:o}})));let b=Boolean(h);return v&&!ce(se(v),f.getBuiltinProtocols())&&(v="",b=!0),t.$$set=t=>{"actions"in t&&n(16,o=t.actions),"doubleTapActions"in t&&n(0,a=t.doubleTapActions),"longTapActions"in t&&n(1,l=t.longTapActions),"cls"in t&&n(2,s=t.cls),"style"in t&&n(3,c=t.style),"attrs"in t&&n(4,d=t.attrs),"use"in t&&n(5,u=t.use),"customAction"in t&&n(17,h=t.customAction),"isNativeActionAnimation"in t&&n(6,p=t.isNativeActionAnimation),"$$scope"in t&&n(18,i=t.$$scope)},[a,l,s,c,d,u,p,v,m,b,async function(t){g.hasAction()||void 0!==t.button&&0!==t.button||(!1===(null==h?void 0:h(t))?t.preventDefault():o&&(o.some((t=>{const e=null==t?void 0:t.url;if(!e)return!1;const n=se(e);return n&&!ce(n,f.getBuiltinProtocols())}))&&t.preventDefault(),f.execAnyActions(o)))},function(t){g.hasAction()||void 0!==t.button&&0!==t.button||f.execAnyActions(a,!0)},function(t){t.touches.length>1||($=Ve(t),_=!1,y=Date.now())},function(t){if(!$)return;const e=Ve(t);(Math.abs($.x-e.x)>8||Math.abs($.y-e.y)>8)&&(_=!0)},function(){!$||y<0||(!_&&Date.now()-y>=400&&f.execAnyActions(l,!0),$=null,y=-1)},function(t){t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||"Enter"===t.key&&Array.isArray(o)&&o.length&&(f.execAnyActions(o),t.preventDefault())},o,h,i,r,function(e){lt.call(this,t,e)},function(e){lt.call(this,t,e)}]}const Fe=class extends Ot{constructor(t){super(),Jt(this,t,Se,Pe,u,{actions:16,doubleTapActions:0,longTapActions:1,cls:2,style:3,attrs:4,use:5,customAction:17,isNativeActionAnimation:6})}};function Ie(t){return fe(t)&&t>0}function ze(t,e){return t.map((t=>{if("blur"===(null==t?void 0:t.type)){if(Ie(t.radius))return"blur(".concat(Yt(t.radius/2),")")}else e(Lt(new Error("Unknown filter"),{level:"warn",additional:{filter:null==t?void 0:t.type}}))})).filter(Boolean).join(" ")}function Te(t,e,n){const r=t.slice();return r[5]=e[n],r}function Me(t){let e,n,r;return{c(){e=I("span"),this.h()},l(t){e=L(t,"SPAN",{class:!0,style:!0}),R(e).forEach(S),this.h()},h(){O(e,"class",n="divkit-b921d"),O(e,"style",r=Gt(t[5].style))},m(t,n){P(t,e,n)},p(t,n){2&n&&r!==(r=Gt(t[5].style))&&O(e,"style",r)},d(t){t&&S(e)}}}function Ne(t){let e,n,r,i,o,a;return{c(){e=I("img"),this.h()},l(t){e=L(t,"IMG",{src:!0,alt:!0,"aria-hidden":!0,loading:!0,decoding:!0,class:!0,style:!0}),this.h()},h(){d(e.src,n=t[5].image_url)||O(e,"src",n),O(e,"alt",""),O(e,"aria-hidden","true"),O(e,"loading","lazy"),O(e,"decoding","async"),O(e,"class",r="divkit-b921d"),O(e,"style",i=Gt(t[5].style))},m(n,r){P(n,e,r),o||(a=J(e,"error",t[2]),o=!0)},p(t,r){2&r&&!d(e.src,n=t[5].image_url)&&O(e,"src",n),2&r&&i!==(i=Gt(t[5].style))&&O(e,"style",i)},d(t){t&&S(e),o=!1,a()}}}function Je(t){let e;function n(t,e){return t[5].image_url?Ne:Me}let r=n(t),i=r(t);return{c(){i.c(),e=N()},l(t){i.l(t),e=N()},m(t,n){i.m(t,n),P(t,e,n)},p(t,o){r===(r=n(t))&&i?i.p(t,o):(i.d(1),i=r(t),i&&(i.c(),i.m(e.parentNode,e)))},d(t){i.d(t),t&&S(e)}}}function Oe(t){let e,r,i=t[1],o=[];for(let e=0;e<i.length;e+=1)o[e]=Je(Te(t,i,e));return{c(){e=I("span");for(let t=0;t<o.length;t+=1)o[t].c();this.h()},l(t){e=L(t,"SPAN",{class:!0});var n=R(e);for(let t=0;t<o.length;t+=1)o[t].l(n);n.forEach(S),this.h()},h(){O(e,"class",r="divkit-bf253"+(t[0]?" divkit-dcad7":"")),Y(e,"border-radius",t[0],!1)},m(t,n){P(t,e,n);for(let t=0;t<o.length;t+=1)o[t].m(e,null)},p(t,n){let[a]=n;if(6&a){let n;for(i=t[1],n=0;n<i.length;n+=1){const r=Te(t,i,n);o[n]?o[n].p(r,a):(o[n]=Je(r),o[n].c(),o[n].m(e,null))}for(;n<o.length;n+=1)o[n].d(1);o.length=i.length}1&a&&r!==(r="divkit-bf253"+(t[0]?" divkit-dcad7":""))&&O(e,"class",r),1&a&&Y(e,"border-radius",t[0],!1)},i:n,o:n,d(t){t&&S(e),F(o,t)}}}function Be(t,e,n){let r,{background:i=[]}=e,{radius:o=""}=e;const a=at(Wt);return t.$$set=t=>{"background"in t&&n(3,i=t.background),"radius"in t&&n(0,o=t.radius)},t.$$.update=()=>{8&t.$$.dirty&&n(1,r=i.map((t=>{const e={},n={style:e};if("nine_patch_image"===t.type&&t.insets)e["border-image"]='url("'.concat(t.image_url,'") ').concat(t.insets.top||0," ").concat(t.insets.right||0," ").concat(t.insets.bottom||0," ").concat(t.insets.left||0," fill"),e["border-image-width"]="auto";else{const r=re([t]);"solid"===t.type&&(e["background-color"]=r.color),"gradient"===t.type&&(e["background-image"]=r.image),"image"===t.type&&(e.opacity=Number(t.alpha),n.image_url=t.image_url,e["object-fit"]=r.size,e["object-position"]=r.position,Array.isArray(t.filters)&&t.filters.length&&(e.filter=ze(t.filters,a.logError)))}return n})))},[o,r,function(t){t.target&&"classList"in t.target&&t.target.classList.add("divkit-cd613")},i]}const Re=class extends Ot{constructor(t){super(),Jt(this,t,Be,Oe,u,{background:3,radius:0})}};function Ue(t){let e,n;return e=new Fe({props:{use:t[32],cls:t[0]+" "+ue("outer",Ht,t[15]),style:Gt(t[13]),actions:t[10],doubleTapActions:t[11],longTapActions:t[12],attrs:t[6],isNativeActionAnimation:!t[4].length||Ge(t[4]),$$slots:{default:[qe]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};32769&n[0]&&(r.cls=t[0]+" "+ue("outer",Ht,t[15])),8192&n[0]&&(r.style=Gt(t[13])),1024&n[0]&&(r.actions=t[10]),2048&n[0]&&(r.doubleTapActions=t[11]),4096&n[0]&&(r.longTapActions=t[12]),64&n[0]&&(r.attrs=t[6]),16&n[0]&&(r.isNativeActionAnimation=!t[4].length||Ge(t[4])),174&n[0]|131072&n[3]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function We(t){let e,n;return e=new Re({props:{background:t[5],radius:t[2]}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};32&n[0]&&(r.background=t[5]),4&n[0]&&(r.radius=t[2]),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function Le(t){let e,n,r;return{c(){e=I("span"),this.h()},l(t){e=L(t,"SPAN",{class:!0,style:!0}),R(e).forEach(S),this.h()},h(){O(e,"class",n=Ht.outer__border),O(e,"style",r=Gt(t[1]))},m(t,n){P(t,e,n)},p(t,n){2&n[0]&&r!==(r=Gt(t[1]))&&O(e,"style",r)},d(t){t&&S(e)}}}function qe(t){let e,n,r,i=t[3]&&We(t);const o=t[109].default,a=g(o,t,t[110],null);let l=t[7]&&Le(t);return{c(){i&&i.c(),e=N(),a&&a.c(),l&&l.c(),n=N()},l(t){i&&i.l(t),e=N(),a&&a.l(t),l&&l.l(t),n=N()},m(t,o){i&&i.m(t,o),P(t,e,o),a&&a.m(t,o),l&&l.m(t,o),P(t,n,o),r=!0},p(t,s){t[3]?i?(i.p(t,s),8&s[0]&&At(i,1)):(i=We(t),i.c(),At(i,1),i.m(e.parentNode,e)):i&&(Et(),Vt(i,1,1,(()=>{i=null})),Ct()),a&&a.p&&(!r||131072&s[3])&&y(a,o,t,t[110],r?v(o,t[110],s,null):$(t[110]),null),t[7]?l?l.p(t,s):(l=Le(t),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},i(t){r||(At(i),At(a,t),r=!0)},o(t){Vt(i),Vt(a,t),r=!1},d(t){i&&i.d(t),t&&S(e),a&&a.d(t),l&&l.d(t),t&&S(n)}}}function He(t){let e,n,r=!t[8]&&!t[9]&&Ue(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[8]||t[9]?r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct()):r?(r.p(t,n),768&n[0]&&At(r,1)):(r=Ue(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Ge(t){return t.some((t=>"native"===t.name))}function Ke(t,e,r){let i,o,a,l,s,c,d,u,h,f,g,m,v,y,$,_,b,w,x,k,E,C,A,V,j,D,P,S,F,I,z,T,M,N,J,O,B,R,U,W,L,q=n,H=n,G=n,K=n,Y=n,X=n,Z=n,Q=n,tt=n,et=n,nt=n,rt=n,it=n,ot=n,lt=n,st=n,ct=n;t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Z())),t.$$.on_destroy.push((()=>Q())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>et())),t.$$.on_destroy.push((()=>nt())),t.$$.on_destroy.push((()=>rt())),t.$$.on_destroy.push((()=>it())),t.$$.on_destroy.push((()=>ot())),t.$$.on_destroy.push((()=>lt())),t.$$.on_destroy.push((()=>st())),t.$$.on_destroy.push((()=>ct()));let{$$slots:dt={},$$scope:ut}=e;var ht,pt,ft,mt,vt,yt;let{json:$t={}}=e,{origJson:_t}=e,{templateContext:bt}=e,{cls:wt=""}=e,{style:xt}=e,{layoutParams:kt={}}=e,{customDescription:Et=!1}=e,{customPaddings:Ct=!1}=e,{customActions:At=""}=e,{additionalPaddings:Vt=null}=e;const jt={left:"start",center:"center",right:"end"},Dt={top:"start",center:"center",bottom:"end",baseline:"baseline"},Pt=at(Wt),St=at(he);let Ft,It,zt,Tt,Mt,Nt,Jt,Ot,Bt,Rt,Ut,qt={},Ht={},Gt=!1,Xt=1,Qt="transparent",te=0,ee={"top-left":0,"top-right":0,"bottom-right":0,"bottom-left":0},ne="",ie=null,oe="",ae={},le=0,de=0,ue=0,fe=!1,ye=!1,$e={},Ce=0,Ae=0,Ve=0,je=!1,De=!1,Pe=1;const Se=kt.fakeElement?[]:$t.transition_triggers||["state_change","visibility_change"],Fe=-1!==Se.indexOf("state_change")&&$t.id,Ie=-1!==Se.indexOf("visibility_change")&&$t.id;let ze,Te,Me,Ne,Je,Oe,Be,Re=[],Ue=[],We=[],Le=[],qe="";function He(t){const e=we(t.start_value,1),n=we(t.end_value,1),i=ve(t.start_delay,0),o=ve(t.duration,300),a=be(t.interpolator,"ease_in_out").replace(/_/g,"-");switch(t.name){case"fade":return r(78,Ne=e),r(79,Je=n),"opacity ".concat(o,"ms ").concat(a," ").concat(i,"ms");case"scale":return r(80,Oe=e),r(81,Be=n),"transform ".concat(o,"ms ").concat(a," ").concat(i,"ms");case"native":case"no_animation":return"";default:return Pt.logError(Lt(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}}let Ge,Ke,Ye=!1,Xe="visible",Ze=0,Qe=0;return t.$$set=t=>{"json"in t&&r(33,$t=t.json),"origJson"in t&&r(34,_t=t.origJson),"templateContext"in t&&r(35,bt=t.templateContext),"cls"in t&&r(0,wt=t.cls),"style"in t&&r(36,xt=t.style),"layoutParams"in t&&r(37,kt=t.layoutParams),"customDescription"in t&&r(38,Et=t.customDescription),"customPaddings"in t&&r(39,Ct=t.customPaddings),"customActions"in t&&r(40,At=t.customActions),"additionalPaddings"in t&&r(41,Vt=t.additionalPaddings),"$$scope"in t&&r(110,ut=t.$$scope)},t.$$.update=()=>{if(4&t.$$.dirty[1]&&(r(31,i=Pt.getDerivedFromVars($t.border)),ct(),ct=p(i,(t=>r(108,L=t)))),2&t.$$.dirty[0]|4192256&t.$$.dirty[1]|32768&t.$$.dirty[3]){let t={},e={},n=!1,i="";if(L){if(L.has_shadow){const e=L.shadow;t["box-shadow"]=e?Kt((null===r(43,pt=null===r(42,ht=e.offset)||void 0===ht?void 0:ht.x)||void 0===pt?void 0:pt.value)||0)+" "+Kt((null===r(45,mt=null===r(44,ft=e.offset)||void 0===ft?void 0:ft.y)||void 0===mt?void 0:mt.value)||0)+" "+Kt(null!==r(46,vt=e.blur)&&void 0!==vt?vt:2)+" "+Zt(e.color||"#000000",null!==r(47,yt=e.alpha)&&void 0!==yt?yt:.19):"0 1px 2px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.07)"}if(L.stroke&&(n=!0,r(49,Xt=ve(L.stroke.width,Xt)),r(50,Qt=Zt(L.stroke.color,1,Qt)),e.border="".concat(Kt(Xt)," solid ").concat(Qt)),L.corners_radius?(r(52,ee=function(t,e){const n=[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]];for(let t=0;t<n.length;++t)if(n[t]&&!ge(n[t]))return e;return t}(L.corners_radius,ee)),e["border-radius"]=t["border-radius"]=Ee(ee)):L.corner_radius&&(r(51,te=ve(L.corner_radius,te)),r(52,ee={"top-left":te,"top-right":te,"bottom-right":te,"bottom-left":te}),e["border-radius"]=t["border-radius"]=Kt(te)),n&&Xt&&(L.corners_radius||L.corner_radius)){let t=Object.assign({},ee);["top-left","top-right","bottom-right","bottom-left"].forEach((e=>{t[e]=(t[e]||0)+Xt/2})),i=Ee(t)}}r(48,qt=_e(t,qt)),r(1,Ht=_e(e,Ht)),r(7,Gt=n),r(2,ne=i)}if(4&t.$$.dirty[1]&&(r(30,o=Pt.getDerivedFromVars($t.paddings)),st(),st=p(o,(t=>r(107,W=t)))),4194560&t.$$.dirty[1]|16384&t.$$.dirty[3]&&r(53,ie=ke(W&&!Ct?W:void 0,ie)),4195328&t.$$.dirty[1]&&r(89,a=pe(function(t,e){if(!t&&!e)return{};if(!e)return t;if(!t)return e;const n={};return["top","right","bottom","left"].forEach((r=>{const i=t[r];i&&(n[r]=i);const o=e[r];o&&(n[r]=(n[r]||0)+o)})),n}(ie,Vt))),4&t.$$.dirty[1]&&(r(29,l=Pt.getDerivedFromVars($t.margins)),ot(),ot=p(l,(t=>r(105,R=t)))),8388608&t.$$.dirty[1]|4096&t.$$.dirty[3]&&r(54,oe=me(R,oe)),4&t.$$.dirty[1]&&(r(28,s=Pt.getDerivedFromVars($t.width)),rt(),rt=p(s,(t=>r(103,O=t)))),4&t.$$.dirty[1]&&(r(27,c=Pt.getDerivedFromVars($t.alignment_horizontal)),lt(),lt=p(c,(t=>r(106,U=t)))),285212736&t.$$.dirty[1]|13312&t.$$.dirty[3]){let t,e,n,i,o={},a=0,l=0,s=!1,c=!1;const d=null==O?void 0:O.type;if("fixed"===d)r(59,le=ve(null==O?void 0:O.value,le)),e=Kt(le);else if("wrap_content"!==d&&(kt.overlapParent||"match_parent"!==d&&d||!kt.parentHorizontalWrapContent))t="parent","vertical"===kt.parentContainerOrientation&&kt.parentContainerWrap&&(c=!0,Pt.logError(Lt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"vertical"===kt.parentLayoutOrientation?e="calc(100% - ".concat(Yt(((null==R?void 0:R.left)||0)+((null==R?void 0:R.right)||0)),")"):"horizontal"===kt.parentContainerOrientation&&(a=O&&"weight"in O&&O.weight||1,kt.parentContainerWrap&&(s=!0));else{if(t="content",("wrap_content"===d&&(null==O?void 0:O.constrained)||("match_parent"===d||!d)&&kt.parentHorizontalWrapContent)&&(o["width-constrained"]=!0,"horizontal"===kt.parentContainerOrientation&&(l=1)),"wrap_content"===d){const t=O;t.min_size&&ge(t.min_size.value)&&(n=Kt(t.min_size.value)),t.max_size&&ge(t.max_size.value)&&(i=Kt(t.max_size.value))}"match_parent"!==d&&d||Pt.logError(Lt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}if("parent"===t)o["halign-self"]="stretch";else{const t=U;o["halign-self"]="left"===t||"center"===t||"right"===t?jt[t]:kt.parentHAlign||"start"}t&&(o.width=t),r(56,zt=e),r(57,Tt=n),r(58,Mt=i),r(60,de=a),r(61,ue=l),r(55,ae=_e(o,ae)),r(62,fe=s),r(8,ye=c)}if(4&t.$$.dirty[1]&&(r(26,d=Pt.getDerivedFromVars($t.height)),nt(),nt=p(d,(t=>r(102,J=t)))),4&t.$$.dirty[1]&&(r(25,u=Pt.getDerivedFromVars($t.alignment_vertical)),it(),it=p(u,(t=>r(104,B=t)))),64&t.$$.dirty[1]|34&t.$$.dirty[2]|6656&t.$$.dirty[3]){let t,e,n,i,o={},a=0,l=0,s=!1,c=!1;const d=null==J?void 0:J.type;if("fixed"===d)r(67,Ce=ve(null==J?void 0:J.value,Ce)),e=Kt(Ce);else if("match_parent"!==d||!kt.overlapParent&&kt.parentVerticalWrapContent){if(t="content",("wrap_content"===d&&(null==J?void 0:J.constrained)||"match_parent"===d&&kt.parentVerticalWrapContent)&&(o["height-constrained"]=!0,"vertical"===kt.parentContainerOrientation&&(l=1)),"wrap_content"===d){const t=J;(null==t?void 0:t.min_size)&&ge(t.min_size.value)&&(n=Kt(t.min_size.value)),(null==t?void 0:t.max_size)&&ge(t.max_size.value)&&(i=Kt(t.max_size.value))}"match_parent"===d&&Pt.logError(Lt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}else t="parent","horizontal"===kt.parentContainerOrientation&&kt.parentContainerWrap&&(c=!0,Pt.logError(Lt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"horizontal"===kt.parentLayoutOrientation?e="calc(100% - ".concat(Yt(((null==R?void 0:R.top)||0)+((null==R?void 0:R.bottom)||0)),")"):"vertical"===kt.parentContainerOrientation&&(a=(null==J?void 0:J.weight)||1,kt.parentContainerWrap&&(s=!0));if("parent"===t)o["valign-self"]="stretch";else{const t=B;"top"===t||"center"===t||"bottom"===t||"baseline"===t&&"horizontal"===kt.parentContainerOrientation?o["valign-self"]=Dt[t]:o["valign-self"]=kt.parentVAlign||"start"}t&&(o.height=t),r(64,Nt=e),r(65,Jt=n),r(66,Ot=i),r(68,Ae=a),r(69,Ve=l),r(63,$e=_e(o,$e)),r(70,je=s),r(9,De=c)}var e,n;if(64&t.$$.dirty[1]&&r(92,h=!!kt.overlapParent||void 0),64&t.$$.dirty[1]|1536&t.$$.dirty[3]&&r(91,f=kt.overlapParent&&(!O||"match_parent"===O.type)&&"match_parent"===(null==J?void 0:J.type)),64&t.$$.dirty[1]&&r(90,g=kt.gridArea?"".concat(kt.gridArea.y+1,"/").concat(kt.gridArea.x+1,"/span ").concat(kt.gridArea.rowSpan,"/span ").concat(kt.gridArea.colSpan):void 0),4&t.$$.dirty[1]&&(r(24,m=Pt.getDerivedFromVars($t.alpha)),et(),et=p(m,(t=>r(101,N=t)))),512&t.$$.dirty[2]|256&t.$$.dirty[3]&&(r(71,(n=Pe,Pe=!ge(e=N)||void 0===e||e>1?n:Number(e))),r(72,Bt=1===Pe?void 0:Pe)),4&t.$$.dirty[1]&&(r(23,v=Pt.getDerivedFromVars($t.accessibility)),tt(),tt=p(v,(t=>r(100,M=t)))),128&t.$$.dirty[1]|128&t.$$.dirty[3]&&(r(6,It=void 0),M&&!Et&&M.description&&(r(6,It={}),r(6,It["aria-label"]=M.description,It))),4&t.$$.dirty[1]&&(r(22,y=Pt.getDerivedFromVars($t.background)),Q(),Q=p(y,(t=>r(5,T=t)))),44&t.$$.dirty[0]&&(r(73,Rt={}),r(3,Ut=!1),T&&(r(3,Ut=T.some((t=>"image"===t.type||"nine_patch_image"===t.type))||Boolean(ne)),!Ut))){const t=re(T);r(73,Rt["background-color"]=t.color,Rt),r(73,Rt["background-image"]=t.image,Rt),r(73,Rt["background-size"]=t.size,Rt),r(73,Rt["background-position"]=t.position,Rt),r(73,Rt["background-repeat"]="no-repeat",Rt)}if(4&t.$$.dirty[1]&&(r(74,ze=void 0),Fe&&$t.transition_in&&Pt.isRunning("stateChange")&&r(74,ze=!0)),4&t.$$.dirty[1]&&(r(76,Me=void 0),Fe&&$t.transition_change&&Pt.isRunning("stateChange")&&St.hasTransitionChange($t.id)&&r(76,Me=!0)),4&t.$$.dirty[1]&&(r(21,$=Pt.getDerivedFromVars($t.action)),X(),X=p($,(t=>r(98,I=t)))),4&t.$$.dirty[1]&&(r(20,_=Pt.getDerivedFromVars($t.actions)),Z(),Z=p(_,(t=>r(99,z=t)))),4&t.$$.dirty[1]&&(r(19,b=Pt.getDerivedFromVars($t.doubletap_actions)),Y(),Y=p(b,(t=>r(97,F=t)))),4&t.$$.dirty[1]&&(r(18,w=Pt.getDerivedFromVars($t.longtap_actions)),K(),K=p(w,(t=>r(96,S=t)))),576&t.$$.dirty[1]|120&t.$$.dirty[3]){let t=z||I&&[I]||[],e=F||[],n=S||[];kt.fakeElement?(t=[],e=[],n=[]):(Array.isArray(t)||(t=[],Pt.logError(Lt(new Error("Actions should be array")))),Array.isArray(e)||(e=[],Pt.logError(Lt(new Error("DoubleTapActions should be array")))),Array.isArray(n)||(n=[],Pt.logError(Lt(new Error("LongTapActions should be array"))))),(t.length||e.length||n.length)&&At&&(t=[],e=[],n=[],Pt.logError(Lt(new Error('Cannot use action on component "'.concat(At,'"'))))),r(10,Re=t),r(11,Ue=e),r(12,We=n)}if(4&t.$$.dirty[1]&&(r(17,x=Pt.getDerivedFromVars($t.action_animation)),G(),G=p(x,(t=>r(95,P=t)))),16&t.$$.dirty[0]|4&t.$$.dirty[3]&&P&&(r(4,Le=xe(P)),r(77,qe=Le.map(He).filter(Boolean).join(", "))),4&t.$$.dirty[1]&&(r(16,k=Pt.getDerivedFromVars($t.visibility)),H(),H=p(k,(t=>r(94,D=t)))),3145728&t.$$.dirty[2]|2&t.$$.dirty[3]){const t=Xe,e=function(t,e){return"visible"===t||"invisible"===t||"gone"===t?t:e}(D,Xe);t!==e&&(!Ye||"visible"!==Xe&&"visible"!==e?r(83,Xe=e):async function(t){r(83,Xe=t);const e="visible"===t?"in":"out",n="in"===e?$t.transition_in:$t.transition_out;Ie&&n&&(await gt(),"in"===e&&r(75,Te=!0),St.runVisibilityTransition(Object.assign(Object.assign({},$t),{visibility:"visible"}),bt,n,Ft,e).then((()=>{"in"===e&&r(75,Te=!1)})).catch((t=>{throw"in"===e&&r(75,Te=!1),t})))}(e)),Ye||r(82,Ye=!0)}if(16777280&t.$$.dirty[1]|1612771330&t.$$.dirty[2]&&r(15,E=Object.assign(Object.assign(Object.assign({},ae),$e),{"parent-overlap":h,"parent-overlap-absolute":f,"scroll-snap":kt.scrollSnap,"hide-on-transition-in":ze||Te||Me,visibility:Xe,"has-action-animation":Boolean(qe),"parent-flex":kt.parentContainerOrientation||void 0,"parent-grid":Boolean(kt.gridArea)||void 0})),4&t.$$.dirty[1]&&(r(14,C=Pt.getDerivedFromVars($t.transform)),q(),q=p(C,(t=>r(93,j=t)))),12582912&t.$$.dirty[2]|1&t.$$.dirty[3]&&j&&void 0!==j.rotation){const t=j.pivot_x||{type:"pivot-percentage",value:50};r(84,Ze=we(t.value,Ze));const e="pivot-fixed"===t.type?Kt(Ze):"".concat(Ze,"%"),n=j.pivot_y||{type:"pivot-percentage",value:50};r(85,Qe=we(n.value,Qe));const i="pivot-fixed"===n.type?Kt(Qe):"".concat(Qe,"%");r(86,Ge="".concat(e," ").concat(i)),r(87,Ke="rotate(".concat(j.rotation,"deg)"))}536870912&t.$$.dirty[1]|321&t.$$.dirty[2]&&r(88,A=fe||je?"100%":de||Ae?0:void 0),1854013472&t.$$.dirty[1]|521112796&t.$$.dirty[2]&&r(13,V=Object.assign(Object.assign(Object.assign(Object.assign({},xt),Rt),qt),{width:zt,"min-width":Tt,"max-width":Mt,height:Nt,"min-height":Jt,"max-height":Ot||(null==xt?void 0:xt["max-height"]),"grid-area":g,padding:a,margin:oe,opacity:Bt,transition:qe,"transform-origin":Ge,transform:Ke,"flex-grow":de||Ae||void 0,"flex-shrink":ue||Ve?1:void 0,"flex-basis":A,"--divkit-animation-opacity-start":Ne,"--divkit-animation-opacity-end":Je,"--divkit-animation-scale-start":Oe,"--divkit-animation-scale-end":Be}))},[wt,Ht,ne,Ut,Le,T,It,Gt,ye,De,Re,Ue,We,V,C,E,k,x,w,b,_,$,y,v,m,u,d,c,s,l,o,i,function(t){Ft=t,Fe&&$t.transition_in&&St.registerChildWithTransitionIn($t,bt,$t.transition_in,t).then((()=>{r(74,ze=!1)})).catch((t=>{throw r(74,ze=!1),t})),Fe&&$t.transition_out&&St.registerChildWithTransitionOut($t,bt,$t.transition_out,t),Fe&&$t.transition_change&&St.registerChildWithTransitionChange($t,bt,$t.transition_change,t).then((()=>{r(76,Me=!1)})).catch((t=>{throw r(76,Me=!1),t}));const e=kt.fakeElement?[]:$t.visibility_actions||$t.visibility_action&&[$t.visibility_action];Array.isArray(e)&&e.length&&function(t,e){let{visibilityActions:n,rootCtx:r}=e;const i=n.map(((t,e)=>({index:e,action:t,visible:!1,count:0,finished:!1}))),o=n.map((t=>r.getJsonWithVars({visibility_percentage:t.visibility_percentage,visibility_duration:t.visibility_duration,log_limit:t.log_limit}))),a=[...new Set([...n.map(((t,e)=>(o[e].visibility_percentage||50)/100))])];new IntersectionObserver((t=>{t.forEach((t=>{i.forEach((e=>{const n=t.intersectionRatio>=(e.action.visibility_percentage||50)/100;!e.visible&&n?e.finished||(e.timer=setTimeout((()=>{++e.count;const t=o[e.index],n=0===t.log_limit?1/0:t.log_limit||1;++e.count>=n&&(e.finished=!0);const i=r.getJsonWithVars(e.action),a=i.url;if(a){const t=se(a);t&&!ce(t,r.getBuiltinProtocols())&&("div-action"===t?r.execAction(i):i.log_id&&r.execCustomAction(i))}r.logStat("visible",i)}),o[e.index].visibility_duration||800)):n||e.timer&&clearTimeout(e.timer),e.visible=n}))}))}),{threshold:a}).observe(t)}(t,{visibilityActions:e,rootCtx:Pt});const n=$t.id;n&&St.registerChild(n);let i=null;return{destroy(){n&&St.unregisterChild(n),i&&i.destroy()}}},$t,_t,bt,xt,kt,Et,Ct,At,Vt,ht,pt,ft,mt,vt,yt,qt,Xt,Qt,te,ee,ie,oe,ae,zt,Tt,Mt,le,de,ue,fe,$e,Nt,Jt,Ot,Ce,Ae,Ve,je,Pe,Bt,Rt,ze,Te,Me,qe,Ne,Je,Oe,Be,Ye,Xe,Ze,Qe,Ge,Ke,A,a,g,f,h,j,D,P,S,F,I,z,M,N,J,O,B,R,U,W,L,dt,ut]}const Ye=class extends Ot{constructor(t){super(),Jt(this,t,Ke,He,u,{json:33,origJson:34,templateContext:35,cls:0,style:36,layoutParams:37,customDescription:38,customPaddings:39,customActions:40,additionalPaddings:41},null,[-1,-1,-1,-1])}},Xe={"text-range":"divkit-faf07","text-range_singleline":"divkit-ccb64","text-range__top-offset":"divkit-d9237","text-range_decoration_both":"divkit-d7e07","text-range_decoration_underline":"divkit-f3dde","text-range_decoration_strike":"divkit-d27b7","text-range_decoration_none":"divkit-c6b0f"};function Ze(t,e){const n=Number(t);return isNaN(n)||n<=0?e:n}function Qe(t){if("light"===t||"medium"===t||"bold"===t||"regular"===t)return"medium"===t?500:"bold"===t?700:"light"===t?300:400}function tn(t,e){return Qe(t)||e}function en(t){let e,n;return{c(){e=I("span"),this.h()},l(t){e=L(t,"SPAN",{class:!0}),R(e).forEach(S),this.h()},h(){O(e,"class",n=Xe["text-range__top-offset"]),Y(e,"margin-top",t[4],!1)},m(t,n){P(t,e,n)},p(t,n){16&n&&Y(e,"margin-top",t[4],!1)},d(t){t&&S(e)}}}function nn(t){let e;return{c(){e=T(t[0])},l(n){e=H(n,t[0])},m(t,n){P(t,e,n)},p(t,n){1&n&&K(e,t[0])},d(t){t&&S(e)}}}function rn(t){let e,n,r,i=t[4]&&en(t);return n=new Fe({props:{cls:ue("text-range",Xe,t[3]),actions:t[1],style:Gt(t[2]),$$slots:{default:[nn]},$$scope:{ctx:t}}}),{c(){i&&i.c(),e=N(),zt(n.$$.fragment)},l(t){i&&i.l(t),e=N(),Tt(n.$$.fragment,t)},m(t,o){i&&i.m(t,o),P(t,e,o),Mt(n,t,o),r=!0},p(t,r){let[o]=r;t[4]?i?i.p(t,o):(i=en(t),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null);const a={};8&o&&(a.cls=ue("text-range",Xe,t[3])),2&o&&(a.actions=t[1]),4&o&&(a.style=Gt(t[2])),524289&o&&(a.$$scope={dirty:o,ctx:t}),n.$set(a)},i(t){r||(At(n.$$.fragment,t),r=!0)},o(t){Vt(n.$$.fragment,t),r=!1},d(t){i&&i.d(t),t&&S(e),Nt(n,t)}}}function on(t,e,n){let r,i,o,a,l;var s,c;let d,{text:u}=e,{rootFontSize:h}=e,{textStyles:p={}}=e,{singleline:f=!1}=e,{actions:g}=e,m="none",v=12,y=1.25,$="",_="",b=null;return t.$$set=t=>{"text"in t&&n(0,u=t.text),"rootFontSize"in t&&n(5,h=t.rootFontSize),"textStyles"in t&&n(6,p=t.textStyles),"singleline"in t&&n(7,f=t.singleline),"actions"in t&&n(1,g=t.actions)},t.$$.update=()=>{if(64&t.$$.dirty){let t="none";(p.underline||p.strike)&&("single"===p.underline&&"single"===p.strike?t="both":"single"===p.underline?t="underline":"single"===p.strike&&(t="strike")),n(10,m=t)}2112&t.$$.dirty&&n(11,v=Ze(p.font_size,v)),2112&t.$$.dirty&&Ie(p.line_height)&&n(12,y=Number(p.line_height)/v),64&t.$$.dirty&&ge(p.letter_spacing)&&n(13,$=Kt(p.letter_spacing)),16448&t.$$.dirty&&n(14,d=tn(p.font_weight,d)),32832&t.$$.dirty&&n(15,_=Zt(p.text_color,1,_)),64&t.$$.dirty&&n(4,r=p.top_offset?Kt(p.top_offset):""),64&t.$$.dirty&&n(18,i=p.background?re([p.background]):null),320&t.$$.dirty&&((null===n(8,s=p.border)||void 0===s?void 0:s.stroke)&&"transparent"!==Zt(p.border.stroke.color)&&Ie(p.border.stroke.width)?n(16,b={color:p.border.stroke.color,width:p.border.stroke.width}):n(16,b=null)),576&t.$$.dirty&&n(17,o=Ze(null===n(9,c=p.border)||void 0===c?void 0:c.corner_radius,0)),1152&t.$$.dirty&&n(3,a={singleline:f,decoration:m}),522272&t.$$.dirty&&n(2,l={"font-size":Kt(10*v/h),"line-height":y,"letter-spacing":$,"font-weight":d,color:_,background:(null==i?void 0:i.color)||void 0,"box-shadow":b?"inset 0 0 0 ".concat(Kt(b.width)," ").concat(b.color):void 0,"border-radius":o?Kt(o):void 0})},[u,g,l,a,r,h,p,f,s,c,m,v,y,$,d,_,b,o,i]}const an=class extends Ot{constructor(t){super(),Jt(this,t,on,rn,u,{text:0,rootFontSize:5,textStyles:6,singleline:7,actions:1})}};function ln(t,e){return"left"===t||"center"===t||"right"===t?t:e}function sn(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t?t:e}function cn(t,e){return"source_in"===t||"source_atop"===t||"darken"===t||"lighten"===t||"multiply"===t||"screen"===t?t:e}const{Boolean:dn}=Pt;function un(t,e,n){const r=t.slice();return r[55]=e[n],r[57]=n,r}function hn(t){let e,n;return e=new Ye({props:{cls:ue("text",qt,t[13])+" "+(t[6]?"":"divkit-c016b"),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[$n]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};8256&n[0]&&(r.cls=ue("text",qt,t[13])+" "+(t[6]?"":"divkit-c016b")),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),134225584&n[0]|134217728&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function pn(t){let e,n;return e=new an({props:{text:t[4],rootFontSize:t[5],textStyles:t[27],singleline:t[7]}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};16&n[0]&&(r.text=t[4]),32&n[0]&&(r.rootFontSize=t[5]),134217728&n[0]&&(r.textStyles=t[27]),128&n[0]&&(r.singleline=t[7]),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function fn(t){let e,n,r=t[10],i=[];for(let e=0;e<r.length;e+=1)i[e]=yn(un(t,r,e));const o=t=>Vt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=N()},l(t){for(let e=0;e<i.length;e+=1)i[e].l(t);e=N()},m(t,r){for(let e=0;e<i.length;e+=1)i[e].m(t,r);P(t,e,r),n=!0},p(t,n){if(268437152&n[0]){let a;for(r=t[10],a=0;a<r.length;a+=1){const o=un(t,r,a);i[a]?(i[a].p(o,n),At(i[a],1)):(i[a]=yn(o),i[a].c(),At(i[a],1),i[a].m(e.parentNode,e))}for(Et(),a=r.length;a<i.length;a+=1)o(a);Ct()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)At(i[t]);n=!0}},o(t){i=i.filter(dn);for(let t=0;t<i.length;t+=1)Vt(i[t]);n=!1},d(t){F(i,t),t&&S(e)}}}function gn(t){let e,r,i,o,a,l,s,c;return{c(){e=I("span"),r=I("img"),this.h()},l(t){e=L(t,"SPAN",{style:!0});var n=R(e);r=L(n,"IMG",{class:!0,src:!0,loading:!0,decoding:!0,"aria-hidden":!0,alt:!0,style:!0}),n.forEach(S),this.h()},h(){O(r,"class",i=qt.text__image),d(r.src,o=t[55].image.url)||O(r,"src",o),O(r,"loading","lazy"),O(r,"decoding","async"),O(r,"aria-hidden","true"),O(r,"alt",""),O(r,"style",a=Gt({width:t[55].image.width,height:t[55].image.height,"margin-top":t[9]?"-".concat(t[55].image.height):void 0,"margin-bottom":t[9]?"-".concat(t[55].image.height):void 0,filter:t[55].image.svgFilterId?"url(#".concat(t[55].image.svgFilterId,")"):void 0})),O(e,"style",l=Gt(t[55].image.wrapperStyle))},m(n,i){P(n,e,i),D(e,r),s||(c=J(r,"error",t[28]),s=!0)},p(t,n){1024&n[0]&&!d(r.src,o=t[55].image.url)&&O(r,"src",o),1536&n[0]&&a!==(a=Gt({width:t[55].image.width,height:t[55].image.height,"margin-top":t[9]?"-".concat(t[55].image.height):void 0,"margin-bottom":t[9]?"-".concat(t[55].image.height):void 0,filter:t[55].image.svgFilterId?"url(#".concat(t[55].image.svgFilterId,")"):void 0}))&&O(r,"style",a),1024&n[0]&&l!==(l=Gt(t[55].image.wrapperStyle))&&O(e,"style",l)},i:n,o:n,d(t){t&&S(e),s=!1,c()}}}function mn(t){let e,n,r=t[55].text&&vn(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[55].text?r?(r.p(t,n),1024&n[0]&&At(r,1)):(r=vn(t),r.c(),At(r,1),r.m(e.parentNode,e)):r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct())},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function vn(t){let e,n;return e=new an({props:{text:t[55].text,rootFontSize:t[5],textStyles:t[55].textStyles,singleline:t[7],actions:t[55].actions}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.text=t[55].text),32&n[0]&&(r.rootFontSize=t[5]),1024&n[0]&&(r.textStyles=t[55].textStyles),128&n[0]&&(r.singleline=t[7]),1024&n[0]&&(r.actions=t[55].actions),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function yn(t){let e,n,r,i;const o=[mn,gn],a=[];function l(t,e){return"text"in t[55]?0:t[55].image?1:-1}return~(e=l(t))&&(n=a[e]=o[e](t)),{c(){n&&n.c(),r=N()},l(t){n&&n.l(t),r=N()},m(t,n){~e&&a[e].m(t,n),P(t,r,n),i=!0},p(t,i){let s=e;e=l(t),e===s?~e&&a[e].p(t,i):(n&&(Et(),Vt(a[s],1,1,(()=>{a[s]=null})),Ct()),~e?(n=a[e],n?n.p(t,i):(n=a[e]=o[e](t),n.c()),At(n,1),n.m(r.parentNode,r)):n=null)},i(t){i||(At(n),i=!0)},o(t){Vt(n),i=!1},d(t){~e&&a[e].d(t),t&&S(r)}}}function $n(t){let e,n,r,i,o,a;const l=[fn,pn],s=[];function c(t,e){return t[10].length?0:1}return n=c(t),r=s[n]=l[n](t),{c(){e=I("span"),r.c(),this.h()},l(t){e=L(t,"SPAN",{class:!0,style:!0});var n=R(e);r.l(n),n.forEach(S),this.h()},h(){O(e,"class",i=ue("text__inner",qt,t[12])),O(e,"style",o=Gt(t[11]))},m(t,r){P(t,e,r),s[n].m(e,null),a=!0},p(t,d){let u=n;n=c(t),n===u?s[n].p(t,d):(Et(),Vt(s[u],1,1,(()=>{s[u]=null})),Ct(),r=s[n],r?r.p(t,d):(r=s[n]=l[n](t),r.c()),At(r,1),r.m(e,null)),(!a||4096&d[0]&&i!==(i=ue("text__inner",qt,t[12])))&&O(e,"class",i),(!a||2048&d[0]&&o!==(o=Gt(t[11])))&&O(e,"style",o)},i(t){a||(At(r),a=!0)},o(t){Vt(r),a=!1},d(t){t&&S(e),s[n].d()}}}function _n(t){let e,n,r=!t[8]&&hn(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[8]?r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct()):r?(r.p(t,n),256&n[0]&&At(r,1)):(r=hn(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function bn(t,e,r){let i,o,a,l,s,c,d,u,h,f,g,m,v,y,$,_,b,w,x,k,E,C,A,V,j,D,P,S,F,I,z,T,M,N=n,J=n,O=n,B=n,R=n,U=n,W=n,L=n,q=n,H=n,G=n,K=n,Y=n;t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>Y()));let{json:X={}}=e,{templateContext:Z}=e,{origJson:Q}=e,{layoutParams:tt}=e;const et=at(Wt);let nt=!1,rt="",ot=12,lt=1.25,st=!1,ct="",dt="",ut=!1,ht="left",pt="top",ft="",gt="",mt=!1,vt=[],yt=[];return it((()=>{yt.forEach((t=>{let[e,n]=t;et.removeSvgFilter(e,n)}))})),t.$$set=t=>{"json"in t&&r(0,X=t.json),"templateContext"in t&&r(1,Z=t.templateContext),"origJson"in t&&r(2,Q=t.origJson),"layoutParams"in t&&r(3,tt=t.layoutParams)},t.$$.update=()=>{var e,n;if(1&t.$$.dirty[0]&&(r(26,i=et.getDerivedFromVars(X.text)),Y(),Y=p(i,(t=>r(51,M=t)))),16&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&(r(4,(e=M,n=rt,rt=String(null!=e?e:"")||n)),rt?r(8,nt=!1):(r(8,nt=!0),et.logError(Lt(new Error('Missing "text" prop for div "text"'))))),1&t.$$.dirty[0]&&(r(25,o=et.getDerivedFromVars(X.ranges)),J(),J=p(o,(t=>r(41,C=t)))),1&t.$$.dirty[0]&&(r(24,a=et.getDerivedFromVars(X.images)),N(),N=p(a,(t=>r(40,E=t)))),1&t.$$.dirty[0]&&(r(23,l=et.getDerivedFromVars({font_size:X.font_size,letter_spacing:X.letter_spacing,font_weight:X.font_weight,text_color:X.text_color,underline:X.underline,strike:X.strike,line_height:X.line_height})),O(),O=p(l,(t=>r(27,A=t)))),1&t.$$.dirty[0]&&(r(22,s=et.getDerivedFromVars(X.font_size)),K(),K=p(s,(t=>r(50,T=t)))),32&t.$$.dirty[0]|524288&t.$$.dirty[1]&&r(5,ot=Ze(T,ot)),1&t.$$.dirty[0]&&(r(21,c=et.getDerivedFromVars(X.line_height)),G(),G=p(c,(t=>r(49,z=t)))),32&t.$$.dirty[0]|262144&t.$$.dirty[1]){const t=z;Ie(t)?(r(29,lt=Number(t)/ot),r(9,st=!0)):r(9,st=!1)}if(1&t.$$.dirty[0]&&(r(20,d=et.getDerivedFromVars(X.max_lines)),L(),L=p(d,(t=>r(46,S=t)))),32768&t.$$.dirty[1]&&r(7,u=1===S),536870912&t.$$.dirty[0]|34304&t.$$.dirty[1]){let t="",e="",n=!1;if(S&&S>1){let r=Number(S);t=r*lt+"em",C||E||(e=r,n=!0)}r(30,ct=t),r(31,dt=e),r(32,ut=n)}if(1&t.$$.dirty[0]&&(r(19,h=et.getDerivedFromVars(X.text_alignment_horizontal)),H(),H=p(h,(t=>r(48,I=t)))),131076&t.$$.dirty[1]&&r(33,ht=ln(I,ht)),1&t.$$.dirty[0]&&(r(18,f=et.getDerivedFromVars(X.text_alignment_vertical)),q(),q=p(f,(t=>r(47,F=t)))),65544&t.$$.dirty[1]&&r(34,pt=sn(F,pt)),16&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(39,g=!C||rt&&1===C.length&&C[0]&&0===C[0].start&&"number"==typeof C[0].end&&C[0].end>=rt.length),1&t.$$.dirty[0]&&(r(17,m=et.getDerivedFromVars(X.text_color)),W(),W=p(m,(t=>r(45,P=t)))),17408&t.$$.dirty[1]&&r(38,v=Boolean(P)!==Boolean(C&&C[0]&&C[0].text_color)),50576&t.$$.dirty[1]){let t="";S&&g&&v&&(t=Zt(P||C&&C[0]&&C[0].text_color,1,ft)),r(35,ft=t)}if(1&t.$$.dirty[0]&&(r(16,y=et.getDerivedFromVars(X.truncate)),U(),U=p(y,(t=>r(44,D=t)))),8192&t.$$.dirty[1]&&r(37,$="none"===D?"none":""),1&t.$$.dirty[0]&&(r(15,_=et.getDerivedFromVars(X.text_gradient)),R(),R=p(_,(t=>r(43,j=t)))),4096&t.$$.dirty[1]){let t="";if(j){const e=re([j]);e.image&&(t=e.image)}r(36,gt=t)}1&t.$$.dirty[0]&&(r(14,b=et.getDerivedFromVars(X.selectable)),B(),B=p(b,(t=>r(42,V=t)))),64&t.$$.dirty[0]|2048&t.$$.dirty[1]&&r(6,mt=function(t,e){return 1===t||0===t||!1===t||!0===t?Boolean(t):e}(V,mt)),16&t.$$.dirty[0]|1536&t.$$.dirty[1]&&function(t,e,n){let i=[];if(yt.forEach((t=>{let[e,n]=t;et.removeSvgFilter(e,n)})),yt=[],!(Array.isArray(e)&&e.length||Array.isArray(n)&&n.length&&t))return void r(10,vt=[]);const o=t;let a=e||[{start:0,end:o.length}],l=n||[],s=0,c=[],d=[];a.forEach((t=>{void 0!==t.start&&void 0!==t.end&&(d.push({index:t.start,range:t,type:"rangeStart",isStart:!0}),d.push({index:t.end,range:t,type:"rangeEnd"}))})),l.forEach(((t,e)=>{void 0!==t.start&&t.url&&t.start<=o.length&&d.push({index:t.start,image:t,type:"image",arrayIndex:e})})),d.sort(((t,e)=>t.index===e.index?t.type!==e.type?"image"===t.type?-1:"image"===e.type?1:t.type<e.type?-1:1:"image"===t.type&&"image"===e.type?e.arrayIndex-t.arrayIndex:"rangeStart"===t.type&&"rangeStart"===e.type?t.range.end-e.range.end:"rangeStart"===t.type?1:"rangeStart"===e.type?-1:"image"!==t.type&&"image"!==e.type?t.range.start-e.range.start:0:t.index-e.index)),d.forEach((t=>{var e;let n="image"===t.type?null:t.range,r=t.index;if(r>s){let n=Object.assign(Object.assign({},A),...c);i.push({text:o.substring(s,r),textStyles:n,actions:"rangeEnd"===t.type&&(null===(e=t.range)||void 0===e?void 0:e.actions)||void 0})}if("rangeStart"===t.type&&n)c.push(n);else if("rangeEnd"===t.type)c=c.filter((e=>e!==t.range));else if("image"===t.type){let e=Object.assign(Object.assign({},A),...c),n=Kt(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),r=Kt(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const o={"font-size":Kt(10*(Number(e.font_size)||12)/ot)};let a="";const l=t.image.tint_color,s=cn(t.image.tint_mode,"source_in");if(l){const e=Zt(t.image.tint_color);a=et.addSvgFilter(e,s),yt.push([e,s])}i.push({image:{url:t.image.url,width:n,height:r,wrapperStyle:o,svgFilterId:a}})}s=r})),s<o.length&&i.push({text:o.substring(s),textStyles:Object.assign({},A)}),r(10,vt=i)}(rt,C,E),128&t.$$.dirty[0]|78&t.$$.dirty[1]&&r(13,w={singleline:u,multiline:ut,halign:ht,valign:pt,truncate:$}),32&t.$$.dirty[1]&&r(12,x={gradient:Boolean(gt)}),1610612768&t.$$.dirty[0]|49&t.$$.dirty[1]&&r(11,k={"font-size":Kt(ot),"line-height":lt,"max-height":ct,"-webkit-line-clamp":dt,color:ft,"background-image":gt})},[X,Z,Q,tt,rt,ot,mt,u,nt,st,vt,k,x,w,b,_,y,m,f,h,d,c,s,l,a,o,i,A,function(t){t.target&&"classList"in t.target&&t.target.classList.add(qt.text__image_hidden)},lt,ct,dt,ut,ht,pt,ft,gt,$,v,g,E,C,V,j,D,P,S,F,I,z,T,M]}const wn={container:"divkit-d37d6",container_wrap:"divkit-c8551",container_orientation_vertical:"divkit-ddc33",container_valign_top:"divkit-a331a",container_valign_center:"divkit-aae61",container_valign_bottom:"divkit-c2226",container_orientation_horizontal:"divkit-fe458",container_halign_left:"divkit-a3091",container_halign_center:"divkit-bac9d",container_halign_right:"divkit-f4230",container_orientation_overlap:"divkit-a644d"};function xn(t,e,n){if(!(t&&t.shape&&t.shape.type&&e.includes(t.shape.type)&&"shape_drawable"===t.type))return n;let r;if("rounded_rectangle"===t.shape.type)i=t.shape,r={width:Number((null===(o=i.item_width)||void 0===o?void 0:o.value)||10),height:Number((null===(a=i.item_height)||void 0===a?void 0:a.value)||10),radius:Number(null!==(l=null===(s=i.corner_radius)||void 0===s?void 0:s.value)&&void 0!==l?l:5)};else{if("circle"!==t.shape.type)return n;r=function(t){var e;const n=2*Number((null===(e=t.radius)||void 0===e?void 0:e.value)||10);return{width:n,height:n,radius:n}}(t.shape)}var i,o,a,l,s;return function(t,e,n){var r;const i={},o=e.stroke||(null==n?void 0:n.stroke),a=null!=o&&o.color?Zt(o.color):"",l=null!=o&&o.width?Number(null!==(r=o.width)&&void 0!==r?r:1):"";i.width=t.width,i.height=t.height,i.borderRadius=t.radius;const s=e.background_color||(null==n?void 0:n.color);return i.background=Zt(s),a&&l&&(i.boxShadow="inset 0 0 0 ".concat(Kt(l)," ").concat(a)),i}(r,t.shape,{color:t.color,stroke:t.stroke})}function kn(t,e,n){null!=e&&e.show_at_start&&(n?t.top=e.style.height:t.left=e.style.width),null!=e&&e.show_at_end&&(n?t.bottom=e.style.height:t.right=e.style.width)}function En(t,e,n){let r;return r="horizontal"===t?[null!=n&&n.show_between?n.style.height:0,null!=e&&e.show_between?e.style.width:0]:[null!=e&&e.show_between?e.style.height:0,null!=n&&n.show_between?n.style.width:0],r.map(Kt).join(" ")}let Cn;function An(){if(void 0!==Cn)return Cn;const t=document.createElement("div");return t.style.position="absolute",t.style.display="flex",t.style.flexDirection="column",t.style.gap="1px",t.appendChild(document.createElement("div")),t.appendChild(document.createElement("div")),document.body.appendChild(t),Cn=1===t.scrollHeight,document.body.removeChild(t),Cn}function Vn(t,e,n){const r=t.slice();return r[13]=e[n],r}function jn(t){let e,n,r,i,o,a="".concat(t[13].style.width,"px"),l="".concat(t[13].style.height,"px"),s="".concat(t[13].style.borderRadius,"px"),c="".concat(t[13].left,"px"),d="".concat(t[13].top,"px"),u="".concat(t[13].width,"px"),h="".concat(t[13].height,"px");return{c(){e=I("div"),n=I("div"),i=M(),this.h()},l(t){e=L(t,"DIV",{class:!0});var r=R(e);n=L(r,"DIV",{class:!0}),R(n).forEach(S),i=G(r),r.forEach(S),this.h()},h(){O(n,"class",r="divkit-f6e9a"),Y(n,"width",a,!1),Y(n,"height",l,!1),Y(n,"border-radius",s,!1),Y(n,"background",t[13].style.background,!1),Y(n,"box-shadow",t[13].style.boxShadow,!1),O(e,"class",o="divkit-c770e"),Y(e,"left",c,!1),Y(e,"top",d,!1),Y(e,"width",u,!1),Y(e,"height",h,!1)},m(t,r){P(t,e,r),D(e,n),D(e,i)},p(t,r){2&r&&a!==(a="".concat(t[13].style.width,"px"))&&Y(n,"width",a,!1),2&r&&l!==(l="".concat(t[13].style.height,"px"))&&Y(n,"height",l,!1),2&r&&s!==(s="".concat(t[13].style.borderRadius,"px"))&&Y(n,"border-radius",s,!1),2&r&&Y(n,"background",t[13].style.background,!1),2&r&&Y(n,"box-shadow",t[13].style.boxShadow,!1),2&r&&c!==(c="".concat(t[13].left,"px"))&&Y(e,"left",c,!1),2&r&&d!==(d="".concat(t[13].top,"px"))&&Y(e,"top",d,!1),2&r&&u!==(u="".concat(t[13].width,"px"))&&Y(e,"width",u,!1),2&r&&h!==(h="".concat(t[13].height,"px"))&&Y(e,"height",h,!1)},d(t){t&&S(e)}}}function Dn(t){let e,r,i,o,a=t[1],l=[];for(let e=0;e<a.length;e+=1)l[e]=jn(Vn(t,a,e));return{c(){e=I("div");for(let t=0;t<l.length;t+=1)l[t].c();this.h()},l(t){e=L(t,"DIV",{class:!0});var n=R(e);for(let t=0;t<l.length;t+=1)l[t].l(n);n.forEach(S),this.h()},h(){O(e,"class",r="divkit-a7719")},m(n,r){P(n,e,r);for(let t=0;t<l.length;t+=1)l[t].m(e,null);t[10](e),i||(o=J(window,"resize",t[2]),i=!0)},p(t,n){let[r]=n;if(2&r){let n;for(a=t[1],n=0;n<a.length;n+=1){const i=Vn(t,a,n);l[n]?l[n].p(i,r):(l[n]=jn(i),l[n].c(),l[n].m(e,null))}for(;n<l.length;n+=1)l[n].d(1);l.length=a.length}},i:n,o:n,d(n){n&&S(e),F(l,n),t[10](null),i=!1,o()}}}function Pn(t,e,n,r,i,o){o?t.push({top:n.bottom,left:i.left,width:i.right-i.left,height:r.top-n.bottom,style:e}):t.push({top:i.top,left:n.right,width:r.left-n.right,height:i.bottom-i.top,style:e})}function Sn(t,e,n,r){const i={top:Math.min(...n.map((t=>t.top))),right:Math.max(...n.map((t=>t.right))),bottom:Math.max(...n.map((t=>t.bottom))),left:Math.min(...n.map((t=>t.left)))};if((null==e?void 0:e.show_at_start)&&Pn(t,e.style,{top:0,right:n[0].left-e.style.width,bottom:n[0].top-e.style.height,left:0},n[0],i,r),null==e?void 0:e.show_between)for(let o=0;o<n.length-1;++o)Pn(t,e.style,n[o],n[o+1],i,r);if(null==e?void 0:e.show_at_end){const o=n[n.length-1];Pn(t,e.style,o,{top:o.bottom+e.style.height,right:0,bottom:0,left:o.right+e.style.width},i,r)}}function Fn(t,e,n){let r,{orientation:i}=e,{separator:o}=e,{lineSeparator:a}=e;const l=function(t,e){let n,r=0,i=!1;return function(){const e=Date.now();return!r||Math.abs(e-r)>10?(r=e,n=t.apply(this,arguments)):(i||(i=!0,setTimeout((()=>{i=!1,n=t.apply(this,arguments)}),10)),n)}}((function(){if(!r)return;const t=r.getBoundingClientRect();n(1,c=[]);let e=[...r.children].filter((t=>t!==s&&!t.classList.contains(Ht.outer__border))),l=[];for(;e.length;){const t=[],n=e.shift();t.push(n);let r=n.getBoundingClientRect(),o=r.right,a=r.bottom;for(;e.length;){let n=e[0],r=n.getBoundingClientRect();if("vertical"===i){if(r.top<a)break}else if(r.left<o)break;o=Math.max(o,r.right),a=Math.max(a,r.bottom),t.push(n),e.shift()}l.push(t)}const d=[];l.forEach((t=>{const e=t.map((t=>function(t){const e=t.getBoundingClientRect(),n=getComputedStyle(t);return{top:e.top-parseFloat(n.marginTop),right:e.right+parseFloat(n.marginRight),bottom:e.bottom+parseFloat(n.marginBottom),left:e.left-parseFloat(n.marginLeft)}}(t)));o&&Sn(c,o,e,"vertical"===i);const n={top:Math.min(...e.map((t=>t.top))),right:Math.max(...e.map((t=>t.right))),bottom:Math.max(...e.map((t=>t.bottom))),left:Math.min(...e.map((t=>t.left)))};d.push(n)})),a&&Sn(c,a,d,"horizontal"===i),c.forEach((e=>{e.top-=t.top,e.left-=t.left}))}));let s,c=[],d=!1,u=null,h=null;function p(t){t.some((t=>{var e;const n=null===(e=t.target)||void 0===e?void 0:e.classList;return!(null==n?void 0:n.contains("divkit-f6e9a"))&&!(null==n?void 0:n.contains("divkit-a7719"))}))&&l()}return rt((()=>{n(6,d=!0)})),it((()=>{n(6,d=!1)})),t.$$set=t=>{"orientation"in t&&n(3,i=t.orientation),"separator"in t&&n(4,o=t.separator),"lineSeparator"in t&&n(5,a=t.lineSeparator)},t.$$.update=()=>{1&t.$$.dirty&&n(9,r=(null==s?void 0:s.parentElement)||null),960&t.$$.dirty&&(d&&r||u||h)&&(u&&(u.disconnect(),n(7,u=null)),h&&(h.disconnect(),n(8,h=null)),d&&r&&("undefined"!=typeof MutationObserver&&(n(7,u=new MutationObserver(p)),u.observe(r,{childList:!0,attributes:!0,characterData:!0,subtree:!0})),"undefined"!=typeof ResizeObserver&&(n(8,h=new ResizeObserver(l)),h.observe(r)))),576&t.$$.dirty&&d&&r&&l()},[s,c,l,i,o,a,d,u,h,r,function(t){ct[t?"unshift":"push"]((()=>{s=t,n(0,s)}))}]}const In=class extends Ot{constructor(t){super(),Jt(this,t,Fn,Dn,u,{orientation:3,separator:4,lineSeparator:5})}},{Boolean:zn}=Pt;function Tn(t,e,n){const r=t.slice();return r[46]=e[n],r}function Mn(t){let e,n;return e=new Ye({props:{cls:ue("container",wn,t[10]),style:t[9],json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],additionalPaddings:t[14],$$slots:{default:[On]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=ue("container",wn,t[10])),512&n[0]&&(r.style=t[9]),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),16384&n[0]&&(r.additionalPaddings=t[14]),2097632&n[0]|262144&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function Nn(t){let e,n;return e=new go({props:{layoutParams:t[8],div:t[46].json,templateContext:t[46].templateContext,origJson:t[46].origJson}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.layoutParams=t[8]),2097152&n[0]&&(r.div=t[46].json),2097152&n[0]&&(r.templateContext=t[46].templateContext),2097152&n[0]&&(r.origJson=t[46].origJson),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function Jn(t){let e,n;return e=new In({props:{separator:t[6],lineSeparator:t[7],orientation:t[5]}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};64&n[0]&&(r.separator=t[6]),128&n[0]&&(r.lineSeparator=t[7]),32&n[0]&&(r.orientation=t[5]),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function On(t){let e,n,r,i=t[21],o=[];for(let e=0;e<i.length;e+=1)o[e]=Nn(Tn(t,i,e));const a=t=>Vt(o[t],1,1,(()=>{o[t]=null}));let l=(t[6]||t[7])&&Jn(t);return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=M(),l&&l.c(),n=N()},l(t){for(let e=0;e<o.length;e+=1)o[e].l(t);e=G(t),l&&l.l(t),n=N()},m(t,i){for(let e=0;e<o.length;e+=1)o[e].m(t,i);P(t,e,i),l&&l.m(t,i),P(t,n,i),r=!0},p(t,r){if(2097408&r[0]){let n;for(i=t[21],n=0;n<i.length;n+=1){const a=Tn(t,i,n);o[n]?(o[n].p(a,r),At(o[n],1)):(o[n]=Nn(a),o[n].c(),At(o[n],1),o[n].m(e.parentNode,e))}for(Et(),n=i.length;n<o.length;n+=1)a(n);Ct()}t[6]||t[7]?l?(l.p(t,r),192&r[0]&&At(l,1)):(l=Jn(t),l.c(),At(l,1),l.m(n.parentNode,n)):l&&(Et(),Vt(l,1,1,(()=>{l=null})),Ct())},i(t){if(!r){for(let t=0;t<i.length;t+=1)At(o[t]);At(l),r=!0}},o(t){o=o.filter(zn);for(let t=0;t<o.length;t+=1)Vt(o[t]);Vt(l),r=!1},d(t){F(o,t),t&&S(e),l&&l.d(t),t&&S(n)}}}function Bn(t){let e,n,r=!t[4]&&Mn(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[4]?r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct()):r?(r.p(t,n),16&n[0]&&At(r,1)):(r=Mn(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Rn(t,e,r){let i,o,a,l,s,c,d,u,h,f,g,m,v,y,$,_,b,w,x,k,E,C,A,V,j=n,D=n,P=n,S=n,F=n,I=n,z=n,T=n,M=n;var N,J,O,B,R,U;t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>M()));let{json:W={}}=e,{templateContext:L}=e,{origJson:q}=e,{layoutParams:H}=e;const G={left:"start",center:"center",right:"end"},K={top:"start",center:"center",bottom:"end",baseline:"baseline"},Y=["rounded_rectangle","circle"],X=at(Wt);let Z,Q=!1,tt="vertical",et="top",nt="left",rt=null,it=null,ot={};return t.$$set=t=>{"json"in t&&r(0,W=t.json),"templateContext"in t&&r(1,L=t.templateContext),"origJson"in t&&r(2,q=t.origJson),"layoutParams"in t&&r(3,H=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(32,i=W.items),2&t.$$.dirty[1]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(4,Q=!1):(r(4,Q=!0),X.logError(Lt(new Error('Incorrect or empty "items" prop for div "container"'))))),18&t.$$.dirty[0]|2&t.$$.dirty[1]&&r(21,o=(!Q&&i||[]).map((t=>{let e=t,n=L;return({templateContext:n,json:e}=X.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(20,a=X.getDerivedFromVars(W.orientation)),M(),M=p(a,(t=>r(41,V=t)))),32&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(5,tt=function(t,e){return"vertical"===t||"horizontal"===t||"overlap"===t?t:e}(V,tt)),1&t.$$.dirty[0]&&(r(19,l=X.getDerivedFromVars(W.content_alignment_vertical)),T(),T=p(l,(t=>r(40,A=t)))),268435456&t.$$.dirty[0]|512&t.$$.dirty[1]&&r(28,et=sn(A,et)),1&t.$$.dirty[0]&&(r(18,s=X.getDerivedFromVars(W.content_alignment_horizontal)),z(),z=p(s,(t=>r(39,C=t)))),536870912&t.$$.dirty[0]|256&t.$$.dirty[1]&&r(29,nt=ln(C,nt)),1&t.$$.dirty[0]&&(r(17,c=X.getDerivedFromVars(W.layout_mode)),I(),I=p(c,(t=>r(38,E=t)))),128&t.$$.dirty[1]&&r(31,d="wrap"===E),1&t.$$.dirty[0]&&(r(16,u=X.getDerivedFromVars(W.separator)),F(),F=p(u,(t=>r(37,k=t)))),29360224&t.$$.dirty[0]|64&t.$$.dirty[1])if((null==k?void 0:k.style)&&"overlap"!==tt&&An()){const t=xn(k.style,Y,(null==rt?void 0:rt.style)||null);r(6,rt=t?{show_at_start:Boolean(null!==r(22,N=k.show_at_start)&&void 0!==N&&N),show_at_end:Boolean(null!==r(23,J=k.show_at_end)&&void 0!==J&&J),show_between:Boolean(null===r(24,O=k.show_between)||void 0===O||O),style:t}:null)}else r(6,rt=null);if(1&t.$$.dirty[0]&&(r(15,h=X.getDerivedFromVars(W.line_separator)),S(),S=p(h,(t=>r(36,x=t)))),234881184&t.$$.dirty[0]|32&t.$$.dirty[1])if((null==x?void 0:x.style)&&"overlap"!==tt&&An()){const t=xn(x.style,Y,(null==it?void 0:it.style)||null);r(7,it=t?{show_at_start:Boolean(null!==r(25,B=x.show_at_start)&&void 0!==B&&B),show_at_end:Boolean(null!==r(26,R=x.show_at_end)&&void 0!==R&&R),show_between:Boolean(null===r(27,U=x.show_between)||void 0===U||U),style:t}:null)}else r(7,it=null);if(224&t.$$.dirty[0]&&r(14,f=rt||it?function(t,e,n){const r={};return kn(r,e,"vertical"===t),kn(r,n,"horizontal"===t),r}(tt,rt,it):null),1&t.$$.dirty[0]&&(r(13,g=X.getDerivedFromVars(W.aspect)),P(),P=p(g,(t=>r(35,w=t)))),16&t.$$.dirty[1]){const t=null==w?void 0:w.ratio;t&&Ie(t)?r(30,Z=t):r(30,Z=void 0)}if(1&t.$$.dirty[0]&&(r(12,m=X.getDerivedFromVars(W.width)),j(),j=p(m,(t=>r(33,_=t)))),1&t.$$.dirty[0]&&(r(11,v=X.getDerivedFromVars(W.height)),D(),D=p(v,(t=>r(34,b=t)))),805306664&t.$$.dirty[0]|13&t.$$.dirty[1]){let t={};(null==H?void 0:H.fakeElement)&&(t.fakeElement=!0),"overlap"===tt&&(t.overlapParent=!0),"horizontal"!==tt&&(t.parentHAlign=G[nt],(!b||"wrap_content"===b.type||"match_parent"===b.type&&(null==H?void 0:H.parentVerticalWrapContent))&&(t.parentVerticalWrapContent=!0)),"vertical"!==tt&&(t.parentVAlign=K[et],("wrap_content"===(null==_?void 0:_.type)||"match_parent"===(null==_?void 0:_.type)&&(null==H?void 0:H.parentHorizontalWrapContent))&&(t.parentHorizontalWrapContent=!0)),"horizontal"===tt&&(t.parentContainerOrientation="horizontal"),"vertical"===tt&&(t.parentContainerOrientation="vertical"),d&&(t.parentContainerWrap=!0),r(8,ot=_e(t,ot))}805306400&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(10,y={orientation:tt,valign:et,halign:nt,wrap:d}),1073742048&t.$$.dirty[0]&&r(9,$={gap:rt||it?En(tt,rt,it):void 0,"aspect-ratio":Z})},[W,L,q,H,Q,tt,rt,it,ot,$,y,v,m,g,f,h,u,c,s,l,a,o,N,J,O,B,R,U,et,nt,Z,d,i,_,b,w,x,k,E,C,A,V]}const Un={separator:"divkit-a30bb",separator_orientation_horizontal:"divkit-f529e",separator_orientation_vertical:"divkit-e9e27",separator__inner:"divkit-db7d8"};function Wn(t,e){return"vertical"===t||"horizontal"===t?t:e}function Ln(t){let e,n,r;return{c(){e=I("span"),this.h()},l(t){e=L(t,"SPAN",{class:!0,style:!0}),R(e).forEach(S),this.h()},h(){O(e,"class",n=Un.separator__inner),O(e,"style",r=Gt(t[5]))},m(t,n){P(t,e,n)},p(t,n){32&n&&r!==(r=Gt(t[5]))&&O(e,"style",r)},d(t){t&&S(e)}}}function qn(t){let e,n=t[6]&&Ln(t);return{c(){n&&n.c(),e=N()},l(t){n&&n.l(t),e=N()},m(t,r){n&&n.m(t,r),P(t,e,r)},p(t,r){t[6]?n?n.p(t,r):(n=Ln(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&S(e)}}}function Hn(t){let e,n;return e=new Ye({props:{cls:ue("separator",Un,t[4]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[qn]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){let[r]=n;const i={};16&r&&(i.cls=ue("separator",Un,t[4])),1&r&&(i.json=t[0]),4&r&&(i.origJson=t[2]),2&r&&(i.templateContext=t[1]),8&r&&(i.layoutParams=t[3]),16480&r&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function Gn(t,e,r){let i,o,a,l,s,c,d,u=n;t.$$.on_destroy.push((()=>u()));let{json:h={}}=e,{templateContext:f}=e,{origJson:g}=e,{layoutParams:m}=e;const v=at(Wt);let y="horizontal",$="rgba(0,0,0,0.08)";return t.$$set=t=>{"json"in t&&r(0,h=t.json),"templateContext"in t&&r(1,f=t.templateContext),"origJson"in t&&r(2,g=t.origJson),"layoutParams"in t&&r(3,m=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&(r(7,i=v.getDerivedFromVars(h.delimiter_style)),u(),u=p(i,(t=>r(12,d=t)))),4352&t.$$.dirty&&r(8,y=Wn(null==d?void 0:d.orientation,y)),4096&t.$$.dirty&&r(6,o=!((null==d?void 0:d.color)&&("transparent"===d.color||9===d.color.length&&0===d.color.indexOf("#00")))),4608&t.$$.dirty&&r(9,$=Zt(null==d?void 0:d.color,1,$)),256&t.$$.dirty&&r(11,a="horizontal"===y?"100%":Kt(1)),256&t.$$.dirty&&r(10,l="horizontal"===y?Kt(1):"100%"),3584&t.$$.dirty&&r(5,s={background:$,width:a,height:l}),256&t.$$.dirty&&r(4,c={orientation:y})},[h,f,g,m,c,s,o,i,y,$,l,a,d]}const Kn={image:"divkit-a448f","image_is-width-content":"divkit-fe14a","image_is-height-content":"divkit-f4d92",image__image:"divkit-ce046",image_error:"divkit-f10d9","image__aspect-wrapper":"divkit-dc808",image_aspect:"divkit-ae784",image_loaded:"divkit-cf4e0","divkit-image-appearance":"divkit-e555f","image_before-appearance":"divkit-ffe8a"};function Yn(t){let e,n;return e=new Ye({props:{cls:ue("image",Kn,t[10]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customDescription:!0,$$slots:{default:[tr]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=ue("image",Kn,t[10])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),67312&n[0]|536870912&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function Xn(t){let e,n,r,i,o,a,s;return{c(){e=I("img"),this.h()},l(t){e=L(t,"IMG",{class:!0,src:!0,loading:!0,decoding:!0,style:!0,alt:!0,"aria-hidden":!0}),this.h()},h(){O(e,"class",n=Kn.image__image),d(e.src,r=t[4]===rr?nr:t[7])||O(e,"src",r),O(e,"loading","lazy"),O(e,"decoding","async"),O(e,"style",i=Gt(t[9])),O(e,"alt",t[16]),O(e,"aria-hidden",o=t[16]?null:"true")},m(n,r){P(n,e,r),a||(s=[J(e,"load",t[26]),J(e,"error",t[27])],a=!0)},p(t,n){144&n[0]&&!d(e.src,r=t[4]===rr?nr:t[7])&&O(e,"src",r),512&n[0]&&i!==(i=Gt(t[9]))&&O(e,"style",i),65536&n[0]&&O(e,"alt",t[16]),65536&n[0]&&o!==(o=t[16]?null:"true")&&O(e,"aria-hidden",o)},d(t){t&&S(e),a=!1,l(s)}}}function Zn(t){let e,n,r,i,o,a,s,c,u,h="".concat(t[5],"%");return{c(){e=I("span"),n=I("img"),this.h()},l(t){e=L(t,"SPAN",{class:!0});var r=R(e);n=L(r,"IMG",{class:!0,src:!0,loading:!0,decoding:!0,style:!0,alt:!0,"aria-hidden":!0}),r.forEach(S),this.h()},h(){O(n,"class",r=Kn.image__image),d(n.src,i=t[4]===rr?nr:t[7])||O(n,"src",i),O(n,"loading","lazy"),O(n,"decoding","async"),O(n,"style",o=Gt(t[9])),O(n,"alt",t[16]),O(n,"aria-hidden",a=t[16]?null:"true"),O(e,"class",s=Kn["image__aspect-wrapper"]),Y(e,"padding-bottom",h,!1)},m(r,i){P(r,e,i),D(e,n),c||(u=[J(n,"load",t[26]),J(n,"error",t[27])],c=!0)},p(t,r){144&r[0]&&!d(n.src,i=t[4]===rr?nr:t[7])&&O(n,"src",i),512&r[0]&&o!==(o=Gt(t[9]))&&O(n,"style",o),65536&r[0]&&O(n,"alt",t[16]),65536&r[0]&&a!==(a=t[16]?null:"true")&&O(n,"aria-hidden",a),32&r[0]&&h!==(h="".concat(t[5],"%"))&&Y(e,"padding-bottom",h,!1)},d(t){t&&S(e),c=!1,l(u)}}}function Qn(t){let e;function n(t,e){return t[10].aspect?Zn:Xn}let r=n(t),i=r(t);return{c(){i.c(),e=N()},l(t){i.l(t),e=N()},m(t,n){i.m(t,n),P(t,e,n)},p(t,o){r===(r=n(t))&&i?i.p(t,o):(i.d(1),i=r(t),i&&(i.c(),i.m(e.parentNode,e)))},d(t){i.d(t),t&&S(e)}}}function tr(t){let e,n=t[6],r=Qn(t);return{c(){r.c(),e=N()},l(t){r.l(t),e=N()},m(t,n){r.m(t,n),P(t,e,n)},p(t,i){64&i[0]&&u(n,n=t[6])?(r.d(1),r=Qn(t),r.c(),r.m(e.parentNode,e)):r.p(t,i)},d(t){t&&S(e),r.d(t)}}}function er(t){let e,n,r=!t[8]&&Yn(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[8]?r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct()):r?(r.p(t,n),256&n[0]&&At(r,1)):(r=Yn(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}const nr="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",rr=2;function ir(t,e,r){let i,o,a,l,s,c,d,u,h,f,g,m,v,y,$,_,b,w,x,k,E,C,A,V,j,D,P,S,F,I,z,T,M,N,J=n,O=n,B=n,R=n,U=n,W=n,L=n,q=n,H=n,G=n,K=n,Y=n,X=n,Z=n;t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Z()));let{json:Q={}}=e,{templateContext:tt}=e,{origJson:et}=e,{layoutParams:nt}=e;const rt=at(Wt);let ot=0,lt="rgba(0,0,0,0.08)",st=!1,ct="",dt="none",ut="50% 50%";let ht,pt="0",ft="source_in",gt="",mt="",vt=0,yt=0,$t=0,_t="",bt="";return it((()=>{rt.removeSvgFilter(ht,ft)})),t.$$set=t=>{"json"in t&&r(0,Q=t.json),"templateContext"in t&&r(1,tt=t.templateContext),"origJson"in t&&r(2,et=t.origJson),"layoutParams"in t&&r(3,nt=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(25,i=rt.getDerivedFromVars(Q.image_url)),Z(),Z=p(i,(t=>r(55,N=t)))),1&t.$$.dirty[0]&&(r(24,o=rt.getDerivedFromVars(Q.gif_url)),X(),X=p(o,(t=>r(54,M=t)))),25165824&t.$$.dirty[1]&&r(7,a=N||M),128&t.$$.dirty[0]&&r(4,ot=0),128&t.$$.dirty[0]&&(a?r(8,st=!1):(r(8,st=!0),rt.logError(Lt(new Error('Missing "image_url" for "image"'))))),1&t.$$.dirty[0]&&(r(23,l=rt.getDerivedFromVars(Q.width)),Y(),Y=p(l,(t=>r(53,T=t)))),4194304&t.$$.dirty[1]&&r(41,s="wrap_content"===(null==T?void 0:T.type)),1&t.$$.dirty[0]&&(r(22,c=rt.getDerivedFromVars(Q.height)),K(),K=p(c,(t=>r(52,z=t)))),2097152&t.$$.dirty[1]&&r(40,d="wrap_content"===(null==z?void 0:z.type)),1&t.$$.dirty[0]&&(r(21,u=rt.getDerivedFromVars(Q.preview)),G(),G=p(u,(t=>r(51,I=t)))),16&t.$$.dirty[0]|1048576&t.$$.dirty[1]){const t=I;0!==ot&&ot!==rr||!t?r(29,ct=""):t.startsWith("data:")?r(29,ct='url("'.concat(ee(t),'")')):r(29,ct='url("data:image/jpg;base64,'.concat(ee(t),'")'))}if(1&t.$$.dirty[0]&&(r(20,h=rt.getDerivedFromVars(Q.placeholder_color)),H(),H=p(h,(t=>r(50,F=t)))),16&t.$$.dirty[0]|524288&t.$$.dirty[1]&&function(t,e){r(28,lt=0===t||t===rr?Zt(e,1,lt):"")}(ot,F),1&t.$$.dirty[0]&&(r(19,f=rt.getDerivedFromVars(Q.scale)),q(),q=p(f,(t=>r(49,S=t)))),1073741824&t.$$.dirty[0]|262144&t.$$.dirty[1]&&r(30,dt=ae(S)||dt),1&t.$$.dirty[0]&&(r(18,g=rt.getDerivedFromVars({content_alignment_horizontal:Q.content_alignment_horizontal,content_alignment_vertical:Q.content_alignment_vertical})),L(),L=p(g,(t=>r(48,P=t)))),131072&t.$$.dirty[1]&&r(31,ut=function(t,e){const n=t.content_alignment_horizontal,r=t.content_alignment_vertical;return n&&"left"!==n&&"center"!==n&&"right"!==n||r&&"top"!==r&&"center"!==r&&"bottom"!==r?e:le(t)}(P,ut)),1&t.$$.dirty[0]&&(r(17,m=rt.getDerivedFromVars(Q.accessibility)),W(),W=p(m,(t=>r(47,D=t)))),65536&t.$$.dirty[1]&&r(16,v=(null==D?void 0:D.description)||""),1&t.$$.dirty[0]&&(r(15,y=rt.getDerivedFromVars(Q.aspect)),U(),U=p(y,(t=>r(46,j=t)))),32768&t.$$.dirty[1]){const t=null==j?void 0:j.ratio;t&&Ie(t)?r(5,pt=(100/Number(t)).toFixed(2)):r(5,pt="0")}if(1&t.$$.dirty[0]&&(r(14,$=rt.getDerivedFromVars(Q.tint_color)),R(),R=p($,(t=>r(45,V=t)))),1&t.$$.dirty[0]&&(r(13,_=rt.getDerivedFromVars(Q.tint_mode)),B(),B=p(_,(t=>r(44,A=t)))),24582&t.$$.dirty[1]){const t=V,e=t?Zt(t):void 0,n=cn(A,ft);e===ht&&n===ft||(rt.removeSvgFilter(ht,ft),r(6,gt=e?rt.addSvgFilter(e,n):""),r(32,ht=e),r(33,ft=n))}if(1&t.$$.dirty[0]&&(r(12,b=rt.getDerivedFromVars(Q.appearance_animation)),O(),O=p(b,(t=>r(43,C=t)))),4096&t.$$.dirty[1]&&C&&"fade"===C.type){const t=C;r(34,mt=be(t.interpolator,"ease_in_out").replace(/_/g,"-")),r(37,$t=ve(t.duration,300)),r(36,yt=ve(t.start_delay,0)),r(35,vt=ve(t.alpha,0))}if(1&t.$$.dirty[0]&&(r(11,w=rt.getDerivedFromVars(Q.filters)),J(),J=p(w,(t=>r(42,E=t)))),2048&t.$$.dirty[1]){let t="",e="";Array.isArray(E)&&E.length&&(t=ze(E,rt.logError)),t&&(e="polygon(0% 0%, 0% 100%, 100% 100%, 100% 0%)"),r(38,_t=t),r(39,bt=e)}48&t.$$.dirty[0]|1544&t.$$.dirty[1]&&r(10,x={aspect:"0"!==pt,"is-width-content":s,"is-height-content":d,loaded:1===ot,"before-appearance":Boolean(mt)&&0===ot}),1879048272&t.$$.dirty[0]|505&t.$$.dirty[1]&&r(9,k={"background-image":ct,"background-color":ct?void 0:lt,"background-size":dt,"clip-path":bt||void 0,"object-fit":dt,"object-position":ut,filter:[1===ot&>?"url(#".concat(gt,")"):"",_t].filter(Boolean).join(" "),"--divkit-appearance-interpolator":mt||void 0,"--divkit-appearance-fade-start":mt?vt:void 0,"--divkit-appearance-delay":mt?"".concat(yt,"ms"):void 0,"--divkit-appearance-duration":mt?"".concat($t,"ms"):void 0})},[Q,tt,et,nt,ot,pt,gt,a,st,k,x,w,b,_,$,y,v,m,g,f,h,u,c,l,o,i,function(){0===ot&&r(4,ot=1)},function(){0===ot&&r(4,ot=rr)},lt,ct,dt,ut,ht,ft,mt,vt,yt,$t,_t,bt,d,s,E,C,A,V,j,D,P,S,F,I,z,T,M,N]}const or=class extends Ot{constructor(t){super(),Jt(this,t,ir,er,u,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},ar={grid:"divkit-d9080",grid_halign_left:"divkit-f63b3",grid_halign_center:"divkit-a14a6",grid_halign_right:"divkit-b0717",grid_valign_top:"divkit-fbca8",grid_valign_center:"divkit-d4310",grid_valign_bottom:"divkit-e4205"};function lr(t){return t>0&&t<1}function sr(t){return String(Math.ceil(1e3*t)/1e3)}function cr(t,e,n){if(t.some(lr)){const e=Math.max(...t.filter(lr).map((t=>1/t)));t=t.map((t=>t*e))}let r=0,i=0;const o=[];if(t.every(Boolean)){i=t.reduce(((t,e)=>t+e),0);for(let o=0;o<n;++o){if(!e[o])continue;const n=e[o]/t[o]*i;n>r&&(r=n)}}for(let e=0;e<n;++e)r?o[e]="minmax(".concat(Kt(r*t[e]/i),",").concat(sr(t[e]),"fr)"):t[e]?o[e]="".concat(sr(t[e]),"fr"):o[e]="auto";return o.join(" ")}function dr(t,e,n){const r=t.slice();return r[29]=e[n],r}function ur(t){let e,n;return e=new Ye({props:{cls:ue("grid",ar,t[8]),json:t[0],origJson:t[2],templateContext:t[1],style:t[7],layoutParams:t[3],$$slots:{default:[pr]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=ue("grid",ar,t[8])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),128&n[0]&&(r.style=t[7]),8&n[0]&&(r.layoutParams=t[3]),32&n[0]|2&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function hr(t){let e,n;return e=new go({props:{layoutParams:t[29].layoutParams,div:t[29].json,templateContext:t[29].templateContext,origJson:t[29].origJson}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};32&n[0]&&(r.layoutParams=t[29].layoutParams),32&n[0]&&(r.div=t[29].json),32&n[0]&&(r.templateContext=t[29].templateContext),32&n[0]&&(r.origJson=t[29].origJson),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function pr(t){let e,n,r=t[5],i=[];for(let e=0;e<r.length;e+=1)i[e]=hr(dr(t,r,e));const o=t=>Vt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=N()},l(t){for(let e=0;e<i.length;e+=1)i[e].l(t);e=N()},m(t,r){for(let e=0;e<i.length;e+=1)i[e].m(t,r);P(t,e,r),n=!0},p(t,n){if(32&n[0]){let a;for(r=t[5],a=0;a<r.length;a+=1){const o=dr(t,r,a);i[a]?(i[a].p(o,n),At(i[a],1)):(i[a]=hr(o),i[a].c(),At(i[a],1),i[a].m(e.parentNode,e))}for(Et(),a=r.length;a<i.length;a+=1)o(a);Ct()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)At(i[t]);n=!0}},o(t){i=i.filter(Boolean);for(let t=0;t<i.length;t+=1)Vt(i[t]);n=!1},d(t){F(i,t),t&&S(e)}}}function fr(t){let e,n,r=!t[6]&&ur(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[6]?r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct()):r?(r.p(t,n),64&n[0]&&At(r,1)):(r=ur(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function gr(t,e,r){let i,o,a,l,s,c,d,u,h,f,g,m,v=n,y=n,$=n,_=n;t.$$.on_destroy.push((()=>v())),t.$$.on_destroy.push((()=>y())),t.$$.on_destroy.push((()=>$())),t.$$.on_destroy.push((()=>_()));let{json:b={}}=e,{templateContext:w}=e,{origJson:x}=e,{layoutParams:k}=e;const E=at(Wt);let C,A,V=!1,j=1,D=[],P=[],S=[],F=[],I=0,z=!1,T="top",M="left";return t.$$set=t=>{"json"in t&&r(0,b=t.json),"templateContext"in t&&r(1,w=t.templateContext),"origJson"in t&&r(2,x=t.origJson),"layoutParams"in t&&r(3,k=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(23,i=b.items),8388608&t.$$.dirty[0]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(12,V=!1):(r(12,V=!0),E.logError(Lt(new Error('Incorrect or empty "items" prop for div "grid"'))))),1&t.$$.dirty[0]&&(r(11,o=E.getDerivedFromVars(b.column_count)),_(),_=p(o,(t=>r(27,m=t)))),134225920&t.$$.dirty[0]&&r(13,j=Ze(m,j)),8392706&t.$$.dirty[0]&&r(22,a=(!V&&i||[]).map((t=>{let e=t,n=w;return({templateContext:n,json:e}=E.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),4194304&t.$$.dirty[0]){let t=[];a.forEach((e=>{t.push(E.getDerivedFromVars({rowSpan:e.json.row_span,columnSpan:e.json.column_span,width:e.json.width,height:e.json.height}))})),r(4,C=Ut(t,(t=>[...t]))),$(),$=p(C,(t=>r(26,g=t)))}if(72081416&t.$$.dirty[0]){const t={};let e=0,n=0;r(14,D=[]),r(15,P=[]),r(16,S=[]),r(17,F=[]),r(19,z=!1),r(5,A=a.map(((i,o)=>{var a,l,s,c;const d=g[o],u=Number(d.columnSpan)||1,h=Number(d.rowSpan)||1,p={x:e,y:n,colSpan:u,rowSpan:h},f="match_parent"===(null===(a=d.width)||void 0===a?void 0:a.type)?Number(d.width.weight||1)/u:0,m="match_parent"===(null===(l=d.height)||void 0===l?void 0:l.type)?Number(d.height.weight||1)/h:0,v=1===u&&"fixed"===(null===(s=d.width)||void 0===s?void 0:s.type)&&d.width.value?Number(d.width.value)/u:0,y=1===h&&"fixed"===(null===(c=d.height)||void 0===c?void 0:c.type)&&d.height.value?Number(d.height.value)/h:0;for(let i=e;i<e+u;++i)for(let e=n;e<n+h;++e)t[i+"_"+e]?r(19,z=!0):(t[i+"_"+e]=!0,(!D[i]||D[i]<f)&&r(14,D[i]=f,D),(!P[e]||P[e]<m)&&r(15,P[e]=m,P),(!S[i]||S[i]<v)&&r(16,S[i]=v,S),(!F[e]||F[e]<y)&&r(17,F[e]=y,F));do{++e,e>=j&&(e=0,++n)}while(t[e+"_"+n]);return Object.assign(Object.assign({},i),{layoutParams:{gridArea:p,fakeElement:(null==k?void 0:k.fakeElement)||!1}})}))),0!==e&&r(19,z=!0),z&&E.logError(Lt(new Error('Mismatching "grid" rows/columns'))),r(18,I=n)}1&t.$$.dirty[0]&&(r(10,l=E.getDerivedFromVars(b.content_alignment_vertical)),y(),y=p(l,(t=>r(25,f=t)))),34603008&t.$$.dirty[0]&&r(20,T=sn(f,T)),1&t.$$.dirty[0]&&(r(9,s=E.getDerivedFromVars(b.content_alignment_horizontal)),v(),v=p(s,(t=>r(24,h=t)))),18874368&t.$$.dirty[0]&&r(21,M=ln(h,M)),3145728&t.$$.dirty[0]&&r(8,c={valign:T,halign:M}),516096&t.$$.dirty[0]&&r(7,d={"grid-template-columns":cr(D,S,j),"grid-template-rows":cr(P,F,I)}),528384&t.$$.dirty[0]&&r(6,u=V||z)},[b,w,x,k,C,A,u,d,c,s,l,o,V,j,D,P,S,F,I,z,T,M,a,i,h,f,g,m]}const mr={gallery:"divkit-cbb0f",gallery_orientation_horizontal:"divkit-c9be7",gallery_orientation_vertical:"divkit-a72d5",gallery__scroller:"divkit-a4e39","gallery_scroll-snap":"divkit-f606e","gallery__items-grid":"divkit-eb4a5",gallery__items:"divkit-af276",gallery__arrow:"divkit-b72d7","gallery__arrow-icon":"divkit-d100d",gallery__arrow_left:"divkit-a0a5d",gallery__arrow_right:"divkit-f0f59","gallery__arrow-icon-path":"divkit-b4173"};function vr(t){const e=[];let n=t[0],r=1;for(let i=1;i<=t.length;i++)t[i]!==n?(e.push(r>1?"repeat(".concat(r,", ").concat(n,")"):n),n=t[i],r=1):r++;return e.join(" ")}function yr(t,e){let n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];null!==n&&clearTimeout(n),n=setTimeout((()=>{t.apply(this,i),n=null}),e)}}const{Boolean:$r}=Pt;function _r(t,e,n){const r=t.slice();return r[72]=e[n],r[73]=e,r[74]=n,r}function br(t,e,n){const r=t.slice();return r[75]=e[n],r}function wr(t){let e,n;return e=new Ye({props:{cls:ue("gallery",mr,t[16]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,customActions:"gallery",$$slots:{default:[Vr]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};65536&n[0]&&(r.cls=ue("gallery",mr,t[16])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),335953872&n[0]|65536&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function xr(t){let e,n;return e=new go({props:{layoutParams:t[8],div:t[75].json,templateContext:t[75].templateContext,origJson:t[75].origJson}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.layoutParams=t[8]),67108864&n[0]&&(r.div=t[75].json),67108864&n[0]&&(r.templateContext=t[75].templateContext),67108864&n[0]&&(r.origJson=t[75].origJson),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function kr(t){let e,n,r,i,o,a=t[74],l=t[72],s=[];for(let e=0;e<l.length;e+=1)s[e]=xr(br(t,l,e));const c=t=>Vt(s[t],1,1,(()=>{s[t]=null})),d=()=>t[60](e,a),u=()=>t[60](null,a);return{c(){e=I("div");for(let t=0;t<s.length;t+=1)s[t].c();n=M(),this.h()},l(t){e=L(t,"DIV",{class:!0,style:!0});var r=R(e);for(let t=0;t<s.length;t+=1)s[t].l(r);n=G(r),r.forEach(S),this.h()},h(){O(e,"class",r=mr.gallery__items),O(e,"style",i=Gt(t[17]))},m(t,r){P(t,e,r);for(let t=0;t<s.length;t+=1)s[t].m(e,null);D(e,n),d(),o=!0},p(r,h){if(t=r,67109120&h[0]){let r;for(l=t[72],r=0;r<l.length;r+=1){const i=br(t,l,r);s[r]?(s[r].p(i,h),At(s[r],1)):(s[r]=xr(i),s[r].c(),At(s[r],1),s[r].m(e,n))}for(Et(),r=l.length;r<s.length;r+=1)c(r);Ct()}(!o||131072&h[0]&&i!==(i=Gt(t[17])))&&O(e,"style",i),a!==t[74]&&(u(),a=t[74],d())},i(t){if(!o){for(let t=0;t<l.length;t+=1)At(s[t]);o=!0}},o(t){s=s.filter($r);for(let t=0;t<s.length;t+=1)Vt(s[t]);o=!1},d(t){t&&S(e),F(s,t),u()}}}function Er(t){let e,n,r=t[12]&&t[9]&&Cr(t),i=t[13]&&t[9]&&Ar(t);return{c(){r&&r.c(),e=M(),i&&i.c(),n=N()},l(t){r&&r.l(t),e=G(t),i&&i.l(t),n=N()},m(t,o){r&&r.m(t,o),P(t,e,o),i&&i.m(t,o),P(t,n,o)},p(t,o){t[12]&&t[9]?r?r.p(t,o):(r=Cr(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),t[13]&&t[9]?i?i.p(t,o):(i=Ar(t),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(t){r&&r.d(t),t&&S(e),i&&i.d(t),t&&S(n)}}}function Cr(t){let e,r,i,o,a=!t[29]&&function(t){let e,r,i,o;return{c(){e=z("svg"),r=z("path"),this.h()},l(t){e=q(t,"svg",{class:!0,xmlns:!0,width:!0,height:!0,viewBox:!0,fill:!0});var n=R(e);r=q(n,"path",{class:!0,d:!0}),R(r).forEach(S),n.forEach(S),this.h()},h(){O(r,"class",i=mr["gallery__arrow-icon-path"]),O(r,"d","m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"),O(e,"class",o=mr["gallery__arrow-icon"]),O(e,"xmlns","http://www.w3.org/2000/svg"),O(e,"width","32"),O(e,"height","32"),O(e,"viewBox","0 0 32 32"),O(e,"fill","none")},m(t,n){P(t,e,n),D(e,r)},p:n,d(t){t&&S(e)}}}();return{c(){e=I("div"),a&&a.c(),this.h()},l(t){e=L(t,"DIV",{class:!0});var n=R(e);a&&a.l(n),n.forEach(S),this.h()},h(){O(e,"class",r=t[29]||"".concat(mr.gallery__arrow," ").concat(mr.gallery__arrow_left))},m(n,r){P(n,e,r),a&&a.m(e,null),i||(o=J(e,"click",t[63]),i=!0)},p(t,e){t[29]||a.p(t,e)},d(t){t&&S(e),a&&a.d(),i=!1,o()}}}function Ar(t){let e,r,i,o,a=!t[30]&&function(t){let e,r,i,o;return{c(){e=z("svg"),r=z("path"),this.h()},l(t){e=q(t,"svg",{class:!0,xmlns:!0,width:!0,height:!0,viewBox:!0,fill:!0});var n=R(e);r=q(n,"path",{class:!0,d:!0}),R(r).forEach(S),n.forEach(S),this.h()},h(){O(r,"class",i=mr["gallery__arrow-icon-path"]),O(r,"d","M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"),O(e,"class",o=mr["gallery__arrow-icon"]),O(e,"xmlns","http://www.w3.org/2000/svg"),O(e,"width","32"),O(e,"height","32"),O(e,"viewBox","0 0 32 32"),O(e,"fill","none")},m(t,n){P(t,e,n),D(e,r)},p:n,d(t){t&&S(e)}}}();return{c(){e=I("div"),a&&a.c(),this.h()},l(t){e=L(t,"DIV",{class:!0});var n=R(e);a&&a.l(n),n.forEach(S),this.h()},h(){O(e,"class",r=t[30]||"".concat(mr.gallery__arrow," ").concat(mr.gallery__arrow_right))},m(n,r){P(n,e,r),a&&a.m(e,null),i||(o=J(e,"click",t[64]),i=!0)},p(t,e){t[30]||a.p(t,e)},d(t){t&&S(e),a&&a.d(),i=!1,o()}}}function Vr(t){let e,n,r,i,o,a,l,c,d,u,h,p=t[26],f=[];for(let e=0;e<p.length;e+=1)f[e]=kr(_r(t,p,e));const g=t=>Vt(f[t],1,1,(()=>{f[t]=null}));let m="horizontal"===t[6]&&Er(t);return{c(){e=I("div"),n=I("div");for(let t=0;t<f.length;t+=1)f[t].c();l=M(),m&&m.c(),c=N(),this.h()},l(t){e=L(t,"DIV",{class:!0,style:!0});var r=R(e);n=L(r,"DIV",{class:!0,style:!0});var i=R(n);for(let t=0;t<f.length;t+=1)f[t].l(i);i.forEach(S),r.forEach(S),l=G(t),m&&m.l(t),c=N(),this.h()},h(){O(n,"class",r=mr["gallery__items-grid"]),O(n,"style",i=Gt(t[18])),O(e,"class",o=mr.gallery__scroller+" "+(t[28]?"divkit-aa145":"")),O(e,"style",a=Gt(t[7]))},m(r,i){P(r,e,i),D(e,n);for(let t=0;t<f.length;t+=1)f[t].m(n,null);t[61](n),t[62](e),P(r,l,i),m&&m.m(r,i),P(r,c,i),d=!0,u||(h=J(e,"scroll",(function(){s(t[9]?t[32]:null)&&(t[9]?t[32]:null).apply(this,arguments)})),u=!0)},p(r,l){if(t=r,67242240&l[0]){let e;for(p=t[26],e=0;e<p.length;e+=1){const r=_r(t,p,e);f[e]?(f[e].p(r,l),At(f[e],1)):(f[e]=kr(r),f[e].c(),At(f[e],1),f[e].m(n,null))}for(Et(),e=p.length;e<f.length;e+=1)g(e);Ct()}(!d||262144&l[0]&&i!==(i=Gt(t[18])))&&O(n,"style",i),(!d||268435456&l[0]&&o!==(o=mr.gallery__scroller+" "+(t[28]?"divkit-aa145":"")))&&O(e,"class",o),(!d||128&l[0]&&a!==(a=Gt(t[7])))&&O(e,"style",a),"horizontal"===t[6]?m?m.p(t,l):(m=Er(t),m.c(),m.m(c.parentNode,c)):m&&(m.d(1),m=null)},i(t){if(!d){for(let t=0;t<p.length;t+=1)At(f[t]);d=!0}},o(t){f=f.filter($r);for(let t=0;t<f.length;t+=1)Vt(f[t]);d=!1},d(n){n&&S(e),F(f,n),t[61](null),t[62](null),n&&S(l),m&&m.d(n),n&&S(c),u=!1,h()}}}function jr(t){let e,n,r,i,o=!t[5]&&wr(t);return{c(){o&&o.c(),e=N()},l(t){o&&o.l(t),e=N()},m(a,l){o&&o.m(a,l),P(a,e,l),n=!0,r||(i=J(window,"resize",(function(){s(t[9]?t[33]:null)&&(t[9]?t[33]:null).apply(this,arguments)})),r=!0)},p(n,r){(t=n)[5]?o&&(Et(),Vt(o,1,1,(()=>{o=null})),Ct()):o?(o.p(t,r),32&r[0]&&At(o,1)):(o=wr(t),o.c(),At(o,1),o.m(e.parentNode,e))},i(t){n||(At(o),n=!0)},o(t){Vt(o),n=!1},d(t){o&&o.d(t),t&&S(e),r=!1,i()}}}function Dr(t,e,r){let i,o,a,l,s,c,d,u,h,g,m,v,y,$,_,b,w,x,k,E,C,A,V,j,D,P,S,F,I=n,z=n,T=n,M=n,N=n,J=n,O=n,B=n,R=n,U=n;t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>U()));let{json:W={}}=e,{templateContext:L}=e,{origJson:q}=e,{layoutParams:H}=e;const G=at(Wt);let K,Y,X=[],Z=!1,Q=!1,tt=null,et=!1;const nt=G.getCustomization("galleryLeftClass"),ot=G.getCustomization("galleryRightClass");let lt=!1;const st=G.isDesktop;f(t,st,(t=>r(59,S=t)));let dt,ut,ht,pt,ft=1,gt="horizontal",mt="start",vt=8,yt="",$t=[],_t={},bt=!1,wt={},xt=0;function kt(){if(!K)return;const t=K.scrollLeft,e=K.scrollWidth,n=K.offsetWidth;r(12,Z=t>2),r(13,Q=t+n<e-2)}const Et=yr(kt,50);function Ct(t){K.scroll({left:K.scrollLeft+.75*K.offsetWidth*("right"===t?1:-1),behavior:"smooth"})}function At(){let t=[],e=X[0].children.length;for(let n=0;n<e;++n)for(let e=0;e<ft;++e){const r=X[e].children[n];r&&t.push(r)}return t}function Vt(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"smooth";const r="horizontal"===gt,i=r?"offsetLeft":"offsetTop",o=r?"left":"top";K.scroll({[o]:Math.max(0,t[e][i]-vt/2),behavior:n})}function jt(t){const e=At(),n=K.getBoundingClientRect(),r=e.findIndex((t=>function(t,e){return"horizontal"===gt?e.left>=t.left&&e.right<=t.right:e.top>=t.top&&e.bottom<=t.bottom}(n,t.getBoundingClientRect())));if(-1!==r)return r;const i=e.map((t=>function(t,e){return"horizontal"===gt?e.right>t.left&&t.right>e.left:e.bottom>t.top&&t.bottom>e.top}(n,t.getBoundingClientRect()))),o=i.findIndex(Boolean);return-1!==o?"prev"===t&&2===i.filter(Boolean).length?o+1:o:"prev"===t?1:e.length-2}return!W.id||lt||(null==H?void 0:H.fakeElement)||G.registerInstance(W.id,{setCurrentItem(t){const e=At();if(t<0||t>e.length-1)throw new Error('Item is out of range in "set-current-item" action');Vt(e,t)},setPreviousItem(t){const e=jt("prev"),n=At();let r=e-1;r<0&&(r="ring"===t?n.length-1:e),Vt(n,r)},setNextItem(t){const e="horizontal"===gt?K.scrollLeft+K.offsetWidth===K.scrollWidth:K.scrollTop+K.offsetHeight===K.scrollHeight,n=At();if(e&&"ring"===t)return void Vt(n,0);const r=jt("next");let i=r+1;i>n.length-1&&(i="ring"===t?0:r),Vt(n,i)}}),rt((()=>{r(36,et=!0),!lt&&(kt(),xt)&&Vt(At(),xt,"auto")})),it((()=>{r(36,et=!1),W.id&&!(null==H?void 0:H.fakeElement)&&G.unregisterInstance(W.id)})),t.$$set=t=>{"json"in t&&r(0,W=t.json),"templateContext"in t&&r(1,L=t.templateContext),"origJson"in t&&r(2,q=t.origJson),"layoutParams"in t&&r(3,H=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(49,i=W.items),262144&t.$$.dirty[1]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(5,lt=!1):(r(5,lt=!0),G.logError(Lt(new Error('Incorrect or empty "items" prop for div "gallery"'))))),34&t.$$.dirty[0]|262144&t.$$.dirty[1]&&r(48,o=(!lt&&i||[]).map((t=>{let e=t,n=L;return({templateContext:n,json:e}=G.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),32&t.$$.dirty[0]|268435488&t.$$.dirty[1]&&r(9,a=S&&et&&!lt),528&t.$$.dirty[0]|16&t.$$.dirty[1]&&(a?"undefined"!=typeof ResizeObserver&&(r(35,tt=new ResizeObserver((()=>{Et()}))),tt.observe(Y)):tt&&(tt.disconnect(),r(35,tt=null))),1&t.$$.dirty[0]&&(r(27,l=G.getDerivedFromVars(W.column_count)),R(),R=p(l,(t=>r(58,P=t)))),134217792&t.$$.dirty[1]&&r(37,ft=Ze(P,ft)),131136&t.$$.dirty[1]&&r(26,s=function(t,e){let n=0,r=[];for(let i=0;i<t.length;++i)r[n]||(r[n]=[]),r[n].push(t[i]),++n>=e&&(n=0);return r}(o,ft)),1&t.$$.dirty[0]&&(r(25,c=G.getDerivedFromVars(W.orientation)),B(),B=p(c,(t=>r(57,D=t)))),64&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&r(6,gt=Wn(D,gt)),1&t.$$.dirty[0]&&(r(24,d=G.getDerivedFromVars(W.cross_content_alignment)),O(),O=p(d,(t=>r(56,j=t)))),33554560&t.$$.dirty[1]&&r(38,mt=function(t,e){return"start"===t||"center"===t||"end"===t?t:e}(j,mt)),1&t.$$.dirty[0]&&(r(23,u=G.getDerivedFromVars(W.item_spacing)),J(),J=p(u,(t=>r(55,V=t)))),16777728&t.$$.dirty[1]&&(r(40,vt=ve(V,vt)),r(39,dt=Kt(vt))),1&t.$$.dirty[0]&&(r(22,h=G.getDerivedFromVars(W.cross_spacing)),N(),N=p(h,(t=>r(54,A=t)))),8391168&t.$$.dirty[1]&&(r(42,ht=ve(A,vt)),r(41,ut=Kt(ht))),1&t.$$.dirty[0]&&(r(21,g=G.getDerivedFromVars(W.paddings)),M(),M=p(g,(t=>r(53,C=t)))),4198400&t.$$.dirty[1]&&r(43,yt=me(C,yt)),64&t.$$.dirty[0]&&r(47,m="horizontal"===gt?"grid-template-columns":"grid-template-rows"),64&t.$$.dirty[0]|131072&t.$$.dirty[1]){let t=[];o.forEach((e=>{const n="horizontal"===gt?"width":"height";t.push(G.getDerivedFromVars(e.json[n]))})),r(14,pt=Ut(t,(t=>t))),T(),T=p(pt,(t=>r(52,E=t)))}if(64&t.$$.dirty[0]|2105408&t.$$.dirty[1]&&(r(44,$t=[]),ft>1?$t.push("auto"):E.forEach((t=>{!t&&"horizontal"===gt||"match_parent"===(null==t?void 0:t.type)?$t.push("100%"):$t.push("max-content")}))),1&t.$$.dirty[0]&&(r(20,v=G.getDerivedFromVars(W.scroll_mode)),z(),z=p(v,(t=>r(51,k=t)))),456&t.$$.dirty[0]|1049280&t.$$.dirty[1]){const t={};let e={};r(45,bt=!1),(null==H?void 0:H.fakeElement)&&(e.fakeElement=!0),"horizontal"===gt?e.parentVAlign=mt:e.parentHAlign=mt,"paging"===k&&(r(45,bt=!0),e.scrollSnap="start",t["horizontal"===gt?"scroll-padding-left":"scroll-padding-top"]=Kt(vt/2)),1===ft&&(e.parentLayoutOrientation=gt),r(7,_t=_e(t,_t)),r(8,wt=_e(e,wt))}1&t.$$.dirty[0]&&(r(19,y=G.getDerivedFromVars(W.restrict_parent_scroll)),U(),U=p(y,(t=>r(28,F=t)))),5120&t.$$.dirty[1]&&r(18,$={padding:yt,"grid-gap":ut}),73984&t.$$.dirty[1]&&r(17,_={"grid-gap":dt,[m]:vr($t)}),64&t.$$.dirty[0]|16384&t.$$.dirty[1]&&r(16,b={orientation:gt,"scroll-snap":bt}),1&t.$$.dirty[0]&&(r(15,w=G.getDerivedFromVars(W.default_item)),I(),I=p(w,(t=>r(50,x=t)))),557056&t.$$.dirty[1]&&r(46,xt=ve(x,xt))},[W,L,q,H,Y,lt,gt,_t,wt,a,K,X,Z,Q,pt,w,b,_,$,y,v,g,h,u,d,c,s,l,F,nt,ot,st,kt,Et,Ct,tt,et,ft,mt,dt,vt,ut,ht,yt,$t,bt,xt,m,o,i,x,k,E,C,A,V,j,D,P,S,function(t,e){ct[t?"unshift":"push"]((()=>{X[e]=t,r(11,X)}))},function(t){ct[t?"unshift":"push"]((()=>{Y=t,r(4,Y)}))},function(t){ct[t?"unshift":"push"]((()=>{K=t,r(10,K)}))},()=>Ct("left"),()=>Ct("right")]}const Pr={tabs:"divkit-e0df5",tabs__list:"divkit-ea19b",tabs__item:"divkit-c25c7",tabs__item_selected:"divkit-d560a",tabs__item_actionable:"divkit-dfda0",tabs__panels:"divkit-f5dc0",tabs__swiper:"divkit-eb42c",tabs__swiper_animated:"divkit-b9f18",tabs__swiper_inited:"divkit-fa574",tabs__panel:"divkit-cc9fb",tabs__panel_visible:"divkit-e7306",tabs__separator:"divkit-b85bf"},{Boolean:Sr}=Pt;function Fr(t,e,n){const r=t.slice();return r[83]=e[n],r[85]=n,r}function Ir(t,e,n){const r=t.slice();r[83]=e[n],r[85]=n;const i=r[85]===r[6];return r[86]=i,r}function zr(t){let e,n;return e=new Ye({props:{cls:ue("tabs",Pr,t[42]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customActions:"tabs",$$slots:{default:[Br]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),536870890&n[0]|517&n[1]|67108864&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function Tr(t){let e,n,r=t[83].title+"";return{c(){e=T(r),n=M()},l(t){e=H(t,r),n=G(t)},m(t,r){P(t,e,r),P(t,n,r)},p(t,n){262144&n[0]&&r!==(r=t[83].title+"")&&K(e,r)},d(t){t&&S(e),t&&S(n)}}}function Mr(t){var e,n,r;let i,o;function a(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t[59](t[85],...n)}return i=new Fe({props:{cls:ue("tabs__item",Pr,{selected:t[86],actionable:Boolean(t[83].title_click_action)}),actions:!t[83].title_click_action||null!==(e=t[3])&&void 0!==e&&e.fakeElement?[]:[t[83].title_click_action],attrs:{id:"".concat(t[41],"-tab-").concat(t[85]),"aria-controls":"".concat(t[41],"-panel-").concat(t[85]),role:"tab",tabindex:!t[86]||null!==(n=t[3])&&void 0!==n&&n.fakeElement?"-1":t[83].title_click_action?void 0:"0","aria-selected":t[86]?"true":"false"},customAction:null!==(r=t[3])&&void 0!==r&&r.fakeElement?null:a,$$slots:{default:[Tr]},$$scope:{ctx:t}}}),{c(){zt(i.$$.fragment)},l(t){Tt(i.$$.fragment,t)},m(t,e){Mt(i,t,e),o=!0},p(e,n){var r,o,l;t=e;const s={};262208&n[0]&&(s.cls=ue("tabs__item",Pr,{selected:t[86],actionable:Boolean(t[83].title_click_action)})),262152&n[0]&&(s.actions=!t[83].title_click_action||null!==(r=t[3])&&void 0!==r&&r.fakeElement?[]:[t[83].title_click_action]),262216&n[0]&&(s.attrs={id:"".concat(t[41],"-tab-").concat(t[85]),"aria-controls":"".concat(t[41],"-panel-").concat(t[85]),role:"tab",tabindex:!t[86]||null!==(o=t[3])&&void 0!==o&&o.fakeElement?"-1":t[83].title_click_action?void 0:"0","aria-selected":t[86]?"true":"false"}),8&n[0]&&(s.customAction=null!==(l=t[3])&&void 0!==l&&l.fakeElement?null:a),262144&n[0]|67108864&n[2]&&(s.$$scope={dirty:n,ctx:t}),i.$set(s)},i(t){o||(At(i.$$.fragment,t),o=!0)},o(t){Vt(i.$$.fragment,t),o=!1},d(t){Nt(i,t)}}}function Nr(t){let e,n,r;return{c(){e=I("div"),this.h()},l(t){e=L(t,"DIV",{class:!0,style:!0}),R(e).forEach(S),this.h()},h(){O(e,"class",n=Pr.tabs__separator),O(e,"style",r=Gt(t[33]))},m(t,n){P(t,e,n)},p(t,n){4&n[1]&&r!==(r=Gt(t[33]))&&O(e,"style",r)},d(t){t&&S(e)}}}function Jr(t){let e,n;return e=new go({props:{div:t[83].div,templateContext:t[1],layoutParams:t[5]}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};262144&n[0]&&(r.div=t[83].div),2&n[0]&&(r.templateContext=t[1]),32&n[0]&&(r.layoutParams=t[5]),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function Or(t){let e,n,r,i,o,a,l=t[27][t[85]]&&Jr(t);return{c(){e=I("div"),l&&l.c(),n=M(),this.h()},l(t){e=L(t,"DIV",{class:!0,role:!0,id:!0,"aria-labelledby":!0,style:!0});var r=R(e);l&&l.l(r),n=G(r),r.forEach(S),this.h()},h(){O(e,"class",r=ue("tabs__panel",Pr,{visible:t[28][t[85]]})),O(e,"role","tabpanel"),O(e,"id",i=t[41]+"-panel-"+t[85]),O(e,"aria-labelledby",o=t[41]+"-tab-"+t[85]),Y(e,"left",100*t[85]+"%")},m(t,r){P(t,e,r),l&&l.m(e,null),D(e,n),a=!0},p(t,i){t[27][t[85]]?l?(l.p(t,i),134217728&i[0]&&At(l,1)):(l=Jr(t),l.c(),At(l,1),l.m(e,n)):l&&(Et(),Vt(l,1,1,(()=>{l=null})),Ct()),(!a||268435456&i[0]&&r!==(r=ue("tabs__panel",Pr,{visible:t[28][t[85]]})))&&O(e,"class",r)},i(t){a||(At(l),a=!0)},o(t){Vt(l),a=!1},d(t){t&&S(e),l&&l.d()}}}function Br(t){let e,n,r,i,o,a,c,d,u,h,p,f=t[18],g=[];for(let e=0;e<f.length;e+=1)g[e]=Mr(Ir(t,f,e));const m=t=>Vt(g[t],1,1,(()=>{g[t]=null}));let v=t[19]&&Nr(t),y=t[18],$=[];for(let e=0;e<y.length;e+=1)$[e]=Or(Fr(t,y,e));const _=t=>Vt($[t],1,1,(()=>{$[t]=null}));return{c(){e=I("div");for(let t=0;t<g.length;t+=1)g[t].c();r=M(),v&&v.c(),i=M(),o=I("div"),a=I("div");for(let t=0;t<$.length;t+=1)$[t].c();this.h()},l(t){e=L(t,"DIV",{class:!0,role:!0});var n=R(e);for(let t=0;t<g.length;t+=1)g[t].l(n);n.forEach(S),r=G(t),v&&v.l(t),i=G(t),o=L(t,"DIV",{class:!0});var l=R(o);a=L(l,"DIV",{class:!0});var s=R(a);for(let t=0;t<$.length;t+=1)$[t].l(s);s.forEach(S),l.forEach(S),this.h()},h(){O(e,"class",n=Pr.tabs__list+" "+(t[40]?"divkit-aa145":"")),O(e,"role","tablist"),Y(e,"--divkit-tabs-title-padding",t[17]?pe(t[17]):"",!1),Y(e,"--divkit-tabs-font-size",Kt(t[7]),!1),Y(e,"--divkit-tabs-paddings",t[8],!1),Y(e,"--divkit-tabs-line-height",t[23],!1),Y(e,"--divkit-tabs-letter-spacing",t[24],!1),Y(e,"--divkit-tabs-active-font-weight",t[10]||"",!1),Y(e,"--divkit-tabs-inactive-font-weight",t[11]||"",!1),Y(e,"--divkit-tabs-active-text-color",t[12],!1),Y(e,"--divkit-tabs-inactive-text-color",t[13],!1),Y(e,"--divkit-tabs-active-background-color",t[14],!1),Y(e,"--divkit-tabs-inactive-background-color",t[15],!1),Y(e,"--divkit-tabs-border-radius",t[9],!1),Y(e,"--divkit-tabs-items-spacing",t[16]?Yt(t[16]):"",!1),O(a,"class",c=ue("tabs__swiper",Pr,{inited:t[25],animated:t[26]})),O(o,"class",d=Pr.tabs__panels+" "+(t[40]?"divkit-aa145":""))},m(n,l){P(n,e,l);for(let t=0;t<g.length;t+=1)g[t].m(e,null);t[60](e),P(n,r,l),v&&v.m(n,l),P(n,i,l),P(n,o,l),D(o,a);for(let t=0;t<$.length;t+=1)$[t].m(a,null);t[61](a),t[62](o),u=!0,h||(p=[J(e,"keydown",t[44]),J(a,"touchstart",(function(){s(t[31]?t[45]:void 0)&&(t[31]?t[45]:void 0).apply(this,arguments)})),J(a,"touchmove",(function(){s(t[31]?t[46]:void 0)&&(t[31]?t[46]:void 0).apply(this,arguments)})),J(a,"touchend",(function(){s(t[31]?t[47]:void 0)&&(t[31]?t[47]:void 0).apply(this,arguments)})),J(a,"touchcancel",(function(){s(t[31]?t[47]:void 0)&&(t[31]?t[47]:void 0).apply(this,arguments)}))],h=!0)},p(r,l){if(t=r,262216&l[0]|5120&l[1]){let n;for(f=t[18],n=0;n<f.length;n+=1){const r=Ir(t,f,n);g[n]?(g[n].p(r,l),At(g[n],1)):(g[n]=Mr(r),g[n].c(),At(g[n],1),g[n].m(e,null))}for(Et(),n=f.length;n<g.length;n+=1)m(n);Ct()}if((!u||512&l[1]&&n!==(n=Pr.tabs__list+" "+(t[40]?"divkit-aa145":"")))&&O(e,"class",n),131072&l[0]&&Y(e,"--divkit-tabs-title-padding",t[17]?pe(t[17]):"",!1),128&l[0]&&Y(e,"--divkit-tabs-font-size",Kt(t[7]),!1),256&l[0]&&Y(e,"--divkit-tabs-paddings",t[8],!1),8388608&l[0]&&Y(e,"--divkit-tabs-line-height",t[23],!1),16777216&l[0]&&Y(e,"--divkit-tabs-letter-spacing",t[24],!1),1024&l[0]&&Y(e,"--divkit-tabs-active-font-weight",t[10]||"",!1),2048&l[0]&&Y(e,"--divkit-tabs-inactive-font-weight",t[11]||"",!1),4096&l[0]&&Y(e,"--divkit-tabs-active-text-color",t[12],!1),8192&l[0]&&Y(e,"--divkit-tabs-inactive-text-color",t[13],!1),16384&l[0]&&Y(e,"--divkit-tabs-active-background-color",t[14],!1),32768&l[0]&&Y(e,"--divkit-tabs-inactive-background-color",t[15],!1),512&l[0]&&Y(e,"--divkit-tabs-border-radius",t[9],!1),65536&l[0]&&Y(e,"--divkit-tabs-items-spacing",t[16]?Yt(t[16]):"",!1),t[19]?v?v.p(t,l):(v=Nr(t),v.c(),v.m(i.parentNode,i)):v&&(v.d(1),v=null),402915362&l[0]|1024&l[1]){let e;for(y=t[18],e=0;e<y.length;e+=1){const n=Fr(t,y,e);$[e]?($[e].p(n,l),At($[e],1)):($[e]=Or(n),$[e].c(),At($[e],1),$[e].m(a,null))}for(Et(),e=y.length;e<$.length;e+=1)_(e);Ct()}(!u||100663296&l[0]&&c!==(c=ue("tabs__swiper",Pr,{inited:t[25],animated:t[26]})))&&O(a,"class",c),(!u||512&l[1]&&d!==(d=Pr.tabs__panels+" "+(t[40]?"divkit-aa145":"")))&&O(o,"class",d)},i(t){if(!u){for(let t=0;t<f.length;t+=1)At(g[t]);for(let t=0;t<y.length;t+=1)At($[t]);u=!0}},o(t){g=g.filter(Sr);for(let t=0;t<g.length;t+=1)Vt(g[t]);$=$.filter(Sr);for(let t=0;t<$.length;t+=1)Vt($[t]);u=!1},d(n){n&&S(e),F(g,n),t[60](null),n&&S(r),v&&v.d(n),n&&S(i),n&&S(o),F($,n),t[61](null),t[62](null),h=!1,l(p)}}}function Rr(t){let e,n,r=!t[4]&&zr(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[4]?r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct()):r?(r.p(t,n),16&n[0]&&At(r,1)):(r=zr(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Ur(t,e,r){let i,o,a,l,s,c,d,u,h,f,g,m,v,y,$,_,b,w,x,k,E,C,A=n,V=n,j=n,D=n,P=n,S=n,F=n,I=n,z=n;var T;t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>z()));let{json:M={}}=e,{templateContext:N}=e,{origJson:J}=e,{layoutParams:O}=e;const B=at(Wt),R=B.genId("tabs");let U,W,L,q=!1,H={};const G=B.getJsonWithVars(M.selected_tab);let K,Y,X=G&&Number(G)||0,Z=12,Q="",tt="",et="",nt="",rt="",ot="",lt="",st="",dt=0,ut="",ht="",pt=null,ft=!1,mt=!1,vt=X,yt=[],$t=[];async function _t(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(vt=X,r(6,X=t),Vt(),xt(),e){await gt();const t=U.querySelector(".".concat(Pr.tabs__item_selected));t&&t.focus()}}function bt(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=null==i?void 0:i.length;if(!n)return;let r=X+t;r>=n?r=0:r<0&&(r=n-1),_t(r,e)}function wt(t,e){return X===e||(_t(e),!1)}function xt(){r(26,mt=!0),kt(100*-X),Et(),async function(){await gt();const t=document.getElementById("".concat(R,"-panel-").concat(X));t&&r(21,W.style.height=Kt(t.offsetHeight),W)}(),At(),Pt=-X*W.clientWidth}async function kt(t){await gt(),r(22,L.style.transform="translate3d(".concat(t,"%,0,0)"),L)}function Et(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=t?Math.max(0,X-1):Math.min(X,vt),n=t?Math.min(i.length-1,X+1):Math.max(X,vt);r(27,yt=yt.map(((t,r)=>t||r>=e&&r<=n))),r(28,$t=$t.map(((t,r)=>r>=e&&r<=n)))}let Ct=null;function At(){Ct&&clearTimeout(Ct),Ct=window.setTimeout((()=>{r(28,$t=i.map(((t,e)=>e===X)))}),400)}function Vt(){ft||(r(25,ft=!0),r(21,W.style.height=Kt(W.clientHeight),W),r(22,L.style.transform="translate3d(".concat(100*-vt,"%,0,0)"),L))}let jt,Dt,Pt,St=null,Ft=null,It=!1,zt=!1;return!M.id||q||(null==O?void 0:O.fakeElement)||B.registerInstance(M.id,{setCurrentItem(t){if(t<0||t>i.length-1)throw new Error('Item is out of range in "set-current-item" action');_t(t)},setPreviousItem(t){let e=X-1;e<0&&(e="ring"===t?i.length-1:X),_t(e)},setNextItem(t){let e=X+1;e>i.length-1&&(e="ring"===t?0:X),_t(e)}}),it((()=>{M.id&&!(null==O?void 0:O.fakeElement)&&B.unregisterInstance(M.id)})),t.$$set=t=>{"json"in t&&r(0,M=t.json),"templateContext"in t&&r(1,N=t.templateContext),"origJson"in t&&r(2,J=t.origJson),"layoutParams"in t&&r(3,O=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(18,i=M.items||[]),262144&t.$$.dirty[0]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(4,q=!1):(r(4,q=!0),B.logError(Lt(new Error('Incorrect or empty "items" prop for div "tabs"'))))),1&t.$$.dirty[0]&&(r(39,o=B.getDerivedFromVars(M.width)),I(),I=p(o,(t=>r(58,E=t)))),1&t.$$.dirty[0]&&(r(38,a=B.getDerivedFromVars(M.height)),F(),F=p(a,(t=>r(57,k=t)))),40&t.$$.dirty[0]|201326592&t.$$.dirty[1]){let t={};(null==O?void 0:O.fakeElement)&&(t.fakeElement=!0),"wrap_content"===(null==E?void 0:E.type)&&(t.parentHorizontalWrapContent=!0),k&&"wrap_content"!==k.type||(t.parentVerticalWrapContent=!0),r(5,H=_e(t,H))}if(262225&t.$$.dirty[0]&&!q&&(X<0||X>=i.length)&&(B.logError(Lt(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:M.selected_tab,length:i.length}})),r(6,X=X<0?0:i.length-1)),1&t.$$.dirty[0]&&(r(37,l=B.getDerivedFromVars(M.tab_title_style)),S(),S=p(l,(t=>r(56,x=t)))),33554432&t.$$.dirty[1]&&r(51,s=x||{}),128&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(7,Z=Ze(s.font_size,Z)),384&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&(s.font_size||s.paddings)){const t=s.paddings||{top:6,right:8,bottom:6,left:8},e={top:(Number(t.top)||0)/Z*10,right:(Number(t.right)||0)/Z*10,bottom:(Number(t.bottom)||0)/Z*10,left:(Number(t.left)||0)/Z*10};r(8,Q=me(e,Q))}if(128&t.$$.dirty[0]|1048576&t.$$.dirty[1]){const t=s.line_height;void 0!==t&&Ie(t)&&r(23,tt=Kt(t/Z*10))}if(128&t.$$.dirty[0]|1048576&t.$$.dirty[1]){const t=s.letter_spacing;void 0!==t&&ge(t)&&r(24,et=Kt(t/Z*10))}if(640&t.$$.dirty[0]|1179648&t.$$.dirty[1]&&(s.corner_radius||s.corners_radius||s.font_size)){const t=null!==r(48,T=s.corner_radius)&&void 0!==T?T:1e3;s.corners_radius?r(9,nt=function(t,e,n,r){const i=[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]];for(let t=0;t<i.length;++t)if(i[t]&&!ge(i[t]))return r;return Ee(t,e,n)}(s.corners_radius,t,Z,nt)):ge(t)&&r(9,nt=Kt(t/Z*10))}1024&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(10,K=tn(s.active_font_weight||s.font_weight,K)),2048&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(11,Y=tn(s.inactive_font_weight||s.font_weight,Y)),4096&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(12,rt=Zt(s.active_text_color,1,rt)),8192&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(13,ot=Zt(s.inactive_text_color,1,ot)),16384&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(14,lt=Zt(s.active_background_color,1,lt)),32768&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(15,st=Zt(s.inactive_background_color,1,st)),65536&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(16,dt=ve(s.item_spacing,dt)),1&t.$$.dirty[0]&&(r(36,c=B.getDerivedFromVars(M.has_separator)),P(),P=p(c,(t=>r(19,w=t)))),1&t.$$.dirty[0]&&(r(35,d=B.getDerivedFromVars(M.separator_color)),D(),D=p(d,(t=>r(55,b=t)))),1&t.$$.dirty[0]&&(r(34,u=B.getDerivedFromVars(M.separator_paddings)),j(),j=p(u,(t=>r(54,_=t)))),524288&t.$$.dirty[0]|25952256&t.$$.dirty[1]&&w&&(b&&r(49,ut=Zt(b,1,ut)),_&&r(50,ht=me(_,ht))),786432&t.$$.dirty[1]&&r(33,h={background:ut,margin:ht}),1&t.$$.dirty[0]&&(r(32,f=B.getDerivedFromVars(M.switch_tabs_by_content_swipe_enabled)),V(),V=p(f,(t=>r(53,$=t)))),4194304&t.$$.dirty[1]&&r(31,g=void 0===$||Boolean($)),1&t.$$.dirty[0]&&(r(30,m=B.getDerivedFromVars(M.restrict_parent_scroll)),z(),z=p(m,(t=>r(40,C=t)))),1&t.$$.dirty[0]&&(r(29,v=B.getDerivedFromVars(M.title_paddings)),A(),A=p(v,(t=>r(52,y=t)))),131072&t.$$.dirty[0]|2097152&t.$$.dirty[1]&&r(17,pt=ke(y||void 0,pt)),262144&t.$$.dirty[0]&&(q||(r(27,yt=i.map(((t,e)=>e===X))),r(28,$t=i.map(((t,e)=>e===X)))))},[M,N,J,O,q,H,X,Z,Q,nt,K,Y,rt,ot,lt,st,dt,pt,i,w,U,W,L,tt,et,ft,mt,yt,$t,v,m,g,f,h,u,d,c,l,a,o,C,R,{},wt,function(t){if(!(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)&&i){if(37===t.which)bt(-1,!0);else if(39===t.which)bt(1,!0);else if(36===t.which)_t(0,!0);else{if(35!==t.which)return;_t(i.length-1,!0)}t.preventDefault()}},function(t){var e;const n=t.target,o=null===(e=null==n?void 0:n.closest)||void 0===e?void 0:e.call(n,".".concat("divkit-aa145"));i.length<2||t.touches.length>1||o&&o!==W||(It=!1,zt=!1,St=Ve(t),Ft=null,jt=Date.now(),Dt=Pt||-X*W.clientWidth,r(26,mt=!1),Ct&&clearTimeout(Ct))},function(t){const e=Ve(t);if(!St||Ft&&Ft.x===e.x&&Ft.y===e.y)return;Ft=e;const n=W.clientWidth;if(It){Pt=e.x-St.x+Dt;const t=n*i.length;if(Pt>0)Pt=Pt*n/(Pt+3*n);else if(-Pt+n>t){let e=-Pt+n-t;e=e*n/(e+3*n),Pt=n-t-e}kt(100*Pt/n)}else Math.abs(e.y-St.y)>10?zt=!0:!zt&&Math.abs(e.x-St.x)>8&&(Vt(),It=!0,St=e,kt(100*-X),Et(!0));It&&t.cancelable&&t.preventDefault()},function(){zt=!1,St=null;let t=X;if(!It)return;It=!1;const e=Math.min(512,W.clientWidth);Math.abs(Dt-Pt)>e/4*Math.min(1,(Date.now()-jt)/750)&&(t+=Dt>Pt?1:-1),t>=i.length?t=i.length-1:t<0&&(t=0),t===X?(Pt=-t*e,kt(100*-t),At()):_t(t)},T,ut,ht,s,y,$,_,b,x,k,E,(t,e)=>wt(0,t),function(t){ct[t?"unshift":"push"]((()=>{U=t,r(20,U)}))},function(t){ct[t?"unshift":"push"]((()=>{L=t,r(22,L)}))},function(t){ct[t?"unshift":"push"]((()=>{W=t,r(21,W)}))}]}function Wr(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function Lr(t){return t*t*t}function qr(t){const e=t-1;return e*e*e+1}function Hr(t){return e=>{if(e<=0)return 0;if(e>=1)return 1;const n=e*t.length,r=Math.floor(n),i=n-r;return t[r]*i+t[r+1]*(1-i)}}const Gr=Hr([.0021,.0045,.0071,.01,.0131,.0165,.0202,.0242,.0284,.033,.0378,.0429,.0483,.054,.0601,.0664,.0731,.08,.0872,.0948,.1026,.1108,.1192,.1279,.1369,.1461,.1556,.1653,.1753,.1855,.1958,.2064,.2171,.2279,.2389,.25,.2612,.2725,.2839,.2952,.3067,.3181,.3295,.341,.3524,.3637,.375,.3863,.3974,.4085,.4195,.4304,.4412,.4519,.4624,.4729,.4832,.4934,.5034,.5133,.5231,.5327,.5422,.5516,.5608,.5699,.5788,.5876,.5963,.6048,.6132,.6214,.6295,.6375,.6453,.653,.6606,.668,.6754,.6825,.6896,.6965,.7034,.7101,.7166,.7231,.7295,.7357,.7418,.7479,.7538,.7596,.7653,.7709,.7764,.7818,.7871,.7923,.7974,.8024,.8073,.8122,.8169,.8216,.8261,.8306,.835,.8394,.8436,.8478,.8518,.8558,.8598,.8636,.8674,.8711,.8747,.8783,.8818,.8852,.8886,.8919,.8951,.8983,.9014,.9044,.9074,.9103,.9131,.9159,.9187,.9213,.924,.9265,.929,.9315,.9339,.9362,.9385,.9408,.943,.9451,.9472,.9492,.9512,.9532,.9551,.9569,.9587,.9605,.9622,.9638,.9655,.967,.9686,.9701,.9715,.9729,.9743,.9756,.9769,.9782,.9794,.9805,.9817,.9828,.9838,.9848,.9858,.9868,.9877,.9886,.9894,.9902,.991,.9917,.9924,.9931,.9937,.9943,.9949,.9954,.9959,.9964,.9969,.9973,.9977,.998,.9983,.9986,.9989,.9991,.9993,.9995,.9997,.9998,.9999,.9999,1,1]),Kr=Hr([5e-4,.002,.0045,.0078,.0119,.0168,.0224,.0286,.0355,.0429,.0508,.0592,.0681,.0774,.087,.0969,.1072,.1177,.1285,.1395,.1507,.1621,.1736,.1853,.197,.2089,.2208,.2328,.2448,.2569,.2689,.281,.293,.305,.317,.3289,.3408,.3526,.3644,.376,.3876,.3991,.4105,.4218,.433,.444,.455,.4658,.4765,.4871,.4975,.5078,.518,.528,.5379,.5477,.5573,.5668,.5761,.5853,.5944,.6033,.612,.6206,.6291,.6374,.6456,.6537,.6616,.6693,.677,.6845,.6918,.699,.7061,.713,.7199,.7265,.7331,.7395,.7458,.752,.758,.764,.7698,.7755,.781,.7865,.7918,.7971,.8022,.8072,.8121,.8169,.8216,.8262,.8307,.8351,.8394,.8436,.8477,.8517,.8557,.8595,.8633,.8669,.8705,.874,.8775,.8808,.8841,.8873,.8904,.8934,.8964,.8993,.9022,.9049,.9076,.9103,.9129,.9154,.9178,.9202,.9226,.9249,.9271,.9293,.9314,.9335,.9355,.9375,.9394,.9413,.9431,.9449,.9466,.9483,.95,.9516,.9532,.9547,.9562,.9576,.9591,.9605,.9618,.9631,.9644,.9657,.9669,.9681,.9692,.9703,.9714,.9725,.9736,.9746,.9756,.9765,.9775,.9784,.9793,.9802,.981,.9818,.9826,.9834,.9842,.9849,.9856,.9863,.987,.9877,.9883,.989,.9896,.9902,.9908,.9913,.9919,.9924,.993,.9935,.994,.9944,.9949,.9954,.9958,.9963,.9967,.9971,.9975,.9979,.9983,.9986,.999,.9993,.9997,1]),Yr={linear:r,ease:Gr,ease_in:Lr,ease_out:qr,ease_in_out:Wr,spring:Kr};function Xr(t){return Math.max(...t.map((t=>(Number(t.duration)||200)+(Number(t.start_delay)||0))))}function Zr(t,e){let{transitions:n,elementBbox:r,rootBbox:i,direction:o,maxDuration:a,alpha:l}=e;const s=null!=l?l:1;return{duration:a,css:t=>{const e=t*a,l=n.map((t=>{const n=Number(t.start_delay)||0,a=Number(t.duration)||200,l=Math.max(0,Math.min(1,(e-n)/a)),c="in"===o?1-l:l,d=(Yr[t.interpolator||"ease_in_out"]||Wr)(c);if("fade"===t.type)return d>=1?{active:!1,opacity:0}:{active:d>0&&d<1,opacity:(1-d)*s+d*(t.alpha||0)};if("slide"===t.type){var u;const e="top"===t.edge||"left"===t.edge?-1:1,n="top"!==t.edge&&"bottom"!==t.edge&&t.edge?"translateX":"translateY";let o=null===(u=t.distance)||void 0===u?void 0:u.value;void 0===o&&(o="top"!==t.edge&&"bottom"!==t.edge&&t.edge?Math.abs(i["left"===t.edge?"left":"right"]-r["left"===t.edge?"right":"left"]):Math.abs(i["bottom"===t.edge?"bottom":"top"]-r["bottom"===t.edge?"top":"bottom"]));const a=o*d;return{active:d>0&&d<1,translate:"".concat(n,"(").concat(a*e,"px)")}}if("scale"===t.type){var h,p;const e=1-d+d*(t.scale||0),n=null!==(h=t.pivot_x)&&void 0!==h?h:.5,i=null!==(p=t.pivot_y)&&void 0!==p?p:.5,o=(1-e)*r.width*n,a=(1-e)*r.height*i;return{active:d>0&&d<1,scale:"translate(".concat(o,"px, ").concat(a,"px) scale(").concat(e,")")}}return{}})),c=l.map((t=>t.opacity)).filter((t=>void 0!==t)).reduce(((t,e)=>t*e),1),d=l.map((t=>t.translate)).filter((t=>void 0!==t)).join(" "),u=l.map((t=>t.scale)).filter((t=>void 0!==t)).join(" "),h=l.filter((t=>t.active)).map((t=>t.scale)).filter((t=>void 0!==t)),p=[d,h.length?h[h.length-1]:u].filter(Boolean).join(" ");return"transform:".concat(p||"none",";opacity:").concat(c)}}}function Qr(t,e,n){return t*(1-n)+e*n}const ti={linear:r,ease:Gr,ease_in:Lr,ease_out:qr,ease_in_out:Wr,spring:Kr};function ei(t,e){var n,r;let{rootBbox:i,beforeBbox:o,afterBbox:a,transition:l}=e;return{delay:null!==(n=l.start_delay)&&void 0!==n?n:0,duration:null!==(r=l.duration)&&void 0!==r?r:200,easing:l.interpolator&&l.interpolator in ti?ti[l.interpolator]:Wr,css:t=>["top:".concat(Qr(o.top,a.top,t)-i.top,"px"),"left:".concat(Qr(o.left,a.left,t)-i.left,"px"),"width:".concat(Qr(o.width,a.width,t),"px"),"height:".concat(Qr(o.height,a.height,t),"px")].join(";")}}function ni(t){const e=[];return"set"===t.type?(t.items||[]).forEach((t=>{e.push(...ni(t))})):e.push(t),e}const{Map:ri}=Pt;function ii(t,e,n){const r=t.slice();return r[27]=e[n],r}function oi(t){let e,n;return e=new Ye({props:{cls:"divkit-b8efc",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[ui]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};1&n&&(r.json=t[0]),4&n&&(r.origJson=t[2]),2&n&&(r.templateContext=t[1]),8&n&&(r.layoutParams=t[3]),1073742034&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function ai(t){let e,r,i=t[7],o=li(t);return{c(){o.c(),e=N()},l(t){o.l(t),e=N()},m(t,n){o.m(t,n),P(t,e,n),r=!0},p(t,r){128&r&&u(i,i=t[7])?(Et(),Vt(o,1,1,n),Ct(),o=li(t),o.c(),At(o,1),o.m(e.parentNode,e)):o.p(t,r)},i(t){r||(At(o),r=!0)},o(t){Vt(o),r=!1},d(t){t&&S(e),o.d(t)}}}function li(t){let e,n;return e=new go({props:{div:t[7].div,templateContext:t[1]}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};128&n&&(r.div=t[7].div),2&n&&(r.templateContext=t[1]),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function si(t){let e,n,r,i,o,a,l,s,c,d;function u(){return t[11](t[27])}return r=new go({props:{div:t[27].json,templateContext:t[27].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=I("div"),n=I("div"),zt(r.$$.fragment),o=M(),this.h()},l(t){e=L(t,"DIV",{class:!0});var i=R(e);n=L(i,"DIV",{class:!0});var a=R(n);Tt(r.$$.fragment,a),a.forEach(S),o=G(i),i.forEach(S),this.h()},h(){O(n,"class",i="divkit-e08c6"),O(e,"class",a="divkit-eb860")},m(t,i){P(t,e,i),D(e,n),Mt(r,n,null),D(e,o),s=!0,c||(d=J(e,"introend",u),c=!0)},p(e,n){t=e;const i={};64&n&&(i.div=t[27].json),64&n&&(i.templateContext=t[27].templateContext),r.$set(i)},i(n){s||(At(r.$$.fragment,n),l||mt((()=>{l=Dt(e,ei,t[27]),l.start()})),s=!0)},o(t){Vt(r.$$.fragment,t),s=!1},d(t){t&&S(e),Nt(r),c=!1,d()}}}function ci(t){let e,n,r,i,o,a,l,s,c,d;function u(){return t[10](t[27])}return r=new go({props:{div:t[27].json,templateContext:t[27].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=I("div"),n=I("div"),zt(r.$$.fragment),o=M(),this.h()},l(t){e=L(t,"DIV",{class:!0,style:!0});var i=R(e);n=L(i,"DIV",{class:!0});var a=R(n);Tt(r.$$.fragment,a),a.forEach(S),o=G(i),i.forEach(S),this.h()},h(){O(n,"class",i="divkit-e08c6"),O(e,"class",a="divkit-eb860"),Y(e,"left",t[27].offsetLeft+"px"),Y(e,"top",t[27].offsetTop+"px"),Y(e,"width",t[27].width+"px"),Y(e,"height",t[27].height+"px")},m(t,i){P(t,e,i),D(e,n),Mt(r,n,null),D(e,o),s=!0,c||(d=J(e,"introend",u),c=!0)},p(n,i){t=n;const o={};64&i&&(o.div=t[27].json),64&i&&(o.templateContext=t[27].templateContext),r.$set(o),(!s||64&i)&&Y(e,"left",t[27].offsetLeft+"px"),(!s||64&i)&&Y(e,"top",t[27].offsetTop+"px"),(!s||64&i)&&Y(e,"width",t[27].width+"px"),(!s||64&i)&&Y(e,"height",t[27].height+"px")},i(n){s||(At(r.$$.fragment,n),l||mt((()=>{l=Dt(e,Zr,t[27]),l.start()})),s=!0)},o(t){Vt(r.$$.fragment,t),s=!1},d(t){t&&S(e),Nt(r),c=!1,d()}}}function di(t,e){let n,r,i,o,a;const l=[ci,si],s=[];function c(t,e){return"direction"in t[27]?0:1}return r=c(e),i=s[r]=l[r](e),{key:t,first:null,c(){n=N(),i.c(),o=N(),this.h()},l(t){n=N(),i.l(t),o=N(),this.h()},h(){this.first=n},m(t,e){P(t,n,e),s[r].m(t,e),P(t,o,e),a=!0},p(t,n){let a=r;r=c(e=t),r===a?s[r].p(e,n):(Et(),Vt(s[a],1,1,(()=>{s[a]=null})),Ct(),i=s[r],i?i.p(e,n):(i=s[r]=l[r](e),i.c()),At(i,1),i.m(o.parentNode,o))},i(t){a||(At(i),a=!0)},o(t){Vt(i),a=!1},d(t){t&&S(n),s[r].d(t),t&&S(o)}}}function ui(t){var e;let n,r,i,o,a=[],l=new ri,s=(null===(e=t[7])||void 0===e?void 0:e.div)&&ai(t),c=t[6];const d=t=>t[27];for(let e=0;e<c.length;e+=1){let n=ii(t,c,e),r=d(n);l.set(r,a[e]=di(r,n))}return{c(){s&&s.c(),n=M(),r=I("div");for(let t=0;t<a.length;t+=1)a[t].c();this.h()},l(t){s&&s.l(t),n=G(t),r=L(t,"DIV",{class:!0,"aria-hidden":!0});var e=R(r);for(let t=0;t<a.length;t+=1)a[t].l(e);e.forEach(S),this.h()},h(){O(r,"class",i="divkit-adaae"),O(r,"aria-hidden","true")},m(e,i){s&&s.m(e,i),P(e,n,i),P(e,r,i);for(let t=0;t<a.length;t+=1)a[t].m(r,null);t[12](r),o=!0},p(t,e){var i;null!==(i=t[7])&&void 0!==i&&i.div?s?(s.p(t,e),128&e&&At(s,1)):(s=ai(t),s.c(),At(s,1),s.m(n.parentNode,n)):s&&(Et(),Vt(s,1,1,(()=>{s=null})),Ct()),320&e&&(c=t[6],Et(),a=function(t,e,n,r,i,o,a,l,s,c,d,u){let h=t.length,p=o.length,f=h;const g={};for(;f--;)g[t[f].key]=f;const m=[],v=new Map,y=new Map;for(f=p;f--;){const t=u(i,o,f),r=n(t);let l=a.get(r);l?l.p(t,e):(l=c(r,t),l.c()),v.set(r,m[f]=l),r in g&&y.set(r,Math.abs(f-g[r]))}const $=new Set,_=new Set;function b(t){At(t,1),t.m(l,d),a.set(t.key,t),d=t.first,p--}for(;h&&p;){const e=m[p-1],n=t[h-1],r=e.key,i=n.key;e===n?(d=e.first,h--,p--):v.has(i)?!a.has(r)||$.has(r)?b(e):_.has(i)?h--:y.get(r)>y.get(i)?(_.add(r),b(e)):($.add(i),h--):(s(n,a),h--)}for(;h--;){const e=t[h];v.has(e.key)||s(e,a)}for(;p;)b(m[p-1]);return m}(a,e,d,0,t,c,l,r,St,di,null,ii),Ct())},i(t){if(!o){At(s);for(let t=0;t<c.length;t+=1)At(a[t]);o=!0}},o(t){Vt(s);for(let t=0;t<a.length;t+=1)Vt(a[t]);o=!1},d(e){s&&s.d(e),e&&S(n),e&&S(r);for(let t=0;t<a.length;t+=1)a[t].d();t[12](null)}}}function hi(t){let e,n,r=!t[5]&&oi(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){let[i]=n;t[5]?r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct()):r?(r.p(t,i),32&i&&At(r,1)):(r=oi(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function pi(t){return"change_bounds"===t.type?t:"set"===t.type?pi(t.items[0]):null}function fi(t,e,n){let r,{json:i={}}=e,{templateContext:o}=e,{origJson:a}=e,{layoutParams:l}=e;const s=at(Wt),c=at(he);let d,u=new Map,h=new Set,p=!1,f=null,g=[],m=[],v=[],y=[];function $(t,e,n){let{json:r,templateContext:i,transitions:o,node:a}=e;r=s.getJsonWithVars(r),o=s.getJsonWithVars(o);const l=ni(o),c=a.getBoundingClientRect();return{json:Object.assign(Object.assign({},r),{margins:void 0,alpha:(d=l,d.some((t=>"fade"===t.type))?void 0:r.alpha)}),templateContext:i,elementBbox:c,rootBbox:t,transitions:l,alpha:r.alpha,width:c.width,height:c.height,offsetTop:c.top-t.top,offsetLeft:c.left-t.left,direction:n,resolvePromise:e.resolvePromise,node:e.node};var d}const _=i.div_id||i.id;let b;_?(null==l?void 0:l.fakeElement)||(c.registerInstance(_,{async setState(t){if(b===t)return;s.setRunning("stateChange",!0);const e=new Set(h);g.forEach((t=>{t.resolvePromise&&t.resolvePromise()})),n(6,g=[]);let i=[];if(d){const t=d.getBoundingClientRect();i=v.map((e=>$(t,e,"out")))}y.forEach((t=>{u.set(t.id,t.node.getBoundingClientRect())})),m=[],v=[],y=[];const o=r.find((e=>e.state_id===t))||null;if(o?(b=t,n(7,w=o)):s.logError(Lt(new Error("Cannot find state with id"),{additional:{stateId:t}})),await gt(),!d)return;const a=d.getBoundingClientRect();let l=m.filter((t=>{var n;return!(!t.json.id||e.has(t.json.id))||(null===(n=t.resolvePromise)||void 0===n||n.call(t),!1)})).map((t=>$(a,t,"in")));i=i.filter((t=>{var e;return!(!t.json.id||h.has(t.json.id))||(null===(e=t.resolvePromise)||void 0===e||e.call(t),!1)}));const c=i.concat(l),p=c.reduce(((t,e)=>Math.max(t,Xr(e.transitions))),0),f=y.filter((t=>u.has(t.id))).map((t=>({json:Object.assign(Object.assign({},t.json),{margins:void 0,width:{type:"match_parent"},height:{type:"match_parent"}}),templateContext:t.templateContext,rootBbox:a,beforeBbox:u.get(t.id),afterBbox:t.node.getBoundingClientRect(),node:t.node,transition:pi(t.transitions),resolvePromise:t.resolvePromise})));n(6,g=[...c.map((t=>Object.assign(Object.assign({},t),{maxDuration:p}))),...f]),u.clear(),s.setRunning("stateChange",!1)},getChild(t){if(f&&f.has(t))return f.get(t);s.logError(Lt(new Error("Missing state block with id"),{additional:{id:t}}))}}),ot(he,{registerInstance(t,e){f||(f=new Map),f.has(t)?s.logError(Lt(new Error("Duplicate state with id"),{additional:{id:t}})):f.set(t,e)},unregisterInstance(t){null==f||f.delete(t)},runVisibilityTransition(t,e,r,i,o){if(!d)return Promise.resolve();const a=$(d.getBoundingClientRect(),{json:t,templateContext:e,transitions:r,node:i},o),l=Xr(a.transitions),s=Object.assign(Object.assign({},a),{maxDuration:l});return n(6,g=[...g.filter((t=>t.node!==a.node)),s]),new Promise((t=>{s.resolvePromise=t}))},registerChildWithTransitionIn(t,e,n,r){const i={json:t,templateContext:e,transitions:n,node:r};return m.push(i),new Promise((t=>{i.resolvePromise=t}))},registerChildWithTransitionOut(t,e,n,r){const i={json:t,templateContext:e,transitions:n,node:r};return v.push(i),new Promise((t=>{i.resolvePromise=t}))},registerChildWithTransitionChange(t,e,n,r){const i=t.id;if(!i)return Promise.resolve();const o={id:i,json:t,templateContext:e,transitions:n,node:r};return y.push(o),new Promise((t=>{o.resolvePromise=t}))},hasTransitionChange:t=>!!t&&u.has(t),registerChild(t){h.add(t)},unregisterChild(t){h.delete(t)}})):(p=!0,s.logError(Lt(new Error('Missing "id" prop for div "state"'))));let w=null;const x=s.getJsonWithVars(i.default_state_id);let k=!1;function E(t){n(6,g=g.filter((e=>e!==t))),t.resolvePromise&&t.resolvePromise()}return it((()=>{_&&!(null==l?void 0:l.fakeElement)&&c.unregisterInstance(_)})),t.$$set=t=>{"json"in t&&n(0,i=t.json),"templateContext"in t&&n(1,o=t.templateContext),"origJson"in t&&n(2,a=t.origJson),"layoutParams"in t&&n(3,l=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&i&&(h=new Set),1&t.$$.dirty&&n(9,r=i.states||[]),512&t.$$.dirty&&((null==r?void 0:r.length)?n(5,p=!1):(n(5,p=!0),s.logError(Lt(new Error('Empty "states" prop for div "state"'))))),512&t.$$.dirty&&function(t){k||(k=!0,t.length&&(x?(b=x,n(7,w=t.find((t=>t.state_id===b))||null),w||s.logError(Lt(new Error("Cannot find state for default_state_id"),{additional:{selectedId:b}}))):(n(7,w=t[0]),b=w.state_id)))}(r)},[i,o,a,l,d,p,g,w,E,r,t=>E(t),t=>E(t),function(t){ct[t?"unshift":"push"]((()=>{d=t,n(4,d)}))}]}const gi={pager:"divkit-c5feb",pager__items:"divkit-f6987",pager__item:"divkit-feca7",pager_orientation_horizontal:"divkit-b0a1c",pager_orientation_vertical:"divkit-f772f"},{Boolean:mi}=Pt;function vi(t,e,n){const r=t.slice();return r[48]=e[n],r}function yi(t){let e,n;return e=new Ye({props:{cls:ue("pager",gi,t[8]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,$$slots:{default:[_i]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=ue("pager",gi,t[8])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),33336&n[0]|1048576&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function $i(t){var e;let n,r,i,o,a;return r=new go({props:{div:t[48].json,templateContext:t[48].templateContext,origJson:t[48].origJson,layoutParams:null!==(e=t[3])&&void 0!==e&&e.fakeElement?{fakeElement:!0}:void 0}}),{c(){n=I("div"),zt(r.$$.fragment),i=M(),this.h()},l(t){n=L(t,"DIV",{class:!0});var e=R(n);Tt(r.$$.fragment,e),i=G(e),e.forEach(S),this.h()},h(){O(n,"class",o=gi.pager__item)},m(t,e){P(t,n,e),Mt(r,n,null),D(n,i),a=!0},p(t,e){var n;const i={};16&e[0]&&(i.div=t[48].json),16&e[0]&&(i.templateContext=t[48].templateContext),16&e[0]&&(i.origJson=t[48].origJson),8&e[0]&&(i.layoutParams=null!==(n=t[3])&&void 0!==n&&n.fakeElement?{fakeElement:!0}:void 0),r.$set(i)},i(t){a||(At(r.$$.fragment,t),a=!0)},o(t){Vt(r.$$.fragment,t),a=!1},d(t){t&&S(n),Nt(r)}}}function _i(t){let e,n,r,i,o,a,l=t[4],s=[];for(let e=0;e<l.length;e+=1)s[e]=$i(vi(t,l,e));const c=t=>Vt(s[t],1,1,(()=>{s[t]=null}));return{c(){e=I("div");for(let t=0;t<s.length;t+=1)s[t].c();this.h()},l(t){e=L(t,"DIV",{class:!0,style:!0});var n=R(e);for(let t=0;t<s.length;t+=1)s[t].l(n);n.forEach(S),this.h()},h(){O(e,"class",n=gi.pager__items+" "+(t[15]?"divkit-aa145":"")),O(e,"style",r=Gt(t[9]))},m(n,r){P(n,e,r);for(let t=0;t<s.length;t+=1)s[t].m(e,null);t[36](e),i=!0,o||(a=J(e,"scroll",t[16]),o=!0)},p(t,o){if(24&o[0]){let n;for(l=t[4],n=0;n<l.length;n+=1){const r=vi(t,l,n);s[n]?(s[n].p(r,o),At(s[n],1)):(s[n]=$i(r),s[n].c(),At(s[n],1),s[n].m(e,null))}for(Et(),n=l.length;n<s.length;n+=1)c(n);Ct()}(!i||32768&o[0]&&n!==(n=gi.pager__items+" "+(t[15]?"divkit-aa145":"")))&&O(e,"class",n),(!i||512&o[0]&&r!==(r=Gt(t[9])))&&O(e,"style",r)},i(t){if(!i){for(let t=0;t<l.length;t+=1)At(s[t]);i=!0}},o(t){s=s.filter(mi);for(let t=0;t<s.length;t+=1)Vt(s[t]);i=!1},d(n){n&&S(e),F(s,n),t[36](null),o=!1,a()}}}function bi(t){let e,n,r=!t[7]&&yi(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[7]?r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct()):r?(r.p(t,n),128&n[0]&&At(r,1)):(r=yi(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function wi(t,e,r){let i,o,a,l,s,c,d,u,h,f,g,m,v,y,$,_,b,w=n,x=n,k=n,E=n,C=n,A=n;var V,j,D,P,S,F,I;t.$$.on_destroy.push((()=>w())),t.$$.on_destroy.push((()=>x())),t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>A()));let{json:z={}}=e,{templateContext:T}=e,{origJson:M}=e,{layoutParams:N}=e;const J=at(Wt),O=J.genId("pager");let B,R=!1,U=!1,W=0,L=0,q=!1,H="horizontal",G="",K="",Y="";const X=yr((function(){if(!R)return;const t=function(){const t=Array.from(B.children),e=B.getBoundingClientRect(),n=t.findIndex((t=>{return n=e,r=t.getBoundingClientRect(),"horizontal"===H?r.left>=n.left&&r.right<=n.right:r.top>=n.top&&r.bottom<=n.bottom;var n,r}));return-1!==n?n:W}();t!==W&&r(25,W=t)}),50);function Z(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"smooth";const n="horizontal"===H,i=B.children[t],o=n?"offsetLeft":"offsetTop",a=n?"left":"top";B.scroll({[a]:i[o],behavior:e}),r(25,W=t)}return z.id&&!(null==N?void 0:N.fakeElement)&&J.registerInstance(z.id,{setCurrentItem(t){if(t<0||t>i.length-1)throw new Error('Item is out of range in "set-current-item" action');Z(t)},setPreviousItem(t){let e=W-1;e<0&&(e="ring"===t?i.length-1:W),Z(e)},setNextItem(t){let e=W+1;e>i.length-1&&(e="ring"===t?0:W),Z(e)}}),rt((()=>{if(R=!0,Boolean(document.getElementById("".concat(O,"-tab-0")))){const t=[...B.children];for(const[e,n]of t.entries())n.setAttribute("role","tabpanel"),n.setAttribute("id","".concat(O,"-panel-").concat(e)),n.setAttribute("aria-labelledby","".concat(O,"-tab-").concat(e))}})),it((()=>{R=!1,z.id&&!(null==N?void 0:N.fakeElement)&&J.unregisterInstance(z.id)})),t.$$set=t=>{"json"in t&&r(0,z=t.json),"templateContext"in t&&r(1,T=t.templateContext),"origJson"in t&&r(2,M=t.origJson),"layoutParams"in t&&r(3,N=t.layoutParams)},t.$$.update=()=>{if(131073&t.$$.dirty[0]&&((null===r(17,V=z.items)||void 0===V?void 0:V.length)&&Array.isArray(z.items)?r(24,U=!1):(r(24,U=!0),J.logError(Lt(new Error('Incorrect or empty "items" prop for div "pager"'))))),16777219&t.$$.dirty[0]&&r(4,i=(!U&&z.items||[]).map((t=>{let e=t,n=T;return({templateContext:n,json:e}=J.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(14,o=J.getDerivedFromVars(z.layout_mode)),x(),x=p(o,(t=>r(32,v=t)))),2&t.$$.dirty[1]&&(v?"percentage"!==v.type&&"fixed"!==v.type?(r(26,q=!0),J.logError(Lt(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):r(26,q=!1):(r(26,q=!0),J.logError(Lt(new Error('Empty "layout_mode" prop for div "pager"'))))),1&t.$$.dirty[0]&&(r(13,a=J.getDerivedFromVars(z.orientation)),C(),C=p(a,(t=>r(35,_=t)))),134217728&t.$$.dirty[0]|16&t.$$.dirty[1]&&r(27,H=Wn(_,H)),1&t.$$.dirty[0]&&(r(12,l=J.getDerivedFromVars(z.item_spacing)),E(),E=p(l,(t=>r(34,$=t)))),8&t.$$.dirty[1]){const t=null==$?void 0:$.value;t&&ge(t)&&r(28,G=Kt(t||0))}if(1&t.$$.dirty[0]&&(r(11,s=J.getDerivedFromVars(z.paddings)),k(),k=p(s,(t=>r(33,y=t)))),536870912&t.$$.dirty[0]|4&t.$$.dirty[1]&&r(29,K=me(y,K)),1&t.$$.dirty[0]&&(r(10,c=J.getDerivedFromVars(z.restrict_parent_scroll)),A(),A=p(c,(t=>r(15,b=t)))),134217728&t.$$.dirty[0]&&r(31,d="horizontal"===H?"grid-auto-columns":"grid-auto-rows"),419168257&t.$$.dirty[0]|2&t.$$.dirty[1])if("fixed"===(null==v?void 0:v.type)){const t=Yt("horizontal"===H?((null===r(18,j=z.paddings)||void 0===j?void 0:j.left)||0)+((null===r(19,D=z.paddings)||void 0===D?void 0:D.right)||0):((null===r(20,P=z.paddings)||void 0===P?void 0:P.top)||0)+((null===r(21,S=z.paddings)||void 0===S?void 0:S.bottom)||0)),e=null===r(22,F=v.neighbour_page_width)||void 0===F?void 0:F.value;r(30,Y=e?"calc(100% + ".concat(t," - 2 * ").concat(Yt(e)," - 2 * ").concat(G,")"):"100%")}else if("percentage"===(null==v?void 0:v.type)){const t=null===r(23,I=v.page_width)||void 0===I?void 0:I.value;r(30,Y="".concat(Number(t),"%"))}1879048192&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(9,u={"grid-gap":G,padding:K,[d]:Y}),134217728&t.$$.dirty[0]&&r(8,h={orientation:H}),83886080&t.$$.dirty[0]&&r(7,f=U||q),33554448&t.$$.dirty[0]&&function(t,e){const n=z.id;if(n){const o=new Map(m);r=g,m=o.set(n,{instId:O,size:t,currentItem:e,scrollToPagerItem:Z}),i=m,r.set(i)}var r,i}(i.length,W),33554432&t.$$.dirty[0]&&function(t){var e;if(t===L)return;L=t;const n=J.getJsonWithVars(null===(e=i[t].json)||void 0===e?void 0:e.selected_actions);(null==n?void 0:n.length)&&J.execAnyActions(n)}(W)},r(6,g=J.getStore("pagers")),w(),w=p(g,(t=>r(39,m=t))),[z,T,M,N,i,B,g,f,h,u,c,s,l,a,o,b,X,V,j,D,P,S,F,I,U,W,q,H,G,K,Y,d,v,y,$,_,function(t){ct[t?"unshift":"push"]((()=>{B=t,r(5,B)}))}]}const xi={indicator:"divkit-d8e3f",indicator__scroller:"divkit-b5db0",indicator__items:"divkit-d5d94",indicator__item:"divkit-f6629",indicator_placement_default:"divkit-c1670",indicator__item_active:"divkit-b39cd",indicator_placement_stretch:"divkit-b6bd3"};function ki(t,e,n){const r=t.slice();r[43]=e[n],r[46]=n;const i=r[46]===r[12].currentItem;return r[44]=i,r}function Ei(t){let e,n=Array(t[12].size),r=[];for(let e=0;e<n.length;e+=1)r[e]=Ci(ki(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=N()},l(t){for(let e=0;e<r.length;e+=1)r[e].l(t);e=N()},m(t,n){for(let e=0;e<r.length;e+=1)r[e].m(t,n);P(t,e,n)},p(t,i){if(25169920&i[0]){let o;for(n=Array(t[12].size),o=0;o<n.length;o+=1){const a=ki(t,n,o);r[o]?r[o].p(a,i):(r[o]=Ci(a),r[o].c(),r[o].m(e.parentNode,e))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(t){F(r,t),t&&S(e)}}}function Ci(t){let e,n,r,i,o,a,s,c;function d(){return t[36](t[46])}return{c(){e=I("div"),this.h()},l(t){e=L(t,"DIV",{class:!0,role:!0,id:!0,"aria-controls":!0,"aria-selected":!0,tabindex:!0}),R(e).forEach(S),this.h()},h(){O(e,"class",n=ue("indicator__item",xi,{active:t[44]})+" divkit-bd259"),O(e,"role","tab"),O(e,"id",r=t[12].instId+"-tab-"+t[46]),O(e,"aria-controls",i=t[12].instId+"-panel-"+t[46]),O(e,"aria-selected",o=t[44]?"true":"false"),O(e,"tabindex",a=t[44]?0:-1)},m(n,r){P(n,e,r),s||(c=[J(e,"click",d),J(e,"keydown",t[24])],s=!0)},p(l,s){t=l,4096&s[0]&&n!==(n=ue("indicator__item",xi,{active:t[44]})+" divkit-bd259")&&O(e,"class",n),4096&s[0]&&r!==(r=t[12].instId+"-tab-"+t[46])&&O(e,"id",r),4096&s[0]&&i!==(i=t[12].instId+"-panel-"+t[46])&&O(e,"aria-controls",i),4096&s[0]&&o!==(o=t[44]?"true":"false")&&O(e,"aria-selected",o),4096&s[0]&&a!==(a=t[44]?0:-1)&&O(e,"tabindex",a)},d(t){t&&S(e),s=!1,l(c)}}}function Ai(t){let e,n,r,i,o=t[12]&&Ei(t);return{c(){e=I("div"),n=I("div"),o&&o.c(),this.h()},l(t){e=L(t,"DIV",{class:!0});var r=R(e);n=L(r,"DIV",{class:!0,role:!0});var i=R(n);o&&o.l(i),i.forEach(S),r.forEach(S),this.h()},h(){O(n,"class",r=xi.indicator__items),O(n,"role","tablist"),Y(n,"margin","default"===t[6]?"0 ".concat(Kt(Math.max(0,t[4].width-t[5].width)/2)):"",!1),Y(n,"--divkit-indicator-inactive-width",Kt(t[5].width),!1),Y(n,"--divkit-indicator-inactive-height",Kt(t[5].height),!1),Y(n,"--divkit-indicator-inactive-border-radius",Kt(t[5].borderRadius),!1),Y(n,"--divkit-indicator-inactive-background",t[5].background||"",!1),Y(n,"--divkit-indicator-inactive-box-shadow",t[5].boxShadow||"",!1),Y(n,"--divkit-indicator-active-width",Kt(t[4].width),!1),Y(n,"--divkit-indicator-active-height",Kt(t[4].height),!1),Y(n,"--divkit-indicator-active-border-radius",Kt(t[4].borderRadius),!1),Y(n,"--divkit-indicator-active-background",t[4].background||"",!1),Y(n,"--divkit-indicator-active-box-shadow",t[4].boxShadow||"",!1),Y(n,"--divkit-indicator-active-scale",t[4].width/t[5].width,!1),Y(n,"--divkit-indicator-default-margin","default"===t[6]?"0 ".concat(Kt((t[7]-t[5].width)/2)):"",!1),Y(n,"--divkit-indicator-stretch-margin","stretch"===t[6]?Kt(t[9]):"",!1),Y(n,"--divkit-indicator-stretch-max-count","stretch"===t[6]?t[8]:"",!1),Y(n,"--divkit-indicator-stretch-max-spacer","stretch"===t[6]?Kt((t[8]-1)*t[9]):"",!1),O(e,"class",i=xi.indicator__scroller)},m(r,i){P(r,e,i),D(e,n),o&&o.m(n,null),t[37](n),t[38](e)},p(t,e){t[12]?o?o.p(t,e):(o=Ei(t),o.c(),o.m(n,null)):o&&(o.d(1),o=null),112&e[0]&&Y(n,"margin","default"===t[6]?"0 ".concat(Kt(Math.max(0,t[4].width-t[5].width)/2)):"",!1),32&e[0]&&Y(n,"--divkit-indicator-inactive-width",Kt(t[5].width),!1),32&e[0]&&Y(n,"--divkit-indicator-inactive-height",Kt(t[5].height),!1),32&e[0]&&Y(n,"--divkit-indicator-inactive-border-radius",Kt(t[5].borderRadius),!1),32&e[0]&&Y(n,"--divkit-indicator-inactive-background",t[5].background||"",!1),32&e[0]&&Y(n,"--divkit-indicator-inactive-box-shadow",t[5].boxShadow||"",!1),16&e[0]&&Y(n,"--divkit-indicator-active-width",Kt(t[4].width),!1),16&e[0]&&Y(n,"--divkit-indicator-active-height",Kt(t[4].height),!1),16&e[0]&&Y(n,"--divkit-indicator-active-border-radius",Kt(t[4].borderRadius),!1),16&e[0]&&Y(n,"--divkit-indicator-active-background",t[4].background||"",!1),16&e[0]&&Y(n,"--divkit-indicator-active-box-shadow",t[4].boxShadow||"",!1),48&e[0]&&Y(n,"--divkit-indicator-active-scale",t[4].width/t[5].width,!1),224&e[0]&&Y(n,"--divkit-indicator-default-margin","default"===t[6]?"0 ".concat(Kt((t[7]-t[5].width)/2)):"",!1),576&e[0]&&Y(n,"--divkit-indicator-stretch-margin","stretch"===t[6]?Kt(t[9]):"",!1),320&e[0]&&Y(n,"--divkit-indicator-stretch-max-count","stretch"===t[6]?t[8]:"",!1),832&e[0]&&Y(n,"--divkit-indicator-stretch-max-spacer","stretch"===t[6]?Kt((t[8]-1)*t[9]):"",!1)},d(n){n&&S(e),o&&o.d(),t[37](null),t[38](null)}}}function Vi(t){let e,n;return e=new Ye({props:{cls:ue("indicator",xi,t[13]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Ai]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};8192&n[0]&&(r.cls=ue("indicator",xi,t[13])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),8176&n[0]|65536&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function ji(t,e,r){let i,o,a,l,s,c,d,u,h,f,g,m,v,y,$,_,b,w,x,k=n,E=n,C=n,A=n,V=n,j=n,D=n,P=n,S=n;var F,I;t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>S()));let{json:z={}}=e,{templateContext:T}=e,{origJson:M}=e,{layoutParams:N}=e;const J=["rounded_rectangle","circle"],O=at(Wt);let B,R,U,W={width:13,height:13,borderRadius:6.5,background:"#ffdc60"},L={width:10,height:10,borderRadius:5,background:"#33919cb5"},q="default",H=15,G=10,K=5;function Y(t){t!==U.currentItem&&U.scrollToPagerItem(t)}async function X(t){U.scrollToPagerItem(t),await gt();const e=R.querySelector(".".concat(xi.indicator__item_active));e&&e.focus()}return t.$$set=t=>{"json"in t&&r(0,z=t.json),"templateContext"in t&&r(1,T=t.templateContext),"origJson"in t&&r(2,M=t.origJson),"layoutParams"in t&&r(3,N=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(22,i=O.getDerivedFromVars(z.shape)),j(),j=p(i,(t=>r(32,_=t)))),1&t.$$.dirty[0]&&(r(21,o=O.getDerivedFromVars(z.active_item_color)),A(),A=p(o,(t=>r(30,y=t)))),1&t.$$.dirty[0]&&(r(20,a=O.getDerivedFromVars(z.inactive_item_color)),V(),V=p(a,(t=>r(31,$=t)))),1&t.$$.dirty[0]&&(r(19,l=O.getDerivedFromVars(z.active_item_size)),D(),D=p(l,(t=>r(33,b=t)))),1&t.$$.dirty[0]&&(r(18,s=O.getDerivedFromVars(z.active_shape)),S(),S=p(s,(t=>r(35,x=t)))),1&t.$$.dirty[0]&&(r(17,c=O.getDerivedFromVars(z.inactive_shape)),P(),P=p(c,(t=>r(34,w=t)))),1073741872&t.$$.dirty[0]|31&t.$$.dirty[1]&&(x&&r(4,W=xn({type:"shape_drawable",shape:x},J,W)),w&&r(5,L=xn({type:"shape_drawable",shape:w},J,L)),!x&&!w&&_)){const t=Ze(b,1.3);r(5,L=xn({type:"shape_drawable",shape:_,color:L.background},J,L)),r(5,L.background=Zt($,1,L.background),L),r(4,W=Object.assign(Object.assign({},L),{width:L.width*t,height:L.height*t,borderRadius:L.borderRadius*t,background:W.background})),r(4,W.background=Zt(y,1,W.background),W)}if(1&t.$$.dirty[0]&&(r(16,d=O.getDerivedFromVars(z.space_between_centers)),E(),E=p(d,(t=>r(28,m=t)))),1&t.$$.dirty[0]&&(r(15,u=O.getDerivedFromVars(z.items_placement)),C(),C=p(u,(t=>r(29,v=t)))),905970624&t.$$.dirty[0])if(!v||"default"!==v.type&&"stretch"!==v.type)r(6,q="default"),m&&r(7,H=ve(m.value,H));else if(r(6,q=v.type),"default"===q)r(7,H=ve(null===r(25,F=v.space_between_centers)||void 0===F?void 0:F.value,H));else if("stretch"===q){const t=v;r(8,G=Ze(t.max_visible_items,G)),r(9,K=ve(null===r(26,I=t.item_spacing)||void 0===I?void 0:I.value,K))}134217728&t.$$.dirty[0]&&async function(t){if(z.pager_id&&t.has(z.pager_id)&&(r(12,U=t.get(z.pager_id)),await gt(),R)){const t=R.children[U.currentItem].offsetLeft;B.scroll({left:t-B.clientWidth/2,behavior:"smooth"})}}(g),64&t.$$.dirty[0]&&r(13,f={placement:q})},r(14,h=O.getStore("pagers")),k(),k=p(h,(t=>r(27,g=t))),[z,T,M,N,W,L,q,H,G,K,B,R,U,f,h,u,d,c,s,l,a,o,i,Y,function(t){if(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)return;const{size:e,currentItem:n}=U;if(37===t.which)X(n-1<0?n:n-1);else if(39===t.which)X(n+1>=e?n:n+1);else if(36===t.which)X(0);else{if(35!==t.which)return;X(e-1)}t.preventDefault()},F,I,g,m,v,y,$,_,b,w,x,t=>Y(t),function(t){ct[t?"unshift":"push"]((()=>{R=t,r(11,R)}))},function(t){ct[t?"unshift":"push"]((()=>{B=t,r(10,B)}))}]}const Di={slider:"divkit-ef4f7",slider__input:"divkit-d1d65",slider__input_secondary:"divkit-c7980",slider__thumb:"divkit-f3453",slider__thumb_secondary:"divkit-e1984","slider__tracks-wrapper":"divkit-f7338","slider__tracks-inner":"divkit-ac903",slider__track:"divkit-e956c","slider__active-track":"divkit-ec5bf","slider__thumb-text":"divkit-c4af5","slider__thumb-text_secondary":"divkit-d8821",slider__tick:"divkit-bd9bf",slider__tick_active:"divkit-d8ce2",slider__tick_inactive:"divkit-e71e7"};function Pi(t,e){if(!t||!t.font_size)return e;const n=t.offset,r=t.text_color&&Zt(t.text_color)||"#000",i=Qe(t.font_weight);if(Ie(t.font_size)&&"transparent"!==r){var o,a;const e={fontSize:Kt(t.font_size),fontWeight:i,textColor:r};return"number"==typeof(null==n||null===(o=n.x)||void 0===o?void 0:o.value)&&"number"==typeof(null==n||null===(a=n.y)||void 0===a?void 0:a.value)&&(e.offset={x:n.x.value,y:n.y.value}),e}}function Si(t,e,n){return Math.max(e,Math.min(n,t))}const Fi=-2147483648,Ii=Number.MAX_VALUE,zi=Number.MIN_VALUE,Ti="string",Mi="integer",Ni="number",Ji="boolean",Oi="color",Bi="datetime";class Ri{constructor(t,e){const n=this.convertValue(e);this.name=t,this.value=n}getName(){return this.name}subscribe(t){return this.store||(this.store=Rt(this.value)),this.store.subscribe(t)}set(t){const e=this.fromString(t);this.setValue(e)}setValue(t){const e=this.convertValue(t);this.value=e,this.store&&this.store.set(e)}getValue(){return this.value}}const Ui={string:class extends Ri{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"string"}},number:class extends Ri{convertValue(t){if("number"!=typeof t||isNaN(t)||!isFinite(t))throw new Error("Incorrect variable value");return t}fromString(t){const e=Number(t);return this.convertValue(e)}getType(){return"number"}},integer:class extends Ri{convertValue(t){if("number"!=typeof t||isNaN(t)||t>2147483647||t<Fi||t!==Math.round(t))throw new Error("Incorrect variable value");return t}fromString(t){const e=Number(t);return this.convertValue(e)}getType(){return"integer"}},boolean:class extends Ri{convertValue(t){if(1!==t&&0!==t&&!0!==t&&!1!==t)throw new Error("Incorrect variable value");return Number(t)}fromString(t){if("1"===t||"true"===t)return 1;if("0"===t||"false"===t)return 0;throw new Error("Incorrect variable value")}getType(){return"boolean"}},color:class extends Ri{convertValue(t){if("string"!=typeof t||!te(t))throw new Error("Incorrect variable value");return t}fromString(t){return this.convertValue(t)}getType(){return"color"}},url:class extends Ri{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"url"}}};function Wi(t,e,n){if(!(e in Ui))throw new Error("Unsupported variable type");return new Ui[e](t,n)}function Li(t,e,n){const r=t.slice();return r[78]=e[n],r}function qi(t,e,n){const r=t.slice();return r[78]=e[n],r}function Hi(t){let e,n;return e=new Ye({props:{cls:ue("slider",Di,t[21]),style:t[22],customDescription:!0,customActions:"slider",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Zi]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};2097152&n[0]&&(r.cls=ue("slider",Di,t[21])),4194304&n[0]&&(r.style=t[22]),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),27246576&n[0]|2097152&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function Gi(t){let e,n;return{c(){e=I("div"),this.h()},l(t){e=L(t,"DIV",{class:!0}),R(e).forEach(S),this.h()},h(){O(e,"class",n=Di.slider__tick+" "+Di.slider__tick_active),Y(e,"--divkit-slider-tick",t[78],!1)},m(t,n){P(t,e,n)},p(t,n){131072&n[0]&&Y(e,"--divkit-slider-tick",t[78],!1)},d(t){t&&S(e)}}}function Ki(t){let e,n;return{c(){e=I("div"),this.h()},l(t){e=L(t,"DIV",{class:!0}),R(e).forEach(S),this.h()},h(){O(e,"class",n=Di.slider__tick+" "+Di.slider__tick_inactive),Y(e,"--divkit-slider-tick",t[78],!1)},m(t,n){P(t,e,n)},p(t,n){262144&n[0]&&Y(e,"--divkit-slider-tick",t[78],!1)},d(t){t&&S(e)}}}function Yi(t){let e,n,r,i,o;return{c(){e=I("div"),n=I("div"),r=T(t[6]),this.h()},l(i){e=L(i,"DIV",{class:!0});var o=R(e);n=L(o,"DIV",{class:!0});var a=R(n);r=H(a,t[6]),a.forEach(S),o.forEach(S),this.h()},h(){var r,a,l;O(n,"class",i=Di["slider__thumb-text-inner"]),Y(n,"font-size",(null===(r=t[12])||void 0===r?void 0:r.fontSize)||"1em",!1),Y(n,"font-weight",(null===(a=t[12])||void 0===a?void 0:a.fontWeight)||"",!1),Y(n,"color",(null===(l=t[12])||void 0===l?void 0:l.textColor)||"#000",!1),O(e,"class",o=Di["slider__thumb-text"])},m(t,i){P(t,e,i),D(e,n),D(n,r)},p(t,e){var i,o,a;64&e[0]&&K(r,t[6]),4096&e[0]&&Y(n,"font-size",(null===(i=t[12])||void 0===i?void 0:i.fontSize)||"1em",!1),4096&e[0]&&Y(n,"font-weight",(null===(o=t[12])||void 0===o?void 0:o.fontWeight)||"",!1),4096&e[0]&&Y(n,"color",(null===(a=t[12])||void 0===a?void 0:a.textColor)||"#000",!1)},d(t){t&&S(e)}}}function Xi(t){let e,n,r,i,o;return{c(){e=I("div"),n=I("div"),r=T(t[7]),this.h()},l(i){e=L(i,"DIV",{class:!0});var o=R(e);n=L(o,"DIV",{class:!0});var a=R(n);r=H(a,t[7]),a.forEach(S),o.forEach(S),this.h()},h(){var r,a,l;O(n,"class",i=Di["slider__thumb-text-inner"]),Y(n,"font-size",(null===(r=t[13])||void 0===r?void 0:r.fontSize)||"1em",!1),Y(n,"font-weight",(null===(a=t[13])||void 0===a?void 0:a.fontWeight)||"",!1),Y(n,"color",(null===(l=t[13])||void 0===l?void 0:l.textColor)||"#000",!1),O(e,"class",o=Di["slider__thumb-text"]+" "+Di["slider__thumb-text_secondary"])},m(t,i){P(t,e,i),D(e,n),D(n,r)},p(t,e){var i,o,a;128&e[0]&&K(r,t[7]),8192&e[0]&&Y(n,"font-size",(null===(i=t[13])||void 0===i?void 0:i.fontSize)||"1em",!1),8192&e[0]&&Y(n,"font-weight",(null===(o=t[13])||void 0===o?void 0:o.fontWeight)||"",!1),8192&e[0]&&Y(n,"color",(null===(a=t[13])||void 0===a?void 0:a.textColor)||"#000",!1)},d(t){t&&S(e)}}}function Zi(t){let e,n,r,i,o,a,s,c,d,u,h,p,f,g,m,v,y,$,_,b,w,x,k=t[17],E=[];for(let e=0;e<k.length;e+=1)E[e]=Gi(qi(t,k,e));let C=t[18],A=[];for(let e=0;e<C.length;e+=1)A[e]=Ki(Li(t,C,e));let V=t[12]&&Yi(t),j=t[37]&&function(t){let e,n,r=t[13]&&Xi(t);return{c(){e=I("div"),r&&r.c(),this.h()},l(t){e=L(t,"DIV",{class:!0});var n=R(e);r&&r.l(n),n.forEach(S),this.h()},h(){O(e,"class",n=Di.slider__thumb+" "+Di.slider__thumb_secondary),Y(e,"border-radius",Kt(t[9].borderRadius),!1),Y(e,"background",t[9].background,!1),Y(e,"box-shadow",t[9].boxShadow||"",!1)},m(t,n){P(t,e,n),r&&r.m(e,null)},p(t,n){t[13]?r?r.p(t,n):(r=Xi(t),r.c(),r.m(e,null)):r&&(r.d(1),r=null),512&n[0]&&Y(e,"border-radius",Kt(t[9].borderRadius),!1),512&n[0]&&Y(e,"background",t[9].background,!1),512&n[0]&&Y(e,"box-shadow",t[9].boxShadow||"",!1)},d(t){t&&S(e),r&&r.d()}}}(t),z=t[37]&&function(t){let e,n,r,i,o;return{c(){e=I("input"),this.h()},l(t){e=L(t,"INPUT",{type:!0,class:!0,min:!0,max:!0,step:!0,"aria-label":!0}),this.h()},h(){O(e,"type","range"),O(e,"class",n=t[16]?Di.slider__input:"".concat(Di.slider__input," ").concat(Di.slider__input_secondary)),O(e,"min",t[4]),O(e,"max",t[5]),O(e,"step","1"),e.value=r=t[16]?t[6]:t[7],O(e,"aria-label",t[20])},m(n,r){P(n,e,r),i||(o=[J(e,"input",t[68]),J(e,"mousedown",t[37]?t[40]:null),J(e,"touchstart",t[37]?t[40]:null)],i=!0)},p(t,i){65536&i[0]&&n!==(n=t[16]?Di.slider__input:"".concat(Di.slider__input," ").concat(Di.slider__input_secondary))&&O(e,"class",n),16&i[0]&&O(e,"min",t[4]),32&i[0]&&O(e,"max",t[5]),65728&i[0]&&r!==(r=t[16]?t[6]:t[7])&&(e.value=r),1048576&i[0]&&O(e,"aria-label",t[20])},d(t){t&&S(e),i=!1,l(o)}}}(t);return{c(){e=I("div"),n=I("div"),r=I("div"),o=M(),a=I("div"),c=M();for(let t=0;t<E.length;t+=1)E[t].c();d=M();for(let t=0;t<A.length;t+=1)A[t].c();u=M(),h=I("div"),V&&V.c(),f=M(),j&&j.c(),g=M(),m=I("input"),$=M(),z&&z.c(),this.h()},l(t){e=L(t,"DIV",{class:!0});var i=R(e);n=L(i,"DIV",{class:!0});var l=R(n);r=L(l,"DIV",{class:!0}),R(r).forEach(S),o=G(l),a=L(l,"DIV",{class:!0}),R(a).forEach(S),c=G(l);for(let t=0;t<E.length;t+=1)E[t].l(l);d=G(l);for(let t=0;t<A.length;t+=1)A[t].l(l);u=G(l),h=L(l,"DIV",{class:!0});var s=R(h);V&&V.l(s),s.forEach(S),f=G(l),j&&j.l(l),g=G(l),m=L(l,"INPUT",{type:!0,class:!0,min:!0,max:!0,step:!0,"aria-label":!0}),$=G(l),z&&z.l(l),l.forEach(S),i.forEach(S),this.h()},h(){O(r,"class",i=Di.slider__track),Y(r,"height",Kt(t[10].height),!1),Y(r,"border-radius",Kt(t[10].borderRadius),!1),Y(r,"background",t[10].background,!1),Y(r,"box-shadow",t[10].boxShadow||"",!1),O(a,"class",s=Di["slider__active-track"]),Y(a,"left",(100*t[23]).toFixed(2)+"%",!1),Y(a,"width",(100*t[24]).toFixed(2)+"%",!1),Y(a,"height",Kt(t[11].height),!1),Y(a,"border-radius",Kt(t[11].borderRadius),!1),Y(a,"background",t[11].background,!1),Y(a,"box-shadow",t[11].boxShadow||"",!1),O(h,"class",p=Di.slider__thumb),Y(h,"border-radius",Kt(t[8].borderRadius),!1),Y(h,"background",t[8].background,!1),Y(h,"box-shadow",t[8].boxShadow||"",!1),O(m,"type","range"),O(m,"class",v=t[16]?"".concat(Di.slider__input," ").concat(Di.slider__input_secondary):Di.slider__input),O(m,"min",t[4]),O(m,"max",t[5]),O(m,"step","1"),m.value=y=t[16]?t[7]:t[6],O(m,"aria-label",t[19]),O(n,"class",_=Di["slider__tracks-inner"]),O(e,"class",b=Di["slider__tracks-wrapper"])},m(i,l){P(i,e,l),D(e,n),D(n,r),D(n,o),D(n,a),D(n,c);for(let t=0;t<E.length;t+=1)E[t].m(n,null);D(n,d);for(let t=0;t<A.length;t+=1)A[t].m(n,null);D(n,u),D(n,h),V&&V.m(h,null),D(n,f),j&&j.m(n,null),D(n,g),D(n,m),D(n,$),z&&z.m(n,null),t[69](n),w||(x=J(m,"input",t[67]),w=!0)},p(t,e){if(1024&e[0]&&Y(r,"height",Kt(t[10].height),!1),1024&e[0]&&Y(r,"border-radius",Kt(t[10].borderRadius),!1),1024&e[0]&&Y(r,"background",t[10].background,!1),1024&e[0]&&Y(r,"box-shadow",t[10].boxShadow||"",!1),8388608&e[0]&&Y(a,"left",(100*t[23]).toFixed(2)+"%",!1),16777216&e[0]&&Y(a,"width",(100*t[24]).toFixed(2)+"%",!1),2048&e[0]&&Y(a,"height",Kt(t[11].height),!1),2048&e[0]&&Y(a,"border-radius",Kt(t[11].borderRadius),!1),2048&e[0]&&Y(a,"background",t[11].background,!1),2048&e[0]&&Y(a,"box-shadow",t[11].boxShadow||"",!1),131072&e[0]){let r;for(k=t[17],r=0;r<k.length;r+=1){const i=qi(t,k,r);E[r]?E[r].p(i,e):(E[r]=Gi(i),E[r].c(),E[r].m(n,d))}for(;r<E.length;r+=1)E[r].d(1);E.length=k.length}if(262144&e[0]){let r;for(C=t[18],r=0;r<C.length;r+=1){const i=Li(t,C,r);A[r]?A[r].p(i,e):(A[r]=Ki(i),A[r].c(),A[r].m(n,u))}for(;r<A.length;r+=1)A[r].d(1);A.length=C.length}t[12]?V?V.p(t,e):(V=Yi(t),V.c(),V.m(h,null)):V&&(V.d(1),V=null),256&e[0]&&Y(h,"border-radius",Kt(t[8].borderRadius),!1),256&e[0]&&Y(h,"background",t[8].background,!1),256&e[0]&&Y(h,"box-shadow",t[8].boxShadow||"",!1),t[37]&&j.p(t,e),65536&e[0]&&v!==(v=t[16]?"".concat(Di.slider__input," ").concat(Di.slider__input_secondary):Di.slider__input)&&O(m,"class",v),16&e[0]&&O(m,"min",t[4]),32&e[0]&&O(m,"max",t[5]),65728&e[0]&&y!==(y=t[16]?t[7]:t[6])&&(m.value=y),524288&e[0]&&O(m,"aria-label",t[19]),t[37]&&z.p(t,e)},d(n){n&&S(e),F(E,n),F(A,n),V&&V.d(),j&&j.d(),z&&z.d(),t[69](null),w=!1,x()}}}function Qi(t){let e,n,r,i,o=!t[14]&&Hi(t);return{c(){o&&o.c(),e=N()},l(t){o&&o.l(t),e=N()},m(a,l){o&&o.m(a,l),P(a,e,l),n=!0,r||(i=J(window,"resize",t[42]),r=!0)},p(t,n){t[14]?o&&(Et(),Vt(o,1,1,(()=>{o=null})),Ct()):o?(o.p(t,n),16384&n[0]&&At(o,1)):(o=Hi(t),o.c(),At(o,1),o.m(e.parentNode,e))},i(t){n||(At(o),n=!0)},o(t){Vt(o),n=!1},d(t){o&&o.d(t),t&&S(e),r=!1,i()}}}function to(t,e,n,r,i){let o=[];if(i)for(let i=t;i<e;++i)o.push((i-n)/(r-n));else{for(let e=n;e<t;++e)o.push((e-n)/(r-n));for(let t=e;t<r+1;++t)o.push((t-n)/(r-n))}return o}function eo(t,e,r){let i,o,a,l,s,c,d,u,h,g,m,v,y,$,_,b,w,x,k,E,C,A,V,j,D,P,S,F,I,z,T,M,N,J,O=n,B=n,R=n,U=n,W=n,L=n,q=n,H=n,G=n,K=n,Y=n,X=n;var Z,Q,tt,et;t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>X()));let{json:nt={}}=e,{templateContext:it}=e,{origJson:ot}=e,{layoutParams:lt}=e;const st={width:10,height:10,borderRadius:5,background:"#000"},dt=["rounded_rectangle","circle"],ut=["rounded_rectangle"],ht=at(Wt),pt=at(Ae);let ft,gt=!1,mt=0,vt=100;const yt=ht.getJsonWithVars(nt.thumb_value_variable),$t=ht.getJsonWithVars(nt.thumb_secondary_value_variable);let _t=yt&&ht.getVariable(yt,"integer")||Wi("temp","integer",0);f(t,_t,(t=>r(64,M=t)));let bt=$t&&ht.getVariable($t,"integer")||Wi("temp","integer",0);f(t,bt,(t=>r(63,T=t)));let wt,xt,kt,Et=Si(M||0,mt,vt),Ct=Si(T||0,mt,vt),At=st,Vt=At,jt=st,Dt=st,Pt=null,St=null,Ft=kt,It="",zt="",Tt=!1;function Mt(t,e){const n=Number(t.target.value);gt===("first"===e)?(r(7,Ct=n),bt.setValue(n)):(r(6,Et=n),_t.setValue(n))}let Nt=!1;function Jt(){if(!ft)return;const t=vt-mt,e=(null==Pt?void 0:Pt.width)||0,n=(null==St?void 0:St.width)||0;Math.max(e,n)*t>=(null==ft?void 0:ft.clientWidth)?Nt||(ht.logError(Lt(new Error("Slider ticks overlap each other"),{level:"warn"})),Nt=!0):Nt=!1}const Ot=yr(Jt,50);return rt((()=>{Jt()})),t.$$set=t=>{"json"in t&&r(0,nt=t.json),"templateContext"in t&&r(1,it=t.templateContext),"origJson"in t&&r(2,ot=t.origJson),"layoutParams"in t&&r(3,lt=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(36,i=ht.getDerivedFromVars(nt.min_value)),X(),X=p(i,(t=>r(66,J=t)))),1&t.$$.dirty[0]&&(r(35,o=ht.getDerivedFromVars(nt.max_value)),Y(),Y=p(o,(t=>r(65,N=t)))),48&t.$$.dirty[0]|24&t.$$.dirty[2]&&(r(4,mt=we(J,mt)),r(5,vt=we(N,vt)),Jt()),112&t.$$.dirty[0]|4&t.$$.dirty[2]){const t=Si(M||0,mt,vt);t!==Et&&r(6,Et=t)}if(176&t.$$.dirty[0]|2&t.$$.dirty[2]){const t=Si(T||0,mt,vt);t!==Ct&&r(7,Ct=t)}if(1&t.$$.dirty[0]&&(r(34,a=ht.getDerivedFromVars(nt.thumb_style)),K(),K=p(a,(t=>r(62,z=t)))),256&t.$$.dirty[0]|1&t.$$.dirty[2]&&r(8,At=xn(z,dt,At)),1&t.$$.dirty[0]&&(r(33,l=ht.getDerivedFromVars(nt.thumb_secondary_style)),G(),G=p(l,(t=>r(61,I=t)))),256&t.$$.dirty[0]|1073741824&t.$$.dirty[1]&&r(9,Vt=xn(I,dt,At)),1&t.$$.dirty[0]&&(r(32,s=ht.getDerivedFromVars(nt.track_inactive_style)),H(),H=p(s,(t=>r(60,F=t)))),1024&t.$$.dirty[0]|536870912&t.$$.dirty[1]&&r(10,jt=xn(F,ut,jt)),1&t.$$.dirty[0]&&(r(31,c=ht.getDerivedFromVars(nt.track_active_style)),q(),q=p(c,(t=>r(59,S=t)))),2048&t.$$.dirty[0]|268435456&t.$$.dirty[1]&&r(11,Dt=xn(S,ut,Dt)),1&t.$$.dirty[0]&&(r(30,d=ht.getDerivedFromVars(nt.tick_mark_active_style)),L(),L=p(d,(t=>r(58,P=t)))),134217728&t.$$.dirty[1]){let t=xn(P,dt,st);t!==st&&r(47,Pt=t)}if(240&t.$$.dirty[0]|65536&t.$$.dirty[1]&&(Pt?(r(17,wt=$t?to(Math.min(Et,Ct),Math.max(Et,Ct)+1,mt,vt,!0):to(mt,Et,mt,vt,!0)),Jt()):r(17,wt=[])),1&t.$$.dirty[0]&&(r(29,u=ht.getDerivedFromVars(nt.tick_mark_inactive_style)),W(),W=p(u,(t=>r(57,D=t)))),67108864&t.$$.dirty[1]){let t=xn(D,dt,st);t!==st&&r(48,St=t)}if(240&t.$$.dirty[0]|131072&t.$$.dirty[1]&&(St?(r(18,xt=$t?to(Math.min(Et,Ct),Math.max(Et,Ct)+1,mt,vt,!1):to(Et+1,vt+1,mt,vt,!0)),Jt()):r(18,xt=[])),1&t.$$.dirty[0]&&(r(28,h=ht.getDerivedFromVars(nt.thumb_text_style)),U(),U=p(h,(t=>r(56,j=t)))),4096&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(12,kt=Pi(j,kt)),1&t.$$.dirty[0]&&(r(27,g=ht.getDerivedFromVars(nt.thumb_secondary_text_style)),R(),R=p(g,(t=>r(55,V=t)))),4096&t.$$.dirty[0]|16777216&t.$$.dirty[1]&&r(13,Ft=Pi(V,kt)),1&t.$$.dirty[0]&&(r(26,m=ht.getDerivedFromVars(nt.accessibility)),B(),B=p(m,(t=>r(54,A=t)))),8388608&t.$$.dirty[1]&&((null==A?void 0:A.description)?r(19,It=A.description):ht.logError(Lt(new Error('Missing accessibility "description" for slider'),{level:"warn"}))),1&t.$$.dirty[0]&&(r(25,v=ht.getDerivedFromVars(nt.secondary_value_accessibility)),O(),O=p(v,(t=>r(53,C=t)))),4194304&t.$$.dirty[1]&&((null==C?void 0:C.description)?r(20,zt=C.description):$t&&ht.logError(Lt(new Error('Missing second accessibility "description" for slider'),{level:"warn"}))),19712&t.$$.dirty[0]){let t=!1;pt.hasAction()?(ht.logError(Lt(new Error('Cannot show "slider" inside component with action'))),t=!0):At===st?(ht.logError(Lt(new Error('Missing "thumb_style" in slider'))),t=!0):Dt===st?(ht.logError(Lt(new Error('Missing "track_active_style" in slider'))),t=!0):jt===st&&(ht.logError(Lt(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==Tt&&r(14,Tt=t)}768&t.$$.dirty[0]&&r(52,y=Kt(Math.max(...[At.width,Vt.width,0].filter(ge)))),768&t.$$.dirty[0]&&r(51,$=Kt(Math.max(...[At.height,Vt.height,0].filter(ge)))),112&t.$$.dirty[0]&&r(50,_=(Et-mt)/(vt-mt)),176&t.$$.dirty[0]&&r(49,b=$t?(Ct-mt)/(vt-mt):void 0),786432&t.$$.dirty[1]&&r(24,w=void 0!==b?Math.abs(b-_):_),786432&t.$$.dirty[1]&&r(23,x=void 0!==b?Math.min(b,_):0),13056&t.$$.dirty[0]|4190208&t.$$.dirty[1]&&r(22,k={"--divkit-slider-thumb-width":Kt(At.width),"--divkit-slider-thumb-height":Kt(At.height),"--divkit-slider-thumb-secondary-width":Kt(Vt.width),"--divkit-slider-thumb-secondary-height":Kt(Vt.height),"--divkit-slider-text-offset-x":(null===r(43,Z=null==kt?void 0:kt.offset)||void 0===Z?void 0:Z.x)?Yt(kt.offset.x):void 0,"--divkit-slider-text-offset-y":(null===r(44,Q=null==kt?void 0:kt.offset)||void 0===Q?void 0:Q.y)?Yt(kt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===r(45,tt=null==Ft?void 0:Ft.offset)||void 0===tt?void 0:tt.x)?Yt(Ft.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===r(46,et=null==Ft?void 0:Ft.offset)||void 0===et?void 0:et.y)?Yt(Ft.offset.y):void 0,"--divkit-slider-tick-active-width":Pt?Kt(Pt.width):void 0,"--divkit-slider-tick-active-height":Pt?Kt(Pt.height):void 0,"--divkit-slider-tick-active-border-radius":Pt?Kt(Pt.borderRadius):void 0,"--divkit-slider-tick-active-background":(null==Pt?void 0:Pt.background)||void 0,"--divkit-slider-tick-active-box-shadow":(null==Pt?void 0:Pt.boxShadow)||void 0,"--divkit-slider-tick-inactive-width":St?Kt(St.width):void 0,"--divkit-slider-tick-inactive-height":St?Kt(St.height):void 0,"--divkit-slider-tick-inactive-border-radius":St?Kt(St.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==St?void 0:St.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==St?void 0:St.boxShadow)||void 0,"--divkit-slider-max-thumb-width":y,"--divkit-slider-max-thumb-height":$,"--divkit-slider-track-part":_,"--divkit-slider-track-secondary-part":b})},r(21,E={}),[nt,it,ot,lt,mt,vt,Et,Ct,At,Vt,jt,Dt,kt,Ft,Tt,ft,gt,wt,xt,It,zt,E,k,x,w,v,m,g,h,u,d,c,s,l,a,o,i,$t,_t,bt,function(t){var e,n;const i="pageX"in t?t.pageX:null===(n=null===(e=t.changedTouches)||void 0===e?void 0:e[0])||void 0===n?void 0:n.pageX;if(void 0===i)return;const o=ft.getBoundingClientRect(),a=(i-o.left)/o.width,l=(vt-mt)*a,s=Math.round(Si(l,mt,vt));r(16,gt=s<(Et+Ct)/2==Et<Ct)},Mt,Ot,Z,Q,tt,et,Pt,St,b,_,$,y,C,A,V,j,D,P,S,F,I,z,T,M,N,J,t=>Mt(t,"first"),t=>Mt(t,"second"),function(t){ct[t?"unshift":"push"]((()=>{ft=t,r(15,ft)}))}]}const no={input:"divkit-c3a4c",input__wrapper:"divkit-ef7eb",input__holder:"divkit-bb3da",input_multiline:"divkit-e48a3",input__input:"divkit-f11e0","input_highlight-color":"divkit-cc00f","input_vertical-overflow":"divkit-b7075"};function ro(t){let e,n;return e=new Ye({props:{cls:ue("input",no,t[12]),style:t[11],customDescription:!0,customActions:"input",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[lo]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};4096&n[0]&&(r.cls=ue("input",no,t[12])),2048&n[0]&&(r.style=t[11]),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),100208&n[0]|2&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function io(t){let e;return{c(){e=T("")},l(t){e=H(t,"")},m(t,n){P(t,e,n)},d(t){t&&S(e)}}}function oo(t){let e,n,r,i;return{c(){e=I("input"),this.h()},l(t){e=L(t,"INPUT",{type:!0,class:!0,autocomplete:!0,autocapitalize:!0,"aria-label":!0,placeholder:!0}),this.h()},h(){O(e,"type",t[9]),O(e,"class",n=no.input__input),O(e,"autocomplete","off"),O(e,"autocapitalize","off"),O(e,"aria-label",t[10]),O(e,"placeholder",t[15]),e.value=t[8]},m(n,o){P(n,e,o),t[57](e),r||(i=[J(e,"input",t[29]),J(e,"mousedown",(function(){s(t[16]?t[30]:void 0)&&(t[16]?t[30]:void 0).apply(this,arguments)})),J(e,"click",(function(){s(t[16]?t[31]:void 0)&&(t[16]?t[31]:void 0).apply(this,arguments)}))],r=!0)},p(n,r){t=n,512&r[0]&&O(e,"type",t[9]),1024&r[0]&&O(e,"aria-label",t[10]),32768&r[0]&&O(e,"placeholder",t[15]),256&r[0]&&e.value!==t[8]&&(e.value=t[8])},d(n){n&&S(e),t[57](null),r=!1,l(i)}}}function ao(t){let e,n,r,i;return{c(){e=I("textarea"),this.h()},l(t){e=L(t,"TEXTAREA",{class:!0,autocomplete:!0,autocapitalize:!0,"aria-label":!0,placeholder:!0}),R(e).forEach(S),this.h()},h(){O(e,"class",n=no.input__input),O(e,"autocomplete","off"),O(e,"autocapitalize","off"),O(e,"aria-label",t[10]),O(e,"placeholder",t[15]),e.value=t[8]},m(n,o){P(n,e,o),t[56](e),r||(i=[J(e,"input",t[29]),J(e,"mousedown",(function(){s(t[16]?t[30]:void 0)&&(t[16]?t[30]:void 0).apply(this,arguments)})),J(e,"click",(function(){s(t[16]?t[31]:void 0)&&(t[16]?t[31]:void 0).apply(this,arguments)}))],r=!0)},p(n,r){t=n,1024&r[0]&&O(e,"aria-label",t[10]),32768&r[0]&&O(e,"placeholder",t[15]),256&r[0]&&(e.value=t[8])},d(n){n&&S(e),t[56](null),r=!1,l(i)}}}function lo(t){let e,n,r,i,o,a,l=t[8].endsWith("\n")||!t[8],s=l&&io();function c(t,e){return t[4]?ao:oo}let d=c(t),u=d(t);return{c(){e=I("span"),n=I("span"),r=T(t[8]),s&&s.c(),o=M(),u.c(),this.h()},l(i){e=L(i,"SPAN",{class:!0});var a=R(e);n=L(a,"SPAN",{class:!0,"aria-hidden":!0});var l=R(n);r=H(l,t[8]),s&&s.l(l),l.forEach(S),o=G(a),u.l(a),a.forEach(S),this.h()},h(){O(n,"class",i=no.input__holder),O(n,"aria-hidden","true"),O(e,"class",a=no.input__wrapper)},m(i,a){P(i,e,a),D(e,n),D(n,r),s&&s.m(n,null),t[55](n),D(e,o),u.m(e,null)},p(t,i){256&i[0]&&K(r,t[8]),256&i[0]&&(l=t[8].endsWith("\n")||!t[8]),l?s||(s=io(),s.c(),s.m(n,null)):s&&(s.d(1),s=null),d===(d=c(t))&&u?u.p(t,i):(u.d(1),u=d(t),u&&(u.c(),u.m(e,null)))},d(n){n&&S(e),s&&s.d(),t[55](null),u.d()}}}function so(t){let e,n,r=!t[7]&&ro(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[7]?r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct()):r?(r.p(t,n),128&n[0]&&At(r,1)):(r=ro(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function co(t,e,r){let i,o,a,l,s,c,d,u,h,g,m,v,y,$,_,b,w,x,k,E,C=n,A=n;t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>A()));let{json:V={}}=e,{templateContext:j}=e,{origJson:D}=e,{layoutParams:P}=e;const S=at(Wt);let F,I,z=!1,T=!1;const M=S.getJsonWithVars(V.text_variable);let N=!1;M||(N=!0,S.logError(Lt(new Error('Missing "text_variable" in "input"'))));let J=M&&S.getVariable(M,"string")||Wi("temp","string","");f(t,J,(t=>r(54,k=t)));let O="";const B=S.getDerivedFromVars(V.hint_text);f(t,B,(t=>r(53,x=t)));const R=S.getDerivedFromVars(V.hint_color);f(t,R,(t=>r(52,w=t)));let U="";const W=S.getDerivedFromVars(V.font_size);f(t,W,(t=>r(51,b=t)));let L=12;const q=S.getDerivedFromVars(V.font_weight);let H;f(t,q,(t=>r(50,_=t)));const G=S.getDerivedFromVars(V.line_height);let K;f(t,G,(t=>r(49,$=t)));const Y=S.getDerivedFromVars(V.letter_spacing);f(t,Y,(t=>r(48,y=t)));let X="";const Z=S.getDerivedFromVars(V.text_color);f(t,Z,(t=>r(47,v=t)));let Q="#000";const tt=S.getDerivedFromVars(V.highlight_color);f(t,tt,(t=>r(46,m=t)));let et="";const nt=S.getDerivedFromVars(V.keyboard_type);f(t,nt,(t=>r(45,g=t)));const it={email:"email",number:"number",phone:"tel",single_line_text:"text",multi_line_text:"text",uri:"url"};let ot="multi_line_text",lt="text";const st=S.getDerivedFromVars(V.max_visible_lines);f(t,st,(t=>r(44,h=t)));let dt="",ut="";const ht=S.getDerivedFromVars(V.select_all_on_focus);function pt(){r(32,T=I.scrollHeight>I.offsetHeight)}return f(t,ht,(t=>r(16,E=t))),rt((()=>{pt()})),t.$$set=t=>{"json"in t&&r(0,V=t.json),"templateContext"in t&&r(1,j=t.templateContext),"origJson"in t&&r(2,D=t.origJson),"layoutParams"in t&&r(3,P=t.layoutParams)},t.$$.update=()=>{if(8388608&t.$$.dirty[1]&&r(8,O=k),4194304&t.$$.dirty[1]&&r(15,i=x),2097156&t.$$.dirty[1]&&r(33,U=Zt(w,1,U)),1048584&t.$$.dirty[1]&&r(34,L=Ze(b,L)),524304&t.$$.dirty[1]&&r(35,H=tn(_,H)),262152&t.$$.dirty[1]){const t=$;Ie(t)&&r(36,K=t/L)}131080&t.$$.dirty[1]&&fe(y)&&r(37,X=Kt(y/L*10)),65664&t.$$.dirty[1]&&r(38,Q=Zt(v,1,Q)),33024&t.$$.dirty[1]&&r(39,et=Zt(m,1,et)),16384&t.$$.dirty[1]&&g&&g in it&&(r(9,lt=it[g]),r(40,ot=g)),512&t.$$.dirty[1]&&r(4,o="multi_line_text"===ot),1&t.$$.dirty[0]&&(r(14,a=S.getDerivedFromVars(V.paddings)),A(),A=p(a,(t=>r(43,u=t)))),12320&t.$$.dirty[1]&&Ie(h)&&r(41,dt="calc(".concat(h*(K||1.25)+"em"," + ").concat(Yt(ve(null==u?void 0:u.top,0)+ve(null==u?void 0:u.bottom,0)),")")),1&t.$$.dirty[0]&&(r(13,l=S.getDerivedFromVars(V.accessibility)),C(),C=p(l,(t=>r(42,d=t)))),2048&t.$$.dirty[1]&&((null==d?void 0:d.description)?r(10,ut=d.description):S.logError(Lt(new Error('Missing accessibility "description" for input'),{level:"warn"}))),16&t.$$.dirty[0]|258&t.$$.dirty[1]&&r(12,s={"highlight-color":Boolean(et),"vertical-overflow":T,multiline:o}),1532&t.$$.dirty[1]&&r(11,c={"--divkit-input-hint-color":U,"--divkit-input-highlight-color":et,"font-size":Kt(L),"font-weight":H,"line-height":K,"letter-spacing":X,color:Q,"max-height":dt})},[V,j,D,P,o,F,I,N,O,lt,ut,c,s,l,a,i,E,J,B,R,W,q,G,Y,Z,tt,nt,st,ht,function(t){const e=t.target.value||"";J.setValue(e),pt()},function(){z=!1,setTimeout((()=>{z=!0}),250)},function(){z||F.select()},T,U,L,H,K,X,Q,et,ot,dt,d,u,h,g,m,v,y,$,_,b,w,x,k,function(t){ct[t?"unshift":"push"]((()=>{I=t,r(6,I)}))},function(t){ct[t?"unshift":"push"]((()=>{F=t,r(5,F)}))},function(t){ct[t?"unshift":"push"]((()=>{F=t,r(5,F)}))}]}const uo={text:class extends Ot{constructor(t){super(),Jt(this,t,bn,_n,u,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},container:class extends Ot{constructor(t){super(),Jt(this,t,Rn,Bn,u,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},separator:class extends Ot{constructor(t){super(),Jt(this,t,Gn,Hn,u,{json:0,templateContext:1,origJson:2,layoutParams:3})}},image:or,gif:or,grid:class extends Ot{constructor(t){super(),Jt(this,t,gr,fr,u,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},gallery:class extends Ot{constructor(t){super(),Jt(this,t,Dr,jr,u,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},tabs:class extends Ot{constructor(t){super(),Jt(this,t,Ur,Rr,u,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},state:class extends Ot{constructor(t){super(),Jt(this,t,fi,hi,u,{json:0,templateContext:1,origJson:2,layoutParams:3})}},pager:class extends Ot{constructor(t){super(),Jt(this,t,wi,bi,u,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},indicator:class extends Ot{constructor(t){super(),Jt(this,t,ji,Vi,u,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},slider:class extends Ot{constructor(t){super(),Jt(this,t,eo,Qi,u,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},input:class extends Ot{constructor(t){super(),Jt(this,t,co,so,u,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}}};function ho(t){let e,n,r;var i=t[5];function o(t){return{props:{json:t[3],templateContext:t[4],layoutParams:t[2],origJson:t[1]||t[0]}}}return i&&(e=new i(o(t))),{c(){e&&zt(e.$$.fragment),n=N()},l(t){e&&Tt(e.$$.fragment,t),n=N()},m(t,i){e&&Mt(e,t,i),P(t,n,i),r=!0},p(t,r){const a={};if(8&r&&(a.json=t[3]),16&r&&(a.templateContext=t[4]),4&r&&(a.layoutParams=t[2]),3&r&&(a.origJson=t[1]||t[0]),i!==(i=t[5])){if(e){Et();const t=e;Vt(t.$$.fragment,1,0,(()=>{Nt(t,1)})),Ct()}i?(e=new i(o(t)),zt(e.$$.fragment),At(e.$$.fragment,1),Mt(e,n.parentNode,n)):e=null}else i&&e.$set(a)},i(t){r||(e&&At(e.$$.fragment,t),r=!0)},o(t){e&&Vt(e.$$.fragment,t),r=!1},d(t){t&&S(n),e&&Nt(e,t)}}}function po(t){let e,n,r=t[5]&&ho(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){let[i]=n;t[5]?r?(r.p(t,i),32&i&&At(r,1)):(r=ho(t),r.c(),At(r,1),r.m(e.parentNode,e)):r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct())},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function fo(t,e,n){let{div:r}=e,{templateContext:i}=e,{origJson:o}=e,{layoutParams:a}=e;const l=at(Wt);let s,c,d;return t.$$set=t=>{"div"in t&&n(0,r=t.div),"templateContext"in t&&n(6,i=t.templateContext),"origJson"in t&&n(1,o=t.origJson),"layoutParams"in t&&n(2,a=t.layoutParams)},t.$$.update=()=>{if(121&t.$$.dirty&&(n(3,s=r),n(4,c=i),n(5,d=s&&uo[s.type]||void 0),!d&&(n(4,({templateContext:c,json:s}=l.processTemplate(s,c)),c,(n(3,s),n(0,r),n(6,i),n(5,d),n(4,c))),n(5,d=s&&uo[s.type]||void 0),!d))){let t;t=(null==s?void 0:s.type)&&l.hasTemplate(s.type)?"Recursive template":"Unknown component",l.logError(Lt(new Error(t),{additional:{component:(null==s?void 0:s.type)||"<missing>"}}))}},[r,o,a,s,c,d,i]}const go=class extends Ot{constructor(t){super(),Jt(this,t,fo,po,u,{div:0,templateContext:6,origJson:1,layoutParams:2})}};function mo(t,e,n){const r=t.slice();r[1]=e[n];const i=r[1].split(":");return r[2]=i[0],r[3]=i[1],r}function vo(t){let e,n,r,i=[...Object.keys(t[0])],o=[];for(let e=0;e<i.length;e+=1)o[e]=bo(mo(t,i,e));return{c(){e=z("svg"),n=z("defs");for(let t=0;t<o.length;t+=1)o[t].c();this.h()},l(t){e=q(t,"svg",{class:!0,"aria-hidden":!0});var r=R(e);n=q(r,"defs",{});var i=R(n);for(let t=0;t<o.length;t+=1)o[t].l(i);i.forEach(S),r.forEach(S),this.h()},h(){O(e,"class",r="divkit-dc22b"),O(e,"aria-hidden","true")},m(t,r){P(t,e,r),D(e,n);for(let t=0;t<o.length;t+=1)o[t].m(n,null)},p(t,e){if(1&e){let r;for(i=[...Object.keys(t[0])],r=0;r<i.length;r+=1){const a=mo(t,i,r);o[r]?o[r].p(a,e):(o[r]=bo(a),o[r].c(),o[r].m(n,null))}for(;r<o.length;r+=1)o[r].d(1);o.length=i.length}},d(t){t&&S(e),F(o,t)}}}function yo(t){let e,n;return{c(){e=z("feBlend"),this.h()},l(t){e=q(t,"feBlend",{in2:!0,mode:!0}),R(e).forEach(S),this.h()},h(){O(e,"in2","SourceGraphic"),O(e,"mode",n=t[3])},m(t,n){P(t,e,n)},p(t,r){1&r&&n!==(n=t[3])&&O(e,"mode",n)},d(t){t&&S(e)}}}function $o(t){let e;return{c(){e=z("feComposite"),this.h()},l(t){e=q(t,"feComposite",{in2:!0,operator:!0,k1:!0,k2:!0,k3:!0,k4:!0}),R(e).forEach(S),this.h()},h(){O(e,"in2","SourceGraphic"),O(e,"operator","arithmetic"),O(e,"k1","1"),O(e,"k2","0"),O(e,"k3","0"),O(e,"k4","0")},m(t,n){P(t,e,n)},p:n,d(t){t&&S(e)}}}function _o(t){let e,n;return{c(){e=z("feComposite"),this.h()},l(t){e=q(t,"feComposite",{in2:!0,operator:!0}),R(e).forEach(S),this.h()},h(){O(e,"in2","SourceGraphic"),O(e,"operator",n=t[3].split("_")[1])},m(t,n){P(t,e,n)},p(t,r){1&r&&n!==(n=t[3].split("_")[1])&&O(e,"operator",n)},d(t){t&&S(e)}}}function bo(t){let e,n,r,i;function o(t,e){return"source_in"===t[3]||"source_atop"===t[3]?_o:"multiply"===t[3]?$o:yo}let a=o(t),l=a(t);return{c(){e=z("filter"),n=z("feFlood"),l.c(),this.h()},l(t){e=q(t,"filter",{id:!0});var r=R(e);n=q(r,"feFlood",{"flood-color":!0}),R(n).forEach(S),l.l(r),r.forEach(S),this.h()},h(){O(n,"flood-color",r=t[2]),O(e,"id",i=t[0][t[1]])},m(t,r){P(t,e,r),D(e,n),l.m(e,null)},p(t,s){1&s&&r!==(r=t[2])&&O(n,"flood-color",r),a===(a=o(t))&&l?l.p(t,s):(l.d(1),l=a(t),l&&(l.c(),l.m(e,null))),1&s&&i!==(i=t[0][t[1]])&&O(e,"id",i)},d(t){t&&S(e),l.d()}}}function wo(t){let e,r=Object.keys(t[0]).length,i=r&&vo(t);return{c(){i&&i.c(),e=N()},l(t){i&&i.l(t),e=N()},m(t,n){i&&i.m(t,n),P(t,e,n)},p(t,n){let[o]=n;1&o&&(r=Object.keys(t[0]).length),r?i?i.p(t,o):(i=vo(t),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},i:n,o:n,d(t){i&&i.d(t),t&&S(e)}}}function xo(t,e,n){let{svgFiltersMap:r}=e;return t.$$set=t=>{"svgFiltersMap"in t&&n(0,r=t.svgFiltersMap)},[r]}const ko=class extends Ot{constructor(t){super(),Jt(this,t,xo,wo,u,{svgFiltersMap:0})}};function Eo(t,e,n,r){const i=n[t.type];if(!i)return r(Lt(new Error("No such template"),{additional:{template:t.type}})),{json:t,templateContext:e};let o;const a={};for(o in e)e.hasOwnProperty(o)&&(a[o]=e[o]);for(o in t)"type"!==o&&"__proto__"!==o&&t.hasOwnProperty(o)&&(a[o]=t[o]);const l=function e(n,i){const o=Object.keys(i).filter((t=>"__proto__"!==t)),l=o.filter((t=>"$"!==t.charAt(0))),s=o.filter((t=>"$"===t.charAt(0)));return l.forEach((t=>{const r=i[t];"object"==typeof r&&null!==r?(n[t]=Array.isArray(r)?[]:{},e(n[t],r)):n[t]=r})),s.forEach((e=>{const o=i[e],l=a[o];if(void 0!==l){const t=e.substring(1);n[t]=l}else r(Lt(new Error("Missing template field"),{level:"warn",additional:{key:e,template:t.type}}))})),n}({},i);for(o in t)"type"!==o&&"__proto__"!==o&&t.hasOwnProperty(o)&&(l[o]=t[o]);return{json:l,templateContext:a}}function Co(){}function Ao(t){return{subscribe:e=>(e(t),Co)}}function Vo(t,e){return e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t)}function jo(t,e){return e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t)}function Do(t){if(t.every((t=>"string"==typeof t)))return{type:"StringLiteral",value:t.join("")};let e=t.reduce(((t,e)=>("string"==typeof e&&"string"==typeof t[t.length-1]?t[t.length-1]+=e:t.push(e),t)),[]).reduce(((t,e)=>("string"==typeof e?t.quasis.push({type:"StringLiteral",value:e}):(t.quasis.length===t.expressions.length&&t.quasis.push({type:"StringLiteral",value:""}),t.expressions.push(e)),t)),{type:"TemplateLiteral",quasis:[],expressions:[]});return e.quasis.length===e.expressions.length&&e.quasis.push({type:"StringLiteral",value:""}),e}function Po(t){var e=parseInt(t,10);if(e>2147483647||e<Fi)throw new Error("Value ".concat(t," can't be converted to Integer type."));return e}function So(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function Fo(t,e,n,r){var i=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(i,Fo.prototype),i.expected=e,i.found=n,i.location=r,i.name="SyntaxError",i}function Io(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,t+(n+=n.repeat(e)).slice(0,e))}function zo(t,e){var n,r={},i=(e=void 0!==e?e:{}).grammarSource,o={start:jt,JsonStringContents:function(){var t,e,n;for(t=mt,e=[],n=Dt();n!==r;)e.push(n),n=Dt();return vt=t,e=gt(e)}},a=jt,l="@{",s="}",c="@{}",d="\\",u="||",h="&&",p="==",f="!=",g=">=",m="<=",v="+",y="-",$="true",_="false",b=/^[^}]/,w=/^[^'}]/,x=/^[0-9]/,k=/^[a-zA-Z_0-9.]/,E=/^[a-zA-Z_]/,C=/^[ \t\r\n]/,A=xt("@{",!1),V=xt("}",!1),j=xt("@{}",!1),D=xt("\\",!1),P={type:"any"},S=kt(["}"],!0,!1),F=xt("?",!1),I=xt(":",!1),z=xt("||",!1),T=xt("&&",!1),M=xt("==",!1),N=xt("!=",!1),J=xt(">=",!1),O=xt(">",!1),B=xt("<=",!1),R=xt("<",!1),U=xt("+",!1),W=xt("-",!1),L=xt("/",!1),q=xt("*",!1),H=xt("%",!1),G=xt("!",!1),K=xt("(",!1),Y=xt(")",!1),X=xt(",",!1),Z=Et("string"),Q=xt("'",!1),tt=kt(["'","}"],!0,!1),et=Et("integer"),nt=kt([["0","9"]],!1,!1),rt=Et("number"),it=xt(".",!1),ot=xt("e",!1),at=xt("E",!1),lt=Et("boolean"),st=xt("true",!1),ct=xt("false",!1),dt=kt([["a","z"],["A","Z"],"_",["0","9"],"."],!1,!1),ut=Et("identifier"),ht=kt([["a","z"],["A","Z"],"_"],!1,!1),pt=Et("whitespace"),ft=kt([" ","\t","\r","\n"],!1,!1),gt=function(t){return Do(t)},mt=0,vt=0,yt=[{line:1,column:1}],$t=0,_t=[],bt=0;if("startRule"in e){if(!(e.startRule in o))throw new Error("Can't start parsing from rule \""+e.startRule+'".');a=o[e.startRule]}function wt(){return t.substring(vt,mt)}function xt(t,e){return{type:"literal",text:t,ignoreCase:e}}function kt(t,e,n){return{type:"class",parts:t,inverted:e,ignoreCase:n}}function Et(t){return{type:"other",description:t}}function Ct(e){var n,r=yt[e];if(r)return r;for(n=e-1;!yt[n];)n--;for(r={line:(r=yt[n]).line,column:r.column};n<e;)10===t.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return yt[e]=r,r}function At(t,e){var n=Ct(t),r=Ct(e);return{source:i,start:{offset:t,line:n.line,column:n.column},end:{offset:e,line:r.line,column:r.column}}}function Vt(t){mt<$t||(mt>$t&&($t=mt,_t=[]),_t.push(t))}function jt(){var t,e;return t=mt,Ut(),(e=Pt())!==r?(Ut(),vt=t,t=e):(mt=t,t=r),t}function Dt(){var e,n,i,o,a;if(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&Vt(A)),n!==r?(i=Ut(),(o=Pt())!==r?(Ut(),125===t.charCodeAt(mt)?(a=s,mt++):(a=r,0===bt&&Vt(V)),a!==r?(vt=e,e=o):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,t.substr(mt,3)===c?(n=c,mt+=3):(n=r,0===bt&&Vt(j)),n!==r&&(vt=e,n=""),(e=n)===r&&(e=mt,n=mt,bt++,92===t.charCodeAt(mt)?(i=d,mt++):(i=r,0===bt&&Vt(D)),i===r&&(t.substr(mt,2)===l?(i=l,mt+=2):(i=r,0===bt&&Vt(A))),bt--,i===r?n=void 0:(mt=n,n=r),n!==r?(t.length>mt?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(P)),i!==r?(vt=e,e=wt()):(mt=e,e=r)):(mt=e,e=r),e===r))){if(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&Vt(A)),n!==r){if(i=[],b.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(S)),o!==r)for(;o!==r;)i.push(o),b.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(S));else i=r;i!==r?(125===t.charCodeAt(mt)?(o=s,mt++):(o=r,0===bt&&Vt(V)),o!==r?(vt=e,e=function(){throw new Error("Error tokenizing '"+t+"'.")}()):(mt=e,e=r)):(mt=e,e=r)}else mt=e,e=r;e===r&&(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&Vt(A)),n!==r&&(vt=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),(e=n)===r&&(e=mt,92===t.charCodeAt(mt)?(n=d,mt++):(n=r,0===bt&&Vt(D)),n!==r?(t.substr(mt,2)===l?(i=l,mt+=2):(i=r,0===bt&&Vt(A)),i!==r?(vt=e,e=i):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=d,mt++):(n=r,0===bt&&Vt(D)),n!==r?(t.length>mt?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(P)),i!==r?(vt=e,e=So(i)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=d,mt++):(n=r,0===bt&&Vt(D)),n!==r&&(vt=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=n))))}return e}function Pt(){var e,n,i,o,a,l;return e=mt,(n=St())!==r?(Ut(),63===t.charCodeAt(mt)?(i="?",mt++):(i=r,0===bt&&Vt(F)),i!==r?(Ut(),(o=Pt())!==r?(Ut(),58===t.charCodeAt(mt)?(a=":",mt++):(a=r,0===bt&&Vt(I)),a!==r?(Ut(),(l=Pt())!==r?(vt=e,e={type:"ConditionalExpression",test:n,consequent:o,alternate:l}):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=St()),e}function St(){var e,n,i,o,a,l,s,c;if(e=mt,(n=Ft())!==r){for(i=[],o=mt,a=Ut(),t.substr(mt,2)===u?(l=u,mt+=2):(l=r,0===bt&&Vt(z)),l!==r?(s=Ut(),(c=Ft())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);o!==r;)i.push(o),o=mt,a=Ut(),t.substr(mt,2)===u?(l=u,mt+=2):(l=r,0===bt&&Vt(z)),l!==r?(s=Ut(),(c=Ft())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);vt=e,e=jo(n,i)}else mt=e,e=r;return e}function Ft(){var e,n,i,o,a,l,s,c;if(e=mt,(n=It())!==r){for(i=[],o=mt,a=Ut(),t.substr(mt,2)===h?(l=h,mt+=2):(l=r,0===bt&&Vt(T)),l!==r?(s=Ut(),(c=It())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);o!==r;)i.push(o),o=mt,a=Ut(),t.substr(mt,2)===h?(l=h,mt+=2):(l=r,0===bt&&Vt(T)),l!==r?(s=Ut(),(c=It())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);vt=e,e=jo(n,i)}else mt=e,e=r;return e}function It(){var e,n,i,o,a,l,s,c;if(e=mt,(n=zt())!==r){for(i=[],o=mt,a=Ut(),t.substr(mt,2)===p?(l=p,mt+=2):(l=r,0===bt&&Vt(M)),l===r&&(t.substr(mt,2)===f?(l=f,mt+=2):(l=r,0===bt&&Vt(N))),l!==r?(s=Ut(),(c=zt())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);o!==r;)i.push(o),o=mt,a=Ut(),t.substr(mt,2)===p?(l=p,mt+=2):(l=r,0===bt&&Vt(M)),l===r&&(t.substr(mt,2)===f?(l=f,mt+=2):(l=r,0===bt&&Vt(N))),l!==r?(s=Ut(),(c=zt())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);vt=e,e=Vo(n,i)}else mt=e,e=r;return e}function zt(){var e,n,i,o,a,l,s,c;if(e=mt,(n=Tt())!==r){for(i=[],o=mt,a=Ut(),t.substr(mt,2)===g?(l=g,mt+=2):(l=r,0===bt&&Vt(J)),l===r&&(62===t.charCodeAt(mt)?(l=">",mt++):(l=r,0===bt&&Vt(O)),l===r&&(t.substr(mt,2)===m?(l=m,mt+=2):(l=r,0===bt&&Vt(B)),l===r&&(60===t.charCodeAt(mt)?(l="<",mt++):(l=r,0===bt&&Vt(R))))),l!==r?(s=Ut(),(c=Tt())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);o!==r;)i.push(o),o=mt,a=Ut(),t.substr(mt,2)===g?(l=g,mt+=2):(l=r,0===bt&&Vt(J)),l===r&&(62===t.charCodeAt(mt)?(l=">",mt++):(l=r,0===bt&&Vt(O)),l===r&&(t.substr(mt,2)===m?(l=m,mt+=2):(l=r,0===bt&&Vt(B)),l===r&&(60===t.charCodeAt(mt)?(l="<",mt++):(l=r,0===bt&&Vt(R))))),l!==r?(s=Ut(),(c=Tt())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);vt=e,e=Vo(n,i)}else mt=e,e=r;return e}function Tt(){var e,n,i,o,a,l,s,c;if(e=mt,(n=Mt())!==r){for(i=[],o=mt,a=Ut(),43===t.charCodeAt(mt)?(l=v,mt++):(l=r,0===bt&&Vt(U)),l===r&&(45===t.charCodeAt(mt)?(l=y,mt++):(l=r,0===bt&&Vt(W))),l!==r?(s=Ut(),(c=Mt())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);o!==r;)i.push(o),o=mt,a=Ut(),43===t.charCodeAt(mt)?(l=v,mt++):(l=r,0===bt&&Vt(U)),l===r&&(45===t.charCodeAt(mt)?(l=y,mt++):(l=r,0===bt&&Vt(W))),l!==r?(s=Ut(),(c=Mt())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);vt=e,e=Vo(n,i)}else mt=e,e=r;return e}function Mt(){var e,n,i,o,a,l,s,c;if(e=mt,(n=Nt())!==r){for(i=[],o=mt,a=Ut(),47===t.charCodeAt(mt)?(l="/",mt++):(l=r,0===bt&&Vt(L)),l===r&&(42===t.charCodeAt(mt)?(l="*",mt++):(l=r,0===bt&&Vt(q)),l===r&&(37===t.charCodeAt(mt)?(l="%",mt++):(l=r,0===bt&&Vt(H)))),l!==r?(s=Ut(),(c=Nt())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);o!==r;)i.push(o),o=mt,a=Ut(),47===t.charCodeAt(mt)?(l="/",mt++):(l=r,0===bt&&Vt(L)),l===r&&(42===t.charCodeAt(mt)?(l="*",mt++):(l=r,0===bt&&Vt(q)),l===r&&(37===t.charCodeAt(mt)?(l="%",mt++):(l=r,0===bt&&Vt(H)))),l!==r?(s=Ut(),(c=Nt())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);vt=e,e=Vo(n,i)}else mt=e,e=r;return e}function Nt(){var e,n,i;return(e=Bt())===r&&(e=Ot())===r&&(e=mt,33===t.charCodeAt(mt)?(n="!",mt++):(n=r,0===bt&&Vt(G)),n===r&&(43===t.charCodeAt(mt)?(n=v,mt++):(n=r,0===bt&&Vt(U)),n===r&&(45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===bt&&Vt(W)))),n!==r?(Ut(),(i=Nt())!==r?(vt=e,e={type:"UnaryExpression",operator:n,argument:i}):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=function(){var e,n,i,o,a;return e=mt,(n=Rt())!==r?(Ut(),40===t.charCodeAt(mt)?(i="(",mt++):(i=r,0===bt&&Vt(K)),i!==r?(Ut(),o=function(){var e,n,i,o,a,l,s;if(e=mt,(n=Pt())!==r){for(i=[],o=mt,Ut(),44===t.charCodeAt(mt)?(a=",",mt++):(a=r,0===bt&&Vt(X)),a!==r?(Ut(),(l=Pt())!==r?o=l:(mt=o,o=r)):(mt=o,o=r);o!==r;)i.push(o),o=mt,Ut(),44===t.charCodeAt(mt)?(a=",",mt++):(a=r,0===bt&&Vt(X)),a!==r?(Ut(),(l=Pt())!==r?o=l:(mt=o,o=r)):(mt=o,o=r);vt=e,s=i,e=[n,...s]}else mt=e,e=r;return e===r&&(e=Ut()),e}(),o!==r?(Ut(),41===t.charCodeAt(mt)?(a=")",mt++):(a=r,0===bt&&Vt(Y)),a!==r?(vt=e,e={type:"CallExpression",callee:n,arguments:o}):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,(n=Rt())!==r&&(vt=e,n={type:"Variable",id:n}),(e=n)===r&&(e=function(){var e,n,i,o;return e=function(){var e,n,i,o;return bt++,e=mt,39===t.charCodeAt(mt)?(n="'",mt++):(n=r,0===bt&&Vt(Q)),n!==r?(i=function(){var t,e,n;for(t=mt,e=[],n=Jt();n!==r;)e.push(n),n=Jt();return vt=t,e=Do(e)}(),39===t.charCodeAt(mt)?(o="'",mt++):(o=r,0===bt&&Vt(Q)),o!==r?(vt=e,e=i):(mt=e,e=r)):(mt=e,e=r),bt--,e===r&&(n=r,0===bt&&Vt(Z)),e}(),e===r&&(e=Bt())===r&&(e=Ot())===r&&(e=function(){var e,n;return bt++,e=mt,t.substr(mt,4)===$?(n=$,mt+=4):(n=r,0===bt&&Vt(st)),n!==r&&(vt=e,n={type:"BooleanLiteral",value:!0}),(e=n)===r&&(e=mt,t.substr(mt,5)===_?(n=_,mt+=5):(n=r,0===bt&&Vt(ct)),n!==r&&(vt=e,n={type:"BooleanLiteral",value:!1}),e=n),bt--,e===r&&(n=r,0===bt&&Vt(lt)),e}(),e===r&&(e=mt,40===t.charCodeAt(mt)?(n="(",mt++):(n=r,0===bt&&Vt(K)),n!==r&&(i=Pt())!==r?(41===t.charCodeAt(mt)?(o=")",mt++):(o=r,0===bt&&Vt(Y)),o!==r?(vt=e,e=i):(mt=e,e=r)):(mt=e,e=r))),e}())),e}())),e}function Jt(){var e,n,i,o,a;if(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&Vt(A)),n!==r?(i=Ut(),(o=Pt())!==r?(Ut(),125===t.charCodeAt(mt)?(a=s,mt++):(a=r,0===bt&&Vt(V)),a!==r?(vt=e,e=o):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,t.substr(mt,3)===c?(n=c,mt+=3):(n=r,0===bt&&Vt(j)),n!==r&&(vt=e,n=""),(e=n)===r&&(e=mt,n=mt,bt++,92===t.charCodeAt(mt)?(i=d,mt++):(i=r,0===bt&&Vt(D)),i===r&&(39===t.charCodeAt(mt)?(i="'",mt++):(i=r,0===bt&&Vt(Q)),i===r&&(t.substr(mt,2)===l?(i=l,mt+=2):(i=r,0===bt&&Vt(A)))),bt--,i===r?n=void 0:(mt=n,n=r),n!==r?(t.length>mt?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(P)),i!==r?(vt=e,e=wt()):(mt=e,e=r)):(mt=e,e=r),e===r))){if(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&Vt(A)),n!==r){if(i=[],w.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(tt)),o!==r)for(;o!==r;)i.push(o),w.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(tt));else i=r;i!==r?(125===t.charCodeAt(mt)?(o=s,mt++):(o=r,0===bt&&Vt(V)),o!==r?(vt=e,e=function(){throw new Error("Error tokenizing '"+t+"'.")}()):(mt=e,e=r)):(mt=e,e=r)}else mt=e,e=r;e===r&&(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&Vt(A)),n!==r&&(vt=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),(e=n)===r&&(e=mt,92===t.charCodeAt(mt)?(n=d,mt++):(n=r,0===bt&&Vt(D)),n!==r?(t.substr(mt,2)===l?(i=l,mt+=2):(i=r,0===bt&&Vt(A)),i!==r?(vt=e,e=i):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=d,mt++):(n=r,0===bt&&Vt(D)),n!==r?(t.length>mt?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(P)),i!==r?(vt=e,e=So(i)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=d,mt++):(n=r,0===bt&&Vt(D)),n!==r&&(vt=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=n))))}return e}function Ot(){var e,n,i,o;if(bt++,e=mt,45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===bt&&Vt(W)),n===r&&(n=null),i=[],x.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(nt)),o!==r)for(;o!==r;)i.push(o),x.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(nt));else i=r;return i!==r?(vt=e,e={type:"IntegerLiteral",value:Po(wt())}):(mt=e,e=r),bt--,e===r&&(n=r,0===bt&&Vt(et)),e}function Bt(){var e,n,i,o,a,l,s,c,d,u;for(bt++,e=mt,45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===bt&&Vt(W)),n===r&&(n=null),i=[],x.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(nt));o!==r;)i.push(o),x.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(nt));if(46===t.charCodeAt(mt)?(o=".",mt++):(o=r,0===bt&&Vt(it)),o!==r){if(a=[],x.test(t.charAt(mt))?(l=t.charAt(mt),mt++):(l=r,0===bt&&Vt(nt)),l!==r)for(;l!==r;)a.push(l),x.test(t.charAt(mt))?(l=t.charAt(mt),mt++):(l=r,0===bt&&Vt(nt));else a=r;if(a!==r){if(l=mt,101===t.charCodeAt(mt)?(s="e",mt++):(s=r,0===bt&&Vt(ot)),s===r&&(69===t.charCodeAt(mt)?(s="E",mt++):(s=r,0===bt&&Vt(at))),s!==r){if(43===t.charCodeAt(mt)?(c=v,mt++):(c=r,0===bt&&Vt(U)),c===r&&(45===t.charCodeAt(mt)?(c=y,mt++):(c=r,0===bt&&Vt(W))),c===r&&(c=null),d=[],x.test(t.charAt(mt))?(u=t.charAt(mt),mt++):(u=r,0===bt&&Vt(nt)),u!==r)for(;u!==r;)d.push(u),x.test(t.charAt(mt))?(u=t.charAt(mt),mt++):(u=r,0===bt&&Vt(nt));else d=r;d!==r?l=s=[s,c,d]:(mt=l,l=r)}else mt=l,l=r;l===r&&(l=null),vt=e,e={type:"NumberLiteral",value:parseFloat(wt())}}else mt=e,e=r}else mt=e,e=r;if(e===r){if(e=mt,45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===bt&&Vt(W)),n===r&&(n=null),i=[],x.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(nt)),o!==r)for(;o!==r;)i.push(o),x.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(nt));else i=r;if(i!==r)if(101===t.charCodeAt(mt)?(o="e",mt++):(o=r,0===bt&&Vt(ot)),o===r&&(69===t.charCodeAt(mt)?(o="E",mt++):(o=r,0===bt&&Vt(at))),o!==r){if(43===t.charCodeAt(mt)?(a=v,mt++):(a=r,0===bt&&Vt(U)),a===r&&(45===t.charCodeAt(mt)?(a=y,mt++):(a=r,0===bt&&Vt(W))),a===r&&(a=null),l=[],x.test(t.charAt(mt))?(s=t.charAt(mt),mt++):(s=r,0===bt&&Vt(nt)),s!==r)for(;s!==r;)l.push(s),x.test(t.charAt(mt))?(s=t.charAt(mt),mt++):(s=r,0===bt&&Vt(nt));else l=r;l!==r?(vt=e,e={type:"NumberLiteral",value:parseFloat(wt())}):(mt=e,e=r)}else mt=e,e=r;else mt=e,e=r}return bt--,e===r&&(n=r,0===bt&&Vt(rt)),e}function Rt(){var e,n,i,o,a;if(bt++,e=mt,n=mt,bt++,i=function(){var e,n,i,o;return e=mt,t.substr(mt,4)===$?(n=$,mt+=4):(n=r,0===bt&&Vt(st)),n===r&&(t.substr(mt,5)===_?(n=_,mt+=5):(n=r,0===bt&&Vt(ct))),n!==r?(i=mt,bt++,k.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(dt)),bt--,o===r?i=void 0:(mt=i,i=r),i!==r?e=n=[n,i]:(mt=e,e=r)):(mt=e,e=r),e}(),bt--,i===r?n=void 0:(mt=n,n=r),n!==r)if(E.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(ht)),i!==r){for(o=[],k.test(t.charAt(mt))?(a=t.charAt(mt),mt++):(a=r,0===bt&&Vt(dt));a!==r;)o.push(a),k.test(t.charAt(mt))?(a=t.charAt(mt),mt++):(a=r,0===bt&&Vt(dt));vt=e,e={type:"Identifier",name:wt()}}else mt=e,e=r;else mt=e,e=r;return bt--,e===r&&(n=r,0===bt&&Vt(ut)),e}function Ut(){var e,n;for(bt++,e=[],C.test(t.charAt(mt))?(n=t.charAt(mt),mt++):(n=r,0===bt&&Vt(ft));n!==r;)e.push(n),C.test(t.charAt(mt))?(n=t.charAt(mt),mt++):(n=r,0===bt&&Vt(ft));return bt--,n=r,0===bt&&Vt(pt),e}if((n=a())!==r&&mt===t.length)return n;throw n!==r&&mt<t.length&&Vt({type:"end"}),function(t,e,n){return new Fo(Fo.buildMessage(t,e),t,e,n)}(_t,$t<t.length?t.charAt($t):null,$t<t.length?At($t,$t+1):At($t,$t))}!function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}(Fo,Error),Fo.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n,r=null;for(n=0;n<t.length;n++)if(t[n].source===this.location.source){r=t[n].text.split(/\r\n|\n|\r/g);break}var i=this.location.start,o=this.location.source+":"+i.line+":"+i.column;if(r){var a=this.location.end,l=Io("",i.line.toString().length," "),s=r[i.line-1],c=(i.line===a.line?a.column:s.length+1)-i.column||1;e+="\n --\x3e "+o+"\n"+l+" |\n"+i.line+" | "+s+"\n"+l+" | "+Io("",i.column-1," ")+Io("",c,"^")}else e+="\n at "+o}return e},Fo.buildMessage=function(t,e){var n={literal:function(t){return'"'+i(t.text)+'"'},class:function(t){var e=t.parts.map((function(t){return Array.isArray(t)?o(t[0])+"-"+o(t[1]):o(t)}));return"["+(t.inverted?"^":"")+e.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(t){return t.description}};function r(t){return t.charCodeAt(0).toString(16).toUpperCase()}function i(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(t){return"\\x0"+r(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+r(t)}))}function o(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(t){return"\\x0"+r(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+r(t)}))}function a(t){return n[t.type](t)}return"Expected "+function(t){var e,n,r=t.map(a);if(r.sort(),r.length>0){for(e=1,n=1;e<r.length;e++)r[e-1]!==r[e]&&(r[n]=r[e],n++);r.length=n}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(t)+" but "+function(t){return t?'"'+i(t)+'"':"end of input"}(e)+" found."};const To=new Map,Mo=new Map;function No(t,e,n){const r={args:e,cb:n},i=To.get(t)||[];To.has(t)||To.set(t,i),i.push(r);const o=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");Mo.set(o,r)}function Jo(t,e){let n=t.args.length,r=t.args.length;const i=t.args[t.args.length-1];if("object"==typeof i&&i.isVararg&&(--n,r=1/0),e.length<n)return{type:"few",expected:n,found:e.length};if(e.length>r)return{type:"many",expected:r,found:e.length};for(let n=0;n<e.length;++n){let r=n>=t.args.length?t.args[t.args.length-1]:t.args[n];if("object"!=typeof r&&(r={type:r}),r.type!==e[n].type)return{type:"mismatch",expected:r.type,found:e[n].type}}return{type:"match"}}function Oo(t,e){var n;switch(null===(n=e[t.type])||void 0===n||n.call(e,t),t.type){case"TemplateLiteral":t.expressions.forEach((t=>{Oo(t,e)}));break;case"BinaryExpression":case"LogicalExpression":Oo(t.left,e),Oo(t.right,e);break;case"UnaryExpression":Oo(t.argument,e);break;case"ConditionalExpression":Oo(t.test,e),Oo(t.consequent,e),Oo(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{Oo(t,e)}))}}function Bo(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function Ro(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function Uo(t){if("string"===t.type)return t.value;if("integer"===t.type)return String(t.value);if("number"===t.type){let e=String(t.value);return e.includes(".")||(e.includes("e")?e=e.replace("e",".0e"):e+=".0"),e=e.replace(/e\+?/i,"E"),e}if("boolean"===t.type)return t.value?"true":"false";if("datetime"===t.type)return Ro(t.value);if("color"===t.type)return Zo(Xo(t.value));if("url"===t.type)return t.value;throw new Error("Unexpected type ".concat(t.type))}function Wo(t){let e=Uo(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\'").replace(/'/g,"\\'")+"'"),e}function Lo(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}const qo=new Int32Array(1);function Ho(t){return qo[0]=t,qo[0]}function Go(t){if(t<Fi||t>2147483647)throw new Error("Integer overflow.")}function Ko(t){const e=[];return Oo(t,{Variable(t){e.push(t.id.name)}}),e}function Yo(t,e){throw new Error("Failed to evaluate [".concat(t,"]. ").concat(e))}function Xo(t){const e=te(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function Zo(t){return"#".concat([t.a,t.r,t.g,t.b].map((t=>{if(t<0||t>255)throw new Error("Value out of range 0..1.");return Xt(Math.round(t).toString(16),2)})).join("").toUpperCase())}function Qo(t,e){return{type:Ti,value:Uo(e)}}function ta(t,e){const n=Number(e.value);if(isNaN(n)||!Number.isFinite(n))throw new Error("Unable to convert value to Number.");return{type:Ni,value:n}}function ea(t,e,n,r){const i=t.get(e.value);let o;return o=i&&i.getType()===r?i.getValue():n.value,"color"===r&&(o=Zo(Xo(o))),{type:r,value:o}}function na(t,e,n){return ea(t,e,n,n.type)}function ra(t,e,n){return ea(t,e,n,"color")}function ia(t,e,n){return ea(t,e,n,"url")}const oa=t=>(e,n)=>{let r=new Date(n.value.getTime())[t]();return"getUTCMonth"===t?++r:"getUTCDay"===t&&0===r&&(r=7),{type:Mi,value:r}},aa=oa("getUTCFullYear"),la=oa("getUTCMonth"),sa=oa("getUTCDate"),ca=oa("getUTCDay"),da=oa("getUTCHours"),ua=oa("getUTCMinutes"),ha=oa("getUTCSeconds"),pa=oa("getUTCMilliseconds");function fa(t,e,n){if(!n.value.length)return"";let r="";const i=t.type===Ti?t.value:Uo(t);for(;r.length+i.length<e.value;)r+=n.value;return r.length>0&&r.length+i.length>e.value&&(r=r.substring(0,e.value-i.length)),r}function ga(t,e,n,r){const i=fa(e,n,r);return{type:Ti,value:i+Uo(e)}}function ma(t,e,n,r){const i=fa(e,n,r);return{type:Ti,value:Uo(e)+i}}function va(t,e,n){if(0===n.value)throw new Error("Division by zero is not supported.");let r=e.value/n.value;return e.type===Mi&&(r=Ho(r)),{type:e.type,value:r}}function ya(t,e,n){if(0===n.value)throw new Error("Division by zero is not supported.");let r=e.value%n.value;return e.type===Mi&&(r=Ho(r)),{type:e.type,value:r}}function $a(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];let i=n.length?n[0].value:0;for(let t=1;t<n.length;++t)i*=n[t].value,n[0].type===Mi&&(i=Ho(i));return{type:n[0].type,value:i}}function _a(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];let i=n.length?n[0].value:0;for(let t=1;t<n.length;++t)i-=n[t].value,n[0].type===Mi&&(i=Ho(i));return{type:n.length?n[0].type:Mi,value:i}}function ba(t){let e=0;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(let t=0;t<r.length;++t)e+=r[t].value,r[0].type===Mi&&(e=Ho(e));return{type:r.length?r[0].type:Mi,value:e}}function wa(t,e){const n=Math.abs(e.value);return e.type===Mi&&Go(n),{type:e.type,value:n}}function xa(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!n.length)throw new Error("Non empty argument list is required for function 'max'.");return{type:n[0].type,value:Math.max(...n.map((t=>t.value)))}}function ka(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!n.length)throw new Error("Non empty argument list is required for function 'min'.");return{type:n[0].type,value:Math.min(...n.map((t=>t.value)))}}function Ea(t,e){return{type:e.type,value:Math.sign(e.value)}}function Ca(t,e,n){let r;if(0===n.value&&e.type===Mi)r=e.value;else if(0===e.value&&e.type===Mi)r=0;else{let t=Math.sign(n.value);e.type===Ni&&0===t&&(t=Object.is(t,0)?1:-1),r=Math.abs(e.value)*t}return e.type===Mi&&Go(r),{type:e.type,value:r}}function Aa(t){return(e,n)=>{const r=Xo(n.value);return{type:Ni,value:r[t]/255}}}function Va(t){return(e,n,r)=>{const i=Xo(n.value);return i[t]=255*r.value,{type:Oi,value:Zo(i)}}}const ja=Aa("a"),Da=Aa("r"),Pa=Aa("g"),Sa=Aa("b"),Fa=Va("a"),Ia=Va("r"),za=Va("g"),Ta=Va("b");function Ma(t,e,n){if(t.value<0)throw new Error("Expecting non-negative number of milliseconds.");let r=Math.floor(t.value/e);return n&&(r%=n),{type:Mi,value:r}}function Na(t){return t.map(Wo).join(", ")}No("toString",[Mi],Qo),No("toString",[Ni],Qo),No("toString",[Ji],Qo),No("toString",[Oi],Qo),No("toString",["url"],Qo),No("toNumber",[Mi],ta),No("toNumber",[Ti],ta),No("toInteger",[Ni],(function(t,e){if(e.value>2147483647||e.value<Fi)throw new Error("Unable to convert value to Integer.");const n=e.value-e.value%1;return{type:Mi,value:n}})),No("toInteger",[Ti],(function(t,e){const n=Number(e.value);if(isNaN(n)||n%1!=0||n>2147483647||n<Fi)throw new Error("Unable to convert value to Integer.");return{type:Mi,value:n}})),No("toInteger",[Ji],(function(t,e){return{type:Mi,value:e.value?1:0}})),No("toBoolean",[Mi],(function(t,e){if(1!==e.value&&0!==e.value)throw new Error("Unable to convert value to Boolean.");return{type:Ji,value:e.value}})),No("toBoolean",[Ti],(function(t,e){if("true"!==e.value&&"false"!==e.value)throw new Error("Unable to convert value to Boolean.");return{type:Ji,value:"true"===e.value?1:0}})),No("encodeUri",[Ti],(function(t,e){try{return{type:Ti,value:encodeURIComponent(e.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),No("decodeUri",[Ti],(function(t,e){try{return{type:Ti,value:decodeURIComponent(e.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),No("getIntegerValue",[Ti,Mi],na),No("getNumberValue",[Ti,Ni],na),No("getBooleanValue",[Ti,Ji],na),No("getStringValue",[Ti,Ti],na),No("getColorValue",[Ti,Oi],ra),No("getColorValue",[Ti,Ti],ra),No("getUrlValue",[Ti,"url"],ia),No("getUrlValue",[Ti,Ti],ia),No("parseUnixTime",[Mi],(function(t,e){return{type:Bi,value:new Date(1e3*e.value)}})),No("nowLocal",[],(function(){return{type:Bi,value:new Date}})),No("addMillis",[Bi,Mi],(function(t,e,n){return{type:Bi,value:new Date(e.value.getTime()+n.value)}})),No("setYear",[Bi,Mi],(function(t,e,n){const r=new Date(e.value);return r.setUTCFullYear(n.value),{type:Bi,value:r}})),No("setMonth",[Bi,Mi],(function(t,e,n){if(n.value<1||n.value>12)throw new Error("Expecting month in [1..12], instead got ".concat(n.value,"."));const r=new Date(e.value);return r.setUTCMonth(n.value-1),{type:Bi,value:r}})),No("setDay",[Bi,Mi],(function(t,e,n){const r=new Date(e.value);if(n.value<=0&&-1!==n.value||n.value>function(t){const e=new Date(t);return e.setUTCMonth(e.getUTCMonth()+1),e.setUTCDate(0),e.getUTCDate()}(r))throw new Error("Unable to set day ".concat(n.value," for date ").concat(Uo(e),"."));return r.setUTCDate(-1===n.value?0:n.value),{type:Bi,value:r}})),No("setHours",[Bi,Mi],(function(t,e,n){if(n.value<0||n.value>23)throw new Error("Expecting hours in [0..23], instead got ".concat(n.value,"."));const r=new Date(e.value);return r.setUTCHours(n.value),{type:Bi,value:r}})),No("setMinutes",[Bi,Mi],(function(t,e,n){if(n.value<0||n.value>59)throw new Error("Expecting minutes in [0..59], instead got ".concat(n.value,"."));const r=new Date(e.value);return r.setUTCMinutes(n.value),{type:Bi,value:r}})),No("setSeconds",[Bi,Mi],(function(t,e,n){if(n.value<0||n.value>59)throw new Error("Expecting seconds in [0..59], instead got ".concat(n.value,"."));const r=new Date(e.value);return r.setUTCSeconds(n.value),{type:Bi,value:r}})),No("setMillis",[Bi,Mi],(function(t,e,n){if(n.value<0||n.value>999)throw new Error("Expecting millis in [0..999], instead got ".concat(n.value,"."));const r=new Date(e.value);return r.setUTCMilliseconds(n.value),{type:Bi,value:r}})),No("getYear",[Bi],aa),No("getMonth",[Bi],la),No("getDay",[Bi],sa),No("getDayOfWeek",[Bi],ca),No("getHours",[Bi],da),No("getMinutes",[Bi],ua),No("getSeconds",[Bi],ha),No("getMillis",[Bi],pa),No("getIntervalSeconds",[Mi],(function(t,e){return Ma(e,1e3,60)})),No("getIntervalTotalSeconds",[Mi],(function(t,e){return Ma(e,1e3)})),No("getIntervalMinutes",[Mi],(function(t,e){return Ma(e,6e4,60)})),No("getIntervalTotalMinutes",[Mi],(function(t,e){return Ma(e,6e4)})),No("getIntervalHours",[Mi],(function(t,e){return Ma(e,36e5,24)})),No("getIntervalTotalHours",[Mi],(function(t,e){return Ma(e,36e5)})),No("getIntervalTotalDays",[Mi],(function(t,e){return Ma(e,864e5)})),No("getIntervalTotalWeeks",[Mi],(function(t,e){return Ma(e,6048e5)})),No("len",[Ti],(function(t,e){return{type:Mi,value:e.value.length}})),No("contains",[Ti,Ti],(function(t,e,n){return{type:Ji,value:e.value.includes(n.value)?1:0}})),No("substring",[Ti,Mi,Mi],(function(t,e,n,r){if(r.value<n.value)throw new Error("Indexes should be in ascending order.");if(n.value<0||n.value>e.value.length||r.value<0||r.value>e.value.length)throw new Error("Indexes are out of bounds.");return{type:Ti,value:e.value.substring(n.value,r.value)}})),No("replaceAll",[Ti,Ti,Ti],(function(t,e,n,r){let i;return i=n.value?e.value.replace(new RegExp(function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(n.value),"g"),r.value):e.value,{type:Ti,value:i}})),No("index",[Ti,Ti],(function(t,e,n){return{type:Mi,value:e.value.indexOf(n.value)}})),No("lastIndex",[Ti,Ti],(function(t,e,n){return{type:Mi,value:e.value.lastIndexOf(n.value)}})),No("trim",[Ti],(function(t,e){return{type:Ti,value:e.value.trim()}})),No("trimLeft",[Ti],(function(t,e){return{type:Ti,value:e.value.replace(/^\s+/,"")}})),No("trimRight",[Ti],(function(t,e){return{type:Ti,value:e.value.replace(/\s+$/,"")}})),No("toUpperCase",[Ti],(function(t,e){return{type:Ti,value:e.value.toUpperCase()}})),No("toLowerCase",[Ti],(function(t,e){return{type:Ti,value:e.value.toLowerCase()}})),No("padStart",[Ti,Mi,Ti],ga),No("padStart",[Mi,Mi,Ti],ga),No("padEnd",[Ti,Mi,Ti],ma),No("padEnd",[Mi,Mi,Ti],ma),No("div",[Mi,Mi],va),No("div",[Ni,Ni],va),No("mod",[Mi,Mi],ya),No("mod",[Ni,Ni],ya),No("mul",[{type:Mi,isVararg:!0}],$a),No("mul",[{type:Ni,isVararg:!0}],$a),No("sub",[{type:Mi,isVararg:!0}],_a),No("sub",[{type:Ni,isVararg:!0}],_a),No("sum",[{type:Mi,isVararg:!0}],ba),No("sum",[{type:Ni,isVararg:!0}],ba),No("abs",[Mi],wa),No("abs",[Ni],wa),No("max",[{type:Mi,isVararg:!0}],xa),No("max",[{type:Ni,isVararg:!0}],xa),No("min",[{type:Mi,isVararg:!0}],ka),No("min",[{type:Ni,isVararg:!0}],ka),No("maxNumber",[],(function(){return{type:Ni,value:Ii}})),No("minNumber",[],(function(){return{type:Ni,value:zi}})),No("maxInteger",[],(function(){return{type:Mi,value:2147483647}})),No("minInteger",[],(function(){return{type:Mi,value:Fi}})),No("round",[Ni],(function(t,e){const n=Math.sign(e.value);return{type:Ni,value:n*Math.round(Math.abs(e.value))}})),No("floor",[Ni],(function(t,e){return{type:Ni,value:Math.floor(e.value)}})),No("ceil",[Ni],(function(t,e){return{type:Ni,value:Math.ceil(e.value)}})),No("signum",[Ni],Ea),No("signum",[Mi],Ea),No("copySign",[Ni,Ni],Ca),No("copySign",[Mi,Mi],Ca),No("getColorAlpha",[Ti],ja),No("getColorAlpha",[Oi],ja),No("getColorRed",[Ti],Da),No("getColorRed",[Oi],Da),No("getColorGreen",[Ti],Pa),No("getColorGreen",[Oi],Pa),No("getColorBlue",[Ti],Sa),No("getColorBlue",[Oi],Sa),No("setColorAlpha",[Ti,Ni],Fa),No("setColorAlpha",[Oi,Ni],Fa),No("setColorRed",[Ti,Ni],Ia),No("setColorRed",[Oi,Ni],Ia),No("setColorGreen",[Ti,Ni],za),No("setColorGreen",[Oi,Ni],za),No("setColorBlue",[Ti,Ni],Ta),No("setColorBlue",[Oi,Ni],Ta),No("rgb",[Ni,Ni,Ni],(function(t,e,n,r){const i={a:255,r:255*e.value,g:255*n.value,b:255*r.value};return{type:Oi,value:Zo(i)}})),No("argb",[Ni,Ni,Ni,Ni],(function(t,e,n,r,i){const o={a:255*e.value,r:255*n.value,g:255*r.value,b:255*i.value};return{type:Oi,value:Zo(o)}}));const Ja={StringLiteral:function(t,e){return{type:Ti,value:e.value}},NumberLiteral:function(t,e){return{type:Ni,value:e.value}},IntegerLiteral:function(t,e){return{type:Mi,value:e.value}},BooleanLiteral:function(t,e){return{type:Ji,value:e.value?1:0}},UnaryExpression:function(t,e){const n=Bo(Oa(t,e.argument));switch(e.operator){case"!":if(n.type===Ji)return{type:Ji,value:n.value?0:1};Yo("".concat(e.operator).concat(Wo(n)),"A Boolean is expected after a unary not.");case"+":case"-":const t="+"===e.operator?1:-1;if(n.type===Mi)return{type:Mi,value:n.value*t};if(n.type===Ni)return{type:Ni,value:n.value*t};Yo("".concat(e.operator).concat(Wo(n)),"A Number is expected after a unary ".concat("+"===e.operator?"plus":"minus","."))}},ConditionalExpression:function(t,e){const n=Bo(Oa(t,e.test));if(n.type===Ji)return n.value?Oa(t,e.consequent):Oa(t,e.alternate);Yo("".concat(Wo(n)," ? ").concat(Wo(Oa(t,e.consequent))," : ").concat(Wo(Oa(t,e.alternate))),"Ternary must be called with a Boolean value as a condition.")},TemplateLiteral:function(t,e){let n="";if(2===e.quasis.length&&""===e.quasis[0].value&&""===e.quasis[1].value)return Oa(t,e.expressions[0]);for(let r=0;r<e.expressions.length;++r)n+=e.quasis[r].value,n+=Uo(Oa(t,e.expressions[r]));return n+=e.quasis[e.quasis.length-1].value,{type:Ti,value:n}},LogicalExpression:function(t,e){const n=Bo(Oa(t,e.left));if(n.type!==Ji&&Yo("".concat(Wo(n)," ").concat(e.operator," ..."),"'".concat(e.operator,"' must be called with boolean operands.")),"||"===e.operator&&n.value)return n;if("&&"===e.operator&&!n.value)return{type:Ji,value:0};const r=Bo(Oa(t,e.right));return r.type!==Ji&&Yo("".concat(Wo(n)," ").concat(e.operator," ").concat(Wo(r)),"Operator '".concat(e.operator,"' cannot be applied to different types: Boolean and ").concat(Lo(r.type),".")),{type:Ji,value:r.value}},BinaryExpression:function(t,e){const n=e.operator,r=Oa(t,e.left),i=Oa(t,e.right);if(r.type!==i.type&&Yo("".concat(Wo(r)," ").concat(e.operator," ").concat(Wo(i)),"Operator '".concat(n,"' cannot be applied to different types: ").concat(Lo(r.type)," and ").concat(Lo(i.type),".")),"=="===n||"!="===n)return function(t,e,n){let r;return r=e.type===Bi&&n.type===Bi?e.value.getTime()===n.value.getTime():e.value===n.value,"!="===t&&(r=!r),{type:Ji,value:r?1:0}}(n,r,i);if(">"===n||">="===n||"<"===n||"<="===n)return function(t,e,n){let r;e.type!==Ni&&e.type!==Mi&&e.type!==Bi&&Yo("".concat(Wo(e)," ").concat(t," ").concat(Wo(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Lo(e.type)," type."));const i=e.type===Bi?e.value.getTime():e.value,o=n.type===Bi?n.value.getTime():n.value;return r=">"===t?i>o:">="===t?i>=o:"<"===t?i<o:i<=o,{type:Ji,value:r?1:0}}(n,r,i);if("+"===n||"-"===n)return function(t,e,n){if(e.type!==Ti&&e.type!==Ni&&e.type!==Mi&&Yo("".concat(Wo(e)," ").concat(t," ").concat(Wo(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Lo(e.type)," type.")),e.type===Ti)return"-"===t&&Yo("".concat(Wo(e)," - ").concat(Wo(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Lo(e.type)," type.")),{type:Ti,value:e.value+n.value};let r="+"===t?e.value+n.value:e.value-n.value;return e.type===Mi&&(r=Ho(r)),{type:e.type,value:r}}(n,r,i);if("/"===n||"*"===n||"%"===n)return function(t,e,n){let r;if(e.type!==Mi&&e.type!==Ni&&Yo("".concat(Wo(e)," ").concat(t," ").concat(Wo(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Lo(e.type)," type.")),"*"===t)r=e.value*n.value;else{if("/"!==t&&"%"!==t)throw new Error("Unsupported operation ".concat(t));0===n.value&&Yo("".concat(Wo(e)," ").concat(t," ").concat(Wo(n)),"Division by zero is not supported."),r="/"===t?e.value/n.value:e.value%n.value}return e.type===Mi&&(r=Ho(r)),{type:e.type,value:r}}(n,r,i);throw new Error("Unsupported operation ".concat(n))},CallExpression:function(t,e){const n=e.callee.name;let r;const i=e.arguments.map((e=>Oa(t,e))),o=n+":"+i.map((t=>t.type)).join("#");if(Mo.has(o))r=Mo.get(o);else{const t=function(t,e){const n=To.get(t);if(!n)return{type:"missing"};let r=null;for(let t=0;t<n.length;++t){const i=Jo(n[t],e);if("match"===i.type)return n[t];r||(r=i)}if(!r)throw new Error("Missing function");return r}(n,i);if("expected"in t||"type"in t&&"missing"===t.type){const e=i.map((t=>Lo(t.type))).join(", "),r="".concat(n,"(").concat(Na(i),")");"few"===t.type&&0===i.length?Yo(r,"Non empty argument list is required for function '".concat(n,"'.")):"many"===t.type||"few"===t.type||"mismatch"===t.type?Yo(r,"Function '".concat(n,"' has no matching override for given argument types: ").concat(e,".")):Yo(r,"Unknown function name: ".concat(n,"."))}r=t}if(!r)throw new Error("Function not found");try{return r.cb(t,...i)}catch(t){Yo("".concat(n,"(").concat(Na(i),")"),t.message)}},Variable:function(t,e){const n=e.id.name,r=t.get(n);if(r)return function(t){return{type:t.getType(),value:t.getValue()}}(r);throw new Error("Variable '".concat(n,"' is missing."))}};function Oa(t,e){if(e.type in Ja)return Ja[e.type](t,e);throw new Error("Unsupported expression")}function Ba(t,e){try{return function(t,e){let n="";if(Oo(e,{Variable(e){n||t.has(e.id.name)||(n=e.id.name)}}),n)throw new Error("Variable '".concat(n,"' is missing."))}(t,e),Oa(t,e)}catch(t){return{type:"error",value:t.message}}}class Ra{constructor(t){this.ast=t}apply(t,e){if(!function(t,e){let n=!1;return Oo(t,{Variable(t){e.has(t.id.name)||(n=!0)}}),n}(this.ast,t))try{const n=Ba(t,this.ast);if("error"===n.type)return void e(Lt(new Error("Expression execution error"),{additional:{message:n.value}}));const r=n.value;if(r instanceof Date)return Ro(r);if("boolean"===n.type)return Boolean(r);if("color"===n.type){const t=te(String(r));if(t)return Zo(t);e(Lt(new Error("Expression execution error")))}return r}catch(t){return void e(Lt(new Error("Expression execution error")))}}}function Ua(t,e,n){if(t)if("string"==typeof t){if((r=t).indexOf("@{")>-1||r.indexOf("\\")>-1){e.hasExpression=!0;try{const n=zo(t,{startRule:"JsonStringContents"}),r=Ko(n);return e.vars.push(...r),new Ra(n)}catch(e){return void n(Lt(new Error("Unable to parse expression"),{additional:{expression:t}}))}}}else{if(Array.isArray(t))return t.map((t=>Ua(t,e,n)));if("object"==typeof t){const r={};for(const i in t)r[i]=Ua(t[i],e,n);return r}}var r;return t}function Wa(t,e,n){if(t){if(t instanceof Ra)return t.apply(e,n);if(Array.isArray(t))return t.map((t=>Wa(t,e,n)));if("object"==typeof t){const r={};for(const i in t)r[i]=Wa(t[i],e,n);return r}}return t}function La(t,e){const n={vars:[],hasExpression:!1},r=Ua(t,n,e);return{vars:[...new Set(n.vars)],hasExpression:n.hasExpression,applyVars:t=>Wa(r,t,e)}}const qa={pagers:function(){return Rt(new Map)}},Ha=new Map,Ga=new Map;function Ka(t){const e=Ha.get(t)||Rt("");return Ha.has(t)||Ha.set(t,e),e}function Ya(t){const e=Ga.get(t)||new Map;return Ga.has(t)||Ga.set(t,e),e}class Xa{setVariable(t){const e=t.getName(),n=Ya(this);if(n.has(e))throw new Error("Variable with the same name already exist");n.set(e,t),Ka(this).set(e)}getVariable(t){return Ya(this).get(t)}}function Za(){return new Xa}function Qa(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const tl=new Set(["start","stop","pause","resume","cancel","reset"]);class el{constructor(t){Qa(this,"timers",new Map),Qa(this,"awaitActions",[]),this.logError=t.logError,this.applyVars=t.applyVars,this.hasVariableWithType=t.hasVariableWithType,this.setVariableValue=t.setVariableValue,this.execAnyActions=t.execAnyActions,this.visibilityHandler=()=>{"visible"===document.visibilityState?(this.awaitActions.forEach((t=>{let{id:e,action:n}=t;this.execTimerAction(e,n)})),this.awaitActions=[],this.unholdAll()):this.holdAll()},document.addEventListener("visibilitychange",this.visibilityHandler)}destroy(){document.removeEventListener("visibilitychange",this.visibilityHandler);for(const[t,e]of this.timers)this.stopTimerTimeouts(e)}createTimer(t){null!=t&&t.id?t.duration||t.tick_interval&&(t.value_variable||t.tick_actions)?this.timers.set(t.id,{state:"stopped",definition:t}):this.logError(Lt(new Error("Misconfigured timer"),{additional:{id:t.id}})):this.logError(Lt(new Error("Missing timer id")))}execTimerAction(t,e){if(!(t&&e&&this.timers.has(t)&&tl.has(e)))return void this.logError(Lt(new Error("Incorrect timer action"),{additional:{id:t,action:e}}));const n=e;if("visible"!==document.visibilityState)return void this.awaitActions.push({id:t,action:n});const r=this.timers.get(t);this[n](r)}stopTimerTimeouts(t){t.durationTimeout&&(clearTimeout(t.durationTimeout),t.durationTimeout=void 0),t.tickTimeout&&(clearTimeout(t.tickTimeout),t.tickTimeout=void 0)}tickOrUnholdAction(t){const e=performance.now(),n=(t.durationPassed||0)+e-(t.durationStarted||0);t.duration&&n>t.duration||(this.updateVariable(t,n),this.callActions(t,"tick"),void 0!==t.tickCount&&++t.tickCount)}startOrResume(t){t.state="running",t.hold=!1,t.durationStarted=performance.now();const e=t.duration;e&&(t.durationTimeout=window.setTimeout((()=>{this.updateVariable(t,e),t.tickCountPredict&&void 0!==t.tickCount&&t.tickCount<t.tickCountPredict&&this.callActions(t,"tick"),this.stop(t)}),Math.max(0,e-(t.durationPassed||0))));const n=t.tick;if(n){const e=()=>{const r=t.tickStarted=performance.now(),i=Math.max(0,n-(t.tickPassed||0));t.tickTimeout=window.setTimeout((()=>{this.tickOrUnholdAction(t),t.tickPassed=(performance.now()-r-i)%n,e()}),i)};e()}}start(t){if("running"===t.state)return void this.logError(Lt(new Error("The timer is already running")));if("paused"===t.state)return void this.logError(Lt(new Error("The timer is paused")));const e=t.definition.value_variable;!e||this.hasVariableWithType(e,"integer")?(e&&this.setVariableValue(e,0),t.definition.duration&&(t.duration=this.applyVars(t.definition.duration)),t.definition.tick_interval&&(t.tick=this.applyVars(t.definition.tick_interval)),void 0!==t.duration&&t.duration<0||void 0!==t.tick&&t.tick<=0?this.logError(Lt(new Error("Incorrect timer properties"),{additional:{id:t.definition.id}})):(void 0!==t.duration&&void 0!==t.tick&&(t.tickCount=0,t.tickCountPredict=Math.floor(t.duration/t.tick)),this.startOrResume(t))):this.logError(Lt(new Error("Cannot find variable"),{additional:{name:e}}))}stop(t){"stopped"!==t.state?(t.state="stopped",t.durationPassed=0,t.tickPassed=0,this.stopTimerTimeouts(t),this.callActions(t,"end")):this.logError(Lt(new Error("The timer has already been stopped")))}pause(t){if("stopped"===t.state)return void this.logError(Lt(new Error("The timer has already been stopped")));if("paused"===t.state)return void this.logError(Lt(new Error("The timer has already been paused")));t.state="paused",this.stopTimerTimeouts(t);const e=performance.now();t.durationStarted&&(t.durationPassed=(t.durationPassed||0)+e-t.durationStarted),t.tickStarted&&(t.tickPassed=(t.tickPassed||0)+e-t.tickStarted);const n=t.definition.value_variable;n&&t.durationPassed&&this.setVariableValue(n,Math.round(t.durationPassed))}resume(t){"stopped"!==t.state?"running"!==t.state?this.startOrResume(t):this.logError(Lt(new Error("The timer is already running"))):this.logError(Lt(new Error("The timer has already been stopped")))}cancel(t){"stopped"!==t.state&&(t.state="stopped",t.durationPassed=0,t.tickPassed=0,this.stopTimerTimeouts(t))}reset(t){this.cancel(t),this.start(t)}updateVariable(t,e){const n=t.definition.value_variable;n&&this.setVariableValue(n,Math.round(e))}callActions(t,e){const n=t.definition["end"===e?"end_actions":"tick_actions"];if(n){const t=this.applyVars(n);this.execAnyActions(t,!1)}}holdAll(){for(const[t,e]of this.timers)"running"===e.state&&(e.hold=!0,this.stopTimerTimeouts(e))}unholdAll(){for(const[t,e]of this.timers)if("running"===e.state&&e.hold){const t=performance.now();e.durationStarted&&(e.durationPassed=(e.durationPassed||0)+t-e.durationStarted),e.tickStarted&&(e.tickPassed=(e.tickPassed||0)+t-e.tickStarted),e.tick&&this.tickOrUnholdAction(e),this.startOrResume(e)}}}function nl(t){let e,n,r,i,o,a,l,s;return n=new ko({props:{svgFiltersMap:t[2]}}),i=new go({props:{div:t[6],templateContext:t[5]}}),{c(){e=I("div"),zt(n.$$.fragment),r=M(),zt(i.$$.fragment),this.h()},l(t){e=L(t,"DIV",{class:!0});var o=R(e);Tt(n.$$.fragment,o),r=G(o),Tt(i.$$.fragment,o),o.forEach(S),this.h()},h(){O(e,"class",o="divkit-b023c"+(t[3]?" ".concat("divkit-ee112"):"")+(t[0]?" ".concat(t[0]):""))},m(t,o){P(t,e,o),Mt(n,e,null),D(e,r),Mt(i,e,null),a=!0,l||(s=J(e,"touchstart",il,{passive:!0}),l=!0)},p(t,r){const i={};4&r[0]&&(i.svgFiltersMap=t[2]),n.$set(i),(!a||9&r[0]&&o!==(o="divkit-b023c"+(t[3]?" ".concat("divkit-ee112"):"")+(t[0]?" ".concat(t[0]):"")))&&O(e,"class",o)},i(t){a||(At(n.$$.fragment,t),At(i.$$.fragment,t),a=!0)},o(t){Vt(n.$$.fragment,t),Vt(i.$$.fragment,t),a=!1},d(t){t&&S(e),Nt(n),Nt(i),l=!1,s()}}}function rl(t){let e,n,r=!t[1]&&t[6]&&nl(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){!t[1]&&t[6]?r?(r.p(t,n),2&n[0]&&At(r,1)):(r=nl(t),r.c(),At(r,1),r.m(e.parentNode,e)):r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct())},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function il(){}function ol(t,e,n){let r;var i,o,a,l;let{id:s}=e,{json:c={}}=e,{platform:d="auto"}=e,{theme:u="system"}=e,{globalVariablesController:h=new Xa}=e,{mix:p=""}=e,{customization:g={}}=e,{builtinProtocols:m=["http","https","tel","mailto","intent"]}=e,{onError:v}=e,{onStat:y}=e,{onCustomAction:$}=e,{onComponent:_}=e,b=Rt("desktop"===d);if(f(t,b,(t=>n(3,r=t))),"auto"===d&&"undefined"!=typeof matchMedia){const t=matchMedia("(any-pointer: coarse)");b.set(!t.matches),t.addListener((()=>{b.set(!t.matches)}))}let w="light",x=null;function k(){"system"===u&&x&&n(23,w=x.matches?"dark":"light")}const E=new Set(m);let C=!1;c||(C=!0,M(Lt(new Error('"json" prop is required')))),s||(C=!0,M(Lt(new Error('"id" prop is required'))));let A=function(t){if(!t)return Lt(new Error("Missing object"));const e=t.card,n=t.templates||{};if(!e)return Lt(new Error("Missing card"));if(!e.states||!e.states.length)return Lt(new Error("Missing states"));for(const t in n)if(n.hasOwnProperty(t)&&t in uo)return Lt(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t){if(!e.states[t].div)return Lt(new Error("Missing state div"),{additional:{stateId:e.states[t].state_id}});if("number"!=typeof e.states[t].state_id)return Lt(new Error("Missing state_id"),{additional:{index:t}})}return null}(c);const V=c.templates||{};A&&(C=!0,M(A));const j={stateChange:!1},D=Ka(h),P=Ya(h),S=new Map,F=new Map,I=new Map;let z=null;function T(t){const e=La(t,M);return e.vars.length?e.applyVars(F):t}function M(t){v?v({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}function N(t,e){y&&y({type:t,action:e})}let J=0;function O(t){return"".concat(s,"-").concat(J++)}let B={},R={};function U(t){const e=t.url?String(t.url):"";if(e)try{const t=e.replace(/div-action:\/\//,""),n=/([^?]+)\?(.+)/.exec(t);if(!n)return;const r=new URLSearchParams(n[2]);switch(n[1]){case"set_state":!function(t){if(!t)throw new Error("Missing state id");let e=Y,n=t.split("/");if(n=["root",...n],n.length<2||n.length%2!=0)throw new Error("Incorrect state id format");for(let t=0;t<n.length;t+=2){const r=n[t],i=n[t+1];let o=e.getChild(r);if(!o)return;o.setState(i),e=o}}(r.get("state_id"));break;case"set_current_item":!function(t,e){if(!t||!e)throw new Error('Missing data for "set-current-item" action');if(isNaN(Number(e)))throw new Error('Incorrect item for "set-current-item" action');const n=H(t);n&&n.setCurrentItem(Number(e))}(r.get("id"),r.get("item"));break;case"set_previous_item":!function(t,e){if(!t)throw new Error('Missing id for "set-previous-item" action');if(e&&"clamp"!==e&&"ring"!==e)throw new Error('Incorrect overflow value for "set-previous-item" action');e=e||"clamp";const n=H(t);n&&n.setPreviousItem(e)}(r.get("id"),r.get("overflow"));break;case"set_next_item":!function(t,e){if(!t)throw new Error('Missing id for "set-next-item" action');if(e&&"clamp"!==e&&"ring"!==e)throw new Error('Incorrect overflow value for "set-next-item" action');e=e||"clamp";const n=H(t);n&&n.setNextItem(e)}(r.get("id"),r.get("overflow"));break;case"set_variable":const n=r.get("name"),i=r.get("value");if(n&&null!==i){const t=F.get(n);t?t.set(i):M(Lt(new Error("Cannot find variable"),{additional:{name:n}}))}else M(Lt(new Error("Incorrect set_variable_action"),{additional:{url:t}}));break;case"timer":const o=r.get("action"),a=r.get("id");z?z.execTimerAction(a,o):M(Lt(new Error("Incorrect timer action"),{additional:{id:a,action:o}}));break;default:M(Lt(new Error("Unknown type of action"),{additional:{url:e}}))}}catch(t){M(Lt(t,{additional:{url:e}}))}}async function W(t,e){if(t){for(let n=0;n<t.length;++n){let r=t[n];const i=r.url;if(i){const t=se(i);if(t)if(ce(t,E)){if(e)if("_blank"===r.target){const t=window.open("","_blank");t&&(t.opener=null,t.location=i)}else location.href=i}else"div-action"===t?(U(r),await gt()):r.log_id&&(L(r),await gt())}}t.forEach((t=>{t.log_id&&N("click",t)}))}}function L(t){null==$||$(t)}const q=new Map;function H(t){if(q.has(t))return q.get(t);M(Lt(new Error("Missing instance with id"),{additional:{id:t}}))}const G=new Map;function K(t){for(const e of t)F.has(e)&&t.delete(e);return t}ot(Wt,{logError:M,logStat:N,hasTemplate:function(t){return t in V},processTemplate:function(t,e){if(!t)return{json:t,templateContext:e};const n=new Set([t.type]);for(;t.type in V;){if(({json:t,templateContext:e}=Eo(t,e,V,M)),n.has(t.type))return{json:t,templateContext:e};n.add(t.type)}return{json:t,templateContext:e}},genId:O,genClass:function(t){return"divkit-".concat(O())},execAction:U,execAnyActions:W,execCustomAction:L,isRunning:function(t){return j[t]},setRunning:function(t,e){j[t]=e},registerInstance:function(t,e){q.has(t)?M(Lt(new Error("Duplicate instance id"),{additional:{id:t}})):q.set(t,e)},unregisterInstance:function(t){q.delete(t)},addSvgFilter:function(t,e){const r="".concat(t,":").concat(e);if(R[r]=R[r]||0,++R[r],B[r])return B[r];const i="".concat(O(),"-svg-filter");return n(2,B=Object.assign(Object.assign({},B),{[r]:i})),i},removeSvgFilter:function(t,e){if(!t)return;const r="".concat(t,":").concat(e);R[r]&&0==--R[r]&&n(2,B=Object.keys(B).reduce(((t,e)=>(R[e]&&(t[e]=B[e]),t)),{}))},getDerivedFromVars:function(t){if(!t)return Ao(t);const e=La(t,M);return e.vars.length?Ut(e.vars.map((t=>F.get(t)||function(t){const e=I.get(t)||Rt(void 0);return I.has(t)||I.set(t,e),e}(t))).filter(ne),(()=>e.applyVars(F))):e.hasExpression?Ao(e.applyVars(F)):Ao(t)},getJsonWithVars:T,getStore:function(t){return G.has(t)||function(t){G.has(t)||G.set(t,qa[t]())}(t),G.get(t)},getVariable:function(t,e){const n=F.get(t);if(n){const r=n.getType();if(r!==e)return void M(Lt(new Error('Variable should have type "'.concat(e,'"')),{additional:{name:t,foundType:r}}))}return n},getCustomization:function(t){return null==g?void 0:g[t]},getBuiltinProtocols:function(){return E},isDesktop:b,registerComponent:void 0,unregisterComponent:void 0}),ot(Ae,{hasAction:()=>!1});const Y={setState(t){throw new Error("Not implemented")},getChild(t){if(X&&X.has(t))return X.get(t);M(Lt(new Error("Missing state block with id"),{additional:{id:t}}))}};let X=null;ot(he,{registerInstance(t,e){X||(X=new Map),X.has(t)?M(Lt(new Error("Duplicate state with id"),{additional:{id:t}})):X.set(t,e)},unregisterInstance(t){null==X||X.delete(t)},runVisibilityTransition:(t,e,n,r,i)=>Promise.resolve(),registerChildWithTransitionIn:(t,e,n,r)=>Promise.resolve(),registerChildWithTransitionOut:(t,e,n,r)=>Promise.resolve(),registerChildWithTransitionChange:(t,e,n,r)=>Promise.resolve(),hasTransitionChange:t=>!1,registerChild(t){},unregisterChild(t){}});const Z=null===(i=null==c?void 0:c.card)||void 0===i?void 0:i.variables;Array.isArray(Z)&&Z.forEach((t=>{if(t&&t.type in Ui&&t.name){if(S.has(t.name))return void M(Lt(new Error("Duplicate variable"),{additional:{name:t.name}}));try{const e=Wi(t.name,t.type,t.value);S.set(t.name,e),F.set(t.name,e)}catch(e){M(Lt(e,{additional:{name:t.name}}))}}}));const Q=c.palette;Q&&Q[w].forEach((t=>{if(S.has(t.name))M(Lt(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=Wi(t.name,"color",t.color);S.set(t.name,e),F.set(t.name,e)}catch(e){M(Lt(e,{additional:{name:t.name}}))}}));for(const[t,e]of P)F.has(t)||F.set(t,e);D.subscribe((t=>{if(t&&!F.has(t)){const e=P.get(t);F.set(t,e);const n=I.get(t);if(n){let t=0;e.subscribe((()=>{n.set(++t)}))}}}));const tt=null===(o=null==c?void 0:c.card)||void 0===o?void 0:o.variable_triggers;Array.isArray(tt)&&tt.forEach((t=>{let e=!1;if("string"!=typeof t.condition)return void M(Lt(new Error("variable_trigger has a condition that is not a string"),{additional:{condition:t.condition}}));const n=t.mode||"on_condition";if("on_variable"===n||"on_condition"===n)try{const r=zo(t.condition,{startRule:"JsonStringContents"}),i=Ko(r);if(!i.length)return void M(Lt(new Error("variable_trigger must have variables in the condition"),{additional:{condition:t.condition}}));(function(t){const e=new Set(t);return K(e),e.size?new Promise((t=>{const n=D.subscribe((()=>{K(e),e.size||(n(),t())}))})):Promise.resolve()})(i).then((()=>{Ut(i.map((t=>F.get(t))).filter(ne),(()=>Ba(F,r))).subscribe((r=>{"error"!==r.type?(r.value&&("on_variable"===n||"on_condition"===n&&!1===e)&&t.actions.forEach((t=>{const e=T(t);e.log_id&&U(e)})),e=Boolean(r.value)):M(Lt(new Error("variable_trigger condition execution error"),{additional:{message:r.value}}))}))}))}catch(e){M(Lt(new Error("Unable to parse variable_trigger"),{additional:{condition:t.condition}}))}else M(Lt(new Error("variable_trigger has an unsupported mode"),{additional:{mode:n}}))}));const et=null===(a=null==c?void 0:c.card)||void 0===a?void 0:a.timers;if(et){const t=z=new el({logError:M,applyVars:T,hasVariableWithType:function(t,e){const n=F.get(t);return(null==n?void 0:n.getType())===e},setVariableValue:function(t,e){const n=F.get(t);n?n.setValue(e):M(Lt(new Error("Cannot find variable"),{additional:{name:t}}))},execAnyActions:W});et.forEach((e=>t.createTimer(e)))}const nt=null===(l=null==c?void 0:c.card)||void 0===l?void 0:l.states,rt=nt&&!C?{type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:nt.map((t=>({state_id:t.state_id.toString(),div:t.div})))}:void 0;return it((()=>{z&&z.destroy()})),t.$$set=t=>{"id"in t&&n(8,s=t.id),"json"in t&&n(9,c=t.json),"platform"in t&&n(10,d=t.platform),"theme"in t&&n(7,u=t.theme),"globalVariablesController"in t&&n(11,h=t.globalVariablesController),"mix"in t&&n(0,p=t.mix),"customization"in t&&n(12,g=t.customization),"builtinProtocols"in t&&n(13,m=t.builtinProtocols),"onError"in t&&n(14,v=t.onError),"onStat"in t&&n(15,y=t.onStat),"onCustomAction"in t&&n(16,$=t.onCustomAction),"onComponent"in t&&n(17,_=t.onComponent)},t.$$.update=()=>{16777344&t.$$.dirty[0]&&("light"===u||"dark"===u?n(23,w=u):"system"===u?"undefined"!=typeof matchMedia?(x||(n(24,x=matchMedia("(prefers-color-scheme: dark)")),x.addListener(k)),n(23,w=x.matches?"dark":"light")):n(23,w="light"):M(Lt(new Error("Unsupported theme")))),8388608&t.$$.dirty[0]&&w&&Q&&Q[w].forEach((t=>{const e=F.get(t.name);e&&e.setValue(t.color)}))},[p,C,B,r,b,{},rt,u,s,c,d,h,g,m,v,y,$,_,function(t){n(7,u=t)},function(){},function(t,e){if("string"==typeof e||"number"==typeof e||"boolean"==typeof e){const n=F.get(t);n&&n.setValue(e)}},function(t){const e=F.get(t);return null==e?void 0:e.getValue()},U,w,x]}const al=class extends Ot{constructor(t){super(),Jt(this,t,ol,rl,u,{id:8,json:9,platform:10,theme:7,globalVariablesController:11,mix:0,customization:12,builtinProtocols:13,onError:14,onStat:15,onCustomAction:16,onComponent:17,setTheme:18,getDebugVariables:19,setVariable:20,getVariable:21,execAction:22},null,[-1,-1,-1])}get setTheme(){return this.$$.ctx[18]}get getDebugVariables(){return this.$$.ctx[19]}get setVariable(){return this.$$.ctx[20]}get getVariable(){return this.$$.ctx[21]}get execAction(){return this.$$.ctx[22]}};function ll(t){return new al({target:t.target,props:{id:t.id,json:t.json,globalVariablesController:t.globalVariablesController,mix:t.mix,customization:t.customization,builtinProtocols:t.builtinProtocols,onStat:t.onStat,onCustomAction:t.onCustomAction,onError:t.onError,onComponent:t.onComponent,platform:t.platform,theme:t.theme},hydrate:t.hydrate})}var sl=e.M,cl=e.Os,dl=e.sY;export{sl as createGlobalVariablesController,cl as createVariable,dl as render};
|
|
1
|
+
var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function n(){}t.d(e,{M:()=>Qa,Os:()=>Wi,sY:()=>sl});const r=t=>t;function i(t,e){for(const n in e)t[n]=e[n];return t}function o(t){return t()}function a(){return Object.create(null)}function l(t){t.forEach(o)}function s(t){return"function"==typeof t}let c;function u(t,e){return c||(c=document.createElement("a")),c.href=e,t===c.href}function d(t,e){return t!=t?e==e:t!==e}function h(t){return 0===Object.keys(t).length}function p(t,...e){if(null==t)return n;const r=t.subscribe(...e);return r.unsubscribe?()=>r.unsubscribe():r}function f(t,e,n){t.$$.on_destroy.push(p(e,n))}function g(t,e,n,r){if(t){const i=m(t,e,n,r);return t[0](i)}}function m(t,e,n,r){return t[1]&&r?i(n.ctx.slice(),t[1](r(e))):n.ctx}function v(t,e,n,r){if(t[2]&&r){const i=t[2](r(n));if(void 0===e.dirty)return i;if("object"==typeof i){const t=[],n=Math.max(e.dirty.length,i.length);for(let r=0;r<n;r+=1)t[r]=e.dirty[r]|i[r];return t}return e.dirty|i}return e.dirty}function y(t,e,n,r,i,o){if(i){const a=m(e,n,r,o);t.p(a,i)}}function $(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let t=0;t<n;t++)e[t]=-1;return e}return-1}function _(t){return t&&s(t.destroy)?t.destroy:n}const b="undefined"!=typeof window;let w=b?()=>window.performance.now():()=>Date.now(),x=b?t=>requestAnimationFrame(t):n;const k=new Set;function E(t){k.forEach((e=>{e.c(t)||(k.delete(e),e.f())})),0!==k.size&&x(E)}let C=!1;function A(t,e,n,r){for(;t<e;){const i=t+(e-t>>1);n(i)<=r?t=i+1:e=i}return t}function V(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function j(t){const e=I("style");return function(t,e){!function(t,e){t.appendChild(e)}(t.head||t,e)}(V(t),e),e.sheet}function D(t,e){if(C){for(function(t){if(t.hydrate_init)return;t.hydrate_init=!0;let e=t.childNodes;if("HEAD"===t.nodeName){const t=[];for(let n=0;n<e.length;n++){const r=e[n];void 0!==r.claim_order&&t.push(r)}e=t}const n=new Int32Array(e.length+1),r=new Int32Array(e.length);n[0]=-1;let i=0;for(let t=0;t<e.length;t++){const o=e[t].claim_order,a=(i>0&&e[n[i]].claim_order<=o?i+1:A(1,i,(t=>e[n[t]].claim_order),o))-1;r[t]=n[a]+1;const l=a+1;n[l]=t,i=Math.max(l,i)}const o=[],a=[];let l=e.length-1;for(let t=n[i]+1;0!=t;t=r[t-1]){for(o.push(e[t-1]);l>=t;l--)a.push(e[l]);l--}for(;l>=0;l--)a.push(e[l]);o.reverse(),a.sort(((t,e)=>t.claim_order-e.claim_order));for(let e=0,n=0;e<a.length;e++){for(;n<o.length&&a[e].claim_order>=o[n].claim_order;)n++;const r=n<o.length?o[n]:null;t.insertBefore(a[e],r)}}(t),(void 0===t.actual_end_child||null!==t.actual_end_child&&t.actual_end_child.parentElement!==t)&&(t.actual_end_child=t.firstChild);null!==t.actual_end_child&&void 0===t.actual_end_child.claim_order;)t.actual_end_child=t.actual_end_child.nextSibling;e!==t.actual_end_child?void 0===e.claim_order&&e.parentNode===t||t.insertBefore(e,t.actual_end_child):t.actual_end_child=e.nextSibling}else e.parentNode===t&&null===e.nextSibling||t.appendChild(e)}function P(t,e,n){C&&!n?D(t,e):e.parentNode===t&&e.nextSibling==n||t.insertBefore(e,n||null)}function S(t){t.parentNode.removeChild(t)}function F(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function I(t){return document.createElement(t)}function z(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function T(t){return document.createTextNode(t)}function M(){return T(" ")}function N(){return T("")}function J(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function O(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function B(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const r in e)null==e[r]?t.removeAttribute(r):"style"===r?t.style.cssText=e[r]:"__value"===r?t.value=t[r]=e[r]:n[r]&&n[r].set?t[r]=e[r]:O(t,r,e[r])}function R(t){return Array.from(t.childNodes)}function U(t,e,n,r,i=!1){!function(t){void 0===t.claim_info&&(t.claim_info={last_index:0,total_claimed:0})}(t);const o=(()=>{for(let r=t.claim_info.last_index;r<t.length;r++){const o=t[r];if(e(o)){const e=n(o);return void 0===e?t.splice(r,1):t[r]=e,i||(t.claim_info.last_index=r),o}}for(let r=t.claim_info.last_index-1;r>=0;r--){const o=t[r];if(e(o)){const e=n(o);return void 0===e?t.splice(r,1):t[r]=e,i?void 0===e&&t.claim_info.last_index--:t.claim_info.last_index=r,o}}return r()})();return o.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1,o}function W(t,e,n,r){return U(t,(t=>t.nodeName===e),(t=>{const e=[];for(let r=0;r<t.attributes.length;r++){const i=t.attributes[r];n[i.name]||e.push(i.name)}e.forEach((e=>t.removeAttribute(e)))}),(()=>r(e)))}function L(t,e,n){return W(t,e,n,I)}function q(t,e,n){return W(t,e,n,z)}function H(t,e){return U(t,(t=>3===t.nodeType),(t=>{const n=""+e;if(t.data.startsWith(n)){if(t.data.length!==n.length)return t.splitText(n.length)}else t.data=n}),(()=>T(e)),!0)}function G(t){return H(t," ")}function K(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function Y(t,e,n,r){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}const X=new Map;let Z,Q=0;function tt(t,e){const n=(t.style.animation||"").split(", "),r=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),i=n.length-r.length;i&&(t.style.animation=r.join(", "),Q-=i,Q||x((()=>{Q||(X.forEach((t=>{const{stylesheet:e}=t;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.rules={}})),X.clear())})))}function et(t){Z=t}function nt(){if(!Z)throw new Error("Function called outside component initialization");return Z}function rt(t){nt().$$.on_mount.push(t)}function it(t){nt().$$.on_destroy.push(t)}function ot(t,e){return nt().$$.context.set(t,e),e}function at(t){return nt().$$.context.get(t)}function lt(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const st=[],ct=[],ut=[],dt=[],ht=Promise.resolve();let pt=!1;function ft(){pt||(pt=!0,ht.then(_t))}function gt(){return ft(),ht}function mt(t){ut.push(t)}const vt=new Set;let yt,$t=0;function _t(){const t=Z;do{for(;$t<st.length;){const t=st[$t];$t++,et(t),bt(t.$$)}for(et(null),st.length=0,$t=0;ct.length;)ct.pop()();for(let t=0;t<ut.length;t+=1){const e=ut[t];vt.has(e)||(vt.add(e),e())}ut.length=0}while(st.length);for(;dt.length;)dt.pop()();pt=!1,vt.clear(),et(t)}function bt(t){if(null!==t.fragment){t.update(),l(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(mt)}}function wt(t,e,n){t.dispatchEvent(function(t,e,{bubbles:n=!1,cancelable:r=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(t,n,r,e),i}(`${e?"intro":"outro"}${n}`))}const xt=new Set;let kt;function Et(){kt={r:0,c:[],p:kt}}function Ct(){kt.r||l(kt.c),kt=kt.p}function At(t,e){t&&t.i&&(xt.delete(t),t.i(e))}function Vt(t,e,n,r){if(t&&t.o){if(xt.has(t))return;xt.add(t),kt.c.push((()=>{xt.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}const jt={duration:0};function Dt(t,e,i){let o,a,l=e(t,i),c=!1,u=0;function d(){o&&tt(t,o)}function h(){const{delay:e=0,duration:i=300,easing:s=r,tick:h=n,css:p}=l||jt;p&&(o=function(t,e,n,r,i,o,a,l=0){const s=16.666/r;let c="{\n";for(let t=0;t<=1;t+=s){const r=e+(n-e)*o(t);c+=100*t+`%{${a(r,1-r)}}\n`}const u=c+`100% {${a(n,1-n)}}\n}`,d=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${l}`,h=V(t),{stylesheet:p,rules:f}=X.get(h)||function(t,e){const n={stylesheet:j(e),rules:{}};return X.set(t,n),n}(h,t);f[d]||(f[d]=!0,p.insertRule(`@keyframes ${d} ${u}`,p.cssRules.length));const g=t.style.animation||"";return t.style.animation=`${g?`${g}, `:""}${d} ${r}ms linear ${i}ms 1 both`,Q+=1,d}(t,0,1,i,e,s,p,u++)),h(0,1);const f=w()+e,g=f+i;a&&a.abort(),c=!0,mt((()=>wt(t,!0,"start"))),a=function(t){let e;return 0===k.size&&x(E),{promise:new Promise((n=>{k.add(e={c:t,f:n})})),abort(){k.delete(e)}}}((e=>{if(c){if(e>=g)return h(1,0),wt(t,!0,"end"),d(),c=!1;if(e>=f){const t=s((e-f)/i);h(t,1-t)}}return c}))}let p=!1;return{start(){p||(p=!0,tt(t),s(l)?(l=l(),(yt||(yt=Promise.resolve(),yt.then((()=>{yt=null}))),yt).then(h)):h())},invalidate(){p=!1},end(){c&&(d(),c=!1)}}}const Pt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function St(t,e){Vt(t,1,1,(()=>{e.delete(t.key)}))}function Ft(t,e){const n={},r={},i={$$scope:1};let o=t.length;for(;o--;){const a=t[o],l=e[o];if(l){for(const t in a)t in l||(r[t]=1);for(const t in l)i[t]||(n[t]=l[t],i[t]=1);t[o]=l}else for(const t in a)i[t]=1}for(const t in r)t in n||(n[t]=void 0);return n}let It;function zt(t){t&&t.c()}function Tt(t,e){t&&t.l(e)}function Mt(t,e,n,r){const{fragment:i,on_mount:a,on_destroy:c,after_update:u}=t.$$;i&&i.m(e,n),r||mt((()=>{const e=a.map(o).filter(s);c?c.push(...e):l(e),t.$$.on_mount=[]})),u.forEach(mt)}function Nt(t,e){const n=t.$$;null!==n.fragment&&(l(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Jt(t,e,r,i,o,s,c,u=[-1]){const d=Z;et(t);const h=t.$$={fragment:null,ctx:null,props:s,update:n,not_equal:o,bound:a(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(d?d.$$.context:[])),callbacks:a(),dirty:u,skip_bound:!1,root:e.target||d.$$.root};c&&c(h.root);let p=!1;if(h.ctx=r?r(t,e.props||{},((e,n,...r)=>{const i=r.length?r[0]:n;return h.ctx&&o(h.ctx[e],h.ctx[e]=i)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](i),p&&function(t,e){-1===t.$$.dirty[0]&&(st.push(t),ft(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],h.update(),p=!0,l(h.before_update),h.fragment=!!i&&i(h.ctx),e.target){if(e.hydrate){C=!0;const t=R(e.target);h.fragment&&h.fragment.l(t),t.forEach(S)}else h.fragment&&h.fragment.c();e.intro&&At(t.$$.fragment),Mt(t,e.target,e.anchor,e.customElement),C=!1,_t()}et(d)}new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),"function"==typeof HTMLElement&&(It=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(o).filter(s);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){l(this.$$.on_disconnect)}$destroy(){Nt(this,1),this.$destroy=n}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!h(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});class Ot{$destroy(){Nt(this,1),this.$destroy=n}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!h(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Bt=[];function Rt(t,e=n){let r;const i=new Set;function o(e){if(o=e,((n=t)!=n?o==o:n!==o||n&&"object"==typeof n||"function"==typeof n)&&(t=e,r)){const e=!Bt.length;for(const e of i)e[1](),Bt.push(e,t);if(e){for(let t=0;t<Bt.length;t+=2)Bt[t][0](Bt[t+1]);Bt.length=0}}var n,o}return{set:o,update:function(e){o(e(t))},subscribe:function(a,l=n){const s=[a,l];return i.add(s),1===i.size&&(r=e(o)||n),a(t),()=>{i.delete(s),0===i.size&&(r(),r=null)}}}}function Ut(t,e,r){const i=!Array.isArray(t),o=i?[t]:t,a=e.length<2;return{subscribe:Rt(r,(t=>{let r=!1;const c=[];let u=0,d=n;const h=()=>{if(u)return;d();const r=e(i?c[0]:c,t);a?t(r):d=s(r)?r:n},f=o.map(((t,e)=>p(t,(t=>{c[e]=t,u&=~(1<<e),r&&h()}),(()=>{u|=1<<e}))));return r=!0,h(),function(){l(f),d()}})).subscribe}}const Wt=Symbol("root");function Lt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t;return n.level=e.level||"error",e.additional&&(n.additional=e.additional),n}const qt={text:"divkit-d9b0e",text_halign_left:"divkit-a4cb7",text_halign_center:"divkit-e1659",text_halign_right:"divkit-ea280",text_valign_top:"divkit-d8ce0",text_valign_center:"divkit-ef58e",text_valign_bottom:"divkit-fe8ed",text_valign_baseline:"divkit-e0c6c",text__inner:"divkit-b8528",text_singleline:"divkit-ef11c",text_truncate_none:"divkit-c6ea1",text_multiline:"divkit-ee8e3",text__inner_gradient:"divkit-cb8e0",text__image:"divkit-bf6e2",text__image_hidden:"divkit-f1002"},Ht={outer:"divkit-d65a7","outer_hide-on-transition-in":"divkit-a6d12","outer_halign-self_start":"divkit-cc452","outer_halign-self_center":"divkit-b8331","outer_halign-self_end":"divkit-c573c","outer_halign-self_stretch":"divkit-dcc74","outer_valign-self_start":"divkit-e8077","outer_valign-self_center":"divkit-d40a7","outer_valign-self_end":"divkit-e9f84","outer_valign-self_stretch":"divkit-b7aa3","outer_parent-flex_vertical":"divkit-c143f","outer_parent-flex_horizontal":"divkit-ef302","outer_valign-self_baseline":"divkit-e72b5",outer_width_content:"divkit-b8f4d",outer_height_content:"divkit-faa66","outer_width-constrained":"divkit-d3211","outer_parent-grid":"divkit-ff439","outer_height-constrained":"divkit-a5256","outer_parent-overlap":"divkit-dab2d","outer_parent-overlap-absolute":"divkit-d43fb","outer_scroll-snap_center":"divkit-d9e38","outer_scroll-snap_start":"divkit-efd1e",outer__border:"divkit-d4056",outer_visibility_invisible:"divkit-f018b",outer_visibility_gone:"divkit-e784b","outer_has-action-animation":"divkit-f4980"};function Gt(t){if(!t)return;let e="";for(const n in t)if(t.hasOwnProperty(n)){if(!t[n]&&0!==t[n])continue;e&&(e+=";"),e+=n+":"+String(t[n])}return e||void 0}function Kt(t){if("number"!=typeof t&&"string"!=typeof t||!t)return"0";const e=Number(t);return isNaN(e)?"0":Math.ceil(1e3*e)/1e4+"em"}function Yt(t){let e=Kt(t);return"0"===e&&(e+="em"),e}function Xt(t,e){for(;t.length<e;)t="0"+t;return t}function Zt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"transparent";if("#"!==(t=(t||"").toLowerCase()).charAt(0))return n;const r=te(t);return r?(r.a*=e,Qt(r)):n}function Qt(t){return 255===t.a?"#".concat([t.r,t.g,t.b].map((t=>Xt(Math.round(t).toString(16),2))).join("")):"rgba(".concat(t.r,",").concat(t.g,",").concat(t.b,",").concat((t.a/255).toFixed(2),")")}function te(t){const e=t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||t.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])$/i)||t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)||t.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i);if(e){if(5===e.length){const[t,n,r,i,o]=e,a=2===r.length?r:r+r,l=2===i.length?i:i+i,s=2===o.length?o:o+o,c=2===n.length?n:n+n;return{a:parseInt(c,16),r:parseInt(a,16),g:parseInt(l,16),b:parseInt(s,16)}}const[t,n,r,i]=e,o=2===n.length?n:n+n,a=2===r.length?r:r+r,l=2===i.length?i:i+i;return{a:255,r:parseInt(o,16),g:parseInt(a,16),b:parseInt(l,16)}}return null}function ee(t){let e=String(t);return e.indexOf("&")>-1&&(e=e.replace(/&/g,"&")),e.indexOf("<")>-1&&(e=e.replace(/</g,"<")),e.indexOf(">")>-1&&(e=e.replace(/>/g,">")),e.indexOf('"')>-1&&(e=e.replace(/"/g,""")),e}const ne=Boolean;function re(t){if(1===t.length&&"solid"===t[0].type)return{color:Zt(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=Zt(t.bg.color||"transparent");return{size:void 0,pos:void 0,image:"linear-gradient(to bottom,".concat(e,",").concat(e,")")}}({bg:t}):"gradient"===t.type?function(t){var e;if(!Array.isArray(null===(e=t.bg)||void 0===e?void 0:e.colors))return;const n=t.bg.colors.filter(ne);return n.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+n.map((t=>Zt(t))).join(",")+")"}:void 0}({bg:t}):"image"===t.type?function(t){var e;const n=null===(e=t.bg)||void 0===e?void 0:e.image_url;if(n)return{size:ae(t.bg.scale),pos:le(t.bg),image:'url("'+ee(n)+'")'}}({bg:t}):"radial_gradient"===t.type?function(t){var e;if(!Array.isArray(null===(e=t.bg)||void 0===e?void 0:e.colors))return;const n=t.bg.colors.filter(ne);if(!n.length)return;const r=t.bg.radius;let i;r&&"object"==typeof r&&"type"in r&&void 0!==r.value&&("fixed"===r.type?i=Yt(r.value):"relative"===r.type&&(i=ie[r.value]));const o=oe(t.bg.center_x),a=oe(t.bg.center_y);return{size:void 0,pos:void 0,image:"radial-gradient("+"circle ".concat(i||"farthest-corner"," at ").concat(o," ").concat(a)+","+n.map((t=>Zt(t))).join(",")+")"}}({bg:t}):void 0)).filter(ne).reverse().reduce((function(t,e){return t.image.push(e.image),t.size.push(e.size||"auto"),t.position.push(e.pos||"50% 50%"),t}),{image:[],size:[],position:[]});return{image:e.image.join(","),size:e.size.join(","),position:e.position.join(",")}}const ie={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function oe(t){if(t&&"object"==typeof t&&"type"in t&&void 0!==t.value){if("fixed"===t.type)return Yt(t.value);if("relative"===t.type)return"".concat(100*Number(t.value),"%")}return"50%"}function ae(t){return"fill"!==t&&t?"fit"===t?"contain":void 0:"cover"}function le(t){let e,n;return e="left"===t.content_alignment_horizontal?"0%":"right"===t.content_alignment_horizontal?"100%":"50%",n="top"===t.content_alignment_vertical?"0%":"bottom"===t.content_alignment_vertical?"100%":"50%",e+" "+n}function se(t){const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}function ce(t,e){return e.has(t)}function ue(t,e){e&&t.push(e)}function de(t,e,n){const r=[];ue(r,e[t]);for(const i in n)if(n.hasOwnProperty(i)){const o=n[i];o&&ue(r,e["".concat(t,"_").concat(i)+("string"==typeof o?"_".concat(o):"")])}return r.join(" ")}const he=Symbol("state");function pe(t){return Kt(t.top||0)+" "+Kt(t.right||0)+" "+Kt(t.bottom||0)+" "+Kt(t.left||0)}function fe(t){if("number"!=typeof t&&"string"!=typeof t)return!1;const e=Number(t);return!isNaN(e)}function ge(t){return fe(t)&&t>=0}function me(t,e){if(!t)return e;const n=[t.top,t.right,t.bottom,t.left];for(let t=0;t<n.length;++t)if(n[t]&&!ge(n[t]))return e;return pe(t)}function ve(t,e){const n=Number(t);return isNaN(n)||n<0?e:n}const ye=Object.prototype.hasOwnProperty;function $e(t,e){if(Object.is(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return Object.is(t,e);const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++){const i=n[r];if(!ye.call(e,i)||!$e(t[i],e[i]))return!1}return!0}function _e(t,e){return $e(t,e)?e:t}function be(t,e){return"linear"===t||"ease"===t||"ease_in_out"===t||"ease_in"===t||"ease_out"===t?t:e}function we(t,e){const n=Number(t);return isNaN(n)?e:n}function xe(t){const e=[];return"set"===t.name?(t.items||[]).forEach((t=>{e.push(...xe(t))})):e.push(t),e}function ke(t,e){if(!t||"object"!=typeof t)return e;const n=["top","right","bottom","left"];for(let r=0;r<n.length;++r)if(t[n[r]]&&!ge(t[n[r]]))return e;return t}function Ee(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]].map((t=>Kt((t||e)/n*10))).join(" ")}function Ce(){}const Ae=Symbol("action");function Ve(t){const e=t.touches[0];return{x:e.clientX||e.pageX,y:e.clientY||e.pageY}}function je(t){var e;let n,r,o,a,c,u,d,h;const p=t[19].default,f=g(p,t,t[18],null);let m=[{class:r=t[2]+(t[9]?" ".concat(t[6]?"divkit-bd259":"divkit-d9099"," ").concat("divkit-c016b"):"")+" "+(null!==(e=t[1])&&void 0!==e&&e.length?"divkit-f0cba":"")},{style:t[3]},{role:o=t[9]?"button":null},{tabindex:a=t[9]?0:null},t[4]],b={};for(let t=0;t<m.length;t+=1)b=i(b,m[t]);return{c(){n=I("span"),f&&f.c(),this.h()},l(t){n=L(t,"SPAN",{class:!0,style:!0,role:!0,tabindex:!0});var e=R(n);f&&f.l(e),e.forEach(S),this.h()},h(){B(n,b)},m(e,r){P(e,n,r),f&&f.m(n,null),u=!0,d||(h=[_(c=t[5].call(null,n)),J(n,"click",(function(){s(t[9]?t[10]:null)&&(t[9]?t[10]:null).apply(this,arguments)})),J(n,"click",t[21]),J(n,"dblclick",(function(){var e,n;s(null!==(e=t[0])&&void 0!==e&&e.length?t[11]:null)&&(null!==(n=t[0])&&void 0!==n&&n.length?t[11]:null).apply(this,arguments)})),J(n,"touchstart",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[12]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[12]:null).apply(this,arguments)})),J(n,"touchmove",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[13]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[13]:null).apply(this,arguments)})),J(n,"touchend",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),J(n,"touchcancel",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),J(n,"keydown",t[15])],d=!0)},p(e,i){var l;t=e,f&&f.p&&(!u||262144&i)&&y(f,p,t,t[18],u?v(p,t[18],i,null):$(t[18]),null),B(n,b=Ft(m,[(!u||582&i&&r!==(r=t[2]+(t[9]?" ".concat(t[6]?"divkit-bd259":"divkit-d9099"," ").concat("divkit-c016b"):"")+" "+(null!==(l=t[1])&&void 0!==l&&l.length?"divkit-f0cba":"")))&&{class:r},(!u||8&i)&&{style:t[3]},(!u||512&i&&o!==(o=t[9]?"button":null))&&{role:o},(!u||512&i&&a!==(a=t[9]?0:null))&&{tabindex:a},16&i&&t[4]]))},i(t){u||(At(f,t),u=!0)},o(t){Vt(f,t),u=!1},d(t){t&&S(n),f&&f.d(t),d=!1,l(h)}}}function De(t){var e;let n,r,o,a,c,u;const d=t[19].default,h=g(d,t,t[18],null);let p=[{href:t[7]},{target:t[8]},{style:t[3]},{class:r=t[2]+" "+(t[6]?"divkit-bd259":"divkit-d9099")+" "+(null!==(e=t[1])&&void 0!==e&&e.length?"divkit-f0cba":"")},t[4]],f={};for(let t=0;t<p.length;t+=1)f=i(f,p[t]);return{c(){n=I("a"),h&&h.c(),this.h()},l(t){n=L(t,"A",{href:!0,target:!0,style:!0,class:!0});var e=R(n);h&&h.l(e),e.forEach(S),this.h()},h(){B(n,f)},m(e,r){P(e,n,r),h&&h.m(n,null),a=!0,c||(u=[_(o=t[5].call(null,n)),J(n,"click",t[10]),J(n,"click",t[20]),J(n,"dblclick",(function(){var e,n;s(null!==(e=t[0])&&void 0!==e&&e.length?t[11]:null)&&(null!==(n=t[0])&&void 0!==n&&n.length?t[11]:null).apply(this,arguments)})),J(n,"touchstart",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[12]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[12]:null).apply(this,arguments)})),J(n,"touchmove",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[13]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[13]:null).apply(this,arguments)})),J(n,"touchend",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),J(n,"touchcancel",(function(){var e,n;s(null!==(e=t[1])&&void 0!==e&&e.length?t[14]:null)&&(null!==(n=t[1])&&void 0!==n&&n.length?t[14]:null).apply(this,arguments)})),J(n,"keydown",t[15])],c=!0)},p(e,i){var o;t=e,h&&h.p&&(!a||262144&i)&&y(h,d,t,t[18],a?v(d,t[18],i,null):$(t[18]),null),B(n,f=Ft(p,[(!a||128&i)&&{href:t[7]},(!a||256&i)&&{target:t[8]},(!a||8&i)&&{style:t[3]},(!a||70&i&&r!==(r=t[2]+" "+(t[6]?"divkit-bd259":"divkit-d9099")+" "+(null!==(o=t[1])&&void 0!==o&&o.length?"divkit-f0cba":"")))&&{class:r},16&i&&t[4]]))},i(t){a||(At(h,t),a=!0)},o(t){Vt(h,t),a=!1},d(t){t&&S(n),h&&h.d(t),c=!1,l(u)}}}function Pe(t){let e,n,r,i;const o=[De,je],a=[];function l(t,e){return t[7]?0:1}return e=l(t),n=a[e]=o[e](t),{c(){n.c(),r=N()},l(t){n.l(t),r=N()},m(t,n){a[e].m(t,n),P(t,r,n),i=!0},p(t,i){let[s]=i,c=e;e=l(t),e===c?a[e].p(t,s):(Et(),Vt(a[c],1,1,(()=>{a[c]=null})),Ct(),n=a[e],n?n.p(t,s):(n=a[e]=o[e](t),n.c()),At(n,1),n.m(r.parentNode,r))},i(t){i||(At(n),i=!0)},o(t){Vt(n),i=!1},d(t){a[e].d(t),t&&S(r)}}}function Se(t,e,n){let{$$slots:r={},$$scope:i}=e,{actions:o}=e,{doubleTapActions:a}=e,{longTapActions:l}=e,{cls:s=""}=e,{style:c=null}=e,{attrs:u}=e,{use:d=Ce}=e,{customAction:h=null}=e,{isNativeActionAnimation:p=!0}=e;const f=at(Wt),g=at(Ae);ot(Ae,{hasAction:()=>Boolean(g.hasAction()||(null==o?void 0:o.length))});let m,v="",y=-1,$=null,_=!1;if(Array.isArray(o)&&(null==o?void 0:o.length))for(let t=0;t<o.length;++t){const e=o[t].url;if(e){v=e,m=o[t].target||void 0;break}}Array.isArray(o)&&(null==o?void 0:o.length)&&g.hasAction()&&(v="",f.logError(Lt(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:o}})));let b=Boolean(h);return v&&!ce(se(v),f.getBuiltinProtocols())&&(v="",b=!0),t.$$set=t=>{"actions"in t&&n(16,o=t.actions),"doubleTapActions"in t&&n(0,a=t.doubleTapActions),"longTapActions"in t&&n(1,l=t.longTapActions),"cls"in t&&n(2,s=t.cls),"style"in t&&n(3,c=t.style),"attrs"in t&&n(4,u=t.attrs),"use"in t&&n(5,d=t.use),"customAction"in t&&n(17,h=t.customAction),"isNativeActionAnimation"in t&&n(6,p=t.isNativeActionAnimation),"$$scope"in t&&n(18,i=t.$$scope)},[a,l,s,c,u,d,p,v,m,b,async function(t){g.hasAction()||void 0!==t.button&&0!==t.button||(!1===(null==h?void 0:h(t))?t.preventDefault():o&&(o.some((t=>{const e=null==t?void 0:t.url;if(!e)return!1;const n=se(e);return n&&!ce(n,f.getBuiltinProtocols())}))&&t.preventDefault(),f.execAnyActions(o)))},function(t){g.hasAction()||void 0!==t.button&&0!==t.button||f.execAnyActions(a,!0)},function(t){t.touches.length>1||($=Ve(t),_=!1,y=Date.now())},function(t){if(!$)return;const e=Ve(t);(Math.abs($.x-e.x)>8||Math.abs($.y-e.y)>8)&&(_=!0)},function(){!$||y<0||(!_&&Date.now()-y>=400&&f.execAnyActions(l,!0),$=null,y=-1)},function(t){t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||"Enter"===t.key&&Array.isArray(o)&&o.length&&(f.execAnyActions(o),t.preventDefault())},o,h,i,r,function(e){lt.call(this,t,e)},function(e){lt.call(this,t,e)}]}const Fe=class extends Ot{constructor(t){super(),Jt(this,t,Se,Pe,d,{actions:16,doubleTapActions:0,longTapActions:1,cls:2,style:3,attrs:4,use:5,customAction:17,isNativeActionAnimation:6})}};function Ie(t){return fe(t)&&t>0}function ze(t,e){return t.map((t=>{if("blur"===(null==t?void 0:t.type)){if(Ie(t.radius))return"blur(".concat(Yt(t.radius/2),")")}else e(Lt(new Error("Unknown filter"),{level:"warn",additional:{filter:null==t?void 0:t.type}}))})).filter(Boolean).join(" ")}function Te(t,e,n){const r=t.slice();return r[5]=e[n],r}function Me(t){let e,n,r;return{c(){e=I("span"),this.h()},l(t){e=L(t,"SPAN",{class:!0,style:!0}),R(e).forEach(S),this.h()},h(){O(e,"class",n="divkit-b921d"),O(e,"style",r=Gt(t[5].style))},m(t,n){P(t,e,n)},p(t,n){2&n&&r!==(r=Gt(t[5].style))&&O(e,"style",r)},d(t){t&&S(e)}}}function Ne(t){let e,n,r,i,o,a;return{c(){e=I("img"),this.h()},l(t){e=L(t,"IMG",{src:!0,alt:!0,"aria-hidden":!0,loading:!0,decoding:!0,class:!0,style:!0}),this.h()},h(){u(e.src,n=t[5].image_url)||O(e,"src",n),O(e,"alt",""),O(e,"aria-hidden","true"),O(e,"loading","lazy"),O(e,"decoding","async"),O(e,"class",r="divkit-b921d"),O(e,"style",i=Gt(t[5].style))},m(n,r){P(n,e,r),o||(a=J(e,"error",t[2]),o=!0)},p(t,r){2&r&&!u(e.src,n=t[5].image_url)&&O(e,"src",n),2&r&&i!==(i=Gt(t[5].style))&&O(e,"style",i)},d(t){t&&S(e),o=!1,a()}}}function Je(t){let e;function n(t,e){return t[5].image_url?Ne:Me}let r=n(t),i=r(t);return{c(){i.c(),e=N()},l(t){i.l(t),e=N()},m(t,n){i.m(t,n),P(t,e,n)},p(t,o){r===(r=n(t))&&i?i.p(t,o):(i.d(1),i=r(t),i&&(i.c(),i.m(e.parentNode,e)))},d(t){i.d(t),t&&S(e)}}}function Oe(t){let e,r,i=t[1],o=[];for(let e=0;e<i.length;e+=1)o[e]=Je(Te(t,i,e));return{c(){e=I("span");for(let t=0;t<o.length;t+=1)o[t].c();this.h()},l(t){e=L(t,"SPAN",{class:!0});var n=R(e);for(let t=0;t<o.length;t+=1)o[t].l(n);n.forEach(S),this.h()},h(){O(e,"class",r="divkit-bf253"+(t[0]?" divkit-dcad7":"")),Y(e,"border-radius",t[0],!1)},m(t,n){P(t,e,n);for(let t=0;t<o.length;t+=1)o[t].m(e,null)},p(t,n){let[a]=n;if(6&a){let n;for(i=t[1],n=0;n<i.length;n+=1){const r=Te(t,i,n);o[n]?o[n].p(r,a):(o[n]=Je(r),o[n].c(),o[n].m(e,null))}for(;n<o.length;n+=1)o[n].d(1);o.length=i.length}1&a&&r!==(r="divkit-bf253"+(t[0]?" divkit-dcad7":""))&&O(e,"class",r),1&a&&Y(e,"border-radius",t[0],!1)},i:n,o:n,d(t){t&&S(e),F(o,t)}}}function Be(t,e,n){let r,{background:i=[]}=e,{radius:o=""}=e;const a=at(Wt);return t.$$set=t=>{"background"in t&&n(3,i=t.background),"radius"in t&&n(0,o=t.radius)},t.$$.update=()=>{8&t.$$.dirty&&n(1,r=i.map((t=>{const e={},n={style:e};if("nine_patch_image"===t.type&&t.insets)e["border-image"]='url("'.concat(t.image_url,'") ').concat(t.insets.top||0," ").concat(t.insets.right||0," ").concat(t.insets.bottom||0," ").concat(t.insets.left||0," fill"),e["border-image-width"]="auto";else{const r=re([t]);"solid"===t.type&&(e["background-color"]=r.color),"gradient"===t.type&&(e["background-image"]=r.image),"image"===t.type&&(e.opacity=Number(t.alpha),n.image_url=t.image_url,e["object-fit"]=r.size,e["object-position"]=r.position,Array.isArray(t.filters)&&t.filters.length&&(e.filter=ze(t.filters,a.logError)))}return n})))},[o,r,function(t){t.target&&"classList"in t.target&&t.target.classList.add("divkit-cd613")},i]}const Re=class extends Ot{constructor(t){super(),Jt(this,t,Be,Oe,d,{background:3,radius:0})}};function Ue(t){let e,n;return e=new Fe({props:{use:t[32],cls:t[0]+" "+de("outer",Ht,t[15]),style:Gt(t[13]),actions:t[10],doubleTapActions:t[11],longTapActions:t[12],attrs:t[6],isNativeActionAnimation:!t[4].length||Ge(t[4]),$$slots:{default:[qe]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};32769&n[0]&&(r.cls=t[0]+" "+de("outer",Ht,t[15])),8192&n[0]&&(r.style=Gt(t[13])),1024&n[0]&&(r.actions=t[10]),2048&n[0]&&(r.doubleTapActions=t[11]),4096&n[0]&&(r.longTapActions=t[12]),64&n[0]&&(r.attrs=t[6]),16&n[0]&&(r.isNativeActionAnimation=!t[4].length||Ge(t[4])),174&n[0]|131072&n[3]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function We(t){let e,n;return e=new Re({props:{background:t[5],radius:t[2]}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};32&n[0]&&(r.background=t[5]),4&n[0]&&(r.radius=t[2]),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function Le(t){let e,n,r;return{c(){e=I("span"),this.h()},l(t){e=L(t,"SPAN",{class:!0,style:!0}),R(e).forEach(S),this.h()},h(){O(e,"class",n=Ht.outer__border),O(e,"style",r=Gt(t[1]))},m(t,n){P(t,e,n)},p(t,n){2&n[0]&&r!==(r=Gt(t[1]))&&O(e,"style",r)},d(t){t&&S(e)}}}function qe(t){let e,n,r,i=t[3]&&We(t);const o=t[109].default,a=g(o,t,t[110],null);let l=t[7]&&Le(t);return{c(){i&&i.c(),e=N(),a&&a.c(),l&&l.c(),n=N()},l(t){i&&i.l(t),e=N(),a&&a.l(t),l&&l.l(t),n=N()},m(t,o){i&&i.m(t,o),P(t,e,o),a&&a.m(t,o),l&&l.m(t,o),P(t,n,o),r=!0},p(t,s){t[3]?i?(i.p(t,s),8&s[0]&&At(i,1)):(i=We(t),i.c(),At(i,1),i.m(e.parentNode,e)):i&&(Et(),Vt(i,1,1,(()=>{i=null})),Ct()),a&&a.p&&(!r||131072&s[3])&&y(a,o,t,t[110],r?v(o,t[110],s,null):$(t[110]),null),t[7]?l?l.p(t,s):(l=Le(t),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},i(t){r||(At(i),At(a,t),r=!0)},o(t){Vt(i),Vt(a,t),r=!1},d(t){i&&i.d(t),t&&S(e),a&&a.d(t),l&&l.d(t),t&&S(n)}}}function He(t){let e,n,r=!t[8]&&!t[9]&&Ue(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[8]||t[9]?r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct()):r?(r.p(t,n),768&n[0]&&At(r,1)):(r=Ue(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Ge(t){return t.some((t=>"native"===t.name))}function Ke(t,e,r){let i,o,a,l,s,c,u,d,h,f,g,m,v,y,$,_,b,w,x,k,E,C,A,V,j,D,P,S,F,I,z,T,M,N,J,O,B,R,U,W,L,q=n,H=n,G=n,K=n,Y=n,X=n,Z=n,Q=n,tt=n,et=n,nt=n,rt=n,it=n,ot=n,lt=n,st=n,ct=n;t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Z())),t.$$.on_destroy.push((()=>Q())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>et())),t.$$.on_destroy.push((()=>nt())),t.$$.on_destroy.push((()=>rt())),t.$$.on_destroy.push((()=>it())),t.$$.on_destroy.push((()=>ot())),t.$$.on_destroy.push((()=>lt())),t.$$.on_destroy.push((()=>st())),t.$$.on_destroy.push((()=>ct()));let{$$slots:ut={},$$scope:dt}=e;var ht,pt,ft,mt,vt,yt;let{json:$t={}}=e,{origJson:_t}=e,{templateContext:bt}=e,{cls:wt=""}=e,{style:xt}=e,{layoutParams:kt={}}=e,{customDescription:Et=!1}=e,{customPaddings:Ct=!1}=e,{customActions:At=""}=e,{additionalPaddings:Vt=null}=e;const jt={left:"start",center:"center",right:"end"},Dt={top:"start",center:"center",bottom:"end",baseline:"baseline"},Pt=at(Wt),St=at(he);let Ft,It,zt,Tt,Mt,Nt,Jt,Ot,Bt,Rt,Ut,qt={},Ht={},Gt=!1,Xt=1,Qt="transparent",te=0,ee={"top-left":0,"top-right":0,"bottom-right":0,"bottom-left":0},ne="",ie=null,oe="",ae={},le=0,ue=0,de=0,fe=!1,ye=!1,$e={},Ce=0,Ae=0,Ve=0,je=!1,De=!1,Pe=1;const Se=kt.fakeElement?[]:$t.transition_triggers||["state_change","visibility_change"],Fe=-1!==Se.indexOf("state_change")&&$t.id,Ie=-1!==Se.indexOf("visibility_change")&&$t.id;let ze,Te,Me,Ne,Je,Oe,Be,Re=[],Ue=[],We=[],Le=[],qe="";function He(t){const e=we(t.start_value,1),n=we(t.end_value,1),i=ve(t.start_delay,0),o=ve(t.duration,300),a=be(t.interpolator,"ease_in_out").replace(/_/g,"-");switch(t.name){case"fade":return r(78,Ne=e),r(79,Je=n),"opacity ".concat(o,"ms ").concat(a," ").concat(i,"ms");case"scale":return r(80,Oe=e),r(81,Be=n),"transform ".concat(o,"ms ").concat(a," ").concat(i,"ms");case"native":case"no_animation":return"";default:return Pt.logError(Lt(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}}let Ge,Ke,Ye=!1,Xe="visible",Ze=0,Qe=0;return t.$$set=t=>{"json"in t&&r(33,$t=t.json),"origJson"in t&&r(34,_t=t.origJson),"templateContext"in t&&r(35,bt=t.templateContext),"cls"in t&&r(0,wt=t.cls),"style"in t&&r(36,xt=t.style),"layoutParams"in t&&r(37,kt=t.layoutParams),"customDescription"in t&&r(38,Et=t.customDescription),"customPaddings"in t&&r(39,Ct=t.customPaddings),"customActions"in t&&r(40,At=t.customActions),"additionalPaddings"in t&&r(41,Vt=t.additionalPaddings),"$$scope"in t&&r(110,dt=t.$$scope)},t.$$.update=()=>{if(4&t.$$.dirty[1]&&(r(31,i=Pt.getDerivedFromVars($t.border)),ct(),ct=p(i,(t=>r(108,L=t)))),2&t.$$.dirty[0]|4192256&t.$$.dirty[1]|32768&t.$$.dirty[3]){let t={},e={},n=!1,i="";if(L){if(L.has_shadow){const e=L.shadow;t["box-shadow"]=e?Kt((null===r(43,pt=null===r(42,ht=e.offset)||void 0===ht?void 0:ht.x)||void 0===pt?void 0:pt.value)||0)+" "+Kt((null===r(45,mt=null===r(44,ft=e.offset)||void 0===ft?void 0:ft.y)||void 0===mt?void 0:mt.value)||0)+" "+Kt(null!==r(46,vt=e.blur)&&void 0!==vt?vt:2)+" "+Zt(e.color||"#000000",null!==r(47,yt=e.alpha)&&void 0!==yt?yt:.19):"0 1px 2px 0 rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.07)"}if(L.stroke&&(n=!0,r(49,Xt=ve(L.stroke.width,Xt)),r(50,Qt=Zt(L.stroke.color,1,Qt)),e.border="".concat(Kt(Xt)," solid ").concat(Qt)),L.corners_radius?(r(52,ee=function(t,e){const n=[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]];for(let t=0;t<n.length;++t)if(n[t]&&!ge(n[t]))return e;return t}(L.corners_radius,ee)),e["border-radius"]=t["border-radius"]=Ee(ee)):L.corner_radius&&(r(51,te=ve(L.corner_radius,te)),r(52,ee={"top-left":te,"top-right":te,"bottom-right":te,"bottom-left":te}),e["border-radius"]=t["border-radius"]=Kt(te)),n&&Xt&&(L.corners_radius||L.corner_radius)){let t=Object.assign({},ee);["top-left","top-right","bottom-right","bottom-left"].forEach((e=>{t[e]=(t[e]||0)+Xt/2})),i=Ee(t)}}r(48,qt=_e(t,qt)),r(1,Ht=_e(e,Ht)),r(7,Gt=n),r(2,ne=i)}if(4&t.$$.dirty[1]&&(r(30,o=Pt.getDerivedFromVars($t.paddings)),st(),st=p(o,(t=>r(107,W=t)))),4194560&t.$$.dirty[1]|16384&t.$$.dirty[3]&&r(53,ie=ke(W&&!Ct?W:void 0,ie)),4195328&t.$$.dirty[1]&&r(89,a=pe(function(t,e){if(!t&&!e)return{};if(!e)return t;if(!t)return e;const n={};return["top","right","bottom","left"].forEach((r=>{const i=t[r];i&&(n[r]=i);const o=e[r];o&&(n[r]=(n[r]||0)+o)})),n}(ie,Vt))),4&t.$$.dirty[1]&&(r(29,l=Pt.getDerivedFromVars($t.margins)),ot(),ot=p(l,(t=>r(105,R=t)))),8388608&t.$$.dirty[1]|4096&t.$$.dirty[3]&&r(54,oe=me(R,oe)),4&t.$$.dirty[1]&&(r(28,s=Pt.getDerivedFromVars($t.width)),rt(),rt=p(s,(t=>r(103,O=t)))),4&t.$$.dirty[1]&&(r(27,c=Pt.getDerivedFromVars($t.alignment_horizontal)),lt(),lt=p(c,(t=>r(106,U=t)))),285212736&t.$$.dirty[1]|13312&t.$$.dirty[3]){let t,e,n,i,o={},a=0,l=0,s=!1,c=!1;const u=null==O?void 0:O.type;if("fixed"===u)r(59,le=ve(null==O?void 0:O.value,le)),e=Kt(le);else if("wrap_content"!==u&&(kt.overlapParent||"match_parent"!==u&&u||!kt.parentHorizontalWrapContent))t="parent","vertical"===kt.parentContainerOrientation&&kt.parentContainerWrap&&(c=!0,Pt.logError(Lt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"vertical"===kt.parentLayoutOrientation?e="calc(100% - ".concat(Yt(((null==R?void 0:R.left)||0)+((null==R?void 0:R.right)||0)),")"):"horizontal"===kt.parentContainerOrientation&&(a=O&&"weight"in O&&O.weight||1,kt.parentContainerWrap&&(s=!0));else{if(t="content",("wrap_content"===u&&(null==O?void 0:O.constrained)||("match_parent"===u||!u)&&kt.parentHorizontalWrapContent)&&(o["width-constrained"]=!0,"horizontal"===kt.parentContainerOrientation&&(l=1)),"wrap_content"===u){const t=O;t.min_size&&ge(t.min_size.value)&&(n=Kt(t.min_size.value)),t.max_size&&ge(t.max_size.value)&&(i=Kt(t.max_size.value))}"match_parent"!==u&&u||Pt.logError(Lt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}if("parent"===t)o["halign-self"]="stretch";else{const t=U;o["halign-self"]="left"===t||"center"===t||"right"===t?jt[t]:kt.parentHAlign||"start"}t&&(o.width=t),r(56,zt=e),r(57,Tt=n),r(58,Mt=i),r(60,ue=a),r(61,de=l),r(55,ae=_e(o,ae)),r(62,fe=s),r(8,ye=c)}if(4&t.$$.dirty[1]&&(r(26,u=Pt.getDerivedFromVars($t.height)),nt(),nt=p(u,(t=>r(102,J=t)))),4&t.$$.dirty[1]&&(r(25,d=Pt.getDerivedFromVars($t.alignment_vertical)),it(),it=p(d,(t=>r(104,B=t)))),64&t.$$.dirty[1]|34&t.$$.dirty[2]|6656&t.$$.dirty[3]){let t,e,n,i,o={},a=0,l=0,s=!1,c=!1;const u=null==J?void 0:J.type;if("fixed"===u)r(67,Ce=ve(null==J?void 0:J.value,Ce)),e=Kt(Ce);else if("match_parent"!==u||!kt.overlapParent&&kt.parentVerticalWrapContent){if(t="content",("wrap_content"===u&&(null==J?void 0:J.constrained)||"match_parent"===u&&kt.parentVerticalWrapContent)&&(o["height-constrained"]=!0,"vertical"===kt.parentContainerOrientation&&(l=1)),"wrap_content"===u){const t=J;(null==t?void 0:t.min_size)&&ge(t.min_size.value)&&(n=Kt(t.min_size.value)),(null==t?void 0:t.max_size)&&ge(t.max_size.value)&&(i=Kt(t.max_size.value))}"match_parent"===u&&Pt.logError(Lt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}else t="parent","horizontal"===kt.parentContainerOrientation&&kt.parentContainerWrap&&(c=!0,Pt.logError(Lt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"horizontal"===kt.parentLayoutOrientation?e="calc(100% - ".concat(Yt(((null==R?void 0:R.top)||0)+((null==R?void 0:R.bottom)||0)),")"):"vertical"===kt.parentContainerOrientation&&(a=(null==J?void 0:J.weight)||1,kt.parentContainerWrap&&(s=!0));if("parent"===t)o["valign-self"]="stretch";else{const t=B;"top"===t||"center"===t||"bottom"===t||"baseline"===t&&"horizontal"===kt.parentContainerOrientation?o["valign-self"]=Dt[t]:o["valign-self"]=kt.parentVAlign||"start"}t&&(o.height=t),r(64,Nt=e),r(65,Jt=n),r(66,Ot=i),r(68,Ae=a),r(69,Ve=l),r(63,$e=_e(o,$e)),r(70,je=s),r(9,De=c)}var e,n;if(64&t.$$.dirty[1]&&r(92,h=!!kt.overlapParent||void 0),64&t.$$.dirty[1]|1536&t.$$.dirty[3]&&r(91,f=kt.overlapParent&&(!O||"match_parent"===O.type)&&"match_parent"===(null==J?void 0:J.type)),64&t.$$.dirty[1]&&r(90,g=kt.gridArea?"".concat(kt.gridArea.y+1,"/").concat(kt.gridArea.x+1,"/span ").concat(kt.gridArea.rowSpan,"/span ").concat(kt.gridArea.colSpan):void 0),4&t.$$.dirty[1]&&(r(24,m=Pt.getDerivedFromVars($t.alpha)),et(),et=p(m,(t=>r(101,N=t)))),512&t.$$.dirty[2]|256&t.$$.dirty[3]&&(r(71,(n=Pe,Pe=!ge(e=N)||void 0===e||e>1?n:Number(e))),r(72,Bt=1===Pe?void 0:Pe)),4&t.$$.dirty[1]&&(r(23,v=Pt.getDerivedFromVars($t.accessibility)),tt(),tt=p(v,(t=>r(100,M=t)))),128&t.$$.dirty[1]|128&t.$$.dirty[3]&&(r(6,It=void 0),M&&!Et&&M.description&&(r(6,It={}),r(6,It["aria-label"]=M.description,It))),4&t.$$.dirty[1]&&(r(22,y=Pt.getDerivedFromVars($t.background)),Q(),Q=p(y,(t=>r(5,T=t)))),44&t.$$.dirty[0]&&(r(73,Rt={}),r(3,Ut=!1),T&&(r(3,Ut=T.some((t=>"image"===t.type||"nine_patch_image"===t.type))||Boolean(ne)),!Ut))){const t=re(T);r(73,Rt["background-color"]=t.color,Rt),r(73,Rt["background-image"]=t.image,Rt),r(73,Rt["background-size"]=t.size,Rt),r(73,Rt["background-position"]=t.position,Rt),r(73,Rt["background-repeat"]="no-repeat",Rt)}if(4&t.$$.dirty[1]&&(r(74,ze=void 0),Fe&&$t.transition_in&&Pt.isRunning("stateChange")&&r(74,ze=!0)),4&t.$$.dirty[1]&&(r(76,Me=void 0),Fe&&$t.transition_change&&Pt.isRunning("stateChange")&&St.hasTransitionChange($t.id)&&r(76,Me=!0)),4&t.$$.dirty[1]&&(r(21,$=Pt.getDerivedFromVars($t.action)),X(),X=p($,(t=>r(98,I=t)))),4&t.$$.dirty[1]&&(r(20,_=Pt.getDerivedFromVars($t.actions)),Z(),Z=p(_,(t=>r(99,z=t)))),4&t.$$.dirty[1]&&(r(19,b=Pt.getDerivedFromVars($t.doubletap_actions)),Y(),Y=p(b,(t=>r(97,F=t)))),4&t.$$.dirty[1]&&(r(18,w=Pt.getDerivedFromVars($t.longtap_actions)),K(),K=p(w,(t=>r(96,S=t)))),576&t.$$.dirty[1]|120&t.$$.dirty[3]){let t=z||I&&[I]||[],e=F||[],n=S||[];kt.fakeElement?(t=[],e=[],n=[]):(Array.isArray(t)||(t=[],Pt.logError(Lt(new Error("Actions should be array")))),Array.isArray(e)||(e=[],Pt.logError(Lt(new Error("DoubleTapActions should be array")))),Array.isArray(n)||(n=[],Pt.logError(Lt(new Error("LongTapActions should be array"))))),(t.length||e.length||n.length)&&At&&(t=[],e=[],n=[],Pt.logError(Lt(new Error('Cannot use action on component "'.concat(At,'"'))))),r(10,Re=t),r(11,Ue=e),r(12,We=n)}if(4&t.$$.dirty[1]&&(r(17,x=Pt.getDerivedFromVars($t.action_animation)),G(),G=p(x,(t=>r(95,P=t)))),16&t.$$.dirty[0]|4&t.$$.dirty[3]&&P&&(r(4,Le=xe(P)),r(77,qe=Le.map(He).filter(Boolean).join(", "))),4&t.$$.dirty[1]&&(r(16,k=Pt.getDerivedFromVars($t.visibility)),H(),H=p(k,(t=>r(94,D=t)))),3145728&t.$$.dirty[2]|2&t.$$.dirty[3]){const t=Xe,e=function(t,e){return"visible"===t||"invisible"===t||"gone"===t?t:e}(D,Xe);t!==e&&(!Ye||"visible"!==Xe&&"visible"!==e?r(83,Xe=e):async function(t){r(83,Xe=t);const e="visible"===t?"in":"out",n="in"===e?$t.transition_in:$t.transition_out;Ie&&n&&(await gt(),"in"===e&&r(75,Te=!0),St.runVisibilityTransition(Object.assign(Object.assign({},$t),{visibility:"visible"}),bt,n,Ft,e).then((()=>{"in"===e&&r(75,Te=!1)})).catch((t=>{throw"in"===e&&r(75,Te=!1),t})))}(e)),Ye||r(82,Ye=!0)}if(16777280&t.$$.dirty[1]|1612771330&t.$$.dirty[2]&&r(15,E=Object.assign(Object.assign(Object.assign({},ae),$e),{"parent-overlap":h,"parent-overlap-absolute":f,"scroll-snap":kt.scrollSnap,"hide-on-transition-in":ze||Te||Me,visibility:Xe,"has-action-animation":Boolean(qe),"parent-flex":kt.parentContainerOrientation||void 0,"parent-grid":Boolean(kt.gridArea)||void 0})),4&t.$$.dirty[1]&&(r(14,C=Pt.getDerivedFromVars($t.transform)),q(),q=p(C,(t=>r(93,j=t)))),12582912&t.$$.dirty[2]|1&t.$$.dirty[3]&&j&&void 0!==j.rotation){const t=j.pivot_x||{type:"pivot-percentage",value:50};r(84,Ze=we(t.value,Ze));const e="pivot-fixed"===t.type?Kt(Ze):"".concat(Ze,"%"),n=j.pivot_y||{type:"pivot-percentage",value:50};r(85,Qe=we(n.value,Qe));const i="pivot-fixed"===n.type?Kt(Qe):"".concat(Qe,"%");r(86,Ge="".concat(e," ").concat(i)),r(87,Ke="rotate(".concat(j.rotation,"deg)"))}536870912&t.$$.dirty[1]|321&t.$$.dirty[2]&&r(88,A=fe||je?"100%":ue||Ae?0:void 0),1854013472&t.$$.dirty[1]|521112796&t.$$.dirty[2]&&r(13,V=Object.assign(Object.assign(Object.assign(Object.assign({},xt),Rt),qt),{width:zt,"min-width":Tt,"max-width":Mt,height:Nt,"min-height":Jt,"max-height":Ot||(null==xt?void 0:xt["max-height"]),"grid-area":g,padding:a,margin:oe,opacity:Bt,transition:qe,"transform-origin":Ge,transform:Ke,"flex-grow":ue||Ae||void 0,"flex-shrink":de||Ve?1:void 0,"flex-basis":A,"--divkit-animation-opacity-start":Ne,"--divkit-animation-opacity-end":Je,"--divkit-animation-scale-start":Oe,"--divkit-animation-scale-end":Be}))},[wt,Ht,ne,Ut,Le,T,It,Gt,ye,De,Re,Ue,We,V,C,E,k,x,w,b,_,$,y,v,m,d,u,c,s,l,o,i,function(t){Ft=t,Fe&&$t.transition_in&&St.registerChildWithTransitionIn($t,bt,$t.transition_in,t).then((()=>{r(74,ze=!1)})).catch((t=>{throw r(74,ze=!1),t})),Fe&&$t.transition_out&&St.registerChildWithTransitionOut($t,bt,$t.transition_out,t),Fe&&$t.transition_change&&St.registerChildWithTransitionChange($t,bt,$t.transition_change,t).then((()=>{r(76,Me=!1)})).catch((t=>{throw r(76,Me=!1),t}));const e=kt.fakeElement?[]:$t.visibility_actions||$t.visibility_action&&[$t.visibility_action];Array.isArray(e)&&e.length&&function(t,e){let{visibilityActions:n,rootCtx:r}=e;const i=n.map(((t,e)=>({index:e,action:t,visible:!1,count:0,finished:!1}))),o=n.map((t=>r.getJsonWithVars({visibility_percentage:t.visibility_percentage,visibility_duration:t.visibility_duration,log_limit:t.log_limit}))),a=[...new Set([...n.map(((t,e)=>(o[e].visibility_percentage||50)/100))])];new IntersectionObserver((t=>{t.forEach((t=>{i.forEach((e=>{const n=t.intersectionRatio>=(e.action.visibility_percentage||50)/100;!e.visible&&n?e.finished||(e.timer=setTimeout((()=>{++e.count;const t=o[e.index],n=0===t.log_limit?1/0:t.log_limit||1;++e.count>=n&&(e.finished=!0);const i=r.getJsonWithVars(e.action),a=i.url;if(a){const t=se(a);t&&!ce(t,r.getBuiltinProtocols())&&("div-action"===t?r.execAction(i):i.log_id&&r.execCustomAction(i))}r.logStat("visible",i)}),o[e.index].visibility_duration||800)):n||e.timer&&clearTimeout(e.timer),e.visible=n}))}))}),{threshold:a}).observe(t)}(t,{visibilityActions:e,rootCtx:Pt});const n=$t.id;n&&St.registerChild(n);let i=null;return{destroy(){n&&St.unregisterChild(n),i&&i.destroy()}}},$t,_t,bt,xt,kt,Et,Ct,At,Vt,ht,pt,ft,mt,vt,yt,qt,Xt,Qt,te,ee,ie,oe,ae,zt,Tt,Mt,le,ue,de,fe,$e,Nt,Jt,Ot,Ce,Ae,Ve,je,Pe,Bt,Rt,ze,Te,Me,qe,Ne,Je,Oe,Be,Ye,Xe,Ze,Qe,Ge,Ke,A,a,g,f,h,j,D,P,S,F,I,z,M,N,J,O,B,R,U,W,L,ut,dt]}const Ye=class extends Ot{constructor(t){super(),Jt(this,t,Ke,He,d,{json:33,origJson:34,templateContext:35,cls:0,style:36,layoutParams:37,customDescription:38,customPaddings:39,customActions:40,additionalPaddings:41},null,[-1,-1,-1,-1])}},Xe={"text-range":"divkit-faf07","text-range_singleline":"divkit-ccb64","text-range__top-offset":"divkit-d9237","text-range_decoration_both":"divkit-d7e07","text-range_decoration_underline":"divkit-f3dde","text-range_decoration_strike":"divkit-d27b7","text-range_decoration_none":"divkit-c6b0f"};function Ze(t,e){const n=Number(t);return isNaN(n)||n<=0?e:n}function Qe(t){if("light"===t||"medium"===t||"bold"===t||"regular"===t)return"medium"===t?500:"bold"===t?700:"light"===t?300:400}function tn(t,e){return Qe(t)||e}function en(t){let e,n;return{c(){e=I("span"),this.h()},l(t){e=L(t,"SPAN",{class:!0}),R(e).forEach(S),this.h()},h(){O(e,"class",n=Xe["text-range__top-offset"]),Y(e,"margin-top",t[4],!1)},m(t,n){P(t,e,n)},p(t,n){16&n&&Y(e,"margin-top",t[4],!1)},d(t){t&&S(e)}}}function nn(t){let e;return{c(){e=T(t[0])},l(n){e=H(n,t[0])},m(t,n){P(t,e,n)},p(t,n){1&n&&K(e,t[0])},d(t){t&&S(e)}}}function rn(t){let e,n,r,i=t[4]&&en(t);return n=new Fe({props:{cls:de("text-range",Xe,t[3]),actions:t[1],style:Gt(t[2]),$$slots:{default:[nn]},$$scope:{ctx:t}}}),{c(){i&&i.c(),e=N(),zt(n.$$.fragment)},l(t){i&&i.l(t),e=N(),Tt(n.$$.fragment,t)},m(t,o){i&&i.m(t,o),P(t,e,o),Mt(n,t,o),r=!0},p(t,r){let[o]=r;t[4]?i?i.p(t,o):(i=en(t),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null);const a={};8&o&&(a.cls=de("text-range",Xe,t[3])),2&o&&(a.actions=t[1]),4&o&&(a.style=Gt(t[2])),524289&o&&(a.$$scope={dirty:o,ctx:t}),n.$set(a)},i(t){r||(At(n.$$.fragment,t),r=!0)},o(t){Vt(n.$$.fragment,t),r=!1},d(t){i&&i.d(t),t&&S(e),Nt(n,t)}}}function on(t,e,n){let r,i,o,a,l;var s,c;let u,{text:d}=e,{rootFontSize:h}=e,{textStyles:p={}}=e,{singleline:f=!1}=e,{actions:g}=e,m="none",v=12,y=1.25,$="",_="",b=null;return t.$$set=t=>{"text"in t&&n(0,d=t.text),"rootFontSize"in t&&n(5,h=t.rootFontSize),"textStyles"in t&&n(6,p=t.textStyles),"singleline"in t&&n(7,f=t.singleline),"actions"in t&&n(1,g=t.actions)},t.$$.update=()=>{if(64&t.$$.dirty){let t="none";(p.underline||p.strike)&&("single"===p.underline&&"single"===p.strike?t="both":"single"===p.underline?t="underline":"single"===p.strike&&(t="strike")),n(10,m=t)}2112&t.$$.dirty&&n(11,v=Ze(p.font_size,v)),2112&t.$$.dirty&&Ie(p.line_height)&&n(12,y=Number(p.line_height)/v),64&t.$$.dirty&&ge(p.letter_spacing)&&n(13,$=Kt(p.letter_spacing)),16448&t.$$.dirty&&n(14,u=tn(p.font_weight,u)),32832&t.$$.dirty&&n(15,_=Zt(p.text_color,1,_)),64&t.$$.dirty&&n(4,r=p.top_offset?Kt(p.top_offset):""),64&t.$$.dirty&&n(18,i=p.background?re([p.background]):null),320&t.$$.dirty&&((null===n(8,s=p.border)||void 0===s?void 0:s.stroke)&&"transparent"!==Zt(p.border.stroke.color)&&Ie(p.border.stroke.width)?n(16,b={color:p.border.stroke.color,width:p.border.stroke.width}):n(16,b=null)),576&t.$$.dirty&&n(17,o=Ze(null===n(9,c=p.border)||void 0===c?void 0:c.corner_radius,0)),1152&t.$$.dirty&&n(3,a={singleline:f,decoration:m}),522272&t.$$.dirty&&n(2,l={"font-size":Kt(10*v/h),"line-height":y,"letter-spacing":$,"font-weight":u,color:_,background:(null==i?void 0:i.color)||void 0,"box-shadow":b?"inset 0 0 0 ".concat(Kt(b.width)," ").concat(b.color):void 0,"border-radius":o?Kt(o):void 0})},[d,g,l,a,r,h,p,f,s,c,m,v,y,$,u,_,b,o,i]}const an=class extends Ot{constructor(t){super(),Jt(this,t,on,rn,d,{text:0,rootFontSize:5,textStyles:6,singleline:7,actions:1})}};function ln(t,e){return"left"===t||"center"===t||"right"===t?t:e}function sn(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t?t:e}function cn(t,e){return"source_in"===t||"source_atop"===t||"darken"===t||"lighten"===t||"multiply"===t||"screen"===t?t:e}const{Boolean:un}=Pt;function dn(t,e,n){const r=t.slice();return r[55]=e[n],r[57]=n,r}function hn(t){let e,n;return e=new Ye({props:{cls:de("text",qt,t[13])+" "+(t[6]?"":"divkit-c016b"),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[$n]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};8256&n[0]&&(r.cls=de("text",qt,t[13])+" "+(t[6]?"":"divkit-c016b")),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),134225584&n[0]|134217728&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function pn(t){let e,n;return e=new an({props:{text:t[4],rootFontSize:t[5],textStyles:t[27],singleline:t[7]}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};16&n[0]&&(r.text=t[4]),32&n[0]&&(r.rootFontSize=t[5]),134217728&n[0]&&(r.textStyles=t[27]),128&n[0]&&(r.singleline=t[7]),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function fn(t){let e,n,r=t[10],i=[];for(let e=0;e<r.length;e+=1)i[e]=yn(dn(t,r,e));const o=t=>Vt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=N()},l(t){for(let e=0;e<i.length;e+=1)i[e].l(t);e=N()},m(t,r){for(let e=0;e<i.length;e+=1)i[e].m(t,r);P(t,e,r),n=!0},p(t,n){if(268437152&n[0]){let a;for(r=t[10],a=0;a<r.length;a+=1){const o=dn(t,r,a);i[a]?(i[a].p(o,n),At(i[a],1)):(i[a]=yn(o),i[a].c(),At(i[a],1),i[a].m(e.parentNode,e))}for(Et(),a=r.length;a<i.length;a+=1)o(a);Ct()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)At(i[t]);n=!0}},o(t){i=i.filter(un);for(let t=0;t<i.length;t+=1)Vt(i[t]);n=!1},d(t){F(i,t),t&&S(e)}}}function gn(t){let e,r,i,o,a,l,s,c;return{c(){e=I("span"),r=I("img"),this.h()},l(t){e=L(t,"SPAN",{style:!0});var n=R(e);r=L(n,"IMG",{class:!0,src:!0,loading:!0,decoding:!0,"aria-hidden":!0,alt:!0,style:!0}),n.forEach(S),this.h()},h(){O(r,"class",i=qt.text__image),u(r.src,o=t[55].image.url)||O(r,"src",o),O(r,"loading","lazy"),O(r,"decoding","async"),O(r,"aria-hidden","true"),O(r,"alt",""),O(r,"style",a=Gt({width:t[55].image.width,height:t[55].image.height,"margin-top":t[9]?"-".concat(t[55].image.height):void 0,"margin-bottom":t[9]?"-".concat(t[55].image.height):void 0,filter:t[55].image.svgFilterId?"url(#".concat(t[55].image.svgFilterId,")"):void 0})),O(e,"style",l=Gt(t[55].image.wrapperStyle))},m(n,i){P(n,e,i),D(e,r),s||(c=J(r,"error",t[28]),s=!0)},p(t,n){1024&n[0]&&!u(r.src,o=t[55].image.url)&&O(r,"src",o),1536&n[0]&&a!==(a=Gt({width:t[55].image.width,height:t[55].image.height,"margin-top":t[9]?"-".concat(t[55].image.height):void 0,"margin-bottom":t[9]?"-".concat(t[55].image.height):void 0,filter:t[55].image.svgFilterId?"url(#".concat(t[55].image.svgFilterId,")"):void 0}))&&O(r,"style",a),1024&n[0]&&l!==(l=Gt(t[55].image.wrapperStyle))&&O(e,"style",l)},i:n,o:n,d(t){t&&S(e),s=!1,c()}}}function mn(t){let e,n,r=t[55].text&&vn(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[55].text?r?(r.p(t,n),1024&n[0]&&At(r,1)):(r=vn(t),r.c(),At(r,1),r.m(e.parentNode,e)):r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct())},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function vn(t){let e,n;return e=new an({props:{text:t[55].text,rootFontSize:t[5],textStyles:t[55].textStyles,singleline:t[7],actions:t[55].actions}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.text=t[55].text),32&n[0]&&(r.rootFontSize=t[5]),1024&n[0]&&(r.textStyles=t[55].textStyles),128&n[0]&&(r.singleline=t[7]),1024&n[0]&&(r.actions=t[55].actions),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function yn(t){let e,n,r,i;const o=[mn,gn],a=[];function l(t,e){return"text"in t[55]?0:t[55].image?1:-1}return~(e=l(t))&&(n=a[e]=o[e](t)),{c(){n&&n.c(),r=N()},l(t){n&&n.l(t),r=N()},m(t,n){~e&&a[e].m(t,n),P(t,r,n),i=!0},p(t,i){let s=e;e=l(t),e===s?~e&&a[e].p(t,i):(n&&(Et(),Vt(a[s],1,1,(()=>{a[s]=null})),Ct()),~e?(n=a[e],n?n.p(t,i):(n=a[e]=o[e](t),n.c()),At(n,1),n.m(r.parentNode,r)):n=null)},i(t){i||(At(n),i=!0)},o(t){Vt(n),i=!1},d(t){~e&&a[e].d(t),t&&S(r)}}}function $n(t){let e,n,r,i,o,a;const l=[fn,pn],s=[];function c(t,e){return t[10].length?0:1}return n=c(t),r=s[n]=l[n](t),{c(){e=I("span"),r.c(),this.h()},l(t){e=L(t,"SPAN",{class:!0,style:!0});var n=R(e);r.l(n),n.forEach(S),this.h()},h(){O(e,"class",i=de("text__inner",qt,t[12])),O(e,"style",o=Gt(t[11]))},m(t,r){P(t,e,r),s[n].m(e,null),a=!0},p(t,u){let d=n;n=c(t),n===d?s[n].p(t,u):(Et(),Vt(s[d],1,1,(()=>{s[d]=null})),Ct(),r=s[n],r?r.p(t,u):(r=s[n]=l[n](t),r.c()),At(r,1),r.m(e,null)),(!a||4096&u[0]&&i!==(i=de("text__inner",qt,t[12])))&&O(e,"class",i),(!a||2048&u[0]&&o!==(o=Gt(t[11])))&&O(e,"style",o)},i(t){a||(At(r),a=!0)},o(t){Vt(r),a=!1},d(t){t&&S(e),s[n].d()}}}function _n(t){let e,n,r=!t[8]&&hn(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[8]?r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct()):r?(r.p(t,n),256&n[0]&&At(r,1)):(r=hn(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function bn(t,e,r){let i,o,a,l,s,c,u,d,h,f,g,m,v,y,$,_,b,w,x,k,E,C,A,V,j,D,P,S,F,I,z,T,M,N=n,J=n,O=n,B=n,R=n,U=n,W=n,L=n,q=n,H=n,G=n,K=n,Y=n;t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>Y()));let{json:X={}}=e,{templateContext:Z}=e,{origJson:Q}=e,{layoutParams:tt}=e;const et=at(Wt);let nt=!1,rt="",ot=12,lt=1.25,st=!1,ct="",ut="",dt=!1,ht="left",pt="top",ft="",gt="",mt=!1,vt=[],yt=[];return it((()=>{yt.forEach((t=>{let[e,n]=t;et.removeSvgFilter(e,n)}))})),t.$$set=t=>{"json"in t&&r(0,X=t.json),"templateContext"in t&&r(1,Z=t.templateContext),"origJson"in t&&r(2,Q=t.origJson),"layoutParams"in t&&r(3,tt=t.layoutParams)},t.$$.update=()=>{var e,n;if(1&t.$$.dirty[0]&&(r(26,i=et.getDerivedFromVars(X.text)),Y(),Y=p(i,(t=>r(51,M=t)))),16&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&(r(4,(e=M,n=rt,rt=String(null!=e?e:"")||n)),rt?r(8,nt=!1):(r(8,nt=!0),et.logError(Lt(new Error('Missing "text" prop for div "text"'))))),1&t.$$.dirty[0]&&(r(25,o=et.getDerivedFromVars(X.ranges)),J(),J=p(o,(t=>r(41,C=t)))),1&t.$$.dirty[0]&&(r(24,a=et.getDerivedFromVars(X.images)),N(),N=p(a,(t=>r(40,E=t)))),1&t.$$.dirty[0]&&(r(23,l=et.getDerivedFromVars({font_size:X.font_size,letter_spacing:X.letter_spacing,font_weight:X.font_weight,text_color:X.text_color,underline:X.underline,strike:X.strike,line_height:X.line_height})),O(),O=p(l,(t=>r(27,A=t)))),1&t.$$.dirty[0]&&(r(22,s=et.getDerivedFromVars(X.font_size)),K(),K=p(s,(t=>r(50,T=t)))),32&t.$$.dirty[0]|524288&t.$$.dirty[1]&&r(5,ot=Ze(T,ot)),1&t.$$.dirty[0]&&(r(21,c=et.getDerivedFromVars(X.line_height)),G(),G=p(c,(t=>r(49,z=t)))),32&t.$$.dirty[0]|262144&t.$$.dirty[1]){const t=z;Ie(t)?(r(29,lt=Number(t)/ot),r(9,st=!0)):r(9,st=!1)}if(1&t.$$.dirty[0]&&(r(20,u=et.getDerivedFromVars(X.max_lines)),L(),L=p(u,(t=>r(46,S=t)))),32768&t.$$.dirty[1]&&r(7,d=1===S),536870912&t.$$.dirty[0]|34304&t.$$.dirty[1]){let t="",e="",n=!1;if(S&&S>1){let r=Number(S);t=r*lt+"em",C||E||(e=r,n=!0)}r(30,ct=t),r(31,ut=e),r(32,dt=n)}if(1&t.$$.dirty[0]&&(r(19,h=et.getDerivedFromVars(X.text_alignment_horizontal)),H(),H=p(h,(t=>r(48,I=t)))),131076&t.$$.dirty[1]&&r(33,ht=ln(I,ht)),1&t.$$.dirty[0]&&(r(18,f=et.getDerivedFromVars(X.text_alignment_vertical)),q(),q=p(f,(t=>r(47,F=t)))),65544&t.$$.dirty[1]&&r(34,pt=sn(F,pt)),16&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(39,g=!C||rt&&1===C.length&&C[0]&&0===C[0].start&&"number"==typeof C[0].end&&C[0].end>=rt.length),1&t.$$.dirty[0]&&(r(17,m=et.getDerivedFromVars(X.text_color)),W(),W=p(m,(t=>r(45,P=t)))),17408&t.$$.dirty[1]&&r(38,v=Boolean(P)!==Boolean(C&&C[0]&&C[0].text_color)),50576&t.$$.dirty[1]){let t="";S&&g&&v&&(t=Zt(P||C&&C[0]&&C[0].text_color,1,ft)),r(35,ft=t)}if(1&t.$$.dirty[0]&&(r(16,y=et.getDerivedFromVars(X.truncate)),U(),U=p(y,(t=>r(44,D=t)))),8192&t.$$.dirty[1]&&r(37,$="none"===D?"none":""),1&t.$$.dirty[0]&&(r(15,_=et.getDerivedFromVars(X.text_gradient)),R(),R=p(_,(t=>r(43,j=t)))),4096&t.$$.dirty[1]){let t="";if(j){const e=re([j]);e.image&&(t=e.image)}r(36,gt=t)}1&t.$$.dirty[0]&&(r(14,b=et.getDerivedFromVars(X.selectable)),B(),B=p(b,(t=>r(42,V=t)))),64&t.$$.dirty[0]|2048&t.$$.dirty[1]&&r(6,mt=function(t,e){return 1===t||0===t||!1===t||!0===t?Boolean(t):e}(V,mt)),16&t.$$.dirty[0]|1536&t.$$.dirty[1]&&function(t,e,n){let i=[];if(yt.forEach((t=>{let[e,n]=t;et.removeSvgFilter(e,n)})),yt=[],!(Array.isArray(e)&&e.length||Array.isArray(n)&&n.length&&t))return void r(10,vt=[]);const o=t;let a=e||[{start:0,end:o.length}],l=n||[],s=0,c=[],u=[];a.forEach((t=>{void 0!==t.start&&void 0!==t.end&&(u.push({index:t.start,range:t,type:"rangeStart",isStart:!0}),u.push({index:t.end,range:t,type:"rangeEnd"}))})),l.forEach(((t,e)=>{void 0!==t.start&&t.url&&t.start<=o.length&&u.push({index:t.start,image:t,type:"image",arrayIndex:e})})),u.sort(((t,e)=>t.index===e.index?t.type!==e.type?"image"===t.type?-1:"image"===e.type?1:t.type<e.type?-1:1:"image"===t.type&&"image"===e.type?e.arrayIndex-t.arrayIndex:"rangeStart"===t.type&&"rangeStart"===e.type?t.range.end-e.range.end:"rangeStart"===t.type?1:"rangeStart"===e.type?-1:"image"!==t.type&&"image"!==e.type?t.range.start-e.range.start:0:t.index-e.index)),u.forEach((t=>{var e;let n="image"===t.type?null:t.range,r=t.index;if(r>s){let n=Object.assign(Object.assign({},A),...c);i.push({text:o.substring(s,r),textStyles:n,actions:"rangeEnd"===t.type&&(null===(e=t.range)||void 0===e?void 0:e.actions)||void 0})}if("rangeStart"===t.type&&n)c.push(n);else if("rangeEnd"===t.type)c=c.filter((e=>e!==t.range));else if("image"===t.type){let e=Object.assign(Object.assign({},A),...c),n=Kt(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),r=Kt(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const o={"font-size":Kt(10*(Number(e.font_size)||12)/ot)};let a="";const l=t.image.tint_color,s=cn(t.image.tint_mode,"source_in");if(l){const e=Zt(t.image.tint_color);a=et.addSvgFilter(e,s),yt.push([e,s])}i.push({image:{url:t.image.url,width:n,height:r,wrapperStyle:o,svgFilterId:a}})}s=r})),s<o.length&&i.push({text:o.substring(s),textStyles:Object.assign({},A)}),r(10,vt=i)}(rt,C,E),128&t.$$.dirty[0]|78&t.$$.dirty[1]&&r(13,w={singleline:d,multiline:dt,halign:ht,valign:pt,truncate:$}),32&t.$$.dirty[1]&&r(12,x={gradient:Boolean(gt)}),1610612768&t.$$.dirty[0]|49&t.$$.dirty[1]&&r(11,k={"font-size":Kt(ot),"line-height":lt,"max-height":ct,"-webkit-line-clamp":ut,color:ft,"background-image":gt})},[X,Z,Q,tt,rt,ot,mt,d,nt,st,vt,k,x,w,b,_,y,m,f,h,u,c,s,l,a,o,i,A,function(t){t.target&&"classList"in t.target&&t.target.classList.add(qt.text__image_hidden)},lt,ct,ut,dt,ht,pt,ft,gt,$,v,g,E,C,V,j,D,P,S,F,I,z,T,M]}const wn={container:"divkit-d37d6",container_wrap:"divkit-c8551",container_orientation_vertical:"divkit-ddc33",container_valign_top:"divkit-a331a",container_valign_center:"divkit-aae61",container_valign_bottom:"divkit-c2226",container_orientation_horizontal:"divkit-fe458",container_halign_left:"divkit-a3091",container_halign_center:"divkit-bac9d",container_halign_right:"divkit-f4230",container_orientation_overlap:"divkit-a644d"};function xn(t,e,n){if(!(t&&t.shape&&t.shape.type&&e.includes(t.shape.type)&&"shape_drawable"===t.type))return n;let r;if("rounded_rectangle"===t.shape.type)i=t.shape,r={width:Number((null===(o=i.item_width)||void 0===o?void 0:o.value)||10),height:Number((null===(a=i.item_height)||void 0===a?void 0:a.value)||10),radius:Number(null!==(l=null===(s=i.corner_radius)||void 0===s?void 0:s.value)&&void 0!==l?l:5)};else{if("circle"!==t.shape.type)return n;r=function(t){var e;const n=2*Number((null===(e=t.radius)||void 0===e?void 0:e.value)||10);return{width:n,height:n,radius:n}}(t.shape)}var i,o,a,l,s;return function(t,e,n){var r;const i={},o=e.stroke||(null==n?void 0:n.stroke),a=null!=o&&o.color?Zt(o.color):"",l=null!=o&&o.width?Number(null!==(r=o.width)&&void 0!==r?r:1):"";i.width=t.width,i.height=t.height,i.borderRadius=t.radius;const s=e.background_color||(null==n?void 0:n.color);return i.background=Zt(s),a&&l&&(i.boxShadow="inset 0 0 0 ".concat(Kt(l)," ").concat(a)),i}(r,t.shape,{color:t.color,stroke:t.stroke})}function kn(t,e,n){null!=e&&e.show_at_start&&(n?t.top=e.style.height:t.left=e.style.width),null!=e&&e.show_at_end&&(n?t.bottom=e.style.height:t.right=e.style.width)}function En(t,e,n){let r;return r="horizontal"===t?[null!=n&&n.show_between?n.style.height:0,null!=e&&e.show_between?e.style.width:0]:[null!=e&&e.show_between?e.style.height:0,null!=n&&n.show_between?n.style.width:0],r.map(Kt).join(" ")}let Cn;function An(){if(void 0!==Cn)return Cn;const t=document.createElement("div");return t.style.position="absolute",t.style.display="flex",t.style.flexDirection="column",t.style.gap="1px",t.appendChild(document.createElement("div")),t.appendChild(document.createElement("div")),document.body.appendChild(t),Cn=1===t.scrollHeight,document.body.removeChild(t),Cn}function Vn(t,e,n){const r=t.slice();return r[13]=e[n],r}function jn(t){let e,n,r,i,o,a="".concat(t[13].style.width,"px"),l="".concat(t[13].style.height,"px"),s="".concat(t[13].style.borderRadius,"px"),c="".concat(t[13].left,"px"),u="".concat(t[13].top,"px"),d="".concat(t[13].width,"px"),h="".concat(t[13].height,"px");return{c(){e=I("div"),n=I("div"),i=M(),this.h()},l(t){e=L(t,"DIV",{class:!0});var r=R(e);n=L(r,"DIV",{class:!0}),R(n).forEach(S),i=G(r),r.forEach(S),this.h()},h(){O(n,"class",r="divkit-f6e9a"),Y(n,"width",a,!1),Y(n,"height",l,!1),Y(n,"border-radius",s,!1),Y(n,"background",t[13].style.background,!1),Y(n,"box-shadow",t[13].style.boxShadow,!1),O(e,"class",o="divkit-c770e"),Y(e,"left",c,!1),Y(e,"top",u,!1),Y(e,"width",d,!1),Y(e,"height",h,!1)},m(t,r){P(t,e,r),D(e,n),D(e,i)},p(t,r){2&r&&a!==(a="".concat(t[13].style.width,"px"))&&Y(n,"width",a,!1),2&r&&l!==(l="".concat(t[13].style.height,"px"))&&Y(n,"height",l,!1),2&r&&s!==(s="".concat(t[13].style.borderRadius,"px"))&&Y(n,"border-radius",s,!1),2&r&&Y(n,"background",t[13].style.background,!1),2&r&&Y(n,"box-shadow",t[13].style.boxShadow,!1),2&r&&c!==(c="".concat(t[13].left,"px"))&&Y(e,"left",c,!1),2&r&&u!==(u="".concat(t[13].top,"px"))&&Y(e,"top",u,!1),2&r&&d!==(d="".concat(t[13].width,"px"))&&Y(e,"width",d,!1),2&r&&h!==(h="".concat(t[13].height,"px"))&&Y(e,"height",h,!1)},d(t){t&&S(e)}}}function Dn(t){let e,r,i,o,a=t[1],l=[];for(let e=0;e<a.length;e+=1)l[e]=jn(Vn(t,a,e));return{c(){e=I("div");for(let t=0;t<l.length;t+=1)l[t].c();this.h()},l(t){e=L(t,"DIV",{class:!0});var n=R(e);for(let t=0;t<l.length;t+=1)l[t].l(n);n.forEach(S),this.h()},h(){O(e,"class",r="divkit-a7719")},m(n,r){P(n,e,r);for(let t=0;t<l.length;t+=1)l[t].m(e,null);t[10](e),i||(o=J(window,"resize",t[2]),i=!0)},p(t,n){let[r]=n;if(2&r){let n;for(a=t[1],n=0;n<a.length;n+=1){const i=Vn(t,a,n);l[n]?l[n].p(i,r):(l[n]=jn(i),l[n].c(),l[n].m(e,null))}for(;n<l.length;n+=1)l[n].d(1);l.length=a.length}},i:n,o:n,d(n){n&&S(e),F(l,n),t[10](null),i=!1,o()}}}function Pn(t,e,n,r,i,o){o?t.push({top:n.bottom,left:i.left,width:i.right-i.left,height:r.top-n.bottom,style:e}):t.push({top:i.top,left:n.right,width:r.left-n.right,height:i.bottom-i.top,style:e})}function Sn(t,e,n,r){const i={top:Math.min(...n.map((t=>t.top))),right:Math.max(...n.map((t=>t.right))),bottom:Math.max(...n.map((t=>t.bottom))),left:Math.min(...n.map((t=>t.left)))};if((null==e?void 0:e.show_at_start)&&Pn(t,e.style,{top:0,right:n[0].left-e.style.width,bottom:n[0].top-e.style.height,left:0},n[0],i,r),null==e?void 0:e.show_between)for(let o=0;o<n.length-1;++o)Pn(t,e.style,n[o],n[o+1],i,r);if(null==e?void 0:e.show_at_end){const o=n[n.length-1];Pn(t,e.style,o,{top:o.bottom+e.style.height,right:0,bottom:0,left:o.right+e.style.width},i,r)}}function Fn(t,e,n){let r,{orientation:i}=e,{separator:o}=e,{lineSeparator:a}=e;const l=function(t,e){let n,r=0,i=!1;return function(){const e=Date.now();return!r||Math.abs(e-r)>10?(r=e,n=t.apply(this,arguments)):(i||(i=!0,setTimeout((()=>{i=!1,n=t.apply(this,arguments)}),10)),n)}}((function(){if(!r)return;const t=r.getBoundingClientRect();n(1,c=[]);let e=[...r.children].filter((t=>t!==s&&!t.classList.contains(Ht.outer__border))),l=[];for(;e.length;){const t=[],n=e.shift();t.push(n);let r=n.getBoundingClientRect(),o=r.right,a=r.bottom;for(;e.length;){let n=e[0],r=n.getBoundingClientRect();if("vertical"===i){if(r.top<a)break}else if(r.left<o)break;o=Math.max(o,r.right),a=Math.max(a,r.bottom),t.push(n),e.shift()}l.push(t)}const u=[];l.forEach((t=>{const e=t.map((t=>function(t){const e=t.getBoundingClientRect(),n=getComputedStyle(t);return{top:e.top-parseFloat(n.marginTop),right:e.right+parseFloat(n.marginRight),bottom:e.bottom+parseFloat(n.marginBottom),left:e.left-parseFloat(n.marginLeft)}}(t)));o&&Sn(c,o,e,"vertical"===i);const n={top:Math.min(...e.map((t=>t.top))),right:Math.max(...e.map((t=>t.right))),bottom:Math.max(...e.map((t=>t.bottom))),left:Math.min(...e.map((t=>t.left)))};u.push(n)})),a&&Sn(c,a,u,"horizontal"===i),c.forEach((e=>{e.top-=t.top,e.left-=t.left}))}));let s,c=[],u=!1,d=null,h=null;function p(t){t.some((t=>{var e;const n=null===(e=t.target)||void 0===e?void 0:e.classList;return!(null==n?void 0:n.contains("divkit-f6e9a"))&&!(null==n?void 0:n.contains("divkit-a7719"))}))&&l()}return rt((()=>{n(6,u=!0)})),it((()=>{n(6,u=!1)})),t.$$set=t=>{"orientation"in t&&n(3,i=t.orientation),"separator"in t&&n(4,o=t.separator),"lineSeparator"in t&&n(5,a=t.lineSeparator)},t.$$.update=()=>{1&t.$$.dirty&&n(9,r=(null==s?void 0:s.parentElement)||null),960&t.$$.dirty&&(u&&r||d||h)&&(d&&(d.disconnect(),n(7,d=null)),h&&(h.disconnect(),n(8,h=null)),u&&r&&("undefined"!=typeof MutationObserver&&(n(7,d=new MutationObserver(p)),d.observe(r,{childList:!0,attributes:!0,characterData:!0,subtree:!0})),"undefined"!=typeof ResizeObserver&&(n(8,h=new ResizeObserver(l)),h.observe(r)))),576&t.$$.dirty&&u&&r&&l()},[s,c,l,i,o,a,u,d,h,r,function(t){ct[t?"unshift":"push"]((()=>{s=t,n(0,s)}))}]}const In=class extends Ot{constructor(t){super(),Jt(this,t,Fn,Dn,d,{orientation:3,separator:4,lineSeparator:5})}},{Boolean:zn}=Pt;function Tn(t,e,n){const r=t.slice();return r[46]=e[n],r}function Mn(t){let e,n;return e=new Ye({props:{cls:de("container",wn,t[10]),style:t[9],json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],additionalPaddings:t[14],$$slots:{default:[On]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=de("container",wn,t[10])),512&n[0]&&(r.style=t[9]),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),16384&n[0]&&(r.additionalPaddings=t[14]),2097632&n[0]|262144&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function Nn(t){let e,n;return e=new go({props:{layoutParams:t[8],div:t[46].json,templateContext:t[46].templateContext,origJson:t[46].origJson}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.layoutParams=t[8]),2097152&n[0]&&(r.div=t[46].json),2097152&n[0]&&(r.templateContext=t[46].templateContext),2097152&n[0]&&(r.origJson=t[46].origJson),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function Jn(t){let e,n;return e=new In({props:{separator:t[6],lineSeparator:t[7],orientation:t[5]}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};64&n[0]&&(r.separator=t[6]),128&n[0]&&(r.lineSeparator=t[7]),32&n[0]&&(r.orientation=t[5]),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function On(t){let e,n,r,i=t[21],o=[];for(let e=0;e<i.length;e+=1)o[e]=Nn(Tn(t,i,e));const a=t=>Vt(o[t],1,1,(()=>{o[t]=null}));let l=(t[6]||t[7])&&Jn(t);return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=M(),l&&l.c(),n=N()},l(t){for(let e=0;e<o.length;e+=1)o[e].l(t);e=G(t),l&&l.l(t),n=N()},m(t,i){for(let e=0;e<o.length;e+=1)o[e].m(t,i);P(t,e,i),l&&l.m(t,i),P(t,n,i),r=!0},p(t,r){if(2097408&r[0]){let n;for(i=t[21],n=0;n<i.length;n+=1){const a=Tn(t,i,n);o[n]?(o[n].p(a,r),At(o[n],1)):(o[n]=Nn(a),o[n].c(),At(o[n],1),o[n].m(e.parentNode,e))}for(Et(),n=i.length;n<o.length;n+=1)a(n);Ct()}t[6]||t[7]?l?(l.p(t,r),192&r[0]&&At(l,1)):(l=Jn(t),l.c(),At(l,1),l.m(n.parentNode,n)):l&&(Et(),Vt(l,1,1,(()=>{l=null})),Ct())},i(t){if(!r){for(let t=0;t<i.length;t+=1)At(o[t]);At(l),r=!0}},o(t){o=o.filter(zn);for(let t=0;t<o.length;t+=1)Vt(o[t]);Vt(l),r=!1},d(t){F(o,t),t&&S(e),l&&l.d(t),t&&S(n)}}}function Bn(t){let e,n,r=!t[4]&&Mn(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[4]?r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct()):r?(r.p(t,n),16&n[0]&&At(r,1)):(r=Mn(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Rn(t,e,r){let i,o,a,l,s,c,u,d,h,f,g,m,v,y,$,_,b,w,x,k,E,C,A,V,j=n,D=n,P=n,S=n,F=n,I=n,z=n,T=n,M=n;var N,J,O,B,R,U;t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>M()));let{json:W={}}=e,{templateContext:L}=e,{origJson:q}=e,{layoutParams:H}=e;const G={left:"start",center:"center",right:"end"},K={top:"start",center:"center",bottom:"end",baseline:"baseline"},Y=["rounded_rectangle","circle"],X=at(Wt);let Z,Q=!1,tt="vertical",et="top",nt="left",rt=null,it=null,ot={};return t.$$set=t=>{"json"in t&&r(0,W=t.json),"templateContext"in t&&r(1,L=t.templateContext),"origJson"in t&&r(2,q=t.origJson),"layoutParams"in t&&r(3,H=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(32,i=W.items),2&t.$$.dirty[1]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(4,Q=!1):(r(4,Q=!0),X.logError(Lt(new Error('Incorrect or empty "items" prop for div "container"'))))),18&t.$$.dirty[0]|2&t.$$.dirty[1]&&r(21,o=(!Q&&i||[]).map((t=>{let e=t,n=L;return({templateContext:n,json:e}=X.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(20,a=X.getDerivedFromVars(W.orientation)),M(),M=p(a,(t=>r(41,V=t)))),32&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(5,tt=function(t,e){return"vertical"===t||"horizontal"===t||"overlap"===t?t:e}(V,tt)),1&t.$$.dirty[0]&&(r(19,l=X.getDerivedFromVars(W.content_alignment_vertical)),T(),T=p(l,(t=>r(40,A=t)))),268435456&t.$$.dirty[0]|512&t.$$.dirty[1]&&r(28,et=sn(A,et)),1&t.$$.dirty[0]&&(r(18,s=X.getDerivedFromVars(W.content_alignment_horizontal)),z(),z=p(s,(t=>r(39,C=t)))),536870912&t.$$.dirty[0]|256&t.$$.dirty[1]&&r(29,nt=ln(C,nt)),1&t.$$.dirty[0]&&(r(17,c=X.getDerivedFromVars(W.layout_mode)),I(),I=p(c,(t=>r(38,E=t)))),128&t.$$.dirty[1]&&r(31,u="wrap"===E),1&t.$$.dirty[0]&&(r(16,d=X.getDerivedFromVars(W.separator)),F(),F=p(d,(t=>r(37,k=t)))),29360224&t.$$.dirty[0]|64&t.$$.dirty[1])if((null==k?void 0:k.style)&&"overlap"!==tt&&An()){const t=xn(k.style,Y,(null==rt?void 0:rt.style)||null);r(6,rt=t?{show_at_start:Boolean(null!==r(22,N=k.show_at_start)&&void 0!==N&&N),show_at_end:Boolean(null!==r(23,J=k.show_at_end)&&void 0!==J&&J),show_between:Boolean(null===r(24,O=k.show_between)||void 0===O||O),style:t}:null)}else r(6,rt=null);if(1&t.$$.dirty[0]&&(r(15,h=X.getDerivedFromVars(W.line_separator)),S(),S=p(h,(t=>r(36,x=t)))),234881184&t.$$.dirty[0]|32&t.$$.dirty[1])if((null==x?void 0:x.style)&&"overlap"!==tt&&An()){const t=xn(x.style,Y,(null==it?void 0:it.style)||null);r(7,it=t?{show_at_start:Boolean(null!==r(25,B=x.show_at_start)&&void 0!==B&&B),show_at_end:Boolean(null!==r(26,R=x.show_at_end)&&void 0!==R&&R),show_between:Boolean(null===r(27,U=x.show_between)||void 0===U||U),style:t}:null)}else r(7,it=null);if(224&t.$$.dirty[0]&&r(14,f=rt||it?function(t,e,n){const r={};return kn(r,e,"vertical"===t),kn(r,n,"horizontal"===t),r}(tt,rt,it):null),1&t.$$.dirty[0]&&(r(13,g=X.getDerivedFromVars(W.aspect)),P(),P=p(g,(t=>r(35,w=t)))),16&t.$$.dirty[1]){const t=null==w?void 0:w.ratio;t&&Ie(t)?r(30,Z=t):r(30,Z=void 0)}if(1&t.$$.dirty[0]&&(r(12,m=X.getDerivedFromVars(W.width)),j(),j=p(m,(t=>r(33,_=t)))),1&t.$$.dirty[0]&&(r(11,v=X.getDerivedFromVars(W.height)),D(),D=p(v,(t=>r(34,b=t)))),805306664&t.$$.dirty[0]|13&t.$$.dirty[1]){let t={};(null==H?void 0:H.fakeElement)&&(t.fakeElement=!0),"overlap"===tt&&(t.overlapParent=!0),"horizontal"!==tt&&(t.parentHAlign=G[nt],(!b||"wrap_content"===b.type||"match_parent"===b.type&&(null==H?void 0:H.parentVerticalWrapContent))&&(t.parentVerticalWrapContent=!0)),"vertical"!==tt&&(t.parentVAlign=K[et],("wrap_content"===(null==_?void 0:_.type)||"match_parent"===(null==_?void 0:_.type)&&(null==H?void 0:H.parentHorizontalWrapContent))&&(t.parentHorizontalWrapContent=!0)),"horizontal"===tt&&(t.parentContainerOrientation="horizontal"),"vertical"===tt&&(t.parentContainerOrientation="vertical"),u&&(t.parentContainerWrap=!0),r(8,ot=_e(t,ot))}805306400&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(10,y={orientation:tt,valign:et,halign:nt,wrap:u}),1073742048&t.$$.dirty[0]&&r(9,$={gap:rt||it?En(tt,rt,it):void 0,"aspect-ratio":Z})},[W,L,q,H,Q,tt,rt,it,ot,$,y,v,m,g,f,h,d,c,s,l,a,o,N,J,O,B,R,U,et,nt,Z,u,i,_,b,w,x,k,E,C,A,V]}const Un={separator:"divkit-a30bb",separator_orientation_horizontal:"divkit-f529e",separator_orientation_vertical:"divkit-e9e27",separator__inner:"divkit-db7d8"};function Wn(t,e){return"vertical"===t||"horizontal"===t?t:e}function Ln(t){let e,n,r;return{c(){e=I("span"),this.h()},l(t){e=L(t,"SPAN",{class:!0,style:!0}),R(e).forEach(S),this.h()},h(){O(e,"class",n=Un.separator__inner),O(e,"style",r=Gt(t[5]))},m(t,n){P(t,e,n)},p(t,n){32&n&&r!==(r=Gt(t[5]))&&O(e,"style",r)},d(t){t&&S(e)}}}function qn(t){let e,n=t[6]&&Ln(t);return{c(){n&&n.c(),e=N()},l(t){n&&n.l(t),e=N()},m(t,r){n&&n.m(t,r),P(t,e,r)},p(t,r){t[6]?n?n.p(t,r):(n=Ln(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&S(e)}}}function Hn(t){let e,n;return e=new Ye({props:{cls:de("separator",Un,t[4]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[qn]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){let[r]=n;const i={};16&r&&(i.cls=de("separator",Un,t[4])),1&r&&(i.json=t[0]),4&r&&(i.origJson=t[2]),2&r&&(i.templateContext=t[1]),8&r&&(i.layoutParams=t[3]),16480&r&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function Gn(t,e,r){let i,o,a,l,s,c,u,d=n;t.$$.on_destroy.push((()=>d()));let{json:h={}}=e,{templateContext:f}=e,{origJson:g}=e,{layoutParams:m}=e;const v=at(Wt);let y="horizontal",$="rgba(0,0,0,0.08)";return t.$$set=t=>{"json"in t&&r(0,h=t.json),"templateContext"in t&&r(1,f=t.templateContext),"origJson"in t&&r(2,g=t.origJson),"layoutParams"in t&&r(3,m=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&(r(7,i=v.getDerivedFromVars(h.delimiter_style)),d(),d=p(i,(t=>r(12,u=t)))),4352&t.$$.dirty&&r(8,y=Wn(null==u?void 0:u.orientation,y)),4096&t.$$.dirty&&r(6,o=!((null==u?void 0:u.color)&&("transparent"===u.color||9===u.color.length&&0===u.color.indexOf("#00")))),4608&t.$$.dirty&&r(9,$=Zt(null==u?void 0:u.color,1,$)),256&t.$$.dirty&&r(11,a="horizontal"===y?"100%":Kt(1)),256&t.$$.dirty&&r(10,l="horizontal"===y?Kt(1):"100%"),3584&t.$$.dirty&&r(5,s={background:$,width:a,height:l}),256&t.$$.dirty&&r(4,c={orientation:y})},[h,f,g,m,c,s,o,i,y,$,l,a,u]}const Kn={image:"divkit-a448f","image_is-width-content":"divkit-fe14a","image_is-height-content":"divkit-f4d92",image__image:"divkit-ce046",image_error:"divkit-f10d9","image__aspect-wrapper":"divkit-dc808",image_aspect:"divkit-ae784",image_loaded:"divkit-cf4e0","divkit-image-appearance":"divkit-e555f","image_before-appearance":"divkit-ffe8a"};function Yn(t){let e,n;return e=new Ye({props:{cls:de("image",Kn,t[10]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customDescription:!0,$$slots:{default:[tr]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=de("image",Kn,t[10])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),67312&n[0]|536870912&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function Xn(t){let e,n,r,i,o,a,s;return{c(){e=I("img"),this.h()},l(t){e=L(t,"IMG",{class:!0,src:!0,loading:!0,decoding:!0,style:!0,alt:!0,"aria-hidden":!0}),this.h()},h(){O(e,"class",n=Kn.image__image),u(e.src,r=t[4]===rr?nr:t[7])||O(e,"src",r),O(e,"loading","lazy"),O(e,"decoding","async"),O(e,"style",i=Gt(t[9])),O(e,"alt",t[16]),O(e,"aria-hidden",o=t[16]?null:"true")},m(n,r){P(n,e,r),a||(s=[J(e,"load",t[26]),J(e,"error",t[27])],a=!0)},p(t,n){144&n[0]&&!u(e.src,r=t[4]===rr?nr:t[7])&&O(e,"src",r),512&n[0]&&i!==(i=Gt(t[9]))&&O(e,"style",i),65536&n[0]&&O(e,"alt",t[16]),65536&n[0]&&o!==(o=t[16]?null:"true")&&O(e,"aria-hidden",o)},d(t){t&&S(e),a=!1,l(s)}}}function Zn(t){let e,n,r,i,o,a,s,c,d,h="".concat(t[5],"%");return{c(){e=I("span"),n=I("img"),this.h()},l(t){e=L(t,"SPAN",{class:!0});var r=R(e);n=L(r,"IMG",{class:!0,src:!0,loading:!0,decoding:!0,style:!0,alt:!0,"aria-hidden":!0}),r.forEach(S),this.h()},h(){O(n,"class",r=Kn.image__image),u(n.src,i=t[4]===rr?nr:t[7])||O(n,"src",i),O(n,"loading","lazy"),O(n,"decoding","async"),O(n,"style",o=Gt(t[9])),O(n,"alt",t[16]),O(n,"aria-hidden",a=t[16]?null:"true"),O(e,"class",s=Kn["image__aspect-wrapper"]),Y(e,"padding-bottom",h,!1)},m(r,i){P(r,e,i),D(e,n),c||(d=[J(n,"load",t[26]),J(n,"error",t[27])],c=!0)},p(t,r){144&r[0]&&!u(n.src,i=t[4]===rr?nr:t[7])&&O(n,"src",i),512&r[0]&&o!==(o=Gt(t[9]))&&O(n,"style",o),65536&r[0]&&O(n,"alt",t[16]),65536&r[0]&&a!==(a=t[16]?null:"true")&&O(n,"aria-hidden",a),32&r[0]&&h!==(h="".concat(t[5],"%"))&&Y(e,"padding-bottom",h,!1)},d(t){t&&S(e),c=!1,l(d)}}}function Qn(t){let e;function n(t,e){return t[10].aspect?Zn:Xn}let r=n(t),i=r(t);return{c(){i.c(),e=N()},l(t){i.l(t),e=N()},m(t,n){i.m(t,n),P(t,e,n)},p(t,o){r===(r=n(t))&&i?i.p(t,o):(i.d(1),i=r(t),i&&(i.c(),i.m(e.parentNode,e)))},d(t){i.d(t),t&&S(e)}}}function tr(t){let e,n=t[6],r=Qn(t);return{c(){r.c(),e=N()},l(t){r.l(t),e=N()},m(t,n){r.m(t,n),P(t,e,n)},p(t,i){64&i[0]&&d(n,n=t[6])?(r.d(1),r=Qn(t),r.c(),r.m(e.parentNode,e)):r.p(t,i)},d(t){t&&S(e),r.d(t)}}}function er(t){let e,n,r=!t[8]&&Yn(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[8]?r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct()):r?(r.p(t,n),256&n[0]&&At(r,1)):(r=Yn(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}const nr="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",rr=2;function ir(t,e,r){let i,o,a,l,s,c,u,d,h,f,g,m,v,y,$,_,b,w,x,k,E,C,A,V,j,D,P,S,F,I,z,T,M,N,J=n,O=n,B=n,R=n,U=n,W=n,L=n,q=n,H=n,G=n,K=n,Y=n,X=n,Z=n;t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Z()));let{json:Q={}}=e,{templateContext:tt}=e,{origJson:et}=e,{layoutParams:nt}=e;const rt=at(Wt);let ot=0,lt="rgba(0,0,0,0.08)",st=!1,ct="",ut="none",dt="50% 50%";let ht,pt="0",ft="source_in",gt="",mt="",vt=0,yt=0,$t=0,_t="",bt="";return it((()=>{rt.removeSvgFilter(ht,ft)})),t.$$set=t=>{"json"in t&&r(0,Q=t.json),"templateContext"in t&&r(1,tt=t.templateContext),"origJson"in t&&r(2,et=t.origJson),"layoutParams"in t&&r(3,nt=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(25,i=rt.getDerivedFromVars(Q.image_url)),Z(),Z=p(i,(t=>r(55,N=t)))),1&t.$$.dirty[0]&&(r(24,o=rt.getDerivedFromVars(Q.gif_url)),X(),X=p(o,(t=>r(54,M=t)))),25165824&t.$$.dirty[1]&&r(7,a=N||M),128&t.$$.dirty[0]&&r(4,ot=0),128&t.$$.dirty[0]&&(a?r(8,st=!1):(r(8,st=!0),rt.logError(Lt(new Error('Missing "image_url" for "image"'))))),1&t.$$.dirty[0]&&(r(23,l=rt.getDerivedFromVars(Q.width)),Y(),Y=p(l,(t=>r(53,T=t)))),4194304&t.$$.dirty[1]&&r(41,s="wrap_content"===(null==T?void 0:T.type)),1&t.$$.dirty[0]&&(r(22,c=rt.getDerivedFromVars(Q.height)),K(),K=p(c,(t=>r(52,z=t)))),2097152&t.$$.dirty[1]&&r(40,u="wrap_content"===(null==z?void 0:z.type)),1&t.$$.dirty[0]&&(r(21,d=rt.getDerivedFromVars(Q.preview)),G(),G=p(d,(t=>r(51,I=t)))),16&t.$$.dirty[0]|1048576&t.$$.dirty[1]){const t=I;0!==ot&&ot!==rr||!t?r(29,ct=""):t.startsWith("data:")?r(29,ct='url("'.concat(ee(t),'")')):r(29,ct='url("data:image/jpg;base64,'.concat(ee(t),'")'))}if(1&t.$$.dirty[0]&&(r(20,h=rt.getDerivedFromVars(Q.placeholder_color)),H(),H=p(h,(t=>r(50,F=t)))),16&t.$$.dirty[0]|524288&t.$$.dirty[1]&&function(t,e){r(28,lt=0===t||t===rr?Zt(e,1,lt):"")}(ot,F),1&t.$$.dirty[0]&&(r(19,f=rt.getDerivedFromVars(Q.scale)),q(),q=p(f,(t=>r(49,S=t)))),1073741824&t.$$.dirty[0]|262144&t.$$.dirty[1]&&r(30,ut=ae(S)||ut),1&t.$$.dirty[0]&&(r(18,g=rt.getDerivedFromVars({content_alignment_horizontal:Q.content_alignment_horizontal,content_alignment_vertical:Q.content_alignment_vertical})),L(),L=p(g,(t=>r(48,P=t)))),131072&t.$$.dirty[1]&&r(31,dt=function(t,e){const n=t.content_alignment_horizontal,r=t.content_alignment_vertical;return n&&"left"!==n&&"center"!==n&&"right"!==n||r&&"top"!==r&&"center"!==r&&"bottom"!==r?e:le(t)}(P,dt)),1&t.$$.dirty[0]&&(r(17,m=rt.getDerivedFromVars(Q.accessibility)),W(),W=p(m,(t=>r(47,D=t)))),65536&t.$$.dirty[1]&&r(16,v=(null==D?void 0:D.description)||""),1&t.$$.dirty[0]&&(r(15,y=rt.getDerivedFromVars(Q.aspect)),U(),U=p(y,(t=>r(46,j=t)))),32768&t.$$.dirty[1]){const t=null==j?void 0:j.ratio;t&&Ie(t)?r(5,pt=(100/Number(t)).toFixed(2)):r(5,pt="0")}if(1&t.$$.dirty[0]&&(r(14,$=rt.getDerivedFromVars(Q.tint_color)),R(),R=p($,(t=>r(45,V=t)))),1&t.$$.dirty[0]&&(r(13,_=rt.getDerivedFromVars(Q.tint_mode)),B(),B=p(_,(t=>r(44,A=t)))),24582&t.$$.dirty[1]){const t=V,e=t?Zt(t):void 0,n=cn(A,ft);e===ht&&n===ft||(rt.removeSvgFilter(ht,ft),r(6,gt=e?rt.addSvgFilter(e,n):""),r(32,ht=e),r(33,ft=n))}if(1&t.$$.dirty[0]&&(r(12,b=rt.getDerivedFromVars(Q.appearance_animation)),O(),O=p(b,(t=>r(43,C=t)))),4096&t.$$.dirty[1]&&C&&"fade"===C.type){const t=C;r(34,mt=be(t.interpolator,"ease_in_out").replace(/_/g,"-")),r(37,$t=ve(t.duration,300)),r(36,yt=ve(t.start_delay,0)),r(35,vt=ve(t.alpha,0))}if(1&t.$$.dirty[0]&&(r(11,w=rt.getDerivedFromVars(Q.filters)),J(),J=p(w,(t=>r(42,E=t)))),2048&t.$$.dirty[1]){let t="",e="";Array.isArray(E)&&E.length&&(t=ze(E,rt.logError)),t&&(e="polygon(0% 0%, 0% 100%, 100% 100%, 100% 0%)"),r(38,_t=t),r(39,bt=e)}48&t.$$.dirty[0]|1544&t.$$.dirty[1]&&r(10,x={aspect:"0"!==pt,"is-width-content":s,"is-height-content":u,loaded:1===ot,"before-appearance":Boolean(mt)&&0===ot}),1879048272&t.$$.dirty[0]|505&t.$$.dirty[1]&&r(9,k={"background-image":ct,"background-color":ct?void 0:lt,"background-size":ut,"clip-path":bt||void 0,"object-fit":ut,"object-position":dt,filter:[1===ot&>?"url(#".concat(gt,")"):"",_t].filter(Boolean).join(" "),"--divkit-appearance-interpolator":mt||void 0,"--divkit-appearance-fade-start":mt?vt:void 0,"--divkit-appearance-delay":mt?"".concat(yt,"ms"):void 0,"--divkit-appearance-duration":mt?"".concat($t,"ms"):void 0})},[Q,tt,et,nt,ot,pt,gt,a,st,k,x,w,b,_,$,y,v,m,g,f,h,d,c,l,o,i,function(){0===ot&&r(4,ot=1)},function(){0===ot&&r(4,ot=rr)},lt,ct,ut,dt,ht,ft,mt,vt,yt,$t,_t,bt,u,s,E,C,A,V,j,D,P,S,F,I,z,T,M,N]}const or=class extends Ot{constructor(t){super(),Jt(this,t,ir,er,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},ar={grid:"divkit-d9080",grid_halign_left:"divkit-f63b3",grid_halign_center:"divkit-a14a6",grid_halign_right:"divkit-b0717",grid_valign_top:"divkit-fbca8",grid_valign_center:"divkit-d4310",grid_valign_bottom:"divkit-e4205"};function lr(t){return t>0&&t<1}function sr(t){return String(Math.ceil(1e3*t)/1e3)}function cr(t,e,n){if(t.some(lr)){const e=Math.max(...t.filter(lr).map((t=>1/t)));t=t.map((t=>t*e))}let r=0,i=0;const o=[];if(t.every(Boolean)){i=t.reduce(((t,e)=>t+e),0);for(let o=0;o<n;++o){if(!e[o])continue;const n=e[o]/t[o]*i;n>r&&(r=n)}}for(let e=0;e<n;++e)r?o[e]="minmax(".concat(Kt(r*t[e]/i),",").concat(sr(t[e]),"fr)"):t[e]?o[e]="".concat(sr(t[e]),"fr"):o[e]="auto";return o.join(" ")}function ur(t,e,n){const r=t.slice();return r[29]=e[n],r}function dr(t){let e,n;return e=new Ye({props:{cls:de("grid",ar,t[8]),json:t[0],origJson:t[2],templateContext:t[1],style:t[7],layoutParams:t[3],$$slots:{default:[pr]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=de("grid",ar,t[8])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),128&n[0]&&(r.style=t[7]),8&n[0]&&(r.layoutParams=t[3]),32&n[0]|2&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function hr(t){let e,n;return e=new go({props:{layoutParams:t[29].layoutParams,div:t[29].json,templateContext:t[29].templateContext,origJson:t[29].origJson}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};32&n[0]&&(r.layoutParams=t[29].layoutParams),32&n[0]&&(r.div=t[29].json),32&n[0]&&(r.templateContext=t[29].templateContext),32&n[0]&&(r.origJson=t[29].origJson),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function pr(t){let e,n,r=t[5],i=[];for(let e=0;e<r.length;e+=1)i[e]=hr(ur(t,r,e));const o=t=>Vt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=N()},l(t){for(let e=0;e<i.length;e+=1)i[e].l(t);e=N()},m(t,r){for(let e=0;e<i.length;e+=1)i[e].m(t,r);P(t,e,r),n=!0},p(t,n){if(32&n[0]){let a;for(r=t[5],a=0;a<r.length;a+=1){const o=ur(t,r,a);i[a]?(i[a].p(o,n),At(i[a],1)):(i[a]=hr(o),i[a].c(),At(i[a],1),i[a].m(e.parentNode,e))}for(Et(),a=r.length;a<i.length;a+=1)o(a);Ct()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)At(i[t]);n=!0}},o(t){i=i.filter(Boolean);for(let t=0;t<i.length;t+=1)Vt(i[t]);n=!1},d(t){F(i,t),t&&S(e)}}}function fr(t){let e,n,r=!t[6]&&dr(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[6]?r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct()):r?(r.p(t,n),64&n[0]&&At(r,1)):(r=dr(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function gr(t,e,r){let i,o,a,l,s,c,u,d,h,f,g,m,v=n,y=n,$=n,_=n;t.$$.on_destroy.push((()=>v())),t.$$.on_destroy.push((()=>y())),t.$$.on_destroy.push((()=>$())),t.$$.on_destroy.push((()=>_()));let{json:b={}}=e,{templateContext:w}=e,{origJson:x}=e,{layoutParams:k}=e;const E=at(Wt);let C,A,V=!1,j=1,D=[],P=[],S=[],F=[],I=0,z=!1,T="top",M="left";return t.$$set=t=>{"json"in t&&r(0,b=t.json),"templateContext"in t&&r(1,w=t.templateContext),"origJson"in t&&r(2,x=t.origJson),"layoutParams"in t&&r(3,k=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(23,i=b.items),8388608&t.$$.dirty[0]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(12,V=!1):(r(12,V=!0),E.logError(Lt(new Error('Incorrect or empty "items" prop for div "grid"'))))),1&t.$$.dirty[0]&&(r(11,o=E.getDerivedFromVars(b.column_count)),_(),_=p(o,(t=>r(27,m=t)))),134225920&t.$$.dirty[0]&&r(13,j=Ze(m,j)),8392706&t.$$.dirty[0]&&r(22,a=(!V&&i||[]).map((t=>{let e=t,n=w;return({templateContext:n,json:e}=E.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),4194304&t.$$.dirty[0]){let t=[];a.forEach((e=>{t.push(E.getDerivedFromVars({rowSpan:e.json.row_span,columnSpan:e.json.column_span,width:e.json.width,height:e.json.height}))})),r(4,C=Ut(t,(t=>[...t]))),$(),$=p(C,(t=>r(26,g=t)))}if(72081416&t.$$.dirty[0]){const t={};let e=0,n=0;r(14,D=[]),r(15,P=[]),r(16,S=[]),r(17,F=[]),r(19,z=!1),r(5,A=a.map(((i,o)=>{var a,l,s,c;const u=g[o],d=Number(u.columnSpan)||1,h=Number(u.rowSpan)||1,p={x:e,y:n,colSpan:d,rowSpan:h},f="match_parent"===(null===(a=u.width)||void 0===a?void 0:a.type)?Number(u.width.weight||1)/d:0,m="match_parent"===(null===(l=u.height)||void 0===l?void 0:l.type)?Number(u.height.weight||1)/h:0,v=1===d&&"fixed"===(null===(s=u.width)||void 0===s?void 0:s.type)&&u.width.value?Number(u.width.value)/d:0,y=1===h&&"fixed"===(null===(c=u.height)||void 0===c?void 0:c.type)&&u.height.value?Number(u.height.value)/h:0;for(let i=e;i<e+d;++i)for(let e=n;e<n+h;++e)t[i+"_"+e]?r(19,z=!0):(t[i+"_"+e]=!0,(!D[i]||D[i]<f)&&r(14,D[i]=f,D),(!P[e]||P[e]<m)&&r(15,P[e]=m,P),(!S[i]||S[i]<v)&&r(16,S[i]=v,S),(!F[e]||F[e]<y)&&r(17,F[e]=y,F));do{++e,e>=j&&(e=0,++n)}while(t[e+"_"+n]);return Object.assign(Object.assign({},i),{layoutParams:{gridArea:p,fakeElement:(null==k?void 0:k.fakeElement)||!1}})}))),0!==e&&r(19,z=!0),z&&E.logError(Lt(new Error('Mismatching "grid" rows/columns'))),r(18,I=n)}1&t.$$.dirty[0]&&(r(10,l=E.getDerivedFromVars(b.content_alignment_vertical)),y(),y=p(l,(t=>r(25,f=t)))),34603008&t.$$.dirty[0]&&r(20,T=sn(f,T)),1&t.$$.dirty[0]&&(r(9,s=E.getDerivedFromVars(b.content_alignment_horizontal)),v(),v=p(s,(t=>r(24,h=t)))),18874368&t.$$.dirty[0]&&r(21,M=ln(h,M)),3145728&t.$$.dirty[0]&&r(8,c={valign:T,halign:M}),516096&t.$$.dirty[0]&&r(7,u={"grid-template-columns":cr(D,S,j),"grid-template-rows":cr(P,F,I)}),528384&t.$$.dirty[0]&&r(6,d=V||z)},[b,w,x,k,C,A,d,u,c,s,l,o,V,j,D,P,S,F,I,z,T,M,a,i,h,f,g,m]}const mr={gallery:"divkit-cbb0f",gallery_orientation_horizontal:"divkit-c9be7",gallery_orientation_vertical:"divkit-a72d5",gallery__scroller:"divkit-a4e39","gallery_scroll-snap":"divkit-f606e","gallery__items-grid":"divkit-eb4a5",gallery__items:"divkit-af276",gallery__arrow:"divkit-b72d7","gallery__arrow-icon":"divkit-d100d",gallery__arrow_left:"divkit-a0a5d",gallery__arrow_right:"divkit-f0f59","gallery__arrow-icon-path":"divkit-b4173"};function vr(t){const e=[];let n=t[0],r=1;for(let i=1;i<=t.length;i++)t[i]!==n?(e.push(r>1?"repeat(".concat(r,", ").concat(n,")"):n),n=t[i],r=1):r++;return e.join(" ")}function yr(t,e){let n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];null!==n&&clearTimeout(n),n=setTimeout((()=>{t.apply(this,i),n=null}),e)}}const{Boolean:$r}=Pt;function _r(t,e,n){const r=t.slice();return r[72]=e[n],r[73]=e,r[74]=n,r}function br(t,e,n){const r=t.slice();return r[75]=e[n],r}function wr(t){let e,n;return e=new Ye({props:{cls:de("gallery",mr,t[16]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,customActions:"gallery",$$slots:{default:[Vr]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};65536&n[0]&&(r.cls=de("gallery",mr,t[16])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),335953872&n[0]|65536&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function xr(t){let e,n;return e=new go({props:{layoutParams:t[8],div:t[75].json,templateContext:t[75].templateContext,origJson:t[75].origJson}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.layoutParams=t[8]),67108864&n[0]&&(r.div=t[75].json),67108864&n[0]&&(r.templateContext=t[75].templateContext),67108864&n[0]&&(r.origJson=t[75].origJson),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function kr(t){let e,n,r,i,o,a=t[74],l=t[72],s=[];for(let e=0;e<l.length;e+=1)s[e]=xr(br(t,l,e));const c=t=>Vt(s[t],1,1,(()=>{s[t]=null})),u=()=>t[60](e,a),d=()=>t[60](null,a);return{c(){e=I("div");for(let t=0;t<s.length;t+=1)s[t].c();n=M(),this.h()},l(t){e=L(t,"DIV",{class:!0,style:!0});var r=R(e);for(let t=0;t<s.length;t+=1)s[t].l(r);n=G(r),r.forEach(S),this.h()},h(){O(e,"class",r=mr.gallery__items),O(e,"style",i=Gt(t[17]))},m(t,r){P(t,e,r);for(let t=0;t<s.length;t+=1)s[t].m(e,null);D(e,n),u(),o=!0},p(r,h){if(t=r,67109120&h[0]){let r;for(l=t[72],r=0;r<l.length;r+=1){const i=br(t,l,r);s[r]?(s[r].p(i,h),At(s[r],1)):(s[r]=xr(i),s[r].c(),At(s[r],1),s[r].m(e,n))}for(Et(),r=l.length;r<s.length;r+=1)c(r);Ct()}(!o||131072&h[0]&&i!==(i=Gt(t[17])))&&O(e,"style",i),a!==t[74]&&(d(),a=t[74],u())},i(t){if(!o){for(let t=0;t<l.length;t+=1)At(s[t]);o=!0}},o(t){s=s.filter($r);for(let t=0;t<s.length;t+=1)Vt(s[t]);o=!1},d(t){t&&S(e),F(s,t),d()}}}function Er(t){let e,n,r=t[12]&&t[9]&&Cr(t),i=t[13]&&t[9]&&Ar(t);return{c(){r&&r.c(),e=M(),i&&i.c(),n=N()},l(t){r&&r.l(t),e=G(t),i&&i.l(t),n=N()},m(t,o){r&&r.m(t,o),P(t,e,o),i&&i.m(t,o),P(t,n,o)},p(t,o){t[12]&&t[9]?r?r.p(t,o):(r=Cr(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),t[13]&&t[9]?i?i.p(t,o):(i=Ar(t),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(t){r&&r.d(t),t&&S(e),i&&i.d(t),t&&S(n)}}}function Cr(t){let e,r,i,o,a=!t[29]&&function(t){let e,r,i,o;return{c(){e=z("svg"),r=z("path"),this.h()},l(t){e=q(t,"svg",{class:!0,xmlns:!0,width:!0,height:!0,viewBox:!0,fill:!0});var n=R(e);r=q(n,"path",{class:!0,d:!0}),R(r).forEach(S),n.forEach(S),this.h()},h(){O(r,"class",i=mr["gallery__arrow-icon-path"]),O(r,"d","m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"),O(e,"class",o=mr["gallery__arrow-icon"]),O(e,"xmlns","http://www.w3.org/2000/svg"),O(e,"width","32"),O(e,"height","32"),O(e,"viewBox","0 0 32 32"),O(e,"fill","none")},m(t,n){P(t,e,n),D(e,r)},p:n,d(t){t&&S(e)}}}();return{c(){e=I("div"),a&&a.c(),this.h()},l(t){e=L(t,"DIV",{class:!0});var n=R(e);a&&a.l(n),n.forEach(S),this.h()},h(){O(e,"class",r=t[29]||"".concat(mr.gallery__arrow," ").concat(mr.gallery__arrow_left))},m(n,r){P(n,e,r),a&&a.m(e,null),i||(o=J(e,"click",t[63]),i=!0)},p(t,e){t[29]||a.p(t,e)},d(t){t&&S(e),a&&a.d(),i=!1,o()}}}function Ar(t){let e,r,i,o,a=!t[30]&&function(t){let e,r,i,o;return{c(){e=z("svg"),r=z("path"),this.h()},l(t){e=q(t,"svg",{class:!0,xmlns:!0,width:!0,height:!0,viewBox:!0,fill:!0});var n=R(e);r=q(n,"path",{class:!0,d:!0}),R(r).forEach(S),n.forEach(S),this.h()},h(){O(r,"class",i=mr["gallery__arrow-icon-path"]),O(r,"d","M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"),O(e,"class",o=mr["gallery__arrow-icon"]),O(e,"xmlns","http://www.w3.org/2000/svg"),O(e,"width","32"),O(e,"height","32"),O(e,"viewBox","0 0 32 32"),O(e,"fill","none")},m(t,n){P(t,e,n),D(e,r)},p:n,d(t){t&&S(e)}}}();return{c(){e=I("div"),a&&a.c(),this.h()},l(t){e=L(t,"DIV",{class:!0});var n=R(e);a&&a.l(n),n.forEach(S),this.h()},h(){O(e,"class",r=t[30]||"".concat(mr.gallery__arrow," ").concat(mr.gallery__arrow_right))},m(n,r){P(n,e,r),a&&a.m(e,null),i||(o=J(e,"click",t[64]),i=!0)},p(t,e){t[30]||a.p(t,e)},d(t){t&&S(e),a&&a.d(),i=!1,o()}}}function Vr(t){let e,n,r,i,o,a,l,c,u,d,h,p=t[26],f=[];for(let e=0;e<p.length;e+=1)f[e]=kr(_r(t,p,e));const g=t=>Vt(f[t],1,1,(()=>{f[t]=null}));let m="horizontal"===t[6]&&Er(t);return{c(){e=I("div"),n=I("div");for(let t=0;t<f.length;t+=1)f[t].c();l=M(),m&&m.c(),c=N(),this.h()},l(t){e=L(t,"DIV",{class:!0,style:!0});var r=R(e);n=L(r,"DIV",{class:!0,style:!0});var i=R(n);for(let t=0;t<f.length;t+=1)f[t].l(i);i.forEach(S),r.forEach(S),l=G(t),m&&m.l(t),c=N(),this.h()},h(){O(n,"class",r=mr["gallery__items-grid"]),O(n,"style",i=Gt(t[18])),O(e,"class",o=mr.gallery__scroller+" "+(t[28]?"divkit-aa145":"")),O(e,"style",a=Gt(t[7]))},m(r,i){P(r,e,i),D(e,n);for(let t=0;t<f.length;t+=1)f[t].m(n,null);t[61](n),t[62](e),P(r,l,i),m&&m.m(r,i),P(r,c,i),u=!0,d||(h=J(e,"scroll",(function(){s(t[9]?t[32]:null)&&(t[9]?t[32]:null).apply(this,arguments)})),d=!0)},p(r,l){if(t=r,67242240&l[0]){let e;for(p=t[26],e=0;e<p.length;e+=1){const r=_r(t,p,e);f[e]?(f[e].p(r,l),At(f[e],1)):(f[e]=kr(r),f[e].c(),At(f[e],1),f[e].m(n,null))}for(Et(),e=p.length;e<f.length;e+=1)g(e);Ct()}(!u||262144&l[0]&&i!==(i=Gt(t[18])))&&O(n,"style",i),(!u||268435456&l[0]&&o!==(o=mr.gallery__scroller+" "+(t[28]?"divkit-aa145":"")))&&O(e,"class",o),(!u||128&l[0]&&a!==(a=Gt(t[7])))&&O(e,"style",a),"horizontal"===t[6]?m?m.p(t,l):(m=Er(t),m.c(),m.m(c.parentNode,c)):m&&(m.d(1),m=null)},i(t){if(!u){for(let t=0;t<p.length;t+=1)At(f[t]);u=!0}},o(t){f=f.filter($r);for(let t=0;t<f.length;t+=1)Vt(f[t]);u=!1},d(n){n&&S(e),F(f,n),t[61](null),t[62](null),n&&S(l),m&&m.d(n),n&&S(c),d=!1,h()}}}function jr(t){let e,n,r,i,o=!t[5]&&wr(t);return{c(){o&&o.c(),e=N()},l(t){o&&o.l(t),e=N()},m(a,l){o&&o.m(a,l),P(a,e,l),n=!0,r||(i=J(window,"resize",(function(){s(t[9]?t[33]:null)&&(t[9]?t[33]:null).apply(this,arguments)})),r=!0)},p(n,r){(t=n)[5]?o&&(Et(),Vt(o,1,1,(()=>{o=null})),Ct()):o?(o.p(t,r),32&r[0]&&At(o,1)):(o=wr(t),o.c(),At(o,1),o.m(e.parentNode,e))},i(t){n||(At(o),n=!0)},o(t){Vt(o),n=!1},d(t){o&&o.d(t),t&&S(e),r=!1,i()}}}function Dr(t,e,r){let i,o,a,l,s,c,u,d,h,g,m,v,y,$,_,b,w,x,k,E,C,A,V,j,D,P,S,F,I=n,z=n,T=n,M=n,N=n,J=n,O=n,B=n,R=n,U=n;t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>U()));let{json:W={}}=e,{templateContext:L}=e,{origJson:q}=e,{layoutParams:H}=e;const G=at(Wt);let K,Y,X=[],Z=!1,Q=!1,tt=null,et=!1;const nt=G.getCustomization("galleryLeftClass"),ot=G.getCustomization("galleryRightClass");let lt=!1;const st=G.isDesktop;f(t,st,(t=>r(59,S=t)));let ut,dt,ht,pt,ft=1,gt="horizontal",mt="start",vt=8,yt="",$t=[],_t={},bt=!1,wt={},xt=0;function kt(){if(!K)return;const t=K.scrollLeft,e=K.scrollWidth,n=K.offsetWidth;r(12,Z=t>2),r(13,Q=t+n<e-2)}const Et=yr(kt,50);function Ct(t){K.scroll({left:K.scrollLeft+.75*K.offsetWidth*("right"===t?1:-1),behavior:"smooth"})}function At(){let t=[],e=X[0].children.length;for(let n=0;n<e;++n)for(let e=0;e<ft;++e){const r=X[e].children[n];r&&t.push(r)}return t}function Vt(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"smooth";const r="horizontal"===gt,i=r?"offsetLeft":"offsetTop",o=r?"left":"top";K.scroll({[o]:Math.max(0,t[e][i]-vt/2),behavior:n})}function jt(t){const e=At(),n=K.getBoundingClientRect(),r=e.findIndex((t=>function(t,e){return"horizontal"===gt?e.left>=t.left&&e.right<=t.right:e.top>=t.top&&e.bottom<=t.bottom}(n,t.getBoundingClientRect())));if(-1!==r)return r;const i=e.map((t=>function(t,e){return"horizontal"===gt?e.right>t.left&&t.right>e.left:e.bottom>t.top&&t.bottom>e.top}(n,t.getBoundingClientRect()))),o=i.findIndex(Boolean);return-1!==o?"prev"===t&&2===i.filter(Boolean).length?o+1:o:"prev"===t?1:e.length-2}return!W.id||lt||(null==H?void 0:H.fakeElement)||G.registerInstance(W.id,{setCurrentItem(t){const e=At();if(t<0||t>e.length-1)throw new Error('Item is out of range in "set-current-item" action');Vt(e,t)},setPreviousItem(t){const e=jt("prev"),n=At();let r=e-1;r<0&&(r="ring"===t?n.length-1:e),Vt(n,r)},setNextItem(t){const e="horizontal"===gt?K.scrollLeft+K.offsetWidth===K.scrollWidth:K.scrollTop+K.offsetHeight===K.scrollHeight,n=At();if(e&&"ring"===t)return void Vt(n,0);const r=jt("next");let i=r+1;i>n.length-1&&(i="ring"===t?0:r),Vt(n,i)}}),rt((()=>{r(36,et=!0),!lt&&(kt(),xt)&&Vt(At(),xt,"auto")})),it((()=>{r(36,et=!1),W.id&&!(null==H?void 0:H.fakeElement)&&G.unregisterInstance(W.id)})),t.$$set=t=>{"json"in t&&r(0,W=t.json),"templateContext"in t&&r(1,L=t.templateContext),"origJson"in t&&r(2,q=t.origJson),"layoutParams"in t&&r(3,H=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(49,i=W.items),262144&t.$$.dirty[1]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(5,lt=!1):(r(5,lt=!0),G.logError(Lt(new Error('Incorrect or empty "items" prop for div "gallery"'))))),34&t.$$.dirty[0]|262144&t.$$.dirty[1]&&r(48,o=(!lt&&i||[]).map((t=>{let e=t,n=L;return({templateContext:n,json:e}=G.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),32&t.$$.dirty[0]|268435488&t.$$.dirty[1]&&r(9,a=S&&et&&!lt),528&t.$$.dirty[0]|16&t.$$.dirty[1]&&(a?"undefined"!=typeof ResizeObserver&&(r(35,tt=new ResizeObserver((()=>{Et()}))),tt.observe(Y)):tt&&(tt.disconnect(),r(35,tt=null))),1&t.$$.dirty[0]&&(r(27,l=G.getDerivedFromVars(W.column_count)),R(),R=p(l,(t=>r(58,P=t)))),134217792&t.$$.dirty[1]&&r(37,ft=Ze(P,ft)),131136&t.$$.dirty[1]&&r(26,s=function(t,e){let n=0,r=[];for(let i=0;i<t.length;++i)r[n]||(r[n]=[]),r[n].push(t[i]),++n>=e&&(n=0);return r}(o,ft)),1&t.$$.dirty[0]&&(r(25,c=G.getDerivedFromVars(W.orientation)),B(),B=p(c,(t=>r(57,D=t)))),64&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&r(6,gt=Wn(D,gt)),1&t.$$.dirty[0]&&(r(24,u=G.getDerivedFromVars(W.cross_content_alignment)),O(),O=p(u,(t=>r(56,j=t)))),33554560&t.$$.dirty[1]&&r(38,mt=function(t,e){return"start"===t||"center"===t||"end"===t?t:e}(j,mt)),1&t.$$.dirty[0]&&(r(23,d=G.getDerivedFromVars(W.item_spacing)),J(),J=p(d,(t=>r(55,V=t)))),16777728&t.$$.dirty[1]&&(r(40,vt=ve(V,vt)),r(39,ut=Kt(vt))),1&t.$$.dirty[0]&&(r(22,h=G.getDerivedFromVars(W.cross_spacing)),N(),N=p(h,(t=>r(54,A=t)))),8391168&t.$$.dirty[1]&&(r(42,ht=ve(A,vt)),r(41,dt=Kt(ht))),1&t.$$.dirty[0]&&(r(21,g=G.getDerivedFromVars(W.paddings)),M(),M=p(g,(t=>r(53,C=t)))),4198400&t.$$.dirty[1]&&r(43,yt=me(C,yt)),64&t.$$.dirty[0]&&r(47,m="horizontal"===gt?"grid-template-columns":"grid-template-rows"),64&t.$$.dirty[0]|131072&t.$$.dirty[1]){let t=[];o.forEach((e=>{const n="horizontal"===gt?"width":"height";t.push(G.getDerivedFromVars(e.json[n]))})),r(14,pt=Ut(t,(t=>t))),T(),T=p(pt,(t=>r(52,E=t)))}if(64&t.$$.dirty[0]|2105408&t.$$.dirty[1]&&(r(44,$t=[]),ft>1?$t.push("auto"):E.forEach((t=>{!t&&"horizontal"===gt||"match_parent"===(null==t?void 0:t.type)?$t.push("100%"):$t.push("max-content")}))),1&t.$$.dirty[0]&&(r(20,v=G.getDerivedFromVars(W.scroll_mode)),z(),z=p(v,(t=>r(51,k=t)))),456&t.$$.dirty[0]|1049280&t.$$.dirty[1]){const t={};let e={};r(45,bt=!1),(null==H?void 0:H.fakeElement)&&(e.fakeElement=!0),"horizontal"===gt?e.parentVAlign=mt:e.parentHAlign=mt,"paging"===k&&(r(45,bt=!0),e.scrollSnap="start",t["horizontal"===gt?"scroll-padding-left":"scroll-padding-top"]=Kt(vt/2)),1===ft&&(e.parentLayoutOrientation=gt),r(7,_t=_e(t,_t)),r(8,wt=_e(e,wt))}1&t.$$.dirty[0]&&(r(19,y=G.getDerivedFromVars(W.restrict_parent_scroll)),U(),U=p(y,(t=>r(28,F=t)))),5120&t.$$.dirty[1]&&r(18,$={padding:yt,"grid-gap":dt}),73984&t.$$.dirty[1]&&r(17,_={"grid-gap":ut,[m]:vr($t)}),64&t.$$.dirty[0]|16384&t.$$.dirty[1]&&r(16,b={orientation:gt,"scroll-snap":bt}),1&t.$$.dirty[0]&&(r(15,w=G.getDerivedFromVars(W.default_item)),I(),I=p(w,(t=>r(50,x=t)))),557056&t.$$.dirty[1]&&r(46,xt=ve(x,xt))},[W,L,q,H,Y,lt,gt,_t,wt,a,K,X,Z,Q,pt,w,b,_,$,y,v,g,h,d,u,c,s,l,F,nt,ot,st,kt,Et,Ct,tt,et,ft,mt,ut,vt,dt,ht,yt,$t,bt,xt,m,o,i,x,k,E,C,A,V,j,D,P,S,function(t,e){ct[t?"unshift":"push"]((()=>{X[e]=t,r(11,X)}))},function(t){ct[t?"unshift":"push"]((()=>{Y=t,r(4,Y)}))},function(t){ct[t?"unshift":"push"]((()=>{K=t,r(10,K)}))},()=>Ct("left"),()=>Ct("right")]}const Pr={tabs:"divkit-e0df5",tabs__list:"divkit-ea19b",tabs__item:"divkit-c25c7",tabs__item_selected:"divkit-d560a",tabs__item_actionable:"divkit-dfda0",tabs__panels:"divkit-f5dc0",tabs__swiper:"divkit-eb42c",tabs__swiper_animated:"divkit-b9f18",tabs__swiper_inited:"divkit-fa574",tabs__panel:"divkit-cc9fb",tabs__panel_visible:"divkit-e7306",tabs__separator:"divkit-b85bf"},{Boolean:Sr}=Pt;function Fr(t,e,n){const r=t.slice();return r[83]=e[n],r[85]=n,r}function Ir(t,e,n){const r=t.slice();r[83]=e[n],r[85]=n;const i=r[85]===r[6];return r[86]=i,r}function zr(t){let e,n;return e=new Ye({props:{cls:de("tabs",Pr,t[42]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customActions:"tabs",$$slots:{default:[Br]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),536870890&n[0]|517&n[1]|67108864&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function Tr(t){let e,n,r=t[83].title+"";return{c(){e=T(r),n=M()},l(t){e=H(t,r),n=G(t)},m(t,r){P(t,e,r),P(t,n,r)},p(t,n){262144&n[0]&&r!==(r=t[83].title+"")&&K(e,r)},d(t){t&&S(e),t&&S(n)}}}function Mr(t){var e,n,r;let i,o;function a(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t[59](t[85],...n)}return i=new Fe({props:{cls:de("tabs__item",Pr,{selected:t[86],actionable:Boolean(t[83].title_click_action)}),actions:!t[83].title_click_action||null!==(e=t[3])&&void 0!==e&&e.fakeElement?[]:[t[83].title_click_action],attrs:{id:"".concat(t[41],"-tab-").concat(t[85]),"aria-controls":"".concat(t[41],"-panel-").concat(t[85]),role:"tab",tabindex:!t[86]||null!==(n=t[3])&&void 0!==n&&n.fakeElement?"-1":t[83].title_click_action?void 0:"0","aria-selected":t[86]?"true":"false"},customAction:null!==(r=t[3])&&void 0!==r&&r.fakeElement?null:a,$$slots:{default:[Tr]},$$scope:{ctx:t}}}),{c(){zt(i.$$.fragment)},l(t){Tt(i.$$.fragment,t)},m(t,e){Mt(i,t,e),o=!0},p(e,n){var r,o,l;t=e;const s={};262208&n[0]&&(s.cls=de("tabs__item",Pr,{selected:t[86],actionable:Boolean(t[83].title_click_action)})),262152&n[0]&&(s.actions=!t[83].title_click_action||null!==(r=t[3])&&void 0!==r&&r.fakeElement?[]:[t[83].title_click_action]),262216&n[0]&&(s.attrs={id:"".concat(t[41],"-tab-").concat(t[85]),"aria-controls":"".concat(t[41],"-panel-").concat(t[85]),role:"tab",tabindex:!t[86]||null!==(o=t[3])&&void 0!==o&&o.fakeElement?"-1":t[83].title_click_action?void 0:"0","aria-selected":t[86]?"true":"false"}),8&n[0]&&(s.customAction=null!==(l=t[3])&&void 0!==l&&l.fakeElement?null:a),262144&n[0]|67108864&n[2]&&(s.$$scope={dirty:n,ctx:t}),i.$set(s)},i(t){o||(At(i.$$.fragment,t),o=!0)},o(t){Vt(i.$$.fragment,t),o=!1},d(t){Nt(i,t)}}}function Nr(t){let e,n,r;return{c(){e=I("div"),this.h()},l(t){e=L(t,"DIV",{class:!0,style:!0}),R(e).forEach(S),this.h()},h(){O(e,"class",n=Pr.tabs__separator),O(e,"style",r=Gt(t[33]))},m(t,n){P(t,e,n)},p(t,n){4&n[1]&&r!==(r=Gt(t[33]))&&O(e,"style",r)},d(t){t&&S(e)}}}function Jr(t){let e,n;return e=new go({props:{div:t[83].div,templateContext:t[1],layoutParams:t[5]}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};262144&n[0]&&(r.div=t[83].div),2&n[0]&&(r.templateContext=t[1]),32&n[0]&&(r.layoutParams=t[5]),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function Or(t){let e,n,r,i,o,a,l=t[27][t[85]]&&Jr(t);return{c(){e=I("div"),l&&l.c(),n=M(),this.h()},l(t){e=L(t,"DIV",{class:!0,role:!0,id:!0,"aria-labelledby":!0,style:!0});var r=R(e);l&&l.l(r),n=G(r),r.forEach(S),this.h()},h(){O(e,"class",r=de("tabs__panel",Pr,{visible:t[28][t[85]]})),O(e,"role","tabpanel"),O(e,"id",i=t[41]+"-panel-"+t[85]),O(e,"aria-labelledby",o=t[41]+"-tab-"+t[85]),Y(e,"left",100*t[85]+"%")},m(t,r){P(t,e,r),l&&l.m(e,null),D(e,n),a=!0},p(t,i){t[27][t[85]]?l?(l.p(t,i),134217728&i[0]&&At(l,1)):(l=Jr(t),l.c(),At(l,1),l.m(e,n)):l&&(Et(),Vt(l,1,1,(()=>{l=null})),Ct()),(!a||268435456&i[0]&&r!==(r=de("tabs__panel",Pr,{visible:t[28][t[85]]})))&&O(e,"class",r)},i(t){a||(At(l),a=!0)},o(t){Vt(l),a=!1},d(t){t&&S(e),l&&l.d()}}}function Br(t){let e,n,r,i,o,a,c,u,d,h,p,f=t[18],g=[];for(let e=0;e<f.length;e+=1)g[e]=Mr(Ir(t,f,e));const m=t=>Vt(g[t],1,1,(()=>{g[t]=null}));let v=t[19]&&Nr(t),y=t[18],$=[];for(let e=0;e<y.length;e+=1)$[e]=Or(Fr(t,y,e));const _=t=>Vt($[t],1,1,(()=>{$[t]=null}));return{c(){e=I("div");for(let t=0;t<g.length;t+=1)g[t].c();r=M(),v&&v.c(),i=M(),o=I("div"),a=I("div");for(let t=0;t<$.length;t+=1)$[t].c();this.h()},l(t){e=L(t,"DIV",{class:!0,role:!0});var n=R(e);for(let t=0;t<g.length;t+=1)g[t].l(n);n.forEach(S),r=G(t),v&&v.l(t),i=G(t),o=L(t,"DIV",{class:!0});var l=R(o);a=L(l,"DIV",{class:!0});var s=R(a);for(let t=0;t<$.length;t+=1)$[t].l(s);s.forEach(S),l.forEach(S),this.h()},h(){O(e,"class",n=Pr.tabs__list+" "+(t[40]?"divkit-aa145":"")),O(e,"role","tablist"),Y(e,"--divkit-tabs-title-padding",t[17]?pe(t[17]):"",!1),Y(e,"--divkit-tabs-font-size",Kt(t[7]),!1),Y(e,"--divkit-tabs-paddings",t[8],!1),Y(e,"--divkit-tabs-line-height",t[23],!1),Y(e,"--divkit-tabs-letter-spacing",t[24],!1),Y(e,"--divkit-tabs-active-font-weight",t[10]||"",!1),Y(e,"--divkit-tabs-inactive-font-weight",t[11]||"",!1),Y(e,"--divkit-tabs-active-text-color",t[12],!1),Y(e,"--divkit-tabs-inactive-text-color",t[13],!1),Y(e,"--divkit-tabs-active-background-color",t[14],!1),Y(e,"--divkit-tabs-inactive-background-color",t[15],!1),Y(e,"--divkit-tabs-border-radius",t[9],!1),Y(e,"--divkit-tabs-items-spacing",t[16]?Yt(t[16]):"",!1),O(a,"class",c=de("tabs__swiper",Pr,{inited:t[25],animated:t[26]})),O(o,"class",u=Pr.tabs__panels+" "+(t[40]?"divkit-aa145":""))},m(n,l){P(n,e,l);for(let t=0;t<g.length;t+=1)g[t].m(e,null);t[60](e),P(n,r,l),v&&v.m(n,l),P(n,i,l),P(n,o,l),D(o,a);for(let t=0;t<$.length;t+=1)$[t].m(a,null);t[61](a),t[62](o),d=!0,h||(p=[J(e,"keydown",t[44]),J(a,"touchstart",(function(){s(t[31]?t[45]:void 0)&&(t[31]?t[45]:void 0).apply(this,arguments)})),J(a,"touchmove",(function(){s(t[31]?t[46]:void 0)&&(t[31]?t[46]:void 0).apply(this,arguments)})),J(a,"touchend",(function(){s(t[31]?t[47]:void 0)&&(t[31]?t[47]:void 0).apply(this,arguments)})),J(a,"touchcancel",(function(){s(t[31]?t[47]:void 0)&&(t[31]?t[47]:void 0).apply(this,arguments)}))],h=!0)},p(r,l){if(t=r,262216&l[0]|5120&l[1]){let n;for(f=t[18],n=0;n<f.length;n+=1){const r=Ir(t,f,n);g[n]?(g[n].p(r,l),At(g[n],1)):(g[n]=Mr(r),g[n].c(),At(g[n],1),g[n].m(e,null))}for(Et(),n=f.length;n<g.length;n+=1)m(n);Ct()}if((!d||512&l[1]&&n!==(n=Pr.tabs__list+" "+(t[40]?"divkit-aa145":"")))&&O(e,"class",n),131072&l[0]&&Y(e,"--divkit-tabs-title-padding",t[17]?pe(t[17]):"",!1),128&l[0]&&Y(e,"--divkit-tabs-font-size",Kt(t[7]),!1),256&l[0]&&Y(e,"--divkit-tabs-paddings",t[8],!1),8388608&l[0]&&Y(e,"--divkit-tabs-line-height",t[23],!1),16777216&l[0]&&Y(e,"--divkit-tabs-letter-spacing",t[24],!1),1024&l[0]&&Y(e,"--divkit-tabs-active-font-weight",t[10]||"",!1),2048&l[0]&&Y(e,"--divkit-tabs-inactive-font-weight",t[11]||"",!1),4096&l[0]&&Y(e,"--divkit-tabs-active-text-color",t[12],!1),8192&l[0]&&Y(e,"--divkit-tabs-inactive-text-color",t[13],!1),16384&l[0]&&Y(e,"--divkit-tabs-active-background-color",t[14],!1),32768&l[0]&&Y(e,"--divkit-tabs-inactive-background-color",t[15],!1),512&l[0]&&Y(e,"--divkit-tabs-border-radius",t[9],!1),65536&l[0]&&Y(e,"--divkit-tabs-items-spacing",t[16]?Yt(t[16]):"",!1),t[19]?v?v.p(t,l):(v=Nr(t),v.c(),v.m(i.parentNode,i)):v&&(v.d(1),v=null),402915362&l[0]|1024&l[1]){let e;for(y=t[18],e=0;e<y.length;e+=1){const n=Fr(t,y,e);$[e]?($[e].p(n,l),At($[e],1)):($[e]=Or(n),$[e].c(),At($[e],1),$[e].m(a,null))}for(Et(),e=y.length;e<$.length;e+=1)_(e);Ct()}(!d||100663296&l[0]&&c!==(c=de("tabs__swiper",Pr,{inited:t[25],animated:t[26]})))&&O(a,"class",c),(!d||512&l[1]&&u!==(u=Pr.tabs__panels+" "+(t[40]?"divkit-aa145":"")))&&O(o,"class",u)},i(t){if(!d){for(let t=0;t<f.length;t+=1)At(g[t]);for(let t=0;t<y.length;t+=1)At($[t]);d=!0}},o(t){g=g.filter(Sr);for(let t=0;t<g.length;t+=1)Vt(g[t]);$=$.filter(Sr);for(let t=0;t<$.length;t+=1)Vt($[t]);d=!1},d(n){n&&S(e),F(g,n),t[60](null),n&&S(r),v&&v.d(n),n&&S(i),n&&S(o),F($,n),t[61](null),t[62](null),h=!1,l(p)}}}function Rr(t){let e,n,r=!t[4]&&zr(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[4]?r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct()):r?(r.p(t,n),16&n[0]&&At(r,1)):(r=zr(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Ur(t,e,r){let i,o,a,l,s,c,u,d,h,f,g,m,v,y,$,_,b,w,x,k,E,C,A=n,V=n,j=n,D=n,P=n,S=n,F=n,I=n,z=n;var T;t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>z()));let{json:M={}}=e,{templateContext:N}=e,{origJson:J}=e,{layoutParams:O}=e;const B=at(Wt),R=B.genId("tabs");let U,W,L,q=!1,H={};const G=B.getJsonWithVars(M.selected_tab);let K,Y,X=G&&Number(G)||0,Z=12,Q="",tt="",et="",nt="",rt="",ot="",lt="",st="",ut=0,dt="",ht="",pt=null,ft=!1,mt=!1,vt=X,yt=[],$t=[];async function _t(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(vt=X,r(6,X=t),Vt(),xt(),e){await gt();const t=U.querySelector(".".concat(Pr.tabs__item_selected));t&&t.focus()}}function bt(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=null==i?void 0:i.length;if(!n)return;let r=X+t;r>=n?r=0:r<0&&(r=n-1),_t(r,e)}function wt(t,e){return X===e||(_t(e),!1)}function xt(){r(26,mt=!0),kt(100*-X),Et(),async function(){await gt();const t=document.getElementById("".concat(R,"-panel-").concat(X));t&&r(21,W.style.height=Kt(t.offsetHeight),W)}(),At(),Pt=-X*W.clientWidth}async function kt(t){await gt(),r(22,L.style.transform="translate3d(".concat(t,"%,0,0)"),L)}function Et(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=t?Math.max(0,X-1):Math.min(X,vt),n=t?Math.min(i.length-1,X+1):Math.max(X,vt);r(27,yt=yt.map(((t,r)=>t||r>=e&&r<=n))),r(28,$t=$t.map(((t,r)=>r>=e&&r<=n)))}let Ct=null;function At(){Ct&&clearTimeout(Ct),Ct=window.setTimeout((()=>{r(28,$t=i.map(((t,e)=>e===X)))}),400)}function Vt(){ft||(r(25,ft=!0),r(21,W.style.height=Kt(W.clientHeight),W),r(22,L.style.transform="translate3d(".concat(100*-vt,"%,0,0)"),L))}let jt,Dt,Pt,St=null,Ft=null,It=!1,zt=!1;return!M.id||q||(null==O?void 0:O.fakeElement)||B.registerInstance(M.id,{setCurrentItem(t){if(t<0||t>i.length-1)throw new Error('Item is out of range in "set-current-item" action');_t(t)},setPreviousItem(t){let e=X-1;e<0&&(e="ring"===t?i.length-1:X),_t(e)},setNextItem(t){let e=X+1;e>i.length-1&&(e="ring"===t?0:X),_t(e)}}),it((()=>{M.id&&!(null==O?void 0:O.fakeElement)&&B.unregisterInstance(M.id)})),t.$$set=t=>{"json"in t&&r(0,M=t.json),"templateContext"in t&&r(1,N=t.templateContext),"origJson"in t&&r(2,J=t.origJson),"layoutParams"in t&&r(3,O=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(18,i=M.items||[]),262144&t.$$.dirty[0]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(4,q=!1):(r(4,q=!0),B.logError(Lt(new Error('Incorrect or empty "items" prop for div "tabs"'))))),1&t.$$.dirty[0]&&(r(39,o=B.getDerivedFromVars(M.width)),I(),I=p(o,(t=>r(58,E=t)))),1&t.$$.dirty[0]&&(r(38,a=B.getDerivedFromVars(M.height)),F(),F=p(a,(t=>r(57,k=t)))),40&t.$$.dirty[0]|201326592&t.$$.dirty[1]){let t={};(null==O?void 0:O.fakeElement)&&(t.fakeElement=!0),"wrap_content"===(null==E?void 0:E.type)&&(t.parentHorizontalWrapContent=!0),k&&"wrap_content"!==k.type||(t.parentVerticalWrapContent=!0),r(5,H=_e(t,H))}if(262225&t.$$.dirty[0]&&!q&&(X<0||X>=i.length)&&(B.logError(Lt(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:M.selected_tab,length:i.length}})),r(6,X=X<0?0:i.length-1)),1&t.$$.dirty[0]&&(r(37,l=B.getDerivedFromVars(M.tab_title_style)),S(),S=p(l,(t=>r(56,x=t)))),33554432&t.$$.dirty[1]&&r(51,s=x||{}),128&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(7,Z=Ze(s.font_size,Z)),384&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&(s.font_size||s.paddings)){const t=s.paddings||{top:6,right:8,bottom:6,left:8},e={top:(Number(t.top)||0)/Z*10,right:(Number(t.right)||0)/Z*10,bottom:(Number(t.bottom)||0)/Z*10,left:(Number(t.left)||0)/Z*10};r(8,Q=me(e,Q))}if(128&t.$$.dirty[0]|1048576&t.$$.dirty[1]){const t=s.line_height;void 0!==t&&Ie(t)&&r(23,tt=Kt(t/Z*10))}if(128&t.$$.dirty[0]|1048576&t.$$.dirty[1]){const t=s.letter_spacing;void 0!==t&&ge(t)&&r(24,et=Kt(t/Z*10))}if(640&t.$$.dirty[0]|1179648&t.$$.dirty[1]&&(s.corner_radius||s.corners_radius||s.font_size)){const t=null!==r(48,T=s.corner_radius)&&void 0!==T?T:1e3;s.corners_radius?r(9,nt=function(t,e,n,r){const i=[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]];for(let t=0;t<i.length;++t)if(i[t]&&!ge(i[t]))return r;return Ee(t,e,n)}(s.corners_radius,t,Z,nt)):ge(t)&&r(9,nt=Kt(t/Z*10))}1024&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(10,K=tn(s.active_font_weight||s.font_weight,K)),2048&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(11,Y=tn(s.inactive_font_weight||s.font_weight,Y)),4096&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(12,rt=Zt(s.active_text_color,1,rt)),8192&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(13,ot=Zt(s.inactive_text_color,1,ot)),16384&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(14,lt=Zt(s.active_background_color,1,lt)),32768&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(15,st=Zt(s.inactive_background_color,1,st)),65536&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&r(16,ut=ve(s.item_spacing,ut)),1&t.$$.dirty[0]&&(r(36,c=B.getDerivedFromVars(M.has_separator)),P(),P=p(c,(t=>r(19,w=t)))),1&t.$$.dirty[0]&&(r(35,u=B.getDerivedFromVars(M.separator_color)),D(),D=p(u,(t=>r(55,b=t)))),1&t.$$.dirty[0]&&(r(34,d=B.getDerivedFromVars(M.separator_paddings)),j(),j=p(d,(t=>r(54,_=t)))),524288&t.$$.dirty[0]|25952256&t.$$.dirty[1]&&w&&(b&&r(49,dt=Zt(b,1,dt)),_&&r(50,ht=me(_,ht))),786432&t.$$.dirty[1]&&r(33,h={background:dt,margin:ht}),1&t.$$.dirty[0]&&(r(32,f=B.getDerivedFromVars(M.switch_tabs_by_content_swipe_enabled)),V(),V=p(f,(t=>r(53,$=t)))),4194304&t.$$.dirty[1]&&r(31,g=void 0===$||Boolean($)),1&t.$$.dirty[0]&&(r(30,m=B.getDerivedFromVars(M.restrict_parent_scroll)),z(),z=p(m,(t=>r(40,C=t)))),1&t.$$.dirty[0]&&(r(29,v=B.getDerivedFromVars(M.title_paddings)),A(),A=p(v,(t=>r(52,y=t)))),131072&t.$$.dirty[0]|2097152&t.$$.dirty[1]&&r(17,pt=ke(y||void 0,pt)),262144&t.$$.dirty[0]&&(q||(r(27,yt=i.map(((t,e)=>e===X))),r(28,$t=i.map(((t,e)=>e===X)))))},[M,N,J,O,q,H,X,Z,Q,nt,K,Y,rt,ot,lt,st,ut,pt,i,w,U,W,L,tt,et,ft,mt,yt,$t,v,m,g,f,h,d,u,c,l,a,o,C,R,{},wt,function(t){if(!(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)&&i){if(37===t.which)bt(-1,!0);else if(39===t.which)bt(1,!0);else if(36===t.which)_t(0,!0);else{if(35!==t.which)return;_t(i.length-1,!0)}t.preventDefault()}},function(t){var e;const n=t.target,o=null===(e=null==n?void 0:n.closest)||void 0===e?void 0:e.call(n,".".concat("divkit-aa145"));i.length<2||t.touches.length>1||o&&o!==W||(It=!1,zt=!1,St=Ve(t),Ft=null,jt=Date.now(),Dt=Pt||-X*W.clientWidth,r(26,mt=!1),Ct&&clearTimeout(Ct))},function(t){const e=Ve(t);if(!St||Ft&&Ft.x===e.x&&Ft.y===e.y)return;Ft=e;const n=W.clientWidth;if(It){Pt=e.x-St.x+Dt;const t=n*i.length;if(Pt>0)Pt=Pt*n/(Pt+3*n);else if(-Pt+n>t){let e=-Pt+n-t;e=e*n/(e+3*n),Pt=n-t-e}kt(100*Pt/n)}else Math.abs(e.y-St.y)>10?zt=!0:!zt&&Math.abs(e.x-St.x)>8&&(Vt(),It=!0,St=e,kt(100*-X),Et(!0));It&&t.cancelable&&t.preventDefault()},function(){zt=!1,St=null;let t=X;if(!It)return;It=!1;const e=Math.min(512,W.clientWidth);Math.abs(Dt-Pt)>e/4*Math.min(1,(Date.now()-jt)/750)&&(t+=Dt>Pt?1:-1),t>=i.length?t=i.length-1:t<0&&(t=0),t===X?(Pt=-t*e,kt(100*-t),At()):_t(t)},T,dt,ht,s,y,$,_,b,x,k,E,(t,e)=>wt(0,t),function(t){ct[t?"unshift":"push"]((()=>{U=t,r(20,U)}))},function(t){ct[t?"unshift":"push"]((()=>{L=t,r(22,L)}))},function(t){ct[t?"unshift":"push"]((()=>{W=t,r(21,W)}))}]}function Wr(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function Lr(t){return t*t*t}function qr(t){const e=t-1;return e*e*e+1}function Hr(t){return e=>{if(e<=0)return 0;if(e>=1)return 1;const n=e*t.length,r=Math.floor(n),i=n-r;return t[r]*i+t[r+1]*(1-i)}}const Gr=Hr([.0021,.0045,.0071,.01,.0131,.0165,.0202,.0242,.0284,.033,.0378,.0429,.0483,.054,.0601,.0664,.0731,.08,.0872,.0948,.1026,.1108,.1192,.1279,.1369,.1461,.1556,.1653,.1753,.1855,.1958,.2064,.2171,.2279,.2389,.25,.2612,.2725,.2839,.2952,.3067,.3181,.3295,.341,.3524,.3637,.375,.3863,.3974,.4085,.4195,.4304,.4412,.4519,.4624,.4729,.4832,.4934,.5034,.5133,.5231,.5327,.5422,.5516,.5608,.5699,.5788,.5876,.5963,.6048,.6132,.6214,.6295,.6375,.6453,.653,.6606,.668,.6754,.6825,.6896,.6965,.7034,.7101,.7166,.7231,.7295,.7357,.7418,.7479,.7538,.7596,.7653,.7709,.7764,.7818,.7871,.7923,.7974,.8024,.8073,.8122,.8169,.8216,.8261,.8306,.835,.8394,.8436,.8478,.8518,.8558,.8598,.8636,.8674,.8711,.8747,.8783,.8818,.8852,.8886,.8919,.8951,.8983,.9014,.9044,.9074,.9103,.9131,.9159,.9187,.9213,.924,.9265,.929,.9315,.9339,.9362,.9385,.9408,.943,.9451,.9472,.9492,.9512,.9532,.9551,.9569,.9587,.9605,.9622,.9638,.9655,.967,.9686,.9701,.9715,.9729,.9743,.9756,.9769,.9782,.9794,.9805,.9817,.9828,.9838,.9848,.9858,.9868,.9877,.9886,.9894,.9902,.991,.9917,.9924,.9931,.9937,.9943,.9949,.9954,.9959,.9964,.9969,.9973,.9977,.998,.9983,.9986,.9989,.9991,.9993,.9995,.9997,.9998,.9999,.9999,1,1]),Kr=Hr([5e-4,.002,.0045,.0078,.0119,.0168,.0224,.0286,.0355,.0429,.0508,.0592,.0681,.0774,.087,.0969,.1072,.1177,.1285,.1395,.1507,.1621,.1736,.1853,.197,.2089,.2208,.2328,.2448,.2569,.2689,.281,.293,.305,.317,.3289,.3408,.3526,.3644,.376,.3876,.3991,.4105,.4218,.433,.444,.455,.4658,.4765,.4871,.4975,.5078,.518,.528,.5379,.5477,.5573,.5668,.5761,.5853,.5944,.6033,.612,.6206,.6291,.6374,.6456,.6537,.6616,.6693,.677,.6845,.6918,.699,.7061,.713,.7199,.7265,.7331,.7395,.7458,.752,.758,.764,.7698,.7755,.781,.7865,.7918,.7971,.8022,.8072,.8121,.8169,.8216,.8262,.8307,.8351,.8394,.8436,.8477,.8517,.8557,.8595,.8633,.8669,.8705,.874,.8775,.8808,.8841,.8873,.8904,.8934,.8964,.8993,.9022,.9049,.9076,.9103,.9129,.9154,.9178,.9202,.9226,.9249,.9271,.9293,.9314,.9335,.9355,.9375,.9394,.9413,.9431,.9449,.9466,.9483,.95,.9516,.9532,.9547,.9562,.9576,.9591,.9605,.9618,.9631,.9644,.9657,.9669,.9681,.9692,.9703,.9714,.9725,.9736,.9746,.9756,.9765,.9775,.9784,.9793,.9802,.981,.9818,.9826,.9834,.9842,.9849,.9856,.9863,.987,.9877,.9883,.989,.9896,.9902,.9908,.9913,.9919,.9924,.993,.9935,.994,.9944,.9949,.9954,.9958,.9963,.9967,.9971,.9975,.9979,.9983,.9986,.999,.9993,.9997,1]),Yr={linear:r,ease:Gr,ease_in:Lr,ease_out:qr,ease_in_out:Wr,spring:Kr};function Xr(t){return Math.max(...t.map((t=>(Number(t.duration)||200)+(Number(t.start_delay)||0))))}function Zr(t,e){let{transitions:n,elementBbox:r,rootBbox:i,direction:o,maxDuration:a,alpha:l}=e;const s=null!=l?l:1;return{duration:a,css:t=>{const e=t*a,l=n.map((t=>{const n=Number(t.start_delay)||0,a=Number(t.duration)||200,l=Math.max(0,Math.min(1,(e-n)/a)),c="in"===o?1-l:l,u=(Yr[t.interpolator||"ease_in_out"]||Wr)(c);if("fade"===t.type)return u>=1?{active:!1,opacity:0}:{active:u>0&&u<1,opacity:(1-u)*s+u*(t.alpha||0)};if("slide"===t.type){var d;const e="top"===t.edge||"left"===t.edge?-1:1,n="top"!==t.edge&&"bottom"!==t.edge&&t.edge?"translateX":"translateY";let o=null===(d=t.distance)||void 0===d?void 0:d.value;void 0===o&&(o="top"!==t.edge&&"bottom"!==t.edge&&t.edge?Math.abs(i["left"===t.edge?"left":"right"]-r["left"===t.edge?"right":"left"]):Math.abs(i["bottom"===t.edge?"bottom":"top"]-r["bottom"===t.edge?"top":"bottom"]));const a=o*u;return{active:u>0&&u<1,translate:"".concat(n,"(").concat(a*e,"px)")}}if("scale"===t.type){var h,p;const e=1-u+u*(t.scale||0),n=null!==(h=t.pivot_x)&&void 0!==h?h:.5,i=null!==(p=t.pivot_y)&&void 0!==p?p:.5,o=(1-e)*r.width*n,a=(1-e)*r.height*i;return{active:u>0&&u<1,scale:"translate(".concat(o,"px, ").concat(a,"px) scale(").concat(e,")")}}return{}})),c=l.map((t=>t.opacity)).filter((t=>void 0!==t)).reduce(((t,e)=>t*e),1),u=l.map((t=>t.translate)).filter((t=>void 0!==t)).join(" "),d=l.map((t=>t.scale)).filter((t=>void 0!==t)).join(" "),h=l.filter((t=>t.active)).map((t=>t.scale)).filter((t=>void 0!==t)),p=[u,h.length?h[h.length-1]:d].filter(Boolean).join(" ");return"transform:".concat(p||"none",";opacity:").concat(c)}}}function Qr(t,e,n){return t*(1-n)+e*n}const ti={linear:r,ease:Gr,ease_in:Lr,ease_out:qr,ease_in_out:Wr,spring:Kr};function ei(t,e){var n,r;let{rootBbox:i,beforeBbox:o,afterBbox:a,transition:l}=e;return{delay:null!==(n=l.start_delay)&&void 0!==n?n:0,duration:null!==(r=l.duration)&&void 0!==r?r:200,easing:l.interpolator&&l.interpolator in ti?ti[l.interpolator]:Wr,css:t=>["top:".concat(Qr(o.top,a.top,t)-i.top,"px"),"left:".concat(Qr(o.left,a.left,t)-i.left,"px"),"width:".concat(Qr(o.width,a.width,t),"px"),"height:".concat(Qr(o.height,a.height,t),"px")].join(";")}}function ni(t){const e=[];return"set"===t.type?(t.items||[]).forEach((t=>{e.push(...ni(t))})):e.push(t),e}const{Map:ri}=Pt;function ii(t,e,n){const r=t.slice();return r[27]=e[n],r}function oi(t){let e,n;return e=new Ye({props:{cls:"divkit-b8efc",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[di]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};1&n&&(r.json=t[0]),4&n&&(r.origJson=t[2]),2&n&&(r.templateContext=t[1]),8&n&&(r.layoutParams=t[3]),1073742034&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function ai(t){let e,r,i=t[7],o=li(t);return{c(){o.c(),e=N()},l(t){o.l(t),e=N()},m(t,n){o.m(t,n),P(t,e,n),r=!0},p(t,r){128&r&&d(i,i=t[7])?(Et(),Vt(o,1,1,n),Ct(),o=li(t),o.c(),At(o,1),o.m(e.parentNode,e)):o.p(t,r)},i(t){r||(At(o),r=!0)},o(t){Vt(o),r=!1},d(t){t&&S(e),o.d(t)}}}function li(t){let e,n;return e=new go({props:{div:t[7].div,templateContext:t[1]}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};128&n&&(r.div=t[7].div),2&n&&(r.templateContext=t[1]),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function si(t){let e,n,r,i,o,a,l,s,c,u;function d(){return t[11](t[27])}return r=new go({props:{div:t[27].json,templateContext:t[27].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=I("div"),n=I("div"),zt(r.$$.fragment),o=M(),this.h()},l(t){e=L(t,"DIV",{class:!0});var i=R(e);n=L(i,"DIV",{class:!0});var a=R(n);Tt(r.$$.fragment,a),a.forEach(S),o=G(i),i.forEach(S),this.h()},h(){O(n,"class",i="divkit-e08c6"),O(e,"class",a="divkit-eb860")},m(t,i){P(t,e,i),D(e,n),Mt(r,n,null),D(e,o),s=!0,c||(u=J(e,"introend",d),c=!0)},p(e,n){t=e;const i={};64&n&&(i.div=t[27].json),64&n&&(i.templateContext=t[27].templateContext),r.$set(i)},i(n){s||(At(r.$$.fragment,n),l||mt((()=>{l=Dt(e,ei,t[27]),l.start()})),s=!0)},o(t){Vt(r.$$.fragment,t),s=!1},d(t){t&&S(e),Nt(r),c=!1,u()}}}function ci(t){let e,n,r,i,o,a,l,s,c,u;function d(){return t[10](t[27])}return r=new go({props:{div:t[27].json,templateContext:t[27].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=I("div"),n=I("div"),zt(r.$$.fragment),o=M(),this.h()},l(t){e=L(t,"DIV",{class:!0,style:!0});var i=R(e);n=L(i,"DIV",{class:!0});var a=R(n);Tt(r.$$.fragment,a),a.forEach(S),o=G(i),i.forEach(S),this.h()},h(){O(n,"class",i="divkit-e08c6"),O(e,"class",a="divkit-eb860"),Y(e,"left",t[27].offsetLeft+"px"),Y(e,"top",t[27].offsetTop+"px"),Y(e,"width",t[27].width+"px"),Y(e,"height",t[27].height+"px")},m(t,i){P(t,e,i),D(e,n),Mt(r,n,null),D(e,o),s=!0,c||(u=J(e,"introend",d),c=!0)},p(n,i){t=n;const o={};64&i&&(o.div=t[27].json),64&i&&(o.templateContext=t[27].templateContext),r.$set(o),(!s||64&i)&&Y(e,"left",t[27].offsetLeft+"px"),(!s||64&i)&&Y(e,"top",t[27].offsetTop+"px"),(!s||64&i)&&Y(e,"width",t[27].width+"px"),(!s||64&i)&&Y(e,"height",t[27].height+"px")},i(n){s||(At(r.$$.fragment,n),l||mt((()=>{l=Dt(e,Zr,t[27]),l.start()})),s=!0)},o(t){Vt(r.$$.fragment,t),s=!1},d(t){t&&S(e),Nt(r),c=!1,u()}}}function ui(t,e){let n,r,i,o,a;const l=[ci,si],s=[];function c(t,e){return"direction"in t[27]?0:1}return r=c(e),i=s[r]=l[r](e),{key:t,first:null,c(){n=N(),i.c(),o=N(),this.h()},l(t){n=N(),i.l(t),o=N(),this.h()},h(){this.first=n},m(t,e){P(t,n,e),s[r].m(t,e),P(t,o,e),a=!0},p(t,n){let a=r;r=c(e=t),r===a?s[r].p(e,n):(Et(),Vt(s[a],1,1,(()=>{s[a]=null})),Ct(),i=s[r],i?i.p(e,n):(i=s[r]=l[r](e),i.c()),At(i,1),i.m(o.parentNode,o))},i(t){a||(At(i),a=!0)},o(t){Vt(i),a=!1},d(t){t&&S(n),s[r].d(t),t&&S(o)}}}function di(t){var e;let n,r,i,o,a=[],l=new ri,s=(null===(e=t[7])||void 0===e?void 0:e.div)&&ai(t),c=t[6];const u=t=>t[27];for(let e=0;e<c.length;e+=1){let n=ii(t,c,e),r=u(n);l.set(r,a[e]=ui(r,n))}return{c(){s&&s.c(),n=M(),r=I("div");for(let t=0;t<a.length;t+=1)a[t].c();this.h()},l(t){s&&s.l(t),n=G(t),r=L(t,"DIV",{class:!0,"aria-hidden":!0});var e=R(r);for(let t=0;t<a.length;t+=1)a[t].l(e);e.forEach(S),this.h()},h(){O(r,"class",i="divkit-adaae"),O(r,"aria-hidden","true")},m(e,i){s&&s.m(e,i),P(e,n,i),P(e,r,i);for(let t=0;t<a.length;t+=1)a[t].m(r,null);t[12](r),o=!0},p(t,e){var i;null!==(i=t[7])&&void 0!==i&&i.div?s?(s.p(t,e),128&e&&At(s,1)):(s=ai(t),s.c(),At(s,1),s.m(n.parentNode,n)):s&&(Et(),Vt(s,1,1,(()=>{s=null})),Ct()),320&e&&(c=t[6],Et(),a=function(t,e,n,r,i,o,a,l,s,c,u,d){let h=t.length,p=o.length,f=h;const g={};for(;f--;)g[t[f].key]=f;const m=[],v=new Map,y=new Map;for(f=p;f--;){const t=d(i,o,f),r=n(t);let l=a.get(r);l?l.p(t,e):(l=c(r,t),l.c()),v.set(r,m[f]=l),r in g&&y.set(r,Math.abs(f-g[r]))}const $=new Set,_=new Set;function b(t){At(t,1),t.m(l,u),a.set(t.key,t),u=t.first,p--}for(;h&&p;){const e=m[p-1],n=t[h-1],r=e.key,i=n.key;e===n?(u=e.first,h--,p--):v.has(i)?!a.has(r)||$.has(r)?b(e):_.has(i)?h--:y.get(r)>y.get(i)?(_.add(r),b(e)):($.add(i),h--):(s(n,a),h--)}for(;h--;){const e=t[h];v.has(e.key)||s(e,a)}for(;p;)b(m[p-1]);return m}(a,e,u,0,t,c,l,r,St,ui,null,ii),Ct())},i(t){if(!o){At(s);for(let t=0;t<c.length;t+=1)At(a[t]);o=!0}},o(t){Vt(s);for(let t=0;t<a.length;t+=1)Vt(a[t]);o=!1},d(e){s&&s.d(e),e&&S(n),e&&S(r);for(let t=0;t<a.length;t+=1)a[t].d();t[12](null)}}}function hi(t){let e,n,r=!t[5]&&oi(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){let[i]=n;t[5]?r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct()):r?(r.p(t,i),32&i&&At(r,1)):(r=oi(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function pi(t){return"change_bounds"===t.type?t:"set"===t.type?pi(t.items[0]):null}function fi(t,e,n){let r,{json:i={}}=e,{templateContext:o}=e,{origJson:a}=e,{layoutParams:l}=e;const s=at(Wt),c=at(he);let u,d=new Map,h=new Set,p=!1,f=null,g=[],m=[],v=[],y=[];function $(t,e,n){let{json:r,templateContext:i,transitions:o,node:a}=e;r=s.getJsonWithVars(r),o=s.getJsonWithVars(o);const l=ni(o),c=a.getBoundingClientRect();return{json:Object.assign(Object.assign({},r),{margins:void 0,alpha:(u=l,u.some((t=>"fade"===t.type))?void 0:r.alpha)}),templateContext:i,elementBbox:c,rootBbox:t,transitions:l,alpha:r.alpha,width:c.width,height:c.height,offsetTop:c.top-t.top,offsetLeft:c.left-t.left,direction:n,resolvePromise:e.resolvePromise,node:e.node};var u}const _=i.div_id||i.id;let b;_?(null==l?void 0:l.fakeElement)||(c.registerInstance(_,{async setState(t){if(b===t)return;s.setRunning("stateChange",!0);const e=new Set(h);g.forEach((t=>{t.resolvePromise&&t.resolvePromise()})),n(6,g=[]);let i=[];if(u){const t=u.getBoundingClientRect();i=v.map((e=>$(t,e,"out")))}y.forEach((t=>{d.set(t.id,t.node.getBoundingClientRect())})),m=[],v=[],y=[];const o=r.find((e=>e.state_id===t))||null;if(o?(b=t,n(7,w=o)):s.logError(Lt(new Error("Cannot find state with id"),{additional:{stateId:t}})),await gt(),!u)return;const a=u.getBoundingClientRect();let l=m.filter((t=>{var n;return!(!t.json.id||e.has(t.json.id))||(null===(n=t.resolvePromise)||void 0===n||n.call(t),!1)})).map((t=>$(a,t,"in")));i=i.filter((t=>{var e;return!(!t.json.id||h.has(t.json.id))||(null===(e=t.resolvePromise)||void 0===e||e.call(t),!1)}));const c=i.concat(l),p=c.reduce(((t,e)=>Math.max(t,Xr(e.transitions))),0),f=y.filter((t=>d.has(t.id))).map((t=>({json:Object.assign(Object.assign({},t.json),{margins:void 0,width:{type:"match_parent"},height:{type:"match_parent"}}),templateContext:t.templateContext,rootBbox:a,beforeBbox:d.get(t.id),afterBbox:t.node.getBoundingClientRect(),node:t.node,transition:pi(t.transitions),resolvePromise:t.resolvePromise})));n(6,g=[...c.map((t=>Object.assign(Object.assign({},t),{maxDuration:p}))),...f]),d.clear(),s.setRunning("stateChange",!1)},getChild(t){if(f&&f.has(t))return f.get(t);s.logError(Lt(new Error("Missing state block with id"),{additional:{id:t}}))}}),ot(he,{registerInstance(t,e){f||(f=new Map),f.has(t)?s.logError(Lt(new Error("Duplicate state with id"),{additional:{id:t}})):f.set(t,e)},unregisterInstance(t){null==f||f.delete(t)},runVisibilityTransition(t,e,r,i,o){if(!u)return Promise.resolve();const a=$(u.getBoundingClientRect(),{json:t,templateContext:e,transitions:r,node:i},o),l=Xr(a.transitions),s=Object.assign(Object.assign({},a),{maxDuration:l});return n(6,g=[...g.filter((t=>t.node!==a.node)),s]),new Promise((t=>{s.resolvePromise=t}))},registerChildWithTransitionIn(t,e,n,r){const i={json:t,templateContext:e,transitions:n,node:r};return m.push(i),new Promise((t=>{i.resolvePromise=t}))},registerChildWithTransitionOut(t,e,n,r){const i={json:t,templateContext:e,transitions:n,node:r};return v.push(i),new Promise((t=>{i.resolvePromise=t}))},registerChildWithTransitionChange(t,e,n,r){const i=t.id;if(!i)return Promise.resolve();const o={id:i,json:t,templateContext:e,transitions:n,node:r};return y.push(o),new Promise((t=>{o.resolvePromise=t}))},hasTransitionChange:t=>!!t&&d.has(t),registerChild(t){h.add(t)},unregisterChild(t){h.delete(t)}})):(p=!0,s.logError(Lt(new Error('Missing "id" prop for div "state"'))));let w=null;const x=s.getJsonWithVars(i.default_state_id);let k=!1;function E(t){n(6,g=g.filter((e=>e!==t))),t.resolvePromise&&t.resolvePromise()}return it((()=>{_&&!(null==l?void 0:l.fakeElement)&&c.unregisterInstance(_)})),t.$$set=t=>{"json"in t&&n(0,i=t.json),"templateContext"in t&&n(1,o=t.templateContext),"origJson"in t&&n(2,a=t.origJson),"layoutParams"in t&&n(3,l=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&i&&(h=new Set),1&t.$$.dirty&&n(9,r=i.states||[]),512&t.$$.dirty&&((null==r?void 0:r.length)?n(5,p=!1):(n(5,p=!0),s.logError(Lt(new Error('Empty "states" prop for div "state"'))))),512&t.$$.dirty&&function(t){k||(k=!0,t.length&&(x?(b=x,n(7,w=t.find((t=>t.state_id===b))||null),w||s.logError(Lt(new Error("Cannot find state for default_state_id"),{additional:{selectedId:b}}))):(n(7,w=t[0]),b=w.state_id)))}(r)},[i,o,a,l,u,p,g,w,E,r,t=>E(t),t=>E(t),function(t){ct[t?"unshift":"push"]((()=>{u=t,n(4,u)}))}]}const gi={pager:"divkit-c5feb",pager__items:"divkit-f6987",pager__item:"divkit-feca7",pager_orientation_horizontal:"divkit-b0a1c",pager_orientation_vertical:"divkit-f772f"},{Boolean:mi}=Pt;function vi(t,e,n){const r=t.slice();return r[48]=e[n],r}function yi(t){let e,n;return e=new Ye({props:{cls:de("pager",gi,t[8]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,$$slots:{default:[_i]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=de("pager",gi,t[8])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),33336&n[0]|1048576&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function $i(t){var e;let n,r,i,o,a;return r=new go({props:{div:t[48].json,templateContext:t[48].templateContext,origJson:t[48].origJson,layoutParams:null!==(e=t[3])&&void 0!==e&&e.fakeElement?{fakeElement:!0}:void 0}}),{c(){n=I("div"),zt(r.$$.fragment),i=M(),this.h()},l(t){n=L(t,"DIV",{class:!0});var e=R(n);Tt(r.$$.fragment,e),i=G(e),e.forEach(S),this.h()},h(){O(n,"class",o=gi.pager__item)},m(t,e){P(t,n,e),Mt(r,n,null),D(n,i),a=!0},p(t,e){var n;const i={};16&e[0]&&(i.div=t[48].json),16&e[0]&&(i.templateContext=t[48].templateContext),16&e[0]&&(i.origJson=t[48].origJson),8&e[0]&&(i.layoutParams=null!==(n=t[3])&&void 0!==n&&n.fakeElement?{fakeElement:!0}:void 0),r.$set(i)},i(t){a||(At(r.$$.fragment,t),a=!0)},o(t){Vt(r.$$.fragment,t),a=!1},d(t){t&&S(n),Nt(r)}}}function _i(t){let e,n,r,i,o,a,l=t[4],s=[];for(let e=0;e<l.length;e+=1)s[e]=$i(vi(t,l,e));const c=t=>Vt(s[t],1,1,(()=>{s[t]=null}));return{c(){e=I("div");for(let t=0;t<s.length;t+=1)s[t].c();this.h()},l(t){e=L(t,"DIV",{class:!0,style:!0});var n=R(e);for(let t=0;t<s.length;t+=1)s[t].l(n);n.forEach(S),this.h()},h(){O(e,"class",n=gi.pager__items+" "+(t[15]?"divkit-aa145":"")),O(e,"style",r=Gt(t[9]))},m(n,r){P(n,e,r);for(let t=0;t<s.length;t+=1)s[t].m(e,null);t[36](e),i=!0,o||(a=J(e,"scroll",t[16]),o=!0)},p(t,o){if(24&o[0]){let n;for(l=t[4],n=0;n<l.length;n+=1){const r=vi(t,l,n);s[n]?(s[n].p(r,o),At(s[n],1)):(s[n]=$i(r),s[n].c(),At(s[n],1),s[n].m(e,null))}for(Et(),n=l.length;n<s.length;n+=1)c(n);Ct()}(!i||32768&o[0]&&n!==(n=gi.pager__items+" "+(t[15]?"divkit-aa145":"")))&&O(e,"class",n),(!i||512&o[0]&&r!==(r=Gt(t[9])))&&O(e,"style",r)},i(t){if(!i){for(let t=0;t<l.length;t+=1)At(s[t]);i=!0}},o(t){s=s.filter(mi);for(let t=0;t<s.length;t+=1)Vt(s[t]);i=!1},d(n){n&&S(e),F(s,n),t[36](null),o=!1,a()}}}function bi(t){let e,n,r=!t[7]&&yi(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[7]?r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct()):r?(r.p(t,n),128&n[0]&&At(r,1)):(r=yi(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function wi(t,e,r){let i,o,a,l,s,c,u,d,h,f,g,m,v,y,$,_,b,w=n,x=n,k=n,E=n,C=n,A=n;var V,j,D,P,S,F,I;t.$$.on_destroy.push((()=>w())),t.$$.on_destroy.push((()=>x())),t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>A()));let{json:z={}}=e,{templateContext:T}=e,{origJson:M}=e,{layoutParams:N}=e;const J=at(Wt),O=J.genId("pager");let B,R=!1,U=!1,W=0,L=0,q=!1,H="horizontal",G="",K="",Y="";const X=yr((function(){if(!R)return;const t=function(){const t=Array.from(B.children),e=B.getBoundingClientRect(),n=t.findIndex((t=>{return n=e,r=t.getBoundingClientRect(),"horizontal"===H?r.left>=n.left&&r.right<=n.right:r.top>=n.top&&r.bottom<=n.bottom;var n,r}));return-1!==n?n:W}();t!==W&&r(25,W=t)}),50);function Z(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"smooth";const n="horizontal"===H,i=B.children[t],o=n?"offsetLeft":"offsetTop",a=n?"left":"top";B.scroll({[a]:i[o],behavior:e}),r(25,W=t)}return z.id&&!(null==N?void 0:N.fakeElement)&&J.registerInstance(z.id,{setCurrentItem(t){if(t<0||t>i.length-1)throw new Error('Item is out of range in "set-current-item" action');Z(t)},setPreviousItem(t){let e=W-1;e<0&&(e="ring"===t?i.length-1:W),Z(e)},setNextItem(t){let e=W+1;e>i.length-1&&(e="ring"===t?0:W),Z(e)}}),rt((()=>{if(R=!0,Boolean(document.getElementById("".concat(O,"-tab-0")))){const t=[...B.children];for(const[e,n]of t.entries())n.setAttribute("role","tabpanel"),n.setAttribute("id","".concat(O,"-panel-").concat(e)),n.setAttribute("aria-labelledby","".concat(O,"-tab-").concat(e))}})),it((()=>{R=!1,z.id&&!(null==N?void 0:N.fakeElement)&&J.unregisterInstance(z.id)})),t.$$set=t=>{"json"in t&&r(0,z=t.json),"templateContext"in t&&r(1,T=t.templateContext),"origJson"in t&&r(2,M=t.origJson),"layoutParams"in t&&r(3,N=t.layoutParams)},t.$$.update=()=>{if(131073&t.$$.dirty[0]&&((null===r(17,V=z.items)||void 0===V?void 0:V.length)&&Array.isArray(z.items)?r(24,U=!1):(r(24,U=!0),J.logError(Lt(new Error('Incorrect or empty "items" prop for div "pager"'))))),16777219&t.$$.dirty[0]&&r(4,i=(!U&&z.items||[]).map((t=>{let e=t,n=T;return({templateContext:n,json:e}=J.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(14,o=J.getDerivedFromVars(z.layout_mode)),x(),x=p(o,(t=>r(32,v=t)))),2&t.$$.dirty[1]&&(v?"percentage"!==v.type&&"fixed"!==v.type?(r(26,q=!0),J.logError(Lt(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):r(26,q=!1):(r(26,q=!0),J.logError(Lt(new Error('Empty "layout_mode" prop for div "pager"'))))),1&t.$$.dirty[0]&&(r(13,a=J.getDerivedFromVars(z.orientation)),C(),C=p(a,(t=>r(35,_=t)))),134217728&t.$$.dirty[0]|16&t.$$.dirty[1]&&r(27,H=Wn(_,H)),1&t.$$.dirty[0]&&(r(12,l=J.getDerivedFromVars(z.item_spacing)),E(),E=p(l,(t=>r(34,$=t)))),8&t.$$.dirty[1]){const t=null==$?void 0:$.value;t&&ge(t)&&r(28,G=Kt(t||0))}if(1&t.$$.dirty[0]&&(r(11,s=J.getDerivedFromVars(z.paddings)),k(),k=p(s,(t=>r(33,y=t)))),536870912&t.$$.dirty[0]|4&t.$$.dirty[1]&&r(29,K=me(y,K)),1&t.$$.dirty[0]&&(r(10,c=J.getDerivedFromVars(z.restrict_parent_scroll)),A(),A=p(c,(t=>r(15,b=t)))),134217728&t.$$.dirty[0]&&r(31,u="horizontal"===H?"grid-auto-columns":"grid-auto-rows"),419168257&t.$$.dirty[0]|2&t.$$.dirty[1])if("fixed"===(null==v?void 0:v.type)){const t=Yt("horizontal"===H?((null===r(18,j=z.paddings)||void 0===j?void 0:j.left)||0)+((null===r(19,D=z.paddings)||void 0===D?void 0:D.right)||0):((null===r(20,P=z.paddings)||void 0===P?void 0:P.top)||0)+((null===r(21,S=z.paddings)||void 0===S?void 0:S.bottom)||0)),e=null===r(22,F=v.neighbour_page_width)||void 0===F?void 0:F.value;r(30,Y=e?"calc(100% + ".concat(t," - 2 * ").concat(Yt(e)," - 2 * ").concat(G,")"):"100%")}else if("percentage"===(null==v?void 0:v.type)){const t=null===r(23,I=v.page_width)||void 0===I?void 0:I.value;r(30,Y="".concat(Number(t),"%"))}1879048192&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(9,d={"grid-gap":G,padding:K,[u]:Y}),134217728&t.$$.dirty[0]&&r(8,h={orientation:H}),83886080&t.$$.dirty[0]&&r(7,f=U||q),33554448&t.$$.dirty[0]&&function(t,e){const n=z.id;if(n){const o=new Map(m);r=g,m=o.set(n,{instId:O,size:t,currentItem:e,scrollToPagerItem:Z}),i=m,r.set(i)}var r,i}(i.length,W),33554432&t.$$.dirty[0]&&function(t){var e;if(t===L)return;L=t;const n=J.getJsonWithVars(null===(e=i[t].json)||void 0===e?void 0:e.selected_actions);(null==n?void 0:n.length)&&J.execAnyActions(n)}(W)},r(6,g=J.getStore("pagers")),w(),w=p(g,(t=>r(39,m=t))),[z,T,M,N,i,B,g,f,h,d,c,s,l,a,o,b,X,V,j,D,P,S,F,I,U,W,q,H,G,K,Y,u,v,y,$,_,function(t){ct[t?"unshift":"push"]((()=>{B=t,r(5,B)}))}]}const xi={indicator:"divkit-d8e3f",indicator__scroller:"divkit-b5db0",indicator__items:"divkit-d5d94",indicator__item:"divkit-f6629",indicator_placement_default:"divkit-c1670",indicator__item_active:"divkit-b39cd",indicator_placement_stretch:"divkit-b6bd3"};function ki(t,e,n){const r=t.slice();r[43]=e[n],r[46]=n;const i=r[46]===r[12].currentItem;return r[44]=i,r}function Ei(t){let e,n=Array(t[12].size),r=[];for(let e=0;e<n.length;e+=1)r[e]=Ci(ki(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=N()},l(t){for(let e=0;e<r.length;e+=1)r[e].l(t);e=N()},m(t,n){for(let e=0;e<r.length;e+=1)r[e].m(t,n);P(t,e,n)},p(t,i){if(25169920&i[0]){let o;for(n=Array(t[12].size),o=0;o<n.length;o+=1){const a=ki(t,n,o);r[o]?r[o].p(a,i):(r[o]=Ci(a),r[o].c(),r[o].m(e.parentNode,e))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(t){F(r,t),t&&S(e)}}}function Ci(t){let e,n,r,i,o,a,s,c;function u(){return t[36](t[46])}return{c(){e=I("div"),this.h()},l(t){e=L(t,"DIV",{class:!0,role:!0,id:!0,"aria-controls":!0,"aria-selected":!0,tabindex:!0}),R(e).forEach(S),this.h()},h(){O(e,"class",n=de("indicator__item",xi,{active:t[44]})+" divkit-bd259"),O(e,"role","tab"),O(e,"id",r=t[12].instId+"-tab-"+t[46]),O(e,"aria-controls",i=t[12].instId+"-panel-"+t[46]),O(e,"aria-selected",o=t[44]?"true":"false"),O(e,"tabindex",a=t[44]?0:-1)},m(n,r){P(n,e,r),s||(c=[J(e,"click",u),J(e,"keydown",t[24])],s=!0)},p(l,s){t=l,4096&s[0]&&n!==(n=de("indicator__item",xi,{active:t[44]})+" divkit-bd259")&&O(e,"class",n),4096&s[0]&&r!==(r=t[12].instId+"-tab-"+t[46])&&O(e,"id",r),4096&s[0]&&i!==(i=t[12].instId+"-panel-"+t[46])&&O(e,"aria-controls",i),4096&s[0]&&o!==(o=t[44]?"true":"false")&&O(e,"aria-selected",o),4096&s[0]&&a!==(a=t[44]?0:-1)&&O(e,"tabindex",a)},d(t){t&&S(e),s=!1,l(c)}}}function Ai(t){let e,n,r,i,o=t[12]&&Ei(t);return{c(){e=I("div"),n=I("div"),o&&o.c(),this.h()},l(t){e=L(t,"DIV",{class:!0});var r=R(e);n=L(r,"DIV",{class:!0,role:!0});var i=R(n);o&&o.l(i),i.forEach(S),r.forEach(S),this.h()},h(){O(n,"class",r=xi.indicator__items),O(n,"role","tablist"),Y(n,"margin","default"===t[6]?"0 ".concat(Kt(Math.max(0,t[4].width-t[5].width)/2)):"",!1),Y(n,"--divkit-indicator-inactive-width",Kt(t[5].width),!1),Y(n,"--divkit-indicator-inactive-height",Kt(t[5].height),!1),Y(n,"--divkit-indicator-inactive-border-radius",Kt(t[5].borderRadius),!1),Y(n,"--divkit-indicator-inactive-background",t[5].background||"",!1),Y(n,"--divkit-indicator-inactive-box-shadow",t[5].boxShadow||"",!1),Y(n,"--divkit-indicator-active-width",Kt(t[4].width),!1),Y(n,"--divkit-indicator-active-height",Kt(t[4].height),!1),Y(n,"--divkit-indicator-active-border-radius",Kt(t[4].borderRadius),!1),Y(n,"--divkit-indicator-active-background",t[4].background||"",!1),Y(n,"--divkit-indicator-active-box-shadow",t[4].boxShadow||"",!1),Y(n,"--divkit-indicator-active-scale",t[4].width/t[5].width,!1),Y(n,"--divkit-indicator-default-margin","default"===t[6]?"0 ".concat(Kt((t[7]-t[5].width)/2)):"",!1),Y(n,"--divkit-indicator-stretch-margin","stretch"===t[6]?Kt(t[9]):"",!1),Y(n,"--divkit-indicator-stretch-max-count","stretch"===t[6]?t[8]:"",!1),Y(n,"--divkit-indicator-stretch-max-spacer","stretch"===t[6]?Kt((t[8]-1)*t[9]):"",!1),O(e,"class",i=xi.indicator__scroller)},m(r,i){P(r,e,i),D(e,n),o&&o.m(n,null),t[37](n),t[38](e)},p(t,e){t[12]?o?o.p(t,e):(o=Ei(t),o.c(),o.m(n,null)):o&&(o.d(1),o=null),112&e[0]&&Y(n,"margin","default"===t[6]?"0 ".concat(Kt(Math.max(0,t[4].width-t[5].width)/2)):"",!1),32&e[0]&&Y(n,"--divkit-indicator-inactive-width",Kt(t[5].width),!1),32&e[0]&&Y(n,"--divkit-indicator-inactive-height",Kt(t[5].height),!1),32&e[0]&&Y(n,"--divkit-indicator-inactive-border-radius",Kt(t[5].borderRadius),!1),32&e[0]&&Y(n,"--divkit-indicator-inactive-background",t[5].background||"",!1),32&e[0]&&Y(n,"--divkit-indicator-inactive-box-shadow",t[5].boxShadow||"",!1),16&e[0]&&Y(n,"--divkit-indicator-active-width",Kt(t[4].width),!1),16&e[0]&&Y(n,"--divkit-indicator-active-height",Kt(t[4].height),!1),16&e[0]&&Y(n,"--divkit-indicator-active-border-radius",Kt(t[4].borderRadius),!1),16&e[0]&&Y(n,"--divkit-indicator-active-background",t[4].background||"",!1),16&e[0]&&Y(n,"--divkit-indicator-active-box-shadow",t[4].boxShadow||"",!1),48&e[0]&&Y(n,"--divkit-indicator-active-scale",t[4].width/t[5].width,!1),224&e[0]&&Y(n,"--divkit-indicator-default-margin","default"===t[6]?"0 ".concat(Kt((t[7]-t[5].width)/2)):"",!1),576&e[0]&&Y(n,"--divkit-indicator-stretch-margin","stretch"===t[6]?Kt(t[9]):"",!1),320&e[0]&&Y(n,"--divkit-indicator-stretch-max-count","stretch"===t[6]?t[8]:"",!1),832&e[0]&&Y(n,"--divkit-indicator-stretch-max-spacer","stretch"===t[6]?Kt((t[8]-1)*t[9]):"",!1)},d(n){n&&S(e),o&&o.d(),t[37](null),t[38](null)}}}function Vi(t){let e,n;return e=new Ye({props:{cls:de("indicator",xi,t[13]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Ai]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};8192&n[0]&&(r.cls=de("indicator",xi,t[13])),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),8176&n[0]|65536&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function ji(t,e,r){let i,o,a,l,s,c,u,d,h,f,g,m,v,y,$,_,b,w,x,k=n,E=n,C=n,A=n,V=n,j=n,D=n,P=n,S=n;var F,I;t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>S()));let{json:z={}}=e,{templateContext:T}=e,{origJson:M}=e,{layoutParams:N}=e;const J=["rounded_rectangle","circle"],O=at(Wt);let B,R,U,W={width:13,height:13,borderRadius:6.5,background:"#ffdc60"},L={width:10,height:10,borderRadius:5,background:"#33919cb5"},q="default",H=15,G=10,K=5;function Y(t){t!==U.currentItem&&U.scrollToPagerItem(t)}async function X(t){U.scrollToPagerItem(t),await gt();const e=R.querySelector(".".concat(xi.indicator__item_active));e&&e.focus()}return t.$$set=t=>{"json"in t&&r(0,z=t.json),"templateContext"in t&&r(1,T=t.templateContext),"origJson"in t&&r(2,M=t.origJson),"layoutParams"in t&&r(3,N=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(22,i=O.getDerivedFromVars(z.shape)),j(),j=p(i,(t=>r(32,_=t)))),1&t.$$.dirty[0]&&(r(21,o=O.getDerivedFromVars(z.active_item_color)),A(),A=p(o,(t=>r(30,y=t)))),1&t.$$.dirty[0]&&(r(20,a=O.getDerivedFromVars(z.inactive_item_color)),V(),V=p(a,(t=>r(31,$=t)))),1&t.$$.dirty[0]&&(r(19,l=O.getDerivedFromVars(z.active_item_size)),D(),D=p(l,(t=>r(33,b=t)))),1&t.$$.dirty[0]&&(r(18,s=O.getDerivedFromVars(z.active_shape)),S(),S=p(s,(t=>r(35,x=t)))),1&t.$$.dirty[0]&&(r(17,c=O.getDerivedFromVars(z.inactive_shape)),P(),P=p(c,(t=>r(34,w=t)))),1073741872&t.$$.dirty[0]|31&t.$$.dirty[1]&&(x&&r(4,W=xn({type:"shape_drawable",shape:x},J,W)),w&&r(5,L=xn({type:"shape_drawable",shape:w},J,L)),!x&&!w&&_)){const t=Ze(b,1.3);r(5,L=xn({type:"shape_drawable",shape:_,color:L.background},J,L)),r(5,L.background=Zt($,1,L.background),L),r(4,W=Object.assign(Object.assign({},L),{width:L.width*t,height:L.height*t,borderRadius:L.borderRadius*t,background:W.background})),r(4,W.background=Zt(y,1,W.background),W)}if(1&t.$$.dirty[0]&&(r(16,u=O.getDerivedFromVars(z.space_between_centers)),E(),E=p(u,(t=>r(28,m=t)))),1&t.$$.dirty[0]&&(r(15,d=O.getDerivedFromVars(z.items_placement)),C(),C=p(d,(t=>r(29,v=t)))),905970624&t.$$.dirty[0])if(!v||"default"!==v.type&&"stretch"!==v.type)r(6,q="default"),m&&r(7,H=ve(m.value,H));else if(r(6,q=v.type),"default"===q)r(7,H=ve(null===r(25,F=v.space_between_centers)||void 0===F?void 0:F.value,H));else if("stretch"===q){const t=v;r(8,G=Ze(t.max_visible_items,G)),r(9,K=ve(null===r(26,I=t.item_spacing)||void 0===I?void 0:I.value,K))}134217728&t.$$.dirty[0]&&async function(t){if(z.pager_id&&t.has(z.pager_id)&&(r(12,U=t.get(z.pager_id)),await gt(),R)){const t=R.children[U.currentItem].offsetLeft;B.scroll({left:t-B.clientWidth/2,behavior:"smooth"})}}(g),64&t.$$.dirty[0]&&r(13,f={placement:q})},r(14,h=O.getStore("pagers")),k(),k=p(h,(t=>r(27,g=t))),[z,T,M,N,W,L,q,H,G,K,B,R,U,f,h,d,u,c,s,l,a,o,i,Y,function(t){if(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)return;const{size:e,currentItem:n}=U;if(37===t.which)X(n-1<0?n:n-1);else if(39===t.which)X(n+1>=e?n:n+1);else if(36===t.which)X(0);else{if(35!==t.which)return;X(e-1)}t.preventDefault()},F,I,g,m,v,y,$,_,b,w,x,t=>Y(t),function(t){ct[t?"unshift":"push"]((()=>{R=t,r(11,R)}))},function(t){ct[t?"unshift":"push"]((()=>{B=t,r(10,B)}))}]}const Di={slider:"divkit-ef4f7",slider__input:"divkit-d1d65",slider__input_secondary:"divkit-c7980",slider__thumb:"divkit-f3453",slider__thumb_secondary:"divkit-e1984","slider__tracks-wrapper":"divkit-f7338","slider__tracks-inner":"divkit-ac903",slider__track:"divkit-e956c","slider__active-track":"divkit-ec5bf","slider__thumb-text":"divkit-c4af5","slider__thumb-text_secondary":"divkit-d8821",slider__tick:"divkit-bd9bf",slider__tick_active:"divkit-d8ce2",slider__tick_inactive:"divkit-e71e7"};function Pi(t,e){if(!t||!t.font_size)return e;const n=t.offset,r=t.text_color&&Zt(t.text_color)||"#000",i=Qe(t.font_weight);if(Ie(t.font_size)&&"transparent"!==r){var o,a;const e={fontSize:Kt(t.font_size),fontWeight:i,textColor:r};return"number"==typeof(null==n||null===(o=n.x)||void 0===o?void 0:o.value)&&"number"==typeof(null==n||null===(a=n.y)||void 0===a?void 0:a.value)&&(e.offset={x:n.x.value,y:n.y.value}),e}}function Si(t,e,n){return Math.max(e,Math.min(n,t))}const Fi=-2147483648,Ii=Number.MAX_VALUE,zi=Number.MIN_VALUE,Ti="string",Mi="integer",Ni="number",Ji="boolean",Oi="color",Bi="datetime";class Ri{constructor(t,e){const n=this.convertValue(e);this.name=t,this.value=n}getName(){return this.name}subscribe(t){return this.store||(this.store=Rt(this.value)),this.store.subscribe(t)}set(t){const e=this.fromString(t);this.setValue(e)}setValue(t){const e=this.convertValue(t);this.value=e,this.store&&this.store.set(e)}getValue(){return this.value}}const Ui={string:class extends Ri{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"string"}},number:class extends Ri{convertValue(t){if("number"!=typeof t||isNaN(t)||!isFinite(t))throw new Error("Incorrect variable value");return t}fromString(t){const e=Number(t);return this.convertValue(e)}getType(){return"number"}},integer:class extends Ri{convertValue(t){if("number"!=typeof t||isNaN(t)||t>2147483647||t<Fi||t!==Math.round(t))throw new Error("Incorrect variable value");return t}fromString(t){const e=Number(t);return this.convertValue(e)}getType(){return"integer"}},boolean:class extends Ri{convertValue(t){if(1!==t&&0!==t&&!0!==t&&!1!==t)throw new Error("Incorrect variable value");return Number(t)}fromString(t){if("1"===t||"true"===t)return 1;if("0"===t||"false"===t)return 0;throw new Error("Incorrect variable value")}getType(){return"boolean"}},color:class extends Ri{convertValue(t){if("string"!=typeof t||!te(t))throw new Error("Incorrect variable value");return t}fromString(t){return this.convertValue(t)}getType(){return"color"}},url:class extends Ri{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"url"}}};function Wi(t,e,n){if(!(e in Ui))throw new Error("Unsupported variable type");return new Ui[e](t,n)}function Li(t,e,n){const r=t.slice();return r[78]=e[n],r}function qi(t,e,n){const r=t.slice();return r[78]=e[n],r}function Hi(t){let e,n;return e=new Ye({props:{cls:de("slider",Di,t[21]),style:t[22],customDescription:!0,customActions:"slider",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Zi]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};2097152&n[0]&&(r.cls=de("slider",Di,t[21])),4194304&n[0]&&(r.style=t[22]),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),27246576&n[0]|2097152&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function Gi(t){let e,n;return{c(){e=I("div"),this.h()},l(t){e=L(t,"DIV",{class:!0}),R(e).forEach(S),this.h()},h(){O(e,"class",n=Di.slider__tick+" "+Di.slider__tick_active),Y(e,"--divkit-slider-tick",t[78],!1)},m(t,n){P(t,e,n)},p(t,n){131072&n[0]&&Y(e,"--divkit-slider-tick",t[78],!1)},d(t){t&&S(e)}}}function Ki(t){let e,n;return{c(){e=I("div"),this.h()},l(t){e=L(t,"DIV",{class:!0}),R(e).forEach(S),this.h()},h(){O(e,"class",n=Di.slider__tick+" "+Di.slider__tick_inactive),Y(e,"--divkit-slider-tick",t[78],!1)},m(t,n){P(t,e,n)},p(t,n){262144&n[0]&&Y(e,"--divkit-slider-tick",t[78],!1)},d(t){t&&S(e)}}}function Yi(t){let e,n,r,i,o;return{c(){e=I("div"),n=I("div"),r=T(t[6]),this.h()},l(i){e=L(i,"DIV",{class:!0});var o=R(e);n=L(o,"DIV",{class:!0});var a=R(n);r=H(a,t[6]),a.forEach(S),o.forEach(S),this.h()},h(){var r,a,l;O(n,"class",i=Di["slider__thumb-text-inner"]),Y(n,"font-size",(null===(r=t[12])||void 0===r?void 0:r.fontSize)||"1em",!1),Y(n,"font-weight",(null===(a=t[12])||void 0===a?void 0:a.fontWeight)||"",!1),Y(n,"color",(null===(l=t[12])||void 0===l?void 0:l.textColor)||"#000",!1),O(e,"class",o=Di["slider__thumb-text"])},m(t,i){P(t,e,i),D(e,n),D(n,r)},p(t,e){var i,o,a;64&e[0]&&K(r,t[6]),4096&e[0]&&Y(n,"font-size",(null===(i=t[12])||void 0===i?void 0:i.fontSize)||"1em",!1),4096&e[0]&&Y(n,"font-weight",(null===(o=t[12])||void 0===o?void 0:o.fontWeight)||"",!1),4096&e[0]&&Y(n,"color",(null===(a=t[12])||void 0===a?void 0:a.textColor)||"#000",!1)},d(t){t&&S(e)}}}function Xi(t){let e,n,r,i,o;return{c(){e=I("div"),n=I("div"),r=T(t[7]),this.h()},l(i){e=L(i,"DIV",{class:!0});var o=R(e);n=L(o,"DIV",{class:!0});var a=R(n);r=H(a,t[7]),a.forEach(S),o.forEach(S),this.h()},h(){var r,a,l;O(n,"class",i=Di["slider__thumb-text-inner"]),Y(n,"font-size",(null===(r=t[13])||void 0===r?void 0:r.fontSize)||"1em",!1),Y(n,"font-weight",(null===(a=t[13])||void 0===a?void 0:a.fontWeight)||"",!1),Y(n,"color",(null===(l=t[13])||void 0===l?void 0:l.textColor)||"#000",!1),O(e,"class",o=Di["slider__thumb-text"]+" "+Di["slider__thumb-text_secondary"])},m(t,i){P(t,e,i),D(e,n),D(n,r)},p(t,e){var i,o,a;128&e[0]&&K(r,t[7]),8192&e[0]&&Y(n,"font-size",(null===(i=t[13])||void 0===i?void 0:i.fontSize)||"1em",!1),8192&e[0]&&Y(n,"font-weight",(null===(o=t[13])||void 0===o?void 0:o.fontWeight)||"",!1),8192&e[0]&&Y(n,"color",(null===(a=t[13])||void 0===a?void 0:a.textColor)||"#000",!1)},d(t){t&&S(e)}}}function Zi(t){let e,n,r,i,o,a,s,c,u,d,h,p,f,g,m,v,y,$,_,b,w,x,k=t[17],E=[];for(let e=0;e<k.length;e+=1)E[e]=Gi(qi(t,k,e));let C=t[18],A=[];for(let e=0;e<C.length;e+=1)A[e]=Ki(Li(t,C,e));let V=t[12]&&Yi(t),j=t[37]&&function(t){let e,n,r=t[13]&&Xi(t);return{c(){e=I("div"),r&&r.c(),this.h()},l(t){e=L(t,"DIV",{class:!0});var n=R(e);r&&r.l(n),n.forEach(S),this.h()},h(){O(e,"class",n=Di.slider__thumb+" "+Di.slider__thumb_secondary),Y(e,"border-radius",Kt(t[9].borderRadius),!1),Y(e,"background",t[9].background,!1),Y(e,"box-shadow",t[9].boxShadow||"",!1)},m(t,n){P(t,e,n),r&&r.m(e,null)},p(t,n){t[13]?r?r.p(t,n):(r=Xi(t),r.c(),r.m(e,null)):r&&(r.d(1),r=null),512&n[0]&&Y(e,"border-radius",Kt(t[9].borderRadius),!1),512&n[0]&&Y(e,"background",t[9].background,!1),512&n[0]&&Y(e,"box-shadow",t[9].boxShadow||"",!1)},d(t){t&&S(e),r&&r.d()}}}(t),z=t[37]&&function(t){let e,n,r,i,o;return{c(){e=I("input"),this.h()},l(t){e=L(t,"INPUT",{type:!0,class:!0,min:!0,max:!0,step:!0,"aria-label":!0}),this.h()},h(){O(e,"type","range"),O(e,"class",n=t[16]?Di.slider__input:"".concat(Di.slider__input," ").concat(Di.slider__input_secondary)),O(e,"min",t[4]),O(e,"max",t[5]),O(e,"step","1"),e.value=r=t[16]?t[6]:t[7],O(e,"aria-label",t[20])},m(n,r){P(n,e,r),i||(o=[J(e,"input",t[68]),J(e,"mousedown",t[37]?t[40]:null),J(e,"touchstart",t[37]?t[40]:null)],i=!0)},p(t,i){65536&i[0]&&n!==(n=t[16]?Di.slider__input:"".concat(Di.slider__input," ").concat(Di.slider__input_secondary))&&O(e,"class",n),16&i[0]&&O(e,"min",t[4]),32&i[0]&&O(e,"max",t[5]),65728&i[0]&&r!==(r=t[16]?t[6]:t[7])&&(e.value=r),1048576&i[0]&&O(e,"aria-label",t[20])},d(t){t&&S(e),i=!1,l(o)}}}(t);return{c(){e=I("div"),n=I("div"),r=I("div"),o=M(),a=I("div"),c=M();for(let t=0;t<E.length;t+=1)E[t].c();u=M();for(let t=0;t<A.length;t+=1)A[t].c();d=M(),h=I("div"),V&&V.c(),f=M(),j&&j.c(),g=M(),m=I("input"),$=M(),z&&z.c(),this.h()},l(t){e=L(t,"DIV",{class:!0});var i=R(e);n=L(i,"DIV",{class:!0});var l=R(n);r=L(l,"DIV",{class:!0}),R(r).forEach(S),o=G(l),a=L(l,"DIV",{class:!0}),R(a).forEach(S),c=G(l);for(let t=0;t<E.length;t+=1)E[t].l(l);u=G(l);for(let t=0;t<A.length;t+=1)A[t].l(l);d=G(l),h=L(l,"DIV",{class:!0});var s=R(h);V&&V.l(s),s.forEach(S),f=G(l),j&&j.l(l),g=G(l),m=L(l,"INPUT",{type:!0,class:!0,min:!0,max:!0,step:!0,"aria-label":!0}),$=G(l),z&&z.l(l),l.forEach(S),i.forEach(S),this.h()},h(){O(r,"class",i=Di.slider__track),Y(r,"height",Kt(t[10].height),!1),Y(r,"border-radius",Kt(t[10].borderRadius),!1),Y(r,"background",t[10].background,!1),Y(r,"box-shadow",t[10].boxShadow||"",!1),O(a,"class",s=Di["slider__active-track"]),Y(a,"left",(100*t[23]).toFixed(2)+"%",!1),Y(a,"width",(100*t[24]).toFixed(2)+"%",!1),Y(a,"height",Kt(t[11].height),!1),Y(a,"border-radius",Kt(t[11].borderRadius),!1),Y(a,"background",t[11].background,!1),Y(a,"box-shadow",t[11].boxShadow||"",!1),O(h,"class",p=Di.slider__thumb),Y(h,"border-radius",Kt(t[8].borderRadius),!1),Y(h,"background",t[8].background,!1),Y(h,"box-shadow",t[8].boxShadow||"",!1),O(m,"type","range"),O(m,"class",v=t[16]?"".concat(Di.slider__input," ").concat(Di.slider__input_secondary):Di.slider__input),O(m,"min",t[4]),O(m,"max",t[5]),O(m,"step","1"),m.value=y=t[16]?t[7]:t[6],O(m,"aria-label",t[19]),O(n,"class",_=Di["slider__tracks-inner"]),O(e,"class",b=Di["slider__tracks-wrapper"])},m(i,l){P(i,e,l),D(e,n),D(n,r),D(n,o),D(n,a),D(n,c);for(let t=0;t<E.length;t+=1)E[t].m(n,null);D(n,u);for(let t=0;t<A.length;t+=1)A[t].m(n,null);D(n,d),D(n,h),V&&V.m(h,null),D(n,f),j&&j.m(n,null),D(n,g),D(n,m),D(n,$),z&&z.m(n,null),t[69](n),w||(x=J(m,"input",t[67]),w=!0)},p(t,e){if(1024&e[0]&&Y(r,"height",Kt(t[10].height),!1),1024&e[0]&&Y(r,"border-radius",Kt(t[10].borderRadius),!1),1024&e[0]&&Y(r,"background",t[10].background,!1),1024&e[0]&&Y(r,"box-shadow",t[10].boxShadow||"",!1),8388608&e[0]&&Y(a,"left",(100*t[23]).toFixed(2)+"%",!1),16777216&e[0]&&Y(a,"width",(100*t[24]).toFixed(2)+"%",!1),2048&e[0]&&Y(a,"height",Kt(t[11].height),!1),2048&e[0]&&Y(a,"border-radius",Kt(t[11].borderRadius),!1),2048&e[0]&&Y(a,"background",t[11].background,!1),2048&e[0]&&Y(a,"box-shadow",t[11].boxShadow||"",!1),131072&e[0]){let r;for(k=t[17],r=0;r<k.length;r+=1){const i=qi(t,k,r);E[r]?E[r].p(i,e):(E[r]=Gi(i),E[r].c(),E[r].m(n,u))}for(;r<E.length;r+=1)E[r].d(1);E.length=k.length}if(262144&e[0]){let r;for(C=t[18],r=0;r<C.length;r+=1){const i=Li(t,C,r);A[r]?A[r].p(i,e):(A[r]=Ki(i),A[r].c(),A[r].m(n,d))}for(;r<A.length;r+=1)A[r].d(1);A.length=C.length}t[12]?V?V.p(t,e):(V=Yi(t),V.c(),V.m(h,null)):V&&(V.d(1),V=null),256&e[0]&&Y(h,"border-radius",Kt(t[8].borderRadius),!1),256&e[0]&&Y(h,"background",t[8].background,!1),256&e[0]&&Y(h,"box-shadow",t[8].boxShadow||"",!1),t[37]&&j.p(t,e),65536&e[0]&&v!==(v=t[16]?"".concat(Di.slider__input," ").concat(Di.slider__input_secondary):Di.slider__input)&&O(m,"class",v),16&e[0]&&O(m,"min",t[4]),32&e[0]&&O(m,"max",t[5]),65728&e[0]&&y!==(y=t[16]?t[7]:t[6])&&(m.value=y),524288&e[0]&&O(m,"aria-label",t[19]),t[37]&&z.p(t,e)},d(n){n&&S(e),F(E,n),F(A,n),V&&V.d(),j&&j.d(),z&&z.d(),t[69](null),w=!1,x()}}}function Qi(t){let e,n,r,i,o=!t[14]&&Hi(t);return{c(){o&&o.c(),e=N()},l(t){o&&o.l(t),e=N()},m(a,l){o&&o.m(a,l),P(a,e,l),n=!0,r||(i=J(window,"resize",t[42]),r=!0)},p(t,n){t[14]?o&&(Et(),Vt(o,1,1,(()=>{o=null})),Ct()):o?(o.p(t,n),16384&n[0]&&At(o,1)):(o=Hi(t),o.c(),At(o,1),o.m(e.parentNode,e))},i(t){n||(At(o),n=!0)},o(t){Vt(o),n=!1},d(t){o&&o.d(t),t&&S(e),r=!1,i()}}}function to(t,e,n,r,i){let o=[];if(i)for(let i=t;i<e;++i)o.push((i-n)/(r-n));else{for(let e=n;e<t;++e)o.push((e-n)/(r-n));for(let t=e;t<r+1;++t)o.push((t-n)/(r-n))}return o}function eo(t,e,r){let i,o,a,l,s,c,u,d,h,g,m,v,y,$,_,b,w,x,k,E,C,A,V,j,D,P,S,F,I,z,T,M,N,J,O=n,B=n,R=n,U=n,W=n,L=n,q=n,H=n,G=n,K=n,Y=n,X=n;var Z,Q,tt,et;t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>X()));let{json:nt={}}=e,{templateContext:it}=e,{origJson:ot}=e,{layoutParams:lt}=e;const st={width:10,height:10,borderRadius:5,background:"#000"},ut=["rounded_rectangle","circle"],dt=["rounded_rectangle"],ht=at(Wt),pt=at(Ae);let ft,gt=!1,mt=0,vt=100;const yt=ht.getJsonWithVars(nt.thumb_value_variable),$t=ht.getJsonWithVars(nt.thumb_secondary_value_variable);let _t=yt&&ht.getVariable(yt,"integer")||Wi("temp","integer",0);f(t,_t,(t=>r(64,M=t)));let bt=$t&&ht.getVariable($t,"integer")||Wi("temp","integer",0);f(t,bt,(t=>r(63,T=t)));let wt,xt,kt,Et=Si(M||0,mt,vt),Ct=Si(T||0,mt,vt),At=st,Vt=At,jt=st,Dt=st,Pt=null,St=null,Ft=kt,It="",zt="",Tt=!1;function Mt(t,e){const n=Number(t.target.value);gt===("first"===e)?(r(7,Ct=n),bt.setValue(n)):(r(6,Et=n),_t.setValue(n))}let Nt=!1;function Jt(){if(!ft)return;const t=vt-mt,e=(null==Pt?void 0:Pt.width)||0,n=(null==St?void 0:St.width)||0;Math.max(e,n)*t>=(null==ft?void 0:ft.clientWidth)?Nt||(ht.logError(Lt(new Error("Slider ticks overlap each other"),{level:"warn"})),Nt=!0):Nt=!1}const Ot=yr(Jt,50);return rt((()=>{Jt()})),t.$$set=t=>{"json"in t&&r(0,nt=t.json),"templateContext"in t&&r(1,it=t.templateContext),"origJson"in t&&r(2,ot=t.origJson),"layoutParams"in t&&r(3,lt=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(36,i=ht.getDerivedFromVars(nt.min_value)),X(),X=p(i,(t=>r(66,J=t)))),1&t.$$.dirty[0]&&(r(35,o=ht.getDerivedFromVars(nt.max_value)),Y(),Y=p(o,(t=>r(65,N=t)))),48&t.$$.dirty[0]|24&t.$$.dirty[2]&&(r(4,mt=we(J,mt)),r(5,vt=we(N,vt)),Jt()),112&t.$$.dirty[0]|4&t.$$.dirty[2]){const t=Si(M||0,mt,vt);t!==Et&&r(6,Et=t)}if(176&t.$$.dirty[0]|2&t.$$.dirty[2]){const t=Si(T||0,mt,vt);t!==Ct&&r(7,Ct=t)}if(1&t.$$.dirty[0]&&(r(34,a=ht.getDerivedFromVars(nt.thumb_style)),K(),K=p(a,(t=>r(62,z=t)))),256&t.$$.dirty[0]|1&t.$$.dirty[2]&&r(8,At=xn(z,ut,At)),1&t.$$.dirty[0]&&(r(33,l=ht.getDerivedFromVars(nt.thumb_secondary_style)),G(),G=p(l,(t=>r(61,I=t)))),256&t.$$.dirty[0]|1073741824&t.$$.dirty[1]&&r(9,Vt=xn(I,ut,At)),1&t.$$.dirty[0]&&(r(32,s=ht.getDerivedFromVars(nt.track_inactive_style)),H(),H=p(s,(t=>r(60,F=t)))),1024&t.$$.dirty[0]|536870912&t.$$.dirty[1]&&r(10,jt=xn(F,dt,jt)),1&t.$$.dirty[0]&&(r(31,c=ht.getDerivedFromVars(nt.track_active_style)),q(),q=p(c,(t=>r(59,S=t)))),2048&t.$$.dirty[0]|268435456&t.$$.dirty[1]&&r(11,Dt=xn(S,dt,Dt)),1&t.$$.dirty[0]&&(r(30,u=ht.getDerivedFromVars(nt.tick_mark_active_style)),L(),L=p(u,(t=>r(58,P=t)))),134217728&t.$$.dirty[1]){let t=xn(P,ut,st);t!==st&&r(47,Pt=t)}if(240&t.$$.dirty[0]|65536&t.$$.dirty[1]&&(Pt?(r(17,wt=$t?to(Math.min(Et,Ct),Math.max(Et,Ct)+1,mt,vt,!0):to(mt,Et,mt,vt,!0)),Jt()):r(17,wt=[])),1&t.$$.dirty[0]&&(r(29,d=ht.getDerivedFromVars(nt.tick_mark_inactive_style)),W(),W=p(d,(t=>r(57,D=t)))),67108864&t.$$.dirty[1]){let t=xn(D,ut,st);t!==st&&r(48,St=t)}if(240&t.$$.dirty[0]|131072&t.$$.dirty[1]&&(St?(r(18,xt=$t?to(Math.min(Et,Ct),Math.max(Et,Ct)+1,mt,vt,!1):to(Et+1,vt+1,mt,vt,!0)),Jt()):r(18,xt=[])),1&t.$$.dirty[0]&&(r(28,h=ht.getDerivedFromVars(nt.thumb_text_style)),U(),U=p(h,(t=>r(56,j=t)))),4096&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(12,kt=Pi(j,kt)),1&t.$$.dirty[0]&&(r(27,g=ht.getDerivedFromVars(nt.thumb_secondary_text_style)),R(),R=p(g,(t=>r(55,V=t)))),4096&t.$$.dirty[0]|16777216&t.$$.dirty[1]&&r(13,Ft=Pi(V,kt)),1&t.$$.dirty[0]&&(r(26,m=ht.getDerivedFromVars(nt.accessibility)),B(),B=p(m,(t=>r(54,A=t)))),8388608&t.$$.dirty[1]&&((null==A?void 0:A.description)?r(19,It=A.description):ht.logError(Lt(new Error('Missing accessibility "description" for slider'),{level:"warn"}))),1&t.$$.dirty[0]&&(r(25,v=ht.getDerivedFromVars(nt.secondary_value_accessibility)),O(),O=p(v,(t=>r(53,C=t)))),4194304&t.$$.dirty[1]&&((null==C?void 0:C.description)?r(20,zt=C.description):$t&&ht.logError(Lt(new Error('Missing second accessibility "description" for slider'),{level:"warn"}))),19712&t.$$.dirty[0]){let t=!1;pt.hasAction()?(ht.logError(Lt(new Error('Cannot show "slider" inside component with action'))),t=!0):At===st?(ht.logError(Lt(new Error('Missing "thumb_style" in slider'))),t=!0):Dt===st?(ht.logError(Lt(new Error('Missing "track_active_style" in slider'))),t=!0):jt===st&&(ht.logError(Lt(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==Tt&&r(14,Tt=t)}768&t.$$.dirty[0]&&r(52,y=Kt(Math.max(...[At.width,Vt.width,0].filter(ge)))),768&t.$$.dirty[0]&&r(51,$=Kt(Math.max(...[At.height,Vt.height,0].filter(ge)))),112&t.$$.dirty[0]&&r(50,_=(Et-mt)/(vt-mt)),176&t.$$.dirty[0]&&r(49,b=$t?(Ct-mt)/(vt-mt):void 0),786432&t.$$.dirty[1]&&r(24,w=void 0!==b?Math.abs(b-_):_),786432&t.$$.dirty[1]&&r(23,x=void 0!==b?Math.min(b,_):0),13056&t.$$.dirty[0]|4190208&t.$$.dirty[1]&&r(22,k={"--divkit-slider-thumb-width":Kt(At.width),"--divkit-slider-thumb-height":Kt(At.height),"--divkit-slider-thumb-secondary-width":Kt(Vt.width),"--divkit-slider-thumb-secondary-height":Kt(Vt.height),"--divkit-slider-text-offset-x":(null===r(43,Z=null==kt?void 0:kt.offset)||void 0===Z?void 0:Z.x)?Yt(kt.offset.x):void 0,"--divkit-slider-text-offset-y":(null===r(44,Q=null==kt?void 0:kt.offset)||void 0===Q?void 0:Q.y)?Yt(kt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===r(45,tt=null==Ft?void 0:Ft.offset)||void 0===tt?void 0:tt.x)?Yt(Ft.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===r(46,et=null==Ft?void 0:Ft.offset)||void 0===et?void 0:et.y)?Yt(Ft.offset.y):void 0,"--divkit-slider-tick-active-width":Pt?Kt(Pt.width):void 0,"--divkit-slider-tick-active-height":Pt?Kt(Pt.height):void 0,"--divkit-slider-tick-active-border-radius":Pt?Kt(Pt.borderRadius):void 0,"--divkit-slider-tick-active-background":(null==Pt?void 0:Pt.background)||void 0,"--divkit-slider-tick-active-box-shadow":(null==Pt?void 0:Pt.boxShadow)||void 0,"--divkit-slider-tick-inactive-width":St?Kt(St.width):void 0,"--divkit-slider-tick-inactive-height":St?Kt(St.height):void 0,"--divkit-slider-tick-inactive-border-radius":St?Kt(St.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==St?void 0:St.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==St?void 0:St.boxShadow)||void 0,"--divkit-slider-max-thumb-width":y,"--divkit-slider-max-thumb-height":$,"--divkit-slider-track-part":_,"--divkit-slider-track-secondary-part":b})},r(21,E={}),[nt,it,ot,lt,mt,vt,Et,Ct,At,Vt,jt,Dt,kt,Ft,Tt,ft,gt,wt,xt,It,zt,E,k,x,w,v,m,g,h,d,u,c,s,l,a,o,i,$t,_t,bt,function(t){var e,n;const i="pageX"in t?t.pageX:null===(n=null===(e=t.changedTouches)||void 0===e?void 0:e[0])||void 0===n?void 0:n.pageX;if(void 0===i)return;const o=ft.getBoundingClientRect(),a=(i-o.left)/o.width,l=(vt-mt)*a,s=Math.round(Si(l,mt,vt));r(16,gt=s<(Et+Ct)/2==Et<Ct)},Mt,Ot,Z,Q,tt,et,Pt,St,b,_,$,y,C,A,V,j,D,P,S,F,I,z,T,M,N,J,t=>Mt(t,"first"),t=>Mt(t,"second"),function(t){ct[t?"unshift":"push"]((()=>{ft=t,r(15,ft)}))}]}const no={input:"divkit-c3a4c",input__wrapper:"divkit-ef7eb",input__holder:"divkit-bb3da",input_multiline:"divkit-e48a3",input__input:"divkit-f11e0","input_highlight-color":"divkit-cc00f","input_vertical-overflow":"divkit-b7075"};function ro(t){let e,n;return e=new Ye({props:{cls:de("input",no,t[12]),style:t[11],customDescription:!0,customActions:"input",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[lo]},$$scope:{ctx:t}}}),{c(){zt(e.$$.fragment)},l(t){Tt(e.$$.fragment,t)},m(t,r){Mt(e,t,r),n=!0},p(t,n){const r={};4096&n[0]&&(r.cls=de("input",no,t[12])),2048&n[0]&&(r.style=t[11]),1&n[0]&&(r.json=t[0]),4&n[0]&&(r.origJson=t[2]),2&n[0]&&(r.templateContext=t[1]),8&n[0]&&(r.layoutParams=t[3]),100208&n[0]|2&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(At(e.$$.fragment,t),n=!0)},o(t){Vt(e.$$.fragment,t),n=!1},d(t){Nt(e,t)}}}function io(t){let e;return{c(){e=T("")},l(t){e=H(t,"")},m(t,n){P(t,e,n)},d(t){t&&S(e)}}}function oo(t){let e,n,r,i;return{c(){e=I("input"),this.h()},l(t){e=L(t,"INPUT",{type:!0,class:!0,autocomplete:!0,autocapitalize:!0,"aria-label":!0,placeholder:!0}),this.h()},h(){O(e,"type",t[9]),O(e,"class",n=no.input__input),O(e,"autocomplete","off"),O(e,"autocapitalize","off"),O(e,"aria-label",t[10]),O(e,"placeholder",t[15]),e.value=t[8]},m(n,o){P(n,e,o),t[57](e),r||(i=[J(e,"input",t[29]),J(e,"mousedown",(function(){s(t[16]?t[30]:void 0)&&(t[16]?t[30]:void 0).apply(this,arguments)})),J(e,"click",(function(){s(t[16]?t[31]:void 0)&&(t[16]?t[31]:void 0).apply(this,arguments)}))],r=!0)},p(n,r){t=n,512&r[0]&&O(e,"type",t[9]),1024&r[0]&&O(e,"aria-label",t[10]),32768&r[0]&&O(e,"placeholder",t[15]),256&r[0]&&e.value!==t[8]&&(e.value=t[8])},d(n){n&&S(e),t[57](null),r=!1,l(i)}}}function ao(t){let e,n,r,i;return{c(){e=I("textarea"),this.h()},l(t){e=L(t,"TEXTAREA",{class:!0,autocomplete:!0,autocapitalize:!0,"aria-label":!0,placeholder:!0}),R(e).forEach(S),this.h()},h(){O(e,"class",n=no.input__input),O(e,"autocomplete","off"),O(e,"autocapitalize","off"),O(e,"aria-label",t[10]),O(e,"placeholder",t[15]),e.value=t[8]},m(n,o){P(n,e,o),t[56](e),r||(i=[J(e,"input",t[29]),J(e,"mousedown",(function(){s(t[16]?t[30]:void 0)&&(t[16]?t[30]:void 0).apply(this,arguments)})),J(e,"click",(function(){s(t[16]?t[31]:void 0)&&(t[16]?t[31]:void 0).apply(this,arguments)}))],r=!0)},p(n,r){t=n,1024&r[0]&&O(e,"aria-label",t[10]),32768&r[0]&&O(e,"placeholder",t[15]),256&r[0]&&(e.value=t[8])},d(n){n&&S(e),t[56](null),r=!1,l(i)}}}function lo(t){let e,n,r,i,o,a,l=t[8].endsWith("\n")||!t[8],s=l&&io();function c(t,e){return t[4]?ao:oo}let u=c(t),d=u(t);return{c(){e=I("span"),n=I("span"),r=T(t[8]),s&&s.c(),o=M(),d.c(),this.h()},l(i){e=L(i,"SPAN",{class:!0});var a=R(e);n=L(a,"SPAN",{class:!0,"aria-hidden":!0});var l=R(n);r=H(l,t[8]),s&&s.l(l),l.forEach(S),o=G(a),d.l(a),a.forEach(S),this.h()},h(){O(n,"class",i=no.input__holder),O(n,"aria-hidden","true"),O(e,"class",a=no.input__wrapper)},m(i,a){P(i,e,a),D(e,n),D(n,r),s&&s.m(n,null),t[55](n),D(e,o),d.m(e,null)},p(t,i){256&i[0]&&K(r,t[8]),256&i[0]&&(l=t[8].endsWith("\n")||!t[8]),l?s||(s=io(),s.c(),s.m(n,null)):s&&(s.d(1),s=null),u===(u=c(t))&&d?d.p(t,i):(d.d(1),d=u(t),d&&(d.c(),d.m(e,null)))},d(n){n&&S(e),s&&s.d(),t[55](null),d.d()}}}function so(t){let e,n,r=!t[7]&&ro(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[7]?r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct()):r?(r.p(t,n),128&n[0]&&At(r,1)):(r=ro(t),r.c(),At(r,1),r.m(e.parentNode,e))},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function co(t,e,r){let i,o,a,l,s,c,u,d,h,g,m,v,y,$,_,b,w,x,k,E,C=n,A=n;t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>A()));let{json:V={}}=e,{templateContext:j}=e,{origJson:D}=e,{layoutParams:P}=e;const S=at(Wt);let F,I,z=!1,T=!1;const M=S.getJsonWithVars(V.text_variable);let N=!1;M||(N=!0,S.logError(Lt(new Error('Missing "text_variable" in "input"'))));let J=M&&S.getVariable(M,"string")||Wi("temp","string","");f(t,J,(t=>r(54,k=t)));let O="";const B=S.getDerivedFromVars(V.hint_text);f(t,B,(t=>r(53,x=t)));const R=S.getDerivedFromVars(V.hint_color);f(t,R,(t=>r(52,w=t)));let U="";const W=S.getDerivedFromVars(V.font_size);f(t,W,(t=>r(51,b=t)));let L=12;const q=S.getDerivedFromVars(V.font_weight);let H;f(t,q,(t=>r(50,_=t)));const G=S.getDerivedFromVars(V.line_height);let K;f(t,G,(t=>r(49,$=t)));const Y=S.getDerivedFromVars(V.letter_spacing);f(t,Y,(t=>r(48,y=t)));let X="";const Z=S.getDerivedFromVars(V.text_color);f(t,Z,(t=>r(47,v=t)));let Q="#000";const tt=S.getDerivedFromVars(V.highlight_color);f(t,tt,(t=>r(46,m=t)));let et="";const nt=S.getDerivedFromVars(V.keyboard_type);f(t,nt,(t=>r(45,g=t)));const it={email:"email",number:"number",phone:"tel",single_line_text:"text",multi_line_text:"text",uri:"url"};let ot="multi_line_text",lt="text";const st=S.getDerivedFromVars(V.max_visible_lines);f(t,st,(t=>r(44,h=t)));let ut="",dt="";const ht=S.getDerivedFromVars(V.select_all_on_focus);function pt(){r(32,T=I.scrollHeight>I.offsetHeight)}return f(t,ht,(t=>r(16,E=t))),rt((()=>{pt()})),t.$$set=t=>{"json"in t&&r(0,V=t.json),"templateContext"in t&&r(1,j=t.templateContext),"origJson"in t&&r(2,D=t.origJson),"layoutParams"in t&&r(3,P=t.layoutParams)},t.$$.update=()=>{if(8388608&t.$$.dirty[1]&&r(8,O=k),4194304&t.$$.dirty[1]&&r(15,i=x),2097156&t.$$.dirty[1]&&r(33,U=Zt(w,1,U)),1048584&t.$$.dirty[1]&&r(34,L=Ze(b,L)),524304&t.$$.dirty[1]&&r(35,H=tn(_,H)),262152&t.$$.dirty[1]){const t=$;Ie(t)&&r(36,K=t/L)}131080&t.$$.dirty[1]&&fe(y)&&r(37,X=Kt(y/L*10)),65664&t.$$.dirty[1]&&r(38,Q=Zt(v,1,Q)),33024&t.$$.dirty[1]&&r(39,et=Zt(m,1,et)),16384&t.$$.dirty[1]&&g&&g in it&&(r(9,lt=it[g]),r(40,ot=g)),512&t.$$.dirty[1]&&r(4,o="multi_line_text"===ot),1&t.$$.dirty[0]&&(r(14,a=S.getDerivedFromVars(V.paddings)),A(),A=p(a,(t=>r(43,d=t)))),12320&t.$$.dirty[1]&&Ie(h)&&r(41,ut="calc(".concat(h*(K||1.25)+"em"," + ").concat(Yt(ve(null==d?void 0:d.top,0)+ve(null==d?void 0:d.bottom,0)),")")),1&t.$$.dirty[0]&&(r(13,l=S.getDerivedFromVars(V.accessibility)),C(),C=p(l,(t=>r(42,u=t)))),2048&t.$$.dirty[1]&&((null==u?void 0:u.description)?r(10,dt=u.description):S.logError(Lt(new Error('Missing accessibility "description" for input'),{level:"warn"}))),16&t.$$.dirty[0]|258&t.$$.dirty[1]&&r(12,s={"highlight-color":Boolean(et),"vertical-overflow":T,multiline:o}),1532&t.$$.dirty[1]&&r(11,c={"--divkit-input-hint-color":U,"--divkit-input-highlight-color":et,"font-size":Kt(L),"font-weight":H,"line-height":K,"letter-spacing":X,color:Q,"max-height":ut})},[V,j,D,P,o,F,I,N,O,lt,dt,c,s,l,a,i,E,J,B,R,W,q,G,Y,Z,tt,nt,st,ht,function(t){const e=t.target.value||"";J.setValue(e),pt()},function(){z=!1,setTimeout((()=>{z=!0}),250)},function(){z||F.select()},T,U,L,H,K,X,Q,et,ot,ut,u,d,h,g,m,v,y,$,_,b,w,x,k,function(t){ct[t?"unshift":"push"]((()=>{I=t,r(6,I)}))},function(t){ct[t?"unshift":"push"]((()=>{F=t,r(5,F)}))},function(t){ct[t?"unshift":"push"]((()=>{F=t,r(5,F)}))}]}const uo={text:class extends Ot{constructor(t){super(),Jt(this,t,bn,_n,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},container:class extends Ot{constructor(t){super(),Jt(this,t,Rn,Bn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},separator:class extends Ot{constructor(t){super(),Jt(this,t,Gn,Hn,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},image:or,gif:or,grid:class extends Ot{constructor(t){super(),Jt(this,t,gr,fr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},gallery:class extends Ot{constructor(t){super(),Jt(this,t,Dr,jr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},tabs:class extends Ot{constructor(t){super(),Jt(this,t,Ur,Rr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},state:class extends Ot{constructor(t){super(),Jt(this,t,fi,hi,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},pager:class extends Ot{constructor(t){super(),Jt(this,t,wi,bi,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},indicator:class extends Ot{constructor(t){super(),Jt(this,t,ji,Vi,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},slider:class extends Ot{constructor(t){super(),Jt(this,t,eo,Qi,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},input:class extends Ot{constructor(t){super(),Jt(this,t,co,so,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}}};function ho(t){let e,n,r;var i=t[5];function o(t){return{props:{json:t[3],templateContext:t[4],layoutParams:t[2],origJson:t[1]||t[0]}}}return i&&(e=new i(o(t))),{c(){e&&zt(e.$$.fragment),n=N()},l(t){e&&Tt(e.$$.fragment,t),n=N()},m(t,i){e&&Mt(e,t,i),P(t,n,i),r=!0},p(t,r){const a={};if(8&r&&(a.json=t[3]),16&r&&(a.templateContext=t[4]),4&r&&(a.layoutParams=t[2]),3&r&&(a.origJson=t[1]||t[0]),i!==(i=t[5])){if(e){Et();const t=e;Vt(t.$$.fragment,1,0,(()=>{Nt(t,1)})),Ct()}i?(e=new i(o(t)),zt(e.$$.fragment),At(e.$$.fragment,1),Mt(e,n.parentNode,n)):e=null}else i&&e.$set(a)},i(t){r||(e&&At(e.$$.fragment,t),r=!0)},o(t){e&&Vt(e.$$.fragment,t),r=!1},d(t){t&&S(n),e&&Nt(e,t)}}}function po(t){let e,n,r=t[5]&&ho(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){let[i]=n;t[5]?r?(r.p(t,i),32&i&&At(r,1)):(r=ho(t),r.c(),At(r,1),r.m(e.parentNode,e)):r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct())},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function fo(t,e,n){let{div:r}=e,{templateContext:i}=e,{origJson:o}=e,{layoutParams:a}=e;const l=at(Wt);let s,c,u;return t.$$set=t=>{"div"in t&&n(0,r=t.div),"templateContext"in t&&n(6,i=t.templateContext),"origJson"in t&&n(1,o=t.origJson),"layoutParams"in t&&n(2,a=t.layoutParams)},t.$$.update=()=>{if(121&t.$$.dirty&&(n(3,s=r),n(4,c=i),n(5,u=s&&uo[s.type]||void 0),!u&&(n(4,({templateContext:c,json:s}=l.processTemplate(s,c)),c,(n(3,s),n(0,r),n(6,i),n(5,u),n(4,c))),n(5,u=s&&uo[s.type]||void 0),!u))){let t;t=(null==s?void 0:s.type)&&l.hasTemplate(s.type)?"Recursive template":"Unknown component",l.logError(Lt(new Error(t),{additional:{component:(null==s?void 0:s.type)||"<missing>"}}))}},[r,o,a,s,c,u,i]}const go=class extends Ot{constructor(t){super(),Jt(this,t,fo,po,d,{div:0,templateContext:6,origJson:1,layoutParams:2})}};function mo(t,e,n){const r=t.slice();r[1]=e[n];const i=r[1].split(":");return r[2]=i[0],r[3]=i[1],r}function vo(t){let e,n,r,i=[...Object.keys(t[0])],o=[];for(let e=0;e<i.length;e+=1)o[e]=bo(mo(t,i,e));return{c(){e=z("svg"),n=z("defs");for(let t=0;t<o.length;t+=1)o[t].c();this.h()},l(t){e=q(t,"svg",{class:!0,"aria-hidden":!0});var r=R(e);n=q(r,"defs",{});var i=R(n);for(let t=0;t<o.length;t+=1)o[t].l(i);i.forEach(S),r.forEach(S),this.h()},h(){O(e,"class",r="divkit-dc22b"),O(e,"aria-hidden","true")},m(t,r){P(t,e,r),D(e,n);for(let t=0;t<o.length;t+=1)o[t].m(n,null)},p(t,e){if(1&e){let r;for(i=[...Object.keys(t[0])],r=0;r<i.length;r+=1){const a=mo(t,i,r);o[r]?o[r].p(a,e):(o[r]=bo(a),o[r].c(),o[r].m(n,null))}for(;r<o.length;r+=1)o[r].d(1);o.length=i.length}},d(t){t&&S(e),F(o,t)}}}function yo(t){let e,n;return{c(){e=z("feBlend"),this.h()},l(t){e=q(t,"feBlend",{in2:!0,mode:!0}),R(e).forEach(S),this.h()},h(){O(e,"in2","SourceGraphic"),O(e,"mode",n=t[3])},m(t,n){P(t,e,n)},p(t,r){1&r&&n!==(n=t[3])&&O(e,"mode",n)},d(t){t&&S(e)}}}function $o(t){let e;return{c(){e=z("feComposite"),this.h()},l(t){e=q(t,"feComposite",{in2:!0,operator:!0,k1:!0,k2:!0,k3:!0,k4:!0}),R(e).forEach(S),this.h()},h(){O(e,"in2","SourceGraphic"),O(e,"operator","arithmetic"),O(e,"k1","1"),O(e,"k2","0"),O(e,"k3","0"),O(e,"k4","0")},m(t,n){P(t,e,n)},p:n,d(t){t&&S(e)}}}function _o(t){let e,n;return{c(){e=z("feComposite"),this.h()},l(t){e=q(t,"feComposite",{in2:!0,operator:!0}),R(e).forEach(S),this.h()},h(){O(e,"in2","SourceGraphic"),O(e,"operator",n=t[3].split("_")[1])},m(t,n){P(t,e,n)},p(t,r){1&r&&n!==(n=t[3].split("_")[1])&&O(e,"operator",n)},d(t){t&&S(e)}}}function bo(t){let e,n,r,i;function o(t,e){return"source_in"===t[3]||"source_atop"===t[3]?_o:"multiply"===t[3]?$o:yo}let a=o(t),l=a(t);return{c(){e=z("filter"),n=z("feFlood"),l.c(),this.h()},l(t){e=q(t,"filter",{id:!0});var r=R(e);n=q(r,"feFlood",{"flood-color":!0}),R(n).forEach(S),l.l(r),r.forEach(S),this.h()},h(){O(n,"flood-color",r=t[2]),O(e,"id",i=t[0][t[1]])},m(t,r){P(t,e,r),D(e,n),l.m(e,null)},p(t,s){1&s&&r!==(r=t[2])&&O(n,"flood-color",r),a===(a=o(t))&&l?l.p(t,s):(l.d(1),l=a(t),l&&(l.c(),l.m(e,null))),1&s&&i!==(i=t[0][t[1]])&&O(e,"id",i)},d(t){t&&S(e),l.d()}}}function wo(t){let e,r=Object.keys(t[0]).length,i=r&&vo(t);return{c(){i&&i.c(),e=N()},l(t){i&&i.l(t),e=N()},m(t,n){i&&i.m(t,n),P(t,e,n)},p(t,n){let[o]=n;1&o&&(r=Object.keys(t[0]).length),r?i?i.p(t,o):(i=vo(t),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},i:n,o:n,d(t){i&&i.d(t),t&&S(e)}}}function xo(t,e,n){let{svgFiltersMap:r}=e;return t.$$set=t=>{"svgFiltersMap"in t&&n(0,r=t.svgFiltersMap)},[r]}const ko=class extends Ot{constructor(t){super(),Jt(this,t,xo,wo,d,{svgFiltersMap:0})}};function Eo(t,e,n,r){const i=n[t.type];if(!i)return r(Lt(new Error("No such template"),{additional:{template:t.type}})),{json:t,templateContext:e};let o;const a={};for(o in e)e.hasOwnProperty(o)&&(a[o]=e[o]);for(o in t)"type"!==o&&"__proto__"!==o&&t.hasOwnProperty(o)&&(a[o]=t[o]);const l=function t(e,n){const r=Object.keys(n).filter((t=>"__proto__"!==t)),i=r.filter((t=>"$"!==t.charAt(0))),o=r.filter((t=>"$"===t.charAt(0)));return i.forEach((r=>{const i=n[r];"object"==typeof i&&null!==i?(e[r]=Array.isArray(i)?[]:{},t(e[r],i)):e[r]=i})),o.forEach((t=>{const r=n[t],i=a[r];if(void 0!==i){const n=t.substring(1);e[n]=i}})),e}({},i);for(o in t)"type"!==o&&"__proto__"!==o&&t.hasOwnProperty(o)&&(l[o]=t[o]);return{json:l,templateContext:a}}function Co(){}function Ao(t){return{subscribe:e=>(e(t),Co)}}function Vo(t,e){return e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t)}function jo(t,e){return e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t)}function Do(t){if(t.every((t=>"string"==typeof t)))return{type:"StringLiteral",value:t.join("")};let e=t.reduce(((t,e)=>("string"==typeof e&&"string"==typeof t[t.length-1]?t[t.length-1]+=e:t.push(e),t)),[]).reduce(((t,e)=>("string"==typeof e?t.quasis.push({type:"StringLiteral",value:e}):(t.quasis.length===t.expressions.length&&t.quasis.push({type:"StringLiteral",value:""}),t.expressions.push(e)),t)),{type:"TemplateLiteral",quasis:[],expressions:[]});return e.quasis.length===e.expressions.length&&e.quasis.push({type:"StringLiteral",value:""}),e}function Po(t){var e=parseInt(t,10);if(e>2147483647||e<Fi)throw new Error("Value ".concat(t," can't be converted to Integer type."));return e}function So(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function Fo(t,e,n,r){var i=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(i,Fo.prototype),i.expected=e,i.found=n,i.location=r,i.name="SyntaxError",i}function Io(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,t+(n+=n.repeat(e)).slice(0,e))}function zo(t,e){var n,r={},i=(e=void 0!==e?e:{}).grammarSource,o={start:jt,JsonStringContents:function(){var t,e,n;for(t=mt,e=[],n=Dt();n!==r;)e.push(n),n=Dt();return vt=t,e=gt(e)}},a=jt,l="@{",s="}",c="@{}",u="\\",d="||",h="&&",p="==",f="!=",g=">=",m="<=",v="+",y="-",$="true",_="false",b=/^[^}]/,w=/^[^'}]/,x=/^[0-9]/,k=/^[a-zA-Z_0-9.]/,E=/^[a-zA-Z_]/,C=/^[ \t\r\n]/,A=xt("@{",!1),V=xt("}",!1),j=xt("@{}",!1),D=xt("\\",!1),P={type:"any"},S=kt(["}"],!0,!1),F=xt("?",!1),I=xt(":",!1),z=xt("||",!1),T=xt("&&",!1),M=xt("==",!1),N=xt("!=",!1),J=xt(">=",!1),O=xt(">",!1),B=xt("<=",!1),R=xt("<",!1),U=xt("+",!1),W=xt("-",!1),L=xt("/",!1),q=xt("*",!1),H=xt("%",!1),G=xt("!",!1),K=xt("(",!1),Y=xt(")",!1),X=xt(",",!1),Z=Et("string"),Q=xt("'",!1),tt=kt(["'","}"],!0,!1),et=Et("integer"),nt=kt([["0","9"]],!1,!1),rt=Et("number"),it=xt(".",!1),ot=xt("e",!1),at=xt("E",!1),lt=Et("boolean"),st=xt("true",!1),ct=xt("false",!1),ut=kt([["a","z"],["A","Z"],"_",["0","9"],"."],!1,!1),dt=Et("identifier"),ht=kt([["a","z"],["A","Z"],"_"],!1,!1),pt=Et("whitespace"),ft=kt([" ","\t","\r","\n"],!1,!1),gt=function(t){return Do(t)},mt=0,vt=0,yt=[{line:1,column:1}],$t=0,_t=[],bt=0;if("startRule"in e){if(!(e.startRule in o))throw new Error("Can't start parsing from rule \""+e.startRule+'".');a=o[e.startRule]}function wt(){return t.substring(vt,mt)}function xt(t,e){return{type:"literal",text:t,ignoreCase:e}}function kt(t,e,n){return{type:"class",parts:t,inverted:e,ignoreCase:n}}function Et(t){return{type:"other",description:t}}function Ct(e){var n,r=yt[e];if(r)return r;for(n=e-1;!yt[n];)n--;for(r={line:(r=yt[n]).line,column:r.column};n<e;)10===t.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return yt[e]=r,r}function At(t,e){var n=Ct(t),r=Ct(e);return{source:i,start:{offset:t,line:n.line,column:n.column},end:{offset:e,line:r.line,column:r.column}}}function Vt(t){mt<$t||(mt>$t&&($t=mt,_t=[]),_t.push(t))}function jt(){var t,e;return t=mt,Ut(),(e=Pt())!==r?(Ut(),vt=t,t=e):(mt=t,t=r),t}function Dt(){var e,n,i,o,a;if(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&Vt(A)),n!==r?(i=Ut(),(o=Pt())!==r?(Ut(),125===t.charCodeAt(mt)?(a=s,mt++):(a=r,0===bt&&Vt(V)),a!==r?(vt=e,e=o):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,t.substr(mt,3)===c?(n=c,mt+=3):(n=r,0===bt&&Vt(j)),n!==r&&(vt=e,n=""),(e=n)===r&&(e=mt,n=mt,bt++,92===t.charCodeAt(mt)?(i=u,mt++):(i=r,0===bt&&Vt(D)),i===r&&(t.substr(mt,2)===l?(i=l,mt+=2):(i=r,0===bt&&Vt(A))),bt--,i===r?n=void 0:(mt=n,n=r),n!==r?(t.length>mt?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(P)),i!==r?(vt=e,e=wt()):(mt=e,e=r)):(mt=e,e=r),e===r))){if(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&Vt(A)),n!==r){if(i=[],b.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(S)),o!==r)for(;o!==r;)i.push(o),b.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(S));else i=r;i!==r?(125===t.charCodeAt(mt)?(o=s,mt++):(o=r,0===bt&&Vt(V)),o!==r?(vt=e,e=function(){throw new Error("Error tokenizing '"+t+"'.")}()):(mt=e,e=r)):(mt=e,e=r)}else mt=e,e=r;e===r&&(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&Vt(A)),n!==r&&(vt=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),(e=n)===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===bt&&Vt(D)),n!==r?(t.substr(mt,2)===l?(i=l,mt+=2):(i=r,0===bt&&Vt(A)),i!==r?(vt=e,e=i):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===bt&&Vt(D)),n!==r?(t.length>mt?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(P)),i!==r?(vt=e,e=So(i)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===bt&&Vt(D)),n!==r&&(vt=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=n))))}return e}function Pt(){var e,n,i,o,a,l;return e=mt,(n=St())!==r?(Ut(),63===t.charCodeAt(mt)?(i="?",mt++):(i=r,0===bt&&Vt(F)),i!==r?(Ut(),(o=Pt())!==r?(Ut(),58===t.charCodeAt(mt)?(a=":",mt++):(a=r,0===bt&&Vt(I)),a!==r?(Ut(),(l=Pt())!==r?(vt=e,e={type:"ConditionalExpression",test:n,consequent:o,alternate:l}):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=St()),e}function St(){var e,n,i,o,a,l,s,c;if(e=mt,(n=Ft())!==r){for(i=[],o=mt,a=Ut(),t.substr(mt,2)===d?(l=d,mt+=2):(l=r,0===bt&&Vt(z)),l!==r?(s=Ut(),(c=Ft())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);o!==r;)i.push(o),o=mt,a=Ut(),t.substr(mt,2)===d?(l=d,mt+=2):(l=r,0===bt&&Vt(z)),l!==r?(s=Ut(),(c=Ft())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);vt=e,e=jo(n,i)}else mt=e,e=r;return e}function Ft(){var e,n,i,o,a,l,s,c;if(e=mt,(n=It())!==r){for(i=[],o=mt,a=Ut(),t.substr(mt,2)===h?(l=h,mt+=2):(l=r,0===bt&&Vt(T)),l!==r?(s=Ut(),(c=It())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);o!==r;)i.push(o),o=mt,a=Ut(),t.substr(mt,2)===h?(l=h,mt+=2):(l=r,0===bt&&Vt(T)),l!==r?(s=Ut(),(c=It())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);vt=e,e=jo(n,i)}else mt=e,e=r;return e}function It(){var e,n,i,o,a,l,s,c;if(e=mt,(n=zt())!==r){for(i=[],o=mt,a=Ut(),t.substr(mt,2)===p?(l=p,mt+=2):(l=r,0===bt&&Vt(M)),l===r&&(t.substr(mt,2)===f?(l=f,mt+=2):(l=r,0===bt&&Vt(N))),l!==r?(s=Ut(),(c=zt())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);o!==r;)i.push(o),o=mt,a=Ut(),t.substr(mt,2)===p?(l=p,mt+=2):(l=r,0===bt&&Vt(M)),l===r&&(t.substr(mt,2)===f?(l=f,mt+=2):(l=r,0===bt&&Vt(N))),l!==r?(s=Ut(),(c=zt())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);vt=e,e=Vo(n,i)}else mt=e,e=r;return e}function zt(){var e,n,i,o,a,l,s,c;if(e=mt,(n=Tt())!==r){for(i=[],o=mt,a=Ut(),t.substr(mt,2)===g?(l=g,mt+=2):(l=r,0===bt&&Vt(J)),l===r&&(62===t.charCodeAt(mt)?(l=">",mt++):(l=r,0===bt&&Vt(O)),l===r&&(t.substr(mt,2)===m?(l=m,mt+=2):(l=r,0===bt&&Vt(B)),l===r&&(60===t.charCodeAt(mt)?(l="<",mt++):(l=r,0===bt&&Vt(R))))),l!==r?(s=Ut(),(c=Tt())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);o!==r;)i.push(o),o=mt,a=Ut(),t.substr(mt,2)===g?(l=g,mt+=2):(l=r,0===bt&&Vt(J)),l===r&&(62===t.charCodeAt(mt)?(l=">",mt++):(l=r,0===bt&&Vt(O)),l===r&&(t.substr(mt,2)===m?(l=m,mt+=2):(l=r,0===bt&&Vt(B)),l===r&&(60===t.charCodeAt(mt)?(l="<",mt++):(l=r,0===bt&&Vt(R))))),l!==r?(s=Ut(),(c=Tt())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);vt=e,e=Vo(n,i)}else mt=e,e=r;return e}function Tt(){var e,n,i,o,a,l,s,c;if(e=mt,(n=Mt())!==r){for(i=[],o=mt,a=Ut(),43===t.charCodeAt(mt)?(l=v,mt++):(l=r,0===bt&&Vt(U)),l===r&&(45===t.charCodeAt(mt)?(l=y,mt++):(l=r,0===bt&&Vt(W))),l!==r?(s=Ut(),(c=Mt())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);o!==r;)i.push(o),o=mt,a=Ut(),43===t.charCodeAt(mt)?(l=v,mt++):(l=r,0===bt&&Vt(U)),l===r&&(45===t.charCodeAt(mt)?(l=y,mt++):(l=r,0===bt&&Vt(W))),l!==r?(s=Ut(),(c=Mt())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);vt=e,e=Vo(n,i)}else mt=e,e=r;return e}function Mt(){var e,n,i,o,a,l,s,c;if(e=mt,(n=Nt())!==r){for(i=[],o=mt,a=Ut(),47===t.charCodeAt(mt)?(l="/",mt++):(l=r,0===bt&&Vt(L)),l===r&&(42===t.charCodeAt(mt)?(l="*",mt++):(l=r,0===bt&&Vt(q)),l===r&&(37===t.charCodeAt(mt)?(l="%",mt++):(l=r,0===bt&&Vt(H)))),l!==r?(s=Ut(),(c=Nt())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);o!==r;)i.push(o),o=mt,a=Ut(),47===t.charCodeAt(mt)?(l="/",mt++):(l=r,0===bt&&Vt(L)),l===r&&(42===t.charCodeAt(mt)?(l="*",mt++):(l=r,0===bt&&Vt(q)),l===r&&(37===t.charCodeAt(mt)?(l="%",mt++):(l=r,0===bt&&Vt(H)))),l!==r?(s=Ut(),(c=Nt())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);vt=e,e=Vo(n,i)}else mt=e,e=r;return e}function Nt(){var e,n,i;return(e=Bt())===r&&(e=Ot())===r&&(e=mt,33===t.charCodeAt(mt)?(n="!",mt++):(n=r,0===bt&&Vt(G)),n===r&&(43===t.charCodeAt(mt)?(n=v,mt++):(n=r,0===bt&&Vt(U)),n===r&&(45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===bt&&Vt(W)))),n!==r?(Ut(),(i=Nt())!==r?(vt=e,e={type:"UnaryExpression",operator:n,argument:i}):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=function(){var e,n,i,o,a;return e=mt,(n=Rt())!==r?(Ut(),40===t.charCodeAt(mt)?(i="(",mt++):(i=r,0===bt&&Vt(K)),i!==r?(Ut(),o=function(){var e,n,i,o,a,l,s;if(e=mt,(n=Pt())!==r){for(i=[],o=mt,Ut(),44===t.charCodeAt(mt)?(a=",",mt++):(a=r,0===bt&&Vt(X)),a!==r?(Ut(),(l=Pt())!==r?o=l:(mt=o,o=r)):(mt=o,o=r);o!==r;)i.push(o),o=mt,Ut(),44===t.charCodeAt(mt)?(a=",",mt++):(a=r,0===bt&&Vt(X)),a!==r?(Ut(),(l=Pt())!==r?o=l:(mt=o,o=r)):(mt=o,o=r);vt=e,s=i,e=[n,...s]}else mt=e,e=r;return e===r&&(e=Ut()),e}(),o!==r?(Ut(),41===t.charCodeAt(mt)?(a=")",mt++):(a=r,0===bt&&Vt(Y)),a!==r?(vt=e,e={type:"CallExpression",callee:n,arguments:o}):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,(n=Rt())!==r&&(vt=e,n={type:"Variable",id:n}),(e=n)===r&&(e=function(){var e,n,i,o;return e=function(){var e,n,i,o;return bt++,e=mt,39===t.charCodeAt(mt)?(n="'",mt++):(n=r,0===bt&&Vt(Q)),n!==r?(i=function(){var t,e,n;for(t=mt,e=[],n=Jt();n!==r;)e.push(n),n=Jt();return vt=t,e=Do(e)}(),39===t.charCodeAt(mt)?(o="'",mt++):(o=r,0===bt&&Vt(Q)),o!==r?(vt=e,e=i):(mt=e,e=r)):(mt=e,e=r),bt--,e===r&&(n=r,0===bt&&Vt(Z)),e}(),e===r&&(e=Bt())===r&&(e=Ot())===r&&(e=function(){var e,n;return bt++,e=mt,t.substr(mt,4)===$?(n=$,mt+=4):(n=r,0===bt&&Vt(st)),n!==r&&(vt=e,n={type:"BooleanLiteral",value:!0}),(e=n)===r&&(e=mt,t.substr(mt,5)===_?(n=_,mt+=5):(n=r,0===bt&&Vt(ct)),n!==r&&(vt=e,n={type:"BooleanLiteral",value:!1}),e=n),bt--,e===r&&(n=r,0===bt&&Vt(lt)),e}(),e===r&&(e=mt,40===t.charCodeAt(mt)?(n="(",mt++):(n=r,0===bt&&Vt(K)),n!==r&&(i=Pt())!==r?(41===t.charCodeAt(mt)?(o=")",mt++):(o=r,0===bt&&Vt(Y)),o!==r?(vt=e,e=i):(mt=e,e=r)):(mt=e,e=r))),e}())),e}())),e}function Jt(){var e,n,i,o,a;if(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&Vt(A)),n!==r?(i=Ut(),(o=Pt())!==r?(Ut(),125===t.charCodeAt(mt)?(a=s,mt++):(a=r,0===bt&&Vt(V)),a!==r?(vt=e,e=o):(mt=e,e=r)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,t.substr(mt,3)===c?(n=c,mt+=3):(n=r,0===bt&&Vt(j)),n!==r&&(vt=e,n=""),(e=n)===r&&(e=mt,n=mt,bt++,92===t.charCodeAt(mt)?(i=u,mt++):(i=r,0===bt&&Vt(D)),i===r&&(39===t.charCodeAt(mt)?(i="'",mt++):(i=r,0===bt&&Vt(Q)),i===r&&(t.substr(mt,2)===l?(i=l,mt+=2):(i=r,0===bt&&Vt(A)))),bt--,i===r?n=void 0:(mt=n,n=r),n!==r?(t.length>mt?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(P)),i!==r?(vt=e,e=wt()):(mt=e,e=r)):(mt=e,e=r),e===r))){if(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&Vt(A)),n!==r){if(i=[],w.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(tt)),o!==r)for(;o!==r;)i.push(o),w.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(tt));else i=r;i!==r?(125===t.charCodeAt(mt)?(o=s,mt++):(o=r,0===bt&&Vt(V)),o!==r?(vt=e,e=function(){throw new Error("Error tokenizing '"+t+"'.")}()):(mt=e,e=r)):(mt=e,e=r)}else mt=e,e=r;e===r&&(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&Vt(A)),n!==r&&(vt=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),(e=n)===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===bt&&Vt(D)),n!==r?(t.substr(mt,2)===l?(i=l,mt+=2):(i=r,0===bt&&Vt(A)),i!==r?(vt=e,e=i):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===bt&&Vt(D)),n!==r?(t.length>mt?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(P)),i!==r?(vt=e,e=So(i)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===bt&&Vt(D)),n!==r&&(vt=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=n))))}return e}function Ot(){var e,n,i,o;if(bt++,e=mt,45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===bt&&Vt(W)),n===r&&(n=null),i=[],x.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(nt)),o!==r)for(;o!==r;)i.push(o),x.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(nt));else i=r;return i!==r?(vt=e,e={type:"IntegerLiteral",value:Po(wt())}):(mt=e,e=r),bt--,e===r&&(n=r,0===bt&&Vt(et)),e}function Bt(){var e,n,i,o,a,l,s,c,u,d;for(bt++,e=mt,45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===bt&&Vt(W)),n===r&&(n=null),i=[],x.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(nt));o!==r;)i.push(o),x.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(nt));if(46===t.charCodeAt(mt)?(o=".",mt++):(o=r,0===bt&&Vt(it)),o!==r){if(a=[],x.test(t.charAt(mt))?(l=t.charAt(mt),mt++):(l=r,0===bt&&Vt(nt)),l!==r)for(;l!==r;)a.push(l),x.test(t.charAt(mt))?(l=t.charAt(mt),mt++):(l=r,0===bt&&Vt(nt));else a=r;if(a!==r){if(l=mt,101===t.charCodeAt(mt)?(s="e",mt++):(s=r,0===bt&&Vt(ot)),s===r&&(69===t.charCodeAt(mt)?(s="E",mt++):(s=r,0===bt&&Vt(at))),s!==r){if(43===t.charCodeAt(mt)?(c=v,mt++):(c=r,0===bt&&Vt(U)),c===r&&(45===t.charCodeAt(mt)?(c=y,mt++):(c=r,0===bt&&Vt(W))),c===r&&(c=null),u=[],x.test(t.charAt(mt))?(d=t.charAt(mt),mt++):(d=r,0===bt&&Vt(nt)),d!==r)for(;d!==r;)u.push(d),x.test(t.charAt(mt))?(d=t.charAt(mt),mt++):(d=r,0===bt&&Vt(nt));else u=r;u!==r?l=s=[s,c,u]:(mt=l,l=r)}else mt=l,l=r;l===r&&(l=null),vt=e,e={type:"NumberLiteral",value:parseFloat(wt())}}else mt=e,e=r}else mt=e,e=r;if(e===r){if(e=mt,45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===bt&&Vt(W)),n===r&&(n=null),i=[],x.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(nt)),o!==r)for(;o!==r;)i.push(o),x.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(nt));else i=r;if(i!==r)if(101===t.charCodeAt(mt)?(o="e",mt++):(o=r,0===bt&&Vt(ot)),o===r&&(69===t.charCodeAt(mt)?(o="E",mt++):(o=r,0===bt&&Vt(at))),o!==r){if(43===t.charCodeAt(mt)?(a=v,mt++):(a=r,0===bt&&Vt(U)),a===r&&(45===t.charCodeAt(mt)?(a=y,mt++):(a=r,0===bt&&Vt(W))),a===r&&(a=null),l=[],x.test(t.charAt(mt))?(s=t.charAt(mt),mt++):(s=r,0===bt&&Vt(nt)),s!==r)for(;s!==r;)l.push(s),x.test(t.charAt(mt))?(s=t.charAt(mt),mt++):(s=r,0===bt&&Vt(nt));else l=r;l!==r?(vt=e,e={type:"NumberLiteral",value:parseFloat(wt())}):(mt=e,e=r)}else mt=e,e=r;else mt=e,e=r}return bt--,e===r&&(n=r,0===bt&&Vt(rt)),e}function Rt(){var e,n,i,o,a;if(bt++,e=mt,n=mt,bt++,i=function(){var e,n,i,o;return e=mt,t.substr(mt,4)===$?(n=$,mt+=4):(n=r,0===bt&&Vt(st)),n===r&&(t.substr(mt,5)===_?(n=_,mt+=5):(n=r,0===bt&&Vt(ct))),n!==r?(i=mt,bt++,k.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(ut)),bt--,o===r?i=void 0:(mt=i,i=r),i!==r?e=n=[n,i]:(mt=e,e=r)):(mt=e,e=r),e}(),bt--,i===r?n=void 0:(mt=n,n=r),n!==r)if(E.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(ht)),i!==r){for(o=[],k.test(t.charAt(mt))?(a=t.charAt(mt),mt++):(a=r,0===bt&&Vt(ut));a!==r;)o.push(a),k.test(t.charAt(mt))?(a=t.charAt(mt),mt++):(a=r,0===bt&&Vt(ut));vt=e,e={type:"Identifier",name:wt()}}else mt=e,e=r;else mt=e,e=r;return bt--,e===r&&(n=r,0===bt&&Vt(dt)),e}function Ut(){var e,n;for(bt++,e=[],C.test(t.charAt(mt))?(n=t.charAt(mt),mt++):(n=r,0===bt&&Vt(ft));n!==r;)e.push(n),C.test(t.charAt(mt))?(n=t.charAt(mt),mt++):(n=r,0===bt&&Vt(ft));return bt--,n=r,0===bt&&Vt(pt),e}if((n=a())!==r&&mt===t.length)return n;throw n!==r&&mt<t.length&&Vt({type:"end"}),function(t,e,n){return new Fo(Fo.buildMessage(t,e),t,e,n)}(_t,$t<t.length?t.charAt($t):null,$t<t.length?At($t,$t+1):At($t,$t))}!function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}(Fo,Error),Fo.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n,r=null;for(n=0;n<t.length;n++)if(t[n].source===this.location.source){r=t[n].text.split(/\r\n|\n|\r/g);break}var i=this.location.start,o=this.location.source+":"+i.line+":"+i.column;if(r){var a=this.location.end,l=Io("",i.line.toString().length," "),s=r[i.line-1],c=(i.line===a.line?a.column:s.length+1)-i.column||1;e+="\n --\x3e "+o+"\n"+l+" |\n"+i.line+" | "+s+"\n"+l+" | "+Io("",i.column-1," ")+Io("",c,"^")}else e+="\n at "+o}return e},Fo.buildMessage=function(t,e){var n={literal:function(t){return'"'+i(t.text)+'"'},class:function(t){var e=t.parts.map((function(t){return Array.isArray(t)?o(t[0])+"-"+o(t[1]):o(t)}));return"["+(t.inverted?"^":"")+e.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(t){return t.description}};function r(t){return t.charCodeAt(0).toString(16).toUpperCase()}function i(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(t){return"\\x0"+r(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+r(t)}))}function o(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(t){return"\\x0"+r(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+r(t)}))}function a(t){return n[t.type](t)}return"Expected "+function(t){var e,n,r=t.map(a);if(r.sort(),r.length>0){for(e=1,n=1;e<r.length;e++)r[e-1]!==r[e]&&(r[n]=r[e],n++);r.length=n}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(t)+" but "+function(t){return t?'"'+i(t)+'"':"end of input"}(e)+" found."};const To=new Map,Mo=new Map;function No(t,e,n){const r={args:e,cb:n},i=To.get(t)||[];To.has(t)||To.set(t,i),i.push(r);const o=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");Mo.set(o,r)}function Jo(t,e){let n=t.args.length,r=t.args.length;const i=t.args[t.args.length-1];if("object"==typeof i&&i.isVararg&&(--n,r=1/0),e.length<n)return{type:"few",expected:n,found:e.length};if(e.length>r)return{type:"many",expected:r,found:e.length};for(let n=0;n<e.length;++n){let r=n>=t.args.length?t.args[t.args.length-1]:t.args[n];if("object"!=typeof r&&(r={type:r}),r.type!==e[n].type)return{type:"mismatch",expected:r.type,found:e[n].type}}return{type:"match"}}function Oo(t,e){var n;switch(null===(n=e[t.type])||void 0===n||n.call(e,t),t.type){case"TemplateLiteral":t.expressions.forEach((t=>{Oo(t,e)}));break;case"BinaryExpression":case"LogicalExpression":Oo(t.left,e),Oo(t.right,e);break;case"UnaryExpression":Oo(t.argument,e);break;case"ConditionalExpression":Oo(t.test,e),Oo(t.consequent,e),Oo(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{Oo(t,e)}))}}function Bo(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function Ro(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function Uo(t){if("string"===t.type)return t.value;if("integer"===t.type)return String(t.value);if("number"===t.type){let e=String(t.value);return e.includes(".")||(e.includes("e")?e=e.replace("e",".0e"):e+=".0"),e=e.replace(/e\+?/i,"E"),e}if("boolean"===t.type)return t.value?"true":"false";if("datetime"===t.type)return Ro(t.value);if("color"===t.type)return Zo(Xo(t.value));if("url"===t.type)return t.value;throw new Error("Unexpected type ".concat(t.type))}function Wo(t){let e=Uo(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\'").replace(/'/g,"\\'")+"'"),e}function Lo(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}const qo=new Int32Array(1);function Ho(t){return qo[0]=t,qo[0]}function Go(t){if(t<Fi||t>2147483647)throw new Error("Integer overflow.")}function Ko(t){const e=[];return Oo(t,{Variable(t){e.push(t.id.name)}}),e}function Yo(t,e){throw new Error("Failed to evaluate [".concat(t,"]. ").concat(e))}function Xo(t){const e=te(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function Zo(t){return"#".concat([t.a,t.r,t.g,t.b].map((t=>{if(t<0||t>255)throw new Error("Value out of range 0..1.");return Xt(Math.round(t).toString(16),2)})).join("").toUpperCase())}function Qo(t){return Zo(Xo(t))}function ta(t,e){return{type:Ti,value:Uo(e)}}function ea(t,e){const n=Number(e.value);if(isNaN(n)||!Number.isFinite(n))throw new Error("Unable to convert value to Number.");return{type:Ni,value:n}}function na(t,e,n,r){const i=t.get(e.value);let o;return o=i&&i.getType()===r?i.getValue():n.value,"color"===r&&(o=Qo(o)),{type:r,value:o}}function ra(t,e,n){return na(t,e,n,n.type)}function ia(t,e,n){return na(t,e,n,"color")}function oa(t,e,n){return na(t,e,n,"url")}const aa=t=>(e,n)=>{let r=new Date(n.value.getTime())[t]();return"getUTCMonth"===t?++r:"getUTCDay"===t&&0===r&&(r=7),{type:Mi,value:r}},la=aa("getUTCFullYear"),sa=aa("getUTCMonth"),ca=aa("getUTCDate"),ua=aa("getUTCDay"),da=aa("getUTCHours"),ha=aa("getUTCMinutes"),pa=aa("getUTCSeconds"),fa=aa("getUTCMilliseconds");function ga(t,e,n){if(!n.value.length)return"";let r="";const i=t.type===Ti?t.value:Uo(t);for(;r.length+i.length<e.value;)r+=n.value;return r.length>0&&r.length+i.length>e.value&&(r=r.substring(0,e.value-i.length)),r}function ma(t,e,n,r){const i=ga(e,n,r);return{type:Ti,value:i+Uo(e)}}function va(t,e,n,r){const i=ga(e,n,r);return{type:Ti,value:Uo(e)+i}}function ya(t,e,n){if(0===n.value)throw new Error("Division by zero is not supported.");let r=e.value/n.value;return e.type===Mi&&(r=Ho(r)),{type:e.type,value:r}}function $a(t,e,n){if(0===n.value)throw new Error("Division by zero is not supported.");let r=e.value%n.value;return e.type===Mi&&(r=Ho(r)),{type:e.type,value:r}}function _a(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];let i=n.length?n[0].value:0;for(let t=1;t<n.length;++t)i*=n[t].value,n[0].type===Mi&&(i=Ho(i));return{type:n[0].type,value:i}}function ba(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];let i=n.length?n[0].value:0;for(let t=1;t<n.length;++t)i-=n[t].value,n[0].type===Mi&&(i=Ho(i));return{type:n.length?n[0].type:Mi,value:i}}function wa(t){let e=0;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(let t=0;t<r.length;++t)e+=r[t].value,r[0].type===Mi&&(e=Ho(e));return{type:r.length?r[0].type:Mi,value:e}}function xa(t,e){const n=Math.abs(e.value);return e.type===Mi&&Go(n),{type:e.type,value:n}}function ka(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!n.length)throw new Error("Non empty argument list is required for function 'max'.");return{type:n[0].type,value:Math.max(...n.map((t=>t.value)))}}function Ea(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!n.length)throw new Error("Non empty argument list is required for function 'min'.");return{type:n[0].type,value:Math.min(...n.map((t=>t.value)))}}function Ca(t,e){return{type:e.type,value:Math.sign(e.value)}}function Aa(t,e,n){let r;if(0===n.value&&e.type===Mi)r=e.value;else if(0===e.value&&e.type===Mi)r=0;else{let t=Math.sign(n.value);e.type===Ni&&0===t&&(t=Object.is(t,0)?1:-1),r=Math.abs(e.value)*t}return e.type===Mi&&Go(r),{type:e.type,value:r}}function Va(t){return(e,n)=>{const r=Xo(n.value);return{type:Ni,value:r[t]/255}}}function ja(t){return(e,n,r)=>{const i=Xo(n.value);return i[t]=255*r.value,{type:Oi,value:Zo(i)}}}const Da=Va("a"),Pa=Va("r"),Sa=Va("g"),Fa=Va("b"),Ia=ja("a"),za=ja("r"),Ta=ja("g"),Ma=ja("b");function Na(t,e,n){if(t.value<0)throw new Error("Expecting non-negative number of milliseconds.");let r=Math.floor(t.value/e);return n&&(r%=n),{type:Mi,value:r}}function Ja(t){return t.map(Wo).join(", ")}No("toString",[Mi],ta),No("toString",[Ni],ta),No("toString",[Ji],ta),No("toString",[Oi],ta),No("toString",["url"],ta),No("toNumber",[Mi],ea),No("toNumber",[Ti],ea),No("toInteger",[Ni],(function(t,e){if(e.value>2147483647||e.value<Fi)throw new Error("Unable to convert value to Integer.");const n=e.value-e.value%1;return{type:Mi,value:n}})),No("toInteger",[Ti],(function(t,e){const n=Number(e.value);if(isNaN(n)||n%1!=0||n>2147483647||n<Fi)throw new Error("Unable to convert value to Integer.");return{type:Mi,value:n}})),No("toInteger",[Ji],(function(t,e){return{type:Mi,value:e.value?1:0}})),No("toBoolean",[Mi],(function(t,e){if(1!==e.value&&0!==e.value)throw new Error("Unable to convert value to Boolean.");return{type:Ji,value:e.value}})),No("toBoolean",[Ti],(function(t,e){if("true"!==e.value&&"false"!==e.value)throw new Error("Unable to convert value to Boolean.");return{type:Ji,value:"true"===e.value?1:0}})),No("toColor",[Ti],(function(t,e){return{type:Oi,value:Qo(e.value)}})),No("toUrl",[Ti],(function(t,e){return{type:"url",value:e.value}})),No("encodeUri",[Ti],(function(t,e){try{return{type:Ti,value:encodeURIComponent(e.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),No("decodeUri",[Ti],(function(t,e){try{return{type:Ti,value:decodeURIComponent(e.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),No("getIntegerValue",[Ti,Mi],ra),No("getNumberValue",[Ti,Ni],ra),No("getBooleanValue",[Ti,Ji],ra),No("getStringValue",[Ti,Ti],ra),No("getColorValue",[Ti,Oi],ia),No("getColorValue",[Ti,Ti],ia),No("getUrlValue",[Ti,"url"],oa),No("getUrlValue",[Ti,Ti],oa),No("parseUnixTime",[Mi],(function(t,e){return{type:Bi,value:new Date(1e3*e.value)}})),No("nowLocal",[],(function(){return{type:Bi,value:new Date}})),No("addMillis",[Bi,Mi],(function(t,e,n){return{type:Bi,value:new Date(e.value.getTime()+n.value)}})),No("setYear",[Bi,Mi],(function(t,e,n){const r=new Date(e.value);return r.setUTCFullYear(n.value),{type:Bi,value:r}})),No("setMonth",[Bi,Mi],(function(t,e,n){if(n.value<1||n.value>12)throw new Error("Expecting month in [1..12], instead got ".concat(n.value,"."));const r=new Date(e.value);return r.setUTCMonth(n.value-1),{type:Bi,value:r}})),No("setDay",[Bi,Mi],(function(t,e,n){const r=new Date(e.value);if(n.value<=0&&-1!==n.value||n.value>function(t){const e=new Date(t);return e.setUTCMonth(e.getUTCMonth()+1),e.setUTCDate(0),e.getUTCDate()}(r))throw new Error("Unable to set day ".concat(n.value," for date ").concat(Uo(e),"."));return r.setUTCDate(-1===n.value?0:n.value),{type:Bi,value:r}})),No("setHours",[Bi,Mi],(function(t,e,n){if(n.value<0||n.value>23)throw new Error("Expecting hours in [0..23], instead got ".concat(n.value,"."));const r=new Date(e.value);return r.setUTCHours(n.value),{type:Bi,value:r}})),No("setMinutes",[Bi,Mi],(function(t,e,n){if(n.value<0||n.value>59)throw new Error("Expecting minutes in [0..59], instead got ".concat(n.value,"."));const r=new Date(e.value);return r.setUTCMinutes(n.value),{type:Bi,value:r}})),No("setSeconds",[Bi,Mi],(function(t,e,n){if(n.value<0||n.value>59)throw new Error("Expecting seconds in [0..59], instead got ".concat(n.value,"."));const r=new Date(e.value);return r.setUTCSeconds(n.value),{type:Bi,value:r}})),No("setMillis",[Bi,Mi],(function(t,e,n){if(n.value<0||n.value>999)throw new Error("Expecting millis in [0..999], instead got ".concat(n.value,"."));const r=new Date(e.value);return r.setUTCMilliseconds(n.value),{type:Bi,value:r}})),No("getYear",[Bi],la),No("getMonth",[Bi],sa),No("getDay",[Bi],ca),No("getDayOfWeek",[Bi],ua),No("getHours",[Bi],da),No("getMinutes",[Bi],ha),No("getSeconds",[Bi],pa),No("getMillis",[Bi],fa),No("getIntervalSeconds",[Mi],(function(t,e){return Na(e,1e3,60)})),No("getIntervalTotalSeconds",[Mi],(function(t,e){return Na(e,1e3)})),No("getIntervalMinutes",[Mi],(function(t,e){return Na(e,6e4,60)})),No("getIntervalTotalMinutes",[Mi],(function(t,e){return Na(e,6e4)})),No("getIntervalHours",[Mi],(function(t,e){return Na(e,36e5,24)})),No("getIntervalTotalHours",[Mi],(function(t,e){return Na(e,36e5)})),No("getIntervalTotalDays",[Mi],(function(t,e){return Na(e,864e5)})),No("getIntervalTotalWeeks",[Mi],(function(t,e){return Na(e,6048e5)})),No("len",[Ti],(function(t,e){return{type:Mi,value:e.value.length}})),No("contains",[Ti,Ti],(function(t,e,n){return{type:Ji,value:e.value.includes(n.value)?1:0}})),No("substring",[Ti,Mi,Mi],(function(t,e,n,r){if(r.value<n.value)throw new Error("Indexes should be in ascending order.");if(n.value<0||n.value>e.value.length||r.value<0||r.value>e.value.length)throw new Error("Indexes are out of bounds.");return{type:Ti,value:e.value.substring(n.value,r.value)}})),No("replaceAll",[Ti,Ti,Ti],(function(t,e,n,r){let i;return i=n.value?e.value.replace(new RegExp(function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(n.value),"g"),r.value):e.value,{type:Ti,value:i}})),No("index",[Ti,Ti],(function(t,e,n){return{type:Mi,value:e.value.indexOf(n.value)}})),No("lastIndex",[Ti,Ti],(function(t,e,n){return{type:Mi,value:e.value.lastIndexOf(n.value)}})),No("trim",[Ti],(function(t,e){return{type:Ti,value:e.value.trim()}})),No("trimLeft",[Ti],(function(t,e){return{type:Ti,value:e.value.replace(/^\s+/,"")}})),No("trimRight",[Ti],(function(t,e){return{type:Ti,value:e.value.replace(/\s+$/,"")}})),No("toUpperCase",[Ti],(function(t,e){return{type:Ti,value:e.value.toUpperCase()}})),No("toLowerCase",[Ti],(function(t,e){return{type:Ti,value:e.value.toLowerCase()}})),No("padStart",[Ti,Mi,Ti],ma),No("padStart",[Mi,Mi,Ti],ma),No("padEnd",[Ti,Mi,Ti],va),No("padEnd",[Mi,Mi,Ti],va),No("div",[Mi,Mi],ya),No("div",[Ni,Ni],ya),No("mod",[Mi,Mi],$a),No("mod",[Ni,Ni],$a),No("mul",[{type:Mi,isVararg:!0}],_a),No("mul",[{type:Ni,isVararg:!0}],_a),No("sub",[{type:Mi,isVararg:!0}],ba),No("sub",[{type:Ni,isVararg:!0}],ba),No("sum",[{type:Mi,isVararg:!0}],wa),No("sum",[{type:Ni,isVararg:!0}],wa),No("abs",[Mi],xa),No("abs",[Ni],xa),No("max",[{type:Mi,isVararg:!0}],ka),No("max",[{type:Ni,isVararg:!0}],ka),No("min",[{type:Mi,isVararg:!0}],Ea),No("min",[{type:Ni,isVararg:!0}],Ea),No("maxNumber",[],(function(){return{type:Ni,value:Ii}})),No("minNumber",[],(function(){return{type:Ni,value:zi}})),No("maxInteger",[],(function(){return{type:Mi,value:2147483647}})),No("minInteger",[],(function(){return{type:Mi,value:Fi}})),No("round",[Ni],(function(t,e){const n=Math.sign(e.value);return{type:Ni,value:n*Math.round(Math.abs(e.value))}})),No("floor",[Ni],(function(t,e){return{type:Ni,value:Math.floor(e.value)}})),No("ceil",[Ni],(function(t,e){return{type:Ni,value:Math.ceil(e.value)}})),No("signum",[Ni],Ca),No("signum",[Mi],Ca),No("copySign",[Ni,Ni],Aa),No("copySign",[Mi,Mi],Aa),No("getColorAlpha",[Ti],Da),No("getColorAlpha",[Oi],Da),No("getColorRed",[Ti],Pa),No("getColorRed",[Oi],Pa),No("getColorGreen",[Ti],Sa),No("getColorGreen",[Oi],Sa),No("getColorBlue",[Ti],Fa),No("getColorBlue",[Oi],Fa),No("setColorAlpha",[Ti,Ni],Ia),No("setColorAlpha",[Oi,Ni],Ia),No("setColorRed",[Ti,Ni],za),No("setColorRed",[Oi,Ni],za),No("setColorGreen",[Ti,Ni],Ta),No("setColorGreen",[Oi,Ni],Ta),No("setColorBlue",[Ti,Ni],Ma),No("setColorBlue",[Oi,Ni],Ma),No("rgb",[Ni,Ni,Ni],(function(t,e,n,r){const i={a:255,r:255*e.value,g:255*n.value,b:255*r.value};return{type:Oi,value:Zo(i)}})),No("argb",[Ni,Ni,Ni,Ni],(function(t,e,n,r,i){const o={a:255*e.value,r:255*n.value,g:255*r.value,b:255*i.value};return{type:Oi,value:Zo(o)}}));const Oa={StringLiteral:function(t,e){return{type:Ti,value:e.value}},NumberLiteral:function(t,e){return{type:Ni,value:e.value}},IntegerLiteral:function(t,e){return{type:Mi,value:e.value}},BooleanLiteral:function(t,e){return{type:Ji,value:e.value?1:0}},UnaryExpression:function(t,e){const n=Bo(Ba(t,e.argument));switch(e.operator){case"!":if(n.type===Ji)return{type:Ji,value:n.value?0:1};Yo("".concat(e.operator).concat(Wo(n)),"A Boolean is expected after a unary not.");case"+":case"-":const t="+"===e.operator?1:-1;if(n.type===Mi)return{type:Mi,value:n.value*t};if(n.type===Ni)return{type:Ni,value:n.value*t};Yo("".concat(e.operator).concat(Wo(n)),"A Number is expected after a unary ".concat("+"===e.operator?"plus":"minus","."))}},ConditionalExpression:function(t,e){const n=Bo(Ba(t,e.test));if(n.type===Ji)return n.value?Ba(t,e.consequent):Ba(t,e.alternate);Yo("".concat(Wo(n)," ? ").concat(Wo(Ba(t,e.consequent))," : ").concat(Wo(Ba(t,e.alternate))),"Ternary must be called with a Boolean value as a condition.")},TemplateLiteral:function(t,e){let n="";if(2===e.quasis.length&&""===e.quasis[0].value&&""===e.quasis[1].value)return Ba(t,e.expressions[0]);for(let r=0;r<e.expressions.length;++r)n+=e.quasis[r].value,n+=Uo(Ba(t,e.expressions[r]));return n+=e.quasis[e.quasis.length-1].value,{type:Ti,value:n}},LogicalExpression:function(t,e){const n=Bo(Ba(t,e.left));if(n.type!==Ji&&Yo("".concat(Wo(n)," ").concat(e.operator," ..."),"'".concat(e.operator,"' must be called with boolean operands.")),"||"===e.operator&&n.value)return n;if("&&"===e.operator&&!n.value)return{type:Ji,value:0};const r=Bo(Ba(t,e.right));return r.type!==Ji&&Yo("".concat(Wo(n)," ").concat(e.operator," ").concat(Wo(r)),"Operator '".concat(e.operator,"' cannot be applied to different types: Boolean and ").concat(Lo(r.type),".")),{type:Ji,value:r.value}},BinaryExpression:function(t,e){const n=e.operator,r=Ba(t,e.left),i=Ba(t,e.right);if(r.type!==i.type&&Yo("".concat(Wo(r)," ").concat(e.operator," ").concat(Wo(i)),"Operator '".concat(n,"' cannot be applied to different types: ").concat(Lo(r.type)," and ").concat(Lo(i.type),".")),"=="===n||"!="===n)return function(t,e,n){let r;return r=e.type===Bi&&n.type===Bi?e.value.getTime()===n.value.getTime():e.value===n.value,"!="===t&&(r=!r),{type:Ji,value:r?1:0}}(n,r,i);if(">"===n||">="===n||"<"===n||"<="===n)return function(t,e,n){let r;e.type!==Ni&&e.type!==Mi&&e.type!==Bi&&Yo("".concat(Wo(e)," ").concat(t," ").concat(Wo(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Lo(e.type)," type."));const i=e.type===Bi?e.value.getTime():e.value,o=n.type===Bi?n.value.getTime():n.value;return r=">"===t?i>o:">="===t?i>=o:"<"===t?i<o:i<=o,{type:Ji,value:r?1:0}}(n,r,i);if("+"===n||"-"===n)return function(t,e,n){if(e.type!==Ti&&e.type!==Ni&&e.type!==Mi&&Yo("".concat(Wo(e)," ").concat(t," ").concat(Wo(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Lo(e.type)," type.")),e.type===Ti)return"-"===t&&Yo("".concat(Wo(e)," - ").concat(Wo(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Lo(e.type)," type.")),{type:Ti,value:e.value+n.value};let r="+"===t?e.value+n.value:e.value-n.value;return e.type===Mi&&(r=Ho(r)),{type:e.type,value:r}}(n,r,i);if("/"===n||"*"===n||"%"===n)return function(t,e,n){let r;if(e.type!==Mi&&e.type!==Ni&&Yo("".concat(Wo(e)," ").concat(t," ").concat(Wo(n)),"Operator '".concat(t,"' cannot be applied to ").concat(Lo(e.type)," type.")),"*"===t)r=e.value*n.value;else{if("/"!==t&&"%"!==t)throw new Error("Unsupported operation ".concat(t));0===n.value&&Yo("".concat(Wo(e)," ").concat(t," ").concat(Wo(n)),"Division by zero is not supported."),r="/"===t?e.value/n.value:e.value%n.value}return e.type===Mi&&(r=Ho(r)),{type:e.type,value:r}}(n,r,i);throw new Error("Unsupported operation ".concat(n))},CallExpression:function(t,e){const n=e.callee.name;let r;const i=e.arguments.map((e=>Ba(t,e))),o=n+":"+i.map((t=>t.type)).join("#");if(Mo.has(o))r=Mo.get(o);else{const t=function(t,e){const n=To.get(t);if(!n)return{type:"missing"};let r=null;for(let t=0;t<n.length;++t){const i=Jo(n[t],e);if("match"===i.type)return n[t];r||(r=i)}if(!r)throw new Error("Missing function");return r}(n,i);if("expected"in t||"type"in t&&"missing"===t.type){const e=i.map((t=>Lo(t.type))).join(", "),r="".concat(n,"(").concat(Ja(i),")");"few"===t.type&&0===i.length?Yo(r,"Non empty argument list is required for function '".concat(n,"'.")):"many"===t.type||"few"===t.type||"mismatch"===t.type?Yo(r,"Function '".concat(n,"' has no matching override for given argument types: ").concat(e,".")):Yo(r,"Unknown function name: ".concat(n,"."))}r=t}if(!r)throw new Error("Function not found");try{return r.cb(t,...i)}catch(t){Yo("".concat(n,"(").concat(Ja(i),")"),t.message)}},Variable:function(t,e){const n=e.id.name,r=t.get(n);if(r)return function(t){return{type:t.getType(),value:t.getValue()}}(r);throw new Error("Variable '".concat(n,"' is missing."))}};function Ba(t,e){if(e.type in Oa)return Oa[e.type](t,e);throw new Error("Unsupported expression")}function Ra(t,e){try{return function(t,e){let n="";if(Oo(e,{Variable(e){n||t.has(e.id.name)||(n=e.id.name)}}),n)throw new Error("Variable '".concat(n,"' is missing."))}(t,e),Ba(t,e)}catch(t){return{type:"error",value:t.message}}}class Ua{constructor(t){this.ast=t}apply(t,e){if(!function(t,e){let n=!1;return Oo(t,{Variable(t){e.has(t.id.name)||(n=!0)}}),n}(this.ast,t))try{const n=Ra(t,this.ast);if("error"===n.type)return void e(Lt(new Error("Expression execution error"),{additional:{message:n.value}}));const r=n.value;if(r instanceof Date)return Ro(r);if("boolean"===n.type)return Boolean(r);if("color"===n.type){const t=te(String(r));if(t)return Zo(t);e(Lt(new Error("Expression execution error")))}return r}catch(t){return void e(Lt(new Error("Expression execution error")))}}}function Wa(t,e,n){if(t)if("string"==typeof t){if((r=t).indexOf("@{")>-1||r.indexOf("\\")>-1){e.hasExpression=!0;try{const n=zo(t,{startRule:"JsonStringContents"}),r=Ko(n);return e.vars.push(...r),new Ua(n)}catch(e){return void n(Lt(new Error("Unable to parse expression"),{additional:{expression:t}}))}}}else{if(Array.isArray(t))return t.map((t=>Wa(t,e,n)));if("object"==typeof t){const r={};for(const i in t)r[i]=Wa(t[i],e,n);return r}}var r;return t}function La(t,e,n){if(t){if(t instanceof Ua)return t.apply(e,n);if(Array.isArray(t))return t.map((t=>La(t,e,n)));if("object"==typeof t){const r={};for(const i in t)r[i]=La(t[i],e,n);return r}}return t}function qa(t,e){const n={vars:[],hasExpression:!1},r=Wa(t,n,e);return{vars:[...new Set(n.vars)],hasExpression:n.hasExpression,applyVars:t=>La(r,t,e)}}const Ha={pagers:function(){return Rt(new Map)}},Ga=new Map,Ka=new Map;function Ya(t){const e=Ga.get(t)||Rt("");return Ga.has(t)||Ga.set(t,e),e}function Xa(t){const e=Ka.get(t)||new Map;return Ka.has(t)||Ka.set(t,e),e}class Za{setVariable(t){const e=t.getName(),n=Xa(this);if(n.has(e))throw new Error("Variable with the same name already exist");n.set(e,t),Ya(this).set(e)}getVariable(t){return Xa(this).get(t)}}function Qa(){return new Za}function tl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const el=new Set(["start","stop","pause","resume","cancel","reset"]);class nl{constructor(t){tl(this,"timers",new Map),tl(this,"awaitActions",[]),this.logError=t.logError,this.applyVars=t.applyVars,this.hasVariableWithType=t.hasVariableWithType,this.setVariableValue=t.setVariableValue,this.execAnyActions=t.execAnyActions,this.visibilityHandler=()=>{"visible"===document.visibilityState?(this.awaitActions.forEach((t=>{let{id:e,action:n}=t;this.execTimerAction(e,n)})),this.awaitActions=[],this.unholdAll()):this.holdAll()},document.addEventListener("visibilitychange",this.visibilityHandler)}destroy(){document.removeEventListener("visibilitychange",this.visibilityHandler);for(const[t,e]of this.timers)this.stopTimerTimeouts(e)}createTimer(t){null!=t&&t.id?t.duration||t.tick_interval&&(t.value_variable||t.tick_actions)?this.timers.set(t.id,{state:"stopped",definition:t}):this.logError(Lt(new Error("Misconfigured timer"),{additional:{id:t.id}})):this.logError(Lt(new Error("Missing timer id")))}execTimerAction(t,e){if(!(t&&e&&this.timers.has(t)&&el.has(e)))return void this.logError(Lt(new Error("Incorrect timer action"),{additional:{id:t,action:e}}));const n=e;if("visible"!==document.visibilityState)return void this.awaitActions.push({id:t,action:n});const r=this.timers.get(t);this[n](r)}stopTimerTimeouts(t){t.durationTimeout&&(clearTimeout(t.durationTimeout),t.durationTimeout=void 0),t.tickTimeout&&(clearTimeout(t.tickTimeout),t.tickTimeout=void 0)}tickOrUnholdAction(t){const e=performance.now(),n=(t.durationPassed||0)+e-(t.durationStarted||0);t.duration&&n>t.duration||(this.updateVariable(t,n),this.callActions(t,"tick"),void 0!==t.tickCount&&++t.tickCount)}startOrResume(t){t.state="running",t.hold=!1,t.durationStarted=performance.now();const e=t.duration;e&&(t.durationTimeout=window.setTimeout((()=>{this.updateVariable(t,e),t.tickCountPredict&&void 0!==t.tickCount&&t.tickCount<t.tickCountPredict&&this.callActions(t,"tick"),this.stop(t)}),Math.max(0,e-(t.durationPassed||0))));const n=t.tick;if(n){const e=()=>{const r=t.tickStarted=performance.now(),i=Math.max(0,n-(t.tickPassed||0));t.tickTimeout=window.setTimeout((()=>{this.tickOrUnholdAction(t),t.tickPassed=(performance.now()-r-i)%n,e()}),i)};e()}}start(t){if("running"===t.state)return void this.logError(Lt(new Error("The timer is already running")));if("paused"===t.state)return void this.logError(Lt(new Error("The timer is paused")));const e=t.definition.value_variable;!e||this.hasVariableWithType(e,"integer")?(e&&this.setVariableValue(e,0),t.definition.duration&&(t.duration=this.applyVars(t.definition.duration)),t.definition.tick_interval&&(t.tick=this.applyVars(t.definition.tick_interval)),void 0!==t.duration&&t.duration<0||void 0!==t.tick&&t.tick<=0?this.logError(Lt(new Error("Incorrect timer properties"),{additional:{id:t.definition.id}})):(void 0!==t.duration&&void 0!==t.tick&&(t.tickCount=0,t.tickCountPredict=Math.floor(t.duration/t.tick)),this.startOrResume(t))):this.logError(Lt(new Error("Cannot find variable"),{additional:{name:e}}))}stop(t){"stopped"!==t.state?(t.state="stopped",t.durationPassed=0,t.tickPassed=0,this.stopTimerTimeouts(t),this.callActions(t,"end")):this.logError(Lt(new Error("The timer has already been stopped")))}pause(t){if("stopped"===t.state)return void this.logError(Lt(new Error("The timer has already been stopped")));if("paused"===t.state)return void this.logError(Lt(new Error("The timer has already been paused")));t.state="paused",this.stopTimerTimeouts(t);const e=performance.now();t.durationStarted&&(t.durationPassed=(t.durationPassed||0)+e-t.durationStarted),t.tickStarted&&(t.tickPassed=(t.tickPassed||0)+e-t.tickStarted);const n=t.definition.value_variable;n&&t.durationPassed&&this.setVariableValue(n,Math.round(t.durationPassed))}resume(t){"stopped"!==t.state?"running"!==t.state?this.startOrResume(t):this.logError(Lt(new Error("The timer is already running"))):this.logError(Lt(new Error("The timer has already been stopped")))}cancel(t){"stopped"!==t.state&&(t.state="stopped",t.durationPassed=0,t.tickPassed=0,this.stopTimerTimeouts(t))}reset(t){this.cancel(t),this.start(t)}updateVariable(t,e){const n=t.definition.value_variable;n&&this.setVariableValue(n,Math.round(e))}callActions(t,e){const n=t.definition["end"===e?"end_actions":"tick_actions"];if(n){const t=this.applyVars(n);this.execAnyActions(t,!1)}}holdAll(){for(const[t,e]of this.timers)"running"===e.state&&(e.hold=!0,this.stopTimerTimeouts(e))}unholdAll(){for(const[t,e]of this.timers)if("running"===e.state&&e.hold){const t=performance.now();e.durationStarted&&(e.durationPassed=(e.durationPassed||0)+t-e.durationStarted),e.tickStarted&&(e.tickPassed=(e.tickPassed||0)+t-e.tickStarted),e.tick&&this.tickOrUnholdAction(e),this.startOrResume(e)}}}function rl(t){let e,n,r,i,o,a,l,s;return n=new ko({props:{svgFiltersMap:t[2]}}),i=new go({props:{div:t[6],templateContext:t[5]}}),{c(){e=I("div"),zt(n.$$.fragment),r=M(),zt(i.$$.fragment),this.h()},l(t){e=L(t,"DIV",{class:!0});var o=R(e);Tt(n.$$.fragment,o),r=G(o),Tt(i.$$.fragment,o),o.forEach(S),this.h()},h(){O(e,"class",o="divkit-b023c"+(t[3]?" ".concat("divkit-ee112"):"")+(t[0]?" ".concat(t[0]):""))},m(t,o){P(t,e,o),Mt(n,e,null),D(e,r),Mt(i,e,null),a=!0,l||(s=J(e,"touchstart",ol,{passive:!0}),l=!0)},p(t,r){const i={};4&r[0]&&(i.svgFiltersMap=t[2]),n.$set(i),(!a||9&r[0]&&o!==(o="divkit-b023c"+(t[3]?" ".concat("divkit-ee112"):"")+(t[0]?" ".concat(t[0]):"")))&&O(e,"class",o)},i(t){a||(At(n.$$.fragment,t),At(i.$$.fragment,t),a=!0)},o(t){Vt(n.$$.fragment,t),Vt(i.$$.fragment,t),a=!1},d(t){t&&S(e),Nt(n),Nt(i),l=!1,s()}}}function il(t){let e,n,r=!t[1]&&t[6]&&rl(t);return{c(){r&&r.c(),e=N()},l(t){r&&r.l(t),e=N()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){!t[1]&&t[6]?r?(r.p(t,n),2&n[0]&&At(r,1)):(r=rl(t),r.c(),At(r,1),r.m(e.parentNode,e)):r&&(Et(),Vt(r,1,1,(()=>{r=null})),Ct())},i(t){n||(At(r),n=!0)},o(t){Vt(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function ol(){}function al(t,e,n){let r;var i,o,a,l;let{id:s}=e,{json:c={}}=e,{platform:u="auto"}=e,{theme:d="system"}=e,{globalVariablesController:h=new Za}=e,{mix:p=""}=e,{customization:g={}}=e,{builtinProtocols:m=["http","https","tel","mailto","intent"]}=e,{onError:v}=e,{onStat:y}=e,{onCustomAction:$}=e,{onComponent:_}=e,b=Rt("desktop"===u);if(f(t,b,(t=>n(3,r=t))),"auto"===u&&"undefined"!=typeof matchMedia){const t=matchMedia("(any-pointer: coarse)");b.set(!t.matches),t.addListener((()=>{b.set(!t.matches)}))}let w="light",x=null;function k(){"system"===d&&x&&n(23,w=x.matches?"dark":"light")}const E=new Set(m);let C=!1;c||(C=!0,M(Lt(new Error('"json" prop is required')))),s||(C=!0,M(Lt(new Error('"id" prop is required'))));let A=function(t){if(!t)return Lt(new Error("Missing object"));const e=t.card,n=t.templates||{};if(!e)return Lt(new Error("Missing card"));if(!e.states||!e.states.length)return Lt(new Error("Missing states"));for(const t in n)if(n.hasOwnProperty(t)&&t in uo)return Lt(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t){if(!e.states[t].div)return Lt(new Error("Missing state div"),{additional:{stateId:e.states[t].state_id}});if("number"!=typeof e.states[t].state_id)return Lt(new Error("Missing state_id"),{additional:{index:t}})}return null}(c);const V=c.templates||{};A&&(C=!0,M(A));const j={stateChange:!1},D=Ya(h),P=Xa(h),S=new Map,F=new Map,I=new Map;let z=null;function T(t){const e=qa(t,M);return e.vars.length?e.applyVars(F):t}function M(t){v?v({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}function N(t,e){y&&y({type:t,action:e})}let J=0;function O(t){return"".concat(s,"-").concat(J++)}let B={},R={};function U(t){const e=t.url?String(t.url):"";if(e)try{const t=e.replace(/div-action:\/\//,""),n=/([^?]+)\?(.+)/.exec(t);if(!n)return;const r=new URLSearchParams(n[2]);switch(n[1]){case"set_state":!function(t){if(!t)throw new Error("Missing state id");let e=Y,n=t.split("/");if(n=["root",...n],n.length<2||n.length%2!=0)throw new Error("Incorrect state id format");for(let t=0;t<n.length;t+=2){const r=n[t],i=n[t+1];let o=e.getChild(r);if(!o)return;o.setState(i),e=o}}(r.get("state_id"));break;case"set_current_item":!function(t,e){if(!t||!e)throw new Error('Missing data for "set-current-item" action');if(isNaN(Number(e)))throw new Error('Incorrect item for "set-current-item" action');const n=H(t);n&&n.setCurrentItem(Number(e))}(r.get("id"),r.get("item"));break;case"set_previous_item":!function(t,e){if(!t)throw new Error('Missing id for "set-previous-item" action');if(e&&"clamp"!==e&&"ring"!==e)throw new Error('Incorrect overflow value for "set-previous-item" action');e=e||"clamp";const n=H(t);n&&n.setPreviousItem(e)}(r.get("id"),r.get("overflow"));break;case"set_next_item":!function(t,e){if(!t)throw new Error('Missing id for "set-next-item" action');if(e&&"clamp"!==e&&"ring"!==e)throw new Error('Incorrect overflow value for "set-next-item" action');e=e||"clamp";const n=H(t);n&&n.setNextItem(e)}(r.get("id"),r.get("overflow"));break;case"set_variable":const n=r.get("name"),i=r.get("value");if(n&&null!==i){const t=F.get(n);t?t.set(i):M(Lt(new Error("Cannot find variable"),{additional:{name:n}}))}else M(Lt(new Error("Incorrect set_variable_action"),{additional:{url:t}}));break;case"timer":const o=r.get("action"),a=r.get("id");z?z.execTimerAction(a,o):M(Lt(new Error("Incorrect timer action"),{additional:{id:a,action:o}}));break;default:M(Lt(new Error("Unknown type of action"),{additional:{url:e}}))}}catch(t){M(Lt(t,{additional:{url:e}}))}}async function W(t,e){if(t){for(let n=0;n<t.length;++n){let r=t[n];const i=r.url;if(i){const t=se(i);if(t)if(ce(t,E)){if(e)if("_blank"===r.target){const t=window.open("","_blank");t&&(t.opener=null,t.location=i)}else location.href=i}else"div-action"===t?(U(r),await gt()):r.log_id&&(L(r),await gt())}}t.forEach((t=>{t.log_id&&N("click",t)}))}}function L(t){null==$||$(t)}const q=new Map;function H(t){if(q.has(t))return q.get(t);M(Lt(new Error("Missing instance with id"),{additional:{id:t}}))}const G=new Map;function K(t){for(const e of t)F.has(e)&&t.delete(e);return t}ot(Wt,{logError:M,logStat:N,hasTemplate:function(t){return t in V},processTemplate:function(t,e){if(!t)return{json:t,templateContext:e};const n=new Set([t.type]);for(;t.type in V;){if(({json:t,templateContext:e}=Eo(t,e,V,M)),n.has(t.type))return{json:t,templateContext:e};n.add(t.type)}return{json:t,templateContext:e}},genId:O,genClass:function(t){return"divkit-".concat(O())},execAction:U,execAnyActions:W,execCustomAction:L,isRunning:function(t){return j[t]},setRunning:function(t,e){j[t]=e},registerInstance:function(t,e){q.has(t)?M(Lt(new Error("Duplicate instance id"),{additional:{id:t}})):q.set(t,e)},unregisterInstance:function(t){q.delete(t)},addSvgFilter:function(t,e){const r="".concat(t,":").concat(e);if(R[r]=R[r]||0,++R[r],B[r])return B[r];const i="".concat(O(),"-svg-filter");return n(2,B=Object.assign(Object.assign({},B),{[r]:i})),i},removeSvgFilter:function(t,e){if(!t)return;const r="".concat(t,":").concat(e);R[r]&&0==--R[r]&&n(2,B=Object.keys(B).reduce(((t,e)=>(R[e]&&(t[e]=B[e]),t)),{}))},getDerivedFromVars:function(t){if(!t)return Ao(t);const e=qa(t,M);return e.vars.length?Ut(e.vars.map((t=>F.get(t)||function(t){const e=I.get(t)||Rt(void 0);return I.has(t)||I.set(t,e),e}(t))).filter(ne),(()=>e.applyVars(F))):e.hasExpression?Ao(e.applyVars(F)):Ao(t)},getJsonWithVars:T,getStore:function(t){return G.has(t)||function(t){G.has(t)||G.set(t,Ha[t]())}(t),G.get(t)},getVariable:function(t,e){const n=F.get(t);if(n){const r=n.getType();if(r!==e)return void M(Lt(new Error('Variable should have type "'.concat(e,'"')),{additional:{name:t,foundType:r}}))}return n},getCustomization:function(t){return null==g?void 0:g[t]},getBuiltinProtocols:function(){return E},isDesktop:b,registerComponent:void 0,unregisterComponent:void 0}),ot(Ae,{hasAction:()=>!1});const Y={setState(t){throw new Error("Not implemented")},getChild(t){if(X&&X.has(t))return X.get(t);M(Lt(new Error("Missing state block with id"),{additional:{id:t}}))}};let X=null;ot(he,{registerInstance(t,e){X||(X=new Map),X.has(t)?M(Lt(new Error("Duplicate state with id"),{additional:{id:t}})):X.set(t,e)},unregisterInstance(t){null==X||X.delete(t)},runVisibilityTransition:(t,e,n,r,i)=>Promise.resolve(),registerChildWithTransitionIn:(t,e,n,r)=>Promise.resolve(),registerChildWithTransitionOut:(t,e,n,r)=>Promise.resolve(),registerChildWithTransitionChange:(t,e,n,r)=>Promise.resolve(),hasTransitionChange:t=>!1,registerChild(t){},unregisterChild(t){}});const Z=null===(i=null==c?void 0:c.card)||void 0===i?void 0:i.variables;Array.isArray(Z)&&Z.forEach((t=>{if(t&&t.type in Ui&&t.name){if(S.has(t.name))return void M(Lt(new Error("Duplicate variable"),{additional:{name:t.name}}));try{const e=Wi(t.name,t.type,t.value);S.set(t.name,e),F.set(t.name,e)}catch(e){M(Lt(e,{additional:{name:t.name}}))}}}));const Q=c.palette;Q&&Q[w].forEach((t=>{if(S.has(t.name))M(Lt(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=Wi(t.name,"color",t.color);S.set(t.name,e),F.set(t.name,e)}catch(e){M(Lt(e,{additional:{name:t.name}}))}}));for(const[t,e]of P)F.has(t)||F.set(t,e);D.subscribe((t=>{if(t&&!F.has(t)){const e=P.get(t);F.set(t,e);const n=I.get(t);if(n){let t=0;e.subscribe((()=>{n.set(++t)}))}}}));const tt=null===(o=null==c?void 0:c.card)||void 0===o?void 0:o.variable_triggers;Array.isArray(tt)&&tt.forEach((t=>{let e=!1;if("string"!=typeof t.condition)return void M(Lt(new Error("variable_trigger has a condition that is not a string"),{additional:{condition:t.condition}}));const n=t.mode||"on_condition";if("on_variable"===n||"on_condition"===n)try{const r=zo(t.condition,{startRule:"JsonStringContents"}),i=Ko(r);if(!i.length)return void M(Lt(new Error("variable_trigger must have variables in the condition"),{additional:{condition:t.condition}}));(function(t){const e=new Set(t);return K(e),e.size?new Promise((t=>{const n=D.subscribe((()=>{K(e),e.size||(n(),t())}))})):Promise.resolve()})(i).then((()=>{Ut(i.map((t=>F.get(t))).filter(ne),(()=>Ra(F,r))).subscribe((r=>{"error"!==r.type?(r.value&&("on_variable"===n||"on_condition"===n&&!1===e)&&t.actions.forEach((t=>{const e=T(t);e.log_id&&U(e)})),e=Boolean(r.value)):M(Lt(new Error("variable_trigger condition execution error"),{additional:{message:r.value}}))}))}))}catch(e){M(Lt(new Error("Unable to parse variable_trigger"),{additional:{condition:t.condition}}))}else M(Lt(new Error("variable_trigger has an unsupported mode"),{additional:{mode:n}}))}));const et=null===(a=null==c?void 0:c.card)||void 0===a?void 0:a.timers;if(et){const t=z=new nl({logError:M,applyVars:T,hasVariableWithType:function(t,e){const n=F.get(t);return(null==n?void 0:n.getType())===e},setVariableValue:function(t,e){const n=F.get(t);n?n.setValue(e):M(Lt(new Error("Cannot find variable"),{additional:{name:t}}))},execAnyActions:W});et.forEach((e=>t.createTimer(e)))}const nt=null===(l=null==c?void 0:c.card)||void 0===l?void 0:l.states,rt=nt&&!C?{type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:nt.map((t=>({state_id:t.state_id.toString(),div:t.div})))}:void 0;return it((()=>{z&&z.destroy()})),t.$$set=t=>{"id"in t&&n(8,s=t.id),"json"in t&&n(9,c=t.json),"platform"in t&&n(10,u=t.platform),"theme"in t&&n(7,d=t.theme),"globalVariablesController"in t&&n(11,h=t.globalVariablesController),"mix"in t&&n(0,p=t.mix),"customization"in t&&n(12,g=t.customization),"builtinProtocols"in t&&n(13,m=t.builtinProtocols),"onError"in t&&n(14,v=t.onError),"onStat"in t&&n(15,y=t.onStat),"onCustomAction"in t&&n(16,$=t.onCustomAction),"onComponent"in t&&n(17,_=t.onComponent)},t.$$.update=()=>{16777344&t.$$.dirty[0]&&("light"===d||"dark"===d?n(23,w=d):"system"===d?"undefined"!=typeof matchMedia?(x||(n(24,x=matchMedia("(prefers-color-scheme: dark)")),x.addListener(k)),n(23,w=x.matches?"dark":"light")):n(23,w="light"):M(Lt(new Error("Unsupported theme")))),8388608&t.$$.dirty[0]&&w&&Q&&Q[w].forEach((t=>{const e=F.get(t.name);e&&e.setValue(t.color)}))},[p,C,B,r,b,{},rt,d,s,c,u,h,g,m,v,y,$,_,function(t){n(7,d=t)},function(){},function(t,e){if("string"==typeof e||"number"==typeof e||"boolean"==typeof e){const n=F.get(t);n&&n.setValue(e)}},function(t){const e=F.get(t);return null==e?void 0:e.getValue()},U,w,x]}const ll=class extends Ot{constructor(t){super(),Jt(this,t,al,il,d,{id:8,json:9,platform:10,theme:7,globalVariablesController:11,mix:0,customization:12,builtinProtocols:13,onError:14,onStat:15,onCustomAction:16,onComponent:17,setTheme:18,getDebugVariables:19,setVariable:20,getVariable:21,execAction:22},null,[-1,-1,-1])}get setTheme(){return this.$$.ctx[18]}get getDebugVariables(){return this.$$.ctx[19]}get setVariable(){return this.$$.ctx[20]}get getVariable(){return this.$$.ctx[21]}get execAction(){return this.$$.ctx[22]}};function sl(t){return new ll({target:t.target,props:{id:t.id,json:t.json,globalVariablesController:t.globalVariablesController,mix:t.mix,customization:t.customization,builtinProtocols:t.builtinProtocols,onStat:t.onStat,onCustomAction:t.onCustomAction,onError:t.onError,onComponent:t.onComponent,platform:t.platform,theme:t.theme},hydrate:t.hydrate})}var cl=e.M,ul=e.Os,dl=e.sY;export{cl as createGlobalVariablesController,ul as createVariable,dl as render};
|
|
2
2
|
//# sourceMappingURL=client-hydratable.mjs.map
|