!function(){var e=function e(t,r){return Object.prototype.hasOwnProperty.call(t,r)},t=function e(t,r){for(r.forEach((function(e,r){var n=t.children[r];n!==e&&t.insertBefore(e,n||null)}));t.children.length>r.length;)t.removeChild(t.children[r.length])},r=function e(t,r,n){n?t.classList.add(r):t.classList.remove(r)},n={x:"scrollLeft",y:"scrollTop"},o=function e(t,r,o,i){void 0===i&&(i=!1);var a=n[r];t[a]!==o&&(i?(t.style.scrollBehavior="auto",t[a]=o,t.style.scrollBehavior=""):t[a]=o)},i=function e(t){var r=parseFloat(window.getComputedStyle(t).getPropertyValue("--t-zero-gallery-parent-zoom"));return r>0?r:1},a=function e(t){var r=parseFloat(window.getComputedStyle(t).getPropertyValue("--zoom"));return r>0?r:1},l={prev_slide:{EN:"Previous slide",RU:"Предыдущий слайд",FR:"Diapositive précédente",DE:"Vorherige Folie",ES:"Diapositiva anterior",PT:"Slide anterior",UK:"Попередній слайд",JA:"前のスライド",ZH:"上一张幻灯片",PL:"Poprzedni slajd",KK:"Алдыңғы слайд",IT:"Diapositiva precedente",LV:"Iepriekšējais slaids"},next_slide:{EN:"Next slide",RU:"Следующий слайд",FR:"Diapositive suivante",DE:"Nächste Folie",ES:"Diapositiva siguiente",PT:"Próximo slide",UK:"Наступний слайд",JA:"次のスライド",ZH:"下一张幻灯片",PL:"Następny slajd",KK:"Келесі слайд",IT:"Diapositiva successiva",LV:"Nākamais slaids"},slide_of:{EN:"Slide {index} of {count}",RU:"Слайд {index} из {count}",FR:"Diapositive {index} sur {count}",DE:"Folie {index} von {count}",ES:"Diapositiva {index} de {count}",PT:"Slide {index} de {count}",UK:"Слайд {index} з {count}",JA:"スライド {index} / {count}",ZH:"第 {index} 张幻灯片,共 {count} 张",PL:"Slajd {index} z {count}",KK:"Слайд {index} / {count}",IT:"Diapositiva {index} di {count}",LV:"Slaids {index} no {count}"},play_video:{EN:"Play video",RU:"Воспроизвести видео",FR:"Lire la vidéo",DE:"Video abspielen",ES:"Reproducir vídeo",PT:"Reproduzir vídeo",UK:"Відтворити відео",JA:"動画を再生",ZH:"播放视频",PL:"Odtwórz wideo",KK:"Бейнені ойнату",IT:"Riproduci video",LV:"Atskaņot video"},carousel:{EN:"carousel",RU:"карусель",FR:"carrousel",DE:"Karussell",ES:"carrusel",PT:"carrossel",UK:"карусель",JA:"カルーセル",ZH:"轮播",PL:"karuzela",KK:"карусель",IT:"carosello",LV:"karuselis"},slide:{EN:"slide",RU:"слайд",FR:"diapositive",DE:"Folie",ES:"diapositiva",PT:"slide",UK:"слайд",JA:"スライド",ZH:"幻灯片",PL:"slajd",KK:"слайд",IT:"diapositiva",LV:"slaids"}},s="EN",u=function e(t){var r,n=window.lang;if("edit"===t&&n)return n.toUpperCase();var o=document.getElementById("allrecords"),i=o?o.getAttribute("data-tilda-project-lang"):null;if(i)return i.toUpperCase();var a,l=window.navigator,u;return(l.language||l.userLanguage||"").slice(0,2).toUpperCase()||s},c=function t(r,n,o){void 0===o&&(o={});var i=l[r],a,c;return(i[u(n)]||i[s]).replace(/\{(\w+)\}/g,(function(t,r){return e(o,r)?String(o[r]):t}))},d="http://www.w3.org/2000/svg",f={1:["M39 68L60 47L39 26"],2:["M63 47.917H30","M46.917 64L63 47.917L46.917 31.834"]},g={near:"before",above:"before",in:"overlay",under:"after"},p=function e(t,r){for(;t.firstChild;)t.removeChild(t.firstChild);var n=document.createElementNS(d,"svg");n.setAttribute("class","t-zero-gallery__arrow-svg"),n.setAttribute("viewBox","0 0 94 94"),n.setAttribute("focusable","false"),n.setAttribute("aria-hidden","true"),f[r].forEach((function(e){var t=document.createElementNS(d,"path");t.setAttribute("class","t-zero-gallery__arrow-path"),t.setAttribute("d",e),t.setAttribute("vector-effect","non-scaling-stroke"),n.appendChild(t)})),t.appendChild(n)},h=function e(t,n){var o=t.navigation,i=n,a=null,l=document.createElement("div"),s=function e(r){var n=document.createElement("button");n.type="button",n.className="t-zero-gallery__arrow t-zero-gallery__arrow_"+r,n.setAttribute("aria-label",c("prev"===r?"prev_slide":"next_slide",t.options.mode));var i=document.createElement("span");return i.className="t-zero-gallery__arrow-icon",n.appendChild(i),l.appendChild(n),t.disposer.listen(n,"click",(function(e){e.preventDefault(),"prev"===r?o.prev():o.next()})),{button:n,icon:i}},u=s("prev"),d=s("next"),f=function e(t,n){r(t,"t-zero-gallery__arrow_hidden",!n),t.disabled=!n},h=function e(){var n=t.items()[o.index()];r(l,"t-zero-gallery__arrows_passthrough",!!n&&t.isVideoOpen(n.id))},y=function e(t,r,n){t===r&&r.disabled&&!n.disabled&&n.focus()},m=function e(){var t=document.activeElement;f(u.button,o.canPrev()),f(d.button,o.canNext()),y(t,u.button,d.button),y(t,d.button,u.button),h()},v=function e(){var r="none"===i.slds_arrowcontrols?"near":i.slds_arrowcontrols,n=["t-zero-gallery__arrows","t-zero-gallery__arrows_"+r,"t-zero-gallery__arrows_align_"+i.slds_arrowalign];i.slds_arrowbordersize>0&&n.push("t-zero-gallery__arrows_border"),l.className=n.join(" "),a!==i.slds_arrowtype&&(a=i.slds_arrowtype,p(u.icon,a),p(d.icon,a));var o=t.slots[g[r]];l.parentNode!==o&&o.appendChild(l),m()},_=o.onChange(m),b=t.onVideoOpenChange(h);return v(),{update:function e(t){i=t,v()},setItems:v,destroy:function e(){_(),b(),l.parentNode&&l.parentNode.removeChild(l)}}},y="[t-zero-gallery]",m=function e(t){return console.warn(y+" "+t)},v=/^var\(\s*--[\w-]+\s*,\s*([\s\S]*)\)$/,_=/^-?(\d+\.?\d*|\.\d+)$/,b=function e(t){var r=t.trim(),n=v.exec(r);return n?b(n[1]):r},w=function e(t){return void 0===t&&(t={}),function(e){var r=b(e);if(""!==r){var n=parseFloat(r);if(isFinite(n)&&(t.integer&&(n=Math.round(n)),!(void 0!==t.min&&nt.max)))return n}}},z=function e(t){return function(e){var r=e.trim();return-1!==t.indexOf(r)?r:void 0}},k=function e(t){return"y"===t.trim()},x=function e(t){var r=t.trim();return r&&!/[;{}]/.test(r)?r:void 0},E=function e(t){var r,n=b(t).split(/[:/]/);if(!(n.length>2)){var o=parseFloat(n[0]),i=2===n.length?parseFloat(n[1]):1;if(!(!isFinite(o)||!isFinite(i)||o<=0||i<=0))return o/i}},C=function e(t,r){var n=t.trim();return r&&_.test(n)?""+n+r:n},O=function e(t,r,n){if(void 0===n&&(n=m),void 0===r)return{value:t.default,valid:!0};var o=t.parse(r);return void 0!==o?{value:o,valid:!0}:""===r.trim()?{value:t.default,valid:!0}:(n('invalid value "'+r+'" for field "'+t.key+'", default is used'),{value:t.default,valid:!1})},A=function e(t,r,n){var o=void 0!==r&&""!==r.trim();return C(n&&o?r:String(t.default),t.cssUnit)},S=function e(t,r,n){void 0===n&&(n=m);var o={},i={},a=[];return Object.keys(t).forEach((function(e){var l=t[e],s=r[l.key],u=O(l,s,n);o[e]=u.value,u.valid||a.push(l.key),l.css&&(i[l.css]=A(l,s,u.valid))})),{settings:o,cssVars:i,invalidKeys:a}},N={s:30,m:40,l:45,xl:50},M=function e(t,r,n){return{key:t,parse:w({min:0}),default:r,css:n,cssUnit:"px"}},I={slds_arrowcontrols:{key:"slds_arrowcontrols",parse:z(["near","in","above","under","none"]),default:"near"},slds_arrowalign:{key:"slds_arrowalign",parse:z(["left","center","right"]),default:"center"},slds_arrowsize:{key:"slds_arrowsize",parse:z(["s","m","l","xl"]),default:"s"},slds_arrowtype:{key:"slds_arrowtype",parse:z(["1","2"]),default:"1"},slds_arrowlinesize:M("slds_arrowlinesize",1,"--t-zero-gallery-arrow-line"),slds_arrowcolor:{key:"slds_arrowcolor",parse:x,default:"#222"},slds_arrowcolorhover:{key:"slds_arrowcolorhover",parse:x,default:""},slds_arrowbgcolor:{key:"slds_arrowbgcolor",parse:x,default:""},slds_arrowbgopacity:{key:"slds_arrowbgopacity",parse:w({min:0,max:1}),default:1},slds_arrowbgcolorhover:{key:"slds_arrowbgcolorhover",parse:x,default:""},slds_arrowbgopacityhover:{key:"slds_arrowbgopacityhover",parse:w({min:0,max:1}),default:1},slds_arrowbordersize:M("slds_arrowbordersize",0,"--t-zero-gallery-arrow-border-width"),slds_arrowbordercolor:{key:"slds_arrowbordercolor",parse:x,default:"#222",css:"--t-zero-gallery-arrow-border-color"},slds_arrowbordercolorhover:{key:"slds_arrowbordercolorhover",parse:x,default:""},slds_arrowborderradius:M("slds_arrowborderradius",30,"--t-zero-gallery-arrow-border-radius"),slds_arrowhmargin:M("slds_arrowhmargin",30,"--t-zero-gallery-arrow-hmargin"),slds_arrowvmargin:M("slds_arrowvmargin",10,"--t-zero-gallery-arrow-vmargin"),slds_arrowbetweenmargin:M("slds_arrowbetweenmargin",10,"--t-zero-gallery-arrow-between")},L=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i,P=function e(t,r){if(!t)return"transparent";var n=L.exec(b(t));if(!n)return t;var o=n[1];3===o.length&&(o=o.replace(/(.)/g,"$1$1"));var i=parseInt(o,16);return"rgba("+(i>>16&255)+", "+(i>>8&255)+", "+(255&i)+", "+r+")"},j,F={id:"arrows",schema:I,requires:["navigation"],isEnabled:function e(t){return"none"!==t.slds_arrowcontrols},cssVars:function e(t){var r=t.slds_arrowbgcolorhover||t.slds_arrowbgcolor;return{"--t-zero-gallery-arrow-size":N[t.slds_arrowsize]+"px","--t-zero-gallery-arrow-color":t.slds_arrowcolor,"--t-zero-gallery-arrow-color-hover":t.slds_arrowcolorhover||t.slds_arrowcolor,"--t-zero-gallery-arrow-bg":P(t.slds_arrowbgcolor,t.slds_arrowbgopacity),"--t-zero-gallery-arrow-bg-hover":P(r,t.slds_arrowbgopacityhover),"--t-zero-gallery-arrow-border-color-hover":t.slds_arrowbordercolorhover||t.slds_arrowbordercolor}},create:h},T=.7,V=function e(t,r,n){if(n<=0)return t;var o=Math.floor(r*T/n);return o>=t?t:o<1?1:o%2==0?o-1:o},R=function e(t,r,n){var o=t-Math.floor(n/2);return Math.max(0,Math.min(r-n,o))},D=function e(t,r,n,o){var i={},a=r+n-1,l=r>0,s=a5||5===n&&l!==s,c=function e(r,n){r!==t&&"primary"!==i[r]&&(i[r]=n)};return l&&(c(r,"primary"),u&&c(r+1,"secondary")),s&&(c(a,"primary"),u&&c(a-1,"secondary")),i},H="t-zero-gallery__dots_overflow",U="t-zero-gallery__dot_fade-primary",K="t-zero-gallery__dot_fade-secondary",W="--t-zero-gallery-dots-visible-count",q=function e(n,i){var a=n.navigation,l=i,s=[],u=Number.POSITIVE_INFINITY,d=!1,f=null,g=!1,p=document.createElement("div"),h=document.createElement("div");h.className="t-zero-gallery__dots-viewport",p.appendChild(h);var y=function e(){var t=document.createElement("button");t.type="button",t.className="t-zero-gallery__dot";var r=document.createElement("span");return r.className="t-zero-gallery__dot-body",t.appendChild(r),t},m=function e(t){s.forEach((function(e,n){r(e,U,"primary"===t[n]),r(e,K,"secondary"===t[n])}))},v=function e(t){var n,i=(t||{}).isInstant,l=void 0!==i&&i,c=s.length;if(r(p,H,d=un+o?r-o:n},J=function e(t,r,n,o,i){var a=t.start;r&&(a=r.start);var l=t.end;return n&&(l=n.end),l-a>i?X(t.start,t.end,o,i):X(a,l,o,i)},Z=function n(i,a){var l=i.navigation,s=a,u={},d=[],f=document.createElement("div"),g=document.createElement("div");g.className="t-zero-gallery__thumbs-list",f.appendChild(g);var p=function e(){return/(left|right)$/.test(s.gallery_thumbs_position)},h=function e(){var t=l.index(),r=d[t];if(r){var n=p(),i=function e(t){var r=n?t.offsetTop:t.offsetLeft;return{start:r,end:r+(n?t.offsetHeight:t.offsetWidth)}},a=function e(t){return d[t]?i(d[t]):null},s=J(i(r),a(t-1),a(t+1),n?g.scrollTop:g.scrollLeft,n?g.clientHeight:g.clientWidth);o(g,n?"y":"x",s)}},y=function e(){var t=l.index();d.forEach((function(e,n){var o=n===t;r(e,"t-zero-gallery__thumb_active",o),o?e.setAttribute("aria-current","true"):e.removeAttribute("aria-current")})),h()},m=function e(t,r){var n=r.image?r.image.src:"",o=n+"|"+(r.video?"video":"")+"|"+(i.isLazy()?"lazy":"");if(t.signature!==o){t.signature=o,t.element.className=r.video?"t-zero-gallery__thumb t-zero-gallery__thumb_video":"t-zero-gallery__thumb";var a=document.createElement("div");a.className="t-zero-gallery__thumb-media",n&&i.setImage(a,n),t.element.firstChild?t.element.replaceChild(a,t.element.firstChild):t.element.appendChild(a)}},v=function t(r){if(e(u,r.id))return u[r.id];var n=document.createElement("button");return n.type="button",{element:n,signature:""}},_=function e(){var r=i.items(),n=r.length,o={};d=r.map((function(e,t){var r=v(e);return m(r,e),r.element.setAttribute("aria-label",c("slide_of",i.options.mode,{index:t+1,count:n})),o[e.id]=r,r.element})),u=o,t(g,d),y()},b=function e(){var t=s.gallery_thumbs_position,r=0===t.indexOf("in-"),n=r?t.slice(3):t,o=["t-zero-gallery__thumbs","t-zero-gallery__thumbs_"+n,"t-zero-gallery__thumbs_align_"+s.gallery_thumbs_align];r&&o.push("t-zero-gallery__thumbs_in"),f.className=o.join(" ");var a=r?i.slots.overlay:i.slots.aside;f.parentNode!==a&&a.appendChild(f),i.setRootModifier("aside",r?null:n)};i.disposer.listen(f,"click",(function(e){var t=e.target.closest(".t-zero-gallery__thumb"),r=d.indexOf(t);-1!==r&&(e.preventDefault(),l.goTo(r))}));var w=l.onChange(y);return b(),_(),{update:function e(t){s=t,b(),_()},setItems:_,relayout:h,destroy:function e(){w(),f.parentNode&&f.parentNode.removeChild(f)}}},Y=function e(t,r,n){return{key:t,parse:w({min:0}),default:r,css:n,cssUnit:"px"}},G,Q,ee,te=[F,{id:"dots",schema:B,requires:["navigation"],isEnabled:function e(t){return"none"!==t.slds_dotscontrols},create:q},{id:"thumbnails",schema:{gallery_thumbs_position:{key:"gallery_thumbs_position",parse:z(["none","top","right","bottom","left","in-top","in-right","in-bottom","in-left"]),default:"none"},gallery_thumbs_width:Y("gallery_thumbs_width",60,"--t-zero-gallery-thumb-width"),gallery_thumbs_ratio:{key:"gallery_thumbs_ratio",parse:E,default:1},gallery_thumbs_align:{key:"gallery_thumbs_align",parse:z(["start","center","end"]),default:"center"},gallery_thumbs_bordercolor:{key:"gallery_thumbs_bordercolor",parse:x,default:"transparent",css:"--t-zero-gallery-thumb-border-color"},gallery_thumbs_bordersize:Y("gallery_thumbs_bordersize",0,"--t-zero-gallery-thumb-border-width"),gallery_thumbs_borderradius:Y("gallery_thumbs_borderradius",0,"--t-zero-gallery-thumb-radius"),gallery_thumbs_activebordercolor:{key:"gallery_thumbs_activebordercolor",parse:x,default:""},gallery_thumbs_activebordersize:{key:"gallery_thumbs_activebordersize",parse:w({min:0}),default:null},gallery_thumbs_margin:Y("gallery_thumbs_margin",10,"--t-zero-gallery-thumb-margin"),gallery_thumbs_gap:Y("gallery_thumbs_gap",10,"--t-zero-gallery-thumb-gap")},uses:["lazyoff"],requires:["navigation"],isEnabled:function e(t){return"none"!==t.gallery_thumbs_position},cssVars:function e(t){var r={"--t-zero-gallery-thumb-ratio":String(t.gallery_thumbs_ratio)};return t.gallery_thumbs_activebordercolor&&(r["--t-zero-gallery-thumb-active-border-color"]=t.gallery_thumbs_activebordercolor),null!==t.gallery_thumbs_activebordersize&&(r["--t-zero-gallery-thumb-active-border-width"]=t.gallery_thumbs_activebordersize+"px"),r},create:Z}],re=["http","https"],ne=/^([a-z][a-z0-9+.-]*):/,oe=function e(t){return t.split("").filter((function(e){var t=e.charCodeAt(0);return t>32&&127!==t})).join("")},ie=function e(t){var r=ne.exec(oe(t).toLowerCase());return r?r[1]:null},ae=function e(t){if("string"!=typeof t)return null;var r=t.trim();if(!r)return null;var n=ie(r);return n&&-1===re.indexOf(n)?null:r},le=["javascript","data","vbscript"],se=function e(t){if("string"!=typeof t)return null;var r=t.trim();if(!r)return null;var n=ie(r);return n&&-1!==le.indexOf(n)?null:r},ue=[["li_vimeo","vimeo"],["li_youtube","youtube"],["li_mp4","mp4"],["li_webm","webm"],["li_rutube","rutube"],["li_vkvideo","vkvideo"],["li_kinescope","kinescope"],["li_iframe","iframe"]],ce=["mp4","webm","iframe"],de=function e(t){return"string"==typeof t?t:"number"==typeof t&&isFinite(t)?String(t):""},fe=function e(t){var r=parseFloat(de(t));return isFinite(r)&&r>0?r:null},ge=function e(t,r,n){var o=de(t.li_img).trim();if(!o)return null;var i=ae(o);return i?{src:i,alt:de(t.li_imgalt),width:fe(t.li_imgwidth),height:fe(t.li_imgheight)}:(n('item "'+r+'": unsafe image url is ignored'),null)},pe=function e(t,r,n){var o=ue.find((function(e){return""!==de(t[e[0]]).trim()}));if(!o)return null;var i=o[1],a=de(t[o[0]]).trim(),l;if(-1!==ce.indexOf(i)){var s=ae(a);if(!s)return n('item "'+r+'": unsafe '+i+" url is ignored"),null;a=s}return{type:i,id:a,hash:de(t.li_hash).trim()||null}},he=function e(t,r,n){var o=de(t.li_imgurl).trim();if(!o)return null;var i=se(o);return i?{href:i,blank:!!t.li_imgtarget,nofollow:!!t.li_imgnofollow}:(n('item "'+r+'": unsafe link url is ignored'),null)},ye=function e(t){return Object.keys(t).every((function(e){return!t[e]}))},me=/^feeds:/,ve=function t(r,n){if(void 0===n&&(n=m),void 0===r||""===r.trim()||me.test(r.trim()))return{ok:!0,items:[]};var o;try{o=JSON.parse(r)}catch(l){return n('field "imgs" contains invalid JSON'),{ok:!1,items:[]}}if(!Array.isArray(o))return n('field "imgs" must be a JSON array'),{ok:!1,items:[]};var i={},a=[];return o.forEach((function(t,r){if(t&&"object"==typeof t&&!Array.isArray(t)){var o=t;if(!ye(o)){for(var l=de(o.lid).trim()||"idx-"+r,s=l,u=2;e(i,s);u++)s=l+"-"+u;i[s]=!0;var c=pe(o,s,n);a.push({id:s,image:ge(o,s,n),video:c,caption:de(o.li_imgtitle),link:c?null:he(o,s,n)})}}else n("imgs["+r+"] is not an object, skipped")})),{ok:!0,items:a}},_e=["fill","hug","fixed"],be=["under","above","in"],we=["always","hover"],ze=["none","switch"],ke=["none","click","hover"],xe=function e(t){return"y"===t.trim()?"click":z(ke)(t)},Ee=function e(t,r,n){return{key:t,parse:w({min:0}),default:r,css:n,cssUnit:"px"}},Ce=["slds_captiontopmargin","slds_captionwidth","gallery_captionposition","gallery_captionbordersize","gallery_captionpaddingtop","gallery_captionpaddingright","gallery_captionpaddingbottom","gallery_captionpaddingleft"],Oe={gallery_gap:{key:"gallery_gap",parse:w({min:0}),default:0,css:"--t-zero-gallery-gap",cssUnit:"px"},gallery_columns:{key:"gallery_columns",parse:w({min:1,integer:!0}),default:3,css:"--t-zero-gallery-columns"},gallery_radius:{key:"gallery_radius",parse:w({min:0}),default:0,css:"--t-zero-gallery-radius",cssUnit:"px"},borderradius:{key:"borderradius",parse:x,default:""},widthmode:{key:"widthmode",parse:z(_e),default:"fixed"},heightmode:{key:"heightmode",parse:z(_e),default:"fixed"},slds_stretch:{key:"slds_stretch",parse:x,default:"cover"},slds_imgposition:{key:"slds_imgposition",parse:x,default:"center center"},slds_imgposition_imgpos:{key:"slds_imgposition_imgpos",parse:x,default:"50%,50%"},slds_imgposition_imgsize:{key:"slds_imgposition_imgsize",parse:x,default:""},slds_playiconsize:{key:"slds_playiconsize",parse:w({min:0}),default:70,css:"--t-zero-gallery-play-size",cssUnit:"px"},slds_playiconcolor:{key:"slds_playiconcolor",parse:x,default:"#fff",css:"--t-zero-gallery-play-color"},zoomable:{key:"zoomable",parse:xe,default:"none"},lazyoff:{key:"lazyoff",parse:k,default:!1},slds_captiontopmargin:{key:"slds_captiontopmargin",parse:w(),default:20,css:"--t-zero-gallery-caption-margin",cssUnit:"px"},slds_captionwidth:{key:"slds_captionwidth",parse:w({min:0,max:100}),default:80,css:"--t-zero-gallery-caption-width",cssUnit:"%"},gallery_captionposition:{key:"gallery_captionposition",parse:z(be),default:"under"},gallery_captionshow:{key:"gallery_captionshow",parse:z(we),default:"always"},gallery_captionbgcolor:{key:"gallery_captionbgcolor",parse:x,default:"transparent",css:"--t-zero-gallery-caption-bg"},gallery_captionbordercolor:{key:"gallery_captionbordercolor",parse:x,default:"transparent",css:"--t-zero-gallery-caption-border-color"},gallery_captionbordersize:Ee("gallery_captionbordersize",0,"--t-zero-gallery-caption-border-width"),gallery_captionborderradius:Ee("gallery_captionborderradius",0,"--t-zero-gallery-caption-radius"),gallery_captionpaddingtop:Ee("gallery_captionpaddingtop",0,"--t-zero-gallery-caption-padding-top"),gallery_captionpaddingright:Ee("gallery_captionpaddingright",0,"--t-zero-gallery-caption-padding-right"),gallery_captionpaddingbottom:Ee("gallery_captionpaddingbottom",0,"--t-zero-gallery-caption-padding-bottom"),gallery_captionpaddingleft:Ee("gallery_captionpaddingleft",0,"--t-zero-gallery-caption-padding-left"),gallery_imghover:{key:"gallery_imghover",parse:z(ze),default:"none"}},Ae=/^(-?(?:\d+\.?\d*|\.\d+))(?:px)?$/,Se=function e(t){return t.trim().split(/\s+/).map((function(e){return e.replace(Ae,"calc($1px * var(--zoom, 1))")})).join(" ")},Ne=function e(t){var r=t.slds_imgposition,n=t.slds_stretch;if("custom"===r){var o=t.slds_imgposition_imgpos.split(",").map((function(e){return e.trim()})),i,a;r=(o[0]||"50%")+" "+(o[1]||"50%");var l=parseFloat(t.slds_imgposition_imgsize.split(",")[0]);isFinite(l)&&(n=l+"%")}return{"--t-zero-gallery-image-position":r,"--t-zero-gallery-image-size":n,"--t-zero-gallery-border-radius":Se(t.borderradius)}},Me=["grid","carousel","masonry","ticker","justified"],Ie="carousel",Le=/-res-\d+$/,Pe=function e(t){return Le.test(t)},je=function e(t,r,n){void 0===n&&(n=m);var o={},i=[];return Object.keys(t).forEach((function(e){Pe(e)?i.push(e):o[e]=t[e]})),i.length&&"edit"===r&&n("responsive keys are ignored: "+i.join(", ")),o},Fe=function e(t,r,n,o){void 0===o&&(o=m);var i=(t||"").trim();return i&&-1!==Me.indexOf(i)&&r.getLayout(i)?i:(i&&"edit"===n&&o('unknown gallery_layout "'+t+'", "'+Ie+'" is used'),Ie)},Te=function e(t){var r=t.warn||m,n=t.registry,o=t.mode,i=je(t.raw,o,r),a=[],l=S(Oe,i,r),s=Object.assign({},l.cssVars,Ne(l.settings)),u=Fe(i.gallery_layout,n,o,r),c=n.getLayout(u),d={},f={};if(c){var g=S(c.schema,i,r);d=g.settings,Object.assign(s,g.cssVars),c.cssVars&&Object.assign(s,c.cssVars(g.settings)),c.controls.forEach((function(e){var t=n.getControl(e);if(t){var o=S(t.schema,i,r);f[e]=o.settings,Object.assign(s,o.cssVars),t.cssVars&&Object.assign(s,t.cssVars(o.settings))}}))}var p=ve(i.imgs,r);return p.ok||a.push("imgs"),{model:{items:p.items,common:l.settings,layout:{type:u,settings:d},controls:f},cssVars:s,brokenKeys:a}},Ve=function t(r,n){var o=Object.assign({},r),i=[];return Object.keys(n).forEach((function(t){var r=n[t];if(void 0!==r){if(null===r){if(!e(o,t))return;return delete o[t],void i.push(t)}e(o,t)&&o[t]===r||(o[t]=r,i.push(t))}})),{next:o,changedKeys:i}},Re=function t(r,n){var o=[];return Object.keys(r).forEach((function(t){e(n,t)&&n[t]===r[t]||o.push(t)})),Object.keys(n).forEach((function(t){e(r,t)||o.push(t)})),o},De=["imgs","gallery_layout"],He=function e(t){return"layout"===t.kind||"control"===t.kind?t.kind+":"+t.id:t.kind},Ue=function e(t,r){return Object.keys(r).map((function(e){return{owner:t,key:r[e].key,definition:r[e]}}))},Ke=function e(t){var r=De.map((function(e){return{owner:{kind:"core"},key:e,definition:null}}));return r=r.concat(Ue({kind:"common"},Oe)),t.layouts.forEach((function(e){r=r.concat(Ue({kind:"layout",id:e.type},e.schema))})),t.controls.forEach((function(e){r=r.concat(Ue({kind:"control",id:e.id},e.schema))})),r},We=function t(r,n){void 0===n&&(n=function e(t){return console.error(t)});var o={},i={},a,l;return Ke(r).forEach((function(t){e(o,t.key)?n('[t-zero-gallery] field "'+t.key+'" is declared by '+He(t.owner)+", already owned by "+He(o[t.key])):(o[t.key]=t.owner,t.definition&&(i[t.key]=t.definition))})),{ownerOf:function t(r){return e(o,r)?o[r]:void 0},definitionOf:function t(r){return e(i,r)?i[r]:void 0},getLayout:function e(t){return r.layouts.find((function(e){return e.type===t}))},getControl:function e(t){return r.controls.find((function(e){return e.id===t}))},keys:function e(){return Object.keys(o)}}},qe="t-zero-gallery__item_zoomed",Be="t-zero-gallery__item",$e="t-zero-gallery__item_video",Xe=function e(t,r){for(var n=t;n&&n!==r;){var o;if(null!=(o=n.classList)&&o.contains(Be))return n;n=n.parentNode}return null},Je=function e(t){return Math.max(0,Math.min(100,t))},Ze=function e(t){var r=t.root,n=t.disposer,o=t.isEnabled,i=null,a=null,l=null,s=0,u=0,c=function e(){l&&(l(),l=null),i&&i.classList.remove(qe),i=null,a=null},d=function e(){if(l=null,i&&a){var t=a.getBoundingClientRect();t.width&&t.height&&(i.style.setProperty("--t-zero-gallery-hover-x",Je((s-t.left)/t.width*100)+"%"),i.style.setProperty("--t-zero-gallery-hover-y",Je((u-t.top)/t.height*100)+"%"))}},f=function e(t){var n=Xe(t,r);if(!n||n.classList.contains($e))return null;var o=n.querySelector(".t-zero-gallery__content");return null!=o&&o.contains(t)?n:null};return n.listen(r,"pointermove",(function(e){var t=e;if("mouse"===t.pointerType&&o()){var r=f(t.target);if(r!==i&&c(),r){if(s=t.clientX,u=t.clientY,!i)return i=r,a=r.querySelector(".t-zero-gallery__content"),d(),void r.classList.add(qe);l||(l=n.animationFrame(d))}}else c()})),n.listen(r,"pointerleave",c),n.add(c),{reset:c}},Ye=/]+)\1>(.*?)<\/span>/g,Ge=/<span data-replace-key=(["'])([^"'&<>]+)\1>(.*?)<\/span>/g,Qe=function e(t){return t.replace(/&/g,"&").replace(//g,">")},et=function e(t,r){t.innerHTML=Qe(r).replace(Ge,'$3')},tt=function e(t){return t.replace(Ye,"$3")},rt=function e(t){return!!t.image&&!t.link&&!t.video},nt="http://www.w3.org/2000/svg",ot=function e(t){return'url("'+t.replace(/["\\\n\r\f]/g,(function(e){return encodeURIComponent(e)}))+'")'},it="M30 60C46.569 60 60 46.569 60 30C60 13.431 46.569 0 30 0C13.431 0 0 13.431 0 30C0 46.569 13.431 60 30 60ZM24 20L41 30.5L24 41V20Z",at=function e(t){if(-1===t.indexOf("https://static.tildacdn.")||-1!==t.indexOf(".svg"))return t;var r=t.lastIndexOf("/")+1;return t.slice(0,r)+"-/resize/20x/"+t.slice(r)},lt=function e(t){var r;t?((r=document.createElement("button")).setAttribute("type","button"),r.setAttribute("aria-label",c("play_video","published")),r.className="t-zero-gallery__play t-zero-gallery__play_button"):((r=document.createElement("span")).setAttribute("aria-hidden","true"),r.className="t-zero-gallery__play");var n=document.createElementNS(nt,"svg");n.setAttribute("viewBox","0 0 60 60"),n.setAttribute("focusable","false");var o=document.createElementNS(nt,"path");return o.setAttribute("d",it),o.setAttribute("fill-rule","evenodd"),o.setAttribute("class","t-zero-gallery__play-icon"),n.appendChild(o),r.appendChild(n),r},st=function e(t,r){t.classList.add("t-zero-gallery__content_zoomable"),t.setAttribute("data-img-zoom-url",r.image?r.image.src:"");var n=tt(r.caption);n&&t.setAttribute("data-img-zoom-title",n)},ut=function e(t,r,n){n?(t.classList.add("t-bgimg"),t.setAttribute("data-original",r),t.style.backgroundImage=ot(at(r))):t.style.backgroundImage=ot(r)},ct=function e(t,r,n){var o=t.link,i=t.image,a=t.video,l;if(o){var s=document.createElement("a");s.href=o.href;var u=[];o.blank&&(s.target="_blank",u.push("noopener")),o.nofollow&&u.push("nofollow"),u.length&&(s.rel=u.join(" ")),l=s}else l=document.createElement("div");var c=["t-zero-gallery__content"];o&&c.push("t-zero-gallery__link"),l.className=c.join(" "),r.zoomable&&rt(t)&&st(l,t);var d=document.createElement("div");return d.className="t-zero-gallery__media",i&&(ut(d,i.src,r.lazy),i.alt&&(d.setAttribute("role","img"),d.setAttribute("aria-label",i.alt))),l.appendChild(d),a&&l.appendChild(lt(n)),l},dt=function e(t){var r=document.createElement("figcaption");r.className="t-zero-gallery__caption";var n=document.createElement("div");n.className="t-zero-gallery__caption-wrapper";var o=document.createElement("div");return o.className="t-zero-gallery__caption-title",et(o,t),n.appendChild(o),r.appendChild(n),r},ft=function t(r){void 0===r&&(r={});var n=!!r.playable,o={},i=function e(t,o,i){for(;t.firstChild;)t.removeChild(t.firstChild);t.className=o.video?"t-zero-gallery__item t-zero-gallery__item_video":"t-zero-gallery__item",t.appendChild(ct(o,i,n)),o.caption&&t.appendChild(dt(o.caption)),r.onFill&&r.onFill()},a,l;return{render:function t(r,n){void 0===n&&(n={});var a={zoomable:!!n.zoomable,lazy:!!n.lazy},l=JSON.stringify(r)+"|"+(a.zoomable?"zoomable":"")+"|"+(a.lazy?"lazy":""),s=e(o,r.id)?o[r.id]:null;if(s&&s.signature===l)return s.element;var u=s?s.element:document.createElement("figure");return u.setAttribute("data-item-id",r.id),i(u,r,a),o[r.id]={element:u,signature:l},u},retain:function t(r){var n={};r.forEach((function(t){e(o,t)&&(n[t]=o[t])})),o=n},destroy:function e(){o={}}}},gt={},pt=function e(t){var r={size:null,done:!1,listeners:[]};gt[t]=r;var n=new Image,o=function e(t){n.onload=null,n.onerror=null,r.size=t,r.done=!0;var o=r.listeners;r.listeners=[],o.forEach((function(e){return e()}))};return n.onload=function(){var e=n.naturalWidth,t=n.naturalHeight;o(e>0&&t>0?{width:e,height:t}:null)},n.onerror=function(){return o(null)},n.src=t,r},ht=function t(){var r=[],n=!1,o=null,i=function e(t){if(!n&&!r.some((function(e){return e.entry===t}))){var i=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){r=r.filter((function(e){return e.callback!==i})),o&&o()}));t.listeners.push(i),r.push({entry:t,callback:i})}};return{get:function t(r){var n=e(gt,r)?gt[r]:pt(r);return n.done?n.size:(i(n),null)},onMeasured:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){o=e})),destroy:function e(){n=!0,r.forEach((function(e){var t=e.entry,r=e.callback,n=t.listeners.indexOf(r);-1!==n&&t.listeners.splice(n,1)})),r=[]}}},yt=16/9,mt=function e(t,r){void 0===r&&(r=null);var n=t.image;return null!=n&&n.width&&n.height?n.width/n.height:n&&r?r.width/r.height:!n&&t.video?yt:1},vt="t-zero-gallery__item_video-open",_t="t-zero-gallery__frame",bt=["mp4","webm"],wt={youtube:{origin:"https://www.youtube.com",message:'{"event":"command","func":"pauseVideo","args":""}'},vimeo:{origin:"https://player.vimeo.com",message:'{"method":"pause","value":"true"}'}},zt=function e(t){return encodeURIComponent(t)},kt=function e(t){var r=t.closest("a[href]");if(r){var n=r.getAttribute("href");r.removeAttribute("href"),window.setTimeout((function(){return r.setAttribute("href",n)}),0)}},xt=function e(t){var r=zt(t.id),n=t.hash?zt(t.hash):"",o;if("vimeo"===t.type)return"https://player.vimeo.com/video/"+r+"?h="+n+"&api=1&autoplay=1";if("youtube"===t.type)return"https://www.youtube.com/embed/"+r+"?autoplay=1&enablejsapi=1";if("rutube"===t.type)return"https://rutube.ru/play/embed/"+r+(n?"?p="+n+"&autoplay=true":"?autoplay=true");if("vkvideo"===t.type){var i=t.id.split("_"),a,l,s;return"https://vkvideo.ru/video_ext.php?oid="+zt(i[0]||"")+"&id="+zt(i[1]||"")+(i[2]?"&hash="+zt(i[2]):"")+"&autoplay=1&js_api=1"}return"kinescope"===t.type?"https://kinescope.io/embed/"+r+"?autoplay=1":t.id},Et=function e(t){if(-1!==bt.indexOf(t.type)){var r=document.createElement("video");return r.className="t-zero-gallery__video",r.setAttribute("controls","controls"),r.setAttribute("autoplay","autoplay"),r.setAttribute("playsinline","playsinline"),r.src=xt(t),r}var n=document.createElement("iframe");return n.className="t-zero-gallery__iframe",n.setAttribute("allow","autoplay"),n.setAttribute("allowfullscreen",""),n.src=xt(t),n},Ct=function e(t){var r=t;return!!r&&"function"==typeof r.closest&&!!r.closest("."+_t)},Ot=function e(t){var r=t.querySelectorAll("."+_t);Array.prototype.forEach.call(r,(function(e){e.parentNode&&e.parentNode.removeChild(e)}));var n=t.querySelectorAll("."+vt);Array.prototype.forEach.call(n,(function(e){e.classList.remove(vt)}))},At=function e(t){var r=t.root,n=t.disposer,o=t.enabled,i=t.isWholeItemPlayable,a=t.getItem,l=[],s=!1,u=[],c=[],d=function e(t,r){return t.push(r),function(){var e=t.indexOf(r);-1!==e&&t.splice(e,1)}},f=function e(){return c.slice().forEach((function(e){return e()}))},g=function e(){var t=l.some((function(e){return e.playing}));t!==s&&(s=t,u.slice().forEach((function(e){return e(s)})))},p=function e(t,r){t.playing=r,g()},h=function e(t){t.release.forEach((function(e){return e()})),t.release=[],t.frame.parentNode&&t.frame.parentNode.removeChild(t.frame),t.figure.classList.remove(vt),l=l.filter((function(e){return e!==t})),g(),f()},y=function e(t){var r=t.player;if("VIDEO"===r.tagName)return r.pause(),void p(t,!1);var n=wt[t.type],o=r.contentWindow;if(n&&o)return o.postMessage(n.message,n.origin),void p(t,!1);h(t)},m=function e(t,r){var o=t.querySelector(".t-zero-gallery__content");if(o){var i=document.createElement("div");i.className=_t;var a=Et(r);i.appendChild(a);var s={figure:t,frame:i,player:a,type:r.type,playing:!1,release:[]};"VIDEO"===a.tagName?(s.release.push(n.listen(a,"play",(function(){return p(s,!0)}))),s.release.push(n.listen(a,"pause",(function(){return p(s,!1)}))),s.release.push(n.listen(a,"ended",(function(){return p(s,!1)})))):s.playing=!0,o.appendChild(i),t.classList.add(vt),l.push(s),g(),f()}},v=function e(t){return null!==t.frame.parentNode&&t.figure.contains(t.frame)},_=function e(){l.filter((function(e){return!v(e)})).forEach(h)};return o&&(n.listen(r,"click",(function(e){var t=e.target,n=null!=t&&t.closest?t.closest(".t-zero-gallery__play"):null,o=!n&&i()&&null!=t&&t.closest?t.closest(".t-zero-gallery__item"):null,s=n?n.closest(".t-zero-gallery__item"):o;if(s&&r.contains(s)){var u=a(s.getAttribute("data-item-id")||"");if(null!=u&&u.video){var c=l.some((function(e){return e.figure===s&&v(e)}));o&&c||(e.preventDefault(),c||m(s,u.video))}}})),n.listen(r,"click",(function(e){var t=e.target,n=null!=t&&t.closest?t.closest("."+_t):null;n&&r.contains(n)&&kt(n)}))),{stopAll:function e(){_(),l.slice().forEach(y)},prune:_,isPlaying:function e(){return s},onPlayingChange:function e(t){return d(u,t)},isOpen:function e(t){return l.some((function(e){return e.figure.getAttribute("data-item-id")===t&&v(e)}))},onOpenChange:function e(t){return d(c,t)},destroy:function e(){u.length=0,c.length=0,l.slice().forEach(h)}}},St=function e(){},Nt=function e(t){try{t()}catch(r){console.error(r)}},Mt=function e(){var t=[],r=!1,n=function e(r){var n=t.indexOf(r);-1!==n&&t.splice(n,1)},o=function e(r){var o=!1,i=function e(){o||(o=!0,Nt(r))},a;return t.push(i),{release:function e(){n(i),i()},forget:function e(){return n(i)}}},i=function e(t){return r?(Nt(t),St):o(t).release},a=function e(t,n,o,a){return r?St:(t.addEventListener(n,o,a),i((function(){return t.removeEventListener(n,o,a)})))},l,s=function e(t,n){if(r)return St;var o=window.setInterval(t,n);return i((function(){return window.clearInterval(o)}))},u,c=function e(t){return i((function(){return t.disconnect()}))},d;return{add:i,listen:a,timeout:function e(t,n){if(r)return St;var i=null,a=window.setTimeout((function(){i&&i.forget(),t()}),n);return(i=o((function(){return window.clearTimeout(a)}))).release},interval:s,animationFrame:function e(t){if(r)return St;var n=null,i=window.requestAnimationFrame((function(e){n&&n.forget(),t(e)}));return(n=o((function(){return window.cancelAnimationFrame(i)}))).release},observe:c,dispose:function e(){var n;r||(r=!0,t.splice(0,t.length).reverse().forEach((function(e){return e()})))},isDisposed:function e(){return r}}},It=function e(){var t={},r,n,o;return{on:function e(r,n){var o;return(t[r]||(t[r]=[])).push(n),function(){var e=t[r];if(e){var o=e.indexOf(n);-1!==o&&e.splice(o,1)}}},emit:function e(r,n){var o=t[r];o&&o.slice().forEach((function(e){try{e(n)}catch(t){console.error(t)}}))},clear:function e(){t={}}}},Lt=function e(t,r){var n=null,o=function e(){n=null,t()},i,a=function e(){if(n){var t=n;n=null,t()}},l;return{schedule:function e(){n||r.isDisposed()||(n=r.animationFrame(o))},flush:function e(){n&&(a(),t())},cancel:a,isPending:function e(){return null!==n}}},Pt=["widthmode","heightmode"],jt=.5,Ft=["border-width","border-style","border-color","border-radius","box-shadow","transition"],Tt="t-zero-gallery-edit-frame",Vt=function e(t){var r=document.createElement("div");return r.className=t,r},Rt=function e(t,r){return Math.abs(t.width-r.width)0},ae=function e(){return _.children.length?{width:Math.max(0,h.offsetWidth-m.offsetWidth),height:Math.max(0,h.offsetHeight-m.offsetHeight)}:{width:0,height:0}},le=function e(){var t;if(null==(t=C)||!t.getOverhang)return{above:0,below:0};var r=C.getOverhang(),n=ae().height,o=h.classList.contains("t-zero-gallery_aside_top")?n:0,i=h.classList.contains("t-zero-gallery_aside_bottom")?n:0;return{above:Math.max(0,r.above-o),below:Math.max(0,r.below-i)}},se=function e(){var t=le();h.style.setProperty("--t-zero-gallery-overhang-above",t.above+"px"),h.style.setProperty("--t-zero-gallery-overhang-below",t.below+"px")},ue=function e(){var t=le(),r=t.above;Array.prototype.forEach.call(y.children,(function(e){r=Math.max(r,-e.offsetTop)}));var n=t.below+b.offsetHeight;return{height:r+m.offsetHeight+ae().height+n,above:r,below:n}},ce=function e(){se();var t=ue(),r=M,n;r&&["height","above","below"].every((function(e){return Math.abs(r[e]-t[e])=jt?i={axis:"y",content:t.height,container:r.height}:"hug"!==k.widthmode&&t.width-r.width>=jt&&(i={axis:"x",content:t.width,container:r.width}),i.axis!==N&&(N=i.axis,f.emit("overflow",i)),ce()}},fe=Lt((function(){C&&(C.relayout(),Object.keys(A).forEach((function(e){var t=A[e];null!=t&&t.instance.relayout&&t.instance.relayout()})),de())}),d);P.onMeasured((function(){return fe.schedule()}));var ge=function e(t,r,n){var a;try{a=Te({raw:t,mode:u,registry:o,warn:c})}catch(g){return c("config is not applied: "+String(g)),!1}var l=a.brokenKeys.filter((function(e){return-1!==r.indexOf(e)}));if(!n&&l.length)return c("invalid "+l.join(", ")+", previous state is kept"),!1;var s=!z||z.layout.type!==a.model.layout.type;w=t,z=a.model;var d=i[z.layout.type];k=d?J(d,z.common):z.common,V&&!T()&&V.reset(),Z(a.cssVars),Y();var f=!0;return n||s||!C?ne(re()):f=ie(r),te()&&(f=!0),f&&fe.schedule(),D(),U(),!0},pe=function e(){var r=function e(){return fe.schedule()};if("function"==typeof ResizeObserver){var n=new ResizeObserver(r);n.observe(t),d.observe(n)}else d.listen(window,"resize",r)},he=function e(){t.classList.add(Tt),d.add((function(){return t.classList.remove(Tt)}));var r=function e(){Ft.forEach((function(e){m.style.setProperty(e,t.style.getPropertyValue(e))}))};if(r(),"function"==typeof MutationObserver){var n=new MutationObserver(r);n.observe(t,{attributes:!0,attributeFilter:["style"]}),d.observe(n)}};return ge(Object.assign({},n),[],!0),pe(),"edit"===u&&he(),f.on("change",(function(){F.stopAll(),V&&V.reset(),fe.isPending()||ce()})),{patch:function e(t){if(!I){var r=Ve(w,t),n=r.next,o=r.changedKeys;o.length&&ge(n,o,!1)}},update:function e(t){if(!I){var r=Object.assign({},t),n=Re(w,r);n.length&&ge(r,n,!1)}},refresh:function e(){I||(fe.schedule(),fe.flush())},getFullHeight:function e(){return I?{height:0,above:0,below:0}:(fe.flush(),ue())},on:function e(t,r){return I?function(){}:f.on(t,r)},destroy:function e(){I||(I=!0,fe.cancel(),re(),F.destroy(),P.destroy(),p.destroy(),d.dispose(),f.clear(),h.parentNode&&h.parentNode.removeChild(h))},isConnected:function e(){return!I&&document.documentElement.contains(h)},warn:c}}},Wt=1e3,qt=2,Bt=function e(t){var r=new WeakMap,n=[],o=null,i=function e(){null!==o&&(window.clearInterval(o),o=null)},a=function e(t){r.get(t.container)===t&&r.delete(t.container);var o=n.indexOf(t);-1!==o&&n.splice(o,1),n.length||i()},l=function e(){n.slice().forEach((function(e){if(e.internal.isConnected())return e.wasConnected=!0,void(e.misses=0);e.wasConnected&&(e.misses+=1,e.misses<2||(e.internal.warn("gallery root was removed from the document without destroy(), destroyed automatically"),e.facade.destroy()))}))},s=function e(){null===o&&(o=window.setInterval(l,Wt))},u,c,d;return{create:function e(o,i,l){var u=r.get(o);u&&(u.internal.warn("gallery already exists on this container, it is destroyed and created again"),u.facade.destroy());var c=t(o,i,l),d={container:o,internal:c,facade:{patch:function e(t){return c.patch(t)},update:function e(t){return c.update(t)},refresh:function e(){return c.refresh()},getFullHeight:function e(){return c.getFullHeight()},on:function e(t,r){return c.on(t,r)},destroy:function e(){a(d),null==d.mountCleanup||d.mountCleanup(),delete d.mountCleanup,c.destroy()}},wasConnected:c.isConnected(),misses:0};return r.set(o,d),n.push(d),s(),d.facade},get:function e(t){var n=r.get(t);return n?n.facade:null},setMountCleanup:function e(t,n){var o=r.get(t);o?(null==o.mountCleanup||o.mountCleanup(),o.mountCleanup=n):n()}}},$t=function e(){return window},Xt=/^data-field-(.+?)(?:-res-\d+)?-value$/,Jt=function e(t){var r={},n=$t().t396_elem__getFieldValue;if("function"!=typeof n)return r;var o={};if(Array.from(t.attributes).forEach((function(e){var i=e.name.match(Xt);if(i){var a=i[1];if(!o[a]){o[a]=!0;var l=n(t,a);null!=l&&(r[a]=l)}}})),!r.imgs){var i=t.querySelector(".tn-atom__slds-imgs-textarea");null!=i&&i.value&&(r.imgs=i.value)}return r},Zt=function e(t){var r=document.getElementById("allrecords");return r&&r.getAttribute(t)||""},Yt=function e(){var t=$t(),r=t.tildamode,n=t.lazy,o,i,a="published";return("edit"===r||"zero"===r||"edit"===Zt("data-tilda-mode"))&&(a="edit"),{mode:a,lazy:"y"===n||"yes"===Zt("data-tilda-lazy")}},Gt=function e(t,r){var n=!!document.querySelector(".t804"),o=!!t&&!!t.textContent&&t.textContent.includes("%%"),i=!!t&&!!t.querySelector("[data-replace-key]"),a=$t().tildamode||Zt("data-tilda-mode"),l;!n||!o||i||a&&"published"!==a?r():document.addEventListener("replacingCompleted",(function(){return r()}),{once:!0})},Qt=function e(t){return t.querySelector(".tn-atom")},er=function e(t){var r=$t(),n=r.t396_elem__getFieldValue,o=r.t396_elem__renderViewOneField;if("function"==typeof n&&"function"==typeof o){var i=n(t,"heightmode"),a=n(t,"widthmode");"hug"!==i&&"hug"!==a||(o(t,"top"),o(t,"left"))}},tr=function e(t){var r=$t(),n=r.tn,o=r.t396__updateAutoHeight,i=t.closest(".t396__artboard"),a;i&&n&&"function"==typeof o&&(n["ab"+i.getAttribute("data-artboard-recid")]&&o(i))},rr=function e(t){if(t.closest("[data-fe-elem-id][data-fe-border-color]")){var r=t.style,n=r.borderColor,o=r.borderWidth,i=r.borderStyle,a=t.querySelector(".t-zero-gallery__stage");if(a){n&&(a.style.borderColor=n);var l=getComputedStyle(a);o&&"0px"===l.borderWidth&&(a.style.borderWidth=o),i&&"none"===l.borderStyle&&(a.style.borderStyle=i)}}},nr=function e(t,r){if(t.closest('[data-fe-role="posts"]')){rr(r);var n=t.closest('[data-fe-role="posts"] > .tn-molecule');n&&n.addEventListener("feeds:draw-posts",(function(){return rr(r)}),{once:!0})}},or=function e(t,r){var n=t.closest(".r");return n||(r?document.getElementById("rec"+r):null)},ir=function e(t,r){if(t.isConnected||!r)return t;var n=t.getAttribute("data-fe-elem-id")||t.getAttribute("data-elem-id");return r.querySelector('.tn-elem[data-fe-elem-id="'+n+'"], .tn-elem[data-elem-id="'+n+'"]')},ar=function e(t,r){var n=$t().t396__isInsideScalableGroup,o=r.style.getPropertyValue("--t-zero-gallery-parent-zoom"),i="function"==typeof n&&n(t),a=i?String(t.scaleFactor||1):"";return i?(r.style.setProperty("--zoom","1"),r.style.setProperty("--t-zero-gallery-parent-zoom",a)):(r.style.removeProperty("--zoom"),r.style.removeProperty("--t-zero-gallery-parent-zoom")),o!==a},lr=function e(t,r,n){var o=t.closest(".t396__artboard");if(!o)return function(){};var i="ab"+o.getAttribute("data-artboard-recid"),a=function e(){var t;return null==(t=$t().tn)||null==(t=t[i])?void 0:t.curResolution},l=a(),s=function e(){if(r.isConnected&&o.contains(r)&&t.contains(r)){var i=ar(t,r),s=a();void 0!==s&&s!==l&&(l=s,n.update(Jt(t))),i&&n.refresh()}};return o.addEventListener("artBoardResized",s),function(){return o.removeEventListener("artBoardResized",s)}},sr=function e(t){var r=t.create,n=t.get,o=t.setMountCleanup,i=function e(t){var i=Qt(t);if(i){var a=Jt(t),l=ar(t,i),s=n(i),u=null!=s?s:r(i,a,Yt());s?(u.update(a),l&&u.refresh()):(u.on("contentresize",(function(){return er(t)})),u.on("fullheightchange",(function(){return tr(t)}))),o(i,lr(t,i,u)),nr(t,i)}};return function(e,t){var r=or(e,t);Gt(r,(function(){var t=ir(e,r);t&&i(t)}))}},ur=function e(t){var r=t.hoverTarget,n=t.viewTarget,o=t.disposer,i=t.tick,a=0,l=null,s=!1,u={},c=function e(){return Object.keys(u).some((function(e){return u[e]}))},d=function e(){l&&(l(),l=null)},f=function e(){d(),a&&!c()&&(l=o.timeout((function(){l=null,i()}),a))},g=function e(t,r){!!u[t]!==r&&(u[t]=r,r?d():f())},p=function e(){if(!s){s=!0;var t=function e(t){return function(e){"mouse"===e.pointerType&&g("hover",t)}};o.listen(r,"pointerenter",t(!0)),o.listen(r,"pointerleave",t(!1));var i=function e(){return g("hidden",document.hidden)};if(o.listen(document,"visibilitychange",i),i(),"function"==typeof IntersectionObserver){var a=new IntersectionObserver((function(e){g("offscreen",!e[e.length-1].isIntersecting)}));a.observe(n),o.observe(a)}}};return{setDelay:function e(t){a=t,t&&p(),f()},start:f,stop:d,setPaused:g}},cr=function e(t,r){return r?t+1:t},dr=function e(t){var r=t.from,n=t.to,o=t.count,i=t.loop,a=t.clones;if(o<2||n===r)return null;if(n>=0&&n0))},gr=.4,pr=.3,hr=function e(t,r,n){return Math.abs(r)>gr?r<0?1:-1:0!==t&&Math.abs(t)>=n*pr?t<0?1:-1:0},yr=function e(t,r){return r.reduce((function(e,r){return Math.max(e,r>0?t/r:0)}),0)},mr=function e(t,r,n){return n<1||r<=0?0:Math.max(0,Math.min(n-1,Math.floor(t/r*n)))},vr=10,_r=100,br=function e(t){var r=t.element,n=t.disposer,o=t.allowMouse,i=t.handlers;if("function"==typeof window.PointerEvent){var a=null,l=!1,s=0,u=0,c=0,d=0,f=0,g=!1,p=function e(){a=null,l=!1};n.listen(r,"pointerdown",(function(e){var t=e;null===a&&t.isPrimary&&("mouse"!==t.pointerType||o&&0===t.button)&&(a=t.pointerId,s=t.clientX,u=t.clientY,c=t.clientX,d=Date.now(),f=0)})),n.listen(r,"pointermove",(function(e){var t=e;if(t.pointerId===a){var n=t.clientX-s;if(!l){var o=t.clientY-u;if(Math.abs(n)Math.abs(n)||!i.start())return void p();l=!0,r.setPointerCapture&&r.setPointerCapture(t.pointerId)}var g=Date.now();g>d&&(f=(t.clientX-c)/(g-d)),c=t.clientX,d=g,i.move(n)}})),n.listen(r,"pointerup",(function(e){var t;e.pointerId===a&&(l&&(g=!0,n.timeout((function(){g=!1}),0),i.end(c-s,Date.now()-d>_r?0:f)),p())})),n.listen(r,"pointercancel",(function(e){e.pointerId===a&&(l&&i.cancel(),p())})),n.listen(r,"click",(function(e){g&&(e.preventDefault(),e.stopPropagation())}),!0),n.listen(r,"dragstart",(function(e){return e.preventDefault()}))}},wr=60,zr=50,kr=20,xr=function e(t){var r=document.createElement("div");return r.className=t,r},Er=function e(t,r){var n;"function"==typeof CustomEvent?n=new CustomEvent(r,{bubbles:!0}):(n=document.createEvent("CustomEvent")).initCustomEvent(r,!0,!0,null),t.dispatchEvent(n)},Cr=function e(){return"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches},Or=function e(n,o,l){var s=n.disposer,u=n.options,d=o,f=l,g=[],p={},h=[],y=0,m=0,v=!1,_=[],b=0,w=1,z=1,k=!1,x=!1,E=[],C=xr("t-zero-gallery__carousel");C.setAttribute("role","region"),C.setAttribute("aria-roledescription",c("carousel",u.mode));var O=xr("t-zero-gallery__track");C.appendChild(O),n.root.insertBefore(C,n.slots.overlay);var A=function e(){return"loop"===d.slds_loop},S=function e(){return"fade"===d.gallery_transition},N=function e(){return!S()&&A()&&g.length>1},M=function e(){return Cr()?0:Math.round(1e3*d.gallery_transition_duration)},I=function e(t,r){if(S())return O.style.transition="",void(O.style.transform="");O.style.transition=t?"transform "+M()+"ms ease-in-out":"none",O.style.transform=void 0===r?"translateX("+100*-m+"%)":"translateX("+(-m*n.getSize().width+r)+"px)"},L=function e(){E.slice().forEach((function(e){return e(y)}))},P=function e(){var t=g[y];t&&n.emit.emit("change",{index:y,id:t.id})},j=function e(){var t=h.length;h.forEach((function(e,n){var o=n===y;r(e,"t-zero-gallery__slide_active",o),e.setAttribute("aria-label",n+1+" / "+t),o?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden","true")}))},F=function e(){var t=_;_=[],t.forEach((function(e){return e()}))},T=function e(t){return r(C,"t-zero-gallery__carousel_moving",t)},V=function e(){F(),v=!1,T(!1)},R=function e(t,r){var n=!1,o=function e(){n||(n=!0,r())};S()||_.push(s.listen(O,"transitionend",(function(e){e.target===O&&o()}))),_.push(s.timeout(o,t+zr))},D=ur({hoverTarget:n.root,viewTarget:n.root,disposer:s,tick:function e(){v?D.start():W(y+1)}});s.add(n.onVideoPlayingChange((function(e){x=e,D.setPaused("video",e)})));var H=function e(){var t="edit"!==u.mode&&g.length>1;D.setDelay(t?1e3*d.slds_autoplay:0)},U=function e(t){V(),null!==t&&(m=t,I(!1),O.offsetWidth),Er(n.root,"tildaSldsMoveSlideEnd"),D.start()},K=function e(t){v=!0,D.stop(),Er(n.root,"tildaSldsMoveSlideStart"),T(!0),y=t.index,m=t.position,j(),L(),P();var r=M();I(r>0),r>0?R(r,(function(){return U(t.wrapTo)})):U(t.wrapTo)},W=function e(t){if(v)return!1;var r=dr({from:y,to:t,count:g.length,loop:A(),clones:N()});return!!r&&(K(r),!0)},q=function e(){v&&(V(),Er(n.root,"tildaSldsMoveSlideEnd")),m=cr(y,N()),I(!1),j()},B=function e(t){var r=t.cloneNode(!0);return r.className="t-zero-gallery__slide t-zero-gallery__slide_clone",r.setAttribute("aria-hidden","true"),r.removeAttribute("aria-label"),Ot(r),r},$=function e(){var n=h;N()&&(n=[B(h[h.length-1])].concat(h,[B(h[0])])),t(O,n),r(C,"t-zero-gallery__carousel_fade",S()),q()},X=function e(t){var r=p[t.id];r||((r=xr("t-zero-gallery__slide")).setAttribute("role","group"),r.setAttribute("aria-roledescription",c("slide",u.mode)));var o=n.renderItem(t);if(r.firstChild!==o||1!==r.childNodes.length){for(;r.firstChild;)r.removeChild(r.firstChild);r.appendChild(o)}return r},J=function e(){return r(C,"t-zero-gallery__carousel_cursor","on"===d.slds_cursorcontrol)},Z=function e(){return C.style.setProperty("--t-zero-gallery-transition-duration",d.gallery_transition_duration+"s")},Y=function e(){return"published"===u.mode&&"switch"===f.gallery_imghover},G=function e(){return g.length>1&&!("published"===u.mode&&"click"===f.zoomable)&&!Y()&&!g.some((function(e){return e.link||e.video}))},Q=function e(){var t=S()?0:M();if(I(t>0),!t)return T(!1),void D.start();v=!0,R(t,(function(){V(),D.start()}))};br({element:C,disposer:s,allowMouse:"edit"!==u.mode,handlers:{start:function e(){return!(v||g.length<2)&&(D.setPaused("drag",!0),T(!0),k=!0,!0)},move:function e(t){S()||I(!1,t/z)},end:function e(t,r){k=!1,D.setPaused("drag",!1);var n=hr(t,r,window.innerWidth);n&&W(y+n)||Q()},cancel:function e(){k=!1,D.setPaused("drag",!1),Q()}}});var ee=function e(t){v&&(V(),Er(n.root,"tildaSldsMoveSlideEnd")),Er(n.root,"tildaSldsMoveSlideStart"),m=cr(y=t,N()),r(C,"t-zero-gallery__carousel_instant",!0),I(!1),j(),C.offsetWidth,r(C,"t-zero-gallery__carousel_instant",!1),L(),P(),Er(n.root,"tildaSldsMoveSlideEnd"),D.start()},te=function e(t){var r=h[y];if(!r)return!1;var n=r.querySelector(".t-zero-gallery__play");if(!n)return!1;var o=n.getBoundingClientRect();if(!o.width||!o.height)return!1;var i=kr*w*z;return t.clientX>=o.left-i&&t.clientX<=o.right+i&&t.clientY>=o.top-i&&t.clientY<=o.bottom+i};s.listen(C,"pointermove",(function(e){var t=e;if(!("mouse"!==t.pointerType||t.buttons||k||x||!Y()||g.length<2)){var r=C.getBoundingClientRect(),n=mr(t.clientX-r.left,r.width,g.length);n===y||te(t)||ee(n)}})),s.listen(C,"click",(function(e){if(G()){var t=C.getBoundingClientRect(),r=e.clientX-t.left,n=wr*w*z,o=r<=n,i=t.width-r<=n;(o||i)&&(e.preventDefault(),W(o?y-1:y+1))}}));var re=n.root.parentNode,ne,oe;return re&&s.listen(re,"keydown",(function(e){var t,r=e.key,n=0;"ArrowLeft"===r||"Left"===r?n=-1:"ArrowRight"!==r&&"Right"!==r||(n=1),n&&!Ct(e.target)&&(e.preventDefault(),W(y+n))})),J(),Z(),{setItems:function e(t){var r=g[y]?g[y].id:null,n={};h=(g=t).map((function(e){var t=X(e);return n[e.id]=t,t})),p=n;var o=-1;g.forEach((function(e,t){e.id===r&&(o=t)})),-1===o&&(o=Math.max(0,Math.min(y,g.length-1))),y=o,$(),H(),L(),null!==r&&g[y]&&g[y].id!==r&&P()},update:function e(t,r){var n=t.slds_loop!==d.slds_loop||t.gallery_transition!==d.gallery_transition;d=t,f=r,J(),Z(),n&&$(),H(),L()},relayout:function e(){w=a(C),z=i(C),"hug"===f.heightmode?(b=yr(n.getSize().width,g.map(n.getRatio)),C.style.height=b+"px"):(b=0,C.style.height="")},measure:function e(){var t=n.getSize();return"hug"===f.heightmode?{width:t.width,height:b}:t},getState:function e(){return{activeId:g[y]?g[y].id:null}},setState:function e(t){var r=-1;g.forEach((function(e,n){e.id===t.activeId&&(r=n)})),-1!==r&&r!==y&&(y=r,q(),L())},navigation:{count:function e(){return g.length},index:function e(){return y},goTo:function e(t){W(t)},next:function e(){W(y+1)},prev:function e(){W(y-1)},canPrev:function e(){return fr(y,-1,g.length,A())},canNext:function e(){return fr(y,1,g.length,A())},onChange:function e(t){return E.push(t),function(){var e=E.indexOf(t);-1!==e&&E.splice(e,1)}}},getOverhang:function e(){var t=h[y],r=t?t.querySelector(".t-zero-gallery__caption"):null;if(!r)return{above:0,below:0};var n=r.offsetTop,o=n+r.offsetHeight-t.offsetHeight;return{above:Math.max(0,-n),below:Math.max(0,o)}},destroy:function e(){F(),D.stop(),E.length=0,C.parentNode&&C.parentNode.removeChild(C)}}},Ar,Sr={type:"carousel",schema:{slds_loop:{key:"slds_loop",parse:z(["loop","none"]),default:"loop"},gallery_transition:{key:"gallery_transition",parse:z(["fade","slide"]),default:"slide"},gallery_transition_duration:{key:"gallery_transition_duration",parse:w({min:.1,max:2}),default:.3},slds_autoplay:{key:"slds_autoplay",parse:w({min:0}),default:0},slds_cursorcontrol:{key:"slds_cursorcontrol",parse:z(["on","none"]),default:"none"}},uses:Ce.concat("zoomable","gallery_imghover"),controls:["arrows","dots","thumbnails"],capabilities:["navigation"],sizing:{width:["fill","fixed"],height:["fill","fixed","hug"]},imageHover:["none","switch"],create:Or},Nr=function e(t,r,n){return t>0?t*r+(t-1)*n:0},Mr=function e(t){var r=Math.max(1,Math.floor(t.columns)||1),n=Math.max(0,t.gap),o=Math.max(0,t.width),i=t.count>0?Math.ceil(t.count/r):0,a=Math.max(0,(o-n*(r-1))/r),l=t.ratio>0?a/t.ratio:a;return"fill"===t.heightMode&&i>0&&(l=Math.max(0,(Math.max(0,t.height)-n*(i-1))/i)),{columns:r,rows:i,cellWidth:a,cellHeight:l,contentWidth:o,contentHeight:Nr(i,l,n)}},Ir=function e(r,n,o){var i=n,l=o,s=[],u=null,c=null,d=document.createElement("div");d.className="t-zero-gallery__grid",r.root.insertBefore(d,r.slots.overlay);var f=function e(){var t=r.getSize();u=Mr({count:s.length,columns:l.gallery_columns,width:t.width,height:t.height,gap:l.gallery_gap*a(d),ratio:i.gallery_ratio,heightMode:l.heightmode}),d.style.setProperty("--t-zero-gallery-cell-height",u.cellHeight+"px")},g=function e(){return"in"!==l.gallery_captionposition&&s.some((function(e){return!!e.caption}))};return{setItems:function e(n){t(d,(s=n).map(r.renderItem))},update:function e(t,r){i=t,l=r},relayout:f,measure:function e(){u||f();var t=u;return g()?{width:t.contentWidth,height:d.offsetHeight}:{width:t.contentWidth,height:t.contentHeight}},getState:function e(){return{activeId:c}},setState:function e(t){c=t.activeId},destroy:function e(){d.parentNode&&d.parentNode.removeChild(d)}}},Lr,Pr,jr,Fr=Bt(Kt({layouts:[{type:"grid",schema:{gallery_ratio:{key:"gallery_ratio",parse:E,default:1}},uses:Ce.concat("gallery_gap","gallery_columns"),controls:[],capabilities:[],sizing:{width:["fill","fixed"],height:["fill","fixed","hug"]},imageHover:["none"],create:Ir},Sr],controls:te})),Tr=Fr.create,Vr=Fr.get,Rr=sr(Fr);window.t_zeroGallery__create=Tr,window.t_zeroGallery__get=Vr,window.t_zeroGallery__mount=Rr}();