@divkitframework/divkit 21.0.0 → 21.1.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
- package/typings/client-devtool.d.ts +5 -1
package/dist/esm/client.mjs
CHANGED
|
@@ -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:()=>ka,Os:()=>zo,sY:()=>Fa});const r=t=>t;function o(t,e){for(const n in e)t[n]=e[n];return t}function i(t){return t()}function a(){return Object.create(null)}function l(t){t.forEach(i)}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 p(t){return 0===Object.keys(t).length}function f(t,...e){if(null==t)return n;const r=t.subscribe(...e);return r.unsubscribe?()=>r.unsubscribe():r}function g(t,e,n){t.$$.on_destroy.push(f(e,n))}function h(t,e,n,r){if(t){const o=m(t,e,n,r);return t[0](o)}}function m(t,e,n,r){return t[1]&&r?o(n.ctx.slice(),t[1](r(e))):n.ctx}function v(t,e,n,r){if(t[2]&&r){const o=t[2](r(n));if(void 0===e.dirty)return o;if("object"==typeof o){const t=[],n=Math.max(e.dirty.length,o.length);for(let r=0;r<n;r+=1)t[r]=e.dirty[r]|o[r];return t}return e.dirty|o}return e.dirty}function y(t,e,n,r,o,i){if(o){const a=m(e,n,r,i);t.p(a,o)}}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 C(t){k.forEach((e=>{e.c(t)||(k.delete(e),e.f())})),0!==k.size&&x(C)}let E=!1;function A(t,e){t.appendChild(e)}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=F("style");return function(t,e){A(t.head||t,e)}(V(t),e),e.sheet}function P(t,e,n){t.insertBefore(e,n||null)}function S(t){t.parentNode.removeChild(t)}function D(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function F(t){return document.createElement(t)}function z(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function M(t){return document.createTextNode(t)}function N(){return M(" ")}function T(){return M("")}function I(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function J(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function O(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]:J(t,r,e[r])}function B(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function R(t,e,n,r){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}const W=new Map;let L,U=0;function H(t,e){const n=(t.style.animation||"").split(", "),r=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),o=n.length-r.length;o&&(t.style.animation=r.join(", "),U-=o,U||x((()=>{U||(W.forEach((t=>{const{stylesheet:e}=t;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.rules={}})),W.clear())})))}function q(t){L=t}function K(){if(!L)throw new Error("Function called outside component initialization");return L}function G(t){K().$$.on_mount.push(t)}function X(t){K().$$.on_destroy.push(t)}function Y(t,e){return K().$$.context.set(t,e),e}function Z(t){return K().$$.context.get(t)}function Q(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const tt=[],et=[],nt=[],rt=[],ot=Promise.resolve();let it=!1;function at(){it||(it=!0,ot.then(pt))}function lt(){return at(),ot}function st(t){nt.push(t)}const ct=new Set;let ut,dt=0;function pt(){const t=L;do{for(;dt<tt.length;){const t=tt[dt];dt++,q(t),ft(t.$$)}for(q(null),tt.length=0,dt=0;et.length;)et.pop()();for(let t=0;t<nt.length;t+=1){const e=nt[t];ct.has(e)||(ct.add(e),e())}nt.length=0}while(tt.length);for(;rt.length;)rt.pop()();it=!1,ct.clear(),q(t)}function ft(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(st)}}function gt(t,e,n){t.dispatchEvent(function(t,e,{bubbles:n=!1,cancelable:r=!1}={}){const o=document.createEvent("CustomEvent");return o.initCustomEvent(t,n,r,e),o}(`${e?"intro":"outro"}${n}`))}const ht=new Set;let mt;function vt(){mt={r:0,c:[],p:mt}}function yt(){mt.r||l(mt.c),mt=mt.p}function $t(t,e){t&&t.i&&(ht.delete(t),t.i(e))}function _t(t,e,n,r){if(t&&t.o){if(ht.has(t))return;ht.add(t),mt.c.push((()=>{ht.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}const bt={duration:0};function wt(t,e,o){let i,a,l=e(t,o),c=!1,u=0;function d(){i&&H(t,i)}function p(){const{delay:e=0,duration:o=300,easing:s=r,tick:p=n,css:f}=l||bt;f&&(i=function(t,e,n,r,o,i,a,l=0){const s=16.666/r;let c="{\n";for(let t=0;t<=1;t+=s){const r=e+(n-e)*i(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}`,p=V(t),{stylesheet:f,rules:g}=W.get(p)||function(t,e){const n={stylesheet:j(e),rules:{}};return W.set(t,n),n}(p,t);g[d]||(g[d]=!0,f.insertRule(`@keyframes ${d} ${u}`,f.cssRules.length));const h=t.style.animation||"";return t.style.animation=`${h?`${h}, `:""}${d} ${r}ms linear ${o}ms 1 both`,U+=1,d}(t,0,1,o,e,s,f,u++)),p(0,1);const g=w()+e,h=g+o;a&&a.abort(),c=!0,st((()=>gt(t,!0,"start"))),a=function(t){let e;return 0===k.size&&x(C),{promise:new Promise((n=>{k.add(e={c:t,f:n})})),abort(){k.delete(e)}}}((e=>{if(c){if(e>=h)return p(1,0),gt(t,!0,"end"),d(),c=!1;if(e>=g){const t=s((e-g)/o);p(t,1-t)}}return c}))}let f=!1;return{start(){f||(f=!0,H(t),s(l)?(l=l(),(ut||(ut=Promise.resolve(),ut.then((()=>{ut=null}))),ut).then(p)):p())},invalidate(){f=!1},end(){c&&(d(),c=!1)}}}const xt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function kt(t,e){_t(t,1,1,(()=>{e.delete(t.key)}))}function Ct(t,e){const n={},r={},o={$$scope:1};let i=t.length;for(;i--;){const a=t[i],l=e[i];if(l){for(const t in a)t in l||(r[t]=1);for(const t in l)o[t]||(n[t]=l[t],o[t]=1);t[i]=l}else for(const t in a)o[t]=1}for(const t in r)t in n||(n[t]=void 0);return n}let Et;function At(t){t&&t.c()}function Vt(t,e,n,r){const{fragment:o,on_mount:a,on_destroy:c,after_update:u}=t.$$;o&&o.m(e,n),r||st((()=>{const e=a.map(i).filter(s);c?c.push(...e):l(e),t.$$.on_mount=[]})),u.forEach(st)}function jt(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 Pt(t,e,r,o,i,s,c,u=[-1]){const d=L;q(t);const p=t.$$={fragment:null,ctx:null,props:s,update:n,not_equal:i,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(p.root);let f=!1;if(p.ctx=r?r(t,e.props||{},((e,n,...r)=>{const o=r.length?r[0]:n;return p.ctx&&i(p.ctx[e],p.ctx[e]=o)&&(!p.skip_bound&&p.bound[e]&&p.bound[e](o),f&&function(t,e){-1===t.$$.dirty[0]&&(tt.push(t),at(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],p.update(),f=!0,l(p.before_update),p.fragment=!!o&&o(p.ctx),e.target){if(e.hydrate){E=!0;const t=(g=e.target,Array.from(g.childNodes));p.fragment&&p.fragment.l(t),t.forEach(S)}else p.fragment&&p.fragment.c();e.intro&&$t(t.$$.fragment),Vt(t,e.target,e.anchor,e.customElement),E=!1,pt()}var g;q(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&&(Et=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(i).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(){jt(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&&!p(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});class St{$destroy(){jt(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&&!p(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Dt=[];function Ft(t,e=n){let r;const o=new Set;function i(e){if(i=e,((n=t)!=n?i==i:n!==i||n&&"object"==typeof n||"function"==typeof n)&&(t=e,r)){const e=!Dt.length;for(const e of o)e[1](),Dt.push(e,t);if(e){for(let t=0;t<Dt.length;t+=2)Dt[t][0](Dt[t+1]);Dt.length=0}}var n,i}return{set:i,update:function(e){i(e(t))},subscribe:function(a,l=n){const s=[a,l];return o.add(s),1===o.size&&(r=e(i)||n),a(t),()=>{o.delete(s),0===o.size&&(r(),r=null)}}}}function zt(t,e,r){const o=!Array.isArray(t),i=o?[t]:t,a=e.length<2;return{subscribe:Ft(r,(t=>{let r=!1;const c=[];let u=0,d=n;const p=()=>{if(u)return;d();const r=e(o?c[0]:c,t);a?t(r):d=s(r)?r:n},g=i.map(((t,e)=>f(t,(t=>{c[e]=t,u&=~(1<<e),r&&p()}),(()=>{u|=1<<e}))));return r=!0,p(),function(){l(g),d()}})).subscribe}}const Mt=Symbol("root");function Nt(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 Tt={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"},It={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_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 Jt(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 Ot(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 Bt(t){let e=Ot(t);return"0"===e&&(e+="em"),e}function Rt(t,e){for(;t.length<e;)t="0"+t;return t}function Wt(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=Ut(t);return r?(r.a*=e,Lt(r)):n}function Lt(t){return 255===t.a?"#".concat([t.r,t.g,t.b].map((t=>Rt(Math.round(t).toString(16),2))).join("")):"rgba(".concat(t.r,",").concat(t.g,",").concat(t.b,",").concat((t.a/255).toFixed(2),")")}function Ut(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,o,i]=e,a=2===r.length?r:r+r,l=2===o.length?o:o+o,s=2===i.length?i:i+i,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,o]=e,i=2===n.length?n:n+n,a=2===r.length?r:r+r,l=2===o.length?o:o+o;return{a:255,r:parseInt(i,16),g:parseInt(a,16),b:parseInt(l,16)}}return null}function Ht(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 qt=Boolean;function Kt(t){if(1===t.length&&"solid"===t[0].type)return{color:Wt(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=Wt(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(qt);return n.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+n.map((t=>Wt(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:Yt(t.bg.scale),pos:Zt(t.bg),image:'url("'+Ht(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(qt);if(!n.length)return;const r=t.bg.radius;let o;r&&"object"==typeof r&&"type"in r&&void 0!==r.value&&("fixed"===r.type?o=Bt(r.value):"relative"===r.type&&(o=Gt[r.value]));const i=Xt(t.bg.center_x),a=Xt(t.bg.center_y);return{size:void 0,pos:void 0,image:"radial-gradient("+"circle ".concat(o||"farthest-corner"," at ").concat(i," ").concat(a)+","+n.map((t=>Wt(t))).join(",")+")"}}({bg:t}):void 0)).filter(qt).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 Gt={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function Xt(t){if(t&&"object"==typeof t&&"type"in t&&void 0!==t.value){if("fixed"===t.type)return Bt(t.value);if("relative"===t.type)return"".concat(100*Number(t.value),"%")}return"50%"}function Yt(t){return"fill"!==t&&t?"fit"===t?"contain":void 0:"cover"}function Zt(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 Qt(t){const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}function te(t,e){return e.has(t)}function ee(t,e){e&&t.push(e)}function ne(t,e,n){const r=[];ee(r,e[t]);for(const o in n)if(n.hasOwnProperty(o)){const i=n[o];i&&ee(r,e["".concat(t,"_").concat(o)+("string"==typeof i?"_".concat(i):"")])}return r.join(" ")}const re=Symbol("state");function oe(t){return Ot(t.top||0)+" "+Ot(t.right||0)+" "+Ot(t.bottom||0)+" "+Ot(t.left||0)}function ie(t){if("number"!=typeof t&&"string"!=typeof t)return!1;const e=Number(t);return!isNaN(e)}function ae(t){return ie(t)&&t>=0}function le(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]&&!ae(n[t]))return e;return oe(t)}function se(t,e){const n=Number(t);return isNaN(n)||n<0?e:n}const ce=Object.prototype.hasOwnProperty;function ue(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 o=n[r];if(!ce.call(e,o)||!ue(t[o],e[o]))return!1}return!0}function de(t,e){return ue(t,e)?e:t}function pe(t,e){return"linear"===t||"ease"===t||"ease_in_out"===t||"ease_in"===t||"ease_out"===t?t:e}function fe(t,e){const n=Number(t);return isNaN(n)?e:n}function ge(t){const e=[];return"set"===t.name?(t.items||[]).forEach((t=>{e.push(...ge(t))})):e.push(t),e}function he(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=>Ot((t||e)/n*10))).join(" ")}function me(){}const ve=Symbol("action");function ye(t){const e=t.touches[0];return{x:e.clientX||e.pageX,y:e.clientY||e.pageY}}function $e(t){var e;let n,r,i,a,c,u,d,p;const f=t[19].default,g=h(f,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:i=t[9]?"button":null},{tabindex:a=t[9]?0:null},t[4]],b={};for(let t=0;t<m.length;t+=1)b=o(b,m[t]);return{c(){n=F("span"),g&&g.c(),O(n,b)},m(e,r){P(e,n,r),g&&g.m(n,null),u=!0,d||(p=[_(c=t[5].call(null,n)),I(n,"click",(function(){s(t[9]?t[10]:null)&&(t[9]?t[10]:null).apply(this,arguments)})),I(n,"click",t[21]),I(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)})),I(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)})),I(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)})),I(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)})),I(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)})),I(n,"keydown",t[15])],d=!0)},p(e,o){var l;t=e,g&&g.p&&(!u||262144&o)&&y(g,f,t,t[18],u?v(f,t[18],o,null):$(t[18]),null),O(n,b=Ct(m,[(!u||582&o&&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&o)&&{style:t[3]},(!u||512&o&&i!==(i=t[9]?"button":null))&&{role:i},(!u||512&o&&a!==(a=t[9]?0:null))&&{tabindex:a},16&o&&t[4]]))},i(t){u||($t(g,t),u=!0)},o(t){_t(g,t),u=!1},d(t){t&&S(n),g&&g.d(t),d=!1,l(p)}}}function _e(t){var e;let n,r,i,a,c,u;const d=t[19].default,p=h(d,t,t[18],null);let f=[{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]],g={};for(let t=0;t<f.length;t+=1)g=o(g,f[t]);return{c(){n=F("a"),p&&p.c(),O(n,g)},m(e,r){P(e,n,r),p&&p.m(n,null),a=!0,c||(u=[_(i=t[5].call(null,n)),I(n,"click",t[10]),I(n,"click",t[20]),I(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)})),I(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)})),I(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)})),I(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)})),I(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)})),I(n,"keydown",t[15])],c=!0)},p(e,o){var i;t=e,p&&p.p&&(!a||262144&o)&&y(p,d,t,t[18],a?v(d,t[18],o,null):$(t[18]),null),O(n,g=Ct(f,[(!a||128&o)&&{href:t[7]},(!a||256&o)&&{target:t[8]},(!a||8&o)&&{style:t[3]},(!a||70&o&&r!==(r=t[2]+" "+(t[6]?"divkit-bd259":"divkit-d9099")+" "+(null!==(i=t[1])&&void 0!==i&&i.length?"divkit-f0cba":"")))&&{class:r},16&o&&t[4]]))},i(t){a||($t(p,t),a=!0)},o(t){_t(p,t),a=!1},d(t){t&&S(n),p&&p.d(t),c=!1,l(u)}}}function be(t){let e,n,r,o;const i=[_e,$e],a=[];function l(t,e){return t[7]?0:1}return e=l(t),n=a[e]=i[e](t),{c(){n.c(),r=T()},m(t,n){a[e].m(t,n),P(t,r,n),o=!0},p(t,o){let[s]=o,c=e;e=l(t),e===c?a[e].p(t,s):(vt(),_t(a[c],1,1,(()=>{a[c]=null})),yt(),n=a[e],n?n.p(t,s):(n=a[e]=i[e](t),n.c()),$t(n,1),n.m(r.parentNode,r))},i(t){o||($t(n),o=!0)},o(t){_t(n),o=!1},d(t){a[e].d(t),t&&S(r)}}}function we(t,e,n){let{$$slots:r={},$$scope:o}=e,{actions:i}=e,{doubleTapActions:a}=e,{longTapActions:l}=e,{cls:s=""}=e,{style:c=null}=e,{attrs:u}=e,{use:d=me}=e,{customAction:p=null}=e,{isNativeActionAnimation:f=!0}=e;const g=Z(Mt),h=Z(ve);Y(ve,{hasAction:()=>Boolean(h.hasAction()||(null==i?void 0:i.length))});let m,v="",y=-1,$=null,_=!1;if(Array.isArray(i)&&(null==i?void 0:i.length))for(let t=0;t<i.length;++t){const e=i[t].url;if(e){v=e,m=i[t].target||void 0;break}}Array.isArray(i)&&(null==i?void 0:i.length)&&h.hasAction()&&(v="",g.logError(Nt(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:i}})));let b=Boolean(p);return v&&!te(Qt(v),g.getBuiltinProtocols())&&(v="",b=!0),t.$$set=t=>{"actions"in t&&n(16,i=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,p=t.customAction),"isNativeActionAnimation"in t&&n(6,f=t.isNativeActionAnimation),"$$scope"in t&&n(18,o=t.$$scope)},[a,l,s,c,u,d,f,v,m,b,async function(t){h.hasAction()||void 0!==t.button&&0!==t.button||(!1===(null==p?void 0:p(t))?t.preventDefault():i&&(i.some((t=>{const e=null==t?void 0:t.url;if(!e)return!1;const n=Qt(e);return n&&!te(n,g.getBuiltinProtocols())}))&&t.preventDefault(),g.execAnyActions(i)))},function(t){h.hasAction()||void 0!==t.button&&0!==t.button||g.execAnyActions(a,!0)},function(t){t.touches.length>1||($=ye(t),_=!1,y=Date.now())},function(t){if(!$)return;const e=ye(t);(Math.abs($.x-e.x)>8||Math.abs($.y-e.y)>8)&&(_=!0)},function(){!$||y<0||(!_&&Date.now()-y>=400&&g.execAnyActions(l,!0),$=null,y=-1)},function(t){t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||"Enter"===t.key&&Array.isArray(i)&&i.length&&(g.execAnyActions(i),t.preventDefault())},i,p,o,r,function(e){Q.call(this,t,e)},function(e){Q.call(this,t,e)}]}const xe=class extends St{constructor(t){super(),Pt(this,t,we,be,d,{actions:16,doubleTapActions:0,longTapActions:1,cls:2,style:3,attrs:4,use:5,customAction:17,isNativeActionAnimation:6})}};function ke(t){return ie(t)&&t>0}function Ce(t,e){return t.map((t=>{if("blur"===(null==t?void 0:t.type)){if(ke(t.radius))return"blur(".concat(Bt(t.radius/2),")")}else e(Nt(new Error("Unknown filter"),{level:"warn",additional:{filter:null==t?void 0:t.type}}))})).filter(Boolean).join(" ")}function Ee(t,e,n){const r=t.slice();return r[5]=e[n],r}function Ae(t){let e,n,r;return{c(){e=F("span"),J(e,"class",n="divkit-b921d"),J(e,"style",r=Jt(t[5].style))},m(t,n){P(t,e,n)},p(t,n){2&n&&r!==(r=Jt(t[5].style))&&J(e,"style",r)},d(t){t&&S(e)}}}function Ve(t){let e,n,r,o,i,a;return{c(){e=F("img"),u(e.src,n=t[5].image_url)||J(e,"src",n),J(e,"alt",""),J(e,"aria-hidden","true"),J(e,"loading","lazy"),J(e,"decoding","async"),J(e,"class",r="divkit-b921d"),J(e,"style",o=Jt(t[5].style))},m(n,r){P(n,e,r),i||(a=I(e,"error",t[2]),i=!0)},p(t,r){2&r&&!u(e.src,n=t[5].image_url)&&J(e,"src",n),2&r&&o!==(o=Jt(t[5].style))&&J(e,"style",o)},d(t){t&&S(e),i=!1,a()}}}function je(t){let e;function n(t,e){return t[5].image_url?Ve:Ae}let r=n(t),o=r(t);return{c(){o.c(),e=T()},m(t,n){o.m(t,n),P(t,e,n)},p(t,i){r===(r=n(t))&&o?o.p(t,i):(o.d(1),o=r(t),o&&(o.c(),o.m(e.parentNode,e)))},d(t){o.d(t),t&&S(e)}}}function Pe(t){let e,r,o=t[1],i=[];for(let e=0;e<o.length;e+=1)i[e]=je(Ee(t,o,e));return{c(){e=F("span");for(let t=0;t<i.length;t+=1)i[t].c();J(e,"class",r="divkit-bf253"+(t[0]?" divkit-dcad7":"")),R(e,"border-radius",t[0],!1)},m(t,n){P(t,e,n);for(let t=0;t<i.length;t+=1)i[t].m(e,null)},p(t,n){let[a]=n;if(6&a){let n;for(o=t[1],n=0;n<o.length;n+=1){const r=Ee(t,o,n);i[n]?i[n].p(r,a):(i[n]=je(r),i[n].c(),i[n].m(e,null))}for(;n<i.length;n+=1)i[n].d(1);i.length=o.length}1&a&&r!==(r="divkit-bf253"+(t[0]?" divkit-dcad7":""))&&J(e,"class",r),1&a&&R(e,"border-radius",t[0],!1)},i:n,o:n,d(t){t&&S(e),D(i,t)}}}function Se(t,e,n){let r,{background:o=[]}=e,{radius:i=""}=e;const a=Z(Mt);return t.$$set=t=>{"background"in t&&n(3,o=t.background),"radius"in t&&n(0,i=t.radius)},t.$$.update=()=>{8&t.$$.dirty&&n(1,r=o.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=Kt([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=Ce(t.filters,a.logError)))}return n})))},[i,r,function(t){t.target&&"classList"in t.target&&t.target.classList.add("divkit-cd613")},o]}const De=class extends St{constructor(t){super(),Pt(this,t,Se,Pe,d,{background:3,radius:0})}};function Fe(t){let e,n;return e=new xe({props:{use:t[32],cls:t[0]+" "+ne("outer",It,t[15]),style:Jt(t[13]),actions:t[10],doubleTapActions:t[11],longTapActions:t[12],attrs:t[6],isNativeActionAnimation:!t[4].length||Ie(t[4]),$$slots:{default:[Ne]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){const r={};32769&n[0]&&(r.cls=t[0]+" "+ne("outer",It,t[15])),8192&n[0]&&(r.style=Jt(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||Ie(t[4])),174&n[0]|32768&n[3]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function ze(t){let e,n;return e=new De({props:{background:t[5],radius:t[2]}}),{c(){At(e.$$.fragment)},m(t,r){Vt(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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function Me(t){let e,n,r;return{c(){e=F("span"),J(e,"class",n=It.outer__border),J(e,"style",r=Jt(t[1]))},m(t,n){P(t,e,n)},p(t,n){2&n[0]&&r!==(r=Jt(t[1]))&&J(e,"style",r)},d(t){t&&S(e)}}}function Ne(t){let e,n,r,o=t[3]&&ze(t);const i=t[107].default,a=h(i,t,t[108],null);let l=t[7]&&Me(t);return{c(){o&&o.c(),e=T(),a&&a.c(),l&&l.c(),n=T()},m(t,i){o&&o.m(t,i),P(t,e,i),a&&a.m(t,i),l&&l.m(t,i),P(t,n,i),r=!0},p(t,s){t[3]?o?(o.p(t,s),8&s[0]&&$t(o,1)):(o=ze(t),o.c(),$t(o,1),o.m(e.parentNode,e)):o&&(vt(),_t(o,1,1,(()=>{o=null})),yt()),a&&a.p&&(!r||32768&s[3])&&y(a,i,t,t[108],r?v(i,t[108],s,null):$(t[108]),null),t[7]?l?l.p(t,s):(l=Me(t),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},i(t){r||($t(o),$t(a,t),r=!0)},o(t){_t(o),_t(a,t),r=!1},d(t){o&&o.d(t),t&&S(e),a&&a.d(t),l&&l.d(t),t&&S(n)}}}function Te(t){let e,n,r=!t[8]&&!t[9]&&Fe(t);return{c(){r&&r.c(),e=T()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[8]||t[9]?r&&(vt(),_t(r,1,1,(()=>{r=null})),yt()):r?(r.p(t,n),768&n[0]&&$t(r,1)):(r=Fe(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Ie(t){return t.some((t=>"native"===t.name))}function Je(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k,C,E,A,V,j,P,S,D,F,z,M,N,T,I,J,O,B,R,W,L,U,H=n,q=n,K=n,G=n,X=n,Y=n,Q=n,tt=n,et=n,nt=n,rt=n,ot=n,it=n,at=n,st=n,ct=n,ut=n;t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y())),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((()=>ot())),t.$$.on_destroy.push((()=>it())),t.$$.on_destroy.push((()=>at())),t.$$.on_destroy.push((()=>st())),t.$$.on_destroy.push((()=>ct())),t.$$.on_destroy.push((()=>ut()));let{$$slots:dt={},$$scope:pt}=e;var ft,gt,ht,mt,vt,yt;let{json:$t={}}=e,{origJson:_t}=e,{templateContext:bt}=e,{cls:wt=""}=e,{style:xt}=e,{layoutParams:kt={}}=e,{customDescription:Ct=!1}=e,{customPaddings:Et=!1}=e,{customActions:At=""}=e,{forceWidth:Vt=!1}=e,{forceHeight:jt=!1}=e,{additionalPaddings:Pt=null}=e;const St={left:"start",center:"center",right:"end"},Dt={top:"start",center:"center",bottom:"end",baseline:"baseline"},Ft=Z(Mt),zt=Z(re);let Tt,It,Jt,Rt,Lt,Ut,Ht,qt={},Gt={},Xt=!1,Yt=1,Zt="transparent",ee=0,ne={"top-left":0,"top-right":0,"bottom-right":0,"bottom-left":0},ie="",ce=null,ue="",me={},ve=0,ye=0,$e=0,_e=!1,be=!1,we={},xe=0,ke=0,Ce=0,Ee=!1,Ae=!1,Ve=1;const je=kt.fakeElement?[]:$t.transition_triggers||["state_change","visibility_change"],Pe=-1!==je.indexOf("state_change")&&$t.id,Se=-1!==je.indexOf("visibility_change")&&$t.id;let De,Fe,ze,Me,Ne,Te,Ie,Je=[],Oe=[],Be=[],Re=[],We="";function Le(t){const e=fe(t.start_value,1),n=fe(t.end_value,1),o=se(t.start_delay,0),i=se(t.duration,300),a=pe(t.interpolator,"ease_in_out").replace(/_/g,"-");switch(t.name){case"fade":return r(76,Me=e),r(77,Ne=n),"opacity ".concat(i,"ms ").concat(a," ").concat(o,"ms");case"scale":return r(78,Te=e),r(79,Ie=n),"transform ".concat(i,"ms ").concat(a," ").concat(o,"ms");case"native":case"no_animation":return"";default:return Ft.logError(Nt(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}}let Ue,He,qe=!1,Ke="visible",Ge=0,Xe=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,Ct=t.customDescription),"customPaddings"in t&&r(39,Et=t.customPaddings),"customActions"in t&&r(40,At=t.customActions),"forceWidth"in t&&r(41,Vt=t.forceWidth),"forceHeight"in t&&r(42,jt=t.forceHeight),"additionalPaddings"in t&&r(43,Pt=t.additionalPaddings),"$$scope"in t&&r(108,pt=t.$$scope)},t.$$.update=()=>{if(4&t.$$.dirty[1]&&(r(31,o=Ft.getDerivedFromVars($t.border)),ut(),ut=f(o,(t=>r(106,U=t)))),2&t.$$.dirty[0]|16769024&t.$$.dirty[1]|8192&t.$$.dirty[3]){let t={},e={},n=!1,o="";if(U){if(U.has_shadow){const e=U.shadow;t["box-shadow"]=e?Ot((null===r(45,gt=null===r(44,ft=e.offset)||void 0===ft?void 0:ft.x)||void 0===gt?void 0:gt.value)||0)+" "+Ot((null===r(47,mt=null===r(46,ht=e.offset)||void 0===ht?void 0:ht.y)||void 0===mt?void 0:mt.value)||0)+" "+Ot(null!==r(48,vt=e.blur)&&void 0!==vt?vt:2)+" "+Wt(e.color||"#000000",null!==r(49,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(U.stroke&&(n=!0,r(51,Yt=se(U.stroke.width,Yt)),r(52,Zt=Wt(U.stroke.color,1,Zt)),e.border="".concat(Ot(Yt)," solid ").concat(Zt)),U.corners_radius?(r(54,ne=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]&&!ae(n[t]))return e;return t}(U.corners_radius,ne)),e["border-radius"]=t["border-radius"]=he(ne)):U.corner_radius&&(r(53,ee=se(U.corner_radius,ee)),r(54,ne={"top-left":ee,"top-right":ee,"bottom-right":ee,"bottom-left":ee}),e["border-radius"]=t["border-radius"]=Ot(ee)),n&&Yt&&(U.corners_radius||U.corner_radius)){let t=Object.assign({},ne);["top-left","top-right","bottom-right","bottom-left"].forEach((e=>{t[e]=(t[e]||0)+Yt/2})),o=he(t)}}r(50,qt=de(t,qt)),r(1,Gt=de(e,Gt)),r(7,Xt=n),r(2,ie=o)}if(4&t.$$.dirty[1]&&(r(30,i=Ft.getDerivedFromVars($t.paddings)),ct(),ct=f(i,(t=>r(105,L=t)))),16777472&t.$$.dirty[1]|4096&t.$$.dirty[3]&&r(55,ce=function(t,e){if(!t)return e;const n=["top","right","bottom","left"];for(let r=0;r<n.length;++r)if(t[n[r]]&&!ae(t[n[r]]))return e;return t}(L&&!Et?L:void 0,ce)),16781312&t.$$.dirty[1]&&r(87,a=oe(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 o=t[r];o&&(n[r]=o);const i=e[r];i&&(n[r]=(n[r]||0)+i)})),n}(ce,Pt))),4&t.$$.dirty[1]&&(r(29,l=Ft.getDerivedFromVars($t.margins)),at(),at=f(l,(t=>r(103,R=t)))),33554432&t.$$.dirty[1]|1024&t.$$.dirty[3]&&r(56,ue=le(R,ue)),4&t.$$.dirty[1]&&(r(28,s=Ft.getDerivedFromVars($t.width)),ot(),ot=f(s,(t=>r(101,O=t)))),4&t.$$.dirty[1]&&(r(27,c=Ft.getDerivedFromVars($t.alignment_horizontal)),st(),st=f(c,(t=>r(104,W=t)))),335545408&t.$$.dirty[1]|3328&t.$$.dirty[3]){let t,e,n={},o=0,i=0,a=!1,l=!1;const s=null==O?void 0:O.type;if("fixed"===s?(r(59,ve=se(null==O?void 0:O.value,ve)),e=Ot(ve)):"wrap_content"===s||!kt.overlapParent&&"match_parent"===s&&kt.parentHorizontalWrapContent?(t="content",("wrap_content"===s&&(null==O?void 0:O.constrained)||"match_parent"===s&&kt.parentHorizontalWrapContent)&&(n["width-constrained"]=!0,i=1),"match_parent"===s&&Ft.logError(Nt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))):(t="parent","vertical"===kt.parentContainerOrientation&&kt.parentContainerWrap&&(l=!0,Ft.logError(Nt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"vertical"===kt.parentLayoutOrientation?e="calc(100% - ".concat(Bt(((null==R?void 0:R.left)||0)+((null==R?void 0:R.right)||0)),")"):"horizontal"===kt.parentContainerOrientation&&(o=O&&"weight"in O&&O.weight||1,kt.parentContainerWrap&&(a=!0))),"content"===t&&Vt&&(t="parent",Ft.logError(Nt(new Error("Incorrect usage of width with value 'wrap_content'"),{level:"warn"}))),"parent"===t)n["halign-self"]="stretch";else{const t=W;n["halign-self"]="left"===t||"center"===t||"right"===t?St[t]:kt.parentHAlign||"start"}t&&(n.width=t),r(58,Jt=e),r(60,ye=o),r(61,$e=i),r(57,me=de(n,me)),r(62,_e=a),r(8,be=l)}if(4&t.$$.dirty[1]&&(r(26,u=Ft.getDerivedFromVars($t.height)),rt(),rt=f(u,(t=>r(100,J=t)))),4&t.$$.dirty[1]&&(r(25,d=Ft.getDerivedFromVars($t.alignment_vertical)),it(),it=f(d,(t=>r(102,B=t)))),2112&t.$$.dirty[1]|10&t.$$.dirty[2]|1664&t.$$.dirty[3]){let t,e,n={},o=0,i=0,a=!1,l=!1;const s=null==J?void 0:J.type;if("fixed"===s?(r(65,xe=se(null==J?void 0:J.value,xe)),e=Ot(xe)):"match_parent"!==s||!kt.overlapParent&&kt.parentVerticalWrapContent?(t="content",("wrap_content"===s&&(null==J?void 0:J.constrained)||"match_parent"===s&&kt.parentVerticalWrapContent)&&(n["height-constrained"]=!0,i=1),"match_parent"===s&&Ft.logError(Nt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))):(t="parent","horizontal"===kt.parentContainerOrientation&&kt.parentContainerWrap&&(l=!0,Ft.logError(Nt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"horizontal"===kt.parentLayoutOrientation?e="calc(100% - ".concat(Bt(((null==R?void 0:R.top)||0)+((null==R?void 0:R.bottom)||0)),")"):"vertical"===kt.parentContainerOrientation&&(o=(null==J?void 0:J.weight)||1,kt.parentContainerWrap&&(a=!0))),"content"===t&&jt&&(t="parent",Ft.logError(Nt(new Error("Incorrect usage of height with value 'wrap_content'"),{level:"warn"}))),"parent"===t)n["valign-self"]="stretch";else{const t=B;"top"===t||"center"===t||"bottom"===t||"baseline"===t&&"horizontal"===kt.parentContainerOrientation?n["valign-self"]=Dt[t]:n["valign-self"]=kt.parentVAlign||"start"}t&&(n.height=t),r(64,Rt=e),r(66,ke=o),r(67,Ce=i),r(63,we=de(n,we)),r(68,Ee=a),r(9,Ae=l)}var e,n;if(64&t.$$.dirty[1]&&r(90,p=!!kt.overlapParent||void 0),64&t.$$.dirty[1]|384&t.$$.dirty[3]&&r(89,g=kt.overlapParent&&(!O||"match_parent"===O.type)&&"match_parent"===(null==J?void 0:J.type)),64&t.$$.dirty[1]&&r(88,h=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=Ft.getDerivedFromVars($t.alpha)),nt(),nt=f(m,(t=>r(99,I=t)))),128&t.$$.dirty[2]|64&t.$$.dirty[3]&&(r(69,(n=Ve,Ve=!ae(e=I)||void 0===e||e>1?n:Number(e))),r(70,Lt=1===Ve?void 0:Ve)),4&t.$$.dirty[1]&&(r(23,v=Ft.getDerivedFromVars($t.accessibility)),et(),et=f(v,(t=>r(98,T=t)))),128&t.$$.dirty[1]|32&t.$$.dirty[3]&&(r(6,It=void 0),T&&!Ct&&T.description&&(r(6,It={}),r(6,It["aria-label"]=T.description,It))),4&t.$$.dirty[1]&&(r(22,y=Ft.getDerivedFromVars($t.background)),tt(),tt=f(y,(t=>r(5,N=t)))),44&t.$$.dirty[0]&&(r(71,Ut={}),r(3,Ht=!1),N&&(r(3,Ht=N.some((t=>"image"===t.type||"nine_patch_image"===t.type))||Boolean(ie)),!Ht))){const t=Kt(N);r(71,Ut["background-color"]=t.color,Ut),r(71,Ut["background-image"]=t.image,Ut),r(71,Ut["background-size"]=t.size,Ut),r(71,Ut["background-position"]=t.position,Ut),r(71,Ut["background-repeat"]="no-repeat",Ut)}if(4&t.$$.dirty[1]&&(r(72,De=void 0),Pe&&$t.transition_in&&Ft.isRunning("stateChange")&&r(72,De=!0)),4&t.$$.dirty[1]&&(r(74,ze=void 0),Pe&&$t.transition_change&&Ft.isRunning("stateChange")&&zt.hasTransitionChange($t.id)&&r(74,ze=!0)),4&t.$$.dirty[1]&&(r(21,$=Ft.getDerivedFromVars($t.action)),Y(),Y=f($,(t=>r(96,z=t)))),4&t.$$.dirty[1]&&(r(20,_=Ft.getDerivedFromVars($t.actions)),Q(),Q=f(_,(t=>r(97,M=t)))),4&t.$$.dirty[1]&&(r(19,b=Ft.getDerivedFromVars($t.doubletap_actions)),X(),X=f(b,(t=>r(95,F=t)))),4&t.$$.dirty[1]&&(r(18,w=Ft.getDerivedFromVars($t.longtap_actions)),G(),G=f(w,(t=>r(94,D=t)))),576&t.$$.dirty[1]|30&t.$$.dirty[3]){let t=M||z&&[z]||[],e=F||[],n=D||[];kt.fakeElement?(t=[],e=[],n=[]):(Array.isArray(t)||(t=[],Ft.logError(Nt(new Error("Actions should be array")))),Array.isArray(e)||(e=[],Ft.logError(Nt(new Error("DoubleTapActions should be array")))),Array.isArray(n)||(n=[],Ft.logError(Nt(new Error("LongTapActions should be array"))))),(t.length||e.length||n.length)&&At&&(t=[],e=[],n=[],Ft.logError(Nt(new Error('Cannot use action on component "'.concat(At,'"'))))),r(10,Je=t),r(11,Oe=e),r(12,Be=n)}if(4&t.$$.dirty[1]&&(r(17,x=Ft.getDerivedFromVars($t.action_animation)),K(),K=f(x,(t=>r(93,S=t)))),16&t.$$.dirty[0]|1&t.$$.dirty[3]&&S&&(r(4,Re=ge(S)),r(75,We=Re.map(Le).filter(Boolean).join(", "))),4&t.$$.dirty[1]&&(r(16,k=Ft.getDerivedFromVars($t.visibility)),q(),q=f(k,(t=>r(92,P=t)))),1074528256&t.$$.dirty[2]){const t=Ke,e=function(t,e){return"visible"===t||"invisible"===t||"gone"===t?t:e}(P,Ke);t!==e&&(!qe||"visible"!==Ke&&"visible"!==e?r(81,Ke=e):async function(t){r(81,Ke=t);const e="visible"===t?"in":"out",n="in"===e?$t.transition_in:$t.transition_out;Se&&n&&(await lt(),"in"===e&&r(73,Fe=!0),zt.runVisibilityTransition(Object.assign(Object.assign({},$t),{visibility:"visible"}),bt,n,Tt,e).then((()=>{"in"===e&&r(73,Fe=!1)})).catch((t=>{throw"in"===e&&r(73,Fe=!1),t})))}(e)),qe||r(80,qe=!0)}if(67108928&t.$$.dirty[1]|403192834&t.$$.dirty[2]&&r(15,C=Object.assign(Object.assign(Object.assign({},me),we),{"parent-overlap":p,"parent-overlap-absolute":g,"scroll-snap":kt.scrollSnap,"hide-on-transition-in":De||Fe||ze,visibility:Ke,"has-action-animation":Boolean(We),"parent-flex":kt.parentContainerOrientation||void 0})),4&t.$$.dirty[1]&&(r(14,E=Ft.getDerivedFromVars($t.transform)),H(),H=f(E,(t=>r(91,j=t)))),540016640&t.$$.dirty[2]&&j&&void 0!==j.rotation){const t=j.pivot_x||{type:"pivot-percentage",value:50};r(82,Ge=fe(t.value,Ge));const e="pivot-fixed"===t.type?Ot(Ge):"".concat(Ge,"%"),n=j.pivot_y||{type:"pivot-percentage",value:50};r(83,Xe=fe(n.value,Xe));const o="pivot-fixed"===n.type?Ot(Xe):"".concat(Xe,"%");r(84,Ue="".concat(e," ").concat(o)),r(85,He="rotate(".concat(j.rotation,"deg)"))}536870912&t.$$.dirty[1]|81&t.$$.dirty[2]&&r(86,A=_e||Ee?"100%":ye||ke?0:void 0),1778909216&t.$$.dirty[1]|130278196&t.$$.dirty[2]&&r(13,V=Object.assign(Object.assign(Object.assign(Object.assign({},xt),Ut),qt),{width:Jt,height:Rt,"grid-area":h,padding:a,margin:ue,opacity:Lt,transition:We,"transform-origin":Ue,transform:He,"flex-grow":ye||ke||void 0,"flex-shrink":$e||Ce?1:void 0,"flex-basis":A,"--divkit-animation-opacity-start":Me,"--divkit-animation-opacity-end":Ne,"--divkit-animation-scale-start":Te,"--divkit-animation-scale-end":Ie}))},[wt,Gt,ie,Ht,Re,N,It,Xt,be,Ae,Je,Oe,Be,V,E,C,k,x,w,b,_,$,y,v,m,d,u,c,s,l,i,o,function(t){Tt=t,Pe&&$t.transition_in&&zt.registerChildWithTransitionIn($t,bt,$t.transition_in,t).then((()=>{r(72,De=!1)})).catch((t=>{throw r(72,De=!1),t})),Pe&&$t.transition_out&&zt.registerChildWithTransitionOut($t,bt,$t.transition_out,t),Pe&&$t.transition_change&&zt.registerChildWithTransitionChange($t,bt,$t.transition_change,t).then((()=>{r(74,ze=!1)})).catch((t=>{throw r(74,ze=!1),t})),function(t,e){let{visibilityActions:n,rootCtx:r}=e;if(null==n||!n.length)return;const o=n.map((t=>({action:t,visible:!1,count:0,finished:!1}))),i=[...new Set([...n.map((t=>(t.visibility_percentage||50)/100))])];new IntersectionObserver((t=>{t.forEach((t=>{o.forEach((e=>{const n=t.intersectionRatio>=(e.action.visibility_percentage||50)/100;!e.visible&&n?e.finished||(e.timer=setTimeout((()=>{++e.count;const t=0===e.action.log_limit?1/0:e.action.log_limit||1;++e.count>=t&&(e.finished=!0);const n=e.action.url;if(n){const t=Qt(n);t&&!te(t,r.getBuiltinProtocols())&&("div-action"===t?r.execAction(e.action):e.action.log_id&&r.execCustomAction(e.action))}r.logStat("visible",e.action)}),e.action.visibility_duration||800)):n||e.timer&&clearTimeout(e.timer),e.visible=n}))}))}),{threshold:i}).observe(t)}(t,{visibilityActions:kt.fakeElement?[]:Ft.getJsonWithVars($t.visibility_actions||$t.visibility_action&&[$t.visibility_action]),rootCtx:Ft});const e=$t.id;e&&zt.registerChild(e);let n=null;return{destroy(){e&&zt.unregisterChild(e),n&&n.destroy()}}},$t,_t,bt,xt,kt,Ct,Et,At,Vt,jt,Pt,ft,gt,ht,mt,vt,yt,qt,Yt,Zt,ee,ne,ce,ue,me,Jt,ve,ye,$e,_e,we,Rt,xe,ke,Ce,Ee,Ve,Lt,Ut,De,Fe,ze,We,Me,Ne,Te,Ie,qe,Ke,Ge,Xe,Ue,He,A,a,h,g,p,j,P,S,D,F,z,M,T,I,J,O,B,R,W,L,U,dt,pt]}const Oe=class extends St{constructor(t){super(),Pt(this,t,Je,Te,d,{json:33,origJson:34,templateContext:35,cls:0,style:36,layoutParams:37,customDescription:38,customPaddings:39,customActions:40,forceWidth:41,forceHeight:42,additionalPaddings:43},null,[-1,-1,-1,-1])}},Be={"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 Re(t,e){const n=Number(t);return isNaN(n)||n<=0?e:n}function We(t){if("light"===t||"medium"===t||"bold"===t||"regular"===t)return"medium"===t?500:"bold"===t?700:"light"===t?300:400}function Le(t,e){return We(t)||e}function Ue(t){let e,n;return{c(){e=F("span"),J(e,"class",n=Be["text-range__top-offset"]),R(e,"margin-top",t[4],!1)},m(t,n){P(t,e,n)},p(t,n){16&n&&R(e,"margin-top",t[4],!1)},d(t){t&&S(e)}}}function He(t){let e;return{c(){e=M(t[0])},m(t,n){P(t,e,n)},p(t,n){1&n&&B(e,t[0])},d(t){t&&S(e)}}}function qe(t){let e,n,r,o=t[4]&&Ue(t);return n=new xe({props:{cls:ne("text-range",Be,t[3]),actions:t[1],style:Jt(t[2]),$$slots:{default:[He]},$$scope:{ctx:t}}}),{c(){o&&o.c(),e=T(),At(n.$$.fragment)},m(t,i){o&&o.m(t,i),P(t,e,i),Vt(n,t,i),r=!0},p(t,r){let[i]=r;t[4]?o?o.p(t,i):(o=Ue(t),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null);const a={};8&i&&(a.cls=ne("text-range",Be,t[3])),2&i&&(a.actions=t[1]),4&i&&(a.style=Jt(t[2])),524289&i&&(a.$$scope={dirty:i,ctx:t}),n.$set(a)},i(t){r||($t(n.$$.fragment,t),r=!0)},o(t){_t(n.$$.fragment,t),r=!1},d(t){o&&o.d(t),t&&S(e),jt(n,t)}}}function Ke(t,e,n){let r,o,i,a,l;var s,c;let u,{text:d}=e,{rootFontSize:p}=e,{textStyles:f={}}=e,{singleline:g=!1}=e,{actions:h}=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,p=t.rootFontSize),"textStyles"in t&&n(6,f=t.textStyles),"singleline"in t&&n(7,g=t.singleline),"actions"in t&&n(1,h=t.actions)},t.$$.update=()=>{if(64&t.$$.dirty){let t="none";(f.underline||f.strike)&&("single"===f.underline&&"single"===f.strike?t="both":"single"===f.underline?t="underline":"single"===f.strike&&(t="strike")),n(10,m=t)}2112&t.$$.dirty&&n(11,v=Re(f.font_size,v)),2112&t.$$.dirty&&ke(f.line_height)&&n(12,y=Number(f.line_height)/v),64&t.$$.dirty&&ae(f.letter_spacing)&&n(13,$=Ot(f.letter_spacing)),16448&t.$$.dirty&&n(14,u=Le(f.font_weight,u)),32832&t.$$.dirty&&n(15,_=Wt(f.text_color,1,_)),64&t.$$.dirty&&n(4,r=f.top_offset?Ot(f.top_offset):""),64&t.$$.dirty&&n(18,o=f.background?Kt([f.background]):null),320&t.$$.dirty&&((null===n(8,s=f.border)||void 0===s?void 0:s.stroke)&&"transparent"!==Wt(f.border.stroke.color)&&ke(f.border.stroke.width)?n(16,b={color:f.border.stroke.color,width:f.border.stroke.width}):n(16,b=null)),576&t.$$.dirty&&n(17,i=Re(null===n(9,c=f.border)||void 0===c?void 0:c.corner_radius,0)),1152&t.$$.dirty&&n(3,a={singleline:g,decoration:m}),522272&t.$$.dirty&&n(2,l={"font-size":Ot(10*v/p),"line-height":y,"letter-spacing":$,"font-weight":u,color:_,background:(null==o?void 0:o.color)||void 0,"box-shadow":b?"inset 0 0 0 ".concat(Ot(b.width)," ").concat(b.color):void 0,"border-radius":i?Ot(i):void 0})},[d,h,l,a,r,p,f,g,s,c,m,v,y,$,u,_,b,i,o]}const Ge=class extends St{constructor(t){super(),Pt(this,t,Ke,qe,d,{text:0,rootFontSize:5,textStyles:6,singleline:7,actions:1})}};function Xe(t,e){return"left"===t||"center"===t||"right"===t?t:e}function Ye(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t?t:e}function Ze(t,e){return"source_in"===t||"source_atop"===t||"darken"===t||"lighten"===t||"multiply"===t||"screen"===t?t:e}const{Boolean:Qe}=xt;function tn(t,e,n){const r=t.slice();return r[55]=e[n],r[57]=n,r}function en(t){let e,n;return e=new Oe({props:{cls:ne("text",Tt,t[13])+" "+(t[6]?"":"divkit-c016b"),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[cn]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){const r={};8256&n[0]&&(r.cls=ne("text",Tt,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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function nn(t){let e,n;return e=new Ge({props:{text:t[4],rootFontSize:t[5],textStyles:t[27],singleline:t[7]}}),{c(){At(e.$$.fragment)},m(t,r){Vt(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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function rn(t){let e,n,r=t[10],o=[];for(let e=0;e<r.length;e+=1)o[e]=sn(tn(t,r,e));const i=t=>_t(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=T()},m(t,r){for(let e=0;e<o.length;e+=1)o[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 i=tn(t,r,a);o[a]?(o[a].p(i,n),$t(o[a],1)):(o[a]=sn(i),o[a].c(),$t(o[a],1),o[a].m(e.parentNode,e))}for(vt(),a=r.length;a<o.length;a+=1)i(a);yt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)$t(o[t]);n=!0}},o(t){o=o.filter(Qe);for(let t=0;t<o.length;t+=1)_t(o[t]);n=!1},d(t){D(o,t),t&&S(e)}}}function on(t){let e,r,o,i,a,l,s,c;return{c(){e=F("span"),r=F("img"),J(r,"class",o=Tt.text__image),u(r.src,i=t[55].image.url)||J(r,"src",i),J(r,"loading","lazy"),J(r,"decoding","async"),J(r,"aria-hidden","true"),J(r,"alt",""),J(r,"style",a=Jt({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})),J(e,"style",l=Jt(t[55].image.wrapperStyle))},m(n,o){P(n,e,o),A(e,r),s||(c=I(r,"error",t[28]),s=!0)},p(t,n){1024&n[0]&&!u(r.src,i=t[55].image.url)&&J(r,"src",i),1536&n[0]&&a!==(a=Jt({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}))&&J(r,"style",a),1024&n[0]&&l!==(l=Jt(t[55].image.wrapperStyle))&&J(e,"style",l)},i:n,o:n,d(t){t&&S(e),s=!1,c()}}}function an(t){let e,n,r=t[55].text&&ln(t);return{c(){r&&r.c(),e=T()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[55].text?r?(r.p(t,n),1024&n[0]&&$t(r,1)):(r=ln(t),r.c(),$t(r,1),r.m(e.parentNode,e)):r&&(vt(),_t(r,1,1,(()=>{r=null})),yt())},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function ln(t){let e,n;return e=new Ge({props:{text:t[55].text,rootFontSize:t[5],textStyles:t[55].textStyles,singleline:t[7],actions:t[55].actions}}),{c(){At(e.$$.fragment)},m(t,r){Vt(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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function sn(t){let e,n,r,o;const i=[an,on],a=[];function l(t,e){return"text"in t[55]?0:t[55].image?1:-1}return~(e=l(t))&&(n=a[e]=i[e](t)),{c(){n&&n.c(),r=T()},m(t,n){~e&&a[e].m(t,n),P(t,r,n),o=!0},p(t,o){let s=e;e=l(t),e===s?~e&&a[e].p(t,o):(n&&(vt(),_t(a[s],1,1,(()=>{a[s]=null})),yt()),~e?(n=a[e],n?n.p(t,o):(n=a[e]=i[e](t),n.c()),$t(n,1),n.m(r.parentNode,r)):n=null)},i(t){o||($t(n),o=!0)},o(t){_t(n),o=!1},d(t){~e&&a[e].d(t),t&&S(r)}}}function cn(t){let e,n,r,o,i,a;const l=[rn,nn],s=[];function c(t,e){return t[10].length?0:1}return n=c(t),r=s[n]=l[n](t),{c(){e=F("span"),r.c(),J(e,"class",o=ne("text__inner",Tt,t[12])),J(e,"style",i=Jt(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):(vt(),_t(s[d],1,1,(()=>{s[d]=null})),yt(),r=s[n],r?r.p(t,u):(r=s[n]=l[n](t),r.c()),$t(r,1),r.m(e,null)),(!a||4096&u[0]&&o!==(o=ne("text__inner",Tt,t[12])))&&J(e,"class",o),(!a||2048&u[0]&&i!==(i=Jt(t[11])))&&J(e,"style",i)},i(t){a||($t(r),a=!0)},o(t){_t(r),a=!1},d(t){t&&S(e),s[n].d()}}}function un(t){let e,n,r=!t[8]&&en(t);return{c(){r&&r.c(),e=T()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[8]?r&&(vt(),_t(r,1,1,(()=>{r=null})),yt()):r?(r.p(t,n),256&n[0]&&$t(r,1)):(r=en(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function dn(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k,C,E,A,V,j,P,S,D,F,z,M,N,T,I=n,J=n,O=n,B=n,R=n,W=n,L=n,U=n,H=n,q=n,K=n,G=n,Y=n;t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>Y()));let{json:Q={}}=e,{templateContext:tt}=e,{origJson:et}=e,{layoutParams:nt}=e;const rt=Z(Mt);let ot=!1,it="",at=12,lt=1.25,st=!1,ct="",ut="",dt=!1,pt="left",ft="top",gt="",ht="",mt=!1,vt=[],yt=[];return X((()=>{yt.forEach((t=>{let[e,n]=t;rt.removeSvgFilter(e,n)}))})),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=()=>{var e,n;if(1&t.$$.dirty[0]&&(r(26,o=rt.getDerivedFromVars(Q.text)),Y(),Y=f(o,(t=>r(51,T=t)))),16&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&(r(4,(e=T,n=it,it=String(null!=e?e:"")||n)),it?r(8,ot=!1):(r(8,ot=!0),rt.logError(Nt(new Error('Missing "text" prop for div "text"'))))),1&t.$$.dirty[0]&&(r(25,i=rt.getDerivedFromVars(Q.ranges)),J(),J=f(i,(t=>r(41,E=t)))),1&t.$$.dirty[0]&&(r(24,a=rt.getDerivedFromVars(Q.images)),I(),I=f(a,(t=>r(40,C=t)))),1&t.$$.dirty[0]&&(r(23,l=rt.getDerivedFromVars({font_size:Q.font_size,letter_spacing:Q.letter_spacing,font_weight:Q.font_weight,text_color:Q.text_color,underline:Q.underline,strike:Q.strike,line_height:Q.line_height})),O(),O=f(l,(t=>r(27,A=t)))),1&t.$$.dirty[0]&&(r(22,s=rt.getDerivedFromVars(Q.font_size)),G(),G=f(s,(t=>r(50,N=t)))),32&t.$$.dirty[0]|524288&t.$$.dirty[1]&&r(5,at=Re(N,at)),1&t.$$.dirty[0]&&(r(21,c=rt.getDerivedFromVars(Q.line_height)),K(),K=f(c,(t=>r(49,M=t)))),32&t.$$.dirty[0]|262144&t.$$.dirty[1]){const t=M;ke(t)?(r(29,lt=Number(t)/at),r(9,st=!0)):r(9,st=!1)}if(1&t.$$.dirty[0]&&(r(20,u=rt.getDerivedFromVars(Q.max_lines)),U(),U=f(u,(t=>r(46,D=t)))),32768&t.$$.dirty[1]&&r(7,d=1===D),536870912&t.$$.dirty[0]|34304&t.$$.dirty[1]){let t="",e="",n=!1;if(D&&D>1){let r=Number(D);t=r*lt+"em",E||C||(e=r,n=!0)}r(30,ct=t),r(31,ut=e),r(32,dt=n)}if(1&t.$$.dirty[0]&&(r(19,p=rt.getDerivedFromVars(Q.text_alignment_horizontal)),q(),q=f(p,(t=>r(48,z=t)))),131076&t.$$.dirty[1]&&r(33,pt=Xe(z,pt)),1&t.$$.dirty[0]&&(r(18,g=rt.getDerivedFromVars(Q.text_alignment_vertical)),H(),H=f(g,(t=>r(47,F=t)))),65544&t.$$.dirty[1]&&r(34,ft=Ye(F,ft)),16&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(39,h=!E||it&&1===E.length&&E[0]&&0===E[0].start&&"number"==typeof E[0].end&&E[0].end>=it.length),1&t.$$.dirty[0]&&(r(17,m=rt.getDerivedFromVars(Q.text_color)),L(),L=f(m,(t=>r(45,S=t)))),17408&t.$$.dirty[1]&&r(38,v=Boolean(S)!==Boolean(E&&E[0]&&E[0].text_color)),50576&t.$$.dirty[1]){let t="";D&&h&&v&&(t=Wt(S||E&&E[0]&&E[0].text_color,1,gt)),r(35,gt=t)}if(1&t.$$.dirty[0]&&(r(16,y=rt.getDerivedFromVars(Q.truncate)),W(),W=f(y,(t=>r(44,P=t)))),8192&t.$$.dirty[1]&&r(37,$="none"===P?"none":""),1&t.$$.dirty[0]&&(r(15,_=rt.getDerivedFromVars(Q.text_gradient)),R(),R=f(_,(t=>r(43,j=t)))),4096&t.$$.dirty[1]){let t="";if(j){const e=Kt([j]);e.image&&(t=e.image)}r(36,ht=t)}1&t.$$.dirty[0]&&(r(14,b=rt.getDerivedFromVars(Q.selectable)),B(),B=f(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 o=[];if(yt.forEach((t=>{let[e,n]=t;rt.removeSvgFilter(e,n)})),yt=[],!(Array.isArray(e)&&e.length||Array.isArray(n)&&n.length&&t))return void r(10,vt=[]);const i=t;let a=e||[{start:0,end:i.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<=i.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);o.push({text:i.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=Ot(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),r=Ot(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const i={"font-size":Ot(10*(Number(e.font_size)||12)/at)};let a="";const l=t.image.tint_color,s=Ze(t.image.tint_mode,"source_in");if(l){const e=Wt(t.image.tint_color);a=rt.addSvgFilter(e,s),yt.push([e,s])}o.push({image:{url:t.image.url,width:n,height:r,wrapperStyle:i,svgFilterId:a}})}s=r})),s<i.length&&o.push({text:i.substring(s),textStyles:Object.assign({},A)}),r(10,vt=o)}(it,E,C),128&t.$$.dirty[0]|78&t.$$.dirty[1]&&r(13,w={singleline:d,multiline:dt,halign:pt,valign:ft,truncate:$}),32&t.$$.dirty[1]&&r(12,x={gradient:Boolean(ht)}),1610612768&t.$$.dirty[0]|49&t.$$.dirty[1]&&r(11,k={"font-size":Ot(at),"line-height":lt,"max-height":ct,"-webkit-line-clamp":ut,color:gt,"background-image":ht})},[Q,tt,et,nt,it,at,mt,d,ot,st,vt,k,x,w,b,_,y,m,g,p,u,c,s,l,a,i,o,A,function(t){t.target&&"classList"in t.target&&t.target.classList.add(Tt.text__image_hidden)},lt,ct,ut,dt,pt,ft,gt,ht,$,v,h,C,E,V,j,P,S,D,F,z,M,N,T]}const pn={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 fn(t,e,n){if(!(t&&t.shape&&t.color&&t.shape.type&&e.includes(t.shape.type)))return n;const r=Wt(t.color);let o,i,a;if("rounded_rectangle"===t.shape.type){var l,s,c,u;o=Number((null===(l=t.shape.item_width)||void 0===l?void 0:l.value)||10),i=Number((null===(s=t.shape.item_height)||void 0===s?void 0:s.value)||10),a=Number(null!==(c=null===(u=t.shape.corner_radius)||void 0===u?void 0:u.value)&&void 0!==c?c:5)}else{if("circle"!==t.shape.type)return n;var d;o=i=a=2*Number((null===(d=t.shape.radius)||void 0===d?void 0:d.value)||10)}if("shape_drawable"===t.type&&"transparent"!==r){var p,f,g;const e={},n=null!==(p=t.stroke)&&void 0!==p&&p.color?Wt(t.stroke.color):"",l=null!==(f=t.stroke)&&void 0!==f&&f.width?Number(null!==(g=t.stroke.width)&&void 0!==g?g:1):"";return e.width=o,e.height=i,e.borderRadius=a,e.background=r,n&&l&&(e.boxShadow="inset 0 0 0 ".concat(Ot(l)," ").concat(n)),e}return n}function gn(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 hn(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(Ot).join(" ")}function mn(t,e,n){const r=t.slice();return r[13]=e[n],r}function vn(t){let e,n,r,o,i,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"),p="".concat(t[13].height,"px");return{c(){e=F("div"),n=F("div"),o=N(),J(n,"class",r="divkit-f6e9a"),R(n,"width",a,!1),R(n,"height",l,!1),R(n,"border-radius",s,!1),R(n,"background",t[13].style.background,!1),R(n,"box-shadow",t[13].style.boxShadow,!1),J(e,"class",i="divkit-c770e"),R(e,"left",c,!1),R(e,"top",u,!1),R(e,"width",d,!1),R(e,"height",p,!1)},m(t,r){P(t,e,r),A(e,n),A(e,o)},p(t,r){2&r&&a!==(a="".concat(t[13].style.width,"px"))&&R(n,"width",a,!1),2&r&&l!==(l="".concat(t[13].style.height,"px"))&&R(n,"height",l,!1),2&r&&s!==(s="".concat(t[13].style.borderRadius,"px"))&&R(n,"border-radius",s,!1),2&r&&R(n,"background",t[13].style.background,!1),2&r&&R(n,"box-shadow",t[13].style.boxShadow,!1),2&r&&c!==(c="".concat(t[13].left,"px"))&&R(e,"left",c,!1),2&r&&u!==(u="".concat(t[13].top,"px"))&&R(e,"top",u,!1),2&r&&d!==(d="".concat(t[13].width,"px"))&&R(e,"width",d,!1),2&r&&p!==(p="".concat(t[13].height,"px"))&&R(e,"height",p,!1)},d(t){t&&S(e)}}}function yn(t){let e,r,o,i,a=t[1],l=[];for(let e=0;e<a.length;e+=1)l[e]=vn(mn(t,a,e));return{c(){e=F("div");for(let t=0;t<l.length;t+=1)l[t].c();J(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),o||(i=I(window,"resize",t[2]),o=!0)},p(t,n){let[r]=n;if(2&r){let n;for(a=t[1],n=0;n<a.length;n+=1){const o=mn(t,a,n);l[n]?l[n].p(o,r):(l[n]=vn(o),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),D(l,n),t[10](null),o=!1,i()}}}function $n(t,e,n,r,o,i){i?t.push({top:n.bottom,left:o.left,width:o.right-o.left,height:r.top-n.bottom,style:e}):t.push({top:o.top,left:n.right,width:r.left-n.right,height:o.bottom-o.top,style:e})}function _n(t,e,n,r){const o={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)&&$n(t,e.style,{top:0,right:n[0].left-e.style.width,bottom:n[0].top-e.style.height,left:0},n[0],o,r),null==e?void 0:e.show_between)for(let i=0;i<n.length-1;++i)$n(t,e.style,n[i],n[i+1],o,r);if(null==e?void 0:e.show_at_end){const i=n[n.length-1];$n(t,e.style,i,{top:i.bottom+e.style.height,right:0,bottom:0,left:i.right+e.style.width},o,r)}}function bn(t,e,n){let r,{orientation:o}=e,{separator:i}=e,{lineSeparator:a}=e;const l=function(t,e){let n,r=0,o=!1;return function(){const e=Date.now();return!r||Math.abs(e-r)>10?(r=e,n=t.apply(this,arguments)):(o||(o=!0,setTimeout((()=>{o=!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(It.outer__border))),l=[];for(;e.length;){const t=[],n=e.shift();t.push(n);let r=n.getBoundingClientRect(),i=r.right,a=r.bottom;for(;e.length;){let n=e[0],r=n.getBoundingClientRect();if("vertical"===o){if(r.top<a)break}else if(r.left<i)break;i=Math.max(i,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)));i&&_n(c,i,e,"vertical"===o);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&&_n(c,a,u,"horizontal"===o),c.forEach((e=>{e.top-=t.top,e.left-=t.left}))}));let s,c=[],u=!1,d=null,p=null;function f(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 G((()=>{n(6,u=!0)})),X((()=>{n(6,u=!1)})),t.$$set=t=>{"orientation"in t&&n(3,o=t.orientation),"separator"in t&&n(4,i=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||p)&&(d&&(d.disconnect(),n(7,d=null)),p&&(p.disconnect(),n(8,p=null)),u&&r&&("undefined"!=typeof MutationObserver&&(n(7,d=new MutationObserver(f)),d.observe(r,{childList:!0,attributes:!0,characterData:!0,subtree:!0})),"undefined"!=typeof ResizeObserver&&(n(8,p=new ResizeObserver(l)),p.observe(r)))),576&t.$$.dirty&&u&&r&&l()},[s,c,l,o,i,a,u,d,p,r,function(t){et[t?"unshift":"push"]((()=>{s=t,n(0,s)}))}]}const wn=class extends St{constructor(t){super(),Pt(this,t,bn,yn,d,{orientation:3,separator:4,lineSeparator:5})}};let xn;function kn(){if(void 0!==xn)return xn;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),xn=1===t.scrollHeight,document.body.removeChild(t),xn}const{Boolean:Cn}=xt;function En(t,e,n){const r=t.slice();return r[43]=e[n],r}function An(t){let e,n;return e=new Oe({props:{cls:ne("container",pn,t[10]),style:t[9],json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],additionalPaddings:t[13],$$slots:{default:[Pn]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=ne("container",pn,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]),8192&n[0]&&(r.additionalPaddings=t[13]),1049056&n[0]|32768&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function Vn(t){let e,n;return e=new oi({props:{layoutParams:t[8],div:t[43].json,templateContext:t[43].templateContext,origJson:t[43].origJson}}),{c(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.layoutParams=t[8]),1048576&n[0]&&(r.div=t[43].json),1048576&n[0]&&(r.templateContext=t[43].templateContext),1048576&n[0]&&(r.origJson=t[43].origJson),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function jn(t){let e,n;return e=new wn({props:{separator:t[6],lineSeparator:t[7],orientation:t[5]}}),{c(){At(e.$$.fragment)},m(t,r){Vt(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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function Pn(t){let e,n,r,o=t[20],i=[];for(let e=0;e<o.length;e+=1)i[e]=Vn(En(t,o,e));const a=t=>_t(i[t],1,1,(()=>{i[t]=null}));let l=(t[6]||t[7])&&jn(t);return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=N(),l&&l.c(),n=T()},m(t,o){for(let e=0;e<i.length;e+=1)i[e].m(t,o);P(t,e,o),l&&l.m(t,o),P(t,n,o),r=!0},p(t,r){if(1048832&r[0]){let n;for(o=t[20],n=0;n<o.length;n+=1){const a=En(t,o,n);i[n]?(i[n].p(a,r),$t(i[n],1)):(i[n]=Vn(a),i[n].c(),$t(i[n],1),i[n].m(e.parentNode,e))}for(vt(),n=o.length;n<i.length;n+=1)a(n);yt()}t[6]||t[7]?l?(l.p(t,r),192&r[0]&&$t(l,1)):(l=jn(t),l.c(),$t(l,1),l.m(n.parentNode,n)):l&&(vt(),_t(l,1,1,(()=>{l=null})),yt())},i(t){if(!r){for(let t=0;t<o.length;t+=1)$t(i[t]);$t(l),r=!0}},o(t){i=i.filter(Cn);for(let t=0;t<i.length;t+=1)_t(i[t]);_t(l),r=!1},d(t){D(i,t),t&&S(e),l&&l.d(t),t&&S(n)}}}function Sn(t){let e,n,r=!t[4]&&An(t);return{c(){r&&r.c(),e=T()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[4]?r&&(vt(),_t(r,1,1,(()=>{r=null})),yt()):r?(r.p(t,n),16&n[0]&&$t(r,1)):(r=An(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Dn(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k,C,E,A=n,V=n,j=n,P=n,S=n,D=n,F=n,z=n;var M,N,T,I,J,O;t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>z()));let{json:B={}}=e,{templateContext:R}=e,{origJson:W}=e,{layoutParams:L}=e;const U={left:"start",center:"center",right:"end"},H={top:"start",center:"center",bottom:"end",baseline:"baseline"},q=["rounded_rectangle","circle"],K=Z(Mt);let G=!1,X="vertical",Y="top",Q="left",tt=null,et=null,nt={};return t.$$set=t=>{"json"in t&&r(0,B=t.json),"templateContext"in t&&r(1,R=t.templateContext),"origJson"in t&&r(2,W=t.origJson),"layoutParams"in t&&r(3,L=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(30,o=B.items),1073741824&t.$$.dirty[0]&&((null==o?void 0:o.length)&&Array.isArray(o)?r(4,G=!1):(r(4,G=!0),K.logError(Nt(new Error('Incorrect or empty "items" prop for div "container"'))))),1073741842&t.$$.dirty[0]&&r(20,i=(!G&&o||[]).map((t=>{let e=t,n=R;return({templateContext:n,json:e}=K.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(19,a=K.getDerivedFromVars(B.orientation)),z(),z=f(a,(t=>r(38,E=t)))),32&t.$$.dirty[0]|128&t.$$.dirty[1]&&r(5,X=function(t,e){return"vertical"===t||"horizontal"===t||"overlap"===t?t:e}(E,X)),1&t.$$.dirty[0]&&(r(18,l=K.getDerivedFromVars(B.content_alignment_vertical)),F(),F=f(l,(t=>r(37,C=t)))),134217728&t.$$.dirty[0]|64&t.$$.dirty[1]&&r(27,Y=Ye(C,Y)),1&t.$$.dirty[0]&&(r(17,s=K.getDerivedFromVars(B.content_alignment_horizontal)),D(),D=f(s,(t=>r(36,k=t)))),268435456&t.$$.dirty[0]|32&t.$$.dirty[1]&&r(28,Q=Xe(k,Q)),1&t.$$.dirty[0]&&(r(16,c=K.getDerivedFromVars(B.layout_mode)),S(),S=f(c,(t=>r(35,x=t)))),16&t.$$.dirty[1]&&r(29,u="wrap"===x),1&t.$$.dirty[0]&&(r(15,d=K.getDerivedFromVars(B.separator)),P(),P=f(d,(t=>r(34,w=t)))),14680160&t.$$.dirty[0]|8&t.$$.dirty[1])if((null==w?void 0:w.style)&&"overlap"!==X&&kn()){const t=fn(w.style,q,(null==tt?void 0:tt.style)||null);r(6,tt=t?{show_at_start:Boolean(null!==r(21,M=w.show_at_start)&&void 0!==M&&M),show_at_end:Boolean(null!==r(22,N=w.show_at_end)&&void 0!==N&&N),show_between:Boolean(null===r(23,T=w.show_between)||void 0===T||T),style:t}:null)}else r(6,tt=null);if(1&t.$$.dirty[0]&&(r(14,p=K.getDerivedFromVars(B.line_separator)),j(),j=f(p,(t=>r(33,b=t)))),117440672&t.$$.dirty[0]|4&t.$$.dirty[1])if((null==b?void 0:b.style)&&"overlap"!==X&&kn()){const t=fn(b.style,q,(null==et?void 0:et.style)||null);r(7,et=t?{show_at_start:Boolean(null!==r(24,I=b.show_at_start)&&void 0!==I&&I),show_at_end:Boolean(null!==r(25,J=b.show_at_end)&&void 0!==J&&J),show_between:Boolean(null===r(26,O=b.show_between)||void 0===O||O),style:t}:null)}else r(7,et=null);if(224&t.$$.dirty[0]&&r(13,g=tt||et?function(t,e,n){const r={};return gn(r,e,"vertical"===t),gn(r,n,"horizontal"===t),r}(X,tt,et):null),1&t.$$.dirty[0]&&(r(12,h=K.getDerivedFromVars(B.width)),A(),A=f(h,(t=>r(31,$=t)))),1&t.$$.dirty[0]&&(r(11,m=K.getDerivedFromVars(B.height)),V(),V=f(m,(t=>r(32,_=t)))),939524392&t.$$.dirty[0]|3&t.$$.dirty[1]){let t={};(null==L?void 0:L.fakeElement)&&(t.fakeElement=!0),"overlap"===X&&(t.overlapParent=!0),"horizontal"!==X&&(t.parentHAlign=U[Q],(!_||"wrap_content"===_.type||"match_parent"===_.type&&(null==L?void 0:L.parentVerticalWrapContent))&&(t.parentVerticalWrapContent=!0)),"vertical"!==X&&(t.parentVAlign=H[Y],("wrap_content"===(null==$?void 0:$.type)||"match_parent"===(null==$?void 0:$.type)&&(null==L?void 0:L.parentHorizontalWrapContent))&&(t.parentHorizontalWrapContent=!0)),"horizontal"===X&&(t.parentContainerOrientation="horizontal"),"vertical"===X&&(t.parentContainerOrientation="vertical"),u&&(t.parentContainerWrap=!0),r(8,nt=de(t,nt))}939524128&t.$$.dirty[0]&&r(10,v={orientation:X,valign:Y,halign:Q,wrap:u}),224&t.$$.dirty[0]&&r(9,y={gap:tt||et?hn(X,tt,et):void 0})},[B,R,W,L,G,X,tt,et,nt,y,v,m,h,g,p,d,c,s,l,a,i,M,N,T,I,J,O,Y,Q,u,o,$,_,b,w,x,k,C,E]}const Fn={separator:"divkit-a30bb",separator_orientation_horizontal:"divkit-f529e",separator_orientation_vertical:"divkit-e9e27",separator__inner:"divkit-db7d8"};function zn(t,e){return"vertical"===t||"horizontal"===t?t:e}function Mn(t){let e,n,r;return{c(){e=F("span"),J(e,"class",n=Fn.separator__inner),J(e,"style",r=Jt(t[5]))},m(t,n){P(t,e,n)},p(t,n){32&n&&r!==(r=Jt(t[5]))&&J(e,"style",r)},d(t){t&&S(e)}}}function Nn(t){let e,n=t[6]&&Mn(t);return{c(){n&&n.c(),e=T()},m(t,r){n&&n.m(t,r),P(t,e,r)},p(t,r){t[6]?n?n.p(t,r):(n=Mn(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&S(e)}}}function Tn(t){let e,n;return e=new Oe({props:{cls:ne("separator",Fn,t[4]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Nn]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){let[r]=n;const o={};16&r&&(o.cls=ne("separator",Fn,t[4])),1&r&&(o.json=t[0]),4&r&&(o.origJson=t[2]),2&r&&(o.templateContext=t[1]),8&r&&(o.layoutParams=t[3]),16480&r&&(o.$$scope={dirty:r,ctx:t}),e.$set(o)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function In(t,e,r){let o,i,a,l,s,c,u,d=n;t.$$.on_destroy.push((()=>d()));let{json:p={}}=e,{templateContext:g}=e,{origJson:h}=e,{layoutParams:m}=e;const v=Z(Mt);let y="horizontal",$="rgba(0,0,0,0.08)";return t.$$set=t=>{"json"in t&&r(0,p=t.json),"templateContext"in t&&r(1,g=t.templateContext),"origJson"in t&&r(2,h=t.origJson),"layoutParams"in t&&r(3,m=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&(r(7,o=v.getDerivedFromVars(p.delimiter_style)),d(),d=f(o,(t=>r(12,u=t)))),4352&t.$$.dirty&&r(8,y=zn(null==u?void 0:u.orientation,y)),4096&t.$$.dirty&&r(6,i=!((null==u?void 0:u.color)&&("transparent"===u.color||9===u.color.length&&0===u.color.indexOf("#00")))),4608&t.$$.dirty&&r(9,$=Wt(null==u?void 0:u.color,1,$)),256&t.$$.dirty&&r(11,a="horizontal"===y?"100%":Ot(1)),256&t.$$.dirty&&r(10,l="horizontal"===y?Ot(1):"100%"),3584&t.$$.dirty&&r(5,s={background:$,width:a,height:l}),256&t.$$.dirty&&r(4,c={orientation:y})},[p,g,h,m,c,s,i,o,y,$,l,a,u]}const Jn={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 On(t){let e,n;return e=new Oe({props:{cls:ne("image",Jn,t[10]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],style:t[9],customDescription:!0,$$slots:{default:[Wn]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=ne("image",Jn,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]),512&n[0]&&(r.style=t[9]),66928&n[0]|1073741824&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function Bn(t){let e,n,r,o,i,a,s;return{c(){e=F("img"),J(e,"class",n=Jn.image__image),u(e.src,r=t[4]===Hn?Un:t[6])||J(e,"src",r),J(e,"loading","lazy"),J(e,"decoding","async"),J(e,"style",o=Jt(t[8])),J(e,"alt",t[16]),J(e,"aria-hidden",i=t[16]?null:"true")},m(n,r){P(n,e,r),a||(s=[I(e,"load",t[26]),I(e,"error",t[27])],a=!0)},p(t,n){80&n[0]&&!u(e.src,r=t[4]===Hn?Un:t[6])&&J(e,"src",r),256&n[0]&&o!==(o=Jt(t[8]))&&J(e,"style",o),65536&n[0]&&J(e,"alt",t[16]),65536&n[0]&&i!==(i=t[16]?null:"true")&&J(e,"aria-hidden",i)},d(t){t&&S(e),a=!1,l(s)}}}function Rn(t){let e,n,r,o,i,a,s,c,d,p="".concat(t[5],"%");return{c(){e=F("span"),n=F("img"),J(n,"class",r=Jn.image__image),u(n.src,o=t[4]===Hn?Un:t[6])||J(n,"src",o),J(n,"loading","lazy"),J(n,"decoding","async"),J(n,"style",i=Jt(t[8])),J(n,"alt",t[16]),J(n,"aria-hidden",a=t[16]?null:"true"),J(e,"class",s=Jn["image__aspect-wrapper"]),R(e,"padding-bottom",p,!1)},m(r,o){P(r,e,o),A(e,n),c||(d=[I(n,"load",t[26]),I(n,"error",t[27])],c=!0)},p(t,r){80&r[0]&&!u(n.src,o=t[4]===Hn?Un:t[6])&&J(n,"src",o),256&r[0]&&i!==(i=Jt(t[8]))&&J(n,"style",i),65536&r[0]&&J(n,"alt",t[16]),65536&r[0]&&a!==(a=t[16]?null:"true")&&J(n,"aria-hidden",a),32&r[0]&&p!==(p="".concat(t[5],"%"))&&R(e,"padding-bottom",p,!1)},d(t){t&&S(e),c=!1,l(d)}}}function Wn(t){let e;function n(t,e){return t[10].aspect?Rn:Bn}let r=n(t),o=r(t);return{c(){o.c(),e=T()},m(t,n){o.m(t,n),P(t,e,n)},p(t,i){r===(r=n(t))&&o?o.p(t,i):(o.d(1),o=r(t),o&&(o.c(),o.m(e.parentNode,e)))},d(t){o.d(t),t&&S(e)}}}function Ln(t){let e,n,r=!t[7]&&On(t);return{c(){r&&r.c(),e=T()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[7]?r&&(vt(),_t(r,1,1,(()=>{r=null})),yt()):r?(r.p(t,n),128&n[0]&&$t(r,1)):(r=On(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}const Un="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Hn=2;function qn(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k,C,E,A,V,j,P,S,D,F,z,M,N,T,I,J,O=n,B=n,R=n,W=n,L=n,U=n,H=n,q=n,K=n,G=n,Y=n,Q=n,tt=n,et=n;t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>Q())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>et()));let{json:nt={}}=e,{templateContext:rt}=e,{origJson:ot}=e,{layoutParams:it}=e;const at=Z(Mt);let lt=0,st="rgba(0,0,0,0.08)",ct=!1,ut="",dt="none",pt="50% 50%";let ft,gt="0",ht="source_in",mt="",vt="",yt=0,$t=0,_t=0,bt="",wt="";return X((()=>{at.removeSvgFilter(ft,ht)})),t.$$set=t=>{"json"in t&&r(0,nt=t.json),"templateContext"in t&&r(1,rt=t.templateContext),"origJson"in t&&r(2,ot=t.origJson),"layoutParams"in t&&r(3,it=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(25,o=at.getDerivedFromVars(nt.image_url)),et(),et=f(o,(t=>r(56,J=t)))),1&t.$$.dirty[0]&&(r(24,i=at.getDerivedFromVars(nt.gif_url)),tt(),tt=f(i,(t=>r(55,I=t)))),50331648&t.$$.dirty[1]&&r(6,a=J||I),64&t.$$.dirty[0]&&r(4,lt=0),64&t.$$.dirty[0]&&(a?r(7,ct=!1):(r(7,ct=!0),at.logError(Nt(new Error('Missing "image_url" for "image"'))))),1&t.$$.dirty[0]&&(r(23,l=at.getDerivedFromVars(nt.width)),Q(),Q=f(l,(t=>r(54,T=t)))),8388608&t.$$.dirty[1]&&r(42,s="wrap_content"===(null==T?void 0:T.type)),1&t.$$.dirty[0]&&(r(22,c=at.getDerivedFromVars(nt.height)),Y(),Y=f(c,(t=>r(53,N=t)))),4194304&t.$$.dirty[1]&&r(41,u="wrap_content"===(null==N?void 0:N.type)),1&t.$$.dirty[0]&&(r(21,d=at.getDerivedFromVars(nt.preview)),G(),G=f(d,(t=>r(52,M=t)))),16&t.$$.dirty[0]|2097152&t.$$.dirty[1]){const t=M;0!==lt&<!==Hn||!t?r(29,ut=""):t.startsWith("data:")?r(29,ut='url("'.concat(Ht(t),'")')):r(29,ut='url("data:image/jpg;base64,'.concat(Ht(t),'")'))}if(1&t.$$.dirty[0]&&(r(20,p=at.getDerivedFromVars(nt.placeholder_color)),K(),K=f(p,(t=>r(51,z=t)))),16&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&function(t,e){r(28,st=0===t||t===Hn?Wt(e,1,st):"")}(lt,z),1&t.$$.dirty[0]&&(r(19,g=at.getDerivedFromVars(nt.scale)),q(),q=f(g,(t=>r(50,F=t)))),1073741824&t.$$.dirty[0]|524288&t.$$.dirty[1]&&r(30,dt=Yt(F)||dt),1&t.$$.dirty[0]&&(r(18,h=at.getDerivedFromVars({content_alignment_horizontal:nt.content_alignment_horizontal,content_alignment_vertical:nt.content_alignment_vertical})),H(),H=f(h,(t=>r(49,D=t)))),262144&t.$$.dirty[1]&&r(31,pt=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:Zt(t)}(D,pt)),1&t.$$.dirty[0]&&(r(17,m=at.getDerivedFromVars(nt.accessibility)),U(),U=f(m,(t=>r(48,S=t)))),131072&t.$$.dirty[1]&&r(16,v=(null==S?void 0:S.description)||""),1&t.$$.dirty[0]&&(r(15,y=at.getDerivedFromVars(nt.aspect)),L(),L=f(y,(t=>r(47,P=t)))),65536&t.$$.dirty[1]){const t=null==P?void 0:P.ratio;t&&ke(t)?r(5,gt=(100/Number(t)).toFixed(2)):r(5,gt="0")}if(1&t.$$.dirty[0]&&(r(14,$=at.getDerivedFromVars(nt.tint_color)),W(),W=f($,(t=>r(46,j=t)))),1&t.$$.dirty[0]&&(r(13,_=at.getDerivedFromVars(nt.tint_mode)),R(),R=f(_,(t=>r(45,V=t)))),49158&t.$$.dirty[1]){const t=j,e=t?Wt(t):void 0,n=Ze(V,ht);e===ft&&n===ht||(at.removeSvgFilter(ft,ht),r(34,mt=e?at.addSvgFilter(e,n):""),r(32,ft=e),r(33,ht=n))}if(1&t.$$.dirty[0]&&(r(12,b=at.getDerivedFromVars(nt.appearance_animation)),B(),B=f(b,(t=>r(44,A=t)))),8192&t.$$.dirty[1]&&A&&"fade"===A.type){const t=A;r(35,vt=pe(t.interpolator,"ease_in_out").replace(/_/g,"-")),r(38,_t=se(t.duration,300)),r(37,$t=se(t.start_delay,0)),r(36,yt=se(t.alpha,0))}if(1&t.$$.dirty[0]&&(r(11,w=at.getDerivedFromVars(nt.filters)),O(),O=f(w,(t=>r(43,E=t)))),4096&t.$$.dirty[1]){let t="",e="";Array.isArray(E)&&E.length&&(t=Ce(E,at.logError)),t&&(e="polygon(0% 0%, 0% 100%, 100% 100%, 100% 0%)"),r(39,bt=t),r(40,wt=e)}48&t.$$.dirty[0]|3088&t.$$.dirty[1]&&r(10,x={aspect:"0"!==gt,"is-width-content":s,"is-height-content":u,loaded:1===lt,"before-appearance":Boolean(vt)&&0===lt}),1879048192&t.$$.dirty[0]&&r(9,k={"background-image":ut,"background-color":ut?void 0:st,"background-size":dt}),1073741840&t.$$.dirty[0]|1017&t.$$.dirty[1]&&r(8,C={"object-fit":dt,"object-position":pt,filter:[1===lt&&mt?"url(#".concat(mt,")"):"",bt].filter(Boolean).join(" "),"clip-path":wt||void 0,"--divkit-appearance-interpolator":vt||void 0,"--divkit-appearance-fade-start":vt?yt:void 0,"--divkit-appearance-delay":vt?"".concat($t,"ms"):void 0,"--divkit-appearance-duration":vt?"".concat(_t,"ms"):void 0})},[nt,rt,ot,it,lt,gt,a,ct,C,k,x,w,b,_,$,y,v,m,h,g,p,d,c,l,i,o,function(){0===lt&&r(4,lt=1)},function(){0===lt&&r(4,lt=Hn)},st,ut,dt,pt,ft,ht,mt,vt,yt,$t,_t,bt,wt,u,s,E,A,V,j,P,S,D,F,z,M,N,T,I,J]}const Kn=class extends St{constructor(t){super(),Pt(this,t,qn,Ln,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Gn={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 Xn(t){return t>0&&t<1}function Yn(t){return String(Math.ceil(1e3*t)/1e3)}function Zn(t,e,n){if(t.some(Xn)){const e=Math.max(...t.filter(Xn).map((t=>1/t)));t=t.map((t=>t*e))}let r=0,o=0;const i=[];if(t.every(Boolean)){o=t.reduce(((t,e)=>t+e),0);for(let i=0;i<n;++i){if(!e[i])continue;const n=e[i]/t[i]*o;n>r&&(r=n)}}for(let e=0;e<n;++e)r?i[e]="minmax(".concat(Ot(r*t[e]/o),",").concat(Yn(t[e]),"fr)"):t[e]?i[e]="".concat(Yn(t[e]),"fr"):i[e]="auto";return i.join(" ")}function Qn(t,e,n){const r=t.slice();return r[29]=e[n],r}function tr(t){let e,n;return e=new Oe({props:{cls:ne("grid",Gn,t[8]),json:t[0],origJson:t[2],templateContext:t[1],style:t[7],layoutParams:t[3],$$slots:{default:[nr]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=ne("grid",Gn,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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function er(t){let e,n;return e=new oi({props:{layoutParams:t[29].layoutParams,div:t[29].json,templateContext:t[29].templateContext,origJson:t[29].origJson}}),{c(){At(e.$$.fragment)},m(t,r){Vt(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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function nr(t){let e,n,r=t[5],o=[];for(let e=0;e<r.length;e+=1)o[e]=er(Qn(t,r,e));const i=t=>_t(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=T()},m(t,r){for(let e=0;e<o.length;e+=1)o[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 i=Qn(t,r,a);o[a]?(o[a].p(i,n),$t(o[a],1)):(o[a]=er(i),o[a].c(),$t(o[a],1),o[a].m(e.parentNode,e))}for(vt(),a=r.length;a<o.length;a+=1)i(a);yt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)$t(o[t]);n=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)_t(o[t]);n=!1},d(t){D(o,t),t&&S(e)}}}function rr(t){let e,n,r=!t[6]&&tr(t);return{c(){r&&r.c(),e=T()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[6]?r&&(vt(),_t(r,1,1,(()=>{r=null})),yt()):r?(r.p(t,n),64&n[0]&&$t(r,1)):(r=tr(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function or(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,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 C=Z(Mt);let E,A,V=!1,j=1,P=[],S=[],D=[],F=[],z=0,M=!1,N="top",T="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,o=b.items),8388608&t.$$.dirty[0]&&((null==o?void 0:o.length)&&Array.isArray(o)?r(12,V=!1):(r(12,V=!0),C.logError(Nt(new Error('Incorrect or empty "items" prop for div "grid"'))))),1&t.$$.dirty[0]&&(r(11,i=C.getDerivedFromVars(b.column_count)),_(),_=f(i,(t=>r(27,m=t)))),134225920&t.$$.dirty[0]&&r(13,j=Re(m,j)),8392706&t.$$.dirty[0]&&r(22,a=(!V&&o||[]).map((t=>{let e=t,n=w;return({templateContext:n,json:e}=C.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),4194304&t.$$.dirty[0]){let t=[];a.forEach((e=>{t.push(C.getDerivedFromVars({rowSpan:e.json.row_span,columnSpan:e.json.column_span,width:e.json.width,height:e.json.height}))})),r(4,E=zt(t,(t=>[...t]))),$(),$=f(E,(t=>r(26,h=t)))}if(72081416&t.$$.dirty[0]){const t={};let e=0,n=0;r(14,P=[]),r(15,S=[]),r(16,D=[]),r(17,F=[]),r(19,M=!1),r(5,A=a.map(((o,i)=>{var a,l,s,c;const u=h[i],d=Number(u.columnSpan)||1,p=Number(u.rowSpan)||1,f={x:e,y:n,colSpan:d,rowSpan:p},g="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)/p: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===p&&"fixed"===(null===(c=u.height)||void 0===c?void 0:c.type)&&u.height.value?Number(u.height.value)/p:0;for(let o=e;o<e+d;++o)for(let e=n;e<n+p;++e)t[o+"_"+e]?r(19,M=!0):(t[o+"_"+e]=!0,(!P[o]||P[o]<g)&&r(14,P[o]=g,P),(!S[e]||S[e]<m)&&r(15,S[e]=m,S),(!D[o]||D[o]<v)&&r(16,D[o]=v,D),(!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({},o),{layoutParams:{gridArea:f,fakeElement:(null==k?void 0:k.fakeElement)||!1}})}))),0!==e&&r(19,M=!0),M&&C.logError(Nt(new Error('Mismatching "grid" rows/columns'))),r(18,z=n)}1&t.$$.dirty[0]&&(r(10,l=C.getDerivedFromVars(b.content_alignment_vertical)),y(),y=f(l,(t=>r(25,g=t)))),34603008&t.$$.dirty[0]&&r(20,N=Ye(g,N)),1&t.$$.dirty[0]&&(r(9,s=C.getDerivedFromVars(b.content_alignment_horizontal)),v(),v=f(s,(t=>r(24,p=t)))),18874368&t.$$.dirty[0]&&r(21,T=Xe(p,T)),3145728&t.$$.dirty[0]&&r(8,c={valign:N,halign:T}),516096&t.$$.dirty[0]&&r(7,u={"grid-template-columns":Zn(P,D,j),"grid-template-rows":Zn(S,F,z)}),528384&t.$$.dirty[0]&&r(6,d=V||M)},[b,w,x,k,E,A,d,u,c,s,l,i,V,j,P,S,D,F,z,M,N,T,a,o,p,g,h,m]}const ir={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 ar(t){const e=[];let n=t[0],r=1;for(let o=1;o<=t.length;o++)t[o]!==n?(e.push(r>1?"repeat(".concat(r,", ").concat(n,")"):n),n=t[o],r=1):r++;return e.join(" ")}function lr(t,e){let n;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];null!==n&&clearTimeout(n),n=setTimeout((()=>{t.apply(this,o),n=null}),e)}}const{Boolean:sr}=xt;function cr(t,e,n){const r=t.slice();return r[72]=e[n],r[73]=e,r[74]=n,r}function ur(t,e,n){const r=t.slice();return r[75]=e[n],r}function dr(t){let e,n;return e=new Oe({props:{cls:ne("gallery",ir,t[16]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,customActions:"gallery",forceHeight:"vertical"===t[6],forceWidth:"horizontal"===t[6],$$slots:{default:[vr]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){const r={};65536&n[0]&&(r.cls=ne("gallery",ir,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]),64&n[0]&&(r.forceHeight="vertical"===t[6]),64&n[0]&&(r.forceWidth="horizontal"===t[6]),335953872&n[0]|65536&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function pr(t){let e,n;return e=new oi({props:{layoutParams:t[8],div:t[75].json,templateContext:t[75].templateContext,origJson:t[75].origJson}}),{c(){At(e.$$.fragment)},m(t,r){Vt(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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function fr(t){let e,n,r,o,i,a=t[74],l=t[72],s=[];for(let e=0;e<l.length;e+=1)s[e]=pr(ur(t,l,e));const c=t=>_t(s[t],1,1,(()=>{s[t]=null})),u=()=>t[60](e,a),d=()=>t[60](null,a);return{c(){e=F("div");for(let t=0;t<s.length;t+=1)s[t].c();n=N(),J(e,"class",r=ir.gallery__items),J(e,"style",o=Jt(t[17]))},m(t,r){P(t,e,r);for(let t=0;t<s.length;t+=1)s[t].m(e,null);A(e,n),u(),i=!0},p(r,p){if(t=r,67109120&p[0]){let r;for(l=t[72],r=0;r<l.length;r+=1){const o=ur(t,l,r);s[r]?(s[r].p(o,p),$t(s[r],1)):(s[r]=pr(o),s[r].c(),$t(s[r],1),s[r].m(e,n))}for(vt(),r=l.length;r<s.length;r+=1)c(r);yt()}(!i||131072&p[0]&&o!==(o=Jt(t[17])))&&J(e,"style",o),a!==t[74]&&(d(),a=t[74],u())},i(t){if(!i){for(let t=0;t<l.length;t+=1)$t(s[t]);i=!0}},o(t){s=s.filter(sr);for(let t=0;t<s.length;t+=1)_t(s[t]);i=!1},d(t){t&&S(e),D(s,t),d()}}}function gr(t){let e,n,r=t[12]&&t[9]&&hr(t),o=t[13]&&t[9]&&mr(t);return{c(){r&&r.c(),e=N(),o&&o.c(),n=T()},m(t,i){r&&r.m(t,i),P(t,e,i),o&&o.m(t,i),P(t,n,i)},p(t,i){t[12]&&t[9]?r?r.p(t,i):(r=hr(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),t[13]&&t[9]?o?o.p(t,i):(o=mr(t),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null)},d(t){r&&r.d(t),t&&S(e),o&&o.d(t),t&&S(n)}}}function hr(t){let e,r,o,i,a=!t[29]&&function(t){let e,r,o,i;return{c(){e=z("svg"),r=z("path"),J(r,"class",o=ir["gallery__arrow-icon-path"]),J(r,"d","m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"),J(e,"class",i=ir["gallery__arrow-icon"]),J(e,"xmlns","http://www.w3.org/2000/svg"),J(e,"width","32"),J(e,"height","32"),J(e,"viewBox","0 0 32 32"),J(e,"fill","none")},m(t,n){P(t,e,n),A(e,r)},p:n,d(t){t&&S(e)}}}();return{c(){e=F("div"),a&&a.c(),J(e,"class",r=t[29]||"".concat(ir.gallery__arrow," ").concat(ir.gallery__arrow_left))},m(n,r){P(n,e,r),a&&a.m(e,null),o||(i=I(e,"click",t[63]),o=!0)},p(t,e){t[29]||a.p(t,e)},d(t){t&&S(e),a&&a.d(),o=!1,i()}}}function mr(t){let e,r,o,i,a=!t[30]&&function(t){let e,r,o,i;return{c(){e=z("svg"),r=z("path"),J(r,"class",o=ir["gallery__arrow-icon-path"]),J(r,"d","M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"),J(e,"class",i=ir["gallery__arrow-icon"]),J(e,"xmlns","http://www.w3.org/2000/svg"),J(e,"width","32"),J(e,"height","32"),J(e,"viewBox","0 0 32 32"),J(e,"fill","none")},m(t,n){P(t,e,n),A(e,r)},p:n,d(t){t&&S(e)}}}();return{c(){e=F("div"),a&&a.c(),J(e,"class",r=t[30]||"".concat(ir.gallery__arrow," ").concat(ir.gallery__arrow_right))},m(n,r){P(n,e,r),a&&a.m(e,null),o||(i=I(e,"click",t[64]),o=!0)},p(t,e){t[30]||a.p(t,e)},d(t){t&&S(e),a&&a.d(),o=!1,i()}}}function vr(t){let e,n,r,o,i,a,l,c,u,d,p,f=t[26],g=[];for(let e=0;e<f.length;e+=1)g[e]=fr(cr(t,f,e));const h=t=>_t(g[t],1,1,(()=>{g[t]=null}));let m="horizontal"===t[6]&&gr(t);return{c(){e=F("div"),n=F("div");for(let t=0;t<g.length;t+=1)g[t].c();l=N(),m&&m.c(),c=T(),J(n,"class",r=ir["gallery__items-grid"]),J(n,"style",o=Jt(t[18])),J(e,"class",i=ir.gallery__scroller+" "+(t[28]?"divkit-aa145":"")),J(e,"style",a=Jt(t[7]))},m(r,o){P(r,e,o),A(e,n);for(let t=0;t<g.length;t+=1)g[t].m(n,null);t[61](n),t[62](e),P(r,l,o),m&&m.m(r,o),P(r,c,o),u=!0,d||(p=I(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(f=t[26],e=0;e<f.length;e+=1){const r=cr(t,f,e);g[e]?(g[e].p(r,l),$t(g[e],1)):(g[e]=fr(r),g[e].c(),$t(g[e],1),g[e].m(n,null))}for(vt(),e=f.length;e<g.length;e+=1)h(e);yt()}(!u||262144&l[0]&&o!==(o=Jt(t[18])))&&J(n,"style",o),(!u||268435456&l[0]&&i!==(i=ir.gallery__scroller+" "+(t[28]?"divkit-aa145":"")))&&J(e,"class",i),(!u||128&l[0]&&a!==(a=Jt(t[7])))&&J(e,"style",a),"horizontal"===t[6]?m?m.p(t,l):(m=gr(t),m.c(),m.m(c.parentNode,c)):m&&(m.d(1),m=null)},i(t){if(!u){for(let t=0;t<f.length;t+=1)$t(g[t]);u=!0}},o(t){g=g.filter(sr);for(let t=0;t<g.length;t+=1)_t(g[t]);u=!1},d(n){n&&S(e),D(g,n),t[61](null),t[62](null),n&&S(l),m&&m.d(n),n&&S(c),d=!1,p()}}}function yr(t){let e,n,r,o,i=!t[5]&&dr(t);return{c(){i&&i.c(),e=T()},m(a,l){i&&i.m(a,l),P(a,e,l),n=!0,r||(o=I(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]?i&&(vt(),_t(i,1,1,(()=>{i=null})),yt()):i?(i.p(t,r),32&r[0]&&$t(i,1)):(i=dr(t),i.c(),$t(i,1),i.m(e.parentNode,e))},i(t){n||($t(i),n=!0)},o(t){_t(i),n=!1},d(t){i&&i.d(t),t&&S(e),r=!1,o()}}}function $r(t,e,r){let o,i,a,l,s,c,u,d,p,h,m,v,y,$,_,b,w,x,k,C,E,A,V,j,P,S,D,F,z=n,M=n,N=n,T=n,I=n,J=n,O=n,B=n,R=n,W=n;t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>W()));let{json:L={}}=e,{templateContext:U}=e,{origJson:H}=e,{layoutParams:q}=e;const K=Z(Mt);let Y,Q,tt=[],nt=!1,rt=!1,ot=null,it=!1;const at=K.getCustomization("galleryLeftClass"),lt=K.getCustomization("galleryRightClass");let st=!1;const ct=K.isDesktop;g(t,ct,(t=>r(59,D=t)));let ut,dt,pt,ft,gt=1,ht="horizontal",mt="start",vt=8,yt="",$t=[],_t={},bt=!1,wt={},xt=0;function kt(){const t=Y.scrollLeft,e=Y.scrollWidth,n=Y.offsetWidth;r(12,nt=t>2),r(13,rt=t+n<e-2)}const Ct=lr(kt,50);function Et(t){Y.scroll({left:Y.scrollLeft+.75*Y.offsetWidth*("right"===t?1:-1),behavior:"smooth"})}function At(){let t=[],e=tt[0].children.length;for(let n=0;n<e;++n)for(let e=0;e<gt;++e){const r=tt[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"===ht,o=r?"offsetLeft":"offsetTop",i=r?"left":"top";Y.scroll({[i]:Math.max(0,t[e][o]-vt/2),behavior:n})}function jt(t){const e=At(),n=Y.getBoundingClientRect(),r=e.findIndex((t=>function(t,e){return"horizontal"===ht?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 o=e.map((t=>function(t,e){return"horizontal"===ht?e.right>t.left&&t.right>e.left:e.bottom>t.top&&t.bottom>e.top}(n,t.getBoundingClientRect()))),i=o.findIndex(Boolean);return-1!==i?"prev"===t&&2===o.filter(Boolean).length?i+1:i:"prev"===t?1:e.length-2}return!L.id||st||(null==q?void 0:q.fakeElement)||K.registerInstance(L.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"===ht?Y.scrollLeft+Y.offsetWidth===Y.scrollWidth:Y.scrollTop+Y.offsetHeight===Y.scrollHeight,n=At();if(e&&"ring"===t)return void Vt(n,0);const r=jt("next");let o=r+1;o>n.length-1&&(o="ring"===t?0:r),Vt(n,o)}}),G((()=>{r(36,it=!0),!st&&(Ct(),xt)&&Vt(At(),xt,"auto")})),X((()=>{r(36,it=!1),L.id&&!(null==q?void 0:q.fakeElement)&&K.unregisterInstance(L.id)})),t.$$set=t=>{"json"in t&&r(0,L=t.json),"templateContext"in t&&r(1,U=t.templateContext),"origJson"in t&&r(2,H=t.origJson),"layoutParams"in t&&r(3,q=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(49,o=L.items),262144&t.$$.dirty[1]&&((null==o?void 0:o.length)&&Array.isArray(o)?r(5,st=!1):(r(5,st=!0),K.logError(Nt(new Error('Incorrect or empty "items" prop for div "gallery"'))))),34&t.$$.dirty[0]|262144&t.$$.dirty[1]&&r(48,i=(!st&&o||[]).map((t=>{let e=t,n=U;return({templateContext:n,json:e}=K.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),32&t.$$.dirty[0]|268435488&t.$$.dirty[1]&&r(9,a=D&&it&&!st),528&t.$$.dirty[0]|16&t.$$.dirty[1]&&(a?"undefined"!=typeof ResizeObserver&&(r(35,ot=new ResizeObserver((()=>{Ct()}))),ot.observe(Q)):ot&&(ot.disconnect(),r(35,ot=null))),1&t.$$.dirty[0]&&(r(27,l=K.getDerivedFromVars(L.column_count)),R(),R=f(l,(t=>r(58,S=t)))),134217792&t.$$.dirty[1]&&r(37,gt=Re(S,gt)),131136&t.$$.dirty[1]&&r(26,s=function(t,e){let n=0,r=[];for(let o=0;o<t.length;++o)r[n]||(r[n]=[]),r[n].push(t[o]),++n>=e&&(n=0);return r}(i,gt)),1&t.$$.dirty[0]&&(r(25,c=K.getDerivedFromVars(L.orientation)),B(),B=f(c,(t=>r(57,P=t)))),64&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&r(6,ht=zn(P,ht)),1&t.$$.dirty[0]&&(r(24,u=K.getDerivedFromVars(L.cross_content_alignment)),O(),O=f(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=K.getDerivedFromVars(L.item_spacing)),J(),J=f(d,(t=>r(55,V=t)))),16777728&t.$$.dirty[1]&&(r(40,vt=se(V,vt)),r(39,ut=Ot(vt))),1&t.$$.dirty[0]&&(r(22,p=K.getDerivedFromVars(L.cross_spacing)),I(),I=f(p,(t=>r(54,A=t)))),8391168&t.$$.dirty[1]&&(r(42,pt=se(A,vt)),r(41,dt=Ot(pt))),1&t.$$.dirty[0]&&(r(21,h=K.getDerivedFromVars(L.paddings)),T(),T=f(h,(t=>r(53,E=t)))),4198400&t.$$.dirty[1]&&r(43,yt=le(E,yt)),64&t.$$.dirty[0]&&r(47,m="horizontal"===ht?"grid-template-columns":"grid-template-rows"),64&t.$$.dirty[0]|131072&t.$$.dirty[1]){let t=[];i.forEach((e=>{const n="horizontal"===ht?"width":"height";t.push(K.getDerivedFromVars(e.json[n]))})),r(14,ft=zt(t,(t=>t))),N(),N=f(ft,(t=>r(52,C=t)))}if(64&t.$$.dirty[0]|2105408&t.$$.dirty[1]&&(r(44,$t=[]),gt>1?$t.push("auto"):C.forEach((t=>{!t&&"horizontal"===ht||"match_parent"===(null==t?void 0:t.type)?$t.push("100%"):$t.push("max-content")}))),1&t.$$.dirty[0]&&(r(20,v=K.getDerivedFromVars(L.scroll_mode)),M(),M=f(v,(t=>r(51,k=t)))),456&t.$$.dirty[0]|1049280&t.$$.dirty[1]){const t={};let e={};r(45,bt=!1),(null==q?void 0:q.fakeElement)&&(e.fakeElement=!0),"horizontal"===ht?e.parentVAlign=mt:e.parentHAlign=mt,"paging"===k&&(r(45,bt=!0),e.scrollSnap="start",t["horizontal"===ht?"scroll-padding-left":"scroll-padding-top"]=Ot(vt/2)),1===gt&&(e.parentLayoutOrientation=ht),r(7,_t=de(t,_t)),r(8,wt=de(e,wt))}1&t.$$.dirty[0]&&(r(19,y=K.getDerivedFromVars(L.restrict_parent_scroll)),W(),W=f(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]:ar($t)}),64&t.$$.dirty[0]|16384&t.$$.dirty[1]&&r(16,b={orientation:ht,"scroll-snap":bt}),1&t.$$.dirty[0]&&(r(15,w=K.getDerivedFromVars(L.default_item)),z(),z=f(w,(t=>r(50,x=t)))),557056&t.$$.dirty[1]&&r(46,xt=se(x,xt))},[L,U,H,q,Q,st,ht,_t,wt,a,Y,tt,nt,rt,ft,w,b,_,$,y,v,h,p,d,u,c,s,l,F,at,lt,ct,kt,Ct,Et,ot,it,gt,mt,ut,vt,dt,pt,yt,$t,bt,xt,m,i,o,x,k,C,E,A,V,j,P,S,D,function(t,e){et[t?"unshift":"push"]((()=>{tt[e]=t,r(11,tt)}))},function(t){et[t?"unshift":"push"]((()=>{Q=t,r(4,Q)}))},function(t){et[t?"unshift":"push"]((()=>{Y=t,r(10,Y)}))},()=>Et("left"),()=>Et("right")]}const _r={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:br}=xt;function wr(t,e,n){const r=t.slice();return r[79]=e[n],r[81]=n,r}function xr(t,e,n){const r=t.slice();r[79]=e[n],r[81]=n;const o=r[81]===r[6];return r[82]=o,r}function kr(t){let e,n;return e=new Oe({props:{cls:ne("tabs",_r,t[39]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customActions:"tabs",$$slots:{default:[Pr]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(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]),1476394986&n[0]|64&n[1]|4194304&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function Cr(t){let e,n,r=t[79].title+"";return{c(){e=M(r),n=N()},m(t,r){P(t,e,r),P(t,n,r)},p(t,n){65536&n[0]&&r!==(r=t[79].title+"")&&B(e,r)},d(t){t&&S(e),t&&S(n)}}}function Er(t){var e,n,r;let o,i;function a(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t[55](t[81],...n)}return o=new xe({props:{cls:ne("tabs__item",_r,{selected:t[82],actionable:Boolean(t[79].title_click_action)}),actions:!t[79].title_click_action||null!==(e=t[3])&&void 0!==e&&e.fakeElement?[]:[t[79].title_click_action],attrs:{id:"".concat(t[38],"-tab-").concat(t[81]),"aria-controls":"".concat(t[38],"-panel-").concat(t[81]),role:"tab",tabindex:!t[82]||null!==(n=t[3])&&void 0!==n&&n.fakeElement?"-1":t[79].title_click_action?void 0:"0","aria-selected":t[82]?"true":"false"},customAction:null!==(r=t[3])&&void 0!==r&&r.fakeElement?null:a,$$slots:{default:[Cr]},$$scope:{ctx:t}}}),{c(){At(o.$$.fragment)},m(t,e){Vt(o,t,e),i=!0},p(e,n){var r,i,l;t=e;const s={};65600&n[0]&&(s.cls=ne("tabs__item",_r,{selected:t[82],actionable:Boolean(t[79].title_click_action)})),65544&n[0]&&(s.actions=!t[79].title_click_action||null!==(r=t[3])&&void 0!==r&&r.fakeElement?[]:[t[79].title_click_action]),65608&n[0]&&(s.attrs={id:"".concat(t[38],"-tab-").concat(t[81]),"aria-controls":"".concat(t[38],"-panel-").concat(t[81]),role:"tab",tabindex:!t[82]||null!==(i=t[3])&&void 0!==i&&i.fakeElement?"-1":t[79].title_click_action?void 0:"0","aria-selected":t[82]?"true":"false"}),8&n[0]&&(s.customAction=null!==(l=t[3])&&void 0!==l&&l.fakeElement?null:a),65536&n[0]|4194304&n[2]&&(s.$$scope={dirty:n,ctx:t}),o.$set(s)},i(t){i||($t(o.$$.fragment,t),i=!0)},o(t){_t(o.$$.fragment,t),i=!1},d(t){jt(o,t)}}}function Ar(t){let e,n,r;return{c(){e=F("div"),J(e,"class",n=_r.tabs__separator),J(e,"style",r=Jt(t[30]))},m(t,n){P(t,e,n)},p(t,n){1073741824&n[0]&&r!==(r=Jt(t[30]))&&J(e,"style",r)},d(t){t&&S(e)}}}function Vr(t){let e,n;return e=new oi({props:{div:t[79].div,templateContext:t[1],layoutParams:t[5]}}),{c(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){const r={};65536&n[0]&&(r.div=t[79].div),2&n[0]&&(r.templateContext=t[1]),32&n[0]&&(r.layoutParams=t[5]),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function jr(t){let e,n,r,o,i,a,l=t[25][t[81]]&&Vr(t);return{c(){e=F("div"),l&&l.c(),n=N(),J(e,"class",r=ne("tabs__panel",_r,{visible:t[26][t[81]]})),J(e,"role","tabpanel"),J(e,"id",o=t[38]+"-panel-"+t[81]),J(e,"aria-labelledby",i=t[38]+"-tab-"+t[81]),R(e,"left",100*t[81]+"%")},m(t,r){P(t,e,r),l&&l.m(e,null),A(e,n),a=!0},p(t,o){t[25][t[81]]?l?(l.p(t,o),33554432&o[0]&&$t(l,1)):(l=Vr(t),l.c(),$t(l,1),l.m(e,n)):l&&(vt(),_t(l,1,1,(()=>{l=null})),yt()),(!a||67108864&o[0]&&r!==(r=ne("tabs__panel",_r,{visible:t[26][t[81]]})))&&J(e,"class",r)},i(t){a||($t(l),a=!0)},o(t){_t(l),a=!1},d(t){t&&S(e),l&&l.d()}}}function Pr(t){let e,n,r,o,i,a,c,u,d,p,f,g=t[16],h=[];for(let e=0;e<g.length;e+=1)h[e]=Er(xr(t,g,e));const m=t=>_t(h[t],1,1,(()=>{h[t]=null}));let v=t[17]&&Ar(t),y=t[16],$=[];for(let e=0;e<y.length;e+=1)$[e]=jr(wr(t,y,e));const _=t=>_t($[t],1,1,(()=>{$[t]=null}));return{c(){e=F("div");for(let t=0;t<h.length;t+=1)h[t].c();r=N(),v&&v.c(),o=N(),i=F("div"),a=F("div");for(let t=0;t<$.length;t+=1)$[t].c();J(e,"class",n=_r.tabs__list+" "+(t[37]?"divkit-aa145":"")),J(e,"role","tablist"),R(e,"--divkit-tabs-font-size",Ot(t[7]),!1),R(e,"--divkit-tabs-paddings",t[8],!1),R(e,"--divkit-tabs-line-height",t[21],!1),R(e,"--divkit-tabs-letter-spacing",t[22],!1),R(e,"--divkit-tabs-active-font-weight",t[10]||"",!1),R(e,"--divkit-tabs-inactive-font-weight",t[11]||"",!1),R(e,"--divkit-tabs-active-text-color",t[12],!1),R(e,"--divkit-tabs-inactive-text-color",t[13],!1),R(e,"--divkit-tabs-active-background-color",t[14],!1),R(e,"--divkit-tabs-inactive-background-color",t[15],!1),R(e,"--divkit-tabs-border-radius",t[9],!1),J(a,"class",c=ne("tabs__swiper",_r,{inited:t[23],animated:t[24]})),J(i,"class",u=_r.tabs__panels+" "+(t[37]?"divkit-aa145":""))},m(n,l){P(n,e,l);for(let t=0;t<h.length;t+=1)h[t].m(e,null);t[56](e),P(n,r,l),v&&v.m(n,l),P(n,o,l),P(n,i,l),A(i,a);for(let t=0;t<$.length;t+=1)$[t].m(a,null);t[57](a),t[58](i),d=!0,p||(f=[I(e,"keydown",t[41]),I(a,"touchstart",(function(){s(t[28]?t[42]:void 0)&&(t[28]?t[42]:void 0).apply(this,arguments)})),I(a,"touchmove",(function(){s(t[28]?t[43]:void 0)&&(t[28]?t[43]:void 0).apply(this,arguments)})),I(a,"touchend",(function(){s(t[28]?t[44]:void 0)&&(t[28]?t[44]:void 0).apply(this,arguments)})),I(a,"touchcancel",(function(){s(t[28]?t[44]:void 0)&&(t[28]?t[44]:void 0).apply(this,arguments)}))],p=!0)},p(r,l){if(t=r,65608&l[0]|640&l[1]){let n;for(g=t[16],n=0;n<g.length;n+=1){const r=xr(t,g,n);h[n]?(h[n].p(r,l),$t(h[n],1)):(h[n]=Er(r),h[n].c(),$t(h[n],1),h[n].m(e,null))}for(vt(),n=g.length;n<h.length;n+=1)m(n);yt()}if((!d||64&l[1]&&n!==(n=_r.tabs__list+" "+(t[37]?"divkit-aa145":"")))&&J(e,"class",n),128&l[0]&&R(e,"--divkit-tabs-font-size",Ot(t[7]),!1),256&l[0]&&R(e,"--divkit-tabs-paddings",t[8],!1),2097152&l[0]&&R(e,"--divkit-tabs-line-height",t[21],!1),4194304&l[0]&&R(e,"--divkit-tabs-letter-spacing",t[22],!1),1024&l[0]&&R(e,"--divkit-tabs-active-font-weight",t[10]||"",!1),2048&l[0]&&R(e,"--divkit-tabs-inactive-font-weight",t[11]||"",!1),4096&l[0]&&R(e,"--divkit-tabs-active-text-color",t[12],!1),8192&l[0]&&R(e,"--divkit-tabs-inactive-text-color",t[13],!1),16384&l[0]&&R(e,"--divkit-tabs-active-background-color",t[14],!1),32768&l[0]&&R(e,"--divkit-tabs-inactive-background-color",t[15],!1),512&l[0]&&R(e,"--divkit-tabs-border-radius",t[9],!1),t[17]?v?v.p(t,l):(v=Ar(t),v.c(),v.m(o.parentNode,o)):v&&(v.d(1),v=null),100728866&l[0]|128&l[1]){let e;for(y=t[16],e=0;e<y.length;e+=1){const n=wr(t,y,e);$[e]?($[e].p(n,l),$t($[e],1)):($[e]=jr(n),$[e].c(),$t($[e],1),$[e].m(a,null))}for(vt(),e=y.length;e<$.length;e+=1)_(e);yt()}(!d||25165824&l[0]&&c!==(c=ne("tabs__swiper",_r,{inited:t[23],animated:t[24]})))&&J(a,"class",c),(!d||64&l[1]&&u!==(u=_r.tabs__panels+" "+(t[37]?"divkit-aa145":"")))&&J(i,"class",u)},i(t){if(!d){for(let t=0;t<g.length;t+=1)$t(h[t]);for(let t=0;t<y.length;t+=1)$t($[t]);d=!0}},o(t){h=h.filter(br);for(let t=0;t<h.length;t+=1)_t(h[t]);$=$.filter(br);for(let t=0;t<$.length;t+=1)_t($[t]);d=!1},d(n){n&&S(e),D(h,n),t[56](null),n&&S(r),v&&v.d(n),n&&S(o),n&&S(i),D($,n),t[57](null),t[58](null),p=!1,l(f)}}}function Sr(t){let e,n,r=!t[4]&&kr(t);return{c(){r&&r.c(),e=T()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[4]?r&&(vt(),_t(r,1,1,(()=>{r=null})),yt()):r?(r.p(t,n),16&n[0]&&$t(r,1)):(r=kr(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Dr(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k,C=n,E=n,A=n,V=n,j=n,P=n,S=n,D=n;var F;t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>D()));let{json:z={}}=e,{templateContext:M}=e,{origJson:N}=e,{layoutParams:T}=e;const I=Z(Mt),J=I.genId("tabs");let O,B,R,W=!1,L={};const U=I.getJsonWithVars(z.selected_tab);let H,q,K=U&&Number(U)||0,G=12,Y="",Q="",tt="",nt="",rt="",ot="",it="",at="",st="",ct="",ut=!1,dt=!1,pt=K,ft=[],gt=[];async function ht(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(pt=K,r(6,K=t),xt(),yt(),e){await lt();const t=O.querySelector(".".concat(_r.tabs__item_selected));t&&t.focus()}}function mt(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=null==o?void 0:o.length;if(!n)return;let r=K+t;r>=n?r=0:r<0&&(r=n-1),ht(r,e)}function vt(t,e){return K===e||(ht(e),!1)}function yt(){r(24,dt=!0),$t(100*-K),_t(),async function(){await lt();const t=document.getElementById("".concat(J,"-panel-").concat(K));t&&r(19,B.style.height=Ot(t.offsetHeight),B)}(),wt(),Et=-K*B.clientWidth}async function $t(t){await lt(),r(20,R.style.transform="translate3d(".concat(t,"%,0,0)"),R)}function _t(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=t?Math.max(0,K-1):Math.min(K,pt),n=t?Math.min(o.length-1,K+1):Math.max(K,pt);r(25,ft=ft.map(((t,r)=>t||r>=e&&r<=n))),r(26,gt=gt.map(((t,r)=>r>=e&&r<=n)))}let bt=null;function wt(){bt&&clearTimeout(bt),bt=window.setTimeout((()=>{r(26,gt=o.map(((t,e)=>e===K)))}),400)}function xt(){ut||(r(23,ut=!0),r(19,B.style.height=Ot(B.clientHeight),B),r(20,R.style.transform="translate3d(".concat(100*-pt,"%,0,0)"),R))}let kt,Ct,Et,At=null,Vt=null,jt=!1,Pt=!1;return!z.id||W||(null==T?void 0:T.fakeElement)||I.registerInstance(z.id,{setCurrentItem(t){if(t<0||t>o.length-1)throw new Error('Item is out of range in "set-current-item" action');ht(t)},setPreviousItem(t){let e=K-1;e<0&&(e="ring"===t?o.length-1:K),ht(e)},setNextItem(t){let e=K+1;e>o.length-1&&(e="ring"===t?0:K),ht(e)}}),X((()=>{z.id&&!(null==T?void 0:T.fakeElement)&&I.unregisterInstance(z.id)})),t.$$set=t=>{"json"in t&&r(0,z=t.json),"templateContext"in t&&r(1,M=t.templateContext),"origJson"in t&&r(2,N=t.origJson),"layoutParams"in t&&r(3,T=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(16,o=z.items||[]),65536&t.$$.dirty[0]&&((null==o?void 0:o.length)&&Array.isArray(o)?r(4,W=!1):(r(4,W=!0),I.logError(Nt(new Error('Incorrect or empty "items" prop for div "tabs"'))))),1&t.$$.dirty[0]&&(r(36,i=I.getDerivedFromVars(z.width)),S(),S=f(i,(t=>r(54,x=t)))),1&t.$$.dirty[0]&&(r(35,a=I.getDerivedFromVars(z.height)),P(),P=f(a,(t=>r(53,w=t)))),40&t.$$.dirty[0]|12582912&t.$$.dirty[1]){let t={};(null==T?void 0:T.fakeElement)&&(t.fakeElement=!0),"wrap_content"===(null==x?void 0:x.type)&&(t.parentHorizontalWrapContent=!0),w&&"wrap_content"!==w.type||(t.parentVerticalWrapContent=!0),r(5,L=de(t,L))}if(65617&t.$$.dirty[0]&&!W&&(K<0||K>=o.length)&&(I.logError(Nt(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:z.selected_tab,length:o.length}})),r(6,K=K<0?0:o.length-1)),1&t.$$.dirty[0]&&(r(34,l=I.getDerivedFromVars(z.tab_title_style)),j(),j=f(l,(t=>r(52,b=t)))),2097152&t.$$.dirty[1]&&r(48,s=b||{}),128&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(7,G=Re(s.font_size,G)),384&t.$$.dirty[0]|131072&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)/G*10,right:(Number(t.right)||0)/G*10,bottom:(Number(t.bottom)||0)/G*10,left:(Number(t.left)||0)/G*10};r(8,Y=le(e,Y))}if(128&t.$$.dirty[0]|131072&t.$$.dirty[1]){const t=s.line_height;void 0!==t&&ke(t)&&r(21,Q=Ot(t/G*10))}if(128&t.$$.dirty[0]|131072&t.$$.dirty[1]){const t=s.letter_spacing;void 0!==t&&ae(t)&&r(22,tt=Ot(t/G*10))}if(640&t.$$.dirty[0]|147456&t.$$.dirty[1]&&(s.corner_radius||s.corners_radius||s.font_size)){const t=null!==r(45,F=s.corner_radius)&&void 0!==F?F:1e3;s.corners_radius?r(9,nt=function(t,e,n,r){const o=[t["top-left"],t["top-right"],t["bottom-right"],t["bottom-left"]];for(let t=0;t<o.length;++t)if(o[t]&&!ae(o[t]))return r;return he(t,e,n)}(s.corners_radius,t,G,nt)):ae(t)&&r(9,nt=Ot(t/G*10))}1024&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(10,H=Le(s.active_font_weight||s.font_weight,H)),2048&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(11,q=Le(s.inactive_font_weight||s.font_weight,q)),4096&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(12,rt=Wt(s.active_text_color,1,rt)),8192&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(13,ot=Wt(s.inactive_text_color,1,ot)),16384&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(14,it=Wt(s.active_background_color,1,it)),32768&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(15,at=Wt(s.inactive_background_color,1,at)),1&t.$$.dirty[0]&&(r(33,c=I.getDerivedFromVars(z.has_separator)),V(),V=f(c,(t=>r(17,_=t)))),1&t.$$.dirty[0]&&(r(32,u=I.getDerivedFromVars(z.separator_color)),A(),A=f(u,(t=>r(51,$=t)))),1&t.$$.dirty[0]&&(r(31,d=I.getDerivedFromVars(z.separator_paddings)),E(),E=f(d,(t=>r(50,y=t)))),131072&t.$$.dirty[0]|1671168&t.$$.dirty[1]&&_&&($&&r(46,st=Wt($,1,st)),y&&r(47,ct=le(y,ct))),98304&t.$$.dirty[1]&&r(30,p={background:st,margin:ct}),1&t.$$.dirty[0]&&(r(29,g=I.getDerivedFromVars(z.switch_tabs_by_content_swipe_enabled)),C(),C=f(g,(t=>r(49,v=t)))),262144&t.$$.dirty[1]&&r(28,h=void 0===v||Boolean(v)),1&t.$$.dirty[0]&&(r(27,m=I.getDerivedFromVars(z.restrict_parent_scroll)),D(),D=f(m,(t=>r(37,k=t)))),65536&t.$$.dirty[0]&&(W||(r(25,ft=o.map(((t,e)=>e===K))),r(26,gt=o.map(((t,e)=>e===K)))))},[z,M,N,T,W,L,K,G,Y,nt,H,q,rt,ot,it,at,o,_,O,B,R,Q,tt,ut,dt,ft,gt,m,h,g,p,d,u,c,l,a,i,k,J,{},vt,function(t){if(!(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)&&o){if(37===t.which)mt(-1,!0);else if(39===t.which)mt(1,!0);else if(36===t.which)ht(0,!0);else{if(35!==t.which)return;ht(o.length-1,!0)}t.preventDefault()}},function(t){var e;const n=t.target,i=null===(e=null==n?void 0:n.closest)||void 0===e?void 0:e.call(n,".".concat("divkit-aa145"));o.length<2||t.touches.length>1||i&&i!==B||(jt=!1,Pt=!1,At=ye(t),Vt=null,kt=Date.now(),Ct=Et||-K*B.clientWidth,r(24,dt=!1),bt&&clearTimeout(bt))},function(t){const e=ye(t);if(!At||Vt&&Vt.x===e.x&&Vt.y===e.y)return;Vt=e;const n=B.clientWidth;if(jt){Et=e.x-At.x+Ct;const t=n*o.length;if(Et>0)Et=Et*n/(Et+3*n);else if(-Et+n>t){let e=-Et+n-t;e=e*n/(e+3*n),Et=n-t-e}$t(100*Et/n)}else Math.abs(e.y-At.y)>10?Pt=!0:!Pt&&Math.abs(e.x-At.x)>8&&(xt(),jt=!0,At=e,$t(100*-K),_t(!0));jt&&t.cancelable&&t.preventDefault()},function(){Pt=!1,At=null;let t=K;if(!jt)return;jt=!1;const e=Math.min(512,B.clientWidth);Math.abs(Ct-Et)>e/4*Math.min(1,(Date.now()-kt)/750)&&(t+=Ct>Et?1:-1),t>=o.length?t=o.length-1:t<0&&(t=0),t===K?(Et=-t*e,$t(100*-t),wt()):ht(t)},F,st,ct,s,v,y,$,b,w,x,(t,e)=>vt(0,t),function(t){et[t?"unshift":"push"]((()=>{O=t,r(18,O)}))},function(t){et[t?"unshift":"push"]((()=>{R=t,r(20,R)}))},function(t){et[t?"unshift":"push"]((()=>{B=t,r(19,B)}))}]}function Fr(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function zr(t){return t*t*t}function Mr(t){const e=t-1;return e*e*e+1}function Nr(t){return e=>{if(e<=0)return 0;if(e>=1)return 1;const n=e*t.length,r=Math.floor(n),o=n-r;return t[r]*o+t[r+1]*(1-o)}}const Tr=Nr([.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]),Ir=Nr([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]),Jr={linear:r,ease:Tr,ease_in:zr,ease_out:Mr,ease_in_out:Fr,spring:Ir};function Or(t){return Math.max(...t.map((t=>(Number(t.duration)||200)+(Number(t.start_delay)||0))))}function Br(t,e){let{transitions:n,elementBbox:r,rootBbox:o,direction:i,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"===i?1-l:l,u=(Jr[t.interpolator||"ease_in_out"]||Fr)(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 i=null===(d=t.distance)||void 0===d?void 0:d.value;void 0===i&&(i="top"!==t.edge&&"bottom"!==t.edge&&t.edge?Math.abs(o["left"===t.edge?"left":"right"]-r["left"===t.edge?"right":"left"]):Math.abs(o["bottom"===t.edge?"bottom":"top"]-r["bottom"===t.edge?"top":"bottom"]));const a=i*u;return{active:u>0&&u<1,translate:"".concat(n,"(").concat(a*e,"px)")}}if("scale"===t.type){var p,f;const e=1-u+u*(t.scale||0),n=null!==(p=t.pivot_x)&&void 0!==p?p:.5,o=null!==(f=t.pivot_y)&&void 0!==f?f:.5,i=(1-e)*r.width*n,a=(1-e)*r.height*o;return{active:u>0&&u<1,scale:"translate(".concat(i,"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(" "),p=l.filter((t=>t.active)).map((t=>t.scale)).filter((t=>void 0!==t)),f=[u,p.length?p[p.length-1]:d].filter(Boolean).join(" ");return"transform:".concat(f||"none",";opacity:").concat(c)}}}function Rr(t,e,n){return t*(1-n)+e*n}const Wr={linear:r,ease:Tr,ease_in:zr,ease_out:Mr,ease_in_out:Fr,spring:Ir};function Lr(t,e){var n,r;let{rootBbox:o,beforeBbox:i,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 Wr?Wr[l.interpolator]:Fr,css:t=>["top:".concat(Rr(i.top,a.top,t)-o.top,"px"),"left:".concat(Rr(i.left,a.left,t)-o.left,"px"),"width:".concat(Rr(i.width,a.width,t),"px"),"height:".concat(Rr(i.height,a.height,t),"px")].join(";")}}function Ur(t){const e=[];return"set"===t.type?(t.items||[]).forEach((t=>{e.push(...Ur(t))})):e.push(t),e}const{Map:Hr}=xt;function qr(t,e,n){const r=t.slice();return r[27]=e[n],r}function Kr(t){let e,n;return e=new Oe({props:{cls:"divkit-b8efc",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[to]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function Gr(t){let e,r,o=t[7],i=Xr(t);return{c(){i.c(),e=T()},m(t,n){i.m(t,n),P(t,e,n),r=!0},p(t,r){128&r&&d(o,o=t[7])?(vt(),_t(i,1,1,n),yt(),i=Xr(t),i.c(),$t(i,1),i.m(e.parentNode,e)):i.p(t,r)},i(t){r||($t(i),r=!0)},o(t){_t(i),r=!1},d(t){t&&S(e),i.d(t)}}}function Xr(t){let e,n;return e=new oi({props:{div:t[7].div,templateContext:t[1]}}),{c(){At(e.$$.fragment)},m(t,r){Vt(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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function Yr(t){let e,n,r,o,i,a,l,s,c,u;function d(){return t[11](t[27])}return r=new oi({props:{div:t[27].json,templateContext:t[27].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=F("div"),n=F("div"),At(r.$$.fragment),i=N(),J(n,"class",o="divkit-e08c6"),J(e,"class",a="divkit-eb860")},m(t,o){P(t,e,o),A(e,n),Vt(r,n,null),A(e,i),s=!0,c||(u=I(e,"introend",d),c=!0)},p(e,n){t=e;const o={};64&n&&(o.div=t[27].json),64&n&&(o.templateContext=t[27].templateContext),r.$set(o)},i(n){s||($t(r.$$.fragment,n),l||st((()=>{l=wt(e,Lr,t[27]),l.start()})),s=!0)},o(t){_t(r.$$.fragment,t),s=!1},d(t){t&&S(e),jt(r),c=!1,u()}}}function Zr(t){let e,n,r,o,i,a,l,s,c,u;function d(){return t[10](t[27])}return r=new oi({props:{div:t[27].json,templateContext:t[27].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=F("div"),n=F("div"),At(r.$$.fragment),i=N(),J(n,"class",o="divkit-e08c6"),J(e,"class",a="divkit-eb860"),R(e,"left",t[27].offsetLeft+"px"),R(e,"top",t[27].offsetTop+"px"),R(e,"width",t[27].width+"px"),R(e,"height",t[27].height+"px")},m(t,o){P(t,e,o),A(e,n),Vt(r,n,null),A(e,i),s=!0,c||(u=I(e,"introend",d),c=!0)},p(n,o){t=n;const i={};64&o&&(i.div=t[27].json),64&o&&(i.templateContext=t[27].templateContext),r.$set(i),(!s||64&o)&&R(e,"left",t[27].offsetLeft+"px"),(!s||64&o)&&R(e,"top",t[27].offsetTop+"px"),(!s||64&o)&&R(e,"width",t[27].width+"px"),(!s||64&o)&&R(e,"height",t[27].height+"px")},i(n){s||($t(r.$$.fragment,n),l||st((()=>{l=wt(e,Br,t[27]),l.start()})),s=!0)},o(t){_t(r.$$.fragment,t),s=!1},d(t){t&&S(e),jt(r),c=!1,u()}}}function Qr(t,e){let n,r,o,i,a;const l=[Zr,Yr],s=[];function c(t,e){return"direction"in t[27]?0:1}return r=c(e),o=s[r]=l[r](e),{key:t,first:null,c(){n=T(),o.c(),i=T(),this.first=n},m(t,e){P(t,n,e),s[r].m(t,e),P(t,i,e),a=!0},p(t,n){let a=r;r=c(e=t),r===a?s[r].p(e,n):(vt(),_t(s[a],1,1,(()=>{s[a]=null})),yt(),o=s[r],o?o.p(e,n):(o=s[r]=l[r](e),o.c()),$t(o,1),o.m(i.parentNode,i))},i(t){a||($t(o),a=!0)},o(t){_t(o),a=!1},d(t){t&&S(n),s[r].d(t),t&&S(i)}}}function to(t){var e;let n,r,o,i,a=[],l=new Hr,s=(null===(e=t[7])||void 0===e?void 0:e.div)&&Gr(t),c=t[6];const u=t=>t[27];for(let e=0;e<c.length;e+=1){let n=qr(t,c,e),r=u(n);l.set(r,a[e]=Qr(r,n))}return{c(){s&&s.c(),n=N(),r=F("div");for(let t=0;t<a.length;t+=1)a[t].c();J(r,"class",o="divkit-adaae"),J(r,"aria-hidden","true")},m(e,o){s&&s.m(e,o),P(e,n,o),P(e,r,o);for(let t=0;t<a.length;t+=1)a[t].m(r,null);t[12](r),i=!0},p(t,e){var o;null!==(o=t[7])&&void 0!==o&&o.div?s?(s.p(t,e),128&e&&$t(s,1)):(s=Gr(t),s.c(),$t(s,1),s.m(n.parentNode,n)):s&&(vt(),_t(s,1,1,(()=>{s=null})),yt()),320&e&&(c=t[6],vt(),a=function(t,e,n,r,o,i,a,l,s,c,u,d){let p=t.length,f=i.length,g=p;const h={};for(;g--;)h[t[g].key]=g;const m=[],v=new Map,y=new Map;for(g=f;g--;){const t=d(o,i,g),r=n(t);let l=a.get(r);l?l.p(t,e):(l=c(r,t),l.c()),v.set(r,m[g]=l),r in h&&y.set(r,Math.abs(g-h[r]))}const $=new Set,_=new Set;function b(t){$t(t,1),t.m(l,u),a.set(t.key,t),u=t.first,f--}for(;p&&f;){const e=m[f-1],n=t[p-1],r=e.key,o=n.key;e===n?(u=e.first,p--,f--):v.has(o)?!a.has(r)||$.has(r)?b(e):_.has(o)?p--:y.get(r)>y.get(o)?(_.add(r),b(e)):($.add(o),p--):(s(n,a),p--)}for(;p--;){const e=t[p];v.has(e.key)||s(e,a)}for(;f;)b(m[f-1]);return m}(a,e,u,0,t,c,l,r,kt,Qr,null,qr),yt())},i(t){if(!i){$t(s);for(let t=0;t<c.length;t+=1)$t(a[t]);i=!0}},o(t){_t(s);for(let t=0;t<a.length;t+=1)_t(a[t]);i=!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 eo(t){let e,n,r=!t[5]&&Kr(t);return{c(){r&&r.c(),e=T()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){let[o]=n;t[5]?r&&(vt(),_t(r,1,1,(()=>{r=null})),yt()):r?(r.p(t,o),32&o&&$t(r,1)):(r=Kr(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function no(t){return"change_bounds"===t.type?t:"set"===t.type?no(t.items[0]):null}function ro(t,e,n){let r,{json:o={}}=e,{templateContext:i}=e,{origJson:a}=e,{layoutParams:l}=e;const s=Z(Mt),c=Z(re);let u,d=new Map,p=new Set,f=!1,g=null,h=[],m=[],v=[],y=[];function $(t,e,n){let{json:r,templateContext:o,transitions:i,node:a}=e;r=s.getJsonWithVars(r),i=s.getJsonWithVars(i);const l=Ur(i),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:o,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 _=o.div_id||o.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(p);h.forEach((t=>{t.resolvePromise&&t.resolvePromise()})),n(6,h=[]);let o=[];if(u){const t=u.getBoundingClientRect();o=v.map((e=>$(t,e,"out")))}y.forEach((t=>{d.set(t.id,t.node.getBoundingClientRect())})),m=[],v=[],y=[];const i=r.find((e=>e.state_id===t))||null;if(i?(b=t,n(7,w=i)):s.logError(Nt(new Error("Cannot find state with id"),{additional:{stateId:t}})),await lt(),!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")));o=o.filter((t=>{var e;return!(!t.json.id||p.has(t.json.id))||(null===(e=t.resolvePromise)||void 0===e||e.call(t),!1)}));const c=o.concat(l),f=c.reduce(((t,e)=>Math.max(t,Or(e.transitions))),0),g=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:no(t.transitions),resolvePromise:t.resolvePromise})));n(6,h=[...c.map((t=>Object.assign(Object.assign({},t),{maxDuration:f}))),...g]),d.clear(),s.setRunning("stateChange",!1)},getChild(t){if(g&&g.has(t))return g.get(t);s.logError(Nt(new Error("Missing state block with id"),{additional:{id:t}}))}}),Y(re,{registerInstance(t,e){g||(g=new Map),g.has(t)?s.logError(Nt(new Error("Duplicate state with id"),{additional:{id:t}})):g.set(t,e)},unregisterInstance(t){null==g||g.delete(t)},runVisibilityTransition(t,e,r,o,i){if(!u)return Promise.resolve();const a=$(u.getBoundingClientRect(),{json:t,templateContext:e,transitions:r,node:o},i),l=Or(a.transitions),s=Object.assign(Object.assign({},a),{maxDuration:l});return n(6,h=[...h.filter((t=>t.node!==a.node)),s]),new Promise((t=>{s.resolvePromise=t}))},registerChildWithTransitionIn(t,e,n,r){const o={json:t,templateContext:e,transitions:n,node:r};return m.push(o),new Promise((t=>{o.resolvePromise=t}))},registerChildWithTransitionOut(t,e,n,r){const o={json:t,templateContext:e,transitions:n,node:r};return v.push(o),new Promise((t=>{o.resolvePromise=t}))},registerChildWithTransitionChange(t,e,n,r){const o=t.id;if(!o)return Promise.resolve();const i={id:o,json:t,templateContext:e,transitions:n,node:r};return y.push(i),new Promise((t=>{i.resolvePromise=t}))},hasTransitionChange:t=>!!t&&d.has(t),registerChild(t){p.add(t)},unregisterChild(t){p.delete(t)}})):(f=!0,s.logError(Nt(new Error('Missing "id" prop for div "state"'))));let w=null;const x=s.getJsonWithVars(o.default_state_id);let k=!1;function C(t){n(6,h=h.filter((e=>e!==t))),t.resolvePromise&&t.resolvePromise()}return X((()=>{_&&!(null==l?void 0:l.fakeElement)&&c.unregisterInstance(_)})),t.$$set=t=>{"json"in t&&n(0,o=t.json),"templateContext"in t&&n(1,i=t.templateContext),"origJson"in t&&n(2,a=t.origJson),"layoutParams"in t&&n(3,l=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&o&&(p=new Set),1&t.$$.dirty&&n(9,r=o.states||[]),512&t.$$.dirty&&((null==r?void 0:r.length)?n(5,f=!1):(n(5,f=!0),s.logError(Nt(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(Nt(new Error("Cannot find state for default_state_id"),{additional:{selectedId:b}}))):(n(7,w=t[0]),b=w.state_id)))}(r)},[o,i,a,l,u,f,h,w,C,r,t=>C(t),t=>C(t),function(t){et[t?"unshift":"push"]((()=>{u=t,n(4,u)}))}]}const oo={pager:"divkit-c5feb",pager__items:"divkit-f6987",pager__item:"divkit-feca7",pager_orientation_horizontal:"divkit-b0a1c",pager_orientation_vertical:"divkit-f772f"},{Boolean:io}=xt;function ao(t,e,n){const r=t.slice();return r[47]=e[n],r}function lo(t){let e,n;return e=new Oe({props:{cls:ne("pager",oo,t[8]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,$$slots:{default:[co]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=ne("pager",oo,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]|524288&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function so(t){var e;let n,r,o,i,a;return r=new oi({props:{div:t[47].json,templateContext:t[47].templateContext,origJson:t[47].origJson,layoutParams:null!==(e=t[3])&&void 0!==e&&e.fakeElement?{fakeElement:!0}:void 0}}),{c(){n=F("div"),At(r.$$.fragment),o=N(),J(n,"class",i=oo.pager__item)},m(t,e){P(t,n,e),Vt(r,n,null),A(n,o),a=!0},p(t,e){var n;const o={};16&e[0]&&(o.div=t[47].json),16&e[0]&&(o.templateContext=t[47].templateContext),16&e[0]&&(o.origJson=t[47].origJson),8&e[0]&&(o.layoutParams=null!==(n=t[3])&&void 0!==n&&n.fakeElement?{fakeElement:!0}:void 0),r.$set(o)},i(t){a||($t(r.$$.fragment,t),a=!0)},o(t){_t(r.$$.fragment,t),a=!1},d(t){t&&S(n),jt(r)}}}function co(t){let e,n,r,o,i,a,l=t[4],s=[];for(let e=0;e<l.length;e+=1)s[e]=so(ao(t,l,e));const c=t=>_t(s[t],1,1,(()=>{s[t]=null}));return{c(){e=F("div");for(let t=0;t<s.length;t+=1)s[t].c();J(e,"class",n=oo.pager__items+" "+(t[15]?"divkit-aa145":"")),J(e,"style",r=Jt(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),o=!0,i||(a=I(e,"scroll",t[16]),i=!0)},p(t,i){if(24&i[0]){let n;for(l=t[4],n=0;n<l.length;n+=1){const r=ao(t,l,n);s[n]?(s[n].p(r,i),$t(s[n],1)):(s[n]=so(r),s[n].c(),$t(s[n],1),s[n].m(e,null))}for(vt(),n=l.length;n<s.length;n+=1)c(n);yt()}(!o||32768&i[0]&&n!==(n=oo.pager__items+" "+(t[15]?"divkit-aa145":"")))&&J(e,"class",n),(!o||512&i[0]&&r!==(r=Jt(t[9])))&&J(e,"style",r)},i(t){if(!o){for(let t=0;t<l.length;t+=1)$t(s[t]);o=!0}},o(t){s=s.filter(io);for(let t=0;t<s.length;t+=1)_t(s[t]);o=!1},d(n){n&&S(e),D(s,n),t[36](null),i=!1,a()}}}function uo(t){let e,n,r=!t[7]&&lo(t);return{c(){r&&r.c(),e=T()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[7]?r&&(vt(),_t(r,1,1,(()=>{r=null})),yt()):r?(r.p(t,n),128&n[0]&&$t(r,1)):(r=lo(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function po(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b,w=n,x=n,k=n,C=n,E=n,A=n;var V,j,P,S,D,F,z;t.$$.on_destroy.push((()=>w())),t.$$.on_destroy.push((()=>x())),t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>A()));let{json:M={}}=e,{templateContext:N}=e,{origJson:T}=e,{layoutParams:I}=e;const J=Z(Mt),O=J.genId("pager");let B,R=!1,W=0,L=0,U=!1,H="horizontal",q="",K="",Y="";const Q=lr((function(){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 tt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"smooth";const n="horizontal"===H,o=B.children[t],i=n?"offsetLeft":"offsetTop",a=n?"left":"top";B.scroll({[a]:o[i],behavior:e}),r(25,W=t)}return M.id&&!(null==I?void 0:I.fakeElement)&&J.registerInstance(M.id,{setCurrentItem(t){if(t<0||t>o.length-1)throw new Error('Item is out of range in "set-current-item" action');tt(t)},setPreviousItem(t){let e=W-1;e<0&&(e="ring"===t?o.length-1:W),tt(e)},setNextItem(t){let e=W+1;e>o.length-1&&(e="ring"===t?0:W),tt(e)}}),G((()=>{if(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))}})),X((()=>{M.id&&!(null==I?void 0:I.fakeElement)&&J.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,T=t.origJson),"layoutParams"in t&&r(3,I=t.layoutParams)},t.$$.update=()=>{if(131073&t.$$.dirty[0]&&((null===r(17,V=M.items)||void 0===V?void 0:V.length)&&Array.isArray(M.items)?r(24,R=!1):(r(24,R=!0),J.logError(Nt(new Error('Incorrect or empty "items" prop for div "pager"'))))),16777219&t.$$.dirty[0]&&r(4,o=(!R&&M.items||[]).map((t=>{let e=t,n=N;return({templateContext:n,json:e}=J.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(14,i=J.getDerivedFromVars(M.layout_mode)),x(),x=f(i,(t=>r(32,v=t)))),2&t.$$.dirty[1]&&(v?"percentage"!==v.type&&"fixed"!==v.type?(r(26,U=!0),J.logError(Nt(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):r(26,U=!1):(r(26,U=!0),J.logError(Nt(new Error('Empty "layout_mode" prop for div "pager"'))))),1&t.$$.dirty[0]&&(r(13,a=J.getDerivedFromVars(M.orientation)),E(),E=f(a,(t=>r(35,_=t)))),134217728&t.$$.dirty[0]|16&t.$$.dirty[1]&&r(27,H=zn(_,H)),1&t.$$.dirty[0]&&(r(12,l=J.getDerivedFromVars(M.item_spacing)),C(),C=f(l,(t=>r(34,$=t)))),8&t.$$.dirty[1]){const t=null==$?void 0:$.value;t&&ae(t)&&r(28,q=Ot(t||0))}if(1&t.$$.dirty[0]&&(r(11,s=J.getDerivedFromVars(M.paddings)),k(),k=f(s,(t=>r(33,y=t)))),536870912&t.$$.dirty[0]|4&t.$$.dirty[1]&&r(29,K=le(y,K)),1&t.$$.dirty[0]&&(r(10,c=J.getDerivedFromVars(M.restrict_parent_scroll)),A(),A=f(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=Bt("horizontal"===H?((null===r(18,j=M.paddings)||void 0===j?void 0:j.left)||0)+((null===r(19,P=M.paddings)||void 0===P?void 0:P.right)||0):((null===r(20,S=M.paddings)||void 0===S?void 0:S.top)||0)+((null===r(21,D=M.paddings)||void 0===D?void 0:D.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(Bt(e)," - 2 * ").concat(q,")"):"100%")}else if("percentage"===(null==v?void 0:v.type)){const t=null===r(23,z=v.page_width)||void 0===z?void 0:z.value;r(30,Y="".concat(Number(t),"%"))}1879048192&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(9,d={"grid-gap":q,padding:K,[u]:Y}),134217728&t.$$.dirty[0]&&r(8,p={orientation:H}),83886080&t.$$.dirty[0]&&r(7,g=R||U),33554448&t.$$.dirty[0]&&function(t,e){const n=M.id;if(n){const i=new Map(m);r=h,m=i.set(n,{instId:O,size:t,currentItem:e,scrollToPagerItem:tt}),o=m,r.set(o)}var r,o}(o.length,W),33554432&t.$$.dirty[0]&&function(t){var e;if(t===L)return;L=t;const n=J.getJsonWithVars(null===(e=o[t].json)||void 0===e?void 0:e.selected_actions);(null==n?void 0:n.length)&&J.execAnyActions(n)}(W)},r(6,h=J.getStore("pagers")),w(),w=f(h,(t=>r(38,m=t))),[M,N,T,I,o,B,h,g,p,d,c,s,l,a,i,b,Q,V,j,P,S,D,F,z,R,W,U,H,q,K,Y,u,v,y,$,_,function(t){et[t?"unshift":"push"]((()=>{B=t,r(5,B)}))}]}const fo={indicator:"divkit-d8e3f",indicator__scroller:"divkit-b5db0",indicator__items:"divkit-d5d94",indicator__item:"divkit-f6629",indicator__item_active:"divkit-b39cd"};function go(t,e,n){const r=t.slice();r[36]=e[n],r[39]=n;const o=r[39]===r[13].currentItem;return r[37]=o,r}function ho(t){let e,n=Array(t[13].size),r=[];for(let e=0;e<n.length;e+=1)r[e]=mo(go(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=T()},m(t,n){for(let e=0;e<r.length;e+=1)r[e].m(t,n);P(t,e,n)},p(t,o){if(3153920&o[0]){let i;for(n=Array(t[13].size),i=0;i<n.length;i+=1){const a=go(t,n,i);r[i]?r[i].p(a,o):(r[i]=mo(a),r[i].c(),r[i].m(e.parentNode,e))}for(;i<r.length;i+=1)r[i].d(1);r.length=n.length}},d(t){D(r,t),t&&S(e)}}}function mo(t){let e,n,r,o,i,a,s,c;function u(){return t[30](t[39])}return{c(){e=F("div"),J(e,"class",n=ne("indicator__item",fo,{active:t[37]})+" divkit-bd259"),J(e,"role","tab"),J(e,"id",r=t[13].instId+"-tab-"+t[39]),J(e,"aria-controls",o=t[13].instId+"-panel-"+t[39]),J(e,"aria-selected",i=t[37]?"true":"false"),J(e,"tabindex",a=t[37]?0:-1)},m(n,r){P(n,e,r),s||(c=[I(e,"click",u),I(e,"keydown",t[21])],s=!0)},p(l,s){t=l,8192&s[0]&&n!==(n=ne("indicator__item",fo,{active:t[37]})+" divkit-bd259")&&J(e,"class",n),8192&s[0]&&r!==(r=t[13].instId+"-tab-"+t[39])&&J(e,"id",r),8192&s[0]&&o!==(o=t[13].instId+"-panel-"+t[39])&&J(e,"aria-controls",o),8192&s[0]&&i!==(i=t[37]?"true":"false")&&J(e,"aria-selected",i),8192&s[0]&&a!==(a=t[37]?0:-1)&&J(e,"tabindex",a)},d(t){t&&S(e),s=!1,l(c)}}}function vo(t){let e,n,r,o,i="0 ".concat(Ot((t[10]-1)*t[4]/2)),a="0 ".concat(Ot((t[9]-t[4])/2)),l=t[13]&&ho(t);return{c(){e=F("div"),n=F("div"),l&&l.c(),J(n,"class",r=fo.indicator__items),J(n,"role","tablist"),R(n,"margin",i,!1),R(n,"--divkit-indicator-width",Ot(t[4]),!1),R(n,"--divkit-indicator-height",Ot(t[5]),!1),R(n,"--divkit-indicator-border-radius",Ot(t[6]),!1),R(n,"--divkit-indicator-active-color",t[7],!1),R(n,"--divkit-indicator-inactive-color",t[8],!1),R(n,"--divkit-indicator-active-scale",t[10],!1),R(n,"--divkit-indicator-margin",a,!1),J(e,"class",o=fo.indicator__scroller)},m(r,o){P(r,e,o),A(e,n),l&&l.m(n,null),t[31](n),t[32](e)},p(t,e){t[13]?l?l.p(t,e):(l=ho(t),l.c(),l.m(n,null)):l&&(l.d(1),l=null),1040&e[0]&&i!==(i="0 ".concat(Ot((t[10]-1)*t[4]/2)))&&R(n,"margin",i,!1),16&e[0]&&R(n,"--divkit-indicator-width",Ot(t[4]),!1),32&e[0]&&R(n,"--divkit-indicator-height",Ot(t[5]),!1),64&e[0]&&R(n,"--divkit-indicator-border-radius",Ot(t[6]),!1),128&e[0]&&R(n,"--divkit-indicator-active-color",t[7],!1),256&e[0]&&R(n,"--divkit-indicator-inactive-color",t[8],!1),1024&e[0]&&R(n,"--divkit-indicator-active-scale",t[10],!1),528&e[0]&&a!==(a="0 ".concat(Ot((t[9]-t[4])/2)))&&R(n,"--divkit-indicator-margin",a,!1)},d(n){n&&S(e),l&&l.d(),t[31](null),t[32](null)}}}function yo(t){let e,n;return e=new Oe({props:{cls:ne("indicator",fo,{}),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[vo]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(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]),16368&n[0]|512&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function $o(t,e,r){let o,i,a,l,s,c,u,d,p,g,h,m,v=n,y=n,$=n,_=n,b=n,w=n;var x;t.$$.on_destroy.push((()=>v())),t.$$.on_destroy.push((()=>y())),t.$$.on_destroy.push((()=>$())),t.$$.on_destroy.push((()=>_())),t.$$.on_destroy.push((()=>b())),t.$$.on_destroy.push((()=>w()));let{json:k={}}=e,{templateContext:C}=e,{origJson:E}=e,{layoutParams:A}=e;const V=Z(Mt);let j,P,S,D=5,F=10,z=10,M=5,N="#ffdc60",T=Wt("#33919cb5"),I=15,J=1.3;function O(t){t!==S.currentItem&&S.scrollToPagerItem(t)}async function B(t){S.scrollToPagerItem(t),await lt();const e=P.querySelector(".".concat(fo.indicator__item_active));e&&e.focus()}return t.$$set=t=>{"json"in t&&r(0,k=t.json),"templateContext"in t&&r(1,C=t.templateContext),"origJson"in t&&r(2,E=t.origJson),"layoutParams"in t&&r(3,A=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty[0]&&(r(19,o=V.getDerivedFromVars(k.shape)),w(),w=f(o,(t=>r(29,m=t)))),549453936&t.$$.dirty[0]&&m&&("rounded_rectangle"===m.type?(m.item_width&&r(4,F=se(m.item_width.value,F)),m.item_height&&r(5,z=se(m.item_height.value,z)),m.corner_radius&&r(6,M=se(m.corner_radius.value,M))):"circle"===m.type&&(r(23,D=se(null===r(22,x=m.radius)||void 0===x?void 0:x.value,D)),r(4,F=r(5,z=r(6,M=2*D))))),1&t.$$.dirty[0]&&(r(18,i=V.getDerivedFromVars(k.active_item_color)),b(),b=f(i,(t=>r(28,h=t)))),268435584&t.$$.dirty[0]&&r(7,N=Wt(h,1,N)),1&t.$$.dirty[0]&&(r(17,a=V.getDerivedFromVars(k.inactive_item_color)),_(),_=f(a,(t=>r(27,g=t)))),134217984&t.$$.dirty[0]&&r(8,T=Wt(g,1,T)),1&t.$$.dirty[0]&&(r(16,l=V.getDerivedFromVars(k.space_between_centers)),$(),$=f(l,(t=>r(26,p=t)))),67109376&t.$$.dirty[0]&&p&&r(9,I=se(p.value,I)),1&t.$$.dirty[0]&&(r(15,s=V.getDerivedFromVars(k.active_item_size)),y(),y=f(s,(t=>r(25,d=t)))),33555456&t.$$.dirty[0]&&r(10,J=Re(d,J)),16777216&t.$$.dirty[0]&&async function(t){if(k.pager_id&&t.has(k.pager_id)){r(13,S=t.get(k.pager_id)),await lt();const e=P.children[S.currentItem].offsetLeft;j.scroll({left:e-j.clientWidth/2,behavior:"smooth"})}}(u)},r(14,c=V.getStore("pagers")),v(),v=f(c,(t=>r(24,u=t))),[k,C,E,A,F,z,M,N,T,I,J,j,P,S,c,s,l,a,i,o,O,function(t){if(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)return;const{size:e,currentItem:n}=S;if(37===t.which)B(n-1<0?n:n-1);else if(39===t.which)B(n+1>=e?n:n+1);else if(36===t.which)B(0);else{if(35!==t.which)return;B(e-1)}t.preventDefault()},x,D,u,d,p,g,h,m,t=>O(t),function(t){et[t?"unshift":"push"]((()=>{P=t,r(12,P)}))},function(t){et[t?"unshift":"push"]((()=>{j=t,r(11,j)}))}]}const _o={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 bo(t,e){if(!t||!t.font_size)return e;const n=t.offset,r=t.text_color&&Wt(t.text_color)||"#000",o=We(t.font_weight);if(ke(t.font_size)&&"transparent"!==r){var i,a;const e={fontSize:Ot(t.font_size),fontWeight:o,textColor:r};return"number"==typeof(null==n||null===(i=n.x)||void 0===i?void 0:i.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 wo(t,e,n){return Math.max(e,Math.min(n,t))}const xo=-2147483648,ko=Number.MAX_VALUE,Co=Number.MIN_VALUE,Eo="string",Ao="integer",Vo="number",jo="boolean",Po="color",So="datetime";class Do{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=Ft(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 Fo={string:class extends Do{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"string"}},number:class extends Do{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 Do{convertValue(t){if("number"!=typeof t||isNaN(t)||t>2147483647||t<xo||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 Do{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 Do{convertValue(t){if("string"!=typeof t||!Ut(t))throw new Error("Incorrect variable value");return t}fromString(t){return this.convertValue(t)}getType(){return"color"}},url:class extends Do{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"url"}}};function zo(t,e,n){if(!(e in Fo))throw new Error("Unsupported variable type");return new Fo[e](t,n)}function Mo(t,e,n){const r=t.slice();return r[78]=e[n],r}function No(t,e,n){const r=t.slice();return r[78]=e[n],r}function To(t){let e,n;return e=new Oe({props:{cls:ne("slider",_o,t[21]),style:t[22],customDescription:!0,customActions:"slider",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Ro]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){const r={};2097152&n[0]&&(r.cls=ne("slider",_o,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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function Io(t){let e,n;return{c(){e=F("div"),J(e,"class",n=_o.slider__tick+" "+_o.slider__tick_active),R(e,"--divkit-slider-tick",t[78],!1)},m(t,n){P(t,e,n)},p(t,n){131072&n[0]&&R(e,"--divkit-slider-tick",t[78],!1)},d(t){t&&S(e)}}}function Jo(t){let e,n;return{c(){e=F("div"),J(e,"class",n=_o.slider__tick+" "+_o.slider__tick_inactive),R(e,"--divkit-slider-tick",t[78],!1)},m(t,n){P(t,e,n)},p(t,n){262144&n[0]&&R(e,"--divkit-slider-tick",t[78],!1)},d(t){t&&S(e)}}}function Oo(t){let e,n,r,o,i;return{c(){var a,l,s;e=F("div"),n=F("div"),r=M(t[6]),J(n,"class",o=_o["slider__thumb-text-inner"]),R(n,"font-size",(null===(a=t[12])||void 0===a?void 0:a.fontSize)||"1em",!1),R(n,"font-weight",(null===(l=t[12])||void 0===l?void 0:l.fontWeight)||"",!1),R(n,"color",(null===(s=t[12])||void 0===s?void 0:s.textColor)||"#000",!1),J(e,"class",i=_o["slider__thumb-text"])},m(t,o){P(t,e,o),A(e,n),A(n,r)},p(t,e){var o,i,a;64&e[0]&&B(r,t[6]),4096&e[0]&&R(n,"font-size",(null===(o=t[12])||void 0===o?void 0:o.fontSize)||"1em",!1),4096&e[0]&&R(n,"font-weight",(null===(i=t[12])||void 0===i?void 0:i.fontWeight)||"",!1),4096&e[0]&&R(n,"color",(null===(a=t[12])||void 0===a?void 0:a.textColor)||"#000",!1)},d(t){t&&S(e)}}}function Bo(t){let e,n,r,o,i;return{c(){var a,l,s;e=F("div"),n=F("div"),r=M(t[7]),J(n,"class",o=_o["slider__thumb-text-inner"]),R(n,"font-size",(null===(a=t[13])||void 0===a?void 0:a.fontSize)||"1em",!1),R(n,"font-weight",(null===(l=t[13])||void 0===l?void 0:l.fontWeight)||"",!1),R(n,"color",(null===(s=t[13])||void 0===s?void 0:s.textColor)||"#000",!1),J(e,"class",i=_o["slider__thumb-text"]+" "+_o["slider__thumb-text_secondary"])},m(t,o){P(t,e,o),A(e,n),A(n,r)},p(t,e){var o,i,a;128&e[0]&&B(r,t[7]),8192&e[0]&&R(n,"font-size",(null===(o=t[13])||void 0===o?void 0:o.fontSize)||"1em",!1),8192&e[0]&&R(n,"font-weight",(null===(i=t[13])||void 0===i?void 0:i.fontWeight)||"",!1),8192&e[0]&&R(n,"color",(null===(a=t[13])||void 0===a?void 0:a.textColor)||"#000",!1)},d(t){t&&S(e)}}}function Ro(t){let e,n,r,o,i,a,s,c,u,d,p,f,g,h,m,v,y,$,_,b,w,x,k=t[17],C=[];for(let e=0;e<k.length;e+=1)C[e]=Io(No(t,k,e));let E=t[18],V=[];for(let e=0;e<E.length;e+=1)V[e]=Jo(Mo(t,E,e));let j=t[12]&&Oo(t),z=t[37]&&function(t){let e,n,r=t[13]&&Bo(t);return{c(){e=F("div"),r&&r.c(),J(e,"class",n=_o.slider__thumb+" "+_o.slider__thumb_secondary),R(e,"border-radius",Ot(t[9].borderRadius),!1),R(e,"background",t[9].background,!1),R(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=Bo(t),r.c(),r.m(e,null)):r&&(r.d(1),r=null),512&n[0]&&R(e,"border-radius",Ot(t[9].borderRadius),!1),512&n[0]&&R(e,"background",t[9].background,!1),512&n[0]&&R(e,"box-shadow",t[9].boxShadow||"",!1)},d(t){t&&S(e),r&&r.d()}}}(t),M=t[37]&&function(t){let e,n,r,o,i;return{c(){e=F("input"),J(e,"type","range"),J(e,"class",n=t[16]?_o.slider__input:"".concat(_o.slider__input," ").concat(_o.slider__input_secondary)),J(e,"min",t[4]),J(e,"max",t[5]),J(e,"step","1"),e.value=r=t[16]?t[6]:t[7],J(e,"aria-label",t[20])},m(n,r){P(n,e,r),o||(i=[I(e,"input",t[68]),I(e,"mousedown",t[37]?t[40]:null),I(e,"touchstart",t[37]?t[40]:null)],o=!0)},p(t,o){65536&o[0]&&n!==(n=t[16]?_o.slider__input:"".concat(_o.slider__input," ").concat(_o.slider__input_secondary))&&J(e,"class",n),16&o[0]&&J(e,"min",t[4]),32&o[0]&&J(e,"max",t[5]),65728&o[0]&&r!==(r=t[16]?t[6]:t[7])&&(e.value=r),1048576&o[0]&&J(e,"aria-label",t[20])},d(t){t&&S(e),o=!1,l(i)}}}(t);return{c(){e=F("div"),n=F("div"),r=F("div"),i=N(),a=F("div"),c=N();for(let t=0;t<C.length;t+=1)C[t].c();u=N();for(let t=0;t<V.length;t+=1)V[t].c();d=N(),p=F("div"),j&&j.c(),g=N(),z&&z.c(),h=N(),m=F("input"),$=N(),M&&M.c(),J(r,"class",o=_o.slider__track),R(r,"height",Ot(t[10].height),!1),R(r,"border-radius",Ot(t[10].borderRadius),!1),R(r,"background",t[10].background,!1),R(r,"box-shadow",t[10].boxShadow||"",!1),J(a,"class",s=_o["slider__active-track"]),R(a,"left",(100*t[23]).toFixed(2)+"%",!1),R(a,"width",(100*t[24]).toFixed(2)+"%",!1),R(a,"height",Ot(t[11].height),!1),R(a,"border-radius",Ot(t[11].borderRadius),!1),R(a,"background",t[11].background,!1),R(a,"box-shadow",t[11].boxShadow||"",!1),J(p,"class",f=_o.slider__thumb),R(p,"border-radius",Ot(t[8].borderRadius),!1),R(p,"background",t[8].background,!1),R(p,"box-shadow",t[8].boxShadow||"",!1),J(m,"type","range"),J(m,"class",v=t[16]?"".concat(_o.slider__input," ").concat(_o.slider__input_secondary):_o.slider__input),J(m,"min",t[4]),J(m,"max",t[5]),J(m,"step","1"),m.value=y=t[16]?t[7]:t[6],J(m,"aria-label",t[19]),J(n,"class",_=_o["slider__tracks-inner"]),J(e,"class",b=_o["slider__tracks-wrapper"])},m(o,l){P(o,e,l),A(e,n),A(n,r),A(n,i),A(n,a),A(n,c);for(let t=0;t<C.length;t+=1)C[t].m(n,null);A(n,u);for(let t=0;t<V.length;t+=1)V[t].m(n,null);A(n,d),A(n,p),j&&j.m(p,null),A(n,g),z&&z.m(n,null),A(n,h),A(n,m),A(n,$),M&&M.m(n,null),t[69](n),w||(x=I(m,"input",t[67]),w=!0)},p(t,e){if(1024&e[0]&&R(r,"height",Ot(t[10].height),!1),1024&e[0]&&R(r,"border-radius",Ot(t[10].borderRadius),!1),1024&e[0]&&R(r,"background",t[10].background,!1),1024&e[0]&&R(r,"box-shadow",t[10].boxShadow||"",!1),8388608&e[0]&&R(a,"left",(100*t[23]).toFixed(2)+"%",!1),16777216&e[0]&&R(a,"width",(100*t[24]).toFixed(2)+"%",!1),2048&e[0]&&R(a,"height",Ot(t[11].height),!1),2048&e[0]&&R(a,"border-radius",Ot(t[11].borderRadius),!1),2048&e[0]&&R(a,"background",t[11].background,!1),2048&e[0]&&R(a,"box-shadow",t[11].boxShadow||"",!1),131072&e[0]){let r;for(k=t[17],r=0;r<k.length;r+=1){const o=No(t,k,r);C[r]?C[r].p(o,e):(C[r]=Io(o),C[r].c(),C[r].m(n,u))}for(;r<C.length;r+=1)C[r].d(1);C.length=k.length}if(262144&e[0]){let r;for(E=t[18],r=0;r<E.length;r+=1){const o=Mo(t,E,r);V[r]?V[r].p(o,e):(V[r]=Jo(o),V[r].c(),V[r].m(n,d))}for(;r<V.length;r+=1)V[r].d(1);V.length=E.length}t[12]?j?j.p(t,e):(j=Oo(t),j.c(),j.m(p,null)):j&&(j.d(1),j=null),256&e[0]&&R(p,"border-radius",Ot(t[8].borderRadius),!1),256&e[0]&&R(p,"background",t[8].background,!1),256&e[0]&&R(p,"box-shadow",t[8].boxShadow||"",!1),t[37]&&z.p(t,e),65536&e[0]&&v!==(v=t[16]?"".concat(_o.slider__input," ").concat(_o.slider__input_secondary):_o.slider__input)&&J(m,"class",v),16&e[0]&&J(m,"min",t[4]),32&e[0]&&J(m,"max",t[5]),65728&e[0]&&y!==(y=t[16]?t[7]:t[6])&&(m.value=y),524288&e[0]&&J(m,"aria-label",t[19]),t[37]&&M.p(t,e)},d(n){n&&S(e),D(C,n),D(V,n),j&&j.d(),z&&z.d(),M&&M.d(),t[69](null),w=!1,x()}}}function Wo(t){let e,n,r,o,i=!t[14]&&To(t);return{c(){i&&i.c(),e=T()},m(a,l){i&&i.m(a,l),P(a,e,l),n=!0,r||(o=I(window,"resize",t[42]),r=!0)},p(t,n){t[14]?i&&(vt(),_t(i,1,1,(()=>{i=null})),yt()):i?(i.p(t,n),16384&n[0]&&$t(i,1)):(i=To(t),i.c(),$t(i,1),i.m(e.parentNode,e))},i(t){n||($t(i),n=!0)},o(t){_t(i),n=!1},d(t){i&&i.d(t),t&&S(e),r=!1,o()}}}function Lo(t,e,n,r,o){let i=[];if(o)for(let o=t;o<e;++o)i.push((o-n)/(r-n));else{for(let e=n;e<t;++e)i.push((e-n)/(r-n));for(let t=e;t<r+1;++t)i.push((t-n)/(r-n))}return i}function Uo(t,e,r){let o,i,a,l,s,c,u,d,p,h,m,v,y,$,_,b,w,x,k,C,E,A,V,j,P,S,D,F,z,M,N,T,I,J,O=n,B=n,R=n,W=n,L=n,U=n,H=n,q=n,K=n,X=n,Y=n,Q=n;var tt,nt,rt,ot;t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>Q()));let{json:it={}}=e,{templateContext:at}=e,{origJson:lt}=e,{layoutParams:st}=e;const ct={width:10,height:10,borderRadius:5,background:"#000"},ut=["rounded_rectangle","circle"],dt=["rounded_rectangle"],pt=Z(Mt),ft=Z(ve);let gt,ht=!1,mt=0,vt=100;const yt=pt.getJsonWithVars(it.thumb_value_variable),$t=pt.getJsonWithVars(it.thumb_secondary_value_variable);let _t=yt&&pt.getVariable(yt,"integer")||zo("temp","integer",0);g(t,_t,(t=>r(64,T=t)));let bt=$t&&pt.getVariable($t,"integer")||zo("temp","integer",0);g(t,bt,(t=>r(63,N=t)));let wt,xt,kt,Ct=wo(T||0,mt,vt),Et=wo(N||0,mt,vt),At=ct,Vt=At,jt=ct,Pt=ct,St=null,Dt=null,Ft=kt,zt="",Tt="",It=!1;function Jt(t,e){const n=Number(t.target.value);ht===("first"===e)?(r(7,Et=n),bt.setValue(n)):(r(6,Ct=n),_t.setValue(n))}let Rt=!1;function Wt(){if(!gt)return;const t=vt-mt,e=(null==St?void 0:St.width)||0,n=(null==Dt?void 0:Dt.width)||0;Math.max(e,n)*t>=(null==gt?void 0:gt.clientWidth)?Rt||(pt.logError(Nt(new Error("Slider ticks overlap each other"),{level:"warn"})),Rt=!0):Rt=!1}const Lt=lr(Wt,50);return G((()=>{Wt()})),t.$$set=t=>{"json"in t&&r(0,it=t.json),"templateContext"in t&&r(1,at=t.templateContext),"origJson"in t&&r(2,lt=t.origJson),"layoutParams"in t&&r(3,st=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(36,o=pt.getDerivedFromVars(it.min_value)),Q(),Q=f(o,(t=>r(66,J=t)))),1&t.$$.dirty[0]&&(r(35,i=pt.getDerivedFromVars(it.max_value)),Y(),Y=f(i,(t=>r(65,I=t)))),48&t.$$.dirty[0]|24&t.$$.dirty[2]&&(r(4,mt=fe(J,mt)),r(5,vt=fe(I,vt)),Wt()),112&t.$$.dirty[0]|4&t.$$.dirty[2]){const t=wo(T||0,mt,vt);t!==Ct&&r(6,Ct=t)}if(176&t.$$.dirty[0]|2&t.$$.dirty[2]){const t=wo(N||0,mt,vt);t!==Et&&r(7,Et=t)}if(1&t.$$.dirty[0]&&(r(34,a=pt.getDerivedFromVars(it.thumb_style)),X(),X=f(a,(t=>r(62,M=t)))),256&t.$$.dirty[0]|1&t.$$.dirty[2]&&r(8,At=fn(M,ut,At)),1&t.$$.dirty[0]&&(r(33,l=pt.getDerivedFromVars(it.thumb_secondary_style)),K(),K=f(l,(t=>r(61,z=t)))),256&t.$$.dirty[0]|1073741824&t.$$.dirty[1]&&r(9,Vt=fn(z,ut,At)),1&t.$$.dirty[0]&&(r(32,s=pt.getDerivedFromVars(it.track_inactive_style)),q(),q=f(s,(t=>r(60,F=t)))),1024&t.$$.dirty[0]|536870912&t.$$.dirty[1]&&r(10,jt=fn(F,dt,jt)),1&t.$$.dirty[0]&&(r(31,c=pt.getDerivedFromVars(it.track_active_style)),H(),H=f(c,(t=>r(59,D=t)))),2048&t.$$.dirty[0]|268435456&t.$$.dirty[1]&&r(11,Pt=fn(D,dt,Pt)),1&t.$$.dirty[0]&&(r(30,u=pt.getDerivedFromVars(it.tick_mark_active_style)),U(),U=f(u,(t=>r(58,S=t)))),134217728&t.$$.dirty[1]){let t=fn(S,ut,ct);t!==ct&&r(47,St=t)}if(240&t.$$.dirty[0]|65536&t.$$.dirty[1]&&(St?(r(17,wt=$t?Lo(Math.min(Ct,Et),Math.max(Ct,Et)+1,mt,vt,!0):Lo(mt,Ct,mt,vt,!0)),Wt()):r(17,wt=[])),1&t.$$.dirty[0]&&(r(29,d=pt.getDerivedFromVars(it.tick_mark_inactive_style)),L(),L=f(d,(t=>r(57,P=t)))),67108864&t.$$.dirty[1]){let t=fn(P,ut,ct);t!==ct&&r(48,Dt=t)}if(240&t.$$.dirty[0]|131072&t.$$.dirty[1]&&(Dt?(r(18,xt=$t?Lo(Math.min(Ct,Et),Math.max(Ct,Et)+1,mt,vt,!1):Lo(Ct+1,vt+1,mt,vt,!0)),Wt()):r(18,xt=[])),1&t.$$.dirty[0]&&(r(28,p=pt.getDerivedFromVars(it.thumb_text_style)),W(),W=f(p,(t=>r(56,j=t)))),4096&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(12,kt=bo(j,kt)),1&t.$$.dirty[0]&&(r(27,h=pt.getDerivedFromVars(it.thumb_secondary_text_style)),R(),R=f(h,(t=>r(55,V=t)))),4096&t.$$.dirty[0]|16777216&t.$$.dirty[1]&&r(13,Ft=bo(V,kt)),1&t.$$.dirty[0]&&(r(26,m=pt.getDerivedFromVars(it.accessibility)),B(),B=f(m,(t=>r(54,A=t)))),8388608&t.$$.dirty[1]&&((null==A?void 0:A.description)?r(19,zt=A.description):pt.logError(Nt(new Error('Missing accessibility "description" for slider'),{level:"warn"}))),1&t.$$.dirty[0]&&(r(25,v=pt.getDerivedFromVars(it.secondary_value_accessibility)),O(),O=f(v,(t=>r(53,E=t)))),4194304&t.$$.dirty[1]&&((null==E?void 0:E.description)?r(20,Tt=E.description):$t&&pt.logError(Nt(new Error('Missing second accessibility "description" for slider'),{level:"warn"}))),19712&t.$$.dirty[0]){let t=!1;ft.hasAction()?(pt.logError(Nt(new Error('Cannot show "slider" inside component with action'))),t=!0):At===ct?(pt.logError(Nt(new Error('Missing "thumb_style" in slider'))),t=!0):Pt===ct?(pt.logError(Nt(new Error('Missing "track_active_style" in slider'))),t=!0):jt===ct&&(pt.logError(Nt(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==It&&r(14,It=t)}768&t.$$.dirty[0]&&r(52,y=Ot(Math.max(...[At.width,Vt.width,0].filter(ae)))),768&t.$$.dirty[0]&&r(51,$=Ot(Math.max(...[At.height,Vt.height,0].filter(ae)))),112&t.$$.dirty[0]&&r(50,_=(Ct-mt)/(vt-mt)),176&t.$$.dirty[0]&&r(49,b=$t?(Et-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":Ot(At.width),"--divkit-slider-thumb-height":Ot(At.height),"--divkit-slider-thumb-secondary-width":Ot(Vt.width),"--divkit-slider-thumb-secondary-height":Ot(Vt.height),"--divkit-slider-text-offset-x":(null===r(43,tt=null==kt?void 0:kt.offset)||void 0===tt?void 0:tt.x)?Bt(kt.offset.x):void 0,"--divkit-slider-text-offset-y":(null===r(44,nt=null==kt?void 0:kt.offset)||void 0===nt?void 0:nt.y)?Bt(kt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===r(45,rt=null==Ft?void 0:Ft.offset)||void 0===rt?void 0:rt.x)?Bt(Ft.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===r(46,ot=null==Ft?void 0:Ft.offset)||void 0===ot?void 0:ot.y)?Bt(Ft.offset.y):void 0,"--divkit-slider-tick-active-width":St?Ot(St.width):void 0,"--divkit-slider-tick-active-height":St?Ot(St.height):void 0,"--divkit-slider-tick-active-border-radius":St?Ot(St.borderRadius):void 0,"--divkit-slider-tick-active-background":(null==St?void 0:St.background)||void 0,"--divkit-slider-tick-active-box-shadow":(null==St?void 0:St.boxShadow)||void 0,"--divkit-slider-tick-inactive-width":Dt?Ot(Dt.width):void 0,"--divkit-slider-tick-inactive-height":Dt?Ot(Dt.height):void 0,"--divkit-slider-tick-inactive-border-radius":Dt?Ot(Dt.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==Dt?void 0:Dt.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==Dt?void 0:Dt.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,C={}),[it,at,lt,st,mt,vt,Ct,Et,At,Vt,jt,Pt,kt,Ft,It,gt,ht,wt,xt,zt,Tt,C,k,x,w,v,m,h,p,d,u,c,s,l,a,i,o,$t,_t,bt,function(t){var e,n;const o="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===o)return;const i=gt.getBoundingClientRect(),a=(o-i.left)/i.width,l=(vt-mt)*a,s=Math.round(wo(l,mt,vt));r(16,ht=s<(Ct+Et)/2==Ct<Et)},Jt,Lt,tt,nt,rt,ot,St,Dt,b,_,$,y,E,A,V,j,P,S,D,F,z,M,N,T,I,J,t=>Jt(t,"first"),t=>Jt(t,"second"),function(t){et[t?"unshift":"push"]((()=>{gt=t,r(15,gt)}))}]}const Ho={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 qo(t){let e,n;return e=new Oe({props:{cls:ne("input",Ho,t[12]),style:t[11],customDescription:!0,customActions:"input",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Yo]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){const r={};4096&n[0]&&(r.cls=ne("input",Ho,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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function Ko(t){let e;return{c(){e=M("")},m(t,n){P(t,e,n)},d(t){t&&S(e)}}}function Go(t){let e,n,r,o;return{c(){e=F("input"),J(e,"type",t[9]),J(e,"class",n=Ho.input__input),J(e,"autocomplete","off"),J(e,"autocapitalize","off"),J(e,"aria-label",t[10]),J(e,"placeholder",t[15]),e.value=t[8]},m(n,i){P(n,e,i),t[57](e),r||(o=[I(e,"input",t[29]),I(e,"mousedown",(function(){s(t[16]?t[30]:void 0)&&(t[16]?t[30]:void 0).apply(this,arguments)})),I(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]&&J(e,"type",t[9]),1024&r[0]&&J(e,"aria-label",t[10]),32768&r[0]&&J(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(o)}}}function Xo(t){let e,n,r,o;return{c(){e=F("textarea"),J(e,"class",n=Ho.input__input),J(e,"autocomplete","off"),J(e,"autocapitalize","off"),J(e,"aria-label",t[10]),J(e,"placeholder",t[15]),e.value=t[8]},m(n,i){P(n,e,i),t[56](e),r||(o=[I(e,"input",t[29]),I(e,"mousedown",(function(){s(t[16]?t[30]:void 0)&&(t[16]?t[30]:void 0).apply(this,arguments)})),I(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]&&J(e,"aria-label",t[10]),32768&r[0]&&J(e,"placeholder",t[15]),256&r[0]&&(e.value=t[8])},d(n){n&&S(e),t[56](null),r=!1,l(o)}}}function Yo(t){let e,n,r,o,i,a,l=t[8].endsWith("\n")||!t[8],s=l&&Ko();function c(t,e){return t[4]?Xo:Go}let u=c(t),d=u(t);return{c(){e=F("span"),n=F("span"),r=M(t[8]),s&&s.c(),i=N(),d.c(),J(n,"class",o=Ho.input__holder),J(n,"aria-hidden","true"),J(e,"class",a=Ho.input__wrapper)},m(o,a){P(o,e,a),A(e,n),A(n,r),s&&s.m(n,null),t[55](n),A(e,i),d.m(e,null)},p(t,o){256&o[0]&&B(r,t[8]),256&o[0]&&(l=t[8].endsWith("\n")||!t[8]),l?s||(s=Ko(),s.c(),s.m(n,null)):s&&(s.d(1),s=null),u===(u=c(t))&&d?d.p(t,o):(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 Zo(t){let e,n,r=!t[7]&&qo(t);return{c(){r&&r.c(),e=T()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){t[7]?r&&(vt(),_t(r,1,1,(()=>{r=null})),yt()):r?(r.p(t,n),128&n[0]&&$t(r,1)):(r=qo(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Qo(t,e,r){let o,i,a,l,s,c,u,d,p,h,m,v,y,$,_,b,w,x,k,C,E=n,A=n;t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>A()));let{json:V={}}=e,{templateContext:j}=e,{origJson:P}=e,{layoutParams:S}=e;const D=Z(Mt);let F,z,M=!1,N=!1;const T=D.getJsonWithVars(V.text_variable);let I=!1;T||(I=!0,D.logError(Nt(new Error('Missing "text_variable" in "input"'))));let J=T&&D.getVariable(T,"string")||zo("temp","string","");g(t,J,(t=>r(54,k=t)));let O="";const B=D.getDerivedFromVars(V.hint_text);g(t,B,(t=>r(53,x=t)));const R=D.getDerivedFromVars(V.hint_color);g(t,R,(t=>r(52,w=t)));let W="";const L=D.getDerivedFromVars(V.font_size);g(t,L,(t=>r(51,b=t)));let U=12;const H=D.getDerivedFromVars(V.font_weight);let q;g(t,H,(t=>r(50,_=t)));const K=D.getDerivedFromVars(V.line_height);let X;g(t,K,(t=>r(49,$=t)));const Y=D.getDerivedFromVars(V.letter_spacing);g(t,Y,(t=>r(48,y=t)));let Q="";const tt=D.getDerivedFromVars(V.text_color);g(t,tt,(t=>r(47,v=t)));let nt="#000";const rt=D.getDerivedFromVars(V.highlight_color);g(t,rt,(t=>r(46,m=t)));let ot="";const it=D.getDerivedFromVars(V.keyboard_type);g(t,it,(t=>r(45,h=t)));const at={email:"email",number:"number",phone:"tel",single_line_text:"text",multi_line_text:"text",uri:"url"};let lt="multi_line_text",st="text";const ct=D.getDerivedFromVars(V.max_visible_lines);g(t,ct,(t=>r(44,p=t)));let ut="",dt="";const pt=D.getDerivedFromVars(V.select_all_on_focus);function ft(){r(32,N=z.scrollHeight>z.offsetHeight)}return g(t,pt,(t=>r(16,C=t))),G((()=>{ft()})),t.$$set=t=>{"json"in t&&r(0,V=t.json),"templateContext"in t&&r(1,j=t.templateContext),"origJson"in t&&r(2,P=t.origJson),"layoutParams"in t&&r(3,S=t.layoutParams)},t.$$.update=()=>{if(8388608&t.$$.dirty[1]&&r(8,O=k),4194304&t.$$.dirty[1]&&r(15,o=x),2097156&t.$$.dirty[1]&&r(33,W=Wt(w,1,W)),1048584&t.$$.dirty[1]&&r(34,U=Re(b,U)),524304&t.$$.dirty[1]&&r(35,q=Le(_,q)),262152&t.$$.dirty[1]){const t=$;ke(t)&&r(36,X=t/U)}131080&t.$$.dirty[1]&&ie(y)&&r(37,Q=Ot(y/U*10)),65664&t.$$.dirty[1]&&r(38,nt=Wt(v,1,nt)),33024&t.$$.dirty[1]&&r(39,ot=Wt(m,1,ot)),16384&t.$$.dirty[1]&&h&&h in at&&(r(9,st=at[h]),r(40,lt=h)),512&t.$$.dirty[1]&&r(4,i="multi_line_text"===lt),1&t.$$.dirty[0]&&(r(14,a=D.getDerivedFromVars(V.paddings)),A(),A=f(a,(t=>r(43,d=t)))),12320&t.$$.dirty[1]&&ke(p)&&r(41,ut="calc(".concat(p*(X||1.25)+"em"," + ").concat(Bt(se(null==d?void 0:d.top,0)+se(null==d?void 0:d.bottom,0)),")")),1&t.$$.dirty[0]&&(r(13,l=D.getDerivedFromVars(V.accessibility)),E(),E=f(l,(t=>r(42,u=t)))),2048&t.$$.dirty[1]&&((null==u?void 0:u.description)?r(10,dt=u.description):D.logError(Nt(new Error('Missing accessibility "description" for input'),{level:"warn"}))),16&t.$$.dirty[0]|258&t.$$.dirty[1]&&r(12,s={"highlight-color":Boolean(ot),"vertical-overflow":N,multiline:i}),1532&t.$$.dirty[1]&&r(11,c={"--divkit-input-hint-color":W,"--divkit-input-highlight-color":ot,"font-size":Ot(U),"font-weight":q,"line-height":X,"letter-spacing":Q,color:nt,"max-height":ut})},[V,j,P,S,i,F,z,I,O,st,dt,c,s,l,a,o,C,J,B,R,L,H,K,Y,tt,rt,it,ct,pt,function(t){const e=t.target.value||"";J.setValue(e),ft()},function(){M=!1,setTimeout((()=>{M=!0}),250)},function(){M||F.select()},N,W,U,q,X,Q,nt,ot,lt,ut,u,d,p,h,m,v,y,$,_,b,w,x,k,function(t){et[t?"unshift":"push"]((()=>{z=t,r(6,z)}))},function(t){et[t?"unshift":"push"]((()=>{F=t,r(5,F)}))},function(t){et[t?"unshift":"push"]((()=>{F=t,r(5,F)}))}]}const ti={text:class extends St{constructor(t){super(),Pt(this,t,dn,un,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},container:class extends St{constructor(t){super(),Pt(this,t,Dn,Sn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},separator:class extends St{constructor(t){super(),Pt(this,t,In,Tn,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},image:Kn,gif:Kn,grid:class extends St{constructor(t){super(),Pt(this,t,or,rr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},gallery:class extends St{constructor(t){super(),Pt(this,t,$r,yr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},tabs:class extends St{constructor(t){super(),Pt(this,t,Dr,Sr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},state:class extends St{constructor(t){super(),Pt(this,t,ro,eo,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},pager:class extends St{constructor(t){super(),Pt(this,t,po,uo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},indicator:class extends St{constructor(t){super(),Pt(this,t,$o,yo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},slider:class extends St{constructor(t){super(),Pt(this,t,Uo,Wo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},input:class extends St{constructor(t){super(),Pt(this,t,Qo,Zo,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}}};function ei(t){let e,n,r;var o=t[5];function i(t){return{props:{json:t[3],templateContext:t[4],layoutParams:t[2],origJson:t[1]||t[0]}}}return o&&(e=new o(i(t))),{c(){e&&At(e.$$.fragment),n=T()},m(t,o){e&&Vt(e,t,o),P(t,n,o),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]),o!==(o=t[5])){if(e){vt();const t=e;_t(t.$$.fragment,1,0,(()=>{jt(t,1)})),yt()}o?(e=new o(i(t)),At(e.$$.fragment),$t(e.$$.fragment,1),Vt(e,n.parentNode,n)):e=null}else o&&e.$set(a)},i(t){r||(e&&$t(e.$$.fragment,t),r=!0)},o(t){e&&_t(e.$$.fragment,t),r=!1},d(t){t&&S(n),e&&jt(e,t)}}}function ni(t){let e,n,r=t[5]&&ei(t);return{c(){r&&r.c(),e=T()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){let[o]=n;t[5]?r?(r.p(t,o),32&o&&$t(r,1)):(r=ei(t),r.c(),$t(r,1),r.m(e.parentNode,e)):r&&(vt(),_t(r,1,1,(()=>{r=null})),yt())},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function ri(t,e,n){let{div:r}=e,{templateContext:o}=e,{origJson:i}=e,{layoutParams:a}=e;const l=Z(Mt);let s,c,u;return t.$$set=t=>{"div"in t&&n(0,r=t.div),"templateContext"in t&&n(6,o=t.templateContext),"origJson"in t&&n(1,i=t.origJson),"layoutParams"in t&&n(2,a=t.layoutParams)},t.$$.update=()=>{if(121&t.$$.dirty&&(n(3,s=r),n(4,c=o),n(5,u=s&&ti[s.type]||void 0),!u&&(n(4,({templateContext:c,json:s}=l.processTemplate(s,c)),c,(n(3,s),n(0,r),n(6,o),n(5,u),n(4,c))),n(5,u=s&&ti[s.type]||void 0),!u))){let t;t=(null==s?void 0:s.type)&&l.hasTemplate(s.type)?"Recursive template":"Unknown component",l.logError(Nt(new Error(t),{additional:{component:(null==s?void 0:s.type)||"<missing>"}}))}},[r,i,a,s,c,u,o]}const oi=class extends St{constructor(t){super(),Pt(this,t,ri,ni,d,{div:0,templateContext:6,origJson:1,layoutParams:2})}};function ii(t,e,n){const r=t.slice();r[1]=e[n];const o=r[1].split(":");return r[2]=o[0],r[3]=o[1],r}function ai(t){let e,n,r,o=[...Object.keys(t[0])],i=[];for(let e=0;e<o.length;e+=1)i[e]=ui(ii(t,o,e));return{c(){e=z("svg"),n=z("defs");for(let t=0;t<i.length;t+=1)i[t].c();J(e,"class",r="divkit-dc22b"),J(e,"aria-hidden","true")},m(t,r){P(t,e,r),A(e,n);for(let t=0;t<i.length;t+=1)i[t].m(n,null)},p(t,e){if(1&e){let r;for(o=[...Object.keys(t[0])],r=0;r<o.length;r+=1){const a=ii(t,o,r);i[r]?i[r].p(a,e):(i[r]=ui(a),i[r].c(),i[r].m(n,null))}for(;r<i.length;r+=1)i[r].d(1);i.length=o.length}},d(t){t&&S(e),D(i,t)}}}function li(t){let e,n;return{c(){e=z("feBlend"),J(e,"in2","SourceGraphic"),J(e,"mode",n=t[3])},m(t,n){P(t,e,n)},p(t,r){1&r&&n!==(n=t[3])&&J(e,"mode",n)},d(t){t&&S(e)}}}function si(t){let e;return{c(){e=z("feComposite"),J(e,"in2","SourceGraphic"),J(e,"operator","arithmetic"),J(e,"k1","1"),J(e,"k2","0"),J(e,"k3","0"),J(e,"k4","0")},m(t,n){P(t,e,n)},p:n,d(t){t&&S(e)}}}function ci(t){let e,n;return{c(){e=z("feComposite"),J(e,"in2","SourceGraphic"),J(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])&&J(e,"operator",n)},d(t){t&&S(e)}}}function ui(t){let e,n,r,o;function i(t,e){return"source_in"===t[3]||"source_atop"===t[3]?ci:"multiply"===t[3]?si:li}let a=i(t),l=a(t);return{c(){e=z("filter"),n=z("feFlood"),l.c(),J(n,"flood-color",r=t[2]),J(e,"id",o=t[0][t[1]])},m(t,r){P(t,e,r),A(e,n),l.m(e,null)},p(t,s){1&s&&r!==(r=t[2])&&J(n,"flood-color",r),a===(a=i(t))&&l?l.p(t,s):(l.d(1),l=a(t),l&&(l.c(),l.m(e,null))),1&s&&o!==(o=t[0][t[1]])&&J(e,"id",o)},d(t){t&&S(e),l.d()}}}function di(t){let e,r=Object.keys(t[0]).length,o=r&&ai(t);return{c(){o&&o.c(),e=T()},m(t,n){o&&o.m(t,n),P(t,e,n)},p(t,n){let[i]=n;1&i&&(r=Object.keys(t[0]).length),r?o?o.p(t,i):(o=ai(t),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},i:n,o:n,d(t){o&&o.d(t),t&&S(e)}}}function pi(t,e,n){let{svgFiltersMap:r}=e;return t.$$set=t=>{"svgFiltersMap"in t&&n(0,r=t.svgFiltersMap)},[r]}const fi=class extends St{constructor(t){super(),Pt(this,t,pi,di,d,{svgFiltersMap:0})}};function gi(t,e,n,r){const o=n[t.type];if(!o)return r(Nt(new Error("No such template"),{additional:{template:t.type}})),{json:t,templateContext:e};let i;const a={};for(i in e)e.hasOwnProperty(i)&&(a[i]=e[i]);for(i in t)"type"!==i&&"__proto__"!==i&&t.hasOwnProperty(i)&&(a[i]=t[i]);const l=function e(n,o){const i=Object.keys(o).filter((t=>"__proto__"!==t)),l=i.filter((t=>"$"!==t.charAt(0))),s=i.filter((t=>"$"===t.charAt(0)));return l.forEach((t=>{const r=o[t];"object"==typeof r&&null!==r?(n[t]=Array.isArray(r)?[]:{},e(n[t],r)):n[t]=r})),s.forEach((e=>{const i=o[e],l=a[i];if(void 0!==l){const t=e.substring(1);n[t]=l}else r(Nt(new Error("Missing template field"),{level:"warn",additional:{key:e,template:t.type}}))})),n}({},o);for(i in t)"type"!==i&&"__proto__"!==i&&t.hasOwnProperty(i)&&(l[i]=t[i]);return{json:l,templateContext:a}}function hi(){}function mi(t){return{subscribe:e=>(e(t),hi)}}function vi(t,e){return e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t)}function yi(t,e){return e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t)}function $i(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 _i(t){var e=parseInt(t,10);if(e>2147483647||e<xo)throw new Error("Value ".concat(t," can't be converted to Integer type."));return e}function bi(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function wi(t,e,n,r){var o=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(o,wi.prototype),o.expected=e,o.found=n,o.location=r,o.name="SyntaxError",o}function xi(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,t+(n+=n.repeat(e)).slice(0,e))}function ki(t,e){var n,r={},o=(e=void 0!==e?e:{}).grammarSource,i={start:jt,JsonStringContents:function(){var t,e,n;for(t=mt,e=[],n=Pt();n!==r;)e.push(n),n=Pt();return vt=t,e=ht(e)}},a=jt,l="@{",s="}",c="@{}",u="\\",d="||",p="&&",f="==",g="!=",h=">=",m="<=",v="+",y="-",$="true",_="false",b=/^[^}]/,w=/^[^'}]/,x=/^[0-9]/,k=/^[a-zA-Z_0-9.]/,C=/^[a-zA-Z_]/,E=/^[ \t\r\n]/,A=xt("@{",!1),V=xt("}",!1),j=xt("@{}",!1),P=xt("\\",!1),S={type:"any"},D=kt(["}"],!0,!1),F=xt("?",!1),z=xt(":",!1),M=xt("||",!1),N=xt("&&",!1),T=xt("==",!1),I=xt("!=",!1),J=xt(">=",!1),O=xt(">",!1),B=xt("<=",!1),R=xt("<",!1),W=xt("+",!1),L=xt("-",!1),U=xt("/",!1),H=xt("*",!1),q=xt("%",!1),K=xt("!",!1),G=xt("(",!1),X=xt(")",!1),Y=xt(",",!1),Z=Ct("string"),Q=xt("'",!1),tt=kt(["'","}"],!0,!1),et=Ct("integer"),nt=kt([["0","9"]],!1,!1),rt=Ct("number"),ot=xt(".",!1),it=xt("e",!1),at=xt("E",!1),lt=Ct("boolean"),st=xt("true",!1),ct=xt("false",!1),ut=kt([["a","z"],["A","Z"],"_",["0","9"],"."],!1,!1),dt=Ct("identifier"),pt=kt([["a","z"],["A","Z"],"_"],!1,!1),ft=Ct("whitespace"),gt=kt([" ","\t","\r","\n"],!1,!1),ht=function(t){return $i(t)},mt=0,vt=0,yt=[{line:1,column:1}],$t=0,_t=[],bt=0;if("startRule"in e){if(!(e.startRule in i))throw new Error("Can't start parsing from rule \""+e.startRule+'".');a=i[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 Ct(t){return{type:"other",description:t}}function Et(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=Et(t),r=Et(e);return{source:o,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,Wt(),(e=St())!==r?(Wt(),vt=t,t=e):(mt=t,t=r),t}function Pt(){var e,n,o,i,a;if(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&Vt(A)),n!==r?(o=Wt(),(i=St())!==r?(Wt(),125===t.charCodeAt(mt)?(a=s,mt++):(a=r,0===bt&&Vt(V)),a!==r?(vt=e,e=i):(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)?(o=u,mt++):(o=r,0===bt&&Vt(P)),o===r&&(t.substr(mt,2)===l?(o=l,mt+=2):(o=r,0===bt&&Vt(A))),bt--,o===r?n=void 0:(mt=n,n=r),n!==r?(t.length>mt?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(S)),o!==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(o=[],b.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(D)),i!==r)for(;i!==r;)o.push(i),b.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(D));else o=r;o!==r?(125===t.charCodeAt(mt)?(i=s,mt++):(i=r,0===bt&&Vt(V)),i!==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(P)),n!==r?(t.substr(mt,2)===l?(o=l,mt+=2):(o=r,0===bt&&Vt(A)),o!==r?(vt=e,e=o):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===bt&&Vt(P)),n!==r?(t.length>mt?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(S)),o!==r?(vt=e,e=bi(o)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===bt&&Vt(P)),n!==r&&(vt=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=n))))}return e}function St(){var e,n,o,i,a,l;return e=mt,(n=Dt())!==r?(Wt(),63===t.charCodeAt(mt)?(o="?",mt++):(o=r,0===bt&&Vt(F)),o!==r?(Wt(),(i=St())!==r?(Wt(),58===t.charCodeAt(mt)?(a=":",mt++):(a=r,0===bt&&Vt(z)),a!==r?(Wt(),(l=St())!==r?(vt=e,e={type:"ConditionalExpression",test:n,consequent:i,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=Dt()),e}function Dt(){var e,n,o,i,a,l,s,c;if(e=mt,(n=Ft())!==r){for(o=[],i=mt,a=Wt(),t.substr(mt,2)===d?(l=d,mt+=2):(l=r,0===bt&&Vt(M)),l!==r?(s=Wt(),(c=Ft())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);i!==r;)o.push(i),i=mt,a=Wt(),t.substr(mt,2)===d?(l=d,mt+=2):(l=r,0===bt&&Vt(M)),l!==r?(s=Wt(),(c=Ft())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);vt=e,e=yi(n,o)}else mt=e,e=r;return e}function Ft(){var e,n,o,i,a,l,s,c;if(e=mt,(n=zt())!==r){for(o=[],i=mt,a=Wt(),t.substr(mt,2)===p?(l=p,mt+=2):(l=r,0===bt&&Vt(N)),l!==r?(s=Wt(),(c=zt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);i!==r;)o.push(i),i=mt,a=Wt(),t.substr(mt,2)===p?(l=p,mt+=2):(l=r,0===bt&&Vt(N)),l!==r?(s=Wt(),(c=zt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);vt=e,e=yi(n,o)}else mt=e,e=r;return e}function zt(){var e,n,o,i,a,l,s,c;if(e=mt,(n=Mt())!==r){for(o=[],i=mt,a=Wt(),t.substr(mt,2)===f?(l=f,mt+=2):(l=r,0===bt&&Vt(T)),l===r&&(t.substr(mt,2)===g?(l=g,mt+=2):(l=r,0===bt&&Vt(I))),l!==r?(s=Wt(),(c=Mt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);i!==r;)o.push(i),i=mt,a=Wt(),t.substr(mt,2)===f?(l=f,mt+=2):(l=r,0===bt&&Vt(T)),l===r&&(t.substr(mt,2)===g?(l=g,mt+=2):(l=r,0===bt&&Vt(I))),l!==r?(s=Wt(),(c=Mt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);vt=e,e=vi(n,o)}else mt=e,e=r;return e}function Mt(){var e,n,o,i,a,l,s,c;if(e=mt,(n=Nt())!==r){for(o=[],i=mt,a=Wt(),t.substr(mt,2)===h?(l=h,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=Wt(),(c=Nt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);i!==r;)o.push(i),i=mt,a=Wt(),t.substr(mt,2)===h?(l=h,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=Wt(),(c=Nt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);vt=e,e=vi(n,o)}else mt=e,e=r;return e}function Nt(){var e,n,o,i,a,l,s,c;if(e=mt,(n=Tt())!==r){for(o=[],i=mt,a=Wt(),43===t.charCodeAt(mt)?(l=v,mt++):(l=r,0===bt&&Vt(W)),l===r&&(45===t.charCodeAt(mt)?(l=y,mt++):(l=r,0===bt&&Vt(L))),l!==r?(s=Wt(),(c=Tt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);i!==r;)o.push(i),i=mt,a=Wt(),43===t.charCodeAt(mt)?(l=v,mt++):(l=r,0===bt&&Vt(W)),l===r&&(45===t.charCodeAt(mt)?(l=y,mt++):(l=r,0===bt&&Vt(L))),l!==r?(s=Wt(),(c=Tt())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);vt=e,e=vi(n,o)}else mt=e,e=r;return e}function Tt(){var e,n,o,i,a,l,s,c;if(e=mt,(n=It())!==r){for(o=[],i=mt,a=Wt(),47===t.charCodeAt(mt)?(l="/",mt++):(l=r,0===bt&&Vt(U)),l===r&&(42===t.charCodeAt(mt)?(l="*",mt++):(l=r,0===bt&&Vt(H)),l===r&&(37===t.charCodeAt(mt)?(l="%",mt++):(l=r,0===bt&&Vt(q)))),l!==r?(s=Wt(),(c=It())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);i!==r;)o.push(i),i=mt,a=Wt(),47===t.charCodeAt(mt)?(l="/",mt++):(l=r,0===bt&&Vt(U)),l===r&&(42===t.charCodeAt(mt)?(l="*",mt++):(l=r,0===bt&&Vt(H)),l===r&&(37===t.charCodeAt(mt)?(l="%",mt++):(l=r,0===bt&&Vt(q)))),l!==r?(s=Wt(),(c=It())!==r?i=a=[a,l,s,c]:(mt=i,i=r)):(mt=i,i=r);vt=e,e=vi(n,o)}else mt=e,e=r;return e}function It(){var e,n,o;return(e=Bt())===r&&(e=Ot())===r&&(e=mt,33===t.charCodeAt(mt)?(n="!",mt++):(n=r,0===bt&&Vt(K)),n===r&&(43===t.charCodeAt(mt)?(n=v,mt++):(n=r,0===bt&&Vt(W)),n===r&&(45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===bt&&Vt(L)))),n!==r?(Wt(),(o=It())!==r?(vt=e,e={type:"UnaryExpression",operator:n,argument:o}):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=function(){var e,n,o,i,a;return e=mt,(n=Rt())!==r?(Wt(),40===t.charCodeAt(mt)?(o="(",mt++):(o=r,0===bt&&Vt(G)),o!==r?(Wt(),i=function(){var e,n,o,i,a,l,s;if(e=mt,(n=St())!==r){for(o=[],i=mt,Wt(),44===t.charCodeAt(mt)?(a=",",mt++):(a=r,0===bt&&Vt(Y)),a!==r?(Wt(),(l=St())!==r?i=l:(mt=i,i=r)):(mt=i,i=r);i!==r;)o.push(i),i=mt,Wt(),44===t.charCodeAt(mt)?(a=",",mt++):(a=r,0===bt&&Vt(Y)),a!==r?(Wt(),(l=St())!==r?i=l:(mt=i,i=r)):(mt=i,i=r);vt=e,s=o,e=[n,...s]}else mt=e,e=r;return e===r&&(e=Wt()),e}(),i!==r?(Wt(),41===t.charCodeAt(mt)?(a=")",mt++):(a=r,0===bt&&Vt(X)),a!==r?(vt=e,e={type:"CallExpression",callee:n,arguments:i}):(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,o,i;return e=function(){var e,n,o,i;return bt++,e=mt,39===t.charCodeAt(mt)?(n="'",mt++):(n=r,0===bt&&Vt(Q)),n!==r?(o=function(){var t,e,n;for(t=mt,e=[],n=Jt();n!==r;)e.push(n),n=Jt();return vt=t,e=$i(e)}(),39===t.charCodeAt(mt)?(i="'",mt++):(i=r,0===bt&&Vt(Q)),i!==r?(vt=e,e=o):(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(G)),n!==r&&(o=St())!==r?(41===t.charCodeAt(mt)?(i=")",mt++):(i=r,0===bt&&Vt(X)),i!==r?(vt=e,e=o):(mt=e,e=r)):(mt=e,e=r))),e}())),e}())),e}function Jt(){var e,n,o,i,a;if(e=mt,t.substr(mt,2)===l?(n=l,mt+=2):(n=r,0===bt&&Vt(A)),n!==r?(o=Wt(),(i=St())!==r?(Wt(),125===t.charCodeAt(mt)?(a=s,mt++):(a=r,0===bt&&Vt(V)),a!==r?(vt=e,e=i):(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)?(o=u,mt++):(o=r,0===bt&&Vt(P)),o===r&&(39===t.charCodeAt(mt)?(o="'",mt++):(o=r,0===bt&&Vt(Q)),o===r&&(t.substr(mt,2)===l?(o=l,mt+=2):(o=r,0===bt&&Vt(A)))),bt--,o===r?n=void 0:(mt=n,n=r),n!==r?(t.length>mt?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(S)),o!==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(o=[],w.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(tt)),i!==r)for(;i!==r;)o.push(i),w.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(tt));else o=r;o!==r?(125===t.charCodeAt(mt)?(i=s,mt++):(i=r,0===bt&&Vt(V)),i!==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(P)),n!==r?(t.substr(mt,2)===l?(o=l,mt+=2):(o=r,0===bt&&Vt(A)),o!==r?(vt=e,e=o):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===bt&&Vt(P)),n!==r?(t.length>mt?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(S)),o!==r?(vt=e,e=bi(o)):(mt=e,e=r)):(mt=e,e=r),e===r&&(e=mt,92===t.charCodeAt(mt)?(n=u,mt++):(n=r,0===bt&&Vt(P)),n!==r&&(vt=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=n))))}return e}function Ot(){var e,n,o,i;if(bt++,e=mt,45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===bt&&Vt(L)),n===r&&(n=null),o=[],x.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(nt)),i!==r)for(;i!==r;)o.push(i),x.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(nt));else o=r;return o!==r?(vt=e,e={type:"IntegerLiteral",value:_i(wt())}):(mt=e,e=r),bt--,e===r&&(n=r,0===bt&&Vt(et)),e}function Bt(){var e,n,o,i,a,l,s,c,u,d;for(bt++,e=mt,45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===bt&&Vt(L)),n===r&&(n=null),o=[],x.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(nt));i!==r;)o.push(i),x.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(nt));if(46===t.charCodeAt(mt)?(i=".",mt++):(i=r,0===bt&&Vt(ot)),i!==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(it)),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(W)),c===r&&(45===t.charCodeAt(mt)?(c=y,mt++):(c=r,0===bt&&Vt(L))),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(L)),n===r&&(n=null),o=[],x.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(nt)),i!==r)for(;i!==r;)o.push(i),x.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(nt));else o=r;if(o!==r)if(101===t.charCodeAt(mt)?(i="e",mt++):(i=r,0===bt&&Vt(it)),i===r&&(69===t.charCodeAt(mt)?(i="E",mt++):(i=r,0===bt&&Vt(at))),i!==r){if(43===t.charCodeAt(mt)?(a=v,mt++):(a=r,0===bt&&Vt(W)),a===r&&(45===t.charCodeAt(mt)?(a=y,mt++):(a=r,0===bt&&Vt(L))),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,o,i,a;if(bt++,e=mt,n=mt,bt++,o=function(){var e,n,o,i;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?(o=mt,bt++,k.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(ut)),bt--,i===r?o=void 0:(mt=o,o=r),o!==r?e=n=[n,o]:(mt=e,e=r)):(mt=e,e=r),e}(),bt--,o===r?n=void 0:(mt=n,n=r),n!==r)if(C.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(pt)),o!==r){for(i=[],k.test(t.charAt(mt))?(a=t.charAt(mt),mt++):(a=r,0===bt&&Vt(ut));a!==r;)i.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 Wt(){var e,n;for(bt++,e=[],E.test(t.charAt(mt))?(n=t.charAt(mt),mt++):(n=r,0===bt&&Vt(gt));n!==r;)e.push(n),E.test(t.charAt(mt))?(n=t.charAt(mt),mt++):(n=r,0===bt&&Vt(gt));return bt--,n=r,0===bt&&Vt(ft),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 wi(wi.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}(wi,Error),wi.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 o=this.location.start,i=this.location.source+":"+o.line+":"+o.column;if(r){var a=this.location.end,l=xi("",o.line.toString().length," "),s=r[o.line-1],c=(o.line===a.line?a.column:s.length+1)-o.column||1;e+="\n --\x3e "+i+"\n"+l+" |\n"+o.line+" | "+s+"\n"+l+" | "+xi("",o.column-1," ")+xi("",c,"^")}else e+="\n at "+i}return e},wi.buildMessage=function(t,e){var n={literal:function(t){return'"'+o(t.text)+'"'},class:function(t){var e=t.parts.map((function(t){return Array.isArray(t)?i(t[0])+"-"+i(t[1]):i(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 o(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 i(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?'"'+o(t)+'"':"end of input"}(e)+" found."};const Ci=new Map,Ei=new Map;function Ai(t,e,n){const r={args:e,cb:n},o=Ci.get(t)||[];Ci.has(t)||Ci.set(t,o),o.push(r);const i=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");Ei.set(i,r)}function Vi(t,e){let n=t.args.length,r=t.args.length;const o=t.args[t.args.length-1];if("object"==typeof o&&o.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 ji(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=>{ji(t,e)}));break;case"BinaryExpression":case"LogicalExpression":ji(t.left,e),ji(t.right,e);break;case"UnaryExpression":ji(t.argument,e);break;case"ConditionalExpression":ji(t.test,e),ji(t.consequent,e),ji(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{ji(t,e)}))}}function Pi(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function Si(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function Di(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 Si(t.value);if("color"===t.type)return Bi(Oi(t.value));if("url"===t.type)return t.value;throw new Error("Unexpected type ".concat(t.type))}function Fi(t){let e=Di(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\'").replace(/'/g,"\\'")+"'"),e}function zi(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}const Mi=new Int32Array(1);function Ni(t){return Mi[0]=t,Mi[0]}function Ti(t){if(t<xo||t>2147483647)throw new Error("Integer overflow.")}function Ii(t){const e=[];return ji(t,{Variable(t){e.push(t.id.name)}}),e}function Ji(t,e){throw new Error("Failed to evaluate [".concat(t,"]. ").concat(e))}function Oi(t){const e=Ut(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function Bi(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 Rt(Math.round(t).toString(16),2)})).join("").toUpperCase())}function Ri(t){return{type:Eo,value:Di(t)}}function Wi(t){const e=Number(t.value);if(isNaN(e)||!Number.isFinite(e))throw new Error("Unable to convert value to Number.");return{type:Vo,value:e}}function Li(t,e){if(0===e.value)throw new Error("Division by zero is not supported.");let n=t.value/e.value;return t.type===Ao&&(n=Ni(n)),{type:t.type,value:n}}function Ui(t,e){if(0===e.value)throw new Error("Division by zero is not supported.");let n=t.value%e.value;return t.type===Ao&&(n=Ni(n)),{type:t.type,value:n}}function Hi(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];let r=e.length?e[0].value:0;for(let t=1;t<e.length;++t)r*=e[t].value,e[0].type===Ao&&(r=Ni(r));return{type:e[0].type,value:r}}function qi(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];let r=e.length?e[0].value:0;for(let t=1;t<e.length;++t)r-=e[t].value,e[0].type===Ao&&(r=Ni(r));return{type:e.length?e[0].type:Ao,value:r}}function Ki(){let t=0;for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];for(let e=0;e<n.length;++e)t+=n[e].value,n[0].type===Ao&&(t=Ni(t));return{type:n.length?n[0].type:Ao,value:t}}function Gi(t){const e=Math.abs(t.value);return t.type===Ao&&Ti(e),{type:t.type,value:e}}function Xi(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(!e.length)throw new Error("Non empty argument list is required for max function.");return{type:e[0].type,value:Math.max(...e.map((t=>t.value)))}}function Yi(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(!e.length)throw new Error("Non empty argument list is required for min function.");return{type:e[0].type,value:Math.min(...e.map((t=>t.value)))}}function Zi(t){return{type:t.type,value:Math.sign(t.value)}}function Qi(t,e){let n;if(0===e.value&&t.type===Ao)n=t.value;else if(0===t.value&&t.type===Ao)n=0;else{let r=Math.sign(e.value);t.type===Vo&&0===r&&(r=Object.is(r,0)?1:-1),n=Math.abs(t.value)*r}return t.type===Ao&&Ti(n),{type:t.type,value:n}}function ta(t){return e=>{const n=Oi(e.value);return{type:Vo,value:n[t]/255}}}function ea(t){return(e,n)=>{const r=Oi(e.value);return r[t]=255*n.value,{type:Po,value:Bi(r)}}}const na=ta("a"),ra=ta("r"),oa=ta("g"),ia=ta("b"),aa=ea("a"),la=ea("r"),sa=ea("g"),ca=ea("b");function ua(t){return t.map(Fi).join(", ")}Ai("toString",[Ao],Ri),Ai("toString",[Vo],Ri),Ai("toString",[jo],Ri),Ai("toString",[Po],Ri),Ai("toString",["url"],Ri),Ai("toNumber",[Ao],Wi),Ai("toNumber",[Eo],Wi),Ai("toInteger",[Vo],(function(t){if(t.value>2147483647||t.value<xo)throw new Error("Unable to convert value to Integer.");const e=t.value-t.value%1;return{type:Ao,value:e}})),Ai("toInteger",[Eo],(function(t){const e=Number(t.value);if(isNaN(e)||e%1!=0||e>2147483647||e<xo)throw new Error("Unable to convert value to Integer.");return{type:Ao,value:e}})),Ai("toInteger",[jo],(function(t){return{type:Ao,value:t.value?1:0}})),Ai("toBoolean",[Ao],(function(t){if(1!==t.value&&0!==t.value)throw new Error("Unable to convert value to Boolean.");return{type:jo,value:t.value}})),Ai("toBoolean",[Eo],(function(t){if("true"!==t.value&&"false"!==t.value)throw new Error("Unable to convert value to Boolean.");return{type:jo,value:"true"===t.value?1:0}})),Ai("encodeUri",[Eo],(function(t){try{return{type:Eo,value:encodeURIComponent(t.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),Ai("decodeUri",[Eo],(function(t){try{return{type:Eo,value:decodeURIComponent(t.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),Ai("parseUnixTime",[Ao],(function(t){return{type:So,value:new Date(1e3*t.value)}})),Ai("nowLocal",[],(function(){return{type:So,value:new Date}})),Ai("addMillis",[So,Ao],(function(t,e){return{type:So,value:new Date(t.value.getTime()+e.value)}})),Ai("setYear",[So,Ao],(function(t,e){const n=new Date(t.value);return n.setFullYear(e.value),{type:So,value:n}})),Ai("setMonth",[So,Ao],(function(t,e){if(e.value<1||e.value>12)throw new Error("Expecting month in [1..12], instead got ".concat(e.value,"."));const n=new Date(t.value);return n.setMonth(e.value-1),{type:So,value:n}})),Ai("setDay",[So,Ao],(function(t,e){const n=new Date(t.value);if(e.value<=0&&-1!==e.value||e.value>function(t){const e=new Date(t);return e.setMonth(e.getMonth()+1),e.setDate(0),e.getDate()}(n))throw new Error("Unable to set day ".concat(e.value," for date ").concat(Di(t),"."));return n.setDate(-1===e.value?0:e.value),{type:So,value:n}})),Ai("setHours",[So,Ao],(function(t,e){if(e.value<0||e.value>23)throw new Error("Expecting hours in [0..23], instead got ".concat(e.value,"."));const n=new Date(t.value);return n.setHours(e.value-n.getTimezoneOffset()/60),{type:So,value:n}})),Ai("setMinutes",[So,Ao],(function(t,e){if(e.value<0||e.value>59)throw new Error("Expecting minutes in [0..59], instead got ".concat(e.value,"."));const n=new Date(t.value);return n.setMinutes(e.value),{type:So,value:n}})),Ai("setSeconds",[So,Ao],(function(t,e){if(e.value<0||e.value>59)throw new Error("Expecting seconds in [0..59], instead got ".concat(e.value,"."));const n=new Date(t.value);return n.setSeconds(e.value),{type:So,value:n}})),Ai("setMillis",[So,Ao],(function(t,e){if(e.value<0||e.value>999)throw new Error("Expecting millis in [0..999], instead got ".concat(e.value,"."));const n=new Date(t.value);return n.setMilliseconds(e.value),{type:So,value:n}})),Ai("len",[Eo],(function(t){return{type:Ao,value:t.value.length}})),Ai("contains",[Eo,Eo],(function(t,e){return{type:jo,value:t.value.includes(e.value)?1:0}})),Ai("substring",[Eo,Ao,Ao],(function(t,e,n){if(n.value<e.value)throw new Error("Indexes should be in ascending order.");if(e.value<0||e.value>t.value.length||n.value<0||n.value>t.value.length)throw new Error("Indexes are out of bounds.");return{type:Eo,value:t.value.substring(e.value,n.value)}})),Ai("replaceAll",[Eo,Eo,Eo],(function(t,e,n){let r;return r=e.value?t.value.replace(new RegExp(function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(e.value),"g"),n.value):t.value,{type:Eo,value:r}})),Ai("index",[Eo,Eo],(function(t,e){return{type:Ao,value:t.value.indexOf(e.value)}})),Ai("lastIndex",[Eo,Eo],(function(t,e){return{type:Ao,value:t.value.lastIndexOf(e.value)}})),Ai("trim",[Eo],(function(t){return{type:Eo,value:t.value.trim()}})),Ai("trimLeft",[Eo],(function(t){return{type:Eo,value:t.value.replace(/^\s+/,"")}})),Ai("trimRight",[Eo],(function(t){return{type:Eo,value:t.value.replace(/\s+$/,"")}})),Ai("toUpperCase",[Eo],(function(t){return{type:Eo,value:t.value.toUpperCase()}})),Ai("toLowerCase",[Eo],(function(t){return{type:Eo,value:t.value.toLowerCase()}})),Ai("div",[Ao,Ao],Li),Ai("div",[Vo,Vo],Li),Ai("mod",[Ao,Ao],Ui),Ai("mod",[Vo,Vo],Ui),Ai("mul",[{type:Ao,isVararg:!0}],Hi),Ai("mul",[{type:Vo,isVararg:!0}],Hi),Ai("sub",[{type:Ao,isVararg:!0}],qi),Ai("sub",[{type:Vo,isVararg:!0}],qi),Ai("sum",[{type:Ao,isVararg:!0}],Ki),Ai("sum",[{type:Vo,isVararg:!0}],Ki),Ai("abs",[Ao],Gi),Ai("abs",[Vo],Gi),Ai("max",[{type:Ao,isVararg:!0}],Xi),Ai("max",[{type:Vo,isVararg:!0}],Xi),Ai("min",[{type:Ao,isVararg:!0}],Yi),Ai("min",[{type:Vo,isVararg:!0}],Yi),Ai("maxNumber",[],(function(){return{type:Vo,value:ko}})),Ai("minNumber",[],(function(){return{type:Vo,value:Co}})),Ai("maxInteger",[],(function(){return{type:Ao,value:2147483647}})),Ai("minInteger",[],(function(){return{type:Ao,value:xo}})),Ai("round",[Vo],(function(t){const e=Math.sign(t.value);return{type:Vo,value:e*Math.round(Math.abs(t.value))}})),Ai("floor",[Vo],(function(t){return{type:Vo,value:Math.floor(t.value)}})),Ai("ceil",[Vo],(function(t){return{type:Vo,value:Math.ceil(t.value)}})),Ai("signum",[Vo],Zi),Ai("signum",[Ao],Zi),Ai("copySign",[Vo,Vo],Qi),Ai("copySign",[Ao,Ao],Qi),Ai("getColorAlpha",[Eo],na),Ai("getColorAlpha",[Po],na),Ai("getColorRed",[Eo],ra),Ai("getColorRed",[Po],ra),Ai("getColorGreen",[Eo],oa),Ai("getColorGreen",[Po],oa),Ai("getColorBlue",[Eo],ia),Ai("getColorBlue",[Po],ia),Ai("setColorAlpha",[Eo,Vo],aa),Ai("setColorAlpha",[Po,Vo],aa),Ai("setColorRed",[Eo,Vo],la),Ai("setColorRed",[Po,Vo],la),Ai("setColorGreen",[Eo,Vo],sa),Ai("setColorGreen",[Po,Vo],sa),Ai("setColorBlue",[Eo,Vo],ca),Ai("setColorBlue",[Po,Vo],ca),Ai("rgb",[Vo,Vo,Vo],(function(t,e,n){const r={a:255,r:255*t.value,g:255*e.value,b:255*n.value};return{type:Po,value:Bi(r)}})),Ai("argb",[Vo,Vo,Vo,Vo],(function(t,e,n,r){const o={a:255*t.value,r:255*e.value,g:255*n.value,b:255*r.value};return{type:Po,value:Bi(o)}}));const da={StringLiteral:function(t,e){return{type:Eo,value:e.value}},NumberLiteral:function(t,e){return{type:Vo,value:e.value}},IntegerLiteral:function(t,e){return{type:Ao,value:e.value}},BooleanLiteral:function(t,e){return{type:jo,value:e.value?1:0}},UnaryExpression:function(t,e){const n=Pi(pa(t,e.argument));switch(e.operator){case"!":if(n.type===jo)return{type:jo,value:n.value?0:1};Ji("".concat(e.operator).concat(Fi(n)),"A Boolean is expected after a unary not.");case"+":case"-":const t="+"===e.operator?1:-1;if(n.type===Ao)return{type:Ao,value:n.value*t};if(n.type===Vo)return{type:Vo,value:n.value*t};Ji("".concat(e.operator).concat(Fi(n)),"A Number is expected after a unary ".concat("+"===e.operator?"plus":"minus","."))}},ConditionalExpression:function(t,e){const n=Pi(pa(t,e.test));if(n.type===jo)return n.value?pa(t,e.consequent):pa(t,e.alternate);Ji("".concat(Fi(n)," ? ").concat(Fi(pa(t,e.consequent))," : ").concat(Fi(pa(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 pa(t,e.expressions[0]);for(let r=0;r<e.expressions.length;++r)n+=e.quasis[r].value,n+=Di(pa(t,e.expressions[r]));return n+=e.quasis[e.quasis.length-1].value,{type:Eo,value:n}},LogicalExpression:function(t,e){const n=Pi(pa(t,e.left));if(n.type!==jo&&Ji("".concat(Fi(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:jo,value:0};const r=Pi(pa(t,e.right));return r.type!==jo&&Ji("".concat(Fi(n)," ").concat(e.operator," ").concat(Fi(r)),"Operator '".concat(e.operator,"' cannot be applied to different types: Boolean and ").concat(zi(r.type),".")),{type:jo,value:r.value}},BinaryExpression:function(t,e){const n=e.operator,r=pa(t,e.left),o=pa(t,e.right);if(r.type!==o.type&&Ji("".concat(Fi(r)," ").concat(e.operator," ").concat(Fi(o)),"Operator '".concat(n,"' cannot be applied to different types: ").concat(zi(r.type)," and ").concat(zi(o.type),".")),"=="===n||"!="===n)return function(t,e,n){let r;return r=e.type===So&&n.type===So?e.value.getTime()===n.value.getTime():e.value===n.value,"!="===t&&(r=!r),{type:jo,value:r?1:0}}(n,r,o);if(">"===n||">="===n||"<"===n||"<="===n)return function(t,e,n){let r;e.type!==Vo&&e.type!==Ao&&e.type!==So&&Ji("".concat(Fi(e)," ").concat(t," ").concat(Fi(n)),"Operator '".concat(t,"' cannot be applied to ").concat(zi(e.type)," type."));const o=e.type===So?e.value.getTime():e.value,i=n.type===So?n.value.getTime():n.value;return r=">"===t?o>i:">="===t?o>=i:"<"===t?o<i:o<=i,{type:jo,value:r?1:0}}(n,r,o);if("+"===n||"-"===n)return function(t,e,n){if(e.type!==Eo&&e.type!==Vo&&e.type!==Ao&&Ji("".concat(Fi(e)," ").concat(t," ").concat(Fi(n)),"Operator '".concat(t,"' cannot be applied to ").concat(zi(e.type)," type.")),e.type===Eo)return"-"===t&&Ji("".concat(Fi(e)," - ").concat(Fi(n)),"Operator '".concat(t,"' cannot be applied to ").concat(zi(e.type)," type.")),{type:Eo,value:e.value+n.value};let r="+"===t?e.value+n.value:e.value-n.value;return e.type===Ao&&(r=Ni(r)),{type:e.type,value:r}}(n,r,o);if("/"===n||"*"===n||"%"===n)return function(t,e,n){let r;if(e.type!==Ao&&e.type!==Vo&&Ji("".concat(Fi(e)," ").concat(t," ").concat(Fi(n)),"Operator '".concat(t,"' cannot be applied to ").concat(zi(e.type)," type.")),"*"===t)r=e.value*n.value;else{if("/"!==t&&"%"!==t)throw new Error("Unsupported operation ".concat(t));0===n.value&&Ji("".concat(Fi(e)," ").concat(t," ").concat(Fi(n)),"Division by zero is not supported."),r="/"===t?e.value/n.value:e.value%n.value}return e.type===Ao&&(r=Ni(r)),{type:e.type,value:r}}(n,r,o);throw new Error("Unsupported operation ".concat(n))},CallExpression:function(t,e){const n=e.callee.name;if(!Ci.has(n))throw new Error("Unknown function name: ".concat(n,"."));let r;const o=e.arguments.map((e=>pa(t,e))),i=n+":"+o.map((t=>t.type)).join("#");if(Ei.has(i))r=Ei.get(i);else{const t=function(t,e){const n=Ci.get(t);if(!n)throw new Error("Missing function");let r=null;for(let t=0;t<n.length;++t){const o=Vi(n[t],e);if("match"===o.type)return n[t];r||(r=o)}if(!r)throw new Error("Missing function");return r}(n,o);if("expected"in t){const e=o.map((t=>zi(t.type))).join(", "),r="".concat(n,"(").concat(ua(o),")");"few"===t.type&&0===o.length?Ji(r,"Non empty argument list is required for function '".concat(n,"'.")):(t.type,Ji(r,"Function '".concat(n,"' has no matching override for given argument types: ").concat(e,".")))}r=t}if(!r)throw new Error("Function not found");try{return r.cb(...o)}catch(t){Ji("".concat(n,"(").concat(ua(o),")"),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,"' has value null"))}};function pa(t,e){if(e.type in da)return da[e.type](t,e);throw new Error("Unsupported expression")}function fa(t,e){try{return pa(t,e)}catch(t){return{type:"error",value:t.message}}}class ga{constructor(t){this.ast=t}apply(t,e){if(!function(t,e){let n=!1;return ji(t,{Variable(t){e.has(t.id.name)||(n=!0)}}),n}(this.ast,t))try{const n=fa(t,this.ast);if("error"===n.type)return void e(Nt(new Error("Expression execution error"),{additional:{message:n.value}}));const r=n.value;if(r instanceof Date)return Si(r);if("boolean"===n.type)return Boolean(r);if("color"===n.type){const t=Ut(String(r));if(t)return Bi(t);e(Nt(new Error("Expression execution error")))}return r}catch(t){return void e(Nt(new Error("Expression execution error")))}}}function ha(t,e,n){if(t)if("string"==typeof t){if((r=t).indexOf("@{")>-1||r.indexOf("\\")>-1){e.hasExpression=!0;try{const n=ki(t,{startRule:"JsonStringContents"}),r=Ii(n);return e.vars.push(...r),new ga(n)}catch(e){return void n(Nt(new Error("Unable to parse expression"),{additional:{expression:t}}))}}}else{if(Array.isArray(t))return t.map((t=>ha(t,e,n)));if("object"==typeof t){const r={};for(const o in t)r[o]=ha(t[o],e,n);return r}}var r;return t}function ma(t,e,n){if(t){if(t instanceof ga)return t.apply(e,n);if(Array.isArray(t))return t.map((t=>ma(t,e,n)));if("object"==typeof t){const r={};for(const o in t)r[o]=ma(t[o],e,n);return r}}return t}function va(t,e){const n={vars:[],hasExpression:!1},r=ha(t,n,e);return{vars:[...new Set(n.vars)],hasExpression:n.hasExpression,applyVars:t=>ma(r,t,e)}}const ya={pagers:function(){return Ft(new Map)}},$a=new Map,_a=new Map;function ba(t){const e=$a.get(t)||Ft("");return $a.has(t)||$a.set(t,e),e}function wa(t){const e=_a.get(t)||new Map;return _a.has(t)||_a.set(t,e),e}class xa{setVariable(t){const e=t.getName(),n=wa(this);if(n.has(e))throw new Error("Variable with the same name already exist");n.set(e,t),ba(this).set(e)}getVariable(t){return wa(this).get(t)}}function ka(){return new xa}function Ca(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Ea=new Set(["start","stop","pause","resume","cancel","reset"]);class Aa{constructor(t){Ca(this,"timers",new Map),Ca(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(Nt(new Error("Misconfigured timer"),{additional:{id:t.id}})):this.logError(Nt(new Error("Missing timer id")))}execTimerAction(t,e){if(!(t&&e&&this.timers.has(t)&&Ea.has(e)))return void this.logError(Nt(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"))}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),this.stop(t)}),Math.max(0,e-(t.durationPassed||0))));const n=t.tick;if(n){const e=()=>{t.tickStarted=performance.now(),t.tickTimeout=window.setTimeout((()=>{this.tickOrUnholdAction(t),t.tickPassed=0,e()}),Math.max(0,n-(t.tickPassed||0)))};e()}}start(t){if("running"===t.state)return void this.logError(Nt(new Error("The timer is already running")));if("paused"===t.state)return void this.logError(Nt(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)),this.startOrResume(t)):this.logError(Nt(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(Nt(new Error("The timer has already been stopped")))}pause(t){if("stopped"===t.state)return void this.logError(Nt(new Error("The timer has already been stopped")));if("paused"===t.state)return void this.logError(Nt(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(Nt(new Error("The timer is already running"))):this.logError(Nt(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 Va(t){let e,n,r,o,i,a,l,s;return n=new fi({props:{svgFiltersMap:t[2]}}),o=new oi({props:{div:t[6],templateContext:t[5]}}),{c(){e=F("div"),At(n.$$.fragment),r=N(),At(o.$$.fragment),J(e,"class",i="divkit-b023c"+(t[3]?" ".concat("divkit-ee112"):"")+(t[0]?" ".concat(t[0]):""))},m(t,i){P(t,e,i),Vt(n,e,null),A(e,r),Vt(o,e,null),a=!0,l||(s=I(e,"touchstart",Pa,{passive:!0}),l=!0)},p(t,r){const o={};4&r[0]&&(o.svgFiltersMap=t[2]),n.$set(o),(!a||9&r[0]&&i!==(i="divkit-b023c"+(t[3]?" ".concat("divkit-ee112"):"")+(t[0]?" ".concat(t[0]):"")))&&J(e,"class",i)},i(t){a||($t(n.$$.fragment,t),$t(o.$$.fragment,t),a=!0)},o(t){_t(n.$$.fragment,t),_t(o.$$.fragment,t),a=!1},d(t){t&&S(e),jt(n),jt(o),l=!1,s()}}}function ja(t){let e,n,r=!t[1]&&t[6]&&Va(t);return{c(){r&&r.c(),e=T()},m(t,o){r&&r.m(t,o),P(t,e,o),n=!0},p(t,n){!t[1]&&t[6]?r?(r.p(t,n),2&n[0]&&$t(r,1)):(r=Va(t),r.c(),$t(r,1),r.m(e.parentNode,e)):r&&(vt(),_t(r,1,1,(()=>{r=null})),yt())},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Pa(){}function Sa(t,e,n){let r;var o,i,a,l;let{id:s}=e,{json:c={}}=e,{platform:u="auto"}=e,{theme:d="system"}=e,{globalVariablesController:p=new xa}=e,{mix:f=""}=e,{customization:h={}}=e,{builtinProtocols:m=["http","https","tel","mailto","intent"]}=e,{onError:v}=e,{onStat:y}=e,{onCustomAction:$}=e,{onComponent:_}=e,b=Ft("desktop"===u);if(g(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(22,w=x.matches?"dark":"light")}const C=new Set(m);let E=!1;c||(E=!0,T(Nt(new Error('"json" prop is required')))),s||(E=!0,T(Nt(new Error('"id" prop is required'))));let A=function(t){if(!t)return Nt(new Error("Missing object"));const e=t.card,n=t.templates||{};if(!e)return Nt(new Error("Missing card"));if(!e.states||!e.states.length)return Nt(new Error("Missing states"));for(const t in n)if(n.hasOwnProperty(t)&&t in ti)return Nt(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t){if(!e.states[t].div)return Nt(new Error("Missing state div"),{additional:{stateId:e.states[t].state_id}});if("number"!=typeof e.states[t].state_id)return Nt(new Error("Missing state_id"),{additional:{index:t}})}return null}(c);const V=c.templates||{};A&&(E=!0,T(A));const j={stateChange:!1},P=ba(p),S=wa(p),D=new Map,F=new Map,z=new Map;let M=null;function N(t){const e=va(t,T);return e.vars.length?e.applyVars(F):t}function T(t){v?v({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}function I(t,e){y&&y({type:t,action:e})}let J=0;function O(t){return"".concat(s,"-").concat(J++)}let B={},R={};function W(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=Z,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],o=n[t+1];let i=e.getChild(r);if(!i)return;i.setState(o),e=i}}(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=q(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=q(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=q(t);n&&n.setNextItem(e)}(r.get("id"),r.get("overflow"));break;case"set_variable":const n=r.get("name"),o=r.get("value");if(n&&null!==o){const t=F.get(n);t?t.set(o):T(Nt(new Error("Cannot find variable"),{additional:{name:n}}))}else T(Nt(new Error("Incorrect set_variable_action"),{additional:{url:t}}));break;case"timer":const i=r.get("action"),a=r.get("id");M?M.execTimerAction(a,i):T(Nt(new Error("Incorrect timer action"),{additional:{id:a,action:i}}));break;default:T(Nt(new Error("Unknown type of action"),{additional:{url:e}}))}}catch(t){T(Nt(t,{additional:{url:e}}))}}async function L(t,e){if(t){for(let n=0;n<t.length;++n){let r=t[n];const o=r.url;if(o){const t=Qt(o);if(t)if(te(t,C)){if(e)if("_blank"===r.target){const t=window.open("","_blank");t&&(t.opener=null,t.location=o)}else location.href=o}else"div-action"===t?(W(r),await lt()):r.log_id&&(U(r),await lt())}}t.forEach((t=>{t.log_id&&I("click",t)}))}}function U(t){null==$||$(t)}const H=new Map;function q(t){if(H.has(t))return H.get(t);T(Nt(new Error("Missing instance with id"),{additional:{id:t}}))}const K=new Map;function G(t){for(const e of t)F.has(e)&&t.delete(e);return t}Y(Mt,{logError:T,logStat:I,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}=gi(t,e,V,T)),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:W,execAnyActions:L,execCustomAction:U,isRunning:function(t){return j[t]},setRunning:function(t,e){j[t]=e},registerInstance:function(t,e){H.has(t)?T(Nt(new Error("Duplicate instance id"),{additional:{id:t}})):H.set(t,e)},unregisterInstance:function(t){H.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 o="".concat(O(),"-svg-filter");return n(2,B=Object.assign(Object.assign({},B),{[r]:o})),o},removeSvgFilter:function(t,e){if(!t||!R[t])return;const r="".concat(t,":").concat(e);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 mi(t);const e=va(t,T);return e.vars.length?zt(e.vars.map((t=>F.get(t)||function(t){const e=z.get(t)||Ft(void 0);return z.has(t)||z.set(t,e),e}(t))).filter(qt),(()=>e.applyVars(F))):e.hasExpression?mi(e.applyVars(F)):mi(t)},getJsonWithVars:N,getStore:function(t){return K.has(t)||function(t){K.has(t)||K.set(t,ya[t]())}(t),K.get(t)},getVariable:function(t,e){const n=F.get(t);if(n){const r=n.getType();if(r!==e)return void T(Nt(new Error('Variable should have type "'.concat(e,'"')),{additional:{name:t,foundType:r}}))}return n},getCustomization:function(t){return null==h?void 0:h[t]},getBuiltinProtocols:function(){return C},isDesktop:b,registerComponent:void 0,unregisterComponent:void 0}),Y(ve,{hasAction:()=>!1});const Z={setState(t){throw new Error("Not implemented")},getChild(t){if(Q&&Q.has(t))return Q.get(t);T(Nt(new Error("Missing state block with id"),{additional:{id:t}}))}};let Q=null;Y(re,{registerInstance(t,e){Q||(Q=new Map),Q.has(t)?T(Nt(new Error("Duplicate state with id"),{additional:{id:t}})):Q.set(t,e)},unregisterInstance(t){null==Q||Q.delete(t)},runVisibilityTransition:(t,e,n,r,o)=>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 tt=null===(o=null==c?void 0:c.card)||void 0===o?void 0:o.variables;Array.isArray(tt)&&tt.forEach((t=>{if(t&&t.type in Fo&&t.name){if(D.has(t.name))return void T(Nt(new Error("Duplicate variable"),{additional:{name:t.name}}));try{const e=zo(t.name,t.type,t.value);D.set(t.name,e),F.set(t.name,e)}catch(e){T(Nt(e,{additional:{name:t.name}}))}}}));const et=c.palette;et&&et[w].forEach((t=>{if(D.has(t.name))T(Nt(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=zo(t.name,"color",t.color);D.set(t.name,e),F.set(t.name,e)}catch(e){T(Nt(e,{additional:{name:t.name}}))}}));for(const[t,e]of S)F.has(t)||F.set(t,e);P.subscribe((t=>{if(t&&!F.has(t)){const e=S.get(t);F.set(t,e);const n=z.get(t);if(n){let t=0;e.subscribe((()=>{n.set(++t)}))}}}));const nt=null===(i=null==c?void 0:c.card)||void 0===i?void 0:i.variable_triggers;Array.isArray(nt)&&nt.forEach((t=>{let e=!1;if("string"!=typeof t.condition)return void T(Nt(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=ki(t.condition,{startRule:"JsonStringContents"}),o=Ii(r);if(!o.length)return void T(Nt(new Error("variable_trigger must have variables in the condition"),{additional:{condition:t.condition}}));(function(t){const e=new Set(t);return G(e),e.size?new Promise((t=>{const n=P.subscribe((()=>{G(e),e.size||(n(),t())}))})):Promise.resolve()})(o).then((()=>{zt(o.map((t=>F.get(t))).filter(qt),(()=>fa(F,r))).subscribe((r=>{"error"!==r.type?(r.value&&("on_variable"===n||"on_condition"===n&&!1===e)&&t.actions.forEach((t=>{const e=N(t);e.log_id&&W(e)})),e=Boolean(r.value)):T(Nt(new Error("variable_trigger condition execution error"),{additional:{message:r.value}}))}))}))}catch(e){T(Nt(new Error("Unable to parse variable_trigger"),{additional:{condition:t.condition}}))}else T(Nt(new Error("variable_trigger has an unsupported mode"),{additional:{mode:n}}))}));const rt=null===(a=null==c?void 0:c.card)||void 0===a?void 0:a.timers;if(rt){const t=M=new Aa({logError:T,applyVars:N,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):T(Nt(new Error("Cannot find variable"),{additional:{name:t}}))},execAnyActions:L});rt.forEach((e=>t.createTimer(e)))}const ot=null===(l=null==c?void 0:c.card)||void 0===l?void 0:l.states,it=ot&&!E?{type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:ot.map((t=>({state_id:t.state_id.toString(),div:t.div})))}:void 0;return X((()=>{M&&M.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,p=t.globalVariablesController),"mix"in t&&n(0,f=t.mix),"customization"in t&&n(12,h=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=()=>{8388736&t.$$.dirty[0]&&("light"===d||"dark"===d?n(22,w=d):"system"===d?"undefined"!=typeof matchMedia?(x||(n(23,x=matchMedia("(prefers-color-scheme: dark)")),x.addListener(k)),n(22,w=x.matches?"dark":"light")):n(22,w="light"):T(Nt(new Error("Unsupported theme")))),4194304&t.$$.dirty[0]&&w&&et&&et[w].forEach((t=>{const e=F.get(t.name);e&&e.setValue(t.color)}))},[f,E,B,r,b,{},it,d,s,c,u,p,h,m,v,y,$,_,function(t){n(7,d=t)},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()},W,w,x]}const Da=class extends St{constructor(t){super(),Pt(this,t,Sa,ja,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,setVariable:19,getVariable:20,execAction:21},null,[-1,-1,-1])}get setTheme(){return this.$$.ctx[18]}get setVariable(){return this.$$.ctx[19]}get getVariable(){return this.$$.ctx[20]}get execAction(){return this.$$.ctx[21]}};function Fa(t){return new Da({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 za=e.M,Ma=e.Os,Na=e.sY;export{za as createGlobalVariablesController,Ma as createVariable,Na 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:()=>Va,Os:()=>Fi,sY:()=>Ta});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 p(t){return 0===Object.keys(t).length}function f(t,...e){if(null==t)return n;const r=t.subscribe(...e);return r.unsubscribe?()=>r.unsubscribe():r}function g(t,e,n){t.$$.on_destroy.push(f(e,n))}function h(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 C(t){k.forEach((e=>{e.c(t)||(k.delete(e),e.f())})),0!==k.size&&x(C)}let E=!1;function A(t,e){t.appendChild(e)}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=F("style");return function(t,e){A(t.head||t,e)}(V(t),e),e.sheet}function P(t,e,n){t.insertBefore(e,n||null)}function S(t){t.parentNode.removeChild(t)}function D(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function F(t){return document.createElement(t)}function z(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function M(t){return document.createTextNode(t)}function N(){return M(" ")}function T(){return M("")}function I(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function J(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function O(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]:J(t,r,e[r])}function B(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function R(t,e,n,r){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}const L=new Map;let W,U=0;function q(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(", "),U-=i,U||x((()=>{U||(L.forEach((t=>{const{stylesheet:e}=t;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.rules={}})),L.clear())})))}function H(t){W=t}function K(){if(!W)throw new Error("Function called outside component initialization");return W}function G(t){K().$$.on_mount.push(t)}function X(t){K().$$.on_destroy.push(t)}function Y(t,e){return K().$$.context.set(t,e),e}function Z(t){return K().$$.context.get(t)}function Q(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const tt=[],et=[],nt=[],rt=[],it=Promise.resolve();let ot=!1;function at(){ot||(ot=!0,it.then(pt))}function lt(){return at(),it}function st(t){nt.push(t)}const ct=new Set;let ut,dt=0;function pt(){const t=W;do{for(;dt<tt.length;){const t=tt[dt];dt++,H(t),ft(t.$$)}for(H(null),tt.length=0,dt=0;et.length;)et.pop()();for(let t=0;t<nt.length;t+=1){const e=nt[t];ct.has(e)||(ct.add(e),e())}nt.length=0}while(tt.length);for(;rt.length;)rt.pop()();ot=!1,ct.clear(),H(t)}function ft(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(st)}}function gt(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 ht=new Set;let mt;function vt(){mt={r:0,c:[],p:mt}}function yt(){mt.r||l(mt.c),mt=mt.p}function $t(t,e){t&&t.i&&(ht.delete(t),t.i(e))}function _t(t,e,n,r){if(t&&t.o){if(ht.has(t))return;ht.add(t),mt.c.push((()=>{ht.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}const bt={duration:0};function wt(t,e,i){let o,a,l=e(t,i),c=!1,u=0;function d(){o&&q(t,o)}function p(){const{delay:e=0,duration:i=300,easing:s=r,tick:p=n,css:f}=l||bt;f&&(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}`,p=V(t),{stylesheet:f,rules:g}=L.get(p)||function(t,e){const n={stylesheet:j(e),rules:{}};return L.set(t,n),n}(p,t);g[d]||(g[d]=!0,f.insertRule(`@keyframes ${d} ${u}`,f.cssRules.length));const h=t.style.animation||"";return t.style.animation=`${h?`${h}, `:""}${d} ${r}ms linear ${i}ms 1 both`,U+=1,d}(t,0,1,i,e,s,f,u++)),p(0,1);const g=w()+e,h=g+i;a&&a.abort(),c=!0,st((()=>gt(t,!0,"start"))),a=function(t){let e;return 0===k.size&&x(C),{promise:new Promise((n=>{k.add(e={c:t,f:n})})),abort(){k.delete(e)}}}((e=>{if(c){if(e>=h)return p(1,0),gt(t,!0,"end"),d(),c=!1;if(e>=g){const t=s((e-g)/i);p(t,1-t)}}return c}))}let f=!1;return{start(){f||(f=!0,q(t),s(l)?(l=l(),(ut||(ut=Promise.resolve(),ut.then((()=>{ut=null}))),ut).then(p)):p())},invalidate(){f=!1},end(){c&&(d(),c=!1)}}}const xt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function kt(t,e){_t(t,1,1,(()=>{e.delete(t.key)}))}function Ct(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 Et;function At(t){t&&t.c()}function Vt(t,e,n,r){const{fragment:i,on_mount:a,on_destroy:c,after_update:u}=t.$$;i&&i.m(e,n),r||st((()=>{const e=a.map(o).filter(s);c?c.push(...e):l(e),t.$$.on_mount=[]})),u.forEach(st)}function jt(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 Pt(t,e,r,i,o,s,c,u=[-1]){const d=W;H(t);const p=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(p.root);let f=!1;if(p.ctx=r?r(t,e.props||{},((e,n,...r)=>{const i=r.length?r[0]:n;return p.ctx&&o(p.ctx[e],p.ctx[e]=i)&&(!p.skip_bound&&p.bound[e]&&p.bound[e](i),f&&function(t,e){-1===t.$$.dirty[0]&&(tt.push(t),at(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n})):[],p.update(),f=!0,l(p.before_update),p.fragment=!!i&&i(p.ctx),e.target){if(e.hydrate){E=!0;const t=(g=e.target,Array.from(g.childNodes));p.fragment&&p.fragment.l(t),t.forEach(S)}else p.fragment&&p.fragment.c();e.intro&&$t(t.$$.fragment),Vt(t,e.target,e.anchor,e.customElement),E=!1,pt()}var g;H(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&&(Et=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(){jt(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&&!p(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});class St{$destroy(){jt(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&&!p(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Dt=[];function Ft(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=!Dt.length;for(const e of i)e[1](),Dt.push(e,t);if(e){for(let t=0;t<Dt.length;t+=2)Dt[t][0](Dt[t+1]);Dt.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 zt(t,e,r){const i=!Array.isArray(t),o=i?[t]:t,a=e.length<2;return{subscribe:Ft(r,(t=>{let r=!1;const c=[];let u=0,d=n;const p=()=>{if(u)return;d();const r=e(i?c[0]:c,t);a?t(r):d=s(r)?r:n},g=o.map(((t,e)=>f(t,(t=>{c[e]=t,u&=~(1<<e),r&&p()}),(()=>{u|=1<<e}))));return r=!0,p(),function(){l(g),d()}})).subscribe}}const Mt=Symbol("root");function Nt(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 Tt={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"},It={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_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 Jt(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 Ot(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 Bt(t){let e=Ot(t);return"0"===e&&(e+="em"),e}function Rt(t,e){for(;t.length<e;)t="0"+t;return t}function Lt(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=Ut(t);return r?(r.a*=e,Wt(r)):n}function Wt(t){return 255===t.a?"#".concat([t.r,t.g,t.b].map((t=>Rt(Math.round(t).toString(16),2))).join("")):"rgba(".concat(t.r,",").concat(t.g,",").concat(t.b,",").concat((t.a/255).toFixed(2),")")}function Ut(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 qt(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 Ht=Boolean;function Kt(t){if(1===t.length&&"solid"===t[0].type)return{color:Lt(t[0].color||"transparent"),size:"auto",position:"50% 50%"};const e=t.map((t=>"solid"===t.type?function(t){const e=Lt(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(Ht);return n.length?{size:void 0,pos:void 0,image:"linear-gradient("+(90-Number(t.bg.angle||0))+"deg,"+n.map((t=>Lt(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:Yt(t.bg.scale),pos:Zt(t.bg),image:'url("'+qt(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(Ht);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=Bt(r.value):"relative"===r.type&&(i=Gt[r.value]));const o=Xt(t.bg.center_x),a=Xt(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=>Lt(t))).join(",")+")"}}({bg:t}):void 0)).filter(Ht).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 Gt={nearest_corner:"closest-corner",farthest_corner:"farthest-corner",nearest_side:"closest-side",farthest_side:"farthest-side"};function Xt(t){if(t&&"object"==typeof t&&"type"in t&&void 0!==t.value){if("fixed"===t.type)return Bt(t.value);if("relative"===t.type)return"".concat(100*Number(t.value),"%")}return"50%"}function Yt(t){return"fill"!==t&&t?"fit"===t?"contain":void 0:"cover"}function Zt(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 Qt(t){const e=/^([^/]+):\/\//.exec(t);return e&&e[1]||""}function te(t,e){return e.has(t)}function ee(t,e){e&&t.push(e)}function ne(t,e,n){const r=[];ee(r,e[t]);for(const i in n)if(n.hasOwnProperty(i)){const o=n[i];o&&ee(r,e["".concat(t,"_").concat(i)+("string"==typeof o?"_".concat(o):"")])}return r.join(" ")}const re=Symbol("state");function ie(t){return Ot(t.top||0)+" "+Ot(t.right||0)+" "+Ot(t.bottom||0)+" "+Ot(t.left||0)}function oe(t){if("number"!=typeof t&&"string"!=typeof t)return!1;const e=Number(t);return!isNaN(e)}function ae(t){return oe(t)&&t>=0}function le(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]&&!ae(n[t]))return e;return ie(t)}function se(t,e){const n=Number(t);return isNaN(n)||n<0?e:n}const ce=Object.prototype.hasOwnProperty;function ue(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(!ce.call(e,i)||!ue(t[i],e[i]))return!1}return!0}function de(t,e){return ue(t,e)?e:t}function pe(t,e){return"linear"===t||"ease"===t||"ease_in_out"===t||"ease_in"===t||"ease_out"===t?t:e}function fe(t,e){const n=Number(t);return isNaN(n)?e:n}function ge(t){const e=[];return"set"===t.name?(t.items||[]).forEach((t=>{e.push(...ge(t))})):e.push(t),e}function he(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=>Ot((t||e)/n*10))).join(" ")}function me(){}const ve=Symbol("action");function ye(t){const e=t.touches[0];return{x:e.clientX||e.pageX,y:e.clientY||e.pageY}}function $e(t){var e;let n,r,o,a,c,u,d,p;const f=t[19].default,g=h(f,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=F("span"),g&&g.c(),O(n,b)},m(e,r){P(e,n,r),g&&g.m(n,null),u=!0,d||(p=[_(c=t[5].call(null,n)),I(n,"click",(function(){s(t[9]?t[10]:null)&&(t[9]?t[10]:null).apply(this,arguments)})),I(n,"click",t[21]),I(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)})),I(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)})),I(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)})),I(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)})),I(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)})),I(n,"keydown",t[15])],d=!0)},p(e,i){var l;t=e,g&&g.p&&(!u||262144&i)&&y(g,f,t,t[18],u?v(f,t[18],i,null):$(t[18]),null),O(n,b=Ct(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||($t(g,t),u=!0)},o(t){_t(g,t),u=!1},d(t){t&&S(n),g&&g.d(t),d=!1,l(p)}}}function _e(t){var e;let n,r,o,a,c,u;const d=t[19].default,p=h(d,t,t[18],null);let f=[{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]],g={};for(let t=0;t<f.length;t+=1)g=i(g,f[t]);return{c(){n=F("a"),p&&p.c(),O(n,g)},m(e,r){P(e,n,r),p&&p.m(n,null),a=!0,c||(u=[_(o=t[5].call(null,n)),I(n,"click",t[10]),I(n,"click",t[20]),I(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)})),I(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)})),I(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)})),I(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)})),I(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)})),I(n,"keydown",t[15])],c=!0)},p(e,i){var o;t=e,p&&p.p&&(!a||262144&i)&&y(p,d,t,t[18],a?v(d,t[18],i,null):$(t[18]),null),O(n,g=Ct(f,[(!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||($t(p,t),a=!0)},o(t){_t(p,t),a=!1},d(t){t&&S(n),p&&p.d(t),c=!1,l(u)}}}function be(t){let e,n,r,i;const o=[_e,$e],a=[];function l(t,e){return t[7]?0:1}return e=l(t),n=a[e]=o[e](t),{c(){n.c(),r=T()},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):(vt(),_t(a[c],1,1,(()=>{a[c]=null})),yt(),n=a[e],n?n.p(t,s):(n=a[e]=o[e](t),n.c()),$t(n,1),n.m(r.parentNode,r))},i(t){i||($t(n),i=!0)},o(t){_t(n),i=!1},d(t){a[e].d(t),t&&S(r)}}}function we(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=me}=e,{customAction:p=null}=e,{isNativeActionAnimation:f=!0}=e;const g=Z(Mt),h=Z(ve);Y(ve,{hasAction:()=>Boolean(h.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)&&h.hasAction()&&(v="",g.logError(Nt(new Error("Actionable element is forbidden inside other actionable element"),{level:"warn",additional:{actions:o}})));let b=Boolean(p);return v&&!te(Qt(v),g.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,p=t.customAction),"isNativeActionAnimation"in t&&n(6,f=t.isNativeActionAnimation),"$$scope"in t&&n(18,i=t.$$scope)},[a,l,s,c,u,d,f,v,m,b,async function(t){h.hasAction()||void 0!==t.button&&0!==t.button||(!1===(null==p?void 0:p(t))?t.preventDefault():o&&(o.some((t=>{const e=null==t?void 0:t.url;if(!e)return!1;const n=Qt(e);return n&&!te(n,g.getBuiltinProtocols())}))&&t.preventDefault(),g.execAnyActions(o)))},function(t){h.hasAction()||void 0!==t.button&&0!==t.button||g.execAnyActions(a,!0)},function(t){t.touches.length>1||($=ye(t),_=!1,y=Date.now())},function(t){if(!$)return;const e=ye(t);(Math.abs($.x-e.x)>8||Math.abs($.y-e.y)>8)&&(_=!0)},function(){!$||y<0||(!_&&Date.now()-y>=400&&g.execAnyActions(l,!0),$=null,y=-1)},function(t){t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||"Enter"===t.key&&Array.isArray(o)&&o.length&&(g.execAnyActions(o),t.preventDefault())},o,p,i,r,function(e){Q.call(this,t,e)},function(e){Q.call(this,t,e)}]}const xe=class extends St{constructor(t){super(),Pt(this,t,we,be,d,{actions:16,doubleTapActions:0,longTapActions:1,cls:2,style:3,attrs:4,use:5,customAction:17,isNativeActionAnimation:6})}};function ke(t){return oe(t)&&t>0}function Ce(t,e){return t.map((t=>{if("blur"===(null==t?void 0:t.type)){if(ke(t.radius))return"blur(".concat(Bt(t.radius/2),")")}else e(Nt(new Error("Unknown filter"),{level:"warn",additional:{filter:null==t?void 0:t.type}}))})).filter(Boolean).join(" ")}function Ee(t,e,n){const r=t.slice();return r[5]=e[n],r}function Ae(t){let e,n,r;return{c(){e=F("span"),J(e,"class",n="divkit-b921d"),J(e,"style",r=Jt(t[5].style))},m(t,n){P(t,e,n)},p(t,n){2&n&&r!==(r=Jt(t[5].style))&&J(e,"style",r)},d(t){t&&S(e)}}}function Ve(t){let e,n,r,i,o,a;return{c(){e=F("img"),u(e.src,n=t[5].image_url)||J(e,"src",n),J(e,"alt",""),J(e,"aria-hidden","true"),J(e,"loading","lazy"),J(e,"decoding","async"),J(e,"class",r="divkit-b921d"),J(e,"style",i=Jt(t[5].style))},m(n,r){P(n,e,r),o||(a=I(e,"error",t[2]),o=!0)},p(t,r){2&r&&!u(e.src,n=t[5].image_url)&&J(e,"src",n),2&r&&i!==(i=Jt(t[5].style))&&J(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?Ve:Ae}let r=n(t),i=r(t);return{c(){i.c(),e=T()},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 Pe(t){let e,r,i=t[1],o=[];for(let e=0;e<i.length;e+=1)o[e]=je(Ee(t,i,e));return{c(){e=F("span");for(let t=0;t<o.length;t+=1)o[t].c();J(e,"class",r="divkit-bf253"+(t[0]?" divkit-dcad7":"")),R(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=Ee(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":""))&&J(e,"class",r),1&a&&R(e,"border-radius",t[0],!1)},i:n,o:n,d(t){t&&S(e),D(o,t)}}}function Se(t,e,n){let r,{background:i=[]}=e,{radius:o=""}=e;const a=Z(Mt);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=Kt([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=Ce(t.filters,a.logError)))}return n})))},[o,r,function(t){t.target&&"classList"in t.target&&t.target.classList.add("divkit-cd613")},i]}const De=class extends St{constructor(t){super(),Pt(this,t,Se,Pe,d,{background:3,radius:0})}};function Fe(t){let e,n;return e=new xe({props:{use:t[32],cls:t[0]+" "+ne("outer",It,t[15]),style:Jt(t[13]),actions:t[10],doubleTapActions:t[11],longTapActions:t[12],attrs:t[6],isNativeActionAnimation:!t[4].length||Ie(t[4]),$$slots:{default:[Ne]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){const r={};32769&n[0]&&(r.cls=t[0]+" "+ne("outer",It,t[15])),8192&n[0]&&(r.style=Jt(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||Ie(t[4])),174&n[0]|131072&n[3]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function ze(t){let e,n;return e=new De({props:{background:t[5],radius:t[2]}}),{c(){At(e.$$.fragment)},m(t,r){Vt(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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function Me(t){let e,n,r;return{c(){e=F("span"),J(e,"class",n=It.outer__border),J(e,"style",r=Jt(t[1]))},m(t,n){P(t,e,n)},p(t,n){2&n[0]&&r!==(r=Jt(t[1]))&&J(e,"style",r)},d(t){t&&S(e)}}}function Ne(t){let e,n,r,i=t[3]&&ze(t);const o=t[109].default,a=h(o,t,t[110],null);let l=t[7]&&Me(t);return{c(){i&&i.c(),e=T(),a&&a.c(),l&&l.c(),n=T()},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]&&$t(i,1)):(i=ze(t),i.c(),$t(i,1),i.m(e.parentNode,e)):i&&(vt(),_t(i,1,1,(()=>{i=null})),yt()),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=Me(t),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},i(t){r||($t(i),$t(a,t),r=!0)},o(t){_t(i),_t(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 Te(t){let e,n,r=!t[8]&&!t[9]&&Fe(t);return{c(){r&&r.c(),e=T()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[8]||t[9]?r&&(vt(),_t(r,1,1,(()=>{r=null})),yt()):r?(r.p(t,n),768&n[0]&&$t(r,1)):(r=Fe(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Ie(t){return t.some((t=>"native"===t.name))}function Je(t,e,r){let i,o,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k,C,E,A,V,j,P,S,D,F,z,M,N,T,I,J,O,B,R,L,W,U,q=n,H=n,K=n,G=n,X=n,Y=n,Q=n,tt=n,et=n,nt=n,rt=n,it=n,ot=n,at=n,st=n,ct=n,ut=n;t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y())),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((()=>at())),t.$$.on_destroy.push((()=>st())),t.$$.on_destroy.push((()=>ct())),t.$$.on_destroy.push((()=>ut()));let{$$slots:dt={},$$scope:pt}=e;var ft,gt,ht,mt,vt,yt;let{json:$t={}}=e,{origJson:_t}=e,{templateContext:bt}=e,{cls:wt=""}=e,{style:xt}=e,{layoutParams:kt={}}=e,{customDescription:Ct=!1}=e,{customPaddings:Et=!1}=e,{customActions:At=""}=e,{additionalPaddings:Vt=null}=e;const jt={left:"start",center:"center",right:"end"},Pt={top:"start",center:"center",bottom:"end",baseline:"baseline"},St=Z(Mt),Dt=Z(re);let Ft,zt,Tt,It,Jt,Rt,Wt,Ut,qt,Ht,Gt,Xt={},Yt={},Zt=!1,ee=1,ne="transparent",oe=0,ce={"top-left":0,"top-right":0,"bottom-right":0,"bottom-left":0},ue="",me=null,ve="",ye={},$e=0,_e=0,be=0,we=!1,xe=!1,ke={},Ce=0,Ee=0,Ae=0,Ve=!1,je=!1,Pe=1;const Se=kt.fakeElement?[]:$t.transition_triggers||["state_change","visibility_change"],De=-1!==Se.indexOf("state_change")&&$t.id,Fe=-1!==Se.indexOf("visibility_change")&&$t.id;let ze,Me,Ne,Te,Ie,Je,Oe,Be=[],Re=[],Le=[],We=[],Ue="";function qe(t){const e=fe(t.start_value,1),n=fe(t.end_value,1),i=se(t.start_delay,0),o=se(t.duration,300),a=pe(t.interpolator,"ease_in_out").replace(/_/g,"-");switch(t.name){case"fade":return r(78,Te=e),r(79,Ie=n),"opacity ".concat(o,"ms ").concat(a," ").concat(i,"ms");case"scale":return r(80,Je=e),r(81,Oe=n),"transform ".concat(o,"ms ").concat(a," ").concat(i,"ms");case"native":case"no_animation":return"";default:return St.logError(Nt(new Error("Unknown action_animation name"),{additional:{animation:t.name}})),""}}let He,Ke,Ge=!1,Xe="visible",Ye=0,Ze=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,Ct=t.customDescription),"customPaddings"in t&&r(39,Et=t.customPaddings),"customActions"in t&&r(40,At=t.customActions),"additionalPaddings"in t&&r(41,Vt=t.additionalPaddings),"$$scope"in t&&r(110,pt=t.$$scope)},t.$$.update=()=>{if(4&t.$$.dirty[1]&&(r(31,i=St.getDerivedFromVars($t.border)),ut(),ut=f(i,(t=>r(108,U=t)))),2&t.$$.dirty[0]|4192256&t.$$.dirty[1]|32768&t.$$.dirty[3]){let t={},e={},n=!1,i="";if(U){if(U.has_shadow){const e=U.shadow;t["box-shadow"]=e?Ot((null===r(43,gt=null===r(42,ft=e.offset)||void 0===ft?void 0:ft.x)||void 0===gt?void 0:gt.value)||0)+" "+Ot((null===r(45,mt=null===r(44,ht=e.offset)||void 0===ht?void 0:ht.y)||void 0===mt?void 0:mt.value)||0)+" "+Ot(null!==r(46,vt=e.blur)&&void 0!==vt?vt:2)+" "+Lt(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(U.stroke&&(n=!0,r(49,ee=se(U.stroke.width,ee)),r(50,ne=Lt(U.stroke.color,1,ne)),e.border="".concat(Ot(ee)," solid ").concat(ne)),U.corners_radius?(r(52,ce=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]&&!ae(n[t]))return e;return t}(U.corners_radius,ce)),e["border-radius"]=t["border-radius"]=he(ce)):U.corner_radius&&(r(51,oe=se(U.corner_radius,oe)),r(52,ce={"top-left":oe,"top-right":oe,"bottom-right":oe,"bottom-left":oe}),e["border-radius"]=t["border-radius"]=Ot(oe)),n&&ee&&(U.corners_radius||U.corner_radius)){let t=Object.assign({},ce);["top-left","top-right","bottom-right","bottom-left"].forEach((e=>{t[e]=(t[e]||0)+ee/2})),i=he(t)}}r(48,Xt=de(t,Xt)),r(1,Yt=de(e,Yt)),r(7,Zt=n),r(2,ue=i)}if(4&t.$$.dirty[1]&&(r(30,o=St.getDerivedFromVars($t.paddings)),ct(),ct=f(o,(t=>r(107,W=t)))),4194560&t.$$.dirty[1]|16384&t.$$.dirty[3]&&r(53,me=function(t,e){if(!t)return e;const n=["top","right","bottom","left"];for(let r=0;r<n.length;++r)if(t[n[r]]&&!ae(t[n[r]]))return e;return t}(W&&!Et?W:void 0,me)),4195328&t.$$.dirty[1]&&r(89,a=ie(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}(me,Vt))),4&t.$$.dirty[1]&&(r(29,l=St.getDerivedFromVars($t.margins)),at(),at=f(l,(t=>r(105,R=t)))),8388608&t.$$.dirty[1]|4096&t.$$.dirty[3]&&r(54,ve=le(R,ve)),4&t.$$.dirty[1]&&(r(28,s=St.getDerivedFromVars($t.width)),it(),it=f(s,(t=>r(103,O=t)))),4&t.$$.dirty[1]&&(r(27,c=St.getDerivedFromVars($t.alignment_horizontal)),st(),st=f(c,(t=>r(106,L=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,$e=se(null==O?void 0:O.value,$e)),e=Ot($e);else if("wrap_content"===u||!kt.overlapParent&&"match_parent"===u&&kt.parentHorizontalWrapContent){if(t="content",("wrap_content"===u&&(null==O?void 0:O.constrained)||"match_parent"===u&&kt.parentHorizontalWrapContent)&&(o["width-constrained"]=!0,l=1),"wrap_content"===u){const t=O;t.min_size&&ae(t.min_size.value)&&(n=Ot(t.min_size.value)),t.max_size&&ae(t.max_size.value)&&(i=Ot(t.max_size.value))}"match_parent"===u&&St.logError(Nt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}else t="parent","vertical"===kt.parentContainerOrientation&&kt.parentContainerWrap&&(c=!0,St.logError(Nt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"vertical"===kt.parentLayoutOrientation?e="calc(100% - ".concat(Bt(((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));if("parent"===t)o["halign-self"]="stretch";else{const t=L;o["halign-self"]="left"===t||"center"===t||"right"===t?jt[t]:kt.parentHAlign||"start"}t&&(o.width=t),r(56,Tt=e),r(57,It=n),r(58,Jt=i),r(60,_e=a),r(61,be=l),r(55,ye=de(o,ye)),r(62,we=s),r(8,xe=c)}if(4&t.$$.dirty[1]&&(r(26,u=St.getDerivedFromVars($t.height)),rt(),rt=f(u,(t=>r(102,J=t)))),4&t.$$.dirty[1]&&(r(25,d=St.getDerivedFromVars($t.alignment_vertical)),ot(),ot=f(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=se(null==J?void 0:J.value,Ce)),e=Ot(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,l=1),"wrap_content"===u){const t=J;(null==t?void 0:t.min_size)&&ae(t.min_size.value)&&(n=Ot(t.min_size.value)),(null==t?void 0:t.max_size)&&ae(t.max_size.value)&&(i=Ot(t.max_size.value))}"match_parent"===u&&St.logError(Nt(new Error("Cannot place child with match_parent size inside wrap_content"),{level:"warn"}))}else t="parent","horizontal"===kt.parentContainerOrientation&&kt.parentContainerWrap&&(c=!0,St.logError(Nt(new Error("Cannot place a match_parent items on the cross-axis of wrap"),{level:"error"}))),"horizontal"===kt.parentLayoutOrientation?e="calc(100% - ".concat(Bt(((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"]=Pt[t]:o["valign-self"]=kt.parentVAlign||"start"}t&&(o.height=t),r(64,Rt=e),r(65,Wt=n),r(66,Ut=i),r(68,Ee=a),r(69,Ae=l),r(63,ke=de(o,ke)),r(70,Ve=s),r(9,je=c)}var e,n;if(64&t.$$.dirty[1]&&r(92,p=!!kt.overlapParent||void 0),64&t.$$.dirty[1]|1536&t.$$.dirty[3]&&r(91,g=kt.overlapParent&&(!O||"match_parent"===O.type)&&"match_parent"===(null==J?void 0:J.type)),64&t.$$.dirty[1]&&r(90,h=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=St.getDerivedFromVars($t.alpha)),nt(),nt=f(m,(t=>r(101,I=t)))),512&t.$$.dirty[2]|256&t.$$.dirty[3]&&(r(71,(n=Pe,Pe=!ae(e=I)||void 0===e||e>1?n:Number(e))),r(72,qt=1===Pe?void 0:Pe)),4&t.$$.dirty[1]&&(r(23,v=St.getDerivedFromVars($t.accessibility)),et(),et=f(v,(t=>r(100,T=t)))),128&t.$$.dirty[1]|128&t.$$.dirty[3]&&(r(6,zt=void 0),T&&!Ct&&T.description&&(r(6,zt={}),r(6,zt["aria-label"]=T.description,zt))),4&t.$$.dirty[1]&&(r(22,y=St.getDerivedFromVars($t.background)),tt(),tt=f(y,(t=>r(5,N=t)))),44&t.$$.dirty[0]&&(r(73,Ht={}),r(3,Gt=!1),N&&(r(3,Gt=N.some((t=>"image"===t.type||"nine_patch_image"===t.type))||Boolean(ue)),!Gt))){const t=Kt(N);r(73,Ht["background-color"]=t.color,Ht),r(73,Ht["background-image"]=t.image,Ht),r(73,Ht["background-size"]=t.size,Ht),r(73,Ht["background-position"]=t.position,Ht),r(73,Ht["background-repeat"]="no-repeat",Ht)}if(4&t.$$.dirty[1]&&(r(74,ze=void 0),De&&$t.transition_in&&St.isRunning("stateChange")&&r(74,ze=!0)),4&t.$$.dirty[1]&&(r(76,Ne=void 0),De&&$t.transition_change&&St.isRunning("stateChange")&&Dt.hasTransitionChange($t.id)&&r(76,Ne=!0)),4&t.$$.dirty[1]&&(r(21,$=St.getDerivedFromVars($t.action)),Y(),Y=f($,(t=>r(98,z=t)))),4&t.$$.dirty[1]&&(r(20,_=St.getDerivedFromVars($t.actions)),Q(),Q=f(_,(t=>r(99,M=t)))),4&t.$$.dirty[1]&&(r(19,b=St.getDerivedFromVars($t.doubletap_actions)),X(),X=f(b,(t=>r(97,F=t)))),4&t.$$.dirty[1]&&(r(18,w=St.getDerivedFromVars($t.longtap_actions)),G(),G=f(w,(t=>r(96,D=t)))),576&t.$$.dirty[1]|120&t.$$.dirty[3]){let t=M||z&&[z]||[],e=F||[],n=D||[];kt.fakeElement?(t=[],e=[],n=[]):(Array.isArray(t)||(t=[],St.logError(Nt(new Error("Actions should be array")))),Array.isArray(e)||(e=[],St.logError(Nt(new Error("DoubleTapActions should be array")))),Array.isArray(n)||(n=[],St.logError(Nt(new Error("LongTapActions should be array"))))),(t.length||e.length||n.length)&&At&&(t=[],e=[],n=[],St.logError(Nt(new Error('Cannot use action on component "'.concat(At,'"'))))),r(10,Be=t),r(11,Re=e),r(12,Le=n)}if(4&t.$$.dirty[1]&&(r(17,x=St.getDerivedFromVars($t.action_animation)),K(),K=f(x,(t=>r(95,S=t)))),16&t.$$.dirty[0]|4&t.$$.dirty[3]&&S&&(r(4,We=ge(S)),r(77,Ue=We.map(qe).filter(Boolean).join(", "))),4&t.$$.dirty[1]&&(r(16,k=St.getDerivedFromVars($t.visibility)),H(),H=f(k,(t=>r(94,P=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}(P,Xe);t!==e&&(!Ge||"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;Fe&&n&&(await lt(),"in"===e&&r(75,Me=!0),Dt.runVisibilityTransition(Object.assign(Object.assign({},$t),{visibility:"visible"}),bt,n,Ft,e).then((()=>{"in"===e&&r(75,Me=!1)})).catch((t=>{throw"in"===e&&r(75,Me=!1),t})))}(e)),Ge||r(82,Ge=!0)}if(16777280&t.$$.dirty[1]|1612771330&t.$$.dirty[2]&&r(15,C=Object.assign(Object.assign(Object.assign({},ye),ke),{"parent-overlap":p,"parent-overlap-absolute":g,"scroll-snap":kt.scrollSnap,"hide-on-transition-in":ze||Me||Ne,visibility:Xe,"has-action-animation":Boolean(Ue),"parent-flex":kt.parentContainerOrientation||void 0})),4&t.$$.dirty[1]&&(r(14,E=St.getDerivedFromVars($t.transform)),q(),q=f(E,(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,Ye=fe(t.value,Ye));const e="pivot-fixed"===t.type?Ot(Ye):"".concat(Ye,"%"),n=j.pivot_y||{type:"pivot-percentage",value:50};r(85,Ze=fe(n.value,Ze));const i="pivot-fixed"===n.type?Ot(Ze):"".concat(Ze,"%");r(86,He="".concat(e," ").concat(i)),r(87,Ke="rotate(".concat(j.rotation,"deg)"))}536870912&t.$$.dirty[1]|321&t.$$.dirty[2]&&r(88,A=we||Ve?"100%":_e||Ee?0:void 0),1854013472&t.$$.dirty[1]|521112796&t.$$.dirty[2]&&r(13,V=Object.assign(Object.assign(Object.assign(Object.assign({},xt),Ht),Xt),{width:Tt,"min-width":It,"max-width":Jt,height:Rt,"min-height":Wt,"max-height":Ut||(null==xt?void 0:xt["max-height"]),"grid-area":h,padding:a,margin:ve,opacity:qt,transition:Ue,"transform-origin":He,transform:Ke,"flex-grow":_e||Ee||void 0,"flex-shrink":be||Ae?1:void 0,"flex-basis":A,"--divkit-animation-opacity-start":Te,"--divkit-animation-opacity-end":Ie,"--divkit-animation-scale-start":Je,"--divkit-animation-scale-end":Oe}))},[wt,Yt,ue,Gt,We,N,zt,Zt,xe,je,Be,Re,Le,V,E,C,k,x,w,b,_,$,y,v,m,d,u,c,s,l,o,i,function(t){Ft=t,De&&$t.transition_in&&Dt.registerChildWithTransitionIn($t,bt,$t.transition_in,t).then((()=>{r(74,ze=!1)})).catch((t=>{throw r(74,ze=!1),t})),De&&$t.transition_out&&Dt.registerChildWithTransitionOut($t,bt,$t.transition_out,t),De&&$t.transition_change&&Dt.registerChildWithTransitionChange($t,bt,$t.transition_change,t).then((()=>{r(76,Ne=!1)})).catch((t=>{throw r(76,Ne=!1),t})),function(t,e){let{visibilityActions:n,rootCtx:r}=e;if(null==n||!n.length)return;const i=n.map((t=>({action:t,visible:!1,count:0,finished:!1}))),o=[...new Set([...n.map((t=>(t.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=0===e.action.log_limit?1/0:e.action.log_limit||1;++e.count>=t&&(e.finished=!0);const n=e.action.url;if(n){const t=Qt(n);t&&!te(t,r.getBuiltinProtocols())&&("div-action"===t?r.execAction(e.action):e.action.log_id&&r.execCustomAction(e.action))}r.logStat("visible",e.action)}),e.action.visibility_duration||800)):n||e.timer&&clearTimeout(e.timer),e.visible=n}))}))}),{threshold:o}).observe(t)}(t,{visibilityActions:kt.fakeElement?[]:St.getJsonWithVars($t.visibility_actions||$t.visibility_action&&[$t.visibility_action]),rootCtx:St});const e=$t.id;e&&Dt.registerChild(e);let n=null;return{destroy(){e&&Dt.unregisterChild(e),n&&n.destroy()}}},$t,_t,bt,xt,kt,Ct,Et,At,Vt,ft,gt,ht,mt,vt,yt,Xt,ee,ne,oe,ce,me,ve,ye,Tt,It,Jt,$e,_e,be,we,ke,Rt,Wt,Ut,Ce,Ee,Ae,Ve,Pe,qt,Ht,ze,Me,Ne,Ue,Te,Ie,Je,Oe,Ge,Xe,Ye,Ze,He,Ke,A,a,h,g,p,j,P,S,D,F,z,M,T,I,J,O,B,R,L,W,U,dt,pt]}const Oe=class extends St{constructor(t){super(),Pt(this,t,Je,Te,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])}},Be={"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 Re(t,e){const n=Number(t);return isNaN(n)||n<=0?e:n}function Le(t){if("light"===t||"medium"===t||"bold"===t||"regular"===t)return"medium"===t?500:"bold"===t?700:"light"===t?300:400}function We(t,e){return Le(t)||e}function Ue(t){let e,n;return{c(){e=F("span"),J(e,"class",n=Be["text-range__top-offset"]),R(e,"margin-top",t[4],!1)},m(t,n){P(t,e,n)},p(t,n){16&n&&R(e,"margin-top",t[4],!1)},d(t){t&&S(e)}}}function qe(t){let e;return{c(){e=M(t[0])},m(t,n){P(t,e,n)},p(t,n){1&n&&B(e,t[0])},d(t){t&&S(e)}}}function He(t){let e,n,r,i=t[4]&&Ue(t);return n=new xe({props:{cls:ne("text-range",Be,t[3]),actions:t[1],style:Jt(t[2]),$$slots:{default:[qe]},$$scope:{ctx:t}}}),{c(){i&&i.c(),e=T(),At(n.$$.fragment)},m(t,o){i&&i.m(t,o),P(t,e,o),Vt(n,t,o),r=!0},p(t,r){let[o]=r;t[4]?i?i.p(t,o):(i=Ue(t),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null);const a={};8&o&&(a.cls=ne("text-range",Be,t[3])),2&o&&(a.actions=t[1]),4&o&&(a.style=Jt(t[2])),524289&o&&(a.$$scope={dirty:o,ctx:t}),n.$set(a)},i(t){r||($t(n.$$.fragment,t),r=!0)},o(t){_t(n.$$.fragment,t),r=!1},d(t){i&&i.d(t),t&&S(e),jt(n,t)}}}function Ke(t,e,n){let r,i,o,a,l;var s,c;let u,{text:d}=e,{rootFontSize:p}=e,{textStyles:f={}}=e,{singleline:g=!1}=e,{actions:h}=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,p=t.rootFontSize),"textStyles"in t&&n(6,f=t.textStyles),"singleline"in t&&n(7,g=t.singleline),"actions"in t&&n(1,h=t.actions)},t.$$.update=()=>{if(64&t.$$.dirty){let t="none";(f.underline||f.strike)&&("single"===f.underline&&"single"===f.strike?t="both":"single"===f.underline?t="underline":"single"===f.strike&&(t="strike")),n(10,m=t)}2112&t.$$.dirty&&n(11,v=Re(f.font_size,v)),2112&t.$$.dirty&&ke(f.line_height)&&n(12,y=Number(f.line_height)/v),64&t.$$.dirty&&ae(f.letter_spacing)&&n(13,$=Ot(f.letter_spacing)),16448&t.$$.dirty&&n(14,u=We(f.font_weight,u)),32832&t.$$.dirty&&n(15,_=Lt(f.text_color,1,_)),64&t.$$.dirty&&n(4,r=f.top_offset?Ot(f.top_offset):""),64&t.$$.dirty&&n(18,i=f.background?Kt([f.background]):null),320&t.$$.dirty&&((null===n(8,s=f.border)||void 0===s?void 0:s.stroke)&&"transparent"!==Lt(f.border.stroke.color)&&ke(f.border.stroke.width)?n(16,b={color:f.border.stroke.color,width:f.border.stroke.width}):n(16,b=null)),576&t.$$.dirty&&n(17,o=Re(null===n(9,c=f.border)||void 0===c?void 0:c.corner_radius,0)),1152&t.$$.dirty&&n(3,a={singleline:g,decoration:m}),522272&t.$$.dirty&&n(2,l={"font-size":Ot(10*v/p),"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(Ot(b.width)," ").concat(b.color):void 0,"border-radius":o?Ot(o):void 0})},[d,h,l,a,r,p,f,g,s,c,m,v,y,$,u,_,b,o,i]}const Ge=class extends St{constructor(t){super(),Pt(this,t,Ke,He,d,{text:0,rootFontSize:5,textStyles:6,singleline:7,actions:1})}};function Xe(t,e){return"left"===t||"center"===t||"right"===t?t:e}function Ye(t,e){return"top"===t||"center"===t||"bottom"===t||"baseline"===t?t:e}function Ze(t,e){return"source_in"===t||"source_atop"===t||"darken"===t||"lighten"===t||"multiply"===t||"screen"===t?t:e}const{Boolean:Qe}=xt;function tn(t,e,n){const r=t.slice();return r[55]=e[n],r[57]=n,r}function en(t){let e,n;return e=new Oe({props:{cls:ne("text",Tt,t[13])+" "+(t[6]?"":"divkit-c016b"),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[cn]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){const r={};8256&n[0]&&(r.cls=ne("text",Tt,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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function nn(t){let e,n;return e=new Ge({props:{text:t[4],rootFontSize:t[5],textStyles:t[27],singleline:t[7]}}),{c(){At(e.$$.fragment)},m(t,r){Vt(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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function rn(t){let e,n,r=t[10],i=[];for(let e=0;e<r.length;e+=1)i[e]=sn(tn(t,r,e));const o=t=>_t(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=T()},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=tn(t,r,a);i[a]?(i[a].p(o,n),$t(i[a],1)):(i[a]=sn(o),i[a].c(),$t(i[a],1),i[a].m(e.parentNode,e))}for(vt(),a=r.length;a<i.length;a+=1)o(a);yt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)$t(i[t]);n=!0}},o(t){i=i.filter(Qe);for(let t=0;t<i.length;t+=1)_t(i[t]);n=!1},d(t){D(i,t),t&&S(e)}}}function on(t){let e,r,i,o,a,l,s,c;return{c(){e=F("span"),r=F("img"),J(r,"class",i=Tt.text__image),u(r.src,o=t[55].image.url)||J(r,"src",o),J(r,"loading","lazy"),J(r,"decoding","async"),J(r,"aria-hidden","true"),J(r,"alt",""),J(r,"style",a=Jt({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})),J(e,"style",l=Jt(t[55].image.wrapperStyle))},m(n,i){P(n,e,i),A(e,r),s||(c=I(r,"error",t[28]),s=!0)},p(t,n){1024&n[0]&&!u(r.src,o=t[55].image.url)&&J(r,"src",o),1536&n[0]&&a!==(a=Jt({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}))&&J(r,"style",a),1024&n[0]&&l!==(l=Jt(t[55].image.wrapperStyle))&&J(e,"style",l)},i:n,o:n,d(t){t&&S(e),s=!1,c()}}}function an(t){let e,n,r=t[55].text&&ln(t);return{c(){r&&r.c(),e=T()},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]&&$t(r,1)):(r=ln(t),r.c(),$t(r,1),r.m(e.parentNode,e)):r&&(vt(),_t(r,1,1,(()=>{r=null})),yt())},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function ln(t){let e,n;return e=new Ge({props:{text:t[55].text,rootFontSize:t[5],textStyles:t[55].textStyles,singleline:t[7],actions:t[55].actions}}),{c(){At(e.$$.fragment)},m(t,r){Vt(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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function sn(t){let e,n,r,i;const o=[an,on],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=T()},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&&(vt(),_t(a[s],1,1,(()=>{a[s]=null})),yt()),~e?(n=a[e],n?n.p(t,i):(n=a[e]=o[e](t),n.c()),$t(n,1),n.m(r.parentNode,r)):n=null)},i(t){i||($t(n),i=!0)},o(t){_t(n),i=!1},d(t){~e&&a[e].d(t),t&&S(r)}}}function cn(t){let e,n,r,i,o,a;const l=[rn,nn],s=[];function c(t,e){return t[10].length?0:1}return n=c(t),r=s[n]=l[n](t),{c(){e=F("span"),r.c(),J(e,"class",i=ne("text__inner",Tt,t[12])),J(e,"style",o=Jt(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):(vt(),_t(s[d],1,1,(()=>{s[d]=null})),yt(),r=s[n],r?r.p(t,u):(r=s[n]=l[n](t),r.c()),$t(r,1),r.m(e,null)),(!a||4096&u[0]&&i!==(i=ne("text__inner",Tt,t[12])))&&J(e,"class",i),(!a||2048&u[0]&&o!==(o=Jt(t[11])))&&J(e,"style",o)},i(t){a||($t(r),a=!0)},o(t){_t(r),a=!1},d(t){t&&S(e),s[n].d()}}}function un(t){let e,n,r=!t[8]&&en(t);return{c(){r&&r.c(),e=T()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[8]?r&&(vt(),_t(r,1,1,(()=>{r=null})),yt()):r?(r.p(t,n),256&n[0]&&$t(r,1)):(r=en(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function dn(t,e,r){let i,o,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k,C,E,A,V,j,P,S,D,F,z,M,N,T,I=n,J=n,O=n,B=n,R=n,L=n,W=n,U=n,q=n,H=n,K=n,G=n,Y=n;t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>Y()));let{json:Q={}}=e,{templateContext:tt}=e,{origJson:et}=e,{layoutParams:nt}=e;const rt=Z(Mt);let it=!1,ot="",at=12,lt=1.25,st=!1,ct="",ut="",dt=!1,pt="left",ft="top",gt="",ht="",mt=!1,vt=[],yt=[];return X((()=>{yt.forEach((t=>{let[e,n]=t;rt.removeSvgFilter(e,n)}))})),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=()=>{var e,n;if(1&t.$$.dirty[0]&&(r(26,i=rt.getDerivedFromVars(Q.text)),Y(),Y=f(i,(t=>r(51,T=t)))),16&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&(r(4,(e=T,n=ot,ot=String(null!=e?e:"")||n)),ot?r(8,it=!1):(r(8,it=!0),rt.logError(Nt(new Error('Missing "text" prop for div "text"'))))),1&t.$$.dirty[0]&&(r(25,o=rt.getDerivedFromVars(Q.ranges)),J(),J=f(o,(t=>r(41,E=t)))),1&t.$$.dirty[0]&&(r(24,a=rt.getDerivedFromVars(Q.images)),I(),I=f(a,(t=>r(40,C=t)))),1&t.$$.dirty[0]&&(r(23,l=rt.getDerivedFromVars({font_size:Q.font_size,letter_spacing:Q.letter_spacing,font_weight:Q.font_weight,text_color:Q.text_color,underline:Q.underline,strike:Q.strike,line_height:Q.line_height})),O(),O=f(l,(t=>r(27,A=t)))),1&t.$$.dirty[0]&&(r(22,s=rt.getDerivedFromVars(Q.font_size)),G(),G=f(s,(t=>r(50,N=t)))),32&t.$$.dirty[0]|524288&t.$$.dirty[1]&&r(5,at=Re(N,at)),1&t.$$.dirty[0]&&(r(21,c=rt.getDerivedFromVars(Q.line_height)),K(),K=f(c,(t=>r(49,M=t)))),32&t.$$.dirty[0]|262144&t.$$.dirty[1]){const t=M;ke(t)?(r(29,lt=Number(t)/at),r(9,st=!0)):r(9,st=!1)}if(1&t.$$.dirty[0]&&(r(20,u=rt.getDerivedFromVars(Q.max_lines)),U(),U=f(u,(t=>r(46,D=t)))),32768&t.$$.dirty[1]&&r(7,d=1===D),536870912&t.$$.dirty[0]|34304&t.$$.dirty[1]){let t="",e="",n=!1;if(D&&D>1){let r=Number(D);t=r*lt+"em",E||C||(e=r,n=!0)}r(30,ct=t),r(31,ut=e),r(32,dt=n)}if(1&t.$$.dirty[0]&&(r(19,p=rt.getDerivedFromVars(Q.text_alignment_horizontal)),H(),H=f(p,(t=>r(48,z=t)))),131076&t.$$.dirty[1]&&r(33,pt=Xe(z,pt)),1&t.$$.dirty[0]&&(r(18,g=rt.getDerivedFromVars(Q.text_alignment_vertical)),q(),q=f(g,(t=>r(47,F=t)))),65544&t.$$.dirty[1]&&r(34,ft=Ye(F,ft)),16&t.$$.dirty[0]|1024&t.$$.dirty[1]&&r(39,h=!E||ot&&1===E.length&&E[0]&&0===E[0].start&&"number"==typeof E[0].end&&E[0].end>=ot.length),1&t.$$.dirty[0]&&(r(17,m=rt.getDerivedFromVars(Q.text_color)),W(),W=f(m,(t=>r(45,S=t)))),17408&t.$$.dirty[1]&&r(38,v=Boolean(S)!==Boolean(E&&E[0]&&E[0].text_color)),50576&t.$$.dirty[1]){let t="";D&&h&&v&&(t=Lt(S||E&&E[0]&&E[0].text_color,1,gt)),r(35,gt=t)}if(1&t.$$.dirty[0]&&(r(16,y=rt.getDerivedFromVars(Q.truncate)),L(),L=f(y,(t=>r(44,P=t)))),8192&t.$$.dirty[1]&&r(37,$="none"===P?"none":""),1&t.$$.dirty[0]&&(r(15,_=rt.getDerivedFromVars(Q.text_gradient)),R(),R=f(_,(t=>r(43,j=t)))),4096&t.$$.dirty[1]){let t="";if(j){const e=Kt([j]);e.image&&(t=e.image)}r(36,ht=t)}1&t.$$.dirty[0]&&(r(14,b=rt.getDerivedFromVars(Q.selectable)),B(),B=f(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;rt.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=Ot(10*(t.image.width&&t.image.width.value||20)/(e.font_size||12)),r=Ot(10*(t.image.height&&t.image.height.value||20)/(e.font_size||12));const o={"font-size":Ot(10*(Number(e.font_size)||12)/at)};let a="";const l=t.image.tint_color,s=Ze(t.image.tint_mode,"source_in");if(l){const e=Lt(t.image.tint_color);a=rt.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)}(ot,E,C),128&t.$$.dirty[0]|78&t.$$.dirty[1]&&r(13,w={singleline:d,multiline:dt,halign:pt,valign:ft,truncate:$}),32&t.$$.dirty[1]&&r(12,x={gradient:Boolean(ht)}),1610612768&t.$$.dirty[0]|49&t.$$.dirty[1]&&r(11,k={"font-size":Ot(at),"line-height":lt,"max-height":ct,"-webkit-line-clamp":ut,color:gt,"background-image":ht})},[Q,tt,et,nt,ot,at,mt,d,it,st,vt,k,x,w,b,_,y,m,g,p,u,c,s,l,a,o,i,A,function(t){t.target&&"classList"in t.target&&t.target.classList.add(Tt.text__image_hidden)},lt,ct,ut,dt,pt,ft,gt,ht,$,v,h,C,E,V,j,P,S,D,F,z,M,N,T]}const pn={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 fn(t,e,n){if(!(t&&t.shape&&t.color&&t.shape.type&&e.includes(t.shape.type)))return n;const r=Lt(t.color);let i,o,a;if("rounded_rectangle"===t.shape.type){var l,s,c,u;i=Number((null===(l=t.shape.item_width)||void 0===l?void 0:l.value)||10),o=Number((null===(s=t.shape.item_height)||void 0===s?void 0:s.value)||10),a=Number(null!==(c=null===(u=t.shape.corner_radius)||void 0===u?void 0:u.value)&&void 0!==c?c:5)}else{if("circle"!==t.shape.type)return n;var d;i=o=a=2*Number((null===(d=t.shape.radius)||void 0===d?void 0:d.value)||10)}if("shape_drawable"===t.type&&"transparent"!==r){var p,f,g;const e={},n=null!==(p=t.stroke)&&void 0!==p&&p.color?Lt(t.stroke.color):"",l=null!==(f=t.stroke)&&void 0!==f&&f.width?Number(null!==(g=t.stroke.width)&&void 0!==g?g:1):"";return e.width=i,e.height=o,e.borderRadius=a,e.background=r,n&&l&&(e.boxShadow="inset 0 0 0 ".concat(Ot(l)," ").concat(n)),e}return n}function gn(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 hn(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(Ot).join(" ")}function mn(t,e,n){const r=t.slice();return r[13]=e[n],r}function vn(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"),p="".concat(t[13].height,"px");return{c(){e=F("div"),n=F("div"),i=N(),J(n,"class",r="divkit-f6e9a"),R(n,"width",a,!1),R(n,"height",l,!1),R(n,"border-radius",s,!1),R(n,"background",t[13].style.background,!1),R(n,"box-shadow",t[13].style.boxShadow,!1),J(e,"class",o="divkit-c770e"),R(e,"left",c,!1),R(e,"top",u,!1),R(e,"width",d,!1),R(e,"height",p,!1)},m(t,r){P(t,e,r),A(e,n),A(e,i)},p(t,r){2&r&&a!==(a="".concat(t[13].style.width,"px"))&&R(n,"width",a,!1),2&r&&l!==(l="".concat(t[13].style.height,"px"))&&R(n,"height",l,!1),2&r&&s!==(s="".concat(t[13].style.borderRadius,"px"))&&R(n,"border-radius",s,!1),2&r&&R(n,"background",t[13].style.background,!1),2&r&&R(n,"box-shadow",t[13].style.boxShadow,!1),2&r&&c!==(c="".concat(t[13].left,"px"))&&R(e,"left",c,!1),2&r&&u!==(u="".concat(t[13].top,"px"))&&R(e,"top",u,!1),2&r&&d!==(d="".concat(t[13].width,"px"))&&R(e,"width",d,!1),2&r&&p!==(p="".concat(t[13].height,"px"))&&R(e,"height",p,!1)},d(t){t&&S(e)}}}function yn(t){let e,r,i,o,a=t[1],l=[];for(let e=0;e<a.length;e+=1)l[e]=vn(mn(t,a,e));return{c(){e=F("div");for(let t=0;t<l.length;t+=1)l[t].c();J(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=I(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=mn(t,a,n);l[n]?l[n].p(i,r):(l[n]=vn(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),D(l,n),t[10](null),i=!1,o()}}}function $n(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 _n(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)&&$n(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)$n(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];$n(t,e.style,o,{top:o.bottom+e.style.height,right:0,bottom:0,left:o.right+e.style.width},i,r)}}function bn(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(It.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&&_n(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&&_n(c,a,u,"horizontal"===i),c.forEach((e=>{e.top-=t.top,e.left-=t.left}))}));let s,c=[],u=!1,d=null,p=null;function f(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 G((()=>{n(6,u=!0)})),X((()=>{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||p)&&(d&&(d.disconnect(),n(7,d=null)),p&&(p.disconnect(),n(8,p=null)),u&&r&&("undefined"!=typeof MutationObserver&&(n(7,d=new MutationObserver(f)),d.observe(r,{childList:!0,attributes:!0,characterData:!0,subtree:!0})),"undefined"!=typeof ResizeObserver&&(n(8,p=new ResizeObserver(l)),p.observe(r)))),576&t.$$.dirty&&u&&r&&l()},[s,c,l,i,o,a,u,d,p,r,function(t){et[t?"unshift":"push"]((()=>{s=t,n(0,s)}))}]}const wn=class extends St{constructor(t){super(),Pt(this,t,bn,yn,d,{orientation:3,separator:4,lineSeparator:5})}};let xn;function kn(){if(void 0!==xn)return xn;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),xn=1===t.scrollHeight,document.body.removeChild(t),xn}const{Boolean:Cn}=xt;function En(t,e,n){const r=t.slice();return r[43]=e[n],r}function An(t){let e,n;return e=new Oe({props:{cls:ne("container",pn,t[10]),style:t[9],json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],additionalPaddings:t[13],$$slots:{default:[Pn]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=ne("container",pn,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]),8192&n[0]&&(r.additionalPaddings=t[13]),1049056&n[0]|32768&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function Vn(t){let e,n;return e=new ro({props:{layoutParams:t[8],div:t[43].json,templateContext:t[43].templateContext,origJson:t[43].origJson}}),{c(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.layoutParams=t[8]),1048576&n[0]&&(r.div=t[43].json),1048576&n[0]&&(r.templateContext=t[43].templateContext),1048576&n[0]&&(r.origJson=t[43].origJson),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function jn(t){let e,n;return e=new wn({props:{separator:t[6],lineSeparator:t[7],orientation:t[5]}}),{c(){At(e.$$.fragment)},m(t,r){Vt(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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function Pn(t){let e,n,r,i=t[20],o=[];for(let e=0;e<i.length;e+=1)o[e]=Vn(En(t,i,e));const a=t=>_t(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=N(),l&&l.c(),n=T()},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(1048832&r[0]){let n;for(i=t[20],n=0;n<i.length;n+=1){const a=En(t,i,n);o[n]?(o[n].p(a,r),$t(o[n],1)):(o[n]=Vn(a),o[n].c(),$t(o[n],1),o[n].m(e.parentNode,e))}for(vt(),n=i.length;n<o.length;n+=1)a(n);yt()}t[6]||t[7]?l?(l.p(t,r),192&r[0]&&$t(l,1)):(l=jn(t),l.c(),$t(l,1),l.m(n.parentNode,n)):l&&(vt(),_t(l,1,1,(()=>{l=null})),yt())},i(t){if(!r){for(let t=0;t<i.length;t+=1)$t(o[t]);$t(l),r=!0}},o(t){o=o.filter(Cn);for(let t=0;t<o.length;t+=1)_t(o[t]);_t(l),r=!1},d(t){D(o,t),t&&S(e),l&&l.d(t),t&&S(n)}}}function Sn(t){let e,n,r=!t[4]&&An(t);return{c(){r&&r.c(),e=T()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[4]?r&&(vt(),_t(r,1,1,(()=>{r=null})),yt()):r?(r.p(t,n),16&n[0]&&$t(r,1)):(r=An(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Dn(t,e,r){let i,o,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k,C,E,A=n,V=n,j=n,P=n,S=n,D=n,F=n,z=n;var M,N,T,I,J,O;t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>D())),t.$$.on_destroy.push((()=>F())),t.$$.on_destroy.push((()=>z()));let{json:B={}}=e,{templateContext:R}=e,{origJson:L}=e,{layoutParams:W}=e;const U={left:"start",center:"center",right:"end"},q={top:"start",center:"center",bottom:"end",baseline:"baseline"},H=["rounded_rectangle","circle"],K=Z(Mt);let G=!1,X="vertical",Y="top",Q="left",tt=null,et=null,nt={};return t.$$set=t=>{"json"in t&&r(0,B=t.json),"templateContext"in t&&r(1,R=t.templateContext),"origJson"in t&&r(2,L=t.origJson),"layoutParams"in t&&r(3,W=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(30,i=B.items),1073741824&t.$$.dirty[0]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(4,G=!1):(r(4,G=!0),K.logError(Nt(new Error('Incorrect or empty "items" prop for div "container"'))))),1073741842&t.$$.dirty[0]&&r(20,o=(!G&&i||[]).map((t=>{let e=t,n=R;return({templateContext:n,json:e}=K.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(19,a=K.getDerivedFromVars(B.orientation)),z(),z=f(a,(t=>r(38,E=t)))),32&t.$$.dirty[0]|128&t.$$.dirty[1]&&r(5,X=function(t,e){return"vertical"===t||"horizontal"===t||"overlap"===t?t:e}(E,X)),1&t.$$.dirty[0]&&(r(18,l=K.getDerivedFromVars(B.content_alignment_vertical)),F(),F=f(l,(t=>r(37,C=t)))),134217728&t.$$.dirty[0]|64&t.$$.dirty[1]&&r(27,Y=Ye(C,Y)),1&t.$$.dirty[0]&&(r(17,s=K.getDerivedFromVars(B.content_alignment_horizontal)),D(),D=f(s,(t=>r(36,k=t)))),268435456&t.$$.dirty[0]|32&t.$$.dirty[1]&&r(28,Q=Xe(k,Q)),1&t.$$.dirty[0]&&(r(16,c=K.getDerivedFromVars(B.layout_mode)),S(),S=f(c,(t=>r(35,x=t)))),16&t.$$.dirty[1]&&r(29,u="wrap"===x),1&t.$$.dirty[0]&&(r(15,d=K.getDerivedFromVars(B.separator)),P(),P=f(d,(t=>r(34,w=t)))),14680160&t.$$.dirty[0]|8&t.$$.dirty[1])if((null==w?void 0:w.style)&&"overlap"!==X&&kn()){const t=fn(w.style,H,(null==tt?void 0:tt.style)||null);r(6,tt=t?{show_at_start:Boolean(null!==r(21,M=w.show_at_start)&&void 0!==M&&M),show_at_end:Boolean(null!==r(22,N=w.show_at_end)&&void 0!==N&&N),show_between:Boolean(null===r(23,T=w.show_between)||void 0===T||T),style:t}:null)}else r(6,tt=null);if(1&t.$$.dirty[0]&&(r(14,p=K.getDerivedFromVars(B.line_separator)),j(),j=f(p,(t=>r(33,b=t)))),117440672&t.$$.dirty[0]|4&t.$$.dirty[1])if((null==b?void 0:b.style)&&"overlap"!==X&&kn()){const t=fn(b.style,H,(null==et?void 0:et.style)||null);r(7,et=t?{show_at_start:Boolean(null!==r(24,I=b.show_at_start)&&void 0!==I&&I),show_at_end:Boolean(null!==r(25,J=b.show_at_end)&&void 0!==J&&J),show_between:Boolean(null===r(26,O=b.show_between)||void 0===O||O),style:t}:null)}else r(7,et=null);if(224&t.$$.dirty[0]&&r(13,g=tt||et?function(t,e,n){const r={};return gn(r,e,"vertical"===t),gn(r,n,"horizontal"===t),r}(X,tt,et):null),1&t.$$.dirty[0]&&(r(12,h=K.getDerivedFromVars(B.width)),A(),A=f(h,(t=>r(31,$=t)))),1&t.$$.dirty[0]&&(r(11,m=K.getDerivedFromVars(B.height)),V(),V=f(m,(t=>r(32,_=t)))),939524392&t.$$.dirty[0]|3&t.$$.dirty[1]){let t={};(null==W?void 0:W.fakeElement)&&(t.fakeElement=!0),"overlap"===X&&(t.overlapParent=!0),"horizontal"!==X&&(t.parentHAlign=U[Q],(!_||"wrap_content"===_.type||"match_parent"===_.type&&(null==W?void 0:W.parentVerticalWrapContent))&&(t.parentVerticalWrapContent=!0)),"vertical"!==X&&(t.parentVAlign=q[Y],("wrap_content"===(null==$?void 0:$.type)||"match_parent"===(null==$?void 0:$.type)&&(null==W?void 0:W.parentHorizontalWrapContent))&&(t.parentHorizontalWrapContent=!0)),"horizontal"===X&&(t.parentContainerOrientation="horizontal"),"vertical"===X&&(t.parentContainerOrientation="vertical"),u&&(t.parentContainerWrap=!0),r(8,nt=de(t,nt))}939524128&t.$$.dirty[0]&&r(10,v={orientation:X,valign:Y,halign:Q,wrap:u}),224&t.$$.dirty[0]&&r(9,y={gap:tt||et?hn(X,tt,et):void 0})},[B,R,L,W,G,X,tt,et,nt,y,v,m,h,g,p,d,c,s,l,a,o,M,N,T,I,J,O,Y,Q,u,i,$,_,b,w,x,k,C,E]}const Fn={separator:"divkit-a30bb",separator_orientation_horizontal:"divkit-f529e",separator_orientation_vertical:"divkit-e9e27",separator__inner:"divkit-db7d8"};function zn(t,e){return"vertical"===t||"horizontal"===t?t:e}function Mn(t){let e,n,r;return{c(){e=F("span"),J(e,"class",n=Fn.separator__inner),J(e,"style",r=Jt(t[5]))},m(t,n){P(t,e,n)},p(t,n){32&n&&r!==(r=Jt(t[5]))&&J(e,"style",r)},d(t){t&&S(e)}}}function Nn(t){let e,n=t[6]&&Mn(t);return{c(){n&&n.c(),e=T()},m(t,r){n&&n.m(t,r),P(t,e,r)},p(t,r){t[6]?n?n.p(t,r):(n=Mn(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&S(e)}}}function Tn(t){let e,n;return e=new Oe({props:{cls:ne("separator",Fn,t[4]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Nn]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){let[r]=n;const i={};16&r&&(i.cls=ne("separator",Fn,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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function In(t,e,r){let i,o,a,l,s,c,u,d=n;t.$$.on_destroy.push((()=>d()));let{json:p={}}=e,{templateContext:g}=e,{origJson:h}=e,{layoutParams:m}=e;const v=Z(Mt);let y="horizontal",$="rgba(0,0,0,0.08)";return t.$$set=t=>{"json"in t&&r(0,p=t.json),"templateContext"in t&&r(1,g=t.templateContext),"origJson"in t&&r(2,h=t.origJson),"layoutParams"in t&&r(3,m=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty&&(r(7,i=v.getDerivedFromVars(p.delimiter_style)),d(),d=f(i,(t=>r(12,u=t)))),4352&t.$$.dirty&&r(8,y=zn(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,$=Lt(null==u?void 0:u.color,1,$)),256&t.$$.dirty&&r(11,a="horizontal"===y?"100%":Ot(1)),256&t.$$.dirty&&r(10,l="horizontal"===y?Ot(1):"100%"),3584&t.$$.dirty&&r(5,s={background:$,width:a,height:l}),256&t.$$.dirty&&r(4,c={orientation:y})},[p,g,h,m,c,s,o,i,y,$,l,a,u]}const Jn={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 On(t){let e,n;return e=new Oe({props:{cls:ne("image",Jn,t[10]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],style:t[9],customDescription:!0,$$slots:{default:[Ln]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){const r={};1024&n[0]&&(r.cls=ne("image",Jn,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]),512&n[0]&&(r.style=t[9]),66928&n[0]|1073741824&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function Bn(t){let e,n,r,i,o,a,s;return{c(){e=F("img"),J(e,"class",n=Jn.image__image),u(e.src,r=t[4]===qn?Un:t[6])||J(e,"src",r),J(e,"loading","lazy"),J(e,"decoding","async"),J(e,"style",i=Jt(t[8])),J(e,"alt",t[16]),J(e,"aria-hidden",o=t[16]?null:"true")},m(n,r){P(n,e,r),a||(s=[I(e,"load",t[26]),I(e,"error",t[27])],a=!0)},p(t,n){80&n[0]&&!u(e.src,r=t[4]===qn?Un:t[6])&&J(e,"src",r),256&n[0]&&i!==(i=Jt(t[8]))&&J(e,"style",i),65536&n[0]&&J(e,"alt",t[16]),65536&n[0]&&o!==(o=t[16]?null:"true")&&J(e,"aria-hidden",o)},d(t){t&&S(e),a=!1,l(s)}}}function Rn(t){let e,n,r,i,o,a,s,c,d,p="".concat(t[5],"%");return{c(){e=F("span"),n=F("img"),J(n,"class",r=Jn.image__image),u(n.src,i=t[4]===qn?Un:t[6])||J(n,"src",i),J(n,"loading","lazy"),J(n,"decoding","async"),J(n,"style",o=Jt(t[8])),J(n,"alt",t[16]),J(n,"aria-hidden",a=t[16]?null:"true"),J(e,"class",s=Jn["image__aspect-wrapper"]),R(e,"padding-bottom",p,!1)},m(r,i){P(r,e,i),A(e,n),c||(d=[I(n,"load",t[26]),I(n,"error",t[27])],c=!0)},p(t,r){80&r[0]&&!u(n.src,i=t[4]===qn?Un:t[6])&&J(n,"src",i),256&r[0]&&o!==(o=Jt(t[8]))&&J(n,"style",o),65536&r[0]&&J(n,"alt",t[16]),65536&r[0]&&a!==(a=t[16]?null:"true")&&J(n,"aria-hidden",a),32&r[0]&&p!==(p="".concat(t[5],"%"))&&R(e,"padding-bottom",p,!1)},d(t){t&&S(e),c=!1,l(d)}}}function Ln(t){let e;function n(t,e){return t[10].aspect?Rn:Bn}let r=n(t),i=r(t);return{c(){i.c(),e=T()},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 Wn(t){let e,n,r=!t[7]&&On(t);return{c(){r&&r.c(),e=T()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[7]?r&&(vt(),_t(r,1,1,(()=>{r=null})),yt()):r?(r.p(t,n),128&n[0]&&$t(r,1)):(r=On(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}const Un="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",qn=2;function Hn(t,e,r){let i,o,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k,C,E,A,V,j,P,S,D,F,z,M,N,T,I,J,O=n,B=n,R=n,L=n,W=n,U=n,q=n,H=n,K=n,G=n,Y=n,Q=n,tt=n,et=n;t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>G())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>Q())),t.$$.on_destroy.push((()=>tt())),t.$$.on_destroy.push((()=>et()));let{json:nt={}}=e,{templateContext:rt}=e,{origJson:it}=e,{layoutParams:ot}=e;const at=Z(Mt);let lt=0,st="rgba(0,0,0,0.08)",ct=!1,ut="",dt="none",pt="50% 50%";let ft,gt="0",ht="source_in",mt="",vt="",yt=0,$t=0,_t=0,bt="",wt="";return X((()=>{at.removeSvgFilter(ft,ht)})),t.$$set=t=>{"json"in t&&r(0,nt=t.json),"templateContext"in t&&r(1,rt=t.templateContext),"origJson"in t&&r(2,it=t.origJson),"layoutParams"in t&&r(3,ot=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(25,i=at.getDerivedFromVars(nt.image_url)),et(),et=f(i,(t=>r(56,J=t)))),1&t.$$.dirty[0]&&(r(24,o=at.getDerivedFromVars(nt.gif_url)),tt(),tt=f(o,(t=>r(55,I=t)))),50331648&t.$$.dirty[1]&&r(6,a=J||I),64&t.$$.dirty[0]&&r(4,lt=0),64&t.$$.dirty[0]&&(a?r(7,ct=!1):(r(7,ct=!0),at.logError(Nt(new Error('Missing "image_url" for "image"'))))),1&t.$$.dirty[0]&&(r(23,l=at.getDerivedFromVars(nt.width)),Q(),Q=f(l,(t=>r(54,T=t)))),8388608&t.$$.dirty[1]&&r(42,s="wrap_content"===(null==T?void 0:T.type)),1&t.$$.dirty[0]&&(r(22,c=at.getDerivedFromVars(nt.height)),Y(),Y=f(c,(t=>r(53,N=t)))),4194304&t.$$.dirty[1]&&r(41,u="wrap_content"===(null==N?void 0:N.type)),1&t.$$.dirty[0]&&(r(21,d=at.getDerivedFromVars(nt.preview)),G(),G=f(d,(t=>r(52,M=t)))),16&t.$$.dirty[0]|2097152&t.$$.dirty[1]){const t=M;0!==lt&<!==qn||!t?r(29,ut=""):t.startsWith("data:")?r(29,ut='url("'.concat(qt(t),'")')):r(29,ut='url("data:image/jpg;base64,'.concat(qt(t),'")'))}if(1&t.$$.dirty[0]&&(r(20,p=at.getDerivedFromVars(nt.placeholder_color)),K(),K=f(p,(t=>r(51,z=t)))),16&t.$$.dirty[0]|1048576&t.$$.dirty[1]&&function(t,e){r(28,st=0===t||t===qn?Lt(e,1,st):"")}(lt,z),1&t.$$.dirty[0]&&(r(19,g=at.getDerivedFromVars(nt.scale)),H(),H=f(g,(t=>r(50,F=t)))),1073741824&t.$$.dirty[0]|524288&t.$$.dirty[1]&&r(30,dt=Yt(F)||dt),1&t.$$.dirty[0]&&(r(18,h=at.getDerivedFromVars({content_alignment_horizontal:nt.content_alignment_horizontal,content_alignment_vertical:nt.content_alignment_vertical})),q(),q=f(h,(t=>r(49,D=t)))),262144&t.$$.dirty[1]&&r(31,pt=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:Zt(t)}(D,pt)),1&t.$$.dirty[0]&&(r(17,m=at.getDerivedFromVars(nt.accessibility)),U(),U=f(m,(t=>r(48,S=t)))),131072&t.$$.dirty[1]&&r(16,v=(null==S?void 0:S.description)||""),1&t.$$.dirty[0]&&(r(15,y=at.getDerivedFromVars(nt.aspect)),W(),W=f(y,(t=>r(47,P=t)))),65536&t.$$.dirty[1]){const t=null==P?void 0:P.ratio;t&&ke(t)?r(5,gt=(100/Number(t)).toFixed(2)):r(5,gt="0")}if(1&t.$$.dirty[0]&&(r(14,$=at.getDerivedFromVars(nt.tint_color)),L(),L=f($,(t=>r(46,j=t)))),1&t.$$.dirty[0]&&(r(13,_=at.getDerivedFromVars(nt.tint_mode)),R(),R=f(_,(t=>r(45,V=t)))),49158&t.$$.dirty[1]){const t=j,e=t?Lt(t):void 0,n=Ze(V,ht);e===ft&&n===ht||(at.removeSvgFilter(ft,ht),r(34,mt=e?at.addSvgFilter(e,n):""),r(32,ft=e),r(33,ht=n))}if(1&t.$$.dirty[0]&&(r(12,b=at.getDerivedFromVars(nt.appearance_animation)),B(),B=f(b,(t=>r(44,A=t)))),8192&t.$$.dirty[1]&&A&&"fade"===A.type){const t=A;r(35,vt=pe(t.interpolator,"ease_in_out").replace(/_/g,"-")),r(38,_t=se(t.duration,300)),r(37,$t=se(t.start_delay,0)),r(36,yt=se(t.alpha,0))}if(1&t.$$.dirty[0]&&(r(11,w=at.getDerivedFromVars(nt.filters)),O(),O=f(w,(t=>r(43,E=t)))),4096&t.$$.dirty[1]){let t="",e="";Array.isArray(E)&&E.length&&(t=Ce(E,at.logError)),t&&(e="polygon(0% 0%, 0% 100%, 100% 100%, 100% 0%)"),r(39,bt=t),r(40,wt=e)}48&t.$$.dirty[0]|3088&t.$$.dirty[1]&&r(10,x={aspect:"0"!==gt,"is-width-content":s,"is-height-content":u,loaded:1===lt,"before-appearance":Boolean(vt)&&0===lt}),1879048192&t.$$.dirty[0]&&r(9,k={"background-image":ut,"background-color":ut?void 0:st,"background-size":dt}),1073741840&t.$$.dirty[0]|1017&t.$$.dirty[1]&&r(8,C={"object-fit":dt,"object-position":pt,filter:[1===lt&&mt?"url(#".concat(mt,")"):"",bt].filter(Boolean).join(" "),"clip-path":wt||void 0,"--divkit-appearance-interpolator":vt||void 0,"--divkit-appearance-fade-start":vt?yt:void 0,"--divkit-appearance-delay":vt?"".concat($t,"ms"):void 0,"--divkit-appearance-duration":vt?"".concat(_t,"ms"):void 0})},[nt,rt,it,ot,lt,gt,a,ct,C,k,x,w,b,_,$,y,v,m,h,g,p,d,c,l,o,i,function(){0===lt&&r(4,lt=1)},function(){0===lt&&r(4,lt=qn)},st,ut,dt,pt,ft,ht,mt,vt,yt,$t,_t,bt,wt,u,s,E,A,V,j,P,S,D,F,z,M,N,T,I,J]}const Kn=class extends St{constructor(t){super(),Pt(this,t,Hn,Wn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},Gn={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 Xn(t){return t>0&&t<1}function Yn(t){return String(Math.ceil(1e3*t)/1e3)}function Zn(t,e,n){if(t.some(Xn)){const e=Math.max(...t.filter(Xn).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(Ot(r*t[e]/i),",").concat(Yn(t[e]),"fr)"):t[e]?o[e]="".concat(Yn(t[e]),"fr"):o[e]="auto";return o.join(" ")}function Qn(t,e,n){const r=t.slice();return r[29]=e[n],r}function tr(t){let e,n;return e=new Oe({props:{cls:ne("grid",Gn,t[8]),json:t[0],origJson:t[2],templateContext:t[1],style:t[7],layoutParams:t[3],$$slots:{default:[nr]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=ne("grid",Gn,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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function er(t){let e,n;return e=new ro({props:{layoutParams:t[29].layoutParams,div:t[29].json,templateContext:t[29].templateContext,origJson:t[29].origJson}}),{c(){At(e.$$.fragment)},m(t,r){Vt(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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function nr(t){let e,n,r=t[5],i=[];for(let e=0;e<r.length;e+=1)i[e]=er(Qn(t,r,e));const o=t=>_t(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=T()},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=Qn(t,r,a);i[a]?(i[a].p(o,n),$t(i[a],1)):(i[a]=er(o),i[a].c(),$t(i[a],1),i[a].m(e.parentNode,e))}for(vt(),a=r.length;a<i.length;a+=1)o(a);yt()}},i(t){if(!n){for(let t=0;t<r.length;t+=1)$t(i[t]);n=!0}},o(t){i=i.filter(Boolean);for(let t=0;t<i.length;t+=1)_t(i[t]);n=!1},d(t){D(i,t),t&&S(e)}}}function rr(t){let e,n,r=!t[6]&&tr(t);return{c(){r&&r.c(),e=T()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[6]?r&&(vt(),_t(r,1,1,(()=>{r=null})),yt()):r?(r.p(t,n),64&n[0]&&$t(r,1)):(r=tr(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function ir(t,e,r){let i,o,a,l,s,c,u,d,p,g,h,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 C=Z(Mt);let E,A,V=!1,j=1,P=[],S=[],D=[],F=[],z=0,M=!1,N="top",T="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),C.logError(Nt(new Error('Incorrect or empty "items" prop for div "grid"'))))),1&t.$$.dirty[0]&&(r(11,o=C.getDerivedFromVars(b.column_count)),_(),_=f(o,(t=>r(27,m=t)))),134225920&t.$$.dirty[0]&&r(13,j=Re(m,j)),8392706&t.$$.dirty[0]&&r(22,a=(!V&&i||[]).map((t=>{let e=t,n=w;return({templateContext:n,json:e}=C.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),4194304&t.$$.dirty[0]){let t=[];a.forEach((e=>{t.push(C.getDerivedFromVars({rowSpan:e.json.row_span,columnSpan:e.json.column_span,width:e.json.width,height:e.json.height}))})),r(4,E=zt(t,(t=>[...t]))),$(),$=f(E,(t=>r(26,h=t)))}if(72081416&t.$$.dirty[0]){const t={};let e=0,n=0;r(14,P=[]),r(15,S=[]),r(16,D=[]),r(17,F=[]),r(19,M=!1),r(5,A=a.map(((i,o)=>{var a,l,s,c;const u=h[o],d=Number(u.columnSpan)||1,p=Number(u.rowSpan)||1,f={x:e,y:n,colSpan:d,rowSpan:p},g="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)/p: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===p&&"fixed"===(null===(c=u.height)||void 0===c?void 0:c.type)&&u.height.value?Number(u.height.value)/p:0;for(let i=e;i<e+d;++i)for(let e=n;e<n+p;++e)t[i+"_"+e]?r(19,M=!0):(t[i+"_"+e]=!0,(!P[i]||P[i]<g)&&r(14,P[i]=g,P),(!S[e]||S[e]<m)&&r(15,S[e]=m,S),(!D[i]||D[i]<v)&&r(16,D[i]=v,D),(!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:f,fakeElement:(null==k?void 0:k.fakeElement)||!1}})}))),0!==e&&r(19,M=!0),M&&C.logError(Nt(new Error('Mismatching "grid" rows/columns'))),r(18,z=n)}1&t.$$.dirty[0]&&(r(10,l=C.getDerivedFromVars(b.content_alignment_vertical)),y(),y=f(l,(t=>r(25,g=t)))),34603008&t.$$.dirty[0]&&r(20,N=Ye(g,N)),1&t.$$.dirty[0]&&(r(9,s=C.getDerivedFromVars(b.content_alignment_horizontal)),v(),v=f(s,(t=>r(24,p=t)))),18874368&t.$$.dirty[0]&&r(21,T=Xe(p,T)),3145728&t.$$.dirty[0]&&r(8,c={valign:N,halign:T}),516096&t.$$.dirty[0]&&r(7,u={"grid-template-columns":Zn(P,D,j),"grid-template-rows":Zn(S,F,z)}),528384&t.$$.dirty[0]&&r(6,d=V||M)},[b,w,x,k,E,A,d,u,c,s,l,o,V,j,P,S,D,F,z,M,N,T,a,i,p,g,h,m]}const or={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 ar(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 lr(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:sr}=xt;function cr(t,e,n){const r=t.slice();return r[72]=e[n],r[73]=e,r[74]=n,r}function ur(t,e,n){const r=t.slice();return r[75]=e[n],r}function dr(t){let e,n;return e=new Oe({props:{cls:ne("gallery",or,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(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){const r={};65536&n[0]&&(r.cls=ne("gallery",or,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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function pr(t){let e,n;return e=new ro({props:{layoutParams:t[8],div:t[75].json,templateContext:t[75].templateContext,origJson:t[75].origJson}}),{c(){At(e.$$.fragment)},m(t,r){Vt(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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function fr(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]=pr(ur(t,l,e));const c=t=>_t(s[t],1,1,(()=>{s[t]=null})),u=()=>t[60](e,a),d=()=>t[60](null,a);return{c(){e=F("div");for(let t=0;t<s.length;t+=1)s[t].c();n=N(),J(e,"class",r=or.gallery__items),J(e,"style",i=Jt(t[17]))},m(t,r){P(t,e,r);for(let t=0;t<s.length;t+=1)s[t].m(e,null);A(e,n),u(),o=!0},p(r,p){if(t=r,67109120&p[0]){let r;for(l=t[72],r=0;r<l.length;r+=1){const i=ur(t,l,r);s[r]?(s[r].p(i,p),$t(s[r],1)):(s[r]=pr(i),s[r].c(),$t(s[r],1),s[r].m(e,n))}for(vt(),r=l.length;r<s.length;r+=1)c(r);yt()}(!o||131072&p[0]&&i!==(i=Jt(t[17])))&&J(e,"style",i),a!==t[74]&&(d(),a=t[74],u())},i(t){if(!o){for(let t=0;t<l.length;t+=1)$t(s[t]);o=!0}},o(t){s=s.filter(sr);for(let t=0;t<s.length;t+=1)_t(s[t]);o=!1},d(t){t&&S(e),D(s,t),d()}}}function gr(t){let e,n,r=t[12]&&t[9]&&hr(t),i=t[13]&&t[9]&&mr(t);return{c(){r&&r.c(),e=N(),i&&i.c(),n=T()},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=hr(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),t[13]&&t[9]?i?i.p(t,o):(i=mr(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 hr(t){let e,r,i,o,a=!t[29]&&function(t){let e,r,i,o;return{c(){e=z("svg"),r=z("path"),J(r,"class",i=or["gallery__arrow-icon-path"]),J(r,"d","m10 16 8.3 8 1.03-1-4-6-.7-1 .7-1 4-6-1.03-1z"),J(e,"class",o=or["gallery__arrow-icon"]),J(e,"xmlns","http://www.w3.org/2000/svg"),J(e,"width","32"),J(e,"height","32"),J(e,"viewBox","0 0 32 32"),J(e,"fill","none")},m(t,n){P(t,e,n),A(e,r)},p:n,d(t){t&&S(e)}}}();return{c(){e=F("div"),a&&a.c(),J(e,"class",r=t[29]||"".concat(or.gallery__arrow," ").concat(or.gallery__arrow_left))},m(n,r){P(n,e,r),a&&a.m(e,null),i||(o=I(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 mr(t){let e,r,i,o,a=!t[30]&&function(t){let e,r,i,o;return{c(){e=z("svg"),r=z("path"),J(r,"class",i=or["gallery__arrow-icon-path"]),J(r,"d","M22 16l-8.3 8-1.03-1 4-6 .7-1-.7-1-4-6 1.03-1 8.3 8z"),J(e,"class",o=or["gallery__arrow-icon"]),J(e,"xmlns","http://www.w3.org/2000/svg"),J(e,"width","32"),J(e,"height","32"),J(e,"viewBox","0 0 32 32"),J(e,"fill","none")},m(t,n){P(t,e,n),A(e,r)},p:n,d(t){t&&S(e)}}}();return{c(){e=F("div"),a&&a.c(),J(e,"class",r=t[30]||"".concat(or.gallery__arrow," ").concat(or.gallery__arrow_right))},m(n,r){P(n,e,r),a&&a.m(e,null),i||(o=I(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,p,f=t[26],g=[];for(let e=0;e<f.length;e+=1)g[e]=fr(cr(t,f,e));const h=t=>_t(g[t],1,1,(()=>{g[t]=null}));let m="horizontal"===t[6]&&gr(t);return{c(){e=F("div"),n=F("div");for(let t=0;t<g.length;t+=1)g[t].c();l=N(),m&&m.c(),c=T(),J(n,"class",r=or["gallery__items-grid"]),J(n,"style",i=Jt(t[18])),J(e,"class",o=or.gallery__scroller+" "+(t[28]?"divkit-aa145":"")),J(e,"style",a=Jt(t[7]))},m(r,i){P(r,e,i),A(e,n);for(let t=0;t<g.length;t+=1)g[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||(p=I(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(f=t[26],e=0;e<f.length;e+=1){const r=cr(t,f,e);g[e]?(g[e].p(r,l),$t(g[e],1)):(g[e]=fr(r),g[e].c(),$t(g[e],1),g[e].m(n,null))}for(vt(),e=f.length;e<g.length;e+=1)h(e);yt()}(!u||262144&l[0]&&i!==(i=Jt(t[18])))&&J(n,"style",i),(!u||268435456&l[0]&&o!==(o=or.gallery__scroller+" "+(t[28]?"divkit-aa145":"")))&&J(e,"class",o),(!u||128&l[0]&&a!==(a=Jt(t[7])))&&J(e,"style",a),"horizontal"===t[6]?m?m.p(t,l):(m=gr(t),m.c(),m.m(c.parentNode,c)):m&&(m.d(1),m=null)},i(t){if(!u){for(let t=0;t<f.length;t+=1)$t(g[t]);u=!0}},o(t){g=g.filter(sr);for(let t=0;t<g.length;t+=1)_t(g[t]);u=!1},d(n){n&&S(e),D(g,n),t[61](null),t[62](null),n&&S(l),m&&m.d(n),n&&S(c),d=!1,p()}}}function yr(t){let e,n,r,i,o=!t[5]&&dr(t);return{c(){o&&o.c(),e=T()},m(a,l){o&&o.m(a,l),P(a,e,l),n=!0,r||(i=I(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&&(vt(),_t(o,1,1,(()=>{o=null})),yt()):o?(o.p(t,r),32&r[0]&&$t(o,1)):(o=dr(t),o.c(),$t(o,1),o.m(e.parentNode,e))},i(t){n||($t(o),n=!0)},o(t){_t(o),n=!1},d(t){o&&o.d(t),t&&S(e),r=!1,i()}}}function $r(t,e,r){let i,o,a,l,s,c,u,d,p,h,m,v,y,$,_,b,w,x,k,C,E,A,V,j,P,S,D,F,z=n,M=n,N=n,T=n,I=n,J=n,O=n,B=n,R=n,L=n;t.$$.on_destroy.push((()=>z())),t.$$.on_destroy.push((()=>M())),t.$$.on_destroy.push((()=>N())),t.$$.on_destroy.push((()=>T())),t.$$.on_destroy.push((()=>I())),t.$$.on_destroy.push((()=>J())),t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>L()));let{json:W={}}=e,{templateContext:U}=e,{origJson:q}=e,{layoutParams:H}=e;const K=Z(Mt);let Y,Q,tt=[],nt=!1,rt=!1,it=null,ot=!1;const at=K.getCustomization("galleryLeftClass"),lt=K.getCustomization("galleryRightClass");let st=!1;const ct=K.isDesktop;g(t,ct,(t=>r(59,D=t)));let ut,dt,pt,ft,gt=1,ht="horizontal",mt="start",vt=8,yt="",$t=[],_t={},bt=!1,wt={},xt=0;function kt(){const t=Y.scrollLeft,e=Y.scrollWidth,n=Y.offsetWidth;r(12,nt=t>2),r(13,rt=t+n<e-2)}const Ct=lr(kt,50);function Et(t){Y.scroll({left:Y.scrollLeft+.75*Y.offsetWidth*("right"===t?1:-1),behavior:"smooth"})}function At(){let t=[],e=tt[0].children.length;for(let n=0;n<e;++n)for(let e=0;e<gt;++e){const r=tt[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"===ht,i=r?"offsetLeft":"offsetTop",o=r?"left":"top";Y.scroll({[o]:Math.max(0,t[e][i]-vt/2),behavior:n})}function jt(t){const e=At(),n=Y.getBoundingClientRect(),r=e.findIndex((t=>function(t,e){return"horizontal"===ht?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"===ht?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||st||(null==H?void 0:H.fakeElement)||K.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"===ht?Y.scrollLeft+Y.offsetWidth===Y.scrollWidth:Y.scrollTop+Y.offsetHeight===Y.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)}}),G((()=>{r(36,ot=!0),!st&&(Ct(),xt)&&Vt(At(),xt,"auto")})),X((()=>{r(36,ot=!1),W.id&&!(null==H?void 0:H.fakeElement)&&K.unregisterInstance(W.id)})),t.$$set=t=>{"json"in t&&r(0,W=t.json),"templateContext"in t&&r(1,U=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,st=!1):(r(5,st=!0),K.logError(Nt(new Error('Incorrect or empty "items" prop for div "gallery"'))))),34&t.$$.dirty[0]|262144&t.$$.dirty[1]&&r(48,o=(!st&&i||[]).map((t=>{let e=t,n=U;return({templateContext:n,json:e}=K.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),32&t.$$.dirty[0]|268435488&t.$$.dirty[1]&&r(9,a=D&&ot&&!st),528&t.$$.dirty[0]|16&t.$$.dirty[1]&&(a?"undefined"!=typeof ResizeObserver&&(r(35,it=new ResizeObserver((()=>{Ct()}))),it.observe(Q)):it&&(it.disconnect(),r(35,it=null))),1&t.$$.dirty[0]&&(r(27,l=K.getDerivedFromVars(W.column_count)),R(),R=f(l,(t=>r(58,S=t)))),134217792&t.$$.dirty[1]&&r(37,gt=Re(S,gt)),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,gt)),1&t.$$.dirty[0]&&(r(25,c=K.getDerivedFromVars(W.orientation)),B(),B=f(c,(t=>r(57,P=t)))),64&t.$$.dirty[0]|67108864&t.$$.dirty[1]&&r(6,ht=zn(P,ht)),1&t.$$.dirty[0]&&(r(24,u=K.getDerivedFromVars(W.cross_content_alignment)),O(),O=f(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=K.getDerivedFromVars(W.item_spacing)),J(),J=f(d,(t=>r(55,V=t)))),16777728&t.$$.dirty[1]&&(r(40,vt=se(V,vt)),r(39,ut=Ot(vt))),1&t.$$.dirty[0]&&(r(22,p=K.getDerivedFromVars(W.cross_spacing)),I(),I=f(p,(t=>r(54,A=t)))),8391168&t.$$.dirty[1]&&(r(42,pt=se(A,vt)),r(41,dt=Ot(pt))),1&t.$$.dirty[0]&&(r(21,h=K.getDerivedFromVars(W.paddings)),T(),T=f(h,(t=>r(53,E=t)))),4198400&t.$$.dirty[1]&&r(43,yt=le(E,yt)),64&t.$$.dirty[0]&&r(47,m="horizontal"===ht?"grid-template-columns":"grid-template-rows"),64&t.$$.dirty[0]|131072&t.$$.dirty[1]){let t=[];o.forEach((e=>{const n="horizontal"===ht?"width":"height";t.push(K.getDerivedFromVars(e.json[n]))})),r(14,ft=zt(t,(t=>t))),N(),N=f(ft,(t=>r(52,C=t)))}if(64&t.$$.dirty[0]|2105408&t.$$.dirty[1]&&(r(44,$t=[]),gt>1?$t.push("auto"):C.forEach((t=>{!t&&"horizontal"===ht||"match_parent"===(null==t?void 0:t.type)?$t.push("100%"):$t.push("max-content")}))),1&t.$$.dirty[0]&&(r(20,v=K.getDerivedFromVars(W.scroll_mode)),M(),M=f(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"===ht?e.parentVAlign=mt:e.parentHAlign=mt,"paging"===k&&(r(45,bt=!0),e.scrollSnap="start",t["horizontal"===ht?"scroll-padding-left":"scroll-padding-top"]=Ot(vt/2)),1===gt&&(e.parentLayoutOrientation=ht),r(7,_t=de(t,_t)),r(8,wt=de(e,wt))}1&t.$$.dirty[0]&&(r(19,y=K.getDerivedFromVars(W.restrict_parent_scroll)),L(),L=f(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]:ar($t)}),64&t.$$.dirty[0]|16384&t.$$.dirty[1]&&r(16,b={orientation:ht,"scroll-snap":bt}),1&t.$$.dirty[0]&&(r(15,w=K.getDerivedFromVars(W.default_item)),z(),z=f(w,(t=>r(50,x=t)))),557056&t.$$.dirty[1]&&r(46,xt=se(x,xt))},[W,U,q,H,Q,st,ht,_t,wt,a,Y,tt,nt,rt,ft,w,b,_,$,y,v,h,p,d,u,c,s,l,F,at,lt,ct,kt,Ct,Et,it,ot,gt,mt,ut,vt,dt,pt,yt,$t,bt,xt,m,o,i,x,k,C,E,A,V,j,P,S,D,function(t,e){et[t?"unshift":"push"]((()=>{tt[e]=t,r(11,tt)}))},function(t){et[t?"unshift":"push"]((()=>{Q=t,r(4,Q)}))},function(t){et[t?"unshift":"push"]((()=>{Y=t,r(10,Y)}))},()=>Et("left"),()=>Et("right")]}const _r={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:br}=xt;function wr(t,e,n){const r=t.slice();return r[79]=e[n],r[81]=n,r}function xr(t,e,n){const r=t.slice();r[79]=e[n],r[81]=n;const i=r[81]===r[6];return r[82]=i,r}function kr(t){let e,n;return e=new Oe({props:{cls:ne("tabs",_r,t[39]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customActions:"tabs",$$slots:{default:[Pr]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(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]),1476394986&n[0]|64&n[1]|4194304&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function Cr(t){let e,n,r=t[79].title+"";return{c(){e=M(r),n=N()},m(t,r){P(t,e,r),P(t,n,r)},p(t,n){65536&n[0]&&r!==(r=t[79].title+"")&&B(e,r)},d(t){t&&S(e),t&&S(n)}}}function Er(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[55](t[81],...n)}return i=new xe({props:{cls:ne("tabs__item",_r,{selected:t[82],actionable:Boolean(t[79].title_click_action)}),actions:!t[79].title_click_action||null!==(e=t[3])&&void 0!==e&&e.fakeElement?[]:[t[79].title_click_action],attrs:{id:"".concat(t[38],"-tab-").concat(t[81]),"aria-controls":"".concat(t[38],"-panel-").concat(t[81]),role:"tab",tabindex:!t[82]||null!==(n=t[3])&&void 0!==n&&n.fakeElement?"-1":t[79].title_click_action?void 0:"0","aria-selected":t[82]?"true":"false"},customAction:null!==(r=t[3])&&void 0!==r&&r.fakeElement?null:a,$$slots:{default:[Cr]},$$scope:{ctx:t}}}),{c(){At(i.$$.fragment)},m(t,e){Vt(i,t,e),o=!0},p(e,n){var r,o,l;t=e;const s={};65600&n[0]&&(s.cls=ne("tabs__item",_r,{selected:t[82],actionable:Boolean(t[79].title_click_action)})),65544&n[0]&&(s.actions=!t[79].title_click_action||null!==(r=t[3])&&void 0!==r&&r.fakeElement?[]:[t[79].title_click_action]),65608&n[0]&&(s.attrs={id:"".concat(t[38],"-tab-").concat(t[81]),"aria-controls":"".concat(t[38],"-panel-").concat(t[81]),role:"tab",tabindex:!t[82]||null!==(o=t[3])&&void 0!==o&&o.fakeElement?"-1":t[79].title_click_action?void 0:"0","aria-selected":t[82]?"true":"false"}),8&n[0]&&(s.customAction=null!==(l=t[3])&&void 0!==l&&l.fakeElement?null:a),65536&n[0]|4194304&n[2]&&(s.$$scope={dirty:n,ctx:t}),i.$set(s)},i(t){o||($t(i.$$.fragment,t),o=!0)},o(t){_t(i.$$.fragment,t),o=!1},d(t){jt(i,t)}}}function Ar(t){let e,n,r;return{c(){e=F("div"),J(e,"class",n=_r.tabs__separator),J(e,"style",r=Jt(t[30]))},m(t,n){P(t,e,n)},p(t,n){1073741824&n[0]&&r!==(r=Jt(t[30]))&&J(e,"style",r)},d(t){t&&S(e)}}}function Vr(t){let e,n;return e=new ro({props:{div:t[79].div,templateContext:t[1],layoutParams:t[5]}}),{c(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){const r={};65536&n[0]&&(r.div=t[79].div),2&n[0]&&(r.templateContext=t[1]),32&n[0]&&(r.layoutParams=t[5]),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function jr(t){let e,n,r,i,o,a,l=t[25][t[81]]&&Vr(t);return{c(){e=F("div"),l&&l.c(),n=N(),J(e,"class",r=ne("tabs__panel",_r,{visible:t[26][t[81]]})),J(e,"role","tabpanel"),J(e,"id",i=t[38]+"-panel-"+t[81]),J(e,"aria-labelledby",o=t[38]+"-tab-"+t[81]),R(e,"left",100*t[81]+"%")},m(t,r){P(t,e,r),l&&l.m(e,null),A(e,n),a=!0},p(t,i){t[25][t[81]]?l?(l.p(t,i),33554432&i[0]&&$t(l,1)):(l=Vr(t),l.c(),$t(l,1),l.m(e,n)):l&&(vt(),_t(l,1,1,(()=>{l=null})),yt()),(!a||67108864&i[0]&&r!==(r=ne("tabs__panel",_r,{visible:t[26][t[81]]})))&&J(e,"class",r)},i(t){a||($t(l),a=!0)},o(t){_t(l),a=!1},d(t){t&&S(e),l&&l.d()}}}function Pr(t){let e,n,r,i,o,a,c,u,d,p,f,g=t[16],h=[];for(let e=0;e<g.length;e+=1)h[e]=Er(xr(t,g,e));const m=t=>_t(h[t],1,1,(()=>{h[t]=null}));let v=t[17]&&Ar(t),y=t[16],$=[];for(let e=0;e<y.length;e+=1)$[e]=jr(wr(t,y,e));const _=t=>_t($[t],1,1,(()=>{$[t]=null}));return{c(){e=F("div");for(let t=0;t<h.length;t+=1)h[t].c();r=N(),v&&v.c(),i=N(),o=F("div"),a=F("div");for(let t=0;t<$.length;t+=1)$[t].c();J(e,"class",n=_r.tabs__list+" "+(t[37]?"divkit-aa145":"")),J(e,"role","tablist"),R(e,"--divkit-tabs-font-size",Ot(t[7]),!1),R(e,"--divkit-tabs-paddings",t[8],!1),R(e,"--divkit-tabs-line-height",t[21],!1),R(e,"--divkit-tabs-letter-spacing",t[22],!1),R(e,"--divkit-tabs-active-font-weight",t[10]||"",!1),R(e,"--divkit-tabs-inactive-font-weight",t[11]||"",!1),R(e,"--divkit-tabs-active-text-color",t[12],!1),R(e,"--divkit-tabs-inactive-text-color",t[13],!1),R(e,"--divkit-tabs-active-background-color",t[14],!1),R(e,"--divkit-tabs-inactive-background-color",t[15],!1),R(e,"--divkit-tabs-border-radius",t[9],!1),J(a,"class",c=ne("tabs__swiper",_r,{inited:t[23],animated:t[24]})),J(o,"class",u=_r.tabs__panels+" "+(t[37]?"divkit-aa145":""))},m(n,l){P(n,e,l);for(let t=0;t<h.length;t+=1)h[t].m(e,null);t[56](e),P(n,r,l),v&&v.m(n,l),P(n,i,l),P(n,o,l),A(o,a);for(let t=0;t<$.length;t+=1)$[t].m(a,null);t[57](a),t[58](o),d=!0,p||(f=[I(e,"keydown",t[41]),I(a,"touchstart",(function(){s(t[28]?t[42]:void 0)&&(t[28]?t[42]:void 0).apply(this,arguments)})),I(a,"touchmove",(function(){s(t[28]?t[43]:void 0)&&(t[28]?t[43]:void 0).apply(this,arguments)})),I(a,"touchend",(function(){s(t[28]?t[44]:void 0)&&(t[28]?t[44]:void 0).apply(this,arguments)})),I(a,"touchcancel",(function(){s(t[28]?t[44]:void 0)&&(t[28]?t[44]:void 0).apply(this,arguments)}))],p=!0)},p(r,l){if(t=r,65608&l[0]|640&l[1]){let n;for(g=t[16],n=0;n<g.length;n+=1){const r=xr(t,g,n);h[n]?(h[n].p(r,l),$t(h[n],1)):(h[n]=Er(r),h[n].c(),$t(h[n],1),h[n].m(e,null))}for(vt(),n=g.length;n<h.length;n+=1)m(n);yt()}if((!d||64&l[1]&&n!==(n=_r.tabs__list+" "+(t[37]?"divkit-aa145":"")))&&J(e,"class",n),128&l[0]&&R(e,"--divkit-tabs-font-size",Ot(t[7]),!1),256&l[0]&&R(e,"--divkit-tabs-paddings",t[8],!1),2097152&l[0]&&R(e,"--divkit-tabs-line-height",t[21],!1),4194304&l[0]&&R(e,"--divkit-tabs-letter-spacing",t[22],!1),1024&l[0]&&R(e,"--divkit-tabs-active-font-weight",t[10]||"",!1),2048&l[0]&&R(e,"--divkit-tabs-inactive-font-weight",t[11]||"",!1),4096&l[0]&&R(e,"--divkit-tabs-active-text-color",t[12],!1),8192&l[0]&&R(e,"--divkit-tabs-inactive-text-color",t[13],!1),16384&l[0]&&R(e,"--divkit-tabs-active-background-color",t[14],!1),32768&l[0]&&R(e,"--divkit-tabs-inactive-background-color",t[15],!1),512&l[0]&&R(e,"--divkit-tabs-border-radius",t[9],!1),t[17]?v?v.p(t,l):(v=Ar(t),v.c(),v.m(i.parentNode,i)):v&&(v.d(1),v=null),100728866&l[0]|128&l[1]){let e;for(y=t[16],e=0;e<y.length;e+=1){const n=wr(t,y,e);$[e]?($[e].p(n,l),$t($[e],1)):($[e]=jr(n),$[e].c(),$t($[e],1),$[e].m(a,null))}for(vt(),e=y.length;e<$.length;e+=1)_(e);yt()}(!d||25165824&l[0]&&c!==(c=ne("tabs__swiper",_r,{inited:t[23],animated:t[24]})))&&J(a,"class",c),(!d||64&l[1]&&u!==(u=_r.tabs__panels+" "+(t[37]?"divkit-aa145":"")))&&J(o,"class",u)},i(t){if(!d){for(let t=0;t<g.length;t+=1)$t(h[t]);for(let t=0;t<y.length;t+=1)$t($[t]);d=!0}},o(t){h=h.filter(br);for(let t=0;t<h.length;t+=1)_t(h[t]);$=$.filter(br);for(let t=0;t<$.length;t+=1)_t($[t]);d=!1},d(n){n&&S(e),D(h,n),t[56](null),n&&S(r),v&&v.d(n),n&&S(i),n&&S(o),D($,n),t[57](null),t[58](null),p=!1,l(f)}}}function Sr(t){let e,n,r=!t[4]&&kr(t);return{c(){r&&r.c(),e=T()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[4]?r&&(vt(),_t(r,1,1,(()=>{r=null})),yt()):r?(r.p(t,n),16&n[0]&&$t(r,1)):(r=kr(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Dr(t,e,r){let i,o,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b,w,x,k,C=n,E=n,A=n,V=n,j=n,P=n,S=n,D=n;var F;t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>A())),t.$$.on_destroy.push((()=>V())),t.$$.on_destroy.push((()=>j())),t.$$.on_destroy.push((()=>P())),t.$$.on_destroy.push((()=>S())),t.$$.on_destroy.push((()=>D()));let{json:z={}}=e,{templateContext:M}=e,{origJson:N}=e,{layoutParams:T}=e;const I=Z(Mt),J=I.genId("tabs");let O,B,R,L=!1,W={};const U=I.getJsonWithVars(z.selected_tab);let q,H,K=U&&Number(U)||0,G=12,Y="",Q="",tt="",nt="",rt="",it="",ot="",at="",st="",ct="",ut=!1,dt=!1,pt=K,ft=[],gt=[];async function ht(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(pt=K,r(6,K=t),xt(),yt(),e){await lt();const t=O.querySelector(".".concat(_r.tabs__item_selected));t&&t.focus()}}function mt(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=K+t;r>=n?r=0:r<0&&(r=n-1),ht(r,e)}function vt(t,e){return K===e||(ht(e),!1)}function yt(){r(24,dt=!0),$t(100*-K),_t(),async function(){await lt();const t=document.getElementById("".concat(J,"-panel-").concat(K));t&&r(19,B.style.height=Ot(t.offsetHeight),B)}(),wt(),Et=-K*B.clientWidth}async function $t(t){await lt(),r(20,R.style.transform="translate3d(".concat(t,"%,0,0)"),R)}function _t(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=t?Math.max(0,K-1):Math.min(K,pt),n=t?Math.min(i.length-1,K+1):Math.max(K,pt);r(25,ft=ft.map(((t,r)=>t||r>=e&&r<=n))),r(26,gt=gt.map(((t,r)=>r>=e&&r<=n)))}let bt=null;function wt(){bt&&clearTimeout(bt),bt=window.setTimeout((()=>{r(26,gt=i.map(((t,e)=>e===K)))}),400)}function xt(){ut||(r(23,ut=!0),r(19,B.style.height=Ot(B.clientHeight),B),r(20,R.style.transform="translate3d(".concat(100*-pt,"%,0,0)"),R))}let kt,Ct,Et,At=null,Vt=null,jt=!1,Pt=!1;return!z.id||L||(null==T?void 0:T.fakeElement)||I.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');ht(t)},setPreviousItem(t){let e=K-1;e<0&&(e="ring"===t?i.length-1:K),ht(e)},setNextItem(t){let e=K+1;e>i.length-1&&(e="ring"===t?0:K),ht(e)}}),X((()=>{z.id&&!(null==T?void 0:T.fakeElement)&&I.unregisterInstance(z.id)})),t.$$set=t=>{"json"in t&&r(0,z=t.json),"templateContext"in t&&r(1,M=t.templateContext),"origJson"in t&&r(2,N=t.origJson),"layoutParams"in t&&r(3,T=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&r(16,i=z.items||[]),65536&t.$$.dirty[0]&&((null==i?void 0:i.length)&&Array.isArray(i)?r(4,L=!1):(r(4,L=!0),I.logError(Nt(new Error('Incorrect or empty "items" prop for div "tabs"'))))),1&t.$$.dirty[0]&&(r(36,o=I.getDerivedFromVars(z.width)),S(),S=f(o,(t=>r(54,x=t)))),1&t.$$.dirty[0]&&(r(35,a=I.getDerivedFromVars(z.height)),P(),P=f(a,(t=>r(53,w=t)))),40&t.$$.dirty[0]|12582912&t.$$.dirty[1]){let t={};(null==T?void 0:T.fakeElement)&&(t.fakeElement=!0),"wrap_content"===(null==x?void 0:x.type)&&(t.parentHorizontalWrapContent=!0),w&&"wrap_content"!==w.type||(t.parentVerticalWrapContent=!0),r(5,W=de(t,W))}if(65617&t.$$.dirty[0]&&!L&&(K<0||K>=i.length)&&(I.logError(Nt(new Error('Incorrect "selected_tab" prop for div "tabs"'),{additional:{selected:z.selected_tab,length:i.length}})),r(6,K=K<0?0:i.length-1)),1&t.$$.dirty[0]&&(r(34,l=I.getDerivedFromVars(z.tab_title_style)),j(),j=f(l,(t=>r(52,b=t)))),2097152&t.$$.dirty[1]&&r(48,s=b||{}),128&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(7,G=Re(s.font_size,G)),384&t.$$.dirty[0]|131072&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)/G*10,right:(Number(t.right)||0)/G*10,bottom:(Number(t.bottom)||0)/G*10,left:(Number(t.left)||0)/G*10};r(8,Y=le(e,Y))}if(128&t.$$.dirty[0]|131072&t.$$.dirty[1]){const t=s.line_height;void 0!==t&&ke(t)&&r(21,Q=Ot(t/G*10))}if(128&t.$$.dirty[0]|131072&t.$$.dirty[1]){const t=s.letter_spacing;void 0!==t&&ae(t)&&r(22,tt=Ot(t/G*10))}if(640&t.$$.dirty[0]|147456&t.$$.dirty[1]&&(s.corner_radius||s.corners_radius||s.font_size)){const t=null!==r(45,F=s.corner_radius)&&void 0!==F?F: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]&&!ae(i[t]))return r;return he(t,e,n)}(s.corners_radius,t,G,nt)):ae(t)&&r(9,nt=Ot(t/G*10))}1024&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(10,q=We(s.active_font_weight||s.font_weight,q)),2048&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(11,H=We(s.inactive_font_weight||s.font_weight,H)),4096&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(12,rt=Lt(s.active_text_color,1,rt)),8192&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(13,it=Lt(s.inactive_text_color,1,it)),16384&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(14,ot=Lt(s.active_background_color,1,ot)),32768&t.$$.dirty[0]|131072&t.$$.dirty[1]&&r(15,at=Lt(s.inactive_background_color,1,at)),1&t.$$.dirty[0]&&(r(33,c=I.getDerivedFromVars(z.has_separator)),V(),V=f(c,(t=>r(17,_=t)))),1&t.$$.dirty[0]&&(r(32,u=I.getDerivedFromVars(z.separator_color)),A(),A=f(u,(t=>r(51,$=t)))),1&t.$$.dirty[0]&&(r(31,d=I.getDerivedFromVars(z.separator_paddings)),E(),E=f(d,(t=>r(50,y=t)))),131072&t.$$.dirty[0]|1671168&t.$$.dirty[1]&&_&&($&&r(46,st=Lt($,1,st)),y&&r(47,ct=le(y,ct))),98304&t.$$.dirty[1]&&r(30,p={background:st,margin:ct}),1&t.$$.dirty[0]&&(r(29,g=I.getDerivedFromVars(z.switch_tabs_by_content_swipe_enabled)),C(),C=f(g,(t=>r(49,v=t)))),262144&t.$$.dirty[1]&&r(28,h=void 0===v||Boolean(v)),1&t.$$.dirty[0]&&(r(27,m=I.getDerivedFromVars(z.restrict_parent_scroll)),D(),D=f(m,(t=>r(37,k=t)))),65536&t.$$.dirty[0]&&(L||(r(25,ft=i.map(((t,e)=>e===K))),r(26,gt=i.map(((t,e)=>e===K)))))},[z,M,N,T,L,W,K,G,Y,nt,q,H,rt,it,ot,at,i,_,O,B,R,Q,tt,ut,dt,ft,gt,m,h,g,p,d,u,c,l,a,o,k,J,{},vt,function(t){if(!(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)&&i){if(37===t.which)mt(-1,!0);else if(39===t.which)mt(1,!0);else if(36===t.which)ht(0,!0);else{if(35!==t.which)return;ht(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!==B||(jt=!1,Pt=!1,At=ye(t),Vt=null,kt=Date.now(),Ct=Et||-K*B.clientWidth,r(24,dt=!1),bt&&clearTimeout(bt))},function(t){const e=ye(t);if(!At||Vt&&Vt.x===e.x&&Vt.y===e.y)return;Vt=e;const n=B.clientWidth;if(jt){Et=e.x-At.x+Ct;const t=n*i.length;if(Et>0)Et=Et*n/(Et+3*n);else if(-Et+n>t){let e=-Et+n-t;e=e*n/(e+3*n),Et=n-t-e}$t(100*Et/n)}else Math.abs(e.y-At.y)>10?Pt=!0:!Pt&&Math.abs(e.x-At.x)>8&&(xt(),jt=!0,At=e,$t(100*-K),_t(!0));jt&&t.cancelable&&t.preventDefault()},function(){Pt=!1,At=null;let t=K;if(!jt)return;jt=!1;const e=Math.min(512,B.clientWidth);Math.abs(Ct-Et)>e/4*Math.min(1,(Date.now()-kt)/750)&&(t+=Ct>Et?1:-1),t>=i.length?t=i.length-1:t<0&&(t=0),t===K?(Et=-t*e,$t(100*-t),wt()):ht(t)},F,st,ct,s,v,y,$,b,w,x,(t,e)=>vt(0,t),function(t){et[t?"unshift":"push"]((()=>{O=t,r(18,O)}))},function(t){et[t?"unshift":"push"]((()=>{R=t,r(20,R)}))},function(t){et[t?"unshift":"push"]((()=>{B=t,r(19,B)}))}]}function Fr(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function zr(t){return t*t*t}function Mr(t){const e=t-1;return e*e*e+1}function Nr(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 Tr=Nr([.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]),Ir=Nr([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]),Jr={linear:r,ease:Tr,ease_in:zr,ease_out:Mr,ease_in_out:Fr,spring:Ir};function Or(t){return Math.max(...t.map((t=>(Number(t.duration)||200)+(Number(t.start_delay)||0))))}function Br(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=(Jr[t.interpolator||"ease_in_out"]||Fr)(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 p,f;const e=1-u+u*(t.scale||0),n=null!==(p=t.pivot_x)&&void 0!==p?p:.5,i=null!==(f=t.pivot_y)&&void 0!==f?f:.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(" "),p=l.filter((t=>t.active)).map((t=>t.scale)).filter((t=>void 0!==t)),f=[u,p.length?p[p.length-1]:d].filter(Boolean).join(" ");return"transform:".concat(f||"none",";opacity:").concat(c)}}}function Rr(t,e,n){return t*(1-n)+e*n}const Lr={linear:r,ease:Tr,ease_in:zr,ease_out:Mr,ease_in_out:Fr,spring:Ir};function Wr(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 Lr?Lr[l.interpolator]:Fr,css:t=>["top:".concat(Rr(o.top,a.top,t)-i.top,"px"),"left:".concat(Rr(o.left,a.left,t)-i.left,"px"),"width:".concat(Rr(o.width,a.width,t),"px"),"height:".concat(Rr(o.height,a.height,t),"px")].join(";")}}function Ur(t){const e=[];return"set"===t.type?(t.items||[]).forEach((t=>{e.push(...Ur(t))})):e.push(t),e}const{Map:qr}=xt;function Hr(t,e,n){const r=t.slice();return r[27]=e[n],r}function Kr(t){let e,n;return e=new Oe({props:{cls:"divkit-b8efc",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[ti]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function Gr(t){let e,r,i=t[7],o=Xr(t);return{c(){o.c(),e=T()},m(t,n){o.m(t,n),P(t,e,n),r=!0},p(t,r){128&r&&d(i,i=t[7])?(vt(),_t(o,1,1,n),yt(),o=Xr(t),o.c(),$t(o,1),o.m(e.parentNode,e)):o.p(t,r)},i(t){r||($t(o),r=!0)},o(t){_t(o),r=!1},d(t){t&&S(e),o.d(t)}}}function Xr(t){let e,n;return e=new ro({props:{div:t[7].div,templateContext:t[1]}}),{c(){At(e.$$.fragment)},m(t,r){Vt(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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function Yr(t){let e,n,r,i,o,a,l,s,c,u;function d(){return t[11](t[27])}return r=new ro({props:{div:t[27].json,templateContext:t[27].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=F("div"),n=F("div"),At(r.$$.fragment),o=N(),J(n,"class",i="divkit-e08c6"),J(e,"class",a="divkit-eb860")},m(t,i){P(t,e,i),A(e,n),Vt(r,n,null),A(e,o),s=!0,c||(u=I(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||($t(r.$$.fragment,n),l||st((()=>{l=wt(e,Wr,t[27]),l.start()})),s=!0)},o(t){_t(r.$$.fragment,t),s=!1},d(t){t&&S(e),jt(r),c=!1,u()}}}function Zr(t){let e,n,r,i,o,a,l,s,c,u;function d(){return t[10](t[27])}return r=new ro({props:{div:t[27].json,templateContext:t[27].templateContext,layoutParams:{fakeElement:!0}}}),{c(){e=F("div"),n=F("div"),At(r.$$.fragment),o=N(),J(n,"class",i="divkit-e08c6"),J(e,"class",a="divkit-eb860"),R(e,"left",t[27].offsetLeft+"px"),R(e,"top",t[27].offsetTop+"px"),R(e,"width",t[27].width+"px"),R(e,"height",t[27].height+"px")},m(t,i){P(t,e,i),A(e,n),Vt(r,n,null),A(e,o),s=!0,c||(u=I(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)&&R(e,"left",t[27].offsetLeft+"px"),(!s||64&i)&&R(e,"top",t[27].offsetTop+"px"),(!s||64&i)&&R(e,"width",t[27].width+"px"),(!s||64&i)&&R(e,"height",t[27].height+"px")},i(n){s||($t(r.$$.fragment,n),l||st((()=>{l=wt(e,Br,t[27]),l.start()})),s=!0)},o(t){_t(r.$$.fragment,t),s=!1},d(t){t&&S(e),jt(r),c=!1,u()}}}function Qr(t,e){let n,r,i,o,a;const l=[Zr,Yr],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=T(),i.c(),o=T(),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):(vt(),_t(s[a],1,1,(()=>{s[a]=null})),yt(),i=s[r],i?i.p(e,n):(i=s[r]=l[r](e),i.c()),$t(i,1),i.m(o.parentNode,o))},i(t){a||($t(i),a=!0)},o(t){_t(i),a=!1},d(t){t&&S(n),s[r].d(t),t&&S(o)}}}function ti(t){var e;let n,r,i,o,a=[],l=new qr,s=(null===(e=t[7])||void 0===e?void 0:e.div)&&Gr(t),c=t[6];const u=t=>t[27];for(let e=0;e<c.length;e+=1){let n=Hr(t,c,e),r=u(n);l.set(r,a[e]=Qr(r,n))}return{c(){s&&s.c(),n=N(),r=F("div");for(let t=0;t<a.length;t+=1)a[t].c();J(r,"class",i="divkit-adaae"),J(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&&$t(s,1)):(s=Gr(t),s.c(),$t(s,1),s.m(n.parentNode,n)):s&&(vt(),_t(s,1,1,(()=>{s=null})),yt()),320&e&&(c=t[6],vt(),a=function(t,e,n,r,i,o,a,l,s,c,u,d){let p=t.length,f=o.length,g=p;const h={};for(;g--;)h[t[g].key]=g;const m=[],v=new Map,y=new Map;for(g=f;g--;){const t=d(i,o,g),r=n(t);let l=a.get(r);l?l.p(t,e):(l=c(r,t),l.c()),v.set(r,m[g]=l),r in h&&y.set(r,Math.abs(g-h[r]))}const $=new Set,_=new Set;function b(t){$t(t,1),t.m(l,u),a.set(t.key,t),u=t.first,f--}for(;p&&f;){const e=m[f-1],n=t[p-1],r=e.key,i=n.key;e===n?(u=e.first,p--,f--):v.has(i)?!a.has(r)||$.has(r)?b(e):_.has(i)?p--:y.get(r)>y.get(i)?(_.add(r),b(e)):($.add(i),p--):(s(n,a),p--)}for(;p--;){const e=t[p];v.has(e.key)||s(e,a)}for(;f;)b(m[f-1]);return m}(a,e,u,0,t,c,l,r,kt,Qr,null,Hr),yt())},i(t){if(!o){$t(s);for(let t=0;t<c.length;t+=1)$t(a[t]);o=!0}},o(t){_t(s);for(let t=0;t<a.length;t+=1)_t(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 ei(t){let e,n,r=!t[5]&&Kr(t);return{c(){r&&r.c(),e=T()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){let[i]=n;t[5]?r&&(vt(),_t(r,1,1,(()=>{r=null})),yt()):r?(r.p(t,i),32&i&&$t(r,1)):(r=Kr(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function ni(t){return"change_bounds"===t.type?t:"set"===t.type?ni(t.items[0]):null}function ri(t,e,n){let r,{json:i={}}=e,{templateContext:o}=e,{origJson:a}=e,{layoutParams:l}=e;const s=Z(Mt),c=Z(re);let u,d=new Map,p=new Set,f=!1,g=null,h=[],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=Ur(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(p);h.forEach((t=>{t.resolvePromise&&t.resolvePromise()})),n(6,h=[]);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(Nt(new Error("Cannot find state with id"),{additional:{stateId:t}})),await lt(),!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||p.has(t.json.id))||(null===(e=t.resolvePromise)||void 0===e||e.call(t),!1)}));const c=i.concat(l),f=c.reduce(((t,e)=>Math.max(t,Or(e.transitions))),0),g=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:ni(t.transitions),resolvePromise:t.resolvePromise})));n(6,h=[...c.map((t=>Object.assign(Object.assign({},t),{maxDuration:f}))),...g]),d.clear(),s.setRunning("stateChange",!1)},getChild(t){if(g&&g.has(t))return g.get(t);s.logError(Nt(new Error("Missing state block with id"),{additional:{id:t}}))}}),Y(re,{registerInstance(t,e){g||(g=new Map),g.has(t)?s.logError(Nt(new Error("Duplicate state with id"),{additional:{id:t}})):g.set(t,e)},unregisterInstance(t){null==g||g.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=Or(a.transitions),s=Object.assign(Object.assign({},a),{maxDuration:l});return n(6,h=[...h.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){p.add(t)},unregisterChild(t){p.delete(t)}})):(f=!0,s.logError(Nt(new Error('Missing "id" prop for div "state"'))));let w=null;const x=s.getJsonWithVars(i.default_state_id);let k=!1;function C(t){n(6,h=h.filter((e=>e!==t))),t.resolvePromise&&t.resolvePromise()}return X((()=>{_&&!(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&&(p=new Set),1&t.$$.dirty&&n(9,r=i.states||[]),512&t.$$.dirty&&((null==r?void 0:r.length)?n(5,f=!1):(n(5,f=!0),s.logError(Nt(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(Nt(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,f,h,w,C,r,t=>C(t),t=>C(t),function(t){et[t?"unshift":"push"]((()=>{u=t,n(4,u)}))}]}const ii={pager:"divkit-c5feb",pager__items:"divkit-f6987",pager__item:"divkit-feca7",pager_orientation_horizontal:"divkit-b0a1c",pager_orientation_vertical:"divkit-f772f"},{Boolean:oi}=xt;function ai(t,e,n){const r=t.slice();return r[47]=e[n],r}function li(t){let e,n;return e=new Oe({props:{cls:ne("pager",ii,t[8]),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],customPaddings:!0,$$slots:{default:[ci]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){const r={};256&n[0]&&(r.cls=ne("pager",ii,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]|524288&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function si(t){var e;let n,r,i,o,a;return r=new ro({props:{div:t[47].json,templateContext:t[47].templateContext,origJson:t[47].origJson,layoutParams:null!==(e=t[3])&&void 0!==e&&e.fakeElement?{fakeElement:!0}:void 0}}),{c(){n=F("div"),At(r.$$.fragment),i=N(),J(n,"class",o=ii.pager__item)},m(t,e){P(t,n,e),Vt(r,n,null),A(n,i),a=!0},p(t,e){var n;const i={};16&e[0]&&(i.div=t[47].json),16&e[0]&&(i.templateContext=t[47].templateContext),16&e[0]&&(i.origJson=t[47].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||($t(r.$$.fragment,t),a=!0)},o(t){_t(r.$$.fragment,t),a=!1},d(t){t&&S(n),jt(r)}}}function ci(t){let e,n,r,i,o,a,l=t[4],s=[];for(let e=0;e<l.length;e+=1)s[e]=si(ai(t,l,e));const c=t=>_t(s[t],1,1,(()=>{s[t]=null}));return{c(){e=F("div");for(let t=0;t<s.length;t+=1)s[t].c();J(e,"class",n=ii.pager__items+" "+(t[15]?"divkit-aa145":"")),J(e,"style",r=Jt(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=I(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=ai(t,l,n);s[n]?(s[n].p(r,o),$t(s[n],1)):(s[n]=si(r),s[n].c(),$t(s[n],1),s[n].m(e,null))}for(vt(),n=l.length;n<s.length;n+=1)c(n);yt()}(!i||32768&o[0]&&n!==(n=ii.pager__items+" "+(t[15]?"divkit-aa145":"")))&&J(e,"class",n),(!i||512&o[0]&&r!==(r=Jt(t[9])))&&J(e,"style",r)},i(t){if(!i){for(let t=0;t<l.length;t+=1)$t(s[t]);i=!0}},o(t){s=s.filter(oi);for(let t=0;t<s.length;t+=1)_t(s[t]);i=!1},d(n){n&&S(e),D(s,n),t[36](null),o=!1,a()}}}function ui(t){let e,n,r=!t[7]&&li(t);return{c(){r&&r.c(),e=T()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[7]?r&&(vt(),_t(r,1,1,(()=>{r=null})),yt()):r?(r.p(t,n),128&n[0]&&$t(r,1)):(r=li(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function di(t,e,r){let i,o,a,l,s,c,u,d,p,g,h,m,v,y,$,_,b,w=n,x=n,k=n,C=n,E=n,A=n;var V,j,P,S,D,F,z;t.$$.on_destroy.push((()=>w())),t.$$.on_destroy.push((()=>x())),t.$$.on_destroy.push((()=>k())),t.$$.on_destroy.push((()=>C())),t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>A()));let{json:M={}}=e,{templateContext:N}=e,{origJson:T}=e,{layoutParams:I}=e;const J=Z(Mt),O=J.genId("pager");let B,R=!1,L=0,W=0,U=!1,q="horizontal",H="",K="",Y="";const Q=lr((function(){const t=function(){const t=Array.from(B.children),e=B.getBoundingClientRect(),n=t.findIndex((t=>{return n=e,r=t.getBoundingClientRect(),"horizontal"===q?r.left>=n.left&&r.right<=n.right:r.top>=n.top&&r.bottom<=n.bottom;var n,r}));return-1!==n?n:L}();t!==L&&r(25,L=t)}),50);function tt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"smooth";const n="horizontal"===q,i=B.children[t],o=n?"offsetLeft":"offsetTop",a=n?"left":"top";B.scroll({[a]:i[o],behavior:e}),r(25,L=t)}return M.id&&!(null==I?void 0:I.fakeElement)&&J.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');tt(t)},setPreviousItem(t){let e=L-1;e<0&&(e="ring"===t?i.length-1:L),tt(e)},setNextItem(t){let e=L+1;e>i.length-1&&(e="ring"===t?0:L),tt(e)}}),G((()=>{if(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))}})),X((()=>{M.id&&!(null==I?void 0:I.fakeElement)&&J.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,T=t.origJson),"layoutParams"in t&&r(3,I=t.layoutParams)},t.$$.update=()=>{if(131073&t.$$.dirty[0]&&((null===r(17,V=M.items)||void 0===V?void 0:V.length)&&Array.isArray(M.items)?r(24,R=!1):(r(24,R=!0),J.logError(Nt(new Error('Incorrect or empty "items" prop for div "pager"'))))),16777219&t.$$.dirty[0]&&r(4,i=(!R&&M.items||[]).map((t=>{let e=t,n=N;return({templateContext:n,json:e}=J.processTemplate(e,n)),{json:e,templateContext:n,origJson:t}}))),1&t.$$.dirty[0]&&(r(14,o=J.getDerivedFromVars(M.layout_mode)),x(),x=f(o,(t=>r(32,v=t)))),2&t.$$.dirty[1]&&(v?"percentage"!==v.type&&"fixed"!==v.type?(r(26,U=!0),J.logError(Nt(new Error('Incorrect value of "layout_mode.type" for div "pager"')))):r(26,U=!1):(r(26,U=!0),J.logError(Nt(new Error('Empty "layout_mode" prop for div "pager"'))))),1&t.$$.dirty[0]&&(r(13,a=J.getDerivedFromVars(M.orientation)),E(),E=f(a,(t=>r(35,_=t)))),134217728&t.$$.dirty[0]|16&t.$$.dirty[1]&&r(27,q=zn(_,q)),1&t.$$.dirty[0]&&(r(12,l=J.getDerivedFromVars(M.item_spacing)),C(),C=f(l,(t=>r(34,$=t)))),8&t.$$.dirty[1]){const t=null==$?void 0:$.value;t&&ae(t)&&r(28,H=Ot(t||0))}if(1&t.$$.dirty[0]&&(r(11,s=J.getDerivedFromVars(M.paddings)),k(),k=f(s,(t=>r(33,y=t)))),536870912&t.$$.dirty[0]|4&t.$$.dirty[1]&&r(29,K=le(y,K)),1&t.$$.dirty[0]&&(r(10,c=J.getDerivedFromVars(M.restrict_parent_scroll)),A(),A=f(c,(t=>r(15,b=t)))),134217728&t.$$.dirty[0]&&r(31,u="horizontal"===q?"grid-auto-columns":"grid-auto-rows"),419168257&t.$$.dirty[0]|2&t.$$.dirty[1])if("fixed"===(null==v?void 0:v.type)){const t=Bt("horizontal"===q?((null===r(18,j=M.paddings)||void 0===j?void 0:j.left)||0)+((null===r(19,P=M.paddings)||void 0===P?void 0:P.right)||0):((null===r(20,S=M.paddings)||void 0===S?void 0:S.top)||0)+((null===r(21,D=M.paddings)||void 0===D?void 0:D.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(Bt(e)," - 2 * ").concat(H,")"):"100%")}else if("percentage"===(null==v?void 0:v.type)){const t=null===r(23,z=v.page_width)||void 0===z?void 0:z.value;r(30,Y="".concat(Number(t),"%"))}1879048192&t.$$.dirty[0]|1&t.$$.dirty[1]&&r(9,d={"grid-gap":H,padding:K,[u]:Y}),134217728&t.$$.dirty[0]&&r(8,p={orientation:q}),83886080&t.$$.dirty[0]&&r(7,g=R||U),33554448&t.$$.dirty[0]&&function(t,e){const n=M.id;if(n){const o=new Map(m);r=h,m=o.set(n,{instId:O,size:t,currentItem:e,scrollToPagerItem:tt}),i=m,r.set(i)}var r,i}(i.length,L),33554432&t.$$.dirty[0]&&function(t){var e;if(t===W)return;W=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)}(L)},r(6,h=J.getStore("pagers")),w(),w=f(h,(t=>r(38,m=t))),[M,N,T,I,i,B,h,g,p,d,c,s,l,a,o,b,Q,V,j,P,S,D,F,z,R,L,U,q,H,K,Y,u,v,y,$,_,function(t){et[t?"unshift":"push"]((()=>{B=t,r(5,B)}))}]}const pi={indicator:"divkit-d8e3f",indicator__scroller:"divkit-b5db0",indicator__items:"divkit-d5d94",indicator__item:"divkit-f6629",indicator__item_active:"divkit-b39cd"};function fi(t,e,n){const r=t.slice();r[36]=e[n],r[39]=n;const i=r[39]===r[13].currentItem;return r[37]=i,r}function gi(t){let e,n=Array(t[13].size),r=[];for(let e=0;e<n.length;e+=1)r[e]=hi(fi(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=T()},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(3153920&i[0]){let o;for(n=Array(t[13].size),o=0;o<n.length;o+=1){const a=fi(t,n,o);r[o]?r[o].p(a,i):(r[o]=hi(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){D(r,t),t&&S(e)}}}function hi(t){let e,n,r,i,o,a,s,c;function u(){return t[30](t[39])}return{c(){e=F("div"),J(e,"class",n=ne("indicator__item",pi,{active:t[37]})+" divkit-bd259"),J(e,"role","tab"),J(e,"id",r=t[13].instId+"-tab-"+t[39]),J(e,"aria-controls",i=t[13].instId+"-panel-"+t[39]),J(e,"aria-selected",o=t[37]?"true":"false"),J(e,"tabindex",a=t[37]?0:-1)},m(n,r){P(n,e,r),s||(c=[I(e,"click",u),I(e,"keydown",t[21])],s=!0)},p(l,s){t=l,8192&s[0]&&n!==(n=ne("indicator__item",pi,{active:t[37]})+" divkit-bd259")&&J(e,"class",n),8192&s[0]&&r!==(r=t[13].instId+"-tab-"+t[39])&&J(e,"id",r),8192&s[0]&&i!==(i=t[13].instId+"-panel-"+t[39])&&J(e,"aria-controls",i),8192&s[0]&&o!==(o=t[37]?"true":"false")&&J(e,"aria-selected",o),8192&s[0]&&a!==(a=t[37]?0:-1)&&J(e,"tabindex",a)},d(t){t&&S(e),s=!1,l(c)}}}function mi(t){let e,n,r,i,o="0 ".concat(Ot((t[10]-1)*t[4]/2)),a="0 ".concat(Ot((t[9]-t[4])/2)),l=t[13]&&gi(t);return{c(){e=F("div"),n=F("div"),l&&l.c(),J(n,"class",r=pi.indicator__items),J(n,"role","tablist"),R(n,"margin",o,!1),R(n,"--divkit-indicator-width",Ot(t[4]),!1),R(n,"--divkit-indicator-height",Ot(t[5]),!1),R(n,"--divkit-indicator-border-radius",Ot(t[6]),!1),R(n,"--divkit-indicator-active-color",t[7],!1),R(n,"--divkit-indicator-inactive-color",t[8],!1),R(n,"--divkit-indicator-active-scale",t[10],!1),R(n,"--divkit-indicator-margin",a,!1),J(e,"class",i=pi.indicator__scroller)},m(r,i){P(r,e,i),A(e,n),l&&l.m(n,null),t[31](n),t[32](e)},p(t,e){t[13]?l?l.p(t,e):(l=gi(t),l.c(),l.m(n,null)):l&&(l.d(1),l=null),1040&e[0]&&o!==(o="0 ".concat(Ot((t[10]-1)*t[4]/2)))&&R(n,"margin",o,!1),16&e[0]&&R(n,"--divkit-indicator-width",Ot(t[4]),!1),32&e[0]&&R(n,"--divkit-indicator-height",Ot(t[5]),!1),64&e[0]&&R(n,"--divkit-indicator-border-radius",Ot(t[6]),!1),128&e[0]&&R(n,"--divkit-indicator-active-color",t[7],!1),256&e[0]&&R(n,"--divkit-indicator-inactive-color",t[8],!1),1024&e[0]&&R(n,"--divkit-indicator-active-scale",t[10],!1),528&e[0]&&a!==(a="0 ".concat(Ot((t[9]-t[4])/2)))&&R(n,"--divkit-indicator-margin",a,!1)},d(n){n&&S(e),l&&l.d(),t[31](null),t[32](null)}}}function vi(t){let e,n;return e=new Oe({props:{cls:ne("indicator",pi,{}),json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[mi]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(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]),16368&n[0]|512&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function yi(t,e,r){let i,o,a,l,s,c,u,d,p,g,h,m,v=n,y=n,$=n,_=n,b=n,w=n;var x;t.$$.on_destroy.push((()=>v())),t.$$.on_destroy.push((()=>y())),t.$$.on_destroy.push((()=>$())),t.$$.on_destroy.push((()=>_())),t.$$.on_destroy.push((()=>b())),t.$$.on_destroy.push((()=>w()));let{json:k={}}=e,{templateContext:C}=e,{origJson:E}=e,{layoutParams:A}=e;const V=Z(Mt);let j,P,S,D=5,F=10,z=10,M=5,N="#ffdc60",T=Lt("#33919cb5"),I=15,J=1.3;function O(t){t!==S.currentItem&&S.scrollToPagerItem(t)}async function B(t){S.scrollToPagerItem(t),await lt();const e=P.querySelector(".".concat(pi.indicator__item_active));e&&e.focus()}return t.$$set=t=>{"json"in t&&r(0,k=t.json),"templateContext"in t&&r(1,C=t.templateContext),"origJson"in t&&r(2,E=t.origJson),"layoutParams"in t&&r(3,A=t.layoutParams)},t.$$.update=()=>{1&t.$$.dirty[0]&&(r(19,i=V.getDerivedFromVars(k.shape)),w(),w=f(i,(t=>r(29,m=t)))),549453936&t.$$.dirty[0]&&m&&("rounded_rectangle"===m.type?(m.item_width&&r(4,F=se(m.item_width.value,F)),m.item_height&&r(5,z=se(m.item_height.value,z)),m.corner_radius&&r(6,M=se(m.corner_radius.value,M))):"circle"===m.type&&(r(23,D=se(null===r(22,x=m.radius)||void 0===x?void 0:x.value,D)),r(4,F=r(5,z=r(6,M=2*D))))),1&t.$$.dirty[0]&&(r(18,o=V.getDerivedFromVars(k.active_item_color)),b(),b=f(o,(t=>r(28,h=t)))),268435584&t.$$.dirty[0]&&r(7,N=Lt(h,1,N)),1&t.$$.dirty[0]&&(r(17,a=V.getDerivedFromVars(k.inactive_item_color)),_(),_=f(a,(t=>r(27,g=t)))),134217984&t.$$.dirty[0]&&r(8,T=Lt(g,1,T)),1&t.$$.dirty[0]&&(r(16,l=V.getDerivedFromVars(k.space_between_centers)),$(),$=f(l,(t=>r(26,p=t)))),67109376&t.$$.dirty[0]&&p&&r(9,I=se(p.value,I)),1&t.$$.dirty[0]&&(r(15,s=V.getDerivedFromVars(k.active_item_size)),y(),y=f(s,(t=>r(25,d=t)))),33555456&t.$$.dirty[0]&&r(10,J=Re(d,J)),16777216&t.$$.dirty[0]&&async function(t){if(k.pager_id&&t.has(k.pager_id)){r(13,S=t.get(k.pager_id)),await lt();const e=P.children[S.currentItem].offsetLeft;j.scroll({left:e-j.clientWidth/2,behavior:"smooth"})}}(u)},r(14,c=V.getStore("pagers")),v(),v=f(c,(t=>r(24,u=t))),[k,C,E,A,F,z,M,N,T,I,J,j,P,S,c,s,l,a,o,i,O,function(t){if(t.ctrlKey||t.shiftKey||t.altKey||t.metaKey)return;const{size:e,currentItem:n}=S;if(37===t.which)B(n-1<0?n:n-1);else if(39===t.which)B(n+1>=e?n:n+1);else if(36===t.which)B(0);else{if(35!==t.which)return;B(e-1)}t.preventDefault()},x,D,u,d,p,g,h,m,t=>O(t),function(t){et[t?"unshift":"push"]((()=>{P=t,r(12,P)}))},function(t){et[t?"unshift":"push"]((()=>{j=t,r(11,j)}))}]}const $i={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 _i(t,e){if(!t||!t.font_size)return e;const n=t.offset,r=t.text_color&&Lt(t.text_color)||"#000",i=Le(t.font_weight);if(ke(t.font_size)&&"transparent"!==r){var o,a;const e={fontSize:Ot(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 bi(t,e,n){return Math.max(e,Math.min(n,t))}const wi=-2147483648,xi=Number.MAX_VALUE,ki=Number.MIN_VALUE,Ci="string",Ei="integer",Ai="number",Vi="boolean",ji="color",Pi="datetime";class Si{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=Ft(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 Di={string:class extends Si{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"string"}},number:class extends Si{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 Si{convertValue(t){if("number"!=typeof t||isNaN(t)||t>2147483647||t<wi||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 Si{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 Si{convertValue(t){if("string"!=typeof t||!Ut(t))throw new Error("Incorrect variable value");return t}fromString(t){return this.convertValue(t)}getType(){return"color"}},url:class extends Si{convertValue(t){if("string"!=typeof t)throw new Error("Incorrect variable value");return t}fromString(t){return t}getType(){return"url"}}};function Fi(t,e,n){if(!(e in Di))throw new Error("Unsupported variable type");return new Di[e](t,n)}function zi(t,e,n){const r=t.slice();return r[78]=e[n],r}function Mi(t,e,n){const r=t.slice();return r[78]=e[n],r}function Ni(t){let e,n;return e=new Oe({props:{cls:ne("slider",$i,t[21]),style:t[22],customDescription:!0,customActions:"slider",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Bi]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){const r={};2097152&n[0]&&(r.cls=ne("slider",$i,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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function Ti(t){let e,n;return{c(){e=F("div"),J(e,"class",n=$i.slider__tick+" "+$i.slider__tick_active),R(e,"--divkit-slider-tick",t[78],!1)},m(t,n){P(t,e,n)},p(t,n){131072&n[0]&&R(e,"--divkit-slider-tick",t[78],!1)},d(t){t&&S(e)}}}function Ii(t){let e,n;return{c(){e=F("div"),J(e,"class",n=$i.slider__tick+" "+$i.slider__tick_inactive),R(e,"--divkit-slider-tick",t[78],!1)},m(t,n){P(t,e,n)},p(t,n){262144&n[0]&&R(e,"--divkit-slider-tick",t[78],!1)},d(t){t&&S(e)}}}function Ji(t){let e,n,r,i,o;return{c(){var a,l,s;e=F("div"),n=F("div"),r=M(t[6]),J(n,"class",i=$i["slider__thumb-text-inner"]),R(n,"font-size",(null===(a=t[12])||void 0===a?void 0:a.fontSize)||"1em",!1),R(n,"font-weight",(null===(l=t[12])||void 0===l?void 0:l.fontWeight)||"",!1),R(n,"color",(null===(s=t[12])||void 0===s?void 0:s.textColor)||"#000",!1),J(e,"class",o=$i["slider__thumb-text"])},m(t,i){P(t,e,i),A(e,n),A(n,r)},p(t,e){var i,o,a;64&e[0]&&B(r,t[6]),4096&e[0]&&R(n,"font-size",(null===(i=t[12])||void 0===i?void 0:i.fontSize)||"1em",!1),4096&e[0]&&R(n,"font-weight",(null===(o=t[12])||void 0===o?void 0:o.fontWeight)||"",!1),4096&e[0]&&R(n,"color",(null===(a=t[12])||void 0===a?void 0:a.textColor)||"#000",!1)},d(t){t&&S(e)}}}function Oi(t){let e,n,r,i,o;return{c(){var a,l,s;e=F("div"),n=F("div"),r=M(t[7]),J(n,"class",i=$i["slider__thumb-text-inner"]),R(n,"font-size",(null===(a=t[13])||void 0===a?void 0:a.fontSize)||"1em",!1),R(n,"font-weight",(null===(l=t[13])||void 0===l?void 0:l.fontWeight)||"",!1),R(n,"color",(null===(s=t[13])||void 0===s?void 0:s.textColor)||"#000",!1),J(e,"class",o=$i["slider__thumb-text"]+" "+$i["slider__thumb-text_secondary"])},m(t,i){P(t,e,i),A(e,n),A(n,r)},p(t,e){var i,o,a;128&e[0]&&B(r,t[7]),8192&e[0]&&R(n,"font-size",(null===(i=t[13])||void 0===i?void 0:i.fontSize)||"1em",!1),8192&e[0]&&R(n,"font-weight",(null===(o=t[13])||void 0===o?void 0:o.fontWeight)||"",!1),8192&e[0]&&R(n,"color",(null===(a=t[13])||void 0===a?void 0:a.textColor)||"#000",!1)},d(t){t&&S(e)}}}function Bi(t){let e,n,r,i,o,a,s,c,u,d,p,f,g,h,m,v,y,$,_,b,w,x,k=t[17],C=[];for(let e=0;e<k.length;e+=1)C[e]=Ti(Mi(t,k,e));let E=t[18],V=[];for(let e=0;e<E.length;e+=1)V[e]=Ii(zi(t,E,e));let j=t[12]&&Ji(t),z=t[37]&&function(t){let e,n,r=t[13]&&Oi(t);return{c(){e=F("div"),r&&r.c(),J(e,"class",n=$i.slider__thumb+" "+$i.slider__thumb_secondary),R(e,"border-radius",Ot(t[9].borderRadius),!1),R(e,"background",t[9].background,!1),R(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=Oi(t),r.c(),r.m(e,null)):r&&(r.d(1),r=null),512&n[0]&&R(e,"border-radius",Ot(t[9].borderRadius),!1),512&n[0]&&R(e,"background",t[9].background,!1),512&n[0]&&R(e,"box-shadow",t[9].boxShadow||"",!1)},d(t){t&&S(e),r&&r.d()}}}(t),M=t[37]&&function(t){let e,n,r,i,o;return{c(){e=F("input"),J(e,"type","range"),J(e,"class",n=t[16]?$i.slider__input:"".concat($i.slider__input," ").concat($i.slider__input_secondary)),J(e,"min",t[4]),J(e,"max",t[5]),J(e,"step","1"),e.value=r=t[16]?t[6]:t[7],J(e,"aria-label",t[20])},m(n,r){P(n,e,r),i||(o=[I(e,"input",t[68]),I(e,"mousedown",t[37]?t[40]:null),I(e,"touchstart",t[37]?t[40]:null)],i=!0)},p(t,i){65536&i[0]&&n!==(n=t[16]?$i.slider__input:"".concat($i.slider__input," ").concat($i.slider__input_secondary))&&J(e,"class",n),16&i[0]&&J(e,"min",t[4]),32&i[0]&&J(e,"max",t[5]),65728&i[0]&&r!==(r=t[16]?t[6]:t[7])&&(e.value=r),1048576&i[0]&&J(e,"aria-label",t[20])},d(t){t&&S(e),i=!1,l(o)}}}(t);return{c(){e=F("div"),n=F("div"),r=F("div"),o=N(),a=F("div"),c=N();for(let t=0;t<C.length;t+=1)C[t].c();u=N();for(let t=0;t<V.length;t+=1)V[t].c();d=N(),p=F("div"),j&&j.c(),g=N(),z&&z.c(),h=N(),m=F("input"),$=N(),M&&M.c(),J(r,"class",i=$i.slider__track),R(r,"height",Ot(t[10].height),!1),R(r,"border-radius",Ot(t[10].borderRadius),!1),R(r,"background",t[10].background,!1),R(r,"box-shadow",t[10].boxShadow||"",!1),J(a,"class",s=$i["slider__active-track"]),R(a,"left",(100*t[23]).toFixed(2)+"%",!1),R(a,"width",(100*t[24]).toFixed(2)+"%",!1),R(a,"height",Ot(t[11].height),!1),R(a,"border-radius",Ot(t[11].borderRadius),!1),R(a,"background",t[11].background,!1),R(a,"box-shadow",t[11].boxShadow||"",!1),J(p,"class",f=$i.slider__thumb),R(p,"border-radius",Ot(t[8].borderRadius),!1),R(p,"background",t[8].background,!1),R(p,"box-shadow",t[8].boxShadow||"",!1),J(m,"type","range"),J(m,"class",v=t[16]?"".concat($i.slider__input," ").concat($i.slider__input_secondary):$i.slider__input),J(m,"min",t[4]),J(m,"max",t[5]),J(m,"step","1"),m.value=y=t[16]?t[7]:t[6],J(m,"aria-label",t[19]),J(n,"class",_=$i["slider__tracks-inner"]),J(e,"class",b=$i["slider__tracks-wrapper"])},m(i,l){P(i,e,l),A(e,n),A(n,r),A(n,o),A(n,a),A(n,c);for(let t=0;t<C.length;t+=1)C[t].m(n,null);A(n,u);for(let t=0;t<V.length;t+=1)V[t].m(n,null);A(n,d),A(n,p),j&&j.m(p,null),A(n,g),z&&z.m(n,null),A(n,h),A(n,m),A(n,$),M&&M.m(n,null),t[69](n),w||(x=I(m,"input",t[67]),w=!0)},p(t,e){if(1024&e[0]&&R(r,"height",Ot(t[10].height),!1),1024&e[0]&&R(r,"border-radius",Ot(t[10].borderRadius),!1),1024&e[0]&&R(r,"background",t[10].background,!1),1024&e[0]&&R(r,"box-shadow",t[10].boxShadow||"",!1),8388608&e[0]&&R(a,"left",(100*t[23]).toFixed(2)+"%",!1),16777216&e[0]&&R(a,"width",(100*t[24]).toFixed(2)+"%",!1),2048&e[0]&&R(a,"height",Ot(t[11].height),!1),2048&e[0]&&R(a,"border-radius",Ot(t[11].borderRadius),!1),2048&e[0]&&R(a,"background",t[11].background,!1),2048&e[0]&&R(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=Mi(t,k,r);C[r]?C[r].p(i,e):(C[r]=Ti(i),C[r].c(),C[r].m(n,u))}for(;r<C.length;r+=1)C[r].d(1);C.length=k.length}if(262144&e[0]){let r;for(E=t[18],r=0;r<E.length;r+=1){const i=zi(t,E,r);V[r]?V[r].p(i,e):(V[r]=Ii(i),V[r].c(),V[r].m(n,d))}for(;r<V.length;r+=1)V[r].d(1);V.length=E.length}t[12]?j?j.p(t,e):(j=Ji(t),j.c(),j.m(p,null)):j&&(j.d(1),j=null),256&e[0]&&R(p,"border-radius",Ot(t[8].borderRadius),!1),256&e[0]&&R(p,"background",t[8].background,!1),256&e[0]&&R(p,"box-shadow",t[8].boxShadow||"",!1),t[37]&&z.p(t,e),65536&e[0]&&v!==(v=t[16]?"".concat($i.slider__input," ").concat($i.slider__input_secondary):$i.slider__input)&&J(m,"class",v),16&e[0]&&J(m,"min",t[4]),32&e[0]&&J(m,"max",t[5]),65728&e[0]&&y!==(y=t[16]?t[7]:t[6])&&(m.value=y),524288&e[0]&&J(m,"aria-label",t[19]),t[37]&&M.p(t,e)},d(n){n&&S(e),D(C,n),D(V,n),j&&j.d(),z&&z.d(),M&&M.d(),t[69](null),w=!1,x()}}}function Ri(t){let e,n,r,i,o=!t[14]&&Ni(t);return{c(){o&&o.c(),e=T()},m(a,l){o&&o.m(a,l),P(a,e,l),n=!0,r||(i=I(window,"resize",t[42]),r=!0)},p(t,n){t[14]?o&&(vt(),_t(o,1,1,(()=>{o=null})),yt()):o?(o.p(t,n),16384&n[0]&&$t(o,1)):(o=Ni(t),o.c(),$t(o,1),o.m(e.parentNode,e))},i(t){n||($t(o),n=!0)},o(t){_t(o),n=!1},d(t){o&&o.d(t),t&&S(e),r=!1,i()}}}function Li(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 Wi(t,e,r){let i,o,a,l,s,c,u,d,p,h,m,v,y,$,_,b,w,x,k,C,E,A,V,j,P,S,D,F,z,M,N,T,I,J,O=n,B=n,R=n,L=n,W=n,U=n,q=n,H=n,K=n,X=n,Y=n,Q=n;var tt,nt,rt,it;t.$$.on_destroy.push((()=>O())),t.$$.on_destroy.push((()=>B())),t.$$.on_destroy.push((()=>R())),t.$$.on_destroy.push((()=>L())),t.$$.on_destroy.push((()=>W())),t.$$.on_destroy.push((()=>U())),t.$$.on_destroy.push((()=>q())),t.$$.on_destroy.push((()=>H())),t.$$.on_destroy.push((()=>K())),t.$$.on_destroy.push((()=>X())),t.$$.on_destroy.push((()=>Y())),t.$$.on_destroy.push((()=>Q()));let{json:ot={}}=e,{templateContext:at}=e,{origJson:lt}=e,{layoutParams:st}=e;const ct={width:10,height:10,borderRadius:5,background:"#000"},ut=["rounded_rectangle","circle"],dt=["rounded_rectangle"],pt=Z(Mt),ft=Z(ve);let gt,ht=!1,mt=0,vt=100;const yt=pt.getJsonWithVars(ot.thumb_value_variable),$t=pt.getJsonWithVars(ot.thumb_secondary_value_variable);let _t=yt&&pt.getVariable(yt,"integer")||Fi("temp","integer",0);g(t,_t,(t=>r(64,T=t)));let bt=$t&&pt.getVariable($t,"integer")||Fi("temp","integer",0);g(t,bt,(t=>r(63,N=t)));let wt,xt,kt,Ct=bi(T||0,mt,vt),Et=bi(N||0,mt,vt),At=ct,Vt=At,jt=ct,Pt=ct,St=null,Dt=null,Ft=kt,zt="",Tt="",It=!1;function Jt(t,e){const n=Number(t.target.value);ht===("first"===e)?(r(7,Et=n),bt.setValue(n)):(r(6,Ct=n),_t.setValue(n))}let Rt=!1;function Lt(){if(!gt)return;const t=vt-mt,e=(null==St?void 0:St.width)||0,n=(null==Dt?void 0:Dt.width)||0;Math.max(e,n)*t>=(null==gt?void 0:gt.clientWidth)?Rt||(pt.logError(Nt(new Error("Slider ticks overlap each other"),{level:"warn"})),Rt=!0):Rt=!1}const Wt=lr(Lt,50);return G((()=>{Lt()})),t.$$set=t=>{"json"in t&&r(0,ot=t.json),"templateContext"in t&&r(1,at=t.templateContext),"origJson"in t&&r(2,lt=t.origJson),"layoutParams"in t&&r(3,st=t.layoutParams)},t.$$.update=()=>{if(1&t.$$.dirty[0]&&(r(36,i=pt.getDerivedFromVars(ot.min_value)),Q(),Q=f(i,(t=>r(66,J=t)))),1&t.$$.dirty[0]&&(r(35,o=pt.getDerivedFromVars(ot.max_value)),Y(),Y=f(o,(t=>r(65,I=t)))),48&t.$$.dirty[0]|24&t.$$.dirty[2]&&(r(4,mt=fe(J,mt)),r(5,vt=fe(I,vt)),Lt()),112&t.$$.dirty[0]|4&t.$$.dirty[2]){const t=bi(T||0,mt,vt);t!==Ct&&r(6,Ct=t)}if(176&t.$$.dirty[0]|2&t.$$.dirty[2]){const t=bi(N||0,mt,vt);t!==Et&&r(7,Et=t)}if(1&t.$$.dirty[0]&&(r(34,a=pt.getDerivedFromVars(ot.thumb_style)),X(),X=f(a,(t=>r(62,M=t)))),256&t.$$.dirty[0]|1&t.$$.dirty[2]&&r(8,At=fn(M,ut,At)),1&t.$$.dirty[0]&&(r(33,l=pt.getDerivedFromVars(ot.thumb_secondary_style)),K(),K=f(l,(t=>r(61,z=t)))),256&t.$$.dirty[0]|1073741824&t.$$.dirty[1]&&r(9,Vt=fn(z,ut,At)),1&t.$$.dirty[0]&&(r(32,s=pt.getDerivedFromVars(ot.track_inactive_style)),H(),H=f(s,(t=>r(60,F=t)))),1024&t.$$.dirty[0]|536870912&t.$$.dirty[1]&&r(10,jt=fn(F,dt,jt)),1&t.$$.dirty[0]&&(r(31,c=pt.getDerivedFromVars(ot.track_active_style)),q(),q=f(c,(t=>r(59,D=t)))),2048&t.$$.dirty[0]|268435456&t.$$.dirty[1]&&r(11,Pt=fn(D,dt,Pt)),1&t.$$.dirty[0]&&(r(30,u=pt.getDerivedFromVars(ot.tick_mark_active_style)),U(),U=f(u,(t=>r(58,S=t)))),134217728&t.$$.dirty[1]){let t=fn(S,ut,ct);t!==ct&&r(47,St=t)}if(240&t.$$.dirty[0]|65536&t.$$.dirty[1]&&(St?(r(17,wt=$t?Li(Math.min(Ct,Et),Math.max(Ct,Et)+1,mt,vt,!0):Li(mt,Ct,mt,vt,!0)),Lt()):r(17,wt=[])),1&t.$$.dirty[0]&&(r(29,d=pt.getDerivedFromVars(ot.tick_mark_inactive_style)),W(),W=f(d,(t=>r(57,P=t)))),67108864&t.$$.dirty[1]){let t=fn(P,ut,ct);t!==ct&&r(48,Dt=t)}if(240&t.$$.dirty[0]|131072&t.$$.dirty[1]&&(Dt?(r(18,xt=$t?Li(Math.min(Ct,Et),Math.max(Ct,Et)+1,mt,vt,!1):Li(Ct+1,vt+1,mt,vt,!0)),Lt()):r(18,xt=[])),1&t.$$.dirty[0]&&(r(28,p=pt.getDerivedFromVars(ot.thumb_text_style)),L(),L=f(p,(t=>r(56,j=t)))),4096&t.$$.dirty[0]|33554432&t.$$.dirty[1]&&r(12,kt=_i(j,kt)),1&t.$$.dirty[0]&&(r(27,h=pt.getDerivedFromVars(ot.thumb_secondary_text_style)),R(),R=f(h,(t=>r(55,V=t)))),4096&t.$$.dirty[0]|16777216&t.$$.dirty[1]&&r(13,Ft=_i(V,kt)),1&t.$$.dirty[0]&&(r(26,m=pt.getDerivedFromVars(ot.accessibility)),B(),B=f(m,(t=>r(54,A=t)))),8388608&t.$$.dirty[1]&&((null==A?void 0:A.description)?r(19,zt=A.description):pt.logError(Nt(new Error('Missing accessibility "description" for slider'),{level:"warn"}))),1&t.$$.dirty[0]&&(r(25,v=pt.getDerivedFromVars(ot.secondary_value_accessibility)),O(),O=f(v,(t=>r(53,E=t)))),4194304&t.$$.dirty[1]&&((null==E?void 0:E.description)?r(20,Tt=E.description):$t&&pt.logError(Nt(new Error('Missing second accessibility "description" for slider'),{level:"warn"}))),19712&t.$$.dirty[0]){let t=!1;ft.hasAction()?(pt.logError(Nt(new Error('Cannot show "slider" inside component with action'))),t=!0):At===ct?(pt.logError(Nt(new Error('Missing "thumb_style" in slider'))),t=!0):Pt===ct?(pt.logError(Nt(new Error('Missing "track_active_style" in slider'))),t=!0):jt===ct&&(pt.logError(Nt(new Error('Missing "track_inactive_style" in slider'))),t=!0),t!==It&&r(14,It=t)}768&t.$$.dirty[0]&&r(52,y=Ot(Math.max(...[At.width,Vt.width,0].filter(ae)))),768&t.$$.dirty[0]&&r(51,$=Ot(Math.max(...[At.height,Vt.height,0].filter(ae)))),112&t.$$.dirty[0]&&r(50,_=(Ct-mt)/(vt-mt)),176&t.$$.dirty[0]&&r(49,b=$t?(Et-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":Ot(At.width),"--divkit-slider-thumb-height":Ot(At.height),"--divkit-slider-thumb-secondary-width":Ot(Vt.width),"--divkit-slider-thumb-secondary-height":Ot(Vt.height),"--divkit-slider-text-offset-x":(null===r(43,tt=null==kt?void 0:kt.offset)||void 0===tt?void 0:tt.x)?Bt(kt.offset.x):void 0,"--divkit-slider-text-offset-y":(null===r(44,nt=null==kt?void 0:kt.offset)||void 0===nt?void 0:nt.y)?Bt(kt.offset.y):void 0,"--divkit-slider-text-secondary-offset-x":(null===r(45,rt=null==Ft?void 0:Ft.offset)||void 0===rt?void 0:rt.x)?Bt(Ft.offset.x):void 0,"--divkit-slider-text-secondary-offset-y":(null===r(46,it=null==Ft?void 0:Ft.offset)||void 0===it?void 0:it.y)?Bt(Ft.offset.y):void 0,"--divkit-slider-tick-active-width":St?Ot(St.width):void 0,"--divkit-slider-tick-active-height":St?Ot(St.height):void 0,"--divkit-slider-tick-active-border-radius":St?Ot(St.borderRadius):void 0,"--divkit-slider-tick-active-background":(null==St?void 0:St.background)||void 0,"--divkit-slider-tick-active-box-shadow":(null==St?void 0:St.boxShadow)||void 0,"--divkit-slider-tick-inactive-width":Dt?Ot(Dt.width):void 0,"--divkit-slider-tick-inactive-height":Dt?Ot(Dt.height):void 0,"--divkit-slider-tick-inactive-border-radius":Dt?Ot(Dt.borderRadius):void 0,"--divkit-slider-tick-inactive-background":(null==Dt?void 0:Dt.background)||void 0,"--divkit-slider-tick-inactive-box-shadow":(null==Dt?void 0:Dt.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,C={}),[ot,at,lt,st,mt,vt,Ct,Et,At,Vt,jt,Pt,kt,Ft,It,gt,ht,wt,xt,zt,Tt,C,k,x,w,v,m,h,p,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=gt.getBoundingClientRect(),a=(i-o.left)/o.width,l=(vt-mt)*a,s=Math.round(bi(l,mt,vt));r(16,ht=s<(Ct+Et)/2==Ct<Et)},Jt,Wt,tt,nt,rt,it,St,Dt,b,_,$,y,E,A,V,j,P,S,D,F,z,M,N,T,I,J,t=>Jt(t,"first"),t=>Jt(t,"second"),function(t){et[t?"unshift":"push"]((()=>{gt=t,r(15,gt)}))}]}const Ui={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 qi(t){let e,n;return e=new Oe({props:{cls:ne("input",Ui,t[12]),style:t[11],customDescription:!0,customActions:"input",json:t[0],origJson:t[2],templateContext:t[1],layoutParams:t[3],$$slots:{default:[Xi]},$$scope:{ctx:t}}}),{c(){At(e.$$.fragment)},m(t,r){Vt(e,t,r),n=!0},p(t,n){const r={};4096&n[0]&&(r.cls=ne("input",Ui,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||($t(e.$$.fragment,t),n=!0)},o(t){_t(e.$$.fragment,t),n=!1},d(t){jt(e,t)}}}function Hi(t){let e;return{c(){e=M("")},m(t,n){P(t,e,n)},d(t){t&&S(e)}}}function Ki(t){let e,n,r,i;return{c(){e=F("input"),J(e,"type",t[9]),J(e,"class",n=Ui.input__input),J(e,"autocomplete","off"),J(e,"autocapitalize","off"),J(e,"aria-label",t[10]),J(e,"placeholder",t[15]),e.value=t[8]},m(n,o){P(n,e,o),t[57](e),r||(i=[I(e,"input",t[29]),I(e,"mousedown",(function(){s(t[16]?t[30]:void 0)&&(t[16]?t[30]:void 0).apply(this,arguments)})),I(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]&&J(e,"type",t[9]),1024&r[0]&&J(e,"aria-label",t[10]),32768&r[0]&&J(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 Gi(t){let e,n,r,i;return{c(){e=F("textarea"),J(e,"class",n=Ui.input__input),J(e,"autocomplete","off"),J(e,"autocapitalize","off"),J(e,"aria-label",t[10]),J(e,"placeholder",t[15]),e.value=t[8]},m(n,o){P(n,e,o),t[56](e),r||(i=[I(e,"input",t[29]),I(e,"mousedown",(function(){s(t[16]?t[30]:void 0)&&(t[16]?t[30]:void 0).apply(this,arguments)})),I(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]&&J(e,"aria-label",t[10]),32768&r[0]&&J(e,"placeholder",t[15]),256&r[0]&&(e.value=t[8])},d(n){n&&S(e),t[56](null),r=!1,l(i)}}}function Xi(t){let e,n,r,i,o,a,l=t[8].endsWith("\n")||!t[8],s=l&&Hi();function c(t,e){return t[4]?Gi:Ki}let u=c(t),d=u(t);return{c(){e=F("span"),n=F("span"),r=M(t[8]),s&&s.c(),o=N(),d.c(),J(n,"class",i=Ui.input__holder),J(n,"aria-hidden","true"),J(e,"class",a=Ui.input__wrapper)},m(i,a){P(i,e,a),A(e,n),A(n,r),s&&s.m(n,null),t[55](n),A(e,o),d.m(e,null)},p(t,i){256&i[0]&&B(r,t[8]),256&i[0]&&(l=t[8].endsWith("\n")||!t[8]),l?s||(s=Hi(),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 Yi(t){let e,n,r=!t[7]&&qi(t);return{c(){r&&r.c(),e=T()},m(t,i){r&&r.m(t,i),P(t,e,i),n=!0},p(t,n){t[7]?r&&(vt(),_t(r,1,1,(()=>{r=null})),yt()):r?(r.p(t,n),128&n[0]&&$t(r,1)):(r=qi(t),r.c(),$t(r,1),r.m(e.parentNode,e))},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function Zi(t,e,r){let i,o,a,l,s,c,u,d,p,h,m,v,y,$,_,b,w,x,k,C,E=n,A=n;t.$$.on_destroy.push((()=>E())),t.$$.on_destroy.push((()=>A()));let{json:V={}}=e,{templateContext:j}=e,{origJson:P}=e,{layoutParams:S}=e;const D=Z(Mt);let F,z,M=!1,N=!1;const T=D.getJsonWithVars(V.text_variable);let I=!1;T||(I=!0,D.logError(Nt(new Error('Missing "text_variable" in "input"'))));let J=T&&D.getVariable(T,"string")||Fi("temp","string","");g(t,J,(t=>r(54,k=t)));let O="";const B=D.getDerivedFromVars(V.hint_text);g(t,B,(t=>r(53,x=t)));const R=D.getDerivedFromVars(V.hint_color);g(t,R,(t=>r(52,w=t)));let L="";const W=D.getDerivedFromVars(V.font_size);g(t,W,(t=>r(51,b=t)));let U=12;const q=D.getDerivedFromVars(V.font_weight);let H;g(t,q,(t=>r(50,_=t)));const K=D.getDerivedFromVars(V.line_height);let X;g(t,K,(t=>r(49,$=t)));const Y=D.getDerivedFromVars(V.letter_spacing);g(t,Y,(t=>r(48,y=t)));let Q="";const tt=D.getDerivedFromVars(V.text_color);g(t,tt,(t=>r(47,v=t)));let nt="#000";const rt=D.getDerivedFromVars(V.highlight_color);g(t,rt,(t=>r(46,m=t)));let it="";const ot=D.getDerivedFromVars(V.keyboard_type);g(t,ot,(t=>r(45,h=t)));const at={email:"email",number:"number",phone:"tel",single_line_text:"text",multi_line_text:"text",uri:"url"};let lt="multi_line_text",st="text";const ct=D.getDerivedFromVars(V.max_visible_lines);g(t,ct,(t=>r(44,p=t)));let ut="",dt="";const pt=D.getDerivedFromVars(V.select_all_on_focus);function ft(){r(32,N=z.scrollHeight>z.offsetHeight)}return g(t,pt,(t=>r(16,C=t))),G((()=>{ft()})),t.$$set=t=>{"json"in t&&r(0,V=t.json),"templateContext"in t&&r(1,j=t.templateContext),"origJson"in t&&r(2,P=t.origJson),"layoutParams"in t&&r(3,S=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,L=Lt(w,1,L)),1048584&t.$$.dirty[1]&&r(34,U=Re(b,U)),524304&t.$$.dirty[1]&&r(35,H=We(_,H)),262152&t.$$.dirty[1]){const t=$;ke(t)&&r(36,X=t/U)}131080&t.$$.dirty[1]&&oe(y)&&r(37,Q=Ot(y/U*10)),65664&t.$$.dirty[1]&&r(38,nt=Lt(v,1,nt)),33024&t.$$.dirty[1]&&r(39,it=Lt(m,1,it)),16384&t.$$.dirty[1]&&h&&h in at&&(r(9,st=at[h]),r(40,lt=h)),512&t.$$.dirty[1]&&r(4,o="multi_line_text"===lt),1&t.$$.dirty[0]&&(r(14,a=D.getDerivedFromVars(V.paddings)),A(),A=f(a,(t=>r(43,d=t)))),12320&t.$$.dirty[1]&&ke(p)&&r(41,ut="calc(".concat(p*(X||1.25)+"em"," + ").concat(Bt(se(null==d?void 0:d.top,0)+se(null==d?void 0:d.bottom,0)),")")),1&t.$$.dirty[0]&&(r(13,l=D.getDerivedFromVars(V.accessibility)),E(),E=f(l,(t=>r(42,u=t)))),2048&t.$$.dirty[1]&&((null==u?void 0:u.description)?r(10,dt=u.description):D.logError(Nt(new Error('Missing accessibility "description" for input'),{level:"warn"}))),16&t.$$.dirty[0]|258&t.$$.dirty[1]&&r(12,s={"highlight-color":Boolean(it),"vertical-overflow":N,multiline:o}),1532&t.$$.dirty[1]&&r(11,c={"--divkit-input-hint-color":L,"--divkit-input-highlight-color":it,"font-size":Ot(U),"font-weight":H,"line-height":X,"letter-spacing":Q,color:nt,"max-height":ut})},[V,j,P,S,o,F,z,I,O,st,dt,c,s,l,a,i,C,J,B,R,W,q,K,Y,tt,rt,ot,ct,pt,function(t){const e=t.target.value||"";J.setValue(e),ft()},function(){M=!1,setTimeout((()=>{M=!0}),250)},function(){M||F.select()},N,L,U,H,X,Q,nt,it,lt,ut,u,d,p,h,m,v,y,$,_,b,w,x,k,function(t){et[t?"unshift":"push"]((()=>{z=t,r(6,z)}))},function(t){et[t?"unshift":"push"]((()=>{F=t,r(5,F)}))},function(t){et[t?"unshift":"push"]((()=>{F=t,r(5,F)}))}]}const Qi={text:class extends St{constructor(t){super(),Pt(this,t,dn,un,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},container:class extends St{constructor(t){super(),Pt(this,t,Dn,Sn,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},separator:class extends St{constructor(t){super(),Pt(this,t,In,Tn,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},image:Kn,gif:Kn,grid:class extends St{constructor(t){super(),Pt(this,t,ir,rr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},gallery:class extends St{constructor(t){super(),Pt(this,t,$r,yr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},tabs:class extends St{constructor(t){super(),Pt(this,t,Dr,Sr,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},state:class extends St{constructor(t){super(),Pt(this,t,ri,ei,d,{json:0,templateContext:1,origJson:2,layoutParams:3})}},pager:class extends St{constructor(t){super(),Pt(this,t,di,ui,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},indicator:class extends St{constructor(t){super(),Pt(this,t,yi,vi,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1])}},slider:class extends St{constructor(t){super(),Pt(this,t,Wi,Ri,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}},input:class extends St{constructor(t){super(),Pt(this,t,Zi,Yi,d,{json:0,templateContext:1,origJson:2,layoutParams:3},null,[-1,-1,-1])}}};function to(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&&At(e.$$.fragment),n=T()},m(t,i){e&&Vt(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){vt();const t=e;_t(t.$$.fragment,1,0,(()=>{jt(t,1)})),yt()}i?(e=new i(o(t)),At(e.$$.fragment),$t(e.$$.fragment,1),Vt(e,n.parentNode,n)):e=null}else i&&e.$set(a)},i(t){r||(e&&$t(e.$$.fragment,t),r=!0)},o(t){e&&_t(e.$$.fragment,t),r=!1},d(t){t&&S(n),e&&jt(e,t)}}}function eo(t){let e,n,r=t[5]&&to(t);return{c(){r&&r.c(),e=T()},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&&$t(r,1)):(r=to(t),r.c(),$t(r,1),r.m(e.parentNode,e)):r&&(vt(),_t(r,1,1,(()=>{r=null})),yt())},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function no(t,e,n){let{div:r}=e,{templateContext:i}=e,{origJson:o}=e,{layoutParams:a}=e;const l=Z(Mt);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&&Qi[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&&Qi[s.type]||void 0),!u))){let t;t=(null==s?void 0:s.type)&&l.hasTemplate(s.type)?"Recursive template":"Unknown component",l.logError(Nt(new Error(t),{additional:{component:(null==s?void 0:s.type)||"<missing>"}}))}},[r,o,a,s,c,u,i]}const ro=class extends St{constructor(t){super(),Pt(this,t,no,eo,d,{div:0,templateContext:6,origJson:1,layoutParams:2})}};function io(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 oo(t){let e,n,r,i=[...Object.keys(t[0])],o=[];for(let e=0;e<i.length;e+=1)o[e]=co(io(t,i,e));return{c(){e=z("svg"),n=z("defs");for(let t=0;t<o.length;t+=1)o[t].c();J(e,"class",r="divkit-dc22b"),J(e,"aria-hidden","true")},m(t,r){P(t,e,r),A(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=io(t,i,r);o[r]?o[r].p(a,e):(o[r]=co(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),D(o,t)}}}function ao(t){let e,n;return{c(){e=z("feBlend"),J(e,"in2","SourceGraphic"),J(e,"mode",n=t[3])},m(t,n){P(t,e,n)},p(t,r){1&r&&n!==(n=t[3])&&J(e,"mode",n)},d(t){t&&S(e)}}}function lo(t){let e;return{c(){e=z("feComposite"),J(e,"in2","SourceGraphic"),J(e,"operator","arithmetic"),J(e,"k1","1"),J(e,"k2","0"),J(e,"k3","0"),J(e,"k4","0")},m(t,n){P(t,e,n)},p:n,d(t){t&&S(e)}}}function so(t){let e,n;return{c(){e=z("feComposite"),J(e,"in2","SourceGraphic"),J(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])&&J(e,"operator",n)},d(t){t&&S(e)}}}function co(t){let e,n,r,i;function o(t,e){return"source_in"===t[3]||"source_atop"===t[3]?so:"multiply"===t[3]?lo:ao}let a=o(t),l=a(t);return{c(){e=z("filter"),n=z("feFlood"),l.c(),J(n,"flood-color",r=t[2]),J(e,"id",i=t[0][t[1]])},m(t,r){P(t,e,r),A(e,n),l.m(e,null)},p(t,s){1&s&&r!==(r=t[2])&&J(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]])&&J(e,"id",i)},d(t){t&&S(e),l.d()}}}function uo(t){let e,r=Object.keys(t[0]).length,i=r&&oo(t);return{c(){i&&i.c(),e=T()},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=oo(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 po(t,e,n){let{svgFiltersMap:r}=e;return t.$$set=t=>{"svgFiltersMap"in t&&n(0,r=t.svgFiltersMap)},[r]}const fo=class extends St{constructor(t){super(),Pt(this,t,po,uo,d,{svgFiltersMap:0})}};function go(t,e,n,r){const i=n[t.type];if(!i)return r(Nt(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(Nt(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 ho(){}function mo(t){return{subscribe:e=>(e(t),ho)}}function vo(t,e){return e.reduce(((t,e)=>({type:"BinaryExpression",operator:e[1],left:t,right:e[3]})),t)}function yo(t,e){return e.reduce(((t,e)=>({type:"LogicalExpression",operator:e[1],left:t,right:e[3]})),t)}function $o(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 _o(t){var e=parseInt(t,10);if(e>2147483647||e<wi)throw new Error("Value ".concat(t," can't be converted to Integer type."));return e}function bo(t){if("'"===t||"\\"===t)return t;throw new Error("Incorrect string escape")}function wo(t,e,n,r){var i=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(i,wo.prototype),i.expected=e,i.found=n,i.location=r,i.name="SyntaxError",i}function xo(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,t+(n+=n.repeat(e)).slice(0,e))}function ko(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=Pt();n!==r;)e.push(n),n=Pt();return vt=t,e=ht(e)}},a=jt,l="@{",s="}",c="@{}",u="\\",d="||",p="&&",f="==",g="!=",h=">=",m="<=",v="+",y="-",$="true",_="false",b=/^[^}]/,w=/^[^'}]/,x=/^[0-9]/,k=/^[a-zA-Z_0-9.]/,C=/^[a-zA-Z_]/,E=/^[ \t\r\n]/,A=xt("@{",!1),V=xt("}",!1),j=xt("@{}",!1),P=xt("\\",!1),S={type:"any"},D=kt(["}"],!0,!1),F=xt("?",!1),z=xt(":",!1),M=xt("||",!1),N=xt("&&",!1),T=xt("==",!1),I=xt("!=",!1),J=xt(">=",!1),O=xt(">",!1),B=xt("<=",!1),R=xt("<",!1),L=xt("+",!1),W=xt("-",!1),U=xt("/",!1),q=xt("*",!1),H=xt("%",!1),K=xt("!",!1),G=xt("(",!1),X=xt(")",!1),Y=xt(",",!1),Z=Ct("string"),Q=xt("'",!1),tt=kt(["'","}"],!0,!1),et=Ct("integer"),nt=kt([["0","9"]],!1,!1),rt=Ct("number"),it=xt(".",!1),ot=xt("e",!1),at=xt("E",!1),lt=Ct("boolean"),st=xt("true",!1),ct=xt("false",!1),ut=kt([["a","z"],["A","Z"],"_",["0","9"],"."],!1,!1),dt=Ct("identifier"),pt=kt([["a","z"],["A","Z"],"_"],!1,!1),ft=Ct("whitespace"),gt=kt([" ","\t","\r","\n"],!1,!1),ht=function(t){return $o(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 Ct(t){return{type:"other",description:t}}function Et(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=Et(t),r=Et(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,Lt(),(e=St())!==r?(Lt(),vt=t,t=e):(mt=t,t=r),t}function Pt(){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=Lt(),(o=St())!==r?(Lt(),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(P)),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(S)),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(D)),o!==r)for(;o!==r;)i.push(o),b.test(t.charAt(mt))?(o=t.charAt(mt),mt++):(o=r,0===bt&&Vt(D));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(P)),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(P)),n!==r?(t.length>mt?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(S)),i!==r?(vt=e,e=bo(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(P)),n!==r&&(vt=e,n=function(){throw new Error("Error tokenizing '"+t+"'.")}()),e=n))))}return e}function St(){var e,n,i,o,a,l;return e=mt,(n=Dt())!==r?(Lt(),63===t.charCodeAt(mt)?(i="?",mt++):(i=r,0===bt&&Vt(F)),i!==r?(Lt(),(o=St())!==r?(Lt(),58===t.charCodeAt(mt)?(a=":",mt++):(a=r,0===bt&&Vt(z)),a!==r?(Lt(),(l=St())!==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=Dt()),e}function Dt(){var e,n,i,o,a,l,s,c;if(e=mt,(n=Ft())!==r){for(i=[],o=mt,a=Lt(),t.substr(mt,2)===d?(l=d,mt+=2):(l=r,0===bt&&Vt(M)),l!==r?(s=Lt(),(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=Lt(),t.substr(mt,2)===d?(l=d,mt+=2):(l=r,0===bt&&Vt(M)),l!==r?(s=Lt(),(c=Ft())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);vt=e,e=yo(n,i)}else mt=e,e=r;return e}function Ft(){var e,n,i,o,a,l,s,c;if(e=mt,(n=zt())!==r){for(i=[],o=mt,a=Lt(),t.substr(mt,2)===p?(l=p,mt+=2):(l=r,0===bt&&Vt(N)),l!==r?(s=Lt(),(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=Lt(),t.substr(mt,2)===p?(l=p,mt+=2):(l=r,0===bt&&Vt(N)),l!==r?(s=Lt(),(c=zt())!==r?o=a=[a,l,s,c]:(mt=o,o=r)):(mt=o,o=r);vt=e,e=yo(n,i)}else mt=e,e=r;return e}function zt(){var e,n,i,o,a,l,s,c;if(e=mt,(n=Mt())!==r){for(i=[],o=mt,a=Lt(),t.substr(mt,2)===f?(l=f,mt+=2):(l=r,0===bt&&Vt(T)),l===r&&(t.substr(mt,2)===g?(l=g,mt+=2):(l=r,0===bt&&Vt(I))),l!==r?(s=Lt(),(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=Lt(),t.substr(mt,2)===f?(l=f,mt+=2):(l=r,0===bt&&Vt(T)),l===r&&(t.substr(mt,2)===g?(l=g,mt+=2):(l=r,0===bt&&Vt(I))),l!==r?(s=Lt(),(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=Lt(),t.substr(mt,2)===h?(l=h,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=Lt(),(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=Lt(),t.substr(mt,2)===h?(l=h,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=Lt(),(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,o,a,l,s,c;if(e=mt,(n=Tt())!==r){for(i=[],o=mt,a=Lt(),43===t.charCodeAt(mt)?(l=v,mt++):(l=r,0===bt&&Vt(L)),l===r&&(45===t.charCodeAt(mt)?(l=y,mt++):(l=r,0===bt&&Vt(W))),l!==r?(s=Lt(),(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=Lt(),43===t.charCodeAt(mt)?(l=v,mt++):(l=r,0===bt&&Vt(L)),l===r&&(45===t.charCodeAt(mt)?(l=y,mt++):(l=r,0===bt&&Vt(W))),l!==r?(s=Lt(),(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=It())!==r){for(i=[],o=mt,a=Lt(),47===t.charCodeAt(mt)?(l="/",mt++):(l=r,0===bt&&Vt(U)),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=Lt(),(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=Lt(),47===t.charCodeAt(mt)?(l="/",mt++):(l=r,0===bt&&Vt(U)),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=Lt(),(c=It())!==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 It(){var e,n,i;return(e=Bt())===r&&(e=Ot())===r&&(e=mt,33===t.charCodeAt(mt)?(n="!",mt++):(n=r,0===bt&&Vt(K)),n===r&&(43===t.charCodeAt(mt)?(n=v,mt++):(n=r,0===bt&&Vt(L)),n===r&&(45===t.charCodeAt(mt)?(n=y,mt++):(n=r,0===bt&&Vt(W)))),n!==r?(Lt(),(i=It())!==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?(Lt(),40===t.charCodeAt(mt)?(i="(",mt++):(i=r,0===bt&&Vt(G)),i!==r?(Lt(),o=function(){var e,n,i,o,a,l,s;if(e=mt,(n=St())!==r){for(i=[],o=mt,Lt(),44===t.charCodeAt(mt)?(a=",",mt++):(a=r,0===bt&&Vt(Y)),a!==r?(Lt(),(l=St())!==r?o=l:(mt=o,o=r)):(mt=o,o=r);o!==r;)i.push(o),o=mt,Lt(),44===t.charCodeAt(mt)?(a=",",mt++):(a=r,0===bt&&Vt(Y)),a!==r?(Lt(),(l=St())!==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=Lt()),e}(),o!==r?(Lt(),41===t.charCodeAt(mt)?(a=")",mt++):(a=r,0===bt&&Vt(X)),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=$o(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(G)),n!==r&&(i=St())!==r?(41===t.charCodeAt(mt)?(o=")",mt++):(o=r,0===bt&&Vt(X)),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=Lt(),(o=St())!==r?(Lt(),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(P)),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(S)),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(P)),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(P)),n!==r?(t.length>mt?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(S)),i!==r?(vt=e,e=bo(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(P)),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:_o(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(L)),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(L)),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(C.test(t.charAt(mt))?(i=t.charAt(mt),mt++):(i=r,0===bt&&Vt(pt)),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 Lt(){var e,n;for(bt++,e=[],E.test(t.charAt(mt))?(n=t.charAt(mt),mt++):(n=r,0===bt&&Vt(gt));n!==r;)e.push(n),E.test(t.charAt(mt))?(n=t.charAt(mt),mt++):(n=r,0===bt&&Vt(gt));return bt--,n=r,0===bt&&Vt(ft),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 wo(wo.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}(wo,Error),wo.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=xo("",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+" | "+xo("",i.column-1," ")+xo("",c,"^")}else e+="\n at "+o}return e},wo.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 Co=new Map,Eo=new Map;function Ao(t,e,n){const r={args:e,cb:n},i=Co.get(t)||[];Co.has(t)||Co.set(t,i),i.push(r);const o=t+":"+e.map((t=>"object"==typeof t?t.type:t)).join("#");Eo.set(o,r)}function Vo(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 jo(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=>{jo(t,e)}));break;case"BinaryExpression":case"LogicalExpression":jo(t.left,e),jo(t.right,e);break;case"UnaryExpression":jo(t.argument,e);break;case"ConditionalExpression":jo(t.test,e),jo(t.consequent,e),jo(t.alternate,e);break;case"CallExpression":t.arguments.forEach((t=>{jo(t,e)}))}}function Po(t){return"url"===t.type||"color"===t.type?{type:"string",value:t.value}:t}function So(t){return t.toISOString().replace("T"," ").replace(/\.\d{3}Z$/,"")}function Do(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 So(t.value);if("color"===t.type)return Bo(Oo(t.value));if("url"===t.type)return t.value;throw new Error("Unexpected type ".concat(t.type))}function Fo(t){let e=Do(t);return"string"===t.type&&(e="'"+e.replace(/\\/g,"\\'").replace(/'/g,"\\'")+"'"),e}function zo(t){return"datetime"===t?"DateTime":t.charAt(0).toUpperCase()+t.substring(1)}const Mo=new Int32Array(1);function No(t){return Mo[0]=t,Mo[0]}function To(t){if(t<wi||t>2147483647)throw new Error("Integer overflow.")}function Io(t){const e=[];return jo(t,{Variable(t){e.push(t.id.name)}}),e}function Jo(t,e){throw new Error("Failed to evaluate [".concat(t,"]. ").concat(e))}function Oo(t){const e=Ut(t);if(e)return e;throw new Error("Unable to convert value to Color, expected format #AARRGGBB.")}function Bo(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 Rt(Math.round(t).toString(16),2)})).join("").toUpperCase())}function Ro(t){return{type:Ci,value:Do(t)}}function Lo(t){const e=Number(t.value);if(isNaN(e)||!Number.isFinite(e))throw new Error("Unable to convert value to Number.");return{type:Ai,value:e}}function Wo(t,e,n){let r="";const i=t.type===Ci?t.value:Do(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 Uo(t,e,n){const r=Wo(t,e,n);return{type:Ci,value:r+Do(t)}}function qo(t,e,n){const r=Wo(t,e,n);return{type:Ci,value:Do(t)+r}}function Ho(t,e){if(0===e.value)throw new Error("Division by zero is not supported.");let n=t.value/e.value;return t.type===Ei&&(n=No(n)),{type:t.type,value:n}}function Ko(t,e){if(0===e.value)throw new Error("Division by zero is not supported.");let n=t.value%e.value;return t.type===Ei&&(n=No(n)),{type:t.type,value:n}}function Go(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];let r=e.length?e[0].value:0;for(let t=1;t<e.length;++t)r*=e[t].value,e[0].type===Ei&&(r=No(r));return{type:e[0].type,value:r}}function Xo(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];let r=e.length?e[0].value:0;for(let t=1;t<e.length;++t)r-=e[t].value,e[0].type===Ei&&(r=No(r));return{type:e.length?e[0].type:Ei,value:r}}function Yo(){let t=0;for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];for(let e=0;e<n.length;++e)t+=n[e].value,n[0].type===Ei&&(t=No(t));return{type:n.length?n[0].type:Ei,value:t}}function Zo(t){const e=Math.abs(t.value);return t.type===Ei&&To(e),{type:t.type,value:e}}function Qo(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(!e.length)throw new Error("Non empty argument list is required for max function.");return{type:e[0].type,value:Math.max(...e.map((t=>t.value)))}}function ta(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(!e.length)throw new Error("Non empty argument list is required for min function.");return{type:e[0].type,value:Math.min(...e.map((t=>t.value)))}}function ea(t){return{type:t.type,value:Math.sign(t.value)}}function na(t,e){let n;if(0===e.value&&t.type===Ei)n=t.value;else if(0===t.value&&t.type===Ei)n=0;else{let r=Math.sign(e.value);t.type===Ai&&0===r&&(r=Object.is(r,0)?1:-1),n=Math.abs(t.value)*r}return t.type===Ei&&To(n),{type:t.type,value:n}}function ra(t){return e=>{const n=Oo(e.value);return{type:Ai,value:n[t]/255}}}function ia(t){return(e,n)=>{const r=Oo(e.value);return r[t]=255*n.value,{type:ji,value:Bo(r)}}}const oa=ra("a"),aa=ra("r"),la=ra("g"),sa=ra("b"),ca=ia("a"),ua=ia("r"),da=ia("g"),pa=ia("b");function fa(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:Ei,value:r}}function ga(t){return t.map(Fo).join(", ")}Ao("toString",[Ei],Ro),Ao("toString",[Ai],Ro),Ao("toString",[Vi],Ro),Ao("toString",[ji],Ro),Ao("toString",["url"],Ro),Ao("toNumber",[Ei],Lo),Ao("toNumber",[Ci],Lo),Ao("toInteger",[Ai],(function(t){if(t.value>2147483647||t.value<wi)throw new Error("Unable to convert value to Integer.");const e=t.value-t.value%1;return{type:Ei,value:e}})),Ao("toInteger",[Ci],(function(t){const e=Number(t.value);if(isNaN(e)||e%1!=0||e>2147483647||e<wi)throw new Error("Unable to convert value to Integer.");return{type:Ei,value:e}})),Ao("toInteger",[Vi],(function(t){return{type:Ei,value:t.value?1:0}})),Ao("toBoolean",[Ei],(function(t){if(1!==t.value&&0!==t.value)throw new Error("Unable to convert value to Boolean.");return{type:Vi,value:t.value}})),Ao("toBoolean",[Ci],(function(t){if("true"!==t.value&&"false"!==t.value)throw new Error("Unable to convert value to Boolean.");return{type:Vi,value:"true"===t.value?1:0}})),Ao("encodeUri",[Ci],(function(t){try{return{type:Ci,value:encodeURIComponent(t.value)}}catch(t){throw new Error("Unable to encodeUri string.")}})),Ao("decodeUri",[Ci],(function(t){try{return{type:Ci,value:decodeURIComponent(t.value)}}catch(t){throw new Error("Unable to decodeUri string.")}})),Ao("parseUnixTime",[Ei],(function(t){return{type:Pi,value:new Date(1e3*t.value)}})),Ao("nowLocal",[],(function(){return{type:Pi,value:new Date}})),Ao("addMillis",[Pi,Ei],(function(t,e){return{type:Pi,value:new Date(t.value.getTime()+e.value)}})),Ao("setYear",[Pi,Ei],(function(t,e){const n=new Date(t.value);return n.setFullYear(e.value),{type:Pi,value:n}})),Ao("setMonth",[Pi,Ei],(function(t,e){if(e.value<1||e.value>12)throw new Error("Expecting month in [1..12], instead got ".concat(e.value,"."));const n=new Date(t.value);return n.setMonth(e.value-1),{type:Pi,value:n}})),Ao("setDay",[Pi,Ei],(function(t,e){const n=new Date(t.value);if(e.value<=0&&-1!==e.value||e.value>function(t){const e=new Date(t);return e.setMonth(e.getMonth()+1),e.setDate(0),e.getDate()}(n))throw new Error("Unable to set day ".concat(e.value," for date ").concat(Do(t),"."));return n.setDate(-1===e.value?0:e.value),{type:Pi,value:n}})),Ao("setHours",[Pi,Ei],(function(t,e){if(e.value<0||e.value>23)throw new Error("Expecting hours in [0..23], instead got ".concat(e.value,"."));const n=new Date(t.value);return n.setHours(e.value-n.getTimezoneOffset()/60),{type:Pi,value:n}})),Ao("setMinutes",[Pi,Ei],(function(t,e){if(e.value<0||e.value>59)throw new Error("Expecting minutes in [0..59], instead got ".concat(e.value,"."));const n=new Date(t.value);return n.setMinutes(e.value),{type:Pi,value:n}})),Ao("setSeconds",[Pi,Ei],(function(t,e){if(e.value<0||e.value>59)throw new Error("Expecting seconds in [0..59], instead got ".concat(e.value,"."));const n=new Date(t.value);return n.setSeconds(e.value),{type:Pi,value:n}})),Ao("setMillis",[Pi,Ei],(function(t,e){if(e.value<0||e.value>999)throw new Error("Expecting millis in [0..999], instead got ".concat(e.value,"."));const n=new Date(t.value);return n.setMilliseconds(e.value),{type:Pi,value:n}})),Ao("getIntervalSeconds",[Ei],(function(t){return fa(t,1e3,60)})),Ao("getIntervalTotalSeconds",[Ei],(function(t){return fa(t,1e3)})),Ao("getIntervalMinutes",[Ei],(function(t){return fa(t,6e4,60)})),Ao("getIntervalTotalMinutes",[Ei],(function(t){return fa(t,6e4)})),Ao("getIntervalHours",[Ei],(function(t){return fa(t,36e5,24)})),Ao("getIntervalTotalHours",[Ei],(function(t){return fa(t,36e5)})),Ao("getIntervalTotalDays",[Ei],(function(t){return fa(t,864e5)})),Ao("getIntervalTotalWeeks",[Ei],(function(t){return fa(t,6048e5)})),Ao("len",[Ci],(function(t){return{type:Ei,value:t.value.length}})),Ao("contains",[Ci,Ci],(function(t,e){return{type:Vi,value:t.value.includes(e.value)?1:0}})),Ao("substring",[Ci,Ei,Ei],(function(t,e,n){if(n.value<e.value)throw new Error("Indexes should be in ascending order.");if(e.value<0||e.value>t.value.length||n.value<0||n.value>t.value.length)throw new Error("Indexes are out of bounds.");return{type:Ci,value:t.value.substring(e.value,n.value)}})),Ao("replaceAll",[Ci,Ci,Ci],(function(t,e,n){let r;return r=e.value?t.value.replace(new RegExp(function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(e.value),"g"),n.value):t.value,{type:Ci,value:r}})),Ao("index",[Ci,Ci],(function(t,e){return{type:Ei,value:t.value.indexOf(e.value)}})),Ao("lastIndex",[Ci,Ci],(function(t,e){return{type:Ei,value:t.value.lastIndexOf(e.value)}})),Ao("trim",[Ci],(function(t){return{type:Ci,value:t.value.trim()}})),Ao("trimLeft",[Ci],(function(t){return{type:Ci,value:t.value.replace(/^\s+/,"")}})),Ao("trimRight",[Ci],(function(t){return{type:Ci,value:t.value.replace(/\s+$/,"")}})),Ao("toUpperCase",[Ci],(function(t){return{type:Ci,value:t.value.toUpperCase()}})),Ao("toLowerCase",[Ci],(function(t){return{type:Ci,value:t.value.toLowerCase()}})),Ao("padStart",[Ci,Ei,Ci],Uo),Ao("padStart",[Ei,Ei,Ci],Uo),Ao("padEnd",[Ci,Ei,Ci],qo),Ao("padEnd",[Ei,Ei,Ci],qo),Ao("div",[Ei,Ei],Ho),Ao("div",[Ai,Ai],Ho),Ao("mod",[Ei,Ei],Ko),Ao("mod",[Ai,Ai],Ko),Ao("mul",[{type:Ei,isVararg:!0}],Go),Ao("mul",[{type:Ai,isVararg:!0}],Go),Ao("sub",[{type:Ei,isVararg:!0}],Xo),Ao("sub",[{type:Ai,isVararg:!0}],Xo),Ao("sum",[{type:Ei,isVararg:!0}],Yo),Ao("sum",[{type:Ai,isVararg:!0}],Yo),Ao("abs",[Ei],Zo),Ao("abs",[Ai],Zo),Ao("max",[{type:Ei,isVararg:!0}],Qo),Ao("max",[{type:Ai,isVararg:!0}],Qo),Ao("min",[{type:Ei,isVararg:!0}],ta),Ao("min",[{type:Ai,isVararg:!0}],ta),Ao("maxNumber",[],(function(){return{type:Ai,value:xi}})),Ao("minNumber",[],(function(){return{type:Ai,value:ki}})),Ao("maxInteger",[],(function(){return{type:Ei,value:2147483647}})),Ao("minInteger",[],(function(){return{type:Ei,value:wi}})),Ao("round",[Ai],(function(t){const e=Math.sign(t.value);return{type:Ai,value:e*Math.round(Math.abs(t.value))}})),Ao("floor",[Ai],(function(t){return{type:Ai,value:Math.floor(t.value)}})),Ao("ceil",[Ai],(function(t){return{type:Ai,value:Math.ceil(t.value)}})),Ao("signum",[Ai],ea),Ao("signum",[Ei],ea),Ao("copySign",[Ai,Ai],na),Ao("copySign",[Ei,Ei],na),Ao("getColorAlpha",[Ci],oa),Ao("getColorAlpha",[ji],oa),Ao("getColorRed",[Ci],aa),Ao("getColorRed",[ji],aa),Ao("getColorGreen",[Ci],la),Ao("getColorGreen",[ji],la),Ao("getColorBlue",[Ci],sa),Ao("getColorBlue",[ji],sa),Ao("setColorAlpha",[Ci,Ai],ca),Ao("setColorAlpha",[ji,Ai],ca),Ao("setColorRed",[Ci,Ai],ua),Ao("setColorRed",[ji,Ai],ua),Ao("setColorGreen",[Ci,Ai],da),Ao("setColorGreen",[ji,Ai],da),Ao("setColorBlue",[Ci,Ai],pa),Ao("setColorBlue",[ji,Ai],pa),Ao("rgb",[Ai,Ai,Ai],(function(t,e,n){const r={a:255,r:255*t.value,g:255*e.value,b:255*n.value};return{type:ji,value:Bo(r)}})),Ao("argb",[Ai,Ai,Ai,Ai],(function(t,e,n,r){const i={a:255*t.value,r:255*e.value,g:255*n.value,b:255*r.value};return{type:ji,value:Bo(i)}}));const ha={StringLiteral:function(t,e){return{type:Ci,value:e.value}},NumberLiteral:function(t,e){return{type:Ai,value:e.value}},IntegerLiteral:function(t,e){return{type:Ei,value:e.value}},BooleanLiteral:function(t,e){return{type:Vi,value:e.value?1:0}},UnaryExpression:function(t,e){const n=Po(ma(t,e.argument));switch(e.operator){case"!":if(n.type===Vi)return{type:Vi,value:n.value?0:1};Jo("".concat(e.operator).concat(Fo(n)),"A Boolean is expected after a unary not.");case"+":case"-":const t="+"===e.operator?1:-1;if(n.type===Ei)return{type:Ei,value:n.value*t};if(n.type===Ai)return{type:Ai,value:n.value*t};Jo("".concat(e.operator).concat(Fo(n)),"A Number is expected after a unary ".concat("+"===e.operator?"plus":"minus","."))}},ConditionalExpression:function(t,e){const n=Po(ma(t,e.test));if(n.type===Vi)return n.value?ma(t,e.consequent):ma(t,e.alternate);Jo("".concat(Fo(n)," ? ").concat(Fo(ma(t,e.consequent))," : ").concat(Fo(ma(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 ma(t,e.expressions[0]);for(let r=0;r<e.expressions.length;++r)n+=e.quasis[r].value,n+=Do(ma(t,e.expressions[r]));return n+=e.quasis[e.quasis.length-1].value,{type:Ci,value:n}},LogicalExpression:function(t,e){const n=Po(ma(t,e.left));if(n.type!==Vi&&Jo("".concat(Fo(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:Vi,value:0};const r=Po(ma(t,e.right));return r.type!==Vi&&Jo("".concat(Fo(n)," ").concat(e.operator," ").concat(Fo(r)),"Operator '".concat(e.operator,"' cannot be applied to different types: Boolean and ").concat(zo(r.type),".")),{type:Vi,value:r.value}},BinaryExpression:function(t,e){const n=e.operator,r=ma(t,e.left),i=ma(t,e.right);if(r.type!==i.type&&Jo("".concat(Fo(r)," ").concat(e.operator," ").concat(Fo(i)),"Operator '".concat(n,"' cannot be applied to different types: ").concat(zo(r.type)," and ").concat(zo(i.type),".")),"=="===n||"!="===n)return function(t,e,n){let r;return r=e.type===Pi&&n.type===Pi?e.value.getTime()===n.value.getTime():e.value===n.value,"!="===t&&(r=!r),{type:Vi,value:r?1:0}}(n,r,i);if(">"===n||">="===n||"<"===n||"<="===n)return function(t,e,n){let r;e.type!==Ai&&e.type!==Ei&&e.type!==Pi&&Jo("".concat(Fo(e)," ").concat(t," ").concat(Fo(n)),"Operator '".concat(t,"' cannot be applied to ").concat(zo(e.type)," type."));const i=e.type===Pi?e.value.getTime():e.value,o=n.type===Pi?n.value.getTime():n.value;return r=">"===t?i>o:">="===t?i>=o:"<"===t?i<o:i<=o,{type:Vi,value:r?1:0}}(n,r,i);if("+"===n||"-"===n)return function(t,e,n){if(e.type!==Ci&&e.type!==Ai&&e.type!==Ei&&Jo("".concat(Fo(e)," ").concat(t," ").concat(Fo(n)),"Operator '".concat(t,"' cannot be applied to ").concat(zo(e.type)," type.")),e.type===Ci)return"-"===t&&Jo("".concat(Fo(e)," - ").concat(Fo(n)),"Operator '".concat(t,"' cannot be applied to ").concat(zo(e.type)," type.")),{type:Ci,value:e.value+n.value};let r="+"===t?e.value+n.value:e.value-n.value;return e.type===Ei&&(r=No(r)),{type:e.type,value:r}}(n,r,i);if("/"===n||"*"===n||"%"===n)return function(t,e,n){let r;if(e.type!==Ei&&e.type!==Ai&&Jo("".concat(Fo(e)," ").concat(t," ").concat(Fo(n)),"Operator '".concat(t,"' cannot be applied to ").concat(zo(e.type)," type.")),"*"===t)r=e.value*n.value;else{if("/"!==t&&"%"!==t)throw new Error("Unsupported operation ".concat(t));0===n.value&&Jo("".concat(Fo(e)," ").concat(t," ").concat(Fo(n)),"Division by zero is not supported."),r="/"===t?e.value/n.value:e.value%n.value}return e.type===Ei&&(r=No(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;if(!Co.has(n))throw new Error("Unknown function name: ".concat(n,"."));let r;const i=e.arguments.map((e=>ma(t,e))),o=n+":"+i.map((t=>t.type)).join("#");if(Eo.has(o))r=Eo.get(o);else{const t=function(t,e){const n=Co.get(t);if(!n)throw new Error("Missing function");let r=null;for(let t=0;t<n.length;++t){const i=Vo(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){const e=i.map((t=>zo(t.type))).join(", "),r="".concat(n,"(").concat(ga(i),")");"few"===t.type&&0===i.length?Jo(r,"Non empty argument list is required for function '".concat(n,"'.")):(t.type,Jo(r,"Function '".concat(n,"' has no matching override for given argument types: ").concat(e,".")))}r=t}if(!r)throw new Error("Function not found");try{return r.cb(...i)}catch(t){Jo("".concat(n,"(").concat(ga(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,"' has value null"))}};function ma(t,e){if(e.type in ha)return ha[e.type](t,e);throw new Error("Unsupported expression")}function va(t,e){try{return ma(t,e)}catch(t){return{type:"error",value:t.message}}}class ya{constructor(t){this.ast=t}apply(t,e){if(!function(t,e){let n=!1;return jo(t,{Variable(t){e.has(t.id.name)||(n=!0)}}),n}(this.ast,t))try{const n=va(t,this.ast);if("error"===n.type)return void e(Nt(new Error("Expression execution error"),{additional:{message:n.value}}));const r=n.value;if(r instanceof Date)return So(r);if("boolean"===n.type)return Boolean(r);if("color"===n.type){const t=Ut(String(r));if(t)return Bo(t);e(Nt(new Error("Expression execution error")))}return r}catch(t){return void e(Nt(new Error("Expression execution error")))}}}function $a(t,e,n){if(t)if("string"==typeof t){if((r=t).indexOf("@{")>-1||r.indexOf("\\")>-1){e.hasExpression=!0;try{const n=ko(t,{startRule:"JsonStringContents"}),r=Io(n);return e.vars.push(...r),new ya(n)}catch(e){return void n(Nt(new Error("Unable to parse expression"),{additional:{expression:t}}))}}}else{if(Array.isArray(t))return t.map((t=>$a(t,e,n)));if("object"==typeof t){const r={};for(const i in t)r[i]=$a(t[i],e,n);return r}}var r;return t}function _a(t,e,n){if(t){if(t instanceof ya)return t.apply(e,n);if(Array.isArray(t))return t.map((t=>_a(t,e,n)));if("object"==typeof t){const r={};for(const i in t)r[i]=_a(t[i],e,n);return r}}return t}function ba(t,e){const n={vars:[],hasExpression:!1},r=$a(t,n,e);return{vars:[...new Set(n.vars)],hasExpression:n.hasExpression,applyVars:t=>_a(r,t,e)}}const wa={pagers:function(){return Ft(new Map)}},xa=new Map,ka=new Map;function Ca(t){const e=xa.get(t)||Ft("");return xa.has(t)||xa.set(t,e),e}function Ea(t){const e=ka.get(t)||new Map;return ka.has(t)||ka.set(t,e),e}class Aa{setVariable(t){const e=t.getName(),n=Ea(this);if(n.has(e))throw new Error("Variable with the same name already exist");n.set(e,t),Ca(this).set(e)}getVariable(t){return Ea(this).get(t)}}function Va(){return new Aa}function ja(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Pa=new Set(["start","stop","pause","resume","cancel","reset"]);class Sa{constructor(t){ja(this,"timers",new Map),ja(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(Nt(new Error("Misconfigured timer"),{additional:{id:t.id}})):this.logError(Nt(new Error("Missing timer id")))}execTimerAction(t,e){if(!(t&&e&&this.timers.has(t)&&Pa.has(e)))return void this.logError(Nt(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"))}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),this.stop(t)}),Math.max(0,e-(t.durationPassed||0))));const n=t.tick;if(n){const e=()=>{t.tickStarted=performance.now(),t.tickTimeout=window.setTimeout((()=>{this.tickOrUnholdAction(t),t.tickPassed=0,e()}),Math.max(0,n-(t.tickPassed||0)))};e()}}start(t){if("running"===t.state)return void this.logError(Nt(new Error("The timer is already running")));if("paused"===t.state)return void this.logError(Nt(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(Nt(new Error("Incorrect timer properties"),{additional:{id:t.definition.id}})):this.startOrResume(t)):this.logError(Nt(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(Nt(new Error("The timer has already been stopped")))}pause(t){if("stopped"===t.state)return void this.logError(Nt(new Error("The timer has already been stopped")));if("paused"===t.state)return void this.logError(Nt(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(Nt(new Error("The timer is already running"))):this.logError(Nt(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 Da(t){let e,n,r,i,o,a,l,s;return n=new fo({props:{svgFiltersMap:t[2]}}),i=new ro({props:{div:t[6],templateContext:t[5]}}),{c(){e=F("div"),At(n.$$.fragment),r=N(),At(i.$$.fragment),J(e,"class",o="divkit-b023c"+(t[3]?" ".concat("divkit-ee112"):"")+(t[0]?" ".concat(t[0]):""))},m(t,o){P(t,e,o),Vt(n,e,null),A(e,r),Vt(i,e,null),a=!0,l||(s=I(e,"touchstart",za,{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]):"")))&&J(e,"class",o)},i(t){a||($t(n.$$.fragment,t),$t(i.$$.fragment,t),a=!0)},o(t){_t(n.$$.fragment,t),_t(i.$$.fragment,t),a=!1},d(t){t&&S(e),jt(n),jt(i),l=!1,s()}}}function Fa(t){let e,n,r=!t[1]&&t[6]&&Da(t);return{c(){r&&r.c(),e=T()},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]&&$t(r,1)):(r=Da(t),r.c(),$t(r,1),r.m(e.parentNode,e)):r&&(vt(),_t(r,1,1,(()=>{r=null})),yt())},i(t){n||($t(r),n=!0)},o(t){_t(r),n=!1},d(t){r&&r.d(t),t&&S(e)}}}function za(){}function Ma(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:p=new Aa}=e,{mix:f=""}=e,{customization:h={}}=e,{builtinProtocols:m=["http","https","tel","mailto","intent"]}=e,{onError:v}=e,{onStat:y}=e,{onCustomAction:$}=e,{onComponent:_}=e,b=Ft("desktop"===u);if(g(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 C=new Set(m);let E=!1;c||(E=!0,T(Nt(new Error('"json" prop is required')))),s||(E=!0,T(Nt(new Error('"id" prop is required'))));let A=function(t){if(!t)return Nt(new Error("Missing object"));const e=t.card,n=t.templates||{};if(!e)return Nt(new Error("Missing card"));if(!e.states||!e.states.length)return Nt(new Error("Missing states"));for(const t in n)if(n.hasOwnProperty(t)&&t in Qi)return Nt(new Error("Template name collision"),{additional:{templateName:t}});for(let t=0;t<e.states.length;++t){if(!e.states[t].div)return Nt(new Error("Missing state div"),{additional:{stateId:e.states[t].state_id}});if("number"!=typeof e.states[t].state_id)return Nt(new Error("Missing state_id"),{additional:{index:t}})}return null}(c);const V=c.templates||{};A&&(E=!0,T(A));const j={stateChange:!1},P=Ca(p),S=Ea(p),D=new Map,F=new Map,z=new Map;let M=null;function N(t){const e=ba(t,T);return e.vars.length?e.applyVars(F):t}function T(t){v?v({error:t}):"warn"===(null==t?void 0:t.level)?console.warn(t):console.error(t)}function I(t,e){y&&y({type:t,action:e})}let J=0;function O(t){return"".concat(s,"-").concat(J++)}let B={},R={};function L(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=Z,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):T(Nt(new Error("Cannot find variable"),{additional:{name:n}}))}else T(Nt(new Error("Incorrect set_variable_action"),{additional:{url:t}}));break;case"timer":const o=r.get("action"),a=r.get("id");M?M.execTimerAction(a,o):T(Nt(new Error("Incorrect timer action"),{additional:{id:a,action:o}}));break;default:T(Nt(new Error("Unknown type of action"),{additional:{url:e}}))}}catch(t){T(Nt(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=Qt(i);if(t)if(te(t,C)){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?(L(r),await lt()):r.log_id&&(U(r),await lt())}}t.forEach((t=>{t.log_id&&I("click",t)}))}}function U(t){null==$||$(t)}const q=new Map;function H(t){if(q.has(t))return q.get(t);T(Nt(new Error("Missing instance with id"),{additional:{id:t}}))}const K=new Map;function G(t){for(const e of t)F.has(e)&&t.delete(e);return t}Y(Mt,{logError:T,logStat:I,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}=go(t,e,V,T)),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:L,execAnyActions:W,execCustomAction:U,isRunning:function(t){return j[t]},setRunning:function(t,e){j[t]=e},registerInstance:function(t,e){q.has(t)?T(Nt(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||!R[t])return;const r="".concat(t,":").concat(e);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 mo(t);const e=ba(t,T);return e.vars.length?zt(e.vars.map((t=>F.get(t)||function(t){const e=z.get(t)||Ft(void 0);return z.has(t)||z.set(t,e),e}(t))).filter(Ht),(()=>e.applyVars(F))):e.hasExpression?mo(e.applyVars(F)):mo(t)},getJsonWithVars:N,getStore:function(t){return K.has(t)||function(t){K.has(t)||K.set(t,wa[t]())}(t),K.get(t)},getVariable:function(t,e){const n=F.get(t);if(n){const r=n.getType();if(r!==e)return void T(Nt(new Error('Variable should have type "'.concat(e,'"')),{additional:{name:t,foundType:r}}))}return n},getCustomization:function(t){return null==h?void 0:h[t]},getBuiltinProtocols:function(){return C},isDesktop:b,registerComponent:void 0,unregisterComponent:void 0}),Y(ve,{hasAction:()=>!1});const Z={setState(t){throw new Error("Not implemented")},getChild(t){if(Q&&Q.has(t))return Q.get(t);T(Nt(new Error("Missing state block with id"),{additional:{id:t}}))}};let Q=null;Y(re,{registerInstance(t,e){Q||(Q=new Map),Q.has(t)?T(Nt(new Error("Duplicate state with id"),{additional:{id:t}})):Q.set(t,e)},unregisterInstance(t){null==Q||Q.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 tt=null===(i=null==c?void 0:c.card)||void 0===i?void 0:i.variables;Array.isArray(tt)&&tt.forEach((t=>{if(t&&t.type in Di&&t.name){if(D.has(t.name))return void T(Nt(new Error("Duplicate variable"),{additional:{name:t.name}}));try{const e=Fi(t.name,t.type,t.value);D.set(t.name,e),F.set(t.name,e)}catch(e){T(Nt(e,{additional:{name:t.name}}))}}}));const et=c.palette;et&&et[w].forEach((t=>{if(D.has(t.name))T(Nt(new Error("Duplicate variable"),{additional:{name:t.name}}));else try{const e=Fi(t.name,"color",t.color);D.set(t.name,e),F.set(t.name,e)}catch(e){T(Nt(e,{additional:{name:t.name}}))}}));for(const[t,e]of S)F.has(t)||F.set(t,e);P.subscribe((t=>{if(t&&!F.has(t)){const e=S.get(t);F.set(t,e);const n=z.get(t);if(n){let t=0;e.subscribe((()=>{n.set(++t)}))}}}));const nt=null===(o=null==c?void 0:c.card)||void 0===o?void 0:o.variable_triggers;Array.isArray(nt)&&nt.forEach((t=>{let e=!1;if("string"!=typeof t.condition)return void T(Nt(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=ko(t.condition,{startRule:"JsonStringContents"}),i=Io(r);if(!i.length)return void T(Nt(new Error("variable_trigger must have variables in the condition"),{additional:{condition:t.condition}}));(function(t){const e=new Set(t);return G(e),e.size?new Promise((t=>{const n=P.subscribe((()=>{G(e),e.size||(n(),t())}))})):Promise.resolve()})(i).then((()=>{zt(i.map((t=>F.get(t))).filter(Ht),(()=>va(F,r))).subscribe((r=>{"error"!==r.type?(r.value&&("on_variable"===n||"on_condition"===n&&!1===e)&&t.actions.forEach((t=>{const e=N(t);e.log_id&&L(e)})),e=Boolean(r.value)):T(Nt(new Error("variable_trigger condition execution error"),{additional:{message:r.value}}))}))}))}catch(e){T(Nt(new Error("Unable to parse variable_trigger"),{additional:{condition:t.condition}}))}else T(Nt(new Error("variable_trigger has an unsupported mode"),{additional:{mode:n}}))}));const rt=null===(a=null==c?void 0:c.card)||void 0===a?void 0:a.timers;if(rt){const t=M=new Sa({logError:T,applyVars:N,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):T(Nt(new Error("Cannot find variable"),{additional:{name:t}}))},execAnyActions:W});rt.forEach((e=>t.createTimer(e)))}const it=null===(l=null==c?void 0:c.card)||void 0===l?void 0:l.states,ot=it&&!E?{type:"state",id:"root",width:{type:"match_parent"},height:{type:"match_parent"},states:it.map((t=>({state_id:t.state_id.toString(),div:t.div})))}:void 0;return X((()=>{M&&M.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,p=t.globalVariablesController),"mix"in t&&n(0,f=t.mix),"customization"in t&&n(12,h=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"):T(Nt(new Error("Unsupported theme")))),8388608&t.$$.dirty[0]&&w&&et&&et[w].forEach((t=>{const e=F.get(t.name);e&&e.setValue(t.color)}))},[f,E,B,r,b,{},ot,d,s,c,u,p,h,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()},L,w,x]}const Na=class extends St{constructor(t){super(),Pt(this,t,Ma,Fa,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 Ta(t){return new Na({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 Ia=e.M,Ja=e.Os,Oa=e.sY;export{Ia as createGlobalVariablesController,Ja as createVariable,Oa as render};
|
|
2
2
|
//# sourceMappingURL=client.mjs.map
|